summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2009-12-29 21:38:40 +0000
committerColin Watson <cjwatson@debian.org>2009-12-29 21:38:40 +0000
commit1b816ea846aca3ee89e7995373ace609e9518424 (patch)
treeb41cdc8495cae7fa9c2e0f98a5f2e71656b61f9a
parentfa585019a79ebcb4e0202b1c33f87ff1c5c9ce1c (diff)
parent086ea76990b1e6287c24b6db74adffd4605eb3b0 (diff)
import openssh-4.6p1-gsskex-20070312.patch
-rw-r--r--CREDITS3
-rw-r--r--ChangeLog4957
-rw-r--r--ChangeLog.gssapi69
-rw-r--r--INSTALL36
-rw-r--r--LICENCE2
-rw-r--r--Makefile.in23
-rw-r--r--OVERVIEW5
-rw-r--r--README4
-rw-r--r--README.platform14
-rw-r--r--README.tun8
-rw-r--r--acss.c5
-rw-r--r--atomicio.c69
-rw-r--r--atomicio.h14
-rw-r--r--audit-bsm.c10
-rw-r--r--audit.c7
-rw-r--r--audit.h4
-rw-r--r--auth-bsdauth.c18
-rw-r--r--auth-chall.c10
-rw-r--r--auth-krb5.c14
-rw-r--r--auth-options.c28
-rw-r--r--auth-options.h2
-rw-r--r--auth-pam.c85
-rw-r--r--auth-passwd.c11
-rw-r--r--auth-rh-rsa.c12
-rw-r--r--auth-rhosts.c16
-rw-r--r--auth-rsa.c29
-rw-r--r--auth-shadow.c5
-rw-r--r--auth-sia.c19
-rw-r--r--auth-skey.c31
-rw-r--r--auth.c94
-rw-r--r--auth.h10
-rw-r--r--auth1.c22
-rw-r--r--auth2-chall.c17
-rw-r--r--auth2-gss.c16
-rw-r--r--auth2-hostbased.c17
-rw-r--r--auth2-kbdint.c11
-rw-r--r--auth2-none.c18
-rw-r--r--auth2-passwd.c13
-rw-r--r--auth2-pubkey.c18
-rw-r--r--auth2.c21
-rw-r--r--authfd.c29
-rw-r--r--authfd.h4
-rw-r--r--authfile.c32
-rw-r--r--authfile.h5
-rw-r--r--bufaux.c187
-rw-r--r--bufbn.c221
-rw-r--r--buffer.c69
-rw-r--r--buffer.h43
-rw-r--r--buildpkg.sh.in198
-rw-r--r--canohost.c28
-rw-r--r--canohost.h2
-rw-r--r--channels.c303
-rw-r--r--channels.h10
-rw-r--r--cipher-3des1.c8
-rw-r--r--cipher-acss.c3
-rw-r--r--cipher-aes.c6
-rw-r--r--cipher-bf1.c8
-rw-r--r--cipher-ctr.c9
-rw-r--r--cipher.c11
-rw-r--r--cipher.h2
-rw-r--r--cleanup.c8
-rw-r--r--clientloop.c107
-rw-r--r--clientloop.h4
-rw-r--r--compat.c13
-rw-r--r--compat.h3
-rw-r--r--compress.c8
-rw-r--r--compress.h2
-rw-r--r--config.h.in72
-rwxr-xr-xconfigure21333
-rw-r--r--configure.ac688
-rwxr-xr-xcontrib/aix/buildbff.sh46
-rw-r--r--contrib/caldera/openssh.spec4
-rw-r--r--contrib/cygwin/ssh-host-config41
-rw-r--r--contrib/findssl.sh21
-rw-r--r--contrib/redhat/openssh.spec2
-rwxr-xr-xcontrib/redhat/sshd.init9
-rw-r--r--contrib/suse/openssh.spec2
-rw-r--r--crc32.c4
-rw-r--r--crc32.h2
-rw-r--r--deattack.c76
-rw-r--r--deattack.h5
-rw-r--r--defines.h62
-rw-r--r--dh.c39
-rw-r--r--dh.h2
-rw-r--r--dispatch.c10
-rw-r--r--dispatch.h7
-rw-r--r--dns.c13
-rw-r--r--dns.h4
-rw-r--r--entropy.c17
-rw-r--r--fatal.c7
-rw-r--r--groupaccess.c15
-rw-r--r--groupaccess.h4
-rw-r--r--gss-genr.c176
-rw-r--r--gss-serv-krb5.c30
-rw-r--r--gss-serv.c87
-rw-r--r--hostfile.c20
-rw-r--r--hostfile.h2
-rw-r--r--includes.h66
-rw-r--r--kex.c54
-rw-r--r--kex.h13
-rw-r--r--kexdh.c9
-rw-r--r--kexdhc.c22
-rw-r--r--kexdhs.c23
-rw-r--r--kexgex.c8
-rw-r--r--kexgexc.c22
-rw-r--r--kexgexs.c24
-rw-r--r--kexgssc.c74
-rw-r--r--kexgsss.c71
-rw-r--r--key.c54
-rw-r--r--key.h2
-rw-r--r--log.c27
-rw-r--r--log.h5
-rw-r--r--loginrec.c22
-rw-r--r--loginrec.h6
-rw-r--r--logintest.c6
-rw-r--r--mac.c14
-rw-r--r--mac.h2
-rw-r--r--match.c11
-rw-r--r--match.h2
-rw-r--r--md-sha256.c86
-rw-r--r--md5crypt.c6
-rw-r--r--misc.c159
-rw-r--r--misc.h47
-rw-r--r--moduli.c86
-rw-r--r--monitor.c96
-rw-r--r--monitor.h2
-rw-r--r--monitor_fdpass.c11
-rw-r--r--monitor_fdpass.h2
-rw-r--r--monitor_mm.c11
-rw-r--r--monitor_mm.h3
-rw-r--r--monitor_wrap.c75
-rw-r--r--monitor_wrap.h10
-rw-r--r--msg.c18
-rw-r--r--msg.h2
-rw-r--r--myproposal.h18
-rw-r--r--nchan.c9
-rw-r--r--openbsd-compat/Makefile.in6
-rw-r--r--openbsd-compat/basename.c2
-rw-r--r--openbsd-compat/bindresvport.c8
-rw-r--r--openbsd-compat/bsd-arc4random.c8
-rw-r--r--openbsd-compat/bsd-asprintf.c9
-rw-r--r--openbsd-compat/bsd-closefrom.c25
-rw-r--r--openbsd-compat/bsd-cray.c5
-rw-r--r--openbsd-compat/bsd-cygwin_util.c29
-rw-r--r--openbsd-compat/bsd-getpeereid.c7
-rw-r--r--openbsd-compat/bsd-misc.c14
-rw-r--r--openbsd-compat/bsd-nextstep.c2
-rw-r--r--openbsd-compat/bsd-openpty.c19
-rw-r--r--openbsd-compat/bsd-snprintf.c188
-rw-r--r--openbsd-compat/bsd-waitpid.c2
-rw-r--r--openbsd-compat/daemon.c14
-rw-r--r--openbsd-compat/fake-rfc2553.c6
-rw-r--r--openbsd-compat/fake-rfc2553.h7
-rw-r--r--openbsd-compat/getrrsetbyname.c23
-rw-r--r--openbsd-compat/glob.c17
-rw-r--r--openbsd-compat/glob.h3
-rw-r--r--openbsd-compat/mktemp.c8
-rw-r--r--openbsd-compat/openbsd-compat.h31
-rw-r--r--openbsd-compat/openssl-compat.c20
-rw-r--r--openbsd-compat/openssl-compat.h25
-rw-r--r--openbsd-compat/port-aix.c28
-rw-r--r--openbsd-compat/port-aix.h14
-rw-r--r--openbsd-compat/port-irix.c4
-rw-r--r--openbsd-compat/port-linux.c169
-rw-r--r--openbsd-compat/port-linux.h27
-rw-r--r--openbsd-compat/port-solaris.c199
-rw-r--r--openbsd-compat/port-solaris.h27
-rw-r--r--openbsd-compat/port-tun.c20
-rw-r--r--openbsd-compat/port-tun.h2
-rw-r--r--openbsd-compat/port-uw.c15
-rw-r--r--openbsd-compat/readpassphrase.c6
-rw-r--r--openbsd-compat/regress/Makefile.in38
-rw-r--r--openbsd-compat/regress/closefromtest.c60
-rw-r--r--openbsd-compat/regress/snprintftest.c73
-rw-r--r--openbsd-compat/regress/strduptest.c45
-rw-r--r--openbsd-compat/regress/strtonumtest.c66
-rw-r--r--openbsd-compat/rresvport.c10
-rw-r--r--openbsd-compat/setproctitle.c5
-rwxr-xr-xopenbsd-compat/sha2.c882
-rwxr-xr-xopenbsd-compat/sha2.h133
-rw-r--r--openbsd-compat/strtonum.c3
-rw-r--r--openbsd-compat/xcrypt.c4
-rw-r--r--openbsd-compat/xmmap.c14
-rw-r--r--openssh.xml.in90
-rw-r--r--packet.c79
-rw-r--r--packet.h4
-rw-r--r--pathnames.h2
-rw-r--r--platform.c46
-rw-r--r--platform.h23
-rw-r--r--progressmeter.c17
-rw-r--r--progressmeter.h2
-rw-r--r--readconf.c74
-rw-r--r--readconf.h6
-rw-r--r--readpass.c20
-rw-r--r--regress/Makefile10
-rw-r--r--regress/agent-getpeereid.sh7
-rw-r--r--regress/agent-ptrace.sh2
-rw-r--r--regress/cfgmatch.sh106
-rw-r--r--regress/cipher-speed.sh47
-rw-r--r--regress/forcecommand.sh42
-rw-r--r--regress/forwarding.sh32
-rw-r--r--rsa.c25
-rw-r--r--rsa.h2
-rw-r--r--scard-opensc.c8
-rw-r--r--scard.c31
-rw-r--r--scard.h4
-rw-r--r--scard/Makefile.in3
-rw-r--r--scp.05
-rw-r--r--scp.17
-rw-r--r--scp.c86
-rw-r--r--servconf.c549
-rw-r--r--servconf.h20
-rw-r--r--serverloop.c84
-rw-r--r--serverloop.h2
-rw-r--r--session.c104
-rw-r--r--session.h7
-rw-r--r--sftp-client.c43
-rw-r--r--sftp-common.c16
-rw-r--r--sftp-common.h2
-rw-r--r--sftp-glob.c15
-rw-r--r--sftp-server.031
-rw-r--r--sftp-server.838
-rw-r--r--sftp-server.c352
-rw-r--r--sftp.02
-rw-r--r--sftp.c46
-rw-r--r--sftp.h2
-rw-r--r--ssh-add.02
-rw-r--r--ssh-add.c37
-rw-r--r--ssh-agent.02
-rw-r--r--ssh-agent.16
-rw-r--r--ssh-agent.c86
-rw-r--r--ssh-dss.c13
-rw-r--r--ssh-gss.h30
-rw-r--r--ssh-keygen.013
-rw-r--r--ssh-keygen.117
-rw-r--r--ssh-keygen.c149
-rw-r--r--ssh-keyscan.04
-rw-r--r--ssh-keyscan.14
-rw-r--r--ssh-keyscan.c46
-rw-r--r--ssh-keysign.010
-rw-r--r--ssh-keysign.810
-rw-r--r--ssh-keysign.c22
-rw-r--r--ssh-rand-helper.08
-rw-r--r--ssh-rand-helper.86
-rw-r--r--ssh-rand-helper.c36
-rw-r--r--ssh-rsa.c13
-rw-r--r--ssh.0103
-rw-r--r--ssh.1146
-rw-r--r--ssh.c147
-rw-r--r--ssh.h16
-rw-r--r--ssh1.h2
-rw-r--r--ssh2.h2
-rw-r--r--ssh_config6
-rw-r--r--ssh_config.0323
-rw-r--r--ssh_config.5321
-rw-r--r--sshconnect.c152
-rw-r--r--sshconnect.h26
-rw-r--r--sshconnect1.c50
-rw-r--r--sshconnect2.c111
-rw-r--r--sshd.0434
-rw-r--r--sshd.8556
-rw-r--r--sshd.c814
-rw-r--r--sshd_config23
-rw-r--r--sshd_config.0313
-rw-r--r--sshd_config.5340
-rw-r--r--sshlogin.c26
-rw-r--r--sshlogin.h11
-rw-r--r--sshpty.c31
-rw-r--r--sshpty.h11
-rw-r--r--sshtty.c8
-rw-r--r--ttymodes.c28
-rw-r--r--ttymodes.h2
-rw-r--r--uidswap.c52
-rw-r--r--uidswap.h8
-rw-r--r--uuencode.c14
-rw-r--r--uuencode.h5
-rw-r--r--version.h6
-rw-r--r--xmalloc.c48
-rw-r--r--xmalloc.h13
279 files changed, 23165 insertions, 16980 deletions
diff --git a/CREDITS b/CREDITS
index 82b9f2210..eaf105a91 100644
--- a/CREDITS
+++ b/CREDITS
@@ -25,6 +25,7 @@ Chris, the Young One <cky@pobox.com> - Password auth fixes
25Christos Zoulas <christos@zoulas.com> - Autoconf fixes 25Christos Zoulas <christos@zoulas.com> - Autoconf fixes
26Chun-Chung Chen <cjj@u.washington.edu> - RPM fixes 26Chun-Chung Chen <cjj@u.washington.edu> - RPM fixes
27Corinna Vinschen <vinschen@redhat.com> - Cygwin support 27Corinna Vinschen <vinschen@redhat.com> - Cygwin support
28Chad Mynhier <mynhier@interstel.net> - Solaris Process Contract support
28Dan Brosemer <odin@linuxfreak.com> - Autoconf support, build fixes 29Dan Brosemer <odin@linuxfreak.com> - Autoconf support, build fixes
29Darren Hall <dhall@virage.org> - AIX patches 30Darren Hall <dhall@virage.org> - AIX patches
30Darren Tucker <dtucker@zip.com.au> - AIX BFF package scripts 31Darren Tucker <dtucker@zip.com.au> - AIX BFF package scripts
@@ -100,5 +101,5 @@ Apologies to anyone I have missed.
100 101
101Damien Miller <djm@mindrot.org> 102Damien Miller <djm@mindrot.org>
102 103
103$Id: CREDITS,v 1.80 2005/08/26 20:15:20 tim Exp $ 104$Id: CREDITS,v 1.81 2006/08/30 17:24:41 djm Exp $
104 105
diff --git a/ChangeLog b/ChangeLog
index c9b5018bd..f2b96c37b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,13 +1,1969 @@
120060211 120070306
2 - (dtucker) [README] Bump release notes URL. 2 - (djm) OpenBSD CVS Sync
3 - (djm) Release 4.3p2 3 - jmc@cvs.openbsd.org 2007/03/01 16:19:33
4 [sshd_config.5]
5 sort the `match' keywords;
6 - djm@cvs.openbsd.org 2007/03/06 10:13:14
7 [version.h]
8 openssh-4.6; "please" deraadt@
9 - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
10 [contrib/suse/openssh.spec] crank spec files for release
11 - (djm) [README] correct link to release notes
12 - (djm) Release 4.6p1
13
1420070304
15 - (djm) [configure.ac] add a --without-openssl-header-check option to
16 configure, as some platforms (OS X) ship OpenSSL headers whose version
17 does not match that of the shipping library. ok dtucker@
18 - (dtucker) [openbsd-compat/openssl-compat.h] Bug #1291: Work around a
19 bug in OpenSSL 0.9.8e that prevents aes256-ctr, aes192-ctr and arcfour256
20 ciphers from working correctly (disconnects with "Bad packet length"
21 errors) as found by Ben Harris. ok djm@
22
2320070303
24 - (dtucker) [regress/agent-ptrace.sh] Make ttrace gdb error a little more
25 general to cover newer gdb versions on HP-UX.
26
2720070302
28 - (dtucker) [configure.ac] For Cygwin, read files in textmode (which allows
29 CRLF as well as LF lineendings) and write in binary mode. Patch from
30 vinschen at redhat.com.
31 - (dtucker) [INSTALL] Update to autoconf-2.61.
32
3320070301
34 - (dtucker) OpenBSD CVS Sync
35 - dtucker@cvs.openbsd.org 2007/03/01 10:28:02
36 [auth2.c sshd_config.5 servconf.c]
37 Remove ChallengeResponseAuthentication support inside a Match
38 block as its interaction with KbdInteractive makes it difficult to
39 support. Also, relocate the CR/kbdint option special-case code into
40 servconf. "please commit" djm@, ok markus@ for the relocation.
41 - (tim) [buildpkg.sh.in openssh.xml.in] Clean up Solaris 10 smf(5) bits.
42 "Looks sane" dtucker@
43
4420070228
45 - (dtucker) OpenBSD CVS Sync
46 - dtucker@cvs.openbsd.org 2007/02/28 00:55:30
47 [ssh-agent.c]
48 Remove expired keys periodically so they don't remain in memory when
49 the agent is entirely idle, as noted by David R. Piegdon. This is the
50 simple fix, a more efficient one will be done later. With markus,
51 deraadt, with & ok djm.
52
5320070225
54 - (dtucker) OpenBSD CVS Sync
55 - djm@cvs.openbsd.org 2007/02/20 10:25:14
56 [clientloop.c]
57 set maximum packet and window sizes the same for multiplexed clients
58 as normal connections; ok markus@
59 - dtucker@cvs.openbsd.org 2007/02/21 11:00:05
60 [sshd.c]
61 Clear alarm() before restarting sshd on SIGHUP. Without this, if there's
62 a SIGALRM pending (for SSH1 key regeneration) when sshd is SIGHUP'ed, the
63 newly exec'ed sshd will get the SIGALRM and not have a handler for it,
64 and the default action will terminate the listening sshd. Analysis and
65 patch from andrew at gaul.org.
66 - dtucker@cvs.openbsd.org 2007/02/22 12:58:40
67 [servconf.c]
68 Check activep so Match and GatewayPorts work together; ok markus@
69 - ray@cvs.openbsd.org 2007/02/24 03:30:11
70 [moduli.c]
71 - strlen returns size_t, not int.
72 - Pass full buffer size to fgets.
73 OK djm@, millert@, and moritz@.
74
7520070219
76 - (dtucker) OpenBSD CVS Sync
77 - jmc@cvs.openbsd.org 2007/01/10 13:23:22
78 [ssh_config.5]
79 do not use a list for SYNOPSIS;
80 this is actually part of a larger report sent by eric s. raymond
81 and forwarded by brad, but i only read half of it. spotted by brad.
82 - jmc@cvs.openbsd.org 2007/01/12 20:20:41
83 [ssh-keygen.1 ssh-keygen.c]
84 more secsh -> rfc 4716 updates;
85 spotted by wiz@netbsd
86 ok markus
87 - dtucker@cvs.openbsd.org 2007/01/17 23:22:52
88 [readconf.c]
89 Honour activep for times (eg ServerAliveInterval) while parsing
90 ssh_config and ~/.ssh/config so they work properly with Host directives.
91 From mario.lorenz@wincor-nixdorf.com via bz #1275. ok markus@
92 - stevesk@cvs.openbsd.org 2007/01/21 01:41:54
93 [auth-skey.c kex.c ssh-keygen.c session.c clientloop.c]
94 spaces
95 - stevesk@cvs.openbsd.org 2007/01/21 01:45:35
96 [readconf.c]
97 spaces
98 - djm@cvs.openbsd.org 2007/01/22 11:32:50
99 [sftp-client.c]
100 return error from do_upload() when a write fails. fixes bz#1252: zero
101 exit status from sftp when uploading to a full device. report from
102 jirkat AT atlas.cz; ok dtucker@
103 - djm@cvs.openbsd.org 2007/01/22 13:06:21
104 [scp.c]
105 fix detection of whether we should show progress meter or not: scp
106 tested isatty(stderr) but wrote the progress meter to stdout. This patch
107 makes it test stdout. bz#1265 reported by junkmail AT bitsculpture.com;
108 of dtucker@
109 - stevesk@cvs.openbsd.org 2007/02/14 14:32:00
110 [bufbn.c]
111 typos in comments; ok jmc@
112 - dtucker@cvs.openbsd.org 2007/02/19 10:45:58
113 [monitor_wrap.c servconf.c servconf.h monitor.c sshd_config.5]
114 Teach Match how handle config directives that are used before
115 authentication. This allows configurations such as permitting password
116 authentication from the local net only while requiring pubkey from
117 offsite. ok djm@, man page bits ok jmc@
118 - (dtucker) [contrib/findssl.sh] Add "which" as a shell function since some
119 platforms don't have it. Patch from dleonard at vintela.com.
120 - (dtucker) [openbsd-compat/getrrsetbyname.c] Don't attempt to calloc
121 an array for signatures when there are none since "calloc(0, n) returns
122 NULL on some platforms (eg Tru64), which is explicitly permitted by
123 POSIX. Diagnosis and patch by svallet genoscope.cns.fr.
124
12520070128
126 - (djm) [channels.c serverloop.c] Fix so-called "hang on exit" (bz #52)
127 when closing a tty session when a background process still holds tty
128 fds open. Great detective work and patch by Marc Aurele La France,
129 slightly tweaked by me; ok dtucker@
130
13120070123
132 - (dtucker) [openbsd-compat/bsd-snprintf.c] Static declarations for public
133 library interfaces aren't very helpful. Fix up the DOPR_OUTCH macro
134 so it works properly and modify its callers so that they don't pre or
135 post decrement arguments that are conditionally evaluated. While there,
136 put SNPRINTF_CONST back as it prevents build failures in some
137 configurations. ok djm@ (for most of it)
138
13920070122
140 - (djm) [ssh-rand-helper.8] manpage nits;
141 from dleonard AT vintela.com (bz#1529)
142
14320070117
144 - (dtucker) [packet.c] Re-remove in_systm.h since it's already in includes.h
145 and multiple including it causes problems on old IRIXes. (It snuck back
146 in during a sync.) Found (again) by Georg Schwarz.
147
14820070114
149 - (dtucker) [ssh-keygen.c] av -> argv to match earlier sync.
150 - (djm) [openbsd-compat/bsd-snprintf.c] Fix integer overflow in return
151 value of snprintf replacement, similar to bugs in various libc
152 implementations. This overflow is not exploitable in OpenSSH.
153 While I'm fiddling with it, make it a fair bit faster by inlining the
154 append-char routine; ok dtucker@
155
15620070105
157 - (djm) OpenBSD CVS Sync
158 - deraadt@cvs.openbsd.org 2006/11/14 19:41:04
159 [ssh-keygen.c]
160 use argc and argv not some made up short form
161 - ray@cvs.openbsd.org 2006/11/23 01:35:11
162 [misc.c sftp.c]
163 Don't access buf[strlen(buf) - 1] for zero-length strings.
164 ``ok by me'' djm@.
165 - markus@cvs.openbsd.org 2006/12/11 21:25:46
166 [ssh-keygen.1 ssh.1]
167 add rfc 4716 (public key format); ok jmc
168 - djm@cvs.openbsd.org 2006/12/12 03:58:42
169 [channels.c compat.c compat.h]
170 bz #1019: some ssh.com versions apparently can't cope with the
171 remote port forwarding bind_address being a hostname, so send
172 them an address for cases where they are not explicitly
173 specified (wildcard or localhost bind). reported by daveroth AT
174 acm.org; ok dtucker@ deraadt@
175 - dtucker@cvs.openbsd.org 2006/12/13 08:34:39
176 [servconf.c]
177 Make PermitOpen work with multiple values like the man pages says.
178 bz #1267 with details from peter at dmtz.com, with & ok djm@
179 - dtucker@cvs.openbsd.org 2006/12/14 10:01:14
180 [servconf.c]
181 Make "PermitOpen all" first-match within a block to match the way other
182 options work. ok markus@ djm@
183 - jmc@cvs.openbsd.org 2007/01/02 09:57:25
184 [sshd_config.5]
185 do not use lists for SYNOPSIS;
186 from eric s. raymond via brad
187 - stevesk@cvs.openbsd.org 2007/01/03 00:53:38
188 [ssh-keygen.c]
189 remove small dead code; arnaud.lacombe.1@ulaval.ca via Coverity scan
190 - stevesk@cvs.openbsd.org 2007/01/03 03:01:40
191 [auth2-chall.c channels.c dns.c sftp.c ssh-keygen.c ssh.c]
192 spaces
193 - stevesk@cvs.openbsd.org 2007/01/03 04:09:15
194 [sftp.c]
195 ARGSUSED for lint
196 - stevesk@cvs.openbsd.org 2007/01/03 07:22:36
197 [sftp-server.c]
198 spaces
199
20020061205
201 - (djm) [auth.c] Fix NULL pointer dereference in fakepw(). Crash would
202 occur if the server did not have the privsep user and an invalid user
203 tried to login and both privsep and krb5 auth are disabled; ok dtucker@
204 - (djm) [bsd-asprintf.c] Better test for bad vsnprintf lengths; ok dtucker@
205
20620061108
207 - (dtucker) OpenBSD CVS Sync
208 - markus@cvs.openbsd.org 2006/11/07 13:02:07
209 [dh.c]
210 BN_hex2bn returns int; from dtucker@
211
21220061107
213 - (dtucker) [sshd.c] Use privsep_pw if we have it, but only require it
214 if we absolutely need it. Pointed out by Corinna, ok djm@
215 - (dtucker) OpenBSD CVS Sync
216 - markus@cvs.openbsd.org 2006/11/06 21:25:28
217 [auth-rsa.c kexgexc.c kexdhs.c key.c ssh-dss.c sshd.c kexgexs.c
218 ssh-keygen.c bufbn.c moduli.c scard.c kexdhc.c sshconnect1.c dh.c rsa.c]
219 add missing checks for openssl return codes; with & ok djm@
220 - markus@cvs.openbsd.org 2006/11/07 10:31:31
221 [monitor.c version.h]
222 correctly check for bad signatures in the monitor, otherwise the monitor
223 and the unpriv process can get out of sync. with dtucker@, ok djm@,
224 dtucker@
225 - (dtucker) [README contrib/{caldera,redhat,contrib}/openssh.spec] Bump
226 versions.
227 - (dtucker) Release 4.5p1.
228
22920061105
230 - (djm) OpenBSD CVS Sync
231 - otto@cvs.openbsd.org 2006/10/28 18:08:10
232 [ssh.1]
233 correct/expand example of usage of -w; ok jmc@ stevesk@
234 - markus@cvs.openbsd.org 2006/10/31 16:33:12
235 [kexdhc.c kexdhs.c kexgexc.c kexgexs.c]
236 check DH_compute_key() for -1 even if it should not happen because of
237 earlier calls to dh_pub_is_valid(); report krahmer at suse.de; ok djm
238
23920061101
240 - (dtucker) [openbsd-compat/port-solaris.c] Bug #1255: Make only hwerr
241 events fatal in Solaris process contract support and tell it to signal
242 only processes in the same process group when something happens.
243 Based on information from andrew.benham at thus.net and similar to
244 a patch from Chad Mynhier. ok djm@
245
24620061027
247- (djm) [auth.c] gc some dead code
248
24920061023
250 - (djm) OpenBSD CVS Sync
251 - ray@cvs.openbsd.org 2006/09/30 17:48:22
252 [sftp.c]
253 Clear errno before calling the strtol functions.
254 From Paul Stoeber <x0001 at x dot de1 dot cc>.
255 OK deraadt@.
256 - djm@cvs.openbsd.org 2006/10/06 02:29:19
257 [ssh-agent.c ssh-keyscan.c ssh.c]
258 sys/resource.h needs sys/time.h; prompted by brad@
259 (NB. Id sync only for portable)
260 - djm@cvs.openbsd.org 2006/10/09 23:36:11
261 [session.c]
262 xmalloc -> xcalloc that was missed previously, from portable
263 (NB. Id sync only for portable, obviously)
264 - markus@cvs.openbsd.org 2006/10/10 10:12:45
265 [sshconnect.c]
266 sleep before retrying (not after) since sleep changes errno; fixes
267 pr 5250; rad@twig.com; ok dtucker djm
268 - markus@cvs.openbsd.org 2006/10/11 12:38:03
269 [clientloop.c serverloop.c]
270 exit instead of doing a blocking tcp send if we detect a client/server
271 timeout, since the tcp sendqueue might be already full (of alive
272 requests); ok dtucker, report mpf
273 - djm@cvs.openbsd.org 2006/10/22 02:25:50
274 [sftp-client.c]
275 cancel progress meter when upload write fails; ok deraadt@
276 - (tim) [Makefile.in scard/Makefile.in] Add datarootdir= lines to keep
277 autoconf 2.60 from complaining.
278
27920061018
280 - (dtucker) OpenBSD CVS Sync
281 - ray@cvs.openbsd.org 2006/09/25 04:55:38
282 [ssh-keyscan.1 ssh.1]
283 Change "a SSH" to "an SSH". Hurray, I'm not the only one who
284 pronounces "SSH" as "ess-ess-aich".
285 OK jmc@ and stevesk@.
286 - (dtucker) [sshd.c] Reshuffle storing of pw struct; prevents warnings
287 on older versions of OS X. ok djm@
288
28920061016
290 - (dtucker) [monitor_fdpass.c] Include sys/in.h, required for cmsg macros
291 on older (2.0) Linuxes. Based on patch from thmo-13 at gmx de.
292
29320061006
294 - (tim) [buildpkg.sh.in] Use uname -r instead of -v in OS_VER for Solaris.
295 Differentiate between OpenServer 5 and OpenServer 6
296 - (dtucker) [configure.ac] Set put -lselinux into $LIBS while testing for
297 SELinux functions so they're detected correctly. Patch from pebenito at
298 gentoo.org.
299 - (tim) [buildpkg.sh.in] Some systems have really limited nawk (OpenServer).
300 Allow setting alternate awk in openssh-config.local.
301
30220061003
303 - (tim) [configure.ac] Move CHECK_HEADERS test before platform specific
304 section so additional platform specific CHECK_HEADER tests will work
305 correctly. Fixes "<net/if_tap.h> on FreeBSD" problem report by des AT des.no
306 Feedback and "seems like a good idea" dtucker@
307
30820061001
309 - (dtucker) [audit-bsm.c] Include errno.h. Pointed out by des at des.no.
310
31120060929
312 - (dtucker) [configure.ac] Bug #1239: Fix configure test for OpenSSH engine
313 support. Patch from andrew.benham at thus net.
314
31520060928
316 - (dtucker) [entropy.c] Bug #1238: include signal.h to fix compilation error
317 on Solaris 8 w/out /dev/random or prngd. Patch from rl at
318 math.technion.ac.il.
319
32020060926
321 - (dtucker) [bufaux.h] nuke bufaux.h; it's already gone from OpenBSD and not
322 referenced any more. ok djm@
323 - (dtucker) [sftp-server.8] Resync; spotted by djm@
324 - (dtucker) Release 4.4p1.
325
32620060924
327 - (tim) [configure.ac] Remove CFLAGS hack for UnixWare 1.x/2.x (added
328 to rev 1.308) to work around broken gcc 2.x header file.
329
33020060923
331 - (dtucker) [configure.ac] Bug #1234: Put opensc libs into $LIBS rather than
332 $LDFLAGS. Patch from vapier at gentoo org.
333
33420060922
335 - (dtucker) [packet.c canohost.c] Include arpa/inet.h for htonl macros on
336 some platforms (eg HP-UX 11.00). From santhi.amirta at gmail com.
337
33820060921
339 - (dtucker) OpenBSD CVS Sync
340 - otto@cvs.openbsd.org 2006/09/19 05:52:23
341 [sftp.c]
342 Use S_IS* macros insted of masking with S_IF* flags. The latter may
343 have multiple bits set, which lead to surprising results. Spotted by
344 Paul Stoeber, more to come. ok millert@ pedro@ jaredy@ djm@
345 - markus@cvs.openbsd.org 2006/09/19 21:14:08
346 [packet.c]
347 client NULL deref on protocol error; Tavis Ormandy, Google Security Team
348 - (dtucker) [defines.h] Include unistd.h before defining getpgrp; fixes
349 build error on Ultrix. From Bernhard Simon.
350
35120060918
352 - (dtucker) [configure.ac] On AIX, check to see if the compiler will allow
353 macro redefinitions, and if not, remove "-qlanglvl=ansi" from the flags.
354 Allows build out of the box with older VAC and XLC compilers. Found by
355 David Bronder and Bernhard Simon.
356 - (dtucker) [openbsd-compat/port-aix.{c,h}] Reduce scope of includes.
357 Prevents macro redefinition warnings of "RDONLY".
358
35920060916
360 - OpenBSD CVS Sync
361 - djm@cvs.openbsd.org 2006/09/16 19:53:37
362 [deattack.c deattack.h packet.c]
363 limit maximum work performed by the CRC compensation attack detector,
364 problem reported by Tavis Ormandy, Google Security Team;
365 ok markus@ deraadt@
366 - (djm) Add openssh.xml to .cvsignore and sort it
367 - (dtucker) [auth-pam.c] Propogate TZ environment variable to PAM auth
368 process so that any logging it does is with the right timezone. From
369 Scott Strickler, ok djm@.
370 - (dtucker) [monitor.c] Correctly handle auditing of single commands when
371 using Protocol 1. From jhb at freebsd.
372 - (djm) [sshd.c] Fix warning/API abuse; ok dtucker@
373 - (dtucker) [INSTALL] Add info about audit support.
374
37520060912
376 - (djm) [Makefile.in buildpkg.sh.in configure.ac openssh.xml.in]
377 Support SMF in Solaris Packages if enabled by configure. Patch from
378 Chad Mynhier, tested by dtucker@
379
38020060911
381 - (dtucker) [cipher-aes.c] Include string.h for memcpy and friends. Noted
382 by Pekka Savola.
383
38420060910
385 - (dtucker) [contrib/aix/buildbff.sh] Ensure that perl is available.
386 - (dtucker) [configure.ac] Add -lcrypt to let DragonFly build OOTB.
387
38820060909
389 - (dtucker) [openbsd-compat/bsd-snprintf.c] Add stdarg.h.
390 - (dtucker) [contrib/aix/buildbff.sh] Always create privsep user.
391 - (dtucker) [buildpkg.sh.in] Always create privsep user. ok djm@
392
39320060908
394 - (dtucker) [auth-sia.c] Add includes required for build on Tru64. Patch
395 from Chris Adams.
396 - (dtucker) [configure.ac] The BSM header test needs time.h in some cases.
397
39820060907
399 - (djm) [sshd.c auth.c] Set up fakepw() with privsep uid/gid, so it can
400 be used to drop privilege to; fixes Solaris GSSAPI crash reported by
401 Magnus Abrante; suggestion and feedback dtucker@
402 NB. this change will require that the privilege separation user must
403 exist on all the time, not just when UsePrivilegeSeparation=yes
404 - (tim) [configure.ac] s/BROKEN_UPDWTMP/BROKEN_UPDWTMPX/ on SCO OSR6
405 - (dtucker) [loginrec.c] Wrap paths.h in HAVE_PATHS_H.
406 - (dtucker) [regress/cfgmatch.sh] stop_client is racy, so give us a better
407 chance of winning.
408
40920060905
410 - (dtucker) [configure.ac] s/AC_DEFINES/AC_DEFINE/ spotted by Roumen Petrov.
411 - (dtucker) [loginrec.c] Include paths.h for _PATH_BTMP.
412
41320060904
414 - (dtucker) [configure.ac] Define BROKEN_UPDWTMP on SCO OSR6 as the native
415 updwdtmp seems to generate invalid wtmp entries. From Roger Cornelius,
416 ok djm@
417
41820060903
419 - (dtucker) [configure.ac openbsd-compat/openbsd-compat.h] Check for
420 declaration of writev(2) and declare it ourselves if necessary. Makes
421 the atomiciov() calls build on really old systems. ok djm@
422
42320060902
424 - (dtucker) [openbsd-compat/port-irix.c] Add errno.h, found by Iain Morgan.
425 - (dtucker) [ssh-keyscan.c ssh-rand-helper.c ssh.c sshconnect.c
426 openbsd-compat/bindresvport.c openbsd-compat/getrrsetbyname.c
427 openbsd-compat/port-tun.c openbsd-compat/rresvport.c] Include <arpa/inet.h>
428 for hton* and ntoh* macros. Required on (at least) HP-UX since we define
429 _XOPEN_SOURCE_EXTENDED. Found by santhi.amirta at gmail com.
430
43120060901
432 - (djm) [audit-bsm.c audit.c auth-bsdauth.c auth-chall.c auth-pam.c]
433 [auth-rsa.c auth-shadow.c auth-sia.c auth1.c auth2-chall.c]
434 [auth2-gss.c auth2-kbdint.c auth2-none.c authfd.c authfile.c]
435 [cipher-3des1.c cipher-aes.c cipher-bf1.c cipher-ctr.c clientloop.c]
436 [dh.c dns.c entropy.c gss-serv-krb5.c gss-serv.c hostfile.c kex.c]
437 [kexdhc.c kexdhs.c kexgexc.c kexgexs.c key.c loginrec.c mac.c]
438 [md5crypt.c monitor.c monitor_wrap.c readconf.c rsa.c]
439 [scard-opensc.c scard.c session.c ssh-add.c ssh-agent.c ssh-dss.c]
440 [ssh-keygen.c ssh-keysign.c ssh-rsa.c ssh.c sshconnect.c]
441 [sshconnect1.c sshconnect2.c sshd.c]
442 [openbsd-compat/bsd-cray.c openbsd-compat/port-aix.c]
443 [openbsd-compat/port-linux.c openbsd-compat/port-solaris.c]
444 [openbsd-compat/port-uw.c]
445 Lots of headers for SCO OSR6, mainly adding stdarg.h for log.h;
446 compile problems reported by rac AT tenzing.org
447 - (djm) [includes.h monitor.c openbsd-compat/bindresvport.c]
448 [openbsd-compat/rresvport.c] Some more headers: netinet/in.h
449 sys/socket.h and unistd.h in various places
450 - (dtucker) [openbsd-compat/bsd-cygwin_util.c] Fix implict declaration
451 warnings for binary_open and binary_close. Patch from Corinna Vinschen.
452 - (dtucker) [configure.ac includes.h openbsd-compat/glob.{c,h}] Explicitly
453 test for GLOB_NOMATCH and use our glob functions if it's not found.
454 Stops sftp from segfaulting when attempting to get a nonexistent file on
455 Cygwin (previous versions of OpenSSH didn't use the native glob). Partly
456 from and tested by Corinna Vinschen.
457 - (dtucker) [README contrib/{caldera,redhat,suse}/openssh.spec] Crank
458 versions.
459
46020060831
461 - (djm) [CREDITS LICENCE Makefile.in auth.c configure.ac includes.h ]
462 [platform.c platform.h sshd.c openbsd-compat/Makefile.in]
463 [openbsd-compat/openbsd-compat.h openbsd-compat/port-solaris.c]
464 [openbsd-compat/port-solaris.h] Add support for Solaris process
465 contracts, enabled with --use-solaris-contracts. Patch from Chad
466 Mynhier, tweaked by dtucker@ and myself; ok dtucker@
467 - (dtucker) [contrib/cygwin/ssh-host-config] Add SeTcbPrivilege privilege
468 while setting up the ssh service account. Patch from Corinna Vinschen.
469
47020060830
471 - (djm) OpenBSD CVS Sync
472 - dtucker@cvs.openbsd.org 2006/08/21 08:14:01
473 [sshd_config.5]
474 Document HostbasedUsesNameFromPacketOnly. Corrections from jmc@,
475 ok jmc@ djm@
476 - dtucker@cvs.openbsd.org 2006/08/21 08:15:57
477 [sshd.8]
478 Add more detail about what permissions are and aren't accepted for
479 authorized_keys files. Corrections jmc@, ok djm@, "looks good" jmc@
480 - djm@cvs.openbsd.org 2006/08/29 10:40:19
481 [channels.c session.c]
482 normalise some inconsistent (but harmless) NULL pointer checks
483 spotted by the Stanford SATURN tool, via Isil Dillig;
484 ok markus@ deraadt@
485 - dtucker@cvs.openbsd.org 2006/08/29 12:02:30
486 [gss-genr.c]
487 Work around a problem in Heimdal that occurs when KRB5CCNAME file is
488 missing, by checking whether or not kerberos allocated us a context
489 before attempting to free it. Patch from Simon Wilkinson, tested by
490 biorn@, ok djm@
491 - dtucker@cvs.openbsd.org 2006/08/30 00:06:51
492 [sshconnect2.c]
493 Fix regression where SSH2 banner is printed at loglevels ERROR and FATAL
494 where previously it weren't. bz #1221, found by Dean Kopesky, ok djm@
495 - djm@cvs.openbsd.org 2006/08/30 00:14:37
496 [version.h]
497 crank to 4.4
498 - (djm) [openbsd-compat/xcrypt.c] needs unistd.h
499 - (dtucker) [auth.c openbsd-compat/port-aix.c] Bug #1207: always call
500 loginsuccess on AIX immediately after authentication to clear the failed
501 login count. Previously this would only happen when an interactive
502 session starts (ie when a pty is allocated) but this means that accounts
503 that have primarily non-interactive sessions (eg scp's) may gradually
504 accumulate enough failures to lock out an account. This change may have
505 a side effect of creating two audit records, one with a tty of "ssh"
506 corresponding to the authentication and one with the allocated pty per
507 interactive session.
508
50920060824
510 - (dtucker) [openbsd-compat/basename.c] Include errno.h.
511 - (dtucker) [openbsd-compat/bsd-misc.c] Add includes needed for select(2) on
512 older systems.
513 - (dtucker) [openbsd-compat/bsd-misc.c] Include <sys/select.h> for select(2)
514 on POSIX systems.
515 - (dtucker) [openbsd-compat/bsd-openpty.c] Include for ioctl(2).
516 - (dtucker) [openbsd-compat/rresvport.c] Include <stdlib.h> for malloc.
517 - (dtucker) [openbsd-compat/xmmap.c] Move #define HAVE_MMAP to prevent
518 unused variable warning when we have a broken or missing mmap(2).
519
52020060822
521 - (dtucker) [Makefile.in] Bug #1177: fix incorrect path for sshrc in
522 Makefile. Patch from santhi.amirta at gmail, ok djm.
523
52420060820
525 - (dtucker) [log.c] Move ifdef to prevent unused variable warning.
526 - (dtucker) [configure.ac] Save $LIBS during PAM library tests and restore
527 afterward. Removes the need to mangle $LIBS later to remove -lpam and -ldl.
528 - (dtucker) [configure.ac] Relocate --with-pam parts in preparation for
529 fixing bug #1181. No changes yet.
530 - (dtucker) [configure.ac] Bug #1181: Explicitly test to see if OpenSSL
531 (0.9.8a and presumably newer) requires -ldl to successfully link.
532 - (dtucker) [configure.ac] Remove errant "-".
533
53420060819
535 - (djm) OpenBSD CVS Sync
536 - djm@cvs.openbsd.org 2006/08/18 22:41:29
537 [gss-genr.c]
538 GSSAPI error code should be 0 and not -1; from simon@sxw.org.uk
539 - (dtucker) [openbsd-compat/regress/Makefile.in] Add $(EXEEXT) and add a
540 single rule for the test progs.
541
54220060818
543 - (dtucker) [configure.ac openbsd-compat/bsd-closefrom.c] Resync with
544 closefrom.c from sudo.
545 - (dtucker) [openbsd-compat/bsd-closefrom.c] Comment out rcsid.
546 - (dtucker) [openbsd-compat/regress/snprintftest.c] Newline on error.
547 - (dtucker) [openbsd-compat/regress/Makefile.in] Use implicit rules for the
548 test progs instead; they work better than what we have.
549 - (djm) OpenBSD CVS Sync
550 - stevesk@cvs.openbsd.org 2006/08/06 01:13:32
551 [compress.c monitor.c monitor_wrap.c]
552 "zlib.h" can be <zlib.h>; ok djm@ markus@
553 - miod@cvs.openbsd.org 2006/08/12 20:46:46
554 [monitor.c monitor_wrap.c]
555 Revert previous include file ordering change, for ssh to compile under
556 gcc2 (or until openssl include files are cleaned of parameter names
557 in function prototypes)
558 - dtucker@cvs.openbsd.org 2006/08/14 12:40:25
559 [servconf.c servconf.h sshd_config.5]
560 Add ability to match groups to Match keyword in sshd_config. Feedback
561 djm@, stevesk@, ok stevesk@.
562 - djm@cvs.openbsd.org 2006/08/16 11:47:15
563 [sshd.c]
564 factor inetd connection, TCP listen and main TCP accept loop out of
565 main() into separate functions to improve readability; ok markus@
566 - deraadt@cvs.openbsd.org 2006/08/18 09:13:26
567 [log.c log.h sshd.c]
568 make signal handler termination path shorter; risky code pointed out by
569 mark dowd; ok djm markus
570 - markus@cvs.openbsd.org 2006/08/18 09:15:20
571 [auth.h session.c sshd.c]
572 delay authentication related cleanups until we're authenticated and
573 all alarms have been cancelled; ok deraadt
574 - djm@cvs.openbsd.org 2006/08/18 10:27:16
575 [misc.h]
576 reorder so prototypes are sorted by the files they refer to; no
577 binary change
578 - djm@cvs.openbsd.org 2006/08/18 13:54:54
579 [gss-genr.c ssh-gss.h sshconnect2.c]
580 bz #1218 - disable SPNEGO as per RFC4462; diff from simon AT sxw.org.uk
581 ok markus@
582 - djm@cvs.openbsd.org 2006/08/18 14:40:34
583 [gss-genr.c ssh-gss.h]
584 constify host argument to match the rest of the GSSAPI functions and
585 unbreak compilation with -Werror
586 - (djm) Disable sigdie() for platforms that cannot safely syslog inside
587 a signal handler (basically all of them, excepting OpenBSD);
588 ok dtucker@
589
59020060817
591 - (dtucker) [openbsd-compat/fake-rfc2553.c openbsd-compat/setproctitle.c]
592 Include stdlib.h for malloc and friends.
593 - (dtucker) [configure.ac openbsd-compat/bsd-closefrom.c] Use F_CLOSEM fcntl
594 for closefrom() on AIX. Pointed out by William Ahern.
595 - (dtucker) [openbsd-compat/regress/{Makefile.in,closefromtest.c}] Regress
596 test for closefrom() in compat code.
597
59820060816
599 - (djm) [audit-bsm.c] Sprinkle in some headers
600
60120060815
602 - (dtucker) [LICENCE] Add Reyk to the list for the compat dir.
603
60420060806
605 - (djm) [openbsd-compat/bsd-getpeereid.c] Add some headers to quiet warnings
606 on Solaris 10
607
60820060806
609 - (dtucker) [defines.h] With the includes.h changes we no longer get the
610 name clash on "YES" so we can remove the workaround for it.
611 - (dtucker) [openbsd-compat/{bsd-asprintf.c,bsd-openpty.c,bsd-snprintf.c,
612 glob.c}] Include stdlib.h for malloc and friends in compat code.
613
61420060805
615 - (djm) OpenBSD CVS Sync
616 - stevesk@cvs.openbsd.org 2006/07/24 13:58:22
617 [sshconnect.c]
618 disable tunnel forwarding when no strict host key checking
619 and key changed; ok djm@ markus@ dtucker@
620 - stevesk@cvs.openbsd.org 2006/07/25 02:01:34
621 [scard.c]
622 need #include <string.h>
623 - stevesk@cvs.openbsd.org 2006/07/25 02:59:21
624 [channels.c clientloop.c packet.c scp.c serverloop.c sftp-client.c]
625 [sftp-server.c ssh-agent.c ssh-keyscan.c sshconnect.c sshd.c]
626 move #include <sys/time.h> out of includes.h
627 - stevesk@cvs.openbsd.org 2006/07/26 02:35:17
628 [atomicio.c auth.c dh.c authfile.c buffer.c clientloop.c kex.c]
629 [groupaccess.c gss-genr.c kexgexs.c misc.c monitor.c monitor_mm.c]
630 [packet.c scp.c serverloop.c session.c sftp-client.c sftp-common.c]
631 [sftp-server.c sftp.c ssh-add.c ssh-agent.c ssh-keygen.c sshlogin.c]
632 [uidswap.c xmalloc.c]
633 move #include <sys/param.h> out of includes.h
634 - stevesk@cvs.openbsd.org 2006/07/26 13:57:17
635 [authfd.c authfile.c dh.c canohost.c channels.c clientloop.c compat.c]
636 [hostfile.c kex.c log.c misc.c moduli.c monitor.c packet.c readpass.c]
637 [scp.c servconf.c session.c sftp-server.c sftp.c ssh-add.c ssh-agent.c]
638 [ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh.c sshconnect.c]
639 [sshconnect1.c sshd.c xmalloc.c]
640 move #include <stdlib.h> out of includes.h
641 - jmc@cvs.openbsd.org 2006/07/27 08:00:50
642 [ssh_config.5]
643 avoid confusing wording in HashKnownHosts:
644 originally spotted by alan amesbury;
645 ok deraadt
646 - jmc@cvs.openbsd.org 2006/07/27 08:00:50
647 [ssh_config.5]
648 avoid confusing wording in HashKnownHosts:
649 originally spotted by alan amesbury;
650 ok deraadt
651 - dtucker@cvs.openbsd.org 2006/08/01 11:34:36
652 [sshconnect.c]
653 Allow fallback to known_hosts entries without port qualifiers for
654 non-standard ports too, so that all existing known_hosts entries will be
655 recognised. Requested by, feedback and ok markus@
656 - stevesk@cvs.openbsd.org 2006/08/01 23:22:48
657 [auth-passwd.c auth-rhosts.c auth-rsa.c auth.c auth.h auth1.c]
658 [auth2-chall.c auth2-pubkey.c authfile.c buffer.c canohost.c]
659 [channels.c clientloop.c dh.c dns.c dns.h hostfile.c kex.c kexdhc.c]
660 [kexgexc.c kexgexs.c key.c key.h log.c misc.c misc.h moduli.c]
661 [monitor_wrap.c packet.c progressmeter.c readconf.c readpass.c scp.c]
662 [servconf.c session.c sftp-client.c sftp-common.c sftp-server.c sftp.c]
663 [ssh-add.c ssh-agent.c ssh-keygen.c ssh-keyscan.c ssh.c sshconnect.c]
664 [sshconnect1.c sshconnect2.c sshd.c sshlogin.c sshtty.c uuencode.c]
665 [uuencode.h xmalloc.c]
666 move #include <stdio.h> out of includes.h
667 - stevesk@cvs.openbsd.org 2006/08/01 23:36:12
668 [authfile.c channels.c progressmeter.c scard.c servconf.c ssh.c]
669 clean extra spaces
670 - deraadt@cvs.openbsd.org 2006/08/03 03:34:42
671 [OVERVIEW atomicio.c atomicio.h auth-bsdauth.c auth-chall.c auth-krb5.c]
672 [auth-options.c auth-options.h auth-passwd.c auth-rh-rsa.c auth-rhosts.c]
673 [auth-rsa.c auth-skey.c auth.c auth.h auth1.c auth2-chall.c auth2-gss.c]
674 [auth2-hostbased.c auth2-kbdint.c auth2-none.c auth2-passwd.c ]
675 [auth2-pubkey.c auth2.c authfd.c authfd.h authfile.c bufaux.c bufbn.c]
676 [buffer.c buffer.h canohost.c channels.c channels.h cipher-3des1.c]
677 [cipher-bf1.c cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c]
678 [compress.c deattack.c dh.c dispatch.c dns.c dns.h fatal.c groupaccess.c]
679 [groupaccess.h gss-genr.c gss-serv-krb5.c gss-serv.c hostfile.c kex.c]
680 [kex.h kexdh.c kexdhc.c kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c]
681 [key.h log.c log.h mac.c match.c md-sha256.c misc.c misc.h moduli.c]
682 [monitor.c monitor_fdpass.c monitor_mm.c monitor_mm.h monitor_wrap.c]
683 [monitor_wrap.h msg.c nchan.c packet.c progressmeter.c readconf.c]
684 [readconf.h readpass.c rsa.c scard.c scard.h scp.c servconf.c servconf.h]
685 [serverloop.c session.c session.h sftp-client.c sftp-common.c]
686 [sftp-common.h sftp-glob.c sftp-server.c sftp.c ssh-add.c ssh-agent.c]
687 [ssh-dss.c ssh-gss.h ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-rsa.c]
688 [ssh.c ssh.h sshconnect.c sshconnect.h sshconnect1.c sshconnect2.c]
689 [sshd.c sshlogin.c sshlogin.h sshpty.c sshpty.h sshtty.c ttymodes.c]
690 [uidswap.c uidswap.h uuencode.c uuencode.h xmalloc.c xmalloc.h]
691 [loginrec.c loginrec.h openbsd-compat/port-aix.c openbsd-compat/port-tun.h]
692 almost entirely get rid of the culture of ".h files that include .h files"
693 ok djm, sort of ok stevesk
694 makes the pain stop in one easy step
695 NB. portable commit contains everything *except* removing includes.h, as
696 that will take a fair bit more work as we move headers that are required
697 for portability workarounds to defines.h. (also, this step wasn't "easy")
698 - stevesk@cvs.openbsd.org 2006/08/04 20:46:05
699 [monitor.c session.c ssh-agent.c]
700 spaces
701 - (djm) [auth-pam.c defines.h] Move PAM related bits to auth-pam.c
702 - (djm) [auth-pam.c auth.c bufaux.h entropy.c openbsd-compat/port-tun.c]
703 remove last traces of bufaux.h - it was merged into buffer.h in the big
704 includes.h commit
705 - (djm) [auth.c loginrec.c] Missing netinet/in.h for loginrec
706 - (djm) [openbsd-compat/regress/snprintftest.c]
707 [openbsd-compat/regress/strduptest.c] Add missing includes so they pass
708 compilation with "-Wall -Werror"
709 - (djm) [auth-pam.c auth-shadow.c auth2-none.c cleanup.c sshd.c]
710 [openbsd-compat/port-tun.c openbsd-compat/port-tun.h] Sprinkle more
711 includes for Linux in
712 - (dtucker) [cleanup.c] Need defines.h for __dead.
713 - (dtucker) [auth2-gss.c] We still need the #ifdef GSSAPI in -portable.
714 - (dtucker) [openbsd-compat/{bsd-arc4random.c,port-tun.c,xmmap.c}] Lots of
715 #include stdarg.h, needed for log.h.
716 - (dtucker) [entropy.c] Needs unistd.h too.
717 - (dtucker) [ssh-rand-helper.c] Needs stdarg.h for log.h.
718 - (dtucker) [openbsd-compat/getrrsetbyname.c] Nees stdlib.h for malloc.
719 - (dtucker) [openbsd-compat/strtonum.c] Include stdlib.h for strtoll,
720 otherwise it is implicitly declared as returning an int.
721 - (dtucker) OpenBSD CVS Sync
722 - dtucker@cvs.openbsd.org 2006/08/05 07:52:52
723 [auth2-none.c sshd.c monitor_wrap.c]
724 Add headers required to build with KERBEROS5=no. ok djm@
725 - dtucker@cvs.openbsd.org 2006/08/05 08:00:33
726 [auth-skey.c]
727 Add headers required to build with -DSKEY. ok djm@
728 - dtucker@cvs.openbsd.org 2006/08/05 08:28:24
729 [monitor_wrap.c auth-skey.c auth2-chall.c]
730 Zap unused variables in -DSKEY code. ok djm@
731 - dtucker@cvs.openbsd.org 2006/08/05 08:34:04
732 [packet.c]
733 Typo in comment
734 - (dtucker) [openbsd-compat/bsd-cygwin_util.c] Add headers required to compile
735 on Cygwin.
736 - (dtucker) [openbsd-compat/fake-rfc2553.c] Add headers needed for inet_ntoa.
737 - (dtucker) [auth-skey.c] monitor_wrap.h needs ssh-gss.h.
738 - (dtucker) [audit.c audit.h] Repair headers.
739 - (dtucker) [audit-bsm.c] Add additional headers now required.
740
74120060804
742 - (dtucker) [configure.ac] The "crippled AES" test does not work on recent
743 versions of Solaris, so use AC_LINK_IFELSE to actually link the test program
744 rather than just compiling it. Spotted by dlg@.
745
74620060802
747 - (dtucker) [openbsd-compat/daemon.c] Add unistd.h for fork() prototype.
748
74920060725
750 - (dtucker) [openbsd-compat/xmmap.c] Need fcntl.h for O_RDRW.
751
75220060724
753 - (djm) OpenBSD CVS Sync
754 - jmc@cvs.openbsd.org 2006/07/12 13:39:55
755 [sshd_config.5]
756 - new sentence, new line
757 - s/The the/The/
758 - kill a bad comma
759 - stevesk@cvs.openbsd.org 2006/07/12 22:28:52
760 [auth-options.c canohost.c channels.c includes.h readconf.c]
761 [servconf.c ssh-keyscan.c ssh.c sshconnect.c sshd.c]
762 move #include <netdb.h> out of includes.h; ok djm@
763 - stevesk@cvs.openbsd.org 2006/07/12 22:42:32
764 [includes.h ssh.c ssh-rand-helper.c]
765 move #include <stddef.h> out of includes.h
766 - stevesk@cvs.openbsd.org 2006/07/14 01:15:28
767 [monitor_wrap.h]
768 don't need incompletely-typed 'struct passwd' now with
769 #include <pwd.h>; ok markus@
770 - stevesk@cvs.openbsd.org 2006/07/17 01:31:10
771 [authfd.c authfile.c channels.c cleanup.c clientloop.c groupaccess.c]
772 [includes.h log.c misc.c msg.c packet.c progressmeter.c readconf.c]
773 [readpass.c scp.c servconf.c sftp-client.c sftp-server.c sftp.c]
774 [ssh-add.c ssh-agent.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh.c]
775 [sshconnect.c sshlogin.c sshpty.c uidswap.c]
776 move #include <unistd.h> out of includes.h
777 - dtucker@cvs.openbsd.org 2006/07/17 12:02:24
778 [auth-options.c]
779 Use '\0' rather than 0 to terminates strings; ok djm@
780 - dtucker@cvs.openbsd.org 2006/07/17 12:06:00
781 [channels.c channels.h servconf.c sshd_config.5]
782 Add PermitOpen directive to sshd_config which is equivalent to the
783 "permitopen" key option. Allows server admin to allow TCP port
784 forwarding only two specific host/port pairs. Useful when combined
785 with Match.
786 If permitopen is used in both sshd_config and a key option, both
787 must allow a given connection before it will be permitted.
788 Note that users can still use external forwarders such as netcat,
789 so to be those must be controlled too for the limits to be effective.
790 Feedback & ok djm@, man page corrections & ok jmc@.
791 - jmc@cvs.openbsd.org 2006/07/18 07:50:40
792 [sshd_config.5]
793 tweak; ok dtucker
794 - jmc@cvs.openbsd.org 2006/07/18 07:56:28
795 [scp.1]
796 replace DIAGNOSTICS with .Ex;
797 - jmc@cvs.openbsd.org 2006/07/18 08:03:09
798 [ssh-agent.1 sshd_config.5]
799 mark up angle brackets;
800 - dtucker@cvs.openbsd.org 2006/07/18 08:22:23
801 [sshd_config.5]
802 Clarify description of Match, with minor correction from jmc@
803 - stevesk@cvs.openbsd.org 2006/07/18 22:27:55
804 [dh.c]
805 remove unneeded includes; ok djm@
806 - dtucker@cvs.openbsd.org 2006/07/19 08:56:41
807 [servconf.c sshd_config.5]
808 Add support for X11Forwaring, X11DisplayOffset and X11UseLocalhost to
809 Match. ok djm@
810 - dtucker@cvs.openbsd.org 2006/07/19 13:07:10
811 [servconf.c servconf.h session.c sshd.8 sshd_config sshd_config.5]
812 Add ForceCommand keyword to sshd_config, equivalent to the "command="
813 key option, man page entry and example in sshd_config.
814 Feedback & ok djm@, man page corrections & ok jmc@
815 - stevesk@cvs.openbsd.org 2006/07/20 15:26:15
816 [auth1.c serverloop.c session.c sshconnect2.c]
817 missed some needed #include <unistd.h> when KERBEROS5=no; issue from
818 massimo@cedoc.mo.it
819 - dtucker@cvs.openbsd.org 2006/07/21 12:43:36
820 [channels.c channels.h servconf.c servconf.h sshd_config.5]
821 Make PermitOpen take a list of permitted ports and act more like most
822 other keywords (ie the first match is the effective setting). This
823 also makes it easier to override a previously set PermitOpen. ok djm@
824 - stevesk@cvs.openbsd.org 2006/07/21 21:13:30
825 [channels.c]
826 more ARGSUSED (lint) for dispatch table-driven functions; ok djm@
827 - stevesk@cvs.openbsd.org 2006/07/21 21:26:55
828 [progressmeter.c]
829 ARGSUSED for signal handler
830 - stevesk@cvs.openbsd.org 2006/07/22 19:08:54
831 [includes.h moduli.c progressmeter.c scp.c sftp-common.c]
832 [sftp-server.c ssh-agent.c sshlogin.c]
833 move #include <time.h> out of includes.h
834 - stevesk@cvs.openbsd.org 2006/07/22 20:48:23
835 [atomicio.c auth-options.c auth-passwd.c auth-rhosts.c auth-rsa.c]
836 [auth.c auth1.c auth2-chall.c auth2-hostbased.c auth2-passwd.c auth2.c]
837 [authfd.c authfile.c bufaux.c bufbn.c buffer.c canohost.c channels.c]
838 [cipher-3des1.c cipher-bf1.c cipher-ctr.c cipher.c clientloop.c]
839 [compat.c deattack.c dh.c dns.c gss-genr.c gss-serv.c hostfile.c]
840 [includes.h kex.c kexdhc.c kexdhs.c kexgexc.c kexgexs.c key.c log.c]
841 [mac.c match.c md-sha256.c misc.c moduli.c monitor.c monitor_fdpass.c]
842 [monitor_mm.c monitor_wrap.c msg.c nchan.c packet.c rsa.c]
843 [progressmeter.c readconf.c readpass.c scp.c servconf.c serverloop.c]
844 [session.c sftp-client.c sftp-common.c sftp-glob.c sftp-server.c sftp.c]
845 [ssh-add.c ssh-agent.c ssh-dss.c ssh-keygen.c ssh-keyscan.c]
846 [ssh-keysign.c ssh-rsa.c ssh.c sshconnect.c sshconnect1.c sshconnect2.c]
847 [sshd.c sshlogin.c sshpty.c ttymodes.c uidswap.c xmalloc.c]
848 move #include <string.h> out of includes.h
849 - stevesk@cvs.openbsd.org 2006/07/23 01:11:05
850 [auth.h dispatch.c kex.h sftp-client.c]
851 #include <signal.h> for sig_atomic_t; need this prior to <sys/param.h>
852 move
853 - (djm) [acss.c auth-krb5.c auth-options.c auth-pam.c auth-shadow.c]
854 [canohost.c channels.c cipher-acss.c defines.h dns.c gss-genr.c]
855 [gss-serv-krb5.c gss-serv.c log.h loginrec.c logintest.c readconf.c]
856 [servconf.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-rand-helper.c]
857 [ssh.c sshconnect.c sshd.c openbsd-compat/bindresvport.c]
858 [openbsd-compat/bsd-arc4random.c openbsd-compat/bsd-misc.c]
859 [openbsd-compat/getrrsetbyname.c openbsd-compat/glob.c]
860 [openbsd-compat/mktemp.c openbsd-compat/port-linux.c]
861 [openbsd-compat/port-tun.c openbsd-compat/readpassphrase.c]
862 [openbsd-compat/setproctitle.c openbsd-compat/xmmap.c]
863 make the portable tree compile again - sprinkle unistd.h and string.h
864 back in. Don't redefine __unused, as it turned out to be used in
865 headers on Linux, and replace its use in auth-pam.c with ARGSUSED
866 - (djm) [openbsd-compat/glob.c]
867 Move get_arg_max() into the ifdef HAVE_GLOB block so that it compiles
868 on OpenBSD (or other platforms with a decent glob implementation) with
869 -Werror
870 - (djm) [uuencode.c]
871 Add resolv.h, is it contains the prototypes for __b64_ntop/__b64_pton on
872 some platforms
873 - (djm) [session.c]
874 fix compile error with -Werror -Wall: 'path' is only used in
875 do_setup_env() if HAVE_LOGIN_CAP is not defined
876 - (djm) [openbsd-compat/basename.c openbsd-compat/bsd-closefrom.c]
877 [openbsd-compat/bsd-cray.c openbsd-compat/bsd-openpty.c]
878 [openbsd-compat/bsd-snprintf.c openbsd-compat/fake-rfc2553.c]
879 [openbsd-compat/port-aix.c openbsd-compat/port-irix.c]
880 [openbsd-compat/rresvport.c]
881 These look to need string.h and/or unistd.h (based on a grep for function
882 names)
883 - (djm) [Makefile.in]
884 Remove generated openbsd-compat/regress/Makefile in distclean target
885 - (djm) [regress/Makefile regress/agent-getpeereid.sh regress/cfgmatch.sh]
886 [regress/cipher-speed.sh regress/forcecommand.sh regress/forwarding.sh]
887 Sync regress tests to -current; include dtucker@'s new cfgmatch and
888 forcecommand tests. Add cipher-speed.sh test (not linked in yet)
889 - (dtucker) [cleanup.c] Since config.h defines _LARGE_FILES on AIX, including
890 system headers before defines.h will cause conflicting definitions.
891 - (dtucker) [regress/forcecommand.sh] Portablize.
892
89320060713
894 - (dtucker) [auth-krb5.c auth-pam.c] Still more errno.h
895
89620060712
897 - (dtucker) [configure.ac defines.h] Only define SHUT_RD (and friends) and
898 O_NONBLOCK if they're really needed. Fixes build errors on HP-UX, old
899 Linuxes and probably more.
900 - (dtucker) [configure.ac] OpenBSD needs <sys/types.h> before <sys/socket.h>
901 for SHUT_RD.
902 - (dtucker) [openbsd-compat/port-tun.c] OpenBSD needs <netinet/in.h> before
903 <netinet/ip.h>.
904 - (dtucker) OpenBSD CVS Sync
905 - stevesk@cvs.openbsd.org 2006/07/10 16:01:57
906 [sftp-glob.c sftp-common.h sftp.c]
907 buffer.h only needed in sftp-common.h and remove some unneeded
908 user includes; ok djm@
909 - jmc@cvs.openbsd.org 2006/07/10 16:04:21
910 [sshd.8]
911 s/and and/and/
912 - stevesk@cvs.openbsd.org 2006/07/10 16:37:36
913 [readpass.c log.h scp.c fatal.c xmalloc.c includes.h ssh-keyscan.c misc.c
914 auth.c packet.c log.c]
915 move #include <stdarg.h> out of includes.h; ok markus@
916 - dtucker@cvs.openbsd.org 2006/07/11 10:12:07
917 [ssh.c]
918 Only copy the part of environment variable that we actually use. Prevents
919 ssh bailing when SendEnv is used and an environment variable with a really
920 long value exists. ok djm@
921 - markus@cvs.openbsd.org 2006/07/11 18:50:48
922 [clientloop.c ssh.1 ssh.c channels.c ssh_config.5 readconf.h session.c
923 channels.h readconf.c]
924 add ExitOnForwardFailure: terminate the connection if ssh(1)
925 cannot set up all requested dynamic, local, and remote port
926 forwardings. ok djm, dtucker, stevesk, jmc
927 - stevesk@cvs.openbsd.org 2006/07/11 20:07:25
928 [scp.c auth.c monitor.c serverloop.c sftp-server.c sshpty.c readpass.c
929 sshd.c monitor_wrap.c monitor_fdpass.c ssh-agent.c ttymodes.c atomicio.c
930 includes.h session.c sshlogin.c monitor_mm.c packet.c sshconnect2.c
931 sftp-client.c nchan.c clientloop.c sftp.c misc.c canohost.c channels.c
932 ssh-keygen.c progressmeter.c uidswap.c msg.c readconf.c sshconnect.c]
933 move #include <errno.h> out of includes.h; ok markus@
934 - stevesk@cvs.openbsd.org 2006/07/11 20:16:43
935 [ssh.c]
936 cast asterisk field precision argument to int to remove warning;
937 ok markus@
938 - stevesk@cvs.openbsd.org 2006/07/11 20:27:56
939 [authfile.c ssh.c]
940 need <errno.h> here also (it's also included in <openssl/err.h>)
941 - dtucker@cvs.openbsd.org 2006/07/12 11:34:58
942 [sshd.c servconf.h servconf.c sshd_config.5 auth.c]
943 Add support for conditional directives to sshd_config via a "Match"
944 keyword, which works similarly to the "Host" directive in ssh_config.
945 Lines after a Match line override the default set in the main section
946 if the condition on the Match line is true, eg
947 AllowTcpForwarding yes
948 Match User anoncvs
949 AllowTcpForwarding no
950 will allow port forwarding by all users except "anoncvs".
951 Currently only a very small subset of directives are supported.
952 ok djm@
953 - (dtucker) [loginrec.c openbsd-compat/xmmap.c openbsd-compat/bindresvport.c
954 openbsd-compat/glob.c openbsd-compat/mktemp.c openbsd-compat/port-tun.c
955 openbsd-compat/readpassphrase.c openbsd-compat/strtonum.c] Include <errno.h>.
956 - (dtucker) [openbsd-compat/setproctitle.c] Include stdarg.h.
957 - (dtucker) [ssh-keyscan.c ssh-rand-helper.c] More errno.h here too.
958 - (dtucker) [openbsd-compat/openbsd-compat.h] v*printf needs stdarg.h.
959 - (dtucker) [openbsd-compat/bsd-asprintf.c openbsd-compat/port-aix.c
960 openbsd-compat/rresvport.c] More errno.h.
961
96220060711
963 - (dtucker) [configure.ac ssh-keygen.c openbsd-compat/bsd-openpty.c
964 openbsd-compat/daemon.c] Add includes needed by open(2). Conditionally
965 include paths.h. Fixes build error on Solaris.
966 - (dtucker) [entropy.c] More fcntl.h, this time on AIX (and probably
967 others).
968
96920060710
970 - (dtucker) [INSTALL] New autoconf version: 2.60.
971 - OpenBSD CVS Sync
972 - djm@cvs.openbsd.org 2006/06/14 10:50:42
973 [sshconnect.c]
974 limit the number of pre-banner characters we will accept; ok markus@
975 - djm@cvs.openbsd.org 2006/06/26 10:36:15
976 [clientloop.c]
977 mention optional bind_address in runtime port forwarding setup
978 command-line help. patch from santhi.amirta AT gmail.com
979 - stevesk@cvs.openbsd.org 2006/07/02 17:12:58
980 [ssh.1 ssh.c ssh_config.5 sshd_config.5]
981 more details and clarity for tun(4) device forwarding; ok and help
982 jmc@
983 - stevesk@cvs.openbsd.org 2006/07/02 18:36:47
984 [gss-serv-krb5.c gss-serv.c]
985 no "servconf.h" needed here
986 (gss-serv-krb5.c change not applied, portable needs the server options)
987 - stevesk@cvs.openbsd.org 2006/07/02 22:45:59
988 [groupaccess.c groupaccess.h includes.h session.c sftp-common.c sshpty.c]
989 move #include <grp.h> out of includes.h
990 (portable needed uidswap.c too)
991 - stevesk@cvs.openbsd.org 2006/07/02 23:01:55
992 [clientloop.c ssh.1]
993 use -KR[bind_address:]port here; ok djm@
994 - stevesk@cvs.openbsd.org 2006/07/03 08:54:20
995 [includes.h ssh.c sshconnect.c sshd.c]
996 move #include "version.h" out of includes.h; ok markus@
997 - stevesk@cvs.openbsd.org 2006/07/03 17:59:32
998 [channels.c includes.h]
999 move #include <arpa/inet.h> out of includes.h; old ok djm@
1000 (portable needed session.c too)
1001 - stevesk@cvs.openbsd.org 2006/07/05 02:42:09
1002 [canohost.c hostfile.c includes.h misc.c packet.c readconf.c]
1003 [serverloop.c sshconnect.c uuencode.c]
1004 move #include <netinet/in.h> out of includes.h; ok deraadt@
1005 (also ssh-rand-helper.c logintest.c loginrec.c)
1006 - djm@cvs.openbsd.org 2006/07/06 10:47:05
1007 [servconf.c servconf.h session.c sshd_config.5]
1008 support arguments to Subsystem commands; ok markus@
1009 - djm@cvs.openbsd.org 2006/07/06 10:47:57
1010 [sftp-server.8 sftp-server.c]
1011 add commandline options to enable logging of transactions; ok markus@
1012 - stevesk@cvs.openbsd.org 2006/07/06 16:03:53
1013 [auth-options.c auth-options.h auth-passwd.c auth-rh-rsa.c]
1014 [auth-rhosts.c auth-rsa.c auth.c auth.h auth2-hostbased.c]
1015 [auth2-pubkey.c auth2.c includes.h misc.c misc.h monitor.c]
1016 [monitor_wrap.c monitor_wrap.h scp.c serverloop.c session.c]
1017 [session.h sftp-common.c ssh-add.c ssh-keygen.c ssh-keysign.c]
1018 [ssh.c sshconnect.c sshconnect.h sshd.c sshpty.c sshpty.h uidswap.c]
1019 [uidswap.h]
1020 move #include <pwd.h> out of includes.h; ok markus@
1021 - stevesk@cvs.openbsd.org 2006/07/06 16:22:39
1022 [ssh-keygen.c]
1023 move #include "dns.h" up
1024 - stevesk@cvs.openbsd.org 2006/07/06 17:36:37
1025 [monitor_wrap.h]
1026 typo in comment
1027 - stevesk@cvs.openbsd.org 2006/07/08 21:47:12
1028 [authfd.c canohost.c clientloop.c dns.c dns.h includes.h]
1029 [monitor_fdpass.c nchan.c packet.c servconf.c sftp.c ssh-agent.c]
1030 [ssh-keyscan.c ssh.c sshconnect.h sshd.c sshlogin.h]
1031 move #include <sys/socket.h> out of includes.h
1032 - stevesk@cvs.openbsd.org 2006/07/08 21:48:53
1033 [monitor.c session.c]
1034 missed these from last commit:
1035 move #include <sys/socket.h> out of includes.h
1036 - stevesk@cvs.openbsd.org 2006/07/08 23:30:06
1037 [log.c]
1038 move user includes after /usr/include files
1039 - stevesk@cvs.openbsd.org 2006/07/09 15:15:11
1040 [auth2-none.c authfd.c authfile.c includes.h misc.c monitor.c]
1041 [readpass.c scp.c serverloop.c sftp-client.c sftp-server.c]
1042 [ssh-add.c ssh-agent.c ssh-keygen.c ssh-keysign.c ssh.c sshd.c]
1043 [sshlogin.c sshpty.c]
1044 move #include <fcntl.h> out of includes.h
1045 - stevesk@cvs.openbsd.org 2006/07/09 15:27:59
1046 [ssh-add.c]
1047 use O_RDONLY vs. 0 in open(); no binary change
1048 - djm@cvs.openbsd.org 2006/07/10 11:24:54
1049 [sftp-server.c]
1050 remove optind - it isn't used here
1051 - djm@cvs.openbsd.org 2006/07/10 11:25:53
1052 [sftp-server.c]
1053 don't log variables that aren't yet set
1054 - (djm) [loginrec.c ssh-rand-helper.c sshd.c openbsd-compat/glob.c]
1055 [openbsd-compat/mktemp.c openbsd-compat/openbsd-compat.h]
1056 [openbsd-compat/port-tun.c openbsd-compat/readpassphrase.c]
1057 [openbsd-compat/xcrypt.c] Fix includes.h fallout, mainly fcntl.h
1058 - OpenBSD CVS Sync
1059 - djm@cvs.openbsd.org 2006/07/10 12:03:20
1060 [scp.c]
1061 duplicate argv at the start of main() because it gets modified later;
1062 pointed out by deraadt@ ok markus@
1063 - djm@cvs.openbsd.org 2006/07/10 12:08:08
1064 [channels.c]
1065 fix misparsing of SOCKS 5 packets that could result in a crash;
1066 reported by mk@ ok markus@
1067 - dtucker@cvs.openbsd.org 2006/07/10 12:46:51
1068 [misc.c misc.h sshd.8 sshconnect.c]
1069 Add port identifier to known_hosts for non-default ports, based originally
1070 on a patch from Devin Nate in bz#910.
1071 For any connection using the default port or using a HostKeyAlias the
1072 format is unchanged, otherwise the host name or address is enclosed
1073 within square brackets in the same format as sshd's ListenAddress.
1074 Tested by many, ok markus@.
1075 - (dtucker) [openbsd-compat/openbsd-compat.h] Need to include <sys/socket.h>
1076 for struct sockaddr on platforms that use the fake-rfc stuff.
1077
107820060706
1079 - (dtucker) [configure.ac] Try AIX blibpath test in different order when
1080 compiling with gcc. gcc 4.1.x will accept (but ignore) -b flags so
1081 configure would not select the correct libpath linker flags.
1082 - (dtucker) [INSTALL] A bit more info on autoconf.
1083
108420060705
1085 - (dtucker) [ssh-rand-helper.c] Don't exit if mkdir fails because the
1086 target already exists.
1087
108820060630
1089 - (dtucker) [openbsd-compat/openbsd-compat.h] SNPRINTF_CONST for snprintf
1090 declaration too. Patch from russ at sludge.net.
1091 - (dtucker) [openbsd-compat/getrrsetbyname.c] Undef _res before defining it,
1092 prevents warnings on platforms where _res is in the system headers.
1093 - (dtucker) [INSTALL] Bug #1202: Note when autoconf is required and which
1094 version.
1095
109620060627
1097 - (dtucker) [configure.ac] Bug #1203: Add missing '[', which causes problems
1098 with autoconf 2.60. Patch from vapier at gentoo.org.
1099
110020060625
1101 - (dtucker) [channels.c serverloop.c] Apply the bug #1102 workaround to ptys
1102 only, otherwise sshd can hang exiting non-interactive sessions.
1103
110420060624
1105 - (dtucker) [configure.ac] Bug #1193: Define PASSWD_NEEDS_USERNAME on Solaris.
1106 Works around limitation in Solaris' passwd program for changing passwords
1107 where the username is longer than 8 characters. ok djm@
1108 - (dtucker) [serverloop.c] Get ifdef/ifndef the right way around for the bug
1109 #1102 workaround.
1110
111120060623
1112 - (dtucker) [README.platform configure.ac openbsd-compat/port-tun.c] Add
1113 tunnel support for Mac OS X/Darwin via a third-party tun driver. Patch
1114 from reyk@, tested by anil@
1115 - (dtucker) [channels.c configure.ac serverloop.c] Bug #1102: Around AIX
1116 4.3.3 ML3 or so, the AIX pty layer starting passing zero-length writes
1117 on the pty slave as zero-length reads on the pty master, which sshd
1118 interprets as the descriptor closing. Since most things don't do zero
1119 length writes this rarely matters, but occasionally it happens, and when
1120 it does the SSH pty session appears to hang, so we add a special case for
1121 this condition. ok djm@
1122
112320060613
1124 - (djm) [getput.h] This file has been replaced by functions in misc.c
1125 - OpenBSD CVS Sync
1126 - djm@cvs.openbsd.org 2006/05/08 10:49:48
1127 [sshconnect2.c]
1128 uint32_t -> u_int32_t (which we use everywhere else)
1129 (Id sync only - portable already had this)
1130 - markus@cvs.openbsd.org 2006/05/16 09:00:00
1131 [clientloop.c]
1132 missing free; from Kylene Hall
1133 - markus@cvs.openbsd.org 2006/05/17 12:43:34
1134 [scp.c sftp.c ssh-agent.c ssh-keygen.c sshconnect.c]
1135 fix leak; coverity via Kylene Jo Hall
1136 - miod@cvs.openbsd.org 2006/05/18 21:27:25
1137 [kexdhc.c kexgexc.c]
1138 paramter -> parameter
1139 - dtucker@cvs.openbsd.org 2006/05/29 12:54:08
1140 [ssh_config.5]
1141 Add gssapi-with-mic to PreferredAuthentications default list; ok jmc
1142 - dtucker@cvs.openbsd.org 2006/05/29 12:56:33
1143 [ssh_config]
1144 Add GSSAPIAuthentication and GSSAPIDelegateCredentials to examples in
1145 sample ssh_config. ok markus@
1146 - jmc@cvs.openbsd.org 2006/05/29 16:10:03
1147 [ssh_config.5]
1148 oops - previous was too long; split the list of auths up
1149 - mk@cvs.openbsd.org 2006/05/30 11:46:38
1150 [ssh-add.c]
1151 Sync usage() with man page and reality.
1152 ok deraadt dtucker
1153 - jmc@cvs.openbsd.org 2006/05/29 16:13:23
1154 [ssh.1]
1155 add GSSAPI to the list of authentication methods supported;
1156 - mk@cvs.openbsd.org 2006/05/30 11:46:38
1157 [ssh-add.c]
1158 Sync usage() with man page and reality.
1159 ok deraadt dtucker
1160 - markus@cvs.openbsd.org 2006/06/01 09:21:48
1161 [sshd.c]
1162 call get_remote_ipaddr() early; fixes logging after client disconnects;
1163 report mpf@; ok dtucker@
1164 - markus@cvs.openbsd.org 2006/06/06 10:20:20
1165 [readpass.c sshconnect.c sshconnect.h sshconnect2.c uidswap.c]
1166 replace remaining setuid() calls with permanently_set_uid() and
1167 check seteuid() return values; report Marcus Meissner; ok dtucker djm
1168 - markus@cvs.openbsd.org 2006/06/08 14:45:49
1169 [readpass.c sshconnect.c sshconnect2.c uidswap.c uidswap.h]
1170 do not set the gid, noted by solar; ok djm
1171 - djm@cvs.openbsd.org 2006/06/13 01:18:36
1172 [ssh-agent.c]
1173 always use a format string, even when printing a constant
1174 - djm@cvs.openbsd.org 2006/06/13 02:17:07
1175 [ssh-agent.c]
1176 revert; i am on drugs. spotted by alexander AT beard.se
1177
117820060521
1179 - (dtucker) [auth.c monitor.c] Now that we don't log from both the monitor
1180 and slave, we can remove the special-case handling in the audit hook in
1181 auth_log.
1182
118320060517
1184 - (dtucker) [ssh-rand-helper.c] Check return code of mkdir and fix file
1185 pointer leak. From kjhall at us.ibm.com, found by coverity.
1186
118720060515
1188 - (dtucker) [openbsd-compat/getrrsetbyname.c] Use _compat_res instead of
1189 _res, prevents problems on some platforms that have _res as a global but
1190 don't have getrrsetbyname(), eg IRIX 5.3. Found and tested by
1191 georg.schwarz at freenet.de, ok djm@.
1192 - (dtucker) [defines.h] Find a value for IOV_MAX or use a conservative
1193 default. Patch originally from tim@, ok djm
1194 - (dtucker) [auth-pam.c] Bug #1188: pass result of do_pam_account back and
1195 do not allow kbdint again after the PAM account check fails. ok djm@
1196
119720060506
1198 - (dtucker) OpenBSD CVS Sync
1199 - dtucker@cvs.openbsd.org 2006/04/25 08:02:27
1200 [authfile.c authfile.h sshconnect2.c ssh.c sshconnect1.c]
1201 Prevent ssh from trying to open private keys with bad permissions more than
1202 once or prompting for their passphrases (which it subsequently ignores
1203 anyway), similar to a previous change in ssh-add. bz #1186, ok djm@
1204 - djm@cvs.openbsd.org 2006/05/04 14:55:23
1205 [dh.c]
1206 tighter DH exponent checks here too; feedback and ok markus@
1207 - djm@cvs.openbsd.org 2006/04/01 05:37:46
1208 [OVERVIEW]
1209 $OpenBSD$ in here too
1210 - dtucker@cvs.openbsd.org 2006/05/06 08:35:40
1211 [auth-krb5.c]
1212 Add $OpenBSD$ in comment here too
1213
121420060504
1215 - (dtucker) [auth-pam.c groupaccess.c monitor.c monitor_wrap.c scard-opensc.c
1216 session.c ssh-rand-helper.c sshd.c openbsd-compat/bsd-cygwin_util.c
1217 openbsd-compat/setproctitle.c] Convert malloc(foo*bar) -> calloc(foo,bar)
1218 in Portable-only code; since calloc zeros, remove now-redundant memsets.
1219 Also add a couple of sanity checks. With & ok djm@
1220
122120060503
1222 - (dtucker) [packet.c] Remove in_systm.h since it's also in includes.h
1223 and double including it on IRIX 5.3 causes problems. From Georg Schwarz,
1224 "no objections" tim@
1225
122620060423
1227 - (djm) OpenBSD CVS Sync
1228 - deraadt@cvs.openbsd.org 2006/04/01 05:42:20
1229 [scp.c]
1230 minimal lint cleanup (unused crud, and some size_t); ok djm
1231 - djm@cvs.openbsd.org 2006/04/01 05:50:29
1232 [scp.c]
1233 xasprintification; ok deraadt@
1234 - djm@cvs.openbsd.org 2006/04/01 05:51:34
1235 [atomicio.c]
1236 ANSIfy; requested deraadt@
1237 - dtucker@cvs.openbsd.org 2006/04/02 08:34:52
1238 [ssh-keysign.c]
1239 sessionid can be 32 bytes now too when sha256 kex is used; ok djm@
1240 - djm@cvs.openbsd.org 2006/04/03 07:10:38
1241 [gss-genr.c]
1242 GSSAPI buffers shouldn't be nul-terminated, spotted in bugzilla #1066
1243 by dleonard AT vintela.com. use xasprintf() to simplify code while in
1244 there; "looks right" deraadt@
1245 - djm@cvs.openbsd.org 2006/04/16 00:48:52
1246 [buffer.c buffer.h channels.c]
1247 Fix condition where we could exit with a fatal error when an input
1248 buffer became too large and the remote end had advertised a big window.
1249 The problem was a mismatch in the backoff math between the channels code
1250 and the buffer code, so make a buffer_check_alloc() function that the
1251 channels code can use to propsectivly check whether an incremental
1252 allocation will succeed. bz #1131, debugged with the assistance of
1253 cove AT wildpackets.com; ok dtucker@ deraadt@
1254 - djm@cvs.openbsd.org 2006/04/16 00:52:55
1255 [atomicio.c atomicio.h]
1256 introduce atomiciov() function that wraps readv/writev to retry
1257 interrupted transfers like atomicio() does for read/write;
1258 feedback deraadt@ dtucker@ stevesk@ ok deraadt@
1259 - djm@cvs.openbsd.org 2006/04/16 00:54:10
1260 [sftp-client.c]
1261 avoid making a tiny 4-byte write to send the packet length of sftp
1262 commands, which would result in a separate tiny packet on the wire by
1263 using atomiciov(writev, ...) to write the length and the command in one
1264 pass; ok deraadt@
1265 - djm@cvs.openbsd.org 2006/04/16 07:59:00
1266 [atomicio.c]
1267 reorder sanity test so that it cannot dereference past the end of the
1268 iov array; well spotted canacar@!
1269 - dtucker@cvs.openbsd.org 2006/04/18 10:44:28
1270 [bufaux.c bufbn.c Makefile.in]
1271 Move Buffer bignum functions into their own file, bufbn.c. This means
1272 that sftp and sftp-server (which use the Buffer functions in bufaux.c
1273 but not the bignum ones) no longer need to be linked with libcrypto.
1274 ok markus@
1275 - djm@cvs.openbsd.org 2006/04/20 09:27:09
1276 [auth.h clientloop.c dispatch.c dispatch.h kex.h]
1277 replace the last non-sig_atomic_t flag used in a signal handler with a
1278 sig_atomic_t, unfortunately with some knock-on effects in other (non-
1279 signal) contexts in which it is used; ok markus@
1280 - markus@cvs.openbsd.org 2006/04/20 09:47:59
1281 [sshconnect.c]
1282 simplify; ok djm@
1283 - djm@cvs.openbsd.org 2006/04/20 21:53:44
1284 [includes.h session.c sftp.c]
1285 Switch from using pipes to socketpairs for communication between
1286 sftp/scp and ssh, and between sshd and its subprocesses. This saves
1287 a file descriptor per session and apparently makes userland ppp over
1288 ssh work; ok markus@ deraadt@ (ID Sync only - portable makes this
1289 decision on a per-platform basis)
1290 - djm@cvs.openbsd.org 2006/04/22 04:06:51
1291 [uidswap.c]
1292 use setres[ug]id() to permanently revoke privileges; ok deraadt@
1293 (ID Sync only - portable already uses setres[ug]id() whenever possible)
1294 - stevesk@cvs.openbsd.org 2006/04/22 18:29:33
1295 [crc32.c]
1296 remove extra spaces
1297 - (djm) [auth.h dispatch.h kex.h] sprinkle in signal.h to get
1298 sig_atomic_t
1299
130020060421
1301 - (djm) [Makefile.in configure.ac session.c sshpty.c]
1302 [contrib/redhat/sshd.init openbsd-compat/Makefile.in]
1303 [openbsd-compat/openbsd-compat.h openbsd-compat/port-linux.c]
1304 [openbsd-compat/port-linux.h] Add support for SELinux, setting
1305 the execution and TTY contexts. based on patch from Daniel Walsh,
1306 bz #880; ok dtucker@
1307
130820060418
1309 - (djm) [canohost.c] Reorder IP options check so that it isn't broken
1310 by mapped addresses; bz #1179 reported by markw wtech-llc.com;
1311 ok dtucker@
1312
131320060331
1314 - OpenBSD CVS Sync
1315 - deraadt@cvs.openbsd.org 2006/03/27 01:21:18
1316 [xmalloc.c]
1317 we can do the size & nmemb check before the integer overflow check;
1318 evol
1319 - deraadt@cvs.openbsd.org 2006/03/27 13:03:54
1320 [dh.c]
1321 use strtonum() instead of atoi(), limit dhg size to 64k; ok djm
1322 - djm@cvs.openbsd.org 2006/03/27 23:15:46
1323 [sftp.c]
1324 always use a format string for addargs; spotted by mouring@
1325 - deraadt@cvs.openbsd.org 2006/03/28 00:12:31
1326 [README.tun ssh.c]
1327 spacing
1328 - deraadt@cvs.openbsd.org 2006/03/28 01:52:28
1329 [channels.c]
1330 do not accept unreasonable X ports numbers; ok djm
1331 - deraadt@cvs.openbsd.org 2006/03/28 01:53:43
1332 [ssh-agent.c]
1333 use strtonum() to parse the pid from the file, and range check it
1334 better; ok djm
1335 - djm@cvs.openbsd.org 2006/03/30 09:41:25
1336 [channels.c]
1337 ARGSUSED for dispatch table-driven functions
1338 - djm@cvs.openbsd.org 2006/03/30 09:58:16
1339 [authfd.c bufaux.c deattack.c gss-serv.c mac.c misc.c misc.h]
1340 [monitor_wrap.c msg.c packet.c sftp-client.c sftp-server.c ssh-agent.c]
1341 replace {GET,PUT}_XXBIT macros with functionally similar functions,
1342 silencing a heap of lint warnings. also allows them to use
1343 __bounded__ checking which can't be applied to macros; requested
1344 by and feedback from deraadt@
1345 - djm@cvs.openbsd.org 2006/03/30 10:41:25
1346 [ssh.c ssh_config.5]
1347 add percent escape chars to the IdentityFile option, bz #1159 based
1348 on a patch by imaging AT math.ualberta.ca; feedback and ok dtucker@
1349 - dtucker@cvs.openbsd.org 2006/03/30 11:05:17
1350 [ssh-keygen.c]
1351 Correctly handle truncated files while converting keys; ok djm@
1352 - dtucker@cvs.openbsd.org 2006/03/30 11:40:21
1353 [auth.c monitor.c]
1354 Prevent duplicate log messages when privsep=yes; ok djm@
1355 - jmc@cvs.openbsd.org 2006/03/31 09:09:30
1356 [ssh_config.5]
1357 kill trailing whitespace;
1358 - djm@cvs.openbsd.org 2006/03/31 09:13:56
1359 [ssh_config.5]
1360 remote user escape is %r not %h; spotted by jmc@
1361
136220060326
1363 - OpenBSD CVS Sync
1364 - jakob@cvs.openbsd.org 2006/03/15 08:46:44
1365 [ssh-keygen.c]
1366 if no key file are given when printing the DNS host record, use the
1367 host key file(s) as default. ok djm@
1368 - biorn@cvs.openbsd.org 2006/03/16 10:31:45
1369 [scp.c]
1370 Try to display errormessage even if remout == -1
1371 ok djm@, markus@
1372 - djm@cvs.openbsd.org 2006/03/17 22:31:50
1373 [authfd.c]
1374 another unreachable found by lint
1375 - djm@cvs.openbsd.org 2006/03/17 22:31:11
1376 [authfd.c]
1377 unreachanble statement, found by lint
1378 - djm@cvs.openbsd.org 2006/03/19 02:22:32
1379 [serverloop.c]
1380 memory leaks detected by Coverity via elad AT netbsd.org;
1381 ok deraadt@ dtucker@
1382 - djm@cvs.openbsd.org 2006/03/19 02:22:56
1383 [sftp.c]
1384 more memory leaks detected by Coverity via elad AT netbsd.org;
1385 deraadt@ ok
1386 - djm@cvs.openbsd.org 2006/03/19 02:23:26
1387 [hostfile.c]
1388 FILE* leak detected by Coverity via elad AT netbsd.org;
1389 ok deraadt@
1390 - djm@cvs.openbsd.org 2006/03/19 02:24:05
1391 [dh.c readconf.c servconf.c]
1392 potential NULL pointer dereferences detected by Coverity
1393 via elad AT netbsd.org; ok deraadt@
1394 - djm@cvs.openbsd.org 2006/03/19 07:41:30
1395 [sshconnect2.c]
1396 memory leaks detected by Coverity via elad AT netbsd.org;
1397 deraadt@ ok
1398 - dtucker@cvs.openbsd.org 2006/03/19 11:51:52
1399 [servconf.c]
1400 Correct strdelim null test; ok djm@
1401 - deraadt@cvs.openbsd.org 2006/03/19 18:52:11
1402 [auth1.c authfd.c channels.c]
1403 spacing
1404 - deraadt@cvs.openbsd.org 2006/03/19 18:53:12
1405 [kex.c kex.h monitor.c myproposal.h session.c]
1406 spacing
1407 - deraadt@cvs.openbsd.org 2006/03/19 18:56:41
1408 [clientloop.c progressmeter.c serverloop.c sshd.c]
1409 ARGSUSED for signal handlers
1410 - deraadt@cvs.openbsd.org 2006/03/19 18:59:49
1411 [ssh-keyscan.c]
1412 please lint
1413 - deraadt@cvs.openbsd.org 2006/03/19 18:59:30
1414 [ssh.c]
1415 spacing
1416 - deraadt@cvs.openbsd.org 2006/03/19 18:59:09
1417 [authfile.c]
1418 whoever thought that break after return was a good idea needs to
1419 get their head examimed
1420 - djm@cvs.openbsd.org 2006/03/20 04:09:44
1421 [monitor.c]
1422 memory leaks detected by Coverity via elad AT netbsd.org;
1423 deraadt@ ok
1424 that should be all of them now
1425 - djm@cvs.openbsd.org 2006/03/20 11:38:46
1426 [key.c]
1427 (really) last of the Coverity diffs: avoid possible NULL deref in
1428 key_free. via elad AT netbsd.org; markus@ ok
1429 - deraadt@cvs.openbsd.org 2006/03/20 17:10:19
1430 [auth.c key.c misc.c packet.c ssh-add.c]
1431 in a switch (), break after return or goto is stupid
1432 - deraadt@cvs.openbsd.org 2006/03/20 17:13:16
1433 [key.c]
1434 djm did a typo
1435 - deraadt@cvs.openbsd.org 2006/03/20 17:17:23
1436 [ssh-rsa.c]
1437 in a switch (), break after return or goto is stupid
1438 - deraadt@cvs.openbsd.org 2006/03/20 18:14:02
1439 [channels.c clientloop.c monitor_wrap.c monitor_wrap.h serverloop.c]
1440 [ssh.c sshpty.c sshpty.h]
1441 sprinkle u_int throughout pty subsystem, ok markus
1442 - deraadt@cvs.openbsd.org 2006/03/20 18:17:20
1443 [auth1.c auth2.c sshd.c]
1444 sprinkle some ARGSUSED for table driven functions (which sometimes
1445 must ignore their args)
1446 - deraadt@cvs.openbsd.org 2006/03/20 18:26:55
1447 [channels.c monitor.c session.c session.h ssh-agent.c ssh-keygen.c]
1448 [ssh-rsa.c ssh.c sshlogin.c]
1449 annoying spacing fixes getting in the way of real diffs
1450 - deraadt@cvs.openbsd.org 2006/03/20 18:27:50
1451 [monitor.c]
1452 spacing
1453 - deraadt@cvs.openbsd.org 2006/03/20 18:35:12
1454 [channels.c]
1455 x11_fake_data is only ever used as u_char *
1456 - deraadt@cvs.openbsd.org 2006/03/20 18:41:43
1457 [dns.c]
1458 cast xstrdup to propert u_char *
1459 - deraadt@cvs.openbsd.org 2006/03/20 18:42:27
1460 [canohost.c match.c ssh.c sshconnect.c]
1461 be strict with tolower() casting
1462 - deraadt@cvs.openbsd.org 2006/03/20 18:48:34
1463 [channels.c fatal.c kex.c packet.c serverloop.c]
1464 spacing
1465 - deraadt@cvs.openbsd.org 2006/03/20 21:11:53
1466 [ttymodes.c]
1467 spacing
1468 - djm@cvs.openbsd.org 2006/03/25 00:05:41
1469 [auth-bsdauth.c auth-skey.c auth.c auth2-chall.c channels.c]
1470 [clientloop.c deattack.c gss-genr.c kex.c key.c misc.c moduli.c]
1471 [monitor.c monitor_wrap.c packet.c scard.c sftp-server.c ssh-agent.c]
1472 [ssh-keyscan.c ssh.c sshconnect.c sshconnect2.c sshd.c uuencode.c]
1473 [xmalloc.c xmalloc.h]
1474 introduce xcalloc() and xasprintf() failure-checked allocations
1475 functions and use them throughout openssh
1476
1477 xcalloc is particularly important because malloc(nmemb * size) is a
1478 dangerous idiom (subject to integer overflow) and it is time for it
1479 to die
1480
1481 feedback and ok deraadt@
1482 - djm@cvs.openbsd.org 2006/03/25 01:13:23
1483 [buffer.c channels.c deattack.c misc.c scp.c session.c sftp-client.c]
1484 [sftp-server.c ssh-agent.c ssh-rsa.c xmalloc.c xmalloc.h auth-pam.c]
1485 [uidswap.c]
1486 change OpenSSH's xrealloc() function from being xrealloc(p, new_size)
1487 to xrealloc(p, new_nmemb, new_itemsize).
1488
1489 realloc is particularly prone to integer overflows because it is
1490 almost always allocating "n * size" bytes, so this is a far safer
1491 API; ok deraadt@
1492 - djm@cvs.openbsd.org 2006/03/25 01:30:23
1493 [sftp.c]
1494 "abormally" is a perfectly cromulent word, but "abnormally" is better
1495 - djm@cvs.openbsd.org 2006/03/25 13:17:03
1496 [atomicio.c auth-bsdauth.c auth-chall.c auth-options.c auth-passwd.c]
1497 [auth-rh-rsa.c auth-rhosts.c auth-rsa.c auth-skey.c auth.c auth1.c]
1498 [auth2-chall.c auth2-hostbased.c auth2-kbdint.c auth2-none.c]
1499 [auth2-passwd.c auth2-pubkey.c auth2.c authfd.c authfile.c bufaux.c]
1500 [buffer.c canohost.c channels.c cipher-3des1.c cipher-bf1.c]
1501 [cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c compress.c]
1502 [deattack.c dh.c dispatch.c fatal.c groupaccess.c hostfile.c kex.c]
1503 [kexdh.c kexdhc.c kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c log.c]
1504 [mac.c match.c md-sha256.c misc.c monitor.c monitor_fdpass.c]
1505 [monitor_mm.c monitor_wrap.c msg.c nchan.c packet.c progressmeter.c]
1506 [readconf.c readpass.c rsa.c scard.c scp.c servconf.c serverloop.c]
1507 [session.c sftp-client.c sftp-common.c sftp-glob.c sftp-server.c]
1508 [sftp.c ssh-add.c ssh-agent.c ssh-dss.c ssh-keygen.c ssh-keyscan.c]
1509 [ssh-keysign.c ssh-rsa.c ssh.c sshconnect.c sshconnect1.c]
1510 [sshconnect2.c sshd.c sshlogin.c sshpty.c sshtty.c ttymodes.c]
1511 [uidswap.c uuencode.c xmalloc.c]
1512 Put $OpenBSD$ tags back (as comments) to replace the RCSID()s that
1513 Theo nuked - our scripts to sync -portable need them in the files
1514 - deraadt@cvs.openbsd.org 2006/03/25 18:29:35
1515 [auth-rsa.c authfd.c packet.c]
1516 needed casts (always will be needed)
1517 - deraadt@cvs.openbsd.org 2006/03/25 18:30:55
1518 [clientloop.c serverloop.c]
1519 spacing
1520 - deraadt@cvs.openbsd.org 2006/03/25 18:36:15
1521 [sshlogin.c sshlogin.h]
1522 nicer size_t and time_t types
1523 - deraadt@cvs.openbsd.org 2006/03/25 18:40:14
1524 [ssh-keygen.c]
1525 cast strtonum() result to right type
1526 - deraadt@cvs.openbsd.org 2006/03/25 18:41:45
1527 [ssh-agent.c]
1528 mark two more signal handlers ARGSUSED
1529 - deraadt@cvs.openbsd.org 2006/03/25 18:43:30
1530 [channels.c]
1531 use strtonum() instead of atoi() [limit X screens to 400, sorry]
1532 - deraadt@cvs.openbsd.org 2006/03/25 18:56:55
1533 [bufaux.c channels.c packet.c]
1534 remove (char *) casts to a function that accepts void * for the arg
1535 - deraadt@cvs.openbsd.org 2006/03/25 18:58:10
1536 [channels.c]
1537 delete cast not required
1538 - djm@cvs.openbsd.org 2006/03/25 22:22:43
1539 [atomicio.h auth-options.h auth.h auth2-gss.c authfd.h authfile.h]
1540 [bufaux.h buffer.h canohost.h channels.h cipher.h clientloop.h]
1541 [compat.h compress.h crc32.c crc32.h deattack.h dh.h dispatch.h]
1542 [dns.c dns.h getput.h groupaccess.h gss-genr.c gss-serv-krb5.c]
1543 [gss-serv.c hostfile.h includes.h kex.h key.h log.h mac.h match.h]
1544 [misc.h monitor.h monitor_fdpass.h monitor_mm.h monitor_wrap.h msg.h]
1545 [myproposal.h packet.h pathnames.h progressmeter.h readconf.h rsa.h]
1546 [scard.h servconf.h serverloop.h session.h sftp-common.h sftp.h]
1547 [ssh-gss.h ssh.h ssh1.h ssh2.h sshconnect.h sshlogin.h sshpty.h]
1548 [ttymodes.h uidswap.h uuencode.h xmalloc.h]
1549 standardise spacing in $OpenBSD$ tags; requested by deraadt@
1550 - deraadt@cvs.openbsd.org 2006/03/26 01:31:48
1551 [uuencode.c]
1552 typo
1553
155420060325
1555 - OpenBSD CVS Sync
1556 - djm@cvs.openbsd.org 2006/03/16 04:24:42
1557 [ssh.1]
1558 Add RFC4419 (Diffie-Hellman group exchange KEX) to the list of SSH RFCs
1559 that OpenSSH supports
1560 - deraadt@cvs.openbsd.org 2006/03/19 18:51:18
1561 [atomicio.c auth-bsdauth.c auth-chall.c auth-krb5.c auth-options.c]
1562 [auth-pam.c auth-passwd.c auth-rh-rsa.c auth-rhosts.c auth-rsa.c]
1563 [auth-shadow.c auth-skey.c auth.c auth1.c auth2-chall.c]
1564 [auth2-hostbased.c auth2-kbdint.c auth2-none.c auth2-passwd.c]
1565 [auth2-pubkey.c auth2.c authfd.c authfile.c bufaux.c buffer.c]
1566 [canohost.c channels.c cipher-3des1.c cipher-acss.c cipher-aes.c]
1567 [cipher-bf1.c cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c]
1568 [compress.c deattack.c dh.c dispatch.c dns.c entropy.c fatal.c]
1569 [groupaccess.c hostfile.c includes.h kex.c kexdh.c kexdhc.c]
1570 [kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c log.c loginrec.c]
1571 [loginrec.h logintest.c mac.c match.c md-sha256.c md5crypt.c misc.c]
1572 [monitor.c monitor_fdpass.c monitor_mm.c monitor_wrap.c msg.c]
1573 [nchan.c packet.c progressmeter.c readconf.c readpass.c rsa.c]
1574 [scard.c scp.c servconf.c serverloop.c session.c sftp-client.c]
1575 [sftp-common.c sftp-glob.c sftp-server.c sftp.c ssh-add.c]
1576 [ssh-agent.c ssh-dss.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c]
1577 [ssh-rand-helper.c ssh-rsa.c ssh.c sshconnect.c sshconnect1.c]
1578 [sshconnect2.c sshd.c sshlogin.c sshpty.c sshtty.c ttymodes.c]
1579 [uidswap.c uuencode.c xmalloc.c openbsd-compat/bsd-arc4random.c]
1580 [openbsd-compat/bsd-closefrom.c openbsd-compat/bsd-cygwin_util.c]
1581 [openbsd-compat/bsd-getpeereid.c openbsd-compat/bsd-misc.c]
1582 [openbsd-compat/bsd-nextstep.c openbsd-compat/bsd-snprintf.c]
1583 [openbsd-compat/bsd-waitpid.c openbsd-compat/fake-rfc2553.c]
1584 RCSID() can die
1585 - deraadt@cvs.openbsd.org 2006/03/19 18:53:12
1586 [kex.h myproposal.h]
1587 spacing
1588 - djm@cvs.openbsd.org 2006/03/20 04:07:22
1589 [auth2-gss.c]
1590 GSSAPI related leaks detected by Coverity via elad AT netbsd.org;
1591 reviewed by simon AT sxw.org.uk; deraadt@ ok
1592 - djm@cvs.openbsd.org 2006/03/20 04:07:49
1593 [gss-genr.c]
1594 more GSSAPI related leaks detected by Coverity via elad AT netbsd.org;
1595 reviewed by simon AT sxw.org.uk; deraadt@ ok
1596 - djm@cvs.openbsd.org 2006/03/20 04:08:18
1597 [gss-serv.c]
1598 last lot of GSSAPI related leaks detected by Coverity via
1599 elad AT netbsd.org; reviewed by simon AT sxw.org.uk; deraadt@ ok
1600 - deraadt@cvs.openbsd.org 2006/03/20 18:14:02
1601 [monitor_wrap.h sshpty.h]
1602 sprinkle u_int throughout pty subsystem, ok markus
1603 - deraadt@cvs.openbsd.org 2006/03/20 18:26:55
1604 [session.h]
1605 annoying spacing fixes getting in the way of real diffs
1606 - deraadt@cvs.openbsd.org 2006/03/20 18:41:43
1607 [dns.c]
1608 cast xstrdup to propert u_char *
1609 - jakob@cvs.openbsd.org 2006/03/22 21:16:24
1610 [ssh.1]
1611 simplify SSHFP example; ok jmc@
1612 - djm@cvs.openbsd.org 2006/03/22 21:27:15
1613 [deattack.c deattack.h]
1614 remove IV support from the CRC attack detector, OpenSSH has never used
1615 it - it only applied to IDEA-CFB, which we don't support.
1616 prompted by NetBSD Coverity report via elad AT netbsd.org;
1617 feedback markus@ "nuke it" deraadt@
1618
161920060318
1620 - (djm) [auth-pam.c] Fix memleak in error path, from Coverity via
1621 elad AT NetBSD.org
1622 - (dtucker) [openbsd-compat/bsd-snprintf.c] Bug #1173: make fmtint() take
1623 a LLONG rather than a long. Fixes scp'ing of large files on platforms
1624 with missing/broken snprintfs. Patch from e.borovac at bom.gov.au.
1625
162620060316
1627 - (dtucker) [entropy.c] Add headers for WIFEXITED and friends.
1628 - (dtucker) [configure.ac md-sha256.c] NetBSD has sha2.h in
1629 /usr/include/crypto. Hint from djm@.
1630 - (tim) [kex.c myproposal.h md-sha256.c openbsd-compat/sha2.c,h]
1631 Disable sha256 when openssl < 0.9.7. Patch from djm@.
1632 - (djm) [kex.c] Slightly more clean deactivation of dhgex-sha256 on old
1633 OpenSSL; ok tim
1634
163520060315
1636 - (djm) OpenBSD CVS Sync:
1637 - msf@cvs.openbsd.org 2006/02/06 15:54:07
1638 [ssh.1]
1639 - typo fix
1640 ok jmc@
1641 - jmc@cvs.openbsd.org 2006/02/06 21:44:47
1642 [ssh.1]
1643 make this a little less ambiguous...
1644 - stevesk@cvs.openbsd.org 2006/02/07 01:08:04
1645 [auth-rhosts.c includes.h]
1646 move #include <netgroup.h> out of includes.h; ok markus@
1647 - stevesk@cvs.openbsd.org 2006/02/07 01:18:09
1648 [includes.h ssh-agent.c ssh-keyscan.c sshconnect2.c]
1649 move #include <sys/queue.h> out of includes.h; ok markus@
1650 - stevesk@cvs.openbsd.org 2006/02/07 01:42:00
1651 [channels.c clientloop.c clientloop.h includes.h packet.h]
1652 [serverloop.c sshpty.c sshpty.h sshtty.c ttymodes.c]
1653 move #include <termios.h> out of includes.h; ok markus@
1654 - stevesk@cvs.openbsd.org 2006/02/07 01:52:50
1655 [sshtty.c]
1656 "log.h" not needed
1657 - stevesk@cvs.openbsd.org 2006/02/07 03:47:05
1658 [hostfile.c]
1659 "packet.h" not needed
1660 - stevesk@cvs.openbsd.org 2006/02/07 03:59:20
1661 [deattack.c]
1662 duplicate #include
1663 - stevesk@cvs.openbsd.org 2006/02/08 12:15:27
1664 [auth.c clientloop.c includes.h misc.c monitor.c readpass.c]
1665 [session.c sftp.c ssh-agent.c ssh-keysign.c ssh.c sshconnect.c]
1666 [sshd.c sshpty.c]
1667 move #include <paths.h> out of includes.h; ok markus@
1668 - stevesk@cvs.openbsd.org 2006/02/08 12:32:49
1669 [includes.h misc.c]
1670 move #include <netinet/tcp.h> out of includes.h; ok markus@
1671 - stevesk@cvs.openbsd.org 2006/02/08 13:15:44
1672 [gss-serv.c monitor.c]
1673 small KNF
1674 - stevesk@cvs.openbsd.org 2006/02/08 14:16:59
1675 [sshconnect.c]
1676 <openssl/bn.h> not needed
1677 - stevesk@cvs.openbsd.org 2006/02/08 14:31:30
1678 [includes.h ssh-agent.c ssh-keyscan.c ssh.c]
1679 move #include <sys/resource.h> out of includes.h; ok markus@
1680 - stevesk@cvs.openbsd.org 2006/02/08 14:38:18
1681 [includes.h packet.c]
1682 move #include <netinet/in_systm.h> and <netinet/ip.h> out of
1683 includes.h; ok markus@
1684 - stevesk@cvs.openbsd.org 2006/02/08 23:51:24
1685 [includes.h scp.c sftp-glob.c sftp-server.c]
1686 move #include <dirent.h> out of includes.h; ok markus@
1687 - stevesk@cvs.openbsd.org 2006/02/09 00:32:07
1688 [includes.h]
1689 #include <sys/endian.h> not needed; ok djm@
1690 NB. ID Sync only - we still need this (but it may move later)
1691 - jmc@cvs.openbsd.org 2006/02/09 10:10:47
1692 [sshd.8]
1693 - move some text into a CAVEATS section
1694 - merge the COMMAND EXECUTION... section into AUTHENTICATION
1695 - stevesk@cvs.openbsd.org 2006/02/10 00:27:13
1696 [channels.c clientloop.c includes.h misc.c progressmeter.c sftp.c]
1697 [ssh.c sshd.c sshpty.c]
1698 move #include <sys/ioctl.h> out of includes.h; ok markus@
1699 - stevesk@cvs.openbsd.org 2006/02/10 01:44:27
1700 [includes.h monitor.c readpass.c scp.c serverloop.c session.c]
1701 [sftp.c sshconnect.c sshconnect2.c sshd.c]
1702 move #include <sys/wait.h> out of includes.h; ok markus@
1703 - otto@cvs.openbsd.org 2006/02/11 19:31:18
1704 [atomicio.c]
1705 type correctness; from Ray Lai in PR 5011; ok millert@
1706 - djm@cvs.openbsd.org 2006/02/12 06:45:34
1707 [ssh.c ssh_config.5]
1708 add a %l expansion code to the ControlPath, which is filled in with the
1709 local hostname at runtime. Requested by henning@ to avoid some problems
1710 with /home on NFS; ok dtucker@
1711 - djm@cvs.openbsd.org 2006/02/12 10:44:18
1712 [readconf.c]
1713 raise error when the user specifies a RekeyLimit that is smaller than 16
1714 (the smallest of our cipher's blocksize) or big enough to cause integer
1715 wraparound; ok & feedback dtucker@
1716 - jmc@cvs.openbsd.org 2006/02/12 10:49:44
1717 [ssh_config.5]
1718 slight rewording; ok djm
1719 - jmc@cvs.openbsd.org 2006/02/12 10:52:41
1720 [sshd.8]
1721 rework the description of authorized_keys a little;
1722 - jmc@cvs.openbsd.org 2006/02/12 17:57:19
1723 [sshd.8]
1724 sort the list of options permissable w/ authorized_keys;
1725 ok djm dtucker
1726 - jmc@cvs.openbsd.org 2006/02/13 10:16:39
1727 [sshd.8]
1728 no need to subsection the authorized_keys examples - instead, convert
1729 this to look like an actual file. also use proto 2 keys, and use IETF
1730 example addresses;
1731 - jmc@cvs.openbsd.org 2006/02/13 10:21:25
1732 [sshd.8]
1733 small tweaks for the ssh_known_hosts section;
1734 - jmc@cvs.openbsd.org 2006/02/13 11:02:26
1735 [sshd.8]
1736 turn this into an example ssh_known_hosts file; ok djm
1737 - jmc@cvs.openbsd.org 2006/02/13 11:08:43
1738 [sshd.8]
1739 - avoid nasty line split
1740 - `*' does not need to be escaped
1741 - jmc@cvs.openbsd.org 2006/02/13 11:27:25
1742 [sshd.8]
1743 sort FILES and use a -compact list;
1744 - david@cvs.openbsd.org 2006/02/15 05:08:24
1745 [sftp-client.c]
1746 typo in comment; ok djm@
1747 - jmc@cvs.openbsd.org 2006/02/15 16:53:20
1748 [ssh.1]
1749 remove the IETF draft references and replace them with some updated RFCs;
1750 - jmc@cvs.openbsd.org 2006/02/15 16:55:33
1751 [sshd.8]
1752 remove ietf draft references; RFC list now maintained in ssh.1;
1753 - jmc@cvs.openbsd.org 2006/02/16 09:05:34
1754 [sshd.8]
1755 sync some of the FILES entries w/ ssh.1;
1756 - jmc@cvs.openbsd.org 2006/02/19 19:52:10
1757 [sshd.8]
1758 move the sshrc stuff out of FILES, and into its own section:
1759 FILES is not a good place to document how stuff works;
1760 - jmc@cvs.openbsd.org 2006/02/19 20:02:17
1761 [sshd.8]
1762 sync the (s)hosts.equiv FILES entries w/ those from ssh.1;
1763 - jmc@cvs.openbsd.org 2006/02/19 20:05:00
1764 [sshd.8]
1765 grammar;
1766 - jmc@cvs.openbsd.org 2006/02/19 20:12:25
1767 [ssh_config.5]
1768 add some vertical space;
1769 - stevesk@cvs.openbsd.org 2006/02/20 16:36:15
1770 [authfd.c channels.c includes.h session.c ssh-agent.c ssh.c]
1771 move #include <sys/un.h> out of includes.h; ok djm@
1772 - stevesk@cvs.openbsd.org 2006/02/20 17:02:44
1773 [clientloop.c includes.h monitor.c progressmeter.c scp.c]
1774 [serverloop.c session.c sftp.c ssh-agent.c ssh.c sshd.c]
1775 move #include <signal.h> out of includes.h; ok markus@
1776 - stevesk@cvs.openbsd.org 2006/02/20 17:19:54
1777 [auth-rhosts.c auth-rsa.c auth.c auth2-none.c auth2-pubkey.c]
1778 [authfile.c clientloop.c includes.h readconf.c scp.c session.c]
1779 [sftp-client.c sftp-common.c sftp-common.h sftp-glob.c]
1780 [sftp-server.c sftp.c ssh-add.c ssh-keygen.c ssh.c sshconnect.c]
1781 [sshconnect2.c sshd.c sshpty.c]
1782 move #include <sys/stat.h> out of includes.h; ok markus@
1783 - stevesk@cvs.openbsd.org 2006/02/22 00:04:45
1784 [canohost.c clientloop.c includes.h match.c readconf.c scp.c ssh.c]
1785 [sshconnect.c]
1786 move #include <ctype.h> out of includes.h; ok djm@
1787 - jmc@cvs.openbsd.org 2006/02/24 10:25:14
1788 [ssh_config.5]
1789 add section on patterns;
1790 from dtucker + myself
1791 - jmc@cvs.openbsd.org 2006/02/24 10:33:54
1792 [sshd_config.5]
1793 signpost to PATTERNS;
1794 - jmc@cvs.openbsd.org 2006/02/24 10:37:07
1795 [ssh_config.5]
1796 tidy up the refs to PATTERNS;
1797 - jmc@cvs.openbsd.org 2006/02/24 10:39:52
1798 [sshd.8]
1799 signpost to PATTERNS section;
1800 - jmc@cvs.openbsd.org 2006/02/24 20:22:16
1801 [ssh-keysign.8 ssh_config.5 sshd_config.5]
1802 some consistency fixes;
1803 - jmc@cvs.openbsd.org 2006/02/24 20:31:31
1804 [ssh.1 ssh_config.5 sshd.8 sshd_config.5]
1805 more consistency fixes;
1806 - jmc@cvs.openbsd.org 2006/02/24 23:20:07
1807 [ssh_config.5]
1808 some grammar/wording fixes;
1809 - jmc@cvs.openbsd.org 2006/02/24 23:43:57
1810 [sshd_config.5]
1811 some grammar/wording fixes;
1812 - jmc@cvs.openbsd.org 2006/02/24 23:51:17
1813 [sshd_config.5]
1814 oops - bits i missed;
1815 - jmc@cvs.openbsd.org 2006/02/25 12:26:17
1816 [ssh_config.5]
1817 document the possible values for KbdInteractiveDevices;
1818 help/ok dtucker
1819 - jmc@cvs.openbsd.org 2006/02/25 12:28:34
1820 [sshd_config.5]
1821 document the order in which allow/deny directives are processed;
1822 help/ok dtucker
1823 - jmc@cvs.openbsd.org 2006/02/26 17:17:18
1824 [ssh_config.5]
1825 move PATTERNS to the end of the main body; requested by dtucker
1826 - jmc@cvs.openbsd.org 2006/02/26 18:01:13
1827 [sshd_config.5]
1828 subsection is pointless here;
1829 - jmc@cvs.openbsd.org 2006/02/26 18:03:10
1830 [ssh_config.5]
1831 comma;
1832 - djm@cvs.openbsd.org 2006/02/28 01:10:21
1833 [session.c]
1834 fix logout recording when privilege separation is disabled, analysis and
1835 patch from vinschen at redhat.com; tested by dtucker@ ok deraadt@
1836 NB. ID sync only - patch already in portable
1837 - djm@cvs.openbsd.org 2006/03/04 04:12:58
1838 [serverloop.c]
1839 move a debug() outside of a signal handler; ok markus@ a little while back
1840 - djm@cvs.openbsd.org 2006/03/12 04:23:07
1841 [ssh.c]
1842 knf nit
1843 - djm@cvs.openbsd.org 2006/03/13 08:16:00
1844 [sshd.c]
1845 don't log that we are listening on a socket before the listen() call
1846 actually succeeds, bz #1162 reported by Senthil Kumar; ok dtucker@
1847 - dtucker@cvs.openbsd.org 2006/03/13 08:33:00
1848 [packet.c]
1849 Set TCP_NODELAY for all connections not just "interactive" ones. Fixes
1850 poor performance and protocol stalls under some network conditions (mindrot
1851 bugs #556 and #981). Patch originally from markus@, ok djm@
1852 - dtucker@cvs.openbsd.org 2006/03/13 08:43:16
1853 [ssh-keygen.c]
1854 Make ssh-keygen handle CR and CRLF line termination when converting IETF
1855 format keys, in adition to vanilla LF. mindrot #1157, tested by Chris
1856 Pepper, ok djm@
1857 - dtucker@cvs.openbsd.org 2006/03/13 10:14:29
1858 [misc.c ssh_config.5 sshd_config.5]
1859 Allow config directives to contain whitespace by surrounding them by double
1860 quotes. mindrot #482, man page help from jmc@, ok djm@
1861 - dtucker@cvs.openbsd.org 2006/03/13 10:26:52
1862 [authfile.c authfile.h ssh-add.c]
1863 Make ssh-add check file permissions before attempting to load private
1864 key files multiple times; it will fail anyway and this prevents confusing
1865 multiple prompts and warnings. mindrot #1138, ok djm@
1866 - djm@cvs.openbsd.org 2006/03/14 00:15:39
1867 [canohost.c]
1868 log the originating address and not just the name when a reverse
1869 mapping check fails, requested by linux AT linuon.com
1870 - markus@cvs.openbsd.org 2006/03/14 16:32:48
1871 [ssh_config.5 sshd_config.5]
1872 *AliveCountMax applies to protcol v2 only; ok dtucker, djm
1873 - djm@cvs.openbsd.org 2006/03/07 09:07:40
1874 [kex.c kex.h monitor.c myproposal.h ssh-keyscan.c sshconnect2.c sshd.c]
1875 Implement the diffie-hellman-group-exchange-sha256 key exchange method
1876 using the SHA256 code in libc (and wrapper to make it into an OpenSSL
1877 EVP), interop tested against CVS PuTTY
1878 NB. no portability bits committed yet
1879 - (djm) [configure.ac defines.h kex.c md-sha256.c]
1880 [openbsd-compat/sha2.h openbsd-compat/openbsd-compat.h]
1881 [openbsd-compat/sha2.c] First stab at portability glue for SHA256
1882 KEX support, should work with libc SHA256 support or OpenSSL
1883 EVP_sha256 if present
1884 - (djm) [includes.h] Restore accidentally dropped netinet/in.h
1885 - (djm) [Makefile.in openbsd-compat/Makefile.in] Add added files
1886 - (djm) [md-sha256.c configure.ac] md-sha256.c needs sha2.h if present
1887 - (djm) [regress/.cvsignore] Ignore Makefile here
1888 - (djm) [loginrec.c] Need stat.h
1889 - (djm) [openbsd-compat/sha2.h] Avoid include macro clash with
1890 system sha2.h
1891 - (djm) [ssh-rand-helper.c] Needs a bunch of headers
1892 - (djm) [ssh-agent.c] Restore dropped stat.h
1893 - (djm) [openbsd-compat/sha2.h openbsd-compat/sha2.c] Comment out
1894 SHA384, which we don't need and doesn't compile without tweaks
1895 - (djm) [auth-pam.c clientloop.c includes.h monitor.c session.c]
1896 [sftp-client.c ssh-keysign.c ssh.c sshconnect.c sshconnect2.c]
1897 [sshd.c openbsd-compat/bsd-misc.c openbsd-compat/bsd-openpty.c]
1898 [openbsd-compat/glob.c openbsd-compat/mktemp.c]
1899 [openbsd-compat/readpassphrase.c] Lots of include fixes for
1900 OpenSolaris
1901 - (tim) [includes.h] put sys/stat.h back in to quiet some "macro redefined:"
1902 - (tim) [openssh/sshpty.c openssh/openbsd-compat/port-tun.c] put in some
1903 includes removed from includes.h
1904 - (dtucker) [configure.ac] Fix glob test conversion to AC_TRY_COMPILE
1905 - (djm) [includes.h] Put back paths.h, it is needed in defines.h
1906 - (dtucker) [openbsd-compat/openbsd-compat.h] AIX (at least) needs
1907 sys/ioctl.h for struct winsize.
1908 - (dtucker) [configure.ac] login_cap.h requires sys/types.h on NetBSD.
1909
191020060313
1911 - (dtucker) [configure.ac] Bug #1171: Don't use printf("%lld", longlong)
1912 since not all platforms support it. Instead, use internal equivalent while
1913 computing LLONG_MIN and LLONG_MAX. Remove special case for alpha-dec-osf*
1914 as it's no longer required. Tested by Bernhard Simon, ok djm@
1915
191620060304
1917 - (dtucker) [contrib/cygwin/ssh-host-config] Require use of lastlog as a
1918 file rather than directory, required as Cygwin will be importing lastlog(1).
1919 Also tightens up permissions on the file. Patch from vinschen@redhat.com.
1920 - (dtucker) [gss-serv-krb5.c] Bug #1166: Correct #ifdefs for gssapi_krb5.h
1921 includes. Patch from gentoo.riverrat at gmail.com.
1922
192320060226
1924 - (dtucker) [configure.ac] Bug #1156: QNX apparently needs SSHD_ACQUIRES_CTTY
1925 patch from kraai at ftbfs.org.
1926
192720060223
1928 - (dtucker) [sshd_config sshd_config.5] Update UsePAM to reflect current
1929 reality. Pointed out by tryponraj at gmail.com.
1930
193120060222
1932 - (dtucker) [openbsd-compat/openssl-compat.{c,h}] Minor tidy up: only
1933 compile in compat code if required.
1934
193520060221
1936 - (dtucker) [openbsd-compat/openssl-compat.h] Prevent warning about
1937 redefinition of SSLeay_add_all_algorithms.
1938
193920060220
1940 - (dtucker) [INSTALL configure.ac openbsd-compat/openssl-compat.{c,h}]
1941 Add optional enabling of OpenSSL's (hardware) Engine support, via
1942 configure --with-ssl-engine. Based in part on a diff by michal at
1943 logix.cz.
1944
194520060219
1946 - (dtucker) [Makefile.in configure.ac, added openbsd-compat/regress/]
1947 Add first attempt at regress tests for compat library. ok djm@
1948
194920060214
1950 - (tim) [buildpkg.sh.in] Make the names consistent.
1951 s/pkg_post_make_install_fixes.sh/pkg-post-make-install-fixes.sh/ OK dtucker@
1952
195320060212
1954 - (dtucker) [openbsd-compat/bsd-cygwin_util.c] Make loop counter unsigned
1955 to silence compiler warning, from vinschen at redhat.com.
1956 - (tim) [configure.ac] Bug #1149. Disable /etc/default/login check for QNX.
1957 - (dtucker) [README version.h contrib/caldera/openssh.spec
1958 contrib/redhat/openssh.spec contrib/suse/openssh.spec] Bump version
1959 strings to match 4.3p2 release.
4 1960
520060208 196120060208
6 - (tim) [session.c] Logout records were not updated on systems with 1962 - (tim) [session.c] Logout records were not updated on systems with
7 post auth privsep disabled due to bug 1086 changes. Analysis and patch 1963 post auth privsep disabled due to bug 1086 changes. Analysis and patch
8 by vinschen at redhat.com. OK tim@, dtucker@. 1964 by vinschen at redhat.com. OK tim@, dtucker@.
9 - (dtucker) [configure.ac] Typo in Ultrix and NewsOS sections (NEED_SETPRGP 1965 - (dtucker) [configure.ac] Typo in Ultrix and NewsOS sections (NEED_SETPRGP
10 -> NEED_SETPGRP), reported by Berhard Simon. ok tim@ 1966 -> NEED_SETPGRP), reported by Bernhard Simon. ok tim@
11 1967
1220060206 196820060206
13 - (tim) [configure.ac] Remove unnecessary tests for net/if.h and 1969 - (tim) [configure.ac] Remove unnecessary tests for net/if.h and
@@ -860,2995 +2816,4 @@
860 OpenServer 6 and add osr5bigcrypt support so when someone migrates 2816 OpenServer 6 and add osr5bigcrypt support so when someone migrates
861 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 2817 passwords between UnixWare and OpenServer they will still work. OK dtucker@
862 2818
86320050901 2819$Id: ChangeLog,v 1.4635.2.1 2007/03/06 10:27:55 djm Exp $
864 - (djm) Update RPM spec file versions
865
86620050831
867 - (djm) OpenBSD CVS Sync
868 - djm@cvs.openbsd.org 2005/08/30 22:08:05
869 [gss-serv.c sshconnect2.c]
870 destroy credentials if krb5_kuserok() call fails. Stops credentials being
871 delegated to users who are not authorised for GSSAPIAuthentication when
872 GSSAPIDeletegateCredentials=yes and another authentication mechanism
873 succeeds; bz#1073 reported by paul.moore AT centrify.com, fix by
874 simon AT sxw.org.uk, tested todd@ biorn@ jakob@; ok deraadt@
875 - markus@cvs.openbsd.org 2005/08/31 09:28:42
876 [version.h]
877 4.2
878 - (dtucker) [README] Update release note URL to 4.2
879 - (tim) [configure.ac auth.c defines.h session.c openbsd-compat/port-uw.c
880 openbsd-compat/port-uw.h openbsd-compat/xcrypt.c] libiaf cleanup. Disable
881 libiaf bits for OpenServer6. Free memory allocated by ia_get_logpwd().
882 Feedback and OK dtucker@
883
88420050830
885 - (tim) [configure.ac] Back out last change. It needs to be done differently.
886
88720050829
888 - (tim) [configure.ac] ia_openinfo() seems broken on OSR6. Limit UW long
889 password support to 7.x for now.
890
89120050826
892 - (tim) [CREDITS LICENCE auth.c configure.ac defines.h includes.h session.c
893 openbsd-compat/Makefile.in openbsd-compat/openbsd-compat.h
894 openbsd-compat/xcrypt.c] New files [openssh/openbsd-compat/port-uw.c
895 openssh/openbsd-compat/port-uw.h] Support long passwords (> 8-char)
896 on UnixWare 7 from Dhiraj Gulati and Ahsan Rashid. Cleanup and testing
897 by tim@. Feedback and OK dtucker@
898
89920050823
900 - (dtucker) [regress/test-exec.sh] Do not prepend an extra "/" to a fully-
901 qualified sshd pathname since some systems (eg Cygwin) may consider "/foo"
902 and "//foo" to be different. Spotted by vinschen at redhat.com.
903 - (tim) [configure.ac] Not all gcc's support -Wsign-compare. Enhancements
904 and OK dtucker@
905 - (tim) [defines.h] PATH_MAX bits for OpenServer OK dtucker@
906
90720050821
908 - (dtucker) [configure.ac defines.h includes.h sftp.c] Add support for
909 LynxOS, patch from Olli Savia (ops at iki.fi). ok djm@
910
91120050816
912 - (djm) [ttymodes.c] bugzilla #1025: Fix encoding of _POSIX_VDISABLE,
913 from Jacob Nevins; ok dtucker@
914
91520050815
916 - (tim) [sftp.c] wrap el_end() in #ifdef USE_LIBEDIT
917 - (tim) [configure.ac] corrections to libedit tests. Report and patches
918 by skeleten AT shillest.net
919
92020050812
921 - (djm) OpenBSD CVS Sync
922 - markus@cvs.openbsd.org 2005/07/28 17:36:22
923 [packet.c]
924 missing packet_init_compression(); from solar
925 - djm@cvs.openbsd.org 2005/07/30 01:26:16
926 [ssh.c]
927 fix -D listen_host initialisation, so it picks up gateway_ports setting
928 correctly
929 - djm@cvs.openbsd.org 2005/07/30 02:03:47
930 [readconf.c]
931 listen_hosts initialisation here too; spotted greg AT y2005.nest.cx
932 - dtucker@cvs.openbsd.org 2005/08/06 10:03:12
933 [servconf.c]
934 Unbreak sshd ListenAddress for bare IPv6 addresses.
935 Report from Janusz Mucka; ok djm@
936 - jaredy@cvs.openbsd.org 2005/08/08 13:22:48
937 [sftp.c]
938 sftp prompt enhancements:
939 - in non-interactive mode, do not print an empty prompt at the end
940 before finishing
941 - print newline after EOF in editline mode
942 - call el_end() in editline mode
943 ok dtucker djm
944
94520050810
946 - (dtucker) [configure.ac] Test libedit library and headers for compatibility.
947 Report from skeleten AT shillest.net, ok djm@
948 - (dtucker) [LICENCE configure.ac defines.h openbsd-compat/realpath.c]
949 Sync current (thread-safe) version of realpath.c from OpenBSD (which is
950 in turn based on FreeBSD's). ok djm@
951
95220050809
953 - (tim) [configure.ac] Allow --with-audit=no. OK dtucker@
954 Report by skeleten AT shillest.net
955
95620050803
957 - (dtucker) [openbsd-compat/fake-rfc2553.h] Check for EAI_* defines
958 individually and use a value less likely to collide with real values from
959 netdb.h. Fixes compile warnings on FreeBSD 5.3. ok djm@
960 - (dtucker) [openbsd-compat/fake-rfc2553.h] MAX_INT -> INT_MAX since the
961 latter is specified in the standard.
962
96320050802
964 - (dtucker) OpenBSD CVS Sync
965 - dtucker@cvs.openbsd.org 2005/07/27 10:39:03
966 [scp.c hostfile.c sftp-client.c]
967 Silence bogus -Wuninitialized warnings; ok djm@
968 - (dtucker) [configure.ac] Enable -Wuninitialized by default when compiling
969 with gcc. ok djm@
970 - (dtucker) [configure.ac] Add a --with-Werror option to configure for
971 adding -Werror to CFLAGS when all of the configure tests are done. ok djm@
972
97320050726
974 - (dtucker) [configure.ac] Update zlib warning message too, pointed out by
975 tim@.
976 - (djm) OpenBSD CVS Sync
977 - otto@cvs.openbsd.org 2005/07/19 15:32:26
978 [auth-passwd.c]
979 auth_usercheck(3) can return NULL, so check for that. Report from
980 mpech@. ok markus@
981 - markus@cvs.openbsd.org 2005/07/25 11:59:40
982 [kex.c kex.h myproposal.h packet.c packet.h servconf.c session.c]
983 [sshconnect2.c sshd.c sshd_config sshd_config.5]
984 add a new compression method that delays compression until the user
985 has been authenticated successfully and set compression to 'delayed'
986 for sshd.
987 this breaks older openssh clients (< 3.5) if they insist on
988 compression, so you have to re-enable compression in sshd_config.
989 ok djm@
990
99120050725
992 - (dtucker) [configure.ac] Update zlib version check for CAN-2005-2096.
993
99420050717
995- OpenBSD CVS Sync
996 - djm@cvs.openbsd.org 2005/07/16 01:35:24
997 [auth1.c channels.c cipher.c clientloop.c kex.c session.c ssh.c]
998 [sshconnect.c]
999 spacing
1000 - (djm) [acss.c auth-pam.c auth-shadow.c auth-skey.c auth1.c canohost.c]
1001 [cipher-acss.c loginrec.c ssh-rand-helper.c sshd.c] Fix whitespace at EOL
1002 in portable too ("perl -p -i -e 's/\s+$/\n/' *.[ch]")
1003 - (djm) [auth-pam.c sftp.c] spaces vs. tabs at start of line
1004 - djm@cvs.openbsd.org 2005/07/17 06:49:04
1005 [channels.c channels.h session.c session.h]
1006 Fix a number of X11 forwarding channel leaks:
1007 1. Refuse multiple X11 forwarding requests on the same session
1008 2. Clean up all listeners after a single_connection X11 forward, not just
1009 the one that made the single connection
1010 3. Destroy X11 listeners when the session owning them goes away
1011 testing and ok dtucker@
1012 - djm@cvs.openbsd.org 2005/07/17 07:17:55
1013 [auth-rh-rsa.c auth-rhosts.c auth2-chall.c auth2-gss.c channels.c]
1014 [cipher-ctr.c gss-genr.c gss-serv.c kex.c moduli.c readconf.c]
1015 [serverloop.c session.c sftp-client.c sftp.c ssh-add.c ssh-keygen.c]
1016 [sshconnect.c sshconnect2.c]
1017 knf says that a 2nd level indent is four (not three or five) spaces
1018 -(djm) [audit.c auth1.c auth2.c entropy.c loginrec.c serverloop.c]
1019 [ssh-rand-helper.c] fix portable 2nd level indents at 4 spaces too
1020 - (djm) [monitor.c monitor_wrap.c] -Wsign-compare for PAM monitor calls
1021
102220050716
1023 - (dtucker) [auth-pam.c] Ensure that only one side of the authentication
1024 socketpair stays open on in both the monitor and PAM process. Patch from
1025 Joerg Sonnenberger.
1026
102720050714
1028 - (dtucker) OpenBSD CVS Sync
1029 - dtucker@cvs.openbsd.org 2005/07/06 09:33:05
1030 [ssh.1]
1031 clarify meaning of ssh -b ; with & ok jmc@
1032 - dtucker@cvs.openbsd.org 2005/07/08 09:26:18
1033 [misc.c]
1034 Make comment match code; ok djm@
1035 - markus@cvs.openbsd.org 2005/07/08 09:41:33
1036 [channels.h]
1037 race when efd gets closed while there is still buffered data:
1038 change CHANNEL_EFD_OUTPUT_ACTIVE()
1039 1) c->efd must always be valid AND
1040 2a) no EOF has been seen OR
1041 2b) there is buffered data
1042 report, initial fix and testing Chuck Cranor
1043 - dtucker@cvs.openbsd.org 2005/07/08 10:20:41
1044 [ssh_config.5]
1045 change BindAddress to match recent ssh -b change; prompted by markus@
1046 - jmc@cvs.openbsd.org 2005/07/08 12:53:10
1047 [ssh_config.5]
1048 new sentence, new line;
1049 - dtucker@cvs.openbsd.org 2005/07/14 04:00:43
1050 [misc.h]
1051 use __sentinel__ attribute; ok deraadt@ djm@ markus@
1052 - (dtucker) [configure.ac defines.h] Define __sentinel__ to nothing if the
1053 compiler doesn't understand it to prevent warnings. If any mainstream
1054 compiler versions acquire it we can test for those versions. Based on
1055 discussion with djm@.
1056
105720050707
1058 - dtucker [auth-krb5.c auth.h gss-serv-krb5.c] Move KRB5CCNAME generation for
1059 the MIT Kerberos code path into a common function and expand mkstemp
1060 template to be consistent with the rest of OpenSSH. From sxw at
1061 inf.ed.ac.uk, ok djm@
1062 - (dtucker) [auth-krb5.c] There's no guarantee that snprintf will set errno
1063 in the case where the buffer is insufficient, so always return ENOMEM.
1064 Also pointed out by sxw at inf.ed.ac.uk.
1065 - (dtucker) [acconfig.h auth-krb5.c configure.ac gss-serv-krb5.c] Remove
1066 calls to krb5_init_ets, which has not been required since krb-1.1.x and
1067 most Kerberos versions no longer export in their public API. From sxw
1068 at inf.ed.ac.uk, ok djm@
1069
107020050706
1071 - (djm) OpenBSD CVS Sync
1072 - markus@cvs.openbsd.org 2005/07/01 13:19:47
1073 [channels.c]
1074 don't free() if getaddrinfo() fails; report mpech@
1075 - djm@cvs.openbsd.org 2005/07/04 00:58:43
1076 [channels.c clientloop.c clientloop.h misc.c misc.h ssh.c ssh_config.5]
1077 implement support for X11 and agent forwarding over multiplex slave
1078 connections. Because of protocol limitations, the slave connections inherit
1079 the master's DISPLAY and SSH_AUTH_SOCK rather than distinctly forwarding
1080 their own.
1081 ok dtucker@ "put it in" deraadt@
1082 - jmc@cvs.openbsd.org 2005/07/04 11:29:51
1083 [ssh_config.5]
1084 fix Xr and a little grammar;
1085 - markus@cvs.openbsd.org 2005/07/04 14:04:11
1086 [channels.c]
1087 don't forget to set x11_saved_display
1088
108920050626
1090 - (djm) OpenBSD CVS Sync
1091 - djm@cvs.openbsd.org 2005/06/17 22:53:47
1092 [ssh.c sshconnect.c]
1093 Fix ControlPath's %p expanding to "0" for a default port,
1094 spotted dwmw2 AT infradead.org; ok markus@
1095 - djm@cvs.openbsd.org 2005/06/18 04:30:36
1096 [ssh.c ssh_config.5]
1097 allow ControlPath=none, patch from dwmw2 AT infradead.org; ok dtucker@
1098 - djm@cvs.openbsd.org 2005/06/25 22:47:49
1099 [ssh.c]
1100 do the default port filling code a few lines earlier, so it really
1101 does fix %p
1102
110320050618
1104 - (djm) OpenBSD CVS Sync
1105 - djm@cvs.openbsd.org 2005/05/20 12:57:01;
1106 [auth1.c] split protocol 1 auth methods into separate functions, makes
1107 authloop much more readable; fixes and ok markus@ (portable ok &
1108 polish dtucker@)
1109 - djm@cvs.openbsd.org 2005/06/17 02:44:33
1110 [auth1.c] make this -Wsign-compare clean; ok avsm@ markus@
1111 - (djm) [loginrec.c ssh-rand-helper.c] Fix -Wsign-compare for portable,
1112 tested and fixes tim@
1113
111420050617
1115 - (djm) OpenBSD CVS Sync
1116 - djm@cvs.openbsd.org 2005/06/16 03:38:36
1117 [channels.c channels.h clientloop.c clientloop.h ssh.c]
1118 move x11_get_proto from ssh.c to clientloop.c, to make muliplexed xfwd
1119 easier later; ok deraadt@
1120 - markus@cvs.openbsd.org 2005/06/16 08:00:00
1121 [canohost.c channels.c sshd.c]
1122 don't exit if getpeername fails for forwarded ports; bugzilla #1054;
1123 ok djm
1124 - djm@cvs.openbsd.org 2005/06/17 02:44:33
1125 [auth-rsa.c auth.c auth1.c auth2-chall.c auth2-gss.c authfd.c authfile.c]
1126 [bufaux.c canohost.c channels.c cipher.c clientloop.c dns.c gss-serv.c]
1127 [kex.c kex.h key.c mac.c match.c misc.c packet.c packet.h scp.c]
1128 [servconf.c session.c session.h sftp-client.c sftp-server.c sftp.c]
1129 [ssh-keyscan.c ssh-rsa.c sshconnect.c sshconnect1.c sshconnect2.c sshd.c]
1130 make this -Wsign-compare clean; ok avsm@ markus@
1131 NB. auth1.c changes not committed yet (conflicts with uncommitted sync)
1132 NB2. more work may be needed to make portable Wsign-compare clean
1133 - (dtucker) [cipher.c openbsd-compat/openbsd-compat.h
1134 openbsd-compat/openssl-compat.c] only include openssl compat stuff where
1135 it's needed as it can cause conflicts elsewhere (eg xcrypt.c). Found by
1136 and ok tim@
1137
113820050616
1139 - (djm) OpenBSD CVS Sync
1140 - jaredy@cvs.openbsd.org 2005/06/07 13:25:23
1141 [progressmeter.c]
1142 catch SIGWINCH and resize progress meter accordingly; ok markus dtucker
1143 - djm@cvs.openbsd.org 2005/06/06 11:20:36
1144 [auth.c auth.h misc.c misc.h ssh.c ssh_config.5 sshconnect.c]
1145 introduce a generic %foo expansion function. replace existing % expansion
1146 and add expansion to ControlPath; ok markus@
1147 - djm@cvs.openbsd.org 2005/06/08 03:50:00
1148 [ssh-keygen.1 ssh-keygen.c sshd.8]
1149 increase default rsa/dsa key length from 1024 to 2048 bits;
1150 ok markus@ deraadt@
1151 - djm@cvs.openbsd.org 2005/06/08 11:25:09
1152 [clientloop.c readconf.c readconf.h ssh.c ssh_config.5]
1153 add ControlMaster=auto/autoask options to support opportunistic
1154 multiplexing; tested avsm@ and jakob@, ok markus@
1155 - dtucker@cvs.openbsd.org 2005/06/09 13:43:49
1156 [cipher.c]
1157 Correctly initialize end of array sentinel; ok djm@
1158 (Id sync only, change already in portable)
1159
116020050609
1161 - (dtucker) [cipher.c openbsd-compat/Makefile.in
1162 openbsd-compat/openbsd-compat.h openbsd-compat/openssl-compat.{c,h}]
1163 Move compatibility code for supporting older OpenSSL versions to the
1164 compat layer. Suggested by and "no objection" djm@
1165
116620050607
1167 - (dtucker) [configure.ac] Continue the hunt for LLONG_MIN and LLONG_MAX:
1168 in today's episode we attempt to coax it from limits.h where it may be
1169 hiding, failing that we take the DIY approach. Tested by tim@
1170
117120050603
1172 - (dtucker) [configure.ac] Only try gcc -std=gnu99 if LLONG_MAX isn't
1173 defined, and check that it helps before keeping it in CFLAGS. Some old
1174 gcc's don't set an error code when encountering an unknown value in -std.
1175 Found and tested by tim@.
1176 - (dtucker) [configure.ac] Point configure's reporting address at the
1177 openssh-unix-dev list. ok tim@ djm@
1178
117920050602
1180 - (tim) [configure.ac] Some platforms need sys/types.h for arpa/nameser.h.
1181 Take AC_CHECK_HEADERS test out of ultrix section. It caused other platforms
1182 to skip builtin standard includes tests. (first AC_CHECK_HEADERS test
1183 must be run on all platforms) Add missing ;; to case statement. OK dtucker@
1184
118520050601
1186 - (dtucker) [configure.ac] Look for _getshort and _getlong in
1187 arpa/nameser.h.
1188 - (dtucker) [configure.ac openbsd-compat/Makefile.in openbsd-compat/strtoll.c]
1189 Add strtoll to the compat library, from OpenBSD.
1190 - (dtucker) OpenBSD CVS Sync
1191 - avsm@cvs.openbsd.org 2005/05/26 02:08:05
1192 [scp.c]
1193 If copying multiple files to a target file (which normally fails, as it
1194 must be a target directory), kill the spawned ssh child before exiting.
1195 This stops it trying to authenticate and spewing lots of output.
1196 deraadt@ ok
1197 - dtucker@cvs.openbsd.org 2005/05/26 09:08:12
1198 [ssh-keygen.c]
1199 uint32_t -> u_int32_t for consistency; ok djm@
1200 - djm@cvs.openbsd.org 2005/05/27 08:30:37
1201 [ssh.c]
1202 fix -O for cases where no ControlPath has been specified or socket at
1203 ControlPath is not contactable; spotted by and ok avsm@
1204 - (tim) [config.guess config.sub] Update to '2005-05-27' version.
1205 - (tim) [configure.ac] set TEST_SHELL for OpenServer 6
1206
120720050531
1208 - (dtucker) [contrib/aix/pam.conf] Correct comments. From davidl at
1209 vintela.com.
1210 - (dtucker) [mdoc2man.awk] Teach it to understand .Ox.
1211
121220050530
1213 - (dtucker) [README] Link to new release notes. Beter late than never...
1214
121520050529
1216 - (dtucker) [openbsd-compat/port-aix.c] Bug #1046: AIX 5.3 expects the
1217 argument to passwdexpired to be initialized to NULL. Suggested by tim@
1218 While at it, initialize the other arguments to auth functions in case they
1219 ever acquire this behaviour.
1220 - (dtucker) [openbsd-compat/port-aix.c] Whitespace cleanups while there.
1221 - (dtucker) [openbsd-compat/port-aix.c] Minor correction to debug message,
1222 spotted by tim@.
1223
122420050528
1225 - (dtucker) [configure.ac] For AC_CHECK_HEADERS() and AC_CHECK_FUNCS() have
1226 one entry per line to make it easier to merge changes. ok djm@
1227 - (dtucker) [configure.ac] strsep() may be defined in string.h, so check
1228 for its presence and include it in the strsep check.
1229 - (dtucker) [configure.ac] getpgrp may be defined in unistd.h, so check for
1230 its presence before doing AC_FUNC_GETPGRP.
1231 - (dtucker) [configure.ac] Merge HP-UX blocks into a common block with minor
1232 version-specific variations as required.
1233 - (dtucker) [openbsd-compat/port-aix.h] Use the HAVE_DECL_* definitions as
1234 per the autoconf man page. Configure should always define them but it
1235 doesn't hurt to check.
1236
123720050527
1238 - (djm) [defines.h] Use our realpath if we have to define PATH_MAX, spotted by
1239 David Leach; ok dtucker@
1240 - (dtucker) [acconfig.h configure.ac defines.h includes.h sshpty.c
1241 openbsd-compat/bsd-misc.c] Add support for Ultrix. No, that's not a typo.
1242 Required changes from Bernhard Simon, integrated by me. ok djm@
1243
124420050525
1245 - (djm) [mpaux.c mpaux.h Makefile.in] Remove old mpaux.[ch] code, it has not
1246 been used for a while
1247 - (djm) OpenBSD CVS Sync
1248 - otto@cvs.openbsd.org 2005/04/05 13:45:31
1249 [ssh-keygen.c]
1250 - djm@cvs.openbsd.org 2005/04/06 09:43:59
1251 [sshd.c]
1252 avoid harmless logspam by not performing setsockopt() on non-socket;
1253 ok markus@
1254 - dtucker@cvs.openbsd.org 2005/04/06 12:26:06
1255 [ssh.c]
1256 Fix debug call for port forwards; patch from pete at seebeyond.com,
1257 ok djm@ (ID sync only - change already in portable)
1258 - djm@cvs.openbsd.org 2005/04/09 04:32:54
1259 [misc.c misc.h tildexpand.c Makefile.in]
1260 replace tilde_expand_filename with a simpler implementation, ahead of
1261 more whacking; ok deraadt@
1262 - jmc@cvs.openbsd.org 2005/04/14 12:30:30
1263 [ssh.1]
1264 arg to -b is an address, not if_name;
1265 ok markus@
1266 - jakob@cvs.openbsd.org 2005/04/20 10:05:45
1267 [dns.c]
1268 do not try to look up SSHFP for numerical hostname. ok djm@
1269 - djm@cvs.openbsd.org 2005/04/21 06:17:50
1270 [ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh.1 ssh_config.5 sshd.8]
1271 [sshd_config.5] OpenSSH doesn't ever look at the $HOME environment
1272 variable, so don't say that we do (bz #623); ok deraadt@
1273 - djm@cvs.openbsd.org 2005/04/21 11:47:19
1274 [ssh.c]
1275 don't allocate a pty when -n flag (/dev/null stdin) is set, patch from
1276 ignasi.roca AT fujitsu-siemens.com (bz #829); ok dtucker@
1277 - dtucker@cvs.openbsd.org 2005/04/23 23:43:47
1278 [readpass.c]
1279 Add debug message if read_passphrase can't open /dev/tty; bz #471;
1280 ok djm@
1281 - jmc@cvs.openbsd.org 2005/04/26 12:59:02
1282 [sftp-client.h]
1283 spelling correction in comment from wiz@netbsd;
1284 - jakob@cvs.openbsd.org 2005/04/26 13:08:37
1285 [ssh.c ssh_config.5]
1286 fallback gracefully if client cannot connect to ControlPath. ok djm@
1287 - moritz@cvs.openbsd.org 2005/04/28 10:17:56
1288 [progressmeter.c ssh-keyscan.c]
1289 add snprintf checks. ok djm@ markus@
1290 - markus@cvs.openbsd.org 2005/05/02 21:13:22
1291 [readpass.c]
1292 missing {}
1293 - djm@cvs.openbsd.org 2005/05/10 10:28:11
1294 [ssh.c]
1295 print nice error message for EADDRINUSE as well (ID sync only)
1296 - djm@cvs.openbsd.org 2005/05/10 10:30:43
1297 [ssh.c]
1298 report real errors on fallback from ControlMaster=no to normal connect
1299 - markus@cvs.openbsd.org 2005/05/16 15:30:51
1300 [readconf.c servconf.c]
1301 check return value from strdelim() for NULL (AddressFamily); mpech
1302 - djm@cvs.openbsd.org 2005/05/19 02:39:55
1303 [sshd_config.5]
1304 sort config options, from grunk AT pestilenz.org; ok jmc@
1305 - djm@cvs.openbsd.org 2005/05/19 02:40:52
1306 [sshd_config]
1307 whitespace nit, from grunk AT pestilenz.org
1308 - djm@cvs.openbsd.org 2005/05/19 02:42:26
1309 [includes.h]
1310 fix cast, from grunk AT pestilenz.org
1311 - djm@cvs.openbsd.org 2005/05/20 10:50:55
1312 [ssh_config.5]
1313 give a ProxyCommand example using nc(1), with and ok jmc@
1314 - jmc@cvs.openbsd.org 2005/05/20 11:23:32
1315 [ssh_config.5]
1316 oops - article and spacing;
1317 - avsm@cvs.openbsd.org 2005/05/23 22:44:01
1318 [moduli.c ssh-keygen.c]
1319 - removes signed/unsigned comparisons in moduli generation
1320 - use strtonum instead of atoi where its easier
1321 - check some strlcpy overflow and fatal instead of truncate
1322 - djm@cvs.openbsd.org 2005/05/23 23:32:46
1323 [cipher.c myproposal.h ssh.1 ssh_config.5 sshd_config.5]
1324 add support for draft-harris-ssh-arcfour-fixes-02 improved arcfour modes;
1325 ok markus@
1326 - avsm@cvs.openbsd.org 2005/05/24 02:05:09
1327 [ssh-keygen.c]
1328 some style nits from dmiller@, and use a fatal() instead of a printf()/exit
1329 - avsm@cvs.openbsd.org 2005/05/24 17:32:44
1330 [atomicio.c atomicio.h authfd.c monitor_wrap.c msg.c scp.c sftp-client.c]
1331 [ssh-keyscan.c sshconnect.c]
1332 Switch atomicio to use a simpler interface; it now returns a size_t
1333 (containing number of bytes read/written), and indicates error by
1334 returning 0. EOF is signalled by errno==EPIPE.
1335 Typical use now becomes:
1336
1337 if (atomicio(read, ..., len) != len)
1338 err(1,"read");
1339
1340 ok deraadt@, cloder@, djm@
1341 - (dtucker) [regress/reexec.sh] Add ${EXEEXT} so this test also works on
1342 Cygwin.
1343 - (dtucker) [auth-pam.c] Bug #1033: Fix warnings building with PAM on Linux:
1344 warning: dereferencing type-punned pointer will break strict-aliasing rules
1345 warning: passing arg 3 of `pam_get_item' from incompatible pointer type
1346 The type-punned pointer fix is based on a patch from SuSE's rpm. ok djm@
1347 - (dtucker) [configure.ac openbsd-compat/getrrsetbyname.c] Bug #1033: Provide
1348 templates for _getshort and _getlong if missing to prevent compiler warnings
1349 on Linux.
1350 - (djm) [configure.ac openbsd-compat/Makefile.in]
1351 [openbsd-compat/openbsd-compat.h openbsd-compat/strtonum.c]
1352 Add strtonum(3) from OpenBSD libc, new code needs it.
1353 Unfortunately Linux forces us to do a bizarre dance with compiler
1354 options to get LLONG_MIN/MAX; Spotted by and ok dtucker@
1355
135620050524
1357 - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
1358 [contrib/suse/openssh.spec] Update spec file versions to 4.1p1
1359 - (dtucker) [auth-pam.c] Since people don't seem to be getting the message
1360 that USE_POSIX_THREADS is unsupported, not recommended and generally a bad
1361 idea, it is now known as UNSUPPORTED_POSIX_THREADS_HACK. Attempting to use
1362 USE_POSIX_THREADS will now generate an error so we don't silently change
1363 behaviour. ok djm@
1364 - (dtucker) [openbsd-compat/bsd-cygwin_util.c] Ensure sufficient memory
1365 allocation when retrieving core Windows environment. Add CYGWIN variable
1366 to propagated variables. Patch from vinschen at redhat.com, ok djm@
1367 - Release 4.1p1
1368
136920050524
1370 - (djm) [openbsd-compat/readpassphrase.c] bz #950: Retry tcsetattr to ensure
1371 terminal modes are reset correctly. Fix from peak AT argo.troja.mff.cuni.cz;
1372 "looks ok" dtucker@
1373
137420050512
1375 - (tim) [buildpkg.sh.in] missing ${PKG_INSTALL_ROOT} in init script
1376 hard link section. Bug 1038.
1377
137820050509
1379 - (dtucker) [contrib/cygwin/ssh-host-config] Add a test and warning for a
1380 user-mode mounts in Cygwin installation. Patch from vinschen at redhat.com.
1381
138220050504
1383 - (djm) [ssh.c] some systems return EADDRINUSE on a bind to an already-used
1384 unix domain socket, so catch that too; from jakob@ ok dtucker@
1385
138620050503
1387 - (dtucker) [canohost.c] normalise socket addresses returned by
1388 get_remote_hostname(). This means that IPv4 addresses in log messages
1389 on IPv6 enabled machines will no longer be prefixed by "::ffff:" and
1390 AllowUsers, DenyUsers, AllowGroups, DenyGroups will match IPv4-style
1391 addresses only for 4-in-6 mapped connections, regardless of whether
1392 or not the machine is IPv6 enabled. ok djm@
1393
139420050425
1395 - (dtucker) [regress/multiplex.sh] Use "kill -0 $pid" to check for the
1396 existence of a process since it's more portable. Found by jbasney at
1397 ncsa.uiuc.edu; ok tim@
1398 - (dtucker) [regress/multiplex.sh] Remove cleanup call since test-exec.sh
1399 will clean up anyway. From tim@
1400 - (dtucker) [regress/multiplex.sh] Put control socket in /tmp so running
1401 "make tests" works even if you're building on a filesystem that doesn't
1402 support sockets. From deengert at anl.gov, ok djm@
1403
140420050424
1405 - (dtucker) [INSTALL configure.ac] Make zlib version check test for 1.1.4 or
1406 1.2.1.2 or higher. With tim@, ok djm@
1407
140820050423
1409 - (tim) [config.guess] Add support for OpenServer 6.
1410
141120050421
1412 - (dtucker) [session.c] Bug #1024: Don't check pam_session_is_open if
1413 UseLogin is set as PAM is not used to establish credentials in that
1414 case. Found by Michael Selvesteen, ok djm@
1415
141620050419
1417 - (dtucker) [INSTALL] Reference README.privsep for the privilege separation
1418 requirements. Pointed out by Bengt Svensson.
1419 - (dtucker) [INSTALL] Put the s/key text and URL back together.
1420 - (dtucker) [INSTALL] Fix s/key text too.
1421
142220050411
1423 - (tim) [configure.ac] UnixWare needs PASSWD_NEEDS_USERNAME
1424
142520050405
1426 - (dtucker) [configure.ac] Define HAVE_SO_PEERCRED if we have it. ok djm@
1427 - (dtucker) [auth-sia.c] Constify sys_auth_passwd, fixes build error on
1428 Tru64. Patch from cmadams at hiwaay.net.
1429 - (dtucker) [auth-passwd.c auth-sia.h] Remove duplicate definitions of
1430 sys_auth_passwd, pointed out by cmadams at hiwaay.net.
1431
143220050403
1433 - (djm) OpenBSD CVS Sync
1434 - deraadt@cvs.openbsd.org 2005/03/31 18:39:21
1435 [scp.c]
1436 copy argv[] element instead of smashing the one that ps will see; ok otto
1437 - djm@cvs.openbsd.org 2005/04/02 12:41:16
1438 [scp.c]
1439 since ssh has xstrdup, use it instead of strdup+test. unbreaks -Werror
1440 build
1441 - (dtucker) [monitor.c] Don't free buffers in audit functions, monitor_read
1442 will free as needed. ok tim@ djm@
1443
144420050331
1445 - (dtucker) OpenBSD CVS Sync
1446 - jmc@cvs.openbsd.org 2005/03/16 11:10:38
1447 [ssh_config.5]
1448 get the syntax right for {Local,Remote}Forward;
1449 based on a diff from markus;
1450 problem report from ponraj;
1451 ok dtucker@ markus@ deraadt@
1452 - markus@cvs.openbsd.org 2005/03/16 21:17:39
1453 [version.h]
1454 4.1
1455 - jmc@cvs.openbsd.org 2005/03/18 17:05:00
1456 [sshd_config.5]
1457 typo;
1458 - (dtucker) [auth.h sshd.c openbsd-compat/port-aix.c] Bug #1006: fix bug in
1459 handling of password expiry messages returned by AIX's authentication
1460 routines, originally reported by robvdwal at sara.nl.
1461 - (dtucker) [ssh.c] Prevent null pointer deref in port forwarding debug
1462 message on some platforms. Patch from pete at seebeyond.com via djm.
1463 - (dtucker) [monitor.c] Remaining part of fix for bug #1006.
1464
146520050329
1466 - (dtucker) [contrib/aix/buildbff.sh] Bug #1005: Look up only the user we're
1467 interested in which is much faster in large (eg LDAP or NIS) environments.
1468 Patch from dleonard at vintela.com.
1469
147020050321
1471 - (dtucker) [configure.ac] Prevent configure --with-zlib from adding -Iyes
1472 and -Lyes to CFLAGS and LIBS. Pointed out by peter at slagheap.net,
1473 with & ok tim@
1474 - (dtucker) [configure.ac] Make configure error out if the user specifies
1475 --with-libedit but the required libs can't be found, rather than silently
1476 ignoring and continuing. ok tim@
1477 - (dtucker) [configure.ac openbsd-compat/port-aix.h] Prevent redefinitions
1478 of setauthdb on AIX 5.3, reported by anders.liljegren at its.uu.se.
1479
148020050317
1481 - (tim) [configure.ac] Bug 998. Make path for --with-opensc optional.
1482 Make --without-opensc work.
1483 - (tim) [configure.ac] portability changes on test statements. Some shells
1484 have problems with -a operator.
1485 - (tim) [configure.ac] make some configure options a little more error proof.
1486 - (tim) [configure.ac] remove trailing white space.
1487
148820050314
1489 - (dtucker) OpenBSD CVS Sync
1490 - dtucker@cvs.openbsd.org 2005/03/10 10:15:02
1491 [readconf.c]
1492 Check listen addresses for null, prevents xfree from dying during
1493 ClearAllForwardings (bz #996). From Craig Leres, ok markus@
1494 - deraadt@cvs.openbsd.org 2005/03/10 22:01:05
1495 [misc.c ssh-keygen.c servconf.c clientloop.c auth-options.c ssh-add.c
1496 monitor.c sftp-client.c bufaux.h hostfile.c ssh.c sshconnect.c channels.c
1497 readconf.c bufaux.c sftp.c]
1498 spacing
1499 - deraadt@cvs.openbsd.org 2005/03/10 22:40:38
1500 [auth-options.c]
1501 spacing
1502 - markus@cvs.openbsd.org 2005/03/11 14:59:06
1503 [ssh-keygen.c]
1504 typo, missing \n; mpech
1505 - jmc@cvs.openbsd.org 2005/03/12 11:55:03
1506 [ssh_config.5]
1507 escape `.' at eol to avoid double spacing issues;
1508 - dtucker@cvs.openbsd.org 2005/03/14 10:09:03
1509 [ssh-keygen.1]
1510 Correct description of -H (bz #997); ok markus@, punctuation jmc@
1511 - dtucker@cvs.openbsd.org 2005/03/14 11:44:42
1512 [auth.c]
1513 Populate host for log message for logins denied by AllowUsers and
1514 DenyUsers (bz #999); ok markus@ (patch by tryponraj at gmail.com)
1515 - markus@cvs.openbsd.org 2005/03/14 11:46:56
1516 [buffer.c buffer.h channels.c]
1517 limit input buffer size for channels; bugzilla #896; with and ok dtucker@
1518 - (tim) [contrib/caldera/openssh.spec] links in rc?.d were getting trashed
1519 with a rpm -F
1520
152120050313
1522 - (dtucker) [contrib/cygwin/ssh-host-config] Makes the query for the
1523 localized name of the local administrators group more reliable. From
1524 vinschen at redhat.com.
1525
152620050312
1527 - (dtucker) [regress/test-exec.sh] DEBUG can cause problems where debug
1528 output ends up in the client's output, causing regress failures. Found
1529 by Corinna Vinschen.
1530
153120050309
1532 - (dtucker) [regress/test-exec.sh] Set BIN_SH=xpg4 on OSF1/Digital Unix/Tru64
1533 so that regress tests behave. From Chris Adams.
1534 - (djm) OpenBSD CVS Sync
1535 - jmc@cvs.openbsd.org 2005/03/07 23:41:54
1536 [ssh.1 ssh_config.5]
1537 more macro simplification;
1538 - djm@cvs.openbsd.org 2005/03/08 23:49:48
1539 [version.h]
1540 OpenSSH 4.0
1541 - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
1542 [contrib/suse/openssh.spec] Update spec file versions
1543 - (djm) [log.c] Fix dumb syntax error; ok dtucker@
1544 - (djm) Release OpenSSH 4.0p1
1545
154620050307
1547 - (dtucker) [configure.ac] Disable gettext search when configuring with
1548 BSM audit support for the time being. ok djm@
1549 - (dtucker) OpenBSD CVS Sync (regress/)
1550 - fgsch@cvs.openbsd.org 2004/12/10 01:31:30
1551 [Makefile sftp-glob.sh]
1552 some globbing regress; prompted and ok djm@
1553 - david@cvs.openbsd.org 2005/01/14 04:21:18
1554 [Makefile test-exec.sh]
1555 pass the SUDO make variable to the individual sh tests; ok dtucker@ markus@
1556 - dtucker@cvs.openbsd.org 2005/02/27 11:33:30
1557 [multiplex.sh test-exec.sh sshd-log-wrapper.sh]
1558 Add optional capability to log output from regress commands; ok markus@
1559 Use with: make TEST_SSH_LOGFILE=/tmp/regress.log
1560 - djm@cvs.openbsd.org 2005/02/27 23:13:36
1561 [login-timeout.sh]
1562 avoid nameservice lookups in regress test; ok dtucker@
1563 - djm@cvs.openbsd.org 2005/03/04 08:48:46
1564 [Makefile envpass.sh]
1565 regress test for SendEnv config parsing bug; ok dtucker@
1566 - (dtucker) [regress/test-exec.sh] Put SUDO in the right place.
1567 - (tim) [configure.ac] SCO 3.2v4.2 no longer supported.
1568
156920050306
1570 - (dtucker) [monitor.c] Bug #125 comment #47: fix errors returned by monitor
1571 when attempting to audit disconnect events. Reported by Phil Dibowitz.
1572 - (dtucker) [session.c sshd.c] Bug #125 comment #49: Send disconnect audit
1573 events earlier, prevents mm_request_send errors reported by Matt Goebel.
1574
157520050305
1576 - (djm) [contrib/cygwin/README] Improve Cygwin build documentation. Patch
1577 from vinschen at redhat.com
1578 - (djm) OpenBSD CVS Sync
1579 - jmc@cvs.openbsd.org 2005/03/02 11:45:01
1580 [ssh.1]
1581 missing word;
1582 - djm@cvs.openbsd.org 2005/03/04 08:48:06
1583 [readconf.c]
1584 fix SendEnv config parsing bug found by Roumen Petrov; ok dtucker@
1585
158620050302
1587 - (djm) OpenBSD CVS sync:
1588 - jmc@cvs.openbsd.org 2005/03/01 14:47:58
1589 [ssh.1]
1590 remove some unneccesary macros;
1591 do not mark up punctuation;
1592 - jmc@cvs.openbsd.org 2005/03/01 14:55:23
1593 [ssh_config.5]
1594 do not mark up punctuation;
1595 whitespace;
1596 - jmc@cvs.openbsd.org 2005/03/01 14:59:49
1597 [sshd.8]
1598 new sentence, new line;
1599 whitespace;
1600 - jmc@cvs.openbsd.org 2005/03/01 15:05:00
1601 [ssh-keygen.1]
1602 whitespace;
1603 - jmc@cvs.openbsd.org 2005/03/01 15:47:14
1604 [ssh-keyscan.1 ssh-keyscan.c]
1605 sort options and sync usage();
1606 - jmc@cvs.openbsd.org 2005/03/01 17:19:35
1607 [scp.1 sftp.1]
1608 add HashKnownHosts to -o list;
1609 ok markus@
1610 - jmc@cvs.openbsd.org 2005/03/01 17:22:06
1611 [ssh.c]
1612 sync usage() w/ man SYNOPSIS;
1613 ok markus@
1614 - jmc@cvs.openbsd.org 2005/03/01 17:32:19
1615 [ssh-add.1]
1616 sort options;
1617 - jmc@cvs.openbsd.org 2005/03/01 18:15:56
1618 [ssh-keygen.1]
1619 sort options (no attempt made at synopsis clean up though);
1620 spelling (occurance -> occurrence);
1621 use prompt before examples;
1622 grammar;
1623 - djm@cvs.openbsd.org 2005/03/02 01:00:06
1624 [sshconnect.c]
1625 fix addition of new hashed hostnames when CheckHostIP=yes;
1626 found and ok dtucker@
1627 - djm@cvs.openbsd.org 2005/03/02 01:27:41
1628 [ssh-keygen.c]
1629 ignore hostnames with metachars when hashing; ok deraadt@
1630 - djm@cvs.openbsd.org 2005/03/02 02:21:07
1631 [ssh.1]
1632 bz#987: mention ForwardX11Trusted in ssh.1,
1633 reported by andrew.benham AT thus.net; ok deraadt@
1634 - (tim) [regress/agent-ptrace.sh] add another possible gdb error.
1635
163620050301
1637 - (djm) OpenBSD CVS sync:
1638 - otto@cvs.openbsd.org 2005/02/16 09:56:44
1639 [ssh.c]
1640 Better diagnostic if an identity file is not accesible. ok markus@ djm@
1641 - djm@cvs.openbsd.org 2005/02/18 03:05:53
1642 [canohost.c]
1643 better error messages for getnameinfo failures; ok dtucker@
1644 - djm@cvs.openbsd.org 2005/02/20 22:59:06
1645 [sftp.c]
1646 turn on ssh batch mode when in sftp batch mode, patch from
1647 jdmossh AT nand.net;
1648 ok markus@
1649 - jmc@cvs.openbsd.org 2005/02/25 10:55:13
1650 [sshd.8]
1651 add /etc/motd and $HOME/.hushlogin to FILES;
1652 from michael knudsen;
1653 - djm@cvs.openbsd.org 2005/02/28 00:54:10
1654 [ssh_config.5]
1655 bz#849: document timeout on untrusted x11 forwarding sessions. Reported by
1656 orion AT cora.nwra.com; ok markus@
1657 - djm@cvs.openbsd.org 2005/03/01 10:09:52
1658 [auth-options.c channels.c channels.h clientloop.c compat.c compat.h]
1659 [misc.c misc.h readconf.c readconf.h servconf.c ssh.1 ssh.c ssh_config.5]
1660 [sshd_config.5]
1661 bz#413: allow optional specification of bind address for port forwardings.
1662 Patch originally by Dan Astorian, but worked on by several people
1663 Adds GatewayPorts=clientspecified option on server to allow remote
1664 forwards to bind to client-specified ports.
1665 - djm@cvs.openbsd.org 2005/03/01 10:40:27
1666 [hostfile.c hostfile.h readconf.c readconf.h ssh.1 ssh_config.5]
1667 [sshconnect.c sshd.8]
1668 add support for hashing host names and addresses added to known_hosts
1669 files, to improve privacy of which hosts user have been visiting; ok
1670 markus@ deraadt@
1671 - djm@cvs.openbsd.org 2005/03/01 10:41:28
1672 [ssh-keyscan.1 ssh-keyscan.c]
1673 option to hash hostnames output by ssh-keyscan; ok markus@ deraadt@
1674 - djm@cvs.openbsd.org 2005/03/01 10:42:49
1675 [ssh-keygen.1 ssh-keygen.c ssh_config.5]
1676 add tools for managing known_hosts files with hashed hostnames, including
1677 hashing existing files and deleting hosts by name; ok markus@ deraadt@
1678
167920050226
1680 - (dtucker) [openbsd-compat/bsd-openpty.c openbsd-compat/inet_ntop.c]
1681 Remove two obsolete Cygwin #ifdefs. Patch from vinschen at redhat.com.
1682 - (dtucker) [acconfig.h configure.ac openbsd-compat/bsd-misc.{c,h}]
1683 Remove SETGROUPS_NOOP, was only used by Cygwin, which doesn't need it any
1684 more. Patch from vinschen at redhat.com.
1685 - (dtucker) [Makefile.in] Add a install-nosysconf target for installing the
1686 binaries without the config files. Primarily useful for packaging.
1687 Patch from phil at usc.edu. ok djm@
1688
168920050224
1690 - (djm) [configure.ac] in_addr_t test needs sys/types.h too
1691
169220050222
1693 - (dtucker) [uidswap.c] Skip uid restore test on Cygwin. Patch from
1694 vinschen at redhat.com.
1695
169620050220
1697 - (dtucker) [LICENCE Makefile.in README.platform audit-bsm.c configure.ac
1698 defines.h] Bug #125: Add *EXPERIMENTAL* BSM audit support. Configure
1699 --with-audit=bsm to enable. Patch originally from Sun Microsystems,
1700 parts by John R. Jackson. ok djm@
1701 - (dtucker) [configure.ac] Missing comma in AIX section, somehow causes
1702 unrelated platforms to be configured incorrectly.
1703
170420050216
1705 - (djm) write seed to temporary file and atomically rename into place;
1706 ok dtucker@
1707 - (dtucker) [ssh-rand-helper.c] Provide seed_rng since it may be called
1708 via mkstemp in some configurations. ok djm@
1709 - (dtucker) [auth-shadow.c] Prevent compiler warnings if "DAY" is defined
1710 by the system headers.
1711 - (dtucker) [configure.ac] Bug #893: check for libresolv early on Reliant
1712 Unix; prevents problems relating to the location of -lresolv in the
1713 link order.
1714 - (dtucker) [session.c] Bug #918: store credentials from gssapi-with-mic
1715 authentication early enough to be available to PAM session modules when
1716 privsep=yes. Patch from deengert at anl.gov, ok'ed in principle by Sam
1717 Hartman and similar to Debian's ssh-krb5 package.
1718 - (dtucker) [configure.ac openbsd-compat/port-aix.{c,h}] Silence some more
1719 compiler warnings on AIX.
1720
172120050215
1722 - (dtucker) [config.sh.in] Collect oslevel -r too.
1723 - (dtucker) [README.platform auth.c configure.ac loginrec.c
1724 openbsd-compat/port-aix.c openbsd-compat/port-aix.h] Bug #835: enable IPv6
1725 on AIX where possible (see README.platform for details) and work around
1726 a misfeature of AIX's getnameinfo. ok djm@
1727 - (dtucker) [loginrec.c] Add missing #include.
1728
172920050211
1730 - (dtucker) [configure.ac] Tidy up configure --help output.
1731 - (dtucker) [openbsd-compat/fake-rfc2553.h] We now need EAI_SYSTEM too.
1732
173320050210
1734 - (dtucker) [configure.ac] Bug #919: Provide visible feedback for the
1735 --disable-etc-default-login configure option.
1736
173720050209
1738 - (dtucker) OpenBSD CVS Sync
1739 - dtucker@cvs.openbsd.org 2005/01/28 09:45:53
1740 [ssh_config]
1741 Make it clear that the example entries in ssh_config are only some of the
1742 commonly-used options and refer the user to ssh_config(5) for more
1743 details; ok djm@
1744 - jmc@cvs.openbsd.org 2005/01/28 15:05:43
1745 [ssh_config.5]
1746 grammar;
1747 - jmc@cvs.openbsd.org 2005/01/28 18:14:09
1748 [ssh_config.5]
1749 wording;
1750 ok markus@
1751 - dtucker@cvs.openbsd.org 2005/01/30 11:18:08
1752 [monitor.c]
1753 Make code match intent; ok djm@
1754 - dtucker@cvs.openbsd.org 2005/02/08 22:24:57
1755 [sshd.c]
1756 Provide reason in error message if getnameinfo fails; ok markus@
1757 - (dtucker) [auth-passwd.c openbsd-compat/port-aix.c] Don't call
1758 disable_forwarding() from compat library. Prevent linker errrors trying
1759 to resolve it for binaries other than sshd. ok djm@
1760 - (dtucker) [configure.ac] Bug #854: prepend pwd to relative --with-ssl-dir
1761 paths. ok djm@
1762 - (dtucker) [configure.ac session.c] Some platforms (eg some SCO) require
1763 the username to be passed to the passwd command when changing expired
1764 passwords. ok djm@
1765
176620050208
1767 - (dtucker) [regress/test-exec.sh] Bug #912: Set _POSIX2_VERSION for the
1768 regress tests so newer versions of GNU head(1) behave themselves. Patch
1769 by djm, so ok me.
1770 - (dtucker) [openbsd-compat/port-aix.c] Silence compiler warnings.
1771 - (dtucker) [audit.c audit.h auth.c auth1.c auth2.c loginrec.c monitor.c
1772 monitor_wrap.c monitor_wrap.h session.c sshd.c]: Prepend all of the audit
1773 defines and enums with SSH_ to prevent namespace collisions on some
1774 platforms (eg AIX).
1775
177620050204
1777 - (dtucker) [monitor.c] Permit INVALID_USER audit events from slave too.
1778 - (dtucker) [auth.c] Fix parens in audit log check.
1779
178020050202
1781 - (dtucker) [configure.ac openbsd-compat/realpath.c] Sync up with realpath
1782 rev 1.11 from OpenBSD and make it use fchdir if available. ok djm@
1783 - (dtucker) [auth.c loginrec.h openbsd-compat/{bsd-cray,port-aix}.{c,h}]
1784 Make record_failed_login() call provide hostname rather than having the
1785 implementations having to do lookups themselves. Only affects AIX and
1786 UNICOS (the latter only uses the "user" parameter anyway). ok djm@
1787 - (dtucker) [session.c sshd.c] Bug #445: Propogate KRB5CCNAME if set to child
1788 the process. Since we also unset KRB5CCNAME at startup, if it's set after
1789 authentication it must have been set by the platform's native auth system.
1790 This was already done for AIX; this enables it for the general case.
1791 - (dtucker) [auth.c canohost.c canohost.h configure.ac defines.h loginrec.c]
1792 Bug #974: Teach sshd to write failed login records to btmp for failed auth
1793 attempts (currently only for password, kbdint and C/R, only on Linux and
1794 HP-UX), based on code from login.c from util-linux. With ashok_kovai at
1795 hotmail.com, ok djm@
1796 - (dtucker) [Makefile.in auth.c auth.h auth1.c auth2.c loginrec.c monitor.c
1797 monitor.h monitor_wrap.c monitor_wrap.h session.c sshd.c] Bug #125:
1798 (first stage) Add audit instrumentation to sshd, currently disabled by
1799 default. with suggestions from and ok djm@
1800
180120050201
1802 - (dtucker) [log.c] Bug #973: force log_init() to open syslog, since on some
1803 platforms syslog will revert to its default values. This may result in
1804 messages from external libraries (eg libwrap) being sent to a different
1805 facility.
1806 - (dtucker) [sshd_config.5] Bug #701: remove warning about
1807 keyboard-interactive since this is no longer the case.
1808
180920050124
1810 - (dtucker) OpenBSD CVS Sync
1811 - otto@cvs.openbsd.org 2005/01/21 08:32:02
1812 [auth-passwd.c sshd.c]
1813 Warn in advance for password and account expiry; initialize loginmsg
1814 buffer earlier and clear it after privsep fork. ok and help dtucker@
1815 markus@
1816 - dtucker@cvs.openbsd.org 2005/01/22 08:17:59
1817 [auth.c]
1818 Log source of connections denied by AllowUsers, DenyUsers, AllowGroups and
1819 DenyGroups. bz #909, ok djm@
1820 - djm@cvs.openbsd.org 2005/01/23 10:18:12
1821 [cipher.c]
1822 config option "Ciphers" should be case-sensitive; ok dtucker@
1823 - dtucker@cvs.openbsd.org 2005/01/24 10:22:06
1824 [scp.c sftp.c]
1825 Have scp and sftp wait for the spawned ssh to exit before they exit
1826 themselves. This prevents ssh from being unable to restore terminal
1827 modes (not normally a problem on OpenBSD but common with -Portable
1828 on POSIX platforms). From peak at argo.troja.mff.cuni.cz (bz#950);
1829 ok djm@ markus@
1830 - dtucker@cvs.openbsd.org 2005/01/24 10:29:06
1831 [moduli]
1832 Import new moduli; requested by deraadt@ a week ago
1833 - dtucker@cvs.openbsd.org 2005/01/24 11:47:13
1834 [auth-passwd.c]
1835 #if -> #ifdef so builds without HAVE_LOGIN_CAP work too; ok djm@ otto@
1836
183720050120
1838 - (dtucker) OpenBSD CVS Sync
1839 - markus@cvs.openbsd.org 2004/12/23 17:35:48
1840 [session.c]
1841 check for NULL; from mpech
1842 - markus@cvs.openbsd.org 2004/12/23 17:38:07
1843 [ssh-keygen.c]
1844 leak; from mpech
1845 - djm@cvs.openbsd.org 2004/12/23 23:11:00
1846 [servconf.c servconf.h sshd.c sshd_config sshd_config.5]
1847 bz #898: support AddressFamily in sshd_config. from
1848 peak@argo.troja.mff.cuni.cz; ok deraadt@
1849 - markus@cvs.openbsd.org 2005/01/05 08:51:32
1850 [sshconnect.c]
1851 remove dead code, log connect() failures with level error, ok djm@
1852 - jmc@cvs.openbsd.org 2005/01/08 00:41:19
1853 [sshd_config.5]
1854 `login'(n) -> `log in'(v);
1855 - dtucker@cvs.openbsd.org 2005/01/17 03:25:46
1856 [moduli.c]
1857 Correct spelling: SCHNOOR->SCHNORR; ok djm@
1858 - dtucker@cvs.openbsd.org 2005/01/17 22:48:39
1859 [sshd.c]
1860 Make debugging output continue after reexec; ok djm@
1861 - dtucker@cvs.openbsd.org 2005/01/19 13:11:47
1862 [auth-bsdauth.c auth2-chall.c]
1863 Have keyboard-interactive code call the drivers even for responses for
1864 invalid logins. This allows the drivers themselves to decide how to
1865 handle them and prevent leaking information where possible. Existing
1866 behaviour for bsdauth is maintained by checking authctxt->valid in the
1867 bsdauth driver. Note that any third-party kbdint drivers will now need
1868 to be able to handle responses for invalid logins. ok markus@
1869 - djm@cvs.openbsd.org 2004/12/22 02:13:19
1870 [cipher-ctr.c cipher.c]
1871 remove fallback AES support for old OpenSSL, as OpenBSD has had it for
1872 many years now; ok deraadt@
1873 (Id sync only: Portable will continue to support older OpenSSLs)
1874 - (dtucker) [auth-pam.c] Bug #971: Prevent leaking information about user
1875 existence via keyboard-interactive/pam, in conjunction with previous
1876 auth2-chall.c change; with Colin Watson and djm.
1877 - (dtucker) [loginrec.h] Bug #952: Increase size of username field to 128
1878 bytes to prevent errors from login_init_entry() when the username is
1879 exactly 64 bytes(!) long. From brhamon at cisco.com, ok djm@
1880 - (dtucker) [auth-chall.c auth.h auth2-chall.c] Bug #936: Remove pam from
1881 the list of available kbdint devices if UsePAM=no. ok djm@
1882
188320050118
1884 - (dtucker) [INSTALL Makefile.in configure.ac survey.sh.in] Implement
1885 "make survey" and "make send-survey". This will provide data on the
1886 configure parameters, platform and platform features to the development
1887 team, which will allow (among other things) better targetting of testing.
1888 It's entirely voluntary and is off be default. ok djm@
1889 - (dtucker) [survey.sh.in] Remove any blank lines from the output of
1890 ccver-v and ccver-V.
1891
189220041220
1893 - (dtucker) [ssh-rand-helper.c] Fall back to command-based seeding if reading
1894 from prngd is enabled at compile time but fails at run time, eg because
1895 prngd is not running. Note that if you have prngd running when OpenSSH is
1896 built, OpenSSL will consider itself internally seeded and rand-helper won't
1897 be built at all unless explicitly enabled via --with-rand-helper. ok djm@
1898 - (dtucker) [regress/rekey.sh] Touch datafile before filling with dd, since
1899 on some wacky platforms (eg old AIXes), dd will refuse to create an output
1900 file if it doesn't exist.
1901
190220041213
1903 - (dtucker) [contrib/findssh.sh] Clean up on interrupt; from
1904 amarendra.godbole at ge com.
1905
190620041211
1907 - (dtucker) OpenBSD CVS Sync
1908 - markus@cvs.openbsd.org 2004/12/06 16:00:43
1909 [bufaux.c]
1910 use 0x00 not \0 since buf[] is a bignum
1911 - fgsch@cvs.openbsd.org 2004/12/10 03:10:42
1912 [sftp.c]
1913 - fix globbed ls for paths the same lenght as the globbed path when
1914 we have a unique matching.
1915 - fix globbed ls in case of a directory when we have a unique matching.
1916 - as a side effect, if the path does not exist error (used to silently
1917 ignore).
1918 - don't do extra do_lstat() if we only have one matching file.
1919 djm@ ok
1920 - dtucker@cvs.openbsd.org 2004/12/11 01:48:56
1921 [auth-rsa.c auth2-pubkey.c authfile.c misc.c misc.h]
1922 Fix debug call in error path of authorized_keys processing and fix related
1923 warnings; ok djm@
1924
192520041208
1926 - (tim) [configure.ac] Comment some non obvious platforms in the
1927 target-specific case statement. Suggested and OK by dtucker@
1928
192920041207
1930 - (dtucker) [regress/scp.sh] Use portable-friendly $DIFFOPTs in new test.
1931
193220041206
1933 - (dtucker) [TODO WARNING.RNG] Update to reflect current reality. ok djm@
1934 - (dtucker) OpenBSD CVS Sync
1935 - markus@cvs.openbsd.org 2004/11/25 22:22:14
1936 [sftp-client.c sftp.c]
1937 leak; from mpech
1938 - jmc@cvs.openbsd.org 2004/11/29 00:05:17
1939 [sftp.1]
1940 missing full stop;
1941 - djm@cvs.openbsd.org 2004/11/29 07:41:24
1942 [sftp-client.h sftp.c]
1943 Some small fixes from moritz@jodeit.org. ok deraadt@
1944 - jaredy@cvs.openbsd.org 2004/12/05 23:55:07
1945 [sftp.1]
1946 - explain that patterns can be used as arguments in get/put/ls/etc
1947 commands (prodded by Michael Knudsen)
1948 - describe ls flags as a list
1949 - other minor improvements
1950 ok jmc, djm
1951 - dtucker@cvs.openbsd.org 2004/12/06 11:41:03
1952 [auth-rsa.c auth2-pubkey.c authfile.c misc.c misc.h ssh.h sshd.8]
1953 Discard over-length authorized_keys entries rather than complaining when
1954 they don't decode. bz #884, with & ok djm@
1955 - (dtucker) OpenBSD CVS Sync (regress/)
1956 - djm@cvs.openbsd.org 2004/06/26 06:16:07
1957 [reexec.sh]
1958 don't change the name of the copied sshd for the reexec fallback test,
1959 makes life simpler for portable
1960 - dtucker@cvs.openbsd.org 2004/07/08 12:59:35
1961 [scp.sh]
1962 Regress test for bz #863 (scp double-error), requires $SUDO. ok markus@
1963 - david@cvs.openbsd.org 2004/07/09 19:45:43
1964 [Makefile]
1965 add a missing CLEANFILES used in the re-exec test
1966 - djm@cvs.openbsd.org 2004/10/08 02:01:50
1967 [reexec.sh]
1968 shrink and tidy; ok dtucker@
1969 - djm@cvs.openbsd.org 2004/10/29 23:59:22
1970 [Makefile added brokenkeys.sh]
1971 regression test for handling of corrupt keys in authorized_keys file
1972 - djm@cvs.openbsd.org 2004/11/07 00:32:41
1973 [multiplex.sh]
1974 regression tests for new multiplex commands
1975 - dtucker@cvs.openbsd.org 2004/11/25 09:39:27
1976 [test-exec.sh]
1977 Remove obsolete RhostsAuthentication from test config; ok markus@
1978 - dtucker@cvs.openbsd.org 2004/12/06 10:49:56
1979 [test-exec.sh]
1980 Check if TEST_SSH_SSHD is a full path to sshd before searching; ok markus@
1981
198220041203
1983 - (dtucker) OpenBSD CVS Sync
1984 - jmc@cvs.openbsd.org 2004/11/07 17:42:36
1985 [ssh.1]
1986 options sort, and whitespace;
1987 - jmc@cvs.openbsd.org 2004/11/07 17:57:30
1988 [ssh.c]
1989 usage():
1990 - add -O
1991 - sync -S w/ manpage
1992 - remove -h
1993 - (dtucker) [auth1.c auth2.c] If the user successfully authenticates but is
1994 subsequently denied by the PAM auth stack, send the PAM message to the
1995 user via packet_disconnect (Protocol 1) or userauth_banner (Protocol 2).
1996 ok djm@
1997
199820041107
1999 - (dtucker) OpenBSD CVS Sync
2000 - djm@cvs.openbsd.org 2004/11/05 12:19:56
2001 [sftp.c]
2002 command editing and history support via libedit; ok markus@
2003 thanks to hshoexer@ and many testers on tech@ too
2004 - djm@cvs.openbsd.org 2004/11/07 00:01:46
2005 [clientloop.c clientloop.h ssh.1 ssh.c]
2006 add basic control of a running multiplex master connection; including the
2007 ability to check its status and request it to exit; ok markus@
2008 - (dtucker) [INSTALL Makefile.in configure.ac] Add --with-libedit configure
2009 option and supporting makefile bits and documentation.
2010
201120041105
2012 - (dtucker) OpenBSD CVS Sync
2013 - markus@cvs.openbsd.org 2004/08/30 09:18:08
2014 [LICENCE]
2015 s/keygen/keyscan/
2016 - jmc@cvs.openbsd.org 2004/08/30 21:22:49
2017 [ssh-add.1 ssh.1]
2018 .Xsession -> .xsession;
2019 originally from a pr from f at obiit dot org, but missed by myself;
2020 ok markus@ matthieu@
2021 - djm@cvs.openbsd.org 2004/09/07 23:41:30
2022 [clientloop.c ssh.c]
2023 cleanup multiplex control socket on SIGHUP too, spotted by sturm@
2024 ok markus@ deraadt@
2025 - deraadt@cvs.openbsd.org 2004/09/15 00:46:01
2026 [ssh.c]
2027 /* fallthrough */ is something a programmer understands. But
2028 /* FALLTHROUGH */ is also understood by lint, so that is better.
2029 - jaredy@cvs.openbsd.org 2004/09/15 03:25:41
2030 [sshd_config.5]
2031 mention PrintLastLog only prints last login time for interactive
2032 sessions, like PrintMotd mentions.
2033 From Michael Knudsen, with wording changed slightly to match the
2034 PrintMotd description.
2035 ok djm
2036 - mickey@cvs.openbsd.org 2004/09/15 18:42:27
2037 [sshd.c]
2038 use less doubles in daemons; markus@ ok
2039 - deraadt@cvs.openbsd.org 2004/09/15 18:46:04
2040 [scp.c]
2041 scratch that do { } while (0) wrapper in this case
2042 - djm@cvs.openbsd.org 2004/09/23 13:00:04
2043 [ssh.c]
2044 correctly honour -n in multiplex client mode; spotted by sturm@ ok markus@
2045 - djm@cvs.openbsd.org 2004/09/25 03:45:14
2046 [sshd.c]
2047 these printf args are no longer double; ok deraadt@ markus@
2048 - djm@cvs.openbsd.org 2004/10/07 10:10:24
2049 [scp.1 sftp.1 ssh.1 ssh_config.5]
2050 document KbdInteractiveDevices; ok markus@
2051 - djm@cvs.openbsd.org 2004/10/07 10:12:36
2052 [ssh-agent.c]
2053 don't unlink agent socket when bind() fails, spotted by rich AT
2054 rich-paul.net, ok markus@
2055 - markus@cvs.openbsd.org 2004/10/20 11:48:53
2056 [packet.c ssh1.h]
2057 disconnect for invalid (out of range) message types.
2058 - djm@cvs.openbsd.org 2004/10/29 21:47:15
2059 [channels.c channels.h clientloop.c]
2060 fix some window size change bugs for multiplexed connections: windows sizes
2061 were not being updated if they had changed after ~^Z suspends and SIGWINCH
2062 was not being processed unless the first connection had requested a tty;
2063 ok markus
2064 - djm@cvs.openbsd.org 2004/10/29 22:53:56
2065 [clientloop.c misc.h readpass.c ssh-agent.c]
2066 factor out common permission-asking code to separate function; ok markus@
2067 - djm@cvs.openbsd.org 2004/10/29 23:56:17
2068 [bufaux.c bufaux.h buffer.c buffer.h]
2069 introduce a new buffer API that returns an error rather than fatal()ing
2070 when presented with bad data; ok markus@
2071 - djm@cvs.openbsd.org 2004/10/29 23:57:05
2072 [key.c]
2073 use new buffer API to avoid fatal errors on corrupt keys in authorized_keys
2074 files; ok markus@
2075
207620041102
2077 - (dtucker) [configure.ac includes.h] Bug #947: Fix compile error on HP-UX
2078 10.x by testing for conflicts in shadow.h and undef'ing _INCLUDE__STDC__
2079 only if a conflict is detected.
2080
208120041019
2082 - (dtucker) [uidswap.c] Don't test dropping of gids for the root user or
2083 on Cygwin. Cygwin parts from vinschen at redhat com; ok djm@
2084
208520041016
2086 - (djm) [auth-pam.c] snprintf->strl*, fix server message length calculations;
2087 ok dtucker@
2088
208920041006
2090 - (dtucker) [README.privsep] Bug #939: update info about HP-UX Trusted Mode
2091 and other PAM platforms.
2092 - (dtucker) [monitor_mm.c openbsd-compat/xmmap.c] Bug #940: cast constants
2093 to void * to appease picky compilers (eg Tru64's "cc -std1").
2094
209520040930
2096 - (dtucker) [configure.ac] Set AC_PACKAGE_NAME. ok djm@
2097
209820040923
2099 - (dtucker) [openbsd-compat/bsd-snprintf.c] Previous change was off by one,
2100 which could have caused the justification to be wrong. ok djm@
2101
210220040921
2103 - (dtucker) [openbsd-compat/bsd-snprintf.c] Check for max length too.
2104 ok djm@
2105 - (dtucker) [contrib/cygwin/ssh-host-config] Update to match current Cygwin
2106 install process. Patch from vinschen at redhat.com.
2107
210820040912
2109 - (djm) [loginrec.c] Start KNF and tidy up of this long-neglected file.
2110 No change in resultant binary
2111 - (djm) [loginrec.c] __func__ifiy
2112 - (djm) [loginrec.c] xmalloc
2113 - (djm) [ssh.c sshd.c version.h] Don't divulge portable version in protocol
2114 banner. Suggested by deraadt@, ok mouring@, dtucker@
2115 - (dtucker) [configure.ac] Fix incorrect quoting and tests for cross-compile.
2116 Partly by & ok djm@.
2117
211820040911
2119 - (djm) [ssh-agent.c] unifdef some cygwin code; ok dtucker@
2120 - (dtucker) [auth-pam.c auth-pam.h session.c] Bug #890: Send output from
2121 failing PAM session modules to user then exit, similar to the way
2122 /etc/nologin is handled. ok djm@
2123 - (dtucker) [auth-pam.c] Relocate sshpam_store_conv(), no code change.
2124 - (djm) [auth2-kbdint.c auth2-none.c auth2-passwd.c auth2-pubkey.c]
2125 Make cygwin code more consistent with that which surrounds it
2126 - (dtucker) [auth-pam.c auth.h auth2-none.c auth2.c monitor.c monitor_wrap.c]
2127 Bug #892: Send messages from failing PAM account modules to the client via
2128 SSH2_MSG_USERAUTH_BANNER messages. Note that this will not happen with
2129 SSH2 kbdint authentication, which need to be dealt with separately. ok djm@
2130 - (dtucker) [session.c] Bug #927: make .hushlogin silent again. ok djm@
2131 - (dtucker) [configure.ac] Bug #321: Add cross-compile support to configure.
2132 Parts by chua at ayrnetworks.com, astrand at lysator.liu.se and me. ok djm@
2133 - (dtucker) [auth-krb5.c] Bug #922: Pass KRB5CCNAME to PAM. From deengert
2134 at anl.gov, ok djm@
2135
213620040830
2137 - (dtucker) [session.c openbsd-compat/bsd-cygwin_util.{c,h}] Bug #915: only
2138 copy required environment variables on Cygwin. Patch from vinschen at
2139 redhat.com, ok djm@
2140 - (dtucker) [regress/Makefile] Clean scp-ssh-wrapper.scp too. Patch from
2141 vinschen at redhat.com.
2142 - (dtucker) [Makefile.in contrib/ssh-copy-id] Bug #894: Improve portability
2143 of shell constructs. Patch from cjwatson at debian.org.
2144
214520040829
2146 - (dtucker) [openbsd-compat/getrrsetbyname.c] Prevent getrrsetbyname from
2147 failing with NOMEMORY if no sigs are returned and malloc(0) returns NULL.
2148 From Martin.Kraemer at Fujitsu-Siemens.com; ok djm@
2149 - (dtucker) OpenBSD CVS Sync
2150 - djm@cvs.openbsd.org 2004/08/23 11:48:09
2151 [authfile.c]
2152 fix error path, spotted by Martin.Kraemer AT Fujitsu-Siemens.com; ok markus
2153 - djm@cvs.openbsd.org 2004/08/23 11:48:47
2154 [channels.c]
2155 typo, spotted by Martin.Kraemer AT Fujitsu-Siemens.com; ok markus
2156 - dtucker@cvs.openbsd.org 2004/08/23 14:26:38
2157 [ssh-keysign.c ssh.c]
2158 Use permanently_set_uid() in ssh and ssh-keysign for consistency, matches
2159 change in Portable; ok markus@ (CVS ID sync only)
2160 - dtucker@cvs.openbsd.org 2004/08/23 14:29:23
2161 [ssh-keysign.c]
2162 Remove duplicate getuid(), suggested by & ok markus@
2163 - markus@cvs.openbsd.org 2004/08/26 16:00:55
2164 [ssh.1 sshd.8]
2165 get rid of references to rhosts authentication; with jmc@
2166 - djm@cvs.openbsd.org 2004/08/28 01:01:48
2167 [sshd.c]
2168 don't erroneously close stdin for !reexec case, from Dave Johnson;
2169 ok markus@
2170 - (dtucker) [configure.ac] Include sys/stream.h in sys/ptms.h header check,
2171 fixes configure warning on Solaris reported by wknox at mitre.org.
2172 - (dtucker) [regress/multiplex.sh] Skip test on platforms that do not
2173 support FD passing since multiplex requires it. Noted by tim@
2174 - (dtucker) [regress/dynamic-forward.sh] Allow time for connections to be torn
2175 down, needed on some platforms, should be harmless on others. Patch from
2176 jason at devrandom.org.
2177 - (dtucker) [regress/scp.sh] Make this work on Cygwin too, which doesn't like
2178 files ending in .exe that aren't binaries; patch from vinschen at redhat.com.
2179 - (dtucker) [Makefile.in] Get regress/Makefile symlink right for out-of-tree
2180 builds too, from vinschen at redhat.com.
2181 - (dtucker) [regress/agent-ptrace.sh] Skip ptrace test on OSF1/DUnix/Tru64
2182 too; patch from cmadams at hiwaay.net.
2183 - (dtucker) [configure.ac] Replace non-portable echo \n with extra echo.
2184 - (dtucker) [openbsd-compat/port-aix.c] Bug #712: Explicitly check for
2185 accounts with authentication configs that sshd can't support (ie
2186 SYSTEM=NONE and AUTH1=something).
2187
218820040828
2189 - (dtucker) [openbsd-compat/mktemp.c] Remove superfluous Cygwin #ifdef; from
2190 vinschen at redhat.com.
2191
219220040823
2193 - (djm) [ssh-rand-helper.c] Typo. Found by
2194 Martin.Kraemer AT Fujitsu-Siemens.com
2195 - (djm) [loginrec.c] Typo and bad args in error messages; Spotted by
2196 Martin.Kraemer AT Fujitsu-Siemens.com
2197
219820040817
2199 - (dtucker) [regress/README.regress] Note compatibility issues with GNU head.
2200 - (djm) OpenBSD CVS Sync
2201 - markus@cvs.openbsd.org 2004/08/16 08:17:01
2202 [version.h]
2203 3.9
2204 - (djm) Crank RPM spec version numbers
2205 - (djm) Release 3.9p1
2206
220720040816
2208 - (dtucker) [acconfig.h auth-pam.c configure.ac] Set real uid to non-root
2209 to convince Solaris PAM to honour password complexity rules. ok djm@
2210
221120040815
2212 - (dtucker) [Makefile.in ssh-keysign.c ssh.c] Use permanently_set_uid() since
2213 it does the right thing on all platforms. ok djm@
2214 - (djm) [acconfig.h configure.ac openbsd-compat/Makefile.in
2215 openbsd-compat/bsd-closefrom.c openbsd-compat/bsd-misc.c
2216 openbsd-compat/bsd-misc.h openbsd-compat/openbsd-compat.h] Use smarter
2217 closefrom() replacement from sudo; ok dtucker@
2218 - (djm) [loginrec.c] Check that seek succeeded here too; ok dtucker
2219 - (dtucker) [Makefile.in] Fix typo.
2220
222120040814
2222 - (dtucker) [auth-krb5.c gss-serv-krb5.c openbsd-compat/xmmap.c]
2223 Explicitly set umask for mkstemp; ok djm@
2224 - (dtucker) [includes.h] Undef _INCLUDE__STDC__ on HP-UX, otherwise
2225 prot.h and shadow.h provide conflicting declarations of getspnam. ok djm@
2226 - (dtucker) [loginrec.c openbsd-compat/port-aix.c openbsd-compat/port-aix.h]
2227 Plug AIX login recording into login_write so logins will be recorded for
2228 all auth types.
2229
223020040813
2231 - (dtucker) [openbsd-compat/bsd-misc.c] Typo in #ifdef; from vinschen at
2232 redhat.com
2233- (dtucker) OpenBSD CVS Sync
2234 - avsm@cvs.openbsd.org 2004/08/11 21:43:05
2235 [channels.c channels.h clientloop.c misc.c misc.h serverloop.c ssh-agent.c]
2236 some signed/unsigned int comparison cleanups; markus@ ok
2237 - avsm@cvs.openbsd.org 2004/08/11 21:44:32
2238 [authfd.c scp.c ssh-keyscan.c]
2239 use atomicio instead of homegrown equivalents or read/write.
2240 markus@ ok
2241 - djm@cvs.openbsd.org 2004/08/12 09:18:24
2242 [sshlogin.c]
2243 typo in error message, spotted by moritz AT jodeit.org (Id sync only)
2244 - jakob@cvs.openbsd.org 2004/08/12 21:41:13
2245 [ssh-keygen.1 ssh.1]
2246 improve SSHFP documentation; ok deraadt@
2247 - jmc@cvs.openbsd.org 2004/08/13 00:01:43
2248 [ssh-keygen.1]
2249 kill whitespace at eol;
2250 - djm@cvs.openbsd.org 2004/08/13 02:51:48
2251 [monitor_fdpass.c]
2252 extra check for no message case; ok markus, deraadt, hshoexer, henning
2253 - dtucker@cvs.openbsd.org 2004/08/13 11:09:24
2254 [servconf.c]
2255 Fix line numbers off-by-one in error messages, from tortay at cc.in2p3.fr
2256 ok markus@, djm@
2257
225820040812
2259 - (dtucker) [sshd.c] Remove duplicate variable imported during sync.
2260 - (dtucker) OpenBSD CVS Sync
2261 - markus@cvs.openbsd.org 2004/07/28 08:56:22
2262 [sshd.c]
2263 call setsid() _before_ re-exec
2264 - markus@cvs.openbsd.org 2004/07/28 09:40:29
2265 [auth.c auth1.c auth2.c cipher.c cipher.h key.c session.c ssh.c
2266 sshconnect1.c]
2267 more s/illegal/invalid/
2268 - djm@cvs.openbsd.org 2004/08/04 10:37:52
2269 [dh.c]
2270 return group14 when no primes found - fixes hang on empty /etc/moduli;
2271 ok markus@
2272 - dtucker@cvs.openbsd.org 2004/08/11 11:09:54
2273 [servconf.c]
2274 Fix minor leak; "looks right" deraadt@
2275 - dtucker@cvs.openbsd.org 2004/08/11 11:50:09
2276 [sshd.c]
2277 Don't try to close startup_pipe if it's not open; ok djm@
2278 - djm@cvs.openbsd.org 2004/08/11 11:59:22
2279 [sshlogin.c]
2280 check that lseek went were we told it to; ok markus@
2281 (Id sync only, but similar changes are needed in loginrec.c)
2282 - djm@cvs.openbsd.org 2004/08/11 12:01:16
2283 [sshlogin.c]
2284 make store_lastlog_message() static to appease -Wall; ok markus
2285 - (dtucker) [sshd.c] Clear loginmsg in postauth monitor, prevents doubling
2286 messages generated before the postauth privsep split.
2287
228820040720
2289 - (djm) OpenBSD CVS Sync
2290 - markus@cvs.openbsd.org 2004/07/21 08:56:12
2291 [auth.c]
2292 s/Illegal user/Invalid user/; many requests; ok djm, millert, niklas,
2293 miod, ...
2294 - djm@cvs.openbsd.org 2004/07/21 10:33:31
2295 [auth1.c auth2.c]
2296 bz#899: Don't display invalid usernames in setproctitle
2297 from peak AT argo.troja.mff.cuni.cz; ok markus@
2298 - djm@cvs.openbsd.org 2004/07/21 10:36:23
2299 [gss-serv-krb5.c]
2300 fix function declaration
2301 - djm@cvs.openbsd.org 2004/07/21 11:51:29
2302 [canohost.c]
2303 bz#902: cache remote port so we don't fatal() in auth_log when remote
2304 connection goes away quickly. from peak AT argo.troja.mff.cuni.cz;
2305 ok markus@
2306 - (djm) [auth-pam.c] Portable parts of bz#899: Don't display invalid
2307 usernames in setproctitle from peak AT argo.troja.mff.cuni.cz;
2308
230920040720
2310 - (djm) [log.c] bz #111: Escape more control characters when sending data
2311 to syslog; from peak AT argo.troja.mff.cuni.cz
2312 - (djm) [contrib/redhat/sshd.pam] bz #903: Remove redundant entries; from
2313 peak AT argo.troja.mff.cuni.cz
2314 - (djm) [regress/README.regress] Remove caveat regarding TCP wrappers, now
2315 that sshd is fixed to behave better; suggested by tim
2316
231720040719
2318 - (djm) [openbsd-compat/bsd-arc4random.c] Discard early keystream, like OpenBSD
2319 ok dtucker@
2320 - (djm) [auth-pam.c] Avoid use of xstrdup and friends in conversation function,
2321 instead return PAM_CONV_ERR, avoiding another path to fatal(); ok dtucker@
2322 - (tim) [configure.ac] updwtmpx() on OpenServer seems to add duplicate entry.
2323 Report by rac AT tenzing.org
2324
232520040717
2326 - (dtucker) [logintest.c scp.c sftp-server.c sftp.c ssh-add.c ssh-agent.c
2327 ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-rand-helper.c ssh.c sshd.c
2328 openbsd-compat/bsd-misc.c] Move "char *__progname" to bsd-misc.c. Reduces
2329 diff vs OpenBSD; ok mouring@, tested by tim@ too.
2330 - (dtucker) OpenBSD CVS Sync
2331 - deraadt@cvs.openbsd.org 2004/07/11 17:48:47
2332 [channels.c cipher.c clientloop.c clientloop.h compat.h moduli.c
2333 readconf.c nchan.c pathnames.h progressmeter.c readconf.h servconf.c
2334 session.c sftp-client.c sftp.c ssh-agent.1 ssh-keygen.c ssh.c ssh1.h
2335 sshd.c ttymodes.h]
2336 spaces
2337 - brad@cvs.openbsd.org 2004/07/12 23:34:25
2338 [ssh-keyscan.1]
2339 Fix incorrect macro, .I -> .Em
2340 From: Eric S. Raymond <esr at thyrsus dot com>
2341 ok jmc@
2342 - dtucker@cvs.openbsd.org 2004/07/17 05:31:41
2343 [monitor.c monitor_wrap.c session.c session.h sshd.c sshlogin.c]
2344 Move "Last logged in at.." message generation to the monitor, right
2345 before recording the new login. Fixes missing lastlog message when
2346 /var/log/lastlog is not world-readable and incorrect datestamp when
2347 multiple sessions are used (bz #463); much assistance & ok markus@
2348
234920040711
2350 - (dtucker) [auth-pam.c] Check for zero from waitpid() too, which allows
2351 the monitor to properly clean up the PAM thread (Debian bug #252676).
2352
235320040709
2354 - (tim) [contrib/cygwin/README] add minires-devel requirement. Patch from
2355 vinschen AT redhat.com
2356
235720040708
2358 - (dtucker) OpenBSD CVS Sync
2359 - dtucker@cvs.openbsd.org 2004/07/03 05:11:33
2360 [sshlogin.c] (RCSID sync only, the corresponding code is not in Portable)
2361 Use '\0' not 0 for string; ok djm@, deraadt@
2362 - dtucker@cvs.openbsd.org 2004/07/03 11:02:25
2363 [monitor_wrap.c]
2364 Put s/key functions inside #ifdef SKEY same as monitor.c,
2365 from des@freebsd via bz #330, ok markus@
2366 - dtucker@cvs.openbsd.org 2004/07/08 12:47:21
2367 [scp.c]
2368 Prevent scp from skipping the file following a double-error.
2369 bz #863, ok markus@
2370
237120040702
2372 - (dtucker) [mdoc2man.awk] Teach it to ignore .Bk -words, reported by
2373 strube at physik3.gwdg.de a long time ago.
2374
237520040701
2376 - (dtucker) [session.c] Call display_loginmsg again after do_pam_session.
2377 Ensures messages from PAM modules are displayed when privsep=no.
2378 - (dtucker) [auth-pam.c] Bug #705: Make arguments match PAM specs, fixes
2379 warnings on compliant platforms. From paul.a.bolton at bt.com. ok djm@
2380 - (dtucker) [auth-pam.c] Bug #559 (last piece): Pass DISALLOW_NULL_AUTHTOK
2381 to pam_authenticate for challenge-response auth too. Originally from
2382 fcusack at fcusack.com, ok djm@
2383 - (tim) [buildpkg.sh.in] Add $REV to bump the package revision within
2384 the same version. Handle the case where someone uses --with-privsep-user=
2385 and the user name does not match the group name. ok dtucker@
2386
238720040630
2388 - (dtucker) [auth-pam.c] Check for buggy PAM modules that return a NULL
2389 appdata_ptr to the conversation function. ok djm@
2390 - (djm) OpenBSD CVS Sync
2391 - jmc@cvs.openbsd.org 2004/06/26 09:03:21
2392 [ssh.1]
2393 - remove double word
2394 - rearrange .Bk to keep SYNOPSIS nice
2395 - -M before -m in options description
2396 - jmc@cvs.openbsd.org 2004/06/26 09:11:14
2397 [ssh_config.5]
2398 punctuation and grammar fixes. also, keep the options in order.
2399 - jmc@cvs.openbsd.org 2004/06/26 09:14:40
2400 [sshd_config.5]
2401 new sentence, new line;
2402 - avsm@cvs.openbsd.org 2004/06/26 20:07:16
2403 [sshd.c]
2404 initialise some fd variables to -1, djm@ ok
2405 - djm@cvs.openbsd.org 2004/06/30 08:36:59
2406 [session.c]
2407 unbreak TTY break, diagnosed by darren AT dazwin.com; ok markus@
2408
240920040627
2410 - (tim) update README files.
2411 - (dtucker) [mdoc2man.awk] Bug #883: correctly recognise .Pa and .Ev macros.
2412 - (dtucker) [regress/README.regress] Document new variables.
2413 - (dtucker) [acconfig.h configure.ac sftp-server.c] Bug #823: add sftp
2414 rename handling for Linux which returns EPERM for link() on (at least some)
2415 filesystems that do not support hard links. sftp-server will fall back to
2416 stat+rename() in such cases.
2417 - (dtucker) [openbsd-compat/port-aix.c] Missing __func__.
2418
241920040626
2420 - (djm) OpenBSD CVS Sync
2421 - djm@cvs.openbsd.org 2004/06/25 18:43:36
2422 [sshd.c]
2423 fix broken fd handling in the re-exec fallback path, particularly when
2424 /dev/crypto is in use; ok deraadt@ markus@
2425 - djm@cvs.openbsd.org 2004/06/25 23:21:38
2426 [sftp.c]
2427 bz #875: fix bad escape char error message; reported by f_mohr AT yahoo.de
2428
242920040625
2430 - (dtucker) OpenBSD CVS Sync
2431 - djm@cvs.openbsd.org 2004/06/24 19:30:54
2432 [servconf.c servconf.h sshd.c]
2433 re-exec sshd on accept(); initial work, final debugging and ok markus@
2434 - djm@cvs.openbsd.org 2004/06/25 01:16:09
2435 [sshd.c]
2436 only perform tcp wrappers checks when the incoming connection is on a
2437 socket. silences useless warnings from regress tests that use
2438 proxycommand="sshd -i". prompted by david@ ok markus@
2439 - djm@cvs.openbsd.org 2004/06/24 19:32:00
2440 [regress/Makefile regress/test-exec.sh, added regress/reexec.sh]
2441 regress test for re-exec corner cases
2442 - djm@cvs.openbsd.org 2004/06/25 01:25:12
2443 [regress/test-exec.sh]
2444 clean reexec-specific junk out of text-exec.sh and simplify; idea markus@
2445 - dtucker@cvs.openbsd.org 2004/06/25 05:38:48
2446 [sftp-server.c]
2447 Fall back to stat+rename if filesystem doesn't doesn't support hard
2448 links. bz#823, ok djm@
2449 - (dtucker) [configure.ac openbsd-compat/misc.c [openbsd-compat/misc.h]
2450 Add closefrom() for platforms that don't have it.
2451 - (dtucker) [sshd.c] add line missing from reexec sync.
2452
245320040623
2454 - (dtucker) [auth1.c] Ensure do_pam_account is called for Protocol 1
2455 connections with empty passwords. Patch from davidwu at nbttech.com,
2456 ok djm@
2457 - (dtucker) OpenBSD CVS Sync
2458 - dtucker@cvs.openbsd.org 2004/06/22 22:42:02
2459 [regress/envpass.sh]
2460 Add quoting for test -z; ok markus@
2461 - dtucker@cvs.openbsd.org 2004/06/22 22:45:52
2462 [regress/test-exec.sh]
2463 Add TEST_SSH_SSHD_CONFOPTS and TEST_SSH_SSH_CONFOPTS to allow adding
2464 arbitary options to sshd_config and ssh_config during tests. ok markus@
2465 - dtucker@cvs.openbsd.org 2004/06/22 22:55:56
2466 [regress/dynamic-forward.sh regress/test-exec.sh]
2467 Allow setting of port for regress from TEST_SSH_PORT variable; ok markus@
2468 - mouring@cvs.openbsd.org 2004/06/23 00:39:38
2469 [rijndael.c]
2470 -Wshadow fix up s/encrypt/do_encrypt/. OK djm@, markus@
2471 - dtucker@cvs.openbsd.org 2004/06/23 14:31:01
2472 [ssh.c]
2473 Fix counting in master/slave when passing environment variables; ok djm@
2474 - (dtucker) [cipher.c] encrypt->do_encrypt inside SSH_OLD_EVP to match
2475 -Wshadow change.
2476 - (bal) [Makefile.in] Remove opensshd.init on 'make distclean'
2477 - (dtucker) [auth.c openbsd-compat/port-aix.c openbsd-compat/port-aix.h]
2478 Move loginrestrictions test to port-aix.c, replace with a generic hook.
2479 - (tim) [regress/try-ciphers.sh] "if ! some_command" is not portable.
2480 - (bal) [contrib/README] Removed "mdoc2man.pl" reference and added
2481 reference to "findssl.sh"
2482
248320040622
2484 - (dtucker) OpenBSD CVS Sync
2485 - djm@cvs.openbsd.org 2004/06/20 17:36:59
2486 [ssh.c]
2487 filter passed env vars at slave in connection sharing case; ok markus@
2488 - djm@cvs.openbsd.org 2004/06/20 18:53:39
2489 [sftp.c]
2490 make "ls -l" listings print user/group names, add "ls -n" to show uid/gid
2491 (like /bin/ls); idea & ok markus@
2492 - djm@cvs.openbsd.org 2004/06/20 19:28:12
2493 [sftp.1]
2494 mention new -n flag
2495 - avsm@cvs.openbsd.org 2004/06/21 17:36:31
2496 [auth-rsa.c auth2-gss.c auth2-pubkey.c authfile.c canohost.c channels.c
2497 cipher.c dns.c kex.c monitor.c monitor_fdpass.c monitor_wrap.c
2498 monitor_wrap.h nchan.c packet.c progressmeter.c scp.c sftp-server.c sftp.c
2499 ssh-gss.h ssh-keygen.c ssh.c sshconnect.c sshconnect1.c sshlogin.c
2500 sshpty.c]
2501 make ssh -Wshadow clean, no functional changes
2502 markus@ ok
2503 - djm@cvs.openbsd.org 2004/06/21 17:53:03
2504 [session.c]
2505 fix fd leak for multiple subsystem connections; with markus@
2506 - djm@cvs.openbsd.org 2004/06/21 22:02:58
2507 [log.h]
2508 mark fatal and cleanup exit as __dead; ok markus@
2509 - djm@cvs.openbsd.org 2004/06/21 22:04:50
2510 [sftp.c]
2511 introduce sorting for ls, same options as /bin/ls; ok markus@
2512 - djm@cvs.openbsd.org 2004/06/21 22:30:45
2513 [sftp.c]
2514 prefix ls option flags with LS_
2515 - djm@cvs.openbsd.org 2004/06/21 22:41:31
2516 [sftp.1]
2517 document sort options
2518 - djm@cvs.openbsd.org 2004/06/22 01:16:39
2519 [sftp.c]
2520 don't show .files by default in ls, add -a option to turn them back on;
2521 ok markus
2522 - markus@cvs.openbsd.org 2004/06/22 03:12:13
2523 [regress/envpass.sh regress/multiplex.sh]
2524 more portable env passing tests
2525 - dtucker@cvs.openbsd.org 2004/06/22 05:05:45
2526 [monitor.c monitor_wrap.c]
2527 Change login->username, will prevent -Wshadow errors in Portable;
2528 ok markus@
2529 - (dtucker) [monitor.c] Fix Portable-specific -Wshadow warnings on "socket".
2530 - (dtucker) [defines.h] Define __dead if not already defined.
2531 - (bal) [auth-passwd.c auth1.c] Clean up unused variables.
2532
253320040620
2534 - (tim) [configure.ac Makefile.in] Only change TEST_SHELL on broken platforms.
2535
253620040619
2537 - (dtucker) [auth-pam.c] Don't use PAM namespace for
2538 pam_password_change_required either.
2539 - (tim) [configure.ac buildpkg.sh.in contrib/solaris/README] move opensshd
2540 init script to top level directory. Add opensshd.init.in.
2541 Remove contrib/solaris/buildpkg.sh, contrib/solaris/opensshd.in
2542
254320040618
2544 - (djm) OpenBSD CVS Sync
2545 - djm@cvs.openbsd.org 2004/06/17 14:52:48
2546 [clientloop.c clientloop.h ssh.c]
2547 support environment passing over shared connections; ok markus@
2548 - djm@cvs.openbsd.org 2004/06/17 15:10:14
2549 [clientloop.c misc.h readconf.c readpass.c ssh.c ssh_config.5]
2550 Add option for confirmation (ControlMaster=ask) via ssh-askpass before
2551 opening shared connections; ok markus@
2552 - djm@cvs.openbsd.org 2004/06/17 14:53:27
2553 [regress/multiplex.sh]
2554 shared connection env passing regress test
2555 - (dtucker) [regress/README.regress] Add detail on how to run a single
2556 test from the top-level Makefile.
2557 - (dtucker) OpenBSD CVS Sync
2558 - djm@cvs.openbsd.org 2004/06/17 23:56:57
2559 [ssh.1 ssh.c]
2560 sync usage() and SYNPOSIS with connection sharing changes
2561 - dtucker@cvs.openbsd.org 2004/06/18 06:13:25
2562 [sftp.c]
2563 Use execvp instead of execv so sftp -S ssh works. "makes sense" markus@
2564 - dtucker@cvs.openbsd.org 2004/06/18 06:15:51
2565 [multiplex.sh]
2566 Use -S for scp/sftp to force the use of the ssh being tested.
2567 ok djm@,markus@
2568 - (djm) OpenBSD CVS Sync
2569 - djm@cvs.openbsd.org 2004/06/18 10:40:19
2570 [ssh.c]
2571 delay signal handler setup until we have finished talking to the master.
2572 allow interrupting of setup (e.g. if master is stuck); ok markus@
2573 - markus@cvs.openbsd.org 2004/06/18 10:55:43
2574 [ssh.1 ssh.c]
2575 trim synopsis for -S, allow -S and -oControlMaster, -MM means 'ask';
2576 ok djm
2577 - djm@cvs.openbsd.org 2004/06/18 11:11:54
2578 [channels.c clientloop.c]
2579 Don't explode in clientloop when we receive a bogus channel id, but
2580 also don't generate them to begin with; ok markus@
2581
258220040617
2583 - (dtucker) [regress/scp.sh] diff -N is not portable (but needed for some
2584 platforms), so test if diff understands it. Pointed out by tim@, ok djm@
2585 - (dtucker) OpenBSD CVS Sync regress/
2586 - dtucker@cvs.openbsd.org 2004/06/17 05:51:59
2587 [regress/multiplex.sh]
2588 Remove datafile between and after tests, kill sshd rather than wait;
2589 ok djm@
2590 - dtucker@cvs.openbsd.org 2004/06/17 06:00:05
2591 [regress/multiplex.sh]
2592 Use DATA and COPY for test data rather than hard-coded paths; ok djm@
2593 - dtucker@cvs.openbsd.org 2004/06/17 06:19:06
2594 [regress/multiplex.sh]
2595 Add small description of failing test to failure message; ok djm@
2596 - (dtucker) [regress/multiplex.sh] add EXEEXT for those platforms that need
2597 it.
2598 - (dtucker) [regress/multiplex.sh] Increase sleep time to 120 sec (60 is not
2599 enough for slow systems, especially if they don't have a kernel RNG).
2600
260120040616
2602 - (dtucker) [openbsd-compat/port-aix.c] Expand whitespace -> tabs. No
2603 code changes.
2604 - (dtucker) OpenBSD CVS Sync regress/
2605 - djm@cvs.openbsd.org 2004/04/27 09:47:30
2606 [regress/Makefile regress/test-exec.sh, added regress/envpass.sh]
2607 regress test for environment passing, SendEnv & AcceptEnv options;
2608 ok markus@
2609 - dtucker@cvs.openbsd.org 2004/06/13 13:51:02
2610 [regress/Makefile regress/test-exec.sh, added regress/scp-ssh-wrapper.sh
2611 regress/scp.sh]
2612 Add scp regression test; with & ok markus@
2613 - djm@cvs.openbsd.org 2004/06/13 15:04:08
2614 [regress/Makefile regress/test-exec.sh, added regress/envpass.sh]
2615 regress test for client multiplexing; ok markus@
2616 - djm@cvs.openbsd.org 2004/06/13 15:16:54
2617 [regress/test-exec.sh]
2618 remove duplicate setting of $SCP; spotted by markus@
2619 - dtucker@cvs.openbsd.org 2004/06/16 13:15:09
2620 [regress/scp.sh]
2621 Make scp -r tests use diff -rN not cmp (which won't do dirs. ok markus@
2622 - dtucker@cvs.openbsd.org 2004/06/16 13:16:40
2623 [regress/multiplex.sh]
2624 Silence multiplex sftp and scp tests. ok markus@
2625 - (dtucker) [regress/test-exec.sh]
2626 Move Portable-only StrictModes to top of list to make syncs easier.
2627 - (dtucker) [regress/README.regress]
2628 Add $TEST_SHELL to readme.
2629
263020040615
2631 - (djm) OpenBSD CVS Sync
2632 - djm@cvs.openbsd.org 2004/05/26 08:59:57
2633 [sftp.c]
2634 exit -> _exit in forked child on error; from andrushock AT korovino.net
2635 - markus@cvs.openbsd.org 2004/05/26 23:02:39
2636 [channels.c]
2637 missing freeaddrinfo; Andrey Matveev
2638 - dtucker@cvs.openbsd.org 2004/05/27 00:50:13
2639 [readconf.c]
2640 Kill dead code after fatal(); ok djm@
2641 - dtucker@cvs.openbsd.org 2004/06/01 14:20:45
2642 [auth2-chall.c]
2643 Remove redundant #include; ok markus@
2644 - pedro@cvs.openbsd.org 2004/06/03 12:22:20
2645 [sftp-client.c sftp.c]
2646 initialize pointers, ok markus@
2647 - djm@cvs.openbsd.org 2004/06/13 12:53:24
2648 [dh.c dh.h kex.c kex.h kexdhc.c kexdhs.c monitor.c myproposal.h]
2649 [ssh-keyscan.c sshconnect2.c sshd.c]
2650 implement diffie-hellman-group14-sha1 kex method (trivial extension to
2651 existing diffie-hellman-group1-sha1); ok markus@
2652 - dtucker@cvs.openbsd.org 2004/06/13 14:01:42
2653 [ssh.1 ssh_config.5 sshd_config.5]
2654 List supported ciphers in man pages, tidy up ssh -c;
2655 "looks fine" jmc@, ok markus@
2656 - djm@cvs.openbsd.org 2004/06/13 15:03:02
2657 [channels.c channels.h clientloop.c clientloop.h includes.h readconf.c]
2658 [readconf.h scp.1 sftp.1 ssh.1 ssh.c ssh_config.5]
2659 implement session multiplexing in the client (the server has supported
2660 this since 2.0); ok markus@
2661 - djm@cvs.openbsd.org 2004/06/14 01:44:39
2662 [channels.c clientloop.c misc.c misc.h packet.c ssh-agent.c ssh-keyscan.c]
2663 [sshd.c]
2664 set_nonblock() instead of fnctl(...,O_NONBLOCK); "looks sane" deraadt@
2665 - djm@cvs.openbsd.org 2004/06/15 05:45:04
2666 [clientloop.c]
2667 missed one unset_nonblock; spotted by Tim Rice
2668 - (djm) Fix Makefile.in for connection sharing changes
2669 - (djm) [ssh.c] Use separate var for address length
2670
267120040603
2672 - (dtucker) [auth-pam.c] Don't use pam_* namespace for sshd's PAM functions.
2673 ok djm@
2674
267520040601
2676 - (djm) [auth-pam.c] Add copyright for local changes
2677
267820040530
2679 - (dtucker) [auth-pam.c auth-pam.h auth-passwd.c] Bug #874: Re-add PAM
2680 support for PasswordAuthentication=yes. ok djm@
2681 - (dtucker) [auth-pam.c] Use an invalid password for root if
2682 PermitRootLogin != yes or the login is invalid, to prevent leaking
2683 information. Based on Openwall's owl-always-auth patch. ok djm@
2684 - (tim) [configure.ac Makefile.in] Add support for "make package" ok djm@
2685 - (tim) [buildpkg.sh.in] New file. A more flexible version of
2686 contrib/solaris/buildpkg.sh used for "make package".
2687 - (tim) [buildpkg.sh.in] Last minute fix didn't make it in the .in file.
2688
268920040527
2690 - (dtucker) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec
2691 contrib/README CREDITS INSTALL] Bug #873: Correct URLs for x11-ssh-askpass
2692 and Jim Knoble's email address , from Jim himself.
2693
269420040524
2695 - (dtucker) OpenBSD CVS Sync
2696 - djm@cvs.openbsd.org 2004/05/19 12:17:33
2697 [sftp-client.c sftp.c]
2698 gracefully abort transfers on receipt of SIGINT, also ignore SIGINT while
2699 waiting for a command; ok markus@
2700 - dtucker@cvs.openbsd.org 2004/05/20 10:58:05
2701 [clientloop.c]
2702 Trivial type fix 0 -> '\0'; ok markus@
2703 - markus@cvs.openbsd.org 2004/05/21 08:43:03
2704 [kex.h moduli.c tildexpand.c]
2705 add prototypes for -Wall; ok djm
2706 - djm@cvs.openbsd.org 2004/05/21 11:33:11
2707 [channels.c channels.h clientloop.c serverloop.c ssh.1]
2708 bz #756: add support for the cancel-tcpip-forward request for the server
2709 and the client (through the ~C commandline). reported by z3p AT
2710 twistedmatrix.com; ok markus@
2711 - djm@cvs.openbsd.org 2004/05/22 06:32:12
2712 [clientloop.c ssh.1]
2713 use '-h' for help in ~C commandline instead of '-?'; inspired by jmc@
2714 - jmc@cvs.openbsd.org 2004/05/22 16:01:05
2715 [ssh.1]
2716 kill whitespace at eol;
2717 - dtucker@cvs.openbsd.org 2004/05/23 23:59:53
2718 [auth.c auth.h auth1.c auth2.c servconf.c servconf.h sshd_config
2719 sshd_config.5]
2720 Add MaxAuthTries sshd config option; ok markus@
2721 - (dtucker) [auth-pam.c] Bug #839: Ensure that pam authentication "thread"
2722 is terminated if the privsep slave exits during keyboard-interactive
2723 authentication. ok djm@
2724 - (dtucker) [sshd.c] Fix typo in comment.
2725
272620040523
2727 - (djm) [sshd_config] Explain consequences of UsePAM=yes a little better in
2728 sshd_config; ok dtucker@
2729 - (djm) [configure.ac] Warn if the system has no known way of figuring out
2730 which user is on the other end of a Unix domain socket; ok dtucker@
2731 - (bal) [openbsd-compat/sys-queue.h] Reintroduce machinary to handle
2732 old/broken/incomplete <sys/queue.h>.
2733
273420040513
2735 - (dtucker) [configure.ac] Bug #867: Additional tests for res_query in
2736 libresolv, fixes problems detecting it on some platforms
2737 (eg Linux/x86-64). From Kurt Roeckx via Debian, ok mouring@
2738 - (dtucker) OpenBSD CVS Sync
2739 - jmc@cvs.openbsd.org 2004/05/04 18:36:07
2740 [scp.1]
2741 SendEnv here too;
2742 - jmc@cvs.openbsd.org 2004/05/06 11:24:23
2743 [ssh_config.5]
2744 typo from John Cosimano (PR 3770);
2745 - deraadt@cvs.openbsd.org 2004/05/08 00:01:37
2746 [auth.c clientloop.c misc.h servconf.c ssh.c sshpty.h sshtty.c
2747 tildexpand.c], removed: sshtty.h tildexpand.h
2748 make two tiny header files go away; djm ok
2749 - djm@cvs.openbsd.org 2004/05/08 00:21:31
2750 [clientloop.c misc.h readpass.c scard.c ssh-add.c ssh-agent.c ssh-keygen.c
2751 sshconnect.c sshconnect1.c sshconnect2.c] removed: readpass.h
2752 kill a tiny header; ok deraadt@
2753 - djm@cvs.openbsd.org 2004/05/09 00:06:47
2754 [moduli.c ssh-keygen.c] removed: moduli.h
2755 zap another tiny header; ok deraadt@
2756 - djm@cvs.openbsd.org 2004/05/09 01:19:28
2757 [OVERVIEW auth-rsa.c auth1.c kex.c monitor.c session.c sshconnect1.c
2758 sshd.c] removed: mpaux.c mpaux.h
2759 kill some more tiny files; ok deraadt@
2760 - djm@cvs.openbsd.org 2004/05/09 01:26:48
2761 [kex.c]
2762 don't overwrite what we are trying to compute
2763 - deraadt@cvs.openbsd.org 2004/05/11 19:01:43
2764 [auth.c auth2-none.c authfile.c channels.c monitor.c monitor_mm.c
2765 packet.c packet.h progressmeter.c session.c openbsd-compat/xmmap.c]
2766 improve some code lint did not like; djm millert ok
2767 - dtucker@cvs.openbsd.org 2004/05/13 02:47:50
2768 [ssh-agent.1]
2769 Add examples to ssh-agent.1, bz#481 from Ralf Hauser; ok deraadt@
2770 - (dtucker) [sshd.8] Bug #843: Add warning about PasswordAuthentication to
2771 UsePAM section. Parts from djm@ and jmc@.
2772 - (dtucker) [auth-pam.c scard-opensc.c] Tinderbox says auth-pam.c uses
2773 readpass.h, grep says scard-opensc.c does too. Replace with misc.h.
2774 - (dtucker) [openbsd-compat/getrrsetbyname.c] Check that HAVE_DECL_H_ERROR
2775 is defined before using.
2776 - (dtucker) [openbsd-compat/getrrsetbyname.c] Fix typo too: HAVE_DECL_H_ERROR
2777 -> HAVE_DECL_H_ERRNO.
2778
277920040502
2780 - (dtucker) OpenBSD CVS Sync
2781 - djm@cvs.openbsd.org 2004/04/22 11:56:57
2782 [moduli.c]
2783 Bugzilla #850: Sophie Germain is the correct name of the French
2784 mathematician, "Sophie Germaine" isn't; from Luc.Maisonobe@c-s.fr
2785 - djm@cvs.openbsd.org 2004/04/27 09:46:37
2786 [readconf.c readconf.h servconf.c servconf.h session.c session.h ssh.c
2787 ssh_config.5 sshd_config.5]
2788 bz #815: implement ability to pass specified environment variables from
2789 the client to the server; ok markus@
2790 - djm@cvs.openbsd.org 2004/04/28 05:17:10
2791 [ssh_config.5 sshd_config.5]
2792 manpage fixes in envpass stuff from Brian Poole (raj AT cerias.purdue.edu)
2793 - jmc@cvs.openbsd.org 2004/04/28 07:02:56
2794 [sshd_config.5]
2795 remove unnecessary .Pp;
2796 - jmc@cvs.openbsd.org 2004/04/28 07:13:42
2797 [sftp.1 ssh.1]
2798 add SendEnv to -o list;
2799 - dtucker@cvs.openbsd.org 2004/05/02 11:54:31
2800 [sshd.8]
2801 Man page grammar fix (bz #858), from damerell at chiark.greenend.org.uk
2802 via Debian; ok djm@
2803 - dtucker@cvs.openbsd.org 2004/05/02 11:57:52
2804 [ssh.1]
2805 ConnectionTimeout -> ConnectTimeout, from m.a.ellis at ncl.ac.uk via
2806 Debian. ok djm@
2807 - dtucker@cvs.openbsd.org 2004/05/02 23:02:17
2808 [sftp.1]
2809 ConnectionTimeout -> ConnectTimeout here too, pointed out by jmc@
2810 - dtucker@cvs.openbsd.org 2004/05/02 23:17:51
2811 [scp.1]
2812 ConnectionTimeout -> ConnectTimeout for scp.1 too.
2813
281420040423
2815 - (dtucker) [configure.ac openbsd-compat/getrrsetbyname.c] Declare h_errno
2816 as extern int if not already declared. Fixes compile errors on old SCO
2817 platforms. ok tim@
2818 - (dtucker) [README.platform] List prereqs for building on Cygwin.
2819
282020040421
2821 - (djm) Update config.guess and config.sub to autoconf-2.59 versions; ok tim@
2822
282320040420
2824 - (djm) OpenBSD CVS Sync
2825 - henning@cvs.openbsd.org 2004/04/08 16:08:21
2826 [sshconnect2.c]
2827 swap the last two parameters to TAILQ_FOREACH_REVERSE. matches what
2828 FreeBSD and NetBSD do.
2829 ok millert@ mcbride@ markus@ ho@, checked to not affect ports by naddy@
2830 - djm@cvs.openbsd.org 2004/04/18 23:10:26
2831 [readconf.c readconf.h ssh-keysign.c ssh.c]
2832 perform strict ownership and modes checks for ~/.ssh/config files,
2833 as these can be used to execute arbitrary programs; ok markus@
2834 NB. ssh will now exit when it detects a config with poor permissions
2835 - djm@cvs.openbsd.org 2004/04/19 13:02:40
2836 [ssh.1 ssh_config.5]
2837 document strict permission checks on ~/.ssh/config; prompted by,
2838 with & ok jmc@
2839 - jmc@cvs.openbsd.org 2004/04/19 16:12:14
2840 [ssh_config.5]
2841 kill whitespace at eol;
2842 - djm@cvs.openbsd.org 2004/04/19 21:51:49
2843 [ssh.c]
2844 fix idiot typo that i introduced in my last commit;
2845 spotted by cschneid AT cschneid.com
2846 - (djm) [openbsd-compat/sys-queue.h] Sync with OpenBSD, needed for
2847 above change
2848 - (djm) [configure.ac] Check whether libroken is required when building
2849 with Heimdal
2850
285120040419
2852 - (dtucker) OpenBSD CVS Sync
2853 - dtucker@cvs.openbsd.org 2004/02/29 22:04:45
2854 [regress/login-timeout.sh]
2855 Use sudo when restarting daemon during test. ok markus@
2856 - dtucker@cvs.openbsd.org 2004/03/08 10:17:12
2857 [regress/login-timeout.sh]
2858 Missing OBJ, from tim@. ok markus@ (Already fixed, ID sync only)
2859 - djm@cvs.openbsd.org 2004/03/30 12:41:56
2860 [sftp-client.c]
2861 sync comment with reality
2862 - djm@cvs.openbsd.org 2004/03/31 21:58:47
2863 [canohost.c]
2864 don't skip ip options check when UseDNS=no; ok markus@ (ID sync only)
2865 - markus@cvs.openbsd.org 2004/04/01 12:19:57
2866 [scp.c]
2867 limit trust between local and remote rcp/scp process,
2868 noticed by lcamtuf; ok deraadt@, djm@
2869
287020040418
2871 - (dtucker) [auth-pam.c] Log username and source host for failed PAM
2872 authentication attempts. With & ok djm@
2873 - (djm) [openbsd-compat/bsd-cygwin_util.c] Recent versions of Cygwin allow
2874 change of user context without a password, so relax auth method
2875 restrictions; from vinschen AT redhat.com; ok dtucker@
2876
287720040416
2878 - (dtucker) [regress/sftp-cmds.sh] Skip quoting test on Cygwin, since
2879 FAT/NTFS does not permit quotes in filenames. From vinschen at redhat.com
2880 - (djm) [auth-krb5.c auth.h session.c] Explicitly refer to Kerberos ccache
2881 file using FILE: method, fixes problems on Mac OSX.
2882 Patch from simon@sxw.org.uk; ok dtucker@
2883 - (tim) [configure.ac] Set SETEUID_BREAKS_SETUID, BROKEN_SETREUID and
2884 BROKEN_SETREGID for SCO OpenServer 3
2885
288620040412
2887 - (dtucker) [sshd_config.5] Add PermitRootLogin without-password warning
2888 from bug #701 (text from jfh at cise.ufl.edu).
2889 - (dtucker) [acconfig.h configure.ac defines.h] Bug #673: check for 4-arg
2890 skeychallenge(), eg on NetBSD. ok mouring@
2891 - (dtucker) [auth-skey.c defines.h monitor.c] Make skeychallenge explicitly
2892 4-arg, with compatibility for 3-arg versions. From djm@, ok me.
2893 - (djm) [configure.ac] Fix detection of libwrap on OpenBSD; ok dtucker@
2894
289520040408
2896 - (dtucker) [loginrec.c] Use UT_LINESIZE if available, prevents truncating
2897 pty name on Linux 2.6.x systems. Patch from jpe at eisenmenger.org.
2898 - (bal) [monitor.c monitor_wrap.c] Second try. Put the zlib.h headers
2899 back and #undef TARGET_OS_MAC instead. (Bug report pending with Apple)
2900 - (dtucker) [defines.h loginrec.c] Define UT_LINESIZE if not defined and
2901 simplify loginrec.c. ok tim@
2902 - (bal) [monitor.c monitor_wrap.c] Ok.. Last time. Promise. Tim suggested
2903 limiting scope and dtucker@ agreed.
2904
290520040407
2906 - (dtucker) [session.c] Flush stdout after displaying loginmsg. From
2907 f_mohr at yahoo.de.
2908 - (bal) [acconfig.h auth-krb5.c configure.ac gss-serv-krb5.c] Check to see
2909 if Krb5 library exports krb5_init_etc() since some OSes (like MacOS/X)
2910 are starting to restrict it as internal since it is not needed by
2911 developers any more. (Patch based on Apple tree)
2912 - (bal) [monitor.c monitor_wrap.c] monitor_wrap.c] moved zlib.h higher since
2913 krb5 on MacOS/X conflicts. There may be a better solution, but this will
2914 work for now.
2915
291620040406
2917 - (dtucker) [acconfig.h configure.ac defines.h] Bug #820: don't use
2918 updwtmpx() on IRIX since it seems to clobber utmp. ok djm@
2919 - (dtucker) [configure.ac] Bug #816, #748 (again): Attempt to detect
2920 broken getaddrinfo and friends on HP-UX. ok djm@
2921
292220040330
2923 - (dtucker) [configure.ac] Bug #811: Use "!" for LOCKED_PASSWD_PREFIX on
2924 Linuxes, since that's what many use. ok djm@
2925 - (dtucker) [auth-pam.c] rename the_authctxt to sshpam_authctxt in auth-pam.c
2926 to reduce potential confusion with the one in sshd.c. ok djm@
2927 - (djm) Bug #825: Fix ip_options_check() for mapped IPv4/IPv6 connection;
2928 with & ok dtucker@
2929
293020040327
2931 - (dtucker) [session.c] Bug #817: Clear loginmsg after fork to prevent
2932 duplicate login messages for mutli-session logins. ok djm@
2933
293420040322
2935 - (djm) [sshd.c] Drop supplemental groups if started as root
2936 - (djm) OpenBSD CVS Sync
2937 - markus@cvs.openbsd.org 2004/03/09 22:11:05
2938 [ssh.c]
2939 increase x11 cookie lifetime to 20 minutes; ok djm
2940 - markus@cvs.openbsd.org 2004/03/10 09:45:06
2941 [ssh.c]
2942 trim usage to match ssh(1) and look more like unix. ok djm@
2943 - markus@cvs.openbsd.org 2004/03/11 08:36:26
2944 [sshd.c]
2945 trim usage; ok deraadt
2946 - markus@cvs.openbsd.org 2004/03/11 10:21:17
2947 [ssh.c sshd.c]
2948 ssh, sshd: sync version output, ok djm
2949 - markus@cvs.openbsd.org 2004/03/20 10:40:59
2950 [version.h]
2951 3.8.1
2952 - (djm) Crank RPM spec versions
2953
295420040311
2955 - (djm) [configure.ac] Add standard license to configure.ac; ok ben, dtucker
2956
295720040310
2958 - (dtucker) [openbsd-compat/fake-rfc2553.h] Bug #812: #undef getaddrinfo
2959 before redefining it, silences warnings on Tru64.
2960
296120040308
2962 - (dtucker) [sshd.c] Back out rev 1.270 as it caused problems on some
2963 platforms (eg SCO, HP-UX) with logging in the wrong TZ. ok djm@
2964 - (dtucker) [configure.ac sshd.c openbsd-compat/bsd-misc.h
2965 openbsd-compat/setenv.c] Unset KRB5CCNAME on AIX to prevent it from being
2966 inherited by the child. ok djm@
2967 - (dtucker) [auth-pam.c auth-pam.h auth1.c auth2.c monitor.c monitor_wrap.c
2968 monitor_wrap.h] Bug #808: Ensure force_pwchange is correctly initialized
2969 even if keyboard-interactive is not used by the client. Prevents
2970 segfaults in some cases where the user's password is expired (note this
2971 is not considered a security exposure). ok djm@
2972 - (djm) OpenBSD CVS Sync
2973 - markus@cvs.openbsd.org 2004/03/03 06:47:52
2974 [sshd.c]
2975 change proctiltle after accept(2); ok henning, deraadt, djm
2976 - djm@cvs.openbsd.org 2004/03/03 09:30:42
2977 [sftp-client.c]
2978 Don't print duplicate messages when progressmeter is off
2979 Spotted by job317 AT mailvault.com; ok markus@
2980 - djm@cvs.openbsd.org 2004/03/03 09:31:20
2981 [sftp.c]
2982 Fix initialisation of progress meter; ok markus@
2983 - markus@cvs.openbsd.org 2004/03/05 10:53:58
2984 [readconf.c readconf.h scp.1 sftp.1 ssh.1 ssh_config.5 sshconnect2.c]
2985 add IdentitiesOnly; ok djm@, pb@
2986 - djm@cvs.openbsd.org 2004/03/08 09:38:05
2987 [ssh-keyscan.c]
2988 explicitly initialise remote_major and remote_minor.
2989 from cjwatson AT debian.org; ok markus@
2990 - dtucker@cvs.openbsd.org 2004/03/08 10:18:57
2991 [sshd_config.5]
2992 Document KerberosGetAFSToken; ok markus@
2993 - (tim) [regress/README.regress] Document ssh-rand-helper issue. ok bal
2994
299520040307
2996 - (tim) [regress/login-timeout.sh] fix building outside of source tree.
2997
299820040304
2999 - (dtucker) [auth-pam.c] Don't try to export PAM when compiled with
3000 -DUSE_POSIX_THREADS. From antoine.verheijen at ualbert ca. ok djm@
3001 - (dtucker) [auth-pam.c] Reset signal status when starting pam auth thread,
3002 prevent hanging during PAM keyboard-interactive authentications. ok djm@
3003 - (dtucker) [auth-passwd.c auth-sia.c auth-sia.h defines.h
3004 openbsd-compat/xcrypt.c] Bug #802: Fix build error on Tru64 when
3005 configured --with-osfsia. ok djm@
3006
300720040303
3008 - (djm) [configure.ac ssh-agent.c] Use prctl to prevent ptrace on ssh-agent
3009 ok dtucker
3010
301120040229
3012 - (tim) [configure.ac] Put back bits mistakenly removed from Rev 1.188
3013
301420040229
3015 - (dtucker) OpenBSD CVS Sync
3016 - djm@cvs.openbsd.org 2004/02/25 00:22:45
3017 [sshd.c]
3018 typo in comment
3019 - dtucker@cvs.openbsd.org 2004/02/27 22:42:47
3020 [dh.c]
3021 Prevent sshd from sending DH groups with a primitive generator of zero or
3022 one, even if they are listed in /etc/moduli. ok markus@
3023 - dtucker@cvs.openbsd.org 2004/02/27 22:44:56
3024 [dh.c]
3025 Make /etc/moduli line buffer big enough for 8kbit primes, in case anyone
3026 ever uses one. ok markus@
3027 - dtucker@cvs.openbsd.org 2004/02/27 22:49:27
3028 [dh.c]
3029 Reset bit counter at the right time, fixes debug output in the case where
3030 the DH group is rejected. ok markus@
3031 - dtucker@cvs.openbsd.org 2004/02/17 08:23:20
3032 [regress/Makefile regress/login-timeout.sh]
3033 Add regression test for LoginGraceTime; ok markus@
3034 - markus@cvs.openbsd.org 2004/02/24 16:56:30
3035 [regress/test-exec.sh]
3036 allow arguments in ${TEST_SSH_XXX}
3037 - markus@cvs.openbsd.org 2004/02/24 17:06:52
3038 [regress/ssh-com-client.sh regress/ssh-com-keygen.sh
3039 regress/ssh-com-sftp.sh regress/ssh-com.sh]
3040 test against recent ssh.com releases
3041 - dtucker@cvs.openbsd.org 2004/02/28 12:16:57
3042 [regress/dynamic-forward.sh]
3043 Make dynamic-forward understand nc's new output. ok markus@
3044 - dtucker@cvs.openbsd.org 2004/02/28 13:44:45
3045 [regress/try-ciphers.sh]
3046 Test acss too; ok markus@
3047 - (dtucker) [regress/try-ciphers.sh] Skip acss if not compiled in (eg if we
3048 built with openssl < 0.9.7)
3049
305020040226
3051 - (bal) KNF our sshlogin.c even if the code looks nothing like upstream
3052 code due to diversity issues.
3053
305420040225
3055 - (djm) Trim ChangeLog
3056 - (djm) Don't specify path to PAM modules in Redhat sshd.pam; from Fedora
3057
305820040224
3059 - (dtucker) OpenBSD CVS Sync
3060 - markus@cvs.openbsd.org 2004/02/19 21:15:04
3061 [sftp-server.c]
3062 switch to new license.template
3063 - markus@cvs.openbsd.org 2004/02/23 12:02:33
3064 [sshd.c]
3065 backout revision 1.279; set listen socket to non-block; ok henning.
3066 - markus@cvs.openbsd.org 2004/02/23 15:12:46
3067 [bufaux.c]
3068 encode 0 correctly in buffer_put_bignum2; noted by Mikulas Patocka
3069 and drop support for negative BNs; ok otto@
3070 - markus@cvs.openbsd.org 2004/02/23 15:16:46
3071 [version.h]
3072 enter 3.8
3073 - (dtucker) [configure.ac gss-serv-krb5.c ssh-gss.h] Define GSSAPI when found
3074 with krb5-config, hunt down gssapi.h and friends. Based partially on patch
3075 from deengert at anl.gov. ok djm@
3076 - (djm) [groupaccess.c uidswap.c] Bug #787: Size group arrays at runtime
3077 using sysconf() if available Based on patches from
3078 holger AT van-lengerich.de and openssh_bugzilla AT hockin.org
3079 - (dtucker) [uidswap.c] Minor KNF. ok djm@
3080 - (tim) [openbsd-compat/getrrsetbyname.c] Make gcc 2.7.2.3 happy. ok djm@
3081 - (djm) Crank RPM spec versions
3082 - (dtucker) [README] Add pointer to release notes. ok djm@
3083 - (dtucker) {README.platform] Add platform-specific notes.
3084 - (tim) [configure.ac] SCO3 needs -lcrypt_i for -lprot
3085 - (djm) Release 3.8p1
3086
308720040223
3088 - (dtucker) [session.c] Bug #789: Only make setcred call for !privsep in the
3089 non-interactive path. ok djm@
3090
309120040222
3092 - (dtucker) [auth-shadow.c auth.c auth.h] Move shadow account expiry test
3093 to auth-shadow.c, no functional change. ok djm@
3094 - (dtucker) [auth-shadow.c auth.h] Provide warnings of impending account or
3095 password expiry. ok djm@
3096 - (dtucker) [auth-passwd.c] Only check password expiry once. Prevents
3097 multiple warnings if a wrong password is entered.
3098 - (dtucker) [configure.ac] Apply krb5-config --libs fix to non-gssapi path
3099 too.
3100
310120040220
3102 - (djm) [openbsd-compat/setproctitle.c] fix comments; from grange@
3103
310420040218
3105 - (dtucker) [configure.ac] Handle case where krb5-config --libs returns a
3106 path with a "-" in it. From Sergio.Gelato at astro.su.se.
3107 - (djm) OpenBSD CVS Sync
3108 - djm@cvs.openbsd.org 2004/02/17 07:17:29
3109 [sftp-glob.c sftp.c]
3110 Remove useless headers; ok deraadt@
3111 - djm@cvs.openbsd.org 2004/02/17 11:03:08
3112 [sftp.c]
3113 sftp.c and sftp-int.c, together at last; ok markus@
3114 - jmc@cvs.openbsd.org 2004/02/17 19:35:21
3115 [sshd_config.5]
3116 remove cruft left over from RhostsAuthentication removal;
3117 ok markus@
3118 - (djm) [log.c] Correct use of HAVE_OPENLOG_R
3119 - (djm) [log.c] Tighten openlog_r tests
3120
312120040217
3122 - (djm) Simplify the license on code I have written. No code changes.
3123 - (djm) OpenBSD CVS Sync
3124 - djm@cvs.openbsd.org 2004/02/17 05:39:51
3125 [sftp-client.c sftp-client.h sftp-glob.c sftp-glob.h sftp-int.c]
3126 [sftp-int.h sftp.c]
3127 switch to license.template for code written by me (belated, I know...)
3128 - (djm) Bug #698: Specify FILE: for KRB5CCNAME; patch from
3129 stadal@suse.cz and simon@sxw.org.uk
3130 - (dtucker) [auth-pam.c] Tidy up PAM debugging. ok djm@
3131 - (dtucker) [auth-pam.c] Store output from pam_session and pam_setcred for
3132 display after login. Should fix problems like pam_motd not displaying
3133 anything, noticed by cjwatson at debian.org. ok djm@
3134
313520040212
3136 - (tim) [Makefile.in regress/sftp-badcmds.sh regress/test-exec.sh]
3137 Portablity fixes. Data sftp transfers needs to be world readable. Some
3138 older shells hang on while loops when doing sh -n some_script. OK dtucker@
3139 - (tim) [configure.ac] Make sure -lcrypto is before -lsocket for sco3.
3140 ok mouring@
3141
314220040211
3143 - (dtucker) [auth-passwd.c auth-shadow.c] Only enable shadow expiry check
3144 if HAS_SHADOW_EXPIRY is set.
3145 - (tim) [configure.ac] Fix comment to match code changes in ver 1.117
3146
314720040210
3148 - (dtucker) [auth-passwd.c auth.h openbsd-compat/port-aix.c
3149 openbsd-compat/port-aix.h] Bug #14: Use do_pwchange to support AIX's
3150 native password expiry.
3151 - (dtucker) [LICENCE Makefile.in auth-passwd.c auth-shadow.c auth.c auth.h
3152 defines.h] Bug #14: Use do_pwchange to support password expiry and force
3153 change for platforms using /etc/shadow. ok djm@
3154 - (dtucker) [openbsd-compat/fake-rfc2553.h] Bug #563: Prepend ssh_ to compat
3155 functions to avoid conflicts with Heimdal's libroken. ok djm@
3156 - (dtucker) [auth-pam.c auth-pam.h session.c] Bug #14: Use do_pwchange to
3157 change expired PAM passwords for SSHv1 connections without privsep.
3158 pam_chauthtok is still used when privsep is disabled. ok djm@
3159 - (dtucker) [openbsd-compat/port-aix.c openbsd-compat/port-aix.h] Move
3160 include from port-aix.h to port-aix.c and remove unnecessary function
3161 definition. Fixes build errors on AIX.
3162 - (dtucker) [configure.ac loginrec.c] Bug #464: Use updwtmpx on platforms
3163 that support it. from & ok mouring@
3164 - (dtucker) [configure.ac] Bug #345: Do not disable utmp on HP-UX 10.x.
3165 ok djm@
3166
316720040207
3168 - (dtucker) OpenBSD CVS Sync
3169 - dtucker@cvs.openbsd.org 2004/02/06 23:41:13
3170 [cipher-ctr.c]
3171 Use EVP_CIPHER_CTX_key_length for key length. ok markus@
3172 (This will fix builds with OpenSSL 0.9.5)
3173 - (dtucker) [cipher.c] enable AES counter modes with OpenSSL 0.9.5.
3174 ok djm@, markus@
3175
317620040206
3177 - (dtucker) [acss.c acss.h] Fix $Id tags.
3178 - (dtucker) [cipher-acss.c cipher.c] Enable acss only if building with
3179 OpenSSL >= 0.9.7. ok djm@
3180 - (dtucker) [session.c] Bug #789: Do not call do_pam_setcred as a non-root
3181 user, since some modules might fail due to lack of privilege. ok djm@
3182 - (dtucker) [configure.ac] Bug #748: Always define BROKEN_GETADDRINFO
3183 for HP-UX 11.11. If there are known-good configs where this is not
3184 required, please report them. ok djm@
3185 - (dtucker) [sshd.c] Bug #757: Clear child's environment to prevent
3186 accidentally inheriting from root's environment. ok djm@
3187 - (dtucker) [openbsd-compat/port-aix.c openbsd-compat/port-aix.h] Bug #796:
3188 Restore previous authdb setting after auth calls. Fixes problems with
3189 setpcred failing on accounts that use AFS or NIS password registries.
3190 - (dtucker) [configure.ac includes.h] Include <sys/stream.h> if present,
3191 required on Solaris 2.5.1 for queue_t, which is used by <sys/ptms.h>.
3192 - (dtucker) OpenBSD CVS Sync
3193 - markus@cvs.openbsd.org 2004/01/30 09:48:57
3194 [auth-passwd.c auth.h pathnames.h session.c]
3195 support for password change; ok dtucker@
3196 (set password-dead=1w in login.conf to use this).
3197 In -Portable, this is currently only platforms using bsdauth.
3198 - dtucker@cvs.openbsd.org 2004/02/05 05:37:17
3199 [monitor.c sshd.c]
3200 Pass SIGALRM through to privsep child if LoginGraceTime expires. ok markus@
3201 - markus@cvs.openbsd.org 2004/02/05 15:33:33
3202 [progressmeter.c]
3203 fix ETA for > 4GB; bugzilla #791; ok henning@ deraadt@
3204
320520040129
3206 - (dtucker) OpenBSD CVS Sync regress/
3207 - dtucker@cvs.openbsd.org 2003/10/11 11:49:49
3208 [Makefile banner.sh]
3209 Test missing banner file, suppression of banner with ssh -q, check return
3210 code from ssh. ok markus@
3211 - jmc@cvs.openbsd.org 2003/11/07 10:16:44
3212 [ssh-com.sh]
3213 adress -> address, and a few more; all from Jonathon Gray;
3214 - djm@cvs.openbsd.org 2004/01/13 09:49:06
3215 [sftp-batch.sh]
3216 - (dtucker) [configure.ac] Add --without-zlib-version-check. Feedback from
3217 tim@, ok several
3218 - (dtucker) [configure.ac openbsd-compat/bsd-cray.c openbsd-compat/bsd-cray.h]
3219 Bug #775: Cray fixes from wendy at cray.com
3220
322120040128
3222 - (dtucker) [regress/README.regress] Add tcpwrappers issue, noted by tim@
3223 - (dtucker) [moduli] Import new moduli file from OpenBSD.
3224
322520040127
3226 - (djm) OpenBSD CVS Sync
3227 - hshoexer@cvs.openbsd.org 2004/01/23 17:06:03
3228 [cipher.c]
3229 enable acss for ssh
3230 ok deraadt@ markus@
3231 - mouring@cvs.openbsd.org 2004/01/23 17:57:48
3232 [sftp-int.c]
3233 Fix issue pointed out with ls not handling large directories
3234 with embeded paths correctly. OK damien@
3235 - hshoexer@cvs.openbsd.org 2004/01/23 19:26:33
3236 [cipher.c]
3237 rename acss@opebsd.org to acss@openssh.org
3238 ok deraadt@
3239 - djm@cvs.openbsd.org 2004/01/25 03:49:09
3240 [sshconnect.c]
3241 reset nonblocking flag after ConnectTimeout > 0 connect; (bugzilla #785)
3242 from jclonguet AT free.fr; ok millert@
3243 - djm@cvs.openbsd.org 2004/01/27 10:08:10
3244 [sftp.c]
3245 reorder parsing so user:skey@host:file works (bugzilla #777)
3246 patch from admorten AT umich.edu; ok markus@
3247 - (djm) [acss.c acss.h cipher-acss.c] Portable support for ACSS
3248 if libcrypto lacks it
3249
325020040126
3251 - (tim) Typo in regress/README.regress
3252 - (tim) [regress/test-exec.sh] RhostsAuthentication is deprecated.
3253 - (tim) [defines.h] Add defines for HFIXEDSZ and T_SIG
3254 - (tim) [configure.ac includes.h] add <sys/ptms.h> for grantpt() and friends.
3255 - (tim) [defines.h openbsd-compat/getrrsetbyname.h] Move defines for HFIXEDSZ
3256 and T_SIG to getrrsetbyname.h
3257
325820040124
3259 - (djm) Typo in openbsd-compat/bsd-openpty.c; from wendyp AT cray.com
3260
326120040123
3262 - (djm) Do pam_session processing for systems with HAVE_LOGIN_CAP; from
3263 ralf.hack AT pipex.net; ok dtucker@
3264 - (djm) Bug #776: Update contrib/redhat/openssh.spec to dynamically detect
3265 Kerberos location (and thus work with Fedora Core 1);
3266 from jason AT devrandom.org
3267 - (dtucker) [configure.ac] Bug #788: Test for zlib.h presence and for
3268 zlib >= 1.1.4. Partly from jbasney at ncsa.uiuc.edu. ok djm@
3269 - (dtucker) [contrib/cygwin/README] Document new ssh-host-config options.
3270 Patch from vinschen at redhat.com.
3271 - (dtucker) [acconfig.h configure.ac includes.h servconf.c session.c]
3272 Change AFS symbol to USE_AFS to prevent namespace collisions, do not
3273 include kafs.h unless necessary. From deengert at anl.gov.
3274 - (tim) [configure.ac] Remove hard coded -L/usr/local/lib and
3275 -I/usr/local/include. Users can do LDFLAGS="-L/usr/local/lib" \
3276 CPPFLAGS="-I/usr/local/include" ./configure if needed.
3277
327820040122
3279 - (dtucker) [configure.ac] Use krb5-config where available for Kerberos/
3280 GSSAPI detection, libs and includes. ok djm@
3281 - (dtucker) [session.c] Enable AFS support in conjunction with KRB5 not
3282 just HEIMDAL.
3283 - (tim) [contrib/solaris/buildpkg.sh] Allow for the possibility of
3284 /usr/local being a symbolic link. Fixes problem reported by Henry Grebler.
3285
328620040121
3287 - (djm) OpenBSD CVS Sync
3288 - djm@cvs.openbsd.org 2004/01/13 09:25:05
3289 [sftp-int.c sftp.1 sftp.c]
3290 Tidy sftp batchmode handling, eliminate junk to stderr (bugzilla #754) and
3291 enable use of "-b -" to accept batchfile from stdin; ok markus@
3292 - jmc@cvs.openbsd.org 2004/01/13 12:17:33
3293 [sftp.1]
3294 remove unnecessary Ic's;
3295 kill whitespace at EOL;
3296 ok djm@
3297 - markus@cvs.openbsd.org 2004/01/13 19:23:15
3298 [compress.c session.c]
3299 -Wall; ok henning
3300 - markus@cvs.openbsd.org 2004/01/13 19:45:15
3301 [compress.c]
3302 cast for portability; millert@
3303 - markus@cvs.openbsd.org 2004/01/19 09:24:21
3304 [channels.c]
3305 fake consumption for half closed channels since the peer is waiting for
3306 window adjust messages; bugzilla #790 Matthew Dillon; test + ok dtucker@
3307 reproduce with sh -c 'ulimit -f 10; ssh host -n od /bsd | cat > foo'
3308 - markus@cvs.openbsd.org 2004/01/19 21:25:15
3309 [auth2-hostbased.c auth2-pubkey.c serverloop.c ssh-keysign.c sshconnect2.c]
3310 fix mem leaks; some fixes from Pete Flugstad; tested dtucker@
3311 - djm@cvs.openbsd.org 2004/01/21 03:07:59
3312 [sftp.c]
3313 initialise infile in main, rather than statically - from portable
3314 - deraadt@cvs.openbsd.org 2004/01/11 21:55:06
3315 [sshpty.c]
3316 for pty opening, only use the openpty() path. the other stuff only needs
3317 to be in openssh-p; markus ok
3318 - (djm) [openbsd-compat/bsd-openpty.c] Rework old sshpty.c code into an
3319 openpty() replacement
3320
332120040114
3322 - (dtucker) [auth-pam.c] Have monitor die if PAM authentication thread exits
3323 unexpectedly. with & ok djm@
3324 - (dtucker) [auth-pam.c] Reset signal handler in pthread_cancel too, add
3325 test for case where cleanup has already run.
3326 - (dtucker) [auth-pam.c] Add minor debugging.
3327
332820040113
3329 - (dtucker) [auth-pam.c] Relocate struct pam_ctxt and prototypes. No
3330 functional changes.
3331
333220040108
3333 - (dtucker) [auth-pam.c defines.h] Bug #783: move __unused to defines.h and
3334 only define if not already. From des at freebsd.org.
3335 - (dtucker) [configure.ac] Remove extra (typo) comma.
3336
333720040105
3338 - (dtucker) [contrib/ssh-copy-id] Bug #781: exit if ssh fails. Patch from
3339 cjwatson at debian.org.
3340 - (dtucker) [acconfig.h configure.ac includes.h servconf.c session.c]
3341 Only enable KerberosGetAFSToken if Heimdal's libkafs is found. with jakob@
3342
334320040102
3344 - (djm) OSX/Darwin needs BIND_8_COMPAT to build getrrsetbyname. Report from
3345 jakob@
3346 - (djm) Remove useless DNS support configure summary message. from jakob@
3347 - (djm) OSX/Darwin put the PAM headers in a different place, detect this.
3348 Report from jakob@
3349
335020031231
3351 - (dtucker) OpenBSD CVS Sync
3352 - djm@cvs.openbsd.org 2003/12/22 09:16:58
3353 [moduli.c ssh-keygen.1 ssh-keygen.c]
3354 tidy up moduli generation debugging, add -v (verbose/debug) option to
3355 ssh-keygen; ok markus@
3356 - markus@cvs.openbsd.org 2003/12/22 20:29:55
3357 [cipher-3des1.c]
3358 EVP_CIPHER_CTX_cleanup() for the des contexts; pruiksma@freesurf.fr
3359 - jakob@cvs.openbsd.org 2003/12/23 16:12:10
3360 [servconf.c servconf.h session.c sshd_config]
3361 implement KerberosGetAFSToken server option. ok markus@, beck@
3362 - millert@cvs.openbsd.org 2003/12/29 16:39:50
3363 [sshd_config]
3364 KeepAlive has been obsoleted, use TCPKeepAlive instead; markus@ OK
3365 - dtucker@cvs.openbsd.org 2003/12/31 00:24:50
3366 [auth2-passwd.c]
3367 Ignore password change request during password auth (which we currently
3368 don't support) and discard proposed new password. corrections/ok markus@
3369 - (dtucker) [configure.ac] Only test setresuid and setresgid if they exist.
3370
337120031219
3372 - (dtucker) [defines.h] Bug #458: Define SIZE_T_MAX as UINT_MAX if we
3373 typedef size_t ourselves.
3374
337520031218
3376 - (dtucker) [configure.ac] Don't use setre[ug]id on DG-UX, from Tom Orban.
3377 - (dtucker) [auth-pam.c] Do PAM chauthtok during SSH2 keyboard-interactive
3378 authentication. Partially fixes bug #423. Feedback & ok djm@
3379
338020031217
3381 - (djm) OpenBSD CVS Sync
3382 - markus@cvs.openbsd.org 2003/12/09 15:28:43
3383 [serverloop.c]
3384 make ClientKeepAlive work for ssh -N, too (no login shell requested).
3385 1) send a bogus channel request if we find a channel
3386 2) send a bogus global request if we don't have a channel
3387 ok + test beck@
3388 - markus@cvs.openbsd.org 2003/12/09 17:29:04
3389 [sshd.c]
3390 fix -o and HUP; ok henning@
3391 - markus@cvs.openbsd.org 2003/12/09 17:30:05
3392 [ssh.c]
3393 don't modify argv for ssh -o; similar to sshd.c 1.283
3394 - markus@cvs.openbsd.org 2003/12/09 21:53:37
3395 [readconf.c readconf.h scp.1 servconf.c servconf.h sftp.1 ssh.1]
3396 [ssh_config.5 sshconnect.c sshd.c sshd_config.5]
3397 rename keepalive to tcpkeepalive; the old name causes too much
3398 confusion; ok djm, dtucker; with help from jmc@
3399 - dtucker@cvs.openbsd.org 2003/12/09 23:45:32
3400 [clientloop.c]
3401 Clear exit code when ssh -N is terminated with a SIGTERM. ok markus@
3402 - markus@cvs.openbsd.org 2003/12/14 12:37:21
3403 [ssh_config.5]
3404 we don't support GSS KEX; from Simon Wilkinson
3405 - markus@cvs.openbsd.org 2003/12/16 15:49:51
3406 [clientloop.c clientloop.h readconf.c readconf.h scp.1 sftp.1 ssh.1]
3407 [ssh.c ssh_config.5]
3408 application layer keep alive (ServerAliveInterval ServerAliveCountMax)
3409 for ssh(1), similar to the sshd(8) option; ok beck@; with help from
3410 jmc and dtucker@
3411 - markus@cvs.openbsd.org 2003/12/16 15:51:54
3412 [dh.c]
3413 use <= instead of < in dh_estimate; ok provos/hshoexer;
3414 do not return < DH_GRP_MIN
3415 - (dtucker) [acconfig.h configure.ac uidswap.c] Bug #645: Check for
3416 setres[ug]id() present but not implemented (eg some Linux/glibc
3417 combinations).
3418 - (bal) [openbsd-compat/bsd-misc.c] unset 'signal' defined if we are
3419 using a real 'signal()' (Noticed by a NeXT Compile)
3420
342120031209
3422 - (dtucker) OpenBSD CVS Sync
3423 - matthieu@cvs.openbsd.org 2003/11/25 23:10:08
3424 [ssh-add.1]
3425 ssh-add doesn't need to be a descendant of ssh-agent. Ok markus@, jmc@.
3426 - djm@cvs.openbsd.org 2003/11/26 21:44:29
3427 [cipher-aes.c]
3428 fix #ifdef before #define; ok markus@
3429 (RCS ID sync only, Portable already had this)
3430 - markus@cvs.openbsd.org 2003/12/02 12:15:10
3431 [progressmeter.c]
3432 improvments from andreas@:
3433 * saner speed estimate for transfers that takes less than a second by
3434 rounding the time to 1 second.
3435 * when the transfer is finished calculate the actual total speed
3436 rather than the current speed which is given during the transfer
3437 - markus@cvs.openbsd.org 2003/12/02 17:01:15
3438 [channels.c session.c ssh-agent.c ssh.h sshd.c]
3439 use SSH_LISTEN_BACKLOG (=128) in listen(2).
3440 - djm@cvs.openbsd.org 2003/12/07 06:34:18
3441 [moduli.c]
3442 remove unused debugging #define templates
3443 - markus@cvs.openbsd.org 2003/12/08 11:00:47
3444 [kexgexc.c]
3445 print requested group size in debug; ok djm
3446 - dtucker@cvs.openbsd.org 2003/12/09 13:52:55
3447 [moduli.c]
3448 Prevent ssh-keygen -T from outputting moduli with a generator of 0, since
3449 they can't be used for Diffie-Hellman. Assistance and ok djm@
3450 - (dtucker) [ssh-keyscan.c] Sync RCSIDs, missed in SSH_SSFDMAX change below.
3451
345220031208
3453 - (tim) [configure.ac] Bug 770. Fix --without-rpath.
3454
345520031123
3456 - (djm) [canohost.c] Move IPv4inV6 mapped address normalisation to its own
3457 function and call it unconditionally
3458 - (djm) OpenBSD CVS Sync
3459 - djm@cvs.openbsd.org 2003/11/23 23:17:34
3460 [ssh-keyscan.c]
3461 from portable - use sysconf to detect fd limit; ok markus@
3462 (tidy diff by adding SSH_SSFDMAX macro to defines.h)
3463 - djm@cvs.openbsd.org 2003/11/23 23:18:45
3464 [ssh-keygen.c]
3465 consistency PATH_MAX -> MAXPATHLEN; ok markus@
3466 (RCS ID sync only)
3467 - djm@cvs.openbsd.org 2003/11/23 23:21:21
3468 [scp.c]
3469 from portable: rename clashing variable limit-> limit_rate; ok markus@
3470 (RCS ID sync only)
3471 - dtucker@cvs.openbsd.org 2003/11/24 00:16:35
3472 [ssh.1 ssh.c]
3473 Make ssh -k mean GSSAPIDelegateCredentials=no. Suggestion & ok markus@
3474 - (djm) Annotate OpenBSD-derived files in openbsd-compat/ with original
3475 source file path (in OpenBSD tree).
3476
347720031122
3478 - (dtucker) [channels.c] Make AIX write limit code clearer. Suggested by djm@
3479 - (dtucker) [auth-passwd.c openbsd-compat/port-aix.c openbsd-compat/port-aix.h]
3480 Move AIX specific password authentication code to port-aix.c, call
3481 authenticate() until reenter flag is clear.
3482 - (dtucker) [auth-sia.c configure.ac] Tru64 update from cmadams at hiwaay.net.
3483 Use permanently_set_uid for SIA, only define DISABLE_FD_PASSING when SIA
3484 is enabled, rely on SIA to check for locked accounts if enabled. ok djm@
3485 - (djm) [scp.c] Rename limitbw -> limit_rate to match upstreamed patch
3486 - (djm) [sftp-int.c] Remove duplicated code from bogus sync
3487 - (djm) [packet.c] Shuffle #ifdef to reduce conditionally compiled code
3488
348920031121
3490 - (djm) OpenBSD CVS Sync
3491 - markus@cvs.openbsd.org 2003/11/20 11:39:28
3492 [progressmeter.c]
3493 fix rounding errors; from andreas@
3494 - djm@cvs.openbsd.org 2003/11/21 11:57:03
3495 [everything]
3496 unexpand and delete whitespace at EOL; ok markus@
3497 (done locally and RCS IDs synced)
3498
349920031118
3500 - (djm) Fix early exit for root auth success when UsePAM=yes and
3501 PermitRootLogin=no
3502 - (dtucker) [auth-pam.c] Convert chauthtok_conv into a generic tty_conv,
3503 and use it for do_pam_session. Fixes problems like pam_motd not
3504 displaying anything. ok djm@
3505 - (dtucker) [auth-pam.c] Only use pam_putenv if our platform has it. ok djm@
3506 - (djm) OpenBSD CVS Sync
3507 - dtucker@cvs.openbsd.org 2003/11/18 00:40:05
3508 [serverloop.c]
3509 Correct check for authctxt->valid. ok djm@
3510 - djm@cvs.openbsd.org 2003/11/18 10:53:07
3511 [monitor.c]
3512 unbreak fake authloop for non-existent users (my screwup). Spotted and
3513 tested by dtucker@; ok markus@
3514
351520031117
3516 - (djm) OpenBSD CVS Sync
3517 - djm@cvs.openbsd.org 2003/11/03 09:03:37
3518 [auth-chall.c]
3519 make this a little more idiot-proof; ok markus@
3520 (includes portable-specific changes)
3521 - jakob@cvs.openbsd.org 2003/11/03 09:09:41
3522 [sshconnect.c]
3523 move changed key warning into warn_changed_key(). ok markus@
3524 - jakob@cvs.openbsd.org 2003/11/03 09:37:32
3525 [sshconnect.c]
3526 do not free static type pointer in warn_changed_key()
3527 - djm@cvs.openbsd.org 2003/11/04 08:54:09
3528 [auth1.c auth2.c auth2-pubkey.c auth.h auth-krb5.c auth-passwd.c]
3529 [auth-rhosts.c auth-rh-rsa.c auth-rsa.c monitor.c serverloop.c]
3530 [session.c]
3531 standardise arguments to auth methods - they should all take authctxt.
3532 check authctxt->valid rather then pw != NULL; ok markus@
3533 - jakob@cvs.openbsd.org 2003/11/08 16:02:40
3534 [auth1.c]
3535 remove unused variable (pw). ok djm@
3536 (id sync only - still used in portable)
3537 - jmc@cvs.openbsd.org 2003/11/08 19:17:29
3538 [sftp-int.c]
3539 typos from Jonathon Gray;
3540 - jakob@cvs.openbsd.org 2003/11/10 16:23:41
3541 [bufaux.c bufaux.h cipher.c cipher.h hostfile.c hostfile.h key.c]
3542 [key.h sftp-common.c sftp-common.h sftp-server.c sshconnect.c sshd.c]
3543 [ssh-dss.c ssh-rsa.c uuencode.c uuencode.h]
3544 constify. ok markus@ & djm@
3545 - dtucker@cvs.openbsd.org 2003/11/12 10:12:15
3546 [scp.c]
3547 When called with -q, pass -q to ssh; suppresses SSH2 banner. ok markus@
3548 - jakob@cvs.openbsd.org 2003/11/12 16:39:58
3549 [dns.c dns.h readconf.c ssh_config.5 sshconnect.c]
3550 update SSHFP validation. ok markus@
3551 - jmc@cvs.openbsd.org 2003/11/12 20:14:51
3552 [ssh_config.5]
3553 make verb agree with subject, and kill some whitespace;
3554 - markus@cvs.openbsd.org 2003/11/14 13:19:09
3555 [sshconnect2.c]
3556 cleanup and minor fixes for the client code; from Simon Wilkinson
3557 - djm@cvs.openbsd.org 2003/11/17 09:45:39
3558 [msg.c msg.h sshconnect2.c ssh-keysign.c]
3559 return error on msg send/receive failure (rather than fatal); ok markus@
3560 - markus@cvs.openbsd.org 2003/11/17 11:06:07
3561 [auth2-gss.c gss-genr.c gss-serv.c monitor.c monitor.h monitor_wrap.c]
3562 [monitor_wrap.h sshconnect2.c ssh-gss.h]
3563 replace "gssapi" with "gssapi-with-mic"; from Simon Wilkinson;
3564 test + ok jakob.
3565 - (djm) Bug #632: Don't call pam_end indirectly from within kbd-int
3566 conversation function
3567 - (djm) Export environment variables from authentication subprocess to
3568 parent. Part of Bug #717
3569
357020031115
3571 - (dtucker) [regress/agent-ptrace.sh] Test for GDB output from Solaris and
3572 HP-UX, skip test on AIX.
3573
357420031113
3575 - (dtucker) [auth-pam.c] Append newlines to lines output by the
3576 pam_chauthtok_conv().
3577 - (dtucker) [README ssh-host-config ssh-user-config Makefile] (All
3578 contrib/cygwin). Major update from vinschen at redhat.com.
3579 - Makefile provides a `cygwin-postinstall' target to run right after
3580 `make install'.
3581 - Better support for Windows 2003 Server.
3582 - Try to get permissions as correct as possible.
3583 - New command line options to allow full automated host configuration.
3584 - Create configs from skeletons in /etc/defaults/etc.
3585 - Use /bin/bash, allows reading user input with readline support.
3586 - Remove really old configs from /usr/local.
3587 - (dtucker) [auth-pam.c] Add newline to accumulated PAM_TEXT_INFO and
3588 PAM_ERROR_MSG messages.
3589
359020031106
3591 - (djm) Clarify UsePAM consequences a little more
3592
359320031103
3594 - (dtucker) [contrib/cygwin/ssh-host-config] Ensure entries in /etc/services
3595 are created correctly with CRLF line terminations. Patch from vinschen at
3596 redhat.com.
3597 - (dtucker) OpenBSD CVS Sync
3598 - markus@cvs.openbsd.org 2003/10/15 09:48:45
3599 [monitor_wrap.c]
3600 check pmonitor != NULL
3601 - markus@cvs.openbsd.org 2003/10/21 09:50:06
3602 [auth2-gss.c]
3603 make sure the doid is larger than 2
3604 - avsm@cvs.openbsd.org 2003/10/26 16:57:43
3605 [sshconnect2.c]
3606 rename 'supported' static var in userauth_gssapi() to 'gss_supported'
3607 to avoid shadowing the global version. markus@ ok
3608 - markus@cvs.openbsd.org 2003/10/28 09:08:06
3609 [misc.c]
3610 error->debug for getsockopt+TCP_NODELAY; several requests
3611 - markus@cvs.openbsd.org 2003/11/02 11:01:03
3612 [auth2-gss.c compat.c compat.h sshconnect2.c]
3613 remove support for SSH_BUG_GSSAPI_BER; simon@sxw.org.uk
3614 - (dtucker) [regress/agent-ptrace.sh] Use numeric uid and gid.
3615
361620031021
3617 - (dtucker) [INSTALL] Some system crypt() functions support MD5 passwords
3618 directly. Noted by Darren.Moffat at sun.com.
3619 - (dtucker) [regress/agent-ptrace.sh] Skip agent-test unless SUDO is set,
3620 make agent setgid during test.
3621
362220031017
3623 - (dtucker) [INSTALL] Note that --with-md5 is now required on platforms with
3624 MD5 passwords even if PAM support is enabled. From steev at detritus.net.
3625
362620031015
3627 - (dtucker) OpenBSD CVS Sync
3628 - jmc@cvs.openbsd.org 2003/10/08 08:27:36
3629 [scp.1 scp.c sftp-server.8 sftp.1 sftp.c ssh.1 sshd.8]
3630 scp and sftp: add options list and sort options. options list requested
3631 by deraadt@
3632 sshd: use same format as ssh
3633 ssh: remove wrong option from list
3634 sftp-server: Subsystem is documented in ssh_config(5), not sshd(8)
3635 ok deraadt@ markus@
3636 - markus@cvs.openbsd.org 2003/10/08 15:21:24
3637 [readconf.c ssh_config.5]
3638 default GSS API to no in client, too; ok jakob, deraadt@
3639 - markus@cvs.openbsd.org 2003/10/11 08:24:08
3640 [readconf.c readconf.h ssh.1 ssh.c ssh_config.5]
3641 remote x11 clients are now untrusted by default, uses xauth(8) to generate
3642 untrusted cookies; ForwardX11Trusted=yes restores old behaviour.
3643 ok deraadt; feedback and ok djm/fries
3644 - markus@cvs.openbsd.org 2003/10/11 08:26:43
3645 [sshconnect2.c]
3646 search keys in reverse order; fixes #684
3647 - markus@cvs.openbsd.org 2003/10/11 11:36:23
3648 [monitor_wrap.c]
3649 return NULL for missing banner; ok djm@
3650 - jmc@cvs.openbsd.org 2003/10/12 13:12:13
3651 [ssh_config.5]
3652 note that EnableSSHKeySign should be in the non-hostspecific section;
3653 remove unnecessary .Pp;
3654 ok markus@
3655 - markus@cvs.openbsd.org 2003/10/13 08:22:25
3656 [scp.1 sftp.1]
3657 don't refer to options related to forwarding; ok jmc@
3658 - jakob@cvs.openbsd.org 2003/10/14 19:42:10
3659 [dns.c dns.h readconf.c ssh-keygen.c sshconnect.c]
3660 include SSHFP lookup code (not enabled by default). ok markus@
3661 - jakob@cvs.openbsd.org 2003/10/14 19:43:23
3662 [README.dns]
3663 update
3664 - markus@cvs.openbsd.org 2003/10/14 19:54:39
3665 [session.c ssh-agent.c]
3666 10X for mkdtemp; djm@
3667 - (dtucker) [acconfig.h configure.ac dns.c openbsd-compat/getrrsetbyname.c
3668 openbsd-compat/getrrsetbyname.h] DNS fingerprint support is now always
3669 compiled in but disabled in config.
3670 - (dtucker) [auth.c] Check for disabled password expiry on HP-UX Trusted Mode.
3671 - (tim) [regress/banner.sh] portability fix.
3672
367320031009
3674 - (dtucker) [sshd_config.5] UsePAM defaults to "no". ok djm@
3675
367620031008
3677 - (dtucker) OpenBSD CVS Sync
3678 - dtucker@cvs.openbsd.org 2003/10/07 01:47:27
3679 [sshconnect2.c]
3680 Don't use logit for banner, since it truncates to MSGBUFSIZ; bz #668 &
3681 #707. ok markus@
3682 - djm@cvs.openbsd.org 2003/10/07 07:04:16
3683 [sftp-int.c]
3684 sftp quoting fix from admorten AT umich.edu; ok markus@
3685 - deraadt@cvs.openbsd.org 2003/10/07 21:58:28
3686 [sshconnect2.c]
3687 set ptr to NULL after free
3688 - dtucker@cvs.openbsd.org 2003/10/07 01:52:13
3689 [regress/Makefile regress/banner.sh]
3690 Test SSH2 banner. ok markus@
3691 - djm@cvs.openbsd.org 2003/10/07 07:04:52
3692 [regress/sftp-cmds.sh]
3693 more sftp quoting regress tests; ok markus
3694
369520031007
3696 - (djm) Delete autom4te.cache after autoreconf
3697 - (dtucker) [auth-pam.c auth-pam.h session.c] Make PAM use the new static
3698 cleanup functions. With & ok djm@
3699 - (dtucker) [contrib/redhat/openssh.spec] Bug #714: Now that UsePAM is a
3700 run-time switch, always build --with-md5-passwords.
3701 - (dtucker) [configure.ac openbsd-compat/Makefile.in openbsd-compat/strtoul.c]
3702 Bug #670: add strtoul() to openbsd-compat for platforms lacking it. ok djm@
3703 - (dtucker) [configure.ac] Bug #715: Set BROKEN_SETREUID and BROKEN_SETREGID
3704 on Reliant Unix. Patch from Robert.Dahlem at siemens.com.
3705 - (dtucker) [configure.ac] Bug #710: Check for dlsym() in libdl on
3706 Reliant Unix. Based on patch from Robert.Dahlem at siemens.com.
3707
370820031003
3709 - (dtucker) OpenBSD CVS Sync
3710 - markus@cvs.openbsd.org 2003/10/02 10:41:59
3711 [sshd.c]
3712 print openssl version, too, several requests; ok henning/djm.
3713 - markus@cvs.openbsd.org 2003/10/02 08:26:53
3714 [ssh-gss.h]
3715 missing $OpenBSD:; dtucker
3716 - (tim) [contrib/caldera/openssh.spec] Remove obsolete --with-ipv4-default
3717 option.
3718
371920031002
3720 - (dtucker) OpenBSD CVS Sync
3721 - markus@cvs.openbsd.org 2003/09/23 20:17:11
3722 [Makefile.in auth1.c auth2.c auth.c auth.h auth-krb5.c canohost.c
3723 cleanup.c clientloop.c fatal.c gss-serv.c log.c log.h monitor.c monitor.h
3724 monitor_wrap.c monitor_wrap.h packet.c serverloop.c session.c session.h
3725 ssh-agent.c sshd.c]
3726 replace fatal_cleanup() and linked list of fatal callbacks with static
3727 cleanup_exit() function. re-refine cleanup_exit() where appropriate,
3728 allocate sshd's authctxt eary to allow simpler cleanup in sshd.
3729 tested by many, ok deraadt@
3730 - markus@cvs.openbsd.org 2003/09/23 20:18:52
3731 [progressmeter.c]
3732 don't print trailing \0; bug #709; Robert.Dahlem@siemens.com
3733 ok millert/deraadt@
3734 - markus@cvs.openbsd.org 2003/09/23 20:41:11
3735 [channels.c channels.h clientloop.c]
3736 move client only agent code to clientloop.c
3737 - markus@cvs.openbsd.org 2003/09/26 08:19:29
3738 [sshd.c]
3739 no need to set the listen sockets to non-block; ok deraadt@
3740 - jmc@cvs.openbsd.org 2003/09/29 11:40:51
3741 [ssh.1]
3742 - add list of options to -o and .Xr ssh_config(5)
3743 - some other cleanup
3744 requested by deraadt@;
3745 ok deraadt@ markus@
3746 - markus@cvs.openbsd.org 2003/09/29 20:19:57
3747 [servconf.c sshd_config]
3748 GSSAPICleanupCreds -> GSSAPICleanupCredentials
3749 - (dtucker) [configure.ac] Don't set DISABLE_SHADOW when configuring
3750 --with-pam. ok djm@
3751 - (dtucker) [ssh-gss.h] Prototype change missed in sync.
3752 - (dtucker) [session.c] Fix bus errors on some 64-bit Solaris configurations.
3753 Based on patches by Matthias Koeppe and Thomas Baden. ok djm@
3754
375520030930
3756 - (bal) Fix issues in openbsd-compat/realpath.c
3757
375820030925
3759 - (dtucker) [configure.ac openbsd-compat/xcrypt.c] Bug #633: Remove
3760 DISABLE_SHADOW for HP-UX, use getspnam instead of getprpwnam. Patch from
3761 michael_steffens at hp.com, ok djm@
3762 - (tim) [sshd_config] UsePAM defaults to no.
3763
376420030924
3765 - (djm) Update version.h and spec files for HEAD
3766 - (dtucker) [configure.ac] IRIX5 needs the same setre[ug]id defines as IRIX6.
3767
376820030923
3769 - (dtucker) [Makefile.in] Bug #644: Fix "make clean" for out-of-tree
3770 builds. Portability corrections from tim@.
3771 - (dtucker) [configure.ac] Bug #665: uid swapping issues on Mac OS X.
3772 Patch from max at quendi.de.
3773 - (dtucker) [configure.ac] Bug #657: uid swapping issues on BSDi.
3774 - (dtucker) [configure.ac] Bug #653: uid swapping issues on Tru64.
3775 - (dtucker) [configure.ac] Bug #693: uid swapping issues on NCR MP-RAS.
3776 Patch from david.haughton at ncr.com
3777 - (dtucker) [configure.ac] Bug #659: uid swapping issues on IRIX 6.
3778 Part of patch supplied by bugzilla-openssh at thewrittenword.com
3779 - (dtucker) [configure.ac openbsd-compat/fake-rfc2553.c
3780 openbsd-compat/fake-rfc2553.h] Bug #659: Test for and handle systems with
3781 where gai_strerror is defined as "const char *". Part of patch supplied
3782 by bugzilla-openssh at thewrittenword.com
3783 - (dtucker) [contrib/cygwin/README contrib/cygwin/ssh-host-config] Update
3784 ssh-host-config to match current defaults, bump README version. Patch from
3785 vinschen at redhat.com.
3786 - (dtucker) [uidswap.c] Don't test restoration of uid on Cygwin since the
3787 OS does not support permanently dropping privileges. Patch from
3788 vinschen at redhat.com.
3789 - (dtucker) [openbsd-compat/port-aix.c] Use correct include for xmalloc.h,
3790 add canohost.h to stop warning. Based on patch from openssh-unix-dev at
3791 thewrittenword.com
3792 - (dtucker) [INSTALL] Bug #686: Document requirement for zlib 1.1.4 or
3793 higher.
3794 - (tim) Fix typo. s/SETEIUD_BREAKS_SETUID/SETEUID_BREAKS_SETUID/
3795 - (tim) [configure.ac] Bug 665: move 3 new AC_DEFINES outside of AC_TRY_RUN.
3796 Report by distler AT golem ph utexas edu.
3797 - (dtucker) [contrib/aix/pam.conf] Include example pam.conf for AIX from
3798 article by genty at austin.ibm.com, included with the author's permission.
3799 - (dtucker) OpenBSD CVS Sync
3800 - markus@cvs.openbsd.org 2003/09/18 07:52:54
3801 [sshconnect.c]
3802 missing {}; bug #656; jclonguet at free.fr
3803 - markus@cvs.openbsd.org 2003/09/18 07:54:48
3804 [buffer.c]
3805 protect against double free; #660; zardoz at users.sf.net
3806 - markus@cvs.openbsd.org 2003/09/18 07:56:05
3807 [authfile.c]
3808 missing buffer_free(&encrypted); #662; zardoz at users.sf.net
3809 - markus@cvs.openbsd.org 2003/09/18 08:49:45
3810 [deattack.c misc.c session.c ssh-agent.c]
3811 more buffer allocation fixes; from Solar Designer; CAN-2003-0682;
3812 ok millert@
3813 - miod@cvs.openbsd.org 2003/09/18 13:02:21
3814 [authfd.c bufaux.c dh.c mac.c ssh-keygen.c]
3815 A few signedness fixes for harmless situations; markus@ ok
3816 - markus@cvs.openbsd.org 2003/09/19 09:02:02
3817 [packet.c]
3818 buffer_dump only if PACKET_DEBUG is defined; Jedi/Sector One; pr 3471
3819 - markus@cvs.openbsd.org 2003/09/19 09:03:00
3820 [buffer.c]
3821 sign fix in buffer_dump; Jedi/Sector One; pr 3473
3822 - markus@cvs.openbsd.org 2003/09/19 11:29:40
3823 [ssh-agent.c]
3824 provide a ssh-agent specific fatal() function; ok deraadt
3825 - markus@cvs.openbsd.org 2003/09/19 11:30:39
3826 [ssh-keyscan.c]
3827 avoid fatal_cleanup, just call exit(); ok deraadt
3828 - markus@cvs.openbsd.org 2003/09/19 11:31:33
3829 [channels.c]
3830 do not call channel_free_all on fatal; ok deraadt
3831 - markus@cvs.openbsd.org 2003/09/19 11:33:09
3832 [packet.c sshd.c]
3833 do not call packet_close on fatal; ok deraadt
3834 - markus@cvs.openbsd.org 2003/09/19 17:40:20
3835 [scp.c]
3836 error handling for remote-remote copy; #638; report Harald Koenig;
3837 ok millert, fgs, henning, deraadt
3838 - markus@cvs.openbsd.org 2003/09/19 17:43:35
3839 [clientloop.c sshtty.c sshtty.h]
3840 remove fatal callbacks from client code; ok deraadt
3841 - (bal) "extration" -> "extraction" in ssh-rand-helper.c; repoted by john
3842 on #unixhelp@efnet
3843 - (tim) [configure.ac] add --disable-etc-default-login option. ok djm
3844 - (djm) Sync with V_3_7 branch:
3845 - (djm) Fix SSH1 challenge kludge
3846 - (djm) Bug #671: Fix builds on OpenBSD
3847 - (djm) Bug #676: Fix PAM stack corruption
3848 - (djm) Fix bad free() in PAM code
3849 - (djm) Don't call pam_end before pam_init
3850 - (djm) Enable build with old OpenSSL again
3851 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
3852 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
3853
3854$Id: ChangeLog,v 1.4117.2.10 2006/02/11 00:00:44 djm Exp $
diff --git a/ChangeLog.gssapi b/ChangeLog.gssapi
new file mode 100644
index 000000000..010612c4c
--- /dev/null
+++ b/ChangeLog.gssapi
@@ -0,0 +1,69 @@
120070317
2 - [ gss-serv-krb5.c ]
3 Remove C99ism, where new_ccname was being declared in the middle of a
4 function
5
620061220
7 - [ servconf.c ]
8 Make default for GSSAPIStrictAcceptorCheck be Yes, to match previous, and
9 documented, behaviour. Reported by Dan Watson.
10
1120060910
12 - [ gss-genr.c kexgssc.c kexgsss.c kex.h monitor.c sshconnect2.c sshd.c
13 ssh-gss.h ]
14 add support for gss-group14-sha1 key exchange mechanisms
15 - [ gss-serv.c servconf.c servconf.h sshd_config sshd_config.5 ]
16 Add GSSAPIStrictAcceptorCheck option to allow the disabling of
17 acceptor principal checking on multi-homed machines.
18 <Bugzilla #928>
19 - [ sshd_config ssh_config ]
20 Add settings for GSSAPIKeyExchange and GSSAPITrustDNS to the sample
21 configuration files
22 - [ kexgss.c kegsss.c sshconnect2.c sshd.c ]
23 Code cleanup. Replace strlen/xmalloc/snprintf sequences with xasprintf()
24 Limit length of error messages displayed by client
25
2620060909
27 - [ gss-genr.c gss-serv.c ]
28 move ssh_gssapi_acquire_cred() and ssh_gssapi_server_ctx to be server
29 only, where they belong
30 <Bugzilla #1225>
31
3220060829
33 - [ gss-serv-krb5.c ]
34 Fix CCAPI credentials cache name when creating KRB5CCNAME environment
35 variable
36
3720060828
38 - [ gss-genr.c ]
39 Avoid Heimdal context freeing problem
40 <Fixed upstream 20060829>
41
4220060818
43 - [ gss-genr.c ssh-gss.h sshconnect2.c ]
44 Make sure that SPENGO is disabled
45 <Bugzilla #1218 - Fixed upstream 20060818>
46
4720060421
48 - [ gssgenr.c, sshconnect2.c ]
49 a few type changes (signed versus unsigned, int versus size_t) to
50 fix compiler errors/warnings
51 (from jbasney AT ncsa.uiuc.edu)
52 - [ kexgssc.c, sshconnect2.c ]
53 fix uninitialized variable warnings
54 (from jbasney AT ncsa.uiuc.edu)
55 - [ gssgenr.c ]
56 pass oid to gss_display_status (helpful when using GSSAPI mechglue)
57 (from jbasney AT ncsa.uiuc.edu)
58 <Bugzilla #1220 >
59 - [ gss-serv-krb5.c ]
60 #ifdef HAVE_GSSAPI_KRB5 should be #ifdef HAVE_GSSAPI_KRB5_H
61 (from jbasney AT ncsa.uiuc.edu)
62 <Fixed upstream 20060304>
63 - [ readconf.c, readconf.h, ssh_config.5, sshconnect2.c
64 add client-side GssapiKeyExchange option
65 (from jbasney AT ncsa.uiuc.edu)
66 - [ sshconnect2.c ]
67 add support for GssapiTrustDns option for gssapi-with-mic
68 (from jbasney AT ncsa.uiuc.edu)
69 <gssapi-with-mic support is Bugzilla #1008>
diff --git a/INSTALL b/INSTALL
index 753d2d061..af02c0b49 100644
--- a/INSTALL
+++ b/INSTALL
@@ -12,6 +12,8 @@ http://www.openssl.org/
12(OpenSSL 0.9.5a is partially supported, but some ciphers (SSH protocol 1 12(OpenSSL 0.9.5a is partially supported, but some ciphers (SSH protocol 1
13Blowfish) do not work correctly.) 13Blowfish) do not work correctly.)
14 14
15The remaining items are optional.
16
15OpenSSH can utilise Pluggable Authentication Modules (PAM) if your system 17OpenSSH can utilise Pluggable Authentication Modules (PAM) if your system
16supports it. PAM is standard on Redhat and Debian Linux, Solaris and 18supports it. PAM is standard on Redhat and Debian Linux, Solaris and
17HP-UX 11. 19HP-UX 11.
@@ -57,13 +59,30 @@ installed. No other S/Key library is currently known to be supported.
57http://www.sparc.spb.su/solaris/skey/ 59http://www.sparc.spb.su/solaris/skey/
58 60
59LibEdit: 61LibEdit:
60sftp now supports command-line editing via NetBSD's libedit. If your 62
61platform has it available natively you can use that, alternatively 63sftp supports command-line editing via NetBSD's libedit. If your platform
62you might try these multi-platform ports: 64has it available natively you can use that, alternatively you might try
65these multi-platform ports:
63 66
64http://www.thrysoee.dk/editline/ 67http://www.thrysoee.dk/editline/
65http://sourceforge.net/projects/libedit/ 68http://sourceforge.net/projects/libedit/
66 69
70Autoconf:
71
72If you modify configure.ac or configure doesn't exist (eg if you checked
73the code out of CVS yourself) then you will need autoconf-2.61 to rebuild
74the automatically generated files by running "autoreconf". Earlier
75version may also work but this is not guaranteed.
76
77http://www.gnu.org/software/autoconf/
78
79Basic Security Module (BSM):
80
81Native BSM support is know to exist in Solaris from at least 2.5.1,
82FreeBSD 6.1 and OS X. Alternatively, you may use the OpenBSM
83implementation (http://www.openbsm.org).
84
85
672. Building / Installation 862. Building / Installation
68-------------------------- 87--------------------------
69 88
@@ -113,6 +132,10 @@ name).
113 132
114There are a few other options to the configure script: 133There are a few other options to the configure script:
115 134
135--with-audit=[module] enable additional auditing via the specified module.
136Currently, drivers for "debug" (additional info via syslog) and "bsm"
137(Sun's Basic Security Module) are supported.
138
116--with-pam enables PAM support. If PAM support is compiled in, it must 139--with-pam enables PAM support. If PAM support is compiled in, it must
117also be enabled in sshd_config (refer to the UsePAM directive). 140also be enabled in sshd_config (refer to the UsePAM directive).
118 141
@@ -165,6 +188,8 @@ created.
165--with-ssl-dir=DIR allows you to specify where your OpenSSL libraries 188--with-ssl-dir=DIR allows you to specify where your OpenSSL libraries
166are installed. 189are installed.
167 190
191--with-ssl-engine enables OpenSSL's (hardware) ENGINE support
192
168--with-4in6 Check for IPv4 in IPv6 mapped addresses and convert them to 193--with-4in6 Check for IPv4 in IPv6 mapped addresses and convert them to
169real (AF_INET) IPv4 addresses. Works around some quirks on Linux. 194real (AF_INET) IPv4 addresses. Works around some quirks on Linux.
170 195
@@ -208,7 +233,8 @@ for sshd, ssh and ssh-agent.
208------------------------- 233-------------------------
209 234
210$ make survey 235$ make survey
211[check the contents and make sure there's no sensitive information] 236[check the contents of the file "survey" to ensure there's no information
237that you consider sensitive]
212$ make send-survey 238$ make send-survey
213 239
214This will send configuration information for the currently configured 240This will send configuration information for the currently configured
@@ -225,4 +251,4 @@ Please refer to the "reporting bugs" section of the webpage at
225http://www.openssh.com/ 251http://www.openssh.com/
226 252
227 253
228$Id: INSTALL,v 1.70 2005/04/24 07:52:23 dtucker Exp $ 254$Id: INSTALL,v 1.77 2007/03/02 06:53:41 dtucker Exp $
diff --git a/LICENCE b/LICENCE
index ac3634f22..0c2ff067a 100644
--- a/LICENCE
+++ b/LICENCE
@@ -287,6 +287,8 @@ OpenSSH contains no GPL code.
287 287
288 Internet Software Consortium. 288 Internet Software Consortium.
289 Todd C. Miller 289 Todd C. Miller
290 Reyk Floeter
291 Chad Mynhier
290 292
291 * Permission to use, copy, modify, and distribute this software for any 293 * Permission to use, copy, modify, and distribute this software for any
292 * purpose with or without fee is hereby granted, provided that the above 294 * purpose with or without fee is hereby granted, provided that the above
diff --git a/Makefile.in b/Makefile.in
index f1b45cdde..ce0239d05 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,4 +1,4 @@
1# $Id: Makefile.in,v 1.274 2006/01/01 08:47:05 djm Exp $ 1# $Id: Makefile.in,v 1.283 2006/10/23 21:44:47 tim 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@
@@ -11,6 +11,7 @@ bindir=@bindir@
11sbindir=@sbindir@ 11sbindir=@sbindir@
12libexecdir=@libexecdir@ 12libexecdir=@libexecdir@
13datadir=@datadir@ 13datadir=@datadir@
14datarootdir=@datarootdir@
14mandir=@mandir@ 15mandir=@mandir@
15mansubdir=@mansubdir@ 16mansubdir=@mansubdir@
16sysconfdir=@sysconfdir@ 17sysconfdir=@sysconfdir@
@@ -43,6 +44,8 @@ LD=@LD@
43CFLAGS=@CFLAGS@ 44CFLAGS=@CFLAGS@
44CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@ 45CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
45LIBS=@LIBS@ 46LIBS=@LIBS@
47LIBSELINUX=@LIBSELINUX@
48SSHDLIBS=@SSHDLIBS@
46LIBEDIT=@LIBEDIT@ 49LIBEDIT=@LIBEDIT@
47LIBPAM=@LIBPAM@ 50LIBPAM=@LIBPAM@
48LIBWRAP=@LIBWRAP@ 51LIBWRAP=@LIBWRAP@
@@ -62,11 +65,11 @@ INSTALL_SSH_RAND_HELPER=@INSTALL_SSH_RAND_HELPER@
62 65
63TARGETS=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) 66TARGETS=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)
64 67
65LIBSSH_OBJS=acss.o authfd.o authfile.o bufaux.o buffer.o \ 68LIBSSH_OBJS=acss.o authfd.o authfile.o bufaux.o bufbn.o buffer.o \
66 canohost.o channels.o cipher.o cipher-acss.o cipher-aes.o \ 69 canohost.o channels.o cipher.o cipher-acss.o cipher-aes.o \
67 cipher-bf1.o cipher-ctr.o cipher-3des1.o cleanup.o \ 70 cipher-bf1.o cipher-ctr.o cipher-3des1.o cleanup.o \
68 compat.o compress.o crc32.o deattack.o fatal.o hostfile.o \ 71 compat.o compress.o crc32.o deattack.o fatal.o hostfile.o \
69 log.o match.o moduli.o nchan.o packet.o \ 72 log.o match.o md-sha256.o moduli.o nchan.o packet.o \
70 readpass.o rsa.o ttymodes.o xmalloc.o \ 73 readpass.o rsa.o ttymodes.o xmalloc.o \
71 atomicio.o key.o dispatch.o kex.o mac.o uidswap.o uuencode.o misc.o \ 74 atomicio.o key.o dispatch.o kex.o mac.o uidswap.o uuencode.o misc.o \
72 monitor_fdpass.o rijndael.o ssh-dss.o ssh-rsa.o dh.o kexdh.o \ 75 monitor_fdpass.o rijndael.o ssh-dss.o ssh-rsa.o dh.o kexdh.o \
@@ -86,7 +89,7 @@ SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \
86 auth-krb5.o \ 89 auth-krb5.o \
87 auth2-gss.o gss-serv.o gss-serv-krb5.o kexgsss.o\ 90 auth2-gss.o gss-serv.o gss-serv-krb5.o kexgsss.o\
88 loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \ 91 loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \
89 audit.o audit-bsm.o 92 audit.o audit-bsm.o platform.o
90 93
91MANPAGES = 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 94MANPAGES = 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
92MANPAGES_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 95MANPAGES_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
@@ -107,7 +110,7 @@ PATHSUBS = \
107 -e 's|/etc/ssh/ssh_host_rsa_key|$(sysconfdir)/ssh_host_rsa_key|g' \ 110 -e 's|/etc/ssh/ssh_host_rsa_key|$(sysconfdir)/ssh_host_rsa_key|g' \
108 -e 's|/var/run/sshd.pid|$(piddir)/sshd.pid|g' \ 111 -e 's|/var/run/sshd.pid|$(piddir)/sshd.pid|g' \
109 -e 's|/etc/ssh/moduli|$(sysconfdir)/moduli|g' \ 112 -e 's|/etc/ssh/moduli|$(sysconfdir)/moduli|g' \
110 -e 's|/etc/sshrc|$(sysconfdir)/sshrc|g' \ 113 -e 's|/etc/ssh/sshrc|$(sysconfdir)/sshrc|g' \
111 -e 's|/usr/X11R6/bin/xauth|$(XAUTH_PATH)|g' \ 114 -e 's|/usr/X11R6/bin/xauth|$(XAUTH_PATH)|g' \
112 -e 's|/var/empty|$(PRIVSEP_PATH)|g' \ 115 -e 's|/var/empty|$(PRIVSEP_PATH)|g' \
113 -e 's|/usr/bin:/bin:/usr/sbin:/sbin|@user_path@|g' 116 -e 's|/usr/bin:/bin:/usr/sbin:/sbin|@user_path@|g'
@@ -136,7 +139,7 @@ ssh$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHOBJS)
136 $(LD) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) 139 $(LD) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
137 140
138sshd$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHDOBJS) 141sshd$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHDOBJS)
139 $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBWRAP) $(LIBPAM) $(LIBS) 142 $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBWRAP) $(LIBPAM) $(LIBSELINUX) $(SSHDLIBS) $(LIBS)
140 143
141scp$(EXEEXT): $(LIBCOMPAT) libssh.a scp.o progressmeter.o 144scp$(EXEEXT): $(LIBCOMPAT) libssh.a scp.o progressmeter.o
142 $(LD) -o $@ scp.o progressmeter.o bufaux.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) 145 $(LD) -o $@ scp.o progressmeter.o bufaux.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
@@ -201,8 +204,9 @@ clean: regressclean
201 204
202distclean: regressclean 205distclean: regressclean
203 rm -f *.o *.a $(TARGETS) logintest config.cache config.log 206 rm -f *.o *.a $(TARGETS) logintest config.cache config.log
204 rm -f *.out core opensshd.init 207 rm -f *.out core opensshd.init openssh.xml
205 rm -f Makefile buildpkg.sh config.h config.status ssh_prng_cmds survey.sh *~ 208 rm -f Makefile buildpkg.sh config.h config.status ssh_prng_cmds
209 rm -f survey.sh openbsd-compat/regress/Makefile *~
206 rm -rf autom4te.cache 210 rm -rf autom4te.cache
207 (cd openbsd-compat && $(MAKE) distclean) 211 (cd openbsd-compat && $(MAKE) distclean)
208 (cd scard && $(MAKE) distclean) 212 (cd scard && $(MAKE) distclean)
@@ -410,6 +414,9 @@ tests: $(TARGETS)
410 EXEEXT="$(EXEEXT)" \ 414 EXEEXT="$(EXEEXT)" \
411 $@ 415 $@
412 416
417compat-tests: $(LIBCOMPAT)
418 (cd openbsd-compat/regress && $(MAKE))
419
413regressclean: 420regressclean:
414 if [ -f regress/Makefile ] && [ -r regress/Makefile ]; then \ 421 if [ -f regress/Makefile ] && [ -r regress/Makefile ]; then \
415 (cd regress && $(MAKE) clean) \ 422 (cd regress && $(MAKE) clean) \
diff --git a/OVERVIEW b/OVERVIEW
index d1a768c10..2e1cc0ba3 100644
--- a/OVERVIEW
+++ b/OVERVIEW
@@ -162,8 +162,7 @@ these programs.
162 - There are several other files in the distribution that contain 162 - There are several other files in the distribution that contain
163 various auxiliary routines: 163 various auxiliary routines:
164 ssh.h the main header file for ssh (various definitions) 164 ssh.h the main header file for ssh (various definitions)
165 getput.h byte-order independent storage of integers
166 includes.h includes most system headers. Lots of #ifdefs.
167 tildexpand.c expand tilde in file names
168 uidswap.c uid-swapping 165 uidswap.c uid-swapping
169 xmalloc.c "safe" malloc routines 166 xmalloc.c "safe" malloc routines
167
168$OpenBSD: OVERVIEW,v 1.11 2006/08/03 03:34:41 deraadt Exp $
diff --git a/README b/README
index c8c413195..0c732cffe 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
1See http://www.openssh.com/txt/release-4.3p2 for the release notes. 1See http://www.openssh.com/txt/release-4.6 for the release notes.
2 2
3- A Japanese translation of this document and of the OpenSSH FAQ is 3- A Japanese translation of this document and of the OpenSSH FAQ is
4- available at http://www.unixuser.org/~haruyama/security/openssh/index.html 4- available at http://www.unixuser.org/~haruyama/security/openssh/index.html
@@ -62,4 +62,4 @@ References -
62[6] http://www.openbsd.org/cgi-bin/man.cgi?query=style&sektion=9 62[6] http://www.openbsd.org/cgi-bin/man.cgi?query=style&sektion=9
63[7] http://www.openssh.com/faq.html 63[7] http://www.openssh.com/faq.html
64 64
65$Id: README,v 1.61.2.1 2006/02/10 23:43:34 dtucker Exp $ 65$Id: README,v 1.64.4.1 2007/03/06 10:27:56 djm Exp $
diff --git a/README.platform b/README.platform
index 4c18a3278..b7dc3f91c 100644
--- a/README.platform
+++ b/README.platform
@@ -30,6 +30,18 @@ gcc, gcc-mingw-core, mingw-runtime, binutils, make, openssl,
30openssl-devel, zlib, minres, minires-devel. 30openssl-devel, zlib, minres, minires-devel.
31 31
32 32
33Darwin and MacOS X
34------------------
35Darwin does not provide a tun(4) driver required for OpenSSH-based
36virtual private networks. The BSD manpage still exists, but the driver
37has been removed in recent releases of Darwin and MacOS X.
38
39Nevertheless, tunnel support is known to work with Darwin 8 and
40MacOS X 10.4 in Point-to-Point (Layer 3) and Ethernet (Layer 2) mode
41using a third party driver. More information is available at:
42 http://www-user.rhrk.uni-kl.de/~nissler/tuntap/
43
44
33Solaris 45Solaris
34------- 46-------
35If you enable BSM auditing on Solaris, you need to update audit_event(4) 47If you enable BSM auditing on Solaris, you need to update audit_event(4)
@@ -55,4 +67,4 @@ account stacks which will prevent authentication entirely, but will still
55return the output from pam_nologin to the client. 67return the output from pam_nologin to the client.
56 68
57 69
58$Id: README.platform,v 1.6 2005/11/05 05:28:35 dtucker Exp $ 70$Id: README.platform,v 1.7 2006/06/23 11:05:13 dtucker Exp $
diff --git a/README.tun b/README.tun
index d814f396d..5e1cb074c 100644
--- a/README.tun
+++ b/README.tun
@@ -87,12 +87,12 @@ combination with layer 2 tunneling and Ethernet bridging.
87| Client |------( Internet )-----| access.somewhere.net | 87| Client |------( Internet )-----| access.somewhere.net |
88+--------+ ( ) +----------------------+ 88+--------+ ( ) +----------------------+
89 : 192.168.1.78 | 89 : 192.168.1.78 |
90 :............................. +-------+ 90 :............................. +-------+
91 Forwarded ssh connection : | dmzgw | 91 Forwarded ssh connection : | dmzgw |
92 Layer 2 tunnel : +-------+ 92 Layer 2 tunnel : +-------+
93 : | 93 : |
94 : | 94 : |
95 : +------------+ 95 : +------------+
96 :......| sshgateway | 96 :......| sshgateway |
97 | +------------+ 97 | +------------+
98--- real connection Bridge -> | +----------+ 98--- real connection Bridge -> | +----------+
@@ -104,7 +104,7 @@ combination with layer 2 tunneling and Ethernet bridging.
104 104
105Finally connect to the OpenSSH server to establish the tunnel by using 105Finally connect to the OpenSSH server to establish the tunnel by using
106the following command: 106the following command:
107 107
108 ssh sshgateway 108 ssh sshgateway
109 109
110It is also possible to tell the client to fork into the background after 110It is also possible to tell the client to fork into the background after
@@ -129,4 +129,4 @@ interconnect corporate networks.
129 129
130 Reyk Floeter 130 Reyk Floeter
131 131
132$OpenBSD: README.tun,v 1.3 2005/12/08 18:34:10 reyk Exp $ 132$OpenBSD: README.tun,v 1.4 2006/03/28 00:12:31 deraadt Exp $
diff --git a/acss.c b/acss.c
index 99efde071..86e2c01a8 100644
--- a/acss.c
+++ b/acss.c
@@ -1,4 +1,4 @@
1/* $Id: acss.c,v 1.3 2005/07/17 07:04:47 djm Exp $ */ 1/* $Id: acss.c,v 1.4 2006/07/24 04:51:01 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2004 The OpenBSD project 3 * Copyright (c) 2004 The OpenBSD project
4 * 4 *
@@ -16,6 +16,9 @@
16 */ 16 */
17 17
18#include "includes.h" 18#include "includes.h"
19
20#include <string.h>
21
19#include <openssl/evp.h> 22#include <openssl/evp.h>
20 23
21#if !defined(EVP_CTRL_SET_ACSS_MODE) && (OPENSSL_VERSION_NUMBER >= 0x00906000L) 24#if !defined(EVP_CTRL_SET_ACSS_MODE) && (OPENSSL_VERSION_NUMBER >= 0x00906000L)
diff --git a/atomicio.c b/atomicio.c
index 12abbda16..f651a292c 100644
--- a/atomicio.c
+++ b/atomicio.c
@@ -1,4 +1,6 @@
1/* $OpenBSD: atomicio.c,v 1.23 2006/08/03 03:34:41 deraadt Exp $ */
1/* 2/*
3 * Copyright (c) 2006 Damien Miller. All rights reserved.
2 * Copyright (c) 2005 Anil Madhavapeddy. All rights reserved. 4 * Copyright (c) 2005 Anil Madhavapeddy. All rights reserved.
3 * Copyright (c) 1995,1999 Theo de Raadt. All rights reserved. 5 * Copyright (c) 1995,1999 Theo de Raadt. All rights reserved.
4 * All rights reserved. 6 * All rights reserved.
@@ -25,7 +27,12 @@
25 */ 27 */
26 28
27#include "includes.h" 29#include "includes.h"
28RCSID("$OpenBSD: atomicio.c,v 1.13 2005/05/24 17:32:43 avsm Exp $"); 30
31#include <sys/param.h>
32#include <sys/uio.h>
33
34#include <errno.h>
35#include <string.h>
29 36
30#include "atomicio.h" 37#include "atomicio.h"
31 38
@@ -33,11 +40,7 @@ RCSID("$OpenBSD: atomicio.c,v 1.13 2005/05/24 17:32:43 avsm Exp $");
33 * ensure all of data on socket comes through. f==read || f==vwrite 40 * ensure all of data on socket comes through. f==read || f==vwrite
34 */ 41 */
35size_t 42size_t
36atomicio(f, fd, _s, n) 43atomicio(ssize_t (*f) (int, void *, size_t), int fd, void *_s, size_t n)
37 ssize_t (*f) (int, void *, size_t);
38 int fd;
39 void *_s;
40 size_t n;
41{ 44{
42 char *s = _s; 45 char *s = _s;
43 size_t pos = 0; 46 size_t pos = 0;
@@ -58,8 +61,60 @@ atomicio(f, fd, _s, n)
58 errno = EPIPE; 61 errno = EPIPE;
59 return pos; 62 return pos;
60 default: 63 default:
61 pos += (u_int)res; 64 pos += (size_t)res;
62 } 65 }
63 } 66 }
64 return (pos); 67 return (pos);
65} 68}
69
70/*
71 * ensure all of data on socket comes through. f==readv || f==writev
72 */
73size_t
74atomiciov(ssize_t (*f) (int, const struct iovec *, int), int fd,
75 const struct iovec *_iov, int iovcnt)
76{
77 size_t pos = 0, rem;
78 ssize_t res;
79 struct iovec iov_array[IOV_MAX], *iov = iov_array;
80
81 if (iovcnt > IOV_MAX) {
82 errno = EINVAL;
83 return 0;
84 }
85 /* Make a copy of the iov array because we may modify it below */
86 memcpy(iov, _iov, iovcnt * sizeof(*_iov));
87
88 for (; iovcnt > 0 && iov[0].iov_len > 0;) {
89 res = (f) (fd, iov, iovcnt);
90 switch (res) {
91 case -1:
92 if (errno == EINTR || errno == EAGAIN)
93 continue;
94 return 0;
95 case 0:
96 errno = EPIPE;
97 return pos;
98 default:
99 rem = (size_t)res;
100 pos += rem;
101 /* skip completed iov entries */
102 while (iovcnt > 0 && rem >= iov[0].iov_len) {
103 rem -= iov[0].iov_len;
104 iov++;
105 iovcnt--;
106 }
107 /* This shouldn't happen... */
108 if (rem > 0 && (iovcnt <= 0 || rem > iov[0].iov_len)) {
109 errno = EFAULT;
110 return 0;
111 }
112 if (iovcnt == 0)
113 break;
114 /* update pointer in partially complete iov */
115 iov[0].iov_base = ((char *)iov[0].iov_base) + rem;
116 iov[0].iov_len -= rem;
117 }
118 }
119 return pos;
120}
diff --git a/atomicio.h b/atomicio.h
index 7eccf206b..2fcd25d43 100644
--- a/atomicio.h
+++ b/atomicio.h
@@ -1,6 +1,7 @@
1/* $OpenBSD: atomicio.h,v 1.6 2005/05/24 17:32:43 avsm Exp $ */ 1/* $OpenBSD: atomicio.h,v 1.10 2006/08/03 03:34:41 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2006 Damien Miller. All rights reserved.
4 * Copyright (c) 1995,1999 Theo de Raadt. All rights reserved. 5 * Copyright (c) 1995,1999 Theo de Raadt. All rights reserved.
5 * All rights reserved. 6 * All rights reserved.
6 * 7 *
@@ -25,9 +26,20 @@
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 27 */
27 28
29#ifndef _ATOMICIO_H
30#define _ATOMICIO_H
31
28/* 32/*
29 * Ensure all of data on socket comes through. f==read || f==vwrite 33 * Ensure all of data on socket comes through. f==read || f==vwrite
30 */ 34 */
31size_t atomicio(ssize_t (*)(int, void *, size_t), int, void *, size_t); 35size_t atomicio(ssize_t (*)(int, void *, size_t), int, void *, size_t);
32 36
33#define vwrite (ssize_t (*)(int, void *, size_t))write 37#define vwrite (ssize_t (*)(int, void *, size_t))write
38
39/*
40 * ensure all of data on socket comes through. f==readv || f==writev
41 */
42size_t atomiciov(ssize_t (*)(int, const struct iovec *, int),
43 int, const struct iovec *, int);
44
45#endif /* _ATOMICIO_H */
diff --git a/audit-bsm.c b/audit-bsm.c
index c2679d3da..c26b4caed 100644
--- a/audit-bsm.c
+++ b/audit-bsm.c
@@ -1,4 +1,4 @@
1/* $Id: audit-bsm.c,v 1.1 2005/02/20 10:08:00 dtucker Exp $ */ 1/* $Id: audit-bsm.c,v 1.5 2006/09/30 22:09:50 dtucker Exp $ */
2 2
3/* 3/*
4 * TODO 4 * TODO
@@ -37,8 +37,16 @@
37#include "includes.h" 37#include "includes.h"
38#if defined(USE_BSM_AUDIT) 38#if defined(USE_BSM_AUDIT)
39 39
40#include <sys/types.h>
41
42#include <errno.h>
43#include <stdarg.h>
44#include <unistd.h>
45
40#include "ssh.h" 46#include "ssh.h"
41#include "log.h" 47#include "log.h"
48#include "key.h"
49#include "hostfile.h"
42#include "auth.h" 50#include "auth.h"
43#include "xmalloc.h" 51#include "xmalloc.h"
44 52
diff --git a/audit.c b/audit.c
index c77d0c012..dbea34cb2 100644
--- a/audit.c
+++ b/audit.c
@@ -1,4 +1,4 @@
1/* $Id: audit.c,v 1.3 2005/07/17 07:26:44 djm Exp $ */ 1/* $Id: audit.c,v 1.5 2006/09/01 05:38:36 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2004, 2005 Darren Tucker. All rights reserved. 4 * Copyright (c) 2004, 2005 Darren Tucker. All rights reserved.
@@ -26,10 +26,15 @@
26 26
27#include "includes.h" 27#include "includes.h"
28 28
29#include <stdarg.h>
30#include <string.h>
31
29#ifdef SSH_AUDIT_EVENTS 32#ifdef SSH_AUDIT_EVENTS
30 33
31#include "audit.h" 34#include "audit.h"
32#include "log.h" 35#include "log.h"
36#include "key.h"
37#include "hostfile.h"
33#include "auth.h" 38#include "auth.h"
34 39
35/* 40/*
diff --git a/audit.h b/audit.h
index 78e58966f..695f72354 100644
--- a/audit.h
+++ b/audit.h
@@ -1,4 +1,4 @@
1/* $Id: audit.h,v 1.2 2005/02/08 10:52:48 dtucker Exp $ */ 1/* $Id: audit.h,v 1.3 2006/08/05 14:05:10 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2004, 2005 Darren Tucker. All rights reserved. 4 * Copyright (c) 2004, 2005 Darren Tucker. All rights reserved.
@@ -24,8 +24,6 @@
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27#include "auth.h"
28
29#ifndef _SSH_AUDIT_H 27#ifndef _SSH_AUDIT_H
30# define _SSH_AUDIT_H 28# define _SSH_AUDIT_H
31enum ssh_audit_event_type { 29enum ssh_audit_event_type {
diff --git a/auth-bsdauth.c b/auth-bsdauth.c
index 920c977d8..37d527d11 100644
--- a/auth-bsdauth.c
+++ b/auth-bsdauth.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: auth-bsdauth.c,v 1.10 2006/08/03 03:34:41 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
3 * 4 *
@@ -21,13 +22,23 @@
21 * (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
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 */
25
24#include "includes.h" 26#include "includes.h"
25RCSID("$OpenBSD: auth-bsdauth.c,v 1.6 2005/01/19 13:11:47 dtucker Exp $"); 27
28#include <sys/types.h>
29
30#include <stdarg.h>
26 31
27#ifdef BSD_AUTH 32#ifdef BSD_AUTH
28#include "xmalloc.h" 33#include "xmalloc.h"
34#include "key.h"
35#include "hostfile.h"
29#include "auth.h" 36#include "auth.h"
30#include "log.h" 37#include "log.h"
38#include "buffer.h"
39#ifdef GSSAPI
40#include "ssh-gss.h"
41#endif
31#include "monitor_wrap.h" 42#include "monitor_wrap.h"
32 43
33static void * 44static void *
@@ -69,9 +80,8 @@ bsdauth_query(void *ctx, char **name, char **infotxt,
69 *name = xstrdup(""); 80 *name = xstrdup("");
70 *infotxt = xstrdup(""); 81 *infotxt = xstrdup("");
71 *numprompts = 1; 82 *numprompts = 1;
72 *prompts = xmalloc(*numprompts * sizeof(char *)); 83 *prompts = xcalloc(*numprompts, sizeof(char *));
73 *echo_on = xmalloc(*numprompts * sizeof(u_int)); 84 *echo_on = xcalloc(*numprompts, sizeof(u_int));
74 (*echo_on)[0] = 0;
75 (*prompts)[0] = xstrdup(challenge); 85 (*prompts)[0] = xstrdup(challenge);
76 86
77 return 0; 87 return 0;
diff --git a/auth-chall.c b/auth-chall.c
index e4f783096..919b1eaa4 100644
--- a/auth-chall.c
+++ b/auth-chall.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: auth-chall.c,v 1.12 2006/08/03 03:34:41 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,11 +24,16 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: auth-chall.c,v 1.9 2003/11/03 09:03:37 djm Exp $");
27 27
28#include <sys/types.h>
29
30#include <stdarg.h>
31
32#include "xmalloc.h"
33#include "key.h"
34#include "hostfile.h"
28#include "auth.h" 35#include "auth.h"
29#include "log.h" 36#include "log.h"
30#include "xmalloc.h"
31#include "servconf.h" 37#include "servconf.h"
32 38
33/* limited protocol v1 interface to kbd-interactive authentication */ 39/* limited protocol v1 interface to kbd-interactive authentication */
diff --git a/auth-krb5.c b/auth-krb5.c
index bc37675a2..38164fda8 100644
--- a/auth-krb5.c
+++ b/auth-krb5.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: auth-krb5.c,v 1.19 2006/08/03 03:34:41 deraadt Exp $ */
1/* 2/*
2 * Kerberos v5 authentication and ticket-passing routines. 3 * Kerberos v5 authentication and ticket-passing routines.
3 * 4 *
@@ -28,18 +29,27 @@
28 */ 29 */
29 30
30#include "includes.h" 31#include "includes.h"
31RCSID("$OpenBSD: auth-krb5.c,v 1.16 2005/11/21 09:42:10 dtucker Exp $");
32 32
33#include <sys/types.h>
34#include <pwd.h>
35#include <stdarg.h>
36
37#include "xmalloc.h"
33#include "ssh.h" 38#include "ssh.h"
34#include "ssh1.h" 39#include "ssh1.h"
35#include "packet.h" 40#include "packet.h"
36#include "xmalloc.h"
37#include "log.h" 41#include "log.h"
42#include "buffer.h"
38#include "servconf.h" 43#include "servconf.h"
39#include "uidswap.h" 44#include "uidswap.h"
45#include "key.h"
46#include "hostfile.h"
40#include "auth.h" 47#include "auth.h"
41 48
42#ifdef KRB5 49#ifdef KRB5
50#include <errno.h>
51#include <unistd.h>
52#include <string.h>
43#include <krb5.h> 53#include <krb5.h>
44 54
45extern ServerOptions options; 55extern ServerOptions options;
diff --git a/auth-options.c b/auth-options.c
index ad97e6129..ca5e1c931 100644
--- a/auth-options.c
+++ b/auth-options.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: auth-options.c,v 1.40 2006/08/03 03:34:41 deraadt Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -10,18 +11,31 @@
10 */ 11 */
11 12
12#include "includes.h" 13#include "includes.h"
13RCSID("$OpenBSD: auth-options.c,v 1.33 2005/12/08 18:34:11 reyk Exp $"); 14
15#include <sys/types.h>
16
17#include <netdb.h>
18#include <pwd.h>
19#include <string.h>
20#include <stdio.h>
21#include <stdarg.h>
14 22
15#include "xmalloc.h" 23#include "xmalloc.h"
16#include "match.h" 24#include "match.h"
17#include "log.h" 25#include "log.h"
18#include "canohost.h" 26#include "canohost.h"
27#include "buffer.h"
19#include "channels.h" 28#include "channels.h"
20#include "auth-options.h" 29#include "auth-options.h"
21#include "servconf.h" 30#include "servconf.h"
22#include "misc.h" 31#include "misc.h"
23#include "monitor_wrap.h" 32#include "key.h"
33#include "hostfile.h"
24#include "auth.h" 34#include "auth.h"
35#ifdef GSSAPI
36#include "ssh-gss.h"
37#endif
38#include "monitor_wrap.h"
25 39
26/* Flags set authorized_keys flags */ 40/* Flags set authorized_keys flags */
27int no_port_forwarding_flag = 0; 41int no_port_forwarding_flag = 0;
@@ -131,7 +145,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
131 forced_command = NULL; 145 forced_command = NULL;
132 goto bad_option; 146 goto bad_option;
133 } 147 }
134 forced_command[i] = 0; 148 forced_command[i] = '\0';
135 auth_debug_add("Forced command: %.900s", forced_command); 149 auth_debug_add("Forced command: %.900s", forced_command);
136 opts++; 150 opts++;
137 goto next_option; 151 goto next_option;
@@ -163,7 +177,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
163 xfree(s); 177 xfree(s);
164 goto bad_option; 178 goto bad_option;
165 } 179 }
166 s[i] = 0; 180 s[i] = '\0';
167 auth_debug_add("Adding to environment: %.900s", s); 181 auth_debug_add("Adding to environment: %.900s", s);
168 debug("Adding to environment: %.900s", s); 182 debug("Adding to environment: %.900s", s);
169 opts++; 183 opts++;
@@ -200,7 +214,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
200 xfree(patterns); 214 xfree(patterns);
201 goto bad_option; 215 goto bad_option;
202 } 216 }
203 patterns[i] = 0; 217 patterns[i] = '\0';
204 opts++; 218 opts++;
205 if (match_host_and_ip(remote_host, remote_ip, 219 if (match_host_and_ip(remote_host, remote_ip,
206 patterns) != 1) { 220 patterns) != 1) {
@@ -245,7 +259,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
245 xfree(patterns); 259 xfree(patterns);
246 goto bad_option; 260 goto bad_option;
247 } 261 }
248 patterns[i] = 0; 262 patterns[i] = '\0';
249 opts++; 263 opts++;
250 p = patterns; 264 p = patterns;
251 host = hpdelim(&p); 265 host = hpdelim(&p);
@@ -293,7 +307,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
293 forced_tun_device = -1; 307 forced_tun_device = -1;
294 goto bad_option; 308 goto bad_option;
295 } 309 }
296 tun[i] = 0; 310 tun[i] = '\0';
297 forced_tun_device = a2tun(tun, NULL); 311 forced_tun_device = a2tun(tun, NULL);
298 xfree(tun); 312 xfree(tun);
299 if (forced_tun_device == SSH_TUNID_ERR) { 313 if (forced_tun_device == SSH_TUNID_ERR) {
diff --git a/auth-options.h b/auth-options.h
index 3cd02a71f..853f8b517 100644
--- a/auth-options.h
+++ b/auth-options.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth-options.h,v 1.13 2005/12/06 22:38:27 reyk Exp $ */ 1/* $OpenBSD: auth-options.h,v 1.16 2006/08/03 03:34:41 deraadt Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
diff --git a/auth-pam.c b/auth-pam.c
index fb9ae954a..c08d47229 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -47,7 +47,16 @@
47 47
48/* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */ 48/* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */
49#include "includes.h" 49#include "includes.h"
50RCSID("$Id: auth-pam.c,v 1.128 2006/01/29 05:46:13 dtucker Exp $"); 50
51#include <sys/types.h>
52#include <sys/stat.h>
53#include <sys/wait.h>
54
55#include <errno.h>
56#include <signal.h>
57#include <stdarg.h>
58#include <string.h>
59#include <unistd.h>
51 60
52#ifdef USE_PAM 61#ifdef USE_PAM
53#if defined(HAVE_SECURITY_PAM_APPL_H) 62#if defined(HAVE_SECURITY_PAM_APPL_H)
@@ -63,20 +72,31 @@ RCSID("$Id: auth-pam.c,v 1.128 2006/01/29 05:46:13 dtucker Exp $");
63# define sshpam_const const /* LinuxPAM, OpenPAM */ 72# define sshpam_const const /* LinuxPAM, OpenPAM */
64#endif 73#endif
65 74
75/* Ambiguity in spec: is it an array of pointers or a pointer to an array? */
76#ifdef PAM_SUN_CODEBASE
77# define PAM_MSG_MEMBER(msg, n, member) ((*(msg))[(n)].member)
78#else
79# define PAM_MSG_MEMBER(msg, n, member) ((msg)[(n)]->member)
80#endif
81
82#include "xmalloc.h"
83#include "buffer.h"
84#include "key.h"
85#include "hostfile.h"
66#include "auth.h" 86#include "auth.h"
67#include "auth-pam.h" 87#include "auth-pam.h"
68#include "buffer.h"
69#include "bufaux.h"
70#include "canohost.h" 88#include "canohost.h"
71#include "log.h" 89#include "log.h"
72#include "monitor_wrap.h"
73#include "msg.h" 90#include "msg.h"
74#include "packet.h" 91#include "packet.h"
75#include "misc.h" 92#include "misc.h"
76#include "servconf.h" 93#include "servconf.h"
77#include "ssh2.h" 94#include "ssh2.h"
78#include "xmalloc.h"
79#include "auth-options.h" 95#include "auth-options.h"
96#ifdef GSSAPI
97#include "ssh-gss.h"
98#endif
99#include "monitor_wrap.h"
80 100
81extern ServerOptions options; 101extern ServerOptions options;
82extern Buffer loginmsg; 102extern Buffer loginmsg;
@@ -146,14 +166,16 @@ sshpam_sigchld_handler(int sig)
146 fatal("PAM: authentication thread exited uncleanly"); 166 fatal("PAM: authentication thread exited uncleanly");
147} 167}
148 168
169/* ARGSUSED */
149static void 170static void
150pthread_exit(void *value __unused) 171pthread_exit(void *value)
151{ 172{
152 _exit(0); 173 _exit(0);
153} 174}
154 175
176/* ARGSUSED */
155static int 177static int
156pthread_create(sp_pthread_t *thread, const void *attr __unused, 178pthread_create(sp_pthread_t *thread, const void *attr,
157 void *(*thread_start)(void *), void *arg) 179 void *(*thread_start)(void *), void *arg)
158{ 180{
159 pid_t pid; 181 pid_t pid;
@@ -185,8 +207,9 @@ pthread_cancel(sp_pthread_t thread)
185 return (kill(thread, SIGTERM)); 207 return (kill(thread, SIGTERM));
186} 208}
187 209
210/* ARGSUSED */
188static int 211static int
189pthread_join(sp_pthread_t thread, void **value __unused) 212pthread_join(sp_pthread_t thread, void **value)
190{ 213{
191 int status; 214 int status;
192 215
@@ -284,7 +307,10 @@ import_environments(Buffer *b)
284 307
285 /* Import environment from subprocess */ 308 /* Import environment from subprocess */
286 num_env = buffer_get_int(b); 309 num_env = buffer_get_int(b);
287 sshpam_env = xmalloc((num_env + 1) * sizeof(*sshpam_env)); 310 if (num_env > 1024)
311 fatal("%s: received %u environment variables, expected <= 1024",
312 __func__, num_env);
313 sshpam_env = xcalloc(num_env + 1, sizeof(*sshpam_env));
288 debug3("PAM: num env strings %d", num_env); 314 debug3("PAM: num env strings %d", num_env);
289 for(i = 0; i < num_env; i++) 315 for(i = 0; i < num_env; i++)
290 sshpam_env[i] = buffer_get_string(b, NULL); 316 sshpam_env[i] = buffer_get_string(b, NULL);
@@ -331,9 +357,8 @@ sshpam_thread_conv(int n, sshpam_const struct pam_message **msg,
331 if (n <= 0 || n > PAM_MAX_NUM_MSG) 357 if (n <= 0 || n > PAM_MAX_NUM_MSG)
332 return (PAM_CONV_ERR); 358 return (PAM_CONV_ERR);
333 359
334 if ((reply = malloc(n * sizeof(*reply))) == NULL) 360 if ((reply = calloc(n, sizeof(*reply))) == NULL)
335 return (PAM_CONV_ERR); 361 return (PAM_CONV_ERR);
336 memset(reply, 0, n * sizeof(*reply));
337 362
338 buffer_init(&buffer); 363 buffer_init(&buffer);
339 for (i = 0; i < n; ++i) { 364 for (i = 0; i < n; ++i) {
@@ -412,10 +437,16 @@ sshpam_thread(void *ctxtp)
412 u_int i; 437 u_int i;
413 const char *pam_user; 438 const char *pam_user;
414 const char **ptr_pam_user = &pam_user; 439 const char **ptr_pam_user = &pam_user;
440 char *tz = getenv("TZ");
415 441
416 pam_get_item(sshpam_handle, PAM_USER, 442 pam_get_item(sshpam_handle, PAM_USER,
417 (sshpam_const void **)ptr_pam_user); 443 (sshpam_const void **)ptr_pam_user);
444
418 environ[0] = NULL; 445 environ[0] = NULL;
446 if (tz != NULL)
447 if (setenv("TZ", tz, 1) == -1)
448 error("PAM: could not set TZ environment: %s",
449 strerror(errno));
419 450
420 if (sshpam_authctxt != NULL) { 451 if (sshpam_authctxt != NULL) {
421 setproctitle("%s [pam]", 452 setproctitle("%s [pam]",
@@ -439,8 +470,10 @@ sshpam_thread(void *ctxtp)
439 goto auth_fail; 470 goto auth_fail;
440 471
441 if (compat20) { 472 if (compat20) {
442 if (!do_pam_account()) 473 if (!do_pam_account()) {
474 sshpam_err = PAM_ACCT_EXPIRED;
443 goto auth_fail; 475 goto auth_fail;
476 }
444 if (sshpam_authctxt->force_pwchange) { 477 if (sshpam_authctxt->force_pwchange) {
445 sshpam_err = pam_chauthtok(sshpam_handle, 478 sshpam_err = pam_chauthtok(sshpam_handle,
446 PAM_CHANGE_EXPIRED_AUTHTOK); 479 PAM_CHANGE_EXPIRED_AUTHTOK);
@@ -482,7 +515,10 @@ sshpam_thread(void *ctxtp)
482 buffer_put_cstring(&buffer, 515 buffer_put_cstring(&buffer,
483 pam_strerror(sshpam_handle, sshpam_err)); 516 pam_strerror(sshpam_handle, sshpam_err));
484 /* XXX - can't do much about an error here */ 517 /* XXX - can't do much about an error here */
485 ssh_msg_send(ctxt->pam_csock, PAM_AUTH_ERR, &buffer); 518 if (sshpam_err == PAM_ACCT_EXPIRED)
519 ssh_msg_send(ctxt->pam_csock, PAM_ACCT_EXPIRED, &buffer);
520 else
521 ssh_msg_send(ctxt->pam_csock, PAM_AUTH_ERR, &buffer);
486 buffer_free(&buffer); 522 buffer_free(&buffer);
487 pthread_exit(NULL); 523 pthread_exit(NULL);
488 524
@@ -529,9 +565,8 @@ sshpam_store_conv(int n, sshpam_const struct pam_message **msg,
529 if (n <= 0 || n > PAM_MAX_NUM_MSG) 565 if (n <= 0 || n > PAM_MAX_NUM_MSG)
530 return (PAM_CONV_ERR); 566 return (PAM_CONV_ERR);
531 567
532 if ((reply = malloc(n * sizeof(*reply))) == NULL) 568 if ((reply = calloc(n, sizeof(*reply))) == NULL)
533 return (PAM_CONV_ERR); 569 return (PAM_CONV_ERR);
534 memset(reply, 0, n * sizeof(*reply));
535 570
536 for (i = 0; i < n; ++i) { 571 for (i = 0; i < n; ++i) {
537 switch (PAM_MSG_MEMBER(msg, i, msg_style)) { 572 switch (PAM_MSG_MEMBER(msg, i, msg_style)) {
@@ -638,8 +673,11 @@ sshpam_init_ctx(Authctxt *authctxt)
638 int socks[2]; 673 int socks[2];
639 674
640 debug3("PAM: %s entering", __func__); 675 debug3("PAM: %s entering", __func__);
641 /* Refuse to start if we don't have PAM enabled */ 676 /*
642 if (!options.use_pam) 677 * Refuse to start if we don't have PAM enabled or do_pam_account
678 * has previously failed.
679 */
680 if (!options.use_pam || sshpam_account_status == 0)
643 return NULL; 681 return NULL;
644 682
645 /* Initialize PAM */ 683 /* Initialize PAM */
@@ -699,7 +737,7 @@ sshpam_query(void *ctx, char **name, char **info,
699 case PAM_PROMPT_ECHO_OFF: 737 case PAM_PROMPT_ECHO_OFF:
700 *num = 1; 738 *num = 1;
701 len = plen + mlen + 1; 739 len = plen + mlen + 1;
702 **prompts = xrealloc(**prompts, len); 740 **prompts = xrealloc(**prompts, 1, len);
703 strlcpy(**prompts + plen, msg, len - plen); 741 strlcpy(**prompts + plen, msg, len - plen);
704 plen += mlen; 742 plen += mlen;
705 **echo_on = (type == PAM_PROMPT_ECHO_ON); 743 **echo_on = (type == PAM_PROMPT_ECHO_ON);
@@ -709,21 +747,25 @@ sshpam_query(void *ctx, char **name, char **info,
709 case PAM_TEXT_INFO: 747 case PAM_TEXT_INFO:
710 /* accumulate messages */ 748 /* accumulate messages */
711 len = plen + mlen + 2; 749 len = plen + mlen + 2;
712 **prompts = xrealloc(**prompts, len); 750 **prompts = xrealloc(**prompts, 1, len);
713 strlcpy(**prompts + plen, msg, len - plen); 751 strlcpy(**prompts + plen, msg, len - plen);
714 plen += mlen; 752 plen += mlen;
715 strlcat(**prompts + plen, "\n", len - plen); 753 strlcat(**prompts + plen, "\n", len - plen);
716 plen++; 754 plen++;
717 xfree(msg); 755 xfree(msg);
718 break; 756 break;
757 case PAM_ACCT_EXPIRED:
758 sshpam_account_status = 0;
759 /* FALLTHROUGH */
719 case PAM_AUTH_ERR: 760 case PAM_AUTH_ERR:
720 debug3("PAM: PAM_AUTH_ERR"); 761 debug3("PAM: %s", pam_strerror(sshpam_handle, type));
721 if (**prompts != NULL && strlen(**prompts) != 0) { 762 if (**prompts != NULL && strlen(**prompts) != 0) {
722 *info = **prompts; 763 *info = **prompts;
723 **prompts = NULL; 764 **prompts = NULL;
724 *num = 0; 765 *num = 0;
725 **echo_on = 0; 766 **echo_on = 0;
726 ctxt->pam_done = -1; 767 ctxt->pam_done = -1;
768 xfree(msg);
727 return 0; 769 return 0;
728 } 770 }
729 /* FALLTHROUGH */ 771 /* FALLTHROUGH */
@@ -930,9 +972,8 @@ sshpam_tty_conv(int n, sshpam_const struct pam_message **msg,
930 if (n <= 0 || n > PAM_MAX_NUM_MSG || !isatty(STDIN_FILENO)) 972 if (n <= 0 || n > PAM_MAX_NUM_MSG || !isatty(STDIN_FILENO))
931 return (PAM_CONV_ERR); 973 return (PAM_CONV_ERR);
932 974
933 if ((reply = malloc(n * sizeof(*reply))) == NULL) 975 if ((reply = calloc(n, sizeof(*reply))) == NULL)
934 return (PAM_CONV_ERR); 976 return (PAM_CONV_ERR);
935 memset(reply, 0, n * sizeof(*reply));
936 977
937 for (i = 0; i < n; ++i) { 978 for (i = 0; i < n; ++i) {
938 switch (PAM_MSG_MEMBER(msg, i, msg_style)) { 979 switch (PAM_MSG_MEMBER(msg, i, msg_style)) {
diff --git a/auth-passwd.c b/auth-passwd.c
index 6e6d0d76a..be6283796 100644
--- a/auth-passwd.c
+++ b/auth-passwd.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: auth-passwd.c,v 1.40 2006/08/03 03:34:41 deraadt Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -36,12 +37,20 @@
36 */ 37 */
37 38
38#include "includes.h" 39#include "includes.h"
39RCSID("$OpenBSD: auth-passwd.c,v 1.34 2005/07/19 15:32:26 otto Exp $"); 40
41#include <sys/types.h>
42
43#include <pwd.h>
44#include <stdio.h>
45#include <string.h>
46#include <stdarg.h>
40 47
41#include "packet.h" 48#include "packet.h"
42#include "buffer.h" 49#include "buffer.h"
43#include "log.h" 50#include "log.h"
44#include "servconf.h" 51#include "servconf.h"
52#include "key.h"
53#include "hostfile.h"
45#include "auth.h" 54#include "auth.h"
46#include "auth-options.h" 55#include "auth-options.h"
47 56
diff --git a/auth-rh-rsa.c b/auth-rh-rsa.c
index c31f2b97b..eca750275 100644
--- a/auth-rh-rsa.c
+++ b/auth-rh-rsa.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: auth-rh-rsa.c,v 1.42 2006/08/03 03:34:41 deraadt Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -13,18 +14,25 @@
13 */ 14 */
14 15
15#include "includes.h" 16#include "includes.h"
16RCSID("$OpenBSD: auth-rh-rsa.c,v 1.38 2005/07/17 07:17:54 djm Exp $"); 17
18#include <sys/types.h>
19
20#include <pwd.h>
21#include <stdarg.h>
17 22
18#include "packet.h" 23#include "packet.h"
19#include "uidswap.h" 24#include "uidswap.h"
20#include "log.h" 25#include "log.h"
26#include "buffer.h"
21#include "servconf.h" 27#include "servconf.h"
22#include "key.h" 28#include "key.h"
23#include "hostfile.h" 29#include "hostfile.h"
24#include "pathnames.h" 30#include "pathnames.h"
25#include "auth.h" 31#include "auth.h"
26#include "canohost.h" 32#include "canohost.h"
27 33#ifdef GSSAPI
34#include "ssh-gss.h"
35#endif
28#include "monitor_wrap.h" 36#include "monitor_wrap.h"
29 37
30/* import */ 38/* import */
diff --git a/auth-rhosts.c b/auth-rhosts.c
index aaba8557e..cd0a7967a 100644
--- a/auth-rhosts.c
+++ b/auth-rhosts.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: auth-rhosts.c,v 1.41 2006/08/03 03:34:41 deraadt Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -14,14 +15,27 @@
14 */ 15 */
15 16
16#include "includes.h" 17#include "includes.h"
17RCSID("$OpenBSD: auth-rhosts.c,v 1.33 2005/07/17 07:17:54 djm Exp $"); 18
19#include <sys/types.h>
20#include <sys/stat.h>
21
22#ifdef HAVE_NETGROUP_H
23# include <netgroup.h>
24#endif
25#include <pwd.h>
26#include <stdio.h>
27#include <string.h>
28#include <stdarg.h>
18 29
19#include "packet.h" 30#include "packet.h"
31#include "buffer.h"
20#include "uidswap.h" 32#include "uidswap.h"
21#include "pathnames.h" 33#include "pathnames.h"
22#include "log.h" 34#include "log.h"
23#include "servconf.h" 35#include "servconf.h"
24#include "canohost.h" 36#include "canohost.h"
37#include "key.h"
38#include "hostfile.h"
25#include "auth.h" 39#include "auth.h"
26 40
27/* import */ 41/* import */
diff --git a/auth-rsa.c b/auth-rsa.c
index d9c9652dc..69f9a5896 100644
--- a/auth-rsa.c
+++ b/auth-rsa.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: auth-rsa.c,v 1.72 2006/11/06 21:25:27 markus Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -14,23 +15,35 @@
14 */ 15 */
15 16
16#include "includes.h" 17#include "includes.h"
17RCSID("$OpenBSD: auth-rsa.c,v 1.63 2005/06/17 02:44:32 djm Exp $"); 18
19#include <sys/types.h>
20#include <sys/stat.h>
18 21
19#include <openssl/rsa.h> 22#include <openssl/rsa.h>
20#include <openssl/md5.h> 23#include <openssl/md5.h>
21 24
25#include <pwd.h>
26#include <stdio.h>
27#include <stdarg.h>
28#include <string.h>
29
30#include "xmalloc.h"
22#include "rsa.h" 31#include "rsa.h"
23#include "packet.h" 32#include "packet.h"
24#include "xmalloc.h"
25#include "ssh1.h" 33#include "ssh1.h"
26#include "uidswap.h" 34#include "uidswap.h"
27#include "match.h" 35#include "match.h"
36#include "buffer.h"
28#include "auth-options.h" 37#include "auth-options.h"
29#include "pathnames.h" 38#include "pathnames.h"
30#include "log.h" 39#include "log.h"
31#include "servconf.h" 40#include "servconf.h"
32#include "auth.h" 41#include "key.h"
33#include "hostfile.h" 42#include "hostfile.h"
43#include "auth.h"
44#ifdef GSSAPI
45#include "ssh-gss.h"
46#endif
34#include "monitor_wrap.h" 47#include "monitor_wrap.h"
35#include "ssh.h" 48#include "ssh.h"
36#include "misc.h" 49#include "misc.h"
@@ -63,10 +76,12 @@ auth_rsa_generate_challenge(Key *key)
63 if ((challenge = BN_new()) == NULL) 76 if ((challenge = BN_new()) == NULL)
64 fatal("auth_rsa_generate_challenge: BN_new() failed"); 77 fatal("auth_rsa_generate_challenge: BN_new() failed");
65 /* Generate a random challenge. */ 78 /* Generate a random challenge. */
66 BN_rand(challenge, 256, 0, 0); 79 if (BN_rand(challenge, 256, 0, 0) == 0)
80 fatal("auth_rsa_generate_challenge: BN_rand failed");
67 if ((ctx = BN_CTX_new()) == NULL) 81 if ((ctx = BN_CTX_new()) == NULL)
68 fatal("auth_rsa_generate_challenge: BN_CTX_new() failed"); 82 fatal("auth_rsa_generate_challenge: BN_CTX_new failed");
69 BN_mod(challenge, challenge, key->rsa->n, ctx); 83 if (BN_mod(challenge, challenge, key->rsa->n, ctx) == 0)
84 fatal("auth_rsa_generate_challenge: BN_mod failed");
70 BN_CTX_free(ctx); 85 BN_CTX_free(ctx);
71 86
72 return challenge; 87 return challenge;
@@ -137,7 +152,7 @@ auth_rsa_challenge_dialog(Key *key)
137 /* Wait for a response. */ 152 /* Wait for a response. */
138 packet_read_expect(SSH_CMSG_AUTH_RSA_RESPONSE); 153 packet_read_expect(SSH_CMSG_AUTH_RSA_RESPONSE);
139 for (i = 0; i < 16; i++) 154 for (i = 0; i < 16; i++)
140 response[i] = packet_get_char(); 155 response[i] = (u_char)packet_get_char();
141 packet_check_eom(); 156 packet_check_eom();
142 157
143 success = PRIVSEP(auth_rsa_verify_response(key, challenge, response)); 158 success = PRIVSEP(auth_rsa_verify_response(key, challenge, response));
diff --git a/auth-shadow.c b/auth-shadow.c
index 59737b93c..8b3160aee 100644
--- a/auth-shadow.c
+++ b/auth-shadow.c
@@ -23,11 +23,14 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$Id: auth-shadow.c,v 1.7 2005/07/17 07:04:47 djm Exp $");
27 26
28#if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE) 27#if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE)
29#include <shadow.h> 28#include <shadow.h>
29#include <stdarg.h>
30#include <string.h>
30 31
32#include "key.h"
33#include "hostfile.h"
31#include "auth.h" 34#include "auth.h"
32#include "buffer.h" 35#include "buffer.h"
33#include "log.h" 36#include "log.h"
diff --git a/auth-sia.c b/auth-sia.c
index af7182b48..a9e1c258c 100644
--- a/auth-sia.c
+++ b/auth-sia.c
@@ -25,14 +25,6 @@
25#include "includes.h" 25#include "includes.h"
26 26
27#ifdef HAVE_OSF_SIA 27#ifdef HAVE_OSF_SIA
28#include "ssh.h"
29#include "auth.h"
30#include "auth-sia.h"
31#include "log.h"
32#include "servconf.h"
33#include "canohost.h"
34#include "uidswap.h"
35
36#include <sia.h> 28#include <sia.h>
37#include <siad.h> 29#include <siad.h>
38#include <pwd.h> 30#include <pwd.h>
@@ -40,8 +32,19 @@
40#include <setjmp.h> 32#include <setjmp.h>
41#include <sys/resource.h> 33#include <sys/resource.h>
42#include <unistd.h> 34#include <unistd.h>
35#include <stdarg.h>
43#include <string.h> 36#include <string.h>
44 37
38#include "ssh.h"
39#include "key.h"
40#include "hostfile.h"
41#include "auth.h"
42#include "auth-sia.h"
43#include "log.h"
44#include "servconf.h"
45#include "canohost.h"
46#include "uidswap.h"
47
45extern ServerOptions options; 48extern ServerOptions options;
46extern int saved_argc; 49extern int saved_argc;
47extern char **saved_argv; 50extern char **saved_argv;
diff --git a/auth-skey.c b/auth-skey.c
index f676dbec9..cb43dba48 100644
--- a/auth-skey.c
+++ b/auth-skey.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: auth-skey.c,v 1.27 2007/01/21 01:41:54 stevesk Exp $ */
1/* 2/*
2 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
3 * 4 *
@@ -21,15 +22,23 @@
21 * (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
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 */
25
24#include "includes.h" 26#include "includes.h"
25RCSID("$OpenBSD: auth-skey.c,v 1.20 2002/06/30 21:59:45 deraadt Exp $");
26 27
27#ifdef SKEY 28#ifdef SKEY
28 29
30#include <sys/types.h>
31
32#include <pwd.h>
33#include <stdio.h>
34
29#include <skey.h> 35#include <skey.h>
30 36
31#include "xmalloc.h" 37#include "xmalloc.h"
38#include "key.h"
39#include "hostfile.h"
32#include "auth.h" 40#include "auth.h"
41#include "ssh-gss.h"
33#include "monitor_wrap.h" 42#include "monitor_wrap.h"
34 43
35static void * 44static void *
@@ -43,26 +52,20 @@ skey_query(void *ctx, char **name, char **infotxt,
43 u_int* numprompts, char ***prompts, u_int **echo_on) 52 u_int* numprompts, char ***prompts, u_int **echo_on)
44{ 53{
45 Authctxt *authctxt = ctx; 54 Authctxt *authctxt = ctx;
46 char challenge[1024], *p; 55 char challenge[1024];
47 int len;
48 struct skey skey; 56 struct skey skey;
49 57
50 if (_compat_skeychallenge(&skey, authctxt->user, challenge, 58 if (_compat_skeychallenge(&skey, authctxt->user, challenge,
51 sizeof(challenge)) == -1) 59 sizeof(challenge)) == -1)
52 return -1; 60 return -1;
53 61
54 *name = xstrdup(""); 62 *name = xstrdup("");
55 *infotxt = xstrdup(""); 63 *infotxt = xstrdup("");
56 *numprompts = 1; 64 *numprompts = 1;
57 *prompts = xmalloc(*numprompts * sizeof(char *)); 65 *prompts = xcalloc(*numprompts, sizeof(char *));
58 *echo_on = xmalloc(*numprompts * sizeof(u_int)); 66 *echo_on = xcalloc(*numprompts, sizeof(u_int));
59 (*echo_on)[0] = 0; 67
60 68 xasprintf(*prompts, "%s%s", challenge, SKEY_PROMPT);
61 len = strlen(challenge) + strlen(SKEY_PROMPT) + 1;
62 p = xmalloc(len);
63 strlcpy(p, challenge, len);
64 strlcat(p, SKEY_PROMPT, len);
65 (*prompts)[0] = p;
66 69
67 return 0; 70 return 0;
68} 71}
diff --git a/auth.c b/auth.c
index 2dc5c2be6..505102f8a 100644
--- a/auth.c
+++ b/auth.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: auth.c,v 1.75 2006/08/03 03:34:41 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,39 +24,56 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: auth.c,v 1.60 2005/06/17 02:44:32 djm Exp $");
27 27
28#include <sys/types.h>
29#include <sys/stat.h>
30#include <sys/param.h>
31
32#include <netinet/in.h>
33
34#include <errno.h>
35#ifdef HAVE_PATHS_H
36# include <paths.h>
37#endif
38#include <pwd.h>
28#ifdef HAVE_LOGIN_H 39#ifdef HAVE_LOGIN_H
29#include <login.h> 40#include <login.h>
30#endif 41#endif
31#ifdef USE_SHADOW 42#ifdef USE_SHADOW
32#include <shadow.h> 43#include <shadow.h>
33#endif 44#endif
34
35#ifdef HAVE_LIBGEN_H 45#ifdef HAVE_LIBGEN_H
36#include <libgen.h> 46#include <libgen.h>
37#endif 47#endif
48#include <stdarg.h>
49#include <stdio.h>
50#include <string.h>
38 51
39#include "xmalloc.h" 52#include "xmalloc.h"
40#include "match.h" 53#include "match.h"
41#include "groupaccess.h" 54#include "groupaccess.h"
42#include "log.h" 55#include "log.h"
56#include "buffer.h"
43#include "servconf.h" 57#include "servconf.h"
58#include "key.h"
59#include "hostfile.h"
44#include "auth.h" 60#include "auth.h"
45#include "auth-options.h" 61#include "auth-options.h"
46#include "canohost.h" 62#include "canohost.h"
47#include "buffer.h"
48#include "bufaux.h"
49#include "uidswap.h" 63#include "uidswap.h"
50#include "misc.h" 64#include "misc.h"
51#include "bufaux.h"
52#include "packet.h" 65#include "packet.h"
53#include "loginrec.h" 66#include "loginrec.h"
67#ifdef GSSAPI
68#include "ssh-gss.h"
69#endif
54#include "monitor_wrap.h" 70#include "monitor_wrap.h"
55 71
56/* import */ 72/* import */
57extern ServerOptions options; 73extern ServerOptions options;
74extern int use_privsep;
58extern Buffer loginmsg; 75extern Buffer loginmsg;
76extern struct passwd *privsep_pw;
59 77
60/* Debugging messages */ 78/* Debugging messages */
61Buffer auth_debug; 79Buffer auth_debug;
@@ -231,6 +249,9 @@ auth_log(Authctxt *authctxt, int authenticated, char *method, char *info)
231 void (*authlog) (const char *fmt,...) = verbose; 249 void (*authlog) (const char *fmt,...) = verbose;
232 char *authmsg; 250 char *authmsg;
233 251
252 if (use_privsep && !mm_is_monitor() && !authctxt->postponed)
253 return;
254
234 /* Raise logging level */ 255 /* Raise logging level */
235 if (authenticated == 1 || 256 if (authenticated == 1 ||
236 !authctxt->valid || 257 !authctxt->valid ||
@@ -259,44 +280,15 @@ auth_log(Authctxt *authctxt, int authenticated, char *method, char *info)
259 strcmp(method, "challenge-response") == 0)) 280 strcmp(method, "challenge-response") == 0))
260 record_failed_login(authctxt->user, 281 record_failed_login(authctxt->user,
261 get_canonical_hostname(options.use_dns), "ssh"); 282 get_canonical_hostname(options.use_dns), "ssh");
283# ifdef WITH_AIXAUTHENTICATE
284 if (authenticated)
285 sys_auth_record_login(authctxt->user,
286 get_canonical_hostname(options.use_dns), "ssh", &loginmsg);
287# endif
262#endif 288#endif
263#ifdef SSH_AUDIT_EVENTS 289#ifdef SSH_AUDIT_EVENTS
264 if (authenticated == 0 && !authctxt->postponed) { 290 if (authenticated == 0 && !authctxt->postponed)
265 ssh_audit_event_t event; 291 audit_event(audit_classify_auth(method));
266
267 debug3("audit failed auth attempt, method %s euid %d",
268 method, (int)geteuid());
269 /*
270 * Because the auth loop is used in both monitor and slave,
271 * we must be careful to send each event only once and with
272 * enough privs to write the event.
273 */
274 event = audit_classify_auth(method);
275 switch(event) {
276 case SSH_AUTH_FAIL_NONE:
277 case SSH_AUTH_FAIL_PASSWD:
278 case SSH_AUTH_FAIL_KBDINT:
279 if (geteuid() == 0)
280 audit_event(event);
281 break;
282 case SSH_AUTH_FAIL_PUBKEY:
283 case SSH_AUTH_FAIL_HOSTBASED:
284 case SSH_AUTH_FAIL_GSSAPI:
285 /*
286 * This is required to handle the case where privsep
287 * is enabled but it's root logging in, since
288 * use_privsep won't be cleared until after a
289 * successful login.
290 */
291 if (geteuid() == 0)
292 audit_event(event);
293 else
294 PRIVSEP(audit_event(event));
295 break;
296 default:
297 error("unknown authentication audit event %d", event);
298 }
299 }
300#endif 292#endif
301} 293}
302 294
@@ -309,7 +301,6 @@ auth_root_allowed(char *method)
309 switch (options.permit_root_login) { 301 switch (options.permit_root_login) {
310 case PERMIT_YES: 302 case PERMIT_YES:
311 return 1; 303 return 1;
312 break;
313 case PERMIT_NO_PASSWD: 304 case PERMIT_NO_PASSWD:
314 if (strcmp(method, "password") != 0) 305 if (strcmp(method, "password") != 0)
315 return 1; 306 return 1;
@@ -336,7 +327,8 @@ auth_root_allowed(char *method)
336static char * 327static char *
337expand_authorized_keys(const char *filename, struct passwd *pw) 328expand_authorized_keys(const char *filename, struct passwd *pw)
338{ 329{
339 char *file, *ret; 330 char *file, ret[MAXPATHLEN];
331 int i;
340 332
341 file = percent_expand(filename, "h", pw->pw_dir, 333 file = percent_expand(filename, "h", pw->pw_dir,
342 "u", pw->pw_name, (char *)NULL); 334 "u", pw->pw_name, (char *)NULL);
@@ -348,14 +340,11 @@ expand_authorized_keys(const char *filename, struct passwd *pw)
348 if (*file == '/') 340 if (*file == '/')
349 return (file); 341 return (file);
350 342
351 ret = xmalloc(MAXPATHLEN); 343 i = snprintf(ret, sizeof(ret), "%s/%s", pw->pw_dir, file);
352 if (strlcpy(ret, pw->pw_dir, MAXPATHLEN) >= MAXPATHLEN || 344 if (i < 0 || (size_t)i >= sizeof(ret))
353 strlcat(ret, "/", MAXPATHLEN) >= MAXPATHLEN ||
354 strlcat(ret, file, MAXPATHLEN) >= MAXPATHLEN)
355 fatal("expand_authorized_keys: path too long"); 345 fatal("expand_authorized_keys: path too long");
356
357 xfree(file); 346 xfree(file);
358 return (ret); 347 return (xstrdup(ret));
359} 348}
360 349
361char * 350char *
@@ -492,6 +481,9 @@ getpwnamallow(const char *user)
492#endif 481#endif
493 struct passwd *pw; 482 struct passwd *pw;
494 483
484 parse_server_match_config(&options, user,
485 get_canonical_hostname(options.use_dns), get_remote_ipaddr());
486
495 pw = getpwnam(user); 487 pw = getpwnam(user);
496 if (pw == NULL) { 488 if (pw == NULL) {
497 logit("Invalid user %.100s from %.100s", 489 logit("Invalid user %.100s from %.100s",
@@ -577,8 +569,8 @@ fakepw(void)
577 fake.pw_passwd = 569 fake.pw_passwd =
578 "$2a$06$r3.juUaHZDlIbQaO2dS9FuYxL1W9M81R1Tc92PoSNmzvpEqLkLGrK"; 570 "$2a$06$r3.juUaHZDlIbQaO2dS9FuYxL1W9M81R1Tc92PoSNmzvpEqLkLGrK";
579 fake.pw_gecos = "NOUSER"; 571 fake.pw_gecos = "NOUSER";
580 fake.pw_uid = (uid_t)-1; 572 fake.pw_uid = privsep_pw == NULL ? (uid_t)-1 : privsep_pw->pw_uid;
581 fake.pw_gid = (gid_t)-1; 573 fake.pw_gid = privsep_pw == NULL ? (gid_t)-1 : privsep_pw->pw_gid;
582#ifdef HAVE_PW_CLASS_IN_PASSWD 574#ifdef HAVE_PW_CLASS_IN_PASSWD
583 fake.pw_class = ""; 575 fake.pw_class = "";
584#endif 576#endif
diff --git a/auth.h b/auth.h
index 456d28f37..ee8a2b95c 100644
--- a/auth.h
+++ b/auth.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth.h,v 1.51 2005/06/06 11:20:36 djm Exp $ */ 1/* $OpenBSD: auth.h,v 1.58 2006/08/18 09:15:20 markus Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -28,9 +28,8 @@
28#ifndef AUTH_H 28#ifndef AUTH_H
29#define AUTH_H 29#define AUTH_H
30 30
31#include "key.h" 31#include <signal.h>
32#include "hostfile.h" 32
33#include "buffer.h"
34#include <openssl/rsa.h> 33#include <openssl/rsa.h>
35 34
36#ifdef HAVE_LOGIN_CAP 35#ifdef HAVE_LOGIN_CAP
@@ -48,7 +47,8 @@ typedef struct Authmethod Authmethod;
48typedef struct KbdintDevice KbdintDevice; 47typedef struct KbdintDevice KbdintDevice;
49 48
50struct Authctxt { 49struct Authctxt {
51 int success; 50 sig_atomic_t success;
51 int authenticated; /* authenticated and alarms cancelled */
52 int postponed; /* authentication needs another step */ 52 int postponed; /* authentication needs another step */
53 int valid; /* user exists and is allowed to login */ 53 int valid; /* user exists and is allowed to login */
54 int attempt; 54 int attempt;
diff --git a/auth1.c b/auth1.c
index 4bc2bf76d..b9d6b1115 100644
--- a/auth1.c
+++ b/auth1.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: auth1.c,v 1.70 2006/08/03 03:34:41 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
3 * All rights reserved 4 * All rights reserved
@@ -10,7 +11,14 @@
10 */ 11 */
11 12
12#include "includes.h" 13#include "includes.h"
13RCSID("$OpenBSD: auth1.c,v 1.62 2005/07/16 01:35:24 djm Exp $"); 14
15#include <sys/types.h>
16
17#include <stdarg.h>
18#include <stdio.h>
19#include <string.h>
20#include <unistd.h>
21#include <pwd.h>
14 22
15#include "xmalloc.h" 23#include "xmalloc.h"
16#include "rsa.h" 24#include "rsa.h"
@@ -20,10 +28,15 @@ RCSID("$OpenBSD: auth1.c,v 1.62 2005/07/16 01:35:24 djm Exp $");
20#include "log.h" 28#include "log.h"
21#include "servconf.h" 29#include "servconf.h"
22#include "compat.h" 30#include "compat.h"
31#include "key.h"
32#include "hostfile.h"
23#include "auth.h" 33#include "auth.h"
24#include "channels.h" 34#include "channels.h"
25#include "session.h" 35#include "session.h"
26#include "uidswap.h" 36#include "uidswap.h"
37#ifdef GSSAPI
38#include "ssh-gss.h"
39#endif
27#include "monitor_wrap.h" 40#include "monitor_wrap.h"
28#include "buffer.h" 41#include "buffer.h"
29 42
@@ -77,7 +90,7 @@ static const struct AuthMethod1
77{ 90{
78 int i; 91 int i;
79 92
80 for(i = 0; auth1_methods[i].name != NULL; i++) 93 for (i = 0; auth1_methods[i].name != NULL; i++)
81 if (auth1_methods[i].type == type) 94 if (auth1_methods[i].type == type)
82 return (&(auth1_methods[i])); 95 return (&(auth1_methods[i]));
83 96
@@ -96,6 +109,7 @@ get_authname(int type)
96 return (buf); 109 return (buf);
97} 110}
98 111
112/*ARGSUSED*/
99static int 113static int
100auth1_process_password(Authctxt *authctxt, char *info, size_t infolen) 114auth1_process_password(Authctxt *authctxt, char *info, size_t infolen)
101{ 115{
@@ -120,6 +134,7 @@ auth1_process_password(Authctxt *authctxt, char *info, size_t infolen)
120 return (authenticated); 134 return (authenticated);
121} 135}
122 136
137/*ARGSUSED*/
123static int 138static int
124auth1_process_rsa(Authctxt *authctxt, char *info, size_t infolen) 139auth1_process_rsa(Authctxt *authctxt, char *info, size_t infolen)
125{ 140{
@@ -137,6 +152,7 @@ auth1_process_rsa(Authctxt *authctxt, char *info, size_t infolen)
137 return (authenticated); 152 return (authenticated);
138} 153}
139 154
155/*ARGSUSED*/
140static int 156static int
141auth1_process_rhosts_rsa(Authctxt *authctxt, char *info, size_t infolen) 157auth1_process_rhosts_rsa(Authctxt *authctxt, char *info, size_t infolen)
142{ 158{
@@ -175,6 +191,7 @@ auth1_process_rhosts_rsa(Authctxt *authctxt, char *info, size_t infolen)
175 return (authenticated); 191 return (authenticated);
176} 192}
177 193
194/*ARGSUSED*/
178static int 195static int
179auth1_process_tis_challenge(Authctxt *authctxt, char *info, size_t infolen) 196auth1_process_tis_challenge(Authctxt *authctxt, char *info, size_t infolen)
180{ 197{
@@ -193,6 +210,7 @@ auth1_process_tis_challenge(Authctxt *authctxt, char *info, size_t infolen)
193 return (-1); 210 return (-1);
194} 211}
195 212
213/*ARGSUSED*/
196static int 214static int
197auth1_process_tis_response(Authctxt *authctxt, char *info, size_t infolen) 215auth1_process_tis_response(Authctxt *authctxt, char *info, size_t infolen)
198{ 216{
diff --git a/auth2-chall.c b/auth2-chall.c
index b147cadf3..51059c2bd 100644
--- a/auth2-chall.c
+++ b/auth2-chall.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: auth2-chall.c,v 1.32 2007/01/03 03:01:40 stevesk Exp $ */
1/* 2/*
2 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
3 * Copyright (c) 2001 Per Allansson. All rights reserved. 4 * Copyright (c) 2001 Per Allansson. All rights reserved.
@@ -22,14 +23,22 @@
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * (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 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 25 */
26
25#include "includes.h" 27#include "includes.h"
26RCSID("$OpenBSD: auth2-chall.c,v 1.24 2005/07/17 07:17:54 djm Exp $");
27 28
29#include <sys/types.h>
30
31#include <stdarg.h>
32#include <stdio.h>
33#include <string.h>
34
35#include "xmalloc.h"
28#include "ssh2.h" 36#include "ssh2.h"
37#include "key.h"
38#include "hostfile.h"
29#include "auth.h" 39#include "auth.h"
30#include "buffer.h" 40#include "buffer.h"
31#include "packet.h" 41#include "packet.h"
32#include "xmalloc.h"
33#include "dispatch.h" 42#include "dispatch.h"
34#include "log.h" 43#include "log.h"
35#include "servconf.h" 44#include "servconf.h"
@@ -197,7 +206,7 @@ auth2_challenge_stop(Authctxt *authctxt)
197{ 206{
198 /* unregister callback */ 207 /* unregister callback */
199 dispatch_set(SSH2_MSG_USERAUTH_INFO_RESPONSE, NULL); 208 dispatch_set(SSH2_MSG_USERAUTH_INFO_RESPONSE, NULL);
200 if (authctxt->kbdintctxt != NULL) { 209 if (authctxt->kbdintctxt != NULL) {
201 kbdint_free(authctxt->kbdintctxt); 210 kbdint_free(authctxt->kbdintctxt);
202 authctxt->kbdintctxt = NULL; 211 authctxt->kbdintctxt = NULL;
203 } 212 }
@@ -291,7 +300,7 @@ input_userauth_info_response(int type, u_int32_t seq, void *ctxt)
291 if (nresp > 100) 300 if (nresp > 100)
292 fatal("input_userauth_info_response: too many replies"); 301 fatal("input_userauth_info_response: too many replies");
293 if (nresp > 0) { 302 if (nresp > 0) {
294 response = xmalloc(nresp * sizeof(char *)); 303 response = xcalloc(nresp, sizeof(char *));
295 for (i = 0; i < nresp; i++) 304 for (i = 0; i < nresp; i++)
296 response[i] = packet_get_string(NULL); 305 response[i] = packet_get_string(NULL);
297 } 306 }
diff --git a/auth2-gss.c b/auth2-gss.c
index 539654ee0..50bdc6452 100644
--- a/auth2-gss.c
+++ b/auth2-gss.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth2-gss.c,v 1.12 2005/10/13 22:24:31 stevesk Exp $ */ 1/* $OpenBSD: auth2-gss.c,v 1.15 2006/08/03 03:34:41 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. 4 * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved.
@@ -28,16 +28,22 @@
28 28
29#ifdef GSSAPI 29#ifdef GSSAPI
30 30
31#include <sys/types.h>
32
33#include <stdarg.h>
34
35#include "xmalloc.h"
36#include "key.h"
37#include "hostfile.h"
31#include "auth.h" 38#include "auth.h"
32#include "ssh2.h" 39#include "ssh2.h"
33#include "xmalloc.h"
34#include "log.h" 40#include "log.h"
35#include "dispatch.h" 41#include "dispatch.h"
42#include "buffer.h"
36#include "servconf.h" 43#include "servconf.h"
37#include "packet.h" 44#include "packet.h"
38#include "monitor_wrap.h"
39
40#include "ssh-gss.h" 45#include "ssh-gss.h"
46#include "monitor_wrap.h"
41 47
42extern ServerOptions options; 48extern ServerOptions options;
43 49
@@ -134,6 +140,8 @@ userauth_gssapi(Authctxt *authctxt)
134 } 140 }
135 141
136 if (GSS_ERROR(PRIVSEP(ssh_gssapi_server_ctx(&ctxt, &goid)))) { 142 if (GSS_ERROR(PRIVSEP(ssh_gssapi_server_ctx(&ctxt, &goid)))) {
143 if (ctxt != NULL)
144 ssh_gssapi_delete_ctx(&ctxt);
137 xfree(doid); 145 xfree(doid);
138 authctxt->server_caused_failure = 1; 146 authctxt->server_caused_failure = 1;
139 return (0); 147 return (0);
diff --git a/auth2-hostbased.c b/auth2-hostbased.c
index 1111ed67a..663dec5d9 100644
--- a/auth2-hostbased.c
+++ b/auth2-hostbased.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: auth2-hostbased.c,v 1.11 2006/08/03 03:34:41 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,19 +24,27 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: auth2-hostbased.c,v 1.6 2004/01/19 21:25:15 markus Exp $");
27 27
28#include "ssh2.h" 28#include <sys/types.h>
29
30#include <pwd.h>
31#include <string.h>
32#include <stdarg.h>
33
29#include "xmalloc.h" 34#include "xmalloc.h"
35#include "ssh2.h"
30#include "packet.h" 36#include "packet.h"
31#include "buffer.h" 37#include "buffer.h"
32#include "log.h" 38#include "log.h"
33#include "servconf.h" 39#include "servconf.h"
34#include "compat.h" 40#include "compat.h"
35#include "bufaux.h"
36#include "auth.h"
37#include "key.h" 41#include "key.h"
42#include "hostfile.h"
43#include "auth.h"
38#include "canohost.h" 44#include "canohost.h"
45#ifdef GSSAPI
46#include "ssh-gss.h"
47#endif
39#include "monitor_wrap.h" 48#include "monitor_wrap.h"
40#include "pathnames.h" 49#include "pathnames.h"
41 50
diff --git a/auth2-kbdint.c b/auth2-kbdint.c
index fa8364975..a4fc9e6f7 100644
--- a/auth2-kbdint.c
+++ b/auth2-kbdint.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: auth2-kbdint.c,v 1.5 2006/08/03 03:34:41 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,13 +24,19 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: auth2-kbdint.c,v 1.2 2002/05/31 11:35:15 markus Exp $");
27 27
28#include <sys/types.h>
29
30#include <stdarg.h>
31
32#include "xmalloc.h"
28#include "packet.h" 33#include "packet.h"
34#include "key.h"
35#include "hostfile.h"
29#include "auth.h" 36#include "auth.h"
30#include "log.h" 37#include "log.h"
38#include "buffer.h"
31#include "servconf.h" 39#include "servconf.h"
32#include "xmalloc.h"
33 40
34/* import */ 41/* import */
35extern ServerOptions options; 42extern ServerOptions options;
diff --git a/auth2-none.c b/auth2-none.c
index 1c30a3203..952b44824 100644
--- a/auth2-none.c
+++ b/auth2-none.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: auth2-none.c,v 1.13 2006/08/05 07:52:52 dtucker Exp $ */
1/* 2/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,16 +24,29 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: auth2-none.c,v 1.7 2004/05/11 19:01:43 deraadt Exp $");
27 27
28#include "auth.h" 28#include <sys/types.h>
29#include <sys/stat.h>
30#include <sys/uio.h>
31
32#include <fcntl.h>
33#include <stdarg.h>
34#include <unistd.h>
35
29#include "xmalloc.h" 36#include "xmalloc.h"
37#include "key.h"
38#include "hostfile.h"
39#include "auth.h"
30#include "packet.h" 40#include "packet.h"
31#include "log.h" 41#include "log.h"
42#include "buffer.h"
32#include "servconf.h" 43#include "servconf.h"
33#include "atomicio.h" 44#include "atomicio.h"
34#include "compat.h" 45#include "compat.h"
35#include "ssh2.h" 46#include "ssh2.h"
47#ifdef GSSAPI
48#include "ssh-gss.h"
49#endif
36#include "monitor_wrap.h" 50#include "monitor_wrap.h"
37 51
38/* import */ 52/* import */
diff --git a/auth2-passwd.c b/auth2-passwd.c
index 2321ef47b..421c5c25d 100644
--- a/auth2-passwd.c
+++ b/auth2-passwd.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: auth2-passwd.c,v 1.9 2006/08/03 03:34:41 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,12 +24,22 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: auth2-passwd.c,v 1.5 2003/12/31 00:24:50 dtucker Exp $"); 27
28#include <sys/types.h>
29
30#include <string.h>
31#include <stdarg.h>
27 32
28#include "xmalloc.h" 33#include "xmalloc.h"
29#include "packet.h" 34#include "packet.h"
30#include "log.h" 35#include "log.h"
36#include "key.h"
37#include "hostfile.h"
31#include "auth.h" 38#include "auth.h"
39#include "buffer.h"
40#ifdef GSSAPI
41#include "ssh-gss.h"
42#endif
32#include "monitor_wrap.h" 43#include "monitor_wrap.h"
33#include "servconf.h" 44#include "servconf.h"
34 45
diff --git a/auth2-pubkey.c b/auth2-pubkey.c
index a97d0f430..9863cd9e6 100644
--- a/auth2-pubkey.c
+++ b/auth2-pubkey.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: auth2-pubkey.c,v 1.15 2006/08/03 03:34:41 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,23 +24,32 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: auth2-pubkey.c,v 1.9 2004/12/11 01:48:56 dtucker Exp $");
27 27
28#include <sys/types.h>
29#include <sys/stat.h>
30
31#include <pwd.h>
32#include <stdio.h>
33#include <stdarg.h>
34
35#include "xmalloc.h"
28#include "ssh.h" 36#include "ssh.h"
29#include "ssh2.h" 37#include "ssh2.h"
30#include "xmalloc.h"
31#include "packet.h" 38#include "packet.h"
32#include "buffer.h" 39#include "buffer.h"
33#include "log.h" 40#include "log.h"
34#include "servconf.h" 41#include "servconf.h"
35#include "compat.h" 42#include "compat.h"
36#include "bufaux.h"
37#include "auth.h"
38#include "key.h" 43#include "key.h"
44#include "hostfile.h"
45#include "auth.h"
39#include "pathnames.h" 46#include "pathnames.h"
40#include "uidswap.h" 47#include "uidswap.h"
41#include "auth-options.h" 48#include "auth-options.h"
42#include "canohost.h" 49#include "canohost.h"
50#ifdef GSSAPI
51#include "ssh-gss.h"
52#endif
43#include "monitor_wrap.h" 53#include "monitor_wrap.h"
44#include "misc.h" 54#include "misc.h"
45 55
diff --git a/auth2.c b/auth2.c
index 6e58797bd..3009e291e 100644
--- a/auth2.c
+++ b/auth2.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: auth2.c,v 1.114 2007/03/01 10:28:02 dtucker Exp $ */
1/* 2/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,23 +24,31 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: auth2.c,v 1.107 2004/07/28 09:40:29 markus Exp $");
27 27
28#include "ssh2.h" 28#include <sys/types.h>
29
30#include <pwd.h>
31#include <stdarg.h>
32#include <string.h>
33
29#include "xmalloc.h" 34#include "xmalloc.h"
35#include "ssh2.h"
30#include "packet.h" 36#include "packet.h"
31#include "log.h" 37#include "log.h"
38#include "buffer.h"
32#include "servconf.h" 39#include "servconf.h"
33#include "compat.h" 40#include "compat.h"
41#include "key.h"
42#include "hostfile.h"
34#include "auth.h" 43#include "auth.h"
35#include "dispatch.h" 44#include "dispatch.h"
36#include "pathnames.h" 45#include "pathnames.h"
37#include "monitor_wrap.h"
38#include "buffer.h" 46#include "buffer.h"
39 47
40#ifdef GSSAPI 48#ifdef GSSAPI
41#include "ssh-gss.h" 49#include "ssh-gss.h"
42#endif 50#endif
51#include "monitor_wrap.h"
43 52
44/* import */ 53/* import */
45extern ServerOptions options; 54extern ServerOptions options;
@@ -89,15 +98,12 @@ int user_key_allowed(struct passwd *, Key *);
89void 98void
90do_authentication2(Authctxt *authctxt) 99do_authentication2(Authctxt *authctxt)
91{ 100{
92 /* challenge-response is implemented via keyboard interactive */
93 if (options.challenge_response_authentication)
94 options.kbd_interactive_authentication = 1;
95
96 dispatch_init(&dispatch_protocol_error); 101 dispatch_init(&dispatch_protocol_error);
97 dispatch_set(SSH2_MSG_SERVICE_REQUEST, &input_service_request); 102 dispatch_set(SSH2_MSG_SERVICE_REQUEST, &input_service_request);
98 dispatch_run(DISPATCH_BLOCK, &authctxt->success, authctxt); 103 dispatch_run(DISPATCH_BLOCK, &authctxt->success, authctxt);
99} 104}
100 105
106/*ARGSUSED*/
101static void 107static void
102input_service_request(int type, u_int32_t seq, void *ctxt) 108input_service_request(int type, u_int32_t seq, void *ctxt)
103{ 109{
@@ -131,6 +137,7 @@ input_service_request(int type, u_int32_t seq, void *ctxt)
131 xfree(service); 137 xfree(service);
132} 138}
133 139
140/*ARGSUSED*/
134static void 141static void
135input_userauth_request(int type, u_int32_t seq, void *ctxt) 142input_userauth_request(int type, u_int32_t seq, void *ctxt)
136{ 143{
diff --git a/authfd.c b/authfd.c
index 8976616b4..61faad123 100644
--- a/authfd.c
+++ b/authfd.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: authfd.c,v 1.80 2006/08/03 03:34:41 deraadt Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -35,16 +36,25 @@
35 */ 36 */
36 37
37#include "includes.h" 38#include "includes.h"
38RCSID("$OpenBSD: authfd.c,v 1.66 2005/06/17 02:44:32 djm Exp $"); 39
40#include <sys/types.h>
41#include <sys/un.h>
42#include <sys/socket.h>
39 43
40#include <openssl/evp.h> 44#include <openssl/evp.h>
41 45
46#include <openssl/crypto.h>
47#include <fcntl.h>
48#include <stdlib.h>
49#include <signal.h>
50#include <stdarg.h>
51#include <string.h>
52#include <unistd.h>
53
54#include "xmalloc.h"
42#include "ssh.h" 55#include "ssh.h"
43#include "rsa.h" 56#include "rsa.h"
44#include "buffer.h" 57#include "buffer.h"
45#include "bufaux.h"
46#include "xmalloc.h"
47#include "getput.h"
48#include "key.h" 58#include "key.h"
49#include "authfd.h" 59#include "authfd.h"
50#include "cipher.h" 60#include "cipher.h"
@@ -52,6 +62,7 @@ RCSID("$OpenBSD: authfd.c,v 1.66 2005/06/17 02:44:32 djm Exp $");
52#include "compat.h" 62#include "compat.h"
53#include "log.h" 63#include "log.h"
54#include "atomicio.h" 64#include "atomicio.h"
65#include "misc.h"
55 66
56static int agent_present = 0; 67static int agent_present = 0;
57 68
@@ -103,7 +114,7 @@ ssh_get_authentication_socket(void)
103 close(sock); 114 close(sock);
104 return -1; 115 return -1;
105 } 116 }
106 if (connect(sock, (struct sockaddr *) &sunaddr, sizeof sunaddr) < 0) { 117 if (connect(sock, (struct sockaddr *)&sunaddr, sizeof sunaddr) < 0) {
107 close(sock); 118 close(sock);
108 return -1; 119 return -1;
109 } 120 }
@@ -119,7 +130,7 @@ ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply
119 130
120 /* Get the length of the message, and format it in the buffer. */ 131 /* Get the length of the message, and format it in the buffer. */
121 len = buffer_len(request); 132 len = buffer_len(request);
122 PUT_32BIT(buf, len); 133 put_u32(buf, len);
123 134
124 /* Send the length and then the packet to the agent. */ 135 /* Send the length and then the packet to the agent. */
125 if (atomicio(vwrite, auth->fd, buf, 4) != 4 || 136 if (atomicio(vwrite, auth->fd, buf, 4) != 4 ||
@@ -138,7 +149,7 @@ ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply
138 } 149 }
139 150
140 /* Extract the length, and check it for sanity. */ 151 /* Extract the length, and check it for sanity. */
141 len = GET_32BIT(buf); 152 len = get_u32(buf);
142 if (len > 256 * 1024) 153 if (len > 256 * 1024)
143 fatal("Authentication response too long: %u", len); 154 fatal("Authentication response too long: %u", len);
144 155
@@ -335,7 +346,6 @@ ssh_get_next_identity(AuthenticationConnection *auth, char **comment, int versio
335 break; 346 break;
336 default: 347 default:
337 return NULL; 348 return NULL;
338 break;
339 } 349 }
340 /* Decrement the number of remaining entries. */ 350 /* Decrement the number of remaining entries. */
341 auth->howmany--; 351 auth->howmany--;
@@ -394,7 +404,7 @@ ssh_decrypt_challenge(AuthenticationConnection *auth,
394 * fatal error if the packet is corrupt. 404 * fatal error if the packet is corrupt.
395 */ 405 */
396 for (i = 0; i < 16; i++) 406 for (i = 0; i < 16; i++)
397 response[i] = buffer_get_char(&buffer); 407 response[i] = (u_char)buffer_get_char(&buffer);
398 } 408 }
399 buffer_free(&buffer); 409 buffer_free(&buffer);
400 return success; 410 return success;
@@ -517,7 +527,6 @@ ssh_add_identity_constrained(AuthenticationConnection *auth, Key *key,
517 default: 527 default:
518 buffer_free(&msg); 528 buffer_free(&msg);
519 return 0; 529 return 0;
520 break;
521 } 530 }
522 if (constrained) { 531 if (constrained) {
523 if (life != 0) { 532 if (life != 0) {
diff --git a/authfd.h b/authfd.h
index 0a6a4e3ec..3da256112 100644
--- a/authfd.h
+++ b/authfd.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: authfd.h,v 1.34 2003/11/21 11:57:03 djm Exp $ */ 1/* $OpenBSD: authfd.h,v 1.36 2006/08/03 03:34:41 deraadt Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -16,8 +16,6 @@
16#ifndef AUTHFD_H 16#ifndef AUTHFD_H
17#define AUTHFD_H 17#define AUTHFD_H
18 18
19#include "buffer.h"
20
21/* Messages for the authentication agent connection. */ 19/* Messages for the authentication agent connection. */
22#define SSH_AGENTC_REQUEST_RSA_IDENTITIES 1 20#define SSH_AGENTC_REQUEST_RSA_IDENTITIES 1
23#define SSH_AGENT_RSA_IDENTITIES_ANSWER 2 21#define SSH_AGENT_RSA_IDENTITIES_ANSWER 2
diff --git a/authfile.c b/authfile.c
index 420813f37..735c64780 100644
--- a/authfile.c
+++ b/authfile.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: authfile.c,v 1.76 2006/08/03 03:34:41 deraadt Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -36,16 +37,27 @@
36 */ 37 */
37 38
38#include "includes.h" 39#include "includes.h"
39RCSID("$OpenBSD: authfile.c,v 1.61 2005/06/17 02:44:32 djm Exp $"); 40
41#include <sys/types.h>
42#include <sys/stat.h>
43#include <sys/param.h>
44#include <sys/uio.h>
40 45
41#include <openssl/err.h> 46#include <openssl/err.h>
42#include <openssl/evp.h> 47#include <openssl/evp.h>
43#include <openssl/pem.h> 48#include <openssl/pem.h>
44 49
45#include "cipher.h" 50#include <errno.h>
51#include <fcntl.h>
52#include <stdarg.h>
53#include <stdio.h>
54#include <stdlib.h>
55#include <string.h>
56#include <unistd.h>
57
46#include "xmalloc.h" 58#include "xmalloc.h"
59#include "cipher.h"
47#include "buffer.h" 60#include "buffer.h"
48#include "bufaux.h"
49#include "key.h" 61#include "key.h"
50#include "ssh.h" 62#include "ssh.h"
51#include "log.h" 63#include "log.h"
@@ -184,7 +196,7 @@ key_save_private_pem(Key *key, const char *filename, const char *_passphrase,
184 return 0; 196 return 0;
185 } 197 }
186 fp = fdopen(fd, "w"); 198 fp = fdopen(fd, "w");
187 if (fp == NULL ) { 199 if (fp == NULL) {
188 error("fdopen %s failed: %s.", filename, strerror(errno)); 200 error("fdopen %s failed: %s.", filename, strerror(errno));
189 close(fd); 201 close(fd);
190 return 0; 202 return 0;
@@ -211,12 +223,10 @@ key_save_private(Key *key, const char *filename, const char *passphrase,
211 case KEY_RSA1: 223 case KEY_RSA1:
212 return key_save_private_rsa1(key, filename, passphrase, 224 return key_save_private_rsa1(key, filename, passphrase,
213 comment); 225 comment);
214 break;
215 case KEY_DSA: 226 case KEY_DSA:
216 case KEY_RSA: 227 case KEY_RSA:
217 return key_save_private_pem(key, filename, passphrase, 228 return key_save_private_pem(key, filename, passphrase,
218 comment); 229 comment);
219 break;
220 default: 230 default:
221 break; 231 break;
222 } 232 }
@@ -507,7 +517,7 @@ key_load_private_pem(int fd, int type, const char *passphrase,
507 return prv; 517 return prv;
508} 518}
509 519
510static int 520int
511key_perm_ok(int fd, const char *filename) 521key_perm_ok(int fd, const char *filename)
512{ 522{
513 struct stat st; 523 struct stat st;
@@ -537,7 +547,7 @@ key_perm_ok(int fd, const char *filename)
537 547
538Key * 548Key *
539key_load_private_type(int type, const char *filename, const char *passphrase, 549key_load_private_type(int type, const char *filename, const char *passphrase,
540 char **commentp) 550 char **commentp, int *perm_ok)
541{ 551{
542 int fd; 552 int fd;
543 553
@@ -545,22 +555,24 @@ key_load_private_type(int type, const char *filename, const char *passphrase,
545 if (fd < 0) 555 if (fd < 0)
546 return NULL; 556 return NULL;
547 if (!key_perm_ok(fd, filename)) { 557 if (!key_perm_ok(fd, filename)) {
558 if (perm_ok != NULL)
559 *perm_ok = 0;
548 error("bad permissions: ignore key: %s", filename); 560 error("bad permissions: ignore key: %s", filename);
549 close(fd); 561 close(fd);
550 return NULL; 562 return NULL;
551 } 563 }
564 if (perm_ok != NULL)
565 *perm_ok = 1;
552 switch (type) { 566 switch (type) {
553 case KEY_RSA1: 567 case KEY_RSA1:
554 return key_load_private_rsa1(fd, filename, passphrase, 568 return key_load_private_rsa1(fd, filename, passphrase,
555 commentp); 569 commentp);
556 /* closes fd */ 570 /* closes fd */
557 break;
558 case KEY_DSA: 571 case KEY_DSA:
559 case KEY_RSA: 572 case KEY_RSA:
560 case KEY_UNSPEC: 573 case KEY_UNSPEC:
561 return key_load_private_pem(fd, type, passphrase, commentp); 574 return key_load_private_pem(fd, type, passphrase, commentp);
562 /* closes fd */ 575 /* closes fd */
563 break;
564 default: 576 default:
565 close(fd); 577 close(fd);
566 break; 578 break;
diff --git a/authfile.h b/authfile.h
index 7f92701ec..a6c74934d 100644
--- a/authfile.h
+++ b/authfile.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: authfile.h,v 1.10 2002/05/23 19:24:30 markus Exp $ */ 1/* $OpenBSD: authfile.h,v 1.13 2006/04/25 08:02:27 dtucker Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -19,7 +19,8 @@ int key_save_private(Key *, const char *, const char *, const char *);
19Key *key_load_public(const char *, char **); 19Key *key_load_public(const char *, char **);
20Key *key_load_public_type(int, const char *, char **); 20Key *key_load_public_type(int, const char *, char **);
21Key *key_load_private(const char *, const char *, char **); 21Key *key_load_private(const char *, const char *, char **);
22Key *key_load_private_type(int, const char *, const char *, char **); 22Key *key_load_private_type(int, const char *, const char *, char **, int *);
23Key *key_load_private_pem(int, int, const char *, char **); 23Key *key_load_private_pem(int, int, const char *, char **);
24int key_perm_ok(int, const char *);
24 25
25#endif 26#endif
diff --git a/bufaux.c b/bufaux.c
index 106a3a0c7..cbdc22c64 100644
--- a/bufaux.c
+++ b/bufaux.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: bufaux.c,v 1.44 2006/08/03 03:34:41 deraadt Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -37,176 +38,18 @@
37 */ 38 */
38 39
39#include "includes.h" 40#include "includes.h"
40RCSID("$OpenBSD: bufaux.c,v 1.37 2005/11/05 05:01:15 djm Exp $");
41 41
42#include <openssl/bn.h> 42#include <sys/types.h>
43#include "bufaux.h"
44#include "xmalloc.h"
45#include "getput.h"
46#include "log.h"
47
48/*
49 * Stores an BIGNUM in the buffer with a 2-byte msb first bit count, followed
50 * by (bits+7)/8 bytes of binary data, msb first.
51 */
52int
53buffer_put_bignum_ret(Buffer *buffer, const BIGNUM *value)
54{
55 int bits = BN_num_bits(value);
56 int bin_size = (bits + 7) / 8;
57 u_char *buf = xmalloc(bin_size);
58 int oi;
59 char msg[2];
60
61 /* Get the value of in binary */
62 oi = BN_bn2bin(value, buf);
63 if (oi != bin_size) {
64 error("buffer_put_bignum_ret: BN_bn2bin() failed: oi %d != bin_size %d",
65 oi, bin_size);
66 xfree(buf);
67 return (-1);
68 }
69
70 /* Store the number of bits in the buffer in two bytes, msb first. */
71 PUT_16BIT(msg, bits);
72 buffer_append(buffer, msg, 2);
73 /* Store the binary data. */
74 buffer_append(buffer, (char *)buf, oi);
75
76 memset(buf, 0, bin_size);
77 xfree(buf);
78
79 return (0);
80}
81
82void
83buffer_put_bignum(Buffer *buffer, const BIGNUM *value)
84{
85 if (buffer_put_bignum_ret(buffer, value) == -1)
86 fatal("buffer_put_bignum: buffer error");
87}
88 43
89/* 44#include <openssl/bn.h>
90 * Retrieves an BIGNUM from the buffer.
91 */
92int
93buffer_get_bignum_ret(Buffer *buffer, BIGNUM *value)
94{
95 u_int bits, bytes;
96 u_char buf[2], *bin;
97
98 /* Get the number for bits. */
99 if (buffer_get_ret(buffer, (char *) buf, 2) == -1) {
100 error("buffer_get_bignum_ret: invalid length");
101 return (-1);
102 }
103 bits = GET_16BIT(buf);
104 /* Compute the number of binary bytes that follow. */
105 bytes = (bits + 7) / 8;
106 if (bytes > 8 * 1024) {
107 error("buffer_get_bignum_ret: cannot handle BN of size %d", bytes);
108 return (-1);
109 }
110 if (buffer_len(buffer) < bytes) {
111 error("buffer_get_bignum_ret: input buffer too small");
112 return (-1);
113 }
114 bin = buffer_ptr(buffer);
115 BN_bin2bn(bin, bytes, value);
116 if (buffer_consume_ret(buffer, bytes) == -1) {
117 error("buffer_get_bignum_ret: buffer_consume failed");
118 return (-1);
119 }
120 return (0);
121}
122
123void
124buffer_get_bignum(Buffer *buffer, BIGNUM *value)
125{
126 if (buffer_get_bignum_ret(buffer, value) == -1)
127 fatal("buffer_get_bignum: buffer error");
128}
129
130/*
131 * Stores an BIGNUM in the buffer in SSH2 format.
132 */
133int
134buffer_put_bignum2_ret(Buffer *buffer, const BIGNUM *value)
135{
136 u_int bytes;
137 u_char *buf;
138 int oi;
139 u_int hasnohigh = 0;
140
141 if (BN_is_zero(value)) {
142 buffer_put_int(buffer, 0);
143 return 0;
144 }
145 if (value->neg) {
146 error("buffer_put_bignum2_ret: negative numbers not supported");
147 return (-1);
148 }
149 bytes = BN_num_bytes(value) + 1; /* extra padding byte */
150 if (bytes < 2) {
151 error("buffer_put_bignum2_ret: BN too small");
152 return (-1);
153 }
154 buf = xmalloc(bytes);
155 buf[0] = 0x00;
156 /* Get the value of in binary */
157 oi = BN_bn2bin(value, buf+1);
158 if (oi < 0 || (u_int)oi != bytes - 1) {
159 error("buffer_put_bignum2_ret: BN_bn2bin() failed: "
160 "oi %d != bin_size %d", oi, bytes);
161 xfree(buf);
162 return (-1);
163 }
164 hasnohigh = (buf[1] & 0x80) ? 0 : 1;
165 buffer_put_string(buffer, buf+hasnohigh, bytes-hasnohigh);
166 memset(buf, 0, bytes);
167 xfree(buf);
168 return (0);
169}
170
171void
172buffer_put_bignum2(Buffer *buffer, const BIGNUM *value)
173{
174 if (buffer_put_bignum2_ret(buffer, value) == -1)
175 fatal("buffer_put_bignum2: buffer error");
176}
177
178int
179buffer_get_bignum2_ret(Buffer *buffer, BIGNUM *value)
180{
181 u_int len;
182 u_char *bin;
183
184 if ((bin = buffer_get_string_ret(buffer, &len)) == NULL) {
185 error("buffer_get_bignum2_ret: invalid bignum");
186 return (-1);
187 }
188 45
189 if (len > 0 && (bin[0] & 0x80)) { 46#include <string.h>
190 error("buffer_get_bignum2_ret: negative numbers not supported"); 47#include <stdarg.h>
191 xfree(bin);
192 return (-1);
193 }
194 if (len > 8 * 1024) {
195 error("buffer_get_bignum2_ret: cannot handle BN of size %d", len);
196 xfree(bin);
197 return (-1);
198 }
199 BN_bin2bn(bin, len, value);
200 xfree(bin);
201 return (0);
202}
203 48
204void 49#include "xmalloc.h"
205buffer_get_bignum2(Buffer *buffer, BIGNUM *value) 50#include "buffer.h"
206{ 51#include "log.h"
207 if (buffer_get_bignum2_ret(buffer, value) == -1) 52#include "misc.h"
208 fatal("buffer_get_bignum2: buffer error");
209}
210 53
211/* 54/*
212 * Returns integers from the buffer (msb first). 55 * Returns integers from the buffer (msb first).
@@ -219,7 +62,7 @@ buffer_get_short_ret(u_short *ret, Buffer *buffer)
219 62
220 if (buffer_get_ret(buffer, (char *) buf, 2) == -1) 63 if (buffer_get_ret(buffer, (char *) buf, 2) == -1)
221 return (-1); 64 return (-1);
222 *ret = GET_16BIT(buf); 65 *ret = get_u16(buf);
223 return (0); 66 return (0);
224} 67}
225 68
@@ -241,7 +84,7 @@ buffer_get_int_ret(u_int *ret, Buffer *buffer)
241 84
242 if (buffer_get_ret(buffer, (char *) buf, 4) == -1) 85 if (buffer_get_ret(buffer, (char *) buf, 4) == -1)
243 return (-1); 86 return (-1);
244 *ret = GET_32BIT(buf); 87 *ret = get_u32(buf);
245 return (0); 88 return (0);
246} 89}
247 90
@@ -263,7 +106,7 @@ buffer_get_int64_ret(u_int64_t *ret, Buffer *buffer)
263 106
264 if (buffer_get_ret(buffer, (char *) buf, 8) == -1) 107 if (buffer_get_ret(buffer, (char *) buf, 8) == -1)
265 return (-1); 108 return (-1);
266 *ret = GET_64BIT(buf); 109 *ret = get_u64(buf);
267 return (0); 110 return (0);
268} 111}
269 112
@@ -286,7 +129,7 @@ buffer_put_short(Buffer *buffer, u_short value)
286{ 129{
287 char buf[2]; 130 char buf[2];
288 131
289 PUT_16BIT(buf, value); 132 put_u16(buf, value);
290 buffer_append(buffer, buf, 2); 133 buffer_append(buffer, buf, 2);
291} 134}
292 135
@@ -295,7 +138,7 @@ buffer_put_int(Buffer *buffer, u_int value)
295{ 138{
296 char buf[4]; 139 char buf[4];
297 140
298 PUT_32BIT(buf, value); 141 put_u32(buf, value);
299 buffer_append(buffer, buf, 4); 142 buffer_append(buffer, buf, 4);
300} 143}
301 144
@@ -304,7 +147,7 @@ buffer_put_int64(Buffer *buffer, u_int64_t value)
304{ 147{
305 char buf[8]; 148 char buf[8];
306 149
307 PUT_64BIT(buf, value); 150 put_u64(buf, value);
308 buffer_append(buffer, buf, 8); 151 buffer_append(buffer, buf, 8);
309} 152}
310 153
diff --git a/bufbn.c b/bufbn.c
new file mode 100644
index 000000000..ce8fba515
--- /dev/null
+++ b/bufbn.c
@@ -0,0 +1,221 @@
1/* $OpenBSD: bufbn.c,v 1.5 2007/02/14 14:32:00 stevesk Exp $*/
2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
5 * All rights reserved
6 * Auxiliary functions for storing and retrieving various data types to/from
7 * Buffers.
8 *
9 * As far as I am concerned, the code I have written for this software
10 * can be used freely for any purpose. Any derived versions of this
11 * software must be clearly marked as such, and if the derived work is
12 * incompatible with the protocol description in the RFC file, it must be
13 * called by a name other than "ssh" or "Secure Shell".
14 *
15 *
16 * SSH2 packet format added by Markus Friedl
17 * Copyright (c) 2000 Markus Friedl. All rights reserved.
18 *
19 * Redistribution and use in source and binary forms, with or without
20 * modification, are permitted provided that the following conditions
21 * are met:
22 * 1. Redistributions of source code must retain the above copyright
23 * notice, this list of conditions and the following disclaimer.
24 * 2. Redistributions in binary form must reproduce the above copyright
25 * notice, this list of conditions and the following disclaimer in the
26 * documentation and/or other materials provided with the distribution.
27 *
28 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
29 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
30 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
31 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
32 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
33 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
37 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 */
39
40#include "includes.h"
41
42#include <sys/types.h>
43
44#include <openssl/bn.h>
45
46#include <string.h>
47#include <stdarg.h>
48
49#include "xmalloc.h"
50#include "buffer.h"
51#include "log.h"
52#include "misc.h"
53
54/*
55 * Stores an BIGNUM in the buffer with a 2-byte msb first bit count, followed
56 * by (bits+7)/8 bytes of binary data, msb first.
57 */
58int
59buffer_put_bignum_ret(Buffer *buffer, const BIGNUM *value)
60{
61 int bits = BN_num_bits(value);
62 int bin_size = (bits + 7) / 8;
63 u_char *buf = xmalloc(bin_size);
64 int oi;
65 char msg[2];
66
67 /* Get the value of in binary */
68 oi = BN_bn2bin(value, buf);
69 if (oi != bin_size) {
70 error("buffer_put_bignum_ret: BN_bn2bin() failed: oi %d != bin_size %d",
71 oi, bin_size);
72 xfree(buf);
73 return (-1);
74 }
75
76 /* Store the number of bits in the buffer in two bytes, msb first. */
77 put_u16(msg, bits);
78 buffer_append(buffer, msg, 2);
79 /* Store the binary data. */
80 buffer_append(buffer, buf, oi);
81
82 memset(buf, 0, bin_size);
83 xfree(buf);
84
85 return (0);
86}
87
88void
89buffer_put_bignum(Buffer *buffer, const BIGNUM *value)
90{
91 if (buffer_put_bignum_ret(buffer, value) == -1)
92 fatal("buffer_put_bignum: buffer error");
93}
94
95/*
96 * Retrieves a BIGNUM from the buffer.
97 */
98int
99buffer_get_bignum_ret(Buffer *buffer, BIGNUM *value)
100{
101 u_int bits, bytes;
102 u_char buf[2], *bin;
103
104 /* Get the number of bits. */
105 if (buffer_get_ret(buffer, (char *) buf, 2) == -1) {
106 error("buffer_get_bignum_ret: invalid length");
107 return (-1);
108 }
109 bits = get_u16(buf);
110 /* Compute the number of binary bytes that follow. */
111 bytes = (bits + 7) / 8;
112 if (bytes > 8 * 1024) {
113 error("buffer_get_bignum_ret: cannot handle BN of size %d", bytes);
114 return (-1);
115 }
116 if (buffer_len(buffer) < bytes) {
117 error("buffer_get_bignum_ret: input buffer too small");
118 return (-1);
119 }
120 bin = buffer_ptr(buffer);
121 if (BN_bin2bn(bin, bytes, value) == NULL) {
122 error("buffer_get_bignum_ret: BN_bin2bn failed");
123 return (-1);
124 }
125 if (buffer_consume_ret(buffer, bytes) == -1) {
126 error("buffer_get_bignum_ret: buffer_consume failed");
127 return (-1);
128 }
129 return (0);
130}
131
132void
133buffer_get_bignum(Buffer *buffer, BIGNUM *value)
134{
135 if (buffer_get_bignum_ret(buffer, value) == -1)
136 fatal("buffer_get_bignum: buffer error");
137}
138
139/*
140 * Stores a BIGNUM in the buffer in SSH2 format.
141 */
142int
143buffer_put_bignum2_ret(Buffer *buffer, const BIGNUM *value)
144{
145 u_int bytes;
146 u_char *buf;
147 int oi;
148 u_int hasnohigh = 0;
149
150 if (BN_is_zero(value)) {
151 buffer_put_int(buffer, 0);
152 return 0;
153 }
154 if (value->neg) {
155 error("buffer_put_bignum2_ret: negative numbers not supported");
156 return (-1);
157 }
158 bytes = BN_num_bytes(value) + 1; /* extra padding byte */
159 if (bytes < 2) {
160 error("buffer_put_bignum2_ret: BN too small");
161 return (-1);
162 }
163 buf = xmalloc(bytes);
164 buf[0] = 0x00;
165 /* Get the value of in binary */
166 oi = BN_bn2bin(value, buf+1);
167 if (oi < 0 || (u_int)oi != bytes - 1) {
168 error("buffer_put_bignum2_ret: BN_bn2bin() failed: "
169 "oi %d != bin_size %d", oi, bytes);
170 xfree(buf);
171 return (-1);
172 }
173 hasnohigh = (buf[1] & 0x80) ? 0 : 1;
174 buffer_put_string(buffer, buf+hasnohigh, bytes-hasnohigh);
175 memset(buf, 0, bytes);
176 xfree(buf);
177 return (0);
178}
179
180void
181buffer_put_bignum2(Buffer *buffer, const BIGNUM *value)
182{
183 if (buffer_put_bignum2_ret(buffer, value) == -1)
184 fatal("buffer_put_bignum2: buffer error");
185}
186
187int
188buffer_get_bignum2_ret(Buffer *buffer, BIGNUM *value)
189{
190 u_int len;
191 u_char *bin;
192
193 if ((bin = buffer_get_string_ret(buffer, &len)) == NULL) {
194 error("buffer_get_bignum2_ret: invalid bignum");
195 return (-1);
196 }
197
198 if (len > 0 && (bin[0] & 0x80)) {
199 error("buffer_get_bignum2_ret: negative numbers not supported");
200 xfree(bin);
201 return (-1);
202 }
203 if (len > 8 * 1024) {
204 error("buffer_get_bignum2_ret: cannot handle BN of size %d", len);
205 xfree(bin);
206 return (-1);
207 }
208 if (BN_bin2bn(bin, len, value) == NULL) {
209 error("buffer_get_bignum2_ret: BN_bin2bn failed");
210 return (-1);
211 }
212 xfree(bin);
213 return (0);
214}
215
216void
217buffer_get_bignum2(Buffer *buffer, BIGNUM *value)
218{
219 if (buffer_get_bignum2_ret(buffer, value) == -1)
220 fatal("buffer_get_bignum2: buffer error");
221}
diff --git a/buffer.c b/buffer.c
index 487e08105..e02e1e35c 100644
--- a/buffer.c
+++ b/buffer.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: buffer.c,v 1.31 2006/08/03 03:34:41 deraadt Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -12,12 +13,21 @@
12 */ 13 */
13 14
14#include "includes.h" 15#include "includes.h"
15RCSID("$OpenBSD: buffer.c,v 1.23 2005/03/14 11:46:56 markus Exp $"); 16
17#include <sys/param.h>
18
19#include <stdio.h>
20#include <string.h>
21#include <stdarg.h>
16 22
17#include "xmalloc.h" 23#include "xmalloc.h"
18#include "buffer.h" 24#include "buffer.h"
19#include "log.h" 25#include "log.h"
20 26
27#define BUFFER_MAX_CHUNK 0x100000
28#define BUFFER_MAX_LEN 0xa00000
29#define BUFFER_ALLOCSZ 0x008000
30
21/* Initializes the buffer structure. */ 31/* Initializes the buffer structure. */
22 32
23void 33void
@@ -66,6 +76,23 @@ buffer_append(Buffer *buffer, const void *data, u_int len)
66 memcpy(p, data, len); 76 memcpy(p, data, len);
67} 77}
68 78
79static int
80buffer_compact(Buffer *buffer)
81{
82 /*
83 * If the buffer is quite empty, but all data is at the end, move the
84 * data to the beginning.
85 */
86 if (buffer->offset > MIN(buffer->alloc, BUFFER_MAX_CHUNK)) {
87 memmove(buffer->buf, buffer->buf + buffer->offset,
88 buffer->end - buffer->offset);
89 buffer->end -= buffer->offset;
90 buffer->offset = 0;
91 return (1);
92 }
93 return (0);
94}
95
69/* 96/*
70 * Appends space to the buffer, expanding the buffer if necessary. This does 97 * Appends space to the buffer, expanding the buffer if necessary. This does
71 * not actually copy the data into the buffer, but instead returns a pointer 98 * not actually copy the data into the buffer, but instead returns a pointer
@@ -93,29 +120,43 @@ restart:
93 buffer->end += len; 120 buffer->end += len;
94 return p; 121 return p;
95 } 122 }
96 /* 123
97 * If the buffer is quite empty, but all data is at the end, move the 124 /* Compact data back to the start of the buffer if necessary */
98 * data to the beginning and retry. 125 if (buffer_compact(buffer))
99 */
100 if (buffer->offset > MIN(buffer->alloc, BUFFER_MAX_CHUNK)) {
101 memmove(buffer->buf, buffer->buf + buffer->offset,
102 buffer->end - buffer->offset);
103 buffer->end -= buffer->offset;
104 buffer->offset = 0;
105 goto restart; 126 goto restart;
106 }
107 /* Increase the size of the buffer and retry. */
108 127
109 newlen = buffer->alloc + len + 32768; 128 /* Increase the size of the buffer and retry. */
129 newlen = roundup(buffer->alloc + len, BUFFER_ALLOCSZ);
110 if (newlen > BUFFER_MAX_LEN) 130 if (newlen > BUFFER_MAX_LEN)
111 fatal("buffer_append_space: alloc %u not supported", 131 fatal("buffer_append_space: alloc %u not supported",
112 newlen); 132 newlen);
113 buffer->buf = xrealloc(buffer->buf, newlen); 133 buffer->buf = xrealloc(buffer->buf, 1, newlen);
114 buffer->alloc = newlen; 134 buffer->alloc = newlen;
115 goto restart; 135 goto restart;
116 /* NOTREACHED */ 136 /* NOTREACHED */
117} 137}
118 138
139/*
140 * Check whether an allocation of 'len' will fit in the buffer
141 * This must follow the same math as buffer_append_space
142 */
143int
144buffer_check_alloc(Buffer *buffer, u_int len)
145{
146 if (buffer->offset == buffer->end) {
147 buffer->offset = 0;
148 buffer->end = 0;
149 }
150 restart:
151 if (buffer->end + len < buffer->alloc)
152 return (1);
153 if (buffer_compact(buffer))
154 goto restart;
155 if (roundup(buffer->alloc + len, BUFFER_ALLOCSZ) <= BUFFER_MAX_LEN)
156 return (1);
157 return (0);
158}
159
119/* Returns the number of bytes of data in the buffer. */ 160/* Returns the number of bytes of data in the buffer. */
120 161
121u_int 162u_int
diff --git a/buffer.h b/buffer.h
index 2b20eed52..ecc4aea83 100644
--- a/buffer.h
+++ b/buffer.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: buffer.h,v 1.13 2005/03/14 11:46:56 markus Exp $ */ 1/* $OpenBSD: buffer.h,v 1.16 2006/08/03 03:34:41 deraadt Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -23,9 +23,6 @@ typedef struct {
23 u_int end; /* Offset of last byte containing data. */ 23 u_int end; /* Offset of last byte containing data. */
24} Buffer; 24} Buffer;
25 25
26#define BUFFER_MAX_CHUNK 0x100000
27#define BUFFER_MAX_LEN 0xa00000
28
29void buffer_init(Buffer *); 26void buffer_init(Buffer *);
30void buffer_clear(Buffer *); 27void buffer_clear(Buffer *);
31void buffer_free(Buffer *); 28void buffer_free(Buffer *);
@@ -36,6 +33,8 @@ void *buffer_ptr(Buffer *);
36void buffer_append(Buffer *, const void *, u_int); 33void buffer_append(Buffer *, const void *, u_int);
37void *buffer_append_space(Buffer *, u_int); 34void *buffer_append_space(Buffer *, u_int);
38 35
36int buffer_check_alloc(Buffer *, u_int);
37
39void buffer_get(Buffer *, void *, u_int); 38void buffer_get(Buffer *, void *, u_int);
40 39
41void buffer_consume(Buffer *, u_int); 40void buffer_consume(Buffer *, u_int);
@@ -47,4 +46,40 @@ int buffer_get_ret(Buffer *, void *, u_int);
47int buffer_consume_ret(Buffer *, u_int); 46int buffer_consume_ret(Buffer *, u_int);
48int buffer_consume_end_ret(Buffer *, u_int); 47int buffer_consume_end_ret(Buffer *, u_int);
49 48
49#include <openssl/bn.h>
50
51void buffer_put_bignum(Buffer *, const BIGNUM *);
52void buffer_put_bignum2(Buffer *, const BIGNUM *);
53void buffer_get_bignum(Buffer *, BIGNUM *);
54void buffer_get_bignum2(Buffer *, BIGNUM *);
55
56u_short buffer_get_short(Buffer *);
57void buffer_put_short(Buffer *, u_short);
58
59u_int buffer_get_int(Buffer *);
60void buffer_put_int(Buffer *, u_int);
61
62u_int64_t buffer_get_int64(Buffer *);
63void buffer_put_int64(Buffer *, u_int64_t);
64
65int buffer_get_char(Buffer *);
66void buffer_put_char(Buffer *, int);
67
68void *buffer_get_string(Buffer *, u_int *);
69void buffer_put_string(Buffer *, const void *, u_int);
70void buffer_put_cstring(Buffer *, const char *);
71
72#define buffer_skip_string(b) \
73 do { u_int l = buffer_get_int(b); buffer_consume(b, l); } while (0)
74
75int buffer_put_bignum_ret(Buffer *, const BIGNUM *);
76int buffer_get_bignum_ret(Buffer *, BIGNUM *);
77int buffer_put_bignum2_ret(Buffer *, const BIGNUM *);
78int buffer_get_bignum2_ret(Buffer *, BIGNUM *);
79int buffer_get_short_ret(u_short *, Buffer *);
80int buffer_get_int_ret(u_int *, Buffer *);
81int buffer_get_int64_ret(u_int64_t *, Buffer *);
82void *buffer_get_string_ret(Buffer *, u_int *);
83int buffer_get_char_ret(char *, Buffer *);
84
50#endif /* BUFFER_H */ 85#endif /* BUFFER_H */
diff --git a/buildpkg.sh.in b/buildpkg.sh.in
index cb9eb3048..8a96b9050 100644
--- a/buildpkg.sh.in
+++ b/buildpkg.sh.in
@@ -24,6 +24,7 @@ PKGNAME=OpenSSH
24# revisions within the same version (REV=a) 24# revisions within the same version (REV=a)
25#REV= 25#REV=
26SYSVINIT_NAME=opensshd 26SYSVINIT_NAME=opensshd
27AWK=${AWK:="nawk"}
27MAKE=${MAKE:="make"} 28MAKE=${MAKE:="make"}
28SSHDUID=67 # Default privsep uid 29SSHDUID=67 # Default privsep uid
29SSHDGID=67 # Default privsep gid 30SSHDGID=67 # Default privsep gid
@@ -35,7 +36,7 @@ SSHDGID=67 # Default privsep gid
35SYSVINITSTART=S98 36SYSVINITSTART=S98
36SYSVINITSTOPT=K30 37SYSVINITSTOPT=K30
37# We will source these if they exist 38# We will source these if they exist
38POST_MAKE_INSTALL_FIXES=./pkg_post_make_install_fixes.sh 39POST_MAKE_INSTALL_FIXES=./pkg-post-make-install-fixes.sh
39POST_PROTOTYPE_EDITS=./pkg-post-prototype-edit.sh 40POST_PROTOTYPE_EDITS=./pkg-post-prototype-edit.sh
40# We'll be one level deeper looking for these 41# We'll be one level deeper looking for these
41PKG_PREINSTALL_LOCAL=../pkg-preinstall.local 42PKG_PREINSTALL_LOCAL=../pkg-preinstall.local
@@ -46,6 +47,8 @@ PKG_REQUEST_LOCAL=../pkg-request.local
46# end of sourced files 47# end of sourced files
47# 48#
48OPENSSHD=opensshd.init 49OPENSSHD=opensshd.init
50OPENSSH_MANIFEST=openssh.xml
51OPENSSH_FMRI=svc:/site/${SYSVINIT_NAME}:default
49 52
50PATH_GROUPADD_PROG=@PATH_GROUPADD_PROG@ 53PATH_GROUPADD_PROG=@PATH_GROUPADD_PROG@
51PATH_USERADD_PROG=@PATH_USERADD_PROG@ 54PATH_USERADD_PROG=@PATH_USERADD_PROG@
@@ -60,6 +63,10 @@ SYSTEM_DIR="/etc \
60/etc/rc1.d \ 63/etc/rc1.d \
61/etc/rc2.d \ 64/etc/rc2.d \
62/etc/opt \ 65/etc/opt \
66/lib \
67/lib/svc \
68/lib/svc/method \
69/lib/svc/method/site \
63/opt \ 70/opt \
64/opt/bin \ 71/opt/bin \
65/usr \ 72/usr \
@@ -82,6 +89,9 @@ SYSTEM_DIR="/etc \
82/var \ 89/var \
83/var/opt \ 90/var/opt \
84/var/run \ 91/var/run \
92/var/svc \
93/var/svc/manifest \
94/var/svc/manifest/site \
85/var/tmp \ 95/var/tmp \
86/tmp" 96/tmp"
87 97
@@ -119,6 +129,12 @@ do
119 eval $confvar=`grep "^$confvar=" Makefile | cut -d = -f 2` 129 eval $confvar=`grep "^$confvar=" Makefile | cut -d = -f 2`
120done 130done
121 131
132## Are we using Solaris' SMF?
133DO_SMF=0
134if egrep "^#define USE_SOLARIS_PROCESS_CONTRACTS" config.h > /dev/null 2>&1
135then
136 DO_SMF=1
137fi
122 138
123## Collect value of privsep user 139## Collect value of privsep user
124for confvar in SSH_PRIVSEP_USER 140for confvar in SSH_PRIVSEP_USER
@@ -139,15 +155,22 @@ ARCH=`uname -m`
139DEF_MSG="\n" 155DEF_MSG="\n"
140OS_VER=`uname -v` 156OS_VER=`uname -v`
141SCRIPT_SHELL=/sbin/sh 157SCRIPT_SHELL=/sbin/sh
158UNAME_R=`uname -r`
142UNAME_S=`uname -s` 159UNAME_S=`uname -s`
143case ${UNAME_S} in 160case ${UNAME_S} in
144 SunOS) UNAME_S=Solaris 161 SunOS) UNAME_S=Solaris
162 OS_VER=${UNAME_R}
145 ARCH=`uname -p` 163 ARCH=`uname -p`
146 RCS_D=yes 164 RCS_D=yes
147 DEF_MSG="(default: n)" 165 DEF_MSG="(default: n)"
148 ;; 166 ;;
149 SCO_SV) UNAME_S=OpenServer 167 SCO_SV) case ${UNAME_R} in
168 3.2) UNAME_S=OpenServer5
150 OS_VER=`uname -X | grep Release | sed -e 's/^Rel.*3.2v//'` 169 OS_VER=`uname -X | grep Release | sed -e 's/^Rel.*3.2v//'`
170 ;;
171 5) UNAME_S=OpenServer6
172 ;;
173 esac
151 SCRIPT_SHELL=/bin/sh 174 SCRIPT_SHELL=/bin/sh
152 RC1_D=no 175 RC1_D=no
153 DEF_MSG="(default: n)" 176 DEF_MSG="(default: n)"
@@ -168,10 +191,26 @@ then
168fi 191fi
169 192
170## Setup our run level stuff while we are at it. 193## Setup our run level stuff while we are at it.
171mkdir -p $FAKE_ROOT${TEST_DIR}/etc/init.d 194if [ $DO_SMF -eq 1 ]
195then
196 # For Solaris' SMF, /lib/svc/method/site is the preferred place
197 # for start/stop scripts that aren't supplied with the OS, and
198 # similarly /var/svc/manifest/site for manifests.
199 mkdir -p $FAKE_ROOT${TEST_DIR}/lib/svc/method/site
200 mkdir -p $FAKE_ROOT${TEST_DIR}/var/svc/manifest/site
201
202 cp ${OPENSSHD} $FAKE_ROOT${TEST_DIR}/lib/svc/method/site/${SYSVINIT_NAME}
203 chmod 744 $FAKE_ROOT${TEST_DIR}/lib/svc/method/site/${SYSVINIT_NAME}
204
205 cat ${OPENSSH_MANIFEST} | sed "s|__SYSVINIT_NAME__|${SYSVINIT_NAME}|" \
206 > $FAKE_ROOT${TEST_DIR}/var/svc/manifest/site/${SYSVINIT_NAME}.xml
207 chmod 644 $FAKE_ROOT${TEST_DIR}/var/svc/manifest/site/${SYSVINIT_NAME}.xml
208else
209 mkdir -p $FAKE_ROOT${TEST_DIR}/etc/init.d
172 210
173cp ${OPENSSHD} $FAKE_ROOT${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} 211 cp ${OPENSSHD} $FAKE_ROOT${TEST_DIR}/etc/init.d/${SYSVINIT_NAME}
174chmod 744 $FAKE_ROOT${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} 212 chmod 744 $FAKE_ROOT${TEST_DIR}/etc/init.d/${SYSVINIT_NAME}
213fi
175 214
176[ "${PERMIT_ROOT_LOGIN}" = no ] && \ 215[ "${PERMIT_ROOT_LOGIN}" = no ] && \
177 perl -p -i -e "s/#PermitRootLogin yes/PermitRootLogin no/" \ 216 perl -p -i -e "s/#PermitRootLogin yes/PermitRootLogin no/" \
@@ -221,15 +260,22 @@ touch depend
221 260
222## Build space file 261## Build space file
223echo "Building space file..." 262echo "Building space file..."
224cat > space << _EOF 263if [ $DO_SMF -eq 1 ]
225# extra space required by start/stop links added by installf in postinstall 264then
265 # XXX Is this necessary? If not, remove space line from mk-proto.awk.
266 touch space
267else
268 cat > space << _EOF
269# extra space required by start/stop links added by installf
270# in postinstall
226$TEST_DIR/etc/rc0.d/${SYSVINITSTOPT}${SYSVINIT_NAME} 0 1 271$TEST_DIR/etc/rc0.d/${SYSVINITSTOPT}${SYSVINIT_NAME} 0 1
227$TEST_DIR/etc/rc2.d/${SYSVINITSTART}${SYSVINIT_NAME} 0 1 272$TEST_DIR/etc/rc2.d/${SYSVINITSTART}${SYSVINIT_NAME} 0 1
228_EOF 273_EOF
229[ "$RC1_D" = no ] || \ 274 [ "$RC1_D" = no ] || \
230echo "$TEST_DIR/etc/rc1.d/${SYSVINITSTOPT}${SYSVINIT_NAME} 0 1" >> space 275 echo "$TEST_DIR/etc/rc1.d/${SYSVINITSTOPT}${SYSVINIT_NAME} 0 1" >> space
231[ "$RCS_D" = yes ] && \ 276 [ "$RCS_D" = yes ] && \
232echo "$TEST_DIR/etc/rcS.d/${SYSVINITSTOPT}${SYSVINIT_NAME} 0 1" >> space 277 echo "$TEST_DIR/etc/rcS.d/${SYSVINITSTOPT}${SYSVINIT_NAME} 0 1" >> space
278fi
233 279
234## Build preinstall file 280## Build preinstall file
235echo "Building preinstall file..." 281echo "Building preinstall file..."
@@ -243,7 +289,16 @@ _EOF
243 289
244cat >> preinstall << _EOF 290cat >> preinstall << _EOF
245# 291#
246[ "\${PRE_INS_STOP}" = "yes" ] && ${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} stop 292if [ "\${PRE_INS_STOP}" = "yes" ]
293then
294 if [ $DO_SMF -eq 1 ]
295 then
296 svcadm disable $OPENSSH_FMRI
297 else
298 ${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} stop
299 fi
300fi
301
247exit 0 302exit 0
248_EOF 303_EOF
249 304
@@ -265,28 +320,40 @@ cat > postinstall << _EOF
265} 320}
266 321
267# make rc?.d dirs only if we are doing a test install 322# make rc?.d dirs only if we are doing a test install
268[ -n "${TEST_DIR}" ] && { 323[ -n "${TEST_DIR}" ] && [ $DO_SMF -ne 1 ] && {
269 [ "$RCS_D" = yes ] && mkdir -p ${TEST_DIR}/etc/rcS.d 324 [ "$RCS_D" = yes ] && mkdir -p ${TEST_DIR}/etc/rcS.d
270 mkdir -p ${TEST_DIR}/etc/rc0.d 325 mkdir -p ${TEST_DIR}/etc/rc0.d
271 [ "$RC1_D" = no ] || mkdir -p ${TEST_DIR}/etc/rc1.d 326 [ "$RC1_D" = no ] || mkdir -p ${TEST_DIR}/etc/rc1.d
272 mkdir -p ${TEST_DIR}/etc/rc2.d 327 mkdir -p ${TEST_DIR}/etc/rc2.d
273} 328}
274 329
275if [ "\${USE_SYM_LINKS}" = yes ] 330if [ $DO_SMF -eq 1 ]
276then 331then
277 [ "$RCS_D" = yes ] && \ 332 # Delete the existing service, if it exists, then import the
278installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rcS.d/${SYSVINITSTOPT}${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s 333 # new one.
279 installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc0.d/${SYSVINITSTOPT}${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s 334 if svcs $OPENSSH_FMRI > /dev/null 2>&1
280 [ "$RC1_D" = no ] || \ 335 then
281 installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc1.d/${SYSVINITSTOPT}${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s 336 svccfg delete -f $OPENSSH_FMRI
282 installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc2.d/${SYSVINITSTART}${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s 337 fi
338 # NOTE, The manifest disables sshd by default.
339 svccfg import ${TEST_DIR}/var/svc/manifest/site/${SYSVINIT_NAME}.xml
283else 340else
284 [ "$RCS_D" = yes ] && \ 341 if [ "\${USE_SYM_LINKS}" = yes ]
285installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rcS.d/${SYSVINITSTOPT}${SYSVINIT_NAME}=\${PKG_INSTALL_ROOT}$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l 342 then
286 installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc0.d/${SYSVINITSTOPT}${SYSVINIT_NAME}=\${PKG_INSTALL_ROOT}$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l 343 [ "$RCS_D" = yes ] && \
287 [ "$RC1_D" = no ] || \ 344 installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rcS.d/${SYSVINITSTOPT}${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s
288 installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc1.d/${SYSVINITSTOPT}${SYSVINIT_NAME}=\${PKG_INSTALL_ROOT}$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l 345 installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc0.d/${SYSVINITSTOPT}${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s
289 installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc2.d/${SYSVINITSTART}${SYSVINIT_NAME}=\${PKG_INSTALL_ROOT}$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l 346 [ "$RC1_D" = no ] || \
347 installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc1.d/${SYSVINITSTOPT}${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s
348 installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc2.d/${SYSVINITSTART}${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s
349 else
350 [ "$RCS_D" = yes ] && \
351 installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rcS.d/${SYSVINITSTOPT}${SYSVINIT_NAME}=\${PKG_INSTALL_ROOT}$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l
352 installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc0.d/${SYSVINITSTOPT}${SYSVINIT_NAME}=\${PKG_INSTALL_ROOT}$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l
353 [ "$RC1_D" = no ] || \
354 installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc1.d/${SYSVINITSTOPT}${SYSVINIT_NAME}=\${PKG_INSTALL_ROOT}$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l
355 installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc2.d/${SYSVINITSTART}${SYSVINIT_NAME}=\${PKG_INSTALL_ROOT}$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l
356 fi
290fi 357fi
291 358
292# If piddir doesn't exist we add it. (Ie. --with-pid-dir=/var/opt/ssh) 359# If piddir doesn't exist we add it. (Ie. --with-pid-dir=/var/opt/ssh)
@@ -311,14 +378,7 @@ then
311 chroot=echo 378 chroot=echo
312fi 379fi
313 380
314if egrep '^[ \t]*UsePrivilegeSeparation[ \t]+no' \${PKG_INSTALL_ROOT}/$sysconfdir/sshd_config >/dev/null 381 echo "PrivilegeSeparation user always required."
315then
316 echo "UsePrivilegeSeparation disabled in config, not creating PrivSep user"
317 echo "or group."
318else
319 echo "UsePrivilegeSeparation enabled in config (or defaulting to on)."
320
321 # user required?
322 if cut -f1 -d: \${PKG_INSTALL_ROOT}/etc/passwd | egrep '^'$SSH_PRIVSEP_USER'\$' >/dev/null 382 if cut -f1 -d: \${PKG_INSTALL_ROOT}/etc/passwd | egrep '^'$SSH_PRIVSEP_USER'\$' >/dev/null
323 then 383 then
324 echo "PrivSep user $SSH_PRIVSEP_USER already exists." 384 echo "PrivSep user $SSH_PRIVSEP_USER already exists."
@@ -363,9 +423,16 @@ else
363 \$chroot ${PATH_USERADD_PROG} -c 'SSHD PrivSep User' -s /bin/false -g $SSH_PRIVSEP_USER \$sshduid $SSH_PRIVSEP_USER 423 \$chroot ${PATH_USERADD_PROG} -c 'SSHD PrivSep User' -s /bin/false -g $SSH_PRIVSEP_USER \$sshduid $SSH_PRIVSEP_USER
364 \$chroot ${PATH_PASSWD_PROG} -l $SSH_PRIVSEP_USER 424 \$chroot ${PATH_PASSWD_PROG} -l $SSH_PRIVSEP_USER
365 } 425 }
366fi
367 426
368[ "\${POST_INS_START}" = "yes" ] && ${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} start 427if [ "\${POST_INS_START}" = "yes" ]
428then
429 if [ $DO_SMF -eq 1 ]
430 then
431 svcadm enable $OPENSSH_FMRI
432 else
433 ${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} start
434 fi
435fi
369exit 0 436exit 0
370_EOF 437_EOF
371 438
@@ -374,7 +441,12 @@ echo "Building preremove file..."
374cat > preremove << _EOF 441cat > preremove << _EOF
375#! ${SCRIPT_SHELL} 442#! ${SCRIPT_SHELL}
376# 443#
377${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} stop 444if [ $DO_SMF -eq 1 ]
445then
446 svcadm disable $OPENSSH_FMRI
447else
448 ${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} stop
449fi
378_EOF 450_EOF
379 451
380# local preremove changes here 452# local preremove changes here
@@ -389,6 +461,13 @@ echo "Building postremove file..."
389cat > postremove << _EOF 461cat > postremove << _EOF
390#! ${SCRIPT_SHELL} 462#! ${SCRIPT_SHELL}
391# 463#
464if [ $DO_SMF -eq 1 ]
465then
466 if svcs $OPENSSH_FMRI > /dev/null 2>&1
467 then
468 svccfg delete -f $OPENSSH_FMRI
469 fi
470fi
392_EOF 471_EOF
393 472
394# local postremove changes here 473# local postremove changes here
@@ -408,7 +487,7 @@ _EOF
408[ -x /usr/bin/ckyorn ] || cat >> request << _EOF 487[ -x /usr/bin/ckyorn ] || cat >> request << _EOF
409 488
410ckyorn() { 489ckyorn() {
411# for some strange reason OpenServer has no ckyorn 490# for some strange reason OpenServer5 has no ckyorn
412# We build a striped down version here 491# We build a striped down version here
413 492
414DEFAULT=n 493DEFAULT=n
@@ -454,7 +533,45 @@ done
454 533
455_EOF 534_EOF
456 535
457cat >> request << _EOF 536if [ $DO_SMF -eq 1 ]
537then
538 # This could get hairy, as the running sshd may not be under SMF.
539 # We'll assume an earlier version of OpenSSH started via SMF.
540 cat >> request << _EOF
541PRE_INS_STOP=no
542POST_INS_START=no
543# determine if should restart the daemon
544if [ -s ${piddir}/sshd.pid ] && \
545 /usr/bin/svcs -H $OPENSSH_FMRI 2>&1 | egrep "^online" > /dev/null 2>&1
546then
547 ans=\`ckyorn -d n \
548-p "Should the running sshd daemon be restarted? ${DEF_MSG}"\` || exit \$?
549 case \$ans in
550 [y,Y]*) PRE_INS_STOP=yes
551 POST_INS_START=yes
552 ;;
553 esac
554
555else
556
557# determine if we should start sshd
558 ans=\`ckyorn -d n \
559-p "Start the sshd daemon after installing this package? ${DEF_MSG}"\` || exit \$?
560 case \$ans in
561 [y,Y]*) POST_INS_START=yes ;;
562 esac
563fi
564
565# make parameters available to installation service,
566# and so to any other packaging scripts
567cat >\$1 <<!
568PRE_INS_STOP='\$PRE_INS_STOP'
569POST_INS_START='\$POST_INS_START'
570!
571
572_EOF
573else
574 cat >> request << _EOF
458USE_SYM_LINKS=no 575USE_SYM_LINKS=no
459PRE_INS_STOP=no 576PRE_INS_STOP=no
460POST_INS_START=no 577POST_INS_START=no
@@ -495,6 +612,7 @@ POST_INS_START='\$POST_INS_START'
495! 612!
496 613
497_EOF 614_EOF
615fi
498 616
499# local request changes here 617# local request changes here
500[ -s "${PKG_REQUEST_LOCAL}" ] && . ${PKG_REQUEST_LOCAL} 618[ -s "${PKG_REQUEST_LOCAL}" ] && . ${PKG_REQUEST_LOCAL}
@@ -526,7 +644,7 @@ cat >mk-proto.awk << _EOF
526_EOF 644_EOF
527 645
528find . | egrep -v "prototype|pkginfo|mk-proto.awk" | sort | \ 646find . | egrep -v "prototype|pkginfo|mk-proto.awk" | sort | \
529 pkgproto $PROTO_ARGS | nawk -f mk-proto.awk > prototype 647 pkgproto $PROTO_ARGS | ${AWK} -f mk-proto.awk > prototype
530 648
531# /usr/local is a symlink on some systems 649# /usr/local is a symlink on some systems
532[ "${USR_LOCAL_IS_SYMLINK}" = yes ] && { 650[ "${USR_LOCAL_IS_SYMLINK}" = yes ] && {
diff --git a/canohost.c b/canohost.c
index 6ca60e6b4..2345cc35c 100644
--- a/canohost.c
+++ b/canohost.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: canohost.c,v 1.61 2006/08/03 03:34:41 deraadt Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -12,10 +13,23 @@
12 */ 13 */
13 14
14#include "includes.h" 15#include "includes.h"
15RCSID("$OpenBSD: canohost.c,v 1.48 2005/12/28 22:46:06 stevesk Exp $");
16 16
17#include "packet.h" 17#include <sys/types.h>
18#include <sys/socket.h>
19
20#include <netinet/in.h>
21#include <arpa/inet.h>
22
23#include <ctype.h>
24#include <errno.h>
25#include <netdb.h>
26#include <stdio.h>
27#include <stdlib.h>
28#include <string.h>
29#include <stdarg.h>
30
18#include "xmalloc.h" 31#include "xmalloc.h"
32#include "packet.h"
19#include "log.h" 33#include "log.h"
20#include "canohost.h" 34#include "canohost.h"
21 35
@@ -43,6 +57,9 @@ get_remote_hostname(int sock, int use_dns)
43 cleanup_exit(255); 57 cleanup_exit(255);
44 } 58 }
45 59
60 if (from.ss_family == AF_INET)
61 check_ip_options(sock, ntop);
62
46 ipv64_normalise_mapped(&from, &fromlen); 63 ipv64_normalise_mapped(&from, &fromlen);
47 64
48 if (from.ss_family == AF_INET6) 65 if (from.ss_family == AF_INET6)
@@ -52,9 +69,6 @@ get_remote_hostname(int sock, int use_dns)
52 NULL, 0, NI_NUMERICHOST) != 0) 69 NULL, 0, NI_NUMERICHOST) != 0)
53 fatal("get_remote_hostname: getnameinfo NI_NUMERICHOST failed"); 70 fatal("get_remote_hostname: getnameinfo NI_NUMERICHOST failed");
54 71
55 if (from.ss_family == AF_INET)
56 check_ip_options(sock, ntop);
57
58 if (!use_dns) 72 if (!use_dns)
59 return xstrdup(ntop); 73 return xstrdup(ntop);
60 74
@@ -87,7 +101,7 @@ get_remote_hostname(int sock, int use_dns)
87 */ 101 */
88 for (i = 0; name[i]; i++) 102 for (i = 0; name[i]; i++)
89 if (isupper(name[i])) 103 if (isupper(name[i]))
90 name[i] = tolower(name[i]); 104 name[i] = (char)tolower(name[i]);
91 /* 105 /*
92 * Map it back to an IP address and check that the given 106 * Map it back to an IP address and check that the given
93 * address actually is an address of this host. This is 107 * address actually is an address of this host. This is
@@ -102,7 +116,7 @@ get_remote_hostname(int sock, int use_dns)
102 hints.ai_socktype = SOCK_STREAM; 116 hints.ai_socktype = SOCK_STREAM;
103 if (getaddrinfo(name, NULL, &hints, &aitop) != 0) { 117 if (getaddrinfo(name, NULL, &hints, &aitop) != 0) {
104 logit("reverse mapping checking getaddrinfo for %.700s " 118 logit("reverse mapping checking getaddrinfo for %.700s "
105 "failed - POSSIBLE BREAK-IN ATTEMPT!", name); 119 "[%s] failed - POSSIBLE BREAK-IN ATTEMPT!", name, ntop);
106 return xstrdup(ntop); 120 return xstrdup(ntop);
107 } 121 }
108 /* Look for the address from the list of addresses. */ 122 /* Look for the address from the list of addresses. */
diff --git a/canohost.h b/canohost.h
index df1f125e5..e33e8941b 100644
--- a/canohost.h
+++ b/canohost.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: canohost.h,v 1.8 2001/06/26 17:27:23 markus Exp $ */ 1/* $OpenBSD: canohost.h,v 1.9 2006/03/25 22:22:42 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
diff --git a/channels.c b/channels.c
index 1252f3446..c68ad6419 100644
--- a/channels.c
+++ b/channels.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: channels.c,v 1.268 2007/01/03 03:01:40 stevesk Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -39,22 +40,41 @@
39 */ 40 */
40 41
41#include "includes.h" 42#include "includes.h"
42RCSID("$OpenBSD: channels.c,v 1.232 2006/01/30 12:22:22 reyk Exp $");
43 43
44#include <sys/types.h>
45#include <sys/ioctl.h>
46#include <sys/un.h>
47#include <sys/socket.h>
48#ifdef HAVE_SYS_TIME_H
49# include <sys/time.h>
50#endif
51
52#include <netinet/in.h>
53#include <arpa/inet.h>
54
55#include <errno.h>
56#include <netdb.h>
57#include <stdio.h>
58#include <stdlib.h>
59#include <string.h>
60#include <termios.h>
61#include <unistd.h>
62#include <stdarg.h>
63
64#include "xmalloc.h"
44#include "ssh.h" 65#include "ssh.h"
45#include "ssh1.h" 66#include "ssh1.h"
46#include "ssh2.h" 67#include "ssh2.h"
47#include "packet.h" 68#include "packet.h"
48#include "xmalloc.h"
49#include "log.h" 69#include "log.h"
50#include "misc.h" 70#include "misc.h"
71#include "buffer.h"
51#include "channels.h" 72#include "channels.h"
52#include "compat.h" 73#include "compat.h"
53#include "canohost.h" 74#include "canohost.h"
54#include "key.h" 75#include "key.h"
55#include "authfd.h" 76#include "authfd.h"
56#include "pathnames.h" 77#include "pathnames.h"
57#include "bufaux.h"
58 78
59/* -- channel core */ 79/* -- channel core */
60 80
@@ -91,11 +111,18 @@ typedef struct {
91 u_short listen_port; /* Remote side should listen port number. */ 111 u_short listen_port; /* Remote side should listen port number. */
92} ForwardPermission; 112} ForwardPermission;
93 113
94/* List of all permitted host/port pairs to connect. */ 114/* List of all permitted host/port pairs to connect by the user. */
95static ForwardPermission permitted_opens[SSH_MAX_FORWARDS_PER_DIRECTION]; 115static ForwardPermission permitted_opens[SSH_MAX_FORWARDS_PER_DIRECTION];
96 116
97/* Number of permitted host/port pairs in the array. */ 117/* List of all permitted host/port pairs to connect by the admin. */
118static ForwardPermission permitted_adm_opens[SSH_MAX_FORWARDS_PER_DIRECTION];
119
120/* Number of permitted host/port pairs in the array permitted by the user. */
98static int num_permitted_opens = 0; 121static int num_permitted_opens = 0;
122
123/* Number of permitted host/port pair in the array permitted by the admin. */
124static int num_adm_permitted_opens = 0;
125
99/* 126/*
100 * If this is true, all opens are permitted. This is the case on the server 127 * If this is true, all opens are permitted. This is the case on the server
101 * on which we have to trust the client anyway, and the user could do 128 * on which we have to trust the client anyway, and the user could do
@@ -123,7 +150,7 @@ static u_int x11_saved_data_len = 0;
123 * Fake X11 authentication data. This is what the server will be sending us; 150 * Fake X11 authentication data. This is what the server will be sending us;
124 * we should replace any occurrences of this by the real data. 151 * we should replace any occurrences of this by the real data.
125 */ 152 */
126static char *x11_fake_data = NULL; 153static u_char *x11_fake_data = NULL;
127static u_int x11_fake_data_len; 154static u_int x11_fake_data_len;
128 155
129 156
@@ -168,7 +195,7 @@ channel_lookup(int id)
168 if ((c = channel_by_id(id)) == NULL) 195 if ((c = channel_by_id(id)) == NULL)
169 return (NULL); 196 return (NULL);
170 197
171 switch(c->type) { 198 switch (c->type) {
172 case SSH_CHANNEL_X11_OPEN: 199 case SSH_CHANNEL_X11_OPEN:
173 case SSH_CHANNEL_LARVAL: 200 case SSH_CHANNEL_LARVAL:
174 case SSH_CHANNEL_CONNECTING: 201 case SSH_CHANNEL_CONNECTING:
@@ -178,7 +205,6 @@ channel_lookup(int id)
178 case SSH_CHANNEL_INPUT_DRAINING: 205 case SSH_CHANNEL_INPUT_DRAINING:
179 case SSH_CHANNEL_OUTPUT_DRAINING: 206 case SSH_CHANNEL_OUTPUT_DRAINING:
180 return (c); 207 return (c);
181 break;
182 } 208 }
183 logit("Non-public channel %d, type %d.", id, c->type); 209 logit("Non-public channel %d, type %d.", id, c->type);
184 return (NULL); 210 return (NULL);
@@ -188,7 +214,6 @@ channel_lookup(int id)
188 * Register filedescriptors for a channel, used when allocating a channel or 214 * Register filedescriptors for a channel, used when allocating a channel or
189 * when the channel consumer/producer is ready, e.g. shell exec'd 215 * when the channel consumer/producer is ready, e.g. shell exec'd
190 */ 216 */
191
192static void 217static void
193channel_register_fds(Channel *c, int rfd, int wfd, int efd, 218channel_register_fds(Channel *c, int rfd, int wfd, int efd,
194 int extusage, int nonblock) 219 int extusage, int nonblock)
@@ -235,7 +260,6 @@ channel_register_fds(Channel *c, int rfd, int wfd, int efd,
235 * Allocate a new channel object and set its type and socket. This will cause 260 * Allocate a new channel object and set its type and socket. This will cause
236 * remote_name to be freed. 261 * remote_name to be freed.
237 */ 262 */
238
239Channel * 263Channel *
240channel_new(char *ctype, int type, int rfd, int wfd, int efd, 264channel_new(char *ctype, int type, int rfd, int wfd, int efd,
241 u_int window, u_int maxpack, int extusage, char *remote_name, int nonblock) 265 u_int window, u_int maxpack, int extusage, char *remote_name, int nonblock)
@@ -247,7 +271,7 @@ channel_new(char *ctype, int type, int rfd, int wfd, int efd,
247 /* Do initial allocation if this is the first call. */ 271 /* Do initial allocation if this is the first call. */
248 if (channels_alloc == 0) { 272 if (channels_alloc == 0) {
249 channels_alloc = 10; 273 channels_alloc = 10;
250 channels = xmalloc(channels_alloc * sizeof(Channel *)); 274 channels = xcalloc(channels_alloc, sizeof(Channel *));
251 for (i = 0; i < channels_alloc; i++) 275 for (i = 0; i < channels_alloc; i++)
252 channels[i] = NULL; 276 channels[i] = NULL;
253 } 277 }
@@ -264,16 +288,15 @@ channel_new(char *ctype, int type, int rfd, int wfd, int efd,
264 if (channels_alloc > 10000) 288 if (channels_alloc > 10000)
265 fatal("channel_new: internal error: channels_alloc %d " 289 fatal("channel_new: internal error: channels_alloc %d "
266 "too big.", channels_alloc); 290 "too big.", channels_alloc);
267 channels = xrealloc(channels, 291 channels = xrealloc(channels, channels_alloc + 10,
268 (channels_alloc + 10) * sizeof(Channel *)); 292 sizeof(Channel *));
269 channels_alloc += 10; 293 channels_alloc += 10;
270 debug2("channel: expanding %d", channels_alloc); 294 debug2("channel: expanding %d", channels_alloc);
271 for (i = found; i < channels_alloc; i++) 295 for (i = found; i < channels_alloc; i++)
272 channels[i] = NULL; 296 channels[i] = NULL;
273 } 297 }
274 /* Initialize and return new channel. */ 298 /* Initialize and return new channel. */
275 c = channels[found] = xmalloc(sizeof(Channel)); 299 c = channels[found] = xcalloc(1, sizeof(Channel));
276 memset(c, 0, sizeof(Channel));
277 buffer_init(&c->input); 300 buffer_init(&c->input);
278 buffer_init(&c->output); 301 buffer_init(&c->output);
279 buffer_init(&c->extended); 302 buffer_init(&c->extended);
@@ -337,7 +360,6 @@ channel_close_fd(int *fdp)
337} 360}
338 361
339/* Close all channel fd/socket. */ 362/* Close all channel fd/socket. */
340
341static void 363static void
342channel_close_fds(Channel *c) 364channel_close_fds(Channel *c)
343{ 365{
@@ -352,7 +374,6 @@ channel_close_fds(Channel *c)
352} 374}
353 375
354/* Free the channel and close its fd/socket. */ 376/* Free the channel and close its fd/socket. */
355
356void 377void
357channel_free(Channel *c) 378channel_free(Channel *c)
358{ 379{
@@ -399,7 +420,6 @@ channel_free_all(void)
399 * Closes the sockets/fds of all channels. This is used to close extra file 420 * Closes the sockets/fds of all channels. This is used to close extra file
400 * descriptors after a fork. 421 * descriptors after a fork.
401 */ 422 */
402
403void 423void
404channel_close_all(void) 424channel_close_all(void)
405{ 425{
@@ -413,7 +433,6 @@ channel_close_all(void)
413/* 433/*
414 * Stop listening to channels. 434 * Stop listening to channels.
415 */ 435 */
416
417void 436void
418channel_stop_listening(void) 437channel_stop_listening(void)
419{ 438{
@@ -440,7 +459,6 @@ channel_stop_listening(void)
440 * Returns true if no channel has too much buffered data, and false if one or 459 * Returns true if no channel has too much buffered data, and false if one or
441 * more channel is overfull. 460 * more channel is overfull.
442 */ 461 */
443
444int 462int
445channel_not_very_much_buffered_data(void) 463channel_not_very_much_buffered_data(void)
446{ 464{
@@ -470,7 +488,6 @@ channel_not_very_much_buffered_data(void)
470} 488}
471 489
472/* Returns true if any channel is still open. */ 490/* Returns true if any channel is still open. */
473
474int 491int
475channel_still_open(void) 492channel_still_open(void)
476{ 493{
@@ -513,7 +530,6 @@ channel_still_open(void)
513} 530}
514 531
515/* Returns the id of an open channel suitable for keepaliving */ 532/* Returns the id of an open channel suitable for keepaliving */
516
517int 533int
518channel_find_open(void) 534channel_find_open(void)
519{ 535{
@@ -558,7 +574,6 @@ channel_find_open(void)
558 * suitable for sending to the client. The message contains crlf pairs for 574 * suitable for sending to the client. The message contains crlf pairs for
559 * newlines. 575 * newlines.
560 */ 576 */
561
562char * 577char *
563channel_open_message(void) 578channel_open_message(void)
564{ 579{
@@ -643,6 +658,7 @@ channel_request_start(int id, char *service, int wantconfirm)
643 packet_put_cstring(service); 658 packet_put_cstring(service);
644 packet_put_char(wantconfirm); 659 packet_put_char(wantconfirm);
645} 660}
661
646void 662void
647channel_register_confirm(int id, channel_callback_fn *fn, void *ctx) 663channel_register_confirm(int id, channel_callback_fn *fn, void *ctx)
648{ 664{
@@ -655,6 +671,7 @@ channel_register_confirm(int id, channel_callback_fn *fn, void *ctx)
655 c->confirm = fn; 671 c->confirm = fn;
656 c->confirm_ctx = ctx; 672 c->confirm_ctx = ctx;
657} 673}
674
658void 675void
659channel_register_cleanup(int id, channel_callback_fn *fn, int do_close) 676channel_register_cleanup(int id, channel_callback_fn *fn, int do_close)
660{ 677{
@@ -667,6 +684,7 @@ channel_register_cleanup(int id, channel_callback_fn *fn, int do_close)
667 c->detach_user = fn; 684 c->detach_user = fn;
668 c->detach_close = do_close; 685 c->detach_close = do_close;
669} 686}
687
670void 688void
671channel_cancel_cleanup(int id) 689channel_cancel_cleanup(int id)
672{ 690{
@@ -679,6 +697,7 @@ channel_cancel_cleanup(int id)
679 c->detach_user = NULL; 697 c->detach_user = NULL;
680 c->detach_close = 0; 698 c->detach_close = 0;
681} 699}
700
682void 701void
683channel_register_filter(int id, channel_infilter_fn *ifn, 702channel_register_filter(int id, channel_infilter_fn *ifn,
684 channel_outfilter_fn *ofn) 703 channel_outfilter_fn *ofn)
@@ -718,25 +737,27 @@ channel_set_fds(int id, int rfd, int wfd, int efd,
718 * 'channel_post*': perform any appropriate operations for channels which 737 * 'channel_post*': perform any appropriate operations for channels which
719 * have events pending. 738 * have events pending.
720 */ 739 */
721typedef void chan_fn(Channel *c, fd_set * readset, fd_set * writeset); 740typedef void chan_fn(Channel *c, fd_set *readset, fd_set *writeset);
722chan_fn *channel_pre[SSH_CHANNEL_MAX_TYPE]; 741chan_fn *channel_pre[SSH_CHANNEL_MAX_TYPE];
723chan_fn *channel_post[SSH_CHANNEL_MAX_TYPE]; 742chan_fn *channel_post[SSH_CHANNEL_MAX_TYPE];
724 743
744/* ARGSUSED */
725static void 745static void
726channel_pre_listener(Channel *c, fd_set * readset, fd_set * writeset) 746channel_pre_listener(Channel *c, fd_set *readset, fd_set *writeset)
727{ 747{
728 FD_SET(c->sock, readset); 748 FD_SET(c->sock, readset);
729} 749}
730 750
751/* ARGSUSED */
731static void 752static void
732channel_pre_connecting(Channel *c, fd_set * readset, fd_set * writeset) 753channel_pre_connecting(Channel *c, fd_set *readset, fd_set *writeset)
733{ 754{
734 debug3("channel %d: waiting for connection", c->self); 755 debug3("channel %d: waiting for connection", c->self);
735 FD_SET(c->sock, writeset); 756 FD_SET(c->sock, writeset);
736} 757}
737 758
738static void 759static void
739channel_pre_open_13(Channel *c, fd_set * readset, fd_set * writeset) 760channel_pre_open_13(Channel *c, fd_set *readset, fd_set *writeset)
740{ 761{
741 if (buffer_len(&c->input) < packet_get_maxsize()) 762 if (buffer_len(&c->input) < packet_get_maxsize())
742 FD_SET(c->sock, readset); 763 FD_SET(c->sock, readset);
@@ -745,16 +766,14 @@ channel_pre_open_13(Channel *c, fd_set * readset, fd_set * writeset)
745} 766}
746 767
747static void 768static void
748channel_pre_open(Channel *c, fd_set * readset, fd_set * writeset) 769channel_pre_open(Channel *c, fd_set *readset, fd_set *writeset)
749{ 770{
750 u_int limit = compat20 ? c->remote_window : packet_get_maxsize(); 771 u_int limit = compat20 ? c->remote_window : packet_get_maxsize();
751 772
752 /* check buffer limits */
753 limit = MIN(limit, (BUFFER_MAX_LEN - BUFFER_MAX_CHUNK - CHAN_RBUF));
754
755 if (c->istate == CHAN_INPUT_OPEN && 773 if (c->istate == CHAN_INPUT_OPEN &&
756 limit > 0 && 774 limit > 0 &&
757 buffer_len(&c->input) < limit) 775 buffer_len(&c->input) < limit &&
776 buffer_check_alloc(&c->input, CHAN_RBUF))
758 FD_SET(c->rfd, readset); 777 FD_SET(c->rfd, readset);
759 if (c->ostate == CHAN_OUTPUT_OPEN || 778 if (c->ostate == CHAN_OUTPUT_OPEN ||
760 c->ostate == CHAN_OUTPUT_WAIT_DRAIN) { 779 c->ostate == CHAN_OUTPUT_WAIT_DRAIN) {
@@ -784,8 +803,9 @@ channel_pre_open(Channel *c, fd_set * readset, fd_set * writeset)
784 FD_SET(c->ctl_fd, readset); 803 FD_SET(c->ctl_fd, readset);
785} 804}
786 805
806/* ARGSUSED */
787static void 807static void
788channel_pre_input_draining(Channel *c, fd_set * readset, fd_set * writeset) 808channel_pre_input_draining(Channel *c, fd_set *readset, fd_set *writeset)
789{ 809{
790 if (buffer_len(&c->input) == 0) { 810 if (buffer_len(&c->input) == 0) {
791 packet_start(SSH_MSG_CHANNEL_CLOSE); 811 packet_start(SSH_MSG_CHANNEL_CLOSE);
@@ -796,8 +816,9 @@ channel_pre_input_draining(Channel *c, fd_set * readset, fd_set * writeset)
796 } 816 }
797} 817}
798 818
819/* ARGSUSED */
799static void 820static void
800channel_pre_output_draining(Channel *c, fd_set * readset, fd_set * writeset) 821channel_pre_output_draining(Channel *c, fd_set *readset, fd_set *writeset)
801{ 822{
802 if (buffer_len(&c->output) == 0) 823 if (buffer_len(&c->output) == 0)
803 chan_mark_dead(c); 824 chan_mark_dead(c);
@@ -873,7 +894,7 @@ x11_open_helper(Buffer *b)
873} 894}
874 895
875static void 896static void
876channel_pre_x11_open_13(Channel *c, fd_set * readset, fd_set * writeset) 897channel_pre_x11_open_13(Channel *c, fd_set *readset, fd_set *writeset)
877{ 898{
878 int ret = x11_open_helper(&c->output); 899 int ret = x11_open_helper(&c->output);
879 900
@@ -899,7 +920,7 @@ channel_pre_x11_open_13(Channel *c, fd_set * readset, fd_set * writeset)
899} 920}
900 921
901static void 922static void
902channel_pre_x11_open(Channel *c, fd_set * readset, fd_set * writeset) 923channel_pre_x11_open(Channel *c, fd_set *readset, fd_set *writeset)
903{ 924{
904 int ret = x11_open_helper(&c->output); 925 int ret = x11_open_helper(&c->output);
905 926
@@ -925,8 +946,9 @@ channel_pre_x11_open(Channel *c, fd_set * readset, fd_set * writeset)
925} 946}
926 947
927/* try to decode a socks4 header */ 948/* try to decode a socks4 header */
949/* ARGSUSED */
928static int 950static int
929channel_decode_socks4(Channel *c, fd_set * readset, fd_set * writeset) 951channel_decode_socks4(Channel *c, fd_set *readset, fd_set *writeset)
930{ 952{
931 char *p, *host; 953 char *p, *host;
932 u_int len, have, i, found; 954 u_int len, have, i, found;
@@ -990,7 +1012,7 @@ channel_decode_socks4(Channel *c, fd_set * readset, fd_set * writeset)
990 s4_rsp.command = 90; /* cd: req granted */ 1012 s4_rsp.command = 90; /* cd: req granted */
991 s4_rsp.dest_port = 0; /* ignored */ 1013 s4_rsp.dest_port = 0; /* ignored */
992 s4_rsp.dest_addr.s_addr = INADDR_ANY; /* ignored */ 1014 s4_rsp.dest_addr.s_addr = INADDR_ANY; /* ignored */
993 buffer_append(&c->output, (char *)&s4_rsp, sizeof(s4_rsp)); 1015 buffer_append(&c->output, &s4_rsp, sizeof(s4_rsp));
994 return 1; 1016 return 1;
995} 1017}
996 1018
@@ -1003,8 +1025,9 @@ channel_decode_socks4(Channel *c, fd_set * readset, fd_set * writeset)
1003#define SSH_SOCKS5_CONNECT 0x01 1025#define SSH_SOCKS5_CONNECT 0x01
1004#define SSH_SOCKS5_SUCCESS 0x00 1026#define SSH_SOCKS5_SUCCESS 0x00
1005 1027
1028/* ARGSUSED */
1006static int 1029static int
1007channel_decode_socks5(Channel *c, fd_set * readset, fd_set * writeset) 1030channel_decode_socks5(Channel *c, fd_set *readset, fd_set *writeset)
1008{ 1031{
1009 struct { 1032 struct {
1010 u_int8_t version; 1033 u_int8_t version;
@@ -1014,7 +1037,7 @@ channel_decode_socks5(Channel *c, fd_set * readset, fd_set * writeset)
1014 } s5_req, s5_rsp; 1037 } s5_req, s5_rsp;
1015 u_int16_t dest_port; 1038 u_int16_t dest_port;
1016 u_char *p, dest_addr[255+1]; 1039 u_char *p, dest_addr[255+1];
1017 u_int have, i, found, nmethods, addrlen, af; 1040 u_int have, need, i, found, nmethods, addrlen, af;
1018 1041
1019 debug2("channel %d: decode socks5", c->self); 1042 debug2("channel %d: decode socks5", c->self);
1020 p = buffer_ptr(&c->input); 1043 p = buffer_ptr(&c->input);
@@ -1029,8 +1052,8 @@ channel_decode_socks5(Channel *c, fd_set * readset, fd_set * writeset)
1029 if (have < nmethods + 2) 1052 if (have < nmethods + 2)
1030 return 0; 1053 return 0;
1031 /* look for method: "NO AUTHENTICATION REQUIRED" */ 1054 /* look for method: "NO AUTHENTICATION REQUIRED" */
1032 for (found = 0, i = 2 ; i < nmethods + 2; i++) { 1055 for (found = 0, i = 2; i < nmethods + 2; i++) {
1033 if (p[i] == SSH_SOCKS5_NOAUTH ) { 1056 if (p[i] == SSH_SOCKS5_NOAUTH) {
1034 found = 1; 1057 found = 1;
1035 break; 1058 break;
1036 } 1059 }
@@ -1051,7 +1074,7 @@ channel_decode_socks5(Channel *c, fd_set * readset, fd_set * writeset)
1051 debug2("channel %d: socks5 post auth", c->self); 1074 debug2("channel %d: socks5 post auth", c->self);
1052 if (have < sizeof(s5_req)+1) 1075 if (have < sizeof(s5_req)+1)
1053 return 0; /* need more */ 1076 return 0; /* need more */
1054 memcpy((char *)&s5_req, p, sizeof(s5_req)); 1077 memcpy(&s5_req, p, sizeof(s5_req));
1055 if (s5_req.version != 0x05 || 1078 if (s5_req.version != 0x05 ||
1056 s5_req.command != SSH_SOCKS5_CONNECT || 1079 s5_req.command != SSH_SOCKS5_CONNECT ||
1057 s5_req.reserved != 0x00) { 1080 s5_req.reserved != 0x00) {
@@ -1075,7 +1098,10 @@ channel_decode_socks5(Channel *c, fd_set * readset, fd_set * writeset)
1075 debug2("channel %d: bad socks5 atyp %d", c->self, s5_req.atyp); 1098 debug2("channel %d: bad socks5 atyp %d", c->self, s5_req.atyp);
1076 return -1; 1099 return -1;
1077 } 1100 }
1078 if (have < 4 + addrlen + 2) 1101 need = sizeof(s5_req) + addrlen + 2;
1102 if (s5_req.atyp == SSH_SOCKS5_DOMAIN)
1103 need++;
1104 if (have < need)
1079 return 0; 1105 return 0;
1080 buffer_consume(&c->input, sizeof(s5_req)); 1106 buffer_consume(&c->input, sizeof(s5_req));
1081 if (s5_req.atyp == SSH_SOCKS5_DOMAIN) 1107 if (s5_req.atyp == SSH_SOCKS5_DOMAIN)
@@ -1099,15 +1125,15 @@ channel_decode_socks5(Channel *c, fd_set * readset, fd_set * writeset)
1099 ((struct in_addr *)&dest_addr)->s_addr = INADDR_ANY; 1125 ((struct in_addr *)&dest_addr)->s_addr = INADDR_ANY;
1100 dest_port = 0; /* ignored */ 1126 dest_port = 0; /* ignored */
1101 1127
1102 buffer_append(&c->output, (char *)&s5_rsp, sizeof(s5_rsp)); 1128 buffer_append(&c->output, &s5_rsp, sizeof(s5_rsp));
1103 buffer_append(&c->output, (char *)&dest_addr, sizeof(struct in_addr)); 1129 buffer_append(&c->output, &dest_addr, sizeof(struct in_addr));
1104 buffer_append(&c->output, (char *)&dest_port, sizeof(dest_port)); 1130 buffer_append(&c->output, &dest_port, sizeof(dest_port));
1105 return 1; 1131 return 1;
1106} 1132}
1107 1133
1108/* dynamic port forwarding */ 1134/* dynamic port forwarding */
1109static void 1135static void
1110channel_pre_dynamic(Channel *c, fd_set * readset, fd_set * writeset) 1136channel_pre_dynamic(Channel *c, fd_set *readset, fd_set *writeset)
1111{ 1137{
1112 u_char *p; 1138 u_char *p;
1113 u_int have; 1139 u_int have;
@@ -1150,8 +1176,9 @@ channel_pre_dynamic(Channel *c, fd_set * readset, fd_set * writeset)
1150} 1176}
1151 1177
1152/* This is our fake X11 server socket. */ 1178/* This is our fake X11 server socket. */
1179/* ARGSUSED */
1153static void 1180static void
1154channel_post_x11_listener(Channel *c, fd_set * readset, fd_set * writeset) 1181channel_post_x11_listener(Channel *c, fd_set *readset, fd_set *writeset)
1155{ 1182{
1156 Channel *nc; 1183 Channel *nc;
1157 struct sockaddr addr; 1184 struct sockaddr addr;
@@ -1275,8 +1302,9 @@ channel_set_reuseaddr(int fd)
1275/* 1302/*
1276 * This socket is listening for connections to a forwarded TCP/IP port. 1303 * This socket is listening for connections to a forwarded TCP/IP port.
1277 */ 1304 */
1305/* ARGSUSED */
1278static void 1306static void
1279channel_post_port_listener(Channel *c, fd_set * readset, fd_set * writeset) 1307channel_post_port_listener(Channel *c, fd_set *readset, fd_set *writeset)
1280{ 1308{
1281 Channel *nc; 1309 Channel *nc;
1282 struct sockaddr addr; 1310 struct sockaddr addr;
@@ -1332,8 +1360,9 @@ channel_post_port_listener(Channel *c, fd_set * readset, fd_set * writeset)
1332 * This is the authentication agent socket listening for connections from 1360 * This is the authentication agent socket listening for connections from
1333 * clients. 1361 * clients.
1334 */ 1362 */
1363/* ARGSUSED */
1335static void 1364static void
1336channel_post_auth_listener(Channel *c, fd_set * readset, fd_set * writeset) 1365channel_post_auth_listener(Channel *c, fd_set *readset, fd_set *writeset)
1337{ 1366{
1338 Channel *nc; 1367 Channel *nc;
1339 int newsock; 1368 int newsock;
@@ -1365,8 +1394,9 @@ channel_post_auth_listener(Channel *c, fd_set * readset, fd_set * writeset)
1365 } 1394 }
1366} 1395}
1367 1396
1397/* ARGSUSED */
1368static void 1398static void
1369channel_post_connecting(Channel *c, fd_set * readset, fd_set * writeset) 1399channel_post_connecting(Channel *c, fd_set *readset, fd_set *writeset)
1370{ 1400{
1371 int err = 0; 1401 int err = 0;
1372 socklen_t sz = sizeof(err); 1402 socklen_t sz = sizeof(err);
@@ -1411,18 +1441,26 @@ channel_post_connecting(Channel *c, fd_set * readset, fd_set * writeset)
1411 } 1441 }
1412} 1442}
1413 1443
1444/* ARGSUSED */
1414static int 1445static int
1415channel_handle_rfd(Channel *c, fd_set * readset, fd_set * writeset) 1446channel_handle_rfd(Channel *c, fd_set *readset, fd_set *writeset)
1416{ 1447{
1417 char buf[CHAN_RBUF]; 1448 char buf[CHAN_RBUF];
1418 int len; 1449 int len;
1419 1450
1420 if (c->rfd != -1 && 1451 if (c->rfd != -1 &&
1421 FD_ISSET(c->rfd, readset)) { 1452 (c->detach_close || FD_ISSET(c->rfd, readset))) {
1453 errno = 0;
1422 len = read(c->rfd, buf, sizeof(buf)); 1454 len = read(c->rfd, buf, sizeof(buf));
1423 if (len < 0 && (errno == EINTR || errno == EAGAIN)) 1455 if (len < 0 && (errno == EINTR ||
1456 (errno == EAGAIN && !(c->isatty && c->detach_close))))
1424 return 1; 1457 return 1;
1458#ifndef PTY_ZEROREAD
1425 if (len <= 0) { 1459 if (len <= 0) {
1460#else
1461 if ((!c->isatty && len <= 0) ||
1462 (c->isatty && (len < 0 || (len == 0 && errno != 0)))) {
1463#endif
1426 debug2("channel %d: read<=0 rfd %d len %d", 1464 debug2("channel %d: read<=0 rfd %d len %d",
1427 c->self, c->rfd, len); 1465 c->self, c->rfd, len);
1428 if (c->type != SSH_CHANNEL_OPEN) { 1466 if (c->type != SSH_CHANNEL_OPEN) {
@@ -1451,8 +1489,10 @@ channel_handle_rfd(Channel *c, fd_set * readset, fd_set * writeset)
1451 } 1489 }
1452 return 1; 1490 return 1;
1453} 1491}
1492
1493/* ARGSUSED */
1454static int 1494static int
1455channel_handle_wfd(Channel *c, fd_set * readset, fd_set * writeset) 1495channel_handle_wfd(Channel *c, fd_set *readset, fd_set *writeset)
1456{ 1496{
1457 struct termios tio; 1497 struct termios tio;
1458 u_char *data = NULL, *buf; 1498 u_char *data = NULL, *buf;
@@ -1538,8 +1578,9 @@ channel_handle_wfd(Channel *c, fd_set * readset, fd_set * writeset)
1538 } 1578 }
1539 return 1; 1579 return 1;
1540} 1580}
1581
1541static int 1582static int
1542channel_handle_efd(Channel *c, fd_set * readset, fd_set * writeset) 1583channel_handle_efd(Channel *c, fd_set *readset, fd_set *writeset)
1543{ 1584{
1544 char buf[CHAN_RBUF]; 1585 char buf[CHAN_RBUF];
1545 int len; 1586 int len;
@@ -1564,11 +1605,12 @@ channel_handle_efd(Channel *c, fd_set * readset, fd_set * writeset)
1564 c->local_consumed += len; 1605 c->local_consumed += len;
1565 } 1606 }
1566 } else if (c->extended_usage == CHAN_EXTENDED_READ && 1607 } else if (c->extended_usage == CHAN_EXTENDED_READ &&
1567 FD_ISSET(c->efd, readset)) { 1608 (c->detach_close || FD_ISSET(c->efd, readset))) {
1568 len = read(c->efd, buf, sizeof(buf)); 1609 len = read(c->efd, buf, sizeof(buf));
1569 debug2("channel %d: read %d from efd %d", 1610 debug2("channel %d: read %d from efd %d",
1570 c->self, len, c->efd); 1611 c->self, len, c->efd);
1571 if (len < 0 && (errno == EINTR || errno == EAGAIN)) 1612 if (len < 0 && (errno == EINTR ||
1613 (errno == EAGAIN && !c->detach_close)))
1572 return 1; 1614 return 1;
1573 if (len <= 0) { 1615 if (len <= 0) {
1574 debug2("channel %d: closing read-efd %d", 1616 debug2("channel %d: closing read-efd %d",
@@ -1581,8 +1623,10 @@ channel_handle_efd(Channel *c, fd_set * readset, fd_set * writeset)
1581 } 1623 }
1582 return 1; 1624 return 1;
1583} 1625}
1626
1627/* ARGSUSED */
1584static int 1628static int
1585channel_handle_ctl(Channel *c, fd_set * readset, fd_set * writeset) 1629channel_handle_ctl(Channel *c, fd_set *readset, fd_set *writeset)
1586{ 1630{
1587 char buf[16]; 1631 char buf[16];
1588 int len; 1632 int len;
@@ -1608,6 +1652,7 @@ channel_handle_ctl(Channel *c, fd_set * readset, fd_set * writeset)
1608 } 1652 }
1609 return 1; 1653 return 1;
1610} 1654}
1655
1611static int 1656static int
1612channel_check_window(Channel *c) 1657channel_check_window(Channel *c)
1613{ 1658{
@@ -1629,7 +1674,7 @@ channel_check_window(Channel *c)
1629} 1674}
1630 1675
1631static void 1676static void
1632channel_post_open(Channel *c, fd_set * readset, fd_set * writeset) 1677channel_post_open(Channel *c, fd_set *readset, fd_set *writeset)
1633{ 1678{
1634 if (c->delayed) 1679 if (c->delayed)
1635 return; 1680 return;
@@ -1642,8 +1687,9 @@ channel_post_open(Channel *c, fd_set * readset, fd_set * writeset)
1642 channel_check_window(c); 1687 channel_check_window(c);
1643} 1688}
1644 1689
1690/* ARGSUSED */
1645static void 1691static void
1646channel_post_output_drain_13(Channel *c, fd_set * readset, fd_set * writeset) 1692channel_post_output_drain_13(Channel *c, fd_set *readset, fd_set *writeset)
1647{ 1693{
1648 int len; 1694 int len;
1649 1695
@@ -1760,7 +1806,7 @@ channel_garbage_collect(Channel *c)
1760} 1806}
1761 1807
1762static void 1808static void
1763channel_handler(chan_fn *ftab[], fd_set * readset, fd_set * writeset) 1809channel_handler(chan_fn *ftab[], fd_set *readset, fd_set *writeset)
1764{ 1810{
1765 static int did_init = 0; 1811 static int did_init = 0;
1766 u_int i; 1812 u_int i;
@@ -1788,15 +1834,20 @@ void
1788channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp, 1834channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
1789 u_int *nallocp, int rekeying) 1835 u_int *nallocp, int rekeying)
1790{ 1836{
1791 u_int n, sz; 1837 u_int n, sz, nfdset;
1792 1838
1793 n = MAX(*maxfdp, channel_max_fd); 1839 n = MAX(*maxfdp, channel_max_fd);
1794 1840
1795 sz = howmany(n+1, NFDBITS) * sizeof(fd_mask); 1841 nfdset = howmany(n+1, NFDBITS);
1842 /* Explicitly test here, because xrealloc isn't always called */
1843 if (nfdset && SIZE_T_MAX / nfdset < sizeof(fd_mask))
1844 fatal("channel_prepare_select: max_fd (%d) is too large", n);
1845 sz = nfdset * sizeof(fd_mask);
1846
1796 /* perhaps check sz < nalloc/2 and shrink? */ 1847 /* perhaps check sz < nalloc/2 and shrink? */
1797 if (*readsetp == NULL || sz > *nallocp) { 1848 if (*readsetp == NULL || sz > *nallocp) {
1798 *readsetp = xrealloc(*readsetp, sz); 1849 *readsetp = xrealloc(*readsetp, nfdset, sizeof(fd_mask));
1799 *writesetp = xrealloc(*writesetp, sz); 1850 *writesetp = xrealloc(*writesetp, nfdset, sizeof(fd_mask));
1800 *nallocp = sz; 1851 *nallocp = sz;
1801 } 1852 }
1802 *maxfdp = n; 1853 *maxfdp = n;
@@ -1812,14 +1863,13 @@ channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
1812 * events pending. 1863 * events pending.
1813 */ 1864 */
1814void 1865void
1815channel_after_select(fd_set * readset, fd_set * writeset) 1866channel_after_select(fd_set *readset, fd_set *writeset)
1816{ 1867{
1817 channel_handler(channel_post, readset, writeset); 1868 channel_handler(channel_post, readset, writeset);
1818} 1869}
1819 1870
1820 1871
1821/* If there is data to send to the connection, enqueue some of it now. */ 1872/* If there is data to send to the connection, enqueue some of it now. */
1822
1823void 1873void
1824channel_output_poll(void) 1874channel_output_poll(void)
1825{ 1875{
@@ -1940,6 +1990,7 @@ channel_output_poll(void)
1940 1990
1941/* -- protocol input */ 1991/* -- protocol input */
1942 1992
1993/* ARGSUSED */
1943void 1994void
1944channel_input_data(int type, u_int32_t seq, void *ctxt) 1995channel_input_data(int type, u_int32_t seq, void *ctxt)
1945{ 1996{
@@ -1999,6 +2050,7 @@ channel_input_data(int type, u_int32_t seq, void *ctxt)
1999 xfree(data); 2050 xfree(data);
2000} 2051}
2001 2052
2053/* ARGSUSED */
2002void 2054void
2003channel_input_extended_data(int type, u_int32_t seq, void *ctxt) 2055channel_input_extended_data(int type, u_int32_t seq, void *ctxt)
2004{ 2056{
@@ -2045,6 +2097,7 @@ channel_input_extended_data(int type, u_int32_t seq, void *ctxt)
2045 xfree(data); 2097 xfree(data);
2046} 2098}
2047 2099
2100/* ARGSUSED */
2048void 2101void
2049channel_input_ieof(int type, u_int32_t seq, void *ctxt) 2102channel_input_ieof(int type, u_int32_t seq, void *ctxt)
2050{ 2103{
@@ -2068,6 +2121,7 @@ channel_input_ieof(int type, u_int32_t seq, void *ctxt)
2068 2121
2069} 2122}
2070 2123
2124/* ARGSUSED */
2071void 2125void
2072channel_input_close(int type, u_int32_t seq, void *ctxt) 2126channel_input_close(int type, u_int32_t seq, void *ctxt)
2073{ 2127{
@@ -2106,6 +2160,7 @@ channel_input_close(int type, u_int32_t seq, void *ctxt)
2106} 2160}
2107 2161
2108/* proto version 1.5 overloads CLOSE_CONFIRMATION with OCLOSE */ 2162/* proto version 1.5 overloads CLOSE_CONFIRMATION with OCLOSE */
2163/* ARGSUSED */
2109void 2164void
2110channel_input_oclose(int type, u_int32_t seq, void *ctxt) 2165channel_input_oclose(int type, u_int32_t seq, void *ctxt)
2111{ 2166{
@@ -2118,6 +2173,7 @@ channel_input_oclose(int type, u_int32_t seq, void *ctxt)
2118 chan_rcvd_oclose(c); 2173 chan_rcvd_oclose(c);
2119} 2174}
2120 2175
2176/* ARGSUSED */
2121void 2177void
2122channel_input_close_confirmation(int type, u_int32_t seq, void *ctxt) 2178channel_input_close_confirmation(int type, u_int32_t seq, void *ctxt)
2123{ 2179{
@@ -2134,6 +2190,7 @@ channel_input_close_confirmation(int type, u_int32_t seq, void *ctxt)
2134 channel_free(c); 2190 channel_free(c);
2135} 2191}
2136 2192
2193/* ARGSUSED */
2137void 2194void
2138channel_input_open_confirmation(int type, u_int32_t seq, void *ctxt) 2195channel_input_open_confirmation(int type, u_int32_t seq, void *ctxt)
2139{ 2196{
@@ -2181,6 +2238,7 @@ reason2txt(int reason)
2181 return "unknown reason"; 2238 return "unknown reason";
2182} 2239}
2183 2240
2241/* ARGSUSED */
2184void 2242void
2185channel_input_open_failure(int type, u_int32_t seq, void *ctxt) 2243channel_input_open_failure(int type, u_int32_t seq, void *ctxt)
2186{ 2244{
@@ -2212,6 +2270,7 @@ channel_input_open_failure(int type, u_int32_t seq, void *ctxt)
2212 channel_free(c); 2270 channel_free(c);
2213} 2271}
2214 2272
2273/* ARGSUSED */
2215void 2274void
2216channel_input_window_adjust(int type, u_int32_t seq, void *ctxt) 2275channel_input_window_adjust(int type, u_int32_t seq, void *ctxt)
2217{ 2276{
@@ -2236,6 +2295,7 @@ channel_input_window_adjust(int type, u_int32_t seq, void *ctxt)
2236 c->remote_window += adjust; 2295 c->remote_window += adjust;
2237} 2296}
2238 2297
2298/* ARGSUSED */
2239void 2299void
2240channel_input_port_open(int type, u_int32_t seq, void *ctxt) 2300channel_input_port_open(int type, u_int32_t seq, void *ctxt)
2241{ 2301{
@@ -2454,7 +2514,7 @@ channel_setup_remote_fwd_listener(const char *listen_address,
2454 * the secure channel to host:port from local side. 2514 * the secure channel to host:port from local side.
2455 */ 2515 */
2456 2516
2457void 2517int
2458channel_request_remote_forwarding(const char *listen_host, u_short listen_port, 2518channel_request_remote_forwarding(const char *listen_host, u_short listen_port,
2459 const char *host_to_connect, u_short port_to_connect) 2519 const char *host_to_connect, u_short port_to_connect)
2460{ 2520{
@@ -2467,11 +2527,18 @@ channel_request_remote_forwarding(const char *listen_host, u_short listen_port,
2467 /* Send the forward request to the remote side. */ 2527 /* Send the forward request to the remote side. */
2468 if (compat20) { 2528 if (compat20) {
2469 const char *address_to_bind; 2529 const char *address_to_bind;
2470 if (listen_host == NULL) 2530 if (listen_host == NULL) {
2471 address_to_bind = "localhost"; 2531 if (datafellows & SSH_BUG_RFWD_ADDR)
2472 else if (*listen_host == '\0' || strcmp(listen_host, "*") == 0) 2532 address_to_bind = "127.0.0.1";
2473 address_to_bind = ""; 2533 else
2474 else 2534 address_to_bind = "localhost";
2535 } else if (*listen_host == '\0' ||
2536 strcmp(listen_host, "*") == 0) {
2537 if (datafellows & SSH_BUG_RFWD_ADDR)
2538 address_to_bind = "0.0.0.0";
2539 else
2540 address_to_bind = "";
2541 } else
2475 address_to_bind = listen_host; 2542 address_to_bind = listen_host;
2476 2543
2477 packet_start(SSH2_MSG_GLOBAL_REQUEST); 2544 packet_start(SSH2_MSG_GLOBAL_REQUEST);
@@ -2498,7 +2565,6 @@ channel_request_remote_forwarding(const char *listen_host, u_short listen_port,
2498 success = 1; 2565 success = 1;
2499 break; 2566 break;
2500 case SSH_SMSG_FAILURE: 2567 case SSH_SMSG_FAILURE:
2501 logit("Warning: Server denied remote port forwarding.");
2502 break; 2568 break;
2503 default: 2569 default:
2504 /* Unknown packet */ 2570 /* Unknown packet */
@@ -2512,6 +2578,7 @@ channel_request_remote_forwarding(const char *listen_host, u_short listen_port,
2512 permitted_opens[num_permitted_opens].listen_port = listen_port; 2578 permitted_opens[num_permitted_opens].listen_port = listen_port;
2513 num_permitted_opens++; 2579 num_permitted_opens++;
2514 } 2580 }
2581 return (success ? 0 : -1);
2515} 2582}
2516 2583
2517/* 2584/*
@@ -2551,13 +2618,13 @@ channel_request_rforward_cancel(const char *host, u_short port)
2551/* 2618/*
2552 * This is called after receiving CHANNEL_FORWARDING_REQUEST. This initates 2619 * This is called after receiving CHANNEL_FORWARDING_REQUEST. This initates
2553 * listening for the port, and sends back a success reply (or disconnect 2620 * listening for the port, and sends back a success reply (or disconnect
2554 * message if there was an error). This never returns if there was an error. 2621 * message if there was an error).
2555 */ 2622 */
2556 2623int
2557void
2558channel_input_port_forward_request(int is_root, int gateway_ports) 2624channel_input_port_forward_request(int is_root, int gateway_ports)
2559{ 2625{
2560 u_short port, host_port; 2626 u_short port, host_port;
2627 int success = 0;
2561 char *hostname; 2628 char *hostname;
2562 2629
2563 /* Get arguments from the packet. */ 2630 /* Get arguments from the packet. */
@@ -2579,11 +2646,13 @@ channel_input_port_forward_request(int is_root, int gateway_ports)
2579#endif 2646#endif
2580 2647
2581 /* Initiate forwarding */ 2648 /* Initiate forwarding */
2582 channel_setup_local_fwd_listener(NULL, port, hostname, 2649 success = channel_setup_local_fwd_listener(NULL, port, hostname,
2583 host_port, gateway_ports); 2650 host_port, gateway_ports);
2584 2651
2585 /* Free the argument string. */ 2652 /* Free the argument string. */
2586 xfree(hostname); 2653 xfree(hostname);
2654
2655 return (success ? 0 : -1);
2587} 2656}
2588 2657
2589/* 2658/*
@@ -2602,7 +2671,7 @@ void
2602channel_add_permitted_opens(char *host, int port) 2671channel_add_permitted_opens(char *host, int port)
2603{ 2672{
2604 if (num_permitted_opens >= SSH_MAX_FORWARDS_PER_DIRECTION) 2673 if (num_permitted_opens >= SSH_MAX_FORWARDS_PER_DIRECTION)
2605 fatal("channel_request_remote_forwarding: too many forwards"); 2674 fatal("channel_add_permitted_opens: too many forwards");
2606 debug("allow port forwarding to host %s port %d", host, port); 2675 debug("allow port forwarding to host %s port %d", host, port);
2607 2676
2608 permitted_opens[num_permitted_opens].host_to_connect = xstrdup(host); 2677 permitted_opens[num_permitted_opens].host_to_connect = xstrdup(host);
@@ -2612,6 +2681,19 @@ channel_add_permitted_opens(char *host, int port)
2612 all_opens_permitted = 0; 2681 all_opens_permitted = 0;
2613} 2682}
2614 2683
2684int
2685channel_add_adm_permitted_opens(char *host, int port)
2686{
2687 if (num_adm_permitted_opens >= SSH_MAX_FORWARDS_PER_DIRECTION)
2688 fatal("channel_add_adm_permitted_opens: too many forwards");
2689 debug("config allows port forwarding to host %s port %d", host, port);
2690
2691 permitted_adm_opens[num_adm_permitted_opens].host_to_connect
2692 = xstrdup(host);
2693 permitted_adm_opens[num_adm_permitted_opens].port_to_connect = port;
2694 return ++num_adm_permitted_opens;
2695}
2696
2615void 2697void
2616channel_clear_permitted_opens(void) 2698channel_clear_permitted_opens(void)
2617{ 2699{
@@ -2621,9 +2703,18 @@ channel_clear_permitted_opens(void)
2621 if (permitted_opens[i].host_to_connect != NULL) 2703 if (permitted_opens[i].host_to_connect != NULL)
2622 xfree(permitted_opens[i].host_to_connect); 2704 xfree(permitted_opens[i].host_to_connect);
2623 num_permitted_opens = 0; 2705 num_permitted_opens = 0;
2624
2625} 2706}
2626 2707
2708void
2709channel_clear_adm_permitted_opens(void)
2710{
2711 int i;
2712
2713 for (i = 0; i < num_adm_permitted_opens; i++)
2714 if (permitted_adm_opens[i].host_to_connect != NULL)
2715 xfree(permitted_adm_opens[i].host_to_connect);
2716 num_adm_permitted_opens = 0;
2717}
2627 2718
2628/* return socket to remote host, port */ 2719/* return socket to remote host, port */
2629static int 2720static int
@@ -2701,7 +2792,7 @@ channel_connect_by_listen_address(u_short listen_port)
2701int 2792int
2702channel_connect_to(const char *host, u_short port) 2793channel_connect_to(const char *host, u_short port)
2703{ 2794{
2704 int i, permit; 2795 int i, permit, permit_adm = 1;
2705 2796
2706 permit = all_opens_permitted; 2797 permit = all_opens_permitted;
2707 if (!permit) { 2798 if (!permit) {
@@ -2710,9 +2801,19 @@ channel_connect_to(const char *host, u_short port)
2710 permitted_opens[i].port_to_connect == port && 2801 permitted_opens[i].port_to_connect == port &&
2711 strcmp(permitted_opens[i].host_to_connect, host) == 0) 2802 strcmp(permitted_opens[i].host_to_connect, host) == 0)
2712 permit = 1; 2803 permit = 1;
2804 }
2713 2805
2806 if (num_adm_permitted_opens > 0) {
2807 permit_adm = 0;
2808 for (i = 0; i < num_adm_permitted_opens; i++)
2809 if (permitted_adm_opens[i].host_to_connect != NULL &&
2810 permitted_adm_opens[i].port_to_connect == port &&
2811 strcmp(permitted_adm_opens[i].host_to_connect, host)
2812 == 0)
2813 permit_adm = 1;
2714 } 2814 }
2715 if (!permit) { 2815
2816 if (!permit || !permit_adm) {
2716 logit("Received request to connect to host %.100s port %d, " 2817 logit("Received request to connect to host %.100s port %d, "
2717 "but the request was denied.", host, port); 2818 "but the request was denied.", host, port);
2718 return -1; 2819 return -1;
@@ -2733,10 +2834,10 @@ channel_send_window_changes(void)
2733 if (ioctl(channels[i]->rfd, TIOCGWINSZ, &ws) < 0) 2834 if (ioctl(channels[i]->rfd, TIOCGWINSZ, &ws) < 0)
2734 continue; 2835 continue;
2735 channel_request_start(i, "window-change", 0); 2836 channel_request_start(i, "window-change", 0);
2736 packet_put_int(ws.ws_col); 2837 packet_put_int((u_int)ws.ws_col);
2737 packet_put_int(ws.ws_row); 2838 packet_put_int((u_int)ws.ws_row);
2738 packet_put_int(ws.ws_xpixel); 2839 packet_put_int((u_int)ws.ws_xpixel);
2739 packet_put_int(ws.ws_ypixel); 2840 packet_put_int((u_int)ws.ws_ypixel);
2740 packet_send(); 2841 packet_send();
2741 } 2842 }
2742} 2843}
@@ -2844,7 +2945,7 @@ x11_create_display_inet(int x11_display_offset, int x11_use_localhost,
2844 } 2945 }
2845 2946
2846 /* Allocate a channel for each socket. */ 2947 /* Allocate a channel for each socket. */
2847 *chanids = xmalloc(sizeof(**chanids) * (num_socks + 1)); 2948 *chanids = xcalloc(num_socks + 1, sizeof(**chanids));
2848 for (n = 0; n < num_socks; n++) { 2949 for (n = 0; n < num_socks; n++) {
2849 sock = socks[n]; 2950 sock = socks[n];
2850 nc = channel_new("x11 listener", 2951 nc = channel_new("x11 listener",
@@ -2873,7 +2974,7 @@ connect_local_xsocket(u_int dnr)
2873 memset(&addr, 0, sizeof(addr)); 2974 memset(&addr, 0, sizeof(addr));
2874 addr.sun_family = AF_UNIX; 2975 addr.sun_family = AF_UNIX;
2875 snprintf(addr.sun_path, sizeof addr.sun_path, _PATH_UNIX_X, dnr); 2976 snprintf(addr.sun_path, sizeof addr.sun_path, _PATH_UNIX_X, dnr);
2876 if (connect(sock, (struct sockaddr *) & addr, sizeof(addr)) == 0) 2977 if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) == 0)
2877 return sock; 2978 return sock;
2878 close(sock); 2979 close(sock);
2879 error("connect %.100s: %.100s", addr.sun_path, strerror(errno)); 2980 error("connect %.100s: %.100s", addr.sun_path, strerror(errno));
@@ -2883,12 +2984,12 @@ connect_local_xsocket(u_int dnr)
2883int 2984int
2884x11_connect_display(void) 2985x11_connect_display(void)
2885{ 2986{
2886 int display_number, sock = 0; 2987 u_int display_number;
2887 const char *display; 2988 const char *display;
2888 char buf[1024], *cp; 2989 char buf[1024], *cp;
2889 struct addrinfo hints, *ai, *aitop; 2990 struct addrinfo hints, *ai, *aitop;
2890 char strport[NI_MAXSERV]; 2991 char strport[NI_MAXSERV];
2891 int gaierr; 2992 int gaierr, sock = 0;
2892 2993
2893 /* Try to open a socket for the local X server. */ 2994 /* Try to open a socket for the local X server. */
2894 display = getenv("DISPLAY"); 2995 display = getenv("DISPLAY");
@@ -2908,7 +3009,7 @@ x11_connect_display(void)
2908 if (strncmp(display, "unix:", 5) == 0 || 3009 if (strncmp(display, "unix:", 5) == 0 ||
2909 display[0] == ':') { 3010 display[0] == ':') {
2910 /* Connect to the unix domain socket. */ 3011 /* Connect to the unix domain socket. */
2911 if (sscanf(strrchr(display, ':') + 1, "%d", &display_number) != 1) { 3012 if (sscanf(strrchr(display, ':') + 1, "%u", &display_number) != 1) {
2912 error("Could not parse display number from DISPLAY: %.100s", 3013 error("Could not parse display number from DISPLAY: %.100s",
2913 display); 3014 display);
2914 return -1; 3015 return -1;
@@ -2933,7 +3034,7 @@ x11_connect_display(void)
2933 } 3034 }
2934 *cp = 0; 3035 *cp = 0;
2935 /* buf now contains the host name. But first we parse the display number. */ 3036 /* buf now contains the host name. But first we parse the display number. */
2936 if (sscanf(cp + 1, "%d", &display_number) != 1) { 3037 if (sscanf(cp + 1, "%u", &display_number) != 1) {
2937 error("Could not parse display number from DISPLAY: %.100s", 3038 error("Could not parse display number from DISPLAY: %.100s",
2938 display); 3039 display);
2939 return -1; 3040 return -1;
@@ -2943,7 +3044,7 @@ x11_connect_display(void)
2943 memset(&hints, 0, sizeof(hints)); 3044 memset(&hints, 0, sizeof(hints));
2944 hints.ai_family = IPv4or6; 3045 hints.ai_family = IPv4or6;
2945 hints.ai_socktype = SOCK_STREAM; 3046 hints.ai_socktype = SOCK_STREAM;
2946 snprintf(strport, sizeof strport, "%d", 6000 + display_number); 3047 snprintf(strport, sizeof strport, "%u", 6000 + display_number);
2947 if ((gaierr = getaddrinfo(buf, strport, &hints, &aitop)) != 0) { 3048 if ((gaierr = getaddrinfo(buf, strport, &hints, &aitop)) != 0) {
2948 error("%.100s: unknown host. (%s)", buf, gai_strerror(gaierr)); 3049 error("%.100s: unknown host. (%s)", buf, gai_strerror(gaierr));
2949 return -1; 3050 return -1;
@@ -2957,7 +3058,7 @@ x11_connect_display(void)
2957 } 3058 }
2958 /* Connect it to the display. */ 3059 /* Connect it to the display. */
2959 if (connect(sock, ai->ai_addr, ai->ai_addrlen) < 0) { 3060 if (connect(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
2960 debug2("connect %.100s port %d: %.100s", buf, 3061 debug2("connect %.100s port %u: %.100s", buf,
2961 6000 + display_number, strerror(errno)); 3062 6000 + display_number, strerror(errno));
2962 close(sock); 3063 close(sock);
2963 continue; 3064 continue;
@@ -2967,7 +3068,7 @@ x11_connect_display(void)
2967 } 3068 }
2968 freeaddrinfo(aitop); 3069 freeaddrinfo(aitop);
2969 if (!ai) { 3070 if (!ai) {
2970 error("connect %.100s port %d: %.100s", buf, 6000 + display_number, 3071 error("connect %.100s port %u: %.100s", buf, 6000 + display_number,
2971 strerror(errno)); 3072 strerror(errno));
2972 return -1; 3073 return -1;
2973 } 3074 }
@@ -2981,6 +3082,7 @@ x11_connect_display(void)
2981 * with either SSH_MSG_OPEN_CONFIRMATION or SSH_MSG_OPEN_FAILURE. 3082 * with either SSH_MSG_OPEN_CONFIRMATION or SSH_MSG_OPEN_FAILURE.
2982 */ 3083 */
2983 3084
3085/* ARGSUSED */
2984void 3086void
2985x11_input_open(int type, u_int32_t seq, void *ctxt) 3087x11_input_open(int type, u_int32_t seq, void *ctxt)
2986{ 3088{
@@ -3024,6 +3126,7 @@ x11_input_open(int type, u_int32_t seq, void *ctxt)
3024} 3126}
3025 3127
3026/* dummy protocol handler that denies SSH-1 requests (agent/x11) */ 3128/* dummy protocol handler that denies SSH-1 requests (agent/x11) */
3129/* ARGSUSED */
3027void 3130void
3028deny_input_open(int type, u_int32_t seq, void *ctxt) 3131deny_input_open(int type, u_int32_t seq, void *ctxt)
3029{ 3132{
@@ -3070,13 +3173,11 @@ x11_request_forwarding_with_spoofing(int client_session_id, const char *disp,
3070 return; 3173 return;
3071 } 3174 }
3072 3175
3073 cp = disp; 3176 cp = strchr(disp, ':');
3074 if (disp)
3075 cp = strchr(disp, ':');
3076 if (cp) 3177 if (cp)
3077 cp = strchr(cp, '.'); 3178 cp = strchr(cp, '.');
3078 if (cp) 3179 if (cp)
3079 screen_number = atoi(cp + 1); 3180 screen_number = (u_int)strtonum(cp + 1, 0, 400, NULL);
3080 else 3181 else
3081 screen_number = 0; 3182 screen_number = 0;
3082 3183
diff --git a/channels.h b/channels.h
index a97dd9007..2674f096e 100644
--- a/channels.h
+++ b/channels.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.h,v 1.83 2005/12/30 15:56:37 reyk Exp $ */ 1/* $OpenBSD: channels.h,v 1.88 2006/08/03 03:34:42 deraadt Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -38,8 +38,6 @@
38#ifndef CHANNEL_H 38#ifndef CHANNEL_H
39#define CHANNEL_H 39#define CHANNEL_H
40 40
41#include "buffer.h"
42
43/* Definitions for channel types. */ 41/* Definitions for channel types. */
44#define SSH_CHANNEL_X11_LISTENER 1 /* Listening for inet X11 conn. */ 42#define SSH_CHANNEL_X11_LISTENER 1 /* Listening for inet X11 conn. */
45#define SSH_CHANNEL_PORT_LISTENER 2 /* Listening on a port. */ 43#define SSH_CHANNEL_PORT_LISTENER 2 /* Listening on a port. */
@@ -207,11 +205,13 @@ int channel_find_open(void);
207void channel_set_af(int af); 205void channel_set_af(int af);
208void channel_permit_all_opens(void); 206void channel_permit_all_opens(void);
209void channel_add_permitted_opens(char *, int); 207void channel_add_permitted_opens(char *, int);
208int channel_add_adm_permitted_opens(char *, int);
210void channel_clear_permitted_opens(void); 209void channel_clear_permitted_opens(void);
211void channel_input_port_forward_request(int, int); 210void channel_clear_adm_permitted_opens(void);
211int channel_input_port_forward_request(int, int);
212int channel_connect_to(const char *, u_short); 212int channel_connect_to(const char *, u_short);
213int channel_connect_by_listen_address(u_short); 213int channel_connect_by_listen_address(u_short);
214void channel_request_remote_forwarding(const char *, u_short, 214int channel_request_remote_forwarding(const char *, u_short,
215 const char *, u_short); 215 const char *, u_short);
216int channel_setup_local_fwd_listener(const char *, u_short, 216int channel_setup_local_fwd_listener(const char *, u_short,
217 const char *, u_short, int); 217 const char *, u_short, int);
diff --git a/cipher-3des1.c b/cipher-3des1.c
index f815e8ae5..fc16e20d7 100644
--- a/cipher-3des1.c
+++ b/cipher-3des1.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: cipher-3des1.c,v 1.6 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2003 Markus Friedl. All rights reserved. 3 * Copyright (c) 2003 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,9 +24,14 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: cipher-3des1.c,v 1.2 2003/12/22 20:29:55 markus Exp $"); 27
28#include <sys/types.h>
27 29
28#include <openssl/evp.h> 30#include <openssl/evp.h>
31
32#include <stdarg.h>
33#include <string.h>
34
29#include "xmalloc.h" 35#include "xmalloc.h"
30#include "log.h" 36#include "log.h"
31 37
diff --git a/cipher-acss.c b/cipher-acss.c
index a95fa6747..cb0bf736c 100644
--- a/cipher-acss.c
+++ b/cipher-acss.c
@@ -15,9 +15,10 @@
15 */ 15 */
16 16
17#include "includes.h" 17#include "includes.h"
18
18#include <openssl/evp.h> 19#include <openssl/evp.h>
19 20
20RCSID("$Id: cipher-acss.c,v 1.3 2005/07/17 07:04:47 djm Exp $"); 21#include <string.h>
21 22
22#if !defined(EVP_CTRL_SET_ACSS_MODE) && (OPENSSL_VERSION_NUMBER >= 0x00907000L) 23#if !defined(EVP_CTRL_SET_ACSS_MODE) && (OPENSSL_VERSION_NUMBER >= 0x00907000L)
23 24
diff --git a/cipher-aes.c b/cipher-aes.c
index 228ddb104..3ea594969 100644
--- a/cipher-aes.c
+++ b/cipher-aes.c
@@ -28,9 +28,13 @@
28#include "openbsd-compat/openssl-compat.h" 28#include "openbsd-compat/openssl-compat.h"
29 29
30#ifdef USE_BUILTIN_RIJNDAEL 30#ifdef USE_BUILTIN_RIJNDAEL
31RCSID("$OpenBSD: cipher-aes.c,v 1.2 2003/11/26 21:44:29 djm Exp $"); 31#include <sys/types.h>
32 32
33#include <openssl/evp.h> 33#include <openssl/evp.h>
34
35#include <stdarg.h>
36#include <string.h>
37
34#include "rijndael.h" 38#include "rijndael.h"
35#include "xmalloc.h" 39#include "xmalloc.h"
36#include "log.h" 40#include "log.h"
diff --git a/cipher-bf1.c b/cipher-bf1.c
index 5af695c17..292488c5c 100644
--- a/cipher-bf1.c
+++ b/cipher-bf1.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: cipher-bf1.c,v 1.5 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2003 Markus Friedl. All rights reserved. 3 * Copyright (c) 2003 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,9 +24,14 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: cipher-bf1.c,v 1.1 2003/05/15 03:08:29 markus Exp $"); 27
28#include <sys/types.h>
27 29
28#include <openssl/evp.h> 30#include <openssl/evp.h>
31
32#include <stdarg.h>
33#include <string.h>
34
29#include "xmalloc.h" 35#include "xmalloc.h"
30#include "log.h" 36#include "log.h"
31 37
diff --git a/cipher-ctr.c b/cipher-ctr.c
index 8a98f3c42..b24f3a428 100644
--- a/cipher-ctr.c
+++ b/cipher-ctr.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: cipher-ctr.c,v 1.10 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2003 Markus Friedl <markus@openbsd.org> 3 * Copyright (c) 2003 Markus Friedl <markus@openbsd.org>
3 * 4 *
@@ -14,12 +15,16 @@
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */ 16 */
16#include "includes.h" 17#include "includes.h"
17RCSID("$OpenBSD: cipher-ctr.c,v 1.6 2005/07/17 07:17:55 djm Exp $"); 18
19#include <sys/types.h>
20
21#include <stdarg.h>
22#include <string.h>
18 23
19#include <openssl/evp.h> 24#include <openssl/evp.h>
20 25
21#include "log.h"
22#include "xmalloc.h" 26#include "xmalloc.h"
27#include "log.h"
23 28
24/* compatibility with old or broken OpenSSL versions */ 29/* compatibility with old or broken OpenSSL versions */
25#include "openbsd-compat/openssl-compat.h" 30#include "openbsd-compat/openssl-compat.h"
diff --git a/cipher.c b/cipher.c
index 1434d5524..b264063c4 100644
--- a/cipher.c
+++ b/cipher.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: cipher.c,v 1.81 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -35,14 +36,18 @@
35 */ 36 */
36 37
37#include "includes.h" 38#include "includes.h"
38RCSID("$OpenBSD: cipher.c,v 1.77 2005/07/16 01:35:24 djm Exp $"); 39
40#include <sys/types.h>
41
42#include <openssl/md5.h>
43
44#include <string.h>
45#include <stdarg.h>
39 46
40#include "xmalloc.h" 47#include "xmalloc.h"
41#include "log.h" 48#include "log.h"
42#include "cipher.h" 49#include "cipher.h"
43 50
44#include <openssl/md5.h>
45
46/* compatibility with old or broken OpenSSL versions */ 51/* compatibility with old or broken OpenSSL versions */
47#include "openbsd-compat/openssl-compat.h" 52#include "openbsd-compat/openssl-compat.h"
48 53
diff --git a/cipher.h b/cipher.h
index 6bb5719b0..49bbc1682 100644
--- a/cipher.h
+++ b/cipher.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: cipher.h,v 1.35 2004/07/28 09:40:29 markus Exp $ */ 1/* $OpenBSD: cipher.h,v 1.36 2006/03/25 22:22:42 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
diff --git a/cleanup.c b/cleanup.c
index 11d1d4d9a..238f965e6 100644
--- a/cleanup.c
+++ b/cleanup.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: cleanup.c,v 1.5 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2003 Markus Friedl <markus@openbsd.org> 3 * Copyright (c) 2003 Markus Friedl <markus@openbsd.org>
3 * 4 *
@@ -13,8 +14,13 @@
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */ 16 */
17
16#include "includes.h" 18#include "includes.h"
17RCSID("$OpenBSD: cleanup.c,v 1.1 2003/09/23 20:17:11 markus Exp $"); 19
20#include <sys/types.h>
21
22#include <unistd.h>
23#include <stdarg.h>
18 24
19#include "log.h" 25#include "log.h"
20 26
diff --git a/clientloop.c b/clientloop.c
index b76f7cfe0..c7362caa8 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: clientloop.c,v 1.178 2007/02/20 10:25:14 djm Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -59,20 +60,43 @@
59 */ 60 */
60 61
61#include "includes.h" 62#include "includes.h"
62RCSID("$OpenBSD: clientloop.c,v 1.149 2005/12/30 15:56:37 reyk Exp $");
63 63
64#include <sys/types.h>
65#include <sys/ioctl.h>
66#include <sys/param.h>
67#ifdef HAVE_SYS_STAT_H
68# include <sys/stat.h>
69#endif
70#ifdef HAVE_SYS_TIME_H
71# include <sys/time.h>
72#endif
73#include <sys/socket.h>
74
75#include <ctype.h>
76#include <errno.h>
77#ifdef HAVE_PATHS_H
78#include <paths.h>
79#endif
80#include <signal.h>
81#include <stdarg.h>
82#include <stdio.h>
83#include <stdlib.h>
84#include <string.h>
85#include <termios.h>
86#include <pwd.h>
87#include <unistd.h>
88
89#include "xmalloc.h"
64#include "ssh.h" 90#include "ssh.h"
65#include "ssh1.h" 91#include "ssh1.h"
66#include "ssh2.h" 92#include "ssh2.h"
67#include "xmalloc.h"
68#include "packet.h" 93#include "packet.h"
69#include "buffer.h" 94#include "buffer.h"
70#include "compat.h" 95#include "compat.h"
71#include "channels.h" 96#include "channels.h"
72#include "dispatch.h" 97#include "dispatch.h"
73#include "buffer.h"
74#include "bufaux.h"
75#include "key.h" 98#include "key.h"
99#include "cipher.h"
76#include "kex.h" 100#include "kex.h"
77#include "log.h" 101#include "log.h"
78#include "readconf.h" 102#include "readconf.h"
@@ -118,7 +142,7 @@ static volatile sig_atomic_t received_signal = 0;
118static int in_non_blocking_mode = 0; 142static int in_non_blocking_mode = 0;
119 143
120/* Common data for the client loop code. */ 144/* Common data for the client loop code. */
121static int quit_pending; /* Set to non-zero to quit the client loop. */ 145static volatile sig_atomic_t quit_pending; /* Set non-zero to quit the loop. */
122static int escape_char; /* Escape character. */ 146static int escape_char; /* Escape character. */
123static int escape_pending; /* Last character was the escape character */ 147static int escape_pending; /* Last character was the escape character */
124static int last_was_cr; /* Last character was a newline. */ 148static int last_was_cr; /* Last character was a newline. */
@@ -178,7 +202,7 @@ enter_non_blocking(void)
178 * Signal handler for the window change signal (SIGWINCH). This just sets a 202 * Signal handler for the window change signal (SIGWINCH). This just sets a
179 * flag indicating that the window has changed. 203 * flag indicating that the window has changed.
180 */ 204 */
181 205/*ARGSUSED */
182static void 206static void
183window_change_handler(int sig) 207window_change_handler(int sig)
184{ 208{
@@ -190,7 +214,7 @@ window_change_handler(int sig)
190 * Signal handler for signals that cause the program to terminate. These 214 * Signal handler for signals that cause the program to terminate. These
191 * signals must be trapped to restore terminal modes. 215 * signals must be trapped to restore terminal modes.
192 */ 216 */
193 217/*ARGSUSED */
194static void 218static void
195signal_handler(int sig) 219signal_handler(int sig)
196{ 220{
@@ -422,10 +446,10 @@ client_check_window_change(void)
422 if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) < 0) 446 if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) < 0)
423 return; 447 return;
424 packet_start(SSH_CMSG_WINDOW_SIZE); 448 packet_start(SSH_CMSG_WINDOW_SIZE);
425 packet_put_int(ws.ws_row); 449 packet_put_int((u_int)ws.ws_row);
426 packet_put_int(ws.ws_col); 450 packet_put_int((u_int)ws.ws_col);
427 packet_put_int(ws.ws_xpixel); 451 packet_put_int((u_int)ws.ws_xpixel);
428 packet_put_int(ws.ws_ypixel); 452 packet_put_int((u_int)ws.ws_ypixel);
429 packet_send(); 453 packet_send();
430 } 454 }
431} 455}
@@ -440,8 +464,10 @@ client_global_request_reply(int type, u_int32_t seq, void *ctxt)
440static void 464static void
441server_alive_check(void) 465server_alive_check(void)
442{ 466{
443 if (++server_alive_timeouts > options.server_alive_count_max) 467 if (++server_alive_timeouts > options.server_alive_count_max) {
444 packet_disconnect("Timeout, server not responding."); 468 logit("Timeout, server not responding.");
469 cleanup_exit(255);
470 }
445 packet_start(SSH2_MSG_GLOBAL_REQUEST); 471 packet_start(SSH2_MSG_GLOBAL_REQUEST);
446 packet_put_cstring("keepalive@openssh.com"); 472 packet_put_cstring("keepalive@openssh.com");
447 packet_put_char(1); /* boolean: want reply */ 473 packet_put_char(1); /* boolean: want reply */
@@ -569,7 +595,7 @@ client_suspend_self(Buffer *bin, Buffer *bout, Buffer *berr)
569} 595}
570 596
571static void 597static void
572client_process_net_input(fd_set * readset) 598client_process_net_input(fd_set *readset)
573{ 599{
574 int len; 600 int len;
575 char buf[8192]; 601 char buf[8192];
@@ -677,11 +703,11 @@ client_extra_session2_setup(int id, void *arg)
677} 703}
678 704
679static void 705static void
680client_process_control(fd_set * readset) 706client_process_control(fd_set *readset)
681{ 707{
682 Buffer m; 708 Buffer m;
683 Channel *c; 709 Channel *c;
684 int client_fd, new_fd[3], ver, allowed; 710 int client_fd, new_fd[3], ver, allowed, window, packetmax;
685 socklen_t addrlen; 711 socklen_t addrlen;
686 struct sockaddr_storage addr; 712 struct sockaddr_storage addr;
687 struct confirm_ctx *cctx; 713 struct confirm_ctx *cctx;
@@ -808,8 +834,7 @@ client_process_control(fd_set * readset)
808 return; 834 return;
809 } 835 }
810 836
811 cctx = xmalloc(sizeof(*cctx)); 837 cctx = xcalloc(1, sizeof(*cctx));
812 memset(cctx, 0, sizeof(*cctx));
813 cctx->want_tty = (flags & SSHMUX_FLAG_TTY) != 0; 838 cctx->want_tty = (flags & SSHMUX_FLAG_TTY) != 0;
814 cctx->want_subsys = (flags & SSHMUX_FLAG_SUBSYS) != 0; 839 cctx->want_subsys = (flags & SSHMUX_FLAG_SUBSYS) != 0;
815 cctx->want_x_fwd = (flags & SSHMUX_FLAG_X11_FWD) != 0; 840 cctx->want_x_fwd = (flags & SSHMUX_FLAG_X11_FWD) != 0;
@@ -824,7 +849,7 @@ client_process_control(fd_set * readset)
824 env_len = MIN(env_len, 4096); 849 env_len = MIN(env_len, 4096);
825 debug3("%s: receiving %d env vars", __func__, env_len); 850 debug3("%s: receiving %d env vars", __func__, env_len);
826 if (env_len != 0) { 851 if (env_len != 0) {
827 cctx->env = xmalloc(sizeof(*cctx->env) * (env_len + 1)); 852 cctx->env = xcalloc(env_len + 1, sizeof(*cctx->env));
828 for (i = 0; i < env_len; i++) 853 for (i = 0; i < env_len; i++)
829 cctx->env[i] = buffer_get_string(&m, &len); 854 cctx->env[i] = buffer_get_string(&m, &len);
830 cctx->env[i] = NULL; 855 cctx->env[i] = NULL;
@@ -832,6 +857,7 @@ client_process_control(fd_set * readset)
832 857
833 debug2("%s: accepted tty %d, subsys %d, cmd %s", __func__, 858 debug2("%s: accepted tty %d, subsys %d, cmd %s", __func__,
834 cctx->want_tty, cctx->want_subsys, cmd); 859 cctx->want_tty, cctx->want_subsys, cmd);
860 xfree(cmd);
835 861
836 /* Gather fds from client */ 862 /* Gather fds from client */
837 new_fd[0] = mm_receive_fd(client_fd); 863 new_fd[0] = mm_receive_fd(client_fd);
@@ -874,9 +900,15 @@ client_process_control(fd_set * readset)
874 900
875 set_nonblock(client_fd); 901 set_nonblock(client_fd);
876 902
903 window = CHAN_SES_WINDOW_DEFAULT;
904 packetmax = CHAN_SES_PACKET_DEFAULT;
905 if (cctx->want_tty) {
906 window >>= 1;
907 packetmax >>= 1;
908 }
909
877 c = channel_new("session", SSH_CHANNEL_OPENING, 910 c = channel_new("session", SSH_CHANNEL_OPENING,
878 new_fd[0], new_fd[1], new_fd[2], 911 new_fd[0], new_fd[1], new_fd[2], window, packetmax,
879 CHAN_SES_WINDOW_DEFAULT, CHAN_SES_PACKET_DEFAULT,
880 CHAN_EXTENDED_WRITE, "client-session", /*nonblock*/0); 912 CHAN_EXTENDED_WRITE, "client-session", /*nonblock*/0);
881 913
882 /* XXX */ 914 /* XXX */
@@ -912,12 +944,16 @@ process_cmdline(void)
912 944
913 if (*s == 'h' || *s == 'H' || *s == '?') { 945 if (*s == 'h' || *s == 'H' || *s == '?') {
914 logit("Commands:"); 946 logit("Commands:");
915 logit(" -Lport:host:hostport Request local forward"); 947 logit(" -L[bind_address:]port:host:hostport "
916 logit(" -Rport:host:hostport Request remote forward"); 948 "Request local forward");
917 logit(" -KRhostport Cancel remote forward"); 949 logit(" -R[bind_address:]port:host:hostport "
950 "Request remote forward");
951 logit(" -KR[bind_address:]port "
952 "Cancel remote forward");
918 if (!options.permit_local_command) 953 if (!options.permit_local_command)
919 goto out; 954 goto out;
920 logit(" !args Execute local command"); 955 logit(" !args "
956 "Execute local command");
921 goto out; 957 goto out;
922 } 958 }
923 959
@@ -978,9 +1014,12 @@ process_cmdline(void)
978 goto out; 1014 goto out;
979 } 1015 }
980 } else { 1016 } else {
981 channel_request_remote_forwarding(fwd.listen_host, 1017 if (channel_request_remote_forwarding(fwd.listen_host,
982 fwd.listen_port, fwd.connect_host, 1018 fwd.listen_port, fwd.connect_host,
983 fwd.connect_port); 1019 fwd.connect_port) < 0) {
1020 logit("Port forwarding failed.");
1021 goto out;
1022 }
984 } 1023 }
985 1024
986 logit("Forwarding port."); 1025 logit("Forwarding port.");
@@ -1172,7 +1211,7 @@ Supported escape sequences:\r\n\
1172} 1211}
1173 1212
1174static void 1213static void
1175client_process_input(fd_set * readset) 1214client_process_input(fd_set *readset)
1176{ 1215{
1177 int len; 1216 int len;
1178 char buf[8192]; 1217 char buf[8192];
@@ -1225,7 +1264,7 @@ client_process_input(fd_set * readset)
1225} 1264}
1226 1265
1227static void 1266static void
1228client_process_output(fd_set * writeset) 1267client_process_output(fd_set *writeset)
1229{ 1268{
1230 int len; 1269 int len;
1231 char buf[100]; 1270 char buf[100];
@@ -1724,7 +1763,7 @@ client_request_agent(const char *request_type, int rchan)
1724 error("Warning: this is probably a break-in attempt by a malicious server."); 1763 error("Warning: this is probably a break-in attempt by a malicious server.");
1725 return NULL; 1764 return NULL;
1726 } 1765 }
1727 sock = ssh_get_authentication_socket(); 1766 sock = ssh_get_authentication_socket();
1728 if (sock < 0) 1767 if (sock < 0)
1729 return NULL; 1768 return NULL;
1730 c = channel_new("authentication agent connection", 1769 c = channel_new("authentication agent connection",
@@ -1869,10 +1908,10 @@ client_session2_setup(int id, int want_tty, int want_subsystem,
1869 1908
1870 channel_request_start(id, "pty-req", 0); 1909 channel_request_start(id, "pty-req", 0);
1871 packet_put_cstring(term != NULL ? term : ""); 1910 packet_put_cstring(term != NULL ? term : "");
1872 packet_put_int(ws.ws_col); 1911 packet_put_int((u_int)ws.ws_col);
1873 packet_put_int(ws.ws_row); 1912 packet_put_int((u_int)ws.ws_row);
1874 packet_put_int(ws.ws_xpixel); 1913 packet_put_int((u_int)ws.ws_xpixel);
1875 packet_put_int(ws.ws_ypixel); 1914 packet_put_int((u_int)ws.ws_ypixel);
1876 tio = get_saved_tio(); 1915 tio = get_saved_tio();
1877 tty_make_modes(-1, tiop != NULL ? tiop : &tio); 1916 tty_make_modes(-1, tiop != NULL ? tiop : &tio);
1878 packet_send(); 1917 packet_send();
diff --git a/clientloop.h b/clientloop.h
index aed2d918b..beec62f70 100644
--- a/clientloop.h
+++ b/clientloop.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.h,v 1.14 2005/07/04 00:58:43 djm Exp $ */ 1/* $OpenBSD: clientloop.h,v 1.16 2006/03/25 22:22:42 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -35,6 +35,8 @@
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 37
38#include <termios.h>
39
38/* Client side main loop for the interactive session. */ 40/* Client side main loop for the interactive session. */
39int client_loop(int, int, int); 41int client_loop(int, int, int);
40void client_x11_get_proto(const char *, const char *, u_int, 42void client_x11_get_proto(const char *, const char *, u_int,
diff --git a/compat.c b/compat.c
index 4086e853e..bc1131581 100644
--- a/compat.c
+++ b/compat.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: compat.c,v 1.77 2006/12/12 03:58:42 djm Exp $ */
1/* 2/*
2 * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. 3 * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,11 +24,16 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: compat.c,v 1.71 2005/03/01 10:09:52 djm Exp $");
27 27
28#include <sys/types.h>
29
30#include <stdlib.h>
31#include <string.h>
32#include <stdarg.h>
33
34#include "xmalloc.h"
28#include "buffer.h" 35#include "buffer.h"
29#include "packet.h" 36#include "packet.h"
30#include "xmalloc.h"
31#include "compat.h" 37#include "compat.h"
32#include "log.h" 38#include "log.h"
33#include "match.h" 39#include "match.h"
@@ -127,7 +133,8 @@ compat_datafellows(const char *version)
127 { "2.3.*", SSH_BUG_DEBUG|SSH_BUG_RSASIGMD5| 133 { "2.3.*", SSH_BUG_DEBUG|SSH_BUG_RSASIGMD5|
128 SSH_BUG_FIRSTKEX }, 134 SSH_BUG_FIRSTKEX },
129 { "2.4", SSH_OLD_SESSIONID }, /* Van Dyke */ 135 { "2.4", SSH_OLD_SESSIONID }, /* Van Dyke */
130 { "2.*", SSH_BUG_DEBUG|SSH_BUG_FIRSTKEX }, 136 { "2.*", SSH_BUG_DEBUG|SSH_BUG_FIRSTKEX|
137 SSH_BUG_RFWD_ADDR },
131 { "3.0.*", SSH_BUG_DEBUG }, 138 { "3.0.*", SSH_BUG_DEBUG },
132 { "3.0 SecureCRT*", SSH_OLD_SESSIONID }, 139 { "3.0 SecureCRT*", SSH_OLD_SESSIONID },
133 { "1.7 SecureFX*", SSH_OLD_SESSIONID }, 140 { "1.7 SecureFX*", SSH_OLD_SESSIONID },
diff --git a/compat.h b/compat.h
index cf92dbdee..4d8ebc908 100644
--- a/compat.h
+++ b/compat.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: compat.h,v 1.39 2005/03/01 10:09:52 djm Exp $ */ 1/* $OpenBSD: compat.h,v 1.41 2006/12/12 03:58:42 djm 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.
@@ -56,6 +56,7 @@
56#define SSH_BUG_PROBE 0x00400000 56#define SSH_BUG_PROBE 0x00400000
57#define SSH_BUG_FIRSTKEX 0x00800000 57#define SSH_BUG_FIRSTKEX 0x00800000
58#define SSH_OLD_FORWARD_ADDR 0x01000000 58#define SSH_OLD_FORWARD_ADDR 0x01000000
59#define SSH_BUG_RFWD_ADDR 0x02000000
59 60
60void enable_compat13(void); 61void enable_compat13(void);
61void enable_compat20(void); 62void enable_compat20(void);
diff --git a/compress.c b/compress.c
index 0d1c7e55e..c058d2224 100644
--- a/compress.c
+++ b/compress.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: compress.c,v 1.25 2006/08/06 01:13:32 stevesk Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -12,11 +13,14 @@
12 */ 13 */
13 14
14#include "includes.h" 15#include "includes.h"
15RCSID("$OpenBSD: compress.c,v 1.21 2004/01/13 19:45:15 markus Exp $"); 16
17#include <sys/types.h>
18
19#include <stdarg.h>
20#include <zlib.h>
16 21
17#include "log.h" 22#include "log.h"
18#include "buffer.h" 23#include "buffer.h"
19#include "zlib.h"
20#include "compress.h" 24#include "compress.h"
21 25
22z_stream incoming_stream; 26z_stream incoming_stream;
diff --git a/compress.h b/compress.h
index e364f4bdc..418d6fd2c 100644
--- a/compress.h
+++ b/compress.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: compress.h,v 1.11 2002/03/04 17:27:39 stevesk Exp $ */ 1/* $OpenBSD: compress.h,v 1.12 2006/03/25 22:22:43 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
diff --git a/config.h.in b/config.h.in
index 3101aba54..bfde5a82b 100644
--- a/config.h.in
+++ b/config.h.in
@@ -194,6 +194,9 @@
194/* Define if your system uses ancillary data style file descriptor passing */ 194/* Define if your system uses ancillary data style file descriptor passing */
195#undef HAVE_CONTROL_IN_MSGHDR 195#undef HAVE_CONTROL_IN_MSGHDR
196 196
197/* Define to 1 if you have the <crypto/sha2.h> header file. */
198#undef HAVE_CRYPTO_SHA2_H
199
197/* Define to 1 if you have the <crypt.h> header file. */ 200/* Define to 1 if you have the <crypt.h> header file. */
198#undef HAVE_CRYPT_H 201#undef HAVE_CRYPT_H
199 202
@@ -207,6 +210,10 @@
207 don't. */ 210 don't. */
208#undef HAVE_DECL_AUTHENTICATE 211#undef HAVE_DECL_AUTHENTICATE
209 212
213/* Define to 1 if you have the declaration of `GLOB_NOMATCH', and to 0 if you
214 don't. */
215#undef HAVE_DECL_GLOB_NOMATCH
216
210/* Define to 1 if you have the declaration of `h_errno', and to 0 if you 217/* Define to 1 if you have the declaration of `h_errno', and to 0 if you
211 don't. */ 218 don't. */
212#undef HAVE_DECL_H_ERRNO 219#undef HAVE_DECL_H_ERRNO
@@ -223,6 +230,10 @@
223 don't. */ 230 don't. */
224#undef HAVE_DECL_LOGINSUCCESS 231#undef HAVE_DECL_LOGINSUCCESS
225 232
233/* Define to 1 if you have the declaration of `O_NONBLOCK', and to 0 if you
234 don't. */
235#undef HAVE_DECL_O_NONBLOCK
236
226/* Define to 1 if you have the declaration of `passwdexpired', and to 0 if you 237/* Define to 1 if you have the declaration of `passwdexpired', and to 0 if you
227 don't. */ 238 don't. */
228#undef HAVE_DECL_PASSWDEXPIRED 239#undef HAVE_DECL_PASSWDEXPIRED
@@ -231,6 +242,14 @@
231 don't. */ 242 don't. */
232#undef HAVE_DECL_SETAUTHDB 243#undef HAVE_DECL_SETAUTHDB
233 244
245/* Define to 1 if you have the declaration of `SHUT_RD', and to 0 if you
246 don't. */
247#undef HAVE_DECL_SHUT_RD
248
249/* Define to 1 if you have the declaration of `writev', and to 0 if you don't.
250 */
251#undef HAVE_DECL_WRITEV
252
234/* Define to 1 if you have the declaration of `_getlong', and to 0 if you 253/* Define to 1 if you have the declaration of `_getlong', and to 0 if you
235 don't. */ 254 don't. */
236#undef HAVE_DECL__GETLONG 255#undef HAVE_DECL__GETLONG
@@ -266,6 +285,9 @@
266/* Define if your system has /etc/default/login */ 285/* Define if your system has /etc/default/login */
267#undef HAVE_ETC_DEFAULT_LOGIN 286#undef HAVE_ETC_DEFAULT_LOGIN
268 287
288/* Define to 1 if you have the `EVP_sha256' function. */
289#undef HAVE_EVP_SHA256
290
269/* Define if you have ut_exit in utmp.h */ 291/* Define if you have ut_exit in utmp.h */
270#undef HAVE_EXIT_IN_UTMP 292#undef HAVE_EXIT_IN_UTMP
271 293
@@ -275,6 +297,12 @@
275/* Define to 1 if you have the `fchown' function. */ 297/* Define to 1 if you have the `fchown' function. */
276#undef HAVE_FCHOWN 298#undef HAVE_FCHOWN
277 299
300/* Use F_CLOSEM fcntl for closefrom */
301#undef HAVE_FCNTL_CLOSEM
302
303/* Define to 1 if you have the <fcntl.h> header file. */
304#undef HAVE_FCNTL_H
305
278/* Define to 1 if you have the <features.h> header file. */ 306/* Define to 1 if you have the <features.h> header file. */
279#undef HAVE_FEATURES_H 307#undef HAVE_FEATURES_H
280 308
@@ -338,6 +366,9 @@
338/* Define to 1 if you have the `getrusage' function. */ 366/* Define to 1 if you have the `getrusage' function. */
339#undef HAVE_GETRUSAGE 367#undef HAVE_GETRUSAGE
340 368
369/* Define to 1 if you have the `getseuserbyname' function. */
370#undef HAVE_GETSEUSERBYNAME
371
341/* Define to 1 if you have the `gettimeofday' function. */ 372/* Define to 1 if you have the `gettimeofday' function. */
342#undef HAVE_GETTIMEOFDAY 373#undef HAVE_GETTIMEOFDAY
343 374
@@ -362,6 +393,9 @@
362/* Define to 1 if you have the `getutxline' function. */ 393/* Define to 1 if you have the `getutxline' function. */
363#undef HAVE_GETUTXLINE 394#undef HAVE_GETUTXLINE
364 395
396/* Define to 1 if you have the `get_default_context_with_level' function. */
397#undef HAVE_GET_DEFAULT_CONTEXT_WITH_LEVEL
398
365/* Define to 1 if you have the `glob' function. */ 399/* Define to 1 if you have the `glob' function. */
366#undef HAVE_GLOB 400#undef HAVE_GLOB
367 401
@@ -536,6 +570,9 @@
536/* Define to 1 if you have the <netgroup.h> header file. */ 570/* Define to 1 if you have the <netgroup.h> header file. */
537#undef HAVE_NETGROUP_H 571#undef HAVE_NETGROUP_H
538 572
573/* Define to 1 if you have the <net/if_tun.h> header file. */
574#undef HAVE_NET_IF_TUN_H
575
539/* Define if you are on NeXT */ 576/* Define if you are on NeXT */
540#undef HAVE_NEXT 577#undef HAVE_NEXT
541 578
@@ -699,6 +736,12 @@
699/* Define to 1 if you have the `setvbuf' function. */ 736/* Define to 1 if you have the `setvbuf' function. */
700#undef HAVE_SETVBUF 737#undef HAVE_SETVBUF
701 738
739/* Define to 1 if you have the `SHA256_Update' function. */
740#undef HAVE_SHA256_UPDATE
741
742/* Define to 1 if you have the <sha2.h> header file. */
743#undef HAVE_SHA2_H
744
702/* Define to 1 if you have the <shadow.h> header file. */ 745/* Define to 1 if you have the <shadow.h> header file. */
703#undef HAVE_SHADOW_H 746#undef HAVE_SHADOW_H
704 747
@@ -1128,22 +1171,25 @@
1128/* Location of PRNGD/EGD random number socket */ 1171/* Location of PRNGD/EGD random number socket */
1129#undef PRNGD_SOCKET 1172#undef PRNGD_SOCKET
1130 1173
1174/* read(1) can return 0 for a non-closed fd */
1175#undef PTY_ZEROREAD
1176
1131/* Define if your platform breaks doing a seteuid before a setuid */ 1177/* Define if your platform breaks doing a seteuid before a setuid */
1132#undef SETEUID_BREAKS_SETUID 1178#undef SETEUID_BREAKS_SETUID
1133 1179
1134/* The size of a `char', as computed by sizeof. */ 1180/* The size of `char', as computed by sizeof. */
1135#undef SIZEOF_CHAR 1181#undef SIZEOF_CHAR
1136 1182
1137/* The size of a `int', as computed by sizeof. */ 1183/* The size of `int', as computed by sizeof. */
1138#undef SIZEOF_INT 1184#undef SIZEOF_INT
1139 1185
1140/* The size of a `long int', as computed by sizeof. */ 1186/* The size of `long int', as computed by sizeof. */
1141#undef SIZEOF_LONG_INT 1187#undef SIZEOF_LONG_INT
1142 1188
1143/* The size of a `long long int', as computed by sizeof. */ 1189/* The size of `long long int', as computed by sizeof. */
1144#undef SIZEOF_LONG_LONG_INT 1190#undef SIZEOF_LONG_LONG_INT
1145 1191
1146/* The size of a `short int', as computed by sizeof. */ 1192/* The size of `short int', as computed by sizeof. */
1147#undef SIZEOF_SHORT_INT 1193#undef SIZEOF_SHORT_INT
1148 1194
1149/* Define if you want S/Key support */ 1195/* Define if you want S/Key support */
@@ -1198,6 +1244,9 @@
1198/* Define if you want a different $PATH for the superuser */ 1244/* Define if you want a different $PATH for the superuser */
1199#undef SUPERUSER_PATH 1245#undef SUPERUSER_PATH
1200 1246
1247/* syslog_r function is safe to use in in a signal handler */
1248#undef SYSLOG_R_SAFE_IN_SIGHAND
1249
1201/* Support passwords > 8 chars */ 1250/* Support passwords > 8 chars */
1202#undef UNIXWARE_LONG_PASSWORDS 1251#undef UNIXWARE_LONG_PASSWORDS
1203 1252
@@ -1213,15 +1262,15 @@
1213/* Use btmp to log bad logins */ 1262/* Use btmp to log bad logins */
1214#undef USE_BTMP 1263#undef USE_BTMP
1215 1264
1216/* platform uses an in-memory credentials cache */
1217#undef USE_CCAPI
1218
1219/* Use libedit for sftp */ 1265/* Use libedit for sftp */
1220#undef USE_LIBEDIT 1266#undef USE_LIBEDIT
1221 1267
1222/* Define if you want smartcard support using OpenSC */ 1268/* Define if you want smartcard support using OpenSC */
1223#undef USE_OPENSC 1269#undef USE_OPENSC
1224 1270
1271/* Enable OpenSSL engine support */
1272#undef USE_OPENSSL_ENGINE
1273
1225/* Define if you want to enable PAM support */ 1274/* Define if you want to enable PAM support */
1226#undef USE_PAM 1275#undef USE_PAM
1227 1276
@@ -1231,8 +1280,8 @@
1231/* Define if you want smartcard support using sectok */ 1280/* Define if you want smartcard support using sectok */
1232#undef USE_SECTOK 1281#undef USE_SECTOK
1233 1282
1234/* platform has the Security Authorization Session API */ 1283/* Define if you have Solaris process contracts */
1235#undef USE_SECURITY_SESSION_API 1284#undef USE_SOLARIS_PROCESS_CONTRACTS
1236 1285
1237/* Define if you shouldn't strip 'tty' from your ttyname in [uw]tmp */ 1286/* Define if you shouldn't strip 'tty' from your ttyname in [uw]tmp */
1238#undef WITH_ABBREV_NO_TTY 1287#undef WITH_ABBREV_NO_TTY
@@ -1253,6 +1302,9 @@
1253/* Define if you want IRIX project management */ 1302/* Define if you want IRIX project management */
1254#undef WITH_IRIX_PROJECT 1303#undef WITH_IRIX_PROJECT
1255 1304
1305/* Define if you want SELinux support. */
1306#undef WITH_SELINUX
1307
1256/* Define to 1 if your processor stores words with the most significant byte 1308/* Define to 1 if your processor stores words with the most significant byte
1257 first (like Motorola and SPARC, unlike Intel and VAX). */ 1309 first (like Motorola and SPARC, unlike Intel and VAX). */
1258#undef WORDS_BIGENDIAN 1310#undef WORDS_BIGENDIAN
diff --git a/configure b/configure
index de1d8e81e..99782f37e 100755
--- a/configure
+++ b/configure
@@ -1,28 +1,57 @@
1#! /bin/sh 1#! /bin/sh
2# From configure.ac Revision: 1.322.2.6 . 2# From configure.ac Revision: 1.372 .
3# Guess values for system-dependent variables and create Makefiles. 3# Guess values for system-dependent variables and create Makefiles.
4# Generated by GNU Autoconf 2.59 for OpenSSH Portable. 4# Generated by GNU Autoconf 2.61 for OpenSSH Portable.
5# 5#
6# Report bugs to <openssh-unix-dev@mindrot.org>. 6# Report bugs to <openssh-unix-dev@mindrot.org>.
7# 7#
8# Copyright (C) 2003 Free Software Foundation, Inc. 8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
9# This configure script is free software; the Free Software Foundation 10# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it. 11# gives unlimited permission to copy, distribute and modify it.
11## --------------------- ## 12## --------------------- ##
12## M4sh Initialization. ## 13## M4sh Initialization. ##
13## --------------------- ## 14## --------------------- ##
14 15
15# Be Bourne compatible 16# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
16if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 18if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17 emulate sh 19 emulate sh
18 NULLCMD=: 20 NULLCMD=:
19 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which 21 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20 # is contrary to our usage. Disable this feature. 22 # is contrary to our usage. Disable this feature.
21 alias -g '${1+"$@"}'='"$@"' 23 alias -g '${1+"$@"}'='"$@"'
22elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then 24 setopt NO_GLOB_SUBST
23 set -o posix 25else
26 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
30fi
31
32
33
34
35# PATH needs CR
36# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
45 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
24fi 54fi
25DUALCASE=1; export DUALCASE # for MKS sh
26 55
27# Support unset when possible. 56# Support unset when possible.
28if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
@@ -32,8 +61,43 @@ else
32fi 61fi
33 62
34 63
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
69as_nl='
70'
71IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
77for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
83IFS=$as_save_IFS
84
85 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
93 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
94 { (exit 1); exit 1; }
95fi
96
35# Work around bugs in pre-3.0 UWIN ksh. 97# Work around bugs in pre-3.0 UWIN ksh.
36$as_unset ENV MAIL MAILPATH 98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
37PS1='$ ' 101PS1='$ '
38PS2='> ' 102PS2='> '
39PS4='+ ' 103PS4='+ '
@@ -47,18 +111,19 @@ do
47 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then 111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
48 eval $as_var=C; export $as_var 112 eval $as_var=C; export $as_var
49 else 113 else
50 $as_unset $as_var 114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
51 fi 115 fi
52done 116done
53 117
54# Required to use basename. 118# Required to use basename.
55if expr a : '\(a\)' >/dev/null 2>&1; then 119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
56 as_expr=expr 121 as_expr=expr
57else 122else
58 as_expr=false 123 as_expr=false
59fi 124fi
60 125
61if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then 126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
62 as_basename=basename 127 as_basename=basename
63else 128else
64 as_basename=false 129 as_basename=false
@@ -66,157 +131,388 @@ fi
66 131
67 132
68# Name of the executable. 133# Name of the executable.
69as_me=`$as_basename "$0" || 134as_me=`$as_basename -- "$0" ||
70$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
71 X"$0" : 'X\(//\)$' \| \ 136 X"$0" : 'X\(//\)$' \| \
72 X"$0" : 'X\(/\)$' \| \ 137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
73 . : '\(.\)' 2>/dev/null ||
74echo X/"$0" | 138echo X/"$0" |
75 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } 139 sed '/^.*\/\([^/][^/]*\)\/*$/{
76 /^X\/\(\/\/\)$/{ s//\1/; q; } 140 s//\1/
77 /^X\/\(\/\).*/{ s//\1/; q; } 141 q
78 s/.*/./; q'` 142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
79 152
153# CDPATH.
154$as_unset CDPATH
80 155
81# PATH needs CR, and LINENO needs CR and PATH.
82# Avoid depending upon Character Ranges.
83as_cr_letters='abcdefghijklmnopqrstuvwxyz'
84as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
85as_cr_Letters=$as_cr_letters$as_cr_LETTERS
86as_cr_digits='0123456789'
87as_cr_alnum=$as_cr_Letters$as_cr_digits
88 156
89# The user is always right. 157if test "x$CONFIG_SHELL" = x; then
90if test "${PATH_SEPARATOR+set}" != set; then 158 if (eval ":") 2>/dev/null; then
91 echo "#! /bin/sh" >conf$$.sh 159 as_have_required=yes
92 echo "exit 0" >>conf$$.sh 160else
93 chmod +x conf$$.sh 161 as_have_required=no
94 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
95 PATH_SEPARATOR=';'
96 else
97 PATH_SEPARATOR=:
98 fi
99 rm -f conf$$.sh
100fi 162fi
101 163
164 if test $as_have_required = yes && (eval ":
165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
102 180
103 as_lineno_1=$LINENO 181exitcode=0
104 as_lineno_2=$LINENO 182if as_func_success; then
105 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` 183 :
106 test "x$as_lineno_1" != "x$as_lineno_2" && 184else
107 test "x$as_lineno_3" = "x$as_lineno_2" || { 185 exitcode=1
108 # Find who we are. Look in the path if we contain no path at all 186 echo as_func_success failed.
109 # relative or not. 187fi
110 case $0 in
111 *[\\/]* ) as_myself=$0 ;;
112 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
113for as_dir in $PATH
114do
115 IFS=$as_save_IFS
116 test -z "$as_dir" && as_dir=.
117 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
118done
119 188
120 ;; 189if as_func_failure; then
121 esac 190 exitcode=1
122 # We did not find ourselves, most probably we were run as `sh COMMAND' 191 echo as_func_failure succeeded.
123 # in which case we are not to be found in the path. 192fi
124 if test "x$as_myself" = x; then 193
125 as_myself=$0 194if as_func_ret_success; then
126 fi 195 :
127 if test ! -f "$as_myself"; then 196else
128 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 197 exitcode=1
129 { (exit 1); exit 1; }; } 198 echo as_func_ret_success failed.
130 fi 199fi
131 case $CONFIG_SHELL in 200
132 '') 201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if (set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
134for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH 225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
135do 226do
136 IFS=$as_save_IFS 227 IFS=$as_save_IFS
137 test -z "$as_dir" && as_dir=. 228 test -z "$as_dir" && as_dir=.
138 for as_base in sh bash ksh sh5; do 229 case $as_dir in
139 case $as_dir in
140 /*) 230 /*)
141 if ("$as_dir/$as_base" -c ' 231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
142 as_lineno_1=$LINENO 331 as_lineno_1=$LINENO
143 as_lineno_2=$LINENO 332 as_lineno_2=$LINENO
144 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
145 test "x$as_lineno_1" != "x$as_lineno_2" && 333 test "x$as_lineno_1" != "x$as_lineno_2" &&
146 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then 334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
147 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } 335
148 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } 336_ASEOF
149 CONFIG_SHELL=$as_dir/$as_base 337}; then
150 export CONFIG_SHELL 338 break
151 exec "$CONFIG_SHELL" "$0" ${1+"$@"} 339fi
152 fi;; 340
153 esac 341fi
154 done 342
155done 343 done
156;; 344
157 esac 345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if (set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
158 430
159 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO 431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
160 # uniformly replaced by the line number. The first 'sed' inserts a 432 # uniformly replaced by the line number. The first 'sed' inserts a
161 # line-number line before each line; the second 'sed' does the real 433 # line-number line after each line using $LINENO; the second 'sed'
162 # work. The second script uses 'N' to pair each line-number line 434 # does the real work. The second script uses 'N' to pair each
163 # with the numbered line, and appends trailing '-' during 435 # line-number line with the line containing $LINENO, and appends
164 # substitution so that $LINENO is not a special case at line end. 436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
165 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the 438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
166 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) 439 # scripts with optimization help from Paolo Bonzini. Blame Lee
167 sed '=' <$as_myself | 440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
168 sed ' 445 sed '
446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
169 N 450 N
170 s,$,-, 451 :loop
171 : loop 452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
172 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
173 t loop 453 t loop
174 s,-$,, 454 s/-\n.*//
175 s,^['$as_cr_digits']*\n,,
176 ' >$as_me.lineno && 455 ' >$as_me.lineno &&
177 chmod +x $as_me.lineno || 456 chmod +x "$as_me.lineno" ||
178 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
179 { (exit 1); exit 1; }; } 458 { (exit 1); exit 1; }; }
180 459
181 # Don't try to exec as it changes $[0], causing all sort of problems 460 # Don't try to exec as it changes $[0], causing all sort of problems
182 # (the dirname of $[0] is not the place where we might find the 461 # (the dirname of $[0] is not the place where we might find the
183 # original and so on. Autoconf is especially sensible to this). 462 # original and so on. Autoconf is especially sensitive to this).
184 . ./$as_me.lineno 463 . "./$as_me.lineno"
185 # Exit status is that of the last command. 464 # Exit status is that of the last command.
186 exit 465 exit
187} 466}
188 467
189 468
190case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in 469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
191 *c*,-n*) ECHO_N= ECHO_C=' 470 as_dirname=dirname
192' ECHO_T=' ' ;; 471else
193 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; 472 as_dirname=false
194 *) ECHO_N= ECHO_C='\c' ECHO_T= ;; 473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
195esac 484esac
196 485
197if expr a : '\(a\)' >/dev/null 2>&1; then 486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
198 as_expr=expr 488 as_expr=expr
199else 489else
200 as_expr=false 490 as_expr=false
201fi 491fi
202 492
203rm -f conf$$ conf$$.exe conf$$.file 493rm -f conf$$ conf$$.exe conf$$.file
494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
498 mkdir conf$$.dir
499fi
204echo >conf$$.file 500echo >conf$$.file
205if ln -s conf$$.file conf$$ 2>/dev/null; then 501if ln -s conf$$.file conf$$ 2>/dev/null; then
206 # We could just check for DJGPP; but this test a) works b) is more generic 502 as_ln_s='ln -s'
207 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). 503 # ... but there are two gotchas:
208 if test -f conf$$.exe; then 504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
209 # Don't use ln at all; we don't have any links 505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
210 as_ln_s='cp -p' 508 as_ln_s='cp -p'
211 else
212 as_ln_s='ln -s'
213 fi
214elif ln conf$$.file conf$$ 2>/dev/null; then 509elif ln conf$$.file conf$$ 2>/dev/null; then
215 as_ln_s=ln 510 as_ln_s=ln
216else 511else
217 as_ln_s='cp -p' 512 as_ln_s='cp -p'
218fi 513fi
219rm -f conf$$ conf$$.exe conf$$.file 514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
220 516
221if mkdir -p . 2>/dev/null; then 517if mkdir -p . 2>/dev/null; then
222 as_mkdir_p=: 518 as_mkdir_p=:
@@ -225,7 +521,28 @@ else
225 as_mkdir_p=false 521 as_mkdir_p=false
226fi 522fi
227 523
228as_executable_p="test -f" 524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
535 test -d "$1/.";
536 else
537 case $1 in
538 -*)set "./$1";;
539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
229 546
230# Sed expression to map a string onto a valid CPP name. 547# Sed expression to map a string onto a valid CPP name.
231as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -234,39 +551,27 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
234as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
235 552
236 553
237# IFS
238# We need space, tab and new line, in precisely that order.
239as_nl='
240'
241IFS=" $as_nl"
242
243# CDPATH.
244$as_unset CDPATH
245 554
555exec 7<&0 </dev/null 6>&1
246 556
247# Name of the host. 557# Name of the host.
248# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, 558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
249# so uname gets run too. 559# so uname gets run too.
250ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` 560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
251 561
252exec 6>&1
253
254# 562#
255# Initializations. 563# Initializations.
256# 564#
257ac_default_prefix=/usr/local 565ac_default_prefix=/usr/local
566ac_clean_files=
258ac_config_libobj_dir=. 567ac_config_libobj_dir=.
568LIBOBJS=
259cross_compiling=no 569cross_compiling=no
260subdirs= 570subdirs=
261MFLAGS= 571MFLAGS=
262MAKEFLAGS= 572MAKEFLAGS=
263SHELL=${CONFIG_SHELL-/bin/sh} 573SHELL=${CONFIG_SHELL-/bin/sh}
264 574
265# Maximum number of lines to put in a shell here document.
266# This variable seems obsolete. It should probably be removed, and
267# only ac_max_sed_lines should be used.
268: ${ac_max_here_lines=38}
269
270# Identity of this package. 575# Identity of this package.
271PACKAGE_NAME='OpenSSH' 576PACKAGE_NAME='OpenSSH'
272PACKAGE_TARNAME='openssh' 577PACKAGE_TARNAME='openssh'
@@ -278,42 +583,162 @@ ac_unique_file="ssh.c"
278# Factoring default headers for most tests. 583# Factoring default headers for most tests.
279ac_includes_default="\ 584ac_includes_default="\
280#include <stdio.h> 585#include <stdio.h>
281#if HAVE_SYS_TYPES_H 586#ifdef HAVE_SYS_TYPES_H
282# include <sys/types.h> 587# include <sys/types.h>
283#endif 588#endif
284#if HAVE_SYS_STAT_H 589#ifdef HAVE_SYS_STAT_H
285# include <sys/stat.h> 590# include <sys/stat.h>
286#endif 591#endif
287#if STDC_HEADERS 592#ifdef STDC_HEADERS
288# include <stdlib.h> 593# include <stdlib.h>
289# include <stddef.h> 594# include <stddef.h>
290#else 595#else
291# if HAVE_STDLIB_H 596# ifdef HAVE_STDLIB_H
292# include <stdlib.h> 597# include <stdlib.h>
293# endif 598# endif
294#endif 599#endif
295#if HAVE_STRING_H 600#ifdef HAVE_STRING_H
296# if !STDC_HEADERS && HAVE_MEMORY_H 601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
297# include <memory.h> 602# include <memory.h>
298# endif 603# endif
299# include <string.h> 604# include <string.h>
300#endif 605#endif
301#if HAVE_STRINGS_H 606#ifdef HAVE_STRINGS_H
302# include <strings.h> 607# include <strings.h>
303#endif 608#endif
304#if HAVE_INTTYPES_H 609#ifdef HAVE_INTTYPES_H
305# include <inttypes.h> 610# include <inttypes.h>
306#else
307# if HAVE_STDINT_H
308# include <stdint.h>
309# endif
310#endif 611#endif
311#if HAVE_UNISTD_H 612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
312# include <unistd.h> 616# include <unistd.h>
313#endif" 617#endif"
314 618
315ac_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 AWK CPP RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA EGREP AR CAT KILL PERL SED ENT TEST_MINUS_S_SH SH TEST_SHELL PATH_GROUPADD_PROG PATH_USERADD_PROG MAKE_PACKAGE_SUPPORTED STARTUP_SCRIPT_SHELL LOGIN_PROGRAM_FALLBACK PATH_PASSWD_PROG LD LIBWRAP LIBEDIT 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' 619ac_subst_vars='SHELL
620PATH_SEPARATOR
621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656CC
657CFLAGS
658LDFLAGS
659CPPFLAGS
660ac_ct_CC
661EXEEXT
662OBJEXT
663build
664build_cpu
665build_vendor
666build_os
667host
668host_cpu
669host_vendor
670host_os
671CPP
672GREP
673EGREP
674AWK
675RANLIB
676INSTALL_PROGRAM
677INSTALL_SCRIPT
678INSTALL_DATA
679AR
680CAT
681KILL
682PERL
683SED
684ENT
685TEST_MINUS_S_SH
686SH
687TEST_SHELL
688PATH_GROUPADD_PROG
689PATH_USERADD_PROG
690MAKE_PACKAGE_SUPPORTED
691STARTUP_SCRIPT_SHELL
692LOGIN_PROGRAM_FALLBACK
693PATH_PASSWD_PROG
694LD
695SSHDLIBS
696LIBWRAP
697LIBEDIT
698LIBPAM
699INSTALL_SSH_RAND_HELPER
700SSH_PRIVSEP_USER
701PROG_LS
702PROG_NETSTAT
703PROG_ARP
704PROG_IFCONFIG
705PROG_JSTAT
706PROG_PS
707PROG_SAR
708PROG_W
709PROG_WHO
710PROG_LAST
711PROG_LASTLOG
712PROG_DF
713PROG_VMSTAT
714PROG_UPTIME
715PROG_IPCS
716PROG_TAIL
717INSTALL_SSH_PRNG_CMDS
718OPENSC_CONFIG
719LIBSELINUX
720PRIVSEP_PATH
721xauth_path
722STRIP_OPT
723XAUTH_PATH
724NROFF
725MANTYPE
726mansubdir
727user_path
728piddir
729LIBOBJS
730LTLIBOBJS'
316ac_subst_files='' 731ac_subst_files=''
732 ac_precious_vars='build_alias
733host_alias
734target_alias
735CC
736CFLAGS
737LDFLAGS
738LIBS
739CPPFLAGS
740CPP'
741
317 742
318# Initialize some variables set by options. 743# Initialize some variables set by options.
319ac_init_help= 744ac_init_help=
@@ -340,34 +765,48 @@ x_libraries=NONE
340# and all the variables that are supposed to be based on exec_prefix 765# and all the variables that are supposed to be based on exec_prefix
341# by default will actually change. 766# by default will actually change.
342# Use braces instead of parens because sh, perl, etc. also accept them. 767# Use braces instead of parens because sh, perl, etc. also accept them.
768# (The list follows the same order as the GNU Coding Standards.)
343bindir='${exec_prefix}/bin' 769bindir='${exec_prefix}/bin'
344sbindir='${exec_prefix}/sbin' 770sbindir='${exec_prefix}/sbin'
345libexecdir='${exec_prefix}/libexec' 771libexecdir='${exec_prefix}/libexec'
346datadir='${prefix}/share' 772datarootdir='${prefix}/share'
773datadir='${datarootdir}'
347sysconfdir='${prefix}/etc' 774sysconfdir='${prefix}/etc'
348sharedstatedir='${prefix}/com' 775sharedstatedir='${prefix}/com'
349localstatedir='${prefix}/var' 776localstatedir='${prefix}/var'
350libdir='${exec_prefix}/lib'
351includedir='${prefix}/include' 777includedir='${prefix}/include'
352oldincludedir='/usr/include' 778oldincludedir='/usr/include'
353infodir='${prefix}/info' 779docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
354mandir='${prefix}/man' 780infodir='${datarootdir}/info'
781htmldir='${docdir}'
782dvidir='${docdir}'
783pdfdir='${docdir}'
784psdir='${docdir}'
785libdir='${exec_prefix}/lib'
786localedir='${datarootdir}/locale'
787mandir='${datarootdir}/man'
355 788
356ac_prev= 789ac_prev=
790ac_dashdash=
357for ac_option 791for ac_option
358do 792do
359 # If the previous option needs an argument, assign it. 793 # If the previous option needs an argument, assign it.
360 if test -n "$ac_prev"; then 794 if test -n "$ac_prev"; then
361 eval "$ac_prev=\$ac_option" 795 eval $ac_prev=\$ac_option
362 ac_prev= 796 ac_prev=
363 continue 797 continue
364 fi 798 fi
365 799
366 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` 800 case $ac_option in
801 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
802 *) ac_optarg=yes ;;
803 esac
367 804
368 # Accept the important Cygnus configure options, so we can diagnose typos. 805 # Accept the important Cygnus configure options, so we can diagnose typos.
369 806
370 case $ac_option in 807 case $ac_dashdash$ac_option in
808 --)
809 ac_dashdash=yes ;;
371 810
372 -bindir | --bindir | --bindi | --bind | --bin | --bi) 811 -bindir | --bindir | --bindi | --bind | --bin | --bi)
373 ac_prev=bindir ;; 812 ac_prev=bindir ;;
@@ -389,33 +828,45 @@ do
389 --config-cache | -C) 828 --config-cache | -C)
390 cache_file=config.cache ;; 829 cache_file=config.cache ;;
391 830
392 -datadir | --datadir | --datadi | --datad | --data | --dat | --da) 831 -datadir | --datadir | --datadi | --datad)
393 ac_prev=datadir ;; 832 ac_prev=datadir ;;
394 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ 833 -datadir=* | --datadir=* | --datadi=* | --datad=*)
395 | --da=*)
396 datadir=$ac_optarg ;; 834 datadir=$ac_optarg ;;
397 835
836 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
837 | --dataroo | --dataro | --datar)
838 ac_prev=datarootdir ;;
839 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
840 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
841 datarootdir=$ac_optarg ;;
842
398 -disable-* | --disable-*) 843 -disable-* | --disable-*)
399 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` 844 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
400 # Reject names that are not valid shell variable names. 845 # Reject names that are not valid shell variable names.
401 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && 846 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
402 { echo "$as_me: error: invalid feature name: $ac_feature" >&2 847 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
403 { (exit 1); exit 1; }; } 848 { (exit 1); exit 1; }; }
404 ac_feature=`echo $ac_feature | sed 's/-/_/g'` 849 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
405 eval "enable_$ac_feature=no" ;; 850 eval enable_$ac_feature=no ;;
851
852 -docdir | --docdir | --docdi | --doc | --do)
853 ac_prev=docdir ;;
854 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
855 docdir=$ac_optarg ;;
856
857 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
858 ac_prev=dvidir ;;
859 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
860 dvidir=$ac_optarg ;;
406 861
407 -enable-* | --enable-*) 862 -enable-* | --enable-*)
408 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` 863 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
409 # Reject names that are not valid shell variable names. 864 # Reject names that are not valid shell variable names.
410 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && 865 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
411 { echo "$as_me: error: invalid feature name: $ac_feature" >&2 866 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
412 { (exit 1); exit 1; }; } 867 { (exit 1); exit 1; }; }
413 ac_feature=`echo $ac_feature | sed 's/-/_/g'` 868 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
414 case $ac_option in 869 eval enable_$ac_feature=\$ac_optarg ;;
415 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
416 *) ac_optarg=yes ;;
417 esac
418 eval "enable_$ac_feature='$ac_optarg'" ;;
419 870
420 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 871 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
421 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 872 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -442,6 +893,12 @@ do
442 -host=* | --host=* | --hos=* | --ho=*) 893 -host=* | --host=* | --hos=* | --ho=*)
443 host_alias=$ac_optarg ;; 894 host_alias=$ac_optarg ;;
444 895
896 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
897 ac_prev=htmldir ;;
898 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
899 | --ht=*)
900 htmldir=$ac_optarg ;;
901
445 -includedir | --includedir | --includedi | --included | --include \ 902 -includedir | --includedir | --includedi | --included | --include \
446 | --includ | --inclu | --incl | --inc) 903 | --includ | --inclu | --incl | --inc)
447 ac_prev=includedir ;; 904 ac_prev=includedir ;;
@@ -466,13 +923,16 @@ do
466 | --libexe=* | --libex=* | --libe=*) 923 | --libexe=* | --libex=* | --libe=*)
467 libexecdir=$ac_optarg ;; 924 libexecdir=$ac_optarg ;;
468 925
926 -localedir | --localedir | --localedi | --localed | --locale)
927 ac_prev=localedir ;;
928 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
929 localedir=$ac_optarg ;;
930
469 -localstatedir | --localstatedir | --localstatedi | --localstated \ 931 -localstatedir | --localstatedir | --localstatedi | --localstated \
470 | --localstate | --localstat | --localsta | --localst \ 932 | --localstate | --localstat | --localsta | --localst | --locals)
471 | --locals | --local | --loca | --loc | --lo)
472 ac_prev=localstatedir ;; 933 ac_prev=localstatedir ;;
473 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ 934 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
474 | --localstate=* | --localstat=* | --localsta=* | --localst=* \ 935 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
475 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
476 localstatedir=$ac_optarg ;; 936 localstatedir=$ac_optarg ;;
477 937
478 -mandir | --mandir | --mandi | --mand | --man | --ma | --m) 938 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
@@ -537,6 +997,16 @@ do
537 | --progr-tra=* | --program-tr=* | --program-t=*) 997 | --progr-tra=* | --program-tr=* | --program-t=*)
538 program_transform_name=$ac_optarg ;; 998 program_transform_name=$ac_optarg ;;
539 999
1000 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1001 ac_prev=pdfdir ;;
1002 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1003 pdfdir=$ac_optarg ;;
1004
1005 -psdir | --psdir | --psdi | --psd | --ps)
1006 ac_prev=psdir ;;
1007 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1008 psdir=$ac_optarg ;;
1009
540 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 1010 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
541 | -silent | --silent | --silen | --sile | --sil) 1011 | -silent | --silent | --silen | --sile | --sil)
542 silent=yes ;; 1012 silent=yes ;;
@@ -589,24 +1059,20 @@ do
589 -with-* | --with-*) 1059 -with-* | --with-*)
590 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` 1060 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
591 # Reject names that are not valid shell variable names. 1061 # Reject names that are not valid shell variable names.
592 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && 1062 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
593 { echo "$as_me: error: invalid package name: $ac_package" >&2 1063 { echo "$as_me: error: invalid package name: $ac_package" >&2
594 { (exit 1); exit 1; }; } 1064 { (exit 1); exit 1; }; }
595 ac_package=`echo $ac_package| sed 's/-/_/g'` 1065 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
596 case $ac_option in 1066 eval with_$ac_package=\$ac_optarg ;;
597 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
598 *) ac_optarg=yes ;;
599 esac
600 eval "with_$ac_package='$ac_optarg'" ;;
601 1067
602 -without-* | --without-*) 1068 -without-* | --without-*)
603 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` 1069 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
604 # Reject names that are not valid shell variable names. 1070 # Reject names that are not valid shell variable names.
605 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && 1071 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
606 { echo "$as_me: error: invalid package name: $ac_package" >&2 1072 { echo "$as_me: error: invalid package name: $ac_package" >&2
607 { (exit 1); exit 1; }; } 1073 { (exit 1); exit 1; }; }
608 ac_package=`echo $ac_package | sed 's/-/_/g'` 1074 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
609 eval "with_$ac_package=no" ;; 1075 eval with_$ac_package=no ;;
610 1076
611 --x) 1077 --x)
612 # Obsolete; use --with-x. 1078 # Obsolete; use --with-x.
@@ -637,8 +1103,7 @@ Try \`$0 --help' for more information." >&2
637 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && 1103 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
638 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 1104 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
639 { (exit 1); exit 1; }; } 1105 { (exit 1); exit 1; }; }
640 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` 1106 eval $ac_envvar=\$ac_optarg
641 eval "$ac_envvar='$ac_optarg'"
642 export $ac_envvar ;; 1107 export $ac_envvar ;;
643 1108
644 *) 1109 *)
@@ -658,27 +1123,19 @@ if test -n "$ac_prev"; then
658 { (exit 1); exit 1; }; } 1123 { (exit 1); exit 1; }; }
659fi 1124fi
660 1125
661# Be sure to have absolute paths. 1126# Be sure to have absolute directory names.
662for ac_var in exec_prefix prefix 1127for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
663do 1128 datadir sysconfdir sharedstatedir localstatedir includedir \
664 eval ac_val=$`echo $ac_var` 1129 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
665 case $ac_val in 1130 libdir localedir mandir
666 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
667 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
668 { (exit 1); exit 1; }; };;
669 esac
670done
671
672# Be sure to have absolute paths.
673for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
674 localstatedir libdir includedir oldincludedir infodir mandir
675do 1131do
676 eval ac_val=$`echo $ac_var` 1132 eval ac_val=\$$ac_var
677 case $ac_val in 1133 case $ac_val in
678 [\\/$]* | ?:[\\/]* ) ;; 1134 [\\/$]* | ?:[\\/]* ) continue;;
679 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 1135 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
680 { (exit 1); exit 1; }; };;
681 esac 1136 esac
1137 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1138 { (exit 1); exit 1; }; }
682done 1139done
683 1140
684# There might be people who depend on the old broken behavior: `$host' 1141# There might be people who depend on the old broken behavior: `$host'
@@ -705,74 +1162,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias-
705test "$silent" = yes && exec 6>/dev/null 1162test "$silent" = yes && exec 6>/dev/null
706 1163
707 1164
1165ac_pwd=`pwd` && test -n "$ac_pwd" &&
1166ac_ls_di=`ls -di .` &&
1167ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1168 { echo "$as_me: error: Working directory cannot be determined" >&2
1169 { (exit 1); exit 1; }; }
1170test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1171 { echo "$as_me: error: pwd does not report name of working directory" >&2
1172 { (exit 1); exit 1; }; }
1173
1174
708# Find the source files, if location was not specified. 1175# Find the source files, if location was not specified.
709if test -z "$srcdir"; then 1176if test -z "$srcdir"; then
710 ac_srcdir_defaulted=yes 1177 ac_srcdir_defaulted=yes
711 # Try the directory containing this script, then its parent. 1178 # Try the directory containing this script, then the parent directory.
712 ac_confdir=`(dirname "$0") 2>/dev/null || 1179 ac_confdir=`$as_dirname -- "$0" ||
713$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 1180$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
714 X"$0" : 'X\(//\)[^/]' \| \ 1181 X"$0" : 'X\(//\)[^/]' \| \
715 X"$0" : 'X\(//\)$' \| \ 1182 X"$0" : 'X\(//\)$' \| \
716 X"$0" : 'X\(/\)' \| \ 1183 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
717 . : '\(.\)' 2>/dev/null ||
718echo X"$0" | 1184echo X"$0" |
719 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } 1185 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
720 /^X\(\/\/\)[^/].*/{ s//\1/; q; } 1186 s//\1/
721 /^X\(\/\/\)$/{ s//\1/; q; } 1187 q
722 /^X\(\/\).*/{ s//\1/; q; } 1188 }
723 s/.*/./; q'` 1189 /^X\(\/\/\)[^/].*/{
1190 s//\1/
1191 q
1192 }
1193 /^X\(\/\/\)$/{
1194 s//\1/
1195 q
1196 }
1197 /^X\(\/\).*/{
1198 s//\1/
1199 q
1200 }
1201 s/.*/./; q'`
724 srcdir=$ac_confdir 1202 srcdir=$ac_confdir
725 if test ! -r $srcdir/$ac_unique_file; then 1203 if test ! -r "$srcdir/$ac_unique_file"; then
726 srcdir=.. 1204 srcdir=..
727 fi 1205 fi
728else 1206else
729 ac_srcdir_defaulted=no 1207 ac_srcdir_defaulted=no
730fi 1208fi
731if test ! -r $srcdir/$ac_unique_file; then 1209if test ! -r "$srcdir/$ac_unique_file"; then
732 if test "$ac_srcdir_defaulted" = yes; then 1210 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 1211 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734 { (exit 1); exit 1; }; }
735 else
736 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
737 { (exit 1); exit 1; }; } 1212 { (exit 1); exit 1; }; }
738 fi
739fi 1213fi
740(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || 1214ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
741 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 1215ac_abs_confdir=`(
1216 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
742 { (exit 1); exit 1; }; } 1217 { (exit 1); exit 1; }; }
743srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` 1218 pwd)`
744ac_env_build_alias_set=${build_alias+set} 1219# When building in place, set srcdir=.
745ac_env_build_alias_value=$build_alias 1220if test "$ac_abs_confdir" = "$ac_pwd"; then
746ac_cv_env_build_alias_set=${build_alias+set} 1221 srcdir=.
747ac_cv_env_build_alias_value=$build_alias 1222fi
748ac_env_host_alias_set=${host_alias+set} 1223# Remove unnecessary trailing slashes from srcdir.
749ac_env_host_alias_value=$host_alias 1224# Double slashes in file names in object file debugging info
750ac_cv_env_host_alias_set=${host_alias+set} 1225# mess up M-x gdb in Emacs.
751ac_cv_env_host_alias_value=$host_alias 1226case $srcdir in
752ac_env_target_alias_set=${target_alias+set} 1227*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
753ac_env_target_alias_value=$target_alias 1228esac
754ac_cv_env_target_alias_set=${target_alias+set} 1229for ac_var in $ac_precious_vars; do
755ac_cv_env_target_alias_value=$target_alias 1230 eval ac_env_${ac_var}_set=\${${ac_var}+set}
756ac_env_CC_set=${CC+set} 1231 eval ac_env_${ac_var}_value=\$${ac_var}
757ac_env_CC_value=$CC 1232 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
758ac_cv_env_CC_set=${CC+set} 1233 eval ac_cv_env_${ac_var}_value=\$${ac_var}
759ac_cv_env_CC_value=$CC 1234done
760ac_env_CFLAGS_set=${CFLAGS+set}
761ac_env_CFLAGS_value=$CFLAGS
762ac_cv_env_CFLAGS_set=${CFLAGS+set}
763ac_cv_env_CFLAGS_value=$CFLAGS
764ac_env_LDFLAGS_set=${LDFLAGS+set}
765ac_env_LDFLAGS_value=$LDFLAGS
766ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
767ac_cv_env_LDFLAGS_value=$LDFLAGS
768ac_env_CPPFLAGS_set=${CPPFLAGS+set}
769ac_env_CPPFLAGS_value=$CPPFLAGS
770ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
771ac_cv_env_CPPFLAGS_value=$CPPFLAGS
772ac_env_CPP_set=${CPP+set}
773ac_env_CPP_value=$CPP
774ac_cv_env_CPP_set=${CPP+set}
775ac_cv_env_CPP_value=$CPP
776 1235
777# 1236#
778# Report the --help message. 1237# Report the --help message.
@@ -801,9 +1260,6 @@ Configuration:
801 -n, --no-create do not create output files 1260 -n, --no-create do not create output files
802 --srcdir=DIR find the sources in DIR [configure dir or \`..'] 1261 --srcdir=DIR find the sources in DIR [configure dir or \`..']
803 1262
804_ACEOF
805
806 cat <<_ACEOF
807Installation directories: 1263Installation directories:
808 --prefix=PREFIX install architecture-independent files in PREFIX 1264 --prefix=PREFIX install architecture-independent files in PREFIX
809 [$ac_default_prefix] 1265 [$ac_default_prefix]
@@ -821,15 +1277,22 @@ Fine tuning of the installation directories:
821 --bindir=DIR user executables [EPREFIX/bin] 1277 --bindir=DIR user executables [EPREFIX/bin]
822 --sbindir=DIR system admin executables [EPREFIX/sbin] 1278 --sbindir=DIR system admin executables [EPREFIX/sbin]
823 --libexecdir=DIR program executables [EPREFIX/libexec] 1279 --libexecdir=DIR program executables [EPREFIX/libexec]
824 --datadir=DIR read-only architecture-independent data [PREFIX/share]
825 --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 1280 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
826 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 1281 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
827 --localstatedir=DIR modifiable single-machine data [PREFIX/var] 1282 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
828 --libdir=DIR object code libraries [EPREFIX/lib] 1283 --libdir=DIR object code libraries [EPREFIX/lib]
829 --includedir=DIR C header files [PREFIX/include] 1284 --includedir=DIR C header files [PREFIX/include]
830 --oldincludedir=DIR C header files for non-gcc [/usr/include] 1285 --oldincludedir=DIR C header files for non-gcc [/usr/include]
831 --infodir=DIR info documentation [PREFIX/info] 1286 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
832 --mandir=DIR man documentation [PREFIX/man] 1287 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1288 --infodir=DIR info documentation [DATAROOTDIR/info]
1289 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1290 --mandir=DIR man documentation [DATAROOTDIR/man]
1291 --docdir=DIR documentation root [DATAROOTDIR/doc/openssh]
1292 --htmldir=DIR html documentation [DOCDIR]
1293 --dvidir=DIR dvi documentation [DOCDIR]
1294 --pdfdir=DIR pdf documentation [DOCDIR]
1295 --psdir=DIR ps documentation [DOCDIR]
833_ACEOF 1296_ACEOF
834 1297
835 cat <<\_ACEOF 1298 cat <<\_ACEOF
@@ -865,20 +1328,23 @@ Optional Packages:
865 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 1328 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
866 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 1329 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
867 --without-rpath Disable auto-added -R linker paths 1330 --without-rpath Disable auto-added -R linker paths
868 --with-osfsia Enable Digital Unix SIA
869 --with-cflags Specify additional flags to pass to compiler 1331 --with-cflags Specify additional flags to pass to compiler
870 --with-cppflags Specify additional flags to pass to preprocessor 1332 --with-cppflags Specify additional flags to pass to preprocessor
871 --with-ldflags Specify additional flags to pass to linker 1333 --with-ldflags Specify additional flags to pass to linker
872 --with-libs Specify additional libraries to link with 1334 --with-libs Specify additional libraries to link with
873 --with-Werror Build main code with -Werror 1335 --with-Werror Build main code with -Werror
1336 --with-solaris-contracts Enable Solaris process contracts (experimental)
1337 --with-osfsia Enable Digital Unix SIA
874 --with-zlib=PATH Use zlib in PATH 1338 --with-zlib=PATH Use zlib in PATH
875 --without-zlib-version-check Disable zlib version check 1339 --without-zlib-version-check Disable zlib version check
876 --with-skey[=PATH] Enable S/Key support (optionally in PATH) 1340 --with-skey[=PATH] Enable S/Key support (optionally in PATH)
877 --with-tcp-wrappers[=PATH] Enable tcpwrappers support (optionally in PATH) 1341 --with-tcp-wrappers[=PATH] Enable tcpwrappers support (optionally in PATH)
878 --with-libedit[=PATH] Enable libedit support for sftp 1342 --with-libedit[=PATH] Enable libedit support for sftp
879 --with-audit=module Enable EXPERIMENTAL audit support (modules=debug,bsm) 1343 --with-audit=module Enable EXPERIMENTAL audit support (modules=debug,bsm)
880 --with-pam Enable PAM support
881 --with-ssl-dir=PATH Specify path to OpenSSL installation 1344 --with-ssl-dir=PATH Specify path to OpenSSL installation
1345 --without-openssl-header-check Disable OpenSSL version consistency check
1346 --with-ssl-engine Enable OpenSSL (hardware) ENGINE support
1347 --with-pam Enable PAM support
882 --with-rand-helper Use subprocess to gather strong randomness 1348 --with-rand-helper Use subprocess to gather strong randomness
883 --with-prngd-port=PORT read entropy from PRNGD/EGD TCP localhost:PORT 1349 --with-prngd-port=PORT read entropy from PRNGD/EGD TCP localhost:PORT
884 --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool) 1350 --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)
@@ -886,6 +1352,7 @@ Optional Packages:
886 --with-privsep-user=user Specify non-privileged user for privilege separation 1352 --with-privsep-user=user Specify non-privileged user for privilege separation
887 --with-sectok Enable smartcard support using libsectok 1353 --with-sectok Enable smartcard support using libsectok
888 --with-opensc[=PFX] Enable smartcard support using OpenSC (optionally in PATH) 1354 --with-opensc[=PFX] Enable smartcard support using OpenSC (optionally in PATH)
1355 --with-selinux Enable SELinux support
889 --with-kerberos5=PATH Enable Kerberos 5 support 1356 --with-kerberos5=PATH Enable Kerberos 5 support
890 --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty) 1357 --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)
891 --with-xauth=PATH Specify path to xauth program 1358 --with-xauth=PATH Specify path to xauth program
@@ -905,8 +1372,9 @@ Some influential environment variables:
905 CFLAGS C compiler flags 1372 CFLAGS C compiler flags
906 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a 1373 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
907 nonstandard directory <lib dir> 1374 nonstandard directory <lib dir>
908 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have 1375 LIBS libraries to pass to the linker, e.g. -l<library>
909 headers in a nonstandard directory <include dir> 1376 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1377 you have headers in a nonstandard directory <include dir>
910 CPP C preprocessor 1378 CPP C preprocessor
911 1379
912Use these variables to override the choices made by `configure' or to help 1380Use these variables to override the choices made by `configure' or to help
@@ -914,120 +1382,86 @@ it to find libraries and programs with nonstandard names/locations.
914 1382
915Report bugs to <openssh-unix-dev@mindrot.org>. 1383Report bugs to <openssh-unix-dev@mindrot.org>.
916_ACEOF 1384_ACEOF
1385ac_status=$?
917fi 1386fi
918 1387
919if test "$ac_init_help" = "recursive"; then 1388if test "$ac_init_help" = "recursive"; then
920 # If there are subdirs, report their specific --help. 1389 # If there are subdirs, report their specific --help.
921 ac_popdir=`pwd`
922 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue 1390 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
923 test -d $ac_dir || continue 1391 test -d "$ac_dir" || continue
924 ac_builddir=. 1392 ac_builddir=.
925 1393
926if test "$ac_dir" != .; then 1394case "$ac_dir" in
1395.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1396*)
927 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` 1397 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
928 # A "../" for each directory in $ac_dir_suffix. 1398 # A ".." for each directory in $ac_dir_suffix.
929 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` 1399 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
930else 1400 case $ac_top_builddir_sub in
931 ac_dir_suffix= ac_top_builddir= 1401 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
932fi 1402 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1403 esac ;;
1404esac
1405ac_abs_top_builddir=$ac_pwd
1406ac_abs_builddir=$ac_pwd$ac_dir_suffix
1407# for backward compatibility:
1408ac_top_builddir=$ac_top_build_prefix
933 1409
934case $srcdir in 1410case $srcdir in
935 .) # No --srcdir option. We are building in place. 1411 .) # We are building in place.
936 ac_srcdir=. 1412 ac_srcdir=.
937 if test -z "$ac_top_builddir"; then 1413 ac_top_srcdir=$ac_top_builddir_sub
938 ac_top_srcdir=. 1414 ac_abs_top_srcdir=$ac_pwd ;;
939 else 1415 [\\/]* | ?:[\\/]* ) # Absolute name.
940 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
941 fi ;;
942 [\\/]* | ?:[\\/]* ) # Absolute path.
943 ac_srcdir=$srcdir$ac_dir_suffix; 1416 ac_srcdir=$srcdir$ac_dir_suffix;
944 ac_top_srcdir=$srcdir ;; 1417 ac_top_srcdir=$srcdir
945 *) # Relative path. 1418 ac_abs_top_srcdir=$srcdir ;;
946 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix 1419 *) # Relative name.
947 ac_top_srcdir=$ac_top_builddir$srcdir ;; 1420 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1421 ac_top_srcdir=$ac_top_build_prefix$srcdir
1422 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
948esac 1423esac
949 1424ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
950# Do not use `cd foo && pwd` to compute absolute paths, because 1425
951# the directories may not exist. 1426 cd "$ac_dir" || { ac_status=$?; continue; }
952case `pwd` in 1427 # Check for guested configure.
953.) ac_abs_builddir="$ac_dir";; 1428 if test -f "$ac_srcdir/configure.gnu"; then
954*) 1429 echo &&
955 case "$ac_dir" in 1430 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
956 .) ac_abs_builddir=`pwd`;; 1431 elif test -f "$ac_srcdir/configure"; then
957 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; 1432 echo &&
958 *) ac_abs_builddir=`pwd`/"$ac_dir";; 1433 $SHELL "$ac_srcdir/configure" --help=recursive
959 esac;;
960esac
961case $ac_abs_builddir in
962.) ac_abs_top_builddir=${ac_top_builddir}.;;
963*)
964 case ${ac_top_builddir}. in
965 .) ac_abs_top_builddir=$ac_abs_builddir;;
966 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
967 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
968 esac;;
969esac
970case $ac_abs_builddir in
971.) ac_abs_srcdir=$ac_srcdir;;
972*)
973 case $ac_srcdir in
974 .) ac_abs_srcdir=$ac_abs_builddir;;
975 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
976 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
977 esac;;
978esac
979case $ac_abs_builddir in
980.) ac_abs_top_srcdir=$ac_top_srcdir;;
981*)
982 case $ac_top_srcdir in
983 .) ac_abs_top_srcdir=$ac_abs_builddir;;
984 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
985 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
986 esac;;
987esac
988
989 cd $ac_dir
990 # Check for guested configure; otherwise get Cygnus style configure.
991 if test -f $ac_srcdir/configure.gnu; then
992 echo
993 $SHELL $ac_srcdir/configure.gnu --help=recursive
994 elif test -f $ac_srcdir/configure; then
995 echo
996 $SHELL $ac_srcdir/configure --help=recursive
997 elif test -f $ac_srcdir/configure.ac ||
998 test -f $ac_srcdir/configure.in; then
999 echo
1000 $ac_configure --help
1001 else 1434 else
1002 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 1435 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1003 fi 1436 fi || ac_status=$?
1004 cd $ac_popdir 1437 cd "$ac_pwd" || { ac_status=$?; break; }
1005 done 1438 done
1006fi 1439fi
1007 1440
1008test -n "$ac_init_help" && exit 0 1441test -n "$ac_init_help" && exit $ac_status
1009if $ac_init_version; then 1442if $ac_init_version; then
1010 cat <<\_ACEOF 1443 cat <<\_ACEOF
1011OpenSSH configure Portable 1444OpenSSH configure Portable
1012generated by GNU Autoconf 2.59 1445generated by GNU Autoconf 2.61
1013 1446
1014Copyright (C) 2003 Free Software Foundation, Inc. 1447Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14482002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1015This configure script is free software; the Free Software Foundation 1449This configure script is free software; the Free Software Foundation
1016gives unlimited permission to copy, distribute and modify it. 1450gives unlimited permission to copy, distribute and modify it.
1017_ACEOF 1451_ACEOF
1018 exit 0 1452 exit
1019fi 1453fi
1020exec 5>config.log 1454cat >config.log <<_ACEOF
1021cat >&5 <<_ACEOF
1022This file contains any messages produced by compilers while 1455This file contains any messages produced by compilers while
1023running configure, to aid debugging if configure makes a mistake. 1456running configure, to aid debugging if configure makes a mistake.
1024 1457
1025It was created by OpenSSH $as_me Portable, which was 1458It was created by OpenSSH $as_me Portable, which was
1026generated by GNU Autoconf 2.59. Invocation command line was 1459generated by GNU Autoconf 2.61. Invocation command line was
1027 1460
1028 $ $0 $@ 1461 $ $0 $@
1029 1462
1030_ACEOF 1463_ACEOF
1464exec 5>>config.log
1031{ 1465{
1032cat <<_ASUNAME 1466cat <<_ASUNAME
1033## --------- ## 1467## --------- ##
@@ -1046,7 +1480,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown`
1046/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` 1480/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1047/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` 1481/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1048/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` 1482/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1049hostinfo = `(hostinfo) 2>/dev/null || echo unknown` 1483/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1050/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` 1484/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1051/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` 1485/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1052/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` 1486/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
@@ -1060,6 +1494,7 @@ do
1060 test -z "$as_dir" && as_dir=. 1494 test -z "$as_dir" && as_dir=.
1061 echo "PATH: $as_dir" 1495 echo "PATH: $as_dir"
1062done 1496done
1497IFS=$as_save_IFS
1063 1498
1064} >&5 1499} >&5
1065 1500
@@ -1081,7 +1516,6 @@ _ACEOF
1081ac_configure_args= 1516ac_configure_args=
1082ac_configure_args0= 1517ac_configure_args0=
1083ac_configure_args1= 1518ac_configure_args1=
1084ac_sep=
1085ac_must_keep_next=false 1519ac_must_keep_next=false
1086for ac_pass in 1 2 1520for ac_pass in 1 2
1087do 1521do
@@ -1092,7 +1526,7 @@ do
1092 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 1526 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1093 | -silent | --silent | --silen | --sile | --sil) 1527 | -silent | --silent | --silen | --sile | --sil)
1094 continue ;; 1528 continue ;;
1095 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) 1529 *\'*)
1096 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 1530 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1097 esac 1531 esac
1098 case $ac_pass in 1532 case $ac_pass in
@@ -1114,9 +1548,7 @@ do
1114 -* ) ac_must_keep_next=true ;; 1548 -* ) ac_must_keep_next=true ;;
1115 esac 1549 esac
1116 fi 1550 fi
1117 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" 1551 ac_configure_args="$ac_configure_args '$ac_arg'"
1118 # Get rid of the leading space.
1119 ac_sep=" "
1120 ;; 1552 ;;
1121 esac 1553 esac
1122 done 1554 done
@@ -1127,8 +1559,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_
1127# When interrupted or exit'd, cleanup temporary files, and complete 1559# When interrupted or exit'd, cleanup temporary files, and complete
1128# config.log. We remove comments because anyway the quotes in there 1560# config.log. We remove comments because anyway the quotes in there
1129# would cause problems or look ugly. 1561# would cause problems or look ugly.
1130# WARNING: Be sure not to use single quotes in there, as some shells, 1562# WARNING: Use '\'' to represent an apostrophe within the trap.
1131# such as our DU 5.0 friend, will then `close' the trap. 1563# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1132trap 'exit_status=$? 1564trap 'exit_status=$?
1133 # Save into config.log some information that might help in debugging. 1565 # Save into config.log some information that might help in debugging.
1134 { 1566 {
@@ -1141,20 +1573,34 @@ trap 'exit_status=$?
1141_ASBOX 1573_ASBOX
1142 echo 1574 echo
1143 # The following way of writing the cache mishandles newlines in values, 1575 # The following way of writing the cache mishandles newlines in values,
1144{ 1576(
1577 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1578 eval ac_val=\$$ac_var
1579 case $ac_val in #(
1580 *${as_nl}*)
1581 case $ac_var in #(
1582 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1583echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1584 esac
1585 case $ac_var in #(
1586 _ | IFS | as_nl) ;; #(
1587 *) $as_unset $ac_var ;;
1588 esac ;;
1589 esac
1590 done
1145 (set) 2>&1 | 1591 (set) 2>&1 |
1146 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in 1592 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1147 *ac_space=\ *) 1593 *${as_nl}ac_space=\ *)
1148 sed -n \ 1594 sed -n \
1149 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; 1595 "s/'\''/'\''\\\\'\'''\''/g;
1150 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" 1596 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1151 ;; 1597 ;; #(
1152 *) 1598 *)
1153 sed -n \ 1599 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1154 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1155 ;; 1600 ;;
1156 esac; 1601 esac |
1157} 1602 sort
1603)
1158 echo 1604 echo
1159 1605
1160 cat <<\_ASBOX 1606 cat <<\_ASBOX
@@ -1165,22 +1611,28 @@ _ASBOX
1165 echo 1611 echo
1166 for ac_var in $ac_subst_vars 1612 for ac_var in $ac_subst_vars
1167 do 1613 do
1168 eval ac_val=$`echo $ac_var` 1614 eval ac_val=\$$ac_var
1169 echo "$ac_var='"'"'$ac_val'"'"'" 1615 case $ac_val in
1616 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1617 esac
1618 echo "$ac_var='\''$ac_val'\''"
1170 done | sort 1619 done | sort
1171 echo 1620 echo
1172 1621
1173 if test -n "$ac_subst_files"; then 1622 if test -n "$ac_subst_files"; then
1174 cat <<\_ASBOX 1623 cat <<\_ASBOX
1175## ------------- ## 1624## ------------------- ##
1176## Output files. ## 1625## File substitutions. ##
1177## ------------- ## 1626## ------------------- ##
1178_ASBOX 1627_ASBOX
1179 echo 1628 echo
1180 for ac_var in $ac_subst_files 1629 for ac_var in $ac_subst_files
1181 do 1630 do
1182 eval ac_val=$`echo $ac_var` 1631 eval ac_val=\$$ac_var
1183 echo "$ac_var='"'"'$ac_val'"'"'" 1632 case $ac_val in
1633 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1634 esac
1635 echo "$ac_var='\''$ac_val'\''"
1184 done | sort 1636 done | sort
1185 echo 1637 echo
1186 fi 1638 fi
@@ -1192,26 +1644,24 @@ _ASBOX
1192## ----------- ## 1644## ----------- ##
1193_ASBOX 1645_ASBOX
1194 echo 1646 echo
1195 sed "/^$/d" confdefs.h | sort 1647 cat confdefs.h
1196 echo 1648 echo
1197 fi 1649 fi
1198 test "$ac_signal" != 0 && 1650 test "$ac_signal" != 0 &&
1199 echo "$as_me: caught signal $ac_signal" 1651 echo "$as_me: caught signal $ac_signal"
1200 echo "$as_me: exit $exit_status" 1652 echo "$as_me: exit $exit_status"
1201 } >&5 1653 } >&5
1202 rm -f core *.core && 1654 rm -f core *.core core.conftest.* &&
1203 rm -rf conftest* confdefs* conf$$* $ac_clean_files && 1655 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1204 exit $exit_status 1656 exit $exit_status
1205 ' 0 1657' 0
1206for ac_signal in 1 2 13 15; do 1658for ac_signal in 1 2 13 15; do
1207 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal 1659 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1208done 1660done
1209ac_signal=0 1661ac_signal=0
1210 1662
1211# confdefs.h avoids OS command line length limits that DEFS can exceed. 1663# confdefs.h avoids OS command line length limits that DEFS can exceed.
1212rm -rf conftest* confdefs.h 1664rm -f -r conftest* confdefs.h
1213# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1214echo >confdefs.h
1215 1665
1216# Predefined preprocessor variables. 1666# Predefined preprocessor variables.
1217 1667
@@ -1242,14 +1692,17 @@ _ACEOF
1242 1692
1243# Let the site file select an alternate cache file if it wants to. 1693# Let the site file select an alternate cache file if it wants to.
1244# Prefer explicitly selected file to automatically selected ones. 1694# Prefer explicitly selected file to automatically selected ones.
1245if test -z "$CONFIG_SITE"; then 1695if test -n "$CONFIG_SITE"; then
1246 if test "x$prefix" != xNONE; then 1696 set x "$CONFIG_SITE"
1247 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" 1697elif test "x$prefix" != xNONE; then
1248 else 1698 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1249 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" 1699else
1250 fi 1700 set x "$ac_default_prefix/share/config.site" \
1701 "$ac_default_prefix/etc/config.site"
1251fi 1702fi
1252for ac_site_file in $CONFIG_SITE; do 1703shift
1704for ac_site_file
1705do
1253 if test -r "$ac_site_file"; then 1706 if test -r "$ac_site_file"; then
1254 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 1707 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1255echo "$as_me: loading site script $ac_site_file" >&6;} 1708echo "$as_me: loading site script $ac_site_file" >&6;}
@@ -1265,8 +1718,8 @@ if test -r "$cache_file"; then
1265 { echo "$as_me:$LINENO: loading cache $cache_file" >&5 1718 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1266echo "$as_me: loading cache $cache_file" >&6;} 1719echo "$as_me: loading cache $cache_file" >&6;}
1267 case $cache_file in 1720 case $cache_file in
1268 [\\/]* | ?:[\\/]* ) . $cache_file;; 1721 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1269 *) . ./$cache_file;; 1722 *) . "./$cache_file";;
1270 esac 1723 esac
1271 fi 1724 fi
1272else 1725else
@@ -1278,12 +1731,11 @@ fi
1278# Check that the precious variables saved in the cache have kept the same 1731# Check that the precious variables saved in the cache have kept the same
1279# value. 1732# value.
1280ac_cache_corrupted=false 1733ac_cache_corrupted=false
1281for ac_var in `(set) 2>&1 | 1734for ac_var in $ac_precious_vars; do
1282 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1283 eval ac_old_set=\$ac_cv_env_${ac_var}_set 1735 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1284 eval ac_new_set=\$ac_env_${ac_var}_set 1736 eval ac_new_set=\$ac_env_${ac_var}_set
1285 eval ac_old_val="\$ac_cv_env_${ac_var}_value" 1737 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1286 eval ac_new_val="\$ac_env_${ac_var}_value" 1738 eval ac_new_val=\$ac_env_${ac_var}_value
1287 case $ac_old_set,$ac_new_set in 1739 case $ac_old_set,$ac_new_set in
1288 set,) 1740 set,)
1289 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 1741 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
@@ -1308,8 +1760,7 @@ echo "$as_me: current value: $ac_new_val" >&2;}
1308 # Pass precious variables to config.status. 1760 # Pass precious variables to config.status.
1309 if test "$ac_new_set" = set; then 1761 if test "$ac_new_set" = set; then
1310 case $ac_new_val in 1762 case $ac_new_val in
1311 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) 1763 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1312 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1313 *) ac_arg=$ac_var=$ac_new_val ;; 1764 *) ac_arg=$ac_var=$ac_new_val ;;
1314 esac 1765 esac
1315 case " $ac_configure_args " in 1766 case " $ac_configure_args " in
@@ -1326,12 +1777,6 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov
1326 { (exit 1); exit 1; }; } 1777 { (exit 1); exit 1; }; }
1327fi 1778fi
1328 1779
1329ac_ext=c
1330ac_cpp='$CPP $CPPFLAGS'
1331ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1332ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1333ac_compiler_gnu=$ac_cv_c_compiler_gnu
1334
1335 1780
1336 1781
1337 1782
@@ -1356,12 +1801,17 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
1356 1801
1357 1802
1358 1803
1804ac_ext=c
1805ac_cpp='$CPP $CPPFLAGS'
1806ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1807ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1808ac_compiler_gnu=$ac_cv_c_compiler_gnu
1359 1809
1360 1810
1361 1811
1362 1812
1363 1813
1364 ac_config_headers="$ac_config_headers config.h" 1814ac_config_headers="$ac_config_headers config.h"
1365 1815
1366ac_ext=c 1816ac_ext=c
1367ac_cpp='$CPP $CPPFLAGS' 1817ac_cpp='$CPP $CPPFLAGS'
@@ -1371,8 +1821,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
1371if test -n "$ac_tool_prefix"; then 1821if test -n "$ac_tool_prefix"; then
1372 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. 1822 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1373set dummy ${ac_tool_prefix}gcc; ac_word=$2 1823set dummy ${ac_tool_prefix}gcc; ac_word=$2
1374echo "$as_me:$LINENO: checking for $ac_word" >&5 1824{ echo "$as_me:$LINENO: checking for $ac_word" >&5
1375echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 1825echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1376if test "${ac_cv_prog_CC+set}" = set; then 1826if test "${ac_cv_prog_CC+set}" = set; then
1377 echo $ECHO_N "(cached) $ECHO_C" >&6 1827 echo $ECHO_N "(cached) $ECHO_C" >&6
1378else 1828else
@@ -1385,32 +1835,34 @@ do
1385 IFS=$as_save_IFS 1835 IFS=$as_save_IFS
1386 test -z "$as_dir" && as_dir=. 1836 test -z "$as_dir" && as_dir=.
1387 for ac_exec_ext in '' $ac_executable_extensions; do 1837 for ac_exec_ext in '' $ac_executable_extensions; do
1388 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 1838 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1389 ac_cv_prog_CC="${ac_tool_prefix}gcc" 1839 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1390 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 1840 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1391 break 2 1841 break 2
1392 fi 1842 fi
1393done 1843done
1394done 1844done
1845IFS=$as_save_IFS
1395 1846
1396fi 1847fi
1397fi 1848fi
1398CC=$ac_cv_prog_CC 1849CC=$ac_cv_prog_CC
1399if test -n "$CC"; then 1850if test -n "$CC"; then
1400 echo "$as_me:$LINENO: result: $CC" >&5 1851 { echo "$as_me:$LINENO: result: $CC" >&5
1401echo "${ECHO_T}$CC" >&6 1852echo "${ECHO_T}$CC" >&6; }
1402else 1853else
1403 echo "$as_me:$LINENO: result: no" >&5 1854 { echo "$as_me:$LINENO: result: no" >&5
1404echo "${ECHO_T}no" >&6 1855echo "${ECHO_T}no" >&6; }
1405fi 1856fi
1406 1857
1858
1407fi 1859fi
1408if test -z "$ac_cv_prog_CC"; then 1860if test -z "$ac_cv_prog_CC"; then
1409 ac_ct_CC=$CC 1861 ac_ct_CC=$CC
1410 # Extract the first word of "gcc", so it can be a program name with args. 1862 # Extract the first word of "gcc", so it can be a program name with args.
1411set dummy gcc; ac_word=$2 1863set dummy gcc; ac_word=$2
1412echo "$as_me:$LINENO: checking for $ac_word" >&5 1864{ echo "$as_me:$LINENO: checking for $ac_word" >&5
1413echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 1865echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1414if test "${ac_cv_prog_ac_ct_CC+set}" = set; then 1866if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1415 echo $ECHO_N "(cached) $ECHO_C" >&6 1867 echo $ECHO_N "(cached) $ECHO_C" >&6
1416else 1868else
@@ -1423,36 +1875,51 @@ do
1423 IFS=$as_save_IFS 1875 IFS=$as_save_IFS
1424 test -z "$as_dir" && as_dir=. 1876 test -z "$as_dir" && as_dir=.
1425 for ac_exec_ext in '' $ac_executable_extensions; do 1877 for ac_exec_ext in '' $ac_executable_extensions; do
1426 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 1878 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1427 ac_cv_prog_ac_ct_CC="gcc" 1879 ac_cv_prog_ac_ct_CC="gcc"
1428 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 1880 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1429 break 2 1881 break 2
1430 fi 1882 fi
1431done 1883done
1432done 1884done
1885IFS=$as_save_IFS
1433 1886
1434fi 1887fi
1435fi 1888fi
1436ac_ct_CC=$ac_cv_prog_ac_ct_CC 1889ac_ct_CC=$ac_cv_prog_ac_ct_CC
1437if test -n "$ac_ct_CC"; then 1890if test -n "$ac_ct_CC"; then
1438 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 1891 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1439echo "${ECHO_T}$ac_ct_CC" >&6 1892echo "${ECHO_T}$ac_ct_CC" >&6; }
1440else 1893else
1441 echo "$as_me:$LINENO: result: no" >&5 1894 { echo "$as_me:$LINENO: result: no" >&5
1442echo "${ECHO_T}no" >&6 1895echo "${ECHO_T}no" >&6; }
1443fi 1896fi
1444 1897
1445 CC=$ac_ct_CC 1898 if test "x$ac_ct_CC" = x; then
1899 CC=""
1900 else
1901 case $cross_compiling:$ac_tool_warned in
1902yes:)
1903{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
1904whose name does not start with the host triplet. If you think this
1905configuration is useful to you, please write to autoconf@gnu.org." >&5
1906echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
1907whose name does not start with the host triplet. If you think this
1908configuration is useful to you, please write to autoconf@gnu.org." >&2;}
1909ac_tool_warned=yes ;;
1910esac
1911 CC=$ac_ct_CC
1912 fi
1446else 1913else
1447 CC="$ac_cv_prog_CC" 1914 CC="$ac_cv_prog_CC"
1448fi 1915fi
1449 1916
1450if test -z "$CC"; then 1917if test -z "$CC"; then
1451 if test -n "$ac_tool_prefix"; then 1918 if test -n "$ac_tool_prefix"; then
1452 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. 1919 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1453set dummy ${ac_tool_prefix}cc; ac_word=$2 1920set dummy ${ac_tool_prefix}cc; ac_word=$2
1454echo "$as_me:$LINENO: checking for $ac_word" >&5 1921{ echo "$as_me:$LINENO: checking for $ac_word" >&5
1455echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 1922echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1456if test "${ac_cv_prog_CC+set}" = set; then 1923if test "${ac_cv_prog_CC+set}" = set; then
1457 echo $ECHO_N "(cached) $ECHO_C" >&6 1924 echo $ECHO_N "(cached) $ECHO_C" >&6
1458else 1925else
@@ -1465,74 +1932,34 @@ do
1465 IFS=$as_save_IFS 1932 IFS=$as_save_IFS
1466 test -z "$as_dir" && as_dir=. 1933 test -z "$as_dir" && as_dir=.
1467 for ac_exec_ext in '' $ac_executable_extensions; do 1934 for ac_exec_ext in '' $ac_executable_extensions; do
1468 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 1935 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1469 ac_cv_prog_CC="${ac_tool_prefix}cc" 1936 ac_cv_prog_CC="${ac_tool_prefix}cc"
1470 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 1937 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1471 break 2 1938 break 2
1472 fi 1939 fi
1473done 1940done
1474done 1941done
1942IFS=$as_save_IFS
1475 1943
1476fi 1944fi
1477fi 1945fi
1478CC=$ac_cv_prog_CC 1946CC=$ac_cv_prog_CC
1479if test -n "$CC"; then 1947if test -n "$CC"; then
1480 echo "$as_me:$LINENO: result: $CC" >&5 1948 { echo "$as_me:$LINENO: result: $CC" >&5
1481echo "${ECHO_T}$CC" >&6 1949echo "${ECHO_T}$CC" >&6; }
1482else 1950else
1483 echo "$as_me:$LINENO: result: no" >&5 1951 { echo "$as_me:$LINENO: result: no" >&5
1484echo "${ECHO_T}no" >&6 1952echo "${ECHO_T}no" >&6; }
1485fi 1953fi
1486 1954
1487fi
1488if test -z "$ac_cv_prog_CC"; then
1489 ac_ct_CC=$CC
1490 # Extract the first word of "cc", so it can be a program name with args.
1491set dummy cc; ac_word=$2
1492echo "$as_me:$LINENO: checking for $ac_word" >&5
1493echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1494if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1495 echo $ECHO_N "(cached) $ECHO_C" >&6
1496else
1497 if test -n "$ac_ct_CC"; then
1498 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1499else
1500as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1501for as_dir in $PATH
1502do
1503 IFS=$as_save_IFS
1504 test -z "$as_dir" && as_dir=.
1505 for ac_exec_ext in '' $ac_executable_extensions; do
1506 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1507 ac_cv_prog_ac_ct_CC="cc"
1508 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1509 break 2
1510 fi
1511done
1512done
1513
1514fi
1515fi
1516ac_ct_CC=$ac_cv_prog_ac_ct_CC
1517if test -n "$ac_ct_CC"; then
1518 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1519echo "${ECHO_T}$ac_ct_CC" >&6
1520else
1521 echo "$as_me:$LINENO: result: no" >&5
1522echo "${ECHO_T}no" >&6
1523fi
1524
1525 CC=$ac_ct_CC
1526else
1527 CC="$ac_cv_prog_CC"
1528fi
1529 1955
1956 fi
1530fi 1957fi
1531if test -z "$CC"; then 1958if test -z "$CC"; then
1532 # Extract the first word of "cc", so it can be a program name with args. 1959 # Extract the first word of "cc", so it can be a program name with args.
1533set dummy cc; ac_word=$2 1960set dummy cc; ac_word=$2
1534echo "$as_me:$LINENO: checking for $ac_word" >&5 1961{ echo "$as_me:$LINENO: checking for $ac_word" >&5
1535echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 1962echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1536if test "${ac_cv_prog_CC+set}" = set; then 1963if test "${ac_cv_prog_CC+set}" = set; then
1537 echo $ECHO_N "(cached) $ECHO_C" >&6 1964 echo $ECHO_N "(cached) $ECHO_C" >&6
1538else 1965else
@@ -1546,7 +1973,7 @@ do
1546 IFS=$as_save_IFS 1973 IFS=$as_save_IFS
1547 test -z "$as_dir" && as_dir=. 1974 test -z "$as_dir" && as_dir=.
1548 for ac_exec_ext in '' $ac_executable_extensions; do 1975 for ac_exec_ext in '' $ac_executable_extensions; do
1549 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 1976 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1550 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then 1977 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1551 ac_prog_rejected=yes 1978 ac_prog_rejected=yes
1552 continue 1979 continue
@@ -1557,6 +1984,7 @@ do
1557 fi 1984 fi
1558done 1985done
1559done 1986done
1987IFS=$as_save_IFS
1560 1988
1561if test $ac_prog_rejected = yes; then 1989if test $ac_prog_rejected = yes; then
1562 # We found a bogon in the path, so make sure we never use it. 1990 # We found a bogon in the path, so make sure we never use it.
@@ -1574,22 +2002,23 @@ fi
1574fi 2002fi
1575CC=$ac_cv_prog_CC 2003CC=$ac_cv_prog_CC
1576if test -n "$CC"; then 2004if test -n "$CC"; then
1577 echo "$as_me:$LINENO: result: $CC" >&5 2005 { echo "$as_me:$LINENO: result: $CC" >&5
1578echo "${ECHO_T}$CC" >&6 2006echo "${ECHO_T}$CC" >&6; }
1579else 2007else
1580 echo "$as_me:$LINENO: result: no" >&5 2008 { echo "$as_me:$LINENO: result: no" >&5
1581echo "${ECHO_T}no" >&6 2009echo "${ECHO_T}no" >&6; }
1582fi 2010fi
1583 2011
2012
1584fi 2013fi
1585if test -z "$CC"; then 2014if test -z "$CC"; then
1586 if test -n "$ac_tool_prefix"; then 2015 if test -n "$ac_tool_prefix"; then
1587 for ac_prog in cl 2016 for ac_prog in cl.exe
1588 do 2017 do
1589 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 2018 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1590set dummy $ac_tool_prefix$ac_prog; ac_word=$2 2019set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1591echo "$as_me:$LINENO: checking for $ac_word" >&5 2020{ echo "$as_me:$LINENO: checking for $ac_word" >&5
1592echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 2021echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1593if test "${ac_cv_prog_CC+set}" = set; then 2022if test "${ac_cv_prog_CC+set}" = set; then
1594 echo $ECHO_N "(cached) $ECHO_C" >&6 2023 echo $ECHO_N "(cached) $ECHO_C" >&6
1595else 2024else
@@ -1602,36 +2031,38 @@ do
1602 IFS=$as_save_IFS 2031 IFS=$as_save_IFS
1603 test -z "$as_dir" && as_dir=. 2032 test -z "$as_dir" && as_dir=.
1604 for ac_exec_ext in '' $ac_executable_extensions; do 2033 for ac_exec_ext in '' $ac_executable_extensions; do
1605 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2034 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1606 ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 2035 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1607 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2036 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1608 break 2 2037 break 2
1609 fi 2038 fi
1610done 2039done
1611done 2040done
2041IFS=$as_save_IFS
1612 2042
1613fi 2043fi
1614fi 2044fi
1615CC=$ac_cv_prog_CC 2045CC=$ac_cv_prog_CC
1616if test -n "$CC"; then 2046if test -n "$CC"; then
1617 echo "$as_me:$LINENO: result: $CC" >&5 2047 { echo "$as_me:$LINENO: result: $CC" >&5
1618echo "${ECHO_T}$CC" >&6 2048echo "${ECHO_T}$CC" >&6; }
1619else 2049else
1620 echo "$as_me:$LINENO: result: no" >&5 2050 { echo "$as_me:$LINENO: result: no" >&5
1621echo "${ECHO_T}no" >&6 2051echo "${ECHO_T}no" >&6; }
1622fi 2052fi
1623 2053
2054
1624 test -n "$CC" && break 2055 test -n "$CC" && break
1625 done 2056 done
1626fi 2057fi
1627if test -z "$CC"; then 2058if test -z "$CC"; then
1628 ac_ct_CC=$CC 2059 ac_ct_CC=$CC
1629 for ac_prog in cl 2060 for ac_prog in cl.exe
1630do 2061do
1631 # Extract the first word of "$ac_prog", so it can be a program name with args. 2062 # Extract the first word of "$ac_prog", so it can be a program name with args.
1632set dummy $ac_prog; ac_word=$2 2063set dummy $ac_prog; ac_word=$2
1633echo "$as_me:$LINENO: checking for $ac_word" >&5 2064{ echo "$as_me:$LINENO: checking for $ac_word" >&5
1634echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 2065echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1635if test "${ac_cv_prog_ac_ct_CC+set}" = set; then 2066if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1636 echo $ECHO_N "(cached) $ECHO_C" >&6 2067 echo $ECHO_N "(cached) $ECHO_C" >&6
1637else 2068else
@@ -1644,29 +2075,45 @@ do
1644 IFS=$as_save_IFS 2075 IFS=$as_save_IFS
1645 test -z "$as_dir" && as_dir=. 2076 test -z "$as_dir" && as_dir=.
1646 for ac_exec_ext in '' $ac_executable_extensions; do 2077 for ac_exec_ext in '' $ac_executable_extensions; do
1647 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2078 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1648 ac_cv_prog_ac_ct_CC="$ac_prog" 2079 ac_cv_prog_ac_ct_CC="$ac_prog"
1649 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2080 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1650 break 2 2081 break 2
1651 fi 2082 fi
1652done 2083done
1653done 2084done
2085IFS=$as_save_IFS
1654 2086
1655fi 2087fi
1656fi 2088fi
1657ac_ct_CC=$ac_cv_prog_ac_ct_CC 2089ac_ct_CC=$ac_cv_prog_ac_ct_CC
1658if test -n "$ac_ct_CC"; then 2090if test -n "$ac_ct_CC"; then
1659 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 2091 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1660echo "${ECHO_T}$ac_ct_CC" >&6 2092echo "${ECHO_T}$ac_ct_CC" >&6; }
1661else 2093else
1662 echo "$as_me:$LINENO: result: no" >&5 2094 { echo "$as_me:$LINENO: result: no" >&5
1663echo "${ECHO_T}no" >&6 2095echo "${ECHO_T}no" >&6; }
1664fi 2096fi
1665 2097
2098
1666 test -n "$ac_ct_CC" && break 2099 test -n "$ac_ct_CC" && break
1667done 2100done
1668 2101
1669 CC=$ac_ct_CC 2102 if test "x$ac_ct_CC" = x; then
2103 CC=""
2104 else
2105 case $cross_compiling:$ac_tool_warned in
2106yes:)
2107{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2108whose name does not start with the host triplet. If you think this
2109configuration is useful to you, please write to autoconf@gnu.org." >&5
2110echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2111whose name does not start with the host triplet. If you think this
2112configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2113ac_tool_warned=yes ;;
2114esac
2115 CC=$ac_ct_CC
2116 fi
1670fi 2117fi
1671 2118
1672fi 2119fi
@@ -1679,21 +2126,35 @@ See \`config.log' for more details." >&2;}
1679 { (exit 1); exit 1; }; } 2126 { (exit 1); exit 1; }; }
1680 2127
1681# Provide some information about the compiler. 2128# Provide some information about the compiler.
1682echo "$as_me:$LINENO:" \ 2129echo "$as_me:$LINENO: checking for C compiler version" >&5
1683 "checking for C compiler version" >&5
1684ac_compiler=`set X $ac_compile; echo $2` 2130ac_compiler=`set X $ac_compile; echo $2`
1685{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 2131{ (ac_try="$ac_compiler --version >&5"
1686 (eval $ac_compiler --version </dev/null >&5) 2>&5 2132case "(($ac_try" in
2133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2134 *) ac_try_echo=$ac_try;;
2135esac
2136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2137 (eval "$ac_compiler --version >&5") 2>&5
1687 ac_status=$? 2138 ac_status=$?
1688 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1689 (exit $ac_status); } 2140 (exit $ac_status); }
1690{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 2141{ (ac_try="$ac_compiler -v >&5"
1691 (eval $ac_compiler -v </dev/null >&5) 2>&5 2142case "(($ac_try" in
2143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2144 *) ac_try_echo=$ac_try;;
2145esac
2146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2147 (eval "$ac_compiler -v >&5") 2>&5
1692 ac_status=$? 2148 ac_status=$?
1693 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1694 (exit $ac_status); } 2150 (exit $ac_status); }
1695{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 2151{ (ac_try="$ac_compiler -V >&5"
1696 (eval $ac_compiler -V </dev/null >&5) 2>&5 2152case "(($ac_try" in
2153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2154 *) ac_try_echo=$ac_try;;
2155esac
2156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2157 (eval "$ac_compiler -V >&5") 2>&5
1697 ac_status=$? 2158 ac_status=$?
1698 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1699 (exit $ac_status); } 2160 (exit $ac_status); }
@@ -1718,47 +2179,77 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out"
1718# Try to create an executable without -o first, disregard a.out. 2179# Try to create an executable without -o first, disregard a.out.
1719# It will help us diagnose broken compilers, and finding out an intuition 2180# It will help us diagnose broken compilers, and finding out an intuition
1720# of exeext. 2181# of exeext.
1721echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 2182{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
1722echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 2183echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
1723ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` 2184ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1724if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 2185#
1725 (eval $ac_link_default) 2>&5 2186# List of possible output files, starting from the most likely.
2187# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2188# only as a last resort. b.out is created by i960 compilers.
2189ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2190#
2191# The IRIX 6 linker writes into existing files which may not be
2192# executable, retaining their permissions. Remove them first so a
2193# subsequent execution test works.
2194ac_rmfiles=
2195for ac_file in $ac_files
2196do
2197 case $ac_file in
2198 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2199 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2200 esac
2201done
2202rm -f $ac_rmfiles
2203
2204if { (ac_try="$ac_link_default"
2205case "(($ac_try" in
2206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2207 *) ac_try_echo=$ac_try;;
2208esac
2209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2210 (eval "$ac_link_default") 2>&5
1726 ac_status=$? 2211 ac_status=$?
1727 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1728 (exit $ac_status); }; then 2213 (exit $ac_status); }; then
1729 # Find the output, starting from the most likely. This scheme is 2214 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
1730# not robust to junk in `.', hence go to wildcards (a.*) only as a last 2215# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
1731# resort. 2216# in a Makefile. We should not override ac_cv_exeext if it was cached,
1732 2217# so that the user can short-circuit this test for compilers unknown to
1733# Be careful to initialize this variable, since it used to be cached. 2218# Autoconf.
1734# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. 2219for ac_file in $ac_files ''
1735ac_cv_exeext=
1736# b.out is created by i960 compilers.
1737for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1738do 2220do
1739 test -f "$ac_file" || continue 2221 test -f "$ac_file" || continue
1740 case $ac_file in 2222 case $ac_file in
1741 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) 2223 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
1742 ;;
1743 conftest.$ac_ext )
1744 # This is the source file.
1745 ;; 2224 ;;
1746 [ab].out ) 2225 [ab].out )
1747 # We found the default executable, but exeext='' is most 2226 # We found the default executable, but exeext='' is most
1748 # certainly right. 2227 # certainly right.
1749 break;; 2228 break;;
1750 *.* ) 2229 *.* )
1751 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 2230 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
1752 # FIXME: I believe we export ac_cv_exeext for Libtool, 2231 then :; else
1753 # but it would be cool to find out if it's true. Does anybody 2232 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1754 # maintain Libtool? --akim. 2233 fi
1755 export ac_cv_exeext 2234 # We set ac_cv_exeext here because the later test for it is not
2235 # safe: cross compilers may not add the suffix if given an `-o'
2236 # argument, so we may need to know it at that point already.
2237 # Even if this section looks crufty: it has the advantage of
2238 # actually working.
1756 break;; 2239 break;;
1757 * ) 2240 * )
1758 break;; 2241 break;;
1759 esac 2242 esac
1760done 2243done
2244test "$ac_cv_exeext" = no && ac_cv_exeext=
2245
1761else 2246else
2247 ac_file=''
2248fi
2249
2250{ echo "$as_me:$LINENO: result: $ac_file" >&5
2251echo "${ECHO_T}$ac_file" >&6; }
2252if test -z "$ac_file"; then
1762 echo "$as_me: failed program was:" >&5 2253 echo "$as_me: failed program was:" >&5
1763sed 's/^/| /' conftest.$ac_ext >&5 2254sed 's/^/| /' conftest.$ac_ext >&5
1764 2255
@@ -1770,19 +2261,21 @@ See \`config.log' for more details." >&2;}
1770fi 2261fi
1771 2262
1772ac_exeext=$ac_cv_exeext 2263ac_exeext=$ac_cv_exeext
1773echo "$as_me:$LINENO: result: $ac_file" >&5
1774echo "${ECHO_T}$ac_file" >&6
1775 2264
1776# Check the compiler produces executables we can run. If not, either 2265# Check that the compiler produces executables we can run. If not, either
1777# the compiler is broken, or we cross compile. 2266# the compiler is broken, or we cross compile.
1778echo "$as_me:$LINENO: checking whether the C compiler works" >&5 2267{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1779echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 2268echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
1780# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 2269# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1781# If not cross compiling, check that we can run a simple program. 2270# If not cross compiling, check that we can run a simple program.
1782if test "$cross_compiling" != yes; then 2271if test "$cross_compiling" != yes; then
1783 if { ac_try='./$ac_file' 2272 if { ac_try='./$ac_file'
1784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2273 { (case "(($ac_try" in
1785 (eval $ac_try) 2>&5 2274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2275 *) ac_try_echo=$ac_try;;
2276esac
2277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2278 (eval "$ac_try") 2>&5
1786 ac_status=$? 2279 ac_status=$?
1787 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1788 (exit $ac_status); }; }; then 2281 (exit $ac_status); }; }; then
@@ -1801,22 +2294,27 @@ See \`config.log' for more details." >&2;}
1801 fi 2294 fi
1802 fi 2295 fi
1803fi 2296fi
1804echo "$as_me:$LINENO: result: yes" >&5 2297{ echo "$as_me:$LINENO: result: yes" >&5
1805echo "${ECHO_T}yes" >&6 2298echo "${ECHO_T}yes" >&6; }
1806 2299
1807rm -f a.out a.exe conftest$ac_cv_exeext b.out 2300rm -f a.out a.exe conftest$ac_cv_exeext b.out
1808ac_clean_files=$ac_clean_files_save 2301ac_clean_files=$ac_clean_files_save
1809# Check the compiler produces executables we can run. If not, either 2302# Check that the compiler produces executables we can run. If not, either
1810# the compiler is broken, or we cross compile. 2303# the compiler is broken, or we cross compile.
1811echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 2304{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1812echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 2305echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
1813echo "$as_me:$LINENO: result: $cross_compiling" >&5 2306{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
1814echo "${ECHO_T}$cross_compiling" >&6 2307echo "${ECHO_T}$cross_compiling" >&6; }
1815 2308
1816echo "$as_me:$LINENO: checking for suffix of executables" >&5 2309{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
1817echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 2310echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
1818if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 2311if { (ac_try="$ac_link"
1819 (eval $ac_link) 2>&5 2312case "(($ac_try" in
2313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2314 *) ac_try_echo=$ac_try;;
2315esac
2316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2317 (eval "$ac_link") 2>&5
1820 ac_status=$? 2318 ac_status=$?
1821 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1822 (exit $ac_status); }; then 2320 (exit $ac_status); }; then
@@ -1827,9 +2325,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1827for ac_file in conftest.exe conftest conftest.*; do 2325for ac_file in conftest.exe conftest conftest.*; do
1828 test -f "$ac_file" || continue 2326 test -f "$ac_file" || continue
1829 case $ac_file in 2327 case $ac_file in
1830 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; 2328 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1831 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 2329 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1832 export ac_cv_exeext
1833 break;; 2330 break;;
1834 * ) break;; 2331 * ) break;;
1835 esac 2332 esac
@@ -1843,14 +2340,14 @@ See \`config.log' for more details." >&2;}
1843fi 2340fi
1844 2341
1845rm -f conftest$ac_cv_exeext 2342rm -f conftest$ac_cv_exeext
1846echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 2343{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1847echo "${ECHO_T}$ac_cv_exeext" >&6 2344echo "${ECHO_T}$ac_cv_exeext" >&6; }
1848 2345
1849rm -f conftest.$ac_ext 2346rm -f conftest.$ac_ext
1850EXEEXT=$ac_cv_exeext 2347EXEEXT=$ac_cv_exeext
1851ac_exeext=$EXEEXT 2348ac_exeext=$EXEEXT
1852echo "$as_me:$LINENO: checking for suffix of object files" >&5 2349{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
1853echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 2350echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
1854if test "${ac_cv_objext+set}" = set; then 2351if test "${ac_cv_objext+set}" = set; then
1855 echo $ECHO_N "(cached) $ECHO_C" >&6 2352 echo $ECHO_N "(cached) $ECHO_C" >&6
1856else 2353else
@@ -1870,14 +2367,20 @@ main ()
1870} 2367}
1871_ACEOF 2368_ACEOF
1872rm -f conftest.o conftest.obj 2369rm -f conftest.o conftest.obj
1873if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 2370if { (ac_try="$ac_compile"
1874 (eval $ac_compile) 2>&5 2371case "(($ac_try" in
2372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2373 *) ac_try_echo=$ac_try;;
2374esac
2375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2376 (eval "$ac_compile") 2>&5
1875 ac_status=$? 2377 ac_status=$?
1876 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1877 (exit $ac_status); }; then 2379 (exit $ac_status); }; then
1878 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do 2380 for ac_file in conftest.o conftest.obj conftest.*; do
2381 test -f "$ac_file" || continue;
1879 case $ac_file in 2382 case $ac_file in
1880 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; 2383 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
1881 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` 2384 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1882 break;; 2385 break;;
1883 esac 2386 esac
@@ -1895,12 +2398,12 @@ fi
1895 2398
1896rm -f conftest.$ac_cv_objext conftest.$ac_ext 2399rm -f conftest.$ac_cv_objext conftest.$ac_ext
1897fi 2400fi
1898echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 2401{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1899echo "${ECHO_T}$ac_cv_objext" >&6 2402echo "${ECHO_T}$ac_cv_objext" >&6; }
1900OBJEXT=$ac_cv_objext 2403OBJEXT=$ac_cv_objext
1901ac_objext=$OBJEXT 2404ac_objext=$OBJEXT
1902echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 2405{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
1903echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 2406echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
1904if test "${ac_cv_c_compiler_gnu+set}" = set; then 2407if test "${ac_cv_c_compiler_gnu+set}" = set; then
1905 echo $ECHO_N "(cached) $ECHO_C" >&6 2408 echo $ECHO_N "(cached) $ECHO_C" >&6
1906else 2409else
@@ -1923,50 +2426,49 @@ main ()
1923} 2426}
1924_ACEOF 2427_ACEOF
1925rm -f conftest.$ac_objext 2428rm -f conftest.$ac_objext
1926if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 2429if { (ac_try="$ac_compile"
1927 (eval $ac_compile) 2>conftest.er1 2430case "(($ac_try" in
2431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2432 *) ac_try_echo=$ac_try;;
2433esac
2434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2435 (eval "$ac_compile") 2>conftest.er1
1928 ac_status=$? 2436 ac_status=$?
1929 grep -v '^ *+' conftest.er1 >conftest.err 2437 grep -v '^ *+' conftest.er1 >conftest.err
1930 rm -f conftest.er1 2438 rm -f conftest.er1
1931 cat conftest.err >&5 2439 cat conftest.err >&5
1932 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1933 (exit $ac_status); } && 2441 (exit $ac_status); } && {
1934 { ac_try='test -z "$ac_c_werror_flag" 2442 test -z "$ac_c_werror_flag" ||
1935 || test ! -s conftest.err' 2443 test ! -s conftest.err
1936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2444 } && test -s conftest.$ac_objext; then
1937 (eval $ac_try) 2>&5
1938 ac_status=$?
1939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1940 (exit $ac_status); }; } &&
1941 { ac_try='test -s conftest.$ac_objext'
1942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1943 (eval $ac_try) 2>&5
1944 ac_status=$?
1945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1946 (exit $ac_status); }; }; then
1947 ac_compiler_gnu=yes 2445 ac_compiler_gnu=yes
1948else 2446else
1949 echo "$as_me: failed program was:" >&5 2447 echo "$as_me: failed program was:" >&5
1950sed 's/^/| /' conftest.$ac_ext >&5 2448sed 's/^/| /' conftest.$ac_ext >&5
1951 2449
1952ac_compiler_gnu=no 2450 ac_compiler_gnu=no
1953fi 2451fi
1954rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 2452
2453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1955ac_cv_c_compiler_gnu=$ac_compiler_gnu 2454ac_cv_c_compiler_gnu=$ac_compiler_gnu
1956 2455
1957fi 2456fi
1958echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 2457{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
1959echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 2458echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
1960GCC=`test $ac_compiler_gnu = yes && echo yes` 2459GCC=`test $ac_compiler_gnu = yes && echo yes`
1961ac_test_CFLAGS=${CFLAGS+set} 2460ac_test_CFLAGS=${CFLAGS+set}
1962ac_save_CFLAGS=$CFLAGS 2461ac_save_CFLAGS=$CFLAGS
1963CFLAGS="-g" 2462{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
1964echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 2463echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
1965echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1966if test "${ac_cv_prog_cc_g+set}" = set; then 2464if test "${ac_cv_prog_cc_g+set}" = set; then
1967 echo $ECHO_N "(cached) $ECHO_C" >&6 2465 echo $ECHO_N "(cached) $ECHO_C" >&6
1968else 2466else
1969 cat >conftest.$ac_ext <<_ACEOF 2467 ac_save_c_werror_flag=$ac_c_werror_flag
2468 ac_c_werror_flag=yes
2469 ac_cv_prog_cc_g=no
2470 CFLAGS="-g"
2471 cat >conftest.$ac_ext <<_ACEOF
1970/* confdefs.h. */ 2472/* confdefs.h. */
1971_ACEOF 2473_ACEOF
1972cat confdefs.h >>conftest.$ac_ext 2474cat confdefs.h >>conftest.$ac_ext
@@ -1982,38 +2484,118 @@ main ()
1982} 2484}
1983_ACEOF 2485_ACEOF
1984rm -f conftest.$ac_objext 2486rm -f conftest.$ac_objext
1985if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 2487if { (ac_try="$ac_compile"
1986 (eval $ac_compile) 2>conftest.er1 2488case "(($ac_try" in
2489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2490 *) ac_try_echo=$ac_try;;
2491esac
2492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2493 (eval "$ac_compile") 2>conftest.er1
1987 ac_status=$? 2494 ac_status=$?
1988 grep -v '^ *+' conftest.er1 >conftest.err 2495 grep -v '^ *+' conftest.er1 >conftest.err
1989 rm -f conftest.er1 2496 rm -f conftest.er1
1990 cat conftest.err >&5 2497 cat conftest.err >&5
1991 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1992 (exit $ac_status); } && 2499 (exit $ac_status); } && {
1993 { ac_try='test -z "$ac_c_werror_flag" 2500 test -z "$ac_c_werror_flag" ||
1994 || test ! -s conftest.err' 2501 test ! -s conftest.err
1995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2502 } && test -s conftest.$ac_objext; then
1996 (eval $ac_try) 2>&5 2503 ac_cv_prog_cc_g=yes
2504else
2505 echo "$as_me: failed program was:" >&5
2506sed 's/^/| /' conftest.$ac_ext >&5
2507
2508 CFLAGS=""
2509 cat >conftest.$ac_ext <<_ACEOF
2510/* confdefs.h. */
2511_ACEOF
2512cat confdefs.h >>conftest.$ac_ext
2513cat >>conftest.$ac_ext <<_ACEOF
2514/* end confdefs.h. */
2515
2516int
2517main ()
2518{
2519
2520 ;
2521 return 0;
2522}
2523_ACEOF
2524rm -f conftest.$ac_objext
2525if { (ac_try="$ac_compile"
2526case "(($ac_try" in
2527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2528 *) ac_try_echo=$ac_try;;
2529esac
2530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2531 (eval "$ac_compile") 2>conftest.er1
1997 ac_status=$? 2532 ac_status=$?
2533 grep -v '^ *+' conftest.er1 >conftest.err
2534 rm -f conftest.er1
2535 cat conftest.err >&5
1998 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1999 (exit $ac_status); }; } && 2537 (exit $ac_status); } && {
2000 { ac_try='test -s conftest.$ac_objext' 2538 test -z "$ac_c_werror_flag" ||
2001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2539 test ! -s conftest.err
2002 (eval $ac_try) 2>&5 2540 } && test -s conftest.$ac_objext; then
2541 :
2542else
2543 echo "$as_me: failed program was:" >&5
2544sed 's/^/| /' conftest.$ac_ext >&5
2545
2546 ac_c_werror_flag=$ac_save_c_werror_flag
2547 CFLAGS="-g"
2548 cat >conftest.$ac_ext <<_ACEOF
2549/* confdefs.h. */
2550_ACEOF
2551cat confdefs.h >>conftest.$ac_ext
2552cat >>conftest.$ac_ext <<_ACEOF
2553/* end confdefs.h. */
2554
2555int
2556main ()
2557{
2558
2559 ;
2560 return 0;
2561}
2562_ACEOF
2563rm -f conftest.$ac_objext
2564if { (ac_try="$ac_compile"
2565case "(($ac_try" in
2566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2567 *) ac_try_echo=$ac_try;;
2568esac
2569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2570 (eval "$ac_compile") 2>conftest.er1
2003 ac_status=$? 2571 ac_status=$?
2572 grep -v '^ *+' conftest.er1 >conftest.err
2573 rm -f conftest.er1
2574 cat conftest.err >&5
2004 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2005 (exit $ac_status); }; }; then 2576 (exit $ac_status); } && {
2577 test -z "$ac_c_werror_flag" ||
2578 test ! -s conftest.err
2579 } && test -s conftest.$ac_objext; then
2006 ac_cv_prog_cc_g=yes 2580 ac_cv_prog_cc_g=yes
2007else 2581else
2008 echo "$as_me: failed program was:" >&5 2582 echo "$as_me: failed program was:" >&5
2009sed 's/^/| /' conftest.$ac_ext >&5 2583sed 's/^/| /' conftest.$ac_ext >&5
2010 2584
2011ac_cv_prog_cc_g=no 2585
2586fi
2587
2588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2589fi
2590
2591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2012fi 2592fi
2013rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 2593
2594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2595 ac_c_werror_flag=$ac_save_c_werror_flag
2014fi 2596fi
2015echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 2597{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2016echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 2598echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
2017if test "$ac_test_CFLAGS" = set; then 2599if test "$ac_test_CFLAGS" = set; then
2018 CFLAGS=$ac_save_CFLAGS 2600 CFLAGS=$ac_save_CFLAGS
2019elif test $ac_cv_prog_cc_g = yes; then 2601elif test $ac_cv_prog_cc_g = yes; then
@@ -2029,12 +2611,12 @@ else
2029 CFLAGS= 2611 CFLAGS=
2030 fi 2612 fi
2031fi 2613fi
2032echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 2614{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
2033echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 2615echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
2034if test "${ac_cv_prog_cc_stdc+set}" = set; then 2616if test "${ac_cv_prog_cc_c89+set}" = set; then
2035 echo $ECHO_N "(cached) $ECHO_C" >&6 2617 echo $ECHO_N "(cached) $ECHO_C" >&6
2036else 2618else
2037 ac_cv_prog_cc_stdc=no 2619 ac_cv_prog_cc_c89=no
2038ac_save_CC=$CC 2620ac_save_CC=$CC
2039cat >conftest.$ac_ext <<_ACEOF 2621cat >conftest.$ac_ext <<_ACEOF
2040/* confdefs.h. */ 2622/* confdefs.h. */
@@ -2068,12 +2650,17 @@ static char *f (char * (*g) (char **, int), char **p, ...)
2068/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has 2650/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2069 function prototypes and stuff, but not '\xHH' hex character constants. 2651 function prototypes and stuff, but not '\xHH' hex character constants.
2070 These don't provoke an error unfortunately, instead are silently treated 2652 These don't provoke an error unfortunately, instead are silently treated
2071 as 'x'. The following induces an error, until -std1 is added to get 2653 as 'x'. The following induces an error, until -std is added to get
2072 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an 2654 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2073 array size at least. It's necessary to write '\x00'==0 to get something 2655 array size at least. It's necessary to write '\x00'==0 to get something
2074 that's true only with -std1. */ 2656 that's true only with -std. */
2075int osf4_cc_array ['\x00' == 0 ? 1 : -1]; 2657int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2076 2658
2659/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2660 inside strings and character constants. */
2661#define FOO(x) 'x'
2662int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
2663
2077int test (int i, double x); 2664int test (int i, double x);
2078struct s1 {int (*f) (int a);}; 2665struct s1 {int (*f) (int a);};
2079struct s2 {int (*f) (double a);}; 2666struct s2 {int (*f) (double a);};
@@ -2088,293 +2675,816 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2088 return 0; 2675 return 0;
2089} 2676}
2090_ACEOF 2677_ACEOF
2091# Don't try gcc -ansi; that turns off useful extensions and 2678for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
2092# breaks some systems' header files. 2679 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2093# AIX -qlanglvl=ansi
2094# Ultrix and OSF/1 -std1
2095# HP-UX 10.20 and later -Ae
2096# HP-UX older versions -Aa -D_HPUX_SOURCE
2097# SVR4 -Xc -D__EXTENSIONS__
2098for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2099do 2680do
2100 CC="$ac_save_CC $ac_arg" 2681 CC="$ac_save_CC $ac_arg"
2101 rm -f conftest.$ac_objext 2682 rm -f conftest.$ac_objext
2102if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 2683if { (ac_try="$ac_compile"
2103 (eval $ac_compile) 2>conftest.er1 2684case "(($ac_try" in
2685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2686 *) ac_try_echo=$ac_try;;
2687esac
2688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2689 (eval "$ac_compile") 2>conftest.er1
2104 ac_status=$? 2690 ac_status=$?
2105 grep -v '^ *+' conftest.er1 >conftest.err 2691 grep -v '^ *+' conftest.er1 >conftest.err
2106 rm -f conftest.er1 2692 rm -f conftest.er1
2107 cat conftest.err >&5 2693 cat conftest.err >&5
2108 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2109 (exit $ac_status); } && 2695 (exit $ac_status); } && {
2110 { ac_try='test -z "$ac_c_werror_flag" 2696 test -z "$ac_c_werror_flag" ||
2111 || test ! -s conftest.err' 2697 test ! -s conftest.err
2112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2698 } && test -s conftest.$ac_objext; then
2113 (eval $ac_try) 2>&5 2699 ac_cv_prog_cc_c89=$ac_arg
2114 ac_status=$?
2115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2116 (exit $ac_status); }; } &&
2117 { ac_try='test -s conftest.$ac_objext'
2118 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2119 (eval $ac_try) 2>&5
2120 ac_status=$?
2121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2122 (exit $ac_status); }; }; then
2123 ac_cv_prog_cc_stdc=$ac_arg
2124break
2125else 2700else
2126 echo "$as_me: failed program was:" >&5 2701 echo "$as_me: failed program was:" >&5
2127sed 's/^/| /' conftest.$ac_ext >&5 2702sed 's/^/| /' conftest.$ac_ext >&5
2128 2703
2704
2129fi 2705fi
2130rm -f conftest.err conftest.$ac_objext 2706
2707rm -f core conftest.err conftest.$ac_objext
2708 test "x$ac_cv_prog_cc_c89" != "xno" && break
2131done 2709done
2132rm -f conftest.$ac_ext conftest.$ac_objext 2710rm -f conftest.$ac_ext
2133CC=$ac_save_CC 2711CC=$ac_save_CC
2134 2712
2135fi 2713fi
2136 2714# AC_CACHE_VAL
2137case "x$ac_cv_prog_cc_stdc" in 2715case "x$ac_cv_prog_cc_c89" in
2138 x|xno) 2716 x)
2139 echo "$as_me:$LINENO: result: none needed" >&5 2717 { echo "$as_me:$LINENO: result: none needed" >&5
2140echo "${ECHO_T}none needed" >&6 ;; 2718echo "${ECHO_T}none needed" >&6; } ;;
2719 xno)
2720 { echo "$as_me:$LINENO: result: unsupported" >&5
2721echo "${ECHO_T}unsupported" >&6; } ;;
2141 *) 2722 *)
2142 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 2723 CC="$CC $ac_cv_prog_cc_c89"
2143echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 2724 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
2144 CC="$CC $ac_cv_prog_cc_stdc" ;; 2725echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
2145esac 2726esac
2146 2727
2147# Some people use a C++ compiler to compile C. Since we use `exit', 2728
2148# in C++ we need to declare it. In case someone uses the same compiler 2729ac_ext=c
2149# for both compiling C and C++ we need to have the C++ compiler decide 2730ac_cpp='$CPP $CPPFLAGS'
2150# the declaration of exit, since it's the most demanding environment. 2731ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2151cat >conftest.$ac_ext <<_ACEOF 2732ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2152#ifndef __cplusplus 2733ac_compiler_gnu=$ac_cv_c_compiler_gnu
2153 choke me 2734
2735ac_aux_dir=
2736for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2737 if test -f "$ac_dir/install-sh"; then
2738 ac_aux_dir=$ac_dir
2739 ac_install_sh="$ac_aux_dir/install-sh -c"
2740 break
2741 elif test -f "$ac_dir/install.sh"; then
2742 ac_aux_dir=$ac_dir
2743 ac_install_sh="$ac_aux_dir/install.sh -c"
2744 break
2745 elif test -f "$ac_dir/shtool"; then
2746 ac_aux_dir=$ac_dir
2747 ac_install_sh="$ac_aux_dir/shtool install -c"
2748 break
2749 fi
2750done
2751if test -z "$ac_aux_dir"; then
2752 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2753echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
2754 { (exit 1); exit 1; }; }
2755fi
2756
2757# These three variables are undocumented and unsupported,
2758# and are intended to be withdrawn in a future Autoconf release.
2759# They can cause serious problems if a builder's source tree is in a directory
2760# whose full name contains unusual characters.
2761ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2762ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2763ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2764
2765
2766# Make sure we can run config.sub.
2767$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2768 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2769echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2770 { (exit 1); exit 1; }; }
2771
2772{ echo "$as_me:$LINENO: checking build system type" >&5
2773echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
2774if test "${ac_cv_build+set}" = set; then
2775 echo $ECHO_N "(cached) $ECHO_C" >&6
2776else
2777 ac_build_alias=$build_alias
2778test "x$ac_build_alias" = x &&
2779 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2780test "x$ac_build_alias" = x &&
2781 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2782echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2783 { (exit 1); exit 1; }; }
2784ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2785 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2786echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2787 { (exit 1); exit 1; }; }
2788
2789fi
2790{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2791echo "${ECHO_T}$ac_cv_build" >&6; }
2792case $ac_cv_build in
2793*-*-*) ;;
2794*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2795echo "$as_me: error: invalid value of canonical build" >&2;}
2796 { (exit 1); exit 1; }; };;
2797esac
2798build=$ac_cv_build
2799ac_save_IFS=$IFS; IFS='-'
2800set x $ac_cv_build
2801shift
2802build_cpu=$1
2803build_vendor=$2
2804shift; shift
2805# Remember, the first character of IFS is used to create $*,
2806# except with old shells:
2807build_os=$*
2808IFS=$ac_save_IFS
2809case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2810
2811
2812{ echo "$as_me:$LINENO: checking host system type" >&5
2813echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
2814if test "${ac_cv_host+set}" = set; then
2815 echo $ECHO_N "(cached) $ECHO_C" >&6
2816else
2817 if test "x$host_alias" = x; then
2818 ac_cv_host=$ac_cv_build
2819else
2820 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2821 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2822echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2823 { (exit 1); exit 1; }; }
2824fi
2825
2826fi
2827{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2828echo "${ECHO_T}$ac_cv_host" >&6; }
2829case $ac_cv_host in
2830*-*-*) ;;
2831*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2832echo "$as_me: error: invalid value of canonical host" >&2;}
2833 { (exit 1); exit 1; }; };;
2834esac
2835host=$ac_cv_host
2836ac_save_IFS=$IFS; IFS='-'
2837set x $ac_cv_host
2838shift
2839host_cpu=$1
2840host_vendor=$2
2841shift; shift
2842# Remember, the first character of IFS is used to create $*,
2843# except with old shells:
2844host_os=$*
2845IFS=$ac_save_IFS
2846case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2847
2848
2849
2850ac_ext=c
2851ac_cpp='$CPP $CPPFLAGS'
2852ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2853ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2854ac_compiler_gnu=$ac_cv_c_compiler_gnu
2855{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2856echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
2857# On Suns, sometimes $CPP names a directory.
2858if test -n "$CPP" && test -d "$CPP"; then
2859 CPP=
2860fi
2861if test -z "$CPP"; then
2862 if test "${ac_cv_prog_CPP+set}" = set; then
2863 echo $ECHO_N "(cached) $ECHO_C" >&6
2864else
2865 # Double quotes because CPP needs to be expanded
2866 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2867 do
2868 ac_preproc_ok=false
2869for ac_c_preproc_warn_flag in '' yes
2870do
2871 # Use a header file that comes with gcc, so configuring glibc
2872 # with a fresh cross-compiler works.
2873 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2874 # <limits.h> exists even on freestanding compilers.
2875 # On the NeXT, cc -E runs the code through the compiler's parser,
2876 # not just through cpp. "Syntax error" is here to catch this case.
2877 cat >conftest.$ac_ext <<_ACEOF
2878/* confdefs.h. */
2879_ACEOF
2880cat confdefs.h >>conftest.$ac_ext
2881cat >>conftest.$ac_ext <<_ACEOF
2882/* end confdefs.h. */
2883#ifdef __STDC__
2884# include <limits.h>
2885#else
2886# include <assert.h>
2154#endif 2887#endif
2888 Syntax error
2155_ACEOF 2889_ACEOF
2156rm -f conftest.$ac_objext 2890if { (ac_try="$ac_cpp conftest.$ac_ext"
2157if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 2891case "(($ac_try" in
2158 (eval $ac_compile) 2>conftest.er1 2892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2893 *) ac_try_echo=$ac_try;;
2894esac
2895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2896 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2159 ac_status=$? 2897 ac_status=$?
2160 grep -v '^ *+' conftest.er1 >conftest.err 2898 grep -v '^ *+' conftest.er1 >conftest.err
2161 rm -f conftest.er1 2899 rm -f conftest.er1
2162 cat conftest.err >&5 2900 cat conftest.err >&5
2163 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2164 (exit $ac_status); } && 2902 (exit $ac_status); } >/dev/null && {
2165 { ac_try='test -z "$ac_c_werror_flag" 2903 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2166 || test ! -s conftest.err' 2904 test ! -s conftest.err
2167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2905 }; then
2168 (eval $ac_try) 2>&5 2906 :
2907else
2908 echo "$as_me: failed program was:" >&5
2909sed 's/^/| /' conftest.$ac_ext >&5
2910
2911 # Broken: fails on valid input.
2912continue
2913fi
2914
2915rm -f conftest.err conftest.$ac_ext
2916
2917 # OK, works on sane cases. Now check whether nonexistent headers
2918 # can be detected and how.
2919 cat >conftest.$ac_ext <<_ACEOF
2920/* confdefs.h. */
2921_ACEOF
2922cat confdefs.h >>conftest.$ac_ext
2923cat >>conftest.$ac_ext <<_ACEOF
2924/* end confdefs.h. */
2925#include <ac_nonexistent.h>
2926_ACEOF
2927if { (ac_try="$ac_cpp conftest.$ac_ext"
2928case "(($ac_try" in
2929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2930 *) ac_try_echo=$ac_try;;
2931esac
2932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2933 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2169 ac_status=$? 2934 ac_status=$?
2935 grep -v '^ *+' conftest.er1 >conftest.err
2936 rm -f conftest.er1
2937 cat conftest.err >&5
2170 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2171 (exit $ac_status); }; } && 2939 (exit $ac_status); } >/dev/null && {
2172 { ac_try='test -s conftest.$ac_objext' 2940 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 2941 test ! -s conftest.err
2174 (eval $ac_try) 2>&5 2942 }; then
2943 # Broken: success on invalid input.
2944continue
2945else
2946 echo "$as_me: failed program was:" >&5
2947sed 's/^/| /' conftest.$ac_ext >&5
2948
2949 # Passes both tests.
2950ac_preproc_ok=:
2951break
2952fi
2953
2954rm -f conftest.err conftest.$ac_ext
2955
2956done
2957# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2958rm -f conftest.err conftest.$ac_ext
2959if $ac_preproc_ok; then
2960 break
2961fi
2962
2963 done
2964 ac_cv_prog_CPP=$CPP
2965
2966fi
2967 CPP=$ac_cv_prog_CPP
2968else
2969 ac_cv_prog_CPP=$CPP
2970fi
2971{ echo "$as_me:$LINENO: result: $CPP" >&5
2972echo "${ECHO_T}$CPP" >&6; }
2973ac_preproc_ok=false
2974for ac_c_preproc_warn_flag in '' yes
2975do
2976 # Use a header file that comes with gcc, so configuring glibc
2977 # with a fresh cross-compiler works.
2978 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2979 # <limits.h> exists even on freestanding compilers.
2980 # On the NeXT, cc -E runs the code through the compiler's parser,
2981 # not just through cpp. "Syntax error" is here to catch this case.
2982 cat >conftest.$ac_ext <<_ACEOF
2983/* confdefs.h. */
2984_ACEOF
2985cat confdefs.h >>conftest.$ac_ext
2986cat >>conftest.$ac_ext <<_ACEOF
2987/* end confdefs.h. */
2988#ifdef __STDC__
2989# include <limits.h>
2990#else
2991# include <assert.h>
2992#endif
2993 Syntax error
2994_ACEOF
2995if { (ac_try="$ac_cpp conftest.$ac_ext"
2996case "(($ac_try" in
2997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2998 *) ac_try_echo=$ac_try;;
2999esac
3000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3001 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2175 ac_status=$? 3002 ac_status=$?
3003 grep -v '^ *+' conftest.er1 >conftest.err
3004 rm -f conftest.er1
3005 cat conftest.err >&5
2176 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2177 (exit $ac_status); }; }; then 3007 (exit $ac_status); } >/dev/null && {
2178 for ac_declaration in \ 3008 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2179 '' \ 3009 test ! -s conftest.err
2180 'extern "C" void std::exit (int) throw (); using std::exit;' \ 3010 }; then
2181 'extern "C" void std::exit (int); using std::exit;' \ 3011 :
2182 'extern "C" void exit (int) throw ();' \ 3012else
2183 'extern "C" void exit (int);' \ 3013 echo "$as_me: failed program was:" >&5
2184 'void exit (int);' 3014sed 's/^/| /' conftest.$ac_ext >&5
3015
3016 # Broken: fails on valid input.
3017continue
3018fi
3019
3020rm -f conftest.err conftest.$ac_ext
3021
3022 # OK, works on sane cases. Now check whether nonexistent headers
3023 # can be detected and how.
3024 cat >conftest.$ac_ext <<_ACEOF
3025/* confdefs.h. */
3026_ACEOF
3027cat confdefs.h >>conftest.$ac_ext
3028cat >>conftest.$ac_ext <<_ACEOF
3029/* end confdefs.h. */
3030#include <ac_nonexistent.h>
3031_ACEOF
3032if { (ac_try="$ac_cpp conftest.$ac_ext"
3033case "(($ac_try" in
3034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3035 *) ac_try_echo=$ac_try;;
3036esac
3037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3038 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3039 ac_status=$?
3040 grep -v '^ *+' conftest.er1 >conftest.err
3041 rm -f conftest.er1
3042 cat conftest.err >&5
3043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3044 (exit $ac_status); } >/dev/null && {
3045 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3046 test ! -s conftest.err
3047 }; then
3048 # Broken: success on invalid input.
3049continue
3050else
3051 echo "$as_me: failed program was:" >&5
3052sed 's/^/| /' conftest.$ac_ext >&5
3053
3054 # Passes both tests.
3055ac_preproc_ok=:
3056break
3057fi
3058
3059rm -f conftest.err conftest.$ac_ext
3060
3061done
3062# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3063rm -f conftest.err conftest.$ac_ext
3064if $ac_preproc_ok; then
3065 :
3066else
3067 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3068See \`config.log' for more details." >&5
3069echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3070See \`config.log' for more details." >&2;}
3071 { (exit 1); exit 1; }; }
3072fi
3073
3074ac_ext=c
3075ac_cpp='$CPP $CPPFLAGS'
3076ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3077ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3078ac_compiler_gnu=$ac_cv_c_compiler_gnu
3079
3080
3081{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3082echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3083if test "${ac_cv_path_GREP+set}" = set; then
3084 echo $ECHO_N "(cached) $ECHO_C" >&6
3085else
3086 # Extract the first word of "grep ggrep" to use in msg output
3087if test -z "$GREP"; then
3088set dummy grep ggrep; ac_prog_name=$2
3089if test "${ac_cv_path_GREP+set}" = set; then
3090 echo $ECHO_N "(cached) $ECHO_C" >&6
3091else
3092 ac_path_GREP_found=false
3093# Loop through the user's path and test for each of PROGNAME-LIST
3094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3095for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3096do
3097 IFS=$as_save_IFS
3098 test -z "$as_dir" && as_dir=.
3099 for ac_prog in grep ggrep; do
3100 for ac_exec_ext in '' $ac_executable_extensions; do
3101 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3102 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3103 # Check for GNU ac_path_GREP and select it if it is found.
3104 # Check for GNU $ac_path_GREP
3105case `"$ac_path_GREP" --version 2>&1` in
3106*GNU*)
3107 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3108*)
3109 ac_count=0
3110 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3111 while :
3112 do
3113 cat "conftest.in" "conftest.in" >"conftest.tmp"
3114 mv "conftest.tmp" "conftest.in"
3115 cp "conftest.in" "conftest.nl"
3116 echo 'GREP' >> "conftest.nl"
3117 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3118 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3119 ac_count=`expr $ac_count + 1`
3120 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3121 # Best one so far, save it but keep looking for a better one
3122 ac_cv_path_GREP="$ac_path_GREP"
3123 ac_path_GREP_max=$ac_count
3124 fi
3125 # 10*(2^10) chars as input seems more than enough
3126 test $ac_count -gt 10 && break
3127 done
3128 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3129esac
3130
3131
3132 $ac_path_GREP_found && break 3
3133 done
3134done
3135
3136done
3137IFS=$as_save_IFS
3138
3139
3140fi
3141
3142GREP="$ac_cv_path_GREP"
3143if test -z "$GREP"; then
3144 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3145echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3146 { (exit 1); exit 1; }; }
3147fi
3148
3149else
3150 ac_cv_path_GREP=$GREP
3151fi
3152
3153
3154fi
3155{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3156echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3157 GREP="$ac_cv_path_GREP"
3158
3159
3160{ echo "$as_me:$LINENO: checking for egrep" >&5
3161echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3162if test "${ac_cv_path_EGREP+set}" = set; then
3163 echo $ECHO_N "(cached) $ECHO_C" >&6
3164else
3165 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3166 then ac_cv_path_EGREP="$GREP -E"
3167 else
3168 # Extract the first word of "egrep" to use in msg output
3169if test -z "$EGREP"; then
3170set dummy egrep; ac_prog_name=$2
3171if test "${ac_cv_path_EGREP+set}" = set; then
3172 echo $ECHO_N "(cached) $ECHO_C" >&6
3173else
3174 ac_path_EGREP_found=false
3175# Loop through the user's path and test for each of PROGNAME-LIST
3176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3177for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
2185do 3178do
3179 IFS=$as_save_IFS
3180 test -z "$as_dir" && as_dir=.
3181 for ac_prog in egrep; do
3182 for ac_exec_ext in '' $ac_executable_extensions; do
3183 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3184 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3185 # Check for GNU ac_path_EGREP and select it if it is found.
3186 # Check for GNU $ac_path_EGREP
3187case `"$ac_path_EGREP" --version 2>&1` in
3188*GNU*)
3189 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3190*)
3191 ac_count=0
3192 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3193 while :
3194 do
3195 cat "conftest.in" "conftest.in" >"conftest.tmp"
3196 mv "conftest.tmp" "conftest.in"
3197 cp "conftest.in" "conftest.nl"
3198 echo 'EGREP' >> "conftest.nl"
3199 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3200 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3201 ac_count=`expr $ac_count + 1`
3202 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3203 # Best one so far, save it but keep looking for a better one
3204 ac_cv_path_EGREP="$ac_path_EGREP"
3205 ac_path_EGREP_max=$ac_count
3206 fi
3207 # 10*(2^10) chars as input seems more than enough
3208 test $ac_count -gt 10 && break
3209 done
3210 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3211esac
3212
3213
3214 $ac_path_EGREP_found && break 3
3215 done
3216done
3217
3218done
3219IFS=$as_save_IFS
3220
3221
3222fi
3223
3224EGREP="$ac_cv_path_EGREP"
3225if test -z "$EGREP"; then
3226 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3227echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3228 { (exit 1); exit 1; }; }
3229fi
3230
3231else
3232 ac_cv_path_EGREP=$EGREP
3233fi
3234
3235
3236 fi
3237fi
3238{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3239echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3240 EGREP="$ac_cv_path_EGREP"
3241
3242
3243{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3244echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
3245if test "${ac_cv_header_stdc+set}" = set; then
3246 echo $ECHO_N "(cached) $ECHO_C" >&6
3247else
2186 cat >conftest.$ac_ext <<_ACEOF 3248 cat >conftest.$ac_ext <<_ACEOF
2187/* confdefs.h. */ 3249/* confdefs.h. */
2188_ACEOF 3250_ACEOF
2189cat confdefs.h >>conftest.$ac_ext 3251cat confdefs.h >>conftest.$ac_ext
2190cat >>conftest.$ac_ext <<_ACEOF 3252cat >>conftest.$ac_ext <<_ACEOF
2191/* end confdefs.h. */ 3253/* end confdefs.h. */
2192$ac_declaration
2193#include <stdlib.h> 3254#include <stdlib.h>
3255#include <stdarg.h>
3256#include <string.h>
3257#include <float.h>
3258
2194int 3259int
2195main () 3260main ()
2196{ 3261{
2197exit (42); 3262
2198 ; 3263 ;
2199 return 0; 3264 return 0;
2200} 3265}
2201_ACEOF 3266_ACEOF
2202rm -f conftest.$ac_objext 3267rm -f conftest.$ac_objext
2203if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 3268if { (ac_try="$ac_compile"
2204 (eval $ac_compile) 2>conftest.er1 3269case "(($ac_try" in
3270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3271 *) ac_try_echo=$ac_try;;
3272esac
3273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3274 (eval "$ac_compile") 2>conftest.er1
2205 ac_status=$? 3275 ac_status=$?
2206 grep -v '^ *+' conftest.er1 >conftest.err 3276 grep -v '^ *+' conftest.er1 >conftest.err
2207 rm -f conftest.er1 3277 rm -f conftest.er1
2208 cat conftest.err >&5 3278 cat conftest.err >&5
2209 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2210 (exit $ac_status); } && 3280 (exit $ac_status); } && {
2211 { ac_try='test -z "$ac_c_werror_flag" 3281 test -z "$ac_c_werror_flag" ||
2212 || test ! -s conftest.err' 3282 test ! -s conftest.err
2213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3283 } && test -s conftest.$ac_objext; then
2214 (eval $ac_try) 2>&5 3284 ac_cv_header_stdc=yes
2215 ac_status=$?
2216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2217 (exit $ac_status); }; } &&
2218 { ac_try='test -s conftest.$ac_objext'
2219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2220 (eval $ac_try) 2>&5
2221 ac_status=$?
2222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2223 (exit $ac_status); }; }; then
2224 :
2225else 3285else
2226 echo "$as_me: failed program was:" >&5 3286 echo "$as_me: failed program was:" >&5
2227sed 's/^/| /' conftest.$ac_ext >&5 3287sed 's/^/| /' conftest.$ac_ext >&5
2228 3288
2229continue 3289 ac_cv_header_stdc=no
3290fi
3291
3292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3293
3294if test $ac_cv_header_stdc = yes; then
3295 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3296 cat >conftest.$ac_ext <<_ACEOF
3297/* confdefs.h. */
3298_ACEOF
3299cat confdefs.h >>conftest.$ac_ext
3300cat >>conftest.$ac_ext <<_ACEOF
3301/* end confdefs.h. */
3302#include <string.h>
3303
3304_ACEOF
3305if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3306 $EGREP "memchr" >/dev/null 2>&1; then
3307 :
3308else
3309 ac_cv_header_stdc=no
3310fi
3311rm -f conftest*
3312
3313fi
3314
3315if test $ac_cv_header_stdc = yes; then
3316 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3317 cat >conftest.$ac_ext <<_ACEOF
3318/* confdefs.h. */
3319_ACEOF
3320cat confdefs.h >>conftest.$ac_ext
3321cat >>conftest.$ac_ext <<_ACEOF
3322/* end confdefs.h. */
3323#include <stdlib.h>
3324
3325_ACEOF
3326if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3327 $EGREP "free" >/dev/null 2>&1; then
3328 :
3329else
3330 ac_cv_header_stdc=no
3331fi
3332rm -f conftest*
3333
2230fi 3334fi
2231rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 3335
3336if test $ac_cv_header_stdc = yes; then
3337 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3338 if test "$cross_compiling" = yes; then
3339 :
3340else
2232 cat >conftest.$ac_ext <<_ACEOF 3341 cat >conftest.$ac_ext <<_ACEOF
2233/* confdefs.h. */ 3342/* confdefs.h. */
2234_ACEOF 3343_ACEOF
2235cat confdefs.h >>conftest.$ac_ext 3344cat confdefs.h >>conftest.$ac_ext
2236cat >>conftest.$ac_ext <<_ACEOF 3345cat >>conftest.$ac_ext <<_ACEOF
2237/* end confdefs.h. */ 3346/* end confdefs.h. */
2238$ac_declaration 3347#include <ctype.h>
3348#include <stdlib.h>
3349#if ((' ' & 0x0FF) == 0x020)
3350# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3351# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3352#else
3353# define ISLOWER(c) \
3354 (('a' <= (c) && (c) <= 'i') \
3355 || ('j' <= (c) && (c) <= 'r') \
3356 || ('s' <= (c) && (c) <= 'z'))
3357# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3358#endif
3359
3360#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2239int 3361int
2240main () 3362main ()
2241{ 3363{
2242exit (42); 3364 int i;
2243 ; 3365 for (i = 0; i < 256; i++)
3366 if (XOR (islower (i), ISLOWER (i))
3367 || toupper (i) != TOUPPER (i))
3368 return 2;
2244 return 0; 3369 return 0;
2245} 3370}
2246_ACEOF 3371_ACEOF
2247rm -f conftest.$ac_objext 3372rm -f conftest$ac_exeext
2248if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 3373if { (ac_try="$ac_link"
2249 (eval $ac_compile) 2>conftest.er1 3374case "(($ac_try" in
2250 ac_status=$? 3375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2251 grep -v '^ *+' conftest.er1 >conftest.err 3376 *) ac_try_echo=$ac_try;;
2252 rm -f conftest.er1 3377esac
2253 cat conftest.err >&5 3378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2254 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3379 (eval "$ac_link") 2>&5
2255 (exit $ac_status); } &&
2256 { ac_try='test -z "$ac_c_werror_flag"
2257 || test ! -s conftest.err'
2258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2259 (eval $ac_try) 2>&5
2260 ac_status=$? 3380 ac_status=$?
2261 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2262 (exit $ac_status); }; } && 3382 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2263 { ac_try='test -s conftest.$ac_objext' 3383 { (case "(($ac_try" in
2264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2265 (eval $ac_try) 2>&5 3385 *) ac_try_echo=$ac_try;;
3386esac
3387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3388 (eval "$ac_try") 2>&5
2266 ac_status=$? 3389 ac_status=$?
2267 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2268 (exit $ac_status); }; }; then 3391 (exit $ac_status); }; }; then
2269 break 3392 :
2270else 3393else
2271 echo "$as_me: failed program was:" >&5 3394 echo "$as_me: program exited with status $ac_status" >&5
3395echo "$as_me: failed program was:" >&5
2272sed 's/^/| /' conftest.$ac_ext >&5 3396sed 's/^/| /' conftest.$ac_ext >&5
2273 3397
3398( exit $ac_status )
3399ac_cv_header_stdc=no
2274fi 3400fi
2275rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 3401rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2276done
2277rm -f conftest*
2278if test -n "$ac_declaration"; then
2279 echo '#ifdef __cplusplus' >>confdefs.h
2280 echo $ac_declaration >>confdefs.h
2281 echo '#endif' >>confdefs.h
2282fi 3402fi
2283 3403
2284else
2285 echo "$as_me: failed program was:" >&5
2286sed 's/^/| /' conftest.$ac_ext >&5
2287 3404
2288fi 3405fi
2289rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 3406fi
2290ac_ext=c 3407{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2291ac_cpp='$CPP $CPPFLAGS' 3408echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
2292ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 3409if test $ac_cv_header_stdc = yes; then
2293ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 3410
2294ac_compiler_gnu=$ac_cv_c_compiler_gnu 3411cat >>confdefs.h <<\_ACEOF
3412#define STDC_HEADERS 1
3413_ACEOF
2295 3414
2296ac_aux_dir=
2297for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
2298 if test -f $ac_dir/install-sh; then
2299 ac_aux_dir=$ac_dir
2300 ac_install_sh="$ac_aux_dir/install-sh -c"
2301 break
2302 elif test -f $ac_dir/install.sh; then
2303 ac_aux_dir=$ac_dir
2304 ac_install_sh="$ac_aux_dir/install.sh -c"
2305 break
2306 elif test -f $ac_dir/shtool; then
2307 ac_aux_dir=$ac_dir
2308 ac_install_sh="$ac_aux_dir/shtool install -c"
2309 break
2310 fi
2311done
2312if test -z "$ac_aux_dir"; then
2313 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
2314echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
2315 { (exit 1); exit 1; }; }
2316fi 3415fi
2317ac_config_guess="$SHELL $ac_aux_dir/config.guess"
2318ac_config_sub="$SHELL $ac_aux_dir/config.sub"
2319ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
2320 3416
2321# Make sure we can run config.sub. 3417# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2322$ac_config_sub sun4 >/dev/null 2>&1 ||
2323 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
2324echo "$as_me: error: cannot run $ac_config_sub" >&2;}
2325 { (exit 1); exit 1; }; }
2326 3418
2327echo "$as_me:$LINENO: checking build system type" >&5
2328echo $ECHO_N "checking build system type... $ECHO_C" >&6
2329if test "${ac_cv_build+set}" = set; then
2330 echo $ECHO_N "(cached) $ECHO_C" >&6
2331else
2332 ac_cv_build_alias=$build_alias
2333test -z "$ac_cv_build_alias" &&
2334 ac_cv_build_alias=`$ac_config_guess`
2335test -z "$ac_cv_build_alias" &&
2336 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2337echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2338 { (exit 1); exit 1; }; }
2339ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
2340 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
2341echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
2342 { (exit 1); exit 1; }; }
2343 3419
2344fi
2345echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2346echo "${ECHO_T}$ac_cv_build" >&6
2347build=$ac_cv_build
2348build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2349build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2350build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2351 3420
2352 3421
2353echo "$as_me:$LINENO: checking host system type" >&5 3422
2354echo $ECHO_N "checking host system type... $ECHO_C" >&6 3423
2355if test "${ac_cv_host+set}" = set; then 3424
3425
3426
3427for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3428 inttypes.h stdint.h unistd.h
3429do
3430as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3431{ echo "$as_me:$LINENO: checking for $ac_header" >&5
3432echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
3433if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2356 echo $ECHO_N "(cached) $ECHO_C" >&6 3434 echo $ECHO_N "(cached) $ECHO_C" >&6
2357else 3435else
2358 ac_cv_host_alias=$host_alias 3436 cat >conftest.$ac_ext <<_ACEOF
2359test -z "$ac_cv_host_alias" && 3437/* confdefs.h. */
2360 ac_cv_host_alias=$ac_cv_build_alias 3438_ACEOF
2361ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || 3439cat confdefs.h >>conftest.$ac_ext
2362 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 3440cat >>conftest.$ac_ext <<_ACEOF
2363echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} 3441/* end confdefs.h. */
2364 { (exit 1); exit 1; }; } 3442$ac_includes_default
2365 3443
3444#include <$ac_header>
3445_ACEOF
3446rm -f conftest.$ac_objext
3447if { (ac_try="$ac_compile"
3448case "(($ac_try" in
3449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3450 *) ac_try_echo=$ac_try;;
3451esac
3452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3453 (eval "$ac_compile") 2>conftest.er1
3454 ac_status=$?
3455 grep -v '^ *+' conftest.er1 >conftest.err
3456 rm -f conftest.er1
3457 cat conftest.err >&5
3458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3459 (exit $ac_status); } && {
3460 test -z "$ac_c_werror_flag" ||
3461 test ! -s conftest.err
3462 } && test -s conftest.$ac_objext; then
3463 eval "$as_ac_Header=yes"
3464else
3465 echo "$as_me: failed program was:" >&5
3466sed 's/^/| /' conftest.$ac_ext >&5
3467
3468 eval "$as_ac_Header=no"
2366fi 3469fi
2367echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2368echo "${ECHO_T}$ac_cv_host" >&6
2369host=$ac_cv_host
2370host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2371host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2372host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2373 3470
3471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3472fi
3473ac_res=`eval echo '${'$as_ac_Header'}'`
3474 { echo "$as_me:$LINENO: result: $ac_res" >&5
3475echo "${ECHO_T}$ac_res" >&6; }
3476if test `eval echo '${'$as_ac_Header'}'` = yes; then
3477 cat >>confdefs.h <<_ACEOF
3478#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3479_ACEOF
3480
3481fi
3482
3483done
2374 3484
2375 3485
2376echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 3486{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
2377echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 3487echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
2378if test "${ac_cv_c_bigendian+set}" = set; then 3488if test "${ac_cv_c_bigendian+set}" = set; then
2379 echo $ECHO_N "(cached) $ECHO_C" >&6 3489 echo $ECHO_N "(cached) $ECHO_C" >&6
2380else 3490else
@@ -2391,7 +3501,8 @@ cat >>conftest.$ac_ext <<_ACEOF
2391int 3501int
2392main () 3502main ()
2393{ 3503{
2394#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN 3504#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
3505 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
2395 bogus endian macros 3506 bogus endian macros
2396#endif 3507#endif
2397 3508
@@ -2400,27 +3511,22 @@ main ()
2400} 3511}
2401_ACEOF 3512_ACEOF
2402rm -f conftest.$ac_objext 3513rm -f conftest.$ac_objext
2403if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 3514if { (ac_try="$ac_compile"
2404 (eval $ac_compile) 2>conftest.er1 3515case "(($ac_try" in
3516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3517 *) ac_try_echo=$ac_try;;
3518esac
3519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3520 (eval "$ac_compile") 2>conftest.er1
2405 ac_status=$? 3521 ac_status=$?
2406 grep -v '^ *+' conftest.er1 >conftest.err 3522 grep -v '^ *+' conftest.er1 >conftest.err
2407 rm -f conftest.er1 3523 rm -f conftest.er1
2408 cat conftest.err >&5 3524 cat conftest.err >&5
2409 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2410 (exit $ac_status); } && 3526 (exit $ac_status); } && {
2411 { ac_try='test -z "$ac_c_werror_flag" 3527 test -z "$ac_c_werror_flag" ||
2412 || test ! -s conftest.err' 3528 test ! -s conftest.err
2413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3529 } && test -s conftest.$ac_objext; then
2414 (eval $ac_try) 2>&5
2415 ac_status=$?
2416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2417 (exit $ac_status); }; } &&
2418 { ac_try='test -s conftest.$ac_objext'
2419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2420 (eval $ac_try) 2>&5
2421 ac_status=$?
2422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2423 (exit $ac_status); }; }; then
2424 # It does; now see whether it defined to BIG_ENDIAN or not. 3530 # It does; now see whether it defined to BIG_ENDIAN or not.
2425cat >conftest.$ac_ext <<_ACEOF 3531cat >conftest.$ac_ext <<_ACEOF
2426/* confdefs.h. */ 3532/* confdefs.h. */
@@ -2443,40 +3549,36 @@ main ()
2443} 3549}
2444_ACEOF 3550_ACEOF
2445rm -f conftest.$ac_objext 3551rm -f conftest.$ac_objext
2446if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 3552if { (ac_try="$ac_compile"
2447 (eval $ac_compile) 2>conftest.er1 3553case "(($ac_try" in
3554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3555 *) ac_try_echo=$ac_try;;
3556esac
3557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3558 (eval "$ac_compile") 2>conftest.er1
2448 ac_status=$? 3559 ac_status=$?
2449 grep -v '^ *+' conftest.er1 >conftest.err 3560 grep -v '^ *+' conftest.er1 >conftest.err
2450 rm -f conftest.er1 3561 rm -f conftest.er1
2451 cat conftest.err >&5 3562 cat conftest.err >&5
2452 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2453 (exit $ac_status); } && 3564 (exit $ac_status); } && {
2454 { ac_try='test -z "$ac_c_werror_flag" 3565 test -z "$ac_c_werror_flag" ||
2455 || test ! -s conftest.err' 3566 test ! -s conftest.err
2456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3567 } && test -s conftest.$ac_objext; then
2457 (eval $ac_try) 2>&5
2458 ac_status=$?
2459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2460 (exit $ac_status); }; } &&
2461 { ac_try='test -s conftest.$ac_objext'
2462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2463 (eval $ac_try) 2>&5
2464 ac_status=$?
2465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2466 (exit $ac_status); }; }; then
2467 ac_cv_c_bigendian=yes 3568 ac_cv_c_bigendian=yes
2468else 3569else
2469 echo "$as_me: failed program was:" >&5 3570 echo "$as_me: failed program was:" >&5
2470sed 's/^/| /' conftest.$ac_ext >&5 3571sed 's/^/| /' conftest.$ac_ext >&5
2471 3572
2472ac_cv_c_bigendian=no 3573 ac_cv_c_bigendian=no
2473fi 3574fi
2474rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 3575
3576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2475else 3577else
2476 echo "$as_me: failed program was:" >&5 3578 echo "$as_me: failed program was:" >&5
2477sed 's/^/| /' conftest.$ac_ext >&5 3579sed 's/^/| /' conftest.$ac_ext >&5
2478 3580
2479# It does not; compile a test program. 3581 # It does not; compile a test program.
2480if test "$cross_compiling" = yes; then 3582if test "$cross_compiling" = yes; then
2481 # try to guess the endianness by grepping values into an object file 3583 # try to guess the endianness by grepping values into an object file
2482 ac_cv_c_bigendian=unknown 3584 ac_cv_c_bigendian=unknown
@@ -2486,11 +3588,11 @@ _ACEOF
2486cat confdefs.h >>conftest.$ac_ext 3588cat confdefs.h >>conftest.$ac_ext
2487cat >>conftest.$ac_ext <<_ACEOF 3589cat >>conftest.$ac_ext <<_ACEOF
2488/* end confdefs.h. */ 3590/* end confdefs.h. */
2489short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; 3591short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
2490short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; 3592short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
2491void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } 3593void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
2492short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; 3594short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
2493short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; 3595short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
2494void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } 3596void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
2495int 3597int
2496main () 3598main ()
@@ -2501,27 +3603,22 @@ main ()
2501} 3603}
2502_ACEOF 3604_ACEOF
2503rm -f conftest.$ac_objext 3605rm -f conftest.$ac_objext
2504if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 3606if { (ac_try="$ac_compile"
2505 (eval $ac_compile) 2>conftest.er1 3607case "(($ac_try" in
3608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3609 *) ac_try_echo=$ac_try;;
3610esac
3611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3612 (eval "$ac_compile") 2>conftest.er1
2506 ac_status=$? 3613 ac_status=$?
2507 grep -v '^ *+' conftest.er1 >conftest.err 3614 grep -v '^ *+' conftest.er1 >conftest.err
2508 rm -f conftest.er1 3615 rm -f conftest.er1
2509 cat conftest.err >&5 3616 cat conftest.err >&5
2510 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2511 (exit $ac_status); } && 3618 (exit $ac_status); } && {
2512 { ac_try='test -z "$ac_c_werror_flag" 3619 test -z "$ac_c_werror_flag" ||
2513 || test ! -s conftest.err' 3620 test ! -s conftest.err
2514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3621 } && test -s conftest.$ac_objext; then
2515 (eval $ac_try) 2>&5
2516 ac_status=$?
2517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2518 (exit $ac_status); }; } &&
2519 { ac_try='test -s conftest.$ac_objext'
2520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2521 (eval $ac_try) 2>&5
2522 ac_status=$?
2523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2524 (exit $ac_status); }; }; then
2525 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then 3622 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
2526 ac_cv_c_bigendian=yes 3623 ac_cv_c_bigendian=yes
2527fi 3624fi
@@ -2537,8 +3634,10 @@ else
2537 echo "$as_me: failed program was:" >&5 3634 echo "$as_me: failed program was:" >&5
2538sed 's/^/| /' conftest.$ac_ext >&5 3635sed 's/^/| /' conftest.$ac_ext >&5
2539 3636
3637
2540fi 3638fi
2541rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 3639
3640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2542else 3641else
2543 cat >conftest.$ac_ext <<_ACEOF 3642 cat >conftest.$ac_ext <<_ACEOF
2544/* confdefs.h. */ 3643/* confdefs.h. */
@@ -2546,27 +3645,41 @@ _ACEOF
2546cat confdefs.h >>conftest.$ac_ext 3645cat confdefs.h >>conftest.$ac_ext
2547cat >>conftest.$ac_ext <<_ACEOF 3646cat >>conftest.$ac_ext <<_ACEOF
2548/* end confdefs.h. */ 3647/* end confdefs.h. */
3648$ac_includes_default
2549int 3649int
2550main () 3650main ()
2551{ 3651{
3652
2552 /* Are we little or big endian? From Harbison&Steele. */ 3653 /* Are we little or big endian? From Harbison&Steele. */
2553 union 3654 union
2554 { 3655 {
2555 long l; 3656 long int l;
2556 char c[sizeof (long)]; 3657 char c[sizeof (long int)];
2557 } u; 3658 } u;
2558 u.l = 1; 3659 u.l = 1;
2559 exit (u.c[sizeof (long) - 1] == 1); 3660 return u.c[sizeof (long int) - 1] == 1;
3661
3662 ;
3663 return 0;
2560} 3664}
2561_ACEOF 3665_ACEOF
2562rm -f conftest$ac_exeext 3666rm -f conftest$ac_exeext
2563if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 3667if { (ac_try="$ac_link"
2564 (eval $ac_link) 2>&5 3668case "(($ac_try" in
3669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3670 *) ac_try_echo=$ac_try;;
3671esac
3672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3673 (eval "$ac_link") 2>&5
2565 ac_status=$? 3674 ac_status=$?
2566 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2567 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 3676 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 3677 { (case "(($ac_try" in
2569 (eval $ac_try) 2>&5 3678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3679 *) ac_try_echo=$ac_try;;
3680esac
3681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3682 (eval "$ac_try") 2>&5
2570 ac_status=$? 3683 ac_status=$?
2571 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2572 (exit $ac_status); }; }; then 3685 (exit $ac_status); }; }; then
@@ -2579,13 +3692,16 @@ sed 's/^/| /' conftest.$ac_ext >&5
2579( exit $ac_status ) 3692( exit $ac_status )
2580ac_cv_c_bigendian=yes 3693ac_cv_c_bigendian=yes
2581fi 3694fi
2582rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 3695rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2583fi 3696fi
3697
3698
2584fi 3699fi
2585rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 3700
3701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2586fi 3702fi
2587echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 3703{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
2588echo "${ECHO_T}$ac_cv_c_bigendian" >&6 3704echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
2589case $ac_cv_c_bigendian in 3705case $ac_cv_c_bigendian in
2590 yes) 3706 yes)
2591 3707
@@ -2609,8 +3725,8 @@ for ac_prog in gawk mawk nawk awk
2609do 3725do
2610 # Extract the first word of "$ac_prog", so it can be a program name with args. 3726 # Extract the first word of "$ac_prog", so it can be a program name with args.
2611set dummy $ac_prog; ac_word=$2 3727set dummy $ac_prog; ac_word=$2
2612echo "$as_me:$LINENO: checking for $ac_word" >&5 3728{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2613echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 3729echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2614if test "${ac_cv_prog_AWK+set}" = set; then 3730if test "${ac_cv_prog_AWK+set}" = set; then
2615 echo $ECHO_N "(cached) $ECHO_C" >&6 3731 echo $ECHO_N "(cached) $ECHO_C" >&6
2616else 3732else
@@ -2623,25 +3739,27 @@ do
2623 IFS=$as_save_IFS 3739 IFS=$as_save_IFS
2624 test -z "$as_dir" && as_dir=. 3740 test -z "$as_dir" && as_dir=.
2625 for ac_exec_ext in '' $ac_executable_extensions; do 3741 for ac_exec_ext in '' $ac_executable_extensions; do
2626 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 3742 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2627 ac_cv_prog_AWK="$ac_prog" 3743 ac_cv_prog_AWK="$ac_prog"
2628 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 3744 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2629 break 2 3745 break 2
2630 fi 3746 fi
2631done 3747done
2632done 3748done
3749IFS=$as_save_IFS
2633 3750
2634fi 3751fi
2635fi 3752fi
2636AWK=$ac_cv_prog_AWK 3753AWK=$ac_cv_prog_AWK
2637if test -n "$AWK"; then 3754if test -n "$AWK"; then
2638 echo "$as_me:$LINENO: result: $AWK" >&5 3755 { echo "$as_me:$LINENO: result: $AWK" >&5
2639echo "${ECHO_T}$AWK" >&6 3756echo "${ECHO_T}$AWK" >&6; }
2640else 3757else
2641 echo "$as_me:$LINENO: result: no" >&5 3758 { echo "$as_me:$LINENO: result: no" >&5
2642echo "${ECHO_T}no" >&6 3759echo "${ECHO_T}no" >&6; }
2643fi 3760fi
2644 3761
3762
2645 test -n "$AWK" && break 3763 test -n "$AWK" && break
2646done 3764done
2647 3765
@@ -2650,8 +3768,8 @@ ac_cpp='$CPP $CPPFLAGS'
2650ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 3768ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2651ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 3769ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2652ac_compiler_gnu=$ac_cv_c_compiler_gnu 3770ac_compiler_gnu=$ac_cv_c_compiler_gnu
2653echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 3771{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2654echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 3772echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
2655# On Suns, sometimes $CPP names a directory. 3773# On Suns, sometimes $CPP names a directory.
2656if test -n "$CPP" && test -d "$CPP"; then 3774if test -n "$CPP" && test -d "$CPP"; then
2657 CPP= 3775 CPP=
@@ -2685,24 +3803,22 @@ cat >>conftest.$ac_ext <<_ACEOF
2685#endif 3803#endif
2686 Syntax error 3804 Syntax error
2687_ACEOF 3805_ACEOF
2688if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 3806if { (ac_try="$ac_cpp conftest.$ac_ext"
2689 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 3807case "(($ac_try" in
3808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3809 *) ac_try_echo=$ac_try;;
3810esac
3811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3812 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2690 ac_status=$? 3813 ac_status=$?
2691 grep -v '^ *+' conftest.er1 >conftest.err 3814 grep -v '^ *+' conftest.er1 >conftest.err
2692 rm -f conftest.er1 3815 rm -f conftest.er1
2693 cat conftest.err >&5 3816 cat conftest.err >&5
2694 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2695 (exit $ac_status); } >/dev/null; then 3818 (exit $ac_status); } >/dev/null && {
2696 if test -s conftest.err; then 3819 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2697 ac_cpp_err=$ac_c_preproc_warn_flag 3820 test ! -s conftest.err
2698 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 3821 }; then
2699 else
2700 ac_cpp_err=
2701 fi
2702else
2703 ac_cpp_err=yes
2704fi
2705if test -z "$ac_cpp_err"; then
2706 : 3822 :
2707else 3823else
2708 echo "$as_me: failed program was:" >&5 3824 echo "$as_me: failed program was:" >&5
@@ -2711,9 +3827,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
2711 # Broken: fails on valid input. 3827 # Broken: fails on valid input.
2712continue 3828continue
2713fi 3829fi
3830
2714rm -f conftest.err conftest.$ac_ext 3831rm -f conftest.err conftest.$ac_ext
2715 3832
2716 # OK, works on sane cases. Now check whether non-existent headers 3833 # OK, works on sane cases. Now check whether nonexistent headers
2717 # can be detected and how. 3834 # can be detected and how.
2718 cat >conftest.$ac_ext <<_ACEOF 3835 cat >conftest.$ac_ext <<_ACEOF
2719/* confdefs.h. */ 3836/* confdefs.h. */
@@ -2723,24 +3840,22 @@ cat >>conftest.$ac_ext <<_ACEOF
2723/* end confdefs.h. */ 3840/* end confdefs.h. */
2724#include <ac_nonexistent.h> 3841#include <ac_nonexistent.h>
2725_ACEOF 3842_ACEOF
2726if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 3843if { (ac_try="$ac_cpp conftest.$ac_ext"
2727 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 3844case "(($ac_try" in
3845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3846 *) ac_try_echo=$ac_try;;
3847esac
3848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3849 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2728 ac_status=$? 3850 ac_status=$?
2729 grep -v '^ *+' conftest.er1 >conftest.err 3851 grep -v '^ *+' conftest.er1 >conftest.err
2730 rm -f conftest.er1 3852 rm -f conftest.er1
2731 cat conftest.err >&5 3853 cat conftest.err >&5
2732 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2733 (exit $ac_status); } >/dev/null; then 3855 (exit $ac_status); } >/dev/null && {
2734 if test -s conftest.err; then 3856 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2735 ac_cpp_err=$ac_c_preproc_warn_flag 3857 test ! -s conftest.err
2736 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 3858 }; then
2737 else
2738 ac_cpp_err=
2739 fi
2740else
2741 ac_cpp_err=yes
2742fi
2743if test -z "$ac_cpp_err"; then
2744 # Broken: success on invalid input. 3859 # Broken: success on invalid input.
2745continue 3860continue
2746else 3861else
@@ -2751,6 +3866,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
2751ac_preproc_ok=: 3866ac_preproc_ok=:
2752break 3867break
2753fi 3868fi
3869
2754rm -f conftest.err conftest.$ac_ext 3870rm -f conftest.err conftest.$ac_ext
2755 3871
2756done 3872done
@@ -2768,8 +3884,8 @@ fi
2768else 3884else
2769 ac_cv_prog_CPP=$CPP 3885 ac_cv_prog_CPP=$CPP
2770fi 3886fi
2771echo "$as_me:$LINENO: result: $CPP" >&5 3887{ echo "$as_me:$LINENO: result: $CPP" >&5
2772echo "${ECHO_T}$CPP" >&6 3888echo "${ECHO_T}$CPP" >&6; }
2773ac_preproc_ok=false 3889ac_preproc_ok=false
2774for ac_c_preproc_warn_flag in '' yes 3890for ac_c_preproc_warn_flag in '' yes
2775do 3891do
@@ -2792,24 +3908,22 @@ cat >>conftest.$ac_ext <<_ACEOF
2792#endif 3908#endif
2793 Syntax error 3909 Syntax error
2794_ACEOF 3910_ACEOF
2795if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 3911if { (ac_try="$ac_cpp conftest.$ac_ext"
2796 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 3912case "(($ac_try" in
3913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3914 *) ac_try_echo=$ac_try;;
3915esac
3916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3917 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2797 ac_status=$? 3918 ac_status=$?
2798 grep -v '^ *+' conftest.er1 >conftest.err 3919 grep -v '^ *+' conftest.er1 >conftest.err
2799 rm -f conftest.er1 3920 rm -f conftest.er1
2800 cat conftest.err >&5 3921 cat conftest.err >&5
2801 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2802 (exit $ac_status); } >/dev/null; then 3923 (exit $ac_status); } >/dev/null && {
2803 if test -s conftest.err; then 3924 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2804 ac_cpp_err=$ac_c_preproc_warn_flag 3925 test ! -s conftest.err
2805 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 3926 }; then
2806 else
2807 ac_cpp_err=
2808 fi
2809else
2810 ac_cpp_err=yes
2811fi
2812if test -z "$ac_cpp_err"; then
2813 : 3927 :
2814else 3928else
2815 echo "$as_me: failed program was:" >&5 3929 echo "$as_me: failed program was:" >&5
@@ -2818,9 +3932,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
2818 # Broken: fails on valid input. 3932 # Broken: fails on valid input.
2819continue 3933continue
2820fi 3934fi
3935
2821rm -f conftest.err conftest.$ac_ext 3936rm -f conftest.err conftest.$ac_ext
2822 3937
2823 # OK, works on sane cases. Now check whether non-existent headers 3938 # OK, works on sane cases. Now check whether nonexistent headers
2824 # can be detected and how. 3939 # can be detected and how.
2825 cat >conftest.$ac_ext <<_ACEOF 3940 cat >conftest.$ac_ext <<_ACEOF
2826/* confdefs.h. */ 3941/* confdefs.h. */
@@ -2830,24 +3945,22 @@ cat >>conftest.$ac_ext <<_ACEOF
2830/* end confdefs.h. */ 3945/* end confdefs.h. */
2831#include <ac_nonexistent.h> 3946#include <ac_nonexistent.h>
2832_ACEOF 3947_ACEOF
2833if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 3948if { (ac_try="$ac_cpp conftest.$ac_ext"
2834 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 3949case "(($ac_try" in
3950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3951 *) ac_try_echo=$ac_try;;
3952esac
3953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3954 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2835 ac_status=$? 3955 ac_status=$?
2836 grep -v '^ *+' conftest.er1 >conftest.err 3956 grep -v '^ *+' conftest.er1 >conftest.err
2837 rm -f conftest.er1 3957 rm -f conftest.er1
2838 cat conftest.err >&5 3958 cat conftest.err >&5
2839 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2840 (exit $ac_status); } >/dev/null; then 3960 (exit $ac_status); } >/dev/null && {
2841 if test -s conftest.err; then 3961 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2842 ac_cpp_err=$ac_c_preproc_warn_flag 3962 test ! -s conftest.err
2843 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 3963 }; then
2844 else
2845 ac_cpp_err=
2846 fi
2847else
2848 ac_cpp_err=yes
2849fi
2850if test -z "$ac_cpp_err"; then
2851 # Broken: success on invalid input. 3964 # Broken: success on invalid input.
2852continue 3965continue
2853else 3966else
@@ -2858,6 +3971,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
2858ac_preproc_ok=: 3971ac_preproc_ok=:
2859break 3972break
2860fi 3973fi
3974
2861rm -f conftest.err conftest.$ac_ext 3975rm -f conftest.err conftest.$ac_ext
2862 3976
2863done 3977done
@@ -2882,8 +3996,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
2882if test -n "$ac_tool_prefix"; then 3996if test -n "$ac_tool_prefix"; then
2883 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. 3997 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2884set dummy ${ac_tool_prefix}ranlib; ac_word=$2 3998set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2885echo "$as_me:$LINENO: checking for $ac_word" >&5 3999{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2886echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 4000echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2887if test "${ac_cv_prog_RANLIB+set}" = set; then 4001if test "${ac_cv_prog_RANLIB+set}" = set; then
2888 echo $ECHO_N "(cached) $ECHO_C" >&6 4002 echo $ECHO_N "(cached) $ECHO_C" >&6
2889else 4003else
@@ -2896,32 +4010,34 @@ do
2896 IFS=$as_save_IFS 4010 IFS=$as_save_IFS
2897 test -z "$as_dir" && as_dir=. 4011 test -z "$as_dir" && as_dir=.
2898 for ac_exec_ext in '' $ac_executable_extensions; do 4012 for ac_exec_ext in '' $ac_executable_extensions; do
2899 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4013 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2900 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" 4014 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2901 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4015 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2902 break 2 4016 break 2
2903 fi 4017 fi
2904done 4018done
2905done 4019done
4020IFS=$as_save_IFS
2906 4021
2907fi 4022fi
2908fi 4023fi
2909RANLIB=$ac_cv_prog_RANLIB 4024RANLIB=$ac_cv_prog_RANLIB
2910if test -n "$RANLIB"; then 4025if test -n "$RANLIB"; then
2911 echo "$as_me:$LINENO: result: $RANLIB" >&5 4026 { echo "$as_me:$LINENO: result: $RANLIB" >&5
2912echo "${ECHO_T}$RANLIB" >&6 4027echo "${ECHO_T}$RANLIB" >&6; }
2913else 4028else
2914 echo "$as_me:$LINENO: result: no" >&5 4029 { echo "$as_me:$LINENO: result: no" >&5
2915echo "${ECHO_T}no" >&6 4030echo "${ECHO_T}no" >&6; }
2916fi 4031fi
2917 4032
4033
2918fi 4034fi
2919if test -z "$ac_cv_prog_RANLIB"; then 4035if test -z "$ac_cv_prog_RANLIB"; then
2920 ac_ct_RANLIB=$RANLIB 4036 ac_ct_RANLIB=$RANLIB
2921 # Extract the first word of "ranlib", so it can be a program name with args. 4037 # Extract the first word of "ranlib", so it can be a program name with args.
2922set dummy ranlib; ac_word=$2 4038set dummy ranlib; ac_word=$2
2923echo "$as_me:$LINENO: checking for $ac_word" >&5 4039{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2924echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 4040echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2925if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then 4041if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2926 echo $ECHO_N "(cached) $ECHO_C" >&6 4042 echo $ECHO_N "(cached) $ECHO_C" >&6
2927else 4043else
@@ -2934,27 +4050,41 @@ do
2934 IFS=$as_save_IFS 4050 IFS=$as_save_IFS
2935 test -z "$as_dir" && as_dir=. 4051 test -z "$as_dir" && as_dir=.
2936 for ac_exec_ext in '' $ac_executable_extensions; do 4052 for ac_exec_ext in '' $ac_executable_extensions; do
2937 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4053 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2938 ac_cv_prog_ac_ct_RANLIB="ranlib" 4054 ac_cv_prog_ac_ct_RANLIB="ranlib"
2939 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4055 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2940 break 2 4056 break 2
2941 fi 4057 fi
2942done 4058done
2943done 4059done
4060IFS=$as_save_IFS
2944 4061
2945 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2946fi 4062fi
2947fi 4063fi
2948ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB 4064ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2949if test -n "$ac_ct_RANLIB"; then 4065if test -n "$ac_ct_RANLIB"; then
2950 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 4066 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
2951echo "${ECHO_T}$ac_ct_RANLIB" >&6 4067echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
2952else 4068else
2953 echo "$as_me:$LINENO: result: no" >&5 4069 { echo "$as_me:$LINENO: result: no" >&5
2954echo "${ECHO_T}no" >&6 4070echo "${ECHO_T}no" >&6; }
2955fi 4071fi
2956 4072
2957 RANLIB=$ac_ct_RANLIB 4073 if test "x$ac_ct_RANLIB" = x; then
4074 RANLIB=":"
4075 else
4076 case $cross_compiling:$ac_tool_warned in
4077yes:)
4078{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4079whose name does not start with the host triplet. If you think this
4080configuration is useful to you, please write to autoconf@gnu.org." >&5
4081echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4082whose name does not start with the host triplet. If you think this
4083configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4084ac_tool_warned=yes ;;
4085esac
4086 RANLIB=$ac_ct_RANLIB
4087 fi
2958else 4088else
2959 RANLIB="$ac_cv_prog_RANLIB" 4089 RANLIB="$ac_cv_prog_RANLIB"
2960fi 4090fi
@@ -2972,8 +4102,8 @@ fi
2972# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" 4102# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2973# OS/2's system install, which has a completely different semantic 4103# OS/2's system install, which has a completely different semantic
2974# ./install, which can be erroneously created by make from ./install.sh. 4104# ./install, which can be erroneously created by make from ./install.sh.
2975echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 4105{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2976echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 4106echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
2977if test -z "$INSTALL"; then 4107if test -z "$INSTALL"; then
2978if test "${ac_cv_path_install+set}" = set; then 4108if test "${ac_cv_path_install+set}" = set; then
2979 echo $ECHO_N "(cached) $ECHO_C" >&6 4109 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2995,7 +4125,7 @@ case $as_dir/ in
2995 # by default. 4125 # by default.
2996 for ac_prog in ginstall scoinst install; do 4126 for ac_prog in ginstall scoinst install; do
2997 for ac_exec_ext in '' $ac_executable_extensions; do 4127 for ac_exec_ext in '' $ac_executable_extensions; do
2998 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then 4128 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
2999 if test $ac_prog = install && 4129 if test $ac_prog = install &&
3000 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then 4130 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3001 # AIX install. It has an incompatible calling convention. 4131 # AIX install. It has an incompatible calling convention.
@@ -3014,21 +4144,22 @@ case $as_dir/ in
3014 ;; 4144 ;;
3015esac 4145esac
3016done 4146done
4147IFS=$as_save_IFS
3017 4148
3018 4149
3019fi 4150fi
3020 if test "${ac_cv_path_install+set}" = set; then 4151 if test "${ac_cv_path_install+set}" = set; then
3021 INSTALL=$ac_cv_path_install 4152 INSTALL=$ac_cv_path_install
3022 else 4153 else
3023 # As a last resort, use the slow shell script. We don't cache a 4154 # As a last resort, use the slow shell script. Don't cache a
3024 # path for INSTALL within a source directory, because that will 4155 # value for INSTALL within a source directory, because that will
3025 # break other packages using the cache if that directory is 4156 # break other packages using the cache if that directory is
3026 # removed, or if the path is relative. 4157 # removed, or if the value is a relative name.
3027 INSTALL=$ac_install_sh 4158 INSTALL=$ac_install_sh
3028 fi 4159 fi
3029fi 4160fi
3030echo "$as_me:$LINENO: result: $INSTALL" >&5 4161{ echo "$as_me:$LINENO: result: $INSTALL" >&5
3031echo "${ECHO_T}$INSTALL" >&6 4162echo "${ECHO_T}$INSTALL" >&6; }
3032 4163
3033# Use test -z because SunOS4 sh mishandles braces in ${var-val}. 4164# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3034# It thinks the first close brace ends the variable substitution. 4165# It thinks the first close brace ends the variable substitution.
@@ -3038,25 +4169,93 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3038 4169
3039test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' 4170test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3040 4171
3041echo "$as_me:$LINENO: checking for egrep" >&5 4172{ echo "$as_me:$LINENO: checking for egrep" >&5
3042echo $ECHO_N "checking for egrep... $ECHO_C" >&6 4173echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3043if test "${ac_cv_prog_egrep+set}" = set; then 4174if test "${ac_cv_path_EGREP+set}" = set; then
4175 echo $ECHO_N "(cached) $ECHO_C" >&6
4176else
4177 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4178 then ac_cv_path_EGREP="$GREP -E"
4179 else
4180 # Extract the first word of "egrep" to use in msg output
4181if test -z "$EGREP"; then
4182set dummy egrep; ac_prog_name=$2
4183if test "${ac_cv_path_EGREP+set}" = set; then
3044 echo $ECHO_N "(cached) $ECHO_C" >&6 4184 echo $ECHO_N "(cached) $ECHO_C" >&6
3045else 4185else
3046 if echo a | (grep -E '(a|b)') >/dev/null 2>&1 4186 ac_path_EGREP_found=false
3047 then ac_cv_prog_egrep='grep -E' 4187# Loop through the user's path and test for each of PROGNAME-LIST
3048 else ac_cv_prog_egrep='egrep' 4188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4189for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4190do
4191 IFS=$as_save_IFS
4192 test -z "$as_dir" && as_dir=.
4193 for ac_prog in egrep; do
4194 for ac_exec_ext in '' $ac_executable_extensions; do
4195 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4196 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4197 # Check for GNU ac_path_EGREP and select it if it is found.
4198 # Check for GNU $ac_path_EGREP
4199case `"$ac_path_EGREP" --version 2>&1` in
4200*GNU*)
4201 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4202*)
4203 ac_count=0
4204 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4205 while :
4206 do
4207 cat "conftest.in" "conftest.in" >"conftest.tmp"
4208 mv "conftest.tmp" "conftest.in"
4209 cp "conftest.in" "conftest.nl"
4210 echo 'EGREP' >> "conftest.nl"
4211 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4212 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4213 ac_count=`expr $ac_count + 1`
4214 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4215 # Best one so far, save it but keep looking for a better one
4216 ac_cv_path_EGREP="$ac_path_EGREP"
4217 ac_path_EGREP_max=$ac_count
3049 fi 4218 fi
4219 # 10*(2^10) chars as input seems more than enough
4220 test $ac_count -gt 10 && break
4221 done
4222 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4223esac
4224
4225
4226 $ac_path_EGREP_found && break 3
4227 done
4228done
4229
4230done
4231IFS=$as_save_IFS
4232
4233
4234fi
4235
4236EGREP="$ac_cv_path_EGREP"
4237if test -z "$EGREP"; then
4238 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4239echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4240 { (exit 1); exit 1; }; }
4241fi
4242
4243else
4244 ac_cv_path_EGREP=$EGREP
4245fi
4246
4247
4248 fi
3050fi 4249fi
3051echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 4250{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3052echo "${ECHO_T}$ac_cv_prog_egrep" >&6 4251echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3053 EGREP=$ac_cv_prog_egrep 4252 EGREP="$ac_cv_path_EGREP"
3054 4253
3055 4254
3056# Extract the first word of "ar", so it can be a program name with args. 4255# Extract the first word of "ar", so it can be a program name with args.
3057set dummy ar; ac_word=$2 4256set dummy ar; ac_word=$2
3058echo "$as_me:$LINENO: checking for $ac_word" >&5 4257{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3059echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 4258echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3060if test "${ac_cv_path_AR+set}" = set; then 4259if test "${ac_cv_path_AR+set}" = set; then
3061 echo $ECHO_N "(cached) $ECHO_C" >&6 4260 echo $ECHO_N "(cached) $ECHO_C" >&6
3062else 4261else
@@ -3071,31 +4270,32 @@ do
3071 IFS=$as_save_IFS 4270 IFS=$as_save_IFS
3072 test -z "$as_dir" && as_dir=. 4271 test -z "$as_dir" && as_dir=.
3073 for ac_exec_ext in '' $ac_executable_extensions; do 4272 for ac_exec_ext in '' $ac_executable_extensions; do
3074 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4273 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3075 ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext" 4274 ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
3076 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4275 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3077 break 2 4276 break 2
3078 fi 4277 fi
3079done 4278done
3080done 4279done
4280IFS=$as_save_IFS
3081 4281
3082 ;; 4282 ;;
3083esac 4283esac
3084fi 4284fi
3085AR=$ac_cv_path_AR 4285AR=$ac_cv_path_AR
3086
3087if test -n "$AR"; then 4286if test -n "$AR"; then
3088 echo "$as_me:$LINENO: result: $AR" >&5 4287 { echo "$as_me:$LINENO: result: $AR" >&5
3089echo "${ECHO_T}$AR" >&6 4288echo "${ECHO_T}$AR" >&6; }
3090else 4289else
3091 echo "$as_me:$LINENO: result: no" >&5 4290 { echo "$as_me:$LINENO: result: no" >&5
3092echo "${ECHO_T}no" >&6 4291echo "${ECHO_T}no" >&6; }
3093fi 4292fi
3094 4293
4294
3095# Extract the first word of "cat", so it can be a program name with args. 4295# Extract the first word of "cat", so it can be a program name with args.
3096set dummy cat; ac_word=$2 4296set dummy cat; ac_word=$2
3097echo "$as_me:$LINENO: checking for $ac_word" >&5 4297{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3098echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 4298echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3099if test "${ac_cv_path_CAT+set}" = set; then 4299if test "${ac_cv_path_CAT+set}" = set; then
3100 echo $ECHO_N "(cached) $ECHO_C" >&6 4300 echo $ECHO_N "(cached) $ECHO_C" >&6
3101else 4301else
@@ -3110,31 +4310,32 @@ do
3110 IFS=$as_save_IFS 4310 IFS=$as_save_IFS
3111 test -z "$as_dir" && as_dir=. 4311 test -z "$as_dir" && as_dir=.
3112 for ac_exec_ext in '' $ac_executable_extensions; do 4312 for ac_exec_ext in '' $ac_executable_extensions; do
3113 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4313 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3114 ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext" 4314 ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3115 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4315 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3116 break 2 4316 break 2
3117 fi 4317 fi
3118done 4318done
3119done 4319done
4320IFS=$as_save_IFS
3120 4321
3121 ;; 4322 ;;
3122esac 4323esac
3123fi 4324fi
3124CAT=$ac_cv_path_CAT 4325CAT=$ac_cv_path_CAT
3125
3126if test -n "$CAT"; then 4326if test -n "$CAT"; then
3127 echo "$as_me:$LINENO: result: $CAT" >&5 4327 { echo "$as_me:$LINENO: result: $CAT" >&5
3128echo "${ECHO_T}$CAT" >&6 4328echo "${ECHO_T}$CAT" >&6; }
3129else 4329else
3130 echo "$as_me:$LINENO: result: no" >&5 4330 { echo "$as_me:$LINENO: result: no" >&5
3131echo "${ECHO_T}no" >&6 4331echo "${ECHO_T}no" >&6; }
3132fi 4332fi
3133 4333
4334
3134# Extract the first word of "kill", so it can be a program name with args. 4335# Extract the first word of "kill", so it can be a program name with args.
3135set dummy kill; ac_word=$2 4336set dummy kill; ac_word=$2
3136echo "$as_me:$LINENO: checking for $ac_word" >&5 4337{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3137echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 4338echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3138if test "${ac_cv_path_KILL+set}" = set; then 4339if test "${ac_cv_path_KILL+set}" = set; then
3139 echo $ECHO_N "(cached) $ECHO_C" >&6 4340 echo $ECHO_N "(cached) $ECHO_C" >&6
3140else 4341else
@@ -3149,33 +4350,34 @@ do
3149 IFS=$as_save_IFS 4350 IFS=$as_save_IFS
3150 test -z "$as_dir" && as_dir=. 4351 test -z "$as_dir" && as_dir=.
3151 for ac_exec_ext in '' $ac_executable_extensions; do 4352 for ac_exec_ext in '' $ac_executable_extensions; do
3152 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4353 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3153 ac_cv_path_KILL="$as_dir/$ac_word$ac_exec_ext" 4354 ac_cv_path_KILL="$as_dir/$ac_word$ac_exec_ext"
3154 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4355 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3155 break 2 4356 break 2
3156 fi 4357 fi
3157done 4358done
3158done 4359done
4360IFS=$as_save_IFS
3159 4361
3160 ;; 4362 ;;
3161esac 4363esac
3162fi 4364fi
3163KILL=$ac_cv_path_KILL 4365KILL=$ac_cv_path_KILL
3164
3165if test -n "$KILL"; then 4366if test -n "$KILL"; then
3166 echo "$as_me:$LINENO: result: $KILL" >&5 4367 { echo "$as_me:$LINENO: result: $KILL" >&5
3167echo "${ECHO_T}$KILL" >&6 4368echo "${ECHO_T}$KILL" >&6; }
3168else 4369else
3169 echo "$as_me:$LINENO: result: no" >&5 4370 { echo "$as_me:$LINENO: result: no" >&5
3170echo "${ECHO_T}no" >&6 4371echo "${ECHO_T}no" >&6; }
3171fi 4372fi
3172 4373
4374
3173for ac_prog in perl5 perl 4375for ac_prog in perl5 perl
3174do 4376do
3175 # Extract the first word of "$ac_prog", so it can be a program name with args. 4377 # Extract the first word of "$ac_prog", so it can be a program name with args.
3176set dummy $ac_prog; ac_word=$2 4378set dummy $ac_prog; ac_word=$2
3177echo "$as_me:$LINENO: checking for $ac_word" >&5 4379{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3178echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 4380echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3179if test "${ac_cv_path_PERL+set}" = set; then 4381if test "${ac_cv_path_PERL+set}" = set; then
3180 echo $ECHO_N "(cached) $ECHO_C" >&6 4382 echo $ECHO_N "(cached) $ECHO_C" >&6
3181else 4383else
@@ -3190,34 +4392,35 @@ do
3190 IFS=$as_save_IFS 4392 IFS=$as_save_IFS
3191 test -z "$as_dir" && as_dir=. 4393 test -z "$as_dir" && as_dir=.
3192 for ac_exec_ext in '' $ac_executable_extensions; do 4394 for ac_exec_ext in '' $ac_executable_extensions; do
3193 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4395 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3194 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" 4396 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
3195 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4397 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3196 break 2 4398 break 2
3197 fi 4399 fi
3198done 4400done
3199done 4401done
4402IFS=$as_save_IFS
3200 4403
3201 ;; 4404 ;;
3202esac 4405esac
3203fi 4406fi
3204PERL=$ac_cv_path_PERL 4407PERL=$ac_cv_path_PERL
3205
3206if test -n "$PERL"; then 4408if test -n "$PERL"; then
3207 echo "$as_me:$LINENO: result: $PERL" >&5 4409 { echo "$as_me:$LINENO: result: $PERL" >&5
3208echo "${ECHO_T}$PERL" >&6 4410echo "${ECHO_T}$PERL" >&6; }
3209else 4411else
3210 echo "$as_me:$LINENO: result: no" >&5 4412 { echo "$as_me:$LINENO: result: no" >&5
3211echo "${ECHO_T}no" >&6 4413echo "${ECHO_T}no" >&6; }
3212fi 4414fi
3213 4415
4416
3214 test -n "$PERL" && break 4417 test -n "$PERL" && break
3215done 4418done
3216 4419
3217# Extract the first word of "sed", so it can be a program name with args. 4420# Extract the first word of "sed", so it can be a program name with args.
3218set dummy sed; ac_word=$2 4421set dummy sed; ac_word=$2
3219echo "$as_me:$LINENO: checking for $ac_word" >&5 4422{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3220echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 4423echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3221if test "${ac_cv_path_SED+set}" = set; then 4424if test "${ac_cv_path_SED+set}" = set; then
3222 echo $ECHO_N "(cached) $ECHO_C" >&6 4425 echo $ECHO_N "(cached) $ECHO_C" >&6
3223else 4426else
@@ -3232,32 +4435,33 @@ do
3232 IFS=$as_save_IFS 4435 IFS=$as_save_IFS
3233 test -z "$as_dir" && as_dir=. 4436 test -z "$as_dir" && as_dir=.
3234 for ac_exec_ext in '' $ac_executable_extensions; do 4437 for ac_exec_ext in '' $ac_executable_extensions; do
3235 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4438 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3236 ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" 4439 ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
3237 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4440 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3238 break 2 4441 break 2
3239 fi 4442 fi
3240done 4443done
3241done 4444done
4445IFS=$as_save_IFS
3242 4446
3243 ;; 4447 ;;
3244esac 4448esac
3245fi 4449fi
3246SED=$ac_cv_path_SED 4450SED=$ac_cv_path_SED
3247
3248if test -n "$SED"; then 4451if test -n "$SED"; then
3249 echo "$as_me:$LINENO: result: $SED" >&5 4452 { echo "$as_me:$LINENO: result: $SED" >&5
3250echo "${ECHO_T}$SED" >&6 4453echo "${ECHO_T}$SED" >&6; }
3251else 4454else
3252 echo "$as_me:$LINENO: result: no" >&5 4455 { echo "$as_me:$LINENO: result: no" >&5
3253echo "${ECHO_T}no" >&6 4456echo "${ECHO_T}no" >&6; }
3254fi 4457fi
3255 4458
3256 4459
4460
3257# Extract the first word of "ent", so it can be a program name with args. 4461# Extract the first word of "ent", so it can be a program name with args.
3258set dummy ent; ac_word=$2 4462set dummy ent; ac_word=$2
3259echo "$as_me:$LINENO: checking for $ac_word" >&5 4463{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3260echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 4464echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3261if test "${ac_cv_path_ENT+set}" = set; then 4465if test "${ac_cv_path_ENT+set}" = set; then
3262 echo $ECHO_N "(cached) $ECHO_C" >&6 4466 echo $ECHO_N "(cached) $ECHO_C" >&6
3263else 4467else
@@ -3272,32 +4476,33 @@ do
3272 IFS=$as_save_IFS 4476 IFS=$as_save_IFS
3273 test -z "$as_dir" && as_dir=. 4477 test -z "$as_dir" && as_dir=.
3274 for ac_exec_ext in '' $ac_executable_extensions; do 4478 for ac_exec_ext in '' $ac_executable_extensions; do
3275 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4479 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3276 ac_cv_path_ENT="$as_dir/$ac_word$ac_exec_ext" 4480 ac_cv_path_ENT="$as_dir/$ac_word$ac_exec_ext"
3277 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4481 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3278 break 2 4482 break 2
3279 fi 4483 fi
3280done 4484done
3281done 4485done
4486IFS=$as_save_IFS
3282 4487
3283 ;; 4488 ;;
3284esac 4489esac
3285fi 4490fi
3286ENT=$ac_cv_path_ENT 4491ENT=$ac_cv_path_ENT
3287
3288if test -n "$ENT"; then 4492if test -n "$ENT"; then
3289 echo "$as_me:$LINENO: result: $ENT" >&5 4493 { echo "$as_me:$LINENO: result: $ENT" >&5
3290echo "${ECHO_T}$ENT" >&6 4494echo "${ECHO_T}$ENT" >&6; }
3291else 4495else
3292 echo "$as_me:$LINENO: result: no" >&5 4496 { echo "$as_me:$LINENO: result: no" >&5
3293echo "${ECHO_T}no" >&6 4497echo "${ECHO_T}no" >&6; }
3294fi 4498fi
3295 4499
3296 4500
4501
3297# Extract the first word of "bash", so it can be a program name with args. 4502# Extract the first word of "bash", so it can be a program name with args.
3298set dummy bash; ac_word=$2 4503set dummy bash; ac_word=$2
3299echo "$as_me:$LINENO: checking for $ac_word" >&5 4504{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3300echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 4505echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3301if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then 4506if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then
3302 echo $ECHO_N "(cached) $ECHO_C" >&6 4507 echo $ECHO_N "(cached) $ECHO_C" >&6
3303else 4508else
@@ -3312,31 +4517,32 @@ do
3312 IFS=$as_save_IFS 4517 IFS=$as_save_IFS
3313 test -z "$as_dir" && as_dir=. 4518 test -z "$as_dir" && as_dir=.
3314 for ac_exec_ext in '' $ac_executable_extensions; do 4519 for ac_exec_ext in '' $ac_executable_extensions; do
3315 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4520 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3316 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext" 4521 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
3317 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4522 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3318 break 2 4523 break 2
3319 fi 4524 fi
3320done 4525done
3321done 4526done
4527IFS=$as_save_IFS
3322 4528
3323 ;; 4529 ;;
3324esac 4530esac
3325fi 4531fi
3326TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH 4532TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
3327
3328if test -n "$TEST_MINUS_S_SH"; then 4533if test -n "$TEST_MINUS_S_SH"; then
3329 echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5 4534 { echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5
3330echo "${ECHO_T}$TEST_MINUS_S_SH" >&6 4535echo "${ECHO_T}$TEST_MINUS_S_SH" >&6; }
3331else 4536else
3332 echo "$as_me:$LINENO: result: no" >&5 4537 { echo "$as_me:$LINENO: result: no" >&5
3333echo "${ECHO_T}no" >&6 4538echo "${ECHO_T}no" >&6; }
3334fi 4539fi
3335 4540
4541
3336# Extract the first word of "ksh", so it can be a program name with args. 4542# Extract the first word of "ksh", so it can be a program name with args.
3337set dummy ksh; ac_word=$2 4543set dummy ksh; ac_word=$2
3338echo "$as_me:$LINENO: checking for $ac_word" >&5 4544{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3339echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 4545echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3340if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then 4546if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then
3341 echo $ECHO_N "(cached) $ECHO_C" >&6 4547 echo $ECHO_N "(cached) $ECHO_C" >&6
3342else 4548else
@@ -3351,31 +4557,32 @@ do
3351 IFS=$as_save_IFS 4557 IFS=$as_save_IFS
3352 test -z "$as_dir" && as_dir=. 4558 test -z "$as_dir" && as_dir=.
3353 for ac_exec_ext in '' $ac_executable_extensions; do 4559 for ac_exec_ext in '' $ac_executable_extensions; do
3354 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4560 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3355 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext" 4561 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
3356 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4562 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3357 break 2 4563 break 2
3358 fi 4564 fi
3359done 4565done
3360done 4566done
4567IFS=$as_save_IFS
3361 4568
3362 ;; 4569 ;;
3363esac 4570esac
3364fi 4571fi
3365TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH 4572TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
3366
3367if test -n "$TEST_MINUS_S_SH"; then 4573if test -n "$TEST_MINUS_S_SH"; then
3368 echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5 4574 { echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5
3369echo "${ECHO_T}$TEST_MINUS_S_SH" >&6 4575echo "${ECHO_T}$TEST_MINUS_S_SH" >&6; }
3370else 4576else
3371 echo "$as_me:$LINENO: result: no" >&5 4577 { echo "$as_me:$LINENO: result: no" >&5
3372echo "${ECHO_T}no" >&6 4578echo "${ECHO_T}no" >&6; }
3373fi 4579fi
3374 4580
4581
3375# Extract the first word of "sh", so it can be a program name with args. 4582# Extract the first word of "sh", so it can be a program name with args.
3376set dummy sh; ac_word=$2 4583set dummy sh; ac_word=$2
3377echo "$as_me:$LINENO: checking for $ac_word" >&5 4584{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3378echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 4585echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3379if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then 4586if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then
3380 echo $ECHO_N "(cached) $ECHO_C" >&6 4587 echo $ECHO_N "(cached) $ECHO_C" >&6
3381else 4588else
@@ -3390,31 +4597,32 @@ do
3390 IFS=$as_save_IFS 4597 IFS=$as_save_IFS
3391 test -z "$as_dir" && as_dir=. 4598 test -z "$as_dir" && as_dir=.
3392 for ac_exec_ext in '' $ac_executable_extensions; do 4599 for ac_exec_ext in '' $ac_executable_extensions; do
3393 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4600 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3394 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext" 4601 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
3395 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4602 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3396 break 2 4603 break 2
3397 fi 4604 fi
3398done 4605done
3399done 4606done
4607IFS=$as_save_IFS
3400 4608
3401 ;; 4609 ;;
3402esac 4610esac
3403fi 4611fi
3404TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH 4612TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
3405
3406if test -n "$TEST_MINUS_S_SH"; then 4613if test -n "$TEST_MINUS_S_SH"; then
3407 echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5 4614 { echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5
3408echo "${ECHO_T}$TEST_MINUS_S_SH" >&6 4615echo "${ECHO_T}$TEST_MINUS_S_SH" >&6; }
3409else 4616else
3410 echo "$as_me:$LINENO: result: no" >&5 4617 { echo "$as_me:$LINENO: result: no" >&5
3411echo "${ECHO_T}no" >&6 4618echo "${ECHO_T}no" >&6; }
3412fi 4619fi
3413 4620
4621
3414# Extract the first word of "sh", so it can be a program name with args. 4622# Extract the first word of "sh", so it can be a program name with args.
3415set dummy sh; ac_word=$2 4623set dummy sh; ac_word=$2
3416echo "$as_me:$LINENO: checking for $ac_word" >&5 4624{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3417echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 4625echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3418if test "${ac_cv_path_SH+set}" = set; then 4626if test "${ac_cv_path_SH+set}" = set; then
3419 echo $ECHO_N "(cached) $ECHO_C" >&6 4627 echo $ECHO_N "(cached) $ECHO_C" >&6
3420else 4628else
@@ -3429,34 +4637,35 @@ do
3429 IFS=$as_save_IFS 4637 IFS=$as_save_IFS
3430 test -z "$as_dir" && as_dir=. 4638 test -z "$as_dir" && as_dir=.
3431 for ac_exec_ext in '' $ac_executable_extensions; do 4639 for ac_exec_ext in '' $ac_executable_extensions; do
3432 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4640 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3433 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext" 4641 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
3434 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4642 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3435 break 2 4643 break 2
3436 fi 4644 fi
3437done 4645done
3438done 4646done
4647IFS=$as_save_IFS
3439 4648
3440 ;; 4649 ;;
3441esac 4650esac
3442fi 4651fi
3443SH=$ac_cv_path_SH 4652SH=$ac_cv_path_SH
3444
3445if test -n "$SH"; then 4653if test -n "$SH"; then
3446 echo "$as_me:$LINENO: result: $SH" >&5 4654 { echo "$as_me:$LINENO: result: $SH" >&5
3447echo "${ECHO_T}$SH" >&6 4655echo "${ECHO_T}$SH" >&6; }
3448else 4656else
3449 echo "$as_me:$LINENO: result: no" >&5 4657 { echo "$as_me:$LINENO: result: no" >&5
3450echo "${ECHO_T}no" >&6 4658echo "${ECHO_T}no" >&6; }
3451fi 4659fi
3452 4660
4661
3453TEST_SHELL=sh 4662TEST_SHELL=sh
3454 4663
3455 4664
3456# Extract the first word of "groupadd", so it can be a program name with args. 4665# Extract the first word of "groupadd", so it can be a program name with args.
3457set dummy groupadd; ac_word=$2 4666set dummy groupadd; ac_word=$2
3458echo "$as_me:$LINENO: checking for $ac_word" >&5 4667{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3459echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 4668echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3460if test "${ac_cv_path_PATH_GROUPADD_PROG+set}" = set; then 4669if test "${ac_cv_path_PATH_GROUPADD_PROG+set}" = set; then
3461 echo $ECHO_N "(cached) $ECHO_C" >&6 4670 echo $ECHO_N "(cached) $ECHO_C" >&6
3462else 4671else
@@ -3471,32 +4680,33 @@ do
3471 IFS=$as_save_IFS 4680 IFS=$as_save_IFS
3472 test -z "$as_dir" && as_dir=. 4681 test -z "$as_dir" && as_dir=.
3473 for ac_exec_ext in '' $ac_executable_extensions; do 4682 for ac_exec_ext in '' $ac_executable_extensions; do
3474 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4683 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3475 ac_cv_path_PATH_GROUPADD_PROG="$as_dir/$ac_word$ac_exec_ext" 4684 ac_cv_path_PATH_GROUPADD_PROG="$as_dir/$ac_word$ac_exec_ext"
3476 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4685 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3477 break 2 4686 break 2
3478 fi 4687 fi
3479done 4688done
3480done 4689done
4690IFS=$as_save_IFS
3481 4691
3482 test -z "$ac_cv_path_PATH_GROUPADD_PROG" && ac_cv_path_PATH_GROUPADD_PROG="groupadd" 4692 test -z "$ac_cv_path_PATH_GROUPADD_PROG" && ac_cv_path_PATH_GROUPADD_PROG="groupadd"
3483 ;; 4693 ;;
3484esac 4694esac
3485fi 4695fi
3486PATH_GROUPADD_PROG=$ac_cv_path_PATH_GROUPADD_PROG 4696PATH_GROUPADD_PROG=$ac_cv_path_PATH_GROUPADD_PROG
3487
3488if test -n "$PATH_GROUPADD_PROG"; then 4697if test -n "$PATH_GROUPADD_PROG"; then
3489 echo "$as_me:$LINENO: result: $PATH_GROUPADD_PROG" >&5 4698 { echo "$as_me:$LINENO: result: $PATH_GROUPADD_PROG" >&5
3490echo "${ECHO_T}$PATH_GROUPADD_PROG" >&6 4699echo "${ECHO_T}$PATH_GROUPADD_PROG" >&6; }
3491else 4700else
3492 echo "$as_me:$LINENO: result: no" >&5 4701 { echo "$as_me:$LINENO: result: no" >&5
3493echo "${ECHO_T}no" >&6 4702echo "${ECHO_T}no" >&6; }
3494fi 4703fi
3495 4704
4705
3496# Extract the first word of "useradd", so it can be a program name with args. 4706# Extract the first word of "useradd", so it can be a program name with args.
3497set dummy useradd; ac_word=$2 4707set dummy useradd; ac_word=$2
3498echo "$as_me:$LINENO: checking for $ac_word" >&5 4708{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3499echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 4709echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3500if test "${ac_cv_path_PATH_USERADD_PROG+set}" = set; then 4710if test "${ac_cv_path_PATH_USERADD_PROG+set}" = set; then
3501 echo $ECHO_N "(cached) $ECHO_C" >&6 4711 echo $ECHO_N "(cached) $ECHO_C" >&6
3502else 4712else
@@ -3511,32 +4721,33 @@ do
3511 IFS=$as_save_IFS 4721 IFS=$as_save_IFS
3512 test -z "$as_dir" && as_dir=. 4722 test -z "$as_dir" && as_dir=.
3513 for ac_exec_ext in '' $ac_executable_extensions; do 4723 for ac_exec_ext in '' $ac_executable_extensions; do
3514 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4724 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3515 ac_cv_path_PATH_USERADD_PROG="$as_dir/$ac_word$ac_exec_ext" 4725 ac_cv_path_PATH_USERADD_PROG="$as_dir/$ac_word$ac_exec_ext"
3516 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4726 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3517 break 2 4727 break 2
3518 fi 4728 fi
3519done 4729done
3520done 4730done
4731IFS=$as_save_IFS
3521 4732
3522 test -z "$ac_cv_path_PATH_USERADD_PROG" && ac_cv_path_PATH_USERADD_PROG="useradd" 4733 test -z "$ac_cv_path_PATH_USERADD_PROG" && ac_cv_path_PATH_USERADD_PROG="useradd"
3523 ;; 4734 ;;
3524esac 4735esac
3525fi 4736fi
3526PATH_USERADD_PROG=$ac_cv_path_PATH_USERADD_PROG 4737PATH_USERADD_PROG=$ac_cv_path_PATH_USERADD_PROG
3527
3528if test -n "$PATH_USERADD_PROG"; then 4738if test -n "$PATH_USERADD_PROG"; then
3529 echo "$as_me:$LINENO: result: $PATH_USERADD_PROG" >&5 4739 { echo "$as_me:$LINENO: result: $PATH_USERADD_PROG" >&5
3530echo "${ECHO_T}$PATH_USERADD_PROG" >&6 4740echo "${ECHO_T}$PATH_USERADD_PROG" >&6; }
3531else 4741else
3532 echo "$as_me:$LINENO: result: no" >&5 4742 { echo "$as_me:$LINENO: result: no" >&5
3533echo "${ECHO_T}no" >&6 4743echo "${ECHO_T}no" >&6; }
3534fi 4744fi
3535 4745
4746
3536# Extract the first word of "pkgmk", so it can be a program name with args. 4747# Extract the first word of "pkgmk", so it can be a program name with args.
3537set dummy pkgmk; ac_word=$2 4748set dummy pkgmk; ac_word=$2
3538echo "$as_me:$LINENO: checking for $ac_word" >&5 4749{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3539echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 4750echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3540if test "${ac_cv_prog_MAKE_PACKAGE_SUPPORTED+set}" = set; then 4751if test "${ac_cv_prog_MAKE_PACKAGE_SUPPORTED+set}" = set; then
3541 echo $ECHO_N "(cached) $ECHO_C" >&6 4752 echo $ECHO_N "(cached) $ECHO_C" >&6
3542else 4753else
@@ -3549,26 +4760,28 @@ do
3549 IFS=$as_save_IFS 4760 IFS=$as_save_IFS
3550 test -z "$as_dir" && as_dir=. 4761 test -z "$as_dir" && as_dir=.
3551 for ac_exec_ext in '' $ac_executable_extensions; do 4762 for ac_exec_ext in '' $ac_executable_extensions; do
3552 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4763 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3553 ac_cv_prog_MAKE_PACKAGE_SUPPORTED="yes" 4764 ac_cv_prog_MAKE_PACKAGE_SUPPORTED="yes"
3554 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4765 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3555 break 2 4766 break 2
3556 fi 4767 fi
3557done 4768done
3558done 4769done
4770IFS=$as_save_IFS
3559 4771
3560 test -z "$ac_cv_prog_MAKE_PACKAGE_SUPPORTED" && ac_cv_prog_MAKE_PACKAGE_SUPPORTED="no" 4772 test -z "$ac_cv_prog_MAKE_PACKAGE_SUPPORTED" && ac_cv_prog_MAKE_PACKAGE_SUPPORTED="no"
3561fi 4773fi
3562fi 4774fi
3563MAKE_PACKAGE_SUPPORTED=$ac_cv_prog_MAKE_PACKAGE_SUPPORTED 4775MAKE_PACKAGE_SUPPORTED=$ac_cv_prog_MAKE_PACKAGE_SUPPORTED
3564if test -n "$MAKE_PACKAGE_SUPPORTED"; then 4776if test -n "$MAKE_PACKAGE_SUPPORTED"; then
3565 echo "$as_me:$LINENO: result: $MAKE_PACKAGE_SUPPORTED" >&5 4777 { echo "$as_me:$LINENO: result: $MAKE_PACKAGE_SUPPORTED" >&5
3566echo "${ECHO_T}$MAKE_PACKAGE_SUPPORTED" >&6 4778echo "${ECHO_T}$MAKE_PACKAGE_SUPPORTED" >&6; }
3567else 4779else
3568 echo "$as_me:$LINENO: result: no" >&5 4780 { echo "$as_me:$LINENO: result: no" >&5
3569echo "${ECHO_T}no" >&6 4781echo "${ECHO_T}no" >&6; }
3570fi 4782fi
3571 4783
4784
3572if test -x /sbin/sh; then 4785if test -x /sbin/sh; then
3573 STARTUP_SCRIPT_SHELL=/sbin/sh 4786 STARTUP_SCRIPT_SHELL=/sbin/sh
3574 4787
@@ -3578,15 +4791,15 @@ else
3578fi 4791fi
3579 4792
3580# System features 4793# System features
3581# Check whether --enable-largefile or --disable-largefile was given. 4794# Check whether --enable-largefile was given.
3582if test "${enable_largefile+set}" = set; then 4795if test "${enable_largefile+set}" = set; then
3583 enableval="$enable_largefile" 4796 enableval=$enable_largefile;
4797fi
3584 4798
3585fi;
3586if test "$enable_largefile" != no; then 4799if test "$enable_largefile" != no; then
3587 4800
3588 echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 4801 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
3589echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6 4802echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
3590if test "${ac_cv_sys_largefile_CC+set}" = set; then 4803if test "${ac_cv_sys_largefile_CC+set}" = set; then
3591 echo $ECHO_N "(cached) $ECHO_C" >&6 4804 echo $ECHO_N "(cached) $ECHO_C" >&6
3592else 4805else
@@ -3594,8 +4807,8 @@ else
3594 if test "$GCC" != yes; then 4807 if test "$GCC" != yes; then
3595 ac_save_CC=$CC 4808 ac_save_CC=$CC
3596 while :; do 4809 while :; do
3597 # IRIX 6.2 and later do not support large files by default, 4810 # IRIX 6.2 and later do not support large files by default,
3598 # so use the C compiler's -n32 option if that helps. 4811 # so use the C compiler's -n32 option if that helps.
3599 cat >conftest.$ac_ext <<_ACEOF 4812 cat >conftest.$ac_ext <<_ACEOF
3600/* confdefs.h. */ 4813/* confdefs.h. */
3601_ACEOF 4814_ACEOF
@@ -3619,84 +4832,77 @@ main ()
3619 return 0; 4832 return 0;
3620} 4833}
3621_ACEOF 4834_ACEOF
3622 rm -f conftest.$ac_objext 4835 rm -f conftest.$ac_objext
3623if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 4836if { (ac_try="$ac_compile"
3624 (eval $ac_compile) 2>conftest.er1 4837case "(($ac_try" in
4838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4839 *) ac_try_echo=$ac_try;;
4840esac
4841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4842 (eval "$ac_compile") 2>conftest.er1
3625 ac_status=$? 4843 ac_status=$?
3626 grep -v '^ *+' conftest.er1 >conftest.err 4844 grep -v '^ *+' conftest.er1 >conftest.err
3627 rm -f conftest.er1 4845 rm -f conftest.er1
3628 cat conftest.err >&5 4846 cat conftest.err >&5
3629 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3630 (exit $ac_status); } && 4848 (exit $ac_status); } && {
3631 { ac_try='test -z "$ac_c_werror_flag" 4849 test -z "$ac_c_werror_flag" ||
3632 || test ! -s conftest.err' 4850 test ! -s conftest.err
3633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4851 } && test -s conftest.$ac_objext; then
3634 (eval $ac_try) 2>&5
3635 ac_status=$?
3636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3637 (exit $ac_status); }; } &&
3638 { ac_try='test -s conftest.$ac_objext'
3639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3640 (eval $ac_try) 2>&5
3641 ac_status=$?
3642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3643 (exit $ac_status); }; }; then
3644 break 4852 break
3645else 4853else
3646 echo "$as_me: failed program was:" >&5 4854 echo "$as_me: failed program was:" >&5
3647sed 's/^/| /' conftest.$ac_ext >&5 4855sed 's/^/| /' conftest.$ac_ext >&5
3648 4856
4857
3649fi 4858fi
3650rm -f conftest.err conftest.$ac_objext 4859
3651 CC="$CC -n32" 4860rm -f core conftest.err conftest.$ac_objext
3652 rm -f conftest.$ac_objext 4861 CC="$CC -n32"
3653if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 4862 rm -f conftest.$ac_objext
3654 (eval $ac_compile) 2>conftest.er1 4863if { (ac_try="$ac_compile"
4864case "(($ac_try" in
4865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4866 *) ac_try_echo=$ac_try;;
4867esac
4868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4869 (eval "$ac_compile") 2>conftest.er1
3655 ac_status=$? 4870 ac_status=$?
3656 grep -v '^ *+' conftest.er1 >conftest.err 4871 grep -v '^ *+' conftest.er1 >conftest.err
3657 rm -f conftest.er1 4872 rm -f conftest.er1
3658 cat conftest.err >&5 4873 cat conftest.err >&5
3659 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3660 (exit $ac_status); } && 4875 (exit $ac_status); } && {
3661 { ac_try='test -z "$ac_c_werror_flag" 4876 test -z "$ac_c_werror_flag" ||
3662 || test ! -s conftest.err' 4877 test ! -s conftest.err
3663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4878 } && test -s conftest.$ac_objext; then
3664 (eval $ac_try) 2>&5
3665 ac_status=$?
3666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3667 (exit $ac_status); }; } &&
3668 { ac_try='test -s conftest.$ac_objext'
3669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3670 (eval $ac_try) 2>&5
3671 ac_status=$?
3672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3673 (exit $ac_status); }; }; then
3674 ac_cv_sys_largefile_CC=' -n32'; break 4879 ac_cv_sys_largefile_CC=' -n32'; break
3675else 4880else
3676 echo "$as_me: failed program was:" >&5 4881 echo "$as_me: failed program was:" >&5
3677sed 's/^/| /' conftest.$ac_ext >&5 4882sed 's/^/| /' conftest.$ac_ext >&5
3678 4883
4884
3679fi 4885fi
3680rm -f conftest.err conftest.$ac_objext 4886
4887rm -f core conftest.err conftest.$ac_objext
3681 break 4888 break
3682 done 4889 done
3683 CC=$ac_save_CC 4890 CC=$ac_save_CC
3684 rm -f conftest.$ac_ext 4891 rm -f conftest.$ac_ext
3685 fi 4892 fi
3686fi 4893fi
3687echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 4894{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
3688echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 4895echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
3689 if test "$ac_cv_sys_largefile_CC" != no; then 4896 if test "$ac_cv_sys_largefile_CC" != no; then
3690 CC=$CC$ac_cv_sys_largefile_CC 4897 CC=$CC$ac_cv_sys_largefile_CC
3691 fi 4898 fi
3692 4899
3693 echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 4900 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
3694echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 4901echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
3695if test "${ac_cv_sys_file_offset_bits+set}" = set; then 4902if test "${ac_cv_sys_file_offset_bits+set}" = set; then
3696 echo $ECHO_N "(cached) $ECHO_C" >&6 4903 echo $ECHO_N "(cached) $ECHO_C" >&6
3697else 4904else
3698 while :; do 4905 while :; do
3699 ac_cv_sys_file_offset_bits=no
3700 cat >conftest.$ac_ext <<_ACEOF 4906 cat >conftest.$ac_ext <<_ACEOF
3701/* confdefs.h. */ 4907/* confdefs.h. */
3702_ACEOF 4908_ACEOF
@@ -3721,34 +4927,31 @@ main ()
3721} 4927}
3722_ACEOF 4928_ACEOF
3723rm -f conftest.$ac_objext 4929rm -f conftest.$ac_objext
3724if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 4930if { (ac_try="$ac_compile"
3725 (eval $ac_compile) 2>conftest.er1 4931case "(($ac_try" in
4932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4933 *) ac_try_echo=$ac_try;;
4934esac
4935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4936 (eval "$ac_compile") 2>conftest.er1
3726 ac_status=$? 4937 ac_status=$?
3727 grep -v '^ *+' conftest.er1 >conftest.err 4938 grep -v '^ *+' conftest.er1 >conftest.err
3728 rm -f conftest.er1 4939 rm -f conftest.er1
3729 cat conftest.err >&5 4940 cat conftest.err >&5
3730 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3731 (exit $ac_status); } && 4942 (exit $ac_status); } && {
3732 { ac_try='test -z "$ac_c_werror_flag" 4943 test -z "$ac_c_werror_flag" ||
3733 || test ! -s conftest.err' 4944 test ! -s conftest.err
3734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4945 } && test -s conftest.$ac_objext; then
3735 (eval $ac_try) 2>&5 4946 ac_cv_sys_file_offset_bits=no; break
3736 ac_status=$?
3737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3738 (exit $ac_status); }; } &&
3739 { ac_try='test -s conftest.$ac_objext'
3740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3741 (eval $ac_try) 2>&5
3742 ac_status=$?
3743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3744 (exit $ac_status); }; }; then
3745 break
3746else 4947else
3747 echo "$as_me: failed program was:" >&5 4948 echo "$as_me: failed program was:" >&5
3748sed 's/^/| /' conftest.$ac_ext >&5 4949sed 's/^/| /' conftest.$ac_ext >&5
3749 4950
4951
3750fi 4952fi
3751rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 4953
4954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3752 cat >conftest.$ac_ext <<_ACEOF 4955 cat >conftest.$ac_ext <<_ACEOF
3753/* confdefs.h. */ 4956/* confdefs.h. */
3754_ACEOF 4957_ACEOF
@@ -3774,54 +4977,53 @@ main ()
3774} 4977}
3775_ACEOF 4978_ACEOF
3776rm -f conftest.$ac_objext 4979rm -f conftest.$ac_objext
3777if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 4980if { (ac_try="$ac_compile"
3778 (eval $ac_compile) 2>conftest.er1 4981case "(($ac_try" in
4982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4983 *) ac_try_echo=$ac_try;;
4984esac
4985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4986 (eval "$ac_compile") 2>conftest.er1
3779 ac_status=$? 4987 ac_status=$?
3780 grep -v '^ *+' conftest.er1 >conftest.err 4988 grep -v '^ *+' conftest.er1 >conftest.err
3781 rm -f conftest.er1 4989 rm -f conftest.er1
3782 cat conftest.err >&5 4990 cat conftest.err >&5
3783 echo "$as_me:$LINENO: \$? = $ac_status" >&5 4991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3784 (exit $ac_status); } && 4992 (exit $ac_status); } && {
3785 { ac_try='test -z "$ac_c_werror_flag" 4993 test -z "$ac_c_werror_flag" ||
3786 || test ! -s conftest.err' 4994 test ! -s conftest.err
3787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 4995 } && test -s conftest.$ac_objext; then
3788 (eval $ac_try) 2>&5
3789 ac_status=$?
3790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3791 (exit $ac_status); }; } &&
3792 { ac_try='test -s conftest.$ac_objext'
3793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3794 (eval $ac_try) 2>&5
3795 ac_status=$?
3796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3797 (exit $ac_status); }; }; then
3798 ac_cv_sys_file_offset_bits=64; break 4996 ac_cv_sys_file_offset_bits=64; break
3799else 4997else
3800 echo "$as_me: failed program was:" >&5 4998 echo "$as_me: failed program was:" >&5
3801sed 's/^/| /' conftest.$ac_ext >&5 4999sed 's/^/| /' conftest.$ac_ext >&5
3802 5000
5001
3803fi 5002fi
3804rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 5003
5004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5005 ac_cv_sys_file_offset_bits=unknown
3805 break 5006 break
3806done 5007done
3807fi 5008fi
3808echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 5009{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
3809echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 5010echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
3810if test "$ac_cv_sys_file_offset_bits" != no; then 5011case $ac_cv_sys_file_offset_bits in #(
3811 5012 no | unknown) ;;
5013 *)
3812cat >>confdefs.h <<_ACEOF 5014cat >>confdefs.h <<_ACEOF
3813#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits 5015#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
3814_ACEOF 5016_ACEOF
3815 5017;;
3816fi 5018esac
3817rm -f conftest* 5019rm -f conftest*
3818 echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 5020 if test $ac_cv_sys_file_offset_bits = unknown; then
3819echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6 5021 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
5022echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
3820if test "${ac_cv_sys_large_files+set}" = set; then 5023if test "${ac_cv_sys_large_files+set}" = set; then
3821 echo $ECHO_N "(cached) $ECHO_C" >&6 5024 echo $ECHO_N "(cached) $ECHO_C" >&6
3822else 5025else
3823 while :; do 5026 while :; do
3824 ac_cv_sys_large_files=no
3825 cat >conftest.$ac_ext <<_ACEOF 5027 cat >conftest.$ac_ext <<_ACEOF
3826/* confdefs.h. */ 5028/* confdefs.h. */
3827_ACEOF 5029_ACEOF
@@ -3846,34 +5048,31 @@ main ()
3846} 5048}
3847_ACEOF 5049_ACEOF
3848rm -f conftest.$ac_objext 5050rm -f conftest.$ac_objext
3849if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 5051if { (ac_try="$ac_compile"
3850 (eval $ac_compile) 2>conftest.er1 5052case "(($ac_try" in
5053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5054 *) ac_try_echo=$ac_try;;
5055esac
5056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5057 (eval "$ac_compile") 2>conftest.er1
3851 ac_status=$? 5058 ac_status=$?
3852 grep -v '^ *+' conftest.er1 >conftest.err 5059 grep -v '^ *+' conftest.er1 >conftest.err
3853 rm -f conftest.er1 5060 rm -f conftest.er1
3854 cat conftest.err >&5 5061 cat conftest.err >&5
3855 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3856 (exit $ac_status); } && 5063 (exit $ac_status); } && {
3857 { ac_try='test -z "$ac_c_werror_flag" 5064 test -z "$ac_c_werror_flag" ||
3858 || test ! -s conftest.err' 5065 test ! -s conftest.err
3859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5066 } && test -s conftest.$ac_objext; then
3860 (eval $ac_try) 2>&5 5067 ac_cv_sys_large_files=no; break
3861 ac_status=$?
3862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3863 (exit $ac_status); }; } &&
3864 { ac_try='test -s conftest.$ac_objext'
3865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3866 (eval $ac_try) 2>&5
3867 ac_status=$?
3868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3869 (exit $ac_status); }; }; then
3870 break
3871else 5068else
3872 echo "$as_me: failed program was:" >&5 5069 echo "$as_me: failed program was:" >&5
3873sed 's/^/| /' conftest.$ac_ext >&5 5070sed 's/^/| /' conftest.$ac_ext >&5
3874 5071
5072
3875fi 5073fi
3876rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 5074
5075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3877 cat >conftest.$ac_ext <<_ACEOF 5076 cat >conftest.$ac_ext <<_ACEOF
3878/* confdefs.h. */ 5077/* confdefs.h. */
3879_ACEOF 5078_ACEOF
@@ -3899,47 +5098,47 @@ main ()
3899} 5098}
3900_ACEOF 5099_ACEOF
3901rm -f conftest.$ac_objext 5100rm -f conftest.$ac_objext
3902if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 5101if { (ac_try="$ac_compile"
3903 (eval $ac_compile) 2>conftest.er1 5102case "(($ac_try" in
5103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5104 *) ac_try_echo=$ac_try;;
5105esac
5106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5107 (eval "$ac_compile") 2>conftest.er1
3904 ac_status=$? 5108 ac_status=$?
3905 grep -v '^ *+' conftest.er1 >conftest.err 5109 grep -v '^ *+' conftest.er1 >conftest.err
3906 rm -f conftest.er1 5110 rm -f conftest.er1
3907 cat conftest.err >&5 5111 cat conftest.err >&5
3908 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3909 (exit $ac_status); } && 5113 (exit $ac_status); } && {
3910 { ac_try='test -z "$ac_c_werror_flag" 5114 test -z "$ac_c_werror_flag" ||
3911 || test ! -s conftest.err' 5115 test ! -s conftest.err
3912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5116 } && test -s conftest.$ac_objext; then
3913 (eval $ac_try) 2>&5
3914 ac_status=$?
3915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3916 (exit $ac_status); }; } &&
3917 { ac_try='test -s conftest.$ac_objext'
3918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3919 (eval $ac_try) 2>&5
3920 ac_status=$?
3921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3922 (exit $ac_status); }; }; then
3923 ac_cv_sys_large_files=1; break 5117 ac_cv_sys_large_files=1; break
3924else 5118else
3925 echo "$as_me: failed program was:" >&5 5119 echo "$as_me: failed program was:" >&5
3926sed 's/^/| /' conftest.$ac_ext >&5 5120sed 's/^/| /' conftest.$ac_ext >&5
3927 5121
5122
3928fi 5123fi
3929rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 5124
5125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5126 ac_cv_sys_large_files=unknown
3930 break 5127 break
3931done 5128done
3932fi 5129fi
3933echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 5130{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
3934echo "${ECHO_T}$ac_cv_sys_large_files" >&6 5131echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
3935if test "$ac_cv_sys_large_files" != no; then 5132case $ac_cv_sys_large_files in #(
3936 5133 no | unknown) ;;
5134 *)
3937cat >>confdefs.h <<_ACEOF 5135cat >>confdefs.h <<_ACEOF
3938#define _LARGE_FILES $ac_cv_sys_large_files 5136#define _LARGE_FILES $ac_cv_sys_large_files
3939_ACEOF 5137_ACEOF
3940 5138;;
3941fi 5139esac
3942rm -f conftest* 5140rm -f conftest*
5141 fi
3943fi 5142fi
3944 5143
3945 5144
@@ -3960,8 +5159,8 @@ else
3960 # Search for login 5159 # Search for login
3961 # Extract the first word of "login", so it can be a program name with args. 5160 # Extract the first word of "login", so it can be a program name with args.
3962set dummy login; ac_word=$2 5161set dummy login; ac_word=$2
3963echo "$as_me:$LINENO: checking for $ac_word" >&5 5162{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3964echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 5163echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3965if test "${ac_cv_path_LOGIN_PROGRAM_FALLBACK+set}" = set; then 5164if test "${ac_cv_path_LOGIN_PROGRAM_FALLBACK+set}" = set; then
3966 echo $ECHO_N "(cached) $ECHO_C" >&6 5165 echo $ECHO_N "(cached) $ECHO_C" >&6
3967else 5166else
@@ -3976,27 +5175,28 @@ do
3976 IFS=$as_save_IFS 5175 IFS=$as_save_IFS
3977 test -z "$as_dir" && as_dir=. 5176 test -z "$as_dir" && as_dir=.
3978 for ac_exec_ext in '' $ac_executable_extensions; do 5177 for ac_exec_ext in '' $ac_executable_extensions; do
3979 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5178 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3980 ac_cv_path_LOGIN_PROGRAM_FALLBACK="$as_dir/$ac_word$ac_exec_ext" 5179 ac_cv_path_LOGIN_PROGRAM_FALLBACK="$as_dir/$ac_word$ac_exec_ext"
3981 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 5180 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3982 break 2 5181 break 2
3983 fi 5182 fi
3984done 5183done
3985done 5184done
5185IFS=$as_save_IFS
3986 5186
3987 ;; 5187 ;;
3988esac 5188esac
3989fi 5189fi
3990LOGIN_PROGRAM_FALLBACK=$ac_cv_path_LOGIN_PROGRAM_FALLBACK 5190LOGIN_PROGRAM_FALLBACK=$ac_cv_path_LOGIN_PROGRAM_FALLBACK
3991
3992if test -n "$LOGIN_PROGRAM_FALLBACK"; then 5191if test -n "$LOGIN_PROGRAM_FALLBACK"; then
3993 echo "$as_me:$LINENO: result: $LOGIN_PROGRAM_FALLBACK" >&5 5192 { echo "$as_me:$LINENO: result: $LOGIN_PROGRAM_FALLBACK" >&5
3994echo "${ECHO_T}$LOGIN_PROGRAM_FALLBACK" >&6 5193echo "${ECHO_T}$LOGIN_PROGRAM_FALLBACK" >&6; }
3995else 5194else
3996 echo "$as_me:$LINENO: result: no" >&5 5195 { echo "$as_me:$LINENO: result: no" >&5
3997echo "${ECHO_T}no" >&6 5196echo "${ECHO_T}no" >&6; }
3998fi 5197fi
3999 5198
5199
4000 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then 5200 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
4001 cat >>confdefs.h <<_ACEOF 5201 cat >>confdefs.h <<_ACEOF
4002#define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM_FALLBACK" 5202#define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM_FALLBACK"
@@ -4007,8 +5207,8 @@ fi
4007 5207
4008# Extract the first word of "passwd", so it can be a program name with args. 5208# Extract the first word of "passwd", so it can be a program name with args.
4009set dummy passwd; ac_word=$2 5209set dummy passwd; ac_word=$2
4010echo "$as_me:$LINENO: checking for $ac_word" >&5 5210{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4011echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 5211echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4012if test "${ac_cv_path_PATH_PASSWD_PROG+set}" = set; then 5212if test "${ac_cv_path_PATH_PASSWD_PROG+set}" = set; then
4013 echo $ECHO_N "(cached) $ECHO_C" >&6 5213 echo $ECHO_N "(cached) $ECHO_C" >&6
4014else 5214else
@@ -4023,27 +5223,28 @@ do
4023 IFS=$as_save_IFS 5223 IFS=$as_save_IFS
4024 test -z "$as_dir" && as_dir=. 5224 test -z "$as_dir" && as_dir=.
4025 for ac_exec_ext in '' $ac_executable_extensions; do 5225 for ac_exec_ext in '' $ac_executable_extensions; do
4026 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5226 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4027 ac_cv_path_PATH_PASSWD_PROG="$as_dir/$ac_word$ac_exec_ext" 5227 ac_cv_path_PATH_PASSWD_PROG="$as_dir/$ac_word$ac_exec_ext"
4028 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 5228 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4029 break 2 5229 break 2
4030 fi 5230 fi
4031done 5231done
4032done 5232done
5233IFS=$as_save_IFS
4033 5234
4034 ;; 5235 ;;
4035esac 5236esac
4036fi 5237fi
4037PATH_PASSWD_PROG=$ac_cv_path_PATH_PASSWD_PROG 5238PATH_PASSWD_PROG=$ac_cv_path_PATH_PASSWD_PROG
4038
4039if test -n "$PATH_PASSWD_PROG"; then 5239if test -n "$PATH_PASSWD_PROG"; then
4040 echo "$as_me:$LINENO: result: $PATH_PASSWD_PROG" >&5 5240 { echo "$as_me:$LINENO: result: $PATH_PASSWD_PROG" >&5
4041echo "${ECHO_T}$PATH_PASSWD_PROG" >&6 5241echo "${ECHO_T}$PATH_PASSWD_PROG" >&6; }
4042else 5242else
4043 echo "$as_me:$LINENO: result: no" >&5 5243 { echo "$as_me:$LINENO: result: no" >&5
4044echo "${ECHO_T}no" >&6 5244echo "${ECHO_T}no" >&6; }
4045fi 5245fi
4046 5246
5247
4047if test ! -z "$PATH_PASSWD_PROG" ; then 5248if test ! -z "$PATH_PASSWD_PROG" ; then
4048 5249
4049cat >>confdefs.h <<_ACEOF 5250cat >>confdefs.h <<_ACEOF
@@ -4057,8 +5258,8 @@ if test -z "$LD" ; then
4057fi 5258fi
4058 5259
4059 5260
4060echo "$as_me:$LINENO: checking for inline" >&5 5261{ echo "$as_me:$LINENO: checking for inline" >&5
4061echo $ECHO_N "checking for inline... $ECHO_C" >&6 5262echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
4062if test "${ac_cv_c_inline+set}" = set; then 5263if test "${ac_cv_c_inline+set}" = set; then
4063 echo $ECHO_N "(cached) $ECHO_C" >&6 5264 echo $ECHO_N "(cached) $ECHO_C" >&6
4064else 5265else
@@ -4078,39 +5279,37 @@ $ac_kw foo_t foo () {return 0; }
4078 5279
4079_ACEOF 5280_ACEOF
4080rm -f conftest.$ac_objext 5281rm -f conftest.$ac_objext
4081if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 5282if { (ac_try="$ac_compile"
4082 (eval $ac_compile) 2>conftest.er1 5283case "(($ac_try" in
5284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5285 *) ac_try_echo=$ac_try;;
5286esac
5287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5288 (eval "$ac_compile") 2>conftest.er1
4083 ac_status=$? 5289 ac_status=$?
4084 grep -v '^ *+' conftest.er1 >conftest.err 5290 grep -v '^ *+' conftest.er1 >conftest.err
4085 rm -f conftest.er1 5291 rm -f conftest.er1
4086 cat conftest.err >&5 5292 cat conftest.err >&5
4087 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4088 (exit $ac_status); } && 5294 (exit $ac_status); } && {
4089 { ac_try='test -z "$ac_c_werror_flag" 5295 test -z "$ac_c_werror_flag" ||
4090 || test ! -s conftest.err' 5296 test ! -s conftest.err
4091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5297 } && test -s conftest.$ac_objext; then
4092 (eval $ac_try) 2>&5 5298 ac_cv_c_inline=$ac_kw
4093 ac_status=$?
4094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4095 (exit $ac_status); }; } &&
4096 { ac_try='test -s conftest.$ac_objext'
4097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4098 (eval $ac_try) 2>&5
4099 ac_status=$?
4100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4101 (exit $ac_status); }; }; then
4102 ac_cv_c_inline=$ac_kw; break
4103else 5299else
4104 echo "$as_me: failed program was:" >&5 5300 echo "$as_me: failed program was:" >&5
4105sed 's/^/| /' conftest.$ac_ext >&5 5301sed 's/^/| /' conftest.$ac_ext >&5
4106 5302
5303
4107fi 5304fi
4108rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 5305
5306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5307 test "$ac_cv_c_inline" != no && break
4109done 5308done
4110 5309
4111fi 5310fi
4112echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 5311{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
4113echo "${ECHO_T}$ac_cv_c_inline" >&6 5312echo "${ECHO_T}$ac_cv_c_inline" >&6; }
4114 5313
4115 5314
4116case $ac_cv_c_inline in 5315case $ac_cv_c_inline in
@@ -4129,8 +5328,8 @@ _ACEOF
4129esac 5328esac
4130 5329
4131 5330
4132echo "$as_me:$LINENO: checking whether LLONG_MAX is declared" >&5 5331{ echo "$as_me:$LINENO: checking whether LLONG_MAX is declared" >&5
4133echo $ECHO_N "checking whether LLONG_MAX is declared... $ECHO_C" >&6 5332echo $ECHO_N "checking whether LLONG_MAX is declared... $ECHO_C" >&6; }
4134if test "${ac_cv_have_decl_LLONG_MAX+set}" = set; then 5333if test "${ac_cv_have_decl_LLONG_MAX+set}" = set; then
4135 echo $ECHO_N "(cached) $ECHO_C" >&6 5334 echo $ECHO_N "(cached) $ECHO_C" >&6
4136else 5335else
@@ -4146,7 +5345,7 @@ int
4146main () 5345main ()
4147{ 5346{
4148#ifndef LLONG_MAX 5347#ifndef LLONG_MAX
4149 char *p = (char *) LLONG_MAX; 5348 (void) LLONG_MAX;
4150#endif 5349#endif
4151 5350
4152 ; 5351 ;
@@ -4154,38 +5353,34 @@ main ()
4154} 5353}
4155_ACEOF 5354_ACEOF
4156rm -f conftest.$ac_objext 5355rm -f conftest.$ac_objext
4157if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 5356if { (ac_try="$ac_compile"
4158 (eval $ac_compile) 2>conftest.er1 5357case "(($ac_try" in
5358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5359 *) ac_try_echo=$ac_try;;
5360esac
5361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5362 (eval "$ac_compile") 2>conftest.er1
4159 ac_status=$? 5363 ac_status=$?
4160 grep -v '^ *+' conftest.er1 >conftest.err 5364 grep -v '^ *+' conftest.er1 >conftest.err
4161 rm -f conftest.er1 5365 rm -f conftest.er1
4162 cat conftest.err >&5 5366 cat conftest.err >&5
4163 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4164 (exit $ac_status); } && 5368 (exit $ac_status); } && {
4165 { ac_try='test -z "$ac_c_werror_flag" 5369 test -z "$ac_c_werror_flag" ||
4166 || test ! -s conftest.err' 5370 test ! -s conftest.err
4167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5371 } && test -s conftest.$ac_objext; then
4168 (eval $ac_try) 2>&5
4169 ac_status=$?
4170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4171 (exit $ac_status); }; } &&
4172 { ac_try='test -s conftest.$ac_objext'
4173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4174 (eval $ac_try) 2>&5
4175 ac_status=$?
4176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4177 (exit $ac_status); }; }; then
4178 ac_cv_have_decl_LLONG_MAX=yes 5372 ac_cv_have_decl_LLONG_MAX=yes
4179else 5373else
4180 echo "$as_me: failed program was:" >&5 5374 echo "$as_me: failed program was:" >&5
4181sed 's/^/| /' conftest.$ac_ext >&5 5375sed 's/^/| /' conftest.$ac_ext >&5
4182 5376
4183ac_cv_have_decl_LLONG_MAX=no 5377 ac_cv_have_decl_LLONG_MAX=no
4184fi 5378fi
4185rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 5379
5380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4186fi 5381fi
4187echo "$as_me:$LINENO: result: $ac_cv_have_decl_LLONG_MAX" >&5 5382{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_LLONG_MAX" >&5
4188echo "${ECHO_T}$ac_cv_have_decl_LLONG_MAX" >&6 5383echo "${ECHO_T}$ac_cv_have_decl_LLONG_MAX" >&6; }
4189if test $ac_cv_have_decl_LLONG_MAX = yes; then 5384if test $ac_cv_have_decl_LLONG_MAX = yes; then
4190 have_llong_max=1 5385 have_llong_max=1
4191fi 5386fi
@@ -4208,8 +5403,8 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
4208 unset ac_cv_have_decl_LLONG_MAX 5403 unset ac_cv_have_decl_LLONG_MAX
4209 saved_CFLAGS="$CFLAGS" 5404 saved_CFLAGS="$CFLAGS"
4210 CFLAGS="$CFLAGS -std=gnu99" 5405 CFLAGS="$CFLAGS -std=gnu99"
4211 echo "$as_me:$LINENO: checking whether LLONG_MAX is declared" >&5 5406 { echo "$as_me:$LINENO: checking whether LLONG_MAX is declared" >&5
4212echo $ECHO_N "checking whether LLONG_MAX is declared... $ECHO_C" >&6 5407echo $ECHO_N "checking whether LLONG_MAX is declared... $ECHO_C" >&6; }
4213if test "${ac_cv_have_decl_LLONG_MAX+set}" = set; then 5408if test "${ac_cv_have_decl_LLONG_MAX+set}" = set; then
4214 echo $ECHO_N "(cached) $ECHO_C" >&6 5409 echo $ECHO_N "(cached) $ECHO_C" >&6
4215else 5410else
@@ -4226,7 +5421,7 @@ int
4226main () 5421main ()
4227{ 5422{
4228#ifndef LLONG_MAX 5423#ifndef LLONG_MAX
4229 char *p = (char *) LLONG_MAX; 5424 (void) LLONG_MAX;
4230#endif 5425#endif
4231 5426
4232 ; 5427 ;
@@ -4234,38 +5429,34 @@ main ()
4234} 5429}
4235_ACEOF 5430_ACEOF
4236rm -f conftest.$ac_objext 5431rm -f conftest.$ac_objext
4237if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 5432if { (ac_try="$ac_compile"
4238 (eval $ac_compile) 2>conftest.er1 5433case "(($ac_try" in
5434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5435 *) ac_try_echo=$ac_try;;
5436esac
5437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5438 (eval "$ac_compile") 2>conftest.er1
4239 ac_status=$? 5439 ac_status=$?
4240 grep -v '^ *+' conftest.er1 >conftest.err 5440 grep -v '^ *+' conftest.er1 >conftest.err
4241 rm -f conftest.er1 5441 rm -f conftest.er1
4242 cat conftest.err >&5 5442 cat conftest.err >&5
4243 echo "$as_me:$LINENO: \$? = $ac_status" >&5 5443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4244 (exit $ac_status); } && 5444 (exit $ac_status); } && {
4245 { ac_try='test -z "$ac_c_werror_flag" 5445 test -z "$ac_c_werror_flag" ||
4246 || test ! -s conftest.err' 5446 test ! -s conftest.err
4247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 5447 } && test -s conftest.$ac_objext; then
4248 (eval $ac_try) 2>&5
4249 ac_status=$?
4250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4251 (exit $ac_status); }; } &&
4252 { ac_try='test -s conftest.$ac_objext'
4253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4254 (eval $ac_try) 2>&5
4255 ac_status=$?
4256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4257 (exit $ac_status); }; }; then
4258 ac_cv_have_decl_LLONG_MAX=yes 5448 ac_cv_have_decl_LLONG_MAX=yes
4259else 5449else
4260 echo "$as_me: failed program was:" >&5 5450 echo "$as_me: failed program was:" >&5
4261sed 's/^/| /' conftest.$ac_ext >&5 5451sed 's/^/| /' conftest.$ac_ext >&5
4262 5452
4263ac_cv_have_decl_LLONG_MAX=no 5453 ac_cv_have_decl_LLONG_MAX=no
4264fi 5454fi
4265rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 5455
5456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4266fi 5457fi
4267echo "$as_me:$LINENO: result: $ac_cv_have_decl_LLONG_MAX" >&5 5458{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_LLONG_MAX" >&5
4268echo "${ECHO_T}$ac_cv_have_decl_LLONG_MAX" >&6 5459echo "${ECHO_T}$ac_cv_have_decl_LLONG_MAX" >&6; }
4269if test $ac_cv_have_decl_LLONG_MAX = yes; then 5460if test $ac_cv_have_decl_LLONG_MAX = yes; then
4270 have_llong_max=1 5461 have_llong_max=1
4271else 5462else
@@ -4276,10 +5467,9 @@ fi
4276fi 5467fi
4277 5468
4278 5469
4279# Check whether --with-rpath or --without-rpath was given. 5470# Check whether --with-rpath was given.
4280if test "${with_rpath+set}" = set; then 5471if test "${with_rpath+set}" = set; then
4281 withval="$with_rpath" 5472 withval=$with_rpath;
4282
4283 if test "x$withval" = "xno" ; then 5473 if test "x$withval" = "xno" ; then
4284 need_dash_r="" 5474 need_dash_r=""
4285 fi 5475 fi
@@ -4288,18 +5478,600 @@ if test "${with_rpath+set}" = set; then
4288 fi 5478 fi
4289 5479
4290 5480
4291fi; 5481fi
5482
5483
5484# Allow user to specify flags
5485
5486# Check whether --with-cflags was given.
5487if test "${with_cflags+set}" = set; then
5488 withval=$with_cflags;
5489 if test -n "$withval" && test "x$withval" != "xno" && \
5490 test "x${withval}" != "xyes"; then
5491 CFLAGS="$CFLAGS $withval"
5492 fi
5493
5494
5495fi
5496
5497
5498# Check whether --with-cppflags was given.
5499if test "${with_cppflags+set}" = set; then
5500 withval=$with_cppflags;
5501 if test -n "$withval" && test "x$withval" != "xno" && \
5502 test "x${withval}" != "xyes"; then
5503 CPPFLAGS="$CPPFLAGS $withval"
5504 fi
5505
5506
5507fi
5508
5509
5510# Check whether --with-ldflags was given.
5511if test "${with_ldflags+set}" = set; then
5512 withval=$with_ldflags;
5513 if test -n "$withval" && test "x$withval" != "xno" && \
5514 test "x${withval}" != "xyes"; then
5515 LDFLAGS="$LDFLAGS $withval"
5516 fi
5517
5518
5519fi
5520
5521
5522# Check whether --with-libs was given.
5523if test "${with_libs+set}" = set; then
5524 withval=$with_libs;
5525 if test -n "$withval" && test "x$withval" != "xno" && \
5526 test "x${withval}" != "xyes"; then
5527 LIBS="$LIBS $withval"
5528 fi
5529
5530
5531fi
5532
5533
5534# Check whether --with-Werror was given.
5535if test "${with_Werror+set}" = set; then
5536 withval=$with_Werror;
5537 if test -n "$withval" && test "x$withval" != "xno"; then
5538 werror_flags="-Werror"
5539 if test "x${withval}" != "xyes"; then
5540 werror_flags="$withval"
5541 fi
5542 fi
5543
5544
5545fi
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607for ac_header in \
5608 bstring.h \
5609 crypt.h \
5610 crypto/sha2.h \
5611 dirent.h \
5612 endian.h \
5613 features.h \
5614 fcntl.h \
5615 floatingpoint.h \
5616 getopt.h \
5617 glob.h \
5618 ia.h \
5619 iaf.h \
5620 limits.h \
5621 login.h \
5622 maillock.h \
5623 ndir.h \
5624 net/if_tun.h \
5625 netdb.h \
5626 netgroup.h \
5627 pam/pam_appl.h \
5628 paths.h \
5629 pty.h \
5630 readpassphrase.h \
5631 rpc/types.h \
5632 security/pam_appl.h \
5633 sha2.h \
5634 shadow.h \
5635 stddef.h \
5636 stdint.h \
5637 string.h \
5638 strings.h \
5639 sys/audit.h \
5640 sys/bitypes.h \
5641 sys/bsdtty.h \
5642 sys/cdefs.h \
5643 sys/dir.h \
5644 sys/mman.h \
5645 sys/ndir.h \
5646 sys/prctl.h \
5647 sys/pstat.h \
5648 sys/select.h \
5649 sys/stat.h \
5650 sys/stream.h \
5651 sys/stropts.h \
5652 sys/strtio.h \
5653 sys/sysmacros.h \
5654 sys/time.h \
5655 sys/timers.h \
5656 sys/un.h \
5657 time.h \
5658 tmpdir.h \
5659 ttyent.h \
5660 unistd.h \
5661 usersec.h \
5662 util.h \
5663 utime.h \
5664 utmp.h \
5665 utmpx.h \
5666 vis.h \
5667
5668do
5669as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5670if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5671 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5672echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5673if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5674 echo $ECHO_N "(cached) $ECHO_C" >&6
5675fi
5676ac_res=`eval echo '${'$as_ac_Header'}'`
5677 { echo "$as_me:$LINENO: result: $ac_res" >&5
5678echo "${ECHO_T}$ac_res" >&6; }
5679else
5680 # Is the header compilable?
5681{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5682echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
5683cat >conftest.$ac_ext <<_ACEOF
5684/* confdefs.h. */
5685_ACEOF
5686cat confdefs.h >>conftest.$ac_ext
5687cat >>conftest.$ac_ext <<_ACEOF
5688/* end confdefs.h. */
5689$ac_includes_default
5690#include <$ac_header>
5691_ACEOF
5692rm -f conftest.$ac_objext
5693if { (ac_try="$ac_compile"
5694case "(($ac_try" in
5695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5696 *) ac_try_echo=$ac_try;;
5697esac
5698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5699 (eval "$ac_compile") 2>conftest.er1
5700 ac_status=$?
5701 grep -v '^ *+' conftest.er1 >conftest.err
5702 rm -f conftest.er1
5703 cat conftest.err >&5
5704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5705 (exit $ac_status); } && {
5706 test -z "$ac_c_werror_flag" ||
5707 test ! -s conftest.err
5708 } && test -s conftest.$ac_objext; then
5709 ac_header_compiler=yes
5710else
5711 echo "$as_me: failed program was:" >&5
5712sed 's/^/| /' conftest.$ac_ext >&5
5713
5714 ac_header_compiler=no
5715fi
5716
5717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5718{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5719echo "${ECHO_T}$ac_header_compiler" >&6; }
5720
5721# Is the header present?
5722{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5723echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
5724cat >conftest.$ac_ext <<_ACEOF
5725/* confdefs.h. */
5726_ACEOF
5727cat confdefs.h >>conftest.$ac_ext
5728cat >>conftest.$ac_ext <<_ACEOF
5729/* end confdefs.h. */
5730#include <$ac_header>
5731_ACEOF
5732if { (ac_try="$ac_cpp conftest.$ac_ext"
5733case "(($ac_try" in
5734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5735 *) ac_try_echo=$ac_try;;
5736esac
5737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5738 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5739 ac_status=$?
5740 grep -v '^ *+' conftest.er1 >conftest.err
5741 rm -f conftest.er1
5742 cat conftest.err >&5
5743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5744 (exit $ac_status); } >/dev/null && {
5745 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5746 test ! -s conftest.err
5747 }; then
5748 ac_header_preproc=yes
5749else
5750 echo "$as_me: failed program was:" >&5
5751sed 's/^/| /' conftest.$ac_ext >&5
5752
5753 ac_header_preproc=no
5754fi
5755
5756rm -f conftest.err conftest.$ac_ext
5757{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5758echo "${ECHO_T}$ac_header_preproc" >&6; }
5759
5760# So? What about this header?
5761case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5762 yes:no: )
5763 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5764echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5765 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5766echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5767 ac_header_preproc=yes
5768 ;;
5769 no:yes:* )
5770 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5771echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5772 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5773echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5774 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5775echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5776 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5777echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5778 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5779echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5780 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5781echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5782 ( cat <<\_ASBOX
5783## ------------------------------------------- ##
5784## Report this to openssh-unix-dev@mindrot.org ##
5785## ------------------------------------------- ##
5786_ASBOX
5787 ) | sed "s/^/$as_me: WARNING: /" >&2
5788 ;;
5789esac
5790{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5791echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5792if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5793 echo $ECHO_N "(cached) $ECHO_C" >&6
5794else
5795 eval "$as_ac_Header=\$ac_header_preproc"
5796fi
5797ac_res=`eval echo '${'$as_ac_Header'}'`
5798 { echo "$as_me:$LINENO: result: $ac_res" >&5
5799echo "${ECHO_T}$ac_res" >&6; }
5800
5801fi
5802if test `eval echo '${'$as_ac_Header'}'` = yes; then
5803 cat >>confdefs.h <<_ACEOF
5804#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5805_ACEOF
5806
5807fi
5808
5809done
5810
5811
5812# lastlog.h requires sys/time.h to be included first on Solaris
5813
5814for ac_header in lastlog.h
5815do
5816as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5817{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5818echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5819if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5820 echo $ECHO_N "(cached) $ECHO_C" >&6
5821else
5822 cat >conftest.$ac_ext <<_ACEOF
5823/* confdefs.h. */
5824_ACEOF
5825cat confdefs.h >>conftest.$ac_ext
5826cat >>conftest.$ac_ext <<_ACEOF
5827/* end confdefs.h. */
5828
5829#ifdef HAVE_SYS_TIME_H
5830# include <sys/time.h>
5831#endif
5832
5833
5834#include <$ac_header>
5835_ACEOF
5836rm -f conftest.$ac_objext
5837if { (ac_try="$ac_compile"
5838case "(($ac_try" in
5839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5840 *) ac_try_echo=$ac_try;;
5841esac
5842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5843 (eval "$ac_compile") 2>conftest.er1
5844 ac_status=$?
5845 grep -v '^ *+' conftest.er1 >conftest.err
5846 rm -f conftest.er1
5847 cat conftest.err >&5
5848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5849 (exit $ac_status); } && {
5850 test -z "$ac_c_werror_flag" ||
5851 test ! -s conftest.err
5852 } && test -s conftest.$ac_objext; then
5853 eval "$as_ac_Header=yes"
5854else
5855 echo "$as_me: failed program was:" >&5
5856sed 's/^/| /' conftest.$ac_ext >&5
5857
5858 eval "$as_ac_Header=no"
5859fi
5860
5861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5862fi
5863ac_res=`eval echo '${'$as_ac_Header'}'`
5864 { echo "$as_me:$LINENO: result: $ac_res" >&5
5865echo "${ECHO_T}$ac_res" >&6; }
5866if test `eval echo '${'$as_ac_Header'}'` = yes; then
5867 cat >>confdefs.h <<_ACEOF
5868#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5869_ACEOF
5870
5871fi
5872
5873done
5874
5875
5876# sys/ptms.h requires sys/stream.h to be included first on Solaris
5877
5878for ac_header in sys/ptms.h
5879do
5880as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5881{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5882echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5883if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5884 echo $ECHO_N "(cached) $ECHO_C" >&6
5885else
5886 cat >conftest.$ac_ext <<_ACEOF
5887/* confdefs.h. */
5888_ACEOF
5889cat confdefs.h >>conftest.$ac_ext
5890cat >>conftest.$ac_ext <<_ACEOF
5891/* end confdefs.h. */
5892
5893#ifdef HAVE_SYS_STREAM_H
5894# include <sys/stream.h>
5895#endif
5896
5897
5898#include <$ac_header>
5899_ACEOF
5900rm -f conftest.$ac_objext
5901if { (ac_try="$ac_compile"
5902case "(($ac_try" in
5903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5904 *) ac_try_echo=$ac_try;;
5905esac
5906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5907 (eval "$ac_compile") 2>conftest.er1
5908 ac_status=$?
5909 grep -v '^ *+' conftest.er1 >conftest.err
5910 rm -f conftest.er1
5911 cat conftest.err >&5
5912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5913 (exit $ac_status); } && {
5914 test -z "$ac_c_werror_flag" ||
5915 test ! -s conftest.err
5916 } && test -s conftest.$ac_objext; then
5917 eval "$as_ac_Header=yes"
5918else
5919 echo "$as_me: failed program was:" >&5
5920sed 's/^/| /' conftest.$ac_ext >&5
5921
5922 eval "$as_ac_Header=no"
5923fi
5924
5925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5926fi
5927ac_res=`eval echo '${'$as_ac_Header'}'`
5928 { echo "$as_me:$LINENO: result: $ac_res" >&5
5929echo "${ECHO_T}$ac_res" >&6; }
5930if test `eval echo '${'$as_ac_Header'}'` = yes; then
5931 cat >>confdefs.h <<_ACEOF
5932#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5933_ACEOF
5934
5935fi
5936
5937done
5938
5939
5940# login_cap.h requires sys/types.h on NetBSD
5941
5942for ac_header in login_cap.h
5943do
5944as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5945{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5946echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5947if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5948 echo $ECHO_N "(cached) $ECHO_C" >&6
5949else
5950 cat >conftest.$ac_ext <<_ACEOF
5951/* confdefs.h. */
5952_ACEOF
5953cat confdefs.h >>conftest.$ac_ext
5954cat >>conftest.$ac_ext <<_ACEOF
5955/* end confdefs.h. */
5956
5957#include <sys/types.h>
5958
5959
5960#include <$ac_header>
5961_ACEOF
5962rm -f conftest.$ac_objext
5963if { (ac_try="$ac_compile"
5964case "(($ac_try" in
5965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5966 *) ac_try_echo=$ac_try;;
5967esac
5968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5969 (eval "$ac_compile") 2>conftest.er1
5970 ac_status=$?
5971 grep -v '^ *+' conftest.er1 >conftest.err
5972 rm -f conftest.er1
5973 cat conftest.err >&5
5974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5975 (exit $ac_status); } && {
5976 test -z "$ac_c_werror_flag" ||
5977 test ! -s conftest.err
5978 } && test -s conftest.$ac_objext; then
5979 eval "$as_ac_Header=yes"
5980else
5981 echo "$as_me: failed program was:" >&5
5982sed 's/^/| /' conftest.$ac_ext >&5
5983
5984 eval "$as_ac_Header=no"
5985fi
5986
5987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5988fi
5989ac_res=`eval echo '${'$as_ac_Header'}'`
5990 { echo "$as_me:$LINENO: result: $ac_res" >&5
5991echo "${ECHO_T}$ac_res" >&6; }
5992if test `eval echo '${'$as_ac_Header'}'` = yes; then
5993 cat >>confdefs.h <<_ACEOF
5994#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5995_ACEOF
5996
5997fi
5998
5999done
6000
6001
6002# Messages for features tested for in target-specific section
6003SIA_MSG="no"
6004SPC_MSG="no"
4292 6005
4293# Check for some target-specific stuff 6006# Check for some target-specific stuff
4294case "$host" in 6007case "$host" in
4295*-*-aix*) 6008*-*-aix*)
4296 echo "$as_me:$LINENO: checking how to specify blibpath for linker ($LD)" >&5 6009 # Some versions of VAC won't allow macro redefinitions at
4297echo $ECHO_N "checking how to specify blibpath for linker ($LD)... $ECHO_C" >&6 6010 # -qlanglevel=ansi, and autoconf 2.60 sometimes insists on using that
6011 # particularly with older versions of vac or xlc.
6012 # It also throws errors about null macro argments, but these are
6013 # not fatal.
6014 { echo "$as_me:$LINENO: checking if compiler allows macro redefinitions" >&5
6015echo $ECHO_N "checking if compiler allows macro redefinitions... $ECHO_C" >&6; }
6016 cat >conftest.$ac_ext <<_ACEOF
6017/* confdefs.h. */
6018_ACEOF
6019cat confdefs.h >>conftest.$ac_ext
6020cat >>conftest.$ac_ext <<_ACEOF
6021/* end confdefs.h. */
6022
6023#define testmacro foo
6024#define testmacro bar
6025int main(void) { exit(0); }
6026
6027_ACEOF
6028rm -f conftest.$ac_objext
6029if { (ac_try="$ac_compile"
6030case "(($ac_try" in
6031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6032 *) ac_try_echo=$ac_try;;
6033esac
6034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6035 (eval "$ac_compile") 2>conftest.er1
6036 ac_status=$?
6037 grep -v '^ *+' conftest.er1 >conftest.err
6038 rm -f conftest.er1
6039 cat conftest.err >&5
6040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6041 (exit $ac_status); } && {
6042 test -z "$ac_c_werror_flag" ||
6043 test ! -s conftest.err
6044 } && test -s conftest.$ac_objext; then
6045 { echo "$as_me:$LINENO: result: yes" >&5
6046echo "${ECHO_T}yes" >&6; }
6047else
6048 echo "$as_me: failed program was:" >&5
6049sed 's/^/| /' conftest.$ac_ext >&5
6050
6051 { echo "$as_me:$LINENO: result: no" >&5
6052echo "${ECHO_T}no" >&6; }
6053 CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`"
6054 LD="`echo $LD | sed 's/-qlanglvl\=ansi//g'`"
6055 CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`"
6056 CPPFLAGS="`echo $CPPFLAGS | sed 's/-qlanglvl\=ansi//g'`"
6057
6058
6059fi
6060
6061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6062
6063 { echo "$as_me:$LINENO: checking how to specify blibpath for linker ($LD)" >&5
6064echo $ECHO_N "checking how to specify blibpath for linker ($LD)... $ECHO_C" >&6; }
4298 if (test -z "$blibpath"); then 6065 if (test -z "$blibpath"); then
4299 blibpath="/usr/lib:/lib" 6066 blibpath="/usr/lib:/lib"
4300 fi 6067 fi
4301 saved_LDFLAGS="$LDFLAGS" 6068 saved_LDFLAGS="$LDFLAGS"
4302 for tryflags in -blibpath: -Wl,-blibpath: -Wl,-rpath, ;do 6069 if test "$GCC" = "yes"; then
6070 flags="-Wl,-blibpath: -Wl,-rpath, -blibpath:"
6071 else
6072 flags="-blibpath: -Wl,-blibpath: -Wl,-rpath,"
6073 fi
6074 for tryflags in $flags ;do
4303 if (test -z "$blibflags"); then 6075 if (test -z "$blibflags"); then
4304 LDFLAGS="$saved_LDFLAGS $tryflags$blibpath" 6076 LDFLAGS="$saved_LDFLAGS $tryflags$blibpath"
4305 cat >conftest.$ac_ext <<_ACEOF 6077 cat >conftest.$ac_ext <<_ACEOF
@@ -4318,50 +6090,48 @@ main ()
4318} 6090}
4319_ACEOF 6091_ACEOF
4320rm -f conftest.$ac_objext conftest$ac_exeext 6092rm -f conftest.$ac_objext conftest$ac_exeext
4321if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 6093if { (ac_try="$ac_link"
4322 (eval $ac_link) 2>conftest.er1 6094case "(($ac_try" in
6095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6096 *) ac_try_echo=$ac_try;;
6097esac
6098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6099 (eval "$ac_link") 2>conftest.er1
4323 ac_status=$? 6100 ac_status=$?
4324 grep -v '^ *+' conftest.er1 >conftest.err 6101 grep -v '^ *+' conftest.er1 >conftest.err
4325 rm -f conftest.er1 6102 rm -f conftest.er1
4326 cat conftest.err >&5 6103 cat conftest.err >&5
4327 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4328 (exit $ac_status); } && 6105 (exit $ac_status); } && {
4329 { ac_try='test -z "$ac_c_werror_flag" 6106 test -z "$ac_c_werror_flag" ||
4330 || test ! -s conftest.err' 6107 test ! -s conftest.err
4331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6108 } && test -s conftest$ac_exeext &&
4332 (eval $ac_try) 2>&5 6109 $as_test_x conftest$ac_exeext; then
4333 ac_status=$?
4334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4335 (exit $ac_status); }; } &&
4336 { ac_try='test -s conftest$ac_exeext'
4337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4338 (eval $ac_try) 2>&5
4339 ac_status=$?
4340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4341 (exit $ac_status); }; }; then
4342 blibflags=$tryflags 6110 blibflags=$tryflags
4343else 6111else
4344 echo "$as_me: failed program was:" >&5 6112 echo "$as_me: failed program was:" >&5
4345sed 's/^/| /' conftest.$ac_ext >&5 6113sed 's/^/| /' conftest.$ac_ext >&5
4346 6114
6115
4347fi 6116fi
4348rm -f conftest.err conftest.$ac_objext \ 6117
6118rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4349 conftest$ac_exeext conftest.$ac_ext 6119 conftest$ac_exeext conftest.$ac_ext
4350 fi 6120 fi
4351 done 6121 done
4352 if (test -z "$blibflags"); then 6122 if (test -z "$blibflags"); then
4353 echo "$as_me:$LINENO: result: not found" >&5 6123 { echo "$as_me:$LINENO: result: not found" >&5
4354echo "${ECHO_T}not found" >&6 6124echo "${ECHO_T}not found" >&6; }
4355 { { echo "$as_me:$LINENO: error: *** must be able to specify blibpath on AIX - check config.log" >&5 6125 { { echo "$as_me:$LINENO: error: *** must be able to specify blibpath on AIX - check config.log" >&5
4356echo "$as_me: error: *** must be able to specify blibpath on AIX - check config.log" >&2;} 6126echo "$as_me: error: *** must be able to specify blibpath on AIX - check config.log" >&2;}
4357 { (exit 1); exit 1; }; } 6127 { (exit 1); exit 1; }; }
4358 else 6128 else
4359 echo "$as_me:$LINENO: result: $blibflags" >&5 6129 { echo "$as_me:$LINENO: result: $blibflags" >&5
4360echo "${ECHO_T}$blibflags" >&6 6130echo "${ECHO_T}$blibflags" >&6; }
4361 fi 6131 fi
4362 LDFLAGS="$saved_LDFLAGS" 6132 LDFLAGS="$saved_LDFLAGS"
4363 echo "$as_me:$LINENO: checking for authenticate" >&5 6133 { echo "$as_me:$LINENO: checking for authenticate" >&5
4364echo $ECHO_N "checking for authenticate... $ECHO_C" >&6 6134echo $ECHO_N "checking for authenticate... $ECHO_C" >&6; }
4365if test "${ac_cv_func_authenticate+set}" = set; then 6135if test "${ac_cv_func_authenticate+set}" = set; then
4366 echo $ECHO_N "(cached) $ECHO_C" >&6 6136 echo $ECHO_N "(cached) $ECHO_C" >&6
4367else 6137else
@@ -4388,68 +6158,59 @@ cat >>conftest.$ac_ext <<_ACEOF
4388 6158
4389#undef authenticate 6159#undef authenticate
4390 6160
4391/* Override any gcc2 internal prototype to avoid an error. */ 6161/* Override any GCC internal prototype to avoid an error.
6162 Use char because int might match the return type of a GCC
6163 builtin and then its argument prototype would still apply. */
4392#ifdef __cplusplus 6164#ifdef __cplusplus
4393extern "C" 6165extern "C"
4394{
4395#endif 6166#endif
4396/* We use char because int might match the return type of a gcc2
4397 builtin and then its argument prototype would still apply. */
4398char authenticate (); 6167char authenticate ();
4399/* The GNU C library defines this for functions which it implements 6168/* The GNU C library defines this for functions which it implements
4400 to always fail with ENOSYS. Some functions are actually named 6169 to always fail with ENOSYS. Some functions are actually named
4401 something starting with __ and the normal name is an alias. */ 6170 something starting with __ and the normal name is an alias. */
4402#if defined (__stub_authenticate) || defined (__stub___authenticate) 6171#if defined __stub_authenticate || defined __stub___authenticate
4403choke me 6172choke me
4404#else
4405char (*f) () = authenticate;
4406#endif
4407#ifdef __cplusplus
4408}
4409#endif 6173#endif
4410 6174
4411int 6175int
4412main () 6176main ()
4413{ 6177{
4414return f != authenticate; 6178return authenticate ();
4415 ; 6179 ;
4416 return 0; 6180 return 0;
4417} 6181}
4418_ACEOF 6182_ACEOF
4419rm -f conftest.$ac_objext conftest$ac_exeext 6183rm -f conftest.$ac_objext conftest$ac_exeext
4420if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 6184if { (ac_try="$ac_link"
4421 (eval $ac_link) 2>conftest.er1 6185case "(($ac_try" in
6186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6187 *) ac_try_echo=$ac_try;;
6188esac
6189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6190 (eval "$ac_link") 2>conftest.er1
4422 ac_status=$? 6191 ac_status=$?
4423 grep -v '^ *+' conftest.er1 >conftest.err 6192 grep -v '^ *+' conftest.er1 >conftest.err
4424 rm -f conftest.er1 6193 rm -f conftest.er1
4425 cat conftest.err >&5 6194 cat conftest.err >&5
4426 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4427 (exit $ac_status); } && 6196 (exit $ac_status); } && {
4428 { ac_try='test -z "$ac_c_werror_flag" 6197 test -z "$ac_c_werror_flag" ||
4429 || test ! -s conftest.err' 6198 test ! -s conftest.err
4430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6199 } && test -s conftest$ac_exeext &&
4431 (eval $ac_try) 2>&5 6200 $as_test_x conftest$ac_exeext; then
4432 ac_status=$?
4433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4434 (exit $ac_status); }; } &&
4435 { ac_try='test -s conftest$ac_exeext'
4436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4437 (eval $ac_try) 2>&5
4438 ac_status=$?
4439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4440 (exit $ac_status); }; }; then
4441 ac_cv_func_authenticate=yes 6201 ac_cv_func_authenticate=yes
4442else 6202else
4443 echo "$as_me: failed program was:" >&5 6203 echo "$as_me: failed program was:" >&5
4444sed 's/^/| /' conftest.$ac_ext >&5 6204sed 's/^/| /' conftest.$ac_ext >&5
4445 6205
4446ac_cv_func_authenticate=no 6206 ac_cv_func_authenticate=no
4447fi 6207fi
4448rm -f conftest.err conftest.$ac_objext \ 6208
6209rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4449 conftest$ac_exeext conftest.$ac_ext 6210 conftest$ac_exeext conftest.$ac_ext
4450fi 6211fi
4451echo "$as_me:$LINENO: result: $ac_cv_func_authenticate" >&5 6212{ echo "$as_me:$LINENO: result: $ac_cv_func_authenticate" >&5
4452echo "${ECHO_T}$ac_cv_func_authenticate" >&6 6213echo "${ECHO_T}$ac_cv_func_authenticate" >&6; }
4453if test $ac_cv_func_authenticate = yes; then 6214if test $ac_cv_func_authenticate = yes; then
4454 6215
4455cat >>confdefs.h <<\_ACEOF 6216cat >>confdefs.h <<\_ACEOF
@@ -4457,8 +6218,8 @@ cat >>confdefs.h <<\_ACEOF
4457_ACEOF 6218_ACEOF
4458 6219
4459else 6220else
4460 echo "$as_me:$LINENO: checking for authenticate in -ls" >&5 6221 { echo "$as_me:$LINENO: checking for authenticate in -ls" >&5
4461echo $ECHO_N "checking for authenticate in -ls... $ECHO_C" >&6 6222echo $ECHO_N "checking for authenticate in -ls... $ECHO_C" >&6; }
4462if test "${ac_cv_lib_s_authenticate+set}" = set; then 6223if test "${ac_cv_lib_s_authenticate+set}" = set; then
4463 echo $ECHO_N "(cached) $ECHO_C" >&6 6224 echo $ECHO_N "(cached) $ECHO_C" >&6
4464else 6225else
@@ -4471,56 +6232,53 @@ cat confdefs.h >>conftest.$ac_ext
4471cat >>conftest.$ac_ext <<_ACEOF 6232cat >>conftest.$ac_ext <<_ACEOF
4472/* end confdefs.h. */ 6233/* end confdefs.h. */
4473 6234
4474/* Override any gcc2 internal prototype to avoid an error. */ 6235/* Override any GCC internal prototype to avoid an error.
6236 Use char because int might match the return type of a GCC
6237 builtin and then its argument prototype would still apply. */
4475#ifdef __cplusplus 6238#ifdef __cplusplus
4476extern "C" 6239extern "C"
4477#endif 6240#endif
4478/* We use char because int might match the return type of a gcc2
4479 builtin and then its argument prototype would still apply. */
4480char authenticate (); 6241char authenticate ();
4481int 6242int
4482main () 6243main ()
4483{ 6244{
4484authenticate (); 6245return authenticate ();
4485 ; 6246 ;
4486 return 0; 6247 return 0;
4487} 6248}
4488_ACEOF 6249_ACEOF
4489rm -f conftest.$ac_objext conftest$ac_exeext 6250rm -f conftest.$ac_objext conftest$ac_exeext
4490if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 6251if { (ac_try="$ac_link"
4491 (eval $ac_link) 2>conftest.er1 6252case "(($ac_try" in
6253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6254 *) ac_try_echo=$ac_try;;
6255esac
6256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6257 (eval "$ac_link") 2>conftest.er1
4492 ac_status=$? 6258 ac_status=$?
4493 grep -v '^ *+' conftest.er1 >conftest.err 6259 grep -v '^ *+' conftest.er1 >conftest.err
4494 rm -f conftest.er1 6260 rm -f conftest.er1
4495 cat conftest.err >&5 6261 cat conftest.err >&5
4496 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4497 (exit $ac_status); } && 6263 (exit $ac_status); } && {
4498 { ac_try='test -z "$ac_c_werror_flag" 6264 test -z "$ac_c_werror_flag" ||
4499 || test ! -s conftest.err' 6265 test ! -s conftest.err
4500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6266 } && test -s conftest$ac_exeext &&
4501 (eval $ac_try) 2>&5 6267 $as_test_x conftest$ac_exeext; then
4502 ac_status=$?
4503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4504 (exit $ac_status); }; } &&
4505 { ac_try='test -s conftest$ac_exeext'
4506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4507 (eval $ac_try) 2>&5
4508 ac_status=$?
4509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4510 (exit $ac_status); }; }; then
4511 ac_cv_lib_s_authenticate=yes 6268 ac_cv_lib_s_authenticate=yes
4512else 6269else
4513 echo "$as_me: failed program was:" >&5 6270 echo "$as_me: failed program was:" >&5
4514sed 's/^/| /' conftest.$ac_ext >&5 6271sed 's/^/| /' conftest.$ac_ext >&5
4515 6272
4516ac_cv_lib_s_authenticate=no 6273 ac_cv_lib_s_authenticate=no
4517fi 6274fi
4518rm -f conftest.err conftest.$ac_objext \ 6275
6276rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4519 conftest$ac_exeext conftest.$ac_ext 6277 conftest$ac_exeext conftest.$ac_ext
4520LIBS=$ac_check_lib_save_LIBS 6278LIBS=$ac_check_lib_save_LIBS
4521fi 6279fi
4522echo "$as_me:$LINENO: result: $ac_cv_lib_s_authenticate" >&5 6280{ echo "$as_me:$LINENO: result: $ac_cv_lib_s_authenticate" >&5
4523echo "${ECHO_T}$ac_cv_lib_s_authenticate" >&6 6281echo "${ECHO_T}$ac_cv_lib_s_authenticate" >&6; }
4524if test $ac_cv_lib_s_authenticate = yes; then 6282if test $ac_cv_lib_s_authenticate = yes; then
4525 cat >>confdefs.h <<\_ACEOF 6283 cat >>confdefs.h <<\_ACEOF
4526#define WITH_AIXAUTHENTICATE 1 6284#define WITH_AIXAUTHENTICATE 1
@@ -4533,8 +6291,8 @@ fi
4533 6291
4534fi 6292fi
4535 6293
4536 echo "$as_me:$LINENO: checking whether authenticate is declared" >&5 6294 { echo "$as_me:$LINENO: checking whether authenticate is declared" >&5
4537echo $ECHO_N "checking whether authenticate is declared... $ECHO_C" >&6 6295echo $ECHO_N "checking whether authenticate is declared... $ECHO_C" >&6; }
4538if test "${ac_cv_have_decl_authenticate+set}" = set; then 6296if test "${ac_cv_have_decl_authenticate+set}" = set; then
4539 echo $ECHO_N "(cached) $ECHO_C" >&6 6297 echo $ECHO_N "(cached) $ECHO_C" >&6
4540else 6298else
@@ -4550,7 +6308,7 @@ int
4550main () 6308main ()
4551{ 6309{
4552#ifndef authenticate 6310#ifndef authenticate
4553 char *p = (char *) authenticate; 6311 (void) authenticate;
4554#endif 6312#endif
4555 6313
4556 ; 6314 ;
@@ -4558,38 +6316,34 @@ main ()
4558} 6316}
4559_ACEOF 6317_ACEOF
4560rm -f conftest.$ac_objext 6318rm -f conftest.$ac_objext
4561if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 6319if { (ac_try="$ac_compile"
4562 (eval $ac_compile) 2>conftest.er1 6320case "(($ac_try" in
6321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6322 *) ac_try_echo=$ac_try;;
6323esac
6324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6325 (eval "$ac_compile") 2>conftest.er1
4563 ac_status=$? 6326 ac_status=$?
4564 grep -v '^ *+' conftest.er1 >conftest.err 6327 grep -v '^ *+' conftest.er1 >conftest.err
4565 rm -f conftest.er1 6328 rm -f conftest.er1
4566 cat conftest.err >&5 6329 cat conftest.err >&5
4567 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4568 (exit $ac_status); } && 6331 (exit $ac_status); } && {
4569 { ac_try='test -z "$ac_c_werror_flag" 6332 test -z "$ac_c_werror_flag" ||
4570 || test ! -s conftest.err' 6333 test ! -s conftest.err
4571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6334 } && test -s conftest.$ac_objext; then
4572 (eval $ac_try) 2>&5
4573 ac_status=$?
4574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4575 (exit $ac_status); }; } &&
4576 { ac_try='test -s conftest.$ac_objext'
4577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4578 (eval $ac_try) 2>&5
4579 ac_status=$?
4580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4581 (exit $ac_status); }; }; then
4582 ac_cv_have_decl_authenticate=yes 6335 ac_cv_have_decl_authenticate=yes
4583else 6336else
4584 echo "$as_me: failed program was:" >&5 6337 echo "$as_me: failed program was:" >&5
4585sed 's/^/| /' conftest.$ac_ext >&5 6338sed 's/^/| /' conftest.$ac_ext >&5
4586 6339
4587ac_cv_have_decl_authenticate=no 6340 ac_cv_have_decl_authenticate=no
4588fi 6341fi
4589rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 6342
6343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4590fi 6344fi
4591echo "$as_me:$LINENO: result: $ac_cv_have_decl_authenticate" >&5 6345{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_authenticate" >&5
4592echo "${ECHO_T}$ac_cv_have_decl_authenticate" >&6 6346echo "${ECHO_T}$ac_cv_have_decl_authenticate" >&6; }
4593if test $ac_cv_have_decl_authenticate = yes; then 6347if test $ac_cv_have_decl_authenticate = yes; then
4594 6348
4595cat >>confdefs.h <<_ACEOF 6349cat >>confdefs.h <<_ACEOF
@@ -4604,8 +6358,8 @@ _ACEOF
4604 6358
4605 6359
4606fi 6360fi
4607echo "$as_me:$LINENO: checking whether loginrestrictions is declared" >&5 6361{ echo "$as_me:$LINENO: checking whether loginrestrictions is declared" >&5
4608echo $ECHO_N "checking whether loginrestrictions is declared... $ECHO_C" >&6 6362echo $ECHO_N "checking whether loginrestrictions is declared... $ECHO_C" >&6; }
4609if test "${ac_cv_have_decl_loginrestrictions+set}" = set; then 6363if test "${ac_cv_have_decl_loginrestrictions+set}" = set; then
4610 echo $ECHO_N "(cached) $ECHO_C" >&6 6364 echo $ECHO_N "(cached) $ECHO_C" >&6
4611else 6365else
@@ -4621,7 +6375,7 @@ int
4621main () 6375main ()
4622{ 6376{
4623#ifndef loginrestrictions 6377#ifndef loginrestrictions
4624 char *p = (char *) loginrestrictions; 6378 (void) loginrestrictions;
4625#endif 6379#endif
4626 6380
4627 ; 6381 ;
@@ -4629,38 +6383,34 @@ main ()
4629} 6383}
4630_ACEOF 6384_ACEOF
4631rm -f conftest.$ac_objext 6385rm -f conftest.$ac_objext
4632if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 6386if { (ac_try="$ac_compile"
4633 (eval $ac_compile) 2>conftest.er1 6387case "(($ac_try" in
6388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6389 *) ac_try_echo=$ac_try;;
6390esac
6391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6392 (eval "$ac_compile") 2>conftest.er1
4634 ac_status=$? 6393 ac_status=$?
4635 grep -v '^ *+' conftest.er1 >conftest.err 6394 grep -v '^ *+' conftest.er1 >conftest.err
4636 rm -f conftest.er1 6395 rm -f conftest.er1
4637 cat conftest.err >&5 6396 cat conftest.err >&5
4638 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4639 (exit $ac_status); } && 6398 (exit $ac_status); } && {
4640 { ac_try='test -z "$ac_c_werror_flag" 6399 test -z "$ac_c_werror_flag" ||
4641 || test ! -s conftest.err' 6400 test ! -s conftest.err
4642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6401 } && test -s conftest.$ac_objext; then
4643 (eval $ac_try) 2>&5
4644 ac_status=$?
4645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4646 (exit $ac_status); }; } &&
4647 { ac_try='test -s conftest.$ac_objext'
4648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4649 (eval $ac_try) 2>&5
4650 ac_status=$?
4651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4652 (exit $ac_status); }; }; then
4653 ac_cv_have_decl_loginrestrictions=yes 6402 ac_cv_have_decl_loginrestrictions=yes
4654else 6403else
4655 echo "$as_me: failed program was:" >&5 6404 echo "$as_me: failed program was:" >&5
4656sed 's/^/| /' conftest.$ac_ext >&5 6405sed 's/^/| /' conftest.$ac_ext >&5
4657 6406
4658ac_cv_have_decl_loginrestrictions=no 6407 ac_cv_have_decl_loginrestrictions=no
4659fi 6408fi
4660rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 6409
6410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4661fi 6411fi
4662echo "$as_me:$LINENO: result: $ac_cv_have_decl_loginrestrictions" >&5 6412{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_loginrestrictions" >&5
4663echo "${ECHO_T}$ac_cv_have_decl_loginrestrictions" >&6 6413echo "${ECHO_T}$ac_cv_have_decl_loginrestrictions" >&6; }
4664if test $ac_cv_have_decl_loginrestrictions = yes; then 6414if test $ac_cv_have_decl_loginrestrictions = yes; then
4665 6415
4666cat >>confdefs.h <<_ACEOF 6416cat >>confdefs.h <<_ACEOF
@@ -4675,8 +6425,8 @@ _ACEOF
4675 6425
4676 6426
4677fi 6427fi
4678echo "$as_me:$LINENO: checking whether loginsuccess is declared" >&5 6428{ echo "$as_me:$LINENO: checking whether loginsuccess is declared" >&5
4679echo $ECHO_N "checking whether loginsuccess is declared... $ECHO_C" >&6 6429echo $ECHO_N "checking whether loginsuccess is declared... $ECHO_C" >&6; }
4680if test "${ac_cv_have_decl_loginsuccess+set}" = set; then 6430if test "${ac_cv_have_decl_loginsuccess+set}" = set; then
4681 echo $ECHO_N "(cached) $ECHO_C" >&6 6431 echo $ECHO_N "(cached) $ECHO_C" >&6
4682else 6432else
@@ -4692,7 +6442,7 @@ int
4692main () 6442main ()
4693{ 6443{
4694#ifndef loginsuccess 6444#ifndef loginsuccess
4695 char *p = (char *) loginsuccess; 6445 (void) loginsuccess;
4696#endif 6446#endif
4697 6447
4698 ; 6448 ;
@@ -4700,38 +6450,34 @@ main ()
4700} 6450}
4701_ACEOF 6451_ACEOF
4702rm -f conftest.$ac_objext 6452rm -f conftest.$ac_objext
4703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 6453if { (ac_try="$ac_compile"
4704 (eval $ac_compile) 2>conftest.er1 6454case "(($ac_try" in
6455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6456 *) ac_try_echo=$ac_try;;
6457esac
6458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6459 (eval "$ac_compile") 2>conftest.er1
4705 ac_status=$? 6460 ac_status=$?
4706 grep -v '^ *+' conftest.er1 >conftest.err 6461 grep -v '^ *+' conftest.er1 >conftest.err
4707 rm -f conftest.er1 6462 rm -f conftest.er1
4708 cat conftest.err >&5 6463 cat conftest.err >&5
4709 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4710 (exit $ac_status); } && 6465 (exit $ac_status); } && {
4711 { ac_try='test -z "$ac_c_werror_flag" 6466 test -z "$ac_c_werror_flag" ||
4712 || test ! -s conftest.err' 6467 test ! -s conftest.err
4713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6468 } && test -s conftest.$ac_objext; then
4714 (eval $ac_try) 2>&5
4715 ac_status=$?
4716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4717 (exit $ac_status); }; } &&
4718 { ac_try='test -s conftest.$ac_objext'
4719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4720 (eval $ac_try) 2>&5
4721 ac_status=$?
4722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4723 (exit $ac_status); }; }; then
4724 ac_cv_have_decl_loginsuccess=yes 6469 ac_cv_have_decl_loginsuccess=yes
4725else 6470else
4726 echo "$as_me: failed program was:" >&5 6471 echo "$as_me: failed program was:" >&5
4727sed 's/^/| /' conftest.$ac_ext >&5 6472sed 's/^/| /' conftest.$ac_ext >&5
4728 6473
4729ac_cv_have_decl_loginsuccess=no 6474 ac_cv_have_decl_loginsuccess=no
4730fi 6475fi
4731rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 6476
6477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4732fi 6478fi
4733echo "$as_me:$LINENO: result: $ac_cv_have_decl_loginsuccess" >&5 6479{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_loginsuccess" >&5
4734echo "${ECHO_T}$ac_cv_have_decl_loginsuccess" >&6 6480echo "${ECHO_T}$ac_cv_have_decl_loginsuccess" >&6; }
4735if test $ac_cv_have_decl_loginsuccess = yes; then 6481if test $ac_cv_have_decl_loginsuccess = yes; then
4736 6482
4737cat >>confdefs.h <<_ACEOF 6483cat >>confdefs.h <<_ACEOF
@@ -4746,8 +6492,8 @@ _ACEOF
4746 6492
4747 6493
4748fi 6494fi
4749echo "$as_me:$LINENO: checking whether passwdexpired is declared" >&5 6495{ echo "$as_me:$LINENO: checking whether passwdexpired is declared" >&5
4750echo $ECHO_N "checking whether passwdexpired is declared... $ECHO_C" >&6 6496echo $ECHO_N "checking whether passwdexpired is declared... $ECHO_C" >&6; }
4751if test "${ac_cv_have_decl_passwdexpired+set}" = set; then 6497if test "${ac_cv_have_decl_passwdexpired+set}" = set; then
4752 echo $ECHO_N "(cached) $ECHO_C" >&6 6498 echo $ECHO_N "(cached) $ECHO_C" >&6
4753else 6499else
@@ -4763,7 +6509,7 @@ int
4763main () 6509main ()
4764{ 6510{
4765#ifndef passwdexpired 6511#ifndef passwdexpired
4766 char *p = (char *) passwdexpired; 6512 (void) passwdexpired;
4767#endif 6513#endif
4768 6514
4769 ; 6515 ;
@@ -4771,38 +6517,34 @@ main ()
4771} 6517}
4772_ACEOF 6518_ACEOF
4773rm -f conftest.$ac_objext 6519rm -f conftest.$ac_objext
4774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 6520if { (ac_try="$ac_compile"
4775 (eval $ac_compile) 2>conftest.er1 6521case "(($ac_try" in
6522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6523 *) ac_try_echo=$ac_try;;
6524esac
6525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6526 (eval "$ac_compile") 2>conftest.er1
4776 ac_status=$? 6527 ac_status=$?
4777 grep -v '^ *+' conftest.er1 >conftest.err 6528 grep -v '^ *+' conftest.er1 >conftest.err
4778 rm -f conftest.er1 6529 rm -f conftest.er1
4779 cat conftest.err >&5 6530 cat conftest.err >&5
4780 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4781 (exit $ac_status); } && 6532 (exit $ac_status); } && {
4782 { ac_try='test -z "$ac_c_werror_flag" 6533 test -z "$ac_c_werror_flag" ||
4783 || test ! -s conftest.err' 6534 test ! -s conftest.err
4784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6535 } && test -s conftest.$ac_objext; then
4785 (eval $ac_try) 2>&5
4786 ac_status=$?
4787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4788 (exit $ac_status); }; } &&
4789 { ac_try='test -s conftest.$ac_objext'
4790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4791 (eval $ac_try) 2>&5
4792 ac_status=$?
4793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4794 (exit $ac_status); }; }; then
4795 ac_cv_have_decl_passwdexpired=yes 6536 ac_cv_have_decl_passwdexpired=yes
4796else 6537else
4797 echo "$as_me: failed program was:" >&5 6538 echo "$as_me: failed program was:" >&5
4798sed 's/^/| /' conftest.$ac_ext >&5 6539sed 's/^/| /' conftest.$ac_ext >&5
4799 6540
4800ac_cv_have_decl_passwdexpired=no 6541 ac_cv_have_decl_passwdexpired=no
4801fi 6542fi
4802rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 6543
6544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4803fi 6545fi
4804echo "$as_me:$LINENO: result: $ac_cv_have_decl_passwdexpired" >&5 6546{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_passwdexpired" >&5
4805echo "${ECHO_T}$ac_cv_have_decl_passwdexpired" >&6 6547echo "${ECHO_T}$ac_cv_have_decl_passwdexpired" >&6; }
4806if test $ac_cv_have_decl_passwdexpired = yes; then 6548if test $ac_cv_have_decl_passwdexpired = yes; then
4807 6549
4808cat >>confdefs.h <<_ACEOF 6550cat >>confdefs.h <<_ACEOF
@@ -4817,8 +6559,8 @@ _ACEOF
4817 6559
4818 6560
4819fi 6561fi
4820echo "$as_me:$LINENO: checking whether setauthdb is declared" >&5 6562{ echo "$as_me:$LINENO: checking whether setauthdb is declared" >&5
4821echo $ECHO_N "checking whether setauthdb is declared... $ECHO_C" >&6 6563echo $ECHO_N "checking whether setauthdb is declared... $ECHO_C" >&6; }
4822if test "${ac_cv_have_decl_setauthdb+set}" = set; then 6564if test "${ac_cv_have_decl_setauthdb+set}" = set; then
4823 echo $ECHO_N "(cached) $ECHO_C" >&6 6565 echo $ECHO_N "(cached) $ECHO_C" >&6
4824else 6566else
@@ -4834,7 +6576,7 @@ int
4834main () 6576main ()
4835{ 6577{
4836#ifndef setauthdb 6578#ifndef setauthdb
4837 char *p = (char *) setauthdb; 6579 (void) setauthdb;
4838#endif 6580#endif
4839 6581
4840 ; 6582 ;
@@ -4842,38 +6584,34 @@ main ()
4842} 6584}
4843_ACEOF 6585_ACEOF
4844rm -f conftest.$ac_objext 6586rm -f conftest.$ac_objext
4845if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 6587if { (ac_try="$ac_compile"
4846 (eval $ac_compile) 2>conftest.er1 6588case "(($ac_try" in
6589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6590 *) ac_try_echo=$ac_try;;
6591esac
6592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6593 (eval "$ac_compile") 2>conftest.er1
4847 ac_status=$? 6594 ac_status=$?
4848 grep -v '^ *+' conftest.er1 >conftest.err 6595 grep -v '^ *+' conftest.er1 >conftest.err
4849 rm -f conftest.er1 6596 rm -f conftest.er1
4850 cat conftest.err >&5 6597 cat conftest.err >&5
4851 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4852 (exit $ac_status); } && 6599 (exit $ac_status); } && {
4853 { ac_try='test -z "$ac_c_werror_flag" 6600 test -z "$ac_c_werror_flag" ||
4854 || test ! -s conftest.err' 6601 test ! -s conftest.err
4855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6602 } && test -s conftest.$ac_objext; then
4856 (eval $ac_try) 2>&5
4857 ac_status=$?
4858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4859 (exit $ac_status); }; } &&
4860 { ac_try='test -s conftest.$ac_objext'
4861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4862 (eval $ac_try) 2>&5
4863 ac_status=$?
4864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4865 (exit $ac_status); }; }; then
4866 ac_cv_have_decl_setauthdb=yes 6603 ac_cv_have_decl_setauthdb=yes
4867else 6604else
4868 echo "$as_me: failed program was:" >&5 6605 echo "$as_me: failed program was:" >&5
4869sed 's/^/| /' conftest.$ac_ext >&5 6606sed 's/^/| /' conftest.$ac_ext >&5
4870 6607
4871ac_cv_have_decl_setauthdb=no 6608 ac_cv_have_decl_setauthdb=no
4872fi 6609fi
4873rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 6610
6611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4874fi 6612fi
4875echo "$as_me:$LINENO: result: $ac_cv_have_decl_setauthdb" >&5 6613{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_setauthdb" >&5
4876echo "${ECHO_T}$ac_cv_have_decl_setauthdb" >&6 6614echo "${ECHO_T}$ac_cv_have_decl_setauthdb" >&6; }
4877if test $ac_cv_have_decl_setauthdb = yes; then 6615if test $ac_cv_have_decl_setauthdb = yes; then
4878 6616
4879cat >>confdefs.h <<_ACEOF 6617cat >>confdefs.h <<_ACEOF
@@ -4890,8 +6628,8 @@ _ACEOF
4890fi 6628fi
4891 6629
4892 6630
4893 echo "$as_me:$LINENO: checking whether loginfailed is declared" >&5 6631 { echo "$as_me:$LINENO: checking whether loginfailed is declared" >&5
4894echo $ECHO_N "checking whether loginfailed is declared... $ECHO_C" >&6 6632echo $ECHO_N "checking whether loginfailed is declared... $ECHO_C" >&6; }
4895if test "${ac_cv_have_decl_loginfailed+set}" = set; then 6633if test "${ac_cv_have_decl_loginfailed+set}" = set; then
4896 echo $ECHO_N "(cached) $ECHO_C" >&6 6634 echo $ECHO_N "(cached) $ECHO_C" >&6
4897else 6635else
@@ -4908,7 +6646,7 @@ int
4908main () 6646main ()
4909{ 6647{
4910#ifndef loginfailed 6648#ifndef loginfailed
4911 char *p = (char *) loginfailed; 6649 (void) loginfailed;
4912#endif 6650#endif
4913 6651
4914 ; 6652 ;
@@ -4916,46 +6654,42 @@ main ()
4916} 6654}
4917_ACEOF 6655_ACEOF
4918rm -f conftest.$ac_objext 6656rm -f conftest.$ac_objext
4919if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 6657if { (ac_try="$ac_compile"
4920 (eval $ac_compile) 2>conftest.er1 6658case "(($ac_try" in
6659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6660 *) ac_try_echo=$ac_try;;
6661esac
6662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6663 (eval "$ac_compile") 2>conftest.er1
4921 ac_status=$? 6664 ac_status=$?
4922 grep -v '^ *+' conftest.er1 >conftest.err 6665 grep -v '^ *+' conftest.er1 >conftest.err
4923 rm -f conftest.er1 6666 rm -f conftest.er1
4924 cat conftest.err >&5 6667 cat conftest.err >&5
4925 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4926 (exit $ac_status); } && 6669 (exit $ac_status); } && {
4927 { ac_try='test -z "$ac_c_werror_flag" 6670 test -z "$ac_c_werror_flag" ||
4928 || test ! -s conftest.err' 6671 test ! -s conftest.err
4929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6672 } && test -s conftest.$ac_objext; then
4930 (eval $ac_try) 2>&5
4931 ac_status=$?
4932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4933 (exit $ac_status); }; } &&
4934 { ac_try='test -s conftest.$ac_objext'
4935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4936 (eval $ac_try) 2>&5
4937 ac_status=$?
4938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4939 (exit $ac_status); }; }; then
4940 ac_cv_have_decl_loginfailed=yes 6673 ac_cv_have_decl_loginfailed=yes
4941else 6674else
4942 echo "$as_me: failed program was:" >&5 6675 echo "$as_me: failed program was:" >&5
4943sed 's/^/| /' conftest.$ac_ext >&5 6676sed 's/^/| /' conftest.$ac_ext >&5
4944 6677
4945ac_cv_have_decl_loginfailed=no 6678 ac_cv_have_decl_loginfailed=no
4946fi 6679fi
4947rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 6680
6681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4948fi 6682fi
4949echo "$as_me:$LINENO: result: $ac_cv_have_decl_loginfailed" >&5 6683{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_loginfailed" >&5
4950echo "${ECHO_T}$ac_cv_have_decl_loginfailed" >&6 6684echo "${ECHO_T}$ac_cv_have_decl_loginfailed" >&6; }
4951if test $ac_cv_have_decl_loginfailed = yes; then 6685if test $ac_cv_have_decl_loginfailed = yes; then
4952 6686
4953cat >>confdefs.h <<_ACEOF 6687cat >>confdefs.h <<_ACEOF
4954#define HAVE_DECL_LOGINFAILED 1 6688#define HAVE_DECL_LOGINFAILED 1
4955_ACEOF 6689_ACEOF
4956 6690
4957echo "$as_me:$LINENO: checking if loginfailed takes 4 arguments" >&5 6691{ echo "$as_me:$LINENO: checking if loginfailed takes 4 arguments" >&5
4958echo $ECHO_N "checking if loginfailed takes 4 arguments... $ECHO_C" >&6 6692echo $ECHO_N "checking if loginfailed takes 4 arguments... $ECHO_C" >&6; }
4959 cat >conftest.$ac_ext <<_ACEOF 6693 cat >conftest.$ac_ext <<_ACEOF
4960/* confdefs.h. */ 6694/* confdefs.h. */
4961_ACEOF 6695_ACEOF
@@ -4972,29 +6706,24 @@ main ()
4972} 6706}
4973_ACEOF 6707_ACEOF
4974rm -f conftest.$ac_objext 6708rm -f conftest.$ac_objext
4975if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 6709if { (ac_try="$ac_compile"
4976 (eval $ac_compile) 2>conftest.er1 6710case "(($ac_try" in
6711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6712 *) ac_try_echo=$ac_try;;
6713esac
6714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6715 (eval "$ac_compile") 2>conftest.er1
4977 ac_status=$? 6716 ac_status=$?
4978 grep -v '^ *+' conftest.er1 >conftest.err 6717 grep -v '^ *+' conftest.er1 >conftest.err
4979 rm -f conftest.er1 6718 rm -f conftest.er1
4980 cat conftest.err >&5 6719 cat conftest.err >&5
4981 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4982 (exit $ac_status); } && 6721 (exit $ac_status); } && {
4983 { ac_try='test -z "$ac_c_werror_flag" 6722 test -z "$ac_c_werror_flag" ||
4984 || test ! -s conftest.err' 6723 test ! -s conftest.err
4985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6724 } && test -s conftest.$ac_objext; then
4986 (eval $ac_try) 2>&5 6725 { echo "$as_me:$LINENO: result: yes" >&5
4987 ac_status=$? 6726echo "${ECHO_T}yes" >&6; }
4988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4989 (exit $ac_status); }; } &&
4990 { ac_try='test -s conftest.$ac_objext'
4991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4992 (eval $ac_try) 2>&5
4993 ac_status=$?
4994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4995 (exit $ac_status); }; }; then
4996 echo "$as_me:$LINENO: result: yes" >&5
4997echo "${ECHO_T}yes" >&6
4998 6727
4999cat >>confdefs.h <<\_ACEOF 6728cat >>confdefs.h <<\_ACEOF
5000#define AIX_LOGINFAILED_4ARG 1 6729#define AIX_LOGINFAILED_4ARG 1
@@ -5004,11 +6733,12 @@ else
5004 echo "$as_me: failed program was:" >&5 6733 echo "$as_me: failed program was:" >&5
5005sed 's/^/| /' conftest.$ac_ext >&5 6734sed 's/^/| /' conftest.$ac_ext >&5
5006 6735
5007echo "$as_me:$LINENO: result: no" >&5 6736 { echo "$as_me:$LINENO: result: no" >&5
5008echo "${ECHO_T}no" >&6 6737echo "${ECHO_T}no" >&6; }
5009 6738
5010fi 6739fi
5011rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 6740
6741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5012else 6742else
5013 cat >>confdefs.h <<_ACEOF 6743 cat >>confdefs.h <<_ACEOF
5014#define HAVE_DECL_LOGINFAILED 0 6744#define HAVE_DECL_LOGINFAILED 0
@@ -5022,9 +6752,9 @@ fi
5022for ac_func in setauthdb 6752for ac_func in setauthdb
5023do 6753do
5024as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 6754as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5025echo "$as_me:$LINENO: checking for $ac_func" >&5 6755{ echo "$as_me:$LINENO: checking for $ac_func" >&5
5026echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 6756echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
5027if eval "test \"\${$as_ac_var+set}\" = set"; then 6757if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5028 echo $ECHO_N "(cached) $ECHO_C" >&6 6758 echo $ECHO_N "(cached) $ECHO_C" >&6
5029else 6759else
5030 cat >conftest.$ac_ext <<_ACEOF 6760 cat >conftest.$ac_ext <<_ACEOF
@@ -5050,68 +6780,60 @@ cat >>conftest.$ac_ext <<_ACEOF
5050 6780
5051#undef $ac_func 6781#undef $ac_func
5052 6782
5053/* Override any gcc2 internal prototype to avoid an error. */ 6783/* Override any GCC internal prototype to avoid an error.
6784 Use char because int might match the return type of a GCC
6785 builtin and then its argument prototype would still apply. */
5054#ifdef __cplusplus 6786#ifdef __cplusplus
5055extern "C" 6787extern "C"
5056{
5057#endif 6788#endif
5058/* We use char because int might match the return type of a gcc2
5059 builtin and then its argument prototype would still apply. */
5060char $ac_func (); 6789char $ac_func ();
5061/* The GNU C library defines this for functions which it implements 6790/* The GNU C library defines this for functions which it implements
5062 to always fail with ENOSYS. Some functions are actually named 6791 to always fail with ENOSYS. Some functions are actually named
5063 something starting with __ and the normal name is an alias. */ 6792 something starting with __ and the normal name is an alias. */
5064#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 6793#if defined __stub_$ac_func || defined __stub___$ac_func
5065choke me 6794choke me
5066#else
5067char (*f) () = $ac_func;
5068#endif
5069#ifdef __cplusplus
5070}
5071#endif 6795#endif
5072 6796
5073int 6797int
5074main () 6798main ()
5075{ 6799{
5076return f != $ac_func; 6800return $ac_func ();
5077 ; 6801 ;
5078 return 0; 6802 return 0;
5079} 6803}
5080_ACEOF 6804_ACEOF
5081rm -f conftest.$ac_objext conftest$ac_exeext 6805rm -f conftest.$ac_objext conftest$ac_exeext
5082if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 6806if { (ac_try="$ac_link"
5083 (eval $ac_link) 2>conftest.er1 6807case "(($ac_try" in
6808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6809 *) ac_try_echo=$ac_try;;
6810esac
6811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6812 (eval "$ac_link") 2>conftest.er1
5084 ac_status=$? 6813 ac_status=$?
5085 grep -v '^ *+' conftest.er1 >conftest.err 6814 grep -v '^ *+' conftest.er1 >conftest.err
5086 rm -f conftest.er1 6815 rm -f conftest.er1
5087 cat conftest.err >&5 6816 cat conftest.err >&5
5088 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5089 (exit $ac_status); } && 6818 (exit $ac_status); } && {
5090 { ac_try='test -z "$ac_c_werror_flag" 6819 test -z "$ac_c_werror_flag" ||
5091 || test ! -s conftest.err' 6820 test ! -s conftest.err
5092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 6821 } && test -s conftest$ac_exeext &&
5093 (eval $ac_try) 2>&5 6822 $as_test_x conftest$ac_exeext; then
5094 ac_status=$?
5095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5096 (exit $ac_status); }; } &&
5097 { ac_try='test -s conftest$ac_exeext'
5098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5099 (eval $ac_try) 2>&5
5100 ac_status=$?
5101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5102 (exit $ac_status); }; }; then
5103 eval "$as_ac_var=yes" 6823 eval "$as_ac_var=yes"
5104else 6824else
5105 echo "$as_me: failed program was:" >&5 6825 echo "$as_me: failed program was:" >&5
5106sed 's/^/| /' conftest.$ac_ext >&5 6826sed 's/^/| /' conftest.$ac_ext >&5
5107 6827
5108eval "$as_ac_var=no" 6828 eval "$as_ac_var=no"
5109fi 6829fi
5110rm -f conftest.err conftest.$ac_objext \ 6830
6831rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5111 conftest$ac_exeext conftest.$ac_ext 6832 conftest$ac_exeext conftest.$ac_ext
5112fi 6833fi
5113echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 6834ac_res=`eval echo '${'$as_ac_var'}'`
5114echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 6835 { echo "$as_me:$LINENO: result: $ac_res" >&5
6836echo "${ECHO_T}$ac_res" >&6; }
5115if test `eval echo '${'$as_ac_var'}'` = yes; then 6837if test `eval echo '${'$as_ac_var'}'` = yes; then
5116 cat >>confdefs.h <<_ACEOF 6838 cat >>confdefs.h <<_ACEOF
5117#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 6839#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -5120,6 +6842,69 @@ _ACEOF
5120fi 6842fi
5121done 6843done
5122 6844
6845 { echo "$as_me:$LINENO: checking whether F_CLOSEM is declared" >&5
6846echo $ECHO_N "checking whether F_CLOSEM is declared... $ECHO_C" >&6; }
6847if test "${ac_cv_have_decl_F_CLOSEM+set}" = set; then
6848 echo $ECHO_N "(cached) $ECHO_C" >&6
6849else
6850 cat >conftest.$ac_ext <<_ACEOF
6851/* confdefs.h. */
6852_ACEOF
6853cat confdefs.h >>conftest.$ac_ext
6854cat >>conftest.$ac_ext <<_ACEOF
6855/* end confdefs.h. */
6856 #include <limits.h>
6857 #include <fcntl.h>
6858
6859
6860int
6861main ()
6862{
6863#ifndef F_CLOSEM
6864 (void) F_CLOSEM;
6865#endif
6866
6867 ;
6868 return 0;
6869}
6870_ACEOF
6871rm -f conftest.$ac_objext
6872if { (ac_try="$ac_compile"
6873case "(($ac_try" in
6874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6875 *) ac_try_echo=$ac_try;;
6876esac
6877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6878 (eval "$ac_compile") 2>conftest.er1
6879 ac_status=$?
6880 grep -v '^ *+' conftest.er1 >conftest.err
6881 rm -f conftest.er1
6882 cat conftest.err >&5
6883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6884 (exit $ac_status); } && {
6885 test -z "$ac_c_werror_flag" ||
6886 test ! -s conftest.err
6887 } && test -s conftest.$ac_objext; then
6888 ac_cv_have_decl_F_CLOSEM=yes
6889else
6890 echo "$as_me: failed program was:" >&5
6891sed 's/^/| /' conftest.$ac_ext >&5
6892
6893 ac_cv_have_decl_F_CLOSEM=no
6894fi
6895
6896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6897fi
6898{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_CLOSEM" >&5
6899echo "${ECHO_T}$ac_cv_have_decl_F_CLOSEM" >&6; }
6900if test $ac_cv_have_decl_F_CLOSEM = yes; then
6901
6902cat >>confdefs.h <<\_ACEOF
6903#define HAVE_FCNTL_CLOSEM 1
6904_ACEOF
6905
6906fi
6907
5123 check_for_aix_broken_getaddrinfo=1 6908 check_for_aix_broken_getaddrinfo=1
5124 6909
5125cat >>confdefs.h <<\_ACEOF 6910cat >>confdefs.h <<\_ACEOF
@@ -5161,10 +6946,15 @@ cat >>confdefs.h <<\_ACEOF
5161#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1 6946#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1
5162_ACEOF 6947_ACEOF
5163 6948
6949
6950cat >>confdefs.h <<\_ACEOF
6951#define PTY_ZEROREAD 1
6952_ACEOF
6953
5164 ;; 6954 ;;
5165*-*-cygwin*) 6955*-*-cygwin*)
5166 check_for_libcrypt_later=1 6956 check_for_libcrypt_later=1
5167 LIBS="$LIBS /usr/lib/textmode.o" 6957 LIBS="$LIBS /usr/lib/textreadmode.o"
5168 6958
5169cat >>confdefs.h <<\_ACEOF 6959cat >>confdefs.h <<\_ACEOF
5170#define HAVE_CYGWIN 1 6960#define HAVE_CYGWIN 1
@@ -5220,11 +7010,11 @@ _ACEOF
5220 7010
5221 ;; 7011 ;;
5222*-*-darwin*) 7012*-*-darwin*)
5223 echo "$as_me:$LINENO: checking if we have working getaddrinfo" >&5 7013 { echo "$as_me:$LINENO: checking if we have working getaddrinfo" >&5
5224echo $ECHO_N "checking if we have working getaddrinfo... $ECHO_C" >&6 7014echo $ECHO_N "checking if we have working getaddrinfo... $ECHO_C" >&6; }
5225 if test "$cross_compiling" = yes; then 7015 if test "$cross_compiling" = yes; then
5226 echo "$as_me:$LINENO: result: assume it is working" >&5 7016 { echo "$as_me:$LINENO: result: assume it is working" >&5
5227echo "${ECHO_T}assume it is working" >&6 7017echo "${ECHO_T}assume it is working" >&6; }
5228else 7018else
5229 cat >conftest.$ac_ext <<_ACEOF 7019 cat >conftest.$ac_ext <<_ACEOF
5230/* confdefs.h. */ 7020/* confdefs.h. */
@@ -5240,34 +7030,45 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
5240} 7030}
5241_ACEOF 7031_ACEOF
5242rm -f conftest$ac_exeext 7032rm -f conftest$ac_exeext
5243if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 7033if { (ac_try="$ac_link"
5244 (eval $ac_link) 2>&5 7034case "(($ac_try" in
7035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7036 *) ac_try_echo=$ac_try;;
7037esac
7038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7039 (eval "$ac_link") 2>&5
5245 ac_status=$? 7040 ac_status=$?
5246 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5247 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 7042 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7043 { (case "(($ac_try" in
5249 (eval $ac_try) 2>&5 7044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7045 *) ac_try_echo=$ac_try;;
7046esac
7047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7048 (eval "$ac_try") 2>&5
5250 ac_status=$? 7049 ac_status=$?
5251 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5252 (exit $ac_status); }; }; then 7051 (exit $ac_status); }; }; then
5253 echo "$as_me:$LINENO: result: working" >&5 7052 { echo "$as_me:$LINENO: result: working" >&5
5254echo "${ECHO_T}working" >&6 7053echo "${ECHO_T}working" >&6; }
5255else 7054else
5256 echo "$as_me: program exited with status $ac_status" >&5 7055 echo "$as_me: program exited with status $ac_status" >&5
5257echo "$as_me: failed program was:" >&5 7056echo "$as_me: failed program was:" >&5
5258sed 's/^/| /' conftest.$ac_ext >&5 7057sed 's/^/| /' conftest.$ac_ext >&5
5259 7058
5260( exit $ac_status ) 7059( exit $ac_status )
5261echo "$as_me:$LINENO: result: buggy" >&5 7060{ echo "$as_me:$LINENO: result: buggy" >&5
5262echo "${ECHO_T}buggy" >&6 7061echo "${ECHO_T}buggy" >&6; }
5263 7062
5264cat >>confdefs.h <<\_ACEOF 7063cat >>confdefs.h <<\_ACEOF
5265#define BROKEN_GETADDRINFO 1 7064#define BROKEN_GETADDRINFO 1
5266_ACEOF 7065_ACEOF
5267 7066
5268fi 7067fi
5269rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 7068rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5270fi 7069fi
7070
7071
5271 cat >>confdefs.h <<\_ACEOF 7072 cat >>confdefs.h <<\_ACEOF
5272#define SETEUID_BREAKS_SETUID 1 7073#define SETEUID_BREAKS_SETUID 1
5273_ACEOF 7074_ACEOF
@@ -5285,125 +7086,24 @@ cat >>confdefs.h <<_ACEOF
5285#define BIND_8_COMPAT 1 7086#define BIND_8_COMPAT 1
5286_ACEOF 7087_ACEOF
5287 7088
5288 echo "$as_me:$LINENO: checking if we have the Security Authorization Session API" >&5
5289echo $ECHO_N "checking if we have the Security Authorization Session API... $ECHO_C" >&6
5290 cat >conftest.$ac_ext <<_ACEOF
5291/* confdefs.h. */
5292_ACEOF
5293cat confdefs.h >>conftest.$ac_ext
5294cat >>conftest.$ac_ext <<_ACEOF
5295/* end confdefs.h. */
5296#include <Security/AuthSession.h>
5297int
5298main ()
5299{
5300SessionCreate(0, 0);
5301 ;
5302 return 0;
5303}
5304_ACEOF
5305rm -f conftest.$ac_objext
5306if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5307 (eval $ac_compile) 2>conftest.er1
5308 ac_status=$?
5309 grep -v '^ *+' conftest.er1 >conftest.err
5310 rm -f conftest.er1
5311 cat conftest.err >&5
5312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5313 (exit $ac_status); } &&
5314 { ac_try='test -z "$ac_c_werror_flag"
5315 || test ! -s conftest.err'
5316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5317 (eval $ac_try) 2>&5
5318 ac_status=$?
5319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5320 (exit $ac_status); }; } &&
5321 { ac_try='test -s conftest.$ac_objext'
5322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5323 (eval $ac_try) 2>&5
5324 ac_status=$?
5325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5326 (exit $ac_status); }; }; then
5327 ac_cv_use_security_session_api="yes"
5328 7089
5329cat >>confdefs.h <<\_ACEOF 7090cat >>confdefs.h <<\_ACEOF
5330#define USE_SECURITY_SESSION_API 1 7091#define SSH_TUN_FREEBSD 1
5331_ACEOF 7092_ACEOF
5332 7093
5333 LIBS="$LIBS -framework Security"
5334 echo "$as_me:$LINENO: result: yes" >&5
5335echo "${ECHO_T}yes" >&6
5336else
5337 echo "$as_me: failed program was:" >&5
5338sed 's/^/| /' conftest.$ac_ext >&5
5339
5340ac_cv_use_security_session_api="no"
5341 echo "$as_me:$LINENO: result: no" >&5
5342echo "${ECHO_T}no" >&6
5343fi
5344rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5345 echo "$as_me:$LINENO: checking if we have an in-memory credentials cache" >&5
5346echo $ECHO_N "checking if we have an in-memory credentials cache... $ECHO_C" >&6
5347 cat >conftest.$ac_ext <<_ACEOF
5348/* confdefs.h. */
5349_ACEOF
5350cat confdefs.h >>conftest.$ac_ext
5351cat >>conftest.$ac_ext <<_ACEOF
5352/* end confdefs.h. */
5353#include <Kerberos/Kerberos.h>
5354int
5355main ()
5356{
5357cc_context_t c;
5358 (void) cc_initialize (&c, 0, NULL, NULL);
5359 ;
5360 return 0;
5361}
5362_ACEOF
5363rm -f conftest.$ac_objext
5364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5365 (eval $ac_compile) 2>conftest.er1
5366 ac_status=$?
5367 grep -v '^ *+' conftest.er1 >conftest.err
5368 rm -f conftest.er1
5369 cat conftest.err >&5
5370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5371 (exit $ac_status); } &&
5372 { ac_try='test -z "$ac_c_werror_flag"
5373 || test ! -s conftest.err'
5374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5375 (eval $ac_try) 2>&5
5376 ac_status=$?
5377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5378 (exit $ac_status); }; } &&
5379 { ac_try='test -s conftest.$ac_objext'
5380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5381 (eval $ac_try) 2>&5
5382 ac_status=$?
5383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5384 (exit $ac_status); }; }; then
5385 7094
5386cat >>confdefs.h <<\_ACEOF 7095cat >>confdefs.h <<\_ACEOF
5387#define USE_CCAPI 1 7096#define SSH_TUN_COMPAT_AF 1
5388_ACEOF 7097_ACEOF
5389 7098
5390 LIBS="$LIBS -framework Security"
5391 echo "$as_me:$LINENO: result: yes" >&5
5392echo "${ECHO_T}yes" >&6
5393 if test "x$ac_cv_use_security_session_api" = "xno"; then
5394 { { echo "$as_me:$LINENO: error: *** Need a security framework to use the credentials cache API ***" >&5
5395echo "$as_me: error: *** Need a security framework to use the credentials cache API ***" >&2;}
5396 { (exit 1); exit 1; }; }
5397 fi
5398else
5399 echo "$as_me: failed program was:" >&5
5400sed 's/^/| /' conftest.$ac_ext >&5
5401 7099
5402echo "$as_me:$LINENO: result: no" >&5 7100cat >>confdefs.h <<\_ACEOF
5403echo "${ECHO_T}no" >&6 7101#define SSH_TUN_PREPEND_AF 1
7102_ACEOF
5404 7103
5405fi 7104 ;;
5406rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 7105*-*-dragonfly*)
7106 SSHDLIBS="$SSHDLIBS -lcrypt"
5407 ;; 7107 ;;
5408*-*-hpux*) 7108*-*-hpux*)
5409 # first we define all of the options common to all HP-UX releases 7109 # first we define all of the options common to all HP-UX releases
@@ -5434,8 +7134,8 @@ _ACEOF
5434 MAIL="/var/mail/username" 7134 MAIL="/var/mail/username"
5435 LIBS="$LIBS -lsec" 7135 LIBS="$LIBS -lsec"
5436 7136
5437echo "$as_me:$LINENO: checking for t_error in -lxnet" >&5 7137{ echo "$as_me:$LINENO: checking for t_error in -lxnet" >&5
5438echo $ECHO_N "checking for t_error in -lxnet... $ECHO_C" >&6 7138echo $ECHO_N "checking for t_error in -lxnet... $ECHO_C" >&6; }
5439if test "${ac_cv_lib_xnet_t_error+set}" = set; then 7139if test "${ac_cv_lib_xnet_t_error+set}" = set; then
5440 echo $ECHO_N "(cached) $ECHO_C" >&6 7140 echo $ECHO_N "(cached) $ECHO_C" >&6
5441else 7141else
@@ -5448,56 +7148,53 @@ cat confdefs.h >>conftest.$ac_ext
5448cat >>conftest.$ac_ext <<_ACEOF 7148cat >>conftest.$ac_ext <<_ACEOF
5449/* end confdefs.h. */ 7149/* end confdefs.h. */
5450 7150
5451/* Override any gcc2 internal prototype to avoid an error. */ 7151/* Override any GCC internal prototype to avoid an error.
7152 Use char because int might match the return type of a GCC
7153 builtin and then its argument prototype would still apply. */
5452#ifdef __cplusplus 7154#ifdef __cplusplus
5453extern "C" 7155extern "C"
5454#endif 7156#endif
5455/* We use char because int might match the return type of a gcc2
5456 builtin and then its argument prototype would still apply. */
5457char t_error (); 7157char t_error ();
5458int 7158int
5459main () 7159main ()
5460{ 7160{
5461t_error (); 7161return t_error ();
5462 ; 7162 ;
5463 return 0; 7163 return 0;
5464} 7164}
5465_ACEOF 7165_ACEOF
5466rm -f conftest.$ac_objext conftest$ac_exeext 7166rm -f conftest.$ac_objext conftest$ac_exeext
5467if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 7167if { (ac_try="$ac_link"
5468 (eval $ac_link) 2>conftest.er1 7168case "(($ac_try" in
7169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7170 *) ac_try_echo=$ac_try;;
7171esac
7172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7173 (eval "$ac_link") 2>conftest.er1
5469 ac_status=$? 7174 ac_status=$?
5470 grep -v '^ *+' conftest.er1 >conftest.err 7175 grep -v '^ *+' conftest.er1 >conftest.err
5471 rm -f conftest.er1 7176 rm -f conftest.er1
5472 cat conftest.err >&5 7177 cat conftest.err >&5
5473 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5474 (exit $ac_status); } && 7179 (exit $ac_status); } && {
5475 { ac_try='test -z "$ac_c_werror_flag" 7180 test -z "$ac_c_werror_flag" ||
5476 || test ! -s conftest.err' 7181 test ! -s conftest.err
5477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7182 } && test -s conftest$ac_exeext &&
5478 (eval $ac_try) 2>&5 7183 $as_test_x conftest$ac_exeext; then
5479 ac_status=$?
5480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5481 (exit $ac_status); }; } &&
5482 { ac_try='test -s conftest$ac_exeext'
5483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5484 (eval $ac_try) 2>&5
5485 ac_status=$?
5486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5487 (exit $ac_status); }; }; then
5488 ac_cv_lib_xnet_t_error=yes 7184 ac_cv_lib_xnet_t_error=yes
5489else 7185else
5490 echo "$as_me: failed program was:" >&5 7186 echo "$as_me: failed program was:" >&5
5491sed 's/^/| /' conftest.$ac_ext >&5 7187sed 's/^/| /' conftest.$ac_ext >&5
5492 7188
5493ac_cv_lib_xnet_t_error=no 7189 ac_cv_lib_xnet_t_error=no
5494fi 7190fi
5495rm -f conftest.err conftest.$ac_objext \ 7191
7192rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5496 conftest$ac_exeext conftest.$ac_ext 7193 conftest$ac_exeext conftest.$ac_ext
5497LIBS=$ac_check_lib_save_LIBS 7194LIBS=$ac_check_lib_save_LIBS
5498fi 7195fi
5499echo "$as_me:$LINENO: result: $ac_cv_lib_xnet_t_error" >&5 7196{ echo "$as_me:$LINENO: result: $ac_cv_lib_xnet_t_error" >&5
5500echo "${ECHO_T}$ac_cv_lib_xnet_t_error" >&6 7197echo "${ECHO_T}$ac_cv_lib_xnet_t_error" >&6; }
5501if test $ac_cv_lib_xnet_t_error = yes; then 7198if test $ac_cv_lib_xnet_t_error = yes; then
5502 cat >>confdefs.h <<_ACEOF 7199 cat >>confdefs.h <<_ACEOF
5503#define HAVE_LIBXNET 1 7200#define HAVE_LIBXNET 1
@@ -5599,8 +7296,8 @@ cat >>confdefs.h <<\_ACEOF
5599#define WITH_IRIX_AUDIT 1 7296#define WITH_IRIX_AUDIT 1
5600_ACEOF 7297_ACEOF
5601 7298
5602 echo "$as_me:$LINENO: checking for jlimit_startjob" >&5 7299 { echo "$as_me:$LINENO: checking for jlimit_startjob" >&5
5603echo $ECHO_N "checking for jlimit_startjob... $ECHO_C" >&6 7300echo $ECHO_N "checking for jlimit_startjob... $ECHO_C" >&6; }
5604if test "${ac_cv_func_jlimit_startjob+set}" = set; then 7301if test "${ac_cv_func_jlimit_startjob+set}" = set; then
5605 echo $ECHO_N "(cached) $ECHO_C" >&6 7302 echo $ECHO_N "(cached) $ECHO_C" >&6
5606else 7303else
@@ -5627,68 +7324,59 @@ cat >>conftest.$ac_ext <<_ACEOF
5627 7324
5628#undef jlimit_startjob 7325#undef jlimit_startjob
5629 7326
5630/* Override any gcc2 internal prototype to avoid an error. */ 7327/* Override any GCC internal prototype to avoid an error.
7328 Use char because int might match the return type of a GCC
7329 builtin and then its argument prototype would still apply. */
5631#ifdef __cplusplus 7330#ifdef __cplusplus
5632extern "C" 7331extern "C"
5633{
5634#endif 7332#endif
5635/* We use char because int might match the return type of a gcc2
5636 builtin and then its argument prototype would still apply. */
5637char jlimit_startjob (); 7333char jlimit_startjob ();
5638/* The GNU C library defines this for functions which it implements 7334/* The GNU C library defines this for functions which it implements
5639 to always fail with ENOSYS. Some functions are actually named 7335 to always fail with ENOSYS. Some functions are actually named
5640 something starting with __ and the normal name is an alias. */ 7336 something starting with __ and the normal name is an alias. */
5641#if defined (__stub_jlimit_startjob) || defined (__stub___jlimit_startjob) 7337#if defined __stub_jlimit_startjob || defined __stub___jlimit_startjob
5642choke me 7338choke me
5643#else
5644char (*f) () = jlimit_startjob;
5645#endif
5646#ifdef __cplusplus
5647}
5648#endif 7339#endif
5649 7340
5650int 7341int
5651main () 7342main ()
5652{ 7343{
5653return f != jlimit_startjob; 7344return jlimit_startjob ();
5654 ; 7345 ;
5655 return 0; 7346 return 0;
5656} 7347}
5657_ACEOF 7348_ACEOF
5658rm -f conftest.$ac_objext conftest$ac_exeext 7349rm -f conftest.$ac_objext conftest$ac_exeext
5659if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 7350if { (ac_try="$ac_link"
5660 (eval $ac_link) 2>conftest.er1 7351case "(($ac_try" in
7352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7353 *) ac_try_echo=$ac_try;;
7354esac
7355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7356 (eval "$ac_link") 2>conftest.er1
5661 ac_status=$? 7357 ac_status=$?
5662 grep -v '^ *+' conftest.er1 >conftest.err 7358 grep -v '^ *+' conftest.er1 >conftest.err
5663 rm -f conftest.er1 7359 rm -f conftest.er1
5664 cat conftest.err >&5 7360 cat conftest.err >&5
5665 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5666 (exit $ac_status); } && 7362 (exit $ac_status); } && {
5667 { ac_try='test -z "$ac_c_werror_flag" 7363 test -z "$ac_c_werror_flag" ||
5668 || test ! -s conftest.err' 7364 test ! -s conftest.err
5669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7365 } && test -s conftest$ac_exeext &&
5670 (eval $ac_try) 2>&5 7366 $as_test_x conftest$ac_exeext; then
5671 ac_status=$?
5672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5673 (exit $ac_status); }; } &&
5674 { ac_try='test -s conftest$ac_exeext'
5675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5676 (eval $ac_try) 2>&5
5677 ac_status=$?
5678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5679 (exit $ac_status); }; }; then
5680 ac_cv_func_jlimit_startjob=yes 7367 ac_cv_func_jlimit_startjob=yes
5681else 7368else
5682 echo "$as_me: failed program was:" >&5 7369 echo "$as_me: failed program was:" >&5
5683sed 's/^/| /' conftest.$ac_ext >&5 7370sed 's/^/| /' conftest.$ac_ext >&5
5684 7371
5685ac_cv_func_jlimit_startjob=no 7372 ac_cv_func_jlimit_startjob=no
5686fi 7373fi
5687rm -f conftest.err conftest.$ac_objext \ 7374
7375rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5688 conftest$ac_exeext conftest.$ac_ext 7376 conftest$ac_exeext conftest.$ac_ext
5689fi 7377fi
5690echo "$as_me:$LINENO: result: $ac_cv_func_jlimit_startjob" >&5 7378{ echo "$as_me:$LINENO: result: $ac_cv_func_jlimit_startjob" >&5
5691echo "${ECHO_T}$ac_cv_func_jlimit_startjob" >&6 7379echo "${ECHO_T}$ac_cv_func_jlimit_startjob" >&6; }
5692if test $ac_cv_func_jlimit_startjob = yes; then 7380if test $ac_cv_func_jlimit_startjob = yes; then
5693 7381
5694cat >>confdefs.h <<\_ACEOF 7382cat >>confdefs.h <<\_ACEOF
@@ -5776,260 +7464,22 @@ _ACEOF
5776 esac 7464 esac
5777 # tun(4) forwarding compat code 7465 # tun(4) forwarding compat code
5778 7466
5779echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5780echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5781if test "${ac_cv_header_stdc+set}" = set; then
5782 echo $ECHO_N "(cached) $ECHO_C" >&6
5783else
5784 cat >conftest.$ac_ext <<_ACEOF
5785/* confdefs.h. */
5786_ACEOF
5787cat confdefs.h >>conftest.$ac_ext
5788cat >>conftest.$ac_ext <<_ACEOF
5789/* end confdefs.h. */
5790#include <stdlib.h>
5791#include <stdarg.h>
5792#include <string.h>
5793#include <float.h>
5794
5795int
5796main ()
5797{
5798
5799 ;
5800 return 0;
5801}
5802_ACEOF
5803rm -f conftest.$ac_objext
5804if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5805 (eval $ac_compile) 2>conftest.er1
5806 ac_status=$?
5807 grep -v '^ *+' conftest.er1 >conftest.err
5808 rm -f conftest.er1
5809 cat conftest.err >&5
5810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5811 (exit $ac_status); } &&
5812 { ac_try='test -z "$ac_c_werror_flag"
5813 || test ! -s conftest.err'
5814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5815 (eval $ac_try) 2>&5
5816 ac_status=$?
5817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5818 (exit $ac_status); }; } &&
5819 { ac_try='test -s conftest.$ac_objext'
5820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5821 (eval $ac_try) 2>&5
5822 ac_status=$?
5823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5824 (exit $ac_status); }; }; then
5825 ac_cv_header_stdc=yes
5826else
5827 echo "$as_me: failed program was:" >&5
5828sed 's/^/| /' conftest.$ac_ext >&5
5829
5830ac_cv_header_stdc=no
5831fi
5832rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5833
5834if test $ac_cv_header_stdc = yes; then
5835 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5836 cat >conftest.$ac_ext <<_ACEOF
5837/* confdefs.h. */
5838_ACEOF
5839cat confdefs.h >>conftest.$ac_ext
5840cat >>conftest.$ac_ext <<_ACEOF
5841/* end confdefs.h. */
5842#include <string.h>
5843
5844_ACEOF
5845if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5846 $EGREP "memchr" >/dev/null 2>&1; then
5847 :
5848else
5849 ac_cv_header_stdc=no
5850fi
5851rm -f conftest*
5852
5853fi
5854
5855if test $ac_cv_header_stdc = yes; then
5856 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5857 cat >conftest.$ac_ext <<_ACEOF
5858/* confdefs.h. */
5859_ACEOF
5860cat confdefs.h >>conftest.$ac_ext
5861cat >>conftest.$ac_ext <<_ACEOF
5862/* end confdefs.h. */
5863#include <stdlib.h>
5864
5865_ACEOF
5866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5867 $EGREP "free" >/dev/null 2>&1; then
5868 :
5869else
5870 ac_cv_header_stdc=no
5871fi
5872rm -f conftest*
5873
5874fi
5875
5876if test $ac_cv_header_stdc = yes; then
5877 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5878 if test "$cross_compiling" = yes; then
5879 :
5880else
5881 cat >conftest.$ac_ext <<_ACEOF
5882/* confdefs.h. */
5883_ACEOF
5884cat confdefs.h >>conftest.$ac_ext
5885cat >>conftest.$ac_ext <<_ACEOF
5886/* end confdefs.h. */
5887#include <ctype.h>
5888#if ((' ' & 0x0FF) == 0x020)
5889# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5890# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5891#else
5892# define ISLOWER(c) \
5893 (('a' <= (c) && (c) <= 'i') \
5894 || ('j' <= (c) && (c) <= 'r') \
5895 || ('s' <= (c) && (c) <= 'z'))
5896# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5897#endif
5898
5899#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5900int
5901main ()
5902{
5903 int i;
5904 for (i = 0; i < 256; i++)
5905 if (XOR (islower (i), ISLOWER (i))
5906 || toupper (i) != TOUPPER (i))
5907 exit(2);
5908 exit (0);
5909}
5910_ACEOF
5911rm -f conftest$ac_exeext
5912if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5913 (eval $ac_link) 2>&5
5914 ac_status=$?
5915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5916 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5918 (eval $ac_try) 2>&5
5919 ac_status=$?
5920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5921 (exit $ac_status); }; }; then
5922 :
5923else
5924 echo "$as_me: program exited with status $ac_status" >&5
5925echo "$as_me: failed program was:" >&5
5926sed 's/^/| /' conftest.$ac_ext >&5
5927
5928( exit $ac_status )
5929ac_cv_header_stdc=no
5930fi
5931rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5932fi
5933fi
5934fi
5935echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5936echo "${ECHO_T}$ac_cv_header_stdc" >&6
5937if test $ac_cv_header_stdc = yes; then
5938
5939cat >>confdefs.h <<\_ACEOF
5940#define STDC_HEADERS 1
5941_ACEOF
5942
5943fi
5944
5945# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5956 inttypes.h stdint.h unistd.h
5957do
5958as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5959echo "$as_me:$LINENO: checking for $ac_header" >&5
5960echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5961if eval "test \"\${$as_ac_Header+set}\" = set"; then
5962 echo $ECHO_N "(cached) $ECHO_C" >&6
5963else
5964 cat >conftest.$ac_ext <<_ACEOF
5965/* confdefs.h. */
5966_ACEOF
5967cat confdefs.h >>conftest.$ac_ext
5968cat >>conftest.$ac_ext <<_ACEOF
5969/* end confdefs.h. */
5970$ac_includes_default
5971
5972#include <$ac_header>
5973_ACEOF
5974rm -f conftest.$ac_objext
5975if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5976 (eval $ac_compile) 2>conftest.er1
5977 ac_status=$?
5978 grep -v '^ *+' conftest.er1 >conftest.err
5979 rm -f conftest.er1
5980 cat conftest.err >&5
5981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5982 (exit $ac_status); } &&
5983 { ac_try='test -z "$ac_c_werror_flag"
5984 || test ! -s conftest.err'
5985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5986 (eval $ac_try) 2>&5
5987 ac_status=$?
5988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5989 (exit $ac_status); }; } &&
5990 { ac_try='test -s conftest.$ac_objext'
5991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5992 (eval $ac_try) 2>&5
5993 ac_status=$?
5994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5995 (exit $ac_status); }; }; then
5996 eval "$as_ac_Header=yes"
5997else
5998 echo "$as_me: failed program was:" >&5
5999sed 's/^/| /' conftest.$ac_ext >&5
6000
6001eval "$as_ac_Header=no"
6002fi
6003rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6004fi
6005echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6006echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6007if test `eval echo '${'$as_ac_Header'}'` = yes; then
6008 cat >>confdefs.h <<_ACEOF
6009#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6010_ACEOF
6011
6012fi
6013
6014done
6015
6016
6017
6018for ac_header in linux/if_tun.h 7467for ac_header in linux/if_tun.h
6019do 7468do
6020as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 7469as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6021if eval "test \"\${$as_ac_Header+set}\" = set"; then 7470if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6022 echo "$as_me:$LINENO: checking for $ac_header" >&5 7471 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6023echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 7472echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6024if eval "test \"\${$as_ac_Header+set}\" = set"; then 7473if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6025 echo $ECHO_N "(cached) $ECHO_C" >&6 7474 echo $ECHO_N "(cached) $ECHO_C" >&6
6026fi 7475fi
6027echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 7476ac_res=`eval echo '${'$as_ac_Header'}'`
6028echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 7477 { echo "$as_me:$LINENO: result: $ac_res" >&5
7478echo "${ECHO_T}$ac_res" >&6; }
6029else 7479else
6030 # Is the header compilable? 7480 # Is the header compilable?
6031echo "$as_me:$LINENO: checking $ac_header usability" >&5 7481{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6032echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 7482echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
6033cat >conftest.$ac_ext <<_ACEOF 7483cat >conftest.$ac_ext <<_ACEOF
6034/* confdefs.h. */ 7484/* confdefs.h. */
6035_ACEOF 7485_ACEOF
@@ -6040,41 +7490,37 @@ $ac_includes_default
6040#include <$ac_header> 7490#include <$ac_header>
6041_ACEOF 7491_ACEOF
6042rm -f conftest.$ac_objext 7492rm -f conftest.$ac_objext
6043if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 7493if { (ac_try="$ac_compile"
6044 (eval $ac_compile) 2>conftest.er1 7494case "(($ac_try" in
7495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7496 *) ac_try_echo=$ac_try;;
7497esac
7498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7499 (eval "$ac_compile") 2>conftest.er1
6045 ac_status=$? 7500 ac_status=$?
6046 grep -v '^ *+' conftest.er1 >conftest.err 7501 grep -v '^ *+' conftest.er1 >conftest.err
6047 rm -f conftest.er1 7502 rm -f conftest.er1
6048 cat conftest.err >&5 7503 cat conftest.err >&5
6049 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6050 (exit $ac_status); } && 7505 (exit $ac_status); } && {
6051 { ac_try='test -z "$ac_c_werror_flag" 7506 test -z "$ac_c_werror_flag" ||
6052 || test ! -s conftest.err' 7507 test ! -s conftest.err
6053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7508 } && test -s conftest.$ac_objext; then
6054 (eval $ac_try) 2>&5
6055 ac_status=$?
6056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6057 (exit $ac_status); }; } &&
6058 { ac_try='test -s conftest.$ac_objext'
6059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6060 (eval $ac_try) 2>&5
6061 ac_status=$?
6062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6063 (exit $ac_status); }; }; then
6064 ac_header_compiler=yes 7509 ac_header_compiler=yes
6065else 7510else
6066 echo "$as_me: failed program was:" >&5 7511 echo "$as_me: failed program was:" >&5
6067sed 's/^/| /' conftest.$ac_ext >&5 7512sed 's/^/| /' conftest.$ac_ext >&5
6068 7513
6069ac_header_compiler=no 7514 ac_header_compiler=no
6070fi 7515fi
6071rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 7516
6072echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 7517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6073echo "${ECHO_T}$ac_header_compiler" >&6 7518{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7519echo "${ECHO_T}$ac_header_compiler" >&6; }
6074 7520
6075# Is the header present? 7521# Is the header present?
6076echo "$as_me:$LINENO: checking $ac_header presence" >&5 7522{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6077echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 7523echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
6078cat >conftest.$ac_ext <<_ACEOF 7524cat >conftest.$ac_ext <<_ACEOF
6079/* confdefs.h. */ 7525/* confdefs.h. */
6080_ACEOF 7526_ACEOF
@@ -6083,24 +7529,22 @@ cat >>conftest.$ac_ext <<_ACEOF
6083/* end confdefs.h. */ 7529/* end confdefs.h. */
6084#include <$ac_header> 7530#include <$ac_header>
6085_ACEOF 7531_ACEOF
6086if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 7532if { (ac_try="$ac_cpp conftest.$ac_ext"
6087 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 7533case "(($ac_try" in
7534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7535 *) ac_try_echo=$ac_try;;
7536esac
7537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7538 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6088 ac_status=$? 7539 ac_status=$?
6089 grep -v '^ *+' conftest.er1 >conftest.err 7540 grep -v '^ *+' conftest.er1 >conftest.err
6090 rm -f conftest.er1 7541 rm -f conftest.er1
6091 cat conftest.err >&5 7542 cat conftest.err >&5
6092 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6093 (exit $ac_status); } >/dev/null; then 7544 (exit $ac_status); } >/dev/null && {
6094 if test -s conftest.err; then 7545 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6095 ac_cpp_err=$ac_c_preproc_warn_flag 7546 test ! -s conftest.err
6096 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 7547 }; then
6097 else
6098 ac_cpp_err=
6099 fi
6100else
6101 ac_cpp_err=yes
6102fi
6103if test -z "$ac_cpp_err"; then
6104 ac_header_preproc=yes 7548 ac_header_preproc=yes
6105else 7549else
6106 echo "$as_me: failed program was:" >&5 7550 echo "$as_me: failed program was:" >&5
@@ -6108,9 +7552,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
6108 7552
6109 ac_header_preproc=no 7553 ac_header_preproc=no
6110fi 7554fi
7555
6111rm -f conftest.err conftest.$ac_ext 7556rm -f conftest.err conftest.$ac_ext
6112echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 7557{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6113echo "${ECHO_T}$ac_header_preproc" >&6 7558echo "${ECHO_T}$ac_header_preproc" >&6; }
6114 7559
6115# So? What about this header? 7560# So? What about this header?
6116case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 7561case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -6134,25 +7579,24 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
6134echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 7579echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6135 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 7580 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6136echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 7581echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6137 ( 7582 ( cat <<\_ASBOX
6138 cat <<\_ASBOX
6139## ------------------------------------------- ## 7583## ------------------------------------------- ##
6140## Report this to openssh-unix-dev@mindrot.org ## 7584## Report this to openssh-unix-dev@mindrot.org ##
6141## ------------------------------------------- ## 7585## ------------------------------------------- ##
6142_ASBOX 7586_ASBOX
6143 ) | 7587 ) | sed "s/^/$as_me: WARNING: /" >&2
6144 sed "s/^/$as_me: WARNING: /" >&2
6145 ;; 7588 ;;
6146esac 7589esac
6147echo "$as_me:$LINENO: checking for $ac_header" >&5 7590{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6148echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 7591echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6149if eval "test \"\${$as_ac_Header+set}\" = set"; then 7592if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6150 echo $ECHO_N "(cached) $ECHO_C" >&6 7593 echo $ECHO_N "(cached) $ECHO_C" >&6
6151else 7594else
6152 eval "$as_ac_Header=\$ac_header_preproc" 7595 eval "$as_ac_Header=\$ac_header_preproc"
6153fi 7596fi
6154echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 7597ac_res=`eval echo '${'$as_ac_Header'}'`
6155echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 7598 { echo "$as_me:$LINENO: result: $ac_res" >&5
7599echo "${ECHO_T}$ac_res" >&6; }
6156 7600
6157fi 7601fi
6158if test `eval echo '${'$as_ac_Header'}'` = yes; then 7602if test `eval echo '${'$as_ac_Header'}'` = yes; then
@@ -6201,17 +7645,17 @@ cat >>confdefs.h <<\_ACEOF
6201_ACEOF 7645_ACEOF
6202 7646
6203 if test "${ac_cv_header_net_if_tap_h+set}" = set; then 7647 if test "${ac_cv_header_net_if_tap_h+set}" = set; then
6204 echo "$as_me:$LINENO: checking for net/if_tap.h" >&5 7648 { echo "$as_me:$LINENO: checking for net/if_tap.h" >&5
6205echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6 7649echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6; }
6206if test "${ac_cv_header_net_if_tap_h+set}" = set; then 7650if test "${ac_cv_header_net_if_tap_h+set}" = set; then
6207 echo $ECHO_N "(cached) $ECHO_C" >&6 7651 echo $ECHO_N "(cached) $ECHO_C" >&6
6208fi 7652fi
6209echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5 7653{ echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5
6210echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6 7654echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6; }
6211else 7655else
6212 # Is the header compilable? 7656 # Is the header compilable?
6213echo "$as_me:$LINENO: checking net/if_tap.h usability" >&5 7657{ echo "$as_me:$LINENO: checking net/if_tap.h usability" >&5
6214echo $ECHO_N "checking net/if_tap.h usability... $ECHO_C" >&6 7658echo $ECHO_N "checking net/if_tap.h usability... $ECHO_C" >&6; }
6215cat >conftest.$ac_ext <<_ACEOF 7659cat >conftest.$ac_ext <<_ACEOF
6216/* confdefs.h. */ 7660/* confdefs.h. */
6217_ACEOF 7661_ACEOF
@@ -6222,41 +7666,37 @@ $ac_includes_default
6222#include <net/if_tap.h> 7666#include <net/if_tap.h>
6223_ACEOF 7667_ACEOF
6224rm -f conftest.$ac_objext 7668rm -f conftest.$ac_objext
6225if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 7669if { (ac_try="$ac_compile"
6226 (eval $ac_compile) 2>conftest.er1 7670case "(($ac_try" in
7671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7672 *) ac_try_echo=$ac_try;;
7673esac
7674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7675 (eval "$ac_compile") 2>conftest.er1
6227 ac_status=$? 7676 ac_status=$?
6228 grep -v '^ *+' conftest.er1 >conftest.err 7677 grep -v '^ *+' conftest.er1 >conftest.err
6229 rm -f conftest.er1 7678 rm -f conftest.er1
6230 cat conftest.err >&5 7679 cat conftest.err >&5
6231 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6232 (exit $ac_status); } && 7681 (exit $ac_status); } && {
6233 { ac_try='test -z "$ac_c_werror_flag" 7682 test -z "$ac_c_werror_flag" ||
6234 || test ! -s conftest.err' 7683 test ! -s conftest.err
6235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7684 } && test -s conftest.$ac_objext; then
6236 (eval $ac_try) 2>&5
6237 ac_status=$?
6238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6239 (exit $ac_status); }; } &&
6240 { ac_try='test -s conftest.$ac_objext'
6241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6242 (eval $ac_try) 2>&5
6243 ac_status=$?
6244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6245 (exit $ac_status); }; }; then
6246 ac_header_compiler=yes 7685 ac_header_compiler=yes
6247else 7686else
6248 echo "$as_me: failed program was:" >&5 7687 echo "$as_me: failed program was:" >&5
6249sed 's/^/| /' conftest.$ac_ext >&5 7688sed 's/^/| /' conftest.$ac_ext >&5
6250 7689
6251ac_header_compiler=no 7690 ac_header_compiler=no
6252fi 7691fi
6253rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 7692
6254echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 7693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6255echo "${ECHO_T}$ac_header_compiler" >&6 7694{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7695echo "${ECHO_T}$ac_header_compiler" >&6; }
6256 7696
6257# Is the header present? 7697# Is the header present?
6258echo "$as_me:$LINENO: checking net/if_tap.h presence" >&5 7698{ echo "$as_me:$LINENO: checking net/if_tap.h presence" >&5
6259echo $ECHO_N "checking net/if_tap.h presence... $ECHO_C" >&6 7699echo $ECHO_N "checking net/if_tap.h presence... $ECHO_C" >&6; }
6260cat >conftest.$ac_ext <<_ACEOF 7700cat >conftest.$ac_ext <<_ACEOF
6261/* confdefs.h. */ 7701/* confdefs.h. */
6262_ACEOF 7702_ACEOF
@@ -6265,24 +7705,22 @@ cat >>conftest.$ac_ext <<_ACEOF
6265/* end confdefs.h. */ 7705/* end confdefs.h. */
6266#include <net/if_tap.h> 7706#include <net/if_tap.h>
6267_ACEOF 7707_ACEOF
6268if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 7708if { (ac_try="$ac_cpp conftest.$ac_ext"
6269 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 7709case "(($ac_try" in
7710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7711 *) ac_try_echo=$ac_try;;
7712esac
7713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7714 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6270 ac_status=$? 7715 ac_status=$?
6271 grep -v '^ *+' conftest.er1 >conftest.err 7716 grep -v '^ *+' conftest.er1 >conftest.err
6272 rm -f conftest.er1 7717 rm -f conftest.er1
6273 cat conftest.err >&5 7718 cat conftest.err >&5
6274 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6275 (exit $ac_status); } >/dev/null; then 7720 (exit $ac_status); } >/dev/null && {
6276 if test -s conftest.err; then 7721 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6277 ac_cpp_err=$ac_c_preproc_warn_flag 7722 test ! -s conftest.err
6278 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 7723 }; then
6279 else
6280 ac_cpp_err=
6281 fi
6282else
6283 ac_cpp_err=yes
6284fi
6285if test -z "$ac_cpp_err"; then
6286 ac_header_preproc=yes 7724 ac_header_preproc=yes
6287else 7725else
6288 echo "$as_me: failed program was:" >&5 7726 echo "$as_me: failed program was:" >&5
@@ -6290,9 +7728,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
6290 7728
6291 ac_header_preproc=no 7729 ac_header_preproc=no
6292fi 7730fi
7731
6293rm -f conftest.err conftest.$ac_ext 7732rm -f conftest.err conftest.$ac_ext
6294echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 7733{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6295echo "${ECHO_T}$ac_header_preproc" >&6 7734echo "${ECHO_T}$ac_header_preproc" >&6; }
6296 7735
6297# So? What about this header? 7736# So? What about this header?
6298case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 7737case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -6316,25 +7755,23 @@ echo "$as_me: WARNING: net/if_tap.h: section \"Present But Cannot Be Compile
6316echo "$as_me: WARNING: net/if_tap.h: proceeding with the preprocessor's result" >&2;} 7755echo "$as_me: WARNING: net/if_tap.h: proceeding with the preprocessor's result" >&2;}
6317 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&5 7756 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&5
6318echo "$as_me: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&2;} 7757echo "$as_me: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&2;}
6319 ( 7758 ( cat <<\_ASBOX
6320 cat <<\_ASBOX
6321## ------------------------------------------- ## 7759## ------------------------------------------- ##
6322## Report this to openssh-unix-dev@mindrot.org ## 7760## Report this to openssh-unix-dev@mindrot.org ##
6323## ------------------------------------------- ## 7761## ------------------------------------------- ##
6324_ASBOX 7762_ASBOX
6325 ) | 7763 ) | sed "s/^/$as_me: WARNING: /" >&2
6326 sed "s/^/$as_me: WARNING: /" >&2
6327 ;; 7764 ;;
6328esac 7765esac
6329echo "$as_me:$LINENO: checking for net/if_tap.h" >&5 7766{ echo "$as_me:$LINENO: checking for net/if_tap.h" >&5
6330echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6 7767echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6; }
6331if test "${ac_cv_header_net_if_tap_h+set}" = set; then 7768if test "${ac_cv_header_net_if_tap_h+set}" = set; then
6332 echo $ECHO_N "(cached) $ECHO_C" >&6 7769 echo $ECHO_N "(cached) $ECHO_C" >&6
6333else 7770else
6334 ac_cv_header_net_if_tap_h=$ac_header_preproc 7771 ac_cv_header_net_if_tap_h=$ac_header_preproc
6335fi 7772fi
6336echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5 7773{ echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5
6337echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6 7774echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6; }
6338 7775
6339fi 7776fi
6340if test $ac_cv_header_net_if_tap_h = yes; then 7777if test $ac_cv_header_net_if_tap_h = yes; then
@@ -6367,17 +7804,17 @@ cat >>confdefs.h <<\_ACEOF
6367_ACEOF 7804_ACEOF
6368 7805
6369 if test "${ac_cv_header_net_if_tap_h+set}" = set; then 7806 if test "${ac_cv_header_net_if_tap_h+set}" = set; then
6370 echo "$as_me:$LINENO: checking for net/if_tap.h" >&5 7807 { echo "$as_me:$LINENO: checking for net/if_tap.h" >&5
6371echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6 7808echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6; }
6372if test "${ac_cv_header_net_if_tap_h+set}" = set; then 7809if test "${ac_cv_header_net_if_tap_h+set}" = set; then
6373 echo $ECHO_N "(cached) $ECHO_C" >&6 7810 echo $ECHO_N "(cached) $ECHO_C" >&6
6374fi 7811fi
6375echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5 7812{ echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5
6376echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6 7813echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6; }
6377else 7814else
6378 # Is the header compilable? 7815 # Is the header compilable?
6379echo "$as_me:$LINENO: checking net/if_tap.h usability" >&5 7816{ echo "$as_me:$LINENO: checking net/if_tap.h usability" >&5
6380echo $ECHO_N "checking net/if_tap.h usability... $ECHO_C" >&6 7817echo $ECHO_N "checking net/if_tap.h usability... $ECHO_C" >&6; }
6381cat >conftest.$ac_ext <<_ACEOF 7818cat >conftest.$ac_ext <<_ACEOF
6382/* confdefs.h. */ 7819/* confdefs.h. */
6383_ACEOF 7820_ACEOF
@@ -6388,41 +7825,37 @@ $ac_includes_default
6388#include <net/if_tap.h> 7825#include <net/if_tap.h>
6389_ACEOF 7826_ACEOF
6390rm -f conftest.$ac_objext 7827rm -f conftest.$ac_objext
6391if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 7828if { (ac_try="$ac_compile"
6392 (eval $ac_compile) 2>conftest.er1 7829case "(($ac_try" in
7830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7831 *) ac_try_echo=$ac_try;;
7832esac
7833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7834 (eval "$ac_compile") 2>conftest.er1
6393 ac_status=$? 7835 ac_status=$?
6394 grep -v '^ *+' conftest.er1 >conftest.err 7836 grep -v '^ *+' conftest.er1 >conftest.err
6395 rm -f conftest.er1 7837 rm -f conftest.er1
6396 cat conftest.err >&5 7838 cat conftest.err >&5
6397 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6398 (exit $ac_status); } && 7840 (exit $ac_status); } && {
6399 { ac_try='test -z "$ac_c_werror_flag" 7841 test -z "$ac_c_werror_flag" ||
6400 || test ! -s conftest.err' 7842 test ! -s conftest.err
6401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 7843 } && test -s conftest.$ac_objext; then
6402 (eval $ac_try) 2>&5
6403 ac_status=$?
6404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6405 (exit $ac_status); }; } &&
6406 { ac_try='test -s conftest.$ac_objext'
6407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6408 (eval $ac_try) 2>&5
6409 ac_status=$?
6410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6411 (exit $ac_status); }; }; then
6412 ac_header_compiler=yes 7844 ac_header_compiler=yes
6413else 7845else
6414 echo "$as_me: failed program was:" >&5 7846 echo "$as_me: failed program was:" >&5
6415sed 's/^/| /' conftest.$ac_ext >&5 7847sed 's/^/| /' conftest.$ac_ext >&5
6416 7848
6417ac_header_compiler=no 7849 ac_header_compiler=no
6418fi 7850fi
6419rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 7851
6420echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 7852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6421echo "${ECHO_T}$ac_header_compiler" >&6 7853{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7854echo "${ECHO_T}$ac_header_compiler" >&6; }
6422 7855
6423# Is the header present? 7856# Is the header present?
6424echo "$as_me:$LINENO: checking net/if_tap.h presence" >&5 7857{ echo "$as_me:$LINENO: checking net/if_tap.h presence" >&5
6425echo $ECHO_N "checking net/if_tap.h presence... $ECHO_C" >&6 7858echo $ECHO_N "checking net/if_tap.h presence... $ECHO_C" >&6; }
6426cat >conftest.$ac_ext <<_ACEOF 7859cat >conftest.$ac_ext <<_ACEOF
6427/* confdefs.h. */ 7860/* confdefs.h. */
6428_ACEOF 7861_ACEOF
@@ -6431,24 +7864,22 @@ cat >>conftest.$ac_ext <<_ACEOF
6431/* end confdefs.h. */ 7864/* end confdefs.h. */
6432#include <net/if_tap.h> 7865#include <net/if_tap.h>
6433_ACEOF 7866_ACEOF
6434if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 7867if { (ac_try="$ac_cpp conftest.$ac_ext"
6435 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 7868case "(($ac_try" in
7869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7870 *) ac_try_echo=$ac_try;;
7871esac
7872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7873 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6436 ac_status=$? 7874 ac_status=$?
6437 grep -v '^ *+' conftest.er1 >conftest.err 7875 grep -v '^ *+' conftest.er1 >conftest.err
6438 rm -f conftest.er1 7876 rm -f conftest.er1
6439 cat conftest.err >&5 7877 cat conftest.err >&5
6440 echo "$as_me:$LINENO: \$? = $ac_status" >&5 7878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6441 (exit $ac_status); } >/dev/null; then 7879 (exit $ac_status); } >/dev/null && {
6442 if test -s conftest.err; then 7880 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6443 ac_cpp_err=$ac_c_preproc_warn_flag 7881 test ! -s conftest.err
6444 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 7882 }; then
6445 else
6446 ac_cpp_err=
6447 fi
6448else
6449 ac_cpp_err=yes
6450fi
6451if test -z "$ac_cpp_err"; then
6452 ac_header_preproc=yes 7883 ac_header_preproc=yes
6453else 7884else
6454 echo "$as_me: failed program was:" >&5 7885 echo "$as_me: failed program was:" >&5
@@ -6456,9 +7887,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
6456 7887
6457 ac_header_preproc=no 7888 ac_header_preproc=no
6458fi 7889fi
7890
6459rm -f conftest.err conftest.$ac_ext 7891rm -f conftest.err conftest.$ac_ext
6460echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 7892{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6461echo "${ECHO_T}$ac_header_preproc" >&6 7893echo "${ECHO_T}$ac_header_preproc" >&6; }
6462 7894
6463# So? What about this header? 7895# So? What about this header?
6464case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 7896case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -6482,25 +7914,23 @@ echo "$as_me: WARNING: net/if_tap.h: section \"Present But Cannot Be Compile
6482echo "$as_me: WARNING: net/if_tap.h: proceeding with the preprocessor's result" >&2;} 7914echo "$as_me: WARNING: net/if_tap.h: proceeding with the preprocessor's result" >&2;}
6483 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&5 7915 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&5
6484echo "$as_me: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&2;} 7916echo "$as_me: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&2;}
6485 ( 7917 ( cat <<\_ASBOX
6486 cat <<\_ASBOX
6487## ------------------------------------------- ## 7918## ------------------------------------------- ##
6488## Report this to openssh-unix-dev@mindrot.org ## 7919## Report this to openssh-unix-dev@mindrot.org ##
6489## ------------------------------------------- ## 7920## ------------------------------------------- ##
6490_ASBOX 7921_ASBOX
6491 ) | 7922 ) | sed "s/^/$as_me: WARNING: /" >&2
6492 sed "s/^/$as_me: WARNING: /" >&2
6493 ;; 7923 ;;
6494esac 7924esac
6495echo "$as_me:$LINENO: checking for net/if_tap.h" >&5 7925{ echo "$as_me:$LINENO: checking for net/if_tap.h" >&5
6496echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6 7926echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6; }
6497if test "${ac_cv_header_net_if_tap_h+set}" = set; then 7927if test "${ac_cv_header_net_if_tap_h+set}" = set; then
6498 echo $ECHO_N "(cached) $ECHO_C" >&6 7928 echo $ECHO_N "(cached) $ECHO_C" >&6
6499else 7929else
6500 ac_cv_header_net_if_tap_h=$ac_header_preproc 7930 ac_cv_header_net_if_tap_h=$ac_header_preproc
6501fi 7931fi
6502echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5 7932{ echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5
6503echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6 7933echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6; }
6504 7934
6505fi 7935fi
6506if test $ac_cv_header_net_if_tap_h = yes; then 7936if test $ac_cv_header_net_if_tap_h = yes; then
@@ -6569,6 +7999,11 @@ cat >>confdefs.h <<\_ACEOF
6569#define SSH_TUN_OPENBSD 1 7999#define SSH_TUN_OPENBSD 1
6570_ACEOF 8000_ACEOF
6571 8001
8002
8003cat >>confdefs.h <<\_ACEOF
8004#define SYSLOG_R_SAFE_IN_SIGHAND 1
8005_ACEOF
8006
6572 ;; 8007 ;;
6573*-*-solaris*) 8008*-*-solaris*)
6574 if test "x$withval" != "xno" ; then 8009 if test "x$withval" != "xno" ; then
@@ -6606,15 +8041,20 @@ cat >>confdefs.h <<\_ACEOF
6606#define SSHD_ACQUIRES_CTTY 1 8041#define SSHD_ACQUIRES_CTTY 1
6607_ACEOF 8042_ACEOF
6608 8043
8044
8045cat >>confdefs.h <<\_ACEOF
8046#define PASSWD_NEEDS_USERNAME 1
8047_ACEOF
8048
6609 external_path_file=/etc/default/login 8049 external_path_file=/etc/default/login
6610 # hardwire lastlog location (can't detect it on some versions) 8050 # hardwire lastlog location (can't detect it on some versions)
6611 conf_lastlog_location="/var/adm/lastlog" 8051 conf_lastlog_location="/var/adm/lastlog"
6612 echo "$as_me:$LINENO: checking for obsolete utmp and wtmp in solaris2.x" >&5 8052 { echo "$as_me:$LINENO: checking for obsolete utmp and wtmp in solaris2.x" >&5
6613echo $ECHO_N "checking for obsolete utmp and wtmp in solaris2.x... $ECHO_C" >&6 8053echo $ECHO_N "checking for obsolete utmp and wtmp in solaris2.x... $ECHO_C" >&6; }
6614 sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'` 8054 sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'`
6615 if test "$sol2ver" -ge 8; then 8055 if test "$sol2ver" -ge 8; then
6616 echo "$as_me:$LINENO: result: yes" >&5 8056 { echo "$as_me:$LINENO: result: yes" >&5
6617echo "${ECHO_T}yes" >&6 8057echo "${ECHO_T}yes" >&6; }
6618 cat >>confdefs.h <<\_ACEOF 8058 cat >>confdefs.h <<\_ACEOF
6619#define DISABLE_UTMP 1 8059#define DISABLE_UTMP 1
6620_ACEOF 8060_ACEOF
@@ -6625,9 +8065,88 @@ cat >>confdefs.h <<\_ACEOF
6625_ACEOF 8065_ACEOF
6626 8066
6627 else 8067 else
6628 echo "$as_me:$LINENO: result: no" >&5 8068 { echo "$as_me:$LINENO: result: no" >&5
6629echo "${ECHO_T}no" >&6 8069echo "${ECHO_T}no" >&6; }
6630 fi 8070 fi
8071
8072# Check whether --with-solaris-contracts was given.
8073if test "${with_solaris_contracts+set}" = set; then
8074 withval=$with_solaris_contracts;
8075 { echo "$as_me:$LINENO: checking for ct_tmpl_activate in -lcontract" >&5
8076echo $ECHO_N "checking for ct_tmpl_activate in -lcontract... $ECHO_C" >&6; }
8077if test "${ac_cv_lib_contract_ct_tmpl_activate+set}" = set; then
8078 echo $ECHO_N "(cached) $ECHO_C" >&6
8079else
8080 ac_check_lib_save_LIBS=$LIBS
8081LIBS="-lcontract $LIBS"
8082cat >conftest.$ac_ext <<_ACEOF
8083/* confdefs.h. */
8084_ACEOF
8085cat confdefs.h >>conftest.$ac_ext
8086cat >>conftest.$ac_ext <<_ACEOF
8087/* end confdefs.h. */
8088
8089/* Override any GCC internal prototype to avoid an error.
8090 Use char because int might match the return type of a GCC
8091 builtin and then its argument prototype would still apply. */
8092#ifdef __cplusplus
8093extern "C"
8094#endif
8095char ct_tmpl_activate ();
8096int
8097main ()
8098{
8099return ct_tmpl_activate ();
8100 ;
8101 return 0;
8102}
8103_ACEOF
8104rm -f conftest.$ac_objext conftest$ac_exeext
8105if { (ac_try="$ac_link"
8106case "(($ac_try" in
8107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8108 *) ac_try_echo=$ac_try;;
8109esac
8110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8111 (eval "$ac_link") 2>conftest.er1
8112 ac_status=$?
8113 grep -v '^ *+' conftest.er1 >conftest.err
8114 rm -f conftest.er1
8115 cat conftest.err >&5
8116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8117 (exit $ac_status); } && {
8118 test -z "$ac_c_werror_flag" ||
8119 test ! -s conftest.err
8120 } && test -s conftest$ac_exeext &&
8121 $as_test_x conftest$ac_exeext; then
8122 ac_cv_lib_contract_ct_tmpl_activate=yes
8123else
8124 echo "$as_me: failed program was:" >&5
8125sed 's/^/| /' conftest.$ac_ext >&5
8126
8127 ac_cv_lib_contract_ct_tmpl_activate=no
8128fi
8129
8130rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8131 conftest$ac_exeext conftest.$ac_ext
8132LIBS=$ac_check_lib_save_LIBS
8133fi
8134{ echo "$as_me:$LINENO: result: $ac_cv_lib_contract_ct_tmpl_activate" >&5
8135echo "${ECHO_T}$ac_cv_lib_contract_ct_tmpl_activate" >&6; }
8136if test $ac_cv_lib_contract_ct_tmpl_activate = yes; then
8137
8138cat >>confdefs.h <<\_ACEOF
8139#define USE_SOLARIS_PROCESS_CONTRACTS 1
8140_ACEOF
8141
8142 SSHDLIBS="$SSHDLIBS -lcontract"
8143
8144 SPC_MSG="yes"
8145fi
8146
8147
8148fi
8149
6631 ;; 8150 ;;
6632*-*-sunos4*) 8151*-*-sunos4*)
6633 CPPFLAGS="$CPPFLAGS -DSUNOS4" 8152 CPPFLAGS="$CPPFLAGS -DSUNOS4"
@@ -6635,9 +8154,9 @@ echo "${ECHO_T}no" >&6
6635for ac_func in getpwanam 8154for ac_func in getpwanam
6636do 8155do
6637as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 8156as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6638echo "$as_me:$LINENO: checking for $ac_func" >&5 8157{ echo "$as_me:$LINENO: checking for $ac_func" >&5
6639echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 8158echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
6640if eval "test \"\${$as_ac_var+set}\" = set"; then 8159if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
6641 echo $ECHO_N "(cached) $ECHO_C" >&6 8160 echo $ECHO_N "(cached) $ECHO_C" >&6
6642else 8161else
6643 cat >conftest.$ac_ext <<_ACEOF 8162 cat >conftest.$ac_ext <<_ACEOF
@@ -6663,68 +8182,60 @@ cat >>conftest.$ac_ext <<_ACEOF
6663 8182
6664#undef $ac_func 8183#undef $ac_func
6665 8184
6666/* Override any gcc2 internal prototype to avoid an error. */ 8185/* Override any GCC internal prototype to avoid an error.
8186 Use char because int might match the return type of a GCC
8187 builtin and then its argument prototype would still apply. */
6667#ifdef __cplusplus 8188#ifdef __cplusplus
6668extern "C" 8189extern "C"
6669{
6670#endif 8190#endif
6671/* We use char because int might match the return type of a gcc2
6672 builtin and then its argument prototype would still apply. */
6673char $ac_func (); 8191char $ac_func ();
6674/* The GNU C library defines this for functions which it implements 8192/* The GNU C library defines this for functions which it implements
6675 to always fail with ENOSYS. Some functions are actually named 8193 to always fail with ENOSYS. Some functions are actually named
6676 something starting with __ and the normal name is an alias. */ 8194 something starting with __ and the normal name is an alias. */
6677#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 8195#if defined __stub_$ac_func || defined __stub___$ac_func
6678choke me 8196choke me
6679#else
6680char (*f) () = $ac_func;
6681#endif
6682#ifdef __cplusplus
6683}
6684#endif 8197#endif
6685 8198
6686int 8199int
6687main () 8200main ()
6688{ 8201{
6689return f != $ac_func; 8202return $ac_func ();
6690 ; 8203 ;
6691 return 0; 8204 return 0;
6692} 8205}
6693_ACEOF 8206_ACEOF
6694rm -f conftest.$ac_objext conftest$ac_exeext 8207rm -f conftest.$ac_objext conftest$ac_exeext
6695if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 8208if { (ac_try="$ac_link"
6696 (eval $ac_link) 2>conftest.er1 8209case "(($ac_try" in
8210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8211 *) ac_try_echo=$ac_try;;
8212esac
8213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8214 (eval "$ac_link") 2>conftest.er1
6697 ac_status=$? 8215 ac_status=$?
6698 grep -v '^ *+' conftest.er1 >conftest.err 8216 grep -v '^ *+' conftest.er1 >conftest.err
6699 rm -f conftest.er1 8217 rm -f conftest.er1
6700 cat conftest.err >&5 8218 cat conftest.err >&5
6701 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6702 (exit $ac_status); } && 8220 (exit $ac_status); } && {
6703 { ac_try='test -z "$ac_c_werror_flag" 8221 test -z "$ac_c_werror_flag" ||
6704 || test ! -s conftest.err' 8222 test ! -s conftest.err
6705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 8223 } && test -s conftest$ac_exeext &&
6706 (eval $ac_try) 2>&5 8224 $as_test_x conftest$ac_exeext; then
6707 ac_status=$?
6708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6709 (exit $ac_status); }; } &&
6710 { ac_try='test -s conftest$ac_exeext'
6711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6712 (eval $ac_try) 2>&5
6713 ac_status=$?
6714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6715 (exit $ac_status); }; }; then
6716 eval "$as_ac_var=yes" 8225 eval "$as_ac_var=yes"
6717else 8226else
6718 echo "$as_me: failed program was:" >&5 8227 echo "$as_me: failed program was:" >&5
6719sed 's/^/| /' conftest.$ac_ext >&5 8228sed 's/^/| /' conftest.$ac_ext >&5
6720 8229
6721eval "$as_ac_var=no" 8230 eval "$as_ac_var=no"
6722fi 8231fi
6723rm -f conftest.err conftest.$ac_objext \ 8232
8233rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6724 conftest$ac_exeext conftest.$ac_ext 8234 conftest$ac_exeext conftest.$ac_ext
6725fi 8235fi
6726echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 8236ac_res=`eval echo '${'$as_ac_var'}'`
6727echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 8237 { echo "$as_me:$LINENO: result: $ac_res" >&5
8238echo "${ECHO_T}$ac_res" >&6; }
6728if test `eval echo '${'$as_ac_var'}'` = yes; then 8239if test `eval echo '${'$as_ac_var'}'` = yes; then
6729 cat >>confdefs.h <<_ACEOF 8240 cat >>confdefs.h <<_ACEOF
6730#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 8241#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -6771,8 +8282,8 @@ _ACEOF
6771*-sni-sysv*) 8282*-sni-sysv*)
6772 # /usr/ucblib MUST NOT be searched on ReliantUNIX 8283 # /usr/ucblib MUST NOT be searched on ReliantUNIX
6773 8284
6774echo "$as_me:$LINENO: checking for dlsym in -ldl" >&5 8285{ echo "$as_me:$LINENO: checking for dlsym in -ldl" >&5
6775echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6 8286echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6; }
6776if test "${ac_cv_lib_dl_dlsym+set}" = set; then 8287if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6777 echo $ECHO_N "(cached) $ECHO_C" >&6 8288 echo $ECHO_N "(cached) $ECHO_C" >&6
6778else 8289else
@@ -6785,56 +8296,53 @@ cat confdefs.h >>conftest.$ac_ext
6785cat >>conftest.$ac_ext <<_ACEOF 8296cat >>conftest.$ac_ext <<_ACEOF
6786/* end confdefs.h. */ 8297/* end confdefs.h. */
6787 8298
6788/* Override any gcc2 internal prototype to avoid an error. */ 8299/* Override any GCC internal prototype to avoid an error.
8300 Use char because int might match the return type of a GCC
8301 builtin and then its argument prototype would still apply. */
6789#ifdef __cplusplus 8302#ifdef __cplusplus
6790extern "C" 8303extern "C"
6791#endif 8304#endif
6792/* We use char because int might match the return type of a gcc2
6793 builtin and then its argument prototype would still apply. */
6794char dlsym (); 8305char dlsym ();
6795int 8306int
6796main () 8307main ()
6797{ 8308{
6798dlsym (); 8309return dlsym ();
6799 ; 8310 ;
6800 return 0; 8311 return 0;
6801} 8312}
6802_ACEOF 8313_ACEOF
6803rm -f conftest.$ac_objext conftest$ac_exeext 8314rm -f conftest.$ac_objext conftest$ac_exeext
6804if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 8315if { (ac_try="$ac_link"
6805 (eval $ac_link) 2>conftest.er1 8316case "(($ac_try" in
8317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8318 *) ac_try_echo=$ac_try;;
8319esac
8320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8321 (eval "$ac_link") 2>conftest.er1
6806 ac_status=$? 8322 ac_status=$?
6807 grep -v '^ *+' conftest.er1 >conftest.err 8323 grep -v '^ *+' conftest.er1 >conftest.err
6808 rm -f conftest.er1 8324 rm -f conftest.er1
6809 cat conftest.err >&5 8325 cat conftest.err >&5
6810 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6811 (exit $ac_status); } && 8327 (exit $ac_status); } && {
6812 { ac_try='test -z "$ac_c_werror_flag" 8328 test -z "$ac_c_werror_flag" ||
6813 || test ! -s conftest.err' 8329 test ! -s conftest.err
6814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 8330 } && test -s conftest$ac_exeext &&
6815 (eval $ac_try) 2>&5 8331 $as_test_x conftest$ac_exeext; then
6816 ac_status=$?
6817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6818 (exit $ac_status); }; } &&
6819 { ac_try='test -s conftest$ac_exeext'
6820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6821 (eval $ac_try) 2>&5
6822 ac_status=$?
6823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6824 (exit $ac_status); }; }; then
6825 ac_cv_lib_dl_dlsym=yes 8332 ac_cv_lib_dl_dlsym=yes
6826else 8333else
6827 echo "$as_me: failed program was:" >&5 8334 echo "$as_me: failed program was:" >&5
6828sed 's/^/| /' conftest.$ac_ext >&5 8335sed 's/^/| /' conftest.$ac_ext >&5
6829 8336
6830ac_cv_lib_dl_dlsym=no 8337 ac_cv_lib_dl_dlsym=no
6831fi 8338fi
6832rm -f conftest.err conftest.$ac_objext \ 8339
8340rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6833 conftest$ac_exeext conftest.$ac_ext 8341 conftest$ac_exeext conftest.$ac_ext
6834LIBS=$ac_check_lib_save_LIBS 8342LIBS=$ac_check_lib_save_LIBS
6835fi 8343fi
6836echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlsym" >&5 8344{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlsym" >&5
6837echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6 8345echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6; }
6838if test $ac_cv_lib_dl_dlsym = yes; then 8346if test $ac_cv_lib_dl_dlsym = yes; then
6839 cat >>confdefs.h <<_ACEOF 8347 cat >>confdefs.h <<_ACEOF
6840#define HAVE_LIBDL 1 8348#define HAVE_LIBDL 1
@@ -6845,8 +8353,8 @@ _ACEOF
6845fi 8353fi
6846 8354
6847 # -lresolv needs to be at the end of LIBS or DNS lookups break 8355 # -lresolv needs to be at the end of LIBS or DNS lookups break
6848 echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5 8356 { echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5
6849echo $ECHO_N "checking for res_query in -lresolv... $ECHO_C" >&6 8357echo $ECHO_N "checking for res_query in -lresolv... $ECHO_C" >&6; }
6850if test "${ac_cv_lib_resolv_res_query+set}" = set; then 8358if test "${ac_cv_lib_resolv_res_query+set}" = set; then
6851 echo $ECHO_N "(cached) $ECHO_C" >&6 8359 echo $ECHO_N "(cached) $ECHO_C" >&6
6852else 8360else
@@ -6859,56 +8367,53 @@ cat confdefs.h >>conftest.$ac_ext
6859cat >>conftest.$ac_ext <<_ACEOF 8367cat >>conftest.$ac_ext <<_ACEOF
6860/* end confdefs.h. */ 8368/* end confdefs.h. */
6861 8369
6862/* Override any gcc2 internal prototype to avoid an error. */ 8370/* Override any GCC internal prototype to avoid an error.
8371 Use char because int might match the return type of a GCC
8372 builtin and then its argument prototype would still apply. */
6863#ifdef __cplusplus 8373#ifdef __cplusplus
6864extern "C" 8374extern "C"
6865#endif 8375#endif
6866/* We use char because int might match the return type of a gcc2
6867 builtin and then its argument prototype would still apply. */
6868char res_query (); 8376char res_query ();
6869int 8377int
6870main () 8378main ()
6871{ 8379{
6872res_query (); 8380return res_query ();
6873 ; 8381 ;
6874 return 0; 8382 return 0;
6875} 8383}
6876_ACEOF 8384_ACEOF
6877rm -f conftest.$ac_objext conftest$ac_exeext 8385rm -f conftest.$ac_objext conftest$ac_exeext
6878if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 8386if { (ac_try="$ac_link"
6879 (eval $ac_link) 2>conftest.er1 8387case "(($ac_try" in
8388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8389 *) ac_try_echo=$ac_try;;
8390esac
8391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8392 (eval "$ac_link") 2>conftest.er1
6880 ac_status=$? 8393 ac_status=$?
6881 grep -v '^ *+' conftest.er1 >conftest.err 8394 grep -v '^ *+' conftest.er1 >conftest.err
6882 rm -f conftest.er1 8395 rm -f conftest.er1
6883 cat conftest.err >&5 8396 cat conftest.err >&5
6884 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6885 (exit $ac_status); } && 8398 (exit $ac_status); } && {
6886 { ac_try='test -z "$ac_c_werror_flag" 8399 test -z "$ac_c_werror_flag" ||
6887 || test ! -s conftest.err' 8400 test ! -s conftest.err
6888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 8401 } && test -s conftest$ac_exeext &&
6889 (eval $ac_try) 2>&5 8402 $as_test_x conftest$ac_exeext; then
6890 ac_status=$?
6891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6892 (exit $ac_status); }; } &&
6893 { ac_try='test -s conftest$ac_exeext'
6894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6895 (eval $ac_try) 2>&5
6896 ac_status=$?
6897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6898 (exit $ac_status); }; }; then
6899 ac_cv_lib_resolv_res_query=yes 8403 ac_cv_lib_resolv_res_query=yes
6900else 8404else
6901 echo "$as_me: failed program was:" >&5 8405 echo "$as_me: failed program was:" >&5
6902sed 's/^/| /' conftest.$ac_ext >&5 8406sed 's/^/| /' conftest.$ac_ext >&5
6903 8407
6904ac_cv_lib_resolv_res_query=no 8408 ac_cv_lib_resolv_res_query=no
6905fi 8409fi
6906rm -f conftest.err conftest.$ac_objext \ 8410
8411rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6907 conftest$ac_exeext conftest.$ac_ext 8412 conftest$ac_exeext conftest.$ac_ext
6908LIBS=$ac_check_lib_save_LIBS 8413LIBS=$ac_check_lib_save_LIBS
6909fi 8414fi
6910echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_query" >&5 8415{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_query" >&5
6911echo "${ECHO_T}$ac_cv_lib_resolv_res_query" >&6 8416echo "${ECHO_T}$ac_cv_lib_resolv_res_query" >&6; }
6912if test $ac_cv_lib_resolv_res_query = yes; then 8417if test $ac_cv_lib_resolv_res_query = yes; then
6913 LIBS="$LIBS -lresolv" 8418 LIBS="$LIBS -lresolv"
6914fi 8419fi
@@ -6945,7 +8450,6 @@ _ACEOF
6945 ;; 8450 ;;
6946# UnixWare 1.x, UnixWare 2.x, and others based on code from Univel. 8451# UnixWare 1.x, UnixWare 2.x, and others based on code from Univel.
6947*-*-sysv4.2*) 8452*-*-sysv4.2*)
6948 CFLAGS="$CFLAGS -Dva_list=_VA_LIST"
6949 cat >>confdefs.h <<\_ACEOF 8453 cat >>confdefs.h <<\_ACEOF
6950#define USE_PIPES 1 8454#define USE_PIPES 1
6951_ACEOF 8455_ACEOF
@@ -7008,6 +8512,10 @@ cat >>confdefs.h <<\_ACEOF
7008#define BROKEN_LIBIAF 1 8512#define BROKEN_LIBIAF 1
7009_ACEOF 8513_ACEOF
7010 8514
8515 cat >>confdefs.h <<\_ACEOF
8516#define BROKEN_UPDWTMPX 1
8517_ACEOF
8518
7011 ;; 8519 ;;
7012 *) cat >>confdefs.h <<\_ACEOF 8520 *) cat >>confdefs.h <<\_ACEOF
7013#define LOCKED_PASSWD_STRING "*LK*" 8521#define LOCKED_PASSWD_STRING "*LK*"
@@ -7076,9 +8584,9 @@ _ACEOF
7076for ac_func in getluid setluid 8584for ac_func in getluid setluid
7077do 8585do
7078as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 8586as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7079echo "$as_me:$LINENO: checking for $ac_func" >&5 8587{ echo "$as_me:$LINENO: checking for $ac_func" >&5
7080echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 8588echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
7081if eval "test \"\${$as_ac_var+set}\" = set"; then 8589if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7082 echo $ECHO_N "(cached) $ECHO_C" >&6 8590 echo $ECHO_N "(cached) $ECHO_C" >&6
7083else 8591else
7084 cat >conftest.$ac_ext <<_ACEOF 8592 cat >conftest.$ac_ext <<_ACEOF
@@ -7104,68 +8612,60 @@ cat >>conftest.$ac_ext <<_ACEOF
7104 8612
7105#undef $ac_func 8613#undef $ac_func
7106 8614
7107/* Override any gcc2 internal prototype to avoid an error. */ 8615/* Override any GCC internal prototype to avoid an error.
8616 Use char because int might match the return type of a GCC
8617 builtin and then its argument prototype would still apply. */
7108#ifdef __cplusplus 8618#ifdef __cplusplus
7109extern "C" 8619extern "C"
7110{
7111#endif 8620#endif
7112/* We use char because int might match the return type of a gcc2
7113 builtin and then its argument prototype would still apply. */
7114char $ac_func (); 8621char $ac_func ();
7115/* The GNU C library defines this for functions which it implements 8622/* The GNU C library defines this for functions which it implements
7116 to always fail with ENOSYS. Some functions are actually named 8623 to always fail with ENOSYS. Some functions are actually named
7117 something starting with __ and the normal name is an alias. */ 8624 something starting with __ and the normal name is an alias. */
7118#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 8625#if defined __stub_$ac_func || defined __stub___$ac_func
7119choke me 8626choke me
7120#else
7121char (*f) () = $ac_func;
7122#endif
7123#ifdef __cplusplus
7124}
7125#endif 8627#endif
7126 8628
7127int 8629int
7128main () 8630main ()
7129{ 8631{
7130return f != $ac_func; 8632return $ac_func ();
7131 ; 8633 ;
7132 return 0; 8634 return 0;
7133} 8635}
7134_ACEOF 8636_ACEOF
7135rm -f conftest.$ac_objext conftest$ac_exeext 8637rm -f conftest.$ac_objext conftest$ac_exeext
7136if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 8638if { (ac_try="$ac_link"
7137 (eval $ac_link) 2>conftest.er1 8639case "(($ac_try" in
8640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8641 *) ac_try_echo=$ac_try;;
8642esac
8643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8644 (eval "$ac_link") 2>conftest.er1
7138 ac_status=$? 8645 ac_status=$?
7139 grep -v '^ *+' conftest.er1 >conftest.err 8646 grep -v '^ *+' conftest.er1 >conftest.err
7140 rm -f conftest.er1 8647 rm -f conftest.er1
7141 cat conftest.err >&5 8648 cat conftest.err >&5
7142 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7143 (exit $ac_status); } && 8650 (exit $ac_status); } && {
7144 { ac_try='test -z "$ac_c_werror_flag" 8651 test -z "$ac_c_werror_flag" ||
7145 || test ! -s conftest.err' 8652 test ! -s conftest.err
7146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 8653 } && test -s conftest$ac_exeext &&
7147 (eval $ac_try) 2>&5 8654 $as_test_x conftest$ac_exeext; then
7148 ac_status=$?
7149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7150 (exit $ac_status); }; } &&
7151 { ac_try='test -s conftest$ac_exeext'
7152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7153 (eval $ac_try) 2>&5
7154 ac_status=$?
7155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7156 (exit $ac_status); }; }; then
7157 eval "$as_ac_var=yes" 8655 eval "$as_ac_var=yes"
7158else 8656else
7159 echo "$as_me: failed program was:" >&5 8657 echo "$as_me: failed program was:" >&5
7160sed 's/^/| /' conftest.$ac_ext >&5 8658sed 's/^/| /' conftest.$ac_ext >&5
7161 8659
7162eval "$as_ac_var=no" 8660 eval "$as_ac_var=no"
7163fi 8661fi
7164rm -f conftest.err conftest.$ac_objext \ 8662
8663rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7165 conftest$ac_exeext conftest.$ac_ext 8664 conftest$ac_exeext conftest.$ac_ext
7166fi 8665fi
7167echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 8666ac_res=`eval echo '${'$as_ac_var'}'`
7168echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 8667 { echo "$as_me:$LINENO: result: $ac_res" >&5
8668echo "${ECHO_T}$ac_res" >&6; }
7169if test `eval echo '${'$as_ac_var'}'` = yes; then 8669if test `eval echo '${'$as_ac_var'}'` = yes; then
7170 cat >>confdefs.h <<_ACEOF 8670 cat >>confdefs.h <<_ACEOF
7171#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 8671#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -7266,25 +8766,25 @@ _ACEOF
7266 MANTYPE=cat 8766 MANTYPE=cat
7267 ;; 8767 ;;
7268*-dec-osf*) 8768*-dec-osf*)
7269 echo "$as_me:$LINENO: checking for Digital Unix SIA" >&5 8769 { echo "$as_me:$LINENO: checking for Digital Unix SIA" >&5
7270echo $ECHO_N "checking for Digital Unix SIA... $ECHO_C" >&6 8770echo $ECHO_N "checking for Digital Unix SIA... $ECHO_C" >&6; }
7271 no_osfsia="" 8771 no_osfsia=""
7272 8772
7273# Check whether --with-osfsia or --without-osfsia was given. 8773# Check whether --with-osfsia was given.
7274if test "${with_osfsia+set}" = set; then 8774if test "${with_osfsia+set}" = set; then
7275 withval="$with_osfsia" 8775 withval=$with_osfsia;
7276
7277 if test "x$withval" = "xno" ; then 8776 if test "x$withval" = "xno" ; then
7278 echo "$as_me:$LINENO: result: disabled" >&5 8777 { echo "$as_me:$LINENO: result: disabled" >&5
7279echo "${ECHO_T}disabled" >&6 8778echo "${ECHO_T}disabled" >&6; }
7280 no_osfsia=1 8779 no_osfsia=1
7281 fi 8780 fi
7282 8781
7283fi; 8782fi
8783
7284 if test -z "$no_osfsia" ; then 8784 if test -z "$no_osfsia" ; then
7285 if test -f /etc/sia/matrix.conf; then 8785 if test -f /etc/sia/matrix.conf; then
7286 echo "$as_me:$LINENO: result: yes" >&5 8786 { echo "$as_me:$LINENO: result: yes" >&5
7287echo "${ECHO_T}yes" >&6 8787echo "${ECHO_T}yes" >&6; }
7288 8788
7289cat >>confdefs.h <<\_ACEOF 8789cat >>confdefs.h <<\_ACEOF
7290#define HAVE_OSF_SIA 1 8790#define HAVE_OSF_SIA 1
@@ -7300,9 +8800,10 @@ _ACEOF
7300_ACEOF 8800_ACEOF
7301 8801
7302 LIBS="$LIBS -lsecurity -ldb -lm -laud" 8802 LIBS="$LIBS -lsecurity -ldb -lm -laud"
8803 SIA_MSG="yes"
7303 else 8804 else
7304 echo "$as_me:$LINENO: result: no" >&5 8805 { echo "$as_me:$LINENO: result: no" >&5
7305echo "${ECHO_T}no" >&6 8806echo "${ECHO_T}no" >&6; }
7306 8807
7307cat >>confdefs.h <<\_ACEOF 8808cat >>confdefs.h <<\_ACEOF
7308#define LOCKED_PASSWD_SUBSTR "Nologin" 8809#define LOCKED_PASSWD_SUBSTR "Nologin"
@@ -7356,6 +8857,11 @@ _ACEOF
7356#define DISABLE_LASTLOG 1 8857#define DISABLE_LASTLOG 1
7357_ACEOF 8858_ACEOF
7358 8859
8860 cat >>confdefs.h <<\_ACEOF
8861#define SSHD_ACQUIRES_CTTY 1
8862_ACEOF
8863
8864 enable_etc_default_login=no # has incompatible /etc/default/login
7359 ;; 8865 ;;
7360 8866
7361*-*-ultrix*) 8867*-*-ultrix*)
@@ -7394,72 +8900,8 @@ _ACEOF
7394 ;; 8900 ;;
7395esac 8901esac
7396 8902
7397# Allow user to specify flags 8903{ echo "$as_me:$LINENO: checking compiler and flags for sanity" >&5
7398 8904echo $ECHO_N "checking compiler and flags for sanity... $ECHO_C" >&6; }
7399# Check whether --with-cflags or --without-cflags was given.
7400if test "${with_cflags+set}" = set; then
7401 withval="$with_cflags"
7402
7403 if test -n "$withval" && test "x$withval" != "xno" && \
7404 test "x${withval}" != "xyes"; then
7405 CFLAGS="$CFLAGS $withval"
7406 fi
7407
7408
7409fi;
7410
7411# Check whether --with-cppflags or --without-cppflags was given.
7412if test "${with_cppflags+set}" = set; then
7413 withval="$with_cppflags"
7414
7415 if test -n "$withval" && test "x$withval" != "xno" && \
7416 test "x${withval}" != "xyes"; then
7417 CPPFLAGS="$CPPFLAGS $withval"
7418 fi
7419
7420
7421fi;
7422
7423# Check whether --with-ldflags or --without-ldflags was given.
7424if test "${with_ldflags+set}" = set; then
7425 withval="$with_ldflags"
7426
7427 if test -n "$withval" && test "x$withval" != "xno" && \
7428 test "x${withval}" != "xyes"; then
7429 LDFLAGS="$LDFLAGS $withval"
7430 fi
7431
7432
7433fi;
7434
7435# Check whether --with-libs or --without-libs was given.
7436if test "${with_libs+set}" = set; then
7437 withval="$with_libs"
7438
7439 if test -n "$withval" && test "x$withval" != "xno" && \
7440 test "x${withval}" != "xyes"; then
7441 LIBS="$LIBS $withval"
7442 fi
7443
7444
7445fi;
7446
7447# Check whether --with-Werror or --without-Werror was given.
7448if test "${with_Werror+set}" = set; then
7449 withval="$with_Werror"
7450
7451 if test -n "$withval" && test "x$withval" != "xno"; then
7452 werror_flags="-Werror"
7453 if test "x${withval}" != "xyes"; then
7454 werror_flags="$withval"
7455 fi
7456 fi
7457
7458
7459fi;
7460
7461echo "$as_me:$LINENO: checking compiler and flags for sanity" >&5
7462echo $ECHO_N "checking compiler and flags for sanity... $ECHO_C" >&6
7463if test "$cross_compiling" = yes; then 8905if test "$cross_compiling" = yes; then
7464 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking compiler sanity" >&5 8906 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking compiler sanity" >&5
7465echo "$as_me: WARNING: cross compiling: not checking compiler sanity" >&2;} 8907echo "$as_me: WARNING: cross compiling: not checking compiler sanity" >&2;}
@@ -7477,18 +8919,27 @@ int main(){exit(0);}
7477 8919
7478_ACEOF 8920_ACEOF
7479rm -f conftest$ac_exeext 8921rm -f conftest$ac_exeext
7480if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 8922if { (ac_try="$ac_link"
7481 (eval $ac_link) 2>&5 8923case "(($ac_try" in
8924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8925 *) ac_try_echo=$ac_try;;
8926esac
8927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8928 (eval "$ac_link") 2>&5
7482 ac_status=$? 8929 ac_status=$?
7483 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7484 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 8931 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 8932 { (case "(($ac_try" in
7486 (eval $ac_try) 2>&5 8933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8934 *) ac_try_echo=$ac_try;;
8935esac
8936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8937 (eval "$ac_try") 2>&5
7487 ac_status=$? 8938 ac_status=$?
7488 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7489 (exit $ac_status); }; }; then 8940 (exit $ac_status); }; }; then
7490 echo "$as_me:$LINENO: result: yes" >&5 8941 { echo "$as_me:$LINENO: result: yes" >&5
7491echo "${ECHO_T}yes" >&6 8942echo "${ECHO_T}yes" >&6; }
7492else 8943else
7493 echo "$as_me: program exited with status $ac_status" >&5 8944 echo "$as_me: program exited with status $ac_status" >&5
7494echo "$as_me: failed program was:" >&5 8945echo "$as_me: failed program was:" >&5
@@ -7496,416 +8947,21 @@ sed 's/^/| /' conftest.$ac_ext >&5
7496 8947
7497( exit $ac_status ) 8948( exit $ac_status )
7498 8949
7499 echo "$as_me:$LINENO: result: no" >&5 8950 { echo "$as_me:$LINENO: result: no" >&5
7500echo "${ECHO_T}no" >&6 8951echo "${ECHO_T}no" >&6; }
7501 { { echo "$as_me:$LINENO: error: *** compiler cannot create working executables, check config.log ***" >&5 8952 { { echo "$as_me:$LINENO: error: *** compiler cannot create working executables, check config.log ***" >&5
7502echo "$as_me: error: *** compiler cannot create working executables, check config.log ***" >&2;} 8953echo "$as_me: error: *** compiler cannot create working executables, check config.log ***" >&2;}
7503 { (exit 1); exit 1; }; } 8954 { (exit 1); exit 1; }; }
7504 8955
7505fi 8956fi
7506rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 8957rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7507fi 8958fi
7508 8959
7509 8960
7510 8961
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565for ac_header in \
7566 bstring.h \
7567 crypt.h \
7568 dirent.h \
7569 endian.h \
7570 features.h \
7571 floatingpoint.h \
7572 getopt.h \
7573 glob.h \
7574 ia.h \
7575 iaf.h \
7576 limits.h \
7577 login.h \
7578 login_cap.h \
7579 maillock.h \
7580 ndir.h \
7581 netdb.h \
7582 netgroup.h \
7583 pam/pam_appl.h \
7584 paths.h \
7585 pty.h \
7586 readpassphrase.h \
7587 rpc/types.h \
7588 security/pam_appl.h \
7589 shadow.h \
7590 stddef.h \
7591 stdint.h \
7592 string.h \
7593 strings.h \
7594 sys/audit.h \
7595 sys/bitypes.h \
7596 sys/bsdtty.h \
7597 sys/cdefs.h \
7598 sys/dir.h \
7599 sys/mman.h \
7600 sys/ndir.h \
7601 sys/prctl.h \
7602 sys/pstat.h \
7603 sys/select.h \
7604 sys/stat.h \
7605 sys/stream.h \
7606 sys/stropts.h \
7607 sys/strtio.h \
7608 sys/sysmacros.h \
7609 sys/time.h \
7610 sys/timers.h \
7611 sys/un.h \
7612 time.h \
7613 tmpdir.h \
7614 ttyent.h \
7615 unistd.h \
7616 usersec.h \
7617 util.h \
7618 utime.h \
7619 utmp.h \
7620 utmpx.h \
7621 vis.h \
7622
7623do
7624as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7625if eval "test \"\${$as_ac_Header+set}\" = set"; then
7626 echo "$as_me:$LINENO: checking for $ac_header" >&5
7627echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7628if eval "test \"\${$as_ac_Header+set}\" = set"; then
7629 echo $ECHO_N "(cached) $ECHO_C" >&6
7630fi
7631echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7632echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7633else
7634 # Is the header compilable?
7635echo "$as_me:$LINENO: checking $ac_header usability" >&5
7636echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7637cat >conftest.$ac_ext <<_ACEOF
7638/* confdefs.h. */
7639_ACEOF
7640cat confdefs.h >>conftest.$ac_ext
7641cat >>conftest.$ac_ext <<_ACEOF
7642/* end confdefs.h. */
7643$ac_includes_default
7644#include <$ac_header>
7645_ACEOF
7646rm -f conftest.$ac_objext
7647if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7648 (eval $ac_compile) 2>conftest.er1
7649 ac_status=$?
7650 grep -v '^ *+' conftest.er1 >conftest.err
7651 rm -f conftest.er1
7652 cat conftest.err >&5
7653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7654 (exit $ac_status); } &&
7655 { ac_try='test -z "$ac_c_werror_flag"
7656 || test ! -s conftest.err'
7657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7658 (eval $ac_try) 2>&5
7659 ac_status=$?
7660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7661 (exit $ac_status); }; } &&
7662 { ac_try='test -s conftest.$ac_objext'
7663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7664 (eval $ac_try) 2>&5
7665 ac_status=$?
7666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7667 (exit $ac_status); }; }; then
7668 ac_header_compiler=yes
7669else
7670 echo "$as_me: failed program was:" >&5
7671sed 's/^/| /' conftest.$ac_ext >&5
7672
7673ac_header_compiler=no
7674fi
7675rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7676echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7677echo "${ECHO_T}$ac_header_compiler" >&6
7678
7679# Is the header present?
7680echo "$as_me:$LINENO: checking $ac_header presence" >&5
7681echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7682cat >conftest.$ac_ext <<_ACEOF
7683/* confdefs.h. */
7684_ACEOF
7685cat confdefs.h >>conftest.$ac_ext
7686cat >>conftest.$ac_ext <<_ACEOF
7687/* end confdefs.h. */
7688#include <$ac_header>
7689_ACEOF
7690if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7691 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7692 ac_status=$?
7693 grep -v '^ *+' conftest.er1 >conftest.err
7694 rm -f conftest.er1
7695 cat conftest.err >&5
7696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7697 (exit $ac_status); } >/dev/null; then
7698 if test -s conftest.err; then
7699 ac_cpp_err=$ac_c_preproc_warn_flag
7700 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7701 else
7702 ac_cpp_err=
7703 fi
7704else
7705 ac_cpp_err=yes
7706fi
7707if test -z "$ac_cpp_err"; then
7708 ac_header_preproc=yes
7709else
7710 echo "$as_me: failed program was:" >&5
7711sed 's/^/| /' conftest.$ac_ext >&5
7712
7713 ac_header_preproc=no
7714fi
7715rm -f conftest.err conftest.$ac_ext
7716echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7717echo "${ECHO_T}$ac_header_preproc" >&6
7718
7719# So? What about this header?
7720case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7721 yes:no: )
7722 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7723echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7724 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7725echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7726 ac_header_preproc=yes
7727 ;;
7728 no:yes:* )
7729 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7730echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7731 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7732echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7733 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7734echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7735 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7736echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7737 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7738echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7739 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7740echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7741 (
7742 cat <<\_ASBOX
7743## ------------------------------------------- ##
7744## Report this to openssh-unix-dev@mindrot.org ##
7745## ------------------------------------------- ##
7746_ASBOX
7747 ) |
7748 sed "s/^/$as_me: WARNING: /" >&2
7749 ;;
7750esac
7751echo "$as_me:$LINENO: checking for $ac_header" >&5
7752echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7753if eval "test \"\${$as_ac_Header+set}\" = set"; then
7754 echo $ECHO_N "(cached) $ECHO_C" >&6
7755else
7756 eval "$as_ac_Header=\$ac_header_preproc"
7757fi
7758echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7759echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7760
7761fi
7762if test `eval echo '${'$as_ac_Header'}'` = yes; then
7763 cat >>confdefs.h <<_ACEOF
7764#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7765_ACEOF
7766
7767fi
7768
7769done
7770
7771
7772# lastlog.h requires sys/time.h to be included first on Solaris
7773
7774for ac_header in lastlog.h
7775do
7776as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7777echo "$as_me:$LINENO: checking for $ac_header" >&5
7778echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7779if eval "test \"\${$as_ac_Header+set}\" = set"; then
7780 echo $ECHO_N "(cached) $ECHO_C" >&6
7781else
7782 cat >conftest.$ac_ext <<_ACEOF
7783/* confdefs.h. */
7784_ACEOF
7785cat confdefs.h >>conftest.$ac_ext
7786cat >>conftest.$ac_ext <<_ACEOF
7787/* end confdefs.h. */
7788
7789#ifdef HAVE_SYS_TIME_H
7790# include <sys/time.h>
7791#endif
7792
7793
7794#include <$ac_header>
7795_ACEOF
7796rm -f conftest.$ac_objext
7797if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7798 (eval $ac_compile) 2>conftest.er1
7799 ac_status=$?
7800 grep -v '^ *+' conftest.er1 >conftest.err
7801 rm -f conftest.er1
7802 cat conftest.err >&5
7803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7804 (exit $ac_status); } &&
7805 { ac_try='test -z "$ac_c_werror_flag"
7806 || test ! -s conftest.err'
7807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7808 (eval $ac_try) 2>&5
7809 ac_status=$?
7810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7811 (exit $ac_status); }; } &&
7812 { ac_try='test -s conftest.$ac_objext'
7813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7814 (eval $ac_try) 2>&5
7815 ac_status=$?
7816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7817 (exit $ac_status); }; }; then
7818 eval "$as_ac_Header=yes"
7819else
7820 echo "$as_me: failed program was:" >&5
7821sed 's/^/| /' conftest.$ac_ext >&5
7822
7823eval "$as_ac_Header=no"
7824fi
7825rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7826fi
7827echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7828echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7829if test `eval echo '${'$as_ac_Header'}'` = yes; then
7830 cat >>confdefs.h <<_ACEOF
7831#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7832_ACEOF
7833
7834fi
7835
7836done
7837
7838
7839# sys/ptms.h requires sys/stream.h to be included first on Solaris
7840
7841for ac_header in sys/ptms.h
7842do
7843as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7844echo "$as_me:$LINENO: checking for $ac_header" >&5
7845echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7846if eval "test \"\${$as_ac_Header+set}\" = set"; then
7847 echo $ECHO_N "(cached) $ECHO_C" >&6
7848else
7849 cat >conftest.$ac_ext <<_ACEOF
7850/* confdefs.h. */
7851_ACEOF
7852cat confdefs.h >>conftest.$ac_ext
7853cat >>conftest.$ac_ext <<_ACEOF
7854/* end confdefs.h. */
7855
7856#ifdef HAVE_SYS_STREAM_H
7857# include <sys/stream.h>
7858#endif
7859
7860
7861#include <$ac_header>
7862_ACEOF
7863rm -f conftest.$ac_objext
7864if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7865 (eval $ac_compile) 2>conftest.er1
7866 ac_status=$?
7867 grep -v '^ *+' conftest.er1 >conftest.err
7868 rm -f conftest.er1
7869 cat conftest.err >&5
7870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7871 (exit $ac_status); } &&
7872 { ac_try='test -z "$ac_c_werror_flag"
7873 || test ! -s conftest.err'
7874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7875 (eval $ac_try) 2>&5
7876 ac_status=$?
7877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7878 (exit $ac_status); }; } &&
7879 { ac_try='test -s conftest.$ac_objext'
7880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7881 (eval $ac_try) 2>&5
7882 ac_status=$?
7883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7884 (exit $ac_status); }; }; then
7885 eval "$as_ac_Header=yes"
7886else
7887 echo "$as_me: failed program was:" >&5
7888sed 's/^/| /' conftest.$ac_ext >&5
7889
7890eval "$as_ac_Header=no"
7891fi
7892rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7893fi
7894echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7895echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7896if test `eval echo '${'$as_ac_Header'}'` = yes; then
7897 cat >>confdefs.h <<_ACEOF
7898#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7899_ACEOF
7900
7901fi
7902
7903done
7904
7905
7906# Checks for libraries. 8962# Checks for libraries.
7907echo "$as_me:$LINENO: checking for yp_match" >&5 8963{ echo "$as_me:$LINENO: checking for yp_match" >&5
7908echo $ECHO_N "checking for yp_match... $ECHO_C" >&6 8964echo $ECHO_N "checking for yp_match... $ECHO_C" >&6; }
7909if test "${ac_cv_func_yp_match+set}" = set; then 8965if test "${ac_cv_func_yp_match+set}" = set; then
7910 echo $ECHO_N "(cached) $ECHO_C" >&6 8966 echo $ECHO_N "(cached) $ECHO_C" >&6
7911else 8967else
@@ -7932,74 +8988,65 @@ cat >>conftest.$ac_ext <<_ACEOF
7932 8988
7933#undef yp_match 8989#undef yp_match
7934 8990
7935/* Override any gcc2 internal prototype to avoid an error. */ 8991/* Override any GCC internal prototype to avoid an error.
8992 Use char because int might match the return type of a GCC
8993 builtin and then its argument prototype would still apply. */
7936#ifdef __cplusplus 8994#ifdef __cplusplus
7937extern "C" 8995extern "C"
7938{
7939#endif 8996#endif
7940/* We use char because int might match the return type of a gcc2
7941 builtin and then its argument prototype would still apply. */
7942char yp_match (); 8997char yp_match ();
7943/* The GNU C library defines this for functions which it implements 8998/* The GNU C library defines this for functions which it implements
7944 to always fail with ENOSYS. Some functions are actually named 8999 to always fail with ENOSYS. Some functions are actually named
7945 something starting with __ and the normal name is an alias. */ 9000 something starting with __ and the normal name is an alias. */
7946#if defined (__stub_yp_match) || defined (__stub___yp_match) 9001#if defined __stub_yp_match || defined __stub___yp_match
7947choke me 9002choke me
7948#else
7949char (*f) () = yp_match;
7950#endif
7951#ifdef __cplusplus
7952}
7953#endif 9003#endif
7954 9004
7955int 9005int
7956main () 9006main ()
7957{ 9007{
7958return f != yp_match; 9008return yp_match ();
7959 ; 9009 ;
7960 return 0; 9010 return 0;
7961} 9011}
7962_ACEOF 9012_ACEOF
7963rm -f conftest.$ac_objext conftest$ac_exeext 9013rm -f conftest.$ac_objext conftest$ac_exeext
7964if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 9014if { (ac_try="$ac_link"
7965 (eval $ac_link) 2>conftest.er1 9015case "(($ac_try" in
9016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9017 *) ac_try_echo=$ac_try;;
9018esac
9019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9020 (eval "$ac_link") 2>conftest.er1
7966 ac_status=$? 9021 ac_status=$?
7967 grep -v '^ *+' conftest.er1 >conftest.err 9022 grep -v '^ *+' conftest.er1 >conftest.err
7968 rm -f conftest.er1 9023 rm -f conftest.er1
7969 cat conftest.err >&5 9024 cat conftest.err >&5
7970 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7971 (exit $ac_status); } && 9026 (exit $ac_status); } && {
7972 { ac_try='test -z "$ac_c_werror_flag" 9027 test -z "$ac_c_werror_flag" ||
7973 || test ! -s conftest.err' 9028 test ! -s conftest.err
7974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9029 } && test -s conftest$ac_exeext &&
7975 (eval $ac_try) 2>&5 9030 $as_test_x conftest$ac_exeext; then
7976 ac_status=$?
7977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7978 (exit $ac_status); }; } &&
7979 { ac_try='test -s conftest$ac_exeext'
7980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7981 (eval $ac_try) 2>&5
7982 ac_status=$?
7983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7984 (exit $ac_status); }; }; then
7985 ac_cv_func_yp_match=yes 9031 ac_cv_func_yp_match=yes
7986else 9032else
7987 echo "$as_me: failed program was:" >&5 9033 echo "$as_me: failed program was:" >&5
7988sed 's/^/| /' conftest.$ac_ext >&5 9034sed 's/^/| /' conftest.$ac_ext >&5
7989 9035
7990ac_cv_func_yp_match=no 9036 ac_cv_func_yp_match=no
7991fi 9037fi
7992rm -f conftest.err conftest.$ac_objext \ 9038
9039rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7993 conftest$ac_exeext conftest.$ac_ext 9040 conftest$ac_exeext conftest.$ac_ext
7994fi 9041fi
7995echo "$as_me:$LINENO: result: $ac_cv_func_yp_match" >&5 9042{ echo "$as_me:$LINENO: result: $ac_cv_func_yp_match" >&5
7996echo "${ECHO_T}$ac_cv_func_yp_match" >&6 9043echo "${ECHO_T}$ac_cv_func_yp_match" >&6; }
7997if test $ac_cv_func_yp_match = yes; then 9044if test $ac_cv_func_yp_match = yes; then
7998 : 9045 :
7999else 9046else
8000 9047
8001echo "$as_me:$LINENO: checking for yp_match in -lnsl" >&5 9048{ echo "$as_me:$LINENO: checking for yp_match in -lnsl" >&5
8002echo $ECHO_N "checking for yp_match in -lnsl... $ECHO_C" >&6 9049echo $ECHO_N "checking for yp_match in -lnsl... $ECHO_C" >&6; }
8003if test "${ac_cv_lib_nsl_yp_match+set}" = set; then 9050if test "${ac_cv_lib_nsl_yp_match+set}" = set; then
8004 echo $ECHO_N "(cached) $ECHO_C" >&6 9051 echo $ECHO_N "(cached) $ECHO_C" >&6
8005else 9052else
@@ -8012,56 +9059,53 @@ cat confdefs.h >>conftest.$ac_ext
8012cat >>conftest.$ac_ext <<_ACEOF 9059cat >>conftest.$ac_ext <<_ACEOF
8013/* end confdefs.h. */ 9060/* end confdefs.h. */
8014 9061
8015/* Override any gcc2 internal prototype to avoid an error. */ 9062/* Override any GCC internal prototype to avoid an error.
9063 Use char because int might match the return type of a GCC
9064 builtin and then its argument prototype would still apply. */
8016#ifdef __cplusplus 9065#ifdef __cplusplus
8017extern "C" 9066extern "C"
8018#endif 9067#endif
8019/* We use char because int might match the return type of a gcc2
8020 builtin and then its argument prototype would still apply. */
8021char yp_match (); 9068char yp_match ();
8022int 9069int
8023main () 9070main ()
8024{ 9071{
8025yp_match (); 9072return yp_match ();
8026 ; 9073 ;
8027 return 0; 9074 return 0;
8028} 9075}
8029_ACEOF 9076_ACEOF
8030rm -f conftest.$ac_objext conftest$ac_exeext 9077rm -f conftest.$ac_objext conftest$ac_exeext
8031if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 9078if { (ac_try="$ac_link"
8032 (eval $ac_link) 2>conftest.er1 9079case "(($ac_try" in
9080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9081 *) ac_try_echo=$ac_try;;
9082esac
9083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9084 (eval "$ac_link") 2>conftest.er1
8033 ac_status=$? 9085 ac_status=$?
8034 grep -v '^ *+' conftest.er1 >conftest.err 9086 grep -v '^ *+' conftest.er1 >conftest.err
8035 rm -f conftest.er1 9087 rm -f conftest.er1
8036 cat conftest.err >&5 9088 cat conftest.err >&5
8037 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8038 (exit $ac_status); } && 9090 (exit $ac_status); } && {
8039 { ac_try='test -z "$ac_c_werror_flag" 9091 test -z "$ac_c_werror_flag" ||
8040 || test ! -s conftest.err' 9092 test ! -s conftest.err
8041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9093 } && test -s conftest$ac_exeext &&
8042 (eval $ac_try) 2>&5 9094 $as_test_x conftest$ac_exeext; then
8043 ac_status=$?
8044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8045 (exit $ac_status); }; } &&
8046 { ac_try='test -s conftest$ac_exeext'
8047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8048 (eval $ac_try) 2>&5
8049 ac_status=$?
8050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8051 (exit $ac_status); }; }; then
8052 ac_cv_lib_nsl_yp_match=yes 9095 ac_cv_lib_nsl_yp_match=yes
8053else 9096else
8054 echo "$as_me: failed program was:" >&5 9097 echo "$as_me: failed program was:" >&5
8055sed 's/^/| /' conftest.$ac_ext >&5 9098sed 's/^/| /' conftest.$ac_ext >&5
8056 9099
8057ac_cv_lib_nsl_yp_match=no 9100 ac_cv_lib_nsl_yp_match=no
8058fi 9101fi
8059rm -f conftest.err conftest.$ac_objext \ 9102
9103rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8060 conftest$ac_exeext conftest.$ac_ext 9104 conftest$ac_exeext conftest.$ac_ext
8061LIBS=$ac_check_lib_save_LIBS 9105LIBS=$ac_check_lib_save_LIBS
8062fi 9106fi
8063echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_yp_match" >&5 9107{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_yp_match" >&5
8064echo "${ECHO_T}$ac_cv_lib_nsl_yp_match" >&6 9108echo "${ECHO_T}$ac_cv_lib_nsl_yp_match" >&6; }
8065if test $ac_cv_lib_nsl_yp_match = yes; then 9109if test $ac_cv_lib_nsl_yp_match = yes; then
8066 cat >>confdefs.h <<_ACEOF 9110 cat >>confdefs.h <<_ACEOF
8067#define HAVE_LIBNSL 1 9111#define HAVE_LIBNSL 1
@@ -8073,8 +9117,8 @@ fi
8073 9117
8074fi 9118fi
8075 9119
8076echo "$as_me:$LINENO: checking for setsockopt" >&5 9120{ echo "$as_me:$LINENO: checking for setsockopt" >&5
8077echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 9121echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; }
8078if test "${ac_cv_func_setsockopt+set}" = set; then 9122if test "${ac_cv_func_setsockopt+set}" = set; then
8079 echo $ECHO_N "(cached) $ECHO_C" >&6 9123 echo $ECHO_N "(cached) $ECHO_C" >&6
8080else 9124else
@@ -8101,74 +9145,65 @@ cat >>conftest.$ac_ext <<_ACEOF
8101 9145
8102#undef setsockopt 9146#undef setsockopt
8103 9147
8104/* Override any gcc2 internal prototype to avoid an error. */ 9148/* Override any GCC internal prototype to avoid an error.
9149 Use char because int might match the return type of a GCC
9150 builtin and then its argument prototype would still apply. */
8105#ifdef __cplusplus 9151#ifdef __cplusplus
8106extern "C" 9152extern "C"
8107{
8108#endif 9153#endif
8109/* We use char because int might match the return type of a gcc2
8110 builtin and then its argument prototype would still apply. */
8111char setsockopt (); 9154char setsockopt ();
8112/* The GNU C library defines this for functions which it implements 9155/* The GNU C library defines this for functions which it implements
8113 to always fail with ENOSYS. Some functions are actually named 9156 to always fail with ENOSYS. Some functions are actually named
8114 something starting with __ and the normal name is an alias. */ 9157 something starting with __ and the normal name is an alias. */
8115#if defined (__stub_setsockopt) || defined (__stub___setsockopt) 9158#if defined __stub_setsockopt || defined __stub___setsockopt
8116choke me 9159choke me
8117#else
8118char (*f) () = setsockopt;
8119#endif
8120#ifdef __cplusplus
8121}
8122#endif 9160#endif
8123 9161
8124int 9162int
8125main () 9163main ()
8126{ 9164{
8127return f != setsockopt; 9165return setsockopt ();
8128 ; 9166 ;
8129 return 0; 9167 return 0;
8130} 9168}
8131_ACEOF 9169_ACEOF
8132rm -f conftest.$ac_objext conftest$ac_exeext 9170rm -f conftest.$ac_objext conftest$ac_exeext
8133if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 9171if { (ac_try="$ac_link"
8134 (eval $ac_link) 2>conftest.er1 9172case "(($ac_try" in
9173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9174 *) ac_try_echo=$ac_try;;
9175esac
9176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9177 (eval "$ac_link") 2>conftest.er1
8135 ac_status=$? 9178 ac_status=$?
8136 grep -v '^ *+' conftest.er1 >conftest.err 9179 grep -v '^ *+' conftest.er1 >conftest.err
8137 rm -f conftest.er1 9180 rm -f conftest.er1
8138 cat conftest.err >&5 9181 cat conftest.err >&5
8139 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8140 (exit $ac_status); } && 9183 (exit $ac_status); } && {
8141 { ac_try='test -z "$ac_c_werror_flag" 9184 test -z "$ac_c_werror_flag" ||
8142 || test ! -s conftest.err' 9185 test ! -s conftest.err
8143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9186 } && test -s conftest$ac_exeext &&
8144 (eval $ac_try) 2>&5 9187 $as_test_x conftest$ac_exeext; then
8145 ac_status=$?
8146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8147 (exit $ac_status); }; } &&
8148 { ac_try='test -s conftest$ac_exeext'
8149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8150 (eval $ac_try) 2>&5
8151 ac_status=$?
8152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8153 (exit $ac_status); }; }; then
8154 ac_cv_func_setsockopt=yes 9188 ac_cv_func_setsockopt=yes
8155else 9189else
8156 echo "$as_me: failed program was:" >&5 9190 echo "$as_me: failed program was:" >&5
8157sed 's/^/| /' conftest.$ac_ext >&5 9191sed 's/^/| /' conftest.$ac_ext >&5
8158 9192
8159ac_cv_func_setsockopt=no 9193 ac_cv_func_setsockopt=no
8160fi 9194fi
8161rm -f conftest.err conftest.$ac_objext \ 9195
9196rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8162 conftest$ac_exeext conftest.$ac_ext 9197 conftest$ac_exeext conftest.$ac_ext
8163fi 9198fi
8164echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 9199{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
8165echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 9200echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; }
8166if test $ac_cv_func_setsockopt = yes; then 9201if test $ac_cv_func_setsockopt = yes; then
8167 : 9202 :
8168else 9203else
8169 9204
8170echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 9205{ echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
8171echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 9206echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; }
8172if test "${ac_cv_lib_socket_setsockopt+set}" = set; then 9207if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
8173 echo $ECHO_N "(cached) $ECHO_C" >&6 9208 echo $ECHO_N "(cached) $ECHO_C" >&6
8174else 9209else
@@ -8181,56 +9216,53 @@ cat confdefs.h >>conftest.$ac_ext
8181cat >>conftest.$ac_ext <<_ACEOF 9216cat >>conftest.$ac_ext <<_ACEOF
8182/* end confdefs.h. */ 9217/* end confdefs.h. */
8183 9218
8184/* Override any gcc2 internal prototype to avoid an error. */ 9219/* Override any GCC internal prototype to avoid an error.
9220 Use char because int might match the return type of a GCC
9221 builtin and then its argument prototype would still apply. */
8185#ifdef __cplusplus 9222#ifdef __cplusplus
8186extern "C" 9223extern "C"
8187#endif 9224#endif
8188/* We use char because int might match the return type of a gcc2
8189 builtin and then its argument prototype would still apply. */
8190char setsockopt (); 9225char setsockopt ();
8191int 9226int
8192main () 9227main ()
8193{ 9228{
8194setsockopt (); 9229return setsockopt ();
8195 ; 9230 ;
8196 return 0; 9231 return 0;
8197} 9232}
8198_ACEOF 9233_ACEOF
8199rm -f conftest.$ac_objext conftest$ac_exeext 9234rm -f conftest.$ac_objext conftest$ac_exeext
8200if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 9235if { (ac_try="$ac_link"
8201 (eval $ac_link) 2>conftest.er1 9236case "(($ac_try" in
9237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9238 *) ac_try_echo=$ac_try;;
9239esac
9240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9241 (eval "$ac_link") 2>conftest.er1
8202 ac_status=$? 9242 ac_status=$?
8203 grep -v '^ *+' conftest.er1 >conftest.err 9243 grep -v '^ *+' conftest.er1 >conftest.err
8204 rm -f conftest.er1 9244 rm -f conftest.er1
8205 cat conftest.err >&5 9245 cat conftest.err >&5
8206 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8207 (exit $ac_status); } && 9247 (exit $ac_status); } && {
8208 { ac_try='test -z "$ac_c_werror_flag" 9248 test -z "$ac_c_werror_flag" ||
8209 || test ! -s conftest.err' 9249 test ! -s conftest.err
8210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9250 } && test -s conftest$ac_exeext &&
8211 (eval $ac_try) 2>&5 9251 $as_test_x conftest$ac_exeext; then
8212 ac_status=$?
8213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8214 (exit $ac_status); }; } &&
8215 { ac_try='test -s conftest$ac_exeext'
8216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8217 (eval $ac_try) 2>&5
8218 ac_status=$?
8219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8220 (exit $ac_status); }; }; then
8221 ac_cv_lib_socket_setsockopt=yes 9252 ac_cv_lib_socket_setsockopt=yes
8222else 9253else
8223 echo "$as_me: failed program was:" >&5 9254 echo "$as_me: failed program was:" >&5
8224sed 's/^/| /' conftest.$ac_ext >&5 9255sed 's/^/| /' conftest.$ac_ext >&5
8225 9256
8226ac_cv_lib_socket_setsockopt=no 9257 ac_cv_lib_socket_setsockopt=no
8227fi 9258fi
8228rm -f conftest.err conftest.$ac_objext \ 9259
9260rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8229 conftest$ac_exeext conftest.$ac_ext 9261 conftest$ac_exeext conftest.$ac_ext
8230LIBS=$ac_check_lib_save_LIBS 9262LIBS=$ac_check_lib_save_LIBS
8231fi 9263fi
8232echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 9264{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
8233echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 9265echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; }
8234if test $ac_cv_lib_socket_setsockopt = yes; then 9266if test $ac_cv_lib_socket_setsockopt = yes; then
8235 cat >>confdefs.h <<_ACEOF 9267 cat >>confdefs.h <<_ACEOF
8236#define HAVE_LIBSOCKET 1 9268#define HAVE_LIBSOCKET 1
@@ -8247,9 +9279,9 @@ fi
8247for ac_func in dirname 9279for ac_func in dirname
8248do 9280do
8249as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 9281as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8250echo "$as_me:$LINENO: checking for $ac_func" >&5 9282{ echo "$as_me:$LINENO: checking for $ac_func" >&5
8251echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 9283echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
8252if eval "test \"\${$as_ac_var+set}\" = set"; then 9284if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8253 echo $ECHO_N "(cached) $ECHO_C" >&6 9285 echo $ECHO_N "(cached) $ECHO_C" >&6
8254else 9286else
8255 cat >conftest.$ac_ext <<_ACEOF 9287 cat >conftest.$ac_ext <<_ACEOF
@@ -8275,68 +9307,60 @@ cat >>conftest.$ac_ext <<_ACEOF
8275 9307
8276#undef $ac_func 9308#undef $ac_func
8277 9309
8278/* Override any gcc2 internal prototype to avoid an error. */ 9310/* Override any GCC internal prototype to avoid an error.
9311 Use char because int might match the return type of a GCC
9312 builtin and then its argument prototype would still apply. */
8279#ifdef __cplusplus 9313#ifdef __cplusplus
8280extern "C" 9314extern "C"
8281{
8282#endif 9315#endif
8283/* We use char because int might match the return type of a gcc2
8284 builtin and then its argument prototype would still apply. */
8285char $ac_func (); 9316char $ac_func ();
8286/* The GNU C library defines this for functions which it implements 9317/* The GNU C library defines this for functions which it implements
8287 to always fail with ENOSYS. Some functions are actually named 9318 to always fail with ENOSYS. Some functions are actually named
8288 something starting with __ and the normal name is an alias. */ 9319 something starting with __ and the normal name is an alias. */
8289#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 9320#if defined __stub_$ac_func || defined __stub___$ac_func
8290choke me 9321choke me
8291#else
8292char (*f) () = $ac_func;
8293#endif
8294#ifdef __cplusplus
8295}
8296#endif 9322#endif
8297 9323
8298int 9324int
8299main () 9325main ()
8300{ 9326{
8301return f != $ac_func; 9327return $ac_func ();
8302 ; 9328 ;
8303 return 0; 9329 return 0;
8304} 9330}
8305_ACEOF 9331_ACEOF
8306rm -f conftest.$ac_objext conftest$ac_exeext 9332rm -f conftest.$ac_objext conftest$ac_exeext
8307if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 9333if { (ac_try="$ac_link"
8308 (eval $ac_link) 2>conftest.er1 9334case "(($ac_try" in
9335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9336 *) ac_try_echo=$ac_try;;
9337esac
9338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9339 (eval "$ac_link") 2>conftest.er1
8309 ac_status=$? 9340 ac_status=$?
8310 grep -v '^ *+' conftest.er1 >conftest.err 9341 grep -v '^ *+' conftest.er1 >conftest.err
8311 rm -f conftest.er1 9342 rm -f conftest.er1
8312 cat conftest.err >&5 9343 cat conftest.err >&5
8313 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8314 (exit $ac_status); } && 9345 (exit $ac_status); } && {
8315 { ac_try='test -z "$ac_c_werror_flag" 9346 test -z "$ac_c_werror_flag" ||
8316 || test ! -s conftest.err' 9347 test ! -s conftest.err
8317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9348 } && test -s conftest$ac_exeext &&
8318 (eval $ac_try) 2>&5 9349 $as_test_x conftest$ac_exeext; then
8319 ac_status=$?
8320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8321 (exit $ac_status); }; } &&
8322 { ac_try='test -s conftest$ac_exeext'
8323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8324 (eval $ac_try) 2>&5
8325 ac_status=$?
8326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8327 (exit $ac_status); }; }; then
8328 eval "$as_ac_var=yes" 9350 eval "$as_ac_var=yes"
8329else 9351else
8330 echo "$as_me: failed program was:" >&5 9352 echo "$as_me: failed program was:" >&5
8331sed 's/^/| /' conftest.$ac_ext >&5 9353sed 's/^/| /' conftest.$ac_ext >&5
8332 9354
8333eval "$as_ac_var=no" 9355 eval "$as_ac_var=no"
8334fi 9356fi
8335rm -f conftest.err conftest.$ac_objext \ 9357
9358rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8336 conftest$ac_exeext conftest.$ac_ext 9359 conftest$ac_exeext conftest.$ac_ext
8337fi 9360fi
8338echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 9361ac_res=`eval echo '${'$as_ac_var'}'`
8339echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 9362 { echo "$as_me:$LINENO: result: $ac_res" >&5
9363echo "${ECHO_T}$ac_res" >&6; }
8340if test `eval echo '${'$as_ac_var'}'` = yes; then 9364if test `eval echo '${'$as_ac_var'}'` = yes; then
8341 cat >>confdefs.h <<_ACEOF 9365 cat >>confdefs.h <<_ACEOF
8342#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 9366#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -8345,18 +9369,19 @@ _ACEOF
8345for ac_header in libgen.h 9369for ac_header in libgen.h
8346do 9370do
8347as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 9371as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8348if eval "test \"\${$as_ac_Header+set}\" = set"; then 9372if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8349 echo "$as_me:$LINENO: checking for $ac_header" >&5 9373 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8350echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 9374echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8351if eval "test \"\${$as_ac_Header+set}\" = set"; then 9375if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8352 echo $ECHO_N "(cached) $ECHO_C" >&6 9376 echo $ECHO_N "(cached) $ECHO_C" >&6
8353fi 9377fi
8354echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 9378ac_res=`eval echo '${'$as_ac_Header'}'`
8355echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 9379 { echo "$as_me:$LINENO: result: $ac_res" >&5
9380echo "${ECHO_T}$ac_res" >&6; }
8356else 9381else
8357 # Is the header compilable? 9382 # Is the header compilable?
8358echo "$as_me:$LINENO: checking $ac_header usability" >&5 9383{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
8359echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 9384echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8360cat >conftest.$ac_ext <<_ACEOF 9385cat >conftest.$ac_ext <<_ACEOF
8361/* confdefs.h. */ 9386/* confdefs.h. */
8362_ACEOF 9387_ACEOF
@@ -8367,41 +9392,37 @@ $ac_includes_default
8367#include <$ac_header> 9392#include <$ac_header>
8368_ACEOF 9393_ACEOF
8369rm -f conftest.$ac_objext 9394rm -f conftest.$ac_objext
8370if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 9395if { (ac_try="$ac_compile"
8371 (eval $ac_compile) 2>conftest.er1 9396case "(($ac_try" in
9397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9398 *) ac_try_echo=$ac_try;;
9399esac
9400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9401 (eval "$ac_compile") 2>conftest.er1
8372 ac_status=$? 9402 ac_status=$?
8373 grep -v '^ *+' conftest.er1 >conftest.err 9403 grep -v '^ *+' conftest.er1 >conftest.err
8374 rm -f conftest.er1 9404 rm -f conftest.er1
8375 cat conftest.err >&5 9405 cat conftest.err >&5
8376 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8377 (exit $ac_status); } && 9407 (exit $ac_status); } && {
8378 { ac_try='test -z "$ac_c_werror_flag" 9408 test -z "$ac_c_werror_flag" ||
8379 || test ! -s conftest.err' 9409 test ! -s conftest.err
8380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9410 } && test -s conftest.$ac_objext; then
8381 (eval $ac_try) 2>&5
8382 ac_status=$?
8383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8384 (exit $ac_status); }; } &&
8385 { ac_try='test -s conftest.$ac_objext'
8386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8387 (eval $ac_try) 2>&5
8388 ac_status=$?
8389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8390 (exit $ac_status); }; }; then
8391 ac_header_compiler=yes 9411 ac_header_compiler=yes
8392else 9412else
8393 echo "$as_me: failed program was:" >&5 9413 echo "$as_me: failed program was:" >&5
8394sed 's/^/| /' conftest.$ac_ext >&5 9414sed 's/^/| /' conftest.$ac_ext >&5
8395 9415
8396ac_header_compiler=no 9416 ac_header_compiler=no
8397fi 9417fi
8398rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 9418
8399echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 9419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8400echo "${ECHO_T}$ac_header_compiler" >&6 9420{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9421echo "${ECHO_T}$ac_header_compiler" >&6; }
8401 9422
8402# Is the header present? 9423# Is the header present?
8403echo "$as_me:$LINENO: checking $ac_header presence" >&5 9424{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
8404echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 9425echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8405cat >conftest.$ac_ext <<_ACEOF 9426cat >conftest.$ac_ext <<_ACEOF
8406/* confdefs.h. */ 9427/* confdefs.h. */
8407_ACEOF 9428_ACEOF
@@ -8410,24 +9431,22 @@ cat >>conftest.$ac_ext <<_ACEOF
8410/* end confdefs.h. */ 9431/* end confdefs.h. */
8411#include <$ac_header> 9432#include <$ac_header>
8412_ACEOF 9433_ACEOF
8413if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 9434if { (ac_try="$ac_cpp conftest.$ac_ext"
8414 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 9435case "(($ac_try" in
9436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9437 *) ac_try_echo=$ac_try;;
9438esac
9439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9440 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8415 ac_status=$? 9441 ac_status=$?
8416 grep -v '^ *+' conftest.er1 >conftest.err 9442 grep -v '^ *+' conftest.er1 >conftest.err
8417 rm -f conftest.er1 9443 rm -f conftest.er1
8418 cat conftest.err >&5 9444 cat conftest.err >&5
8419 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8420 (exit $ac_status); } >/dev/null; then 9446 (exit $ac_status); } >/dev/null && {
8421 if test -s conftest.err; then 9447 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8422 ac_cpp_err=$ac_c_preproc_warn_flag 9448 test ! -s conftest.err
8423 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 9449 }; then
8424 else
8425 ac_cpp_err=
8426 fi
8427else
8428 ac_cpp_err=yes
8429fi
8430if test -z "$ac_cpp_err"; then
8431 ac_header_preproc=yes 9450 ac_header_preproc=yes
8432else 9451else
8433 echo "$as_me: failed program was:" >&5 9452 echo "$as_me: failed program was:" >&5
@@ -8435,9 +9454,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
8435 9454
8436 ac_header_preproc=no 9455 ac_header_preproc=no
8437fi 9456fi
9457
8438rm -f conftest.err conftest.$ac_ext 9458rm -f conftest.err conftest.$ac_ext
8439echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 9459{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8440echo "${ECHO_T}$ac_header_preproc" >&6 9460echo "${ECHO_T}$ac_header_preproc" >&6; }
8441 9461
8442# So? What about this header? 9462# So? What about this header?
8443case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 9463case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -8461,25 +9481,24 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
8461echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 9481echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8462 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 9482 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8463echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 9483echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8464 ( 9484 ( cat <<\_ASBOX
8465 cat <<\_ASBOX
8466## ------------------------------------------- ## 9485## ------------------------------------------- ##
8467## Report this to openssh-unix-dev@mindrot.org ## 9486## Report this to openssh-unix-dev@mindrot.org ##
8468## ------------------------------------------- ## 9487## ------------------------------------------- ##
8469_ASBOX 9488_ASBOX
8470 ) | 9489 ) | sed "s/^/$as_me: WARNING: /" >&2
8471 sed "s/^/$as_me: WARNING: /" >&2
8472 ;; 9490 ;;
8473esac 9491esac
8474echo "$as_me:$LINENO: checking for $ac_header" >&5 9492{ echo "$as_me:$LINENO: checking for $ac_header" >&5
8475echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 9493echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8476if eval "test \"\${$as_ac_Header+set}\" = set"; then 9494if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8477 echo $ECHO_N "(cached) $ECHO_C" >&6 9495 echo $ECHO_N "(cached) $ECHO_C" >&6
8478else 9496else
8479 eval "$as_ac_Header=\$ac_header_preproc" 9497 eval "$as_ac_Header=\$ac_header_preproc"
8480fi 9498fi
8481echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 9499ac_res=`eval echo '${'$as_ac_Header'}'`
8482echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 9500 { echo "$as_me:$LINENO: result: $ac_res" >&5
9501echo "${ECHO_T}$ac_res" >&6; }
8483 9502
8484fi 9503fi
8485if test `eval echo '${'$as_ac_Header'}'` = yes; then 9504if test `eval echo '${'$as_ac_Header'}'` = yes; then
@@ -8493,8 +9512,8 @@ done
8493 9512
8494else 9513else
8495 9514
8496 echo "$as_me:$LINENO: checking for dirname in -lgen" >&5 9515 { echo "$as_me:$LINENO: checking for dirname in -lgen" >&5
8497echo $ECHO_N "checking for dirname in -lgen... $ECHO_C" >&6 9516echo $ECHO_N "checking for dirname in -lgen... $ECHO_C" >&6; }
8498if test "${ac_cv_lib_gen_dirname+set}" = set; then 9517if test "${ac_cv_lib_gen_dirname+set}" = set; then
8499 echo $ECHO_N "(cached) $ECHO_C" >&6 9518 echo $ECHO_N "(cached) $ECHO_C" >&6
8500else 9519else
@@ -8507,60 +9526,57 @@ cat confdefs.h >>conftest.$ac_ext
8507cat >>conftest.$ac_ext <<_ACEOF 9526cat >>conftest.$ac_ext <<_ACEOF
8508/* end confdefs.h. */ 9527/* end confdefs.h. */
8509 9528
8510/* Override any gcc2 internal prototype to avoid an error. */ 9529/* Override any GCC internal prototype to avoid an error.
9530 Use char because int might match the return type of a GCC
9531 builtin and then its argument prototype would still apply. */
8511#ifdef __cplusplus 9532#ifdef __cplusplus
8512extern "C" 9533extern "C"
8513#endif 9534#endif
8514/* We use char because int might match the return type of a gcc2
8515 builtin and then its argument prototype would still apply. */
8516char dirname (); 9535char dirname ();
8517int 9536int
8518main () 9537main ()
8519{ 9538{
8520dirname (); 9539return dirname ();
8521 ; 9540 ;
8522 return 0; 9541 return 0;
8523} 9542}
8524_ACEOF 9543_ACEOF
8525rm -f conftest.$ac_objext conftest$ac_exeext 9544rm -f conftest.$ac_objext conftest$ac_exeext
8526if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 9545if { (ac_try="$ac_link"
8527 (eval $ac_link) 2>conftest.er1 9546case "(($ac_try" in
9547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9548 *) ac_try_echo=$ac_try;;
9549esac
9550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9551 (eval "$ac_link") 2>conftest.er1
8528 ac_status=$? 9552 ac_status=$?
8529 grep -v '^ *+' conftest.er1 >conftest.err 9553 grep -v '^ *+' conftest.er1 >conftest.err
8530 rm -f conftest.er1 9554 rm -f conftest.er1
8531 cat conftest.err >&5 9555 cat conftest.err >&5
8532 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8533 (exit $ac_status); } && 9557 (exit $ac_status); } && {
8534 { ac_try='test -z "$ac_c_werror_flag" 9558 test -z "$ac_c_werror_flag" ||
8535 || test ! -s conftest.err' 9559 test ! -s conftest.err
8536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9560 } && test -s conftest$ac_exeext &&
8537 (eval $ac_try) 2>&5 9561 $as_test_x conftest$ac_exeext; then
8538 ac_status=$?
8539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8540 (exit $ac_status); }; } &&
8541 { ac_try='test -s conftest$ac_exeext'
8542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8543 (eval $ac_try) 2>&5
8544 ac_status=$?
8545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8546 (exit $ac_status); }; }; then
8547 ac_cv_lib_gen_dirname=yes 9562 ac_cv_lib_gen_dirname=yes
8548else 9563else
8549 echo "$as_me: failed program was:" >&5 9564 echo "$as_me: failed program was:" >&5
8550sed 's/^/| /' conftest.$ac_ext >&5 9565sed 's/^/| /' conftest.$ac_ext >&5
8551 9566
8552ac_cv_lib_gen_dirname=no 9567 ac_cv_lib_gen_dirname=no
8553fi 9568fi
8554rm -f conftest.err conftest.$ac_objext \ 9569
9570rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8555 conftest$ac_exeext conftest.$ac_ext 9571 conftest$ac_exeext conftest.$ac_ext
8556LIBS=$ac_check_lib_save_LIBS 9572LIBS=$ac_check_lib_save_LIBS
8557fi 9573fi
8558echo "$as_me:$LINENO: result: $ac_cv_lib_gen_dirname" >&5 9574{ echo "$as_me:$LINENO: result: $ac_cv_lib_gen_dirname" >&5
8559echo "${ECHO_T}$ac_cv_lib_gen_dirname" >&6 9575echo "${ECHO_T}$ac_cv_lib_gen_dirname" >&6; }
8560if test $ac_cv_lib_gen_dirname = yes; then 9576if test $ac_cv_lib_gen_dirname = yes; then
8561 9577
8562 echo "$as_me:$LINENO: checking for broken dirname" >&5 9578 { echo "$as_me:$LINENO: checking for broken dirname" >&5
8563echo $ECHO_N "checking for broken dirname... $ECHO_C" >&6 9579echo $ECHO_N "checking for broken dirname... $ECHO_C" >&6; }
8564if test "${ac_cv_have_broken_dirname+set}" = set; then 9580if test "${ac_cv_have_broken_dirname+set}" = set; then
8565 echo $ECHO_N "(cached) $ECHO_C" >&6 9581 echo $ECHO_N "(cached) $ECHO_C" >&6
8566else 9582else
@@ -8594,13 +9610,22 @@ int main(int argc, char **argv) {
8594 9610
8595_ACEOF 9611_ACEOF
8596rm -f conftest$ac_exeext 9612rm -f conftest$ac_exeext
8597if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 9613if { (ac_try="$ac_link"
8598 (eval $ac_link) 2>&5 9614case "(($ac_try" in
9615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9616 *) ac_try_echo=$ac_try;;
9617esac
9618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9619 (eval "$ac_link") 2>&5
8599 ac_status=$? 9620 ac_status=$?
8600 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8601 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 9622 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9623 { (case "(($ac_try" in
8603 (eval $ac_try) 2>&5 9624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9625 *) ac_try_echo=$ac_try;;
9626esac
9627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9628 (eval "$ac_try") 2>&5
8604 ac_status=$? 9629 ac_status=$?
8605 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8606 (exit $ac_status); }; }; then 9631 (exit $ac_status); }; }; then
@@ -8613,13 +9638,15 @@ sed 's/^/| /' conftest.$ac_ext >&5
8613( exit $ac_status ) 9638( exit $ac_status )
8614 ac_cv_have_broken_dirname="yes" 9639 ac_cv_have_broken_dirname="yes"
8615fi 9640fi
8616rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 9641rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8617fi 9642fi
9643
9644
8618 LIBS="$save_LIBS" 9645 LIBS="$save_LIBS"
8619 9646
8620fi 9647fi
8621echo "$as_me:$LINENO: result: $ac_cv_have_broken_dirname" >&5 9648{ echo "$as_me:$LINENO: result: $ac_cv_have_broken_dirname" >&5
8622echo "${ECHO_T}$ac_cv_have_broken_dirname" >&6 9649echo "${ECHO_T}$ac_cv_have_broken_dirname" >&6; }
8623 if test "x$ac_cv_have_broken_dirname" = "xno" ; then 9650 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
8624 LIBS="$LIBS -lgen" 9651 LIBS="$LIBS -lgen"
8625 cat >>confdefs.h <<\_ACEOF 9652 cat >>confdefs.h <<\_ACEOF
@@ -8630,18 +9657,19 @@ _ACEOF
8630for ac_header in libgen.h 9657for ac_header in libgen.h
8631do 9658do
8632as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 9659as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8633if eval "test \"\${$as_ac_Header+set}\" = set"; then 9660if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8634 echo "$as_me:$LINENO: checking for $ac_header" >&5 9661 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8635echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 9662echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8636if eval "test \"\${$as_ac_Header+set}\" = set"; then 9663if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8637 echo $ECHO_N "(cached) $ECHO_C" >&6 9664 echo $ECHO_N "(cached) $ECHO_C" >&6
8638fi 9665fi
8639echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 9666ac_res=`eval echo '${'$as_ac_Header'}'`
8640echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 9667 { echo "$as_me:$LINENO: result: $ac_res" >&5
9668echo "${ECHO_T}$ac_res" >&6; }
8641else 9669else
8642 # Is the header compilable? 9670 # Is the header compilable?
8643echo "$as_me:$LINENO: checking $ac_header usability" >&5 9671{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
8644echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 9672echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8645cat >conftest.$ac_ext <<_ACEOF 9673cat >conftest.$ac_ext <<_ACEOF
8646/* confdefs.h. */ 9674/* confdefs.h. */
8647_ACEOF 9675_ACEOF
@@ -8652,41 +9680,37 @@ $ac_includes_default
8652#include <$ac_header> 9680#include <$ac_header>
8653_ACEOF 9681_ACEOF
8654rm -f conftest.$ac_objext 9682rm -f conftest.$ac_objext
8655if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 9683if { (ac_try="$ac_compile"
8656 (eval $ac_compile) 2>conftest.er1 9684case "(($ac_try" in
9685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9686 *) ac_try_echo=$ac_try;;
9687esac
9688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9689 (eval "$ac_compile") 2>conftest.er1
8657 ac_status=$? 9690 ac_status=$?
8658 grep -v '^ *+' conftest.er1 >conftest.err 9691 grep -v '^ *+' conftest.er1 >conftest.err
8659 rm -f conftest.er1 9692 rm -f conftest.er1
8660 cat conftest.err >&5 9693 cat conftest.err >&5
8661 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8662 (exit $ac_status); } && 9695 (exit $ac_status); } && {
8663 { ac_try='test -z "$ac_c_werror_flag" 9696 test -z "$ac_c_werror_flag" ||
8664 || test ! -s conftest.err' 9697 test ! -s conftest.err
8665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9698 } && test -s conftest.$ac_objext; then
8666 (eval $ac_try) 2>&5
8667 ac_status=$?
8668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8669 (exit $ac_status); }; } &&
8670 { ac_try='test -s conftest.$ac_objext'
8671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8672 (eval $ac_try) 2>&5
8673 ac_status=$?
8674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8675 (exit $ac_status); }; }; then
8676 ac_header_compiler=yes 9699 ac_header_compiler=yes
8677else 9700else
8678 echo "$as_me: failed program was:" >&5 9701 echo "$as_me: failed program was:" >&5
8679sed 's/^/| /' conftest.$ac_ext >&5 9702sed 's/^/| /' conftest.$ac_ext >&5
8680 9703
8681ac_header_compiler=no 9704 ac_header_compiler=no
8682fi 9705fi
8683rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 9706
8684echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 9707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8685echo "${ECHO_T}$ac_header_compiler" >&6 9708{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9709echo "${ECHO_T}$ac_header_compiler" >&6; }
8686 9710
8687# Is the header present? 9711# Is the header present?
8688echo "$as_me:$LINENO: checking $ac_header presence" >&5 9712{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
8689echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 9713echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8690cat >conftest.$ac_ext <<_ACEOF 9714cat >conftest.$ac_ext <<_ACEOF
8691/* confdefs.h. */ 9715/* confdefs.h. */
8692_ACEOF 9716_ACEOF
@@ -8695,24 +9719,22 @@ cat >>conftest.$ac_ext <<_ACEOF
8695/* end confdefs.h. */ 9719/* end confdefs.h. */
8696#include <$ac_header> 9720#include <$ac_header>
8697_ACEOF 9721_ACEOF
8698if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 9722if { (ac_try="$ac_cpp conftest.$ac_ext"
8699 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 9723case "(($ac_try" in
9724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9725 *) ac_try_echo=$ac_try;;
9726esac
9727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9728 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8700 ac_status=$? 9729 ac_status=$?
8701 grep -v '^ *+' conftest.er1 >conftest.err 9730 grep -v '^ *+' conftest.er1 >conftest.err
8702 rm -f conftest.er1 9731 rm -f conftest.er1
8703 cat conftest.err >&5 9732 cat conftest.err >&5
8704 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8705 (exit $ac_status); } >/dev/null; then 9734 (exit $ac_status); } >/dev/null && {
8706 if test -s conftest.err; then 9735 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8707 ac_cpp_err=$ac_c_preproc_warn_flag 9736 test ! -s conftest.err
8708 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 9737 }; then
8709 else
8710 ac_cpp_err=
8711 fi
8712else
8713 ac_cpp_err=yes
8714fi
8715if test -z "$ac_cpp_err"; then
8716 ac_header_preproc=yes 9738 ac_header_preproc=yes
8717else 9739else
8718 echo "$as_me: failed program was:" >&5 9740 echo "$as_me: failed program was:" >&5
@@ -8720,9 +9742,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
8720 9742
8721 ac_header_preproc=no 9743 ac_header_preproc=no
8722fi 9744fi
9745
8723rm -f conftest.err conftest.$ac_ext 9746rm -f conftest.err conftest.$ac_ext
8724echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 9747{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8725echo "${ECHO_T}$ac_header_preproc" >&6 9748echo "${ECHO_T}$ac_header_preproc" >&6; }
8726 9749
8727# So? What about this header? 9750# So? What about this header?
8728case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 9751case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -8746,25 +9769,24 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
8746echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 9769echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8747 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 9770 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8748echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 9771echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8749 ( 9772 ( cat <<\_ASBOX
8750 cat <<\_ASBOX
8751## ------------------------------------------- ## 9773## ------------------------------------------- ##
8752## Report this to openssh-unix-dev@mindrot.org ## 9774## Report this to openssh-unix-dev@mindrot.org ##
8753## ------------------------------------------- ## 9775## ------------------------------------------- ##
8754_ASBOX 9776_ASBOX
8755 ) | 9777 ) | sed "s/^/$as_me: WARNING: /" >&2
8756 sed "s/^/$as_me: WARNING: /" >&2
8757 ;; 9778 ;;
8758esac 9779esac
8759echo "$as_me:$LINENO: checking for $ac_header" >&5 9780{ echo "$as_me:$LINENO: checking for $ac_header" >&5
8760echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 9781echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8761if eval "test \"\${$as_ac_Header+set}\" = set"; then 9782if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8762 echo $ECHO_N "(cached) $ECHO_C" >&6 9783 echo $ECHO_N "(cached) $ECHO_C" >&6
8763else 9784else
8764 eval "$as_ac_Header=\$ac_header_preproc" 9785 eval "$as_ac_Header=\$ac_header_preproc"
8765fi 9786fi
8766echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 9787ac_res=`eval echo '${'$as_ac_Header'}'`
8767echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 9788 { echo "$as_me:$LINENO: result: $ac_res" >&5
9789echo "${ECHO_T}$ac_res" >&6; }
8768 9790
8769fi 9791fi
8770if test `eval echo '${'$as_ac_Header'}'` = yes; then 9792if test `eval echo '${'$as_ac_Header'}'` = yes; then
@@ -8785,8 +9807,8 @@ fi
8785done 9807done
8786 9808
8787 9809
8788echo "$as_me:$LINENO: checking for getspnam" >&5 9810{ echo "$as_me:$LINENO: checking for getspnam" >&5
8789echo $ECHO_N "checking for getspnam... $ECHO_C" >&6 9811echo $ECHO_N "checking for getspnam... $ECHO_C" >&6; }
8790if test "${ac_cv_func_getspnam+set}" = set; then 9812if test "${ac_cv_func_getspnam+set}" = set; then
8791 echo $ECHO_N "(cached) $ECHO_C" >&6 9813 echo $ECHO_N "(cached) $ECHO_C" >&6
8792else 9814else
@@ -8813,73 +9835,64 @@ cat >>conftest.$ac_ext <<_ACEOF
8813 9835
8814#undef getspnam 9836#undef getspnam
8815 9837
8816/* Override any gcc2 internal prototype to avoid an error. */ 9838/* Override any GCC internal prototype to avoid an error.
9839 Use char because int might match the return type of a GCC
9840 builtin and then its argument prototype would still apply. */
8817#ifdef __cplusplus 9841#ifdef __cplusplus
8818extern "C" 9842extern "C"
8819{
8820#endif 9843#endif
8821/* We use char because int might match the return type of a gcc2
8822 builtin and then its argument prototype would still apply. */
8823char getspnam (); 9844char getspnam ();
8824/* The GNU C library defines this for functions which it implements 9845/* The GNU C library defines this for functions which it implements
8825 to always fail with ENOSYS. Some functions are actually named 9846 to always fail with ENOSYS. Some functions are actually named
8826 something starting with __ and the normal name is an alias. */ 9847 something starting with __ and the normal name is an alias. */
8827#if defined (__stub_getspnam) || defined (__stub___getspnam) 9848#if defined __stub_getspnam || defined __stub___getspnam
8828choke me 9849choke me
8829#else
8830char (*f) () = getspnam;
8831#endif
8832#ifdef __cplusplus
8833}
8834#endif 9850#endif
8835 9851
8836int 9852int
8837main () 9853main ()
8838{ 9854{
8839return f != getspnam; 9855return getspnam ();
8840 ; 9856 ;
8841 return 0; 9857 return 0;
8842} 9858}
8843_ACEOF 9859_ACEOF
8844rm -f conftest.$ac_objext conftest$ac_exeext 9860rm -f conftest.$ac_objext conftest$ac_exeext
8845if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 9861if { (ac_try="$ac_link"
8846 (eval $ac_link) 2>conftest.er1 9862case "(($ac_try" in
9863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9864 *) ac_try_echo=$ac_try;;
9865esac
9866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9867 (eval "$ac_link") 2>conftest.er1
8847 ac_status=$? 9868 ac_status=$?
8848 grep -v '^ *+' conftest.er1 >conftest.err 9869 grep -v '^ *+' conftest.er1 >conftest.err
8849 rm -f conftest.er1 9870 rm -f conftest.er1
8850 cat conftest.err >&5 9871 cat conftest.err >&5
8851 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8852 (exit $ac_status); } && 9873 (exit $ac_status); } && {
8853 { ac_try='test -z "$ac_c_werror_flag" 9874 test -z "$ac_c_werror_flag" ||
8854 || test ! -s conftest.err' 9875 test ! -s conftest.err
8855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9876 } && test -s conftest$ac_exeext &&
8856 (eval $ac_try) 2>&5 9877 $as_test_x conftest$ac_exeext; then
8857 ac_status=$?
8858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8859 (exit $ac_status); }; } &&
8860 { ac_try='test -s conftest$ac_exeext'
8861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8862 (eval $ac_try) 2>&5
8863 ac_status=$?
8864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8865 (exit $ac_status); }; }; then
8866 ac_cv_func_getspnam=yes 9878 ac_cv_func_getspnam=yes
8867else 9879else
8868 echo "$as_me: failed program was:" >&5 9880 echo "$as_me: failed program was:" >&5
8869sed 's/^/| /' conftest.$ac_ext >&5 9881sed 's/^/| /' conftest.$ac_ext >&5
8870 9882
8871ac_cv_func_getspnam=no 9883 ac_cv_func_getspnam=no
8872fi 9884fi
8873rm -f conftest.err conftest.$ac_objext \ 9885
9886rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8874 conftest$ac_exeext conftest.$ac_ext 9887 conftest$ac_exeext conftest.$ac_ext
8875fi 9888fi
8876echo "$as_me:$LINENO: result: $ac_cv_func_getspnam" >&5 9889{ echo "$as_me:$LINENO: result: $ac_cv_func_getspnam" >&5
8877echo "${ECHO_T}$ac_cv_func_getspnam" >&6 9890echo "${ECHO_T}$ac_cv_func_getspnam" >&6; }
8878if test $ac_cv_func_getspnam = yes; then 9891if test $ac_cv_func_getspnam = yes; then
8879 : 9892 :
8880else 9893else
8881 echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5 9894 { echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
8882echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6 9895echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6; }
8883if test "${ac_cv_lib_gen_getspnam+set}" = set; then 9896if test "${ac_cv_lib_gen_getspnam+set}" = set; then
8884 echo $ECHO_N "(cached) $ECHO_C" >&6 9897 echo $ECHO_N "(cached) $ECHO_C" >&6
8885else 9898else
@@ -8892,69 +9905,65 @@ cat confdefs.h >>conftest.$ac_ext
8892cat >>conftest.$ac_ext <<_ACEOF 9905cat >>conftest.$ac_ext <<_ACEOF
8893/* end confdefs.h. */ 9906/* end confdefs.h. */
8894 9907
8895/* Override any gcc2 internal prototype to avoid an error. */ 9908/* Override any GCC internal prototype to avoid an error.
9909 Use char because int might match the return type of a GCC
9910 builtin and then its argument prototype would still apply. */
8896#ifdef __cplusplus 9911#ifdef __cplusplus
8897extern "C" 9912extern "C"
8898#endif 9913#endif
8899/* We use char because int might match the return type of a gcc2
8900 builtin and then its argument prototype would still apply. */
8901char getspnam (); 9914char getspnam ();
8902int 9915int
8903main () 9916main ()
8904{ 9917{
8905getspnam (); 9918return getspnam ();
8906 ; 9919 ;
8907 return 0; 9920 return 0;
8908} 9921}
8909_ACEOF 9922_ACEOF
8910rm -f conftest.$ac_objext conftest$ac_exeext 9923rm -f conftest.$ac_objext conftest$ac_exeext
8911if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 9924if { (ac_try="$ac_link"
8912 (eval $ac_link) 2>conftest.er1 9925case "(($ac_try" in
9926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9927 *) ac_try_echo=$ac_try;;
9928esac
9929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9930 (eval "$ac_link") 2>conftest.er1
8913 ac_status=$? 9931 ac_status=$?
8914 grep -v '^ *+' conftest.er1 >conftest.err 9932 grep -v '^ *+' conftest.er1 >conftest.err
8915 rm -f conftest.er1 9933 rm -f conftest.er1
8916 cat conftest.err >&5 9934 cat conftest.err >&5
8917 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8918 (exit $ac_status); } && 9936 (exit $ac_status); } && {
8919 { ac_try='test -z "$ac_c_werror_flag" 9937 test -z "$ac_c_werror_flag" ||
8920 || test ! -s conftest.err' 9938 test ! -s conftest.err
8921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 9939 } && test -s conftest$ac_exeext &&
8922 (eval $ac_try) 2>&5 9940 $as_test_x conftest$ac_exeext; then
8923 ac_status=$?
8924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8925 (exit $ac_status); }; } &&
8926 { ac_try='test -s conftest$ac_exeext'
8927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8928 (eval $ac_try) 2>&5
8929 ac_status=$?
8930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8931 (exit $ac_status); }; }; then
8932 ac_cv_lib_gen_getspnam=yes 9941 ac_cv_lib_gen_getspnam=yes
8933else 9942else
8934 echo "$as_me: failed program was:" >&5 9943 echo "$as_me: failed program was:" >&5
8935sed 's/^/| /' conftest.$ac_ext >&5 9944sed 's/^/| /' conftest.$ac_ext >&5
8936 9945
8937ac_cv_lib_gen_getspnam=no 9946 ac_cv_lib_gen_getspnam=no
8938fi 9947fi
8939rm -f conftest.err conftest.$ac_objext \ 9948
9949rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8940 conftest$ac_exeext conftest.$ac_ext 9950 conftest$ac_exeext conftest.$ac_ext
8941LIBS=$ac_check_lib_save_LIBS 9951LIBS=$ac_check_lib_save_LIBS
8942fi 9952fi
8943echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5 9953{ echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
8944echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6 9954echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6; }
8945if test $ac_cv_lib_gen_getspnam = yes; then 9955if test $ac_cv_lib_gen_getspnam = yes; then
8946 LIBS="$LIBS -lgen" 9956 LIBS="$LIBS -lgen"
8947fi 9957fi
8948 9958
8949fi 9959fi
8950 9960
8951echo "$as_me:$LINENO: checking for library containing basename" >&5 9961{ echo "$as_me:$LINENO: checking for library containing basename" >&5
8952echo $ECHO_N "checking for library containing basename... $ECHO_C" >&6 9962echo $ECHO_N "checking for library containing basename... $ECHO_C" >&6; }
8953if test "${ac_cv_search_basename+set}" = set; then 9963if test "${ac_cv_search_basename+set}" = set; then
8954 echo $ECHO_N "(cached) $ECHO_C" >&6 9964 echo $ECHO_N "(cached) $ECHO_C" >&6
8955else 9965else
8956 ac_func_search_save_LIBS=$LIBS 9966 ac_func_search_save_LIBS=$LIBS
8957ac_cv_search_basename=no
8958cat >conftest.$ac_ext <<_ACEOF 9967cat >conftest.$ac_ext <<_ACEOF
8959/* confdefs.h. */ 9968/* confdefs.h. */
8960_ACEOF 9969_ACEOF
@@ -8962,115 +9971,73 @@ cat confdefs.h >>conftest.$ac_ext
8962cat >>conftest.$ac_ext <<_ACEOF 9971cat >>conftest.$ac_ext <<_ACEOF
8963/* end confdefs.h. */ 9972/* end confdefs.h. */
8964 9973
8965/* Override any gcc2 internal prototype to avoid an error. */ 9974/* Override any GCC internal prototype to avoid an error.
9975 Use char because int might match the return type of a GCC
9976 builtin and then its argument prototype would still apply. */
8966#ifdef __cplusplus 9977#ifdef __cplusplus
8967extern "C" 9978extern "C"
8968#endif 9979#endif
8969/* We use char because int might match the return type of a gcc2
8970 builtin and then its argument prototype would still apply. */
8971char basename (); 9980char basename ();
8972int 9981int
8973main () 9982main ()
8974{ 9983{
8975basename (); 9984return basename ();
8976 ; 9985 ;
8977 return 0; 9986 return 0;
8978} 9987}
8979_ACEOF 9988_ACEOF
8980rm -f conftest.$ac_objext conftest$ac_exeext 9989for ac_lib in '' gen; do
8981if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 9990 if test -z "$ac_lib"; then
8982 (eval $ac_link) 2>conftest.er1 9991 ac_res="none required"
9992 else
9993 ac_res=-l$ac_lib
9994 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9995 fi
9996 rm -f conftest.$ac_objext conftest$ac_exeext
9997if { (ac_try="$ac_link"
9998case "(($ac_try" in
9999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10000 *) ac_try_echo=$ac_try;;
10001esac
10002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10003 (eval "$ac_link") 2>conftest.er1
8983 ac_status=$? 10004 ac_status=$?
8984 grep -v '^ *+' conftest.er1 >conftest.err 10005 grep -v '^ *+' conftest.er1 >conftest.err
8985 rm -f conftest.er1 10006 rm -f conftest.er1
8986 cat conftest.err >&5 10007 cat conftest.err >&5
8987 echo "$as_me:$LINENO: \$? = $ac_status" >&5 10008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8988 (exit $ac_status); } && 10009 (exit $ac_status); } && {
8989 { ac_try='test -z "$ac_c_werror_flag" 10010 test -z "$ac_c_werror_flag" ||
8990 || test ! -s conftest.err' 10011 test ! -s conftest.err
8991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 10012 } && test -s conftest$ac_exeext &&
8992 (eval $ac_try) 2>&5 10013 $as_test_x conftest$ac_exeext; then
8993 ac_status=$? 10014 ac_cv_search_basename=$ac_res
8994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8995 (exit $ac_status); }; } &&
8996 { ac_try='test -s conftest$ac_exeext'
8997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8998 (eval $ac_try) 2>&5
8999 ac_status=$?
9000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9001 (exit $ac_status); }; }; then
9002 ac_cv_search_basename="none required"
9003else 10015else
9004 echo "$as_me: failed program was:" >&5 10016 echo "$as_me: failed program was:" >&5
9005sed 's/^/| /' conftest.$ac_ext >&5 10017sed 's/^/| /' conftest.$ac_ext >&5
9006 10018
9007fi
9008rm -f conftest.err conftest.$ac_objext \
9009 conftest$ac_exeext conftest.$ac_ext
9010if test "$ac_cv_search_basename" = no; then
9011 for ac_lib in gen; do
9012 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9013 cat >conftest.$ac_ext <<_ACEOF
9014/* confdefs.h. */
9015_ACEOF
9016cat confdefs.h >>conftest.$ac_ext
9017cat >>conftest.$ac_ext <<_ACEOF
9018/* end confdefs.h. */
9019 10019
9020/* Override any gcc2 internal prototype to avoid an error. */ 10020fi
9021#ifdef __cplusplus
9022extern "C"
9023#endif
9024/* We use char because int might match the return type of a gcc2
9025 builtin and then its argument prototype would still apply. */
9026char basename ();
9027int
9028main ()
9029{
9030basename ();
9031 ;
9032 return 0;
9033}
9034_ACEOF
9035rm -f conftest.$ac_objext conftest$ac_exeext
9036if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9037 (eval $ac_link) 2>conftest.er1
9038 ac_status=$?
9039 grep -v '^ *+' conftest.er1 >conftest.err
9040 rm -f conftest.er1
9041 cat conftest.err >&5
9042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9043 (exit $ac_status); } &&
9044 { ac_try='test -z "$ac_c_werror_flag"
9045 || test ! -s conftest.err'
9046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9047 (eval $ac_try) 2>&5
9048 ac_status=$?
9049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9050 (exit $ac_status); }; } &&
9051 { ac_try='test -s conftest$ac_exeext'
9052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9053 (eval $ac_try) 2>&5
9054 ac_status=$?
9055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9056 (exit $ac_status); }; }; then
9057 ac_cv_search_basename="-l$ac_lib"
9058break
9059else
9060 echo "$as_me: failed program was:" >&5
9061sed 's/^/| /' conftest.$ac_ext >&5
9062 10021
10022rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10023 conftest$ac_exeext
10024 if test "${ac_cv_search_basename+set}" = set; then
10025 break
9063fi 10026fi
9064rm -f conftest.err conftest.$ac_objext \ 10027done
9065 conftest$ac_exeext conftest.$ac_ext 10028if test "${ac_cv_search_basename+set}" = set; then
9066 done 10029 :
10030else
10031 ac_cv_search_basename=no
9067fi 10032fi
10033rm conftest.$ac_ext
9068LIBS=$ac_func_search_save_LIBS 10034LIBS=$ac_func_search_save_LIBS
9069fi 10035fi
9070echo "$as_me:$LINENO: result: $ac_cv_search_basename" >&5 10036{ echo "$as_me:$LINENO: result: $ac_cv_search_basename" >&5
9071echo "${ECHO_T}$ac_cv_search_basename" >&6 10037echo "${ECHO_T}$ac_cv_search_basename" >&6; }
9072if test "$ac_cv_search_basename" != no; then 10038ac_res=$ac_cv_search_basename
9073 test "$ac_cv_search_basename" = "none required" || LIBS="$ac_cv_search_basename $LIBS" 10039if test "$ac_res" != no; then
10040 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9074 10041
9075cat >>confdefs.h <<\_ACEOF 10042cat >>confdefs.h <<\_ACEOF
9076#define HAVE_BASENAME 1 10043#define HAVE_BASENAME 1
@@ -9080,10 +10047,9 @@ fi
9080 10047
9081 10048
9082 10049
9083# Check whether --with-zlib or --without-zlib was given. 10050# Check whether --with-zlib was given.
9084if test "${with_zlib+set}" = set; then 10051if test "${with_zlib+set}" = set; then
9085 withval="$with_zlib" 10052 withval=$with_zlib; if test "x$withval" = "xno" ; then
9086 if test "x$withval" = "xno" ; then
9087 { { echo "$as_me:$LINENO: error: *** zlib is required ***" >&5 10053 { { echo "$as_me:$LINENO: error: *** zlib is required ***" >&5
9088echo "$as_me: error: *** zlib is required ***" >&2;} 10054echo "$as_me: error: *** zlib is required ***" >&2;}
9089 { (exit 1); exit 1; }; } 10055 { (exit 1); exit 1; }; }
@@ -9108,11 +10074,12 @@ echo "$as_me: error: *** zlib is required ***" >&2;}
9108 fi 10074 fi
9109 fi 10075 fi
9110 10076
9111fi; 10077fi
10078
9112 10079
9113 10080
9114echo "$as_me:$LINENO: checking for deflate in -lz" >&5 10081{ echo "$as_me:$LINENO: checking for deflate in -lz" >&5
9115echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6 10082echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6; }
9116if test "${ac_cv_lib_z_deflate+set}" = set; then 10083if test "${ac_cv_lib_z_deflate+set}" = set; then
9117 echo $ECHO_N "(cached) $ECHO_C" >&6 10084 echo $ECHO_N "(cached) $ECHO_C" >&6
9118else 10085else
@@ -9125,56 +10092,53 @@ cat confdefs.h >>conftest.$ac_ext
9125cat >>conftest.$ac_ext <<_ACEOF 10092cat >>conftest.$ac_ext <<_ACEOF
9126/* end confdefs.h. */ 10093/* end confdefs.h. */
9127 10094
9128/* Override any gcc2 internal prototype to avoid an error. */ 10095/* Override any GCC internal prototype to avoid an error.
10096 Use char because int might match the return type of a GCC
10097 builtin and then its argument prototype would still apply. */
9129#ifdef __cplusplus 10098#ifdef __cplusplus
9130extern "C" 10099extern "C"
9131#endif 10100#endif
9132/* We use char because int might match the return type of a gcc2
9133 builtin and then its argument prototype would still apply. */
9134char deflate (); 10101char deflate ();
9135int 10102int
9136main () 10103main ()
9137{ 10104{
9138deflate (); 10105return deflate ();
9139 ; 10106 ;
9140 return 0; 10107 return 0;
9141} 10108}
9142_ACEOF 10109_ACEOF
9143rm -f conftest.$ac_objext conftest$ac_exeext 10110rm -f conftest.$ac_objext conftest$ac_exeext
9144if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 10111if { (ac_try="$ac_link"
9145 (eval $ac_link) 2>conftest.er1 10112case "(($ac_try" in
10113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10114 *) ac_try_echo=$ac_try;;
10115esac
10116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10117 (eval "$ac_link") 2>conftest.er1
9146 ac_status=$? 10118 ac_status=$?
9147 grep -v '^ *+' conftest.er1 >conftest.err 10119 grep -v '^ *+' conftest.er1 >conftest.err
9148 rm -f conftest.er1 10120 rm -f conftest.er1
9149 cat conftest.err >&5 10121 cat conftest.err >&5
9150 echo "$as_me:$LINENO: \$? = $ac_status" >&5 10122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9151 (exit $ac_status); } && 10123 (exit $ac_status); } && {
9152 { ac_try='test -z "$ac_c_werror_flag" 10124 test -z "$ac_c_werror_flag" ||
9153 || test ! -s conftest.err' 10125 test ! -s conftest.err
9154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 10126 } && test -s conftest$ac_exeext &&
9155 (eval $ac_try) 2>&5 10127 $as_test_x conftest$ac_exeext; then
9156 ac_status=$?
9157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9158 (exit $ac_status); }; } &&
9159 { ac_try='test -s conftest$ac_exeext'
9160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9161 (eval $ac_try) 2>&5
9162 ac_status=$?
9163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9164 (exit $ac_status); }; }; then
9165 ac_cv_lib_z_deflate=yes 10128 ac_cv_lib_z_deflate=yes
9166else 10129else
9167 echo "$as_me: failed program was:" >&5 10130 echo "$as_me: failed program was:" >&5
9168sed 's/^/| /' conftest.$ac_ext >&5 10131sed 's/^/| /' conftest.$ac_ext >&5
9169 10132
9170ac_cv_lib_z_deflate=no 10133 ac_cv_lib_z_deflate=no
9171fi 10134fi
9172rm -f conftest.err conftest.$ac_objext \ 10135
10136rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9173 conftest$ac_exeext conftest.$ac_ext 10137 conftest$ac_exeext conftest.$ac_ext
9174LIBS=$ac_check_lib_save_LIBS 10138LIBS=$ac_check_lib_save_LIBS
9175fi 10139fi
9176echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5 10140{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5
9177echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6 10141echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6; }
9178if test $ac_cv_lib_z_deflate = yes; then 10142if test $ac_cv_lib_z_deflate = yes; then
9179 cat >>confdefs.h <<_ACEOF 10143 cat >>confdefs.h <<_ACEOF
9180#define HAVE_LIBZ 1 10144#define HAVE_LIBZ 1
@@ -9201,43 +10165,39 @@ cat confdefs.h >>conftest.$ac_ext
9201cat >>conftest.$ac_ext <<_ACEOF 10165cat >>conftest.$ac_ext <<_ACEOF
9202/* end confdefs.h. */ 10166/* end confdefs.h. */
9203 10167
9204/* Override any gcc2 internal prototype to avoid an error. */ 10168/* Override any GCC internal prototype to avoid an error.
10169 Use char because int might match the return type of a GCC
10170 builtin and then its argument prototype would still apply. */
9205#ifdef __cplusplus 10171#ifdef __cplusplus
9206extern "C" 10172extern "C"
9207#endif 10173#endif
9208/* We use char because int might match the return type of a gcc2
9209 builtin and then its argument prototype would still apply. */
9210char deflate (); 10174char deflate ();
9211int 10175int
9212main () 10176main ()
9213{ 10177{
9214deflate (); 10178return deflate ();
9215 ; 10179 ;
9216 return 0; 10180 return 0;
9217} 10181}
9218_ACEOF 10182_ACEOF
9219rm -f conftest.$ac_objext conftest$ac_exeext 10183rm -f conftest.$ac_objext conftest$ac_exeext
9220if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 10184if { (ac_try="$ac_link"
9221 (eval $ac_link) 2>conftest.er1 10185case "(($ac_try" in
10186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10187 *) ac_try_echo=$ac_try;;
10188esac
10189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10190 (eval "$ac_link") 2>conftest.er1
9222 ac_status=$? 10191 ac_status=$?
9223 grep -v '^ *+' conftest.er1 >conftest.err 10192 grep -v '^ *+' conftest.er1 >conftest.err
9224 rm -f conftest.er1 10193 rm -f conftest.er1
9225 cat conftest.err >&5 10194 cat conftest.err >&5
9226 echo "$as_me:$LINENO: \$? = $ac_status" >&5 10195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9227 (exit $ac_status); } && 10196 (exit $ac_status); } && {
9228 { ac_try='test -z "$ac_c_werror_flag" 10197 test -z "$ac_c_werror_flag" ||
9229 || test ! -s conftest.err' 10198 test ! -s conftest.err
9230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 10199 } && test -s conftest$ac_exeext &&
9231 (eval $ac_try) 2>&5 10200 $as_test_x conftest$ac_exeext; then
9232 ac_status=$?
9233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9234 (exit $ac_status); }; } &&
9235 { ac_try='test -s conftest$ac_exeext'
9236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9237 (eval $ac_try) 2>&5
9238 ac_status=$?
9239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9240 (exit $ac_status); }; }; then
9241 cat >>confdefs.h <<\_ACEOF 10201 cat >>confdefs.h <<\_ACEOF
9242#define HAVE_LIBZ 1 10202#define HAVE_LIBZ 1
9243_ACEOF 10203_ACEOF
@@ -9253,24 +10213,25 @@ echo "$as_me: error: *** zlib missing - please install first or check config.log
9253 10213
9254 10214
9255fi 10215fi
9256rm -f conftest.err conftest.$ac_objext \ 10216
10217rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9257 conftest$ac_exeext conftest.$ac_ext 10218 conftest$ac_exeext conftest.$ac_ext
9258 10219
9259 10220
9260fi 10221fi
9261 10222
9262if test "${ac_cv_header_zlib_h+set}" = set; then 10223if test "${ac_cv_header_zlib_h+set}" = set; then
9263 echo "$as_me:$LINENO: checking for zlib.h" >&5 10224 { echo "$as_me:$LINENO: checking for zlib.h" >&5
9264echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 10225echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
9265if test "${ac_cv_header_zlib_h+set}" = set; then 10226if test "${ac_cv_header_zlib_h+set}" = set; then
9266 echo $ECHO_N "(cached) $ECHO_C" >&6 10227 echo $ECHO_N "(cached) $ECHO_C" >&6
9267fi 10228fi
9268echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 10229{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9269echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 10230echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
9270else 10231else
9271 # Is the header compilable? 10232 # Is the header compilable?
9272echo "$as_me:$LINENO: checking zlib.h usability" >&5 10233{ echo "$as_me:$LINENO: checking zlib.h usability" >&5
9273echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6 10234echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; }
9274cat >conftest.$ac_ext <<_ACEOF 10235cat >conftest.$ac_ext <<_ACEOF
9275/* confdefs.h. */ 10236/* confdefs.h. */
9276_ACEOF 10237_ACEOF
@@ -9281,41 +10242,37 @@ $ac_includes_default
9281#include <zlib.h> 10242#include <zlib.h>
9282_ACEOF 10243_ACEOF
9283rm -f conftest.$ac_objext 10244rm -f conftest.$ac_objext
9284if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 10245if { (ac_try="$ac_compile"
9285 (eval $ac_compile) 2>conftest.er1 10246case "(($ac_try" in
10247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10248 *) ac_try_echo=$ac_try;;
10249esac
10250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10251 (eval "$ac_compile") 2>conftest.er1
9286 ac_status=$? 10252 ac_status=$?
9287 grep -v '^ *+' conftest.er1 >conftest.err 10253 grep -v '^ *+' conftest.er1 >conftest.err
9288 rm -f conftest.er1 10254 rm -f conftest.er1
9289 cat conftest.err >&5 10255 cat conftest.err >&5
9290 echo "$as_me:$LINENO: \$? = $ac_status" >&5 10256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9291 (exit $ac_status); } && 10257 (exit $ac_status); } && {
9292 { ac_try='test -z "$ac_c_werror_flag" 10258 test -z "$ac_c_werror_flag" ||
9293 || test ! -s conftest.err' 10259 test ! -s conftest.err
9294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 10260 } && test -s conftest.$ac_objext; then
9295 (eval $ac_try) 2>&5
9296 ac_status=$?
9297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9298 (exit $ac_status); }; } &&
9299 { ac_try='test -s conftest.$ac_objext'
9300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9301 (eval $ac_try) 2>&5
9302 ac_status=$?
9303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9304 (exit $ac_status); }; }; then
9305 ac_header_compiler=yes 10261 ac_header_compiler=yes
9306else 10262else
9307 echo "$as_me: failed program was:" >&5 10263 echo "$as_me: failed program was:" >&5
9308sed 's/^/| /' conftest.$ac_ext >&5 10264sed 's/^/| /' conftest.$ac_ext >&5
9309 10265
9310ac_header_compiler=no 10266 ac_header_compiler=no
9311fi 10267fi
9312rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 10268
9313echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 10269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9314echo "${ECHO_T}$ac_header_compiler" >&6 10270{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10271echo "${ECHO_T}$ac_header_compiler" >&6; }
9315 10272
9316# Is the header present? 10273# Is the header present?
9317echo "$as_me:$LINENO: checking zlib.h presence" >&5 10274{ echo "$as_me:$LINENO: checking zlib.h presence" >&5
9318echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6 10275echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; }
9319cat >conftest.$ac_ext <<_ACEOF 10276cat >conftest.$ac_ext <<_ACEOF
9320/* confdefs.h. */ 10277/* confdefs.h. */
9321_ACEOF 10278_ACEOF
@@ -9324,24 +10281,22 @@ cat >>conftest.$ac_ext <<_ACEOF
9324/* end confdefs.h. */ 10281/* end confdefs.h. */
9325#include <zlib.h> 10282#include <zlib.h>
9326_ACEOF 10283_ACEOF
9327if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 10284if { (ac_try="$ac_cpp conftest.$ac_ext"
9328 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 10285case "(($ac_try" in
10286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10287 *) ac_try_echo=$ac_try;;
10288esac
10289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10290 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9329 ac_status=$? 10291 ac_status=$?
9330 grep -v '^ *+' conftest.er1 >conftest.err 10292 grep -v '^ *+' conftest.er1 >conftest.err
9331 rm -f conftest.er1 10293 rm -f conftest.er1
9332 cat conftest.err >&5 10294 cat conftest.err >&5
9333 echo "$as_me:$LINENO: \$? = $ac_status" >&5 10295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9334 (exit $ac_status); } >/dev/null; then 10296 (exit $ac_status); } >/dev/null && {
9335 if test -s conftest.err; then 10297 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9336 ac_cpp_err=$ac_c_preproc_warn_flag 10298 test ! -s conftest.err
9337 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 10299 }; then
9338 else
9339 ac_cpp_err=
9340 fi
9341else
9342 ac_cpp_err=yes
9343fi
9344if test -z "$ac_cpp_err"; then
9345 ac_header_preproc=yes 10300 ac_header_preproc=yes
9346else 10301else
9347 echo "$as_me: failed program was:" >&5 10302 echo "$as_me: failed program was:" >&5
@@ -9349,9 +10304,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
9349 10304
9350 ac_header_preproc=no 10305 ac_header_preproc=no
9351fi 10306fi
10307
9352rm -f conftest.err conftest.$ac_ext 10308rm -f conftest.err conftest.$ac_ext
9353echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 10309{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9354echo "${ECHO_T}$ac_header_preproc" >&6 10310echo "${ECHO_T}$ac_header_preproc" >&6; }
9355 10311
9356# So? What about this header? 10312# So? What about this header?
9357case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 10313case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -9375,25 +10331,23 @@ echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >
9375echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} 10331echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
9376 { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 10332 { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
9377echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} 10333echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
9378 ( 10334 ( cat <<\_ASBOX
9379 cat <<\_ASBOX
9380## ------------------------------------------- ## 10335## ------------------------------------------- ##
9381## Report this to openssh-unix-dev@mindrot.org ## 10336## Report this to openssh-unix-dev@mindrot.org ##
9382## ------------------------------------------- ## 10337## ------------------------------------------- ##
9383_ASBOX 10338_ASBOX
9384 ) | 10339 ) | sed "s/^/$as_me: WARNING: /" >&2
9385 sed "s/^/$as_me: WARNING: /" >&2
9386 ;; 10340 ;;
9387esac 10341esac
9388echo "$as_me:$LINENO: checking for zlib.h" >&5 10342{ echo "$as_me:$LINENO: checking for zlib.h" >&5
9389echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 10343echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
9390if test "${ac_cv_header_zlib_h+set}" = set; then 10344if test "${ac_cv_header_zlib_h+set}" = set; then
9391 echo $ECHO_N "(cached) $ECHO_C" >&6 10345 echo $ECHO_N "(cached) $ECHO_C" >&6
9392else 10346else
9393 ac_cv_header_zlib_h=$ac_header_preproc 10347 ac_cv_header_zlib_h=$ac_header_preproc
9394fi 10348fi
9395echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 10349{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9396echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 10350echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
9397 10351
9398fi 10352fi
9399if test $ac_cv_header_zlib_h = yes; then 10353if test $ac_cv_header_zlib_h = yes; then
@@ -9407,18 +10361,18 @@ fi
9407 10361
9408 10362
9409 10363
9410# Check whether --with-zlib-version-check or --without-zlib-version-check was given. 10364# Check whether --with-zlib-version-check was given.
9411if test "${with_zlib_version_check+set}" = set; then 10365if test "${with_zlib_version_check+set}" = set; then
9412 withval="$with_zlib_version_check" 10366 withval=$with_zlib_version_check; if test "x$withval" = "xno" ; then
9413 if test "x$withval" = "xno" ; then
9414 zlib_check_nonfatal=1 10367 zlib_check_nonfatal=1
9415 fi 10368 fi
9416 10369
9417 10370
9418fi; 10371fi
10372
9419 10373
9420echo "$as_me:$LINENO: checking for possibly buggy zlib" >&5 10374{ echo "$as_me:$LINENO: checking for possibly buggy zlib" >&5
9421echo $ECHO_N "checking for possibly buggy zlib... $ECHO_C" >&6 10375echo $ECHO_N "checking for possibly buggy zlib... $ECHO_C" >&6; }
9422if test "$cross_compiling" = yes; then 10376if test "$cross_compiling" = yes; then
9423 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking zlib version" >&5 10377 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking zlib version" >&5
9424echo "$as_me: WARNING: cross compiling: not checking zlib version" >&2;} 10378echo "$as_me: WARNING: cross compiling: not checking zlib version" >&2;}
@@ -9455,26 +10409,35 @@ int main()
9455 10409
9456_ACEOF 10410_ACEOF
9457rm -f conftest$ac_exeext 10411rm -f conftest$ac_exeext
9458if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 10412if { (ac_try="$ac_link"
9459 (eval $ac_link) 2>&5 10413case "(($ac_try" in
10414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10415 *) ac_try_echo=$ac_try;;
10416esac
10417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10418 (eval "$ac_link") 2>&5
9460 ac_status=$? 10419 ac_status=$?
9461 echo "$as_me:$LINENO: \$? = $ac_status" >&5 10420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9462 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 10421 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 10422 { (case "(($ac_try" in
9464 (eval $ac_try) 2>&5 10423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10424 *) ac_try_echo=$ac_try;;
10425esac
10426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10427 (eval "$ac_try") 2>&5
9465 ac_status=$? 10428 ac_status=$?
9466 echo "$as_me:$LINENO: \$? = $ac_status" >&5 10429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9467 (exit $ac_status); }; }; then 10430 (exit $ac_status); }; }; then
9468 echo "$as_me:$LINENO: result: no" >&5 10431 { echo "$as_me:$LINENO: result: no" >&5
9469echo "${ECHO_T}no" >&6 10432echo "${ECHO_T}no" >&6; }
9470else 10433else
9471 echo "$as_me: program exited with status $ac_status" >&5 10434 echo "$as_me: program exited with status $ac_status" >&5
9472echo "$as_me: failed program was:" >&5 10435echo "$as_me: failed program was:" >&5
9473sed 's/^/| /' conftest.$ac_ext >&5 10436sed 's/^/| /' conftest.$ac_ext >&5
9474 10437
9475( exit $ac_status ) 10438( exit $ac_status )
9476 echo "$as_me:$LINENO: result: yes" >&5 10439 { echo "$as_me:$LINENO: result: yes" >&5
9477echo "${ECHO_T}yes" >&6 10440echo "${ECHO_T}yes" >&6; }
9478 if test -z "$zlib_check_nonfatal" ; then 10441 if test -z "$zlib_check_nonfatal" ; then
9479 { { echo "$as_me:$LINENO: error: *** zlib too old - check config.log *** 10442 { { echo "$as_me:$LINENO: error: *** zlib too old - check config.log ***
9480Your reported zlib version has known security problems. It's possible your 10443Your reported zlib version has known security problems. It's possible your
@@ -9497,11 +10460,13 @@ echo "$as_me: WARNING: zlib version may have security problems" >&2;}
9497 fi 10460 fi
9498 10461
9499fi 10462fi
9500rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 10463rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9501fi 10464fi
9502 10465
9503echo "$as_me:$LINENO: checking for strcasecmp" >&5 10466
9504echo $ECHO_N "checking for strcasecmp... $ECHO_C" >&6 10467
10468{ echo "$as_me:$LINENO: checking for strcasecmp" >&5
10469echo $ECHO_N "checking for strcasecmp... $ECHO_C" >&6; }
9505if test "${ac_cv_func_strcasecmp+set}" = set; then 10470if test "${ac_cv_func_strcasecmp+set}" = set; then
9506 echo $ECHO_N "(cached) $ECHO_C" >&6 10471 echo $ECHO_N "(cached) $ECHO_C" >&6
9507else 10472else
@@ -9528,73 +10493,64 @@ cat >>conftest.$ac_ext <<_ACEOF
9528 10493
9529#undef strcasecmp 10494#undef strcasecmp
9530 10495
9531/* Override any gcc2 internal prototype to avoid an error. */ 10496/* Override any GCC internal prototype to avoid an error.
10497 Use char because int might match the return type of a GCC
10498 builtin and then its argument prototype would still apply. */
9532#ifdef __cplusplus 10499#ifdef __cplusplus
9533extern "C" 10500extern "C"
9534{
9535#endif 10501#endif
9536/* We use char because int might match the return type of a gcc2
9537 builtin and then its argument prototype would still apply. */
9538char strcasecmp (); 10502char strcasecmp ();
9539/* The GNU C library defines this for functions which it implements 10503/* The GNU C library defines this for functions which it implements
9540 to always fail with ENOSYS. Some functions are actually named 10504 to always fail with ENOSYS. Some functions are actually named
9541 something starting with __ and the normal name is an alias. */ 10505 something starting with __ and the normal name is an alias. */
9542#if defined (__stub_strcasecmp) || defined (__stub___strcasecmp) 10506#if defined __stub_strcasecmp || defined __stub___strcasecmp
9543choke me 10507choke me
9544#else
9545char (*f) () = strcasecmp;
9546#endif
9547#ifdef __cplusplus
9548}
9549#endif 10508#endif
9550 10509
9551int 10510int
9552main () 10511main ()
9553{ 10512{
9554return f != strcasecmp; 10513return strcasecmp ();
9555 ; 10514 ;
9556 return 0; 10515 return 0;
9557} 10516}
9558_ACEOF 10517_ACEOF
9559rm -f conftest.$ac_objext conftest$ac_exeext 10518rm -f conftest.$ac_objext conftest$ac_exeext
9560if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 10519if { (ac_try="$ac_link"
9561 (eval $ac_link) 2>conftest.er1 10520case "(($ac_try" in
10521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10522 *) ac_try_echo=$ac_try;;
10523esac
10524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10525 (eval "$ac_link") 2>conftest.er1
9562 ac_status=$? 10526 ac_status=$?
9563 grep -v '^ *+' conftest.er1 >conftest.err 10527 grep -v '^ *+' conftest.er1 >conftest.err
9564 rm -f conftest.er1 10528 rm -f conftest.er1
9565 cat conftest.err >&5 10529 cat conftest.err >&5
9566 echo "$as_me:$LINENO: \$? = $ac_status" >&5 10530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9567 (exit $ac_status); } && 10531 (exit $ac_status); } && {
9568 { ac_try='test -z "$ac_c_werror_flag" 10532 test -z "$ac_c_werror_flag" ||
9569 || test ! -s conftest.err' 10533 test ! -s conftest.err
9570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 10534 } && test -s conftest$ac_exeext &&
9571 (eval $ac_try) 2>&5 10535 $as_test_x conftest$ac_exeext; then
9572 ac_status=$?
9573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9574 (exit $ac_status); }; } &&
9575 { ac_try='test -s conftest$ac_exeext'
9576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9577 (eval $ac_try) 2>&5
9578 ac_status=$?
9579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9580 (exit $ac_status); }; }; then
9581 ac_cv_func_strcasecmp=yes 10536 ac_cv_func_strcasecmp=yes
9582else 10537else
9583 echo "$as_me: failed program was:" >&5 10538 echo "$as_me: failed program was:" >&5
9584sed 's/^/| /' conftest.$ac_ext >&5 10539sed 's/^/| /' conftest.$ac_ext >&5
9585 10540
9586ac_cv_func_strcasecmp=no 10541 ac_cv_func_strcasecmp=no
9587fi 10542fi
9588rm -f conftest.err conftest.$ac_objext \ 10543
10544rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9589 conftest$ac_exeext conftest.$ac_ext 10545 conftest$ac_exeext conftest.$ac_ext
9590fi 10546fi
9591echo "$as_me:$LINENO: result: $ac_cv_func_strcasecmp" >&5 10547{ echo "$as_me:$LINENO: result: $ac_cv_func_strcasecmp" >&5
9592echo "${ECHO_T}$ac_cv_func_strcasecmp" >&6 10548echo "${ECHO_T}$ac_cv_func_strcasecmp" >&6; }
9593if test $ac_cv_func_strcasecmp = yes; then 10549if test $ac_cv_func_strcasecmp = yes; then
9594 : 10550 :
9595else 10551else
9596 echo "$as_me:$LINENO: checking for strcasecmp in -lresolv" >&5 10552 { echo "$as_me:$LINENO: checking for strcasecmp in -lresolv" >&5
9597echo $ECHO_N "checking for strcasecmp in -lresolv... $ECHO_C" >&6 10553echo $ECHO_N "checking for strcasecmp in -lresolv... $ECHO_C" >&6; }
9598if test "${ac_cv_lib_resolv_strcasecmp+set}" = set; then 10554if test "${ac_cv_lib_resolv_strcasecmp+set}" = set; then
9599 echo $ECHO_N "(cached) $ECHO_C" >&6 10555 echo $ECHO_N "(cached) $ECHO_C" >&6
9600else 10556else
@@ -9607,56 +10563,53 @@ cat confdefs.h >>conftest.$ac_ext
9607cat >>conftest.$ac_ext <<_ACEOF 10563cat >>conftest.$ac_ext <<_ACEOF
9608/* end confdefs.h. */ 10564/* end confdefs.h. */
9609 10565
9610/* Override any gcc2 internal prototype to avoid an error. */ 10566/* Override any GCC internal prototype to avoid an error.
10567 Use char because int might match the return type of a GCC
10568 builtin and then its argument prototype would still apply. */
9611#ifdef __cplusplus 10569#ifdef __cplusplus
9612extern "C" 10570extern "C"
9613#endif 10571#endif
9614/* We use char because int might match the return type of a gcc2
9615 builtin and then its argument prototype would still apply. */
9616char strcasecmp (); 10572char strcasecmp ();
9617int 10573int
9618main () 10574main ()
9619{ 10575{
9620strcasecmp (); 10576return strcasecmp ();
9621 ; 10577 ;
9622 return 0; 10578 return 0;
9623} 10579}
9624_ACEOF 10580_ACEOF
9625rm -f conftest.$ac_objext conftest$ac_exeext 10581rm -f conftest.$ac_objext conftest$ac_exeext
9626if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 10582if { (ac_try="$ac_link"
9627 (eval $ac_link) 2>conftest.er1 10583case "(($ac_try" in
10584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10585 *) ac_try_echo=$ac_try;;
10586esac
10587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10588 (eval "$ac_link") 2>conftest.er1
9628 ac_status=$? 10589 ac_status=$?
9629 grep -v '^ *+' conftest.er1 >conftest.err 10590 grep -v '^ *+' conftest.er1 >conftest.err
9630 rm -f conftest.er1 10591 rm -f conftest.er1
9631 cat conftest.err >&5 10592 cat conftest.err >&5
9632 echo "$as_me:$LINENO: \$? = $ac_status" >&5 10593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9633 (exit $ac_status); } && 10594 (exit $ac_status); } && {
9634 { ac_try='test -z "$ac_c_werror_flag" 10595 test -z "$ac_c_werror_flag" ||
9635 || test ! -s conftest.err' 10596 test ! -s conftest.err
9636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 10597 } && test -s conftest$ac_exeext &&
9637 (eval $ac_try) 2>&5 10598 $as_test_x conftest$ac_exeext; then
9638 ac_status=$?
9639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9640 (exit $ac_status); }; } &&
9641 { ac_try='test -s conftest$ac_exeext'
9642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9643 (eval $ac_try) 2>&5
9644 ac_status=$?
9645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9646 (exit $ac_status); }; }; then
9647 ac_cv_lib_resolv_strcasecmp=yes 10599 ac_cv_lib_resolv_strcasecmp=yes
9648else 10600else
9649 echo "$as_me: failed program was:" >&5 10601 echo "$as_me: failed program was:" >&5
9650sed 's/^/| /' conftest.$ac_ext >&5 10602sed 's/^/| /' conftest.$ac_ext >&5
9651 10603
9652ac_cv_lib_resolv_strcasecmp=no 10604 ac_cv_lib_resolv_strcasecmp=no
9653fi 10605fi
9654rm -f conftest.err conftest.$ac_objext \ 10606
10607rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9655 conftest$ac_exeext conftest.$ac_ext 10608 conftest$ac_exeext conftest.$ac_ext
9656LIBS=$ac_check_lib_save_LIBS 10609LIBS=$ac_check_lib_save_LIBS
9657fi 10610fi
9658echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_strcasecmp" >&5 10611{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_strcasecmp" >&5
9659echo "${ECHO_T}$ac_cv_lib_resolv_strcasecmp" >&6 10612echo "${ECHO_T}$ac_cv_lib_resolv_strcasecmp" >&6; }
9660if test $ac_cv_lib_resolv_strcasecmp = yes; then 10613if test $ac_cv_lib_resolv_strcasecmp = yes; then
9661 LIBS="$LIBS -lresolv" 10614 LIBS="$LIBS -lresolv"
9662fi 10615fi
@@ -9668,9 +10621,9 @@ fi
9668for ac_func in utimes 10621for ac_func in utimes
9669do 10622do
9670as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 10623as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9671echo "$as_me:$LINENO: checking for $ac_func" >&5 10624{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9672echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 10625echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9673if eval "test \"\${$as_ac_var+set}\" = set"; then 10626if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9674 echo $ECHO_N "(cached) $ECHO_C" >&6 10627 echo $ECHO_N "(cached) $ECHO_C" >&6
9675else 10628else
9676 cat >conftest.$ac_ext <<_ACEOF 10629 cat >conftest.$ac_ext <<_ACEOF
@@ -9696,76 +10649,68 @@ cat >>conftest.$ac_ext <<_ACEOF
9696 10649
9697#undef $ac_func 10650#undef $ac_func
9698 10651
9699/* Override any gcc2 internal prototype to avoid an error. */ 10652/* Override any GCC internal prototype to avoid an error.
10653 Use char because int might match the return type of a GCC
10654 builtin and then its argument prototype would still apply. */
9700#ifdef __cplusplus 10655#ifdef __cplusplus
9701extern "C" 10656extern "C"
9702{
9703#endif 10657#endif
9704/* We use char because int might match the return type of a gcc2
9705 builtin and then its argument prototype would still apply. */
9706char $ac_func (); 10658char $ac_func ();
9707/* The GNU C library defines this for functions which it implements 10659/* The GNU C library defines this for functions which it implements
9708 to always fail with ENOSYS. Some functions are actually named 10660 to always fail with ENOSYS. Some functions are actually named
9709 something starting with __ and the normal name is an alias. */ 10661 something starting with __ and the normal name is an alias. */
9710#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 10662#if defined __stub_$ac_func || defined __stub___$ac_func
9711choke me 10663choke me
9712#else
9713char (*f) () = $ac_func;
9714#endif
9715#ifdef __cplusplus
9716}
9717#endif 10664#endif
9718 10665
9719int 10666int
9720main () 10667main ()
9721{ 10668{
9722return f != $ac_func; 10669return $ac_func ();
9723 ; 10670 ;
9724 return 0; 10671 return 0;
9725} 10672}
9726_ACEOF 10673_ACEOF
9727rm -f conftest.$ac_objext conftest$ac_exeext 10674rm -f conftest.$ac_objext conftest$ac_exeext
9728if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 10675if { (ac_try="$ac_link"
9729 (eval $ac_link) 2>conftest.er1 10676case "(($ac_try" in
10677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10678 *) ac_try_echo=$ac_try;;
10679esac
10680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10681 (eval "$ac_link") 2>conftest.er1
9730 ac_status=$? 10682 ac_status=$?
9731 grep -v '^ *+' conftest.er1 >conftest.err 10683 grep -v '^ *+' conftest.er1 >conftest.err
9732 rm -f conftest.er1 10684 rm -f conftest.er1
9733 cat conftest.err >&5 10685 cat conftest.err >&5
9734 echo "$as_me:$LINENO: \$? = $ac_status" >&5 10686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9735 (exit $ac_status); } && 10687 (exit $ac_status); } && {
9736 { ac_try='test -z "$ac_c_werror_flag" 10688 test -z "$ac_c_werror_flag" ||
9737 || test ! -s conftest.err' 10689 test ! -s conftest.err
9738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 10690 } && test -s conftest$ac_exeext &&
9739 (eval $ac_try) 2>&5 10691 $as_test_x conftest$ac_exeext; then
9740 ac_status=$?
9741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9742 (exit $ac_status); }; } &&
9743 { ac_try='test -s conftest$ac_exeext'
9744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9745 (eval $ac_try) 2>&5
9746 ac_status=$?
9747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9748 (exit $ac_status); }; }; then
9749 eval "$as_ac_var=yes" 10692 eval "$as_ac_var=yes"
9750else 10693else
9751 echo "$as_me: failed program was:" >&5 10694 echo "$as_me: failed program was:" >&5
9752sed 's/^/| /' conftest.$ac_ext >&5 10695sed 's/^/| /' conftest.$ac_ext >&5
9753 10696
9754eval "$as_ac_var=no" 10697 eval "$as_ac_var=no"
9755fi 10698fi
9756rm -f conftest.err conftest.$ac_objext \ 10699
10700rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9757 conftest$ac_exeext conftest.$ac_ext 10701 conftest$ac_exeext conftest.$ac_ext
9758fi 10702fi
9759echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 10703ac_res=`eval echo '${'$as_ac_var'}'`
9760echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 10704 { echo "$as_me:$LINENO: result: $ac_res" >&5
10705echo "${ECHO_T}$ac_res" >&6; }
9761if test `eval echo '${'$as_ac_var'}'` = yes; then 10706if test `eval echo '${'$as_ac_var'}'` = yes; then
9762 cat >>confdefs.h <<_ACEOF 10707 cat >>confdefs.h <<_ACEOF
9763#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 10708#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9764_ACEOF 10709_ACEOF
9765 10710
9766else 10711else
9767 echo "$as_me:$LINENO: checking for utimes in -lc89" >&5 10712 { echo "$as_me:$LINENO: checking for utimes in -lc89" >&5
9768echo $ECHO_N "checking for utimes in -lc89... $ECHO_C" >&6 10713echo $ECHO_N "checking for utimes in -lc89... $ECHO_C" >&6; }
9769if test "${ac_cv_lib_c89_utimes+set}" = set; then 10714if test "${ac_cv_lib_c89_utimes+set}" = set; then
9770 echo $ECHO_N "(cached) $ECHO_C" >&6 10715 echo $ECHO_N "(cached) $ECHO_C" >&6
9771else 10716else
@@ -9778,56 +10723,53 @@ cat confdefs.h >>conftest.$ac_ext
9778cat >>conftest.$ac_ext <<_ACEOF 10723cat >>conftest.$ac_ext <<_ACEOF
9779/* end confdefs.h. */ 10724/* end confdefs.h. */
9780 10725
9781/* Override any gcc2 internal prototype to avoid an error. */ 10726/* Override any GCC internal prototype to avoid an error.
10727 Use char because int might match the return type of a GCC
10728 builtin and then its argument prototype would still apply. */
9782#ifdef __cplusplus 10729#ifdef __cplusplus
9783extern "C" 10730extern "C"
9784#endif 10731#endif
9785/* We use char because int might match the return type of a gcc2
9786 builtin and then its argument prototype would still apply. */
9787char utimes (); 10732char utimes ();
9788int 10733int
9789main () 10734main ()
9790{ 10735{
9791utimes (); 10736return utimes ();
9792 ; 10737 ;
9793 return 0; 10738 return 0;
9794} 10739}
9795_ACEOF 10740_ACEOF
9796rm -f conftest.$ac_objext conftest$ac_exeext 10741rm -f conftest.$ac_objext conftest$ac_exeext
9797if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 10742if { (ac_try="$ac_link"
9798 (eval $ac_link) 2>conftest.er1 10743case "(($ac_try" in
10744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10745 *) ac_try_echo=$ac_try;;
10746esac
10747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10748 (eval "$ac_link") 2>conftest.er1
9799 ac_status=$? 10749 ac_status=$?
9800 grep -v '^ *+' conftest.er1 >conftest.err 10750 grep -v '^ *+' conftest.er1 >conftest.err
9801 rm -f conftest.er1 10751 rm -f conftest.er1
9802 cat conftest.err >&5 10752 cat conftest.err >&5
9803 echo "$as_me:$LINENO: \$? = $ac_status" >&5 10753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9804 (exit $ac_status); } && 10754 (exit $ac_status); } && {
9805 { ac_try='test -z "$ac_c_werror_flag" 10755 test -z "$ac_c_werror_flag" ||
9806 || test ! -s conftest.err' 10756 test ! -s conftest.err
9807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 10757 } && test -s conftest$ac_exeext &&
9808 (eval $ac_try) 2>&5 10758 $as_test_x conftest$ac_exeext; then
9809 ac_status=$?
9810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9811 (exit $ac_status); }; } &&
9812 { ac_try='test -s conftest$ac_exeext'
9813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9814 (eval $ac_try) 2>&5
9815 ac_status=$?
9816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9817 (exit $ac_status); }; }; then
9818 ac_cv_lib_c89_utimes=yes 10759 ac_cv_lib_c89_utimes=yes
9819else 10760else
9820 echo "$as_me: failed program was:" >&5 10761 echo "$as_me: failed program was:" >&5
9821sed 's/^/| /' conftest.$ac_ext >&5 10762sed 's/^/| /' conftest.$ac_ext >&5
9822 10763
9823ac_cv_lib_c89_utimes=no 10764 ac_cv_lib_c89_utimes=no
9824fi 10765fi
9825rm -f conftest.err conftest.$ac_objext \ 10766
10767rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9826 conftest$ac_exeext conftest.$ac_ext 10768 conftest$ac_exeext conftest.$ac_ext
9827LIBS=$ac_check_lib_save_LIBS 10769LIBS=$ac_check_lib_save_LIBS
9828fi 10770fi
9829echo "$as_me:$LINENO: result: $ac_cv_lib_c89_utimes" >&5 10771{ echo "$as_me:$LINENO: result: $ac_cv_lib_c89_utimes" >&5
9830echo "${ECHO_T}$ac_cv_lib_c89_utimes" >&6 10772echo "${ECHO_T}$ac_cv_lib_c89_utimes" >&6; }
9831if test $ac_cv_lib_c89_utimes = yes; then 10773if test $ac_cv_lib_c89_utimes = yes; then
9832 cat >>confdefs.h <<\_ACEOF 10774 cat >>confdefs.h <<\_ACEOF
9833#define HAVE_UTIMES 1 10775#define HAVE_UTIMES 1
@@ -9845,18 +10787,19 @@ done
9845for ac_header in libutil.h 10787for ac_header in libutil.h
9846do 10788do
9847as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 10789as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9848if eval "test \"\${$as_ac_Header+set}\" = set"; then 10790if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9849 echo "$as_me:$LINENO: checking for $ac_header" >&5 10791 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9850echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 10792echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9851if eval "test \"\${$as_ac_Header+set}\" = set"; then 10793if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9852 echo $ECHO_N "(cached) $ECHO_C" >&6 10794 echo $ECHO_N "(cached) $ECHO_C" >&6
9853fi 10795fi
9854echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 10796ac_res=`eval echo '${'$as_ac_Header'}'`
9855echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 10797 { echo "$as_me:$LINENO: result: $ac_res" >&5
10798echo "${ECHO_T}$ac_res" >&6; }
9856else 10799else
9857 # Is the header compilable? 10800 # Is the header compilable?
9858echo "$as_me:$LINENO: checking $ac_header usability" >&5 10801{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
9859echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 10802echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9860cat >conftest.$ac_ext <<_ACEOF 10803cat >conftest.$ac_ext <<_ACEOF
9861/* confdefs.h. */ 10804/* confdefs.h. */
9862_ACEOF 10805_ACEOF
@@ -9867,41 +10810,37 @@ $ac_includes_default
9867#include <$ac_header> 10810#include <$ac_header>
9868_ACEOF 10811_ACEOF
9869rm -f conftest.$ac_objext 10812rm -f conftest.$ac_objext
9870if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 10813if { (ac_try="$ac_compile"
9871 (eval $ac_compile) 2>conftest.er1 10814case "(($ac_try" in
10815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10816 *) ac_try_echo=$ac_try;;
10817esac
10818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10819 (eval "$ac_compile") 2>conftest.er1
9872 ac_status=$? 10820 ac_status=$?
9873 grep -v '^ *+' conftest.er1 >conftest.err 10821 grep -v '^ *+' conftest.er1 >conftest.err
9874 rm -f conftest.er1 10822 rm -f conftest.er1
9875 cat conftest.err >&5 10823 cat conftest.err >&5
9876 echo "$as_me:$LINENO: \$? = $ac_status" >&5 10824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9877 (exit $ac_status); } && 10825 (exit $ac_status); } && {
9878 { ac_try='test -z "$ac_c_werror_flag" 10826 test -z "$ac_c_werror_flag" ||
9879 || test ! -s conftest.err' 10827 test ! -s conftest.err
9880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 10828 } && test -s conftest.$ac_objext; then
9881 (eval $ac_try) 2>&5
9882 ac_status=$?
9883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9884 (exit $ac_status); }; } &&
9885 { ac_try='test -s conftest.$ac_objext'
9886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9887 (eval $ac_try) 2>&5
9888 ac_status=$?
9889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9890 (exit $ac_status); }; }; then
9891 ac_header_compiler=yes 10829 ac_header_compiler=yes
9892else 10830else
9893 echo "$as_me: failed program was:" >&5 10831 echo "$as_me: failed program was:" >&5
9894sed 's/^/| /' conftest.$ac_ext >&5 10832sed 's/^/| /' conftest.$ac_ext >&5
9895 10833
9896ac_header_compiler=no 10834 ac_header_compiler=no
9897fi 10835fi
9898rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 10836
9899echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 10837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9900echo "${ECHO_T}$ac_header_compiler" >&6 10838{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10839echo "${ECHO_T}$ac_header_compiler" >&6; }
9901 10840
9902# Is the header present? 10841# Is the header present?
9903echo "$as_me:$LINENO: checking $ac_header presence" >&5 10842{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
9904echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 10843echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9905cat >conftest.$ac_ext <<_ACEOF 10844cat >conftest.$ac_ext <<_ACEOF
9906/* confdefs.h. */ 10845/* confdefs.h. */
9907_ACEOF 10846_ACEOF
@@ -9910,24 +10849,22 @@ cat >>conftest.$ac_ext <<_ACEOF
9910/* end confdefs.h. */ 10849/* end confdefs.h. */
9911#include <$ac_header> 10850#include <$ac_header>
9912_ACEOF 10851_ACEOF
9913if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 10852if { (ac_try="$ac_cpp conftest.$ac_ext"
9914 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 10853case "(($ac_try" in
10854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10855 *) ac_try_echo=$ac_try;;
10856esac
10857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10858 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9915 ac_status=$? 10859 ac_status=$?
9916 grep -v '^ *+' conftest.er1 >conftest.err 10860 grep -v '^ *+' conftest.er1 >conftest.err
9917 rm -f conftest.er1 10861 rm -f conftest.er1
9918 cat conftest.err >&5 10862 cat conftest.err >&5
9919 echo "$as_me:$LINENO: \$? = $ac_status" >&5 10863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9920 (exit $ac_status); } >/dev/null; then 10864 (exit $ac_status); } >/dev/null && {
9921 if test -s conftest.err; then 10865 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9922 ac_cpp_err=$ac_c_preproc_warn_flag 10866 test ! -s conftest.err
9923 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 10867 }; then
9924 else
9925 ac_cpp_err=
9926 fi
9927else
9928 ac_cpp_err=yes
9929fi
9930if test -z "$ac_cpp_err"; then
9931 ac_header_preproc=yes 10868 ac_header_preproc=yes
9932else 10869else
9933 echo "$as_me: failed program was:" >&5 10870 echo "$as_me: failed program was:" >&5
@@ -9935,9 +10872,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
9935 10872
9936 ac_header_preproc=no 10873 ac_header_preproc=no
9937fi 10874fi
10875
9938rm -f conftest.err conftest.$ac_ext 10876rm -f conftest.err conftest.$ac_ext
9939echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 10877{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9940echo "${ECHO_T}$ac_header_preproc" >&6 10878echo "${ECHO_T}$ac_header_preproc" >&6; }
9941 10879
9942# So? What about this header? 10880# So? What about this header?
9943case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 10881case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -9961,25 +10899,24 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
9961echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 10899echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9962 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 10900 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9963echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 10901echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9964 ( 10902 ( cat <<\_ASBOX
9965 cat <<\_ASBOX
9966## ------------------------------------------- ## 10903## ------------------------------------------- ##
9967## Report this to openssh-unix-dev@mindrot.org ## 10904## Report this to openssh-unix-dev@mindrot.org ##
9968## ------------------------------------------- ## 10905## ------------------------------------------- ##
9969_ASBOX 10906_ASBOX
9970 ) | 10907 ) | sed "s/^/$as_me: WARNING: /" >&2
9971 sed "s/^/$as_me: WARNING: /" >&2
9972 ;; 10908 ;;
9973esac 10909esac
9974echo "$as_me:$LINENO: checking for $ac_header" >&5 10910{ echo "$as_me:$LINENO: checking for $ac_header" >&5
9975echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 10911echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9976if eval "test \"\${$as_ac_Header+set}\" = set"; then 10912if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9977 echo $ECHO_N "(cached) $ECHO_C" >&6 10913 echo $ECHO_N "(cached) $ECHO_C" >&6
9978else 10914else
9979 eval "$as_ac_Header=\$ac_header_preproc" 10915 eval "$as_ac_Header=\$ac_header_preproc"
9980fi 10916fi
9981echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 10917ac_res=`eval echo '${'$as_ac_Header'}'`
9982echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 10918 { echo "$as_me:$LINENO: result: $ac_res" >&5
10919echo "${ECHO_T}$ac_res" >&6; }
9983 10920
9984fi 10921fi
9985if test `eval echo '${'$as_ac_Header'}'` = yes; then 10922if test `eval echo '${'$as_ac_Header'}'` = yes; then
@@ -9991,13 +10928,12 @@ fi
9991 10928
9992done 10929done
9993 10930
9994echo "$as_me:$LINENO: checking for library containing login" >&5 10931{ echo "$as_me:$LINENO: checking for library containing login" >&5
9995echo $ECHO_N "checking for library containing login... $ECHO_C" >&6 10932echo $ECHO_N "checking for library containing login... $ECHO_C" >&6; }
9996if test "${ac_cv_search_login+set}" = set; then 10933if test "${ac_cv_search_login+set}" = set; then
9997 echo $ECHO_N "(cached) $ECHO_C" >&6 10934 echo $ECHO_N "(cached) $ECHO_C" >&6
9998else 10935else
9999 ac_func_search_save_LIBS=$LIBS 10936 ac_func_search_save_LIBS=$LIBS
10000ac_cv_search_login=no
10001cat >conftest.$ac_ext <<_ACEOF 10937cat >conftest.$ac_ext <<_ACEOF
10002/* confdefs.h. */ 10938/* confdefs.h. */
10003_ACEOF 10939_ACEOF
@@ -10005,115 +10941,73 @@ cat confdefs.h >>conftest.$ac_ext
10005cat >>conftest.$ac_ext <<_ACEOF 10941cat >>conftest.$ac_ext <<_ACEOF
10006/* end confdefs.h. */ 10942/* end confdefs.h. */
10007 10943
10008/* Override any gcc2 internal prototype to avoid an error. */ 10944/* Override any GCC internal prototype to avoid an error.
10945 Use char because int might match the return type of a GCC
10946 builtin and then its argument prototype would still apply. */
10009#ifdef __cplusplus 10947#ifdef __cplusplus
10010extern "C" 10948extern "C"
10011#endif 10949#endif
10012/* We use char because int might match the return type of a gcc2
10013 builtin and then its argument prototype would still apply. */
10014char login (); 10950char login ();
10015int 10951int
10016main () 10952main ()
10017{ 10953{
10018login (); 10954return login ();
10019 ; 10955 ;
10020 return 0; 10956 return 0;
10021} 10957}
10022_ACEOF 10958_ACEOF
10023rm -f conftest.$ac_objext conftest$ac_exeext 10959for ac_lib in '' util bsd; do
10024if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 10960 if test -z "$ac_lib"; then
10025 (eval $ac_link) 2>conftest.er1 10961 ac_res="none required"
10962 else
10963 ac_res=-l$ac_lib
10964 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10965 fi
10966 rm -f conftest.$ac_objext conftest$ac_exeext
10967if { (ac_try="$ac_link"
10968case "(($ac_try" in
10969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10970 *) ac_try_echo=$ac_try;;
10971esac
10972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10973 (eval "$ac_link") 2>conftest.er1
10026 ac_status=$? 10974 ac_status=$?
10027 grep -v '^ *+' conftest.er1 >conftest.err 10975 grep -v '^ *+' conftest.er1 >conftest.err
10028 rm -f conftest.er1 10976 rm -f conftest.er1
10029 cat conftest.err >&5 10977 cat conftest.err >&5
10030 echo "$as_me:$LINENO: \$? = $ac_status" >&5 10978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10031 (exit $ac_status); } && 10979 (exit $ac_status); } && {
10032 { ac_try='test -z "$ac_c_werror_flag" 10980 test -z "$ac_c_werror_flag" ||
10033 || test ! -s conftest.err' 10981 test ! -s conftest.err
10034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 10982 } && test -s conftest$ac_exeext &&
10035 (eval $ac_try) 2>&5 10983 $as_test_x conftest$ac_exeext; then
10036 ac_status=$? 10984 ac_cv_search_login=$ac_res
10037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10038 (exit $ac_status); }; } &&
10039 { ac_try='test -s conftest$ac_exeext'
10040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10041 (eval $ac_try) 2>&5
10042 ac_status=$?
10043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10044 (exit $ac_status); }; }; then
10045 ac_cv_search_login="none required"
10046else 10985else
10047 echo "$as_me: failed program was:" >&5 10986 echo "$as_me: failed program was:" >&5
10048sed 's/^/| /' conftest.$ac_ext >&5 10987sed 's/^/| /' conftest.$ac_ext >&5
10049 10988
10050fi
10051rm -f conftest.err conftest.$ac_objext \
10052 conftest$ac_exeext conftest.$ac_ext
10053if test "$ac_cv_search_login" = no; then
10054 for ac_lib in util bsd; do
10055 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10056 cat >conftest.$ac_ext <<_ACEOF
10057/* confdefs.h. */
10058_ACEOF
10059cat confdefs.h >>conftest.$ac_ext
10060cat >>conftest.$ac_ext <<_ACEOF
10061/* end confdefs.h. */
10062 10989
10063/* Override any gcc2 internal prototype to avoid an error. */ 10990fi
10064#ifdef __cplusplus
10065extern "C"
10066#endif
10067/* We use char because int might match the return type of a gcc2
10068 builtin and then its argument prototype would still apply. */
10069char login ();
10070int
10071main ()
10072{
10073login ();
10074 ;
10075 return 0;
10076}
10077_ACEOF
10078rm -f conftest.$ac_objext conftest$ac_exeext
10079if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10080 (eval $ac_link) 2>conftest.er1
10081 ac_status=$?
10082 grep -v '^ *+' conftest.er1 >conftest.err
10083 rm -f conftest.er1
10084 cat conftest.err >&5
10085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10086 (exit $ac_status); } &&
10087 { ac_try='test -z "$ac_c_werror_flag"
10088 || test ! -s conftest.err'
10089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10090 (eval $ac_try) 2>&5
10091 ac_status=$?
10092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10093 (exit $ac_status); }; } &&
10094 { ac_try='test -s conftest$ac_exeext'
10095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10096 (eval $ac_try) 2>&5
10097 ac_status=$?
10098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10099 (exit $ac_status); }; }; then
10100 ac_cv_search_login="-l$ac_lib"
10101break
10102else
10103 echo "$as_me: failed program was:" >&5
10104sed 's/^/| /' conftest.$ac_ext >&5
10105 10991
10992rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10993 conftest$ac_exeext
10994 if test "${ac_cv_search_login+set}" = set; then
10995 break
10106fi 10996fi
10107rm -f conftest.err conftest.$ac_objext \ 10997done
10108 conftest$ac_exeext conftest.$ac_ext 10998if test "${ac_cv_search_login+set}" = set; then
10109 done 10999 :
11000else
11001 ac_cv_search_login=no
10110fi 11002fi
11003rm conftest.$ac_ext
10111LIBS=$ac_func_search_save_LIBS 11004LIBS=$ac_func_search_save_LIBS
10112fi 11005fi
10113echo "$as_me:$LINENO: result: $ac_cv_search_login" >&5 11006{ echo "$as_me:$LINENO: result: $ac_cv_search_login" >&5
10114echo "${ECHO_T}$ac_cv_search_login" >&6 11007echo "${ECHO_T}$ac_cv_search_login" >&6; }
10115if test "$ac_cv_search_login" != no; then 11008ac_res=$ac_cv_search_login
10116 test "$ac_cv_search_login" = "none required" || LIBS="$ac_cv_search_login $LIBS" 11009if test "$ac_res" != no; then
11010 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10117 11011
10118cat >>confdefs.h <<\_ACEOF 11012cat >>confdefs.h <<\_ACEOF
10119#define HAVE_LOGIN 1 11013#define HAVE_LOGIN 1
@@ -10127,9 +11021,9 @@ fi
10127for ac_func in logout updwtmp logwtmp 11021for ac_func in logout updwtmp logwtmp
10128do 11022do
10129as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 11023as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10130echo "$as_me:$LINENO: checking for $ac_func" >&5 11024{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10131echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 11025echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10132if eval "test \"\${$as_ac_var+set}\" = set"; then 11026if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10133 echo $ECHO_N "(cached) $ECHO_C" >&6 11027 echo $ECHO_N "(cached) $ECHO_C" >&6
10134else 11028else
10135 cat >conftest.$ac_ext <<_ACEOF 11029 cat >conftest.$ac_ext <<_ACEOF
@@ -10155,68 +11049,60 @@ cat >>conftest.$ac_ext <<_ACEOF
10155 11049
10156#undef $ac_func 11050#undef $ac_func
10157 11051
10158/* Override any gcc2 internal prototype to avoid an error. */ 11052/* Override any GCC internal prototype to avoid an error.
11053 Use char because int might match the return type of a GCC
11054 builtin and then its argument prototype would still apply. */
10159#ifdef __cplusplus 11055#ifdef __cplusplus
10160extern "C" 11056extern "C"
10161{
10162#endif 11057#endif
10163/* We use char because int might match the return type of a gcc2
10164 builtin and then its argument prototype would still apply. */
10165char $ac_func (); 11058char $ac_func ();
10166/* The GNU C library defines this for functions which it implements 11059/* The GNU C library defines this for functions which it implements
10167 to always fail with ENOSYS. Some functions are actually named 11060 to always fail with ENOSYS. Some functions are actually named
10168 something starting with __ and the normal name is an alias. */ 11061 something starting with __ and the normal name is an alias. */
10169#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 11062#if defined __stub_$ac_func || defined __stub___$ac_func
10170choke me 11063choke me
10171#else
10172char (*f) () = $ac_func;
10173#endif
10174#ifdef __cplusplus
10175}
10176#endif 11064#endif
10177 11065
10178int 11066int
10179main () 11067main ()
10180{ 11068{
10181return f != $ac_func; 11069return $ac_func ();
10182 ; 11070 ;
10183 return 0; 11071 return 0;
10184} 11072}
10185_ACEOF 11073_ACEOF
10186rm -f conftest.$ac_objext conftest$ac_exeext 11074rm -f conftest.$ac_objext conftest$ac_exeext
10187if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 11075if { (ac_try="$ac_link"
10188 (eval $ac_link) 2>conftest.er1 11076case "(($ac_try" in
11077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11078 *) ac_try_echo=$ac_try;;
11079esac
11080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11081 (eval "$ac_link") 2>conftest.er1
10189 ac_status=$? 11082 ac_status=$?
10190 grep -v '^ *+' conftest.er1 >conftest.err 11083 grep -v '^ *+' conftest.er1 >conftest.err
10191 rm -f conftest.er1 11084 rm -f conftest.er1
10192 cat conftest.err >&5 11085 cat conftest.err >&5
10193 echo "$as_me:$LINENO: \$? = $ac_status" >&5 11086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10194 (exit $ac_status); } && 11087 (exit $ac_status); } && {
10195 { ac_try='test -z "$ac_c_werror_flag" 11088 test -z "$ac_c_werror_flag" ||
10196 || test ! -s conftest.err' 11089 test ! -s conftest.err
10197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 11090 } && test -s conftest$ac_exeext &&
10198 (eval $ac_try) 2>&5 11091 $as_test_x conftest$ac_exeext; then
10199 ac_status=$?
10200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10201 (exit $ac_status); }; } &&
10202 { ac_try='test -s conftest$ac_exeext'
10203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10204 (eval $ac_try) 2>&5
10205 ac_status=$?
10206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10207 (exit $ac_status); }; }; then
10208 eval "$as_ac_var=yes" 11092 eval "$as_ac_var=yes"
10209else 11093else
10210 echo "$as_me: failed program was:" >&5 11094 echo "$as_me: failed program was:" >&5
10211sed 's/^/| /' conftest.$ac_ext >&5 11095sed 's/^/| /' conftest.$ac_ext >&5
10212 11096
10213eval "$as_ac_var=no" 11097 eval "$as_ac_var=no"
10214fi 11098fi
10215rm -f conftest.err conftest.$ac_objext \ 11099
11100rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10216 conftest$ac_exeext conftest.$ac_ext 11101 conftest$ac_exeext conftest.$ac_ext
10217fi 11102fi
10218echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 11103ac_res=`eval echo '${'$as_ac_var'}'`
10219echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 11104 { echo "$as_me:$LINENO: result: $ac_res" >&5
11105echo "${ECHO_T}$ac_res" >&6; }
10220if test `eval echo '${'$as_ac_var'}'` = yes; then 11106if test `eval echo '${'$as_ac_var'}'` = yes; then
10221 cat >>confdefs.h <<_ACEOF 11107 cat >>confdefs.h <<_ACEOF
10222#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 11108#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -10230,9 +11116,9 @@ done
10230for ac_func in strftime 11116for ac_func in strftime
10231do 11117do
10232as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 11118as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10233echo "$as_me:$LINENO: checking for $ac_func" >&5 11119{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10234echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 11120echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10235if eval "test \"\${$as_ac_var+set}\" = set"; then 11121if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10236 echo $ECHO_N "(cached) $ECHO_C" >&6 11122 echo $ECHO_N "(cached) $ECHO_C" >&6
10237else 11123else
10238 cat >conftest.$ac_ext <<_ACEOF 11124 cat >conftest.$ac_ext <<_ACEOF
@@ -10258,68 +11144,60 @@ cat >>conftest.$ac_ext <<_ACEOF
10258 11144
10259#undef $ac_func 11145#undef $ac_func
10260 11146
10261/* Override any gcc2 internal prototype to avoid an error. */ 11147/* Override any GCC internal prototype to avoid an error.
11148 Use char because int might match the return type of a GCC
11149 builtin and then its argument prototype would still apply. */
10262#ifdef __cplusplus 11150#ifdef __cplusplus
10263extern "C" 11151extern "C"
10264{
10265#endif 11152#endif
10266/* We use char because int might match the return type of a gcc2
10267 builtin and then its argument prototype would still apply. */
10268char $ac_func (); 11153char $ac_func ();
10269/* The GNU C library defines this for functions which it implements 11154/* The GNU C library defines this for functions which it implements
10270 to always fail with ENOSYS. Some functions are actually named 11155 to always fail with ENOSYS. Some functions are actually named
10271 something starting with __ and the normal name is an alias. */ 11156 something starting with __ and the normal name is an alias. */
10272#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 11157#if defined __stub_$ac_func || defined __stub___$ac_func
10273choke me 11158choke me
10274#else
10275char (*f) () = $ac_func;
10276#endif
10277#ifdef __cplusplus
10278}
10279#endif 11159#endif
10280 11160
10281int 11161int
10282main () 11162main ()
10283{ 11163{
10284return f != $ac_func; 11164return $ac_func ();
10285 ; 11165 ;
10286 return 0; 11166 return 0;
10287} 11167}
10288_ACEOF 11168_ACEOF
10289rm -f conftest.$ac_objext conftest$ac_exeext 11169rm -f conftest.$ac_objext conftest$ac_exeext
10290if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 11170if { (ac_try="$ac_link"
10291 (eval $ac_link) 2>conftest.er1 11171case "(($ac_try" in
11172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11173 *) ac_try_echo=$ac_try;;
11174esac
11175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11176 (eval "$ac_link") 2>conftest.er1
10292 ac_status=$? 11177 ac_status=$?
10293 grep -v '^ *+' conftest.er1 >conftest.err 11178 grep -v '^ *+' conftest.er1 >conftest.err
10294 rm -f conftest.er1 11179 rm -f conftest.er1
10295 cat conftest.err >&5 11180 cat conftest.err >&5
10296 echo "$as_me:$LINENO: \$? = $ac_status" >&5 11181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10297 (exit $ac_status); } && 11182 (exit $ac_status); } && {
10298 { ac_try='test -z "$ac_c_werror_flag" 11183 test -z "$ac_c_werror_flag" ||
10299 || test ! -s conftest.err' 11184 test ! -s conftest.err
10300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 11185 } && test -s conftest$ac_exeext &&
10301 (eval $ac_try) 2>&5 11186 $as_test_x conftest$ac_exeext; then
10302 ac_status=$?
10303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10304 (exit $ac_status); }; } &&
10305 { ac_try='test -s conftest$ac_exeext'
10306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10307 (eval $ac_try) 2>&5
10308 ac_status=$?
10309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10310 (exit $ac_status); }; }; then
10311 eval "$as_ac_var=yes" 11187 eval "$as_ac_var=yes"
10312else 11188else
10313 echo "$as_me: failed program was:" >&5 11189 echo "$as_me: failed program was:" >&5
10314sed 's/^/| /' conftest.$ac_ext >&5 11190sed 's/^/| /' conftest.$ac_ext >&5
10315 11191
10316eval "$as_ac_var=no" 11192 eval "$as_ac_var=no"
10317fi 11193fi
10318rm -f conftest.err conftest.$ac_objext \ 11194
11195rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10319 conftest$ac_exeext conftest.$ac_ext 11196 conftest$ac_exeext conftest.$ac_ext
10320fi 11197fi
10321echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 11198ac_res=`eval echo '${'$as_ac_var'}'`
10322echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 11199 { echo "$as_me:$LINENO: result: $ac_res" >&5
11200echo "${ECHO_T}$ac_res" >&6; }
10323if test `eval echo '${'$as_ac_var'}'` = yes; then 11201if test `eval echo '${'$as_ac_var'}'` = yes; then
10324 cat >>confdefs.h <<_ACEOF 11202 cat >>confdefs.h <<_ACEOF
10325#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 11203#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -10327,8 +11205,8 @@ _ACEOF
10327 11205
10328else 11206else
10329 # strftime is in -lintl on SCO UNIX. 11207 # strftime is in -lintl on SCO UNIX.
10330echo "$as_me:$LINENO: checking for strftime in -lintl" >&5 11208{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
10331echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6 11209echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
10332if test "${ac_cv_lib_intl_strftime+set}" = set; then 11210if test "${ac_cv_lib_intl_strftime+set}" = set; then
10333 echo $ECHO_N "(cached) $ECHO_C" >&6 11211 echo $ECHO_N "(cached) $ECHO_C" >&6
10334else 11212else
@@ -10341,56 +11219,53 @@ cat confdefs.h >>conftest.$ac_ext
10341cat >>conftest.$ac_ext <<_ACEOF 11219cat >>conftest.$ac_ext <<_ACEOF
10342/* end confdefs.h. */ 11220/* end confdefs.h. */
10343 11221
10344/* Override any gcc2 internal prototype to avoid an error. */ 11222/* Override any GCC internal prototype to avoid an error.
11223 Use char because int might match the return type of a GCC
11224 builtin and then its argument prototype would still apply. */
10345#ifdef __cplusplus 11225#ifdef __cplusplus
10346extern "C" 11226extern "C"
10347#endif 11227#endif
10348/* We use char because int might match the return type of a gcc2
10349 builtin and then its argument prototype would still apply. */
10350char strftime (); 11228char strftime ();
10351int 11229int
10352main () 11230main ()
10353{ 11231{
10354strftime (); 11232return strftime ();
10355 ; 11233 ;
10356 return 0; 11234 return 0;
10357} 11235}
10358_ACEOF 11236_ACEOF
10359rm -f conftest.$ac_objext conftest$ac_exeext 11237rm -f conftest.$ac_objext conftest$ac_exeext
10360if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 11238if { (ac_try="$ac_link"
10361 (eval $ac_link) 2>conftest.er1 11239case "(($ac_try" in
11240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11241 *) ac_try_echo=$ac_try;;
11242esac
11243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11244 (eval "$ac_link") 2>conftest.er1
10362 ac_status=$? 11245 ac_status=$?
10363 grep -v '^ *+' conftest.er1 >conftest.err 11246 grep -v '^ *+' conftest.er1 >conftest.err
10364 rm -f conftest.er1 11247 rm -f conftest.er1
10365 cat conftest.err >&5 11248 cat conftest.err >&5
10366 echo "$as_me:$LINENO: \$? = $ac_status" >&5 11249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10367 (exit $ac_status); } && 11250 (exit $ac_status); } && {
10368 { ac_try='test -z "$ac_c_werror_flag" 11251 test -z "$ac_c_werror_flag" ||
10369 || test ! -s conftest.err' 11252 test ! -s conftest.err
10370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 11253 } && test -s conftest$ac_exeext &&
10371 (eval $ac_try) 2>&5 11254 $as_test_x conftest$ac_exeext; then
10372 ac_status=$?
10373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10374 (exit $ac_status); }; } &&
10375 { ac_try='test -s conftest$ac_exeext'
10376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10377 (eval $ac_try) 2>&5
10378 ac_status=$?
10379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10380 (exit $ac_status); }; }; then
10381 ac_cv_lib_intl_strftime=yes 11255 ac_cv_lib_intl_strftime=yes
10382else 11256else
10383 echo "$as_me: failed program was:" >&5 11257 echo "$as_me: failed program was:" >&5
10384sed 's/^/| /' conftest.$ac_ext >&5 11258sed 's/^/| /' conftest.$ac_ext >&5
10385 11259
10386ac_cv_lib_intl_strftime=no 11260 ac_cv_lib_intl_strftime=no
10387fi 11261fi
10388rm -f conftest.err conftest.$ac_objext \ 11262
11263rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10389 conftest$ac_exeext conftest.$ac_ext 11264 conftest$ac_exeext conftest.$ac_ext
10390LIBS=$ac_check_lib_save_LIBS 11265LIBS=$ac_check_lib_save_LIBS
10391fi 11266fi
10392echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5 11267{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
10393echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6 11268echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
10394if test $ac_cv_lib_intl_strftime = yes; then 11269if test $ac_cv_lib_intl_strftime = yes; then
10395 cat >>confdefs.h <<\_ACEOF 11270 cat >>confdefs.h <<\_ACEOF
10396#define HAVE_STRFTIME 1 11271#define HAVE_STRFTIME 1
@@ -10404,8 +11279,8 @@ done
10404 11279
10405 11280
10406# Check for ALTDIRFUNC glob() extension 11281# Check for ALTDIRFUNC glob() extension
10407echo "$as_me:$LINENO: checking for GLOB_ALTDIRFUNC support" >&5 11282{ echo "$as_me:$LINENO: checking for GLOB_ALTDIRFUNC support" >&5
10408echo $ECHO_N "checking for GLOB_ALTDIRFUNC support... $ECHO_C" >&6 11283echo $ECHO_N "checking for GLOB_ALTDIRFUNC support... $ECHO_C" >&6; }
10409cat >conftest.$ac_ext <<_ACEOF 11284cat >conftest.$ac_ext <<_ACEOF
10410/* confdefs.h. */ 11285/* confdefs.h. */
10411_ACEOF 11286_ACEOF
@@ -10427,13 +11302,13 @@ cat >>confdefs.h <<\_ACEOF
10427#define GLOB_HAS_ALTDIRFUNC 1 11302#define GLOB_HAS_ALTDIRFUNC 1
10428_ACEOF 11303_ACEOF
10429 11304
10430 echo "$as_me:$LINENO: result: yes" >&5 11305 { echo "$as_me:$LINENO: result: yes" >&5
10431echo "${ECHO_T}yes" >&6 11306echo "${ECHO_T}yes" >&6; }
10432 11307
10433else 11308else
10434 11309
10435 echo "$as_me:$LINENO: result: no" >&5 11310 { echo "$as_me:$LINENO: result: no" >&5
10436echo "${ECHO_T}no" >&6 11311echo "${ECHO_T}no" >&6; }
10437 11312
10438 11313
10439fi 11314fi
@@ -10441,42 +11316,134 @@ rm -f conftest*
10441 11316
10442 11317
10443# Check for g.gl_matchc glob() extension 11318# Check for g.gl_matchc glob() extension
10444echo "$as_me:$LINENO: checking for gl_matchc field in glob_t" >&5 11319{ echo "$as_me:$LINENO: checking for gl_matchc field in glob_t" >&5
10445echo $ECHO_N "checking for gl_matchc field in glob_t... $ECHO_C" >&6 11320echo $ECHO_N "checking for gl_matchc field in glob_t... $ECHO_C" >&6; }
10446cat >conftest.$ac_ext <<_ACEOF 11321cat >conftest.$ac_ext <<_ACEOF
10447/* confdefs.h. */ 11322/* confdefs.h. */
10448_ACEOF 11323_ACEOF
10449cat confdefs.h >>conftest.$ac_ext 11324cat confdefs.h >>conftest.$ac_ext
10450cat >>conftest.$ac_ext <<_ACEOF 11325cat >>conftest.$ac_ext <<_ACEOF
10451/* end confdefs.h. */ 11326/* end confdefs.h. */
10452 11327 #include <glob.h>
10453 #include <glob.h> 11328int
10454 int main(void){glob_t g; g.gl_matchc = 1;} 11329main ()
10455 11330{
11331glob_t g; g.gl_matchc = 1;
11332 ;
11333 return 0;
11334}
10456_ACEOF 11335_ACEOF
10457if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 11336rm -f conftest.$ac_objext
10458 $EGREP "FOUNDIT" >/dev/null 2>&1; then 11337if { (ac_try="$ac_compile"
11338case "(($ac_try" in
11339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11340 *) ac_try_echo=$ac_try;;
11341esac
11342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11343 (eval "$ac_compile") 2>conftest.er1
11344 ac_status=$?
11345 grep -v '^ *+' conftest.er1 >conftest.err
11346 rm -f conftest.er1
11347 cat conftest.err >&5
11348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11349 (exit $ac_status); } && {
11350 test -z "$ac_c_werror_flag" ||
11351 test ! -s conftest.err
11352 } && test -s conftest.$ac_objext; then
10459 11353
10460 11354
10461cat >>confdefs.h <<\_ACEOF 11355cat >>confdefs.h <<\_ACEOF
10462#define GLOB_HAS_GL_MATCHC 1 11356#define GLOB_HAS_GL_MATCHC 1
10463_ACEOF 11357_ACEOF
10464 11358
10465 echo "$as_me:$LINENO: result: yes" >&5 11359 { echo "$as_me:$LINENO: result: yes" >&5
10466echo "${ECHO_T}yes" >&6 11360echo "${ECHO_T}yes" >&6; }
10467 11361
10468else 11362else
11363 echo "$as_me: failed program was:" >&5
11364sed 's/^/| /' conftest.$ac_ext >&5
11365
10469 11366
10470 echo "$as_me:$LINENO: result: no" >&5 11367 { echo "$as_me:$LINENO: result: no" >&5
10471echo "${ECHO_T}no" >&6 11368echo "${ECHO_T}no" >&6; }
10472 11369
10473 11370
10474fi 11371fi
10475rm -f conftest*
10476 11372
11373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11374
11375{ echo "$as_me:$LINENO: checking whether GLOB_NOMATCH is declared" >&5
11376echo $ECHO_N "checking whether GLOB_NOMATCH is declared... $ECHO_C" >&6; }
11377if test "${ac_cv_have_decl_GLOB_NOMATCH+set}" = set; then
11378 echo $ECHO_N "(cached) $ECHO_C" >&6
11379else
11380 cat >conftest.$ac_ext <<_ACEOF
11381/* confdefs.h. */
11382_ACEOF
11383cat confdefs.h >>conftest.$ac_ext
11384cat >>conftest.$ac_ext <<_ACEOF
11385/* end confdefs.h. */
11386#include <glob.h>
10477 11387
10478echo "$as_me:$LINENO: checking whether struct dirent allocates space for d_name" >&5 11388int
10479echo $ECHO_N "checking whether struct dirent allocates space for d_name... $ECHO_C" >&6 11389main ()
11390{
11391#ifndef GLOB_NOMATCH
11392 (void) GLOB_NOMATCH;
11393#endif
11394
11395 ;
11396 return 0;
11397}
11398_ACEOF
11399rm -f conftest.$ac_objext
11400if { (ac_try="$ac_compile"
11401case "(($ac_try" in
11402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11403 *) ac_try_echo=$ac_try;;
11404esac
11405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11406 (eval "$ac_compile") 2>conftest.er1
11407 ac_status=$?
11408 grep -v '^ *+' conftest.er1 >conftest.err
11409 rm -f conftest.er1
11410 cat conftest.err >&5
11411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11412 (exit $ac_status); } && {
11413 test -z "$ac_c_werror_flag" ||
11414 test ! -s conftest.err
11415 } && test -s conftest.$ac_objext; then
11416 ac_cv_have_decl_GLOB_NOMATCH=yes
11417else
11418 echo "$as_me: failed program was:" >&5
11419sed 's/^/| /' conftest.$ac_ext >&5
11420
11421 ac_cv_have_decl_GLOB_NOMATCH=no
11422fi
11423
11424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11425fi
11426{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_GLOB_NOMATCH" >&5
11427echo "${ECHO_T}$ac_cv_have_decl_GLOB_NOMATCH" >&6; }
11428if test $ac_cv_have_decl_GLOB_NOMATCH = yes; then
11429
11430cat >>confdefs.h <<_ACEOF
11431#define HAVE_DECL_GLOB_NOMATCH 1
11432_ACEOF
11433
11434
11435else
11436 cat >>confdefs.h <<_ACEOF
11437#define HAVE_DECL_GLOB_NOMATCH 0
11438_ACEOF
11439
11440
11441fi
11442
11443
11444
11445{ echo "$as_me:$LINENO: checking whether struct dirent allocates space for d_name" >&5
11446echo $ECHO_N "checking whether struct dirent allocates space for d_name... $ECHO_C" >&6; }
10480if test "$cross_compiling" = yes; then 11447if test "$cross_compiling" = yes; then
10481 11448
10482 { echo "$as_me:$LINENO: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&5 11449 { echo "$as_me:$LINENO: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&5
@@ -10501,18 +11468,27 @@ int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));}
10501 11468
10502_ACEOF 11469_ACEOF
10503rm -f conftest$ac_exeext 11470rm -f conftest$ac_exeext
10504if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 11471if { (ac_try="$ac_link"
10505 (eval $ac_link) 2>&5 11472case "(($ac_try" in
11473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11474 *) ac_try_echo=$ac_try;;
11475esac
11476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11477 (eval "$ac_link") 2>&5
10506 ac_status=$? 11478 ac_status=$?
10507 echo "$as_me:$LINENO: \$? = $ac_status" >&5 11479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10508 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 11480 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 11481 { (case "(($ac_try" in
10510 (eval $ac_try) 2>&5 11482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11483 *) ac_try_echo=$ac_try;;
11484esac
11485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11486 (eval "$ac_try") 2>&5
10511 ac_status=$? 11487 ac_status=$?
10512 echo "$as_me:$LINENO: \$? = $ac_status" >&5 11488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10513 (exit $ac_status); }; }; then 11489 (exit $ac_status); }; }; then
10514 echo "$as_me:$LINENO: result: yes" >&5 11490 { echo "$as_me:$LINENO: result: yes" >&5
10515echo "${ECHO_T}yes" >&6 11491echo "${ECHO_T}yes" >&6; }
10516else 11492else
10517 echo "$as_me: program exited with status $ac_status" >&5 11493 echo "$as_me: program exited with status $ac_status" >&5
10518echo "$as_me: failed program was:" >&5 11494echo "$as_me: failed program was:" >&5
@@ -10520,8 +11496,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
10520 11496
10521( exit $ac_status ) 11497( exit $ac_status )
10522 11498
10523 echo "$as_me:$LINENO: result: no" >&5 11499 { echo "$as_me:$LINENO: result: no" >&5
10524echo "${ECHO_T}no" >&6 11500echo "${ECHO_T}no" >&6; }
10525 11501
10526cat >>confdefs.h <<\_ACEOF 11502cat >>confdefs.h <<\_ACEOF
10527#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1 11503#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1
@@ -10529,31 +11505,32 @@ _ACEOF
10529 11505
10530 11506
10531fi 11507fi
10532rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 11508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10533fi 11509fi
10534 11510
10535echo "$as_me:$LINENO: checking for /proc/pid/fd directory" >&5 11511
10536echo $ECHO_N "checking for /proc/pid/fd directory... $ECHO_C" >&6 11512
11513{ echo "$as_me:$LINENO: checking for /proc/pid/fd directory" >&5
11514echo $ECHO_N "checking for /proc/pid/fd directory... $ECHO_C" >&6; }
10537if test -d "/proc/$$/fd" ; then 11515if test -d "/proc/$$/fd" ; then
10538 11516
10539cat >>confdefs.h <<\_ACEOF 11517cat >>confdefs.h <<\_ACEOF
10540#define HAVE_PROC_PID 1 11518#define HAVE_PROC_PID 1
10541_ACEOF 11519_ACEOF
10542 11520
10543 echo "$as_me:$LINENO: result: yes" >&5 11521 { echo "$as_me:$LINENO: result: yes" >&5
10544echo "${ECHO_T}yes" >&6 11522echo "${ECHO_T}yes" >&6; }
10545else 11523else
10546 echo "$as_me:$LINENO: result: no" >&5 11524 { echo "$as_me:$LINENO: result: no" >&5
10547echo "${ECHO_T}no" >&6 11525echo "${ECHO_T}no" >&6; }
10548fi 11526fi
10549 11527
10550# Check whether user wants S/Key support 11528# Check whether user wants S/Key support
10551SKEY_MSG="no" 11529SKEY_MSG="no"
10552 11530
10553# Check whether --with-skey or --without-skey was given. 11531# Check whether --with-skey was given.
10554if test "${with_skey+set}" = set; then 11532if test "${with_skey+set}" = set; then
10555 withval="$with_skey" 11533 withval=$with_skey;
10556
10557 if test "x$withval" != "xno" ; then 11534 if test "x$withval" != "xno" ; then
10558 11535
10559 if test "x$withval" != "xyes" ; then 11536 if test "x$withval" != "xyes" ; then
@@ -10569,8 +11546,8 @@ _ACEOF
10569 LIBS="-lskey $LIBS" 11546 LIBS="-lskey $LIBS"
10570 SKEY_MSG="yes" 11547 SKEY_MSG="yes"
10571 11548
10572 echo "$as_me:$LINENO: checking for s/key support" >&5 11549 { echo "$as_me:$LINENO: checking for s/key support" >&5
10573echo $ECHO_N "checking for s/key support... $ECHO_C" >&6 11550echo $ECHO_N "checking for s/key support... $ECHO_C" >&6; }
10574 cat >conftest.$ac_ext <<_ACEOF 11551 cat >conftest.$ac_ext <<_ACEOF
10575/* confdefs.h. */ 11552/* confdefs.h. */
10576_ACEOF 11553_ACEOF
@@ -10584,45 +11561,42 @@ int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); }
10584 11561
10585_ACEOF 11562_ACEOF
10586rm -f conftest.$ac_objext conftest$ac_exeext 11563rm -f conftest.$ac_objext conftest$ac_exeext
10587if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 11564if { (ac_try="$ac_link"
10588 (eval $ac_link) 2>conftest.er1 11565case "(($ac_try" in
11566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11567 *) ac_try_echo=$ac_try;;
11568esac
11569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11570 (eval "$ac_link") 2>conftest.er1
10589 ac_status=$? 11571 ac_status=$?
10590 grep -v '^ *+' conftest.er1 >conftest.err 11572 grep -v '^ *+' conftest.er1 >conftest.err
10591 rm -f conftest.er1 11573 rm -f conftest.er1
10592 cat conftest.err >&5 11574 cat conftest.err >&5
10593 echo "$as_me:$LINENO: \$? = $ac_status" >&5 11575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10594 (exit $ac_status); } && 11576 (exit $ac_status); } && {
10595 { ac_try='test -z "$ac_c_werror_flag" 11577 test -z "$ac_c_werror_flag" ||
10596 || test ! -s conftest.err' 11578 test ! -s conftest.err
10597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 11579 } && test -s conftest$ac_exeext &&
10598 (eval $ac_try) 2>&5 11580 $as_test_x conftest$ac_exeext; then
10599 ac_status=$? 11581 { echo "$as_me:$LINENO: result: yes" >&5
10600 echo "$as_me:$LINENO: \$? = $ac_status" >&5 11582echo "${ECHO_T}yes" >&6; }
10601 (exit $ac_status); }; } &&
10602 { ac_try='test -s conftest$ac_exeext'
10603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10604 (eval $ac_try) 2>&5
10605 ac_status=$?
10606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10607 (exit $ac_status); }; }; then
10608 echo "$as_me:$LINENO: result: yes" >&5
10609echo "${ECHO_T}yes" >&6
10610else 11583else
10611 echo "$as_me: failed program was:" >&5 11584 echo "$as_me: failed program was:" >&5
10612sed 's/^/| /' conftest.$ac_ext >&5 11585sed 's/^/| /' conftest.$ac_ext >&5
10613 11586
10614 11587
10615 echo "$as_me:$LINENO: result: no" >&5 11588 { echo "$as_me:$LINENO: result: no" >&5
10616echo "${ECHO_T}no" >&6 11589echo "${ECHO_T}no" >&6; }
10617 { { echo "$as_me:$LINENO: error: ** Incomplete or missing s/key libraries." >&5 11590 { { echo "$as_me:$LINENO: error: ** Incomplete or missing s/key libraries." >&5
10618echo "$as_me: error: ** Incomplete or missing s/key libraries." >&2;} 11591echo "$as_me: error: ** Incomplete or missing s/key libraries." >&2;}
10619 { (exit 1); exit 1; }; } 11592 { (exit 1); exit 1; }; }
10620 11593
10621fi 11594fi
10622rm -f conftest.err conftest.$ac_objext \ 11595
11596rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10623 conftest$ac_exeext conftest.$ac_ext 11597 conftest$ac_exeext conftest.$ac_ext
10624 echo "$as_me:$LINENO: checking if skeychallenge takes 4 arguments" >&5 11598 { echo "$as_me:$LINENO: checking if skeychallenge takes 4 arguments" >&5
10625echo $ECHO_N "checking if skeychallenge takes 4 arguments... $ECHO_C" >&6 11599echo $ECHO_N "checking if skeychallenge takes 4 arguments... $ECHO_C" >&6; }
10626 cat >conftest.$ac_ext <<_ACEOF 11600 cat >conftest.$ac_ext <<_ACEOF
10627/* confdefs.h. */ 11601/* confdefs.h. */
10628_ACEOF 11602_ACEOF
@@ -10640,29 +11614,24 @@ main ()
10640} 11614}
10641_ACEOF 11615_ACEOF
10642rm -f conftest.$ac_objext 11616rm -f conftest.$ac_objext
10643if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 11617if { (ac_try="$ac_compile"
10644 (eval $ac_compile) 2>conftest.er1 11618case "(($ac_try" in
11619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11620 *) ac_try_echo=$ac_try;;
11621esac
11622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11623 (eval "$ac_compile") 2>conftest.er1
10645 ac_status=$? 11624 ac_status=$?
10646 grep -v '^ *+' conftest.er1 >conftest.err 11625 grep -v '^ *+' conftest.er1 >conftest.err
10647 rm -f conftest.er1 11626 rm -f conftest.er1
10648 cat conftest.err >&5 11627 cat conftest.err >&5
10649 echo "$as_me:$LINENO: \$? = $ac_status" >&5 11628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10650 (exit $ac_status); } && 11629 (exit $ac_status); } && {
10651 { ac_try='test -z "$ac_c_werror_flag" 11630 test -z "$ac_c_werror_flag" ||
10652 || test ! -s conftest.err' 11631 test ! -s conftest.err
10653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 11632 } && test -s conftest.$ac_objext; then
10654 (eval $ac_try) 2>&5 11633 { echo "$as_me:$LINENO: result: yes" >&5
10655 ac_status=$? 11634echo "${ECHO_T}yes" >&6; }
10656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10657 (exit $ac_status); }; } &&
10658 { ac_try='test -s conftest.$ac_objext'
10659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10660 (eval $ac_try) 2>&5
10661 ac_status=$?
10662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10663 (exit $ac_status); }; }; then
10664 echo "$as_me:$LINENO: result: yes" >&5
10665echo "${ECHO_T}yes" >&6
10666 11635
10667cat >>confdefs.h <<\_ACEOF 11636cat >>confdefs.h <<\_ACEOF
10668#define SKEYCHALLENGE_4ARG 1 11637#define SKEYCHALLENGE_4ARG 1
@@ -10672,23 +11641,24 @@ else
10672 echo "$as_me: failed program was:" >&5 11641 echo "$as_me: failed program was:" >&5
10673sed 's/^/| /' conftest.$ac_ext >&5 11642sed 's/^/| /' conftest.$ac_ext >&5
10674 11643
10675echo "$as_me:$LINENO: result: no" >&5 11644 { echo "$as_me:$LINENO: result: no" >&5
10676echo "${ECHO_T}no" >&6 11645echo "${ECHO_T}no" >&6; }
10677 11646
10678fi 11647fi
10679rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 11648
11649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10680 fi 11650 fi
10681 11651
10682 11652
10683fi; 11653fi
11654
10684 11655
10685# Check whether user wants TCP wrappers support 11656# Check whether user wants TCP wrappers support
10686TCPW_MSG="no" 11657TCPW_MSG="no"
10687 11658
10688# Check whether --with-tcp-wrappers or --without-tcp-wrappers was given. 11659# Check whether --with-tcp-wrappers was given.
10689if test "${with_tcp_wrappers+set}" = set; then 11660if test "${with_tcp_wrappers+set}" = set; then
10690 withval="$with_tcp_wrappers" 11661 withval=$with_tcp_wrappers;
10691
10692 if test "x$withval" != "xno" ; then 11662 if test "x$withval" != "xno" ; then
10693 saved_LIBS="$LIBS" 11663 saved_LIBS="$LIBS"
10694 saved_LDFLAGS="$LDFLAGS" 11664 saved_LDFLAGS="$LDFLAGS"
@@ -10716,8 +11686,8 @@ if test "${with_tcp_wrappers+set}" = set; then
10716 fi 11686 fi
10717 LIBWRAP="-lwrap" 11687 LIBWRAP="-lwrap"
10718 LIBS="$LIBWRAP $LIBS" 11688 LIBS="$LIBWRAP $LIBS"
10719 echo "$as_me:$LINENO: checking for libwrap" >&5 11689 { echo "$as_me:$LINENO: checking for libwrap" >&5
10720echo $ECHO_N "checking for libwrap... $ECHO_C" >&6 11690echo $ECHO_N "checking for libwrap... $ECHO_C" >&6; }
10721 cat >conftest.$ac_ext <<_ACEOF 11691 cat >conftest.$ac_ext <<_ACEOF
10722/* confdefs.h. */ 11692/* confdefs.h. */
10723_ACEOF 11693_ACEOF
@@ -10740,30 +11710,26 @@ hosts_access(0);
10740} 11710}
10741_ACEOF 11711_ACEOF
10742rm -f conftest.$ac_objext conftest$ac_exeext 11712rm -f conftest.$ac_objext conftest$ac_exeext
10743if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 11713if { (ac_try="$ac_link"
10744 (eval $ac_link) 2>conftest.er1 11714case "(($ac_try" in
11715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11716 *) ac_try_echo=$ac_try;;
11717esac
11718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11719 (eval "$ac_link") 2>conftest.er1
10745 ac_status=$? 11720 ac_status=$?
10746 grep -v '^ *+' conftest.er1 >conftest.err 11721 grep -v '^ *+' conftest.er1 >conftest.err
10747 rm -f conftest.er1 11722 rm -f conftest.er1
10748 cat conftest.err >&5 11723 cat conftest.err >&5
10749 echo "$as_me:$LINENO: \$? = $ac_status" >&5 11724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10750 (exit $ac_status); } && 11725 (exit $ac_status); } && {
10751 { ac_try='test -z "$ac_c_werror_flag" 11726 test -z "$ac_c_werror_flag" ||
10752 || test ! -s conftest.err' 11727 test ! -s conftest.err
10753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 11728 } && test -s conftest$ac_exeext &&
10754 (eval $ac_try) 2>&5 11729 $as_test_x conftest$ac_exeext; then
10755 ac_status=$?
10756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10757 (exit $ac_status); }; } &&
10758 { ac_try='test -s conftest$ac_exeext'
10759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10760 (eval $ac_try) 2>&5
10761 ac_status=$?
10762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10763 (exit $ac_status); }; }; then
10764 11730
10765 echo "$as_me:$LINENO: result: yes" >&5 11731 { echo "$as_me:$LINENO: result: yes" >&5
10766echo "${ECHO_T}yes" >&6 11732echo "${ECHO_T}yes" >&6; }
10767 11733
10768cat >>confdefs.h <<\_ACEOF 11734cat >>confdefs.h <<\_ACEOF
10769#define LIBWRAP 1 11735#define LIBWRAP 1
@@ -10783,21 +11749,22 @@ echo "$as_me: error: *** libwrap missing" >&2;}
10783 11749
10784 11750
10785fi 11751fi
10786rm -f conftest.err conftest.$ac_objext \ 11752
11753rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10787 conftest$ac_exeext conftest.$ac_ext 11754 conftest$ac_exeext conftest.$ac_ext
10788 LIBS="$saved_LIBS" 11755 LIBS="$saved_LIBS"
10789 fi 11756 fi
10790 11757
10791 11758
10792fi; 11759fi
11760
10793 11761
10794# Check whether user wants libedit support 11762# Check whether user wants libedit support
10795LIBEDIT_MSG="no" 11763LIBEDIT_MSG="no"
10796 11764
10797# Check whether --with-libedit or --without-libedit was given. 11765# Check whether --with-libedit was given.
10798if test "${with_libedit+set}" = set; then 11766if test "${with_libedit+set}" = set; then
10799 withval="$with_libedit" 11767 withval=$with_libedit; if test "x$withval" != "xno" ; then
10800 if test "x$withval" != "xno" ; then
10801 if test "x$withval" != "xyes"; then 11768 if test "x$withval" != "xyes"; then
10802 CPPFLAGS="$CPPFLAGS -I${withval}/include" 11769 CPPFLAGS="$CPPFLAGS -I${withval}/include"
10803 if test -n "${need_dash_r}"; then 11770 if test -n "${need_dash_r}"; then
@@ -10806,8 +11773,8 @@ if test "${with_libedit+set}" = set; then
10806 LDFLAGS="-L${withval}/lib ${LDFLAGS}" 11773 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
10807 fi 11774 fi
10808 fi 11775 fi
10809 echo "$as_me:$LINENO: checking for el_init in -ledit" >&5 11776 { echo "$as_me:$LINENO: checking for el_init in -ledit" >&5
10810echo $ECHO_N "checking for el_init in -ledit... $ECHO_C" >&6 11777echo $ECHO_N "checking for el_init in -ledit... $ECHO_C" >&6; }
10811if test "${ac_cv_lib_edit_el_init+set}" = set; then 11778if test "${ac_cv_lib_edit_el_init+set}" = set; then
10812 echo $ECHO_N "(cached) $ECHO_C" >&6 11779 echo $ECHO_N "(cached) $ECHO_C" >&6
10813else 11780else
@@ -10821,56 +11788,53 @@ cat confdefs.h >>conftest.$ac_ext
10821cat >>conftest.$ac_ext <<_ACEOF 11788cat >>conftest.$ac_ext <<_ACEOF
10822/* end confdefs.h. */ 11789/* end confdefs.h. */
10823 11790
10824/* Override any gcc2 internal prototype to avoid an error. */ 11791/* Override any GCC internal prototype to avoid an error.
11792 Use char because int might match the return type of a GCC
11793 builtin and then its argument prototype would still apply. */
10825#ifdef __cplusplus 11794#ifdef __cplusplus
10826extern "C" 11795extern "C"
10827#endif 11796#endif
10828/* We use char because int might match the return type of a gcc2
10829 builtin and then its argument prototype would still apply. */
10830char el_init (); 11797char el_init ();
10831int 11798int
10832main () 11799main ()
10833{ 11800{
10834el_init (); 11801return el_init ();
10835 ; 11802 ;
10836 return 0; 11803 return 0;
10837} 11804}
10838_ACEOF 11805_ACEOF
10839rm -f conftest.$ac_objext conftest$ac_exeext 11806rm -f conftest.$ac_objext conftest$ac_exeext
10840if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 11807if { (ac_try="$ac_link"
10841 (eval $ac_link) 2>conftest.er1 11808case "(($ac_try" in
11809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11810 *) ac_try_echo=$ac_try;;
11811esac
11812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11813 (eval "$ac_link") 2>conftest.er1
10842 ac_status=$? 11814 ac_status=$?
10843 grep -v '^ *+' conftest.er1 >conftest.err 11815 grep -v '^ *+' conftest.er1 >conftest.err
10844 rm -f conftest.er1 11816 rm -f conftest.er1
10845 cat conftest.err >&5 11817 cat conftest.err >&5
10846 echo "$as_me:$LINENO: \$? = $ac_status" >&5 11818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10847 (exit $ac_status); } && 11819 (exit $ac_status); } && {
10848 { ac_try='test -z "$ac_c_werror_flag" 11820 test -z "$ac_c_werror_flag" ||
10849 || test ! -s conftest.err' 11821 test ! -s conftest.err
10850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 11822 } && test -s conftest$ac_exeext &&
10851 (eval $ac_try) 2>&5 11823 $as_test_x conftest$ac_exeext; then
10852 ac_status=$?
10853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10854 (exit $ac_status); }; } &&
10855 { ac_try='test -s conftest$ac_exeext'
10856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10857 (eval $ac_try) 2>&5
10858 ac_status=$?
10859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10860 (exit $ac_status); }; }; then
10861 ac_cv_lib_edit_el_init=yes 11824 ac_cv_lib_edit_el_init=yes
10862else 11825else
10863 echo "$as_me: failed program was:" >&5 11826 echo "$as_me: failed program was:" >&5
10864sed 's/^/| /' conftest.$ac_ext >&5 11827sed 's/^/| /' conftest.$ac_ext >&5
10865 11828
10866ac_cv_lib_edit_el_init=no 11829 ac_cv_lib_edit_el_init=no
10867fi 11830fi
10868rm -f conftest.err conftest.$ac_objext \ 11831
11832rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10869 conftest$ac_exeext conftest.$ac_ext 11833 conftest$ac_exeext conftest.$ac_ext
10870LIBS=$ac_check_lib_save_LIBS 11834LIBS=$ac_check_lib_save_LIBS
10871fi 11835fi
10872echo "$as_me:$LINENO: result: $ac_cv_lib_edit_el_init" >&5 11836{ echo "$as_me:$LINENO: result: $ac_cv_lib_edit_el_init" >&5
10873echo "${ECHO_T}$ac_cv_lib_edit_el_init" >&6 11837echo "${ECHO_T}$ac_cv_lib_edit_el_init" >&6; }
10874if test $ac_cv_lib_edit_el_init = yes; then 11838if test $ac_cv_lib_edit_el_init = yes; then
10875 11839
10876cat >>confdefs.h <<\_ACEOF 11840cat >>confdefs.h <<\_ACEOF
@@ -10887,8 +11851,8 @@ echo "$as_me: error: libedit not found" >&2;}
10887 { (exit 1); exit 1; }; } 11851 { (exit 1); exit 1; }; }
10888fi 11852fi
10889 11853
10890 echo "$as_me:$LINENO: checking if libedit version is compatible" >&5 11854 { echo "$as_me:$LINENO: checking if libedit version is compatible" >&5
10891echo $ECHO_N "checking if libedit version is compatible... $ECHO_C" >&6 11855echo $ECHO_N "checking if libedit version is compatible... $ECHO_C" >&6; }
10892 cat >conftest.$ac_ext <<_ACEOF 11856 cat >conftest.$ac_ext <<_ACEOF
10893/* confdefs.h. */ 11857/* confdefs.h. */
10894_ACEOF 11858_ACEOF
@@ -10906,199 +11870,108 @@ int main(void)
10906 11870
10907_ACEOF 11871_ACEOF
10908rm -f conftest.$ac_objext 11872rm -f conftest.$ac_objext
10909if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 11873if { (ac_try="$ac_compile"
10910 (eval $ac_compile) 2>conftest.er1 11874case "(($ac_try" in
11875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11876 *) ac_try_echo=$ac_try;;
11877esac
11878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11879 (eval "$ac_compile") 2>conftest.er1
10911 ac_status=$? 11880 ac_status=$?
10912 grep -v '^ *+' conftest.er1 >conftest.err 11881 grep -v '^ *+' conftest.er1 >conftest.err
10913 rm -f conftest.er1 11882 rm -f conftest.er1
10914 cat conftest.err >&5 11883 cat conftest.err >&5
10915 echo "$as_me:$LINENO: \$? = $ac_status" >&5 11884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10916 (exit $ac_status); } && 11885 (exit $ac_status); } && {
10917 { ac_try='test -z "$ac_c_werror_flag" 11886 test -z "$ac_c_werror_flag" ||
10918 || test ! -s conftest.err' 11887 test ! -s conftest.err
10919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 11888 } && test -s conftest.$ac_objext; then
10920 (eval $ac_try) 2>&5 11889 { echo "$as_me:$LINENO: result: yes" >&5
10921 ac_status=$? 11890echo "${ECHO_T}yes" >&6; }
10922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10923 (exit $ac_status); }; } &&
10924 { ac_try='test -s conftest.$ac_objext'
10925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10926 (eval $ac_try) 2>&5
10927 ac_status=$?
10928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10929 (exit $ac_status); }; }; then
10930 echo "$as_me:$LINENO: result: yes" >&5
10931echo "${ECHO_T}yes" >&6
10932else 11891else
10933 echo "$as_me: failed program was:" >&5 11892 echo "$as_me: failed program was:" >&5
10934sed 's/^/| /' conftest.$ac_ext >&5 11893sed 's/^/| /' conftest.$ac_ext >&5
10935 11894
10936 echo "$as_me:$LINENO: result: no" >&5 11895 { echo "$as_me:$LINENO: result: no" >&5
10937echo "${ECHO_T}no" >&6 11896echo "${ECHO_T}no" >&6; }
10938 { { echo "$as_me:$LINENO: error: libedit version is not compatible" >&5 11897 { { echo "$as_me:$LINENO: error: libedit version is not compatible" >&5
10939echo "$as_me: error: libedit version is not compatible" >&2;} 11898echo "$as_me: error: libedit version is not compatible" >&2;}
10940 { (exit 1); exit 1; }; } 11899 { (exit 1); exit 1; }; }
10941 11900
10942fi 11901fi
10943rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 11902
11903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10944 fi 11904 fi
10945 11905
10946fi; 11906fi
11907
10947 11908
10948AUDIT_MODULE=none 11909AUDIT_MODULE=none
10949 11910
10950# Check whether --with-audit or --without-audit was given. 11911# Check whether --with-audit was given.
10951if test "${with_audit+set}" = set; then 11912if test "${with_audit+set}" = set; then
10952 withval="$with_audit" 11913 withval=$with_audit;
10953 11914 { echo "$as_me:$LINENO: checking for supported audit module" >&5
10954 echo "$as_me:$LINENO: checking for supported audit module" >&5 11915echo $ECHO_N "checking for supported audit module... $ECHO_C" >&6; }
10955echo $ECHO_N "checking for supported audit module... $ECHO_C" >&6
10956 case "$withval" in 11916 case "$withval" in
10957 bsm) 11917 bsm)
10958 echo "$as_me:$LINENO: result: bsm" >&5 11918 { echo "$as_me:$LINENO: result: bsm" >&5
10959echo "${ECHO_T}bsm" >&6 11919echo "${ECHO_T}bsm" >&6; }
10960 AUDIT_MODULE=bsm 11920 AUDIT_MODULE=bsm
10961 11921
10962for ac_header in bsm/audit.h 11922for ac_header in bsm/audit.h
10963do 11923do
10964as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 11924as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10965if eval "test \"\${$as_ac_Header+set}\" = set"; then 11925{ echo "$as_me:$LINENO: checking for $ac_header" >&5
10966 echo "$as_me:$LINENO: checking for $ac_header" >&5 11926echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10967echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 11927if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10968if eval "test \"\${$as_ac_Header+set}\" = set"; then
10969 echo $ECHO_N "(cached) $ECHO_C" >&6 11928 echo $ECHO_N "(cached) $ECHO_C" >&6
10970fi
10971echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10972echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10973else 11929else
10974 # Is the header compilable? 11930 cat >conftest.$ac_ext <<_ACEOF
10975echo "$as_me:$LINENO: checking $ac_header usability" >&5
10976echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10977cat >conftest.$ac_ext <<_ACEOF
10978/* confdefs.h. */ 11931/* confdefs.h. */
10979_ACEOF 11932_ACEOF
10980cat confdefs.h >>conftest.$ac_ext 11933cat confdefs.h >>conftest.$ac_ext
10981cat >>conftest.$ac_ext <<_ACEOF 11934cat >>conftest.$ac_ext <<_ACEOF
10982/* end confdefs.h. */ 11935/* end confdefs.h. */
10983$ac_includes_default
10984#include <$ac_header>
10985_ACEOF
10986rm -f conftest.$ac_objext
10987if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10988 (eval $ac_compile) 2>conftest.er1
10989 ac_status=$?
10990 grep -v '^ *+' conftest.er1 >conftest.err
10991 rm -f conftest.er1
10992 cat conftest.err >&5
10993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10994 (exit $ac_status); } &&
10995 { ac_try='test -z "$ac_c_werror_flag"
10996 || test ! -s conftest.err'
10997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10998 (eval $ac_try) 2>&5
10999 ac_status=$?
11000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11001 (exit $ac_status); }; } &&
11002 { ac_try='test -s conftest.$ac_objext'
11003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11004 (eval $ac_try) 2>&5
11005 ac_status=$?
11006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11007 (exit $ac_status); }; }; then
11008 ac_header_compiler=yes
11009else
11010 echo "$as_me: failed program was:" >&5
11011sed 's/^/| /' conftest.$ac_ext >&5
11012 11936
11013ac_header_compiler=no 11937#ifdef HAVE_TIME_H
11014fi 11938# include <time.h>
11015rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 11939#endif
11016echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 11940
11017echo "${ECHO_T}$ac_header_compiler" >&6 11941
11018 11942
11019# Is the header present?
11020echo "$as_me:$LINENO: checking $ac_header presence" >&5
11021echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11022cat >conftest.$ac_ext <<_ACEOF
11023/* confdefs.h. */
11024_ACEOF
11025cat confdefs.h >>conftest.$ac_ext
11026cat >>conftest.$ac_ext <<_ACEOF
11027/* end confdefs.h. */
11028#include <$ac_header> 11943#include <$ac_header>
11029_ACEOF 11944_ACEOF
11030if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 11945rm -f conftest.$ac_objext
11031 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 11946if { (ac_try="$ac_compile"
11947case "(($ac_try" in
11948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11949 *) ac_try_echo=$ac_try;;
11950esac
11951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11952 (eval "$ac_compile") 2>conftest.er1
11032 ac_status=$? 11953 ac_status=$?
11033 grep -v '^ *+' conftest.er1 >conftest.err 11954 grep -v '^ *+' conftest.er1 >conftest.err
11034 rm -f conftest.er1 11955 rm -f conftest.er1
11035 cat conftest.err >&5 11956 cat conftest.err >&5
11036 echo "$as_me:$LINENO: \$? = $ac_status" >&5 11957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11037 (exit $ac_status); } >/dev/null; then 11958 (exit $ac_status); } && {
11038 if test -s conftest.err; then 11959 test -z "$ac_c_werror_flag" ||
11039 ac_cpp_err=$ac_c_preproc_warn_flag 11960 test ! -s conftest.err
11040 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 11961 } && test -s conftest.$ac_objext; then
11041 else 11962 eval "$as_ac_Header=yes"
11042 ac_cpp_err=
11043 fi
11044else
11045 ac_cpp_err=yes
11046fi
11047if test -z "$ac_cpp_err"; then
11048 ac_header_preproc=yes
11049else 11963else
11050 echo "$as_me: failed program was:" >&5 11964 echo "$as_me: failed program was:" >&5
11051sed 's/^/| /' conftest.$ac_ext >&5 11965sed 's/^/| /' conftest.$ac_ext >&5
11052 11966
11053 ac_header_preproc=no 11967 eval "$as_ac_Header=no"
11054fi 11968fi
11055rm -f conftest.err conftest.$ac_ext
11056echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11057echo "${ECHO_T}$ac_header_preproc" >&6
11058
11059# So? What about this header?
11060case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11061 yes:no: )
11062 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11063echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11064 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11065echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11066 ac_header_preproc=yes
11067 ;;
11068 no:yes:* )
11069 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11070echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11071 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11072echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11073 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11074echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11075 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11076echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
11077 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11078echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11079 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11080echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11081 (
11082 cat <<\_ASBOX
11083## ------------------------------------------- ##
11084## Report this to openssh-unix-dev@mindrot.org ##
11085## ------------------------------------------- ##
11086_ASBOX
11087 ) |
11088 sed "s/^/$as_me: WARNING: /" >&2
11089 ;;
11090esac
11091echo "$as_me:$LINENO: checking for $ac_header" >&5
11092echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11093if eval "test \"\${$as_ac_Header+set}\" = set"; then
11094 echo $ECHO_N "(cached) $ECHO_C" >&6
11095else
11096 eval "$as_ac_Header=\$ac_header_preproc"
11097fi
11098echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11099echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11100 11969
11970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11101fi 11971fi
11972ac_res=`eval echo '${'$as_ac_Header'}'`
11973 { echo "$as_me:$LINENO: result: $ac_res" >&5
11974echo "${ECHO_T}$ac_res" >&6; }
11102if test `eval echo '${'$as_ac_Header'}'` = yes; then 11975if test `eval echo '${'$as_ac_Header'}'` = yes; then
11103 cat >>confdefs.h <<_ACEOF 11976 cat >>confdefs.h <<_ACEOF
11104#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 11977#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
@@ -11113,8 +11986,8 @@ fi
11113done 11986done
11114 11987
11115 11988
11116echo "$as_me:$LINENO: checking for getaudit in -lbsm" >&5 11989{ echo "$as_me:$LINENO: checking for getaudit in -lbsm" >&5
11117echo $ECHO_N "checking for getaudit in -lbsm... $ECHO_C" >&6 11990echo $ECHO_N "checking for getaudit in -lbsm... $ECHO_C" >&6; }
11118if test "${ac_cv_lib_bsm_getaudit+set}" = set; then 11991if test "${ac_cv_lib_bsm_getaudit+set}" = set; then
11119 echo $ECHO_N "(cached) $ECHO_C" >&6 11992 echo $ECHO_N "(cached) $ECHO_C" >&6
11120else 11993else
@@ -11127,56 +12000,53 @@ cat confdefs.h >>conftest.$ac_ext
11127cat >>conftest.$ac_ext <<_ACEOF 12000cat >>conftest.$ac_ext <<_ACEOF
11128/* end confdefs.h. */ 12001/* end confdefs.h. */
11129 12002
11130/* Override any gcc2 internal prototype to avoid an error. */ 12003/* Override any GCC internal prototype to avoid an error.
12004 Use char because int might match the return type of a GCC
12005 builtin and then its argument prototype would still apply. */
11131#ifdef __cplusplus 12006#ifdef __cplusplus
11132extern "C" 12007extern "C"
11133#endif 12008#endif
11134/* We use char because int might match the return type of a gcc2
11135 builtin and then its argument prototype would still apply. */
11136char getaudit (); 12009char getaudit ();
11137int 12010int
11138main () 12011main ()
11139{ 12012{
11140getaudit (); 12013return getaudit ();
11141 ; 12014 ;
11142 return 0; 12015 return 0;
11143} 12016}
11144_ACEOF 12017_ACEOF
11145rm -f conftest.$ac_objext conftest$ac_exeext 12018rm -f conftest.$ac_objext conftest$ac_exeext
11146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 12019if { (ac_try="$ac_link"
11147 (eval $ac_link) 2>conftest.er1 12020case "(($ac_try" in
12021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12022 *) ac_try_echo=$ac_try;;
12023esac
12024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12025 (eval "$ac_link") 2>conftest.er1
11148 ac_status=$? 12026 ac_status=$?
11149 grep -v '^ *+' conftest.er1 >conftest.err 12027 grep -v '^ *+' conftest.er1 >conftest.err
11150 rm -f conftest.er1 12028 rm -f conftest.er1
11151 cat conftest.err >&5 12029 cat conftest.err >&5
11152 echo "$as_me:$LINENO: \$? = $ac_status" >&5 12030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11153 (exit $ac_status); } && 12031 (exit $ac_status); } && {
11154 { ac_try='test -z "$ac_c_werror_flag" 12032 test -z "$ac_c_werror_flag" ||
11155 || test ! -s conftest.err' 12033 test ! -s conftest.err
11156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 12034 } && test -s conftest$ac_exeext &&
11157 (eval $ac_try) 2>&5 12035 $as_test_x conftest$ac_exeext; then
11158 ac_status=$?
11159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11160 (exit $ac_status); }; } &&
11161 { ac_try='test -s conftest$ac_exeext'
11162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11163 (eval $ac_try) 2>&5
11164 ac_status=$?
11165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11166 (exit $ac_status); }; }; then
11167 ac_cv_lib_bsm_getaudit=yes 12036 ac_cv_lib_bsm_getaudit=yes
11168else 12037else
11169 echo "$as_me: failed program was:" >&5 12038 echo "$as_me: failed program was:" >&5
11170sed 's/^/| /' conftest.$ac_ext >&5 12039sed 's/^/| /' conftest.$ac_ext >&5
11171 12040
11172ac_cv_lib_bsm_getaudit=no 12041 ac_cv_lib_bsm_getaudit=no
11173fi 12042fi
11174rm -f conftest.err conftest.$ac_objext \ 12043
12044rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11175 conftest$ac_exeext conftest.$ac_ext 12045 conftest$ac_exeext conftest.$ac_ext
11176LIBS=$ac_check_lib_save_LIBS 12046LIBS=$ac_check_lib_save_LIBS
11177fi 12047fi
11178echo "$as_me:$LINENO: result: $ac_cv_lib_bsm_getaudit" >&5 12048{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsm_getaudit" >&5
11179echo "${ECHO_T}$ac_cv_lib_bsm_getaudit" >&6 12049echo "${ECHO_T}$ac_cv_lib_bsm_getaudit" >&6; }
11180if test $ac_cv_lib_bsm_getaudit = yes; then 12050if test $ac_cv_lib_bsm_getaudit = yes; then
11181 cat >>confdefs.h <<_ACEOF 12051 cat >>confdefs.h <<_ACEOF
11182#define HAVE_LIBBSM 1 12052#define HAVE_LIBBSM 1
@@ -11194,9 +12064,9 @@ fi
11194for ac_func in getaudit 12064for ac_func in getaudit
11195do 12065do
11196as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 12066as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11197echo "$as_me:$LINENO: checking for $ac_func" >&5 12067{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11198echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 12068echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11199if eval "test \"\${$as_ac_var+set}\" = set"; then 12069if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
11200 echo $ECHO_N "(cached) $ECHO_C" >&6 12070 echo $ECHO_N "(cached) $ECHO_C" >&6
11201else 12071else
11202 cat >conftest.$ac_ext <<_ACEOF 12072 cat >conftest.$ac_ext <<_ACEOF
@@ -11222,68 +12092,60 @@ cat >>conftest.$ac_ext <<_ACEOF
11222 12092
11223#undef $ac_func 12093#undef $ac_func
11224 12094
11225/* Override any gcc2 internal prototype to avoid an error. */ 12095/* Override any GCC internal prototype to avoid an error.
12096 Use char because int might match the return type of a GCC
12097 builtin and then its argument prototype would still apply. */
11226#ifdef __cplusplus 12098#ifdef __cplusplus
11227extern "C" 12099extern "C"
11228{
11229#endif 12100#endif
11230/* We use char because int might match the return type of a gcc2
11231 builtin and then its argument prototype would still apply. */
11232char $ac_func (); 12101char $ac_func ();
11233/* The GNU C library defines this for functions which it implements 12102/* The GNU C library defines this for functions which it implements
11234 to always fail with ENOSYS. Some functions are actually named 12103 to always fail with ENOSYS. Some functions are actually named
11235 something starting with __ and the normal name is an alias. */ 12104 something starting with __ and the normal name is an alias. */
11236#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 12105#if defined __stub_$ac_func || defined __stub___$ac_func
11237choke me 12106choke me
11238#else
11239char (*f) () = $ac_func;
11240#endif
11241#ifdef __cplusplus
11242}
11243#endif 12107#endif
11244 12108
11245int 12109int
11246main () 12110main ()
11247{ 12111{
11248return f != $ac_func; 12112return $ac_func ();
11249 ; 12113 ;
11250 return 0; 12114 return 0;
11251} 12115}
11252_ACEOF 12116_ACEOF
11253rm -f conftest.$ac_objext conftest$ac_exeext 12117rm -f conftest.$ac_objext conftest$ac_exeext
11254if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 12118if { (ac_try="$ac_link"
11255 (eval $ac_link) 2>conftest.er1 12119case "(($ac_try" in
12120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12121 *) ac_try_echo=$ac_try;;
12122esac
12123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12124 (eval "$ac_link") 2>conftest.er1
11256 ac_status=$? 12125 ac_status=$?
11257 grep -v '^ *+' conftest.er1 >conftest.err 12126 grep -v '^ *+' conftest.er1 >conftest.err
11258 rm -f conftest.er1 12127 rm -f conftest.er1
11259 cat conftest.err >&5 12128 cat conftest.err >&5
11260 echo "$as_me:$LINENO: \$? = $ac_status" >&5 12129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11261 (exit $ac_status); } && 12130 (exit $ac_status); } && {
11262 { ac_try='test -z "$ac_c_werror_flag" 12131 test -z "$ac_c_werror_flag" ||
11263 || test ! -s conftest.err' 12132 test ! -s conftest.err
11264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 12133 } && test -s conftest$ac_exeext &&
11265 (eval $ac_try) 2>&5 12134 $as_test_x conftest$ac_exeext; then
11266 ac_status=$?
11267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11268 (exit $ac_status); }; } &&
11269 { ac_try='test -s conftest$ac_exeext'
11270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11271 (eval $ac_try) 2>&5
11272 ac_status=$?
11273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11274 (exit $ac_status); }; }; then
11275 eval "$as_ac_var=yes" 12135 eval "$as_ac_var=yes"
11276else 12136else
11277 echo "$as_me: failed program was:" >&5 12137 echo "$as_me: failed program was:" >&5
11278sed 's/^/| /' conftest.$ac_ext >&5 12138sed 's/^/| /' conftest.$ac_ext >&5
11279 12139
11280eval "$as_ac_var=no" 12140 eval "$as_ac_var=no"
11281fi 12141fi
11282rm -f conftest.err conftest.$ac_objext \ 12142
12143rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11283 conftest$ac_exeext conftest.$ac_ext 12144 conftest$ac_exeext conftest.$ac_ext
11284fi 12145fi
11285echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 12146ac_res=`eval echo '${'$as_ac_var'}'`
11286echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 12147 { echo "$as_me:$LINENO: result: $ac_res" >&5
12148echo "${ECHO_T}$ac_res" >&6; }
11287if test `eval echo '${'$as_ac_var'}'` = yes; then 12149if test `eval echo '${'$as_ac_var'}'` = yes; then
11288 cat >>confdefs.h <<_ACEOF 12150 cat >>confdefs.h <<_ACEOF
11289#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 12151#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -11301,9 +12163,9 @@ done
11301for ac_func in getaudit_addr 12163for ac_func in getaudit_addr
11302do 12164do
11303as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 12165as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11304echo "$as_me:$LINENO: checking for $ac_func" >&5 12166{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11305echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 12167echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11306if eval "test \"\${$as_ac_var+set}\" = set"; then 12168if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
11307 echo $ECHO_N "(cached) $ECHO_C" >&6 12169 echo $ECHO_N "(cached) $ECHO_C" >&6
11308else 12170else
11309 cat >conftest.$ac_ext <<_ACEOF 12171 cat >conftest.$ac_ext <<_ACEOF
@@ -11329,68 +12191,60 @@ cat >>conftest.$ac_ext <<_ACEOF
11329 12191
11330#undef $ac_func 12192#undef $ac_func
11331 12193
11332/* Override any gcc2 internal prototype to avoid an error. */ 12194/* Override any GCC internal prototype to avoid an error.
12195 Use char because int might match the return type of a GCC
12196 builtin and then its argument prototype would still apply. */
11333#ifdef __cplusplus 12197#ifdef __cplusplus
11334extern "C" 12198extern "C"
11335{
11336#endif 12199#endif
11337/* We use char because int might match the return type of a gcc2
11338 builtin and then its argument prototype would still apply. */
11339char $ac_func (); 12200char $ac_func ();
11340/* The GNU C library defines this for functions which it implements 12201/* The GNU C library defines this for functions which it implements
11341 to always fail with ENOSYS. Some functions are actually named 12202 to always fail with ENOSYS. Some functions are actually named
11342 something starting with __ and the normal name is an alias. */ 12203 something starting with __ and the normal name is an alias. */
11343#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 12204#if defined __stub_$ac_func || defined __stub___$ac_func
11344choke me 12205choke me
11345#else
11346char (*f) () = $ac_func;
11347#endif
11348#ifdef __cplusplus
11349}
11350#endif 12206#endif
11351 12207
11352int 12208int
11353main () 12209main ()
11354{ 12210{
11355return f != $ac_func; 12211return $ac_func ();
11356 ; 12212 ;
11357 return 0; 12213 return 0;
11358} 12214}
11359_ACEOF 12215_ACEOF
11360rm -f conftest.$ac_objext conftest$ac_exeext 12216rm -f conftest.$ac_objext conftest$ac_exeext
11361if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 12217if { (ac_try="$ac_link"
11362 (eval $ac_link) 2>conftest.er1 12218case "(($ac_try" in
12219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12220 *) ac_try_echo=$ac_try;;
12221esac
12222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12223 (eval "$ac_link") 2>conftest.er1
11363 ac_status=$? 12224 ac_status=$?
11364 grep -v '^ *+' conftest.er1 >conftest.err 12225 grep -v '^ *+' conftest.er1 >conftest.err
11365 rm -f conftest.er1 12226 rm -f conftest.er1
11366 cat conftest.err >&5 12227 cat conftest.err >&5
11367 echo "$as_me:$LINENO: \$? = $ac_status" >&5 12228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11368 (exit $ac_status); } && 12229 (exit $ac_status); } && {
11369 { ac_try='test -z "$ac_c_werror_flag" 12230 test -z "$ac_c_werror_flag" ||
11370 || test ! -s conftest.err' 12231 test ! -s conftest.err
11371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 12232 } && test -s conftest$ac_exeext &&
11372 (eval $ac_try) 2>&5 12233 $as_test_x conftest$ac_exeext; then
11373 ac_status=$?
11374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11375 (exit $ac_status); }; } &&
11376 { ac_try='test -s conftest$ac_exeext'
11377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11378 (eval $ac_try) 2>&5
11379 ac_status=$?
11380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11381 (exit $ac_status); }; }; then
11382 eval "$as_ac_var=yes" 12234 eval "$as_ac_var=yes"
11383else 12235else
11384 echo "$as_me: failed program was:" >&5 12236 echo "$as_me: failed program was:" >&5
11385sed 's/^/| /' conftest.$ac_ext >&5 12237sed 's/^/| /' conftest.$ac_ext >&5
11386 12238
11387eval "$as_ac_var=no" 12239 eval "$as_ac_var=no"
11388fi 12240fi
11389rm -f conftest.err conftest.$ac_objext \ 12241
12242rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11390 conftest$ac_exeext conftest.$ac_ext 12243 conftest$ac_exeext conftest.$ac_ext
11391fi 12244fi
11392echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 12245ac_res=`eval echo '${'$as_ac_var'}'`
11393echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 12246 { echo "$as_me:$LINENO: result: $ac_res" >&5
12247echo "${ECHO_T}$ac_res" >&6; }
11394if test `eval echo '${'$as_ac_var'}'` = yes; then 12248if test `eval echo '${'$as_ac_var'}'` = yes; then
11395 cat >>confdefs.h <<_ACEOF 12249 cat >>confdefs.h <<_ACEOF
11396#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 12250#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -11407,8 +12261,8 @@ _ACEOF
11407 ;; 12261 ;;
11408 debug) 12262 debug)
11409 AUDIT_MODULE=debug 12263 AUDIT_MODULE=debug
11410 echo "$as_me:$LINENO: result: debug" >&5 12264 { echo "$as_me:$LINENO: result: debug" >&5
11411echo "${ECHO_T}debug" >&6 12265echo "${ECHO_T}debug" >&6; }
11412 12266
11413cat >>confdefs.h <<\_ACEOF 12267cat >>confdefs.h <<\_ACEOF
11414#define SSH_AUDIT_EVENTS 1 12268#define SSH_AUDIT_EVENTS 1
@@ -11416,8 +12270,8 @@ _ACEOF
11416 12270
11417 ;; 12271 ;;
11418 no) 12272 no)
11419 echo "$as_me:$LINENO: result: no" >&5 12273 { echo "$as_me:$LINENO: result: no" >&5
11420echo "${ECHO_T}no" >&6 12274echo "${ECHO_T}no" >&6; }
11421 ;; 12275 ;;
11422 *) 12276 *)
11423 { { echo "$as_me:$LINENO: error: Unknown audit module $withval" >&5 12277 { { echo "$as_me:$LINENO: error: Unknown audit module $withval" >&5
@@ -11426,7 +12280,8 @@ echo "$as_me: error: Unknown audit module $withval" >&2;}
11426 ;; 12280 ;;
11427 esac 12281 esac
11428 12282
11429fi; 12283fi
12284
11430 12285
11431 12286
11432 12287
@@ -11594,9 +12449,9 @@ for ac_func in \
11594 12449
11595do 12450do
11596as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 12451as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11597echo "$as_me:$LINENO: checking for $ac_func" >&5 12452{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11598echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 12453echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11599if eval "test \"\${$as_ac_var+set}\" = set"; then 12454if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
11600 echo $ECHO_N "(cached) $ECHO_C" >&6 12455 echo $ECHO_N "(cached) $ECHO_C" >&6
11601else 12456else
11602 cat >conftest.$ac_ext <<_ACEOF 12457 cat >conftest.$ac_ext <<_ACEOF
@@ -11622,68 +12477,60 @@ cat >>conftest.$ac_ext <<_ACEOF
11622 12477
11623#undef $ac_func 12478#undef $ac_func
11624 12479
11625/* Override any gcc2 internal prototype to avoid an error. */ 12480/* Override any GCC internal prototype to avoid an error.
12481 Use char because int might match the return type of a GCC
12482 builtin and then its argument prototype would still apply. */
11626#ifdef __cplusplus 12483#ifdef __cplusplus
11627extern "C" 12484extern "C"
11628{
11629#endif 12485#endif
11630/* We use char because int might match the return type of a gcc2
11631 builtin and then its argument prototype would still apply. */
11632char $ac_func (); 12486char $ac_func ();
11633/* The GNU C library defines this for functions which it implements 12487/* The GNU C library defines this for functions which it implements
11634 to always fail with ENOSYS. Some functions are actually named 12488 to always fail with ENOSYS. Some functions are actually named
11635 something starting with __ and the normal name is an alias. */ 12489 something starting with __ and the normal name is an alias. */
11636#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 12490#if defined __stub_$ac_func || defined __stub___$ac_func
11637choke me 12491choke me
11638#else
11639char (*f) () = $ac_func;
11640#endif
11641#ifdef __cplusplus
11642}
11643#endif 12492#endif
11644 12493
11645int 12494int
11646main () 12495main ()
11647{ 12496{
11648return f != $ac_func; 12497return $ac_func ();
11649 ; 12498 ;
11650 return 0; 12499 return 0;
11651} 12500}
11652_ACEOF 12501_ACEOF
11653rm -f conftest.$ac_objext conftest$ac_exeext 12502rm -f conftest.$ac_objext conftest$ac_exeext
11654if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 12503if { (ac_try="$ac_link"
11655 (eval $ac_link) 2>conftest.er1 12504case "(($ac_try" in
12505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12506 *) ac_try_echo=$ac_try;;
12507esac
12508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12509 (eval "$ac_link") 2>conftest.er1
11656 ac_status=$? 12510 ac_status=$?
11657 grep -v '^ *+' conftest.er1 >conftest.err 12511 grep -v '^ *+' conftest.er1 >conftest.err
11658 rm -f conftest.er1 12512 rm -f conftest.er1
11659 cat conftest.err >&5 12513 cat conftest.err >&5
11660 echo "$as_me:$LINENO: \$? = $ac_status" >&5 12514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11661 (exit $ac_status); } && 12515 (exit $ac_status); } && {
11662 { ac_try='test -z "$ac_c_werror_flag" 12516 test -z "$ac_c_werror_flag" ||
11663 || test ! -s conftest.err' 12517 test ! -s conftest.err
11664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 12518 } && test -s conftest$ac_exeext &&
11665 (eval $ac_try) 2>&5 12519 $as_test_x conftest$ac_exeext; then
11666 ac_status=$?
11667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11668 (exit $ac_status); }; } &&
11669 { ac_try='test -s conftest$ac_exeext'
11670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11671 (eval $ac_try) 2>&5
11672 ac_status=$?
11673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11674 (exit $ac_status); }; }; then
11675 eval "$as_ac_var=yes" 12520 eval "$as_ac_var=yes"
11676else 12521else
11677 echo "$as_me: failed program was:" >&5 12522 echo "$as_me: failed program was:" >&5
11678sed 's/^/| /' conftest.$ac_ext >&5 12523sed 's/^/| /' conftest.$ac_ext >&5
11679 12524
11680eval "$as_ac_var=no" 12525 eval "$as_ac_var=no"
11681fi 12526fi
11682rm -f conftest.err conftest.$ac_objext \ 12527
12528rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11683 conftest$ac_exeext conftest.$ac_ext 12529 conftest$ac_exeext conftest.$ac_ext
11684fi 12530fi
11685echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 12531ac_res=`eval echo '${'$as_ac_var'}'`
11686echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 12532 { echo "$as_me:$LINENO: result: $ac_res" >&5
12533echo "${ECHO_T}$ac_res" >&6; }
11687if test `eval echo '${'$as_ac_var'}'` = yes; then 12534if test `eval echo '${'$as_ac_var'}'` = yes; then
11688 cat >>confdefs.h <<_ACEOF 12535 cat >>confdefs.h <<_ACEOF
11689#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 12536#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -11698,9 +12545,9 @@ done
11698for ac_func in gai_strerror 12545for ac_func in gai_strerror
11699do 12546do
11700as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 12547as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11701echo "$as_me:$LINENO: checking for $ac_func" >&5 12548{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11702echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 12549echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11703if eval "test \"\${$as_ac_var+set}\" = set"; then 12550if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
11704 echo $ECHO_N "(cached) $ECHO_C" >&6 12551 echo $ECHO_N "(cached) $ECHO_C" >&6
11705else 12552else
11706 cat >conftest.$ac_ext <<_ACEOF 12553 cat >conftest.$ac_ext <<_ACEOF
@@ -11726,68 +12573,60 @@ cat >>conftest.$ac_ext <<_ACEOF
11726 12573
11727#undef $ac_func 12574#undef $ac_func
11728 12575
11729/* Override any gcc2 internal prototype to avoid an error. */ 12576/* Override any GCC internal prototype to avoid an error.
12577 Use char because int might match the return type of a GCC
12578 builtin and then its argument prototype would still apply. */
11730#ifdef __cplusplus 12579#ifdef __cplusplus
11731extern "C" 12580extern "C"
11732{
11733#endif 12581#endif
11734/* We use char because int might match the return type of a gcc2
11735 builtin and then its argument prototype would still apply. */
11736char $ac_func (); 12582char $ac_func ();
11737/* The GNU C library defines this for functions which it implements 12583/* The GNU C library defines this for functions which it implements
11738 to always fail with ENOSYS. Some functions are actually named 12584 to always fail with ENOSYS. Some functions are actually named
11739 something starting with __ and the normal name is an alias. */ 12585 something starting with __ and the normal name is an alias. */
11740#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 12586#if defined __stub_$ac_func || defined __stub___$ac_func
11741choke me 12587choke me
11742#else
11743char (*f) () = $ac_func;
11744#endif
11745#ifdef __cplusplus
11746}
11747#endif 12588#endif
11748 12589
11749int 12590int
11750main () 12591main ()
11751{ 12592{
11752return f != $ac_func; 12593return $ac_func ();
11753 ; 12594 ;
11754 return 0; 12595 return 0;
11755} 12596}
11756_ACEOF 12597_ACEOF
11757rm -f conftest.$ac_objext conftest$ac_exeext 12598rm -f conftest.$ac_objext conftest$ac_exeext
11758if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 12599if { (ac_try="$ac_link"
11759 (eval $ac_link) 2>conftest.er1 12600case "(($ac_try" in
12601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12602 *) ac_try_echo=$ac_try;;
12603esac
12604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12605 (eval "$ac_link") 2>conftest.er1
11760 ac_status=$? 12606 ac_status=$?
11761 grep -v '^ *+' conftest.er1 >conftest.err 12607 grep -v '^ *+' conftest.er1 >conftest.err
11762 rm -f conftest.er1 12608 rm -f conftest.er1
11763 cat conftest.err >&5 12609 cat conftest.err >&5
11764 echo "$as_me:$LINENO: \$? = $ac_status" >&5 12610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11765 (exit $ac_status); } && 12611 (exit $ac_status); } && {
11766 { ac_try='test -z "$ac_c_werror_flag" 12612 test -z "$ac_c_werror_flag" ||
11767 || test ! -s conftest.err' 12613 test ! -s conftest.err
11768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 12614 } && test -s conftest$ac_exeext &&
11769 (eval $ac_try) 2>&5 12615 $as_test_x conftest$ac_exeext; then
11770 ac_status=$?
11771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11772 (exit $ac_status); }; } &&
11773 { ac_try='test -s conftest$ac_exeext'
11774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11775 (eval $ac_try) 2>&5
11776 ac_status=$?
11777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11778 (exit $ac_status); }; }; then
11779 eval "$as_ac_var=yes" 12616 eval "$as_ac_var=yes"
11780else 12617else
11781 echo "$as_me: failed program was:" >&5 12618 echo "$as_me: failed program was:" >&5
11782sed 's/^/| /' conftest.$ac_ext >&5 12619sed 's/^/| /' conftest.$ac_ext >&5
11783 12620
11784eval "$as_ac_var=no" 12621 eval "$as_ac_var=no"
11785fi 12622fi
11786rm -f conftest.err conftest.$ac_objext \ 12623
12624rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11787 conftest$ac_exeext conftest.$ac_ext 12625 conftest$ac_exeext conftest.$ac_ext
11788fi 12626fi
11789echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 12627ac_res=`eval echo '${'$as_ac_var'}'`
11790echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 12628 { echo "$as_me:$LINENO: result: $ac_res" >&5
12629echo "${ECHO_T}$ac_res" >&6; }
11791if test `eval echo '${'$as_ac_var'}'` = yes; then 12630if test `eval echo '${'$as_ac_var'}'` = yes; then
11792 cat >>confdefs.h <<_ACEOF 12631 cat >>confdefs.h <<_ACEOF
11793#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 12632#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -11821,27 +12660,22 @@ str = gai_strerror(0);
11821} 12660}
11822_ACEOF 12661_ACEOF
11823rm -f conftest.$ac_objext 12662rm -f conftest.$ac_objext
11824if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 12663if { (ac_try="$ac_compile"
11825 (eval $ac_compile) 2>conftest.er1 12664case "(($ac_try" in
12665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12666 *) ac_try_echo=$ac_try;;
12667esac
12668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12669 (eval "$ac_compile") 2>conftest.er1
11826 ac_status=$? 12670 ac_status=$?
11827 grep -v '^ *+' conftest.er1 >conftest.err 12671 grep -v '^ *+' conftest.er1 >conftest.err
11828 rm -f conftest.er1 12672 rm -f conftest.er1
11829 cat conftest.err >&5 12673 cat conftest.err >&5
11830 echo "$as_me:$LINENO: \$? = $ac_status" >&5 12674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11831 (exit $ac_status); } && 12675 (exit $ac_status); } && {
11832 { ac_try='test -z "$ac_c_werror_flag" 12676 test -z "$ac_c_werror_flag" ||
11833 || test ! -s conftest.err' 12677 test ! -s conftest.err
11834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 12678 } && test -s conftest.$ac_objext; then
11835 (eval $ac_try) 2>&5
11836 ac_status=$?
11837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11838 (exit $ac_status); }; } &&
11839 { ac_try='test -s conftest.$ac_objext'
11840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11841 (eval $ac_try) 2>&5
11842 ac_status=$?
11843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11844 (exit $ac_status); }; }; then
11845 12679
11846 12680
11847cat >>confdefs.h <<\_ACEOF 12681cat >>confdefs.h <<\_ACEOF
@@ -11852,19 +12686,20 @@ else
11852 echo "$as_me: failed program was:" >&5 12686 echo "$as_me: failed program was:" >&5
11853sed 's/^/| /' conftest.$ac_ext >&5 12687sed 's/^/| /' conftest.$ac_ext >&5
11854 12688
12689
11855fi 12690fi
11856rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 12691
12692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11857fi 12693fi
11858done 12694done
11859 12695
11860 12696
11861echo "$as_me:$LINENO: checking for library containing nanosleep" >&5 12697{ echo "$as_me:$LINENO: checking for library containing nanosleep" >&5
11862echo $ECHO_N "checking for library containing nanosleep... $ECHO_C" >&6 12698echo $ECHO_N "checking for library containing nanosleep... $ECHO_C" >&6; }
11863if test "${ac_cv_search_nanosleep+set}" = set; then 12699if test "${ac_cv_search_nanosleep+set}" = set; then
11864 echo $ECHO_N "(cached) $ECHO_C" >&6 12700 echo $ECHO_N "(cached) $ECHO_C" >&6
11865else 12701else
11866 ac_func_search_save_LIBS=$LIBS 12702 ac_func_search_save_LIBS=$LIBS
11867ac_cv_search_nanosleep=no
11868cat >conftest.$ac_ext <<_ACEOF 12703cat >conftest.$ac_ext <<_ACEOF
11869/* confdefs.h. */ 12704/* confdefs.h. */
11870_ACEOF 12705_ACEOF
@@ -11872,115 +12707,73 @@ cat confdefs.h >>conftest.$ac_ext
11872cat >>conftest.$ac_ext <<_ACEOF 12707cat >>conftest.$ac_ext <<_ACEOF
11873/* end confdefs.h. */ 12708/* end confdefs.h. */
11874 12709
11875/* Override any gcc2 internal prototype to avoid an error. */ 12710/* Override any GCC internal prototype to avoid an error.
12711 Use char because int might match the return type of a GCC
12712 builtin and then its argument prototype would still apply. */
11876#ifdef __cplusplus 12713#ifdef __cplusplus
11877extern "C" 12714extern "C"
11878#endif 12715#endif
11879/* We use char because int might match the return type of a gcc2
11880 builtin and then its argument prototype would still apply. */
11881char nanosleep (); 12716char nanosleep ();
11882int 12717int
11883main () 12718main ()
11884{ 12719{
11885nanosleep (); 12720return nanosleep ();
11886 ; 12721 ;
11887 return 0; 12722 return 0;
11888} 12723}
11889_ACEOF 12724_ACEOF
11890rm -f conftest.$ac_objext conftest$ac_exeext 12725for ac_lib in '' rt posix4; do
11891if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 12726 if test -z "$ac_lib"; then
11892 (eval $ac_link) 2>conftest.er1 12727 ac_res="none required"
12728 else
12729 ac_res=-l$ac_lib
12730 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12731 fi
12732 rm -f conftest.$ac_objext conftest$ac_exeext
12733if { (ac_try="$ac_link"
12734case "(($ac_try" in
12735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12736 *) ac_try_echo=$ac_try;;
12737esac
12738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12739 (eval "$ac_link") 2>conftest.er1
11893 ac_status=$? 12740 ac_status=$?
11894 grep -v '^ *+' conftest.er1 >conftest.err 12741 grep -v '^ *+' conftest.er1 >conftest.err
11895 rm -f conftest.er1 12742 rm -f conftest.er1
11896 cat conftest.err >&5 12743 cat conftest.err >&5
11897 echo "$as_me:$LINENO: \$? = $ac_status" >&5 12744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11898 (exit $ac_status); } && 12745 (exit $ac_status); } && {
11899 { ac_try='test -z "$ac_c_werror_flag" 12746 test -z "$ac_c_werror_flag" ||
11900 || test ! -s conftest.err' 12747 test ! -s conftest.err
11901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 12748 } && test -s conftest$ac_exeext &&
11902 (eval $ac_try) 2>&5 12749 $as_test_x conftest$ac_exeext; then
11903 ac_status=$? 12750 ac_cv_search_nanosleep=$ac_res
11904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11905 (exit $ac_status); }; } &&
11906 { ac_try='test -s conftest$ac_exeext'
11907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11908 (eval $ac_try) 2>&5
11909 ac_status=$?
11910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11911 (exit $ac_status); }; }; then
11912 ac_cv_search_nanosleep="none required"
11913else 12751else
11914 echo "$as_me: failed program was:" >&5 12752 echo "$as_me: failed program was:" >&5
11915sed 's/^/| /' conftest.$ac_ext >&5 12753sed 's/^/| /' conftest.$ac_ext >&5
11916 12754
11917fi
11918rm -f conftest.err conftest.$ac_objext \
11919 conftest$ac_exeext conftest.$ac_ext
11920if test "$ac_cv_search_nanosleep" = no; then
11921 for ac_lib in rt posix4; do
11922 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11923 cat >conftest.$ac_ext <<_ACEOF
11924/* confdefs.h. */
11925_ACEOF
11926cat confdefs.h >>conftest.$ac_ext
11927cat >>conftest.$ac_ext <<_ACEOF
11928/* end confdefs.h. */
11929 12755
11930/* Override any gcc2 internal prototype to avoid an error. */ 12756fi
11931#ifdef __cplusplus
11932extern "C"
11933#endif
11934/* We use char because int might match the return type of a gcc2
11935 builtin and then its argument prototype would still apply. */
11936char nanosleep ();
11937int
11938main ()
11939{
11940nanosleep ();
11941 ;
11942 return 0;
11943}
11944_ACEOF
11945rm -f conftest.$ac_objext conftest$ac_exeext
11946if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11947 (eval $ac_link) 2>conftest.er1
11948 ac_status=$?
11949 grep -v '^ *+' conftest.er1 >conftest.err
11950 rm -f conftest.er1
11951 cat conftest.err >&5
11952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11953 (exit $ac_status); } &&
11954 { ac_try='test -z "$ac_c_werror_flag"
11955 || test ! -s conftest.err'
11956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11957 (eval $ac_try) 2>&5
11958 ac_status=$?
11959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11960 (exit $ac_status); }; } &&
11961 { ac_try='test -s conftest$ac_exeext'
11962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11963 (eval $ac_try) 2>&5
11964 ac_status=$?
11965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11966 (exit $ac_status); }; }; then
11967 ac_cv_search_nanosleep="-l$ac_lib"
11968break
11969else
11970 echo "$as_me: failed program was:" >&5
11971sed 's/^/| /' conftest.$ac_ext >&5
11972 12757
12758rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12759 conftest$ac_exeext
12760 if test "${ac_cv_search_nanosleep+set}" = set; then
12761 break
11973fi 12762fi
11974rm -f conftest.err conftest.$ac_objext \ 12763done
11975 conftest$ac_exeext conftest.$ac_ext 12764if test "${ac_cv_search_nanosleep+set}" = set; then
11976 done 12765 :
12766else
12767 ac_cv_search_nanosleep=no
11977fi 12768fi
12769rm conftest.$ac_ext
11978LIBS=$ac_func_search_save_LIBS 12770LIBS=$ac_func_search_save_LIBS
11979fi 12771fi
11980echo "$as_me:$LINENO: result: $ac_cv_search_nanosleep" >&5 12772{ echo "$as_me:$LINENO: result: $ac_cv_search_nanosleep" >&5
11981echo "${ECHO_T}$ac_cv_search_nanosleep" >&6 12773echo "${ECHO_T}$ac_cv_search_nanosleep" >&6; }
11982if test "$ac_cv_search_nanosleep" != no; then 12774ac_res=$ac_cv_search_nanosleep
11983 test "$ac_cv_search_nanosleep" = "none required" || LIBS="$ac_cv_search_nanosleep $LIBS" 12775if test "$ac_res" != no; then
12776 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11984 12777
11985cat >>confdefs.h <<\_ACEOF 12778cat >>confdefs.h <<\_ACEOF
11986#define HAVE_NANOSLEEP 1 12779#define HAVE_NANOSLEEP 1
@@ -11989,8 +12782,8 @@ _ACEOF
11989fi 12782fi
11990 12783
11991 12784
11992echo "$as_me:$LINENO: checking whether getrusage is declared" >&5 12785{ echo "$as_me:$LINENO: checking whether getrusage is declared" >&5
11993echo $ECHO_N "checking whether getrusage is declared... $ECHO_C" >&6 12786echo $ECHO_N "checking whether getrusage is declared... $ECHO_C" >&6; }
11994if test "${ac_cv_have_decl_getrusage+set}" = set; then 12787if test "${ac_cv_have_decl_getrusage+set}" = set; then
11995 echo $ECHO_N "(cached) $ECHO_C" >&6 12788 echo $ECHO_N "(cached) $ECHO_C" >&6
11996else 12789else
@@ -12005,7 +12798,7 @@ int
12005main () 12798main ()
12006{ 12799{
12007#ifndef getrusage 12800#ifndef getrusage
12008 char *p = (char *) getrusage; 12801 (void) getrusage;
12009#endif 12802#endif
12010 12803
12011 ; 12804 ;
@@ -12013,46 +12806,42 @@ main ()
12013} 12806}
12014_ACEOF 12807_ACEOF
12015rm -f conftest.$ac_objext 12808rm -f conftest.$ac_objext
12016if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 12809if { (ac_try="$ac_compile"
12017 (eval $ac_compile) 2>conftest.er1 12810case "(($ac_try" in
12811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12812 *) ac_try_echo=$ac_try;;
12813esac
12814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12815 (eval "$ac_compile") 2>conftest.er1
12018 ac_status=$? 12816 ac_status=$?
12019 grep -v '^ *+' conftest.er1 >conftest.err 12817 grep -v '^ *+' conftest.er1 >conftest.err
12020 rm -f conftest.er1 12818 rm -f conftest.er1
12021 cat conftest.err >&5 12819 cat conftest.err >&5
12022 echo "$as_me:$LINENO: \$? = $ac_status" >&5 12820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12023 (exit $ac_status); } && 12821 (exit $ac_status); } && {
12024 { ac_try='test -z "$ac_c_werror_flag" 12822 test -z "$ac_c_werror_flag" ||
12025 || test ! -s conftest.err' 12823 test ! -s conftest.err
12026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 12824 } && test -s conftest.$ac_objext; then
12027 (eval $ac_try) 2>&5
12028 ac_status=$?
12029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12030 (exit $ac_status); }; } &&
12031 { ac_try='test -s conftest.$ac_objext'
12032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12033 (eval $ac_try) 2>&5
12034 ac_status=$?
12035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12036 (exit $ac_status); }; }; then
12037 ac_cv_have_decl_getrusage=yes 12825 ac_cv_have_decl_getrusage=yes
12038else 12826else
12039 echo "$as_me: failed program was:" >&5 12827 echo "$as_me: failed program was:" >&5
12040sed 's/^/| /' conftest.$ac_ext >&5 12828sed 's/^/| /' conftest.$ac_ext >&5
12041 12829
12042ac_cv_have_decl_getrusage=no 12830 ac_cv_have_decl_getrusage=no
12043fi 12831fi
12044rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 12832
12833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12045fi 12834fi
12046echo "$as_me:$LINENO: result: $ac_cv_have_decl_getrusage" >&5 12835{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getrusage" >&5
12047echo "${ECHO_T}$ac_cv_have_decl_getrusage" >&6 12836echo "${ECHO_T}$ac_cv_have_decl_getrusage" >&6; }
12048if test $ac_cv_have_decl_getrusage = yes; then 12837if test $ac_cv_have_decl_getrusage = yes; then
12049 12838
12050for ac_func in getrusage 12839for ac_func in getrusage
12051do 12840do
12052as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 12841as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12053echo "$as_me:$LINENO: checking for $ac_func" >&5 12842{ echo "$as_me:$LINENO: checking for $ac_func" >&5
12054echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 12843echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
12055if eval "test \"\${$as_ac_var+set}\" = set"; then 12844if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
12056 echo $ECHO_N "(cached) $ECHO_C" >&6 12845 echo $ECHO_N "(cached) $ECHO_C" >&6
12057else 12846else
12058 cat >conftest.$ac_ext <<_ACEOF 12847 cat >conftest.$ac_ext <<_ACEOF
@@ -12078,68 +12867,60 @@ cat >>conftest.$ac_ext <<_ACEOF
12078 12867
12079#undef $ac_func 12868#undef $ac_func
12080 12869
12081/* Override any gcc2 internal prototype to avoid an error. */ 12870/* Override any GCC internal prototype to avoid an error.
12871 Use char because int might match the return type of a GCC
12872 builtin and then its argument prototype would still apply. */
12082#ifdef __cplusplus 12873#ifdef __cplusplus
12083extern "C" 12874extern "C"
12084{
12085#endif 12875#endif
12086/* We use char because int might match the return type of a gcc2
12087 builtin and then its argument prototype would still apply. */
12088char $ac_func (); 12876char $ac_func ();
12089/* The GNU C library defines this for functions which it implements 12877/* The GNU C library defines this for functions which it implements
12090 to always fail with ENOSYS. Some functions are actually named 12878 to always fail with ENOSYS. Some functions are actually named
12091 something starting with __ and the normal name is an alias. */ 12879 something starting with __ and the normal name is an alias. */
12092#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 12880#if defined __stub_$ac_func || defined __stub___$ac_func
12093choke me 12881choke me
12094#else
12095char (*f) () = $ac_func;
12096#endif
12097#ifdef __cplusplus
12098}
12099#endif 12882#endif
12100 12883
12101int 12884int
12102main () 12885main ()
12103{ 12886{
12104return f != $ac_func; 12887return $ac_func ();
12105 ; 12888 ;
12106 return 0; 12889 return 0;
12107} 12890}
12108_ACEOF 12891_ACEOF
12109rm -f conftest.$ac_objext conftest$ac_exeext 12892rm -f conftest.$ac_objext conftest$ac_exeext
12110if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 12893if { (ac_try="$ac_link"
12111 (eval $ac_link) 2>conftest.er1 12894case "(($ac_try" in
12895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12896 *) ac_try_echo=$ac_try;;
12897esac
12898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12899 (eval "$ac_link") 2>conftest.er1
12112 ac_status=$? 12900 ac_status=$?
12113 grep -v '^ *+' conftest.er1 >conftest.err 12901 grep -v '^ *+' conftest.er1 >conftest.err
12114 rm -f conftest.er1 12902 rm -f conftest.er1
12115 cat conftest.err >&5 12903 cat conftest.err >&5
12116 echo "$as_me:$LINENO: \$? = $ac_status" >&5 12904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12117 (exit $ac_status); } && 12905 (exit $ac_status); } && {
12118 { ac_try='test -z "$ac_c_werror_flag" 12906 test -z "$ac_c_werror_flag" ||
12119 || test ! -s conftest.err' 12907 test ! -s conftest.err
12120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 12908 } && test -s conftest$ac_exeext &&
12121 (eval $ac_try) 2>&5 12909 $as_test_x conftest$ac_exeext; then
12122 ac_status=$?
12123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12124 (exit $ac_status); }; } &&
12125 { ac_try='test -s conftest$ac_exeext'
12126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12127 (eval $ac_try) 2>&5
12128 ac_status=$?
12129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12130 (exit $ac_status); }; }; then
12131 eval "$as_ac_var=yes" 12910 eval "$as_ac_var=yes"
12132else 12911else
12133 echo "$as_me: failed program was:" >&5 12912 echo "$as_me: failed program was:" >&5
12134sed 's/^/| /' conftest.$ac_ext >&5 12913sed 's/^/| /' conftest.$ac_ext >&5
12135 12914
12136eval "$as_ac_var=no" 12915 eval "$as_ac_var=no"
12137fi 12916fi
12138rm -f conftest.err conftest.$ac_objext \ 12917
12918rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12139 conftest$ac_exeext conftest.$ac_ext 12919 conftest$ac_exeext conftest.$ac_ext
12140fi 12920fi
12141echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 12921ac_res=`eval echo '${'$as_ac_var'}'`
12142echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 12922 { echo "$as_me:$LINENO: result: $ac_res" >&5
12923echo "${ECHO_T}$ac_res" >&6; }
12143if test `eval echo '${'$as_ac_var'}'` = yes; then 12924if test `eval echo '${'$as_ac_var'}'` = yes; then
12144 cat >>confdefs.h <<_ACEOF 12925 cat >>confdefs.h <<_ACEOF
12145#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 12926#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -12150,8 +12931,8 @@ done
12150 12931
12151fi 12932fi
12152 12933
12153echo "$as_me:$LINENO: checking whether strsep is declared" >&5 12934{ echo "$as_me:$LINENO: checking whether strsep is declared" >&5
12154echo $ECHO_N "checking whether strsep is declared... $ECHO_C" >&6 12935echo $ECHO_N "checking whether strsep is declared... $ECHO_C" >&6; }
12155if test "${ac_cv_have_decl_strsep+set}" = set; then 12936if test "${ac_cv_have_decl_strsep+set}" = set; then
12156 echo $ECHO_N "(cached) $ECHO_C" >&6 12937 echo $ECHO_N "(cached) $ECHO_C" >&6
12157else 12938else
@@ -12171,7 +12952,7 @@ int
12171main () 12952main ()
12172{ 12953{
12173#ifndef strsep 12954#ifndef strsep
12174 char *p = (char *) strsep; 12955 (void) strsep;
12175#endif 12956#endif
12176 12957
12177 ; 12958 ;
@@ -12179,46 +12960,42 @@ main ()
12179} 12960}
12180_ACEOF 12961_ACEOF
12181rm -f conftest.$ac_objext 12962rm -f conftest.$ac_objext
12182if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 12963if { (ac_try="$ac_compile"
12183 (eval $ac_compile) 2>conftest.er1 12964case "(($ac_try" in
12965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12966 *) ac_try_echo=$ac_try;;
12967esac
12968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12969 (eval "$ac_compile") 2>conftest.er1
12184 ac_status=$? 12970 ac_status=$?
12185 grep -v '^ *+' conftest.er1 >conftest.err 12971 grep -v '^ *+' conftest.er1 >conftest.err
12186 rm -f conftest.er1 12972 rm -f conftest.er1
12187 cat conftest.err >&5 12973 cat conftest.err >&5
12188 echo "$as_me:$LINENO: \$? = $ac_status" >&5 12974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12189 (exit $ac_status); } && 12975 (exit $ac_status); } && {
12190 { ac_try='test -z "$ac_c_werror_flag" 12976 test -z "$ac_c_werror_flag" ||
12191 || test ! -s conftest.err' 12977 test ! -s conftest.err
12192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 12978 } && test -s conftest.$ac_objext; then
12193 (eval $ac_try) 2>&5
12194 ac_status=$?
12195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12196 (exit $ac_status); }; } &&
12197 { ac_try='test -s conftest.$ac_objext'
12198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12199 (eval $ac_try) 2>&5
12200 ac_status=$?
12201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12202 (exit $ac_status); }; }; then
12203 ac_cv_have_decl_strsep=yes 12979 ac_cv_have_decl_strsep=yes
12204else 12980else
12205 echo "$as_me: failed program was:" >&5 12981 echo "$as_me: failed program was:" >&5
12206sed 's/^/| /' conftest.$ac_ext >&5 12982sed 's/^/| /' conftest.$ac_ext >&5
12207 12983
12208ac_cv_have_decl_strsep=no 12984 ac_cv_have_decl_strsep=no
12209fi 12985fi
12210rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 12986
12987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12211fi 12988fi
12212echo "$as_me:$LINENO: result: $ac_cv_have_decl_strsep" >&5 12989{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_strsep" >&5
12213echo "${ECHO_T}$ac_cv_have_decl_strsep" >&6 12990echo "${ECHO_T}$ac_cv_have_decl_strsep" >&6; }
12214if test $ac_cv_have_decl_strsep = yes; then 12991if test $ac_cv_have_decl_strsep = yes; then
12215 12992
12216for ac_func in strsep 12993for ac_func in strsep
12217do 12994do
12218as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 12995as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12219echo "$as_me:$LINENO: checking for $ac_func" >&5 12996{ echo "$as_me:$LINENO: checking for $ac_func" >&5
12220echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 12997echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
12221if eval "test \"\${$as_ac_var+set}\" = set"; then 12998if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
12222 echo $ECHO_N "(cached) $ECHO_C" >&6 12999 echo $ECHO_N "(cached) $ECHO_C" >&6
12223else 13000else
12224 cat >conftest.$ac_ext <<_ACEOF 13001 cat >conftest.$ac_ext <<_ACEOF
@@ -12244,68 +13021,60 @@ cat >>conftest.$ac_ext <<_ACEOF
12244 13021
12245#undef $ac_func 13022#undef $ac_func
12246 13023
12247/* Override any gcc2 internal prototype to avoid an error. */ 13024/* Override any GCC internal prototype to avoid an error.
13025 Use char because int might match the return type of a GCC
13026 builtin and then its argument prototype would still apply. */
12248#ifdef __cplusplus 13027#ifdef __cplusplus
12249extern "C" 13028extern "C"
12250{
12251#endif 13029#endif
12252/* We use char because int might match the return type of a gcc2
12253 builtin and then its argument prototype would still apply. */
12254char $ac_func (); 13030char $ac_func ();
12255/* The GNU C library defines this for functions which it implements 13031/* The GNU C library defines this for functions which it implements
12256 to always fail with ENOSYS. Some functions are actually named 13032 to always fail with ENOSYS. Some functions are actually named
12257 something starting with __ and the normal name is an alias. */ 13033 something starting with __ and the normal name is an alias. */
12258#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 13034#if defined __stub_$ac_func || defined __stub___$ac_func
12259choke me 13035choke me
12260#else
12261char (*f) () = $ac_func;
12262#endif
12263#ifdef __cplusplus
12264}
12265#endif 13036#endif
12266 13037
12267int 13038int
12268main () 13039main ()
12269{ 13040{
12270return f != $ac_func; 13041return $ac_func ();
12271 ; 13042 ;
12272 return 0; 13043 return 0;
12273} 13044}
12274_ACEOF 13045_ACEOF
12275rm -f conftest.$ac_objext conftest$ac_exeext 13046rm -f conftest.$ac_objext conftest$ac_exeext
12276if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 13047if { (ac_try="$ac_link"
12277 (eval $ac_link) 2>conftest.er1 13048case "(($ac_try" in
13049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13050 *) ac_try_echo=$ac_try;;
13051esac
13052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13053 (eval "$ac_link") 2>conftest.er1
12278 ac_status=$? 13054 ac_status=$?
12279 grep -v '^ *+' conftest.er1 >conftest.err 13055 grep -v '^ *+' conftest.er1 >conftest.err
12280 rm -f conftest.er1 13056 rm -f conftest.er1
12281 cat conftest.err >&5 13057 cat conftest.err >&5
12282 echo "$as_me:$LINENO: \$? = $ac_status" >&5 13058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12283 (exit $ac_status); } && 13059 (exit $ac_status); } && {
12284 { ac_try='test -z "$ac_c_werror_flag" 13060 test -z "$ac_c_werror_flag" ||
12285 || test ! -s conftest.err' 13061 test ! -s conftest.err
12286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 13062 } && test -s conftest$ac_exeext &&
12287 (eval $ac_try) 2>&5 13063 $as_test_x conftest$ac_exeext; then
12288 ac_status=$?
12289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12290 (exit $ac_status); }; } &&
12291 { ac_try='test -s conftest$ac_exeext'
12292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12293 (eval $ac_try) 2>&5
12294 ac_status=$?
12295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12296 (exit $ac_status); }; }; then
12297 eval "$as_ac_var=yes" 13064 eval "$as_ac_var=yes"
12298else 13065else
12299 echo "$as_me: failed program was:" >&5 13066 echo "$as_me: failed program was:" >&5
12300sed 's/^/| /' conftest.$ac_ext >&5 13067sed 's/^/| /' conftest.$ac_ext >&5
12301 13068
12302eval "$as_ac_var=no" 13069 eval "$as_ac_var=no"
12303fi 13070fi
12304rm -f conftest.err conftest.$ac_objext \ 13071
13072rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12305 conftest$ac_exeext conftest.$ac_ext 13073 conftest$ac_exeext conftest.$ac_ext
12306fi 13074fi
12307echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 13075ac_res=`eval echo '${'$as_ac_var'}'`
12308echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 13076 { echo "$as_me:$LINENO: result: $ac_res" >&5
13077echo "${ECHO_T}$ac_res" >&6; }
12309if test `eval echo '${'$as_ac_var'}'` = yes; then 13078if test `eval echo '${'$as_ac_var'}'` = yes; then
12310 cat >>confdefs.h <<_ACEOF 13079 cat >>confdefs.h <<_ACEOF
12311#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 13080#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -12317,8 +13086,8 @@ done
12317fi 13086fi
12318 13087
12319 13088
12320echo "$as_me:$LINENO: checking whether tcsendbreak is declared" >&5 13089{ echo "$as_me:$LINENO: checking whether tcsendbreak is declared" >&5
12321echo $ECHO_N "checking whether tcsendbreak is declared... $ECHO_C" >&6 13090echo $ECHO_N "checking whether tcsendbreak is declared... $ECHO_C" >&6; }
12322if test "${ac_cv_have_decl_tcsendbreak+set}" = set; then 13091if test "${ac_cv_have_decl_tcsendbreak+set}" = set; then
12323 echo $ECHO_N "(cached) $ECHO_C" >&6 13092 echo $ECHO_N "(cached) $ECHO_C" >&6
12324else 13093else
@@ -12335,7 +13104,7 @@ int
12335main () 13104main ()
12336{ 13105{
12337#ifndef tcsendbreak 13106#ifndef tcsendbreak
12338 char *p = (char *) tcsendbreak; 13107 (void) tcsendbreak;
12339#endif 13108#endif
12340 13109
12341 ; 13110 ;
@@ -12343,38 +13112,34 @@ main ()
12343} 13112}
12344_ACEOF 13113_ACEOF
12345rm -f conftest.$ac_objext 13114rm -f conftest.$ac_objext
12346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 13115if { (ac_try="$ac_compile"
12347 (eval $ac_compile) 2>conftest.er1 13116case "(($ac_try" in
13117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13118 *) ac_try_echo=$ac_try;;
13119esac
13120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13121 (eval "$ac_compile") 2>conftest.er1
12348 ac_status=$? 13122 ac_status=$?
12349 grep -v '^ *+' conftest.er1 >conftest.err 13123 grep -v '^ *+' conftest.er1 >conftest.err
12350 rm -f conftest.er1 13124 rm -f conftest.er1
12351 cat conftest.err >&5 13125 cat conftest.err >&5
12352 echo "$as_me:$LINENO: \$? = $ac_status" >&5 13126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12353 (exit $ac_status); } && 13127 (exit $ac_status); } && {
12354 { ac_try='test -z "$ac_c_werror_flag" 13128 test -z "$ac_c_werror_flag" ||
12355 || test ! -s conftest.err' 13129 test ! -s conftest.err
12356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 13130 } && test -s conftest.$ac_objext; then
12357 (eval $ac_try) 2>&5
12358 ac_status=$?
12359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12360 (exit $ac_status); }; } &&
12361 { ac_try='test -s conftest.$ac_objext'
12362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12363 (eval $ac_try) 2>&5
12364 ac_status=$?
12365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12366 (exit $ac_status); }; }; then
12367 ac_cv_have_decl_tcsendbreak=yes 13131 ac_cv_have_decl_tcsendbreak=yes
12368else 13132else
12369 echo "$as_me: failed program was:" >&5 13133 echo "$as_me: failed program was:" >&5
12370sed 's/^/| /' conftest.$ac_ext >&5 13134sed 's/^/| /' conftest.$ac_ext >&5
12371 13135
12372ac_cv_have_decl_tcsendbreak=no 13136 ac_cv_have_decl_tcsendbreak=no
12373fi 13137fi
12374rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 13138
13139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12375fi 13140fi
12376echo "$as_me:$LINENO: result: $ac_cv_have_decl_tcsendbreak" >&5 13141{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tcsendbreak" >&5
12377echo "${ECHO_T}$ac_cv_have_decl_tcsendbreak" >&6 13142echo "${ECHO_T}$ac_cv_have_decl_tcsendbreak" >&6; }
12378if test $ac_cv_have_decl_tcsendbreak = yes; then 13143if test $ac_cv_have_decl_tcsendbreak = yes; then
12379 cat >>confdefs.h <<\_ACEOF 13144 cat >>confdefs.h <<\_ACEOF
12380#define HAVE_TCSENDBREAK 1 13145#define HAVE_TCSENDBREAK 1
@@ -12385,9 +13150,9 @@ else
12385for ac_func in tcsendbreak 13150for ac_func in tcsendbreak
12386do 13151do
12387as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 13152as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12388echo "$as_me:$LINENO: checking for $ac_func" >&5 13153{ echo "$as_me:$LINENO: checking for $ac_func" >&5
12389echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 13154echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
12390if eval "test \"\${$as_ac_var+set}\" = set"; then 13155if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
12391 echo $ECHO_N "(cached) $ECHO_C" >&6 13156 echo $ECHO_N "(cached) $ECHO_C" >&6
12392else 13157else
12393 cat >conftest.$ac_ext <<_ACEOF 13158 cat >conftest.$ac_ext <<_ACEOF
@@ -12413,68 +13178,60 @@ cat >>conftest.$ac_ext <<_ACEOF
12413 13178
12414#undef $ac_func 13179#undef $ac_func
12415 13180
12416/* Override any gcc2 internal prototype to avoid an error. */ 13181/* Override any GCC internal prototype to avoid an error.
13182 Use char because int might match the return type of a GCC
13183 builtin and then its argument prototype would still apply. */
12417#ifdef __cplusplus 13184#ifdef __cplusplus
12418extern "C" 13185extern "C"
12419{
12420#endif 13186#endif
12421/* We use char because int might match the return type of a gcc2
12422 builtin and then its argument prototype would still apply. */
12423char $ac_func (); 13187char $ac_func ();
12424/* The GNU C library defines this for functions which it implements 13188/* The GNU C library defines this for functions which it implements
12425 to always fail with ENOSYS. Some functions are actually named 13189 to always fail with ENOSYS. Some functions are actually named
12426 something starting with __ and the normal name is an alias. */ 13190 something starting with __ and the normal name is an alias. */
12427#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 13191#if defined __stub_$ac_func || defined __stub___$ac_func
12428choke me 13192choke me
12429#else
12430char (*f) () = $ac_func;
12431#endif
12432#ifdef __cplusplus
12433}
12434#endif 13193#endif
12435 13194
12436int 13195int
12437main () 13196main ()
12438{ 13197{
12439return f != $ac_func; 13198return $ac_func ();
12440 ; 13199 ;
12441 return 0; 13200 return 0;
12442} 13201}
12443_ACEOF 13202_ACEOF
12444rm -f conftest.$ac_objext conftest$ac_exeext 13203rm -f conftest.$ac_objext conftest$ac_exeext
12445if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 13204if { (ac_try="$ac_link"
12446 (eval $ac_link) 2>conftest.er1 13205case "(($ac_try" in
13206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13207 *) ac_try_echo=$ac_try;;
13208esac
13209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13210 (eval "$ac_link") 2>conftest.er1
12447 ac_status=$? 13211 ac_status=$?
12448 grep -v '^ *+' conftest.er1 >conftest.err 13212 grep -v '^ *+' conftest.er1 >conftest.err
12449 rm -f conftest.er1 13213 rm -f conftest.er1
12450 cat conftest.err >&5 13214 cat conftest.err >&5
12451 echo "$as_me:$LINENO: \$? = $ac_status" >&5 13215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12452 (exit $ac_status); } && 13216 (exit $ac_status); } && {
12453 { ac_try='test -z "$ac_c_werror_flag" 13217 test -z "$ac_c_werror_flag" ||
12454 || test ! -s conftest.err' 13218 test ! -s conftest.err
12455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 13219 } && test -s conftest$ac_exeext &&
12456 (eval $ac_try) 2>&5 13220 $as_test_x conftest$ac_exeext; then
12457 ac_status=$?
12458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12459 (exit $ac_status); }; } &&
12460 { ac_try='test -s conftest$ac_exeext'
12461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12462 (eval $ac_try) 2>&5
12463 ac_status=$?
12464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12465 (exit $ac_status); }; }; then
12466 eval "$as_ac_var=yes" 13221 eval "$as_ac_var=yes"
12467else 13222else
12468 echo "$as_me: failed program was:" >&5 13223 echo "$as_me: failed program was:" >&5
12469sed 's/^/| /' conftest.$ac_ext >&5 13224sed 's/^/| /' conftest.$ac_ext >&5
12470 13225
12471eval "$as_ac_var=no" 13226 eval "$as_ac_var=no"
12472fi 13227fi
12473rm -f conftest.err conftest.$ac_objext \ 13228
13229rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12474 conftest$ac_exeext conftest.$ac_ext 13230 conftest$ac_exeext conftest.$ac_ext
12475fi 13231fi
12476echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 13232ac_res=`eval echo '${'$as_ac_var'}'`
12477echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 13233 { echo "$as_me:$LINENO: result: $ac_res" >&5
13234echo "${ECHO_T}$ac_res" >&6; }
12478if test `eval echo '${'$as_ac_var'}'` = yes; then 13235if test `eval echo '${'$as_ac_var'}'` = yes; then
12479 cat >>confdefs.h <<_ACEOF 13236 cat >>confdefs.h <<_ACEOF
12480#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 13237#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -12486,8 +13243,8 @@ done
12486fi 13243fi
12487 13244
12488 13245
12489echo "$as_me:$LINENO: checking whether h_errno is declared" >&5 13246{ echo "$as_me:$LINENO: checking whether h_errno is declared" >&5
12490echo $ECHO_N "checking whether h_errno is declared... $ECHO_C" >&6 13247echo $ECHO_N "checking whether h_errno is declared... $ECHO_C" >&6; }
12491if test "${ac_cv_have_decl_h_errno+set}" = set; then 13248if test "${ac_cv_have_decl_h_errno+set}" = set; then
12492 echo $ECHO_N "(cached) $ECHO_C" >&6 13249 echo $ECHO_N "(cached) $ECHO_C" >&6
12493else 13250else
@@ -12503,7 +13260,7 @@ int
12503main () 13260main ()
12504{ 13261{
12505#ifndef h_errno 13262#ifndef h_errno
12506 char *p = (char *) h_errno; 13263 (void) h_errno;
12507#endif 13264#endif
12508 13265
12509 ; 13266 ;
@@ -12511,38 +13268,34 @@ main ()
12511} 13268}
12512_ACEOF 13269_ACEOF
12513rm -f conftest.$ac_objext 13270rm -f conftest.$ac_objext
12514if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 13271if { (ac_try="$ac_compile"
12515 (eval $ac_compile) 2>conftest.er1 13272case "(($ac_try" in
13273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13274 *) ac_try_echo=$ac_try;;
13275esac
13276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13277 (eval "$ac_compile") 2>conftest.er1
12516 ac_status=$? 13278 ac_status=$?
12517 grep -v '^ *+' conftest.er1 >conftest.err 13279 grep -v '^ *+' conftest.er1 >conftest.err
12518 rm -f conftest.er1 13280 rm -f conftest.er1
12519 cat conftest.err >&5 13281 cat conftest.err >&5
12520 echo "$as_me:$LINENO: \$? = $ac_status" >&5 13282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12521 (exit $ac_status); } && 13283 (exit $ac_status); } && {
12522 { ac_try='test -z "$ac_c_werror_flag" 13284 test -z "$ac_c_werror_flag" ||
12523 || test ! -s conftest.err' 13285 test ! -s conftest.err
12524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 13286 } && test -s conftest.$ac_objext; then
12525 (eval $ac_try) 2>&5
12526 ac_status=$?
12527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12528 (exit $ac_status); }; } &&
12529 { ac_try='test -s conftest.$ac_objext'
12530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12531 (eval $ac_try) 2>&5
12532 ac_status=$?
12533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12534 (exit $ac_status); }; }; then
12535 ac_cv_have_decl_h_errno=yes 13287 ac_cv_have_decl_h_errno=yes
12536else 13288else
12537 echo "$as_me: failed program was:" >&5 13289 echo "$as_me: failed program was:" >&5
12538sed 's/^/| /' conftest.$ac_ext >&5 13290sed 's/^/| /' conftest.$ac_ext >&5
12539 13291
12540ac_cv_have_decl_h_errno=no 13292 ac_cv_have_decl_h_errno=no
12541fi 13293fi
12542rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 13294
13295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12543fi 13296fi
12544echo "$as_me:$LINENO: result: $ac_cv_have_decl_h_errno" >&5 13297{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_h_errno" >&5
12545echo "${ECHO_T}$ac_cv_have_decl_h_errno" >&6 13298echo "${ECHO_T}$ac_cv_have_decl_h_errno" >&6; }
12546if test $ac_cv_have_decl_h_errno = yes; then 13299if test $ac_cv_have_decl_h_errno = yes; then
12547 13300
12548cat >>confdefs.h <<_ACEOF 13301cat >>confdefs.h <<_ACEOF
@@ -12560,13 +13313,238 @@ fi
12560 13313
12561 13314
12562 13315
13316{ echo "$as_me:$LINENO: checking whether SHUT_RD is declared" >&5
13317echo $ECHO_N "checking whether SHUT_RD is declared... $ECHO_C" >&6; }
13318if test "${ac_cv_have_decl_SHUT_RD+set}" = set; then
13319 echo $ECHO_N "(cached) $ECHO_C" >&6
13320else
13321 cat >conftest.$ac_ext <<_ACEOF
13322/* confdefs.h. */
13323_ACEOF
13324cat confdefs.h >>conftest.$ac_ext
13325cat >>conftest.$ac_ext <<_ACEOF
13326/* end confdefs.h. */
13327
13328#include <sys/types.h>
13329#include <sys/socket.h>
13330
13331
13332int
13333main ()
13334{
13335#ifndef SHUT_RD
13336 (void) SHUT_RD;
13337#endif
13338
13339 ;
13340 return 0;
13341}
13342_ACEOF
13343rm -f conftest.$ac_objext
13344if { (ac_try="$ac_compile"
13345case "(($ac_try" in
13346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13347 *) ac_try_echo=$ac_try;;
13348esac
13349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13350 (eval "$ac_compile") 2>conftest.er1
13351 ac_status=$?
13352 grep -v '^ *+' conftest.er1 >conftest.err
13353 rm -f conftest.er1
13354 cat conftest.err >&5
13355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13356 (exit $ac_status); } && {
13357 test -z "$ac_c_werror_flag" ||
13358 test ! -s conftest.err
13359 } && test -s conftest.$ac_objext; then
13360 ac_cv_have_decl_SHUT_RD=yes
13361else
13362 echo "$as_me: failed program was:" >&5
13363sed 's/^/| /' conftest.$ac_ext >&5
13364
13365 ac_cv_have_decl_SHUT_RD=no
13366fi
13367
13368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13369fi
13370{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_SHUT_RD" >&5
13371echo "${ECHO_T}$ac_cv_have_decl_SHUT_RD" >&6; }
13372if test $ac_cv_have_decl_SHUT_RD = yes; then
13373
13374cat >>confdefs.h <<_ACEOF
13375#define HAVE_DECL_SHUT_RD 1
13376_ACEOF
13377
13378
13379else
13380 cat >>confdefs.h <<_ACEOF
13381#define HAVE_DECL_SHUT_RD 0
13382_ACEOF
13383
13384
13385fi
13386
13387
13388
13389{ echo "$as_me:$LINENO: checking whether O_NONBLOCK is declared" >&5
13390echo $ECHO_N "checking whether O_NONBLOCK is declared... $ECHO_C" >&6; }
13391if test "${ac_cv_have_decl_O_NONBLOCK+set}" = set; then
13392 echo $ECHO_N "(cached) $ECHO_C" >&6
13393else
13394 cat >conftest.$ac_ext <<_ACEOF
13395/* confdefs.h. */
13396_ACEOF
13397cat confdefs.h >>conftest.$ac_ext
13398cat >>conftest.$ac_ext <<_ACEOF
13399/* end confdefs.h. */
13400
13401#include <sys/types.h>
13402#ifdef HAVE_SYS_STAT_H
13403# include <sys/stat.h>
13404#endif
13405#ifdef HAVE_FCNTL_H
13406# include <fcntl.h>
13407#endif
13408
13409
13410int
13411main ()
13412{
13413#ifndef O_NONBLOCK
13414 (void) O_NONBLOCK;
13415#endif
13416
13417 ;
13418 return 0;
13419}
13420_ACEOF
13421rm -f conftest.$ac_objext
13422if { (ac_try="$ac_compile"
13423case "(($ac_try" in
13424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13425 *) ac_try_echo=$ac_try;;
13426esac
13427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13428 (eval "$ac_compile") 2>conftest.er1
13429 ac_status=$?
13430 grep -v '^ *+' conftest.er1 >conftest.err
13431 rm -f conftest.er1
13432 cat conftest.err >&5
13433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13434 (exit $ac_status); } && {
13435 test -z "$ac_c_werror_flag" ||
13436 test ! -s conftest.err
13437 } && test -s conftest.$ac_objext; then
13438 ac_cv_have_decl_O_NONBLOCK=yes
13439else
13440 echo "$as_me: failed program was:" >&5
13441sed 's/^/| /' conftest.$ac_ext >&5
13442
13443 ac_cv_have_decl_O_NONBLOCK=no
13444fi
13445
13446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13447fi
13448{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_O_NONBLOCK" >&5
13449echo "${ECHO_T}$ac_cv_have_decl_O_NONBLOCK" >&6; }
13450if test $ac_cv_have_decl_O_NONBLOCK = yes; then
13451
13452cat >>confdefs.h <<_ACEOF
13453#define HAVE_DECL_O_NONBLOCK 1
13454_ACEOF
13455
13456
13457else
13458 cat >>confdefs.h <<_ACEOF
13459#define HAVE_DECL_O_NONBLOCK 0
13460_ACEOF
13461
13462
13463fi
13464
13465
13466
13467{ echo "$as_me:$LINENO: checking whether writev is declared" >&5
13468echo $ECHO_N "checking whether writev is declared... $ECHO_C" >&6; }
13469if test "${ac_cv_have_decl_writev+set}" = set; then
13470 echo $ECHO_N "(cached) $ECHO_C" >&6
13471else
13472 cat >conftest.$ac_ext <<_ACEOF
13473/* confdefs.h. */
13474_ACEOF
13475cat confdefs.h >>conftest.$ac_ext
13476cat >>conftest.$ac_ext <<_ACEOF
13477/* end confdefs.h. */
13478
13479#include <sys/types.h>
13480#include <sys/uio.h>
13481#include <unistd.h>
13482
13483
13484int
13485main ()
13486{
13487#ifndef writev
13488 (void) writev;
13489#endif
13490
13491 ;
13492 return 0;
13493}
13494_ACEOF
13495rm -f conftest.$ac_objext
13496if { (ac_try="$ac_compile"
13497case "(($ac_try" in
13498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13499 *) ac_try_echo=$ac_try;;
13500esac
13501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13502 (eval "$ac_compile") 2>conftest.er1
13503 ac_status=$?
13504 grep -v '^ *+' conftest.er1 >conftest.err
13505 rm -f conftest.er1
13506 cat conftest.err >&5
13507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13508 (exit $ac_status); } && {
13509 test -z "$ac_c_werror_flag" ||
13510 test ! -s conftest.err
13511 } && test -s conftest.$ac_objext; then
13512 ac_cv_have_decl_writev=yes
13513else
13514 echo "$as_me: failed program was:" >&5
13515sed 's/^/| /' conftest.$ac_ext >&5
13516
13517 ac_cv_have_decl_writev=no
13518fi
13519
13520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13521fi
13522{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_writev" >&5
13523echo "${ECHO_T}$ac_cv_have_decl_writev" >&6; }
13524if test $ac_cv_have_decl_writev = yes; then
13525
13526cat >>confdefs.h <<_ACEOF
13527#define HAVE_DECL_WRITEV 1
13528_ACEOF
13529
13530
13531else
13532 cat >>confdefs.h <<_ACEOF
13533#define HAVE_DECL_WRITEV 0
13534_ACEOF
13535
13536
13537fi
13538
13539
13540
12563 13541
12564for ac_func in setresuid 13542for ac_func in setresuid
12565do 13543do
12566as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 13544as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12567echo "$as_me:$LINENO: checking for $ac_func" >&5 13545{ echo "$as_me:$LINENO: checking for $ac_func" >&5
12568echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 13546echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
12569if eval "test \"\${$as_ac_var+set}\" = set"; then 13547if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
12570 echo $ECHO_N "(cached) $ECHO_C" >&6 13548 echo $ECHO_N "(cached) $ECHO_C" >&6
12571else 13549else
12572 cat >conftest.$ac_ext <<_ACEOF 13550 cat >conftest.$ac_ext <<_ACEOF
@@ -12592,75 +13570,67 @@ cat >>conftest.$ac_ext <<_ACEOF
12592 13570
12593#undef $ac_func 13571#undef $ac_func
12594 13572
12595/* Override any gcc2 internal prototype to avoid an error. */ 13573/* Override any GCC internal prototype to avoid an error.
13574 Use char because int might match the return type of a GCC
13575 builtin and then its argument prototype would still apply. */
12596#ifdef __cplusplus 13576#ifdef __cplusplus
12597extern "C" 13577extern "C"
12598{
12599#endif 13578#endif
12600/* We use char because int might match the return type of a gcc2
12601 builtin and then its argument prototype would still apply. */
12602char $ac_func (); 13579char $ac_func ();
12603/* The GNU C library defines this for functions which it implements 13580/* The GNU C library defines this for functions which it implements
12604 to always fail with ENOSYS. Some functions are actually named 13581 to always fail with ENOSYS. Some functions are actually named
12605 something starting with __ and the normal name is an alias. */ 13582 something starting with __ and the normal name is an alias. */
12606#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 13583#if defined __stub_$ac_func || defined __stub___$ac_func
12607choke me 13584choke me
12608#else
12609char (*f) () = $ac_func;
12610#endif
12611#ifdef __cplusplus
12612}
12613#endif 13585#endif
12614 13586
12615int 13587int
12616main () 13588main ()
12617{ 13589{
12618return f != $ac_func; 13590return $ac_func ();
12619 ; 13591 ;
12620 return 0; 13592 return 0;
12621} 13593}
12622_ACEOF 13594_ACEOF
12623rm -f conftest.$ac_objext conftest$ac_exeext 13595rm -f conftest.$ac_objext conftest$ac_exeext
12624if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 13596if { (ac_try="$ac_link"
12625 (eval $ac_link) 2>conftest.er1 13597case "(($ac_try" in
13598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13599 *) ac_try_echo=$ac_try;;
13600esac
13601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13602 (eval "$ac_link") 2>conftest.er1
12626 ac_status=$? 13603 ac_status=$?
12627 grep -v '^ *+' conftest.er1 >conftest.err 13604 grep -v '^ *+' conftest.er1 >conftest.err
12628 rm -f conftest.er1 13605 rm -f conftest.er1
12629 cat conftest.err >&5 13606 cat conftest.err >&5
12630 echo "$as_me:$LINENO: \$? = $ac_status" >&5 13607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12631 (exit $ac_status); } && 13608 (exit $ac_status); } && {
12632 { ac_try='test -z "$ac_c_werror_flag" 13609 test -z "$ac_c_werror_flag" ||
12633 || test ! -s conftest.err' 13610 test ! -s conftest.err
12634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 13611 } && test -s conftest$ac_exeext &&
12635 (eval $ac_try) 2>&5 13612 $as_test_x conftest$ac_exeext; then
12636 ac_status=$?
12637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12638 (exit $ac_status); }; } &&
12639 { ac_try='test -s conftest$ac_exeext'
12640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12641 (eval $ac_try) 2>&5
12642 ac_status=$?
12643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12644 (exit $ac_status); }; }; then
12645 eval "$as_ac_var=yes" 13613 eval "$as_ac_var=yes"
12646else 13614else
12647 echo "$as_me: failed program was:" >&5 13615 echo "$as_me: failed program was:" >&5
12648sed 's/^/| /' conftest.$ac_ext >&5 13616sed 's/^/| /' conftest.$ac_ext >&5
12649 13617
12650eval "$as_ac_var=no" 13618 eval "$as_ac_var=no"
12651fi 13619fi
12652rm -f conftest.err conftest.$ac_objext \ 13620
13621rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12653 conftest$ac_exeext conftest.$ac_ext 13622 conftest$ac_exeext conftest.$ac_ext
12654fi 13623fi
12655echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 13624ac_res=`eval echo '${'$as_ac_var'}'`
12656echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 13625 { echo "$as_me:$LINENO: result: $ac_res" >&5
13626echo "${ECHO_T}$ac_res" >&6; }
12657if test `eval echo '${'$as_ac_var'}'` = yes; then 13627if test `eval echo '${'$as_ac_var'}'` = yes; then
12658 cat >>confdefs.h <<_ACEOF 13628 cat >>confdefs.h <<_ACEOF
12659#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 13629#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12660_ACEOF 13630_ACEOF
12661 13631
12662 echo "$as_me:$LINENO: checking if setresuid seems to work" >&5 13632 { echo "$as_me:$LINENO: checking if setresuid seems to work" >&5
12663echo $ECHO_N "checking if setresuid seems to work... $ECHO_C" >&6 13633echo $ECHO_N "checking if setresuid seems to work... $ECHO_C" >&6; }
12664 if test "$cross_compiling" = yes; then 13634 if test "$cross_compiling" = yes; then
12665 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking setresuid" >&5 13635 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking setresuid" >&5
12666echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;} 13636echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
@@ -12679,18 +13649,27 @@ int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
12679 13649
12680_ACEOF 13650_ACEOF
12681rm -f conftest$ac_exeext 13651rm -f conftest$ac_exeext
12682if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 13652if { (ac_try="$ac_link"
12683 (eval $ac_link) 2>&5 13653case "(($ac_try" in
13654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13655 *) ac_try_echo=$ac_try;;
13656esac
13657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13658 (eval "$ac_link") 2>&5
12684 ac_status=$? 13659 ac_status=$?
12685 echo "$as_me:$LINENO: \$? = $ac_status" >&5 13660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12686 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 13661 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 13662 { (case "(($ac_try" in
12688 (eval $ac_try) 2>&5 13663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13664 *) ac_try_echo=$ac_try;;
13665esac
13666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13667 (eval "$ac_try") 2>&5
12689 ac_status=$? 13668 ac_status=$?
12690 echo "$as_me:$LINENO: \$? = $ac_status" >&5 13669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12691 (exit $ac_status); }; }; then 13670 (exit $ac_status); }; }; then
12692 echo "$as_me:$LINENO: result: yes" >&5 13671 { echo "$as_me:$LINENO: result: yes" >&5
12693echo "${ECHO_T}yes" >&6 13672echo "${ECHO_T}yes" >&6; }
12694else 13673else
12695 echo "$as_me: program exited with status $ac_status" >&5 13674 echo "$as_me: program exited with status $ac_status" >&5
12696echo "$as_me: failed program was:" >&5 13675echo "$as_me: failed program was:" >&5
@@ -12702,12 +13681,14 @@ cat >>confdefs.h <<\_ACEOF
12702#define BROKEN_SETRESUID 1 13681#define BROKEN_SETRESUID 1
12703_ACEOF 13682_ACEOF
12704 13683
12705 echo "$as_me:$LINENO: result: not implemented" >&5 13684 { echo "$as_me:$LINENO: result: not implemented" >&5
12706echo "${ECHO_T}not implemented" >&6 13685echo "${ECHO_T}not implemented" >&6; }
12707fi 13686fi
12708rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 13687rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12709fi 13688fi
12710 13689
13690
13691
12711fi 13692fi
12712done 13693done
12713 13694
@@ -12716,9 +13697,9 @@ done
12716for ac_func in setresgid 13697for ac_func in setresgid
12717do 13698do
12718as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 13699as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12719echo "$as_me:$LINENO: checking for $ac_func" >&5 13700{ echo "$as_me:$LINENO: checking for $ac_func" >&5
12720echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 13701echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
12721if eval "test \"\${$as_ac_var+set}\" = set"; then 13702if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
12722 echo $ECHO_N "(cached) $ECHO_C" >&6 13703 echo $ECHO_N "(cached) $ECHO_C" >&6
12723else 13704else
12724 cat >conftest.$ac_ext <<_ACEOF 13705 cat >conftest.$ac_ext <<_ACEOF
@@ -12744,75 +13725,67 @@ cat >>conftest.$ac_ext <<_ACEOF
12744 13725
12745#undef $ac_func 13726#undef $ac_func
12746 13727
12747/* Override any gcc2 internal prototype to avoid an error. */ 13728/* Override any GCC internal prototype to avoid an error.
13729 Use char because int might match the return type of a GCC
13730 builtin and then its argument prototype would still apply. */
12748#ifdef __cplusplus 13731#ifdef __cplusplus
12749extern "C" 13732extern "C"
12750{
12751#endif 13733#endif
12752/* We use char because int might match the return type of a gcc2
12753 builtin and then its argument prototype would still apply. */
12754char $ac_func (); 13734char $ac_func ();
12755/* The GNU C library defines this for functions which it implements 13735/* The GNU C library defines this for functions which it implements
12756 to always fail with ENOSYS. Some functions are actually named 13736 to always fail with ENOSYS. Some functions are actually named
12757 something starting with __ and the normal name is an alias. */ 13737 something starting with __ and the normal name is an alias. */
12758#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 13738#if defined __stub_$ac_func || defined __stub___$ac_func
12759choke me 13739choke me
12760#else
12761char (*f) () = $ac_func;
12762#endif
12763#ifdef __cplusplus
12764}
12765#endif 13740#endif
12766 13741
12767int 13742int
12768main () 13743main ()
12769{ 13744{
12770return f != $ac_func; 13745return $ac_func ();
12771 ; 13746 ;
12772 return 0; 13747 return 0;
12773} 13748}
12774_ACEOF 13749_ACEOF
12775rm -f conftest.$ac_objext conftest$ac_exeext 13750rm -f conftest.$ac_objext conftest$ac_exeext
12776if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 13751if { (ac_try="$ac_link"
12777 (eval $ac_link) 2>conftest.er1 13752case "(($ac_try" in
13753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13754 *) ac_try_echo=$ac_try;;
13755esac
13756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13757 (eval "$ac_link") 2>conftest.er1
12778 ac_status=$? 13758 ac_status=$?
12779 grep -v '^ *+' conftest.er1 >conftest.err 13759 grep -v '^ *+' conftest.er1 >conftest.err
12780 rm -f conftest.er1 13760 rm -f conftest.er1
12781 cat conftest.err >&5 13761 cat conftest.err >&5
12782 echo "$as_me:$LINENO: \$? = $ac_status" >&5 13762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12783 (exit $ac_status); } && 13763 (exit $ac_status); } && {
12784 { ac_try='test -z "$ac_c_werror_flag" 13764 test -z "$ac_c_werror_flag" ||
12785 || test ! -s conftest.err' 13765 test ! -s conftest.err
12786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 13766 } && test -s conftest$ac_exeext &&
12787 (eval $ac_try) 2>&5 13767 $as_test_x conftest$ac_exeext; then
12788 ac_status=$?
12789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12790 (exit $ac_status); }; } &&
12791 { ac_try='test -s conftest$ac_exeext'
12792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12793 (eval $ac_try) 2>&5
12794 ac_status=$?
12795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12796 (exit $ac_status); }; }; then
12797 eval "$as_ac_var=yes" 13768 eval "$as_ac_var=yes"
12798else 13769else
12799 echo "$as_me: failed program was:" >&5 13770 echo "$as_me: failed program was:" >&5
12800sed 's/^/| /' conftest.$ac_ext >&5 13771sed 's/^/| /' conftest.$ac_ext >&5
12801 13772
12802eval "$as_ac_var=no" 13773 eval "$as_ac_var=no"
12803fi 13774fi
12804rm -f conftest.err conftest.$ac_objext \ 13775
13776rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12805 conftest$ac_exeext conftest.$ac_ext 13777 conftest$ac_exeext conftest.$ac_ext
12806fi 13778fi
12807echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 13779ac_res=`eval echo '${'$as_ac_var'}'`
12808echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 13780 { echo "$as_me:$LINENO: result: $ac_res" >&5
13781echo "${ECHO_T}$ac_res" >&6; }
12809if test `eval echo '${'$as_ac_var'}'` = yes; then 13782if test `eval echo '${'$as_ac_var'}'` = yes; then
12810 cat >>confdefs.h <<_ACEOF 13783 cat >>confdefs.h <<_ACEOF
12811#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 13784#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12812_ACEOF 13785_ACEOF
12813 13786
12814 echo "$as_me:$LINENO: checking if setresgid seems to work" >&5 13787 { echo "$as_me:$LINENO: checking if setresgid seems to work" >&5
12815echo $ECHO_N "checking if setresgid seems to work... $ECHO_C" >&6 13788echo $ECHO_N "checking if setresgid seems to work... $ECHO_C" >&6; }
12816 if test "$cross_compiling" = yes; then 13789 if test "$cross_compiling" = yes; then
12817 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking setresuid" >&5 13790 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking setresuid" >&5
12818echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;} 13791echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
@@ -12831,18 +13804,27 @@ int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
12831 13804
12832_ACEOF 13805_ACEOF
12833rm -f conftest$ac_exeext 13806rm -f conftest$ac_exeext
12834if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 13807if { (ac_try="$ac_link"
12835 (eval $ac_link) 2>&5 13808case "(($ac_try" in
13809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13810 *) ac_try_echo=$ac_try;;
13811esac
13812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13813 (eval "$ac_link") 2>&5
12836 ac_status=$? 13814 ac_status=$?
12837 echo "$as_me:$LINENO: \$? = $ac_status" >&5 13815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12838 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 13816 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 13817 { (case "(($ac_try" in
12840 (eval $ac_try) 2>&5 13818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13819 *) ac_try_echo=$ac_try;;
13820esac
13821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13822 (eval "$ac_try") 2>&5
12841 ac_status=$? 13823 ac_status=$?
12842 echo "$as_me:$LINENO: \$? = $ac_status" >&5 13824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12843 (exit $ac_status); }; }; then 13825 (exit $ac_status); }; }; then
12844 echo "$as_me:$LINENO: result: yes" >&5 13826 { echo "$as_me:$LINENO: result: yes" >&5
12845echo "${ECHO_T}yes" >&6 13827echo "${ECHO_T}yes" >&6; }
12846else 13828else
12847 echo "$as_me: program exited with status $ac_status" >&5 13829 echo "$as_me: program exited with status $ac_status" >&5
12848echo "$as_me: failed program was:" >&5 13830echo "$as_me: failed program was:" >&5
@@ -12854,12 +13836,14 @@ cat >>confdefs.h <<\_ACEOF
12854#define BROKEN_SETRESGID 1 13836#define BROKEN_SETRESGID 1
12855_ACEOF 13837_ACEOF
12856 13838
12857 echo "$as_me:$LINENO: result: not implemented" >&5 13839 { echo "$as_me:$LINENO: result: not implemented" >&5
12858echo "${ECHO_T}not implemented" >&6 13840echo "${ECHO_T}not implemented" >&6; }
12859fi 13841fi
12860rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 13842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12861fi 13843fi
12862 13844
13845
13846
12863fi 13847fi
12864done 13848done
12865 13849
@@ -12869,9 +13853,9 @@ done
12869for ac_func in gettimeofday time 13853for ac_func in gettimeofday time
12870do 13854do
12871as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 13855as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12872echo "$as_me:$LINENO: checking for $ac_func" >&5 13856{ echo "$as_me:$LINENO: checking for $ac_func" >&5
12873echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 13857echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
12874if eval "test \"\${$as_ac_var+set}\" = set"; then 13858if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
12875 echo $ECHO_N "(cached) $ECHO_C" >&6 13859 echo $ECHO_N "(cached) $ECHO_C" >&6
12876else 13860else
12877 cat >conftest.$ac_ext <<_ACEOF 13861 cat >conftest.$ac_ext <<_ACEOF
@@ -12897,68 +13881,60 @@ cat >>conftest.$ac_ext <<_ACEOF
12897 13881
12898#undef $ac_func 13882#undef $ac_func
12899 13883
12900/* Override any gcc2 internal prototype to avoid an error. */ 13884/* Override any GCC internal prototype to avoid an error.
13885 Use char because int might match the return type of a GCC
13886 builtin and then its argument prototype would still apply. */
12901#ifdef __cplusplus 13887#ifdef __cplusplus
12902extern "C" 13888extern "C"
12903{
12904#endif 13889#endif
12905/* We use char because int might match the return type of a gcc2
12906 builtin and then its argument prototype would still apply. */
12907char $ac_func (); 13890char $ac_func ();
12908/* The GNU C library defines this for functions which it implements 13891/* The GNU C library defines this for functions which it implements
12909 to always fail with ENOSYS. Some functions are actually named 13892 to always fail with ENOSYS. Some functions are actually named
12910 something starting with __ and the normal name is an alias. */ 13893 something starting with __ and the normal name is an alias. */
12911#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 13894#if defined __stub_$ac_func || defined __stub___$ac_func
12912choke me 13895choke me
12913#else
12914char (*f) () = $ac_func;
12915#endif
12916#ifdef __cplusplus
12917}
12918#endif 13896#endif
12919 13897
12920int 13898int
12921main () 13899main ()
12922{ 13900{
12923return f != $ac_func; 13901return $ac_func ();
12924 ; 13902 ;
12925 return 0; 13903 return 0;
12926} 13904}
12927_ACEOF 13905_ACEOF
12928rm -f conftest.$ac_objext conftest$ac_exeext 13906rm -f conftest.$ac_objext conftest$ac_exeext
12929if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 13907if { (ac_try="$ac_link"
12930 (eval $ac_link) 2>conftest.er1 13908case "(($ac_try" in
13909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13910 *) ac_try_echo=$ac_try;;
13911esac
13912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13913 (eval "$ac_link") 2>conftest.er1
12931 ac_status=$? 13914 ac_status=$?
12932 grep -v '^ *+' conftest.er1 >conftest.err 13915 grep -v '^ *+' conftest.er1 >conftest.err
12933 rm -f conftest.er1 13916 rm -f conftest.er1
12934 cat conftest.err >&5 13917 cat conftest.err >&5
12935 echo "$as_me:$LINENO: \$? = $ac_status" >&5 13918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12936 (exit $ac_status); } && 13919 (exit $ac_status); } && {
12937 { ac_try='test -z "$ac_c_werror_flag" 13920 test -z "$ac_c_werror_flag" ||
12938 || test ! -s conftest.err' 13921 test ! -s conftest.err
12939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 13922 } && test -s conftest$ac_exeext &&
12940 (eval $ac_try) 2>&5 13923 $as_test_x conftest$ac_exeext; then
12941 ac_status=$?
12942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12943 (exit $ac_status); }; } &&
12944 { ac_try='test -s conftest$ac_exeext'
12945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12946 (eval $ac_try) 2>&5
12947 ac_status=$?
12948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12949 (exit $ac_status); }; }; then
12950 eval "$as_ac_var=yes" 13924 eval "$as_ac_var=yes"
12951else 13925else
12952 echo "$as_me: failed program was:" >&5 13926 echo "$as_me: failed program was:" >&5
12953sed 's/^/| /' conftest.$ac_ext >&5 13927sed 's/^/| /' conftest.$ac_ext >&5
12954 13928
12955eval "$as_ac_var=no" 13929 eval "$as_ac_var=no"
12956fi 13930fi
12957rm -f conftest.err conftest.$ac_objext \ 13931
13932rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12958 conftest$ac_exeext conftest.$ac_ext 13933 conftest$ac_exeext conftest.$ac_ext
12959fi 13934fi
12960echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 13935ac_res=`eval echo '${'$as_ac_var'}'`
12961echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 13936 { echo "$as_me:$LINENO: result: $ac_res" >&5
13937echo "${ECHO_T}$ac_res" >&6; }
12962if test `eval echo '${'$as_ac_var'}'` = yes; then 13938if test `eval echo '${'$as_ac_var'}'` = yes; then
12963 cat >>confdefs.h <<_ACEOF 13939 cat >>confdefs.h <<_ACEOF
12964#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 13940#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -12976,9 +13952,9 @@ done
12976for ac_func in endutent getutent getutid getutline pututline setutent 13952for ac_func in endutent getutent getutid getutline pututline setutent
12977do 13953do
12978as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 13954as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12979echo "$as_me:$LINENO: checking for $ac_func" >&5 13955{ echo "$as_me:$LINENO: checking for $ac_func" >&5
12980echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 13956echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
12981if eval "test \"\${$as_ac_var+set}\" = set"; then 13957if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
12982 echo $ECHO_N "(cached) $ECHO_C" >&6 13958 echo $ECHO_N "(cached) $ECHO_C" >&6
12983else 13959else
12984 cat >conftest.$ac_ext <<_ACEOF 13960 cat >conftest.$ac_ext <<_ACEOF
@@ -13004,68 +13980,60 @@ cat >>conftest.$ac_ext <<_ACEOF
13004 13980
13005#undef $ac_func 13981#undef $ac_func
13006 13982
13007/* Override any gcc2 internal prototype to avoid an error. */ 13983/* Override any GCC internal prototype to avoid an error.
13984 Use char because int might match the return type of a GCC
13985 builtin and then its argument prototype would still apply. */
13008#ifdef __cplusplus 13986#ifdef __cplusplus
13009extern "C" 13987extern "C"
13010{
13011#endif 13988#endif
13012/* We use char because int might match the return type of a gcc2
13013 builtin and then its argument prototype would still apply. */
13014char $ac_func (); 13989char $ac_func ();
13015/* The GNU C library defines this for functions which it implements 13990/* The GNU C library defines this for functions which it implements
13016 to always fail with ENOSYS. Some functions are actually named 13991 to always fail with ENOSYS. Some functions are actually named
13017 something starting with __ and the normal name is an alias. */ 13992 something starting with __ and the normal name is an alias. */
13018#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 13993#if defined __stub_$ac_func || defined __stub___$ac_func
13019choke me 13994choke me
13020#else
13021char (*f) () = $ac_func;
13022#endif
13023#ifdef __cplusplus
13024}
13025#endif 13995#endif
13026 13996
13027int 13997int
13028main () 13998main ()
13029{ 13999{
13030return f != $ac_func; 14000return $ac_func ();
13031 ; 14001 ;
13032 return 0; 14002 return 0;
13033} 14003}
13034_ACEOF 14004_ACEOF
13035rm -f conftest.$ac_objext conftest$ac_exeext 14005rm -f conftest.$ac_objext conftest$ac_exeext
13036if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 14006if { (ac_try="$ac_link"
13037 (eval $ac_link) 2>conftest.er1 14007case "(($ac_try" in
14008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14009 *) ac_try_echo=$ac_try;;
14010esac
14011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14012 (eval "$ac_link") 2>conftest.er1
13038 ac_status=$? 14013 ac_status=$?
13039 grep -v '^ *+' conftest.er1 >conftest.err 14014 grep -v '^ *+' conftest.er1 >conftest.err
13040 rm -f conftest.er1 14015 rm -f conftest.er1
13041 cat conftest.err >&5 14016 cat conftest.err >&5
13042 echo "$as_me:$LINENO: \$? = $ac_status" >&5 14017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13043 (exit $ac_status); } && 14018 (exit $ac_status); } && {
13044 { ac_try='test -z "$ac_c_werror_flag" 14019 test -z "$ac_c_werror_flag" ||
13045 || test ! -s conftest.err' 14020 test ! -s conftest.err
13046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 14021 } && test -s conftest$ac_exeext &&
13047 (eval $ac_try) 2>&5 14022 $as_test_x conftest$ac_exeext; then
13048 ac_status=$?
13049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13050 (exit $ac_status); }; } &&
13051 { ac_try='test -s conftest$ac_exeext'
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 eval "$as_ac_var=yes" 14023 eval "$as_ac_var=yes"
13058else 14024else
13059 echo "$as_me: failed program was:" >&5 14025 echo "$as_me: failed program was:" >&5
13060sed 's/^/| /' conftest.$ac_ext >&5 14026sed 's/^/| /' conftest.$ac_ext >&5
13061 14027
13062eval "$as_ac_var=no" 14028 eval "$as_ac_var=no"
13063fi 14029fi
13064rm -f conftest.err conftest.$ac_objext \ 14030
14031rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13065 conftest$ac_exeext conftest.$ac_ext 14032 conftest$ac_exeext conftest.$ac_ext
13066fi 14033fi
13067echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 14034ac_res=`eval echo '${'$as_ac_var'}'`
13068echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 14035 { echo "$as_me:$LINENO: result: $ac_res" >&5
14036echo "${ECHO_T}$ac_res" >&6; }
13069if test `eval echo '${'$as_ac_var'}'` = yes; then 14037if test `eval echo '${'$as_ac_var'}'` = yes; then
13070 cat >>confdefs.h <<_ACEOF 14038 cat >>confdefs.h <<_ACEOF
13071#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 14039#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -13078,9 +14046,9 @@ done
13078for ac_func in utmpname 14046for ac_func in utmpname
13079do 14047do
13080as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 14048as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13081echo "$as_me:$LINENO: checking for $ac_func" >&5 14049{ echo "$as_me:$LINENO: checking for $ac_func" >&5
13082echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 14050echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
13083if eval "test \"\${$as_ac_var+set}\" = set"; then 14051if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
13084 echo $ECHO_N "(cached) $ECHO_C" >&6 14052 echo $ECHO_N "(cached) $ECHO_C" >&6
13085else 14053else
13086 cat >conftest.$ac_ext <<_ACEOF 14054 cat >conftest.$ac_ext <<_ACEOF
@@ -13106,68 +14074,60 @@ cat >>conftest.$ac_ext <<_ACEOF
13106 14074
13107#undef $ac_func 14075#undef $ac_func
13108 14076
13109/* Override any gcc2 internal prototype to avoid an error. */ 14077/* Override any GCC internal prototype to avoid an error.
14078 Use char because int might match the return type of a GCC
14079 builtin and then its argument prototype would still apply. */
13110#ifdef __cplusplus 14080#ifdef __cplusplus
13111extern "C" 14081extern "C"
13112{
13113#endif 14082#endif
13114/* We use char because int might match the return type of a gcc2
13115 builtin and then its argument prototype would still apply. */
13116char $ac_func (); 14083char $ac_func ();
13117/* The GNU C library defines this for functions which it implements 14084/* The GNU C library defines this for functions which it implements
13118 to always fail with ENOSYS. Some functions are actually named 14085 to always fail with ENOSYS. Some functions are actually named
13119 something starting with __ and the normal name is an alias. */ 14086 something starting with __ and the normal name is an alias. */
13120#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 14087#if defined __stub_$ac_func || defined __stub___$ac_func
13121choke me 14088choke me
13122#else
13123char (*f) () = $ac_func;
13124#endif
13125#ifdef __cplusplus
13126}
13127#endif 14089#endif
13128 14090
13129int 14091int
13130main () 14092main ()
13131{ 14093{
13132return f != $ac_func; 14094return $ac_func ();
13133 ; 14095 ;
13134 return 0; 14096 return 0;
13135} 14097}
13136_ACEOF 14098_ACEOF
13137rm -f conftest.$ac_objext conftest$ac_exeext 14099rm -f conftest.$ac_objext conftest$ac_exeext
13138if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 14100if { (ac_try="$ac_link"
13139 (eval $ac_link) 2>conftest.er1 14101case "(($ac_try" in
14102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14103 *) ac_try_echo=$ac_try;;
14104esac
14105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14106 (eval "$ac_link") 2>conftest.er1
13140 ac_status=$? 14107 ac_status=$?
13141 grep -v '^ *+' conftest.er1 >conftest.err 14108 grep -v '^ *+' conftest.er1 >conftest.err
13142 rm -f conftest.er1 14109 rm -f conftest.er1
13143 cat conftest.err >&5 14110 cat conftest.err >&5
13144 echo "$as_me:$LINENO: \$? = $ac_status" >&5 14111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13145 (exit $ac_status); } && 14112 (exit $ac_status); } && {
13146 { ac_try='test -z "$ac_c_werror_flag" 14113 test -z "$ac_c_werror_flag" ||
13147 || test ! -s conftest.err' 14114 test ! -s conftest.err
13148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 14115 } && test -s conftest$ac_exeext &&
13149 (eval $ac_try) 2>&5 14116 $as_test_x conftest$ac_exeext; then
13150 ac_status=$?
13151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13152 (exit $ac_status); }; } &&
13153 { ac_try='test -s conftest$ac_exeext'
13154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13155 (eval $ac_try) 2>&5
13156 ac_status=$?
13157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13158 (exit $ac_status); }; }; then
13159 eval "$as_ac_var=yes" 14117 eval "$as_ac_var=yes"
13160else 14118else
13161 echo "$as_me: failed program was:" >&5 14119 echo "$as_me: failed program was:" >&5
13162sed 's/^/| /' conftest.$ac_ext >&5 14120sed 's/^/| /' conftest.$ac_ext >&5
13163 14121
13164eval "$as_ac_var=no" 14122 eval "$as_ac_var=no"
13165fi 14123fi
13166rm -f conftest.err conftest.$ac_objext \ 14124
14125rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13167 conftest$ac_exeext conftest.$ac_ext 14126 conftest$ac_exeext conftest.$ac_ext
13168fi 14127fi
13169echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 14128ac_res=`eval echo '${'$as_ac_var'}'`
13170echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 14129 { echo "$as_me:$LINENO: result: $ac_res" >&5
14130echo "${ECHO_T}$ac_res" >&6; }
13171if test `eval echo '${'$as_ac_var'}'` = yes; then 14131if test `eval echo '${'$as_ac_var'}'` = yes; then
13172 cat >>confdefs.h <<_ACEOF 14132 cat >>confdefs.h <<_ACEOF
13173#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 14133#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -13184,9 +14144,9 @@ done
13184for ac_func in endutxent getutxent getutxid getutxline pututxline 14144for ac_func in endutxent getutxent getutxid getutxline pututxline
13185do 14145do
13186as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 14146as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13187echo "$as_me:$LINENO: checking for $ac_func" >&5 14147{ echo "$as_me:$LINENO: checking for $ac_func" >&5
13188echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 14148echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
13189if eval "test \"\${$as_ac_var+set}\" = set"; then 14149if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
13190 echo $ECHO_N "(cached) $ECHO_C" >&6 14150 echo $ECHO_N "(cached) $ECHO_C" >&6
13191else 14151else
13192 cat >conftest.$ac_ext <<_ACEOF 14152 cat >conftest.$ac_ext <<_ACEOF
@@ -13212,68 +14172,60 @@ cat >>conftest.$ac_ext <<_ACEOF
13212 14172
13213#undef $ac_func 14173#undef $ac_func
13214 14174
13215/* Override any gcc2 internal prototype to avoid an error. */ 14175/* Override any GCC internal prototype to avoid an error.
14176 Use char because int might match the return type of a GCC
14177 builtin and then its argument prototype would still apply. */
13216#ifdef __cplusplus 14178#ifdef __cplusplus
13217extern "C" 14179extern "C"
13218{
13219#endif 14180#endif
13220/* We use char because int might match the return type of a gcc2
13221 builtin and then its argument prototype would still apply. */
13222char $ac_func (); 14181char $ac_func ();
13223/* The GNU C library defines this for functions which it implements 14182/* The GNU C library defines this for functions which it implements
13224 to always fail with ENOSYS. Some functions are actually named 14183 to always fail with ENOSYS. Some functions are actually named
13225 something starting with __ and the normal name is an alias. */ 14184 something starting with __ and the normal name is an alias. */
13226#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 14185#if defined __stub_$ac_func || defined __stub___$ac_func
13227choke me 14186choke me
13228#else
13229char (*f) () = $ac_func;
13230#endif
13231#ifdef __cplusplus
13232}
13233#endif 14187#endif
13234 14188
13235int 14189int
13236main () 14190main ()
13237{ 14191{
13238return f != $ac_func; 14192return $ac_func ();
13239 ; 14193 ;
13240 return 0; 14194 return 0;
13241} 14195}
13242_ACEOF 14196_ACEOF
13243rm -f conftest.$ac_objext conftest$ac_exeext 14197rm -f conftest.$ac_objext conftest$ac_exeext
13244if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 14198if { (ac_try="$ac_link"
13245 (eval $ac_link) 2>conftest.er1 14199case "(($ac_try" in
14200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14201 *) ac_try_echo=$ac_try;;
14202esac
14203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14204 (eval "$ac_link") 2>conftest.er1
13246 ac_status=$? 14205 ac_status=$?
13247 grep -v '^ *+' conftest.er1 >conftest.err 14206 grep -v '^ *+' conftest.er1 >conftest.err
13248 rm -f conftest.er1 14207 rm -f conftest.er1
13249 cat conftest.err >&5 14208 cat conftest.err >&5
13250 echo "$as_me:$LINENO: \$? = $ac_status" >&5 14209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13251 (exit $ac_status); } && 14210 (exit $ac_status); } && {
13252 { ac_try='test -z "$ac_c_werror_flag" 14211 test -z "$ac_c_werror_flag" ||
13253 || test ! -s conftest.err' 14212 test ! -s conftest.err
13254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 14213 } && test -s conftest$ac_exeext &&
13255 (eval $ac_try) 2>&5 14214 $as_test_x conftest$ac_exeext; then
13256 ac_status=$?
13257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13258 (exit $ac_status); }; } &&
13259 { ac_try='test -s conftest$ac_exeext'
13260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13261 (eval $ac_try) 2>&5
13262 ac_status=$?
13263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13264 (exit $ac_status); }; }; then
13265 eval "$as_ac_var=yes" 14215 eval "$as_ac_var=yes"
13266else 14216else
13267 echo "$as_me: failed program was:" >&5 14217 echo "$as_me: failed program was:" >&5
13268sed 's/^/| /' conftest.$ac_ext >&5 14218sed 's/^/| /' conftest.$ac_ext >&5
13269 14219
13270eval "$as_ac_var=no" 14220 eval "$as_ac_var=no"
13271fi 14221fi
13272rm -f conftest.err conftest.$ac_objext \ 14222
14223rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13273 conftest$ac_exeext conftest.$ac_ext 14224 conftest$ac_exeext conftest.$ac_ext
13274fi 14225fi
13275echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 14226ac_res=`eval echo '${'$as_ac_var'}'`
13276echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 14227 { echo "$as_me:$LINENO: result: $ac_res" >&5
14228echo "${ECHO_T}$ac_res" >&6; }
13277if test `eval echo '${'$as_ac_var'}'` = yes; then 14229if test `eval echo '${'$as_ac_var'}'` = yes; then
13278 cat >>confdefs.h <<_ACEOF 14230 cat >>confdefs.h <<_ACEOF
13279#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 14231#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -13287,9 +14239,9 @@ done
13287for ac_func in setutxent utmpxname 14239for ac_func in setutxent utmpxname
13288do 14240do
13289as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 14241as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13290echo "$as_me:$LINENO: checking for $ac_func" >&5 14242{ echo "$as_me:$LINENO: checking for $ac_func" >&5
13291echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 14243echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
13292if eval "test \"\${$as_ac_var+set}\" = set"; then 14244if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
13293 echo $ECHO_N "(cached) $ECHO_C" >&6 14245 echo $ECHO_N "(cached) $ECHO_C" >&6
13294else 14246else
13295 cat >conftest.$ac_ext <<_ACEOF 14247 cat >conftest.$ac_ext <<_ACEOF
@@ -13315,68 +14267,60 @@ cat >>conftest.$ac_ext <<_ACEOF
13315 14267
13316#undef $ac_func 14268#undef $ac_func
13317 14269
13318/* Override any gcc2 internal prototype to avoid an error. */ 14270/* Override any GCC internal prototype to avoid an error.
14271 Use char because int might match the return type of a GCC
14272 builtin and then its argument prototype would still apply. */
13319#ifdef __cplusplus 14273#ifdef __cplusplus
13320extern "C" 14274extern "C"
13321{
13322#endif 14275#endif
13323/* We use char because int might match the return type of a gcc2
13324 builtin and then its argument prototype would still apply. */
13325char $ac_func (); 14276char $ac_func ();
13326/* The GNU C library defines this for functions which it implements 14277/* The GNU C library defines this for functions which it implements
13327 to always fail with ENOSYS. Some functions are actually named 14278 to always fail with ENOSYS. Some functions are actually named
13328 something starting with __ and the normal name is an alias. */ 14279 something starting with __ and the normal name is an alias. */
13329#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 14280#if defined __stub_$ac_func || defined __stub___$ac_func
13330choke me 14281choke me
13331#else
13332char (*f) () = $ac_func;
13333#endif
13334#ifdef __cplusplus
13335}
13336#endif 14282#endif
13337 14283
13338int 14284int
13339main () 14285main ()
13340{ 14286{
13341return f != $ac_func; 14287return $ac_func ();
13342 ; 14288 ;
13343 return 0; 14289 return 0;
13344} 14290}
13345_ACEOF 14291_ACEOF
13346rm -f conftest.$ac_objext conftest$ac_exeext 14292rm -f conftest.$ac_objext conftest$ac_exeext
13347if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 14293if { (ac_try="$ac_link"
13348 (eval $ac_link) 2>conftest.er1 14294case "(($ac_try" in
14295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14296 *) ac_try_echo=$ac_try;;
14297esac
14298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14299 (eval "$ac_link") 2>conftest.er1
13349 ac_status=$? 14300 ac_status=$?
13350 grep -v '^ *+' conftest.er1 >conftest.err 14301 grep -v '^ *+' conftest.er1 >conftest.err
13351 rm -f conftest.er1 14302 rm -f conftest.er1
13352 cat conftest.err >&5 14303 cat conftest.err >&5
13353 echo "$as_me:$LINENO: \$? = $ac_status" >&5 14304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13354 (exit $ac_status); } && 14305 (exit $ac_status); } && {
13355 { ac_try='test -z "$ac_c_werror_flag" 14306 test -z "$ac_c_werror_flag" ||
13356 || test ! -s conftest.err' 14307 test ! -s conftest.err
13357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 14308 } && test -s conftest$ac_exeext &&
13358 (eval $ac_try) 2>&5 14309 $as_test_x conftest$ac_exeext; then
13359 ac_status=$?
13360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13361 (exit $ac_status); }; } &&
13362 { ac_try='test -s conftest$ac_exeext'
13363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13364 (eval $ac_try) 2>&5
13365 ac_status=$?
13366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13367 (exit $ac_status); }; }; then
13368 eval "$as_ac_var=yes" 14310 eval "$as_ac_var=yes"
13369else 14311else
13370 echo "$as_me: failed program was:" >&5 14312 echo "$as_me: failed program was:" >&5
13371sed 's/^/| /' conftest.$ac_ext >&5 14313sed 's/^/| /' conftest.$ac_ext >&5
13372 14314
13373eval "$as_ac_var=no" 14315 eval "$as_ac_var=no"
13374fi 14316fi
13375rm -f conftest.err conftest.$ac_objext \ 14317
14318rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13376 conftest$ac_exeext conftest.$ac_ext 14319 conftest$ac_exeext conftest.$ac_ext
13377fi 14320fi
13378echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 14321ac_res=`eval echo '${'$as_ac_var'}'`
13379echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 14322 { echo "$as_me:$LINENO: result: $ac_res" >&5
14323echo "${ECHO_T}$ac_res" >&6; }
13380if test `eval echo '${'$as_ac_var'}'` = yes; then 14324if test `eval echo '${'$as_ac_var'}'` = yes; then
13381 cat >>confdefs.h <<_ACEOF 14325 cat >>confdefs.h <<_ACEOF
13382#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 14326#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -13386,8 +14330,8 @@ fi
13386done 14330done
13387 14331
13388 14332
13389echo "$as_me:$LINENO: checking for daemon" >&5 14333{ echo "$as_me:$LINENO: checking for daemon" >&5
13390echo $ECHO_N "checking for daemon... $ECHO_C" >&6 14334echo $ECHO_N "checking for daemon... $ECHO_C" >&6; }
13391if test "${ac_cv_func_daemon+set}" = set; then 14335if test "${ac_cv_func_daemon+set}" = set; then
13392 echo $ECHO_N "(cached) $ECHO_C" >&6 14336 echo $ECHO_N "(cached) $ECHO_C" >&6
13393else 14337else
@@ -13414,68 +14358,59 @@ cat >>conftest.$ac_ext <<_ACEOF
13414 14358
13415#undef daemon 14359#undef daemon
13416 14360
13417/* Override any gcc2 internal prototype to avoid an error. */ 14361/* Override any GCC internal prototype to avoid an error.
14362 Use char because int might match the return type of a GCC
14363 builtin and then its argument prototype would still apply. */
13418#ifdef __cplusplus 14364#ifdef __cplusplus
13419extern "C" 14365extern "C"
13420{
13421#endif 14366#endif
13422/* We use char because int might match the return type of a gcc2
13423 builtin and then its argument prototype would still apply. */
13424char daemon (); 14367char daemon ();
13425/* The GNU C library defines this for functions which it implements 14368/* The GNU C library defines this for functions which it implements
13426 to always fail with ENOSYS. Some functions are actually named 14369 to always fail with ENOSYS. Some functions are actually named
13427 something starting with __ and the normal name is an alias. */ 14370 something starting with __ and the normal name is an alias. */
13428#if defined (__stub_daemon) || defined (__stub___daemon) 14371#if defined __stub_daemon || defined __stub___daemon
13429choke me 14372choke me
13430#else
13431char (*f) () = daemon;
13432#endif
13433#ifdef __cplusplus
13434}
13435#endif 14373#endif
13436 14374
13437int 14375int
13438main () 14376main ()
13439{ 14377{
13440return f != daemon; 14378return daemon ();
13441 ; 14379 ;
13442 return 0; 14380 return 0;
13443} 14381}
13444_ACEOF 14382_ACEOF
13445rm -f conftest.$ac_objext conftest$ac_exeext 14383rm -f conftest.$ac_objext conftest$ac_exeext
13446if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 14384if { (ac_try="$ac_link"
13447 (eval $ac_link) 2>conftest.er1 14385case "(($ac_try" in
14386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14387 *) ac_try_echo=$ac_try;;
14388esac
14389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14390 (eval "$ac_link") 2>conftest.er1
13448 ac_status=$? 14391 ac_status=$?
13449 grep -v '^ *+' conftest.er1 >conftest.err 14392 grep -v '^ *+' conftest.er1 >conftest.err
13450 rm -f conftest.er1 14393 rm -f conftest.er1
13451 cat conftest.err >&5 14394 cat conftest.err >&5
13452 echo "$as_me:$LINENO: \$? = $ac_status" >&5 14395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13453 (exit $ac_status); } && 14396 (exit $ac_status); } && {
13454 { ac_try='test -z "$ac_c_werror_flag" 14397 test -z "$ac_c_werror_flag" ||
13455 || test ! -s conftest.err' 14398 test ! -s conftest.err
13456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 14399 } && test -s conftest$ac_exeext &&
13457 (eval $ac_try) 2>&5 14400 $as_test_x conftest$ac_exeext; then
13458 ac_status=$?
13459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13460 (exit $ac_status); }; } &&
13461 { ac_try='test -s conftest$ac_exeext'
13462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13463 (eval $ac_try) 2>&5
13464 ac_status=$?
13465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13466 (exit $ac_status); }; }; then
13467 ac_cv_func_daemon=yes 14401 ac_cv_func_daemon=yes
13468else 14402else
13469 echo "$as_me: failed program was:" >&5 14403 echo "$as_me: failed program was:" >&5
13470sed 's/^/| /' conftest.$ac_ext >&5 14404sed 's/^/| /' conftest.$ac_ext >&5
13471 14405
13472ac_cv_func_daemon=no 14406 ac_cv_func_daemon=no
13473fi 14407fi
13474rm -f conftest.err conftest.$ac_objext \ 14408
14409rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13475 conftest$ac_exeext conftest.$ac_ext 14410 conftest$ac_exeext conftest.$ac_ext
13476fi 14411fi
13477echo "$as_me:$LINENO: result: $ac_cv_func_daemon" >&5 14412{ echo "$as_me:$LINENO: result: $ac_cv_func_daemon" >&5
13478echo "${ECHO_T}$ac_cv_func_daemon" >&6 14413echo "${ECHO_T}$ac_cv_func_daemon" >&6; }
13479if test $ac_cv_func_daemon = yes; then 14414if test $ac_cv_func_daemon = yes; then
13480 14415
13481cat >>confdefs.h <<\_ACEOF 14416cat >>confdefs.h <<\_ACEOF
@@ -13483,8 +14418,8 @@ cat >>confdefs.h <<\_ACEOF
13483_ACEOF 14418_ACEOF
13484 14419
13485else 14420else
13486 echo "$as_me:$LINENO: checking for daemon in -lbsd" >&5 14421 { echo "$as_me:$LINENO: checking for daemon in -lbsd" >&5
13487echo $ECHO_N "checking for daemon in -lbsd... $ECHO_C" >&6 14422echo $ECHO_N "checking for daemon in -lbsd... $ECHO_C" >&6; }
13488if test "${ac_cv_lib_bsd_daemon+set}" = set; then 14423if test "${ac_cv_lib_bsd_daemon+set}" = set; then
13489 echo $ECHO_N "(cached) $ECHO_C" >&6 14424 echo $ECHO_N "(cached) $ECHO_C" >&6
13490else 14425else
@@ -13497,56 +14432,53 @@ cat confdefs.h >>conftest.$ac_ext
13497cat >>conftest.$ac_ext <<_ACEOF 14432cat >>conftest.$ac_ext <<_ACEOF
13498/* end confdefs.h. */ 14433/* end confdefs.h. */
13499 14434
13500/* Override any gcc2 internal prototype to avoid an error. */ 14435/* Override any GCC internal prototype to avoid an error.
14436 Use char because int might match the return type of a GCC
14437 builtin and then its argument prototype would still apply. */
13501#ifdef __cplusplus 14438#ifdef __cplusplus
13502extern "C" 14439extern "C"
13503#endif 14440#endif
13504/* We use char because int might match the return type of a gcc2
13505 builtin and then its argument prototype would still apply. */
13506char daemon (); 14441char daemon ();
13507int 14442int
13508main () 14443main ()
13509{ 14444{
13510daemon (); 14445return daemon ();
13511 ; 14446 ;
13512 return 0; 14447 return 0;
13513} 14448}
13514_ACEOF 14449_ACEOF
13515rm -f conftest.$ac_objext conftest$ac_exeext 14450rm -f conftest.$ac_objext conftest$ac_exeext
13516if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 14451if { (ac_try="$ac_link"
13517 (eval $ac_link) 2>conftest.er1 14452case "(($ac_try" in
14453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14454 *) ac_try_echo=$ac_try;;
14455esac
14456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14457 (eval "$ac_link") 2>conftest.er1
13518 ac_status=$? 14458 ac_status=$?
13519 grep -v '^ *+' conftest.er1 >conftest.err 14459 grep -v '^ *+' conftest.er1 >conftest.err
13520 rm -f conftest.er1 14460 rm -f conftest.er1
13521 cat conftest.err >&5 14461 cat conftest.err >&5
13522 echo "$as_me:$LINENO: \$? = $ac_status" >&5 14462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13523 (exit $ac_status); } && 14463 (exit $ac_status); } && {
13524 { ac_try='test -z "$ac_c_werror_flag" 14464 test -z "$ac_c_werror_flag" ||
13525 || test ! -s conftest.err' 14465 test ! -s conftest.err
13526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 14466 } && test -s conftest$ac_exeext &&
13527 (eval $ac_try) 2>&5 14467 $as_test_x conftest$ac_exeext; then
13528 ac_status=$?
13529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13530 (exit $ac_status); }; } &&
13531 { ac_try='test -s conftest$ac_exeext'
13532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13533 (eval $ac_try) 2>&5
13534 ac_status=$?
13535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13536 (exit $ac_status); }; }; then
13537 ac_cv_lib_bsd_daemon=yes 14468 ac_cv_lib_bsd_daemon=yes
13538else 14469else
13539 echo "$as_me: failed program was:" >&5 14470 echo "$as_me: failed program was:" >&5
13540sed 's/^/| /' conftest.$ac_ext >&5 14471sed 's/^/| /' conftest.$ac_ext >&5
13541 14472
13542ac_cv_lib_bsd_daemon=no 14473 ac_cv_lib_bsd_daemon=no
13543fi 14474fi
13544rm -f conftest.err conftest.$ac_objext \ 14475
14476rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13545 conftest$ac_exeext conftest.$ac_ext 14477 conftest$ac_exeext conftest.$ac_ext
13546LIBS=$ac_check_lib_save_LIBS 14478LIBS=$ac_check_lib_save_LIBS
13547fi 14479fi
13548echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_daemon" >&5 14480{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_daemon" >&5
13549echo "${ECHO_T}$ac_cv_lib_bsd_daemon" >&6 14481echo "${ECHO_T}$ac_cv_lib_bsd_daemon" >&6; }
13550if test $ac_cv_lib_bsd_daemon = yes; then 14482if test $ac_cv_lib_bsd_daemon = yes; then
13551 LIBS="$LIBS -lbsd"; cat >>confdefs.h <<\_ACEOF 14483 LIBS="$LIBS -lbsd"; cat >>confdefs.h <<\_ACEOF
13552#define HAVE_DAEMON 1 14484#define HAVE_DAEMON 1
@@ -13558,8 +14490,8 @@ fi
13558fi 14490fi
13559 14491
13560 14492
13561echo "$as_me:$LINENO: checking for getpagesize" >&5 14493{ echo "$as_me:$LINENO: checking for getpagesize" >&5
13562echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6 14494echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
13563if test "${ac_cv_func_getpagesize+set}" = set; then 14495if test "${ac_cv_func_getpagesize+set}" = set; then
13564 echo $ECHO_N "(cached) $ECHO_C" >&6 14496 echo $ECHO_N "(cached) $ECHO_C" >&6
13565else 14497else
@@ -13586,68 +14518,59 @@ cat >>conftest.$ac_ext <<_ACEOF
13586 14518
13587#undef getpagesize 14519#undef getpagesize
13588 14520
13589/* Override any gcc2 internal prototype to avoid an error. */ 14521/* Override any GCC internal prototype to avoid an error.
14522 Use char because int might match the return type of a GCC
14523 builtin and then its argument prototype would still apply. */
13590#ifdef __cplusplus 14524#ifdef __cplusplus
13591extern "C" 14525extern "C"
13592{
13593#endif 14526#endif
13594/* We use char because int might match the return type of a gcc2
13595 builtin and then its argument prototype would still apply. */
13596char getpagesize (); 14527char getpagesize ();
13597/* The GNU C library defines this for functions which it implements 14528/* The GNU C library defines this for functions which it implements
13598 to always fail with ENOSYS. Some functions are actually named 14529 to always fail with ENOSYS. Some functions are actually named
13599 something starting with __ and the normal name is an alias. */ 14530 something starting with __ and the normal name is an alias. */
13600#if defined (__stub_getpagesize) || defined (__stub___getpagesize) 14531#if defined __stub_getpagesize || defined __stub___getpagesize
13601choke me 14532choke me
13602#else
13603char (*f) () = getpagesize;
13604#endif
13605#ifdef __cplusplus
13606}
13607#endif 14533#endif
13608 14534
13609int 14535int
13610main () 14536main ()
13611{ 14537{
13612return f != getpagesize; 14538return getpagesize ();
13613 ; 14539 ;
13614 return 0; 14540 return 0;
13615} 14541}
13616_ACEOF 14542_ACEOF
13617rm -f conftest.$ac_objext conftest$ac_exeext 14543rm -f conftest.$ac_objext conftest$ac_exeext
13618if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 14544if { (ac_try="$ac_link"
13619 (eval $ac_link) 2>conftest.er1 14545case "(($ac_try" in
14546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14547 *) ac_try_echo=$ac_try;;
14548esac
14549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14550 (eval "$ac_link") 2>conftest.er1
13620 ac_status=$? 14551 ac_status=$?
13621 grep -v '^ *+' conftest.er1 >conftest.err 14552 grep -v '^ *+' conftest.er1 >conftest.err
13622 rm -f conftest.er1 14553 rm -f conftest.er1
13623 cat conftest.err >&5 14554 cat conftest.err >&5
13624 echo "$as_me:$LINENO: \$? = $ac_status" >&5 14555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13625 (exit $ac_status); } && 14556 (exit $ac_status); } && {
13626 { ac_try='test -z "$ac_c_werror_flag" 14557 test -z "$ac_c_werror_flag" ||
13627 || test ! -s conftest.err' 14558 test ! -s conftest.err
13628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 14559 } && test -s conftest$ac_exeext &&
13629 (eval $ac_try) 2>&5 14560 $as_test_x conftest$ac_exeext; then
13630 ac_status=$?
13631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13632 (exit $ac_status); }; } &&
13633 { ac_try='test -s conftest$ac_exeext'
13634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13635 (eval $ac_try) 2>&5
13636 ac_status=$?
13637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13638 (exit $ac_status); }; }; then
13639 ac_cv_func_getpagesize=yes 14561 ac_cv_func_getpagesize=yes
13640else 14562else
13641 echo "$as_me: failed program was:" >&5 14563 echo "$as_me: failed program was:" >&5
13642sed 's/^/| /' conftest.$ac_ext >&5 14564sed 's/^/| /' conftest.$ac_ext >&5
13643 14565
13644ac_cv_func_getpagesize=no 14566 ac_cv_func_getpagesize=no
13645fi 14567fi
13646rm -f conftest.err conftest.$ac_objext \ 14568
14569rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13647 conftest$ac_exeext conftest.$ac_ext 14570 conftest$ac_exeext conftest.$ac_ext
13648fi 14571fi
13649echo "$as_me:$LINENO: result: $ac_cv_func_getpagesize" >&5 14572{ echo "$as_me:$LINENO: result: $ac_cv_func_getpagesize" >&5
13650echo "${ECHO_T}$ac_cv_func_getpagesize" >&6 14573echo "${ECHO_T}$ac_cv_func_getpagesize" >&6; }
13651if test $ac_cv_func_getpagesize = yes; then 14574if test $ac_cv_func_getpagesize = yes; then
13652 14575
13653cat >>confdefs.h <<\_ACEOF 14576cat >>confdefs.h <<\_ACEOF
@@ -13655,8 +14578,8 @@ cat >>confdefs.h <<\_ACEOF
13655_ACEOF 14578_ACEOF
13656 14579
13657else 14580else
13658 echo "$as_me:$LINENO: checking for getpagesize in -lucb" >&5 14581 { echo "$as_me:$LINENO: checking for getpagesize in -lucb" >&5
13659echo $ECHO_N "checking for getpagesize in -lucb... $ECHO_C" >&6 14582echo $ECHO_N "checking for getpagesize in -lucb... $ECHO_C" >&6; }
13660if test "${ac_cv_lib_ucb_getpagesize+set}" = set; then 14583if test "${ac_cv_lib_ucb_getpagesize+set}" = set; then
13661 echo $ECHO_N "(cached) $ECHO_C" >&6 14584 echo $ECHO_N "(cached) $ECHO_C" >&6
13662else 14585else
@@ -13669,56 +14592,53 @@ cat confdefs.h >>conftest.$ac_ext
13669cat >>conftest.$ac_ext <<_ACEOF 14592cat >>conftest.$ac_ext <<_ACEOF
13670/* end confdefs.h. */ 14593/* end confdefs.h. */
13671 14594
13672/* Override any gcc2 internal prototype to avoid an error. */ 14595/* Override any GCC internal prototype to avoid an error.
14596 Use char because int might match the return type of a GCC
14597 builtin and then its argument prototype would still apply. */
13673#ifdef __cplusplus 14598#ifdef __cplusplus
13674extern "C" 14599extern "C"
13675#endif 14600#endif
13676/* We use char because int might match the return type of a gcc2
13677 builtin and then its argument prototype would still apply. */
13678char getpagesize (); 14601char getpagesize ();
13679int 14602int
13680main () 14603main ()
13681{ 14604{
13682getpagesize (); 14605return getpagesize ();
13683 ; 14606 ;
13684 return 0; 14607 return 0;
13685} 14608}
13686_ACEOF 14609_ACEOF
13687rm -f conftest.$ac_objext conftest$ac_exeext 14610rm -f conftest.$ac_objext conftest$ac_exeext
13688if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 14611if { (ac_try="$ac_link"
13689 (eval $ac_link) 2>conftest.er1 14612case "(($ac_try" in
14613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14614 *) ac_try_echo=$ac_try;;
14615esac
14616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14617 (eval "$ac_link") 2>conftest.er1
13690 ac_status=$? 14618 ac_status=$?
13691 grep -v '^ *+' conftest.er1 >conftest.err 14619 grep -v '^ *+' conftest.er1 >conftest.err
13692 rm -f conftest.er1 14620 rm -f conftest.er1
13693 cat conftest.err >&5 14621 cat conftest.err >&5
13694 echo "$as_me:$LINENO: \$? = $ac_status" >&5 14622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13695 (exit $ac_status); } && 14623 (exit $ac_status); } && {
13696 { ac_try='test -z "$ac_c_werror_flag" 14624 test -z "$ac_c_werror_flag" ||
13697 || test ! -s conftest.err' 14625 test ! -s conftest.err
13698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 14626 } && test -s conftest$ac_exeext &&
13699 (eval $ac_try) 2>&5 14627 $as_test_x conftest$ac_exeext; then
13700 ac_status=$?
13701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13702 (exit $ac_status); }; } &&
13703 { ac_try='test -s conftest$ac_exeext'
13704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13705 (eval $ac_try) 2>&5
13706 ac_status=$?
13707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13708 (exit $ac_status); }; }; then
13709 ac_cv_lib_ucb_getpagesize=yes 14628 ac_cv_lib_ucb_getpagesize=yes
13710else 14629else
13711 echo "$as_me: failed program was:" >&5 14630 echo "$as_me: failed program was:" >&5
13712sed 's/^/| /' conftest.$ac_ext >&5 14631sed 's/^/| /' conftest.$ac_ext >&5
13713 14632
13714ac_cv_lib_ucb_getpagesize=no 14633 ac_cv_lib_ucb_getpagesize=no
13715fi 14634fi
13716rm -f conftest.err conftest.$ac_objext \ 14635
14636rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13717 conftest$ac_exeext conftest.$ac_ext 14637 conftest$ac_exeext conftest.$ac_ext
13718LIBS=$ac_check_lib_save_LIBS 14638LIBS=$ac_check_lib_save_LIBS
13719fi 14639fi
13720echo "$as_me:$LINENO: result: $ac_cv_lib_ucb_getpagesize" >&5 14640{ echo "$as_me:$LINENO: result: $ac_cv_lib_ucb_getpagesize" >&5
13721echo "${ECHO_T}$ac_cv_lib_ucb_getpagesize" >&6 14641echo "${ECHO_T}$ac_cv_lib_ucb_getpagesize" >&6; }
13722if test $ac_cv_lib_ucb_getpagesize = yes; then 14642if test $ac_cv_lib_ucb_getpagesize = yes; then
13723 LIBS="$LIBS -lucb"; cat >>confdefs.h <<\_ACEOF 14643 LIBS="$LIBS -lucb"; cat >>confdefs.h <<\_ACEOF
13724#define HAVE_GETPAGESIZE 1 14644#define HAVE_GETPAGESIZE 1
@@ -13732,8 +14652,8 @@ fi
13732 14652
13733# Check for broken snprintf 14653# Check for broken snprintf
13734if test "x$ac_cv_func_snprintf" = "xyes" ; then 14654if test "x$ac_cv_func_snprintf" = "xyes" ; then
13735 echo "$as_me:$LINENO: checking whether snprintf correctly terminates long strings" >&5 14655 { echo "$as_me:$LINENO: checking whether snprintf correctly terminates long strings" >&5
13736echo $ECHO_N "checking whether snprintf correctly terminates long strings... $ECHO_C" >&6 14656echo $ECHO_N "checking whether snprintf correctly terminates long strings... $ECHO_C" >&6; }
13737 if test "$cross_compiling" = yes; then 14657 if test "$cross_compiling" = yes; then
13738 { echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working snprintf()" >&5 14658 { echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working snprintf()" >&5
13739echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;} 14659echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
@@ -13751,18 +14671,27 @@ int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');}
13751 14671
13752_ACEOF 14672_ACEOF
13753rm -f conftest$ac_exeext 14673rm -f conftest$ac_exeext
13754if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 14674if { (ac_try="$ac_link"
13755 (eval $ac_link) 2>&5 14675case "(($ac_try" in
14676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14677 *) ac_try_echo=$ac_try;;
14678esac
14679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14680 (eval "$ac_link") 2>&5
13756 ac_status=$? 14681 ac_status=$?
13757 echo "$as_me:$LINENO: \$? = $ac_status" >&5 14682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13758 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 14683 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 14684 { (case "(($ac_try" in
13760 (eval $ac_try) 2>&5 14685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14686 *) ac_try_echo=$ac_try;;
14687esac
14688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14689 (eval "$ac_try") 2>&5
13761 ac_status=$? 14690 ac_status=$?
13762 echo "$as_me:$LINENO: \$? = $ac_status" >&5 14691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13763 (exit $ac_status); }; }; then 14692 (exit $ac_status); }; }; then
13764 echo "$as_me:$LINENO: result: yes" >&5 14693 { echo "$as_me:$LINENO: result: yes" >&5
13765echo "${ECHO_T}yes" >&6 14694echo "${ECHO_T}yes" >&6; }
13766else 14695else
13767 echo "$as_me: program exited with status $ac_status" >&5 14696 echo "$as_me: program exited with status $ac_status" >&5
13768echo "$as_me: failed program was:" >&5 14697echo "$as_me: failed program was:" >&5
@@ -13770,8 +14699,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
13770 14699
13771( exit $ac_status ) 14700( exit $ac_status )
13772 14701
13773 echo "$as_me:$LINENO: result: no" >&5 14702 { echo "$as_me:$LINENO: result: no" >&5
13774echo "${ECHO_T}no" >&6 14703echo "${ECHO_T}no" >&6; }
13775 14704
13776cat >>confdefs.h <<\_ACEOF 14705cat >>confdefs.h <<\_ACEOF
13777#define BROKEN_SNPRINTF 1 14706#define BROKEN_SNPRINTF 1
@@ -13781,8 +14710,10 @@ _ACEOF
13781echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;} 14710echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;}
13782 14711
13783fi 14712fi
13784rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 14713rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13785fi 14714fi
14715
14716
13786fi 14717fi
13787 14718
13788# If we don't have a working asprintf, then we strongly depend on vsnprintf 14719# If we don't have a working asprintf, then we strongly depend on vsnprintf
@@ -13790,8 +14721,8 @@ fi
13790# create (as per SUSv3) 14721# create (as per SUSv3)
13791if test "x$ac_cv_func_asprintf" != "xyes" && \ 14722if test "x$ac_cv_func_asprintf" != "xyes" && \
13792 test "x$ac_cv_func_vsnprintf" = "xyes" ; then 14723 test "x$ac_cv_func_vsnprintf" = "xyes" ; then
13793 echo "$as_me:$LINENO: checking whether vsnprintf returns correct values on overflow" >&5 14724 { echo "$as_me:$LINENO: checking whether vsnprintf returns correct values on overflow" >&5
13794echo $ECHO_N "checking whether vsnprintf returns correct values on overflow... $ECHO_C" >&6 14725echo $ECHO_N "checking whether vsnprintf returns correct values on overflow... $ECHO_C" >&6; }
13795 if test "$cross_compiling" = yes; then 14726 if test "$cross_compiling" = yes; then
13796 { echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working vsnprintf()" >&5 14727 { echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working vsnprintf()" >&5
13797echo "$as_me: WARNING: cross compiling: Assuming working vsnprintf()" >&2;} 14728echo "$as_me: WARNING: cross compiling: Assuming working vsnprintf()" >&2;}
@@ -13821,18 +14752,27 @@ int main(void)
13821} 14752}
13822_ACEOF 14753_ACEOF
13823rm -f conftest$ac_exeext 14754rm -f conftest$ac_exeext
13824if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 14755if { (ac_try="$ac_link"
13825 (eval $ac_link) 2>&5 14756case "(($ac_try" in
14757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14758 *) ac_try_echo=$ac_try;;
14759esac
14760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14761 (eval "$ac_link") 2>&5
13826 ac_status=$? 14762 ac_status=$?
13827 echo "$as_me:$LINENO: \$? = $ac_status" >&5 14763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13828 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 14764 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 14765 { (case "(($ac_try" in
13830 (eval $ac_try) 2>&5 14766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14767 *) ac_try_echo=$ac_try;;
14768esac
14769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14770 (eval "$ac_try") 2>&5
13831 ac_status=$? 14771 ac_status=$?
13832 echo "$as_me:$LINENO: \$? = $ac_status" >&5 14772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13833 (exit $ac_status); }; }; then 14773 (exit $ac_status); }; }; then
13834 echo "$as_me:$LINENO: result: yes" >&5 14774 { echo "$as_me:$LINENO: result: yes" >&5
13835echo "${ECHO_T}yes" >&6 14775echo "${ECHO_T}yes" >&6; }
13836else 14776else
13837 echo "$as_me: program exited with status $ac_status" >&5 14777 echo "$as_me: program exited with status $ac_status" >&5
13838echo "$as_me: failed program was:" >&5 14778echo "$as_me: failed program was:" >&5
@@ -13840,8 +14780,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
13840 14780
13841( exit $ac_status ) 14781( exit $ac_status )
13842 14782
13843 echo "$as_me:$LINENO: result: no" >&5 14783 { echo "$as_me:$LINENO: result: no" >&5
13844echo "${ECHO_T}no" >&6 14784echo "${ECHO_T}no" >&6; }
13845 14785
13846cat >>confdefs.h <<\_ACEOF 14786cat >>confdefs.h <<\_ACEOF
13847#define BROKEN_SNPRINTF 1 14787#define BROKEN_SNPRINTF 1
@@ -13851,15 +14791,17 @@ _ACEOF
13851echo "$as_me: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&2;} 14791echo "$as_me: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&2;}
13852 14792
13853fi 14793fi
13854rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 14794rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13855fi 14795fi
14796
14797
13856fi 14798fi
13857 14799
13858# On systems where [v]snprintf is broken, but is declared in stdio, 14800# On systems where [v]snprintf is broken, but is declared in stdio,
13859# check that the fmt argument is const char * or just char *. 14801# check that the fmt argument is const char * or just char *.
13860# This is only useful for when BROKEN_SNPRINTF 14802# This is only useful for when BROKEN_SNPRINTF
13861echo "$as_me:$LINENO: checking whether snprintf can declare const char *fmt" >&5 14803{ echo "$as_me:$LINENO: checking whether snprintf can declare const char *fmt" >&5
13862echo $ECHO_N "checking whether snprintf can declare const char *fmt... $ECHO_C" >&6 14804echo $ECHO_N "checking whether snprintf can declare const char *fmt... $ECHO_C" >&6; }
13863cat >conftest.$ac_ext <<_ACEOF 14805cat >conftest.$ac_ext <<_ACEOF
13864/* confdefs.h. */ 14806/* confdefs.h. */
13865_ACEOF 14807_ACEOF
@@ -13872,29 +14814,24 @@ cat >>conftest.$ac_ext <<_ACEOF
13872 14814
13873_ACEOF 14815_ACEOF
13874rm -f conftest.$ac_objext 14816rm -f conftest.$ac_objext
13875if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 14817if { (ac_try="$ac_compile"
13876 (eval $ac_compile) 2>conftest.er1 14818case "(($ac_try" in
14819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14820 *) ac_try_echo=$ac_try;;
14821esac
14822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14823 (eval "$ac_compile") 2>conftest.er1
13877 ac_status=$? 14824 ac_status=$?
13878 grep -v '^ *+' conftest.er1 >conftest.err 14825 grep -v '^ *+' conftest.er1 >conftest.err
13879 rm -f conftest.er1 14826 rm -f conftest.er1
13880 cat conftest.err >&5 14827 cat conftest.err >&5
13881 echo "$as_me:$LINENO: \$? = $ac_status" >&5 14828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13882 (exit $ac_status); } && 14829 (exit $ac_status); } && {
13883 { ac_try='test -z "$ac_c_werror_flag" 14830 test -z "$ac_c_werror_flag" ||
13884 || test ! -s conftest.err' 14831 test ! -s conftest.err
13885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 14832 } && test -s conftest.$ac_objext; then
13886 (eval $ac_try) 2>&5 14833 { echo "$as_me:$LINENO: result: yes" >&5
13887 ac_status=$? 14834echo "${ECHO_T}yes" >&6; }
13888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13889 (exit $ac_status); }; } &&
13890 { ac_try='test -s conftest.$ac_objext'
13891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13892 (eval $ac_try) 2>&5
13893 ac_status=$?
13894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13895 (exit $ac_status); }; }; then
13896 echo "$as_me:$LINENO: result: yes" >&5
13897echo "${ECHO_T}yes" >&6
13898 14835
13899cat >>confdefs.h <<\_ACEOF 14836cat >>confdefs.h <<\_ACEOF
13900#define SNPRINTF_CONST const 14837#define SNPRINTF_CONST const
@@ -13904,20 +14841,21 @@ else
13904 echo "$as_me: failed program was:" >&5 14841 echo "$as_me: failed program was:" >&5
13905sed 's/^/| /' conftest.$ac_ext >&5 14842sed 's/^/| /' conftest.$ac_ext >&5
13906 14843
13907echo "$as_me:$LINENO: result: no" >&5 14844 { echo "$as_me:$LINENO: result: no" >&5
13908echo "${ECHO_T}no" >&6 14845echo "${ECHO_T}no" >&6; }
13909 cat >>confdefs.h <<\_ACEOF 14846 cat >>confdefs.h <<\_ACEOF
13910#define SNPRINTF_CONST /* not const */ 14847#define SNPRINTF_CONST /* not const */
13911_ACEOF 14848_ACEOF
13912 14849
13913fi 14850fi
13914rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 14851
14852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13915 14853
13916# Check for missing getpeereid (or equiv) support 14854# Check for missing getpeereid (or equiv) support
13917NO_PEERCHECK="" 14855NO_PEERCHECK=""
13918if test "x$ac_cv_func_getpeereid" != "xyes" ; then 14856if test "x$ac_cv_func_getpeereid" != "xyes" ; then
13919 echo "$as_me:$LINENO: checking whether system supports SO_PEERCRED getsockopt" >&5 14857 { echo "$as_me:$LINENO: checking whether system supports SO_PEERCRED getsockopt" >&5
13920echo $ECHO_N "checking whether system supports SO_PEERCRED getsockopt... $ECHO_C" >&6 14858echo $ECHO_N "checking whether system supports SO_PEERCRED getsockopt... $ECHO_C" >&6; }
13921 cat >conftest.$ac_ext <<_ACEOF 14859 cat >conftest.$ac_ext <<_ACEOF
13922/* confdefs.h. */ 14860/* confdefs.h. */
13923_ACEOF 14861_ACEOF
@@ -13935,29 +14873,24 @@ int i = SO_PEERCRED;
13935} 14873}
13936_ACEOF 14874_ACEOF
13937rm -f conftest.$ac_objext 14875rm -f conftest.$ac_objext
13938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 14876if { (ac_try="$ac_compile"
13939 (eval $ac_compile) 2>conftest.er1 14877case "(($ac_try" in
14878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14879 *) ac_try_echo=$ac_try;;
14880esac
14881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14882 (eval "$ac_compile") 2>conftest.er1
13940 ac_status=$? 14883 ac_status=$?
13941 grep -v '^ *+' conftest.er1 >conftest.err 14884 grep -v '^ *+' conftest.er1 >conftest.err
13942 rm -f conftest.er1 14885 rm -f conftest.er1
13943 cat conftest.err >&5 14886 cat conftest.err >&5
13944 echo "$as_me:$LINENO: \$? = $ac_status" >&5 14887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13945 (exit $ac_status); } && 14888 (exit $ac_status); } && {
13946 { ac_try='test -z "$ac_c_werror_flag" 14889 test -z "$ac_c_werror_flag" ||
13947 || test ! -s conftest.err' 14890 test ! -s conftest.err
13948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 14891 } && test -s conftest.$ac_objext; then
13949 (eval $ac_try) 2>&5 14892 { echo "$as_me:$LINENO: result: yes" >&5
13950 ac_status=$? 14893echo "${ECHO_T}yes" >&6; }
13951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13952 (exit $ac_status); }; } &&
13953 { ac_try='test -s conftest.$ac_objext'
13954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13955 (eval $ac_try) 2>&5
13956 ac_status=$?
13957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13958 (exit $ac_status); }; }; then
13959 echo "$as_me:$LINENO: result: yes" >&5
13960echo "${ECHO_T}yes" >&6
13961 14894
13962cat >>confdefs.h <<\_ACEOF 14895cat >>confdefs.h <<\_ACEOF
13963#define HAVE_SO_PEERCRED 1 14896#define HAVE_SO_PEERCRED 1
@@ -13968,21 +14901,22 @@ else
13968 echo "$as_me: failed program was:" >&5 14901 echo "$as_me: failed program was:" >&5
13969sed 's/^/| /' conftest.$ac_ext >&5 14902sed 's/^/| /' conftest.$ac_ext >&5
13970 14903
13971echo "$as_me:$LINENO: result: no" >&5 14904 { echo "$as_me:$LINENO: result: no" >&5
13972echo "${ECHO_T}no" >&6 14905echo "${ECHO_T}no" >&6; }
13973 NO_PEERCHECK=1 14906 NO_PEERCHECK=1
13974 14907
13975fi 14908fi
13976rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 14909
14910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13977fi 14911fi
13978 14912
13979if test "x$ac_cv_func_mkdtemp" = "xyes" ; then 14913if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
13980echo "$as_me:$LINENO: checking for (overly) strict mkstemp" >&5 14914{ echo "$as_me:$LINENO: checking for (overly) strict mkstemp" >&5
13981echo $ECHO_N "checking for (overly) strict mkstemp... $ECHO_C" >&6 14915echo $ECHO_N "checking for (overly) strict mkstemp... $ECHO_C" >&6; }
13982if test "$cross_compiling" = yes; then 14916if test "$cross_compiling" = yes; then
13983 14917
13984 echo "$as_me:$LINENO: result: yes" >&5 14918 { echo "$as_me:$LINENO: result: yes" >&5
13985echo "${ECHO_T}yes" >&6 14919echo "${ECHO_T}yes" >&6; }
13986 cat >>confdefs.h <<\_ACEOF 14920 cat >>confdefs.h <<\_ACEOF
13987#define HAVE_STRICT_MKSTEMP 1 14921#define HAVE_STRICT_MKSTEMP 1
13988_ACEOF 14922_ACEOF
@@ -14006,19 +14940,28 @@ unlink(template); exit(0);
14006 14940
14007_ACEOF 14941_ACEOF
14008rm -f conftest$ac_exeext 14942rm -f conftest$ac_exeext
14009if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 14943if { (ac_try="$ac_link"
14010 (eval $ac_link) 2>&5 14944case "(($ac_try" in
14945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14946 *) ac_try_echo=$ac_try;;
14947esac
14948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14949 (eval "$ac_link") 2>&5
14011 ac_status=$? 14950 ac_status=$?
14012 echo "$as_me:$LINENO: \$? = $ac_status" >&5 14951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14013 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 14952 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 14953 { (case "(($ac_try" in
14015 (eval $ac_try) 2>&5 14954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14955 *) ac_try_echo=$ac_try;;
14956esac
14957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14958 (eval "$ac_try") 2>&5
14016 ac_status=$? 14959 ac_status=$?
14017 echo "$as_me:$LINENO: \$? = $ac_status" >&5 14960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14018 (exit $ac_status); }; }; then 14961 (exit $ac_status); }; }; then
14019 14962
14020 echo "$as_me:$LINENO: result: no" >&5 14963 { echo "$as_me:$LINENO: result: no" >&5
14021echo "${ECHO_T}no" >&6 14964echo "${ECHO_T}no" >&6; }
14022 14965
14023else 14966else
14024 echo "$as_me: program exited with status $ac_status" >&5 14967 echo "$as_me: program exited with status $ac_status" >&5
@@ -14027,8 +14970,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
14027 14970
14028( exit $ac_status ) 14971( exit $ac_status )
14029 14972
14030 echo "$as_me:$LINENO: result: yes" >&5 14973 { echo "$as_me:$LINENO: result: yes" >&5
14031echo "${ECHO_T}yes" >&6 14974echo "${ECHO_T}yes" >&6; }
14032 14975
14033cat >>confdefs.h <<\_ACEOF 14976cat >>confdefs.h <<\_ACEOF
14034#define HAVE_STRICT_MKSTEMP 1 14977#define HAVE_STRICT_MKSTEMP 1
@@ -14036,17 +14979,19 @@ _ACEOF
14036 14979
14037 14980
14038fi 14981fi
14039rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 14982rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14040fi 14983fi
14984
14985
14041fi 14986fi
14042 14987
14043if test ! -z "$check_for_openpty_ctty_bug"; then 14988if test ! -z "$check_for_openpty_ctty_bug"; then
14044 echo "$as_me:$LINENO: checking if openpty correctly handles controlling tty" >&5 14989 { echo "$as_me:$LINENO: checking if openpty correctly handles controlling tty" >&5
14045echo $ECHO_N "checking if openpty correctly handles controlling tty... $ECHO_C" >&6 14990echo $ECHO_N "checking if openpty correctly handles controlling tty... $ECHO_C" >&6; }
14046 if test "$cross_compiling" = yes; then 14991 if test "$cross_compiling" = yes; then
14047 14992
14048 echo "$as_me:$LINENO: result: cross-compiling" >&5 14993 { echo "$as_me:$LINENO: result: cross-compiling" >&5
14049echo "${ECHO_T}cross-compiling" >&6 14994echo "${ECHO_T}cross-compiling" >&6; }
14050 14995
14051 14996
14052else 14997else
@@ -14091,19 +15036,28 @@ main()
14091 15036
14092_ACEOF 15037_ACEOF
14093rm -f conftest$ac_exeext 15038rm -f conftest$ac_exeext
14094if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 15039if { (ac_try="$ac_link"
14095 (eval $ac_link) 2>&5 15040case "(($ac_try" in
15041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15042 *) ac_try_echo=$ac_try;;
15043esac
15044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15045 (eval "$ac_link") 2>&5
14096 ac_status=$? 15046 ac_status=$?
14097 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14098 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 15048 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 15049 { (case "(($ac_try" in
14100 (eval $ac_try) 2>&5 15050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15051 *) ac_try_echo=$ac_try;;
15052esac
15053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15054 (eval "$ac_try") 2>&5
14101 ac_status=$? 15055 ac_status=$?
14102 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14103 (exit $ac_status); }; }; then 15057 (exit $ac_status); }; }; then
14104 15058
14105 echo "$as_me:$LINENO: result: yes" >&5 15059 { echo "$as_me:$LINENO: result: yes" >&5
14106echo "${ECHO_T}yes" >&6 15060echo "${ECHO_T}yes" >&6; }
14107 15061
14108else 15062else
14109 echo "$as_me: program exited with status $ac_status" >&5 15063 echo "$as_me: program exited with status $ac_status" >&5
@@ -14112,26 +15066,28 @@ sed 's/^/| /' conftest.$ac_ext >&5
14112 15066
14113( exit $ac_status ) 15067( exit $ac_status )
14114 15068
14115 echo "$as_me:$LINENO: result: no" >&5 15069 { echo "$as_me:$LINENO: result: no" >&5
14116echo "${ECHO_T}no" >&6 15070echo "${ECHO_T}no" >&6; }
14117 cat >>confdefs.h <<\_ACEOF 15071 cat >>confdefs.h <<\_ACEOF
14118#define SSHD_ACQUIRES_CTTY 1 15072#define SSHD_ACQUIRES_CTTY 1
14119_ACEOF 15073_ACEOF
14120 15074
14121 15075
14122fi 15076fi
14123rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 15077rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14124fi 15078fi
15079
15080
14125fi 15081fi
14126 15082
14127if test "x$ac_cv_func_getaddrinfo" = "xyes" && \ 15083if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
14128 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then 15084 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
14129 echo "$as_me:$LINENO: checking if getaddrinfo seems to work" >&5 15085 { echo "$as_me:$LINENO: checking if getaddrinfo seems to work" >&5
14130echo $ECHO_N "checking if getaddrinfo seems to work... $ECHO_C" >&6 15086echo $ECHO_N "checking if getaddrinfo seems to work... $ECHO_C" >&6; }
14131 if test "$cross_compiling" = yes; then 15087 if test "$cross_compiling" = yes; then
14132 15088
14133 echo "$as_me:$LINENO: result: cross-compiling" >&5 15089 { echo "$as_me:$LINENO: result: cross-compiling" >&5
14134echo "${ECHO_T}cross-compiling" >&6 15090echo "${ECHO_T}cross-compiling" >&6; }
14135 15091
14136 15092
14137else 15093else
@@ -14198,19 +15154,28 @@ main(void)
14198 15154
14199_ACEOF 15155_ACEOF
14200rm -f conftest$ac_exeext 15156rm -f conftest$ac_exeext
14201if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 15157if { (ac_try="$ac_link"
14202 (eval $ac_link) 2>&5 15158case "(($ac_try" in
15159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15160 *) ac_try_echo=$ac_try;;
15161esac
15162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15163 (eval "$ac_link") 2>&5
14203 ac_status=$? 15164 ac_status=$?
14204 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14205 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 15166 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 15167 { (case "(($ac_try" in
14207 (eval $ac_try) 2>&5 15168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15169 *) ac_try_echo=$ac_try;;
15170esac
15171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15172 (eval "$ac_try") 2>&5
14208 ac_status=$? 15173 ac_status=$?
14209 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14210 (exit $ac_status); }; }; then 15175 (exit $ac_status); }; }; then
14211 15176
14212 echo "$as_me:$LINENO: result: yes" >&5 15177 { echo "$as_me:$LINENO: result: yes" >&5
14213echo "${ECHO_T}yes" >&6 15178echo "${ECHO_T}yes" >&6; }
14214 15179
14215else 15180else
14216 echo "$as_me: program exited with status $ac_status" >&5 15181 echo "$as_me: program exited with status $ac_status" >&5
@@ -14219,27 +15184,30 @@ sed 's/^/| /' conftest.$ac_ext >&5
14219 15184
14220( exit $ac_status ) 15185( exit $ac_status )
14221 15186
14222 echo "$as_me:$LINENO: result: no" >&5 15187 { echo "$as_me:$LINENO: result: no" >&5
14223echo "${ECHO_T}no" >&6 15188echo "${ECHO_T}no" >&6; }
14224 cat >>confdefs.h <<\_ACEOF 15189 cat >>confdefs.h <<\_ACEOF
14225#define BROKEN_GETADDRINFO 1 15190#define BROKEN_GETADDRINFO 1
14226_ACEOF 15191_ACEOF
14227 15192
14228 15193
14229fi 15194fi
14230rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 15195rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14231fi 15196fi
15197
15198
14232fi 15199fi
14233 15200
14234if test "x$ac_cv_func_getaddrinfo" = "xyes" && \ 15201if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
14235 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then 15202 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then
14236 echo "$as_me:$LINENO: checking if getaddrinfo seems to work" >&5 15203 { echo "$as_me:$LINENO: checking if getaddrinfo seems to work" >&5
14237echo $ECHO_N "checking if getaddrinfo seems to work... $ECHO_C" >&6 15204echo $ECHO_N "checking if getaddrinfo seems to work... $ECHO_C" >&6; }
14238 if test "$cross_compiling" = yes; then 15205 if test "$cross_compiling" = yes; then
14239 echo "$as_me:$LINENO: result: cross-compiling" >&5
14240echo "${ECHO_T}cross-compiling" >&6
14241 15206
14242 ] 15207 { echo "$as_me:$LINENO: result: cross-compiling" >&5
15208echo "${ECHO_T}cross-compiling" >&6; }
15209
15210
14243else 15211else
14244 cat >conftest.$ac_ext <<_ACEOF 15212 cat >conftest.$ac_ext <<_ACEOF
14245/* confdefs.h. */ 15213/* confdefs.h. */
@@ -14292,19 +15260,28 @@ main(void)
14292 15260
14293_ACEOF 15261_ACEOF
14294rm -f conftest$ac_exeext 15262rm -f conftest$ac_exeext
14295if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 15263if { (ac_try="$ac_link"
14296 (eval $ac_link) 2>&5 15264case "(($ac_try" in
15265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15266 *) ac_try_echo=$ac_try;;
15267esac
15268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15269 (eval "$ac_link") 2>&5
14297 ac_status=$? 15270 ac_status=$?
14298 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14299 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 15272 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 15273 { (case "(($ac_try" in
14301 (eval $ac_try) 2>&5 15274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15275 *) ac_try_echo=$ac_try;;
15276esac
15277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15278 (eval "$ac_try") 2>&5
14302 ac_status=$? 15279 ac_status=$?
14303 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14304 (exit $ac_status); }; }; then 15281 (exit $ac_status); }; }; then
14305 15282
14306 echo "$as_me:$LINENO: result: yes" >&5 15283 { echo "$as_me:$LINENO: result: yes" >&5
14307echo "${ECHO_T}yes" >&6 15284echo "${ECHO_T}yes" >&6; }
14308 15285
14309cat >>confdefs.h <<\_ACEOF 15286cat >>confdefs.h <<\_ACEOF
14310#define AIX_GETNAMEINFO_HACK 1 15287#define AIX_GETNAMEINFO_HACK 1
@@ -14318,21 +15295,23 @@ sed 's/^/| /' conftest.$ac_ext >&5
14318 15295
14319( exit $ac_status ) 15296( exit $ac_status )
14320 15297
14321 echo "$as_me:$LINENO: result: no" >&5 15298 { echo "$as_me:$LINENO: result: no" >&5
14322echo "${ECHO_T}no" >&6 15299echo "${ECHO_T}no" >&6; }
14323 cat >>confdefs.h <<\_ACEOF 15300 cat >>confdefs.h <<\_ACEOF
14324#define BROKEN_GETADDRINFO 1 15301#define BROKEN_GETADDRINFO 1
14325_ACEOF 15302_ACEOF
14326 15303
14327 15304
14328fi 15305fi
14329rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 15306rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14330fi 15307fi
15308
15309
14331fi 15310fi
14332 15311
14333if test "x$check_for_conflicting_getspnam" = "x1"; then 15312if test "x$check_for_conflicting_getspnam" = "x1"; then
14334 echo "$as_me:$LINENO: checking for conflicting getspnam in shadow.h" >&5 15313 { echo "$as_me:$LINENO: checking for conflicting getspnam in shadow.h" >&5
14335echo $ECHO_N "checking for conflicting getspnam in shadow.h... $ECHO_C" >&6 15314echo $ECHO_N "checking for conflicting getspnam in shadow.h... $ECHO_C" >&6; }
14336 cat >conftest.$ac_ext <<_ACEOF 15315 cat >conftest.$ac_ext <<_ACEOF
14337 15316
14338#include <shadow.h> 15317#include <shadow.h>
@@ -14340,38 +15319,33 @@ int main(void) {exit(0);}
14340 15319
14341_ACEOF 15320_ACEOF
14342rm -f conftest.$ac_objext 15321rm -f conftest.$ac_objext
14343if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 15322if { (ac_try="$ac_compile"
14344 (eval $ac_compile) 2>conftest.er1 15323case "(($ac_try" in
15324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15325 *) ac_try_echo=$ac_try;;
15326esac
15327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15328 (eval "$ac_compile") 2>conftest.er1
14345 ac_status=$? 15329 ac_status=$?
14346 grep -v '^ *+' conftest.er1 >conftest.err 15330 grep -v '^ *+' conftest.er1 >conftest.err
14347 rm -f conftest.er1 15331 rm -f conftest.er1
14348 cat conftest.err >&5 15332 cat conftest.err >&5
14349 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14350 (exit $ac_status); } && 15334 (exit $ac_status); } && {
14351 { ac_try='test -z "$ac_c_werror_flag" 15335 test -z "$ac_c_werror_flag" ||
14352 || test ! -s conftest.err' 15336 test ! -s conftest.err
14353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 15337 } && test -s conftest.$ac_objext; then
14354 (eval $ac_try) 2>&5
14355 ac_status=$?
14356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14357 (exit $ac_status); }; } &&
14358 { ac_try='test -s conftest.$ac_objext'
14359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14360 (eval $ac_try) 2>&5
14361 ac_status=$?
14362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14363 (exit $ac_status); }; }; then
14364 15338
14365 echo "$as_me:$LINENO: result: no" >&5 15339 { echo "$as_me:$LINENO: result: no" >&5
14366echo "${ECHO_T}no" >&6 15340echo "${ECHO_T}no" >&6; }
14367 15341
14368else 15342else
14369 echo "$as_me: failed program was:" >&5 15343 echo "$as_me: failed program was:" >&5
14370sed 's/^/| /' conftest.$ac_ext >&5 15344sed 's/^/| /' conftest.$ac_ext >&5
14371 15345
14372 15346
14373 echo "$as_me:$LINENO: result: yes" >&5 15347 { echo "$as_me:$LINENO: result: yes" >&5
14374echo "${ECHO_T}yes" >&6 15348echo "${ECHO_T}yes" >&6; }
14375 15349
14376cat >>confdefs.h <<\_ACEOF 15350cat >>confdefs.h <<\_ACEOF
14377#define GETSPNAM_CONFLICTING_DEFS 1 15351#define GETSPNAM_CONFLICTING_DEFS 1
@@ -14380,11 +15354,12 @@ _ACEOF
14380 15354
14381 15355
14382fi 15356fi
14383rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 15357
15358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14384fi 15359fi
14385 15360
14386echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5 15361{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
14387echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6 15362echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
14388if test "${ac_cv_func_getpgrp_void+set}" = set; then 15363if test "${ac_cv_func_getpgrp_void+set}" = set; then
14389 echo $ECHO_N "(cached) $ECHO_C" >&6 15364 echo $ECHO_N "(cached) $ECHO_C" >&6
14390else 15365else
@@ -14405,39 +15380,35 @@ getpgrp (0);
14405} 15380}
14406_ACEOF 15381_ACEOF
14407rm -f conftest.$ac_objext 15382rm -f conftest.$ac_objext
14408if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 15383if { (ac_try="$ac_compile"
14409 (eval $ac_compile) 2>conftest.er1 15384case "(($ac_try" in
15385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15386 *) ac_try_echo=$ac_try;;
15387esac
15388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15389 (eval "$ac_compile") 2>conftest.er1
14410 ac_status=$? 15390 ac_status=$?
14411 grep -v '^ *+' conftest.er1 >conftest.err 15391 grep -v '^ *+' conftest.er1 >conftest.err
14412 rm -f conftest.er1 15392 rm -f conftest.er1
14413 cat conftest.err >&5 15393 cat conftest.err >&5
14414 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14415 (exit $ac_status); } && 15395 (exit $ac_status); } && {
14416 { ac_try='test -z "$ac_c_werror_flag" 15396 test -z "$ac_c_werror_flag" ||
14417 || test ! -s conftest.err' 15397 test ! -s conftest.err
14418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 15398 } && test -s conftest.$ac_objext; then
14419 (eval $ac_try) 2>&5
14420 ac_status=$?
14421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14422 (exit $ac_status); }; } &&
14423 { ac_try='test -s conftest.$ac_objext'
14424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14425 (eval $ac_try) 2>&5
14426 ac_status=$?
14427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14428 (exit $ac_status); }; }; then
14429 ac_cv_func_getpgrp_void=no 15399 ac_cv_func_getpgrp_void=no
14430else 15400else
14431 echo "$as_me: failed program was:" >&5 15401 echo "$as_me: failed program was:" >&5
14432sed 's/^/| /' conftest.$ac_ext >&5 15402sed 's/^/| /' conftest.$ac_ext >&5
14433 15403
14434ac_cv_func_getpgrp_void=yes 15404 ac_cv_func_getpgrp_void=yes
14435fi 15405fi
14436rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 15406
15407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14437 15408
14438fi 15409fi
14439echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5 15410{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
14440echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6 15411echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
14441if test $ac_cv_func_getpgrp_void = yes; then 15412if test $ac_cv_func_getpgrp_void = yes; then
14442 15413
14443cat >>confdefs.h <<\_ACEOF 15414cat >>confdefs.h <<\_ACEOF
@@ -14447,474 +15418,13 @@ _ACEOF
14447fi 15418fi
14448 15419
14449 15420
14450# Check for PAM libs
14451PAM_MSG="no"
14452
14453# Check whether --with-pam or --without-pam was given.
14454if test "${with_pam+set}" = set; then
14455 withval="$with_pam"
14456
14457 if test "x$withval" != "xno" ; then
14458 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
14459 test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
14460 { { echo "$as_me:$LINENO: error: PAM headers not found" >&5
14461echo "$as_me: error: PAM headers not found" >&2;}
14462 { (exit 1); exit 1; }; }
14463 fi
14464
14465
14466echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14467echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
14468if test "${ac_cv_lib_dl_dlopen+set}" = set; then
14469 echo $ECHO_N "(cached) $ECHO_C" >&6
14470else
14471 ac_check_lib_save_LIBS=$LIBS
14472LIBS="-ldl $LIBS"
14473cat >conftest.$ac_ext <<_ACEOF
14474/* confdefs.h. */
14475_ACEOF
14476cat confdefs.h >>conftest.$ac_ext
14477cat >>conftest.$ac_ext <<_ACEOF
14478/* end confdefs.h. */
14479
14480/* Override any gcc2 internal prototype to avoid an error. */
14481#ifdef __cplusplus
14482extern "C"
14483#endif
14484/* We use char because int might match the return type of a gcc2
14485 builtin and then its argument prototype would still apply. */
14486char dlopen ();
14487int
14488main ()
14489{
14490dlopen ();
14491 ;
14492 return 0;
14493}
14494_ACEOF
14495rm -f conftest.$ac_objext conftest$ac_exeext
14496if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14497 (eval $ac_link) 2>conftest.er1
14498 ac_status=$?
14499 grep -v '^ *+' conftest.er1 >conftest.err
14500 rm -f conftest.er1
14501 cat conftest.err >&5
14502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14503 (exit $ac_status); } &&
14504 { ac_try='test -z "$ac_c_werror_flag"
14505 || test ! -s conftest.err'
14506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14507 (eval $ac_try) 2>&5
14508 ac_status=$?
14509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14510 (exit $ac_status); }; } &&
14511 { ac_try='test -s conftest$ac_exeext'
14512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14513 (eval $ac_try) 2>&5
14514 ac_status=$?
14515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14516 (exit $ac_status); }; }; then
14517 ac_cv_lib_dl_dlopen=yes
14518else
14519 echo "$as_me: failed program was:" >&5
14520sed 's/^/| /' conftest.$ac_ext >&5
14521
14522ac_cv_lib_dl_dlopen=no
14523fi
14524rm -f conftest.err conftest.$ac_objext \
14525 conftest$ac_exeext conftest.$ac_ext
14526LIBS=$ac_check_lib_save_LIBS
14527fi
14528echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14529echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
14530if test $ac_cv_lib_dl_dlopen = yes; then
14531 cat >>confdefs.h <<_ACEOF
14532#define HAVE_LIBDL 1
14533_ACEOF
14534
14535 LIBS="-ldl $LIBS"
14536
14537fi
14538
14539
14540echo "$as_me:$LINENO: checking for pam_set_item in -lpam" >&5
14541echo $ECHO_N "checking for pam_set_item in -lpam... $ECHO_C" >&6
14542if test "${ac_cv_lib_pam_pam_set_item+set}" = set; then
14543 echo $ECHO_N "(cached) $ECHO_C" >&6
14544else
14545 ac_check_lib_save_LIBS=$LIBS
14546LIBS="-lpam $LIBS"
14547cat >conftest.$ac_ext <<_ACEOF
14548/* confdefs.h. */
14549_ACEOF
14550cat confdefs.h >>conftest.$ac_ext
14551cat >>conftest.$ac_ext <<_ACEOF
14552/* end confdefs.h. */
14553
14554/* Override any gcc2 internal prototype to avoid an error. */
14555#ifdef __cplusplus
14556extern "C"
14557#endif
14558/* We use char because int might match the return type of a gcc2
14559 builtin and then its argument prototype would still apply. */
14560char pam_set_item ();
14561int
14562main ()
14563{
14564pam_set_item ();
14565 ;
14566 return 0;
14567}
14568_ACEOF
14569rm -f conftest.$ac_objext conftest$ac_exeext
14570if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14571 (eval $ac_link) 2>conftest.er1
14572 ac_status=$?
14573 grep -v '^ *+' conftest.er1 >conftest.err
14574 rm -f conftest.er1
14575 cat conftest.err >&5
14576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14577 (exit $ac_status); } &&
14578 { ac_try='test -z "$ac_c_werror_flag"
14579 || test ! -s conftest.err'
14580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14581 (eval $ac_try) 2>&5
14582 ac_status=$?
14583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14584 (exit $ac_status); }; } &&
14585 { ac_try='test -s conftest$ac_exeext'
14586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14587 (eval $ac_try) 2>&5
14588 ac_status=$?
14589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14590 (exit $ac_status); }; }; then
14591 ac_cv_lib_pam_pam_set_item=yes
14592else
14593 echo "$as_me: failed program was:" >&5
14594sed 's/^/| /' conftest.$ac_ext >&5
14595
14596ac_cv_lib_pam_pam_set_item=no
14597fi
14598rm -f conftest.err conftest.$ac_objext \
14599 conftest$ac_exeext conftest.$ac_ext
14600LIBS=$ac_check_lib_save_LIBS
14601fi
14602echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_set_item" >&5
14603echo "${ECHO_T}$ac_cv_lib_pam_pam_set_item" >&6
14604if test $ac_cv_lib_pam_pam_set_item = yes; then
14605 cat >>confdefs.h <<_ACEOF
14606#define HAVE_LIBPAM 1
14607_ACEOF
14608
14609 LIBS="-lpam $LIBS"
14610
14611else
14612 { { echo "$as_me:$LINENO: error: *** libpam missing" >&5
14613echo "$as_me: error: *** libpam missing" >&2;}
14614 { (exit 1); exit 1; }; }
14615fi
14616
14617
14618for ac_func in pam_getenvlist
14619do
14620as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14621echo "$as_me:$LINENO: checking for $ac_func" >&5
14622echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14623if eval "test \"\${$as_ac_var+set}\" = set"; then
14624 echo $ECHO_N "(cached) $ECHO_C" >&6
14625else
14626 cat >conftest.$ac_ext <<_ACEOF
14627/* confdefs.h. */
14628_ACEOF
14629cat confdefs.h >>conftest.$ac_ext
14630cat >>conftest.$ac_ext <<_ACEOF
14631/* end confdefs.h. */
14632/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14633 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14634#define $ac_func innocuous_$ac_func
14635
14636/* System header to define __stub macros and hopefully few prototypes,
14637 which can conflict with char $ac_func (); below.
14638 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14639 <limits.h> exists even on freestanding compilers. */
14640
14641#ifdef __STDC__
14642# include <limits.h>
14643#else
14644# include <assert.h>
14645#endif
14646
14647#undef $ac_func
14648
14649/* Override any gcc2 internal prototype to avoid an error. */
14650#ifdef __cplusplus
14651extern "C"
14652{
14653#endif
14654/* We use char because int might match the return type of a gcc2
14655 builtin and then its argument prototype would still apply. */
14656char $ac_func ();
14657/* The GNU C library defines this for functions which it implements
14658 to always fail with ENOSYS. Some functions are actually named
14659 something starting with __ and the normal name is an alias. */
14660#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14661choke me
14662#else
14663char (*f) () = $ac_func;
14664#endif
14665#ifdef __cplusplus
14666}
14667#endif
14668
14669int
14670main ()
14671{
14672return f != $ac_func;
14673 ;
14674 return 0;
14675}
14676_ACEOF
14677rm -f conftest.$ac_objext conftest$ac_exeext
14678if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14679 (eval $ac_link) 2>conftest.er1
14680 ac_status=$?
14681 grep -v '^ *+' conftest.er1 >conftest.err
14682 rm -f conftest.er1
14683 cat conftest.err >&5
14684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14685 (exit $ac_status); } &&
14686 { ac_try='test -z "$ac_c_werror_flag"
14687 || test ! -s conftest.err'
14688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14689 (eval $ac_try) 2>&5
14690 ac_status=$?
14691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14692 (exit $ac_status); }; } &&
14693 { ac_try='test -s conftest$ac_exeext'
14694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14695 (eval $ac_try) 2>&5
14696 ac_status=$?
14697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14698 (exit $ac_status); }; }; then
14699 eval "$as_ac_var=yes"
14700else
14701 echo "$as_me: failed program was:" >&5
14702sed 's/^/| /' conftest.$ac_ext >&5
14703
14704eval "$as_ac_var=no"
14705fi
14706rm -f conftest.err conftest.$ac_objext \
14707 conftest$ac_exeext conftest.$ac_ext
14708fi
14709echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14710echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14711if test `eval echo '${'$as_ac_var'}'` = yes; then
14712 cat >>confdefs.h <<_ACEOF
14713#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14714_ACEOF
14715
14716fi
14717done
14718
14719
14720for ac_func in pam_putenv
14721do
14722as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14723echo "$as_me:$LINENO: checking for $ac_func" >&5
14724echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14725if eval "test \"\${$as_ac_var+set}\" = set"; then
14726 echo $ECHO_N "(cached) $ECHO_C" >&6
14727else
14728 cat >conftest.$ac_ext <<_ACEOF
14729/* confdefs.h. */
14730_ACEOF
14731cat confdefs.h >>conftest.$ac_ext
14732cat >>conftest.$ac_ext <<_ACEOF
14733/* end confdefs.h. */
14734/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14735 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14736#define $ac_func innocuous_$ac_func
14737
14738/* System header to define __stub macros and hopefully few prototypes,
14739 which can conflict with char $ac_func (); below.
14740 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14741 <limits.h> exists even on freestanding compilers. */
14742
14743#ifdef __STDC__
14744# include <limits.h>
14745#else
14746# include <assert.h>
14747#endif
14748
14749#undef $ac_func
14750
14751/* Override any gcc2 internal prototype to avoid an error. */
14752#ifdef __cplusplus
14753extern "C"
14754{
14755#endif
14756/* We use char because int might match the return type of a gcc2
14757 builtin and then its argument prototype would still apply. */
14758char $ac_func ();
14759/* The GNU C library defines this for functions which it implements
14760 to always fail with ENOSYS. Some functions are actually named
14761 something starting with __ and the normal name is an alias. */
14762#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14763choke me
14764#else
14765char (*f) () = $ac_func;
14766#endif
14767#ifdef __cplusplus
14768}
14769#endif
14770
14771int
14772main ()
14773{
14774return f != $ac_func;
14775 ;
14776 return 0;
14777}
14778_ACEOF
14779rm -f conftest.$ac_objext conftest$ac_exeext
14780if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14781 (eval $ac_link) 2>conftest.er1
14782 ac_status=$?
14783 grep -v '^ *+' conftest.er1 >conftest.err
14784 rm -f conftest.er1
14785 cat conftest.err >&5
14786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14787 (exit $ac_status); } &&
14788 { ac_try='test -z "$ac_c_werror_flag"
14789 || test ! -s conftest.err'
14790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14791 (eval $ac_try) 2>&5
14792 ac_status=$?
14793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14794 (exit $ac_status); }; } &&
14795 { ac_try='test -s conftest$ac_exeext'
14796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14797 (eval $ac_try) 2>&5
14798 ac_status=$?
14799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14800 (exit $ac_status); }; }; then
14801 eval "$as_ac_var=yes"
14802else
14803 echo "$as_me: failed program was:" >&5
14804sed 's/^/| /' conftest.$ac_ext >&5
14805
14806eval "$as_ac_var=no"
14807fi
14808rm -f conftest.err conftest.$ac_objext \
14809 conftest$ac_exeext conftest.$ac_ext
14810fi
14811echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14812echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14813if test `eval echo '${'$as_ac_var'}'` = yes; then
14814 cat >>confdefs.h <<_ACEOF
14815#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14816_ACEOF
14817
14818fi
14819done
14820
14821
14822 PAM_MSG="yes"
14823
14824
14825cat >>confdefs.h <<\_ACEOF
14826#define USE_PAM 1
14827_ACEOF
14828
14829 if test $ac_cv_lib_dl_dlopen = yes; then
14830 LIBPAM="-lpam -ldl"
14831 else
14832 LIBPAM="-lpam"
14833 fi
14834
14835 fi
14836
14837
14838fi;
14839
14840# Check for older PAM
14841if test "x$PAM_MSG" = "xyes" ; then
14842 # Check PAM strerror arguments (old PAM)
14843 echo "$as_me:$LINENO: checking whether pam_strerror takes only one argument" >&5
14844echo $ECHO_N "checking whether pam_strerror takes only one argument... $ECHO_C" >&6
14845 cat >conftest.$ac_ext <<_ACEOF
14846/* confdefs.h. */
14847_ACEOF
14848cat confdefs.h >>conftest.$ac_ext
14849cat >>conftest.$ac_ext <<_ACEOF
14850/* end confdefs.h. */
14851
14852#include <stdlib.h>
14853#if defined(HAVE_SECURITY_PAM_APPL_H)
14854#include <security/pam_appl.h>
14855#elif defined (HAVE_PAM_PAM_APPL_H)
14856#include <pam/pam_appl.h>
14857#endif
14858
14859int
14860main ()
14861{
14862(void)pam_strerror((pam_handle_t *)NULL, -1);
14863 ;
14864 return 0;
14865}
14866_ACEOF
14867rm -f conftest.$ac_objext
14868if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14869 (eval $ac_compile) 2>conftest.er1
14870 ac_status=$?
14871 grep -v '^ *+' conftest.er1 >conftest.err
14872 rm -f conftest.er1
14873 cat conftest.err >&5
14874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14875 (exit $ac_status); } &&
14876 { ac_try='test -z "$ac_c_werror_flag"
14877 || test ! -s conftest.err'
14878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14879 (eval $ac_try) 2>&5
14880 ac_status=$?
14881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14882 (exit $ac_status); }; } &&
14883 { ac_try='test -s conftest.$ac_objext'
14884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14885 (eval $ac_try) 2>&5
14886 ac_status=$?
14887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14888 (exit $ac_status); }; }; then
14889 echo "$as_me:$LINENO: result: no" >&5
14890echo "${ECHO_T}no" >&6
14891else
14892 echo "$as_me: failed program was:" >&5
14893sed 's/^/| /' conftest.$ac_ext >&5
14894
14895
14896
14897cat >>confdefs.h <<\_ACEOF
14898#define HAVE_OLD_PAM 1
14899_ACEOF
14900
14901 echo "$as_me:$LINENO: result: yes" >&5
14902echo "${ECHO_T}yes" >&6
14903 PAM_MSG="yes (old library)"
14904
14905
14906fi
14907rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14908fi
14909
14910# Search for OpenSSL 15421# Search for OpenSSL
14911saved_CPPFLAGS="$CPPFLAGS" 15422saved_CPPFLAGS="$CPPFLAGS"
14912saved_LDFLAGS="$LDFLAGS" 15423saved_LDFLAGS="$LDFLAGS"
14913 15424
14914# Check whether --with-ssl-dir or --without-ssl-dir was given. 15425# Check whether --with-ssl-dir was given.
14915if test "${with_ssl_dir+set}" = set; then 15426if test "${with_ssl_dir+set}" = set; then
14916 withval="$with_ssl_dir" 15427 withval=$with_ssl_dir;
14917
14918 if test "x$withval" != "xno" ; then 15428 if test "x$withval" != "xno" ; then
14919 case "$withval" in 15429 case "$withval" in
14920 # Relative paths 15430 # Relative paths
@@ -14941,7 +15451,8 @@ if test "${with_ssl_dir+set}" = set; then
14941 fi 15451 fi
14942 15452
14943 15453
14944fi; 15454fi
15455
14945LIBS="-lcrypto $LIBS" 15456LIBS="-lcrypto $LIBS"
14946cat >conftest.$ac_ext <<_ACEOF 15457cat >conftest.$ac_ext <<_ACEOF
14947/* confdefs.h. */ 15458/* confdefs.h. */
@@ -14950,43 +15461,39 @@ cat confdefs.h >>conftest.$ac_ext
14950cat >>conftest.$ac_ext <<_ACEOF 15461cat >>conftest.$ac_ext <<_ACEOF
14951/* end confdefs.h. */ 15462/* end confdefs.h. */
14952 15463
14953/* Override any gcc2 internal prototype to avoid an error. */ 15464/* Override any GCC internal prototype to avoid an error.
15465 Use char because int might match the return type of a GCC
15466 builtin and then its argument prototype would still apply. */
14954#ifdef __cplusplus 15467#ifdef __cplusplus
14955extern "C" 15468extern "C"
14956#endif 15469#endif
14957/* We use char because int might match the return type of a gcc2
14958 builtin and then its argument prototype would still apply. */
14959char RAND_add (); 15470char RAND_add ();
14960int 15471int
14961main () 15472main ()
14962{ 15473{
14963RAND_add (); 15474return RAND_add ();
14964 ; 15475 ;
14965 return 0; 15476 return 0;
14966} 15477}
14967_ACEOF 15478_ACEOF
14968rm -f conftest.$ac_objext conftest$ac_exeext 15479rm -f conftest.$ac_objext conftest$ac_exeext
14969if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 15480if { (ac_try="$ac_link"
14970 (eval $ac_link) 2>conftest.er1 15481case "(($ac_try" in
15482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15483 *) ac_try_echo=$ac_try;;
15484esac
15485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15486 (eval "$ac_link") 2>conftest.er1
14971 ac_status=$? 15487 ac_status=$?
14972 grep -v '^ *+' conftest.er1 >conftest.err 15488 grep -v '^ *+' conftest.er1 >conftest.err
14973 rm -f conftest.er1 15489 rm -f conftest.er1
14974 cat conftest.err >&5 15490 cat conftest.err >&5
14975 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14976 (exit $ac_status); } && 15492 (exit $ac_status); } && {
14977 { ac_try='test -z "$ac_c_werror_flag" 15493 test -z "$ac_c_werror_flag" ||
14978 || test ! -s conftest.err' 15494 test ! -s conftest.err
14979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 15495 } && test -s conftest$ac_exeext &&
14980 (eval $ac_try) 2>&5 15496 $as_test_x conftest$ac_exeext; then
14981 ac_status=$?
14982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14983 (exit $ac_status); }; } &&
14984 { ac_try='test -s conftest$ac_exeext'
14985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14986 (eval $ac_try) 2>&5
14987 ac_status=$?
14988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14989 (exit $ac_status); }; }; then
14990 15497
14991cat >>confdefs.h <<\_ACEOF 15498cat >>confdefs.h <<\_ACEOF
14992#define HAVE_OPENSSL 1 15499#define HAVE_OPENSSL 1
@@ -15010,43 +15517,39 @@ cat confdefs.h >>conftest.$ac_ext
15010cat >>conftest.$ac_ext <<_ACEOF 15517cat >>conftest.$ac_ext <<_ACEOF
15011/* end confdefs.h. */ 15518/* end confdefs.h. */
15012 15519
15013/* Override any gcc2 internal prototype to avoid an error. */ 15520/* Override any GCC internal prototype to avoid an error.
15521 Use char because int might match the return type of a GCC
15522 builtin and then its argument prototype would still apply. */
15014#ifdef __cplusplus 15523#ifdef __cplusplus
15015extern "C" 15524extern "C"
15016#endif 15525#endif
15017/* We use char because int might match the return type of a gcc2
15018 builtin and then its argument prototype would still apply. */
15019char RAND_add (); 15526char RAND_add ();
15020int 15527int
15021main () 15528main ()
15022{ 15529{
15023RAND_add (); 15530return RAND_add ();
15024 ; 15531 ;
15025 return 0; 15532 return 0;
15026} 15533}
15027_ACEOF 15534_ACEOF
15028rm -f conftest.$ac_objext conftest$ac_exeext 15535rm -f conftest.$ac_objext conftest$ac_exeext
15029if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 15536if { (ac_try="$ac_link"
15030 (eval $ac_link) 2>conftest.er1 15537case "(($ac_try" in
15538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15539 *) ac_try_echo=$ac_try;;
15540esac
15541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15542 (eval "$ac_link") 2>conftest.er1
15031 ac_status=$? 15543 ac_status=$?
15032 grep -v '^ *+' conftest.er1 >conftest.err 15544 grep -v '^ *+' conftest.er1 >conftest.err
15033 rm -f conftest.er1 15545 rm -f conftest.er1
15034 cat conftest.err >&5 15546 cat conftest.err >&5
15035 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15036 (exit $ac_status); } && 15548 (exit $ac_status); } && {
15037 { ac_try='test -z "$ac_c_werror_flag" 15549 test -z "$ac_c_werror_flag" ||
15038 || test ! -s conftest.err' 15550 test ! -s conftest.err
15039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 15551 } && test -s conftest$ac_exeext &&
15040 (eval $ac_try) 2>&5 15552 $as_test_x conftest$ac_exeext; then
15041 ac_status=$?
15042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15043 (exit $ac_status); }; } &&
15044 { ac_try='test -s conftest$ac_exeext'
15045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15046 (eval $ac_try) 2>&5
15047 ac_status=$?
15048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15049 (exit $ac_status); }; }; then
15050 cat >>confdefs.h <<\_ACEOF 15553 cat >>confdefs.h <<\_ACEOF
15051#define HAVE_OPENSSL 1 15554#define HAVE_OPENSSL 1
15052_ACEOF 15555_ACEOF
@@ -15062,17 +15565,19 @@ echo "$as_me: error: *** Can't find recent OpenSSL libcrypto (see config.log for
15062 15565
15063 15566
15064fi 15567fi
15065rm -f conftest.err conftest.$ac_objext \ 15568
15569rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15066 conftest$ac_exeext conftest.$ac_ext 15570 conftest$ac_exeext conftest.$ac_ext
15067 15571
15068 15572
15069fi 15573fi
15070rm -f conftest.err conftest.$ac_objext \ 15574
15575rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15071 conftest$ac_exeext conftest.$ac_ext 15576 conftest$ac_exeext conftest.$ac_ext
15072 15577
15073# Determine OpenSSL header version 15578# Determine OpenSSL header version
15074echo "$as_me:$LINENO: checking OpenSSL header version" >&5 15579{ echo "$as_me:$LINENO: checking OpenSSL header version" >&5
15075echo $ECHO_N "checking OpenSSL header version... $ECHO_C" >&6 15580echo $ECHO_N "checking OpenSSL header version... $ECHO_C" >&6; }
15076if test "$cross_compiling" = yes; then 15581if test "$cross_compiling" = yes; then
15077 15582
15078 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5 15583 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5
@@ -15107,20 +15612,29 @@ int main(void) {
15107 15612
15108_ACEOF 15613_ACEOF
15109rm -f conftest$ac_exeext 15614rm -f conftest$ac_exeext
15110if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 15615if { (ac_try="$ac_link"
15111 (eval $ac_link) 2>&5 15616case "(($ac_try" in
15617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15618 *) ac_try_echo=$ac_try;;
15619esac
15620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15621 (eval "$ac_link") 2>&5
15112 ac_status=$? 15622 ac_status=$?
15113 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15114 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 15624 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 15625 { (case "(($ac_try" in
15116 (eval $ac_try) 2>&5 15626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15627 *) ac_try_echo=$ac_try;;
15628esac
15629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15630 (eval "$ac_try") 2>&5
15117 ac_status=$? 15631 ac_status=$?
15118 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15119 (exit $ac_status); }; }; then 15633 (exit $ac_status); }; }; then
15120 15634
15121 ssl_header_ver=`cat conftest.sslincver` 15635 ssl_header_ver=`cat conftest.sslincver`
15122 echo "$as_me:$LINENO: result: $ssl_header_ver" >&5 15636 { echo "$as_me:$LINENO: result: $ssl_header_ver" >&5
15123echo "${ECHO_T}$ssl_header_ver" >&6 15637echo "${ECHO_T}$ssl_header_ver" >&6; }
15124 15638
15125else 15639else
15126 echo "$as_me: program exited with status $ac_status" >&5 15640 echo "$as_me: program exited with status $ac_status" >&5
@@ -15129,19 +15643,21 @@ sed 's/^/| /' conftest.$ac_ext >&5
15129 15643
15130( exit $ac_status ) 15644( exit $ac_status )
15131 15645
15132 echo "$as_me:$LINENO: result: not found" >&5 15646 { echo "$as_me:$LINENO: result: not found" >&5
15133echo "${ECHO_T}not found" >&6 15647echo "${ECHO_T}not found" >&6; }
15134 { { echo "$as_me:$LINENO: error: OpenSSL version header not found." >&5 15648 { { echo "$as_me:$LINENO: error: OpenSSL version header not found." >&5
15135echo "$as_me: error: OpenSSL version header not found." >&2;} 15649echo "$as_me: error: OpenSSL version header not found." >&2;}
15136 { (exit 1); exit 1; }; } 15650 { (exit 1); exit 1; }; }
15137 15651
15138fi 15652fi
15139rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 15653rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15140fi 15654fi
15141 15655
15656
15657
15142# Determine OpenSSL library version 15658# Determine OpenSSL library version
15143echo "$as_me:$LINENO: checking OpenSSL library version" >&5 15659{ echo "$as_me:$LINENO: checking OpenSSL library version" >&5
15144echo $ECHO_N "checking OpenSSL library version... $ECHO_C" >&6 15660echo $ECHO_N "checking OpenSSL library version... $ECHO_C" >&6; }
15145if test "$cross_compiling" = yes; then 15661if test "$cross_compiling" = yes; then
15146 15662
15147 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5 15663 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5
@@ -15177,20 +15693,29 @@ int main(void) {
15177 15693
15178_ACEOF 15694_ACEOF
15179rm -f conftest$ac_exeext 15695rm -f conftest$ac_exeext
15180if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 15696if { (ac_try="$ac_link"
15181 (eval $ac_link) 2>&5 15697case "(($ac_try" in
15698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15699 *) ac_try_echo=$ac_try;;
15700esac
15701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15702 (eval "$ac_link") 2>&5
15182 ac_status=$? 15703 ac_status=$?
15183 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15184 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 15705 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 15706 { (case "(($ac_try" in
15186 (eval $ac_try) 2>&5 15707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15708 *) ac_try_echo=$ac_try;;
15709esac
15710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15711 (eval "$ac_try") 2>&5
15187 ac_status=$? 15712 ac_status=$?
15188 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15189 (exit $ac_status); }; }; then 15714 (exit $ac_status); }; }; then
15190 15715
15191 ssl_library_ver=`cat conftest.ssllibver` 15716 ssl_library_ver=`cat conftest.ssllibver`
15192 echo "$as_me:$LINENO: result: $ssl_library_ver" >&5 15717 { echo "$as_me:$LINENO: result: $ssl_library_ver" >&5
15193echo "${ECHO_T}$ssl_library_ver" >&6 15718echo "${ECHO_T}$ssl_library_ver" >&6; }
15194 15719
15195else 15720else
15196 echo "$as_me: program exited with status $ac_status" >&5 15721 echo "$as_me: program exited with status $ac_status" >&5
@@ -15199,19 +15724,32 @@ sed 's/^/| /' conftest.$ac_ext >&5
15199 15724
15200( exit $ac_status ) 15725( exit $ac_status )
15201 15726
15202 echo "$as_me:$LINENO: result: not found" >&5 15727 { echo "$as_me:$LINENO: result: not found" >&5
15203echo "${ECHO_T}not found" >&6 15728echo "${ECHO_T}not found" >&6; }
15204 { { echo "$as_me:$LINENO: error: OpenSSL library not found." >&5 15729 { { echo "$as_me:$LINENO: error: OpenSSL library not found." >&5
15205echo "$as_me: error: OpenSSL library not found." >&2;} 15730echo "$as_me: error: OpenSSL library not found." >&2;}
15206 { (exit 1); exit 1; }; } 15731 { (exit 1); exit 1; }; }
15207 15732
15208fi 15733fi
15209rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 15734rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15210fi 15735fi
15211 15736
15737
15738
15739
15740# Check whether --with-openssl-header-check was given.
15741if test "${with_openssl_header_check+set}" = set; then
15742 withval=$with_openssl_header_check; if test "x$withval" = "xno" ; then
15743 openssl_check_nonfatal=1
15744 fi
15745
15746
15747fi
15748
15749
15212# Sanity check OpenSSL headers 15750# Sanity check OpenSSL headers
15213echo "$as_me:$LINENO: checking whether OpenSSL's headers match the library" >&5 15751{ echo "$as_me:$LINENO: checking whether OpenSSL's headers match the library" >&5
15214echo $ECHO_N "checking whether OpenSSL's headers match the library... $ECHO_C" >&6 15752echo $ECHO_N "checking whether OpenSSL's headers match the library... $ECHO_C" >&6; }
15215if test "$cross_compiling" = yes; then 15753if test "$cross_compiling" = yes; then
15216 15754
15217 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5 15755 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5
@@ -15232,19 +15770,28 @@ int main(void) { exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); }
15232 15770
15233_ACEOF 15771_ACEOF
15234rm -f conftest$ac_exeext 15772rm -f conftest$ac_exeext
15235if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 15773if { (ac_try="$ac_link"
15236 (eval $ac_link) 2>&5 15774case "(($ac_try" in
15775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15776 *) ac_try_echo=$ac_try;;
15777esac
15778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15779 (eval "$ac_link") 2>&5
15237 ac_status=$? 15780 ac_status=$?
15238 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15239 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 15782 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 15783 { (case "(($ac_try" in
15241 (eval $ac_try) 2>&5 15784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15785 *) ac_try_echo=$ac_try;;
15786esac
15787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15788 (eval "$ac_try") 2>&5
15242 ac_status=$? 15789 ac_status=$?
15243 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15244 (exit $ac_status); }; }; then 15791 (exit $ac_status); }; }; then
15245 15792
15246 echo "$as_me:$LINENO: result: yes" >&5 15793 { echo "$as_me:$LINENO: result: yes" >&5
15247echo "${ECHO_T}yes" >&6 15794echo "${ECHO_T}yes" >&6; }
15248 15795
15249else 15796else
15250 echo "$as_me: program exited with status $ac_status" >&5 15797 echo "$as_me: program exited with status $ac_status" >&5
@@ -15253,23 +15800,39 @@ sed 's/^/| /' conftest.$ac_ext >&5
15253 15800
15254( exit $ac_status ) 15801( exit $ac_status )
15255 15802
15256 echo "$as_me:$LINENO: result: no" >&5 15803 { echo "$as_me:$LINENO: result: no" >&5
15257echo "${ECHO_T}no" >&6 15804echo "${ECHO_T}no" >&6; }
15258 { { echo "$as_me:$LINENO: error: Your OpenSSL headers do not match your library. 15805 if test "x$openssl_check_nonfatal" = "x"; then
15259Check config.log for details. 15806 { { echo "$as_me:$LINENO: error: Your OpenSSL headers do not match your
15807library. Check config.log for details.
15808If you are sure your installation is consistent, you can disable the check
15809by running \"./configure --without-openssl-header-check\".
15810Also see contrib/findssl.sh for help identifying header/library mismatches.
15811" >&5
15812echo "$as_me: error: Your OpenSSL headers do not match your
15813library. Check config.log for details.
15814If you are sure your installation is consistent, you can disable the check
15815by running \"./configure --without-openssl-header-check\".
15816Also see contrib/findssl.sh for help identifying header/library mismatches.
15817" >&2;}
15818 { (exit 1); exit 1; }; }
15819 else
15820 { echo "$as_me:$LINENO: WARNING: Your OpenSSL headers do not match your
15821library. Check config.log for details.
15260Also see contrib/findssl.sh for help identifying header/library mismatches." >&5 15822Also see contrib/findssl.sh for help identifying header/library mismatches." >&5
15261echo "$as_me: error: Your OpenSSL headers do not match your library. 15823echo "$as_me: WARNING: Your OpenSSL headers do not match your
15262Check config.log for details. 15824library. Check config.log for details.
15263Also see contrib/findssl.sh for help identifying header/library mismatches." >&2;} 15825Also see contrib/findssl.sh for help identifying header/library mismatches." >&2;}
15264 { (exit 1); exit 1; }; } 15826 fi
15265 15827
15266fi 15828fi
15267rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 15829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15268fi 15830fi
15269 15831
15270# Check for OpenSSL without EVP_aes_{192,256}_cbc 15832
15271echo "$as_me:$LINENO: checking whether OpenSSL has crippled AES support" >&5 15833
15272echo $ECHO_N "checking whether OpenSSL has crippled AES support... $ECHO_C" >&6 15834{ echo "$as_me:$LINENO: checking if programs using OpenSSL functions will link" >&5
15835echo $ECHO_N "checking if programs using OpenSSL functions will link... $ECHO_C" >&6; }
15273cat >conftest.$ac_ext <<_ACEOF 15836cat >conftest.$ac_ext <<_ACEOF
15274/* confdefs.h. */ 15837/* confdefs.h. */
15275_ACEOF 15838_ACEOF
@@ -15277,44 +15840,205 @@ cat confdefs.h >>conftest.$ac_ext
15277cat >>conftest.$ac_ext <<_ACEOF 15840cat >>conftest.$ac_ext <<_ACEOF
15278/* end confdefs.h. */ 15841/* end confdefs.h. */
15279 15842
15280#include <string.h>
15281#include <openssl/evp.h> 15843#include <openssl/evp.h>
15282int main(void) { exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);} 15844int main(void) { SSLeay_add_all_algorithms(); }
15283 15845
15284_ACEOF 15846_ACEOF
15285rm -f conftest.$ac_objext 15847rm -f conftest.$ac_objext conftest$ac_exeext
15286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 15848if { (ac_try="$ac_link"
15287 (eval $ac_compile) 2>conftest.er1 15849case "(($ac_try" in
15850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15851 *) ac_try_echo=$ac_try;;
15852esac
15853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15854 (eval "$ac_link") 2>conftest.er1
15288 ac_status=$? 15855 ac_status=$?
15289 grep -v '^ *+' conftest.er1 >conftest.err 15856 grep -v '^ *+' conftest.er1 >conftest.err
15290 rm -f conftest.er1 15857 rm -f conftest.er1
15291 cat conftest.err >&5 15858 cat conftest.err >&5
15292 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15293 (exit $ac_status); } && 15860 (exit $ac_status); } && {
15294 { ac_try='test -z "$ac_c_werror_flag" 15861 test -z "$ac_c_werror_flag" ||
15295 || test ! -s conftest.err' 15862 test ! -s conftest.err
15296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 15863 } && test -s conftest$ac_exeext &&
15297 (eval $ac_try) 2>&5 15864 $as_test_x conftest$ac_exeext; then
15865
15866 { echo "$as_me:$LINENO: result: yes" >&5
15867echo "${ECHO_T}yes" >&6; }
15868
15869else
15870 echo "$as_me: failed program was:" >&5
15871sed 's/^/| /' conftest.$ac_ext >&5
15872
15873
15874 { echo "$as_me:$LINENO: result: no" >&5
15875echo "${ECHO_T}no" >&6; }
15876 saved_LIBS="$LIBS"
15877 LIBS="$LIBS -ldl"
15878 { echo "$as_me:$LINENO: checking if programs using OpenSSL need -ldl" >&5
15879echo $ECHO_N "checking if programs using OpenSSL need -ldl... $ECHO_C" >&6; }
15880 cat >conftest.$ac_ext <<_ACEOF
15881/* confdefs.h. */
15882_ACEOF
15883cat confdefs.h >>conftest.$ac_ext
15884cat >>conftest.$ac_ext <<_ACEOF
15885/* end confdefs.h. */
15886
15887#include <openssl/evp.h>
15888int main(void) { SSLeay_add_all_algorithms(); }
15889
15890_ACEOF
15891rm -f conftest.$ac_objext conftest$ac_exeext
15892if { (ac_try="$ac_link"
15893case "(($ac_try" in
15894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15895 *) ac_try_echo=$ac_try;;
15896esac
15897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15898 (eval "$ac_link") 2>conftest.er1
15298 ac_status=$? 15899 ac_status=$?
15900 grep -v '^ *+' conftest.er1 >conftest.err
15901 rm -f conftest.er1
15902 cat conftest.err >&5
15299 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15300 (exit $ac_status); }; } && 15904 (exit $ac_status); } && {
15301 { ac_try='test -s conftest.$ac_objext' 15905 test -z "$ac_c_werror_flag" ||
15302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 15906 test ! -s conftest.err
15303 (eval $ac_try) 2>&5 15907 } && test -s conftest$ac_exeext &&
15908 $as_test_x conftest$ac_exeext; then
15909
15910 { echo "$as_me:$LINENO: result: yes" >&5
15911echo "${ECHO_T}yes" >&6; }
15912
15913else
15914 echo "$as_me: failed program was:" >&5
15915sed 's/^/| /' conftest.$ac_ext >&5
15916
15917
15918 { echo "$as_me:$LINENO: result: no" >&5
15919echo "${ECHO_T}no" >&6; }
15920 LIBS="$saved_LIBS"
15921
15922
15923fi
15924
15925rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15926 conftest$ac_exeext conftest.$ac_ext
15927
15928
15929fi
15930
15931rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15932 conftest$ac_exeext conftest.$ac_ext
15933
15934
15935# Check whether --with-ssl-engine was given.
15936if test "${with_ssl_engine+set}" = set; then
15937 withval=$with_ssl_engine; if test "x$withval" != "xno" ; then
15938 { echo "$as_me:$LINENO: checking for OpenSSL ENGINE support" >&5
15939echo $ECHO_N "checking for OpenSSL ENGINE support... $ECHO_C" >&6; }
15940 cat >conftest.$ac_ext <<_ACEOF
15941/* confdefs.h. */
15942_ACEOF
15943cat confdefs.h >>conftest.$ac_ext
15944cat >>conftest.$ac_ext <<_ACEOF
15945/* end confdefs.h. */
15946 #include <openssl/engine.h>
15947int
15948main ()
15949{
15950
15951ENGINE_load_builtin_engines();ENGINE_register_all_complete();
15952
15953 ;
15954 return 0;
15955}
15956_ACEOF
15957rm -f conftest.$ac_objext
15958if { (ac_try="$ac_compile"
15959case "(($ac_try" in
15960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15961 *) ac_try_echo=$ac_try;;
15962esac
15963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15964 (eval "$ac_compile") 2>conftest.er1
15304 ac_status=$? 15965 ac_status=$?
15966 grep -v '^ *+' conftest.er1 >conftest.err
15967 rm -f conftest.er1
15968 cat conftest.err >&5
15305 echo "$as_me:$LINENO: \$? = $ac_status" >&5 15969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15306 (exit $ac_status); }; }; then 15970 (exit $ac_status); } && {
15971 test -z "$ac_c_werror_flag" ||
15972 test ! -s conftest.err
15973 } && test -s conftest.$ac_objext; then
15974 { echo "$as_me:$LINENO: result: yes" >&5
15975echo "${ECHO_T}yes" >&6; }
15976
15977cat >>confdefs.h <<\_ACEOF
15978#define USE_OPENSSL_ENGINE 1
15979_ACEOF
15307 15980
15308 echo "$as_me:$LINENO: result: no" >&5
15309echo "${ECHO_T}no" >&6
15310 15981
15311else 15982else
15312 echo "$as_me: failed program was:" >&5 15983 echo "$as_me: failed program was:" >&5
15313sed 's/^/| /' conftest.$ac_ext >&5 15984sed 's/^/| /' conftest.$ac_ext >&5
15314 15985
15986 { { echo "$as_me:$LINENO: error: OpenSSL ENGINE support not found" >&5
15987echo "$as_me: error: OpenSSL ENGINE support not found" >&2;}
15988 { (exit 1); exit 1; }; }
15989
15990fi
15991
15992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15993 fi
15994
15995fi
15996
15997
15998# Check for OpenSSL without EVP_aes_{192,256}_cbc
15999{ echo "$as_me:$LINENO: checking whether OpenSSL has crippled AES support" >&5
16000echo $ECHO_N "checking whether OpenSSL has crippled AES support... $ECHO_C" >&6; }
16001cat >conftest.$ac_ext <<_ACEOF
16002/* confdefs.h. */
16003_ACEOF
16004cat confdefs.h >>conftest.$ac_ext
16005cat >>conftest.$ac_ext <<_ACEOF
16006/* end confdefs.h. */
16007
16008#include <string.h>
16009#include <openssl/evp.h>
16010int main(void) { exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);}
16011
16012_ACEOF
16013rm -f conftest.$ac_objext conftest$ac_exeext
16014if { (ac_try="$ac_link"
16015case "(($ac_try" in
16016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16017 *) ac_try_echo=$ac_try;;
16018esac
16019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16020 (eval "$ac_link") 2>conftest.er1
16021 ac_status=$?
16022 grep -v '^ *+' conftest.er1 >conftest.err
16023 rm -f conftest.er1
16024 cat conftest.err >&5
16025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16026 (exit $ac_status); } && {
16027 test -z "$ac_c_werror_flag" ||
16028 test ! -s conftest.err
16029 } && test -s conftest$ac_exeext &&
16030 $as_test_x conftest$ac_exeext; then
15315 16031
15316 echo "$as_me:$LINENO: result: yes" >&5 16032 { echo "$as_me:$LINENO: result: no" >&5
15317echo "${ECHO_T}yes" >&6 16033echo "${ECHO_T}no" >&6; }
16034
16035else
16036 echo "$as_me: failed program was:" >&5
16037sed 's/^/| /' conftest.$ac_ext >&5
16038
16039
16040 { echo "$as_me:$LINENO: result: yes" >&5
16041echo "${ECHO_T}yes" >&6; }
15318 16042
15319cat >>confdefs.h <<\_ACEOF 16043cat >>confdefs.h <<\_ACEOF
15320#define OPENSSL_LOBOTOMISED_AES 1 16044#define OPENSSL_LOBOTOMISED_AES 1
@@ -15323,14 +16047,16 @@ _ACEOF
15323 16047
15324 16048
15325fi 16049fi
15326rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 16050
16051rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16052 conftest$ac_exeext conftest.$ac_ext
15327 16053
15328# Some systems want crypt() from libcrypt, *not* the version in OpenSSL, 16054# Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
15329# because the system crypt() is more featureful. 16055# because the system crypt() is more featureful.
15330if test "x$check_for_libcrypt_before" = "x1"; then 16056if test "x$check_for_libcrypt_before" = "x1"; then
15331 16057
15332echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 16058{ echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
15333echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6 16059echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
15334if test "${ac_cv_lib_crypt_crypt+set}" = set; then 16060if test "${ac_cv_lib_crypt_crypt+set}" = set; then
15335 echo $ECHO_N "(cached) $ECHO_C" >&6 16061 echo $ECHO_N "(cached) $ECHO_C" >&6
15336else 16062else
@@ -15343,56 +16069,53 @@ cat confdefs.h >>conftest.$ac_ext
15343cat >>conftest.$ac_ext <<_ACEOF 16069cat >>conftest.$ac_ext <<_ACEOF
15344/* end confdefs.h. */ 16070/* end confdefs.h. */
15345 16071
15346/* Override any gcc2 internal prototype to avoid an error. */ 16072/* Override any GCC internal prototype to avoid an error.
16073 Use char because int might match the return type of a GCC
16074 builtin and then its argument prototype would still apply. */
15347#ifdef __cplusplus 16075#ifdef __cplusplus
15348extern "C" 16076extern "C"
15349#endif 16077#endif
15350/* We use char because int might match the return type of a gcc2
15351 builtin and then its argument prototype would still apply. */
15352char crypt (); 16078char crypt ();
15353int 16079int
15354main () 16080main ()
15355{ 16081{
15356crypt (); 16082return crypt ();
15357 ; 16083 ;
15358 return 0; 16084 return 0;
15359} 16085}
15360_ACEOF 16086_ACEOF
15361rm -f conftest.$ac_objext conftest$ac_exeext 16087rm -f conftest.$ac_objext conftest$ac_exeext
15362if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 16088if { (ac_try="$ac_link"
15363 (eval $ac_link) 2>conftest.er1 16089case "(($ac_try" in
16090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16091 *) ac_try_echo=$ac_try;;
16092esac
16093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16094 (eval "$ac_link") 2>conftest.er1
15364 ac_status=$? 16095 ac_status=$?
15365 grep -v '^ *+' conftest.er1 >conftest.err 16096 grep -v '^ *+' conftest.er1 >conftest.err
15366 rm -f conftest.er1 16097 rm -f conftest.er1
15367 cat conftest.err >&5 16098 cat conftest.err >&5
15368 echo "$as_me:$LINENO: \$? = $ac_status" >&5 16099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15369 (exit $ac_status); } && 16100 (exit $ac_status); } && {
15370 { ac_try='test -z "$ac_c_werror_flag" 16101 test -z "$ac_c_werror_flag" ||
15371 || test ! -s conftest.err' 16102 test ! -s conftest.err
15372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 16103 } && test -s conftest$ac_exeext &&
15373 (eval $ac_try) 2>&5 16104 $as_test_x conftest$ac_exeext; then
15374 ac_status=$?
15375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15376 (exit $ac_status); }; } &&
15377 { ac_try='test -s conftest$ac_exeext'
15378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15379 (eval $ac_try) 2>&5
15380 ac_status=$?
15381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15382 (exit $ac_status); }; }; then
15383 ac_cv_lib_crypt_crypt=yes 16105 ac_cv_lib_crypt_crypt=yes
15384else 16106else
15385 echo "$as_me: failed program was:" >&5 16107 echo "$as_me: failed program was:" >&5
15386sed 's/^/| /' conftest.$ac_ext >&5 16108sed 's/^/| /' conftest.$ac_ext >&5
15387 16109
15388ac_cv_lib_crypt_crypt=no 16110 ac_cv_lib_crypt_crypt=no
15389fi 16111fi
15390rm -f conftest.err conftest.$ac_objext \ 16112
16113rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15391 conftest$ac_exeext conftest.$ac_ext 16114 conftest$ac_exeext conftest.$ac_ext
15392LIBS=$ac_check_lib_save_LIBS 16115LIBS=$ac_check_lib_save_LIBS
15393fi 16116fi
15394echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 16117{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
15395echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6 16118echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
15396if test $ac_cv_lib_crypt_crypt = yes; then 16119if test $ac_cv_lib_crypt_crypt = yes; then
15397 cat >>confdefs.h <<_ACEOF 16120 cat >>confdefs.h <<_ACEOF
15398#define HAVE_LIBCRYPT 1 16121#define HAVE_LIBCRYPT 1
@@ -15407,8 +16130,8 @@ fi
15407# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the 16130# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
15408# version in OpenSSL. 16131# version in OpenSSL.
15409if test "x$check_for_libcrypt_later" = "x1"; then 16132if test "x$check_for_libcrypt_later" = "x1"; then
15410 echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 16133 { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
15411echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6 16134echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
15412if test "${ac_cv_lib_crypt_crypt+set}" = set; then 16135if test "${ac_cv_lib_crypt_crypt+set}" = set; then
15413 echo $ECHO_N "(cached) $ECHO_C" >&6 16136 echo $ECHO_N "(cached) $ECHO_C" >&6
15414else 16137else
@@ -15421,65 +16144,159 @@ cat confdefs.h >>conftest.$ac_ext
15421cat >>conftest.$ac_ext <<_ACEOF 16144cat >>conftest.$ac_ext <<_ACEOF
15422/* end confdefs.h. */ 16145/* end confdefs.h. */
15423 16146
15424/* Override any gcc2 internal prototype to avoid an error. */ 16147/* Override any GCC internal prototype to avoid an error.
16148 Use char because int might match the return type of a GCC
16149 builtin and then its argument prototype would still apply. */
15425#ifdef __cplusplus 16150#ifdef __cplusplus
15426extern "C" 16151extern "C"
15427#endif 16152#endif
15428/* We use char because int might match the return type of a gcc2
15429 builtin and then its argument prototype would still apply. */
15430char crypt (); 16153char crypt ();
15431int 16154int
15432main () 16155main ()
15433{ 16156{
15434crypt (); 16157return crypt ();
15435 ; 16158 ;
15436 return 0; 16159 return 0;
15437} 16160}
15438_ACEOF 16161_ACEOF
15439rm -f conftest.$ac_objext conftest$ac_exeext 16162rm -f conftest.$ac_objext conftest$ac_exeext
15440if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 16163if { (ac_try="$ac_link"
15441 (eval $ac_link) 2>conftest.er1 16164case "(($ac_try" in
16165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16166 *) ac_try_echo=$ac_try;;
16167esac
16168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16169 (eval "$ac_link") 2>conftest.er1
15442 ac_status=$? 16170 ac_status=$?
15443 grep -v '^ *+' conftest.er1 >conftest.err 16171 grep -v '^ *+' conftest.er1 >conftest.err
15444 rm -f conftest.er1 16172 rm -f conftest.er1
15445 cat conftest.err >&5 16173 cat conftest.err >&5
15446 echo "$as_me:$LINENO: \$? = $ac_status" >&5 16174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15447 (exit $ac_status); } && 16175 (exit $ac_status); } && {
15448 { ac_try='test -z "$ac_c_werror_flag" 16176 test -z "$ac_c_werror_flag" ||
15449 || test ! -s conftest.err' 16177 test ! -s conftest.err
15450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 16178 } && test -s conftest$ac_exeext &&
15451 (eval $ac_try) 2>&5 16179 $as_test_x conftest$ac_exeext; then
15452 ac_status=$?
15453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15454 (exit $ac_status); }; } &&
15455 { ac_try='test -s conftest$ac_exeext'
15456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15457 (eval $ac_try) 2>&5
15458 ac_status=$?
15459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15460 (exit $ac_status); }; }; then
15461 ac_cv_lib_crypt_crypt=yes 16180 ac_cv_lib_crypt_crypt=yes
15462else 16181else
15463 echo "$as_me: failed program was:" >&5 16182 echo "$as_me: failed program was:" >&5
15464sed 's/^/| /' conftest.$ac_ext >&5 16183sed 's/^/| /' conftest.$ac_ext >&5
15465 16184
15466ac_cv_lib_crypt_crypt=no 16185 ac_cv_lib_crypt_crypt=no
15467fi 16186fi
15468rm -f conftest.err conftest.$ac_objext \ 16187
16188rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15469 conftest$ac_exeext conftest.$ac_ext 16189 conftest$ac_exeext conftest.$ac_ext
15470LIBS=$ac_check_lib_save_LIBS 16190LIBS=$ac_check_lib_save_LIBS
15471fi 16191fi
15472echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 16192{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
15473echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6 16193echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
15474if test $ac_cv_lib_crypt_crypt = yes; then 16194if test $ac_cv_lib_crypt_crypt = yes; then
15475 LIBS="$LIBS -lcrypt" 16195 LIBS="$LIBS -lcrypt"
15476fi 16196fi
15477 16197
15478fi 16198fi
15479 16199
16200# Search for SHA256 support in libc and/or OpenSSL
15480 16201
15481echo "$as_me:$LINENO: checking for ia_openinfo in -liaf" >&5 16202
15482echo $ECHO_N "checking for ia_openinfo in -liaf... $ECHO_C" >&6 16203for ac_func in SHA256_Update EVP_sha256
16204do
16205as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16206{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16207echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16208if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16209 echo $ECHO_N "(cached) $ECHO_C" >&6
16210else
16211 cat >conftest.$ac_ext <<_ACEOF
16212/* confdefs.h. */
16213_ACEOF
16214cat confdefs.h >>conftest.$ac_ext
16215cat >>conftest.$ac_ext <<_ACEOF
16216/* end confdefs.h. */
16217/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16218 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16219#define $ac_func innocuous_$ac_func
16220
16221/* System header to define __stub macros and hopefully few prototypes,
16222 which can conflict with char $ac_func (); below.
16223 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16224 <limits.h> exists even on freestanding compilers. */
16225
16226#ifdef __STDC__
16227# include <limits.h>
16228#else
16229# include <assert.h>
16230#endif
16231
16232#undef $ac_func
16233
16234/* Override any GCC internal prototype to avoid an error.
16235 Use char because int might match the return type of a GCC
16236 builtin and then its argument prototype would still apply. */
16237#ifdef __cplusplus
16238extern "C"
16239#endif
16240char $ac_func ();
16241/* The GNU C library defines this for functions which it implements
16242 to always fail with ENOSYS. Some functions are actually named
16243 something starting with __ and the normal name is an alias. */
16244#if defined __stub_$ac_func || defined __stub___$ac_func
16245choke me
16246#endif
16247
16248int
16249main ()
16250{
16251return $ac_func ();
16252 ;
16253 return 0;
16254}
16255_ACEOF
16256rm -f conftest.$ac_objext conftest$ac_exeext
16257if { (ac_try="$ac_link"
16258case "(($ac_try" in
16259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16260 *) ac_try_echo=$ac_try;;
16261esac
16262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16263 (eval "$ac_link") 2>conftest.er1
16264 ac_status=$?
16265 grep -v '^ *+' conftest.er1 >conftest.err
16266 rm -f conftest.er1
16267 cat conftest.err >&5
16268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16269 (exit $ac_status); } && {
16270 test -z "$ac_c_werror_flag" ||
16271 test ! -s conftest.err
16272 } && test -s conftest$ac_exeext &&
16273 $as_test_x conftest$ac_exeext; then
16274 eval "$as_ac_var=yes"
16275else
16276 echo "$as_me: failed program was:" >&5
16277sed 's/^/| /' conftest.$ac_ext >&5
16278
16279 eval "$as_ac_var=no"
16280fi
16281
16282rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16283 conftest$ac_exeext conftest.$ac_ext
16284fi
16285ac_res=`eval echo '${'$as_ac_var'}'`
16286 { echo "$as_me:$LINENO: result: $ac_res" >&5
16287echo "${ECHO_T}$ac_res" >&6; }
16288if test `eval echo '${'$as_ac_var'}'` = yes; then
16289 cat >>confdefs.h <<_ACEOF
16290#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16291_ACEOF
16292
16293fi
16294done
16295
16296
16297
16298{ echo "$as_me:$LINENO: checking for ia_openinfo in -liaf" >&5
16299echo $ECHO_N "checking for ia_openinfo in -liaf... $ECHO_C" >&6; }
15483if test "${ac_cv_lib_iaf_ia_openinfo+set}" = set; then 16300if test "${ac_cv_lib_iaf_ia_openinfo+set}" = set; then
15484 echo $ECHO_N "(cached) $ECHO_C" >&6 16301 echo $ECHO_N "(cached) $ECHO_C" >&6
15485else 16302else
@@ -15492,56 +16309,53 @@ cat confdefs.h >>conftest.$ac_ext
15492cat >>conftest.$ac_ext <<_ACEOF 16309cat >>conftest.$ac_ext <<_ACEOF
15493/* end confdefs.h. */ 16310/* end confdefs.h. */
15494 16311
15495/* Override any gcc2 internal prototype to avoid an error. */ 16312/* Override any GCC internal prototype to avoid an error.
16313 Use char because int might match the return type of a GCC
16314 builtin and then its argument prototype would still apply. */
15496#ifdef __cplusplus 16315#ifdef __cplusplus
15497extern "C" 16316extern "C"
15498#endif 16317#endif
15499/* We use char because int might match the return type of a gcc2
15500 builtin and then its argument prototype would still apply. */
15501char ia_openinfo (); 16318char ia_openinfo ();
15502int 16319int
15503main () 16320main ()
15504{ 16321{
15505ia_openinfo (); 16322return ia_openinfo ();
15506 ; 16323 ;
15507 return 0; 16324 return 0;
15508} 16325}
15509_ACEOF 16326_ACEOF
15510rm -f conftest.$ac_objext conftest$ac_exeext 16327rm -f conftest.$ac_objext conftest$ac_exeext
15511if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 16328if { (ac_try="$ac_link"
15512 (eval $ac_link) 2>conftest.er1 16329case "(($ac_try" in
16330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16331 *) ac_try_echo=$ac_try;;
16332esac
16333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16334 (eval "$ac_link") 2>conftest.er1
15513 ac_status=$? 16335 ac_status=$?
15514 grep -v '^ *+' conftest.er1 >conftest.err 16336 grep -v '^ *+' conftest.er1 >conftest.err
15515 rm -f conftest.er1 16337 rm -f conftest.er1
15516 cat conftest.err >&5 16338 cat conftest.err >&5
15517 echo "$as_me:$LINENO: \$? = $ac_status" >&5 16339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15518 (exit $ac_status); } && 16340 (exit $ac_status); } && {
15519 { ac_try='test -z "$ac_c_werror_flag" 16341 test -z "$ac_c_werror_flag" ||
15520 || test ! -s conftest.err' 16342 test ! -s conftest.err
15521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 16343 } && test -s conftest$ac_exeext &&
15522 (eval $ac_try) 2>&5 16344 $as_test_x conftest$ac_exeext; then
15523 ac_status=$?
15524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15525 (exit $ac_status); }; } &&
15526 { ac_try='test -s conftest$ac_exeext'
15527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15528 (eval $ac_try) 2>&5
15529 ac_status=$?
15530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15531 (exit $ac_status); }; }; then
15532 ac_cv_lib_iaf_ia_openinfo=yes 16345 ac_cv_lib_iaf_ia_openinfo=yes
15533else 16346else
15534 echo "$as_me: failed program was:" >&5 16347 echo "$as_me: failed program was:" >&5
15535sed 's/^/| /' conftest.$ac_ext >&5 16348sed 's/^/| /' conftest.$ac_ext >&5
15536 16349
15537ac_cv_lib_iaf_ia_openinfo=no 16350 ac_cv_lib_iaf_ia_openinfo=no
15538fi 16351fi
15539rm -f conftest.err conftest.$ac_objext \ 16352
16353rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15540 conftest$ac_exeext conftest.$ac_ext 16354 conftest$ac_exeext conftest.$ac_ext
15541LIBS=$ac_check_lib_save_LIBS 16355LIBS=$ac_check_lib_save_LIBS
15542fi 16356fi
15543echo "$as_me:$LINENO: result: $ac_cv_lib_iaf_ia_openinfo" >&5 16357{ echo "$as_me:$LINENO: result: $ac_cv_lib_iaf_ia_openinfo" >&5
15544echo "${ECHO_T}$ac_cv_lib_iaf_ia_openinfo" >&6 16358echo "${ECHO_T}$ac_cv_lib_iaf_ia_openinfo" >&6; }
15545if test $ac_cv_lib_iaf_ia_openinfo = yes; then 16359if test $ac_cv_lib_iaf_ia_openinfo = yes; then
15546 cat >>confdefs.h <<_ACEOF 16360 cat >>confdefs.h <<_ACEOF
15547#define HAVE_LIBIAF 1 16361#define HAVE_LIBIAF 1
@@ -15555,8 +16369,8 @@ fi
15555### Configure cryptographic random number support 16369### Configure cryptographic random number support
15556 16370
15557# Check wheter OpenSSL seeds itself 16371# Check wheter OpenSSL seeds itself
15558echo "$as_me:$LINENO: checking whether OpenSSL's PRNG is internally seeded" >&5 16372{ echo "$as_me:$LINENO: checking whether OpenSSL's PRNG is internally seeded" >&5
15559echo $ECHO_N "checking whether OpenSSL's PRNG is internally seeded... $ECHO_C" >&6 16373echo $ECHO_N "checking whether OpenSSL's PRNG is internally seeded... $ECHO_C" >&6; }
15560if test "$cross_compiling" = yes; then 16374if test "$cross_compiling" = yes; then
15561 16375
15562 { echo "$as_me:$LINENO: WARNING: cross compiling: assuming yes" >&5 16376 { echo "$as_me:$LINENO: WARNING: cross compiling: assuming yes" >&5
@@ -15580,20 +16394,29 @@ int main(void) { exit(RAND_status() == 1 ? 0 : 1); }
15580 16394
15581_ACEOF 16395_ACEOF
15582rm -f conftest$ac_exeext 16396rm -f conftest$ac_exeext
15583if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 16397if { (ac_try="$ac_link"
15584 (eval $ac_link) 2>&5 16398case "(($ac_try" in
16399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16400 *) ac_try_echo=$ac_try;;
16401esac
16402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16403 (eval "$ac_link") 2>&5
15585 ac_status=$? 16404 ac_status=$?
15586 echo "$as_me:$LINENO: \$? = $ac_status" >&5 16405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15587 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 16406 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 16407 { (case "(($ac_try" in
15589 (eval $ac_try) 2>&5 16408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16409 *) ac_try_echo=$ac_try;;
16410esac
16411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16412 (eval "$ac_try") 2>&5
15590 ac_status=$? 16413 ac_status=$?
15591 echo "$as_me:$LINENO: \$? = $ac_status" >&5 16414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15592 (exit $ac_status); }; }; then 16415 (exit $ac_status); }; }; then
15593 16416
15594 OPENSSL_SEEDS_ITSELF=yes 16417 OPENSSL_SEEDS_ITSELF=yes
15595 echo "$as_me:$LINENO: result: yes" >&5 16418 { echo "$as_me:$LINENO: result: yes" >&5
15596echo "${ECHO_T}yes" >&6 16419echo "${ECHO_T}yes" >&6; }
15597 16420
15598else 16421else
15599 echo "$as_me: program exited with status $ac_status" >&5 16422 echo "$as_me: program exited with status $ac_status" >&5
@@ -15602,23 +16425,466 @@ sed 's/^/| /' conftest.$ac_ext >&5
15602 16425
15603( exit $ac_status ) 16426( exit $ac_status )
15604 16427
15605 echo "$as_me:$LINENO: result: no" >&5 16428 { echo "$as_me:$LINENO: result: no" >&5
15606echo "${ECHO_T}no" >&6 16429echo "${ECHO_T}no" >&6; }
15607 # Default to use of the rand helper if OpenSSL doesn't 16430 # Default to use of the rand helper if OpenSSL doesn't
15608 # seed itself 16431 # seed itself
15609 USE_RAND_HELPER=yes 16432 USE_RAND_HELPER=yes
15610 16433
15611fi 16434fi
15612rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 16435rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16436fi
16437
16438
16439
16440# Check for PAM libs
16441PAM_MSG="no"
16442
16443# Check whether --with-pam was given.
16444if test "${with_pam+set}" = set; then
16445 withval=$with_pam;
16446 if test "x$withval" != "xno" ; then
16447 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
16448 test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
16449 { { echo "$as_me:$LINENO: error: PAM headers not found" >&5
16450echo "$as_me: error: PAM headers not found" >&2;}
16451 { (exit 1); exit 1; }; }
16452 fi
16453
16454 saved_LIBS="$LIBS"
16455
16456{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
16457echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
16458if test "${ac_cv_lib_dl_dlopen+set}" = set; then
16459 echo $ECHO_N "(cached) $ECHO_C" >&6
16460else
16461 ac_check_lib_save_LIBS=$LIBS
16462LIBS="-ldl $LIBS"
16463cat >conftest.$ac_ext <<_ACEOF
16464/* confdefs.h. */
16465_ACEOF
16466cat confdefs.h >>conftest.$ac_ext
16467cat >>conftest.$ac_ext <<_ACEOF
16468/* end confdefs.h. */
16469
16470/* Override any GCC internal prototype to avoid an error.
16471 Use char because int might match the return type of a GCC
16472 builtin and then its argument prototype would still apply. */
16473#ifdef __cplusplus
16474extern "C"
16475#endif
16476char dlopen ();
16477int
16478main ()
16479{
16480return dlopen ();
16481 ;
16482 return 0;
16483}
16484_ACEOF
16485rm -f conftest.$ac_objext conftest$ac_exeext
16486if { (ac_try="$ac_link"
16487case "(($ac_try" in
16488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16489 *) ac_try_echo=$ac_try;;
16490esac
16491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16492 (eval "$ac_link") 2>conftest.er1
16493 ac_status=$?
16494 grep -v '^ *+' conftest.er1 >conftest.err
16495 rm -f conftest.er1
16496 cat conftest.err >&5
16497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16498 (exit $ac_status); } && {
16499 test -z "$ac_c_werror_flag" ||
16500 test ! -s conftest.err
16501 } && test -s conftest$ac_exeext &&
16502 $as_test_x conftest$ac_exeext; then
16503 ac_cv_lib_dl_dlopen=yes
16504else
16505 echo "$as_me: failed program was:" >&5
16506sed 's/^/| /' conftest.$ac_ext >&5
16507
16508 ac_cv_lib_dl_dlopen=no
16509fi
16510
16511rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16512 conftest$ac_exeext conftest.$ac_ext
16513LIBS=$ac_check_lib_save_LIBS
16514fi
16515{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
16516echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
16517if test $ac_cv_lib_dl_dlopen = yes; then
16518 cat >>confdefs.h <<_ACEOF
16519#define HAVE_LIBDL 1
16520_ACEOF
16521
16522 LIBS="-ldl $LIBS"
16523
16524fi
16525
16526
16527{ echo "$as_me:$LINENO: checking for pam_set_item in -lpam" >&5
16528echo $ECHO_N "checking for pam_set_item in -lpam... $ECHO_C" >&6; }
16529if test "${ac_cv_lib_pam_pam_set_item+set}" = set; then
16530 echo $ECHO_N "(cached) $ECHO_C" >&6
16531else
16532 ac_check_lib_save_LIBS=$LIBS
16533LIBS="-lpam $LIBS"
16534cat >conftest.$ac_ext <<_ACEOF
16535/* confdefs.h. */
16536_ACEOF
16537cat confdefs.h >>conftest.$ac_ext
16538cat >>conftest.$ac_ext <<_ACEOF
16539/* end confdefs.h. */
16540
16541/* Override any GCC internal prototype to avoid an error.
16542 Use char because int might match the return type of a GCC
16543 builtin and then its argument prototype would still apply. */
16544#ifdef __cplusplus
16545extern "C"
16546#endif
16547char pam_set_item ();
16548int
16549main ()
16550{
16551return pam_set_item ();
16552 ;
16553 return 0;
16554}
16555_ACEOF
16556rm -f conftest.$ac_objext conftest$ac_exeext
16557if { (ac_try="$ac_link"
16558case "(($ac_try" in
16559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16560 *) ac_try_echo=$ac_try;;
16561esac
16562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16563 (eval "$ac_link") 2>conftest.er1
16564 ac_status=$?
16565 grep -v '^ *+' conftest.er1 >conftest.err
16566 rm -f conftest.er1
16567 cat conftest.err >&5
16568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16569 (exit $ac_status); } && {
16570 test -z "$ac_c_werror_flag" ||
16571 test ! -s conftest.err
16572 } && test -s conftest$ac_exeext &&
16573 $as_test_x conftest$ac_exeext; then
16574 ac_cv_lib_pam_pam_set_item=yes
16575else
16576 echo "$as_me: failed program was:" >&5
16577sed 's/^/| /' conftest.$ac_ext >&5
16578
16579 ac_cv_lib_pam_pam_set_item=no
16580fi
16581
16582rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16583 conftest$ac_exeext conftest.$ac_ext
16584LIBS=$ac_check_lib_save_LIBS
16585fi
16586{ echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_set_item" >&5
16587echo "${ECHO_T}$ac_cv_lib_pam_pam_set_item" >&6; }
16588if test $ac_cv_lib_pam_pam_set_item = yes; then
16589 cat >>confdefs.h <<_ACEOF
16590#define HAVE_LIBPAM 1
16591_ACEOF
16592
16593 LIBS="-lpam $LIBS"
16594
16595else
16596 { { echo "$as_me:$LINENO: error: *** libpam missing" >&5
16597echo "$as_me: error: *** libpam missing" >&2;}
16598 { (exit 1); exit 1; }; }
16599fi
16600
16601
16602for ac_func in pam_getenvlist
16603do
16604as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16605{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16606echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16607if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16608 echo $ECHO_N "(cached) $ECHO_C" >&6
16609else
16610 cat >conftest.$ac_ext <<_ACEOF
16611/* confdefs.h. */
16612_ACEOF
16613cat confdefs.h >>conftest.$ac_ext
16614cat >>conftest.$ac_ext <<_ACEOF
16615/* end confdefs.h. */
16616/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16617 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16618#define $ac_func innocuous_$ac_func
16619
16620/* System header to define __stub macros and hopefully few prototypes,
16621 which can conflict with char $ac_func (); below.
16622 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16623 <limits.h> exists even on freestanding compilers. */
16624
16625#ifdef __STDC__
16626# include <limits.h>
16627#else
16628# include <assert.h>
16629#endif
16630
16631#undef $ac_func
16632
16633/* Override any GCC internal prototype to avoid an error.
16634 Use char because int might match the return type of a GCC
16635 builtin and then its argument prototype would still apply. */
16636#ifdef __cplusplus
16637extern "C"
16638#endif
16639char $ac_func ();
16640/* The GNU C library defines this for functions which it implements
16641 to always fail with ENOSYS. Some functions are actually named
16642 something starting with __ and the normal name is an alias. */
16643#if defined __stub_$ac_func || defined __stub___$ac_func
16644choke me
16645#endif
16646
16647int
16648main ()
16649{
16650return $ac_func ();
16651 ;
16652 return 0;
16653}
16654_ACEOF
16655rm -f conftest.$ac_objext conftest$ac_exeext
16656if { (ac_try="$ac_link"
16657case "(($ac_try" in
16658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16659 *) ac_try_echo=$ac_try;;
16660esac
16661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16662 (eval "$ac_link") 2>conftest.er1
16663 ac_status=$?
16664 grep -v '^ *+' conftest.er1 >conftest.err
16665 rm -f conftest.er1
16666 cat conftest.err >&5
16667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16668 (exit $ac_status); } && {
16669 test -z "$ac_c_werror_flag" ||
16670 test ! -s conftest.err
16671 } && test -s conftest$ac_exeext &&
16672 $as_test_x conftest$ac_exeext; then
16673 eval "$as_ac_var=yes"
16674else
16675 echo "$as_me: failed program was:" >&5
16676sed 's/^/| /' conftest.$ac_ext >&5
16677
16678 eval "$as_ac_var=no"
16679fi
16680
16681rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16682 conftest$ac_exeext conftest.$ac_ext
16683fi
16684ac_res=`eval echo '${'$as_ac_var'}'`
16685 { echo "$as_me:$LINENO: result: $ac_res" >&5
16686echo "${ECHO_T}$ac_res" >&6; }
16687if test `eval echo '${'$as_ac_var'}'` = yes; then
16688 cat >>confdefs.h <<_ACEOF
16689#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16690_ACEOF
16691
16692fi
16693done
16694
16695
16696for ac_func in pam_putenv
16697do
16698as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16699{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16700echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16701if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16702 echo $ECHO_N "(cached) $ECHO_C" >&6
16703else
16704 cat >conftest.$ac_ext <<_ACEOF
16705/* confdefs.h. */
16706_ACEOF
16707cat confdefs.h >>conftest.$ac_ext
16708cat >>conftest.$ac_ext <<_ACEOF
16709/* end confdefs.h. */
16710/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16711 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16712#define $ac_func innocuous_$ac_func
16713
16714/* System header to define __stub macros and hopefully few prototypes,
16715 which can conflict with char $ac_func (); below.
16716 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16717 <limits.h> exists even on freestanding compilers. */
16718
16719#ifdef __STDC__
16720# include <limits.h>
16721#else
16722# include <assert.h>
16723#endif
16724
16725#undef $ac_func
16726
16727/* Override any GCC internal prototype to avoid an error.
16728 Use char because int might match the return type of a GCC
16729 builtin and then its argument prototype would still apply. */
16730#ifdef __cplusplus
16731extern "C"
16732#endif
16733char $ac_func ();
16734/* The GNU C library defines this for functions which it implements
16735 to always fail with ENOSYS. Some functions are actually named
16736 something starting with __ and the normal name is an alias. */
16737#if defined __stub_$ac_func || defined __stub___$ac_func
16738choke me
16739#endif
16740
16741int
16742main ()
16743{
16744return $ac_func ();
16745 ;
16746 return 0;
16747}
16748_ACEOF
16749rm -f conftest.$ac_objext conftest$ac_exeext
16750if { (ac_try="$ac_link"
16751case "(($ac_try" in
16752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16753 *) ac_try_echo=$ac_try;;
16754esac
16755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16756 (eval "$ac_link") 2>conftest.er1
16757 ac_status=$?
16758 grep -v '^ *+' conftest.er1 >conftest.err
16759 rm -f conftest.er1
16760 cat conftest.err >&5
16761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16762 (exit $ac_status); } && {
16763 test -z "$ac_c_werror_flag" ||
16764 test ! -s conftest.err
16765 } && test -s conftest$ac_exeext &&
16766 $as_test_x conftest$ac_exeext; then
16767 eval "$as_ac_var=yes"
16768else
16769 echo "$as_me: failed program was:" >&5
16770sed 's/^/| /' conftest.$ac_ext >&5
16771
16772 eval "$as_ac_var=no"
16773fi
16774
16775rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16776 conftest$ac_exeext conftest.$ac_ext
16777fi
16778ac_res=`eval echo '${'$as_ac_var'}'`
16779 { echo "$as_me:$LINENO: result: $ac_res" >&5
16780echo "${ECHO_T}$ac_res" >&6; }
16781if test `eval echo '${'$as_ac_var'}'` = yes; then
16782 cat >>confdefs.h <<_ACEOF
16783#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16784_ACEOF
16785
15613fi 16786fi
16787done
16788
16789 LIBS="$saved_LIBS"
15614 16790
16791 PAM_MSG="yes"
16792
16793 LIBPAM="-lpam"
16794
16795cat >>confdefs.h <<\_ACEOF
16796#define USE_PAM 1
16797_ACEOF
16798
16799
16800 if test $ac_cv_lib_dl_dlopen = yes; then
16801 case "$LIBS" in
16802 *-ldl*)
16803 # libdl already in LIBS
16804 ;;
16805 *)
16806 LIBPAM="$LIBPAM -ldl"
16807 ;;
16808 esac
16809 fi
16810
16811 fi
16812
16813
16814fi
16815
16816
16817# Check for older PAM
16818if test "x$PAM_MSG" = "xyes" ; then
16819 # Check PAM strerror arguments (old PAM)
16820 { echo "$as_me:$LINENO: checking whether pam_strerror takes only one argument" >&5
16821echo $ECHO_N "checking whether pam_strerror takes only one argument... $ECHO_C" >&6; }
16822 cat >conftest.$ac_ext <<_ACEOF
16823/* confdefs.h. */
16824_ACEOF
16825cat confdefs.h >>conftest.$ac_ext
16826cat >>conftest.$ac_ext <<_ACEOF
16827/* end confdefs.h. */
16828
16829#include <stdlib.h>
16830#if defined(HAVE_SECURITY_PAM_APPL_H)
16831#include <security/pam_appl.h>
16832#elif defined (HAVE_PAM_PAM_APPL_H)
16833#include <pam/pam_appl.h>
16834#endif
16835
16836int
16837main ()
16838{
16839(void)pam_strerror((pam_handle_t *)NULL, -1);
16840 ;
16841 return 0;
16842}
16843_ACEOF
16844rm -f conftest.$ac_objext
16845if { (ac_try="$ac_compile"
16846case "(($ac_try" in
16847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16848 *) ac_try_echo=$ac_try;;
16849esac
16850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16851 (eval "$ac_compile") 2>conftest.er1
16852 ac_status=$?
16853 grep -v '^ *+' conftest.er1 >conftest.err
16854 rm -f conftest.er1
16855 cat conftest.err >&5
16856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16857 (exit $ac_status); } && {
16858 test -z "$ac_c_werror_flag" ||
16859 test ! -s conftest.err
16860 } && test -s conftest.$ac_objext; then
16861 { echo "$as_me:$LINENO: result: no" >&5
16862echo "${ECHO_T}no" >&6; }
16863else
16864 echo "$as_me: failed program was:" >&5
16865sed 's/^/| /' conftest.$ac_ext >&5
16866
16867
16868
16869cat >>confdefs.h <<\_ACEOF
16870#define HAVE_OLD_PAM 1
16871_ACEOF
16872
16873 { echo "$as_me:$LINENO: result: yes" >&5
16874echo "${ECHO_T}yes" >&6; }
16875 PAM_MSG="yes (old library)"
16876
16877
16878fi
16879
16880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16881fi
15615 16882
15616# Do we want to force the use of the rand helper? 16883# Do we want to force the use of the rand helper?
15617 16884
15618# Check whether --with-rand-helper or --without-rand-helper was given. 16885# Check whether --with-rand-helper was given.
15619if test "${with_rand_helper+set}" = set; then 16886if test "${with_rand_helper+set}" = set; then
15620 withval="$with_rand_helper" 16887 withval=$with_rand_helper;
15621
15622 if test "x$withval" = "xno" ; then 16888 if test "x$withval" = "xno" ; then
15623 # Force use of OpenSSL's internal RNG, even if 16889 # Force use of OpenSSL's internal RNG, even if
15624 # the previous test showed it to be unseeded. 16890 # the previous test showed it to be unseeded.
@@ -15632,7 +16898,8 @@ echo "$as_me: WARNING: *** Forcing use of OpenSSL's non-self-seeding PRNG" >&2;}
15632 USE_RAND_HELPER=yes 16898 USE_RAND_HELPER=yes
15633 fi 16899 fi
15634 16900
15635fi; 16901fi
16902
15636 16903
15637# Which randomness source do we use? 16904# Which randomness source do we use?
15638if test ! -z "$OPENSSL_SEEDS_ITSELF" && test -z "$USE_RAND_HELPER" ; then 16905if test ! -z "$OPENSSL_SEEDS_ITSELF" && test -z "$USE_RAND_HELPER" ; then
@@ -15655,10 +16922,9 @@ fi
15655 16922
15656# PRNGD TCP socket 16923# PRNGD TCP socket
15657 16924
15658# Check whether --with-prngd-port or --without-prngd-port was given. 16925# Check whether --with-prngd-port was given.
15659if test "${with_prngd_port+set}" = set; then 16926if test "${with_prngd_port+set}" = set; then
15660 withval="$with_prngd_port" 16927 withval=$with_prngd_port;
15661
15662 case "$withval" in 16928 case "$withval" in
15663 no) 16929 no)
15664 withval="" 16930 withval=""
@@ -15681,14 +16947,14 @@ _ACEOF
15681 fi 16947 fi
15682 16948
15683 16949
15684fi; 16950fi
16951
15685 16952
15686# PRNGD Unix domain socket 16953# PRNGD Unix domain socket
15687 16954
15688# Check whether --with-prngd-socket or --without-prngd-socket was given. 16955# Check whether --with-prngd-socket was given.
15689if test "${with_prngd_socket+set}" = set; then 16956if test "${with_prngd_socket+set}" = set; then
15690 withval="$with_prngd_socket" 16957 withval=$with_prngd_socket;
15691
15692 case "$withval" in 16958 case "$withval" in
15693 yes) 16959 yes)
15694 withval="/var/run/egd-pool" 16960 withval="/var/run/egd-pool"
@@ -15727,8 +16993,8 @@ else
15727 16993
15728 # Check for existing socket only if we don't have a random device already 16994 # Check for existing socket only if we don't have a random device already
15729 if test "$USE_RAND_HELPER" = yes ; then 16995 if test "$USE_RAND_HELPER" = yes ; then
15730 echo "$as_me:$LINENO: checking for PRNGD/EGD socket" >&5 16996 { echo "$as_me:$LINENO: checking for PRNGD/EGD socket" >&5
15731echo $ECHO_N "checking for PRNGD/EGD socket... $ECHO_C" >&6 16997echo $ECHO_N "checking for PRNGD/EGD socket... $ECHO_C" >&6; }
15732 # Insert other locations here 16998 # Insert other locations here
15733 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do 16999 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
15734 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then 17000 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
@@ -15741,31 +17007,32 @@ _ACEOF
15741 fi 17007 fi
15742 done 17008 done
15743 if test ! -z "$PRNGD_SOCKET" ; then 17009 if test ! -z "$PRNGD_SOCKET" ; then
15744 echo "$as_me:$LINENO: result: $PRNGD_SOCKET" >&5 17010 { echo "$as_me:$LINENO: result: $PRNGD_SOCKET" >&5
15745echo "${ECHO_T}$PRNGD_SOCKET" >&6 17011echo "${ECHO_T}$PRNGD_SOCKET" >&6; }
15746 else 17012 else
15747 echo "$as_me:$LINENO: result: not found" >&5 17013 { echo "$as_me:$LINENO: result: not found" >&5
15748echo "${ECHO_T}not found" >&6 17014echo "${ECHO_T}not found" >&6; }
15749 fi 17015 fi
15750 fi 17016 fi
15751 17017
15752 17018
15753fi; 17019fi
17020
15754 17021
15755# Change default command timeout for hashing entropy source 17022# Change default command timeout for hashing entropy source
15756entropy_timeout=200 17023entropy_timeout=200
15757 17024
15758# Check whether --with-entropy-timeout or --without-entropy-timeout was given. 17025# Check whether --with-entropy-timeout was given.
15759if test "${with_entropy_timeout+set}" = set; then 17026if test "${with_entropy_timeout+set}" = set; then
15760 withval="$with_entropy_timeout" 17027 withval=$with_entropy_timeout;
15761
15762 if test -n "$withval" && test "x$withval" != "xno" && \ 17028 if test -n "$withval" && test "x$withval" != "xno" && \
15763 test "x${withval}" != "xyes"; then 17029 test "x${withval}" != "xyes"; then
15764 entropy_timeout=$withval 17030 entropy_timeout=$withval
15765 fi 17031 fi
15766 17032
15767 17033
15768fi; 17034fi
17035
15769 17036
15770cat >>confdefs.h <<_ACEOF 17037cat >>confdefs.h <<_ACEOF
15771#define ENTROPY_TIMEOUT_MSEC $entropy_timeout 17038#define ENTROPY_TIMEOUT_MSEC $entropy_timeout
@@ -15774,17 +17041,17 @@ _ACEOF
15774 17041
15775SSH_PRIVSEP_USER=sshd 17042SSH_PRIVSEP_USER=sshd
15776 17043
15777# Check whether --with-privsep-user or --without-privsep-user was given. 17044# Check whether --with-privsep-user was given.
15778if test "${with_privsep_user+set}" = set; then 17045if test "${with_privsep_user+set}" = set; then
15779 withval="$with_privsep_user" 17046 withval=$with_privsep_user;
15780
15781 if test -n "$withval" && test "x$withval" != "xno" && \ 17047 if test -n "$withval" && test "x$withval" != "xno" && \
15782 test "x${withval}" != "xyes"; then 17048 test "x${withval}" != "xyes"; then
15783 SSH_PRIVSEP_USER=$withval 17049 SSH_PRIVSEP_USER=$withval
15784 fi 17050 fi
15785 17051
15786 17052
15787fi; 17053fi
17054
15788 17055
15789cat >>confdefs.h <<_ACEOF 17056cat >>confdefs.h <<_ACEOF
15790#define SSH_PRIVSEP_USER "$SSH_PRIVSEP_USER" 17057#define SSH_PRIVSEP_USER "$SSH_PRIVSEP_USER"
@@ -15810,8 +17077,8 @@ PATH=$PATH:/etc:$OPATH
15810 17077
15811 # Extract the first word of "ls", so it can be a program name with args. 17078 # Extract the first word of "ls", so it can be a program name with args.
15812set dummy ls; ac_word=$2 17079set dummy ls; ac_word=$2
15813echo "$as_me:$LINENO: checking for $ac_word" >&5 17080{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15814echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 17081echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15815if test "${ac_cv_path_PROG_LS+set}" = set; then 17082if test "${ac_cv_path_PROG_LS+set}" = set; then
15816 echo $ECHO_N "(cached) $ECHO_C" >&6 17083 echo $ECHO_N "(cached) $ECHO_C" >&6
15817else 17084else
@@ -15826,27 +17093,28 @@ do
15826 IFS=$as_save_IFS 17093 IFS=$as_save_IFS
15827 test -z "$as_dir" && as_dir=. 17094 test -z "$as_dir" && as_dir=.
15828 for ac_exec_ext in '' $ac_executable_extensions; do 17095 for ac_exec_ext in '' $ac_executable_extensions; do
15829 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 17096 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15830 ac_cv_path_PROG_LS="$as_dir/$ac_word$ac_exec_ext" 17097 ac_cv_path_PROG_LS="$as_dir/$ac_word$ac_exec_ext"
15831 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 17098 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15832 break 2 17099 break 2
15833 fi 17100 fi
15834done 17101done
15835done 17102done
17103IFS=$as_save_IFS
15836 17104
15837 ;; 17105 ;;
15838esac 17106esac
15839fi 17107fi
15840PROG_LS=$ac_cv_path_PROG_LS 17108PROG_LS=$ac_cv_path_PROG_LS
15841
15842if test -n "$PROG_LS"; then 17109if test -n "$PROG_LS"; then
15843 echo "$as_me:$LINENO: result: $PROG_LS" >&5 17110 { echo "$as_me:$LINENO: result: $PROG_LS" >&5
15844echo "${ECHO_T}$PROG_LS" >&6 17111echo "${ECHO_T}$PROG_LS" >&6; }
15845else 17112else
15846 echo "$as_me:$LINENO: result: no" >&5 17113 { echo "$as_me:$LINENO: result: no" >&5
15847echo "${ECHO_T}no" >&6 17114echo "${ECHO_T}no" >&6; }
15848fi 17115fi
15849 17116
17117
15850 if test -z "$PROG_LS" ; then 17118 if test -z "$PROG_LS" ; then
15851 PROG_LS="undef" 17119 PROG_LS="undef"
15852 fi 17120 fi
@@ -15855,8 +17123,8 @@ fi
15855 17123
15856 # Extract the first word of "netstat", so it can be a program name with args. 17124 # Extract the first word of "netstat", so it can be a program name with args.
15857set dummy netstat; ac_word=$2 17125set dummy netstat; ac_word=$2
15858echo "$as_me:$LINENO: checking for $ac_word" >&5 17126{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15859echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 17127echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15860if test "${ac_cv_path_PROG_NETSTAT+set}" = set; then 17128if test "${ac_cv_path_PROG_NETSTAT+set}" = set; then
15861 echo $ECHO_N "(cached) $ECHO_C" >&6 17129 echo $ECHO_N "(cached) $ECHO_C" >&6
15862else 17130else
@@ -15871,27 +17139,28 @@ do
15871 IFS=$as_save_IFS 17139 IFS=$as_save_IFS
15872 test -z "$as_dir" && as_dir=. 17140 test -z "$as_dir" && as_dir=.
15873 for ac_exec_ext in '' $ac_executable_extensions; do 17141 for ac_exec_ext in '' $ac_executable_extensions; do
15874 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 17142 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15875 ac_cv_path_PROG_NETSTAT="$as_dir/$ac_word$ac_exec_ext" 17143 ac_cv_path_PROG_NETSTAT="$as_dir/$ac_word$ac_exec_ext"
15876 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 17144 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15877 break 2 17145 break 2
15878 fi 17146 fi
15879done 17147done
15880done 17148done
17149IFS=$as_save_IFS
15881 17150
15882 ;; 17151 ;;
15883esac 17152esac
15884fi 17153fi
15885PROG_NETSTAT=$ac_cv_path_PROG_NETSTAT 17154PROG_NETSTAT=$ac_cv_path_PROG_NETSTAT
15886
15887if test -n "$PROG_NETSTAT"; then 17155if test -n "$PROG_NETSTAT"; then
15888 echo "$as_me:$LINENO: result: $PROG_NETSTAT" >&5 17156 { echo "$as_me:$LINENO: result: $PROG_NETSTAT" >&5
15889echo "${ECHO_T}$PROG_NETSTAT" >&6 17157echo "${ECHO_T}$PROG_NETSTAT" >&6; }
15890else 17158else
15891 echo "$as_me:$LINENO: result: no" >&5 17159 { echo "$as_me:$LINENO: result: no" >&5
15892echo "${ECHO_T}no" >&6 17160echo "${ECHO_T}no" >&6; }
15893fi 17161fi
15894 17162
17163
15895 if test -z "$PROG_NETSTAT" ; then 17164 if test -z "$PROG_NETSTAT" ; then
15896 PROG_NETSTAT="undef" 17165 PROG_NETSTAT="undef"
15897 fi 17166 fi
@@ -15900,8 +17169,8 @@ fi
15900 17169
15901 # Extract the first word of "arp", so it can be a program name with args. 17170 # Extract the first word of "arp", so it can be a program name with args.
15902set dummy arp; ac_word=$2 17171set dummy arp; ac_word=$2
15903echo "$as_me:$LINENO: checking for $ac_word" >&5 17172{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15904echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 17173echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15905if test "${ac_cv_path_PROG_ARP+set}" = set; then 17174if test "${ac_cv_path_PROG_ARP+set}" = set; then
15906 echo $ECHO_N "(cached) $ECHO_C" >&6 17175 echo $ECHO_N "(cached) $ECHO_C" >&6
15907else 17176else
@@ -15916,27 +17185,28 @@ do
15916 IFS=$as_save_IFS 17185 IFS=$as_save_IFS
15917 test -z "$as_dir" && as_dir=. 17186 test -z "$as_dir" && as_dir=.
15918 for ac_exec_ext in '' $ac_executable_extensions; do 17187 for ac_exec_ext in '' $ac_executable_extensions; do
15919 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 17188 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15920 ac_cv_path_PROG_ARP="$as_dir/$ac_word$ac_exec_ext" 17189 ac_cv_path_PROG_ARP="$as_dir/$ac_word$ac_exec_ext"
15921 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 17190 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15922 break 2 17191 break 2
15923 fi 17192 fi
15924done 17193done
15925done 17194done
17195IFS=$as_save_IFS
15926 17196
15927 ;; 17197 ;;
15928esac 17198esac
15929fi 17199fi
15930PROG_ARP=$ac_cv_path_PROG_ARP 17200PROG_ARP=$ac_cv_path_PROG_ARP
15931
15932if test -n "$PROG_ARP"; then 17201if test -n "$PROG_ARP"; then
15933 echo "$as_me:$LINENO: result: $PROG_ARP" >&5 17202 { echo "$as_me:$LINENO: result: $PROG_ARP" >&5
15934echo "${ECHO_T}$PROG_ARP" >&6 17203echo "${ECHO_T}$PROG_ARP" >&6; }
15935else 17204else
15936 echo "$as_me:$LINENO: result: no" >&5 17205 { echo "$as_me:$LINENO: result: no" >&5
15937echo "${ECHO_T}no" >&6 17206echo "${ECHO_T}no" >&6; }
15938fi 17207fi
15939 17208
17209
15940 if test -z "$PROG_ARP" ; then 17210 if test -z "$PROG_ARP" ; then
15941 PROG_ARP="undef" 17211 PROG_ARP="undef"
15942 fi 17212 fi
@@ -15945,8 +17215,8 @@ fi
15945 17215
15946 # Extract the first word of "ifconfig", so it can be a program name with args. 17216 # Extract the first word of "ifconfig", so it can be a program name with args.
15947set dummy ifconfig; ac_word=$2 17217set dummy ifconfig; ac_word=$2
15948echo "$as_me:$LINENO: checking for $ac_word" >&5 17218{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15949echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 17219echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15950if test "${ac_cv_path_PROG_IFCONFIG+set}" = set; then 17220if test "${ac_cv_path_PROG_IFCONFIG+set}" = set; then
15951 echo $ECHO_N "(cached) $ECHO_C" >&6 17221 echo $ECHO_N "(cached) $ECHO_C" >&6
15952else 17222else
@@ -15961,27 +17231,28 @@ do
15961 IFS=$as_save_IFS 17231 IFS=$as_save_IFS
15962 test -z "$as_dir" && as_dir=. 17232 test -z "$as_dir" && as_dir=.
15963 for ac_exec_ext in '' $ac_executable_extensions; do 17233 for ac_exec_ext in '' $ac_executable_extensions; do
15964 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 17234 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15965 ac_cv_path_PROG_IFCONFIG="$as_dir/$ac_word$ac_exec_ext" 17235 ac_cv_path_PROG_IFCONFIG="$as_dir/$ac_word$ac_exec_ext"
15966 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 17236 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15967 break 2 17237 break 2
15968 fi 17238 fi
15969done 17239done
15970done 17240done
17241IFS=$as_save_IFS
15971 17242
15972 ;; 17243 ;;
15973esac 17244esac
15974fi 17245fi
15975PROG_IFCONFIG=$ac_cv_path_PROG_IFCONFIG 17246PROG_IFCONFIG=$ac_cv_path_PROG_IFCONFIG
15976
15977if test -n "$PROG_IFCONFIG"; then 17247if test -n "$PROG_IFCONFIG"; then
15978 echo "$as_me:$LINENO: result: $PROG_IFCONFIG" >&5 17248 { echo "$as_me:$LINENO: result: $PROG_IFCONFIG" >&5
15979echo "${ECHO_T}$PROG_IFCONFIG" >&6 17249echo "${ECHO_T}$PROG_IFCONFIG" >&6; }
15980else 17250else
15981 echo "$as_me:$LINENO: result: no" >&5 17251 { echo "$as_me:$LINENO: result: no" >&5
15982echo "${ECHO_T}no" >&6 17252echo "${ECHO_T}no" >&6; }
15983fi 17253fi
15984 17254
17255
15985 if test -z "$PROG_IFCONFIG" ; then 17256 if test -z "$PROG_IFCONFIG" ; then
15986 PROG_IFCONFIG="undef" 17257 PROG_IFCONFIG="undef"
15987 fi 17258 fi
@@ -15990,8 +17261,8 @@ fi
15990 17261
15991 # Extract the first word of "jstat", so it can be a program name with args. 17262 # Extract the first word of "jstat", so it can be a program name with args.
15992set dummy jstat; ac_word=$2 17263set dummy jstat; ac_word=$2
15993echo "$as_me:$LINENO: checking for $ac_word" >&5 17264{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15994echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 17265echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15995if test "${ac_cv_path_PROG_JSTAT+set}" = set; then 17266if test "${ac_cv_path_PROG_JSTAT+set}" = set; then
15996 echo $ECHO_N "(cached) $ECHO_C" >&6 17267 echo $ECHO_N "(cached) $ECHO_C" >&6
15997else 17268else
@@ -16006,27 +17277,28 @@ do
16006 IFS=$as_save_IFS 17277 IFS=$as_save_IFS
16007 test -z "$as_dir" && as_dir=. 17278 test -z "$as_dir" && as_dir=.
16008 for ac_exec_ext in '' $ac_executable_extensions; do 17279 for ac_exec_ext in '' $ac_executable_extensions; do
16009 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 17280 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16010 ac_cv_path_PROG_JSTAT="$as_dir/$ac_word$ac_exec_ext" 17281 ac_cv_path_PROG_JSTAT="$as_dir/$ac_word$ac_exec_ext"
16011 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 17282 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16012 break 2 17283 break 2
16013 fi 17284 fi
16014done 17285done
16015done 17286done
17287IFS=$as_save_IFS
16016 17288
16017 ;; 17289 ;;
16018esac 17290esac
16019fi 17291fi
16020PROG_JSTAT=$ac_cv_path_PROG_JSTAT 17292PROG_JSTAT=$ac_cv_path_PROG_JSTAT
16021
16022if test -n "$PROG_JSTAT"; then 17293if test -n "$PROG_JSTAT"; then
16023 echo "$as_me:$LINENO: result: $PROG_JSTAT" >&5 17294 { echo "$as_me:$LINENO: result: $PROG_JSTAT" >&5
16024echo "${ECHO_T}$PROG_JSTAT" >&6 17295echo "${ECHO_T}$PROG_JSTAT" >&6; }
16025else 17296else
16026 echo "$as_me:$LINENO: result: no" >&5 17297 { echo "$as_me:$LINENO: result: no" >&5
16027echo "${ECHO_T}no" >&6 17298echo "${ECHO_T}no" >&6; }
16028fi 17299fi
16029 17300
17301
16030 if test -z "$PROG_JSTAT" ; then 17302 if test -z "$PROG_JSTAT" ; then
16031 PROG_JSTAT="undef" 17303 PROG_JSTAT="undef"
16032 fi 17304 fi
@@ -16035,8 +17307,8 @@ fi
16035 17307
16036 # Extract the first word of "ps", so it can be a program name with args. 17308 # Extract the first word of "ps", so it can be a program name with args.
16037set dummy ps; ac_word=$2 17309set dummy ps; ac_word=$2
16038echo "$as_me:$LINENO: checking for $ac_word" >&5 17310{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16039echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 17311echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
16040if test "${ac_cv_path_PROG_PS+set}" = set; then 17312if test "${ac_cv_path_PROG_PS+set}" = set; then
16041 echo $ECHO_N "(cached) $ECHO_C" >&6 17313 echo $ECHO_N "(cached) $ECHO_C" >&6
16042else 17314else
@@ -16051,27 +17323,28 @@ do
16051 IFS=$as_save_IFS 17323 IFS=$as_save_IFS
16052 test -z "$as_dir" && as_dir=. 17324 test -z "$as_dir" && as_dir=.
16053 for ac_exec_ext in '' $ac_executable_extensions; do 17325 for ac_exec_ext in '' $ac_executable_extensions; do
16054 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 17326 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16055 ac_cv_path_PROG_PS="$as_dir/$ac_word$ac_exec_ext" 17327 ac_cv_path_PROG_PS="$as_dir/$ac_word$ac_exec_ext"
16056 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 17328 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16057 break 2 17329 break 2
16058 fi 17330 fi
16059done 17331done
16060done 17332done
17333IFS=$as_save_IFS
16061 17334
16062 ;; 17335 ;;
16063esac 17336esac
16064fi 17337fi
16065PROG_PS=$ac_cv_path_PROG_PS 17338PROG_PS=$ac_cv_path_PROG_PS
16066
16067if test -n "$PROG_PS"; then 17339if test -n "$PROG_PS"; then
16068 echo "$as_me:$LINENO: result: $PROG_PS" >&5 17340 { echo "$as_me:$LINENO: result: $PROG_PS" >&5
16069echo "${ECHO_T}$PROG_PS" >&6 17341echo "${ECHO_T}$PROG_PS" >&6; }
16070else 17342else
16071 echo "$as_me:$LINENO: result: no" >&5 17343 { echo "$as_me:$LINENO: result: no" >&5
16072echo "${ECHO_T}no" >&6 17344echo "${ECHO_T}no" >&6; }
16073fi 17345fi
16074 17346
17347
16075 if test -z "$PROG_PS" ; then 17348 if test -z "$PROG_PS" ; then
16076 PROG_PS="undef" 17349 PROG_PS="undef"
16077 fi 17350 fi
@@ -16080,8 +17353,8 @@ fi
16080 17353
16081 # Extract the first word of "sar", so it can be a program name with args. 17354 # Extract the first word of "sar", so it can be a program name with args.
16082set dummy sar; ac_word=$2 17355set dummy sar; ac_word=$2
16083echo "$as_me:$LINENO: checking for $ac_word" >&5 17356{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16084echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 17357echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
16085if test "${ac_cv_path_PROG_SAR+set}" = set; then 17358if test "${ac_cv_path_PROG_SAR+set}" = set; then
16086 echo $ECHO_N "(cached) $ECHO_C" >&6 17359 echo $ECHO_N "(cached) $ECHO_C" >&6
16087else 17360else
@@ -16096,27 +17369,28 @@ do
16096 IFS=$as_save_IFS 17369 IFS=$as_save_IFS
16097 test -z "$as_dir" && as_dir=. 17370 test -z "$as_dir" && as_dir=.
16098 for ac_exec_ext in '' $ac_executable_extensions; do 17371 for ac_exec_ext in '' $ac_executable_extensions; do
16099 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 17372 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16100 ac_cv_path_PROG_SAR="$as_dir/$ac_word$ac_exec_ext" 17373 ac_cv_path_PROG_SAR="$as_dir/$ac_word$ac_exec_ext"
16101 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 17374 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16102 break 2 17375 break 2
16103 fi 17376 fi
16104done 17377done
16105done 17378done
17379IFS=$as_save_IFS
16106 17380
16107 ;; 17381 ;;
16108esac 17382esac
16109fi 17383fi
16110PROG_SAR=$ac_cv_path_PROG_SAR 17384PROG_SAR=$ac_cv_path_PROG_SAR
16111
16112if test -n "$PROG_SAR"; then 17385if test -n "$PROG_SAR"; then
16113 echo "$as_me:$LINENO: result: $PROG_SAR" >&5 17386 { echo "$as_me:$LINENO: result: $PROG_SAR" >&5
16114echo "${ECHO_T}$PROG_SAR" >&6 17387echo "${ECHO_T}$PROG_SAR" >&6; }
16115else 17388else
16116 echo "$as_me:$LINENO: result: no" >&5 17389 { echo "$as_me:$LINENO: result: no" >&5
16117echo "${ECHO_T}no" >&6 17390echo "${ECHO_T}no" >&6; }
16118fi 17391fi
16119 17392
17393
16120 if test -z "$PROG_SAR" ; then 17394 if test -z "$PROG_SAR" ; then
16121 PROG_SAR="undef" 17395 PROG_SAR="undef"
16122 fi 17396 fi
@@ -16125,8 +17399,8 @@ fi
16125 17399
16126 # Extract the first word of "w", so it can be a program name with args. 17400 # Extract the first word of "w", so it can be a program name with args.
16127set dummy w; ac_word=$2 17401set dummy w; ac_word=$2
16128echo "$as_me:$LINENO: checking for $ac_word" >&5 17402{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16129echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 17403echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
16130if test "${ac_cv_path_PROG_W+set}" = set; then 17404if test "${ac_cv_path_PROG_W+set}" = set; then
16131 echo $ECHO_N "(cached) $ECHO_C" >&6 17405 echo $ECHO_N "(cached) $ECHO_C" >&6
16132else 17406else
@@ -16141,27 +17415,28 @@ do
16141 IFS=$as_save_IFS 17415 IFS=$as_save_IFS
16142 test -z "$as_dir" && as_dir=. 17416 test -z "$as_dir" && as_dir=.
16143 for ac_exec_ext in '' $ac_executable_extensions; do 17417 for ac_exec_ext in '' $ac_executable_extensions; do
16144 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 17418 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16145 ac_cv_path_PROG_W="$as_dir/$ac_word$ac_exec_ext" 17419 ac_cv_path_PROG_W="$as_dir/$ac_word$ac_exec_ext"
16146 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 17420 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16147 break 2 17421 break 2
16148 fi 17422 fi
16149done 17423done
16150done 17424done
17425IFS=$as_save_IFS
16151 17426
16152 ;; 17427 ;;
16153esac 17428esac
16154fi 17429fi
16155PROG_W=$ac_cv_path_PROG_W 17430PROG_W=$ac_cv_path_PROG_W
16156
16157if test -n "$PROG_W"; then 17431if test -n "$PROG_W"; then
16158 echo "$as_me:$LINENO: result: $PROG_W" >&5 17432 { echo "$as_me:$LINENO: result: $PROG_W" >&5
16159echo "${ECHO_T}$PROG_W" >&6 17433echo "${ECHO_T}$PROG_W" >&6; }
16160else 17434else
16161 echo "$as_me:$LINENO: result: no" >&5 17435 { echo "$as_me:$LINENO: result: no" >&5
16162echo "${ECHO_T}no" >&6 17436echo "${ECHO_T}no" >&6; }
16163fi 17437fi
16164 17438
17439
16165 if test -z "$PROG_W" ; then 17440 if test -z "$PROG_W" ; then
16166 PROG_W="undef" 17441 PROG_W="undef"
16167 fi 17442 fi
@@ -16170,8 +17445,8 @@ fi
16170 17445
16171 # Extract the first word of "who", so it can be a program name with args. 17446 # Extract the first word of "who", so it can be a program name with args.
16172set dummy who; ac_word=$2 17447set dummy who; ac_word=$2
16173echo "$as_me:$LINENO: checking for $ac_word" >&5 17448{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16174echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 17449echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
16175if test "${ac_cv_path_PROG_WHO+set}" = set; then 17450if test "${ac_cv_path_PROG_WHO+set}" = set; then
16176 echo $ECHO_N "(cached) $ECHO_C" >&6 17451 echo $ECHO_N "(cached) $ECHO_C" >&6
16177else 17452else
@@ -16186,27 +17461,28 @@ do
16186 IFS=$as_save_IFS 17461 IFS=$as_save_IFS
16187 test -z "$as_dir" && as_dir=. 17462 test -z "$as_dir" && as_dir=.
16188 for ac_exec_ext in '' $ac_executable_extensions; do 17463 for ac_exec_ext in '' $ac_executable_extensions; do
16189 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 17464 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16190 ac_cv_path_PROG_WHO="$as_dir/$ac_word$ac_exec_ext" 17465 ac_cv_path_PROG_WHO="$as_dir/$ac_word$ac_exec_ext"
16191 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 17466 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16192 break 2 17467 break 2
16193 fi 17468 fi
16194done 17469done
16195done 17470done
17471IFS=$as_save_IFS
16196 17472
16197 ;; 17473 ;;
16198esac 17474esac
16199fi 17475fi
16200PROG_WHO=$ac_cv_path_PROG_WHO 17476PROG_WHO=$ac_cv_path_PROG_WHO
16201
16202if test -n "$PROG_WHO"; then 17477if test -n "$PROG_WHO"; then
16203 echo "$as_me:$LINENO: result: $PROG_WHO" >&5 17478 { echo "$as_me:$LINENO: result: $PROG_WHO" >&5
16204echo "${ECHO_T}$PROG_WHO" >&6 17479echo "${ECHO_T}$PROG_WHO" >&6; }
16205else 17480else
16206 echo "$as_me:$LINENO: result: no" >&5 17481 { echo "$as_me:$LINENO: result: no" >&5
16207echo "${ECHO_T}no" >&6 17482echo "${ECHO_T}no" >&6; }
16208fi 17483fi
16209 17484
17485
16210 if test -z "$PROG_WHO" ; then 17486 if test -z "$PROG_WHO" ; then
16211 PROG_WHO="undef" 17487 PROG_WHO="undef"
16212 fi 17488 fi
@@ -16215,8 +17491,8 @@ fi
16215 17491
16216 # Extract the first word of "last", so it can be a program name with args. 17492 # Extract the first word of "last", so it can be a program name with args.
16217set dummy last; ac_word=$2 17493set dummy last; ac_word=$2
16218echo "$as_me:$LINENO: checking for $ac_word" >&5 17494{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16219echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 17495echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
16220if test "${ac_cv_path_PROG_LAST+set}" = set; then 17496if test "${ac_cv_path_PROG_LAST+set}" = set; then
16221 echo $ECHO_N "(cached) $ECHO_C" >&6 17497 echo $ECHO_N "(cached) $ECHO_C" >&6
16222else 17498else
@@ -16231,27 +17507,28 @@ do
16231 IFS=$as_save_IFS 17507 IFS=$as_save_IFS
16232 test -z "$as_dir" && as_dir=. 17508 test -z "$as_dir" && as_dir=.
16233 for ac_exec_ext in '' $ac_executable_extensions; do 17509 for ac_exec_ext in '' $ac_executable_extensions; do
16234 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 17510 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16235 ac_cv_path_PROG_LAST="$as_dir/$ac_word$ac_exec_ext" 17511 ac_cv_path_PROG_LAST="$as_dir/$ac_word$ac_exec_ext"
16236 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 17512 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16237 break 2 17513 break 2
16238 fi 17514 fi
16239done 17515done
16240done 17516done
17517IFS=$as_save_IFS
16241 17518
16242 ;; 17519 ;;
16243esac 17520esac
16244fi 17521fi
16245PROG_LAST=$ac_cv_path_PROG_LAST 17522PROG_LAST=$ac_cv_path_PROG_LAST
16246
16247if test -n "$PROG_LAST"; then 17523if test -n "$PROG_LAST"; then
16248 echo "$as_me:$LINENO: result: $PROG_LAST" >&5 17524 { echo "$as_me:$LINENO: result: $PROG_LAST" >&5
16249echo "${ECHO_T}$PROG_LAST" >&6 17525echo "${ECHO_T}$PROG_LAST" >&6; }
16250else 17526else
16251 echo "$as_me:$LINENO: result: no" >&5 17527 { echo "$as_me:$LINENO: result: no" >&5
16252echo "${ECHO_T}no" >&6 17528echo "${ECHO_T}no" >&6; }
16253fi 17529fi
16254 17530
17531
16255 if test -z "$PROG_LAST" ; then 17532 if test -z "$PROG_LAST" ; then
16256 PROG_LAST="undef" 17533 PROG_LAST="undef"
16257 fi 17534 fi
@@ -16260,8 +17537,8 @@ fi
16260 17537
16261 # Extract the first word of "lastlog", so it can be a program name with args. 17538 # Extract the first word of "lastlog", so it can be a program name with args.
16262set dummy lastlog; ac_word=$2 17539set dummy lastlog; ac_word=$2
16263echo "$as_me:$LINENO: checking for $ac_word" >&5 17540{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16264echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 17541echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
16265if test "${ac_cv_path_PROG_LASTLOG+set}" = set; then 17542if test "${ac_cv_path_PROG_LASTLOG+set}" = set; then
16266 echo $ECHO_N "(cached) $ECHO_C" >&6 17543 echo $ECHO_N "(cached) $ECHO_C" >&6
16267else 17544else
@@ -16276,27 +17553,28 @@ do
16276 IFS=$as_save_IFS 17553 IFS=$as_save_IFS
16277 test -z "$as_dir" && as_dir=. 17554 test -z "$as_dir" && as_dir=.
16278 for ac_exec_ext in '' $ac_executable_extensions; do 17555 for ac_exec_ext in '' $ac_executable_extensions; do
16279 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 17556 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16280 ac_cv_path_PROG_LASTLOG="$as_dir/$ac_word$ac_exec_ext" 17557 ac_cv_path_PROG_LASTLOG="$as_dir/$ac_word$ac_exec_ext"
16281 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 17558 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16282 break 2 17559 break 2
16283 fi 17560 fi
16284done 17561done
16285done 17562done
17563IFS=$as_save_IFS
16286 17564
16287 ;; 17565 ;;
16288esac 17566esac
16289fi 17567fi
16290PROG_LASTLOG=$ac_cv_path_PROG_LASTLOG 17568PROG_LASTLOG=$ac_cv_path_PROG_LASTLOG
16291
16292if test -n "$PROG_LASTLOG"; then 17569if test -n "$PROG_LASTLOG"; then
16293 echo "$as_me:$LINENO: result: $PROG_LASTLOG" >&5 17570 { echo "$as_me:$LINENO: result: $PROG_LASTLOG" >&5
16294echo "${ECHO_T}$PROG_LASTLOG" >&6 17571echo "${ECHO_T}$PROG_LASTLOG" >&6; }
16295else 17572else
16296 echo "$as_me:$LINENO: result: no" >&5 17573 { echo "$as_me:$LINENO: result: no" >&5
16297echo "${ECHO_T}no" >&6 17574echo "${ECHO_T}no" >&6; }
16298fi 17575fi
16299 17576
17577
16300 if test -z "$PROG_LASTLOG" ; then 17578 if test -z "$PROG_LASTLOG" ; then
16301 PROG_LASTLOG="undef" 17579 PROG_LASTLOG="undef"
16302 fi 17580 fi
@@ -16305,8 +17583,8 @@ fi
16305 17583
16306 # Extract the first word of "df", so it can be a program name with args. 17584 # Extract the first word of "df", so it can be a program name with args.
16307set dummy df; ac_word=$2 17585set dummy df; ac_word=$2
16308echo "$as_me:$LINENO: checking for $ac_word" >&5 17586{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16309echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 17587echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
16310if test "${ac_cv_path_PROG_DF+set}" = set; then 17588if test "${ac_cv_path_PROG_DF+set}" = set; then
16311 echo $ECHO_N "(cached) $ECHO_C" >&6 17589 echo $ECHO_N "(cached) $ECHO_C" >&6
16312else 17590else
@@ -16321,27 +17599,28 @@ do
16321 IFS=$as_save_IFS 17599 IFS=$as_save_IFS
16322 test -z "$as_dir" && as_dir=. 17600 test -z "$as_dir" && as_dir=.
16323 for ac_exec_ext in '' $ac_executable_extensions; do 17601 for ac_exec_ext in '' $ac_executable_extensions; do
16324 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 17602 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16325 ac_cv_path_PROG_DF="$as_dir/$ac_word$ac_exec_ext" 17603 ac_cv_path_PROG_DF="$as_dir/$ac_word$ac_exec_ext"
16326 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 17604 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16327 break 2 17605 break 2
16328 fi 17606 fi
16329done 17607done
16330done 17608done
17609IFS=$as_save_IFS
16331 17610
16332 ;; 17611 ;;
16333esac 17612esac
16334fi 17613fi
16335PROG_DF=$ac_cv_path_PROG_DF 17614PROG_DF=$ac_cv_path_PROG_DF
16336
16337if test -n "$PROG_DF"; then 17615if test -n "$PROG_DF"; then
16338 echo "$as_me:$LINENO: result: $PROG_DF" >&5 17616 { echo "$as_me:$LINENO: result: $PROG_DF" >&5
16339echo "${ECHO_T}$PROG_DF" >&6 17617echo "${ECHO_T}$PROG_DF" >&6; }
16340else 17618else
16341 echo "$as_me:$LINENO: result: no" >&5 17619 { echo "$as_me:$LINENO: result: no" >&5
16342echo "${ECHO_T}no" >&6 17620echo "${ECHO_T}no" >&6; }
16343fi 17621fi
16344 17622
17623
16345 if test -z "$PROG_DF" ; then 17624 if test -z "$PROG_DF" ; then
16346 PROG_DF="undef" 17625 PROG_DF="undef"
16347 fi 17626 fi
@@ -16350,8 +17629,8 @@ fi
16350 17629
16351 # Extract the first word of "vmstat", so it can be a program name with args. 17630 # Extract the first word of "vmstat", so it can be a program name with args.
16352set dummy vmstat; ac_word=$2 17631set dummy vmstat; ac_word=$2
16353echo "$as_me:$LINENO: checking for $ac_word" >&5 17632{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16354echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 17633echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
16355if test "${ac_cv_path_PROG_VMSTAT+set}" = set; then 17634if test "${ac_cv_path_PROG_VMSTAT+set}" = set; then
16356 echo $ECHO_N "(cached) $ECHO_C" >&6 17635 echo $ECHO_N "(cached) $ECHO_C" >&6
16357else 17636else
@@ -16366,27 +17645,28 @@ do
16366 IFS=$as_save_IFS 17645 IFS=$as_save_IFS
16367 test -z "$as_dir" && as_dir=. 17646 test -z "$as_dir" && as_dir=.
16368 for ac_exec_ext in '' $ac_executable_extensions; do 17647 for ac_exec_ext in '' $ac_executable_extensions; do
16369 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 17648 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16370 ac_cv_path_PROG_VMSTAT="$as_dir/$ac_word$ac_exec_ext" 17649 ac_cv_path_PROG_VMSTAT="$as_dir/$ac_word$ac_exec_ext"
16371 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 17650 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16372 break 2 17651 break 2
16373 fi 17652 fi
16374done 17653done
16375done 17654done
17655IFS=$as_save_IFS
16376 17656
16377 ;; 17657 ;;
16378esac 17658esac
16379fi 17659fi
16380PROG_VMSTAT=$ac_cv_path_PROG_VMSTAT 17660PROG_VMSTAT=$ac_cv_path_PROG_VMSTAT
16381
16382if test -n "$PROG_VMSTAT"; then 17661if test -n "$PROG_VMSTAT"; then
16383 echo "$as_me:$LINENO: result: $PROG_VMSTAT" >&5 17662 { echo "$as_me:$LINENO: result: $PROG_VMSTAT" >&5
16384echo "${ECHO_T}$PROG_VMSTAT" >&6 17663echo "${ECHO_T}$PROG_VMSTAT" >&6; }
16385else 17664else
16386 echo "$as_me:$LINENO: result: no" >&5 17665 { echo "$as_me:$LINENO: result: no" >&5
16387echo "${ECHO_T}no" >&6 17666echo "${ECHO_T}no" >&6; }
16388fi 17667fi
16389 17668
17669
16390 if test -z "$PROG_VMSTAT" ; then 17670 if test -z "$PROG_VMSTAT" ; then
16391 PROG_VMSTAT="undef" 17671 PROG_VMSTAT="undef"
16392 fi 17672 fi
@@ -16395,8 +17675,8 @@ fi
16395 17675
16396 # Extract the first word of "uptime", so it can be a program name with args. 17676 # Extract the first word of "uptime", so it can be a program name with args.
16397set dummy uptime; ac_word=$2 17677set dummy uptime; ac_word=$2
16398echo "$as_me:$LINENO: checking for $ac_word" >&5 17678{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16399echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 17679echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
16400if test "${ac_cv_path_PROG_UPTIME+set}" = set; then 17680if test "${ac_cv_path_PROG_UPTIME+set}" = set; then
16401 echo $ECHO_N "(cached) $ECHO_C" >&6 17681 echo $ECHO_N "(cached) $ECHO_C" >&6
16402else 17682else
@@ -16411,27 +17691,28 @@ do
16411 IFS=$as_save_IFS 17691 IFS=$as_save_IFS
16412 test -z "$as_dir" && as_dir=. 17692 test -z "$as_dir" && as_dir=.
16413 for ac_exec_ext in '' $ac_executable_extensions; do 17693 for ac_exec_ext in '' $ac_executable_extensions; do
16414 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 17694 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16415 ac_cv_path_PROG_UPTIME="$as_dir/$ac_word$ac_exec_ext" 17695 ac_cv_path_PROG_UPTIME="$as_dir/$ac_word$ac_exec_ext"
16416 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 17696 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16417 break 2 17697 break 2
16418 fi 17698 fi
16419done 17699done
16420done 17700done
17701IFS=$as_save_IFS
16421 17702
16422 ;; 17703 ;;
16423esac 17704esac
16424fi 17705fi
16425PROG_UPTIME=$ac_cv_path_PROG_UPTIME 17706PROG_UPTIME=$ac_cv_path_PROG_UPTIME
16426
16427if test -n "$PROG_UPTIME"; then 17707if test -n "$PROG_UPTIME"; then
16428 echo "$as_me:$LINENO: result: $PROG_UPTIME" >&5 17708 { echo "$as_me:$LINENO: result: $PROG_UPTIME" >&5
16429echo "${ECHO_T}$PROG_UPTIME" >&6 17709echo "${ECHO_T}$PROG_UPTIME" >&6; }
16430else 17710else
16431 echo "$as_me:$LINENO: result: no" >&5 17711 { echo "$as_me:$LINENO: result: no" >&5
16432echo "${ECHO_T}no" >&6 17712echo "${ECHO_T}no" >&6; }
16433fi 17713fi
16434 17714
17715
16435 if test -z "$PROG_UPTIME" ; then 17716 if test -z "$PROG_UPTIME" ; then
16436 PROG_UPTIME="undef" 17717 PROG_UPTIME="undef"
16437 fi 17718 fi
@@ -16440,8 +17721,8 @@ fi
16440 17721
16441 # Extract the first word of "ipcs", so it can be a program name with args. 17722 # Extract the first word of "ipcs", so it can be a program name with args.
16442set dummy ipcs; ac_word=$2 17723set dummy ipcs; ac_word=$2
16443echo "$as_me:$LINENO: checking for $ac_word" >&5 17724{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16444echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 17725echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
16445if test "${ac_cv_path_PROG_IPCS+set}" = set; then 17726if test "${ac_cv_path_PROG_IPCS+set}" = set; then
16446 echo $ECHO_N "(cached) $ECHO_C" >&6 17727 echo $ECHO_N "(cached) $ECHO_C" >&6
16447else 17728else
@@ -16456,27 +17737,28 @@ do
16456 IFS=$as_save_IFS 17737 IFS=$as_save_IFS
16457 test -z "$as_dir" && as_dir=. 17738 test -z "$as_dir" && as_dir=.
16458 for ac_exec_ext in '' $ac_executable_extensions; do 17739 for ac_exec_ext in '' $ac_executable_extensions; do
16459 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 17740 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16460 ac_cv_path_PROG_IPCS="$as_dir/$ac_word$ac_exec_ext" 17741 ac_cv_path_PROG_IPCS="$as_dir/$ac_word$ac_exec_ext"
16461 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 17742 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16462 break 2 17743 break 2
16463 fi 17744 fi
16464done 17745done
16465done 17746done
17747IFS=$as_save_IFS
16466 17748
16467 ;; 17749 ;;
16468esac 17750esac
16469fi 17751fi
16470PROG_IPCS=$ac_cv_path_PROG_IPCS 17752PROG_IPCS=$ac_cv_path_PROG_IPCS
16471
16472if test -n "$PROG_IPCS"; then 17753if test -n "$PROG_IPCS"; then
16473 echo "$as_me:$LINENO: result: $PROG_IPCS" >&5 17754 { echo "$as_me:$LINENO: result: $PROG_IPCS" >&5
16474echo "${ECHO_T}$PROG_IPCS" >&6 17755echo "${ECHO_T}$PROG_IPCS" >&6; }
16475else 17756else
16476 echo "$as_me:$LINENO: result: no" >&5 17757 { echo "$as_me:$LINENO: result: no" >&5
16477echo "${ECHO_T}no" >&6 17758echo "${ECHO_T}no" >&6; }
16478fi 17759fi
16479 17760
17761
16480 if test -z "$PROG_IPCS" ; then 17762 if test -z "$PROG_IPCS" ; then
16481 PROG_IPCS="undef" 17763 PROG_IPCS="undef"
16482 fi 17764 fi
@@ -16485,8 +17767,8 @@ fi
16485 17767
16486 # Extract the first word of "tail", so it can be a program name with args. 17768 # Extract the first word of "tail", so it can be a program name with args.
16487set dummy tail; ac_word=$2 17769set dummy tail; ac_word=$2
16488echo "$as_me:$LINENO: checking for $ac_word" >&5 17770{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16489echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 17771echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
16490if test "${ac_cv_path_PROG_TAIL+set}" = set; then 17772if test "${ac_cv_path_PROG_TAIL+set}" = set; then
16491 echo $ECHO_N "(cached) $ECHO_C" >&6 17773 echo $ECHO_N "(cached) $ECHO_C" >&6
16492else 17774else
@@ -16501,27 +17783,28 @@ do
16501 IFS=$as_save_IFS 17783 IFS=$as_save_IFS
16502 test -z "$as_dir" && as_dir=. 17784 test -z "$as_dir" && as_dir=.
16503 for ac_exec_ext in '' $ac_executable_extensions; do 17785 for ac_exec_ext in '' $ac_executable_extensions; do
16504 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 17786 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16505 ac_cv_path_PROG_TAIL="$as_dir/$ac_word$ac_exec_ext" 17787 ac_cv_path_PROG_TAIL="$as_dir/$ac_word$ac_exec_ext"
16506 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 17788 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16507 break 2 17789 break 2
16508 fi 17790 fi
16509done 17791done
16510done 17792done
17793IFS=$as_save_IFS
16511 17794
16512 ;; 17795 ;;
16513esac 17796esac
16514fi 17797fi
16515PROG_TAIL=$ac_cv_path_PROG_TAIL 17798PROG_TAIL=$ac_cv_path_PROG_TAIL
16516
16517if test -n "$PROG_TAIL"; then 17799if test -n "$PROG_TAIL"; then
16518 echo "$as_me:$LINENO: result: $PROG_TAIL" >&5 17800 { echo "$as_me:$LINENO: result: $PROG_TAIL" >&5
16519echo "${ECHO_T}$PROG_TAIL" >&6 17801echo "${ECHO_T}$PROG_TAIL" >&6; }
16520else 17802else
16521 echo "$as_me:$LINENO: result: no" >&5 17803 { echo "$as_me:$LINENO: result: no" >&5
16522echo "${ECHO_T}no" >&6 17804echo "${ECHO_T}no" >&6; }
16523fi 17805fi
16524 17806
17807
16525 if test -z "$PROG_TAIL" ; then 17808 if test -z "$PROG_TAIL" ; then
16526 PROG_TAIL="undef" 17809 PROG_TAIL="undef"
16527 fi 17810 fi
@@ -16552,8 +17835,8 @@ if test ! -z "$SONY" ; then
16552fi 17835fi
16553 17836
16554# Check for long long datatypes 17837# Check for long long datatypes
16555echo "$as_me:$LINENO: checking for long long" >&5 17838{ echo "$as_me:$LINENO: checking for long long" >&5
16556echo $ECHO_N "checking for long long... $ECHO_C" >&6 17839echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
16557if test "${ac_cv_type_long_long+set}" = set; then 17840if test "${ac_cv_type_long_long+set}" = set; then
16558 echo $ECHO_N "(cached) $ECHO_C" >&6 17841 echo $ECHO_N "(cached) $ECHO_C" >&6
16559else 17842else
@@ -16564,50 +17847,47 @@ cat confdefs.h >>conftest.$ac_ext
16564cat >>conftest.$ac_ext <<_ACEOF 17847cat >>conftest.$ac_ext <<_ACEOF
16565/* end confdefs.h. */ 17848/* end confdefs.h. */
16566$ac_includes_default 17849$ac_includes_default
17850typedef long long ac__type_new_;
16567int 17851int
16568main () 17852main ()
16569{ 17853{
16570if ((long long *) 0) 17854if ((ac__type_new_ *) 0)
16571 return 0; 17855 return 0;
16572if (sizeof (long long)) 17856if (sizeof (ac__type_new_))
16573 return 0; 17857 return 0;
16574 ; 17858 ;
16575 return 0; 17859 return 0;
16576} 17860}
16577_ACEOF 17861_ACEOF
16578rm -f conftest.$ac_objext 17862rm -f conftest.$ac_objext
16579if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 17863if { (ac_try="$ac_compile"
16580 (eval $ac_compile) 2>conftest.er1 17864case "(($ac_try" in
17865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17866 *) ac_try_echo=$ac_try;;
17867esac
17868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17869 (eval "$ac_compile") 2>conftest.er1
16581 ac_status=$? 17870 ac_status=$?
16582 grep -v '^ *+' conftest.er1 >conftest.err 17871 grep -v '^ *+' conftest.er1 >conftest.err
16583 rm -f conftest.er1 17872 rm -f conftest.er1
16584 cat conftest.err >&5 17873 cat conftest.err >&5
16585 echo "$as_me:$LINENO: \$? = $ac_status" >&5 17874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16586 (exit $ac_status); } && 17875 (exit $ac_status); } && {
16587 { ac_try='test -z "$ac_c_werror_flag" 17876 test -z "$ac_c_werror_flag" ||
16588 || test ! -s conftest.err' 17877 test ! -s conftest.err
16589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 17878 } && test -s conftest.$ac_objext; then
16590 (eval $ac_try) 2>&5
16591 ac_status=$?
16592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16593 (exit $ac_status); }; } &&
16594 { ac_try='test -s conftest.$ac_objext'
16595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16596 (eval $ac_try) 2>&5
16597 ac_status=$?
16598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16599 (exit $ac_status); }; }; then
16600 ac_cv_type_long_long=yes 17879 ac_cv_type_long_long=yes
16601else 17880else
16602 echo "$as_me: failed program was:" >&5 17881 echo "$as_me: failed program was:" >&5
16603sed 's/^/| /' conftest.$ac_ext >&5 17882sed 's/^/| /' conftest.$ac_ext >&5
16604 17883
16605ac_cv_type_long_long=no 17884 ac_cv_type_long_long=no
16606fi 17885fi
16607rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 17886
17887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16608fi 17888fi
16609echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 17889{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
16610echo "${ECHO_T}$ac_cv_type_long_long" >&6 17890echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
16611if test $ac_cv_type_long_long = yes; then 17891if test $ac_cv_type_long_long = yes; then
16612 17892
16613cat >>confdefs.h <<_ACEOF 17893cat >>confdefs.h <<_ACEOF
@@ -16616,8 +17896,8 @@ _ACEOF
16616 17896
16617 17897
16618fi 17898fi
16619echo "$as_me:$LINENO: checking for unsigned long long" >&5 17899{ echo "$as_me:$LINENO: checking for unsigned long long" >&5
16620echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6 17900echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6; }
16621if test "${ac_cv_type_unsigned_long_long+set}" = set; then 17901if test "${ac_cv_type_unsigned_long_long+set}" = set; then
16622 echo $ECHO_N "(cached) $ECHO_C" >&6 17902 echo $ECHO_N "(cached) $ECHO_C" >&6
16623else 17903else
@@ -16628,50 +17908,47 @@ cat confdefs.h >>conftest.$ac_ext
16628cat >>conftest.$ac_ext <<_ACEOF 17908cat >>conftest.$ac_ext <<_ACEOF
16629/* end confdefs.h. */ 17909/* end confdefs.h. */
16630$ac_includes_default 17910$ac_includes_default
17911typedef unsigned long long ac__type_new_;
16631int 17912int
16632main () 17913main ()
16633{ 17914{
16634if ((unsigned long long *) 0) 17915if ((ac__type_new_ *) 0)
16635 return 0; 17916 return 0;
16636if (sizeof (unsigned long long)) 17917if (sizeof (ac__type_new_))
16637 return 0; 17918 return 0;
16638 ; 17919 ;
16639 return 0; 17920 return 0;
16640} 17921}
16641_ACEOF 17922_ACEOF
16642rm -f conftest.$ac_objext 17923rm -f conftest.$ac_objext
16643if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 17924if { (ac_try="$ac_compile"
16644 (eval $ac_compile) 2>conftest.er1 17925case "(($ac_try" in
17926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17927 *) ac_try_echo=$ac_try;;
17928esac
17929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17930 (eval "$ac_compile") 2>conftest.er1
16645 ac_status=$? 17931 ac_status=$?
16646 grep -v '^ *+' conftest.er1 >conftest.err 17932 grep -v '^ *+' conftest.er1 >conftest.err
16647 rm -f conftest.er1 17933 rm -f conftest.er1
16648 cat conftest.err >&5 17934 cat conftest.err >&5
16649 echo "$as_me:$LINENO: \$? = $ac_status" >&5 17935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16650 (exit $ac_status); } && 17936 (exit $ac_status); } && {
16651 { ac_try='test -z "$ac_c_werror_flag" 17937 test -z "$ac_c_werror_flag" ||
16652 || test ! -s conftest.err' 17938 test ! -s conftest.err
16653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 17939 } && test -s conftest.$ac_objext; then
16654 (eval $ac_try) 2>&5
16655 ac_status=$?
16656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16657 (exit $ac_status); }; } &&
16658 { ac_try='test -s conftest.$ac_objext'
16659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16660 (eval $ac_try) 2>&5
16661 ac_status=$?
16662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16663 (exit $ac_status); }; }; then
16664 ac_cv_type_unsigned_long_long=yes 17940 ac_cv_type_unsigned_long_long=yes
16665else 17941else
16666 echo "$as_me: failed program was:" >&5 17942 echo "$as_me: failed program was:" >&5
16667sed 's/^/| /' conftest.$ac_ext >&5 17943sed 's/^/| /' conftest.$ac_ext >&5
16668 17944
16669ac_cv_type_unsigned_long_long=no 17945 ac_cv_type_unsigned_long_long=no
16670fi 17946fi
16671rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 17947
17948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16672fi 17949fi
16673echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5 17950{ echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5
16674echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6 17951echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6; }
16675if test $ac_cv_type_unsigned_long_long = yes; then 17952if test $ac_cv_type_unsigned_long_long = yes; then
16676 17953
16677cat >>confdefs.h <<_ACEOF 17954cat >>confdefs.h <<_ACEOF
@@ -16680,8 +17957,8 @@ _ACEOF
16680 17957
16681 17958
16682fi 17959fi
16683echo "$as_me:$LINENO: checking for long double" >&5 17960{ echo "$as_me:$LINENO: checking for long double" >&5
16684echo $ECHO_N "checking for long double... $ECHO_C" >&6 17961echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
16685if test "${ac_cv_type_long_double+set}" = set; then 17962if test "${ac_cv_type_long_double+set}" = set; then
16686 echo $ECHO_N "(cached) $ECHO_C" >&6 17963 echo $ECHO_N "(cached) $ECHO_C" >&6
16687else 17964else
@@ -16692,50 +17969,47 @@ cat confdefs.h >>conftest.$ac_ext
16692cat >>conftest.$ac_ext <<_ACEOF 17969cat >>conftest.$ac_ext <<_ACEOF
16693/* end confdefs.h. */ 17970/* end confdefs.h. */
16694$ac_includes_default 17971$ac_includes_default
17972typedef long double ac__type_new_;
16695int 17973int
16696main () 17974main ()
16697{ 17975{
16698if ((long double *) 0) 17976if ((ac__type_new_ *) 0)
16699 return 0; 17977 return 0;
16700if (sizeof (long double)) 17978if (sizeof (ac__type_new_))
16701 return 0; 17979 return 0;
16702 ; 17980 ;
16703 return 0; 17981 return 0;
16704} 17982}
16705_ACEOF 17983_ACEOF
16706rm -f conftest.$ac_objext 17984rm -f conftest.$ac_objext
16707if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 17985if { (ac_try="$ac_compile"
16708 (eval $ac_compile) 2>conftest.er1 17986case "(($ac_try" in
17987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17988 *) ac_try_echo=$ac_try;;
17989esac
17990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17991 (eval "$ac_compile") 2>conftest.er1
16709 ac_status=$? 17992 ac_status=$?
16710 grep -v '^ *+' conftest.er1 >conftest.err 17993 grep -v '^ *+' conftest.er1 >conftest.err
16711 rm -f conftest.er1 17994 rm -f conftest.er1
16712 cat conftest.err >&5 17995 cat conftest.err >&5
16713 echo "$as_me:$LINENO: \$? = $ac_status" >&5 17996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16714 (exit $ac_status); } && 17997 (exit $ac_status); } && {
16715 { ac_try='test -z "$ac_c_werror_flag" 17998 test -z "$ac_c_werror_flag" ||
16716 || test ! -s conftest.err' 17999 test ! -s conftest.err
16717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 18000 } && test -s conftest.$ac_objext; then
16718 (eval $ac_try) 2>&5
16719 ac_status=$?
16720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16721 (exit $ac_status); }; } &&
16722 { ac_try='test -s conftest.$ac_objext'
16723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16724 (eval $ac_try) 2>&5
16725 ac_status=$?
16726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16727 (exit $ac_status); }; }; then
16728 ac_cv_type_long_double=yes 18001 ac_cv_type_long_double=yes
16729else 18002else
16730 echo "$as_me: failed program was:" >&5 18003 echo "$as_me: failed program was:" >&5
16731sed 's/^/| /' conftest.$ac_ext >&5 18004sed 's/^/| /' conftest.$ac_ext >&5
16732 18005
16733ac_cv_type_long_double=no 18006 ac_cv_type_long_double=no
16734fi 18007fi
16735rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 18008
18009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16736fi 18010fi
16737echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5 18011{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
16738echo "${ECHO_T}$ac_cv_type_long_double" >&6 18012echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
16739if test $ac_cv_type_long_double = yes; then 18013if test $ac_cv_type_long_double = yes; then
16740 18014
16741cat >>confdefs.h <<_ACEOF 18015cat >>confdefs.h <<_ACEOF
@@ -16747,8 +18021,8 @@ fi
16747 18021
16748 18022
16749# Check datatype sizes 18023# Check datatype sizes
16750echo "$as_me:$LINENO: checking for char" >&5 18024{ echo "$as_me:$LINENO: checking for char" >&5
16751echo $ECHO_N "checking for char... $ECHO_C" >&6 18025echo $ECHO_N "checking for char... $ECHO_C" >&6; }
16752if test "${ac_cv_type_char+set}" = set; then 18026if test "${ac_cv_type_char+set}" = set; then
16753 echo $ECHO_N "(cached) $ECHO_C" >&6 18027 echo $ECHO_N "(cached) $ECHO_C" >&6
16754else 18028else
@@ -16759,61 +18033,57 @@ cat confdefs.h >>conftest.$ac_ext
16759cat >>conftest.$ac_ext <<_ACEOF 18033cat >>conftest.$ac_ext <<_ACEOF
16760/* end confdefs.h. */ 18034/* end confdefs.h. */
16761$ac_includes_default 18035$ac_includes_default
18036typedef char ac__type_new_;
16762int 18037int
16763main () 18038main ()
16764{ 18039{
16765if ((char *) 0) 18040if ((ac__type_new_ *) 0)
16766 return 0; 18041 return 0;
16767if (sizeof (char)) 18042if (sizeof (ac__type_new_))
16768 return 0; 18043 return 0;
16769 ; 18044 ;
16770 return 0; 18045 return 0;
16771} 18046}
16772_ACEOF 18047_ACEOF
16773rm -f conftest.$ac_objext 18048rm -f conftest.$ac_objext
16774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 18049if { (ac_try="$ac_compile"
16775 (eval $ac_compile) 2>conftest.er1 18050case "(($ac_try" in
18051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18052 *) ac_try_echo=$ac_try;;
18053esac
18054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18055 (eval "$ac_compile") 2>conftest.er1
16776 ac_status=$? 18056 ac_status=$?
16777 grep -v '^ *+' conftest.er1 >conftest.err 18057 grep -v '^ *+' conftest.er1 >conftest.err
16778 rm -f conftest.er1 18058 rm -f conftest.er1
16779 cat conftest.err >&5 18059 cat conftest.err >&5
16780 echo "$as_me:$LINENO: \$? = $ac_status" >&5 18060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16781 (exit $ac_status); } && 18061 (exit $ac_status); } && {
16782 { ac_try='test -z "$ac_c_werror_flag" 18062 test -z "$ac_c_werror_flag" ||
16783 || test ! -s conftest.err' 18063 test ! -s conftest.err
16784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 18064 } && test -s conftest.$ac_objext; then
16785 (eval $ac_try) 2>&5
16786 ac_status=$?
16787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16788 (exit $ac_status); }; } &&
16789 { ac_try='test -s conftest.$ac_objext'
16790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16791 (eval $ac_try) 2>&5
16792 ac_status=$?
16793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16794 (exit $ac_status); }; }; then
16795 ac_cv_type_char=yes 18065 ac_cv_type_char=yes
16796else 18066else
16797 echo "$as_me: failed program was:" >&5 18067 echo "$as_me: failed program was:" >&5
16798sed 's/^/| /' conftest.$ac_ext >&5 18068sed 's/^/| /' conftest.$ac_ext >&5
16799 18069
16800ac_cv_type_char=no 18070 ac_cv_type_char=no
16801fi 18071fi
16802rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 18072
18073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16803fi 18074fi
16804echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5 18075{ echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
16805echo "${ECHO_T}$ac_cv_type_char" >&6 18076echo "${ECHO_T}$ac_cv_type_char" >&6; }
16806 18077
16807echo "$as_me:$LINENO: checking size of char" >&5 18078# The cast to long int works around a bug in the HP C Compiler
16808echo $ECHO_N "checking size of char... $ECHO_C" >&6 18079# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18080# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18081# This bug is HP SR number 8606223364.
18082{ echo "$as_me:$LINENO: checking size of char" >&5
18083echo $ECHO_N "checking size of char... $ECHO_C" >&6; }
16809if test "${ac_cv_sizeof_char+set}" = set; then 18084if test "${ac_cv_sizeof_char+set}" = set; then
16810 echo $ECHO_N "(cached) $ECHO_C" >&6 18085 echo $ECHO_N "(cached) $ECHO_C" >&6
16811else 18086else
16812 if test "$ac_cv_type_char" = yes; then
16813 # The cast to unsigned long works around a bug in the HP C Compiler
16814 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16815 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16816 # This bug is HP SR number 8606223364.
16817 if test "$cross_compiling" = yes; then 18087 if test "$cross_compiling" = yes; then
16818 # Depending upon the size, compute the lo and hi bounds. 18088 # Depending upon the size, compute the lo and hi bounds.
16819cat >conftest.$ac_ext <<_ACEOF 18089cat >conftest.$ac_ext <<_ACEOF
@@ -16823,10 +18093,11 @@ cat confdefs.h >>conftest.$ac_ext
16823cat >>conftest.$ac_ext <<_ACEOF 18093cat >>conftest.$ac_ext <<_ACEOF
16824/* end confdefs.h. */ 18094/* end confdefs.h. */
16825$ac_includes_default 18095$ac_includes_default
18096 typedef char ac__type_sizeof_;
16826int 18097int
16827main () 18098main ()
16828{ 18099{
16829static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)]; 18100static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
16830test_array [0] = 0 18101test_array [0] = 0
16831 18102
16832 ; 18103 ;
@@ -16834,27 +18105,22 @@ test_array [0] = 0
16834} 18105}
16835_ACEOF 18106_ACEOF
16836rm -f conftest.$ac_objext 18107rm -f conftest.$ac_objext
16837if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 18108if { (ac_try="$ac_compile"
16838 (eval $ac_compile) 2>conftest.er1 18109case "(($ac_try" in
18110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18111 *) ac_try_echo=$ac_try;;
18112esac
18113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18114 (eval "$ac_compile") 2>conftest.er1
16839 ac_status=$? 18115 ac_status=$?
16840 grep -v '^ *+' conftest.er1 >conftest.err 18116 grep -v '^ *+' conftest.er1 >conftest.err
16841 rm -f conftest.er1 18117 rm -f conftest.er1
16842 cat conftest.err >&5 18118 cat conftest.err >&5
16843 echo "$as_me:$LINENO: \$? = $ac_status" >&5 18119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16844 (exit $ac_status); } && 18120 (exit $ac_status); } && {
16845 { ac_try='test -z "$ac_c_werror_flag" 18121 test -z "$ac_c_werror_flag" ||
16846 || test ! -s conftest.err' 18122 test ! -s conftest.err
16847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 18123 } && test -s conftest.$ac_objext; then
16848 (eval $ac_try) 2>&5
16849 ac_status=$?
16850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16851 (exit $ac_status); }; } &&
16852 { ac_try='test -s conftest.$ac_objext'
16853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16854 (eval $ac_try) 2>&5
16855 ac_status=$?
16856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16857 (exit $ac_status); }; }; then
16858 ac_lo=0 ac_mid=0 18124 ac_lo=0 ac_mid=0
16859 while :; do 18125 while :; do
16860 cat >conftest.$ac_ext <<_ACEOF 18126 cat >conftest.$ac_ext <<_ACEOF
@@ -16864,10 +18130,11 @@ cat confdefs.h >>conftest.$ac_ext
16864cat >>conftest.$ac_ext <<_ACEOF 18130cat >>conftest.$ac_ext <<_ACEOF
16865/* end confdefs.h. */ 18131/* end confdefs.h. */
16866$ac_includes_default 18132$ac_includes_default
18133 typedef char ac__type_sizeof_;
16867int 18134int
16868main () 18135main ()
16869{ 18136{
16870static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)]; 18137static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
16871test_array [0] = 0 18138test_array [0] = 0
16872 18139
16873 ; 18140 ;
@@ -16875,56 +18142,53 @@ test_array [0] = 0
16875} 18142}
16876_ACEOF 18143_ACEOF
16877rm -f conftest.$ac_objext 18144rm -f conftest.$ac_objext
16878if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 18145if { (ac_try="$ac_compile"
16879 (eval $ac_compile) 2>conftest.er1 18146case "(($ac_try" in
18147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18148 *) ac_try_echo=$ac_try;;
18149esac
18150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18151 (eval "$ac_compile") 2>conftest.er1
16880 ac_status=$? 18152 ac_status=$?
16881 grep -v '^ *+' conftest.er1 >conftest.err 18153 grep -v '^ *+' conftest.er1 >conftest.err
16882 rm -f conftest.er1 18154 rm -f conftest.er1
16883 cat conftest.err >&5 18155 cat conftest.err >&5
16884 echo "$as_me:$LINENO: \$? = $ac_status" >&5 18156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16885 (exit $ac_status); } && 18157 (exit $ac_status); } && {
16886 { ac_try='test -z "$ac_c_werror_flag" 18158 test -z "$ac_c_werror_flag" ||
16887 || test ! -s conftest.err' 18159 test ! -s conftest.err
16888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 18160 } && test -s conftest.$ac_objext; then
16889 (eval $ac_try) 2>&5
16890 ac_status=$?
16891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16892 (exit $ac_status); }; } &&
16893 { ac_try='test -s conftest.$ac_objext'
16894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16895 (eval $ac_try) 2>&5
16896 ac_status=$?
16897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16898 (exit $ac_status); }; }; then
16899 ac_hi=$ac_mid; break 18161 ac_hi=$ac_mid; break
16900else 18162else
16901 echo "$as_me: failed program was:" >&5 18163 echo "$as_me: failed program was:" >&5
16902sed 's/^/| /' conftest.$ac_ext >&5 18164sed 's/^/| /' conftest.$ac_ext >&5
16903 18165
16904ac_lo=`expr $ac_mid + 1` 18166 ac_lo=`expr $ac_mid + 1`
16905 if test $ac_lo -le $ac_mid; then 18167 if test $ac_lo -le $ac_mid; then
16906 ac_lo= ac_hi= 18168 ac_lo= ac_hi=
16907 break 18169 break
16908 fi 18170 fi
16909 ac_mid=`expr 2 '*' $ac_mid + 1` 18171 ac_mid=`expr 2 '*' $ac_mid + 1`
16910fi 18172fi
16911rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 18173
18174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16912 done 18175 done
16913else 18176else
16914 echo "$as_me: failed program was:" >&5 18177 echo "$as_me: failed program was:" >&5
16915sed 's/^/| /' conftest.$ac_ext >&5 18178sed 's/^/| /' conftest.$ac_ext >&5
16916 18179
16917cat >conftest.$ac_ext <<_ACEOF 18180 cat >conftest.$ac_ext <<_ACEOF
16918/* confdefs.h. */ 18181/* confdefs.h. */
16919_ACEOF 18182_ACEOF
16920cat confdefs.h >>conftest.$ac_ext 18183cat confdefs.h >>conftest.$ac_ext
16921cat >>conftest.$ac_ext <<_ACEOF 18184cat >>conftest.$ac_ext <<_ACEOF
16922/* end confdefs.h. */ 18185/* end confdefs.h. */
16923$ac_includes_default 18186$ac_includes_default
18187 typedef char ac__type_sizeof_;
16924int 18188int
16925main () 18189main ()
16926{ 18190{
16927static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)]; 18191static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
16928test_array [0] = 0 18192test_array [0] = 0
16929 18193
16930 ; 18194 ;
@@ -16932,27 +18196,22 @@ test_array [0] = 0
16932} 18196}
16933_ACEOF 18197_ACEOF
16934rm -f conftest.$ac_objext 18198rm -f conftest.$ac_objext
16935if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 18199if { (ac_try="$ac_compile"
16936 (eval $ac_compile) 2>conftest.er1 18200case "(($ac_try" in
18201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18202 *) ac_try_echo=$ac_try;;
18203esac
18204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18205 (eval "$ac_compile") 2>conftest.er1
16937 ac_status=$? 18206 ac_status=$?
16938 grep -v '^ *+' conftest.er1 >conftest.err 18207 grep -v '^ *+' conftest.er1 >conftest.err
16939 rm -f conftest.er1 18208 rm -f conftest.er1
16940 cat conftest.err >&5 18209 cat conftest.err >&5
16941 echo "$as_me:$LINENO: \$? = $ac_status" >&5 18210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16942 (exit $ac_status); } && 18211 (exit $ac_status); } && {
16943 { ac_try='test -z "$ac_c_werror_flag" 18212 test -z "$ac_c_werror_flag" ||
16944 || test ! -s conftest.err' 18213 test ! -s conftest.err
16945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 18214 } && test -s conftest.$ac_objext; then
16946 (eval $ac_try) 2>&5
16947 ac_status=$?
16948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16949 (exit $ac_status); }; } &&
16950 { ac_try='test -s conftest.$ac_objext'
16951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16952 (eval $ac_try) 2>&5
16953 ac_status=$?
16954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16955 (exit $ac_status); }; }; then
16956 ac_hi=-1 ac_mid=-1 18215 ac_hi=-1 ac_mid=-1
16957 while :; do 18216 while :; do
16958 cat >conftest.$ac_ext <<_ACEOF 18217 cat >conftest.$ac_ext <<_ACEOF
@@ -16962,10 +18221,11 @@ cat confdefs.h >>conftest.$ac_ext
16962cat >>conftest.$ac_ext <<_ACEOF 18221cat >>conftest.$ac_ext <<_ACEOF
16963/* end confdefs.h. */ 18222/* end confdefs.h. */
16964$ac_includes_default 18223$ac_includes_default
18224 typedef char ac__type_sizeof_;
16965int 18225int
16966main () 18226main ()
16967{ 18227{
16968static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)]; 18228static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
16969test_array [0] = 0 18229test_array [0] = 0
16970 18230
16971 ; 18231 ;
@@ -16973,50 +18233,48 @@ test_array [0] = 0
16973} 18233}
16974_ACEOF 18234_ACEOF
16975rm -f conftest.$ac_objext 18235rm -f conftest.$ac_objext
16976if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 18236if { (ac_try="$ac_compile"
16977 (eval $ac_compile) 2>conftest.er1 18237case "(($ac_try" in
18238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18239 *) ac_try_echo=$ac_try;;
18240esac
18241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18242 (eval "$ac_compile") 2>conftest.er1
16978 ac_status=$? 18243 ac_status=$?
16979 grep -v '^ *+' conftest.er1 >conftest.err 18244 grep -v '^ *+' conftest.er1 >conftest.err
16980 rm -f conftest.er1 18245 rm -f conftest.er1
16981 cat conftest.err >&5 18246 cat conftest.err >&5
16982 echo "$as_me:$LINENO: \$? = $ac_status" >&5 18247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16983 (exit $ac_status); } && 18248 (exit $ac_status); } && {
16984 { ac_try='test -z "$ac_c_werror_flag" 18249 test -z "$ac_c_werror_flag" ||
16985 || test ! -s conftest.err' 18250 test ! -s conftest.err
16986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 18251 } && test -s conftest.$ac_objext; then
16987 (eval $ac_try) 2>&5
16988 ac_status=$?
16989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16990 (exit $ac_status); }; } &&
16991 { ac_try='test -s conftest.$ac_objext'
16992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16993 (eval $ac_try) 2>&5
16994 ac_status=$?
16995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16996 (exit $ac_status); }; }; then
16997 ac_lo=$ac_mid; break 18252 ac_lo=$ac_mid; break
16998else 18253else
16999 echo "$as_me: failed program was:" >&5 18254 echo "$as_me: failed program was:" >&5
17000sed 's/^/| /' conftest.$ac_ext >&5 18255sed 's/^/| /' conftest.$ac_ext >&5
17001 18256
17002ac_hi=`expr '(' $ac_mid ')' - 1` 18257 ac_hi=`expr '(' $ac_mid ')' - 1`
17003 if test $ac_mid -le $ac_hi; then 18258 if test $ac_mid -le $ac_hi; then
17004 ac_lo= ac_hi= 18259 ac_lo= ac_hi=
17005 break 18260 break
17006 fi 18261 fi
17007 ac_mid=`expr 2 '*' $ac_mid` 18262 ac_mid=`expr 2 '*' $ac_mid`
17008fi 18263fi
17009rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 18264
18265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17010 done 18266 done
17011else 18267else
17012 echo "$as_me: failed program was:" >&5 18268 echo "$as_me: failed program was:" >&5
17013sed 's/^/| /' conftest.$ac_ext >&5 18269sed 's/^/| /' conftest.$ac_ext >&5
17014 18270
17015ac_lo= ac_hi= 18271 ac_lo= ac_hi=
17016fi 18272fi
17017rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 18273
18274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17018fi 18275fi
17019rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 18276
18277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17020# Binary search between lo and hi bounds. 18278# Binary search between lo and hi bounds.
17021while test "x$ac_lo" != "x$ac_hi"; do 18279while test "x$ac_lo" != "x$ac_hi"; do
17022 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` 18280 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
@@ -17027,10 +18285,11 @@ cat confdefs.h >>conftest.$ac_ext
17027cat >>conftest.$ac_ext <<_ACEOF 18285cat >>conftest.$ac_ext <<_ACEOF
17028/* end confdefs.h. */ 18286/* end confdefs.h. */
17029$ac_includes_default 18287$ac_includes_default
18288 typedef char ac__type_sizeof_;
17030int 18289int
17031main () 18290main ()
17032{ 18291{
17033static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)]; 18292static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
17034test_array [0] = 0 18293test_array [0] = 0
17035 18294
17036 ; 18295 ;
@@ -17038,52 +18297,45 @@ test_array [0] = 0
17038} 18297}
17039_ACEOF 18298_ACEOF
17040rm -f conftest.$ac_objext 18299rm -f conftest.$ac_objext
17041if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 18300if { (ac_try="$ac_compile"
17042 (eval $ac_compile) 2>conftest.er1 18301case "(($ac_try" in
18302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18303 *) ac_try_echo=$ac_try;;
18304esac
18305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18306 (eval "$ac_compile") 2>conftest.er1
17043 ac_status=$? 18307 ac_status=$?
17044 grep -v '^ *+' conftest.er1 >conftest.err 18308 grep -v '^ *+' conftest.er1 >conftest.err
17045 rm -f conftest.er1 18309 rm -f conftest.er1
17046 cat conftest.err >&5 18310 cat conftest.err >&5
17047 echo "$as_me:$LINENO: \$? = $ac_status" >&5 18311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17048 (exit $ac_status); } && 18312 (exit $ac_status); } && {
17049 { ac_try='test -z "$ac_c_werror_flag" 18313 test -z "$ac_c_werror_flag" ||
17050 || test ! -s conftest.err' 18314 test ! -s conftest.err
17051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 18315 } && test -s conftest.$ac_objext; then
17052 (eval $ac_try) 2>&5
17053 ac_status=$?
17054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17055 (exit $ac_status); }; } &&
17056 { ac_try='test -s conftest.$ac_objext'
17057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17058 (eval $ac_try) 2>&5
17059 ac_status=$?
17060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17061 (exit $ac_status); }; }; then
17062 ac_hi=$ac_mid 18316 ac_hi=$ac_mid
17063else 18317else
17064 echo "$as_me: failed program was:" >&5 18318 echo "$as_me: failed program was:" >&5
17065sed 's/^/| /' conftest.$ac_ext >&5 18319sed 's/^/| /' conftest.$ac_ext >&5
17066 18320
17067ac_lo=`expr '(' $ac_mid ')' + 1` 18321 ac_lo=`expr '(' $ac_mid ')' + 1`
17068fi 18322fi
17069rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 18323
18324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17070done 18325done
17071case $ac_lo in 18326case $ac_lo in
17072?*) ac_cv_sizeof_char=$ac_lo;; 18327?*) ac_cv_sizeof_char=$ac_lo;;
17073'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77 18328'') if test "$ac_cv_type_char" = yes; then
18329 { { echo "$as_me:$LINENO: error: cannot compute sizeof (char)
17074See \`config.log' for more details." >&5 18330See \`config.log' for more details." >&5
17075echo "$as_me: error: cannot compute sizeof (char), 77 18331echo "$as_me: error: cannot compute sizeof (char)
17076See \`config.log' for more details." >&2;} 18332See \`config.log' for more details." >&2;}
17077 { (exit 1); exit 1; }; } ;; 18333 { (exit 77); exit 77; }; }
18334 else
18335 ac_cv_sizeof_char=0
18336 fi ;;
17078esac 18337esac
17079else 18338else
17080 if test "$cross_compiling" = yes; then
17081 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17082See \`config.log' for more details." >&5
17083echo "$as_me: error: cannot run test program while cross compiling
17084See \`config.log' for more details." >&2;}
17085 { (exit 1); exit 1; }; }
17086else
17087 cat >conftest.$ac_ext <<_ACEOF 18339 cat >conftest.$ac_ext <<_ACEOF
17088/* confdefs.h. */ 18340/* confdefs.h. */
17089_ACEOF 18341_ACEOF
@@ -17091,8 +18343,9 @@ cat confdefs.h >>conftest.$ac_ext
17091cat >>conftest.$ac_ext <<_ACEOF 18343cat >>conftest.$ac_ext <<_ACEOF
17092/* end confdefs.h. */ 18344/* end confdefs.h. */
17093$ac_includes_default 18345$ac_includes_default
17094long longval () { return (long) (sizeof (char)); } 18346 typedef char ac__type_sizeof_;
17095unsigned long ulongval () { return (long) (sizeof (char)); } 18347static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
18348static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
17096#include <stdio.h> 18349#include <stdio.h>
17097#include <stdlib.h> 18350#include <stdlib.h>
17098int 18351int
@@ -17101,35 +18354,44 @@ main ()
17101 18354
17102 FILE *f = fopen ("conftest.val", "w"); 18355 FILE *f = fopen ("conftest.val", "w");
17103 if (! f) 18356 if (! f)
17104 exit (1); 18357 return 1;
17105 if (((long) (sizeof (char))) < 0) 18358 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
17106 { 18359 {
17107 long i = longval (); 18360 long int i = longval ();
17108 if (i != ((long) (sizeof (char)))) 18361 if (i != ((long int) (sizeof (ac__type_sizeof_))))
17109 exit (1); 18362 return 1;
17110 fprintf (f, "%ld\n", i); 18363 fprintf (f, "%ld\n", i);
17111 } 18364 }
17112 else 18365 else
17113 { 18366 {
17114 unsigned long i = ulongval (); 18367 unsigned long int i = ulongval ();
17115 if (i != ((long) (sizeof (char)))) 18368 if (i != ((long int) (sizeof (ac__type_sizeof_))))
17116 exit (1); 18369 return 1;
17117 fprintf (f, "%lu\n", i); 18370 fprintf (f, "%lu\n", i);
17118 } 18371 }
17119 exit (ferror (f) || fclose (f) != 0); 18372 return ferror (f) || fclose (f) != 0;
17120 18373
17121 ; 18374 ;
17122 return 0; 18375 return 0;
17123} 18376}
17124_ACEOF 18377_ACEOF
17125rm -f conftest$ac_exeext 18378rm -f conftest$ac_exeext
17126if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 18379if { (ac_try="$ac_link"
17127 (eval $ac_link) 2>&5 18380case "(($ac_try" in
18381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18382 *) ac_try_echo=$ac_try;;
18383esac
18384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18385 (eval "$ac_link") 2>&5
17128 ac_status=$? 18386 ac_status=$?
17129 echo "$as_me:$LINENO: \$? = $ac_status" >&5 18387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17130 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 18388 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 18389 { (case "(($ac_try" in
17132 (eval $ac_try) 2>&5 18390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18391 *) ac_try_echo=$ac_try;;
18392esac
18393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18394 (eval "$ac_try") 2>&5
17133 ac_status=$? 18395 ac_status=$?
17134 echo "$as_me:$LINENO: \$? = $ac_status" >&5 18396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17135 (exit $ac_status); }; }; then 18397 (exit $ac_status); }; }; then
@@ -17140,29 +18402,32 @@ echo "$as_me: failed program was:" >&5
17140sed 's/^/| /' conftest.$ac_ext >&5 18402sed 's/^/| /' conftest.$ac_ext >&5
17141 18403
17142( exit $ac_status ) 18404( exit $ac_status )
17143{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77 18405if test "$ac_cv_type_char" = yes; then
18406 { { echo "$as_me:$LINENO: error: cannot compute sizeof (char)
17144See \`config.log' for more details." >&5 18407See \`config.log' for more details." >&5
17145echo "$as_me: error: cannot compute sizeof (char), 77 18408echo "$as_me: error: cannot compute sizeof (char)
17146See \`config.log' for more details." >&2;} 18409See \`config.log' for more details." >&2;}
17147 { (exit 1); exit 1; }; } 18410 { (exit 77); exit 77; }; }
17148fi 18411 else
17149rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 18412 ac_cv_sizeof_char=0
18413 fi
17150fi 18414fi
18415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17151fi 18416fi
17152rm -f conftest.val 18417rm -f conftest.val
17153else
17154 ac_cv_sizeof_char=0
17155fi
17156fi 18418fi
17157echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5 18419{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
17158echo "${ECHO_T}$ac_cv_sizeof_char" >&6 18420echo "${ECHO_T}$ac_cv_sizeof_char" >&6; }
18421
18422
18423
17159cat >>confdefs.h <<_ACEOF 18424cat >>confdefs.h <<_ACEOF
17160#define SIZEOF_CHAR $ac_cv_sizeof_char 18425#define SIZEOF_CHAR $ac_cv_sizeof_char
17161_ACEOF 18426_ACEOF
17162 18427
17163 18428
17164echo "$as_me:$LINENO: checking for short int" >&5 18429{ echo "$as_me:$LINENO: checking for short int" >&5
17165echo $ECHO_N "checking for short int... $ECHO_C" >&6 18430echo $ECHO_N "checking for short int... $ECHO_C" >&6; }
17166if test "${ac_cv_type_short_int+set}" = set; then 18431if test "${ac_cv_type_short_int+set}" = set; then
17167 echo $ECHO_N "(cached) $ECHO_C" >&6 18432 echo $ECHO_N "(cached) $ECHO_C" >&6
17168else 18433else
@@ -17173,61 +18438,57 @@ cat confdefs.h >>conftest.$ac_ext
17173cat >>conftest.$ac_ext <<_ACEOF 18438cat >>conftest.$ac_ext <<_ACEOF
17174/* end confdefs.h. */ 18439/* end confdefs.h. */
17175$ac_includes_default 18440$ac_includes_default
18441typedef short int ac__type_new_;
17176int 18442int
17177main () 18443main ()
17178{ 18444{
17179if ((short int *) 0) 18445if ((ac__type_new_ *) 0)
17180 return 0; 18446 return 0;
17181if (sizeof (short int)) 18447if (sizeof (ac__type_new_))
17182 return 0; 18448 return 0;
17183 ; 18449 ;
17184 return 0; 18450 return 0;
17185} 18451}
17186_ACEOF 18452_ACEOF
17187rm -f conftest.$ac_objext 18453rm -f conftest.$ac_objext
17188if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 18454if { (ac_try="$ac_compile"
17189 (eval $ac_compile) 2>conftest.er1 18455case "(($ac_try" in
18456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18457 *) ac_try_echo=$ac_try;;
18458esac
18459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18460 (eval "$ac_compile") 2>conftest.er1
17190 ac_status=$? 18461 ac_status=$?
17191 grep -v '^ *+' conftest.er1 >conftest.err 18462 grep -v '^ *+' conftest.er1 >conftest.err
17192 rm -f conftest.er1 18463 rm -f conftest.er1
17193 cat conftest.err >&5 18464 cat conftest.err >&5
17194 echo "$as_me:$LINENO: \$? = $ac_status" >&5 18465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17195 (exit $ac_status); } && 18466 (exit $ac_status); } && {
17196 { ac_try='test -z "$ac_c_werror_flag" 18467 test -z "$ac_c_werror_flag" ||
17197 || test ! -s conftest.err' 18468 test ! -s conftest.err
17198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 18469 } && test -s conftest.$ac_objext; then
17199 (eval $ac_try) 2>&5
17200 ac_status=$?
17201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17202 (exit $ac_status); }; } &&
17203 { ac_try='test -s conftest.$ac_objext'
17204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17205 (eval $ac_try) 2>&5
17206 ac_status=$?
17207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17208 (exit $ac_status); }; }; then
17209 ac_cv_type_short_int=yes 18470 ac_cv_type_short_int=yes
17210else 18471else
17211 echo "$as_me: failed program was:" >&5 18472 echo "$as_me: failed program was:" >&5
17212sed 's/^/| /' conftest.$ac_ext >&5 18473sed 's/^/| /' conftest.$ac_ext >&5
17213 18474
17214ac_cv_type_short_int=no 18475 ac_cv_type_short_int=no
17215fi 18476fi
17216rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 18477
18478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17217fi 18479fi
17218echo "$as_me:$LINENO: result: $ac_cv_type_short_int" >&5 18480{ echo "$as_me:$LINENO: result: $ac_cv_type_short_int" >&5
17219echo "${ECHO_T}$ac_cv_type_short_int" >&6 18481echo "${ECHO_T}$ac_cv_type_short_int" >&6; }
17220 18482
17221echo "$as_me:$LINENO: checking size of short int" >&5 18483# The cast to long int works around a bug in the HP C Compiler
17222echo $ECHO_N "checking size of short int... $ECHO_C" >&6 18484# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18485# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18486# This bug is HP SR number 8606223364.
18487{ echo "$as_me:$LINENO: checking size of short int" >&5
18488echo $ECHO_N "checking size of short int... $ECHO_C" >&6; }
17223if test "${ac_cv_sizeof_short_int+set}" = set; then 18489if test "${ac_cv_sizeof_short_int+set}" = set; then
17224 echo $ECHO_N "(cached) $ECHO_C" >&6 18490 echo $ECHO_N "(cached) $ECHO_C" >&6
17225else 18491else
17226 if test "$ac_cv_type_short_int" = yes; then
17227 # The cast to unsigned long works around a bug in the HP C Compiler
17228 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17229 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17230 # This bug is HP SR number 8606223364.
17231 if test "$cross_compiling" = yes; then 18492 if test "$cross_compiling" = yes; then
17232 # Depending upon the size, compute the lo and hi bounds. 18493 # Depending upon the size, compute the lo and hi bounds.
17233cat >conftest.$ac_ext <<_ACEOF 18494cat >conftest.$ac_ext <<_ACEOF
@@ -17237,10 +18498,11 @@ cat confdefs.h >>conftest.$ac_ext
17237cat >>conftest.$ac_ext <<_ACEOF 18498cat >>conftest.$ac_ext <<_ACEOF
17238/* end confdefs.h. */ 18499/* end confdefs.h. */
17239$ac_includes_default 18500$ac_includes_default
18501 typedef short int ac__type_sizeof_;
17240int 18502int
17241main () 18503main ()
17242{ 18504{
17243static int test_array [1 - 2 * !(((long) (sizeof (short int))) >= 0)]; 18505static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
17244test_array [0] = 0 18506test_array [0] = 0
17245 18507
17246 ; 18508 ;
@@ -17248,27 +18510,22 @@ test_array [0] = 0
17248} 18510}
17249_ACEOF 18511_ACEOF
17250rm -f conftest.$ac_objext 18512rm -f conftest.$ac_objext
17251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 18513if { (ac_try="$ac_compile"
17252 (eval $ac_compile) 2>conftest.er1 18514case "(($ac_try" in
18515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18516 *) ac_try_echo=$ac_try;;
18517esac
18518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18519 (eval "$ac_compile") 2>conftest.er1
17253 ac_status=$? 18520 ac_status=$?
17254 grep -v '^ *+' conftest.er1 >conftest.err 18521 grep -v '^ *+' conftest.er1 >conftest.err
17255 rm -f conftest.er1 18522 rm -f conftest.er1
17256 cat conftest.err >&5 18523 cat conftest.err >&5
17257 echo "$as_me:$LINENO: \$? = $ac_status" >&5 18524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17258 (exit $ac_status); } && 18525 (exit $ac_status); } && {
17259 { ac_try='test -z "$ac_c_werror_flag" 18526 test -z "$ac_c_werror_flag" ||
17260 || test ! -s conftest.err' 18527 test ! -s conftest.err
17261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 18528 } && test -s conftest.$ac_objext; then
17262 (eval $ac_try) 2>&5
17263 ac_status=$?
17264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17265 (exit $ac_status); }; } &&
17266 { ac_try='test -s conftest.$ac_objext'
17267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17268 (eval $ac_try) 2>&5
17269 ac_status=$?
17270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17271 (exit $ac_status); }; }; then
17272 ac_lo=0 ac_mid=0 18529 ac_lo=0 ac_mid=0
17273 while :; do 18530 while :; do
17274 cat >conftest.$ac_ext <<_ACEOF 18531 cat >conftest.$ac_ext <<_ACEOF
@@ -17278,10 +18535,11 @@ cat confdefs.h >>conftest.$ac_ext
17278cat >>conftest.$ac_ext <<_ACEOF 18535cat >>conftest.$ac_ext <<_ACEOF
17279/* end confdefs.h. */ 18536/* end confdefs.h. */
17280$ac_includes_default 18537$ac_includes_default
18538 typedef short int ac__type_sizeof_;
17281int 18539int
17282main () 18540main ()
17283{ 18541{
17284static int test_array [1 - 2 * !(((long) (sizeof (short int))) <= $ac_mid)]; 18542static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
17285test_array [0] = 0 18543test_array [0] = 0
17286 18544
17287 ; 18545 ;
@@ -17289,56 +18547,53 @@ test_array [0] = 0
17289} 18547}
17290_ACEOF 18548_ACEOF
17291rm -f conftest.$ac_objext 18549rm -f conftest.$ac_objext
17292if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 18550if { (ac_try="$ac_compile"
17293 (eval $ac_compile) 2>conftest.er1 18551case "(($ac_try" in
18552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18553 *) ac_try_echo=$ac_try;;
18554esac
18555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18556 (eval "$ac_compile") 2>conftest.er1
17294 ac_status=$? 18557 ac_status=$?
17295 grep -v '^ *+' conftest.er1 >conftest.err 18558 grep -v '^ *+' conftest.er1 >conftest.err
17296 rm -f conftest.er1 18559 rm -f conftest.er1
17297 cat conftest.err >&5 18560 cat conftest.err >&5
17298 echo "$as_me:$LINENO: \$? = $ac_status" >&5 18561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17299 (exit $ac_status); } && 18562 (exit $ac_status); } && {
17300 { ac_try='test -z "$ac_c_werror_flag" 18563 test -z "$ac_c_werror_flag" ||
17301 || test ! -s conftest.err' 18564 test ! -s conftest.err
17302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 18565 } && test -s conftest.$ac_objext; then
17303 (eval $ac_try) 2>&5
17304 ac_status=$?
17305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17306 (exit $ac_status); }; } &&
17307 { ac_try='test -s conftest.$ac_objext'
17308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17309 (eval $ac_try) 2>&5
17310 ac_status=$?
17311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17312 (exit $ac_status); }; }; then
17313 ac_hi=$ac_mid; break 18566 ac_hi=$ac_mid; break
17314else 18567else
17315 echo "$as_me: failed program was:" >&5 18568 echo "$as_me: failed program was:" >&5
17316sed 's/^/| /' conftest.$ac_ext >&5 18569sed 's/^/| /' conftest.$ac_ext >&5
17317 18570
17318ac_lo=`expr $ac_mid + 1` 18571 ac_lo=`expr $ac_mid + 1`
17319 if test $ac_lo -le $ac_mid; then 18572 if test $ac_lo -le $ac_mid; then
17320 ac_lo= ac_hi= 18573 ac_lo= ac_hi=
17321 break 18574 break
17322 fi 18575 fi
17323 ac_mid=`expr 2 '*' $ac_mid + 1` 18576 ac_mid=`expr 2 '*' $ac_mid + 1`
17324fi 18577fi
17325rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 18578
18579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17326 done 18580 done
17327else 18581else
17328 echo "$as_me: failed program was:" >&5 18582 echo "$as_me: failed program was:" >&5
17329sed 's/^/| /' conftest.$ac_ext >&5 18583sed 's/^/| /' conftest.$ac_ext >&5
17330 18584
17331cat >conftest.$ac_ext <<_ACEOF 18585 cat >conftest.$ac_ext <<_ACEOF
17332/* confdefs.h. */ 18586/* confdefs.h. */
17333_ACEOF 18587_ACEOF
17334cat confdefs.h >>conftest.$ac_ext 18588cat confdefs.h >>conftest.$ac_ext
17335cat >>conftest.$ac_ext <<_ACEOF 18589cat >>conftest.$ac_ext <<_ACEOF
17336/* end confdefs.h. */ 18590/* end confdefs.h. */
17337$ac_includes_default 18591$ac_includes_default
18592 typedef short int ac__type_sizeof_;
17338int 18593int
17339main () 18594main ()
17340{ 18595{
17341static int test_array [1 - 2 * !(((long) (sizeof (short int))) < 0)]; 18596static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
17342test_array [0] = 0 18597test_array [0] = 0
17343 18598
17344 ; 18599 ;
@@ -17346,27 +18601,22 @@ test_array [0] = 0
17346} 18601}
17347_ACEOF 18602_ACEOF
17348rm -f conftest.$ac_objext 18603rm -f conftest.$ac_objext
17349if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 18604if { (ac_try="$ac_compile"
17350 (eval $ac_compile) 2>conftest.er1 18605case "(($ac_try" in
18606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18607 *) ac_try_echo=$ac_try;;
18608esac
18609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18610 (eval "$ac_compile") 2>conftest.er1
17351 ac_status=$? 18611 ac_status=$?
17352 grep -v '^ *+' conftest.er1 >conftest.err 18612 grep -v '^ *+' conftest.er1 >conftest.err
17353 rm -f conftest.er1 18613 rm -f conftest.er1
17354 cat conftest.err >&5 18614 cat conftest.err >&5
17355 echo "$as_me:$LINENO: \$? = $ac_status" >&5 18615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17356 (exit $ac_status); } && 18616 (exit $ac_status); } && {
17357 { ac_try='test -z "$ac_c_werror_flag" 18617 test -z "$ac_c_werror_flag" ||
17358 || test ! -s conftest.err' 18618 test ! -s conftest.err
17359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 18619 } && test -s conftest.$ac_objext; then
17360 (eval $ac_try) 2>&5
17361 ac_status=$?
17362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17363 (exit $ac_status); }; } &&
17364 { ac_try='test -s conftest.$ac_objext'
17365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17366 (eval $ac_try) 2>&5
17367 ac_status=$?
17368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17369 (exit $ac_status); }; }; then
17370 ac_hi=-1 ac_mid=-1 18620 ac_hi=-1 ac_mid=-1
17371 while :; do 18621 while :; do
17372 cat >conftest.$ac_ext <<_ACEOF 18622 cat >conftest.$ac_ext <<_ACEOF
@@ -17376,10 +18626,11 @@ cat confdefs.h >>conftest.$ac_ext
17376cat >>conftest.$ac_ext <<_ACEOF 18626cat >>conftest.$ac_ext <<_ACEOF
17377/* end confdefs.h. */ 18627/* end confdefs.h. */
17378$ac_includes_default 18628$ac_includes_default
18629 typedef short int ac__type_sizeof_;
17379int 18630int
17380main () 18631main ()
17381{ 18632{
17382static int test_array [1 - 2 * !(((long) (sizeof (short int))) >= $ac_mid)]; 18633static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
17383test_array [0] = 0 18634test_array [0] = 0
17384 18635
17385 ; 18636 ;
@@ -17387,50 +18638,48 @@ test_array [0] = 0
17387} 18638}
17388_ACEOF 18639_ACEOF
17389rm -f conftest.$ac_objext 18640rm -f conftest.$ac_objext
17390if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 18641if { (ac_try="$ac_compile"
17391 (eval $ac_compile) 2>conftest.er1 18642case "(($ac_try" in
18643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18644 *) ac_try_echo=$ac_try;;
18645esac
18646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18647 (eval "$ac_compile") 2>conftest.er1
17392 ac_status=$? 18648 ac_status=$?
17393 grep -v '^ *+' conftest.er1 >conftest.err 18649 grep -v '^ *+' conftest.er1 >conftest.err
17394 rm -f conftest.er1 18650 rm -f conftest.er1
17395 cat conftest.err >&5 18651 cat conftest.err >&5
17396 echo "$as_me:$LINENO: \$? = $ac_status" >&5 18652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17397 (exit $ac_status); } && 18653 (exit $ac_status); } && {
17398 { ac_try='test -z "$ac_c_werror_flag" 18654 test -z "$ac_c_werror_flag" ||
17399 || test ! -s conftest.err' 18655 test ! -s conftest.err
17400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 18656 } && test -s conftest.$ac_objext; then
17401 (eval $ac_try) 2>&5
17402 ac_status=$?
17403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17404 (exit $ac_status); }; } &&
17405 { ac_try='test -s conftest.$ac_objext'
17406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17407 (eval $ac_try) 2>&5
17408 ac_status=$?
17409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17410 (exit $ac_status); }; }; then
17411 ac_lo=$ac_mid; break 18657 ac_lo=$ac_mid; break
17412else 18658else
17413 echo "$as_me: failed program was:" >&5 18659 echo "$as_me: failed program was:" >&5
17414sed 's/^/| /' conftest.$ac_ext >&5 18660sed 's/^/| /' conftest.$ac_ext >&5
17415 18661
17416ac_hi=`expr '(' $ac_mid ')' - 1` 18662 ac_hi=`expr '(' $ac_mid ')' - 1`
17417 if test $ac_mid -le $ac_hi; then 18663 if test $ac_mid -le $ac_hi; then
17418 ac_lo= ac_hi= 18664 ac_lo= ac_hi=
17419 break 18665 break
17420 fi 18666 fi
17421 ac_mid=`expr 2 '*' $ac_mid` 18667 ac_mid=`expr 2 '*' $ac_mid`
17422fi 18668fi
17423rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 18669
18670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17424 done 18671 done
17425else 18672else
17426 echo "$as_me: failed program was:" >&5 18673 echo "$as_me: failed program was:" >&5
17427sed 's/^/| /' conftest.$ac_ext >&5 18674sed 's/^/| /' conftest.$ac_ext >&5
17428 18675
17429ac_lo= ac_hi= 18676 ac_lo= ac_hi=
17430fi 18677fi
17431rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 18678
18679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17432fi 18680fi
17433rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 18681
18682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17434# Binary search between lo and hi bounds. 18683# Binary search between lo and hi bounds.
17435while test "x$ac_lo" != "x$ac_hi"; do 18684while test "x$ac_lo" != "x$ac_hi"; do
17436 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` 18685 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
@@ -17441,10 +18690,11 @@ cat confdefs.h >>conftest.$ac_ext
17441cat >>conftest.$ac_ext <<_ACEOF 18690cat >>conftest.$ac_ext <<_ACEOF
17442/* end confdefs.h. */ 18691/* end confdefs.h. */
17443$ac_includes_default 18692$ac_includes_default
18693 typedef short int ac__type_sizeof_;
17444int 18694int
17445main () 18695main ()
17446{ 18696{
17447static int test_array [1 - 2 * !(((long) (sizeof (short int))) <= $ac_mid)]; 18697static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
17448test_array [0] = 0 18698test_array [0] = 0
17449 18699
17450 ; 18700 ;
@@ -17452,52 +18702,45 @@ test_array [0] = 0
17452} 18702}
17453_ACEOF 18703_ACEOF
17454rm -f conftest.$ac_objext 18704rm -f conftest.$ac_objext
17455if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 18705if { (ac_try="$ac_compile"
17456 (eval $ac_compile) 2>conftest.er1 18706case "(($ac_try" in
18707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18708 *) ac_try_echo=$ac_try;;
18709esac
18710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18711 (eval "$ac_compile") 2>conftest.er1
17457 ac_status=$? 18712 ac_status=$?
17458 grep -v '^ *+' conftest.er1 >conftest.err 18713 grep -v '^ *+' conftest.er1 >conftest.err
17459 rm -f conftest.er1 18714 rm -f conftest.er1
17460 cat conftest.err >&5 18715 cat conftest.err >&5
17461 echo "$as_me:$LINENO: \$? = $ac_status" >&5 18716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17462 (exit $ac_status); } && 18717 (exit $ac_status); } && {
17463 { ac_try='test -z "$ac_c_werror_flag" 18718 test -z "$ac_c_werror_flag" ||
17464 || test ! -s conftest.err' 18719 test ! -s conftest.err
17465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 18720 } && test -s conftest.$ac_objext; then
17466 (eval $ac_try) 2>&5
17467 ac_status=$?
17468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17469 (exit $ac_status); }; } &&
17470 { ac_try='test -s conftest.$ac_objext'
17471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17472 (eval $ac_try) 2>&5
17473 ac_status=$?
17474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17475 (exit $ac_status); }; }; then
17476 ac_hi=$ac_mid 18721 ac_hi=$ac_mid
17477else 18722else
17478 echo "$as_me: failed program was:" >&5 18723 echo "$as_me: failed program was:" >&5
17479sed 's/^/| /' conftest.$ac_ext >&5 18724sed 's/^/| /' conftest.$ac_ext >&5
17480 18725
17481ac_lo=`expr '(' $ac_mid ')' + 1` 18726 ac_lo=`expr '(' $ac_mid ')' + 1`
17482fi 18727fi
17483rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 18728
18729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17484done 18730done
17485case $ac_lo in 18731case $ac_lo in
17486?*) ac_cv_sizeof_short_int=$ac_lo;; 18732?*) ac_cv_sizeof_short_int=$ac_lo;;
17487'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short int), 77 18733'') if test "$ac_cv_type_short_int" = yes; then
18734 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short int)
17488See \`config.log' for more details." >&5 18735See \`config.log' for more details." >&5
17489echo "$as_me: error: cannot compute sizeof (short int), 77 18736echo "$as_me: error: cannot compute sizeof (short int)
17490See \`config.log' for more details." >&2;} 18737See \`config.log' for more details." >&2;}
17491 { (exit 1); exit 1; }; } ;; 18738 { (exit 77); exit 77; }; }
18739 else
18740 ac_cv_sizeof_short_int=0
18741 fi ;;
17492esac 18742esac
17493else 18743else
17494 if test "$cross_compiling" = yes; then
17495 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17496See \`config.log' for more details." >&5
17497echo "$as_me: error: cannot run test program while cross compiling
17498See \`config.log' for more details." >&2;}
17499 { (exit 1); exit 1; }; }
17500else
17501 cat >conftest.$ac_ext <<_ACEOF 18744 cat >conftest.$ac_ext <<_ACEOF
17502/* confdefs.h. */ 18745/* confdefs.h. */
17503_ACEOF 18746_ACEOF
@@ -17505,8 +18748,9 @@ cat confdefs.h >>conftest.$ac_ext
17505cat >>conftest.$ac_ext <<_ACEOF 18748cat >>conftest.$ac_ext <<_ACEOF
17506/* end confdefs.h. */ 18749/* end confdefs.h. */
17507$ac_includes_default 18750$ac_includes_default
17508long longval () { return (long) (sizeof (short int)); } 18751 typedef short int ac__type_sizeof_;
17509unsigned long ulongval () { return (long) (sizeof (short int)); } 18752static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
18753static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
17510#include <stdio.h> 18754#include <stdio.h>
17511#include <stdlib.h> 18755#include <stdlib.h>
17512int 18756int
@@ -17515,35 +18759,44 @@ main ()
17515 18759
17516 FILE *f = fopen ("conftest.val", "w"); 18760 FILE *f = fopen ("conftest.val", "w");
17517 if (! f) 18761 if (! f)
17518 exit (1); 18762 return 1;
17519 if (((long) (sizeof (short int))) < 0) 18763 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
17520 { 18764 {
17521 long i = longval (); 18765 long int i = longval ();
17522 if (i != ((long) (sizeof (short int)))) 18766 if (i != ((long int) (sizeof (ac__type_sizeof_))))
17523 exit (1); 18767 return 1;
17524 fprintf (f, "%ld\n", i); 18768 fprintf (f, "%ld\n", i);
17525 } 18769 }
17526 else 18770 else
17527 { 18771 {
17528 unsigned long i = ulongval (); 18772 unsigned long int i = ulongval ();
17529 if (i != ((long) (sizeof (short int)))) 18773 if (i != ((long int) (sizeof (ac__type_sizeof_))))
17530 exit (1); 18774 return 1;
17531 fprintf (f, "%lu\n", i); 18775 fprintf (f, "%lu\n", i);
17532 } 18776 }
17533 exit (ferror (f) || fclose (f) != 0); 18777 return ferror (f) || fclose (f) != 0;
17534 18778
17535 ; 18779 ;
17536 return 0; 18780 return 0;
17537} 18781}
17538_ACEOF 18782_ACEOF
17539rm -f conftest$ac_exeext 18783rm -f conftest$ac_exeext
17540if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 18784if { (ac_try="$ac_link"
17541 (eval $ac_link) 2>&5 18785case "(($ac_try" in
18786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18787 *) ac_try_echo=$ac_try;;
18788esac
18789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18790 (eval "$ac_link") 2>&5
17542 ac_status=$? 18791 ac_status=$?
17543 echo "$as_me:$LINENO: \$? = $ac_status" >&5 18792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17544 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 18793 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 18794 { (case "(($ac_try" in
17546 (eval $ac_try) 2>&5 18795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18796 *) ac_try_echo=$ac_try;;
18797esac
18798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18799 (eval "$ac_try") 2>&5
17547 ac_status=$? 18800 ac_status=$?
17548 echo "$as_me:$LINENO: \$? = $ac_status" >&5 18801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17549 (exit $ac_status); }; }; then 18802 (exit $ac_status); }; }; then
@@ -17554,29 +18807,32 @@ echo "$as_me: failed program was:" >&5
17554sed 's/^/| /' conftest.$ac_ext >&5 18807sed 's/^/| /' conftest.$ac_ext >&5
17555 18808
17556( exit $ac_status ) 18809( exit $ac_status )
17557{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short int), 77 18810if test "$ac_cv_type_short_int" = yes; then
18811 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short int)
17558See \`config.log' for more details." >&5 18812See \`config.log' for more details." >&5
17559echo "$as_me: error: cannot compute sizeof (short int), 77 18813echo "$as_me: error: cannot compute sizeof (short int)
17560See \`config.log' for more details." >&2;} 18814See \`config.log' for more details." >&2;}
17561 { (exit 1); exit 1; }; } 18815 { (exit 77); exit 77; }; }
17562fi 18816 else
17563rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 18817 ac_cv_sizeof_short_int=0
18818 fi
17564fi 18819fi
18820rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17565fi 18821fi
17566rm -f conftest.val 18822rm -f conftest.val
17567else
17568 ac_cv_sizeof_short_int=0
17569fi
17570fi 18823fi
17571echo "$as_me:$LINENO: result: $ac_cv_sizeof_short_int" >&5 18824{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short_int" >&5
17572echo "${ECHO_T}$ac_cv_sizeof_short_int" >&6 18825echo "${ECHO_T}$ac_cv_sizeof_short_int" >&6; }
18826
18827
18828
17573cat >>confdefs.h <<_ACEOF 18829cat >>confdefs.h <<_ACEOF
17574#define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int 18830#define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
17575_ACEOF 18831_ACEOF
17576 18832
17577 18833
17578echo "$as_me:$LINENO: checking for int" >&5 18834{ echo "$as_me:$LINENO: checking for int" >&5
17579echo $ECHO_N "checking for int... $ECHO_C" >&6 18835echo $ECHO_N "checking for int... $ECHO_C" >&6; }
17580if test "${ac_cv_type_int+set}" = set; then 18836if test "${ac_cv_type_int+set}" = set; then
17581 echo $ECHO_N "(cached) $ECHO_C" >&6 18837 echo $ECHO_N "(cached) $ECHO_C" >&6
17582else 18838else
@@ -17587,61 +18843,57 @@ cat confdefs.h >>conftest.$ac_ext
17587cat >>conftest.$ac_ext <<_ACEOF 18843cat >>conftest.$ac_ext <<_ACEOF
17588/* end confdefs.h. */ 18844/* end confdefs.h. */
17589$ac_includes_default 18845$ac_includes_default
18846typedef int ac__type_new_;
17590int 18847int
17591main () 18848main ()
17592{ 18849{
17593if ((int *) 0) 18850if ((ac__type_new_ *) 0)
17594 return 0; 18851 return 0;
17595if (sizeof (int)) 18852if (sizeof (ac__type_new_))
17596 return 0; 18853 return 0;
17597 ; 18854 ;
17598 return 0; 18855 return 0;
17599} 18856}
17600_ACEOF 18857_ACEOF
17601rm -f conftest.$ac_objext 18858rm -f conftest.$ac_objext
17602if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 18859if { (ac_try="$ac_compile"
17603 (eval $ac_compile) 2>conftest.er1 18860case "(($ac_try" in
18861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18862 *) ac_try_echo=$ac_try;;
18863esac
18864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18865 (eval "$ac_compile") 2>conftest.er1
17604 ac_status=$? 18866 ac_status=$?
17605 grep -v '^ *+' conftest.er1 >conftest.err 18867 grep -v '^ *+' conftest.er1 >conftest.err
17606 rm -f conftest.er1 18868 rm -f conftest.er1
17607 cat conftest.err >&5 18869 cat conftest.err >&5
17608 echo "$as_me:$LINENO: \$? = $ac_status" >&5 18870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17609 (exit $ac_status); } && 18871 (exit $ac_status); } && {
17610 { ac_try='test -z "$ac_c_werror_flag" 18872 test -z "$ac_c_werror_flag" ||
17611 || test ! -s conftest.err' 18873 test ! -s conftest.err
17612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 18874 } && test -s conftest.$ac_objext; then
17613 (eval $ac_try) 2>&5
17614 ac_status=$?
17615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17616 (exit $ac_status); }; } &&
17617 { ac_try='test -s conftest.$ac_objext'
17618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17619 (eval $ac_try) 2>&5
17620 ac_status=$?
17621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17622 (exit $ac_status); }; }; then
17623 ac_cv_type_int=yes 18875 ac_cv_type_int=yes
17624else 18876else
17625 echo "$as_me: failed program was:" >&5 18877 echo "$as_me: failed program was:" >&5
17626sed 's/^/| /' conftest.$ac_ext >&5 18878sed 's/^/| /' conftest.$ac_ext >&5
17627 18879
17628ac_cv_type_int=no 18880 ac_cv_type_int=no
17629fi 18881fi
17630rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 18882
18883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17631fi 18884fi
17632echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 18885{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
17633echo "${ECHO_T}$ac_cv_type_int" >&6 18886echo "${ECHO_T}$ac_cv_type_int" >&6; }
17634 18887
17635echo "$as_me:$LINENO: checking size of int" >&5 18888# The cast to long int works around a bug in the HP C Compiler
17636echo $ECHO_N "checking size of int... $ECHO_C" >&6 18889# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18890# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18891# This bug is HP SR number 8606223364.
18892{ echo "$as_me:$LINENO: checking size of int" >&5
18893echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
17637if test "${ac_cv_sizeof_int+set}" = set; then 18894if test "${ac_cv_sizeof_int+set}" = set; then
17638 echo $ECHO_N "(cached) $ECHO_C" >&6 18895 echo $ECHO_N "(cached) $ECHO_C" >&6
17639else 18896else
17640 if test "$ac_cv_type_int" = yes; then
17641 # The cast to unsigned long works around a bug in the HP C Compiler
17642 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17643 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17644 # This bug is HP SR number 8606223364.
17645 if test "$cross_compiling" = yes; then 18897 if test "$cross_compiling" = yes; then
17646 # Depending upon the size, compute the lo and hi bounds. 18898 # Depending upon the size, compute the lo and hi bounds.
17647cat >conftest.$ac_ext <<_ACEOF 18899cat >conftest.$ac_ext <<_ACEOF
@@ -17651,10 +18903,11 @@ cat confdefs.h >>conftest.$ac_ext
17651cat >>conftest.$ac_ext <<_ACEOF 18903cat >>conftest.$ac_ext <<_ACEOF
17652/* end confdefs.h. */ 18904/* end confdefs.h. */
17653$ac_includes_default 18905$ac_includes_default
18906 typedef int ac__type_sizeof_;
17654int 18907int
17655main () 18908main ()
17656{ 18909{
17657static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; 18910static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
17658test_array [0] = 0 18911test_array [0] = 0
17659 18912
17660 ; 18913 ;
@@ -17662,27 +18915,22 @@ test_array [0] = 0
17662} 18915}
17663_ACEOF 18916_ACEOF
17664rm -f conftest.$ac_objext 18917rm -f conftest.$ac_objext
17665if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 18918if { (ac_try="$ac_compile"
17666 (eval $ac_compile) 2>conftest.er1 18919case "(($ac_try" in
18920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18921 *) ac_try_echo=$ac_try;;
18922esac
18923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18924 (eval "$ac_compile") 2>conftest.er1
17667 ac_status=$? 18925 ac_status=$?
17668 grep -v '^ *+' conftest.er1 >conftest.err 18926 grep -v '^ *+' conftest.er1 >conftest.err
17669 rm -f conftest.er1 18927 rm -f conftest.er1
17670 cat conftest.err >&5 18928 cat conftest.err >&5
17671 echo "$as_me:$LINENO: \$? = $ac_status" >&5 18929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17672 (exit $ac_status); } && 18930 (exit $ac_status); } && {
17673 { ac_try='test -z "$ac_c_werror_flag" 18931 test -z "$ac_c_werror_flag" ||
17674 || test ! -s conftest.err' 18932 test ! -s conftest.err
17675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 18933 } && test -s conftest.$ac_objext; then
17676 (eval $ac_try) 2>&5
17677 ac_status=$?
17678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17679 (exit $ac_status); }; } &&
17680 { ac_try='test -s conftest.$ac_objext'
17681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17682 (eval $ac_try) 2>&5
17683 ac_status=$?
17684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17685 (exit $ac_status); }; }; then
17686 ac_lo=0 ac_mid=0 18934 ac_lo=0 ac_mid=0
17687 while :; do 18935 while :; do
17688 cat >conftest.$ac_ext <<_ACEOF 18936 cat >conftest.$ac_ext <<_ACEOF
@@ -17692,10 +18940,11 @@ cat confdefs.h >>conftest.$ac_ext
17692cat >>conftest.$ac_ext <<_ACEOF 18940cat >>conftest.$ac_ext <<_ACEOF
17693/* end confdefs.h. */ 18941/* end confdefs.h. */
17694$ac_includes_default 18942$ac_includes_default
18943 typedef int ac__type_sizeof_;
17695int 18944int
17696main () 18945main ()
17697{ 18946{
17698static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; 18947static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
17699test_array [0] = 0 18948test_array [0] = 0
17700 18949
17701 ; 18950 ;
@@ -17703,56 +18952,53 @@ test_array [0] = 0
17703} 18952}
17704_ACEOF 18953_ACEOF
17705rm -f conftest.$ac_objext 18954rm -f conftest.$ac_objext
17706if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 18955if { (ac_try="$ac_compile"
17707 (eval $ac_compile) 2>conftest.er1 18956case "(($ac_try" in
18957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18958 *) ac_try_echo=$ac_try;;
18959esac
18960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18961 (eval "$ac_compile") 2>conftest.er1
17708 ac_status=$? 18962 ac_status=$?
17709 grep -v '^ *+' conftest.er1 >conftest.err 18963 grep -v '^ *+' conftest.er1 >conftest.err
17710 rm -f conftest.er1 18964 rm -f conftest.er1
17711 cat conftest.err >&5 18965 cat conftest.err >&5
17712 echo "$as_me:$LINENO: \$? = $ac_status" >&5 18966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17713 (exit $ac_status); } && 18967 (exit $ac_status); } && {
17714 { ac_try='test -z "$ac_c_werror_flag" 18968 test -z "$ac_c_werror_flag" ||
17715 || test ! -s conftest.err' 18969 test ! -s conftest.err
17716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 18970 } && test -s conftest.$ac_objext; then
17717 (eval $ac_try) 2>&5
17718 ac_status=$?
17719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17720 (exit $ac_status); }; } &&
17721 { ac_try='test -s conftest.$ac_objext'
17722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17723 (eval $ac_try) 2>&5
17724 ac_status=$?
17725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17726 (exit $ac_status); }; }; then
17727 ac_hi=$ac_mid; break 18971 ac_hi=$ac_mid; break
17728else 18972else
17729 echo "$as_me: failed program was:" >&5 18973 echo "$as_me: failed program was:" >&5
17730sed 's/^/| /' conftest.$ac_ext >&5 18974sed 's/^/| /' conftest.$ac_ext >&5
17731 18975
17732ac_lo=`expr $ac_mid + 1` 18976 ac_lo=`expr $ac_mid + 1`
17733 if test $ac_lo -le $ac_mid; then 18977 if test $ac_lo -le $ac_mid; then
17734 ac_lo= ac_hi= 18978 ac_lo= ac_hi=
17735 break 18979 break
17736 fi 18980 fi
17737 ac_mid=`expr 2 '*' $ac_mid + 1` 18981 ac_mid=`expr 2 '*' $ac_mid + 1`
17738fi 18982fi
17739rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 18983
18984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17740 done 18985 done
17741else 18986else
17742 echo "$as_me: failed program was:" >&5 18987 echo "$as_me: failed program was:" >&5
17743sed 's/^/| /' conftest.$ac_ext >&5 18988sed 's/^/| /' conftest.$ac_ext >&5
17744 18989
17745cat >conftest.$ac_ext <<_ACEOF 18990 cat >conftest.$ac_ext <<_ACEOF
17746/* confdefs.h. */ 18991/* confdefs.h. */
17747_ACEOF 18992_ACEOF
17748cat confdefs.h >>conftest.$ac_ext 18993cat confdefs.h >>conftest.$ac_ext
17749cat >>conftest.$ac_ext <<_ACEOF 18994cat >>conftest.$ac_ext <<_ACEOF
17750/* end confdefs.h. */ 18995/* end confdefs.h. */
17751$ac_includes_default 18996$ac_includes_default
18997 typedef int ac__type_sizeof_;
17752int 18998int
17753main () 18999main ()
17754{ 19000{
17755static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; 19001static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
17756test_array [0] = 0 19002test_array [0] = 0
17757 19003
17758 ; 19004 ;
@@ -17760,27 +19006,22 @@ test_array [0] = 0
17760} 19006}
17761_ACEOF 19007_ACEOF
17762rm -f conftest.$ac_objext 19008rm -f conftest.$ac_objext
17763if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 19009if { (ac_try="$ac_compile"
17764 (eval $ac_compile) 2>conftest.er1 19010case "(($ac_try" in
19011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19012 *) ac_try_echo=$ac_try;;
19013esac
19014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19015 (eval "$ac_compile") 2>conftest.er1
17765 ac_status=$? 19016 ac_status=$?
17766 grep -v '^ *+' conftest.er1 >conftest.err 19017 grep -v '^ *+' conftest.er1 >conftest.err
17767 rm -f conftest.er1 19018 rm -f conftest.er1
17768 cat conftest.err >&5 19019 cat conftest.err >&5
17769 echo "$as_me:$LINENO: \$? = $ac_status" >&5 19020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17770 (exit $ac_status); } && 19021 (exit $ac_status); } && {
17771 { ac_try='test -z "$ac_c_werror_flag" 19022 test -z "$ac_c_werror_flag" ||
17772 || test ! -s conftest.err' 19023 test ! -s conftest.err
17773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 19024 } && test -s conftest.$ac_objext; then
17774 (eval $ac_try) 2>&5
17775 ac_status=$?
17776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17777 (exit $ac_status); }; } &&
17778 { ac_try='test -s conftest.$ac_objext'
17779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17780 (eval $ac_try) 2>&5
17781 ac_status=$?
17782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17783 (exit $ac_status); }; }; then
17784 ac_hi=-1 ac_mid=-1 19025 ac_hi=-1 ac_mid=-1
17785 while :; do 19026 while :; do
17786 cat >conftest.$ac_ext <<_ACEOF 19027 cat >conftest.$ac_ext <<_ACEOF
@@ -17790,10 +19031,11 @@ cat confdefs.h >>conftest.$ac_ext
17790cat >>conftest.$ac_ext <<_ACEOF 19031cat >>conftest.$ac_ext <<_ACEOF
17791/* end confdefs.h. */ 19032/* end confdefs.h. */
17792$ac_includes_default 19033$ac_includes_default
19034 typedef int ac__type_sizeof_;
17793int 19035int
17794main () 19036main ()
17795{ 19037{
17796static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; 19038static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
17797test_array [0] = 0 19039test_array [0] = 0
17798 19040
17799 ; 19041 ;
@@ -17801,50 +19043,48 @@ test_array [0] = 0
17801} 19043}
17802_ACEOF 19044_ACEOF
17803rm -f conftest.$ac_objext 19045rm -f conftest.$ac_objext
17804if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 19046if { (ac_try="$ac_compile"
17805 (eval $ac_compile) 2>conftest.er1 19047case "(($ac_try" in
19048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19049 *) ac_try_echo=$ac_try;;
19050esac
19051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19052 (eval "$ac_compile") 2>conftest.er1
17806 ac_status=$? 19053 ac_status=$?
17807 grep -v '^ *+' conftest.er1 >conftest.err 19054 grep -v '^ *+' conftest.er1 >conftest.err
17808 rm -f conftest.er1 19055 rm -f conftest.er1
17809 cat conftest.err >&5 19056 cat conftest.err >&5
17810 echo "$as_me:$LINENO: \$? = $ac_status" >&5 19057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17811 (exit $ac_status); } && 19058 (exit $ac_status); } && {
17812 { ac_try='test -z "$ac_c_werror_flag" 19059 test -z "$ac_c_werror_flag" ||
17813 || test ! -s conftest.err' 19060 test ! -s conftest.err
17814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 19061 } && test -s conftest.$ac_objext; then
17815 (eval $ac_try) 2>&5
17816 ac_status=$?
17817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17818 (exit $ac_status); }; } &&
17819 { ac_try='test -s conftest.$ac_objext'
17820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17821 (eval $ac_try) 2>&5
17822 ac_status=$?
17823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17824 (exit $ac_status); }; }; then
17825 ac_lo=$ac_mid; break 19062 ac_lo=$ac_mid; break
17826else 19063else
17827 echo "$as_me: failed program was:" >&5 19064 echo "$as_me: failed program was:" >&5
17828sed 's/^/| /' conftest.$ac_ext >&5 19065sed 's/^/| /' conftest.$ac_ext >&5
17829 19066
17830ac_hi=`expr '(' $ac_mid ')' - 1` 19067 ac_hi=`expr '(' $ac_mid ')' - 1`
17831 if test $ac_mid -le $ac_hi; then 19068 if test $ac_mid -le $ac_hi; then
17832 ac_lo= ac_hi= 19069 ac_lo= ac_hi=
17833 break 19070 break
17834 fi 19071 fi
17835 ac_mid=`expr 2 '*' $ac_mid` 19072 ac_mid=`expr 2 '*' $ac_mid`
17836fi 19073fi
17837rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 19074
19075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17838 done 19076 done
17839else 19077else
17840 echo "$as_me: failed program was:" >&5 19078 echo "$as_me: failed program was:" >&5
17841sed 's/^/| /' conftest.$ac_ext >&5 19079sed 's/^/| /' conftest.$ac_ext >&5
17842 19080
17843ac_lo= ac_hi= 19081 ac_lo= ac_hi=
17844fi 19082fi
17845rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 19083
19084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17846fi 19085fi
17847rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 19086
19087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17848# Binary search between lo and hi bounds. 19088# Binary search between lo and hi bounds.
17849while test "x$ac_lo" != "x$ac_hi"; do 19089while test "x$ac_lo" != "x$ac_hi"; do
17850 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` 19090 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
@@ -17855,10 +19095,11 @@ cat confdefs.h >>conftest.$ac_ext
17855cat >>conftest.$ac_ext <<_ACEOF 19095cat >>conftest.$ac_ext <<_ACEOF
17856/* end confdefs.h. */ 19096/* end confdefs.h. */
17857$ac_includes_default 19097$ac_includes_default
19098 typedef int ac__type_sizeof_;
17858int 19099int
17859main () 19100main ()
17860{ 19101{
17861static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; 19102static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
17862test_array [0] = 0 19103test_array [0] = 0
17863 19104
17864 ; 19105 ;
@@ -17866,52 +19107,45 @@ test_array [0] = 0
17866} 19107}
17867_ACEOF 19108_ACEOF
17868rm -f conftest.$ac_objext 19109rm -f conftest.$ac_objext
17869if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 19110if { (ac_try="$ac_compile"
17870 (eval $ac_compile) 2>conftest.er1 19111case "(($ac_try" in
19112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19113 *) ac_try_echo=$ac_try;;
19114esac
19115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19116 (eval "$ac_compile") 2>conftest.er1
17871 ac_status=$? 19117 ac_status=$?
17872 grep -v '^ *+' conftest.er1 >conftest.err 19118 grep -v '^ *+' conftest.er1 >conftest.err
17873 rm -f conftest.er1 19119 rm -f conftest.er1
17874 cat conftest.err >&5 19120 cat conftest.err >&5
17875 echo "$as_me:$LINENO: \$? = $ac_status" >&5 19121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17876 (exit $ac_status); } && 19122 (exit $ac_status); } && {
17877 { ac_try='test -z "$ac_c_werror_flag" 19123 test -z "$ac_c_werror_flag" ||
17878 || test ! -s conftest.err' 19124 test ! -s conftest.err
17879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 19125 } && test -s conftest.$ac_objext; then
17880 (eval $ac_try) 2>&5
17881 ac_status=$?
17882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17883 (exit $ac_status); }; } &&
17884 { ac_try='test -s conftest.$ac_objext'
17885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17886 (eval $ac_try) 2>&5
17887 ac_status=$?
17888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17889 (exit $ac_status); }; }; then
17890 ac_hi=$ac_mid 19126 ac_hi=$ac_mid
17891else 19127else
17892 echo "$as_me: failed program was:" >&5 19128 echo "$as_me: failed program was:" >&5
17893sed 's/^/| /' conftest.$ac_ext >&5 19129sed 's/^/| /' conftest.$ac_ext >&5
17894 19130
17895ac_lo=`expr '(' $ac_mid ')' + 1` 19131 ac_lo=`expr '(' $ac_mid ')' + 1`
17896fi 19132fi
17897rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 19133
19134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17898done 19135done
17899case $ac_lo in 19136case $ac_lo in
17900?*) ac_cv_sizeof_int=$ac_lo;; 19137?*) ac_cv_sizeof_int=$ac_lo;;
17901'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 19138'') if test "$ac_cv_type_int" = yes; then
19139 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
17902See \`config.log' for more details." >&5 19140See \`config.log' for more details." >&5
17903echo "$as_me: error: cannot compute sizeof (int), 77 19141echo "$as_me: error: cannot compute sizeof (int)
17904See \`config.log' for more details." >&2;} 19142See \`config.log' for more details." >&2;}
17905 { (exit 1); exit 1; }; } ;; 19143 { (exit 77); exit 77; }; }
19144 else
19145 ac_cv_sizeof_int=0
19146 fi ;;
17906esac 19147esac
17907else 19148else
17908 if test "$cross_compiling" = yes; then
17909 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17910See \`config.log' for more details." >&5
17911echo "$as_me: error: cannot run test program while cross compiling
17912See \`config.log' for more details." >&2;}
17913 { (exit 1); exit 1; }; }
17914else
17915 cat >conftest.$ac_ext <<_ACEOF 19149 cat >conftest.$ac_ext <<_ACEOF
17916/* confdefs.h. */ 19150/* confdefs.h. */
17917_ACEOF 19151_ACEOF
@@ -17919,8 +19153,9 @@ cat confdefs.h >>conftest.$ac_ext
17919cat >>conftest.$ac_ext <<_ACEOF 19153cat >>conftest.$ac_ext <<_ACEOF
17920/* end confdefs.h. */ 19154/* end confdefs.h. */
17921$ac_includes_default 19155$ac_includes_default
17922long longval () { return (long) (sizeof (int)); } 19156 typedef int ac__type_sizeof_;
17923unsigned long ulongval () { return (long) (sizeof (int)); } 19157static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
19158static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
17924#include <stdio.h> 19159#include <stdio.h>
17925#include <stdlib.h> 19160#include <stdlib.h>
17926int 19161int
@@ -17929,35 +19164,44 @@ main ()
17929 19164
17930 FILE *f = fopen ("conftest.val", "w"); 19165 FILE *f = fopen ("conftest.val", "w");
17931 if (! f) 19166 if (! f)
17932 exit (1); 19167 return 1;
17933 if (((long) (sizeof (int))) < 0) 19168 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
17934 { 19169 {
17935 long i = longval (); 19170 long int i = longval ();
17936 if (i != ((long) (sizeof (int)))) 19171 if (i != ((long int) (sizeof (ac__type_sizeof_))))
17937 exit (1); 19172 return 1;
17938 fprintf (f, "%ld\n", i); 19173 fprintf (f, "%ld\n", i);
17939 } 19174 }
17940 else 19175 else
17941 { 19176 {
17942 unsigned long i = ulongval (); 19177 unsigned long int i = ulongval ();
17943 if (i != ((long) (sizeof (int)))) 19178 if (i != ((long int) (sizeof (ac__type_sizeof_))))
17944 exit (1); 19179 return 1;
17945 fprintf (f, "%lu\n", i); 19180 fprintf (f, "%lu\n", i);
17946 } 19181 }
17947 exit (ferror (f) || fclose (f) != 0); 19182 return ferror (f) || fclose (f) != 0;
17948 19183
17949 ; 19184 ;
17950 return 0; 19185 return 0;
17951} 19186}
17952_ACEOF 19187_ACEOF
17953rm -f conftest$ac_exeext 19188rm -f conftest$ac_exeext
17954if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 19189if { (ac_try="$ac_link"
17955 (eval $ac_link) 2>&5 19190case "(($ac_try" in
19191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19192 *) ac_try_echo=$ac_try;;
19193esac
19194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19195 (eval "$ac_link") 2>&5
17956 ac_status=$? 19196 ac_status=$?
17957 echo "$as_me:$LINENO: \$? = $ac_status" >&5 19197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17958 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 19198 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 19199 { (case "(($ac_try" in
17960 (eval $ac_try) 2>&5 19200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19201 *) ac_try_echo=$ac_try;;
19202esac
19203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19204 (eval "$ac_try") 2>&5
17961 ac_status=$? 19205 ac_status=$?
17962 echo "$as_me:$LINENO: \$? = $ac_status" >&5 19206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17963 (exit $ac_status); }; }; then 19207 (exit $ac_status); }; }; then
@@ -17968,29 +19212,32 @@ echo "$as_me: failed program was:" >&5
17968sed 's/^/| /' conftest.$ac_ext >&5 19212sed 's/^/| /' conftest.$ac_ext >&5
17969 19213
17970( exit $ac_status ) 19214( exit $ac_status )
17971{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 19215if test "$ac_cv_type_int" = yes; then
19216 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
17972See \`config.log' for more details." >&5 19217See \`config.log' for more details." >&5
17973echo "$as_me: error: cannot compute sizeof (int), 77 19218echo "$as_me: error: cannot compute sizeof (int)
17974See \`config.log' for more details." >&2;} 19219See \`config.log' for more details." >&2;}
17975 { (exit 1); exit 1; }; } 19220 { (exit 77); exit 77; }; }
17976fi 19221 else
17977rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 19222 ac_cv_sizeof_int=0
19223 fi
17978fi 19224fi
19225rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17979fi 19226fi
17980rm -f conftest.val 19227rm -f conftest.val
17981else
17982 ac_cv_sizeof_int=0
17983fi
17984fi 19228fi
17985echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 19229{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
17986echo "${ECHO_T}$ac_cv_sizeof_int" >&6 19230echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
19231
19232
19233
17987cat >>confdefs.h <<_ACEOF 19234cat >>confdefs.h <<_ACEOF
17988#define SIZEOF_INT $ac_cv_sizeof_int 19235#define SIZEOF_INT $ac_cv_sizeof_int
17989_ACEOF 19236_ACEOF
17990 19237
17991 19238
17992echo "$as_me:$LINENO: checking for long int" >&5 19239{ echo "$as_me:$LINENO: checking for long int" >&5
17993echo $ECHO_N "checking for long int... $ECHO_C" >&6 19240echo $ECHO_N "checking for long int... $ECHO_C" >&6; }
17994if test "${ac_cv_type_long_int+set}" = set; then 19241if test "${ac_cv_type_long_int+set}" = set; then
17995 echo $ECHO_N "(cached) $ECHO_C" >&6 19242 echo $ECHO_N "(cached) $ECHO_C" >&6
17996else 19243else
@@ -18001,61 +19248,57 @@ cat confdefs.h >>conftest.$ac_ext
18001cat >>conftest.$ac_ext <<_ACEOF 19248cat >>conftest.$ac_ext <<_ACEOF
18002/* end confdefs.h. */ 19249/* end confdefs.h. */
18003$ac_includes_default 19250$ac_includes_default
19251typedef long int ac__type_new_;
18004int 19252int
18005main () 19253main ()
18006{ 19254{
18007if ((long int *) 0) 19255if ((ac__type_new_ *) 0)
18008 return 0; 19256 return 0;
18009if (sizeof (long int)) 19257if (sizeof (ac__type_new_))
18010 return 0; 19258 return 0;
18011 ; 19259 ;
18012 return 0; 19260 return 0;
18013} 19261}
18014_ACEOF 19262_ACEOF
18015rm -f conftest.$ac_objext 19263rm -f conftest.$ac_objext
18016if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 19264if { (ac_try="$ac_compile"
18017 (eval $ac_compile) 2>conftest.er1 19265case "(($ac_try" in
19266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19267 *) ac_try_echo=$ac_try;;
19268esac
19269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19270 (eval "$ac_compile") 2>conftest.er1
18018 ac_status=$? 19271 ac_status=$?
18019 grep -v '^ *+' conftest.er1 >conftest.err 19272 grep -v '^ *+' conftest.er1 >conftest.err
18020 rm -f conftest.er1 19273 rm -f conftest.er1
18021 cat conftest.err >&5 19274 cat conftest.err >&5
18022 echo "$as_me:$LINENO: \$? = $ac_status" >&5 19275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18023 (exit $ac_status); } && 19276 (exit $ac_status); } && {
18024 { ac_try='test -z "$ac_c_werror_flag" 19277 test -z "$ac_c_werror_flag" ||
18025 || test ! -s conftest.err' 19278 test ! -s conftest.err
18026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 19279 } && test -s conftest.$ac_objext; then
18027 (eval $ac_try) 2>&5
18028 ac_status=$?
18029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18030 (exit $ac_status); }; } &&
18031 { ac_try='test -s conftest.$ac_objext'
18032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18033 (eval $ac_try) 2>&5
18034 ac_status=$?
18035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18036 (exit $ac_status); }; }; then
18037 ac_cv_type_long_int=yes 19280 ac_cv_type_long_int=yes
18038else 19281else
18039 echo "$as_me: failed program was:" >&5 19282 echo "$as_me: failed program was:" >&5
18040sed 's/^/| /' conftest.$ac_ext >&5 19283sed 's/^/| /' conftest.$ac_ext >&5
18041 19284
18042ac_cv_type_long_int=no 19285 ac_cv_type_long_int=no
18043fi 19286fi
18044rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 19287
19288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18045fi 19289fi
18046echo "$as_me:$LINENO: result: $ac_cv_type_long_int" >&5 19290{ echo "$as_me:$LINENO: result: $ac_cv_type_long_int" >&5
18047echo "${ECHO_T}$ac_cv_type_long_int" >&6 19291echo "${ECHO_T}$ac_cv_type_long_int" >&6; }
18048 19292
18049echo "$as_me:$LINENO: checking size of long int" >&5 19293# The cast to long int works around a bug in the HP C Compiler
18050echo $ECHO_N "checking size of long int... $ECHO_C" >&6 19294# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19295# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19296# This bug is HP SR number 8606223364.
19297{ echo "$as_me:$LINENO: checking size of long int" >&5
19298echo $ECHO_N "checking size of long int... $ECHO_C" >&6; }
18051if test "${ac_cv_sizeof_long_int+set}" = set; then 19299if test "${ac_cv_sizeof_long_int+set}" = set; then
18052 echo $ECHO_N "(cached) $ECHO_C" >&6 19300 echo $ECHO_N "(cached) $ECHO_C" >&6
18053else 19301else
18054 if test "$ac_cv_type_long_int" = yes; then
18055 # The cast to unsigned long works around a bug in the HP C Compiler
18056 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18057 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18058 # This bug is HP SR number 8606223364.
18059 if test "$cross_compiling" = yes; then 19302 if test "$cross_compiling" = yes; then
18060 # Depending upon the size, compute the lo and hi bounds. 19303 # Depending upon the size, compute the lo and hi bounds.
18061cat >conftest.$ac_ext <<_ACEOF 19304cat >conftest.$ac_ext <<_ACEOF
@@ -18065,10 +19308,11 @@ cat confdefs.h >>conftest.$ac_ext
18065cat >>conftest.$ac_ext <<_ACEOF 19308cat >>conftest.$ac_ext <<_ACEOF
18066/* end confdefs.h. */ 19309/* end confdefs.h. */
18067$ac_includes_default 19310$ac_includes_default
19311 typedef long int ac__type_sizeof_;
18068int 19312int
18069main () 19313main ()
18070{ 19314{
18071static int test_array [1 - 2 * !(((long) (sizeof (long int))) >= 0)]; 19315static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
18072test_array [0] = 0 19316test_array [0] = 0
18073 19317
18074 ; 19318 ;
@@ -18076,27 +19320,22 @@ test_array [0] = 0
18076} 19320}
18077_ACEOF 19321_ACEOF
18078rm -f conftest.$ac_objext 19322rm -f conftest.$ac_objext
18079if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 19323if { (ac_try="$ac_compile"
18080 (eval $ac_compile) 2>conftest.er1 19324case "(($ac_try" in
19325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19326 *) ac_try_echo=$ac_try;;
19327esac
19328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19329 (eval "$ac_compile") 2>conftest.er1
18081 ac_status=$? 19330 ac_status=$?
18082 grep -v '^ *+' conftest.er1 >conftest.err 19331 grep -v '^ *+' conftest.er1 >conftest.err
18083 rm -f conftest.er1 19332 rm -f conftest.er1
18084 cat conftest.err >&5 19333 cat conftest.err >&5
18085 echo "$as_me:$LINENO: \$? = $ac_status" >&5 19334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18086 (exit $ac_status); } && 19335 (exit $ac_status); } && {
18087 { ac_try='test -z "$ac_c_werror_flag" 19336 test -z "$ac_c_werror_flag" ||
18088 || test ! -s conftest.err' 19337 test ! -s conftest.err
18089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 19338 } && test -s conftest.$ac_objext; then
18090 (eval $ac_try) 2>&5
18091 ac_status=$?
18092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18093 (exit $ac_status); }; } &&
18094 { ac_try='test -s conftest.$ac_objext'
18095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18096 (eval $ac_try) 2>&5
18097 ac_status=$?
18098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18099 (exit $ac_status); }; }; then
18100 ac_lo=0 ac_mid=0 19339 ac_lo=0 ac_mid=0
18101 while :; do 19340 while :; do
18102 cat >conftest.$ac_ext <<_ACEOF 19341 cat >conftest.$ac_ext <<_ACEOF
@@ -18106,10 +19345,11 @@ cat confdefs.h >>conftest.$ac_ext
18106cat >>conftest.$ac_ext <<_ACEOF 19345cat >>conftest.$ac_ext <<_ACEOF
18107/* end confdefs.h. */ 19346/* end confdefs.h. */
18108$ac_includes_default 19347$ac_includes_default
19348 typedef long int ac__type_sizeof_;
18109int 19349int
18110main () 19350main ()
18111{ 19351{
18112static int test_array [1 - 2 * !(((long) (sizeof (long int))) <= $ac_mid)]; 19352static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
18113test_array [0] = 0 19353test_array [0] = 0
18114 19354
18115 ; 19355 ;
@@ -18117,56 +19357,53 @@ test_array [0] = 0
18117} 19357}
18118_ACEOF 19358_ACEOF
18119rm -f conftest.$ac_objext 19359rm -f conftest.$ac_objext
18120if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 19360if { (ac_try="$ac_compile"
18121 (eval $ac_compile) 2>conftest.er1 19361case "(($ac_try" in
19362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19363 *) ac_try_echo=$ac_try;;
19364esac
19365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19366 (eval "$ac_compile") 2>conftest.er1
18122 ac_status=$? 19367 ac_status=$?
18123 grep -v '^ *+' conftest.er1 >conftest.err 19368 grep -v '^ *+' conftest.er1 >conftest.err
18124 rm -f conftest.er1 19369 rm -f conftest.er1
18125 cat conftest.err >&5 19370 cat conftest.err >&5
18126 echo "$as_me:$LINENO: \$? = $ac_status" >&5 19371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18127 (exit $ac_status); } && 19372 (exit $ac_status); } && {
18128 { ac_try='test -z "$ac_c_werror_flag" 19373 test -z "$ac_c_werror_flag" ||
18129 || test ! -s conftest.err' 19374 test ! -s conftest.err
18130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 19375 } && test -s conftest.$ac_objext; then
18131 (eval $ac_try) 2>&5
18132 ac_status=$?
18133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18134 (exit $ac_status); }; } &&
18135 { ac_try='test -s conftest.$ac_objext'
18136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18137 (eval $ac_try) 2>&5
18138 ac_status=$?
18139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18140 (exit $ac_status); }; }; then
18141 ac_hi=$ac_mid; break 19376 ac_hi=$ac_mid; break
18142else 19377else
18143 echo "$as_me: failed program was:" >&5 19378 echo "$as_me: failed program was:" >&5
18144sed 's/^/| /' conftest.$ac_ext >&5 19379sed 's/^/| /' conftest.$ac_ext >&5
18145 19380
18146ac_lo=`expr $ac_mid + 1` 19381 ac_lo=`expr $ac_mid + 1`
18147 if test $ac_lo -le $ac_mid; then 19382 if test $ac_lo -le $ac_mid; then
18148 ac_lo= ac_hi= 19383 ac_lo= ac_hi=
18149 break 19384 break
18150 fi 19385 fi
18151 ac_mid=`expr 2 '*' $ac_mid + 1` 19386 ac_mid=`expr 2 '*' $ac_mid + 1`
18152fi 19387fi
18153rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 19388
19389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18154 done 19390 done
18155else 19391else
18156 echo "$as_me: failed program was:" >&5 19392 echo "$as_me: failed program was:" >&5
18157sed 's/^/| /' conftest.$ac_ext >&5 19393sed 's/^/| /' conftest.$ac_ext >&5
18158 19394
18159cat >conftest.$ac_ext <<_ACEOF 19395 cat >conftest.$ac_ext <<_ACEOF
18160/* confdefs.h. */ 19396/* confdefs.h. */
18161_ACEOF 19397_ACEOF
18162cat confdefs.h >>conftest.$ac_ext 19398cat confdefs.h >>conftest.$ac_ext
18163cat >>conftest.$ac_ext <<_ACEOF 19399cat >>conftest.$ac_ext <<_ACEOF
18164/* end confdefs.h. */ 19400/* end confdefs.h. */
18165$ac_includes_default 19401$ac_includes_default
19402 typedef long int ac__type_sizeof_;
18166int 19403int
18167main () 19404main ()
18168{ 19405{
18169static int test_array [1 - 2 * !(((long) (sizeof (long int))) < 0)]; 19406static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
18170test_array [0] = 0 19407test_array [0] = 0
18171 19408
18172 ; 19409 ;
@@ -18174,27 +19411,22 @@ test_array [0] = 0
18174} 19411}
18175_ACEOF 19412_ACEOF
18176rm -f conftest.$ac_objext 19413rm -f conftest.$ac_objext
18177if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 19414if { (ac_try="$ac_compile"
18178 (eval $ac_compile) 2>conftest.er1 19415case "(($ac_try" in
19416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19417 *) ac_try_echo=$ac_try;;
19418esac
19419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19420 (eval "$ac_compile") 2>conftest.er1
18179 ac_status=$? 19421 ac_status=$?
18180 grep -v '^ *+' conftest.er1 >conftest.err 19422 grep -v '^ *+' conftest.er1 >conftest.err
18181 rm -f conftest.er1 19423 rm -f conftest.er1
18182 cat conftest.err >&5 19424 cat conftest.err >&5
18183 echo "$as_me:$LINENO: \$? = $ac_status" >&5 19425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18184 (exit $ac_status); } && 19426 (exit $ac_status); } && {
18185 { ac_try='test -z "$ac_c_werror_flag" 19427 test -z "$ac_c_werror_flag" ||
18186 || test ! -s conftest.err' 19428 test ! -s conftest.err
18187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 19429 } && test -s conftest.$ac_objext; then
18188 (eval $ac_try) 2>&5
18189 ac_status=$?
18190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18191 (exit $ac_status); }; } &&
18192 { ac_try='test -s conftest.$ac_objext'
18193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18194 (eval $ac_try) 2>&5
18195 ac_status=$?
18196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18197 (exit $ac_status); }; }; then
18198 ac_hi=-1 ac_mid=-1 19430 ac_hi=-1 ac_mid=-1
18199 while :; do 19431 while :; do
18200 cat >conftest.$ac_ext <<_ACEOF 19432 cat >conftest.$ac_ext <<_ACEOF
@@ -18204,10 +19436,11 @@ cat confdefs.h >>conftest.$ac_ext
18204cat >>conftest.$ac_ext <<_ACEOF 19436cat >>conftest.$ac_ext <<_ACEOF
18205/* end confdefs.h. */ 19437/* end confdefs.h. */
18206$ac_includes_default 19438$ac_includes_default
19439 typedef long int ac__type_sizeof_;
18207int 19440int
18208main () 19441main ()
18209{ 19442{
18210static int test_array [1 - 2 * !(((long) (sizeof (long int))) >= $ac_mid)]; 19443static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
18211test_array [0] = 0 19444test_array [0] = 0
18212 19445
18213 ; 19446 ;
@@ -18215,50 +19448,48 @@ test_array [0] = 0
18215} 19448}
18216_ACEOF 19449_ACEOF
18217rm -f conftest.$ac_objext 19450rm -f conftest.$ac_objext
18218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 19451if { (ac_try="$ac_compile"
18219 (eval $ac_compile) 2>conftest.er1 19452case "(($ac_try" in
19453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19454 *) ac_try_echo=$ac_try;;
19455esac
19456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19457 (eval "$ac_compile") 2>conftest.er1
18220 ac_status=$? 19458 ac_status=$?
18221 grep -v '^ *+' conftest.er1 >conftest.err 19459 grep -v '^ *+' conftest.er1 >conftest.err
18222 rm -f conftest.er1 19460 rm -f conftest.er1
18223 cat conftest.err >&5 19461 cat conftest.err >&5
18224 echo "$as_me:$LINENO: \$? = $ac_status" >&5 19462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18225 (exit $ac_status); } && 19463 (exit $ac_status); } && {
18226 { ac_try='test -z "$ac_c_werror_flag" 19464 test -z "$ac_c_werror_flag" ||
18227 || test ! -s conftest.err' 19465 test ! -s conftest.err
18228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 19466 } && test -s conftest.$ac_objext; then
18229 (eval $ac_try) 2>&5
18230 ac_status=$?
18231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18232 (exit $ac_status); }; } &&
18233 { ac_try='test -s conftest.$ac_objext'
18234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18235 (eval $ac_try) 2>&5
18236 ac_status=$?
18237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18238 (exit $ac_status); }; }; then
18239 ac_lo=$ac_mid; break 19467 ac_lo=$ac_mid; break
18240else 19468else
18241 echo "$as_me: failed program was:" >&5 19469 echo "$as_me: failed program was:" >&5
18242sed 's/^/| /' conftest.$ac_ext >&5 19470sed 's/^/| /' conftest.$ac_ext >&5
18243 19471
18244ac_hi=`expr '(' $ac_mid ')' - 1` 19472 ac_hi=`expr '(' $ac_mid ')' - 1`
18245 if test $ac_mid -le $ac_hi; then 19473 if test $ac_mid -le $ac_hi; then
18246 ac_lo= ac_hi= 19474 ac_lo= ac_hi=
18247 break 19475 break
18248 fi 19476 fi
18249 ac_mid=`expr 2 '*' $ac_mid` 19477 ac_mid=`expr 2 '*' $ac_mid`
18250fi 19478fi
18251rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 19479
19480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18252 done 19481 done
18253else 19482else
18254 echo "$as_me: failed program was:" >&5 19483 echo "$as_me: failed program was:" >&5
18255sed 's/^/| /' conftest.$ac_ext >&5 19484sed 's/^/| /' conftest.$ac_ext >&5
18256 19485
18257ac_lo= ac_hi= 19486 ac_lo= ac_hi=
18258fi 19487fi
18259rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 19488
19489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18260fi 19490fi
18261rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 19491
19492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18262# Binary search between lo and hi bounds. 19493# Binary search between lo and hi bounds.
18263while test "x$ac_lo" != "x$ac_hi"; do 19494while test "x$ac_lo" != "x$ac_hi"; do
18264 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` 19495 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
@@ -18269,10 +19500,11 @@ cat confdefs.h >>conftest.$ac_ext
18269cat >>conftest.$ac_ext <<_ACEOF 19500cat >>conftest.$ac_ext <<_ACEOF
18270/* end confdefs.h. */ 19501/* end confdefs.h. */
18271$ac_includes_default 19502$ac_includes_default
19503 typedef long int ac__type_sizeof_;
18272int 19504int
18273main () 19505main ()
18274{ 19506{
18275static int test_array [1 - 2 * !(((long) (sizeof (long int))) <= $ac_mid)]; 19507static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
18276test_array [0] = 0 19508test_array [0] = 0
18277 19509
18278 ; 19510 ;
@@ -18280,52 +19512,45 @@ test_array [0] = 0
18280} 19512}
18281_ACEOF 19513_ACEOF
18282rm -f conftest.$ac_objext 19514rm -f conftest.$ac_objext
18283if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 19515if { (ac_try="$ac_compile"
18284 (eval $ac_compile) 2>conftest.er1 19516case "(($ac_try" in
19517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19518 *) ac_try_echo=$ac_try;;
19519esac
19520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19521 (eval "$ac_compile") 2>conftest.er1
18285 ac_status=$? 19522 ac_status=$?
18286 grep -v '^ *+' conftest.er1 >conftest.err 19523 grep -v '^ *+' conftest.er1 >conftest.err
18287 rm -f conftest.er1 19524 rm -f conftest.er1
18288 cat conftest.err >&5 19525 cat conftest.err >&5
18289 echo "$as_me:$LINENO: \$? = $ac_status" >&5 19526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18290 (exit $ac_status); } && 19527 (exit $ac_status); } && {
18291 { ac_try='test -z "$ac_c_werror_flag" 19528 test -z "$ac_c_werror_flag" ||
18292 || test ! -s conftest.err' 19529 test ! -s conftest.err
18293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 19530 } && test -s conftest.$ac_objext; then
18294 (eval $ac_try) 2>&5
18295 ac_status=$?
18296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18297 (exit $ac_status); }; } &&
18298 { ac_try='test -s conftest.$ac_objext'
18299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18300 (eval $ac_try) 2>&5
18301 ac_status=$?
18302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18303 (exit $ac_status); }; }; then
18304 ac_hi=$ac_mid 19531 ac_hi=$ac_mid
18305else 19532else
18306 echo "$as_me: failed program was:" >&5 19533 echo "$as_me: failed program was:" >&5
18307sed 's/^/| /' conftest.$ac_ext >&5 19534sed 's/^/| /' conftest.$ac_ext >&5
18308 19535
18309ac_lo=`expr '(' $ac_mid ')' + 1` 19536 ac_lo=`expr '(' $ac_mid ')' + 1`
18310fi 19537fi
18311rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 19538
19539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18312done 19540done
18313case $ac_lo in 19541case $ac_lo in
18314?*) ac_cv_sizeof_long_int=$ac_lo;; 19542?*) ac_cv_sizeof_long_int=$ac_lo;;
18315'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int), 77 19543'') if test "$ac_cv_type_long_int" = yes; then
19544 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int)
18316See \`config.log' for more details." >&5 19545See \`config.log' for more details." >&5
18317echo "$as_me: error: cannot compute sizeof (long int), 77 19546echo "$as_me: error: cannot compute sizeof (long int)
18318See \`config.log' for more details." >&2;} 19547See \`config.log' for more details." >&2;}
18319 { (exit 1); exit 1; }; } ;; 19548 { (exit 77); exit 77; }; }
19549 else
19550 ac_cv_sizeof_long_int=0
19551 fi ;;
18320esac 19552esac
18321else 19553else
18322 if test "$cross_compiling" = yes; then
18323 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18324See \`config.log' for more details." >&5
18325echo "$as_me: error: cannot run test program while cross compiling
18326See \`config.log' for more details." >&2;}
18327 { (exit 1); exit 1; }; }
18328else
18329 cat >conftest.$ac_ext <<_ACEOF 19554 cat >conftest.$ac_ext <<_ACEOF
18330/* confdefs.h. */ 19555/* confdefs.h. */
18331_ACEOF 19556_ACEOF
@@ -18333,8 +19558,9 @@ cat confdefs.h >>conftest.$ac_ext
18333cat >>conftest.$ac_ext <<_ACEOF 19558cat >>conftest.$ac_ext <<_ACEOF
18334/* end confdefs.h. */ 19559/* end confdefs.h. */
18335$ac_includes_default 19560$ac_includes_default
18336long longval () { return (long) (sizeof (long int)); } 19561 typedef long int ac__type_sizeof_;
18337unsigned long ulongval () { return (long) (sizeof (long int)); } 19562static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
19563static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
18338#include <stdio.h> 19564#include <stdio.h>
18339#include <stdlib.h> 19565#include <stdlib.h>
18340int 19566int
@@ -18343,35 +19569,44 @@ main ()
18343 19569
18344 FILE *f = fopen ("conftest.val", "w"); 19570 FILE *f = fopen ("conftest.val", "w");
18345 if (! f) 19571 if (! f)
18346 exit (1); 19572 return 1;
18347 if (((long) (sizeof (long int))) < 0) 19573 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
18348 { 19574 {
18349 long i = longval (); 19575 long int i = longval ();
18350 if (i != ((long) (sizeof (long int)))) 19576 if (i != ((long int) (sizeof (ac__type_sizeof_))))
18351 exit (1); 19577 return 1;
18352 fprintf (f, "%ld\n", i); 19578 fprintf (f, "%ld\n", i);
18353 } 19579 }
18354 else 19580 else
18355 { 19581 {
18356 unsigned long i = ulongval (); 19582 unsigned long int i = ulongval ();
18357 if (i != ((long) (sizeof (long int)))) 19583 if (i != ((long int) (sizeof (ac__type_sizeof_))))
18358 exit (1); 19584 return 1;
18359 fprintf (f, "%lu\n", i); 19585 fprintf (f, "%lu\n", i);
18360 } 19586 }
18361 exit (ferror (f) || fclose (f) != 0); 19587 return ferror (f) || fclose (f) != 0;
18362 19588
18363 ; 19589 ;
18364 return 0; 19590 return 0;
18365} 19591}
18366_ACEOF 19592_ACEOF
18367rm -f conftest$ac_exeext 19593rm -f conftest$ac_exeext
18368if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 19594if { (ac_try="$ac_link"
18369 (eval $ac_link) 2>&5 19595case "(($ac_try" in
19596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19597 *) ac_try_echo=$ac_try;;
19598esac
19599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19600 (eval "$ac_link") 2>&5
18370 ac_status=$? 19601 ac_status=$?
18371 echo "$as_me:$LINENO: \$? = $ac_status" >&5 19602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18372 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 19603 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 19604 { (case "(($ac_try" in
18374 (eval $ac_try) 2>&5 19605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19606 *) ac_try_echo=$ac_try;;
19607esac
19608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19609 (eval "$ac_try") 2>&5
18375 ac_status=$? 19610 ac_status=$?
18376 echo "$as_me:$LINENO: \$? = $ac_status" >&5 19611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18377 (exit $ac_status); }; }; then 19612 (exit $ac_status); }; }; then
@@ -18382,29 +19617,32 @@ echo "$as_me: failed program was:" >&5
18382sed 's/^/| /' conftest.$ac_ext >&5 19617sed 's/^/| /' conftest.$ac_ext >&5
18383 19618
18384( exit $ac_status ) 19619( exit $ac_status )
18385{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long int), 77 19620if test "$ac_cv_type_long_int" = yes; then
19621 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int)
18386See \`config.log' for more details." >&5 19622See \`config.log' for more details." >&5
18387echo "$as_me: error: cannot compute sizeof (long int), 77 19623echo "$as_me: error: cannot compute sizeof (long int)
18388See \`config.log' for more details." >&2;} 19624See \`config.log' for more details." >&2;}
18389 { (exit 1); exit 1; }; } 19625 { (exit 77); exit 77; }; }
18390fi 19626 else
18391rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 19627 ac_cv_sizeof_long_int=0
19628 fi
18392fi 19629fi
19630rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18393fi 19631fi
18394rm -f conftest.val 19632rm -f conftest.val
18395else
18396 ac_cv_sizeof_long_int=0
18397fi
18398fi 19633fi
18399echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5 19634{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5
18400echo "${ECHO_T}$ac_cv_sizeof_long_int" >&6 19635echo "${ECHO_T}$ac_cv_sizeof_long_int" >&6; }
19636
19637
19638
18401cat >>confdefs.h <<_ACEOF 19639cat >>confdefs.h <<_ACEOF
18402#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int 19640#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
18403_ACEOF 19641_ACEOF
18404 19642
18405 19643
18406echo "$as_me:$LINENO: checking for long long int" >&5 19644{ echo "$as_me:$LINENO: checking for long long int" >&5
18407echo $ECHO_N "checking for long long int... $ECHO_C" >&6 19645echo $ECHO_N "checking for long long int... $ECHO_C" >&6; }
18408if test "${ac_cv_type_long_long_int+set}" = set; then 19646if test "${ac_cv_type_long_long_int+set}" = set; then
18409 echo $ECHO_N "(cached) $ECHO_C" >&6 19647 echo $ECHO_N "(cached) $ECHO_C" >&6
18410else 19648else
@@ -18415,61 +19653,57 @@ cat confdefs.h >>conftest.$ac_ext
18415cat >>conftest.$ac_ext <<_ACEOF 19653cat >>conftest.$ac_ext <<_ACEOF
18416/* end confdefs.h. */ 19654/* end confdefs.h. */
18417$ac_includes_default 19655$ac_includes_default
19656typedef long long int ac__type_new_;
18418int 19657int
18419main () 19658main ()
18420{ 19659{
18421if ((long long int *) 0) 19660if ((ac__type_new_ *) 0)
18422 return 0; 19661 return 0;
18423if (sizeof (long long int)) 19662if (sizeof (ac__type_new_))
18424 return 0; 19663 return 0;
18425 ; 19664 ;
18426 return 0; 19665 return 0;
18427} 19666}
18428_ACEOF 19667_ACEOF
18429rm -f conftest.$ac_objext 19668rm -f conftest.$ac_objext
18430if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 19669if { (ac_try="$ac_compile"
18431 (eval $ac_compile) 2>conftest.er1 19670case "(($ac_try" in
19671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19672 *) ac_try_echo=$ac_try;;
19673esac
19674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19675 (eval "$ac_compile") 2>conftest.er1
18432 ac_status=$? 19676 ac_status=$?
18433 grep -v '^ *+' conftest.er1 >conftest.err 19677 grep -v '^ *+' conftest.er1 >conftest.err
18434 rm -f conftest.er1 19678 rm -f conftest.er1
18435 cat conftest.err >&5 19679 cat conftest.err >&5
18436 echo "$as_me:$LINENO: \$? = $ac_status" >&5 19680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18437 (exit $ac_status); } && 19681 (exit $ac_status); } && {
18438 { ac_try='test -z "$ac_c_werror_flag" 19682 test -z "$ac_c_werror_flag" ||
18439 || test ! -s conftest.err' 19683 test ! -s conftest.err
18440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 19684 } && test -s conftest.$ac_objext; then
18441 (eval $ac_try) 2>&5
18442 ac_status=$?
18443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18444 (exit $ac_status); }; } &&
18445 { ac_try='test -s conftest.$ac_objext'
18446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18447 (eval $ac_try) 2>&5
18448 ac_status=$?
18449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18450 (exit $ac_status); }; }; then
18451 ac_cv_type_long_long_int=yes 19685 ac_cv_type_long_long_int=yes
18452else 19686else
18453 echo "$as_me: failed program was:" >&5 19687 echo "$as_me: failed program was:" >&5
18454sed 's/^/| /' conftest.$ac_ext >&5 19688sed 's/^/| /' conftest.$ac_ext >&5
18455 19689
18456ac_cv_type_long_long_int=no 19690 ac_cv_type_long_long_int=no
18457fi 19691fi
18458rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 19692
19693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18459fi 19694fi
18460echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5 19695{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
18461echo "${ECHO_T}$ac_cv_type_long_long_int" >&6 19696echo "${ECHO_T}$ac_cv_type_long_long_int" >&6; }
18462 19697
18463echo "$as_me:$LINENO: checking size of long long int" >&5 19698# The cast to long int works around a bug in the HP C Compiler
18464echo $ECHO_N "checking size of long long int... $ECHO_C" >&6 19699# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19700# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19701# This bug is HP SR number 8606223364.
19702{ echo "$as_me:$LINENO: checking size of long long int" >&5
19703echo $ECHO_N "checking size of long long int... $ECHO_C" >&6; }
18465if test "${ac_cv_sizeof_long_long_int+set}" = set; then 19704if test "${ac_cv_sizeof_long_long_int+set}" = set; then
18466 echo $ECHO_N "(cached) $ECHO_C" >&6 19705 echo $ECHO_N "(cached) $ECHO_C" >&6
18467else 19706else
18468 if test "$ac_cv_type_long_long_int" = yes; then
18469 # The cast to unsigned long works around a bug in the HP C Compiler
18470 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18471 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18472 # This bug is HP SR number 8606223364.
18473 if test "$cross_compiling" = yes; then 19707 if test "$cross_compiling" = yes; then
18474 # Depending upon the size, compute the lo and hi bounds. 19708 # Depending upon the size, compute the lo and hi bounds.
18475cat >conftest.$ac_ext <<_ACEOF 19709cat >conftest.$ac_ext <<_ACEOF
@@ -18479,10 +19713,11 @@ cat confdefs.h >>conftest.$ac_ext
18479cat >>conftest.$ac_ext <<_ACEOF 19713cat >>conftest.$ac_ext <<_ACEOF
18480/* end confdefs.h. */ 19714/* end confdefs.h. */
18481$ac_includes_default 19715$ac_includes_default
19716 typedef long long int ac__type_sizeof_;
18482int 19717int
18483main () 19718main ()
18484{ 19719{
18485static int test_array [1 - 2 * !(((long) (sizeof (long long int))) >= 0)]; 19720static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
18486test_array [0] = 0 19721test_array [0] = 0
18487 19722
18488 ; 19723 ;
@@ -18490,27 +19725,22 @@ test_array [0] = 0
18490} 19725}
18491_ACEOF 19726_ACEOF
18492rm -f conftest.$ac_objext 19727rm -f conftest.$ac_objext
18493if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 19728if { (ac_try="$ac_compile"
18494 (eval $ac_compile) 2>conftest.er1 19729case "(($ac_try" in
19730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19731 *) ac_try_echo=$ac_try;;
19732esac
19733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19734 (eval "$ac_compile") 2>conftest.er1
18495 ac_status=$? 19735 ac_status=$?
18496 grep -v '^ *+' conftest.er1 >conftest.err 19736 grep -v '^ *+' conftest.er1 >conftest.err
18497 rm -f conftest.er1 19737 rm -f conftest.er1
18498 cat conftest.err >&5 19738 cat conftest.err >&5
18499 echo "$as_me:$LINENO: \$? = $ac_status" >&5 19739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18500 (exit $ac_status); } && 19740 (exit $ac_status); } && {
18501 { ac_try='test -z "$ac_c_werror_flag" 19741 test -z "$ac_c_werror_flag" ||
18502 || test ! -s conftest.err' 19742 test ! -s conftest.err
18503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 19743 } && test -s conftest.$ac_objext; then
18504 (eval $ac_try) 2>&5
18505 ac_status=$?
18506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18507 (exit $ac_status); }; } &&
18508 { ac_try='test -s conftest.$ac_objext'
18509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18510 (eval $ac_try) 2>&5
18511 ac_status=$?
18512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18513 (exit $ac_status); }; }; then
18514 ac_lo=0 ac_mid=0 19744 ac_lo=0 ac_mid=0
18515 while :; do 19745 while :; do
18516 cat >conftest.$ac_ext <<_ACEOF 19746 cat >conftest.$ac_ext <<_ACEOF
@@ -18520,10 +19750,11 @@ cat confdefs.h >>conftest.$ac_ext
18520cat >>conftest.$ac_ext <<_ACEOF 19750cat >>conftest.$ac_ext <<_ACEOF
18521/* end confdefs.h. */ 19751/* end confdefs.h. */
18522$ac_includes_default 19752$ac_includes_default
19753 typedef long long int ac__type_sizeof_;
18523int 19754int
18524main () 19755main ()
18525{ 19756{
18526static int test_array [1 - 2 * !(((long) (sizeof (long long int))) <= $ac_mid)]; 19757static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
18527test_array [0] = 0 19758test_array [0] = 0
18528 19759
18529 ; 19760 ;
@@ -18531,56 +19762,53 @@ test_array [0] = 0
18531} 19762}
18532_ACEOF 19763_ACEOF
18533rm -f conftest.$ac_objext 19764rm -f conftest.$ac_objext
18534if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 19765if { (ac_try="$ac_compile"
18535 (eval $ac_compile) 2>conftest.er1 19766case "(($ac_try" in
19767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19768 *) ac_try_echo=$ac_try;;
19769esac
19770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19771 (eval "$ac_compile") 2>conftest.er1
18536 ac_status=$? 19772 ac_status=$?
18537 grep -v '^ *+' conftest.er1 >conftest.err 19773 grep -v '^ *+' conftest.er1 >conftest.err
18538 rm -f conftest.er1 19774 rm -f conftest.er1
18539 cat conftest.err >&5 19775 cat conftest.err >&5
18540 echo "$as_me:$LINENO: \$? = $ac_status" >&5 19776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18541 (exit $ac_status); } && 19777 (exit $ac_status); } && {
18542 { ac_try='test -z "$ac_c_werror_flag" 19778 test -z "$ac_c_werror_flag" ||
18543 || test ! -s conftest.err' 19779 test ! -s conftest.err
18544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 19780 } && test -s conftest.$ac_objext; then
18545 (eval $ac_try) 2>&5
18546 ac_status=$?
18547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18548 (exit $ac_status); }; } &&
18549 { ac_try='test -s conftest.$ac_objext'
18550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18551 (eval $ac_try) 2>&5
18552 ac_status=$?
18553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18554 (exit $ac_status); }; }; then
18555 ac_hi=$ac_mid; break 19781 ac_hi=$ac_mid; break
18556else 19782else
18557 echo "$as_me: failed program was:" >&5 19783 echo "$as_me: failed program was:" >&5
18558sed 's/^/| /' conftest.$ac_ext >&5 19784sed 's/^/| /' conftest.$ac_ext >&5
18559 19785
18560ac_lo=`expr $ac_mid + 1` 19786 ac_lo=`expr $ac_mid + 1`
18561 if test $ac_lo -le $ac_mid; then 19787 if test $ac_lo -le $ac_mid; then
18562 ac_lo= ac_hi= 19788 ac_lo= ac_hi=
18563 break 19789 break
18564 fi 19790 fi
18565 ac_mid=`expr 2 '*' $ac_mid + 1` 19791 ac_mid=`expr 2 '*' $ac_mid + 1`
18566fi 19792fi
18567rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 19793
19794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18568 done 19795 done
18569else 19796else
18570 echo "$as_me: failed program was:" >&5 19797 echo "$as_me: failed program was:" >&5
18571sed 's/^/| /' conftest.$ac_ext >&5 19798sed 's/^/| /' conftest.$ac_ext >&5
18572 19799
18573cat >conftest.$ac_ext <<_ACEOF 19800 cat >conftest.$ac_ext <<_ACEOF
18574/* confdefs.h. */ 19801/* confdefs.h. */
18575_ACEOF 19802_ACEOF
18576cat confdefs.h >>conftest.$ac_ext 19803cat confdefs.h >>conftest.$ac_ext
18577cat >>conftest.$ac_ext <<_ACEOF 19804cat >>conftest.$ac_ext <<_ACEOF
18578/* end confdefs.h. */ 19805/* end confdefs.h. */
18579$ac_includes_default 19806$ac_includes_default
19807 typedef long long int ac__type_sizeof_;
18580int 19808int
18581main () 19809main ()
18582{ 19810{
18583static int test_array [1 - 2 * !(((long) (sizeof (long long int))) < 0)]; 19811static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
18584test_array [0] = 0 19812test_array [0] = 0
18585 19813
18586 ; 19814 ;
@@ -18588,27 +19816,22 @@ test_array [0] = 0
18588} 19816}
18589_ACEOF 19817_ACEOF
18590rm -f conftest.$ac_objext 19818rm -f conftest.$ac_objext
18591if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 19819if { (ac_try="$ac_compile"
18592 (eval $ac_compile) 2>conftest.er1 19820case "(($ac_try" in
19821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19822 *) ac_try_echo=$ac_try;;
19823esac
19824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19825 (eval "$ac_compile") 2>conftest.er1
18593 ac_status=$? 19826 ac_status=$?
18594 grep -v '^ *+' conftest.er1 >conftest.err 19827 grep -v '^ *+' conftest.er1 >conftest.err
18595 rm -f conftest.er1 19828 rm -f conftest.er1
18596 cat conftest.err >&5 19829 cat conftest.err >&5
18597 echo "$as_me:$LINENO: \$? = $ac_status" >&5 19830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18598 (exit $ac_status); } && 19831 (exit $ac_status); } && {
18599 { ac_try='test -z "$ac_c_werror_flag" 19832 test -z "$ac_c_werror_flag" ||
18600 || test ! -s conftest.err' 19833 test ! -s conftest.err
18601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 19834 } && test -s conftest.$ac_objext; then
18602 (eval $ac_try) 2>&5
18603 ac_status=$?
18604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18605 (exit $ac_status); }; } &&
18606 { ac_try='test -s conftest.$ac_objext'
18607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18608 (eval $ac_try) 2>&5
18609 ac_status=$?
18610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18611 (exit $ac_status); }; }; then
18612 ac_hi=-1 ac_mid=-1 19835 ac_hi=-1 ac_mid=-1
18613 while :; do 19836 while :; do
18614 cat >conftest.$ac_ext <<_ACEOF 19837 cat >conftest.$ac_ext <<_ACEOF
@@ -18618,10 +19841,11 @@ cat confdefs.h >>conftest.$ac_ext
18618cat >>conftest.$ac_ext <<_ACEOF 19841cat >>conftest.$ac_ext <<_ACEOF
18619/* end confdefs.h. */ 19842/* end confdefs.h. */
18620$ac_includes_default 19843$ac_includes_default
19844 typedef long long int ac__type_sizeof_;
18621int 19845int
18622main () 19846main ()
18623{ 19847{
18624static int test_array [1 - 2 * !(((long) (sizeof (long long int))) >= $ac_mid)]; 19848static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
18625test_array [0] = 0 19849test_array [0] = 0
18626 19850
18627 ; 19851 ;
@@ -18629,50 +19853,48 @@ test_array [0] = 0
18629} 19853}
18630_ACEOF 19854_ACEOF
18631rm -f conftest.$ac_objext 19855rm -f conftest.$ac_objext
18632if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 19856if { (ac_try="$ac_compile"
18633 (eval $ac_compile) 2>conftest.er1 19857case "(($ac_try" in
19858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19859 *) ac_try_echo=$ac_try;;
19860esac
19861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19862 (eval "$ac_compile") 2>conftest.er1
18634 ac_status=$? 19863 ac_status=$?
18635 grep -v '^ *+' conftest.er1 >conftest.err 19864 grep -v '^ *+' conftest.er1 >conftest.err
18636 rm -f conftest.er1 19865 rm -f conftest.er1
18637 cat conftest.err >&5 19866 cat conftest.err >&5
18638 echo "$as_me:$LINENO: \$? = $ac_status" >&5 19867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18639 (exit $ac_status); } && 19868 (exit $ac_status); } && {
18640 { ac_try='test -z "$ac_c_werror_flag" 19869 test -z "$ac_c_werror_flag" ||
18641 || test ! -s conftest.err' 19870 test ! -s conftest.err
18642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 19871 } && test -s conftest.$ac_objext; then
18643 (eval $ac_try) 2>&5
18644 ac_status=$?
18645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18646 (exit $ac_status); }; } &&
18647 { ac_try='test -s conftest.$ac_objext'
18648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18649 (eval $ac_try) 2>&5
18650 ac_status=$?
18651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18652 (exit $ac_status); }; }; then
18653 ac_lo=$ac_mid; break 19872 ac_lo=$ac_mid; break
18654else 19873else
18655 echo "$as_me: failed program was:" >&5 19874 echo "$as_me: failed program was:" >&5
18656sed 's/^/| /' conftest.$ac_ext >&5 19875sed 's/^/| /' conftest.$ac_ext >&5
18657 19876
18658ac_hi=`expr '(' $ac_mid ')' - 1` 19877 ac_hi=`expr '(' $ac_mid ')' - 1`
18659 if test $ac_mid -le $ac_hi; then 19878 if test $ac_mid -le $ac_hi; then
18660 ac_lo= ac_hi= 19879 ac_lo= ac_hi=
18661 break 19880 break
18662 fi 19881 fi
18663 ac_mid=`expr 2 '*' $ac_mid` 19882 ac_mid=`expr 2 '*' $ac_mid`
18664fi 19883fi
18665rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 19884
19885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18666 done 19886 done
18667else 19887else
18668 echo "$as_me: failed program was:" >&5 19888 echo "$as_me: failed program was:" >&5
18669sed 's/^/| /' conftest.$ac_ext >&5 19889sed 's/^/| /' conftest.$ac_ext >&5
18670 19890
18671ac_lo= ac_hi= 19891 ac_lo= ac_hi=
18672fi 19892fi
18673rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 19893
19894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18674fi 19895fi
18675rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 19896
19897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18676# Binary search between lo and hi bounds. 19898# Binary search between lo and hi bounds.
18677while test "x$ac_lo" != "x$ac_hi"; do 19899while test "x$ac_lo" != "x$ac_hi"; do
18678 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` 19900 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
@@ -18683,10 +19905,11 @@ cat confdefs.h >>conftest.$ac_ext
18683cat >>conftest.$ac_ext <<_ACEOF 19905cat >>conftest.$ac_ext <<_ACEOF
18684/* end confdefs.h. */ 19906/* end confdefs.h. */
18685$ac_includes_default 19907$ac_includes_default
19908 typedef long long int ac__type_sizeof_;
18686int 19909int
18687main () 19910main ()
18688{ 19911{
18689static int test_array [1 - 2 * !(((long) (sizeof (long long int))) <= $ac_mid)]; 19912static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
18690test_array [0] = 0 19913test_array [0] = 0
18691 19914
18692 ; 19915 ;
@@ -18694,52 +19917,45 @@ test_array [0] = 0
18694} 19917}
18695_ACEOF 19918_ACEOF
18696rm -f conftest.$ac_objext 19919rm -f conftest.$ac_objext
18697if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 19920if { (ac_try="$ac_compile"
18698 (eval $ac_compile) 2>conftest.er1 19921case "(($ac_try" in
19922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19923 *) ac_try_echo=$ac_try;;
19924esac
19925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19926 (eval "$ac_compile") 2>conftest.er1
18699 ac_status=$? 19927 ac_status=$?
18700 grep -v '^ *+' conftest.er1 >conftest.err 19928 grep -v '^ *+' conftest.er1 >conftest.err
18701 rm -f conftest.er1 19929 rm -f conftest.er1
18702 cat conftest.err >&5 19930 cat conftest.err >&5
18703 echo "$as_me:$LINENO: \$? = $ac_status" >&5 19931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18704 (exit $ac_status); } && 19932 (exit $ac_status); } && {
18705 { ac_try='test -z "$ac_c_werror_flag" 19933 test -z "$ac_c_werror_flag" ||
18706 || test ! -s conftest.err' 19934 test ! -s conftest.err
18707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 19935 } && test -s conftest.$ac_objext; then
18708 (eval $ac_try) 2>&5
18709 ac_status=$?
18710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18711 (exit $ac_status); }; } &&
18712 { ac_try='test -s conftest.$ac_objext'
18713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18714 (eval $ac_try) 2>&5
18715 ac_status=$?
18716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18717 (exit $ac_status); }; }; then
18718 ac_hi=$ac_mid 19936 ac_hi=$ac_mid
18719else 19937else
18720 echo "$as_me: failed program was:" >&5 19938 echo "$as_me: failed program was:" >&5
18721sed 's/^/| /' conftest.$ac_ext >&5 19939sed 's/^/| /' conftest.$ac_ext >&5
18722 19940
18723ac_lo=`expr '(' $ac_mid ')' + 1` 19941 ac_lo=`expr '(' $ac_mid ')' + 1`
18724fi 19942fi
18725rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 19943
19944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18726done 19945done
18727case $ac_lo in 19946case $ac_lo in
18728?*) ac_cv_sizeof_long_long_int=$ac_lo;; 19947?*) ac_cv_sizeof_long_long_int=$ac_lo;;
18729'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int), 77 19948'') if test "$ac_cv_type_long_long_int" = yes; then
19949 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int)
18730See \`config.log' for more details." >&5 19950See \`config.log' for more details." >&5
18731echo "$as_me: error: cannot compute sizeof (long long int), 77 19951echo "$as_me: error: cannot compute sizeof (long long int)
18732See \`config.log' for more details." >&2;} 19952See \`config.log' for more details." >&2;}
18733 { (exit 1); exit 1; }; } ;; 19953 { (exit 77); exit 77; }; }
19954 else
19955 ac_cv_sizeof_long_long_int=0
19956 fi ;;
18734esac 19957esac
18735else 19958else
18736 if test "$cross_compiling" = yes; then
18737 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18738See \`config.log' for more details." >&5
18739echo "$as_me: error: cannot run test program while cross compiling
18740See \`config.log' for more details." >&2;}
18741 { (exit 1); exit 1; }; }
18742else
18743 cat >conftest.$ac_ext <<_ACEOF 19959 cat >conftest.$ac_ext <<_ACEOF
18744/* confdefs.h. */ 19960/* confdefs.h. */
18745_ACEOF 19961_ACEOF
@@ -18747,8 +19963,9 @@ cat confdefs.h >>conftest.$ac_ext
18747cat >>conftest.$ac_ext <<_ACEOF 19963cat >>conftest.$ac_ext <<_ACEOF
18748/* end confdefs.h. */ 19964/* end confdefs.h. */
18749$ac_includes_default 19965$ac_includes_default
18750long longval () { return (long) (sizeof (long long int)); } 19966 typedef long long int ac__type_sizeof_;
18751unsigned long ulongval () { return (long) (sizeof (long long int)); } 19967static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
19968static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
18752#include <stdio.h> 19969#include <stdio.h>
18753#include <stdlib.h> 19970#include <stdlib.h>
18754int 19971int
@@ -18757,35 +19974,44 @@ main ()
18757 19974
18758 FILE *f = fopen ("conftest.val", "w"); 19975 FILE *f = fopen ("conftest.val", "w");
18759 if (! f) 19976 if (! f)
18760 exit (1); 19977 return 1;
18761 if (((long) (sizeof (long long int))) < 0) 19978 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
18762 { 19979 {
18763 long i = longval (); 19980 long int i = longval ();
18764 if (i != ((long) (sizeof (long long int)))) 19981 if (i != ((long int) (sizeof (ac__type_sizeof_))))
18765 exit (1); 19982 return 1;
18766 fprintf (f, "%ld\n", i); 19983 fprintf (f, "%ld\n", i);
18767 } 19984 }
18768 else 19985 else
18769 { 19986 {
18770 unsigned long i = ulongval (); 19987 unsigned long int i = ulongval ();
18771 if (i != ((long) (sizeof (long long int)))) 19988 if (i != ((long int) (sizeof (ac__type_sizeof_))))
18772 exit (1); 19989 return 1;
18773 fprintf (f, "%lu\n", i); 19990 fprintf (f, "%lu\n", i);
18774 } 19991 }
18775 exit (ferror (f) || fclose (f) != 0); 19992 return ferror (f) || fclose (f) != 0;
18776 19993
18777 ; 19994 ;
18778 return 0; 19995 return 0;
18779} 19996}
18780_ACEOF 19997_ACEOF
18781rm -f conftest$ac_exeext 19998rm -f conftest$ac_exeext
18782if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 19999if { (ac_try="$ac_link"
18783 (eval $ac_link) 2>&5 20000case "(($ac_try" in
20001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20002 *) ac_try_echo=$ac_try;;
20003esac
20004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20005 (eval "$ac_link") 2>&5
18784 ac_status=$? 20006 ac_status=$?
18785 echo "$as_me:$LINENO: \$? = $ac_status" >&5 20007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18786 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 20008 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 20009 { (case "(($ac_try" in
18788 (eval $ac_try) 2>&5 20010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20011 *) ac_try_echo=$ac_try;;
20012esac
20013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20014 (eval "$ac_try") 2>&5
18789 ac_status=$? 20015 ac_status=$?
18790 echo "$as_me:$LINENO: \$? = $ac_status" >&5 20016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18791 (exit $ac_status); }; }; then 20017 (exit $ac_status); }; }; then
@@ -18796,22 +20022,25 @@ echo "$as_me: failed program was:" >&5
18796sed 's/^/| /' conftest.$ac_ext >&5 20022sed 's/^/| /' conftest.$ac_ext >&5
18797 20023
18798( exit $ac_status ) 20024( exit $ac_status )
18799{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int), 77 20025if test "$ac_cv_type_long_long_int" = yes; then
20026 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int)
18800See \`config.log' for more details." >&5 20027See \`config.log' for more details." >&5
18801echo "$as_me: error: cannot compute sizeof (long long int), 77 20028echo "$as_me: error: cannot compute sizeof (long long int)
18802See \`config.log' for more details." >&2;} 20029See \`config.log' for more details." >&2;}
18803 { (exit 1); exit 1; }; } 20030 { (exit 77); exit 77; }; }
18804fi 20031 else
18805rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 20032 ac_cv_sizeof_long_long_int=0
20033 fi
18806fi 20034fi
20035rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18807fi 20036fi
18808rm -f conftest.val 20037rm -f conftest.val
18809else
18810 ac_cv_sizeof_long_long_int=0
18811fi
18812fi 20038fi
18813echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long_int" >&5 20039{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long_int" >&5
18814echo "${ECHO_T}$ac_cv_sizeof_long_long_int" >&6 20040echo "${ECHO_T}$ac_cv_sizeof_long_long_int" >&6; }
20041
20042
20043
18815cat >>confdefs.h <<_ACEOF 20044cat >>confdefs.h <<_ACEOF
18816#define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int 20045#define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
18817_ACEOF 20046_ACEOF
@@ -18825,8 +20054,8 @@ fi
18825 20054
18826# compute LLONG_MIN and LLONG_MAX if we don't know them. 20055# compute LLONG_MIN and LLONG_MAX if we don't know them.
18827if test -z "$have_llong_max"; then 20056if test -z "$have_llong_max"; then
18828 echo "$as_me:$LINENO: checking for max value of long long" >&5 20057 { echo "$as_me:$LINENO: checking for max value of long long" >&5
18829echo $ECHO_N "checking for max value of long long... $ECHO_C" >&6 20058echo $ECHO_N "checking for max value of long long... $ECHO_C" >&6; }
18830 if test "$cross_compiling" = yes; then 20059 if test "$cross_compiling" = yes; then
18831 20060
18832 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5 20061 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5
@@ -18849,6 +20078,34 @@ cat >>conftest.$ac_ext <<_ACEOF
18849#define __USE_ISOC99 20078#define __USE_ISOC99
18850#include <limits.h> 20079#include <limits.h>
18851#define DATA "conftest.llminmax" 20080#define DATA "conftest.llminmax"
20081#define my_abs(a) ((a) < 0 ? ((a) * -1) : (a))
20082
20083/*
20084 * printf in libc on some platforms (eg old Tru64) does not understand %lld so
20085 * we do this the hard way.
20086 */
20087static int
20088fprint_ll(FILE *f, long long n)
20089{
20090 unsigned int i;
20091 int l[sizeof(long long) * 8];
20092
20093 if (n < 0)
20094 if (fprintf(f, "-") < 0)
20095 return -1;
20096 for (i = 0; n != 0; i++) {
20097 l[i] = my_abs(n % 10);
20098 n /= 10;
20099 }
20100 do {
20101 if (fprintf(f, "%d", l[--i]) < 0)
20102 return -1;
20103 } while (i != 0);
20104 if (fprintf(f, " ") < 0)
20105 return -1;
20106 return 0;
20107}
20108
18852int main(void) { 20109int main(void) {
18853 FILE *f; 20110 FILE *f;
18854 long long i, llmin, llmax = 0; 20111 long long i, llmin, llmax = 0;
@@ -18870,26 +20127,39 @@ int main(void) {
18870 20127
18871 /* Sanity check */ 20128 /* Sanity check */
18872 if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax 20129 if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax
18873 || llmax - 1 > llmax) { 20130 || llmax - 1 > llmax || llmin == llmax || llmin == 0
20131 || llmax == 0 || llmax < LONG_MAX || llmin > LONG_MIN) {
18874 fprintf(f, "unknown unknown\n"); 20132 fprintf(f, "unknown unknown\n");
18875 exit(2); 20133 exit(2);
18876 } 20134 }
18877 20135
18878 if (fprintf(f ,"%lld %lld", llmin, llmax) < 0) 20136 if (fprint_ll(f, llmin) < 0)
18879 exit(3); 20137 exit(3);
18880 20138 if (fprint_ll(f, llmax) < 0)
20139 exit(4);
20140 if (fclose(f) < 0)
20141 exit(5);
18881 exit(0); 20142 exit(0);
18882} 20143}
18883 20144
18884_ACEOF 20145_ACEOF
18885rm -f conftest$ac_exeext 20146rm -f conftest$ac_exeext
18886if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 20147if { (ac_try="$ac_link"
18887 (eval $ac_link) 2>&5 20148case "(($ac_try" in
20149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20150 *) ac_try_echo=$ac_try;;
20151esac
20152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20153 (eval "$ac_link") 2>&5
18888 ac_status=$? 20154 ac_status=$?
18889 echo "$as_me:$LINENO: \$? = $ac_status" >&5 20155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18890 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 20156 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 20157 { (case "(($ac_try" in
18892 (eval $ac_try) 2>&5 20158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20159 *) ac_try_echo=$ac_try;;
20160esac
20161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20162 (eval "$ac_try") 2>&5
18893 ac_status=$? 20163 ac_status=$?
18894 echo "$as_me:$LINENO: \$? = $ac_status" >&5 20164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18895 (exit $ac_status); }; }; then 20165 (exit $ac_status); }; }; then
@@ -18897,28 +20167,17 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18897 llong_min=`$AWK '{print $1}' conftest.llminmax` 20167 llong_min=`$AWK '{print $1}' conftest.llminmax`
18898 llong_max=`$AWK '{print $2}' conftest.llminmax` 20168 llong_max=`$AWK '{print $2}' conftest.llminmax`
18899 20169
18900 # snprintf on some Tru64s doesn't understand "%lld" 20170 { echo "$as_me:$LINENO: result: $llong_max" >&5
18901 case "$host" in 20171echo "${ECHO_T}$llong_max" >&6; }
18902 alpha-dec-osf*)
18903 if test "x$ac_cv_sizeof_long_long_int" = "x8" &&
18904 test "x$llong_max" = "xld"; then
18905 llong_min="-9223372036854775808"
18906 llong_max="9223372036854775807"
18907 fi
18908 ;;
18909 esac
18910
18911 echo "$as_me:$LINENO: result: $llong_max" >&5
18912echo "${ECHO_T}$llong_max" >&6
18913 20172
18914cat >>confdefs.h <<_ACEOF 20173cat >>confdefs.h <<_ACEOF
18915#define LLONG_MAX ${llong_max}LL 20174#define LLONG_MAX ${llong_max}LL
18916_ACEOF 20175_ACEOF
18917 20176
18918 echo "$as_me:$LINENO: checking for min value of long long" >&5 20177 { echo "$as_me:$LINENO: checking for min value of long long" >&5
18919echo $ECHO_N "checking for min value of long long... $ECHO_C" >&6 20178echo $ECHO_N "checking for min value of long long... $ECHO_C" >&6; }
18920 echo "$as_me:$LINENO: result: $llong_min" >&5 20179 { echo "$as_me:$LINENO: result: $llong_min" >&5
18921echo "${ECHO_T}$llong_min" >&6 20180echo "${ECHO_T}$llong_min" >&6; }
18922 20181
18923cat >>confdefs.h <<_ACEOF 20182cat >>confdefs.h <<_ACEOF
18924#define LLONG_MIN ${llong_min}LL 20183#define LLONG_MIN ${llong_min}LL
@@ -18932,18 +20191,20 @@ sed 's/^/| /' conftest.$ac_ext >&5
18932 20191
18933( exit $ac_status ) 20192( exit $ac_status )
18934 20193
18935 echo "$as_me:$LINENO: result: not found" >&5 20194 { echo "$as_me:$LINENO: result: not found" >&5
18936echo "${ECHO_T}not found" >&6 20195echo "${ECHO_T}not found" >&6; }
18937 20196
18938fi 20197fi
18939rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 20198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18940fi 20199fi
20200
20201
18941fi 20202fi
18942 20203
18943 20204
18944# More checks for data types 20205# More checks for data types
18945echo "$as_me:$LINENO: checking for u_int type" >&5 20206{ echo "$as_me:$LINENO: checking for u_int type" >&5
18946echo $ECHO_N "checking for u_int type... $ECHO_C" >&6 20207echo $ECHO_N "checking for u_int type... $ECHO_C" >&6; }
18947if test "${ac_cv_have_u_int+set}" = set; then 20208if test "${ac_cv_have_u_int+set}" = set; then
18948 echo $ECHO_N "(cached) $ECHO_C" >&6 20209 echo $ECHO_N "(cached) $ECHO_C" >&6
18949else 20210else
@@ -18964,40 +20225,36 @@ main ()
18964} 20225}
18965_ACEOF 20226_ACEOF
18966rm -f conftest.$ac_objext 20227rm -f conftest.$ac_objext
18967if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 20228if { (ac_try="$ac_compile"
18968 (eval $ac_compile) 2>conftest.er1 20229case "(($ac_try" in
20230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20231 *) ac_try_echo=$ac_try;;
20232esac
20233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20234 (eval "$ac_compile") 2>conftest.er1
18969 ac_status=$? 20235 ac_status=$?
18970 grep -v '^ *+' conftest.er1 >conftest.err 20236 grep -v '^ *+' conftest.er1 >conftest.err
18971 rm -f conftest.er1 20237 rm -f conftest.er1
18972 cat conftest.err >&5 20238 cat conftest.err >&5
18973 echo "$as_me:$LINENO: \$? = $ac_status" >&5 20239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18974 (exit $ac_status); } && 20240 (exit $ac_status); } && {
18975 { ac_try='test -z "$ac_c_werror_flag" 20241 test -z "$ac_c_werror_flag" ||
18976 || test ! -s conftest.err' 20242 test ! -s conftest.err
18977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 20243 } && test -s conftest.$ac_objext; then
18978 (eval $ac_try) 2>&5
18979 ac_status=$?
18980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18981 (exit $ac_status); }; } &&
18982 { ac_try='test -s conftest.$ac_objext'
18983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18984 (eval $ac_try) 2>&5
18985 ac_status=$?
18986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18987 (exit $ac_status); }; }; then
18988 ac_cv_have_u_int="yes" 20244 ac_cv_have_u_int="yes"
18989else 20245else
18990 echo "$as_me: failed program was:" >&5 20246 echo "$as_me: failed program was:" >&5
18991sed 's/^/| /' conftest.$ac_ext >&5 20247sed 's/^/| /' conftest.$ac_ext >&5
18992 20248
18993 ac_cv_have_u_int="no" 20249 ac_cv_have_u_int="no"
18994 20250
18995fi 20251fi
18996rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 20252
20253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18997 20254
18998fi 20255fi
18999echo "$as_me:$LINENO: result: $ac_cv_have_u_int" >&5 20256{ echo "$as_me:$LINENO: result: $ac_cv_have_u_int" >&5
19000echo "${ECHO_T}$ac_cv_have_u_int" >&6 20257echo "${ECHO_T}$ac_cv_have_u_int" >&6; }
19001if test "x$ac_cv_have_u_int" = "xyes" ; then 20258if test "x$ac_cv_have_u_int" = "xyes" ; then
19002 20259
19003cat >>confdefs.h <<\_ACEOF 20260cat >>confdefs.h <<\_ACEOF
@@ -19007,8 +20264,8 @@ _ACEOF
19007 have_u_int=1 20264 have_u_int=1
19008fi 20265fi
19009 20266
19010echo "$as_me:$LINENO: checking for intXX_t types" >&5 20267{ echo "$as_me:$LINENO: checking for intXX_t types" >&5
19011echo $ECHO_N "checking for intXX_t types... $ECHO_C" >&6 20268echo $ECHO_N "checking for intXX_t types... $ECHO_C" >&6; }
19012if test "${ac_cv_have_intxx_t+set}" = set; then 20269if test "${ac_cv_have_intxx_t+set}" = set; then
19013 echo $ECHO_N "(cached) $ECHO_C" >&6 20270 echo $ECHO_N "(cached) $ECHO_C" >&6
19014else 20271else
@@ -19029,40 +20286,36 @@ main ()
19029} 20286}
19030_ACEOF 20287_ACEOF
19031rm -f conftest.$ac_objext 20288rm -f conftest.$ac_objext
19032if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 20289if { (ac_try="$ac_compile"
19033 (eval $ac_compile) 2>conftest.er1 20290case "(($ac_try" in
20291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20292 *) ac_try_echo=$ac_try;;
20293esac
20294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20295 (eval "$ac_compile") 2>conftest.er1
19034 ac_status=$? 20296 ac_status=$?
19035 grep -v '^ *+' conftest.er1 >conftest.err 20297 grep -v '^ *+' conftest.er1 >conftest.err
19036 rm -f conftest.er1 20298 rm -f conftest.er1
19037 cat conftest.err >&5 20299 cat conftest.err >&5
19038 echo "$as_me:$LINENO: \$? = $ac_status" >&5 20300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19039 (exit $ac_status); } && 20301 (exit $ac_status); } && {
19040 { ac_try='test -z "$ac_c_werror_flag" 20302 test -z "$ac_c_werror_flag" ||
19041 || test ! -s conftest.err' 20303 test ! -s conftest.err
19042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 20304 } && test -s conftest.$ac_objext; then
19043 (eval $ac_try) 2>&5
19044 ac_status=$?
19045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19046 (exit $ac_status); }; } &&
19047 { ac_try='test -s conftest.$ac_objext'
19048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19049 (eval $ac_try) 2>&5
19050 ac_status=$?
19051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19052 (exit $ac_status); }; }; then
19053 ac_cv_have_intxx_t="yes" 20305 ac_cv_have_intxx_t="yes"
19054else 20306else
19055 echo "$as_me: failed program was:" >&5 20307 echo "$as_me: failed program was:" >&5
19056sed 's/^/| /' conftest.$ac_ext >&5 20308sed 's/^/| /' conftest.$ac_ext >&5
19057 20309
19058 ac_cv_have_intxx_t="no" 20310 ac_cv_have_intxx_t="no"
19059 20311
19060fi 20312fi
19061rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 20313
20314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19062 20315
19063fi 20316fi
19064echo "$as_me:$LINENO: result: $ac_cv_have_intxx_t" >&5 20317{ echo "$as_me:$LINENO: result: $ac_cv_have_intxx_t" >&5
19065echo "${ECHO_T}$ac_cv_have_intxx_t" >&6 20318echo "${ECHO_T}$ac_cv_have_intxx_t" >&6; }
19066if test "x$ac_cv_have_intxx_t" = "xyes" ; then 20319if test "x$ac_cv_have_intxx_t" = "xyes" ; then
19067 20320
19068cat >>confdefs.h <<\_ACEOF 20321cat >>confdefs.h <<\_ACEOF
@@ -19075,8 +20328,8 @@ fi
19075if (test -z "$have_intxx_t" && \ 20328if (test -z "$have_intxx_t" && \
19076 test "x$ac_cv_header_stdint_h" = "xyes") 20329 test "x$ac_cv_header_stdint_h" = "xyes")
19077then 20330then
19078 echo "$as_me:$LINENO: checking for intXX_t types in stdint.h" >&5 20331 { echo "$as_me:$LINENO: checking for intXX_t types in stdint.h" >&5
19079echo $ECHO_N "checking for intXX_t types in stdint.h... $ECHO_C" >&6 20332echo $ECHO_N "checking for intXX_t types in stdint.h... $ECHO_C" >&6; }
19080 cat >conftest.$ac_ext <<_ACEOF 20333 cat >conftest.$ac_ext <<_ACEOF
19081/* confdefs.h. */ 20334/* confdefs.h. */
19082_ACEOF 20335_ACEOF
@@ -19093,48 +20346,44 @@ main ()
19093} 20346}
19094_ACEOF 20347_ACEOF
19095rm -f conftest.$ac_objext 20348rm -f conftest.$ac_objext
19096if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 20349if { (ac_try="$ac_compile"
19097 (eval $ac_compile) 2>conftest.er1 20350case "(($ac_try" in
20351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20352 *) ac_try_echo=$ac_try;;
20353esac
20354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20355 (eval "$ac_compile") 2>conftest.er1
19098 ac_status=$? 20356 ac_status=$?
19099 grep -v '^ *+' conftest.er1 >conftest.err 20357 grep -v '^ *+' conftest.er1 >conftest.err
19100 rm -f conftest.er1 20358 rm -f conftest.er1
19101 cat conftest.err >&5 20359 cat conftest.err >&5
19102 echo "$as_me:$LINENO: \$? = $ac_status" >&5 20360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19103 (exit $ac_status); } && 20361 (exit $ac_status); } && {
19104 { ac_try='test -z "$ac_c_werror_flag" 20362 test -z "$ac_c_werror_flag" ||
19105 || test ! -s conftest.err' 20363 test ! -s conftest.err
19106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 20364 } && test -s conftest.$ac_objext; then
19107 (eval $ac_try) 2>&5
19108 ac_status=$?
19109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19110 (exit $ac_status); }; } &&
19111 { ac_try='test -s conftest.$ac_objext'
19112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19113 (eval $ac_try) 2>&5
19114 ac_status=$?
19115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19116 (exit $ac_status); }; }; then
19117 20365
19118 cat >>confdefs.h <<\_ACEOF 20366 cat >>confdefs.h <<\_ACEOF
19119#define HAVE_INTXX_T 1 20367#define HAVE_INTXX_T 1
19120_ACEOF 20368_ACEOF
19121 20369
19122 echo "$as_me:$LINENO: result: yes" >&5 20370 { echo "$as_me:$LINENO: result: yes" >&5
19123echo "${ECHO_T}yes" >&6 20371echo "${ECHO_T}yes" >&6; }
19124 20372
19125else 20373else
19126 echo "$as_me: failed program was:" >&5 20374 echo "$as_me: failed program was:" >&5
19127sed 's/^/| /' conftest.$ac_ext >&5 20375sed 's/^/| /' conftest.$ac_ext >&5
19128 20376
19129 echo "$as_me:$LINENO: result: no" >&5 20377 { echo "$as_me:$LINENO: result: no" >&5
19130echo "${ECHO_T}no" >&6 20378echo "${ECHO_T}no" >&6; }
19131 20379
19132fi 20380fi
19133rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 20381
20382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19134fi 20383fi
19135 20384
19136echo "$as_me:$LINENO: checking for int64_t type" >&5 20385{ echo "$as_me:$LINENO: checking for int64_t type" >&5
19137echo $ECHO_N "checking for int64_t type... $ECHO_C" >&6 20386echo $ECHO_N "checking for int64_t type... $ECHO_C" >&6; }
19138if test "${ac_cv_have_int64_t+set}" = set; then 20387if test "${ac_cv_have_int64_t+set}" = set; then
19139 echo $ECHO_N "(cached) $ECHO_C" >&6 20388 echo $ECHO_N "(cached) $ECHO_C" >&6
19140else 20389else
@@ -19164,40 +20413,36 @@ main ()
19164} 20413}
19165_ACEOF 20414_ACEOF
19166rm -f conftest.$ac_objext 20415rm -f conftest.$ac_objext
19167if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 20416if { (ac_try="$ac_compile"
19168 (eval $ac_compile) 2>conftest.er1 20417case "(($ac_try" in
20418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20419 *) ac_try_echo=$ac_try;;
20420esac
20421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20422 (eval "$ac_compile") 2>conftest.er1
19169 ac_status=$? 20423 ac_status=$?
19170 grep -v '^ *+' conftest.er1 >conftest.err 20424 grep -v '^ *+' conftest.er1 >conftest.err
19171 rm -f conftest.er1 20425 rm -f conftest.er1
19172 cat conftest.err >&5 20426 cat conftest.err >&5
19173 echo "$as_me:$LINENO: \$? = $ac_status" >&5 20427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19174 (exit $ac_status); } && 20428 (exit $ac_status); } && {
19175 { ac_try='test -z "$ac_c_werror_flag" 20429 test -z "$ac_c_werror_flag" ||
19176 || test ! -s conftest.err' 20430 test ! -s conftest.err
19177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 20431 } && test -s conftest.$ac_objext; then
19178 (eval $ac_try) 2>&5
19179 ac_status=$?
19180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19181 (exit $ac_status); }; } &&
19182 { ac_try='test -s conftest.$ac_objext'
19183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19184 (eval $ac_try) 2>&5
19185 ac_status=$?
19186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19187 (exit $ac_status); }; }; then
19188 ac_cv_have_int64_t="yes" 20432 ac_cv_have_int64_t="yes"
19189else 20433else
19190 echo "$as_me: failed program was:" >&5 20434 echo "$as_me: failed program was:" >&5
19191sed 's/^/| /' conftest.$ac_ext >&5 20435sed 's/^/| /' conftest.$ac_ext >&5
19192 20436
19193 ac_cv_have_int64_t="no" 20437 ac_cv_have_int64_t="no"
19194 20438
19195fi 20439fi
19196rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 20440
20441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19197 20442
19198fi 20443fi
19199echo "$as_me:$LINENO: result: $ac_cv_have_int64_t" >&5 20444{ echo "$as_me:$LINENO: result: $ac_cv_have_int64_t" >&5
19200echo "${ECHO_T}$ac_cv_have_int64_t" >&6 20445echo "${ECHO_T}$ac_cv_have_int64_t" >&6; }
19201if test "x$ac_cv_have_int64_t" = "xyes" ; then 20446if test "x$ac_cv_have_int64_t" = "xyes" ; then
19202 20447
19203cat >>confdefs.h <<\_ACEOF 20448cat >>confdefs.h <<\_ACEOF
@@ -19206,8 +20451,8 @@ _ACEOF
19206 20451
19207fi 20452fi
19208 20453
19209echo "$as_me:$LINENO: checking for u_intXX_t types" >&5 20454{ echo "$as_me:$LINENO: checking for u_intXX_t types" >&5
19210echo $ECHO_N "checking for u_intXX_t types... $ECHO_C" >&6 20455echo $ECHO_N "checking for u_intXX_t types... $ECHO_C" >&6; }
19211if test "${ac_cv_have_u_intxx_t+set}" = set; then 20456if test "${ac_cv_have_u_intxx_t+set}" = set; then
19212 echo $ECHO_N "(cached) $ECHO_C" >&6 20457 echo $ECHO_N "(cached) $ECHO_C" >&6
19213else 20458else
@@ -19228,40 +20473,36 @@ main ()
19228} 20473}
19229_ACEOF 20474_ACEOF
19230rm -f conftest.$ac_objext 20475rm -f conftest.$ac_objext
19231if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 20476if { (ac_try="$ac_compile"
19232 (eval $ac_compile) 2>conftest.er1 20477case "(($ac_try" in
20478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20479 *) ac_try_echo=$ac_try;;
20480esac
20481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20482 (eval "$ac_compile") 2>conftest.er1
19233 ac_status=$? 20483 ac_status=$?
19234 grep -v '^ *+' conftest.er1 >conftest.err 20484 grep -v '^ *+' conftest.er1 >conftest.err
19235 rm -f conftest.er1 20485 rm -f conftest.er1
19236 cat conftest.err >&5 20486 cat conftest.err >&5
19237 echo "$as_me:$LINENO: \$? = $ac_status" >&5 20487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19238 (exit $ac_status); } && 20488 (exit $ac_status); } && {
19239 { ac_try='test -z "$ac_c_werror_flag" 20489 test -z "$ac_c_werror_flag" ||
19240 || test ! -s conftest.err' 20490 test ! -s conftest.err
19241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 20491 } && test -s conftest.$ac_objext; then
19242 (eval $ac_try) 2>&5
19243 ac_status=$?
19244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19245 (exit $ac_status); }; } &&
19246 { ac_try='test -s conftest.$ac_objext'
19247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19248 (eval $ac_try) 2>&5
19249 ac_status=$?
19250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19251 (exit $ac_status); }; }; then
19252 ac_cv_have_u_intxx_t="yes" 20492 ac_cv_have_u_intxx_t="yes"
19253else 20493else
19254 echo "$as_me: failed program was:" >&5 20494 echo "$as_me: failed program was:" >&5
19255sed 's/^/| /' conftest.$ac_ext >&5 20495sed 's/^/| /' conftest.$ac_ext >&5
19256 20496
19257 ac_cv_have_u_intxx_t="no" 20497 ac_cv_have_u_intxx_t="no"
19258 20498
19259fi 20499fi
19260rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 20500
20501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19261 20502
19262fi 20503fi
19263echo "$as_me:$LINENO: result: $ac_cv_have_u_intxx_t" >&5 20504{ echo "$as_me:$LINENO: result: $ac_cv_have_u_intxx_t" >&5
19264echo "${ECHO_T}$ac_cv_have_u_intxx_t" >&6 20505echo "${ECHO_T}$ac_cv_have_u_intxx_t" >&6; }
19265if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then 20506if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
19266 20507
19267cat >>confdefs.h <<\_ACEOF 20508cat >>confdefs.h <<\_ACEOF
@@ -19272,8 +20513,8 @@ _ACEOF
19272fi 20513fi
19273 20514
19274if test -z "$have_u_intxx_t" ; then 20515if test -z "$have_u_intxx_t" ; then
19275 echo "$as_me:$LINENO: checking for u_intXX_t types in sys/socket.h" >&5 20516 { echo "$as_me:$LINENO: checking for u_intXX_t types in sys/socket.h" >&5
19276echo $ECHO_N "checking for u_intXX_t types in sys/socket.h... $ECHO_C" >&6 20517echo $ECHO_N "checking for u_intXX_t types in sys/socket.h... $ECHO_C" >&6; }
19277 cat >conftest.$ac_ext <<_ACEOF 20518 cat >conftest.$ac_ext <<_ACEOF
19278/* confdefs.h. */ 20519/* confdefs.h. */
19279_ACEOF 20520_ACEOF
@@ -19290,48 +20531,44 @@ main ()
19290} 20531}
19291_ACEOF 20532_ACEOF
19292rm -f conftest.$ac_objext 20533rm -f conftest.$ac_objext
19293if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 20534if { (ac_try="$ac_compile"
19294 (eval $ac_compile) 2>conftest.er1 20535case "(($ac_try" in
20536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20537 *) ac_try_echo=$ac_try;;
20538esac
20539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20540 (eval "$ac_compile") 2>conftest.er1
19295 ac_status=$? 20541 ac_status=$?
19296 grep -v '^ *+' conftest.er1 >conftest.err 20542 grep -v '^ *+' conftest.er1 >conftest.err
19297 rm -f conftest.er1 20543 rm -f conftest.er1
19298 cat conftest.err >&5 20544 cat conftest.err >&5
19299 echo "$as_me:$LINENO: \$? = $ac_status" >&5 20545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19300 (exit $ac_status); } && 20546 (exit $ac_status); } && {
19301 { ac_try='test -z "$ac_c_werror_flag" 20547 test -z "$ac_c_werror_flag" ||
19302 || test ! -s conftest.err' 20548 test ! -s conftest.err
19303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 20549 } && test -s conftest.$ac_objext; then
19304 (eval $ac_try) 2>&5
19305 ac_status=$?
19306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19307 (exit $ac_status); }; } &&
19308 { ac_try='test -s conftest.$ac_objext'
19309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19310 (eval $ac_try) 2>&5
19311 ac_status=$?
19312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19313 (exit $ac_status); }; }; then
19314 20550
19315 cat >>confdefs.h <<\_ACEOF 20551 cat >>confdefs.h <<\_ACEOF
19316#define HAVE_U_INTXX_T 1 20552#define HAVE_U_INTXX_T 1
19317_ACEOF 20553_ACEOF
19318 20554
19319 echo "$as_me:$LINENO: result: yes" >&5 20555 { echo "$as_me:$LINENO: result: yes" >&5
19320echo "${ECHO_T}yes" >&6 20556echo "${ECHO_T}yes" >&6; }
19321 20557
19322else 20558else
19323 echo "$as_me: failed program was:" >&5 20559 echo "$as_me: failed program was:" >&5
19324sed 's/^/| /' conftest.$ac_ext >&5 20560sed 's/^/| /' conftest.$ac_ext >&5
19325 20561
19326 echo "$as_me:$LINENO: result: no" >&5 20562 { echo "$as_me:$LINENO: result: no" >&5
19327echo "${ECHO_T}no" >&6 20563echo "${ECHO_T}no" >&6; }
19328 20564
19329fi 20565fi
19330rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 20566
20567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19331fi 20568fi
19332 20569
19333echo "$as_me:$LINENO: checking for u_int64_t types" >&5 20570{ echo "$as_me:$LINENO: checking for u_int64_t types" >&5
19334echo $ECHO_N "checking for u_int64_t types... $ECHO_C" >&6 20571echo $ECHO_N "checking for u_int64_t types... $ECHO_C" >&6; }
19335if test "${ac_cv_have_u_int64_t+set}" = set; then 20572if test "${ac_cv_have_u_int64_t+set}" = set; then
19336 echo $ECHO_N "(cached) $ECHO_C" >&6 20573 echo $ECHO_N "(cached) $ECHO_C" >&6
19337else 20574else
@@ -19352,40 +20589,36 @@ main ()
19352} 20589}
19353_ACEOF 20590_ACEOF
19354rm -f conftest.$ac_objext 20591rm -f conftest.$ac_objext
19355if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 20592if { (ac_try="$ac_compile"
19356 (eval $ac_compile) 2>conftest.er1 20593case "(($ac_try" in
20594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20595 *) ac_try_echo=$ac_try;;
20596esac
20597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20598 (eval "$ac_compile") 2>conftest.er1
19357 ac_status=$? 20599 ac_status=$?
19358 grep -v '^ *+' conftest.er1 >conftest.err 20600 grep -v '^ *+' conftest.er1 >conftest.err
19359 rm -f conftest.er1 20601 rm -f conftest.er1
19360 cat conftest.err >&5 20602 cat conftest.err >&5
19361 echo "$as_me:$LINENO: \$? = $ac_status" >&5 20603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19362 (exit $ac_status); } && 20604 (exit $ac_status); } && {
19363 { ac_try='test -z "$ac_c_werror_flag" 20605 test -z "$ac_c_werror_flag" ||
19364 || test ! -s conftest.err' 20606 test ! -s conftest.err
19365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 20607 } && test -s conftest.$ac_objext; then
19366 (eval $ac_try) 2>&5
19367 ac_status=$?
19368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19369 (exit $ac_status); }; } &&
19370 { ac_try='test -s conftest.$ac_objext'
19371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19372 (eval $ac_try) 2>&5
19373 ac_status=$?
19374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19375 (exit $ac_status); }; }; then
19376 ac_cv_have_u_int64_t="yes" 20608 ac_cv_have_u_int64_t="yes"
19377else 20609else
19378 echo "$as_me: failed program was:" >&5 20610 echo "$as_me: failed program was:" >&5
19379sed 's/^/| /' conftest.$ac_ext >&5 20611sed 's/^/| /' conftest.$ac_ext >&5
19380 20612
19381 ac_cv_have_u_int64_t="no" 20613 ac_cv_have_u_int64_t="no"
19382 20614
19383fi 20615fi
19384rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 20616
20617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19385 20618
19386fi 20619fi
19387echo "$as_me:$LINENO: result: $ac_cv_have_u_int64_t" >&5 20620{ echo "$as_me:$LINENO: result: $ac_cv_have_u_int64_t" >&5
19388echo "${ECHO_T}$ac_cv_have_u_int64_t" >&6 20621echo "${ECHO_T}$ac_cv_have_u_int64_t" >&6; }
19389if test "x$ac_cv_have_u_int64_t" = "xyes" ; then 20622if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
19390 20623
19391cat >>confdefs.h <<\_ACEOF 20624cat >>confdefs.h <<\_ACEOF
@@ -19396,8 +20629,8 @@ _ACEOF
19396fi 20629fi
19397 20630
19398if test -z "$have_u_int64_t" ; then 20631if test -z "$have_u_int64_t" ; then
19399 echo "$as_me:$LINENO: checking for u_int64_t type in sys/bitypes.h" >&5 20632 { echo "$as_me:$LINENO: checking for u_int64_t type in sys/bitypes.h" >&5
19400echo $ECHO_N "checking for u_int64_t type in sys/bitypes.h... $ECHO_C" >&6 20633echo $ECHO_N "checking for u_int64_t type in sys/bitypes.h... $ECHO_C" >&6; }
19401 cat >conftest.$ac_ext <<_ACEOF 20634 cat >conftest.$ac_ext <<_ACEOF
19402/* confdefs.h. */ 20635/* confdefs.h. */
19403_ACEOF 20636_ACEOF
@@ -19414,49 +20647,45 @@ main ()
19414} 20647}
19415_ACEOF 20648_ACEOF
19416rm -f conftest.$ac_objext 20649rm -f conftest.$ac_objext
19417if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 20650if { (ac_try="$ac_compile"
19418 (eval $ac_compile) 2>conftest.er1 20651case "(($ac_try" in
20652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20653 *) ac_try_echo=$ac_try;;
20654esac
20655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20656 (eval "$ac_compile") 2>conftest.er1
19419 ac_status=$? 20657 ac_status=$?
19420 grep -v '^ *+' conftest.er1 >conftest.err 20658 grep -v '^ *+' conftest.er1 >conftest.err
19421 rm -f conftest.er1 20659 rm -f conftest.er1
19422 cat conftest.err >&5 20660 cat conftest.err >&5
19423 echo "$as_me:$LINENO: \$? = $ac_status" >&5 20661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19424 (exit $ac_status); } && 20662 (exit $ac_status); } && {
19425 { ac_try='test -z "$ac_c_werror_flag" 20663 test -z "$ac_c_werror_flag" ||
19426 || test ! -s conftest.err' 20664 test ! -s conftest.err
19427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 20665 } && test -s conftest.$ac_objext; then
19428 (eval $ac_try) 2>&5
19429 ac_status=$?
19430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19431 (exit $ac_status); }; } &&
19432 { ac_try='test -s conftest.$ac_objext'
19433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19434 (eval $ac_try) 2>&5
19435 ac_status=$?
19436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19437 (exit $ac_status); }; }; then
19438 20666
19439 cat >>confdefs.h <<\_ACEOF 20667 cat >>confdefs.h <<\_ACEOF
19440#define HAVE_U_INT64_T 1 20668#define HAVE_U_INT64_T 1
19441_ACEOF 20669_ACEOF
19442 20670
19443 echo "$as_me:$LINENO: result: yes" >&5 20671 { echo "$as_me:$LINENO: result: yes" >&5
19444echo "${ECHO_T}yes" >&6 20672echo "${ECHO_T}yes" >&6; }
19445 20673
19446else 20674else
19447 echo "$as_me: failed program was:" >&5 20675 echo "$as_me: failed program was:" >&5
19448sed 's/^/| /' conftest.$ac_ext >&5 20676sed 's/^/| /' conftest.$ac_ext >&5
19449 20677
19450 echo "$as_me:$LINENO: result: no" >&5 20678 { echo "$as_me:$LINENO: result: no" >&5
19451echo "${ECHO_T}no" >&6 20679echo "${ECHO_T}no" >&6; }
19452 20680
19453fi 20681fi
19454rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 20682
20683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19455fi 20684fi
19456 20685
19457if test -z "$have_u_intxx_t" ; then 20686if test -z "$have_u_intxx_t" ; then
19458 echo "$as_me:$LINENO: checking for uintXX_t types" >&5 20687 { echo "$as_me:$LINENO: checking for uintXX_t types" >&5
19459echo $ECHO_N "checking for uintXX_t types... $ECHO_C" >&6 20688echo $ECHO_N "checking for uintXX_t types... $ECHO_C" >&6; }
19460if test "${ac_cv_have_uintxx_t+set}" = set; then 20689if test "${ac_cv_have_uintxx_t+set}" = set; then
19461 echo $ECHO_N "(cached) $ECHO_C" >&6 20690 echo $ECHO_N "(cached) $ECHO_C" >&6
19462else 20691else
@@ -19479,40 +20708,36 @@ main ()
19479} 20708}
19480_ACEOF 20709_ACEOF
19481rm -f conftest.$ac_objext 20710rm -f conftest.$ac_objext
19482if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 20711if { (ac_try="$ac_compile"
19483 (eval $ac_compile) 2>conftest.er1 20712case "(($ac_try" in
20713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20714 *) ac_try_echo=$ac_try;;
20715esac
20716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20717 (eval "$ac_compile") 2>conftest.er1
19484 ac_status=$? 20718 ac_status=$?
19485 grep -v '^ *+' conftest.er1 >conftest.err 20719 grep -v '^ *+' conftest.er1 >conftest.err
19486 rm -f conftest.er1 20720 rm -f conftest.er1
19487 cat conftest.err >&5 20721 cat conftest.err >&5
19488 echo "$as_me:$LINENO: \$? = $ac_status" >&5 20722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19489 (exit $ac_status); } && 20723 (exit $ac_status); } && {
19490 { ac_try='test -z "$ac_c_werror_flag" 20724 test -z "$ac_c_werror_flag" ||
19491 || test ! -s conftest.err' 20725 test ! -s conftest.err
19492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 20726 } && test -s conftest.$ac_objext; then
19493 (eval $ac_try) 2>&5
19494 ac_status=$?
19495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19496 (exit $ac_status); }; } &&
19497 { ac_try='test -s conftest.$ac_objext'
19498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19499 (eval $ac_try) 2>&5
19500 ac_status=$?
19501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19502 (exit $ac_status); }; }; then
19503 ac_cv_have_uintxx_t="yes" 20727 ac_cv_have_uintxx_t="yes"
19504else 20728else
19505 echo "$as_me: failed program was:" >&5 20729 echo "$as_me: failed program was:" >&5
19506sed 's/^/| /' conftest.$ac_ext >&5 20730sed 's/^/| /' conftest.$ac_ext >&5
19507 20731
19508 ac_cv_have_uintxx_t="no" 20732 ac_cv_have_uintxx_t="no"
19509 20733
19510fi 20734fi
19511rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 20735
20736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19512 20737
19513fi 20738fi
19514echo "$as_me:$LINENO: result: $ac_cv_have_uintxx_t" >&5 20739{ echo "$as_me:$LINENO: result: $ac_cv_have_uintxx_t" >&5
19515echo "${ECHO_T}$ac_cv_have_uintxx_t" >&6 20740echo "${ECHO_T}$ac_cv_have_uintxx_t" >&6; }
19516 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then 20741 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
19517 20742
19518cat >>confdefs.h <<\_ACEOF 20743cat >>confdefs.h <<\_ACEOF
@@ -19523,8 +20748,8 @@ _ACEOF
19523fi 20748fi
19524 20749
19525if test -z "$have_uintxx_t" ; then 20750if test -z "$have_uintxx_t" ; then
19526 echo "$as_me:$LINENO: checking for uintXX_t types in stdint.h" >&5 20751 { echo "$as_me:$LINENO: checking for uintXX_t types in stdint.h" >&5
19527echo $ECHO_N "checking for uintXX_t types in stdint.h... $ECHO_C" >&6 20752echo $ECHO_N "checking for uintXX_t types in stdint.h... $ECHO_C" >&6; }
19528 cat >conftest.$ac_ext <<_ACEOF 20753 cat >conftest.$ac_ext <<_ACEOF
19529/* confdefs.h. */ 20754/* confdefs.h. */
19530_ACEOF 20755_ACEOF
@@ -19541,51 +20766,47 @@ main ()
19541} 20766}
19542_ACEOF 20767_ACEOF
19543rm -f conftest.$ac_objext 20768rm -f conftest.$ac_objext
19544if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 20769if { (ac_try="$ac_compile"
19545 (eval $ac_compile) 2>conftest.er1 20770case "(($ac_try" in
20771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20772 *) ac_try_echo=$ac_try;;
20773esac
20774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20775 (eval "$ac_compile") 2>conftest.er1
19546 ac_status=$? 20776 ac_status=$?
19547 grep -v '^ *+' conftest.er1 >conftest.err 20777 grep -v '^ *+' conftest.er1 >conftest.err
19548 rm -f conftest.er1 20778 rm -f conftest.er1
19549 cat conftest.err >&5 20779 cat conftest.err >&5
19550 echo "$as_me:$LINENO: \$? = $ac_status" >&5 20780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19551 (exit $ac_status); } && 20781 (exit $ac_status); } && {
19552 { ac_try='test -z "$ac_c_werror_flag" 20782 test -z "$ac_c_werror_flag" ||
19553 || test ! -s conftest.err' 20783 test ! -s conftest.err
19554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 20784 } && test -s conftest.$ac_objext; then
19555 (eval $ac_try) 2>&5
19556 ac_status=$?
19557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19558 (exit $ac_status); }; } &&
19559 { ac_try='test -s conftest.$ac_objext'
19560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19561 (eval $ac_try) 2>&5
19562 ac_status=$?
19563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19564 (exit $ac_status); }; }; then
19565 20785
19566 cat >>confdefs.h <<\_ACEOF 20786 cat >>confdefs.h <<\_ACEOF
19567#define HAVE_UINTXX_T 1 20787#define HAVE_UINTXX_T 1
19568_ACEOF 20788_ACEOF
19569 20789
19570 echo "$as_me:$LINENO: result: yes" >&5 20790 { echo "$as_me:$LINENO: result: yes" >&5
19571echo "${ECHO_T}yes" >&6 20791echo "${ECHO_T}yes" >&6; }
19572 20792
19573else 20793else
19574 echo "$as_me: failed program was:" >&5 20794 echo "$as_me: failed program was:" >&5
19575sed 's/^/| /' conftest.$ac_ext >&5 20795sed 's/^/| /' conftest.$ac_ext >&5
19576 20796
19577 echo "$as_me:$LINENO: result: no" >&5 20797 { echo "$as_me:$LINENO: result: no" >&5
19578echo "${ECHO_T}no" >&6 20798echo "${ECHO_T}no" >&6; }
19579 20799
19580fi 20800fi
19581rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 20801
20802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19582fi 20803fi
19583 20804
19584if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \ 20805if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
19585 test "x$ac_cv_header_sys_bitypes_h" = "xyes") 20806 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
19586then 20807then
19587 echo "$as_me:$LINENO: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5 20808 { echo "$as_me:$LINENO: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
19588echo $ECHO_N "checking for intXX_t and u_intXX_t types in sys/bitypes.h... $ECHO_C" >&6 20809echo $ECHO_N "checking for intXX_t and u_intXX_t types in sys/bitypes.h... $ECHO_C" >&6; }
19589 cat >conftest.$ac_ext <<_ACEOF 20810 cat >conftest.$ac_ext <<_ACEOF
19590/* confdefs.h. */ 20811/* confdefs.h. */
19591_ACEOF 20812_ACEOF
@@ -19608,27 +20829,22 @@ main ()
19608} 20829}
19609_ACEOF 20830_ACEOF
19610rm -f conftest.$ac_objext 20831rm -f conftest.$ac_objext
19611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 20832if { (ac_try="$ac_compile"
19612 (eval $ac_compile) 2>conftest.er1 20833case "(($ac_try" in
20834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20835 *) ac_try_echo=$ac_try;;
20836esac
20837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20838 (eval "$ac_compile") 2>conftest.er1
19613 ac_status=$? 20839 ac_status=$?
19614 grep -v '^ *+' conftest.er1 >conftest.err 20840 grep -v '^ *+' conftest.er1 >conftest.err
19615 rm -f conftest.er1 20841 rm -f conftest.er1
19616 cat conftest.err >&5 20842 cat conftest.err >&5
19617 echo "$as_me:$LINENO: \$? = $ac_status" >&5 20843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19618 (exit $ac_status); } && 20844 (exit $ac_status); } && {
19619 { ac_try='test -z "$ac_c_werror_flag" 20845 test -z "$ac_c_werror_flag" ||
19620 || test ! -s conftest.err' 20846 test ! -s conftest.err
19621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 20847 } && test -s conftest.$ac_objext; then
19622 (eval $ac_try) 2>&5
19623 ac_status=$?
19624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19625 (exit $ac_status); }; } &&
19626 { ac_try='test -s conftest.$ac_objext'
19627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19628 (eval $ac_try) 2>&5
19629 ac_status=$?
19630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19631 (exit $ac_status); }; }; then
19632 20848
19633 cat >>confdefs.h <<\_ACEOF 20849 cat >>confdefs.h <<\_ACEOF
19634#define HAVE_U_INTXX_T 1 20850#define HAVE_U_INTXX_T 1
@@ -19638,23 +20854,24 @@ _ACEOF
19638#define HAVE_INTXX_T 1 20854#define HAVE_INTXX_T 1
19639_ACEOF 20855_ACEOF
19640 20856
19641 echo "$as_me:$LINENO: result: yes" >&5 20857 { echo "$as_me:$LINENO: result: yes" >&5
19642echo "${ECHO_T}yes" >&6 20858echo "${ECHO_T}yes" >&6; }
19643 20859
19644else 20860else
19645 echo "$as_me: failed program was:" >&5 20861 echo "$as_me: failed program was:" >&5
19646sed 's/^/| /' conftest.$ac_ext >&5 20862sed 's/^/| /' conftest.$ac_ext >&5
19647 20863
19648echo "$as_me:$LINENO: result: no" >&5 20864 { echo "$as_me:$LINENO: result: no" >&5
19649echo "${ECHO_T}no" >&6 20865echo "${ECHO_T}no" >&6; }
19650 20866
19651fi 20867fi
19652rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 20868
20869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19653fi 20870fi
19654 20871
19655 20872
19656echo "$as_me:$LINENO: checking for u_char" >&5 20873{ echo "$as_me:$LINENO: checking for u_char" >&5
19657echo $ECHO_N "checking for u_char... $ECHO_C" >&6 20874echo $ECHO_N "checking for u_char... $ECHO_C" >&6; }
19658if test "${ac_cv_have_u_char+set}" = set; then 20875if test "${ac_cv_have_u_char+set}" = set; then
19659 echo $ECHO_N "(cached) $ECHO_C" >&6 20876 echo $ECHO_N "(cached) $ECHO_C" >&6
19660else 20877else
@@ -19677,40 +20894,36 @@ main ()
19677} 20894}
19678_ACEOF 20895_ACEOF
19679rm -f conftest.$ac_objext 20896rm -f conftest.$ac_objext
19680if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 20897if { (ac_try="$ac_compile"
19681 (eval $ac_compile) 2>conftest.er1 20898case "(($ac_try" in
20899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20900 *) ac_try_echo=$ac_try;;
20901esac
20902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20903 (eval "$ac_compile") 2>conftest.er1
19682 ac_status=$? 20904 ac_status=$?
19683 grep -v '^ *+' conftest.er1 >conftest.err 20905 grep -v '^ *+' conftest.er1 >conftest.err
19684 rm -f conftest.er1 20906 rm -f conftest.er1
19685 cat conftest.err >&5 20907 cat conftest.err >&5
19686 echo "$as_me:$LINENO: \$? = $ac_status" >&5 20908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19687 (exit $ac_status); } && 20909 (exit $ac_status); } && {
19688 { ac_try='test -z "$ac_c_werror_flag" 20910 test -z "$ac_c_werror_flag" ||
19689 || test ! -s conftest.err' 20911 test ! -s conftest.err
19690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 20912 } && test -s conftest.$ac_objext; then
19691 (eval $ac_try) 2>&5
19692 ac_status=$?
19693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19694 (exit $ac_status); }; } &&
19695 { ac_try='test -s conftest.$ac_objext'
19696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19697 (eval $ac_try) 2>&5
19698 ac_status=$?
19699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19700 (exit $ac_status); }; }; then
19701 ac_cv_have_u_char="yes" 20913 ac_cv_have_u_char="yes"
19702else 20914else
19703 echo "$as_me: failed program was:" >&5 20915 echo "$as_me: failed program was:" >&5
19704sed 's/^/| /' conftest.$ac_ext >&5 20916sed 's/^/| /' conftest.$ac_ext >&5
19705 20917
19706 ac_cv_have_u_char="no" 20918 ac_cv_have_u_char="no"
19707 20919
19708fi 20920fi
19709rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 20921
20922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19710 20923
19711fi 20924fi
19712echo "$as_me:$LINENO: result: $ac_cv_have_u_char" >&5 20925{ echo "$as_me:$LINENO: result: $ac_cv_have_u_char" >&5
19713echo "${ECHO_T}$ac_cv_have_u_char" >&6 20926echo "${ECHO_T}$ac_cv_have_u_char" >&6; }
19714if test "x$ac_cv_have_u_char" = "xyes" ; then 20927if test "x$ac_cv_have_u_char" = "xyes" ; then
19715 20928
19716cat >>confdefs.h <<\_ACEOF 20929cat >>confdefs.h <<\_ACEOF
@@ -19720,8 +20933,8 @@ _ACEOF
19720fi 20933fi
19721 20934
19722 20935
19723 echo "$as_me:$LINENO: checking for socklen_t" >&5 20936 { echo "$as_me:$LINENO: checking for socklen_t" >&5
19724echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 20937echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
19725if test "${ac_cv_type_socklen_t+set}" = set; then 20938if test "${ac_cv_type_socklen_t+set}" = set; then
19726 echo $ECHO_N "(cached) $ECHO_C" >&6 20939 echo $ECHO_N "(cached) $ECHO_C" >&6
19727else 20940else
@@ -19734,56 +20947,53 @@ cat >>conftest.$ac_ext <<_ACEOF
19734#include <sys/types.h> 20947#include <sys/types.h>
19735#include <sys/socket.h> 20948#include <sys/socket.h>
19736 20949
20950typedef socklen_t ac__type_new_;
19737int 20951int
19738main () 20952main ()
19739{ 20953{
19740if ((socklen_t *) 0) 20954if ((ac__type_new_ *) 0)
19741 return 0; 20955 return 0;
19742if (sizeof (socklen_t)) 20956if (sizeof (ac__type_new_))
19743 return 0; 20957 return 0;
19744 ; 20958 ;
19745 return 0; 20959 return 0;
19746} 20960}
19747_ACEOF 20961_ACEOF
19748rm -f conftest.$ac_objext 20962rm -f conftest.$ac_objext
19749if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 20963if { (ac_try="$ac_compile"
19750 (eval $ac_compile) 2>conftest.er1 20964case "(($ac_try" in
20965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20966 *) ac_try_echo=$ac_try;;
20967esac
20968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20969 (eval "$ac_compile") 2>conftest.er1
19751 ac_status=$? 20970 ac_status=$?
19752 grep -v '^ *+' conftest.er1 >conftest.err 20971 grep -v '^ *+' conftest.er1 >conftest.err
19753 rm -f conftest.er1 20972 rm -f conftest.er1
19754 cat conftest.err >&5 20973 cat conftest.err >&5
19755 echo "$as_me:$LINENO: \$? = $ac_status" >&5 20974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19756 (exit $ac_status); } && 20975 (exit $ac_status); } && {
19757 { ac_try='test -z "$ac_c_werror_flag" 20976 test -z "$ac_c_werror_flag" ||
19758 || test ! -s conftest.err' 20977 test ! -s conftest.err
19759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 20978 } && test -s conftest.$ac_objext; then
19760 (eval $ac_try) 2>&5
19761 ac_status=$?
19762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19763 (exit $ac_status); }; } &&
19764 { ac_try='test -s conftest.$ac_objext'
19765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19766 (eval $ac_try) 2>&5
19767 ac_status=$?
19768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19769 (exit $ac_status); }; }; then
19770 ac_cv_type_socklen_t=yes 20979 ac_cv_type_socklen_t=yes
19771else 20980else
19772 echo "$as_me: failed program was:" >&5 20981 echo "$as_me: failed program was:" >&5
19773sed 's/^/| /' conftest.$ac_ext >&5 20982sed 's/^/| /' conftest.$ac_ext >&5
19774 20983
19775ac_cv_type_socklen_t=no 20984 ac_cv_type_socklen_t=no
19776fi 20985fi
19777rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 20986
20987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19778fi 20988fi
19779echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 20989{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
19780echo "${ECHO_T}$ac_cv_type_socklen_t" >&6 20990echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
19781if test $ac_cv_type_socklen_t = yes; then 20991if test $ac_cv_type_socklen_t = yes; then
19782 : 20992 :
19783else 20993else
19784 20994
19785 echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5 20995 { echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5
19786echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6 20996echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6; }
19787 if test "${curl_cv_socklen_t_equiv+set}" = set; then 20997 if test "${curl_cv_socklen_t_equiv+set}" = set; then
19788 echo $ECHO_N "(cached) $ECHO_C" >&6 20998 echo $ECHO_N "(cached) $ECHO_C" >&6
19789else 20999else
@@ -19817,27 +21027,22 @@ main ()
19817} 21027}
19818_ACEOF 21028_ACEOF
19819rm -f conftest.$ac_objext 21029rm -f conftest.$ac_objext
19820if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 21030if { (ac_try="$ac_compile"
19821 (eval $ac_compile) 2>conftest.er1 21031case "(($ac_try" in
21032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21033 *) ac_try_echo=$ac_try;;
21034esac
21035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21036 (eval "$ac_compile") 2>conftest.er1
19822 ac_status=$? 21037 ac_status=$?
19823 grep -v '^ *+' conftest.er1 >conftest.err 21038 grep -v '^ *+' conftest.er1 >conftest.err
19824 rm -f conftest.er1 21039 rm -f conftest.er1
19825 cat conftest.err >&5 21040 cat conftest.err >&5
19826 echo "$as_me:$LINENO: \$? = $ac_status" >&5 21041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19827 (exit $ac_status); } && 21042 (exit $ac_status); } && {
19828 { ac_try='test -z "$ac_c_werror_flag" 21043 test -z "$ac_c_werror_flag" ||
19829 || test ! -s conftest.err' 21044 test ! -s conftest.err
19830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 21045 } && test -s conftest.$ac_objext; then
19831 (eval $ac_try) 2>&5
19832 ac_status=$?
19833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19834 (exit $ac_status); }; } &&
19835 { ac_try='test -s conftest.$ac_objext'
19836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19837 (eval $ac_try) 2>&5
19838 ac_status=$?
19839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19840 (exit $ac_status); }; }; then
19841 21046
19842 curl_cv_socklen_t_equiv="$t" 21047 curl_cv_socklen_t_equiv="$t"
19843 break 21048 break
@@ -19846,8 +21051,10 @@ else
19846 echo "$as_me: failed program was:" >&5 21051 echo "$as_me: failed program was:" >&5
19847sed 's/^/| /' conftest.$ac_ext >&5 21052sed 's/^/| /' conftest.$ac_ext >&5
19848 21053
21054
19849fi 21055fi
19850rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 21056
21057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19851 done 21058 done
19852 done 21059 done
19853 21060
@@ -19859,8 +21066,8 @@ echo "$as_me: error: Cannot find a type to use in place of socklen_t" >&2;}
19859 21066
19860fi 21067fi
19861 21068
19862 echo "$as_me:$LINENO: result: $curl_cv_socklen_t_equiv" >&5 21069 { echo "$as_me:$LINENO: result: $curl_cv_socklen_t_equiv" >&5
19863echo "${ECHO_T}$curl_cv_socklen_t_equiv" >&6 21070echo "${ECHO_T}$curl_cv_socklen_t_equiv" >&6; }
19864 21071
19865cat >>confdefs.h <<_ACEOF 21072cat >>confdefs.h <<_ACEOF
19866#define socklen_t $curl_cv_socklen_t_equiv 21073#define socklen_t $curl_cv_socklen_t_equiv
@@ -19870,8 +21077,8 @@ fi
19870 21077
19871 21078
19872 21079
19873echo "$as_me:$LINENO: checking for sig_atomic_t" >&5 21080{ echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
19874echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6 21081echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6; }
19875if test "${ac_cv_type_sig_atomic_t+set}" = set; then 21082if test "${ac_cv_type_sig_atomic_t+set}" = set; then
19876 echo $ECHO_N "(cached) $ECHO_C" >&6 21083 echo $ECHO_N "(cached) $ECHO_C" >&6
19877else 21084else
@@ -19883,50 +21090,47 @@ cat >>conftest.$ac_ext <<_ACEOF
19883/* end confdefs.h. */ 21090/* end confdefs.h. */
19884#include <signal.h> 21091#include <signal.h>
19885 21092
21093typedef sig_atomic_t ac__type_new_;
19886int 21094int
19887main () 21095main ()
19888{ 21096{
19889if ((sig_atomic_t *) 0) 21097if ((ac__type_new_ *) 0)
19890 return 0; 21098 return 0;
19891if (sizeof (sig_atomic_t)) 21099if (sizeof (ac__type_new_))
19892 return 0; 21100 return 0;
19893 ; 21101 ;
19894 return 0; 21102 return 0;
19895} 21103}
19896_ACEOF 21104_ACEOF
19897rm -f conftest.$ac_objext 21105rm -f conftest.$ac_objext
19898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 21106if { (ac_try="$ac_compile"
19899 (eval $ac_compile) 2>conftest.er1 21107case "(($ac_try" in
21108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21109 *) ac_try_echo=$ac_try;;
21110esac
21111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21112 (eval "$ac_compile") 2>conftest.er1
19900 ac_status=$? 21113 ac_status=$?
19901 grep -v '^ *+' conftest.er1 >conftest.err 21114 grep -v '^ *+' conftest.er1 >conftest.err
19902 rm -f conftest.er1 21115 rm -f conftest.er1
19903 cat conftest.err >&5 21116 cat conftest.err >&5
19904 echo "$as_me:$LINENO: \$? = $ac_status" >&5 21117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19905 (exit $ac_status); } && 21118 (exit $ac_status); } && {
19906 { ac_try='test -z "$ac_c_werror_flag" 21119 test -z "$ac_c_werror_flag" ||
19907 || test ! -s conftest.err' 21120 test ! -s conftest.err
19908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 21121 } && test -s conftest.$ac_objext; then
19909 (eval $ac_try) 2>&5
19910 ac_status=$?
19911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19912 (exit $ac_status); }; } &&
19913 { ac_try='test -s conftest.$ac_objext'
19914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19915 (eval $ac_try) 2>&5
19916 ac_status=$?
19917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19918 (exit $ac_status); }; }; then
19919 ac_cv_type_sig_atomic_t=yes 21122 ac_cv_type_sig_atomic_t=yes
19920else 21123else
19921 echo "$as_me: failed program was:" >&5 21124 echo "$as_me: failed program was:" >&5
19922sed 's/^/| /' conftest.$ac_ext >&5 21125sed 's/^/| /' conftest.$ac_ext >&5
19923 21126
19924ac_cv_type_sig_atomic_t=no 21127 ac_cv_type_sig_atomic_t=no
19925fi 21128fi
19926rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 21129
21130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19927fi 21131fi
19928echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5 21132{ echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
19929echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6 21133echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6; }
19930if test $ac_cv_type_sig_atomic_t = yes; then 21134if test $ac_cv_type_sig_atomic_t = yes; then
19931 21135
19932cat >>confdefs.h <<_ACEOF 21136cat >>confdefs.h <<_ACEOF
@@ -19937,8 +21141,8 @@ _ACEOF
19937fi 21141fi
19938 21142
19939 21143
19940echo "$as_me:$LINENO: checking for in_addr_t" >&5 21144{ echo "$as_me:$LINENO: checking for in_addr_t" >&5
19941echo $ECHO_N "checking for in_addr_t... $ECHO_C" >&6 21145echo $ECHO_N "checking for in_addr_t... $ECHO_C" >&6; }
19942if test "${ac_cv_type_in_addr_t+set}" = set; then 21146if test "${ac_cv_type_in_addr_t+set}" = set; then
19943 echo $ECHO_N "(cached) $ECHO_C" >&6 21147 echo $ECHO_N "(cached) $ECHO_C" >&6
19944else 21148else
@@ -19951,50 +21155,47 @@ cat >>conftest.$ac_ext <<_ACEOF
19951#include <sys/types.h> 21155#include <sys/types.h>
19952#include <netinet/in.h> 21156#include <netinet/in.h>
19953 21157
21158typedef in_addr_t ac__type_new_;
19954int 21159int
19955main () 21160main ()
19956{ 21161{
19957if ((in_addr_t *) 0) 21162if ((ac__type_new_ *) 0)
19958 return 0; 21163 return 0;
19959if (sizeof (in_addr_t)) 21164if (sizeof (ac__type_new_))
19960 return 0; 21165 return 0;
19961 ; 21166 ;
19962 return 0; 21167 return 0;
19963} 21168}
19964_ACEOF 21169_ACEOF
19965rm -f conftest.$ac_objext 21170rm -f conftest.$ac_objext
19966if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 21171if { (ac_try="$ac_compile"
19967 (eval $ac_compile) 2>conftest.er1 21172case "(($ac_try" in
21173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21174 *) ac_try_echo=$ac_try;;
21175esac
21176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21177 (eval "$ac_compile") 2>conftest.er1
19968 ac_status=$? 21178 ac_status=$?
19969 grep -v '^ *+' conftest.er1 >conftest.err 21179 grep -v '^ *+' conftest.er1 >conftest.err
19970 rm -f conftest.er1 21180 rm -f conftest.er1
19971 cat conftest.err >&5 21181 cat conftest.err >&5
19972 echo "$as_me:$LINENO: \$? = $ac_status" >&5 21182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19973 (exit $ac_status); } && 21183 (exit $ac_status); } && {
19974 { ac_try='test -z "$ac_c_werror_flag" 21184 test -z "$ac_c_werror_flag" ||
19975 || test ! -s conftest.err' 21185 test ! -s conftest.err
19976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 21186 } && test -s conftest.$ac_objext; then
19977 (eval $ac_try) 2>&5
19978 ac_status=$?
19979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19980 (exit $ac_status); }; } &&
19981 { ac_try='test -s conftest.$ac_objext'
19982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19983 (eval $ac_try) 2>&5
19984 ac_status=$?
19985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19986 (exit $ac_status); }; }; then
19987 ac_cv_type_in_addr_t=yes 21187 ac_cv_type_in_addr_t=yes
19988else 21188else
19989 echo "$as_me: failed program was:" >&5 21189 echo "$as_me: failed program was:" >&5
19990sed 's/^/| /' conftest.$ac_ext >&5 21190sed 's/^/| /' conftest.$ac_ext >&5
19991 21191
19992ac_cv_type_in_addr_t=no 21192 ac_cv_type_in_addr_t=no
19993fi 21193fi
19994rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 21194
21195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19995fi 21196fi
19996echo "$as_me:$LINENO: result: $ac_cv_type_in_addr_t" >&5 21197{ echo "$as_me:$LINENO: result: $ac_cv_type_in_addr_t" >&5
19997echo "${ECHO_T}$ac_cv_type_in_addr_t" >&6 21198echo "${ECHO_T}$ac_cv_type_in_addr_t" >&6; }
19998if test $ac_cv_type_in_addr_t = yes; then 21199if test $ac_cv_type_in_addr_t = yes; then
19999 21200
20000cat >>confdefs.h <<_ACEOF 21201cat >>confdefs.h <<_ACEOF
@@ -20005,8 +21206,8 @@ _ACEOF
20005fi 21206fi
20006 21207
20007 21208
20008echo "$as_me:$LINENO: checking for size_t" >&5 21209{ echo "$as_me:$LINENO: checking for size_t" >&5
20009echo $ECHO_N "checking for size_t... $ECHO_C" >&6 21210echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
20010if test "${ac_cv_have_size_t+set}" = set; then 21211if test "${ac_cv_have_size_t+set}" = set; then
20011 echo $ECHO_N "(cached) $ECHO_C" >&6 21212 echo $ECHO_N "(cached) $ECHO_C" >&6
20012else 21213else
@@ -20029,40 +21230,36 @@ main ()
20029} 21230}
20030_ACEOF 21231_ACEOF
20031rm -f conftest.$ac_objext 21232rm -f conftest.$ac_objext
20032if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 21233if { (ac_try="$ac_compile"
20033 (eval $ac_compile) 2>conftest.er1 21234case "(($ac_try" in
21235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21236 *) ac_try_echo=$ac_try;;
21237esac
21238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21239 (eval "$ac_compile") 2>conftest.er1
20034 ac_status=$? 21240 ac_status=$?
20035 grep -v '^ *+' conftest.er1 >conftest.err 21241 grep -v '^ *+' conftest.er1 >conftest.err
20036 rm -f conftest.er1 21242 rm -f conftest.er1
20037 cat conftest.err >&5 21243 cat conftest.err >&5
20038 echo "$as_me:$LINENO: \$? = $ac_status" >&5 21244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20039 (exit $ac_status); } && 21245 (exit $ac_status); } && {
20040 { ac_try='test -z "$ac_c_werror_flag" 21246 test -z "$ac_c_werror_flag" ||
20041 || test ! -s conftest.err' 21247 test ! -s conftest.err
20042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 21248 } && test -s conftest.$ac_objext; then
20043 (eval $ac_try) 2>&5
20044 ac_status=$?
20045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20046 (exit $ac_status); }; } &&
20047 { ac_try='test -s conftest.$ac_objext'
20048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20049 (eval $ac_try) 2>&5
20050 ac_status=$?
20051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20052 (exit $ac_status); }; }; then
20053 ac_cv_have_size_t="yes" 21249 ac_cv_have_size_t="yes"
20054else 21250else
20055 echo "$as_me: failed program was:" >&5 21251 echo "$as_me: failed program was:" >&5
20056sed 's/^/| /' conftest.$ac_ext >&5 21252sed 's/^/| /' conftest.$ac_ext >&5
20057 21253
20058 ac_cv_have_size_t="no" 21254 ac_cv_have_size_t="no"
20059 21255
20060fi 21256fi
20061rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 21257
21258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20062 21259
20063fi 21260fi
20064echo "$as_me:$LINENO: result: $ac_cv_have_size_t" >&5 21261{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t" >&5
20065echo "${ECHO_T}$ac_cv_have_size_t" >&6 21262echo "${ECHO_T}$ac_cv_have_size_t" >&6; }
20066if test "x$ac_cv_have_size_t" = "xyes" ; then 21263if test "x$ac_cv_have_size_t" = "xyes" ; then
20067 21264
20068cat >>confdefs.h <<\_ACEOF 21265cat >>confdefs.h <<\_ACEOF
@@ -20071,8 +21268,8 @@ _ACEOF
20071 21268
20072fi 21269fi
20073 21270
20074echo "$as_me:$LINENO: checking for ssize_t" >&5 21271{ echo "$as_me:$LINENO: checking for ssize_t" >&5
20075echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 21272echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
20076if test "${ac_cv_have_ssize_t+set}" = set; then 21273if test "${ac_cv_have_ssize_t+set}" = set; then
20077 echo $ECHO_N "(cached) $ECHO_C" >&6 21274 echo $ECHO_N "(cached) $ECHO_C" >&6
20078else 21275else
@@ -20095,40 +21292,36 @@ main ()
20095} 21292}
20096_ACEOF 21293_ACEOF
20097rm -f conftest.$ac_objext 21294rm -f conftest.$ac_objext
20098if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 21295if { (ac_try="$ac_compile"
20099 (eval $ac_compile) 2>conftest.er1 21296case "(($ac_try" in
21297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21298 *) ac_try_echo=$ac_try;;
21299esac
21300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21301 (eval "$ac_compile") 2>conftest.er1
20100 ac_status=$? 21302 ac_status=$?
20101 grep -v '^ *+' conftest.er1 >conftest.err 21303 grep -v '^ *+' conftest.er1 >conftest.err
20102 rm -f conftest.er1 21304 rm -f conftest.er1
20103 cat conftest.err >&5 21305 cat conftest.err >&5
20104 echo "$as_me:$LINENO: \$? = $ac_status" >&5 21306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20105 (exit $ac_status); } && 21307 (exit $ac_status); } && {
20106 { ac_try='test -z "$ac_c_werror_flag" 21308 test -z "$ac_c_werror_flag" ||
20107 || test ! -s conftest.err' 21309 test ! -s conftest.err
20108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 21310 } && test -s conftest.$ac_objext; then
20109 (eval $ac_try) 2>&5
20110 ac_status=$?
20111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20112 (exit $ac_status); }; } &&
20113 { ac_try='test -s conftest.$ac_objext'
20114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20115 (eval $ac_try) 2>&5
20116 ac_status=$?
20117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20118 (exit $ac_status); }; }; then
20119 ac_cv_have_ssize_t="yes" 21311 ac_cv_have_ssize_t="yes"
20120else 21312else
20121 echo "$as_me: failed program was:" >&5 21313 echo "$as_me: failed program was:" >&5
20122sed 's/^/| /' conftest.$ac_ext >&5 21314sed 's/^/| /' conftest.$ac_ext >&5
20123 21315
20124 ac_cv_have_ssize_t="no" 21316 ac_cv_have_ssize_t="no"
20125 21317
20126fi 21318fi
20127rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 21319
21320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20128 21321
20129fi 21322fi
20130echo "$as_me:$LINENO: result: $ac_cv_have_ssize_t" >&5 21323{ echo "$as_me:$LINENO: result: $ac_cv_have_ssize_t" >&5
20131echo "${ECHO_T}$ac_cv_have_ssize_t" >&6 21324echo "${ECHO_T}$ac_cv_have_ssize_t" >&6; }
20132if test "x$ac_cv_have_ssize_t" = "xyes" ; then 21325if test "x$ac_cv_have_ssize_t" = "xyes" ; then
20133 21326
20134cat >>confdefs.h <<\_ACEOF 21327cat >>confdefs.h <<\_ACEOF
@@ -20137,8 +21330,8 @@ _ACEOF
20137 21330
20138fi 21331fi
20139 21332
20140echo "$as_me:$LINENO: checking for clock_t" >&5 21333{ echo "$as_me:$LINENO: checking for clock_t" >&5
20141echo $ECHO_N "checking for clock_t... $ECHO_C" >&6 21334echo $ECHO_N "checking for clock_t... $ECHO_C" >&6; }
20142if test "${ac_cv_have_clock_t+set}" = set; then 21335if test "${ac_cv_have_clock_t+set}" = set; then
20143 echo $ECHO_N "(cached) $ECHO_C" >&6 21336 echo $ECHO_N "(cached) $ECHO_C" >&6
20144else 21337else
@@ -20161,40 +21354,36 @@ main ()
20161} 21354}
20162_ACEOF 21355_ACEOF
20163rm -f conftest.$ac_objext 21356rm -f conftest.$ac_objext
20164if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 21357if { (ac_try="$ac_compile"
20165 (eval $ac_compile) 2>conftest.er1 21358case "(($ac_try" in
21359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21360 *) ac_try_echo=$ac_try;;
21361esac
21362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21363 (eval "$ac_compile") 2>conftest.er1
20166 ac_status=$? 21364 ac_status=$?
20167 grep -v '^ *+' conftest.er1 >conftest.err 21365 grep -v '^ *+' conftest.er1 >conftest.err
20168 rm -f conftest.er1 21366 rm -f conftest.er1
20169 cat conftest.err >&5 21367 cat conftest.err >&5
20170 echo "$as_me:$LINENO: \$? = $ac_status" >&5 21368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20171 (exit $ac_status); } && 21369 (exit $ac_status); } && {
20172 { ac_try='test -z "$ac_c_werror_flag" 21370 test -z "$ac_c_werror_flag" ||
20173 || test ! -s conftest.err' 21371 test ! -s conftest.err
20174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 21372 } && test -s conftest.$ac_objext; then
20175 (eval $ac_try) 2>&5
20176 ac_status=$?
20177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20178 (exit $ac_status); }; } &&
20179 { ac_try='test -s conftest.$ac_objext'
20180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20181 (eval $ac_try) 2>&5
20182 ac_status=$?
20183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20184 (exit $ac_status); }; }; then
20185 ac_cv_have_clock_t="yes" 21373 ac_cv_have_clock_t="yes"
20186else 21374else
20187 echo "$as_me: failed program was:" >&5 21375 echo "$as_me: failed program was:" >&5
20188sed 's/^/| /' conftest.$ac_ext >&5 21376sed 's/^/| /' conftest.$ac_ext >&5
20189 21377
20190 ac_cv_have_clock_t="no" 21378 ac_cv_have_clock_t="no"
20191 21379
20192fi 21380fi
20193rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 21381
21382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20194 21383
20195fi 21384fi
20196echo "$as_me:$LINENO: result: $ac_cv_have_clock_t" >&5 21385{ echo "$as_me:$LINENO: result: $ac_cv_have_clock_t" >&5
20197echo "${ECHO_T}$ac_cv_have_clock_t" >&6 21386echo "${ECHO_T}$ac_cv_have_clock_t" >&6; }
20198if test "x$ac_cv_have_clock_t" = "xyes" ; then 21387if test "x$ac_cv_have_clock_t" = "xyes" ; then
20199 21388
20200cat >>confdefs.h <<\_ACEOF 21389cat >>confdefs.h <<\_ACEOF
@@ -20203,8 +21392,8 @@ _ACEOF
20203 21392
20204fi 21393fi
20205 21394
20206echo "$as_me:$LINENO: checking for sa_family_t" >&5 21395{ echo "$as_me:$LINENO: checking for sa_family_t" >&5
20207echo $ECHO_N "checking for sa_family_t... $ECHO_C" >&6 21396echo $ECHO_N "checking for sa_family_t... $ECHO_C" >&6; }
20208if test "${ac_cv_have_sa_family_t+set}" = set; then 21397if test "${ac_cv_have_sa_family_t+set}" = set; then
20209 echo $ECHO_N "(cached) $ECHO_C" >&6 21398 echo $ECHO_N "(cached) $ECHO_C" >&6
20210else 21399else
@@ -20228,33 +21417,28 @@ main ()
20228} 21417}
20229_ACEOF 21418_ACEOF
20230rm -f conftest.$ac_objext 21419rm -f conftest.$ac_objext
20231if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 21420if { (ac_try="$ac_compile"
20232 (eval $ac_compile) 2>conftest.er1 21421case "(($ac_try" in
21422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21423 *) ac_try_echo=$ac_try;;
21424esac
21425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21426 (eval "$ac_compile") 2>conftest.er1
20233 ac_status=$? 21427 ac_status=$?
20234 grep -v '^ *+' conftest.er1 >conftest.err 21428 grep -v '^ *+' conftest.er1 >conftest.err
20235 rm -f conftest.er1 21429 rm -f conftest.er1
20236 cat conftest.err >&5 21430 cat conftest.err >&5
20237 echo "$as_me:$LINENO: \$? = $ac_status" >&5 21431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20238 (exit $ac_status); } && 21432 (exit $ac_status); } && {
20239 { ac_try='test -z "$ac_c_werror_flag" 21433 test -z "$ac_c_werror_flag" ||
20240 || test ! -s conftest.err' 21434 test ! -s conftest.err
20241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 21435 } && test -s conftest.$ac_objext; then
20242 (eval $ac_try) 2>&5
20243 ac_status=$?
20244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20245 (exit $ac_status); }; } &&
20246 { ac_try='test -s conftest.$ac_objext'
20247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20248 (eval $ac_try) 2>&5
20249 ac_status=$?
20250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20251 (exit $ac_status); }; }; then
20252 ac_cv_have_sa_family_t="yes" 21436 ac_cv_have_sa_family_t="yes"
20253else 21437else
20254 echo "$as_me: failed program was:" >&5 21438 echo "$as_me: failed program was:" >&5
20255sed 's/^/| /' conftest.$ac_ext >&5 21439sed 's/^/| /' conftest.$ac_ext >&5
20256 21440
20257 cat >conftest.$ac_ext <<_ACEOF 21441 cat >conftest.$ac_ext <<_ACEOF
20258/* confdefs.h. */ 21442/* confdefs.h. */
20259_ACEOF 21443_ACEOF
20260cat confdefs.h >>conftest.$ac_ext 21444cat confdefs.h >>conftest.$ac_ext
@@ -20274,43 +21458,40 @@ main ()
20274} 21458}
20275_ACEOF 21459_ACEOF
20276rm -f conftest.$ac_objext 21460rm -f conftest.$ac_objext
20277if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 21461if { (ac_try="$ac_compile"
20278 (eval $ac_compile) 2>conftest.er1 21462case "(($ac_try" in
21463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21464 *) ac_try_echo=$ac_try;;
21465esac
21466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21467 (eval "$ac_compile") 2>conftest.er1
20279 ac_status=$? 21468 ac_status=$?
20280 grep -v '^ *+' conftest.er1 >conftest.err 21469 grep -v '^ *+' conftest.er1 >conftest.err
20281 rm -f conftest.er1 21470 rm -f conftest.er1
20282 cat conftest.err >&5 21471 cat conftest.err >&5
20283 echo "$as_me:$LINENO: \$? = $ac_status" >&5 21472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20284 (exit $ac_status); } && 21473 (exit $ac_status); } && {
20285 { ac_try='test -z "$ac_c_werror_flag" 21474 test -z "$ac_c_werror_flag" ||
20286 || test ! -s conftest.err' 21475 test ! -s conftest.err
20287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 21476 } && test -s conftest.$ac_objext; then
20288 (eval $ac_try) 2>&5
20289 ac_status=$?
20290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20291 (exit $ac_status); }; } &&
20292 { ac_try='test -s conftest.$ac_objext'
20293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20294 (eval $ac_try) 2>&5
20295 ac_status=$?
20296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20297 (exit $ac_status); }; }; then
20298 ac_cv_have_sa_family_t="yes" 21477 ac_cv_have_sa_family_t="yes"
20299else 21478else
20300 echo "$as_me: failed program was:" >&5 21479 echo "$as_me: failed program was:" >&5
20301sed 's/^/| /' conftest.$ac_ext >&5 21480sed 's/^/| /' conftest.$ac_ext >&5
20302 21481
20303 ac_cv_have_sa_family_t="no" 21482 ac_cv_have_sa_family_t="no"
20304 21483
20305fi 21484fi
20306rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 21485
21486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20307 21487
20308fi 21488fi
20309rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 21489
21490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20310 21491
20311fi 21492fi
20312echo "$as_me:$LINENO: result: $ac_cv_have_sa_family_t" >&5 21493{ echo "$as_me:$LINENO: result: $ac_cv_have_sa_family_t" >&5
20313echo "${ECHO_T}$ac_cv_have_sa_family_t" >&6 21494echo "${ECHO_T}$ac_cv_have_sa_family_t" >&6; }
20314if test "x$ac_cv_have_sa_family_t" = "xyes" ; then 21495if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
20315 21496
20316cat >>confdefs.h <<\_ACEOF 21497cat >>confdefs.h <<\_ACEOF
@@ -20319,8 +21500,8 @@ _ACEOF
20319 21500
20320fi 21501fi
20321 21502
20322echo "$as_me:$LINENO: checking for pid_t" >&5 21503{ echo "$as_me:$LINENO: checking for pid_t" >&5
20323echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 21504echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
20324if test "${ac_cv_have_pid_t+set}" = set; then 21505if test "${ac_cv_have_pid_t+set}" = set; then
20325 echo $ECHO_N "(cached) $ECHO_C" >&6 21506 echo $ECHO_N "(cached) $ECHO_C" >&6
20326else 21507else
@@ -20343,40 +21524,36 @@ main ()
20343} 21524}
20344_ACEOF 21525_ACEOF
20345rm -f conftest.$ac_objext 21526rm -f conftest.$ac_objext
20346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 21527if { (ac_try="$ac_compile"
20347 (eval $ac_compile) 2>conftest.er1 21528case "(($ac_try" in
21529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21530 *) ac_try_echo=$ac_try;;
21531esac
21532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21533 (eval "$ac_compile") 2>conftest.er1
20348 ac_status=$? 21534 ac_status=$?
20349 grep -v '^ *+' conftest.er1 >conftest.err 21535 grep -v '^ *+' conftest.er1 >conftest.err
20350 rm -f conftest.er1 21536 rm -f conftest.er1
20351 cat conftest.err >&5 21537 cat conftest.err >&5
20352 echo "$as_me:$LINENO: \$? = $ac_status" >&5 21538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20353 (exit $ac_status); } && 21539 (exit $ac_status); } && {
20354 { ac_try='test -z "$ac_c_werror_flag" 21540 test -z "$ac_c_werror_flag" ||
20355 || test ! -s conftest.err' 21541 test ! -s conftest.err
20356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 21542 } && test -s conftest.$ac_objext; then
20357 (eval $ac_try) 2>&5
20358 ac_status=$?
20359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20360 (exit $ac_status); }; } &&
20361 { ac_try='test -s conftest.$ac_objext'
20362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20363 (eval $ac_try) 2>&5
20364 ac_status=$?
20365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20366 (exit $ac_status); }; }; then
20367 ac_cv_have_pid_t="yes" 21543 ac_cv_have_pid_t="yes"
20368else 21544else
20369 echo "$as_me: failed program was:" >&5 21545 echo "$as_me: failed program was:" >&5
20370sed 's/^/| /' conftest.$ac_ext >&5 21546sed 's/^/| /' conftest.$ac_ext >&5
20371 21547
20372 ac_cv_have_pid_t="no" 21548 ac_cv_have_pid_t="no"
20373 21549
20374fi 21550fi
20375rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 21551
21552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20376 21553
20377fi 21554fi
20378echo "$as_me:$LINENO: result: $ac_cv_have_pid_t" >&5 21555{ echo "$as_me:$LINENO: result: $ac_cv_have_pid_t" >&5
20379echo "${ECHO_T}$ac_cv_have_pid_t" >&6 21556echo "${ECHO_T}$ac_cv_have_pid_t" >&6; }
20380if test "x$ac_cv_have_pid_t" = "xyes" ; then 21557if test "x$ac_cv_have_pid_t" = "xyes" ; then
20381 21558
20382cat >>confdefs.h <<\_ACEOF 21559cat >>confdefs.h <<\_ACEOF
@@ -20385,8 +21562,8 @@ _ACEOF
20385 21562
20386fi 21563fi
20387 21564
20388echo "$as_me:$LINENO: checking for mode_t" >&5 21565{ echo "$as_me:$LINENO: checking for mode_t" >&5
20389echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 21566echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
20390if test "${ac_cv_have_mode_t+set}" = set; then 21567if test "${ac_cv_have_mode_t+set}" = set; then
20391 echo $ECHO_N "(cached) $ECHO_C" >&6 21568 echo $ECHO_N "(cached) $ECHO_C" >&6
20392else 21569else
@@ -20409,40 +21586,36 @@ main ()
20409} 21586}
20410_ACEOF 21587_ACEOF
20411rm -f conftest.$ac_objext 21588rm -f conftest.$ac_objext
20412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 21589if { (ac_try="$ac_compile"
20413 (eval $ac_compile) 2>conftest.er1 21590case "(($ac_try" in
21591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21592 *) ac_try_echo=$ac_try;;
21593esac
21594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21595 (eval "$ac_compile") 2>conftest.er1
20414 ac_status=$? 21596 ac_status=$?
20415 grep -v '^ *+' conftest.er1 >conftest.err 21597 grep -v '^ *+' conftest.er1 >conftest.err
20416 rm -f conftest.er1 21598 rm -f conftest.er1
20417 cat conftest.err >&5 21599 cat conftest.err >&5
20418 echo "$as_me:$LINENO: \$? = $ac_status" >&5 21600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20419 (exit $ac_status); } && 21601 (exit $ac_status); } && {
20420 { ac_try='test -z "$ac_c_werror_flag" 21602 test -z "$ac_c_werror_flag" ||
20421 || test ! -s conftest.err' 21603 test ! -s conftest.err
20422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 21604 } && test -s conftest.$ac_objext; then
20423 (eval $ac_try) 2>&5
20424 ac_status=$?
20425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20426 (exit $ac_status); }; } &&
20427 { ac_try='test -s conftest.$ac_objext'
20428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20429 (eval $ac_try) 2>&5
20430 ac_status=$?
20431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20432 (exit $ac_status); }; }; then
20433 ac_cv_have_mode_t="yes" 21605 ac_cv_have_mode_t="yes"
20434else 21606else
20435 echo "$as_me: failed program was:" >&5 21607 echo "$as_me: failed program was:" >&5
20436sed 's/^/| /' conftest.$ac_ext >&5 21608sed 's/^/| /' conftest.$ac_ext >&5
20437 21609
20438 ac_cv_have_mode_t="no" 21610 ac_cv_have_mode_t="no"
20439 21611
20440fi 21612fi
20441rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 21613
21614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20442 21615
20443fi 21616fi
20444echo "$as_me:$LINENO: result: $ac_cv_have_mode_t" >&5 21617{ echo "$as_me:$LINENO: result: $ac_cv_have_mode_t" >&5
20445echo "${ECHO_T}$ac_cv_have_mode_t" >&6 21618echo "${ECHO_T}$ac_cv_have_mode_t" >&6; }
20446if test "x$ac_cv_have_mode_t" = "xyes" ; then 21619if test "x$ac_cv_have_mode_t" = "xyes" ; then
20447 21620
20448cat >>confdefs.h <<\_ACEOF 21621cat >>confdefs.h <<\_ACEOF
@@ -20452,8 +21625,8 @@ _ACEOF
20452fi 21625fi
20453 21626
20454 21627
20455echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5 21628{ echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
20456echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6 21629echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6; }
20457if test "${ac_cv_have_struct_sockaddr_storage+set}" = set; then 21630if test "${ac_cv_have_struct_sockaddr_storage+set}" = set; then
20458 echo $ECHO_N "(cached) $ECHO_C" >&6 21631 echo $ECHO_N "(cached) $ECHO_C" >&6
20459else 21632else
@@ -20477,40 +21650,36 @@ main ()
20477} 21650}
20478_ACEOF 21651_ACEOF
20479rm -f conftest.$ac_objext 21652rm -f conftest.$ac_objext
20480if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 21653if { (ac_try="$ac_compile"
20481 (eval $ac_compile) 2>conftest.er1 21654case "(($ac_try" in
21655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21656 *) ac_try_echo=$ac_try;;
21657esac
21658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21659 (eval "$ac_compile") 2>conftest.er1
20482 ac_status=$? 21660 ac_status=$?
20483 grep -v '^ *+' conftest.er1 >conftest.err 21661 grep -v '^ *+' conftest.er1 >conftest.err
20484 rm -f conftest.er1 21662 rm -f conftest.er1
20485 cat conftest.err >&5 21663 cat conftest.err >&5
20486 echo "$as_me:$LINENO: \$? = $ac_status" >&5 21664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20487 (exit $ac_status); } && 21665 (exit $ac_status); } && {
20488 { ac_try='test -z "$ac_c_werror_flag" 21666 test -z "$ac_c_werror_flag" ||
20489 || test ! -s conftest.err' 21667 test ! -s conftest.err
20490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 21668 } && test -s conftest.$ac_objext; then
20491 (eval $ac_try) 2>&5
20492 ac_status=$?
20493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20494 (exit $ac_status); }; } &&
20495 { ac_try='test -s conftest.$ac_objext'
20496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20497 (eval $ac_try) 2>&5
20498 ac_status=$?
20499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20500 (exit $ac_status); }; }; then
20501 ac_cv_have_struct_sockaddr_storage="yes" 21669 ac_cv_have_struct_sockaddr_storage="yes"
20502else 21670else
20503 echo "$as_me: failed program was:" >&5 21671 echo "$as_me: failed program was:" >&5
20504sed 's/^/| /' conftest.$ac_ext >&5 21672sed 's/^/| /' conftest.$ac_ext >&5
20505 21673
20506 ac_cv_have_struct_sockaddr_storage="no" 21674 ac_cv_have_struct_sockaddr_storage="no"
20507 21675
20508fi 21676fi
20509rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 21677
21678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20510 21679
20511fi 21680fi
20512echo "$as_me:$LINENO: result: $ac_cv_have_struct_sockaddr_storage" >&5 21681{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_sockaddr_storage" >&5
20513echo "${ECHO_T}$ac_cv_have_struct_sockaddr_storage" >&6 21682echo "${ECHO_T}$ac_cv_have_struct_sockaddr_storage" >&6; }
20514if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then 21683if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
20515 21684
20516cat >>confdefs.h <<\_ACEOF 21685cat >>confdefs.h <<\_ACEOF
@@ -20519,8 +21688,8 @@ _ACEOF
20519 21688
20520fi 21689fi
20521 21690
20522echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5 21691{ echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
20523echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6 21692echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6; }
20524if test "${ac_cv_have_struct_sockaddr_in6+set}" = set; then 21693if test "${ac_cv_have_struct_sockaddr_in6+set}" = set; then
20525 echo $ECHO_N "(cached) $ECHO_C" >&6 21694 echo $ECHO_N "(cached) $ECHO_C" >&6
20526else 21695else
@@ -20544,40 +21713,36 @@ main ()
20544} 21713}
20545_ACEOF 21714_ACEOF
20546rm -f conftest.$ac_objext 21715rm -f conftest.$ac_objext
20547if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 21716if { (ac_try="$ac_compile"
20548 (eval $ac_compile) 2>conftest.er1 21717case "(($ac_try" in
21718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21719 *) ac_try_echo=$ac_try;;
21720esac
21721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21722 (eval "$ac_compile") 2>conftest.er1
20549 ac_status=$? 21723 ac_status=$?
20550 grep -v '^ *+' conftest.er1 >conftest.err 21724 grep -v '^ *+' conftest.er1 >conftest.err
20551 rm -f conftest.er1 21725 rm -f conftest.er1
20552 cat conftest.err >&5 21726 cat conftest.err >&5
20553 echo "$as_me:$LINENO: \$? = $ac_status" >&5 21727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20554 (exit $ac_status); } && 21728 (exit $ac_status); } && {
20555 { ac_try='test -z "$ac_c_werror_flag" 21729 test -z "$ac_c_werror_flag" ||
20556 || test ! -s conftest.err' 21730 test ! -s conftest.err
20557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 21731 } && test -s conftest.$ac_objext; then
20558 (eval $ac_try) 2>&5
20559 ac_status=$?
20560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20561 (exit $ac_status); }; } &&
20562 { ac_try='test -s conftest.$ac_objext'
20563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20564 (eval $ac_try) 2>&5
20565 ac_status=$?
20566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20567 (exit $ac_status); }; }; then
20568 ac_cv_have_struct_sockaddr_in6="yes" 21732 ac_cv_have_struct_sockaddr_in6="yes"
20569else 21733else
20570 echo "$as_me: failed program was:" >&5 21734 echo "$as_me: failed program was:" >&5
20571sed 's/^/| /' conftest.$ac_ext >&5 21735sed 's/^/| /' conftest.$ac_ext >&5
20572 21736
20573 ac_cv_have_struct_sockaddr_in6="no" 21737 ac_cv_have_struct_sockaddr_in6="no"
20574 21738
20575fi 21739fi
20576rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 21740
21741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20577 21742
20578fi 21743fi
20579echo "$as_me:$LINENO: result: $ac_cv_have_struct_sockaddr_in6" >&5 21744{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_sockaddr_in6" >&5
20580echo "${ECHO_T}$ac_cv_have_struct_sockaddr_in6" >&6 21745echo "${ECHO_T}$ac_cv_have_struct_sockaddr_in6" >&6; }
20581if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then 21746if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
20582 21747
20583cat >>confdefs.h <<\_ACEOF 21748cat >>confdefs.h <<\_ACEOF
@@ -20586,8 +21751,8 @@ _ACEOF
20586 21751
20587fi 21752fi
20588 21753
20589echo "$as_me:$LINENO: checking for struct in6_addr" >&5 21754{ echo "$as_me:$LINENO: checking for struct in6_addr" >&5
20590echo $ECHO_N "checking for struct in6_addr... $ECHO_C" >&6 21755echo $ECHO_N "checking for struct in6_addr... $ECHO_C" >&6; }
20591if test "${ac_cv_have_struct_in6_addr+set}" = set; then 21756if test "${ac_cv_have_struct_in6_addr+set}" = set; then
20592 echo $ECHO_N "(cached) $ECHO_C" >&6 21757 echo $ECHO_N "(cached) $ECHO_C" >&6
20593else 21758else
@@ -20611,40 +21776,36 @@ main ()
20611} 21776}
20612_ACEOF 21777_ACEOF
20613rm -f conftest.$ac_objext 21778rm -f conftest.$ac_objext
20614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 21779if { (ac_try="$ac_compile"
20615 (eval $ac_compile) 2>conftest.er1 21780case "(($ac_try" in
21781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21782 *) ac_try_echo=$ac_try;;
21783esac
21784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21785 (eval "$ac_compile") 2>conftest.er1
20616 ac_status=$? 21786 ac_status=$?
20617 grep -v '^ *+' conftest.er1 >conftest.err 21787 grep -v '^ *+' conftest.er1 >conftest.err
20618 rm -f conftest.er1 21788 rm -f conftest.er1
20619 cat conftest.err >&5 21789 cat conftest.err >&5
20620 echo "$as_me:$LINENO: \$? = $ac_status" >&5 21790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20621 (exit $ac_status); } && 21791 (exit $ac_status); } && {
20622 { ac_try='test -z "$ac_c_werror_flag" 21792 test -z "$ac_c_werror_flag" ||
20623 || test ! -s conftest.err' 21793 test ! -s conftest.err
20624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 21794 } && test -s conftest.$ac_objext; then
20625 (eval $ac_try) 2>&5
20626 ac_status=$?
20627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20628 (exit $ac_status); }; } &&
20629 { ac_try='test -s conftest.$ac_objext'
20630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20631 (eval $ac_try) 2>&5
20632 ac_status=$?
20633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20634 (exit $ac_status); }; }; then
20635 ac_cv_have_struct_in6_addr="yes" 21795 ac_cv_have_struct_in6_addr="yes"
20636else 21796else
20637 echo "$as_me: failed program was:" >&5 21797 echo "$as_me: failed program was:" >&5
20638sed 's/^/| /' conftest.$ac_ext >&5 21798sed 's/^/| /' conftest.$ac_ext >&5
20639 21799
20640 ac_cv_have_struct_in6_addr="no" 21800 ac_cv_have_struct_in6_addr="no"
20641 21801
20642fi 21802fi
20643rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 21803
21804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20644 21805
20645fi 21806fi
20646echo "$as_me:$LINENO: result: $ac_cv_have_struct_in6_addr" >&5 21807{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_in6_addr" >&5
20647echo "${ECHO_T}$ac_cv_have_struct_in6_addr" >&6 21808echo "${ECHO_T}$ac_cv_have_struct_in6_addr" >&6; }
20648if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then 21809if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
20649 21810
20650cat >>confdefs.h <<\_ACEOF 21811cat >>confdefs.h <<\_ACEOF
@@ -20653,8 +21814,8 @@ _ACEOF
20653 21814
20654fi 21815fi
20655 21816
20656echo "$as_me:$LINENO: checking for struct addrinfo" >&5 21817{ echo "$as_me:$LINENO: checking for struct addrinfo" >&5
20657echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6 21818echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6; }
20658if test "${ac_cv_have_struct_addrinfo+set}" = set; then 21819if test "${ac_cv_have_struct_addrinfo+set}" = set; then
20659 echo $ECHO_N "(cached) $ECHO_C" >&6 21820 echo $ECHO_N "(cached) $ECHO_C" >&6
20660else 21821else
@@ -20679,40 +21840,36 @@ main ()
20679} 21840}
20680_ACEOF 21841_ACEOF
20681rm -f conftest.$ac_objext 21842rm -f conftest.$ac_objext
20682if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 21843if { (ac_try="$ac_compile"
20683 (eval $ac_compile) 2>conftest.er1 21844case "(($ac_try" in
21845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21846 *) ac_try_echo=$ac_try;;
21847esac
21848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21849 (eval "$ac_compile") 2>conftest.er1
20684 ac_status=$? 21850 ac_status=$?
20685 grep -v '^ *+' conftest.er1 >conftest.err 21851 grep -v '^ *+' conftest.er1 >conftest.err
20686 rm -f conftest.er1 21852 rm -f conftest.er1
20687 cat conftest.err >&5 21853 cat conftest.err >&5
20688 echo "$as_me:$LINENO: \$? = $ac_status" >&5 21854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20689 (exit $ac_status); } && 21855 (exit $ac_status); } && {
20690 { ac_try='test -z "$ac_c_werror_flag" 21856 test -z "$ac_c_werror_flag" ||
20691 || test ! -s conftest.err' 21857 test ! -s conftest.err
20692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 21858 } && test -s conftest.$ac_objext; then
20693 (eval $ac_try) 2>&5
20694 ac_status=$?
20695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20696 (exit $ac_status); }; } &&
20697 { ac_try='test -s conftest.$ac_objext'
20698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20699 (eval $ac_try) 2>&5
20700 ac_status=$?
20701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20702 (exit $ac_status); }; }; then
20703 ac_cv_have_struct_addrinfo="yes" 21859 ac_cv_have_struct_addrinfo="yes"
20704else 21860else
20705 echo "$as_me: failed program was:" >&5 21861 echo "$as_me: failed program was:" >&5
20706sed 's/^/| /' conftest.$ac_ext >&5 21862sed 's/^/| /' conftest.$ac_ext >&5
20707 21863
20708 ac_cv_have_struct_addrinfo="no" 21864 ac_cv_have_struct_addrinfo="no"
20709 21865
20710fi 21866fi
20711rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 21867
21868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20712 21869
20713fi 21870fi
20714echo "$as_me:$LINENO: result: $ac_cv_have_struct_addrinfo" >&5 21871{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_addrinfo" >&5
20715echo "${ECHO_T}$ac_cv_have_struct_addrinfo" >&6 21872echo "${ECHO_T}$ac_cv_have_struct_addrinfo" >&6; }
20716if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then 21873if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
20717 21874
20718cat >>confdefs.h <<\_ACEOF 21875cat >>confdefs.h <<\_ACEOF
@@ -20721,8 +21878,8 @@ _ACEOF
20721 21878
20722fi 21879fi
20723 21880
20724echo "$as_me:$LINENO: checking for struct timeval" >&5 21881{ echo "$as_me:$LINENO: checking for struct timeval" >&5
20725echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6 21882echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
20726if test "${ac_cv_have_struct_timeval+set}" = set; then 21883if test "${ac_cv_have_struct_timeval+set}" = set; then
20727 echo $ECHO_N "(cached) $ECHO_C" >&6 21884 echo $ECHO_N "(cached) $ECHO_C" >&6
20728else 21885else
@@ -20743,40 +21900,36 @@ main ()
20743} 21900}
20744_ACEOF 21901_ACEOF
20745rm -f conftest.$ac_objext 21902rm -f conftest.$ac_objext
20746if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 21903if { (ac_try="$ac_compile"
20747 (eval $ac_compile) 2>conftest.er1 21904case "(($ac_try" in
21905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21906 *) ac_try_echo=$ac_try;;
21907esac
21908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21909 (eval "$ac_compile") 2>conftest.er1
20748 ac_status=$? 21910 ac_status=$?
20749 grep -v '^ *+' conftest.er1 >conftest.err 21911 grep -v '^ *+' conftest.er1 >conftest.err
20750 rm -f conftest.er1 21912 rm -f conftest.er1
20751 cat conftest.err >&5 21913 cat conftest.err >&5
20752 echo "$as_me:$LINENO: \$? = $ac_status" >&5 21914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20753 (exit $ac_status); } && 21915 (exit $ac_status); } && {
20754 { ac_try='test -z "$ac_c_werror_flag" 21916 test -z "$ac_c_werror_flag" ||
20755 || test ! -s conftest.err' 21917 test ! -s conftest.err
20756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 21918 } && test -s conftest.$ac_objext; then
20757 (eval $ac_try) 2>&5
20758 ac_status=$?
20759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20760 (exit $ac_status); }; } &&
20761 { ac_try='test -s conftest.$ac_objext'
20762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20763 (eval $ac_try) 2>&5
20764 ac_status=$?
20765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20766 (exit $ac_status); }; }; then
20767 ac_cv_have_struct_timeval="yes" 21919 ac_cv_have_struct_timeval="yes"
20768else 21920else
20769 echo "$as_me: failed program was:" >&5 21921 echo "$as_me: failed program was:" >&5
20770sed 's/^/| /' conftest.$ac_ext >&5 21922sed 's/^/| /' conftest.$ac_ext >&5
20771 21923
20772 ac_cv_have_struct_timeval="no" 21924 ac_cv_have_struct_timeval="no"
20773 21925
20774fi 21926fi
20775rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 21927
21928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20776 21929
20777fi 21930fi
20778echo "$as_me:$LINENO: result: $ac_cv_have_struct_timeval" >&5 21931{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_timeval" >&5
20779echo "${ECHO_T}$ac_cv_have_struct_timeval" >&6 21932echo "${ECHO_T}$ac_cv_have_struct_timeval" >&6; }
20780if test "x$ac_cv_have_struct_timeval" = "xyes" ; then 21933if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
20781 21934
20782cat >>confdefs.h <<\_ACEOF 21935cat >>confdefs.h <<\_ACEOF
@@ -20786,8 +21939,8 @@ _ACEOF
20786 have_struct_timeval=1 21939 have_struct_timeval=1
20787fi 21940fi
20788 21941
20789echo "$as_me:$LINENO: checking for struct timespec" >&5 21942{ echo "$as_me:$LINENO: checking for struct timespec" >&5
20790echo $ECHO_N "checking for struct timespec... $ECHO_C" >&6 21943echo $ECHO_N "checking for struct timespec... $ECHO_C" >&6; }
20791if test "${ac_cv_type_struct_timespec+set}" = set; then 21944if test "${ac_cv_type_struct_timespec+set}" = set; then
20792 echo $ECHO_N "(cached) $ECHO_C" >&6 21945 echo $ECHO_N "(cached) $ECHO_C" >&6
20793else 21946else
@@ -20798,50 +21951,47 @@ cat confdefs.h >>conftest.$ac_ext
20798cat >>conftest.$ac_ext <<_ACEOF 21951cat >>conftest.$ac_ext <<_ACEOF
20799/* end confdefs.h. */ 21952/* end confdefs.h. */
20800$ac_includes_default 21953$ac_includes_default
21954typedef struct timespec ac__type_new_;
20801int 21955int
20802main () 21956main ()
20803{ 21957{
20804if ((struct timespec *) 0) 21958if ((ac__type_new_ *) 0)
20805 return 0; 21959 return 0;
20806if (sizeof (struct timespec)) 21960if (sizeof (ac__type_new_))
20807 return 0; 21961 return 0;
20808 ; 21962 ;
20809 return 0; 21963 return 0;
20810} 21964}
20811_ACEOF 21965_ACEOF
20812rm -f conftest.$ac_objext 21966rm -f conftest.$ac_objext
20813if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 21967if { (ac_try="$ac_compile"
20814 (eval $ac_compile) 2>conftest.er1 21968case "(($ac_try" in
21969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21970 *) ac_try_echo=$ac_try;;
21971esac
21972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21973 (eval "$ac_compile") 2>conftest.er1
20815 ac_status=$? 21974 ac_status=$?
20816 grep -v '^ *+' conftest.er1 >conftest.err 21975 grep -v '^ *+' conftest.er1 >conftest.err
20817 rm -f conftest.er1 21976 rm -f conftest.er1
20818 cat conftest.err >&5 21977 cat conftest.err >&5
20819 echo "$as_me:$LINENO: \$? = $ac_status" >&5 21978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20820 (exit $ac_status); } && 21979 (exit $ac_status); } && {
20821 { ac_try='test -z "$ac_c_werror_flag" 21980 test -z "$ac_c_werror_flag" ||
20822 || test ! -s conftest.err' 21981 test ! -s conftest.err
20823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 21982 } && test -s conftest.$ac_objext; then
20824 (eval $ac_try) 2>&5
20825 ac_status=$?
20826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20827 (exit $ac_status); }; } &&
20828 { ac_try='test -s conftest.$ac_objext'
20829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20830 (eval $ac_try) 2>&5
20831 ac_status=$?
20832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20833 (exit $ac_status); }; }; then
20834 ac_cv_type_struct_timespec=yes 21983 ac_cv_type_struct_timespec=yes
20835else 21984else
20836 echo "$as_me: failed program was:" >&5 21985 echo "$as_me: failed program was:" >&5
20837sed 's/^/| /' conftest.$ac_ext >&5 21986sed 's/^/| /' conftest.$ac_ext >&5
20838 21987
20839ac_cv_type_struct_timespec=no 21988 ac_cv_type_struct_timespec=no
20840fi 21989fi
20841rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 21990
21991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20842fi 21992fi
20843echo "$as_me:$LINENO: result: $ac_cv_type_struct_timespec" >&5 21993{ echo "$as_me:$LINENO: result: $ac_cv_type_struct_timespec" >&5
20844echo "${ECHO_T}$ac_cv_type_struct_timespec" >&6 21994echo "${ECHO_T}$ac_cv_type_struct_timespec" >&6; }
20845if test $ac_cv_type_struct_timespec = yes; then 21995if test $ac_cv_type_struct_timespec = yes; then
20846 21996
20847cat >>confdefs.h <<_ACEOF 21997cat >>confdefs.h <<_ACEOF
@@ -20898,13 +22048,22 @@ main() { exit(0); }
20898 22048
20899_ACEOF 22049_ACEOF
20900rm -f conftest$ac_exeext 22050rm -f conftest$ac_exeext
20901if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 22051if { (ac_try="$ac_link"
20902 (eval $ac_link) 2>&5 22052case "(($ac_try" in
22053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22054 *) ac_try_echo=$ac_try;;
22055esac
22056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22057 (eval "$ac_link") 2>&5
20903 ac_status=$? 22058 ac_status=$?
20904 echo "$as_me:$LINENO: \$? = $ac_status" >&5 22059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20905 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 22060 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 22061 { (case "(($ac_try" in
20907 (eval $ac_try) 2>&5 22062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22063 *) ac_try_echo=$ac_try;;
22064esac
22065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22066 (eval "$ac_try") 2>&5
20908 ac_status=$? 22067 ac_status=$?
20909 echo "$as_me:$LINENO: \$? = $ac_status" >&5 22068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20910 (exit $ac_status); }; }; then 22069 (exit $ac_status); }; }; then
@@ -20920,17 +22079,19 @@ sed 's/^/| /' conftest.$ac_ext >&5
20920_ACEOF 22079_ACEOF
20921 22080
20922fi 22081fi
20923rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 22082rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20924fi 22083fi
22084
22085
20925fi 22086fi
20926 22087
20927 22088
20928# look for field 'ut_host' in header 'utmp.h' 22089# look for field 'ut_host' in header 'utmp.h'
20929 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 22090 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
20930 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host 22091 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
20931 echo "$as_me:$LINENO: checking for ut_host field in utmp.h" >&5 22092 { echo "$as_me:$LINENO: checking for ut_host field in utmp.h" >&5
20932echo $ECHO_N "checking for ut_host field in utmp.h... $ECHO_C" >&6 22093echo $ECHO_N "checking for ut_host field in utmp.h... $ECHO_C" >&6; }
20933 if eval "test \"\${$ossh_varname+set}\" = set"; then 22094 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
20934 echo $ECHO_N "(cached) $ECHO_C" >&6 22095 echo $ECHO_N "(cached) $ECHO_C" >&6
20935else 22096else
20936 22097
@@ -20955,8 +22116,8 @@ fi
20955 22116
20956 ossh_result=`eval 'echo $'"$ossh_varname"` 22117 ossh_result=`eval 'echo $'"$ossh_varname"`
20957 if test -n "`echo $ossh_varname`"; then 22118 if test -n "`echo $ossh_varname`"; then
20958 echo "$as_me:$LINENO: result: $ossh_result" >&5 22119 { echo "$as_me:$LINENO: result: $ossh_result" >&5
20959echo "${ECHO_T}$ossh_result" >&6 22120echo "${ECHO_T}$ossh_result" >&6; }
20960 if test "x$ossh_result" = "xyes"; then 22121 if test "x$ossh_result" = "xyes"; then
20961 22122
20962cat >>confdefs.h <<\_ACEOF 22123cat >>confdefs.h <<\_ACEOF
@@ -20965,17 +22126,17 @@ _ACEOF
20965 22126
20966 fi 22127 fi
20967 else 22128 else
20968 echo "$as_me:$LINENO: result: no" >&5 22129 { echo "$as_me:$LINENO: result: no" >&5
20969echo "${ECHO_T}no" >&6 22130echo "${ECHO_T}no" >&6; }
20970 fi 22131 fi
20971 22132
20972 22133
20973# look for field 'ut_host' in header 'utmpx.h' 22134# look for field 'ut_host' in header 'utmpx.h'
20974 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 22135 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
20975 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host 22136 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
20976 echo "$as_me:$LINENO: checking for ut_host field in utmpx.h" >&5 22137 { echo "$as_me:$LINENO: checking for ut_host field in utmpx.h" >&5
20977echo $ECHO_N "checking for ut_host field in utmpx.h... $ECHO_C" >&6 22138echo $ECHO_N "checking for ut_host field in utmpx.h... $ECHO_C" >&6; }
20978 if eval "test \"\${$ossh_varname+set}\" = set"; then 22139 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
20979 echo $ECHO_N "(cached) $ECHO_C" >&6 22140 echo $ECHO_N "(cached) $ECHO_C" >&6
20980else 22141else
20981 22142
@@ -21000,8 +22161,8 @@ fi
21000 22161
21001 ossh_result=`eval 'echo $'"$ossh_varname"` 22162 ossh_result=`eval 'echo $'"$ossh_varname"`
21002 if test -n "`echo $ossh_varname`"; then 22163 if test -n "`echo $ossh_varname`"; then
21003 echo "$as_me:$LINENO: result: $ossh_result" >&5 22164 { echo "$as_me:$LINENO: result: $ossh_result" >&5
21004echo "${ECHO_T}$ossh_result" >&6 22165echo "${ECHO_T}$ossh_result" >&6; }
21005 if test "x$ossh_result" = "xyes"; then 22166 if test "x$ossh_result" = "xyes"; then
21006 22167
21007cat >>confdefs.h <<\_ACEOF 22168cat >>confdefs.h <<\_ACEOF
@@ -21010,17 +22171,17 @@ _ACEOF
21010 22171
21011 fi 22172 fi
21012 else 22173 else
21013 echo "$as_me:$LINENO: result: no" >&5 22174 { echo "$as_me:$LINENO: result: no" >&5
21014echo "${ECHO_T}no" >&6 22175echo "${ECHO_T}no" >&6; }
21015 fi 22176 fi
21016 22177
21017 22178
21018# look for field 'syslen' in header 'utmpx.h' 22179# look for field 'syslen' in header 'utmpx.h'
21019 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 22180 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
21020 ossh_varname="ossh_cv_$ossh_safe""_has_"syslen 22181 ossh_varname="ossh_cv_$ossh_safe""_has_"syslen
21021 echo "$as_me:$LINENO: checking for syslen field in utmpx.h" >&5 22182 { echo "$as_me:$LINENO: checking for syslen field in utmpx.h" >&5
21022echo $ECHO_N "checking for syslen field in utmpx.h... $ECHO_C" >&6 22183echo $ECHO_N "checking for syslen field in utmpx.h... $ECHO_C" >&6; }
21023 if eval "test \"\${$ossh_varname+set}\" = set"; then 22184 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
21024 echo $ECHO_N "(cached) $ECHO_C" >&6 22185 echo $ECHO_N "(cached) $ECHO_C" >&6
21025else 22186else
21026 22187
@@ -21045,8 +22206,8 @@ fi
21045 22206
21046 ossh_result=`eval 'echo $'"$ossh_varname"` 22207 ossh_result=`eval 'echo $'"$ossh_varname"`
21047 if test -n "`echo $ossh_varname`"; then 22208 if test -n "`echo $ossh_varname`"; then
21048 echo "$as_me:$LINENO: result: $ossh_result" >&5 22209 { echo "$as_me:$LINENO: result: $ossh_result" >&5
21049echo "${ECHO_T}$ossh_result" >&6 22210echo "${ECHO_T}$ossh_result" >&6; }
21050 if test "x$ossh_result" = "xyes"; then 22211 if test "x$ossh_result" = "xyes"; then
21051 22212
21052cat >>confdefs.h <<\_ACEOF 22213cat >>confdefs.h <<\_ACEOF
@@ -21055,17 +22216,17 @@ _ACEOF
21055 22216
21056 fi 22217 fi
21057 else 22218 else
21058 echo "$as_me:$LINENO: result: no" >&5 22219 { echo "$as_me:$LINENO: result: no" >&5
21059echo "${ECHO_T}no" >&6 22220echo "${ECHO_T}no" >&6; }
21060 fi 22221 fi
21061 22222
21062 22223
21063# look for field 'ut_pid' in header 'utmp.h' 22224# look for field 'ut_pid' in header 'utmp.h'
21064 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 22225 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
21065 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid 22226 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid
21066 echo "$as_me:$LINENO: checking for ut_pid field in utmp.h" >&5 22227 { echo "$as_me:$LINENO: checking for ut_pid field in utmp.h" >&5
21067echo $ECHO_N "checking for ut_pid field in utmp.h... $ECHO_C" >&6 22228echo $ECHO_N "checking for ut_pid field in utmp.h... $ECHO_C" >&6; }
21068 if eval "test \"\${$ossh_varname+set}\" = set"; then 22229 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
21069 echo $ECHO_N "(cached) $ECHO_C" >&6 22230 echo $ECHO_N "(cached) $ECHO_C" >&6
21070else 22231else
21071 22232
@@ -21090,8 +22251,8 @@ fi
21090 22251
21091 ossh_result=`eval 'echo $'"$ossh_varname"` 22252 ossh_result=`eval 'echo $'"$ossh_varname"`
21092 if test -n "`echo $ossh_varname`"; then 22253 if test -n "`echo $ossh_varname`"; then
21093 echo "$as_me:$LINENO: result: $ossh_result" >&5 22254 { echo "$as_me:$LINENO: result: $ossh_result" >&5
21094echo "${ECHO_T}$ossh_result" >&6 22255echo "${ECHO_T}$ossh_result" >&6; }
21095 if test "x$ossh_result" = "xyes"; then 22256 if test "x$ossh_result" = "xyes"; then
21096 22257
21097cat >>confdefs.h <<\_ACEOF 22258cat >>confdefs.h <<\_ACEOF
@@ -21100,17 +22261,17 @@ _ACEOF
21100 22261
21101 fi 22262 fi
21102 else 22263 else
21103 echo "$as_me:$LINENO: result: no" >&5 22264 { echo "$as_me:$LINENO: result: no" >&5
21104echo "${ECHO_T}no" >&6 22265echo "${ECHO_T}no" >&6; }
21105 fi 22266 fi
21106 22267
21107 22268
21108# look for field 'ut_type' in header 'utmp.h' 22269# look for field 'ut_type' in header 'utmp.h'
21109 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 22270 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
21110 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type 22271 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
21111 echo "$as_me:$LINENO: checking for ut_type field in utmp.h" >&5 22272 { echo "$as_me:$LINENO: checking for ut_type field in utmp.h" >&5
21112echo $ECHO_N "checking for ut_type field in utmp.h... $ECHO_C" >&6 22273echo $ECHO_N "checking for ut_type field in utmp.h... $ECHO_C" >&6; }
21113 if eval "test \"\${$ossh_varname+set}\" = set"; then 22274 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
21114 echo $ECHO_N "(cached) $ECHO_C" >&6 22275 echo $ECHO_N "(cached) $ECHO_C" >&6
21115else 22276else
21116 22277
@@ -21135,8 +22296,8 @@ fi
21135 22296
21136 ossh_result=`eval 'echo $'"$ossh_varname"` 22297 ossh_result=`eval 'echo $'"$ossh_varname"`
21137 if test -n "`echo $ossh_varname`"; then 22298 if test -n "`echo $ossh_varname`"; then
21138 echo "$as_me:$LINENO: result: $ossh_result" >&5 22299 { echo "$as_me:$LINENO: result: $ossh_result" >&5
21139echo "${ECHO_T}$ossh_result" >&6 22300echo "${ECHO_T}$ossh_result" >&6; }
21140 if test "x$ossh_result" = "xyes"; then 22301 if test "x$ossh_result" = "xyes"; then
21141 22302
21142cat >>confdefs.h <<\_ACEOF 22303cat >>confdefs.h <<\_ACEOF
@@ -21145,17 +22306,17 @@ _ACEOF
21145 22306
21146 fi 22307 fi
21147 else 22308 else
21148 echo "$as_me:$LINENO: result: no" >&5 22309 { echo "$as_me:$LINENO: result: no" >&5
21149echo "${ECHO_T}no" >&6 22310echo "${ECHO_T}no" >&6; }
21150 fi 22311 fi
21151 22312
21152 22313
21153# look for field 'ut_type' in header 'utmpx.h' 22314# look for field 'ut_type' in header 'utmpx.h'
21154 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 22315 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
21155 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type 22316 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
21156 echo "$as_me:$LINENO: checking for ut_type field in utmpx.h" >&5 22317 { echo "$as_me:$LINENO: checking for ut_type field in utmpx.h" >&5
21157echo $ECHO_N "checking for ut_type field in utmpx.h... $ECHO_C" >&6 22318echo $ECHO_N "checking for ut_type field in utmpx.h... $ECHO_C" >&6; }
21158 if eval "test \"\${$ossh_varname+set}\" = set"; then 22319 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
21159 echo $ECHO_N "(cached) $ECHO_C" >&6 22320 echo $ECHO_N "(cached) $ECHO_C" >&6
21160else 22321else
21161 22322
@@ -21180,8 +22341,8 @@ fi
21180 22341
21181 ossh_result=`eval 'echo $'"$ossh_varname"` 22342 ossh_result=`eval 'echo $'"$ossh_varname"`
21182 if test -n "`echo $ossh_varname`"; then 22343 if test -n "`echo $ossh_varname`"; then
21183 echo "$as_me:$LINENO: result: $ossh_result" >&5 22344 { echo "$as_me:$LINENO: result: $ossh_result" >&5
21184echo "${ECHO_T}$ossh_result" >&6 22345echo "${ECHO_T}$ossh_result" >&6; }
21185 if test "x$ossh_result" = "xyes"; then 22346 if test "x$ossh_result" = "xyes"; then
21186 22347
21187cat >>confdefs.h <<\_ACEOF 22348cat >>confdefs.h <<\_ACEOF
@@ -21190,17 +22351,17 @@ _ACEOF
21190 22351
21191 fi 22352 fi
21192 else 22353 else
21193 echo "$as_me:$LINENO: result: no" >&5 22354 { echo "$as_me:$LINENO: result: no" >&5
21194echo "${ECHO_T}no" >&6 22355echo "${ECHO_T}no" >&6; }
21195 fi 22356 fi
21196 22357
21197 22358
21198# look for field 'ut_tv' in header 'utmp.h' 22359# look for field 'ut_tv' in header 'utmp.h'
21199 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 22360 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
21200 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv 22361 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
21201 echo "$as_me:$LINENO: checking for ut_tv field in utmp.h" >&5 22362 { echo "$as_me:$LINENO: checking for ut_tv field in utmp.h" >&5
21202echo $ECHO_N "checking for ut_tv field in utmp.h... $ECHO_C" >&6 22363echo $ECHO_N "checking for ut_tv field in utmp.h... $ECHO_C" >&6; }
21203 if eval "test \"\${$ossh_varname+set}\" = set"; then 22364 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
21204 echo $ECHO_N "(cached) $ECHO_C" >&6 22365 echo $ECHO_N "(cached) $ECHO_C" >&6
21205else 22366else
21206 22367
@@ -21225,8 +22386,8 @@ fi
21225 22386
21226 ossh_result=`eval 'echo $'"$ossh_varname"` 22387 ossh_result=`eval 'echo $'"$ossh_varname"`
21227 if test -n "`echo $ossh_varname`"; then 22388 if test -n "`echo $ossh_varname`"; then
21228 echo "$as_me:$LINENO: result: $ossh_result" >&5 22389 { echo "$as_me:$LINENO: result: $ossh_result" >&5
21229echo "${ECHO_T}$ossh_result" >&6 22390echo "${ECHO_T}$ossh_result" >&6; }
21230 if test "x$ossh_result" = "xyes"; then 22391 if test "x$ossh_result" = "xyes"; then
21231 22392
21232cat >>confdefs.h <<\_ACEOF 22393cat >>confdefs.h <<\_ACEOF
@@ -21235,17 +22396,17 @@ _ACEOF
21235 22396
21236 fi 22397 fi
21237 else 22398 else
21238 echo "$as_me:$LINENO: result: no" >&5 22399 { echo "$as_me:$LINENO: result: no" >&5
21239echo "${ECHO_T}no" >&6 22400echo "${ECHO_T}no" >&6; }
21240 fi 22401 fi
21241 22402
21242 22403
21243# look for field 'ut_id' in header 'utmp.h' 22404# look for field 'ut_id' in header 'utmp.h'
21244 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 22405 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
21245 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id 22406 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
21246 echo "$as_me:$LINENO: checking for ut_id field in utmp.h" >&5 22407 { echo "$as_me:$LINENO: checking for ut_id field in utmp.h" >&5
21247echo $ECHO_N "checking for ut_id field in utmp.h... $ECHO_C" >&6 22408echo $ECHO_N "checking for ut_id field in utmp.h... $ECHO_C" >&6; }
21248 if eval "test \"\${$ossh_varname+set}\" = set"; then 22409 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
21249 echo $ECHO_N "(cached) $ECHO_C" >&6 22410 echo $ECHO_N "(cached) $ECHO_C" >&6
21250else 22411else
21251 22412
@@ -21270,8 +22431,8 @@ fi
21270 22431
21271 ossh_result=`eval 'echo $'"$ossh_varname"` 22432 ossh_result=`eval 'echo $'"$ossh_varname"`
21272 if test -n "`echo $ossh_varname`"; then 22433 if test -n "`echo $ossh_varname`"; then
21273 echo "$as_me:$LINENO: result: $ossh_result" >&5 22434 { echo "$as_me:$LINENO: result: $ossh_result" >&5
21274echo "${ECHO_T}$ossh_result" >&6 22435echo "${ECHO_T}$ossh_result" >&6; }
21275 if test "x$ossh_result" = "xyes"; then 22436 if test "x$ossh_result" = "xyes"; then
21276 22437
21277cat >>confdefs.h <<\_ACEOF 22438cat >>confdefs.h <<\_ACEOF
@@ -21280,17 +22441,17 @@ _ACEOF
21280 22441
21281 fi 22442 fi
21282 else 22443 else
21283 echo "$as_me:$LINENO: result: no" >&5 22444 { echo "$as_me:$LINENO: result: no" >&5
21284echo "${ECHO_T}no" >&6 22445echo "${ECHO_T}no" >&6; }
21285 fi 22446 fi
21286 22447
21287 22448
21288# look for field 'ut_id' in header 'utmpx.h' 22449# look for field 'ut_id' in header 'utmpx.h'
21289 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 22450 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
21290 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id 22451 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
21291 echo "$as_me:$LINENO: checking for ut_id field in utmpx.h" >&5 22452 { echo "$as_me:$LINENO: checking for ut_id field in utmpx.h" >&5
21292echo $ECHO_N "checking for ut_id field in utmpx.h... $ECHO_C" >&6 22453echo $ECHO_N "checking for ut_id field in utmpx.h... $ECHO_C" >&6; }
21293 if eval "test \"\${$ossh_varname+set}\" = set"; then 22454 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
21294 echo $ECHO_N "(cached) $ECHO_C" >&6 22455 echo $ECHO_N "(cached) $ECHO_C" >&6
21295else 22456else
21296 22457
@@ -21315,8 +22476,8 @@ fi
21315 22476
21316 ossh_result=`eval 'echo $'"$ossh_varname"` 22477 ossh_result=`eval 'echo $'"$ossh_varname"`
21317 if test -n "`echo $ossh_varname`"; then 22478 if test -n "`echo $ossh_varname`"; then
21318 echo "$as_me:$LINENO: result: $ossh_result" >&5 22479 { echo "$as_me:$LINENO: result: $ossh_result" >&5
21319echo "${ECHO_T}$ossh_result" >&6 22480echo "${ECHO_T}$ossh_result" >&6; }
21320 if test "x$ossh_result" = "xyes"; then 22481 if test "x$ossh_result" = "xyes"; then
21321 22482
21322cat >>confdefs.h <<\_ACEOF 22483cat >>confdefs.h <<\_ACEOF
@@ -21325,17 +22486,17 @@ _ACEOF
21325 22486
21326 fi 22487 fi
21327 else 22488 else
21328 echo "$as_me:$LINENO: result: no" >&5 22489 { echo "$as_me:$LINENO: result: no" >&5
21329echo "${ECHO_T}no" >&6 22490echo "${ECHO_T}no" >&6; }
21330 fi 22491 fi
21331 22492
21332 22493
21333# look for field 'ut_addr' in header 'utmp.h' 22494# look for field 'ut_addr' in header 'utmp.h'
21334 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 22495 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
21335 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr 22496 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
21336 echo "$as_me:$LINENO: checking for ut_addr field in utmp.h" >&5 22497 { echo "$as_me:$LINENO: checking for ut_addr field in utmp.h" >&5
21337echo $ECHO_N "checking for ut_addr field in utmp.h... $ECHO_C" >&6 22498echo $ECHO_N "checking for ut_addr field in utmp.h... $ECHO_C" >&6; }
21338 if eval "test \"\${$ossh_varname+set}\" = set"; then 22499 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
21339 echo $ECHO_N "(cached) $ECHO_C" >&6 22500 echo $ECHO_N "(cached) $ECHO_C" >&6
21340else 22501else
21341 22502
@@ -21360,8 +22521,8 @@ fi
21360 22521
21361 ossh_result=`eval 'echo $'"$ossh_varname"` 22522 ossh_result=`eval 'echo $'"$ossh_varname"`
21362 if test -n "`echo $ossh_varname`"; then 22523 if test -n "`echo $ossh_varname`"; then
21363 echo "$as_me:$LINENO: result: $ossh_result" >&5 22524 { echo "$as_me:$LINENO: result: $ossh_result" >&5
21364echo "${ECHO_T}$ossh_result" >&6 22525echo "${ECHO_T}$ossh_result" >&6; }
21365 if test "x$ossh_result" = "xyes"; then 22526 if test "x$ossh_result" = "xyes"; then
21366 22527
21367cat >>confdefs.h <<\_ACEOF 22528cat >>confdefs.h <<\_ACEOF
@@ -21370,17 +22531,17 @@ _ACEOF
21370 22531
21371 fi 22532 fi
21372 else 22533 else
21373 echo "$as_me:$LINENO: result: no" >&5 22534 { echo "$as_me:$LINENO: result: no" >&5
21374echo "${ECHO_T}no" >&6 22535echo "${ECHO_T}no" >&6; }
21375 fi 22536 fi
21376 22537
21377 22538
21378# look for field 'ut_addr' in header 'utmpx.h' 22539# look for field 'ut_addr' in header 'utmpx.h'
21379 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 22540 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
21380 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr 22541 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
21381 echo "$as_me:$LINENO: checking for ut_addr field in utmpx.h" >&5 22542 { echo "$as_me:$LINENO: checking for ut_addr field in utmpx.h" >&5
21382echo $ECHO_N "checking for ut_addr field in utmpx.h... $ECHO_C" >&6 22543echo $ECHO_N "checking for ut_addr field in utmpx.h... $ECHO_C" >&6; }
21383 if eval "test \"\${$ossh_varname+set}\" = set"; then 22544 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
21384 echo $ECHO_N "(cached) $ECHO_C" >&6 22545 echo $ECHO_N "(cached) $ECHO_C" >&6
21385else 22546else
21386 22547
@@ -21405,8 +22566,8 @@ fi
21405 22566
21406 ossh_result=`eval 'echo $'"$ossh_varname"` 22567 ossh_result=`eval 'echo $'"$ossh_varname"`
21407 if test -n "`echo $ossh_varname`"; then 22568 if test -n "`echo $ossh_varname`"; then
21408 echo "$as_me:$LINENO: result: $ossh_result" >&5 22569 { echo "$as_me:$LINENO: result: $ossh_result" >&5
21409echo "${ECHO_T}$ossh_result" >&6 22570echo "${ECHO_T}$ossh_result" >&6; }
21410 if test "x$ossh_result" = "xyes"; then 22571 if test "x$ossh_result" = "xyes"; then
21411 22572
21412cat >>confdefs.h <<\_ACEOF 22573cat >>confdefs.h <<\_ACEOF
@@ -21415,17 +22576,17 @@ _ACEOF
21415 22576
21416 fi 22577 fi
21417 else 22578 else
21418 echo "$as_me:$LINENO: result: no" >&5 22579 { echo "$as_me:$LINENO: result: no" >&5
21419echo "${ECHO_T}no" >&6 22580echo "${ECHO_T}no" >&6; }
21420 fi 22581 fi
21421 22582
21422 22583
21423# look for field 'ut_addr_v6' in header 'utmp.h' 22584# look for field 'ut_addr_v6' in header 'utmp.h'
21424 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 22585 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
21425 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6 22586 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
21426 echo "$as_me:$LINENO: checking for ut_addr_v6 field in utmp.h" >&5 22587 { echo "$as_me:$LINENO: checking for ut_addr_v6 field in utmp.h" >&5
21427echo $ECHO_N "checking for ut_addr_v6 field in utmp.h... $ECHO_C" >&6 22588echo $ECHO_N "checking for ut_addr_v6 field in utmp.h... $ECHO_C" >&6; }
21428 if eval "test \"\${$ossh_varname+set}\" = set"; then 22589 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
21429 echo $ECHO_N "(cached) $ECHO_C" >&6 22590 echo $ECHO_N "(cached) $ECHO_C" >&6
21430else 22591else
21431 22592
@@ -21450,8 +22611,8 @@ fi
21450 22611
21451 ossh_result=`eval 'echo $'"$ossh_varname"` 22612 ossh_result=`eval 'echo $'"$ossh_varname"`
21452 if test -n "`echo $ossh_varname`"; then 22613 if test -n "`echo $ossh_varname`"; then
21453 echo "$as_me:$LINENO: result: $ossh_result" >&5 22614 { echo "$as_me:$LINENO: result: $ossh_result" >&5
21454echo "${ECHO_T}$ossh_result" >&6 22615echo "${ECHO_T}$ossh_result" >&6; }
21455 if test "x$ossh_result" = "xyes"; then 22616 if test "x$ossh_result" = "xyes"; then
21456 22617
21457cat >>confdefs.h <<\_ACEOF 22618cat >>confdefs.h <<\_ACEOF
@@ -21460,17 +22621,17 @@ _ACEOF
21460 22621
21461 fi 22622 fi
21462 else 22623 else
21463 echo "$as_me:$LINENO: result: no" >&5 22624 { echo "$as_me:$LINENO: result: no" >&5
21464echo "${ECHO_T}no" >&6 22625echo "${ECHO_T}no" >&6; }
21465 fi 22626 fi
21466 22627
21467 22628
21468# look for field 'ut_addr_v6' in header 'utmpx.h' 22629# look for field 'ut_addr_v6' in header 'utmpx.h'
21469 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 22630 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
21470 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6 22631 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
21471 echo "$as_me:$LINENO: checking for ut_addr_v6 field in utmpx.h" >&5 22632 { echo "$as_me:$LINENO: checking for ut_addr_v6 field in utmpx.h" >&5
21472echo $ECHO_N "checking for ut_addr_v6 field in utmpx.h... $ECHO_C" >&6 22633echo $ECHO_N "checking for ut_addr_v6 field in utmpx.h... $ECHO_C" >&6; }
21473 if eval "test \"\${$ossh_varname+set}\" = set"; then 22634 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
21474 echo $ECHO_N "(cached) $ECHO_C" >&6 22635 echo $ECHO_N "(cached) $ECHO_C" >&6
21475else 22636else
21476 22637
@@ -21495,8 +22656,8 @@ fi
21495 22656
21496 ossh_result=`eval 'echo $'"$ossh_varname"` 22657 ossh_result=`eval 'echo $'"$ossh_varname"`
21497 if test -n "`echo $ossh_varname`"; then 22658 if test -n "`echo $ossh_varname`"; then
21498 echo "$as_me:$LINENO: result: $ossh_result" >&5 22659 { echo "$as_me:$LINENO: result: $ossh_result" >&5
21499echo "${ECHO_T}$ossh_result" >&6 22660echo "${ECHO_T}$ossh_result" >&6; }
21500 if test "x$ossh_result" = "xyes"; then 22661 if test "x$ossh_result" = "xyes"; then
21501 22662
21502cat >>confdefs.h <<\_ACEOF 22663cat >>confdefs.h <<\_ACEOF
@@ -21505,17 +22666,17 @@ _ACEOF
21505 22666
21506 fi 22667 fi
21507 else 22668 else
21508 echo "$as_me:$LINENO: result: no" >&5 22669 { echo "$as_me:$LINENO: result: no" >&5
21509echo "${ECHO_T}no" >&6 22670echo "${ECHO_T}no" >&6; }
21510 fi 22671 fi
21511 22672
21512 22673
21513# look for field 'ut_exit' in header 'utmp.h' 22674# look for field 'ut_exit' in header 'utmp.h'
21514 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 22675 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
21515 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit 22676 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit
21516 echo "$as_me:$LINENO: checking for ut_exit field in utmp.h" >&5 22677 { echo "$as_me:$LINENO: checking for ut_exit field in utmp.h" >&5
21517echo $ECHO_N "checking for ut_exit field in utmp.h... $ECHO_C" >&6 22678echo $ECHO_N "checking for ut_exit field in utmp.h... $ECHO_C" >&6; }
21518 if eval "test \"\${$ossh_varname+set}\" = set"; then 22679 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
21519 echo $ECHO_N "(cached) $ECHO_C" >&6 22680 echo $ECHO_N "(cached) $ECHO_C" >&6
21520else 22681else
21521 22682
@@ -21540,8 +22701,8 @@ fi
21540 22701
21541 ossh_result=`eval 'echo $'"$ossh_varname"` 22702 ossh_result=`eval 'echo $'"$ossh_varname"`
21542 if test -n "`echo $ossh_varname`"; then 22703 if test -n "`echo $ossh_varname`"; then
21543 echo "$as_me:$LINENO: result: $ossh_result" >&5 22704 { echo "$as_me:$LINENO: result: $ossh_result" >&5
21544echo "${ECHO_T}$ossh_result" >&6 22705echo "${ECHO_T}$ossh_result" >&6; }
21545 if test "x$ossh_result" = "xyes"; then 22706 if test "x$ossh_result" = "xyes"; then
21546 22707
21547cat >>confdefs.h <<\_ACEOF 22708cat >>confdefs.h <<\_ACEOF
@@ -21550,17 +22711,17 @@ _ACEOF
21550 22711
21551 fi 22712 fi
21552 else 22713 else
21553 echo "$as_me:$LINENO: result: no" >&5 22714 { echo "$as_me:$LINENO: result: no" >&5
21554echo "${ECHO_T}no" >&6 22715echo "${ECHO_T}no" >&6; }
21555 fi 22716 fi
21556 22717
21557 22718
21558# look for field 'ut_time' in header 'utmp.h' 22719# look for field 'ut_time' in header 'utmp.h'
21559 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 22720 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
21560 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time 22721 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
21561 echo "$as_me:$LINENO: checking for ut_time field in utmp.h" >&5 22722 { echo "$as_me:$LINENO: checking for ut_time field in utmp.h" >&5
21562echo $ECHO_N "checking for ut_time field in utmp.h... $ECHO_C" >&6 22723echo $ECHO_N "checking for ut_time field in utmp.h... $ECHO_C" >&6; }
21563 if eval "test \"\${$ossh_varname+set}\" = set"; then 22724 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
21564 echo $ECHO_N "(cached) $ECHO_C" >&6 22725 echo $ECHO_N "(cached) $ECHO_C" >&6
21565else 22726else
21566 22727
@@ -21585,8 +22746,8 @@ fi
21585 22746
21586 ossh_result=`eval 'echo $'"$ossh_varname"` 22747 ossh_result=`eval 'echo $'"$ossh_varname"`
21587 if test -n "`echo $ossh_varname`"; then 22748 if test -n "`echo $ossh_varname`"; then
21588 echo "$as_me:$LINENO: result: $ossh_result" >&5 22749 { echo "$as_me:$LINENO: result: $ossh_result" >&5
21589echo "${ECHO_T}$ossh_result" >&6 22750echo "${ECHO_T}$ossh_result" >&6; }
21590 if test "x$ossh_result" = "xyes"; then 22751 if test "x$ossh_result" = "xyes"; then
21591 22752
21592cat >>confdefs.h <<\_ACEOF 22753cat >>confdefs.h <<\_ACEOF
@@ -21595,17 +22756,17 @@ _ACEOF
21595 22756
21596 fi 22757 fi
21597 else 22758 else
21598 echo "$as_me:$LINENO: result: no" >&5 22759 { echo "$as_me:$LINENO: result: no" >&5
21599echo "${ECHO_T}no" >&6 22760echo "${ECHO_T}no" >&6; }
21600 fi 22761 fi
21601 22762
21602 22763
21603# look for field 'ut_time' in header 'utmpx.h' 22764# look for field 'ut_time' in header 'utmpx.h'
21604 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 22765 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
21605 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time 22766 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
21606 echo "$as_me:$LINENO: checking for ut_time field in utmpx.h" >&5 22767 { echo "$as_me:$LINENO: checking for ut_time field in utmpx.h" >&5
21607echo $ECHO_N "checking for ut_time field in utmpx.h... $ECHO_C" >&6 22768echo $ECHO_N "checking for ut_time field in utmpx.h... $ECHO_C" >&6; }
21608 if eval "test \"\${$ossh_varname+set}\" = set"; then 22769 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
21609 echo $ECHO_N "(cached) $ECHO_C" >&6 22770 echo $ECHO_N "(cached) $ECHO_C" >&6
21610else 22771else
21611 22772
@@ -21630,8 +22791,8 @@ fi
21630 22791
21631 ossh_result=`eval 'echo $'"$ossh_varname"` 22792 ossh_result=`eval 'echo $'"$ossh_varname"`
21632 if test -n "`echo $ossh_varname`"; then 22793 if test -n "`echo $ossh_varname`"; then
21633 echo "$as_me:$LINENO: result: $ossh_result" >&5 22794 { echo "$as_me:$LINENO: result: $ossh_result" >&5
21634echo "${ECHO_T}$ossh_result" >&6 22795echo "${ECHO_T}$ossh_result" >&6; }
21635 if test "x$ossh_result" = "xyes"; then 22796 if test "x$ossh_result" = "xyes"; then
21636 22797
21637cat >>confdefs.h <<\_ACEOF 22798cat >>confdefs.h <<\_ACEOF
@@ -21640,17 +22801,17 @@ _ACEOF
21640 22801
21641 fi 22802 fi
21642 else 22803 else
21643 echo "$as_me:$LINENO: result: no" >&5 22804 { echo "$as_me:$LINENO: result: no" >&5
21644echo "${ECHO_T}no" >&6 22805echo "${ECHO_T}no" >&6; }
21645 fi 22806 fi
21646 22807
21647 22808
21648# look for field 'ut_tv' in header 'utmpx.h' 22809# look for field 'ut_tv' in header 'utmpx.h'
21649 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 22810 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
21650 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv 22811 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
21651 echo "$as_me:$LINENO: checking for ut_tv field in utmpx.h" >&5 22812 { echo "$as_me:$LINENO: checking for ut_tv field in utmpx.h" >&5
21652echo $ECHO_N "checking for ut_tv field in utmpx.h... $ECHO_C" >&6 22813echo $ECHO_N "checking for ut_tv field in utmpx.h... $ECHO_C" >&6; }
21653 if eval "test \"\${$ossh_varname+set}\" = set"; then 22814 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
21654 echo $ECHO_N "(cached) $ECHO_C" >&6 22815 echo $ECHO_N "(cached) $ECHO_C" >&6
21655else 22816else
21656 22817
@@ -21675,8 +22836,8 @@ fi
21675 22836
21676 ossh_result=`eval 'echo $'"$ossh_varname"` 22837 ossh_result=`eval 'echo $'"$ossh_varname"`
21677 if test -n "`echo $ossh_varname`"; then 22838 if test -n "`echo $ossh_varname`"; then
21678 echo "$as_me:$LINENO: result: $ossh_result" >&5 22839 { echo "$as_me:$LINENO: result: $ossh_result" >&5
21679echo "${ECHO_T}$ossh_result" >&6 22840echo "${ECHO_T}$ossh_result" >&6; }
21680 if test "x$ossh_result" = "xyes"; then 22841 if test "x$ossh_result" = "xyes"; then
21681 22842
21682cat >>confdefs.h <<\_ACEOF 22843cat >>confdefs.h <<\_ACEOF
@@ -21685,13 +22846,13 @@ _ACEOF
21685 22846
21686 fi 22847 fi
21687 else 22848 else
21688 echo "$as_me:$LINENO: result: no" >&5 22849 { echo "$as_me:$LINENO: result: no" >&5
21689echo "${ECHO_T}no" >&6 22850echo "${ECHO_T}no" >&6; }
21690 fi 22851 fi
21691 22852
21692 22853
21693echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 22854{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21694echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 22855echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
21695if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then 22856if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
21696 echo $ECHO_N "(cached) $ECHO_C" >&6 22857 echo $ECHO_N "(cached) $ECHO_C" >&6
21697else 22858else
@@ -21713,33 +22874,28 @@ return 0;
21713} 22874}
21714_ACEOF 22875_ACEOF
21715rm -f conftest.$ac_objext 22876rm -f conftest.$ac_objext
21716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 22877if { (ac_try="$ac_compile"
21717 (eval $ac_compile) 2>conftest.er1 22878case "(($ac_try" in
22879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22880 *) ac_try_echo=$ac_try;;
22881esac
22882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22883 (eval "$ac_compile") 2>conftest.er1
21718 ac_status=$? 22884 ac_status=$?
21719 grep -v '^ *+' conftest.er1 >conftest.err 22885 grep -v '^ *+' conftest.er1 >conftest.err
21720 rm -f conftest.er1 22886 rm -f conftest.er1
21721 cat conftest.err >&5 22887 cat conftest.err >&5
21722 echo "$as_me:$LINENO: \$? = $ac_status" >&5 22888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21723 (exit $ac_status); } && 22889 (exit $ac_status); } && {
21724 { ac_try='test -z "$ac_c_werror_flag" 22890 test -z "$ac_c_werror_flag" ||
21725 || test ! -s conftest.err' 22891 test ! -s conftest.err
21726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 22892 } && test -s conftest.$ac_objext; then
21727 (eval $ac_try) 2>&5
21728 ac_status=$?
21729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21730 (exit $ac_status); }; } &&
21731 { ac_try='test -s conftest.$ac_objext'
21732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21733 (eval $ac_try) 2>&5
21734 ac_status=$?
21735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21736 (exit $ac_status); }; }; then
21737 ac_cv_member_struct_stat_st_blksize=yes 22893 ac_cv_member_struct_stat_st_blksize=yes
21738else 22894else
21739 echo "$as_me: failed program was:" >&5 22895 echo "$as_me: failed program was:" >&5
21740sed 's/^/| /' conftest.$ac_ext >&5 22896sed 's/^/| /' conftest.$ac_ext >&5
21741 22897
21742cat >conftest.$ac_ext <<_ACEOF 22898 cat >conftest.$ac_ext <<_ACEOF
21743/* confdefs.h. */ 22899/* confdefs.h. */
21744_ACEOF 22900_ACEOF
21745cat confdefs.h >>conftest.$ac_ext 22901cat confdefs.h >>conftest.$ac_ext
@@ -21757,40 +22913,37 @@ return 0;
21757} 22913}
21758_ACEOF 22914_ACEOF
21759rm -f conftest.$ac_objext 22915rm -f conftest.$ac_objext
21760if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 22916if { (ac_try="$ac_compile"
21761 (eval $ac_compile) 2>conftest.er1 22917case "(($ac_try" in
22918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22919 *) ac_try_echo=$ac_try;;
22920esac
22921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22922 (eval "$ac_compile") 2>conftest.er1
21762 ac_status=$? 22923 ac_status=$?
21763 grep -v '^ *+' conftest.er1 >conftest.err 22924 grep -v '^ *+' conftest.er1 >conftest.err
21764 rm -f conftest.er1 22925 rm -f conftest.er1
21765 cat conftest.err >&5 22926 cat conftest.err >&5
21766 echo "$as_me:$LINENO: \$? = $ac_status" >&5 22927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21767 (exit $ac_status); } && 22928 (exit $ac_status); } && {
21768 { ac_try='test -z "$ac_c_werror_flag" 22929 test -z "$ac_c_werror_flag" ||
21769 || test ! -s conftest.err' 22930 test ! -s conftest.err
21770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 22931 } && test -s conftest.$ac_objext; then
21771 (eval $ac_try) 2>&5
21772 ac_status=$?
21773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21774 (exit $ac_status); }; } &&
21775 { ac_try='test -s conftest.$ac_objext'
21776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21777 (eval $ac_try) 2>&5
21778 ac_status=$?
21779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21780 (exit $ac_status); }; }; then
21781 ac_cv_member_struct_stat_st_blksize=yes 22932 ac_cv_member_struct_stat_st_blksize=yes
21782else 22933else
21783 echo "$as_me: failed program was:" >&5 22934 echo "$as_me: failed program was:" >&5
21784sed 's/^/| /' conftest.$ac_ext >&5 22935sed 's/^/| /' conftest.$ac_ext >&5
21785 22936
21786ac_cv_member_struct_stat_st_blksize=no 22937 ac_cv_member_struct_stat_st_blksize=no
21787fi 22938fi
21788rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 22939
22940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21789fi 22941fi
21790rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 22942
22943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21791fi 22944fi
21792echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 22945{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21793echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 22946echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21794if test $ac_cv_member_struct_stat_st_blksize = yes; then 22947if test $ac_cv_member_struct_stat_st_blksize = yes; then
21795 22948
21796cat >>confdefs.h <<_ACEOF 22949cat >>confdefs.h <<_ACEOF
@@ -21800,8 +22953,8 @@ _ACEOF
21800 22953
21801fi 22954fi
21802 22955
21803echo "$as_me:$LINENO: checking for struct __res_state.retrans" >&5 22956{ echo "$as_me:$LINENO: checking for struct __res_state.retrans" >&5
21804echo $ECHO_N "checking for struct __res_state.retrans... $ECHO_C" >&6 22957echo $ECHO_N "checking for struct __res_state.retrans... $ECHO_C" >&6; }
21805if test "${ac_cv_member_struct___res_state_retrans+set}" = set; then 22958if test "${ac_cv_member_struct___res_state_retrans+set}" = set; then
21806 echo $ECHO_N "(cached) $ECHO_C" >&6 22959 echo $ECHO_N "(cached) $ECHO_C" >&6
21807else 22960else
@@ -21832,33 +22985,28 @@ return 0;
21832} 22985}
21833_ACEOF 22986_ACEOF
21834rm -f conftest.$ac_objext 22987rm -f conftest.$ac_objext
21835if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 22988if { (ac_try="$ac_compile"
21836 (eval $ac_compile) 2>conftest.er1 22989case "(($ac_try" in
22990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22991 *) ac_try_echo=$ac_try;;
22992esac
22993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22994 (eval "$ac_compile") 2>conftest.er1
21837 ac_status=$? 22995 ac_status=$?
21838 grep -v '^ *+' conftest.er1 >conftest.err 22996 grep -v '^ *+' conftest.er1 >conftest.err
21839 rm -f conftest.er1 22997 rm -f conftest.er1
21840 cat conftest.err >&5 22998 cat conftest.err >&5
21841 echo "$as_me:$LINENO: \$? = $ac_status" >&5 22999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21842 (exit $ac_status); } && 23000 (exit $ac_status); } && {
21843 { ac_try='test -z "$ac_c_werror_flag" 23001 test -z "$ac_c_werror_flag" ||
21844 || test ! -s conftest.err' 23002 test ! -s conftest.err
21845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 23003 } && test -s conftest.$ac_objext; then
21846 (eval $ac_try) 2>&5
21847 ac_status=$?
21848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21849 (exit $ac_status); }; } &&
21850 { ac_try='test -s conftest.$ac_objext'
21851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21852 (eval $ac_try) 2>&5
21853 ac_status=$?
21854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21855 (exit $ac_status); }; }; then
21856 ac_cv_member_struct___res_state_retrans=yes 23004 ac_cv_member_struct___res_state_retrans=yes
21857else 23005else
21858 echo "$as_me: failed program was:" >&5 23006 echo "$as_me: failed program was:" >&5
21859sed 's/^/| /' conftest.$ac_ext >&5 23007sed 's/^/| /' conftest.$ac_ext >&5
21860 23008
21861cat >conftest.$ac_ext <<_ACEOF 23009 cat >conftest.$ac_ext <<_ACEOF
21862/* confdefs.h. */ 23010/* confdefs.h. */
21863_ACEOF 23011_ACEOF
21864cat confdefs.h >>conftest.$ac_ext 23012cat confdefs.h >>conftest.$ac_ext
@@ -21885,40 +23033,37 @@ return 0;
21885} 23033}
21886_ACEOF 23034_ACEOF
21887rm -f conftest.$ac_objext 23035rm -f conftest.$ac_objext
21888if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 23036if { (ac_try="$ac_compile"
21889 (eval $ac_compile) 2>conftest.er1 23037case "(($ac_try" in
23038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23039 *) ac_try_echo=$ac_try;;
23040esac
23041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23042 (eval "$ac_compile") 2>conftest.er1
21890 ac_status=$? 23043 ac_status=$?
21891 grep -v '^ *+' conftest.er1 >conftest.err 23044 grep -v '^ *+' conftest.er1 >conftest.err
21892 rm -f conftest.er1 23045 rm -f conftest.er1
21893 cat conftest.err >&5 23046 cat conftest.err >&5
21894 echo "$as_me:$LINENO: \$? = $ac_status" >&5 23047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21895 (exit $ac_status); } && 23048 (exit $ac_status); } && {
21896 { ac_try='test -z "$ac_c_werror_flag" 23049 test -z "$ac_c_werror_flag" ||
21897 || test ! -s conftest.err' 23050 test ! -s conftest.err
21898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 23051 } && test -s conftest.$ac_objext; then
21899 (eval $ac_try) 2>&5
21900 ac_status=$?
21901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21902 (exit $ac_status); }; } &&
21903 { ac_try='test -s conftest.$ac_objext'
21904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21905 (eval $ac_try) 2>&5
21906 ac_status=$?
21907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21908 (exit $ac_status); }; }; then
21909 ac_cv_member_struct___res_state_retrans=yes 23052 ac_cv_member_struct___res_state_retrans=yes
21910else 23053else
21911 echo "$as_me: failed program was:" >&5 23054 echo "$as_me: failed program was:" >&5
21912sed 's/^/| /' conftest.$ac_ext >&5 23055sed 's/^/| /' conftest.$ac_ext >&5
21913 23056
21914ac_cv_member_struct___res_state_retrans=no 23057 ac_cv_member_struct___res_state_retrans=no
21915fi 23058fi
21916rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 23059
23060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21917fi 23061fi
21918rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 23062
23063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21919fi 23064fi
21920echo "$as_me:$LINENO: result: $ac_cv_member_struct___res_state_retrans" >&5 23065{ echo "$as_me:$LINENO: result: $ac_cv_member_struct___res_state_retrans" >&5
21921echo "${ECHO_T}$ac_cv_member_struct___res_state_retrans" >&6 23066echo "${ECHO_T}$ac_cv_member_struct___res_state_retrans" >&6; }
21922if test $ac_cv_member_struct___res_state_retrans = yes; then 23067if test $ac_cv_member_struct___res_state_retrans = yes; then
21923 : 23068 :
21924else 23069else
@@ -21930,8 +23075,8 @@ _ACEOF
21930fi 23075fi
21931 23076
21932 23077
21933echo "$as_me:$LINENO: checking for ss_family field in struct sockaddr_storage" >&5 23078{ echo "$as_me:$LINENO: checking for ss_family field in struct sockaddr_storage" >&5
21934echo $ECHO_N "checking for ss_family field in struct sockaddr_storage... $ECHO_C" >&6 23079echo $ECHO_N "checking for ss_family field in struct sockaddr_storage... $ECHO_C" >&6; }
21935if test "${ac_cv_have_ss_family_in_struct_ss+set}" = set; then 23080if test "${ac_cv_have_ss_family_in_struct_ss+set}" = set; then
21936 echo $ECHO_N "(cached) $ECHO_C" >&6 23081 echo $ECHO_N "(cached) $ECHO_C" >&6
21937else 23082else
@@ -21955,39 +23100,35 @@ main ()
21955} 23100}
21956_ACEOF 23101_ACEOF
21957rm -f conftest.$ac_objext 23102rm -f conftest.$ac_objext
21958if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 23103if { (ac_try="$ac_compile"
21959 (eval $ac_compile) 2>conftest.er1 23104case "(($ac_try" in
23105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23106 *) ac_try_echo=$ac_try;;
23107esac
23108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23109 (eval "$ac_compile") 2>conftest.er1
21960 ac_status=$? 23110 ac_status=$?
21961 grep -v '^ *+' conftest.er1 >conftest.err 23111 grep -v '^ *+' conftest.er1 >conftest.err
21962 rm -f conftest.er1 23112 rm -f conftest.er1
21963 cat conftest.err >&5 23113 cat conftest.err >&5
21964 echo "$as_me:$LINENO: \$? = $ac_status" >&5 23114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21965 (exit $ac_status); } && 23115 (exit $ac_status); } && {
21966 { ac_try='test -z "$ac_c_werror_flag" 23116 test -z "$ac_c_werror_flag" ||
21967 || test ! -s conftest.err' 23117 test ! -s conftest.err
21968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 23118 } && test -s conftest.$ac_objext; then
21969 (eval $ac_try) 2>&5
21970 ac_status=$?
21971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21972 (exit $ac_status); }; } &&
21973 { ac_try='test -s conftest.$ac_objext'
21974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21975 (eval $ac_try) 2>&5
21976 ac_status=$?
21977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21978 (exit $ac_status); }; }; then
21979 ac_cv_have_ss_family_in_struct_ss="yes" 23119 ac_cv_have_ss_family_in_struct_ss="yes"
21980else 23120else
21981 echo "$as_me: failed program was:" >&5 23121 echo "$as_me: failed program was:" >&5
21982sed 's/^/| /' conftest.$ac_ext >&5 23122sed 's/^/| /' conftest.$ac_ext >&5
21983 23123
21984 ac_cv_have_ss_family_in_struct_ss="no" 23124 ac_cv_have_ss_family_in_struct_ss="no"
21985fi 23125fi
21986rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 23126
23127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21987 23128
21988fi 23129fi
21989echo "$as_me:$LINENO: result: $ac_cv_have_ss_family_in_struct_ss" >&5 23130{ echo "$as_me:$LINENO: result: $ac_cv_have_ss_family_in_struct_ss" >&5
21990echo "${ECHO_T}$ac_cv_have_ss_family_in_struct_ss" >&6 23131echo "${ECHO_T}$ac_cv_have_ss_family_in_struct_ss" >&6; }
21991if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then 23132if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
21992 23133
21993cat >>confdefs.h <<\_ACEOF 23134cat >>confdefs.h <<\_ACEOF
@@ -21996,8 +23137,8 @@ _ACEOF
21996 23137
21997fi 23138fi
21998 23139
21999echo "$as_me:$LINENO: checking for __ss_family field in struct sockaddr_storage" >&5 23140{ echo "$as_me:$LINENO: checking for __ss_family field in struct sockaddr_storage" >&5
22000echo $ECHO_N "checking for __ss_family field in struct sockaddr_storage... $ECHO_C" >&6 23141echo $ECHO_N "checking for __ss_family field in struct sockaddr_storage... $ECHO_C" >&6; }
22001if test "${ac_cv_have___ss_family_in_struct_ss+set}" = set; then 23142if test "${ac_cv_have___ss_family_in_struct_ss+set}" = set; then
22002 echo $ECHO_N "(cached) $ECHO_C" >&6 23143 echo $ECHO_N "(cached) $ECHO_C" >&6
22003else 23144else
@@ -22021,40 +23162,36 @@ main ()
22021} 23162}
22022_ACEOF 23163_ACEOF
22023rm -f conftest.$ac_objext 23164rm -f conftest.$ac_objext
22024if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 23165if { (ac_try="$ac_compile"
22025 (eval $ac_compile) 2>conftest.er1 23166case "(($ac_try" in
23167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23168 *) ac_try_echo=$ac_try;;
23169esac
23170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23171 (eval "$ac_compile") 2>conftest.er1
22026 ac_status=$? 23172 ac_status=$?
22027 grep -v '^ *+' conftest.er1 >conftest.err 23173 grep -v '^ *+' conftest.er1 >conftest.err
22028 rm -f conftest.er1 23174 rm -f conftest.er1
22029 cat conftest.err >&5 23175 cat conftest.err >&5
22030 echo "$as_me:$LINENO: \$? = $ac_status" >&5 23176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22031 (exit $ac_status); } && 23177 (exit $ac_status); } && {
22032 { ac_try='test -z "$ac_c_werror_flag" 23178 test -z "$ac_c_werror_flag" ||
22033 || test ! -s conftest.err' 23179 test ! -s conftest.err
22034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 23180 } && test -s conftest.$ac_objext; then
22035 (eval $ac_try) 2>&5
22036 ac_status=$?
22037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22038 (exit $ac_status); }; } &&
22039 { ac_try='test -s conftest.$ac_objext'
22040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22041 (eval $ac_try) 2>&5
22042 ac_status=$?
22043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22044 (exit $ac_status); }; }; then
22045 ac_cv_have___ss_family_in_struct_ss="yes" 23181 ac_cv_have___ss_family_in_struct_ss="yes"
22046else 23182else
22047 echo "$as_me: failed program was:" >&5 23183 echo "$as_me: failed program was:" >&5
22048sed 's/^/| /' conftest.$ac_ext >&5 23184sed 's/^/| /' conftest.$ac_ext >&5
22049 23185
22050 ac_cv_have___ss_family_in_struct_ss="no" 23186 ac_cv_have___ss_family_in_struct_ss="no"
22051 23187
22052fi 23188fi
22053rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 23189
23190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22054 23191
22055fi 23192fi
22056echo "$as_me:$LINENO: result: $ac_cv_have___ss_family_in_struct_ss" >&5 23193{ echo "$as_me:$LINENO: result: $ac_cv_have___ss_family_in_struct_ss" >&5
22057echo "${ECHO_T}$ac_cv_have___ss_family_in_struct_ss" >&6 23194echo "${ECHO_T}$ac_cv_have___ss_family_in_struct_ss" >&6; }
22058if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then 23195if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
22059 23196
22060cat >>confdefs.h <<\_ACEOF 23197cat >>confdefs.h <<\_ACEOF
@@ -22063,8 +23200,8 @@ _ACEOF
22063 23200
22064fi 23201fi
22065 23202
22066echo "$as_me:$LINENO: checking for pw_class field in struct passwd" >&5 23203{ echo "$as_me:$LINENO: checking for pw_class field in struct passwd" >&5
22067echo $ECHO_N "checking for pw_class field in struct passwd... $ECHO_C" >&6 23204echo $ECHO_N "checking for pw_class field in struct passwd... $ECHO_C" >&6; }
22068if test "${ac_cv_have_pw_class_in_struct_passwd+set}" = set; then 23205if test "${ac_cv_have_pw_class_in_struct_passwd+set}" = set; then
22069 echo $ECHO_N "(cached) $ECHO_C" >&6 23206 echo $ECHO_N "(cached) $ECHO_C" >&6
22070else 23207else
@@ -22087,40 +23224,36 @@ main ()
22087} 23224}
22088_ACEOF 23225_ACEOF
22089rm -f conftest.$ac_objext 23226rm -f conftest.$ac_objext
22090if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 23227if { (ac_try="$ac_compile"
22091 (eval $ac_compile) 2>conftest.er1 23228case "(($ac_try" in
23229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23230 *) ac_try_echo=$ac_try;;
23231esac
23232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23233 (eval "$ac_compile") 2>conftest.er1
22092 ac_status=$? 23234 ac_status=$?
22093 grep -v '^ *+' conftest.er1 >conftest.err 23235 grep -v '^ *+' conftest.er1 >conftest.err
22094 rm -f conftest.er1 23236 rm -f conftest.er1
22095 cat conftest.err >&5 23237 cat conftest.err >&5
22096 echo "$as_me:$LINENO: \$? = $ac_status" >&5 23238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22097 (exit $ac_status); } && 23239 (exit $ac_status); } && {
22098 { ac_try='test -z "$ac_c_werror_flag" 23240 test -z "$ac_c_werror_flag" ||
22099 || test ! -s conftest.err' 23241 test ! -s conftest.err
22100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 23242 } && test -s conftest.$ac_objext; then
22101 (eval $ac_try) 2>&5
22102 ac_status=$?
22103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22104 (exit $ac_status); }; } &&
22105 { ac_try='test -s conftest.$ac_objext'
22106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22107 (eval $ac_try) 2>&5
22108 ac_status=$?
22109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22110 (exit $ac_status); }; }; then
22111 ac_cv_have_pw_class_in_struct_passwd="yes" 23243 ac_cv_have_pw_class_in_struct_passwd="yes"
22112else 23244else
22113 echo "$as_me: failed program was:" >&5 23245 echo "$as_me: failed program was:" >&5
22114sed 's/^/| /' conftest.$ac_ext >&5 23246sed 's/^/| /' conftest.$ac_ext >&5
22115 23247
22116 ac_cv_have_pw_class_in_struct_passwd="no" 23248 ac_cv_have_pw_class_in_struct_passwd="no"
22117 23249
22118fi 23250fi
22119rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 23251
23252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22120 23253
22121fi 23254fi
22122echo "$as_me:$LINENO: result: $ac_cv_have_pw_class_in_struct_passwd" >&5 23255{ echo "$as_me:$LINENO: result: $ac_cv_have_pw_class_in_struct_passwd" >&5
22123echo "${ECHO_T}$ac_cv_have_pw_class_in_struct_passwd" >&6 23256echo "${ECHO_T}$ac_cv_have_pw_class_in_struct_passwd" >&6; }
22124if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then 23257if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
22125 23258
22126cat >>confdefs.h <<\_ACEOF 23259cat >>confdefs.h <<\_ACEOF
@@ -22129,8 +23262,8 @@ _ACEOF
22129 23262
22130fi 23263fi
22131 23264
22132echo "$as_me:$LINENO: checking for pw_expire field in struct passwd" >&5 23265{ echo "$as_me:$LINENO: checking for pw_expire field in struct passwd" >&5
22133echo $ECHO_N "checking for pw_expire field in struct passwd... $ECHO_C" >&6 23266echo $ECHO_N "checking for pw_expire field in struct passwd... $ECHO_C" >&6; }
22134if test "${ac_cv_have_pw_expire_in_struct_passwd+set}" = set; then 23267if test "${ac_cv_have_pw_expire_in_struct_passwd+set}" = set; then
22135 echo $ECHO_N "(cached) $ECHO_C" >&6 23268 echo $ECHO_N "(cached) $ECHO_C" >&6
22136else 23269else
@@ -22153,40 +23286,36 @@ main ()
22153} 23286}
22154_ACEOF 23287_ACEOF
22155rm -f conftest.$ac_objext 23288rm -f conftest.$ac_objext
22156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 23289if { (ac_try="$ac_compile"
22157 (eval $ac_compile) 2>conftest.er1 23290case "(($ac_try" in
23291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23292 *) ac_try_echo=$ac_try;;
23293esac
23294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23295 (eval "$ac_compile") 2>conftest.er1
22158 ac_status=$? 23296 ac_status=$?
22159 grep -v '^ *+' conftest.er1 >conftest.err 23297 grep -v '^ *+' conftest.er1 >conftest.err
22160 rm -f conftest.er1 23298 rm -f conftest.er1
22161 cat conftest.err >&5 23299 cat conftest.err >&5
22162 echo "$as_me:$LINENO: \$? = $ac_status" >&5 23300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22163 (exit $ac_status); } && 23301 (exit $ac_status); } && {
22164 { ac_try='test -z "$ac_c_werror_flag" 23302 test -z "$ac_c_werror_flag" ||
22165 || test ! -s conftest.err' 23303 test ! -s conftest.err
22166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 23304 } && test -s conftest.$ac_objext; then
22167 (eval $ac_try) 2>&5
22168 ac_status=$?
22169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22170 (exit $ac_status); }; } &&
22171 { ac_try='test -s conftest.$ac_objext'
22172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22173 (eval $ac_try) 2>&5
22174 ac_status=$?
22175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22176 (exit $ac_status); }; }; then
22177 ac_cv_have_pw_expire_in_struct_passwd="yes" 23305 ac_cv_have_pw_expire_in_struct_passwd="yes"
22178else 23306else
22179 echo "$as_me: failed program was:" >&5 23307 echo "$as_me: failed program was:" >&5
22180sed 's/^/| /' conftest.$ac_ext >&5 23308sed 's/^/| /' conftest.$ac_ext >&5
22181 23309
22182 ac_cv_have_pw_expire_in_struct_passwd="no" 23310 ac_cv_have_pw_expire_in_struct_passwd="no"
22183 23311
22184fi 23312fi
22185rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 23313
23314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22186 23315
22187fi 23316fi
22188echo "$as_me:$LINENO: result: $ac_cv_have_pw_expire_in_struct_passwd" >&5 23317{ echo "$as_me:$LINENO: result: $ac_cv_have_pw_expire_in_struct_passwd" >&5
22189echo "${ECHO_T}$ac_cv_have_pw_expire_in_struct_passwd" >&6 23318echo "${ECHO_T}$ac_cv_have_pw_expire_in_struct_passwd" >&6; }
22190if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then 23319if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
22191 23320
22192cat >>confdefs.h <<\_ACEOF 23321cat >>confdefs.h <<\_ACEOF
@@ -22195,8 +23324,8 @@ _ACEOF
22195 23324
22196fi 23325fi
22197 23326
22198echo "$as_me:$LINENO: checking for pw_change field in struct passwd" >&5 23327{ echo "$as_me:$LINENO: checking for pw_change field in struct passwd" >&5
22199echo $ECHO_N "checking for pw_change field in struct passwd... $ECHO_C" >&6 23328echo $ECHO_N "checking for pw_change field in struct passwd... $ECHO_C" >&6; }
22200if test "${ac_cv_have_pw_change_in_struct_passwd+set}" = set; then 23329if test "${ac_cv_have_pw_change_in_struct_passwd+set}" = set; then
22201 echo $ECHO_N "(cached) $ECHO_C" >&6 23330 echo $ECHO_N "(cached) $ECHO_C" >&6
22202else 23331else
@@ -22219,40 +23348,36 @@ main ()
22219} 23348}
22220_ACEOF 23349_ACEOF
22221rm -f conftest.$ac_objext 23350rm -f conftest.$ac_objext
22222if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 23351if { (ac_try="$ac_compile"
22223 (eval $ac_compile) 2>conftest.er1 23352case "(($ac_try" in
23353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23354 *) ac_try_echo=$ac_try;;
23355esac
23356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23357 (eval "$ac_compile") 2>conftest.er1
22224 ac_status=$? 23358 ac_status=$?
22225 grep -v '^ *+' conftest.er1 >conftest.err 23359 grep -v '^ *+' conftest.er1 >conftest.err
22226 rm -f conftest.er1 23360 rm -f conftest.er1
22227 cat conftest.err >&5 23361 cat conftest.err >&5
22228 echo "$as_me:$LINENO: \$? = $ac_status" >&5 23362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22229 (exit $ac_status); } && 23363 (exit $ac_status); } && {
22230 { ac_try='test -z "$ac_c_werror_flag" 23364 test -z "$ac_c_werror_flag" ||
22231 || test ! -s conftest.err' 23365 test ! -s conftest.err
22232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 23366 } && test -s conftest.$ac_objext; then
22233 (eval $ac_try) 2>&5
22234 ac_status=$?
22235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22236 (exit $ac_status); }; } &&
22237 { ac_try='test -s conftest.$ac_objext'
22238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22239 (eval $ac_try) 2>&5
22240 ac_status=$?
22241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22242 (exit $ac_status); }; }; then
22243 ac_cv_have_pw_change_in_struct_passwd="yes" 23367 ac_cv_have_pw_change_in_struct_passwd="yes"
22244else 23368else
22245 echo "$as_me: failed program was:" >&5 23369 echo "$as_me: failed program was:" >&5
22246sed 's/^/| /' conftest.$ac_ext >&5 23370sed 's/^/| /' conftest.$ac_ext >&5
22247 23371
22248 ac_cv_have_pw_change_in_struct_passwd="no" 23372 ac_cv_have_pw_change_in_struct_passwd="no"
22249 23373
22250fi 23374fi
22251rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 23375
23376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22252 23377
22253fi 23378fi
22254echo "$as_me:$LINENO: result: $ac_cv_have_pw_change_in_struct_passwd" >&5 23379{ echo "$as_me:$LINENO: result: $ac_cv_have_pw_change_in_struct_passwd" >&5
22255echo "${ECHO_T}$ac_cv_have_pw_change_in_struct_passwd" >&6 23380echo "${ECHO_T}$ac_cv_have_pw_change_in_struct_passwd" >&6; }
22256if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then 23381if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
22257 23382
22258cat >>confdefs.h <<\_ACEOF 23383cat >>confdefs.h <<\_ACEOF
@@ -22261,8 +23386,8 @@ _ACEOF
22261 23386
22262fi 23387fi
22263 23388
22264echo "$as_me:$LINENO: checking for msg_accrights field in struct msghdr" >&5 23389{ echo "$as_me:$LINENO: checking for msg_accrights field in struct msghdr" >&5
22265echo $ECHO_N "checking for msg_accrights field in struct msghdr... $ECHO_C" >&6 23390echo $ECHO_N "checking for msg_accrights field in struct msghdr... $ECHO_C" >&6; }
22266if test "${ac_cv_have_accrights_in_msghdr+set}" = set; then 23391if test "${ac_cv_have_accrights_in_msghdr+set}" = set; then
22267 echo $ECHO_N "(cached) $ECHO_C" >&6 23392 echo $ECHO_N "(cached) $ECHO_C" >&6
22268else 23393else
@@ -22284,40 +23409,36 @@ exit(0);
22284 23409
22285_ACEOF 23410_ACEOF
22286rm -f conftest.$ac_objext 23411rm -f conftest.$ac_objext
22287if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 23412if { (ac_try="$ac_compile"
22288 (eval $ac_compile) 2>conftest.er1 23413case "(($ac_try" in
23414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23415 *) ac_try_echo=$ac_try;;
23416esac
23417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23418 (eval "$ac_compile") 2>conftest.er1
22289 ac_status=$? 23419 ac_status=$?
22290 grep -v '^ *+' conftest.er1 >conftest.err 23420 grep -v '^ *+' conftest.er1 >conftest.err
22291 rm -f conftest.er1 23421 rm -f conftest.er1
22292 cat conftest.err >&5 23422 cat conftest.err >&5
22293 echo "$as_me:$LINENO: \$? = $ac_status" >&5 23423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22294 (exit $ac_status); } && 23424 (exit $ac_status); } && {
22295 { ac_try='test -z "$ac_c_werror_flag" 23425 test -z "$ac_c_werror_flag" ||
22296 || test ! -s conftest.err' 23426 test ! -s conftest.err
22297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 23427 } && test -s conftest.$ac_objext; then
22298 (eval $ac_try) 2>&5
22299 ac_status=$?
22300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22301 (exit $ac_status); }; } &&
22302 { ac_try='test -s conftest.$ac_objext'
22303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22304 (eval $ac_try) 2>&5
22305 ac_status=$?
22306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22307 (exit $ac_status); }; }; then
22308 ac_cv_have_accrights_in_msghdr="yes" 23428 ac_cv_have_accrights_in_msghdr="yes"
22309else 23429else
22310 echo "$as_me: failed program was:" >&5 23430 echo "$as_me: failed program was:" >&5
22311sed 's/^/| /' conftest.$ac_ext >&5 23431sed 's/^/| /' conftest.$ac_ext >&5
22312 23432
22313 ac_cv_have_accrights_in_msghdr="no" 23433 ac_cv_have_accrights_in_msghdr="no"
22314 23434
22315fi 23435fi
22316rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 23436
23437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22317 23438
22318fi 23439fi
22319echo "$as_me:$LINENO: result: $ac_cv_have_accrights_in_msghdr" >&5 23440{ echo "$as_me:$LINENO: result: $ac_cv_have_accrights_in_msghdr" >&5
22320echo "${ECHO_T}$ac_cv_have_accrights_in_msghdr" >&6 23441echo "${ECHO_T}$ac_cv_have_accrights_in_msghdr" >&6; }
22321if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then 23442if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
22322 23443
22323cat >>confdefs.h <<\_ACEOF 23444cat >>confdefs.h <<\_ACEOF
@@ -22326,8 +23447,8 @@ _ACEOF
22326 23447
22327fi 23448fi
22328 23449
22329echo "$as_me:$LINENO: checking for msg_control field in struct msghdr" >&5 23450{ echo "$as_me:$LINENO: checking for msg_control field in struct msghdr" >&5
22330echo $ECHO_N "checking for msg_control field in struct msghdr... $ECHO_C" >&6 23451echo $ECHO_N "checking for msg_control field in struct msghdr... $ECHO_C" >&6; }
22331if test "${ac_cv_have_control_in_msghdr+set}" = set; then 23452if test "${ac_cv_have_control_in_msghdr+set}" = set; then
22332 echo $ECHO_N "(cached) $ECHO_C" >&6 23453 echo $ECHO_N "(cached) $ECHO_C" >&6
22333else 23454else
@@ -22349,40 +23470,36 @@ exit(0);
22349 23470
22350_ACEOF 23471_ACEOF
22351rm -f conftest.$ac_objext 23472rm -f conftest.$ac_objext
22352if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 23473if { (ac_try="$ac_compile"
22353 (eval $ac_compile) 2>conftest.er1 23474case "(($ac_try" in
23475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23476 *) ac_try_echo=$ac_try;;
23477esac
23478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23479 (eval "$ac_compile") 2>conftest.er1
22354 ac_status=$? 23480 ac_status=$?
22355 grep -v '^ *+' conftest.er1 >conftest.err 23481 grep -v '^ *+' conftest.er1 >conftest.err
22356 rm -f conftest.er1 23482 rm -f conftest.er1
22357 cat conftest.err >&5 23483 cat conftest.err >&5
22358 echo "$as_me:$LINENO: \$? = $ac_status" >&5 23484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22359 (exit $ac_status); } && 23485 (exit $ac_status); } && {
22360 { ac_try='test -z "$ac_c_werror_flag" 23486 test -z "$ac_c_werror_flag" ||
22361 || test ! -s conftest.err' 23487 test ! -s conftest.err
22362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 23488 } && test -s conftest.$ac_objext; then
22363 (eval $ac_try) 2>&5
22364 ac_status=$?
22365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22366 (exit $ac_status); }; } &&
22367 { ac_try='test -s conftest.$ac_objext'
22368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22369 (eval $ac_try) 2>&5
22370 ac_status=$?
22371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22372 (exit $ac_status); }; }; then
22373 ac_cv_have_control_in_msghdr="yes" 23489 ac_cv_have_control_in_msghdr="yes"
22374else 23490else
22375 echo "$as_me: failed program was:" >&5 23491 echo "$as_me: failed program was:" >&5
22376sed 's/^/| /' conftest.$ac_ext >&5 23492sed 's/^/| /' conftest.$ac_ext >&5
22377 23493
22378 ac_cv_have_control_in_msghdr="no" 23494 ac_cv_have_control_in_msghdr="no"
22379 23495
22380fi 23496fi
22381rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 23497
23498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22382 23499
22383fi 23500fi
22384echo "$as_me:$LINENO: result: $ac_cv_have_control_in_msghdr" >&5 23501{ echo "$as_me:$LINENO: result: $ac_cv_have_control_in_msghdr" >&5
22385echo "${ECHO_T}$ac_cv_have_control_in_msghdr" >&6 23502echo "${ECHO_T}$ac_cv_have_control_in_msghdr" >&6; }
22386if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then 23503if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
22387 23504
22388cat >>confdefs.h <<\_ACEOF 23505cat >>confdefs.h <<\_ACEOF
@@ -22391,8 +23508,8 @@ _ACEOF
22391 23508
22392fi 23509fi
22393 23510
22394echo "$as_me:$LINENO: checking if libc defines __progname" >&5 23511{ echo "$as_me:$LINENO: checking if libc defines __progname" >&5
22395echo $ECHO_N "checking if libc defines __progname... $ECHO_C" >&6 23512echo $ECHO_N "checking if libc defines __progname... $ECHO_C" >&6; }
22396if test "${ac_cv_libc_defines___progname+set}" = set; then 23513if test "${ac_cv_libc_defines___progname+set}" = set; then
22397 echo $ECHO_N "(cached) $ECHO_C" >&6 23514 echo $ECHO_N "(cached) $ECHO_C" >&6
22398else 23515else
@@ -22413,41 +23530,38 @@ main ()
22413} 23530}
22414_ACEOF 23531_ACEOF
22415rm -f conftest.$ac_objext conftest$ac_exeext 23532rm -f conftest.$ac_objext conftest$ac_exeext
22416if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 23533if { (ac_try="$ac_link"
22417 (eval $ac_link) 2>conftest.er1 23534case "(($ac_try" in
23535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23536 *) ac_try_echo=$ac_try;;
23537esac
23538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23539 (eval "$ac_link") 2>conftest.er1
22418 ac_status=$? 23540 ac_status=$?
22419 grep -v '^ *+' conftest.er1 >conftest.err 23541 grep -v '^ *+' conftest.er1 >conftest.err
22420 rm -f conftest.er1 23542 rm -f conftest.er1
22421 cat conftest.err >&5 23543 cat conftest.err >&5
22422 echo "$as_me:$LINENO: \$? = $ac_status" >&5 23544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22423 (exit $ac_status); } && 23545 (exit $ac_status); } && {
22424 { ac_try='test -z "$ac_c_werror_flag" 23546 test -z "$ac_c_werror_flag" ||
22425 || test ! -s conftest.err' 23547 test ! -s conftest.err
22426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 23548 } && test -s conftest$ac_exeext &&
22427 (eval $ac_try) 2>&5 23549 $as_test_x conftest$ac_exeext; then
22428 ac_status=$?
22429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22430 (exit $ac_status); }; } &&
22431 { ac_try='test -s conftest$ac_exeext'
22432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22433 (eval $ac_try) 2>&5
22434 ac_status=$?
22435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22436 (exit $ac_status); }; }; then
22437 ac_cv_libc_defines___progname="yes" 23550 ac_cv_libc_defines___progname="yes"
22438else 23551else
22439 echo "$as_me: failed program was:" >&5 23552 echo "$as_me: failed program was:" >&5
22440sed 's/^/| /' conftest.$ac_ext >&5 23553sed 's/^/| /' conftest.$ac_ext >&5
22441 23554
22442 ac_cv_libc_defines___progname="no" 23555 ac_cv_libc_defines___progname="no"
22443 23556
22444fi 23557fi
22445rm -f conftest.err conftest.$ac_objext \ 23558
23559rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22446 conftest$ac_exeext conftest.$ac_ext 23560 conftest$ac_exeext conftest.$ac_ext
22447 23561
22448fi 23562fi
22449echo "$as_me:$LINENO: result: $ac_cv_libc_defines___progname" >&5 23563{ echo "$as_me:$LINENO: result: $ac_cv_libc_defines___progname" >&5
22450echo "${ECHO_T}$ac_cv_libc_defines___progname" >&6 23564echo "${ECHO_T}$ac_cv_libc_defines___progname" >&6; }
22451if test "x$ac_cv_libc_defines___progname" = "xyes" ; then 23565if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
22452 23566
22453cat >>confdefs.h <<\_ACEOF 23567cat >>confdefs.h <<\_ACEOF
@@ -22456,8 +23570,8 @@ _ACEOF
22456 23570
22457fi 23571fi
22458 23572
22459echo "$as_me:$LINENO: checking whether $CC implements __FUNCTION__" >&5 23573{ echo "$as_me:$LINENO: checking whether $CC implements __FUNCTION__" >&5
22460echo $ECHO_N "checking whether $CC implements __FUNCTION__... $ECHO_C" >&6 23574echo $ECHO_N "checking whether $CC implements __FUNCTION__... $ECHO_C" >&6; }
22461if test "${ac_cv_cc_implements___FUNCTION__+set}" = set; then 23575if test "${ac_cv_cc_implements___FUNCTION__+set}" = set; then
22462 echo $ECHO_N "(cached) $ECHO_C" >&6 23576 echo $ECHO_N "(cached) $ECHO_C" >&6
22463else 23577else
@@ -22480,41 +23594,38 @@ main ()
22480} 23594}
22481_ACEOF 23595_ACEOF
22482rm -f conftest.$ac_objext conftest$ac_exeext 23596rm -f conftest.$ac_objext conftest$ac_exeext
22483if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 23597if { (ac_try="$ac_link"
22484 (eval $ac_link) 2>conftest.er1 23598case "(($ac_try" in
23599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23600 *) ac_try_echo=$ac_try;;
23601esac
23602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23603 (eval "$ac_link") 2>conftest.er1
22485 ac_status=$? 23604 ac_status=$?
22486 grep -v '^ *+' conftest.er1 >conftest.err 23605 grep -v '^ *+' conftest.er1 >conftest.err
22487 rm -f conftest.er1 23606 rm -f conftest.er1
22488 cat conftest.err >&5 23607 cat conftest.err >&5
22489 echo "$as_me:$LINENO: \$? = $ac_status" >&5 23608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22490 (exit $ac_status); } && 23609 (exit $ac_status); } && {
22491 { ac_try='test -z "$ac_c_werror_flag" 23610 test -z "$ac_c_werror_flag" ||
22492 || test ! -s conftest.err' 23611 test ! -s conftest.err
22493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 23612 } && test -s conftest$ac_exeext &&
22494 (eval $ac_try) 2>&5 23613 $as_test_x conftest$ac_exeext; then
22495 ac_status=$?
22496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22497 (exit $ac_status); }; } &&
22498 { ac_try='test -s conftest$ac_exeext'
22499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22500 (eval $ac_try) 2>&5
22501 ac_status=$?
22502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22503 (exit $ac_status); }; }; then
22504 ac_cv_cc_implements___FUNCTION__="yes" 23614 ac_cv_cc_implements___FUNCTION__="yes"
22505else 23615else
22506 echo "$as_me: failed program was:" >&5 23616 echo "$as_me: failed program was:" >&5
22507sed 's/^/| /' conftest.$ac_ext >&5 23617sed 's/^/| /' conftest.$ac_ext >&5
22508 23618
22509 ac_cv_cc_implements___FUNCTION__="no" 23619 ac_cv_cc_implements___FUNCTION__="no"
22510 23620
22511fi 23621fi
22512rm -f conftest.err conftest.$ac_objext \ 23622
23623rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22513 conftest$ac_exeext conftest.$ac_ext 23624 conftest$ac_exeext conftest.$ac_ext
22514 23625
22515fi 23626fi
22516echo "$as_me:$LINENO: result: $ac_cv_cc_implements___FUNCTION__" >&5 23627{ echo "$as_me:$LINENO: result: $ac_cv_cc_implements___FUNCTION__" >&5
22517echo "${ECHO_T}$ac_cv_cc_implements___FUNCTION__" >&6 23628echo "${ECHO_T}$ac_cv_cc_implements___FUNCTION__" >&6; }
22518if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then 23629if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
22519 23630
22520cat >>confdefs.h <<\_ACEOF 23631cat >>confdefs.h <<\_ACEOF
@@ -22523,8 +23634,8 @@ _ACEOF
22523 23634
22524fi 23635fi
22525 23636
22526echo "$as_me:$LINENO: checking whether $CC implements __func__" >&5 23637{ echo "$as_me:$LINENO: checking whether $CC implements __func__" >&5
22527echo $ECHO_N "checking whether $CC implements __func__... $ECHO_C" >&6 23638echo $ECHO_N "checking whether $CC implements __func__... $ECHO_C" >&6; }
22528if test "${ac_cv_cc_implements___func__+set}" = set; then 23639if test "${ac_cv_cc_implements___func__+set}" = set; then
22529 echo $ECHO_N "(cached) $ECHO_C" >&6 23640 echo $ECHO_N "(cached) $ECHO_C" >&6
22530else 23641else
@@ -22547,41 +23658,38 @@ main ()
22547} 23658}
22548_ACEOF 23659_ACEOF
22549rm -f conftest.$ac_objext conftest$ac_exeext 23660rm -f conftest.$ac_objext conftest$ac_exeext
22550if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 23661if { (ac_try="$ac_link"
22551 (eval $ac_link) 2>conftest.er1 23662case "(($ac_try" in
23663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23664 *) ac_try_echo=$ac_try;;
23665esac
23666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23667 (eval "$ac_link") 2>conftest.er1
22552 ac_status=$? 23668 ac_status=$?
22553 grep -v '^ *+' conftest.er1 >conftest.err 23669 grep -v '^ *+' conftest.er1 >conftest.err
22554 rm -f conftest.er1 23670 rm -f conftest.er1
22555 cat conftest.err >&5 23671 cat conftest.err >&5
22556 echo "$as_me:$LINENO: \$? = $ac_status" >&5 23672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22557 (exit $ac_status); } && 23673 (exit $ac_status); } && {
22558 { ac_try='test -z "$ac_c_werror_flag" 23674 test -z "$ac_c_werror_flag" ||
22559 || test ! -s conftest.err' 23675 test ! -s conftest.err
22560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 23676 } && test -s conftest$ac_exeext &&
22561 (eval $ac_try) 2>&5 23677 $as_test_x conftest$ac_exeext; then
22562 ac_status=$?
22563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22564 (exit $ac_status); }; } &&
22565 { ac_try='test -s conftest$ac_exeext'
22566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22567 (eval $ac_try) 2>&5
22568 ac_status=$?
22569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22570 (exit $ac_status); }; }; then
22571 ac_cv_cc_implements___func__="yes" 23678 ac_cv_cc_implements___func__="yes"
22572else 23679else
22573 echo "$as_me: failed program was:" >&5 23680 echo "$as_me: failed program was:" >&5
22574sed 's/^/| /' conftest.$ac_ext >&5 23681sed 's/^/| /' conftest.$ac_ext >&5
22575 23682
22576 ac_cv_cc_implements___func__="no" 23683 ac_cv_cc_implements___func__="no"
22577 23684
22578fi 23685fi
22579rm -f conftest.err conftest.$ac_objext \ 23686
23687rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22580 conftest$ac_exeext conftest.$ac_ext 23688 conftest$ac_exeext conftest.$ac_ext
22581 23689
22582fi 23690fi
22583echo "$as_me:$LINENO: result: $ac_cv_cc_implements___func__" >&5 23691{ echo "$as_me:$LINENO: result: $ac_cv_cc_implements___func__" >&5
22584echo "${ECHO_T}$ac_cv_cc_implements___func__" >&6 23692echo "${ECHO_T}$ac_cv_cc_implements___func__" >&6; }
22585if test "x$ac_cv_cc_implements___func__" = "xyes" ; then 23693if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
22586 23694
22587cat >>confdefs.h <<\_ACEOF 23695cat >>confdefs.h <<\_ACEOF
@@ -22590,8 +23698,8 @@ _ACEOF
22590 23698
22591fi 23699fi
22592 23700
22593echo "$as_me:$LINENO: checking whether va_copy exists" >&5 23701{ echo "$as_me:$LINENO: checking whether va_copy exists" >&5
22594echo $ECHO_N "checking whether va_copy exists... $ECHO_C" >&6 23702echo $ECHO_N "checking whether va_copy exists... $ECHO_C" >&6; }
22595if test "${ac_cv_have_va_copy+set}" = set; then 23703if test "${ac_cv_have_va_copy+set}" = set; then
22596 echo $ECHO_N "(cached) $ECHO_C" >&6 23704 echo $ECHO_N "(cached) $ECHO_C" >&6
22597else 23705else
@@ -22613,41 +23721,38 @@ va_copy(x,y);
22613} 23721}
22614_ACEOF 23722_ACEOF
22615rm -f conftest.$ac_objext conftest$ac_exeext 23723rm -f conftest.$ac_objext conftest$ac_exeext
22616if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 23724if { (ac_try="$ac_link"
22617 (eval $ac_link) 2>conftest.er1 23725case "(($ac_try" in
23726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23727 *) ac_try_echo=$ac_try;;
23728esac
23729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23730 (eval "$ac_link") 2>conftest.er1
22618 ac_status=$? 23731 ac_status=$?
22619 grep -v '^ *+' conftest.er1 >conftest.err 23732 grep -v '^ *+' conftest.er1 >conftest.err
22620 rm -f conftest.er1 23733 rm -f conftest.er1
22621 cat conftest.err >&5 23734 cat conftest.err >&5
22622 echo "$as_me:$LINENO: \$? = $ac_status" >&5 23735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22623 (exit $ac_status); } && 23736 (exit $ac_status); } && {
22624 { ac_try='test -z "$ac_c_werror_flag" 23737 test -z "$ac_c_werror_flag" ||
22625 || test ! -s conftest.err' 23738 test ! -s conftest.err
22626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 23739 } && test -s conftest$ac_exeext &&
22627 (eval $ac_try) 2>&5 23740 $as_test_x conftest$ac_exeext; then
22628 ac_status=$?
22629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22630 (exit $ac_status); }; } &&
22631 { ac_try='test -s conftest$ac_exeext'
22632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22633 (eval $ac_try) 2>&5
22634 ac_status=$?
22635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22636 (exit $ac_status); }; }; then
22637 ac_cv_have_va_copy="yes" 23741 ac_cv_have_va_copy="yes"
22638else 23742else
22639 echo "$as_me: failed program was:" >&5 23743 echo "$as_me: failed program was:" >&5
22640sed 's/^/| /' conftest.$ac_ext >&5 23744sed 's/^/| /' conftest.$ac_ext >&5
22641 23745
22642 ac_cv_have_va_copy="no" 23746 ac_cv_have_va_copy="no"
22643 23747
22644fi 23748fi
22645rm -f conftest.err conftest.$ac_objext \ 23749
23750rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22646 conftest$ac_exeext conftest.$ac_ext 23751 conftest$ac_exeext conftest.$ac_ext
22647 23752
22648fi 23753fi
22649echo "$as_me:$LINENO: result: $ac_cv_have_va_copy" >&5 23754{ echo "$as_me:$LINENO: result: $ac_cv_have_va_copy" >&5
22650echo "${ECHO_T}$ac_cv_have_va_copy" >&6 23755echo "${ECHO_T}$ac_cv_have_va_copy" >&6; }
22651if test "x$ac_cv_have_va_copy" = "xyes" ; then 23756if test "x$ac_cv_have_va_copy" = "xyes" ; then
22652 23757
22653cat >>confdefs.h <<\_ACEOF 23758cat >>confdefs.h <<\_ACEOF
@@ -22656,8 +23761,8 @@ _ACEOF
22656 23761
22657fi 23762fi
22658 23763
22659echo "$as_me:$LINENO: checking whether __va_copy exists" >&5 23764{ echo "$as_me:$LINENO: checking whether __va_copy exists" >&5
22660echo $ECHO_N "checking whether __va_copy exists... $ECHO_C" >&6 23765echo $ECHO_N "checking whether __va_copy exists... $ECHO_C" >&6; }
22661if test "${ac_cv_have___va_copy+set}" = set; then 23766if test "${ac_cv_have___va_copy+set}" = set; then
22662 echo $ECHO_N "(cached) $ECHO_C" >&6 23767 echo $ECHO_N "(cached) $ECHO_C" >&6
22663else 23768else
@@ -22679,41 +23784,38 @@ __va_copy(x,y);
22679} 23784}
22680_ACEOF 23785_ACEOF
22681rm -f conftest.$ac_objext conftest$ac_exeext 23786rm -f conftest.$ac_objext conftest$ac_exeext
22682if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 23787if { (ac_try="$ac_link"
22683 (eval $ac_link) 2>conftest.er1 23788case "(($ac_try" in
23789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23790 *) ac_try_echo=$ac_try;;
23791esac
23792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23793 (eval "$ac_link") 2>conftest.er1
22684 ac_status=$? 23794 ac_status=$?
22685 grep -v '^ *+' conftest.er1 >conftest.err 23795 grep -v '^ *+' conftest.er1 >conftest.err
22686 rm -f conftest.er1 23796 rm -f conftest.er1
22687 cat conftest.err >&5 23797 cat conftest.err >&5
22688 echo "$as_me:$LINENO: \$? = $ac_status" >&5 23798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22689 (exit $ac_status); } && 23799 (exit $ac_status); } && {
22690 { ac_try='test -z "$ac_c_werror_flag" 23800 test -z "$ac_c_werror_flag" ||
22691 || test ! -s conftest.err' 23801 test ! -s conftest.err
22692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 23802 } && test -s conftest$ac_exeext &&
22693 (eval $ac_try) 2>&5 23803 $as_test_x conftest$ac_exeext; then
22694 ac_status=$?
22695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22696 (exit $ac_status); }; } &&
22697 { ac_try='test -s conftest$ac_exeext'
22698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22699 (eval $ac_try) 2>&5
22700 ac_status=$?
22701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22702 (exit $ac_status); }; }; then
22703 ac_cv_have___va_copy="yes" 23804 ac_cv_have___va_copy="yes"
22704else 23805else
22705 echo "$as_me: failed program was:" >&5 23806 echo "$as_me: failed program was:" >&5
22706sed 's/^/| /' conftest.$ac_ext >&5 23807sed 's/^/| /' conftest.$ac_ext >&5
22707 23808
22708 ac_cv_have___va_copy="no" 23809 ac_cv_have___va_copy="no"
22709 23810
22710fi 23811fi
22711rm -f conftest.err conftest.$ac_objext \ 23812
23813rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22712 conftest$ac_exeext conftest.$ac_ext 23814 conftest$ac_exeext conftest.$ac_ext
22713 23815
22714fi 23816fi
22715echo "$as_me:$LINENO: result: $ac_cv_have___va_copy" >&5 23817{ echo "$as_me:$LINENO: result: $ac_cv_have___va_copy" >&5
22716echo "${ECHO_T}$ac_cv_have___va_copy" >&6 23818echo "${ECHO_T}$ac_cv_have___va_copy" >&6; }
22717if test "x$ac_cv_have___va_copy" = "xyes" ; then 23819if test "x$ac_cv_have___va_copy" = "xyes" ; then
22718 23820
22719cat >>confdefs.h <<\_ACEOF 23821cat >>confdefs.h <<\_ACEOF
@@ -22722,8 +23824,8 @@ _ACEOF
22722 23824
22723fi 23825fi
22724 23826
22725echo "$as_me:$LINENO: checking whether getopt has optreset support" >&5 23827{ echo "$as_me:$LINENO: checking whether getopt has optreset support" >&5
22726echo $ECHO_N "checking whether getopt has optreset support... $ECHO_C" >&6 23828echo $ECHO_N "checking whether getopt has optreset support... $ECHO_C" >&6; }
22727if test "${ac_cv_have_getopt_optreset+set}" = set; then 23829if test "${ac_cv_have_getopt_optreset+set}" = set; then
22728 echo $ECHO_N "(cached) $ECHO_C" >&6 23830 echo $ECHO_N "(cached) $ECHO_C" >&6
22729else 23831else
@@ -22746,41 +23848,38 @@ main ()
22746} 23848}
22747_ACEOF 23849_ACEOF
22748rm -f conftest.$ac_objext conftest$ac_exeext 23850rm -f conftest.$ac_objext conftest$ac_exeext
22749if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 23851if { (ac_try="$ac_link"
22750 (eval $ac_link) 2>conftest.er1 23852case "(($ac_try" in
23853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23854 *) ac_try_echo=$ac_try;;
23855esac
23856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23857 (eval "$ac_link") 2>conftest.er1
22751 ac_status=$? 23858 ac_status=$?
22752 grep -v '^ *+' conftest.er1 >conftest.err 23859 grep -v '^ *+' conftest.er1 >conftest.err
22753 rm -f conftest.er1 23860 rm -f conftest.er1
22754 cat conftest.err >&5 23861 cat conftest.err >&5
22755 echo "$as_me:$LINENO: \$? = $ac_status" >&5 23862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22756 (exit $ac_status); } && 23863 (exit $ac_status); } && {
22757 { ac_try='test -z "$ac_c_werror_flag" 23864 test -z "$ac_c_werror_flag" ||
22758 || test ! -s conftest.err' 23865 test ! -s conftest.err
22759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 23866 } && test -s conftest$ac_exeext &&
22760 (eval $ac_try) 2>&5 23867 $as_test_x conftest$ac_exeext; then
22761 ac_status=$?
22762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22763 (exit $ac_status); }; } &&
22764 { ac_try='test -s conftest$ac_exeext'
22765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22766 (eval $ac_try) 2>&5
22767 ac_status=$?
22768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22769 (exit $ac_status); }; }; then
22770 ac_cv_have_getopt_optreset="yes" 23868 ac_cv_have_getopt_optreset="yes"
22771else 23869else
22772 echo "$as_me: failed program was:" >&5 23870 echo "$as_me: failed program was:" >&5
22773sed 's/^/| /' conftest.$ac_ext >&5 23871sed 's/^/| /' conftest.$ac_ext >&5
22774 23872
22775 ac_cv_have_getopt_optreset="no" 23873 ac_cv_have_getopt_optreset="no"
22776 23874
22777fi 23875fi
22778rm -f conftest.err conftest.$ac_objext \ 23876
23877rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22779 conftest$ac_exeext conftest.$ac_ext 23878 conftest$ac_exeext conftest.$ac_ext
22780 23879
22781fi 23880fi
22782echo "$as_me:$LINENO: result: $ac_cv_have_getopt_optreset" >&5 23881{ echo "$as_me:$LINENO: result: $ac_cv_have_getopt_optreset" >&5
22783echo "${ECHO_T}$ac_cv_have_getopt_optreset" >&6 23882echo "${ECHO_T}$ac_cv_have_getopt_optreset" >&6; }
22784if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then 23883if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
22785 23884
22786cat >>confdefs.h <<\_ACEOF 23885cat >>confdefs.h <<\_ACEOF
@@ -22789,8 +23888,8 @@ _ACEOF
22789 23888
22790fi 23889fi
22791 23890
22792echo "$as_me:$LINENO: checking if libc defines sys_errlist" >&5 23891{ echo "$as_me:$LINENO: checking if libc defines sys_errlist" >&5
22793echo $ECHO_N "checking if libc defines sys_errlist... $ECHO_C" >&6 23892echo $ECHO_N "checking if libc defines sys_errlist... $ECHO_C" >&6; }
22794if test "${ac_cv_libc_defines_sys_errlist+set}" = set; then 23893if test "${ac_cv_libc_defines_sys_errlist+set}" = set; then
22795 echo $ECHO_N "(cached) $ECHO_C" >&6 23894 echo $ECHO_N "(cached) $ECHO_C" >&6
22796else 23895else
@@ -22811,41 +23910,38 @@ main ()
22811} 23910}
22812_ACEOF 23911_ACEOF
22813rm -f conftest.$ac_objext conftest$ac_exeext 23912rm -f conftest.$ac_objext conftest$ac_exeext
22814if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 23913if { (ac_try="$ac_link"
22815 (eval $ac_link) 2>conftest.er1 23914case "(($ac_try" in
23915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23916 *) ac_try_echo=$ac_try;;
23917esac
23918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23919 (eval "$ac_link") 2>conftest.er1
22816 ac_status=$? 23920 ac_status=$?
22817 grep -v '^ *+' conftest.er1 >conftest.err 23921 grep -v '^ *+' conftest.er1 >conftest.err
22818 rm -f conftest.er1 23922 rm -f conftest.er1
22819 cat conftest.err >&5 23923 cat conftest.err >&5
22820 echo "$as_me:$LINENO: \$? = $ac_status" >&5 23924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22821 (exit $ac_status); } && 23925 (exit $ac_status); } && {
22822 { ac_try='test -z "$ac_c_werror_flag" 23926 test -z "$ac_c_werror_flag" ||
22823 || test ! -s conftest.err' 23927 test ! -s conftest.err
22824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 23928 } && test -s conftest$ac_exeext &&
22825 (eval $ac_try) 2>&5 23929 $as_test_x conftest$ac_exeext; then
22826 ac_status=$?
22827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22828 (exit $ac_status); }; } &&
22829 { ac_try='test -s conftest$ac_exeext'
22830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22831 (eval $ac_try) 2>&5
22832 ac_status=$?
22833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22834 (exit $ac_status); }; }; then
22835 ac_cv_libc_defines_sys_errlist="yes" 23930 ac_cv_libc_defines_sys_errlist="yes"
22836else 23931else
22837 echo "$as_me: failed program was:" >&5 23932 echo "$as_me: failed program was:" >&5
22838sed 's/^/| /' conftest.$ac_ext >&5 23933sed 's/^/| /' conftest.$ac_ext >&5
22839 23934
22840 ac_cv_libc_defines_sys_errlist="no" 23935 ac_cv_libc_defines_sys_errlist="no"
22841 23936
22842fi 23937fi
22843rm -f conftest.err conftest.$ac_objext \ 23938
23939rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22844 conftest$ac_exeext conftest.$ac_ext 23940 conftest$ac_exeext conftest.$ac_ext
22845 23941
22846fi 23942fi
22847echo "$as_me:$LINENO: result: $ac_cv_libc_defines_sys_errlist" >&5 23943{ echo "$as_me:$LINENO: result: $ac_cv_libc_defines_sys_errlist" >&5
22848echo "${ECHO_T}$ac_cv_libc_defines_sys_errlist" >&6 23944echo "${ECHO_T}$ac_cv_libc_defines_sys_errlist" >&6; }
22849if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then 23945if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
22850 23946
22851cat >>confdefs.h <<\_ACEOF 23947cat >>confdefs.h <<\_ACEOF
@@ -22855,8 +23951,8 @@ _ACEOF
22855fi 23951fi
22856 23952
22857 23953
22858echo "$as_me:$LINENO: checking if libc defines sys_nerr" >&5 23954{ echo "$as_me:$LINENO: checking if libc defines sys_nerr" >&5
22859echo $ECHO_N "checking if libc defines sys_nerr... $ECHO_C" >&6 23955echo $ECHO_N "checking if libc defines sys_nerr... $ECHO_C" >&6; }
22860if test "${ac_cv_libc_defines_sys_nerr+set}" = set; then 23956if test "${ac_cv_libc_defines_sys_nerr+set}" = set; then
22861 echo $ECHO_N "(cached) $ECHO_C" >&6 23957 echo $ECHO_N "(cached) $ECHO_C" >&6
22862else 23958else
@@ -22877,41 +23973,38 @@ main ()
22877} 23973}
22878_ACEOF 23974_ACEOF
22879rm -f conftest.$ac_objext conftest$ac_exeext 23975rm -f conftest.$ac_objext conftest$ac_exeext
22880if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 23976if { (ac_try="$ac_link"
22881 (eval $ac_link) 2>conftest.er1 23977case "(($ac_try" in
23978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23979 *) ac_try_echo=$ac_try;;
23980esac
23981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23982 (eval "$ac_link") 2>conftest.er1
22882 ac_status=$? 23983 ac_status=$?
22883 grep -v '^ *+' conftest.er1 >conftest.err 23984 grep -v '^ *+' conftest.er1 >conftest.err
22884 rm -f conftest.er1 23985 rm -f conftest.er1
22885 cat conftest.err >&5 23986 cat conftest.err >&5
22886 echo "$as_me:$LINENO: \$? = $ac_status" >&5 23987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22887 (exit $ac_status); } && 23988 (exit $ac_status); } && {
22888 { ac_try='test -z "$ac_c_werror_flag" 23989 test -z "$ac_c_werror_flag" ||
22889 || test ! -s conftest.err' 23990 test ! -s conftest.err
22890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 23991 } && test -s conftest$ac_exeext &&
22891 (eval $ac_try) 2>&5 23992 $as_test_x conftest$ac_exeext; then
22892 ac_status=$?
22893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22894 (exit $ac_status); }; } &&
22895 { ac_try='test -s conftest$ac_exeext'
22896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22897 (eval $ac_try) 2>&5
22898 ac_status=$?
22899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22900 (exit $ac_status); }; }; then
22901 ac_cv_libc_defines_sys_nerr="yes" 23993 ac_cv_libc_defines_sys_nerr="yes"
22902else 23994else
22903 echo "$as_me: failed program was:" >&5 23995 echo "$as_me: failed program was:" >&5
22904sed 's/^/| /' conftest.$ac_ext >&5 23996sed 's/^/| /' conftest.$ac_ext >&5
22905 23997
22906 ac_cv_libc_defines_sys_nerr="no" 23998 ac_cv_libc_defines_sys_nerr="no"
22907 23999
22908fi 24000fi
22909rm -f conftest.err conftest.$ac_objext \ 24001
24002rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22910 conftest$ac_exeext conftest.$ac_ext 24003 conftest$ac_exeext conftest.$ac_ext
22911 24004
22912fi 24005fi
22913echo "$as_me:$LINENO: result: $ac_cv_libc_defines_sys_nerr" >&5 24006{ echo "$as_me:$LINENO: result: $ac_cv_libc_defines_sys_nerr" >&5
22914echo "${ECHO_T}$ac_cv_libc_defines_sys_nerr" >&6 24007echo "${ECHO_T}$ac_cv_libc_defines_sys_nerr" >&6; }
22915if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then 24008if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
22916 24009
22917cat >>confdefs.h <<\_ACEOF 24010cat >>confdefs.h <<\_ACEOF
@@ -22923,10 +24016,9 @@ fi
22923SCARD_MSG="no" 24016SCARD_MSG="no"
22924# Check whether user wants sectok support 24017# Check whether user wants sectok support
22925 24018
22926# Check whether --with-sectok or --without-sectok was given. 24019# Check whether --with-sectok was given.
22927if test "${with_sectok+set}" = set; then 24020if test "${with_sectok+set}" = set; then
22928 withval="$with_sectok" 24021 withval=$with_sectok;
22929
22930 if test "x$withval" != "xno" ; then 24022 if test "x$withval" != "xno" ; then
22931 if test "x$withval" != "xyes" ; then 24023 if test "x$withval" != "xyes" ; then
22932 CPPFLAGS="$CPPFLAGS -I${withval}" 24024 CPPFLAGS="$CPPFLAGS -I${withval}"
@@ -22942,18 +24034,19 @@ if test "${with_sectok+set}" = set; then
22942for ac_header in sectok.h 24034for ac_header in sectok.h
22943do 24035do
22944as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 24036as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22945if eval "test \"\${$as_ac_Header+set}\" = set"; then 24037if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22946 echo "$as_me:$LINENO: checking for $ac_header" >&5 24038 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22947echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 24039echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22948if eval "test \"\${$as_ac_Header+set}\" = set"; then 24040if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22949 echo $ECHO_N "(cached) $ECHO_C" >&6 24041 echo $ECHO_N "(cached) $ECHO_C" >&6
22950fi 24042fi
22951echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 24043ac_res=`eval echo '${'$as_ac_Header'}'`
22952echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 24044 { echo "$as_me:$LINENO: result: $ac_res" >&5
24045echo "${ECHO_T}$ac_res" >&6; }
22953else 24046else
22954 # Is the header compilable? 24047 # Is the header compilable?
22955echo "$as_me:$LINENO: checking $ac_header usability" >&5 24048{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22956echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 24049echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
22957cat >conftest.$ac_ext <<_ACEOF 24050cat >conftest.$ac_ext <<_ACEOF
22958/* confdefs.h. */ 24051/* confdefs.h. */
22959_ACEOF 24052_ACEOF
@@ -22964,41 +24057,37 @@ $ac_includes_default
22964#include <$ac_header> 24057#include <$ac_header>
22965_ACEOF 24058_ACEOF
22966rm -f conftest.$ac_objext 24059rm -f conftest.$ac_objext
22967if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 24060if { (ac_try="$ac_compile"
22968 (eval $ac_compile) 2>conftest.er1 24061case "(($ac_try" in
24062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24063 *) ac_try_echo=$ac_try;;
24064esac
24065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24066 (eval "$ac_compile") 2>conftest.er1
22969 ac_status=$? 24067 ac_status=$?
22970 grep -v '^ *+' conftest.er1 >conftest.err 24068 grep -v '^ *+' conftest.er1 >conftest.err
22971 rm -f conftest.er1 24069 rm -f conftest.er1
22972 cat conftest.err >&5 24070 cat conftest.err >&5
22973 echo "$as_me:$LINENO: \$? = $ac_status" >&5 24071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22974 (exit $ac_status); } && 24072 (exit $ac_status); } && {
22975 { ac_try='test -z "$ac_c_werror_flag" 24073 test -z "$ac_c_werror_flag" ||
22976 || test ! -s conftest.err' 24074 test ! -s conftest.err
22977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 24075 } && test -s conftest.$ac_objext; then
22978 (eval $ac_try) 2>&5
22979 ac_status=$?
22980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22981 (exit $ac_status); }; } &&
22982 { ac_try='test -s conftest.$ac_objext'
22983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22984 (eval $ac_try) 2>&5
22985 ac_status=$?
22986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22987 (exit $ac_status); }; }; then
22988 ac_header_compiler=yes 24076 ac_header_compiler=yes
22989else 24077else
22990 echo "$as_me: failed program was:" >&5 24078 echo "$as_me: failed program was:" >&5
22991sed 's/^/| /' conftest.$ac_ext >&5 24079sed 's/^/| /' conftest.$ac_ext >&5
22992 24080
22993ac_header_compiler=no 24081 ac_header_compiler=no
22994fi 24082fi
22995rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 24083
22996echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 24084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22997echo "${ECHO_T}$ac_header_compiler" >&6 24085{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24086echo "${ECHO_T}$ac_header_compiler" >&6; }
22998 24087
22999# Is the header present? 24088# Is the header present?
23000echo "$as_me:$LINENO: checking $ac_header presence" >&5 24089{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23001echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 24090echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
23002cat >conftest.$ac_ext <<_ACEOF 24091cat >conftest.$ac_ext <<_ACEOF
23003/* confdefs.h. */ 24092/* confdefs.h. */
23004_ACEOF 24093_ACEOF
@@ -23007,24 +24096,22 @@ cat >>conftest.$ac_ext <<_ACEOF
23007/* end confdefs.h. */ 24096/* end confdefs.h. */
23008#include <$ac_header> 24097#include <$ac_header>
23009_ACEOF 24098_ACEOF
23010if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 24099if { (ac_try="$ac_cpp conftest.$ac_ext"
23011 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 24100case "(($ac_try" in
24101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24102 *) ac_try_echo=$ac_try;;
24103esac
24104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24105 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23012 ac_status=$? 24106 ac_status=$?
23013 grep -v '^ *+' conftest.er1 >conftest.err 24107 grep -v '^ *+' conftest.er1 >conftest.err
23014 rm -f conftest.er1 24108 rm -f conftest.er1
23015 cat conftest.err >&5 24109 cat conftest.err >&5
23016 echo "$as_me:$LINENO: \$? = $ac_status" >&5 24110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23017 (exit $ac_status); } >/dev/null; then 24111 (exit $ac_status); } >/dev/null && {
23018 if test -s conftest.err; then 24112 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23019 ac_cpp_err=$ac_c_preproc_warn_flag 24113 test ! -s conftest.err
23020 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 24114 }; then
23021 else
23022 ac_cpp_err=
23023 fi
23024else
23025 ac_cpp_err=yes
23026fi
23027if test -z "$ac_cpp_err"; then
23028 ac_header_preproc=yes 24115 ac_header_preproc=yes
23029else 24116else
23030 echo "$as_me: failed program was:" >&5 24117 echo "$as_me: failed program was:" >&5
@@ -23032,9 +24119,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
23032 24119
23033 ac_header_preproc=no 24120 ac_header_preproc=no
23034fi 24121fi
24122
23035rm -f conftest.err conftest.$ac_ext 24123rm -f conftest.err conftest.$ac_ext
23036echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 24124{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23037echo "${ECHO_T}$ac_header_preproc" >&6 24125echo "${ECHO_T}$ac_header_preproc" >&6; }
23038 24126
23039# So? What about this header? 24127# So? What about this header?
23040case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 24128case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -23058,25 +24146,24 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
23058echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 24146echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
23059 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 24147 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23060echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 24148echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
23061 ( 24149 ( cat <<\_ASBOX
23062 cat <<\_ASBOX
23063## ------------------------------------------- ## 24150## ------------------------------------------- ##
23064## Report this to openssh-unix-dev@mindrot.org ## 24151## Report this to openssh-unix-dev@mindrot.org ##
23065## ------------------------------------------- ## 24152## ------------------------------------------- ##
23066_ASBOX 24153_ASBOX
23067 ) | 24154 ) | sed "s/^/$as_me: WARNING: /" >&2
23068 sed "s/^/$as_me: WARNING: /" >&2
23069 ;; 24155 ;;
23070esac 24156esac
23071echo "$as_me:$LINENO: checking for $ac_header" >&5 24157{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23072echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 24158echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23073if eval "test \"\${$as_ac_Header+set}\" = set"; then 24159if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23074 echo $ECHO_N "(cached) $ECHO_C" >&6 24160 echo $ECHO_N "(cached) $ECHO_C" >&6
23075else 24161else
23076 eval "$as_ac_Header=\$ac_header_preproc" 24162 eval "$as_ac_Header=\$ac_header_preproc"
23077fi 24163fi
23078echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 24164ac_res=`eval echo '${'$as_ac_Header'}'`
23079echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 24165 { echo "$as_me:$LINENO: result: $ac_res" >&5
24166echo "${ECHO_T}$ac_res" >&6; }
23080 24167
23081fi 24168fi
23082if test `eval echo '${'$as_ac_Header'}'` = yes; then 24169if test `eval echo '${'$as_ac_Header'}'` = yes; then
@@ -23094,8 +24181,8 @@ echo "$as_me: error: Can't find sectok.h" >&2;}
23094 { (exit 1); exit 1; }; } 24181 { (exit 1); exit 1; }; }
23095 fi 24182 fi
23096 24183
23097echo "$as_me:$LINENO: checking for sectok_open in -lsectok" >&5 24184{ echo "$as_me:$LINENO: checking for sectok_open in -lsectok" >&5
23098echo $ECHO_N "checking for sectok_open in -lsectok... $ECHO_C" >&6 24185echo $ECHO_N "checking for sectok_open in -lsectok... $ECHO_C" >&6; }
23099if test "${ac_cv_lib_sectok_sectok_open+set}" = set; then 24186if test "${ac_cv_lib_sectok_sectok_open+set}" = set; then
23100 echo $ECHO_N "(cached) $ECHO_C" >&6 24187 echo $ECHO_N "(cached) $ECHO_C" >&6
23101else 24188else
@@ -23108,56 +24195,53 @@ cat confdefs.h >>conftest.$ac_ext
23108cat >>conftest.$ac_ext <<_ACEOF 24195cat >>conftest.$ac_ext <<_ACEOF
23109/* end confdefs.h. */ 24196/* end confdefs.h. */
23110 24197
23111/* Override any gcc2 internal prototype to avoid an error. */ 24198/* Override any GCC internal prototype to avoid an error.
24199 Use char because int might match the return type of a GCC
24200 builtin and then its argument prototype would still apply. */
23112#ifdef __cplusplus 24201#ifdef __cplusplus
23113extern "C" 24202extern "C"
23114#endif 24203#endif
23115/* We use char because int might match the return type of a gcc2
23116 builtin and then its argument prototype would still apply. */
23117char sectok_open (); 24204char sectok_open ();
23118int 24205int
23119main () 24206main ()
23120{ 24207{
23121sectok_open (); 24208return sectok_open ();
23122 ; 24209 ;
23123 return 0; 24210 return 0;
23124} 24211}
23125_ACEOF 24212_ACEOF
23126rm -f conftest.$ac_objext conftest$ac_exeext 24213rm -f conftest.$ac_objext conftest$ac_exeext
23127if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 24214if { (ac_try="$ac_link"
23128 (eval $ac_link) 2>conftest.er1 24215case "(($ac_try" in
24216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24217 *) ac_try_echo=$ac_try;;
24218esac
24219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24220 (eval "$ac_link") 2>conftest.er1
23129 ac_status=$? 24221 ac_status=$?
23130 grep -v '^ *+' conftest.er1 >conftest.err 24222 grep -v '^ *+' conftest.er1 >conftest.err
23131 rm -f conftest.er1 24223 rm -f conftest.er1
23132 cat conftest.err >&5 24224 cat conftest.err >&5
23133 echo "$as_me:$LINENO: \$? = $ac_status" >&5 24225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23134 (exit $ac_status); } && 24226 (exit $ac_status); } && {
23135 { ac_try='test -z "$ac_c_werror_flag" 24227 test -z "$ac_c_werror_flag" ||
23136 || test ! -s conftest.err' 24228 test ! -s conftest.err
23137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 24229 } && test -s conftest$ac_exeext &&
23138 (eval $ac_try) 2>&5 24230 $as_test_x conftest$ac_exeext; then
23139 ac_status=$?
23140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23141 (exit $ac_status); }; } &&
23142 { ac_try='test -s conftest$ac_exeext'
23143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23144 (eval $ac_try) 2>&5
23145 ac_status=$?
23146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23147 (exit $ac_status); }; }; then
23148 ac_cv_lib_sectok_sectok_open=yes 24231 ac_cv_lib_sectok_sectok_open=yes
23149else 24232else
23150 echo "$as_me: failed program was:" >&5 24233 echo "$as_me: failed program was:" >&5
23151sed 's/^/| /' conftest.$ac_ext >&5 24234sed 's/^/| /' conftest.$ac_ext >&5
23152 24235
23153ac_cv_lib_sectok_sectok_open=no 24236 ac_cv_lib_sectok_sectok_open=no
23154fi 24237fi
23155rm -f conftest.err conftest.$ac_objext \ 24238
24239rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23156 conftest$ac_exeext conftest.$ac_ext 24240 conftest$ac_exeext conftest.$ac_ext
23157LIBS=$ac_check_lib_save_LIBS 24241LIBS=$ac_check_lib_save_LIBS
23158fi 24242fi
23159echo "$as_me:$LINENO: result: $ac_cv_lib_sectok_sectok_open" >&5 24243{ echo "$as_me:$LINENO: result: $ac_cv_lib_sectok_sectok_open" >&5
23160echo "${ECHO_T}$ac_cv_lib_sectok_sectok_open" >&6 24244echo "${ECHO_T}$ac_cv_lib_sectok_sectok_open" >&6; }
23161if test $ac_cv_lib_sectok_sectok_open = yes; then 24245if test $ac_cv_lib_sectok_sectok_open = yes; then
23162 cat >>confdefs.h <<_ACEOF 24246 cat >>confdefs.h <<_ACEOF
23163#define HAVE_LIBSECTOK 1 24247#define HAVE_LIBSECTOK 1
@@ -23186,23 +24270,23 @@ _ACEOF
23186 fi 24270 fi
23187 24271
23188 24272
23189fi; 24273fi
24274
23190 24275
23191# Check whether user wants OpenSC support 24276# Check whether user wants OpenSC support
23192OPENSC_CONFIG="no" 24277OPENSC_CONFIG="no"
23193 24278
23194# Check whether --with-opensc or --without-opensc was given. 24279# Check whether --with-opensc was given.
23195if test "${with_opensc+set}" = set; then 24280if test "${with_opensc+set}" = set; then
23196 withval="$with_opensc" 24281 withval=$with_opensc;
23197
23198 if test "x$withval" != "xno" ; then 24282 if test "x$withval" != "xno" ; then
23199 if test "x$withval" != "xyes" ; then 24283 if test "x$withval" != "xyes" ; then
23200 OPENSC_CONFIG=$withval/bin/opensc-config 24284 OPENSC_CONFIG=$withval/bin/opensc-config
23201 else 24285 else
23202 # Extract the first word of "opensc-config", so it can be a program name with args. 24286 # Extract the first word of "opensc-config", so it can be a program name with args.
23203set dummy opensc-config; ac_word=$2 24287set dummy opensc-config; ac_word=$2
23204echo "$as_me:$LINENO: checking for $ac_word" >&5 24288{ echo "$as_me:$LINENO: checking for $ac_word" >&5
23205echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 24289echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
23206if test "${ac_cv_path_OPENSC_CONFIG+set}" = set; then 24290if test "${ac_cv_path_OPENSC_CONFIG+set}" = set; then
23207 echo $ECHO_N "(cached) $ECHO_C" >&6 24291 echo $ECHO_N "(cached) $ECHO_C" >&6
23208else 24292else
@@ -23217,34 +24301,35 @@ do
23217 IFS=$as_save_IFS 24301 IFS=$as_save_IFS
23218 test -z "$as_dir" && as_dir=. 24302 test -z "$as_dir" && as_dir=.
23219 for ac_exec_ext in '' $ac_executable_extensions; do 24303 for ac_exec_ext in '' $ac_executable_extensions; do
23220 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 24304 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23221 ac_cv_path_OPENSC_CONFIG="$as_dir/$ac_word$ac_exec_ext" 24305 ac_cv_path_OPENSC_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23222 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 24306 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
23223 break 2 24307 break 2
23224 fi 24308 fi
23225done 24309done
23226done 24310done
24311IFS=$as_save_IFS
23227 24312
23228 test -z "$ac_cv_path_OPENSC_CONFIG" && ac_cv_path_OPENSC_CONFIG="no" 24313 test -z "$ac_cv_path_OPENSC_CONFIG" && ac_cv_path_OPENSC_CONFIG="no"
23229 ;; 24314 ;;
23230esac 24315esac
23231fi 24316fi
23232OPENSC_CONFIG=$ac_cv_path_OPENSC_CONFIG 24317OPENSC_CONFIG=$ac_cv_path_OPENSC_CONFIG
23233
23234if test -n "$OPENSC_CONFIG"; then 24318if test -n "$OPENSC_CONFIG"; then
23235 echo "$as_me:$LINENO: result: $OPENSC_CONFIG" >&5 24319 { echo "$as_me:$LINENO: result: $OPENSC_CONFIG" >&5
23236echo "${ECHO_T}$OPENSC_CONFIG" >&6 24320echo "${ECHO_T}$OPENSC_CONFIG" >&6; }
23237else 24321else
23238 echo "$as_me:$LINENO: result: no" >&5 24322 { echo "$as_me:$LINENO: result: no" >&5
23239echo "${ECHO_T}no" >&6 24323echo "${ECHO_T}no" >&6; }
23240fi 24324fi
23241 24325
24326
23242 fi 24327 fi
23243 if test "$OPENSC_CONFIG" != "no"; then 24328 if test "$OPENSC_CONFIG" != "no"; then
23244 LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags` 24329 LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags`
23245 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs` 24330 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs`
23246 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS" 24331 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
23247 LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS" 24332 LIBS="$LIBS $LIBOPENSC_LIBS"
23248 cat >>confdefs.h <<\_ACEOF 24333 cat >>confdefs.h <<\_ACEOF
23249#define SMARTCARD 1 24334#define SMARTCARD 1
23250_ACEOF 24335_ACEOF
@@ -23259,16 +24344,16 @@ _ACEOF
23259 fi 24344 fi
23260 24345
23261 24346
23262fi; 24347fi
24348
23263 24349
23264# Check libraries needed by DNS fingerprint support 24350# Check libraries needed by DNS fingerprint support
23265echo "$as_me:$LINENO: checking for library containing getrrsetbyname" >&5 24351{ echo "$as_me:$LINENO: checking for library containing getrrsetbyname" >&5
23266echo $ECHO_N "checking for library containing getrrsetbyname... $ECHO_C" >&6 24352echo $ECHO_N "checking for library containing getrrsetbyname... $ECHO_C" >&6; }
23267if test "${ac_cv_search_getrrsetbyname+set}" = set; then 24353if test "${ac_cv_search_getrrsetbyname+set}" = set; then
23268 echo $ECHO_N "(cached) $ECHO_C" >&6 24354 echo $ECHO_N "(cached) $ECHO_C" >&6
23269else 24355else
23270 ac_func_search_save_LIBS=$LIBS 24356 ac_func_search_save_LIBS=$LIBS
23271ac_cv_search_getrrsetbyname=no
23272cat >conftest.$ac_ext <<_ACEOF 24357cat >conftest.$ac_ext <<_ACEOF
23273/* confdefs.h. */ 24358/* confdefs.h. */
23274_ACEOF 24359_ACEOF
@@ -23276,115 +24361,73 @@ cat confdefs.h >>conftest.$ac_ext
23276cat >>conftest.$ac_ext <<_ACEOF 24361cat >>conftest.$ac_ext <<_ACEOF
23277/* end confdefs.h. */ 24362/* end confdefs.h. */
23278 24363
23279/* Override any gcc2 internal prototype to avoid an error. */ 24364/* Override any GCC internal prototype to avoid an error.
24365 Use char because int might match the return type of a GCC
24366 builtin and then its argument prototype would still apply. */
23280#ifdef __cplusplus 24367#ifdef __cplusplus
23281extern "C" 24368extern "C"
23282#endif 24369#endif
23283/* We use char because int might match the return type of a gcc2
23284 builtin and then its argument prototype would still apply. */
23285char getrrsetbyname (); 24370char getrrsetbyname ();
23286int 24371int
23287main () 24372main ()
23288{ 24373{
23289getrrsetbyname (); 24374return getrrsetbyname ();
23290 ; 24375 ;
23291 return 0; 24376 return 0;
23292} 24377}
23293_ACEOF 24378_ACEOF
23294rm -f conftest.$ac_objext conftest$ac_exeext 24379for ac_lib in '' resolv; do
23295if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 24380 if test -z "$ac_lib"; then
23296 (eval $ac_link) 2>conftest.er1 24381 ac_res="none required"
24382 else
24383 ac_res=-l$ac_lib
24384 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
24385 fi
24386 rm -f conftest.$ac_objext conftest$ac_exeext
24387if { (ac_try="$ac_link"
24388case "(($ac_try" in
24389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24390 *) ac_try_echo=$ac_try;;
24391esac
24392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24393 (eval "$ac_link") 2>conftest.er1
23297 ac_status=$? 24394 ac_status=$?
23298 grep -v '^ *+' conftest.er1 >conftest.err 24395 grep -v '^ *+' conftest.er1 >conftest.err
23299 rm -f conftest.er1 24396 rm -f conftest.er1
23300 cat conftest.err >&5 24397 cat conftest.err >&5
23301 echo "$as_me:$LINENO: \$? = $ac_status" >&5 24398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23302 (exit $ac_status); } && 24399 (exit $ac_status); } && {
23303 { ac_try='test -z "$ac_c_werror_flag" 24400 test -z "$ac_c_werror_flag" ||
23304 || test ! -s conftest.err' 24401 test ! -s conftest.err
23305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 24402 } && test -s conftest$ac_exeext &&
23306 (eval $ac_try) 2>&5 24403 $as_test_x conftest$ac_exeext; then
23307 ac_status=$? 24404 ac_cv_search_getrrsetbyname=$ac_res
23308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23309 (exit $ac_status); }; } &&
23310 { ac_try='test -s conftest$ac_exeext'
23311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23312 (eval $ac_try) 2>&5
23313 ac_status=$?
23314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23315 (exit $ac_status); }; }; then
23316 ac_cv_search_getrrsetbyname="none required"
23317else 24405else
23318 echo "$as_me: failed program was:" >&5 24406 echo "$as_me: failed program was:" >&5
23319sed 's/^/| /' conftest.$ac_ext >&5 24407sed 's/^/| /' conftest.$ac_ext >&5
23320 24408
23321fi
23322rm -f conftest.err conftest.$ac_objext \
23323 conftest$ac_exeext conftest.$ac_ext
23324if test "$ac_cv_search_getrrsetbyname" = no; then
23325 for ac_lib in resolv; do
23326 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
23327 cat >conftest.$ac_ext <<_ACEOF
23328/* confdefs.h. */
23329_ACEOF
23330cat confdefs.h >>conftest.$ac_ext
23331cat >>conftest.$ac_ext <<_ACEOF
23332/* end confdefs.h. */
23333 24409
23334/* Override any gcc2 internal prototype to avoid an error. */ 24410fi
23335#ifdef __cplusplus
23336extern "C"
23337#endif
23338/* We use char because int might match the return type of a gcc2
23339 builtin and then its argument prototype would still apply. */
23340char getrrsetbyname ();
23341int
23342main ()
23343{
23344getrrsetbyname ();
23345 ;
23346 return 0;
23347}
23348_ACEOF
23349rm -f conftest.$ac_objext conftest$ac_exeext
23350if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23351 (eval $ac_link) 2>conftest.er1
23352 ac_status=$?
23353 grep -v '^ *+' conftest.er1 >conftest.err
23354 rm -f conftest.er1
23355 cat conftest.err >&5
23356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23357 (exit $ac_status); } &&
23358 { ac_try='test -z "$ac_c_werror_flag"
23359 || test ! -s conftest.err'
23360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23361 (eval $ac_try) 2>&5
23362 ac_status=$?
23363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23364 (exit $ac_status); }; } &&
23365 { ac_try='test -s conftest$ac_exeext'
23366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23367 (eval $ac_try) 2>&5
23368 ac_status=$?
23369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23370 (exit $ac_status); }; }; then
23371 ac_cv_search_getrrsetbyname="-l$ac_lib"
23372break
23373else
23374 echo "$as_me: failed program was:" >&5
23375sed 's/^/| /' conftest.$ac_ext >&5
23376 24411
24412rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24413 conftest$ac_exeext
24414 if test "${ac_cv_search_getrrsetbyname+set}" = set; then
24415 break
23377fi 24416fi
23378rm -f conftest.err conftest.$ac_objext \ 24417done
23379 conftest$ac_exeext conftest.$ac_ext 24418if test "${ac_cv_search_getrrsetbyname+set}" = set; then
23380 done 24419 :
24420else
24421 ac_cv_search_getrrsetbyname=no
23381fi 24422fi
24423rm conftest.$ac_ext
23382LIBS=$ac_func_search_save_LIBS 24424LIBS=$ac_func_search_save_LIBS
23383fi 24425fi
23384echo "$as_me:$LINENO: result: $ac_cv_search_getrrsetbyname" >&5 24426{ echo "$as_me:$LINENO: result: $ac_cv_search_getrrsetbyname" >&5
23385echo "${ECHO_T}$ac_cv_search_getrrsetbyname" >&6 24427echo "${ECHO_T}$ac_cv_search_getrrsetbyname" >&6; }
23386if test "$ac_cv_search_getrrsetbyname" != no; then 24428ac_res=$ac_cv_search_getrrsetbyname
23387 test "$ac_cv_search_getrrsetbyname" = "none required" || LIBS="$ac_cv_search_getrrsetbyname $LIBS" 24429if test "$ac_res" != no; then
24430 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23388 24431
23389cat >>confdefs.h <<\_ACEOF 24432cat >>confdefs.h <<\_ACEOF
23390#define HAVE_GETRRSETBYNAME 1 24433#define HAVE_GETRRSETBYNAME 1
@@ -23393,13 +24436,12 @@ _ACEOF
23393else 24436else
23394 24437
23395 # Needed by our getrrsetbyname() 24438 # Needed by our getrrsetbyname()
23396 echo "$as_me:$LINENO: checking for library containing res_query" >&5 24439 { echo "$as_me:$LINENO: checking for library containing res_query" >&5
23397echo $ECHO_N "checking for library containing res_query... $ECHO_C" >&6 24440echo $ECHO_N "checking for library containing res_query... $ECHO_C" >&6; }
23398if test "${ac_cv_search_res_query+set}" = set; then 24441if test "${ac_cv_search_res_query+set}" = set; then
23399 echo $ECHO_N "(cached) $ECHO_C" >&6 24442 echo $ECHO_N "(cached) $ECHO_C" >&6
23400else 24443else
23401 ac_func_search_save_LIBS=$LIBS 24444 ac_func_search_save_LIBS=$LIBS
23402ac_cv_search_res_query=no
23403cat >conftest.$ac_ext <<_ACEOF 24445cat >conftest.$ac_ext <<_ACEOF
23404/* confdefs.h. */ 24446/* confdefs.h. */
23405_ACEOF 24447_ACEOF
@@ -23407,125 +24449,82 @@ cat confdefs.h >>conftest.$ac_ext
23407cat >>conftest.$ac_ext <<_ACEOF 24449cat >>conftest.$ac_ext <<_ACEOF
23408/* end confdefs.h. */ 24450/* end confdefs.h. */
23409 24451
23410/* Override any gcc2 internal prototype to avoid an error. */ 24452/* Override any GCC internal prototype to avoid an error.
24453 Use char because int might match the return type of a GCC
24454 builtin and then its argument prototype would still apply. */
23411#ifdef __cplusplus 24455#ifdef __cplusplus
23412extern "C" 24456extern "C"
23413#endif 24457#endif
23414/* We use char because int might match the return type of a gcc2
23415 builtin and then its argument prototype would still apply. */
23416char res_query (); 24458char res_query ();
23417int 24459int
23418main () 24460main ()
23419{ 24461{
23420res_query (); 24462return res_query ();
23421 ; 24463 ;
23422 return 0; 24464 return 0;
23423} 24465}
23424_ACEOF 24466_ACEOF
23425rm -f conftest.$ac_objext conftest$ac_exeext 24467for ac_lib in '' resolv; do
23426if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 24468 if test -z "$ac_lib"; then
23427 (eval $ac_link) 2>conftest.er1 24469 ac_res="none required"
24470 else
24471 ac_res=-l$ac_lib
24472 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
24473 fi
24474 rm -f conftest.$ac_objext conftest$ac_exeext
24475if { (ac_try="$ac_link"
24476case "(($ac_try" in
24477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24478 *) ac_try_echo=$ac_try;;
24479esac
24480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24481 (eval "$ac_link") 2>conftest.er1
23428 ac_status=$? 24482 ac_status=$?
23429 grep -v '^ *+' conftest.er1 >conftest.err 24483 grep -v '^ *+' conftest.er1 >conftest.err
23430 rm -f conftest.er1 24484 rm -f conftest.er1
23431 cat conftest.err >&5 24485 cat conftest.err >&5
23432 echo "$as_me:$LINENO: \$? = $ac_status" >&5 24486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23433 (exit $ac_status); } && 24487 (exit $ac_status); } && {
23434 { ac_try='test -z "$ac_c_werror_flag" 24488 test -z "$ac_c_werror_flag" ||
23435 || test ! -s conftest.err' 24489 test ! -s conftest.err
23436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 24490 } && test -s conftest$ac_exeext &&
23437 (eval $ac_try) 2>&5 24491 $as_test_x conftest$ac_exeext; then
23438 ac_status=$? 24492 ac_cv_search_res_query=$ac_res
23439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23440 (exit $ac_status); }; } &&
23441 { ac_try='test -s conftest$ac_exeext'
23442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23443 (eval $ac_try) 2>&5
23444 ac_status=$?
23445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23446 (exit $ac_status); }; }; then
23447 ac_cv_search_res_query="none required"
23448else 24493else
23449 echo "$as_me: failed program was:" >&5 24494 echo "$as_me: failed program was:" >&5
23450sed 's/^/| /' conftest.$ac_ext >&5 24495sed 's/^/| /' conftest.$ac_ext >&5
23451 24496
23452fi
23453rm -f conftest.err conftest.$ac_objext \
23454 conftest$ac_exeext conftest.$ac_ext
23455if test "$ac_cv_search_res_query" = no; then
23456 for ac_lib in resolv; do
23457 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
23458 cat >conftest.$ac_ext <<_ACEOF
23459/* confdefs.h. */
23460_ACEOF
23461cat confdefs.h >>conftest.$ac_ext
23462cat >>conftest.$ac_ext <<_ACEOF
23463/* end confdefs.h. */
23464 24497
23465/* Override any gcc2 internal prototype to avoid an error. */ 24498fi
23466#ifdef __cplusplus
23467extern "C"
23468#endif
23469/* We use char because int might match the return type of a gcc2
23470 builtin and then its argument prototype would still apply. */
23471char res_query ();
23472int
23473main ()
23474{
23475res_query ();
23476 ;
23477 return 0;
23478}
23479_ACEOF
23480rm -f conftest.$ac_objext conftest$ac_exeext
23481if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23482 (eval $ac_link) 2>conftest.er1
23483 ac_status=$?
23484 grep -v '^ *+' conftest.er1 >conftest.err
23485 rm -f conftest.er1
23486 cat conftest.err >&5
23487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23488 (exit $ac_status); } &&
23489 { ac_try='test -z "$ac_c_werror_flag"
23490 || test ! -s conftest.err'
23491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23492 (eval $ac_try) 2>&5
23493 ac_status=$?
23494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23495 (exit $ac_status); }; } &&
23496 { ac_try='test -s conftest$ac_exeext'
23497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23498 (eval $ac_try) 2>&5
23499 ac_status=$?
23500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23501 (exit $ac_status); }; }; then
23502 ac_cv_search_res_query="-l$ac_lib"
23503break
23504else
23505 echo "$as_me: failed program was:" >&5
23506sed 's/^/| /' conftest.$ac_ext >&5
23507 24499
24500rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24501 conftest$ac_exeext
24502 if test "${ac_cv_search_res_query+set}" = set; then
24503 break
23508fi 24504fi
23509rm -f conftest.err conftest.$ac_objext \ 24505done
23510 conftest$ac_exeext conftest.$ac_ext 24506if test "${ac_cv_search_res_query+set}" = set; then
23511 done 24507 :
24508else
24509 ac_cv_search_res_query=no
23512fi 24510fi
24511rm conftest.$ac_ext
23513LIBS=$ac_func_search_save_LIBS 24512LIBS=$ac_func_search_save_LIBS
23514fi 24513fi
23515echo "$as_me:$LINENO: result: $ac_cv_search_res_query" >&5 24514{ echo "$as_me:$LINENO: result: $ac_cv_search_res_query" >&5
23516echo "${ECHO_T}$ac_cv_search_res_query" >&6 24515echo "${ECHO_T}$ac_cv_search_res_query" >&6; }
23517if test "$ac_cv_search_res_query" != no; then 24516ac_res=$ac_cv_search_res_query
23518 test "$ac_cv_search_res_query" = "none required" || LIBS="$ac_cv_search_res_query $LIBS" 24517if test "$ac_res" != no; then
24518 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23519 24519
23520fi 24520fi
23521 24521
23522 echo "$as_me:$LINENO: checking for library containing dn_expand" >&5 24522 { echo "$as_me:$LINENO: checking for library containing dn_expand" >&5
23523echo $ECHO_N "checking for library containing dn_expand... $ECHO_C" >&6 24523echo $ECHO_N "checking for library containing dn_expand... $ECHO_C" >&6; }
23524if test "${ac_cv_search_dn_expand+set}" = set; then 24524if test "${ac_cv_search_dn_expand+set}" = set; then
23525 echo $ECHO_N "(cached) $ECHO_C" >&6 24525 echo $ECHO_N "(cached) $ECHO_C" >&6
23526else 24526else
23527 ac_func_search_save_LIBS=$LIBS 24527 ac_func_search_save_LIBS=$LIBS
23528ac_cv_search_dn_expand=no
23529cat >conftest.$ac_ext <<_ACEOF 24528cat >conftest.$ac_ext <<_ACEOF
23530/* confdefs.h. */ 24529/* confdefs.h. */
23531_ACEOF 24530_ACEOF
@@ -23533,120 +24532,78 @@ cat confdefs.h >>conftest.$ac_ext
23533cat >>conftest.$ac_ext <<_ACEOF 24532cat >>conftest.$ac_ext <<_ACEOF
23534/* end confdefs.h. */ 24533/* end confdefs.h. */
23535 24534
23536/* Override any gcc2 internal prototype to avoid an error. */ 24535/* Override any GCC internal prototype to avoid an error.
24536 Use char because int might match the return type of a GCC
24537 builtin and then its argument prototype would still apply. */
23537#ifdef __cplusplus 24538#ifdef __cplusplus
23538extern "C" 24539extern "C"
23539#endif 24540#endif
23540/* We use char because int might match the return type of a gcc2
23541 builtin and then its argument prototype would still apply. */
23542char dn_expand (); 24541char dn_expand ();
23543int 24542int
23544main () 24543main ()
23545{ 24544{
23546dn_expand (); 24545return dn_expand ();
23547 ; 24546 ;
23548 return 0; 24547 return 0;
23549} 24548}
23550_ACEOF 24549_ACEOF
23551rm -f conftest.$ac_objext conftest$ac_exeext 24550for ac_lib in '' resolv; do
23552if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 24551 if test -z "$ac_lib"; then
23553 (eval $ac_link) 2>conftest.er1 24552 ac_res="none required"
24553 else
24554 ac_res=-l$ac_lib
24555 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
24556 fi
24557 rm -f conftest.$ac_objext conftest$ac_exeext
24558if { (ac_try="$ac_link"
24559case "(($ac_try" in
24560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24561 *) ac_try_echo=$ac_try;;
24562esac
24563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24564 (eval "$ac_link") 2>conftest.er1
23554 ac_status=$? 24565 ac_status=$?
23555 grep -v '^ *+' conftest.er1 >conftest.err 24566 grep -v '^ *+' conftest.er1 >conftest.err
23556 rm -f conftest.er1 24567 rm -f conftest.er1
23557 cat conftest.err >&5 24568 cat conftest.err >&5
23558 echo "$as_me:$LINENO: \$? = $ac_status" >&5 24569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23559 (exit $ac_status); } && 24570 (exit $ac_status); } && {
23560 { ac_try='test -z "$ac_c_werror_flag" 24571 test -z "$ac_c_werror_flag" ||
23561 || test ! -s conftest.err' 24572 test ! -s conftest.err
23562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 24573 } && test -s conftest$ac_exeext &&
23563 (eval $ac_try) 2>&5 24574 $as_test_x conftest$ac_exeext; then
23564 ac_status=$? 24575 ac_cv_search_dn_expand=$ac_res
23565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23566 (exit $ac_status); }; } &&
23567 { ac_try='test -s conftest$ac_exeext'
23568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23569 (eval $ac_try) 2>&5
23570 ac_status=$?
23571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23572 (exit $ac_status); }; }; then
23573 ac_cv_search_dn_expand="none required"
23574else 24576else
23575 echo "$as_me: failed program was:" >&5 24577 echo "$as_me: failed program was:" >&5
23576sed 's/^/| /' conftest.$ac_ext >&5 24578sed 's/^/| /' conftest.$ac_ext >&5
23577 24579
23578fi
23579rm -f conftest.err conftest.$ac_objext \
23580 conftest$ac_exeext conftest.$ac_ext
23581if test "$ac_cv_search_dn_expand" = no; then
23582 for ac_lib in resolv; do
23583 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
23584 cat >conftest.$ac_ext <<_ACEOF
23585/* confdefs.h. */
23586_ACEOF
23587cat confdefs.h >>conftest.$ac_ext
23588cat >>conftest.$ac_ext <<_ACEOF
23589/* end confdefs.h. */
23590 24580
23591/* Override any gcc2 internal prototype to avoid an error. */ 24581fi
23592#ifdef __cplusplus
23593extern "C"
23594#endif
23595/* We use char because int might match the return type of a gcc2
23596 builtin and then its argument prototype would still apply. */
23597char dn_expand ();
23598int
23599main ()
23600{
23601dn_expand ();
23602 ;
23603 return 0;
23604}
23605_ACEOF
23606rm -f conftest.$ac_objext conftest$ac_exeext
23607if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23608 (eval $ac_link) 2>conftest.er1
23609 ac_status=$?
23610 grep -v '^ *+' conftest.er1 >conftest.err
23611 rm -f conftest.er1
23612 cat conftest.err >&5
23613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23614 (exit $ac_status); } &&
23615 { ac_try='test -z "$ac_c_werror_flag"
23616 || test ! -s conftest.err'
23617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23618 (eval $ac_try) 2>&5
23619 ac_status=$?
23620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23621 (exit $ac_status); }; } &&
23622 { ac_try='test -s conftest$ac_exeext'
23623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23624 (eval $ac_try) 2>&5
23625 ac_status=$?
23626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23627 (exit $ac_status); }; }; then
23628 ac_cv_search_dn_expand="-l$ac_lib"
23629break
23630else
23631 echo "$as_me: failed program was:" >&5
23632sed 's/^/| /' conftest.$ac_ext >&5
23633 24582
24583rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24584 conftest$ac_exeext
24585 if test "${ac_cv_search_dn_expand+set}" = set; then
24586 break
23634fi 24587fi
23635rm -f conftest.err conftest.$ac_objext \ 24588done
23636 conftest$ac_exeext conftest.$ac_ext 24589if test "${ac_cv_search_dn_expand+set}" = set; then
23637 done 24590 :
24591else
24592 ac_cv_search_dn_expand=no
23638fi 24593fi
24594rm conftest.$ac_ext
23639LIBS=$ac_func_search_save_LIBS 24595LIBS=$ac_func_search_save_LIBS
23640fi 24596fi
23641echo "$as_me:$LINENO: result: $ac_cv_search_dn_expand" >&5 24597{ echo "$as_me:$LINENO: result: $ac_cv_search_dn_expand" >&5
23642echo "${ECHO_T}$ac_cv_search_dn_expand" >&6 24598echo "${ECHO_T}$ac_cv_search_dn_expand" >&6; }
23643if test "$ac_cv_search_dn_expand" != no; then 24599ac_res=$ac_cv_search_dn_expand
23644 test "$ac_cv_search_dn_expand" = "none required" || LIBS="$ac_cv_search_dn_expand $LIBS" 24600if test "$ac_res" != no; then
24601 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23645 24602
23646fi 24603fi
23647 24604
23648 echo "$as_me:$LINENO: checking if res_query will link" >&5 24605 { echo "$as_me:$LINENO: checking if res_query will link" >&5
23649echo $ECHO_N "checking if res_query will link... $ECHO_C" >&6 24606echo $ECHO_N "checking if res_query will link... $ECHO_C" >&6; }
23650 cat >conftest.$ac_ext <<_ACEOF 24607 cat >conftest.$ac_ext <<_ACEOF
23651/* confdefs.h. */ 24608/* confdefs.h. */
23652_ACEOF 24609_ACEOF
@@ -23654,55 +24611,51 @@ cat confdefs.h >>conftest.$ac_ext
23654cat >>conftest.$ac_ext <<_ACEOF 24611cat >>conftest.$ac_ext <<_ACEOF
23655/* end confdefs.h. */ 24612/* end confdefs.h. */
23656 24613
23657/* Override any gcc2 internal prototype to avoid an error. */ 24614/* Override any GCC internal prototype to avoid an error.
24615 Use char because int might match the return type of a GCC
24616 builtin and then its argument prototype would still apply. */
23658#ifdef __cplusplus 24617#ifdef __cplusplus
23659extern "C" 24618extern "C"
23660#endif 24619#endif
23661/* We use char because int might match the return type of a gcc2
23662 builtin and then its argument prototype would still apply. */
23663char res_query (); 24620char res_query ();
23664int 24621int
23665main () 24622main ()
23666{ 24623{
23667res_query (); 24624return res_query ();
23668 ; 24625 ;
23669 return 0; 24626 return 0;
23670} 24627}
23671_ACEOF 24628_ACEOF
23672rm -f conftest.$ac_objext conftest$ac_exeext 24629rm -f conftest.$ac_objext conftest$ac_exeext
23673if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 24630if { (ac_try="$ac_link"
23674 (eval $ac_link) 2>conftest.er1 24631case "(($ac_try" in
24632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24633 *) ac_try_echo=$ac_try;;
24634esac
24635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24636 (eval "$ac_link") 2>conftest.er1
23675 ac_status=$? 24637 ac_status=$?
23676 grep -v '^ *+' conftest.er1 >conftest.err 24638 grep -v '^ *+' conftest.er1 >conftest.err
23677 rm -f conftest.er1 24639 rm -f conftest.er1
23678 cat conftest.err >&5 24640 cat conftest.err >&5
23679 echo "$as_me:$LINENO: \$? = $ac_status" >&5 24641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23680 (exit $ac_status); } && 24642 (exit $ac_status); } && {
23681 { ac_try='test -z "$ac_c_werror_flag" 24643 test -z "$ac_c_werror_flag" ||
23682 || test ! -s conftest.err' 24644 test ! -s conftest.err
23683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 24645 } && test -s conftest$ac_exeext &&
23684 (eval $ac_try) 2>&5 24646 $as_test_x conftest$ac_exeext; then
23685 ac_status=$? 24647 { echo "$as_me:$LINENO: result: yes" >&5
23686 echo "$as_me:$LINENO: \$? = $ac_status" >&5 24648echo "${ECHO_T}yes" >&6; }
23687 (exit $ac_status); }; } &&
23688 { ac_try='test -s conftest$ac_exeext'
23689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23690 (eval $ac_try) 2>&5
23691 ac_status=$?
23692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23693 (exit $ac_status); }; }; then
23694 echo "$as_me:$LINENO: result: yes" >&5
23695echo "${ECHO_T}yes" >&6
23696else 24649else
23697 echo "$as_me: failed program was:" >&5 24650 echo "$as_me: failed program was:" >&5
23698sed 's/^/| /' conftest.$ac_ext >&5 24651sed 's/^/| /' conftest.$ac_ext >&5
23699 24652
23700echo "$as_me:$LINENO: result: no" >&5 24653 { echo "$as_me:$LINENO: result: no" >&5
23701echo "${ECHO_T}no" >&6 24654echo "${ECHO_T}no" >&6; }
23702 saved_LIBS="$LIBS" 24655 saved_LIBS="$LIBS"
23703 LIBS="$LIBS -lresolv" 24656 LIBS="$LIBS -lresolv"
23704 echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5 24657 { echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5
23705echo $ECHO_N "checking for res_query in -lresolv... $ECHO_C" >&6 24658echo $ECHO_N "checking for res_query in -lresolv... $ECHO_C" >&6; }
23706 cat >conftest.$ac_ext <<_ACEOF 24659 cat >conftest.$ac_ext <<_ACEOF
23707 24660
23708#include <resolv.h> 24661#include <resolv.h>
@@ -23714,52 +24667,50 @@ int main()
23714 24667
23715_ACEOF 24668_ACEOF
23716rm -f conftest.$ac_objext conftest$ac_exeext 24669rm -f conftest.$ac_objext conftest$ac_exeext
23717if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 24670if { (ac_try="$ac_link"
23718 (eval $ac_link) 2>conftest.er1 24671case "(($ac_try" in
24672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24673 *) ac_try_echo=$ac_try;;
24674esac
24675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24676 (eval "$ac_link") 2>conftest.er1
23719 ac_status=$? 24677 ac_status=$?
23720 grep -v '^ *+' conftest.er1 >conftest.err 24678 grep -v '^ *+' conftest.er1 >conftest.err
23721 rm -f conftest.er1 24679 rm -f conftest.er1
23722 cat conftest.err >&5 24680 cat conftest.err >&5
23723 echo "$as_me:$LINENO: \$? = $ac_status" >&5 24681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23724 (exit $ac_status); } && 24682 (exit $ac_status); } && {
23725 { ac_try='test -z "$ac_c_werror_flag" 24683 test -z "$ac_c_werror_flag" ||
23726 || test ! -s conftest.err' 24684 test ! -s conftest.err
23727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 24685 } && test -s conftest$ac_exeext &&
23728 (eval $ac_try) 2>&5 24686 $as_test_x conftest$ac_exeext; then
23729 ac_status=$?
23730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23731 (exit $ac_status); }; } &&
23732 { ac_try='test -s conftest$ac_exeext'
23733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23734 (eval $ac_try) 2>&5
23735 ac_status=$?
23736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23737 (exit $ac_status); }; }; then
23738 LIBS="$LIBS -lresolv" 24687 LIBS="$LIBS -lresolv"
23739 echo "$as_me:$LINENO: result: yes" >&5 24688 { echo "$as_me:$LINENO: result: yes" >&5
23740echo "${ECHO_T}yes" >&6 24689echo "${ECHO_T}yes" >&6; }
23741else 24690else
23742 echo "$as_me: failed program was:" >&5 24691 echo "$as_me: failed program was:" >&5
23743sed 's/^/| /' conftest.$ac_ext >&5 24692sed 's/^/| /' conftest.$ac_ext >&5
23744 24693
23745LIBS="$saved_LIBS" 24694 LIBS="$saved_LIBS"
23746 echo "$as_me:$LINENO: result: no" >&5 24695 { echo "$as_me:$LINENO: result: no" >&5
23747echo "${ECHO_T}no" >&6 24696echo "${ECHO_T}no" >&6; }
23748fi 24697fi
23749rm -f conftest.err conftest.$ac_objext \ 24698
24699rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23750 conftest$ac_exeext conftest.$ac_ext 24700 conftest$ac_exeext conftest.$ac_ext
23751 24701
23752fi 24702fi
23753rm -f conftest.err conftest.$ac_objext \ 24703
24704rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23754 conftest$ac_exeext conftest.$ac_ext 24705 conftest$ac_exeext conftest.$ac_ext
23755 24706
23756 24707
23757for ac_func in _getshort _getlong 24708for ac_func in _getshort _getlong
23758do 24709do
23759as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 24710as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23760echo "$as_me:$LINENO: checking for $ac_func" >&5 24711{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23761echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 24712echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23762if eval "test \"\${$as_ac_var+set}\" = set"; then 24713if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
23763 echo $ECHO_N "(cached) $ECHO_C" >&6 24714 echo $ECHO_N "(cached) $ECHO_C" >&6
23764else 24715else
23765 cat >conftest.$ac_ext <<_ACEOF 24716 cat >conftest.$ac_ext <<_ACEOF
@@ -23785,68 +24736,60 @@ cat >>conftest.$ac_ext <<_ACEOF
23785 24736
23786#undef $ac_func 24737#undef $ac_func
23787 24738
23788/* Override any gcc2 internal prototype to avoid an error. */ 24739/* Override any GCC internal prototype to avoid an error.
24740 Use char because int might match the return type of a GCC
24741 builtin and then its argument prototype would still apply. */
23789#ifdef __cplusplus 24742#ifdef __cplusplus
23790extern "C" 24743extern "C"
23791{
23792#endif 24744#endif
23793/* We use char because int might match the return type of a gcc2
23794 builtin and then its argument prototype would still apply. */
23795char $ac_func (); 24745char $ac_func ();
23796/* The GNU C library defines this for functions which it implements 24746/* The GNU C library defines this for functions which it implements
23797 to always fail with ENOSYS. Some functions are actually named 24747 to always fail with ENOSYS. Some functions are actually named
23798 something starting with __ and the normal name is an alias. */ 24748 something starting with __ and the normal name is an alias. */
23799#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 24749#if defined __stub_$ac_func || defined __stub___$ac_func
23800choke me 24750choke me
23801#else
23802char (*f) () = $ac_func;
23803#endif
23804#ifdef __cplusplus
23805}
23806#endif 24751#endif
23807 24752
23808int 24753int
23809main () 24754main ()
23810{ 24755{
23811return f != $ac_func; 24756return $ac_func ();
23812 ; 24757 ;
23813 return 0; 24758 return 0;
23814} 24759}
23815_ACEOF 24760_ACEOF
23816rm -f conftest.$ac_objext conftest$ac_exeext 24761rm -f conftest.$ac_objext conftest$ac_exeext
23817if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 24762if { (ac_try="$ac_link"
23818 (eval $ac_link) 2>conftest.er1 24763case "(($ac_try" in
24764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24765 *) ac_try_echo=$ac_try;;
24766esac
24767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24768 (eval "$ac_link") 2>conftest.er1
23819 ac_status=$? 24769 ac_status=$?
23820 grep -v '^ *+' conftest.er1 >conftest.err 24770 grep -v '^ *+' conftest.er1 >conftest.err
23821 rm -f conftest.er1 24771 rm -f conftest.er1
23822 cat conftest.err >&5 24772 cat conftest.err >&5
23823 echo "$as_me:$LINENO: \$? = $ac_status" >&5 24773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23824 (exit $ac_status); } && 24774 (exit $ac_status); } && {
23825 { ac_try='test -z "$ac_c_werror_flag" 24775 test -z "$ac_c_werror_flag" ||
23826 || test ! -s conftest.err' 24776 test ! -s conftest.err
23827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 24777 } && test -s conftest$ac_exeext &&
23828 (eval $ac_try) 2>&5 24778 $as_test_x conftest$ac_exeext; then
23829 ac_status=$?
23830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23831 (exit $ac_status); }; } &&
23832 { ac_try='test -s conftest$ac_exeext'
23833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23834 (eval $ac_try) 2>&5
23835 ac_status=$?
23836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23837 (exit $ac_status); }; }; then
23838 eval "$as_ac_var=yes" 24779 eval "$as_ac_var=yes"
23839else 24780else
23840 echo "$as_me: failed program was:" >&5 24781 echo "$as_me: failed program was:" >&5
23841sed 's/^/| /' conftest.$ac_ext >&5 24782sed 's/^/| /' conftest.$ac_ext >&5
23842 24783
23843eval "$as_ac_var=no" 24784 eval "$as_ac_var=no"
23844fi 24785fi
23845rm -f conftest.err conftest.$ac_objext \ 24786
24787rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23846 conftest$ac_exeext conftest.$ac_ext 24788 conftest$ac_exeext conftest.$ac_ext
23847fi 24789fi
23848echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 24790ac_res=`eval echo '${'$as_ac_var'}'`
23849echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 24791 { echo "$as_me:$LINENO: result: $ac_res" >&5
24792echo "${ECHO_T}$ac_res" >&6; }
23850if test `eval echo '${'$as_ac_var'}'` = yes; then 24793if test `eval echo '${'$as_ac_var'}'` = yes; then
23851 cat >>confdefs.h <<_ACEOF 24794 cat >>confdefs.h <<_ACEOF
23852#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 24795#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -23855,8 +24798,8 @@ _ACEOF
23855fi 24798fi
23856done 24799done
23857 24800
23858 echo "$as_me:$LINENO: checking whether _getshort is declared" >&5 24801 { echo "$as_me:$LINENO: checking whether _getshort is declared" >&5
23859echo $ECHO_N "checking whether _getshort is declared... $ECHO_C" >&6 24802echo $ECHO_N "checking whether _getshort is declared... $ECHO_C" >&6; }
23860if test "${ac_cv_have_decl__getshort+set}" = set; then 24803if test "${ac_cv_have_decl__getshort+set}" = set; then
23861 echo $ECHO_N "(cached) $ECHO_C" >&6 24804 echo $ECHO_N "(cached) $ECHO_C" >&6
23862else 24805else
@@ -23873,7 +24816,7 @@ int
23873main () 24816main ()
23874{ 24817{
23875#ifndef _getshort 24818#ifndef _getshort
23876 char *p = (char *) _getshort; 24819 (void) _getshort;
23877#endif 24820#endif
23878 24821
23879 ; 24822 ;
@@ -23881,38 +24824,34 @@ main ()
23881} 24824}
23882_ACEOF 24825_ACEOF
23883rm -f conftest.$ac_objext 24826rm -f conftest.$ac_objext
23884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 24827if { (ac_try="$ac_compile"
23885 (eval $ac_compile) 2>conftest.er1 24828case "(($ac_try" in
24829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24830 *) ac_try_echo=$ac_try;;
24831esac
24832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24833 (eval "$ac_compile") 2>conftest.er1
23886 ac_status=$? 24834 ac_status=$?
23887 grep -v '^ *+' conftest.er1 >conftest.err 24835 grep -v '^ *+' conftest.er1 >conftest.err
23888 rm -f conftest.er1 24836 rm -f conftest.er1
23889 cat conftest.err >&5 24837 cat conftest.err >&5
23890 echo "$as_me:$LINENO: \$? = $ac_status" >&5 24838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23891 (exit $ac_status); } && 24839 (exit $ac_status); } && {
23892 { ac_try='test -z "$ac_c_werror_flag" 24840 test -z "$ac_c_werror_flag" ||
23893 || test ! -s conftest.err' 24841 test ! -s conftest.err
23894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 24842 } && test -s conftest.$ac_objext; then
23895 (eval $ac_try) 2>&5
23896 ac_status=$?
23897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23898 (exit $ac_status); }; } &&
23899 { ac_try='test -s conftest.$ac_objext'
23900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23901 (eval $ac_try) 2>&5
23902 ac_status=$?
23903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23904 (exit $ac_status); }; }; then
23905 ac_cv_have_decl__getshort=yes 24843 ac_cv_have_decl__getshort=yes
23906else 24844else
23907 echo "$as_me: failed program was:" >&5 24845 echo "$as_me: failed program was:" >&5
23908sed 's/^/| /' conftest.$ac_ext >&5 24846sed 's/^/| /' conftest.$ac_ext >&5
23909 24847
23910ac_cv_have_decl__getshort=no 24848 ac_cv_have_decl__getshort=no
23911fi 24849fi
23912rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 24850
24851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23913fi 24852fi
23914echo "$as_me:$LINENO: result: $ac_cv_have_decl__getshort" >&5 24853{ echo "$as_me:$LINENO: result: $ac_cv_have_decl__getshort" >&5
23915echo "${ECHO_T}$ac_cv_have_decl__getshort" >&6 24854echo "${ECHO_T}$ac_cv_have_decl__getshort" >&6; }
23916if test $ac_cv_have_decl__getshort = yes; then 24855if test $ac_cv_have_decl__getshort = yes; then
23917 24856
23918cat >>confdefs.h <<_ACEOF 24857cat >>confdefs.h <<_ACEOF
@@ -23927,8 +24866,8 @@ _ACEOF
23927 24866
23928 24867
23929fi 24868fi
23930echo "$as_me:$LINENO: checking whether _getlong is declared" >&5 24869{ echo "$as_me:$LINENO: checking whether _getlong is declared" >&5
23931echo $ECHO_N "checking whether _getlong is declared... $ECHO_C" >&6 24870echo $ECHO_N "checking whether _getlong is declared... $ECHO_C" >&6; }
23932if test "${ac_cv_have_decl__getlong+set}" = set; then 24871if test "${ac_cv_have_decl__getlong+set}" = set; then
23933 echo $ECHO_N "(cached) $ECHO_C" >&6 24872 echo $ECHO_N "(cached) $ECHO_C" >&6
23934else 24873else
@@ -23945,7 +24884,7 @@ int
23945main () 24884main ()
23946{ 24885{
23947#ifndef _getlong 24886#ifndef _getlong
23948 char *p = (char *) _getlong; 24887 (void) _getlong;
23949#endif 24888#endif
23950 24889
23951 ; 24890 ;
@@ -23953,38 +24892,34 @@ main ()
23953} 24892}
23954_ACEOF 24893_ACEOF
23955rm -f conftest.$ac_objext 24894rm -f conftest.$ac_objext
23956if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 24895if { (ac_try="$ac_compile"
23957 (eval $ac_compile) 2>conftest.er1 24896case "(($ac_try" in
24897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24898 *) ac_try_echo=$ac_try;;
24899esac
24900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24901 (eval "$ac_compile") 2>conftest.er1
23958 ac_status=$? 24902 ac_status=$?
23959 grep -v '^ *+' conftest.er1 >conftest.err 24903 grep -v '^ *+' conftest.er1 >conftest.err
23960 rm -f conftest.er1 24904 rm -f conftest.er1
23961 cat conftest.err >&5 24905 cat conftest.err >&5
23962 echo "$as_me:$LINENO: \$? = $ac_status" >&5 24906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23963 (exit $ac_status); } && 24907 (exit $ac_status); } && {
23964 { ac_try='test -z "$ac_c_werror_flag" 24908 test -z "$ac_c_werror_flag" ||
23965 || test ! -s conftest.err' 24909 test ! -s conftest.err
23966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 24910 } && test -s conftest.$ac_objext; then
23967 (eval $ac_try) 2>&5
23968 ac_status=$?
23969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23970 (exit $ac_status); }; } &&
23971 { ac_try='test -s conftest.$ac_objext'
23972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23973 (eval $ac_try) 2>&5
23974 ac_status=$?
23975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23976 (exit $ac_status); }; }; then
23977 ac_cv_have_decl__getlong=yes 24911 ac_cv_have_decl__getlong=yes
23978else 24912else
23979 echo "$as_me: failed program was:" >&5 24913 echo "$as_me: failed program was:" >&5
23980sed 's/^/| /' conftest.$ac_ext >&5 24914sed 's/^/| /' conftest.$ac_ext >&5
23981 24915
23982ac_cv_have_decl__getlong=no 24916 ac_cv_have_decl__getlong=no
23983fi 24917fi
23984rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 24918
24919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23985fi 24920fi
23986echo "$as_me:$LINENO: result: $ac_cv_have_decl__getlong" >&5 24921{ echo "$as_me:$LINENO: result: $ac_cv_have_decl__getlong" >&5
23987echo "${ECHO_T}$ac_cv_have_decl__getlong" >&6 24922echo "${ECHO_T}$ac_cv_have_decl__getlong" >&6; }
23988if test $ac_cv_have_decl__getlong = yes; then 24923if test $ac_cv_have_decl__getlong = yes; then
23989 24924
23990cat >>confdefs.h <<_ACEOF 24925cat >>confdefs.h <<_ACEOF
@@ -24001,8 +24936,8 @@ _ACEOF
24001fi 24936fi
24002 24937
24003 24938
24004 echo "$as_me:$LINENO: checking for HEADER.ad" >&5 24939 { echo "$as_me:$LINENO: checking for HEADER.ad" >&5
24005echo $ECHO_N "checking for HEADER.ad... $ECHO_C" >&6 24940echo $ECHO_N "checking for HEADER.ad... $ECHO_C" >&6; }
24006if test "${ac_cv_member_HEADER_ad+set}" = set; then 24941if test "${ac_cv_member_HEADER_ad+set}" = set; then
24007 echo $ECHO_N "(cached) $ECHO_C" >&6 24942 echo $ECHO_N "(cached) $ECHO_C" >&6
24008else 24943else
@@ -24025,33 +24960,28 @@ return 0;
24025} 24960}
24026_ACEOF 24961_ACEOF
24027rm -f conftest.$ac_objext 24962rm -f conftest.$ac_objext
24028if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 24963if { (ac_try="$ac_compile"
24029 (eval $ac_compile) 2>conftest.er1 24964case "(($ac_try" in
24965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24966 *) ac_try_echo=$ac_try;;
24967esac
24968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24969 (eval "$ac_compile") 2>conftest.er1
24030 ac_status=$? 24970 ac_status=$?
24031 grep -v '^ *+' conftest.er1 >conftest.err 24971 grep -v '^ *+' conftest.er1 >conftest.err
24032 rm -f conftest.er1 24972 rm -f conftest.er1
24033 cat conftest.err >&5 24973 cat conftest.err >&5
24034 echo "$as_me:$LINENO: \$? = $ac_status" >&5 24974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24035 (exit $ac_status); } && 24975 (exit $ac_status); } && {
24036 { ac_try='test -z "$ac_c_werror_flag" 24976 test -z "$ac_c_werror_flag" ||
24037 || test ! -s conftest.err' 24977 test ! -s conftest.err
24038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 24978 } && test -s conftest.$ac_objext; then
24039 (eval $ac_try) 2>&5
24040 ac_status=$?
24041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24042 (exit $ac_status); }; } &&
24043 { ac_try='test -s conftest.$ac_objext'
24044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24045 (eval $ac_try) 2>&5
24046 ac_status=$?
24047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24048 (exit $ac_status); }; }; then
24049 ac_cv_member_HEADER_ad=yes 24979 ac_cv_member_HEADER_ad=yes
24050else 24980else
24051 echo "$as_me: failed program was:" >&5 24981 echo "$as_me: failed program was:" >&5
24052sed 's/^/| /' conftest.$ac_ext >&5 24982sed 's/^/| /' conftest.$ac_ext >&5
24053 24983
24054cat >conftest.$ac_ext <<_ACEOF 24984 cat >conftest.$ac_ext <<_ACEOF
24055/* confdefs.h. */ 24985/* confdefs.h. */
24056_ACEOF 24986_ACEOF
24057cat confdefs.h >>conftest.$ac_ext 24987cat confdefs.h >>conftest.$ac_ext
@@ -24070,40 +25000,37 @@ return 0;
24070} 25000}
24071_ACEOF 25001_ACEOF
24072rm -f conftest.$ac_objext 25002rm -f conftest.$ac_objext
24073if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 25003if { (ac_try="$ac_compile"
24074 (eval $ac_compile) 2>conftest.er1 25004case "(($ac_try" in
25005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25006 *) ac_try_echo=$ac_try;;
25007esac
25008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25009 (eval "$ac_compile") 2>conftest.er1
24075 ac_status=$? 25010 ac_status=$?
24076 grep -v '^ *+' conftest.er1 >conftest.err 25011 grep -v '^ *+' conftest.er1 >conftest.err
24077 rm -f conftest.er1 25012 rm -f conftest.er1
24078 cat conftest.err >&5 25013 cat conftest.err >&5
24079 echo "$as_me:$LINENO: \$? = $ac_status" >&5 25014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24080 (exit $ac_status); } && 25015 (exit $ac_status); } && {
24081 { ac_try='test -z "$ac_c_werror_flag" 25016 test -z "$ac_c_werror_flag" ||
24082 || test ! -s conftest.err' 25017 test ! -s conftest.err
24083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 25018 } && test -s conftest.$ac_objext; then
24084 (eval $ac_try) 2>&5
24085 ac_status=$?
24086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24087 (exit $ac_status); }; } &&
24088 { ac_try='test -s conftest.$ac_objext'
24089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24090 (eval $ac_try) 2>&5
24091 ac_status=$?
24092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24093 (exit $ac_status); }; }; then
24094 ac_cv_member_HEADER_ad=yes 25019 ac_cv_member_HEADER_ad=yes
24095else 25020else
24096 echo "$as_me: failed program was:" >&5 25021 echo "$as_me: failed program was:" >&5
24097sed 's/^/| /' conftest.$ac_ext >&5 25022sed 's/^/| /' conftest.$ac_ext >&5
24098 25023
24099ac_cv_member_HEADER_ad=no 25024 ac_cv_member_HEADER_ad=no
24100fi 25025fi
24101rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 25026
25027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24102fi 25028fi
24103rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 25029
25030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24104fi 25031fi
24105echo "$as_me:$LINENO: result: $ac_cv_member_HEADER_ad" >&5 25032{ echo "$as_me:$LINENO: result: $ac_cv_member_HEADER_ad" >&5
24106echo "${ECHO_T}$ac_cv_member_HEADER_ad" >&6 25033echo "${ECHO_T}$ac_cv_member_HEADER_ad" >&6; }
24107if test $ac_cv_member_HEADER_ad = yes; then 25034if test $ac_cv_member_HEADER_ad = yes; then
24108 25035
24109cat >>confdefs.h <<\_ACEOF 25036cat >>confdefs.h <<\_ACEOF
@@ -24116,13 +25043,337 @@ fi
24116fi 25043fi
24117 25044
24118 25045
25046# Check whether user wants SELinux support
25047SELINUX_MSG="no"
25048LIBSELINUX=""
25049
25050# Check whether --with-selinux was given.
25051if test "${with_selinux+set}" = set; then
25052 withval=$with_selinux; if test "x$withval" != "xno" ; then
25053
25054cat >>confdefs.h <<\_ACEOF
25055#define WITH_SELINUX 1
25056_ACEOF
25057
25058 SELINUX_MSG="yes"
25059 if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
25060 { echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5
25061echo $ECHO_N "checking for selinux/selinux.h... $ECHO_C" >&6; }
25062if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
25063 echo $ECHO_N "(cached) $ECHO_C" >&6
25064fi
25065{ echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5
25066echo "${ECHO_T}$ac_cv_header_selinux_selinux_h" >&6; }
25067else
25068 # Is the header compilable?
25069{ echo "$as_me:$LINENO: checking selinux/selinux.h usability" >&5
25070echo $ECHO_N "checking selinux/selinux.h usability... $ECHO_C" >&6; }
25071cat >conftest.$ac_ext <<_ACEOF
25072/* confdefs.h. */
25073_ACEOF
25074cat confdefs.h >>conftest.$ac_ext
25075cat >>conftest.$ac_ext <<_ACEOF
25076/* end confdefs.h. */
25077$ac_includes_default
25078#include <selinux/selinux.h>
25079_ACEOF
25080rm -f conftest.$ac_objext
25081if { (ac_try="$ac_compile"
25082case "(($ac_try" in
25083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25084 *) ac_try_echo=$ac_try;;
25085esac
25086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25087 (eval "$ac_compile") 2>conftest.er1
25088 ac_status=$?
25089 grep -v '^ *+' conftest.er1 >conftest.err
25090 rm -f conftest.er1
25091 cat conftest.err >&5
25092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25093 (exit $ac_status); } && {
25094 test -z "$ac_c_werror_flag" ||
25095 test ! -s conftest.err
25096 } && test -s conftest.$ac_objext; then
25097 ac_header_compiler=yes
25098else
25099 echo "$as_me: failed program was:" >&5
25100sed 's/^/| /' conftest.$ac_ext >&5
25101
25102 ac_header_compiler=no
25103fi
25104
25105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25106{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25107echo "${ECHO_T}$ac_header_compiler" >&6; }
25108
25109# Is the header present?
25110{ echo "$as_me:$LINENO: checking selinux/selinux.h presence" >&5
25111echo $ECHO_N "checking selinux/selinux.h presence... $ECHO_C" >&6; }
25112cat >conftest.$ac_ext <<_ACEOF
25113/* confdefs.h. */
25114_ACEOF
25115cat confdefs.h >>conftest.$ac_ext
25116cat >>conftest.$ac_ext <<_ACEOF
25117/* end confdefs.h. */
25118#include <selinux/selinux.h>
25119_ACEOF
25120if { (ac_try="$ac_cpp conftest.$ac_ext"
25121case "(($ac_try" in
25122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25123 *) ac_try_echo=$ac_try;;
25124esac
25125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25126 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
25127 ac_status=$?
25128 grep -v '^ *+' conftest.er1 >conftest.err
25129 rm -f conftest.er1
25130 cat conftest.err >&5
25131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25132 (exit $ac_status); } >/dev/null && {
25133 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25134 test ! -s conftest.err
25135 }; then
25136 ac_header_preproc=yes
25137else
25138 echo "$as_me: failed program was:" >&5
25139sed 's/^/| /' conftest.$ac_ext >&5
25140
25141 ac_header_preproc=no
25142fi
25143
25144rm -f conftest.err conftest.$ac_ext
25145{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25146echo "${ECHO_T}$ac_header_preproc" >&6; }
25147
25148# So? What about this header?
25149case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25150 yes:no: )
25151 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&5
25152echo "$as_me: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
25153 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&5
25154echo "$as_me: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&2;}
25155 ac_header_preproc=yes
25156 ;;
25157 no:yes:* )
25158 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: present but cannot be compiled" >&5
25159echo "$as_me: WARNING: selinux/selinux.h: present but cannot be compiled" >&2;}
25160 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&5
25161echo "$as_me: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&2;}
25162 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: see the Autoconf documentation" >&5
25163echo "$as_me: WARNING: selinux/selinux.h: see the Autoconf documentation" >&2;}
25164 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&5
25165echo "$as_me: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&2;}
25166 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&5
25167echo "$as_me: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&2;}
25168 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&5
25169echo "$as_me: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&2;}
25170 ( cat <<\_ASBOX
25171## ------------------------------------------- ##
25172## Report this to openssh-unix-dev@mindrot.org ##
25173## ------------------------------------------- ##
25174_ASBOX
25175 ) | sed "s/^/$as_me: WARNING: /" >&2
25176 ;;
25177esac
25178{ echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5
25179echo $ECHO_N "checking for selinux/selinux.h... $ECHO_C" >&6; }
25180if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
25181 echo $ECHO_N "(cached) $ECHO_C" >&6
25182else
25183 ac_cv_header_selinux_selinux_h=$ac_header_preproc
25184fi
25185{ echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5
25186echo "${ECHO_T}$ac_cv_header_selinux_selinux_h" >&6; }
25187
25188fi
25189if test $ac_cv_header_selinux_selinux_h = yes; then
25190 :
25191else
25192 { { echo "$as_me:$LINENO: error: SELinux support requires selinux.h header" >&5
25193echo "$as_me: error: SELinux support requires selinux.h header" >&2;}
25194 { (exit 1); exit 1; }; }
25195fi
25196
25197
25198 { echo "$as_me:$LINENO: checking for setexeccon in -lselinux" >&5
25199echo $ECHO_N "checking for setexeccon in -lselinux... $ECHO_C" >&6; }
25200if test "${ac_cv_lib_selinux_setexeccon+set}" = set; then
25201 echo $ECHO_N "(cached) $ECHO_C" >&6
25202else
25203 ac_check_lib_save_LIBS=$LIBS
25204LIBS="-lselinux $LIBS"
25205cat >conftest.$ac_ext <<_ACEOF
25206/* confdefs.h. */
25207_ACEOF
25208cat confdefs.h >>conftest.$ac_ext
25209cat >>conftest.$ac_ext <<_ACEOF
25210/* end confdefs.h. */
25211
25212/* Override any GCC internal prototype to avoid an error.
25213 Use char because int might match the return type of a GCC
25214 builtin and then its argument prototype would still apply. */
25215#ifdef __cplusplus
25216extern "C"
25217#endif
25218char setexeccon ();
25219int
25220main ()
25221{
25222return setexeccon ();
25223 ;
25224 return 0;
25225}
25226_ACEOF
25227rm -f conftest.$ac_objext conftest$ac_exeext
25228if { (ac_try="$ac_link"
25229case "(($ac_try" in
25230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25231 *) ac_try_echo=$ac_try;;
25232esac
25233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25234 (eval "$ac_link") 2>conftest.er1
25235 ac_status=$?
25236 grep -v '^ *+' conftest.er1 >conftest.err
25237 rm -f conftest.er1
25238 cat conftest.err >&5
25239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25240 (exit $ac_status); } && {
25241 test -z "$ac_c_werror_flag" ||
25242 test ! -s conftest.err
25243 } && test -s conftest$ac_exeext &&
25244 $as_test_x conftest$ac_exeext; then
25245 ac_cv_lib_selinux_setexeccon=yes
25246else
25247 echo "$as_me: failed program was:" >&5
25248sed 's/^/| /' conftest.$ac_ext >&5
25249
25250 ac_cv_lib_selinux_setexeccon=no
25251fi
25252
25253rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25254 conftest$ac_exeext conftest.$ac_ext
25255LIBS=$ac_check_lib_save_LIBS
25256fi
25257{ echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_setexeccon" >&5
25258echo "${ECHO_T}$ac_cv_lib_selinux_setexeccon" >&6; }
25259if test $ac_cv_lib_selinux_setexeccon = yes; then
25260 LIBSELINUX="-lselinux"
25261else
25262 { { echo "$as_me:$LINENO: error: SELinux support requires libselinux library" >&5
25263echo "$as_me: error: SELinux support requires libselinux library" >&2;}
25264 { (exit 1); exit 1; }; }
25265fi
25266
25267 save_LIBS="$LIBS"
25268 LIBS="$LIBS $LIBSELINUX"
25269
25270
25271for ac_func in getseuserbyname get_default_context_with_level
25272do
25273as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
25274{ echo "$as_me:$LINENO: checking for $ac_func" >&5
25275echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
25276if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
25277 echo $ECHO_N "(cached) $ECHO_C" >&6
25278else
25279 cat >conftest.$ac_ext <<_ACEOF
25280/* confdefs.h. */
25281_ACEOF
25282cat confdefs.h >>conftest.$ac_ext
25283cat >>conftest.$ac_ext <<_ACEOF
25284/* end confdefs.h. */
25285/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
25286 For example, HP-UX 11i <limits.h> declares gettimeofday. */
25287#define $ac_func innocuous_$ac_func
25288
25289/* System header to define __stub macros and hopefully few prototypes,
25290 which can conflict with char $ac_func (); below.
25291 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25292 <limits.h> exists even on freestanding compilers. */
25293
25294#ifdef __STDC__
25295# include <limits.h>
25296#else
25297# include <assert.h>
25298#endif
25299
25300#undef $ac_func
25301
25302/* Override any GCC internal prototype to avoid an error.
25303 Use char because int might match the return type of a GCC
25304 builtin and then its argument prototype would still apply. */
25305#ifdef __cplusplus
25306extern "C"
25307#endif
25308char $ac_func ();
25309/* The GNU C library defines this for functions which it implements
25310 to always fail with ENOSYS. Some functions are actually named
25311 something starting with __ and the normal name is an alias. */
25312#if defined __stub_$ac_func || defined __stub___$ac_func
25313choke me
25314#endif
25315
25316int
25317main ()
25318{
25319return $ac_func ();
25320 ;
25321 return 0;
25322}
25323_ACEOF
25324rm -f conftest.$ac_objext conftest$ac_exeext
25325if { (ac_try="$ac_link"
25326case "(($ac_try" in
25327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25328 *) ac_try_echo=$ac_try;;
25329esac
25330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25331 (eval "$ac_link") 2>conftest.er1
25332 ac_status=$?
25333 grep -v '^ *+' conftest.er1 >conftest.err
25334 rm -f conftest.er1
25335 cat conftest.err >&5
25336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25337 (exit $ac_status); } && {
25338 test -z "$ac_c_werror_flag" ||
25339 test ! -s conftest.err
25340 } && test -s conftest$ac_exeext &&
25341 $as_test_x conftest$ac_exeext; then
25342 eval "$as_ac_var=yes"
25343else
25344 echo "$as_me: failed program was:" >&5
25345sed 's/^/| /' conftest.$ac_ext >&5
25346
25347 eval "$as_ac_var=no"
25348fi
25349
25350rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25351 conftest$ac_exeext conftest.$ac_ext
25352fi
25353ac_res=`eval echo '${'$as_ac_var'}'`
25354 { echo "$as_me:$LINENO: result: $ac_res" >&5
25355echo "${ECHO_T}$ac_res" >&6; }
25356if test `eval echo '${'$as_ac_var'}'` = yes; then
25357 cat >>confdefs.h <<_ACEOF
25358#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
25359_ACEOF
25360
25361fi
25362done
25363
25364 LIBS="$save_LIBS"
25365 fi
25366
25367fi
25368
25369
25370
24119# Check whether user wants Kerberos 5 support 25371# Check whether user wants Kerberos 5 support
24120KRB5_MSG="no" 25372KRB5_MSG="no"
24121 25373
24122# Check whether --with-kerberos5 or --without-kerberos5 was given. 25374# Check whether --with-kerberos5 was given.
24123if test "${with_kerberos5+set}" = set; then 25375if test "${with_kerberos5+set}" = set; then
24124 withval="$with_kerberos5" 25376 withval=$with_kerberos5; if test "x$withval" != "xno" ; then
24125 if test "x$withval" != "xno" ; then
24126 if test "x$withval" = "xyes" ; then 25377 if test "x$withval" = "xyes" ; then
24127 KRB5ROOT="/usr/local" 25378 KRB5ROOT="/usr/local"
24128 else 25379 else
@@ -24136,18 +25387,18 @@ _ACEOF
24136 25387
24137 KRB5_MSG="yes" 25388 KRB5_MSG="yes"
24138 25389
24139 echo "$as_me:$LINENO: checking for krb5-config" >&5 25390 { echo "$as_me:$LINENO: checking for krb5-config" >&5
24140echo $ECHO_N "checking for krb5-config... $ECHO_C" >&6 25391echo $ECHO_N "checking for krb5-config... $ECHO_C" >&6; }
24141 if test -x $KRB5ROOT/bin/krb5-config ; then 25392 if test -x $KRB5ROOT/bin/krb5-config ; then
24142 KRB5CONF=$KRB5ROOT/bin/krb5-config 25393 KRB5CONF=$KRB5ROOT/bin/krb5-config
24143 echo "$as_me:$LINENO: result: $KRB5CONF" >&5 25394 { echo "$as_me:$LINENO: result: $KRB5CONF" >&5
24144echo "${ECHO_T}$KRB5CONF" >&6 25395echo "${ECHO_T}$KRB5CONF" >&6; }
24145 25396
24146 echo "$as_me:$LINENO: checking for gssapi support" >&5 25397 { echo "$as_me:$LINENO: checking for gssapi support" >&5
24147echo $ECHO_N "checking for gssapi support... $ECHO_C" >&6 25398echo $ECHO_N "checking for gssapi support... $ECHO_C" >&6; }
24148 if $KRB5CONF | grep gssapi >/dev/null ; then 25399 if $KRB5CONF | grep gssapi >/dev/null ; then
24149 echo "$as_me:$LINENO: result: yes" >&5 25400 { echo "$as_me:$LINENO: result: yes" >&5
24150echo "${ECHO_T}yes" >&6 25401echo "${ECHO_T}yes" >&6; }
24151 25402
24152cat >>confdefs.h <<\_ACEOF 25403cat >>confdefs.h <<\_ACEOF
24153#define GSSAPI 1 25404#define GSSAPI 1
@@ -24155,15 +25406,15 @@ _ACEOF
24155 25406
24156 k5confopts=gssapi 25407 k5confopts=gssapi
24157 else 25408 else
24158 echo "$as_me:$LINENO: result: no" >&5 25409 { echo "$as_me:$LINENO: result: no" >&5
24159echo "${ECHO_T}no" >&6 25410echo "${ECHO_T}no" >&6; }
24160 k5confopts="" 25411 k5confopts=""
24161 fi 25412 fi
24162 K5CFLAGS="`$KRB5CONF --cflags $k5confopts`" 25413 K5CFLAGS="`$KRB5CONF --cflags $k5confopts`"
24163 K5LIBS="`$KRB5CONF --libs $k5confopts`" 25414 K5LIBS="`$KRB5CONF --libs $k5confopts`"
24164 CPPFLAGS="$CPPFLAGS $K5CFLAGS" 25415 CPPFLAGS="$CPPFLAGS $K5CFLAGS"
24165 echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5 25416 { echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5
24166echo $ECHO_N "checking whether we are using Heimdal... $ECHO_C" >&6 25417echo $ECHO_N "checking whether we are using Heimdal... $ECHO_C" >&6; }
24167 cat >conftest.$ac_ext <<_ACEOF 25418 cat >conftest.$ac_ext <<_ACEOF
24168/* confdefs.h. */ 25419/* confdefs.h. */
24169_ACEOF 25420_ACEOF
@@ -24180,29 +25431,24 @@ main ()
24180} 25431}
24181_ACEOF 25432_ACEOF
24182rm -f conftest.$ac_objext 25433rm -f conftest.$ac_objext
24183if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 25434if { (ac_try="$ac_compile"
24184 (eval $ac_compile) 2>conftest.er1 25435case "(($ac_try" in
25436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25437 *) ac_try_echo=$ac_try;;
25438esac
25439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25440 (eval "$ac_compile") 2>conftest.er1
24185 ac_status=$? 25441 ac_status=$?
24186 grep -v '^ *+' conftest.er1 >conftest.err 25442 grep -v '^ *+' conftest.er1 >conftest.err
24187 rm -f conftest.er1 25443 rm -f conftest.er1
24188 cat conftest.err >&5 25444 cat conftest.err >&5
24189 echo "$as_me:$LINENO: \$? = $ac_status" >&5 25445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24190 (exit $ac_status); } && 25446 (exit $ac_status); } && {
24191 { ac_try='test -z "$ac_c_werror_flag" 25447 test -z "$ac_c_werror_flag" ||
24192 || test ! -s conftest.err' 25448 test ! -s conftest.err
24193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 25449 } && test -s conftest.$ac_objext; then
24194 (eval $ac_try) 2>&5 25450 { echo "$as_me:$LINENO: result: yes" >&5
24195 ac_status=$? 25451echo "${ECHO_T}yes" >&6; }
24196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24197 (exit $ac_status); }; } &&
24198 { ac_try='test -s conftest.$ac_objext'
24199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24200 (eval $ac_try) 2>&5
24201 ac_status=$?
24202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24203 (exit $ac_status); }; }; then
24204 echo "$as_me:$LINENO: result: yes" >&5
24205echo "${ECHO_T}yes" >&6
24206 25452
24207cat >>confdefs.h <<\_ACEOF 25453cat >>confdefs.h <<\_ACEOF
24208#define HEIMDAL 1 25454#define HEIMDAL 1
@@ -24212,18 +25458,19 @@ else
24212 echo "$as_me: failed program was:" >&5 25458 echo "$as_me: failed program was:" >&5
24213sed 's/^/| /' conftest.$ac_ext >&5 25459sed 's/^/| /' conftest.$ac_ext >&5
24214 25460
24215echo "$as_me:$LINENO: result: no" >&5 25461 { echo "$as_me:$LINENO: result: no" >&5
24216echo "${ECHO_T}no" >&6 25462echo "${ECHO_T}no" >&6; }
24217 25463
24218fi 25464fi
24219rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 25465
25466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24220 else 25467 else
24221 echo "$as_me:$LINENO: result: no" >&5 25468 { echo "$as_me:$LINENO: result: no" >&5
24222echo "${ECHO_T}no" >&6 25469echo "${ECHO_T}no" >&6; }
24223 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include" 25470 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
24224 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib" 25471 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
24225 echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5 25472 { echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5
24226echo $ECHO_N "checking whether we are using Heimdal... $ECHO_C" >&6 25473echo $ECHO_N "checking whether we are using Heimdal... $ECHO_C" >&6; }
24227 cat >conftest.$ac_ext <<_ACEOF 25474 cat >conftest.$ac_ext <<_ACEOF
24228/* confdefs.h. */ 25475/* confdefs.h. */
24229_ACEOF 25476_ACEOF
@@ -24240,37 +25487,32 @@ main ()
24240} 25487}
24241_ACEOF 25488_ACEOF
24242rm -f conftest.$ac_objext 25489rm -f conftest.$ac_objext
24243if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 25490if { (ac_try="$ac_compile"
24244 (eval $ac_compile) 2>conftest.er1 25491case "(($ac_try" in
25492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25493 *) ac_try_echo=$ac_try;;
25494esac
25495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25496 (eval "$ac_compile") 2>conftest.er1
24245 ac_status=$? 25497 ac_status=$?
24246 grep -v '^ *+' conftest.er1 >conftest.err 25498 grep -v '^ *+' conftest.er1 >conftest.err
24247 rm -f conftest.er1 25499 rm -f conftest.er1
24248 cat conftest.err >&5 25500 cat conftest.err >&5
24249 echo "$as_me:$LINENO: \$? = $ac_status" >&5 25501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24250 (exit $ac_status); } && 25502 (exit $ac_status); } && {
24251 { ac_try='test -z "$ac_c_werror_flag" 25503 test -z "$ac_c_werror_flag" ||
24252 || test ! -s conftest.err' 25504 test ! -s conftest.err
24253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 25505 } && test -s conftest.$ac_objext; then
24254 (eval $ac_try) 2>&5 25506 { echo "$as_me:$LINENO: result: yes" >&5
24255 ac_status=$? 25507echo "${ECHO_T}yes" >&6; }
24256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24257 (exit $ac_status); }; } &&
24258 { ac_try='test -s conftest.$ac_objext'
24259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24260 (eval $ac_try) 2>&5
24261 ac_status=$?
24262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24263 (exit $ac_status); }; }; then
24264 echo "$as_me:$LINENO: result: yes" >&5
24265echo "${ECHO_T}yes" >&6
24266 cat >>confdefs.h <<\_ACEOF 25508 cat >>confdefs.h <<\_ACEOF
24267#define HEIMDAL 1 25509#define HEIMDAL 1
24268_ACEOF 25510_ACEOF
24269 25511
24270 K5LIBS="-lkrb5 -ldes" 25512 K5LIBS="-lkrb5 -ldes"
24271 K5LIBS="$K5LIBS -lcom_err -lasn1" 25513 K5LIBS="$K5LIBS -lcom_err -lasn1"
24272 echo "$as_me:$LINENO: checking for net_write in -lroken" >&5 25514 { echo "$as_me:$LINENO: checking for net_write in -lroken" >&5
24273echo $ECHO_N "checking for net_write in -lroken... $ECHO_C" >&6 25515echo $ECHO_N "checking for net_write in -lroken... $ECHO_C" >&6; }
24274if test "${ac_cv_lib_roken_net_write+set}" = set; then 25516if test "${ac_cv_lib_roken_net_write+set}" = set; then
24275 echo $ECHO_N "(cached) $ECHO_C" >&6 25517 echo $ECHO_N "(cached) $ECHO_C" >&6
24276else 25518else
@@ -24283,56 +25525,53 @@ cat confdefs.h >>conftest.$ac_ext
24283cat >>conftest.$ac_ext <<_ACEOF 25525cat >>conftest.$ac_ext <<_ACEOF
24284/* end confdefs.h. */ 25526/* end confdefs.h. */
24285 25527
24286/* Override any gcc2 internal prototype to avoid an error. */ 25528/* Override any GCC internal prototype to avoid an error.
25529 Use char because int might match the return type of a GCC
25530 builtin and then its argument prototype would still apply. */
24287#ifdef __cplusplus 25531#ifdef __cplusplus
24288extern "C" 25532extern "C"
24289#endif 25533#endif
24290/* We use char because int might match the return type of a gcc2
24291 builtin and then its argument prototype would still apply. */
24292char net_write (); 25534char net_write ();
24293int 25535int
24294main () 25536main ()
24295{ 25537{
24296net_write (); 25538return net_write ();
24297 ; 25539 ;
24298 return 0; 25540 return 0;
24299} 25541}
24300_ACEOF 25542_ACEOF
24301rm -f conftest.$ac_objext conftest$ac_exeext 25543rm -f conftest.$ac_objext conftest$ac_exeext
24302if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 25544if { (ac_try="$ac_link"
24303 (eval $ac_link) 2>conftest.er1 25545case "(($ac_try" in
25546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25547 *) ac_try_echo=$ac_try;;
25548esac
25549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25550 (eval "$ac_link") 2>conftest.er1
24304 ac_status=$? 25551 ac_status=$?
24305 grep -v '^ *+' conftest.er1 >conftest.err 25552 grep -v '^ *+' conftest.er1 >conftest.err
24306 rm -f conftest.er1 25553 rm -f conftest.er1
24307 cat conftest.err >&5 25554 cat conftest.err >&5
24308 echo "$as_me:$LINENO: \$? = $ac_status" >&5 25555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24309 (exit $ac_status); } && 25556 (exit $ac_status); } && {
24310 { ac_try='test -z "$ac_c_werror_flag" 25557 test -z "$ac_c_werror_flag" ||
24311 || test ! -s conftest.err' 25558 test ! -s conftest.err
24312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 25559 } && test -s conftest$ac_exeext &&
24313 (eval $ac_try) 2>&5 25560 $as_test_x conftest$ac_exeext; then
24314 ac_status=$?
24315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24316 (exit $ac_status); }; } &&
24317 { ac_try='test -s conftest$ac_exeext'
24318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24319 (eval $ac_try) 2>&5
24320 ac_status=$?
24321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24322 (exit $ac_status); }; }; then
24323 ac_cv_lib_roken_net_write=yes 25561 ac_cv_lib_roken_net_write=yes
24324else 25562else
24325 echo "$as_me: failed program was:" >&5 25563 echo "$as_me: failed program was:" >&5
24326sed 's/^/| /' conftest.$ac_ext >&5 25564sed 's/^/| /' conftest.$ac_ext >&5
24327 25565
24328ac_cv_lib_roken_net_write=no 25566 ac_cv_lib_roken_net_write=no
24329fi 25567fi
24330rm -f conftest.err conftest.$ac_objext \ 25568
25569rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24331 conftest$ac_exeext conftest.$ac_ext 25570 conftest$ac_exeext conftest.$ac_ext
24332LIBS=$ac_check_lib_save_LIBS 25571LIBS=$ac_check_lib_save_LIBS
24333fi 25572fi
24334echo "$as_me:$LINENO: result: $ac_cv_lib_roken_net_write" >&5 25573{ echo "$as_me:$LINENO: result: $ac_cv_lib_roken_net_write" >&5
24335echo "${ECHO_T}$ac_cv_lib_roken_net_write" >&6 25574echo "${ECHO_T}$ac_cv_lib_roken_net_write" >&6; }
24336if test $ac_cv_lib_roken_net_write = yes; then 25575if test $ac_cv_lib_roken_net_write = yes; then
24337 K5LIBS="$K5LIBS -lroken" 25576 K5LIBS="$K5LIBS -lroken"
24338fi 25577fi
@@ -24342,20 +25581,20 @@ else
24342 echo "$as_me: failed program was:" >&5 25581 echo "$as_me: failed program was:" >&5
24343sed 's/^/| /' conftest.$ac_ext >&5 25582sed 's/^/| /' conftest.$ac_ext >&5
24344 25583
24345 echo "$as_me:$LINENO: result: no" >&5 25584 { echo "$as_me:$LINENO: result: no" >&5
24346echo "${ECHO_T}no" >&6 25585echo "${ECHO_T}no" >&6; }
24347 K5LIBS="-lkrb5 -lk5crypto -lcom_err" 25586 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
24348 25587
24349 25588
24350fi 25589fi
24351rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 25590
24352 echo "$as_me:$LINENO: checking for library containing dn_expand" >&5 25591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24353echo $ECHO_N "checking for library containing dn_expand... $ECHO_C" >&6 25592 { echo "$as_me:$LINENO: checking for library containing dn_expand" >&5
25593echo $ECHO_N "checking for library containing dn_expand... $ECHO_C" >&6; }
24354if test "${ac_cv_search_dn_expand+set}" = set; then 25594if test "${ac_cv_search_dn_expand+set}" = set; then
24355 echo $ECHO_N "(cached) $ECHO_C" >&6 25595 echo $ECHO_N "(cached) $ECHO_C" >&6
24356else 25596else
24357 ac_func_search_save_LIBS=$LIBS 25597 ac_func_search_save_LIBS=$LIBS
24358ac_cv_search_dn_expand=no
24359cat >conftest.$ac_ext <<_ACEOF 25598cat >conftest.$ac_ext <<_ACEOF
24360/* confdefs.h. */ 25599/* confdefs.h. */
24361_ACEOF 25600_ACEOF
@@ -24363,121 +25602,79 @@ cat confdefs.h >>conftest.$ac_ext
24363cat >>conftest.$ac_ext <<_ACEOF 25602cat >>conftest.$ac_ext <<_ACEOF
24364/* end confdefs.h. */ 25603/* end confdefs.h. */
24365 25604
24366/* Override any gcc2 internal prototype to avoid an error. */ 25605/* Override any GCC internal prototype to avoid an error.
25606 Use char because int might match the return type of a GCC
25607 builtin and then its argument prototype would still apply. */
24367#ifdef __cplusplus 25608#ifdef __cplusplus
24368extern "C" 25609extern "C"
24369#endif 25610#endif
24370/* We use char because int might match the return type of a gcc2
24371 builtin and then its argument prototype would still apply. */
24372char dn_expand (); 25611char dn_expand ();
24373int 25612int
24374main () 25613main ()
24375{ 25614{
24376dn_expand (); 25615return dn_expand ();
24377 ; 25616 ;
24378 return 0; 25617 return 0;
24379} 25618}
24380_ACEOF 25619_ACEOF
24381rm -f conftest.$ac_objext conftest$ac_exeext 25620for ac_lib in '' resolv; do
24382if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 25621 if test -z "$ac_lib"; then
24383 (eval $ac_link) 2>conftest.er1 25622 ac_res="none required"
25623 else
25624 ac_res=-l$ac_lib
25625 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25626 fi
25627 rm -f conftest.$ac_objext conftest$ac_exeext
25628if { (ac_try="$ac_link"
25629case "(($ac_try" in
25630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25631 *) ac_try_echo=$ac_try;;
25632esac
25633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25634 (eval "$ac_link") 2>conftest.er1
24384 ac_status=$? 25635 ac_status=$?
24385 grep -v '^ *+' conftest.er1 >conftest.err 25636 grep -v '^ *+' conftest.er1 >conftest.err
24386 rm -f conftest.er1 25637 rm -f conftest.er1
24387 cat conftest.err >&5 25638 cat conftest.err >&5
24388 echo "$as_me:$LINENO: \$? = $ac_status" >&5 25639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24389 (exit $ac_status); } && 25640 (exit $ac_status); } && {
24390 { ac_try='test -z "$ac_c_werror_flag" 25641 test -z "$ac_c_werror_flag" ||
24391 || test ! -s conftest.err' 25642 test ! -s conftest.err
24392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 25643 } && test -s conftest$ac_exeext &&
24393 (eval $ac_try) 2>&5 25644 $as_test_x conftest$ac_exeext; then
24394 ac_status=$? 25645 ac_cv_search_dn_expand=$ac_res
24395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24396 (exit $ac_status); }; } &&
24397 { ac_try='test -s conftest$ac_exeext'
24398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24399 (eval $ac_try) 2>&5
24400 ac_status=$?
24401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24402 (exit $ac_status); }; }; then
24403 ac_cv_search_dn_expand="none required"
24404else 25646else
24405 echo "$as_me: failed program was:" >&5 25647 echo "$as_me: failed program was:" >&5
24406sed 's/^/| /' conftest.$ac_ext >&5 25648sed 's/^/| /' conftest.$ac_ext >&5
24407 25649
24408fi
24409rm -f conftest.err conftest.$ac_objext \
24410 conftest$ac_exeext conftest.$ac_ext
24411if test "$ac_cv_search_dn_expand" = no; then
24412 for ac_lib in resolv; do
24413 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
24414 cat >conftest.$ac_ext <<_ACEOF
24415/* confdefs.h. */
24416_ACEOF
24417cat confdefs.h >>conftest.$ac_ext
24418cat >>conftest.$ac_ext <<_ACEOF
24419/* end confdefs.h. */
24420 25650
24421/* Override any gcc2 internal prototype to avoid an error. */ 25651fi
24422#ifdef __cplusplus
24423extern "C"
24424#endif
24425/* We use char because int might match the return type of a gcc2
24426 builtin and then its argument prototype would still apply. */
24427char dn_expand ();
24428int
24429main ()
24430{
24431dn_expand ();
24432 ;
24433 return 0;
24434}
24435_ACEOF
24436rm -f conftest.$ac_objext conftest$ac_exeext
24437if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24438 (eval $ac_link) 2>conftest.er1
24439 ac_status=$?
24440 grep -v '^ *+' conftest.er1 >conftest.err
24441 rm -f conftest.er1
24442 cat conftest.err >&5
24443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24444 (exit $ac_status); } &&
24445 { ac_try='test -z "$ac_c_werror_flag"
24446 || test ! -s conftest.err'
24447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24448 (eval $ac_try) 2>&5
24449 ac_status=$?
24450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24451 (exit $ac_status); }; } &&
24452 { ac_try='test -s conftest$ac_exeext'
24453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24454 (eval $ac_try) 2>&5
24455 ac_status=$?
24456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24457 (exit $ac_status); }; }; then
24458 ac_cv_search_dn_expand="-l$ac_lib"
24459break
24460else
24461 echo "$as_me: failed program was:" >&5
24462sed 's/^/| /' conftest.$ac_ext >&5
24463 25652
25653rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25654 conftest$ac_exeext
25655 if test "${ac_cv_search_dn_expand+set}" = set; then
25656 break
24464fi 25657fi
24465rm -f conftest.err conftest.$ac_objext \ 25658done
24466 conftest$ac_exeext conftest.$ac_ext 25659if test "${ac_cv_search_dn_expand+set}" = set; then
24467 done 25660 :
25661else
25662 ac_cv_search_dn_expand=no
24468fi 25663fi
25664rm conftest.$ac_ext
24469LIBS=$ac_func_search_save_LIBS 25665LIBS=$ac_func_search_save_LIBS
24470fi 25666fi
24471echo "$as_me:$LINENO: result: $ac_cv_search_dn_expand" >&5 25667{ echo "$as_me:$LINENO: result: $ac_cv_search_dn_expand" >&5
24472echo "${ECHO_T}$ac_cv_search_dn_expand" >&6 25668echo "${ECHO_T}$ac_cv_search_dn_expand" >&6; }
24473if test "$ac_cv_search_dn_expand" != no; then 25669ac_res=$ac_cv_search_dn_expand
24474 test "$ac_cv_search_dn_expand" = "none required" || LIBS="$ac_cv_search_dn_expand $LIBS" 25670if test "$ac_res" != no; then
25671 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24475 25672
24476fi 25673fi
24477 25674
24478 25675
24479 echo "$as_me:$LINENO: checking for gss_init_sec_context in -lgssapi" >&5 25676 { echo "$as_me:$LINENO: checking for gss_init_sec_context in -lgssapi" >&5
24480echo $ECHO_N "checking for gss_init_sec_context in -lgssapi... $ECHO_C" >&6 25677echo $ECHO_N "checking for gss_init_sec_context in -lgssapi... $ECHO_C" >&6; }
24481if test "${ac_cv_lib_gssapi_gss_init_sec_context+set}" = set; then 25678if test "${ac_cv_lib_gssapi_gss_init_sec_context+set}" = set; then
24482 echo $ECHO_N "(cached) $ECHO_C" >&6 25679 echo $ECHO_N "(cached) $ECHO_C" >&6
24483else 25680else
@@ -24490,56 +25687,53 @@ cat confdefs.h >>conftest.$ac_ext
24490cat >>conftest.$ac_ext <<_ACEOF 25687cat >>conftest.$ac_ext <<_ACEOF
24491/* end confdefs.h. */ 25688/* end confdefs.h. */
24492 25689
24493/* Override any gcc2 internal prototype to avoid an error. */ 25690/* Override any GCC internal prototype to avoid an error.
25691 Use char because int might match the return type of a GCC
25692 builtin and then its argument prototype would still apply. */
24494#ifdef __cplusplus 25693#ifdef __cplusplus
24495extern "C" 25694extern "C"
24496#endif 25695#endif
24497/* We use char because int might match the return type of a gcc2
24498 builtin and then its argument prototype would still apply. */
24499char gss_init_sec_context (); 25696char gss_init_sec_context ();
24500int 25697int
24501main () 25698main ()
24502{ 25699{
24503gss_init_sec_context (); 25700return gss_init_sec_context ();
24504 ; 25701 ;
24505 return 0; 25702 return 0;
24506} 25703}
24507_ACEOF 25704_ACEOF
24508rm -f conftest.$ac_objext conftest$ac_exeext 25705rm -f conftest.$ac_objext conftest$ac_exeext
24509if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 25706if { (ac_try="$ac_link"
24510 (eval $ac_link) 2>conftest.er1 25707case "(($ac_try" in
25708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25709 *) ac_try_echo=$ac_try;;
25710esac
25711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25712 (eval "$ac_link") 2>conftest.er1
24511 ac_status=$? 25713 ac_status=$?
24512 grep -v '^ *+' conftest.er1 >conftest.err 25714 grep -v '^ *+' conftest.er1 >conftest.err
24513 rm -f conftest.er1 25715 rm -f conftest.er1
24514 cat conftest.err >&5 25716 cat conftest.err >&5
24515 echo "$as_me:$LINENO: \$? = $ac_status" >&5 25717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24516 (exit $ac_status); } && 25718 (exit $ac_status); } && {
24517 { ac_try='test -z "$ac_c_werror_flag" 25719 test -z "$ac_c_werror_flag" ||
24518 || test ! -s conftest.err' 25720 test ! -s conftest.err
24519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 25721 } && test -s conftest$ac_exeext &&
24520 (eval $ac_try) 2>&5 25722 $as_test_x conftest$ac_exeext; then
24521 ac_status=$?
24522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24523 (exit $ac_status); }; } &&
24524 { ac_try='test -s conftest$ac_exeext'
24525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24526 (eval $ac_try) 2>&5
24527 ac_status=$?
24528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24529 (exit $ac_status); }; }; then
24530 ac_cv_lib_gssapi_gss_init_sec_context=yes 25723 ac_cv_lib_gssapi_gss_init_sec_context=yes
24531else 25724else
24532 echo "$as_me: failed program was:" >&5 25725 echo "$as_me: failed program was:" >&5
24533sed 's/^/| /' conftest.$ac_ext >&5 25726sed 's/^/| /' conftest.$ac_ext >&5
24534 25727
24535ac_cv_lib_gssapi_gss_init_sec_context=no 25728 ac_cv_lib_gssapi_gss_init_sec_context=no
24536fi 25729fi
24537rm -f conftest.err conftest.$ac_objext \ 25730
25731rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24538 conftest$ac_exeext conftest.$ac_ext 25732 conftest$ac_exeext conftest.$ac_ext
24539LIBS=$ac_check_lib_save_LIBS 25733LIBS=$ac_check_lib_save_LIBS
24540fi 25734fi
24541echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_gss_init_sec_context" >&5 25735{ echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_gss_init_sec_context" >&5
24542echo "${ECHO_T}$ac_cv_lib_gssapi_gss_init_sec_context" >&6 25736echo "${ECHO_T}$ac_cv_lib_gssapi_gss_init_sec_context" >&6; }
24543if test $ac_cv_lib_gssapi_gss_init_sec_context = yes; then 25737if test $ac_cv_lib_gssapi_gss_init_sec_context = yes; then
24544 cat >>confdefs.h <<\_ACEOF 25738 cat >>confdefs.h <<\_ACEOF
24545#define GSSAPI 1 25739#define GSSAPI 1
@@ -24547,8 +25741,8 @@ _ACEOF
24547 25741
24548 K5LIBS="-lgssapi $K5LIBS" 25742 K5LIBS="-lgssapi $K5LIBS"
24549else 25743else
24550 echo "$as_me:$LINENO: checking for gss_init_sec_context in -lgssapi_krb5" >&5 25744 { echo "$as_me:$LINENO: checking for gss_init_sec_context in -lgssapi_krb5" >&5
24551echo $ECHO_N "checking for gss_init_sec_context in -lgssapi_krb5... $ECHO_C" >&6 25745echo $ECHO_N "checking for gss_init_sec_context in -lgssapi_krb5... $ECHO_C" >&6; }
24552if test "${ac_cv_lib_gssapi_krb5_gss_init_sec_context+set}" = set; then 25746if test "${ac_cv_lib_gssapi_krb5_gss_init_sec_context+set}" = set; then
24553 echo $ECHO_N "(cached) $ECHO_C" >&6 25747 echo $ECHO_N "(cached) $ECHO_C" >&6
24554else 25748else
@@ -24561,56 +25755,53 @@ cat confdefs.h >>conftest.$ac_ext
24561cat >>conftest.$ac_ext <<_ACEOF 25755cat >>conftest.$ac_ext <<_ACEOF
24562/* end confdefs.h. */ 25756/* end confdefs.h. */
24563 25757
24564/* Override any gcc2 internal prototype to avoid an error. */ 25758/* Override any GCC internal prototype to avoid an error.
25759 Use char because int might match the return type of a GCC
25760 builtin and then its argument prototype would still apply. */
24565#ifdef __cplusplus 25761#ifdef __cplusplus
24566extern "C" 25762extern "C"
24567#endif 25763#endif
24568/* We use char because int might match the return type of a gcc2
24569 builtin and then its argument prototype would still apply. */
24570char gss_init_sec_context (); 25764char gss_init_sec_context ();
24571int 25765int
24572main () 25766main ()
24573{ 25767{
24574gss_init_sec_context (); 25768return gss_init_sec_context ();
24575 ; 25769 ;
24576 return 0; 25770 return 0;
24577} 25771}
24578_ACEOF 25772_ACEOF
24579rm -f conftest.$ac_objext conftest$ac_exeext 25773rm -f conftest.$ac_objext conftest$ac_exeext
24580if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 25774if { (ac_try="$ac_link"
24581 (eval $ac_link) 2>conftest.er1 25775case "(($ac_try" in
25776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25777 *) ac_try_echo=$ac_try;;
25778esac
25779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25780 (eval "$ac_link") 2>conftest.er1
24582 ac_status=$? 25781 ac_status=$?
24583 grep -v '^ *+' conftest.er1 >conftest.err 25782 grep -v '^ *+' conftest.er1 >conftest.err
24584 rm -f conftest.er1 25783 rm -f conftest.er1
24585 cat conftest.err >&5 25784 cat conftest.err >&5
24586 echo "$as_me:$LINENO: \$? = $ac_status" >&5 25785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24587 (exit $ac_status); } && 25786 (exit $ac_status); } && {
24588 { ac_try='test -z "$ac_c_werror_flag" 25787 test -z "$ac_c_werror_flag" ||
24589 || test ! -s conftest.err' 25788 test ! -s conftest.err
24590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 25789 } && test -s conftest$ac_exeext &&
24591 (eval $ac_try) 2>&5 25790 $as_test_x conftest$ac_exeext; then
24592 ac_status=$?
24593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24594 (exit $ac_status); }; } &&
24595 { ac_try='test -s conftest$ac_exeext'
24596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24597 (eval $ac_try) 2>&5
24598 ac_status=$?
24599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24600 (exit $ac_status); }; }; then
24601 ac_cv_lib_gssapi_krb5_gss_init_sec_context=yes 25791 ac_cv_lib_gssapi_krb5_gss_init_sec_context=yes
24602else 25792else
24603 echo "$as_me: failed program was:" >&5 25793 echo "$as_me: failed program was:" >&5
24604sed 's/^/| /' conftest.$ac_ext >&5 25794sed 's/^/| /' conftest.$ac_ext >&5
24605 25795
24606ac_cv_lib_gssapi_krb5_gss_init_sec_context=no 25796 ac_cv_lib_gssapi_krb5_gss_init_sec_context=no
24607fi 25797fi
24608rm -f conftest.err conftest.$ac_objext \ 25798
25799rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24609 conftest$ac_exeext conftest.$ac_ext 25800 conftest$ac_exeext conftest.$ac_ext
24610LIBS=$ac_check_lib_save_LIBS 25801LIBS=$ac_check_lib_save_LIBS
24611fi 25802fi
24612echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&5 25803{ echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&5
24613echo "${ECHO_T}$ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&6 25804echo "${ECHO_T}$ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&6; }
24614if test $ac_cv_lib_gssapi_krb5_gss_init_sec_context = yes; then 25805if test $ac_cv_lib_gssapi_krb5_gss_init_sec_context = yes; then
24615 cat >>confdefs.h <<\_ACEOF 25806 cat >>confdefs.h <<\_ACEOF
24616#define GSSAPI 1 25807#define GSSAPI 1
@@ -24627,17 +25818,17 @@ fi
24627 25818
24628 25819
24629 if test "${ac_cv_header_gssapi_h+set}" = set; then 25820 if test "${ac_cv_header_gssapi_h+set}" = set; then
24630 echo "$as_me:$LINENO: checking for gssapi.h" >&5 25821 { echo "$as_me:$LINENO: checking for gssapi.h" >&5
24631echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6 25822echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6; }
24632if test "${ac_cv_header_gssapi_h+set}" = set; then 25823if test "${ac_cv_header_gssapi_h+set}" = set; then
24633 echo $ECHO_N "(cached) $ECHO_C" >&6 25824 echo $ECHO_N "(cached) $ECHO_C" >&6
24634fi 25825fi
24635echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5 25826{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
24636echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6 25827echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6; }
24637else 25828else
24638 # Is the header compilable? 25829 # Is the header compilable?
24639echo "$as_me:$LINENO: checking gssapi.h usability" >&5 25830{ echo "$as_me:$LINENO: checking gssapi.h usability" >&5
24640echo $ECHO_N "checking gssapi.h usability... $ECHO_C" >&6 25831echo $ECHO_N "checking gssapi.h usability... $ECHO_C" >&6; }
24641cat >conftest.$ac_ext <<_ACEOF 25832cat >conftest.$ac_ext <<_ACEOF
24642/* confdefs.h. */ 25833/* confdefs.h. */
24643_ACEOF 25834_ACEOF
@@ -24648,41 +25839,37 @@ $ac_includes_default
24648#include <gssapi.h> 25839#include <gssapi.h>
24649_ACEOF 25840_ACEOF
24650rm -f conftest.$ac_objext 25841rm -f conftest.$ac_objext
24651if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 25842if { (ac_try="$ac_compile"
24652 (eval $ac_compile) 2>conftest.er1 25843case "(($ac_try" in
25844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25845 *) ac_try_echo=$ac_try;;
25846esac
25847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25848 (eval "$ac_compile") 2>conftest.er1
24653 ac_status=$? 25849 ac_status=$?
24654 grep -v '^ *+' conftest.er1 >conftest.err 25850 grep -v '^ *+' conftest.er1 >conftest.err
24655 rm -f conftest.er1 25851 rm -f conftest.er1
24656 cat conftest.err >&5 25852 cat conftest.err >&5
24657 echo "$as_me:$LINENO: \$? = $ac_status" >&5 25853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24658 (exit $ac_status); } && 25854 (exit $ac_status); } && {
24659 { ac_try='test -z "$ac_c_werror_flag" 25855 test -z "$ac_c_werror_flag" ||
24660 || test ! -s conftest.err' 25856 test ! -s conftest.err
24661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 25857 } && test -s conftest.$ac_objext; then
24662 (eval $ac_try) 2>&5
24663 ac_status=$?
24664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24665 (exit $ac_status); }; } &&
24666 { ac_try='test -s conftest.$ac_objext'
24667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24668 (eval $ac_try) 2>&5
24669 ac_status=$?
24670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24671 (exit $ac_status); }; }; then
24672 ac_header_compiler=yes 25858 ac_header_compiler=yes
24673else 25859else
24674 echo "$as_me: failed program was:" >&5 25860 echo "$as_me: failed program was:" >&5
24675sed 's/^/| /' conftest.$ac_ext >&5 25861sed 's/^/| /' conftest.$ac_ext >&5
24676 25862
24677ac_header_compiler=no 25863 ac_header_compiler=no
24678fi 25864fi
24679rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 25865
24680echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 25866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24681echo "${ECHO_T}$ac_header_compiler" >&6 25867{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25868echo "${ECHO_T}$ac_header_compiler" >&6; }
24682 25869
24683# Is the header present? 25870# Is the header present?
24684echo "$as_me:$LINENO: checking gssapi.h presence" >&5 25871{ echo "$as_me:$LINENO: checking gssapi.h presence" >&5
24685echo $ECHO_N "checking gssapi.h presence... $ECHO_C" >&6 25872echo $ECHO_N "checking gssapi.h presence... $ECHO_C" >&6; }
24686cat >conftest.$ac_ext <<_ACEOF 25873cat >conftest.$ac_ext <<_ACEOF
24687/* confdefs.h. */ 25874/* confdefs.h. */
24688_ACEOF 25875_ACEOF
@@ -24691,24 +25878,22 @@ cat >>conftest.$ac_ext <<_ACEOF
24691/* end confdefs.h. */ 25878/* end confdefs.h. */
24692#include <gssapi.h> 25879#include <gssapi.h>
24693_ACEOF 25880_ACEOF
24694if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 25881if { (ac_try="$ac_cpp conftest.$ac_ext"
24695 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 25882case "(($ac_try" in
25883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25884 *) ac_try_echo=$ac_try;;
25885esac
25886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25887 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
24696 ac_status=$? 25888 ac_status=$?
24697 grep -v '^ *+' conftest.er1 >conftest.err 25889 grep -v '^ *+' conftest.er1 >conftest.err
24698 rm -f conftest.er1 25890 rm -f conftest.er1
24699 cat conftest.err >&5 25891 cat conftest.err >&5
24700 echo "$as_me:$LINENO: \$? = $ac_status" >&5 25892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24701 (exit $ac_status); } >/dev/null; then 25893 (exit $ac_status); } >/dev/null && {
24702 if test -s conftest.err; then 25894 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24703 ac_cpp_err=$ac_c_preproc_warn_flag 25895 test ! -s conftest.err
24704 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 25896 }; then
24705 else
24706 ac_cpp_err=
24707 fi
24708else
24709 ac_cpp_err=yes
24710fi
24711if test -z "$ac_cpp_err"; then
24712 ac_header_preproc=yes 25897 ac_header_preproc=yes
24713else 25898else
24714 echo "$as_me: failed program was:" >&5 25899 echo "$as_me: failed program was:" >&5
@@ -24716,9 +25901,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
24716 25901
24717 ac_header_preproc=no 25902 ac_header_preproc=no
24718fi 25903fi
25904
24719rm -f conftest.err conftest.$ac_ext 25905rm -f conftest.err conftest.$ac_ext
24720echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 25906{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24721echo "${ECHO_T}$ac_header_preproc" >&6 25907echo "${ECHO_T}$ac_header_preproc" >&6; }
24722 25908
24723# So? What about this header? 25909# So? What about this header?
24724case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 25910case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -24742,25 +25928,23 @@ echo "$as_me: WARNING: gssapi.h: section \"Present But Cannot Be Compiled\""
24742echo "$as_me: WARNING: gssapi.h: proceeding with the preprocessor's result" >&2;} 25928echo "$as_me: WARNING: gssapi.h: proceeding with the preprocessor's result" >&2;}
24743 { echo "$as_me:$LINENO: WARNING: gssapi.h: in the future, the compiler will take precedence" >&5 25929 { echo "$as_me:$LINENO: WARNING: gssapi.h: in the future, the compiler will take precedence" >&5
24744echo "$as_me: WARNING: gssapi.h: in the future, the compiler will take precedence" >&2;} 25930echo "$as_me: WARNING: gssapi.h: in the future, the compiler will take precedence" >&2;}
24745 ( 25931 ( cat <<\_ASBOX
24746 cat <<\_ASBOX
24747## ------------------------------------------- ## 25932## ------------------------------------------- ##
24748## Report this to openssh-unix-dev@mindrot.org ## 25933## Report this to openssh-unix-dev@mindrot.org ##
24749## ------------------------------------------- ## 25934## ------------------------------------------- ##
24750_ASBOX 25935_ASBOX
24751 ) | 25936 ) | sed "s/^/$as_me: WARNING: /" >&2
24752 sed "s/^/$as_me: WARNING: /" >&2
24753 ;; 25937 ;;
24754esac 25938esac
24755echo "$as_me:$LINENO: checking for gssapi.h" >&5 25939{ echo "$as_me:$LINENO: checking for gssapi.h" >&5
24756echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6 25940echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6; }
24757if test "${ac_cv_header_gssapi_h+set}" = set; then 25941if test "${ac_cv_header_gssapi_h+set}" = set; then
24758 echo $ECHO_N "(cached) $ECHO_C" >&6 25942 echo $ECHO_N "(cached) $ECHO_C" >&6
24759else 25943else
24760 ac_cv_header_gssapi_h=$ac_header_preproc 25944 ac_cv_header_gssapi_h=$ac_header_preproc
24761fi 25945fi
24762echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5 25946{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
24763echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6 25947echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6; }
24764 25948
24765fi 25949fi
24766if test $ac_cv_header_gssapi_h = yes; then 25950if test $ac_cv_header_gssapi_h = yes; then
@@ -24772,18 +25956,19 @@ else
24772for ac_header in gssapi.h 25956for ac_header in gssapi.h
24773do 25957do
24774as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 25958as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24775if eval "test \"\${$as_ac_Header+set}\" = set"; then 25959if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
24776 echo "$as_me:$LINENO: checking for $ac_header" >&5 25960 { echo "$as_me:$LINENO: checking for $ac_header" >&5
24777echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 25961echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
24778if eval "test \"\${$as_ac_Header+set}\" = set"; then 25962if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
24779 echo $ECHO_N "(cached) $ECHO_C" >&6 25963 echo $ECHO_N "(cached) $ECHO_C" >&6
24780fi 25964fi
24781echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 25965ac_res=`eval echo '${'$as_ac_Header'}'`
24782echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 25966 { echo "$as_me:$LINENO: result: $ac_res" >&5
25967echo "${ECHO_T}$ac_res" >&6; }
24783else 25968else
24784 # Is the header compilable? 25969 # Is the header compilable?
24785echo "$as_me:$LINENO: checking $ac_header usability" >&5 25970{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
24786echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 25971echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
24787cat >conftest.$ac_ext <<_ACEOF 25972cat >conftest.$ac_ext <<_ACEOF
24788/* confdefs.h. */ 25973/* confdefs.h. */
24789_ACEOF 25974_ACEOF
@@ -24794,41 +25979,37 @@ $ac_includes_default
24794#include <$ac_header> 25979#include <$ac_header>
24795_ACEOF 25980_ACEOF
24796rm -f conftest.$ac_objext 25981rm -f conftest.$ac_objext
24797if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 25982if { (ac_try="$ac_compile"
24798 (eval $ac_compile) 2>conftest.er1 25983case "(($ac_try" in
25984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25985 *) ac_try_echo=$ac_try;;
25986esac
25987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25988 (eval "$ac_compile") 2>conftest.er1
24799 ac_status=$? 25989 ac_status=$?
24800 grep -v '^ *+' conftest.er1 >conftest.err 25990 grep -v '^ *+' conftest.er1 >conftest.err
24801 rm -f conftest.er1 25991 rm -f conftest.er1
24802 cat conftest.err >&5 25992 cat conftest.err >&5
24803 echo "$as_me:$LINENO: \$? = $ac_status" >&5 25993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24804 (exit $ac_status); } && 25994 (exit $ac_status); } && {
24805 { ac_try='test -z "$ac_c_werror_flag" 25995 test -z "$ac_c_werror_flag" ||
24806 || test ! -s conftest.err' 25996 test ! -s conftest.err
24807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 25997 } && test -s conftest.$ac_objext; then
24808 (eval $ac_try) 2>&5
24809 ac_status=$?
24810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24811 (exit $ac_status); }; } &&
24812 { ac_try='test -s conftest.$ac_objext'
24813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24814 (eval $ac_try) 2>&5
24815 ac_status=$?
24816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24817 (exit $ac_status); }; }; then
24818 ac_header_compiler=yes 25998 ac_header_compiler=yes
24819else 25999else
24820 echo "$as_me: failed program was:" >&5 26000 echo "$as_me: failed program was:" >&5
24821sed 's/^/| /' conftest.$ac_ext >&5 26001sed 's/^/| /' conftest.$ac_ext >&5
24822 26002
24823ac_header_compiler=no 26003 ac_header_compiler=no
24824fi 26004fi
24825rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 26005
24826echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 26006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24827echo "${ECHO_T}$ac_header_compiler" >&6 26007{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26008echo "${ECHO_T}$ac_header_compiler" >&6; }
24828 26009
24829# Is the header present? 26010# Is the header present?
24830echo "$as_me:$LINENO: checking $ac_header presence" >&5 26011{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
24831echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 26012echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
24832cat >conftest.$ac_ext <<_ACEOF 26013cat >conftest.$ac_ext <<_ACEOF
24833/* confdefs.h. */ 26014/* confdefs.h. */
24834_ACEOF 26015_ACEOF
@@ -24837,24 +26018,22 @@ cat >>conftest.$ac_ext <<_ACEOF
24837/* end confdefs.h. */ 26018/* end confdefs.h. */
24838#include <$ac_header> 26019#include <$ac_header>
24839_ACEOF 26020_ACEOF
24840if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 26021if { (ac_try="$ac_cpp conftest.$ac_ext"
24841 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 26022case "(($ac_try" in
26023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26024 *) ac_try_echo=$ac_try;;
26025esac
26026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26027 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
24842 ac_status=$? 26028 ac_status=$?
24843 grep -v '^ *+' conftest.er1 >conftest.err 26029 grep -v '^ *+' conftest.er1 >conftest.err
24844 rm -f conftest.er1 26030 rm -f conftest.er1
24845 cat conftest.err >&5 26031 cat conftest.err >&5
24846 echo "$as_me:$LINENO: \$? = $ac_status" >&5 26032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24847 (exit $ac_status); } >/dev/null; then 26033 (exit $ac_status); } >/dev/null && {
24848 if test -s conftest.err; then 26034 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24849 ac_cpp_err=$ac_c_preproc_warn_flag 26035 test ! -s conftest.err
24850 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 26036 }; then
24851 else
24852 ac_cpp_err=
24853 fi
24854else
24855 ac_cpp_err=yes
24856fi
24857if test -z "$ac_cpp_err"; then
24858 ac_header_preproc=yes 26037 ac_header_preproc=yes
24859else 26038else
24860 echo "$as_me: failed program was:" >&5 26039 echo "$as_me: failed program was:" >&5
@@ -24862,9 +26041,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
24862 26041
24863 ac_header_preproc=no 26042 ac_header_preproc=no
24864fi 26043fi
26044
24865rm -f conftest.err conftest.$ac_ext 26045rm -f conftest.err conftest.$ac_ext
24866echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 26046{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24867echo "${ECHO_T}$ac_header_preproc" >&6 26047echo "${ECHO_T}$ac_header_preproc" >&6; }
24868 26048
24869# So? What about this header? 26049# So? What about this header?
24870case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 26050case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -24888,25 +26068,24 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
24888echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 26068echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
24889 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 26069 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
24890echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 26070echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
24891 ( 26071 ( cat <<\_ASBOX
24892 cat <<\_ASBOX
24893## ------------------------------------------- ## 26072## ------------------------------------------- ##
24894## Report this to openssh-unix-dev@mindrot.org ## 26073## Report this to openssh-unix-dev@mindrot.org ##
24895## ------------------------------------------- ## 26074## ------------------------------------------- ##
24896_ASBOX 26075_ASBOX
24897 ) | 26076 ) | sed "s/^/$as_me: WARNING: /" >&2
24898 sed "s/^/$as_me: WARNING: /" >&2
24899 ;; 26077 ;;
24900esac 26078esac
24901echo "$as_me:$LINENO: checking for $ac_header" >&5 26079{ echo "$as_me:$LINENO: checking for $ac_header" >&5
24902echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 26080echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
24903if eval "test \"\${$as_ac_Header+set}\" = set"; then 26081if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
24904 echo $ECHO_N "(cached) $ECHO_C" >&6 26082 echo $ECHO_N "(cached) $ECHO_C" >&6
24905else 26083else
24906 eval "$as_ac_Header=\$ac_header_preproc" 26084 eval "$as_ac_Header=\$ac_header_preproc"
24907fi 26085fi
24908echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 26086ac_res=`eval echo '${'$as_ac_Header'}'`
24909echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 26087 { echo "$as_me:$LINENO: result: $ac_res" >&5
26088echo "${ECHO_T}$ac_res" >&6; }
24910 26089
24911fi 26090fi
24912if test `eval echo '${'$as_ac_Header'}'` = yes; then 26091if test `eval echo '${'$as_ac_Header'}'` = yes; then
@@ -24931,17 +26110,17 @@ fi
24931 oldCPP="$CPPFLAGS" 26110 oldCPP="$CPPFLAGS"
24932 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi" 26111 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
24933 if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then 26112 if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then
24934 echo "$as_me:$LINENO: checking for gssapi_krb5.h" >&5 26113 { echo "$as_me:$LINENO: checking for gssapi_krb5.h" >&5
24935echo $ECHO_N "checking for gssapi_krb5.h... $ECHO_C" >&6 26114echo $ECHO_N "checking for gssapi_krb5.h... $ECHO_C" >&6; }
24936if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then 26115if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then
24937 echo $ECHO_N "(cached) $ECHO_C" >&6 26116 echo $ECHO_N "(cached) $ECHO_C" >&6
24938fi 26117fi
24939echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_krb5_h" >&5 26118{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_krb5_h" >&5
24940echo "${ECHO_T}$ac_cv_header_gssapi_krb5_h" >&6 26119echo "${ECHO_T}$ac_cv_header_gssapi_krb5_h" >&6; }
24941else 26120else
24942 # Is the header compilable? 26121 # Is the header compilable?
24943echo "$as_me:$LINENO: checking gssapi_krb5.h usability" >&5 26122{ echo "$as_me:$LINENO: checking gssapi_krb5.h usability" >&5
24944echo $ECHO_N "checking gssapi_krb5.h usability... $ECHO_C" >&6 26123echo $ECHO_N "checking gssapi_krb5.h usability... $ECHO_C" >&6; }
24945cat >conftest.$ac_ext <<_ACEOF 26124cat >conftest.$ac_ext <<_ACEOF
24946/* confdefs.h. */ 26125/* confdefs.h. */
24947_ACEOF 26126_ACEOF
@@ -24952,41 +26131,37 @@ $ac_includes_default
24952#include <gssapi_krb5.h> 26131#include <gssapi_krb5.h>
24953_ACEOF 26132_ACEOF
24954rm -f conftest.$ac_objext 26133rm -f conftest.$ac_objext
24955if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 26134if { (ac_try="$ac_compile"
24956 (eval $ac_compile) 2>conftest.er1 26135case "(($ac_try" in
26136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26137 *) ac_try_echo=$ac_try;;
26138esac
26139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26140 (eval "$ac_compile") 2>conftest.er1
24957 ac_status=$? 26141 ac_status=$?
24958 grep -v '^ *+' conftest.er1 >conftest.err 26142 grep -v '^ *+' conftest.er1 >conftest.err
24959 rm -f conftest.er1 26143 rm -f conftest.er1
24960 cat conftest.err >&5 26144 cat conftest.err >&5
24961 echo "$as_me:$LINENO: \$? = $ac_status" >&5 26145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24962 (exit $ac_status); } && 26146 (exit $ac_status); } && {
24963 { ac_try='test -z "$ac_c_werror_flag" 26147 test -z "$ac_c_werror_flag" ||
24964 || test ! -s conftest.err' 26148 test ! -s conftest.err
24965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 26149 } && test -s conftest.$ac_objext; then
24966 (eval $ac_try) 2>&5
24967 ac_status=$?
24968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24969 (exit $ac_status); }; } &&
24970 { ac_try='test -s conftest.$ac_objext'
24971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24972 (eval $ac_try) 2>&5
24973 ac_status=$?
24974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24975 (exit $ac_status); }; }; then
24976 ac_header_compiler=yes 26150 ac_header_compiler=yes
24977else 26151else
24978 echo "$as_me: failed program was:" >&5 26152 echo "$as_me: failed program was:" >&5
24979sed 's/^/| /' conftest.$ac_ext >&5 26153sed 's/^/| /' conftest.$ac_ext >&5
24980 26154
24981ac_header_compiler=no 26155 ac_header_compiler=no
24982fi 26156fi
24983rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 26157
24984echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 26158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24985echo "${ECHO_T}$ac_header_compiler" >&6 26159{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26160echo "${ECHO_T}$ac_header_compiler" >&6; }
24986 26161
24987# Is the header present? 26162# Is the header present?
24988echo "$as_me:$LINENO: checking gssapi_krb5.h presence" >&5 26163{ echo "$as_me:$LINENO: checking gssapi_krb5.h presence" >&5
24989echo $ECHO_N "checking gssapi_krb5.h presence... $ECHO_C" >&6 26164echo $ECHO_N "checking gssapi_krb5.h presence... $ECHO_C" >&6; }
24990cat >conftest.$ac_ext <<_ACEOF 26165cat >conftest.$ac_ext <<_ACEOF
24991/* confdefs.h. */ 26166/* confdefs.h. */
24992_ACEOF 26167_ACEOF
@@ -24995,24 +26170,22 @@ cat >>conftest.$ac_ext <<_ACEOF
24995/* end confdefs.h. */ 26170/* end confdefs.h. */
24996#include <gssapi_krb5.h> 26171#include <gssapi_krb5.h>
24997_ACEOF 26172_ACEOF
24998if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 26173if { (ac_try="$ac_cpp conftest.$ac_ext"
24999 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 26174case "(($ac_try" in
26175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26176 *) ac_try_echo=$ac_try;;
26177esac
26178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26179 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
25000 ac_status=$? 26180 ac_status=$?
25001 grep -v '^ *+' conftest.er1 >conftest.err 26181 grep -v '^ *+' conftest.er1 >conftest.err
25002 rm -f conftest.er1 26182 rm -f conftest.er1
25003 cat conftest.err >&5 26183 cat conftest.err >&5
25004 echo "$as_me:$LINENO: \$? = $ac_status" >&5 26184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25005 (exit $ac_status); } >/dev/null; then 26185 (exit $ac_status); } >/dev/null && {
25006 if test -s conftest.err; then 26186 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25007 ac_cpp_err=$ac_c_preproc_warn_flag 26187 test ! -s conftest.err
25008 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 26188 }; then
25009 else
25010 ac_cpp_err=
25011 fi
25012else
25013 ac_cpp_err=yes
25014fi
25015if test -z "$ac_cpp_err"; then
25016 ac_header_preproc=yes 26189 ac_header_preproc=yes
25017else 26190else
25018 echo "$as_me: failed program was:" >&5 26191 echo "$as_me: failed program was:" >&5
@@ -25020,9 +26193,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
25020 26193
25021 ac_header_preproc=no 26194 ac_header_preproc=no
25022fi 26195fi
26196
25023rm -f conftest.err conftest.$ac_ext 26197rm -f conftest.err conftest.$ac_ext
25024echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 26198{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25025echo "${ECHO_T}$ac_header_preproc" >&6 26199echo "${ECHO_T}$ac_header_preproc" >&6; }
25026 26200
25027# So? What about this header? 26201# So? What about this header?
25028case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 26202case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -25046,25 +26220,23 @@ echo "$as_me: WARNING: gssapi_krb5.h: section \"Present But Cannot Be Compil
25046echo "$as_me: WARNING: gssapi_krb5.h: proceeding with the preprocessor's result" >&2;} 26220echo "$as_me: WARNING: gssapi_krb5.h: proceeding with the preprocessor's result" >&2;}
25047 { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: in the future, the compiler will take precedence" >&5 26221 { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: in the future, the compiler will take precedence" >&5
25048echo "$as_me: WARNING: gssapi_krb5.h: in the future, the compiler will take precedence" >&2;} 26222echo "$as_me: WARNING: gssapi_krb5.h: in the future, the compiler will take precedence" >&2;}
25049 ( 26223 ( cat <<\_ASBOX
25050 cat <<\_ASBOX
25051## ------------------------------------------- ## 26224## ------------------------------------------- ##
25052## Report this to openssh-unix-dev@mindrot.org ## 26225## Report this to openssh-unix-dev@mindrot.org ##
25053## ------------------------------------------- ## 26226## ------------------------------------------- ##
25054_ASBOX 26227_ASBOX
25055 ) | 26228 ) | sed "s/^/$as_me: WARNING: /" >&2
25056 sed "s/^/$as_me: WARNING: /" >&2
25057 ;; 26229 ;;
25058esac 26230esac
25059echo "$as_me:$LINENO: checking for gssapi_krb5.h" >&5 26231{ echo "$as_me:$LINENO: checking for gssapi_krb5.h" >&5
25060echo $ECHO_N "checking for gssapi_krb5.h... $ECHO_C" >&6 26232echo $ECHO_N "checking for gssapi_krb5.h... $ECHO_C" >&6; }
25061if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then 26233if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then
25062 echo $ECHO_N "(cached) $ECHO_C" >&6 26234 echo $ECHO_N "(cached) $ECHO_C" >&6
25063else 26235else
25064 ac_cv_header_gssapi_krb5_h=$ac_header_preproc 26236 ac_cv_header_gssapi_krb5_h=$ac_header_preproc
25065fi 26237fi
25066echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_krb5_h" >&5 26238{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_krb5_h" >&5
25067echo "${ECHO_T}$ac_cv_header_gssapi_krb5_h" >&6 26239echo "${ECHO_T}$ac_cv_header_gssapi_krb5_h" >&6; }
25068 26240
25069fi 26241fi
25070if test $ac_cv_header_gssapi_krb5_h = yes; then 26242if test $ac_cv_header_gssapi_krb5_h = yes; then
@@ -25088,18 +26260,19 @@ fi
25088for ac_header in gssapi.h gssapi/gssapi.h 26260for ac_header in gssapi.h gssapi/gssapi.h
25089do 26261do
25090as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 26262as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25091if eval "test \"\${$as_ac_Header+set}\" = set"; then 26263if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
25092 echo "$as_me:$LINENO: checking for $ac_header" >&5 26264 { echo "$as_me:$LINENO: checking for $ac_header" >&5
25093echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 26265echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
25094if eval "test \"\${$as_ac_Header+set}\" = set"; then 26266if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
25095 echo $ECHO_N "(cached) $ECHO_C" >&6 26267 echo $ECHO_N "(cached) $ECHO_C" >&6
25096fi 26268fi
25097echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 26269ac_res=`eval echo '${'$as_ac_Header'}'`
25098echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 26270 { echo "$as_me:$LINENO: result: $ac_res" >&5
26271echo "${ECHO_T}$ac_res" >&6; }
25099else 26272else
25100 # Is the header compilable? 26273 # Is the header compilable?
25101echo "$as_me:$LINENO: checking $ac_header usability" >&5 26274{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
25102echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 26275echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
25103cat >conftest.$ac_ext <<_ACEOF 26276cat >conftest.$ac_ext <<_ACEOF
25104/* confdefs.h. */ 26277/* confdefs.h. */
25105_ACEOF 26278_ACEOF
@@ -25110,41 +26283,37 @@ $ac_includes_default
25110#include <$ac_header> 26283#include <$ac_header>
25111_ACEOF 26284_ACEOF
25112rm -f conftest.$ac_objext 26285rm -f conftest.$ac_objext
25113if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 26286if { (ac_try="$ac_compile"
25114 (eval $ac_compile) 2>conftest.er1 26287case "(($ac_try" in
26288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26289 *) ac_try_echo=$ac_try;;
26290esac
26291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26292 (eval "$ac_compile") 2>conftest.er1
25115 ac_status=$? 26293 ac_status=$?
25116 grep -v '^ *+' conftest.er1 >conftest.err 26294 grep -v '^ *+' conftest.er1 >conftest.err
25117 rm -f conftest.er1 26295 rm -f conftest.er1
25118 cat conftest.err >&5 26296 cat conftest.err >&5
25119 echo "$as_me:$LINENO: \$? = $ac_status" >&5 26297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25120 (exit $ac_status); } && 26298 (exit $ac_status); } && {
25121 { ac_try='test -z "$ac_c_werror_flag" 26299 test -z "$ac_c_werror_flag" ||
25122 || test ! -s conftest.err' 26300 test ! -s conftest.err
25123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 26301 } && test -s conftest.$ac_objext; then
25124 (eval $ac_try) 2>&5
25125 ac_status=$?
25126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25127 (exit $ac_status); }; } &&
25128 { ac_try='test -s conftest.$ac_objext'
25129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25130 (eval $ac_try) 2>&5
25131 ac_status=$?
25132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25133 (exit $ac_status); }; }; then
25134 ac_header_compiler=yes 26302 ac_header_compiler=yes
25135else 26303else
25136 echo "$as_me: failed program was:" >&5 26304 echo "$as_me: failed program was:" >&5
25137sed 's/^/| /' conftest.$ac_ext >&5 26305sed 's/^/| /' conftest.$ac_ext >&5
25138 26306
25139ac_header_compiler=no 26307 ac_header_compiler=no
25140fi 26308fi
25141rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 26309
25142echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 26310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25143echo "${ECHO_T}$ac_header_compiler" >&6 26311{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26312echo "${ECHO_T}$ac_header_compiler" >&6; }
25144 26313
25145# Is the header present? 26314# Is the header present?
25146echo "$as_me:$LINENO: checking $ac_header presence" >&5 26315{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
25147echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 26316echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
25148cat >conftest.$ac_ext <<_ACEOF 26317cat >conftest.$ac_ext <<_ACEOF
25149/* confdefs.h. */ 26318/* confdefs.h. */
25150_ACEOF 26319_ACEOF
@@ -25153,24 +26322,22 @@ cat >>conftest.$ac_ext <<_ACEOF
25153/* end confdefs.h. */ 26322/* end confdefs.h. */
25154#include <$ac_header> 26323#include <$ac_header>
25155_ACEOF 26324_ACEOF
25156if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 26325if { (ac_try="$ac_cpp conftest.$ac_ext"
25157 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 26326case "(($ac_try" in
26327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26328 *) ac_try_echo=$ac_try;;
26329esac
26330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26331 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
25158 ac_status=$? 26332 ac_status=$?
25159 grep -v '^ *+' conftest.er1 >conftest.err 26333 grep -v '^ *+' conftest.er1 >conftest.err
25160 rm -f conftest.er1 26334 rm -f conftest.er1
25161 cat conftest.err >&5 26335 cat conftest.err >&5
25162 echo "$as_me:$LINENO: \$? = $ac_status" >&5 26336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25163 (exit $ac_status); } >/dev/null; then 26337 (exit $ac_status); } >/dev/null && {
25164 if test -s conftest.err; then 26338 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25165 ac_cpp_err=$ac_c_preproc_warn_flag 26339 test ! -s conftest.err
25166 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 26340 }; then
25167 else
25168 ac_cpp_err=
25169 fi
25170else
25171 ac_cpp_err=yes
25172fi
25173if test -z "$ac_cpp_err"; then
25174 ac_header_preproc=yes 26341 ac_header_preproc=yes
25175else 26342else
25176 echo "$as_me: failed program was:" >&5 26343 echo "$as_me: failed program was:" >&5
@@ -25178,9 +26345,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
25178 26345
25179 ac_header_preproc=no 26346 ac_header_preproc=no
25180fi 26347fi
26348
25181rm -f conftest.err conftest.$ac_ext 26349rm -f conftest.err conftest.$ac_ext
25182echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 26350{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25183echo "${ECHO_T}$ac_header_preproc" >&6 26351echo "${ECHO_T}$ac_header_preproc" >&6; }
25184 26352
25185# So? What about this header? 26353# So? What about this header?
25186case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 26354case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -25204,25 +26372,24 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
25204echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 26372echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25205 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 26373 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25206echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 26374echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25207 ( 26375 ( cat <<\_ASBOX
25208 cat <<\_ASBOX
25209## ------------------------------------------- ## 26376## ------------------------------------------- ##
25210## Report this to openssh-unix-dev@mindrot.org ## 26377## Report this to openssh-unix-dev@mindrot.org ##
25211## ------------------------------------------- ## 26378## ------------------------------------------- ##
25212_ASBOX 26379_ASBOX
25213 ) | 26380 ) | sed "s/^/$as_me: WARNING: /" >&2
25214 sed "s/^/$as_me: WARNING: /" >&2
25215 ;; 26381 ;;
25216esac 26382esac
25217echo "$as_me:$LINENO: checking for $ac_header" >&5 26383{ echo "$as_me:$LINENO: checking for $ac_header" >&5
25218echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 26384echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
25219if eval "test \"\${$as_ac_Header+set}\" = set"; then 26385if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
25220 echo $ECHO_N "(cached) $ECHO_C" >&6 26386 echo $ECHO_N "(cached) $ECHO_C" >&6
25221else 26387else
25222 eval "$as_ac_Header=\$ac_header_preproc" 26388 eval "$as_ac_Header=\$ac_header_preproc"
25223fi 26389fi
25224echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 26390ac_res=`eval echo '${'$as_ac_Header'}'`
25225echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 26391 { echo "$as_me:$LINENO: result: $ac_res" >&5
26392echo "${ECHO_T}$ac_res" >&6; }
25226 26393
25227fi 26394fi
25228if test `eval echo '${'$as_ac_Header'}'` = yes; then 26395if test `eval echo '${'$as_ac_Header'}'` = yes; then
@@ -25239,18 +26406,19 @@ done
25239for ac_header in gssapi_krb5.h gssapi/gssapi_krb5.h 26406for ac_header in gssapi_krb5.h gssapi/gssapi_krb5.h
25240do 26407do
25241as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 26408as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25242if eval "test \"\${$as_ac_Header+set}\" = set"; then 26409if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
25243 echo "$as_me:$LINENO: checking for $ac_header" >&5 26410 { echo "$as_me:$LINENO: checking for $ac_header" >&5
25244echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 26411echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
25245if eval "test \"\${$as_ac_Header+set}\" = set"; then 26412if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
25246 echo $ECHO_N "(cached) $ECHO_C" >&6 26413 echo $ECHO_N "(cached) $ECHO_C" >&6
25247fi 26414fi
25248echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 26415ac_res=`eval echo '${'$as_ac_Header'}'`
25249echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 26416 { echo "$as_me:$LINENO: result: $ac_res" >&5
26417echo "${ECHO_T}$ac_res" >&6; }
25250else 26418else
25251 # Is the header compilable? 26419 # Is the header compilable?
25252echo "$as_me:$LINENO: checking $ac_header usability" >&5 26420{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
25253echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 26421echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
25254cat >conftest.$ac_ext <<_ACEOF 26422cat >conftest.$ac_ext <<_ACEOF
25255/* confdefs.h. */ 26423/* confdefs.h. */
25256_ACEOF 26424_ACEOF
@@ -25261,41 +26429,37 @@ $ac_includes_default
25261#include <$ac_header> 26429#include <$ac_header>
25262_ACEOF 26430_ACEOF
25263rm -f conftest.$ac_objext 26431rm -f conftest.$ac_objext
25264if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 26432if { (ac_try="$ac_compile"
25265 (eval $ac_compile) 2>conftest.er1 26433case "(($ac_try" in
26434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26435 *) ac_try_echo=$ac_try;;
26436esac
26437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26438 (eval "$ac_compile") 2>conftest.er1
25266 ac_status=$? 26439 ac_status=$?
25267 grep -v '^ *+' conftest.er1 >conftest.err 26440 grep -v '^ *+' conftest.er1 >conftest.err
25268 rm -f conftest.er1 26441 rm -f conftest.er1
25269 cat conftest.err >&5 26442 cat conftest.err >&5
25270 echo "$as_me:$LINENO: \$? = $ac_status" >&5 26443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25271 (exit $ac_status); } && 26444 (exit $ac_status); } && {
25272 { ac_try='test -z "$ac_c_werror_flag" 26445 test -z "$ac_c_werror_flag" ||
25273 || test ! -s conftest.err' 26446 test ! -s conftest.err
25274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 26447 } && test -s conftest.$ac_objext; then
25275 (eval $ac_try) 2>&5
25276 ac_status=$?
25277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25278 (exit $ac_status); }; } &&
25279 { ac_try='test -s conftest.$ac_objext'
25280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25281 (eval $ac_try) 2>&5
25282 ac_status=$?
25283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25284 (exit $ac_status); }; }; then
25285 ac_header_compiler=yes 26448 ac_header_compiler=yes
25286else 26449else
25287 echo "$as_me: failed program was:" >&5 26450 echo "$as_me: failed program was:" >&5
25288sed 's/^/| /' conftest.$ac_ext >&5 26451sed 's/^/| /' conftest.$ac_ext >&5
25289 26452
25290ac_header_compiler=no 26453 ac_header_compiler=no
25291fi 26454fi
25292rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 26455
25293echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 26456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25294echo "${ECHO_T}$ac_header_compiler" >&6 26457{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26458echo "${ECHO_T}$ac_header_compiler" >&6; }
25295 26459
25296# Is the header present? 26460# Is the header present?
25297echo "$as_me:$LINENO: checking $ac_header presence" >&5 26461{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
25298echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 26462echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
25299cat >conftest.$ac_ext <<_ACEOF 26463cat >conftest.$ac_ext <<_ACEOF
25300/* confdefs.h. */ 26464/* confdefs.h. */
25301_ACEOF 26465_ACEOF
@@ -25304,24 +26468,22 @@ cat >>conftest.$ac_ext <<_ACEOF
25304/* end confdefs.h. */ 26468/* end confdefs.h. */
25305#include <$ac_header> 26469#include <$ac_header>
25306_ACEOF 26470_ACEOF
25307if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 26471if { (ac_try="$ac_cpp conftest.$ac_ext"
25308 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 26472case "(($ac_try" in
26473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26474 *) ac_try_echo=$ac_try;;
26475esac
26476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26477 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
25309 ac_status=$? 26478 ac_status=$?
25310 grep -v '^ *+' conftest.er1 >conftest.err 26479 grep -v '^ *+' conftest.er1 >conftest.err
25311 rm -f conftest.er1 26480 rm -f conftest.er1
25312 cat conftest.err >&5 26481 cat conftest.err >&5
25313 echo "$as_me:$LINENO: \$? = $ac_status" >&5 26482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25314 (exit $ac_status); } >/dev/null; then 26483 (exit $ac_status); } >/dev/null && {
25315 if test -s conftest.err; then 26484 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25316 ac_cpp_err=$ac_c_preproc_warn_flag 26485 test ! -s conftest.err
25317 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 26486 }; then
25318 else
25319 ac_cpp_err=
25320 fi
25321else
25322 ac_cpp_err=yes
25323fi
25324if test -z "$ac_cpp_err"; then
25325 ac_header_preproc=yes 26487 ac_header_preproc=yes
25326else 26488else
25327 echo "$as_me: failed program was:" >&5 26489 echo "$as_me: failed program was:" >&5
@@ -25329,9 +26491,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
25329 26491
25330 ac_header_preproc=no 26492 ac_header_preproc=no
25331fi 26493fi
26494
25332rm -f conftest.err conftest.$ac_ext 26495rm -f conftest.err conftest.$ac_ext
25333echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 26496{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25334echo "${ECHO_T}$ac_header_preproc" >&6 26497echo "${ECHO_T}$ac_header_preproc" >&6; }
25335 26498
25336# So? What about this header? 26499# So? What about this header?
25337case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 26500case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -25355,25 +26518,24 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
25355echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 26518echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25356 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 26519 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25357echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 26520echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25358 ( 26521 ( cat <<\_ASBOX
25359 cat <<\_ASBOX
25360## ------------------------------------------- ## 26522## ------------------------------------------- ##
25361## Report this to openssh-unix-dev@mindrot.org ## 26523## Report this to openssh-unix-dev@mindrot.org ##
25362## ------------------------------------------- ## 26524## ------------------------------------------- ##
25363_ASBOX 26525_ASBOX
25364 ) | 26526 ) | sed "s/^/$as_me: WARNING: /" >&2
25365 sed "s/^/$as_me: WARNING: /" >&2
25366 ;; 26527 ;;
25367esac 26528esac
25368echo "$as_me:$LINENO: checking for $ac_header" >&5 26529{ echo "$as_me:$LINENO: checking for $ac_header" >&5
25369echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 26530echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
25370if eval "test \"\${$as_ac_Header+set}\" = set"; then 26531if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
25371 echo $ECHO_N "(cached) $ECHO_C" >&6 26532 echo $ECHO_N "(cached) $ECHO_C" >&6
25372else 26533else
25373 eval "$as_ac_Header=\$ac_header_preproc" 26534 eval "$as_ac_Header=\$ac_header_preproc"
25374fi 26535fi
25375echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 26536ac_res=`eval echo '${'$as_ac_Header'}'`
25376echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 26537 { echo "$as_me:$LINENO: result: $ac_res" >&5
26538echo "${ECHO_T}$ac_res" >&6; }
25377 26539
25378fi 26540fi
25379if test `eval echo '${'$as_ac_Header'}'` = yes; then 26541if test `eval echo '${'$as_ac_Header'}'` = yes; then
@@ -25390,18 +26552,19 @@ done
25390for ac_header in gssapi_generic.h gssapi/gssapi_generic.h 26552for ac_header in gssapi_generic.h gssapi/gssapi_generic.h
25391do 26553do
25392as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 26554as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25393if eval "test \"\${$as_ac_Header+set}\" = set"; then 26555if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
25394 echo "$as_me:$LINENO: checking for $ac_header" >&5 26556 { echo "$as_me:$LINENO: checking for $ac_header" >&5
25395echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 26557echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
25396if eval "test \"\${$as_ac_Header+set}\" = set"; then 26558if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
25397 echo $ECHO_N "(cached) $ECHO_C" >&6 26559 echo $ECHO_N "(cached) $ECHO_C" >&6
25398fi 26560fi
25399echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 26561ac_res=`eval echo '${'$as_ac_Header'}'`
25400echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 26562 { echo "$as_me:$LINENO: result: $ac_res" >&5
26563echo "${ECHO_T}$ac_res" >&6; }
25401else 26564else
25402 # Is the header compilable? 26565 # Is the header compilable?
25403echo "$as_me:$LINENO: checking $ac_header usability" >&5 26566{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
25404echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 26567echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
25405cat >conftest.$ac_ext <<_ACEOF 26568cat >conftest.$ac_ext <<_ACEOF
25406/* confdefs.h. */ 26569/* confdefs.h. */
25407_ACEOF 26570_ACEOF
@@ -25412,41 +26575,37 @@ $ac_includes_default
25412#include <$ac_header> 26575#include <$ac_header>
25413_ACEOF 26576_ACEOF
25414rm -f conftest.$ac_objext 26577rm -f conftest.$ac_objext
25415if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 26578if { (ac_try="$ac_compile"
25416 (eval $ac_compile) 2>conftest.er1 26579case "(($ac_try" in
26580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26581 *) ac_try_echo=$ac_try;;
26582esac
26583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26584 (eval "$ac_compile") 2>conftest.er1
25417 ac_status=$? 26585 ac_status=$?
25418 grep -v '^ *+' conftest.er1 >conftest.err 26586 grep -v '^ *+' conftest.er1 >conftest.err
25419 rm -f conftest.er1 26587 rm -f conftest.er1
25420 cat conftest.err >&5 26588 cat conftest.err >&5
25421 echo "$as_me:$LINENO: \$? = $ac_status" >&5 26589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25422 (exit $ac_status); } && 26590 (exit $ac_status); } && {
25423 { ac_try='test -z "$ac_c_werror_flag" 26591 test -z "$ac_c_werror_flag" ||
25424 || test ! -s conftest.err' 26592 test ! -s conftest.err
25425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 26593 } && test -s conftest.$ac_objext; then
25426 (eval $ac_try) 2>&5
25427 ac_status=$?
25428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25429 (exit $ac_status); }; } &&
25430 { ac_try='test -s conftest.$ac_objext'
25431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25432 (eval $ac_try) 2>&5
25433 ac_status=$?
25434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25435 (exit $ac_status); }; }; then
25436 ac_header_compiler=yes 26594 ac_header_compiler=yes
25437else 26595else
25438 echo "$as_me: failed program was:" >&5 26596 echo "$as_me: failed program was:" >&5
25439sed 's/^/| /' conftest.$ac_ext >&5 26597sed 's/^/| /' conftest.$ac_ext >&5
25440 26598
25441ac_header_compiler=no 26599 ac_header_compiler=no
25442fi 26600fi
25443rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 26601
25444echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 26602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25445echo "${ECHO_T}$ac_header_compiler" >&6 26603{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26604echo "${ECHO_T}$ac_header_compiler" >&6; }
25446 26605
25447# Is the header present? 26606# Is the header present?
25448echo "$as_me:$LINENO: checking $ac_header presence" >&5 26607{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
25449echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 26608echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
25450cat >conftest.$ac_ext <<_ACEOF 26609cat >conftest.$ac_ext <<_ACEOF
25451/* confdefs.h. */ 26610/* confdefs.h. */
25452_ACEOF 26611_ACEOF
@@ -25455,24 +26614,22 @@ cat >>conftest.$ac_ext <<_ACEOF
25455/* end confdefs.h. */ 26614/* end confdefs.h. */
25456#include <$ac_header> 26615#include <$ac_header>
25457_ACEOF 26616_ACEOF
25458if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 26617if { (ac_try="$ac_cpp conftest.$ac_ext"
25459 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 26618case "(($ac_try" in
26619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26620 *) ac_try_echo=$ac_try;;
26621esac
26622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26623 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
25460 ac_status=$? 26624 ac_status=$?
25461 grep -v '^ *+' conftest.er1 >conftest.err 26625 grep -v '^ *+' conftest.er1 >conftest.err
25462 rm -f conftest.er1 26626 rm -f conftest.er1
25463 cat conftest.err >&5 26627 cat conftest.err >&5
25464 echo "$as_me:$LINENO: \$? = $ac_status" >&5 26628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25465 (exit $ac_status); } >/dev/null; then 26629 (exit $ac_status); } >/dev/null && {
25466 if test -s conftest.err; then 26630 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25467 ac_cpp_err=$ac_c_preproc_warn_flag 26631 test ! -s conftest.err
25468 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 26632 }; then
25469 else
25470 ac_cpp_err=
25471 fi
25472else
25473 ac_cpp_err=yes
25474fi
25475if test -z "$ac_cpp_err"; then
25476 ac_header_preproc=yes 26633 ac_header_preproc=yes
25477else 26634else
25478 echo "$as_me: failed program was:" >&5 26635 echo "$as_me: failed program was:" >&5
@@ -25480,9 +26637,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
25480 26637
25481 ac_header_preproc=no 26638 ac_header_preproc=no
25482fi 26639fi
26640
25483rm -f conftest.err conftest.$ac_ext 26641rm -f conftest.err conftest.$ac_ext
25484echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 26642{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25485echo "${ECHO_T}$ac_header_preproc" >&6 26643echo "${ECHO_T}$ac_header_preproc" >&6; }
25486 26644
25487# So? What about this header? 26645# So? What about this header?
25488case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 26646case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -25506,25 +26664,24 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
25506echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 26664echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25507 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 26665 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25508echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 26666echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25509 ( 26667 ( cat <<\_ASBOX
25510 cat <<\_ASBOX
25511## ------------------------------------------- ## 26668## ------------------------------------------- ##
25512## Report this to openssh-unix-dev@mindrot.org ## 26669## Report this to openssh-unix-dev@mindrot.org ##
25513## ------------------------------------------- ## 26670## ------------------------------------------- ##
25514_ASBOX 26671_ASBOX
25515 ) | 26672 ) | sed "s/^/$as_me: WARNING: /" >&2
25516 sed "s/^/$as_me: WARNING: /" >&2
25517 ;; 26673 ;;
25518esac 26674esac
25519echo "$as_me:$LINENO: checking for $ac_header" >&5 26675{ echo "$as_me:$LINENO: checking for $ac_header" >&5
25520echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 26676echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
25521if eval "test \"\${$as_ac_Header+set}\" = set"; then 26677if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
25522 echo $ECHO_N "(cached) $ECHO_C" >&6 26678 echo $ECHO_N "(cached) $ECHO_C" >&6
25523else 26679else
25524 eval "$as_ac_Header=\$ac_header_preproc" 26680 eval "$as_ac_Header=\$ac_header_preproc"
25525fi 26681fi
25526echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 26682ac_res=`eval echo '${'$as_ac_Header'}'`
25527echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 26683 { echo "$as_me:$LINENO: result: $ac_res" >&5
26684echo "${ECHO_T}$ac_res" >&6; }
25528 26685
25529fi 26686fi
25530if test `eval echo '${'$as_ac_Header'}'` = yes; then 26687if test `eval echo '${'$as_ac_Header'}'` = yes; then
@@ -25538,13 +26695,12 @@ done
25538 26695
25539 26696
25540 LIBS="$LIBS $K5LIBS" 26697 LIBS="$LIBS $K5LIBS"
25541 echo "$as_me:$LINENO: checking for library containing k_hasafs" >&5 26698 { echo "$as_me:$LINENO: checking for library containing k_hasafs" >&5
25542echo $ECHO_N "checking for library containing k_hasafs... $ECHO_C" >&6 26699echo $ECHO_N "checking for library containing k_hasafs... $ECHO_C" >&6; }
25543if test "${ac_cv_search_k_hasafs+set}" = set; then 26700if test "${ac_cv_search_k_hasafs+set}" = set; then
25544 echo $ECHO_N "(cached) $ECHO_C" >&6 26701 echo $ECHO_N "(cached) $ECHO_C" >&6
25545else 26702else
25546 ac_func_search_save_LIBS=$LIBS 26703 ac_func_search_save_LIBS=$LIBS
25547ac_cv_search_k_hasafs=no
25548cat >conftest.$ac_ext <<_ACEOF 26704cat >conftest.$ac_ext <<_ACEOF
25549/* confdefs.h. */ 26705/* confdefs.h. */
25550_ACEOF 26706_ACEOF
@@ -25552,115 +26708,73 @@ cat confdefs.h >>conftest.$ac_ext
25552cat >>conftest.$ac_ext <<_ACEOF 26708cat >>conftest.$ac_ext <<_ACEOF
25553/* end confdefs.h. */ 26709/* end confdefs.h. */
25554 26710
25555/* Override any gcc2 internal prototype to avoid an error. */ 26711/* Override any GCC internal prototype to avoid an error.
26712 Use char because int might match the return type of a GCC
26713 builtin and then its argument prototype would still apply. */
25556#ifdef __cplusplus 26714#ifdef __cplusplus
25557extern "C" 26715extern "C"
25558#endif 26716#endif
25559/* We use char because int might match the return type of a gcc2
25560 builtin and then its argument prototype would still apply. */
25561char k_hasafs (); 26717char k_hasafs ();
25562int 26718int
25563main () 26719main ()
25564{ 26720{
25565k_hasafs (); 26721return k_hasafs ();
25566 ; 26722 ;
25567 return 0; 26723 return 0;
25568} 26724}
25569_ACEOF 26725_ACEOF
25570rm -f conftest.$ac_objext conftest$ac_exeext 26726for ac_lib in '' kafs; do
25571if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 26727 if test -z "$ac_lib"; then
25572 (eval $ac_link) 2>conftest.er1 26728 ac_res="none required"
26729 else
26730 ac_res=-l$ac_lib
26731 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
26732 fi
26733 rm -f conftest.$ac_objext conftest$ac_exeext
26734if { (ac_try="$ac_link"
26735case "(($ac_try" in
26736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26737 *) ac_try_echo=$ac_try;;
26738esac
26739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26740 (eval "$ac_link") 2>conftest.er1
25573 ac_status=$? 26741 ac_status=$?
25574 grep -v '^ *+' conftest.er1 >conftest.err 26742 grep -v '^ *+' conftest.er1 >conftest.err
25575 rm -f conftest.er1 26743 rm -f conftest.er1
25576 cat conftest.err >&5 26744 cat conftest.err >&5
25577 echo "$as_me:$LINENO: \$? = $ac_status" >&5 26745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25578 (exit $ac_status); } && 26746 (exit $ac_status); } && {
25579 { ac_try='test -z "$ac_c_werror_flag" 26747 test -z "$ac_c_werror_flag" ||
25580 || test ! -s conftest.err' 26748 test ! -s conftest.err
25581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 26749 } && test -s conftest$ac_exeext &&
25582 (eval $ac_try) 2>&5 26750 $as_test_x conftest$ac_exeext; then
25583 ac_status=$? 26751 ac_cv_search_k_hasafs=$ac_res
25584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25585 (exit $ac_status); }; } &&
25586 { ac_try='test -s conftest$ac_exeext'
25587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25588 (eval $ac_try) 2>&5
25589 ac_status=$?
25590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25591 (exit $ac_status); }; }; then
25592 ac_cv_search_k_hasafs="none required"
25593else 26752else
25594 echo "$as_me: failed program was:" >&5 26753 echo "$as_me: failed program was:" >&5
25595sed 's/^/| /' conftest.$ac_ext >&5 26754sed 's/^/| /' conftest.$ac_ext >&5
25596 26755
25597fi
25598rm -f conftest.err conftest.$ac_objext \
25599 conftest$ac_exeext conftest.$ac_ext
25600if test "$ac_cv_search_k_hasafs" = no; then
25601 for ac_lib in kafs; do
25602 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25603 cat >conftest.$ac_ext <<_ACEOF
25604/* confdefs.h. */
25605_ACEOF
25606cat confdefs.h >>conftest.$ac_ext
25607cat >>conftest.$ac_ext <<_ACEOF
25608/* end confdefs.h. */
25609 26756
25610/* Override any gcc2 internal prototype to avoid an error. */ 26757fi
25611#ifdef __cplusplus
25612extern "C"
25613#endif
25614/* We use char because int might match the return type of a gcc2
25615 builtin and then its argument prototype would still apply. */
25616char k_hasafs ();
25617int
25618main ()
25619{
25620k_hasafs ();
25621 ;
25622 return 0;
25623}
25624_ACEOF
25625rm -f conftest.$ac_objext conftest$ac_exeext
25626if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25627 (eval $ac_link) 2>conftest.er1
25628 ac_status=$?
25629 grep -v '^ *+' conftest.er1 >conftest.err
25630 rm -f conftest.er1
25631 cat conftest.err >&5
25632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25633 (exit $ac_status); } &&
25634 { ac_try='test -z "$ac_c_werror_flag"
25635 || test ! -s conftest.err'
25636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25637 (eval $ac_try) 2>&5
25638 ac_status=$?
25639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25640 (exit $ac_status); }; } &&
25641 { ac_try='test -s conftest$ac_exeext'
25642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25643 (eval $ac_try) 2>&5
25644 ac_status=$?
25645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25646 (exit $ac_status); }; }; then
25647 ac_cv_search_k_hasafs="-l$ac_lib"
25648break
25649else
25650 echo "$as_me: failed program was:" >&5
25651sed 's/^/| /' conftest.$ac_ext >&5
25652 26758
26759rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26760 conftest$ac_exeext
26761 if test "${ac_cv_search_k_hasafs+set}" = set; then
26762 break
25653fi 26763fi
25654rm -f conftest.err conftest.$ac_objext \ 26764done
25655 conftest$ac_exeext conftest.$ac_ext 26765if test "${ac_cv_search_k_hasafs+set}" = set; then
25656 done 26766 :
26767else
26768 ac_cv_search_k_hasafs=no
25657fi 26769fi
26770rm conftest.$ac_ext
25658LIBS=$ac_func_search_save_LIBS 26771LIBS=$ac_func_search_save_LIBS
25659fi 26772fi
25660echo "$as_me:$LINENO: result: $ac_cv_search_k_hasafs" >&5 26773{ echo "$as_me:$LINENO: result: $ac_cv_search_k_hasafs" >&5
25661echo "${ECHO_T}$ac_cv_search_k_hasafs" >&6 26774echo "${ECHO_T}$ac_cv_search_k_hasafs" >&6; }
25662if test "$ac_cv_search_k_hasafs" != no; then 26775ac_res=$ac_cv_search_k_hasafs
25663 test "$ac_cv_search_k_hasafs" = "none required" || LIBS="$ac_cv_search_k_hasafs $LIBS" 26776if test "$ac_res" != no; then
26777 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25664 26778
25665cat >>confdefs.h <<\_ACEOF 26779cat >>confdefs.h <<\_ACEOF
25666#define USE_AFS 1 26780#define USE_AFS 1
@@ -25671,30 +26785,30 @@ fi
25671 fi 26785 fi
25672 26786
25673 26787
25674fi; 26788fi
26789
25675 26790
25676# Looking for programs, paths and files 26791# Looking for programs, paths and files
25677 26792
25678PRIVSEP_PATH=/var/empty 26793PRIVSEP_PATH=/var/empty
25679 26794
25680# Check whether --with-privsep-path or --without-privsep-path was given. 26795# Check whether --with-privsep-path was given.
25681if test "${with_privsep_path+set}" = set; then 26796if test "${with_privsep_path+set}" = set; then
25682 withval="$with_privsep_path" 26797 withval=$with_privsep_path;
25683
25684 if test -n "$withval" && test "x$withval" != "xno" && \ 26798 if test -n "$withval" && test "x$withval" != "xno" && \
25685 test "x${withval}" != "xyes"; then 26799 test "x${withval}" != "xyes"; then
25686 PRIVSEP_PATH=$withval 26800 PRIVSEP_PATH=$withval
25687 fi 26801 fi
25688 26802
25689 26803
25690fi; 26804fi
25691 26805
25692 26806
25693 26807
25694# Check whether --with-xauth or --without-xauth was given.
25695if test "${with_xauth+set}" = set; then
25696 withval="$with_xauth"
25697 26808
26809# Check whether --with-xauth was given.
26810if test "${with_xauth+set}" = set; then
26811 withval=$with_xauth;
25698 if test -n "$withval" && test "x$withval" != "xno" && \ 26812 if test -n "$withval" && test "x$withval" != "xno" && \
25699 test "x${withval}" != "xyes"; then 26813 test "x${withval}" != "xyes"; then
25700 xauth_path=$withval 26814 xauth_path=$withval
@@ -25709,8 +26823,8 @@ else
25709 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin" 26823 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin"
25710 # Extract the first word of "xauth", so it can be a program name with args. 26824 # Extract the first word of "xauth", so it can be a program name with args.
25711set dummy xauth; ac_word=$2 26825set dummy xauth; ac_word=$2
25712echo "$as_me:$LINENO: checking for $ac_word" >&5 26826{ echo "$as_me:$LINENO: checking for $ac_word" >&5
25713echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 26827echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
25714if test "${ac_cv_path_xauth_path+set}" = set; then 26828if test "${ac_cv_path_xauth_path+set}" = set; then
25715 echo $ECHO_N "(cached) $ECHO_C" >&6 26829 echo $ECHO_N "(cached) $ECHO_C" >&6
25716else 26830else
@@ -25725,45 +26839,47 @@ do
25725 IFS=$as_save_IFS 26839 IFS=$as_save_IFS
25726 test -z "$as_dir" && as_dir=. 26840 test -z "$as_dir" && as_dir=.
25727 for ac_exec_ext in '' $ac_executable_extensions; do 26841 for ac_exec_ext in '' $ac_executable_extensions; do
25728 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 26842 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25729 ac_cv_path_xauth_path="$as_dir/$ac_word$ac_exec_ext" 26843 ac_cv_path_xauth_path="$as_dir/$ac_word$ac_exec_ext"
25730 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 26844 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25731 break 2 26845 break 2
25732 fi 26846 fi
25733done 26847done
25734done 26848done
26849IFS=$as_save_IFS
25735 26850
25736 ;; 26851 ;;
25737esac 26852esac
25738fi 26853fi
25739xauth_path=$ac_cv_path_xauth_path 26854xauth_path=$ac_cv_path_xauth_path
25740
25741if test -n "$xauth_path"; then 26855if test -n "$xauth_path"; then
25742 echo "$as_me:$LINENO: result: $xauth_path" >&5 26856 { echo "$as_me:$LINENO: result: $xauth_path" >&5
25743echo "${ECHO_T}$xauth_path" >&6 26857echo "${ECHO_T}$xauth_path" >&6; }
25744else 26858else
25745 echo "$as_me:$LINENO: result: no" >&5 26859 { echo "$as_me:$LINENO: result: no" >&5
25746echo "${ECHO_T}no" >&6 26860echo "${ECHO_T}no" >&6; }
25747fi 26861fi
25748 26862
26863
25749 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then 26864 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
25750 xauth_path="/usr/openwin/bin/xauth" 26865 xauth_path="/usr/openwin/bin/xauth"
25751 fi 26866 fi
25752 26867
25753 26868
25754fi; 26869fi
26870
25755 26871
25756STRIP_OPT=-s 26872STRIP_OPT=-s
25757# Check whether --enable-strip or --disable-strip was given. 26873# Check whether --enable-strip was given.
25758if test "${enable_strip+set}" = set; then 26874if test "${enable_strip+set}" = set; then
25759 enableval="$enable_strip" 26875 enableval=$enable_strip;
25760
25761 if test "x$enableval" = "xno" ; then 26876 if test "x$enableval" = "xno" ; then
25762 STRIP_OPT= 26877 STRIP_OPT=
25763 fi 26878 fi
25764 26879
25765 26880
25766fi; 26881fi
26882
25767 26883
25768 26884
25769if test -z "$xauth_path" ; then 26885if test -z "$xauth_path" ; then
@@ -25796,8 +26912,8 @@ echo "$as_me: WARNING: cross compiling: Disabling /dev/ptmx test" >&2;}
25796fi 26912fi
25797if test -z "$no_dev_ptmx" ; then 26913if test -z "$no_dev_ptmx" ; then
25798 if test "x$disable_ptmx_check" != "xyes" ; then 26914 if test "x$disable_ptmx_check" != "xyes" ; then
25799 echo "$as_me:$LINENO: checking for \"/dev/ptmx\"" >&5 26915 { echo "$as_me:$LINENO: checking for \"/dev/ptmx\"" >&5
25800echo $ECHO_N "checking for \"/dev/ptmx\"... $ECHO_C" >&6 26916echo $ECHO_N "checking for \"/dev/ptmx\"... $ECHO_C" >&6; }
25801if test "${ac_cv_file___dev_ptmx_+set}" = set; then 26917if test "${ac_cv_file___dev_ptmx_+set}" = set; then
25802 echo $ECHO_N "(cached) $ECHO_C" >&6 26918 echo $ECHO_N "(cached) $ECHO_C" >&6
25803else 26919else
@@ -25811,8 +26927,8 @@ else
25811 ac_cv_file___dev_ptmx_=no 26927 ac_cv_file___dev_ptmx_=no
25812fi 26928fi
25813fi 26929fi
25814echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptmx_" >&5 26930{ echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptmx_" >&5
25815echo "${ECHO_T}$ac_cv_file___dev_ptmx_" >&6 26931echo "${ECHO_T}$ac_cv_file___dev_ptmx_" >&6; }
25816if test $ac_cv_file___dev_ptmx_ = yes; then 26932if test $ac_cv_file___dev_ptmx_ = yes; then
25817 26933
25818 26934
@@ -25829,8 +26945,8 @@ fi
25829fi 26945fi
25830 26946
25831if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then 26947if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then
25832 echo "$as_me:$LINENO: checking for \"/dev/ptc\"" >&5 26948 { echo "$as_me:$LINENO: checking for \"/dev/ptc\"" >&5
25833echo $ECHO_N "checking for \"/dev/ptc\"... $ECHO_C" >&6 26949echo $ECHO_N "checking for \"/dev/ptc\"... $ECHO_C" >&6; }
25834if test "${ac_cv_file___dev_ptc_+set}" = set; then 26950if test "${ac_cv_file___dev_ptc_+set}" = set; then
25835 echo $ECHO_N "(cached) $ECHO_C" >&6 26951 echo $ECHO_N "(cached) $ECHO_C" >&6
25836else 26952else
@@ -25844,8 +26960,8 @@ else
25844 ac_cv_file___dev_ptc_=no 26960 ac_cv_file___dev_ptc_=no
25845fi 26961fi
25846fi 26962fi
25847echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptc_" >&5 26963{ echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptc_" >&5
25848echo "${ECHO_T}$ac_cv_file___dev_ptc_" >&6 26964echo "${ECHO_T}$ac_cv_file___dev_ptc_" >&6; }
25849if test $ac_cv_file___dev_ptc_ = yes; then 26965if test $ac_cv_file___dev_ptc_ = yes; then
25850 26966
25851 26967
@@ -25865,10 +26981,9 @@ fi
25865 26981
25866# Options from here on. Some of these are preset by platform above 26982# Options from here on. Some of these are preset by platform above
25867 26983
25868# Check whether --with-mantype or --without-mantype was given. 26984# Check whether --with-mantype was given.
25869if test "${with_mantype+set}" = set; then 26985if test "${with_mantype+set}" = set; then
25870 withval="$with_mantype" 26986 withval=$with_mantype;
25871
25872 case "$withval" in 26987 case "$withval" in
25873 man|cat|doc) 26988 man|cat|doc)
25874 MANTYPE=$withval 26989 MANTYPE=$withval
@@ -25881,15 +26996,16 @@ echo "$as_me: error: invalid man type: $withval" >&2;}
25881 esac 26996 esac
25882 26997
25883 26998
25884fi; 26999fi
27000
25885if test -z "$MANTYPE"; then 27001if test -z "$MANTYPE"; then
25886 TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb" 27002 TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb"
25887 for ac_prog in nroff awf 27003 for ac_prog in nroff awf
25888do 27004do
25889 # Extract the first word of "$ac_prog", so it can be a program name with args. 27005 # Extract the first word of "$ac_prog", so it can be a program name with args.
25890set dummy $ac_prog; ac_word=$2 27006set dummy $ac_prog; ac_word=$2
25891echo "$as_me:$LINENO: checking for $ac_word" >&5 27007{ echo "$as_me:$LINENO: checking for $ac_word" >&5
25892echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 27008echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
25893if test "${ac_cv_path_NROFF+set}" = set; then 27009if test "${ac_cv_path_NROFF+set}" = set; then
25894 echo $ECHO_N "(cached) $ECHO_C" >&6 27010 echo $ECHO_N "(cached) $ECHO_C" >&6
25895else 27011else
@@ -25904,27 +27020,28 @@ do
25904 IFS=$as_save_IFS 27020 IFS=$as_save_IFS
25905 test -z "$as_dir" && as_dir=. 27021 test -z "$as_dir" && as_dir=.
25906 for ac_exec_ext in '' $ac_executable_extensions; do 27022 for ac_exec_ext in '' $ac_executable_extensions; do
25907 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 27023 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25908 ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext" 27024 ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
25909 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 27025 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25910 break 2 27026 break 2
25911 fi 27027 fi
25912done 27028done
25913done 27029done
27030IFS=$as_save_IFS
25914 27031
25915 ;; 27032 ;;
25916esac 27033esac
25917fi 27034fi
25918NROFF=$ac_cv_path_NROFF 27035NROFF=$ac_cv_path_NROFF
25919
25920if test -n "$NROFF"; then 27036if test -n "$NROFF"; then
25921 echo "$as_me:$LINENO: result: $NROFF" >&5 27037 { echo "$as_me:$LINENO: result: $NROFF" >&5
25922echo "${ECHO_T}$NROFF" >&6 27038echo "${ECHO_T}$NROFF" >&6; }
25923else 27039else
25924 echo "$as_me:$LINENO: result: no" >&5 27040 { echo "$as_me:$LINENO: result: no" >&5
25925echo "${ECHO_T}no" >&6 27041echo "${ECHO_T}no" >&6; }
25926fi 27042fi
25927 27043
27044
25928 test -n "$NROFF" && break 27045 test -n "$NROFF" && break
25929done 27046done
25930test -n "$NROFF" || NROFF="/bin/false" 27047test -n "$NROFF" || NROFF="/bin/false"
@@ -25948,10 +27065,9 @@ fi
25948# Check whether to enable MD5 passwords 27065# Check whether to enable MD5 passwords
25949MD5_MSG="no" 27066MD5_MSG="no"
25950 27067
25951# Check whether --with-md5-passwords or --without-md5-passwords was given. 27068# Check whether --with-md5-passwords was given.
25952if test "${with_md5_passwords+set}" = set; then 27069if test "${with_md5_passwords+set}" = set; then
25953 withval="$with_md5_passwords" 27070 withval=$with_md5_passwords;
25954
25955 if test "x$withval" != "xno" ; then 27071 if test "x$withval" != "xno" ; then
25956 27072
25957cat >>confdefs.h <<\_ACEOF 27073cat >>confdefs.h <<\_ACEOF
@@ -25962,14 +27078,14 @@ _ACEOF
25962 fi 27078 fi
25963 27079
25964 27080
25965fi; 27081fi
27082
25966 27083
25967# Whether to disable shadow password support 27084# Whether to disable shadow password support
25968 27085
25969# Check whether --with-shadow or --without-shadow was given. 27086# Check whether --with-shadow was given.
25970if test "${with_shadow+set}" = set; then 27087if test "${with_shadow+set}" = set; then
25971 withval="$with_shadow" 27088 withval=$with_shadow;
25972
25973 if test "x$withval" = "xno" ; then 27089 if test "x$withval" = "xno" ; then
25974 cat >>confdefs.h <<\_ACEOF 27090 cat >>confdefs.h <<\_ACEOF
25975#define DISABLE_SHADOW 1 27091#define DISABLE_SHADOW 1
@@ -25979,11 +27095,12 @@ _ACEOF
25979 fi 27095 fi
25980 27096
25981 27097
25982fi; 27098fi
27099
25983 27100
25984if test -z "$disable_shadow" ; then 27101if test -z "$disable_shadow" ; then
25985 echo "$as_me:$LINENO: checking if the systems has expire shadow information" >&5 27102 { echo "$as_me:$LINENO: checking if the systems has expire shadow information" >&5
25986echo $ECHO_N "checking if the systems has expire shadow information... $ECHO_C" >&6 27103echo $ECHO_N "checking if the systems has expire shadow information... $ECHO_C" >&6; }
25987 cat >conftest.$ac_ext <<_ACEOF 27104 cat >conftest.$ac_ext <<_ACEOF
25988/* confdefs.h. */ 27105/* confdefs.h. */
25989_ACEOF 27106_ACEOF
@@ -26004,27 +27121,22 @@ main ()
26004} 27121}
26005_ACEOF 27122_ACEOF
26006rm -f conftest.$ac_objext 27123rm -f conftest.$ac_objext
26007if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 27124if { (ac_try="$ac_compile"
26008 (eval $ac_compile) 2>conftest.er1 27125case "(($ac_try" in
27126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27127 *) ac_try_echo=$ac_try;;
27128esac
27129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27130 (eval "$ac_compile") 2>conftest.er1
26009 ac_status=$? 27131 ac_status=$?
26010 grep -v '^ *+' conftest.er1 >conftest.err 27132 grep -v '^ *+' conftest.er1 >conftest.err
26011 rm -f conftest.er1 27133 rm -f conftest.er1
26012 cat conftest.err >&5 27134 cat conftest.err >&5
26013 echo "$as_me:$LINENO: \$? = $ac_status" >&5 27135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26014 (exit $ac_status); } && 27136 (exit $ac_status); } && {
26015 { ac_try='test -z "$ac_c_werror_flag" 27137 test -z "$ac_c_werror_flag" ||
26016 || test ! -s conftest.err' 27138 test ! -s conftest.err
26017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 27139 } && test -s conftest.$ac_objext; then
26018 (eval $ac_try) 2>&5
26019 ac_status=$?
26020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26021 (exit $ac_status); }; } &&
26022 { ac_try='test -s conftest.$ac_objext'
26023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26024 (eval $ac_try) 2>&5
26025 ac_status=$?
26026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26027 (exit $ac_status); }; }; then
26028 sp_expire_available=yes 27140 sp_expire_available=yes
26029else 27141else
26030 echo "$as_me: failed program was:" >&5 27142 echo "$as_me: failed program was:" >&5
@@ -26033,19 +27145,20 @@ sed 's/^/| /' conftest.$ac_ext >&5
26033 27145
26034 27146
26035fi 27147fi
26036rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 27148
27149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26037 27150
26038 if test "x$sp_expire_available" = "xyes" ; then 27151 if test "x$sp_expire_available" = "xyes" ; then
26039 echo "$as_me:$LINENO: result: yes" >&5 27152 { echo "$as_me:$LINENO: result: yes" >&5
26040echo "${ECHO_T}yes" >&6 27153echo "${ECHO_T}yes" >&6; }
26041 27154
26042cat >>confdefs.h <<\_ACEOF 27155cat >>confdefs.h <<\_ACEOF
26043#define HAS_SHADOW_EXPIRE 1 27156#define HAS_SHADOW_EXPIRE 1
26044_ACEOF 27157_ACEOF
26045 27158
26046 else 27159 else
26047 echo "$as_me:$LINENO: result: no" >&5 27160 { echo "$as_me:$LINENO: result: no" >&5
26048echo "${ECHO_T}no" >&6 27161echo "${ECHO_T}no" >&6; }
26049 fi 27162 fi
26050fi 27163fi
26051 27164
@@ -26060,10 +27173,9 @@ _ACEOF
26060else 27173else
26061 DISPLAY_HACK_MSG="no" 27174 DISPLAY_HACK_MSG="no"
26062 27175
26063# Check whether --with-ipaddr-display or --without-ipaddr-display was given. 27176# Check whether --with-ipaddr-display was given.
26064if test "${with_ipaddr_display+set}" = set; then 27177if test "${with_ipaddr_display+set}" = set; then
26065 withval="$with_ipaddr_display" 27178 withval=$with_ipaddr_display;
26066
26067 if test "x$withval" != "xno" ; then 27179 if test "x$withval" != "xno" ; then
26068 cat >>confdefs.h <<\_ACEOF 27180 cat >>confdefs.h <<\_ACEOF
26069#define IPADDR_IN_DISPLAY 1 27181#define IPADDR_IN_DISPLAY 1
@@ -26073,14 +27185,14 @@ _ACEOF
26073 fi 27185 fi
26074 27186
26075 27187
26076fi; 27188fi
27189
26077fi 27190fi
26078 27191
26079# check for /etc/default/login and use it if present. 27192# check for /etc/default/login and use it if present.
26080# Check whether --enable-etc-default-login or --disable-etc-default-login was given. 27193# Check whether --enable-etc-default-login was given.
26081if test "${enable_etc_default_login+set}" = set; then 27194if test "${enable_etc_default_login+set}" = set; then
26082 enableval="$enable_etc_default_login" 27195 enableval=$enable_etc_default_login; if test "x$enableval" = "xno"; then
26083 if test "x$enableval" = "xno"; then
26084 { echo "$as_me:$LINENO: /etc/default/login handling disabled" >&5 27196 { echo "$as_me:$LINENO: /etc/default/login handling disabled" >&5
26085echo "$as_me: /etc/default/login handling disabled" >&6;} 27197echo "$as_me: /etc/default/login handling disabled" >&6;}
26086 etc_default_login=no 27198 etc_default_login=no
@@ -26097,11 +27209,12 @@ echo "$as_me: WARNING: cross compiling: not checking /etc/default/login" >&2;}
26097 etc_default_login=yes 27209 etc_default_login=yes
26098 fi 27210 fi
26099 27211
26100fi; 27212fi
27213
26101 27214
26102if test "x$etc_default_login" != "xno"; then 27215if test "x$etc_default_login" != "xno"; then
26103 echo "$as_me:$LINENO: checking for \"/etc/default/login\"" >&5 27216 { echo "$as_me:$LINENO: checking for \"/etc/default/login\"" >&5
26104echo $ECHO_N "checking for \"/etc/default/login\"... $ECHO_C" >&6 27217echo $ECHO_N "checking for \"/etc/default/login\"... $ECHO_C" >&6; }
26105if test "${ac_cv_file___etc_default_login_+set}" = set; then 27218if test "${ac_cv_file___etc_default_login_+set}" = set; then
26106 echo $ECHO_N "(cached) $ECHO_C" >&6 27219 echo $ECHO_N "(cached) $ECHO_C" >&6
26107else 27220else
@@ -26115,8 +27228,8 @@ else
26115 ac_cv_file___etc_default_login_=no 27228 ac_cv_file___etc_default_login_=no
26116fi 27229fi
26117fi 27230fi
26118echo "$as_me:$LINENO: result: $ac_cv_file___etc_default_login_" >&5 27231{ echo "$as_me:$LINENO: result: $ac_cv_file___etc_default_login_" >&5
26119echo "${ECHO_T}$ac_cv_file___etc_default_login_" >&6 27232echo "${ECHO_T}$ac_cv_file___etc_default_login_" >&6; }
26120if test $ac_cv_file___etc_default_login_ = yes; then 27233if test $ac_cv_file___etc_default_login_ = yes; then
26121 external_path_file=/etc/default/login 27234 external_path_file=/etc/default/login
26122fi 27235fi
@@ -26138,10 +27251,9 @@ fi
26138# Whether to mess with the default path 27251# Whether to mess with the default path
26139SERVER_PATH_MSG="(default)" 27252SERVER_PATH_MSG="(default)"
26140 27253
26141# Check whether --with-default-path or --without-default-path was given. 27254# Check whether --with-default-path was given.
26142if test "${with_default_path+set}" = set; then 27255if test "${with_default_path+set}" = set; then
26143 withval="$with_default_path" 27256 withval=$with_default_path;
26144
26145 if test "x$external_path_file" = "x/etc/login.conf" ; then 27257 if test "x$external_path_file" = "x/etc/login.conf" ; then
26146 { echo "$as_me:$LINENO: WARNING: 27258 { echo "$as_me:$LINENO: WARNING:
26147--with-default-path=PATH has no effect on this system. 27259--with-default-path=PATH has no effect on this system.
@@ -26220,13 +27332,22 @@ main()
26220 27332
26221_ACEOF 27333_ACEOF
26222rm -f conftest$ac_exeext 27334rm -f conftest$ac_exeext
26223if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 27335if { (ac_try="$ac_link"
26224 (eval $ac_link) 2>&5 27336case "(($ac_try" in
27337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27338 *) ac_try_echo=$ac_try;;
27339esac
27340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27341 (eval "$ac_link") 2>&5
26225 ac_status=$? 27342 ac_status=$?
26226 echo "$as_me:$LINENO: \$? = $ac_status" >&5 27343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26227 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 27344 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 27345 { (case "(($ac_try" in
26229 (eval $ac_try) 2>&5 27346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27347 *) ac_try_echo=$ac_try;;
27348esac
27349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27350 (eval "$ac_try") 2>&5
26230 ac_status=$? 27351 ac_status=$?
26231 echo "$as_me:$LINENO: \$? = $ac_status" >&5 27352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26232 (exit $ac_status); }; }; then 27353 (exit $ac_status); }; }; then
@@ -26239,8 +27360,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
26239( exit $ac_status ) 27360( exit $ac_status )
26240 user_path="/usr/bin:/bin:/usr/sbin:/sbin" 27361 user_path="/usr/bin:/bin:/usr/sbin:/sbin"
26241fi 27362fi
26242rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 27363rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26243fi 27364fi
27365
27366
26244# make sure $bindir is in USER_PATH so scp will work 27367# make sure $bindir is in USER_PATH so scp will work
26245 t_bindir=`eval echo ${bindir}` 27368 t_bindir=`eval echo ${bindir}`
26246 case $t_bindir in 27369 case $t_bindir in
@@ -26254,13 +27377,14 @@ fi
26254 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1 27377 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1
26255 if test $? -ne 0 ; then 27378 if test $? -ne 0 ; then
26256 user_path=$user_path:$t_bindir 27379 user_path=$user_path:$t_bindir
26257 echo "$as_me:$LINENO: result: Adding $t_bindir to USER_PATH so scp will work" >&5 27380 { echo "$as_me:$LINENO: result: Adding $t_bindir to USER_PATH so scp will work" >&5
26258echo "${ECHO_T}Adding $t_bindir to USER_PATH so scp will work" >&6 27381echo "${ECHO_T}Adding $t_bindir to USER_PATH so scp will work" >&6; }
26259 fi 27382 fi
26260 fi 27383 fi
26261 fi 27384 fi
26262 27385
26263fi; 27386fi
27387
26264if test "x$external_path_file" != "x/etc/login.conf" ; then 27388if test "x$external_path_file" != "x/etc/login.conf" ; then
26265 27389
26266cat >>confdefs.h <<_ACEOF 27390cat >>confdefs.h <<_ACEOF
@@ -26272,10 +27396,9 @@ fi
26272 27396
26273# Set superuser path separately to user path 27397# Set superuser path separately to user path
26274 27398
26275# Check whether --with-superuser-path or --without-superuser-path was given. 27399# Check whether --with-superuser-path was given.
26276if test "${with_superuser_path+set}" = set; then 27400if test "${with_superuser_path+set}" = set; then
26277 withval="$with_superuser_path" 27401 withval=$with_superuser_path;
26278
26279 if test -n "$withval" && test "x$withval" != "xno" && \ 27402 if test -n "$withval" && test "x$withval" != "xno" && \
26280 test "x${withval}" != "xyes"; then 27403 test "x${withval}" != "xyes"; then
26281 27404
@@ -26287,20 +27410,20 @@ _ACEOF
26287 fi 27410 fi
26288 27411
26289 27412
26290fi; 27413fi
27414
26291 27415
26292 27416
26293echo "$as_me:$LINENO: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5 27417{ echo "$as_me:$LINENO: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5
26294echo $ECHO_N "checking if we need to convert IPv4 in IPv6-mapped addresses... $ECHO_C" >&6 27418echo $ECHO_N "checking if we need to convert IPv4 in IPv6-mapped addresses... $ECHO_C" >&6; }
26295IPV4_IN6_HACK_MSG="no" 27419IPV4_IN6_HACK_MSG="no"
26296 27420
26297# Check whether --with-4in6 or --without-4in6 was given. 27421# Check whether --with-4in6 was given.
26298if test "${with_4in6+set}" = set; then 27422if test "${with_4in6+set}" = set; then
26299 withval="$with_4in6" 27423 withval=$with_4in6;
26300
26301 if test "x$withval" != "xno" ; then 27424 if test "x$withval" != "xno" ; then
26302 echo "$as_me:$LINENO: result: yes" >&5 27425 { echo "$as_me:$LINENO: result: yes" >&5
26303echo "${ECHO_T}yes" >&6 27426echo "${ECHO_T}yes" >&6; }
26304 27427
26305cat >>confdefs.h <<\_ACEOF 27428cat >>confdefs.h <<\_ACEOF
26306#define IPV4_IN_IPV6 1 27429#define IPV4_IN_IPV6 1
@@ -26308,35 +27431,35 @@ _ACEOF
26308 27431
26309 IPV4_IN6_HACK_MSG="yes" 27432 IPV4_IN6_HACK_MSG="yes"
26310 else 27433 else
26311 echo "$as_me:$LINENO: result: no" >&5 27434 { echo "$as_me:$LINENO: result: no" >&5
26312echo "${ECHO_T}no" >&6 27435echo "${ECHO_T}no" >&6; }
26313 fi 27436 fi
26314 27437
26315else 27438else
26316 27439
26317 if test "x$inet6_default_4in6" = "xyes"; then 27440 if test "x$inet6_default_4in6" = "xyes"; then
26318 echo "$as_me:$LINENO: result: yes (default)" >&5 27441 { echo "$as_me:$LINENO: result: yes (default)" >&5
26319echo "${ECHO_T}yes (default)" >&6 27442echo "${ECHO_T}yes (default)" >&6; }
26320 cat >>confdefs.h <<\_ACEOF 27443 cat >>confdefs.h <<\_ACEOF
26321#define IPV4_IN_IPV6 1 27444#define IPV4_IN_IPV6 1
26322_ACEOF 27445_ACEOF
26323 27446
26324 IPV4_IN6_HACK_MSG="yes" 27447 IPV4_IN6_HACK_MSG="yes"
26325 else 27448 else
26326 echo "$as_me:$LINENO: result: no (default)" >&5 27449 { echo "$as_me:$LINENO: result: no (default)" >&5
26327echo "${ECHO_T}no (default)" >&6 27450echo "${ECHO_T}no (default)" >&6; }
26328 fi 27451 fi
26329 27452
26330 27453
26331fi; 27454fi
27455
26332 27456
26333# Whether to enable BSD auth support 27457# Whether to enable BSD auth support
26334BSD_AUTH_MSG=no 27458BSD_AUTH_MSG=no
26335 27459
26336# Check whether --with-bsd-auth or --without-bsd-auth was given. 27460# Check whether --with-bsd-auth was given.
26337if test "${with_bsd_auth+set}" = set; then 27461if test "${with_bsd_auth+set}" = set; then
26338 withval="$with_bsd_auth" 27462 withval=$with_bsd_auth;
26339
26340 if test "x$withval" != "xno" ; then 27463 if test "x$withval" != "xno" ; then
26341 27464
26342cat >>confdefs.h <<\_ACEOF 27465cat >>confdefs.h <<\_ACEOF
@@ -26347,7 +27470,8 @@ _ACEOF
26347 fi 27470 fi
26348 27471
26349 27472
26350fi; 27473fi
27474
26351 27475
26352# Where to place sshd.pid 27476# Where to place sshd.pid
26353piddir=/var/run 27477piddir=/var/run
@@ -26360,10 +27484,9 @@ if test ! -d $piddir ; then
26360fi 27484fi
26361 27485
26362 27486
26363# Check whether --with-pid-dir or --without-pid-dir was given. 27487# Check whether --with-pid-dir was given.
26364if test "${with_pid_dir+set}" = set; then 27488if test "${with_pid_dir+set}" = set; then
26365 withval="$with_pid_dir" 27489 withval=$with_pid_dir;
26366
26367 if test -n "$withval" && test "x$withval" != "xno" && \ 27490 if test -n "$withval" && test "x$withval" != "xno" && \
26368 test "x${withval}" != "xyes"; then 27491 test "x${withval}" != "xyes"; then
26369 piddir=$withval 27492 piddir=$withval
@@ -26374,7 +27497,8 @@ echo "$as_me: WARNING: ** no $piddir directory on this system **" >&2;}
26374 fi 27497 fi
26375 27498
26376 27499
26377fi; 27500fi
27501
26378 27502
26379 27503
26380cat >>confdefs.h <<_ACEOF 27504cat >>confdefs.h <<_ACEOF
@@ -26383,10 +27507,9 @@ _ACEOF
26383 27507
26384 27508
26385 27509
26386# Check whether --enable-lastlog or --disable-lastlog was given. 27510# Check whether --enable-lastlog was given.
26387if test "${enable_lastlog+set}" = set; then 27511if test "${enable_lastlog+set}" = set; then
26388 enableval="$enable_lastlog" 27512 enableval=$enable_lastlog;
26389
26390 if test "x$enableval" = "xno" ; then 27513 if test "x$enableval" = "xno" ; then
26391 cat >>confdefs.h <<\_ACEOF 27514 cat >>confdefs.h <<\_ACEOF
26392#define DISABLE_LASTLOG 1 27515#define DISABLE_LASTLOG 1
@@ -26395,11 +27518,11 @@ _ACEOF
26395 fi 27518 fi
26396 27519
26397 27520
26398fi; 27521fi
26399# Check whether --enable-utmp or --disable-utmp was given.
26400if test "${enable_utmp+set}" = set; then
26401 enableval="$enable_utmp"
26402 27522
27523# Check whether --enable-utmp was given.
27524if test "${enable_utmp+set}" = set; then
27525 enableval=$enable_utmp;
26403 if test "x$enableval" = "xno" ; then 27526 if test "x$enableval" = "xno" ; then
26404 cat >>confdefs.h <<\_ACEOF 27527 cat >>confdefs.h <<\_ACEOF
26405#define DISABLE_UTMP 1 27528#define DISABLE_UTMP 1
@@ -26408,11 +27531,11 @@ _ACEOF
26408 fi 27531 fi
26409 27532
26410 27533
26411fi; 27534fi
26412# Check whether --enable-utmpx or --disable-utmpx was given.
26413if test "${enable_utmpx+set}" = set; then
26414 enableval="$enable_utmpx"
26415 27535
27536# Check whether --enable-utmpx was given.
27537if test "${enable_utmpx+set}" = set; then
27538 enableval=$enable_utmpx;
26416 if test "x$enableval" = "xno" ; then 27539 if test "x$enableval" = "xno" ; then
26417 27540
26418cat >>confdefs.h <<\_ACEOF 27541cat >>confdefs.h <<\_ACEOF
@@ -26422,11 +27545,11 @@ _ACEOF
26422 fi 27545 fi
26423 27546
26424 27547
26425fi; 27548fi
26426# Check whether --enable-wtmp or --disable-wtmp was given.
26427if test "${enable_wtmp+set}" = set; then
26428 enableval="$enable_wtmp"
26429 27549
27550# Check whether --enable-wtmp was given.
27551if test "${enable_wtmp+set}" = set; then
27552 enableval=$enable_wtmp;
26430 if test "x$enableval" = "xno" ; then 27553 if test "x$enableval" = "xno" ; then
26431 cat >>confdefs.h <<\_ACEOF 27554 cat >>confdefs.h <<\_ACEOF
26432#define DISABLE_WTMP 1 27555#define DISABLE_WTMP 1
@@ -26435,11 +27558,11 @@ _ACEOF
26435 fi 27558 fi
26436 27559
26437 27560
26438fi; 27561fi
26439# Check whether --enable-wtmpx or --disable-wtmpx was given.
26440if test "${enable_wtmpx+set}" = set; then
26441 enableval="$enable_wtmpx"
26442 27562
27563# Check whether --enable-wtmpx was given.
27564if test "${enable_wtmpx+set}" = set; then
27565 enableval=$enable_wtmpx;
26443 if test "x$enableval" = "xno" ; then 27566 if test "x$enableval" = "xno" ; then
26444 27567
26445cat >>confdefs.h <<\_ACEOF 27568cat >>confdefs.h <<\_ACEOF
@@ -26449,11 +27572,11 @@ _ACEOF
26449 fi 27572 fi
26450 27573
26451 27574
26452fi; 27575fi
26453# Check whether --enable-libutil or --disable-libutil was given.
26454if test "${enable_libutil+set}" = set; then
26455 enableval="$enable_libutil"
26456 27576
27577# Check whether --enable-libutil was given.
27578if test "${enable_libutil+set}" = set; then
27579 enableval=$enable_libutil;
26457 if test "x$enableval" = "xno" ; then 27580 if test "x$enableval" = "xno" ; then
26458 cat >>confdefs.h <<\_ACEOF 27581 cat >>confdefs.h <<\_ACEOF
26459#define DISABLE_LOGIN 1 27582#define DISABLE_LOGIN 1
@@ -26462,11 +27585,11 @@ _ACEOF
26462 fi 27585 fi
26463 27586
26464 27587
26465fi; 27588fi
26466# Check whether --enable-pututline or --disable-pututline was given.
26467if test "${enable_pututline+set}" = set; then
26468 enableval="$enable_pututline"
26469 27589
27590# Check whether --enable-pututline was given.
27591if test "${enable_pututline+set}" = set; then
27592 enableval=$enable_pututline;
26470 if test "x$enableval" = "xno" ; then 27593 if test "x$enableval" = "xno" ; then
26471 27594
26472cat >>confdefs.h <<\_ACEOF 27595cat >>confdefs.h <<\_ACEOF
@@ -26476,11 +27599,11 @@ _ACEOF
26476 fi 27599 fi
26477 27600
26478 27601
26479fi; 27602fi
26480# Check whether --enable-pututxline or --disable-pututxline was given.
26481if test "${enable_pututxline+set}" = set; then
26482 enableval="$enable_pututxline"
26483 27603
27604# Check whether --enable-pututxline was given.
27605if test "${enable_pututxline+set}" = set; then
27606 enableval=$enable_pututxline;
26484 if test "x$enableval" = "xno" ; then 27607 if test "x$enableval" = "xno" ; then
26485 27608
26486cat >>confdefs.h <<\_ACEOF 27609cat >>confdefs.h <<\_ACEOF
@@ -26490,12 +27613,12 @@ _ACEOF
26490 fi 27613 fi
26491 27614
26492 27615
26493fi; 27616fi
27617
26494 27618
26495# Check whether --with-lastlog or --without-lastlog was given. 27619# Check whether --with-lastlog was given.
26496if test "${with_lastlog+set}" = set; then 27620if test "${with_lastlog+set}" = set; then
26497 withval="$with_lastlog" 27621 withval=$with_lastlog;
26498
26499 if test "x$withval" = "xno" ; then 27622 if test "x$withval" = "xno" ; then
26500 cat >>confdefs.h <<\_ACEOF 27623 cat >>confdefs.h <<\_ACEOF
26501#define DISABLE_LASTLOG 1 27624#define DISABLE_LASTLOG 1
@@ -26506,11 +27629,12 @@ _ACEOF
26506 fi 27629 fi
26507 27630
26508 27631
26509fi; 27632fi
27633
26510 27634
26511 27635
26512echo "$as_me:$LINENO: checking if your system defines LASTLOG_FILE" >&5 27636{ echo "$as_me:$LINENO: checking if your system defines LASTLOG_FILE" >&5
26513echo $ECHO_N "checking if your system defines LASTLOG_FILE... $ECHO_C" >&6 27637echo $ECHO_N "checking if your system defines LASTLOG_FILE... $ECHO_C" >&6; }
26514cat >conftest.$ac_ext <<_ACEOF 27638cat >conftest.$ac_ext <<_ACEOF
26515/* confdefs.h. */ 27639/* confdefs.h. */
26516_ACEOF 27640_ACEOF
@@ -26539,38 +27663,33 @@ main ()
26539} 27663}
26540_ACEOF 27664_ACEOF
26541rm -f conftest.$ac_objext 27665rm -f conftest.$ac_objext
26542if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 27666if { (ac_try="$ac_compile"
26543 (eval $ac_compile) 2>conftest.er1 27667case "(($ac_try" in
27668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27669 *) ac_try_echo=$ac_try;;
27670esac
27671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27672 (eval "$ac_compile") 2>conftest.er1
26544 ac_status=$? 27673 ac_status=$?
26545 grep -v '^ *+' conftest.er1 >conftest.err 27674 grep -v '^ *+' conftest.er1 >conftest.err
26546 rm -f conftest.er1 27675 rm -f conftest.er1
26547 cat conftest.err >&5 27676 cat conftest.err >&5
26548 echo "$as_me:$LINENO: \$? = $ac_status" >&5 27677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26549 (exit $ac_status); } && 27678 (exit $ac_status); } && {
26550 { ac_try='test -z "$ac_c_werror_flag" 27679 test -z "$ac_c_werror_flag" ||
26551 || test ! -s conftest.err' 27680 test ! -s conftest.err
26552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 27681 } && test -s conftest.$ac_objext; then
26553 (eval $ac_try) 2>&5 27682 { echo "$as_me:$LINENO: result: yes" >&5
26554 ac_status=$? 27683echo "${ECHO_T}yes" >&6; }
26555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26556 (exit $ac_status); }; } &&
26557 { ac_try='test -s conftest.$ac_objext'
26558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26559 (eval $ac_try) 2>&5
26560 ac_status=$?
26561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26562 (exit $ac_status); }; }; then
26563 echo "$as_me:$LINENO: result: yes" >&5
26564echo "${ECHO_T}yes" >&6
26565else 27684else
26566 echo "$as_me: failed program was:" >&5 27685 echo "$as_me: failed program was:" >&5
26567sed 's/^/| /' conftest.$ac_ext >&5 27686sed 's/^/| /' conftest.$ac_ext >&5
26568 27687
26569 27688
26570 echo "$as_me:$LINENO: result: no" >&5 27689 { echo "$as_me:$LINENO: result: no" >&5
26571echo "${ECHO_T}no" >&6 27690echo "${ECHO_T}no" >&6; }
26572 echo "$as_me:$LINENO: checking if your system defines _PATH_LASTLOG" >&5 27691 { echo "$as_me:$LINENO: checking if your system defines _PATH_LASTLOG" >&5
26573echo $ECHO_N "checking if your system defines _PATH_LASTLOG... $ECHO_C" >&6 27692echo $ECHO_N "checking if your system defines _PATH_LASTLOG... $ECHO_C" >&6; }
26574 cat >conftest.$ac_ext <<_ACEOF 27693 cat >conftest.$ac_ext <<_ACEOF
26575/* confdefs.h. */ 27694/* confdefs.h. */
26576_ACEOF 27695_ACEOF
@@ -26596,44 +27715,41 @@ main ()
26596} 27715}
26597_ACEOF 27716_ACEOF
26598rm -f conftest.$ac_objext 27717rm -f conftest.$ac_objext
26599if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 27718if { (ac_try="$ac_compile"
26600 (eval $ac_compile) 2>conftest.er1 27719case "(($ac_try" in
27720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27721 *) ac_try_echo=$ac_try;;
27722esac
27723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27724 (eval "$ac_compile") 2>conftest.er1
26601 ac_status=$? 27725 ac_status=$?
26602 grep -v '^ *+' conftest.er1 >conftest.err 27726 grep -v '^ *+' conftest.er1 >conftest.err
26603 rm -f conftest.er1 27727 rm -f conftest.er1
26604 cat conftest.err >&5 27728 cat conftest.err >&5
26605 echo "$as_me:$LINENO: \$? = $ac_status" >&5 27729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26606 (exit $ac_status); } && 27730 (exit $ac_status); } && {
26607 { ac_try='test -z "$ac_c_werror_flag" 27731 test -z "$ac_c_werror_flag" ||
26608 || test ! -s conftest.err' 27732 test ! -s conftest.err
26609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 27733 } && test -s conftest.$ac_objext; then
26610 (eval $ac_try) 2>&5 27734 { echo "$as_me:$LINENO: result: yes" >&5
26611 ac_status=$? 27735echo "${ECHO_T}yes" >&6; }
26612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26613 (exit $ac_status); }; } &&
26614 { ac_try='test -s conftest.$ac_objext'
26615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26616 (eval $ac_try) 2>&5
26617 ac_status=$?
26618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26619 (exit $ac_status); }; }; then
26620 echo "$as_me:$LINENO: result: yes" >&5
26621echo "${ECHO_T}yes" >&6
26622else 27736else
26623 echo "$as_me: failed program was:" >&5 27737 echo "$as_me: failed program was:" >&5
26624sed 's/^/| /' conftest.$ac_ext >&5 27738sed 's/^/| /' conftest.$ac_ext >&5
26625 27739
26626 27740
26627 echo "$as_me:$LINENO: result: no" >&5 27741 { echo "$as_me:$LINENO: result: no" >&5
26628echo "${ECHO_T}no" >&6 27742echo "${ECHO_T}no" >&6; }
26629 system_lastlog_path=no 27743 system_lastlog_path=no
26630 27744
26631fi 27745fi
26632rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 27746
27747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26633 27748
26634 27749
26635fi 27750fi
26636rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 27751
27752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26637 27753
26638if test -z "$conf_lastlog_location"; then 27754if test -z "$conf_lastlog_location"; then
26639 if test x"$system_lastlog_path" = x"no" ; then 27755 if test x"$system_lastlog_path" = x"no" ; then
@@ -26657,8 +27773,8 @@ _ACEOF
26657 27773
26658fi 27774fi
26659 27775
26660echo "$as_me:$LINENO: checking if your system defines UTMP_FILE" >&5 27776{ echo "$as_me:$LINENO: checking if your system defines UTMP_FILE" >&5
26661echo $ECHO_N "checking if your system defines UTMP_FILE... $ECHO_C" >&6 27777echo $ECHO_N "checking if your system defines UTMP_FILE... $ECHO_C" >&6; }
26662cat >conftest.$ac_ext <<_ACEOF 27778cat >conftest.$ac_ext <<_ACEOF
26663/* confdefs.h. */ 27779/* confdefs.h. */
26664_ACEOF 27780_ACEOF
@@ -26681,39 +27797,35 @@ main ()
26681} 27797}
26682_ACEOF 27798_ACEOF
26683rm -f conftest.$ac_objext 27799rm -f conftest.$ac_objext
26684if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 27800if { (ac_try="$ac_compile"
26685 (eval $ac_compile) 2>conftest.er1 27801case "(($ac_try" in
27802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27803 *) ac_try_echo=$ac_try;;
27804esac
27805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27806 (eval "$ac_compile") 2>conftest.er1
26686 ac_status=$? 27807 ac_status=$?
26687 grep -v '^ *+' conftest.er1 >conftest.err 27808 grep -v '^ *+' conftest.er1 >conftest.err
26688 rm -f conftest.er1 27809 rm -f conftest.er1
26689 cat conftest.err >&5 27810 cat conftest.err >&5
26690 echo "$as_me:$LINENO: \$? = $ac_status" >&5 27811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26691 (exit $ac_status); } && 27812 (exit $ac_status); } && {
26692 { ac_try='test -z "$ac_c_werror_flag" 27813 test -z "$ac_c_werror_flag" ||
26693 || test ! -s conftest.err' 27814 test ! -s conftest.err
26694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 27815 } && test -s conftest.$ac_objext; then
26695 (eval $ac_try) 2>&5 27816 { echo "$as_me:$LINENO: result: yes" >&5
26696 ac_status=$? 27817echo "${ECHO_T}yes" >&6; }
26697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26698 (exit $ac_status); }; } &&
26699 { ac_try='test -s conftest.$ac_objext'
26700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26701 (eval $ac_try) 2>&5
26702 ac_status=$?
26703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26704 (exit $ac_status); }; }; then
26705 echo "$as_me:$LINENO: result: yes" >&5
26706echo "${ECHO_T}yes" >&6
26707else 27818else
26708 echo "$as_me: failed program was:" >&5 27819 echo "$as_me: failed program was:" >&5
26709sed 's/^/| /' conftest.$ac_ext >&5 27820sed 's/^/| /' conftest.$ac_ext >&5
26710 27821
26711 echo "$as_me:$LINENO: result: no" >&5 27822 { echo "$as_me:$LINENO: result: no" >&5
26712echo "${ECHO_T}no" >&6 27823echo "${ECHO_T}no" >&6; }
26713 system_utmp_path=no 27824 system_utmp_path=no
26714 27825
26715fi 27826fi
26716rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 27827
27828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26717if test -z "$conf_utmp_location"; then 27829if test -z "$conf_utmp_location"; then
26718 if test x"$system_utmp_path" = x"no" ; then 27830 if test x"$system_utmp_path" = x"no" ; then
26719 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do 27831 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
@@ -26737,8 +27849,8 @@ _ACEOF
26737 27849
26738fi 27850fi
26739 27851
26740echo "$as_me:$LINENO: checking if your system defines WTMP_FILE" >&5 27852{ echo "$as_me:$LINENO: checking if your system defines WTMP_FILE" >&5
26741echo $ECHO_N "checking if your system defines WTMP_FILE... $ECHO_C" >&6 27853echo $ECHO_N "checking if your system defines WTMP_FILE... $ECHO_C" >&6; }
26742cat >conftest.$ac_ext <<_ACEOF 27854cat >conftest.$ac_ext <<_ACEOF
26743/* confdefs.h. */ 27855/* confdefs.h. */
26744_ACEOF 27856_ACEOF
@@ -26761,39 +27873,35 @@ main ()
26761} 27873}
26762_ACEOF 27874_ACEOF
26763rm -f conftest.$ac_objext 27875rm -f conftest.$ac_objext
26764if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 27876if { (ac_try="$ac_compile"
26765 (eval $ac_compile) 2>conftest.er1 27877case "(($ac_try" in
27878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27879 *) ac_try_echo=$ac_try;;
27880esac
27881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27882 (eval "$ac_compile") 2>conftest.er1
26766 ac_status=$? 27883 ac_status=$?
26767 grep -v '^ *+' conftest.er1 >conftest.err 27884 grep -v '^ *+' conftest.er1 >conftest.err
26768 rm -f conftest.er1 27885 rm -f conftest.er1
26769 cat conftest.err >&5 27886 cat conftest.err >&5
26770 echo "$as_me:$LINENO: \$? = $ac_status" >&5 27887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26771 (exit $ac_status); } && 27888 (exit $ac_status); } && {
26772 { ac_try='test -z "$ac_c_werror_flag" 27889 test -z "$ac_c_werror_flag" ||
26773 || test ! -s conftest.err' 27890 test ! -s conftest.err
26774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 27891 } && test -s conftest.$ac_objext; then
26775 (eval $ac_try) 2>&5 27892 { echo "$as_me:$LINENO: result: yes" >&5
26776 ac_status=$? 27893echo "${ECHO_T}yes" >&6; }
26777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26778 (exit $ac_status); }; } &&
26779 { ac_try='test -s conftest.$ac_objext'
26780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26781 (eval $ac_try) 2>&5
26782 ac_status=$?
26783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26784 (exit $ac_status); }; }; then
26785 echo "$as_me:$LINENO: result: yes" >&5
26786echo "${ECHO_T}yes" >&6
26787else 27894else
26788 echo "$as_me: failed program was:" >&5 27895 echo "$as_me: failed program was:" >&5
26789sed 's/^/| /' conftest.$ac_ext >&5 27896sed 's/^/| /' conftest.$ac_ext >&5
26790 27897
26791 echo "$as_me:$LINENO: result: no" >&5 27898 { echo "$as_me:$LINENO: result: no" >&5
26792echo "${ECHO_T}no" >&6 27899echo "${ECHO_T}no" >&6; }
26793 system_wtmp_path=no 27900 system_wtmp_path=no
26794 27901
26795fi 27902fi
26796rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 27903
27904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26797if test -z "$conf_wtmp_location"; then 27905if test -z "$conf_wtmp_location"; then
26798 if test x"$system_wtmp_path" = x"no" ; then 27906 if test x"$system_wtmp_path" = x"no" ; then
26799 for f in /usr/adm/wtmp /var/log/wtmp; do 27907 for f in /usr/adm/wtmp /var/log/wtmp; do
@@ -26818,8 +27926,8 @@ _ACEOF
26818fi 27926fi
26819 27927
26820 27928
26821echo "$as_me:$LINENO: checking if your system defines UTMPX_FILE" >&5 27929{ echo "$as_me:$LINENO: checking if your system defines UTMPX_FILE" >&5
26822echo $ECHO_N "checking if your system defines UTMPX_FILE... $ECHO_C" >&6 27930echo $ECHO_N "checking if your system defines UTMPX_FILE... $ECHO_C" >&6; }
26823cat >conftest.$ac_ext <<_ACEOF 27931cat >conftest.$ac_ext <<_ACEOF
26824/* confdefs.h. */ 27932/* confdefs.h. */
26825_ACEOF 27933_ACEOF
@@ -26845,39 +27953,35 @@ main ()
26845} 27953}
26846_ACEOF 27954_ACEOF
26847rm -f conftest.$ac_objext 27955rm -f conftest.$ac_objext
26848if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 27956if { (ac_try="$ac_compile"
26849 (eval $ac_compile) 2>conftest.er1 27957case "(($ac_try" in
27958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27959 *) ac_try_echo=$ac_try;;
27960esac
27961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27962 (eval "$ac_compile") 2>conftest.er1
26850 ac_status=$? 27963 ac_status=$?
26851 grep -v '^ *+' conftest.er1 >conftest.err 27964 grep -v '^ *+' conftest.er1 >conftest.err
26852 rm -f conftest.er1 27965 rm -f conftest.er1
26853 cat conftest.err >&5 27966 cat conftest.err >&5
26854 echo "$as_me:$LINENO: \$? = $ac_status" >&5 27967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26855 (exit $ac_status); } && 27968 (exit $ac_status); } && {
26856 { ac_try='test -z "$ac_c_werror_flag" 27969 test -z "$ac_c_werror_flag" ||
26857 || test ! -s conftest.err' 27970 test ! -s conftest.err
26858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 27971 } && test -s conftest.$ac_objext; then
26859 (eval $ac_try) 2>&5 27972 { echo "$as_me:$LINENO: result: yes" >&5
26860 ac_status=$? 27973echo "${ECHO_T}yes" >&6; }
26861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26862 (exit $ac_status); }; } &&
26863 { ac_try='test -s conftest.$ac_objext'
26864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26865 (eval $ac_try) 2>&5
26866 ac_status=$?
26867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26868 (exit $ac_status); }; }; then
26869 echo "$as_me:$LINENO: result: yes" >&5
26870echo "${ECHO_T}yes" >&6
26871else 27974else
26872 echo "$as_me: failed program was:" >&5 27975 echo "$as_me: failed program was:" >&5
26873sed 's/^/| /' conftest.$ac_ext >&5 27976sed 's/^/| /' conftest.$ac_ext >&5
26874 27977
26875 echo "$as_me:$LINENO: result: no" >&5 27978 { echo "$as_me:$LINENO: result: no" >&5
26876echo "${ECHO_T}no" >&6 27979echo "${ECHO_T}no" >&6; }
26877 system_utmpx_path=no 27980 system_utmpx_path=no
26878 27981
26879fi 27982fi
26880rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 27983
27984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26881if test -z "$conf_utmpx_location"; then 27985if test -z "$conf_utmpx_location"; then
26882 if test x"$system_utmpx_path" = x"no" ; then 27986 if test x"$system_utmpx_path" = x"no" ; then
26883 cat >>confdefs.h <<\_ACEOF 27987 cat >>confdefs.h <<\_ACEOF
@@ -26893,8 +27997,8 @@ _ACEOF
26893 27997
26894fi 27998fi
26895 27999
26896echo "$as_me:$LINENO: checking if your system defines WTMPX_FILE" >&5 28000{ echo "$as_me:$LINENO: checking if your system defines WTMPX_FILE" >&5
26897echo $ECHO_N "checking if your system defines WTMPX_FILE... $ECHO_C" >&6 28001echo $ECHO_N "checking if your system defines WTMPX_FILE... $ECHO_C" >&6; }
26898cat >conftest.$ac_ext <<_ACEOF 28002cat >conftest.$ac_ext <<_ACEOF
26899/* confdefs.h. */ 28003/* confdefs.h. */
26900_ACEOF 28004_ACEOF
@@ -26920,39 +28024,35 @@ main ()
26920} 28024}
26921_ACEOF 28025_ACEOF
26922rm -f conftest.$ac_objext 28026rm -f conftest.$ac_objext
26923if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 28027if { (ac_try="$ac_compile"
26924 (eval $ac_compile) 2>conftest.er1 28028case "(($ac_try" in
28029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28030 *) ac_try_echo=$ac_try;;
28031esac
28032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28033 (eval "$ac_compile") 2>conftest.er1
26925 ac_status=$? 28034 ac_status=$?
26926 grep -v '^ *+' conftest.er1 >conftest.err 28035 grep -v '^ *+' conftest.er1 >conftest.err
26927 rm -f conftest.er1 28036 rm -f conftest.er1
26928 cat conftest.err >&5 28037 cat conftest.err >&5
26929 echo "$as_me:$LINENO: \$? = $ac_status" >&5 28038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26930 (exit $ac_status); } && 28039 (exit $ac_status); } && {
26931 { ac_try='test -z "$ac_c_werror_flag" 28040 test -z "$ac_c_werror_flag" ||
26932 || test ! -s conftest.err' 28041 test ! -s conftest.err
26933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 28042 } && test -s conftest.$ac_objext; then
26934 (eval $ac_try) 2>&5 28043 { echo "$as_me:$LINENO: result: yes" >&5
26935 ac_status=$? 28044echo "${ECHO_T}yes" >&6; }
26936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26937 (exit $ac_status); }; } &&
26938 { ac_try='test -s conftest.$ac_objext'
26939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26940 (eval $ac_try) 2>&5
26941 ac_status=$?
26942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26943 (exit $ac_status); }; }; then
26944 echo "$as_me:$LINENO: result: yes" >&5
26945echo "${ECHO_T}yes" >&6
26946else 28045else
26947 echo "$as_me: failed program was:" >&5 28046 echo "$as_me: failed program was:" >&5
26948sed 's/^/| /' conftest.$ac_ext >&5 28047sed 's/^/| /' conftest.$ac_ext >&5
26949 28048
26950 echo "$as_me:$LINENO: result: no" >&5 28049 { echo "$as_me:$LINENO: result: no" >&5
26951echo "${ECHO_T}no" >&6 28050echo "${ECHO_T}no" >&6; }
26952 system_wtmpx_path=no 28051 system_wtmpx_path=no
26953 28052
26954fi 28053fi
26955rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 28054
28055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26956if test -z "$conf_wtmpx_location"; then 28056if test -z "$conf_wtmpx_location"; then
26957 if test x"$system_wtmpx_path" = x"no" ; then 28057 if test x"$system_wtmpx_path" = x"no" ; then
26958 cat >>confdefs.h <<\_ACEOF 28058 cat >>confdefs.h <<\_ACEOF
@@ -26975,17 +28075,10 @@ if test ! -z "$blibpath" ; then
26975echo "$as_me: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&2;} 28075echo "$as_me: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&2;}
26976fi 28076fi
26977 28077
26978if test "$PAM_MSG" = yes ; then
26979 LIBS=`echo $LIBS | sed 's/-lpam //'`
26980fi
26981if test "$ac_cv_lib_pam_pam_set_item" = yes ; then
26982 LIBS=`echo $LIBS | sed 's/-ldl //'`
26983fi
26984
26985CFLAGS="$CFLAGS $werror_flags" 28078CFLAGS="$CFLAGS $werror_flags"
26986 28079
26987 28080
26988 ac_config_files="$ac_config_files Makefile buildpkg.sh opensshd.init openbsd-compat/Makefile scard/Makefile ssh_prng_cmds survey.sh" 28081ac_config_files="$ac_config_files Makefile buildpkg.sh opensshd.init openssh.xml openbsd-compat/Makefile openbsd-compat/regress/Makefile scard/Makefile ssh_prng_cmds survey.sh"
26989 28082
26990cat >confcache <<\_ACEOF 28083cat >confcache <<\_ACEOF
26991# This file is a shell script that caches the results of configure 28084# This file is a shell script that caches the results of configure
@@ -27005,39 +28098,58 @@ _ACEOF
27005 28098
27006# The following way of writing the cache mishandles newlines in values, 28099# The following way of writing the cache mishandles newlines in values,
27007# but we know of no workaround that is simple, portable, and efficient. 28100# but we know of no workaround that is simple, portable, and efficient.
27008# So, don't put newlines in cache variables' values. 28101# So, we kill variables containing newlines.
27009# Ultrix sh set writes to stderr and can't be redirected directly, 28102# Ultrix sh set writes to stderr and can't be redirected directly,
27010# and sets the high bit in the cache file unless we assign to the vars. 28103# and sets the high bit in the cache file unless we assign to the vars.
27011{ 28104(
28105 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
28106 eval ac_val=\$$ac_var
28107 case $ac_val in #(
28108 *${as_nl}*)
28109 case $ac_var in #(
28110 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
28111echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
28112 esac
28113 case $ac_var in #(
28114 _ | IFS | as_nl) ;; #(
28115 *) $as_unset $ac_var ;;
28116 esac ;;
28117 esac
28118 done
28119
27012 (set) 2>&1 | 28120 (set) 2>&1 |
27013 case `(ac_space=' '; set | grep ac_space) 2>&1` in 28121 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27014 *ac_space=\ *) 28122 *${as_nl}ac_space=\ *)
27015 # `set' does not quote correctly, so add quotes (double-quote 28123 # `set' does not quote correctly, so add quotes (double-quote
27016 # substitution turns \\\\ into \\, and sed turns \\ into \). 28124 # substitution turns \\\\ into \\, and sed turns \\ into \).
27017 sed -n \ 28125 sed -n \
27018 "s/'/'\\\\''/g; 28126 "s/'/'\\\\''/g;
27019 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" 28127 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
27020 ;; 28128 ;; #(
27021 *) 28129 *)
27022 # `set' quotes correctly as required by POSIX, so do not add quotes. 28130 # `set' quotes correctly as required by POSIX, so do not add quotes.
27023 sed -n \ 28131 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
27024 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
27025 ;; 28132 ;;
27026 esac; 28133 esac |
27027} | 28134 sort
28135) |
27028 sed ' 28136 sed '
28137 /^ac_cv_env_/b end
27029 t clear 28138 t clear
27030 : clear 28139 :clear
27031 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ 28140 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27032 t end 28141 t end
27033 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ 28142 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27034 : end' >>confcache 28143 :end' >>confcache
27035if diff $cache_file confcache >/dev/null 2>&1; then :; else 28144if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27036 if test -w $cache_file; then 28145 if test -w "$cache_file"; then
27037 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" 28146 test "x$cache_file" != "x/dev/null" &&
28147 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
28148echo "$as_me: updating cache $cache_file" >&6;}
27038 cat confcache >$cache_file 28149 cat confcache >$cache_file
27039 else 28150 else
27040 echo "not updating unwritable cache $cache_file" 28151 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
28152echo "$as_me: not updating unwritable cache $cache_file" >&6;}
27041 fi 28153 fi
27042fi 28154fi
27043rm -f confcache 28155rm -f confcache
@@ -27046,32 +28158,18 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix
27046# Let make expand exec_prefix. 28158# Let make expand exec_prefix.
27047test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 28159test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
27048 28160
27049# VPATH may cause trouble with some makes, so we remove $(srcdir),
27050# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27051# trailing colons and then remove the whole line if VPATH becomes empty
27052# (actually we leave an empty line to preserve line numbers).
27053if test "x$srcdir" = x.; then
27054 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27055s/:*\$(srcdir):*/:/;
27056s/:*\${srcdir}:*/:/;
27057s/:*@srcdir@:*/:/;
27058s/^\([^=]*=[ ]*\):*/\1/;
27059s/:*$//;
27060s/^[^=]*=[ ]*$//;
27061}'
27062fi
27063
27064DEFS=-DHAVE_CONFIG_H 28161DEFS=-DHAVE_CONFIG_H
27065 28162
27066ac_libobjs= 28163ac_libobjs=
27067ac_ltlibobjs= 28164ac_ltlibobjs=
27068for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 28165for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27069 # 1. Remove the extension, and $U if already installed. 28166 # 1. Remove the extension, and $U if already installed.
27070 ac_i=`echo "$ac_i" | 28167 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
27071 sed 's/\$U\././;s/\.o$//;s/\.obj$//'` 28168 ac_i=`echo "$ac_i" | sed "$ac_script"`
27072 # 2. Add them. 28169 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27073 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" 28170 # will be set to the directory where LIBOBJS objects are built.
27074 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' 28171 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
28172 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
27075done 28173done
27076LIBOBJS=$ac_libobjs 28174LIBOBJS=$ac_libobjs
27077 28175
@@ -27102,17 +28200,45 @@ cat >>$CONFIG_STATUS <<\_ACEOF
27102## M4sh Initialization. ## 28200## M4sh Initialization. ##
27103## --------------------- ## 28201## --------------------- ##
27104 28202
27105# Be Bourne compatible 28203# Be more Bourne compatible
28204DUALCASE=1; export DUALCASE # for MKS sh
27106if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 28205if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27107 emulate sh 28206 emulate sh
27108 NULLCMD=: 28207 NULLCMD=:
27109 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which 28208 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
27110 # is contrary to our usage. Disable this feature. 28209 # is contrary to our usage. Disable this feature.
27111 alias -g '${1+"$@"}'='"$@"' 28210 alias -g '${1+"$@"}'='"$@"'
27112elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then 28211 setopt NO_GLOB_SUBST
27113 set -o posix 28212else
28213 case `(set -o) 2>/dev/null` in
28214 *posix*) set -o posix ;;
28215esac
28216
28217fi
28218
28219
28220
28221
28222# PATH needs CR
28223# Avoid depending upon Character Ranges.
28224as_cr_letters='abcdefghijklmnopqrstuvwxyz'
28225as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
28226as_cr_Letters=$as_cr_letters$as_cr_LETTERS
28227as_cr_digits='0123456789'
28228as_cr_alnum=$as_cr_Letters$as_cr_digits
28229
28230# The user is always right.
28231if test "${PATH_SEPARATOR+set}" != set; then
28232 echo "#! /bin/sh" >conf$$.sh
28233 echo "exit 0" >>conf$$.sh
28234 chmod +x conf$$.sh
28235 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
28236 PATH_SEPARATOR=';'
28237 else
28238 PATH_SEPARATOR=:
28239 fi
28240 rm -f conf$$.sh
27114fi 28241fi
27115DUALCASE=1; export DUALCASE # for MKS sh
27116 28242
27117# Support unset when possible. 28243# Support unset when possible.
27118if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 28244if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
@@ -27122,8 +28248,43 @@ else
27122fi 28248fi
27123 28249
27124 28250
28251# IFS
28252# We need space, tab and new line, in precisely that order. Quoting is
28253# there to prevent editors from complaining about space-tab.
28254# (If _AS_PATH_WALK were called with IFS unset, it would disable word
28255# splitting by setting IFS to empty value.)
28256as_nl='
28257'
28258IFS=" "" $as_nl"
28259
28260# Find who we are. Look in the path if we contain no directory separator.
28261case $0 in
28262 *[\\/]* ) as_myself=$0 ;;
28263 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28264for as_dir in $PATH
28265do
28266 IFS=$as_save_IFS
28267 test -z "$as_dir" && as_dir=.
28268 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
28269done
28270IFS=$as_save_IFS
28271
28272 ;;
28273esac
28274# We did not find ourselves, most probably we were run as `sh COMMAND'
28275# in which case we are not to be found in the path.
28276if test "x$as_myself" = x; then
28277 as_myself=$0
28278fi
28279if test ! -f "$as_myself"; then
28280 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
28281 { (exit 1); exit 1; }
28282fi
28283
27125# Work around bugs in pre-3.0 UWIN ksh. 28284# Work around bugs in pre-3.0 UWIN ksh.
27126$as_unset ENV MAIL MAILPATH 28285for as_var in ENV MAIL MAILPATH
28286do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
28287done
27127PS1='$ ' 28288PS1='$ '
27128PS2='> ' 28289PS2='> '
27129PS4='+ ' 28290PS4='+ '
@@ -27137,18 +28298,19 @@ do
27137 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then 28298 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27138 eval $as_var=C; export $as_var 28299 eval $as_var=C; export $as_var
27139 else 28300 else
27140 $as_unset $as_var 28301 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27141 fi 28302 fi
27142done 28303done
27143 28304
27144# Required to use basename. 28305# Required to use basename.
27145if expr a : '\(a\)' >/dev/null 2>&1; then 28306if expr a : '\(a\)' >/dev/null 2>&1 &&
28307 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27146 as_expr=expr 28308 as_expr=expr
27147else 28309else
27148 as_expr=false 28310 as_expr=false
27149fi 28311fi
27150 28312
27151if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then 28313if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27152 as_basename=basename 28314 as_basename=basename
27153else 28315else
27154 as_basename=false 28316 as_basename=false
@@ -27156,159 +28318,120 @@ fi
27156 28318
27157 28319
27158# Name of the executable. 28320# Name of the executable.
27159as_me=`$as_basename "$0" || 28321as_me=`$as_basename -- "$0" ||
27160$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 28322$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27161 X"$0" : 'X\(//\)$' \| \ 28323 X"$0" : 'X\(//\)$' \| \
27162 X"$0" : 'X\(/\)$' \| \ 28324 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
27163 . : '\(.\)' 2>/dev/null ||
27164echo X/"$0" | 28325echo X/"$0" |
27165 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } 28326 sed '/^.*\/\([^/][^/]*\)\/*$/{
27166 /^X\/\(\/\/\)$/{ s//\1/; q; } 28327 s//\1/
27167 /^X\/\(\/\).*/{ s//\1/; q; } 28328 q
27168 s/.*/./; q'` 28329 }
28330 /^X\/\(\/\/\)$/{
28331 s//\1/
28332 q
28333 }
28334 /^X\/\(\/\).*/{
28335 s//\1/
28336 q
28337 }
28338 s/.*/./; q'`
27169 28339
27170 28340# CDPATH.
27171# PATH needs CR, and LINENO needs CR and PATH. 28341$as_unset CDPATH
27172# Avoid depending upon Character Ranges.
27173as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27174as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27175as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27176as_cr_digits='0123456789'
27177as_cr_alnum=$as_cr_Letters$as_cr_digits
27178
27179# The user is always right.
27180if test "${PATH_SEPARATOR+set}" != set; then
27181 echo "#! /bin/sh" >conf$$.sh
27182 echo "exit 0" >>conf$$.sh
27183 chmod +x conf$$.sh
27184 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27185 PATH_SEPARATOR=';'
27186 else
27187 PATH_SEPARATOR=:
27188 fi
27189 rm -f conf$$.sh
27190fi
27191 28342
27192 28343
27193 as_lineno_1=$LINENO
27194 as_lineno_2=$LINENO
27195 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
27196 test "x$as_lineno_1" != "x$as_lineno_2" &&
27197 test "x$as_lineno_3" = "x$as_lineno_2" || {
27198 # Find who we are. Look in the path if we contain no path at all
27199 # relative or not.
27200 case $0 in
27201 *[\\/]* ) as_myself=$0 ;;
27202 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27203for as_dir in $PATH
27204do
27205 IFS=$as_save_IFS
27206 test -z "$as_dir" && as_dir=.
27207 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27208done
27209 28344
27210 ;;
27211 esac
27212 # We did not find ourselves, most probably we were run as `sh COMMAND'
27213 # in which case we are not to be found in the path.
27214 if test "x$as_myself" = x; then
27215 as_myself=$0
27216 fi
27217 if test ! -f "$as_myself"; then
27218 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
27219echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
27220 { (exit 1); exit 1; }; }
27221 fi
27222 case $CONFIG_SHELL in
27223 '')
27224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
27226do
27227 IFS=$as_save_IFS
27228 test -z "$as_dir" && as_dir=.
27229 for as_base in sh bash ksh sh5; do
27230 case $as_dir in
27231 /*)
27232 if ("$as_dir/$as_base" -c '
27233 as_lineno_1=$LINENO 28345 as_lineno_1=$LINENO
27234 as_lineno_2=$LINENO 28346 as_lineno_2=$LINENO
27235 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
27236 test "x$as_lineno_1" != "x$as_lineno_2" && 28347 test "x$as_lineno_1" != "x$as_lineno_2" &&
27237 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then 28348 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
27238 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
27239 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
27240 CONFIG_SHELL=$as_dir/$as_base
27241 export CONFIG_SHELL
27242 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
27243 fi;;
27244 esac
27245 done
27246done
27247;;
27248 esac
27249 28349
27250 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO 28350 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27251 # uniformly replaced by the line number. The first 'sed' inserts a 28351 # uniformly replaced by the line number. The first 'sed' inserts a
27252 # line-number line before each line; the second 'sed' does the real 28352 # line-number line after each line using $LINENO; the second 'sed'
27253 # work. The second script uses 'N' to pair each line-number line 28353 # does the real work. The second script uses 'N' to pair each
27254 # with the numbered line, and appends trailing '-' during 28354 # line-number line with the line containing $LINENO, and appends
27255 # substitution so that $LINENO is not a special case at line end. 28355 # trailing '-' during substitution so that $LINENO is not a special
28356 # case at line end.
27256 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the 28357 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
27257 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) 28358 # scripts with optimization help from Paolo Bonzini. Blame Lee
27258 sed '=' <$as_myself | 28359 # E. McMahon (1931-1989) for sed's syntax. :-)
28360 sed -n '
28361 p
28362 /[$]LINENO/=
28363 ' <$as_myself |
27259 sed ' 28364 sed '
28365 s/[$]LINENO.*/&-/
28366 t lineno
28367 b
28368 :lineno
27260 N 28369 N
27261 s,$,-, 28370 :loop
27262 : loop 28371 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
27263 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
27264 t loop 28372 t loop
27265 s,-$,, 28373 s/-\n.*//
27266 s,^['$as_cr_digits']*\n,,
27267 ' >$as_me.lineno && 28374 ' >$as_me.lineno &&
27268 chmod +x $as_me.lineno || 28375 chmod +x "$as_me.lineno" ||
27269 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 28376 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
27270echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
27271 { (exit 1); exit 1; }; } 28377 { (exit 1); exit 1; }; }
27272 28378
27273 # Don't try to exec as it changes $[0], causing all sort of problems 28379 # Don't try to exec as it changes $[0], causing all sort of problems
27274 # (the dirname of $[0] is not the place where we might find the 28380 # (the dirname of $[0] is not the place where we might find the
27275 # original and so on. Autoconf is especially sensible to this). 28381 # original and so on. Autoconf is especially sensitive to this).
27276 . ./$as_me.lineno 28382 . "./$as_me.lineno"
27277 # Exit status is that of the last command. 28383 # Exit status is that of the last command.
27278 exit 28384 exit
27279} 28385}
27280 28386
27281 28387
27282case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in 28388if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27283 *c*,-n*) ECHO_N= ECHO_C=' 28389 as_dirname=dirname
27284' ECHO_T=' ' ;; 28390else
27285 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; 28391 as_dirname=false
27286 *) ECHO_N= ECHO_C='\c' ECHO_T= ;; 28392fi
28393
28394ECHO_C= ECHO_N= ECHO_T=
28395case `echo -n x` in
28396-n*)
28397 case `echo 'x\c'` in
28398 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
28399 *) ECHO_C='\c';;
28400 esac;;
28401*)
28402 ECHO_N='-n';;
27287esac 28403esac
27288 28404
27289if expr a : '\(a\)' >/dev/null 2>&1; then 28405if expr a : '\(a\)' >/dev/null 2>&1 &&
28406 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27290 as_expr=expr 28407 as_expr=expr
27291else 28408else
27292 as_expr=false 28409 as_expr=false
27293fi 28410fi
27294 28411
27295rm -f conf$$ conf$$.exe conf$$.file 28412rm -f conf$$ conf$$.exe conf$$.file
28413if test -d conf$$.dir; then
28414 rm -f conf$$.dir/conf$$.file
28415else
28416 rm -f conf$$.dir
28417 mkdir conf$$.dir
28418fi
27296echo >conf$$.file 28419echo >conf$$.file
27297if ln -s conf$$.file conf$$ 2>/dev/null; then 28420if ln -s conf$$.file conf$$ 2>/dev/null; then
27298 # We could just check for DJGPP; but this test a) works b) is more generic 28421 as_ln_s='ln -s'
27299 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). 28422 # ... but there are two gotchas:
27300 if test -f conf$$.exe; then 28423 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27301 # Don't use ln at all; we don't have any links 28424 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
28425 # In both cases, we have to default to `cp -p'.
28426 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
27302 as_ln_s='cp -p' 28427 as_ln_s='cp -p'
27303 else
27304 as_ln_s='ln -s'
27305 fi
27306elif ln conf$$.file conf$$ 2>/dev/null; then 28428elif ln conf$$.file conf$$ 2>/dev/null; then
27307 as_ln_s=ln 28429 as_ln_s=ln
27308else 28430else
27309 as_ln_s='cp -p' 28431 as_ln_s='cp -p'
27310fi 28432fi
27311rm -f conf$$ conf$$.exe conf$$.file 28433rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
28434rmdir conf$$.dir 2>/dev/null
27312 28435
27313if mkdir -p . 2>/dev/null; then 28436if mkdir -p . 2>/dev/null; then
27314 as_mkdir_p=: 28437 as_mkdir_p=:
@@ -27317,7 +28440,28 @@ else
27317 as_mkdir_p=false 28440 as_mkdir_p=false
27318fi 28441fi
27319 28442
27320as_executable_p="test -f" 28443if test -x / >/dev/null 2>&1; then
28444 as_test_x='test -x'
28445else
28446 if ls -dL / >/dev/null 2>&1; then
28447 as_ls_L_option=L
28448 else
28449 as_ls_L_option=
28450 fi
28451 as_test_x='
28452 eval sh -c '\''
28453 if test -d "$1"; then
28454 test -d "$1/.";
28455 else
28456 case $1 in
28457 -*)set "./$1";;
28458 esac;
28459 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
28460 ???[sx]*):;;*)false;;esac;fi
28461 '\'' sh
28462 '
28463fi
28464as_executable_p=$as_test_x
27321 28465
27322# Sed expression to map a string onto a valid CPP name. 28466# Sed expression to map a string onto a valid CPP name.
27323as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 28467as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -27326,31 +28470,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
27326as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 28470as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
27327 28471
27328 28472
27329# IFS
27330# We need space, tab and new line, in precisely that order.
27331as_nl='
27332'
27333IFS=" $as_nl"
27334
27335# CDPATH.
27336$as_unset CDPATH
27337
27338exec 6>&1 28473exec 6>&1
27339 28474
27340# Open the log real soon, to keep \$[0] and so on meaningful, and to 28475# Save the log message, to keep $[0] and so on meaningful, and to
27341# report actual input values of CONFIG_FILES etc. instead of their 28476# report actual input values of CONFIG_FILES etc. instead of their
27342# values after options handling. Logging --version etc. is OK. 28477# values after options handling.
27343exec 5>>config.log 28478ac_log="
27344{
27345 echo
27346 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27347## Running $as_me. ##
27348_ASBOX
27349} >&5
27350cat >&5 <<_CSEOF
27351
27352This file was extended by OpenSSH $as_me Portable, which was 28479This file was extended by OpenSSH $as_me Portable, which was
27353generated by GNU Autoconf 2.59. Invocation command line was 28480generated by GNU Autoconf 2.61. Invocation command line was
27354 28481
27355 CONFIG_FILES = $CONFIG_FILES 28482 CONFIG_FILES = $CONFIG_FILES
27356 CONFIG_HEADERS = $CONFIG_HEADERS 28483 CONFIG_HEADERS = $CONFIG_HEADERS
@@ -27358,30 +28485,19 @@ generated by GNU Autoconf 2.59. Invocation command line was
27358 CONFIG_COMMANDS = $CONFIG_COMMANDS 28485 CONFIG_COMMANDS = $CONFIG_COMMANDS
27359 $ $0 $@ 28486 $ $0 $@
27360 28487
27361_CSEOF 28488on `(hostname || uname -n) 2>/dev/null | sed 1q`
27362echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 28489"
27363echo >&5 28490
27364_ACEOF 28491_ACEOF
27365 28492
28493cat >>$CONFIG_STATUS <<_ACEOF
27366# Files that config.status was made for. 28494# Files that config.status was made for.
27367if test -n "$ac_config_files"; then 28495config_files="$ac_config_files"
27368 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS 28496config_headers="$ac_config_headers"
27369fi
27370
27371if test -n "$ac_config_headers"; then
27372 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
27373fi
27374 28497
27375if test -n "$ac_config_links"; then 28498_ACEOF
27376 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
27377fi
27378
27379if test -n "$ac_config_commands"; then
27380 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
27381fi
27382 28499
27383cat >>$CONFIG_STATUS <<\_ACEOF 28500cat >>$CONFIG_STATUS <<\_ACEOF
27384
27385ac_cs_usage="\ 28501ac_cs_usage="\
27386\`$as_me' instantiates files from templates according to the 28502\`$as_me' instantiates files from templates according to the
27387current configuration. 28503current configuration.
@@ -27389,7 +28505,7 @@ current configuration.
27389Usage: $0 [OPTIONS] [FILE]... 28505Usage: $0 [OPTIONS] [FILE]...
27390 28506
27391 -h, --help print this help, then exit 28507 -h, --help print this help, then exit
27392 -V, --version print version number, then exit 28508 -V, --version print version number and configuration settings, then exit
27393 -q, --quiet do not print progress messages 28509 -q, --quiet do not print progress messages
27394 -d, --debug don't remove temporary files 28510 -d, --debug don't remove temporary files
27395 --recheck update $as_me by reconfiguring in the same conditions 28511 --recheck update $as_me by reconfiguring in the same conditions
@@ -27405,19 +28521,21 @@ Configuration headers:
27405$config_headers 28521$config_headers
27406 28522
27407Report bugs to <bug-autoconf@gnu.org>." 28523Report bugs to <bug-autoconf@gnu.org>."
27408_ACEOF
27409 28524
28525_ACEOF
27410cat >>$CONFIG_STATUS <<_ACEOF 28526cat >>$CONFIG_STATUS <<_ACEOF
27411ac_cs_version="\\ 28527ac_cs_version="\\
27412OpenSSH config.status Portable 28528OpenSSH config.status Portable
27413configured by $0, generated by GNU Autoconf 2.59, 28529configured by $0, generated by GNU Autoconf 2.61,
27414 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" 28530 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
27415 28531
27416Copyright (C) 2003 Free Software Foundation, Inc. 28532Copyright (C) 2006 Free Software Foundation, Inc.
27417This config.status script is free software; the Free Software Foundation 28533This config.status script is free software; the Free Software Foundation
27418gives unlimited permission to copy, distribute and modify it." 28534gives unlimited permission to copy, distribute and modify it."
27419srcdir=$srcdir 28535
27420INSTALL="$INSTALL" 28536ac_pwd='$ac_pwd'
28537srcdir='$srcdir'
28538INSTALL='$INSTALL'
27421_ACEOF 28539_ACEOF
27422 28540
27423cat >>$CONFIG_STATUS <<\_ACEOF 28541cat >>$CONFIG_STATUS <<\_ACEOF
@@ -27428,39 +28546,24 @@ while test $# != 0
27428do 28546do
27429 case $1 in 28547 case $1 in
27430 --*=*) 28548 --*=*)
27431 ac_option=`expr "x$1" : 'x\([^=]*\)='` 28549 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27432 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` 28550 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
27433 ac_shift=: 28551 ac_shift=:
27434 ;; 28552 ;;
27435 -*) 28553 *)
27436 ac_option=$1 28554 ac_option=$1
27437 ac_optarg=$2 28555 ac_optarg=$2
27438 ac_shift=shift 28556 ac_shift=shift
27439 ;; 28557 ;;
27440 *) # This is not an option, so the user has probably given explicit
27441 # arguments.
27442 ac_option=$1
27443 ac_need_defaults=false;;
27444 esac 28558 esac
27445 28559
27446 case $ac_option in 28560 case $ac_option in
27447 # Handling of the options. 28561 # Handling of the options.
27448_ACEOF
27449cat >>$CONFIG_STATUS <<\_ACEOF
27450 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 28562 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27451 ac_cs_recheck=: ;; 28563 ac_cs_recheck=: ;;
27452 --version | --vers* | -V ) 28564 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
27453 echo "$ac_cs_version"; exit 0 ;; 28565 echo "$ac_cs_version"; exit ;;
27454 --he | --h) 28566 --debug | --debu | --deb | --de | --d | -d )
27455 # Conflict between --help and --header
27456 { { echo "$as_me:$LINENO: error: ambiguous option: $1
27457Try \`$0 --help' for more information." >&5
27458echo "$as_me: error: ambiguous option: $1
27459Try \`$0 --help' for more information." >&2;}
27460 { (exit 1); exit 1; }; };;
27461 --help | --hel | -h )
27462 echo "$ac_cs_usage"; exit 0 ;;
27463 --debug | --d* | -d )
27464 debug=: ;; 28567 debug=: ;;
27465 --file | --fil | --fi | --f ) 28568 --file | --fil | --fi | --f )
27466 $ac_shift 28569 $ac_shift
@@ -27470,18 +28573,24 @@ Try \`$0 --help' for more information." >&2;}
27470 $ac_shift 28573 $ac_shift
27471 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" 28574 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
27472 ac_need_defaults=false;; 28575 ac_need_defaults=false;;
28576 --he | --h)
28577 # Conflict between --help and --header
28578 { echo "$as_me: error: ambiguous option: $1
28579Try \`$0 --help' for more information." >&2
28580 { (exit 1); exit 1; }; };;
28581 --help | --hel | -h )
28582 echo "$ac_cs_usage"; exit ;;
27473 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 28583 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27474 | -silent | --silent | --silen | --sile | --sil | --si | --s) 28584 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27475 ac_cs_silent=: ;; 28585 ac_cs_silent=: ;;
27476 28586
27477 # This is an error. 28587 # This is an error.
27478 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 28588 -*) { echo "$as_me: error: unrecognized option: $1
27479Try \`$0 --help' for more information." >&5 28589Try \`$0 --help' for more information." >&2
27480echo "$as_me: error: unrecognized option: $1
27481Try \`$0 --help' for more information." >&2;}
27482 { (exit 1); exit 1; }; } ;; 28590 { (exit 1); exit 1; }; } ;;
27483 28591
27484 *) ac_config_targets="$ac_config_targets $1" ;; 28592 *) ac_config_targets="$ac_config_targets $1"
28593 ac_need_defaults=false ;;
27485 28594
27486 esac 28595 esac
27487 shift 28596 shift
@@ -27497,35 +28606,51 @@ fi
27497_ACEOF 28606_ACEOF
27498cat >>$CONFIG_STATUS <<_ACEOF 28607cat >>$CONFIG_STATUS <<_ACEOF
27499if \$ac_cs_recheck; then 28608if \$ac_cs_recheck; then
27500 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 28609 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27501 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion 28610 CONFIG_SHELL=$SHELL
28611 export CONFIG_SHELL
28612 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
27502fi 28613fi
27503 28614
27504_ACEOF 28615_ACEOF
28616cat >>$CONFIG_STATUS <<\_ACEOF
28617exec 5>>config.log
28618{
28619 echo
28620 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28621## Running $as_me. ##
28622_ASBOX
28623 echo "$ac_log"
28624} >&5
27505 28625
27506 28626_ACEOF
27507 28627cat >>$CONFIG_STATUS <<_ACEOF
27508 28628_ACEOF
27509 28629
27510cat >>$CONFIG_STATUS <<\_ACEOF 28630cat >>$CONFIG_STATUS <<\_ACEOF
28631
28632# Handling of arguments.
27511for ac_config_target in $ac_config_targets 28633for ac_config_target in $ac_config_targets
27512do 28634do
27513 case "$ac_config_target" in 28635 case $ac_config_target in
27514 # Handling of arguments. 28636 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
27515 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; 28637 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
27516 "buildpkg.sh" ) CONFIG_FILES="$CONFIG_FILES buildpkg.sh" ;; 28638 "buildpkg.sh") CONFIG_FILES="$CONFIG_FILES buildpkg.sh" ;;
27517 "opensshd.init" ) CONFIG_FILES="$CONFIG_FILES opensshd.init" ;; 28639 "opensshd.init") CONFIG_FILES="$CONFIG_FILES opensshd.init" ;;
27518 "openbsd-compat/Makefile" ) CONFIG_FILES="$CONFIG_FILES openbsd-compat/Makefile" ;; 28640 "openssh.xml") CONFIG_FILES="$CONFIG_FILES openssh.xml" ;;
27519 "scard/Makefile" ) CONFIG_FILES="$CONFIG_FILES scard/Makefile" ;; 28641 "openbsd-compat/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/Makefile" ;;
27520 "ssh_prng_cmds" ) CONFIG_FILES="$CONFIG_FILES ssh_prng_cmds" ;; 28642 "openbsd-compat/regress/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/regress/Makefile" ;;
27521 "survey.sh" ) CONFIG_FILES="$CONFIG_FILES survey.sh" ;; 28643 "scard/Makefile") CONFIG_FILES="$CONFIG_FILES scard/Makefile" ;;
27522 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; 28644 "ssh_prng_cmds") CONFIG_FILES="$CONFIG_FILES ssh_prng_cmds" ;;
28645 "survey.sh") CONFIG_FILES="$CONFIG_FILES survey.sh" ;;
28646
27523 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 28647 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27524echo "$as_me: error: invalid argument: $ac_config_target" >&2;} 28648echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
27525 { (exit 1); exit 1; }; };; 28649 { (exit 1); exit 1; }; };;
27526 esac 28650 esac
27527done 28651done
27528 28652
28653
27529# If the user did not use the arguments to specify the items to instantiate, 28654# If the user did not use the arguments to specify the items to instantiate,
27530# then the envvar interface is used. Set only those that are not. 28655# then the envvar interface is used. Set only those that are not.
27531# We use the long form for the default assignment because of an extremely 28656# We use the long form for the default assignment because of an extremely
@@ -27536,610 +28661,605 @@ if $ac_need_defaults; then
27536fi 28661fi
27537 28662
27538# Have a temporary directory for convenience. Make it in the build tree 28663# Have a temporary directory for convenience. Make it in the build tree
27539# simply because there is no reason to put it here, and in addition, 28664# simply because there is no reason against having it here, and in addition,
27540# creating and moving files from /tmp can sometimes cause problems. 28665# creating and moving files from /tmp can sometimes cause problems.
27541# Create a temporary directory, and hook for its removal unless debugging. 28666# Hook for its removal unless debugging.
28667# Note that there is a small window in which the directory will not be cleaned:
28668# after its creation but before its name has been assigned to `$tmp'.
27542$debug || 28669$debug ||
27543{ 28670{
27544 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 28671 tmp=
28672 trap 'exit_status=$?
28673 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
28674' 0
27545 trap '{ (exit 1); exit 1; }' 1 2 13 15 28675 trap '{ (exit 1); exit 1; }' 1 2 13 15
27546} 28676}
27547
27548# Create a (secure) tmp directory for tmp files. 28677# Create a (secure) tmp directory for tmp files.
27549 28678
27550{ 28679{
27551 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && 28680 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
27552 test -n "$tmp" && test -d "$tmp" 28681 test -n "$tmp" && test -d "$tmp"
27553} || 28682} ||
27554{ 28683{
27555 tmp=./confstat$$-$RANDOM 28684 tmp=./conf$$-$RANDOM
27556 (umask 077 && mkdir $tmp) 28685 (umask 077 && mkdir "$tmp")
27557} || 28686} ||
27558{ 28687{
27559 echo "$me: cannot create a temporary directory in ." >&2 28688 echo "$me: cannot create a temporary directory in ." >&2
27560 { (exit 1); exit 1; } 28689 { (exit 1); exit 1; }
27561} 28690}
27562 28691
27563_ACEOF
27564
27565cat >>$CONFIG_STATUS <<_ACEOF
27566
27567# 28692#
27568# CONFIG_FILES section. 28693# Set up the sed scripts for CONFIG_FILES section.
27569# 28694#
27570 28695
27571# No need to generate the scripts if there are no CONFIG_FILES. 28696# No need to generate the scripts if there are no CONFIG_FILES.
27572# This happens for instance when ./config.status config.h 28697# This happens for instance when ./config.status config.h
27573if test -n "\$CONFIG_FILES"; then 28698if test -n "$CONFIG_FILES"; then
27574 # Protect against being on the right side of a sed subst in config.status. 28699
27575 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; 28700_ACEOF
27576 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF 28701
27577s,@SHELL@,$SHELL,;t t 28702
27578s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t 28703
27579s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t 28704ac_delim='%!_!# '
27580s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t 28705for ac_last_try in false false false false false :; do
27581s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t 28706 cat >conf$$subs.sed <<_ACEOF
27582s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t 28707SHELL!$SHELL$ac_delim
27583s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t 28708PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27584s,@exec_prefix@,$exec_prefix,;t t 28709PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27585s,@prefix@,$prefix,;t t 28710PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27586s,@program_transform_name@,$program_transform_name,;t t 28711PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27587s,@bindir@,$bindir,;t t 28712PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27588s,@sbindir@,$sbindir,;t t 28713PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27589s,@libexecdir@,$libexecdir,;t t 28714exec_prefix!$exec_prefix$ac_delim
27590s,@datadir@,$datadir,;t t 28715prefix!$prefix$ac_delim
27591s,@sysconfdir@,$sysconfdir,;t t 28716program_transform_name!$program_transform_name$ac_delim
27592s,@sharedstatedir@,$sharedstatedir,;t t 28717bindir!$bindir$ac_delim
27593s,@localstatedir@,$localstatedir,;t t 28718sbindir!$sbindir$ac_delim
27594s,@libdir@,$libdir,;t t 28719libexecdir!$libexecdir$ac_delim
27595s,@includedir@,$includedir,;t t 28720datarootdir!$datarootdir$ac_delim
27596s,@oldincludedir@,$oldincludedir,;t t 28721datadir!$datadir$ac_delim
27597s,@infodir@,$infodir,;t t 28722sysconfdir!$sysconfdir$ac_delim
27598s,@mandir@,$mandir,;t t 28723sharedstatedir!$sharedstatedir$ac_delim
27599s,@build_alias@,$build_alias,;t t 28724localstatedir!$localstatedir$ac_delim
27600s,@host_alias@,$host_alias,;t t 28725includedir!$includedir$ac_delim
27601s,@target_alias@,$target_alias,;t t 28726oldincludedir!$oldincludedir$ac_delim
27602s,@DEFS@,$DEFS,;t t 28727docdir!$docdir$ac_delim
27603s,@ECHO_C@,$ECHO_C,;t t 28728infodir!$infodir$ac_delim
27604s,@ECHO_N@,$ECHO_N,;t t 28729htmldir!$htmldir$ac_delim
27605s,@ECHO_T@,$ECHO_T,;t t 28730dvidir!$dvidir$ac_delim
27606s,@LIBS@,$LIBS,;t t 28731pdfdir!$pdfdir$ac_delim
27607s,@CC@,$CC,;t t 28732psdir!$psdir$ac_delim
27608s,@CFLAGS@,$CFLAGS,;t t 28733libdir!$libdir$ac_delim
27609s,@LDFLAGS@,$LDFLAGS,;t t 28734localedir!$localedir$ac_delim
27610s,@CPPFLAGS@,$CPPFLAGS,;t t 28735mandir!$mandir$ac_delim
27611s,@ac_ct_CC@,$ac_ct_CC,;t t 28736DEFS!$DEFS$ac_delim
27612s,@EXEEXT@,$EXEEXT,;t t 28737ECHO_C!$ECHO_C$ac_delim
27613s,@OBJEXT@,$OBJEXT,;t t 28738ECHO_N!$ECHO_N$ac_delim
27614s,@build@,$build,;t t 28739ECHO_T!$ECHO_T$ac_delim
27615s,@build_cpu@,$build_cpu,;t t 28740LIBS!$LIBS$ac_delim
27616s,@build_vendor@,$build_vendor,;t t 28741build_alias!$build_alias$ac_delim
27617s,@build_os@,$build_os,;t t 28742host_alias!$host_alias$ac_delim
27618s,@host@,$host,;t t 28743target_alias!$target_alias$ac_delim
27619s,@host_cpu@,$host_cpu,;t t 28744CC!$CC$ac_delim
27620s,@host_vendor@,$host_vendor,;t t 28745CFLAGS!$CFLAGS$ac_delim
27621s,@host_os@,$host_os,;t t 28746LDFLAGS!$LDFLAGS$ac_delim
27622s,@AWK@,$AWK,;t t 28747CPPFLAGS!$CPPFLAGS$ac_delim
27623s,@CPP@,$CPP,;t t 28748ac_ct_CC!$ac_ct_CC$ac_delim
27624s,@RANLIB@,$RANLIB,;t t 28749EXEEXT!$EXEEXT$ac_delim
27625s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t 28750OBJEXT!$OBJEXT$ac_delim
27626s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t 28751build!$build$ac_delim
27627s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t 28752build_cpu!$build_cpu$ac_delim
27628s,@INSTALL_DATA@,$INSTALL_DATA,;t t 28753build_vendor!$build_vendor$ac_delim
27629s,@EGREP@,$EGREP,;t t 28754build_os!$build_os$ac_delim
27630s,@AR@,$AR,;t t 28755host!$host$ac_delim
27631s,@CAT@,$CAT,;t t 28756host_cpu!$host_cpu$ac_delim
27632s,@KILL@,$KILL,;t t 28757host_vendor!$host_vendor$ac_delim
27633s,@PERL@,$PERL,;t t 28758host_os!$host_os$ac_delim
27634s,@SED@,$SED,;t t 28759CPP!$CPP$ac_delim
27635s,@ENT@,$ENT,;t t 28760GREP!$GREP$ac_delim
27636s,@TEST_MINUS_S_SH@,$TEST_MINUS_S_SH,;t t 28761EGREP!$EGREP$ac_delim
27637s,@SH@,$SH,;t t 28762AWK!$AWK$ac_delim
27638s,@TEST_SHELL@,$TEST_SHELL,;t t 28763RANLIB!$RANLIB$ac_delim
27639s,@PATH_GROUPADD_PROG@,$PATH_GROUPADD_PROG,;t t 28764INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27640s,@PATH_USERADD_PROG@,$PATH_USERADD_PROG,;t t 28765INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27641s,@MAKE_PACKAGE_SUPPORTED@,$MAKE_PACKAGE_SUPPORTED,;t t 28766INSTALL_DATA!$INSTALL_DATA$ac_delim
27642s,@STARTUP_SCRIPT_SHELL@,$STARTUP_SCRIPT_SHELL,;t t 28767AR!$AR$ac_delim
27643s,@LOGIN_PROGRAM_FALLBACK@,$LOGIN_PROGRAM_FALLBACK,;t t 28768CAT!$CAT$ac_delim
27644s,@PATH_PASSWD_PROG@,$PATH_PASSWD_PROG,;t t 28769KILL!$KILL$ac_delim
27645s,@LD@,$LD,;t t 28770PERL!$PERL$ac_delim
27646s,@LIBWRAP@,$LIBWRAP,;t t 28771SED!$SED$ac_delim
27647s,@LIBEDIT@,$LIBEDIT,;t t 28772ENT!$ENT$ac_delim
27648s,@LIBPAM@,$LIBPAM,;t t 28773TEST_MINUS_S_SH!$TEST_MINUS_S_SH$ac_delim
27649s,@INSTALL_SSH_RAND_HELPER@,$INSTALL_SSH_RAND_HELPER,;t t 28774SH!$SH$ac_delim
27650s,@SSH_PRIVSEP_USER@,$SSH_PRIVSEP_USER,;t t 28775TEST_SHELL!$TEST_SHELL$ac_delim
27651s,@PROG_LS@,$PROG_LS,;t t 28776PATH_GROUPADD_PROG!$PATH_GROUPADD_PROG$ac_delim
27652s,@PROG_NETSTAT@,$PROG_NETSTAT,;t t 28777PATH_USERADD_PROG!$PATH_USERADD_PROG$ac_delim
27653s,@PROG_ARP@,$PROG_ARP,;t t 28778MAKE_PACKAGE_SUPPORTED!$MAKE_PACKAGE_SUPPORTED$ac_delim
27654s,@PROG_IFCONFIG@,$PROG_IFCONFIG,;t t 28779STARTUP_SCRIPT_SHELL!$STARTUP_SCRIPT_SHELL$ac_delim
27655s,@PROG_JSTAT@,$PROG_JSTAT,;t t 28780LOGIN_PROGRAM_FALLBACK!$LOGIN_PROGRAM_FALLBACK$ac_delim
27656s,@PROG_PS@,$PROG_PS,;t t 28781PATH_PASSWD_PROG!$PATH_PASSWD_PROG$ac_delim
27657s,@PROG_SAR@,$PROG_SAR,;t t 28782LD!$LD$ac_delim
27658s,@PROG_W@,$PROG_W,;t t 28783SSHDLIBS!$SSHDLIBS$ac_delim
27659s,@PROG_WHO@,$PROG_WHO,;t t 28784LIBWRAP!$LIBWRAP$ac_delim
27660s,@PROG_LAST@,$PROG_LAST,;t t 28785LIBEDIT!$LIBEDIT$ac_delim
27661s,@PROG_LASTLOG@,$PROG_LASTLOG,;t t 28786LIBPAM!$LIBPAM$ac_delim
27662s,@PROG_DF@,$PROG_DF,;t t 28787INSTALL_SSH_RAND_HELPER!$INSTALL_SSH_RAND_HELPER$ac_delim
27663s,@PROG_VMSTAT@,$PROG_VMSTAT,;t t 28788SSH_PRIVSEP_USER!$SSH_PRIVSEP_USER$ac_delim
27664s,@PROG_UPTIME@,$PROG_UPTIME,;t t 28789PROG_LS!$PROG_LS$ac_delim
27665s,@PROG_IPCS@,$PROG_IPCS,;t t 28790PROG_NETSTAT!$PROG_NETSTAT$ac_delim
27666s,@PROG_TAIL@,$PROG_TAIL,;t t 28791PROG_ARP!$PROG_ARP$ac_delim
27667s,@INSTALL_SSH_PRNG_CMDS@,$INSTALL_SSH_PRNG_CMDS,;t t 28792PROG_IFCONFIG!$PROG_IFCONFIG$ac_delim
27668s,@OPENSC_CONFIG@,$OPENSC_CONFIG,;t t 28793PROG_JSTAT!$PROG_JSTAT$ac_delim
27669s,@PRIVSEP_PATH@,$PRIVSEP_PATH,;t t 28794PROG_PS!$PROG_PS$ac_delim
27670s,@xauth_path@,$xauth_path,;t t 28795PROG_SAR!$PROG_SAR$ac_delim
27671s,@STRIP_OPT@,$STRIP_OPT,;t t 28796PROG_W!$PROG_W$ac_delim
27672s,@XAUTH_PATH@,$XAUTH_PATH,;t t 28797PROG_WHO!$PROG_WHO$ac_delim
27673s,@NROFF@,$NROFF,;t t 28798PROG_LAST!$PROG_LAST$ac_delim
27674s,@MANTYPE@,$MANTYPE,;t t 28799PROG_LASTLOG!$PROG_LASTLOG$ac_delim
27675s,@mansubdir@,$mansubdir,;t t 28800PROG_DF!$PROG_DF$ac_delim
27676s,@user_path@,$user_path,;t t 28801PROG_VMSTAT!$PROG_VMSTAT$ac_delim
27677s,@piddir@,$piddir,;t t 28802PROG_UPTIME!$PROG_UPTIME$ac_delim
27678s,@LIBOBJS@,$LIBOBJS,;t t 28803PROG_IPCS!$PROG_IPCS$ac_delim
27679s,@LTLIBOBJS@,$LTLIBOBJS,;t t 28804_ACEOF
27680CEOF 28805
27681 28806 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
27682_ACEOF 28807 break
27683 28808 elif $ac_last_try; then
27684 cat >>$CONFIG_STATUS <<\_ACEOF 28809 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27685 # Split the substitutions into bite-sized pieces for seds with 28810echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
27686 # small command number limits, like on Digital OSF/1 and HP-UX. 28811 { (exit 1); exit 1; }; }
27687 ac_max_sed_lines=48 28812 else
27688 ac_sed_frag=1 # Number of current file. 28813 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27689 ac_beg=1 # First line for current file.
27690 ac_end=$ac_max_sed_lines # Line after last line for current file.
27691 ac_more_lines=:
27692 ac_sed_cmds=
27693 while $ac_more_lines; do
27694 if test $ac_beg -gt 1; then
27695 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27696 else
27697 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27698 fi
27699 if test ! -s $tmp/subs.frag; then
27700 ac_more_lines=false
27701 else
27702 # The purpose of the label and of the branching condition is to
27703 # speed up the sed processing (if there are no `@' at all, there
27704 # is no need to browse any of the substitutions).
27705 # These are the two extra sed commands mentioned above.
27706 (echo ':t
27707 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
27708 if test -z "$ac_sed_cmds"; then
27709 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
27710 else
27711 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
27712 fi
27713 ac_sed_frag=`expr $ac_sed_frag + 1`
27714 ac_beg=$ac_end
27715 ac_end=`expr $ac_end + $ac_max_sed_lines`
27716 fi
27717 done
27718 if test -z "$ac_sed_cmds"; then
27719 ac_sed_cmds=cat
27720 fi 28814 fi
27721fi # test -n "$CONFIG_FILES" 28815done
28816
28817ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28818if test -n "$ac_eof"; then
28819 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28820 ac_eof=`expr $ac_eof + 1`
28821fi
28822
28823cat >>$CONFIG_STATUS <<_ACEOF
28824cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28825/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
28826_ACEOF
28827sed '
28828s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28829s/^/s,@/; s/!/@,|#_!!_#|/
28830:n
28831t n
28832s/'"$ac_delim"'$/,g/; t
28833s/$/\\/; p
28834N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28835' >>$CONFIG_STATUS <conf$$subs.sed
28836rm -f conf$$subs.sed
28837cat >>$CONFIG_STATUS <<_ACEOF
28838CEOF$ac_eof
28839_ACEOF
28840
28841
28842ac_delim='%!_!# '
28843for ac_last_try in false false false false false :; do
28844 cat >conf$$subs.sed <<_ACEOF
28845PROG_TAIL!$PROG_TAIL$ac_delim
28846INSTALL_SSH_PRNG_CMDS!$INSTALL_SSH_PRNG_CMDS$ac_delim
28847OPENSC_CONFIG!$OPENSC_CONFIG$ac_delim
28848LIBSELINUX!$LIBSELINUX$ac_delim
28849PRIVSEP_PATH!$PRIVSEP_PATH$ac_delim
28850xauth_path!$xauth_path$ac_delim
28851STRIP_OPT!$STRIP_OPT$ac_delim
28852XAUTH_PATH!$XAUTH_PATH$ac_delim
28853NROFF!$NROFF$ac_delim
28854MANTYPE!$MANTYPE$ac_delim
28855mansubdir!$mansubdir$ac_delim
28856user_path!$user_path$ac_delim
28857piddir!$piddir$ac_delim
28858LIBOBJS!$LIBOBJS$ac_delim
28859LTLIBOBJS!$LTLIBOBJS$ac_delim
28860_ACEOF
28861
28862 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 15; then
28863 break
28864 elif $ac_last_try; then
28865 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28866echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
28867 { (exit 1); exit 1; }; }
28868 else
28869 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28870 fi
28871done
27722 28872
28873ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28874if test -n "$ac_eof"; then
28875 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28876 ac_eof=`expr $ac_eof + 1`
28877fi
28878
28879cat >>$CONFIG_STATUS <<_ACEOF
28880cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28881/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
28882_ACEOF
28883sed '
28884s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28885s/^/s,@/; s/!/@,|#_!!_#|/
28886:n
28887t n
28888s/'"$ac_delim"'$/,g/; t
28889s/$/\\/; p
28890N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28891' >>$CONFIG_STATUS <conf$$subs.sed
28892rm -f conf$$subs.sed
28893cat >>$CONFIG_STATUS <<_ACEOF
28894:end
28895s/|#_!!_#|//g
28896CEOF$ac_eof
27723_ACEOF 28897_ACEOF
28898
28899
28900# VPATH may cause trouble with some makes, so we remove $(srcdir),
28901# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28902# trailing colons and then remove the whole line if VPATH becomes empty
28903# (actually we leave an empty line to preserve line numbers).
28904if test "x$srcdir" = x.; then
28905 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28906s/:*\$(srcdir):*/:/
28907s/:*\${srcdir}:*/:/
28908s/:*@srcdir@:*/:/
28909s/^\([^=]*=[ ]*\):*/\1/
28910s/:*$//
28911s/^[^=]*=[ ]*$//
28912}'
28913fi
28914
27724cat >>$CONFIG_STATUS <<\_ACEOF 28915cat >>$CONFIG_STATUS <<\_ACEOF
27725for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue 28916fi # test -n "$CONFIG_FILES"
27726 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". 28917
27727 case $ac_file in 28918
27728 - | *:- | *:-:* ) # input from stdin 28919for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
27729 cat >$tmp/stdin 28920do
27730 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` 28921 case $ac_tag in
27731 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; 28922 :[FHLC]) ac_mode=$ac_tag; continue;;
27732 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` 28923 esac
27733 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; 28924 case $ac_mode$ac_tag in
27734 * ) ac_file_in=$ac_file.in ;; 28925 :[FHL]*:*);;
28926 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28927echo "$as_me: error: Invalid tag $ac_tag." >&2;}
28928 { (exit 1); exit 1; }; };;
28929 :[FH]-) ac_tag=-:-;;
28930 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28931 esac
28932 ac_save_IFS=$IFS
28933 IFS=:
28934 set x $ac_tag
28935 IFS=$ac_save_IFS
28936 shift
28937 ac_file=$1
28938 shift
28939
28940 case $ac_mode in
28941 :L) ac_source=$1;;
28942 :[FH])
28943 ac_file_inputs=
28944 for ac_f
28945 do
28946 case $ac_f in
28947 -) ac_f="$tmp/stdin";;
28948 *) # Look for the file first in the build tree, then in the source tree
28949 # (if the path is not absolute). The absolute path cannot be DOS-style,
28950 # because $ac_f cannot contain `:'.
28951 test -f "$ac_f" ||
28952 case $ac_f in
28953 [\\/$]*) false;;
28954 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28955 esac ||
28956 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28957echo "$as_me: error: cannot find input file: $ac_f" >&2;}
28958 { (exit 1); exit 1; }; };;
28959 esac
28960 ac_file_inputs="$ac_file_inputs $ac_f"
28961 done
28962
28963 # Let's still pretend it is `configure' which instantiates (i.e., don't
28964 # use $as_me), people would be surprised to read:
28965 # /* config.h. Generated by config.status. */
28966 configure_input="Generated from "`IFS=:
28967 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
28968 if test x"$ac_file" != x-; then
28969 configure_input="$ac_file. $configure_input"
28970 { echo "$as_me:$LINENO: creating $ac_file" >&5
28971echo "$as_me: creating $ac_file" >&6;}
28972 fi
28973
28974 case $ac_tag in
28975 *:-:* | *:-) cat >"$tmp/stdin";;
28976 esac
28977 ;;
27735 esac 28978 esac
27736 28979
27737 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. 28980 ac_dir=`$as_dirname -- "$ac_file" ||
27738 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
27739$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 28981$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27740 X"$ac_file" : 'X\(//\)[^/]' \| \ 28982 X"$ac_file" : 'X\(//\)[^/]' \| \
27741 X"$ac_file" : 'X\(//\)$' \| \ 28983 X"$ac_file" : 'X\(//\)$' \| \
27742 X"$ac_file" : 'X\(/\)' \| \ 28984 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
27743 . : '\(.\)' 2>/dev/null ||
27744echo X"$ac_file" | 28985echo X"$ac_file" |
27745 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } 28986 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27746 /^X\(\/\/\)[^/].*/{ s//\1/; q; } 28987 s//\1/
27747 /^X\(\/\/\)$/{ s//\1/; q; } 28988 q
27748 /^X\(\/\).*/{ s//\1/; q; } 28989 }
27749 s/.*/./; q'` 28990 /^X\(\/\/\)[^/].*/{
27750 { if $as_mkdir_p; then 28991 s//\1/
27751 mkdir -p "$ac_dir" 28992 q
27752 else 28993 }
27753 as_dir="$ac_dir" 28994 /^X\(\/\/\)$/{
28995 s//\1/
28996 q
28997 }
28998 /^X\(\/\).*/{
28999 s//\1/
29000 q
29001 }
29002 s/.*/./; q'`
29003 { as_dir="$ac_dir"
29004 case $as_dir in #(
29005 -*) as_dir=./$as_dir;;
29006 esac
29007 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
27754 as_dirs= 29008 as_dirs=
27755 while test ! -d "$as_dir"; do 29009 while :; do
27756 as_dirs="$as_dir $as_dirs" 29010 case $as_dir in #(
27757 as_dir=`(dirname "$as_dir") 2>/dev/null || 29011 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
29012 *) as_qdir=$as_dir;;
29013 esac
29014 as_dirs="'$as_qdir' $as_dirs"
29015 as_dir=`$as_dirname -- "$as_dir" ||
27758$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 29016$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27759 X"$as_dir" : 'X\(//\)[^/]' \| \ 29017 X"$as_dir" : 'X\(//\)[^/]' \| \
27760 X"$as_dir" : 'X\(//\)$' \| \ 29018 X"$as_dir" : 'X\(//\)$' \| \
27761 X"$as_dir" : 'X\(/\)' \| \ 29019 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
27762 . : '\(.\)' 2>/dev/null ||
27763echo X"$as_dir" | 29020echo X"$as_dir" |
27764 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } 29021 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27765 /^X\(\/\/\)[^/].*/{ s//\1/; q; } 29022 s//\1/
27766 /^X\(\/\/\)$/{ s//\1/; q; } 29023 q
27767 /^X\(\/\).*/{ s//\1/; q; } 29024 }
27768 s/.*/./; q'` 29025 /^X\(\/\/\)[^/].*/{
29026 s//\1/
29027 q
29028 }
29029 /^X\(\/\/\)$/{
29030 s//\1/
29031 q
29032 }
29033 /^X\(\/\).*/{
29034 s//\1/
29035 q
29036 }
29037 s/.*/./; q'`
29038 test -d "$as_dir" && break
27769 done 29039 done
27770 test ! -n "$as_dirs" || mkdir $as_dirs 29040 test -z "$as_dirs" || eval "mkdir $as_dirs"
27771 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 29041 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27772echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} 29042echo "$as_me: error: cannot create directory $as_dir" >&2;}
27773 { (exit 1); exit 1; }; }; } 29043 { (exit 1); exit 1; }; }; }
27774
27775 ac_builddir=. 29044 ac_builddir=.
27776 29045
27777if test "$ac_dir" != .; then 29046case "$ac_dir" in
29047.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
29048*)
27778 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` 29049 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
27779 # A "../" for each directory in $ac_dir_suffix. 29050 # A ".." for each directory in $ac_dir_suffix.
27780 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` 29051 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
27781else 29052 case $ac_top_builddir_sub in
27782 ac_dir_suffix= ac_top_builddir= 29053 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27783fi 29054 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
29055 esac ;;
29056esac
29057ac_abs_top_builddir=$ac_pwd
29058ac_abs_builddir=$ac_pwd$ac_dir_suffix
29059# for backward compatibility:
29060ac_top_builddir=$ac_top_build_prefix
27784 29061
27785case $srcdir in 29062case $srcdir in
27786 .) # No --srcdir option. We are building in place. 29063 .) # We are building in place.
27787 ac_srcdir=. 29064 ac_srcdir=.
27788 if test -z "$ac_top_builddir"; then 29065 ac_top_srcdir=$ac_top_builddir_sub
27789 ac_top_srcdir=. 29066 ac_abs_top_srcdir=$ac_pwd ;;
27790 else 29067 [\\/]* | ?:[\\/]* ) # Absolute name.
27791 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
27792 fi ;;
27793 [\\/]* | ?:[\\/]* ) # Absolute path.
27794 ac_srcdir=$srcdir$ac_dir_suffix; 29068 ac_srcdir=$srcdir$ac_dir_suffix;
27795 ac_top_srcdir=$srcdir ;; 29069 ac_top_srcdir=$srcdir
27796 *) # Relative path. 29070 ac_abs_top_srcdir=$srcdir ;;
27797 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix 29071 *) # Relative name.
27798 ac_top_srcdir=$ac_top_builddir$srcdir ;; 29072 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
29073 ac_top_srcdir=$ac_top_build_prefix$srcdir
29074 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
27799esac 29075esac
29076ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
27800 29077
27801# Do not use `cd foo && pwd` to compute absolute paths, because
27802# the directories may not exist.
27803case `pwd` in
27804.) ac_abs_builddir="$ac_dir";;
27805*)
27806 case "$ac_dir" in
27807 .) ac_abs_builddir=`pwd`;;
27808 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
27809 *) ac_abs_builddir=`pwd`/"$ac_dir";;
27810 esac;;
27811esac
27812case $ac_abs_builddir in
27813.) ac_abs_top_builddir=${ac_top_builddir}.;;
27814*)
27815 case ${ac_top_builddir}. in
27816 .) ac_abs_top_builddir=$ac_abs_builddir;;
27817 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
27818 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
27819 esac;;
27820esac
27821case $ac_abs_builddir in
27822.) ac_abs_srcdir=$ac_srcdir;;
27823*)
27824 case $ac_srcdir in
27825 .) ac_abs_srcdir=$ac_abs_builddir;;
27826 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
27827 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
27828 esac;;
27829esac
27830case $ac_abs_builddir in
27831.) ac_abs_top_srcdir=$ac_top_srcdir;;
27832*)
27833 case $ac_top_srcdir in
27834 .) ac_abs_top_srcdir=$ac_abs_builddir;;
27835 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
27836 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
27837 esac;;
27838esac
27839 29078
29079 case $ac_mode in
29080 :F)
29081 #
29082 # CONFIG_FILE
29083 #
27840 29084
27841 case $INSTALL in 29085 case $INSTALL in
27842 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; 29086 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
27843 *) ac_INSTALL=$ac_top_builddir$INSTALL ;; 29087 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
27844 esac 29088 esac
29089_ACEOF
27845 29090
27846 if test x"$ac_file" != x-; then 29091cat >>$CONFIG_STATUS <<\_ACEOF
27847 { echo "$as_me:$LINENO: creating $ac_file" >&5 29092# If the template does not know about datarootdir, expand it.
27848echo "$as_me: creating $ac_file" >&6;} 29093# FIXME: This hack should be removed a few years after 2.60.
27849 rm -f "$ac_file" 29094ac_datarootdir_hack=; ac_datarootdir_seen=
27850 fi 29095
27851 # Let's still pretend it is `configure' which instantiates (i.e., don't 29096case `sed -n '/datarootdir/ {
27852 # use $as_me), people would be surprised to read: 29097 p
27853 # /* config.h. Generated by config.status. */ 29098 q
27854 if test x"$ac_file" = x-; then 29099}
27855 configure_input= 29100/@datadir@/p
27856 else 29101/@docdir@/p
27857 configure_input="$ac_file. " 29102/@infodir@/p
27858 fi 29103/@localedir@/p
27859 configure_input=$configure_input"Generated from `echo $ac_file_in | 29104/@mandir@/p
27860 sed 's,.*/,,'` by configure." 29105' $ac_file_inputs` in
27861 29106*datarootdir*) ac_datarootdir_seen=yes;;
27862 # First look for the input files in the build tree, otherwise in the 29107*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
27863 # src tree. 29108 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27864 ac_file_inputs=`IFS=: 29109echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
27865 for f in $ac_file_in; do
27866 case $f in
27867 -) echo $tmp/stdin ;;
27868 [\\/$]*)
27869 # Absolute (can't be DOS-style, as IFS=:)
27870 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
27871echo "$as_me: error: cannot find input file: $f" >&2;}
27872 { (exit 1); exit 1; }; }
27873 echo "$f";;
27874 *) # Relative
27875 if test -f "$f"; then
27876 # Build tree
27877 echo "$f"
27878 elif test -f "$srcdir/$f"; then
27879 # Source tree
27880 echo "$srcdir/$f"
27881 else
27882 # /dev/null tree
27883 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
27884echo "$as_me: error: cannot find input file: $f" >&2;}
27885 { (exit 1); exit 1; }; }
27886 fi;;
27887 esac
27888 done` || { (exit 1); exit 1; }
27889_ACEOF 29110_ACEOF
27890cat >>$CONFIG_STATUS <<_ACEOF 29111cat >>$CONFIG_STATUS <<_ACEOF
29112 ac_datarootdir_hack='
29113 s&@datadir@&$datadir&g
29114 s&@docdir@&$docdir&g
29115 s&@infodir@&$infodir&g
29116 s&@localedir@&$localedir&g
29117 s&@mandir@&$mandir&g
29118 s&\\\${datarootdir}&$datarootdir&g' ;;
29119esac
29120_ACEOF
29121
29122# Neutralize VPATH when `$srcdir' = `.'.
29123# Shell code in configure.ac might set extrasub.
29124# FIXME: do we really want to maintain this feature?
29125cat >>$CONFIG_STATUS <<_ACEOF
27891 sed "$ac_vpsub 29126 sed "$ac_vpsub
27892$extrasub 29127$extrasub
27893_ACEOF 29128_ACEOF
27894cat >>$CONFIG_STATUS <<\_ACEOF 29129cat >>$CONFIG_STATUS <<\_ACEOF
27895:t 29130:t
27896/@[a-zA-Z_][a-zA-Z_0-9]*@/!b 29131/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27897s,@configure_input@,$configure_input,;t t 29132s&@configure_input@&$configure_input&;t t
27898s,@srcdir@,$ac_srcdir,;t t 29133s&@top_builddir@&$ac_top_builddir_sub&;t t
27899s,@abs_srcdir@,$ac_abs_srcdir,;t t 29134s&@srcdir@&$ac_srcdir&;t t
27900s,@top_srcdir@,$ac_top_srcdir,;t t 29135s&@abs_srcdir@&$ac_abs_srcdir&;t t
27901s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t 29136s&@top_srcdir@&$ac_top_srcdir&;t t
27902s,@builddir@,$ac_builddir,;t t 29137s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27903s,@abs_builddir@,$ac_abs_builddir,;t t 29138s&@builddir@&$ac_builddir&;t t
27904s,@top_builddir@,$ac_top_builddir,;t t 29139s&@abs_builddir@&$ac_abs_builddir&;t t
27905s,@abs_top_builddir@,$ac_abs_top_builddir,;t t 29140s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27906s,@INSTALL@,$ac_INSTALL,;t t 29141s&@INSTALL@&$ac_INSTALL&;t t
27907" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out 29142$ac_datarootdir_hack
27908 rm -f $tmp/stdin 29143" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
27909 if test x"$ac_file" != x-; then 29144
27910 mv $tmp/out $ac_file 29145test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27911 else 29146 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27912 cat $tmp/out 29147 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
27913 rm -f $tmp/out 29148 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
27914 fi 29149which seems to be undefined. Please make sure it is defined." >&5
27915 29150echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
27916done 29151which seems to be undefined. Please make sure it is defined." >&2;}
27917_ACEOF 29152
27918cat >>$CONFIG_STATUS <<\_ACEOF 29153 rm -f "$tmp/stdin"
27919
27920#
27921# CONFIG_HEADER section.
27922#
27923
27924# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
27925# NAME is the cpp macro being defined and VALUE is the value it is being given.
27926#
27927# ac_d sets the value in "#define NAME VALUE" lines.
27928ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
27929ac_dB='[ ].*$,\1#\2'
27930ac_dC=' '
27931ac_dD=',;t'
27932# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
27933ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
27934ac_uB='$,\1#\2define\3'
27935ac_uC=' '
27936ac_uD=',;t'
27937
27938for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
27939 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27940 case $ac_file in 29154 case $ac_file in
27941 - | *:- | *:-:* ) # input from stdin 29155 -) cat "$tmp/out"; rm -f "$tmp/out";;
27942 cat >$tmp/stdin 29156 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
27943 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27944 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27945 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27946 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27947 * ) ac_file_in=$ac_file.in ;;
27948 esac 29157 esac
27949 29158 ;;
27950 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 29159 :H)
27951echo "$as_me: creating $ac_file" >&6;} 29160 #
27952 29161 # CONFIG_HEADER
27953 # First look for the input files in the build tree, otherwise in the 29162 #
27954 # src tree. 29163_ACEOF
27955 ac_file_inputs=`IFS=: 29164
27956 for f in $ac_file_in; do 29165# Transform confdefs.h into a sed script `conftest.defines', that
27957 case $f in 29166# substitutes the proper values into config.h.in to produce config.h.
27958 -) echo $tmp/stdin ;; 29167rm -f conftest.defines conftest.tail
27959 [\\/$]*) 29168# First, append a space to every undef/define line, to ease matching.
27960 # Absolute (can't be DOS-style, as IFS=:) 29169echo 's/$/ /' >conftest.defines
27961 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 29170# Then, protect against being on the right side of a sed subst, or in
27962echo "$as_me: error: cannot find input file: $f" >&2;} 29171# an unquoted here document, in config.status. If some macros were
27963 { (exit 1); exit 1; }; } 29172# called several times there might be several #defines for the same
27964 # Do quote $f, to prevent DOS paths from being IFS'd. 29173# symbol, which is useless. But do not sort them, since the last
27965 echo "$f";; 29174# AC_DEFINE must be honored.
27966 *) # Relative 29175ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27967 if test -f "$f"; then 29176# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
27968 # Build tree 29177# NAME is the cpp macro being defined, VALUE is the value it is being given.
27969 echo "$f" 29178# PARAMS is the parameter list in the macro definition--in most cases, it's
27970 elif test -f "$srcdir/$f"; then 29179# just an empty string.
27971 # Source tree 29180ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
27972 echo "$srcdir/$f" 29181ac_dB='\\)[ (].*,\\1define\\2'
27973 else 29182ac_dC=' '
27974 # /dev/null tree 29183ac_dD=' ,'
27975 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 29184
27976echo "$as_me: error: cannot find input file: $f" >&2;} 29185uniq confdefs.h |
27977 { (exit 1); exit 1; }; } 29186 sed -n '
27978 fi;; 29187 t rset
27979 esac 29188 :rset
27980 done` || { (exit 1); exit 1; } 29189 s/^[ ]*#[ ]*define[ ][ ]*//
27981 # Remove the trailing spaces. 29190 t ok
27982 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in 29191 d
27983 29192 :ok
27984_ACEOF 29193 s/[\\&,]/\\&/g
27985 29194 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
27986# Transform confdefs.h into two sed scripts, `conftest.defines' and 29195 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
27987# `conftest.undefs', that substitutes the proper values into 29196 ' >>conftest.defines
27988# config.h.in to produce config.h. The first handles `#define' 29197
27989# templates, and the second `#undef' templates. 29198# Remove the space that was appended to ease matching.
27990# And first: Protect against being on the right side of a sed subst in 29199# Then replace #undef with comments. This is necessary, for
27991# config.status. Protect against being in an unquoted here document
27992# in config.status.
27993rm -f conftest.defines conftest.undefs
27994# Using a here document instead of a string reduces the quoting nightmare.
27995# Putting comments in sed scripts is not portable.
27996#
27997# `end' is used to avoid that the second main sed command (meant for
27998# 0-ary CPP macros) applies to n-ary macro definitions.
27999# See the Autoconf documentation for `clear'.
28000cat >confdef2sed.sed <<\_ACEOF
28001s/[\\&,]/\\&/g
28002s,[\\$`],\\&,g
28003t clear
28004: clear
28005s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
28006t end
28007s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
28008: end
28009_ACEOF
28010# If some macros were called several times there might be several times
28011# the same #defines, which is useless. Nevertheless, we may not want to
28012# sort them, since we want the *last* AC-DEFINE to be honored.
28013uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
28014sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
28015rm -f confdef2sed.sed
28016
28017# This sed command replaces #undef with comments. This is necessary, for
28018# example, in the case of _POSIX_SOURCE, which is predefined and required 29200# example, in the case of _POSIX_SOURCE, which is predefined and required
28019# on some systems where configure will not decide to define it. 29201# on some systems where configure will not decide to define it.
28020cat >>conftest.undefs <<\_ACEOF 29202# (The regexp can be short, since the line contains either #define or #undef.)
28021s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, 29203echo 's/ $//
28022_ACEOF 29204s,^[ #]*u.*,/* & */,' >>conftest.defines
28023 29205
28024# Break up conftest.defines because some shells have a limit on the size 29206# Break up conftest.defines:
28025# of here documents, and old seds have small limits too (100 cmds). 29207ac_max_sed_lines=50
28026echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS 29208
28027echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS 29209# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28028echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS 29210# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28029echo ' :' >>$CONFIG_STATUS 29211# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28030rm -f conftest.tail 29212# et cetera.
28031while grep . conftest.defines >/dev/null 29213ac_in='$ac_file_inputs'
29214ac_out='"$tmp/out1"'
29215ac_nxt='"$tmp/out2"'
29216
29217while :
28032do 29218do
28033 # Write a limited-size here document to $tmp/defines.sed. 29219 # Write a here document:
28034 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS 29220 cat >>$CONFIG_STATUS <<_ACEOF
28035 # Speed up: don't consider the non `#define' lines. 29221 # First, check the format of the line:
28036 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS 29222 cat >"\$tmp/defines.sed" <<\\CEOF
28037 # Work around the forget-to-reset-the-flag bug. 29223/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28038 echo 't clr' >>$CONFIG_STATUS 29224/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28039 echo ': clr' >>$CONFIG_STATUS 29225b
28040 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS 29226:def
29227_ACEOF
29228 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28041 echo 'CEOF 29229 echo 'CEOF
28042 sed -f $tmp/defines.sed $tmp/in >$tmp/out 29230 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28043 rm -f $tmp/in 29231 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28044 mv $tmp/out $tmp/in 29232 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28045' >>$CONFIG_STATUS 29233 grep . conftest.tail >/dev/null || break
28046 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
28047 rm -f conftest.defines 29234 rm -f conftest.defines
28048 mv conftest.tail conftest.defines 29235 mv conftest.tail conftest.defines
28049done 29236done
28050rm -f conftest.defines 29237rm -f conftest.defines conftest.tail
28051echo ' fi # grep' >>$CONFIG_STATUS
28052echo >>$CONFIG_STATUS
28053
28054# Break up conftest.undefs because some shells have a limit on the size
28055# of here documents, and old seds have small limits too (100 cmds).
28056echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
28057rm -f conftest.tail
28058while grep . conftest.undefs >/dev/null
28059do
28060 # Write a limited-size here document to $tmp/undefs.sed.
28061 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
28062 # Speed up: don't consider the non `#undef'
28063 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
28064 # Work around the forget-to-reset-the-flag bug.
28065 echo 't clr' >>$CONFIG_STATUS
28066 echo ': clr' >>$CONFIG_STATUS
28067 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
28068 echo 'CEOF
28069 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
28070 rm -f $tmp/in
28071 mv $tmp/out $tmp/in
28072' >>$CONFIG_STATUS
28073 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
28074 rm -f conftest.undefs
28075 mv conftest.tail conftest.undefs
28076done
28077rm -f conftest.undefs
28078 29238
29239echo "ac_result=$ac_in" >>$CONFIG_STATUS
28079cat >>$CONFIG_STATUS <<\_ACEOF 29240cat >>$CONFIG_STATUS <<\_ACEOF
28080 # Let's still pretend it is `configure' which instantiates (i.e., don't
28081 # use $as_me), people would be surprised to read:
28082 # /* config.h. Generated by config.status. */
28083 if test x"$ac_file" = x-; then
28084 echo "/* Generated by configure. */" >$tmp/config.h
28085 else
28086 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
28087 fi
28088 cat $tmp/in >>$tmp/config.h
28089 rm -f $tmp/in
28090 if test x"$ac_file" != x-; then 29241 if test x"$ac_file" != x-; then
28091 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then 29242 echo "/* $configure_input */" >"$tmp/config.h"
29243 cat "$ac_result" >>"$tmp/config.h"
29244 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28092 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 29245 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28093echo "$as_me: $ac_file is unchanged" >&6;} 29246echo "$as_me: $ac_file is unchanged" >&6;}
28094 else 29247 else
28095 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
28096$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28097 X"$ac_file" : 'X\(//\)[^/]' \| \
28098 X"$ac_file" : 'X\(//\)$' \| \
28099 X"$ac_file" : 'X\(/\)' \| \
28100 . : '\(.\)' 2>/dev/null ||
28101echo X"$ac_file" |
28102 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
28103 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
28104 /^X\(\/\/\)$/{ s//\1/; q; }
28105 /^X\(\/\).*/{ s//\1/; q; }
28106 s/.*/./; q'`
28107 { if $as_mkdir_p; then
28108 mkdir -p "$ac_dir"
28109 else
28110 as_dir="$ac_dir"
28111 as_dirs=
28112 while test ! -d "$as_dir"; do
28113 as_dirs="$as_dir $as_dirs"
28114 as_dir=`(dirname "$as_dir") 2>/dev/null ||
28115$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28116 X"$as_dir" : 'X\(//\)[^/]' \| \
28117 X"$as_dir" : 'X\(//\)$' \| \
28118 X"$as_dir" : 'X\(/\)' \| \
28119 . : '\(.\)' 2>/dev/null ||
28120echo X"$as_dir" |
28121 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
28122 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
28123 /^X\(\/\/\)$/{ s//\1/; q; }
28124 /^X\(\/\).*/{ s//\1/; q; }
28125 s/.*/./; q'`
28126 done
28127 test ! -n "$as_dirs" || mkdir $as_dirs
28128 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
28129echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
28130 { (exit 1); exit 1; }; }; }
28131
28132 rm -f $ac_file 29248 rm -f $ac_file
28133 mv $tmp/config.h $ac_file 29249 mv "$tmp/config.h" $ac_file
28134 fi 29250 fi
28135 else 29251 else
28136 cat $tmp/config.h 29252 echo "/* $configure_input */"
28137 rm -f $tmp/config.h 29253 cat "$ac_result"
28138 fi 29254 fi
28139done 29255 rm -f "$tmp/out12"
28140_ACEOF 29256 ;;
29257
29258
29259 esac
29260
29261done # for ac_tag
28141 29262
28142cat >>$CONFIG_STATUS <<\_ACEOF
28143 29263
28144{ (exit 0); exit 0; } 29264{ (exit 0); exit 0; }
28145_ACEOF 29265_ACEOF
@@ -28207,12 +29327,15 @@ echo " sshd superuser user PATH: $J"
28207fi 29327fi
28208echo " Manpage format: $MANTYPE" 29328echo " Manpage format: $MANTYPE"
28209echo " PAM support: $PAM_MSG" 29329echo " PAM support: $PAM_MSG"
29330echo " OSF SIA support: $SIA_MSG"
28210echo " KerberosV support: $KRB5_MSG" 29331echo " KerberosV support: $KRB5_MSG"
29332echo " SELinux support: $SELINUX_MSG"
28211echo " Smartcard support: $SCARD_MSG" 29333echo " Smartcard support: $SCARD_MSG"
28212echo " S/KEY support: $SKEY_MSG" 29334echo " S/KEY support: $SKEY_MSG"
28213echo " TCP Wrappers support: $TCPW_MSG" 29335echo " TCP Wrappers support: $TCPW_MSG"
28214echo " MD5 password support: $MD5_MSG" 29336echo " MD5 password support: $MD5_MSG"
28215echo " libedit support: $LIBEDIT_MSG" 29337echo " libedit support: $LIBEDIT_MSG"
29338echo " Solaris process contract support: $SPC_MSG"
28216echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG" 29339echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
28217echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG" 29340echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
28218echo " BSD Auth support: $BSD_AUTH_MSG" 29341echo " BSD Auth support: $BSD_AUTH_MSG"
diff --git a/configure.ac b/configure.ac
index cfaaca92d..18c7ca896 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.322.2.6 2006/02/08 11:11:06 dtucker Exp $ 1# $Id: configure.ac,v 1.372 2007/03/05 00:51:27 djm Exp $
2# 2#
3# Copyright (c) 1999-2004 Damien Miller 3# Copyright (c) 1999-2004 Damien Miller
4# 4#
@@ -15,7 +15,7 @@
15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 16
17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) 17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
18AC_REVISION($Revision: 1.322.2.6 $) 18AC_REVISION($Revision: 1.372 $)
19AC_CONFIG_SRCDIR([ssh.c]) 19AC_CONFIG_SRCDIR([ssh.c])
20 20
21AC_CONFIG_HEADER(config.h) 21AC_CONFIG_HEADER(config.h)
@@ -127,15 +127,175 @@ AC_ARG_WITH(rpath,
127 ] 127 ]
128) 128)
129 129
130# Allow user to specify flags
131AC_ARG_WITH(cflags,
132 [ --with-cflags Specify additional flags to pass to compiler],
133 [
134 if test -n "$withval" && test "x$withval" != "xno" && \
135 test "x${withval}" != "xyes"; then
136 CFLAGS="$CFLAGS $withval"
137 fi
138 ]
139)
140AC_ARG_WITH(cppflags,
141 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
142 [
143 if test -n "$withval" && test "x$withval" != "xno" && \
144 test "x${withval}" != "xyes"; then
145 CPPFLAGS="$CPPFLAGS $withval"
146 fi
147 ]
148)
149AC_ARG_WITH(ldflags,
150 [ --with-ldflags Specify additional flags to pass to linker],
151 [
152 if test -n "$withval" && test "x$withval" != "xno" && \
153 test "x${withval}" != "xyes"; then
154 LDFLAGS="$LDFLAGS $withval"
155 fi
156 ]
157)
158AC_ARG_WITH(libs,
159 [ --with-libs Specify additional libraries to link with],
160 [
161 if test -n "$withval" && test "x$withval" != "xno" && \
162 test "x${withval}" != "xyes"; then
163 LIBS="$LIBS $withval"
164 fi
165 ]
166)
167AC_ARG_WITH(Werror,
168 [ --with-Werror Build main code with -Werror],
169 [
170 if test -n "$withval" && test "x$withval" != "xno"; then
171 werror_flags="-Werror"
172 if test "x${withval}" != "xyes"; then
173 werror_flags="$withval"
174 fi
175 fi
176 ]
177)
178
179AC_CHECK_HEADERS( \
180 bstring.h \
181 crypt.h \
182 crypto/sha2.h \
183 dirent.h \
184 endian.h \
185 features.h \
186 fcntl.h \
187 floatingpoint.h \
188 getopt.h \
189 glob.h \
190 ia.h \
191 iaf.h \
192 limits.h \
193 login.h \
194 maillock.h \
195 ndir.h \
196 net/if_tun.h \
197 netdb.h \
198 netgroup.h \
199 pam/pam_appl.h \
200 paths.h \
201 pty.h \
202 readpassphrase.h \
203 rpc/types.h \
204 security/pam_appl.h \
205 sha2.h \
206 shadow.h \
207 stddef.h \
208 stdint.h \
209 string.h \
210 strings.h \
211 sys/audit.h \
212 sys/bitypes.h \
213 sys/bsdtty.h \
214 sys/cdefs.h \
215 sys/dir.h \
216 sys/mman.h \
217 sys/ndir.h \
218 sys/prctl.h \
219 sys/pstat.h \
220 sys/select.h \
221 sys/stat.h \
222 sys/stream.h \
223 sys/stropts.h \
224 sys/strtio.h \
225 sys/sysmacros.h \
226 sys/time.h \
227 sys/timers.h \
228 sys/un.h \
229 time.h \
230 tmpdir.h \
231 ttyent.h \
232 unistd.h \
233 usersec.h \
234 util.h \
235 utime.h \
236 utmp.h \
237 utmpx.h \
238 vis.h \
239)
240
241# lastlog.h requires sys/time.h to be included first on Solaris
242AC_CHECK_HEADERS(lastlog.h, [], [], [
243#ifdef HAVE_SYS_TIME_H
244# include <sys/time.h>
245#endif
246])
247
248# sys/ptms.h requires sys/stream.h to be included first on Solaris
249AC_CHECK_HEADERS(sys/ptms.h, [], [], [
250#ifdef HAVE_SYS_STREAM_H
251# include <sys/stream.h>
252#endif
253])
254
255# login_cap.h requires sys/types.h on NetBSD
256AC_CHECK_HEADERS(login_cap.h, [], [], [
257#include <sys/types.h>
258])
259
260# Messages for features tested for in target-specific section
261SIA_MSG="no"
262SPC_MSG="no"
263
130# Check for some target-specific stuff 264# Check for some target-specific stuff
131case "$host" in 265case "$host" in
132*-*-aix*) 266*-*-aix*)
267 # Some versions of VAC won't allow macro redefinitions at
268 # -qlanglevel=ansi, and autoconf 2.60 sometimes insists on using that
269 # particularly with older versions of vac or xlc.
270 # It also throws errors about null macro argments, but these are
271 # not fatal.
272 AC_MSG_CHECKING(if compiler allows macro redefinitions)
273 AC_COMPILE_IFELSE(
274 [AC_LANG_SOURCE([[
275#define testmacro foo
276#define testmacro bar
277int main(void) { exit(0); }
278 ]])],
279 [ AC_MSG_RESULT(yes) ],
280 [ AC_MSG_RESULT(no)
281 CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`"
282 LD="`echo $LD | sed 's/-qlanglvl\=ansi//g'`"
283 CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`"
284 CPPFLAGS="`echo $CPPFLAGS | sed 's/-qlanglvl\=ansi//g'`"
285 ]
286 )
287
133 AC_MSG_CHECKING([how to specify blibpath for linker ($LD)]) 288 AC_MSG_CHECKING([how to specify blibpath for linker ($LD)])
134 if (test -z "$blibpath"); then 289 if (test -z "$blibpath"); then
135 blibpath="/usr/lib:/lib" 290 blibpath="/usr/lib:/lib"
136 fi 291 fi
137 saved_LDFLAGS="$LDFLAGS" 292 saved_LDFLAGS="$LDFLAGS"
138 for tryflags in -blibpath: -Wl,-blibpath: -Wl,-rpath, ;do 293 if test "$GCC" = "yes"; then
294 flags="-Wl,-blibpath: -Wl,-rpath, -blibpath:"
295 else
296 flags="-blibpath: -Wl,-blibpath: -Wl,-rpath,"
297 fi
298 for tryflags in $flags ;do
139 if (test -z "$blibflags"); then 299 if (test -z "$blibflags"); then
140 LDFLAGS="$saved_LDFLAGS $tryflags$blibpath" 300 LDFLAGS="$saved_LDFLAGS $tryflags$blibpath"
141 AC_TRY_LINK([], [], [blibflags=$tryflags]) 301 AC_TRY_LINK([], [], [blibflags=$tryflags])
@@ -175,6 +335,12 @@ case "$host" in
175 [#include <usersec.h>] 335 [#include <usersec.h>]
176 ) 336 )
177 AC_CHECK_FUNCS(setauthdb) 337 AC_CHECK_FUNCS(setauthdb)
338 AC_CHECK_DECL(F_CLOSEM,
339 AC_DEFINE(HAVE_FCNTL_CLOSEM, 1, [Use F_CLOSEM fcntl for closefrom]),
340 [],
341 [ #include <limits.h>
342 #include <fcntl.h> ]
343 )
178 check_for_aix_broken_getaddrinfo=1 344 check_for_aix_broken_getaddrinfo=1
179 AC_DEFINE(BROKEN_REALPATH, 1, [Define if you have a broken realpath.]) 345 AC_DEFINE(BROKEN_REALPATH, 1, [Define if you have a broken realpath.])
180 AC_DEFINE(SETEUID_BREAKS_SETUID, 1, 346 AC_DEFINE(SETEUID_BREAKS_SETUID, 1,
@@ -190,10 +356,11 @@ case "$host" in
190 supported by bsd-setproctitle.c]) 356 supported by bsd-setproctitle.c])
191 AC_DEFINE(SSHPAM_CHAUTHTOK_NEEDS_RUID, 1, 357 AC_DEFINE(SSHPAM_CHAUTHTOK_NEEDS_RUID, 1,
192 [AIX 5.2 and 5.3 (and presumably newer) require this]) 358 [AIX 5.2 and 5.3 (and presumably newer) require this])
359 AC_DEFINE(PTY_ZEROREAD, 1, [read(1) can return 0 for a non-closed fd])
193 ;; 360 ;;
194*-*-cygwin*) 361*-*-cygwin*)
195 check_for_libcrypt_later=1 362 check_for_libcrypt_later=1
196 LIBS="$LIBS /usr/lib/textmode.o" 363 LIBS="$LIBS /usr/lib/textreadmode.o"
197 AC_DEFINE(HAVE_CYGWIN, 1, [Define if you are on Cygwin]) 364 AC_DEFINE(HAVE_CYGWIN, 1, [Define if you are on Cygwin])
198 AC_DEFINE(USE_PIPES, 1, [Use PIPES instead of a socketpair()]) 365 AC_DEFINE(USE_PIPES, 1, [Use PIPES instead of a socketpair()])
199 AC_DEFINE(DISABLE_SHADOW, 1, 366 AC_DEFINE(DISABLE_SHADOW, 1,
@@ -231,30 +398,38 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
231 AC_DEFINE(BROKEN_SETREGID) 398 AC_DEFINE(BROKEN_SETREGID)
232 AC_DEFINE_UNQUOTED(BIND_8_COMPAT, 1, 399 AC_DEFINE_UNQUOTED(BIND_8_COMPAT, 1,
233 [Define if your resolver libs need this for getrrsetbyname]) 400 [Define if your resolver libs need this for getrrsetbyname])
234 AC_MSG_CHECKING(if we have the Security Authorization Session API) 401 AC_DEFINE(SSH_TUN_FREEBSD, 1, [Open tunnel devices the FreeBSD way])
235 AC_TRY_COMPILE([#include <Security/AuthSession.h>], 402 AC_DEFINE(SSH_TUN_COMPAT_AF, 1,
236 [SessionCreate(0, 0);], 403 [Use tunnel device compatibility to OpenBSD])
237 [ac_cv_use_security_session_api="yes" 404 AC_DEFINE(SSH_TUN_PREPEND_AF, 1,
238 AC_DEFINE(USE_SECURITY_SESSION_API, 1, 405 [Prepend the address family to IP tunnel traffic])
406 AC_MSG_CHECKING(if we have the Security Authorization Session API)
407 AC_TRY_COMPILE([#include <Security/AuthSession.h>],
408 [SessionCreate(0, 0);],
409 [ac_cv_use_security_session_api="yes"
410 AC_DEFINE(USE_SECURITY_SESSION_API, 1,
239 [platform has the Security Authorization Session API]) 411 [platform has the Security Authorization Session API])
240 LIBS="$LIBS -framework Security" 412 LIBS="$LIBS -framework Security"
241 AC_MSG_RESULT(yes)], 413 AC_MSG_RESULT(yes)],
242 [ac_cv_use_security_session_api="no" 414 [ac_cv_use_security_session_api="no"
243 AC_MSG_RESULT(no)]) 415 AC_MSG_RESULT(no)])
244 AC_MSG_CHECKING(if we have an in-memory credentials cache) 416 AC_MSG_CHECKING(if we have an in-memory credentials cache)
245 AC_TRY_COMPILE( 417 AC_TRY_COMPILE(
246 [#include <Kerberos/Kerberos.h>], 418 [#include <Kerberos/Kerberos.h>],
247 [cc_context_t c; 419 [cc_context_t c;
248 (void) cc_initialize (&c, 0, NULL, NULL);], 420 (void) cc_initialize (&c, 0, NULL, NULL);],
249 [AC_DEFINE(USE_CCAPI, 1, 421 [AC_DEFINE(USE_CCAPI, 1,
250 [platform uses an in-memory credentials cache]) 422 [platform uses an in-memory credentials cache])
251 LIBS="$LIBS -framework Security" 423 LIBS="$LIBS -framework Security"
252 AC_MSG_RESULT(yes) 424 AC_MSG_RESULT(yes)
253 if test "x$ac_cv_use_security_session_api" = "xno"; then 425 if test "x$ac_cv_use_security_session_api" = "xno"; then
254 AC_MSG_ERROR(*** Need a security framework to use the credentials cache API ***) 426 AC_MSG_ERROR(*** Need a security framework to use the credentials cache API ***)
255 fi], 427 fi],
256 [AC_MSG_RESULT(no)] 428 [AC_MSG_RESULT(no)]
257 ) 429 )
430 ;;
431*-*-dragonfly*)
432 SSHDLIBS="$SSHDLIBS -lcrypt"
258 ;; 433 ;;
259*-*-hpux*) 434*-*-hpux*)
260 # first we define all of the options common to all HP-UX releases 435 # first we define all of the options common to all HP-UX releases
@@ -409,6 +584,8 @@ mips-sony-bsd|mips-sony-newsos4)
409 AC_DEFINE(HAVE_ATTRIBUTE__SENTINEL__, 1, [OpenBSD's gcc has sentinel]) 584 AC_DEFINE(HAVE_ATTRIBUTE__SENTINEL__, 1, [OpenBSD's gcc has sentinel])
410 AC_DEFINE(HAVE_ATTRIBUTE__BOUNDED__, 1, [OpenBSD's gcc has bounded]) 585 AC_DEFINE(HAVE_ATTRIBUTE__BOUNDED__, 1, [OpenBSD's gcc has bounded])
411 AC_DEFINE(SSH_TUN_OPENBSD, 1, [Open tunnel devices the OpenBSD way]) 586 AC_DEFINE(SSH_TUN_OPENBSD, 1, [Open tunnel devices the OpenBSD way])
587 AC_DEFINE(SYSLOG_R_SAFE_IN_SIGHAND, 1,
588 [syslog_r function is safe to use in in a signal handler])
412 ;; 589 ;;
413*-*-solaris*) 590*-*-solaris*)
414 if test "x$withval" != "xno" ; then 591 if test "x$withval" != "xno" ; then
@@ -428,6 +605,8 @@ mips-sony-bsd|mips-sony-newsos4)
428 AC_DEFINE(SSHD_ACQUIRES_CTTY, 1, 605 AC_DEFINE(SSHD_ACQUIRES_CTTY, 1,
429 [Define if sshd somehow reacquires a controlling TTY 606 [Define if sshd somehow reacquires a controlling TTY
430 after setsid()]) 607 after setsid()])
608 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd
609 in case the name is longer than 8 chars])
431 external_path_file=/etc/default/login 610 external_path_file=/etc/default/login
432 # hardwire lastlog location (can't detect it on some versions) 611 # hardwire lastlog location (can't detect it on some versions)
433 conf_lastlog_location="/var/adm/lastlog" 612 conf_lastlog_location="/var/adm/lastlog"
@@ -441,6 +620,17 @@ mips-sony-bsd|mips-sony-newsos4)
441 else 620 else
442 AC_MSG_RESULT(no) 621 AC_MSG_RESULT(no)
443 fi 622 fi
623 AC_ARG_WITH(solaris-contracts,
624 [ --with-solaris-contracts Enable Solaris process contracts (experimental)],
625 [
626 AC_CHECK_LIB(contract, ct_tmpl_activate,
627 [ AC_DEFINE(USE_SOLARIS_PROCESS_CONTRACTS, 1,
628 [Define if you have Solaris process contracts])
629 SSHDLIBS="$SSHDLIBS -lcontract"
630 AC_SUBST(SSHDLIBS)
631 SPC_MSG="yes" ], )
632 ],
633 )
444 ;; 634 ;;
445*-*-sunos4*) 635*-*-sunos4*)
446 CPPFLAGS="$CPPFLAGS -DSUNOS4" 636 CPPFLAGS="$CPPFLAGS -DSUNOS4"
@@ -478,7 +668,6 @@ mips-sony-bsd|mips-sony-newsos4)
478 ;; 668 ;;
479# UnixWare 1.x, UnixWare 2.x, and others based on code from Univel. 669# UnixWare 1.x, UnixWare 2.x, and others based on code from Univel.
480*-*-sysv4.2*) 670*-*-sysv4.2*)
481 CFLAGS="$CFLAGS -Dva_list=_VA_LIST"
482 AC_DEFINE(USE_PIPES) 671 AC_DEFINE(USE_PIPES)
483 AC_DEFINE(SETEUID_BREAKS_SETUID) 672 AC_DEFINE(SETEUID_BREAKS_SETUID)
484 AC_DEFINE(BROKEN_SETREUID) 673 AC_DEFINE(BROKEN_SETREUID)
@@ -500,6 +689,7 @@ mips-sony-bsd|mips-sony-newsos4)
500 TEST_SHELL=/u95/bin/sh 689 TEST_SHELL=/u95/bin/sh
501 AC_DEFINE(BROKEN_LIBIAF, 1, 690 AC_DEFINE(BROKEN_LIBIAF, 1,
502 [ia_uinfo routines not supported by OS yet]) 691 [ia_uinfo routines not supported by OS yet])
692 AC_DEFINE(BROKEN_UPDWTMPX)
503 ;; 693 ;;
504 *) AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") 694 *) AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
505 ;; 695 ;;
@@ -589,6 +779,7 @@ mips-sony-bsd|mips-sony-newsos4)
589 system's login() call]) 779 system's login() call])
590 AC_DEFINE(DISABLE_FD_PASSING) 780 AC_DEFINE(DISABLE_FD_PASSING)
591 LIBS="$LIBS -lsecurity -ldb -lm -laud" 781 LIBS="$LIBS -lsecurity -ldb -lm -laud"
782 SIA_MSG="yes"
592 else 783 else
593 AC_MSG_RESULT(no) 784 AC_MSG_RESULT(no)
594 AC_DEFINE(LOCKED_PASSWD_SUBSTR, "Nologin", 785 AC_DEFINE(LOCKED_PASSWD_SUBSTR, "Nologin",
@@ -608,6 +799,8 @@ mips-sony-bsd|mips-sony-newsos4)
608 AC_DEFINE(MISSING_HOWMANY, 1, [Define on *nto-qnx systems]) 799 AC_DEFINE(MISSING_HOWMANY, 1, [Define on *nto-qnx systems])
609 AC_DEFINE(MISSING_FD_MASK, 1, [Define on *nto-qnx systems]) 800 AC_DEFINE(MISSING_FD_MASK, 1, [Define on *nto-qnx systems])
610 AC_DEFINE(DISABLE_LASTLOG) 801 AC_DEFINE(DISABLE_LASTLOG)
802 AC_DEFINE(SSHD_ACQUIRES_CTTY)
803 enable_etc_default_login=no # has incompatible /etc/default/login
611 ;; 804 ;;
612 805
613*-*-ultrix*) 806*-*-ultrix*)
@@ -624,55 +817,6 @@ mips-sony-bsd|mips-sony-newsos4)
624 ;; 817 ;;
625esac 818esac
626 819
627# Allow user to specify flags
628AC_ARG_WITH(cflags,
629 [ --with-cflags Specify additional flags to pass to compiler],
630 [
631 if test -n "$withval" && test "x$withval" != "xno" && \
632 test "x${withval}" != "xyes"; then
633 CFLAGS="$CFLAGS $withval"
634 fi
635 ]
636)
637AC_ARG_WITH(cppflags,
638 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
639 [
640 if test -n "$withval" && test "x$withval" != "xno" && \
641 test "x${withval}" != "xyes"; then
642 CPPFLAGS="$CPPFLAGS $withval"
643 fi
644 ]
645)
646AC_ARG_WITH(ldflags,
647 [ --with-ldflags Specify additional flags to pass to linker],
648 [
649 if test -n "$withval" && test "x$withval" != "xno" && \
650 test "x${withval}" != "xyes"; then
651 LDFLAGS="$LDFLAGS $withval"
652 fi
653 ]
654)
655AC_ARG_WITH(libs,
656 [ --with-libs Specify additional libraries to link with],
657 [
658 if test -n "$withval" && test "x$withval" != "xno" && \
659 test "x${withval}" != "xyes"; then
660 LIBS="$LIBS $withval"
661 fi
662 ]
663)
664AC_ARG_WITH(Werror,
665 [ --with-Werror Build main code with -Werror],
666 [
667 if test -n "$withval" && test "x$withval" != "xno"; then
668 werror_flags="-Werror"
669 if test "x${withval}" != "xyes"; then
670 werror_flags="$withval"
671 fi
672 fi
673 ]
674)
675
676AC_MSG_CHECKING(compiler and flags for sanity) 820AC_MSG_CHECKING(compiler and flags for sanity)
677AC_RUN_IFELSE( 821AC_RUN_IFELSE(
678 [AC_LANG_SOURCE([ 822 [AC_LANG_SOURCE([
@@ -688,79 +832,6 @@ int main(){exit(0);}
688) 832)
689 833
690dnl Checks for header files. 834dnl Checks for header files.
691AC_CHECK_HEADERS( \
692 bstring.h \
693 crypt.h \
694 dirent.h \
695 endian.h \
696 features.h \
697 floatingpoint.h \
698 getopt.h \
699 glob.h \
700 ia.h \
701 iaf.h \
702 limits.h \
703 login.h \
704 login_cap.h \
705 maillock.h \
706 ndir.h \
707 netdb.h \
708 netgroup.h \
709 pam/pam_appl.h \
710 paths.h \
711 pty.h \
712 readpassphrase.h \
713 rpc/types.h \
714 security/pam_appl.h \
715 shadow.h \
716 stddef.h \
717 stdint.h \
718 string.h \
719 strings.h \
720 sys/audit.h \
721 sys/bitypes.h \
722 sys/bsdtty.h \
723 sys/cdefs.h \
724 sys/dir.h \
725 sys/mman.h \
726 sys/ndir.h \
727 sys/prctl.h \
728 sys/pstat.h \
729 sys/select.h \
730 sys/stat.h \
731 sys/stream.h \
732 sys/stropts.h \
733 sys/strtio.h \
734 sys/sysmacros.h \
735 sys/time.h \
736 sys/timers.h \
737 sys/un.h \
738 time.h \
739 tmpdir.h \
740 ttyent.h \
741 unistd.h \
742 usersec.h \
743 util.h \
744 utime.h \
745 utmp.h \
746 utmpx.h \
747 vis.h \
748)
749
750# lastlog.h requires sys/time.h to be included first on Solaris
751AC_CHECK_HEADERS(lastlog.h, [], [], [
752#ifdef HAVE_SYS_TIME_H
753# include <sys/time.h>
754#endif
755])
756
757# sys/ptms.h requires sys/stream.h to be included first on Solaris
758AC_CHECK_HEADERS(sys/ptms.h, [], [], [
759#ifdef HAVE_SYS_STREAM_H
760# include <sys/stream.h>
761#endif
762])
763
764# Checks for libraries. 835# Checks for libraries.
765AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match)) 836AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match))
766AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) 837AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
@@ -945,11 +1016,9 @@ AC_EGREP_CPP(FOUNDIT,
945 1016
946# Check for g.gl_matchc glob() extension 1017# Check for g.gl_matchc glob() extension
947AC_MSG_CHECKING(for gl_matchc field in glob_t) 1018AC_MSG_CHECKING(for gl_matchc field in glob_t)
948AC_EGREP_CPP(FOUNDIT, 1019AC_TRY_COMPILE(
949 [ 1020 [ #include <glob.h> ],
950 #include <glob.h> 1021 [glob_t g; g.gl_matchc = 1;],
951 int main(void){glob_t g; g.gl_matchc = 1;}
952 ],
953 [ 1022 [
954 AC_DEFINE(GLOB_HAS_GL_MATCHC, 1, 1023 AC_DEFINE(GLOB_HAS_GL_MATCHC, 1,
955 [Define if your system glob() function has 1024 [Define if your system glob() function has
@@ -961,6 +1030,8 @@ AC_EGREP_CPP(FOUNDIT,
961 ] 1030 ]
962) 1031)
963 1032
1033AC_CHECK_DECLS(GLOB_NOMATCH, , , [#include <glob.h>])
1034
964AC_MSG_CHECKING([whether struct dirent allocates space for d_name]) 1035AC_MSG_CHECKING([whether struct dirent allocates space for d_name])
965AC_RUN_IFELSE( 1036AC_RUN_IFELSE(
966 [AC_LANG_SOURCE([[ 1037 [AC_LANG_SOURCE([[
@@ -1142,7 +1213,13 @@ AC_ARG_WITH(audit,
1142 AUDIT_MODULE=bsm 1213 AUDIT_MODULE=bsm
1143 dnl Checks for headers, libs and functions 1214 dnl Checks for headers, libs and functions
1144 AC_CHECK_HEADERS(bsm/audit.h, [], 1215 AC_CHECK_HEADERS(bsm/audit.h, [],
1145 [AC_MSG_ERROR(BSM enabled and bsm/audit.h not found)]) 1216 [AC_MSG_ERROR(BSM enabled and bsm/audit.h not found)],
1217 [
1218#ifdef HAVE_TIME_H
1219# include <time.h>
1220#endif
1221 ]
1222)
1146 AC_CHECK_LIB(bsm, getaudit, [], 1223 AC_CHECK_LIB(bsm, getaudit, [],
1147 [AC_MSG_ERROR(BSM enabled and required library not found)]) 1224 [AC_MSG_ERROR(BSM enabled and required library not found)])
1148 AC_CHECK_FUNCS(getaudit, [], 1225 AC_CHECK_FUNCS(getaudit, [],
@@ -1288,6 +1365,29 @@ AC_CHECK_DECL(tcsendbreak,
1288 1365
1289AC_CHECK_DECLS(h_errno, , ,[#include <netdb.h>]) 1366AC_CHECK_DECLS(h_errno, , ,[#include <netdb.h>])
1290 1367
1368AC_CHECK_DECLS(SHUT_RD, , ,
1369 [
1370#include <sys/types.h>
1371#include <sys/socket.h>
1372 ])
1373
1374AC_CHECK_DECLS(O_NONBLOCK, , ,
1375 [
1376#include <sys/types.h>
1377#ifdef HAVE_SYS_STAT_H
1378# include <sys/stat.h>
1379#endif
1380#ifdef HAVE_FCNTL_H
1381# include <fcntl.h>
1382#endif
1383 ])
1384
1385AC_CHECK_DECLS(writev, , , [
1386#include <sys/types.h>
1387#include <sys/uio.h>
1388#include <unistd.h>
1389 ])
1390
1291AC_CHECK_FUNCS(setresuid, [ 1391AC_CHECK_FUNCS(setresuid, [
1292 dnl Some platorms have setresuid that isn't implemented, test for this 1392 dnl Some platorms have setresuid that isn't implemented, test for this
1293 AC_MSG_CHECKING(if setresuid seems to work) 1393 AC_MSG_CHECKING(if setresuid seems to work)
@@ -1632,6 +1732,7 @@ main(void)
1632 AC_MSG_RESULT(no) 1732 AC_MSG_RESULT(no)
1633 AC_DEFINE(BROKEN_GETADDRINFO) 1733 AC_DEFINE(BROKEN_GETADDRINFO)
1634 ], 1734 ],
1735 [
1635 AC_MSG_RESULT(cross-compiling, assuming no) 1736 AC_MSG_RESULT(cross-compiling, assuming no)
1636 ] 1737 ]
1637 ) 1738 )
@@ -1657,61 +1758,6 @@ fi
1657 1758
1658AC_FUNC_GETPGRP 1759AC_FUNC_GETPGRP
1659 1760
1660# Check for PAM libs
1661PAM_MSG="no"
1662AC_ARG_WITH(pam,
1663 [ --with-pam Enable PAM support ],
1664 [
1665 if test "x$withval" != "xno" ; then
1666 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
1667 test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
1668 AC_MSG_ERROR([PAM headers not found])
1669 fi
1670
1671 AC_CHECK_LIB(dl, dlopen, , )
1672 AC_CHECK_LIB(pam, pam_set_item, , AC_MSG_ERROR([*** libpam missing]))
1673 AC_CHECK_FUNCS(pam_getenvlist)
1674 AC_CHECK_FUNCS(pam_putenv)
1675
1676 PAM_MSG="yes"
1677
1678 AC_DEFINE(USE_PAM, 1,
1679 [Define if you want to enable PAM support])
1680 if test $ac_cv_lib_dl_dlopen = yes; then
1681 LIBPAM="-lpam -ldl"
1682 else
1683 LIBPAM="-lpam"
1684 fi
1685 AC_SUBST(LIBPAM)
1686 fi
1687 ]
1688)
1689
1690# Check for older PAM
1691if test "x$PAM_MSG" = "xyes" ; then
1692 # Check PAM strerror arguments (old PAM)
1693 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
1694 AC_TRY_COMPILE(
1695 [
1696#include <stdlib.h>
1697#if defined(HAVE_SECURITY_PAM_APPL_H)
1698#include <security/pam_appl.h>
1699#elif defined (HAVE_PAM_PAM_APPL_H)
1700#include <pam/pam_appl.h>
1701#endif
1702 ],
1703 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
1704 [AC_MSG_RESULT(no)],
1705 [
1706 AC_DEFINE(HAVE_OLD_PAM, 1,
1707 [Define if you have an old version of PAM
1708 which takes only one argument to pam_strerror])
1709 AC_MSG_RESULT(yes)
1710 PAM_MSG="yes (old library)"
1711 ]
1712 )
1713fi
1714
1715# Search for OpenSSL 1761# Search for OpenSSL
1716saved_CPPFLAGS="$CPPFLAGS" 1762saved_CPPFLAGS="$CPPFLAGS"
1717saved_LDFLAGS="$LDFLAGS" 1763saved_LDFLAGS="$LDFLAGS"
@@ -1835,6 +1881,14 @@ int main(void) {
1835 ] 1881 ]
1836) 1882)
1837 1883
1884AC_ARG_WITH(openssl-header-check,
1885 [ --without-openssl-header-check Disable OpenSSL version consistency check],
1886 [ if test "x$withval" = "xno" ; then
1887 openssl_check_nonfatal=1
1888 fi
1889 ]
1890)
1891
1838# Sanity check OpenSSL headers 1892# Sanity check OpenSSL headers
1839AC_MSG_CHECKING([whether OpenSSL's headers match the library]) 1893AC_MSG_CHECKING([whether OpenSSL's headers match the library])
1840AC_RUN_IFELSE( 1894AC_RUN_IFELSE(
@@ -1848,18 +1902,75 @@ int main(void) { exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); }
1848 ], 1902 ],
1849 [ 1903 [
1850 AC_MSG_RESULT(no) 1904 AC_MSG_RESULT(no)
1851 AC_MSG_ERROR([Your OpenSSL headers do not match your library. 1905 if test "x$openssl_check_nonfatal" = "x"; then
1852Check config.log for details. 1906 AC_MSG_ERROR([Your OpenSSL headers do not match your
1907library. Check config.log for details.
1908If you are sure your installation is consistent, you can disable the check
1909by running "./configure --without-openssl-header-check".
1910Also see contrib/findssl.sh for help identifying header/library mismatches.
1911])
1912 else
1913 AC_MSG_WARN([Your OpenSSL headers do not match your
1914library. Check config.log for details.
1853Also see contrib/findssl.sh for help identifying header/library mismatches.]) 1915Also see contrib/findssl.sh for help identifying header/library mismatches.])
1916 fi
1854 ], 1917 ],
1855 [ 1918 [
1856 AC_MSG_WARN([cross compiling: not checking]) 1919 AC_MSG_WARN([cross compiling: not checking])
1857 ] 1920 ]
1858) 1921)
1859 1922
1923AC_MSG_CHECKING([if programs using OpenSSL functions will link])
1924AC_LINK_IFELSE(
1925 [AC_LANG_SOURCE([[
1926#include <openssl/evp.h>
1927int main(void) { SSLeay_add_all_algorithms(); }
1928 ]])],
1929 [
1930 AC_MSG_RESULT(yes)
1931 ],
1932 [
1933 AC_MSG_RESULT(no)
1934 saved_LIBS="$LIBS"
1935 LIBS="$LIBS -ldl"
1936 AC_MSG_CHECKING([if programs using OpenSSL need -ldl])
1937 AC_LINK_IFELSE(
1938 [AC_LANG_SOURCE([[
1939#include <openssl/evp.h>
1940int main(void) { SSLeay_add_all_algorithms(); }
1941 ]])],
1942 [
1943 AC_MSG_RESULT(yes)
1944 ],
1945 [
1946 AC_MSG_RESULT(no)
1947 LIBS="$saved_LIBS"
1948 ]
1949 )
1950 ]
1951)
1952
1953AC_ARG_WITH(ssl-engine,
1954 [ --with-ssl-engine Enable OpenSSL (hardware) ENGINE support ],
1955 [ if test "x$withval" != "xno" ; then
1956 AC_MSG_CHECKING(for OpenSSL ENGINE support)
1957 AC_TRY_COMPILE(
1958 [ #include <openssl/engine.h>],
1959 [
1960ENGINE_load_builtin_engines();ENGINE_register_all_complete();
1961 ],
1962 [ AC_MSG_RESULT(yes)
1963 AC_DEFINE(USE_OPENSSL_ENGINE, 1,
1964 [Enable OpenSSL engine support])
1965 ],
1966 [ AC_MSG_ERROR(OpenSSL ENGINE support not found)]
1967 )
1968 fi ]
1969)
1970
1860# Check for OpenSSL without EVP_aes_{192,256}_cbc 1971# Check for OpenSSL without EVP_aes_{192,256}_cbc
1861AC_MSG_CHECKING([whether OpenSSL has crippled AES support]) 1972AC_MSG_CHECKING([whether OpenSSL has crippled AES support])
1862AC_COMPILE_IFELSE( 1973AC_LINK_IFELSE(
1863 [AC_LANG_SOURCE([[ 1974 [AC_LANG_SOURCE([[
1864#include <string.h> 1975#include <string.h>
1865#include <openssl/evp.h> 1976#include <openssl/evp.h>
@@ -1887,6 +1998,9 @@ if test "x$check_for_libcrypt_later" = "x1"; then
1887 AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt") 1998 AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt")
1888fi 1999fi
1889 2000
2001# Search for SHA256 support in libc and/or OpenSSL
2002AC_CHECK_FUNCS(SHA256_Update EVP_sha256)
2003
1890AC_CHECK_LIB(iaf, ia_openinfo) 2004AC_CHECK_LIB(iaf, ia_openinfo)
1891 2005
1892### Configure cryptographic random number support 2006### Configure cryptographic random number support
@@ -1917,6 +2031,69 @@ int main(void) { exit(RAND_status() == 1 ? 0 : 1); }
1917 ] 2031 ]
1918) 2032)
1919 2033
2034# Check for PAM libs
2035PAM_MSG="no"
2036AC_ARG_WITH(pam,
2037 [ --with-pam Enable PAM support ],
2038 [
2039 if test "x$withval" != "xno" ; then
2040 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
2041 test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
2042 AC_MSG_ERROR([PAM headers not found])
2043 fi
2044
2045 saved_LIBS="$LIBS"
2046 AC_CHECK_LIB(dl, dlopen, , )
2047 AC_CHECK_LIB(pam, pam_set_item, , AC_MSG_ERROR([*** libpam missing]))
2048 AC_CHECK_FUNCS(pam_getenvlist)
2049 AC_CHECK_FUNCS(pam_putenv)
2050 LIBS="$saved_LIBS"
2051
2052 PAM_MSG="yes"
2053
2054 LIBPAM="-lpam"
2055 AC_DEFINE(USE_PAM, 1,
2056 [Define if you want to enable PAM support])
2057
2058 if test $ac_cv_lib_dl_dlopen = yes; then
2059 case "$LIBS" in
2060 *-ldl*)
2061 # libdl already in LIBS
2062 ;;
2063 *)
2064 LIBPAM="$LIBPAM -ldl"
2065 ;;
2066 esac
2067 fi
2068 AC_SUBST(LIBPAM)
2069 fi
2070 ]
2071)
2072
2073# Check for older PAM
2074if test "x$PAM_MSG" = "xyes" ; then
2075 # Check PAM strerror arguments (old PAM)
2076 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
2077 AC_TRY_COMPILE(
2078 [
2079#include <stdlib.h>
2080#if defined(HAVE_SECURITY_PAM_APPL_H)
2081#include <security/pam_appl.h>
2082#elif defined (HAVE_PAM_PAM_APPL_H)
2083#include <pam/pam_appl.h>
2084#endif
2085 ],
2086 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
2087 [AC_MSG_RESULT(no)],
2088 [
2089 AC_DEFINE(HAVE_OLD_PAM, 1,
2090 [Define if you have an old version of PAM
2091 which takes only one argument to pam_strerror])
2092 AC_MSG_RESULT(yes)
2093 PAM_MSG="yes (old library)"
2094 ]
2095 )
2096fi
1920 2097
1921# Do we want to force the use of the rand helper? 2098# Do we want to force the use of the rand helper?
1922AC_ARG_WITH(rand-helper, 2099AC_ARG_WITH(rand-helper,
@@ -2136,6 +2313,34 @@ if test -z "$have_llong_max"; then
2136#define __USE_ISOC99 2313#define __USE_ISOC99
2137#include <limits.h> 2314#include <limits.h>
2138#define DATA "conftest.llminmax" 2315#define DATA "conftest.llminmax"
2316#define my_abs(a) ((a) < 0 ? ((a) * -1) : (a))
2317
2318/*
2319 * printf in libc on some platforms (eg old Tru64) does not understand %lld so
2320 * we do this the hard way.
2321 */
2322static int
2323fprint_ll(FILE *f, long long n)
2324{
2325 unsigned int i;
2326 int l[sizeof(long long) * 8];
2327
2328 if (n < 0)
2329 if (fprintf(f, "-") < 0)
2330 return -1;
2331 for (i = 0; n != 0; i++) {
2332 l[i] = my_abs(n % 10);
2333 n /= 10;
2334 }
2335 do {
2336 if (fprintf(f, "%d", l[--i]) < 0)
2337 return -1;
2338 } while (i != 0);
2339 if (fprintf(f, " ") < 0)
2340 return -1;
2341 return 0;
2342}
2343
2139int main(void) { 2344int main(void) {
2140 FILE *f; 2345 FILE *f;
2141 long long i, llmin, llmax = 0; 2346 long long i, llmin, llmax = 0;
@@ -2157,14 +2362,18 @@ int main(void) {
2157 2362
2158 /* Sanity check */ 2363 /* Sanity check */
2159 if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax 2364 if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax
2160 || llmax - 1 > llmax) { 2365 || llmax - 1 > llmax || llmin == llmax || llmin == 0
2366 || llmax == 0 || llmax < LONG_MAX || llmin > LONG_MIN) {
2161 fprintf(f, "unknown unknown\n"); 2367 fprintf(f, "unknown unknown\n");
2162 exit(2); 2368 exit(2);
2163 } 2369 }
2164 2370
2165 if (fprintf(f ,"%lld %lld", llmin, llmax) < 0) 2371 if (fprint_ll(f, llmin) < 0)
2166 exit(3); 2372 exit(3);
2167 2373 if (fprint_ll(f, llmax) < 0)
2374 exit(4);
2375 if (fclose(f) < 0)
2376 exit(5);
2168 exit(0); 2377 exit(0);
2169} 2378}
2170 ]])], 2379 ]])],
@@ -2172,17 +2381,6 @@ int main(void) {
2172 llong_min=`$AWK '{print $1}' conftest.llminmax` 2381 llong_min=`$AWK '{print $1}' conftest.llminmax`
2173 llong_max=`$AWK '{print $2}' conftest.llminmax` 2382 llong_max=`$AWK '{print $2}' conftest.llminmax`
2174 2383
2175 # snprintf on some Tru64s doesn't understand "%lld"
2176 case "$host" in
2177 alpha-dec-osf*)
2178 if test "x$ac_cv_sizeof_long_long_int" = "x8" &&
2179 test "x$llong_max" = "xld"; then
2180 llong_min="-9223372036854775808"
2181 llong_max="9223372036854775807"
2182 fi
2183 ;;
2184 esac
2185
2186 AC_MSG_RESULT($llong_max) 2384 AC_MSG_RESULT($llong_max)
2187 AC_DEFINE_UNQUOTED(LLONG_MAX, [${llong_max}LL], 2385 AC_DEFINE_UNQUOTED(LLONG_MAX, [${llong_max}LL],
2188 [max value of long long calculated by configure]) 2386 [max value of long long calculated by configure])
@@ -2928,7 +3126,7 @@ AC_ARG_WITH(opensc,
2928 LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags` 3126 LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags`
2929 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs` 3127 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs`
2930 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS" 3128 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
2931 LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS" 3129 LIBS="$LIBS $LIBOPENSC_LIBS"
2932 AC_DEFINE(SMARTCARD) 3130 AC_DEFINE(SMARTCARD)
2933 AC_DEFINE(USE_OPENSC, 1, 3131 AC_DEFINE(USE_OPENSC, 1,
2934 [Define if you want smartcard support 3132 [Define if you want smartcard support
@@ -2976,6 +3174,26 @@ int main()
2976 [#include <arpa/nameser.h>]) 3174 [#include <arpa/nameser.h>])
2977 ]) 3175 ])
2978 3176
3177# Check whether user wants SELinux support
3178SELINUX_MSG="no"
3179LIBSELINUX=""
3180AC_ARG_WITH(selinux,
3181 [ --with-selinux Enable SELinux support],
3182 [ if test "x$withval" != "xno" ; then
3183 AC_DEFINE(WITH_SELINUX,1,[Define if you want SELinux support.])
3184 SELINUX_MSG="yes"
3185 AC_CHECK_HEADER([selinux/selinux.h], ,
3186 AC_MSG_ERROR(SELinux support requires selinux.h header))
3187 AC_CHECK_LIB(selinux, setexeccon, [ LIBSELINUX="-lselinux" ],
3188 AC_MSG_ERROR(SELinux support requires libselinux library))
3189 save_LIBS="$LIBS"
3190 LIBS="$LIBS $LIBSELINUX"
3191 AC_CHECK_FUNCS(getseuserbyname get_default_context_with_level)
3192 LIBS="$save_LIBS"
3193 fi ]
3194)
3195AC_SUBST(LIBSELINUX)
3196
2979# Check whether user wants Kerberos 5 support 3197# Check whether user wants Kerberos 5 support
2980KRB5_MSG="no" 3198KRB5_MSG="no"
2981AC_ARG_WITH(kerberos5, 3199AC_ARG_WITH(kerberos5,
@@ -3738,20 +3956,13 @@ if test ! -z "$blibpath" ; then
3738 AC_MSG_WARN([Please check and edit blibpath in LDFLAGS in Makefile]) 3956 AC_MSG_WARN([Please check and edit blibpath in LDFLAGS in Makefile])
3739fi 3957fi
3740 3958
3741dnl remove pam and dl because they are in $LIBPAM
3742if test "$PAM_MSG" = yes ; then
3743 LIBS=`echo $LIBS | sed 's/-lpam //'`
3744fi
3745if test "$ac_cv_lib_pam_pam_set_item" = yes ; then
3746 LIBS=`echo $LIBS | sed 's/-ldl //'`
3747fi
3748
3749dnl Adding -Werror to CFLAGS early prevents configure tests from running. 3959dnl Adding -Werror to CFLAGS early prevents configure tests from running.
3750dnl Add now. 3960dnl Add now.
3751CFLAGS="$CFLAGS $werror_flags" 3961CFLAGS="$CFLAGS $werror_flags"
3752 3962
3753AC_EXEEXT 3963AC_EXEEXT
3754AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openbsd-compat/Makefile \ 3964AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openssh.xml \
3965 openbsd-compat/Makefile openbsd-compat/regress/Makefile \
3755 scard/Makefile ssh_prng_cmds survey.sh]) 3966 scard/Makefile ssh_prng_cmds survey.sh])
3756AC_OUTPUT 3967AC_OUTPUT
3757 3968
@@ -3793,12 +4004,15 @@ echo " sshd superuser user PATH: $J"
3793fi 4004fi
3794echo " Manpage format: $MANTYPE" 4005echo " Manpage format: $MANTYPE"
3795echo " PAM support: $PAM_MSG" 4006echo " PAM support: $PAM_MSG"
4007echo " OSF SIA support: $SIA_MSG"
3796echo " KerberosV support: $KRB5_MSG" 4008echo " KerberosV support: $KRB5_MSG"
4009echo " SELinux support: $SELINUX_MSG"
3797echo " Smartcard support: $SCARD_MSG" 4010echo " Smartcard support: $SCARD_MSG"
3798echo " S/KEY support: $SKEY_MSG" 4011echo " S/KEY support: $SKEY_MSG"
3799echo " TCP Wrappers support: $TCPW_MSG" 4012echo " TCP Wrappers support: $TCPW_MSG"
3800echo " MD5 password support: $MD5_MSG" 4013echo " MD5 password support: $MD5_MSG"
3801echo " libedit support: $LIBEDIT_MSG" 4014echo " libedit support: $LIBEDIT_MSG"
4015echo " Solaris process contract support: $SPC_MSG"
3802echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG" 4016echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
3803echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG" 4017echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
3804echo " BSD Auth support: $BSD_AUTH_MSG" 4018echo " BSD Auth support: $BSD_AUTH_MSG"
diff --git a/contrib/aix/buildbff.sh b/contrib/aix/buildbff.sh
index 09b9c118c..97a7cbbba 100755
--- a/contrib/aix/buildbff.sh
+++ b/contrib/aix/buildbff.sh
@@ -1,7 +1,7 @@
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.8 2005/03/29 13:24:12 dtucker Exp $ 4# $Id: buildbff.sh,v 1.10 2006/09/10 03:24:19 dtucker Exp $
5# 5#
6# Author: Darren Tucker (dtucker at zip dot com dot au) 6# Author: Darren Tucker (dtucker at zip dot com dot au)
7# This file is placed in the public domain and comes with absolutely 7# This file is placed in the public domain and comes with absolutely
@@ -23,6 +23,8 @@ umask 022
23 23
24startdir=`pwd` 24startdir=`pwd`
25 25
26perl -v >/dev/null || (echo perl required; exit 1)
27
26# Path to inventory.sh: same place as buildbff.sh 28# Path to inventory.sh: same place as buildbff.sh
27if echo $0 | egrep '^/' 29if echo $0 | egrep '^/'
28then 30then
@@ -200,33 +202,29 @@ do
200done 202done
201echo 203echo
202 204
203# Create PrivSep user if PrivSep not disabled in config 205# Create PrivilegeSeparation user and group if not present
204echo Creating PrivSep prereqs if required. 206echo Checking for PrivilegeSeparation user and group.
205if egrep '^[ \t]*UsePrivilegeSeparation[ \t]+no' $sysconfdir/sshd_config >/dev/null 207if cut -f1 -d: /etc/group | egrep '^'$SSH_PRIVSEP_USER'\$' >/dev/null
206then 208then
207 echo "UsePrivilegeSeparation disabled in config, not creating PrivSep user," 209 echo "PrivSep group $SSH_PRIVSEP_USER already exists."
208 echo "group or chroot directory."
209else 210else
210 echo "UsePrivilegeSeparation enabled in config (or defaulting to on)." 211 echo "Creating PrivSep group $SSH_PRIVSEP_USER."
211 212 mkgroup -A $SSH_PRIVSEP_USER
212 # create group if required 213fi
213 if cut -f1 -d: /etc/group | egrep '^'$SSH_PRIVSEP_USER'\$' >/dev/null
214 then
215 echo "PrivSep group $SSH_PRIVSEP_USER already exists."
216 else
217 echo "Creating PrivSep group $SSH_PRIVSEP_USER."
218 mkgroup -A $SSH_PRIVSEP_USER
219 fi
220 214
221 # Create user if required 215# Create user if required
222 if lsuser "$SSH_PRIVSEP_USER" >/dev/null 216if lsuser "$SSH_PRIVSEP_USER" >/dev/null
223 then 217then
224 echo "PrivSep user $SSH_PRIVSEP_USER already exists." 218 echo "PrivSep user $SSH_PRIVSEP_USER already exists."
225 else 219else
226 echo "Creating PrivSep user $SSH_PRIVSEP_USER." 220 echo "Creating PrivSep user $SSH_PRIVSEP_USER."
227 mkuser gecos='SSHD PrivSep User' login=false rlogin=false account_locked=true pgrp=$SSH_PRIVSEP_USER $SSH_PRIVSEP_USER 221 mkuser gecos='SSHD PrivSep User' login=false rlogin=false account_locked=true pgrp=$SSH_PRIVSEP_USER $SSH_PRIVSEP_USER
228 fi 222fi
229 223
224if egrep '^[ \t]*UsePrivilegeSeparation[ \t]+no' $sysconfdir/sshd_config >/dev/null
225then
226 echo UsePrivilegeSeparation not enabled, privsep directory not required.
227else
230 # create chroot directory if required 228 # create chroot directory if required
231 if [ -d $PRIVSEP_PATH ] 229 if [ -d $PRIVSEP_PATH ]
232 then 230 then
diff --git a/contrib/caldera/openssh.spec b/contrib/caldera/openssh.spec
index 09c08f194..3d756eb7f 100644
--- a/contrib/caldera/openssh.spec
+++ b/contrib/caldera/openssh.spec
@@ -17,7 +17,7 @@
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 4.3p2 20 %define version 4.6p1
21 %define cvs %{nil} 21 %define cvs %{nil}
22 %define release 1 22 %define release 1
23%else 23%else
@@ -357,4 +357,4 @@ fi
357* Mon Jan 01 1998 ... 357* Mon Jan 01 1998 ...
358Template Version: 1.31 358Template Version: 1.31
359 359
360$Id: openssh.spec,v 1.56.2.1 2006/02/11 00:00:45 djm Exp $ 360$Id: openssh.spec,v 1.60 2007/03/06 10:23:27 djm Exp $
diff --git a/contrib/cygwin/ssh-host-config b/contrib/cygwin/ssh-host-config
index 0540890e6..e2ad69f19 100644
--- a/contrib/cygwin/ssh-host-config
+++ b/contrib/cygwin/ssh-host-config
@@ -153,22 +153,31 @@ fi
153 153
154# Create /var/log and /var/log/lastlog if not already existing 154# Create /var/log and /var/log/lastlog if not already existing
155 155
156if [ -f ${LOCALSTATEDIR}/log ] 156if [ -e ${LOCALSTATEDIR}/log -a ! -d ${LOCALSTATEDIR}/log ]
157then 157then
158 echo "Creating ${LOCALSTATEDIR}/log failed!" 158 echo
159else 159 echo "${LOCALSTATEDIR}/log is existant but not a directory."
160 if [ ! -d ${LOCALSTATEDIR}/log ] 160 echo "Cannot create ssh host configuration."
161 then 161 echo
162 mkdir -p ${LOCALSTATEDIR}/log 162 exit 1
163 fi 163fi
164 if [ -d ${LOCALSTATEDIR}/log/lastlog ] 164if [ ! -e ${LOCALSTATEDIR}/log ]
165 then 165then
166 chmod 777 ${LOCALSTATEDIR}/log/lastlog 166 mkdir -p ${LOCALSTATEDIR}/log
167 elif [ ! -f ${LOCALSTATEDIR}/log/lastlog ] 167fi
168 then 168
169 cat /dev/null > ${LOCALSTATEDIR}/log/lastlog 169if [ -e ${LOCALSTATEDIR}/log/lastlog -a ! -f ${LOCALSTATEDIR}/log/lastlog ]
170 chmod 666 ${LOCALSTATEDIR}/log/lastlog 170then
171 fi 171 echo
172 echo "${LOCALSTATEDIR}/log/lastlog exists, but is not a file."
173 echo "Cannot create ssh host configuration."
174 echo
175 exit 1
176fi
177if [ ! -e ${LOCALSTATEDIR}/log/lastlog ]
178then
179 cat /dev/null > ${LOCALSTATEDIR}/log/lastlog
180 chmod 644 ${LOCALSTATEDIR}/log/lastlog
172fi 181fi
173 182
174# Create /var/empty file used as chroot jail for privilege separation 183# Create /var/empty file used as chroot jail for privilege separation
@@ -507,6 +516,7 @@ then
507 fi 516 fi
508 editrights -a SeAssignPrimaryTokenPrivilege -u sshd_server && 517 editrights -a SeAssignPrimaryTokenPrivilege -u sshd_server &&
509 editrights -a SeCreateTokenPrivilege -u sshd_server && 518 editrights -a SeCreateTokenPrivilege -u sshd_server &&
519 editrights -a SeTcbPrivilege -u sshd_server &&
510 editrights -a SeDenyInteractiveLogonRight -u sshd_server && 520 editrights -a SeDenyInteractiveLogonRight -u sshd_server &&
511 editrights -a SeDenyNetworkLogonRight -u sshd_server && 521 editrights -a SeDenyNetworkLogonRight -u sshd_server &&
512 editrights -a SeDenyRemoteInteractiveLogonRight -u sshd_server && 522 editrights -a SeDenyRemoteInteractiveLogonRight -u sshd_server &&
@@ -578,6 +588,7 @@ then
578 fi 588 fi
579 chown "${_user}" ${SYSCONFDIR}/ssh* 589 chown "${_user}" ${SYSCONFDIR}/ssh*
580 chown "${_user}".544 ${LOCALSTATEDIR}/empty 590 chown "${_user}".544 ${LOCALSTATEDIR}/empty
591 chown "${_user}".544 ${LOCALSTATEDIR}/log/lastlog
581 if [ -f ${LOCALSTATEDIR}/log/sshd.log ] 592 if [ -f ${LOCALSTATEDIR}/log/sshd.log ]
582 then 593 then
583 chown "${_user}".544 ${LOCALSTATEDIR}/log/sshd.log 594 chown "${_user}".544 ${LOCALSTATEDIR}/log/sshd.log
diff --git a/contrib/findssl.sh b/contrib/findssl.sh
index 716abced5..263fd2644 100644
--- a/contrib/findssl.sh
+++ b/contrib/findssl.sh
@@ -1,6 +1,6 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# $Id: findssl.sh,v 1.3 2004/12/13 07:08:33 dtucker Exp $ 3# $Id: findssl.sh,v 1.4 2007/02/19 11:44:25 dtucker Exp $
4# 4#
5# findssl.sh 5# findssl.sh
6# Search for all instances of OpenSSL headers and libraries 6# Search for all instances of OpenSSL headers and libraries
@@ -89,6 +89,25 @@ LD_LIBRARY_PATH=${LD_LIBRARY_PATH:=$DEFAULT_LIBPATH}
89LIBRARY_PATH=${LIBRARY_PATH:=$DEFAULT_LIBPATH} 89LIBRARY_PATH=${LIBRARY_PATH:=$DEFAULT_LIBPATH}
90export LIBPATH LD_LIBRARY_PATH LIBRARY_PATH 90export LIBPATH LD_LIBRARY_PATH LIBRARY_PATH
91 91
92# not all platforms have a 'which' command
93if which ls >/dev/null 2>/dev/null; then
94 : which is defined
95else
96 which () {
97 saveIFS="$IFS"
98 IFS=:
99 for p in $PATH; do
100 if test -x "$p/$1" -a -f "$p/$1"; then
101 IFS="$saveIFS"
102 echo "$p/$1"
103 return 0
104 fi
105 done
106 IFS="$saveIFS"
107 return 1
108 }
109fi
110
92# 111#
93# Search for OpenSSL headers and print versions 112# Search for OpenSSL headers and print versions
94# 113#
diff --git a/contrib/redhat/openssh.spec b/contrib/redhat/openssh.spec
index cbdf7bbc7..08515d2b0 100644
--- a/contrib/redhat/openssh.spec
+++ b/contrib/redhat/openssh.spec
@@ -1,4 +1,4 @@
1%define ver 4.3p2 1%define ver 4.6p1
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
diff --git a/contrib/redhat/sshd.init b/contrib/redhat/sshd.init
index 4ee8630c3..e5d837cbc 100755
--- a/contrib/redhat/sshd.init
+++ b/contrib/redhat/sshd.init
@@ -35,6 +35,9 @@ do_rsa1_keygen() {
35 if $KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N '' >&/dev/null; then 35 if $KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N '' >&/dev/null; then
36 chmod 600 $RSA1_KEY 36 chmod 600 $RSA1_KEY
37 chmod 644 $RSA1_KEY.pub 37 chmod 644 $RSA1_KEY.pub
38 if [ -x /sbin/restorecon ]; then
39 /sbin/restorecon $RSA1_KEY.pub
40 fi
38 success $"RSA1 key generation" 41 success $"RSA1 key generation"
39 echo 42 echo
40 else 43 else
@@ -51,6 +54,9 @@ do_rsa_keygen() {
51 if $KEYGEN -q -t rsa -f $RSA_KEY -C '' -N '' >&/dev/null; then 54 if $KEYGEN -q -t rsa -f $RSA_KEY -C '' -N '' >&/dev/null; then
52 chmod 600 $RSA_KEY 55 chmod 600 $RSA_KEY
53 chmod 644 $RSA_KEY.pub 56 chmod 644 $RSA_KEY.pub
57 if [ -x /sbin/restorecon ]; then
58 /sbin/restorecon $RSA_KEY.pub
59 fi
54 success $"RSA key generation" 60 success $"RSA key generation"
55 echo 61 echo
56 else 62 else
@@ -67,6 +73,9 @@ do_dsa_keygen() {
67 if $KEYGEN -q -t dsa -f $DSA_KEY -C '' -N '' >&/dev/null; then 73 if $KEYGEN -q -t dsa -f $DSA_KEY -C '' -N '' >&/dev/null; then
68 chmod 600 $DSA_KEY 74 chmod 600 $DSA_KEY
69 chmod 644 $DSA_KEY.pub 75 chmod 644 $DSA_KEY.pub
76 if [ -x /sbin/restorecon ]; then
77 /sbin/restorecon $DSA_KEY.pub
78 fi
70 success $"DSA key generation" 79 success $"DSA key generation"
71 echo 80 echo
72 else 81 else
diff --git a/contrib/suse/openssh.spec b/contrib/suse/openssh.spec
index b49e78c65..95b394f18 100644
--- a/contrib/suse/openssh.spec
+++ b/contrib/suse/openssh.spec
@@ -13,7 +13,7 @@
13 13
14Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation 14Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation
15Name: openssh 15Name: openssh
16Version: 4.3p2 16Version: 4.6p1
17URL: http://www.openssh.com/ 17URL: http://www.openssh.com/
18Release: 1 18Release: 1
19Source0: openssh-%{version}.tar.gz 19Source0: openssh-%{version}.tar.gz
diff --git a/crc32.c b/crc32.c
index ac627b57a..c192eb4d6 100644
--- a/crc32.c
+++ b/crc32.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: crc32.c,v 1.9 2003/02/12 21:39:50 markus Exp $ */ 1/* $OpenBSD: crc32.c,v 1.11 2006/04/22 18:29:33 stevesk Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2003 Markus Friedl. All rights reserved. 4 * Copyright (c) 2003 Markus Friedl. All rights reserved.
@@ -99,7 +99,7 @@ ssh_crc32(const u_char *buf, u_int32_t size)
99 u_int32_t i, crc; 99 u_int32_t i, crc;
100 100
101 crc = 0; 101 crc = 0;
102 for (i = 0; i < size; i++) 102 for (i = 0; i < size; i++)
103 crc = crc32tab[(crc ^ buf[i]) & 0xff] ^ (crc >> 8); 103 crc = crc32tab[(crc ^ buf[i]) & 0xff] ^ (crc >> 8);
104 return crc; 104 return crc;
105} 105}
diff --git a/crc32.h b/crc32.h
index a2fb58493..5d7131aff 100644
--- a/crc32.h
+++ b/crc32.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: crc32.h,v 1.14 2003/02/12 21:39:50 markus Exp $ */ 1/* $OpenBSD: crc32.h,v 1.15 2006/03/25 22:22:43 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2003 Markus Friedl. All rights reserved. 4 * Copyright (c) 2003 Markus Friedl. All rights reserved.
diff --git a/deattack.c b/deattack.c
index 8b55d6686..1b37e4dab 100644
--- a/deattack.c
+++ b/deattack.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: deattack.c,v 1.30 2006/09/16 19:53:37 djm Exp $ */
1/* 2/*
2 * Cryptographic attack detector for ssh - source code 3 * Cryptographic attack detector for ssh - source code
3 * 4 *
@@ -18,14 +19,36 @@
18 */ 19 */
19 20
20#include "includes.h" 21#include "includes.h"
21RCSID("$OpenBSD: deattack.c,v 1.19 2003/09/18 08:49:45 markus Exp $");
22 22
23#include <sys/types.h>
24
25#include <string.h>
26#include <stdio.h>
27#include <stdarg.h>
28
29#include "xmalloc.h"
23#include "deattack.h" 30#include "deattack.h"
24#include "log.h" 31#include "log.h"
25#include "crc32.h" 32#include "crc32.h"
26#include "getput.h" 33#include "misc.h"
27#include "xmalloc.h" 34
28#include "deattack.h" 35/*
36 * CRC attack detection has a worst-case behaviour that is O(N^3) over
37 * the number of identical blocks in a packet. This behaviour can be
38 * exploited to create a limited denial of service attack.
39 *
40 * However, because we are dealing with encrypted data, identical
41 * blocks should only occur every 2^35 maximally-sized packets or so.
42 * Consequently, we can detect this DoS by looking for identical blocks
43 * in a packet.
44 *
45 * The parameter below determines how many identical blocks we will
46 * accept in a single packet, trading off between attack detection and
47 * likelihood of terminating a legitimate connection. A value of 32
48 * corresponds to an average of 2^40 messages before an attack is
49 * misdetected
50 */
51#define MAX_IDENTICAL 32
29 52
30/* SSH Constants */ 53/* SSH Constants */
31#define SSH_MAXBLOCKS (32 * 1024) 54#define SSH_MAXBLOCKS (32 * 1024)
@@ -43,7 +66,7 @@ RCSID("$OpenBSD: deattack.c,v 1.19 2003/09/18 08:49:45 markus Exp $");
43 66
44 67
45/* Hash function (Input keys are cipher results) */ 68/* Hash function (Input keys are cipher results) */
46#define HASH(x) GET_32BIT(x) 69#define HASH(x) get_u32(x)
47 70
48#define CMP(a, b) (memcmp(a, b, SSH_BLOCKSIZE)) 71#define CMP(a, b) (memcmp(a, b, SSH_BLOCKSIZE))
49 72
@@ -51,22 +74,17 @@ static void
51crc_update(u_int32_t *a, u_int32_t b) 74crc_update(u_int32_t *a, u_int32_t b)
52{ 75{
53 b ^= *a; 76 b ^= *a;
54 *a = ssh_crc32((u_char *) &b, sizeof(b)); 77 *a = ssh_crc32((u_char *)&b, sizeof(b));
55} 78}
56 79
57/* detect if a block is used in a particular pattern */ 80/* detect if a block is used in a particular pattern */
58static int 81static int
59check_crc(u_char *S, u_char *buf, u_int32_t len, 82check_crc(u_char *S, u_char *buf, u_int32_t len)
60 u_char *IV)
61{ 83{
62 u_int32_t crc; 84 u_int32_t crc;
63 u_char *c; 85 u_char *c;
64 86
65 crc = 0; 87 crc = 0;
66 if (IV && !CMP(S, IV)) {
67 crc_update(&crc, 1);
68 crc_update(&crc, 0);
69 }
70 for (c = buf; c < buf + len; c += SSH_BLOCKSIZE) { 88 for (c = buf; c < buf + len; c += SSH_BLOCKSIZE) {
71 if (!CMP(S, c)) { 89 if (!CMP(S, c)) {
72 crc_update(&crc, 1); 90 crc_update(&crc, 1);
@@ -82,12 +100,12 @@ check_crc(u_char *S, u_char *buf, u_int32_t len,
82 100
83/* Detect a crc32 compensation attack on a packet */ 101/* Detect a crc32 compensation attack on a packet */
84int 102int
85detect_attack(u_char *buf, u_int32_t len, u_char *IV) 103detect_attack(u_char *buf, u_int32_t len)
86{ 104{
87 static u_int16_t *h = (u_int16_t *) NULL; 105 static u_int16_t *h = (u_int16_t *) NULL;
88 static u_int32_t n = HASH_MINSIZE / HASH_ENTRYSIZE; 106 static u_int32_t n = HASH_MINSIZE / HASH_ENTRYSIZE;
89 u_int32_t i, j; 107 u_int32_t i, j;
90 u_int32_t l; 108 u_int32_t l, same;
91 u_char *c; 109 u_char *c;
92 u_char *d; 110 u_char *d;
93 111
@@ -100,26 +118,20 @@ detect_attack(u_char *buf, u_int32_t len, u_char *IV)
100 118
101 if (h == NULL) { 119 if (h == NULL) {
102 debug("Installing crc compensation attack detector."); 120 debug("Installing crc compensation attack detector.");
103 h = (u_int16_t *) xmalloc(l * HASH_ENTRYSIZE); 121 h = (u_int16_t *) xcalloc(l, HASH_ENTRYSIZE);
104 n = l; 122 n = l;
105 } else { 123 } else {
106 if (l > n) { 124 if (l > n) {
107 h = (u_int16_t *) xrealloc(h, l * HASH_ENTRYSIZE); 125 h = (u_int16_t *)xrealloc(h, l, HASH_ENTRYSIZE);
108 n = l; 126 n = l;
109 } 127 }
110 } 128 }
111 129
112 if (len <= HASH_MINBLOCKS) { 130 if (len <= HASH_MINBLOCKS) {
113 for (c = buf; c < buf + len; c += SSH_BLOCKSIZE) { 131 for (c = buf; c < buf + len; c += SSH_BLOCKSIZE) {
114 if (IV && (!CMP(c, IV))) {
115 if ((check_crc(c, buf, len, IV)))
116 return (DEATTACK_DETECTED);
117 else
118 break;
119 }
120 for (d = buf; d < c; d += SSH_BLOCKSIZE) { 132 for (d = buf; d < c; d += SSH_BLOCKSIZE) {
121 if (!CMP(c, d)) { 133 if (!CMP(c, d)) {
122 if ((check_crc(c, buf, len, IV))) 134 if ((check_crc(c, buf, len)))
123 return (DEATTACK_DETECTED); 135 return (DEATTACK_DETECTED);
124 else 136 else
125 break; 137 break;
@@ -130,21 +142,13 @@ detect_attack(u_char *buf, u_int32_t len, u_char *IV)
130 } 142 }
131 memset(h, HASH_UNUSEDCHAR, n * HASH_ENTRYSIZE); 143 memset(h, HASH_UNUSEDCHAR, n * HASH_ENTRYSIZE);
132 144
133 if (IV) 145 for (c = buf, same = j = 0; c < (buf + len); c += SSH_BLOCKSIZE, j++) {
134 h[HASH(IV) & (n - 1)] = HASH_IV;
135
136 for (c = buf, j = 0; c < (buf + len); c += SSH_BLOCKSIZE, j++) {
137 for (i = HASH(c) & (n - 1); h[i] != HASH_UNUSED; 146 for (i = HASH(c) & (n - 1); h[i] != HASH_UNUSED;
138 i = (i + 1) & (n - 1)) { 147 i = (i + 1) & (n - 1)) {
139 if (h[i] == HASH_IV) { 148 if (!CMP(c, buf + h[i] * SSH_BLOCKSIZE)) {
140 if (!CMP(c, IV)) { 149 if (++same > MAX_IDENTICAL)
141 if (check_crc(c, buf, len, IV)) 150 return (DEATTACK_DOS_DETECTED);
142 return (DEATTACK_DETECTED); 151 if (check_crc(c, buf, len))
143 else
144 break;
145 }
146 } else if (!CMP(c, buf + h[i] * SSH_BLOCKSIZE)) {
147 if (check_crc(c, buf, len, IV))
148 return (DEATTACK_DETECTED); 152 return (DEATTACK_DETECTED);
149 else 153 else
150 break; 154 break;
diff --git a/deattack.h b/deattack.h
index ddccdea50..0316fb285 100644
--- a/deattack.h
+++ b/deattack.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: deattack.h,v 1.7 2001/06/26 17:27:23 markus Exp $ */ 1/* $OpenBSD: deattack.h,v 1.10 2006/09/16 19:53:37 djm Exp $ */
2 2
3/* 3/*
4 * Cryptographic attack detector for ssh - Header file 4 * Cryptographic attack detector for ssh - Header file
@@ -25,6 +25,7 @@
25/* Return codes */ 25/* Return codes */
26#define DEATTACK_OK 0 26#define DEATTACK_OK 0
27#define DEATTACK_DETECTED 1 27#define DEATTACK_DETECTED 1
28#define DEATTACK_DOS_DETECTED 2
28 29
29int detect_attack(u_char *, u_int32_t, u_char[8]); 30int detect_attack(u_char *, u_int32_t);
30#endif 31#endif
diff --git a/defines.h b/defines.h
index f25934176..8a4e2c73e 100644
--- a/defines.h
+++ b/defines.h
@@ -25,12 +25,12 @@
25#ifndef _DEFINES_H 25#ifndef _DEFINES_H
26#define _DEFINES_H 26#define _DEFINES_H
27 27
28/* $Id: defines.h,v 1.130 2005/12/17 11:04:09 dtucker Exp $ */ 28/* $Id: defines.h,v 1.138 2006/09/21 13:13:30 dtucker Exp $ */
29 29
30 30
31/* Constants */ 31/* Constants */
32 32
33#ifndef SHUT_RDWR 33#if defined(HAVE_DECL_SHUT_RD) && HAVE_DECL_SHUT_RD == 0
34enum 34enum
35{ 35{
36 SHUT_RD = 0, /* No more receptions. */ 36 SHUT_RD = 0, /* No more receptions. */
@@ -90,8 +90,8 @@ enum
90#endif 90#endif
91#endif 91#endif
92 92
93#ifndef O_NONBLOCK /* Non Blocking Open */ 93#if defined(HAVE_DECL_O_NONBLOCK) && HAVE_DECL_O_NONBLOCK == 0
94# define O_NONBLOCK 00004 94# define O_NONBLOCK 00004 /* Non Blocking Open */
95#endif 95#endif
96 96
97#ifndef S_ISDIR 97#ifndef S_ISDIR
@@ -143,16 +143,11 @@ including rpc/rpc.h breaks Solaris 6
143#define INADDR_LOOPBACK ((u_long)0x7f000001) 143#define INADDR_LOOPBACK ((u_long)0x7f000001)
144#endif 144#endif
145 145
146#ifndef __unused
147#define __unused
148#endif
149
150/* Types */ 146/* Types */
151 147
152/* If sys/types.h does not supply intXX_t, supply them ourselves */ 148/* If sys/types.h does not supply intXX_t, supply them ourselves */
153/* (or die trying) */ 149/* (or die trying) */
154 150
155
156#ifndef HAVE_U_INT 151#ifndef HAVE_U_INT
157typedef unsigned int u_int; 152typedef unsigned int u_int;
158#endif 153#endif
@@ -496,6 +491,22 @@ struct winsize {
496# define offsetof(type, member) ((size_t) &((type *)0)->member) 491# define offsetof(type, member) ((size_t) &((type *)0)->member)
497#endif 492#endif
498 493
494/* Set up BSD-style BYTE_ORDER definition if it isn't there already */
495/* XXX: doesn't try to cope with strange byte orders (PDP_ENDIAN) */
496#ifndef BYTE_ORDER
497# ifndef LITTLE_ENDIAN
498# define LITTLE_ENDIAN 1234
499# endif /* LITTLE_ENDIAN */
500# ifndef BIG_ENDIAN
501# define BIG_ENDIAN 4321
502# endif /* BIG_ENDIAN */
503# ifdef WORDS_BIGENDIAN
504# define BYTE_ORDER BIG_ENDIAN
505# else /* WORDS_BIGENDIAN */
506# define BYTE_ORDER LITTLE_ENDIAN
507# endif /* WORDS_BIGENDIAN */
508#endif /* BYTE_ORDER */
509
499/* Function replacement / compatibility hacks */ 510/* Function replacement / compatibility hacks */
500 511
501#if !defined(HAVE_GETADDRINFO) && (defined(HAVE_OGETADDRINFO) || defined(HAVE_NGETADDRINFO)) 512#if !defined(HAVE_GETADDRINFO) && (defined(HAVE_OGETADDRINFO) || defined(HAVE_NGETADDRINFO))
@@ -517,19 +528,6 @@ struct winsize {
517# define optarg BSDoptarg 528# define optarg BSDoptarg
518#endif 529#endif
519 530
520/* In older versions of libpam, pam_strerror takes a single argument */
521#ifdef HAVE_OLD_PAM
522# define PAM_STRERROR(a,b) pam_strerror((b))
523#else
524# define PAM_STRERROR(a,b) pam_strerror((a),(b))
525#endif
526
527#ifdef PAM_SUN_CODEBASE
528# define PAM_MSG_MEMBER(msg, n, member) ((*(msg))[(n)].member)
529#else
530# define PAM_MSG_MEMBER(msg, n, member) ((msg)[(n)]->member)
531#endif
532
533#if defined(BROKEN_GETADDRINFO) && defined(HAVE_GETADDRINFO) 531#if defined(BROKEN_GETADDRINFO) && defined(HAVE_GETADDRINFO)
534# undef HAVE_GETADDRINFO 532# undef HAVE_GETADDRINFO
535#endif 533#endif
@@ -544,6 +542,11 @@ struct winsize {
544# undef HAVE_UPDWTMPX 542# undef HAVE_UPDWTMPX
545#endif 543#endif
546 544
545#if defined(HAVE_OPENLOG_R) && defined(SYSLOG_DATA_INIT) && \
546 defined(SYSLOG_R_SAFE_IN_SIGHAND)
547# define DO_LOG_SAFE_IN_SIGHAND
548#endif
549
547#if !defined(HAVE_MEMMOVE) && defined(HAVE_BCOPY) 550#if !defined(HAVE_MEMMOVE) && defined(HAVE_BCOPY)
548# define memmove(s1, s2, n) bcopy((s2), (s1), (n)) 551# define memmove(s1, s2, n) bcopy((s2), (s1), (n))
549#endif /* !defined(HAVE_MEMMOVE) && defined(HAVE_BCOPY) */ 552#endif /* !defined(HAVE_MEMMOVE) && defined(HAVE_BCOPY) */
@@ -553,6 +556,7 @@ struct winsize {
553#endif /* defined(HAVE_VHANGUP) && !defined(HAVE_DEV_PTMX) */ 556#endif /* defined(HAVE_VHANGUP) && !defined(HAVE_DEV_PTMX) */
554 557
555#ifndef GETPGRP_VOID 558#ifndef GETPGRP_VOID
559# include <unistd.h>
556# define getpgrp() getpgrp(0) 560# define getpgrp() getpgrp(0)
557#endif 561#endif
558 562
@@ -715,12 +719,14 @@ struct winsize {
715# undef HAVE_MMAP 719# undef HAVE_MMAP
716#endif 720#endif
717 721
718/* some system headers on HP-UX define YES/NO */ 722#ifndef IOV_MAX
719#ifdef YES 723# if defined(_XOPEN_IOV_MAX)
720# undef YES 724# define IOV_MAX _XOPEN_IOV_MAX
721#endif 725# elif defined(DEF_IOV_MAX)
722#ifdef NO 726# define IOV_MAX DEF_IOV_MAX
723# undef NO 727# else
728# define IOV_MAX 16
729# endif
724#endif 730#endif
725 731
726#endif /* _DEFINES_H */ 732#endif /* _DEFINES_H */
diff --git a/dh.c b/dh.c
index 044d869fb..78e230b9f 100644
--- a/dh.c
+++ b/dh.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: dh.c,v 1.44 2006/11/07 13:02:07 markus Exp $ */
1/* 2/*
2 * Copyright (c) 2000 Niels Provos. All rights reserved. 3 * Copyright (c) 2000 Niels Provos. All rights reserved.
3 * 4 *
@@ -23,17 +24,17 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: dh.c,v 1.31 2004/08/04 10:37:52 djm Exp $");
27 27
28#include "xmalloc.h" 28#include <sys/param.h>
29 29
30#include <openssl/bn.h> 30#include <openssl/bn.h>
31#include <openssl/dh.h> 31#include <openssl/dh.h>
32#include <openssl/evp.h>
33 32
34#include "buffer.h" 33#include <stdarg.h>
35#include "cipher.h" 34#include <stdio.h>
36#include "kex.h" 35#include <stdlib.h>
36#include <string.h>
37
37#include "dh.h" 38#include "dh.h"
38#include "pathnames.h" 39#include "pathnames.h"
39#include "log.h" 40#include "log.h"
@@ -44,9 +45,11 @@ parse_prime(int linenum, char *line, struct dhgroup *dhg)
44{ 45{
45 char *cp, *arg; 46 char *cp, *arg;
46 char *strsize, *gen, *prime; 47 char *strsize, *gen, *prime;
48 const char *errstr = NULL;
47 49
48 cp = line; 50 cp = line;
49 arg = strdelim(&cp); 51 if ((arg = strdelim(&cp)) == NULL)
52 return 0;
50 /* Ignore leading whitespace */ 53 /* Ignore leading whitespace */
51 if (*arg == '\0') 54 if (*arg == '\0')
52 arg = strdelim(&cp); 55 arg = strdelim(&cp);
@@ -67,7 +70,8 @@ parse_prime(int linenum, char *line, struct dhgroup *dhg)
67 goto fail; 70 goto fail;
68 strsize = strsep(&cp, " "); /* size */ 71 strsize = strsep(&cp, " "); /* size */
69 if (cp == NULL || *strsize == '\0' || 72 if (cp == NULL || *strsize == '\0' ||
70 (dhg->size = atoi(strsize)) == 0) 73 (dhg->size = (u_int)strtonum(strsize, 0, 64*1024, &errstr)) == 0 ||
74 errstr)
71 goto fail; 75 goto fail;
72 /* The whole group is one bit larger */ 76 /* The whole group is one bit larger */
73 dhg->size++; 77 dhg->size++;
@@ -178,19 +182,36 @@ dh_pub_is_valid(DH *dh, BIGNUM *dh_pub)
178 int i; 182 int i;
179 int n = BN_num_bits(dh_pub); 183 int n = BN_num_bits(dh_pub);
180 int bits_set = 0; 184 int bits_set = 0;
185 BIGNUM *tmp;
181 186
182 if (dh_pub->neg) { 187 if (dh_pub->neg) {
183 logit("invalid public DH value: negativ"); 188 logit("invalid public DH value: negativ");
184 return 0; 189 return 0;
185 } 190 }
191 if (BN_cmp(dh_pub, BN_value_one()) != 1) { /* pub_exp <= 1 */
192 logit("invalid public DH value: <= 1");
193 return 0;
194 }
195
196 if ((tmp = BN_new()) == NULL)
197 return (-1);
198 if (!BN_sub(tmp, dh->p, BN_value_one()) ||
199 BN_cmp(dh_pub, tmp) != -1) { /* pub_exp > p-2 */
200 BN_clear_free(tmp);
201 logit("invalid public DH value: >= p-1");
202 return 0;
203 }
204 BN_clear_free(tmp);
205
186 for (i = 0; i <= n; i++) 206 for (i = 0; i <= n; i++)
187 if (BN_is_bit_set(dh_pub, i)) 207 if (BN_is_bit_set(dh_pub, i))
188 bits_set++; 208 bits_set++;
189 debug2("bits set: %d/%d", bits_set, BN_num_bits(dh->p)); 209 debug2("bits set: %d/%d", bits_set, BN_num_bits(dh->p));
190 210
191 /* if g==2 and bits_set==1 then computing log_g(dh_pub) is trivial */ 211 /* if g==2 and bits_set==1 then computing log_g(dh_pub) is trivial */
192 if (bits_set > 1 && (BN_cmp(dh_pub, dh->p) == -1)) 212 if (bits_set > 1)
193 return 1; 213 return 1;
214
194 logit("invalid public DH value (%d/%d)", bits_set, BN_num_bits(dh->p)); 215 logit("invalid public DH value (%d/%d)", bits_set, BN_num_bits(dh->p));
195 return 0; 216 return 0;
196} 217}
diff --git a/dh.h b/dh.h
index 723dd08e4..8e580ee87 100644
--- a/dh.h
+++ b/dh.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh.h,v 1.8 2004/06/13 12:53:24 djm Exp $ */ 1/* $OpenBSD: dh.h,v 1.9 2006/03/25 22:22:43 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Niels Provos. All rights reserved. 4 * Copyright (c) 2000 Niels Provos. All rights reserved.
diff --git a/dispatch.c b/dispatch.c
index c5ff65031..d6b63be4b 100644
--- a/dispatch.c
+++ b/dispatch.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: dispatch.c,v 1.21 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 * 4 *
@@ -21,8 +22,13 @@
21 * (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
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 */
25
24#include "includes.h" 26#include "includes.h"
25RCSID("$OpenBSD: dispatch.c,v 1.16 2003/04/08 20:21:28 itojun Exp $"); 27
28#include <sys/types.h>
29
30#include <signal.h>
31#include <stdarg.h>
26 32
27#include "ssh1.h" 33#include "ssh1.h"
28#include "ssh2.h" 34#include "ssh2.h"
@@ -76,7 +82,7 @@ dispatch_set(int type, dispatch_fn *fn)
76 dispatch[type] = fn; 82 dispatch[type] = fn;
77} 83}
78void 84void
79dispatch_run(int mode, int *done, void *ctxt) 85dispatch_run(int mode, volatile sig_atomic_t *done, void *ctxt)
80{ 86{
81 for (;;) { 87 for (;;) {
82 int type; 88 int type;
diff --git a/dispatch.h b/dispatch.h
index a82e2165b..3e3d1a1ad 100644
--- a/dispatch.h
+++ b/dispatch.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: dispatch.h,v 1.9 2002/01/11 13:39:36 markus Exp $ */ 1/* $OpenBSD: dispatch.h,v 1.11 2006/04/20 09:27:09 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -23,6 +23,9 @@
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 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. 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26
27#include <signal.h>
28
26enum { 29enum {
27 DISPATCH_BLOCK, 30 DISPATCH_BLOCK,
28 DISPATCH_NONBLOCK 31 DISPATCH_NONBLOCK
@@ -33,6 +36,6 @@ typedef void dispatch_fn(int, u_int32_t, void *);
33void dispatch_init(dispatch_fn *); 36void dispatch_init(dispatch_fn *);
34void dispatch_set(int, dispatch_fn *); 37void dispatch_set(int, dispatch_fn *);
35void dispatch_range(u_int, u_int, dispatch_fn *); 38void dispatch_range(u_int, u_int, dispatch_fn *);
36void dispatch_run(int, int *, void *); 39void dispatch_run(int, volatile sig_atomic_t *, void *);
37void dispatch_protocol_error(int, u_int32_t, void *); 40void dispatch_protocol_error(int, u_int32_t, void *);
38void dispatch_protocol_ignore(int, u_int32_t, void *); 41void dispatch_protocol_ignore(int, u_int32_t, void *);
diff --git a/dns.c b/dns.c
index a71dd9bff..a89176f88 100644
--- a/dns.c
+++ b/dns.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dns.c,v 1.16 2005/10/17 14:13:35 stevesk Exp $ */ 1/* $OpenBSD: dns.c,v 1.24 2007/01/03 03:01:40 stevesk Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2003 Wesley Griffin. All rights reserved. 4 * Copyright (c) 2003 Wesley Griffin. All rights reserved.
@@ -26,9 +26,14 @@
26 */ 26 */
27 27
28#include "includes.h" 28#include "includes.h"
29RCSID("$OpenBSD: dns.c,v 1.16 2005/10/17 14:13:35 stevesk Exp $"); 29
30#include <sys/types.h>
31#include <sys/socket.h>
30 32
31#include <netdb.h> 33#include <netdb.h>
34#include <stdarg.h>
35#include <stdio.h>
36#include <string.h>
32 37
33#include "xmalloc.h" 38#include "xmalloc.h"
34#include "key.h" 39#include "key.h"
@@ -122,7 +127,7 @@ dns_read_rdata(u_int8_t *algorithm, u_int8_t *digest_type,
122 *digest = (u_char *) xmalloc(*digest_len); 127 *digest = (u_char *) xmalloc(*digest_len);
123 memcpy(*digest, rdata + 2, *digest_len); 128 memcpy(*digest, rdata + 2, *digest_len);
124 } else { 129 } else {
125 *digest = xstrdup(""); 130 *digest = (u_char *)xstrdup("");
126 } 131 }
127 132
128 success = 1; 133 success = 1;
@@ -212,7 +217,7 @@ verify_host_key_dns(const char *hostname, struct sockaddr *address,
212 if (fingerprints->rri_nrdatas) 217 if (fingerprints->rri_nrdatas)
213 *flags |= DNS_VERIFY_FOUND; 218 *flags |= DNS_VERIFY_FOUND;
214 219
215 for (counter = 0; counter < fingerprints->rri_nrdatas; counter++) { 220 for (counter = 0; counter < fingerprints->rri_nrdatas; counter++) {
216 /* 221 /*
217 * Extract the key from the answer. Ignore any badly 222 * Extract the key from the answer. Ignore any badly
218 * formatted fingerprints. 223 * formatted fingerprints.
diff --git a/dns.h b/dns.h
index 0aa1c28f2..b2633a1fe 100644
--- a/dns.h
+++ b/dns.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: dns.h,v 1.6 2005/10/17 14:13:35 stevesk Exp $ */ 1/* $OpenBSD: dns.h,v 1.10 2006/08/03 03:34:42 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2003 Wesley Griffin. All rights reserved. 4 * Copyright (c) 2003 Wesley Griffin. All rights reserved.
@@ -25,8 +25,6 @@
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28#include "includes.h"
29
30#ifndef DNS_H 28#ifndef DNS_H
31#define DNS_H 29#define DNS_H
32 30
diff --git a/entropy.c b/entropy.c
index e5b45b0b6..ccabb1364 100644
--- a/entropy.c
+++ b/entropy.c
@@ -24,6 +24,20 @@
24 24
25#include "includes.h" 25#include "includes.h"
26 26
27#include <sys/types.h>
28#include <sys/wait.h>
29
30#ifdef HAVE_SYS_STAT_H
31# include <sys/stat.h>
32#endif
33
34#ifdef HAVE_FCNTL_H
35# include <fcntl.h>
36#endif
37#include <stdarg.h>
38#include <unistd.h>
39#include <signal.h>
40
27#include <openssl/rand.h> 41#include <openssl/rand.h>
28#include <openssl/crypto.h> 42#include <openssl/crypto.h>
29#include <openssl/err.h> 43#include <openssl/err.h>
@@ -35,7 +49,6 @@
35#include "pathnames.h" 49#include "pathnames.h"
36#include "log.h" 50#include "log.h"
37#include "buffer.h" 51#include "buffer.h"
38#include "bufaux.h"
39 52
40/* 53/*
41 * Portable OpenSSH PRNG seeding: 54 * Portable OpenSSH PRNG seeding:
@@ -48,8 +61,6 @@
48 * XXX: we should tell the child how many bytes we need. 61 * XXX: we should tell the child how many bytes we need.
49 */ 62 */
50 63
51RCSID("$Id: entropy.c,v 1.52 2005/09/27 22:26:30 dtucker Exp $");
52
53#ifndef OPENSSL_PRNG_ONLY 64#ifndef OPENSSL_PRNG_ONLY
54#define RANDOM_SEED_SIZE 48 65#define RANDOM_SEED_SIZE 48
55static uid_t original_uid, original_euid; 66static uid_t original_uid, original_euid;
diff --git a/fatal.c b/fatal.c
index ae1aaac6e..5e5aa3fe1 100644
--- a/fatal.c
+++ b/fatal.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: fatal.c,v 1.7 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2002 Markus Friedl. All rights reserved. 3 * Copyright (c) 2002 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,7 +24,10 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: fatal.c,v 1.2 2003/09/23 20:17:11 markus Exp $"); 27
28#include <sys/types.h>
29
30#include <stdarg.h>
27 31
28#include "log.h" 32#include "log.h"
29 33
@@ -33,6 +37,7 @@ void
33fatal(const char *fmt,...) 37fatal(const char *fmt,...)
34{ 38{
35 va_list args; 39 va_list args;
40
36 va_start(args, fmt); 41 va_start(args, fmt);
37 do_log(SYSLOG_LEVEL_FATAL, fmt, args); 42 do_log(SYSLOG_LEVEL_FATAL, fmt, args);
38 va_end(args); 43 va_end(args);
diff --git a/groupaccess.c b/groupaccess.c
index f50879f83..e73f62b22 100644
--- a/groupaccess.c
+++ b/groupaccess.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: groupaccess.c,v 1.12 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2001 Kevin Steves. All rights reserved. 3 * Copyright (c) 2001 Kevin Steves. All rights reserved.
3 * 4 *
@@ -23,10 +24,16 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: groupaccess.c,v 1.6 2003/04/08 20:21:28 itojun Exp $");
27 27
28#include "groupaccess.h" 28#include <sys/types.h>
29#include <sys/param.h>
30
31#include <grp.h>
32#include <unistd.h>
33#include <stdarg.h>
34
29#include "xmalloc.h" 35#include "xmalloc.h"
36#include "groupaccess.h"
30#include "match.h" 37#include "match.h"
31#include "log.h" 38#include "log.h"
32 39
@@ -52,8 +59,8 @@ ga_init(const char *user, gid_t base)
52 ngroups = MAX(NGROUPS_MAX, sysconf(_SC_NGROUPS_MAX)); 59 ngroups = MAX(NGROUPS_MAX, sysconf(_SC_NGROUPS_MAX));
53#endif 60#endif
54 61
55 groups_bygid = xmalloc(ngroups * sizeof(*groups_bygid)); 62 groups_bygid = xcalloc(ngroups, sizeof(*groups_bygid));
56 groups_byname = xmalloc(ngroups * sizeof(*groups_byname)); 63 groups_byname = xcalloc(ngroups, sizeof(*groups_byname));
57 64
58 if (getgrouplist(user, base, groups_bygid, &ngroups) == -1) 65 if (getgrouplist(user, base, groups_bygid, &ngroups) == -1)
59 logit("getgrouplist: groups list too small"); 66 logit("getgrouplist: groups list too small");
diff --git a/groupaccess.h b/groupaccess.h
index ede4805c2..04b449894 100644
--- a/groupaccess.h
+++ b/groupaccess.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: groupaccess.h,v 1.4 2001/06/26 17:27:23 markus Exp $ */ 1/* $OpenBSD: groupaccess.h,v 1.7 2006/08/03 03:34:42 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001 Kevin Steves. All rights reserved. 4 * Copyright (c) 2001 Kevin Steves. All rights reserved.
@@ -27,8 +27,6 @@
27#ifndef GROUPACCESS_H 27#ifndef GROUPACCESS_H
28#define GROUPACCESS_H 28#define GROUPACCESS_H
29 29
30#include <grp.h>
31
32int ga_init(const char *, gid_t); 30int ga_init(const char *, gid_t);
33int ga_match(char * const *, int); 31int ga_match(char * const *, int);
34void ga_free(void); 32void ga_free(void);
diff --git a/gss-genr.c b/gss-genr.c
index dfaa708ea..42f942b58 100644
--- a/gss-genr.c
+++ b/gss-genr.c
@@ -1,7 +1,7 @@
1/* $OpenBSD: gss-genr.c,v 1.6 2005/10/13 22:24:31 stevesk Exp $ */ 1/* $OpenBSD: gss-genr.c,v 1.17 2006/08/29 12:02:30 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001-2005 Simon Wilkinson. All rights reserved. 4 * Copyright (c) 2001-2006 Simon Wilkinson. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
@@ -28,10 +28,20 @@
28 28
29#ifdef GSSAPI 29#ifdef GSSAPI
30 30
31#include <sys/types.h>
32#include <sys/param.h>
33
34#include <stdarg.h>
35#include <string.h>
36#include <unistd.h>
37
31#include "xmalloc.h" 38#include "xmalloc.h"
32#include "bufaux.h" 39#include "buffer.h"
33#include "log.h" 40#include "log.h"
34#include "ssh2.h" 41#include "ssh2.h"
42#include "cipher.h"
43#include "key.h"
44#include "kex.h"
35#include <openssl/evp.h> 45#include <openssl/evp.h>
36 46
37#include "ssh-gss.h" 47#include "ssh-gss.h"
@@ -65,7 +75,6 @@ ssh_gssapi_oid_table_ok() {
65 * a key exchange with a bad mechanism 75 * a key exchange with a bad mechanism
66 */ 76 */
67 77
68
69char * 78char *
70ssh_gssapi_client_mechanisms(const char *host) { 79ssh_gssapi_client_mechanisms(const char *host) {
71 gss_OID_set gss_supported; 80 gss_OID_set gss_supported;
@@ -74,35 +83,36 @@ ssh_gssapi_client_mechanisms(const char *host) {
74 gss_indicate_mechs(&min_status, &gss_supported); 83 gss_indicate_mechs(&min_status, &gss_supported);
75 84
76 return(ssh_gssapi_kex_mechs(gss_supported, ssh_gssapi_check_mechanism, 85 return(ssh_gssapi_kex_mechs(gss_supported, ssh_gssapi_check_mechanism,
77 (void *)host)); 86 host));
78} 87}
79 88
80char * 89char *
81ssh_gssapi_kex_mechs(gss_OID_set gss_supported, ssh_gssapi_check_fn *check, 90ssh_gssapi_kex_mechs(gss_OID_set gss_supported, ssh_gssapi_check_fn *check,
82 void *data) { 91 const char *data) {
83 Buffer buf; 92 Buffer buf;
84 int i, oidpos, enclen; 93 size_t i;
94 int oidpos, enclen;
85 char *mechs, *encoded; 95 char *mechs, *encoded;
86 char digest[EVP_MAX_MD_SIZE]; 96 u_char digest[EVP_MAX_MD_SIZE];
87 char deroid[2]; 97 char deroid[2];
88 const EVP_MD *evp_md = EVP_md5(); 98 const EVP_MD *evp_md = EVP_md5();
89 EVP_MD_CTX md; 99 EVP_MD_CTX md;
90 100
91 if (gss_enc2oid != NULL) { 101 if (gss_enc2oid != NULL) {
92 for (i=0;gss_enc2oid[i].encoded!=NULL;i++) 102 for (i = 0; gss_enc2oid[i].encoded != NULL; i++)
93 xfree(gss_enc2oid[i].encoded); 103 xfree(gss_enc2oid[i].encoded);
94 xfree(gss_enc2oid); 104 xfree(gss_enc2oid);
95 } 105 }
96 106
97 gss_enc2oid = xmalloc(sizeof(ssh_gss_kex_mapping)* 107 gss_enc2oid = xmalloc(sizeof(ssh_gss_kex_mapping) *
98 (gss_supported->count+1)); 108 (gss_supported->count + 1));
99 109
100 buffer_init(&buf); 110 buffer_init(&buf);
101 111
102 oidpos = 0; 112 oidpos = 0;
103 for (i = 0;i < gss_supported->count;i++) { 113 for (i = 0; i < gss_supported->count; i++) {
104 if (gss_supported->elements[i].length < 128 && 114 if (gss_supported->elements[i].length < 128 &&
105 (*check)(&(gss_supported->elements[i]), data)) { 115 (*check)(NULL, &(gss_supported->elements[i]), data)) {
106 116
107 deroid[0] = SSH_GSS_OIDTYPE; 117 deroid[0] = SSH_GSS_OIDTYPE;
108 deroid[1] = gss_supported->elements[i].length; 118 deroid[1] = gss_supported->elements[i].length;
@@ -114,19 +124,23 @@ ssh_gssapi_kex_mechs(gss_OID_set gss_supported, ssh_gssapi_check_fn *check,
114 gss_supported->elements[i].length); 124 gss_supported->elements[i].length);
115 EVP_DigestFinal(&md, digest, NULL); 125 EVP_DigestFinal(&md, digest, NULL);
116 126
117 encoded = xmalloc(EVP_MD_size(evp_md)*2); 127 encoded = xmalloc(EVP_MD_size(evp_md) * 2);
118 enclen = __b64_ntop(digest, EVP_MD_size(evp_md), 128 enclen = __b64_ntop(digest, EVP_MD_size(evp_md),
119 encoded, EVP_MD_size(evp_md)*2); 129 encoded, EVP_MD_size(evp_md) * 2);
120 130
121 if (oidpos != 0) 131 if (oidpos != 0)
122 buffer_put_char(&buf, ','); 132 buffer_put_char(&buf, ',');
123 133
124 buffer_append(&buf, KEX_GSS_GEX_SHA1_ID, 134 buffer_append(&buf, KEX_GSS_GEX_SHA1_ID,
125 sizeof(KEX_GSS_GEX_SHA1_ID)-1); 135 sizeof(KEX_GSS_GEX_SHA1_ID) - 1);
126 buffer_append(&buf, encoded, enclen); 136 buffer_append(&buf, encoded, enclen);
127 buffer_put_char(&buf,','); 137 buffer_put_char(&buf, ',');
128 buffer_append(&buf, KEX_GSS_GRP1_SHA1_ID, 138 buffer_append(&buf, KEX_GSS_GRP1_SHA1_ID,
129 sizeof(KEX_GSS_GRP1_SHA1_ID)-1); 139 sizeof(KEX_GSS_GRP1_SHA1_ID) - 1);
140 buffer_append(&buf, encoded, enclen);
141 buffer_put_char(&buf, ',');
142 buffer_append(&buf, KEX_GSS_GRP14_SHA1_ID,
143 sizeof(KEX_GSS_GRP14_SHA1_ID) - 1);
130 buffer_append(&buf, encoded, enclen); 144 buffer_append(&buf, encoded, enclen);
131 145
132 gss_enc2oid[oidpos].oid = &(gss_supported->elements[i]); 146 gss_enc2oid[oidpos].oid = &(gss_supported->elements[i]);
@@ -152,25 +166,26 @@ ssh_gssapi_kex_mechs(gss_OID_set gss_supported, ssh_gssapi_check_fn *check,
152} 166}
153 167
154gss_OID 168gss_OID
155ssh_gssapi_id_kex(Gssctxt *ctx, char *name, int *gex) { 169ssh_gssapi_id_kex(Gssctxt *ctx, char *name, int kex_type) {
156 int i = 0; 170 int i = 0;
157 171
158 if (strncmp(name, KEX_GSS_GRP1_SHA1_ID, 172 switch (kex_type) {
159 sizeof(KEX_GSS_GRP1_SHA1_ID)-1) == 0) { 173 case KEX_GSS_GRP1_SHA1:
160 name+=sizeof(KEX_GSS_GRP1_SHA1_ID)-1; 174 name += sizeof(KEX_GSS_GRP1_SHA1_ID) - 1;
161 *gex = 0; 175 break;
162 } else if (strncmp(name, KEX_GSS_GEX_SHA1_ID, 176 case KEX_GSS_GRP14_SHA1:
163 sizeof(KEX_GSS_GEX_SHA1_ID)-1) == 0) { 177 name += sizeof(KEX_GSS_GRP14_SHA1_ID) - 1;
164 name+=sizeof(KEX_GSS_GEX_SHA1_ID)-1; 178 break;
165 *gex = 1; 179 case KEX_GSS_GEX_SHA1:
166 } else { 180 name += sizeof(KEX_GSS_GEX_SHA1_ID) - 1;
167 return NULL; 181 break;
182 default:
183 return GSS_C_NO_OID;
168 } 184 }
169 185
170 while (gss_enc2oid[i].encoded != NULL && 186 while (gss_enc2oid[i].encoded != NULL &&
171 strcmp(name, gss_enc2oid[i].encoded) != 0) { 187 strcmp(name, gss_enc2oid[i].encoded) != 0)
172 i++; 188 i++;
173 }
174 189
175 if (gss_enc2oid[i].oid != NULL && ctx != NULL) 190 if (gss_enc2oid[i].oid != NULL && ctx != NULL)
176 ssh_gssapi_set_oid(ctx, gss_enc2oid[i].oid); 191 ssh_gssapi_set_oid(ctx, gss_enc2oid[i].oid);
@@ -212,7 +227,11 @@ ssh_gssapi_set_oid(Gssctxt *ctx, gss_OID oid)
212void 227void
213ssh_gssapi_error(Gssctxt *ctxt) 228ssh_gssapi_error(Gssctxt *ctxt)
214{ 229{
215 debug("%s", ssh_gssapi_last_error(ctxt, NULL, NULL)); 230 char *s;
231
232 s = ssh_gssapi_last_error(ctxt, NULL, NULL);
233 debug("%s", s);
234 xfree(s);
216} 235}
217 236
218char * 237char *
@@ -236,7 +255,7 @@ ssh_gssapi_last_error(Gssctxt *ctxt, OM_uint32 *major_status,
236 /* The GSSAPI error */ 255 /* The GSSAPI error */
237 do { 256 do {
238 gss_display_status(&lmin, ctxt->major, 257 gss_display_status(&lmin, ctxt->major,
239 GSS_C_GSS_CODE, GSS_C_NULL_OID, &ctx, &msg); 258 GSS_C_GSS_CODE, ctxt->oid, &ctx, &msg);
240 259
241 buffer_append(&b, msg.value, msg.length); 260 buffer_append(&b, msg.value, msg.length);
242 buffer_put_char(&b, '\n'); 261 buffer_put_char(&b, '\n');
@@ -247,7 +266,7 @@ ssh_gssapi_last_error(Gssctxt *ctxt, OM_uint32 *major_status,
247 /* The mechanism specific error */ 266 /* The mechanism specific error */
248 do { 267 do {
249 gss_display_status(&lmin, ctxt->minor, 268 gss_display_status(&lmin, ctxt->minor,
250 GSS_C_MECH_CODE, GSS_C_NULL_OID, &ctx, &msg); 269 GSS_C_MECH_CODE, ctxt->oid, &ctx, &msg);
251 270
252 buffer_append(&b, msg.value, msg.length); 271 buffer_append(&b, msg.value, msg.length);
253 buffer_put_char(&b, '\n'); 272 buffer_put_char(&b, '\n');
@@ -271,9 +290,7 @@ ssh_gssapi_last_error(Gssctxt *ctxt, OM_uint32 *major_status,
271void 290void
272ssh_gssapi_build_ctx(Gssctxt **ctx) 291ssh_gssapi_build_ctx(Gssctxt **ctx)
273{ 292{
274 *ctx = xmalloc(sizeof (Gssctxt)); 293 *ctx = xcalloc(1, sizeof (Gssctxt));
275 (*ctx)->major = 0;
276 (*ctx)->minor = 0;
277 (*ctx)->context = GSS_C_NO_CONTEXT; 294 (*ctx)->context = GSS_C_NO_CONTEXT;
278 (*ctx)->name = GSS_C_NO_NAME; 295 (*ctx)->name = GSS_C_NO_NAME;
279 (*ctx)->oid = GSS_C_NO_OID; 296 (*ctx)->oid = GSS_C_NO_OID;
@@ -343,10 +360,11 @@ OM_uint32
343ssh_gssapi_import_name(Gssctxt *ctx, const char *host) 360ssh_gssapi_import_name(Gssctxt *ctx, const char *host)
344{ 361{
345 gss_buffer_desc gssbuf; 362 gss_buffer_desc gssbuf;
363 char *val;
346 364
347 gssbuf.length = sizeof("host@") + strlen(host); 365 xasprintf(&val, "host@%s", host);
348 gssbuf.value = xmalloc(gssbuf.length); 366 gssbuf.value = val;
349 snprintf(gssbuf.value, gssbuf.length, "host@%s", host); 367 gssbuf.length = strlen(gssbuf.value);
350 368
351 if ((ctx->major = gss_import_name(&ctx->minor, 369 if ((ctx->major = gss_import_name(&ctx->minor,
352 &gssbuf, GSS_C_NT_HOSTBASED_SERVICE, &ctx->name))) 370 &gssbuf, GSS_C_NT_HOSTBASED_SERVICE, &ctx->name)))
@@ -356,35 +374,6 @@ ssh_gssapi_import_name(Gssctxt *ctx, const char *host)
356 return (ctx->major); 374 return (ctx->major);
357} 375}
358 376
359/* Acquire credentials for a server running on the current host.
360 * Requires that the context structure contains a valid OID
361 */
362
363/* Returns a GSSAPI error code */
364OM_uint32
365ssh_gssapi_acquire_cred(Gssctxt *ctx)
366{
367 OM_uint32 status;
368 char lname[MAXHOSTNAMELEN];
369 gss_OID_set oidset;
370
371 gss_create_empty_oid_set(&status, &oidset);
372 gss_add_oid_set_member(&status, ctx->oid, &oidset);
373
374 if (gethostname(lname, MAXHOSTNAMELEN))
375 return (-1);
376
377 if (GSS_ERROR(ssh_gssapi_import_name(ctx, lname)))
378 return (ctx->major);
379
380 if ((ctx->major = gss_acquire_cred(&ctx->minor,
381 ctx->name, 0, oidset, GSS_C_ACCEPT, &ctx->creds, NULL, NULL)))
382 ssh_gssapi_error(ctx);
383
384 gss_release_oid_set(&status, &oidset);
385 return (ctx->major);
386}
387
388OM_uint32 377OM_uint32
389ssh_gssapi_sign(Gssctxt *ctx, gss_buffer_t buffer, gss_buffer_t hash) 378ssh_gssapi_sign(Gssctxt *ctx, gss_buffer_t buffer, gss_buffer_t hash)
390{ 379{
@@ -423,28 +412,37 @@ ssh_gssapi_buildmic(Buffer *b, const char *user, const char *service,
423 buffer_put_cstring(b, context); 412 buffer_put_cstring(b, context);
424} 413}
425 414
426OM_uint32 415int
427ssh_gssapi_server_ctx(Gssctxt **ctx, gss_OID oid) 416ssh_gssapi_check_mechanism(Gssctxt **ctx, gss_OID oid, const char *host)
428{ 417{
429 if (*ctx) 418 gss_buffer_desc token = GSS_C_EMPTY_BUFFER;
430 ssh_gssapi_delete_ctx(ctx); 419 OM_uint32 major, minor;
420 gss_OID_desc spnego_oid = {6, (void *)"\x2B\x06\x01\x05\x05\x02"};
421 Gssctxt *intctx = NULL;
422
423 if (ctx == NULL)
424 ctx = &intctx;
425
426 /* RFC 4462 says we MUST NOT do SPNEGO */
427 if (oid->length == spnego_oid.length &&
428 (memcmp(oid->elements, spnego_oid.elements, oid->length) == 0))
429 return 0; /* false */
430
431 ssh_gssapi_build_ctx(ctx); 431 ssh_gssapi_build_ctx(ctx);
432 ssh_gssapi_set_oid(*ctx, oid); 432 ssh_gssapi_set_oid(*ctx, oid);
433 return (ssh_gssapi_acquire_cred(*ctx)); 433 major = ssh_gssapi_import_name(*ctx, host);
434} 434 if (!GSS_ERROR(major)) {
435 major = ssh_gssapi_init_ctx(*ctx, 0, GSS_C_NO_BUFFER, &token,
436 NULL);
437 gss_release_buffer(&minor, &token);
438 if ((*ctx)->context != GSS_C_NO_CONTEXT)
439 gss_delete_sec_context(&minor, &(*ctx)->context,
440 GSS_C_NO_BUFFER);
441 }
442
443 if (GSS_ERROR(major) || intctx != NULL)
444 ssh_gssapi_delete_ctx(ctx);
435 445
436int
437ssh_gssapi_check_mechanism(gss_OID oid, void *host) {
438 Gssctxt * ctx = NULL;
439 gss_buffer_desc token = GSS_C_EMPTY_BUFFER;
440 OM_uint32 major, minor;
441
442 ssh_gssapi_build_ctx(&ctx);
443 ssh_gssapi_set_oid(ctx, oid);
444 ssh_gssapi_import_name(ctx, host);
445 major = ssh_gssapi_init_ctx(ctx, 0, GSS_C_NO_BUFFER, &token, NULL);
446 gss_release_buffer(&minor, &token);
447 ssh_gssapi_delete_ctx(&ctx);
448 return (!GSS_ERROR(major)); 446 return (!GSS_ERROR(major));
449} 447}
450 448
diff --git a/gss-serv-krb5.c b/gss-serv-krb5.c
index 5c5837ffb..b400081f6 100644
--- a/gss-serv-krb5.c
+++ b/gss-serv-krb5.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: gss-serv-krb5.c,v 1.4 2005/10/13 19:08:08 stevesk Exp $ */ 1/* $OpenBSD: gss-serv-krb5.c,v 1.7 2006/08/03 03:34:42 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. 4 * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved.
@@ -29,11 +29,19 @@
29#ifdef GSSAPI 29#ifdef GSSAPI
30#ifdef KRB5 30#ifdef KRB5
31 31
32#include "auth.h" 32#include <sys/types.h>
33
34#include <stdarg.h>
35#include <string.h>
36
33#include "xmalloc.h" 37#include "xmalloc.h"
38#include "key.h"
39#include "hostfile.h"
40#include "auth.h"
34#include "log.h" 41#include "log.h"
35#include "servconf.h" 42#include "servconf.h"
36 43
44#include "buffer.h"
37#include "ssh-gss.h" 45#include "ssh-gss.h"
38 46
39extern ServerOptions options; 47extern ServerOptions options;
@@ -41,9 +49,9 @@ extern ServerOptions options;
41#ifdef HEIMDAL 49#ifdef HEIMDAL
42# include <krb5.h> 50# include <krb5.h>
43#else 51#else
44# ifdef HAVE_GSSAPI_KRB5 52# ifdef HAVE_GSSAPI_KRB5_H
45# include <gssapi_krb5.h> 53# include <gssapi_krb5.h>
46# elif HAVE_GSSAPI_GSSAPI_KRB5 54# elif HAVE_GSSAPI_GSSAPI_KRB5_H
47# include <gssapi/gssapi_krb5.h> 55# include <gssapi/gssapi_krb5.h>
48# endif 56# endif
49#endif 57#endif
@@ -112,6 +120,7 @@ ssh_gssapi_krb5_storecreds(ssh_gssapi_client *client)
112 krb5_principal princ; 120 krb5_principal princ;
113 OM_uint32 maj_status, min_status; 121 OM_uint32 maj_status, min_status;
114 int len; 122 int len;
123 const char *new_ccname;
115 124
116 if (client->creds == NULL) { 125 if (client->creds == NULL) {
117 debug("No credentials stored"); 126 debug("No credentials stored");
@@ -160,11 +169,16 @@ ssh_gssapi_krb5_storecreds(ssh_gssapi_client *client)
160 return; 169 return;
161 } 170 }
162 171
163 client->store.filename = xstrdup(krb5_cc_get_name(krb_context, ccache)); 172 new_ccname = krb5_cc_get_name(krb_context, ccache);
173
164 client->store.envvar = "KRB5CCNAME"; 174 client->store.envvar = "KRB5CCNAME";
165 len = strlen(client->store.filename) + 6; 175#ifdef USE_CCAPI
166 client->store.envval = xmalloc(len); 176 xasprintf(&client->store.envval, "API:%s", new_ccname);
167 snprintf(client->store.envval, len, "FILE:%s", client->store.filename); 177 client->store.filename = NULL;
178#else
179 xasprintf(&client->store.envval, "FILE:%s", new_ccname);
180 client->store.filename = xstrdup(new_ccname);
181#endif
168 182
169#ifdef USE_PAM 183#ifdef USE_PAM
170 if (options.use_pam) 184 if (options.use_pam)
diff --git a/gss-serv.c b/gss-serv.c
index 190f56fc0..841d8bb2f 100644
--- a/gss-serv.c
+++ b/gss-serv.c
@@ -1,7 +1,7 @@
1/* $OpenBSD: gss-serv.c,v 1.13 2005/10/13 22:24:31 stevesk Exp $ */ 1/* $OpenBSD: gss-serv.c,v 1.20 2006/08/03 03:34:42 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. 4 * Copyright (c) 2001-2006 Simon Wilkinson. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
@@ -28,17 +28,27 @@
28 28
29#ifdef GSSAPI 29#ifdef GSSAPI
30 30
31#include "bufaux.h" 31#include <sys/types.h>
32
33#include <stdarg.h>
34#include <string.h>
35#include <unistd.h>
36
37#include "xmalloc.h"
38#include "buffer.h"
39#include "key.h"
40#include "hostfile.h"
32#include "auth.h" 41#include "auth.h"
33#include "log.h" 42#include "log.h"
34#include "channels.h" 43#include "channels.h"
35#include "session.h" 44#include "session.h"
45#include "misc.h"
36#include "servconf.h" 46#include "servconf.h"
37#include "xmalloc.h"
38#include "getput.h"
39#include "monitor_wrap.h"
40 47
41#include "ssh-gss.h" 48#include "ssh-gss.h"
49#include "monitor_wrap.h"
50
51extern ServerOptions options;
42 52
43static ssh_gssapi_client gssapi_client = 53static ssh_gssapi_client gssapi_client =
44 { GSS_C_EMPTY_BUFFER, GSS_C_EMPTY_BUFFER, 54 { GSS_C_EMPTY_BUFFER, GSS_C_EMPTY_BUFFER,
@@ -70,8 +80,8 @@ ssh_gssapi_server_mechanisms() {
70 80
71/* Unprivileged */ 81/* Unprivileged */
72int 82int
73ssh_gssapi_server_check_mech(gss_OID oid, void *data) { 83ssh_gssapi_server_check_mech(Gssctxt **dum, gss_OID oid, const char *data) {
74 Gssctxt * ctx = NULL; 84 Gssctxt *ctx = NULL;
75 int res; 85 int res;
76 86
77 res = !GSS_ERROR(PRIVSEP(ssh_gssapi_server_ctx(&ctx, oid))); 87 res = !GSS_ERROR(PRIVSEP(ssh_gssapi_server_ctx(&ctx, oid)));
@@ -101,6 +111,58 @@ ssh_gssapi_supported_oids(gss_OID_set *oidset)
101 &supported_mechs[i]->oid, oidset); 111 &supported_mechs[i]->oid, oidset);
102 i++; 112 i++;
103 } 113 }
114
115 gss_release_oid_set(&min_status, &supported);
116}
117
118OM_uint32
119ssh_gssapi_server_ctx(Gssctxt **ctx, gss_OID oid)
120{
121 if (*ctx)
122 ssh_gssapi_delete_ctx(ctx);
123 ssh_gssapi_build_ctx(ctx);
124 ssh_gssapi_set_oid(*ctx, oid);
125 return (ssh_gssapi_acquire_cred(*ctx));
126}
127
128/* Acquire credentials for a server running on the current host.
129 * Requires that the context structure contains a valid OID
130 */
131
132/* Returns a GSSAPI error code */
133OM_uint32
134ssh_gssapi_acquire_cred(Gssctxt *ctx)
135{
136 OM_uint32 status;
137 char lname[MAXHOSTNAMELEN];
138 gss_OID_set oidset;
139
140 if (options.gss_strict_acceptor) {
141 gss_create_empty_oid_set(&status, &oidset);
142 gss_add_oid_set_member(&status, ctx->oid, &oidset);
143
144 if (gethostname(lname, MAXHOSTNAMELEN)) {
145 gss_release_oid_set(&status, &oidset);
146 return (-1);
147 }
148
149 if (GSS_ERROR(ssh_gssapi_import_name(ctx, lname))) {
150 gss_release_oid_set(&status, &oidset);
151 return (ctx->major);
152 }
153
154 if ((ctx->major = gss_acquire_cred(&ctx->minor,
155 ctx->name, 0, oidset, GSS_C_ACCEPT, &ctx->creds,
156 NULL, NULL)))
157 ssh_gssapi_error(ctx);
158
159 gss_release_oid_set(&status, &oidset);
160 return (ctx->major);
161 } else {
162 ctx->name = GSS_C_NO_NAME;
163 ctx->creds = GSS_C_NO_CREDENTIAL;
164 }
165 return GSS_S_COMPLETE;
104} 166}
105 167
106 168
@@ -174,7 +236,7 @@ ssh_gssapi_parse_ename(Gssctxt *ctx, gss_buffer_t ename, gss_buffer_t name)
174 * second without. 236 * second without.
175 */ 237 */
176 238
177 oidl = GET_16BIT(tok+2); /* length including next two bytes */ 239 oidl = get_u16(tok+2); /* length including next two bytes */
178 oidl = oidl-2; /* turn it into the _real_ length of the variable OID */ 240 oidl = oidl-2; /* turn it into the _real_ length of the variable OID */
179 241
180 /* 242 /*
@@ -191,14 +253,14 @@ ssh_gssapi_parse_ename(Gssctxt *ctx, gss_buffer_t ename, gss_buffer_t name)
191 if (ename->length < offset+4) 253 if (ename->length < offset+4)
192 return GSS_S_FAILURE; 254 return GSS_S_FAILURE;
193 255
194 name->length = GET_32BIT(tok+offset); 256 name->length = get_u32(tok+offset);
195 offset += 4; 257 offset += 4;
196 258
197 if (ename->length < offset+name->length) 259 if (ename->length < offset+name->length)
198 return GSS_S_FAILURE; 260 return GSS_S_FAILURE;
199 261
200 name->value = xmalloc(name->length+1); 262 name->value = xmalloc(name->length+1);
201 memcpy(name->value, tok+offset,name->length); 263 memcpy(name->value, tok+offset, name->length);
202 ((char *)name->value)[name->length] = 0; 264 ((char *)name->value)[name->length] = 0;
203 265
204 return GSS_S_COMPLETE; 266 return GSS_S_COMPLETE;
@@ -257,7 +319,8 @@ ssh_gssapi_cleanup_creds(void)
257{ 319{
258 if (gssapi_client.store.filename != NULL) { 320 if (gssapi_client.store.filename != NULL) {
259 /* Unlink probably isn't sufficient */ 321 /* Unlink probably isn't sufficient */
260 debug("removing gssapi cred file\"%s\"", gssapi_client.store.filename); 322 debug("removing gssapi cred file\"%s\"",
323 gssapi_client.store.filename);
261 unlink(gssapi_client.store.filename); 324 unlink(gssapi_client.store.filename);
262 } 325 }
263} 326}
diff --git a/hostfile.c b/hostfile.c
index 3ed646247..2cceb352a 100644
--- a/hostfile.c
+++ b/hostfile.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: hostfile.c,v 1.45 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -36,18 +37,25 @@
36 */ 37 */
37 38
38#include "includes.h" 39#include "includes.h"
39RCSID("$OpenBSD: hostfile.c,v 1.36 2005/11/22 03:36:03 dtucker Exp $");
40 40
41#include <resolv.h> 41#include <sys/types.h>
42
43#include <netinet/in.h>
44
42#include <openssl/hmac.h> 45#include <openssl/hmac.h>
43#include <openssl/sha.h> 46#include <openssl/sha.h>
44 47
45#include "packet.h" 48#include <resolv.h>
49#include <stdarg.h>
50#include <stdio.h>
51#include <stdlib.h>
52#include <string.h>
53
54#include "xmalloc.h"
46#include "match.h" 55#include "match.h"
47#include "key.h" 56#include "key.h"
48#include "hostfile.h" 57#include "hostfile.h"
49#include "log.h" 58#include "log.h"
50#include "xmalloc.h"
51 59
52static int 60static int
53extract_salt(const char *s, u_int l, char *salt, size_t salt_len) 61extract_salt(const char *s, u_int l, char *salt, size_t salt_len)
@@ -254,8 +262,10 @@ check_host_in_hostfile_by_key_or_type(const char *filename,
254 262
255 if (key == NULL) { 263 if (key == NULL) {
256 /* we found a key of the requested type */ 264 /* we found a key of the requested type */
257 if (found->type == keytype) 265 if (found->type == keytype) {
266 fclose(f);
258 return HOST_FOUND; 267 return HOST_FOUND;
268 }
259 continue; 269 continue;
260 } 270 }
261 271
diff --git a/hostfile.h b/hostfile.h
index d6330752e..d1983b3e0 100644
--- a/hostfile.h
+++ b/hostfile.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: hostfile.h,v 1.15 2005/03/01 10:40:26 djm Exp $ */ 1/* $OpenBSD: hostfile.h,v 1.16 2006/03/25 22:22:43 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
diff --git a/includes.h b/includes.h
index 520817400..967fcc26c 100644
--- a/includes.h
+++ b/includes.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: includes.h,v 1.22 2006/01/01 08:59:27 stevesk Exp $ */ 1/* $OpenBSD: includes.h,v 1.54 2006/07/22 20:48:23 stevesk Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -16,44 +16,24 @@
16#ifndef INCLUDES_H 16#ifndef INCLUDES_H
17#define INCLUDES_H 17#define INCLUDES_H
18 18
19#define RCSID(msg) \
20static /**/const char *const rcsid[] = { (const char *)rcsid, "\100(#)" msg }
21
22#include "config.h" 19#include "config.h"
23 20
24#define _GNU_SOURCE /* activate extra prototypes for glibc */ 21#define _GNU_SOURCE /* activate extra prototypes for glibc */
25 22
26#include <stdarg.h> 23#include <sys/types.h>
27#include <stdio.h> 24#include <sys/socket.h> /* For CMSG_* */
28#include <ctype.h>
29#include <errno.h>
30#include <fcntl.h> /* For O_NONBLOCK */
31#include <signal.h>
32#include <stdlib.h>
33#include <string.h>
34#include <stdarg.h>
35#include <pwd.h>
36#include <grp.h>
37#include <time.h>
38#include <dirent.h>
39#include <stddef.h>
40 25
41#ifdef HAVE_LIMITS_H 26#ifdef HAVE_LIMITS_H
42# include <limits.h> /* For PATH_MAX */ 27# include <limits.h> /* For PATH_MAX */
43#endif 28#endif
44#ifdef HAVE_GETOPT_H
45# include <getopt.h>
46#endif
47#ifdef HAVE_BSTRING_H 29#ifdef HAVE_BSTRING_H
48# include <bstring.h> 30# include <bstring.h>
49#endif 31#endif
50#if defined(HAVE_GLOB_H) && defined(GLOB_HAS_ALTDIRFUNC) && \ 32#if defined(HAVE_GLOB_H) && defined(GLOB_HAS_ALTDIRFUNC) && \
51 defined(GLOB_HAS_GL_MATCHC) 33 defined(GLOB_HAS_GL_MATCHC) && \
34 defined(HAVE_DECL_GLOB_NOMATCH) && HAVE_DECL_GLOB_NOMATCH != 0
52# include <glob.h> 35# include <glob.h>
53#endif 36#endif
54#ifdef HAVE_NETGROUP_H
55# include <netgroup.h>
56#endif
57#ifdef HAVE_ENDIAN_H 37#ifdef HAVE_ENDIAN_H
58# include <endian.h> 38# include <endian.h>
59#endif 39#endif
@@ -67,10 +47,11 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "\100(#)" msg }
67# include <maillock.h> /* For _PATH_MAILDIR */ 47# include <maillock.h> /* For _PATH_MAILDIR */
68#endif 48#endif
69#ifdef HAVE_NEXT 49#ifdef HAVE_NEXT
70# include <libc.h> 50# include <libc.h>
51#endif
52#ifdef HAVE_PATHS
53# include <paths.h>
71#endif 54#endif
72#include <unistd.h> /* For STDIN_FILENO, etc */
73#include <termios.h> /* Struct winsize */
74 55
75/* 56/*
76 *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively 57 *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively
@@ -86,39 +67,22 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "\100(#)" msg }
86# include <utmp.h> 67# include <utmp.h>
87#endif 68#endif
88#ifdef HAVE_UTMPX_H 69#ifdef HAVE_UTMPX_H
89# ifdef HAVE_TV_IN_UTMPX
90# include <sys/time.h>
91# endif
92# include <utmpx.h> 70# include <utmpx.h>
93#endif 71#endif
94#ifdef HAVE_LASTLOG_H 72#ifdef HAVE_LASTLOG_H
95# include <lastlog.h> 73# include <lastlog.h>
96#endif 74#endif
97#ifdef HAVE_PATHS_H
98# include <paths.h> /* For _PATH_XXX */
99#endif
100 75
101#include <sys/types.h>
102#include <sys/socket.h>
103#include <sys/ioctl.h>
104#include <sys/wait.h>
105#ifdef HAVE_SYS_TIME_H
106# include <sys/time.h> /* For timersub */
107#endif
108#include <sys/resource.h>
109#ifdef HAVE_SYS_SELECT_H 76#ifdef HAVE_SYS_SELECT_H
110# include <sys/select.h> 77# include <sys/select.h>
111#endif 78#endif
112#ifdef HAVE_SYS_BSDTTY_H 79#ifdef HAVE_SYS_BSDTTY_H
113# include <sys/bsdtty.h> 80# include <sys/bsdtty.h>
114#endif 81#endif
115#include <sys/param.h> /* For MAXPATHLEN and roundup() */
116#ifdef HAVE_SYS_UN_H
117# include <sys/un.h> /* For sockaddr_un */
118#endif
119#ifdef HAVE_STDINT_H 82#ifdef HAVE_STDINT_H
120# include <stdint.h> 83# include <stdint.h>
121#endif 84#endif
85#include <termios.h>
122#ifdef HAVE_SYS_BITYPES_H 86#ifdef HAVE_SYS_BITYPES_H
123# include <sys/bitypes.h> /* For u_intXX_t */ 87# include <sys/bitypes.h> /* For u_intXX_t */
124#endif 88#endif
@@ -144,14 +108,8 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "\100(#)" msg }
144#include <sys/ptms.h> /* for grantpt() and friends */ 108#include <sys/ptms.h> /* for grantpt() and friends */
145#endif 109#endif
146 110
111#include <netinet/in.h>
147#include <netinet/in_systm.h> /* For typedefs */ 112#include <netinet/in_systm.h> /* For typedefs */
148#include <netinet/in.h> /* For IPv6 macros */
149#include <netinet/ip.h> /* For IPTOS macros */
150#include <netinet/tcp.h>
151#include <arpa/inet.h>
152#if defined(HAVE_NETDB_H)
153# include <netdb.h>
154#endif
155#ifdef HAVE_RPC_TYPES_H 113#ifdef HAVE_RPC_TYPES_H
156# include <rpc/types.h> /* For INADDR_LOOPBACK */ 114# include <rpc/types.h> /* For INADDR_LOOPBACK */
157#endif 115#endif
@@ -205,7 +163,7 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "\100(#)" msg }
205 163
206#include "defines.h" 164#include "defines.h"
207 165
208#include "version.h" 166#include "platform.h"
209#include "openbsd-compat/openbsd-compat.h" 167#include "openbsd-compat/openbsd-compat.h"
210#include "openbsd-compat/bsd-nextstep.h" 168#include "openbsd-compat/bsd-nextstep.h"
211 169
diff --git a/kex.c b/kex.c
index 47983f8d9..5f9b1dc40 100644
--- a/kex.c
+++ b/kex.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: kex.c,v 1.77 2007/01/21 01:41:54 stevesk Exp $ */
1/* 2/*
2 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,19 +24,25 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: kex.c,v 1.65 2005/11/04 05:15:59 djm Exp $"); 27
28#include <sys/param.h>
29
30#include <signal.h>
31#include <stdarg.h>
32#include <stdio.h>
33#include <stdlib.h>
34#include <string.h>
27 35
28#include <openssl/crypto.h> 36#include <openssl/crypto.h>
29 37
30#include "ssh2.h"
31#include "xmalloc.h" 38#include "xmalloc.h"
39#include "ssh2.h"
32#include "buffer.h" 40#include "buffer.h"
33#include "bufaux.h"
34#include "packet.h" 41#include "packet.h"
35#include "compat.h" 42#include "compat.h"
36#include "cipher.h" 43#include "cipher.h"
37#include "kex.h"
38#include "key.h" 44#include "key.h"
45#include "kex.h"
39#include "log.h" 46#include "log.h"
40#include "mac.h" 47#include "mac.h"
41#include "match.h" 48#include "match.h"
@@ -48,6 +55,14 @@ RCSID("$OpenBSD: kex.c,v 1.65 2005/11/04 05:15:59 djm Exp $");
48 55
49#define KEX_COOKIE_LEN 16 56#define KEX_COOKIE_LEN 16
50 57
58#if OPENSSL_VERSION_NUMBER >= 0x00907000L
59# if defined(HAVE_EVP_SHA256)
60# define evp_ssh_sha256 EVP_sha256
61# else
62extern const EVP_MD *evp_ssh_sha256(void);
63# endif
64#endif
65
51/* prototype */ 66/* prototype */
52static void kex_kexinit_finish(Kex *); 67static void kex_kexinit_finish(Kex *);
53static void kex_choose_conf(Kex *); 68static void kex_choose_conf(Kex *);
@@ -79,7 +94,7 @@ kex_buf2prop(Buffer *raw, int *first_kex_follows)
79 int i; 94 int i;
80 char **proposal; 95 char **proposal;
81 96
82 proposal = xmalloc(PROPOSAL_MAX * sizeof(char *)); 97 proposal = xcalloc(PROPOSAL_MAX, sizeof(char *));
83 98
84 buffer_init(&b); 99 buffer_init(&b);
85 buffer_append(&b, buffer_ptr(raw), buffer_len(raw)); 100 buffer_append(&b, buffer_ptr(raw), buffer_len(raw));
@@ -214,8 +229,7 @@ kex_setup(char *proposal[PROPOSAL_MAX])
214{ 229{
215 Kex *kex; 230 Kex *kex;
216 231
217 kex = xmalloc(sizeof(*kex)); 232 kex = xcalloc(1, sizeof(*kex));
218 memset(kex, 0, sizeof(*kex));
219 buffer_init(&kex->peer); 233 buffer_init(&kex->peer);
220 buffer_init(&kex->my); 234 buffer_init(&kex->my);
221 kex_prop2buf(&kex->my, proposal); 235 kex_prop2buf(&kex->my, proposal);
@@ -258,6 +272,7 @@ choose_enc(Enc *enc, char *client, char *server)
258 enc->key_len = cipher_keylen(enc->cipher); 272 enc->key_len = cipher_keylen(enc->cipher);
259 enc->block_size = cipher_blocksize(enc->cipher); 273 enc->block_size = cipher_blocksize(enc->cipher);
260} 274}
275
261static void 276static void
262choose_mac(Mac *mac, char *client, char *server) 277choose_mac(Mac *mac, char *client, char *server)
263{ 278{
@@ -273,6 +288,7 @@ choose_mac(Mac *mac, char *client, char *server)
273 mac->key = NULL; 288 mac->key = NULL;
274 mac->enabled = 0; 289 mac->enabled = 0;
275} 290}
291
276static void 292static void
277choose_comp(Comp *comp, char *client, char *server) 293choose_comp(Comp *comp, char *client, char *server)
278{ 294{
@@ -290,6 +306,7 @@ choose_comp(Comp *comp, char *client, char *server)
290 } 306 }
291 comp->name = name; 307 comp->name = name;
292} 308}
309
293static void 310static void
294choose_kex(Kex *k, char *client, char *server) 311choose_kex(Kex *k, char *client, char *server)
295{ 312{
@@ -305,15 +322,24 @@ choose_kex(Kex *k, char *client, char *server)
305 } else if (strcmp(k->name, KEX_DHGEX_SHA1) == 0) { 322 } else if (strcmp(k->name, KEX_DHGEX_SHA1) == 0) {
306 k->kex_type = KEX_DH_GEX_SHA1; 323 k->kex_type = KEX_DH_GEX_SHA1;
307 k->evp_md = EVP_sha1(); 324 k->evp_md = EVP_sha1();
325#if OPENSSL_VERSION_NUMBER >= 0x00907000L
326 } else if (strcmp(k->name, KEX_DHGEX_SHA256) == 0) {
327 k->kex_type = KEX_DH_GEX_SHA256;
328 k->evp_md = evp_ssh_sha256();
329#endif
308#ifdef GSSAPI 330#ifdef GSSAPI
309 } else if (strncmp(k->name, KEX_GSS_GEX_SHA1_ID, 331 } else if (strncmp(k->name, KEX_GSS_GEX_SHA1_ID,
310 sizeof(KEX_GSS_GEX_SHA1_ID)-1) == 0) { 332 sizeof(KEX_GSS_GEX_SHA1_ID) - 1) == 0) {
311 k->kex_type = KEX_GSS_GEX_SHA1; 333 k->kex_type = KEX_GSS_GEX_SHA1;
312 k->evp_md = EVP_sha1(); 334 k->evp_md = EVP_sha1();
313 } else if (strncmp(k->name, KEX_GSS_GRP1_SHA1_ID, 335 } else if (strncmp(k->name, KEX_GSS_GRP1_SHA1_ID,
314 sizeof(KEX_GSS_GRP1_SHA1_ID)-1) == 0) { 336 sizeof(KEX_GSS_GRP1_SHA1_ID) - 1) == 0) {
315 k->kex_type = KEX_GSS_GRP1_SHA1; 337 k->kex_type = KEX_GSS_GRP1_SHA1;
316 k->evp_md = EVP_sha1(); 338 k->evp_md = EVP_sha1();
339 } else if (strncmp(k->name, KEX_GSS_GRP14_SHA1_ID,
340 sizeof(KEX_GSS_GRP14_SHA1_ID) - 1) == 0) {
341 k->kex_type = KEX_GSS_GRP14_SHA1;
342 k->evp_md = EVP_sha1();
317#endif 343#endif
318 } else 344 } else
319 fatal("bad kex alg %s", k->name); 345 fatal("bad kex alg %s", k->name);
@@ -378,8 +404,7 @@ kex_choose_conf(Kex *kex)
378 404
379 /* Algorithm Negotiation */ 405 /* Algorithm Negotiation */
380 for (mode = 0; mode < MODE_MAX; mode++) { 406 for (mode = 0; mode < MODE_MAX; mode++) {
381 newkeys = xmalloc(sizeof(*newkeys)); 407 newkeys = xcalloc(1, sizeof(*newkeys));
382 memset(newkeys, 0, sizeof(*newkeys));
383 kex->newkeys[mode] = newkeys; 408 kex->newkeys[mode] = newkeys;
384 ctos = (!kex->server && mode == MODE_OUT) || (kex->server && mode == MODE_IN); 409 ctos = (!kex->server && mode == MODE_OUT) || (kex->server && mode == MODE_IN);
385 nenc = ctos ? PROPOSAL_ENC_ALGS_CTOS : PROPOSAL_ENC_ALGS_STOC; 410 nenc = ctos ? PROPOSAL_ENC_ALGS_CTOS : PROPOSAL_ENC_ALGS_STOC;
@@ -434,7 +459,7 @@ derive_key(Kex *kex, int id, u_int need, u_char *hash, u_int hashlen,
434 459
435 if ((mdsz = EVP_MD_size(kex->evp_md)) <= 0) 460 if ((mdsz = EVP_MD_size(kex->evp_md)) <= 0)
436 fatal("bad kex md size %d", mdsz); 461 fatal("bad kex md size %d", mdsz);
437 digest = xmalloc(roundup(need, mdsz)); 462 digest = xmalloc(roundup(need, mdsz));
438 463
439 buffer_init(&b); 464 buffer_init(&b);
440 buffer_put_bignum2(&b, shared_secret); 465 buffer_put_bignum2(&b, shared_secret);
@@ -487,7 +512,8 @@ kex_derive_keys(Kex *kex, u_char *hash, u_int hashlen, BIGNUM *shared_secret)
487 for (mode = 0; mode < MODE_MAX; mode++) { 512 for (mode = 0; mode < MODE_MAX; mode++) {
488 current_keys[mode] = kex->newkeys[mode]; 513 current_keys[mode] = kex->newkeys[mode];
489 kex->newkeys[mode] = NULL; 514 kex->newkeys[mode] = NULL;
490 ctos = (!kex->server && mode == MODE_OUT) || (kex->server && mode == MODE_IN); 515 ctos = (!kex->server && mode == MODE_OUT) ||
516 (kex->server && mode == MODE_IN);
491 current_keys[mode]->enc.iv = keys[ctos ? 0 : 1]; 517 current_keys[mode]->enc.iv = keys[ctos ? 0 : 1];
492 current_keys[mode]->enc.key = keys[ctos ? 2 : 3]; 518 current_keys[mode]->enc.key = keys[ctos ? 2 : 3];
493 current_keys[mode]->mac.key = keys[ctos ? 4 : 5]; 519 current_keys[mode]->mac.key = keys[ctos ? 4 : 5];
@@ -544,7 +570,7 @@ dump_digest(char *msg, u_char *digest, int len)
544 u_int i; 570 u_int i;
545 571
546 fprintf(stderr, "%s\n", msg); 572 fprintf(stderr, "%s\n", msg);
547 for (i = 0; i< len; i++) { 573 for (i = 0; i < len; i++) {
548 fprintf(stderr, "%02x", digest[i]); 574 fprintf(stderr, "%02x", digest[i]);
549 if (i%32 == 31) 575 if (i%32 == 31)
550 fprintf(stderr, "\n"); 576 fprintf(stderr, "\n");
diff --git a/kex.h b/kex.h
index 1c4d1a718..51d224c87 100644
--- a/kex.h
+++ b/kex.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: kex.h,v 1.38 2005/11/04 05:15:59 djm Exp $ */ 1/* $OpenBSD: kex.h,v 1.44 2006/08/03 03:34:42 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.
@@ -26,14 +26,13 @@
26#ifndef KEX_H 26#ifndef KEX_H
27#define KEX_H 27#define KEX_H
28 28
29#include <signal.h>
29#include <openssl/evp.h> 30#include <openssl/evp.h>
30#include "buffer.h"
31#include "cipher.h"
32#include "key.h"
33 31
34#define KEX_DH1 "diffie-hellman-group1-sha1" 32#define KEX_DH1 "diffie-hellman-group1-sha1"
35#define KEX_DH14 "diffie-hellman-group14-sha1" 33#define KEX_DH14 "diffie-hellman-group14-sha1"
36#define KEX_DHGEX_SHA1 "diffie-hellman-group-exchange-sha1" 34#define KEX_DHGEX_SHA1 "diffie-hellman-group-exchange-sha1"
35#define KEX_DHGEX_SHA256 "diffie-hellman-group-exchange-sha256"
37 36
38#define COMP_NONE 0 37#define COMP_NONE 0
39#define COMP_ZLIB 1 38#define COMP_ZLIB 1
@@ -63,7 +62,9 @@ enum kex_exchange {
63 KEX_DH_GRP1_SHA1, 62 KEX_DH_GRP1_SHA1,
64 KEX_DH_GRP14_SHA1, 63 KEX_DH_GRP14_SHA1,
65 KEX_DH_GEX_SHA1, 64 KEX_DH_GEX_SHA1,
65 KEX_DH_GEX_SHA256,
66 KEX_GSS_GRP1_SHA1, 66 KEX_GSS_GRP1_SHA1,
67 KEX_GSS_GRP14_SHA1,
67 KEX_GSS_GEX_SHA1, 68 KEX_GSS_GEX_SHA1,
68 KEX_MAX 69 KEX_MAX
69}; 70};
@@ -114,7 +115,7 @@ struct Kex {
114 int kex_type; 115 int kex_type;
115 Buffer my; 116 Buffer my;
116 Buffer peer; 117 Buffer peer;
117 int done; 118 sig_atomic_t done;
118 int flags; 119 int flags;
119 const EVP_MD *evp_md; 120 const EVP_MD *evp_md;
120#ifdef GSSAPI 121#ifdef GSSAPI
@@ -154,7 +155,7 @@ kex_dh_hash(char *, char *, char *, int, char *, int, u_char *, int,
154 BIGNUM *, BIGNUM *, BIGNUM *, u_char **, u_int *); 155 BIGNUM *, BIGNUM *, BIGNUM *, u_char **, u_int *);
155void 156void
156kexgex_hash(const EVP_MD *, char *, char *, char *, int, char *, 157kexgex_hash(const EVP_MD *, char *, char *, char *, int, char *,
157 int, u_char *, int, int, int, int, BIGNUM *, BIGNUM *, BIGNUM *, 158 int, u_char *, int, int, int, int, BIGNUM *, BIGNUM *, BIGNUM *,
158 BIGNUM *, BIGNUM *, u_char **, u_int *); 159 BIGNUM *, BIGNUM *, u_char **, u_int *);
159 160
160void 161void
diff --git a/kexdh.c b/kexdh.c
index f79d8781d..56e22f5bc 100644
--- a/kexdh.c
+++ b/kexdh.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: kexdh.c,v 1.23 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,13 +24,17 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: kexdh.c,v 1.20 2005/11/04 05:15:59 djm Exp $"); 27
28#include <sys/types.h>
29
30#include <signal.h>
27 31
28#include <openssl/evp.h> 32#include <openssl/evp.h>
29 33
30#include "buffer.h" 34#include "buffer.h"
31#include "bufaux.h"
32#include "ssh2.h" 35#include "ssh2.h"
36#include "key.h"
37#include "cipher.h"
33#include "kex.h" 38#include "kex.h"
34 39
35void 40void
diff --git a/kexdhc.c b/kexdhc.c
index d8a2fa3b7..d384c8052 100644
--- a/kexdhc.c
+++ b/kexdhc.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: kexdhc.c,v 1.11 2006/11/06 21:25:28 markus Exp $ */
1/* 2/*
2 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,10 +24,18 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: kexdhc.c,v 1.3 2005/11/04 05:15:59 djm Exp $"); 27
28#include <sys/types.h>
29
30#include <stdarg.h>
31#include <stdio.h>
32#include <string.h>
33#include <signal.h>
27 34
28#include "xmalloc.h" 35#include "xmalloc.h"
36#include "buffer.h"
29#include "key.h" 37#include "key.h"
38#include "cipher.h"
30#include "kex.h" 39#include "kex.h"
31#include "log.h" 40#include "log.h"
32#include "packet.h" 41#include "packet.h"
@@ -41,7 +50,8 @@ kexdh_client(Kex *kex)
41 Key *server_host_key; 50 Key *server_host_key;
42 u_char *server_host_key_blob = NULL, *signature = NULL; 51 u_char *server_host_key_blob = NULL, *signature = NULL;
43 u_char *kbuf, *hash; 52 u_char *kbuf, *hash;
44 u_int klen, kout, slen, sbloblen, hashlen; 53 u_int klen, slen, sbloblen, hashlen;
54 int kout;
45 55
46 /* generate and send 'e', client DH public key */ 56 /* generate and send 'e', client DH public key */
47 switch (kex->kex_type) { 57 switch (kex->kex_type) {
@@ -82,7 +92,7 @@ kexdh_client(Kex *kex)
82 if (kex->verify_host_key(server_host_key) == -1) 92 if (kex->verify_host_key(server_host_key) == -1)
83 fatal("server_host_key verification failed"); 93 fatal("server_host_key verification failed");
84 94
85 /* DH paramter f, server public DH key */ 95 /* DH parameter f, server public DH key */
86 if ((dh_server_pub = BN_new()) == NULL) 96 if ((dh_server_pub = BN_new()) == NULL)
87 fatal("dh_server_pub == NULL"); 97 fatal("dh_server_pub == NULL");
88 packet_get_bignum2(dh_server_pub); 98 packet_get_bignum2(dh_server_pub);
@@ -103,13 +113,15 @@ kexdh_client(Kex *kex)
103 113
104 klen = DH_size(dh); 114 klen = DH_size(dh);
105 kbuf = xmalloc(klen); 115 kbuf = xmalloc(klen);
106 kout = DH_compute_key(kbuf, dh_server_pub, dh); 116 if ((kout = DH_compute_key(kbuf, dh_server_pub, dh)) < 0)
117 fatal("DH_compute_key: failed");
107#ifdef DEBUG_KEXDH 118#ifdef DEBUG_KEXDH
108 dump_digest("shared secret", kbuf, kout); 119 dump_digest("shared secret", kbuf, kout);
109#endif 120#endif
110 if ((shared_secret = BN_new()) == NULL) 121 if ((shared_secret = BN_new()) == NULL)
111 fatal("kexdh_client: BN_new failed"); 122 fatal("kexdh_client: BN_new failed");
112 BN_bin2bn(kbuf, kout, shared_secret); 123 if (BN_bin2bn(kbuf, kout, shared_secret) == NULL)
124 fatal("kexdh_client: BN_bin2bn failed");
113 memset(kbuf, 0, klen); 125 memset(kbuf, 0, klen);
114 xfree(kbuf); 126 xfree(kbuf);
115 127
diff --git a/kexdhs.c b/kexdhs.c
index 26c8cdfd6..861708818 100644
--- a/kexdhs.c
+++ b/kexdhs.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: kexdhs.c,v 1.9 2006/11/06 21:25:28 markus Exp $ */
1/* 2/*
2 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,15 +24,25 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: kexdhs.c,v 1.3 2005/11/04 05:15:59 djm Exp $"); 27
28#include <sys/types.h>
29
30#include <stdarg.h>
31#include <string.h>
32#include <signal.h>
27 33
28#include "xmalloc.h" 34#include "xmalloc.h"
35#include "buffer.h"
29#include "key.h" 36#include "key.h"
37#include "cipher.h"
30#include "kex.h" 38#include "kex.h"
31#include "log.h" 39#include "log.h"
32#include "packet.h" 40#include "packet.h"
33#include "dh.h" 41#include "dh.h"
34#include "ssh2.h" 42#include "ssh2.h"
43#ifdef GSSAPI
44#include "ssh-gss.h"
45#endif
35#include "monitor_wrap.h" 46#include "monitor_wrap.h"
36 47
37void 48void
@@ -41,8 +52,8 @@ kexdh_server(Kex *kex)
41 DH *dh; 52 DH *dh;
42 Key *server_host_key; 53 Key *server_host_key;
43 u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL; 54 u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL;
44 u_int sbloblen, klen, kout, hashlen; 55 u_int sbloblen, klen, hashlen, slen;
45 u_int slen; 56 int kout;
46 57
47 /* generate server DH public key */ 58 /* generate server DH public key */
48 switch (kex->kex_type) { 59 switch (kex->kex_type) {
@@ -90,13 +101,15 @@ kexdh_server(Kex *kex)
90 101
91 klen = DH_size(dh); 102 klen = DH_size(dh);
92 kbuf = xmalloc(klen); 103 kbuf = xmalloc(klen);
93 kout = DH_compute_key(kbuf, dh_client_pub, dh); 104 if ((kout = DH_compute_key(kbuf, dh_client_pub, dh)) < 0)
105 fatal("DH_compute_key: failed");
94#ifdef DEBUG_KEXDH 106#ifdef DEBUG_KEXDH
95 dump_digest("shared secret", kbuf, kout); 107 dump_digest("shared secret", kbuf, kout);
96#endif 108#endif
97 if ((shared_secret = BN_new()) == NULL) 109 if ((shared_secret = BN_new()) == NULL)
98 fatal("kexdh_server: BN_new failed"); 110 fatal("kexdh_server: BN_new failed");
99 BN_bin2bn(kbuf, kout, shared_secret); 111 if (BN_bin2bn(kbuf, kout, shared_secret) == NULL)
112 fatal("kexdh_server: BN_bin2bn failed");
100 memset(kbuf, 0, klen); 113 memset(kbuf, 0, klen);
101 xfree(kbuf); 114 xfree(kbuf);
102 115
diff --git a/kexgex.c b/kexgex.c
index 705484a47..b60ab5c53 100644
--- a/kexgex.c
+++ b/kexgex.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: kexgex.c,v 1.27 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2000 Niels Provos. All rights reserved. 3 * Copyright (c) 2000 Niels Provos. All rights reserved.
3 * Copyright (c) 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -24,12 +25,15 @@
24 */ 25 */
25 26
26#include "includes.h" 27#include "includes.h"
27RCSID("$OpenBSD: kexgex.c,v 1.24 2005/11/04 05:15:59 djm Exp $"); 28
29#include <sys/types.h>
28 30
29#include <openssl/evp.h> 31#include <openssl/evp.h>
32#include <signal.h>
30 33
31#include "buffer.h" 34#include "buffer.h"
32#include "bufaux.h" 35#include "key.h"
36#include "cipher.h"
33#include "kex.h" 37#include "kex.h"
34#include "ssh2.h" 38#include "ssh2.h"
35 39
diff --git a/kexgexc.c b/kexgexc.c
index a6ff8757d..adb973d5b 100644
--- a/kexgexc.c
+++ b/kexgexc.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: kexgexc.c,v 1.11 2006/11/06 21:25:28 markus Exp $ */
1/* 2/*
2 * Copyright (c) 2000 Niels Provos. All rights reserved. 3 * Copyright (c) 2000 Niels Provos. All rights reserved.
3 * Copyright (c) 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -24,10 +25,18 @@
24 */ 25 */
25 26
26#include "includes.h" 27#include "includes.h"
27RCSID("$OpenBSD: kexgexc.c,v 1.3 2005/11/04 05:15:59 djm Exp $"); 28
29#include <sys/types.h>
30
31#include <stdarg.h>
32#include <stdio.h>
33#include <string.h>
34#include <signal.h>
28 35
29#include "xmalloc.h" 36#include "xmalloc.h"
37#include "buffer.h"
30#include "key.h" 38#include "key.h"
39#include "cipher.h"
31#include "kex.h" 40#include "kex.h"
32#include "log.h" 41#include "log.h"
33#include "packet.h" 42#include "packet.h"
@@ -42,7 +51,8 @@ kexgex_client(Kex *kex)
42 BIGNUM *p = NULL, *g = NULL; 51 BIGNUM *p = NULL, *g = NULL;
43 Key *server_host_key; 52 Key *server_host_key;
44 u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL; 53 u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL;
45 u_int klen, kout, slen, sbloblen, hashlen; 54 u_int klen, slen, sbloblen, hashlen;
55 int kout;
46 int min, max, nbits; 56 int min, max, nbits;
47 DH *dh; 57 DH *dh;
48 58
@@ -120,7 +130,7 @@ kexgex_client(Kex *kex)
120 if (kex->verify_host_key(server_host_key) == -1) 130 if (kex->verify_host_key(server_host_key) == -1)
121 fatal("server_host_key verification failed"); 131 fatal("server_host_key verification failed");
122 132
123 /* DH paramter f, server public DH key */ 133 /* DH parameter f, server public DH key */
124 if ((dh_server_pub = BN_new()) == NULL) 134 if ((dh_server_pub = BN_new()) == NULL)
125 fatal("dh_server_pub == NULL"); 135 fatal("dh_server_pub == NULL");
126 packet_get_bignum2(dh_server_pub); 136 packet_get_bignum2(dh_server_pub);
@@ -141,13 +151,15 @@ kexgex_client(Kex *kex)
141 151
142 klen = DH_size(dh); 152 klen = DH_size(dh);
143 kbuf = xmalloc(klen); 153 kbuf = xmalloc(klen);
144 kout = DH_compute_key(kbuf, dh_server_pub, dh); 154 if ((kout = DH_compute_key(kbuf, dh_server_pub, dh)) < 0)
155 fatal("DH_compute_key: failed");
145#ifdef DEBUG_KEXDH 156#ifdef DEBUG_KEXDH
146 dump_digest("shared secret", kbuf, kout); 157 dump_digest("shared secret", kbuf, kout);
147#endif 158#endif
148 if ((shared_secret = BN_new()) == NULL) 159 if ((shared_secret = BN_new()) == NULL)
149 fatal("kexgex_client: BN_new failed"); 160 fatal("kexgex_client: BN_new failed");
150 BN_bin2bn(kbuf, kout, shared_secret); 161 if (BN_bin2bn(kbuf, kout, shared_secret) == NULL)
162 fatal("kexgex_client: BN_bin2bn failed");
151 memset(kbuf, 0, klen); 163 memset(kbuf, 0, klen);
152 xfree(kbuf); 164 xfree(kbuf);
153 165
diff --git a/kexgexs.c b/kexgexs.c
index c48b27af9..a037f57f2 100644
--- a/kexgexs.c
+++ b/kexgexs.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: kexgexs.c,v 1.10 2006/11/06 21:25:28 markus Exp $ */
1/* 2/*
2 * Copyright (c) 2000 Niels Provos. All rights reserved. 3 * Copyright (c) 2000 Niels Provos. All rights reserved.
3 * Copyright (c) 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -24,16 +25,27 @@
24 */ 25 */
25 26
26#include "includes.h" 27#include "includes.h"
27RCSID("$OpenBSD: kexgexs.c,v 1.2 2005/11/04 05:15:59 djm Exp $"); 28
29#include <sys/param.h>
30
31#include <stdarg.h>
32#include <stdio.h>
33#include <string.h>
34#include <signal.h>
28 35
29#include "xmalloc.h" 36#include "xmalloc.h"
37#include "buffer.h"
30#include "key.h" 38#include "key.h"
39#include "cipher.h"
31#include "kex.h" 40#include "kex.h"
32#include "log.h" 41#include "log.h"
33#include "packet.h" 42#include "packet.h"
34#include "dh.h" 43#include "dh.h"
35#include "ssh2.h" 44#include "ssh2.h"
36#include "compat.h" 45#include "compat.h"
46#ifdef GSSAPI
47#include "ssh-gss.h"
48#endif
37#include "monitor_wrap.h" 49#include "monitor_wrap.h"
38 50
39void 51void
@@ -43,8 +55,8 @@ kexgex_server(Kex *kex)
43 Key *server_host_key; 55 Key *server_host_key;
44 DH *dh; 56 DH *dh;
45 u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL; 57 u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL;
46 u_int sbloblen, klen, kout, slen, hashlen; 58 u_int sbloblen, klen, slen, hashlen;
47 int min = -1, max = -1, nbits = -1, type; 59 int min = -1, max = -1, nbits = -1, type, kout;
48 60
49 if (kex->load_host_key == NULL) 61 if (kex->load_host_key == NULL)
50 fatal("Cannot load hostkey"); 62 fatal("Cannot load hostkey");
@@ -122,13 +134,15 @@ kexgex_server(Kex *kex)
122 134
123 klen = DH_size(dh); 135 klen = DH_size(dh);
124 kbuf = xmalloc(klen); 136 kbuf = xmalloc(klen);
125 kout = DH_compute_key(kbuf, dh_client_pub, dh); 137 if ((kout = DH_compute_key(kbuf, dh_client_pub, dh)) < 0)
138 fatal("DH_compute_key: failed");
126#ifdef DEBUG_KEXDH 139#ifdef DEBUG_KEXDH
127 dump_digest("shared secret", kbuf, kout); 140 dump_digest("shared secret", kbuf, kout);
128#endif 141#endif
129 if ((shared_secret = BN_new()) == NULL) 142 if ((shared_secret = BN_new()) == NULL)
130 fatal("kexgex_server: BN_new failed"); 143 fatal("kexgex_server: BN_new failed");
131 BN_bin2bn(kbuf, kout, shared_secret); 144 if (BN_bin2bn(kbuf, kout, shared_secret) == NULL)
145 fatal("kexgex_server: BN_bin2bn failed");
132 memset(kbuf, 0, klen); 146 memset(kbuf, 0, klen);
133 xfree(kbuf); 147 xfree(kbuf);
134 148
diff --git a/kexgssc.c b/kexgssc.c
index 9830ad384..7c4a56f45 100644
--- a/kexgssc.c
+++ b/kexgssc.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2001-2005 Simon Wilkinson. All rights reserved. 2 * Copyright (c) 2001-2006 Simon Wilkinson. 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
@@ -26,24 +26,29 @@
26 26
27#ifdef GSSAPI 27#ifdef GSSAPI
28 28
29#include "includes.h"
30
29#include <openssl/crypto.h> 31#include <openssl/crypto.h>
30#include <openssl/bn.h> 32#include <openssl/bn.h>
31 33
34#include <string.h>
35
32#include "xmalloc.h" 36#include "xmalloc.h"
33#include "buffer.h" 37#include "buffer.h"
34#include "bufaux.h" 38#include "ssh2.h"
39#include "key.h"
40#include "cipher.h"
35#include "kex.h" 41#include "kex.h"
36#include "log.h" 42#include "log.h"
37#include "packet.h" 43#include "packet.h"
38#include "dh.h" 44#include "dh.h"
39#include "canohost.h" 45
40#include "ssh2.h"
41#include "ssh-gss.h" 46#include "ssh-gss.h"
42 47
43void 48void
44kexgss_client(Kex *kex) { 49kexgss_client(Kex *kex) {
45 gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER; 50 gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER;
46 gss_buffer_desc recv_tok, gssbuf, msg_tok, *token_ptr; 51 gss_buffer_desc recv_tok, gssbuf, msg_tok, *token_ptr;
47 Gssctxt *ctxt; 52 Gssctxt *ctxt;
48 OM_uint32 maj_status, min_status, ret_flags; 53 OM_uint32 maj_status, min_status, ret_flags;
49 u_int klen, kout, slen = 0, hashlen, strlen; 54 u_int klen, kout, slen = 0, hashlen, strlen;
@@ -58,22 +63,27 @@ kexgss_client(Kex *kex) {
58 char *lang; 63 char *lang;
59 int type = 0; 64 int type = 0;
60 int first = 1; 65 int first = 1;
61 int gex = 0; 66 int nbits = 0, min = DH_GRP_MIN, max = DH_GRP_MAX;
62 int nbits, min, max;
63 67
64 /* Initialise our GSSAPI world */ 68 /* Initialise our GSSAPI world */
65 ssh_gssapi_build_ctx(&ctxt); 69 ssh_gssapi_build_ctx(&ctxt);
66 if (ssh_gssapi_id_kex(ctxt, kex->name, &gex) == NULL) 70 if (ssh_gssapi_id_kex(ctxt, kex->name, kex->kex_type)
71 == GSS_C_NO_OID)
67 fatal("Couldn't identify host exchange"); 72 fatal("Couldn't identify host exchange");
68 73
69 if (ssh_gssapi_import_name(ctxt, kex->gss_host)) 74 if (ssh_gssapi_import_name(ctxt, kex->gss_host))
70 fatal("Couldn't import hostname"); 75 fatal("Couldn't import hostname");
71 76
72 if (gex) { 77 switch (kex->kex_type) {
78 case KEX_GSS_GRP1_SHA1:
79 dh = dh_new_group1();
80 break;
81 case KEX_GSS_GRP14_SHA1:
82 dh = dh_new_group14();
83 break;
84 case KEX_GSS_GEX_SHA1:
73 debug("Doing group exchange\n"); 85 debug("Doing group exchange\n");
74 nbits = dh_estimate(kex->we_need * 8); 86 nbits = dh_estimate(kex->we_need * 8);
75 min = DH_GRP_MIN;
76 max = DH_GRP_MAX;
77 packet_start(SSH2_MSG_KEXGSS_GROUPREQ); 87 packet_start(SSH2_MSG_KEXGSS_GROUPREQ);
78 packet_put_int(min); 88 packet_put_int(min);
79 packet_put_int(nbits); 89 packet_put_int(nbits);
@@ -96,8 +106,9 @@ kexgss_client(Kex *kex) {
96 min, BN_num_bits(p), max); 106 min, BN_num_bits(p), max);
97 107
98 dh = dh_new_group(g, p); 108 dh = dh_new_group(g, p);
99 } else { 109 break;
100 dh = dh_new_group1(); 110 default:
111 fatal("%s: Unexpected KEX type %d", __func__, kex->kex_type);
101 } 112 }
102 113
103 /* Step 1 - e is dh->pub_key */ 114 /* Step 1 - e is dh->pub_key */
@@ -205,7 +216,7 @@ kexgss_client(Kex *kex) {
205 min_status = packet_get_int(); 216 min_status = packet_get_int();
206 msg = packet_get_string(NULL); 217 msg = packet_get_string(NULL);
207 lang = packet_get_string(NULL); 218 lang = packet_get_string(NULL);
208 fatal("GSSAPI Error: \n%s",msg); 219 fatal("GSSAPI Error: \n%.400s",msg);
209 default: 220 default:
210 packet_disconnect("Protocol error: didn't expect packet type %d", 221 packet_disconnect("Protocol error: didn't expect packet type %d",
211 type); 222 type);
@@ -240,7 +251,21 @@ kexgss_client(Kex *kex) {
240 memset(kbuf, 0, klen); 251 memset(kbuf, 0, klen);
241 xfree(kbuf); 252 xfree(kbuf);
242 253
243 if (gex) { 254 switch (kex->kex_type) {
255 case KEX_GSS_GRP1_SHA1:
256 case KEX_GSS_GRP14_SHA1:
257 kex_dh_hash( kex->client_version_string,
258 kex->server_version_string,
259 buffer_ptr(&kex->my), buffer_len(&kex->my),
260 buffer_ptr(&kex->peer), buffer_len(&kex->peer),
261 serverhostkey, slen, /* server host key */
262 dh->pub_key, /* e */
263 dh_server_pub, /* f */
264 shared_secret, /* K */
265 &hash, &hashlen
266 );
267 break;
268 case KEX_GSS_GEX_SHA1:
244 kexgex_hash( 269 kexgex_hash(
245 kex->evp_md, 270 kex->evp_md,
246 kex->client_version_string, 271 kex->client_version_string,
@@ -255,24 +280,15 @@ kexgss_client(Kex *kex) {
255 shared_secret, 280 shared_secret,
256 &hash, &hashlen 281 &hash, &hashlen
257 ); 282 );
258 } else { 283 break;
259 /* The GSS hash is identical to the DH one */ 284 default:
260 kex_dh_hash( kex->client_version_string, 285 fatal("%s: Unexpected KEX type %d", __func__, kex->kex_type);
261 kex->server_version_string, 286 }
262 buffer_ptr(&kex->my), buffer_len(&kex->my),
263 buffer_ptr(&kex->peer), buffer_len(&kex->peer),
264 serverhostkey, slen, /* server host key */
265 dh->pub_key, /* e */
266 dh_server_pub, /* f */
267 shared_secret, /* K */
268 &hash, &hashlen
269 );
270 }
271 287
272 gssbuf.value = hash; 288 gssbuf.value = hash;
273 gssbuf.length = hashlen; 289 gssbuf.length = hashlen;
274 290
275 /* Verify that the hash matches the MIC we just got. */ 291 /* Verify that the hash matches the MIC we just got. */
276 if (GSS_ERROR(ssh_gssapi_checkmic(ctxt, &gssbuf, &msg_tok))) 292 if (GSS_ERROR(ssh_gssapi_checkmic(ctxt, &gssbuf, &msg_tok)))
277 packet_disconnect("Hash's MIC didn't verify"); 293 packet_disconnect("Hash's MIC didn't verify");
278 294
diff --git a/kexgsss.c b/kexgsss.c
index 6447dc97b..3ca23bbb2 100644
--- a/kexgsss.c
+++ b/kexgsss.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2001-2005 Simon Wilkinson. All rights reserved. 2 * Copyright (c) 2001-2006 Simon Wilkinson. 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
@@ -26,17 +26,20 @@
26 26
27#ifdef GSSAPI 27#ifdef GSSAPI
28 28
29#include <string.h>
30
29#include <openssl/crypto.h> 31#include <openssl/crypto.h>
30#include <openssl/bn.h> 32#include <openssl/bn.h>
31 33
32#include "xmalloc.h" 34#include "xmalloc.h"
33#include "buffer.h" 35#include "buffer.h"
34#include "bufaux.h" 36#include "ssh2.h"
37#include "key.h"
38#include "cipher.h"
35#include "kex.h" 39#include "kex.h"
36#include "log.h" 40#include "log.h"
37#include "packet.h" 41#include "packet.h"
38#include "dh.h" 42#include "dh.h"
39#include "ssh2.h"
40#include "ssh-gss.h" 43#include "ssh-gss.h"
41#include "monitor_wrap.h" 44#include "monitor_wrap.h"
42 45
@@ -63,29 +66,35 @@ kexgss_server(Kex *kex)
63 BIGNUM *shared_secret = NULL; 66 BIGNUM *shared_secret = NULL;
64 BIGNUM *dh_client_pub = NULL; 67 BIGNUM *dh_client_pub = NULL;
65 int type = 0; 68 int type = 0;
66 int gex;
67 gss_OID oid; 69 gss_OID oid;
68 70
69 /* Initialise GSSAPI */ 71 /* Initialise GSSAPI */
70 72
71 /* If we're rekeying, privsep means that some of the private structures 73 /* If we're rekeying, privsep means that some of the private structures
72 * in the GSSAPI code are no longer available. This kludges them back 74 * in the GSSAPI code are no longer available. This kludges them back
73 * into life 75 * into life
74 */ 76 */
75 if (!ssh_gssapi_oid_table_ok()) 77 if (!ssh_gssapi_oid_table_ok())
76 ssh_gssapi_server_mechanisms(); 78 ssh_gssapi_server_mechanisms();
77 79
78 debug2("%s: Identifying %s", __func__, kex->name); 80 debug2("%s: Identifying %s", __func__, kex->name);
79 oid = ssh_gssapi_id_kex(NULL, kex->name, &gex); 81 oid = ssh_gssapi_id_kex(NULL, kex->name, kex->kex_type);
80 if (oid == NULL) 82 if (oid == GSS_C_NO_OID)
81 fatal("Unknown gssapi mechanism"); 83 fatal("Unknown gssapi mechanism");
82 84
83 debug2("%s: Acquiring credentials", __func__); 85 debug2("%s: Acquiring credentials", __func__);
84 86
85 if (GSS_ERROR(PRIVSEP(ssh_gssapi_server_ctx(&ctxt, oid)))) 87 if (GSS_ERROR(PRIVSEP(ssh_gssapi_server_ctx(&ctxt, oid))))
86 fatal("Unable to acquire credentials for the server"); 88 fatal("Unable to acquire credentials for the server");
87 89
88 if (gex) { 90 switch (kex->kex_type) {
91 case KEX_GSS_GRP1_SHA1:
92 dh = dh_new_group1();
93 break;
94 case KEX_GSS_GRP14_SHA1:
95 dh = dh_new_group14();
96 break;
97 case KEX_GSS_GEX_SHA1:
89 debug("Doing group exchange"); 98 debug("Doing group exchange");
90 packet_read_expect(SSH2_MSG_KEXGSS_GROUPREQ); 99 packet_read_expect(SSH2_MSG_KEXGSS_GROUPREQ);
91 min = packet_get_int(); 100 min = packet_get_int();
@@ -107,10 +116,11 @@ kexgss_server(Kex *kex)
107 packet_send(); 116 packet_send();
108 117
109 packet_write_wait(); 118 packet_write_wait();
110 119 break;
111 } else { 120 default:
112 dh = dh_new_group1(); 121 fatal("%s: Unexpected KEX type %d", __func__, kex->kex_type);
113 } 122 }
123
114 dh_gen_key(dh, kex->we_need * 8); 124 dh_gen_key(dh, kex->we_need * 8);
115 125
116 do { 126 do {
@@ -187,7 +197,19 @@ kexgss_server(Kex *kex)
187 memset(kbuf, 0, klen); 197 memset(kbuf, 0, klen);
188 xfree(kbuf); 198 xfree(kbuf);
189 199
190 if (gex) { 200 switch (kex->kex_type) {
201 case KEX_GSS_GRP1_SHA1:
202 case KEX_GSS_GRP14_SHA1:
203 kex_dh_hash(
204 kex->client_version_string, kex->server_version_string,
205 buffer_ptr(&kex->peer), buffer_len(&kex->peer),
206 buffer_ptr(&kex->my), buffer_len(&kex->my),
207 NULL, 0, /* Change this if we start sending host keys */
208 dh_client_pub, dh->pub_key, shared_secret,
209 &hash, &hashlen
210 );
211 break;
212 case KEX_GSS_GEX_SHA1:
191 kexgex_hash( 213 kexgex_hash(
192 kex->evp_md, 214 kex->evp_md,
193 kex->client_version_string, kex->server_version_string, 215 kex->client_version_string, kex->server_version_string,
@@ -201,18 +223,11 @@ kexgss_server(Kex *kex)
201 shared_secret, 223 shared_secret,
202 &hash, &hashlen 224 &hash, &hashlen
203 ); 225 );
226 break;
227 default:
228 fatal("%s: Unexpected KEX type %d", __func__, kex->kex_type);
204 } 229 }
205 else { 230
206 /* The GSSAPI hash is identical to the Diffie Helman one */
207 kex_dh_hash(
208 kex->client_version_string, kex->server_version_string,
209 buffer_ptr(&kex->peer), buffer_len(&kex->peer),
210 buffer_ptr(&kex->my), buffer_len(&kex->my),
211 NULL, 0, /* Change this if we start sending host keys */
212 dh_client_pub, dh->pub_key, shared_secret,
213 &hash, &hashlen
214 );
215 }
216 BN_free(dh_client_pub); 231 BN_free(dh_client_pub);
217 232
218 if (kex->session_id == NULL) { 233 if (kex->session_id == NULL) {
@@ -229,11 +244,11 @@ kexgss_server(Kex *kex)
229 244
230 packet_start(SSH2_MSG_KEXGSS_COMPLETE); 245 packet_start(SSH2_MSG_KEXGSS_COMPLETE);
231 packet_put_bignum2(dh->pub_key); 246 packet_put_bignum2(dh->pub_key);
232 packet_put_string((char *)msg_tok.value,msg_tok.length); 247 packet_put_string(msg_tok.value,msg_tok.length);
233 248
234 if (send_tok.length != 0) { 249 if (send_tok.length != 0) {
235 packet_put_char(1); /* true */ 250 packet_put_char(1); /* true */
236 packet_put_string((char *)send_tok.value, send_tok.length); 251 packet_put_string(send_tok.value, send_tok.length);
237 } else { 252 } else {
238 packet_put_char(0); /* false */ 253 packet_put_char(0); /* false */
239 } 254 }
diff --git a/key.c b/key.c
index 239a35919..5563608ec 100644
--- a/key.c
+++ b/key.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: key.c,v 1.68 2006/11/06 21:25:28 markus Exp $ */
1/* 2/*
2 * read_bignum(): 3 * read_bignum():
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -31,17 +32,22 @@
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 34 */
35
34#include "includes.h" 36#include "includes.h"
35RCSID("$OpenBSD: key.c,v 1.58 2005/06/17 02:44:32 djm Exp $"); 37
38#include <sys/types.h>
36 39
37#include <openssl/evp.h> 40#include <openssl/evp.h>
38 41
42#include <stdarg.h>
43#include <stdio.h>
44#include <string.h>
45
39#include "xmalloc.h" 46#include "xmalloc.h"
40#include "key.h" 47#include "key.h"
41#include "rsa.h" 48#include "rsa.h"
42#include "uuencode.h" 49#include "uuencode.h"
43#include "buffer.h" 50#include "buffer.h"
44#include "bufaux.h"
45#include "log.h" 51#include "log.h"
46 52
47Key * 53Key *
@@ -50,9 +56,8 @@ key_new(int type)
50 Key *k; 56 Key *k;
51 RSA *rsa; 57 RSA *rsa;
52 DSA *dsa; 58 DSA *dsa;
53 k = xmalloc(sizeof(*k)); 59 k = xcalloc(1, sizeof(*k));
54 k->type = type; 60 k->type = type;
55 k->flags = 0;
56 k->dsa = NULL; 61 k->dsa = NULL;
57 k->rsa = NULL; 62 k->rsa = NULL;
58 switch (k->type) { 63 switch (k->type) {
@@ -123,6 +128,8 @@ key_new_private(int type)
123void 128void
124key_free(Key *k) 129key_free(Key *k)
125{ 130{
131 if (k == NULL)
132 fatal("key_free: key is NULL");
126 switch (k->type) { 133 switch (k->type) {
127 case KEY_RSA1: 134 case KEY_RSA1:
128 case KEY_RSA: 135 case KEY_RSA:
@@ -155,14 +162,12 @@ key_equal(const Key *a, const Key *b)
155 return a->rsa != NULL && b->rsa != NULL && 162 return a->rsa != NULL && b->rsa != NULL &&
156 BN_cmp(a->rsa->e, b->rsa->e) == 0 && 163 BN_cmp(a->rsa->e, b->rsa->e) == 0 &&
157 BN_cmp(a->rsa->n, b->rsa->n) == 0; 164 BN_cmp(a->rsa->n, b->rsa->n) == 0;
158 break;
159 case KEY_DSA: 165 case KEY_DSA:
160 return a->dsa != NULL && b->dsa != NULL && 166 return a->dsa != NULL && b->dsa != NULL &&
161 BN_cmp(a->dsa->p, b->dsa->p) == 0 && 167 BN_cmp(a->dsa->p, b->dsa->p) == 0 &&
162 BN_cmp(a->dsa->q, b->dsa->q) == 0 && 168 BN_cmp(a->dsa->q, b->dsa->q) == 0 &&
163 BN_cmp(a->dsa->g, b->dsa->g) == 0 && 169 BN_cmp(a->dsa->g, b->dsa->g) == 0 &&
164 BN_cmp(a->dsa->pub_key, b->dsa->pub_key) == 0; 170 BN_cmp(a->dsa->pub_key, b->dsa->pub_key) == 0;
165 break;
166 default: 171 default:
167 fatal("key_equal: bad key type %d", a->type); 172 fatal("key_equal: bad key type %d", a->type);
168 break; 173 break;
@@ -209,7 +214,6 @@ key_fingerprint_raw(const Key *k, enum fp_type dgst_type,
209 break; 214 break;
210 case KEY_UNSPEC: 215 case KEY_UNSPEC:
211 return retval; 216 return retval;
212 break;
213 default: 217 default:
214 fatal("key_fingerprint_raw: bad key type %d", k->type); 218 fatal("key_fingerprint_raw: bad key type %d", k->type);
215 break; 219 break;
@@ -233,8 +237,7 @@ key_fingerprint_hex(u_char *dgst_raw, u_int dgst_raw_len)
233 char *retval; 237 char *retval;
234 u_int i; 238 u_int i;
235 239
236 retval = xmalloc(dgst_raw_len * 3 + 1); 240 retval = xcalloc(1, dgst_raw_len * 3 + 1);
237 retval[0] = '\0';
238 for (i = 0; i < dgst_raw_len; i++) { 241 for (i = 0; i < dgst_raw_len; i++) {
239 char hex[4]; 242 char hex[4];
240 snprintf(hex, sizeof(hex), "%02x:", dgst_raw[i]); 243 snprintf(hex, sizeof(hex), "%02x:", dgst_raw[i]);
@@ -256,7 +259,7 @@ key_fingerprint_bubblebabble(u_char *dgst_raw, u_int dgst_raw_len)
256 char *retval; 259 char *retval;
257 260
258 rounds = (dgst_raw_len / 2) + 1; 261 rounds = (dgst_raw_len / 2) + 1;
259 retval = xmalloc(sizeof(char) * (rounds*6)); 262 retval = xcalloc((rounds * 6), sizeof(char));
260 retval[j++] = 'x'; 263 retval[j++] = 'x';
261 for (i = 0; i < rounds; i++) { 264 for (i = 0; i < rounds; i++) {
262 u_int idx0, idx1, idx2, idx3, idx4; 265 u_int idx0, idx1, idx2, idx3, idx4;
@@ -530,13 +533,10 @@ key_type(const Key *k)
530 switch (k->type) { 533 switch (k->type) {
531 case KEY_RSA1: 534 case KEY_RSA1:
532 return "RSA1"; 535 return "RSA1";
533 break;
534 case KEY_RSA: 536 case KEY_RSA:
535 return "RSA"; 537 return "RSA";
536 break;
537 case KEY_DSA: 538 case KEY_DSA:
538 return "DSA"; 539 return "DSA";
539 break;
540 } 540 }
541 return "unknown"; 541 return "unknown";
542} 542}
@@ -547,10 +547,8 @@ key_ssh_name(const Key *k)
547 switch (k->type) { 547 switch (k->type) {
548 case KEY_RSA: 548 case KEY_RSA:
549 return "ssh-rsa"; 549 return "ssh-rsa";
550 break;
551 case KEY_DSA: 550 case KEY_DSA:
552 return "ssh-dss"; 551 return "ssh-dss";
553 break;
554 } 552 }
555 return "ssh-unknown"; 553 return "ssh-unknown";
556} 554}
@@ -562,10 +560,8 @@ key_size(const Key *k)
562 case KEY_RSA1: 560 case KEY_RSA1:
563 case KEY_RSA: 561 case KEY_RSA:
564 return BN_num_bits(k->rsa->n); 562 return BN_num_bits(k->rsa->n);
565 break;
566 case KEY_DSA: 563 case KEY_DSA:
567 return BN_num_bits(k->dsa->p); 564 return BN_num_bits(k->dsa->p);
568 break;
569 } 565 }
570 return 0; 566 return 0;
571} 567}
@@ -574,6 +570,7 @@ static RSA *
574rsa_generate_private_key(u_int bits) 570rsa_generate_private_key(u_int bits)
575{ 571{
576 RSA *private; 572 RSA *private;
573
577 private = RSA_generate_key(bits, 35, NULL, NULL); 574 private = RSA_generate_key(bits, 35, NULL, NULL);
578 if (private == NULL) 575 if (private == NULL)
579 fatal("rsa_generate_private_key: key generation failed."); 576 fatal("rsa_generate_private_key: key generation failed.");
@@ -584,6 +581,7 @@ static DSA*
584dsa_generate_private_key(u_int bits) 581dsa_generate_private_key(u_int bits)
585{ 582{
586 DSA *private = DSA_generate_parameters(bits, NULL, 0, NULL, NULL, NULL, NULL); 583 DSA *private = DSA_generate_parameters(bits, NULL, 0, NULL, NULL, NULL, NULL);
584
587 if (private == NULL) 585 if (private == NULL)
588 fatal("dsa_generate_private_key: DSA_generate_parameters failed"); 586 fatal("dsa_generate_private_key: DSA_generate_parameters failed");
589 if (!DSA_generate_key(private)) 587 if (!DSA_generate_key(private))
@@ -619,16 +617,18 @@ key_from_private(const Key *k)
619 switch (k->type) { 617 switch (k->type) {
620 case KEY_DSA: 618 case KEY_DSA:
621 n = key_new(k->type); 619 n = key_new(k->type);
622 BN_copy(n->dsa->p, k->dsa->p); 620 if ((BN_copy(n->dsa->p, k->dsa->p) == NULL) ||
623 BN_copy(n->dsa->q, k->dsa->q); 621 (BN_copy(n->dsa->q, k->dsa->q) == NULL) ||
624 BN_copy(n->dsa->g, k->dsa->g); 622 (BN_copy(n->dsa->g, k->dsa->g) == NULL) ||
625 BN_copy(n->dsa->pub_key, k->dsa->pub_key); 623 (BN_copy(n->dsa->pub_key, k->dsa->pub_key) == NULL))
624 fatal("key_from_private: BN_copy failed");
626 break; 625 break;
627 case KEY_RSA: 626 case KEY_RSA:
628 case KEY_RSA1: 627 case KEY_RSA1:
629 n = key_new(k->type); 628 n = key_new(k->type);
630 BN_copy(n->rsa->n, k->rsa->n); 629 if ((BN_copy(n->rsa->n, k->rsa->n) == NULL) ||
631 BN_copy(n->rsa->e, k->rsa->e); 630 (BN_copy(n->rsa->e, k->rsa->e) == NULL))
631 fatal("key_from_private: BN_copy failed");
632 break; 632 break;
633 default: 633 default:
634 fatal("key_from_private: unknown type %d", k->type); 634 fatal("key_from_private: unknown type %d", k->type);
@@ -795,14 +795,11 @@ key_sign(
795 switch (key->type) { 795 switch (key->type) {
796 case KEY_DSA: 796 case KEY_DSA:
797 return ssh_dss_sign(key, sigp, lenp, data, datalen); 797 return ssh_dss_sign(key, sigp, lenp, data, datalen);
798 break;
799 case KEY_RSA: 798 case KEY_RSA:
800 return ssh_rsa_sign(key, sigp, lenp, data, datalen); 799 return ssh_rsa_sign(key, sigp, lenp, data, datalen);
801 break;
802 default: 800 default:
803 error("key_sign: invalid key type %d", key->type); 801 error("key_sign: invalid key type %d", key->type);
804 return -1; 802 return -1;
805 break;
806 } 803 }
807} 804}
808 805
@@ -822,14 +819,11 @@ key_verify(
822 switch (key->type) { 819 switch (key->type) {
823 case KEY_DSA: 820 case KEY_DSA:
824 return ssh_dss_verify(key, signature, signaturelen, data, datalen); 821 return ssh_dss_verify(key, signature, signaturelen, data, datalen);
825 break;
826 case KEY_RSA: 822 case KEY_RSA:
827 return ssh_rsa_verify(key, signature, signaturelen, data, datalen); 823 return ssh_rsa_verify(key, signature, signaturelen, data, datalen);
828 break;
829 default: 824 default:
830 error("key_verify: invalid key type %d", key->type); 825 error("key_verify: invalid key type %d", key->type);
831 return -1; 826 return -1;
832 break;
833 } 827 }
834} 828}
835 829
@@ -839,7 +833,7 @@ key_demote(const Key *k)
839{ 833{
840 Key *pk; 834 Key *pk;
841 835
842 pk = xmalloc(sizeof(*pk)); 836 pk = xcalloc(1, sizeof(*pk));
843 pk->type = k->type; 837 pk->type = k->type;
844 pk->flags = k->flags; 838 pk->flags = k->flags;
845 pk->dsa = NULL; 839 pk->dsa = NULL;
diff --git a/key.h b/key.h
index 6358e955f..40576f3d7 100644
--- a/key.h
+++ b/key.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: key.h,v 1.23 2003/11/10 16:23:41 jakob Exp $ */ 1/* $OpenBSD: key.h,v 1.26 2006/08/03 03:34:42 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.
diff --git a/log.c b/log.c
index 96ab24b04..7f8867482 100644
--- a/log.c
+++ b/log.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: log.c,v 1.39 2006/08/18 09:13:25 deraadt Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -34,16 +35,22 @@
34 */ 35 */
35 36
36#include "includes.h" 37#include "includes.h"
37RCSID("$OpenBSD: log.c,v 1.29 2003/09/23 20:17:11 markus Exp $");
38 38
39#include "log.h" 39#include <sys/types.h>
40#include "xmalloc.h"
41 40
41#include <stdarg.h>
42#include <stdio.h>
43#include <stdlib.h>
44#include <string.h>
42#include <syslog.h> 45#include <syslog.h>
46#include <unistd.h>
43#if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) 47#if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H)
44# include <vis.h> 48# include <vis.h>
45#endif 49#endif
46 50
51#include "xmalloc.h"
52#include "log.h"
53
47static LogLevel log_level = SYSLOG_LEVEL_INFO; 54static LogLevel log_level = SYSLOG_LEVEL_INFO;
48static int log_on_stderr = 1; 55static int log_on_stderr = 1;
49static int log_facility = LOG_AUTH; 56static int log_facility = LOG_AUTH;
@@ -130,6 +137,20 @@ error(const char *fmt,...)
130 va_end(args); 137 va_end(args);
131} 138}
132 139
140void
141sigdie(const char *fmt,...)
142{
143#ifdef DO_LOG_SAFE_IN_SIGHAND
144 va_list args;
145
146 va_start(args, fmt);
147 do_log(SYSLOG_LEVEL_FATAL, fmt, args);
148 va_end(args);
149#endif
150 _exit(1);
151}
152
153
133/* Log this message (information that usually should go to the log). */ 154/* Log this message (information that usually should go to the log). */
134 155
135void 156void
diff --git a/log.h b/log.h
index 2b3c3090f..7a8c57079 100644
--- a/log.h
+++ b/log.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: log.h,v 1.11 2004/06/21 22:02:58 djm Exp $ */ 1/* $OpenBSD: log.h,v 1.15 2006/08/18 09:13:25 deraadt Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -15,8 +15,6 @@
15#ifndef SSH_LOG_H 15#ifndef SSH_LOG_H
16#define SSH_LOG_H 16#define SSH_LOG_H
17 17
18#include <syslog.h> /* Needed for LOG_AUTHPRIV (if present) */
19
20/* Supported syslog facilities and levels. */ 18/* Supported syslog facilities and levels. */
21typedef enum { 19typedef enum {
22 SYSLOG_FACILITY_DAEMON, 20 SYSLOG_FACILITY_DAEMON,
@@ -55,6 +53,7 @@ LogLevel log_level_number(char *);
55 53
56void fatal(const char *, ...) __dead __attribute__((format(printf, 1, 2))); 54void fatal(const char *, ...) __dead __attribute__((format(printf, 1, 2)));
57void error(const char *, ...) __attribute__((format(printf, 1, 2))); 55void error(const char *, ...) __attribute__((format(printf, 1, 2)));
56void sigdie(const char *, ...) __attribute__((format(printf, 1, 2)));
58void logit(const char *, ...) __attribute__((format(printf, 1, 2))); 57void logit(const char *, ...) __attribute__((format(printf, 1, 2)));
59void verbose(const char *, ...) __attribute__((format(printf, 1, 2))); 58void verbose(const char *, ...) __attribute__((format(printf, 1, 2)));
60void debug(const char *, ...) __attribute__((format(printf, 1, 2))); 59void debug(const char *, ...) __attribute__((format(printf, 1, 2)));
diff --git a/loginrec.c b/loginrec.c
index d096346ec..e59127747 100644
--- a/loginrec.c
+++ b/loginrec.c
@@ -147,8 +147,26 @@
147 147
148#include "includes.h" 148#include "includes.h"
149 149
150#include "ssh.h" 150#include <sys/types.h>
151#include <sys/stat.h>
152#include <sys/socket.h>
153
154#include <netinet/in.h>
155
156#include <errno.h>
157#include <fcntl.h>
158#ifdef HAVE_PATHS_H
159# include <paths.h>
160#endif
161#include <pwd.h>
162#include <stdarg.h>
163#include <string.h>
164#include <unistd.h>
165
151#include "xmalloc.h" 166#include "xmalloc.h"
167#include "key.h"
168#include "hostfile.h"
169#include "ssh.h"
152#include "loginrec.h" 170#include "loginrec.h"
153#include "log.h" 171#include "log.h"
154#include "atomicio.h" 172#include "atomicio.h"
@@ -165,8 +183,6 @@
165# include <libutil.h> 183# include <libutil.h>
166#endif 184#endif
167 185
168RCSID("$Id: loginrec.c,v 1.71 2005/11/22 08:55:13 dtucker Exp $");
169
170/** 186/**
171 ** prototypes for helper functions in this file 187 ** prototypes for helper functions in this file
172 **/ 188 **/
diff --git a/loginrec.h b/loginrec.h
index 8e3390178..859e1a630 100644
--- a/loginrec.h
+++ b/loginrec.h
@@ -31,12 +31,6 @@
31 31
32#include "includes.h" 32#include "includes.h"
33 33
34#include <sys/types.h>
35#include <netinet/in.h>
36#include <sys/socket.h>
37
38/* RCSID("$Id: loginrec.h,v 1.10 2005/06/19 00:19:44 djm Exp $"); */
39
40/** 34/**
41 ** you should use the login_* calls to work around platform dependencies 35 ** you should use the login_* calls to work around platform dependencies
42 **/ 36 **/
diff --git a/logintest.c b/logintest.c
index 95cce5a3a..7e9fbbfbb 100644
--- a/logintest.c
+++ b/logintest.c
@@ -31,6 +31,10 @@
31 31
32#include <sys/types.h> 32#include <sys/types.h>
33#include <sys/wait.h> 33#include <sys/wait.h>
34#include <sys/socket.h>
35
36#include <netinet/in.h>
37
34#include <unistd.h> 38#include <unistd.h>
35#include <stdlib.h> 39#include <stdlib.h>
36#include <stdio.h> 40#include <stdio.h>
@@ -43,8 +47,6 @@
43 47
44#include "loginrec.h" 48#include "loginrec.h"
45 49
46RCSID("$Id: logintest.c,v 1.11 2004/07/17 04:07:42 dtucker Exp $");
47
48extern char *__progname; 50extern char *__progname;
49 51
50#define PAUSE_BEFORE_LOGOUT 3 52#define PAUSE_BEFORE_LOGOUT 3
diff --git a/mac.c b/mac.c
index 2bda5a1b9..e5d5bfa88 100644
--- a/mac.c
+++ b/mac.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: mac.c,v 1.12 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,16 +24,23 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: mac.c,v 1.7 2005/06/17 02:44:32 djm Exp $"); 27
28#include <sys/types.h>
27 29
28#include <openssl/hmac.h> 30#include <openssl/hmac.h>
29 31
32#include <stdarg.h>
33#include <string.h>
34#include <signal.h>
35
30#include "xmalloc.h" 36#include "xmalloc.h"
31#include "getput.h"
32#include "log.h" 37#include "log.h"
33#include "cipher.h" 38#include "cipher.h"
39#include "buffer.h"
40#include "key.h"
34#include "kex.h" 41#include "kex.h"
35#include "mac.h" 42#include "mac.h"
43#include "misc.h"
36 44
37struct { 45struct {
38 char *name; 46 char *name;
@@ -83,7 +91,7 @@ mac_compute(Mac *mac, u_int32_t seqno, u_char *data, int datalen)
83 if (mac->mac_len > sizeof(m)) 91 if (mac->mac_len > sizeof(m))
84 fatal("mac_compute: mac too long"); 92 fatal("mac_compute: mac too long");
85 HMAC_Init(&c, mac->key, mac->key_len, mac->md); 93 HMAC_Init(&c, mac->key, mac->key_len, mac->md);
86 PUT_32BIT(b, seqno); 94 put_u32(b, seqno);
87 HMAC_Update(&c, b, sizeof(b)); 95 HMAC_Update(&c, b, sizeof(b));
88 HMAC_Update(&c, data, datalen); 96 HMAC_Update(&c, data, datalen);
89 HMAC_Final(&c, m, NULL); 97 HMAC_Final(&c, m, NULL);
diff --git a/mac.h b/mac.h
index 43b485dd9..960cc5c50 100644
--- a/mac.h
+++ b/mac.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: mac.h,v 1.3 2001/06/26 17:27:24 markus Exp $ */ 1/* $OpenBSD: mac.h,v 1.4 2006/03/25 22:22:43 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
4 * 4 *
diff --git a/match.c b/match.c
index 29fb7dab9..e3c993073 100644
--- a/match.c
+++ b/match.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: match.c,v 1.26 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -35,10 +36,14 @@
35 */ 36 */
36 37
37#include "includes.h" 38#include "includes.h"
38RCSID("$OpenBSD: match.c,v 1.20 2005/06/17 02:44:32 djm Exp $");
39 39
40#include "match.h" 40#include <sys/types.h>
41
42#include <ctype.h>
43#include <string.h>
44
41#include "xmalloc.h" 45#include "xmalloc.h"
46#include "match.h"
42 47
43/* 48/*
44 * Returns true if the given string matches the pattern (which may contain ? 49 * Returns true if the given string matches the pattern (which may contain ?
@@ -136,7 +141,7 @@ match_pattern_list(const char *string, const char *pattern, u_int len,
136 i < len && subi < sizeof(sub) - 1 && pattern[i] != ','; 141 i < len && subi < sizeof(sub) - 1 && pattern[i] != ',';
137 subi++, i++) 142 subi++, i++)
138 sub[subi] = dolower && isupper(pattern[i]) ? 143 sub[subi] = dolower && isupper(pattern[i]) ?
139 tolower(pattern[i]) : pattern[i]; 144 (char)tolower(pattern[i]) : pattern[i];
140 /* If subpattern too long, return failure (no match). */ 145 /* If subpattern too long, return failure (no match). */
141 if (subi >= sizeof(sub) - 1) 146 if (subi >= sizeof(sub) - 1)
142 return 0; 147 return 0;
diff --git a/match.h b/match.h
index a0764e001..d1d538654 100644
--- a/match.h
+++ b/match.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: match.h,v 1.12 2002/03/01 13:12:10 markus Exp $ */ 1/* $OpenBSD: match.h,v 1.13 2006/03/25 22:22:43 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
diff --git a/md-sha256.c b/md-sha256.c
new file mode 100644
index 000000000..8c1b3b92d
--- /dev/null
+++ b/md-sha256.c
@@ -0,0 +1,86 @@
1/* $OpenBSD: md-sha256.c,v 1.5 2006/08/03 03:34:42 deraadt Exp $ */
2/*
3 * Copyright (c) 2005 Damien Miller <djm@openbsd.org>
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18/* EVP wrapper for SHA256 */
19
20#include "includes.h"
21
22#include <sys/types.h>
23#include <openssl/opensslv.h>
24
25#if !defined(HAVE_EVP_SHA256) && (OPENSSL_VERSION_NUMBER >= 0x00907000L)
26
27#include <string.h>
28#include <openssl/evp.h>
29#ifdef HAVE_SHA256_UPDATE
30# ifdef HAVE_SHA2_H
31# include <sha2.h>
32# elif defined(HAVE_CRYPTO_SHA2_H)
33# include <crypto/sha2.h>
34# endif
35#endif
36
37const EVP_MD *evp_ssh_sha256(void);
38
39static int
40ssh_sha256_init(EVP_MD_CTX *ctxt)
41{
42 SHA256_Init(ctxt->md_data);
43 return (1);
44}
45
46static int
47ssh_sha256_update(EVP_MD_CTX *ctxt, const void *data, unsigned long len)
48{
49 SHA256_Update(ctxt->md_data, data, len);
50 return (1);
51}
52
53static int
54ssh_sha256_final(EVP_MD_CTX *ctxt, unsigned char *digest)
55{
56 SHA256_Final(digest, ctxt->md_data);
57 return (1);
58}
59
60static int
61ssh_sha256_cleanup(EVP_MD_CTX *ctxt)
62{
63 memset(ctxt->md_data, 0, sizeof(SHA256_CTX));
64 return (1);
65}
66
67const EVP_MD *
68evp_ssh_sha256(void)
69{
70 static EVP_MD ssh_sha256;
71
72 memset(&ssh_sha256, 0, sizeof(ssh_sha256));
73 ssh_sha256.type = NID_undef;
74 ssh_sha256.md_size = SHA256_DIGEST_LENGTH;
75 ssh_sha256.init = ssh_sha256_init;
76 ssh_sha256.update = ssh_sha256_update;
77 ssh_sha256.final = ssh_sha256_final;
78 ssh_sha256.cleanup = ssh_sha256_cleanup;
79 ssh_sha256.block_size = SHA256_BLOCK_LENGTH;
80 ssh_sha256.ctx_size = sizeof(SHA256_CTX);
81
82 return (&ssh_sha256);
83}
84
85#endif /* !defined(HAVE_EVP_SHA256) && (OPENSSL_VERSION_NUMBER >= 0x00907000L) */
86
diff --git a/md5crypt.c b/md5crypt.c
index 8f2523e62..22ef98933 100644
--- a/md5crypt.c
+++ b/md5crypt.c
@@ -11,9 +11,11 @@
11#include "includes.h" 11#include "includes.h"
12 12
13#if defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT) 13#if defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT)
14#include <openssl/md5.h> 14#include <sys/types.h>
15
16#include <string.h>
15 17
16RCSID("$Id: md5crypt.c,v 1.9 2003/11/21 12:56:47 djm Exp $"); 18#include <openssl/md5.h>
17 19
18/* 0 ... 63 => ascii - 64 */ 20/* 0 ... 63 => ascii - 64 */
19static unsigned char itoa64[] = 21static unsigned char itoa64[] =
diff --git a/misc.c b/misc.c
index 29e928886..625a34368 100644
--- a/misc.c
+++ b/misc.c
@@ -1,6 +1,7 @@
1/* $OpenBSD: misc.c,v 1.65 2006/11/23 01:35:11 ray Exp $ */
1/* 2/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 * Copyright (c) 2005 Damien Miller. All rights reserved. 4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved.
4 * 5 *
5 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
@@ -24,15 +25,35 @@
24 */ 25 */
25 26
26#include "includes.h" 27#include "includes.h"
27RCSID("$OpenBSD: misc.c,v 1.42 2006/01/31 10:19:02 djm Exp $");
28 28
29#include <sys/types.h>
30#include <sys/ioctl.h>
31#include <sys/socket.h>
32#include <sys/param.h>
33
34#include <stdarg.h>
35#include <stdio.h>
36#include <stdlib.h>
37#include <string.h>
38#include <unistd.h>
39
40#include <netinet/in.h>
41#include <netinet/tcp.h>
42
43#include <errno.h>
44#include <fcntl.h>
45#ifdef HAVE_PATHS_H
46# include <paths.h>
47#include <pwd.h>
48#endif
29#ifdef SSH_TUN_OPENBSD 49#ifdef SSH_TUN_OPENBSD
30#include <net/if.h> 50#include <net/if.h>
31#endif 51#endif
32 52
53#include "xmalloc.h"
33#include "misc.h" 54#include "misc.h"
34#include "log.h" 55#include "log.h"
35#include "xmalloc.h" 56#include "ssh.h"
36 57
37/* remove newline at end of string */ 58/* remove newline at end of string */
38char * 59char *
@@ -123,6 +144,7 @@ set_nodelay(int fd)
123 144
124/* Characters considered whitespace in strsep calls. */ 145/* Characters considered whitespace in strsep calls. */
125#define WHITESPACE " \t\r\n" 146#define WHITESPACE " \t\r\n"
147#define QUOTE "\""
126 148
127/* return next token in configuration line */ 149/* return next token in configuration line */
128char * 150char *
@@ -136,15 +158,27 @@ strdelim(char **s)
136 158
137 old = *s; 159 old = *s;
138 160
139 *s = strpbrk(*s, WHITESPACE "="); 161 *s = strpbrk(*s, WHITESPACE QUOTE "=");
140 if (*s == NULL) 162 if (*s == NULL)
141 return (old); 163 return (old);
142 164
165 if (*s[0] == '\"') {
166 memmove(*s, *s + 1, strlen(*s)); /* move nul too */
167 /* Find matching quote */
168 if ((*s = strpbrk(*s, QUOTE)) == NULL) {
169 return (NULL); /* no matching quote */
170 } else {
171 *s[0] = '\0';
172 return (old);
173 }
174 }
175
143 /* Allow only one '=' to be skipped */ 176 /* Allow only one '=' to be skipped */
144 if (*s[0] == '=') 177 if (*s[0] == '=')
145 wspace = 1; 178 wspace = 1;
146 *s[0] = '\0'; 179 *s[0] = '\0';
147 180
181 /* Skip any extra whitespace after first token */
148 *s += strspn(*s + 1, WHITESPACE) + 1; 182 *s += strspn(*s + 1, WHITESPACE) + 1;
149 if (*s[0] == '=' && !wspace) 183 if (*s[0] == '=' && !wspace)
150 *s += strspn(*s + 1, WHITESPACE) + 1; 184 *s += strspn(*s + 1, WHITESPACE) + 1;
@@ -155,9 +189,8 @@ strdelim(char **s)
155struct passwd * 189struct passwd *
156pwcopy(struct passwd *pw) 190pwcopy(struct passwd *pw)
157{ 191{
158 struct passwd *copy = xmalloc(sizeof(*copy)); 192 struct passwd *copy = xcalloc(1, sizeof(*copy));
159 193
160 memset(copy, 0, sizeof(*copy));
161 copy->pw_name = xstrdup(pw->pw_name); 194 copy->pw_name = xstrdup(pw->pw_name);
162 copy->pw_passwd = xstrdup(pw->pw_passwd); 195 copy->pw_passwd = xstrdup(pw->pw_passwd);
163 copy->pw_gecos = xstrdup(pw->pw_gecos); 196 copy->pw_gecos = xstrdup(pw->pw_gecos);
@@ -280,6 +313,7 @@ convtime(const char *s)
280 switch (*endp++) { 313 switch (*endp++) {
281 case '\0': 314 case '\0':
282 endp--; 315 endp--;
316 break;
283 case 's': 317 case 's':
284 case 'S': 318 case 'S':
285 break; 319 break;
@@ -312,6 +346,23 @@ convtime(const char *s)
312} 346}
313 347
314/* 348/*
349 * Returns a standardized host+port identifier string.
350 * Caller must free returned string.
351 */
352char *
353put_host_port(const char *host, u_short port)
354{
355 char *hoststr;
356
357 if (port == 0 || port == SSH_DEFAULT_PORT)
358 return(xstrdup(host));
359 if (asprintf(&hoststr, "[%s]:%d", host, (int)port) < 0)
360 fatal("put_host_port: asprintf: %s", strerror(errno));
361 debug3("put_host_port: %s", hoststr);
362 return hoststr;
363}
364
365/*
315 * Search for next delimiter between hostnames/addresses and ports. 366 * Search for next delimiter between hostnames/addresses and ports.
316 * Argument may be modified (for termination). 367 * Argument may be modified (for termination).
317 * Returns *cp if parsing succeeds. 368 * Returns *cp if parsing succeeds.
@@ -408,7 +459,7 @@ addargs(arglist *args, char *fmt, ...)
408 } else if (args->num+2 >= nalloc) 459 } else if (args->num+2 >= nalloc)
409 nalloc *= 2; 460 nalloc *= 2;
410 461
411 args->list = xrealloc(args->list, nalloc * sizeof(char *)); 462 args->list = xrealloc(args->list, nalloc, sizeof(char *));
412 args->nalloc = nalloc; 463 args->nalloc = nalloc;
413 args->list[args->num++] = cp; 464 args->list[args->num++] = cp;
414 args->list[args->num] = NULL; 465 args->list[args->num] = NULL;
@@ -565,6 +616,8 @@ read_keyfile_line(FILE *f, const char *filename, char *buf, size_t bufsz,
565 u_long *lineno) 616 u_long *lineno)
566{ 617{
567 while (fgets(buf, bufsz, f) != NULL) { 618 while (fgets(buf, bufsz, f) != NULL) {
619 if (buf[0] == '\0')
620 continue;
568 (*lineno)++; 621 (*lineno)++;
569 if (buf[strlen(buf) - 1] == '\n' || feof(f)) { 622 if (buf[strlen(buf) - 1] == '\n' || feof(f)) {
570 return 0; 623 return 0;
@@ -673,18 +726,100 @@ sanitise_stdfd(void)
673} 726}
674 727
675char * 728char *
676tohex(const u_char *d, u_int l) 729tohex(const void *vp, size_t l)
677{ 730{
731 const u_char *p = (const u_char *)vp;
678 char b[3], *r; 732 char b[3], *r;
679 u_int i, hl; 733 size_t i, hl;
734
735 if (l > 65536)
736 return xstrdup("tohex: length > 65536");
680 737
681 hl = l * 2 + 1; 738 hl = l * 2 + 1;
682 r = xmalloc(hl); 739 r = xcalloc(1, hl);
683 *r = '\0';
684 for (i = 0; i < l; i++) { 740 for (i = 0; i < l; i++) {
685 snprintf(b, sizeof(b), "%02x", d[i]); 741 snprintf(b, sizeof(b), "%02x", p[i]);
686 strlcat(r, b, hl); 742 strlcat(r, b, hl);
687 } 743 }
688 return (r); 744 return (r);
689} 745}
690 746
747u_int64_t
748get_u64(const void *vp)
749{
750 const u_char *p = (const u_char *)vp;
751 u_int64_t v;
752
753 v = (u_int64_t)p[0] << 56;
754 v |= (u_int64_t)p[1] << 48;
755 v |= (u_int64_t)p[2] << 40;
756 v |= (u_int64_t)p[3] << 32;
757 v |= (u_int64_t)p[4] << 24;
758 v |= (u_int64_t)p[5] << 16;
759 v |= (u_int64_t)p[6] << 8;
760 v |= (u_int64_t)p[7];
761
762 return (v);
763}
764
765u_int32_t
766get_u32(const void *vp)
767{
768 const u_char *p = (const u_char *)vp;
769 u_int32_t v;
770
771 v = (u_int32_t)p[0] << 24;
772 v |= (u_int32_t)p[1] << 16;
773 v |= (u_int32_t)p[2] << 8;
774 v |= (u_int32_t)p[3];
775
776 return (v);
777}
778
779u_int16_t
780get_u16(const void *vp)
781{
782 const u_char *p = (const u_char *)vp;
783 u_int16_t v;
784
785 v = (u_int16_t)p[0] << 8;
786 v |= (u_int16_t)p[1];
787
788 return (v);
789}
790
791void
792put_u64(void *vp, u_int64_t v)
793{
794 u_char *p = (u_char *)vp;
795
796 p[0] = (u_char)(v >> 56) & 0xff;
797 p[1] = (u_char)(v >> 48) & 0xff;
798 p[2] = (u_char)(v >> 40) & 0xff;
799 p[3] = (u_char)(v >> 32) & 0xff;
800 p[4] = (u_char)(v >> 24) & 0xff;
801 p[5] = (u_char)(v >> 16) & 0xff;
802 p[6] = (u_char)(v >> 8) & 0xff;
803 p[7] = (u_char)v & 0xff;
804}
805
806void
807put_u32(void *vp, u_int32_t v)
808{
809 u_char *p = (u_char *)vp;
810
811 p[0] = (u_char)(v >> 24) & 0xff;
812 p[1] = (u_char)(v >> 16) & 0xff;
813 p[2] = (u_char)(v >> 8) & 0xff;
814 p[3] = (u_char)v & 0xff;
815}
816
817
818void
819put_u16(void *vp, u_int16_t v)
820{
821 u_char *p = (u_char *)vp;
822
823 p[0] = (u_char)(v >> 8) & 0xff;
824 p[1] = (u_char)v & 0xff;
825}
diff --git a/misc.h b/misc.h
index 0a1a09a68..f175b4426 100644
--- a/misc.h
+++ b/misc.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: misc.h,v 1.29 2006/01/31 10:19:02 djm Exp $ */ 1/* $OpenBSD: misc.h,v 1.36 2006/08/18 10:27:16 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -12,6 +12,9 @@
12 * called by a name other than "ssh" or "Secure Shell". 12 * called by a name other than "ssh" or "Secure Shell".
13 */ 13 */
14 14
15#ifndef _MISC_H
16#define _MISC_H
17
15/* misc.c */ 18/* misc.c */
16 19
17char *chop(char *); 20char *chop(char *);
@@ -21,13 +24,14 @@ int unset_nonblock(int);
21void set_nodelay(int); 24void set_nodelay(int);
22int a2port(const char *); 25int a2port(const char *);
23int a2tun(const char *, int *); 26int a2tun(const char *, int *);
27char *put_host_port(const char *, u_short);
24char *hpdelim(char **); 28char *hpdelim(char **);
25char *cleanhostname(char *); 29char *cleanhostname(char *);
26char *colon(char *); 30char *colon(char *);
27long convtime(const char *); 31long convtime(const char *);
28char *tilde_expand_filename(const char *, uid_t); 32char *tilde_expand_filename(const char *, uid_t);
29char *percent_expand(const char *, ...) __attribute__((__sentinel__)); 33char *percent_expand(const char *, ...) __attribute__((__sentinel__));
30char *tohex(const u_char *, u_int); 34char *tohex(const void *, size_t);
31void sanitise_stdfd(void); 35void sanitise_stdfd(void);
32 36
33struct passwd *pwcopy(struct passwd *); 37struct passwd *pwcopy(struct passwd *);
@@ -44,17 +48,6 @@ void replacearg(arglist *, u_int, char *, ...)
44 __attribute__((format(printf, 3, 4))); 48 __attribute__((format(printf, 3, 4)));
45void freeargs(arglist *); 49void freeargs(arglist *);
46 50
47/* readpass.c */
48
49#define RP_ECHO 0x0001
50#define RP_ALLOW_STDIN 0x0002
51#define RP_ALLOW_EOF 0x0004
52#define RP_USE_ASKPASS 0x0008
53
54char *read_passphrase(const char *, int);
55int ask_permission(const char *, ...) __attribute__((format(printf, 1, 2)));
56int read_keyfile_line(FILE *, const char *, char *, size_t, u_long *);
57
58int tun_open(int, int); 51int tun_open(int, int);
59 52
60/* Common definitions for ssh tunnel device forwarding */ 53/* Common definitions for ssh tunnel device forwarding */
@@ -67,3 +60,31 @@ int tun_open(int, int);
67#define SSH_TUNID_ANY 0x7fffffff 60#define SSH_TUNID_ANY 0x7fffffff
68#define SSH_TUNID_ERR (SSH_TUNID_ANY - 1) 61#define SSH_TUNID_ERR (SSH_TUNID_ANY - 1)
69#define SSH_TUNID_MAX (SSH_TUNID_ANY - 2) 62#define SSH_TUNID_MAX (SSH_TUNID_ANY - 2)
63
64/* Functions to extract or store big-endian words of various sizes */
65u_int64_t get_u64(const void *)
66 __attribute__((__bounded__( __minbytes__, 1, 8)));
67u_int32_t get_u32(const void *)
68 __attribute__((__bounded__( __minbytes__, 1, 4)));
69u_int16_t get_u16(const void *)
70 __attribute__((__bounded__( __minbytes__, 1, 2)));
71void put_u64(void *, u_int64_t)
72 __attribute__((__bounded__( __minbytes__, 1, 8)));
73void put_u32(void *, u_int32_t)
74 __attribute__((__bounded__( __minbytes__, 1, 4)));
75void put_u16(void *, u_int16_t)
76 __attribute__((__bounded__( __minbytes__, 1, 2)));
77
78
79/* readpass.c */
80
81#define RP_ECHO 0x0001
82#define RP_ALLOW_STDIN 0x0002
83#define RP_ALLOW_EOF 0x0004
84#define RP_USE_ASKPASS 0x0008
85
86char *read_passphrase(const char *, int);
87int ask_permission(const char *, ...) __attribute__((format(printf, 1, 2)));
88int read_keyfile_line(FILE *, const char *, char *, size_t, u_long *);
89
90#endif /* _MISC_H */
diff --git a/moduli.c b/moduli.c
index d53806ea6..8fa545daf 100644
--- a/moduli.c
+++ b/moduli.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: moduli.c,v 1.12 2005/07/17 07:17:55 djm Exp $ */ 1/* $OpenBSD: moduli.c,v 1.20 2007/02/24 03:30:11 ray Exp $ */
2/* 2/*
3 * Copyright 1994 Phil Karn <karn@qualcomm.com> 3 * Copyright 1994 Phil Karn <karn@qualcomm.com>
4 * Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com> 4 * Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com>
@@ -38,11 +38,20 @@
38 */ 38 */
39 39
40#include "includes.h" 40#include "includes.h"
41#include "xmalloc.h" 41
42#include "log.h" 42#include <sys/types.h>
43 43
44#include <openssl/bn.h> 44#include <openssl/bn.h>
45 45
46#include <stdio.h>
47#include <stdlib.h>
48#include <string.h>
49#include <stdarg.h>
50#include <time.h>
51
52#include "xmalloc.h"
53#include "log.h"
54
46/* 55/*
47 * File output defines 56 * File output defines
48 */ 57 */
@@ -301,21 +310,10 @@ gen_candidates(FILE *out, u_int32_t memory, u_int32_t power, BIGNUM *start)
301 largewords = (largememory << SHIFT_MEGAWORD); 310 largewords = (largememory << SHIFT_MEGAWORD);
302 } 311 }
303 312
304 TinySieve = calloc(tinywords, sizeof(u_int32_t)); 313 TinySieve = xcalloc(tinywords, sizeof(u_int32_t));
305 if (TinySieve == NULL) {
306 error("Insufficient memory for tiny sieve: need %u bytes",
307 tinywords << SHIFT_BYTE);
308 exit(1);
309 }
310 tinybits = tinywords << SHIFT_WORD; 314 tinybits = tinywords << SHIFT_WORD;
311 315
312 SmallSieve = calloc(smallwords, sizeof(u_int32_t)); 316 SmallSieve = xcalloc(smallwords, sizeof(u_int32_t));
313 if (SmallSieve == NULL) {
314 error("Insufficient memory for small sieve: need %u bytes",
315 smallwords << SHIFT_BYTE);
316 xfree(TinySieve);
317 exit(1);
318 }
319 smallbits = smallwords << SHIFT_WORD; 317 smallbits = smallwords << SHIFT_WORD;
320 318
321 /* 319 /*
@@ -329,20 +327,26 @@ gen_candidates(FILE *out, u_int32_t memory, u_int32_t power, BIGNUM *start)
329 327
330 /* validation check: count the number of primes tried */ 328 /* validation check: count the number of primes tried */
331 largetries = 0; 329 largetries = 0;
332 q = BN_new(); 330 if ((q = BN_new()) == NULL)
331 fatal("BN_new failed");
333 332
334 /* 333 /*
335 * Generate random starting point for subprime search, or use 334 * Generate random starting point for subprime search, or use
336 * specified parameter. 335 * specified parameter.
337 */ 336 */
338 largebase = BN_new(); 337 if ((largebase = BN_new()) == NULL)
339 if (start == NULL) 338 fatal("BN_new failed");
340 BN_rand(largebase, power, 1, 1); 339 if (start == NULL) {
341 else 340 if (BN_rand(largebase, power, 1, 1) == 0)
342 BN_copy(largebase, start); 341 fatal("BN_rand failed");
342 } else {
343 if (BN_copy(largebase, start) == NULL)
344 fatal("BN_copy: failed");
345 }
343 346
344 /* ensure odd */ 347 /* ensure odd */
345 BN_set_bit(largebase, 0); 348 if (BN_set_bit(largebase, 0) == 0)
349 fatal("BN_set_bit: failed");
346 350
347 time(&time_start); 351 time(&time_start);
348 352
@@ -426,8 +430,10 @@ gen_candidates(FILE *out, u_int32_t memory, u_int32_t power, BIGNUM *start)
426 continue; /* Definitely composite, skip */ 430 continue; /* Definitely composite, skip */
427 431
428 debug2("test q = largebase+%u", 2 * j); 432 debug2("test q = largebase+%u", 2 * j);
429 BN_set_word(q, 2 * j); 433 if (BN_set_word(q, 2 * j) == 0)
430 BN_add(q, q, largebase); 434 fatal("BN_set_word failed");
435 if (BN_add(q, q, largebase) == 0)
436 fatal("BN_add failed");
431 if (qfileout(out, QTYPE_SOPHIE_GERMAIN, QTEST_SIEVE, 437 if (qfileout(out, QTYPE_SOPHIE_GERMAIN, QTEST_SIEVE,
432 largetries, (power - 1) /* MSB */, (0), q) == -1) { 438 largetries, (power - 1) /* MSB */, (0), q) == -1) {
433 ret = -1; 439 ret = -1;
@@ -472,20 +478,21 @@ prime_test(FILE *in, FILE *out, u_int32_t trials, u_int32_t generator_wanted)
472 478
473 time(&time_start); 479 time(&time_start);
474 480
475 p = BN_new(); 481 if ((p = BN_new()) == NULL)
476 q = BN_new(); 482 fatal("BN_new failed");
477 ctx = BN_CTX_new(); 483 if ((q = BN_new()) == NULL)
484 fatal("BN_new failed");
485 if ((ctx = BN_CTX_new()) == NULL)
486 fatal("BN_CTX_new failed");
478 487
479 debug2("%.24s Final %u Miller-Rabin trials (%x generator)", 488 debug2("%.24s Final %u Miller-Rabin trials (%x generator)",
480 ctime(&time_start), trials, generator_wanted); 489 ctime(&time_start), trials, generator_wanted);
481 490
482 res = 0; 491 res = 0;
483 lp = xmalloc(QLINESIZE + 1); 492 lp = xmalloc(QLINESIZE + 1);
484 while (fgets(lp, QLINESIZE, in) != NULL) { 493 while (fgets(lp, QLINESIZE + 1, in) != NULL) {
485 int ll = strlen(lp);
486
487 count_in++; 494 count_in++;
488 if (ll < 14 || *lp == '!' || *lp == '#') { 495 if (strlen(lp) < 14 || *lp == '!' || *lp == '#') {
489 debug2("%10u: comment or short line", count_in); 496 debug2("%10u: comment or short line", count_in);
490 continue; 497 continue;
491 } 498 }
@@ -522,10 +529,13 @@ prime_test(FILE *in, FILE *out, u_int32_t trials, u_int32_t generator_wanted)
522 case QTYPE_SOPHIE_GERMAIN: 529 case QTYPE_SOPHIE_GERMAIN:
523 debug2("%10u: (%u) Sophie-Germain", count_in, in_type); 530 debug2("%10u: (%u) Sophie-Germain", count_in, in_type);
524 a = q; 531 a = q;
525 BN_hex2bn(&a, cp); 532 if (BN_hex2bn(&a, cp) == 0)
533 fatal("BN_hex2bn failed");
526 /* p = 2*q + 1 */ 534 /* p = 2*q + 1 */
527 BN_lshift(p, q, 1); 535 if (BN_lshift(p, q, 1) == 0)
528 BN_add_word(p, 1); 536 fatal("BN_lshift failed");
537 if (BN_add_word(p, 1) == 0)
538 fatal("BN_add_word failed");
529 in_size += 1; 539 in_size += 1;
530 generator_known = 0; 540 generator_known = 0;
531 break; 541 break;
@@ -536,9 +546,11 @@ prime_test(FILE *in, FILE *out, u_int32_t trials, u_int32_t generator_wanted)
536 case QTYPE_UNKNOWN: 546 case QTYPE_UNKNOWN:
537 debug2("%10u: (%u)", count_in, in_type); 547 debug2("%10u: (%u)", count_in, in_type);
538 a = p; 548 a = p;
539 BN_hex2bn(&a, cp); 549 if (BN_hex2bn(&a, cp) == 0)
550 fatal("BN_hex2bn failed");
540 /* q = (p-1) / 2 */ 551 /* q = (p-1) / 2 */
541 BN_rshift(q, p, 1); 552 if (BN_rshift(q, p, 1) == 0)
553 fatal("BN_rshift failed");
542 break; 554 break;
543 default: 555 default:
544 debug2("Unknown prime type"); 556 debug2("Unknown prime type");
diff --git a/monitor.c b/monitor.c
index 57d2c376c..c2ba04ff1 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: monitor.c,v 1.90 2007/02/19 10:45:58 dtucker Exp $ */
1/* 2/*
2 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
3 * Copyright 2002 Markus Friedl <markus@openbsd.org> 4 * Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -25,16 +26,38 @@
25 */ 26 */
26 27
27#include "includes.h" 28#include "includes.h"
28RCSID("$OpenBSD: monitor.c,v 1.64 2005/10/13 22:24:31 stevesk Exp $");
29 29
30#include <openssl/dh.h> 30#include <sys/types.h>
31#include <sys/param.h>
32#include <sys/socket.h>
33#include "openbsd-compat/sys-tree.h"
34#include <sys/wait.h>
35
36#include <errno.h>
37#include <fcntl.h>
38#ifdef HAVE_PATHS_H
39#include <paths.h>
40#endif
41#include <pwd.h>
42#include <signal.h>
43#include <stdarg.h>
44#include <stdlib.h>
45#include <string.h>
46#include <unistd.h>
31 47
32#ifdef SKEY 48#ifdef SKEY
33#include <skey.h> 49#include <skey.h>
34#endif 50#endif
35 51
52#include <openssl/dh.h>
53
54#include "xmalloc.h"
36#include "ssh.h" 55#include "ssh.h"
56#include "key.h"
57#include "buffer.h"
58#include "hostfile.h"
37#include "auth.h" 59#include "auth.h"
60#include "cipher.h"
38#include "kex.h" 61#include "kex.h"
39#include "dh.h" 62#include "dh.h"
40#ifdef TARGET_OS_MAC /* XXX Broken krb5 headers on Mac */ 63#ifdef TARGET_OS_MAC /* XXX Broken krb5 headers on Mac */
@@ -55,17 +78,16 @@ RCSID("$OpenBSD: monitor.c,v 1.64 2005/10/13 22:24:31 stevesk Exp $");
55#include "servconf.h" 78#include "servconf.h"
56#include "monitor.h" 79#include "monitor.h"
57#include "monitor_mm.h" 80#include "monitor_mm.h"
81#ifdef GSSAPI
82#include "ssh-gss.h"
83#endif
58#include "monitor_wrap.h" 84#include "monitor_wrap.h"
59#include "monitor_fdpass.h" 85#include "monitor_fdpass.h"
60#include "xmalloc.h"
61#include "misc.h" 86#include "misc.h"
62#include "buffer.h"
63#include "bufaux.h"
64#include "compat.h" 87#include "compat.h"
65#include "ssh2.h" 88#include "ssh2.h"
66 89
67#ifdef GSSAPI 90#ifdef GSSAPI
68#include "ssh-gss.h"
69static Gssctxt *gsscontext = NULL; 91static Gssctxt *gsscontext = NULL;
70#endif 92#endif
71 93
@@ -172,6 +194,7 @@ struct mon_table {
172#define MON_ISAUTH 0x0004 /* Required for Authentication */ 194#define MON_ISAUTH 0x0004 /* Required for Authentication */
173#define MON_AUTHDECIDE 0x0008 /* Decides Authentication */ 195#define MON_AUTHDECIDE 0x0008 /* Decides Authentication */
174#define MON_ONCE 0x0010 /* Disable after calling */ 196#define MON_ONCE 0x0010 /* Disable after calling */
197#define MON_ALOG 0x0020 /* Log auth attempt without authenticating */
175 198
176#define MON_AUTH (MON_ISAUTH|MON_AUTHDECIDE) 199#define MON_AUTH (MON_ISAUTH|MON_AUTHDECIDE)
177 200
@@ -197,7 +220,7 @@ struct mon_table mon_dispatch_proto20[] = {
197#endif 220#endif
198#ifdef BSD_AUTH 221#ifdef BSD_AUTH
199 {MONITOR_REQ_BSDAUTHQUERY, MON_ISAUTH, mm_answer_bsdauthquery}, 222 {MONITOR_REQ_BSDAUTHQUERY, MON_ISAUTH, mm_answer_bsdauthquery},
200 {MONITOR_REQ_BSDAUTHRESPOND, MON_AUTH,mm_answer_bsdauthrespond}, 223 {MONITOR_REQ_BSDAUTHRESPOND, MON_AUTH, mm_answer_bsdauthrespond},
201#endif 224#endif
202#ifdef SKEY 225#ifdef SKEY
203 {MONITOR_REQ_SKEYQUERY, MON_ISAUTH, mm_answer_skeyquery}, 226 {MONITOR_REQ_SKEYQUERY, MON_ISAUTH, mm_answer_skeyquery},
@@ -238,13 +261,13 @@ struct mon_table mon_dispatch_proto15[] = {
238 {MONITOR_REQ_SESSKEY, MON_ONCE, mm_answer_sesskey}, 261 {MONITOR_REQ_SESSKEY, MON_ONCE, mm_answer_sesskey},
239 {MONITOR_REQ_SESSID, MON_ONCE, mm_answer_sessid}, 262 {MONITOR_REQ_SESSID, MON_ONCE, mm_answer_sessid},
240 {MONITOR_REQ_AUTHPASSWORD, MON_AUTH, mm_answer_authpassword}, 263 {MONITOR_REQ_AUTHPASSWORD, MON_AUTH, mm_answer_authpassword},
241 {MONITOR_REQ_RSAKEYALLOWED, MON_ISAUTH, mm_answer_rsa_keyallowed}, 264 {MONITOR_REQ_RSAKEYALLOWED, MON_ISAUTH|MON_ALOG, mm_answer_rsa_keyallowed},
242 {MONITOR_REQ_KEYALLOWED, MON_ISAUTH, mm_answer_keyallowed}, 265 {MONITOR_REQ_KEYALLOWED, MON_ISAUTH|MON_ALOG, mm_answer_keyallowed},
243 {MONITOR_REQ_RSACHALLENGE, MON_ONCE, mm_answer_rsa_challenge}, 266 {MONITOR_REQ_RSACHALLENGE, MON_ONCE, mm_answer_rsa_challenge},
244 {MONITOR_REQ_RSARESPONSE, MON_ONCE|MON_AUTHDECIDE, mm_answer_rsa_response}, 267 {MONITOR_REQ_RSARESPONSE, MON_ONCE|MON_AUTHDECIDE, mm_answer_rsa_response},
245#ifdef BSD_AUTH 268#ifdef BSD_AUTH
246 {MONITOR_REQ_BSDAUTHQUERY, MON_ISAUTH, mm_answer_bsdauthquery}, 269 {MONITOR_REQ_BSDAUTHQUERY, MON_ISAUTH, mm_answer_bsdauthquery},
247 {MONITOR_REQ_BSDAUTHRESPOND, MON_AUTH,mm_answer_bsdauthrespond}, 270 {MONITOR_REQ_BSDAUTHRESPOND, MON_AUTH, mm_answer_bsdauthrespond},
248#endif 271#endif
249#ifdef SKEY 272#ifdef SKEY
250 {MONITOR_REQ_SKEYQUERY, MON_ISAUTH, mm_answer_skeyquery}, 273 {MONITOR_REQ_SKEYQUERY, MON_ISAUTH, mm_answer_skeyquery},
@@ -270,7 +293,7 @@ struct mon_table mon_dispatch_postauth15[] = {
270 {MONITOR_REQ_TERM, 0, mm_answer_term}, 293 {MONITOR_REQ_TERM, 0, mm_answer_term},
271#ifdef SSH_AUDIT_EVENTS 294#ifdef SSH_AUDIT_EVENTS
272 {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event}, 295 {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event},
273 {MONITOR_REQ_AUDIT_COMMAND, MON_ONCE, mm_answer_audit_command}, 296 {MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT|MON_ONCE, mm_answer_audit_command},
274#endif 297#endif
275 {0, 0, NULL} 298 {0, 0, NULL}
276}; 299};
@@ -337,7 +360,8 @@ monitor_child_preauth(Authctxt *_authctxt, struct monitor *pmonitor)
337 360
338 /* The first few requests do not require asynchronous access */ 361 /* The first few requests do not require asynchronous access */
339 while (!authenticated) { 362 while (!authenticated) {
340 authenticated = monitor_read(pmonitor, mon_dispatch, &ent); 363 auth_method = "unknown";
364 authenticated = (monitor_read(pmonitor, mon_dispatch, &ent) == 1);
341 if (authenticated) { 365 if (authenticated) {
342 if (!(ent->flags & MON_AUTHDECIDE)) 366 if (!(ent->flags & MON_AUTHDECIDE))
343 fatal("%s: unexpected authentication from %d", 367 fatal("%s: unexpected authentication from %d",
@@ -359,7 +383,7 @@ monitor_child_preauth(Authctxt *_authctxt, struct monitor *pmonitor)
359#endif 383#endif
360 } 384 }
361 385
362 if (ent->flags & MON_AUTHDECIDE) { 386 if (ent->flags & (MON_AUTHDECIDE|MON_ALOG)) {
363 auth_log(authctxt, authenticated, auth_method, 387 auth_log(authctxt, authenticated, auth_method,
364 compat20 ? " ssh2" : ""); 388 compat20 ? " ssh2" : "");
365 if (!authenticated) 389 if (!authenticated)
@@ -369,6 +393,8 @@ monitor_child_preauth(Authctxt *_authctxt, struct monitor *pmonitor)
369 393
370 if (!authctxt->valid) 394 if (!authctxt->valid)
371 fatal("%s: authenticated invalid user", __func__); 395 fatal("%s: authenticated invalid user", __func__);
396 if (strcmp(auth_method, "unknown") == 0)
397 fatal("%s: authentication method name unknown", __func__);
372 398
373 debug("%s: %s has been authenticated by privileged process", 399 debug("%s: %s has been authenticated by privileged process",
374 __func__, authctxt->user); 400 __func__, authctxt->user);
@@ -552,7 +578,11 @@ mm_answer_sign(int sock, Buffer *m)
552 keyid = buffer_get_int(m); 578 keyid = buffer_get_int(m);
553 p = buffer_get_string(m, &datlen); 579 p = buffer_get_string(m, &datlen);
554 580
555 if (datlen != 20) 581 /*
582 * Supported KEX types will only return SHA1 (20 byte) or
583 * SHA256 (32 byte) hashes
584 */
585 if (datlen != 20 && datlen != 32)
556 fatal("%s: data length incorrect: %u", __func__, datlen); 586 fatal("%s: data length incorrect: %u", __func__, datlen);
557 587
558 /* save session id, it will be passed on the first call */ 588 /* save session id, it will be passed on the first call */
@@ -627,6 +657,9 @@ mm_answer_pwnamallow(int sock, Buffer *m)
627#endif 657#endif
628 buffer_put_cstring(m, pwent->pw_dir); 658 buffer_put_cstring(m, pwent->pw_dir);
629 buffer_put_cstring(m, pwent->pw_shell); 659 buffer_put_cstring(m, pwent->pw_shell);
660 buffer_put_string(m, &options, sizeof(options));
661 if (options.banner != NULL)
662 buffer_put_cstring(m, options.banner);
630 663
631 out: 664 out:
632 debug3("%s: sending MONITOR_ANS_PWNAM: %d", __func__, allowed); 665 debug3("%s: sending MONITOR_ANS_PWNAM: %d", __func__, allowed);
@@ -645,9 +678,6 @@ mm_answer_pwnamallow(int sock, Buffer *m)
645 if (options.use_pam) 678 if (options.use_pam)
646 monitor_permit(mon_dispatch, MONITOR_REQ_PAM_START, 1); 679 monitor_permit(mon_dispatch, MONITOR_REQ_PAM_START, 1);
647#endif 680#endif
648#ifdef SSH_AUDIT_EVENTS
649 monitor_permit(mon_dispatch, MONITOR_REQ_AUDIT_COMMAND, 1);
650#endif
651 681
652 return (0); 682 return (0);
653} 683}
@@ -908,6 +938,7 @@ mm_answer_pam_query(int sock, Buffer *m)
908 xfree(prompts); 938 xfree(prompts);
909 if (echo_on != NULL) 939 if (echo_on != NULL)
910 xfree(echo_on); 940 xfree(echo_on);
941 auth_method = "keyboard-interactive/pam";
911 mm_request_send(sock, MONITOR_ANS_PAM_QUERY, m); 942 mm_request_send(sock, MONITOR_ANS_PAM_QUERY, m);
912 return (0); 943 return (0);
913} 944}
@@ -923,7 +954,7 @@ mm_answer_pam_respond(int sock, Buffer *m)
923 sshpam_authok = NULL; 954 sshpam_authok = NULL;
924 num = buffer_get_int(m); 955 num = buffer_get_int(m);
925 if (num > 0) { 956 if (num > 0) {
926 resp = xmalloc(num * sizeof(char *)); 957 resp = xcalloc(num, sizeof(char *));
927 for (i = 0; i < num; ++i) 958 for (i = 0; i < num; ++i)
928 resp[i] = buffer_get_string(m, NULL); 959 resp[i] = buffer_get_string(m, NULL);
929 ret = (sshpam_device.respond)(sshpam_ctxt, num, resp); 960 ret = (sshpam_device.respond)(sshpam_ctxt, num, resp);
@@ -950,6 +981,7 @@ mm_answer_pam_free_ctx(int sock, Buffer *m)
950 (sshpam_device.free_ctx)(sshpam_ctxt); 981 (sshpam_device.free_ctx)(sshpam_ctxt);
951 buffer_clear(m); 982 buffer_clear(m);
952 mm_request_send(sock, MONITOR_ANS_PAM_FREE_CTX, m); 983 mm_request_send(sock, MONITOR_ANS_PAM_FREE_CTX, m);
984 auth_method = "keyboard-interactive/pam";
953 return (sshpam_authok == sshpam_ctxt); 985 return (sshpam_authok == sshpam_ctxt);
954} 986}
955#endif 987#endif
@@ -995,17 +1027,20 @@ mm_answer_keyallowed(int sock, Buffer *m)
995 case MM_USERKEY: 1027 case MM_USERKEY:
996 allowed = options.pubkey_authentication && 1028 allowed = options.pubkey_authentication &&
997 user_key_allowed(authctxt->pw, key); 1029 user_key_allowed(authctxt->pw, key);
1030 auth_method = "publickey";
998 break; 1031 break;
999 case MM_HOSTKEY: 1032 case MM_HOSTKEY:
1000 allowed = options.hostbased_authentication && 1033 allowed = options.hostbased_authentication &&
1001 hostbased_key_allowed(authctxt->pw, 1034 hostbased_key_allowed(authctxt->pw,
1002 cuser, chost, key); 1035 cuser, chost, key);
1036 auth_method = "hostbased";
1003 break; 1037 break;
1004 case MM_RSAHOSTKEY: 1038 case MM_RSAHOSTKEY:
1005 key->type = KEY_RSA1; /* XXX */ 1039 key->type = KEY_RSA1; /* XXX */
1006 allowed = options.rhosts_rsa_authentication && 1040 allowed = options.rhosts_rsa_authentication &&
1007 auth_rhosts_rsa_key_allowed(authctxt->pw, 1041 auth_rhosts_rsa_key_allowed(authctxt->pw,
1008 cuser, chost, key); 1042 cuser, chost, key);
1043 auth_method = "rsa";
1009 break; 1044 break;
1010 default: 1045 default:
1011 fatal("%s: unknown key type %d", __func__, type); 1046 fatal("%s: unknown key type %d", __func__, type);
@@ -1025,6 +1060,12 @@ mm_answer_keyallowed(int sock, Buffer *m)
1025 key_blobtype = type; 1060 key_blobtype = type;
1026 hostbased_cuser = cuser; 1061 hostbased_cuser = cuser;
1027 hostbased_chost = chost; 1062 hostbased_chost = chost;
1063 } else {
1064 /* Log failed attempt */
1065 auth_log(authctxt, 0, auth_method, compat20 ? " ssh2" : "");
1066 xfree(blob);
1067 xfree(cuser);
1068 xfree(chost);
1028 } 1069 }
1029 1070
1030 debug3("%s: key %p is %s", 1071 debug3("%s: key %p is %s",
@@ -1194,7 +1235,7 @@ mm_answer_keyverify(int sock, Buffer *m)
1194 1235
1195 verified = key_verify(key, signature, signaturelen, data, datalen); 1236 verified = key_verify(key, signature, signaturelen, data, datalen);
1196 debug3("%s: key %p signature %s", 1237 debug3("%s: key %p signature %s",
1197 __func__, key, verified ? "verified" : "unverified"); 1238 __func__, key, (verified == 1) ? "verified" : "unverified");
1198 1239
1199 key_free(key); 1240 key_free(key);
1200 xfree(blob); 1241 xfree(blob);
@@ -1209,7 +1250,7 @@ mm_answer_keyverify(int sock, Buffer *m)
1209 buffer_put_int(m, verified); 1250 buffer_put_int(m, verified);
1210 mm_request_send(sock, MONITOR_ANS_KEYVERIFY, m); 1251 mm_request_send(sock, MONITOR_ANS_KEYVERIFY, m);
1211 1252
1212 return (verified); 1253 return (verified == 1);
1213} 1254}
1214 1255
1215static void 1256static void
@@ -1226,7 +1267,7 @@ mm_record_login(Session *s, struct passwd *pw)
1226 fromlen = sizeof(from); 1267 fromlen = sizeof(from);
1227 if (packet_connection_is_on_socket()) { 1268 if (packet_connection_is_on_socket()) {
1228 if (getpeername(packet_get_connection_in(), 1269 if (getpeername(packet_get_connection_in(),
1229 (struct sockaddr *) & from, &fromlen) < 0) { 1270 (struct sockaddr *)&from, &fromlen) < 0) {
1230 debug("getpeername: %.100s", strerror(errno)); 1271 debug("getpeername: %.100s", strerror(errno));
1231 cleanup_exit(255); 1272 cleanup_exit(255);
1232 } 1273 }
@@ -1242,7 +1283,7 @@ mm_session_close(Session *s)
1242{ 1283{
1243 debug3("%s: session %d pid %ld", __func__, s->self, (long)s->pid); 1284 debug3("%s: session %d pid %ld", __func__, s->self, (long)s->pid);
1244 if (s->ttyfd != -1) { 1285 if (s->ttyfd != -1) {
1245 debug3("%s: tty %s ptyfd %d", __func__, s->tty, s->ptyfd); 1286 debug3("%s: tty %s ptyfd %d", __func__, s->tty, s->ptyfd);
1246 session_pty_cleanup2(s); 1287 session_pty_cleanup2(s);
1247 } 1288 }
1248 s->used = 0; 1289 s->used = 0;
@@ -1302,7 +1343,7 @@ mm_answer_pty(int sock, Buffer *m)
1302 /* no need to dup() because nobody closes ptyfd */ 1343 /* no need to dup() because nobody closes ptyfd */
1303 s->ptymaster = s->ptyfd; 1344 s->ptymaster = s->ptyfd;
1304 1345
1305 debug3("%s: tty %s ptyfd %d", __func__, s->tty, s->ttyfd); 1346 debug3("%s: tty %s ptyfd %d", __func__, s->tty, s->ttyfd);
1306 1347
1307 return (0); 1348 return (0);
1308 1349
@@ -1389,6 +1430,7 @@ mm_answer_rsa_keyallowed(int sock, Buffer *m)
1389 1430
1390 debug3("%s entering", __func__); 1431 debug3("%s entering", __func__);
1391 1432
1433 auth_method = "rsa";
1392 if (options.rsa_authentication && authctxt->valid) { 1434 if (options.rsa_authentication && authctxt->valid) {
1393 if ((client_n = BN_new()) == NULL) 1435 if ((client_n = BN_new()) == NULL)
1394 fatal("%s: BN_new", __func__); 1436 fatal("%s: BN_new", __func__);
@@ -1625,8 +1667,7 @@ mm_get_kex(Buffer *m)
1625 void *blob; 1667 void *blob;
1626 u_int bloblen; 1668 u_int bloblen;
1627 1669
1628 kex = xmalloc(sizeof(*kex)); 1670 kex = xcalloc(1, sizeof(*kex));
1629 memset(kex, 0, sizeof(*kex));
1630 kex->session_id = buffer_get_string(m, &kex->session_id_len); 1671 kex->session_id = buffer_get_string(m, &kex->session_id_len);
1631 if ((session_id2 == NULL) || 1672 if ((session_id2 == NULL) ||
1632 (kex->session_id_len != session_id2_len) || 1673 (kex->session_id_len != session_id2_len) ||
@@ -1636,8 +1677,10 @@ mm_get_kex(Buffer *m)
1636 kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server; 1677 kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server;
1637 kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server; 1678 kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server;
1638 kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; 1679 kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
1680 kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
1639#ifdef GSSAPI 1681#ifdef GSSAPI
1640 kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_server; 1682 kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_server;
1683 kex->kex[KEX_GSS_GRP14_SHA1] = kexgss_server;
1641 kex->kex[KEX_GSS_GEX_SHA1] = kexgss_server; 1684 kex->kex[KEX_GSS_GEX_SHA1] = kexgss_server;
1642#endif 1685#endif
1643 kex->server = 1; 1686 kex->server = 1;
@@ -1799,9 +1842,8 @@ monitor_init(void)
1799 struct monitor *mon; 1842 struct monitor *mon;
1800 int pair[2]; 1843 int pair[2];
1801 1844
1802 mon = xmalloc(sizeof(*mon)); 1845 mon = xcalloc(1, sizeof(*mon));
1803 1846
1804 mon->m_pid = 0;
1805 monitor_socketpair(pair); 1847 monitor_socketpair(pair);
1806 1848
1807 mon->m_recvfd = pair[0]; 1849 mon->m_recvfd = pair[0];
diff --git a/monitor.h b/monitor.h
index 7b306b4af..5bf7d01c0 100644
--- a/monitor.h
+++ b/monitor.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor.h,v 1.13 2003/11/17 11:06:07 markus Exp $ */ 1/* $OpenBSD: monitor.h,v 1.14 2006/03/25 22:22:43 djm Exp $ */
2 2
3/* 3/*
4 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 4 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
diff --git a/monitor_fdpass.c b/monitor_fdpass.c
index dd1a13984..9f8e9cd55 100644
--- a/monitor_fdpass.c
+++ b/monitor_fdpass.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: monitor_fdpass.c,v 1.12 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Copyright 2001 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2001 Niels Provos <provos@citi.umich.edu>
3 * All rights reserved. 4 * All rights reserved.
@@ -24,9 +25,17 @@
24 */ 25 */
25 26
26#include "includes.h" 27#include "includes.h"
27RCSID("$OpenBSD: monitor_fdpass.c,v 1.6 2004/08/13 02:51:48 djm Exp $");
28 28
29#include <sys/types.h>
30#include <sys/socket.h>
29#include <sys/uio.h> 31#include <sys/uio.h>
32#ifdef HAVE_SYS_UN_H
33#include <sys/un.h>
34#endif
35
36#include <errno.h>
37#include <string.h>
38#include <stdarg.h>
30 39
31#include "log.h" 40#include "log.h"
32#include "monitor_fdpass.h" 41#include "monitor_fdpass.h"
diff --git a/monitor_fdpass.h b/monitor_fdpass.h
index 31d080e21..12c67ec2d 100644
--- a/monitor_fdpass.h
+++ b/monitor_fdpass.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor_fdpass.h,v 1.2 2002/03/26 03:24:01 stevesk Exp $ */ 1/* $OpenBSD: monitor_fdpass.h,v 1.3 2006/03/25 22:22:43 djm Exp $ */
2 2
3/* 3/*
4 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 4 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
diff --git a/monitor_mm.c b/monitor_mm.c
index b0ec37cff..dab747532 100644
--- a/monitor_mm.c
+++ b/monitor_mm.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: monitor_mm.c,v 1.15 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
3 * All rights reserved. 4 * All rights reserved.
@@ -24,14 +25,20 @@
24 */ 25 */
25 26
26#include "includes.h" 27#include "includes.h"
27RCSID("$OpenBSD: monitor_mm.c,v 1.9 2004/05/11 19:01:43 deraadt Exp $");
28 28
29#include <sys/types.h>
29#ifdef HAVE_SYS_MMAN_H 30#ifdef HAVE_SYS_MMAN_H
30#include <sys/mman.h> 31#include <sys/mman.h>
31#endif 32#endif
33#include <sys/param.h>
34#include "openbsd-compat/sys-tree.h"
35
36#include <errno.h>
37#include <stdarg.h>
38#include <string.h>
32 39
33#include "ssh.h"
34#include "xmalloc.h" 40#include "xmalloc.h"
41#include "ssh.h"
35#include "log.h" 42#include "log.h"
36#include "monitor_mm.h" 43#include "monitor_mm.h"
37 44
diff --git a/monitor_mm.h b/monitor_mm.h
index a1323b9a8..36a07a06d 100644
--- a/monitor_mm.h
+++ b/monitor_mm.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor_mm.h,v 1.2 2002/03/26 03:24:01 stevesk Exp $ */ 1/* $OpenBSD: monitor_mm.h,v 1.4 2006/08/03 03:34:42 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 4 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
@@ -27,7 +27,6 @@
27 27
28#ifndef _MM_H_ 28#ifndef _MM_H_
29#define _MM_H_ 29#define _MM_H_
30#include "openbsd-compat/sys-tree.h"
31 30
32struct mm_share { 31struct mm_share {
33 RB_ENTRY(mm_share) next; 32 RB_ENTRY(mm_share) next;
diff --git a/monitor_wrap.c b/monitor_wrap.c
index c94675c6f..b0ced5ac7 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: monitor_wrap.c,v 1.55 2007/02/19 10:45:58 dtucker Exp $ */
1/* 2/*
2 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
3 * Copyright 2002 Markus Friedl <markus@openbsd.org> 4 * Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -25,18 +26,31 @@
25 */ 26 */
26 27
27#include "includes.h" 28#include "includes.h"
28RCSID("$OpenBSD: monitor_wrap.c,v 1.40 2005/05/24 17:32:43 avsm Exp $"); 29
30#include <sys/types.h>
31#include <sys/uio.h>
32
33#include <errno.h>
34#include <pwd.h>
35#include <signal.h>
36#include <stdarg.h>
37#include <stdio.h>
38#include <string.h>
39#include <unistd.h>
29 40
30#include <openssl/bn.h> 41#include <openssl/bn.h>
31#include <openssl/dh.h> 42#include <openssl/dh.h>
32 43
44#include "xmalloc.h"
33#include "ssh.h" 45#include "ssh.h"
34#include "dh.h" 46#include "dh.h"
47#include "buffer.h"
48#include "key.h"
49#include "cipher.h"
35#include "kex.h" 50#include "kex.h"
51#include "hostfile.h"
36#include "auth.h" 52#include "auth.h"
37#include "auth-options.h" 53#include "auth-options.h"
38#include "buffer.h"
39#include "bufaux.h"
40#include "packet.h" 54#include "packet.h"
41#include "mac.h" 55#include "mac.h"
42#include "log.h" 56#include "log.h"
@@ -48,20 +62,18 @@ RCSID("$OpenBSD: monitor_wrap.c,v 1.40 2005/05/24 17:32:43 avsm Exp $");
48#include "zlib.h" 62#include "zlib.h"
49#endif 63#endif
50#include "monitor.h" 64#include "monitor.h"
65#ifdef GSSAPI
66#include "ssh-gss.h"
67#endif
51#include "monitor_wrap.h" 68#include "monitor_wrap.h"
52#include "xmalloc.h"
53#include "atomicio.h" 69#include "atomicio.h"
54#include "monitor_fdpass.h" 70#include "monitor_fdpass.h"
55#include "getput.h" 71#include "misc.h"
56#include "servconf.h" 72#include "servconf.h"
57 73
58#include "auth.h"
59#include "channels.h" 74#include "channels.h"
60#include "session.h" 75#include "session.h"
61 76#include "servconf.h"
62#ifdef GSSAPI
63#include "ssh-gss.h"
64#endif
65 77
66/* Imports */ 78/* Imports */
67extern int compat20; 79extern int compat20;
@@ -91,7 +103,7 @@ mm_request_send(int sock, enum monitor_reqtype type, Buffer *m)
91 103
92 debug3("%s entering: type %d", __func__, type); 104 debug3("%s entering: type %d", __func__, type);
93 105
94 PUT_32BIT(buf, mlen + 1); 106 put_u32(buf, mlen + 1);
95 buf[4] = (u_char) type; /* 1st byte of payload is mesg-type */ 107 buf[4] = (u_char) type; /* 1st byte of payload is mesg-type */
96 if (atomicio(vwrite, sock, buf, sizeof(buf)) != sizeof(buf)) 108 if (atomicio(vwrite, sock, buf, sizeof(buf)) != sizeof(buf))
97 fatal("%s: write: %s", __func__, strerror(errno)); 109 fatal("%s: write: %s", __func__, strerror(errno));
@@ -112,7 +124,7 @@ mm_request_receive(int sock, Buffer *m)
112 cleanup_exit(255); 124 cleanup_exit(255);
113 fatal("%s: read: %s", __func__, strerror(errno)); 125 fatal("%s: read: %s", __func__, strerror(errno));
114 } 126 }
115 msg_len = GET_32BIT(buf); 127 msg_len = get_u32(buf);
116 if (msg_len > 256 * 1024) 128 if (msg_len > 256 * 1024)
117 fatal("%s: read: bad msg_len %d", __func__, msg_len); 129 fatal("%s: read: bad msg_len %d", __func__, msg_len);
118 buffer_clear(m); 130 buffer_clear(m);
@@ -196,7 +208,8 @@ mm_getpwnamallow(const char *username)
196{ 208{
197 Buffer m; 209 Buffer m;
198 struct passwd *pw; 210 struct passwd *pw;
199 u_int pwlen; 211 u_int len;
212 ServerOptions *newopts;
200 213
201 debug3("%s entering", __func__); 214 debug3("%s entering", __func__);
202 215
@@ -212,8 +225,8 @@ mm_getpwnamallow(const char *username)
212 buffer_free(&m); 225 buffer_free(&m);
213 return (NULL); 226 return (NULL);
214 } 227 }
215 pw = buffer_get_string(&m, &pwlen); 228 pw = buffer_get_string(&m, &len);
216 if (pwlen != sizeof(struct passwd)) 229 if (len != sizeof(struct passwd))
217 fatal("%s: struct passwd size mismatch", __func__); 230 fatal("%s: struct passwd size mismatch", __func__);
218 pw->pw_name = buffer_get_string(&m, NULL); 231 pw->pw_name = buffer_get_string(&m, NULL);
219 pw->pw_passwd = buffer_get_string(&m, NULL); 232 pw->pw_passwd = buffer_get_string(&m, NULL);
@@ -223,6 +236,16 @@ mm_getpwnamallow(const char *username)
223#endif 236#endif
224 pw->pw_dir = buffer_get_string(&m, NULL); 237 pw->pw_dir = buffer_get_string(&m, NULL);
225 pw->pw_shell = buffer_get_string(&m, NULL); 238 pw->pw_shell = buffer_get_string(&m, NULL);
239
240 /* copy options block as a Match directive may have changed some */
241 newopts = buffer_get_string(&m, &len);
242 if (len != sizeof(*newopts))
243 fatal("%s: option block size mismatch", __func__);
244 if (newopts->banner != NULL)
245 newopts->banner = buffer_get_string(&m, NULL);
246 copy_set_server_options(&options, newopts, 1);
247 xfree(newopts);
248
226 buffer_free(&m); 249 buffer_free(&m);
227 250
228 return (pw); 251 return (pw);
@@ -637,7 +660,7 @@ mm_send_keystate(struct monitor *monitor)
637} 660}
638 661
639int 662int
640mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen) 663mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen)
641{ 664{
642 Buffer m; 665 Buffer m;
643 char *p, *msg; 666 char *p, *msg;
@@ -776,8 +799,11 @@ mm_sshpam_query(void *ctx, char **name, char **info,
776 *name = buffer_get_string(&m, NULL); 799 *name = buffer_get_string(&m, NULL);
777 *info = buffer_get_string(&m, NULL); 800 *info = buffer_get_string(&m, NULL);
778 *num = buffer_get_int(&m); 801 *num = buffer_get_int(&m);
779 *prompts = xmalloc((*num + 1) * sizeof(char *)); 802 if (*num > PAM_MAX_NUM_MSG)
780 *echo_on = xmalloc((*num + 1) * sizeof(u_int)); 803 fatal("%s: recieved %u PAM messages, expected <= %u",
804 __func__, *num, PAM_MAX_NUM_MSG);
805 *prompts = xcalloc((*num + 1), sizeof(char *));
806 *echo_on = xcalloc((*num + 1), sizeof(u_int));
781 for (i = 0; i < *num; ++i) { 807 for (i = 0; i < *num; ++i) {
782 (*prompts)[i] = buffer_get_string(&m, NULL); 808 (*prompts)[i] = buffer_get_string(&m, NULL);
783 (*echo_on)[i] = buffer_get_int(&m); 809 (*echo_on)[i] = buffer_get_int(&m);
@@ -860,8 +886,8 @@ mm_chall_setup(char **name, char **infotxt, u_int *numprompts,
860 *name = xstrdup(""); 886 *name = xstrdup("");
861 *infotxt = xstrdup(""); 887 *infotxt = xstrdup("");
862 *numprompts = 1; 888 *numprompts = 1;
863 *prompts = xmalloc(*numprompts * sizeof(char *)); 889 *prompts = xcalloc(*numprompts, sizeof(char *));
864 *echo_on = xmalloc(*numprompts * sizeof(u_int)); 890 *echo_on = xcalloc(*numprompts, sizeof(u_int));
865 (*echo_on)[0] = 0; 891 (*echo_on)[0] = 0;
866} 892}
867 893
@@ -928,9 +954,8 @@ mm_skey_query(void *ctx, char **name, char **infotxt,
928 u_int *numprompts, char ***prompts, u_int **echo_on) 954 u_int *numprompts, char ***prompts, u_int **echo_on)
929{ 955{
930 Buffer m; 956 Buffer m;
931 int len;
932 u_int success; 957 u_int success;
933 char *p, *challenge; 958 char *challenge;
934 959
935 debug3("%s: entering", __func__); 960 debug3("%s: entering", __func__);
936 961
@@ -954,11 +979,7 @@ mm_skey_query(void *ctx, char **name, char **infotxt,
954 979
955 mm_chall_setup(name, infotxt, numprompts, prompts, echo_on); 980 mm_chall_setup(name, infotxt, numprompts, prompts, echo_on);
956 981
957 len = strlen(challenge) + strlen(SKEY_PROMPT) + 1; 982 xasprintf(*prompts, "%s%s", challenge, SKEY_PROMPT);
958 p = xmalloc(len);
959 strlcpy(p, challenge, len);
960 strlcat(p, SKEY_PROMPT, len);
961 (*prompts)[0] = p;
962 xfree(challenge); 983 xfree(challenge);
963 984
964 return (0); 985 return (0);
diff --git a/monitor_wrap.h b/monitor_wrap.h
index 871eabb9d..2a7bf7c87 100644
--- a/monitor_wrap.h
+++ b/monitor_wrap.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor_wrap.h,v 1.14 2004/06/21 17:36:31 avsm Exp $ */ 1/* $OpenBSD: monitor_wrap.h,v 1.20 2006/08/03 03:34:42 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 4 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
@@ -27,8 +27,6 @@
27 27
28#ifndef _MM_WRAP_H_ 28#ifndef _MM_WRAP_H_
29#define _MM_WRAP_H_ 29#define _MM_WRAP_H_
30#include "key.h"
31#include "buffer.h"
32 30
33extern int use_privsep; 31extern int use_privsep;
34#define PRIVSEP(x) (use_privsep ? mm_##x : x) 32#define PRIVSEP(x) (use_privsep ? mm_##x : x)
@@ -37,7 +35,6 @@ enum mm_keytype {MM_NOKEY, MM_HOSTKEY, MM_USERKEY, MM_RSAHOSTKEY, MM_RSAUSERKEY}
37 35
38struct monitor; 36struct monitor;
39struct mm_master; 37struct mm_master;
40struct passwd;
41struct Authctxt; 38struct Authctxt;
42 39
43int mm_is_monitor(void); 40int mm_is_monitor(void);
@@ -57,7 +54,6 @@ int mm_auth_rsa_verify_response(Key *, BIGNUM *, u_char *);
57BIGNUM *mm_auth_rsa_generate_challenge(Key *); 54BIGNUM *mm_auth_rsa_generate_challenge(Key *);
58 55
59#ifdef GSSAPI 56#ifdef GSSAPI
60#include "ssh-gss.h"
61OM_uint32 mm_ssh_gssapi_server_ctx(Gssctxt **, gss_OID); 57OM_uint32 mm_ssh_gssapi_server_ctx(Gssctxt **, gss_OID);
62OM_uint32 mm_ssh_gssapi_accept_ctx(Gssctxt *, 58OM_uint32 mm_ssh_gssapi_accept_ctx(Gssctxt *,
63 gss_buffer_desc *, gss_buffer_desc *, OM_uint32 *); 59 gss_buffer_desc *, gss_buffer_desc *, OM_uint32 *);
@@ -83,7 +79,7 @@ void mm_audit_run_command(const char *);
83 79
84struct Session; 80struct Session;
85void mm_terminate(void); 81void mm_terminate(void);
86int mm_pty_allocate(int *, int *, char *, int); 82int mm_pty_allocate(int *, int *, char *, size_t);
87void mm_session_pty_cleanup2(struct Session *); 83void mm_session_pty_cleanup2(struct Session *);
88 84
89/* SSHv1 interfaces */ 85/* SSHv1 interfaces */
@@ -112,4 +108,4 @@ void *mm_zalloc(struct mm_master *, u_int, u_int);
112void mm_zfree(struct mm_master *, void *); 108void mm_zfree(struct mm_master *, void *);
113void mm_init_compression(struct mm_master *); 109void mm_init_compression(struct mm_master *);
114 110
115#endif /* _MM_H_ */ 111#endif /* _MM_WRAP_H_ */
diff --git a/msg.c b/msg.c
index 3e4c2882c..cd5f98c4f 100644
--- a/msg.c
+++ b/msg.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: msg.c,v 1.15 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2002 Markus Friedl. All rights reserved. 3 * Copyright (c) 2002 Markus Friedl. All rights reserved.
3 * 4 *
@@ -21,14 +22,23 @@
21 * (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
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 */
25
24#include "includes.h" 26#include "includes.h"
25RCSID("$OpenBSD: msg.c,v 1.8 2005/05/24 17:32:43 avsm Exp $"); 27
28#include <sys/types.h>
29#include <sys/uio.h>
30
31#include <errno.h>
32#include <stdio.h>
33#include <string.h>
34#include <unistd.h>
35#include <stdarg.h>
26 36
27#include "buffer.h" 37#include "buffer.h"
28#include "getput.h"
29#include "log.h" 38#include "log.h"
30#include "atomicio.h" 39#include "atomicio.h"
31#include "msg.h" 40#include "msg.h"
41#include "misc.h"
32 42
33int 43int
34ssh_msg_send(int fd, u_char type, Buffer *m) 44ssh_msg_send(int fd, u_char type, Buffer *m)
@@ -38,7 +48,7 @@ ssh_msg_send(int fd, u_char type, Buffer *m)
38 48
39 debug3("ssh_msg_send: type %u", (unsigned int)type & 0xff); 49 debug3("ssh_msg_send: type %u", (unsigned int)type & 0xff);
40 50
41 PUT_32BIT(buf, mlen + 1); 51 put_u32(buf, mlen + 1);
42 buf[4] = type; /* 1st byte of payload is mesg-type */ 52 buf[4] = type; /* 1st byte of payload is mesg-type */
43 if (atomicio(vwrite, fd, buf, sizeof(buf)) != sizeof(buf)) { 53 if (atomicio(vwrite, fd, buf, sizeof(buf)) != sizeof(buf)) {
44 error("ssh_msg_send: write"); 54 error("ssh_msg_send: write");
@@ -64,7 +74,7 @@ ssh_msg_recv(int fd, Buffer *m)
64 error("ssh_msg_recv: read: header"); 74 error("ssh_msg_recv: read: header");
65 return (-1); 75 return (-1);
66 } 76 }
67 msg_len = GET_32BIT(buf); 77 msg_len = get_u32(buf);
68 if (msg_len > 256 * 1024) { 78 if (msg_len > 256 * 1024) {
69 error("ssh_msg_recv: read: bad msg_len %u", msg_len); 79 error("ssh_msg_recv: read: bad msg_len %u", msg_len);
70 return (-1); 80 return (-1);
diff --git a/msg.h b/msg.h
index 0d3ea0658..b0cb9b52b 100644
--- a/msg.h
+++ b/msg.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: msg.h,v 1.3 2003/11/17 09:45:39 djm Exp $ */ 1/* $OpenBSD: msg.h,v 1.4 2006/03/25 22:22:43 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2002 Markus Friedl. All rights reserved. 3 * Copyright (c) 2002 Markus Friedl. All rights reserved.
4 * 4 *
diff --git a/myproposal.h b/myproposal.h
index d8cba1caf..e246e0dd9 100644
--- a/myproposal.h
+++ b/myproposal.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: myproposal.h,v 1.18 2005/07/25 11:59:39 markus Exp $ */ 1/* $OpenBSD: myproposal.h,v 1.21 2006/03/25 22:22:43 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -23,9 +23,23 @@
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 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. 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26#define KEX_DEFAULT_KEX "diffie-hellman-group-exchange-sha1," \ 26
27#include <openssl/opensslv.h>
28
29/* Old OpenSSL doesn't support what we need for DHGEX-sha256 */
30#if OPENSSL_VERSION_NUMBER < 0x00907000L
31# define KEX_DEFAULT_KEX \
32 "diffie-hellman-group-exchange-sha1," \
27 "diffie-hellman-group14-sha1," \ 33 "diffie-hellman-group14-sha1," \
28 "diffie-hellman-group1-sha1" 34 "diffie-hellman-group1-sha1"
35#else
36# define KEX_DEFAULT_KEX \
37 "diffie-hellman-group-exchange-sha256," \
38 "diffie-hellman-group-exchange-sha1," \
39 "diffie-hellman-group14-sha1," \
40 "diffie-hellman-group1-sha1"
41#endif
42
29#define KEX_DEFAULT_PK_ALG "ssh-rsa,ssh-dss" 43#define KEX_DEFAULT_PK_ALG "ssh-rsa,ssh-dss"
30#define KEX_DEFAULT_ENCRYPT \ 44#define KEX_DEFAULT_ENCRYPT \
31 "aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc," \ 45 "aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc," \
diff --git a/nchan.c b/nchan.c
index aee3f37b0..ad461f4af 100644
--- a/nchan.c
+++ b/nchan.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: nchan.c,v 1.57 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. 3 * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,7 +24,13 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: nchan.c,v 1.51 2004/07/11 17:48:47 deraadt Exp $"); 27
28#include <sys/types.h>
29#include <sys/socket.h>
30
31#include <errno.h>
32#include <string.h>
33#include <stdarg.h>
27 34
28#include "ssh1.h" 35#include "ssh1.h"
29#include "ssh2.h" 36#include "ssh2.h"
diff --git a/openbsd-compat/Makefile.in b/openbsd-compat/Makefile.in
index 3a8703bc1..9f06605d7 100644
--- a/openbsd-compat/Makefile.in
+++ b/openbsd-compat/Makefile.in
@@ -1,4 +1,4 @@
1# $Id: Makefile.in,v 1.37 2005/12/31 05:33:37 djm Exp $ 1# $Id: Makefile.in,v 1.40 2006/08/30 17:24:41 djm Exp $
2 2
3sysconfdir=@sysconfdir@ 3sysconfdir=@sysconfdir@
4piddir=@piddir@ 4piddir=@piddir@
@@ -16,11 +16,11 @@ 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 strtonum.o strtoll.o strtoul.o vis.o 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 sha2.o sigact.o strlcat.o strlcpy.o strmode.o strsep.o strtonum.o strtoll.o strtoul.o vis.o
20 20
21COMPAT=bsd-arc4random.o bsd-asprintf.o bsd-closefrom.o bsd-cray.o bsd-cygwin_util.o bsd-getpeereid.o bsd-misc.o bsd-nextstep.o bsd-openpty.o bsd-snprintf.o bsd-waitpid.o fake-rfc2553.o openssl-compat.o xmmap.o xcrypt.o 21COMPAT=bsd-arc4random.o bsd-asprintf.o bsd-closefrom.o bsd-cray.o bsd-cygwin_util.o bsd-getpeereid.o bsd-misc.o bsd-nextstep.o bsd-openpty.o bsd-snprintf.o bsd-waitpid.o fake-rfc2553.o openssl-compat.o xmmap.o xcrypt.o
22 22
23PORTS=port-irix.o port-aix.o port-uw.o port-tun.o 23PORTS=port-aix.o port-irix.o port-linux.o port-solaris.o port-tun.o port-uw.o
24 24
25.c.o: 25.c.o:
26 $(CC) $(CFLAGS) $(CPPFLAGS) -c $< 26 $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
diff --git a/openbsd-compat/basename.c b/openbsd-compat/basename.c
index ad040e139..ffa5c8984 100644
--- a/openbsd-compat/basename.c
+++ b/openbsd-compat/basename.c
@@ -20,6 +20,8 @@
20 20
21#include "includes.h" 21#include "includes.h"
22#ifndef HAVE_BASENAME 22#ifndef HAVE_BASENAME
23#include <errno.h>
24#include <string.h>
23 25
24char * 26char *
25basename(const char *path) 27basename(const char *path)
diff --git a/openbsd-compat/bindresvport.c b/openbsd-compat/bindresvport.c
index 7f48fd03a..65afed1e3 100644
--- a/openbsd-compat/bindresvport.c
+++ b/openbsd-compat/bindresvport.c
@@ -33,8 +33,14 @@
33#include "includes.h" 33#include "includes.h"
34 34
35#ifndef HAVE_BINDRESVPORT_SA 35#ifndef HAVE_BINDRESVPORT_SA
36#include <sys/types.h>
37#include <sys/socket.h>
36 38
37#include "includes.h" 39#include <netinet/in.h>
40#include <arpa/inet.h>
41
42#include <errno.h>
43#include <string.h>
38 44
39#define STARTPORT 600 45#define STARTPORT 600
40#define ENDPORT (IPPORT_RESERVED - 1) 46#define ENDPORT (IPPORT_RESERVED - 1)
diff --git a/openbsd-compat/bsd-arc4random.c b/openbsd-compat/bsd-arc4random.c
index 1eeb6953b..d45fb182a 100644
--- a/openbsd-compat/bsd-arc4random.c
+++ b/openbsd-compat/bsd-arc4random.c
@@ -15,9 +15,13 @@
15 */ 15 */
16 16
17#include "includes.h" 17#include "includes.h"
18#include "log.h"
19 18
20RCSID("$Id: bsd-arc4random.c,v 1.10 2005/02/16 02:01:28 djm Exp $"); 19#include <sys/types.h>
20
21#include <string.h>
22#include <stdarg.h>
23
24#include "log.h"
21 25
22#ifndef HAVE_ARC4RANDOM 26#ifndef HAVE_ARC4RANDOM
23 27
diff --git a/openbsd-compat/bsd-asprintf.c b/openbsd-compat/bsd-asprintf.c
index 5ca01f80f..00fa0dfd8 100644
--- a/openbsd-compat/bsd-asprintf.c
+++ b/openbsd-compat/bsd-asprintf.c
@@ -21,6 +21,10 @@
21 21
22#ifndef HAVE_VASPRINTF 22#ifndef HAVE_VASPRINTF
23 23
24#include <errno.h>
25#include <stdarg.h>
26#include <stdlib.h>
27
24#ifndef VA_COPY 28#ifndef VA_COPY
25# ifdef HAVE_VA_COPY 29# ifdef HAVE_VA_COPY
26# define VA_COPY(dest, src) va_copy(dest, src) 30# define VA_COPY(dest, src) va_copy(dest, src)
@@ -35,7 +39,8 @@
35 39
36#define INIT_SZ 128 40#define INIT_SZ 128
37 41
38int vasprintf(char **str, const char *fmt, va_list ap) 42int
43vasprintf(char **str, const char *fmt, va_list ap)
39{ 44{
40 int ret = -1; 45 int ret = -1;
41 va_list ap2; 46 va_list ap2;
@@ -49,7 +54,7 @@ int vasprintf(char **str, const char *fmt, va_list ap)
49 ret = vsnprintf(string, INIT_SZ, fmt, ap2); 54 ret = vsnprintf(string, INIT_SZ, fmt, ap2);
50 if (ret >= 0 && ret < INIT_SZ) { /* succeeded with initial alloc */ 55 if (ret >= 0 && ret < INIT_SZ) { /* succeeded with initial alloc */
51 *str = string; 56 *str = string;
52 } else if (ret == INT_MAX) { /* shouldn't happen */ 57 } else if (ret == INT_MAX || ret < 0) { /* Bad length */
53 goto fail; 58 goto fail;
54 } else { /* bigger than initial, realloc allowing for nul */ 59 } else { /* bigger than initial, realloc allowing for nul */
55 len = (size_t)ret + 1; 60 len = (size_t)ret + 1;
diff --git a/openbsd-compat/bsd-closefrom.c b/openbsd-compat/bsd-closefrom.c
index 5b7b94ae4..9380b33a7 100644
--- a/openbsd-compat/bsd-closefrom.c
+++ b/openbsd-compat/bsd-closefrom.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2004 Todd C. Miller <Todd.Miller@courtesan.com> 2 * Copyright (c) 2004-2005 Todd C. Miller <Todd.Miller@courtesan.com>
3 * 3 *
4 * Permission to use, copy, modify, and distribute this software for any 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 5 * purpose with or without fee is hereby granted, provided that the above
@@ -22,9 +22,14 @@
22#include <sys/param.h> 22#include <sys/param.h>
23#include <unistd.h> 23#include <unistd.h>
24#include <stdio.h> 24#include <stdio.h>
25#ifdef HAVE_FCNTL_H
26# include <fcntl.h>
27#endif
25#include <limits.h> 28#include <limits.h>
26#include <stdlib.h> 29#include <stdlib.h>
27#include <stddef.h> 30#include <stddef.h>
31#include <string.h>
32#include <unistd.h>
28#ifdef HAVE_DIRENT_H 33#ifdef HAVE_DIRENT_H
29# include <dirent.h> 34# include <dirent.h>
30# define NAMLEN(dirent) strlen((dirent)->d_name) 35# define NAMLEN(dirent) strlen((dirent)->d_name)
@@ -46,15 +51,20 @@
46# define OPEN_MAX 256 51# define OPEN_MAX 256
47#endif 52#endif
48 53
49RCSID("$Id: bsd-closefrom.c,v 1.2 2005/11/10 08:29:13 dtucker Exp $"); 54#if 0
50 55__unused static const char rcsid[] = "$Sudo: closefrom.c,v 1.11 2006/08/17 15:26:54 millert Exp $";
51#ifndef lint
52static const char sudorcsid[] = "$Sudo: closefrom.c,v 1.6 2004/06/01 20:51:56 millert Exp $";
53#endif /* lint */ 56#endif /* lint */
54 57
55/* 58/*
56 * Close all file descriptors greater than or equal to lowfd. 59 * Close all file descriptors greater than or equal to lowfd.
57 */ 60 */
61#ifdef HAVE_FCNTL_CLOSEM
62void
63closefrom(int lowfd)
64{
65 (void) fcntl(lowfd, F_CLOSEM, 0);
66}
67#else
58void 68void
59closefrom(int lowfd) 69closefrom(int lowfd)
60{ 70{
@@ -67,7 +77,7 @@ closefrom(int lowfd)
67 77
68 /* Check for a /proc/$$/fd directory. */ 78 /* Check for a /proc/$$/fd directory. */
69 len = snprintf(fdpath, sizeof(fdpath), "/proc/%ld/fd", (long)getpid()); 79 len = snprintf(fdpath, sizeof(fdpath), "/proc/%ld/fd", (long)getpid());
70 if (len >= 0 && (u_int)len <= sizeof(fdpath) && (dirp = opendir(fdpath))) { 80 if (len > 0 && (size_t)len <= sizeof(fdpath) && (dirp = opendir(fdpath))) {
71 while ((dent = readdir(dirp)) != NULL) { 81 while ((dent = readdir(dirp)) != NULL) {
72 fd = strtol(dent->d_name, &endp, 10); 82 fd = strtol(dent->d_name, &endp, 10);
73 if (dent->d_name != endp && *endp == '\0' && 83 if (dent->d_name != endp && *endp == '\0' &&
@@ -95,6 +105,5 @@ closefrom(int lowfd)
95 (void) close((int) fd); 105 (void) close((int) fd);
96 } 106 }
97} 107}
98 108#endif /* !HAVE_FCNTL_CLOSEM */
99#endif /* HAVE_CLOSEFROM */ 109#endif /* HAVE_CLOSEFROM */
100
diff --git a/openbsd-compat/bsd-cray.c b/openbsd-compat/bsd-cray.c
index d1f1c059c..1532c991c 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.14 2005/02/02 06:10:11 dtucker Exp $ 2 * $Id: bsd-cray.c,v 1.16 2006/09/01 05:38:41 djm Exp $
3 * 3 *
4 * bsd-cray.c 4 * bsd-cray.c
5 * 5 *
@@ -52,7 +52,10 @@
52#include <sys/secstat.h> 52#include <sys/secstat.h>
53#include <sys/stat.h> 53#include <sys/stat.h>
54#include <sys/session.h> 54#include <sys/session.h>
55#include <stdarg.h>
55#include <stdlib.h> 56#include <stdlib.h>
57#include <string.h>
58#include <unistd.h>
56#include <pwd.h> 59#include <pwd.h>
57#include <fcntl.h> 60#include <fcntl.h>
58#include <errno.h> 61#include <errno.h>
diff --git a/openbsd-compat/bsd-cygwin_util.c b/openbsd-compat/bsd-cygwin_util.c
index b5e3cc52b..dbf8176b6 100644
--- a/openbsd-compat/bsd-cygwin_util.c
+++ b/openbsd-compat/bsd-cygwin_util.c
@@ -29,15 +29,25 @@
29 29
30#include "includes.h" 30#include "includes.h"
31 31
32RCSID("$Id: bsd-cygwin_util.c,v 1.14 2005/05/25 09:42:11 dtucker Exp $");
33
34#ifdef HAVE_CYGWIN 32#ifdef HAVE_CYGWIN
35 33
36#include <fcntl.h> 34#if defined(open) && open == binary_open
37#include <stdlib.h> 35# undef open
36#endif
37#if defined(pipe) && open == binary_pipe
38# undef pipe
39#endif
40
41#include <sys/types.h>
42#include <sys/stat.h>
38#include <sys/utsname.h> 43#include <sys/utsname.h>
39#include <sys/vfs.h> 44#include <sys/vfs.h>
45
46#include <fcntl.h>
47#include <stdlib.h>
48#include <unistd.h>
40#include <windows.h> 49#include <windows.h>
50
41#include "xmalloc.h" 51#include "xmalloc.h"
42#define is_winnt (GetVersion() < 0x80000000) 52#define is_winnt (GetVersion() < 0x80000000)
43 53
@@ -45,13 +55,6 @@ RCSID("$Id: bsd-cygwin_util.c,v 1.14 2005/05/25 09:42:11 dtucker Exp $");
45#define ntsec_off(c) ((c) && strstr((c),"nontsec")) 55#define ntsec_off(c) ((c) && strstr((c),"nontsec"))
46#define ntea_on(c) ((c) && strstr((c),"ntea") && !strstr((c),"nontea")) 56#define ntea_on(c) ((c) && strstr((c),"ntea") && !strstr((c),"nontea"))
47 57
48#if defined(open) && open == binary_open
49# undef open
50#endif
51#if defined(pipe) && open == binary_pipe
52# undef pipe
53#endif
54
55int 58int
56binary_open(const char *filename, int flags, ...) 59binary_open(const char *filename, int flags, ...)
57{ 60{
@@ -268,9 +271,9 @@ char **
268fetch_windows_environment(void) 271fetch_windows_environment(void)
269{ 272{
270 char **e, **p; 273 char **e, **p;
271 int i, idx = 0; 274 unsigned int i, idx = 0;
272 275
273 p = xmalloc((WENV_SIZ + 1) * sizeof(char *)); 276 p = xcalloc(WENV_SIZ + 1, sizeof(char *));
274 for (e = environ; *e != NULL; ++e) { 277 for (e = environ; *e != NULL; ++e) {
275 for (i = 0; i < WENV_SIZ; ++i) { 278 for (i = 0; i < WENV_SIZ; ++i) {
276 if (!strncmp(*e, wenv_arr[i].name, wenv_arr[i].namelen)) 279 if (!strncmp(*e, wenv_arr[i].name, wenv_arr[i].namelen))
diff --git a/openbsd-compat/bsd-getpeereid.c b/openbsd-compat/bsd-getpeereid.c
index fe2edad71..bdae8b637 100644
--- a/openbsd-compat/bsd-getpeereid.c
+++ b/openbsd-compat/bsd-getpeereid.c
@@ -16,10 +16,13 @@
16 16
17#include "includes.h" 17#include "includes.h"
18 18
19RCSID("$Id: bsd-getpeereid.c,v 1.3 2004/02/17 05:49:55 djm Exp $");
20
21#if !defined(HAVE_GETPEEREID) 19#if !defined(HAVE_GETPEEREID)
22 20
21#include <sys/types.h>
22#include <sys/socket.h>
23
24#include <unistd.h>
25
23#if defined(SO_PEERCRED) 26#if defined(SO_PEERCRED)
24int 27int
25getpeereid(int s, uid_t *euid, gid_t *gid) 28getpeereid(int s, uid_t *euid, gid_t *gid)
diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c
index d32b054d7..17d731bd2 100644
--- a/openbsd-compat/bsd-misc.c
+++ b/openbsd-compat/bsd-misc.c
@@ -16,9 +16,19 @@
16 */ 16 */
17 17
18#include "includes.h" 18#include "includes.h"
19#include "xmalloc.h"
20 19
21RCSID("$Id: bsd-misc.c,v 1.28 2005/11/01 22:07:31 dtucker Exp $"); 20#ifdef HAVE_SYS_SELECT_H
21# include <sys/select.h>
22#endif
23#ifdef HAVE_SYS_TIME_H
24# include <sys/time.h>
25#endif
26
27#include <string.h>
28#include <signal.h>
29#include <stdlib.h>
30
31#include "xmalloc.h"
22 32
23#ifndef HAVE___PROGNAME 33#ifndef HAVE___PROGNAME
24char *__progname; 34char *__progname;
diff --git a/openbsd-compat/bsd-nextstep.c b/openbsd-compat/bsd-nextstep.c
index bd35a3afc..8195af88a 100644
--- a/openbsd-compat/bsd-nextstep.c
+++ b/openbsd-compat/bsd-nextstep.c
@@ -24,8 +24,6 @@
24 24
25#include "includes.h" 25#include "includes.h"
26 26
27RCSID("$Id: bsd-nextstep.c,v 1.6 2003/06/01 03:23:57 mouring Exp $");
28
29#ifdef HAVE_NEXT 27#ifdef HAVE_NEXT
30#include <errno.h> 28#include <errno.h>
31#include <sys/wait.h> 29#include <sys/wait.h>
diff --git a/openbsd-compat/bsd-openpty.c b/openbsd-compat/bsd-openpty.c
index 8eb62b7a8..9777eb556 100644
--- a/openbsd-compat/bsd-openpty.c
+++ b/openbsd-compat/bsd-openpty.c
@@ -35,6 +35,21 @@
35#include "includes.h" 35#include "includes.h"
36#if !defined(HAVE_OPENPTY) 36#if !defined(HAVE_OPENPTY)
37 37
38#include <sys/types.h>
39
40#include <stdlib.h>
41
42#ifdef HAVE_SYS_STAT_H
43# include <sys/stat.h>
44#endif
45#ifdef HAVE_SYS_IOCTL_H
46# include <sys/ioctl.h>
47#endif
48
49#ifdef HAVE_FCNTL_H
50# include <fcntl.h>
51#endif
52
38#ifdef HAVE_UTIL_H 53#ifdef HAVE_UTIL_H
39# include <util.h> 54# include <util.h>
40#endif /* HAVE_UTIL_H */ 55#endif /* HAVE_UTIL_H */
@@ -46,6 +61,10 @@
46# include <sys/stropts.h> 61# include <sys/stropts.h>
47#endif 62#endif
48 63
64#include <signal.h>
65#include <string.h>
66#include <unistd.h>
67
49#ifndef O_NOCTTY 68#ifndef O_NOCTTY
50#define O_NOCTTY 0 69#define O_NOCTTY 0
51#endif 70#endif
diff --git a/openbsd-compat/bsd-snprintf.c b/openbsd-compat/bsd-snprintf.c
index e4ba154fd..41d2be238 100644
--- a/openbsd-compat/bsd-snprintf.c
+++ b/openbsd-compat/bsd-snprintf.c
@@ -85,12 +85,15 @@
85 * 85 *
86 * Move #endif to make sure VA_COPY, LDOUBLE, etc are defined even 86 * Move #endif to make sure VA_COPY, LDOUBLE, etc are defined even
87 * if the C library has some snprintf functions already. 87 * if the C library has some snprintf functions already.
88 *
89 * Damien Miller (djm@mindrot.org) Jan 2007
90 * Fix integer overflows in return value.
91 * Make formatting quite a bit faster by inlining dopr_outch()
92 *
88 **************************************************************/ 93 **************************************************************/
89 94
90#include "includes.h" 95#include "includes.h"
91 96
92RCSID("$Id: bsd-snprintf.c,v 1.11 2005/12/17 11:32:04 dtucker Exp $");
93
94#if defined(BROKEN_SNPRINTF) /* For those with broken snprintf() */ 97#if defined(BROKEN_SNPRINTF) /* For those with broken snprintf() */
95# undef HAVE_SNPRINTF 98# undef HAVE_SNPRINTF
96# undef HAVE_VSNPRINTF 99# undef HAVE_VSNPRINTF
@@ -110,6 +113,13 @@ RCSID("$Id: bsd-snprintf.c,v 1.11 2005/12/17 11:32:04 dtucker Exp $");
110 113
111#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) 114#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
112 115
116#include <ctype.h>
117#include <stdarg.h>
118#include <stdlib.h>
119#include <string.h>
120#include <limits.h>
121#include <errno.h>
122
113#ifdef HAVE_LONG_DOUBLE 123#ifdef HAVE_LONG_DOUBLE
114# define LDOUBLE long double 124# define LDOUBLE long double
115#else 125#else
@@ -156,17 +166,28 @@ RCSID("$Id: bsd-snprintf.c,v 1.11 2005/12/17 11:32:04 dtucker Exp $");
156# define MAX(p,q) (((p) >= (q)) ? (p) : (q)) 166# define MAX(p,q) (((p) >= (q)) ? (p) : (q))
157#endif 167#endif
158 168
159static size_t dopr(char *buffer, size_t maxlen, const char *format, 169#define DOPR_OUTCH(buf, pos, buflen, thechar) \
160 va_list args_in); 170 do { \
161static void fmtstr(char *buffer, size_t *currlen, size_t maxlen, 171 if (pos + 1 >= INT_MAX) { \
162 char *value, int flags, int min, int max); 172 errno = ERANGE; \
163static void fmtint(char *buffer, size_t *currlen, size_t maxlen, 173 return -1; \
164 long value, int base, int min, int max, int flags); 174 } \
165static void fmtfp(char *buffer, size_t *currlen, size_t maxlen, 175 if (pos < buflen) \
166 LDOUBLE fvalue, int min, int max, int flags); 176 buf[pos] = thechar; \
167static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c); 177 (pos)++; \
168 178 } while (0)
169static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args_in) 179
180static int dopr(char *buffer, size_t maxlen, const char *format,
181 va_list args_in);
182static int fmtstr(char *buffer, size_t *currlen, size_t maxlen,
183 char *value, int flags, int min, int max);
184static int fmtint(char *buffer, size_t *currlen, size_t maxlen,
185 LLONG value, int base, int min, int max, int flags);
186static int fmtfp(char *buffer, size_t *currlen, size_t maxlen,
187 LDOUBLE fvalue, int min, int max, int flags);
188
189static int
190dopr(char *buffer, size_t maxlen, const char *format, va_list args_in)
170{ 191{
171 char ch; 192 char ch;
172 LLONG value; 193 LLONG value;
@@ -195,8 +216,8 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args
195 case DP_S_DEFAULT: 216 case DP_S_DEFAULT:
196 if (ch == '%') 217 if (ch == '%')
197 state = DP_S_FLAGS; 218 state = DP_S_FLAGS;
198 else 219 else
199 dopr_outch (buffer, &currlen, maxlen, ch); 220 DOPR_OUTCH(buffer, currlen, maxlen, ch);
200 ch = *format++; 221 ch = *format++;
201 break; 222 break;
202 case DP_S_FLAGS: 223 case DP_S_FLAGS:
@@ -295,7 +316,9 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args
295 value = va_arg (args, LLONG); 316 value = va_arg (args, LLONG);
296 else 317 else
297 value = va_arg (args, int); 318 value = va_arg (args, int);
298 fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); 319 if (fmtint(buffer, &currlen, maxlen,
320 value, 10, min, max, flags) == -1)
321 return -1;
299 break; 322 break;
300 case 'o': 323 case 'o':
301 flags |= DP_F_UNSIGNED; 324 flags |= DP_F_UNSIGNED;
@@ -307,7 +330,9 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args
307 value = (long)va_arg (args, unsigned LLONG); 330 value = (long)va_arg (args, unsigned LLONG);
308 else 331 else
309 value = (long)va_arg (args, unsigned int); 332 value = (long)va_arg (args, unsigned int);
310 fmtint (buffer, &currlen, maxlen, value, 8, min, max, flags); 333 if (fmtint(buffer, &currlen, maxlen, value,
334 8, min, max, flags) == -1)
335 return -1;
311 break; 336 break;
312 case 'u': 337 case 'u':
313 flags |= DP_F_UNSIGNED; 338 flags |= DP_F_UNSIGNED;
@@ -319,7 +344,9 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args
319 value = (LLONG)va_arg (args, unsigned LLONG); 344 value = (LLONG)va_arg (args, unsigned LLONG);
320 else 345 else
321 value = (long)va_arg (args, unsigned int); 346 value = (long)va_arg (args, unsigned int);
322 fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); 347 if (fmtint(buffer, &currlen, maxlen, value,
348 10, min, max, flags) == -1)
349 return -1;
323 break; 350 break;
324 case 'X': 351 case 'X':
325 flags |= DP_F_UP; 352 flags |= DP_F_UP;
@@ -333,15 +360,18 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args
333 value = (LLONG)va_arg (args, unsigned LLONG); 360 value = (LLONG)va_arg (args, unsigned LLONG);
334 else 361 else
335 value = (long)va_arg (args, unsigned int); 362 value = (long)va_arg (args, unsigned int);
336 fmtint (buffer, &currlen, maxlen, value, 16, min, max, flags); 363 if (fmtint(buffer, &currlen, maxlen, value,
364 16, min, max, flags) == -1)
365 return -1;
337 break; 366 break;
338 case 'f': 367 case 'f':
339 if (cflags == DP_C_LDOUBLE) 368 if (cflags == DP_C_LDOUBLE)
340 fvalue = va_arg (args, LDOUBLE); 369 fvalue = va_arg (args, LDOUBLE);
341 else 370 else
342 fvalue = va_arg (args, double); 371 fvalue = va_arg (args, double);
343 /* um, floating point? */ 372 if (fmtfp(buffer, &currlen, maxlen, fvalue,
344 fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags); 373 min, max, flags) == -1)
374 return -1;
345 break; 375 break;
346 case 'E': 376 case 'E':
347 flags |= DP_F_UP; 377 flags |= DP_F_UP;
@@ -350,7 +380,9 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args
350 fvalue = va_arg (args, LDOUBLE); 380 fvalue = va_arg (args, LDOUBLE);
351 else 381 else
352 fvalue = va_arg (args, double); 382 fvalue = va_arg (args, double);
353 fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags); 383 if (fmtfp(buffer, &currlen, maxlen, fvalue,
384 min, max, flags) == -1)
385 return -1;
354 break; 386 break;
355 case 'G': 387 case 'G':
356 flags |= DP_F_UP; 388 flags |= DP_F_UP;
@@ -359,10 +391,13 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args
359 fvalue = va_arg (args, LDOUBLE); 391 fvalue = va_arg (args, LDOUBLE);
360 else 392 else
361 fvalue = va_arg (args, double); 393 fvalue = va_arg (args, double);
362 fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags); 394 if (fmtfp(buffer, &currlen, maxlen, fvalue,
395 min, max, flags) == -1)
396 return -1;
363 break; 397 break;
364 case 'c': 398 case 'c':
365 dopr_outch (buffer, &currlen, maxlen, va_arg (args, int)); 399 DOPR_OUTCH(buffer, currlen, maxlen,
400 va_arg (args, int));
366 break; 401 break;
367 case 's': 402 case 's':
368 strvalue = va_arg (args, char *); 403 strvalue = va_arg (args, char *);
@@ -371,11 +406,15 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args
371 max = strlen(strvalue); 406 max = strlen(strvalue);
372 } 407 }
373 if (min > 0 && max >= 0 && min > max) max = min; 408 if (min > 0 && max >= 0 && min > max) max = min;
374 fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max); 409 if (fmtstr(buffer, &currlen, maxlen,
410 strvalue, flags, min, max) == -1)
411 return -1;
375 break; 412 break;
376 case 'p': 413 case 'p':
377 strvalue = va_arg (args, void *); 414 strvalue = va_arg (args, void *);
378 fmtint (buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags); 415 if (fmtint(buffer, &currlen, maxlen,
416 (long) strvalue, 16, min, max, flags) == -1)
417 return -1;
379 break; 418 break;
380 case 'n': 419 case 'n':
381 if (cflags == DP_C_SHORT) { 420 if (cflags == DP_C_SHORT) {
@@ -397,7 +436,7 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args
397 } 436 }
398 break; 437 break;
399 case '%': 438 case '%':
400 dopr_outch (buffer, &currlen, maxlen, ch); 439 DOPR_OUTCH(buffer, currlen, maxlen, ch);
401 break; 440 break;
402 case 'w': 441 case 'w':
403 /* not supported yet, treat as next char */ 442 /* not supported yet, treat as next char */
@@ -426,11 +465,12 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args
426 buffer[maxlen - 1] = '\0'; 465 buffer[maxlen - 1] = '\0';
427 } 466 }
428 467
429 return currlen; 468 return currlen < INT_MAX ? (int)currlen : -1;
430} 469}
431 470
432static void fmtstr(char *buffer, size_t *currlen, size_t maxlen, 471static int
433 char *value, int flags, int min, int max) 472fmtstr(char *buffer, size_t *currlen, size_t maxlen,
473 char *value, int flags, int min, int max)
434{ 474{
435 int padlen, strln; /* amount to pad */ 475 int padlen, strln; /* amount to pad */
436 int cnt = 0; 476 int cnt = 0;
@@ -450,28 +490,31 @@ static void fmtstr(char *buffer, size_t *currlen, size_t maxlen,
450 padlen = -padlen; /* Left Justify */ 490 padlen = -padlen; /* Left Justify */
451 491
452 while ((padlen > 0) && (cnt < max)) { 492 while ((padlen > 0) && (cnt < max)) {
453 dopr_outch (buffer, currlen, maxlen, ' '); 493 DOPR_OUTCH(buffer, *currlen, maxlen, ' ');
454 --padlen; 494 --padlen;
455 ++cnt; 495 ++cnt;
456 } 496 }
457 while (*value && (cnt < max)) { 497 while (*value && (cnt < max)) {
458 dopr_outch (buffer, currlen, maxlen, *value++); 498 DOPR_OUTCH(buffer, *currlen, maxlen, *value);
499 *value++;
459 ++cnt; 500 ++cnt;
460 } 501 }
461 while ((padlen < 0) && (cnt < max)) { 502 while ((padlen < 0) && (cnt < max)) {
462 dopr_outch (buffer, currlen, maxlen, ' '); 503 DOPR_OUTCH(buffer, *currlen, maxlen, ' ');
463 ++padlen; 504 ++padlen;
464 ++cnt; 505 ++cnt;
465 } 506 }
507 return 0;
466} 508}
467 509
468/* Have to handle DP_F_NUM (ie 0x and 0 alternates) */ 510/* Have to handle DP_F_NUM (ie 0x and 0 alternates) */
469 511
470static void fmtint(char *buffer, size_t *currlen, size_t maxlen, 512static int
471 long value, int base, int min, int max, int flags) 513fmtint(char *buffer, size_t *currlen, size_t maxlen,
514 LLONG value, int base, int min, int max, int flags)
472{ 515{
473 int signvalue = 0; 516 int signvalue = 0;
474 unsigned long uvalue; 517 unsigned LLONG uvalue;
475 char convert[20]; 518 char convert[20];
476 int place = 0; 519 int place = 0;
477 int spadlen = 0; /* amount to space pad */ 520 int spadlen = 0; /* amount to space pad */
@@ -524,31 +567,34 @@ static void fmtint(char *buffer, size_t *currlen, size_t maxlen,
524 567
525 /* Spaces */ 568 /* Spaces */
526 while (spadlen > 0) { 569 while (spadlen > 0) {
527 dopr_outch (buffer, currlen, maxlen, ' '); 570 DOPR_OUTCH(buffer, *currlen, maxlen, ' ');
528 --spadlen; 571 --spadlen;
529 } 572 }
530 573
531 /* Sign */ 574 /* Sign */
532 if (signvalue) 575 if (signvalue)
533 dopr_outch (buffer, currlen, maxlen, signvalue); 576 DOPR_OUTCH(buffer, *currlen, maxlen, signvalue);
534 577
535 /* Zeros */ 578 /* Zeros */
536 if (zpadlen > 0) { 579 if (zpadlen > 0) {
537 while (zpadlen > 0) { 580 while (zpadlen > 0) {
538 dopr_outch (buffer, currlen, maxlen, '0'); 581 DOPR_OUTCH(buffer, *currlen, maxlen, '0');
539 --zpadlen; 582 --zpadlen;
540 } 583 }
541 } 584 }
542 585
543 /* Digits */ 586 /* Digits */
544 while (place > 0) 587 while (place > 0) {
545 dopr_outch (buffer, currlen, maxlen, convert[--place]); 588 --place;
589 DOPR_OUTCH(buffer, *currlen, maxlen, convert[place]);
590 }
546 591
547 /* Left Justified spaces */ 592 /* Left Justified spaces */
548 while (spadlen < 0) { 593 while (spadlen < 0) {
549 dopr_outch (buffer, currlen, maxlen, ' '); 594 DOPR_OUTCH(buffer, *currlen, maxlen, ' ');
550 ++spadlen; 595 ++spadlen;
551 } 596 }
597 return 0;
552} 598}
553 599
554static LDOUBLE abs_val(LDOUBLE value) 600static LDOUBLE abs_val(LDOUBLE value)
@@ -561,13 +607,13 @@ static LDOUBLE abs_val(LDOUBLE value)
561 return result; 607 return result;
562} 608}
563 609
564static LDOUBLE POW10(int exp) 610static LDOUBLE POW10(int val)
565{ 611{
566 LDOUBLE result = 1; 612 LDOUBLE result = 1;
567 613
568 while (exp) { 614 while (val) {
569 result *= 10; 615 result *= 10;
570 exp--; 616 val--;
571 } 617 }
572 618
573 return result; 619 return result;
@@ -601,7 +647,10 @@ static double my_modf(double x0, double *iptr)
601 } 647 }
602 648
603 if (i == 100) { 649 if (i == 100) {
604 /* yikes! the number is beyond what we can handle. What do we do? */ 650 /*
651 * yikes! the number is beyond what we can handle.
652 * What do we do?
653 */
605 (*iptr) = 0; 654 (*iptr) = 0;
606 return 0; 655 return 0;
607 } 656 }
@@ -620,8 +669,9 @@ static double my_modf(double x0, double *iptr)
620} 669}
621 670
622 671
623static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, 672static int
624 LDOUBLE fvalue, int min, int max, int flags) 673fmtfp (char *buffer, size_t *currlen, size_t maxlen,
674 LDOUBLE fvalue, int min, int max, int flags)
625{ 675{
626 int signvalue = 0; 676 int signvalue = 0;
627 double ufvalue; 677 double ufvalue;
@@ -726,24 +776,26 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
726 776
727 if ((flags & DP_F_ZERO) && (padlen > 0)) { 777 if ((flags & DP_F_ZERO) && (padlen > 0)) {
728 if (signvalue) { 778 if (signvalue) {
729 dopr_outch (buffer, currlen, maxlen, signvalue); 779 DOPR_OUTCH(buffer, *currlen, maxlen, signvalue);
730 --padlen; 780 --padlen;
731 signvalue = 0; 781 signvalue = 0;
732 } 782 }
733 while (padlen > 0) { 783 while (padlen > 0) {
734 dopr_outch (buffer, currlen, maxlen, '0'); 784 DOPR_OUTCH(buffer, *currlen, maxlen, '0');
735 --padlen; 785 --padlen;
736 } 786 }
737 } 787 }
738 while (padlen > 0) { 788 while (padlen > 0) {
739 dopr_outch (buffer, currlen, maxlen, ' '); 789 DOPR_OUTCH(buffer, *currlen, maxlen, ' ');
740 --padlen; 790 --padlen;
741 } 791 }
742 if (signvalue) 792 if (signvalue)
743 dopr_outch (buffer, currlen, maxlen, signvalue); 793 DOPR_OUTCH(buffer, *currlen, maxlen, signvalue);
744 794
745 while (iplace > 0) 795 while (iplace > 0) {
746 dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]); 796 --iplace;
797 DOPR_OUTCH(buffer, *currlen, maxlen, iconvert[iplace]);
798 }
747 799
748#ifdef DEBUG_SNPRINTF 800#ifdef DEBUG_SNPRINTF
749 printf("fmtfp: fplace=%d zpadlen=%d\n", fplace, zpadlen); 801 printf("fmtfp: fplace=%d zpadlen=%d\n", fplace, zpadlen);
@@ -754,41 +806,38 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
754 * char to print out. 806 * char to print out.
755 */ 807 */
756 if (max > 0) { 808 if (max > 0) {
757 dopr_outch (buffer, currlen, maxlen, '.'); 809 DOPR_OUTCH(buffer, *currlen, maxlen, '.');
758 810
759 while (zpadlen > 0) { 811 while (zpadlen > 0) {
760 dopr_outch (buffer, currlen, maxlen, '0'); 812 DOPR_OUTCH(buffer, *currlen, maxlen, '0');
761 --zpadlen; 813 --zpadlen;
762 } 814 }
763 815
764 while (fplace > 0) 816 while (fplace > 0) {
765 dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]); 817 --fplace;
818 DOPR_OUTCH(buffer, *currlen, maxlen, fconvert[fplace]);
819 }
766 } 820 }
767 821
768 while (padlen < 0) { 822 while (padlen < 0) {
769 dopr_outch (buffer, currlen, maxlen, ' '); 823 DOPR_OUTCH(buffer, *currlen, maxlen, ' ');
770 ++padlen; 824 ++padlen;
771 } 825 }
772} 826 return 0;
773
774static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
775{
776 if (*currlen < maxlen) {
777 buffer[(*currlen)] = c;
778 }
779 (*currlen)++;
780} 827}
781#endif /* !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) */ 828#endif /* !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) */
782 829
783#if !defined(HAVE_VSNPRINTF) 830#if !defined(HAVE_VSNPRINTF)
784int vsnprintf (char *str, size_t count, const char *fmt, va_list args) 831int
832vsnprintf (char *str, size_t count, const char *fmt, va_list args)
785{ 833{
786 return dopr(str, count, fmt, args); 834 return dopr(str, count, fmt, args);
787} 835}
788#endif 836#endif
789 837
790#if !defined(HAVE_SNPRINTF) 838#if !defined(HAVE_SNPRINTF)
791int snprintf(char *str, size_t count, SNPRINTF_CONST char *fmt, ...) 839int
840snprintf(char *str, size_t count, SNPRINTF_CONST char *fmt, ...)
792{ 841{
793 size_t ret; 842 size_t ret;
794 va_list ap; 843 va_list ap;
@@ -799,4 +848,3 @@ int snprintf(char *str, size_t count, SNPRINTF_CONST char *fmt, ...)
799 return ret; 848 return ret;
800} 849}
801#endif 850#endif
802
diff --git a/openbsd-compat/bsd-waitpid.c b/openbsd-compat/bsd-waitpid.c
index 93c9ec35e..40e6ffaa8 100644
--- a/openbsd-compat/bsd-waitpid.c
+++ b/openbsd-compat/bsd-waitpid.c
@@ -24,8 +24,6 @@
24 24
25#include "includes.h" 25#include "includes.h"
26 26
27RCSID("$Id: bsd-waitpid.c,v 1.5 2003/06/01 03:23:57 mouring Exp $");
28
29#ifndef HAVE_WAITPID 27#ifndef HAVE_WAITPID
30#include <errno.h> 28#include <errno.h>
31#include <sys/wait.h> 29#include <sys/wait.h>
diff --git a/openbsd-compat/daemon.c b/openbsd-compat/daemon.c
index f8a0680bf..e3a6886bd 100644
--- a/openbsd-compat/daemon.c
+++ b/openbsd-compat/daemon.c
@@ -34,6 +34,20 @@
34 34
35#ifndef HAVE_DAEMON 35#ifndef HAVE_DAEMON
36 36
37#include <sys/types.h>
38
39#ifdef HAVE_SYS_STAT_H
40# include <sys/stat.h>
41#endif
42
43#ifdef HAVE_FCNTL_H
44# include <fcntl.h>
45#endif
46
47#ifdef HAVE_UNISTD_H
48# include <unistd.h>
49#endif
50
37int 51int
38daemon(int nochdir, int noclose) 52daemon(int nochdir, int noclose)
39{ 53{
diff --git a/openbsd-compat/fake-rfc2553.c b/openbsd-compat/fake-rfc2553.c
index 0186b5300..b6ea3d21e 100644
--- a/openbsd-compat/fake-rfc2553.c
+++ b/openbsd-compat/fake-rfc2553.c
@@ -37,7 +37,11 @@
37 37
38#include "includes.h" 38#include "includes.h"
39 39
40RCSID("$Id: fake-rfc2553.c,v 1.5 2003/09/22 02:08:23 dtucker Exp $"); 40#include <stdlib.h>
41#include <string.h>
42
43#include <netinet/in.h>
44#include <arpa/inet.h>
41 45
42#ifndef HAVE_GETNAMEINFO 46#ifndef HAVE_GETNAMEINFO
43int getnameinfo(const struct sockaddr *sa, size_t salen, char *host, 47int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
diff --git a/openbsd-compat/fake-rfc2553.h b/openbsd-compat/fake-rfc2553.h
index cbcf7f727..5c2ce5b1b 100644
--- a/openbsd-compat/fake-rfc2553.h
+++ b/openbsd-compat/fake-rfc2553.h
@@ -1,4 +1,4 @@
1/* $Id: fake-rfc2553.h,v 1.12 2005/08/03 05:36:21 dtucker Exp $ */ 1/* $Id: fake-rfc2553.h,v 1.13 2006/07/24 03:51:52 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (C) 2000-2003 Damien Miller. All rights reserved. 4 * Copyright (C) 2000-2003 Damien Miller. All rights reserved.
@@ -41,7 +41,10 @@
41#define _FAKE_RFC2553_H 41#define _FAKE_RFC2553_H
42 42
43#include "includes.h" 43#include "includes.h"
44#include "sys/types.h" 44#include <sys/types.h>
45#if defined(HAVE_NETDB_H)
46# include <netdb.h>
47#endif
45 48
46/* 49/*
47 * First, socket and INET6 related definitions 50 * First, socket and INET6 related definitions
diff --git a/openbsd-compat/getrrsetbyname.c b/openbsd-compat/getrrsetbyname.c
index bea6aea3b..07231d005 100644
--- a/openbsd-compat/getrrsetbyname.c
+++ b/openbsd-compat/getrrsetbyname.c
@@ -49,6 +49,12 @@
49 49
50#ifndef HAVE_GETRRSETBYNAME 50#ifndef HAVE_GETRRSETBYNAME
51 51
52#include <stdlib.h>
53#include <string.h>
54
55#include <netinet/in.h>
56#include <arpa/inet.h>
57
52#include "getrrsetbyname.h" 58#include "getrrsetbyname.h"
53 59
54#if defined(HAVE_DECL_H_ERRNO) && !HAVE_DECL_H_ERRNO 60#if defined(HAVE_DECL_H_ERRNO) && !HAVE_DECL_H_ERRNO
@@ -60,6 +66,13 @@ extern int h_errno;
60# undef _THREAD_PRIVATE 66# undef _THREAD_PRIVATE
61#endif 67#endif
62#define _THREAD_PRIVATE(a,b,c) (c) 68#define _THREAD_PRIVATE(a,b,c) (c)
69
70/* to avoid conflicts where a platform already has _res */
71#ifdef _res
72# undef _res
73#endif
74#define _res _compat_res
75
63struct __res_state _res; 76struct __res_state _res;
64 77
65/* Necessary functions and macros */ 78/* Necessary functions and macros */
@@ -290,10 +303,12 @@ getrrsetbyname(const char *hostname, unsigned int rdclass,
290 } 303 }
291 304
292 /* allocate memory for signatures */ 305 /* allocate memory for signatures */
293 rrset->rri_sigs = calloc(rrset->rri_nsigs, sizeof(struct rdatainfo)); 306 if (rrset->rri_nsigs > 0) {
294 if (rrset->rri_sigs == NULL) { 307 rrset->rri_sigs = calloc(rrset->rri_nsigs, sizeof(struct rdatainfo));
295 result = ERRSET_NOMEMORY; 308 if (rrset->rri_sigs == NULL) {
296 goto fail; 309 result = ERRSET_NOMEMORY;
310 goto fail;
311 }
297 } 312 }
298 313
299 /* copy answers & signatures */ 314 /* copy answers & signatures */
diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c
index f6a04ea3f..b3dd2b171 100644
--- a/openbsd-compat/glob.c
+++ b/openbsd-compat/glob.c
@@ -34,7 +34,21 @@
34/* OPENBSD ORIGINAL: lib/libc/gen/glob.c */ 34/* OPENBSD ORIGINAL: lib/libc/gen/glob.c */
35 35
36#include "includes.h" 36#include "includes.h"
37
38#include <sys/types.h>
39#include <sys/stat.h>
40
41#include <dirent.h>
37#include <ctype.h> 42#include <ctype.h>
43#include <errno.h>
44#include <pwd.h>
45#include <stdlib.h>
46#include <string.h>
47#include <unistd.h>
48
49#if !defined(HAVE_GLOB) || !defined(GLOB_HAS_ALTDIRFUNC) || \
50 !defined(GLOB_HAS_GL_MATCHC) || \
51 !defined(HAVE_DECL_GLOB_NOMATCH) || HAVE_DECL_GLOB_NOMATCH == 0
38 52
39static long 53static long
40get_arg_max(void) 54get_arg_max(void)
@@ -48,9 +62,6 @@ get_arg_max(void)
48#endif 62#endif
49} 63}
50 64
51#if !defined(HAVE_GLOB) || !defined(GLOB_HAS_ALTDIRFUNC) || \
52 !defined(GLOB_HAS_GL_MATCHC)
53
54/* 65/*
55 * glob(3) -- a superset of the one defined in POSIX 1003.2. 66 * glob(3) -- a superset of the one defined in POSIX 1003.2.
56 * 67 *
diff --git a/openbsd-compat/glob.h b/openbsd-compat/glob.h
index 4fdbfc1ea..9ba07f76e 100644
--- a/openbsd-compat/glob.h
+++ b/openbsd-compat/glob.h
@@ -38,7 +38,8 @@
38/* OPENBSD ORIGINAL: include/glob.h */ 38/* OPENBSD ORIGINAL: include/glob.h */
39 39
40#if !defined(HAVE_GLOB_H) || !defined(GLOB_HAS_ALTDIRFUNC) || \ 40#if !defined(HAVE_GLOB_H) || !defined(GLOB_HAS_ALTDIRFUNC) || \
41 !defined(GLOB_HAS_GL_MATCHC) 41 !defined(GLOB_HAS_GL_MATCHC) || \
42 !defined(HAVE_DECL_GLOB_NOMATCH) || HAVE_DECL_GLOB_NOMATCH == 0
42 43
43#ifndef _GLOB_H_ 44#ifndef _GLOB_H_
44#define _GLOB_H_ 45#define _GLOB_H_
diff --git a/openbsd-compat/mktemp.c b/openbsd-compat/mktemp.c
index 88e04c520..2285c84df 100644
--- a/openbsd-compat/mktemp.c
+++ b/openbsd-compat/mktemp.c
@@ -35,6 +35,14 @@
35 35
36#include "includes.h" 36#include "includes.h"
37 37
38#include <sys/types.h>
39#include <sys/stat.h>
40
41#include <fcntl.h>
42#include <ctype.h>
43#include <errno.h>
44#include <unistd.h>
45
38#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) 46#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP)
39 47
40static int _gettemp(char *, int *, int, int); 48static int _gettemp(char *, int *, int, int);
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
index 1a3027353..aac2e6cbc 100644
--- a/openbsd-compat/openbsd-compat.h
+++ b/openbsd-compat/openbsd-compat.h
@@ -1,4 +1,4 @@
1/* $Id: openbsd-compat.h,v 1.33 2005/12/31 05:33:37 djm Exp $ */ 1/* $Id: openbsd-compat.h,v 1.42 2006/09/03 12:44:50 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1999-2003 Damien Miller. All rights reserved. 4 * Copyright (c) 1999-2003 Damien Miller. All rights reserved.
@@ -31,6 +31,11 @@
31 31
32#include "includes.h" 32#include "includes.h"
33 33
34#include <sys/types.h>
35#include <pwd.h>
36
37#include <sys/socket.h>
38
34/* OpenBSD function replacements */ 39/* OpenBSD function replacements */
35#include "base64.h" 40#include "base64.h"
36#include "sigact.h" 41#include "sigact.h"
@@ -38,7 +43,7 @@
38#include "readpassphrase.h" 43#include "readpassphrase.h"
39#include "vis.h" 44#include "vis.h"
40#include "getrrsetbyname.h" 45#include "getrrsetbyname.h"
41 46#include "sha2.h"
42 47
43#ifndef HAVE_BASENAME 48#ifndef HAVE_BASENAME
44char *basename(const char *path); 49char *basename(const char *path);
@@ -126,13 +131,16 @@ int getgrouplist(const char *, gid_t, gid_t *, int *);
126int BSDgetopt(int argc, char * const *argv, const char *opts); 131int BSDgetopt(int argc, char * const *argv, const char *opts);
127#endif 132#endif
128 133
134#if defined(HAVE_DECL_WRITEV) && HAVE_DECL_WRITEV == 0
135# include <sys/types.h>
136# include <sys/uio.h>
137int writev(int, struct iovec *, int);
138#endif
129 139
130/* Home grown routines */ 140/* Home grown routines */
131#include "bsd-misc.h" 141#include "bsd-misc.h"
132#include "bsd-waitpid.h" 142#include "bsd-waitpid.h"
133 143
134/*#include <sys/types.h> XXX Still needed? * For uid_t, gid_t * */
135
136#ifndef HAVE_GETPEEREID 144#ifndef HAVE_GETPEEREID
137int getpeereid(int , uid_t *, gid_t *); 145int getpeereid(int , uid_t *, gid_t *);
138#endif 146#endif
@@ -147,13 +155,14 @@ int asprintf(char **, const char *, ...);
147#endif 155#endif
148 156
149#ifndef HAVE_OPENPTY 157#ifndef HAVE_OPENPTY
158# include <sys/ioctl.h> /* for struct winsize */
150int openpty(int *, int *, char *, struct termios *, struct winsize *); 159int openpty(int *, int *, char *, struct termios *, struct winsize *);
151#endif /* HAVE_OPENPTY */ 160#endif /* HAVE_OPENPTY */
152 161
153/* #include <sys/types.h> XXX needed? For size_t */ 162/* #include <sys/types.h> XXX needed? For size_t */
154 163
155#ifndef HAVE_SNPRINTF 164#ifndef HAVE_SNPRINTF
156int snprintf(char *, size_t, const char *, ...); 165int snprintf(char *, size_t, SNPRINTF_CONST char *, ...);
157#endif 166#endif
158 167
159#ifndef HAVE_STRTOLL 168#ifndef HAVE_STRTOLL
@@ -164,6 +173,10 @@ long long strtoll(const char *, char **, int);
164long long strtonum(const char *, long long, long long, const char **); 173long long strtonum(const char *, long long, long long, const char **);
165#endif 174#endif
166 175
176#if !defined(HAVE_VASPRINTF) || !defined(HAVE_VSNPRINTF)
177# include <stdarg.h>
178#endif
179
167#ifndef HAVE_VASPRINTF 180#ifndef HAVE_VASPRINTF
168int vasprintf(char **, const char *, va_list); 181int vasprintf(char **, const char *, va_list);
169#endif 182#endif
@@ -176,16 +189,18 @@ void *xmmap(size_t size);
176char *xcrypt(const char *password, const char *salt); 189char *xcrypt(const char *password, const char *salt);
177char *shadow_pw(struct passwd *pw); 190char *shadow_pw(struct passwd *pw);
178 191
179
180/* rfc2553 socket API replacements */ 192/* rfc2553 socket API replacements */
181#include "fake-rfc2553.h" 193#include "fake-rfc2553.h"
182 194
183/* Routines for a single OS platform */ 195/* Routines for a single OS platform */
184#include "bsd-cray.h" 196#include "bsd-cray.h"
185#include "bsd-cygwin_util.h" 197#include "bsd-cygwin_util.h"
186#include "port-irix.h" 198
187#include "port-aix.h" 199#include "port-aix.h"
188#include "port-uw.h" 200#include "port-irix.h"
201#include "port-linux.h"
202#include "port-solaris.h"
189#include "port-tun.h" 203#include "port-tun.h"
204#include "port-uw.h"
190 205
191#endif /* _OPENBSD_COMPAT_H */ 206#endif /* _OPENBSD_COMPAT_H */
diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c
index b690e8fe6..45ebd3f66 100644
--- a/openbsd-compat/openssl-compat.c
+++ b/openbsd-compat/openssl-compat.c
@@ -1,4 +1,4 @@
1/* $Id: openssl-compat.c,v 1.2 2005/06/17 11:15:21 dtucker Exp $ */ 1/* $Id: openssl-compat.c,v 1.4 2006/02/22 11:24:47 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au> 4 * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au>
@@ -18,7 +18,11 @@
18 18
19#include "includes.h" 19#include "includes.h"
20 20
21#define SSH_DONT_REDEF_EVP 21#ifdef USE_OPENSSL_ENGINE
22# include <openssl/engine.h>
23#endif
24
25#define SSH_DONT_OVERLOAD_OPENSSL_FUNCS
22#include "openssl-compat.h" 26#include "openssl-compat.h"
23 27
24#ifdef SSH_OLD_EVP 28#ifdef SSH_OLD_EVP
@@ -44,3 +48,15 @@ ssh_EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *evp)
44 return 1; 48 return 1;
45} 49}
46#endif 50#endif
51
52#ifdef USE_OPENSSL_ENGINE
53void
54ssh_SSLeay_add_all_algorithms(void)
55{
56 SSLeay_add_all_algorithms();
57
58 /* Enable use of crypto hardware */
59 ENGINE_load_builtin_engines();
60 ENGINE_register_all_complete();
61}
62#endif
diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h
index 8a015ec43..9b5ccff5f 100644
--- a/openbsd-compat/openssl-compat.h
+++ b/openbsd-compat/openssl-compat.h
@@ -1,4 +1,4 @@
1/* $Id: openssl-compat.h,v 1.3 2005/12/19 06:40:40 dtucker Exp $ */ 1/* $Id: openssl-compat.h,v 1.7 2007/03/05 07:25:20 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au> 4 * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au>
@@ -46,6 +46,11 @@ extern const EVP_CIPHER *evp_acss(void);
46# endif 46# endif
47#endif 47#endif
48 48
49/* OpenSSL 0.9.8e returns cipher key len not context key len */
50#if (OPENSSL_VERSION_NUMBER == 0x0090805fL)
51# define EVP_CIPHER_CTX_key_length(c) ((c)->key_len)
52#endif
53
49/* 54/*
50 * We overload some of the OpenSSL crypto functions with ssh_* equivalents 55 * We overload some of the OpenSSL crypto functions with ssh_* equivalents
51 * which cater for older and/or less featureful OpenSSL version. 56 * which cater for older and/or less featureful OpenSSL version.
@@ -54,21 +59,27 @@ extern const EVP_CIPHER *evp_acss(void);
54 * define SSH_DONT_OVERLOAD_OPENSSL_FUNCS before including this file and 59 * define SSH_DONT_OVERLOAD_OPENSSL_FUNCS before including this file and
55 * implement the ssh_* equivalents. 60 * implement the ssh_* equivalents.
56 */ 61 */
57#ifdef SSH_OLD_EVP 62#ifndef SSH_DONT_OVERLOAD_OPENSSL_FUNCS
58
59# ifndef SSH_DONT_REDEF_EVP
60 63
64# ifdef SSH_OLD_EVP
61# ifdef EVP_Cipher 65# ifdef EVP_Cipher
62# undef EVP_Cipher 66# undef EVP_Cipher
63# endif 67# endif
64
65# define EVP_CipherInit(a,b,c,d,e) ssh_EVP_CipherInit((a),(b),(c),(d),(e)) 68# define EVP_CipherInit(a,b,c,d,e) ssh_EVP_CipherInit((a),(b),(c),(d),(e))
66# define EVP_Cipher(a,b,c,d) ssh_EVP_Cipher((a),(b),(c),(d)) 69# define EVP_Cipher(a,b,c,d) ssh_EVP_Cipher((a),(b),(c),(d))
67# define EVP_CIPHER_CTX_cleanup(a) ssh_EVP_CIPHER_CTX_cleanup((a)) 70# define EVP_CIPHER_CTX_cleanup(a) ssh_EVP_CIPHER_CTX_cleanup((a))
68# endif 71# endif /* SSH_OLD_EVP */
72
73# ifdef USE_OPENSSL_ENGINE
74# ifdef SSLeay_add_all_algorithms
75# undef SSLeay_add_all_algorithms
76# endif
77# define SSLeay_add_all_algorithms() ssh_SSLeay_add_all_algorithms()
78#endif
69 79
70int ssh_EVP_CipherInit(EVP_CIPHER_CTX *, const EVP_CIPHER *, unsigned char *, 80int ssh_EVP_CipherInit(EVP_CIPHER_CTX *, const EVP_CIPHER *, unsigned char *,
71 unsigned char *, int); 81 unsigned char *, int);
72int ssh_EVP_Cipher(EVP_CIPHER_CTX *, char *, char *, int); 82int ssh_EVP_Cipher(EVP_CIPHER_CTX *, char *, char *, int);
73int ssh_EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *); 83int ssh_EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *);
74#endif 84void ssh_SSLeay_add_all_algorithms(void);
85#endif /* SSH_DONT_OVERLOAD_OPENSSL_FUNCS */
diff --git a/openbsd-compat/port-aix.c b/openbsd-compat/port-aix.c
index 81d8124e0..b9fabf61f 100644
--- a/openbsd-compat/port-aix.c
+++ b/openbsd-compat/port-aix.c
@@ -25,16 +25,36 @@
25 * 25 *
26 */ 26 */
27#include "includes.h" 27#include "includes.h"
28
29#include "xmalloc.h"
30#include "buffer.h"
31#include "key.h"
32#include "hostfile.h"
28#include "auth.h" 33#include "auth.h"
29#include "ssh.h" 34#include "ssh.h"
30#include "log.h" 35#include "log.h"
31#include "xmalloc.h"
32#include "buffer.h"
33 36
34#ifdef _AIX 37#ifdef _AIX
35 38
39#include <errno.h>
40#if defined(HAVE_NETDB_H)
41# include <netdb.h>
42#endif
36#include <uinfo.h> 43#include <uinfo.h>
44#include <stdarg.h>
45#include <string.h>
46#include <unistd.h>
37#include <sys/socket.h> 47#include <sys/socket.h>
48
49#ifdef WITH_AIXAUTHENTICATE
50# include <login.h>
51# include <userpw.h>
52# if defined(HAVE_SYS_AUDIT_H) && defined(AIX_LOGINFAILED_4ARG)
53# include <sys/audit.h>
54# endif
55# include <usersec.h>
56#endif
57
38#include "port-aix.h" 58#include "port-aix.h"
39 59
40# ifdef HAVE_SETAUTHDB 60# ifdef HAVE_SETAUTHDB
@@ -256,15 +276,17 @@ sys_auth_record_login(const char *user, const char *host, const char *ttynm,
256 Buffer *loginmsg) 276 Buffer *loginmsg)
257{ 277{
258 char *msg = NULL; 278 char *msg = NULL;
279 static int msg_done = 0;
259 int success = 0; 280 int success = 0;
260 281
261 aix_setauthdb(user); 282 aix_setauthdb(user);
262 if (loginsuccess((char *)user, (char *)host, (char *)ttynm, &msg) == 0) { 283 if (loginsuccess((char *)user, (char *)host, (char *)ttynm, &msg) == 0) {
263 success = 1; 284 success = 1;
264 if (msg != NULL) { 285 if (msg != NULL && loginmsg != NULL && !msg_done) {
265 debug("AIX/loginsuccess: msg %s", msg); 286 debug("AIX/loginsuccess: msg %s", msg);
266 buffer_append(loginmsg, msg, strlen(msg)); 287 buffer_append(loginmsg, msg, strlen(msg));
267 xfree(msg); 288 xfree(msg);
289 msg_done = 1;
268 } 290 }
269 } 291 }
270 aix_restoreauthdb(); 292 aix_restoreauthdb();
diff --git a/openbsd-compat/port-aix.h b/openbsd-compat/port-aix.h
index 37b2c12b0..5a04bedad 100644
--- a/openbsd-compat/port-aix.h
+++ b/openbsd-compat/port-aix.h
@@ -1,4 +1,4 @@
1/* $Id: port-aix.h,v 1.26 2005/05/28 10:28:40 dtucker Exp $ */ 1/* $Id: port-aix.h,v 1.27 2006/09/18 13:54:33 dtucker Exp $ */
2 2
3/* 3/*
4 * 4 *
@@ -31,18 +31,6 @@
31#ifdef HAVE_SYS_SOCKET_H 31#ifdef HAVE_SYS_SOCKET_H
32# include <sys/socket.h> 32# include <sys/socket.h>
33#endif 33#endif
34#ifdef HAVE_UNISTD_H
35# include <unistd.h> /* for seteuid() */
36#endif
37
38#ifdef WITH_AIXAUTHENTICATE
39# include <login.h>
40# include <userpw.h>
41# if defined(HAVE_SYS_AUDIT_H) && defined(AIX_LOGINFAILED_4ARG)
42# include <sys/audit.h>
43# endif
44# include <usersec.h>
45#endif
46 34
47#include "buffer.h" 35#include "buffer.h"
48 36
diff --git a/openbsd-compat/port-irix.c b/openbsd-compat/port-irix.c
index aa6db1cf8..ba751a538 100644
--- a/openbsd-compat/port-irix.c
+++ b/openbsd-compat/port-irix.c
@@ -29,6 +29,10 @@
29 defined(WITH_IRIX_JOBS) || \ 29 defined(WITH_IRIX_JOBS) || \
30 defined(WITH_IRIX_ARRAY) 30 defined(WITH_IRIX_ARRAY)
31 31
32#include <errno.h>
33#include <string.h>
34#include <unistd.h>
35
32#ifdef WITH_IRIX_PROJECT 36#ifdef WITH_IRIX_PROJECT
33# include <proj.h> 37# include <proj.h>
34#endif /* WITH_IRIX_PROJECT */ 38#endif /* WITH_IRIX_PROJECT */
diff --git a/openbsd-compat/port-linux.c b/openbsd-compat/port-linux.c
new file mode 100644
index 000000000..77f3a1c17
--- /dev/null
+++ b/openbsd-compat/port-linux.c
@@ -0,0 +1,169 @@
1/* $Id: port-linux.c,v 1.3 2006/09/01 05:38:41 djm Exp $ */
2
3/*
4 * Copyright (c) 2005 Daniel Walsh <dwalsh@redhat.com>
5 * Copyright (c) 2006 Damien Miller <djm@openbsd.org>
6 *
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
10 *
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 */
19
20/*
21 * Linux-specific portability code - just SELinux support at present
22 */
23
24#include "includes.h"
25
26#include <errno.h>
27#include <stdarg.h>
28#include <string.h>
29
30#ifdef WITH_SELINUX
31#include "log.h"
32#include "port-linux.h"
33
34#include <selinux/selinux.h>
35#include <selinux/flask.h>
36#include <selinux/get_context_list.h>
37
38/* Wrapper around is_selinux_enabled() to log its return value once only */
39static int
40ssh_selinux_enabled(void)
41{
42 static int enabled = -1;
43
44 if (enabled == -1) {
45 enabled = is_selinux_enabled();
46 debug("SELinux support %s", enabled ? "enabled" : "disabled");
47 }
48
49 return (enabled);
50}
51
52/* Return the default security context for the given username */
53static security_context_t
54ssh_selinux_getctxbyname(char *pwname)
55{
56 security_context_t sc;
57 char *sename = NULL, *lvl = NULL;
58 int r;
59
60#ifdef HAVE_GETSEUSERBYNAME
61 if (getseuserbyname(pwname, &sename, &lvl) != 0)
62 return NULL;
63#else
64 sename = pwname;
65 lvl = NULL;
66#endif
67
68#ifdef HAVE_GET_DEFAULT_CONTEXT_WITH_LEVEL
69 r = get_default_context_with_level(sename, lvl, NULL, &sc);
70#else
71 r = get_default_context(sename, NULL, &sc);
72#endif
73
74 if (r != 0) {
75 switch (security_getenforce()) {
76 case -1:
77 fatal("%s: ssh_selinux_getctxbyname: "
78 "security_getenforce() failed", __func__);
79 case 0:
80 error("%s: Failed to get default SELinux security "
81 "context for %s", __func__, pwname);
82 default:
83 fatal("%s: Failed to get default SELinux security "
84 "context for %s (in enforcing mode)",
85 __func__, pwname);
86 }
87 }
88
89#ifdef HAVE_GETSEUSERBYNAME
90 if (sename != NULL)
91 xfree(sename);
92 if (lvl != NULL)
93 xfree(lvl);
94#endif
95
96 return (sc);
97}
98
99/* Set the execution context to the default for the specified user */
100void
101ssh_selinux_setup_exec_context(char *pwname)
102{
103 security_context_t user_ctx = NULL;
104
105 if (!ssh_selinux_enabled())
106 return;
107
108 debug3("%s: setting execution context", __func__);
109
110 user_ctx = ssh_selinux_getctxbyname(pwname);
111 if (setexeccon(user_ctx) != 0) {
112 switch (security_getenforce()) {
113 case -1:
114 fatal("%s: security_getenforce() failed", __func__);
115 case 0:
116 error("%s: Failed to set SELinux execution "
117 "context for %s", __func__, pwname);
118 default:
119 fatal("%s: Failed to set SELinux execution context "
120 "for %s (in enforcing mode)", __func__, pwname);
121 }
122 }
123 if (user_ctx != NULL)
124 freecon(user_ctx);
125
126 debug3("%s: done", __func__);
127}
128
129/* Set the TTY context for the specified user */
130void
131ssh_selinux_setup_pty(char *pwname, const char *tty)
132{
133 security_context_t new_tty_ctx = NULL;
134 security_context_t user_ctx = NULL;
135 security_context_t old_tty_ctx = NULL;
136
137 if (!ssh_selinux_enabled())
138 return;
139
140 debug3("%s: setting TTY context on %s", __func__, tty);
141
142 user_ctx = ssh_selinux_getctxbyname(pwname);
143
144 /* XXX: should these calls fatal() upon failure in enforcing mode? */
145
146 if (getfilecon(tty, &old_tty_ctx) == -1) {
147 error("%s: getfilecon: %s", __func__, strerror(errno));
148 goto out;
149 }
150
151 if (security_compute_relabel(user_ctx, old_tty_ctx,
152 SECCLASS_CHR_FILE, &new_tty_ctx) != 0) {
153 error("%s: security_compute_relabel: %s",
154 __func__, strerror(errno));
155 goto out;
156 }
157
158 if (setfilecon(tty, new_tty_ctx) != 0)
159 error("%s: setfilecon: %s", __func__, strerror(errno));
160 out:
161 if (new_tty_ctx != NULL)
162 freecon(new_tty_ctx);
163 if (old_tty_ctx != NULL)
164 freecon(old_tty_ctx);
165 if (user_ctx != NULL)
166 freecon(user_ctx);
167 debug3("%s: done", __func__);
168}
169#endif /* WITH_SELINUX */
diff --git a/openbsd-compat/port-linux.h b/openbsd-compat/port-linux.h
new file mode 100644
index 000000000..05e520e1c
--- /dev/null
+++ b/openbsd-compat/port-linux.h
@@ -0,0 +1,27 @@
1/* $Id: port-linux.h,v 1.1 2006/04/22 11:26:08 djm Exp $ */
2
3/*
4 * Copyright (c) 2006 Damien Miller <djm@openbsd.org>
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 THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18
19#ifndef _PORT_LINUX_H
20#define _PORT_LINUX_H
21
22#ifdef WITH_SELINUX
23void ssh_selinux_setup_pty(char *, const char *);
24void ssh_selinux_setup_exec_context(char *);
25#endif
26
27#endif /* ! _PORT_LINUX_H */
diff --git a/openbsd-compat/port-solaris.c b/openbsd-compat/port-solaris.c
new file mode 100644
index 000000000..2ab64d487
--- /dev/null
+++ b/openbsd-compat/port-solaris.c
@@ -0,0 +1,199 @@
1/* $Id: port-solaris.c,v 1.3 2006/10/31 23:28:49 dtucker Exp $ */
2
3/*
4 * Copyright (c) 2006 Chad Mynhier.
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 THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18
19#include "config.h"
20#include "includes.h"
21
22#ifdef USE_SOLARIS_PROCESS_CONTRACTS
23
24#include <sys/types.h>
25#include <sys/stat.h>
26#include <sys/param.h>
27
28#include <errno.h>
29#ifdef HAVE_FCNTL_H
30# include <fcntl.h>
31#endif
32#include <stdarg.h>
33#include <string.h>
34#include <unistd.h>
35
36#include <libcontract.h>
37#include <sys/contract/process.h>
38#include <sys/ctfs.h>
39
40#include "log.h"
41
42#define CT_TEMPLATE CTFS_ROOT "/process/template"
43#define CT_LATEST CTFS_ROOT "/process/latest"
44
45static int tmpl_fd = -1;
46
47/* Lookup the latest process contract */
48static ctid_t
49get_active_process_contract_id(void)
50{
51 int stat_fd;
52 ctid_t ctid = -1;
53 ct_stathdl_t stathdl;
54
55 if ((stat_fd = open64(CT_LATEST, O_RDONLY)) == -1) {
56 error("%s: Error opening 'latest' process "
57 "contract: %s", __func__, strerror(errno));
58 return -1;
59 }
60 if (ct_status_read(stat_fd, CTD_COMMON, &stathdl) != 0) {
61 error("%s: Error reading process contract "
62 "status: %s", __func__, strerror(errno));
63 goto out;
64 }
65 if ((ctid = ct_status_get_id(stathdl)) < 0) {
66 error("%s: Error getting process contract id: %s",
67 __func__, strerror(errno));
68 goto out;
69 }
70
71 ct_status_free(stathdl);
72 out:
73 close(stat_fd);
74 return ctid;
75}
76
77void
78solaris_contract_pre_fork(void)
79{
80 if ((tmpl_fd = open64(CT_TEMPLATE, O_RDWR)) == -1) {
81 error("%s: open %s: %s", __func__,
82 CT_TEMPLATE, strerror(errno));
83 return;
84 }
85
86 debug2("%s: setting up process contract template on fd %d",
87 __func__, tmpl_fd);
88
89 /* First we set the template parameters and event sets. */
90 if (ct_pr_tmpl_set_param(tmpl_fd, CT_PR_PGRPONLY) != 0) {
91 error("%s: Error setting process contract parameter set "
92 "(pgrponly): %s", __func__, strerror(errno));
93 goto fail;
94 }
95 if (ct_pr_tmpl_set_fatal(tmpl_fd, CT_PR_EV_HWERR) != 0) {
96 error("%s: Error setting process contract template "
97 "fatal events: %s", __func__, strerror(errno));
98 goto fail;
99 }
100 if (ct_tmpl_set_critical(tmpl_fd, 0) != 0) {
101 error("%s: Error setting process contract template "
102 "critical events: %s", __func__, strerror(errno));
103 goto fail;
104 }
105 if (ct_tmpl_set_informative(tmpl_fd, CT_PR_EV_HWERR) != 0) {
106 error("%s: Error setting process contract template "
107 "informative events: %s", __func__, strerror(errno));
108 goto fail;
109 }
110
111 /* Now make this the active template for this process. */
112 if (ct_tmpl_activate(tmpl_fd) != 0) {
113 error("%s: Error activating process contract "
114 "template: %s", __func__, strerror(errno));
115 goto fail;
116 }
117 return;
118
119 fail:
120 if (tmpl_fd != -1) {
121 close(tmpl_fd);
122 tmpl_fd = -1;
123 }
124}
125
126void
127solaris_contract_post_fork_child()
128{
129 debug2("%s: clearing process contract template on fd %d",
130 __func__, tmpl_fd);
131
132 /* Clear the active template. */
133 if (ct_tmpl_clear(tmpl_fd) != 0)
134 error("%s: Error clearing active process contract "
135 "template: %s", __func__, strerror(errno));
136
137 close(tmpl_fd);
138 tmpl_fd = -1;
139}
140
141void
142solaris_contract_post_fork_parent(pid_t pid)
143{
144 ctid_t ctid;
145 char ctl_path[256];
146 int r, ctl_fd = -1, stat_fd = -1;
147
148 debug2("%s: clearing template (fd %d)", __func__, tmpl_fd);
149
150 if (tmpl_fd == -1)
151 return;
152
153 /* First clear the active template. */
154 if ((r = ct_tmpl_clear(tmpl_fd)) != 0)
155 error("%s: Error clearing active process contract "
156 "template: %s", __func__, strerror(errno));
157
158 close(tmpl_fd);
159 tmpl_fd = -1;
160
161 /*
162 * If either the fork didn't succeed (pid < 0), or clearing
163 * th active contract failed (r != 0), then we have nothing
164 * more do.
165 */
166 if (r != 0 || pid <= 0)
167 return;
168
169 /* Now lookup and abandon the contract we've created. */
170 ctid = get_active_process_contract_id();
171
172 debug2("%s: abandoning contract id %ld", __func__, ctid);
173
174 snprintf(ctl_path, sizeof(ctl_path),
175 CTFS_ROOT "/process/%ld/ctl", ctid);
176 if ((ctl_fd = open64(ctl_path, O_WRONLY)) < 0) {
177 error("%s: Error opening process contract "
178 "ctl file: %s", __func__, strerror(errno));
179 goto fail;
180 }
181 if (ct_ctl_abandon(ctl_fd) < 0) {
182 error("%s: Error abandoning process contract: %s",
183 __func__, strerror(errno));
184 goto fail;
185 }
186 close(ctl_fd);
187 return;
188
189 fail:
190 if (tmpl_fd != -1) {
191 close(tmpl_fd);
192 tmpl_fd = -1;
193 }
194 if (stat_fd != -1)
195 close(stat_fd);
196 if (ctl_fd != -1)
197 close(ctl_fd);
198}
199#endif
diff --git a/openbsd-compat/port-solaris.h b/openbsd-compat/port-solaris.h
new file mode 100644
index 000000000..4c324871e
--- /dev/null
+++ b/openbsd-compat/port-solaris.h
@@ -0,0 +1,27 @@
1/* $Id: port-solaris.h,v 1.1 2006/08/30 17:24:42 djm Exp $ */
2
3/*
4 * Copyright (c) 2006 Chad Mynhier.
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 THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18
19#ifndef _PORT_SOLARIS_H
20
21#include <sys/types.h>
22
23void solaris_contract_pre_fork(void);
24void solaris_contract_post_fork_child(void);
25void solaris_contract_post_fork_parent(pid_t pid);
26
27#endif
diff --git a/openbsd-compat/port-tun.c b/openbsd-compat/port-tun.c
index 31921615f..276474db8 100644
--- a/openbsd-compat/port-tun.c
+++ b/openbsd-compat/port-tun.c
@@ -16,9 +16,23 @@
16 16
17#include "includes.h" 17#include "includes.h"
18 18
19#include <sys/types.h>
20#include <sys/ioctl.h>
21
22#include <netinet/in.h>
23#include <arpa/inet.h>
24#include <netinet/ip.h>
25
26#include <errno.h>
27#include <fcntl.h>
28#include <stdarg.h>
29#include <string.h>
30#include <unistd.h>
31
19#include "log.h" 32#include "log.h"
20#include "misc.h" 33#include "misc.h"
21#include "bufaux.h" 34#include "buffer.h"
35#include "channels.h"
22 36
23/* 37/*
24 * This is the portable version of the SSH tunnel forwarding, it 38 * This is the portable version of the SSH tunnel forwarding, it
@@ -26,6 +40,7 @@
26 * settings. 40 * settings.
27 * 41 *
28 * SSH_TUN_LINUX Use the (newer) Linux tun/tap device 42 * SSH_TUN_LINUX Use the (newer) Linux tun/tap device
43 * SSH_TUN_FREEBSD Use the FreeBSD tun/tap device
29 * SSH_TUN_COMPAT_AF Translate the OpenBSD address family 44 * SSH_TUN_COMPAT_AF Translate the OpenBSD address family
30 * SSH_TUN_PREPEND_AF Prepend/remove the address family 45 * SSH_TUN_PREPEND_AF Prepend/remove the address family
31 */ 46 */
@@ -93,7 +108,10 @@ sys_tun_open(int tun, int mode)
93#ifdef SSH_TUN_FREEBSD 108#ifdef SSH_TUN_FREEBSD
94#include <sys/socket.h> 109#include <sys/socket.h>
95#include <net/if.h> 110#include <net/if.h>
111
112#ifdef HAVE_NET_IF_TUN_H
96#include <net/if_tun.h> 113#include <net/if_tun.h>
114#endif
97 115
98int 116int
99sys_tun_open(int tun, int mode) 117sys_tun_open(int tun, int mode)
diff --git a/openbsd-compat/port-tun.h b/openbsd-compat/port-tun.h
index 86d9272b4..c53df01fc 100644
--- a/openbsd-compat/port-tun.h
+++ b/openbsd-compat/port-tun.h
@@ -17,7 +17,7 @@
17#ifndef _PORT_TUN_H 17#ifndef _PORT_TUN_H
18#define _PORT_TUN_H 18#define _PORT_TUN_H
19 19
20#include "channels.h" 20struct Channel;
21 21
22#if defined(SSH_TUN_LINUX) || defined(SSH_TUN_FREEBSD) 22#if defined(SSH_TUN_LINUX) || defined(SSH_TUN_FREEBSD)
23# define CUSTOM_SYS_TUN_OPEN 23# define CUSTOM_SYS_TUN_OPEN
diff --git a/openbsd-compat/port-uw.c b/openbsd-compat/port-uw.c
index c64427121..6f3523902 100644
--- a/openbsd-compat/port-uw.c
+++ b/openbsd-compat/port-uw.c
@@ -26,15 +26,26 @@
26#include "includes.h" 26#include "includes.h"
27 27
28#ifdef HAVE_LIBIAF 28#ifdef HAVE_LIBIAF
29#include <sys/types.h>
29#ifdef HAVE_CRYPT_H 30#ifdef HAVE_CRYPT_H
30#include <crypt.h> 31# include <crypt.h>
31#endif 32#endif
33#include <pwd.h>
34#include <stdarg.h>
35#include <stdlib.h>
36#include <stdio.h>
37#include <string.h>
38
39#include "xmalloc.h"
32#include "packet.h" 40#include "packet.h"
33#include "buffer.h" 41#include "buffer.h"
42#include "auth-options.h"
34#include "log.h" 43#include "log.h"
35#include "servconf.h" 44#include "servconf.h"
45#include "key.h"
46#include "hostfile.h"
36#include "auth.h" 47#include "auth.h"
37#include "auth-options.h" 48#include "ssh.h"
38 49
39int nischeck(char *); 50int nischeck(char *);
40 51
diff --git a/openbsd-compat/readpassphrase.c b/openbsd-compat/readpassphrase.c
index 919c0174a..11bd8f646 100644
--- a/openbsd-compat/readpassphrase.c
+++ b/openbsd-compat/readpassphrase.c
@@ -27,7 +27,13 @@
27#ifndef HAVE_READPASSPHRASE 27#ifndef HAVE_READPASSPHRASE
28 28
29#include <termios.h> 29#include <termios.h>
30#include <signal.h>
31#include <ctype.h>
32#include <fcntl.h>
30#include <readpassphrase.h> 33#include <readpassphrase.h>
34#include <errno.h>
35#include <string.h>
36#include <unistd.h>
31 37
32#ifdef TCSASOFT 38#ifdef TCSASOFT
33# define _T_FLUSH (TCSAFLUSH|TCSASOFT) 39# define _T_FLUSH (TCSAFLUSH|TCSASOFT)
diff --git a/openbsd-compat/regress/Makefile.in b/openbsd-compat/regress/Makefile.in
new file mode 100644
index 000000000..bcf214bd0
--- /dev/null
+++ b/openbsd-compat/regress/Makefile.in
@@ -0,0 +1,38 @@
1# $Id: Makefile.in,v 1.4 2006/08/19 09:12:14 dtucker Exp $
2
3sysconfdir=@sysconfdir@
4piddir=@piddir@
5srcdir=@srcdir@
6top_srcdir=@top_srcdir@
7
8VPATH=@srcdir@
9CC=@CC@
10LD=@LD@
11CFLAGS=@CFLAGS@
12CPPFLAGS=-I. -I.. -I$(srcdir) -I$(srcdir)/.. @CPPFLAGS@ @DEFS@
13EXEEXT=@EXEEXT@
14LIBCOMPAT=../libopenbsd-compat.a
15LIBS=@LIBS@
16LDFLAGS=@LDFLAGS@ $(LIBCOMPAT)
17
18TESTPROGS=closefromtest$(EXEEXT) snprintftest$(EXEEXT) strduptest$(EXEEXT) \
19 strtonumtest$(EXEEXT)
20
21all: t-exec ${OTHERTESTS}
22
23%$(EXEEXT): %.c
24 $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $< $(LIBCOMPAT) $(LIBS)
25
26t-exec: $(TESTPROGS)
27 @echo running compat regress tests
28 @for TEST in ""$?; do \
29 echo "run test $${TEST}" ... 1>&2; \
30 ./$${TEST}$(EXEEXT) || exit $$? ; \
31 done
32 @echo finished compat regress tests
33
34clean:
35 rm -f *.o *.a core $(TESTPROGS) valid.out
36
37distclean: clean
38 rm -f Makefile *~
diff --git a/openbsd-compat/regress/closefromtest.c b/openbsd-compat/regress/closefromtest.c
new file mode 100644
index 000000000..feb1b567d
--- /dev/null
+++ b/openbsd-compat/regress/closefromtest.c
@@ -0,0 +1,60 @@
1/*
2 * Copyright (c) 2006 Darren Tucker
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
17#include <sys/types.h>
18#include <sys/stat.h>
19
20#include <fcntl.h>
21#include <stdio.h>
22#include <stdlib.h>
23#include <unistd.h>
24
25#define NUM_OPENS 10
26
27void
28fail(char *msg)
29{
30 fprintf(stderr, "closefrom: %s\n", msg);
31 exit(1);
32}
33
34int
35main(void)
36{
37 int i, max, fds[NUM_OPENS];
38 char buf[512];
39
40 for (i = 0; i < NUM_OPENS; i++)
41 if ((fds[i] = open("/dev/null", "r")) == -1)
42 exit(0); /* can't test */
43 max = i - 1;
44
45 /* should close last fd only */
46 closefrom(fds[max]);
47 if (close(fds[max]) != -1)
48 fail("failed to close highest fd");
49
50 /* make sure we can still use remaining descriptors */
51 for (i = 0; i < max; i++)
52 if (read(fds[i], buf, sizeof(buf)) == -1)
53 fail("closed descriptors it should not have");
54
55 /* should close all fds */
56 closefrom(fds[0]);
57 for (i = 0; i < NUM_OPENS; i++)
58 if (close(fds[i]) != -1)
59 fail("failed to close from lowest fd");
60}
diff --git a/openbsd-compat/regress/snprintftest.c b/openbsd-compat/regress/snprintftest.c
new file mode 100644
index 000000000..4ca63e180
--- /dev/null
+++ b/openbsd-compat/regress/snprintftest.c
@@ -0,0 +1,73 @@
1/*
2 * Copyright (c) 2005 Darren Tucker
3 * Copyright (c) 2005 Damien Miller
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18#define BUFSZ 2048
19
20#include <sys/types.h>
21#include <stdlib.h>
22#include <stdio.h>
23#include <stdarg.h>
24#include <string.h>
25
26static int failed = 0;
27
28static void
29fail(const char *m)
30{
31 fprintf(stderr, "snprintftest: %s\n", m);
32 failed = 1;
33}
34
35int x_snprintf(char *str, size_t count, const char *fmt, ...)
36{
37 size_t ret;
38 va_list ap;
39
40 va_start(ap, fmt);
41 ret = vsnprintf(str, count, fmt, ap);
42 va_end(ap);
43 return ret;
44}
45
46int
47main(void)
48{
49 char b[5];
50 char *src;
51
52 snprintf(b,5,"123456789");
53 if (b[4] != '\0')
54 fail("snprintf does not correctly terminate long strings");
55
56 /* check for read overrun on unterminated string */
57 if ((src = malloc(BUFSZ)) == NULL) {
58 fail("malloc failed");
59 } else {
60 memset(src, 'a', BUFSZ);
61 snprintf(b, sizeof(b), "%.*s", 1, src);
62 if (strcmp(b, "a") != 0)
63 fail("failed with length limit '%%.s'");
64 }
65
66 /* check that snprintf and vsnprintf return sane values */
67 if (snprintf(b, 1, "%s %d", "hello", 12345) != 11)
68 fail("snprintf does not return required length");
69 if (x_snprintf(b, 1, "%s %d", "hello", 12345) != 11)
70 fail("vsnprintf does not return required length");
71
72 return failed;
73}
diff --git a/openbsd-compat/regress/strduptest.c b/openbsd-compat/regress/strduptest.c
new file mode 100644
index 000000000..7f6d779be
--- /dev/null
+++ b/openbsd-compat/regress/strduptest.c
@@ -0,0 +1,45 @@
1/*
2 * Copyright (c) 2005 Darren Tucker
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
17#include <stdlib.h>
18#include <string.h>
19
20static int fail = 0;
21
22void
23test(const char *a)
24{
25 char *b;
26
27 b = strdup(a);
28 if (b == 0) {
29 fail = 1;
30 return;
31 }
32 if (strcmp(a, b) != 0)
33 fail = 1;
34 free(b);
35}
36
37int
38main(void)
39{
40 test("");
41 test("a");
42 test("\0");
43 test("abcdefghijklmnopqrstuvwxyz");
44 return fail;
45}
diff --git a/openbsd-compat/regress/strtonumtest.c b/openbsd-compat/regress/strtonumtest.c
new file mode 100644
index 000000000..cb8585129
--- /dev/null
+++ b/openbsd-compat/regress/strtonumtest.c
@@ -0,0 +1,66 @@
1/* $OpenBSD: strtonumtest.c,v 1.1 2004/08/03 20:38:36 otto Exp $ */
2/*
3 * Copyright (c) 2004 Otto Moerbeek <otto@drijf.net>
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18/* OPENBSD ORIGINAL: regress/lib/libc/strtonum/strtonumtest.c */
19
20#include <limits.h>
21#include <stdio.h>
22#include <stdlib.h>
23
24int fail;
25
26void
27test(const char *p, long long lb, long long ub, int ok)
28{
29 long long val;
30 const char *q;
31
32 val = strtonum(p, lb, ub, &q);
33 if (ok && q != NULL) {
34 fprintf(stderr, "%s [%lld-%lld] ", p, lb, ub);
35 fprintf(stderr, "NUMBER NOT ACCEPTED %s\n", q);
36 fail = 1;
37 } else if (!ok && q == NULL) {
38 fprintf(stderr, "%s [%lld-%lld] %lld ", p, lb, ub, val);
39 fprintf(stderr, "NUMBER ACCEPTED\n");
40 fail = 1;
41 }
42}
43
44int main(int argc, char *argv[])
45{
46 test("1", 0, 10, 1);
47 test("0", -2, 5, 1);
48 test("0", 2, 5, 0);
49 test("0", 2, LLONG_MAX, 0);
50 test("-2", 0, LLONG_MAX, 0);
51 test("0", -5, LLONG_MAX, 1);
52 test("-3", -3, LLONG_MAX, 1);
53 test("-9223372036854775808", LLONG_MIN, LLONG_MAX, 1);
54 test("9223372036854775807", LLONG_MIN, LLONG_MAX, 1);
55 test("-9223372036854775809", LLONG_MIN, LLONG_MAX, 0);
56 test("9223372036854775808", LLONG_MIN, LLONG_MAX, 0);
57 test("1000000000000000000000000", LLONG_MIN, LLONG_MAX, 0);
58 test("-1000000000000000000000000", LLONG_MIN, LLONG_MAX, 0);
59 test("-2", 10, -1, 0);
60 test("-2", -10, -1, 1);
61 test("-20", -10, -1, 0);
62 test("20", -10, -1, 0);
63
64 return (fail);
65}
66
diff --git a/openbsd-compat/rresvport.c b/openbsd-compat/rresvport.c
index 71cf6e6eb..5b0275ce0 100644
--- a/openbsd-compat/rresvport.c
+++ b/openbsd-compat/rresvport.c
@@ -35,6 +35,16 @@
35 35
36#ifndef HAVE_RRESVPORT_AF 36#ifndef HAVE_RRESVPORT_AF
37 37
38#include <sys/types.h>
39#include <sys/socket.h>
40
41#include <netinet/in.h>
42#include <arpa/inet.h>
43
44#include <errno.h>
45#include <stdlib.h>
46#include <string.h>
47
38#if 0 48#if 0
39int 49int
40rresvport(int *alport) 50rresvport(int *alport)
diff --git a/openbsd-compat/setproctitle.c b/openbsd-compat/setproctitle.c
index 6e2b19bb4..b511f6649 100644
--- a/openbsd-compat/setproctitle.c
+++ b/openbsd-compat/setproctitle.c
@@ -35,10 +35,13 @@
35 35
36#ifndef HAVE_SETPROCTITLE 36#ifndef HAVE_SETPROCTITLE
37 37
38#include <stdarg.h>
39#include <stdlib.h>
38#include <unistd.h> 40#include <unistd.h>
39#ifdef HAVE_SYS_PSTAT_H 41#ifdef HAVE_SYS_PSTAT_H
40#include <sys/pstat.h> 42#include <sys/pstat.h>
41#endif 43#endif
44#include <string.h>
42 45
43#define SPT_NONE 0 /* don't use it at all */ 46#define SPT_NONE 0 /* don't use it at all */
44#define SPT_PSTAT 1 /* use pstat(PSTAT_SETCMD, ...) */ 47#define SPT_PSTAT 1 /* use pstat(PSTAT_SETCMD, ...) */
@@ -80,7 +83,7 @@ compat_init_setproctitle(int argc, char *argv[])
80 /* Fail if we can't allocate room for the new environment */ 83 /* Fail if we can't allocate room for the new environment */
81 for (i = 0; envp[i] != NULL; i++) 84 for (i = 0; envp[i] != NULL; i++)
82 ; 85 ;
83 if ((environ = malloc(sizeof(*environ) * (i + 1))) == NULL) { 86 if ((environ = calloc(i + 1, sizeof(*environ))) == NULL) {
84 environ = envp; /* put it back */ 87 environ = envp; /* put it back */
85 return; 88 return;
86 } 89 }
diff --git a/openbsd-compat/sha2.c b/openbsd-compat/sha2.c
new file mode 100755
index 000000000..cf8e0ad66
--- /dev/null
+++ b/openbsd-compat/sha2.c
@@ -0,0 +1,882 @@
1/* $OpenBSD: sha2.c,v 1.11 2005/08/08 08:05:35 espie Exp $ */
2
3/*
4 * FILE: sha2.c
5 * AUTHOR: Aaron D. Gifford <me@aarongifford.com>
6 *
7 * Copyright (c) 2000-2001, Aaron D. Gifford
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. Neither the name of the copyright holder nor the names of contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * $From: sha2.c,v 1.1 2001/11/08 00:01:51 adg Exp adg $
35 */
36
37/* OPENBSD ORIGINAL: lib/libc/hash/sha2.c */
38
39#include "includes.h"
40
41#include <openssl/opensslv.h>
42
43#if !defined(HAVE_EVP_SHA256) && !defined(HAVE_SHA256_UPDATE) && \
44 (OPENSSL_VERSION_NUMBER >= 0x00907000L)
45#include <sys/types.h>
46#include <string.h>
47#include "sha2.h"
48
49/*
50 * UNROLLED TRANSFORM LOOP NOTE:
51 * You can define SHA2_UNROLL_TRANSFORM to use the unrolled transform
52 * loop version for the hash transform rounds (defined using macros
53 * later in this file). Either define on the command line, for example:
54 *
55 * cc -DSHA2_UNROLL_TRANSFORM -o sha2 sha2.c sha2prog.c
56 *
57 * or define below:
58 *
59 * #define SHA2_UNROLL_TRANSFORM
60 *
61 */
62
63/*** SHA-256/384/512 Machine Architecture Definitions *****************/
64/*
65 * BYTE_ORDER NOTE:
66 *
67 * Please make sure that your system defines BYTE_ORDER. If your
68 * architecture is little-endian, make sure it also defines
69 * LITTLE_ENDIAN and that the two (BYTE_ORDER and LITTLE_ENDIAN) are
70 * equivilent.
71 *
72 * If your system does not define the above, then you can do so by
73 * hand like this:
74 *
75 * #define LITTLE_ENDIAN 1234
76 * #define BIG_ENDIAN 4321
77 *
78 * And for little-endian machines, add:
79 *
80 * #define BYTE_ORDER LITTLE_ENDIAN
81 *
82 * Or for big-endian machines:
83 *
84 * #define BYTE_ORDER BIG_ENDIAN
85 *
86 * The FreeBSD machine this was written on defines BYTE_ORDER
87 * appropriately by including <sys/types.h> (which in turn includes
88 * <machine/endian.h> where the appropriate definitions are actually
89 * made).
90 */
91#if !defined(BYTE_ORDER) || (BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN)
92#error Define BYTE_ORDER to be equal to either LITTLE_ENDIAN or BIG_ENDIAN
93#endif
94
95
96/*** SHA-256/384/512 Various Length Definitions ***********************/
97/* NOTE: Most of these are in sha2.h */
98#define SHA256_SHORT_BLOCK_LENGTH (SHA256_BLOCK_LENGTH - 8)
99#define SHA384_SHORT_BLOCK_LENGTH (SHA384_BLOCK_LENGTH - 16)
100#define SHA512_SHORT_BLOCK_LENGTH (SHA512_BLOCK_LENGTH - 16)
101
102/*** ENDIAN SPECIFIC COPY MACROS **************************************/
103#define BE_8_TO_32(dst, cp) do { \
104 (dst) = (u_int32_t)(cp)[3] | ((u_int32_t)(cp)[2] << 8) | \
105 ((u_int32_t)(cp)[1] << 16) | ((u_int32_t)(cp)[0] << 24); \
106} while(0)
107
108#define BE_8_TO_64(dst, cp) do { \
109 (dst) = (u_int64_t)(cp)[7] | ((u_int64_t)(cp)[6] << 8) | \
110 ((u_int64_t)(cp)[5] << 16) | ((u_int64_t)(cp)[4] << 24) | \
111 ((u_int64_t)(cp)[3] << 32) | ((u_int64_t)(cp)[2] << 40) | \
112 ((u_int64_t)(cp)[1] << 48) | ((u_int64_t)(cp)[0] << 56); \
113} while (0)
114
115#define BE_64_TO_8(cp, src) do { \
116 (cp)[0] = (src) >> 56; \
117 (cp)[1] = (src) >> 48; \
118 (cp)[2] = (src) >> 40; \
119 (cp)[3] = (src) >> 32; \
120 (cp)[4] = (src) >> 24; \
121 (cp)[5] = (src) >> 16; \
122 (cp)[6] = (src) >> 8; \
123 (cp)[7] = (src); \
124} while (0)
125
126#define BE_32_TO_8(cp, src) do { \
127 (cp)[0] = (src) >> 24; \
128 (cp)[1] = (src) >> 16; \
129 (cp)[2] = (src) >> 8; \
130 (cp)[3] = (src); \
131} while (0)
132
133/*
134 * Macro for incrementally adding the unsigned 64-bit integer n to the
135 * unsigned 128-bit integer (represented using a two-element array of
136 * 64-bit words):
137 */
138#define ADDINC128(w,n) do { \
139 (w)[0] += (u_int64_t)(n); \
140 if ((w)[0] < (n)) { \
141 (w)[1]++; \
142 } \
143} while (0)
144
145/*** THE SIX LOGICAL FUNCTIONS ****************************************/
146/*
147 * Bit shifting and rotation (used by the six SHA-XYZ logical functions:
148 *
149 * NOTE: The naming of R and S appears backwards here (R is a SHIFT and
150 * S is a ROTATION) because the SHA-256/384/512 description document
151 * (see http://csrc.nist.gov/cryptval/shs/sha256-384-512.pdf) uses this
152 * same "backwards" definition.
153 */
154/* Shift-right (used in SHA-256, SHA-384, and SHA-512): */
155#define R(b,x) ((x) >> (b))
156/* 32-bit Rotate-right (used in SHA-256): */
157#define S32(b,x) (((x) >> (b)) | ((x) << (32 - (b))))
158/* 64-bit Rotate-right (used in SHA-384 and SHA-512): */
159#define S64(b,x) (((x) >> (b)) | ((x) << (64 - (b))))
160
161/* Two of six logical functions used in SHA-256, SHA-384, and SHA-512: */
162#define Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z)))
163#define Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
164
165/* Four of six logical functions used in SHA-256: */
166#define Sigma0_256(x) (S32(2, (x)) ^ S32(13, (x)) ^ S32(22, (x)))
167#define Sigma1_256(x) (S32(6, (x)) ^ S32(11, (x)) ^ S32(25, (x)))
168#define sigma0_256(x) (S32(7, (x)) ^ S32(18, (x)) ^ R(3 , (x)))
169#define sigma1_256(x) (S32(17, (x)) ^ S32(19, (x)) ^ R(10, (x)))
170
171/* Four of six logical functions used in SHA-384 and SHA-512: */
172#define Sigma0_512(x) (S64(28, (x)) ^ S64(34, (x)) ^ S64(39, (x)))
173#define Sigma1_512(x) (S64(14, (x)) ^ S64(18, (x)) ^ S64(41, (x)))
174#define sigma0_512(x) (S64( 1, (x)) ^ S64( 8, (x)) ^ R( 7, (x)))
175#define sigma1_512(x) (S64(19, (x)) ^ S64(61, (x)) ^ R( 6, (x)))
176
177
178/*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS ************************/
179/* Hash constant words K for SHA-256: */
180const static u_int32_t K256[64] = {
181 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL,
182 0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL,
183 0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL,
184 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL, 0xc19bf174UL,
185 0xe49b69c1UL, 0xefbe4786UL, 0x0fc19dc6UL, 0x240ca1ccUL,
186 0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL,
187 0x983e5152UL, 0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL,
188 0xc6e00bf3UL, 0xd5a79147UL, 0x06ca6351UL, 0x14292967UL,
189 0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL, 0x53380d13UL,
190 0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL,
191 0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL,
192 0xd192e819UL, 0xd6990624UL, 0xf40e3585UL, 0x106aa070UL,
193 0x19a4c116UL, 0x1e376c08UL, 0x2748774cUL, 0x34b0bcb5UL,
194 0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL, 0x682e6ff3UL,
195 0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL,
196 0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL
197};
198
199/* Initial hash value H for SHA-256: */
200const static u_int32_t sha256_initial_hash_value[8] = {
201 0x6a09e667UL,
202 0xbb67ae85UL,
203 0x3c6ef372UL,
204 0xa54ff53aUL,
205 0x510e527fUL,
206 0x9b05688cUL,
207 0x1f83d9abUL,
208 0x5be0cd19UL
209};
210
211/* Hash constant words K for SHA-384 and SHA-512: */
212const static u_int64_t K512[80] = {
213 0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL,
214 0xb5c0fbcfec4d3b2fULL, 0xe9b5dba58189dbbcULL,
215 0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL,
216 0x923f82a4af194f9bULL, 0xab1c5ed5da6d8118ULL,
217 0xd807aa98a3030242ULL, 0x12835b0145706fbeULL,
218 0x243185be4ee4b28cULL, 0x550c7dc3d5ffb4e2ULL,
219 0x72be5d74f27b896fULL, 0x80deb1fe3b1696b1ULL,
220 0x9bdc06a725c71235ULL, 0xc19bf174cf692694ULL,
221 0xe49b69c19ef14ad2ULL, 0xefbe4786384f25e3ULL,
222 0x0fc19dc68b8cd5b5ULL, 0x240ca1cc77ac9c65ULL,
223 0x2de92c6f592b0275ULL, 0x4a7484aa6ea6e483ULL,
224 0x5cb0a9dcbd41fbd4ULL, 0x76f988da831153b5ULL,
225 0x983e5152ee66dfabULL, 0xa831c66d2db43210ULL,
226 0xb00327c898fb213fULL, 0xbf597fc7beef0ee4ULL,
227 0xc6e00bf33da88fc2ULL, 0xd5a79147930aa725ULL,
228 0x06ca6351e003826fULL, 0x142929670a0e6e70ULL,
229 0x27b70a8546d22ffcULL, 0x2e1b21385c26c926ULL,
230 0x4d2c6dfc5ac42aedULL, 0x53380d139d95b3dfULL,
231 0x650a73548baf63deULL, 0x766a0abb3c77b2a8ULL,
232 0x81c2c92e47edaee6ULL, 0x92722c851482353bULL,
233 0xa2bfe8a14cf10364ULL, 0xa81a664bbc423001ULL,
234 0xc24b8b70d0f89791ULL, 0xc76c51a30654be30ULL,
235 0xd192e819d6ef5218ULL, 0xd69906245565a910ULL,
236 0xf40e35855771202aULL, 0x106aa07032bbd1b8ULL,
237 0x19a4c116b8d2d0c8ULL, 0x1e376c085141ab53ULL,
238 0x2748774cdf8eeb99ULL, 0x34b0bcb5e19b48a8ULL,
239 0x391c0cb3c5c95a63ULL, 0x4ed8aa4ae3418acbULL,
240 0x5b9cca4f7763e373ULL, 0x682e6ff3d6b2b8a3ULL,
241 0x748f82ee5defb2fcULL, 0x78a5636f43172f60ULL,
242 0x84c87814a1f0ab72ULL, 0x8cc702081a6439ecULL,
243 0x90befffa23631e28ULL, 0xa4506cebde82bde9ULL,
244 0xbef9a3f7b2c67915ULL, 0xc67178f2e372532bULL,
245 0xca273eceea26619cULL, 0xd186b8c721c0c207ULL,
246 0xeada7dd6cde0eb1eULL, 0xf57d4f7fee6ed178ULL,
247 0x06f067aa72176fbaULL, 0x0a637dc5a2c898a6ULL,
248 0x113f9804bef90daeULL, 0x1b710b35131c471bULL,
249 0x28db77f523047d84ULL, 0x32caab7b40c72493ULL,
250 0x3c9ebe0a15c9bebcULL, 0x431d67c49c100d4cULL,
251 0x4cc5d4becb3e42b6ULL, 0x597f299cfc657e2aULL,
252 0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL
253};
254
255/* Initial hash value H for SHA-384 */
256const static u_int64_t sha384_initial_hash_value[8] = {
257 0xcbbb9d5dc1059ed8ULL,
258 0x629a292a367cd507ULL,
259 0x9159015a3070dd17ULL,
260 0x152fecd8f70e5939ULL,
261 0x67332667ffc00b31ULL,
262 0x8eb44a8768581511ULL,
263 0xdb0c2e0d64f98fa7ULL,
264 0x47b5481dbefa4fa4ULL
265};
266
267/* Initial hash value H for SHA-512 */
268const static u_int64_t sha512_initial_hash_value[8] = {
269 0x6a09e667f3bcc908ULL,
270 0xbb67ae8584caa73bULL,
271 0x3c6ef372fe94f82bULL,
272 0xa54ff53a5f1d36f1ULL,
273 0x510e527fade682d1ULL,
274 0x9b05688c2b3e6c1fULL,
275 0x1f83d9abfb41bd6bULL,
276 0x5be0cd19137e2179ULL
277};
278
279
280/*** SHA-256: *********************************************************/
281void
282SHA256_Init(SHA256_CTX *context)
283{
284 if (context == NULL)
285 return;
286 memcpy(context->state, sha256_initial_hash_value,
287 sizeof(sha256_initial_hash_value));
288 memset(context->buffer, 0, sizeof(context->buffer));
289 context->bitcount = 0;
290}
291
292#ifdef SHA2_UNROLL_TRANSFORM
293
294/* Unrolled SHA-256 round macros: */
295
296#define ROUND256_0_TO_15(a,b,c,d,e,f,g,h) do { \
297 BE_8_TO_32(W256[j], data); \
298 data += 4; \
299 T1 = (h) + Sigma1_256((e)) + Ch((e), (f), (g)) + K256[j] + W256[j]; \
300 (d) += T1; \
301 (h) = T1 + Sigma0_256((a)) + Maj((a), (b), (c)); \
302 j++; \
303} while(0)
304
305#define ROUND256(a,b,c,d,e,f,g,h) do { \
306 s0 = W256[(j+1)&0x0f]; \
307 s0 = sigma0_256(s0); \
308 s1 = W256[(j+14)&0x0f]; \
309 s1 = sigma1_256(s1); \
310 T1 = (h) + Sigma1_256((e)) + Ch((e), (f), (g)) + K256[j] + \
311 (W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0); \
312 (d) += T1; \
313 (h) = T1 + Sigma0_256((a)) + Maj((a), (b), (c)); \
314 j++; \
315} while(0)
316
317void
318SHA256_Transform(u_int32_t state[8], const u_int8_t data[SHA256_BLOCK_LENGTH])
319{
320 u_int32_t a, b, c, d, e, f, g, h, s0, s1;
321 u_int32_t T1, W256[16];
322 int j;
323
324 /* Initialize registers with the prev. intermediate value */
325 a = state[0];
326 b = state[1];
327 c = state[2];
328 d = state[3];
329 e = state[4];
330 f = state[5];
331 g = state[6];
332 h = state[7];
333
334 j = 0;
335 do {
336 /* Rounds 0 to 15 (unrolled): */
337 ROUND256_0_TO_15(a,b,c,d,e,f,g,h);
338 ROUND256_0_TO_15(h,a,b,c,d,e,f,g);
339 ROUND256_0_TO_15(g,h,a,b,c,d,e,f);
340 ROUND256_0_TO_15(f,g,h,a,b,c,d,e);
341 ROUND256_0_TO_15(e,f,g,h,a,b,c,d);
342 ROUND256_0_TO_15(d,e,f,g,h,a,b,c);
343 ROUND256_0_TO_15(c,d,e,f,g,h,a,b);
344 ROUND256_0_TO_15(b,c,d,e,f,g,h,a);
345 } while (j < 16);
346
347 /* Now for the remaining rounds up to 63: */
348 do {
349 ROUND256(a,b,c,d,e,f,g,h);
350 ROUND256(h,a,b,c,d,e,f,g);
351 ROUND256(g,h,a,b,c,d,e,f);
352 ROUND256(f,g,h,a,b,c,d,e);
353 ROUND256(e,f,g,h,a,b,c,d);
354 ROUND256(d,e,f,g,h,a,b,c);
355 ROUND256(c,d,e,f,g,h,a,b);
356 ROUND256(b,c,d,e,f,g,h,a);
357 } while (j < 64);
358
359 /* Compute the current intermediate hash value */
360 state[0] += a;
361 state[1] += b;
362 state[2] += c;
363 state[3] += d;
364 state[4] += e;
365 state[5] += f;
366 state[6] += g;
367 state[7] += h;
368
369 /* Clean up */
370 a = b = c = d = e = f = g = h = T1 = 0;
371}
372
373#else /* SHA2_UNROLL_TRANSFORM */
374
375void
376SHA256_Transform(u_int32_t state[8], const u_int8_t data[SHA256_BLOCK_LENGTH])
377{
378 u_int32_t a, b, c, d, e, f, g, h, s0, s1;
379 u_int32_t T1, T2, W256[16];
380 int j;
381
382 /* Initialize registers with the prev. intermediate value */
383 a = state[0];
384 b = state[1];
385 c = state[2];
386 d = state[3];
387 e = state[4];
388 f = state[5];
389 g = state[6];
390 h = state[7];
391
392 j = 0;
393 do {
394 BE_8_TO_32(W256[j], data);
395 data += 4;
396 /* Apply the SHA-256 compression function to update a..h */
397 T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + W256[j];
398 T2 = Sigma0_256(a) + Maj(a, b, c);
399 h = g;
400 g = f;
401 f = e;
402 e = d + T1;
403 d = c;
404 c = b;
405 b = a;
406 a = T1 + T2;
407
408 j++;
409 } while (j < 16);
410
411 do {
412 /* Part of the message block expansion: */
413 s0 = W256[(j+1)&0x0f];
414 s0 = sigma0_256(s0);
415 s1 = W256[(j+14)&0x0f];
416 s1 = sigma1_256(s1);
417
418 /* Apply the SHA-256 compression function to update a..h */
419 T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] +
420 (W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0);
421 T2 = Sigma0_256(a) + Maj(a, b, c);
422 h = g;
423 g = f;
424 f = e;
425 e = d + T1;
426 d = c;
427 c = b;
428 b = a;
429 a = T1 + T2;
430
431 j++;
432 } while (j < 64);
433
434 /* Compute the current intermediate hash value */
435 state[0] += a;
436 state[1] += b;
437 state[2] += c;
438 state[3] += d;
439 state[4] += e;
440 state[5] += f;
441 state[6] += g;
442 state[7] += h;
443
444 /* Clean up */
445 a = b = c = d = e = f = g = h = T1 = T2 = 0;
446}
447
448#endif /* SHA2_UNROLL_TRANSFORM */
449
450void
451SHA256_Update(SHA256_CTX *context, const u_int8_t *data, size_t len)
452{
453 size_t freespace, usedspace;
454
455 /* Calling with no data is valid (we do nothing) */
456 if (len == 0)
457 return;
458
459 usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH;
460 if (usedspace > 0) {
461 /* Calculate how much free space is available in the buffer */
462 freespace = SHA256_BLOCK_LENGTH - usedspace;
463
464 if (len >= freespace) {
465 /* Fill the buffer completely and process it */
466 memcpy(&context->buffer[usedspace], data, freespace);
467 context->bitcount += freespace << 3;
468 len -= freespace;
469 data += freespace;
470 SHA256_Transform(context->state, context->buffer);
471 } else {
472 /* The buffer is not yet full */
473 memcpy(&context->buffer[usedspace], data, len);
474 context->bitcount += len << 3;
475 /* Clean up: */
476 usedspace = freespace = 0;
477 return;
478 }
479 }
480 while (len >= SHA256_BLOCK_LENGTH) {
481 /* Process as many complete blocks as we can */
482 SHA256_Transform(context->state, data);
483 context->bitcount += SHA256_BLOCK_LENGTH << 3;
484 len -= SHA256_BLOCK_LENGTH;
485 data += SHA256_BLOCK_LENGTH;
486 }
487 if (len > 0) {
488 /* There's left-overs, so save 'em */
489 memcpy(context->buffer, data, len);
490 context->bitcount += len << 3;
491 }
492 /* Clean up: */
493 usedspace = freespace = 0;
494}
495
496void
497SHA256_Pad(SHA256_CTX *context)
498{
499 unsigned int usedspace;
500
501 usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH;
502 if (usedspace > 0) {
503 /* Begin padding with a 1 bit: */
504 context->buffer[usedspace++] = 0x80;
505
506 if (usedspace <= SHA256_SHORT_BLOCK_LENGTH) {
507 /* Set-up for the last transform: */
508 memset(&context->buffer[usedspace], 0,
509 SHA256_SHORT_BLOCK_LENGTH - usedspace);
510 } else {
511 if (usedspace < SHA256_BLOCK_LENGTH) {
512 memset(&context->buffer[usedspace], 0,
513 SHA256_BLOCK_LENGTH - usedspace);
514 }
515 /* Do second-to-last transform: */
516 SHA256_Transform(context->state, context->buffer);
517
518 /* Prepare for last transform: */
519 memset(context->buffer, 0, SHA256_SHORT_BLOCK_LENGTH);
520 }
521 } else {
522 /* Set-up for the last transform: */
523 memset(context->buffer, 0, SHA256_SHORT_BLOCK_LENGTH);
524
525 /* Begin padding with a 1 bit: */
526 *context->buffer = 0x80;
527 }
528 /* Store the length of input data (in bits) in big endian format: */
529 BE_64_TO_8(&context->buffer[SHA256_SHORT_BLOCK_LENGTH],
530 context->bitcount);
531
532 /* Final transform: */
533 SHA256_Transform(context->state, context->buffer);
534
535 /* Clean up: */
536 usedspace = 0;
537}
538
539void
540SHA256_Final(u_int8_t digest[SHA256_DIGEST_LENGTH], SHA256_CTX *context)
541{
542 SHA256_Pad(context);
543
544 /* If no digest buffer is passed, we don't bother doing this: */
545 if (digest != NULL) {
546#if BYTE_ORDER == LITTLE_ENDIAN
547 int i;
548
549 /* Convert TO host byte order */
550 for (i = 0; i < 8; i++)
551 BE_32_TO_8(digest + i * 4, context->state[i]);
552#else
553 memcpy(digest, context->state, SHA256_DIGEST_LENGTH);
554#endif
555 memset(context, 0, sizeof(*context));
556 }
557}
558
559
560/*** SHA-512: *********************************************************/
561void
562SHA512_Init(SHA512_CTX *context)
563{
564 if (context == NULL)
565 return;
566 memcpy(context->state, sha512_initial_hash_value,
567 sizeof(sha512_initial_hash_value));
568 memset(context->buffer, 0, sizeof(context->buffer));
569 context->bitcount[0] = context->bitcount[1] = 0;
570}
571
572#ifdef SHA2_UNROLL_TRANSFORM
573
574/* Unrolled SHA-512 round macros: */
575
576#define ROUND512_0_TO_15(a,b,c,d,e,f,g,h) do { \
577 BE_8_TO_64(W512[j], data); \
578 data += 8; \
579 T1 = (h) + Sigma1_512((e)) + Ch((e), (f), (g)) + K512[j] + W512[j]; \
580 (d) += T1; \
581 (h) = T1 + Sigma0_512((a)) + Maj((a), (b), (c)); \
582 j++; \
583} while(0)
584
585
586#define ROUND512(a,b,c,d,e,f,g,h) do { \
587 s0 = W512[(j+1)&0x0f]; \
588 s0 = sigma0_512(s0); \
589 s1 = W512[(j+14)&0x0f]; \
590 s1 = sigma1_512(s1); \
591 T1 = (h) + Sigma1_512((e)) + Ch((e), (f), (g)) + K512[j] + \
592 (W512[j&0x0f] += s1 + W512[(j+9)&0x0f] + s0); \
593 (d) += T1; \
594 (h) = T1 + Sigma0_512((a)) + Maj((a), (b), (c)); \
595 j++; \
596} while(0)
597
598void
599SHA512_Transform(u_int64_t state[8], const u_int8_t data[SHA512_BLOCK_LENGTH])
600{
601 u_int64_t a, b, c, d, e, f, g, h, s0, s1;
602 u_int64_t T1, W512[16];
603 int j;
604
605 /* Initialize registers with the prev. intermediate value */
606 a = state[0];
607 b = state[1];
608 c = state[2];
609 d = state[3];
610 e = state[4];
611 f = state[5];
612 g = state[6];
613 h = state[7];
614
615 j = 0;
616 do {
617 /* Rounds 0 to 15 (unrolled): */
618 ROUND512_0_TO_15(a,b,c,d,e,f,g,h);
619 ROUND512_0_TO_15(h,a,b,c,d,e,f,g);
620 ROUND512_0_TO_15(g,h,a,b,c,d,e,f);
621 ROUND512_0_TO_15(f,g,h,a,b,c,d,e);
622 ROUND512_0_TO_15(e,f,g,h,a,b,c,d);
623 ROUND512_0_TO_15(d,e,f,g,h,a,b,c);
624 ROUND512_0_TO_15(c,d,e,f,g,h,a,b);
625 ROUND512_0_TO_15(b,c,d,e,f,g,h,a);
626 } while (j < 16);
627
628 /* Now for the remaining rounds up to 79: */
629 do {
630 ROUND512(a,b,c,d,e,f,g,h);
631 ROUND512(h,a,b,c,d,e,f,g);
632 ROUND512(g,h,a,b,c,d,e,f);
633 ROUND512(f,g,h,a,b,c,d,e);
634 ROUND512(e,f,g,h,a,b,c,d);
635 ROUND512(d,e,f,g,h,a,b,c);
636 ROUND512(c,d,e,f,g,h,a,b);
637 ROUND512(b,c,d,e,f,g,h,a);
638 } while (j < 80);
639
640 /* Compute the current intermediate hash value */
641 state[0] += a;
642 state[1] += b;
643 state[2] += c;
644 state[3] += d;
645 state[4] += e;
646 state[5] += f;
647 state[6] += g;
648 state[7] += h;
649
650 /* Clean up */
651 a = b = c = d = e = f = g = h = T1 = 0;
652}
653
654#else /* SHA2_UNROLL_TRANSFORM */
655
656void
657SHA512_Transform(u_int64_t state[8], const u_int8_t data[SHA512_BLOCK_LENGTH])
658{
659 u_int64_t a, b, c, d, e, f, g, h, s0, s1;
660 u_int64_t T1, T2, W512[16];
661 int j;
662
663 /* Initialize registers with the prev. intermediate value */
664 a = state[0];
665 b = state[1];
666 c = state[2];
667 d = state[3];
668 e = state[4];
669 f = state[5];
670 g = state[6];
671 h = state[7];
672
673 j = 0;
674 do {
675 BE_8_TO_64(W512[j], data);
676 data += 8;
677 /* Apply the SHA-512 compression function to update a..h */
678 T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + W512[j];
679 T2 = Sigma0_512(a) + Maj(a, b, c);
680 h = g;
681 g = f;
682 f = e;
683 e = d + T1;
684 d = c;
685 c = b;
686 b = a;
687 a = T1 + T2;
688
689 j++;
690 } while (j < 16);
691
692 do {
693 /* Part of the message block expansion: */
694 s0 = W512[(j+1)&0x0f];
695 s0 = sigma0_512(s0);
696 s1 = W512[(j+14)&0x0f];
697 s1 = sigma1_512(s1);
698
699 /* Apply the SHA-512 compression function to update a..h */
700 T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] +
701 (W512[j&0x0f] += s1 + W512[(j+9)&0x0f] + s0);
702 T2 = Sigma0_512(a) + Maj(a, b, c);
703 h = g;
704 g = f;
705 f = e;
706 e = d + T1;
707 d = c;
708 c = b;
709 b = a;
710 a = T1 + T2;
711
712 j++;
713 } while (j < 80);
714
715 /* Compute the current intermediate hash value */
716 state[0] += a;
717 state[1] += b;
718 state[2] += c;
719 state[3] += d;
720 state[4] += e;
721 state[5] += f;
722 state[6] += g;
723 state[7] += h;
724
725 /* Clean up */
726 a = b = c = d = e = f = g = h = T1 = T2 = 0;
727}
728
729#endif /* SHA2_UNROLL_TRANSFORM */
730
731void
732SHA512_Update(SHA512_CTX *context, const u_int8_t *data, size_t len)
733{
734 size_t freespace, usedspace;
735
736 /* Calling with no data is valid (we do nothing) */
737 if (len == 0)
738 return;
739
740 usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH;
741 if (usedspace > 0) {
742 /* Calculate how much free space is available in the buffer */
743 freespace = SHA512_BLOCK_LENGTH - usedspace;
744
745 if (len >= freespace) {
746 /* Fill the buffer completely and process it */
747 memcpy(&context->buffer[usedspace], data, freespace);
748 ADDINC128(context->bitcount, freespace << 3);
749 len -= freespace;
750 data += freespace;
751 SHA512_Transform(context->state, context->buffer);
752 } else {
753 /* The buffer is not yet full */
754 memcpy(&context->buffer[usedspace], data, len);
755 ADDINC128(context->bitcount, len << 3);
756 /* Clean up: */
757 usedspace = freespace = 0;
758 return;
759 }
760 }
761 while (len >= SHA512_BLOCK_LENGTH) {
762 /* Process as many complete blocks as we can */
763 SHA512_Transform(context->state, data);
764 ADDINC128(context->bitcount, SHA512_BLOCK_LENGTH << 3);
765 len -= SHA512_BLOCK_LENGTH;
766 data += SHA512_BLOCK_LENGTH;
767 }
768 if (len > 0) {
769 /* There's left-overs, so save 'em */
770 memcpy(context->buffer, data, len);
771 ADDINC128(context->bitcount, len << 3);
772 }
773 /* Clean up: */
774 usedspace = freespace = 0;
775}
776
777void
778SHA512_Pad(SHA512_CTX *context)
779{
780 unsigned int usedspace;
781
782 usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH;
783 if (usedspace > 0) {
784 /* Begin padding with a 1 bit: */
785 context->buffer[usedspace++] = 0x80;
786
787 if (usedspace <= SHA512_SHORT_BLOCK_LENGTH) {
788 /* Set-up for the last transform: */
789 memset(&context->buffer[usedspace], 0, SHA512_SHORT_BLOCK_LENGTH - usedspace);
790 } else {
791 if (usedspace < SHA512_BLOCK_LENGTH) {
792 memset(&context->buffer[usedspace], 0, SHA512_BLOCK_LENGTH - usedspace);
793 }
794 /* Do second-to-last transform: */
795 SHA512_Transform(context->state, context->buffer);
796
797 /* And set-up for the last transform: */
798 memset(context->buffer, 0, SHA512_BLOCK_LENGTH - 2);
799 }
800 } else {
801 /* Prepare for final transform: */
802 memset(context->buffer, 0, SHA512_SHORT_BLOCK_LENGTH);
803
804 /* Begin padding with a 1 bit: */
805 *context->buffer = 0x80;
806 }
807 /* Store the length of input data (in bits) in big endian format: */
808 BE_64_TO_8(&context->buffer[SHA512_SHORT_BLOCK_LENGTH],
809 context->bitcount[1]);
810 BE_64_TO_8(&context->buffer[SHA512_SHORT_BLOCK_LENGTH + 8],
811 context->bitcount[0]);
812
813 /* Final transform: */
814 SHA512_Transform(context->state, context->buffer);
815
816 /* Clean up: */
817 usedspace = 0;
818}
819
820void
821SHA512_Final(u_int8_t digest[SHA512_DIGEST_LENGTH], SHA512_CTX *context)
822{
823 SHA512_Pad(context);
824
825 /* If no digest buffer is passed, we don't bother doing this: */
826 if (digest != NULL) {
827#if BYTE_ORDER == LITTLE_ENDIAN
828 int i;
829
830 /* Convert TO host byte order */
831 for (i = 0; i < 8; i++)
832 BE_64_TO_8(digest + i * 8, context->state[i]);
833#else
834 memcpy(digest, context->state, SHA512_DIGEST_LENGTH);
835#endif
836 memset(context, 0, sizeof(*context));
837 }
838}
839
840
841#if 0
842/*** SHA-384: *********************************************************/
843void
844SHA384_Init(SHA384_CTX *context)
845{
846 if (context == NULL)
847 return;
848 memcpy(context->state, sha384_initial_hash_value,
849 sizeof(sha384_initial_hash_value));
850 memset(context->buffer, 0, sizeof(context->buffer));
851 context->bitcount[0] = context->bitcount[1] = 0;
852}
853
854__weak_alias(SHA384_Transform, SHA512_Transform);
855__weak_alias(SHA384_Update, SHA512_Update);
856__weak_alias(SHA384_Pad, SHA512_Pad);
857
858void
859SHA384_Final(u_int8_t digest[SHA384_DIGEST_LENGTH], SHA384_CTX *context)
860{
861 SHA384_Pad(context);
862
863 /* If no digest buffer is passed, we don't bother doing this: */
864 if (digest != NULL) {
865#if BYTE_ORDER == LITTLE_ENDIAN
866 int i;
867
868 /* Convert TO host byte order */
869 for (i = 0; i < 6; i++)
870 BE_64_TO_8(digest + i * 8, context->state[i]);
871#else
872 memcpy(digest, context->state, SHA384_DIGEST_LENGTH);
873#endif
874 }
875
876 /* Zero out state data */
877 memset(context, 0, sizeof(*context));
878}
879#endif
880
881#endif /* !defined(HAVE_EVP_SHA256) && !defined(HAVE_SHA256_UPDATE) && \
882 (OPENSSL_VERSION_NUMBER >= 0x00907000L) */
diff --git a/openbsd-compat/sha2.h b/openbsd-compat/sha2.h
new file mode 100755
index 000000000..821f2dd6c
--- /dev/null
+++ b/openbsd-compat/sha2.h
@@ -0,0 +1,133 @@
1/* $OpenBSD: sha2.h,v 1.6 2004/06/22 01:57:30 jfb Exp $ */
2
3/*
4 * FILE: sha2.h
5 * AUTHOR: Aaron D. Gifford <me@aarongifford.com>
6 *
7 * Copyright (c) 2000-2001, Aaron D. Gifford
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. Neither the name of the copyright holder nor the names of contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * $From: sha2.h,v 1.1 2001/11/08 00:02:01 adg Exp adg $
35 */
36
37/* OPENBSD ORIGINAL: include/sha2.h */
38
39#ifndef _SSHSHA2_H
40#define _SSHSHA2_H
41
42#include "includes.h"
43
44#include <openssl/opensslv.h>
45
46#if !defined(HAVE_EVP_SHA256) && !defined(HAVE_SHA256_UPDATE) && \
47 (OPENSSL_VERSION_NUMBER >= 0x00907000L)
48
49/*** SHA-256/384/512 Various Length Definitions ***********************/
50#define SHA256_BLOCK_LENGTH 64
51#define SHA256_DIGEST_LENGTH 32
52#define SHA256_DIGEST_STRING_LENGTH (SHA256_DIGEST_LENGTH * 2 + 1)
53#define SHA384_BLOCK_LENGTH 128
54#define SHA384_DIGEST_LENGTH 48
55#define SHA384_DIGEST_STRING_LENGTH (SHA384_DIGEST_LENGTH * 2 + 1)
56#define SHA512_BLOCK_LENGTH 128
57#define SHA512_DIGEST_LENGTH 64
58#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1)
59
60
61/*** SHA-256/384/512 Context Structures *******************************/
62typedef struct _SHA256_CTX {
63 u_int32_t state[8];
64 u_int64_t bitcount;
65 u_int8_t buffer[SHA256_BLOCK_LENGTH];
66} SHA256_CTX;
67typedef struct _SHA512_CTX {
68 u_int64_t state[8];
69 u_int64_t bitcount[2];
70 u_int8_t buffer[SHA512_BLOCK_LENGTH];
71} SHA512_CTX;
72
73#if 0
74typedef SHA512_CTX SHA384_CTX;
75#endif
76
77void SHA256_Init(SHA256_CTX *);
78void SHA256_Transform(u_int32_t state[8], const u_int8_t [SHA256_BLOCK_LENGTH]);
79void SHA256_Update(SHA256_CTX *, const u_int8_t *, size_t)
80 __attribute__((__bounded__(__string__,2,3)));
81void SHA256_Pad(SHA256_CTX *);
82void SHA256_Final(u_int8_t [SHA256_DIGEST_LENGTH], SHA256_CTX *)
83 __attribute__((__bounded__(__minbytes__,1,SHA256_DIGEST_LENGTH)));
84char *SHA256_End(SHA256_CTX *, char *)
85 __attribute__((__bounded__(__minbytes__,2,SHA256_DIGEST_STRING_LENGTH)));
86char *SHA256_File(const char *, char *)
87 __attribute__((__bounded__(__minbytes__,2,SHA256_DIGEST_STRING_LENGTH)));
88char *SHA256_FileChunk(const char *, char *, off_t, off_t)
89 __attribute__((__bounded__(__minbytes__,2,SHA256_DIGEST_STRING_LENGTH)));
90char *SHA256_Data(const u_int8_t *, size_t, char *)
91 __attribute__((__bounded__(__string__,1,2)))
92 __attribute__((__bounded__(__minbytes__,3,SHA256_DIGEST_STRING_LENGTH)));
93
94#if 0
95void SHA384_Init(SHA384_CTX *);
96void SHA384_Transform(u_int64_t state[8], const u_int8_t [SHA384_BLOCK_LENGTH]);
97void SHA384_Update(SHA384_CTX *, const u_int8_t *, size_t)
98 __attribute__((__bounded__(__string__,2,3)));
99void SHA384_Pad(SHA384_CTX *);
100void SHA384_Final(u_int8_t [SHA384_DIGEST_LENGTH], SHA384_CTX *)
101 __attribute__((__bounded__(__minbytes__,1,SHA384_DIGEST_LENGTH)));
102char *SHA384_End(SHA384_CTX *, char *)
103 __attribute__((__bounded__(__minbytes__,2,SHA384_DIGEST_STRING_LENGTH)));
104char *SHA384_File(const char *, char *)
105 __attribute__((__bounded__(__minbytes__,2,SHA384_DIGEST_STRING_LENGTH)));
106char *SHA384_FileChunk(const char *, char *, off_t, off_t)
107 __attribute__((__bounded__(__minbytes__,2,SHA384_DIGEST_STRING_LENGTH)));
108char *SHA384_Data(const u_int8_t *, size_t, char *)
109 __attribute__((__bounded__(__string__,1,2)))
110 __attribute__((__bounded__(__minbytes__,3,SHA384_DIGEST_STRING_LENGTH)));
111#endif /* 0 */
112
113void SHA512_Init(SHA512_CTX *);
114void SHA512_Transform(u_int64_t state[8], const u_int8_t [SHA512_BLOCK_LENGTH]);
115void SHA512_Update(SHA512_CTX *, const u_int8_t *, size_t)
116 __attribute__((__bounded__(__string__,2,3)));
117void SHA512_Pad(SHA512_CTX *);
118void SHA512_Final(u_int8_t [SHA512_DIGEST_LENGTH], SHA512_CTX *)
119 __attribute__((__bounded__(__minbytes__,1,SHA512_DIGEST_LENGTH)));
120char *SHA512_End(SHA512_CTX *, char *)
121 __attribute__((__bounded__(__minbytes__,2,SHA512_DIGEST_STRING_LENGTH)));
122char *SHA512_File(const char *, char *)
123 __attribute__((__bounded__(__minbytes__,2,SHA512_DIGEST_STRING_LENGTH)));
124char *SHA512_FileChunk(const char *, char *, off_t, off_t)
125 __attribute__((__bounded__(__minbytes__,2,SHA512_DIGEST_STRING_LENGTH)));
126char *SHA512_Data(const u_int8_t *, size_t, char *)
127 __attribute__((__bounded__(__string__,1,2)))
128 __attribute__((__bounded__(__minbytes__,3,SHA512_DIGEST_STRING_LENGTH)));
129
130#endif /* !defined(HAVE_EVP_SHA256) && !defined(HAVE_SHA256_UPDATE) && \
131 (OPENSSL_VERSION_NUMBER >= 0x00907000L) */
132
133#endif /* _SSHSHA2_H */
diff --git a/openbsd-compat/strtonum.c b/openbsd-compat/strtonum.c
index 8ad0d0058..87f2f24b2 100644
--- a/openbsd-compat/strtonum.c
+++ b/openbsd-compat/strtonum.c
@@ -20,8 +20,11 @@
20/* OPENBSD ORIGINAL: lib/libc/stdlib/strtonum.c */ 20/* OPENBSD ORIGINAL: lib/libc/stdlib/strtonum.c */
21 21
22#include "includes.h" 22#include "includes.h"
23
23#ifndef HAVE_STRTONUM 24#ifndef HAVE_STRTONUM
25#include <stdlib.h>
24#include <limits.h> 26#include <limits.h>
27#include <errno.h>
25 28
26#define INVALID 1 29#define INVALID 1
27#define TOOSMALL 2 30#define TOOSMALL 2
diff --git a/openbsd-compat/xcrypt.c b/openbsd-compat/xcrypt.c
index 9afa0b9f2..14899321f 100644
--- a/openbsd-compat/xcrypt.c
+++ b/openbsd-compat/xcrypt.c
@@ -24,6 +24,10 @@
24 24
25#include "includes.h" 25#include "includes.h"
26 26
27#include <sys/types.h>
28#include <unistd.h>
29#include <pwd.h>
30
27# ifdef HAVE_CRYPT_H 31# ifdef HAVE_CRYPT_H
28# include <crypt.h> 32# include <crypt.h>
29# endif 33# endif
diff --git a/openbsd-compat/xmmap.c b/openbsd-compat/xmmap.c
index 74e8a8b13..0fb23269b 100644
--- a/openbsd-compat/xmmap.c
+++ b/openbsd-compat/xmmap.c
@@ -23,21 +23,31 @@
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26/* $Id: xmmap.c,v 1.6 2004/10/06 13:15:44 dtucker Exp $ */ 26/* $Id: xmmap.c,v 1.12 2006/08/24 09:58:36 dtucker Exp $ */
27 27
28#include "includes.h" 28#include "includes.h"
29 29
30#include <sys/types.h>
30#ifdef HAVE_SYS_MMAN_H 31#ifdef HAVE_SYS_MMAN_H
31#include <sys/mman.h> 32#include <sys/mman.h>
32#endif 33#endif
34#include <sys/stat.h>
35
36#ifdef HAVE_FCNTL_H
37# include <fcntl.h>
38#endif
39#include <errno.h>
40#include <stdarg.h>
41#include <string.h>
42#include <unistd.h>
33 43
34#include "log.h" 44#include "log.h"
35 45
36void *xmmap(size_t size) 46void *xmmap(size_t size)
37{ 47{
48#ifdef HAVE_MMAP
38 void *address; 49 void *address;
39 50
40#ifdef HAVE_MMAP
41# ifdef MAP_ANON 51# ifdef MAP_ANON
42 address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_ANON|MAP_SHARED, 52 address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_ANON|MAP_SHARED,
43 -1, (off_t)0); 53 -1, (off_t)0);
diff --git a/openssh.xml.in b/openssh.xml.in
new file mode 100644
index 000000000..2fcdea0a1
--- /dev/null
+++ b/openssh.xml.in
@@ -0,0 +1,90 @@
1<?xml version='1.0'?>
2<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
3<!--
4 Copyright (c) 2006 Chad Mynhier.
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 THE AUTHOR DISCLAIMS ALL WARRANTIES
11 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17-->
18
19<service_bundle type='manifest' name='OpenSSH server'>
20
21 <service
22 name='site/openssh'
23 type='service'
24 version='1'>
25
26<!--
27 We default to disabled so administrator can decide to enable or not.
28-->
29 <create_default_instance enabled='false'/>
30
31 <single_instance/>
32
33 <dependency
34 name='filesystem-local'
35 grouping='require_all'
36 restart_on='none'
37 type='service'>
38 <service_fmri value='svc:/system/filesystem/local'/>
39 </dependency>
40
41 <dependency
42 name='network'
43 grouping='require_all'
44 restart_on='none'
45 type='service'>
46 <service_fmri value='svc:/milestone/network'/>
47 </dependency>
48
49 <dependent
50 name='multi-user-server'
51 restart_on='none'
52 grouping='optional_all'>
53 <service_fmri value='svc:/milestone/multi-user-server'/>
54 </dependent>
55
56 <exec_method
57 name='start'
58 type='method'
59 exec='/lib/svc/method/site/__SYSVINIT_NAME__ start'
60 timeout_seconds='60'>
61 <method_context/>
62 </exec_method>
63
64 <exec_method
65 name='stop'
66 type='method'
67 exec=':kill'
68 timeout_seconds='60'>
69 <method_context/>
70 </exec_method>
71
72 <property_group
73 name='startd'
74 type='framework'>
75 <propval name='ignore_error' type='astring' value='core,signal'/>
76 </property_group>
77
78 <template>
79 <common_name>
80 <loctext xml:lang='C'>OpenSSH server</loctext>
81 </common_name>
82 <documentation>
83 <manpage
84 title='sshd'
85 section='1M'
86 manpath='@prefix@/man'/>
87 </documentation>
88 </template>
89 </service>
90</service_bundle>
diff --git a/packet.c b/packet.c
index db2aa2411..7d8fab1e9 100644
--- a/packet.c
+++ b/packet.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: packet.c,v 1.145 2006/09/19 21:14:08 markus Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -37,26 +38,39 @@
37 */ 38 */
38 39
39#include "includes.h" 40#include "includes.h"
40RCSID("$OpenBSD: packet.c,v 1.120 2005/10/30 08:52:17 djm Exp $"); 41
41 42#include <sys/types.h>
42#include "openbsd-compat/sys-queue.h" 43#include "openbsd-compat/sys-queue.h"
44#include <sys/param.h>
45#include <sys/socket.h>
46#ifdef HAVE_SYS_TIME_H
47# include <sys/time.h>
48#endif
49
50#include <netinet/in.h>
51#include <netinet/ip.h>
52#include <arpa/inet.h>
53
54#include <errno.h>
55#include <stdarg.h>
56#include <stdio.h>
57#include <stdlib.h>
58#include <string.h>
59#include <unistd.h>
60#include <signal.h>
43 61
44#include "xmalloc.h" 62#include "xmalloc.h"
45#include "buffer.h" 63#include "buffer.h"
46#include "packet.h" 64#include "packet.h"
47#include "bufaux.h"
48#include "crc32.h" 65#include "crc32.h"
49#include "getput.h"
50
51#include "compress.h" 66#include "compress.h"
52#include "deattack.h" 67#include "deattack.h"
53#include "channels.h" 68#include "channels.h"
54
55#include "compat.h" 69#include "compat.h"
56#include "ssh1.h" 70#include "ssh1.h"
57#include "ssh2.h" 71#include "ssh2.h"
58
59#include "cipher.h" 72#include "cipher.h"
73#include "key.h"
60#include "kex.h" 74#include "kex.h"
61#include "mac.h" 75#include "mac.h"
62#include "log.h" 76#include "log.h"
@@ -258,6 +272,7 @@ packet_get_keyiv_len(int mode)
258 272
259 return (cipher_get_keyiv_len(cc)); 273 return (cipher_get_keyiv_len(cc));
260} 274}
275
261void 276void
262packet_set_iv(int mode, u_char *dat) 277packet_set_iv(int mode, u_char *dat)
263{ 278{
@@ -270,6 +285,7 @@ packet_set_iv(int mode, u_char *dat)
270 285
271 cipher_set_keyiv(cc, dat); 286 cipher_set_keyiv(cc, dat);
272} 287}
288
273int 289int
274packet_get_ssh1_cipher(void) 290packet_get_ssh1_cipher(void)
275{ 291{
@@ -471,31 +487,37 @@ packet_put_char(int value)
471 487
472 buffer_append(&outgoing_packet, &ch, 1); 488 buffer_append(&outgoing_packet, &ch, 1);
473} 489}
490
474void 491void
475packet_put_int(u_int value) 492packet_put_int(u_int value)
476{ 493{
477 buffer_put_int(&outgoing_packet, value); 494 buffer_put_int(&outgoing_packet, value);
478} 495}
496
479void 497void
480packet_put_string(const void *buf, u_int len) 498packet_put_string(const void *buf, u_int len)
481{ 499{
482 buffer_put_string(&outgoing_packet, buf, len); 500 buffer_put_string(&outgoing_packet, buf, len);
483} 501}
502
484void 503void
485packet_put_cstring(const char *str) 504packet_put_cstring(const char *str)
486{ 505{
487 buffer_put_cstring(&outgoing_packet, str); 506 buffer_put_cstring(&outgoing_packet, str);
488} 507}
508
489void 509void
490packet_put_raw(const void *buf, u_int len) 510packet_put_raw(const void *buf, u_int len)
491{ 511{
492 buffer_append(&outgoing_packet, buf, len); 512 buffer_append(&outgoing_packet, buf, len);
493} 513}
514
494void 515void
495packet_put_bignum(BIGNUM * value) 516packet_put_bignum(BIGNUM * value)
496{ 517{
497 buffer_put_bignum(&outgoing_packet, value); 518 buffer_put_bignum(&outgoing_packet, value);
498} 519}
520
499void 521void
500packet_put_bignum2(BIGNUM * value) 522packet_put_bignum2(BIGNUM * value)
501{ 523{
@@ -549,7 +571,7 @@ packet_send1(void)
549 /* Add check bytes. */ 571 /* Add check bytes. */
550 checksum = ssh_crc32(buffer_ptr(&outgoing_packet), 572 checksum = ssh_crc32(buffer_ptr(&outgoing_packet),
551 buffer_len(&outgoing_packet)); 573 buffer_len(&outgoing_packet));
552 PUT_32BIT(buf, checksum); 574 put_u32(buf, checksum);
553 buffer_append(&outgoing_packet, buf, 4); 575 buffer_append(&outgoing_packet, buf, 4);
554 576
555#ifdef PACKET_DEBUG 577#ifdef PACKET_DEBUG
@@ -558,7 +580,7 @@ packet_send1(void)
558#endif 580#endif
559 581
560 /* Append to output. */ 582 /* Append to output. */
561 PUT_32BIT(buf, len); 583 put_u32(buf, len);
562 buffer_append(&output, buf, 4); 584 buffer_append(&output, buf, 4);
563 cp = buffer_append_space(&output, buffer_len(&outgoing_packet)); 585 cp = buffer_append_space(&output, buffer_len(&outgoing_packet));
564 cipher_crypt(&send_context, cp, buffer_ptr(&outgoing_packet), 586 cipher_crypt(&send_context, cp, buffer_ptr(&outgoing_packet),
@@ -654,7 +676,7 @@ set_newkeys(int mode)
654 676
655/* 677/*
656 * Delayed compression for SSH2 is enabled after authentication: 678 * Delayed compression for SSH2 is enabled after authentication:
657 * This happans on the server side after a SSH2_MSG_USERAUTH_SUCCESS is sent, 679 * This happens on the server side after a SSH2_MSG_USERAUTH_SUCCESS is sent,
658 * and on the client side after a SSH2_MSG_USERAUTH_SUCCESS is received. 680 * and on the client side after a SSH2_MSG_USERAUTH_SUCCESS is received.
659 */ 681 */
660static void 682static void
@@ -669,6 +691,9 @@ packet_enable_delayed_compress(void)
669 */ 691 */
670 after_authentication = 1; 692 after_authentication = 1;
671 for (mode = 0; mode < MODE_MAX; mode++) { 693 for (mode = 0; mode < MODE_MAX; mode++) {
694 /* protocol error: USERAUTH_SUCCESS received before NEWKEYS */
695 if (newkeys[mode] == NULL)
696 continue;
672 comp = &newkeys[mode]->comp; 697 comp = &newkeys[mode]->comp;
673 if (comp && !comp->enabled && comp->type == COMP_DELAYED) { 698 if (comp && !comp->enabled && comp->type == COMP_DELAYED) {
674 packet_init_compression(); 699 packet_init_compression();
@@ -761,7 +786,7 @@ packet_send2_wrapped(void)
761 /* packet_length includes payload, padding and padding length field */ 786 /* packet_length includes payload, padding and padding length field */
762 packet_length = buffer_len(&outgoing_packet) - 4; 787 packet_length = buffer_len(&outgoing_packet) - 4;
763 cp = buffer_ptr(&outgoing_packet); 788 cp = buffer_ptr(&outgoing_packet);
764 PUT_32BIT(cp, packet_length); 789 put_u32(cp, packet_length);
765 cp[4] = padlen; 790 cp[4] = padlen;
766 DBG(debug("send: len %d (includes padlen %d)", packet_length+4, padlen)); 791 DBG(debug("send: len %d (includes padlen %d)", packet_length+4, padlen));
767 792
@@ -778,7 +803,7 @@ packet_send2_wrapped(void)
778 buffer_len(&outgoing_packet)); 803 buffer_len(&outgoing_packet));
779 /* append unencrypted MAC */ 804 /* append unencrypted MAC */
780 if (mac && mac->enabled) 805 if (mac && mac->enabled)
781 buffer_append(&output, (char *)macbuf, mac->mac_len); 806 buffer_append(&output, macbuf, mac->mac_len);
782#ifdef PACKET_DEBUG 807#ifdef PACKET_DEBUG
783 fprintf(stderr, "encrypted: "); 808 fprintf(stderr, "encrypted: ");
784 buffer_dump(&output); 809 buffer_dump(&output);
@@ -868,7 +893,7 @@ packet_read_seqnr(u_int32_t *seqnr_p)
868 char buf[8192]; 893 char buf[8192];
869 DBG(debug("packet_read()")); 894 DBG(debug("packet_read()"));
870 895
871 setp = (fd_set *)xmalloc(howmany(connection_in+1, NFDBITS) * 896 setp = (fd_set *)xcalloc(howmany(connection_in+1, NFDBITS),
872 sizeof(fd_mask)); 897 sizeof(fd_mask));
873 898
874 /* Since we are blocking, ensure that all written packets have been sent. */ 899 /* Since we are blocking, ensure that all written packets have been sent. */
@@ -959,7 +984,7 @@ packet_read_poll1(void)
959 return SSH_MSG_NONE; 984 return SSH_MSG_NONE;
960 /* Get length of incoming packet. */ 985 /* Get length of incoming packet. */
961 cp = buffer_ptr(&input); 986 cp = buffer_ptr(&input);
962 len = GET_32BIT(cp); 987 len = get_u32(cp);
963 if (len < 1 + 2 + 2 || len > 256 * 1024) 988 if (len < 1 + 2 + 2 || len > 256 * 1024)
964 packet_disconnect("Bad packet length %u.", len); 989 packet_disconnect("Bad packet length %u.", len);
965 padded_len = (len + 8) & ~7; 990 padded_len = (len + 8) & ~7;
@@ -978,9 +1003,16 @@ packet_read_poll1(void)
978 * (C)1998 CORE-SDI, Buenos Aires Argentina 1003 * (C)1998 CORE-SDI, Buenos Aires Argentina
979 * Ariel Futoransky(futo@core-sdi.com) 1004 * Ariel Futoransky(futo@core-sdi.com)
980 */ 1005 */
981 if (!receive_context.plaintext && 1006 if (!receive_context.plaintext) {
982 detect_attack(buffer_ptr(&input), padded_len, NULL) == DEATTACK_DETECTED) 1007 switch (detect_attack(buffer_ptr(&input), padded_len)) {
983 packet_disconnect("crc32 compensation attack: network attack detected"); 1008 case DEATTACK_DETECTED:
1009 packet_disconnect("crc32 compensation attack: "
1010 "network attack detected");
1011 case DEATTACK_DOS_DETECTED:
1012 packet_disconnect("deattack denial of "
1013 "service detected");
1014 }
1015 }
984 1016
985 /* Decrypt data to incoming_packet. */ 1017 /* Decrypt data to incoming_packet. */
986 buffer_clear(&incoming_packet); 1018 buffer_clear(&incoming_packet);
@@ -1007,7 +1039,7 @@ packet_read_poll1(void)
1007 len, buffer_len(&incoming_packet)); 1039 len, buffer_len(&incoming_packet));
1008 1040
1009 cp = (u_char *)buffer_ptr(&incoming_packet) + len - 4; 1041 cp = (u_char *)buffer_ptr(&incoming_packet) + len - 4;
1010 stored_checksum = GET_32BIT(cp); 1042 stored_checksum = get_u32(cp);
1011 if (checksum != stored_checksum) 1043 if (checksum != stored_checksum)
1012 packet_disconnect("Corrupted check bytes on input."); 1044 packet_disconnect("Corrupted check bytes on input.");
1013 buffer_consume_end(&incoming_packet, 4); 1045 buffer_consume_end(&incoming_packet, 4);
@@ -1056,7 +1088,7 @@ packet_read_poll2(u_int32_t *seqnr_p)
1056 cipher_crypt(&receive_context, cp, buffer_ptr(&input), 1088 cipher_crypt(&receive_context, cp, buffer_ptr(&input),
1057 block_size); 1089 block_size);
1058 cp = buffer_ptr(&incoming_packet); 1090 cp = buffer_ptr(&incoming_packet);
1059 packet_length = GET_32BIT(cp); 1091 packet_length = get_u32(cp);
1060 if (packet_length < 1 + 4 || packet_length > 256 * 1024) { 1092 if (packet_length < 1 + 4 || packet_length > 256 * 1024) {
1061#ifdef PACKET_DEBUG 1093#ifdef PACKET_DEBUG
1062 buffer_dump(&incoming_packet); 1094 buffer_dump(&incoming_packet);
@@ -1187,7 +1219,6 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p)
1187 break; 1219 break;
1188 default: 1220 default:
1189 return type; 1221 return type;
1190 break;
1191 } 1222 }
1192 } else { 1223 } else {
1193 type = packet_read_poll1(); 1224 type = packet_read_poll1();
@@ -1210,7 +1241,6 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p)
1210 if (type) 1241 if (type)
1211 DBG(debug("received packet type %d", type)); 1242 DBG(debug("received packet type %d", type));
1212 return type; 1243 return type;
1213 break;
1214 } 1244 }
1215 } 1245 }
1216 } 1246 }
@@ -1412,7 +1442,7 @@ packet_write_wait(void)
1412{ 1442{
1413 fd_set *setp; 1443 fd_set *setp;
1414 1444
1415 setp = (fd_set *)xmalloc(howmany(connection_out + 1, NFDBITS) * 1445 setp = (fd_set *)xcalloc(howmany(connection_out + 1, NFDBITS),
1416 sizeof(fd_mask)); 1446 sizeof(fd_mask));
1417 packet_write_poll(); 1447 packet_write_poll();
1418 while (packet_have_data_to_write()) { 1448 while (packet_have_data_to_write()) {
@@ -1480,8 +1510,7 @@ packet_set_interactive(int interactive)
1480 /* Only set socket options if using a socket. */ 1510 /* Only set socket options if using a socket. */
1481 if (!packet_connection_is_on_socket()) 1511 if (!packet_connection_is_on_socket())
1482 return; 1512 return;
1483 if (interactive) 1513 set_nodelay(connection_in);
1484 set_nodelay(connection_in);
1485 packet_set_tos(interactive); 1514 packet_set_tos(interactive);
1486} 1515}
1487 1516
@@ -1542,7 +1571,7 @@ packet_send_ignore(int nbytes)
1542 for (i = 0; i < nbytes; i++) { 1571 for (i = 0; i < nbytes; i++) {
1543 if (i % 4 == 0) 1572 if (i % 4 == 0)
1544 rnd = arc4random(); 1573 rnd = arc4random();
1545 packet_put_char(rnd & 0xff); 1574 packet_put_char((u_char)rnd & 0xff);
1546 rnd >>= 8; 1575 rnd >>= 8;
1547 } 1576 }
1548} 1577}
diff --git a/packet.h b/packet.h
index 8c23646aa..21ff45067 100644
--- a/packet.h
+++ b/packet.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.h,v 1.43 2005/07/25 11:59:40 markus Exp $ */ 1/* $OpenBSD: packet.h,v 1.45 2006/03/25 22:22:43 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -16,6 +16,8 @@
16#ifndef PACKET_H 16#ifndef PACKET_H
17#define PACKET_H 17#define PACKET_H
18 18
19#include <termios.h>
20
19#include <openssl/bn.h> 21#include <openssl/bn.h>
20 22
21void packet_set_connection(int, int); 23void packet_set_connection(int, int);
diff --git a/pathnames.h b/pathnames.h
index cf42625a4..f2571e274 100644
--- a/pathnames.h
+++ b/pathnames.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: pathnames.h,v 1.15 2004/07/11 17:48:47 deraadt Exp $ */ 1/* $OpenBSD: pathnames.h,v 1.16 2006/03/25 22:22:43 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
diff --git a/platform.c b/platform.c
new file mode 100644
index 000000000..aee4b01e7
--- /dev/null
+++ b/platform.c
@@ -0,0 +1,46 @@
1/* $Id: platform.c,v 1.1 2006/08/30 17:24:41 djm Exp $ */
2
3/*
4 * Copyright (c) 2006 Darren Tucker. All rights reserved.
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 THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18
19#include "config.h"
20#include "platform.h"
21
22#include "openbsd-compat/openbsd-compat.h"
23
24void
25platform_pre_fork(void)
26{
27#ifdef USE_SOLARIS_PROCESS_CONTRACTS
28 solaris_contract_pre_fork();
29#endif
30}
31
32void
33platform_post_fork_parent(pid_t child_pid)
34{
35#ifdef USE_SOLARIS_PROCESS_CONTRACTS
36 solaris_contract_post_fork_parent(child_pid);
37#endif
38}
39
40void
41platform_post_fork_child(void)
42{
43#ifdef USE_SOLARIS_PROCESS_CONTRACTS
44 solaris_contract_post_fork_child();
45#endif
46}
diff --git a/platform.h b/platform.h
new file mode 100644
index 000000000..cf93bc57c
--- /dev/null
+++ b/platform.h
@@ -0,0 +1,23 @@
1/* $Id: platform.h,v 1.1 2006/08/30 17:24:41 djm Exp $ */
2
3/*
4 * Copyright (c) 2006 Darren Tucker. All rights reserved.
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 THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18
19#include <sys/types.h>
20
21void platform_pre_fork(void);
22void platform_post_fork_parent(pid_t child_pid);
23void platform_post_fork_child(void);
diff --git a/progressmeter.c b/progressmeter.c
index 13c51d87e..0f95222d2 100644
--- a/progressmeter.c
+++ b/progressmeter.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: progressmeter.c,v 1.37 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2003 Nils Nordman. All rights reserved. 3 * Copyright (c) 2003 Nils Nordman. All rights reserved.
3 * 4 *
@@ -23,7 +24,17 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: progressmeter.c,v 1.24 2005/06/07 13:25:23 jaredy Exp $"); 27
28#include <sys/types.h>
29#include <sys/ioctl.h>
30#include <sys/uio.h>
31
32#include <errno.h>
33#include <signal.h>
34#include <stdio.h>
35#include <string.h>
36#include <time.h>
37#include <unistd.h>
27 38
28#include "progressmeter.h" 39#include "progressmeter.h"
29#include "atomicio.h" 40#include "atomicio.h"
@@ -154,7 +165,7 @@ refresh_progress_meter(void)
154 len = 0; 165 len = 0;
155 if (len >= file_len + 1) 166 if (len >= file_len + 1)
156 len = file_len; 167 len = file_len;
157 for (i = len; i < file_len; i++ ) 168 for (i = len; i < file_len; i++)
158 buf[i] = ' '; 169 buf[i] = ' ';
159 buf[file_len] = '\0'; 170 buf[file_len] = '\0';
160 } 171 }
@@ -215,6 +226,7 @@ refresh_progress_meter(void)
215 last_update = now; 226 last_update = now;
216} 227}
217 228
229/*ARGSUSED*/
218static void 230static void
219update_progress_meter(int ignore) 231update_progress_meter(int ignore)
220{ 232{
@@ -269,6 +281,7 @@ stop_progress_meter(void)
269 atomicio(vwrite, STDOUT_FILENO, "\n", 1); 281 atomicio(vwrite, STDOUT_FILENO, "\n", 1);
270} 282}
271 283
284/*ARGSUSED*/
272static void 285static void
273sig_winch(int sig) 286sig_winch(int sig)
274{ 287{
diff --git a/progressmeter.h b/progressmeter.h
index bfb9a0b77..10bab99ba 100644
--- a/progressmeter.h
+++ b/progressmeter.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: progressmeter.h,v 1.1 2003/01/10 08:19:07 fgsch Exp $ */ 1/* $OpenBSD: progressmeter.h,v 1.2 2006/03/25 22:22:43 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2002 Nils Nordman. All rights reserved. 3 * Copyright (c) 2002 Nils Nordman. All rights reserved.
4 * 4 *
diff --git a/readconf.c b/readconf.c
index 355a41ccb..598bab693 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: readconf.c,v 1.161 2007/01/21 01:45:35 stevesk Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -12,17 +13,33 @@
12 */ 13 */
13 14
14#include "includes.h" 15#include "includes.h"
15RCSID("$OpenBSD: readconf.c,v 1.145 2005/12/08 18:34:11 reyk Exp $");
16 16
17#include "ssh.h" 17#include <sys/types.h>
18#include <sys/stat.h>
19#include <sys/socket.h>
20
21#include <netinet/in.h>
22
23#include <ctype.h>
24#include <errno.h>
25#include <netdb.h>
26#include <signal.h>
27#include <stdarg.h>
28#include <stdio.h>
29#include <string.h>
30#include <unistd.h>
31
18#include "xmalloc.h" 32#include "xmalloc.h"
33#include "ssh.h"
19#include "compat.h" 34#include "compat.h"
20#include "cipher.h" 35#include "cipher.h"
21#include "pathnames.h" 36#include "pathnames.h"
22#include "log.h" 37#include "log.h"
38#include "key.h"
23#include "readconf.h" 39#include "readconf.h"
24#include "match.h" 40#include "match.h"
25#include "misc.h" 41#include "misc.h"
42#include "buffer.h"
26#include "kex.h" 43#include "kex.h"
27#include "mac.h" 44#include "mac.h"
28 45
@@ -94,6 +111,7 @@ RCSID("$OpenBSD: readconf.c,v 1.145 2005/12/08 18:34:11 reyk Exp $");
94typedef enum { 111typedef enum {
95 oBadOption, 112 oBadOption,
96 oForwardAgent, oForwardX11, oForwardX11Trusted, oGatewayPorts, 113 oForwardAgent, oForwardX11, oForwardX11Trusted, oGatewayPorts,
114 oExitOnForwardFailure,
97 oPasswordAuthentication, oRSAAuthentication, 115 oPasswordAuthentication, oRSAAuthentication,
98 oChallengeResponseAuthentication, oXAuthLocation, 116 oChallengeResponseAuthentication, oXAuthLocation,
99 oIdentityFile, oHostName, oPort, oCipher, oRemoteForward, oLocalForward, 117 oIdentityFile, oHostName, oPort, oCipher, oRemoteForward, oLocalForward,
@@ -109,6 +127,7 @@ typedef enum {
109 oClearAllForwardings, oNoHostAuthenticationForLocalhost, 127 oClearAllForwardings, oNoHostAuthenticationForLocalhost,
110 oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout, 128 oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,
111 oAddressFamily, oGssAuthentication, oGssDelegateCreds, 129 oAddressFamily, oGssAuthentication, oGssDelegateCreds,
130 oGssKeyEx,
112 oGssTrustDns, 131 oGssTrustDns,
113 oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly, 132 oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly,
114 oSendEnv, oControlPath, oControlMaster, oHashKnownHosts, 133 oSendEnv, oControlPath, oControlMaster, oHashKnownHosts,
@@ -125,6 +144,7 @@ static struct {
125 { "forwardagent", oForwardAgent }, 144 { "forwardagent", oForwardAgent },
126 { "forwardx11", oForwardX11 }, 145 { "forwardx11", oForwardX11 },
127 { "forwardx11trusted", oForwardX11Trusted }, 146 { "forwardx11trusted", oForwardX11Trusted },
147 { "exitonforwardfailure", oExitOnForwardFailure },
128 { "xauthlocation", oXAuthLocation }, 148 { "xauthlocation", oXAuthLocation },
129 { "gatewayports", oGatewayPorts }, 149 { "gatewayports", oGatewayPorts },
130 { "useprivilegedport", oUsePrivilegedPort }, 150 { "useprivilegedport", oUsePrivilegedPort },
@@ -145,10 +165,12 @@ static struct {
145 { "afstokenpassing", oUnsupported }, 165 { "afstokenpassing", oUnsupported },
146#if defined(GSSAPI) 166#if defined(GSSAPI)
147 { "gssapiauthentication", oGssAuthentication }, 167 { "gssapiauthentication", oGssAuthentication },
168 { "gssapikeyexchange", oGssKeyEx },
148 { "gssapidelegatecredentials", oGssDelegateCreds }, 169 { "gssapidelegatecredentials", oGssDelegateCreds },
149 { "gssapitrustdns", oGssTrustDns }, 170 { "gssapitrustdns", oGssTrustDns },
150#else 171#else
151 { "gssapiauthentication", oUnsupported }, 172 { "gssapiauthentication", oUnsupported },
173 { "gssapikeyexchange", oUnsupported },
152 { "gssapidelegatecredentials", oUnsupported }, 174 { "gssapidelegatecredentials", oUnsupported },
153 { "gssapitrustdns", oUnsupported }, 175 { "gssapitrustdns", oUnsupported },
154#endif 176#endif
@@ -309,7 +331,8 @@ process_config_line(Options *options, const char *host,
309 int *activep) 331 int *activep)
310{ 332{
311 char *s, **charptr, *endofnumber, *keyword, *arg, *arg2, fwdarg[256]; 333 char *s, **charptr, *endofnumber, *keyword, *arg, *arg2, fwdarg[256];
312 int opcode, *intptr, value, value2; 334 int opcode, *intptr, value, value2, scale;
335 long long orig, val64;
313 size_t len; 336 size_t len;
314 Forward fwd; 337 Forward fwd;
315 338
@@ -322,7 +345,8 @@ process_config_line(Options *options, const char *host,
322 345
323 s = line; 346 s = line;
324 /* Get the keyword. (Each line is supposed to begin with a keyword). */ 347 /* Get the keyword. (Each line is supposed to begin with a keyword). */
325 keyword = strdelim(&s); 348 if ((keyword = strdelim(&s)) == NULL)
349 return 0;
326 /* Ignore leading whitespace. */ 350 /* Ignore leading whitespace. */
327 if (*keyword == '\0') 351 if (*keyword == '\0')
328 keyword = strdelim(&s); 352 keyword = strdelim(&s);
@@ -346,7 +370,7 @@ parse_time:
346 if ((value = convtime(arg)) == -1) 370 if ((value = convtime(arg)) == -1)
347 fatal("%s line %d: invalid time value.", 371 fatal("%s line %d: invalid time value.",
348 filename, linenum); 372 filename, linenum);
349 if (*intptr == -1) 373 if (*activep && *intptr == -1)
350 *intptr = value; 374 *intptr = value;
351 break; 375 break;
352 376
@@ -379,6 +403,10 @@ parse_flag:
379 intptr = &options->gateway_ports; 403 intptr = &options->gateway_ports;
380 goto parse_flag; 404 goto parse_flag;
381 405
406 case oExitOnForwardFailure:
407 intptr = &options->exit_on_forward_failure;
408 goto parse_flag;
409
382 case oUsePrivilegedPort: 410 case oUsePrivilegedPort:
383 intptr = &options->use_privileged_port; 411 intptr = &options->use_privileged_port;
384 goto parse_flag; 412 goto parse_flag;
@@ -419,6 +447,10 @@ parse_flag:
419 intptr = &options->gss_authentication; 447 intptr = &options->gss_authentication;
420 goto parse_flag; 448 goto parse_flag;
421 449
450 case oGssKeyEx:
451 intptr = &options->gss_keyex;
452 goto parse_flag;
453
422 case oGssDelegateCreds: 454 case oGssDelegateCreds:
423 intptr = &options->gss_deleg_creds; 455 intptr = &options->gss_deleg_creds;
424 goto parse_flag; 456 goto parse_flag;
@@ -486,22 +518,36 @@ parse_yesnoask:
486 fatal("%.200s line %d: Missing argument.", filename, linenum); 518 fatal("%.200s line %d: Missing argument.", filename, linenum);
487 if (arg[0] < '0' || arg[0] > '9') 519 if (arg[0] < '0' || arg[0] > '9')
488 fatal("%.200s line %d: Bad number.", filename, linenum); 520 fatal("%.200s line %d: Bad number.", filename, linenum);
489 value = strtol(arg, &endofnumber, 10); 521 orig = val64 = strtoll(arg, &endofnumber, 10);
490 if (arg == endofnumber) 522 if (arg == endofnumber)
491 fatal("%.200s line %d: Bad number.", filename, linenum); 523 fatal("%.200s line %d: Bad number.", filename, linenum);
492 switch (toupper(*endofnumber)) { 524 switch (toupper(*endofnumber)) {
525 case '\0':
526 scale = 1;
527 break;
493 case 'K': 528 case 'K':
494 value *= 1<<10; 529 scale = 1<<10;
495 break; 530 break;
496 case 'M': 531 case 'M':
497 value *= 1<<20; 532 scale = 1<<20;
498 break; 533 break;
499 case 'G': 534 case 'G':
500 value *= 1<<30; 535 scale = 1<<30;
501 break; 536 break;
537 default:
538 fatal("%.200s line %d: Invalid RekeyLimit suffix",
539 filename, linenum);
502 } 540 }
541 val64 *= scale;
542 /* detect integer wrap and too-large limits */
543 if ((val64 / scale) != orig || val64 > INT_MAX)
544 fatal("%.200s line %d: RekeyLimit too large",
545 filename, linenum);
546 if (val64 < 16)
547 fatal("%.200s line %d: RekeyLimit too small",
548 filename, linenum);
503 if (*activep && *intptr == -1) 549 if (*activep && *intptr == -1)
504 *intptr = value; 550 *intptr = (int)val64;
505 break; 551 break;
506 552
507 case oIdentityFile: 553 case oIdentityFile:
@@ -513,7 +559,7 @@ parse_yesnoask:
513 if (*intptr >= SSH_MAX_IDENTITY_FILES) 559 if (*intptr >= SSH_MAX_IDENTITY_FILES)
514 fatal("%.200s line %d: Too many identity files specified (max %d).", 560 fatal("%.200s line %d: Too many identity files specified (max %d).",
515 filename, linenum, SSH_MAX_IDENTITY_FILES); 561 filename, linenum, SSH_MAX_IDENTITY_FILES);
516 charptr = &options->identity_files[*intptr]; 562 charptr = &options->identity_files[*intptr];
517 *charptr = xstrdup(arg); 563 *charptr = xstrdup(arg);
518 *intptr = *intptr + 1; 564 *intptr = *intptr + 1;
519 } 565 }
@@ -970,6 +1016,7 @@ initialize_options(Options * options)
970 options->forward_agent = -1; 1016 options->forward_agent = -1;
971 options->forward_x11 = -1; 1017 options->forward_x11 = -1;
972 options->forward_x11_trusted = -1; 1018 options->forward_x11_trusted = -1;
1019 options->exit_on_forward_failure = -1;
973 options->xauth_location = NULL; 1020 options->xauth_location = NULL;
974 options->gateway_ports = -1; 1021 options->gateway_ports = -1;
975 options->use_privileged_port = -1; 1022 options->use_privileged_port = -1;
@@ -977,6 +1024,7 @@ initialize_options(Options * options)
977 options->pubkey_authentication = -1; 1024 options->pubkey_authentication = -1;
978 options->challenge_response_authentication = -1; 1025 options->challenge_response_authentication = -1;
979 options->gss_authentication = -1; 1026 options->gss_authentication = -1;
1027 options->gss_keyex = -1;
980 options->gss_deleg_creds = -1; 1028 options->gss_deleg_creds = -1;
981 options->gss_trust_dns = -1; 1029 options->gss_trust_dns = -1;
982 options->password_authentication = -1; 1030 options->password_authentication = -1;
@@ -1051,6 +1099,8 @@ fill_default_options(Options * options)
1051 options->forward_x11 = 0; 1099 options->forward_x11 = 0;
1052 if (options->forward_x11_trusted == -1) 1100 if (options->forward_x11_trusted == -1)
1053 options->forward_x11_trusted = 0; 1101 options->forward_x11_trusted = 0;
1102 if (options->exit_on_forward_failure == -1)
1103 options->exit_on_forward_failure = 0;
1054 if (options->xauth_location == NULL) 1104 if (options->xauth_location == NULL)
1055 options->xauth_location = _PATH_XAUTH; 1105 options->xauth_location = _PATH_XAUTH;
1056 if (options->gateway_ports == -1) 1106 if (options->gateway_ports == -1)
@@ -1065,6 +1115,8 @@ fill_default_options(Options * options)
1065 options->challenge_response_authentication = 1; 1115 options->challenge_response_authentication = 1;
1066 if (options->gss_authentication == -1) 1116 if (options->gss_authentication == -1)
1067 options->gss_authentication = 0; 1117 options->gss_authentication = 0;
1118 if (options->gss_keyex == -1)
1119 options->gss_keyex = 0;
1068 if (options->gss_deleg_creds == -1) 1120 if (options->gss_deleg_creds == -1)
1069 options->gss_deleg_creds = 0; 1121 options->gss_deleg_creds = 0;
1070 if (options->gss_trust_dns == -1) 1122 if (options->gss_trust_dns == -1)
diff --git a/readconf.h b/readconf.h
index bb70e9373..a3d302420 100644
--- a/readconf.h
+++ b/readconf.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.h,v 1.68 2005/12/06 22:38:27 reyk Exp $ */ 1/* $OpenBSD: readconf.h,v 1.71 2006/08/03 03:34:42 deraadt Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -16,8 +16,6 @@
16#ifndef READCONF_H 16#ifndef READCONF_H
17#define READCONF_H 17#define READCONF_H
18 18
19#include "key.h"
20
21/* Data structure for representing a forwarding request. */ 19/* Data structure for representing a forwarding request. */
22 20
23typedef struct { 21typedef struct {
@@ -34,6 +32,7 @@ typedef struct {
34 int forward_agent; /* Forward authentication agent. */ 32 int forward_agent; /* Forward authentication agent. */
35 int forward_x11; /* Forward X11 display. */ 33 int forward_x11; /* Forward X11 display. */
36 int forward_x11_trusted; /* Trust Forward X11 display. */ 34 int forward_x11_trusted; /* Trust Forward X11 display. */
35 int exit_on_forward_failure; /* Exit if bind(2) fails for -L/-R */
37 char *xauth_location; /* Location for xauth program */ 36 char *xauth_location; /* Location for xauth program */
38 int gateway_ports; /* Allow remote connects to forwarded ports. */ 37 int gateway_ports; /* Allow remote connects to forwarded ports. */
39 int use_privileged_port; /* Don't use privileged port if false. */ 38 int use_privileged_port; /* Don't use privileged port if false. */
@@ -45,6 +44,7 @@ typedef struct {
45 int challenge_response_authentication; 44 int challenge_response_authentication;
46 /* Try S/Key or TIS, authentication. */ 45 /* Try S/Key or TIS, authentication. */
47 int gss_authentication; /* Try GSS authentication */ 46 int gss_authentication; /* Try GSS authentication */
47 int gss_keyex; /* Try GSS key exchange */
48 int gss_deleg_creds; /* Delegate GSS credentials */ 48 int gss_deleg_creds; /* Delegate GSS credentials */
49 int gss_trust_dns; /* Trust DNS for GSS canonicalization */ 49 int gss_trust_dns; /* Trust DNS for GSS canonicalization */
50 int password_authentication; /* Try password 50 int password_authentication; /* Try password
diff --git a/readpass.c b/readpass.c
index 7914799a4..bd144c2e3 100644
--- a/readpass.c
+++ b/readpass.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: readpass.c,v 1.47 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,13 +24,27 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: readpass.c,v 1.33 2005/05/02 21:13:22 markus Exp $"); 27
28#include <sys/types.h>
29#include <sys/wait.h>
30
31#include <errno.h>
32#include <fcntl.h>
33#ifdef HAVE_PATHS_H
34# include <paths.h>
35#endif
36#include <stdarg.h>
37#include <stdio.h>
38#include <stdlib.h>
39#include <string.h>
40#include <unistd.h>
27 41
28#include "xmalloc.h" 42#include "xmalloc.h"
29#include "misc.h" 43#include "misc.h"
30#include "pathnames.h" 44#include "pathnames.h"
31#include "log.h" 45#include "log.h"
32#include "ssh.h" 46#include "ssh.h"
47#include "uidswap.h"
33 48
34static char * 49static char *
35ssh_askpass(char *askpass, const char *msg) 50ssh_askpass(char *askpass, const char *msg)
@@ -53,8 +68,7 @@ ssh_askpass(char *askpass, const char *msg)
53 return NULL; 68 return NULL;
54 } 69 }
55 if (pid == 0) { 70 if (pid == 0) {
56 seteuid(getuid()); 71 permanently_drop_suid(getuid());
57 setuid(getuid());
58 close(p[0]); 72 close(p[0]);
59 if (dup2(p[1], STDOUT_FILENO) < 0) 73 if (dup2(p[1], STDOUT_FILENO) < 0)
60 fatal("ssh_askpass: dup2: %s", strerror(errno)); 74 fatal("ssh_askpass: dup2: %s", strerror(errno));
diff --git a/regress/Makefile b/regress/Makefile
index 4f47bc3fd..539956398 100644
--- a/regress/Makefile
+++ b/regress/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.36 2005/03/04 08:48:46 djm Exp $ 1# $OpenBSD: Makefile,v 1.42 2006/07/19 13:34:52 dtucker Exp $
2 2
3REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t-exec 3REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t-exec
4tests: $(REGRESS_TARGETS) 4tests: $(REGRESS_TARGETS)
@@ -40,7 +40,9 @@ LTESTS= connect \
40 forwarding \ 40 forwarding \
41 multiplex \ 41 multiplex \
42 reexec \ 42 reexec \
43 brokenkeys 43 brokenkeys \
44 cfgmatch \
45 forcecommand
44 46
45USER!= id -un 47USER!= id -un
46CLEANFILES= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \ 48CLEANFILES= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \
@@ -49,8 +51,8 @@ CLEANFILES= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \
49 rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \ 51 rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \
50 rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \ 52 rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \
51 ls.copy banner.in banner.out empty.in \ 53 ls.copy banner.in banner.out empty.in \
52 scp-ssh-wrapper.scp ssh_proxy_envpass \ 54 scp-ssh-wrapper.scp ssh_proxy_envpass remote_pid \
53 remote_pid 55 sshd_proxy_bak rsa_ssh2_cr.prv rsa_ssh2_crnl.prv
54 56
55#LTESTS += ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp 57#LTESTS += ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp
56 58
diff --git a/regress/agent-getpeereid.sh b/regress/agent-getpeereid.sh
index 6186a8d48..e5fcedda7 100644
--- a/regress/agent-getpeereid.sh
+++ b/regress/agent-getpeereid.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: agent-getpeereid.sh,v 1.2 2005/11/14 21:25:56 grunk Exp $ 1# $OpenBSD: agent-getpeereid.sh,v 1.3 2006/07/06 12:01:53 grunk Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="disallow agent attach from other uid" 4tid="disallow agent attach from other uid"
@@ -12,6 +12,11 @@ then
12 echo "skipped (not supported on this platform)" 12 echo "skipped (not supported on this platform)"
13 exit 0 13 exit 0
14fi 14fi
15if [ -z "$SUDO" ]; then
16 echo "skipped: need SUDO to switch to uid $UNPRIV"
17 exit 0
18fi
19
15 20
16trace "start agent" 21trace "start agent"
17eval `${SSHAGENT} -s -a ${ASOCK}` > /dev/null 22eval `${SSHAGENT} -s -a ${ASOCK}` > /dev/null
diff --git a/regress/agent-ptrace.sh b/regress/agent-ptrace.sh
index 4de2638e4..d5892ed03 100644
--- a/regress/agent-ptrace.sh
+++ b/regress/agent-ptrace.sh
@@ -41,7 +41,7 @@ EOF
41 if [ $? -ne 0 ]; then 41 if [ $? -ne 0 ]; then
42 fail "gdb failed: exit code $?" 42 fail "gdb failed: exit code $?"
43 fi 43 fi
44 egrep 'ptrace: Operation not permitted.|procfs:.*Permission denied.|ttrace attach: Permission denied.|procfs:.*: Invalid argument.' >/dev/null ${OBJ}/gdb.out 44 egrep 'ptrace: Operation not permitted.|procfs:.*Permission denied.|ttrace.*Permission denied.|procfs:.*: Invalid argument.' >/dev/null ${OBJ}/gdb.out
45 r=$? 45 r=$?
46 rm -f ${OBJ}/gdb.out 46 rm -f ${OBJ}/gdb.out
47 if [ $r -ne 0 ]; then 47 if [ $r -ne 0 ]; then
diff --git a/regress/cfgmatch.sh b/regress/cfgmatch.sh
new file mode 100644
index 000000000..d987dcb97
--- /dev/null
+++ b/regress/cfgmatch.sh
@@ -0,0 +1,106 @@
1# $OpenBSD: cfgmatch.sh,v 1.2 2006/07/22 01:50:00 dtucker Exp $
2# Placed in the Public Domain.
3
4tid="sshd_config match"
5
6pidfile=$OBJ/remote_pid
7fwdport=3301
8fwd="-L $fwdport:127.0.0.1:$PORT"
9
10stop_client()
11{
12 pid=`cat $pidfile`
13 if [ ! -z "$pid" ]; then
14 kill $pid
15 sleep 1
16 fi
17}
18
19cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
20
21echo "PermitOpen 127.0.0.1:1" >>$OBJ/sshd_config
22echo "Match Address 127.0.0.1" >>$OBJ/sshd_config
23echo "PermitOpen 127.0.0.1:$PORT" >>$OBJ/sshd_config
24
25echo "PermitOpen 127.0.0.1:1" >>$OBJ/sshd_proxy
26echo "Match Address 127.0.0.1" >>$OBJ/sshd_proxy
27echo "PermitOpen 127.0.0.1:$PORT" >>$OBJ/sshd_proxy
28
29start_sshd
30
31#set -x
32
33# Test Match + PermitOpen in sshd_config. This should be permitted
34for p in 1 2; do
35 rm -f $pidfile
36 trace "match permitopen localhost proto $p"
37 ${SSH} -$p $fwd -F $OBJ/ssh_config -f somehost \
38 "echo \$\$ > $pidfile; exec sleep 100" >>$TEST_SSH_LOGFILE 2>&1 ||\
39 fail "match permitopen proto $p sshd failed"
40 sleep 1;
41 ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true || \
42 fail "match permitopen permit proto $p"
43 stop_client
44done
45
46# Same but from different source. This should not be permitted
47for p in 1 2; do
48 rm -f $pidfile
49 trace "match permitopen proxy proto $p"
50 ${SSH} -q -$p $fwd -F $OBJ/ssh_proxy -f somehost \
51 "echo \$\$ > $pidfile; exec sleep 100" >>$TEST_SSH_LOGFILE 2>&1 ||\
52 fail "match permitopen proxy proto $p sshd failed"
53 sleep 1;
54 ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true && \
55 fail "match permitopen deny proto $p"
56 stop_client
57done
58
59# Retry previous with key option, should also be denied.
60echo -n 'permitopen="127.0.0.1:'$PORT'" ' >$OBJ/authorized_keys_$USER
61cat $OBJ/rsa.pub >> $OBJ/authorized_keys_$USER
62echo -n 'permitopen="127.0.0.1:'$PORT'" ' >>$OBJ/authorized_keys_$USER
63cat $OBJ/rsa1.pub >> $OBJ/authorized_keys_$USER
64for p in 1 2; do
65 rm -f $pidfile
66 trace "match permitopen proxy w/key opts proto $p"
67 ${SSH} -q -$p $fwd -F $OBJ/ssh_proxy -f somehost \
68 "echo \$\$ > $pidfile; exec sleep 100" >>$TEST_SSH_LOGFILE 2>&1 ||\
69 fail "match permitopen w/key opt proto $p sshd failed"
70 sleep 1;
71 ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true && \
72 fail "match permitopen deny w/key opt proto $p"
73 stop_client
74done
75
76# Test both sshd_config and key options permitting the same dst/port pair.
77# Should be permitted.
78for p in 1 2; do
79 rm -f $pidfile
80 trace "match permitopen localhost proto $p"
81 ${SSH} -$p $fwd -F $OBJ/ssh_config -f somehost \
82 "echo \$\$ > $pidfile; exec sleep 100" >>$TEST_SSH_LOGFILE 2>&1 ||\
83 fail "match permitopen proto $p sshd failed"
84 sleep 1;
85 ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true || \
86 fail "match permitopen permit proto $p"
87 stop_client
88done
89
90cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy
91echo "PermitOpen 127.0.0.1:1 127.0.0.1:$PORT 127.0.0.2:2" >>$OBJ/sshd_proxy
92echo "Match User $USER" >>$OBJ/sshd_proxy
93echo "PermitOpen 127.0.0.1:1 127.0.0.1:2" >>$OBJ/sshd_proxy
94
95# Test that a Match overrides a PermitOpen in the global section
96for p in 1 2; do
97 rm -f $pidfile
98 trace "match permitopen proxy w/key opts proto $p"
99 ${SSH} -q -$p $fwd -F $OBJ/ssh_proxy -f somehost \
100 "echo \$\$ > $pidfile; exec sleep 100" >>$TEST_SSH_LOGFILE 2>&1 ||\
101 fail "match override permitopen proto $p sshd failed"
102 sleep 1;
103 ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true && \
104 fail "match override permitopen proto $p"
105 stop_client
106done
diff --git a/regress/cipher-speed.sh b/regress/cipher-speed.sh
new file mode 100644
index 000000000..592511143
--- /dev/null
+++ b/regress/cipher-speed.sh
@@ -0,0 +1,47 @@
1# $OpenBSD: cipher-speed.sh,v 1.2 2005/05/24 04:09:54 djm Exp $
2# Placed in the Public Domain.
3
4tid="cipher speed"
5
6getbytes ()
7{
8 sed -n '/transferred/s/.*secs (\(.* bytes.sec\).*/\1/p'
9}
10
11tries="1 2"
12DATA=/bin/ls
13DATA=/bsd
14
15macs="hmac-sha1 hmac-md5 hmac-sha1-96 hmac-md5-96"
16ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
17 arcfour128 arcfour256 arcfour aes192-cbc aes256-cbc aes128-ctr"
18
19for c in $ciphers; do for m in $macs; do
20 trace "proto 2 cipher $c mac $m"
21 for x in $tries; do
22 echo -n "$c/$m:\t"
23 ( ${SSH} -o 'compression no' \
24 -F $OBJ/ssh_proxy -2 -m $m -c $c somehost \
25 exec sh -c \'"dd of=/dev/null obs=32k"\' \
26 < ${DATA} ) 2>&1 | getbytes
27
28 if [ $? -ne 0 ]; then
29 fail "ssh -2 failed with mac $m cipher $c"
30 fi
31 done
32done; done
33
34ciphers="3des blowfish"
35for c in $ciphers; do
36 trace "proto 1 cipher $c"
37 for x in $tries; do
38 echo -n "$c:\t"
39 ( ${SSH} -o 'compression no' \
40 -F $OBJ/ssh_proxy -1 -c $c somehost \
41 exec sh -c \'"dd of=/dev/null obs=32k"\' \
42 < ${DATA} ) 2>&1 | getbytes
43 if [ $? -ne 0 ]; then
44 fail "ssh -1 failed with cipher $c"
45 fi
46 done
47done
diff --git a/regress/forcecommand.sh b/regress/forcecommand.sh
new file mode 100644
index 000000000..99e51a60f
--- /dev/null
+++ b/regress/forcecommand.sh
@@ -0,0 +1,42 @@
1# $OpenBSD: forcecommand.sh,v 1.1 2006/07/19 13:09:28 dtucker Exp $
2# Placed in the Public Domain.
3
4tid="forced command"
5
6cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
7
8echon 'command="true" ' >$OBJ/authorized_keys_$USER
9cat $OBJ/rsa.pub >> $OBJ/authorized_keys_$USER
10echon 'command="true" ' >>$OBJ/authorized_keys_$USER
11cat $OBJ/rsa1.pub >> $OBJ/authorized_keys_$USER
12
13for p in 1 2; do
14 trace "forced command in key option proto $p"
15 ${SSH} -$p -F $OBJ/ssh_proxy somehost false \ ||
16 fail "forced command in key proto $p"
17done
18
19echon 'command="false" ' >$OBJ/authorized_keys_$USER
20cat $OBJ/rsa.pub >> $OBJ/authorized_keys_$USER
21echon 'command="false" ' >>$OBJ/authorized_keys_$USER
22cat $OBJ/rsa1.pub >> $OBJ/authorized_keys_$USER
23
24cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy
25echo "ForceCommand true" >> $OBJ/sshd_proxy
26
27for p in 1 2; do
28 trace "forced command in sshd_config overrides key option proto $p"
29 ${SSH} -$p -F $OBJ/ssh_proxy somehost false \ ||
30 fail "forced command in key proto $p"
31done
32
33cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy
34echo "ForceCommand false" >> $OBJ/sshd_proxy
35echo "Match User $USER" >> $OBJ/sshd_proxy
36echo " ForceCommand true" >> $OBJ/sshd_proxy
37
38for p in 1 2; do
39 trace "forced command with match proto $p"
40 ${SSH} -$p -F $OBJ/ssh_proxy somehost false \ ||
41 fail "forced command in key proto $p"
42done
diff --git a/regress/forwarding.sh b/regress/forwarding.sh
index 3b171144f..9ffbb3dd4 100644
--- a/regress/forwarding.sh
+++ b/regress/forwarding.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: forwarding.sh,v 1.5 2005/03/10 10:20:39 dtucker Exp $ 1# $OpenBSD: forwarding.sh,v 1.6 2006/07/11 18:51:21 markus Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="local and remote forwarding" 4tid="local and remote forwarding"
@@ -34,6 +34,36 @@ for p in 1 2; do
34done 34done
35 35
36for p in 1 2; do 36for p in 1 2; do
37for d in L R; do
38 trace "exit on -$d forward failure, proto $p"
39
40 # this one should succeed
41 ${SSH} -$p -F $OBJ/ssh_config \
42 -$d ${base}01:127.0.0.1:$PORT \
43 -$d ${base}02:127.0.0.1:$PORT \
44 -$d ${base}03:127.0.0.1:$PORT \
45 -$d ${base}04:127.0.0.1:$PORT \
46 -oExitOnForwardFailure=yes somehost true
47 if [ $? != 0 ]; then
48 fail "connection failed, should not"
49 else
50 # this one should fail
51 ${SSH} -q -$p -F $OBJ/ssh_config \
52 -$d ${base}01:127.0.0.1:$PORT \
53 -$d ${base}02:127.0.0.1:$PORT \
54 -$d ${base}03:127.0.0.1:$PORT \
55 -$d ${base}01:127.0.0.1:$PORT \
56 -$d ${base}04:127.0.0.1:$PORT \
57 -oExitOnForwardFailure=yes somehost true
58 r=$?
59 if [ $r != 255 ]; then
60 fail "connection not termintated, but should ($r)"
61 fi
62 fi
63done
64done
65
66for p in 1 2; do
37 trace "simple clear forwarding proto $p" 67 trace "simple clear forwarding proto $p"
38 ${SSH} -$p -F $OBJ/ssh_config -oClearAllForwardings=yes somehost true 68 ${SSH} -$p -F $OBJ/ssh_config -oClearAllForwardings=yes somehost true
39 69
diff --git a/rsa.c b/rsa.c
index 66561a421..bec1d190b 100644
--- a/rsa.c
+++ b/rsa.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: rsa.c,v 1.29 2006/11/06 21:25:28 markus Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -60,11 +61,15 @@
60 */ 61 */
61 62
62#include "includes.h" 63#include "includes.h"
63RCSID("$OpenBSD: rsa.c,v 1.24 2001/12/27 18:22:16 markus Exp $");
64 64
65#include <sys/types.h>
66
67#include <stdarg.h>
68#include <string.h>
69
70#include "xmalloc.h"
65#include "rsa.h" 71#include "rsa.h"
66#include "log.h" 72#include "log.h"
67#include "xmalloc.h"
68 73
69void 74void
70rsa_public_encrypt(BIGNUM *out, BIGNUM *in, RSA *key) 75rsa_public_encrypt(BIGNUM *out, BIGNUM *in, RSA *key)
@@ -86,7 +91,8 @@ rsa_public_encrypt(BIGNUM *out, BIGNUM *in, RSA *key)
86 RSA_PKCS1_PADDING)) <= 0) 91 RSA_PKCS1_PADDING)) <= 0)
87 fatal("rsa_public_encrypt() failed"); 92 fatal("rsa_public_encrypt() failed");
88 93
89 BN_bin2bn(outbuf, len, out); 94 if (BN_bin2bn(outbuf, len, out) == NULL)
95 fatal("rsa_public_encrypt: BN_bin2bn failed");
90 96
91 memset(outbuf, 0, olen); 97 memset(outbuf, 0, olen);
92 memset(inbuf, 0, ilen); 98 memset(inbuf, 0, ilen);
@@ -111,7 +117,8 @@ rsa_private_decrypt(BIGNUM *out, BIGNUM *in, RSA *key)
111 RSA_PKCS1_PADDING)) <= 0) { 117 RSA_PKCS1_PADDING)) <= 0) {
112 error("rsa_private_decrypt() failed"); 118 error("rsa_private_decrypt() failed");
113 } else { 119 } else {
114 BN_bin2bn(outbuf, len, out); 120 if (BN_bin2bn(outbuf, len, out) == NULL)
121 fatal("rsa_private_decrypt: BN_bin2bn failed");
115 } 122 }
116 memset(outbuf, 0, olen); 123 memset(outbuf, 0, olen);
117 memset(inbuf, 0, ilen); 124 memset(inbuf, 0, ilen);
@@ -132,11 +139,11 @@ rsa_generate_additional_parameters(RSA *rsa)
132 if ((ctx = BN_CTX_new()) == NULL) 139 if ((ctx = BN_CTX_new()) == NULL)
133 fatal("rsa_generate_additional_parameters: BN_CTX_new failed"); 140 fatal("rsa_generate_additional_parameters: BN_CTX_new failed");
134 141
135 BN_sub(aux, rsa->q, BN_value_one()); 142 if ((BN_sub(aux, rsa->q, BN_value_one()) == 0) ||
136 BN_mod(rsa->dmq1, rsa->d, aux, ctx); 143 (BN_mod(rsa->dmq1, rsa->d, aux, ctx) == 0) ||
137 144 (BN_sub(aux, rsa->p, BN_value_one()) == 0) ||
138 BN_sub(aux, rsa->p, BN_value_one()); 145 (BN_mod(rsa->dmp1, rsa->d, aux, ctx) == 0))
139 BN_mod(rsa->dmp1, rsa->d, aux, ctx); 146 fatal("rsa_generate_additional_parameters: BN_sub/mod failed");
140 147
141 BN_clear_free(aux); 148 BN_clear_free(aux);
142 BN_CTX_free(ctx); 149 BN_CTX_free(ctx);
diff --git a/rsa.h b/rsa.h
index 957d86552..b841ea4e1 100644
--- a/rsa.h
+++ b/rsa.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa.h,v 1.15 2002/03/04 17:27:39 stevesk Exp $ */ 1/* $OpenBSD: rsa.h,v 1.16 2006/03/25 22:22:43 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
diff --git a/scard-opensc.c b/scard-opensc.c
index dd2c28df2..4751ea295 100644
--- a/scard-opensc.c
+++ b/scard-opensc.c
@@ -26,9 +26,13 @@
26#include "includes.h" 26#include "includes.h"
27#if defined(SMARTCARD) && defined(USE_OPENSC) 27#if defined(SMARTCARD) && defined(USE_OPENSC)
28 28
29#include <sys/types.h>
30
29#include <openssl/evp.h> 31#include <openssl/evp.h>
30#include <openssl/x509.h> 32#include <openssl/x509.h>
31 33
34#include <stdarg.h>
35
32#include <opensc/opensc.h> 36#include <opensc/opensc.h>
33#include <opensc/pkcs15.h> 37#include <opensc/pkcs15.h>
34 38
@@ -455,7 +459,9 @@ sc_get_keys(const char *id, const char *pin)
455 } 459 }
456 key_count = r; 460 key_count = r;
457 } 461 }
458 keys = xmalloc(sizeof(Key *) * (key_count*2+1)); 462 if (key_count > 1024)
463 fatal("Too many keys (%u), expected <= 1024", key_count);
464 keys = xcalloc(key_count * 2 + 1, sizeof(Key *));
459 for (i = 0; i < key_count; i++) { 465 for (i = 0; i < key_count; i++) {
460 sc_pkcs15_object_t *tmp_obj = NULL; 466 sc_pkcs15_object_t *tmp_obj = NULL;
461 cert_id = ((sc_pkcs15_cert_info_t *)(certs[i]->data))->id; 467 cert_id = ((sc_pkcs15_cert_info_t *)(certs[i]->data))->id;
diff --git a/scard.c b/scard.c
index b3d25058a..9fd3ca1b4 100644
--- a/scard.c
+++ b/scard.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: scard.c,v 1.36 2006/11/06 21:25:28 markus Exp $ */
1/* 2/*
2 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
3 * 4 *
@@ -24,14 +25,18 @@
24 25
25#include "includes.h" 26#include "includes.h"
26#if defined(SMARTCARD) && defined(USE_SECTOK) 27#if defined(SMARTCARD) && defined(USE_SECTOK)
27RCSID("$OpenBSD: scard.c,v 1.29 2004/05/08 00:21:31 djm Exp $");
28 28
29#include <openssl/evp.h> 29#include <sys/types.h>
30
30#include <sectok.h> 31#include <sectok.h>
32#include <stdarg.h>
33#include <string.h>
34
35#include <openssl/evp.h>
31 36
37#include "xmalloc.h"
32#include "key.h" 38#include "key.h"
33#include "log.h" 39#include "log.h"
34#include "xmalloc.h"
35#include "misc.h" 40#include "misc.h"
36#include "scard.h" 41#include "scard.h"
37 42
@@ -125,7 +130,7 @@ sc_init(void)
125 if (status == SCARD_ERROR_NOCARD) { 130 if (status == SCARD_ERROR_NOCARD) {
126 return SCARD_ERROR_NOCARD; 131 return SCARD_ERROR_NOCARD;
127 } 132 }
128 if (status < 0 ) { 133 if (status < 0) {
129 error("sc_open failed"); 134 error("sc_open failed");
130 return status; 135 return status;
131 } 136 }
@@ -215,7 +220,7 @@ sc_private_decrypt(int flen, u_char *from, u_char *to, RSA *rsa,
215 olen = len = sw = 0; 220 olen = len = sw = 0;
216 if (sc_fd < 0) { 221 if (sc_fd < 0) {
217 status = sc_init(); 222 status = sc_init();
218 if (status < 0 ) 223 if (status < 0)
219 goto err; 224 goto err;
220 } 225 }
221 if (padding != RSA_PKCS1_PADDING) 226 if (padding != RSA_PKCS1_PADDING)
@@ -255,7 +260,7 @@ sc_private_encrypt(int flen, u_char *from, u_char *to, RSA *rsa,
255 len = sw = 0; 260 len = sw = 0;
256 if (sc_fd < 0) { 261 if (sc_fd < 0) {
257 status = sc_init(); 262 status = sc_init();
258 if (status < 0 ) 263 if (status < 0)
259 goto err; 264 goto err;
260 } 265 }
261 if (padding != RSA_PKCS1_PADDING) 266 if (padding != RSA_PKCS1_PADDING)
@@ -378,23 +383,25 @@ sc_get_keys(const char *id, const char *pin)
378 key_free(k); 383 key_free(k);
379 return NULL; 384 return NULL;
380 } 385 }
381 if (status < 0 ) { 386 if (status < 0) {
382 error("sc_read_pubkey failed"); 387 error("sc_read_pubkey failed");
383 key_free(k); 388 key_free(k);
384 return NULL; 389 return NULL;
385 } 390 }
386 keys = xmalloc((nkeys+1) * sizeof(Key *)); 391 keys = xcalloc((nkeys+1), sizeof(Key *));
387 392
388 n = key_new(KEY_RSA1); 393 n = key_new(KEY_RSA1);
389 BN_copy(n->rsa->n, k->rsa->n); 394 if ((BN_copy(n->rsa->n, k->rsa->n) == NULL) ||
390 BN_copy(n->rsa->e, k->rsa->e); 395 (BN_copy(n->rsa->e, k->rsa->e) == NULL))
396 fatal("sc_get_keys: BN_copy failed");
391 RSA_set_method(n->rsa, sc_get_rsa()); 397 RSA_set_method(n->rsa, sc_get_rsa());
392 n->flags |= KEY_FLAG_EXT; 398 n->flags |= KEY_FLAG_EXT;
393 keys[0] = n; 399 keys[0] = n;
394 400
395 n = key_new(KEY_RSA); 401 n = key_new(KEY_RSA);
396 BN_copy(n->rsa->n, k->rsa->n); 402 if ((BN_copy(n->rsa->n, k->rsa->n) == NULL) ||
397 BN_copy(n->rsa->e, k->rsa->e); 403 (BN_copy(n->rsa->e, k->rsa->e) == NULL))
404 fatal("sc_get_keys: BN_copy failed");
398 RSA_set_method(n->rsa, sc_get_rsa()); 405 RSA_set_method(n->rsa, sc_get_rsa());
399 n->flags |= KEY_FLAG_EXT; 406 n->flags |= KEY_FLAG_EXT;
400 keys[1] = n; 407 keys[1] = n;
diff --git a/scard.h b/scard.h
index 9ba20a361..82efe4839 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.14 2006/08/03 03:34:42 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -27,8 +27,6 @@
27#ifndef SCARD_H 27#ifndef SCARD_H
28#define SCARD_H 28#define SCARD_H
29 29
30#include "key.h"
31
32#define SCARD_ERROR_FAIL -1 30#define SCARD_ERROR_FAIL -1
33#define SCARD_ERROR_NOCARD -2 31#define SCARD_ERROR_NOCARD -2
34#define SCARD_ERROR_APPLET -3 32#define SCARD_ERROR_APPLET -3
diff --git a/scard/Makefile.in b/scard/Makefile.in
index ab4e22043..8519e208b 100644
--- a/scard/Makefile.in
+++ b/scard/Makefile.in
@@ -1,7 +1,8 @@
1# $Id: Makefile.in,v 1.4 2002/04/26 01:25:41 djm Exp $ 1# $Id: Makefile.in,v 1.5 2006/10/23 21:44:47 tim Exp $
2 2
3prefix=@prefix@ 3prefix=@prefix@
4datadir=@datadir@ 4datadir=@datadir@
5datarootdir=@datarootdir@
5srcdir=@srcdir@ 6srcdir=@srcdir@
6top_srcdir=@top_srcdir@ 7top_srcdir=@top_srcdir@
7 8
diff --git a/scp.0 b/scp.0
index 2c7f15567..6e7a196f4 100644
--- a/scp.0
+++ b/scp.0
@@ -127,8 +127,7 @@ DESCRIPTION
127 about their progress. This is helpful in debugging connection, 127 about their progress. This is helpful in debugging connection,
128 authentication, and configuration problems. 128 authentication, and configuration problems.
129 129
130DIAGNOSTICS 130 The scp utility exits 0 on success, and >0 if an error occurs.
131 scp exits with 0 on success or >0 if an error occurred.
132 131
133SEE ALSO 132SEE ALSO
134 rcp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1), 133 rcp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1),
@@ -142,4 +141,4 @@ AUTHORS
142 Timo Rinne <tri@iki.fi> 141 Timo Rinne <tri@iki.fi>
143 Tatu Ylonen <ylo@cs.hut.fi> 142 Tatu Ylonen <ylo@cs.hut.fi>
144 143
145OpenBSD 3.9 September 25, 1999 3 144OpenBSD 4.1 September 25, 1999 3
diff --git a/scp.1 b/scp.1
index d9b1f8e8f..43662abea 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.39 2006/01/20 00:14:55 dtucker Exp $ 12.\" $OpenBSD: scp.1,v 1.40 2006/07/18 07:56:28 jmc Exp $
13.\" 13.\"
14.Dd September 25, 1999 14.Dd September 25, 1999
15.Dt SCP 1 15.Dt SCP 1
@@ -198,9 +198,8 @@ to print debugging messages about their progress.
198This is helpful in 198This is helpful in
199debugging connection, authentication, and configuration problems. 199debugging connection, authentication, and configuration problems.
200.El 200.El
201.Sh DIAGNOSTICS 201.Pp
202.Nm 202.Ex -std scp
203exits with 0 on success or >0 if an error occurred.
204.Sh SEE ALSO 203.Sh SEE ALSO
205.Xr rcp 1 , 204.Xr rcp 1 ,
206.Xr sftp 1 , 205.Xr sftp 1 ,
diff --git a/scp.c b/scp.c
index 620024ea7..a52aaeb12 100644
--- a/scp.c
+++ b/scp.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: scp.c,v 1.156 2007/01/22 13:06:21 djm Exp $ */
1/* 2/*
2 * scp - secure remote copy. This is basically patched BSD rcp which 3 * scp - secure remote copy. This is basically patched BSD rcp which
3 * uses ssh to do the data transfer (instead of using rcmd). 4 * uses ssh to do the data transfer (instead of using rcmd).
@@ -71,7 +72,30 @@
71 */ 72 */
72 73
73#include "includes.h" 74#include "includes.h"
74RCSID("$OpenBSD: scp.c,v 1.130 2006/01/31 10:35:43 djm Exp $"); 75
76#include <sys/types.h>
77#include <sys/param.h>
78#ifdef HAVE_SYS_STAT_H
79# include <sys/stat.h>
80#endif
81#ifdef HAVE_SYS_TIME_H
82# include <sys/time.h>
83#endif
84#include <sys/wait.h>
85#include <sys/uio.h>
86
87#include <ctype.h>
88#include <dirent.h>
89#include <errno.h>
90#include <fcntl.h>
91#include <pwd.h>
92#include <signal.h>
93#include <stdarg.h>
94#include <stdio.h>
95#include <stdlib.h>
96#include <string.h>
97#include <time.h>
98#include <unistd.h>
75 99
76#include "xmalloc.h" 100#include "xmalloc.h"
77#include "atomicio.h" 101#include "atomicio.h"
@@ -82,6 +106,8 @@ RCSID("$OpenBSD: scp.c,v 1.130 2006/01/31 10:35:43 djm Exp $");
82 106
83extern char *__progname; 107extern char *__progname;
84 108
109int do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout);
110
85void bwlimit(int); 111void bwlimit(int);
86 112
87/* Struct for addargs */ 113/* Struct for addargs */
@@ -167,7 +193,7 @@ do_local_cmd(arglist *a)
167 */ 193 */
168 194
169int 195int
170do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout, int argc) 196do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout)
171{ 197{
172 int pin[2], pout[2], reserved[2]; 198 int pin[2], pout[2], reserved[2];
173 199
@@ -181,7 +207,8 @@ do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout, int argc)
181 * Reserve two descriptors so that the real pipes won't get 207 * Reserve two descriptors so that the real pipes won't get
182 * descriptors 0 and 1 because that will screw up dup2 below. 208 * descriptors 0 and 1 because that will screw up dup2 below.
183 */ 209 */
184 pipe(reserved); 210 if (pipe(reserved) < 0)
211 fatal("pipe: %s", strerror(errno));
185 212
186 /* Create a socket pair for communicating with ssh. */ 213 /* Create a socket pair for communicating with ssh. */
187 if (pipe(pin) < 0) 214 if (pipe(pin) < 0)
@@ -234,7 +261,6 @@ typedef struct {
234 261
235BUF *allocbuf(BUF *, int, int); 262BUF *allocbuf(BUF *, int, int);
236void lostconn(int); 263void lostconn(int);
237void nospace(void);
238int okname(char *); 264int okname(char *);
239void run_err(const char *,...); 265void run_err(const char *,...);
240void verifydir(char *); 266void verifydir(char *);
@@ -258,15 +284,21 @@ void usage(void);
258int 284int
259main(int argc, char **argv) 285main(int argc, char **argv)
260{ 286{
261 int ch, fflag, tflag, status; 287 int ch, fflag, tflag, status, n;
262 double speed; 288 double speed;
263 char *targ, *endp; 289 char *targ, *endp, **newargv;
264 extern char *optarg; 290 extern char *optarg;
265 extern int optind; 291 extern int optind;
266 292
267 /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ 293 /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
268 sanitise_stdfd(); 294 sanitise_stdfd();
269 295
296 /* Copy argv, because we modify it */
297 newargv = xcalloc(MAX(argc + 1, 1), sizeof(*newargv));
298 for (n = 0; n < argc; n++)
299 newargv[n] = xstrdup(argv[n]);
300 argv = newargv;
301
270 __progname = ssh_get_progname(argv[0]); 302 __progname = ssh_get_progname(argv[0]);
271 303
272 memset(&args, '\0', sizeof(args)); 304 memset(&args, '\0', sizeof(args));
@@ -348,7 +380,7 @@ main(int argc, char **argv)
348 if ((pwd = getpwuid(userid = getuid())) == NULL) 380 if ((pwd = getpwuid(userid = getuid())) == NULL)
349 fatal("unknown user %u", (u_int) userid); 381 fatal("unknown user %u", (u_int) userid);
350 382
351 if (!isatty(STDERR_FILENO)) 383 if (!isatty(STDOUT_FILENO))
352 showprogress = 0; 384 showprogress = 0;
353 385
354 remin = STDIN_FILENO; 386 remin = STDIN_FILENO;
@@ -409,9 +441,9 @@ main(int argc, char **argv)
409void 441void
410toremote(char *targ, int argc, char **argv) 442toremote(char *targ, int argc, char **argv)
411{ 443{
412 int i, len;
413 char *bp, *host, *src, *suser, *thost, *tuser, *arg; 444 char *bp, *host, *src, *suser, *thost, *tuser, *arg;
414 arglist alist; 445 arglist alist;
446 int i;
415 447
416 memset(&alist, '\0', sizeof(alist)); 448 memset(&alist, '\0', sizeof(alist));
417 alist.list = NULL; 449 alist.list = NULL;
@@ -476,12 +508,10 @@ toremote(char *targ, int argc, char **argv)
476 errs = 1; 508 errs = 1;
477 } else { /* local to remote */ 509 } else { /* local to remote */
478 if (remin == -1) { 510 if (remin == -1) {
479 len = strlen(targ) + CMDNEEDS + 20; 511 xasprintf(&bp, "%s -t %s", cmd, targ);
480 bp = xmalloc(len);
481 (void) snprintf(bp, len, "%s -t %s", cmd, targ);
482 host = cleanhostname(thost); 512 host = cleanhostname(thost);
483 if (do_cmd(host, tuser, bp, &remin, 513 if (do_cmd(host, tuser, bp, &remin,
484 &remout, argc) < 0) 514 &remout) < 0)
485 exit(1); 515 exit(1);
486 if (response() < 0) 516 if (response() < 0)
487 exit(1); 517 exit(1);
@@ -490,14 +520,15 @@ toremote(char *targ, int argc, char **argv)
490 source(1, argv + i); 520 source(1, argv + i);
491 } 521 }
492 } 522 }
523 xfree(arg);
493} 524}
494 525
495void 526void
496tolocal(int argc, char **argv) 527tolocal(int argc, char **argv)
497{ 528{
498 int i, len;
499 char *bp, *host, *src, *suser; 529 char *bp, *host, *src, *suser;
500 arglist alist; 530 arglist alist;
531 int i;
501 532
502 memset(&alist, '\0', sizeof(alist)); 533 memset(&alist, '\0', sizeof(alist));
503 alist.list = NULL; 534 alist.list = NULL;
@@ -529,10 +560,8 @@ tolocal(int argc, char **argv)
529 suser = pwd->pw_name; 560 suser = pwd->pw_name;
530 } 561 }
531 host = cleanhostname(host); 562 host = cleanhostname(host);
532 len = strlen(src) + CMDNEEDS + 20; 563 xasprintf(&bp, "%s -f %s", cmd, src);
533 bp = xmalloc(len); 564 if (do_cmd(host, suser, bp, &remin, &remout) < 0) {
534 (void) snprintf(bp, len, "%s -f %s", cmd, src);
535 if (do_cmd(host, suser, bp, &remin, &remout, argc) < 0) {
536 (void) xfree(bp); 565 (void) xfree(bp);
537 ++errs; 566 ++errs;
538 continue; 567 continue;
@@ -777,7 +806,8 @@ sink(int argc, char **argv)
777 BUF *bp; 806 BUF *bp;
778 off_t i; 807 off_t i;
779 size_t j, count; 808 size_t j, count;
780 int amt, exists, first, mask, mode, ofd, omode; 809 int amt, exists, first, ofd;
810 mode_t mode, omode, mask;
781 off_t size, statbytes; 811 off_t size, statbytes;
782 int setimes, targisdir, wrerrno = 0; 812 int setimes, targisdir, wrerrno = 0;
783 char ch, *cp, *np, *targ, *why, *vect[1], buf[2048]; 813 char ch, *cp, *np, *targ, *why, *vect[1], buf[2048];
@@ -1097,15 +1127,15 @@ run_err(const char *fmt,...)
1097 va_list ap; 1127 va_list ap;
1098 1128
1099 ++errs; 1129 ++errs;
1100 if (fp == NULL && !(fp = fdopen(remout, "w"))) 1130 if (fp != NULL || (remout != -1 && (fp = fdopen(remout, "w")))) {
1101 return; 1131 (void) fprintf(fp, "%c", 0x01);
1102 (void) fprintf(fp, "%c", 0x01); 1132 (void) fprintf(fp, "scp: ");
1103 (void) fprintf(fp, "scp: "); 1133 va_start(ap, fmt);
1104 va_start(ap, fmt); 1134 (void) vfprintf(fp, fmt, ap);
1105 (void) vfprintf(fp, fmt, ap); 1135 va_end(ap);
1106 va_end(ap); 1136 (void) fprintf(fp, "\n");
1107 (void) fprintf(fp, "\n"); 1137 (void) fflush(fp);
1108 (void) fflush(fp); 1138 }
1109 1139
1110 if (!iamremote) { 1140 if (!iamremote) {
1111 va_start(ap, fmt); 1141 va_start(ap, fmt);
@@ -1181,7 +1211,7 @@ allocbuf(BUF *bp, int fd, int blksize)
1181 if (bp->buf == NULL) 1211 if (bp->buf == NULL)
1182 bp->buf = xmalloc(size); 1212 bp->buf = xmalloc(size);
1183 else 1213 else
1184 bp->buf = xrealloc(bp->buf, size); 1214 bp->buf = xrealloc(bp->buf, 1, size);
1185 memset(bp->buf, 0, size); 1215 memset(bp->buf, 0, size);
1186 bp->cnt = size; 1216 bp->cnt = size;
1187 return (bp); 1217 return (bp);
diff --git a/servconf.c b/servconf.c
index 219a0300f..26adf0140 100644
--- a/servconf.c
+++ b/servconf.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: servconf.c,v 1.170 2007/03/01 10:28:02 dtucker Exp $ */
1/* 2/*
2 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
3 * All rights reserved 4 * All rights reserved
@@ -10,24 +11,41 @@
10 */ 11 */
11 12
12#include "includes.h" 13#include "includes.h"
13RCSID("$OpenBSD: servconf.c,v 1.146 2005/12/08 18:34:11 reyk Exp $");
14 14
15#include <sys/types.h>
16#include <sys/socket.h>
17
18#include <netdb.h>
19#include <pwd.h>
20#include <stdio.h>
21#include <stdlib.h>
22#include <string.h>
23#include <signal.h>
24#include <unistd.h>
25#include <stdarg.h>
26
27#include "xmalloc.h"
15#include "ssh.h" 28#include "ssh.h"
16#include "log.h" 29#include "log.h"
30#include "buffer.h"
17#include "servconf.h" 31#include "servconf.h"
18#include "xmalloc.h"
19#include "compat.h" 32#include "compat.h"
20#include "pathnames.h" 33#include "pathnames.h"
21#include "misc.h" 34#include "misc.h"
22#include "cipher.h" 35#include "cipher.h"
36#include "key.h"
23#include "kex.h" 37#include "kex.h"
24#include "mac.h" 38#include "mac.h"
39#include "match.h"
40#include "channels.h"
41#include "groupaccess.h"
25 42
26static void add_listen_addr(ServerOptions *, char *, u_short); 43static void add_listen_addr(ServerOptions *, char *, u_short);
27static void add_one_listen_addr(ServerOptions *, char *, u_short); 44static void add_one_listen_addr(ServerOptions *, char *, u_short);
28 45
29/* Use of privilege separation or not */ 46/* Use of privilege separation or not */
30extern int use_privsep; 47extern int use_privsep;
48extern Buffer cfg;
31 49
32/* Initializes the server options to their default values. */ 50/* Initializes the server options to their default values. */
33 51
@@ -74,6 +92,7 @@ initialize_server_options(ServerOptions *options)
74 options->gss_authentication=-1; 92 options->gss_authentication=-1;
75 options->gss_keyex = -1; 93 options->gss_keyex = -1;
76 options->gss_cleanup_creds = -1; 94 options->gss_cleanup_creds = -1;
95 options->gss_strict_acceptor = -1;
77 options->password_authentication = -1; 96 options->password_authentication = -1;
78 options->kbd_interactive_authentication = -1; 97 options->kbd_interactive_authentication = -1;
79 options->challenge_response_authentication = -1; 98 options->challenge_response_authentication = -1;
@@ -103,9 +122,8 @@ initialize_server_options(ServerOptions *options)
103 options->authorized_keys_file2 = NULL; 122 options->authorized_keys_file2 = NULL;
104 options->num_accept_env = 0; 123 options->num_accept_env = 0;
105 options->permit_tun = -1; 124 options->permit_tun = -1;
106 125 options->num_permitted_opens = -1;
107 /* Needs to be accessable in many places */ 126 options->adm_forced_command = NULL;
108 use_privsep = -1;
109} 127}
110 128
111void 129void
@@ -192,6 +210,8 @@ fill_default_server_options(ServerOptions *options)
192 options->gss_keyex = 0; 210 options->gss_keyex = 0;
193 if (options->gss_cleanup_creds == -1) 211 if (options->gss_cleanup_creds == -1)
194 options->gss_cleanup_creds = 1; 212 options->gss_cleanup_creds = 1;
213 if (options->gss_strict_acceptor == -1)
214 options->gss_strict_acceptor = 1;
195 if (options->password_authentication == -1) 215 if (options->password_authentication == -1)
196 options->password_authentication = 1; 216 options->password_authentication = 1;
197 if (options->kbd_interactive_authentication == -1) 217 if (options->kbd_interactive_authentication == -1)
@@ -276,114 +296,126 @@ typedef enum {
276 sBanner, sUseDNS, sHostbasedAuthentication, 296 sBanner, sUseDNS, sHostbasedAuthentication,
277 sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, 297 sHostbasedUsesNameFromPacketOnly, sClientAliveInterval,
278 sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, 298 sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2,
279 sGssAuthentication, sGssKeyEx, sGssCleanupCreds, 299 sGssAuthentication, sGssCleanupCreds, sGssStrictAcceptor,
300 sGssKeyEx,
280 sAcceptEnv, sPermitTunnel, 301 sAcceptEnv, sPermitTunnel,
302 sMatch, sPermitOpen, sForceCommand,
281 sUsePrivilegeSeparation, 303 sUsePrivilegeSeparation,
282 sDeprecated, sUnsupported 304 sDeprecated, sUnsupported
283} ServerOpCodes; 305} ServerOpCodes;
284 306
307#define SSHCFG_GLOBAL 0x01 /* allowed in main section of sshd_config */
308#define SSHCFG_MATCH 0x02 /* allowed inside a Match section */
309#define SSHCFG_ALL (SSHCFG_GLOBAL|SSHCFG_MATCH)
310
285/* Textual representation of the tokens. */ 311/* Textual representation of the tokens. */
286static struct { 312static struct {
287 const char *name; 313 const char *name;
288 ServerOpCodes opcode; 314 ServerOpCodes opcode;
315 u_int flags;
289} keywords[] = { 316} keywords[] = {
290 /* Portable-specific options */ 317 /* Portable-specific options */
291#ifdef USE_PAM 318#ifdef USE_PAM
292 { "usepam", sUsePAM }, 319 { "usepam", sUsePAM, SSHCFG_GLOBAL },
293#else 320#else
294 { "usepam", sUnsupported }, 321 { "usepam", sUnsupported, SSHCFG_GLOBAL },
295#endif 322#endif
296 { "pamauthenticationviakbdint", sDeprecated }, 323 { "pamauthenticationviakbdint", sDeprecated, SSHCFG_GLOBAL },
297 /* Standard Options */ 324 /* Standard Options */
298 { "port", sPort }, 325 { "port", sPort, SSHCFG_GLOBAL },
299 { "hostkey", sHostKeyFile }, 326 { "hostkey", sHostKeyFile, SSHCFG_GLOBAL },
300 { "hostdsakey", sHostKeyFile }, /* alias */ 327 { "hostdsakey", sHostKeyFile, SSHCFG_GLOBAL }, /* alias */
301 { "pidfile", sPidFile }, 328 { "pidfile", sPidFile, SSHCFG_GLOBAL },
302 { "serverkeybits", sServerKeyBits }, 329 { "serverkeybits", sServerKeyBits, SSHCFG_GLOBAL },
303 { "logingracetime", sLoginGraceTime }, 330 { "logingracetime", sLoginGraceTime, SSHCFG_GLOBAL },
304 { "keyregenerationinterval", sKeyRegenerationTime }, 331 { "keyregenerationinterval", sKeyRegenerationTime, SSHCFG_GLOBAL },
305 { "permitrootlogin", sPermitRootLogin }, 332 { "permitrootlogin", sPermitRootLogin, SSHCFG_GLOBAL },
306 { "syslogfacility", sLogFacility }, 333 { "syslogfacility", sLogFacility, SSHCFG_GLOBAL },
307 { "loglevel", sLogLevel }, 334 { "loglevel", sLogLevel, SSHCFG_GLOBAL },
308 { "rhostsauthentication", sDeprecated }, 335 { "rhostsauthentication", sDeprecated, SSHCFG_GLOBAL },
309 { "rhostsrsaauthentication", sRhostsRSAAuthentication }, 336 { "rhostsrsaauthentication", sRhostsRSAAuthentication, SSHCFG_ALL },
310 { "hostbasedauthentication", sHostbasedAuthentication }, 337 { "hostbasedauthentication", sHostbasedAuthentication, SSHCFG_ALL },
311 { "hostbasedusesnamefrompacketonly", sHostbasedUsesNameFromPacketOnly }, 338 { "hostbasedusesnamefrompacketonly", sHostbasedUsesNameFromPacketOnly, SSHCFG_GLOBAL },
312 { "rsaauthentication", sRSAAuthentication }, 339 { "rsaauthentication", sRSAAuthentication, SSHCFG_ALL },
313 { "pubkeyauthentication", sPubkeyAuthentication }, 340 { "pubkeyauthentication", sPubkeyAuthentication, SSHCFG_ALL },
314 { "dsaauthentication", sPubkeyAuthentication }, /* alias */ 341 { "dsaauthentication", sPubkeyAuthentication, SSHCFG_GLOBAL }, /* alias */
315#ifdef KRB5 342#ifdef KRB5
316 { "kerberosauthentication", sKerberosAuthentication }, 343 { "kerberosauthentication", sKerberosAuthentication, SSHCFG_ALL },
317 { "kerberosorlocalpasswd", sKerberosOrLocalPasswd }, 344 { "kerberosorlocalpasswd", sKerberosOrLocalPasswd, SSHCFG_GLOBAL },
318 { "kerberosticketcleanup", sKerberosTicketCleanup }, 345 { "kerberosticketcleanup", sKerberosTicketCleanup, SSHCFG_GLOBAL },
319#ifdef USE_AFS 346#ifdef USE_AFS
320 { "kerberosgetafstoken", sKerberosGetAFSToken }, 347 { "kerberosgetafstoken", sKerberosGetAFSToken, SSHCFG_GLOBAL },
321#else 348#else
322 { "kerberosgetafstoken", sUnsupported }, 349 { "kerberosgetafstoken", sUnsupported, SSHCFG_GLOBAL },
323#endif 350#endif
324#else 351#else
325 { "kerberosauthentication", sUnsupported }, 352 { "kerberosauthentication", sUnsupported, SSHCFG_ALL },
326 { "kerberosorlocalpasswd", sUnsupported }, 353 { "kerberosorlocalpasswd", sUnsupported, SSHCFG_GLOBAL },
327 { "kerberosticketcleanup", sUnsupported }, 354 { "kerberosticketcleanup", sUnsupported, SSHCFG_GLOBAL },
328 { "kerberosgetafstoken", sUnsupported }, 355 { "kerberosgetafstoken", sUnsupported, SSHCFG_GLOBAL },
329#endif 356#endif
330 { "kerberostgtpassing", sUnsupported }, 357 { "kerberostgtpassing", sUnsupported, SSHCFG_GLOBAL },
331 { "afstokenpassing", sUnsupported }, 358 { "afstokenpassing", sUnsupported, SSHCFG_GLOBAL },
332#ifdef GSSAPI 359#ifdef GSSAPI
333 { "gssapiauthentication", sGssAuthentication }, 360 { "gssapiauthentication", sGssAuthentication, SSHCFG_ALL },
334 { "gssapikeyexchange", sGssKeyEx }, 361 { "gssapicleanupcredentials", sGssCleanupCreds, SSHCFG_GLOBAL },
335 { "gssapicleanupcredentials", sGssCleanupCreds }, 362 { "gssapistrictacceptorcheck", sGssStrictAcceptor, SSHCFG_GLOBAL },
363 { "gssapikeyexchange", sGssKeyEx, SSHCFG_GLOBAL },
336#else 364#else
337 { "gssapiauthentication", sUnsupported }, 365 { "gssapiauthentication", sUnsupported, SSHCFG_ALL },
338 { "gssapikeyexchange", sUnsupported }, 366 { "gssapicleanupcredentials", sUnsupported, SSHCFG_GLOBAL },
339 { "gssapicleanupcredentials", sUnsupported }, 367 { "gssapistrictacceptorcheck", sUnsupported, SSHCFG_GLOBAL },
368 { "gssapikeyexchange", sUnsupported, SSHCFG_GLOBAL },
340#endif 369#endif
341 { "passwordauthentication", sPasswordAuthentication }, 370 { "passwordauthentication", sPasswordAuthentication, SSHCFG_ALL },
342 { "kbdinteractiveauthentication", sKbdInteractiveAuthentication }, 371 { "kbdinteractiveauthentication", sKbdInteractiveAuthentication, SSHCFG_ALL },
343 { "challengeresponseauthentication", sChallengeResponseAuthentication }, 372 { "challengeresponseauthentication", sChallengeResponseAuthentication, SSHCFG_GLOBAL },
344 { "skeyauthentication", sChallengeResponseAuthentication }, /* alias */ 373 { "skeyauthentication", sChallengeResponseAuthentication, SSHCFG_GLOBAL }, /* alias */
345 { "checkmail", sDeprecated }, 374 { "checkmail", sDeprecated, SSHCFG_GLOBAL },
346 { "listenaddress", sListenAddress }, 375 { "listenaddress", sListenAddress, SSHCFG_GLOBAL },
347 { "addressfamily", sAddressFamily }, 376 { "addressfamily", sAddressFamily, SSHCFG_GLOBAL },
348 { "printmotd", sPrintMotd }, 377 { "printmotd", sPrintMotd, SSHCFG_GLOBAL },
349 { "printlastlog", sPrintLastLog }, 378 { "printlastlog", sPrintLastLog, SSHCFG_GLOBAL },
350 { "ignorerhosts", sIgnoreRhosts }, 379 { "ignorerhosts", sIgnoreRhosts, SSHCFG_GLOBAL },
351 { "ignoreuserknownhosts", sIgnoreUserKnownHosts }, 380 { "ignoreuserknownhosts", sIgnoreUserKnownHosts, SSHCFG_GLOBAL },
352 { "x11forwarding", sX11Forwarding }, 381 { "x11forwarding", sX11Forwarding, SSHCFG_ALL },
353 { "x11displayoffset", sX11DisplayOffset }, 382 { "x11displayoffset", sX11DisplayOffset, SSHCFG_ALL },
354 { "x11uselocalhost", sX11UseLocalhost }, 383 { "x11uselocalhost", sX11UseLocalhost, SSHCFG_ALL },
355 { "xauthlocation", sXAuthLocation }, 384 { "xauthlocation", sXAuthLocation, SSHCFG_GLOBAL },
356 { "strictmodes", sStrictModes }, 385 { "strictmodes", sStrictModes, SSHCFG_GLOBAL },
357 { "permitemptypasswords", sEmptyPasswd }, 386 { "permitemptypasswords", sEmptyPasswd, SSHCFG_GLOBAL },
358 { "permituserenvironment", sPermitUserEnvironment }, 387 { "permituserenvironment", sPermitUserEnvironment, SSHCFG_GLOBAL },
359 { "uselogin", sUseLogin }, 388 { "uselogin", sUseLogin, SSHCFG_GLOBAL },
360 { "compression", sCompression }, 389 { "compression", sCompression, SSHCFG_GLOBAL },
361 { "tcpkeepalive", sTCPKeepAlive }, 390 { "tcpkeepalive", sTCPKeepAlive, SSHCFG_GLOBAL },
362 { "keepalive", sTCPKeepAlive }, /* obsolete alias */ 391 { "keepalive", sTCPKeepAlive, SSHCFG_GLOBAL }, /* obsolete alias */
363 { "allowtcpforwarding", sAllowTcpForwarding }, 392 { "allowtcpforwarding", sAllowTcpForwarding, SSHCFG_ALL },
364 { "allowusers", sAllowUsers }, 393 { "allowusers", sAllowUsers, SSHCFG_GLOBAL },
365 { "denyusers", sDenyUsers }, 394 { "denyusers", sDenyUsers, SSHCFG_GLOBAL },
366 { "allowgroups", sAllowGroups }, 395 { "allowgroups", sAllowGroups, SSHCFG_GLOBAL },
367 { "denygroups", sDenyGroups }, 396 { "denygroups", sDenyGroups, SSHCFG_GLOBAL },
368 { "ciphers", sCiphers }, 397 { "ciphers", sCiphers, SSHCFG_GLOBAL },
369 { "macs", sMacs }, 398 { "macs", sMacs, SSHCFG_GLOBAL },
370 { "protocol", sProtocol }, 399 { "protocol", sProtocol, SSHCFG_GLOBAL },
371 { "gatewayports", sGatewayPorts }, 400 { "gatewayports", sGatewayPorts, SSHCFG_ALL },
372 { "subsystem", sSubsystem }, 401 { "subsystem", sSubsystem, SSHCFG_GLOBAL },
373 { "maxstartups", sMaxStartups }, 402 { "maxstartups", sMaxStartups, SSHCFG_GLOBAL },
374 { "maxauthtries", sMaxAuthTries }, 403 { "maxauthtries", sMaxAuthTries, SSHCFG_GLOBAL },
375 { "banner", sBanner }, 404 { "banner", sBanner, SSHCFG_ALL },
376 { "usedns", sUseDNS }, 405 { "usedns", sUseDNS, SSHCFG_GLOBAL },
377 { "verifyreversemapping", sDeprecated }, 406 { "verifyreversemapping", sDeprecated, SSHCFG_GLOBAL },
378 { "reversemappingcheck", sDeprecated }, 407 { "reversemappingcheck", sDeprecated, SSHCFG_GLOBAL },
379 { "clientaliveinterval", sClientAliveInterval }, 408 { "clientaliveinterval", sClientAliveInterval, SSHCFG_GLOBAL },
380 { "clientalivecountmax", sClientAliveCountMax }, 409 { "clientalivecountmax", sClientAliveCountMax, SSHCFG_GLOBAL },
381 { "authorizedkeysfile", sAuthorizedKeysFile }, 410 { "authorizedkeysfile", sAuthorizedKeysFile, SSHCFG_GLOBAL },
382 { "authorizedkeysfile2", sAuthorizedKeysFile2 }, 411 { "authorizedkeysfile2", sAuthorizedKeysFile2, SSHCFG_GLOBAL },
383 { "useprivilegeseparation", sUsePrivilegeSeparation}, 412 { "useprivilegeseparation", sUsePrivilegeSeparation, SSHCFG_GLOBAL },
384 { "acceptenv", sAcceptEnv }, 413 { "acceptenv", sAcceptEnv, SSHCFG_GLOBAL },
385 { "permittunnel", sPermitTunnel }, 414 { "permittunnel", sPermitTunnel, SSHCFG_GLOBAL },
386 { NULL, sBadOption } 415 { "match", sMatch, SSHCFG_ALL },
416 { "permitopen", sPermitOpen, SSHCFG_ALL },
417 { "forcecommand", sForceCommand, SSHCFG_ALL },
418 { NULL, sBadOption, 0 }
387}; 419};
388 420
389/* 421/*
@@ -392,13 +424,15 @@ static struct {
392 424
393static ServerOpCodes 425static ServerOpCodes
394parse_token(const char *cp, const char *filename, 426parse_token(const char *cp, const char *filename,
395 int linenum) 427 int linenum, u_int *flags)
396{ 428{
397 u_int i; 429 u_int i;
398 430
399 for (i = 0; keywords[i].name; i++) 431 for (i = 0; keywords[i].name; i++)
400 if (strcasecmp(cp, keywords[i].name) == 0) 432 if (strcasecmp(cp, keywords[i].name) == 0) {
433 *flags = keywords[i].flags;
401 return keywords[i].opcode; 434 return keywords[i].opcode;
435 }
402 436
403 error("%s: line %d: Bad configuration option: %s", 437 error("%s: line %d: Bad configuration option: %s",
404 filename, linenum, cp); 438 filename, linenum, cp);
@@ -443,18 +477,171 @@ add_one_listen_addr(ServerOptions *options, char *addr, u_short port)
443 options->listen_addrs = aitop; 477 options->listen_addrs = aitop;
444} 478}
445 479
480/*
481 * The strategy for the Match blocks is that the config file is parsed twice.
482 *
483 * The first time is at startup. activep is initialized to 1 and the
484 * directives in the global context are processed and acted on. Hitting a
485 * Match directive unsets activep and the directives inside the block are
486 * checked for syntax only.
487 *
488 * The second time is after a connection has been established but before
489 * authentication. activep is initialized to 2 and global config directives
490 * are ignored since they have already been processed. If the criteria in a
491 * Match block is met, activep is set and the subsequent directives
492 * processed and actioned until EOF or another Match block unsets it. Any
493 * options set are copied into the main server config.
494 *
495 * Potential additions/improvements:
496 * - Add Match support for pre-kex directives, eg Protocol, Ciphers.
497 *
498 * - Add a Tag directive (idea from David Leonard) ala pf, eg:
499 * Match Address 192.168.0.*
500 * Tag trusted
501 * Match Group wheel
502 * Tag trusted
503 * Match Tag trusted
504 * AllowTcpForwarding yes
505 * GatewayPorts clientspecified
506 * [...]
507 *
508 * - Add a PermittedChannelRequests directive
509 * Match Group shell
510 * PermittedChannelRequests session,forwarded-tcpip
511 */
512
513static int
514match_cfg_line_group(const char *grps, int line, const char *user)
515{
516 int result = 0;
517 u_int ngrps = 0;
518 char *arg, *p, *cp, *grplist[MAX_MATCH_GROUPS];
519 struct passwd *pw;
520
521 /*
522 * Even if we do not have a user yet, we still need to check for
523 * valid syntax.
524 */
525 arg = cp = xstrdup(grps);
526 while ((p = strsep(&cp, ",")) != NULL && *p != '\0') {
527 if (ngrps >= MAX_MATCH_GROUPS) {
528 error("line %d: too many groups in Match Group", line);
529 result = -1;
530 goto out;
531 }
532 grplist[ngrps++] = p;
533 }
534
535 if (user == NULL)
536 goto out;
537
538 if ((pw = getpwnam(user)) == NULL) {
539 debug("Can't match group at line %d because user %.100s does "
540 "not exist", line, user);
541 } else if (ga_init(pw->pw_name, pw->pw_gid) == 0) {
542 debug("Can't Match group because user %.100s not in any group "
543 "at line %d", user, line);
544 } else if (ga_match(grplist, ngrps) != 1) {
545 debug("user %.100s does not match group %.100s at line %d",
546 user, arg, line);
547 } else {
548 debug("user %.100s matched group %.100s at line %d", user,
549 arg, line);
550 result = 1;
551 }
552out:
553 ga_free();
554 xfree(arg);
555 return result;
556}
557
558static int
559match_cfg_line(char **condition, int line, const char *user, const char *host,
560 const char *address)
561{
562 int result = 1;
563 char *arg, *attrib, *cp = *condition;
564 size_t len;
565
566 if (user == NULL)
567 debug3("checking syntax for 'Match %s'", cp);
568 else
569 debug3("checking match for '%s' user %s host %s addr %s", cp,
570 user ? user : "(null)", host ? host : "(null)",
571 address ? address : "(null)");
572
573 while ((attrib = strdelim(&cp)) && *attrib != '\0') {
574 if ((arg = strdelim(&cp)) == NULL || *arg == '\0') {
575 error("Missing Match criteria for %s", attrib);
576 return -1;
577 }
578 len = strlen(arg);
579 if (strcasecmp(attrib, "user") == 0) {
580 if (!user) {
581 result = 0;
582 continue;
583 }
584 if (match_pattern_list(user, arg, len, 0) != 1)
585 result = 0;
586 else
587 debug("user %.100s matched 'User %.100s' at "
588 "line %d", user, arg, line);
589 } else if (strcasecmp(attrib, "group") == 0) {
590 switch (match_cfg_line_group(arg, line, user)) {
591 case -1:
592 return -1;
593 case 0:
594 result = 0;
595 }
596 } else if (strcasecmp(attrib, "host") == 0) {
597 if (!host) {
598 result = 0;
599 continue;
600 }
601 if (match_hostname(host, arg, len) != 1)
602 result = 0;
603 else
604 debug("connection from %.100s matched 'Host "
605 "%.100s' at line %d", host, arg, line);
606 } else if (strcasecmp(attrib, "address") == 0) {
607 debug("address '%s' arg '%s'", address, arg);
608 if (!address) {
609 result = 0;
610 continue;
611 }
612 if (match_hostname(address, arg, len) != 1)
613 result = 0;
614 else
615 debug("connection from %.100s matched 'Address "
616 "%.100s' at line %d", address, arg, line);
617 } else {
618 error("Unsupported Match attribute %s", attrib);
619 return -1;
620 }
621 }
622 if (user != NULL)
623 debug3("match %sfound", result ? "" : "not ");
624 *condition = cp;
625 return result;
626}
627
628#define WHITESPACE " \t\r\n"
629
446int 630int
447process_server_config_line(ServerOptions *options, char *line, 631process_server_config_line(ServerOptions *options, char *line,
448 const char *filename, int linenum) 632 const char *filename, int linenum, int *activep, const char *user,
633 const char *host, const char *address)
449{ 634{
450 char *cp, **charptr, *arg, *p; 635 char *cp, **charptr, *arg, *p;
451 int *intptr, value, n; 636 int cmdline = 0, *intptr, value, n;
452 ServerOpCodes opcode; 637 ServerOpCodes opcode;
453 u_short port; 638 u_short port;
454 u_int i; 639 u_int i, flags = 0;
640 size_t len;
455 641
456 cp = line; 642 cp = line;
457 arg = strdelim(&cp); 643 if ((arg = strdelim(&cp)) == NULL)
644 return 0;
458 /* Ignore leading whitespace */ 645 /* Ignore leading whitespace */
459 if (*arg == '\0') 646 if (*arg == '\0')
460 arg = strdelim(&cp); 647 arg = strdelim(&cp);
@@ -462,7 +649,25 @@ process_server_config_line(ServerOptions *options, char *line,
462 return 0; 649 return 0;
463 intptr = NULL; 650 intptr = NULL;
464 charptr = NULL; 651 charptr = NULL;
465 opcode = parse_token(arg, filename, linenum); 652 opcode = parse_token(arg, filename, linenum, &flags);
653
654 if (activep == NULL) { /* We are processing a command line directive */
655 cmdline = 1;
656 activep = &cmdline;
657 }
658 if (*activep && opcode != sMatch)
659 debug3("%s:%d setting %s %s", filename, linenum, arg, cp);
660 if (*activep == 0 && !(flags & SSHCFG_MATCH)) {
661 if (user == NULL) {
662 fatal("%s line %d: Directive '%s' is not allowed "
663 "within a Match block", filename, linenum, arg);
664 } else { /* this is a directive we have already processed */
665 while (arg)
666 arg = strdelim(&cp);
667 return 0;
668 }
669 }
670
466 switch (opcode) { 671 switch (opcode) {
467 /* Portable-specific options */ 672 /* Portable-specific options */
468 case sUsePAM: 673 case sUsePAM:
@@ -500,7 +705,7 @@ parse_int:
500 fatal("%s line %d: missing integer value.", 705 fatal("%s line %d: missing integer value.",
501 filename, linenum); 706 filename, linenum);
502 value = atoi(arg); 707 value = atoi(arg);
503 if (*intptr == -1) 708 if (*activep && *intptr == -1)
504 *intptr = value; 709 *intptr = value;
505 break; 710 break;
506 711
@@ -580,7 +785,7 @@ parse_filename:
580 if (!arg || *arg == '\0') 785 if (!arg || *arg == '\0')
581 fatal("%s line %d: missing file name.", 786 fatal("%s line %d: missing file name.",
582 filename, linenum); 787 filename, linenum);
583 if (*charptr == NULL) { 788 if (*activep && *charptr == NULL) {
584 *charptr = tilde_expand_filename(arg, getuid()); 789 *charptr = tilde_expand_filename(arg, getuid());
585 /* increase optional counter */ 790 /* increase optional counter */
586 if (intptr != NULL) 791 if (intptr != NULL)
@@ -631,7 +836,7 @@ parse_flag:
631 else 836 else
632 fatal("%s line %d: Bad yes/no argument: %s", 837 fatal("%s line %d: Bad yes/no argument: %s",
633 filename, linenum, arg); 838 filename, linenum, arg);
634 if (*intptr == -1) 839 if (*activep && *intptr == -1)
635 *intptr = value; 840 *intptr = value;
636 break; 841 break;
637 842
@@ -687,6 +892,10 @@ parse_flag:
687 intptr = &options->gss_cleanup_creds; 892 intptr = &options->gss_cleanup_creds;
688 goto parse_flag; 893 goto parse_flag;
689 894
895 case sGssStrictAcceptor:
896 intptr = &options->gss_strict_acceptor;
897 goto parse_flag;
898
690 case sPasswordAuthentication: 899 case sPasswordAuthentication:
691 intptr = &options->password_authentication; 900 intptr = &options->password_authentication;
692 goto parse_flag; 901 goto parse_flag;
@@ -779,7 +988,7 @@ parse_flag:
779 else 988 else
780 fatal("%s line %d: Bad yes/no/clientspecified " 989 fatal("%s line %d: Bad yes/no/clientspecified "
781 "argument: %s", filename, linenum, arg); 990 "argument: %s", filename, linenum, arg);
782 if (*intptr == -1) 991 if (*activep && *intptr == -1)
783 *intptr = value; 992 *intptr = value;
784 break; 993 break;
785 994
@@ -830,7 +1039,7 @@ parse_flag:
830 case sDenyUsers: 1039 case sDenyUsers:
831 while ((arg = strdelim(&cp)) && *arg != '\0') { 1040 while ((arg = strdelim(&cp)) && *arg != '\0') {
832 if (options->num_deny_users >= MAX_DENY_USERS) 1041 if (options->num_deny_users >= MAX_DENY_USERS)
833 fatal( "%s line %d: too many deny users.", 1042 fatal("%s line %d: too many deny users.",
834 filename, linenum); 1043 filename, linenum);
835 options->deny_users[options->num_deny_users++] = 1044 options->deny_users[options->num_deny_users++] =
836 xstrdup(arg); 1045 xstrdup(arg);
@@ -900,6 +1109,10 @@ parse_flag:
900 if (!arg || *arg == '\0') 1109 if (!arg || *arg == '\0')
901 fatal("%s line %d: Missing subsystem name.", 1110 fatal("%s line %d: Missing subsystem name.",
902 filename, linenum); 1111 filename, linenum);
1112 if (!*activep) {
1113 arg = strdelim(&cp);
1114 break;
1115 }
903 for (i = 0; i < options->num_subsystems; i++) 1116 for (i = 0; i < options->num_subsystems; i++)
904 if (strcmp(arg, options->subsystem_name[i]) == 0) 1117 if (strcmp(arg, options->subsystem_name[i]) == 0)
905 fatal("%s line %d: Subsystem '%s' already defined.", 1118 fatal("%s line %d: Subsystem '%s' already defined.",
@@ -910,6 +1123,17 @@ parse_flag:
910 fatal("%s line %d: Missing subsystem command.", 1123 fatal("%s line %d: Missing subsystem command.",
911 filename, linenum); 1124 filename, linenum);
912 options->subsystem_command[options->num_subsystems] = xstrdup(arg); 1125 options->subsystem_command[options->num_subsystems] = xstrdup(arg);
1126
1127 /* Collect arguments (separate to executable) */
1128 p = xstrdup(arg);
1129 len = strlen(p) + 1;
1130 while ((arg = strdelim(&cp)) != NULL && *arg != '\0') {
1131 len += 1 + strlen(arg);
1132 p = xrealloc(p, 1, len);
1133 strlcat(p, " ", len);
1134 strlcat(p, arg, len);
1135 }
1136 options->subsystem_args[options->num_subsystems] = p;
913 options->num_subsystems++; 1137 options->num_subsystems++;
914 break; 1138 break;
915 1139
@@ -950,7 +1174,7 @@ parse_flag:
950 */ 1174 */
951 case sAuthorizedKeysFile: 1175 case sAuthorizedKeysFile:
952 case sAuthorizedKeysFile2: 1176 case sAuthorizedKeysFile2:
953 charptr = (opcode == sAuthorizedKeysFile ) ? 1177 charptr = (opcode == sAuthorizedKeysFile) ?
954 &options->authorized_keys_file : 1178 &options->authorized_keys_file :
955 &options->authorized_keys_file2; 1179 &options->authorized_keys_file2;
956 goto parse_filename; 1180 goto parse_filename;
@@ -971,6 +1195,8 @@ parse_flag:
971 if (options->num_accept_env >= MAX_ACCEPT_ENV) 1195 if (options->num_accept_env >= MAX_ACCEPT_ENV)
972 fatal("%s line %d: too many allow env.", 1196 fatal("%s line %d: too many allow env.",
973 filename, linenum); 1197 filename, linenum);
1198 if (!*activep)
1199 break;
974 options->accept_env[options->num_accept_env++] = 1200 options->accept_env[options->num_accept_env++] =
975 xstrdup(arg); 1201 xstrdup(arg);
976 } 1202 }
@@ -998,6 +1224,56 @@ parse_flag:
998 *intptr = value; 1224 *intptr = value;
999 break; 1225 break;
1000 1226
1227 case sMatch:
1228 if (cmdline)
1229 fatal("Match directive not supported as a command-line "
1230 "option");
1231 value = match_cfg_line(&cp, linenum, user, host, address);
1232 if (value < 0)
1233 fatal("%s line %d: Bad Match condition", filename,
1234 linenum);
1235 *activep = value;
1236 break;
1237
1238 case sPermitOpen:
1239 arg = strdelim(&cp);
1240 if (!arg || *arg == '\0')
1241 fatal("%s line %d: missing PermitOpen specification",
1242 filename, linenum);
1243 n = options->num_permitted_opens; /* modified later */
1244 if (strcmp(arg, "any") == 0) {
1245 if (*activep && n == -1) {
1246 channel_clear_adm_permitted_opens();
1247 options->num_permitted_opens = 0;
1248 }
1249 break;
1250 }
1251 if (*activep && n == -1)
1252 channel_clear_adm_permitted_opens();
1253 for (; arg != NULL && *arg != '\0'; arg = strdelim(&cp)) {
1254 p = hpdelim(&arg);
1255 if (p == NULL)
1256 fatal("%s line %d: missing host in PermitOpen",
1257 filename, linenum);
1258 p = cleanhostname(p);
1259 if (arg == NULL || (port = a2port(arg)) == 0)
1260 fatal("%s line %d: bad port number in "
1261 "PermitOpen", filename, linenum);
1262 if (*activep && n == -1)
1263 options->num_permitted_opens =
1264 channel_add_adm_permitted_opens(p, port);
1265 }
1266 break;
1267
1268 case sForceCommand:
1269 if (cp == NULL)
1270 fatal("%.200s line %d: Missing argument.", filename,
1271 linenum);
1272 len = strspn(cp, WHITESPACE);
1273 if (*activep && options->adm_forced_command == NULL)
1274 options->adm_forced_command = xstrdup(cp + len);
1275 return 0;
1276
1001 case sDeprecated: 1277 case sDeprecated:
1002 logit("%s line %d: Deprecated option %s", 1278 logit("%s line %d: Deprecated option %s",
1003 filename, linenum, arg); 1279 filename, linenum, arg);
@@ -1054,22 +1330,85 @@ load_server_config(const char *filename, Buffer *conf)
1054} 1330}
1055 1331
1056void 1332void
1057parse_server_config(ServerOptions *options, const char *filename, Buffer *conf) 1333parse_server_match_config(ServerOptions *options, const char *user,
1334 const char *host, const char *address)
1058{ 1335{
1059 int linenum, bad_options = 0; 1336 ServerOptions mo;
1337
1338 initialize_server_options(&mo);
1339 parse_server_config(&mo, "reprocess config", &cfg, user, host, address);
1340 copy_set_server_options(options, &mo, 0);
1341}
1342
1343/* Helper macros */
1344#define M_CP_INTOPT(n) do {\
1345 if (src->n != -1) \
1346 dst->n = src->n; \
1347} while (0)
1348#define M_CP_STROPT(n) do {\
1349 if (src->n != NULL) { \
1350 if (dst->n != NULL) \
1351 xfree(dst->n); \
1352 dst->n = src->n; \
1353 } \
1354} while(0)
1355
1356/*
1357 * Copy any supported values that are set.
1358 *
1359 * If the preauth flag is set, we do not bother copying the the string or
1360 * array values that are not used pre-authentication, because any that we
1361 * do use must be explictly sent in mm_getpwnamallow().
1362 */
1363void
1364copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth)
1365{
1366 M_CP_INTOPT(password_authentication);
1367 M_CP_INTOPT(gss_authentication);
1368 M_CP_INTOPT(rsa_authentication);
1369 M_CP_INTOPT(pubkey_authentication);
1370 M_CP_INTOPT(kerberos_authentication);
1371 M_CP_INTOPT(hostbased_authentication);
1372 M_CP_INTOPT(kbd_interactive_authentication);
1373
1374 M_CP_INTOPT(allow_tcp_forwarding);
1375 M_CP_INTOPT(gateway_ports);
1376 M_CP_INTOPT(x11_display_offset);
1377 M_CP_INTOPT(x11_forwarding);
1378 M_CP_INTOPT(x11_use_localhost);
1379
1380 M_CP_STROPT(banner);
1381 if (preauth)
1382 return;
1383 M_CP_STROPT(adm_forced_command);
1384}
1385
1386#undef M_CP_INTOPT
1387#undef M_CP_STROPT
1388
1389void
1390parse_server_config(ServerOptions *options, const char *filename, Buffer *conf,
1391 const char *user, const char *host, const char *address)
1392{
1393 int active, linenum, bad_options = 0;
1060 char *cp, *obuf, *cbuf; 1394 char *cp, *obuf, *cbuf;
1061 1395
1062 debug2("%s: config %s len %d", __func__, filename, buffer_len(conf)); 1396 debug2("%s: config %s len %d", __func__, filename, buffer_len(conf));
1063 1397
1064 obuf = cbuf = xstrdup(buffer_ptr(conf)); 1398 obuf = cbuf = xstrdup(buffer_ptr(conf));
1399 active = user ? 0 : 1;
1065 linenum = 1; 1400 linenum = 1;
1066 while ((cp = strsep(&cbuf, "\n")) != NULL) { 1401 while ((cp = strsep(&cbuf, "\n")) != NULL) {
1067 if (process_server_config_line(options, cp, filename, 1402 if (process_server_config_line(options, cp, filename,
1068 linenum++) != 0) 1403 linenum++, &active, user, host, address) != 0)
1069 bad_options++; 1404 bad_options++;
1070 } 1405 }
1071 xfree(obuf); 1406 xfree(obuf);
1072 if (bad_options > 0) 1407 if (bad_options > 0)
1073 fatal("%s: terminating, %d bad configuration options", 1408 fatal("%s: terminating, %d bad configuration options",
1074 filename, bad_options); 1409 filename, bad_options);
1410
1411 /* challenge-response is implemented via keyboard interactive */
1412 if (options->challenge_response_authentication == 1)
1413 options->kbd_interactive_authentication = 1;
1075} 1414}
diff --git a/servconf.h b/servconf.h
index 0ef05bcd9..257de1c8b 100644
--- a/servconf.h
+++ b/servconf.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: servconf.h,v 1.72 2005/12/06 22:38:27 reyk Exp $ */ 1/* $OpenBSD: servconf.h,v 1.80 2007/02/19 10:45:58 dtucker Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -16,8 +16,6 @@
16#ifndef SERVCONF_H 16#ifndef SERVCONF_H
17#define SERVCONF_H 17#define SERVCONF_H
18 18
19#include "buffer.h"
20
21#define MAX_PORTS 256 /* Max # ports. */ 19#define MAX_PORTS 256 /* Max # ports. */
22 20
23#define MAX_ALLOW_USERS 256 /* Max # users on allow list. */ 21#define MAX_ALLOW_USERS 256 /* Max # users on allow list. */
@@ -27,6 +25,7 @@
27#define MAX_SUBSYSTEMS 256 /* Max # subsystems. */ 25#define MAX_SUBSYSTEMS 256 /* Max # subsystems. */
28#define MAX_HOSTKEYS 256 /* Max # hostkeys. */ 26#define MAX_HOSTKEYS 256 /* Max # hostkeys. */
29#define MAX_ACCEPT_ENV 256 /* Max # of env vars. */ 27#define MAX_ACCEPT_ENV 256 /* Max # of env vars. */
28#define MAX_MATCH_GROUPS 256 /* Max # of groups for Match. */
30 29
31/* permit_root_login */ 30/* permit_root_login */
32#define PERMIT_NOT_SET -1 31#define PERMIT_NOT_SET -1
@@ -90,6 +89,7 @@ typedef struct {
90 int gss_authentication; /* If true, permit GSSAPI authentication */ 89 int gss_authentication; /* If true, permit GSSAPI authentication */
91 int gss_keyex; /* If true, permit GSSAPI key exchange */ 90 int gss_keyex; /* If true, permit GSSAPI key exchange */
92 int gss_cleanup_creds; /* If true, destroy cred cache on logout */ 91 int gss_cleanup_creds; /* If true, destroy cred cache on logout */
92 int gss_strict_acceptor; /* If true, restrict the GSSAPI acceptor name */
93 int password_authentication; /* If true, permit password 93 int password_authentication; /* If true, permit password
94 * authentication. */ 94 * authentication. */
95 int kbd_interactive_authentication; /* If true, permit */ 95 int kbd_interactive_authentication; /* If true, permit */
@@ -112,6 +112,7 @@ typedef struct {
112 u_int num_subsystems; 112 u_int num_subsystems;
113 char *subsystem_name[MAX_SUBSYSTEMS]; 113 char *subsystem_name[MAX_SUBSYSTEMS];
114 char *subsystem_command[MAX_SUBSYSTEMS]; 114 char *subsystem_command[MAX_SUBSYSTEMS];
115 char *subsystem_args[MAX_SUBSYSTEMS];
115 116
116 u_int num_accept_env; 117 u_int num_accept_env;
117 char *accept_env[MAX_ACCEPT_ENV]; 118 char *accept_env[MAX_ACCEPT_ENV];
@@ -135,15 +136,24 @@ typedef struct {
135 char *authorized_keys_file; /* File containing public keys */ 136 char *authorized_keys_file; /* File containing public keys */
136 char *authorized_keys_file2; 137 char *authorized_keys_file2;
137 138
139 char *adm_forced_command;
140
138 int use_pam; /* Enable auth via PAM */ 141 int use_pam; /* Enable auth via PAM */
139 142
140 int permit_tun; 143 int permit_tun;
144
145 int num_permitted_opens;
141} ServerOptions; 146} ServerOptions;
142 147
143void initialize_server_options(ServerOptions *); 148void initialize_server_options(ServerOptions *);
144void fill_default_server_options(ServerOptions *); 149void fill_default_server_options(ServerOptions *);
145int process_server_config_line(ServerOptions *, char *, const char *, int); 150int process_server_config_line(ServerOptions *, char *, const char *, int,
151 int *, const char *, const char *, const char *);
146void load_server_config(const char *, Buffer *); 152void load_server_config(const char *, Buffer *);
147void parse_server_config(ServerOptions *, const char *, Buffer *); 153void parse_server_config(ServerOptions *, const char *, Buffer *,
154 const char *, const char *, const char *);
155void parse_server_match_config(ServerOptions *, const char *, const char *,
156 const char *);
157void copy_set_server_options(ServerOptions *, ServerOptions *, int);
148 158
149#endif /* SERVCONF_H */ 159#endif /* SERVCONF_H */
diff --git a/serverloop.c b/serverloop.c
index 3d8e7cfb5..7e373f01b 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: serverloop.c,v 1.145 2006/10/11 12:38:03 markus Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -35,7 +36,25 @@
35 */ 36 */
36 37
37#include "includes.h" 38#include "includes.h"
38RCSID("$OpenBSD: serverloop.c,v 1.124 2005/12/13 15:03:02 reyk Exp $"); 39
40#include <sys/types.h>
41#include <sys/param.h>
42#include <sys/wait.h>
43#include <sys/socket.h>
44#ifdef HAVE_SYS_TIME_H
45# include <sys/time.h>
46#endif
47
48#include <netinet/in.h>
49
50#include <errno.h>
51#include <fcntl.h>
52#include <pwd.h>
53#include <signal.h>
54#include <string.h>
55#include <termios.h>
56#include <unistd.h>
57#include <stdarg.h>
39 58
40#include "xmalloc.h" 59#include "xmalloc.h"
41#include "packet.h" 60#include "packet.h"
@@ -48,13 +67,16 @@ RCSID("$OpenBSD: serverloop.c,v 1.124 2005/12/13 15:03:02 reyk Exp $");
48#include "compat.h" 67#include "compat.h"
49#include "ssh1.h" 68#include "ssh1.h"
50#include "ssh2.h" 69#include "ssh2.h"
70#include "key.h"
71#include "cipher.h"
72#include "kex.h"
73#include "hostfile.h"
51#include "auth.h" 74#include "auth.h"
52#include "session.h" 75#include "session.h"
53#include "dispatch.h" 76#include "dispatch.h"
54#include "auth-options.h" 77#include "auth-options.h"
55#include "serverloop.h" 78#include "serverloop.h"
56#include "misc.h" 79#include "misc.h"
57#include "kex.h"
58 80
59extern ServerOptions options; 81extern ServerOptions options;
60 82
@@ -142,11 +164,11 @@ notify_done(fd_set *readset)
142 debug2("notify_done: reading"); 164 debug2("notify_done: reading");
143} 165}
144 166
167/*ARGSUSED*/
145static void 168static void
146sigchld_handler(int sig) 169sigchld_handler(int sig)
147{ 170{
148 int save_errno = errno; 171 int save_errno = errno;
149 debug("Received SIGCHLD.");
150 child_terminated = 1; 172 child_terminated = 1;
151#ifndef _UNICOS 173#ifndef _UNICOS
152 mysignal(SIGCHLD, sigchld_handler); 174 mysignal(SIGCHLD, sigchld_handler);
@@ -155,6 +177,7 @@ sigchld_handler(int sig)
155 errno = save_errno; 177 errno = save_errno;
156} 178}
157 179
180/*ARGSUSED*/
158static void 181static void
159sigterm_handler(int sig) 182sigterm_handler(int sig)
160{ 183{
@@ -225,8 +248,10 @@ client_alive_check(void)
225 int channel_id; 248 int channel_id;
226 249
227 /* timeout, check to see how many we have had */ 250 /* timeout, check to see how many we have had */
228 if (++client_alive_timeouts > options.client_alive_count_max) 251 if (++client_alive_timeouts > options.client_alive_count_max) {
229 packet_disconnect("Timeout, your session not responding."); 252 logit("Timeout, client not responding.");
253 cleanup_exit(255);
254 }
230 255
231 /* 256 /*
232 * send a bogus global/channel request with "wantreply", 257 * send a bogus global/channel request with "wantreply",
@@ -255,6 +280,7 @@ wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
255 struct timeval tv, *tvp; 280 struct timeval tv, *tvp;
256 int ret; 281 int ret;
257 int client_alive_scheduled = 0; 282 int client_alive_scheduled = 0;
283 int program_alive_scheduled = 0;
258 284
259 /* 285 /*
260 * if using client_alive, set the max timeout accordingly, 286 * if using client_alive, set the max timeout accordingly,
@@ -292,6 +318,7 @@ wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
292 * the client, try to get some more data from the program. 318 * the client, try to get some more data from the program.
293 */ 319 */
294 if (packet_not_very_much_data_to_write()) { 320 if (packet_not_very_much_data_to_write()) {
321 program_alive_scheduled = child_terminated;
295 if (!fdout_eof) 322 if (!fdout_eof)
296 FD_SET(fdout, *readsetp); 323 FD_SET(fdout, *readsetp);
297 if (!fderr_eof) 324 if (!fderr_eof)
@@ -337,8 +364,16 @@ wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
337 memset(*writesetp, 0, *nallocp); 364 memset(*writesetp, 0, *nallocp);
338 if (errno != EINTR) 365 if (errno != EINTR)
339 error("select: %.100s", strerror(errno)); 366 error("select: %.100s", strerror(errno));
340 } else if (ret == 0 && client_alive_scheduled) 367 } else {
341 client_alive_check(); 368 if (ret == 0 && client_alive_scheduled)
369 client_alive_check();
370 if (!compat20 && program_alive_scheduled && fdin_is_tty) {
371 if (!fdout_eof)
372 FD_SET(fdout, *readsetp);
373 if (!fderr_eof)
374 FD_SET(fderr, *readsetp);
375 }
376 }
342 377
343 notify_done(*readsetp); 378 notify_done(*readsetp);
344} 379}
@@ -348,7 +383,7 @@ wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
348 * in buffers and processed later. 383 * in buffers and processed later.
349 */ 384 */
350static void 385static void
351process_input(fd_set * readset) 386process_input(fd_set *readset)
352{ 387{
353 int len; 388 int len;
354 char buf[16384]; 389 char buf[16384];
@@ -380,10 +415,17 @@ process_input(fd_set * readset)
380 415
381 /* Read and buffer any available stdout data from the program. */ 416 /* Read and buffer any available stdout data from the program. */
382 if (!fdout_eof && FD_ISSET(fdout, readset)) { 417 if (!fdout_eof && FD_ISSET(fdout, readset)) {
418 errno = 0;
383 len = read(fdout, buf, sizeof(buf)); 419 len = read(fdout, buf, sizeof(buf));
384 if (len < 0 && (errno == EINTR || errno == EAGAIN)) { 420 if (len < 0 && (errno == EINTR ||
421 (errno == EAGAIN && !child_terminated))) {
385 /* do nothing */ 422 /* do nothing */
423#ifndef PTY_ZEROREAD
386 } else if (len <= 0) { 424 } else if (len <= 0) {
425#else
426 } else if ((!isatty(fdout) && len <= 0) ||
427 (isatty(fdout) && (len < 0 || (len == 0 && errno != 0)))) {
428#endif
387 fdout_eof = 1; 429 fdout_eof = 1;
388 } else { 430 } else {
389 buffer_append(&stdout_buffer, buf, len); 431 buffer_append(&stdout_buffer, buf, len);
@@ -392,10 +434,17 @@ process_input(fd_set * readset)
392 } 434 }
393 /* Read and buffer any available stderr data from the program. */ 435 /* Read and buffer any available stderr data from the program. */
394 if (!fderr_eof && FD_ISSET(fderr, readset)) { 436 if (!fderr_eof && FD_ISSET(fderr, readset)) {
437 errno = 0;
395 len = read(fderr, buf, sizeof(buf)); 438 len = read(fderr, buf, sizeof(buf));
396 if (len < 0 && (errno == EINTR || errno == EAGAIN)) { 439 if (len < 0 && (errno == EINTR ||
440 (errno == EAGAIN && !child_terminated))) {
397 /* do nothing */ 441 /* do nothing */
442#ifndef PTY_ZEROREAD
398 } else if (len <= 0) { 443 } else if (len <= 0) {
444#else
445 } else if ((!isatty(fderr) && len <= 0) ||
446 (isatty(fderr) && (len < 0 || (len == 0 && errno != 0)))) {
447#endif
399 fderr_eof = 1; 448 fderr_eof = 1;
400 } else { 449 } else {
401 buffer_append(&stderr_buffer, buf, len); 450 buffer_append(&stderr_buffer, buf, len);
@@ -407,7 +456,7 @@ process_input(fd_set * readset)
407 * Sends data from internal buffers to client program stdin. 456 * Sends data from internal buffers to client program stdin.
408 */ 457 */
409static void 458static void
410process_output(fd_set * writeset) 459process_output(fd_set *writeset)
411{ 460{
412 struct termios tio; 461 struct termios tio;
413 u_char *data; 462 u_char *data;
@@ -749,6 +798,7 @@ collect_children(void)
749 sigaddset(&nset, SIGCHLD); 798 sigaddset(&nset, SIGCHLD);
750 sigprocmask(SIG_BLOCK, &nset, &oset); 799 sigprocmask(SIG_BLOCK, &nset, &oset);
751 if (child_terminated) { 800 if (child_terminated) {
801 debug("Received SIGCHLD.");
752 while ((pid = waitpid(-1, &status, WNOHANG)) > 0 || 802 while ((pid = waitpid(-1, &status, WNOHANG)) > 0 ||
753 (pid < 0 && errno == EINTR)) 803 (pid < 0 && errno == EINTR))
754 if (pid > 0) 804 if (pid > 0)
@@ -873,10 +923,10 @@ server_input_eof(int type, u_int32_t seq, void *ctxt)
873static void 923static void
874server_input_window_size(int type, u_int32_t seq, void *ctxt) 924server_input_window_size(int type, u_int32_t seq, void *ctxt)
875{ 925{
876 int row = packet_get_int(); 926 u_int row = packet_get_int();
877 int col = packet_get_int(); 927 u_int col = packet_get_int();
878 int xpixel = packet_get_int(); 928 u_int xpixel = packet_get_int();
879 int ypixel = packet_get_int(); 929 u_int ypixel = packet_get_int();
880 930
881 debug("Window change received."); 931 debug("Window change received.");
882 packet_check_eom(); 932 packet_check_eom();
@@ -937,7 +987,7 @@ server_request_tun(void)
937 987
938 tun = packet_get_int(); 988 tun = packet_get_int();
939 if (forced_tun_device != -1) { 989 if (forced_tun_device != -1) {
940 if (tun != SSH_TUNID_ANY && forced_tun_device != tun) 990 if (tun != SSH_TUNID_ANY && forced_tun_device != tun)
941 goto done; 991 goto done;
942 tun = forced_tun_device; 992 tun = forced_tun_device;
943 } 993 }
@@ -1085,6 +1135,7 @@ server_input_global_request(int type, u_int32_t seq, void *ctxt)
1085 1135
1086 success = channel_cancel_rport_listener(cancel_address, 1136 success = channel_cancel_rport_listener(cancel_address,
1087 cancel_port); 1137 cancel_port);
1138 xfree(cancel_address);
1088 } 1139 }
1089 if (want_reply) { 1140 if (want_reply) {
1090 packet_start(success ? 1141 packet_start(success ?
@@ -1094,6 +1145,7 @@ server_input_global_request(int type, u_int32_t seq, void *ctxt)
1094 } 1145 }
1095 xfree(rtype); 1146 xfree(rtype);
1096} 1147}
1148
1097static void 1149static void
1098server_input_channel_req(int type, u_int32_t seq, void *ctxt) 1150server_input_channel_req(int type, u_int32_t seq, void *ctxt)
1099{ 1151{
diff --git a/serverloop.h b/serverloop.h
index f419198d1..7311558f9 100644
--- a/serverloop.h
+++ b/serverloop.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: serverloop.h,v 1.5 2001/06/27 02:12:53 markus Exp $ */ 1/* $OpenBSD: serverloop.h,v 1.6 2006/03/25 22:22:43 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
diff --git a/session.c b/session.c
index 0cbd5fbb2..4c97c4a7d 100644
--- a/session.c
+++ b/session.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: session.c,v 1.221 2007/01/21 01:41:54 stevesk Exp $ */
1/* 2/*
2 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
3 * All rights reserved 4 * All rights reserved
@@ -33,12 +34,35 @@
33 */ 34 */
34 35
35#include "includes.h" 36#include "includes.h"
36RCSID("$OpenBSD: session.c,v 1.191 2005/12/24 02:27:41 djm Exp $");
37 37
38#include <sys/types.h>
39#include <sys/param.h>
40#ifdef HAVE_SYS_STAT_H
41# include <sys/stat.h>
42#endif
43#include <sys/socket.h>
44#include <sys/un.h>
45#include <sys/wait.h>
46
47#include <arpa/inet.h>
48
49#include <errno.h>
50#include <grp.h>
51#ifdef HAVE_PATHS_H
52#include <paths.h>
53#endif
54#include <pwd.h>
55#include <signal.h>
56#include <stdarg.h>
57#include <stdio.h>
58#include <stdlib.h>
59#include <string.h>
60#include <unistd.h>
61
62#include "xmalloc.h"
38#include "ssh.h" 63#include "ssh.h"
39#include "ssh1.h" 64#include "ssh1.h"
40#include "ssh2.h" 65#include "ssh2.h"
41#include "xmalloc.h"
42#include "sshpty.h" 66#include "sshpty.h"
43#include "packet.h" 67#include "packet.h"
44#include "buffer.h" 68#include "buffer.h"
@@ -46,7 +70,12 @@ RCSID("$OpenBSD: session.c,v 1.191 2005/12/24 02:27:41 djm Exp $");
46#include "uidswap.h" 70#include "uidswap.h"
47#include "compat.h" 71#include "compat.h"
48#include "channels.h" 72#include "channels.h"
49#include "bufaux.h" 73#include "key.h"
74#include "cipher.h"
75#ifdef GSSAPI
76#include "ssh-gss.h"
77#endif
78#include "hostfile.h"
50#include "auth.h" 79#include "auth.h"
51#include "auth-options.h" 80#include "auth-options.h"
52#include "pathnames.h" 81#include "pathnames.h"
@@ -63,10 +92,6 @@ RCSID("$OpenBSD: session.c,v 1.191 2005/12/24 02:27:41 djm Exp $");
63#include <kafs.h> 92#include <kafs.h>
64#endif 93#endif
65 94
66#ifdef GSSAPI
67#include "ssh-gss.h"
68#endif
69
70/* func */ 95/* func */
71 96
72Session *session_new(void); 97Session *session_new(void);
@@ -175,7 +200,7 @@ auth_input_request_forwarding(struct passwd * pw)
175 sunaddr.sun_family = AF_UNIX; 200 sunaddr.sun_family = AF_UNIX;
176 strlcpy(sunaddr.sun_path, auth_sock_name, sizeof(sunaddr.sun_path)); 201 strlcpy(sunaddr.sun_path, auth_sock_name, sizeof(sunaddr.sun_path));
177 202
178 if (bind(sock, (struct sockaddr *) & sunaddr, sizeof(sunaddr)) < 0) 203 if (bind(sock, (struct sockaddr *)&sunaddr, sizeof(sunaddr)) < 0)
179 packet_disconnect("bind: %.100s", strerror(errno)); 204 packet_disconnect("bind: %.100s", strerror(errno));
180 205
181 /* Restore the privileged uid. */ 206 /* Restore the privileged uid. */
@@ -322,7 +347,11 @@ do_authenticated1(Authctxt *authctxt)
322 break; 347 break;
323 } 348 }
324 debug("Received TCP/IP port forwarding request."); 349 debug("Received TCP/IP port forwarding request.");
325 channel_input_port_forward_request(s->pw->pw_uid == 0, options.gateway_ports); 350 if (channel_input_port_forward_request(s->pw->pw_uid == 0,
351 options.gateway_ports) < 0) {
352 debug("Port forwarding failed.");
353 break;
354 }
326 success = 1; 355 success = 1;
327 break; 356 break;
328 357
@@ -632,7 +661,7 @@ do_pre_login(Session *s)
632 fromlen = sizeof(from); 661 fromlen = sizeof(from);
633 if (packet_connection_is_on_socket()) { 662 if (packet_connection_is_on_socket()) {
634 if (getpeername(packet_get_connection_in(), 663 if (getpeername(packet_get_connection_in(),
635 (struct sockaddr *) & from, &fromlen) < 0) { 664 (struct sockaddr *)&from, &fromlen) < 0) {
636 debug("getpeername: %.100s", strerror(errno)); 665 debug("getpeername: %.100s", strerror(errno));
637 cleanup_exit(255); 666 cleanup_exit(255);
638 } 667 }
@@ -651,10 +680,14 @@ do_pre_login(Session *s)
651void 680void
652do_exec(Session *s, const char *command) 681do_exec(Session *s, const char *command)
653{ 682{
654 if (forced_command) { 683 if (options.adm_forced_command) {
684 original_command = command;
685 command = options.adm_forced_command;
686 debug("Forced command (config) '%.900s'", command);
687 } else if (forced_command) {
655 original_command = command; 688 original_command = command;
656 command = forced_command; 689 command = forced_command;
657 debug("Forced command '%.900s'", command); 690 debug("Forced command (key option) '%.900s'", command);
658 } 691 }
659 692
660#ifdef SSH_AUDIT_EVENTS 693#ifdef SSH_AUDIT_EVENTS
@@ -826,7 +859,7 @@ child_set_env(char ***envp, u_int *envsizep, const char *name,
826 if (envsize >= 1000) 859 if (envsize >= 1000)
827 fatal("child_set_env: too many env vars"); 860 fatal("child_set_env: too many env vars");
828 envsize += 50; 861 envsize += 50;
829 env = (*envp) = xrealloc(env, envsize * sizeof(char *)); 862 env = (*envp) = xrealloc(env, envsize, sizeof(char *));
830 *envsizep = envsize; 863 *envsizep = envsize;
831 } 864 }
832 /* Need to set the NULL pointer at end of array beyond the new slot. */ 865 /* Need to set the NULL pointer at end of array beyond the new slot. */
@@ -967,12 +1000,15 @@ do_setup_env(Session *s, const char *shell)
967{ 1000{
968 char buf[256]; 1001 char buf[256];
969 u_int i, envsize; 1002 u_int i, envsize;
970 char **env, *laddr, *path = NULL; 1003 char **env, *laddr;
971 struct passwd *pw = s->pw; 1004 struct passwd *pw = s->pw;
1005#ifndef HAVE_LOGIN_CAP
1006 char *path = NULL;
1007#endif
972 1008
973 /* Initialize the environment. */ 1009 /* Initialize the environment. */
974 envsize = 100; 1010 envsize = 100;
975 env = xmalloc(envsize * sizeof(char *)); 1011 env = xcalloc(envsize, sizeof(char *));
976 env[0] = NULL; 1012 env[0] = NULL;
977 1013
978#ifdef HAVE_CYGWIN 1014#ifdef HAVE_CYGWIN
@@ -1340,6 +1376,10 @@ do_setusercontext(struct passwd *pw)
1340#endif 1376#endif
1341 if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid) 1377 if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid)
1342 fatal("Failed to set uids to %u.", (u_int) pw->pw_uid); 1378 fatal("Failed to set uids to %u.", (u_int) pw->pw_uid);
1379
1380#ifdef WITH_SELINUX
1381 ssh_selinux_setup_exec_context(pw->pw_name);
1382#endif
1343} 1383}
1344 1384
1345static void 1385static void
@@ -1559,7 +1599,7 @@ do_child(Session *s, const char *command)
1559 do_rc_files(s, shell); 1599 do_rc_files(s, shell);
1560 1600
1561 /* restore SIGPIPE for child */ 1601 /* restore SIGPIPE for child */
1562 signal(SIGPIPE, SIG_DFL); 1602 signal(SIGPIPE, SIG_DFL);
1563 1603
1564 if (options.use_login) { 1604 if (options.use_login) {
1565 launch_login(pw, hostname); 1605 launch_login(pw, hostname);
@@ -1823,7 +1863,7 @@ session_subsystem_req(Session *s)
1823 struct stat st; 1863 struct stat st;
1824 u_int len; 1864 u_int len;
1825 int success = 0; 1865 int success = 0;
1826 char *cmd, *subsys = packet_get_string(&len); 1866 char *prog, *cmd, *subsys = packet_get_string(&len);
1827 u_int i; 1867 u_int i;
1828 1868
1829 packet_check_eom(); 1869 packet_check_eom();
@@ -1831,9 +1871,10 @@ session_subsystem_req(Session *s)
1831 1871
1832 for (i = 0; i < options.num_subsystems; i++) { 1872 for (i = 0; i < options.num_subsystems; i++) {
1833 if (strcmp(subsys, options.subsystem_name[i]) == 0) { 1873 if (strcmp(subsys, options.subsystem_name[i]) == 0) {
1834 cmd = options.subsystem_command[i]; 1874 prog = options.subsystem_command[i];
1835 if (stat(cmd, &st) < 0) { 1875 cmd = options.subsystem_args[i];
1836 error("subsystem: cannot stat %s: %s", cmd, 1876 if (stat(prog, &st) < 0) {
1877 error("subsystem: cannot stat %s: %s", prog,
1837 strerror(errno)); 1878 strerror(errno));
1838 break; 1879 break;
1839 } 1880 }
@@ -1930,8 +1971,8 @@ session_env_req(Session *s)
1930 for (i = 0; i < options.num_accept_env; i++) { 1971 for (i = 0; i < options.num_accept_env; i++) {
1931 if (match_pattern(name, options.accept_env[i])) { 1972 if (match_pattern(name, options.accept_env[i])) {
1932 debug2("Setting env %d: %s=%s", s->num_env, name, val); 1973 debug2("Setting env %d: %s=%s", s->num_env, name, val);
1933 s->env = xrealloc(s->env, sizeof(*s->env) * 1974 s->env = xrealloc(s->env, s->num_env + 1,
1934 (s->num_env + 1)); 1975 sizeof(*s->env));
1935 s->env[s->num_env].name = name; 1976 s->env[s->num_env].name = name;
1936 s->env[s->num_env].val = val; 1977 s->env[s->num_env].val = val;
1937 s->num_env++; 1978 s->num_env++;
@@ -1986,7 +2027,7 @@ session_input_channel_req(Channel *c, const char *rtype)
1986 } else if (strcmp(rtype, "exec") == 0) { 2027 } else if (strcmp(rtype, "exec") == 0) {
1987 success = session_exec_req(s); 2028 success = session_exec_req(s);
1988 } else if (strcmp(rtype, "pty-req") == 0) { 2029 } else if (strcmp(rtype, "pty-req") == 0) {
1989 success = session_pty_req(s); 2030 success = session_pty_req(s);
1990 } else if (strcmp(rtype, "x11-req") == 0) { 2031 } else if (strcmp(rtype, "x11-req") == 0) {
1991 success = session_x11_req(s); 2032 success = session_x11_req(s);
1992 } else if (strcmp(rtype, "auth-agent-req@openssh.com") == 0) { 2033 } else if (strcmp(rtype, "auth-agent-req@openssh.com") == 0) {
@@ -2111,7 +2152,7 @@ session_close_single_x11(int id, void *arg)
2111 2152
2112 debug3("session_close_single_x11: channel %d", id); 2153 debug3("session_close_single_x11: channel %d", id);
2113 channel_cancel_cleanup(id); 2154 channel_cancel_cleanup(id);
2114 if ((s = session_by_x11_channel(id)) == NULL) 2155 if ((s = session_by_x11_channel(id)) == NULL)
2115 fatal("session_close_single_x11: no x11 channel %d", id); 2156 fatal("session_close_single_x11: no x11 channel %d", id);
2116 for (i = 0; s->x11_chanids[i] != -1; i++) { 2157 for (i = 0; s->x11_chanids[i] != -1; i++) {
2117 debug("session_close_single_x11: session %d: " 2158 debug("session_close_single_x11: session %d: "
@@ -2179,7 +2220,7 @@ session_exit_message(Session *s, int status)
2179 2220
2180 /* 2221 /*
2181 * Adjust cleanup callback attachment to send close messages when 2222 * Adjust cleanup callback attachment to send close messages when
2182 * the channel gets EOF. The session will be then be closed 2223 * the channel gets EOF. The session will be then be closed
2183 * by session_close_by_channel when the childs close their fds. 2224 * by session_close_by_channel when the childs close their fds.
2184 */ 2225 */
2185 channel_register_cleanup(c->self, session_close_by_channel, 1); 2226 channel_register_cleanup(c->self, session_close_by_channel, 1);
@@ -2215,12 +2256,13 @@ session_close(Session *s)
2215 if (s->auth_proto) 2256 if (s->auth_proto)
2216 xfree(s->auth_proto); 2257 xfree(s->auth_proto);
2217 s->used = 0; 2258 s->used = 0;
2218 for (i = 0; i < s->num_env; i++) { 2259 if (s->env != NULL) {
2219 xfree(s->env[i].name); 2260 for (i = 0; i < s->num_env; i++) {
2220 xfree(s->env[i].val); 2261 xfree(s->env[i].name);
2221 } 2262 xfree(s->env[i].val);
2222 if (s->env != NULL) 2263 }
2223 xfree(s->env); 2264 xfree(s->env);
2265 }
2224 session_proctitle(s); 2266 session_proctitle(s);
2225} 2267}
2226 2268
@@ -2436,7 +2478,7 @@ do_cleanup(Authctxt *authctxt)
2436 return; 2478 return;
2437 called = 1; 2479 called = 1;
2438 2480
2439 if (authctxt == NULL) 2481 if (authctxt == NULL || !authctxt->authenticated)
2440 return; 2482 return;
2441#ifdef KRB5 2483#ifdef KRB5
2442 if (options.kerberos_ticket_cleanup && 2484 if (options.kerberos_ticket_cleanup &&
diff --git a/session.h b/session.h
index a2598a99c..ee9338e4f 100644
--- a/session.h
+++ b/session.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: session.h,v 1.25 2005/07/17 06:49:04 djm Exp $ */ 1/* $OpenBSD: session.h,v 1.29 2006/08/03 03:34:42 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.
@@ -34,11 +34,13 @@ struct Session {
34 struct passwd *pw; 34 struct passwd *pw;
35 Authctxt *authctxt; 35 Authctxt *authctxt;
36 pid_t pid; 36 pid_t pid;
37
37 /* tty */ 38 /* tty */
38 char *term; 39 char *term;
39 int ptyfd, ttyfd, ptymaster; 40 int ptyfd, ttyfd, ptymaster;
40 u_int row, col, xpixel, ypixel; 41 u_int row, col, xpixel, ypixel;
41 char tty[TTYSZ]; 42 char tty[TTYSZ];
43
42 /* X11 */ 44 /* X11 */
43 u_int display_number; 45 u_int display_number;
44 char *display; 46 char *display;
@@ -47,6 +49,7 @@ struct Session {
47 char *auth_proto; 49 char *auth_proto;
48 char *auth_data; 50 char *auth_data;
49 int single_connection; 51 int single_connection;
52
50 /* proto 2 */ 53 /* proto 2 */
51 int chanid; 54 int chanid;
52 int *x11_chanids; 55 int *x11_chanids;
@@ -55,7 +58,7 @@ struct Session {
55 struct { 58 struct {
56 char *name; 59 char *name;
57 char *val; 60 char *val;
58 } *env; 61 } *env;
59}; 62};
60 63
61void do_authenticated(Authctxt *); 64void do_authenticated(Authctxt *);
diff --git a/sftp-client.c b/sftp-client.c
index 05bce3368..2746f3245 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: sftp-client.c,v 1.76 2007/01/22 11:32:50 djm Exp $ */
1/* 2/*
2 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
3 * 4 *
@@ -20,17 +21,32 @@
20/* XXX: copy between two remote sites */ 21/* XXX: copy between two remote sites */
21 22
22#include "includes.h" 23#include "includes.h"
23RCSID("$OpenBSD: sftp-client.c,v 1.58 2006/01/02 01:20:31 djm Exp $");
24 24
25#include <sys/types.h>
26#include <sys/param.h>
25#include "openbsd-compat/sys-queue.h" 27#include "openbsd-compat/sys-queue.h"
28#ifdef HAVE_SYS_STAT_H
29# include <sys/stat.h>
30#endif
31#ifdef HAVE_SYS_TIME_H
32# include <sys/time.h>
33#endif
34#include <sys/uio.h>
35
36#include <errno.h>
37#include <fcntl.h>
38#include <signal.h>
39#include <stdarg.h>
40#include <stdio.h>
41#include <string.h>
42#include <unistd.h>
26 43
27#include "buffer.h"
28#include "bufaux.h"
29#include "getput.h"
30#include "xmalloc.h" 44#include "xmalloc.h"
45#include "buffer.h"
31#include "log.h" 46#include "log.h"
32#include "atomicio.h" 47#include "atomicio.h"
33#include "progressmeter.h" 48#include "progressmeter.h"
49#include "misc.h"
34 50
35#include "sftp.h" 51#include "sftp.h"
36#include "sftp-common.h" 52#include "sftp-common.h"
@@ -39,7 +55,7 @@ RCSID("$OpenBSD: sftp-client.c,v 1.58 2006/01/02 01:20:31 djm Exp $");
39extern volatile sig_atomic_t interrupted; 55extern volatile sig_atomic_t interrupted;
40extern int showprogress; 56extern int showprogress;
41 57
42/* Minimum amount of data to read at at time */ 58/* Minimum amount of data to read at a time */
43#define MIN_READ_SIZE 512 59#define MIN_READ_SIZE 512
44 60
45struct sftp_conn { 61struct sftp_conn {
@@ -55,16 +71,19 @@ static void
55send_msg(int fd, Buffer *m) 71send_msg(int fd, Buffer *m)
56{ 72{
57 u_char mlen[4]; 73 u_char mlen[4];
74 struct iovec iov[2];
58 75
59 if (buffer_len(m) > SFTP_MAX_MSG_LENGTH) 76 if (buffer_len(m) > SFTP_MAX_MSG_LENGTH)
60 fatal("Outbound message too long %u", buffer_len(m)); 77 fatal("Outbound message too long %u", buffer_len(m));
61 78
62 /* Send length first */ 79 /* Send length first */
63 PUT_32BIT(mlen, buffer_len(m)); 80 put_u32(mlen, buffer_len(m));
64 if (atomicio(vwrite, fd, mlen, sizeof(mlen)) != sizeof(mlen)) 81 iov[0].iov_base = mlen;
65 fatal("Couldn't send packet: %s", strerror(errno)); 82 iov[0].iov_len = sizeof(mlen);
83 iov[1].iov_base = buffer_ptr(m);
84 iov[1].iov_len = buffer_len(m);
66 85
67 if (atomicio(vwrite, fd, buffer_ptr(m), buffer_len(m)) != buffer_len(m)) 86 if (atomiciov(writev, fd, iov, 2) != buffer_len(m) + sizeof(mlen))
68 fatal("Couldn't send packet: %s", strerror(errno)); 87 fatal("Couldn't send packet: %s", strerror(errno));
69 88
70 buffer_clear(m); 89 buffer_clear(m);
@@ -388,8 +407,7 @@ do_lsreaddir(struct sftp_conn *conn, char *path, int printflag,
388 printf("%s\n", longname); 407 printf("%s\n", longname);
389 408
390 if (dir) { 409 if (dir) {
391 *dir = xrealloc(*dir, sizeof(**dir) * 410 *dir = xrealloc(*dir, ents + 2, sizeof(**dir));
392 (ents + 2));
393 (*dir)[ents] = xmalloc(sizeof(***dir)); 411 (*dir)[ents] = xmalloc(sizeof(***dir));
394 (*dir)[ents]->filename = xstrdup(filename); 412 (*dir)[ents]->filename = xstrdup(filename);
395 (*dir)[ents]->longname = xstrdup(longname); 413 (*dir)[ents]->longname = xstrdup(longname);
@@ -1116,10 +1134,13 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path,
1116 if (status != SSH2_FX_OK) { 1134 if (status != SSH2_FX_OK) {
1117 error("Couldn't write to remote file \"%s\": %s", 1135 error("Couldn't write to remote file \"%s\": %s",
1118 remote_path, fx2txt(status)); 1136 remote_path, fx2txt(status));
1137 if (showprogress)
1138 stop_progress_meter();
1119 do_close(conn, handle, handle_len); 1139 do_close(conn, handle, handle_len);
1120 close(local_fd); 1140 close(local_fd);
1121 xfree(data); 1141 xfree(data);
1122 xfree(ack); 1142 xfree(ack);
1143 status = -1;
1123 goto done; 1144 goto done;
1124 } 1145 }
1125 debug3("In write loop, ack for %u %u bytes at %llu", 1146 debug3("In write loop, ack for %u %u bytes at %llu",
diff --git a/sftp-common.c b/sftp-common.c
index 4cea3c305..7ebadcc53 100644
--- a/sftp-common.c
+++ b/sftp-common.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: sftp-common.c,v 1.20 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
3 * Copyright (c) 2001 Damien Miller. All rights reserved. 4 * Copyright (c) 2001 Damien Miller. All rights reserved.
@@ -24,12 +25,21 @@
24 */ 25 */
25 26
26#include "includes.h" 27#include "includes.h"
27RCSID("$OpenBSD: sftp-common.c,v 1.10 2003/11/10 16:23:41 jakob Exp $");
28 28
29#include <sys/types.h>
30#include <sys/stat.h>
31#include <sys/param.h>
32
33#include <grp.h>
34#include <pwd.h>
35#include <stdio.h>
36#include <string.h>
37#include <time.h>
38#include <stdarg.h>
39
40#include "xmalloc.h"
29#include "buffer.h" 41#include "buffer.h"
30#include "bufaux.h"
31#include "log.h" 42#include "log.h"
32#include "xmalloc.h"
33 43
34#include "sftp.h" 44#include "sftp.h"
35#include "sftp-common.h" 45#include "sftp-common.h"
diff --git a/sftp-common.h b/sftp-common.h
index 2b1995a2d..9b5848462 100644
--- a/sftp-common.h
+++ b/sftp-common.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp-common.h,v 1.6 2006/01/02 01:20:31 djm Exp $ */ 1/* $OpenBSD: sftp-common.h,v 1.10 2006/08/03 03:34:42 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 2001 Markus Friedl. All rights reserved.
diff --git a/sftp-glob.c b/sftp-glob.c
index 16c5e206a..cdc270827 100644
--- a/sftp-glob.c
+++ b/sftp-glob.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: sftp-glob.c,v 1.22 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
3 * 4 *
@@ -15,14 +16,18 @@
15 */ 16 */
16 17
17#include "includes.h" 18#include "includes.h"
18RCSID("$OpenBSD: sftp-glob.c,v 1.15 2004/02/17 07:17:29 djm Exp $");
19 19
20#include "buffer.h" 20#include <sys/types.h>
21#include "bufaux.h" 21#ifdef HAVE_SYS_STAT_H
22#include "xmalloc.h" 22# include <sys/stat.h>
23#include "log.h" 23#endif
24 24
25#include <dirent.h>
26#include <string.h>
27
28#include "xmalloc.h"
25#include "sftp.h" 29#include "sftp.h"
30#include "buffer.h"
26#include "sftp-common.h" 31#include "sftp-common.h"
27#include "sftp-client.h" 32#include "sftp-client.h"
28 33
diff --git a/sftp-server.0 b/sftp-server.0
index 5367b5fdb..a5caf8229 100644
--- a/sftp-server.0
+++ b/sftp-server.0
@@ -4,13 +4,32 @@ NAME
4 sftp-server - SFTP server subsystem 4 sftp-server - SFTP server subsystem
5 5
6SYNOPSIS 6SYNOPSIS
7 sftp-server 7 sftp-server [-f log_facility] [-l log_level]
8 8
9DESCRIPTION 9DESCRIPTION
10 sftp-server is a program that speaks the server side of SFTP protocol to 10 sftp-server is a program that speaks the server side of SFTP protocol to
11 stdout and expects client requests from stdin. sftp-server is not in- 11 stdout and expects client requests from stdin. sftp-server is not in-
12 tended to be called directly, but from sshd(8) using the Subsystem op- 12 tended to be called directly, but from sshd(8) using the Subsystem op-
13 tion. See sshd_config(5) for more information. 13 tion.
14
15 Command-line flags to sftp-server should be specified in the Subsystem
16 declaration. See sshd_config(5) for more information.
17
18 Valid options are:
19
20 -f log_facility
21 Specifies the facility code that is used when logging messages
22 from sftp-server. The possible values are: DAEMON, USER, AUTH,
23 LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
24 The default is AUTH.
25
26 -l log_level
27 Specifies which messages will be logged by sftp-server. The pos-
28 sible values are: QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DE-
29 BUG1, DEBUG2, and DEBUG3. INFO and VERBOSE log transactions that
30 sftp-server performs on behalf of the client. DEBUG and DEBUG1
31 are equivalent. DEBUG2 and DEBUG3 each specify higher levels of
32 debugging output. The default is ERROR.
14 33
15SEE ALSO 34SEE ALSO
16 sftp(1), ssh(1), sshd_config(5), sshd(8) 35 sftp(1), ssh(1), sshd_config(5), sshd(8)
@@ -18,10 +37,10 @@ SEE ALSO
18 T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh- 37 T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh-
19 filexfer-00.txt, January 2001, work in progress material. 38 filexfer-00.txt, January 2001, work in progress material.
20 39
40HISTORY
41 sftp-server first appeared in OpenBSD 2.8.
42
21AUTHORS 43AUTHORS
22 Markus Friedl <markus@openbsd.org> 44 Markus Friedl <markus@openbsd.org>
23 45
24HISTORY 46OpenBSD 4.1 August 30, 2000 1
25 sftp-server first appeared in OpenBSD 2.8 .
26
27OpenBSD 3.9 August 30, 2000 1
diff --git a/sftp-server.8 b/sftp-server.8
index 42f5d437c..199c4f30e 100644
--- a/sftp-server.8
+++ b/sftp-server.8
@@ -1,4 +1,4 @@
1.\" $OpenBSD: sftp-server.8,v 1.10 2003/10/08 08:27:36 jmc Exp $ 1.\" $OpenBSD: sftp-server.8,v 1.11 2006/07/06 10:47:57 djm Exp $
2.\" 2.\"
3.\" Copyright (c) 2000 Markus Friedl. All rights reserved. 3.\" Copyright (c) 2000 Markus Friedl. All rights reserved.
4.\" 4.\"
@@ -30,6 +30,8 @@
30.Nd SFTP server subsystem 30.Nd SFTP server subsystem
31.Sh SYNOPSIS 31.Sh SYNOPSIS
32.Nm sftp-server 32.Nm sftp-server
33.Op Fl f Ar log_facility
34.Op Fl l Ar log_level
33.Sh DESCRIPTION 35.Sh DESCRIPTION
34.Nm 36.Nm
35is a program that speaks the server side of SFTP protocol 37is a program that speaks the server side of SFTP protocol
@@ -40,9 +42,36 @@ is not intended to be called directly, but from
40using the 42using the
41.Cm Subsystem 43.Cm Subsystem
42option. 44option.
45.Pp
46Command-line flags to
47.Nm
48should be specified in the
49.Cm Subsystem
50declaration.
43See 51See
44.Xr sshd_config 5 52.Xr sshd_config 5
45for more information. 53for more information.
54.Pp
55Valid options are:
56.Bl -tag -width Ds
57.It Fl f Ar log_facility
58Specifies the facility code that is used when logging messages from
59.Nm .
60The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
61LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
62The default is AUTH.
63.It Fl l Ar log_level
64Specifies which messages will be logged by
65.Nm .
66The possible values are:
67QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
68INFO and VERBOSE log transactions that
69.Nm
70performs on behalf of the client.
71DEBUG and DEBUG1 are equivalent.
72DEBUG2 and DEBUG3 each specify higher levels of debugging output.
73The default is ERROR.
74.El
46.Sh SEE ALSO 75.Sh SEE ALSO
47.Xr sftp 1 , 76.Xr sftp 1 ,
48.Xr ssh 1 , 77.Xr ssh 1 ,
@@ -56,8 +85,9 @@ for more information.
56.%D January 2001 85.%D January 2001
57.%O work in progress material 86.%O work in progress material
58.Re 87.Re
59.Sh AUTHORS
60.An Markus Friedl Aq markus@openbsd.org
61.Sh HISTORY 88.Sh HISTORY
62.Nm 89.Nm
63first appeared in OpenBSD 2.8 . 90first appeared in
91.Ox 2.8 .
92.Sh AUTHORS
93.An Markus Friedl Aq markus@openbsd.org
diff --git a/sftp-server.c b/sftp-server.c
index 7060c44ad..64777beff 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: sftp-server.c,v 1.71 2007/01/03 07:22:36 stevesk Exp $ */
1/* 2/*
2 * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000-2004 Markus Friedl. All rights reserved.
3 * 4 *
@@ -13,15 +14,33 @@
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */ 16 */
17
16#include "includes.h" 18#include "includes.h"
17RCSID("$OpenBSD: sftp-server.c,v 1.50 2006/01/02 01:20:31 djm Exp $");
18 19
20#include <sys/types.h>
21#include <sys/param.h>
22#include <sys/stat.h>
23#ifdef HAVE_SYS_TIME_H
24# include <sys/time.h>
25#endif
26
27#include <dirent.h>
28#include <errno.h>
29#include <fcntl.h>
30#include <pwd.h>
31#include <stdlib.h>
32#include <stdio.h>
33#include <string.h>
34#include <pwd.h>
35#include <time.h>
36#include <unistd.h>
37#include <stdarg.h>
38
39#include "xmalloc.h"
19#include "buffer.h" 40#include "buffer.h"
20#include "bufaux.h"
21#include "getput.h"
22#include "log.h" 41#include "log.h"
23#include "xmalloc.h"
24#include "misc.h" 42#include "misc.h"
43#include "uidswap.h"
25 44
26#include "sftp.h" 45#include "sftp.h"
27#include "sftp-common.h" 46#include "sftp-common.h"
@@ -30,9 +49,13 @@ RCSID("$OpenBSD: sftp-server.c,v 1.50 2006/01/02 01:20:31 djm Exp $");
30#define get_int64() buffer_get_int64(&iqueue); 49#define get_int64() buffer_get_int64(&iqueue);
31#define get_int() buffer_get_int(&iqueue); 50#define get_int() buffer_get_int(&iqueue);
32#define get_string(lenp) buffer_get_string(&iqueue, lenp); 51#define get_string(lenp) buffer_get_string(&iqueue, lenp);
33#define TRACE debug
34 52
35extern char *__progname; 53/* Our verbosity */
54LogLevel log_level = SYSLOG_LEVEL_ERROR;
55
56/* Our client */
57struct passwd *pw = NULL;
58char *client_addr = NULL;
36 59
37/* input and output queue */ 60/* input and output queue */
38Buffer iqueue; 61Buffer iqueue;
@@ -104,6 +127,33 @@ flags_from_portable(int pflags)
104 return flags; 127 return flags;
105} 128}
106 129
130static const char *
131string_from_portable(int pflags)
132{
133 static char ret[128];
134
135 *ret = '\0';
136
137#define PAPPEND(str) { \
138 if (*ret != '\0') \
139 strlcat(ret, ",", sizeof(ret)); \
140 strlcat(ret, str, sizeof(ret)); \
141 }
142
143 if (pflags & SSH2_FXF_READ)
144 PAPPEND("READ")
145 if (pflags & SSH2_FXF_WRITE)
146 PAPPEND("WRITE")
147 if (pflags & SSH2_FXF_CREAT)
148 PAPPEND("CREATE")
149 if (pflags & SSH2_FXF_TRUNC)
150 PAPPEND("TRUNCATE")
151 if (pflags & SSH2_FXF_EXCL)
152 PAPPEND("EXCL")
153
154 return ret;
155}
156
107static Attrib * 157static Attrib *
108get_attrib(void) 158get_attrib(void)
109{ 159{
@@ -118,6 +168,7 @@ struct Handle {
118 DIR *dirp; 168 DIR *dirp;
119 int fd; 169 int fd;
120 char *name; 170 char *name;
171 u_int64_t bytes_read, bytes_write;
121}; 172};
122 173
123enum { 174enum {
@@ -148,6 +199,7 @@ handle_new(int use, const char *name, int fd, DIR *dirp)
148 handles[i].dirp = dirp; 199 handles[i].dirp = dirp;
149 handles[i].fd = fd; 200 handles[i].fd = fd;
150 handles[i].name = xstrdup(name); 201 handles[i].name = xstrdup(name);
202 handles[i].bytes_read = handles[i].bytes_write = 0;
151 return i; 203 return i;
152 } 204 }
153 } 205 }
@@ -167,7 +219,7 @@ handle_to_string(int handle, char **stringp, int *hlenp)
167 if (stringp == NULL || hlenp == NULL) 219 if (stringp == NULL || hlenp == NULL)
168 return -1; 220 return -1;
169 *stringp = xmalloc(sizeof(int32_t)); 221 *stringp = xmalloc(sizeof(int32_t));
170 PUT_32BIT(*stringp, handle); 222 put_u32(*stringp, handle);
171 *hlenp = sizeof(int32_t); 223 *hlenp = sizeof(int32_t);
172 return 0; 224 return 0;
173} 225}
@@ -179,7 +231,7 @@ handle_from_string(const char *handle, u_int hlen)
179 231
180 if (hlen != sizeof(int32_t)) 232 if (hlen != sizeof(int32_t))
181 return -1; 233 return -1;
182 val = GET_32BIT(handle); 234 val = get_u32(handle);
183 if (handle_is_ok(val, HANDLE_FILE) || 235 if (handle_is_ok(val, HANDLE_FILE) ||
184 handle_is_ok(val, HANDLE_DIR)) 236 handle_is_ok(val, HANDLE_DIR))
185 return val; 237 return val;
@@ -211,6 +263,36 @@ handle_to_fd(int handle)
211 return -1; 263 return -1;
212} 264}
213 265
266static void
267handle_update_read(int handle, ssize_t bytes)
268{
269 if (handle_is_ok(handle, HANDLE_FILE) && bytes > 0)
270 handles[handle].bytes_read += bytes;
271}
272
273static void
274handle_update_write(int handle, ssize_t bytes)
275{
276 if (handle_is_ok(handle, HANDLE_FILE) && bytes > 0)
277 handles[handle].bytes_write += bytes;
278}
279
280static u_int64_t
281handle_bytes_read(int handle)
282{
283 if (handle_is_ok(handle, HANDLE_FILE))
284 return (handles[handle].bytes_read);
285 return 0;
286}
287
288static u_int64_t
289handle_bytes_write(int handle)
290{
291 if (handle_is_ok(handle, HANDLE_FILE))
292 return (handles[handle].bytes_write);
293 return 0;
294}
295
214static int 296static int
215handle_close(int handle) 297handle_close(int handle)
216{ 298{
@@ -230,6 +312,31 @@ handle_close(int handle)
230 return ret; 312 return ret;
231} 313}
232 314
315static void
316handle_log_close(int handle, char *emsg)
317{
318 if (handle_is_ok(handle, HANDLE_FILE)) {
319 logit("%s%sclose \"%s\" bytes read %llu written %llu",
320 emsg == NULL ? "" : emsg, emsg == NULL ? "" : " ",
321 handle_to_name(handle),
322 handle_bytes_read(handle), handle_bytes_write(handle));
323 } else {
324 logit("%s%sclosedir \"%s\"",
325 emsg == NULL ? "" : emsg, emsg == NULL ? "" : " ",
326 handle_to_name(handle));
327 }
328}
329
330static void
331handle_log_exit(void)
332{
333 u_int i;
334
335 for (i = 0; i < sizeof(handles)/sizeof(Handle); i++)
336 if (handles[i].use != HANDLE_UNUSED)
337 handle_log_close(i, "forced");
338}
339
233static int 340static int
234get_handle(void) 341get_handle(void)
235{ 342{
@@ -256,10 +363,9 @@ send_msg(Buffer *m)
256 buffer_consume(m, mlen); 363 buffer_consume(m, mlen);
257} 364}
258 365
259static void 366static const char *
260send_status(u_int32_t id, u_int32_t status) 367status_to_message(u_int32_t status)
261{ 368{
262 Buffer msg;
263 const char *status_messages[] = { 369 const char *status_messages[] = {
264 "Success", /* SSH_FX_OK */ 370 "Success", /* SSH_FX_OK */
265 "End of file", /* SSH_FX_EOF */ 371 "End of file", /* SSH_FX_EOF */
@@ -272,15 +378,24 @@ send_status(u_int32_t id, u_int32_t status)
272 "Operation unsupported", /* SSH_FX_OP_UNSUPPORTED */ 378 "Operation unsupported", /* SSH_FX_OP_UNSUPPORTED */
273 "Unknown error" /* Others */ 379 "Unknown error" /* Others */
274 }; 380 };
381 return (status_messages[MIN(status,SSH2_FX_MAX)]);
382}
383
384static void
385send_status(u_int32_t id, u_int32_t status)
386{
387 Buffer msg;
275 388
276 TRACE("sent status id %u error %u", id, status); 389 debug3("request %u: sent status %u", id, status);
390 if (log_level > SYSLOG_LEVEL_VERBOSE ||
391 (status != SSH2_FX_OK && status != SSH2_FX_EOF))
392 logit("sent status %s", status_to_message(status));
277 buffer_init(&msg); 393 buffer_init(&msg);
278 buffer_put_char(&msg, SSH2_FXP_STATUS); 394 buffer_put_char(&msg, SSH2_FXP_STATUS);
279 buffer_put_int(&msg, id); 395 buffer_put_int(&msg, id);
280 buffer_put_int(&msg, status); 396 buffer_put_int(&msg, status);
281 if (version >= 3) { 397 if (version >= 3) {
282 buffer_put_cstring(&msg, 398 buffer_put_cstring(&msg, status_to_message(status));
283 status_messages[MIN(status,SSH2_FX_MAX)]);
284 buffer_put_cstring(&msg, ""); 399 buffer_put_cstring(&msg, "");
285 } 400 }
286 send_msg(&msg); 401 send_msg(&msg);
@@ -302,7 +417,7 @@ send_data_or_handle(char type, u_int32_t id, const char *data, int dlen)
302static void 417static void
303send_data(u_int32_t id, const char *data, int dlen) 418send_data(u_int32_t id, const char *data, int dlen)
304{ 419{
305 TRACE("sent data id %u len %d", id, dlen); 420 debug("request %u: sent data len %d", id, dlen);
306 send_data_or_handle(SSH2_FXP_DATA, id, data, dlen); 421 send_data_or_handle(SSH2_FXP_DATA, id, data, dlen);
307} 422}
308 423
@@ -313,7 +428,7 @@ send_handle(u_int32_t id, int handle)
313 int hlen; 428 int hlen;
314 429
315 handle_to_string(handle, &string, &hlen); 430 handle_to_string(handle, &string, &hlen);
316 TRACE("sent handle id %u handle %d", id, handle); 431 debug("request %u: sent handle handle %d", id, handle);
317 send_data_or_handle(SSH2_FXP_HANDLE, id, string, hlen); 432 send_data_or_handle(SSH2_FXP_HANDLE, id, string, hlen);
318 xfree(string); 433 xfree(string);
319} 434}
@@ -328,7 +443,7 @@ send_names(u_int32_t id, int count, const Stat *stats)
328 buffer_put_char(&msg, SSH2_FXP_NAME); 443 buffer_put_char(&msg, SSH2_FXP_NAME);
329 buffer_put_int(&msg, id); 444 buffer_put_int(&msg, id);
330 buffer_put_int(&msg, count); 445 buffer_put_int(&msg, count);
331 TRACE("sent names id %u count %d", id, count); 446 debug("request %u: sent names count %d", id, count);
332 for (i = 0; i < count; i++) { 447 for (i = 0; i < count; i++) {
333 buffer_put_cstring(&msg, stats[i].name); 448 buffer_put_cstring(&msg, stats[i].name);
334 buffer_put_cstring(&msg, stats[i].long_name); 449 buffer_put_cstring(&msg, stats[i].long_name);
@@ -343,7 +458,7 @@ send_attrib(u_int32_t id, const Attrib *a)
343{ 458{
344 Buffer msg; 459 Buffer msg;
345 460
346 TRACE("sent attrib id %u have 0x%x", id, a->flags); 461 debug("request %u: sent attrib have 0x%x", id, a->flags);
347 buffer_init(&msg); 462 buffer_init(&msg);
348 buffer_put_char(&msg, SSH2_FXP_ATTRS); 463 buffer_put_char(&msg, SSH2_FXP_ATTRS);
349 buffer_put_int(&msg, id); 464 buffer_put_int(&msg, id);
@@ -360,7 +475,7 @@ process_init(void)
360 Buffer msg; 475 Buffer msg;
361 476
362 version = get_int(); 477 version = get_int();
363 TRACE("client version %d", version); 478 verbose("received client version %d", version);
364 buffer_init(&msg); 479 buffer_init(&msg);
365 buffer_put_char(&msg, SSH2_FXP_VERSION); 480 buffer_put_char(&msg, SSH2_FXP_VERSION);
366 buffer_put_int(&msg, SSH2_FILEXFER_VERSION); 481 buffer_put_int(&msg, SSH2_FILEXFER_VERSION);
@@ -379,10 +494,12 @@ process_open(void)
379 id = get_int(); 494 id = get_int();
380 name = get_string(NULL); 495 name = get_string(NULL);
381 pflags = get_int(); /* portable flags */ 496 pflags = get_int(); /* portable flags */
497 debug3("request %u: open flags %d", id, pflags);
382 a = get_attrib(); 498 a = get_attrib();
383 flags = flags_from_portable(pflags); 499 flags = flags_from_portable(pflags);
384 mode = (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) ? a->perm : 0666; 500 mode = (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) ? a->perm : 0666;
385 TRACE("open id %u name %s flags %d mode 0%o", id, name, pflags, mode); 501 logit("open \"%s\" flags %s mode 0%o",
502 name, string_from_portable(pflags), mode);
386 fd = open(name, flags, mode); 503 fd = open(name, flags, mode);
387 if (fd < 0) { 504 if (fd < 0) {
388 status = errno_to_portable(errno); 505 status = errno_to_portable(errno);
@@ -408,7 +525,8 @@ process_close(void)
408 525
409 id = get_int(); 526 id = get_int();
410 handle = get_handle(); 527 handle = get_handle();
411 TRACE("close id %u handle %d", id, handle); 528 debug3("request %u: close handle %u", id, handle);
529 handle_log_close(handle, NULL);
412 ret = handle_close(handle); 530 ret = handle_close(handle);
413 status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK; 531 status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK;
414 send_status(id, status); 532 send_status(id, status);
@@ -427,11 +545,11 @@ process_read(void)
427 off = get_int64(); 545 off = get_int64();
428 len = get_int(); 546 len = get_int();
429 547
430 TRACE("read id %u handle %d off %llu len %d", id, handle, 548 debug("request %u: read \"%s\" (handle %d) off %llu len %d",
431 (unsigned long long)off, len); 549 id, handle_to_name(handle), handle, (unsigned long long)off, len);
432 if (len > sizeof buf) { 550 if (len > sizeof buf) {
433 len = sizeof buf; 551 len = sizeof buf;
434 logit("read change len %d", len); 552 debug2("read change len %d", len);
435 } 553 }
436 fd = handle_to_fd(handle); 554 fd = handle_to_fd(handle);
437 if (fd >= 0) { 555 if (fd >= 0) {
@@ -447,6 +565,7 @@ process_read(void)
447 } else { 565 } else {
448 send_data(id, buf, ret); 566 send_data(id, buf, ret);
449 status = SSH2_FX_OK; 567 status = SSH2_FX_OK;
568 handle_update_read(handle, ret);
450 } 569 }
451 } 570 }
452 } 571 }
@@ -468,8 +587,8 @@ process_write(void)
468 off = get_int64(); 587 off = get_int64();
469 data = get_string(&len); 588 data = get_string(&len);
470 589
471 TRACE("write id %u handle %d off %llu len %d", id, handle, 590 debug("request %u: write \"%s\" (handle %d) off %llu len %d",
472 (unsigned long long)off, len); 591 id, handle_to_name(handle), handle, (unsigned long long)off, len);
473 fd = handle_to_fd(handle); 592 fd = handle_to_fd(handle);
474 if (fd >= 0) { 593 if (fd >= 0) {
475 if (lseek(fd, off, SEEK_SET) < 0) { 594 if (lseek(fd, off, SEEK_SET) < 0) {
@@ -483,8 +602,9 @@ process_write(void)
483 status = errno_to_portable(errno); 602 status = errno_to_portable(errno);
484 } else if ((size_t)ret == len) { 603 } else if ((size_t)ret == len) {
485 status = SSH2_FX_OK; 604 status = SSH2_FX_OK;
605 handle_update_write(handle, ret);
486 } else { 606 } else {
487 logit("nothing at all written"); 607 debug2("nothing at all written");
488 } 608 }
489 } 609 }
490 } 610 }
@@ -503,7 +623,8 @@ process_do_stat(int do_lstat)
503 623
504 id = get_int(); 624 id = get_int();
505 name = get_string(NULL); 625 name = get_string(NULL);
506 TRACE("%sstat id %u name %s", do_lstat ? "l" : "", id, name); 626 debug3("request %u: %sstat", id, do_lstat ? "l" : "");
627 verbose("%sstat name \"%s\"", do_lstat ? "l" : "", name);
507 ret = do_lstat ? lstat(name, &st) : stat(name, &st); 628 ret = do_lstat ? lstat(name, &st) : stat(name, &st);
508 if (ret < 0) { 629 if (ret < 0) {
509 status = errno_to_portable(errno); 630 status = errno_to_portable(errno);
@@ -539,9 +660,10 @@ process_fstat(void)
539 660
540 id = get_int(); 661 id = get_int();
541 handle = get_handle(); 662 handle = get_handle();
542 TRACE("fstat id %u handle %d", id, handle); 663 debug("request %u: fstat \"%s\" (handle %u)",
664 id, handle_to_name(handle), handle);
543 fd = handle_to_fd(handle); 665 fd = handle_to_fd(handle);
544 if (fd >= 0) { 666 if (fd >= 0) {
545 ret = fstat(fd, &st); 667 ret = fstat(fd, &st);
546 if (ret < 0) { 668 if (ret < 0) {
547 status = errno_to_portable(errno); 669 status = errno_to_portable(errno);
@@ -578,23 +700,33 @@ process_setstat(void)
578 id = get_int(); 700 id = get_int();
579 name = get_string(NULL); 701 name = get_string(NULL);
580 a = get_attrib(); 702 a = get_attrib();
581 TRACE("setstat id %u name %s", id, name); 703 debug("request %u: setstat name \"%s\"", id, name);
582 if (a->flags & SSH2_FILEXFER_ATTR_SIZE) { 704 if (a->flags & SSH2_FILEXFER_ATTR_SIZE) {
705 logit("set \"%s\" size %llu", name, a->size);
583 ret = truncate(name, a->size); 706 ret = truncate(name, a->size);
584 if (ret == -1) 707 if (ret == -1)
585 status = errno_to_portable(errno); 708 status = errno_to_portable(errno);
586 } 709 }
587 if (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) { 710 if (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) {
711 logit("set \"%s\" mode %04o", name, a->perm);
588 ret = chmod(name, a->perm & 0777); 712 ret = chmod(name, a->perm & 0777);
589 if (ret == -1) 713 if (ret == -1)
590 status = errno_to_portable(errno); 714 status = errno_to_portable(errno);
591 } 715 }
592 if (a->flags & SSH2_FILEXFER_ATTR_ACMODTIME) { 716 if (a->flags & SSH2_FILEXFER_ATTR_ACMODTIME) {
717 char buf[64];
718 time_t t = a->mtime;
719
720 strftime(buf, sizeof(buf), "%Y%m%d-%H:%M:%S",
721 localtime(&t));
722 logit("set \"%s\" modtime %s", name, buf);
593 ret = utimes(name, attrib_to_tv(a)); 723 ret = utimes(name, attrib_to_tv(a));
594 if (ret == -1) 724 if (ret == -1)
595 status = errno_to_portable(errno); 725 status = errno_to_portable(errno);
596 } 726 }
597 if (a->flags & SSH2_FILEXFER_ATTR_UIDGID) { 727 if (a->flags & SSH2_FILEXFER_ATTR_UIDGID) {
728 logit("set \"%s\" owner %lu group %lu", name,
729 (u_long)a->uid, (u_long)a->gid);
598 ret = chown(name, a->uid, a->gid); 730 ret = chown(name, a->uid, a->gid);
599 if (ret == -1) 731 if (ret == -1)
600 status = errno_to_portable(errno); 732 status = errno_to_portable(errno);
@@ -610,23 +742,25 @@ process_fsetstat(void)
610 u_int32_t id; 742 u_int32_t id;
611 int handle, fd, ret; 743 int handle, fd, ret;
612 int status = SSH2_FX_OK; 744 int status = SSH2_FX_OK;
613 char *name;
614 745
615 id = get_int(); 746 id = get_int();
616 handle = get_handle(); 747 handle = get_handle();
617 a = get_attrib(); 748 a = get_attrib();
618 TRACE("fsetstat id %u handle %d", id, handle); 749 debug("request %u: fsetstat handle %d", id, handle);
619 fd = handle_to_fd(handle); 750 fd = handle_to_fd(handle);
620 name = handle_to_name(handle); 751 if (fd < 0) {
621 if (fd < 0 || name == NULL) {
622 status = SSH2_FX_FAILURE; 752 status = SSH2_FX_FAILURE;
623 } else { 753 } else {
754 char *name = handle_to_name(handle);
755
624 if (a->flags & SSH2_FILEXFER_ATTR_SIZE) { 756 if (a->flags & SSH2_FILEXFER_ATTR_SIZE) {
757 logit("set \"%s\" size %llu", name, a->size);
625 ret = ftruncate(fd, a->size); 758 ret = ftruncate(fd, a->size);
626 if (ret == -1) 759 if (ret == -1)
627 status = errno_to_portable(errno); 760 status = errno_to_portable(errno);
628 } 761 }
629 if (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) { 762 if (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) {
763 logit("set \"%s\" mode %04o", name, a->perm);
630#ifdef HAVE_FCHMOD 764#ifdef HAVE_FCHMOD
631 ret = fchmod(fd, a->perm & 0777); 765 ret = fchmod(fd, a->perm & 0777);
632#else 766#else
@@ -636,6 +770,12 @@ process_fsetstat(void)
636 status = errno_to_portable(errno); 770 status = errno_to_portable(errno);
637 } 771 }
638 if (a->flags & SSH2_FILEXFER_ATTR_ACMODTIME) { 772 if (a->flags & SSH2_FILEXFER_ATTR_ACMODTIME) {
773 char buf[64];
774 time_t t = a->mtime;
775
776 strftime(buf, sizeof(buf), "%Y%m%d-%H:%M:%S",
777 localtime(&t));
778 logit("set \"%s\" modtime %s", name, buf);
639#ifdef HAVE_FUTIMES 779#ifdef HAVE_FUTIMES
640 ret = futimes(fd, attrib_to_tv(a)); 780 ret = futimes(fd, attrib_to_tv(a));
641#else 781#else
@@ -645,6 +785,8 @@ process_fsetstat(void)
645 status = errno_to_portable(errno); 785 status = errno_to_portable(errno);
646 } 786 }
647 if (a->flags & SSH2_FILEXFER_ATTR_UIDGID) { 787 if (a->flags & SSH2_FILEXFER_ATTR_UIDGID) {
788 logit("set \"%s\" owner %lu group %lu", name,
789 (u_long)a->uid, (u_long)a->gid);
648#ifdef HAVE_FCHOWN 790#ifdef HAVE_FCHOWN
649 ret = fchown(fd, a->uid, a->gid); 791 ret = fchown(fd, a->uid, a->gid);
650#else 792#else
@@ -667,7 +809,8 @@ process_opendir(void)
667 809
668 id = get_int(); 810 id = get_int();
669 path = get_string(NULL); 811 path = get_string(NULL);
670 TRACE("opendir id %u path %s", id, path); 812 debug3("request %u: opendir", id);
813 logit("opendir \"%s\"", path);
671 dirp = opendir(path); 814 dirp = opendir(path);
672 if (dirp == NULL) { 815 if (dirp == NULL) {
673 status = errno_to_portable(errno); 816 status = errno_to_portable(errno);
@@ -697,22 +840,23 @@ process_readdir(void)
697 840
698 id = get_int(); 841 id = get_int();
699 handle = get_handle(); 842 handle = get_handle();
700 TRACE("readdir id %u handle %d", id, handle); 843 debug("request %u: readdir \"%s\" (handle %d)", id,
844 handle_to_name(handle), handle);
701 dirp = handle_to_dir(handle); 845 dirp = handle_to_dir(handle);
702 path = handle_to_name(handle); 846 path = handle_to_name(handle);
703 if (dirp == NULL || path == NULL) { 847 if (dirp == NULL || path == NULL) {
704 send_status(id, SSH2_FX_FAILURE); 848 send_status(id, SSH2_FX_FAILURE);
705 } else { 849 } else {
706 struct stat st; 850 struct stat st;
707 char pathname[1024]; 851 char pathname[MAXPATHLEN];
708 Stat *stats; 852 Stat *stats;
709 int nstats = 10, count = 0, i; 853 int nstats = 10, count = 0, i;
710 854
711 stats = xmalloc(nstats * sizeof(Stat)); 855 stats = xcalloc(nstats, sizeof(Stat));
712 while ((dp = readdir(dirp)) != NULL) { 856 while ((dp = readdir(dirp)) != NULL) {
713 if (count >= nstats) { 857 if (count >= nstats) {
714 nstats *= 2; 858 nstats *= 2;
715 stats = xrealloc(stats, nstats * sizeof(Stat)); 859 stats = xrealloc(stats, nstats, sizeof(Stat));
716 } 860 }
717/* XXX OVERFLOW ? */ 861/* XXX OVERFLOW ? */
718 snprintf(pathname, sizeof pathname, "%s%s%s", path, 862 snprintf(pathname, sizeof pathname, "%s%s%s", path,
@@ -751,7 +895,8 @@ process_remove(void)
751 895
752 id = get_int(); 896 id = get_int();
753 name = get_string(NULL); 897 name = get_string(NULL);
754 TRACE("remove id %u name %s", id, name); 898 debug3("request %u: remove", id);
899 logit("remove name \"%s\"", name);
755 ret = unlink(name); 900 ret = unlink(name);
756 status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK; 901 status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK;
757 send_status(id, status); 902 send_status(id, status);
@@ -771,7 +916,8 @@ process_mkdir(void)
771 a = get_attrib(); 916 a = get_attrib();
772 mode = (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) ? 917 mode = (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) ?
773 a->perm & 0777 : 0777; 918 a->perm & 0777 : 0777;
774 TRACE("mkdir id %u name %s mode 0%o", id, name, mode); 919 debug3("request %u: mkdir", id);
920 logit("mkdir name \"%s\" mode 0%o", name, mode);
775 ret = mkdir(name, mode); 921 ret = mkdir(name, mode);
776 status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK; 922 status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK;
777 send_status(id, status); 923 send_status(id, status);
@@ -787,7 +933,8 @@ process_rmdir(void)
787 933
788 id = get_int(); 934 id = get_int();
789 name = get_string(NULL); 935 name = get_string(NULL);
790 TRACE("rmdir id %u name %s", id, name); 936 debug3("request %u: rmdir", id);
937 logit("rmdir name \"%s\"", name);
791 ret = rmdir(name); 938 ret = rmdir(name);
792 status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK; 939 status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK;
793 send_status(id, status); 940 send_status(id, status);
@@ -807,7 +954,8 @@ process_realpath(void)
807 xfree(path); 954 xfree(path);
808 path = xstrdup("."); 955 path = xstrdup(".");
809 } 956 }
810 TRACE("realpath id %u path %s", id, path); 957 debug3("request %u: realpath", id);
958 verbose("realpath \"%s\"", path);
811 if (realpath(path, resolvedname) == NULL) { 959 if (realpath(path, resolvedname) == NULL) {
812 send_status(id, errno_to_portable(errno)); 960 send_status(id, errno_to_portable(errno));
813 } else { 961 } else {
@@ -830,7 +978,8 @@ process_rename(void)
830 id = get_int(); 978 id = get_int();
831 oldpath = get_string(NULL); 979 oldpath = get_string(NULL);
832 newpath = get_string(NULL); 980 newpath = get_string(NULL);
833 TRACE("rename id %u old %s new %s", id, oldpath, newpath); 981 debug3("request %u: rename", id);
982 logit("rename old \"%s\" new \"%s\"", oldpath, newpath);
834 status = SSH2_FX_FAILURE; 983 status = SSH2_FX_FAILURE;
835 if (lstat(oldpath, &sb) == -1) 984 if (lstat(oldpath, &sb) == -1)
836 status = errno_to_portable(errno); 985 status = errno_to_portable(errno);
@@ -885,7 +1034,8 @@ process_readlink(void)
885 1034
886 id = get_int(); 1035 id = get_int();
887 path = get_string(NULL); 1036 path = get_string(NULL);
888 TRACE("readlink id %u path %s", id, path); 1037 debug3("request %u: readlink", id);
1038 verbose("readlink \"%s\"", path);
889 if ((len = readlink(path, buf, sizeof(buf) - 1)) == -1) 1039 if ((len = readlink(path, buf, sizeof(buf) - 1)) == -1)
890 send_status(id, errno_to_portable(errno)); 1040 send_status(id, errno_to_portable(errno));
891 else { 1041 else {
@@ -909,7 +1059,8 @@ process_symlink(void)
909 id = get_int(); 1059 id = get_int();
910 oldpath = get_string(NULL); 1060 oldpath = get_string(NULL);
911 newpath = get_string(NULL); 1061 newpath = get_string(NULL);
912 TRACE("symlink id %u old %s new %s", id, oldpath, newpath); 1062 debug3("request %u: symlink", id);
1063 logit("symlink old \"%s\" new \"%s\"", oldpath, newpath);
913 /* this will fail if 'newpath' exists */ 1064 /* this will fail if 'newpath' exists */
914 ret = symlink(oldpath, newpath); 1065 ret = symlink(oldpath, newpath);
915 status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK; 1066 status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK;
@@ -945,10 +1096,11 @@ process(void)
945 if (buf_len < 5) 1096 if (buf_len < 5)
946 return; /* Incomplete message. */ 1097 return; /* Incomplete message. */
947 cp = buffer_ptr(&iqueue); 1098 cp = buffer_ptr(&iqueue);
948 msg_len = GET_32BIT(cp); 1099 msg_len = get_u32(cp);
949 if (msg_len > SFTP_MAX_MSG_LENGTH) { 1100 if (msg_len > SFTP_MAX_MSG_LENGTH) {
950 error("bad message "); 1101 error("bad message from %s local user %s",
951 exit(11); 1102 client_addr, pw->pw_name);
1103 cleanup_exit(11);
952 } 1104 }
953 if (buf_len < msg_len + 4) 1105 if (buf_len < msg_len + 4)
954 return; 1106 return;
@@ -1022,7 +1174,7 @@ process(void)
1022 } 1174 }
1023 /* discard the remaining bytes from the current packet */ 1175 /* discard the remaining bytes from the current packet */
1024 if (buf_len < buffer_len(&iqueue)) 1176 if (buf_len < buffer_len(&iqueue))
1025 fatal("iqueue grows"); 1177 fatal("iqueue grew unexpectedly");
1026 consumed = buf_len - buffer_len(&iqueue); 1178 consumed = buf_len - buffer_len(&iqueue);
1027 if (msg_len < consumed) 1179 if (msg_len < consumed)
1028 fatal("msg_len %d < consumed %d", msg_len, consumed); 1180 fatal("msg_len %d < consumed %d", msg_len, consumed);
@@ -1030,24 +1182,93 @@ process(void)
1030 buffer_consume(&iqueue, msg_len - consumed); 1182 buffer_consume(&iqueue, msg_len - consumed);
1031} 1183}
1032 1184
1185/* Cleanup handler that logs active handles upon normal exit */
1186void
1187cleanup_exit(int i)
1188{
1189 if (pw != NULL && client_addr != NULL) {
1190 handle_log_exit();
1191 logit("session closed for local user %s from [%s]",
1192 pw->pw_name, client_addr);
1193 }
1194 _exit(i);
1195}
1196
1197static void
1198usage(void)
1199{
1200 extern char *__progname;
1201
1202 fprintf(stderr,
1203 "usage: %s [-he] [-l log_level] [-f log_facility]\n", __progname);
1204 exit(1);
1205}
1206
1033int 1207int
1034main(int ac, char **av) 1208main(int argc, char **argv)
1035{ 1209{
1036 fd_set *rset, *wset; 1210 fd_set *rset, *wset;
1037 int in, out, max; 1211 int in, out, max, ch, skipargs = 0, log_stderr = 0;
1038 ssize_t len, olen, set_size; 1212 ssize_t len, olen, set_size;
1213 SyslogFacility log_facility = SYSLOG_FACILITY_AUTH;
1214 char *cp;
1215
1216 extern char *optarg;
1217 extern char *__progname;
1039 1218
1040 /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ 1219 /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
1041 sanitise_stdfd(); 1220 sanitise_stdfd();
1042 1221
1043 /* XXX should use getopt */ 1222 __progname = ssh_get_progname(argv[0]);
1223 log_init(__progname, log_level, log_facility, log_stderr);
1224
1225 while (!skipargs && (ch = getopt(argc, argv, "C:f:l:che")) != -1) {
1226 switch (ch) {
1227 case 'c':
1228 /*
1229 * Ignore all arguments if we are invoked as a
1230 * shell using "sftp-server -c command"
1231 */
1232 skipargs = 1;
1233 break;
1234 case 'e':
1235 log_stderr = 1;
1236 break;
1237 case 'l':
1238 log_level = log_level_number(optarg);
1239 if (log_level == SYSLOG_LEVEL_NOT_SET)
1240 error("Invalid log level \"%s\"", optarg);
1241 break;
1242 case 'f':
1243 log_facility = log_facility_number(optarg);
1244 if (log_level == SYSLOG_FACILITY_NOT_SET)
1245 error("Invalid log facility \"%s\"", optarg);
1246 break;
1247 case 'h':
1248 default:
1249 usage();
1250 }
1251 }
1044 1252
1045 __progname = ssh_get_progname(av[0]); 1253 log_init(__progname, log_level, log_facility, log_stderr);
1046 handle_init();
1047 1254
1048#ifdef DEBUG_SFTP_SERVER 1255 if ((cp = getenv("SSH_CONNECTION")) != NULL) {
1049 log_init("sftp-server", SYSLOG_LEVEL_DEBUG1, SYSLOG_FACILITY_AUTH, 0); 1256 client_addr = xstrdup(cp);
1050#endif 1257 if ((cp = strchr(client_addr, ' ')) == NULL)
1258 fatal("Malformed SSH_CONNECTION variable: \"%s\"",
1259 getenv("SSH_CONNECTION"));
1260 *cp = '\0';
1261 } else
1262 client_addr = xstrdup("UNKNOWN");
1263
1264 if ((pw = getpwuid(getuid())) == NULL)
1265 fatal("No user found for uid %lu", (u_long)getuid());
1266 pw = pwcopy(pw);
1267
1268 logit("session opened for local user %s from [%s]",
1269 pw->pw_name, client_addr);
1270
1271 handle_init();
1051 1272
1052 in = dup(STDIN_FILENO); 1273 in = dup(STDIN_FILENO);
1053 out = dup(STDOUT_FILENO); 1274 out = dup(STDOUT_FILENO);
@@ -1082,7 +1303,8 @@ main(int ac, char **av)
1082 if (select(max+1, rset, wset, NULL, NULL) < 0) { 1303 if (select(max+1, rset, wset, NULL, NULL) < 0) {
1083 if (errno == EINTR) 1304 if (errno == EINTR)
1084 continue; 1305 continue;
1085 exit(2); 1306 error("select: %s", strerror(errno));
1307 cleanup_exit(2);
1086 } 1308 }
1087 1309
1088 /* copy stdin to iqueue */ 1310 /* copy stdin to iqueue */
@@ -1091,10 +1313,10 @@ main(int ac, char **av)
1091 len = read(in, buf, sizeof buf); 1313 len = read(in, buf, sizeof buf);
1092 if (len == 0) { 1314 if (len == 0) {
1093 debug("read eof"); 1315 debug("read eof");
1094 exit(0); 1316 cleanup_exit(0);
1095 } else if (len < 0) { 1317 } else if (len < 0) {
1096 error("read error"); 1318 error("read: %s", strerror(errno));
1097 exit(1); 1319 cleanup_exit(1);
1098 } else { 1320 } else {
1099 buffer_append(&iqueue, buf, len); 1321 buffer_append(&iqueue, buf, len);
1100 } 1322 }
@@ -1103,8 +1325,8 @@ main(int ac, char **av)
1103 if (FD_ISSET(out, wset)) { 1325 if (FD_ISSET(out, wset)) {
1104 len = write(out, buffer_ptr(&oqueue), olen); 1326 len = write(out, buffer_ptr(&oqueue), olen);
1105 if (len < 0) { 1327 if (len < 0) {
1106 error("write error"); 1328 error("write: %s", strerror(errno));
1107 exit(1); 1329 cleanup_exit(1);
1108 } else { 1330 } else {
1109 buffer_consume(&oqueue, len); 1331 buffer_consume(&oqueue, len);
1110 } 1332 }
diff --git a/sftp.0 b/sftp.0
index 77ab78d96..6b8a85658 100644
--- a/sftp.0
+++ b/sftp.0
@@ -263,4 +263,4 @@ SEE ALSO
263 T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh- 263 T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh-
264 filexfer-00.txt, January 2001, work in progress material. 264 filexfer-00.txt, January 2001, work in progress material.
265 265
266OpenBSD 3.9 February 4, 2001 4 266OpenBSD 4.1 February 4, 2001 4
diff --git a/sftp.c b/sftp.c
index a2e3f6aad..f0d5dd557 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: sftp.c,v 1.96 2007/01/03 04:09:15 stevesk Exp $ */
1/* 2/*
2 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
3 * 4 *
@@ -16,21 +17,39 @@
16 17
17#include "includes.h" 18#include "includes.h"
18 19
19RCSID("$OpenBSD: sftp.c,v 1.70 2006/01/31 10:19:02 djm Exp $"); 20#include <sys/types.h>
21#include <sys/ioctl.h>
22#ifdef HAVE_SYS_STAT_H
23# include <sys/stat.h>
24#endif
25#include <sys/param.h>
26#include <sys/socket.h>
27#include <sys/wait.h>
28
29#include <errno.h>
20 30
31#ifdef HAVE_PATHS_H
32# include <paths.h>
33#endif
21#ifdef USE_LIBEDIT 34#ifdef USE_LIBEDIT
22#include <histedit.h> 35#include <histedit.h>
23#else 36#else
24typedef void EditLine; 37typedef void EditLine;
25#endif 38#endif
39#include <signal.h>
40#include <stdlib.h>
41#include <stdio.h>
42#include <string.h>
43#include <unistd.h>
44#include <stdarg.h>
26 45
27#include "buffer.h"
28#include "xmalloc.h" 46#include "xmalloc.h"
29#include "log.h" 47#include "log.h"
30#include "pathnames.h" 48#include "pathnames.h"
31#include "misc.h" 49#include "misc.h"
32 50
33#include "sftp.h" 51#include "sftp.h"
52#include "buffer.h"
34#include "sftp-common.h" 53#include "sftp-common.h"
35#include "sftp-client.h" 54#include "sftp-client.h"
36 55
@@ -147,6 +166,7 @@ static const struct CMD cmds[] = {
147 166
148int interactive_loop(int fd_in, int fd_out, char *file1, char *file2); 167int interactive_loop(int fd_in, int fd_out, char *file1, char *file2);
149 168
169/* ARGSUSED */
150static void 170static void
151killchild(int signo) 171killchild(int signo)
152{ 172{
@@ -158,6 +178,7 @@ killchild(int signo)
158 _exit(1); 178 _exit(1);
159} 179}
160 180
181/* ARGSUSED */
161static void 182static void
162cmd_interrupt(int signo) 183cmd_interrupt(int signo)
163{ 184{
@@ -235,7 +256,7 @@ local_do_shell(const char *args)
235 if (errno != EINTR) 256 if (errno != EINTR)
236 fatal("Couldn't wait for child: %s", strerror(errno)); 257 fatal("Couldn't wait for child: %s", strerror(errno));
237 if (!WIFEXITED(status)) 258 if (!WIFEXITED(status))
238 error("Shell exited abormally"); 259 error("Shell exited abnormally");
239 else if (WEXITSTATUS(status)) 260 else if (WEXITSTATUS(status))
240 error("Shell exited with status %d", WEXITSTATUS(status)); 261 error("Shell exited with status %d", WEXITSTATUS(status));
241} 262}
@@ -279,11 +300,11 @@ static char *
279path_append(char *p1, char *p2) 300path_append(char *p1, char *p2)
280{ 301{
281 char *ret; 302 char *ret;
282 int len = strlen(p1) + strlen(p2) + 2; 303 size_t len = strlen(p1) + strlen(p2) + 2;
283 304
284 ret = xmalloc(len); 305 ret = xmalloc(len);
285 strlcpy(ret, p1, len); 306 strlcpy(ret, p1, len);
286 if (p1[strlen(p1) - 1] != '/') 307 if (p1[0] != '\0' && p1[strlen(p1) - 1] != '/')
287 strlcat(ret, "/", len); 308 strlcat(ret, "/", len);
288 strlcat(ret, p2, len); 309 strlcat(ret, p2, len);
289 310
@@ -474,7 +495,7 @@ is_dir(char *path)
474 if (stat(path, &sb) == -1) 495 if (stat(path, &sb) == -1)
475 return(0); 496 return(0);
476 497
477 return(sb.st_mode & S_IFDIR); 498 return(S_ISDIR(sb.st_mode));
478} 499}
479 500
480static int 501static int
@@ -498,7 +519,7 @@ remote_is_dir(struct sftp_conn *conn, char *path)
498 return(0); 519 return(0);
499 if (!(a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS)) 520 if (!(a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS))
500 return(0); 521 return(0);
501 return(a->perm & S_IFDIR); 522 return(S_ISDIR(a->perm));
502} 523}
503 524
504static int 525static int
@@ -538,6 +559,7 @@ process_get(struct sftp_conn *conn, char *src, char *dst, char *pwd, int pflag)
538 559
539 if (g.gl_matchc == 1 && dst) { 560 if (g.gl_matchc == 1 && dst) {
540 /* If directory specified, append filename */ 561 /* If directory specified, append filename */
562 xfree(tmp);
541 if (is_dir(dst)) { 563 if (is_dir(dst)) {
542 if (infer_path(g.gl_pathv[0], &tmp)) { 564 if (infer_path(g.gl_pathv[0], &tmp)) {
543 err = 1; 565 err = 1;
@@ -562,8 +584,6 @@ process_get(struct sftp_conn *conn, char *src, char *dst, char *pwd, int pflag)
562 584
563out: 585out:
564 xfree(abs_src); 586 xfree(abs_src);
565 if (abs_dst)
566 xfree(abs_dst);
567 globfree(&g); 587 globfree(&g);
568 return(err); 588 return(err);
569} 589}
@@ -959,6 +979,7 @@ parse_args(const char **cpp, int *pflag, int *lflag, int *iflag,
959 case I_CHOWN: 979 case I_CHOWN:
960 case I_CHGRP: 980 case I_CHGRP:
961 /* Get numeric arg (mandatory) */ 981 /* Get numeric arg (mandatory) */
982 errno = 0;
962 l = strtol(cp, &cp2, base); 983 l = strtol(cp, &cp2, base);
963 if (cp2 == cp || ((l == LONG_MIN || l == LONG_MAX) && 984 if (cp2 == cp || ((l == LONG_MIN || l == LONG_MAX) &&
964 errno == ERANGE) || l < 0) { 985 errno == ERANGE) || l < 0) {
@@ -1280,6 +1301,7 @@ interactive_loop(int fd_in, int fd_out, char *file1, char *file2)
1280 if (parse_dispatch_command(conn, cmd, &pwd, 1) != 0) { 1301 if (parse_dispatch_command(conn, cmd, &pwd, 1) != 0) {
1281 xfree(dir); 1302 xfree(dir);
1282 xfree(pwd); 1303 xfree(pwd);
1304 xfree(conn);
1283 return (-1); 1305 return (-1);
1284 } 1306 }
1285 } else { 1307 } else {
@@ -1292,6 +1314,7 @@ interactive_loop(int fd_in, int fd_out, char *file1, char *file2)
1292 err = parse_dispatch_command(conn, cmd, &pwd, 1); 1314 err = parse_dispatch_command(conn, cmd, &pwd, 1);
1293 xfree(dir); 1315 xfree(dir);
1294 xfree(pwd); 1316 xfree(pwd);
1317 xfree(conn);
1295 return (err); 1318 return (err);
1296 } 1319 }
1297 xfree(dir); 1320 xfree(dir);
@@ -1356,6 +1379,7 @@ interactive_loop(int fd_in, int fd_out, char *file1, char *file2)
1356 break; 1379 break;
1357 } 1380 }
1358 xfree(pwd); 1381 xfree(pwd);
1382 xfree(conn);
1359 1383
1360#ifdef USE_LIBEDIT 1384#ifdef USE_LIBEDIT
1361 if (el != NULL) 1385 if (el != NULL)
@@ -1455,7 +1479,7 @@ main(int argc, char **argv)
1455 __progname = ssh_get_progname(argv[0]); 1479 __progname = ssh_get_progname(argv[0]);
1456 memset(&args, '\0', sizeof(args)); 1480 memset(&args, '\0', sizeof(args));
1457 args.list = NULL; 1481 args.list = NULL;
1458 addargs(&args, ssh_program); 1482 addargs(&args, "%s", ssh_program);
1459 addargs(&args, "-oForwardX11 no"); 1483 addargs(&args, "-oForwardX11 no");
1460 addargs(&args, "-oForwardAgent no"); 1484 addargs(&args, "-oForwardAgent no");
1461 addargs(&args, "-oPermitLocalCommand no"); 1485 addargs(&args, "-oPermitLocalCommand no");
@@ -1544,7 +1568,7 @@ main(int argc, char **argv)
1544 fprintf(stderr, "Missing username\n"); 1568 fprintf(stderr, "Missing username\n");
1545 usage(); 1569 usage();
1546 } 1570 }
1547 addargs(&args, "-l%s",userhost); 1571 addargs(&args, "-l%s", userhost);
1548 } 1572 }
1549 1573
1550 if ((cp = colon(host)) != NULL) { 1574 if ((cp = colon(host)) != NULL) {
diff --git a/sftp.h b/sftp.h
index 675c6086e..610c0b758 100644
--- a/sftp.h
+++ b/sftp.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp.h,v 1.4 2002/02/13 00:59:23 djm Exp $ */ 1/* $OpenBSD: sftp.h,v 1.5 2006/03/25 22:22:43 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 2001 Markus Friedl. All rights reserved.
diff --git a/ssh-add.0 b/ssh-add.0
index ee05d09d6..71ce5d26b 100644
--- a/ssh-add.0
+++ b/ssh-add.0
@@ -99,4 +99,4 @@ AUTHORS
99 ated OpenSSH. Markus Friedl contributed the support for SSH protocol 99 ated OpenSSH. Markus Friedl contributed the support for SSH protocol
100 versions 1.5 and 2.0. 100 versions 1.5 and 2.0.
101 101
102OpenBSD 3.9 September 25, 1999 2 102OpenBSD 4.1 September 25, 1999 2
diff --git a/ssh-add.c b/ssh-add.c
index 2b01e6f13..4dc46f6db 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: ssh-add.c,v 1.89 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -35,15 +36,27 @@
35 */ 36 */
36 37
37#include "includes.h" 38#include "includes.h"
38RCSID("$OpenBSD: ssh-add.c,v 1.74 2005/11/12 18:37:59 deraadt Exp $"); 39
40#include <sys/types.h>
41#include <sys/stat.h>
42#include <sys/param.h>
39 43
40#include <openssl/evp.h> 44#include <openssl/evp.h>
41 45
46#include <fcntl.h>
47#include <pwd.h>
48#include <stdarg.h>
49#include <stdio.h>
50#include <stdlib.h>
51#include <string.h>
52#include <unistd.h>
53
54#include "xmalloc.h"
42#include "ssh.h" 55#include "ssh.h"
43#include "rsa.h" 56#include "rsa.h"
44#include "log.h" 57#include "log.h"
45#include "xmalloc.h"
46#include "key.h" 58#include "key.h"
59#include "buffer.h"
47#include "authfd.h" 60#include "authfd.h"
48#include "authfile.h" 61#include "authfile.h"
49#include "pathnames.h" 62#include "pathnames.h"
@@ -124,16 +137,25 @@ delete_all(AuthenticationConnection *ac)
124static int 137static int
125add_file(AuthenticationConnection *ac, const char *filename) 138add_file(AuthenticationConnection *ac, const char *filename)
126{ 139{
127 struct stat st;
128 Key *private; 140 Key *private;
129 char *comment = NULL; 141 char *comment = NULL;
130 char msg[1024]; 142 char msg[1024];
131 int ret = -1; 143 int fd, perms_ok, ret = -1;
132 144
133 if (stat(filename, &st) < 0) { 145 if ((fd = open(filename, O_RDONLY)) < 0) {
134 perror(filename); 146 perror(filename);
135 return -1; 147 return -1;
136 } 148 }
149
150 /*
151 * Since we'll try to load a keyfile multiple times, permission errors
152 * will occur multiple times, so check perms first and bail if wrong.
153 */
154 perms_ok = key_perm_ok(fd, filename);
155 close(fd);
156 if (!perms_ok)
157 return -1;
158
137 /* At first, try empty passphrase */ 159 /* At first, try empty passphrase */
138 private = key_load_private(filename, "", &comment); 160 private = key_load_private(filename, "", &comment);
139 if (comment == NULL) 161 if (comment == NULL)
@@ -287,7 +309,7 @@ do_file(AuthenticationConnection *ac, int deleting, char *file)
287static void 309static void
288usage(void) 310usage(void)
289{ 311{
290 fprintf(stderr, "Usage: %s [options]\n", __progname); 312 fprintf(stderr, "Usage: %s [options] [file ...]\n", __progname);
291 fprintf(stderr, "Options:\n"); 313 fprintf(stderr, "Options:\n");
292 fprintf(stderr, " -l List fingerprints of all identities.\n"); 314 fprintf(stderr, " -l List fingerprints of all identities.\n");
293 fprintf(stderr, " -L List public key parameters of all identities.\n"); 315 fprintf(stderr, " -L List public key parameters of all identities.\n");
@@ -335,13 +357,11 @@ main(int argc, char **argv)
335 if (list_identities(ac, ch == 'l' ? 1 : 0) == -1) 357 if (list_identities(ac, ch == 'l' ? 1 : 0) == -1)
336 ret = 1; 358 ret = 1;
337 goto done; 359 goto done;
338 break;
339 case 'x': 360 case 'x':
340 case 'X': 361 case 'X':
341 if (lock_agent(ac, ch == 'x' ? 1 : 0) == -1) 362 if (lock_agent(ac, ch == 'x' ? 1 : 0) == -1)
342 ret = 1; 363 ret = 1;
343 goto done; 364 goto done;
344 break;
345 case 'c': 365 case 'c':
346 confirm = 1; 366 confirm = 1;
347 break; 367 break;
@@ -352,7 +372,6 @@ main(int argc, char **argv)
352 if (delete_all(ac) == -1) 372 if (delete_all(ac) == -1)
353 ret = 1; 373 ret = 1;
354 goto done; 374 goto done;
355 break;
356 case 's': 375 case 's':
357 sc_reader_id = optarg; 376 sc_reader_id = optarg;
358 break; 377 break;
diff --git a/ssh-agent.0 b/ssh-agent.0
index 7d64d550f..f3f52b67d 100644
--- a/ssh-agent.0
+++ b/ssh-agent.0
@@ -114,4 +114,4 @@ AUTHORS
114 ated OpenSSH. Markus Friedl contributed the support for SSH protocol 114 ated OpenSSH. Markus Friedl contributed the support for SSH protocol
115 versions 1.5 and 2.0. 115 versions 1.5 and 2.0.
116 116
117OpenBSD 3.9 September 25, 1999 2 117OpenBSD 4.1 September 25, 1999 2
diff --git a/ssh-agent.1 b/ssh-agent.1
index fd6bd3f6c..f1b877790 100644
--- a/ssh-agent.1
+++ b/ssh-agent.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ssh-agent.1,v 1.43 2005/11/28 06:02:56 dtucker Exp $ 1.\" $OpenBSD: ssh-agent.1,v 1.44 2006/07/18 08:03:09 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
@@ -70,7 +70,7 @@ The options are as follows:
70Bind the agent to the unix-domain socket 70Bind the agent to the unix-domain socket
71.Ar bind_address . 71.Ar bind_address .
72The default is 72The default is
73.Pa /tmp/ssh-XXXXXXXXXX/agent.<ppid> . 73.Pa /tmp/ssh-XXXXXXXXXX/agent.\*(Ltppid\*(Gt .
74.It Fl c 74.It Fl c
75Generate C-shell commands on 75Generate C-shell commands on
76.Dv stdout . 76.Dv stdout .
@@ -185,7 +185,7 @@ Contains the protocol version 1 RSA authentication identity of the user.
185Contains the protocol version 2 DSA authentication identity of the user. 185Contains the protocol version 2 DSA authentication identity of the user.
186.It Pa ~/.ssh/id_rsa 186.It Pa ~/.ssh/id_rsa
187Contains the protocol version 2 RSA authentication identity of the user. 187Contains the protocol version 2 RSA authentication identity of the user.
188.It Pa /tmp/ssh-XXXXXXXXXX/agent.<ppid> 188.It Pa /tmp/ssh-XXXXXXXXXX/agent.\*(Ltppid\*(Gt
189Unix-domain sockets used to contain the connection to the 189Unix-domain sockets used to contain the connection to the
190authentication agent. 190authentication agent.
191These sockets should only be readable by the owner. 191These sockets should only be readable by the owner.
diff --git a/ssh-agent.c b/ssh-agent.c
index a69c25eec..a3a867c33 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: ssh-agent.c,v 1.154 2007/02/28 00:55:30 dtucker Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -34,18 +35,40 @@
34 */ 35 */
35 36
36#include "includes.h" 37#include "includes.h"
38
39#include <sys/types.h>
40#include <sys/param.h>
41#include <sys/resource.h>
42#include <sys/stat.h>
43#include <sys/socket.h>
44#ifdef HAVE_SYS_TIME_H
45# include <sys/time.h>
46#endif
47#ifdef HAVE_SYS_UN_H
48# include <sys/un.h>
49#endif
37#include "openbsd-compat/sys-queue.h" 50#include "openbsd-compat/sys-queue.h"
38RCSID("$OpenBSD: ssh-agent.c,v 1.124 2005/10/30 08:52:18 djm Exp $");
39 51
40#include <openssl/evp.h> 52#include <openssl/evp.h>
41#include <openssl/md5.h> 53#include <openssl/md5.h>
42 54
55#include <errno.h>
56#include <fcntl.h>
57#ifdef HAVE_PATHS_H
58# include <paths.h>
59#endif
60#include <signal.h>
61#include <stdarg.h>
62#include <stdio.h>
63#include <stdlib.h>
64#include <time.h>
65#include <string.h>
66#include <unistd.h>
67
68#include "xmalloc.h"
43#include "ssh.h" 69#include "ssh.h"
44#include "rsa.h" 70#include "rsa.h"
45#include "buffer.h" 71#include "buffer.h"
46#include "bufaux.h"
47#include "xmalloc.h"
48#include "getput.h"
49#include "key.h" 72#include "key.h"
50#include "authfd.h" 73#include "authfd.h"
51#include "compat.h" 74#include "compat.h"
@@ -99,8 +122,8 @@ int max_fd = 0;
99pid_t parent_pid = -1; 122pid_t parent_pid = -1;
100 123
101/* pathname and directory for AUTH_SOCKET */ 124/* pathname and directory for AUTH_SOCKET */
102char socket_name[1024]; 125char socket_name[MAXPATHLEN];
103char socket_dir[1024]; 126char socket_dir[MAXPATHLEN];
104 127
105/* locking */ 128/* locking */
106int locked = 0; 129int locked = 0;
@@ -305,8 +328,8 @@ process_sign_request2(SocketEntry *e)
305 Identity *id = lookup_identity(key, 2); 328 Identity *id = lookup_identity(key, 2);
306 if (id != NULL && (!id->confirm || confirm_key(id) == 0)) 329 if (id != NULL && (!id->confirm || confirm_key(id) == 0))
307 ok = key_sign(id->key, &signature, &slen, data, dlen); 330 ok = key_sign(id->key, &signature, &slen, data, dlen);
331 key_free(key);
308 } 332 }
309 key_free(key);
310 buffer_init(&msg); 333 buffer_init(&msg);
311 if (ok == 0) { 334 if (ok == 0) {
312 buffer_put_char(&msg, SSH2_AGENT_SIGN_RESPONSE); 335 buffer_put_char(&msg, SSH2_AGENT_SIGN_RESPONSE);
@@ -411,6 +434,7 @@ reaper(void)
411 for (id = TAILQ_FIRST(&tab->idlist); id; id = nxt) { 434 for (id = TAILQ_FIRST(&tab->idlist); id; id = nxt) {
412 nxt = TAILQ_NEXT(id, next); 435 nxt = TAILQ_NEXT(id, next);
413 if (id->death != 0 && now >= id->death) { 436 if (id->death != 0 && now >= id->death) {
437 debug("expiring key '%s'", id->comment);
414 TAILQ_REMOVE(&tab->idlist, id, next); 438 TAILQ_REMOVE(&tab->idlist, id, next);
415 free_identity(id); 439 free_identity(id);
416 tab->nentries--; 440 tab->nentries--;
@@ -675,13 +699,10 @@ process_message(SocketEntry *e)
675 u_int msg_len, type; 699 u_int msg_len, type;
676 u_char *cp; 700 u_char *cp;
677 701
678 /* kill dead keys */
679 reaper();
680
681 if (buffer_len(&e->input) < 5) 702 if (buffer_len(&e->input) < 5)
682 return; /* Incomplete message. */ 703 return; /* Incomplete message. */
683 cp = buffer_ptr(&e->input); 704 cp = buffer_ptr(&e->input);
684 msg_len = GET_32BIT(cp); 705 msg_len = get_u32(cp);
685 if (msg_len > 256 * 1024) { 706 if (msg_len > 256 * 1024) {
686 close_socket(e); 707 close_socket(e);
687 return; 708 return;
@@ -793,10 +814,7 @@ new_socket(sock_type type, int fd)
793 } 814 }
794 old_alloc = sockets_alloc; 815 old_alloc = sockets_alloc;
795 new_alloc = sockets_alloc + 10; 816 new_alloc = sockets_alloc + 10;
796 if (sockets) 817 sockets = xrealloc(sockets, new_alloc, sizeof(sockets[0]));
797 sockets = xrealloc(sockets, new_alloc * sizeof(sockets[0]));
798 else
799 sockets = xmalloc(new_alloc * sizeof(sockets[0]));
800 for (i = old_alloc; i < new_alloc; i++) 818 for (i = old_alloc; i < new_alloc; i++)
801 sockets[i].type = AUTH_UNUSED; 819 sockets[i].type = AUTH_UNUSED;
802 sockets_alloc = new_alloc; 820 sockets_alloc = new_alloc;
@@ -877,7 +895,7 @@ after_select(fd_set *readset, fd_set *writeset)
877 if (FD_ISSET(sockets[i].fd, readset)) { 895 if (FD_ISSET(sockets[i].fd, readset)) {
878 slen = sizeof(sunaddr); 896 slen = sizeof(sunaddr);
879 sock = accept(sockets[i].fd, 897 sock = accept(sockets[i].fd,
880 (struct sockaddr *) &sunaddr, &slen); 898 (struct sockaddr *)&sunaddr, &slen);
881 if (sock < 0) { 899 if (sock < 0) {
882 error("accept from AUTH_SOCKET: %s", 900 error("accept from AUTH_SOCKET: %s",
883 strerror(errno)); 901 strerror(errno));
@@ -954,6 +972,7 @@ cleanup_exit(int i)
954 _exit(i); 972 _exit(i);
955} 973}
956 974
975/*ARGSUSED*/
957static void 976static void
958cleanup_handler(int sig) 977cleanup_handler(int sig)
959{ 978{
@@ -961,6 +980,7 @@ cleanup_handler(int sig)
961 _exit(2); 980 _exit(2);
962} 981}
963 982
983/*ARGSUSED*/
964static void 984static void
965check_parent_exists(int sig) 985check_parent_exists(int sig)
966{ 986{
@@ -994,7 +1014,7 @@ int
994main(int ac, char **av) 1014main(int ac, char **av)
995{ 1015{
996 int c_flag = 0, d_flag = 0, k_flag = 0, s_flag = 0; 1016 int c_flag = 0, d_flag = 0, k_flag = 0, s_flag = 0;
997 int sock, fd, ch; 1017 int sock, fd, ch, result, saved_errno;
998 u_int nalloc; 1018 u_int nalloc;
999 char *shell, *format, *pidstr, *agentsocket = NULL; 1019 char *shell, *format, *pidstr, *agentsocket = NULL;
1000 fd_set *readsetp = NULL, *writesetp = NULL; 1020 fd_set *readsetp = NULL, *writesetp = NULL;
@@ -1007,6 +1027,7 @@ main(int ac, char **av)
1007 extern char *optarg; 1027 extern char *optarg;
1008 pid_t pid; 1028 pid_t pid;
1009 char pidstrbuf[1 + 3 * sizeof pid]; 1029 char pidstrbuf[1 + 3 * sizeof pid];
1030 struct timeval tv;
1010 1031
1011 /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ 1032 /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
1012 sanitise_stdfd(); 1033 sanitise_stdfd();
@@ -1067,20 +1088,24 @@ main(int ac, char **av)
1067 1088
1068 if (ac == 0 && !c_flag && !s_flag) { 1089 if (ac == 0 && !c_flag && !s_flag) {
1069 shell = getenv("SHELL"); 1090 shell = getenv("SHELL");
1070 if (shell != NULL && strncmp(shell + strlen(shell) - 3, "csh", 3) == 0) 1091 if (shell != NULL &&
1092 strncmp(shell + strlen(shell) - 3, "csh", 3) == 0)
1071 c_flag = 1; 1093 c_flag = 1;
1072 } 1094 }
1073 if (k_flag) { 1095 if (k_flag) {
1096 const char *errstr = NULL;
1097
1074 pidstr = getenv(SSH_AGENTPID_ENV_NAME); 1098 pidstr = getenv(SSH_AGENTPID_ENV_NAME);
1075 if (pidstr == NULL) { 1099 if (pidstr == NULL) {
1076 fprintf(stderr, "%s not set, cannot kill agent\n", 1100 fprintf(stderr, "%s not set, cannot kill agent\n",
1077 SSH_AGENTPID_ENV_NAME); 1101 SSH_AGENTPID_ENV_NAME);
1078 exit(1); 1102 exit(1);
1079 } 1103 }
1080 pid = atoi(pidstr); 1104 pid = (int)strtonum(pidstr, 2, INT_MAX, &errstr);
1081 if (pid < 1) { 1105 if (errstr) {
1082 fprintf(stderr, "%s=\"%s\", which is not a good PID\n", 1106 fprintf(stderr,
1083 SSH_AGENTPID_ENV_NAME, pidstr); 1107 "%s=\"%s\", which is not a good PID: %s\n",
1108 SSH_AGENTPID_ENV_NAME, pidstr, errstr);
1084 exit(1); 1109 exit(1);
1085 } 1110 }
1086 if (kill(pid, SIGTERM) == -1) { 1111 if (kill(pid, SIGTERM) == -1) {
@@ -1124,7 +1149,7 @@ main(int ac, char **av)
1124 sunaddr.sun_family = AF_UNIX; 1149 sunaddr.sun_family = AF_UNIX;
1125 strlcpy(sunaddr.sun_path, socket_name, sizeof(sunaddr.sun_path)); 1150 strlcpy(sunaddr.sun_path, socket_name, sizeof(sunaddr.sun_path));
1126 prev_mask = umask(0177); 1151 prev_mask = umask(0177);
1127 if (bind(sock, (struct sockaddr *) & sunaddr, sizeof(sunaddr)) < 0) { 1152 if (bind(sock, (struct sockaddr *) &sunaddr, sizeof(sunaddr)) < 0) {
1128 perror("bind"); 1153 perror("bind");
1129 *socket_name = '\0'; /* Don't unlink any existing file */ 1154 *socket_name = '\0'; /* Don't unlink any existing file */
1130 umask(prev_mask); 1155 umask(prev_mask);
@@ -1216,13 +1241,18 @@ skip:
1216 nalloc = 0; 1241 nalloc = 0;
1217 1242
1218 while (1) { 1243 while (1) {
1244 tv.tv_sec = 10;
1245 tv.tv_usec = 0;
1219 prepare_select(&readsetp, &writesetp, &max_fd, &nalloc); 1246 prepare_select(&readsetp, &writesetp, &max_fd, &nalloc);
1220 if (select(max_fd + 1, readsetp, writesetp, NULL, NULL) < 0) { 1247 result = select(max_fd + 1, readsetp, writesetp, NULL, &tv);
1221 if (errno == EINTR) 1248 saved_errno = errno;
1249 reaper(); /* remove expired keys */
1250 if (result < 0) {
1251 if (saved_errno == EINTR)
1222 continue; 1252 continue;
1223 fatal("select: %s", strerror(errno)); 1253 fatal("select: %s", strerror(saved_errno));
1224 } 1254 } else if (result > 0)
1225 after_select(readsetp, writesetp); 1255 after_select(readsetp, writesetp);
1226 } 1256 }
1227 /* NOTREACHED */ 1257 /* NOTREACHED */
1228} 1258}
diff --git a/ssh-dss.c b/ssh-dss.c
index 381b7dedb..51a06e98f 100644
--- a/ssh-dss.c
+++ b/ssh-dss.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: ssh-dss.c,v 1.24 2006/11/06 21:25:28 markus Exp $ */
1/* 2/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,14 +24,17 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: ssh-dss.c,v 1.19 2003/11/10 16:23:41 jakob Exp $"); 27
28#include <sys/types.h>
27 29
28#include <openssl/bn.h> 30#include <openssl/bn.h>
29#include <openssl/evp.h> 31#include <openssl/evp.h>
30 32
33#include <stdarg.h>
34#include <string.h>
35
31#include "xmalloc.h" 36#include "xmalloc.h"
32#include "buffer.h" 37#include "buffer.h"
33#include "bufaux.h"
34#include "compat.h" 38#include "compat.h"
35#include "log.h" 39#include "log.h"
36#include "key.h" 40#include "key.h"
@@ -157,8 +161,9 @@ ssh_dss_verify(const Key *key, const u_char *signature, u_int signaturelen,
157 fatal("ssh_dss_verify: BN_new failed"); 161 fatal("ssh_dss_verify: BN_new failed");
158 if ((sig->s = BN_new()) == NULL) 162 if ((sig->s = BN_new()) == NULL)
159 fatal("ssh_dss_verify: BN_new failed"); 163 fatal("ssh_dss_verify: BN_new failed");
160 BN_bin2bn(sigblob, INTBLOB_LEN, sig->r); 164 if ((BN_bin2bn(sigblob, INTBLOB_LEN, sig->r) == NULL) ||
161 BN_bin2bn(sigblob+ INTBLOB_LEN, INTBLOB_LEN, sig->s); 165 (BN_bin2bn(sigblob+ INTBLOB_LEN, INTBLOB_LEN, sig->s) == NULL))
166 fatal("ssh_dss_verify: BN_bin2bn failed");
162 167
163 /* clean up */ 168 /* clean up */
164 memset(sigblob, 0, len); 169 memset(sigblob, 0, len);
diff --git a/ssh-gss.h b/ssh-gss.h
index 213930103..ca8da70a2 100644
--- a/ssh-gss.h
+++ b/ssh-gss.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-gss.h,v 1.5 2004/06/21 17:36:31 avsm Exp $ */ 1/* $OpenBSD: ssh-gss.h,v 1.9 2006/08/18 14:40:34 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. 3 * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved.
4 * 4 *
@@ -28,8 +28,6 @@
28 28
29#ifdef GSSAPI 29#ifdef GSSAPI
30 30
31#include "buffer.h"
32
33#ifdef HAVE_GSSAPI_H 31#ifdef HAVE_GSSAPI_H
34#include <gssapi.h> 32#include <gssapi.h>
35#elif defined(HAVE_GSSAPI_GSSAPI_H) 33#elif defined(HAVE_GSSAPI_GSSAPI_H)
@@ -62,14 +60,15 @@
62 60
63#define SSH_GSS_OIDTYPE 0x06 61#define SSH_GSS_OIDTYPE 0x06
64 62
65#define SSH2_MSG_KEXGSS_INIT 30 63#define SSH2_MSG_KEXGSS_INIT 30
66#define SSH2_MSG_KEXGSS_CONTINUE 31 64#define SSH2_MSG_KEXGSS_CONTINUE 31
67#define SSH2_MSG_KEXGSS_COMPLETE 32 65#define SSH2_MSG_KEXGSS_COMPLETE 32
68#define SSH2_MSG_KEXGSS_HOSTKEY 33 66#define SSH2_MSG_KEXGSS_HOSTKEY 33
69#define SSH2_MSG_KEXGSS_ERROR 34 67#define SSH2_MSG_KEXGSS_ERROR 34
70#define SSH2_MSG_KEXGSS_GROUPREQ 40 68#define SSH2_MSG_KEXGSS_GROUPREQ 40
71#define SSH2_MSG_KEXGSS_GROUP 41 69#define SSH2_MSG_KEXGSS_GROUP 41
72#define KEX_GSS_GRP1_SHA1_ID "gss-group1-sha1-" 70#define KEX_GSS_GRP1_SHA1_ID "gss-group1-sha1-"
71#define KEX_GSS_GRP14_SHA1_ID "gss-group14-sha1-"
73#define KEX_GSS_GEX_SHA1_ID "gss-gex-sha1-" 72#define KEX_GSS_GEX_SHA1_ID "gss-gex-sha1-"
74 73
75typedef struct { 74typedef struct {
@@ -131,20 +130,21 @@ void ssh_gssapi_delete_ctx(Gssctxt **);
131OM_uint32 ssh_gssapi_sign(Gssctxt *, gss_buffer_t, gss_buffer_t); 130OM_uint32 ssh_gssapi_sign(Gssctxt *, gss_buffer_t, gss_buffer_t);
132OM_uint32 ssh_gssapi_server_ctx(Gssctxt **, gss_OID); 131OM_uint32 ssh_gssapi_server_ctx(Gssctxt **, gss_OID);
133void ssh_gssapi_buildmic(Buffer *, const char *, const char *, const char *); 132void ssh_gssapi_buildmic(Buffer *, const char *, const char *, const char *);
133int ssh_gssapi_check_mechanism(Gssctxt **, gss_OID, const char *);
134 134
135typedef int ssh_gssapi_check_fn(gss_OID, void *); 135/* In the server */
136typedef int ssh_gssapi_check_fn(Gssctxt **, gss_OID, const char *);
136char *ssh_gssapi_client_mechanisms(const char *host); 137char *ssh_gssapi_client_mechanisms(const char *host);
137char *ssh_gssapi_kex_mechs(gss_OID_set, ssh_gssapi_check_fn *, void *); 138char *ssh_gssapi_kex_mechs(gss_OID_set, ssh_gssapi_check_fn *, const char *);
138int ssh_gssapi_check_mechanism(gss_OID, void *); 139gss_OID ssh_gssapi_id_kex(Gssctxt *, char *, int);
139gss_OID ssh_gssapi_id_kex(Gssctxt *, char *, int *); 140int ssh_gssapi_server_check_mech(Gssctxt **,gss_OID, const char *);
140
141int ssh_gssapi_server_check_mech(gss_OID, void *);
142int ssh_gssapi_userok(char *name); 141int ssh_gssapi_userok(char *name);
143OM_uint32 ssh_gssapi_checkmic(Gssctxt *, gss_buffer_t, gss_buffer_t); 142OM_uint32 ssh_gssapi_checkmic(Gssctxt *, gss_buffer_t, gss_buffer_t);
144void ssh_gssapi_do_child(char ***, u_int *); 143void ssh_gssapi_do_child(char ***, u_int *);
145void ssh_gssapi_cleanup_creds(void); 144void ssh_gssapi_cleanup_creds(void);
146void ssh_gssapi_storecreds(void); 145void ssh_gssapi_storecreds(void);
147char * ssh_gssapi_server_mechanisms(void); 146
147char *ssh_gssapi_server_mechanisms(void);
148int ssh_gssapi_oid_table_ok(); 148int ssh_gssapi_oid_table_ok();
149#endif /* GSSAPI */ 149#endif /* GSSAPI */
150 150
diff --git a/ssh-keygen.0 b/ssh-keygen.0
index a972607b2..fe169d81c 100644
--- a/ssh-keygen.0
+++ b/ssh-keygen.0
@@ -93,7 +93,7 @@ DESCRIPTION
93 Download the RSA public key stored in the smartcard in reader. 93 Download the RSA public key stored in the smartcard in reader.
94 94
95 -e This option will read a private or public OpenSSH key file and 95 -e This option will read a private or public OpenSSH key file and
96 print the key in a `SECSH Public Key File Format' to stdout. 96 print the key in RFC 4716 SSH Public Key File Format to stdout.
97 This option allows exporting keys for use by several commercial 97 This option allows exporting keys for use by several commercial
98 SSH implementations. 98 SSH implementations.
99 99
@@ -124,9 +124,9 @@ DESCRIPTION
124 124
125 -i This option will read an unencrypted private (or public) key file 125 -i This option will read an unencrypted private (or public) key file
126 in SSH2-compatible format and print an OpenSSH compatible private 126 in SSH2-compatible format and print an OpenSSH compatible private
127 (or public) key to stdout. ssh-keygen also reads the `SECSH 127 (or public) key to stdout. ssh-keygen also reads the RFC 4716
128 Public Key File Format'. This option allows importing keys from 128 SSH Public Key File Format. This option allows importing keys
129 several commercial SSH implementations. 129 from several commercial SSH implementations.
130 130
131 -l Show fingerprint of specified public key file. Private RSA1 keys 131 -l Show fingerprint of specified public key file. Private RSA1 keys
132 are also supported. For RSA and DSA keys ssh-keygen tries to 132 are also supported. For RSA and DSA keys ssh-keygen tries to
@@ -275,8 +275,7 @@ FILES
275SEE ALSO 275SEE ALSO
276 ssh(1), ssh-add(1), ssh-agent(1), moduli(5), sshd(8) 276 ssh(1), ssh-add(1), ssh-agent(1), moduli(5), sshd(8)
277 277
278 J. Galbraith and R. Thayer, SECSH Public Key File Format, draft-ietf- 278 The Secure Shell (SSH) Public Key File Format, RFC 4716, 2006.
279 secsh-publickeyfile-01.txt, March 2001, work in progress material.
280 279
281AUTHORS 280AUTHORS
282 OpenSSH is a derivative of the original and free ssh 1.2.12 release by 281 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
@@ -285,4 +284,4 @@ AUTHORS
285 created OpenSSH. Markus Friedl contributed the support for SSH protocol 284 created OpenSSH. Markus Friedl contributed the support for SSH protocol
286 versions 1.5 and 2.0. 285 versions 1.5 and 2.0.
287 286
288OpenBSD 3.9 September 25, 1999 5 287OpenBSD 4.1 September 25, 1999 5
diff --git a/ssh-keygen.1 b/ssh-keygen.1
index ab16bcd77..5a8c8c471 100644
--- a/ssh-keygen.1
+++ b/ssh-keygen.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ssh-keygen.1,v 1.72 2005/11/28 05:16:53 dtucker Exp $ 1.\" $OpenBSD: ssh-keygen.1,v 1.74 2007/01/12 20:20:41 jmc Exp $
2.\" 2.\"
3.\" -*- nroff -*- 3.\" -*- nroff -*-
4.\" 4.\"
@@ -205,8 +205,8 @@ Download the RSA public key stored in the smartcard in
205.Ar reader . 205.Ar reader .
206.It Fl e 206.It Fl e
207This option will read a private or public OpenSSH key file and 207This option will read a private or public OpenSSH key file and
208print the key in a 208print the key in
209.Sq SECSH Public Key File Format 209RFC 4716 SSH Public Key File Format
210to stdout. 210to stdout.
211This option allows exporting keys for use by several commercial 211This option allows exporting keys for use by several commercial
212SSH implementations. 212SSH implementations.
@@ -253,7 +253,7 @@ in SSH2-compatible format and print an OpenSSH compatible private
253(or public) key to stdout. 253(or public) key to stdout.
254.Nm 254.Nm
255also reads the 255also reads the
256.Sq SECSH Public Key File Format . 256RFC 4716 SSH Public Key File Format.
257This option allows importing keys from several commercial 257This option allows importing keys from several commercial
258SSH implementations. 258SSH implementations.
259.It Fl l 259.It Fl l
@@ -450,12 +450,9 @@ The file format is described in
450.Xr moduli 5 , 450.Xr moduli 5 ,
451.Xr sshd 8 451.Xr sshd 8
452.Rs 452.Rs
453.%A J. Galbraith 453.%R RFC 4716
454.%A R. Thayer 454.%T "The Secure Shell (SSH) Public Key File Format"
455.%T "SECSH Public Key File Format" 455.%D 2006
456.%N draft-ietf-secsh-publickeyfile-01.txt
457.%D March 2001
458.%O work in progress material
459.Re 456.Re
460.Sh AUTHORS 457.Sh AUTHORS
461OpenSSH is a derivative of the original and free 458OpenSSH is a derivative of the original and free
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 64fadc7a1..04a9b939a 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: ssh-keygen.c,v 1.160 2007/01/21 01:41:54 stevesk Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -12,28 +13,44 @@
12 */ 13 */
13 14
14#include "includes.h" 15#include "includes.h"
15RCSID("$OpenBSD: ssh-keygen.c,v 1.135 2005/11/29 02:04:55 dtucker Exp $"); 16
17#include <sys/types.h>
18#include <sys/socket.h>
19#include <sys/stat.h>
20#include <sys/param.h>
16 21
17#include <openssl/evp.h> 22#include <openssl/evp.h>
18#include <openssl/pem.h> 23#include <openssl/pem.h>
19 24
25#include <errno.h>
26#include <fcntl.h>
27#include <netdb.h>
28#ifdef HAVE_PATHS_H
29# include <paths.h>
30#endif
31#include <pwd.h>
32#include <stdarg.h>
33#include <stdio.h>
34#include <stdlib.h>
35#include <string.h>
36#include <unistd.h>
37
20#include "xmalloc.h" 38#include "xmalloc.h"
21#include "key.h" 39#include "key.h"
22#include "rsa.h" 40#include "rsa.h"
23#include "authfile.h" 41#include "authfile.h"
24#include "uuencode.h" 42#include "uuencode.h"
25#include "buffer.h" 43#include "buffer.h"
26#include "bufaux.h"
27#include "pathnames.h" 44#include "pathnames.h"
28#include "log.h" 45#include "log.h"
29#include "misc.h" 46#include "misc.h"
30#include "match.h" 47#include "match.h"
31#include "hostfile.h" 48#include "hostfile.h"
49#include "dns.h"
32 50
33#ifdef SMARTCARD 51#ifdef SMARTCARD
34#include "scard.h" 52#include "scard.h"
35#endif 53#endif
36#include "dns.h"
37 54
38/* Number of bits in the RSA/DSA key. This value can be set on the command line. */ 55/* Number of bits in the RSA/DSA key. This value can be set on the command line. */
39#define DEFAULT_BITS 2048 56#define DEFAULT_BITS 2048
@@ -103,7 +120,7 @@ ask_filename(struct passwd *pw, const char *prompt)
103 120
104 if (key_type_name == NULL) 121 if (key_type_name == NULL)
105 name = _PATH_SSH_CLIENT_ID_RSA; 122 name = _PATH_SSH_CLIENT_ID_RSA;
106 else 123 else {
107 switch (key_type_from_name(key_type_name)) { 124 switch (key_type_from_name(key_type_name)) {
108 case KEY_RSA1: 125 case KEY_RSA1:
109 name = _PATH_SSH_CLIENT_IDENTITY; 126 name = _PATH_SSH_CLIENT_IDENTITY;
@@ -119,7 +136,7 @@ ask_filename(struct passwd *pw, const char *prompt)
119 exit(1); 136 exit(1);
120 break; 137 break;
121 } 138 }
122 139 }
123 snprintf(identity_file, sizeof(identity_file), "%s/%s", pw->pw_dir, name); 140 snprintf(identity_file, sizeof(identity_file), "%s/%s", pw->pw_dir, name);
124 fprintf(stderr, "%s (%s): ", prompt, identity_file); 141 fprintf(stderr, "%s (%s): ", prompt, identity_file);
125 if (fgets(buf, sizeof(buf), stdin) == NULL) 142 if (fgets(buf, sizeof(buf), stdin) == NULL)
@@ -205,7 +222,8 @@ buffer_get_bignum_bits(Buffer *b, BIGNUM *value)
205 if (buffer_len(b) < bytes) 222 if (buffer_len(b) < bytes)
206 fatal("buffer_get_bignum_bits: input buffer too small: " 223 fatal("buffer_get_bignum_bits: input buffer too small: "
207 "need %d have %d", bytes, buffer_len(b)); 224 "need %d have %d", bytes, buffer_len(b));
208 BN_bin2bn(buffer_ptr(b), bytes, value); 225 if (BN_bin2bn(buffer_ptr(b), bytes, value) == NULL)
226 fatal("buffer_get_bignum_bits: BN_bin2bn failed");
209 buffer_consume(b, bytes); 227 buffer_consume(b, bytes);
210} 228}
211 229
@@ -223,7 +241,7 @@ do_convert_private_ssh2_from_blob(u_char *blob, u_int blen)
223 buffer_init(&b); 241 buffer_init(&b);
224 buffer_append(&b, blob, blen); 242 buffer_append(&b, blob, blen);
225 243
226 magic = buffer_get_int(&b); 244 magic = buffer_get_int(&b);
227 if (magic != SSH_COM_PRIVATE_KEY_MAGIC) { 245 if (magic != SSH_COM_PRIVATE_KEY_MAGIC) {
228 error("bad magic 0x%x != 0x%x", magic, SSH_COM_PRIVATE_KEY_MAGIC); 246 error("bad magic 0x%x != 0x%x", magic, SSH_COM_PRIVATE_KEY_MAGIC);
229 buffer_free(&b); 247 buffer_free(&b);
@@ -235,7 +253,7 @@ do_convert_private_ssh2_from_blob(u_char *blob, u_int blen)
235 i2 = buffer_get_int(&b); 253 i2 = buffer_get_int(&b);
236 i3 = buffer_get_int(&b); 254 i3 = buffer_get_int(&b);
237 i4 = buffer_get_int(&b); 255 i4 = buffer_get_int(&b);
238 debug("ignore (%d %d %d %d)", i1,i2,i3,i4); 256 debug("ignore (%d %d %d %d)", i1, i2, i3, i4);
239 if (strcmp(cipher, "none") != 0) { 257 if (strcmp(cipher, "none") != 0) {
240 error("unsupported cipher %s", cipher); 258 error("unsupported cipher %s", cipher);
241 xfree(cipher); 259 xfree(cipher);
@@ -266,7 +284,7 @@ do_convert_private_ssh2_from_blob(u_char *blob, u_int blen)
266 buffer_get_bignum_bits(&b, key->dsa->priv_key); 284 buffer_get_bignum_bits(&b, key->dsa->priv_key);
267 break; 285 break;
268 case KEY_RSA: 286 case KEY_RSA:
269 e = buffer_get_char(&b); 287 e = buffer_get_char(&b);
270 debug("e %lx", e); 288 debug("e %lx", e);
271 if (e < 30) { 289 if (e < 30) {
272 e <<= 8; 290 e <<= 8;
@@ -302,13 +320,43 @@ do_convert_private_ssh2_from_blob(u_char *blob, u_int blen)
302 return key; 320 return key;
303} 321}
304 322
323static int
324get_line(FILE *fp, char *line, size_t len)
325{
326 int c;
327 size_t pos = 0;
328
329 line[0] = '\0';
330 while ((c = fgetc(fp)) != EOF) {
331 if (pos >= len - 1) {
332 fprintf(stderr, "input line too long.\n");
333 exit(1);
334 }
335 switch (c) {
336 case '\r':
337 c = fgetc(fp);
338 if (c != EOF && c != '\n' && ungetc(c, fp) == EOF) {
339 fprintf(stderr, "unget: %s\n", strerror(errno));
340 exit(1);
341 }
342 return pos;
343 case '\n':
344 return pos;
345 }
346 line[pos++] = c;
347 line[pos] = '\0';
348 }
349 /* We reached EOF */
350 return -1;
351}
352
305static void 353static void
306do_convert_from_ssh2(struct passwd *pw) 354do_convert_from_ssh2(struct passwd *pw)
307{ 355{
308 Key *k; 356 Key *k;
309 int blen; 357 int blen;
310 u_int len; 358 u_int len;
311 char line[1024], *p; 359 char line[1024];
312 u_char blob[8096]; 360 u_char blob[8096];
313 char encoded[8096]; 361 char encoded[8096];
314 struct stat st; 362 struct stat st;
@@ -327,12 +375,8 @@ do_convert_from_ssh2(struct passwd *pw)
327 exit(1); 375 exit(1);
328 } 376 }
329 encoded[0] = '\0'; 377 encoded[0] = '\0';
330 while (fgets(line, sizeof(line), fp)) { 378 while ((blen = get_line(fp, line, sizeof(line))) != -1) {
331 if (!(p = strchr(line, '\n'))) { 379 if (line[blen - 1] == '\\')
332 fprintf(stderr, "input line too long.\n");
333 exit(1);
334 }
335 if (p > line && p[-1] == '\\')
336 escaped++; 380 escaped++;
337 if (strncmp(line, "----", 4) == 0 || 381 if (strncmp(line, "----", 4) == 0 ||
338 strstr(line, ": ") != NULL) { 382 strstr(line, ": ") != NULL) {
@@ -349,7 +393,6 @@ do_convert_from_ssh2(struct passwd *pw)
349 /* fprintf(stderr, "escaped: %s", line); */ 393 /* fprintf(stderr, "escaped: %s", line); */
350 continue; 394 continue;
351 } 395 }
352 *p = '\0';
353 strlcat(encoded, line, sizeof(encoded)); 396 strlcat(encoded, line, sizeof(encoded));
354 } 397 }
355 len = strlen(encoded); 398 len = strlen(encoded);
@@ -485,8 +528,10 @@ do_fingerprint(struct passwd *pw)
485 xfree(fp); 528 xfree(fp);
486 exit(0); 529 exit(0);
487 } 530 }
488 if (comment) 531 if (comment) {
489 xfree(comment); 532 xfree(comment);
533 comment = NULL;
534 }
490 535
491 f = fopen(identity_file, "r"); 536 f = fopen(identity_file, "r");
492 if (f != NULL) { 537 if (f != NULL) {
@@ -508,7 +553,7 @@ do_fingerprint(struct passwd *pw)
508 for (cp = line; *cp == ' ' || *cp == '\t'; cp++) 553 for (cp = line; *cp == ' ' || *cp == '\t'; cp++)
509 ; 554 ;
510 if (!*cp || *cp == '\n' || *cp == '#') 555 if (!*cp || *cp == '\n' || *cp == '#')
511 continue ; 556 continue;
512 i = strtol(cp, &ep, 10); 557 i = strtol(cp, &ep, 10);
513 if (i == 0 || ep == NULL || (*ep != ' ' && *ep != '\t')) { 558 if (i == 0 || ep == NULL || (*ep != ' ' && *ep != '\t')) {
514 int quoted = 0; 559 int quoted = 0;
@@ -832,30 +877,32 @@ do_change_passphrase(struct passwd *pw)
832/* 877/*
833 * Print the SSHFP RR. 878 * Print the SSHFP RR.
834 */ 879 */
835static void 880static int
836do_print_resource_record(struct passwd *pw, char *hname) 881do_print_resource_record(struct passwd *pw, char *fname, char *hname)
837{ 882{
838 Key *public; 883 Key *public;
839 char *comment = NULL; 884 char *comment = NULL;
840 struct stat st; 885 struct stat st;
841 886
842 if (!have_identity) 887 if (fname == NULL)
843 ask_filename(pw, "Enter file in which the key is"); 888 ask_filename(pw, "Enter file in which the key is");
844 if (stat(identity_file, &st) < 0) { 889 if (stat(fname, &st) < 0) {
845 perror(identity_file); 890 if (errno == ENOENT)
891 return 0;
892 perror(fname);
846 exit(1); 893 exit(1);
847 } 894 }
848 public = key_load_public(identity_file, &comment); 895 public = key_load_public(fname, &comment);
849 if (public != NULL) { 896 if (public != NULL) {
850 export_dns_rr(hname, public, stdout, print_generic); 897 export_dns_rr(hname, public, stdout, print_generic);
851 key_free(public); 898 key_free(public);
852 xfree(comment); 899 xfree(comment);
853 exit(0); 900 return 1;
854 } 901 }
855 if (comment) 902 if (comment)
856 xfree(comment); 903 xfree(comment);
857 904
858 printf("failed to read v2 public key from %s.\n", identity_file); 905 printf("failed to read v2 public key from %s.\n", fname);
859 exit(1); 906 exit(1);
860} 907}
861 908
@@ -969,13 +1016,13 @@ usage(void)
969#ifdef SMARTCARD 1016#ifdef SMARTCARD
970 fprintf(stderr, " -D reader Download public key from smartcard.\n"); 1017 fprintf(stderr, " -D reader Download public key from smartcard.\n");
971#endif /* SMARTCARD */ 1018#endif /* SMARTCARD */
972 fprintf(stderr, " -e Convert OpenSSH to IETF SECSH key file.\n"); 1019 fprintf(stderr, " -e Convert OpenSSH to RFC 4716 key file.\n");
973 fprintf(stderr, " -F hostname Find hostname in known hosts file.\n"); 1020 fprintf(stderr, " -F hostname Find hostname in known hosts file.\n");
974 fprintf(stderr, " -f filename Filename of the key file.\n"); 1021 fprintf(stderr, " -f filename Filename of the key file.\n");
975 fprintf(stderr, " -G file Generate candidates for DH-GEX moduli.\n"); 1022 fprintf(stderr, " -G file Generate candidates for DH-GEX moduli.\n");
976 fprintf(stderr, " -g Use generic DNS resource record format.\n"); 1023 fprintf(stderr, " -g Use generic DNS resource record format.\n");
977 fprintf(stderr, " -H Hash names in known_hosts file.\n"); 1024 fprintf(stderr, " -H Hash names in known_hosts file.\n");
978 fprintf(stderr, " -i Convert IETF SECSH to OpenSSH key file.\n"); 1025 fprintf(stderr, " -i Convert RFC 4716 to OpenSSH key file.\n");
979 fprintf(stderr, " -l Show fingerprint of key file.\n"); 1026 fprintf(stderr, " -l Show fingerprint of key file.\n");
980 fprintf(stderr, " -M memory Amount of memory (MB) to use for generating DH-GEX moduli.\n"); 1027 fprintf(stderr, " -M memory Amount of memory (MB) to use for generating DH-GEX moduli.\n");
981 fprintf(stderr, " -N phrase Provide new passphrase.\n"); 1028 fprintf(stderr, " -N phrase Provide new passphrase.\n");
@@ -1001,7 +1048,7 @@ usage(void)
1001 * Main program for key management. 1048 * Main program for key management.
1002 */ 1049 */
1003int 1050int
1004main(int ac, char **av) 1051main(int argc, char **argv)
1005{ 1052{
1006 char dotsshdir[MAXPATHLEN], comment[1024], *passphrase1, *passphrase2; 1053 char dotsshdir[MAXPATHLEN], comment[1024], *passphrase1, *passphrase2;
1007 char out_file[MAXPATHLEN], *reader_id = NULL; 1054 char out_file[MAXPATHLEN], *reader_id = NULL;
@@ -1023,10 +1070,10 @@ main(int ac, char **av)
1023 /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ 1070 /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
1024 sanitise_stdfd(); 1071 sanitise_stdfd();
1025 1072
1026 __progname = ssh_get_progname(av[0]); 1073 __progname = ssh_get_progname(argv[0]);
1027 1074
1028 SSLeay_add_all_algorithms(); 1075 SSLeay_add_all_algorithms();
1029 log_init(av[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1); 1076 log_init(argv[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1);
1030 1077
1031 init_rng(); 1078 init_rng();
1032 seed_rng(); 1079 seed_rng();
@@ -1042,11 +1089,11 @@ main(int ac, char **av)
1042 exit(1); 1089 exit(1);
1043 } 1090 }
1044 1091
1045 while ((opt = getopt(ac, av, 1092 while ((opt = getopt(argc, argv,
1046 "degiqpclBHvxXyF:b:f:t:U:D:P:N:C:r:g:R:T:G:M:S:a:W:")) != -1) { 1093 "degiqpclBHvxXyF:b:f:t:U:D:P:N:C:r:g:R:T:G:M:S:a:W:")) != -1) {
1047 switch (opt) { 1094 switch (opt) {
1048 case 'b': 1095 case 'b':
1049 bits = strtonum(optarg, 768, 32768, &errstr); 1096 bits = (u_int32_t)strtonum(optarg, 768, 32768, &errstr);
1050 if (errstr) 1097 if (errstr)
1051 fatal("Bits has bad value %s (%s)", 1098 fatal("Bits has bad value %s (%s)",
1052 optarg, errstr); 1099 optarg, errstr);
@@ -1116,6 +1163,7 @@ main(int ac, char **av)
1116 break; 1163 break;
1117 case 'D': 1164 case 'D':
1118 download = 1; 1165 download = 1;
1166 /*FALLTHROUGH*/
1119 case 'U': 1167 case 'U':
1120 reader_id = optarg; 1168 reader_id = optarg;
1121 break; 1169 break;
@@ -1132,19 +1180,20 @@ main(int ac, char **av)
1132 rr_hostname = optarg; 1180 rr_hostname = optarg;
1133 break; 1181 break;
1134 case 'W': 1182 case 'W':
1135 generator_wanted = strtonum(optarg, 1, UINT_MAX, &errstr); 1183 generator_wanted = (u_int32_t)strtonum(optarg, 1,
1184 UINT_MAX, &errstr);
1136 if (errstr) 1185 if (errstr)
1137 fatal("Desired generator has bad value: %s (%s)", 1186 fatal("Desired generator has bad value: %s (%s)",
1138 optarg, errstr); 1187 optarg, errstr);
1139 break; 1188 break;
1140 case 'a': 1189 case 'a':
1141 trials = strtonum(optarg, 1, UINT_MAX, &errstr); 1190 trials = (u_int32_t)strtonum(optarg, 1, UINT_MAX, &errstr);
1142 if (errstr) 1191 if (errstr)
1143 fatal("Invalid number of trials: %s (%s)", 1192 fatal("Invalid number of trials: %s (%s)",
1144 optarg, errstr); 1193 optarg, errstr);
1145 break; 1194 break;
1146 case 'M': 1195 case 'M':
1147 memory = strtonum(optarg, 1, UINT_MAX, &errstr); 1196 memory = (u_int32_t)strtonum(optarg, 1, UINT_MAX, &errstr);
1148 if (errstr) { 1197 if (errstr) {
1149 fatal("Memory limit is %s: %s", errstr, optarg); 1198 fatal("Memory limit is %s: %s", errstr, optarg);
1150 } 1199 }
@@ -1173,9 +1222,9 @@ main(int ac, char **av)
1173 } 1222 }
1174 1223
1175 /* reinit */ 1224 /* reinit */
1176 log_init(av[0], log_level, SYSLOG_FACILITY_USER, 1); 1225 log_init(argv[0], log_level, SYSLOG_FACILITY_USER, 1);
1177 1226
1178 if (optind < ac) { 1227 if (optind < argc) {
1179 printf("Too many arguments.\n"); 1228 printf("Too many arguments.\n");
1180 usage(); 1229 usage();
1181 } 1230 }
@@ -1198,7 +1247,27 @@ main(int ac, char **av)
1198 if (print_public) 1247 if (print_public)
1199 do_print_public(pw); 1248 do_print_public(pw);
1200 if (rr_hostname != NULL) { 1249 if (rr_hostname != NULL) {
1201 do_print_resource_record(pw, rr_hostname); 1250 unsigned int n = 0;
1251
1252 if (have_identity) {
1253 n = do_print_resource_record(pw,
1254 identity_file, rr_hostname);
1255 if (n == 0) {
1256 perror(identity_file);
1257 exit(1);
1258 }
1259 exit(0);
1260 } else {
1261
1262 n += do_print_resource_record(pw,
1263 _PATH_HOST_RSA_KEY_FILE, rr_hostname);
1264 n += do_print_resource_record(pw,
1265 _PATH_HOST_DSA_KEY_FILE, rr_hostname);
1266
1267 if (n == 0)
1268 fatal("no keys found.");
1269 exit(0);
1270 }
1202 } 1271 }
1203 if (reader_id != NULL) { 1272 if (reader_id != NULL) {
1204#ifdef SMARTCARD 1273#ifdef SMARTCARD
diff --git a/ssh-keyscan.0 b/ssh-keyscan.0
index 0206c04fb..f655abd47 100644
--- a/ssh-keyscan.0
+++ b/ssh-keyscan.0
@@ -56,7 +56,7 @@ DESCRIPTION
56 about its progress. 56 about its progress.
57 57
58SECURITY 58SECURITY
59 If a ssh_known_hosts file is constructed using ssh-keyscan without veri- 59 If an ssh_known_hosts file is constructed using ssh-keyscan without veri-
60 fying the keys, users will be vulnerable to man in the middle attacks. 60 fying the keys, users will be vulnerable to man in the middle attacks.
61 On the other hand, if the security model allows such a risk, ssh-keyscan 61 On the other hand, if the security model allows such a risk, ssh-keyscan
62 can help in the detection of tampered keyfiles or man in the middle at- 62 can help in the detection of tampered keyfiles or man in the middle at-
@@ -104,4 +104,4 @@ BUGS
104 This is because it opens a connection to the ssh port, reads the public 104 This is because it opens a connection to the ssh port, reads the public
105 key, and drops the connection as soon as it gets the key. 105 key, and drops the connection as soon as it gets the key.
106 106
107OpenBSD 3.9 January 1, 1996 2 107OpenBSD 4.1 January 1, 1996 2
diff --git a/ssh-keyscan.1 b/ssh-keyscan.1
index 80fc8cd96..a3656fc77 100644
--- a/ssh-keyscan.1
+++ b/ssh-keyscan.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ssh-keyscan.1,v 1.21 2005/09/30 20:34:26 jaredy Exp $ 1.\" $OpenBSD: ssh-keyscan.1,v 1.22 2006/09/25 04:55:38 ray 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.\"
@@ -102,7 +102,7 @@ Causes
102to print debugging messages about its progress. 102to print debugging messages about its progress.
103.El 103.El
104.Sh SECURITY 104.Sh SECURITY
105If a ssh_known_hosts file is constructed using 105If an ssh_known_hosts file is constructed using
106.Nm 106.Nm
107without verifying the keys, users will be vulnerable to 107without verifying the keys, users will be vulnerable to
108.Em man in the middle 108.Em man in the middle
diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index 6915102dd..b19864007 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: ssh-keyscan.c,v 1.74 2006/10/06 02:29:19 djm Exp $ */
1/* 2/*
2 * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>. 3 * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>.
3 * 4 *
@@ -7,24 +8,39 @@
7 */ 8 */
8 9
9#include "includes.h" 10#include "includes.h"
10RCSID("$OpenBSD: ssh-keyscan.c,v 1.57 2005/10/30 04:01:03 djm Exp $"); 11
11
12#include "openbsd-compat/sys-queue.h" 12#include "openbsd-compat/sys-queue.h"
13#include <sys/resource.h>
14#ifdef HAVE_SYS_TIME_H
15# include <sys/time.h>
16#endif
17
18#include <netinet/in.h>
19#include <arpa/inet.h>
13 20
14#include <openssl/bn.h> 21#include <openssl/bn.h>
15 22
23#include <netdb.h>
24#include <errno.h>
16#include <setjmp.h> 25#include <setjmp.h>
26#include <stdarg.h>
27#include <stdio.h>
28#include <stdlib.h>
29#include <signal.h>
30#include <string.h>
31#include <unistd.h>
32
17#include "xmalloc.h" 33#include "xmalloc.h"
18#include "ssh.h" 34#include "ssh.h"
19#include "ssh1.h" 35#include "ssh1.h"
36#include "buffer.h"
20#include "key.h" 37#include "key.h"
38#include "cipher.h"
21#include "kex.h" 39#include "kex.h"
22#include "compat.h" 40#include "compat.h"
23#include "myproposal.h" 41#include "myproposal.h"
24#include "packet.h" 42#include "packet.h"
25#include "dispatch.h" 43#include "dispatch.h"
26#include "buffer.h"
27#include "bufaux.h"
28#include "log.h" 44#include "log.h"
29#include "atomicio.h" 45#include "atomicio.h"
30#include "misc.h" 46#include "misc.h"
@@ -54,7 +70,7 @@ int maxfd;
54 70
55extern char *__progname; 71extern char *__progname;
56fd_set *read_wait; 72fd_set *read_wait;
57size_t read_wait_size; 73size_t read_wait_nfdset;
58int ncon; 74int ncon;
59int nonfatal_fatal = 0; 75int nonfatal_fatal = 0;
60jmp_buf kexjmp; 76jmp_buf kexjmp;
@@ -128,7 +144,7 @@ Linebuf_alloc(const char *filename, void (*errfun) (const char *,...))
128 lb->stream = stdin; 144 lb->stream = stdin;
129 } 145 }
130 146
131 if (!(lb->buf = malloc(lb->size = LINEBUF_SIZE))) { 147 if (!(lb->buf = malloc((lb->size = LINEBUF_SIZE)))) {
132 if (errfun) 148 if (errfun)
133 (*errfun) ("linebuf (%s): malloc failed\n", lb->filename); 149 (*errfun) ("linebuf (%s): malloc failed\n", lb->filename);
134 xfree(lb); 150 xfree(lb);
@@ -350,6 +366,7 @@ keygrab_ssh2(con *c)
350 c->c_kex->kex[KEX_DH_GRP1_SHA1] = kexdh_client; 366 c->c_kex->kex[KEX_DH_GRP1_SHA1] = kexdh_client;
351 c->c_kex->kex[KEX_DH_GRP14_SHA1] = kexdh_client; 367 c->c_kex->kex[KEX_DH_GRP14_SHA1] = kexdh_client;
352 c->c_kex->kex[KEX_DH_GEX_SHA1] = kexgex_client; 368 c->c_kex->kex[KEX_DH_GEX_SHA1] = kexgex_client;
369 c->c_kex->kex[KEX_DH_GEX_SHA256] = kexgex_client;
353 c->c_kex->verify_host_key = hostjump; 370 c->c_kex->verify_host_key = hostjump;
354 371
355 if (!(j = setjmp(kexjmp))) { 372 if (!(j = setjmp(kexjmp))) {
@@ -602,7 +619,6 @@ conread(int s)
602 keyprint(c, keygrab_ssh1(c)); 619 keyprint(c, keygrab_ssh1(c));
603 confree(s); 620 confree(s);
604 return; 621 return;
605 break;
606 default: 622 default:
607 fatal("conread: invalid status %d", c->c_status); 623 fatal("conread: invalid status %d", c->c_status);
608 break; 624 break;
@@ -634,10 +650,10 @@ conloop(void)
634 } else 650 } else
635 seltime.tv_sec = seltime.tv_usec = 0; 651 seltime.tv_sec = seltime.tv_usec = 0;
636 652
637 r = xmalloc(read_wait_size); 653 r = xcalloc(read_wait_nfdset, sizeof(fd_mask));
638 memcpy(r, read_wait, read_wait_size); 654 e = xcalloc(read_wait_nfdset, sizeof(fd_mask));
639 e = xmalloc(read_wait_size); 655 memcpy(r, read_wait, read_wait_nfdset * sizeof(fd_mask));
640 memcpy(e, read_wait, read_wait_size); 656 memcpy(e, read_wait, read_wait_nfdset * sizeof(fd_mask));
641 657
642 while (select(maxfd, r, NULL, e, &seltime) == -1 && 658 while (select(maxfd, r, NULL, e, &seltime) == -1 &&
643 (errno == EAGAIN || errno == EINTR)) 659 (errno == EAGAIN || errno == EINTR))
@@ -804,12 +820,10 @@ main(int argc, char **argv)
804 fatal("%s: not enough file descriptors", __progname); 820 fatal("%s: not enough file descriptors", __progname);
805 if (maxfd > fdlim_get(0)) 821 if (maxfd > fdlim_get(0))
806 fdlim_set(maxfd); 822 fdlim_set(maxfd);
807 fdcon = xmalloc(maxfd * sizeof(con)); 823 fdcon = xcalloc(maxfd, sizeof(con));
808 memset(fdcon, 0, maxfd * sizeof(con));
809 824
810 read_wait_size = howmany(maxfd, NFDBITS) * sizeof(fd_mask); 825 read_wait_nfdset = howmany(maxfd, NFDBITS);
811 read_wait = xmalloc(read_wait_size); 826 read_wait = xcalloc(read_wait_nfdset, sizeof(fd_mask));
812 memset(read_wait, 0, read_wait_size);
813 827
814 if (fopt_count) { 828 if (fopt_count) {
815 Linebuf *lb; 829 Linebuf *lb;
diff --git a/ssh-keysign.0 b/ssh-keysign.0
index c32c42fb2..d509f5ef0 100644
--- a/ssh-keysign.0
+++ b/ssh-keysign.0
@@ -1,14 +1,14 @@
1SSH-KEYSIGN(8) OpenBSD System Manager's Manual SSH-KEYSIGN(8) 1SSH-KEYSIGN(8) OpenBSD System Manager's Manual SSH-KEYSIGN(8)
2 2
3NAME 3NAME
4 ssh-keysign - ssh helper program for hostbased authentication 4 ssh-keysign - ssh helper program for host-based authentication
5 5
6SYNOPSIS 6SYNOPSIS
7 ssh-keysign 7 ssh-keysign
8 8
9DESCRIPTION 9DESCRIPTION
10 ssh-keysign is used by ssh(1) to access the local host keys and generate 10 ssh-keysign is used by ssh(1) to access the local host keys and generate
11 the digital signature required during hostbased authentication with SSH 11 the digital signature required during host-based authentication with SSH
12 protocol version 2. 12 protocol version 2.
13 13
14 ssh-keysign is disabled by default and can only be enabled in the global 14 ssh-keysign is disabled by default and can only be enabled in the global
@@ -16,7 +16,7 @@ DESCRIPTION
16 to ``yes''. 16 to ``yes''.
17 17
18 ssh-keysign is not intended to be invoked by the user, but from ssh(1). 18 ssh-keysign is not intended to be invoked by the user, but from ssh(1).
19 See ssh(1) and sshd(8) for more information about hostbased authentica- 19 See ssh(1) and sshd(8) for more information about host-based authentica-
20 tion. 20 tion.
21 21
22FILES 22FILES
@@ -28,7 +28,7 @@ FILES
28 generate the digital signature. They should be owned by root, 28 generate the digital signature. They should be owned by root,
29 readable only by root, and not accessible to others. Since they 29 readable only by root, and not accessible to others. Since they
30 are readable only by root, ssh-keysign must be set-uid root if 30 are readable only by root, ssh-keysign must be set-uid root if
31 hostbased authentication is used. 31 host-based authentication is used.
32 32
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)
@@ -39,4 +39,4 @@ HISTORY
39AUTHORS 39AUTHORS
40 Markus Friedl <markus@openbsd.org> 40 Markus Friedl <markus@openbsd.org>
41 41
42OpenBSD 3.9 May 24, 2002 1 42OpenBSD 4.1 May 24, 2002 1
diff --git a/ssh-keysign.8 b/ssh-keysign.8
index a17e8d5cf..4cdcb7a43 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.8 2006/02/24 20:22:16 jmc Exp $
2.\" 2.\"
3.\" Copyright (c) 2002 Markus Friedl. All rights reserved. 3.\" Copyright (c) 2002 Markus Friedl. All rights reserved.
4.\" 4.\"
@@ -27,7 +27,7 @@
27.Os 27.Os
28.Sh NAME 28.Sh NAME
29.Nm ssh-keysign 29.Nm ssh-keysign
30.Nd ssh helper program for hostbased authentication 30.Nd ssh helper program for host-based authentication
31.Sh SYNOPSIS 31.Sh SYNOPSIS
32.Nm 32.Nm
33.Sh DESCRIPTION 33.Sh DESCRIPTION
@@ -35,7 +35,7 @@
35is used by 35is used by
36.Xr ssh 1 36.Xr ssh 1
37to access the local host keys and generate the digital signature 37to access the local host keys and generate the digital signature
38required during hostbased authentication with SSH protocol version 2. 38required during host-based authentication with SSH protocol version 2.
39.Pp 39.Pp
40.Nm 40.Nm
41is disabled by default and can only be enabled in the 41is disabled by default and can only be enabled in the
@@ -53,7 +53,7 @@ See
53.Xr ssh 1 53.Xr ssh 1
54and 54and
55.Xr sshd 8 55.Xr sshd 8
56for more information about hostbased authentication. 56for more information about host-based authentication.
57.Sh FILES 57.Sh FILES
58.Bl -tag -width Ds 58.Bl -tag -width Ds
59.It Pa /etc/ssh/ssh_config 59.It Pa /etc/ssh/ssh_config
@@ -67,7 +67,7 @@ They should be owned by root, readable only by root, and not
67accessible to others. 67accessible to others.
68Since they are readable only by root, 68Since they are readable only by root,
69.Nm 69.Nm
70must be set-uid root if hostbased authentication is used. 70must be set-uid root if host-based authentication is used.
71.El 71.El
72.Sh SEE ALSO 72.Sh SEE ALSO
73.Xr ssh 1 , 73.Xr ssh 1 ,
diff --git a/ssh-keysign.c b/ssh-keysign.c
index dae3a2e8c..c4bc7e56e 100644
--- a/ssh-keysign.c
+++ b/ssh-keysign.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: ssh-keysign.c,v 1.29 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2002 Markus Friedl. All rights reserved. 3 * Copyright (c) 2002 Markus Friedl. All rights reserved.
3 * 4 *
@@ -21,21 +22,30 @@
21 * (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
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 */
25
24#include "includes.h" 26#include "includes.h"
25RCSID("$OpenBSD: ssh-keysign.c,v 1.19 2005/09/13 23:40:07 djm Exp $"); 27
28#include <fcntl.h>
29#ifdef HAVE_PATHS_H
30#include <paths.h>
31#endif
32#include <pwd.h>
33#include <stdarg.h>
34#include <stdlib.h>
35#include <string.h>
36#include <unistd.h>
26 37
27#include <openssl/evp.h> 38#include <openssl/evp.h>
28#include <openssl/rand.h> 39#include <openssl/rand.h>
29#include <openssl/rsa.h> 40#include <openssl/rsa.h>
30 41
42#include "xmalloc.h"
31#include "log.h" 43#include "log.h"
32#include "key.h" 44#include "key.h"
33#include "ssh.h" 45#include "ssh.h"
34#include "ssh2.h" 46#include "ssh2.h"
35#include "misc.h" 47#include "misc.h"
36#include "xmalloc.h"
37#include "buffer.h" 48#include "buffer.h"
38#include "bufaux.h"
39#include "authfile.h" 49#include "authfile.h"
40#include "msg.h" 50#include "msg.h"
41#include "canohost.h" 51#include "canohost.h"
@@ -64,9 +74,9 @@ valid_request(struct passwd *pw, char *host, Key **ret, u_char *data,
64 buffer_init(&b); 74 buffer_init(&b);
65 buffer_append(&b, data, datalen); 75 buffer_append(&b, data, datalen);
66 76
67 /* session id, currently limited to SHA1 (20 bytes) */ 77 /* session id, currently limited to SHA1 (20 bytes) or SHA256 (32) */
68 p = buffer_get_string(&b, &len); 78 p = buffer_get_string(&b, &len);
69 if (len != 20) 79 if (len != 20 && len != 32)
70 fail++; 80 fail++;
71 xfree(p); 81 xfree(p);
72 82
@@ -140,7 +150,7 @@ main(int argc, char **argv)
140{ 150{
141 Buffer b; 151 Buffer b;
142 Options options; 152 Options options;
143 Key *keys[2], *key; 153 Key *keys[2], *key = NULL;
144 struct passwd *pw; 154 struct passwd *pw;
145 int key_fd[2], i, found, version = 2, fd; 155 int key_fd[2], i, found, version = 2, fd;
146 u_char *signature, *data; 156 u_char *signature, *data;
diff --git a/ssh-rand-helper.0 b/ssh-rand-helper.0
index 75ad52fa4..429582b78 100644
--- a/ssh-rand-helper.0
+++ b/ssh-rand-helper.0
@@ -1,7 +1,7 @@
1SSH-RAND-HELPER(8) OpenBSD System Manager's Manual SSH-RAND-HELPER(8) 1SSH-RAND-HELPER(8) OpenBSD System Manager's 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
5 5
6SYNOPSIS 6SYNOPSIS
7 ssh-rand-hlper [-vxXh] [-b bytes] 7 ssh-rand-hlper [-vxXh] [-b bytes]
@@ -38,7 +38,9 @@ DESCRIPTION
38 -X Force output of a binary seed, even if standard output is a tty 38 -X Force output of a binary seed, even if standard output is a tty
39 39
40 -v Turn on debugging message. Multiple -v options will increase the 40 -v Turn on debugging message. Multiple -v options will increase the
41 debugging level. -h Display a summary of options. 41 debugging level.
42
43 -h Display a summary of options.
42 44
43AUTHORS 45AUTHORS
44 Damien Miller <djm@mindrot.org> 46 Damien Miller <djm@mindrot.org>
@@ -46,4 +48,4 @@ AUTHORS
46SEE ALSO 48SEE ALSO
47 ssh(1), ssh-add(1), ssh-keygen(1), sshd(8) 49 ssh(1), ssh-add(1), ssh-keygen(1), sshd(8)
48 50
49OpenBSD 3.9 April 14, 2002 1 51OpenBSD 4.1 April 14, 2002 1
diff --git a/ssh-rand-helper.8 b/ssh-rand-helper.8
index df559d332..af5a72fcb 100644
--- a/ssh-rand-helper.8
+++ b/ssh-rand-helper.8
@@ -1,4 +1,4 @@
1.\" $Id: ssh-rand-helper.8,v 1.2 2003/11/21 12:48:56 djm Exp $ 1.\" $Id: ssh-rand-helper.8,v 1.3 2007/01/22 01:44:53 djm Exp $
2.\" 2.\"
3.\" Copyright (c) 2002 Damien Miller. All rights reserved. 3.\" Copyright (c) 2002 Damien Miller. All rights reserved.
4.\" 4.\"
@@ -27,7 +27,7 @@
27.Os 27.Os
28.Sh NAME 28.Sh NAME
29.Nm ssh-rand-helper 29.Nm ssh-rand-helper
30.Nd Random number gatherer for OpenSSH 30.Nd random number gatherer for OpenSSH
31.Sh SYNOPSIS 31.Sh SYNOPSIS
32.Nm ssh-rand-hlper 32.Nm ssh-rand-hlper
33.Op Fl vxXh 33.Op Fl vxXh
@@ -82,7 +82,7 @@ Force output of a binary seed, even if standard output is a tty
82Turn on debugging message. Multiple 82Turn on debugging message. Multiple
83.Fl v 83.Fl v
84options will increase the debugging level. 84options will increase the debugging level.
85.Fl h 85.It Fl h
86Display a summary of options. 86Display a summary of options.
87.El 87.El
88.Sh AUTHORS 88.Sh AUTHORS
diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c
index 87e52cf75..8520c3a62 100644
--- a/ssh-rand-helper.c
+++ b/ssh-rand-helper.c
@@ -24,6 +24,29 @@
24 24
25#include "includes.h" 25#include "includes.h"
26 26
27#include <sys/types.h>
28#include <sys/resource.h>
29#include <sys/stat.h>
30#include <sys/wait.h>
31#include <sys/socket.h>
32
33#include <stdarg.h>
34#include <stddef.h>
35
36#include <netinet/in.h>
37#include <arpa/inet.h>
38
39#ifdef HAVE_SYS_UN_H
40# include <sys/un.h>
41#endif
42
43#include <errno.h>
44#include <fcntl.h>
45#include <pwd.h>
46#include <signal.h>
47#include <time.h>
48#include <unistd.h>
49
27#include <openssl/rand.h> 50#include <openssl/rand.h>
28#include <openssl/sha.h> 51#include <openssl/sha.h>
29#include <openssl/crypto.h> 52#include <openssl/crypto.h>
@@ -39,8 +62,6 @@
39#include "pathnames.h" 62#include "pathnames.h"
40#include "log.h" 63#include "log.h"
41 64
42RCSID("$Id: ssh-rand-helper.c,v 1.26 2005/07/17 07:26:44 djm Exp $");
43
44/* Number of bytes we write out */ 65/* Number of bytes we write out */
45#define OUTPUT_SEED_SIZE 48 66#define OUTPUT_SEED_SIZE 48
46 67
@@ -564,7 +585,8 @@ prng_write_seedfile(void)
564 /* Try to ensure that the parent directory is there */ 585 /* Try to ensure that the parent directory is there */
565 snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir, 586 snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir,
566 _PATH_SSH_USER_DIR); 587 _PATH_SSH_USER_DIR);
567 mkdir(filename, 0700); 588 if (mkdir(filename, 0700) < 0 && errno != EEXIST)
589 fatal("mkdir %.200s: %s", filename, strerror(errno));
568 590
569 snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir, 591 snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir,
570 SSH_PRNG_SEED_FILE); 592 SSH_PRNG_SEED_FILE);
@@ -665,8 +687,7 @@ prng_read_commands(char *cmdfilename)
665 } 687 }
666 688
667 num_cmds = 64; 689 num_cmds = 64;
668 entcmd = xmalloc(num_cmds * sizeof(entropy_cmd_t)); 690 entcmd = xcalloc(num_cmds, sizeof(entropy_cmd_t));
669 memset(entcmd, '\0', num_cmds * sizeof(entropy_cmd_t));
670 691
671 /* Read in file */ 692 /* Read in file */
672 cur_cmd = linenum = 0; 693 cur_cmd = linenum = 0;
@@ -759,7 +780,7 @@ prng_read_commands(char *cmdfilename)
759 */ 780 */
760 if (cur_cmd == num_cmds) { 781 if (cur_cmd == num_cmds) {
761 num_cmds *= 2; 782 num_cmds *= 2;
762 entcmd = xrealloc(entcmd, num_cmds * 783 entcmd = xrealloc(entcmd, num_cmds,
763 sizeof(entropy_cmd_t)); 784 sizeof(entropy_cmd_t));
764 } 785 }
765 } 786 }
@@ -768,12 +789,13 @@ prng_read_commands(char *cmdfilename)
768 memset(&entcmd[cur_cmd], '\0', sizeof(entropy_cmd_t)); 789 memset(&entcmd[cur_cmd], '\0', sizeof(entropy_cmd_t));
769 790
770 /* trim to size */ 791 /* trim to size */
771 entropy_cmds = xrealloc(entcmd, (cur_cmd + 1) * 792 entropy_cmds = xrealloc(entcmd, (cur_cmd + 1),
772 sizeof(entropy_cmd_t)); 793 sizeof(entropy_cmd_t));
773 794
774 debug("Loaded %d entropy commands from %.100s", cur_cmd, 795 debug("Loaded %d entropy commands from %.100s", cur_cmd,
775 cmdfilename); 796 cmdfilename);
776 797
798 fclose(f);
777 return cur_cmd < MIN_ENTROPY_SOURCES ? -1 : 0; 799 return cur_cmd < MIN_ENTROPY_SOURCES ? -1 : 0;
778} 800}
779 801
diff --git a/ssh-rsa.c b/ssh-rsa.c
index eb422d07e..0e16ff85f 100644
--- a/ssh-rsa.c
+++ b/ssh-rsa.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: ssh-rsa.c,v 1.39 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2000, 2003 Markus Friedl <markus@openbsd.org> 3 * Copyright (c) 2000, 2003 Markus Friedl <markus@openbsd.org>
3 * 4 *
@@ -13,16 +14,20 @@
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */ 16 */
17
16#include "includes.h" 18#include "includes.h"
17RCSID("$OpenBSD: ssh-rsa.c,v 1.32 2005/06/17 02:44:33 djm Exp $"); 19
20#include <sys/types.h>
18 21
19#include <openssl/evp.h> 22#include <openssl/evp.h>
20#include <openssl/err.h> 23#include <openssl/err.h>
21 24
25#include <stdarg.h>
26#include <string.h>
27
22#include "xmalloc.h" 28#include "xmalloc.h"
23#include "log.h" 29#include "log.h"
24#include "buffer.h" 30#include "buffer.h"
25#include "bufaux.h"
26#include "key.h" 31#include "key.h"
27#include "compat.h" 32#include "compat.h"
28#include "ssh.h" 33#include "ssh.h"
@@ -62,6 +67,7 @@ ssh_rsa_sign(const Key *key, u_char **sigp, u_int *lenp,
62 67
63 if (ok != 1) { 68 if (ok != 1) {
64 int ecode = ERR_get_error(); 69 int ecode = ERR_get_error();
70
65 error("ssh_rsa_sign: RSA_sign failed: %s", 71 error("ssh_rsa_sign: RSA_sign failed: %s",
66 ERR_error_string(ecode, NULL)); 72 ERR_error_string(ecode, NULL));
67 xfree(sig); 73 xfree(sig);
@@ -144,7 +150,7 @@ ssh_rsa_verify(const Key *key, const u_char *signature, u_int signaturelen,
144 u_int diff = modlen - len; 150 u_int diff = modlen - len;
145 debug("ssh_rsa_verify: add padding: modlen %u > len %u", 151 debug("ssh_rsa_verify: add padding: modlen %u > len %u",
146 modlen, len); 152 modlen, len);
147 sigblob = xrealloc(sigblob, modlen); 153 sigblob = xrealloc(sigblob, 1, modlen);
148 memmove(sigblob + diff, sigblob, len); 154 memmove(sigblob + diff, sigblob, len);
149 memset(sigblob, 0, diff); 155 memset(sigblob, 0, diff);
150 len = modlen; 156 len = modlen;
@@ -220,7 +226,6 @@ openssh_RSA_verify(int type, u_char *hash, u_int hashlen,
220 break; 226 break;
221 default: 227 default:
222 goto done; 228 goto done;
223 break;
224 } 229 }
225 if (hashlen != hlen) { 230 if (hashlen != hlen) {
226 error("bad hashlen"); 231 error("bad hashlen");
diff --git a/ssh.0 b/ssh.0
index 83c4b94eb..c31e17eaf 100644
--- a/ssh.0
+++ b/ssh.0
@@ -9,7 +9,7 @@ SYNOPSIS
9 [-i identity_file] [-L [bind_address:]port:host:hostport] 9 [-i identity_file] [-L [bind_address:]port:host:hostport]
10 [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] 10 [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
11 [-R [bind_address:]port:host:hostport] [-S ctl_path] 11 [-R [bind_address:]port:host:hostport] [-S ctl_path]
12 [-w tunnel:tunnel] [user@]hostname [command] 12 [-w local_tun[:remote_tun]] [user@]hostname [command]
13 13
14DESCRIPTION 14DESCRIPTION
15 ssh (SSH client) is a program for logging into a remote machine and for 15 ssh (SSH client) is a program for logging into a remote machine and for
@@ -225,6 +225,7 @@ DESCRIPTION
225 ControlPath 225 ControlPath
226 DynamicForward 226 DynamicForward
227 EscapeChar 227 EscapeChar
228 ExitOnForwardFailure
228 ForwardAgent 229 ForwardAgent
229 ForwardX11 230 ForwardX11
230 ForwardX11Trusted 231 ForwardX11Trusted
@@ -315,7 +316,7 @@ DESCRIPTION
315 316
316 -t Force pseudo-tty allocation. This can be used to execute arbi- 317 -t Force pseudo-tty allocation. This can be used to execute arbi-
317 trary screen-based programs on a remote machine, which can be 318 trary screen-based programs on a remote machine, which can be
318 very useful, e.g., when implementing menu services. Multiple -t 319 very useful, e.g. when implementing menu services. Multiple -t
319 options force tty allocation, even if ssh has no local tty. 320 options force tty allocation, even if ssh has no local tty.
320 321
321 -V Display the version number and exit. 322 -V Display the version number and exit.
@@ -325,11 +326,16 @@ DESCRIPTION
325 tion, and configuration problems. Multiple -v options increase 326 tion, and configuration problems. Multiple -v options increase
326 the verbosity. The maximum is 3. 327 the verbosity. The maximum is 3.
327 328
328 -w tunnel:tunnel 329 -w local_tun[:remote_tun]
329 Requests a tun(4) device on the client (first tunnel arg) and 330 Requests tunnel device forwarding with the specified tun(4) de-
330 server (second tunnel arg). The devices may be specified by nu- 331 vices between the client (local_tun) and the server (remote_tun).
331 merical ID or the keyword ``any'', which uses the next available 332
332 tunnel device. See also the Tunnel directive in ssh_config(5). 333 The devices may be specified by numerical ID or the keyword
334 ``any'', which uses the next available tunnel device. If
335 remote_tun is not specified, it defaults to ``any''. See also
336 the Tunnel and TunnelDevice directives in ssh_config(5). If the
337 Tunnel directive is unset, it is set to the default tunnel mode,
338 which is ``point-to-point''.
333 339
334 -X Enables X11 forwarding. This can also be specified on a per-host 340 -X Enables X11 forwarding. This can also be specified on a per-host
335 basis in a configuration file. 341 basis in a configuration file.
@@ -368,11 +374,11 @@ AUTHENTICATION
368 integrity (hmac-md5, hmac-sha1, hmac-ripemd160). Protocol 1 lacks a 374 integrity (hmac-md5, hmac-sha1, hmac-ripemd160). Protocol 1 lacks a
369 strong mechanism for ensuring the integrity of the connection. 375 strong mechanism for ensuring the integrity of the connection.
370 376
371 The methods available for authentication are: host-based authentication, 377 The methods available for authentication are: GSSAPI-based authentica-
372 public key authentication, challenge-response authentication, and pass- 378 tion, host-based authentication, public key authentication, challenge-re-
373 word authentication. Authentication methods are tried in the order spec- 379 sponse authentication, and password authentication. Authentication meth-
374 ified above, though protocol 2 has a configuration option to change the 380 ods are tried in the order specified above, though protocol 2 has a con-
375 default order: PreferredAuthentications. 381 figuration option to change the default order: PreferredAuthentications.
376 382
377 Host-based authentication works as follows: If the machine the user logs 383 Host-based authentication works as follows: If the machine the user logs
378 in from is listed in /etc/hosts.equiv or /etc/shosts.equiv on the remote 384 in from is listed in /etc/hosts.equiv or /etc/shosts.equiv on the remote
@@ -487,8 +493,8 @@ ESCAPE CHARACTERS
487 ~C Open command line. Currently this allows the addition of port 493 ~C Open command line. Currently this allows the addition of port
488 forwardings using the -L and -R options (see above). It also al- 494 forwardings using the -L and -R options (see above). It also al-
489 lows the cancellation of existing remote port-forwardings using 495 lows the cancellation of existing remote port-forwardings using
490 -KR hostport. !command allows the user to execute a local com- 496 -KR[bind_address:]port. !command allows the user to execute a
491 mand if the PermitLocalCommand option is enabled in 497 local command if the PermitLocalCommand option is enabled in
492 ssh_config(5). Basic help is available, using the -h option. 498 ssh_config(5). Basic help is available, using the -h option.
493 499
494 ~R Request rekeying of the connection (only useful for SSH protocol 500 ~R Request rekeying of the connection (only useful for SSH protocol
@@ -573,8 +579,7 @@ VERIFYING HOST KEYS
573 ``host.example.com''. The SSHFP resource records should first be added 579 ``host.example.com''. The SSHFP resource records should first be added
574 to the zonefile for host.example.com: 580 to the zonefile for host.example.com:
575 581
576 $ ssh-keygen -f /etc/ssh/ssh_host_rsa_key.pub -r host.example.com. 582 $ ssh-keygen -r host.example.com.
577 $ ssh-keygen -f /etc/ssh/ssh_host_dsa_key.pub -r host.example.com.
578 583
579 The output lines will have to be added to the zonefile. To check that 584 The output lines will have to be added to the zonefile. To check that
580 the zone is answering fingerprint queries: 585 the zone is answering fingerprint queries:
@@ -598,24 +603,34 @@ SSH-BASED VIRTUAL PRIVATE NETWORKS
598 fic). 603 fic).
599 604
600 The following example would connect client network 10.0.50.0/24 with re- 605 The following example would connect client network 10.0.50.0/24 with re-
601 mote network 10.0.99.0/24, provided that the SSH server running on the 606 mote network 10.0.99.0/24 using a point-to-point connection from 10.1.1.1
602 gateway to the remote network, at 192.168.1.15, allows it: 607 to 10.1.1.2, provided that the SSH server running on the gateway to the
608 remote network, at 192.168.1.15, allows it.
609
610 On the client:
603 611
604 # ssh -f -w 0:1 192.168.1.15 true 612 # ssh -f -w 0:1 192.168.1.15 true
605 # ifconfig tun0 10.0.50.1 10.0.99.1 netmask 255.255.255.252 613 # ifconfig tun0 10.1.1.1 10.1.1.2 netmask 255.255.255.252
614 # route add 10.0.99.0/24 10.1.1.2
615
616 On the server:
617
618 # ifconfig tun1 10.1.1.2 10.1.1.1 netmask 255.255.255.252
619 # route add 10.0.50.0/24 10.1.1.1
606 620
607 Client access may be more finely tuned via the /root/.ssh/authorized_keys 621 Client access may be more finely tuned via the /root/.ssh/authorized_keys
608 file (see below) and the PermitRootLogin server option. The following 622 file (see below) and the PermitRootLogin server option. The following
609 entry would permit connections on the first tun(4) device from user 623 entry would permit connections on tun(4) device 1 from user ``jane'' and
610 ``jane'' and on the second device from user ``john'', if PermitRootLogin 624 on tun device 2 from user ``john'', if PermitRootLogin is set to
611 is set to ``forced-commands-only'': 625 ``forced-commands-only'':
612 626
613 tunnel="1",command="sh /etc/netstart tun1" ssh-rsa ... jane 627 tunnel="1",command="sh /etc/netstart tun1" ssh-rsa ... jane
614 tunnel="2",command="sh /etc/netstart tun1" ssh-rsa ... john 628 tunnel="2",command="sh /etc/netstart tun2" ssh-rsa ... john
615 629
616 Since a SSH-based setup entails a fair amount of overhead, it may be more 630 Since an SSH-based setup entails a fair amount of overhead, it may be
617 suited to temporary setups, such as for wireless VPNs. More permanent 631 more suited to temporary setups, such as for wireless VPNs. More perma-
618 VPNs are better provided by tools such as ipsecctl(8) and isakmpd(8). 632 nent VPNs are better provided by tools such as ipsecctl(8) and
633 isakmpd(8).
619 634
620ENVIRONMENT 635ENVIRONMENT
621 ssh will normally set the following environment variables: 636 ssh will normally set the following environment variables:
@@ -671,8 +686,8 @@ ENVIRONMENT
671 686
672 TZ This variable is set to indicate the present time 687 TZ This variable is set to indicate the present time
673 zone if it was set when the daemon was started 688 zone if it was set when the daemon was started
674 (i.e., the daemon passes the value on to new con- 689 (i.e. the daemon passes the value on to new connec-
675 nections). 690 tions).
676 691
677 USER Set to the name of the user logging in. 692 USER Set to the name of the user logging in.
678 693
@@ -779,9 +794,33 @@ SEE ALSO
779 scp(1), sftp(1), ssh-add(1), ssh-agent(1), ssh-keygen(1), ssh-keyscan(1), 794 scp(1), sftp(1), ssh-add(1), ssh-agent(1), ssh-keygen(1), ssh-keyscan(1),
780 tun(4), hosts.equiv(5), ssh_config(5), ssh-keysign(8), sshd(8) 795 tun(4), hosts.equiv(5), ssh_config(5), ssh-keysign(8), sshd(8)
781 796
782 T. Ylonen, T. Kivinen, M. Saarinen, T. Rinne, and S. Lehtinen, SSH 797 The Secure Shell (SSH) Protocol Assigned Numbers, RFC 4250, 2006.
783 Protocol Architecture, draft-ietf-secsh-architecture-12.txt, January 798
784 2002, work in progress material. 799 The Secure Shell (SSH) Protocol Architecture, RFC 4251, 2006.
800
801 The Secure Shell (SSH) Authentication Protocol, RFC 4252, 2006.
802
803 The Secure Shell (SSH) Transport Layer Protocol, RFC 4253, 2006.
804
805 The Secure Shell (SSH) Connection Protocol, RFC 4254, 2006.
806
807 Using DNS to Securely Publish Secure Shell (SSH) Key Fingerprints, RFC
808 4255, 2006.
809
810 Generic Message Exchange Authentication for the Secure Shell Protocol
811 (SSH), RFC 4256, 2006.
812
813 The Secure Shell (SSH) Session Channel Break Extension, RFC 4335, 2006.
814
815 The Secure Shell (SSH) Transport Layer Encryption Modes, RFC 4344, 2006.
816
817 Improved Arcfour Modes for the Secure Shell (SSH) Transport Layer
818 Protocol, RFC 4345, 2006.
819
820 Diffie-Hellman Group Exchange for the Secure Shell (SSH) Transport Layer
821 Protocol, RFC 4419, 2006.
822
823 The Secure Shell (SSH) Public Key File Format, RFC 4716, 2006.
785 824
786AUTHORS 825AUTHORS
787 OpenSSH is a derivative of the original and free ssh 1.2.12 release by 826 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
@@ -790,4 +829,4 @@ AUTHORS
790 created OpenSSH. Markus Friedl contributed the support for SSH protocol 829 created OpenSSH. Markus Friedl contributed the support for SSH protocol
791 versions 1.5 and 2.0. 830 versions 1.5 and 2.0.
792 831
793OpenBSD 3.9 September 25, 1999 12 832OpenBSD 4.1 September 25, 1999 13
diff --git a/ssh.1 b/ssh.1
index f4c677628..b87ab4171 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.253 2006/01/30 13:37:49 jmc Exp $ 37.\" $OpenBSD: ssh.1,v 1.266 2006/12/11 21:25:46 markus Exp $
38.Dd September 25, 1999 38.Dd September 25, 1999
39.Dt SSH 1 39.Dt SSH 1
40.Os 40.Os
@@ -78,7 +78,8 @@
78.Oc 78.Oc
79.Op Fl S Ar ctl_path 79.Op Fl S Ar ctl_path
80.Bk -words 80.Bk -words
81.Op Fl w Ar tunnel : Ns Ar tunnel 81.Oo Fl w Ar local_tun Ns
82.Op : Ns Ar remote_tun Oc
82.Oo Ar user Ns @ Oc Ns Ar hostname 83.Oo Ar user Ns @ Oc Ns Ar hostname
83.Op Ar command 84.Op Ar command
84.Ek 85.Ek
@@ -448,6 +449,7 @@ For full details of the options listed below, and their possible values, see
448.It ControlPath 449.It ControlPath
449.It DynamicForward 450.It DynamicForward
450.It EscapeChar 451.It EscapeChar
452.It ExitOnForwardFailure
451.It ForwardAgent 453.It ForwardAgent
452.It ForwardX11 454.It ForwardX11
453.It ForwardX11Trusted 455.It ForwardX11Trusted
@@ -569,7 +571,7 @@ Disable pseudo-tty allocation.
569Force pseudo-tty allocation. 571Force pseudo-tty allocation.
570This can be used to execute arbitrary 572This can be used to execute arbitrary
571screen-based programs on a remote machine, which can be very useful, 573screen-based programs on a remote machine, which can be very useful,
572e.g., when implementing menu services. 574e.g. when implementing menu services.
573Multiple 575Multiple
574.Fl t 576.Fl t
575options force tty allocation, even if 577options force tty allocation, even if
@@ -588,24 +590,35 @@ Multiple
588.Fl v 590.Fl v
589options increase the verbosity. 591options increase the verbosity.
590The maximum is 3. 592The maximum is 3.
591.It Fl w Ar tunnel : Ns Ar tunnel 593.It Fl w Xo
592Requests a 594.Ar local_tun Ns Op : Ns Ar remote_tun
595.Xc
596Requests
597tunnel
598device forwarding with the specified
593.Xr tun 4 599.Xr tun 4
594device on the client 600devices between the client
595(first 601.Pq Ar local_tun
596.Ar tunnel 602and the server
597arg) 603.Pq Ar remote_tun .
598and server 604.Pp
599(second
600.Ar tunnel
601arg).
602The devices may be specified by numerical ID or the keyword 605The devices may be specified by numerical ID or the keyword
603.Dq any , 606.Dq any ,
604which uses the next available tunnel device. 607which uses the next available tunnel device.
608If
609.Ar remote_tun
610is not specified, it defaults to
611.Dq any .
605See also the 612See also the
606.Cm Tunnel 613.Cm Tunnel
607directive in 614and
615.Cm TunnelDevice
616directives in
608.Xr ssh_config 5 . 617.Xr ssh_config 5 .
618If the
619.Cm Tunnel
620directive is unset, it is set to the default tunnel mode, which is
621.Dq point-to-point .
609.It Fl X 622.It Fl X
610Enables X11 forwarding. 623Enables X11 forwarding.
611This can also be specified on a per-host basis in a configuration file. 624This can also be specified on a per-host basis in a configuration file.
@@ -666,6 +679,7 @@ Protocol 1 lacks a strong mechanism for ensuring the
666integrity of the connection. 679integrity of the connection.
667.Pp 680.Pp
668The methods available for authentication are: 681The methods available for authentication are:
682GSSAPI-based authentication,
669host-based authentication, 683host-based authentication,
670public key authentication, 684public key authentication,
671challenge-response authentication, 685challenge-response authentication,
@@ -872,7 +886,9 @@ and
872options (see above). 886options (see above).
873It also allows the cancellation of existing remote port-forwardings 887It also allows the cancellation of existing remote port-forwardings
874using 888using
875.Fl KR Ar hostport . 889.Sm off
890.Fl KR Oo Ar bind_address : Oc Ar port .
891.Sm on
876.Ic !\& Ns Ar command 892.Ic !\& Ns Ar command
877allows the user to execute a local command if the 893allows the user to execute a local command if the
878.Ic PermitLocalCommand 894.Ic PermitLocalCommand
@@ -1025,8 +1041,7 @@ In this example, we are connecting a client to a server,
1025The SSHFP resource records should first be added to the zonefile for 1041The SSHFP resource records should first be added to the zonefile for
1026host.example.com: 1042host.example.com:
1027.Bd -literal -offset indent 1043.Bd -literal -offset indent
1028$ ssh-keygen -f /etc/ssh/ssh_host_rsa_key.pub -r host.example.com. 1044$ ssh-keygen -r host.example.com.
1029$ ssh-keygen -f /etc/ssh/ssh_host_dsa_key.pub -r host.example.com.
1030.Ed 1045.Ed
1031.Pp 1046.Pp
1032The output lines will have to be added to the zonefile. 1047The output lines will have to be added to the zonefile.
@@ -1062,12 +1077,22 @@ controls whether the server supports this,
1062and at what level (layer 2 or 3 traffic). 1077and at what level (layer 2 or 3 traffic).
1063.Pp 1078.Pp
1064The following example would connect client network 10.0.50.0/24 1079The following example would connect client network 10.0.50.0/24
1065with remote network 10.0.99.0/24, provided that the SSH server 1080with remote network 10.0.99.0/24 using a point-to-point connection
1066running on the gateway to the remote network, 1081from 10.1.1.1 to 10.1.1.2,
1067at 192.168.1.15, allows it: 1082provided that the SSH server running on the gateway to the remote network,
1083at 192.168.1.15, allows it.
1084.Pp
1085On the client:
1068.Bd -literal -offset indent 1086.Bd -literal -offset indent
1069# ssh -f -w 0:1 192.168.1.15 true 1087# ssh -f -w 0:1 192.168.1.15 true
1070# ifconfig tun0 10.0.50.1 10.0.99.1 netmask 255.255.255.252 1088# ifconfig tun0 10.1.1.1 10.1.1.2 netmask 255.255.255.252
1089# route add 10.0.99.0/24 10.1.1.2
1090.Ed
1091.Pp
1092On the server:
1093.Bd -literal -offset indent
1094# ifconfig tun1 10.1.1.2 10.1.1.1 netmask 255.255.255.252
1095# route add 10.0.50.0/24 10.1.1.1
1071.Ed 1096.Ed
1072.Pp 1097.Pp
1073Client access may be more finely tuned via the 1098Client access may be more finely tuned via the
@@ -1075,11 +1100,11 @@ Client access may be more finely tuned via the
1075file (see below) and the 1100file (see below) and the
1076.Cm PermitRootLogin 1101.Cm PermitRootLogin
1077server option. 1102server option.
1078The following entry would permit connections on the first 1103The following entry would permit connections on
1079.Xr tun 4 1104.Xr tun 4
1080device from user 1105device 1 from user
1081.Dq jane 1106.Dq jane
1082and on the second device from user 1107and on tun device 2 from user
1083.Dq john , 1108.Dq john ,
1084if 1109if
1085.Cm PermitRootLogin 1110.Cm PermitRootLogin
@@ -1087,10 +1112,10 @@ is set to
1087.Dq forced-commands-only : 1112.Dq forced-commands-only :
1088.Bd -literal -offset 2n 1113.Bd -literal -offset 2n
1089tunnel="1",command="sh /etc/netstart tun1" ssh-rsa ... jane 1114tunnel="1",command="sh /etc/netstart tun1" ssh-rsa ... jane
1090tunnel="2",command="sh /etc/netstart tun1" ssh-rsa ... john 1115tunnel="2",command="sh /etc/netstart tun2" ssh-rsa ... john
1091.Ed 1116.Ed
1092.Pp 1117.Pp
1093Since a SSH-based setup entails a fair amount of overhead, 1118Since an SSH-based setup entails a fair amount of overhead,
1094it may be more suited to temporary setups, 1119it may be more suited to temporary setups,
1095such as for wireless VPNs. 1120such as for wireless VPNs.
1096More permanent VPNs are better provided by tools such as 1121More permanent VPNs are better provided by tools such as
@@ -1178,7 +1203,7 @@ If the current session has no tty,
1178this variable is not set. 1203this variable is not set.
1179.It Ev TZ 1204.It Ev TZ
1180This variable is set to indicate the present time zone if it 1205This variable is set to indicate the present time zone if it
1181was set when the daemon was started (i.e., the daemon passes the value 1206was set when the daemon was started (i.e. the daemon passes the value
1182on to new connections). 1207on to new connections).
1183.It Ev USER 1208.It Ev USER
1184Set to the name of the user logging in. 1209Set to the name of the user logging in.
@@ -1339,15 +1364,64 @@ manual page for more information.
1339.Xr ssh-keysign 8 , 1364.Xr ssh-keysign 8 ,
1340.Xr sshd 8 1365.Xr sshd 8
1341.Rs 1366.Rs
1342.%A T. Ylonen 1367.%R RFC 4250
1343.%A T. Kivinen 1368.%T "The Secure Shell (SSH) Protocol Assigned Numbers"
1344.%A M. Saarinen 1369.%D 2006
1345.%A T. Rinne 1370.Re
1346.%A S. Lehtinen 1371.Rs
1347.%T "SSH Protocol Architecture" 1372.%R RFC 4251
1348.%N draft-ietf-secsh-architecture-12.txt 1373.%T "The Secure Shell (SSH) Protocol Architecture"
1349.%D January 2002 1374.%D 2006
1350.%O work in progress material 1375.Re
1376.Rs
1377.%R RFC 4252
1378.%T "The Secure Shell (SSH) Authentication Protocol"
1379.%D 2006
1380.Re
1381.Rs
1382.%R RFC 4253
1383.%T "The Secure Shell (SSH) Transport Layer Protocol"
1384.%D 2006
1385.Re
1386.Rs
1387.%R RFC 4254
1388.%T "The Secure Shell (SSH) Connection Protocol"
1389.%D 2006
1390.Re
1391.Rs
1392.%R RFC 4255
1393.%T "Using DNS to Securely Publish Secure Shell (SSH) Key Fingerprints"
1394.%D 2006
1395.Re
1396.Rs
1397.%R RFC 4256
1398.%T "Generic Message Exchange Authentication for the Secure Shell Protocol (SSH)"
1399.%D 2006
1400.Re
1401.Rs
1402.%R RFC 4335
1403.%T "The Secure Shell (SSH) Session Channel Break Extension"
1404.%D 2006
1405.Re
1406.Rs
1407.%R RFC 4344
1408.%T "The Secure Shell (SSH) Transport Layer Encryption Modes"
1409.%D 2006
1410.Re
1411.Rs
1412.%R RFC 4345
1413.%T "Improved Arcfour Modes for the Secure Shell (SSH) Transport Layer Protocol"
1414.%D 2006
1415.Re
1416.Rs
1417.%R RFC 4419
1418.%T "Diffie-Hellman Group Exchange for the Secure Shell (SSH) Transport Layer Protocol"
1419.%D 2006
1420.Re
1421.Rs
1422.%R RFC 4716
1423.%T "The Secure Shell (SSH) Public Key File Format"
1424.%D 2006
1351.Re 1425.Re
1352.Sh AUTHORS 1426.Sh AUTHORS
1353OpenSSH is a derivative of the original and free 1427OpenSSH is a derivative of the original and free
diff --git a/ssh.c b/ssh.c
index 3940dabfd..cfaa1ff22 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: ssh.c,v 1.295 2007/01/03 03:01:40 stevesk Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -40,20 +41,46 @@
40 */ 41 */
41 42
42#include "includes.h" 43#include "includes.h"
43RCSID("$OpenBSD: ssh.c,v 1.257 2005/12/20 04:41:07 dtucker Exp $"); 44
45#include <sys/types.h>
46#ifdef HAVE_SYS_STAT_H
47# include <sys/stat.h>
48#endif
49#include <sys/resource.h>
50#include <sys/ioctl.h>
51#include <sys/socket.h>
52#include <sys/un.h>
53
54#include <ctype.h>
55#include <errno.h>
56#include <fcntl.h>
57#include <netdb.h>
58#ifdef HAVE_PATHS_H
59#include <paths.h>
60#endif
61#include <pwd.h>
62#include <signal.h>
63#include <stdarg.h>
64#include <stddef.h>
65#include <stdio.h>
66#include <stdlib.h>
67#include <string.h>
68#include <unistd.h>
69
70#include <netinet/in.h>
71#include <arpa/inet.h>
44 72
45#include <openssl/evp.h> 73#include <openssl/evp.h>
46#include <openssl/err.h> 74#include <openssl/err.h>
47 75
76#include "xmalloc.h"
48#include "ssh.h" 77#include "ssh.h"
49#include "ssh1.h" 78#include "ssh1.h"
50#include "ssh2.h" 79#include "ssh2.h"
51#include "compat.h" 80#include "compat.h"
52#include "cipher.h" 81#include "cipher.h"
53#include "xmalloc.h"
54#include "packet.h" 82#include "packet.h"
55#include "buffer.h" 83#include "buffer.h"
56#include "bufaux.h"
57#include "channels.h" 84#include "channels.h"
58#include "key.h" 85#include "key.h"
59#include "authfd.h" 86#include "authfd.h"
@@ -72,6 +99,7 @@ RCSID("$OpenBSD: ssh.c,v 1.257 2005/12/20 04:41:07 dtucker Exp $");
72#include "msg.h" 99#include "msg.h"
73#include "monitor_fdpass.h" 100#include "monitor_fdpass.h"
74#include "uidswap.h" 101#include "uidswap.h"
102#include "version.h"
75 103
76#ifdef SMARTCARD 104#ifdef SMARTCARD
77#include "scard.h" 105#include "scard.h"
@@ -162,7 +190,7 @@ usage(void)
162" [-i identity_file] [-L [bind_address:]port:host:hostport]\n" 190" [-i identity_file] [-L [bind_address:]port:host:hostport]\n"
163" [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]\n" 191" [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]\n"
164" [-R [bind_address:]port:host:hostport] [-S ctl_path]\n" 192" [-R [bind_address:]port:host:hostport] [-S ctl_path]\n"
165" [-w tunnel:tunnel] [user@]hostname [command]\n" 193" [-w local_tun[:remote_tun]] [user@]hostname [command]\n"
166 ); 194 );
167 exit(255); 195 exit(255);
168} 196}
@@ -242,7 +270,7 @@ main(int ac, char **av)
242 /* Parse command-line arguments. */ 270 /* Parse command-line arguments. */
243 host = NULL; 271 host = NULL;
244 272
245again: 273 again:
246 while ((opt = getopt(ac, av, 274 while ((opt = getopt(ac, av,
247 "1246ab:c:e:fgi:kl:m:no:p:qstvxACD:F:I:L:MNO:PR:S:TVw:XY")) != -1) { 275 "1246ab:c:e:fgi:kl:m:no:p:qstvxACD:F:I:L:MNO:PR:S:TVw:XY")) != -1) {
248 switch (opt) { 276 switch (opt) {
@@ -586,7 +614,7 @@ again:
586 if (!read_config_file(config, host, &options, 0)) 614 if (!read_config_file(config, host, &options, 0))
587 fatal("Can't open user config file %.100s: " 615 fatal("Can't open user config file %.100s: "
588 "%.100s", config, strerror(errno)); 616 "%.100s", config, strerror(errno));
589 } else { 617 } else {
590 snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir, 618 snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir,
591 _PATH_SSH_USER_CONFFILE); 619 _PATH_SSH_USER_CONFFILE);
592 (void)read_config_file(buf, host, &options, 1); 620 (void)read_config_file(buf, host, &options, 1);
@@ -616,7 +644,7 @@ again:
616 if (options.host_key_alias != NULL) { 644 if (options.host_key_alias != NULL) {
617 for (p = options.host_key_alias; *p; p++) 645 for (p = options.host_key_alias; *p; p++)
618 if (isupper(*p)) 646 if (isupper(*p))
619 *p = tolower(*p); 647 *p = (char)tolower(*p);
620 } 648 }
621 649
622 /* Get default port if port has not been set. */ 650 /* Get default port if port has not been set. */
@@ -633,11 +661,15 @@ again:
633 options.control_path = NULL; 661 options.control_path = NULL;
634 662
635 if (options.control_path != NULL) { 663 if (options.control_path != NULL) {
664 char thishost[NI_MAXHOST];
665
666 if (gethostname(thishost, sizeof(thishost)) == -1)
667 fatal("gethostname: %s", strerror(errno));
636 snprintf(buf, sizeof(buf), "%d", options.port); 668 snprintf(buf, sizeof(buf), "%d", options.port);
637 cp = tilde_expand_filename(options.control_path, 669 cp = tilde_expand_filename(options.control_path,
638 original_real_uid); 670 original_real_uid);
639 options.control_path = percent_expand(cp, "p", buf, "h", host, 671 options.control_path = percent_expand(cp, "p", buf, "h", host,
640 "r", options.user, (char *)NULL); 672 "r", options.user, "l", thishost, (char *)NULL);
641 xfree(cp); 673 xfree(cp);
642 } 674 }
643 if (mux_command != 0 && options.control_path == NULL) 675 if (mux_command != 0 && options.control_path == NULL)
@@ -670,16 +702,16 @@ again:
670 if (options.rhosts_rsa_authentication || 702 if (options.rhosts_rsa_authentication ||
671 options.hostbased_authentication) { 703 options.hostbased_authentication) {
672 sensitive_data.nkeys = 3; 704 sensitive_data.nkeys = 3;
673 sensitive_data.keys = xmalloc(sensitive_data.nkeys * 705 sensitive_data.keys = xcalloc(sensitive_data.nkeys,
674 sizeof(Key)); 706 sizeof(Key));
675 707
676 PRIV_START; 708 PRIV_START;
677 sensitive_data.keys[0] = key_load_private_type(KEY_RSA1, 709 sensitive_data.keys[0] = key_load_private_type(KEY_RSA1,
678 _PATH_HOST_KEY_FILE, "", NULL); 710 _PATH_HOST_KEY_FILE, "", NULL, NULL);
679 sensitive_data.keys[1] = key_load_private_type(KEY_DSA, 711 sensitive_data.keys[1] = key_load_private_type(KEY_DSA,
680 _PATH_HOST_DSA_KEY_FILE, "", NULL); 712 _PATH_HOST_DSA_KEY_FILE, "", NULL, NULL);
681 sensitive_data.keys[2] = key_load_private_type(KEY_RSA, 713 sensitive_data.keys[2] = key_load_private_type(KEY_RSA,
682 _PATH_HOST_RSA_KEY_FILE, "", NULL); 714 _PATH_HOST_RSA_KEY_FILE, "", NULL, NULL);
683 PRIV_END; 715 PRIV_END;
684 716
685 if (options.hostbased_authentication == 1 && 717 if (options.hostbased_authentication == 1 &&
@@ -795,6 +827,8 @@ ssh_init_forwarding(void)
795 options.local_forwards[i].connect_port, 827 options.local_forwards[i].connect_port,
796 options.gateway_ports); 828 options.gateway_ports);
797 } 829 }
830 if (i > 0 && success != i && options.exit_on_forward_failure)
831 fatal("Could not request local forwarding.");
798 if (i > 0 && success == 0) 832 if (i > 0 && success == 0)
799 error("Could not request local forwarding."); 833 error("Could not request local forwarding.");
800 834
@@ -807,11 +841,17 @@ ssh_init_forwarding(void)
807 options.remote_forwards[i].listen_port, 841 options.remote_forwards[i].listen_port,
808 options.remote_forwards[i].connect_host, 842 options.remote_forwards[i].connect_host,
809 options.remote_forwards[i].connect_port); 843 options.remote_forwards[i].connect_port);
810 channel_request_remote_forwarding( 844 if (channel_request_remote_forwarding(
811 options.remote_forwards[i].listen_host, 845 options.remote_forwards[i].listen_host,
812 options.remote_forwards[i].listen_port, 846 options.remote_forwards[i].listen_port,
813 options.remote_forwards[i].connect_host, 847 options.remote_forwards[i].connect_host,
814 options.remote_forwards[i].connect_port); 848 options.remote_forwards[i].connect_port) < 0) {
849 if (options.exit_on_forward_failure)
850 fatal("Could not request remote forwarding.");
851 else
852 logit("Warning: Could not request remote "
853 "forwarding.");
854 }
815 } 855 }
816} 856}
817 857
@@ -872,10 +912,10 @@ ssh_session(void)
872 /* Store window size in the packet. */ 912 /* Store window size in the packet. */
873 if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) < 0) 913 if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) < 0)
874 memset(&ws, 0, sizeof(ws)); 914 memset(&ws, 0, sizeof(ws));
875 packet_put_int(ws.ws_row); 915 packet_put_int((u_int)ws.ws_row);
876 packet_put_int(ws.ws_col); 916 packet_put_int((u_int)ws.ws_col);
877 packet_put_int(ws.ws_xpixel); 917 packet_put_int((u_int)ws.ws_xpixel);
878 packet_put_int(ws.ws_ypixel); 918 packet_put_int((u_int)ws.ws_ypixel);
879 919
880 /* Store tty modes in the packet. */ 920 /* Store tty modes in the packet. */
881 tty_make_modes(fileno(stdin), NULL); 921 tty_make_modes(fileno(stdin), NULL);
@@ -993,9 +1033,16 @@ client_global_request_reply_fwd(int type, u_int32_t seq, void *ctxt)
993 options.remote_forwards[i].listen_port, 1033 options.remote_forwards[i].listen_port,
994 options.remote_forwards[i].connect_host, 1034 options.remote_forwards[i].connect_host,
995 options.remote_forwards[i].connect_port); 1035 options.remote_forwards[i].connect_port);
996 if (type == SSH2_MSG_REQUEST_FAILURE) 1036 if (type == SSH2_MSG_REQUEST_FAILURE) {
997 logit("Warning: remote port forwarding failed for listen " 1037 if (options.exit_on_forward_failure)
998 "port %d", options.remote_forwards[i].listen_port); 1038 fatal("Error: remote port forwarding failed for "
1039 "listen port %d",
1040 options.remote_forwards[i].listen_port);
1041 else
1042 logit("Warning: remote port forwarding failed for "
1043 "listen port %d",
1044 options.remote_forwards[i].listen_port);
1045 }
999} 1046}
1000 1047
1001static void 1048static void
@@ -1024,7 +1071,7 @@ ssh_control_listener(void)
1024 fatal("%s socket(): %s", __func__, strerror(errno)); 1071 fatal("%s socket(): %s", __func__, strerror(errno));
1025 1072
1026 old_umask = umask(0177); 1073 old_umask = umask(0177);
1027 if (bind(control_fd, (struct sockaddr*)&addr, addr_len) == -1) { 1074 if (bind(control_fd, (struct sockaddr *)&addr, addr_len) == -1) {
1028 control_fd = -1; 1075 control_fd = -1;
1029 if (errno == EINVAL || errno == EADDRINUSE) 1076 if (errno == EINVAL || errno == EADDRINUSE)
1030 fatal("ControlSocket %s already exists", 1077 fatal("ControlSocket %s already exists",
@@ -1176,15 +1223,16 @@ ssh_session2(void)
1176static void 1223static void
1177load_public_identity_files(void) 1224load_public_identity_files(void)
1178{ 1225{
1179 char *filename; 1226 char *filename, *cp, thishost[NI_MAXHOST];
1180 int i = 0; 1227 int i = 0;
1181 Key *public; 1228 Key *public;
1229 struct passwd *pw;
1182#ifdef SMARTCARD 1230#ifdef SMARTCARD
1183 Key **keys; 1231 Key **keys;
1184 1232
1185 if (options.smartcard_device != NULL && 1233 if (options.smartcard_device != NULL &&
1186 options.num_identity_files < SSH_MAX_IDENTITY_FILES && 1234 options.num_identity_files < SSH_MAX_IDENTITY_FILES &&
1187 (keys = sc_get_keys(options.smartcard_device, NULL)) != NULL ) { 1235 (keys = sc_get_keys(options.smartcard_device, NULL)) != NULL) {
1188 int count = 0; 1236 int count = 0;
1189 for (i = 0; keys[i] != NULL; i++) { 1237 for (i = 0; keys[i] != NULL; i++) {
1190 count++; 1238 count++;
@@ -1202,9 +1250,18 @@ load_public_identity_files(void)
1202 xfree(keys); 1250 xfree(keys);
1203 } 1251 }
1204#endif /* SMARTCARD */ 1252#endif /* SMARTCARD */
1253 if ((pw = getpwuid(original_real_uid)) == NULL)
1254 fatal("load_public_identity_files: getpwuid failed");
1255 if (gethostname(thishost, sizeof(thishost)) == -1)
1256 fatal("load_public_identity_files: gethostname: %s",
1257 strerror(errno));
1205 for (; i < options.num_identity_files; i++) { 1258 for (; i < options.num_identity_files; i++) {
1206 filename = tilde_expand_filename(options.identity_files[i], 1259 cp = tilde_expand_filename(options.identity_files[i],
1207 original_real_uid); 1260 original_real_uid);
1261 filename = percent_expand(cp, "d", pw->pw_dir,
1262 "u", pw->pw_name, "l", thishost, "h", host,
1263 "r", options.user, (char *)NULL);
1264 xfree(cp);
1208 public = key_load_public(filename, NULL); 1265 public = key_load_public(filename, NULL);
1209 debug("identity file %s type %d", filename, 1266 debug("identity file %s type %d", filename,
1210 public ? public->type : -1); 1267 public ? public->type : -1);
@@ -1230,14 +1287,14 @@ control_client_sigrelay(int signo)
1230static int 1287static int
1231env_permitted(char *env) 1288env_permitted(char *env)
1232{ 1289{
1233 int i; 1290 int i, ret;
1234 char name[1024], *cp; 1291 char name[1024], *cp;
1235 1292
1236 strlcpy(name, env, sizeof(name)); 1293 if ((cp = strchr(env, '=')) == NULL || cp == env)
1237 if ((cp = strchr(name, '=')) == NULL)
1238 return (0); 1294 return (0);
1239 1295 ret = snprintf(name, sizeof(name), "%.*s", (int)(cp - env), env);
1240 *cp = '\0'; 1296 if (ret <= 0 || (size_t)ret >= sizeof(name))
1297 fatal("env_permitted: name '%.100s...' too long", env);
1241 1298
1242 for (i = 0; i < options.num_send_env; i++) 1299 for (i = 0; i < options.num_send_env; i++)
1243 if (match_pattern(name, options.send_env[i])) 1300 if (match_pattern(name, options.send_env[i]))
@@ -1282,29 +1339,29 @@ control_client(const char *path)
1282 if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) 1339 if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0)
1283 fatal("%s socket(): %s", __func__, strerror(errno)); 1340 fatal("%s socket(): %s", __func__, strerror(errno));
1284 1341
1285 if (connect(sock, (struct sockaddr*)&addr, addr_len) == -1) { 1342 if (connect(sock, (struct sockaddr *)&addr, addr_len) == -1) {
1286 if (mux_command != SSHMUX_COMMAND_OPEN) { 1343 if (mux_command != SSHMUX_COMMAND_OPEN) {
1287 fatal("Control socket connect(%.100s): %s", path, 1344 fatal("Control socket connect(%.100s): %s", path,
1288 strerror(errno)); 1345 strerror(errno));
1289 } 1346 }
1290 if (errno == ENOENT) 1347 if (errno == ENOENT)
1291 debug("Control socket \"%.100s\" does not exist", path); 1348 debug("Control socket \"%.100s\" does not exist", path);
1292 else { 1349 else {
1293 error("Control socket connect(%.100s): %s", path, 1350 error("Control socket connect(%.100s): %s", path,
1294 strerror(errno)); 1351 strerror(errno));
1295 } 1352 }
1296 close(sock); 1353 close(sock);
1297 return; 1354 return;
1298 } 1355 }
1299 1356
1300 if (stdin_null_flag) { 1357 if (stdin_null_flag) {
1301 if ((fd = open(_PATH_DEVNULL, O_RDONLY)) == -1) 1358 if ((fd = open(_PATH_DEVNULL, O_RDONLY)) == -1)
1302 fatal("open(/dev/null): %s", strerror(errno)); 1359 fatal("open(/dev/null): %s", strerror(errno));
1303 if (dup2(fd, STDIN_FILENO) == -1) 1360 if (dup2(fd, STDIN_FILENO) == -1)
1304 fatal("dup2: %s", strerror(errno)); 1361 fatal("dup2: %s", strerror(errno));
1305 if (fd > STDERR_FILENO) 1362 if (fd > STDERR_FILENO)
1306 close(fd); 1363 close(fd);
1307 } 1364 }
1308 1365
1309 term = getenv("TERM"); 1366 term = getenv("TERM");
1310 1367
diff --git a/ssh.h b/ssh.h
index 07592415b..186cfff96 100644
--- a/ssh.h
+++ b/ssh.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh.h,v 1.76 2004/12/06 11:41:03 dtucker Exp $ */ 1/* $OpenBSD: ssh.h,v 1.78 2006/08/03 03:34:42 deraadt Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -12,18 +12,6 @@
12 * called by a name other than "ssh" or "Secure Shell". 12 * called by a name other than "ssh" or "Secure Shell".
13 */ 13 */
14 14
15#ifndef SSH_H
16#define SSH_H
17
18#include <netinet/in.h> /* For struct sockaddr_in */
19#include <pwd.h> /* For struct pw */
20#include <stdarg.h> /* For va_list */
21#include <syslog.h> /* For LOG_AUTH and friends */
22#include <sys/socket.h> /* For struct sockaddr_storage */
23#ifdef HAVE_SYS_SELECT_H
24# include <sys/select.h>
25#endif
26
27/* Cipher used for encrypting authentication files. */ 15/* Cipher used for encrypting authentication files. */
28#define SSH_AUTHFILE_CIPHER SSH_CIPHER_3DES 16#define SSH_AUTHFILE_CIPHER SSH_CIPHER_3DES
29 17
@@ -112,5 +100,3 @@
112 100
113/* Listen backlog for sshd, ssh-agent and forwarding sockets */ 101/* Listen backlog for sshd, ssh-agent and forwarding sockets */
114#define SSH_LISTEN_BACKLOG 128 102#define SSH_LISTEN_BACKLOG 128
115
116#endif /* SSH_H */
diff --git a/ssh1.h b/ssh1.h
index 1741c229a..353d93041 100644
--- a/ssh1.h
+++ b/ssh1.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh1.h,v 1.5 2004/10/20 11:48:53 markus Exp $ */ 1/* $OpenBSD: ssh1.h,v 1.6 2006/03/25 22:22:43 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
diff --git a/ssh2.h b/ssh2.h
index fb491c918..cf56bc4ee 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.10 2006/03/25 22:22:43 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
diff --git a/ssh_config b/ssh_config
index 7bc8762d6..1257c0778 100644
--- a/ssh_config
+++ b/ssh_config
@@ -1,4 +1,4 @@
1# $OpenBSD: ssh_config,v 1.21 2005/12/06 22:38:27 reyk Exp $ 1# $OpenBSD: ssh_config,v 1.22 2006/05/29 12:56:33 dtucker 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
@@ -24,6 +24,10 @@
24# RSAAuthentication yes 24# RSAAuthentication yes
25# PasswordAuthentication yes 25# PasswordAuthentication yes
26# HostbasedAuthentication no 26# HostbasedAuthentication no
27# GSSAPIAuthentication no
28# GSSAPIDelegateCredentials no
29# GSSAPIKeyExchange no
30# GSSAPITrustDNS no
27# BatchMode no 31# BatchMode no
28# CheckHostIP yes 32# CheckHostIP yes
29# AddressFamily any 33# AddressFamily any
diff --git a/ssh_config.0 b/ssh_config.0
index 46a0543c3..2ca4ee31b 100644
--- a/ssh_config.0
+++ b/ssh_config.0
@@ -8,8 +8,9 @@ SYNOPSIS
8 /etc/ssh/ssh_config 8 /etc/ssh/ssh_config
9 9
10DESCRIPTION 10DESCRIPTION
11 ssh obtains configuration data from the following sources in the follow- 11 ssh(1) obtains configuration data from the following sources in the fol-
12 ing order: 12 lowing order:
13
13 1. command-line options 14 1. command-line options
14 2. user's configuration file (~/.ssh/config) 15 2. user's configuration file (~/.ssh/config)
15 3. system-wide configuration file (/etc/ssh/ssh_config) 16 3. system-wide configuration file (/etc/ssh/ssh_config)
@@ -26,28 +27,29 @@ DESCRIPTION
26 27
27 The configuration file has the following format: 28 The configuration file has the following format:
28 29
29 Empty lines and lines starting with `#' are comments. 30 Empty lines and lines starting with `#' are comments. Otherwise a line
30 31 is of the format ``keyword arguments''. Configuration options may be
31 Otherwise a line is of the format ``keyword arguments''. Configuration 32 separated by whitespace or optional whitespace and exactly one `='; the
32 options may be separated by whitespace or optional whitespace and exactly 33 latter format is useful to avoid the need to quote whitespace when speci-
33 one `='; the latter format is useful to avoid the need to quote whites- 34 fying configuration options using the ssh, scp, and sftp -o option. Ar-
34 pace when specifying configuration options using the ssh, scp and sftp -o 35 guments may optionally be enclosed in double quotes (") in order to rep-
35 option. 36 resent arguments containing spaces.
36 37
37 The possible keywords and their meanings are as follows (note that key- 38 The possible keywords and their meanings are as follows (note that key-
38 words are case-insensitive and arguments are case-sensitive): 39 words are case-insensitive and arguments are case-sensitive):
39 40
40 Host Restricts the following declarations (up to the next Host key- 41 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 42 word) to be only for those hosts that match one of the patterns
42 given after the keyword. `*' and `?' can be used as wildcards in 43 given after the keyword. A single `*' as a pattern can be used
43 the patterns. A single `*' as a pattern can be used to provide 44 to provide global defaults for all hosts. The host is the
44 global defaults for all hosts. The host is the hostname argument 45 hostname argument given on the command line (i.e. the name is not
45 given on the command line (i.e., the name is not converted to a 46 converted to a canonicalized host name before matching).
46 canonicalized host name before matching). 47
48 See PATTERNS for more information on patterns.
47 49
48 AddressFamily 50 AddressFamily
49 Specifies which address family to use when connecting. Valid ar- 51 Specifies which address family to use when connecting. Valid ar-
50 guments are ``any'', ``inet'' (use IPv4 only) or ``inet6'' (use 52 guments are ``any'', ``inet'' (use IPv4 only), or ``inet6'' (use
51 IPv6 only). 53 IPv6 only).
52 54
53 BatchMode 55 BatchMode
@@ -63,23 +65,23 @@ DESCRIPTION
63 UsePrivilegedPort is set to ``yes''. 65 UsePrivilegedPort is set to ``yes''.
64 66
65 ChallengeResponseAuthentication 67 ChallengeResponseAuthentication
66 Specifies whether to use challenge response authentication. The 68 Specifies whether to use challenge-response authentication. The
67 argument to this keyword must be ``yes'' or ``no''. The default 69 argument to this keyword must be ``yes'' or ``no''. The default
68 is ``yes''. 70 is ``yes''.
69 71
70 CheckHostIP 72 CheckHostIP
71 If this flag is set to ``yes'', ssh will additionally check the 73 If this flag is set to ``yes'', ssh(1) will additionally check
72 host IP address in the known_hosts file. This allows ssh to de- 74 the host IP address in the known_hosts file. This allows ssh to
73 tect if a host key changed due to DNS spoofing. If the option is 75 detect if a host key changed due to DNS spoofing. If the option
74 set to ``no'', the check will not be executed. The default is 76 is set to ``no'', the check will not be executed. The default is
75 ``yes''. 77 ``yes''.
76 78
77 Cipher Specifies the cipher to use for encrypting the session in proto- 79 Cipher Specifies the cipher to use for encrypting the session in proto-
78 col version 1. Currently, ``blowfish'', ``3des'', and ``des'' 80 col version 1. Currently, ``blowfish'', ``3des'', and ``des''
79 are supported. des is only supported in the ssh client for in- 81 are supported. des is only supported in the ssh(1) client for
80 teroperability with legacy protocol 1 implementations that do not 82 interoperability with legacy protocol 1 implementations that do
81 support the 3des cipher. Its use is strongly discouraged due to 83 not support the 3des cipher. Its use is strongly discouraged due
82 cryptographic weaknesses. The default is ``3des''. 84 to cryptographic weaknesses. The default is ``3des''.
83 85
84 Ciphers 86 Ciphers
85 Specifies the ciphers allowed for protocol version 2 in order of 87 Specifies the ciphers allowed for protocol version 2 in order of
@@ -87,19 +89,19 @@ DESCRIPTION
87 ported ciphers are ``3des-cbc'', ``aes128-cbc'', ``aes192-cbc'', 89 ported ciphers are ``3des-cbc'', ``aes128-cbc'', ``aes192-cbc'',
88 ``aes256-cbc'', ``aes128-ctr'', ``aes192-ctr'', ``aes256-ctr'', 90 ``aes256-cbc'', ``aes128-ctr'', ``aes192-ctr'', ``aes256-ctr'',
89 ``arcfour128'', ``arcfour256'', ``arcfour'', ``blowfish-cbc'', 91 ``arcfour128'', ``arcfour256'', ``arcfour'', ``blowfish-cbc'',
90 and ``cast128-cbc''. The default is 92 and ``cast128-cbc''. The default is:
91 93
92 ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128, 94 aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,
93 arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr, 95 arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr,
94 aes192-ctr,aes256-ctr'' 96 aes192-ctr,aes256-ctr
95 97
96 ClearAllForwardings 98 ClearAllForwardings
97 Specifies that all local, remote and dynamic port forwardings 99 Specifies that all local, remote, and dynamic port forwardings
98 specified in the configuration files or on the command line be 100 specified in the configuration files or on the command line be
99 cleared. This option is primarily useful when used from the ssh 101 cleared. This option is primarily useful when used from the
100 command line to clear port forwardings set in configuration 102 ssh(1) command line to clear port forwardings set in configura-
101 files, and is automatically set by scp(1) and sftp(1). The argu- 103 tion files, and is automatically set by scp(1) and sftp(1). The
102 ment must be ``yes'' or ``no''. The default is ``no''. 104 argument must be ``yes'' or ``no''. The default is ``no''.
103 105
104 Compression 106 Compression
105 Specifies whether to use compression. The argument must be 107 Specifies whether to use compression. The argument must be
@@ -119,16 +121,16 @@ DESCRIPTION
119 121
120 ConnectTimeout 122 ConnectTimeout
121 Specifies the timeout (in seconds) used when connecting to the 123 Specifies the timeout (in seconds) used when connecting to the
122 ssh server, instead of using the default system TCP timeout. 124 SSH server, instead of using the default system TCP timeout.
123 This value is used only when the target is down or really un- 125 This value is used only when the target is down or really un-
124 reachable, not when it refuses the connection. 126 reachable, not when it refuses the connection.
125 127
126 ControlMaster 128 ControlMaster
127 Enables the sharing of multiple sessions over a single network 129 Enables the sharing of multiple sessions over a single network
128 connection. When set to ``yes'' ssh will listen for connections 130 connection. When set to ``yes'', ssh(1) will listen for connec-
129 on a control socket specified using the ControlPath argument. 131 tions on a control socket specified using the ControlPath argu-
130 Additional sessions can connect to this socket using the same 132 ment. Additional sessions can connect to this socket using the
131 ControlPath with ControlMaster set to ``no'' (the default). 133 same ControlPath with ControlMaster set to ``no'' (the default).
132 These sessions will try to reuse the master instance's network 134 These sessions will try to reuse the master instance's network
133 connection rather than initiating new ones, but will fall back to 135 connection rather than initiating new ones, but will fall back to
134 connecting normally if the control socket does not exist, or is 136 connecting normally if the control socket does not exist, or is
@@ -137,7 +139,7 @@ DESCRIPTION
137 Setting this to ``ask'' will cause ssh to listen for control con- 139 Setting this to ``ask'' will cause ssh to listen for control con-
138 nections, but require confirmation using the SSH_ASKPASS program 140 nections, but require confirmation using the SSH_ASKPASS program
139 before they are accepted (see ssh-add(1) for details). If the 141 before they are accepted (see ssh-add(1) for details). If the
140 ControlPath can not be opened, ssh will continue without connect- 142 ControlPath cannot be opened, ssh will continue without connect-
141 ing to a master instance. 143 ing to a master instance.
142 144
143 X11 and ssh-agent(1) forwarding is supported over these multi- 145 X11 and ssh-agent(1) forwarding is supported over these multi-
@@ -154,12 +156,12 @@ DESCRIPTION
154 ControlPath 156 ControlPath
155 Specify the path to the control socket used for connection shar- 157 Specify the path to the control socket used for connection shar-
156 ing as described in the ControlMaster section above or the string 158 ing as described in the ControlMaster section above or the string
157 ``none'' to disable connection sharing. In the path, `%h' will 159 ``none'' to disable connection sharing. In the path, `%l' will
158 be substituted by the target host name, `%p' the port and `%r' by 160 be substituted by the local host name, `%h' will be substituted
159 the remote login username. It is recommended that any 161 by the target host name, `%p' the port, and `%r' by the remote
160 ControlPath used for opportunistic connection sharing include all 162 login username. It is recommended that any ControlPath used for
161 three of these escape sequences. This ensures that shared con- 163 opportunistic connection sharing include at least %h, %p, and %r.
162 nections are uniquely identified. 164 This ensures that shared connections are uniquely identified.
163 165
164 DynamicForward 166 DynamicForward
165 Specifies that a TCP port on the local machine be forwarded over 167 Specifies that a TCP port on the local machine be forwarded over
@@ -176,9 +178,9 @@ DESCRIPTION
176 while an empty address or `*' indicates that the port should be 178 while an empty address or `*' indicates that the port should be
177 available from all interfaces. 179 available from all interfaces.
178 180
179 Currently the SOCKS4 and SOCKS5 protocols are supported, and ssh 181 Currently the SOCKS4 and SOCKS5 protocols are supported, and
180 will act as a SOCKS server. Multiple forwardings may be speci- 182 ssh(1) will act as a SOCKS server. Multiple forwardings may be
181 fied, and additional forwardings can be given on the command 183 specified, and additional forwardings can be given on the command
182 line. Only the superuser can forward privileged ports. 184 line. Only the superuser can forward privileged ports.
183 185
184 EnableSSHKeysign 186 EnableSSHKeysign
@@ -196,6 +198,12 @@ DESCRIPTION
196 able the escape character entirely (making the connection trans- 198 able the escape character entirely (making the connection trans-
197 parent for binary data). 199 parent for binary data).
198 200
201 ExitOnForwardFailure
202 Specifies whether ssh(1) should terminate the connection if it
203 cannot set up all requested dynamic, local, and remote port for-
204 wardings. The argument must be ``yes'' or ``no''. The default
205 is ``no''.
206
199 ForwardAgent 207 ForwardAgent
200 Specifies whether the connection to the authentication agent (if 208 Specifies whether the connection to the authentication agent (if
201 any) will be forwarded to the remote machine. The argument must 209 any) will be forwarded to the remote machine. The argument must
@@ -222,15 +230,14 @@ DESCRIPTION
222 ForwardX11Trusted option is also enabled. 230 ForwardX11Trusted option is also enabled.
223 231
224 ForwardX11Trusted 232 ForwardX11Trusted
225 If this option is set to ``yes'' then remote X11 clients will 233 If this option is set to ``yes'', remote X11 clients will have
226 have full access to the original X11 display. 234 full access to the original X11 display.
227 235
228 If this option is set to ``no'' then remote X11 clients will be 236 If this option is set to ``no'', remote X11 clients will be con-
229 considered untrusted and prevented from stealing or tampering 237 sidered untrusted and prevented from stealing or tampering with
230 with data belonging to trusted X11 clients. Furthermore, the 238 data belonging to trusted X11 clients. Furthermore, the xauth(1)
231 xauth(1) token used for the session will be set to expire after 239 token used for the session will be set to expire after 20 min-
232 20 minutes. Remote clients will be refused access after this 240 utes. Remote clients will be refused access after this time.
233 time.
234 241
235 The default is ``no''. 242 The default is ``no''.
236 243
@@ -239,12 +246,13 @@ DESCRIPTION
239 246
240 GatewayPorts 247 GatewayPorts
241 Specifies whether remote hosts are allowed to connect to local 248 Specifies whether remote hosts are allowed to connect to local
242 forwarded ports. By default, ssh binds local port forwardings to 249 forwarded ports. By default, ssh(1) binds local port forwardings
243 the loopback address. This prevents other remote hosts from con- 250 to the loopback address. This prevents other remote hosts from
244 necting to forwarded ports. GatewayPorts can be used to specify 251 connecting to forwarded ports. GatewayPorts can be used to spec-
245 that ssh should bind local port forwardings to the wildcard ad- 252 ify that ssh should bind local port forwardings to the wildcard
246 dress, thus allowing remote hosts to connect to forwarded ports. 253 address, thus allowing remote hosts to connect to forwarded
247 The argument must be ``yes'' or ``no''. The default is ``no''. 254 ports. The argument must be ``yes'' or ``no''. The default is
255 ``no''.
248 256
249 GlobalKnownHostsFile 257 GlobalKnownHostsFile
250 Specifies a file to use for the global host key database instead 258 Specifies a file to use for the global host key database instead
@@ -261,13 +269,13 @@ DESCRIPTION
261 ly. 269 ly.
262 270
263 HashKnownHosts 271 HashKnownHosts
264 Indicates that ssh should hash host names and addresses when they 272 Indicates that ssh(1) should hash host names and addresses when
265 are added to ~/.ssh/known_hosts. These hashed names may be used 273 they are added to ~/.ssh/known_hosts. These hashed names may be
266 normally by ssh and sshd, but they do not reveal identifying in- 274 used normally by ssh(1) and sshd(8), but they do not reveal iden-
267 formation should the file's contents be disclosed. The default 275 tifying information should the file's contents be disclosed. The
268 is ``no''. Note that hashing of names and addresses will not be 276 default is ``no''. Note that existing names and addresses in
269 retrospectively applied to existing known hosts files, but these 277 known hosts files will not be converted automatically, but may be
270 may be manually hashed using ssh-keygen(1). 278 manually hashed using ssh-keygen(1).
271 279
272 HostbasedAuthentication 280 HostbasedAuthentication
273 Specifies whether to try rhosts based authentication with public 281 Specifies whether to try rhosts based authentication with public
@@ -283,19 +291,19 @@ DESCRIPTION
283 HostKeyAlias 291 HostKeyAlias
284 Specifies an alias that should be used instead of the real host 292 Specifies an alias that should be used instead of the real host
285 name when looking up or saving the host key in the host key 293 name when looking up or saving the host key in the host key
286 database files. This option is useful for tunneling ssh connec- 294 database files. This option is useful for tunneling SSH connec-
287 tions or for multiple servers running on a single host. 295 tions or for multiple servers running on a single host.
288 296
289 HostName 297 HostName
290 Specifies the real host name to log into. This can be used to 298 Specifies the real host name to log into. This can be used to
291 specify nicknames or abbreviations for hosts. Default is the 299 specify nicknames or abbreviations for hosts. The default is the
292 name given on the command line. Numeric IP addresses are also 300 name given on the command line. Numeric IP addresses are also
293 permitted (both on the command line and in HostName specifica- 301 permitted (both on the command line and in HostName specifica-
294 tions). 302 tions).
295 303
296 IdentitiesOnly 304 IdentitiesOnly
297 Specifies that ssh should only use the authentication identity 305 Specifies that ssh(1) should only use the authentication identity
298 files configured in the ssh_config files, even if the ssh-agent 306 files configured in the ssh_config files, even if ssh-agent(1)
299 offers more identities. The argument to this keyword must be 307 offers more identities. The argument to this keyword must be
300 ``yes'' or ``no''. This option is intended for situations where 308 ``yes'' or ``no''. This option is intended for situations where
301 ssh-agent offers many different identities. The default is 309 ssh-agent offers many different identities. The default is
@@ -306,15 +314,23 @@ DESCRIPTION
306 identity is read. The default is ~/.ssh/identity for protocol 314 identity is read. The default is ~/.ssh/identity for protocol
307 version 1, and ~/.ssh/id_rsa and ~/.ssh/id_dsa for protocol ver- 315 version 1, and ~/.ssh/id_rsa and ~/.ssh/id_dsa for protocol ver-
308 sion 2. Additionally, any identities represented by the authen- 316 sion 2. Additionally, any identities represented by the authen-
309 tication agent will be used for authentication. The file name 317 tication agent will be used for authentication.
310 may use the tilde syntax to refer to a user's home directory. It 318
311 is possible to have multiple identity files specified in configu- 319 The file name may use the tilde syntax to refer to a user's home
312 ration files; all these identities will be tried in sequence. 320 directory or one of the following escape characters: `%d' (local
321 user's home directory), `%u' (local user name), `%l' (local host
322 name), `%h' (remote host name) or `%r' (remote user name).
323
324 It is possible to have multiple identity files specified in con-
325 figuration files; all these identities will be tried in sequence.
313 326
314 KbdInteractiveDevices 327 KbdInteractiveDevices
315 Specifies the list of methods to use in keyboard-interactive au- 328 Specifies the list of methods to use in keyboard-interactive au-
316 thentication. Multiple method names must be comma-separated. 329 thentication. Multiple method names must be comma-separated.
317 The default is to use the server specified list. 330 The default is to use the server specified list. The methods
331 available vary depending on what the server supports. For an
332 OpenSSH server, it may be zero or more of: ``bsdauth'', ``pam'',
333 and ``skey''.
318 334
319 LocalCommand 335 LocalCommand
320 Specifies a command to execute on the local machine after suc- 336 Specifies a command to execute on the local machine after suc-
@@ -341,15 +357,15 @@ DESCRIPTION
341 357
342 LogLevel 358 LogLevel
343 Gives the verbosity level that is used when logging messages from 359 Gives the verbosity level that is used when logging messages from
344 ssh. The possible values are: QUIET, FATAL, ERROR, INFO, VER- 360 ssh(1). The possible values are: QUIET, FATAL, ERROR, INFO, VER-
345 BOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3. The default is INFO. 361 BOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. The default is INFO.
346 DEBUG and DEBUG1 are equivalent. DEBUG2 and DEBUG3 each specify 362 DEBUG and DEBUG1 are equivalent. DEBUG2 and DEBUG3 each specify
347 higher levels of verbose output. 363 higher levels of verbose output.
348 364
349 MACs Specifies the MAC (message authentication code) algorithms in or- 365 MACs Specifies the MAC (message authentication code) algorithms in or-
350 der of preference. The MAC algorithm is used in protocol version 366 der of preference. The MAC algorithm is used in protocol version
351 2 for data integrity protection. Multiple algorithms must be 367 2 for data integrity protection. Multiple algorithms must be
352 comma-separated. The default is ``hmac-md5,hmac-sha1,hmac- 368 comma-separated. The default is: ``hmac-md5,hmac-sha1,hmac-
353 ripemd160,hmac-sha1-96,hmac-md5-96''. 369 ripemd160,hmac-sha1-96,hmac-md5-96''.
354 370
355 NoHostAuthenticationForLocalhost 371 NoHostAuthenticationForLocalhost
@@ -363,7 +379,7 @@ DESCRIPTION
363 379
364 NumberOfPasswordPrompts 380 NumberOfPasswordPrompts
365 Specifies the number of password prompts before giving up. The 381 Specifies the number of password prompts before giving up. The
366 argument to this keyword must be an integer. Default is 3. 382 argument to this keyword must be an integer. The default is 3.
367 383
368 PasswordAuthentication 384 PasswordAuthentication
369 Specifies whether to use password authentication. The argument 385 Specifies whether to use password authentication. The argument
@@ -375,20 +391,20 @@ DESCRIPTION
375 ing the !command escape sequence in ssh(1). The argument must be 391 ing the !command escape sequence in ssh(1). The argument must be
376 ``yes'' or ``no''. The default is ``no''. 392 ``yes'' or ``no''. The default is ``no''.
377 393
378 Port Specifies the port number to connect on the remote host. Default 394 Port Specifies the port number to connect on the remote host. The de-
379 is 22. 395 fault is 22.
380 396
381 PreferredAuthentications 397 PreferredAuthentications
382 Specifies the order in which the client should try protocol 2 au- 398 Specifies the order in which the client should try protocol 2 au-
383 thentication methods. This allows a client to prefer one method 399 thentication methods. This allows a client to prefer one method
384 (e.g. keyboard-interactive) over another method (e.g. password) 400 (e.g. keyboard-interactive) over another method (e.g. password)
385 The default for this option is: ``hostbased,publickey,keyboard- 401 The default for this option is: ``gssapi-with-mic,hostbased,
386 interactive,password''. 402 publickey, keyboard-interactive, password''.
387 403
388 Protocol 404 Protocol
389 Specifies the protocol versions ssh should support in order of 405 Specifies the protocol versions ssh(1) should support in order of
390 preference. The possible values are ``1'' and ``2''. Multiple 406 preference. The possible values are `1' and `2'. Multiple ver-
391 versions must be comma-separated. The default is ``2,1''. This 407 sions must be comma-separated. The default is ``2,1''. This
392 means that ssh tries version 2 and falls back to version 1 if 408 means that ssh tries version 2 and falls back to version 1 if
393 version 2 is not available. 409 version 2 is not available.
394 410
@@ -422,8 +438,8 @@ DESCRIPTION
422 fore the session key is renegotiated. The argument is the number 438 fore the session key is renegotiated. The argument is the number
423 of bytes, with an optional suffix of `K', `M', or `G' to indicate 439 of bytes, with an optional suffix of `K', `M', or `G' to indicate
424 Kilobytes, Megabytes, or Gigabytes, respectively. The default is 440 Kilobytes, Megabytes, or Gigabytes, respectively. The default is
425 between ``1G'' and ``4G'', depending on the cipher. This option 441 between `1G' and `4G', depending on the cipher. This option ap-
426 applies to protocol version 2 only. 442 plies to protocol version 2 only.
427 443
428 RemoteForward 444 RemoteForward
429 Specifies that a TCP port on the remote machine be forwarded over 445 Specifies that a TCP port on the remote machine be forwarded over
@@ -446,7 +462,7 @@ DESCRIPTION
446 Specifies whether to try rhosts based authentication with RSA 462 Specifies whether to try rhosts based authentication with RSA
447 host authentication. The argument must be ``yes'' or ``no''. 463 host authentication. The argument must be ``yes'' or ``no''.
448 The default is ``no''. This option applies to protocol version 1 464 The default is ``no''. This option applies to protocol version 1
449 only and requires ssh to be setuid root. 465 only and requires ssh(1) to be setuid root.
450 466
451 RSAAuthentication 467 RSAAuthentication
452 Specifies whether to try RSA authentication. The argument to 468 Specifies whether to try RSA authentication. The argument to
@@ -458,21 +474,23 @@ DESCRIPTION
458 SendEnv 474 SendEnv
459 Specifies what variables from the local environ(7) should be sent 475 Specifies what variables from the local environ(7) should be sent
460 to the server. Note that environment passing is only supported 476 to the server. Note that environment passing is only supported
461 for protocol 2, the server must also support it, and the server 477 for protocol 2. The server must also support it, and the server
462 must be configured to accept these environment variables. Refer 478 must be configured to accept these environment variables. Refer
463 to AcceptEnv in sshd_config(5) for how to configure the server. 479 to AcceptEnv in sshd_config(5) for how to configure the server.
464 Variables are specified by name, which may contain the wildcard 480 Variables are specified by name, which may contain wildcard char-
465 characters `*' and `?'. Multiple environment variables may be 481 acters. Multiple environment variables may be separated by
466 separated by whitespace or spread across multiple SendEnv direc- 482 whitespace or spread across multiple SendEnv directives. The de-
467 tives. The default is not to send any environment variables. 483 fault is not to send any environment variables.
484
485 See PATTERNS for more information on patterns.
468 486
469 ServerAliveCountMax 487 ServerAliveCountMax
470 Sets the number of server alive messages (see below) which may be 488 Sets the number of server alive messages (see below) which may be
471 sent without ssh receiving any messages back from the server. If 489 sent without ssh(1) receiving any messages back from the server.
472 this threshold is reached while server alive messages are being 490 If this threshold is reached while server alive messages are be-
473 sent, ssh will disconnect from the server, terminating the ses- 491 ing sent, ssh will disconnect from the server, terminating the
474 sion. It is important to note that the use of server alive mes- 492 session. It is important to note that the use of server alive
475 sages is very different from TCPKeepAlive (below). The server 493 messages is very different from TCPKeepAlive (below). The server
476 alive messages are sent through the encrypted channel and there- 494 alive messages are sent through the encrypted channel and there-
477 fore will not be spoofable. The TCP keepalive option enabled by 495 fore will not be spoofable. The TCP keepalive option enabled by
478 TCPKeepAlive is spoofable. The server alive mechanism is valu- 496 TCPKeepAlive is spoofable. The server alive mechanism is valu-
@@ -480,39 +498,41 @@ DESCRIPTION
480 tion has become inactive. 498 tion has become inactive.
481 499
482 The default value is 3. If, for example, ServerAliveInterval 500 The default value is 3. If, for example, ServerAliveInterval
483 (see below) is set to 15, and ServerAliveCountMax is left at the 501 (see below) is set to 15 and ServerAliveCountMax is left at the
484 default, if the server becomes unresponsive ssh will disconnect 502 default, if the server becomes unresponsive, ssh will disconnect
485 after approximately 45 seconds. 503 after approximately 45 seconds. This option applies to protocol
504 version 2 only.
486 505
487 ServerAliveInterval 506 ServerAliveInterval
488 Sets a timeout interval in seconds after which if no data has 507 Sets a timeout interval in seconds after which if no data has
489 been received from the server, ssh will send a message through 508 been received from the server, ssh(1) will send a message through
490 the encrypted channel to request a response from the server. The 509 the encrypted channel to request a response from the server. The
491 default is 0, indicating that these messages will not be sent to 510 default is 0, indicating that these messages will not be sent to
492 the server. This option applies to protocol version 2 only. 511 the server. This option applies to protocol version 2 only.
493 512
494 SmartcardDevice 513 SmartcardDevice
495 Specifies which smartcard device to use. The argument to this 514 Specifies which smartcard device to use. The argument to this
496 keyword is the device ssh should use to communicate with a smart- 515 keyword is the device ssh(1) should use to communicate with a
497 card used for storing the user's private RSA key. By default, no 516 smartcard used for storing the user's private RSA key. By de-
498 device is specified and smartcard support is not activated. 517 fault, no device is specified and smartcard support is not acti-
518 vated.
499 519
500 StrictHostKeyChecking 520 StrictHostKeyChecking
501 If this flag is set to ``yes'', ssh will never automatically add 521 If this flag is set to ``yes'', ssh(1) will never automatically
502 host keys to the ~/.ssh/known_hosts file, and refuses to connect 522 add host keys to the ~/.ssh/known_hosts file, and refuses to con-
503 to hosts whose host key has changed. This provides maximum pro- 523 nect to hosts whose host key has changed. This provides maximum
504 tection against trojan horse attacks, however, can be annoying 524 protection against trojan horse attacks, though it can be annoy-
505 when the /etc/ssh/ssh_known_hosts file is poorly maintained, or 525 ing when the /etc/ssh/ssh_known_hosts file is poorly maintained
506 connections to new hosts are frequently made. This option forces 526 or when connections to new hosts are frequently made. This op-
507 the user to manually add all new hosts. If this flag is set to 527 tion forces the user to manually add all new hosts. If this flag
508 ``no'', ssh will automatically add new host keys to the user 528 is set to ``no'', ssh will automatically add new host keys to the
509 known hosts files. If this flag is set to ``ask'', new host keys 529 user known hosts files. If this flag is set to ``ask'', new host
510 will be added to the user known host files only after the user 530 keys will be added to the user known host files only after the
511 has confirmed that is what they really want to do, and ssh will 531 user has confirmed that is what they really want to do, and ssh
512 refuse to connect to hosts whose host key has changed. The host 532 will refuse to connect to hosts whose host key has changed. The
513 keys of known hosts will be verified automatically in all cases. 533 host keys of known hosts will be verified automatically in all
514 The argument must be ``yes'', ``no'' or ``ask''. The default is 534 cases. The argument must be ``yes'', ``no'', or ``ask''. The
515 ``ask''. 535 default is ``ask''.
516 536
517 TCPKeepAlive 537 TCPKeepAlive
518 Specifies whether the system should send TCP keepalive messages 538 Specifies whether the system should send TCP keepalive messages
@@ -528,22 +548,27 @@ DESCRIPTION
528 To disable TCP keepalive messages, the value should be set to 548 To disable TCP keepalive messages, the value should be set to
529 ``no''. 549 ``no''.
530 550
531 Tunnel Request starting tun(4) device forwarding between the client and 551 Tunnel Request tun(4) device forwarding between the client and the serv-
532 the server. This option also allows requesting layer 2 (ether- 552 er. The argument must be ``yes'', ``point-to-point'' (layer 3),
533 net) instead of layer 3 (point-to-point) tunneling from the serv- 553 ``ethernet'' (layer 2), or ``no''. Specifying ``yes'' requests
534 er. The argument must be ``yes'', ``point-to-point'', 554 the default tunnel mode, which is ``point-to-point''. The de-
535 ``ethernet'' or ``no''. The default is ``no''. 555 fault is ``no''.
536 556
537 TunnelDevice 557 TunnelDevice
538 Force a specified tun(4) device on the client. Without this op- 558 Specifies the tun(4) devices to open on the client (local_tun)
539 tion, the next available device will be used. 559 and the server (remote_tun).
560
561 The argument must be local_tun[:remote_tun]. The devices may be
562 specified by numerical ID or the keyword ``any'', which uses the
563 next available tunnel device. If remote_tun is not specified, it
564 defaults to ``any''. The default is ``any:any''.
540 565
541 UsePrivilegedPort 566 UsePrivilegedPort
542 Specifies whether to use a privileged port for outgoing connec- 567 Specifies whether to use a privileged port for outgoing connec-
543 tions. The argument must be ``yes'' or ``no''. The default is 568 tions. The argument must be ``yes'' or ``no''. The default is
544 ``no''. If set to ``yes'' ssh must be setuid root. Note that 569 ``no''. If set to ``yes'', ssh(1) must be setuid root. Note
545 this option must be set to ``yes'' for RhostsRSAAuthentication 570 that this option must be set to ``yes'' for
546 with older servers. 571 RhostsRSAAuthentication with older servers.
547 572
548 User Specifies the user to log in as. This can be useful when a dif- 573 User Specifies the user to log in as. This can be useful when a dif-
549 ferent user name is used on different machines. This saves the 574 ferent user name is used on different machines. This saves the
@@ -562,18 +587,42 @@ DESCRIPTION
562 set to ``ask''. If this option is set to ``ask'', information on 587 set to ``ask''. If this option is set to ``ask'', information on
563 fingerprint match will be displayed, but the user will still need 588 fingerprint match will be displayed, but the user will still need
564 to confirm new host keys according to the StrictHostKeyChecking 589 to confirm new host keys according to the StrictHostKeyChecking
565 option. The argument must be ``yes'', ``no'' or ``ask''. The 590 option. The argument must be ``yes'', ``no'', or ``ask''. The
566 default is ``no''. Note that this option applies to protocol 591 default is ``no''. Note that this option applies to protocol
567 version 2 only. 592 version 2 only.
568 593
594 See also VERIFYING HOST KEYS in ssh(1).
595
569 XAuthLocation 596 XAuthLocation
570 Specifies the full pathname of the xauth(1) program. The default 597 Specifies the full pathname of the xauth(1) program. The default
571 is /usr/X11R6/bin/xauth. 598 is /usr/X11R6/bin/xauth.
572 599
600PATTERNS
601 A pattern consists of zero or more non-whitespace characters, `*' (a
602 wildcard that matches zero or more characters), or `?' (a wildcard that
603 matches exactly one character). For example, to specify a set of decla-
604 rations for any host in the ``.co.uk'' set of domains, the following pat-
605 tern could be used:
606
607 Host *.co.uk
608
609 The following pattern would match any host in the 192.168.0.[0-9] network
610 range:
611
612 Host 192.168.0.?
613
614 A pattern-list is a comma-separated list of patterns. Patterns within
615 pattern-lists may be negated by preceding them with an exclamation mark
616 (`!'). For example, to allow a key to be used from anywhere within an
617 organisation except from the ``dialup'' pool, the following entry (in au-
618 thorized_keys) could be used:
619
620 from="!*.dialup.example.com,*.example.com"
621
573FILES 622FILES
574 ~/.ssh/config 623 ~/.ssh/config
575 This is the per-user configuration file. The format of this file 624 This is the per-user configuration file. The format of this file
576 is described above. This file is used by the ssh client. Be- 625 is described above. This file is used by the SSH client. Be-
577 cause of the potential for abuse, this file must have strict per- 626 cause of the potential for abuse, this file must have strict per-
578 missions: read/write for the user, and not accessible by others. 627 missions: read/write for the user, and not accessible by others.
579 628
@@ -593,4 +642,4 @@ AUTHORS
593 ated OpenSSH. Markus Friedl contributed the support for SSH protocol 642 ated OpenSSH. Markus Friedl contributed the support for SSH protocol
594 versions 1.5 and 2.0. 643 versions 1.5 and 2.0.
595 644
596OpenBSD 3.9 September 25, 1999 9 645OpenBSD 4.1 September 25, 1999 10
diff --git a/ssh_config.5 b/ssh_config.5
index 5c41189fa..83de2f7e4 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.76 2006/01/20 11:21:45 jmc Exp $ 37.\" $OpenBSD: ssh_config.5,v 1.98 2007/01/10 13:23:22 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
@@ -42,14 +42,13 @@
42.Nm ssh_config 42.Nm ssh_config
43.Nd OpenSSH SSH client configuration files 43.Nd OpenSSH SSH client configuration files
44.Sh SYNOPSIS 44.Sh SYNOPSIS
45.Bl -tag -width Ds -compact 45.Nm ~/.ssh/config
46.It Pa ~/.ssh/config 46.Nm /etc/ssh/ssh_config
47.It Pa /etc/ssh/ssh_config
48.El
49.Sh DESCRIPTION 47.Sh DESCRIPTION
50.Nm ssh 48.Xr ssh 1
51obtains configuration data from the following sources in 49obtains configuration data from the following sources in
52the following order: 50the following order:
51.Pp
53.Bl -enum -offset indent -compact 52.Bl -enum -offset indent -compact
54.It 53.It
55command-line options 54command-line options
@@ -78,7 +77,6 @@ The configuration file has the following format:
78Empty lines and lines starting with 77Empty lines and lines starting with
79.Ql # 78.Ql #
80are comments. 79are comments.
81.Pp
82Otherwise a line is of the format 80Otherwise a line is of the format
83.Dq keyword arguments . 81.Dq keyword arguments .
84Configuration options may be separated by whitespace or 82Configuration options may be separated by whitespace or
@@ -87,11 +85,14 @@ optional whitespace and exactly one
87the latter format is useful to avoid the need to quote whitespace 85the latter format is useful to avoid the need to quote whitespace
88when specifying configuration options using the 86when specifying configuration options using the
89.Nm ssh , 87.Nm ssh ,
90.Nm scp 88.Nm scp ,
91and 89and
92.Nm sftp 90.Nm sftp
93.Fl o 91.Fl o
94option. 92option.
93Arguments may optionally be enclosed in double quotes
94.Pq \&"
95in order to represent arguments containing spaces.
95.Pp 96.Pp
96The possible 97The possible
97keywords and their meanings are as follows (note that 98keywords and their meanings are as follows (note that
@@ -102,25 +103,24 @@ Restricts the following declarations (up to the next
102.Cm Host 103.Cm Host
103keyword) to be only for those hosts that match one of the patterns 104keyword) to be only for those hosts that match one of the patterns
104given after the keyword. 105given after the keyword.
105.Ql \&*
106and
107.Ql \&?
108can be used as wildcards in the
109patterns.
110A single 106A single
111.Ql \&* 107.Ql *
112as a pattern can be used to provide global 108as a pattern can be used to provide global
113defaults for all hosts. 109defaults for all hosts.
114The host is the 110The host is the
115.Ar hostname 111.Ar hostname
116argument given on the command line (i.e., the name is not converted to 112argument given on the command line (i.e. the name is not converted to
117a canonicalized host name before matching). 113a canonicalized host name before matching).
114.Pp
115See
116.Sx PATTERNS
117for more information on patterns.
118.It Cm AddressFamily 118.It Cm AddressFamily
119Specifies which address family to use when connecting. 119Specifies which address family to use when connecting.
120Valid arguments are 120Valid arguments are
121.Dq any , 121.Dq any ,
122.Dq inet 122.Dq inet
123(use IPv4 only) or 123(use IPv4 only), or
124.Dq inet6 124.Dq inet6
125(use IPv6 only). 125(use IPv6 only).
126.It Cm BatchMode 126.It Cm BatchMode
@@ -144,7 +144,7 @@ Note that this option does not work if
144is set to 144is set to
145.Dq yes . 145.Dq yes .
146.It Cm ChallengeResponseAuthentication 146.It Cm ChallengeResponseAuthentication
147Specifies whether to use challenge response authentication. 147Specifies whether to use challenge-response authentication.
148The argument to this keyword must be 148The argument to this keyword must be
149.Dq yes 149.Dq yes
150or 150or
@@ -154,7 +154,8 @@ The default is
154.It Cm CheckHostIP 154.It Cm CheckHostIP
155If this flag is set to 155If this flag is set to
156.Dq yes , 156.Dq yes ,
157ssh will additionally check the host IP address in the 157.Xr ssh 1
158will additionally check the host IP address in the
158.Pa known_hosts 159.Pa known_hosts
159file. 160file.
160This allows ssh to detect if a host key changed due to DNS spoofing. 161This allows ssh to detect if a host key changed due to DNS spoofing.
@@ -174,7 +175,7 @@ and
174are supported. 175are supported.
175.Ar des 176.Ar des
176is only supported in the 177is only supported in the
177.Nm ssh 178.Xr ssh 1
178client for interoperability with legacy protocol 1 implementations 179client for interoperability with legacy protocol 1 implementations
179that do not support the 180that do not support the
180.Ar 3des 181.Ar 3des
@@ -200,18 +201,18 @@ The supported ciphers are
200.Dq blowfish-cbc , 201.Dq blowfish-cbc ,
201and 202and
202.Dq cast128-cbc . 203.Dq cast128-cbc .
203The default is 204The default is:
204.Bd -literal 205.Bd -literal -offset 3n
205 ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128, 206aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,
206 arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr, 207arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr,
207 aes192-ctr,aes256-ctr'' 208aes192-ctr,aes256-ctr
208.Ed 209.Ed
209.It Cm ClearAllForwardings 210.It Cm ClearAllForwardings
210Specifies that all local, remote and dynamic port forwardings 211Specifies that all local, remote, and dynamic port forwardings
211specified in the configuration files or on the command line be 212specified in the configuration files or on the command line be
212cleared. 213cleared.
213This option is primarily useful when used from the 214This option is primarily useful when used from the
214.Nm ssh 215.Xr ssh 1
215command line to clear port forwardings set in 216command line to clear port forwardings set in
216configuration files, and is automatically set by 217configuration files, and is automatically set by
217.Xr scp 1 218.Xr scp 1
@@ -244,15 +245,15 @@ The argument must be an integer.
244This may be useful in scripts if the connection sometimes fails. 245This may be useful in scripts if the connection sometimes fails.
245The default is 1. 246The default is 1.
246.It Cm ConnectTimeout 247.It Cm ConnectTimeout
247Specifies the timeout (in seconds) used when connecting to the ssh 248Specifies the timeout (in seconds) used when connecting to the
248server, instead of using the default system TCP timeout. 249SSH server, instead of using the default system TCP timeout.
249This value is used only when the target is down or really unreachable, 250This value is used only when the target is down or really unreachable,
250not when it refuses the connection. 251not when it refuses the connection.
251.It Cm ControlMaster 252.It Cm ControlMaster
252Enables the sharing of multiple sessions over a single network connection. 253Enables the sharing of multiple sessions over a single network connection.
253When set to 254When set to
254.Dq yes 255.Dq yes ,
255.Nm ssh 256.Xr ssh 1
256will listen for connections on a control socket specified using the 257will listen for connections on a control socket specified using the
257.Cm ControlPath 258.Cm ControlPath
258argument. 259argument.
@@ -269,8 +270,7 @@ if the control socket does not exist, or is not listening.
269.Pp 270.Pp
270Setting this to 271Setting this to
271.Dq ask 272.Dq ask
272will cause 273will cause ssh
273.Nm ssh
274to listen for control connections, but require confirmation using the 274to listen for control connections, but require confirmation using the
275.Ev SSH_ASKPASS 275.Ev SSH_ASKPASS
276program before they are accepted (see 276program before they are accepted (see
@@ -278,9 +278,8 @@ program before they are accepted (see
278for details). 278for details).
279If the 279If the
280.Cm ControlPath 280.Cm ControlPath
281can not be opened, 281cannot be opened,
282.Nm ssh 282ssh will continue without connecting to a master instance.
283will continue without connecting to a master instance.
284.Pp 283.Pp
285X11 and 284X11 and
286.Xr ssh-agent 1 285.Xr ssh-agent 1
@@ -306,16 +305,18 @@ section above or the string
306.Dq none 305.Dq none
307to disable connection sharing. 306to disable connection sharing.
308In the path, 307In the path,
308.Ql %l
309will be substituted by the local host name,
309.Ql %h 310.Ql %h
310will be substituted by the target host name, 311will be substituted by the target host name,
311.Ql %p 312.Ql %p
312the port and 313the port, and
313.Ql %r 314.Ql %r
314by the remote login username. 315by the remote login username.
315It is recommended that any 316It is recommended that any
316.Cm ControlPath 317.Cm ControlPath
317used for opportunistic connection sharing include 318used for opportunistic connection sharing include
318all three of these escape sequences. 319at least %h, %p, and %r.
319This ensures that shared connections are uniquely identified. 320This ensures that shared connections are uniquely identified.
320.It Cm DynamicForward 321.It Cm DynamicForward
321Specifies that a TCP port on the local machine be forwarded 322Specifies that a TCP port on the local machine be forwarded
@@ -346,7 +347,7 @@ empty address or
346indicates that the port should be available from all interfaces. 347indicates that the port should be available from all interfaces.
347.Pp 348.Pp
348Currently the SOCKS4 and SOCKS5 protocols are supported, and 349Currently the SOCKS4 and SOCKS5 protocols are supported, and
349.Nm ssh 350.Xr ssh 1
350will act as a SOCKS server. 351will act as a SOCKS server.
351Multiple forwardings may be specified, and 352Multiple forwardings may be specified, and
352additional forwardings can be given on the command line. 353additional forwardings can be given on the command line.
@@ -382,6 +383,17 @@ followed by a letter, or
382to disable the escape 383to disable the escape
383character entirely (making the connection transparent for binary 384character entirely (making the connection transparent for binary
384data). 385data).
386.It Cm ExitOnForwardFailure
387Specifies whether
388.Xr ssh 1
389should terminate the connection if it cannot set up all requested
390dynamic, local, and remote port forwardings.
391The argument must be
392.Dq yes
393or
394.Dq no .
395The default is
396.Dq no .
385.It Cm ForwardAgent 397.It Cm ForwardAgent
386Specifies whether the connection to the authentication agent (if any) 398Specifies whether the connection to the authentication agent (if any)
387will be forwarded to the remote machine. 399will be forwarded to the remote machine.
@@ -421,12 +433,12 @@ if the
421option is also enabled. 433option is also enabled.
422.It Cm ForwardX11Trusted 434.It Cm ForwardX11Trusted
423If this option is set to 435If this option is set to
424.Dq yes 436.Dq yes ,
425then remote X11 clients will have full access to the original X11 display. 437remote X11 clients will have full access to the original X11 display.
426.Pp 438.Pp
427If this option is set to 439If this option is set to
428.Dq no 440.Dq no ,
429then remote X11 clients will be considered untrusted and prevented 441remote X11 clients will be considered untrusted and prevented
430from stealing or tampering with data belonging to trusted X11 442from stealing or tampering with data belonging to trusted X11
431clients. 443clients.
432Furthermore, the 444Furthermore, the
@@ -443,12 +455,11 @@ the restrictions imposed on untrusted clients.
443Specifies whether remote hosts are allowed to connect to local 455Specifies whether remote hosts are allowed to connect to local
444forwarded ports. 456forwarded ports.
445By default, 457By default,
446.Nm ssh 458.Xr ssh 1
447binds local port forwardings to the loopback address. 459binds local port forwardings to the loopback address.
448This prevents other remote hosts from connecting to forwarded ports. 460This prevents other remote hosts from connecting to forwarded ports.
449.Cm GatewayPorts 461.Cm GatewayPorts
450can be used to specify that 462can be used to specify that ssh
451.Nm ssh
452should bind local port forwardings to the wildcard address, 463should bind local port forwardings to the wildcard address,
453thus allowing remote hosts to connect to forwarded ports. 464thus allowing remote hosts to connect to forwarded ports.
454The argument must be 465The argument must be
@@ -466,6 +477,12 @@ Specifies whether user authentication based on GSSAPI is allowed.
466The default is 477The default is
467.Dq no . 478.Dq no .
468Note that this option applies to protocol version 2 only. 479Note that this option applies to protocol version 2 only.
480.It Cm GSSAPIKeyExchange
481Specifies whether key exchange based on GSSAPI may be used. When using
482GSSAPI key exchange the server need not have a host key.
483The default is
484.Dq no .
485Note that this option applies to protocol version 2 only.
469.It Cm GSSAPIDelegateCredentials 486.It Cm GSSAPIDelegateCredentials
470Forward (delegate) credentials to the server. 487Forward (delegate) credentials to the server.
471The default is 488The default is
@@ -473,29 +490,31 @@ The default is
473Note that this option applies to protocol version 2 only. 490Note that this option applies to protocol version 2 only.
474.It Cm GSSAPITrustDns 491.It Cm GSSAPITrustDns
475Set to 492Set to
476.Dq yes to indicate that the DNS is trusted to securely canonicalize 493.Dq yes
494to indicate that the DNS is trusted to securely canonicalize
477the name of the host being connected to. If 495the name of the host being connected to. If
478.Dq no, the hostname entered on the 496.Dq no ,
497the hostname entered on the
479command line will be passed untouched to the GSSAPI library. 498command line will be passed untouched to the GSSAPI library.
480The default is 499The default is
481.Dq no . 500.Dq no .
482This option only applies to protocol version 2 connections using GSSAPI 501This option only applies to protocol version 2 connections using GSSAPI.
483key exchange.
484.It Cm HashKnownHosts 502.It Cm HashKnownHosts
485Indicates that 503Indicates that
486.Nm ssh 504.Xr ssh 1
487should hash host names and addresses when they are added to 505should hash host names and addresses when they are added to
488.Pa ~/.ssh/known_hosts . 506.Pa ~/.ssh/known_hosts .
489These hashed names may be used normally by 507These hashed names may be used normally by
490.Nm ssh 508.Xr ssh 1
491and 509and
492.Nm sshd , 510.Xr sshd 8 ,
493but they do not reveal identifying information should the file's contents 511but they do not reveal identifying information should the file's contents
494be disclosed. 512be disclosed.
495The default is 513The default is
496.Dq no . 514.Dq no .
497Note that hashing of names and addresses will not be retrospectively applied 515Note that existing names and addresses in known hosts files
498to existing known hosts files, but these may be manually hashed using 516will not be converted automatically,
517but may be manually hashed using
499.Xr ssh-keygen 1 . 518.Xr ssh-keygen 1 .
500.It Cm HostbasedAuthentication 519.It Cm HostbasedAuthentication
501Specifies whether to try rhosts based authentication with public key 520Specifies whether to try rhosts based authentication with public key
@@ -518,30 +537,29 @@ The default for this option is:
518Specifies an alias that should be used instead of the 537Specifies an alias that should be used instead of the
519real host name when looking up or saving the host key 538real host name when looking up or saving the host key
520in the host key database files. 539in the host key database files.
521This option is useful for tunneling ssh connections 540This option is useful for tunneling SSH connections
522or for multiple servers running on a single host. 541or for multiple servers running on a single host.
523.It Cm HostName 542.It Cm HostName
524Specifies the real host name to log into. 543Specifies the real host name to log into.
525This can be used to specify nicknames or abbreviations for hosts. 544This can be used to specify nicknames or abbreviations for hosts.
526Default is the name given on the command line. 545The default is the name given on the command line.
527Numeric IP addresses are also permitted (both on the command line and in 546Numeric IP addresses are also permitted (both on the command line and in
528.Cm HostName 547.Cm HostName
529specifications). 548specifications).
530.It Cm IdentitiesOnly 549.It Cm IdentitiesOnly
531Specifies that 550Specifies that
532.Nm ssh 551.Xr ssh 1
533should only use the authentication identity files configured in the 552should only use the authentication identity files configured in the
534.Nm 553.Nm
535files, 554files,
536even if the 555even if
537.Nm ssh-agent 556.Xr ssh-agent 1
538offers more identities. 557offers more identities.
539The argument to this keyword must be 558The argument to this keyword must be
540.Dq yes 559.Dq yes
541or 560or
542.Dq no . 561.Dq no .
543This option is intended for situations where 562This option is intended for situations where ssh-agent
544.Nm ssh-agent
545offers many different identities. 563offers many different identities.
546The default is 564The default is
547.Dq no . 565.Dq no .
@@ -557,8 +575,21 @@ and
557for protocol version 2. 575for protocol version 2.
558Additionally, any identities represented by the authentication agent 576Additionally, any identities represented by the authentication agent
559will be used for authentication. 577will be used for authentication.
578.Pp
560The file name may use the tilde 579The file name may use the tilde
561syntax to refer to a user's home directory. 580syntax to refer to a user's home directory or one of the following
581escape characters:
582.Ql %d
583(local user's home directory),
584.Ql %u
585(local user name),
586.Ql %l
587(local host name),
588.Ql %h
589(remote host name) or
590.Ql %r
591(remote user name).
592.Pp
562It is possible to have 593It is possible to have
563multiple identity files specified in configuration files; all these 594multiple identity files specified in configuration files; all these
564identities will be tried in sequence. 595identities will be tried in sequence.
@@ -566,6 +597,13 @@ identities will be tried in sequence.
566Specifies the list of methods to use in keyboard-interactive authentication. 597Specifies the list of methods to use in keyboard-interactive authentication.
567Multiple method names must be comma-separated. 598Multiple method names must be comma-separated.
568The default is to use the server specified list. 599The default is to use the server specified list.
600The methods available vary depending on what the server supports.
601For an OpenSSH server,
602it may be zero or more of:
603.Dq bsdauth ,
604.Dq pam ,
605and
606.Dq skey .
569.It Cm LocalCommand 607.It Cm LocalCommand
570Specifies a command to execute on the local machine after successfully 608Specifies a command to execute on the local machine after successfully
571connecting to the server. 609connecting to the server.
@@ -607,9 +645,9 @@ empty address or
607indicates that the port should be available from all interfaces. 645indicates that the port should be available from all interfaces.
608.It Cm LogLevel 646.It Cm LogLevel
609Gives the verbosity level that is used when logging messages from 647Gives the verbosity level that is used when logging messages from
610.Nm ssh . 648.Xr ssh 1 .
611The possible values are: 649The possible values are:
612QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3. 650QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
613The default is INFO. 651The default is INFO.
614DEBUG and DEBUG1 are equivalent. 652DEBUG and DEBUG1 are equivalent.
615DEBUG2 and DEBUG3 each specify higher levels of verbose output. 653DEBUG2 and DEBUG3 each specify higher levels of verbose output.
@@ -619,7 +657,7 @@ in order of preference.
619The MAC algorithm is used in protocol version 2 657The MAC algorithm is used in protocol version 2
620for data integrity protection. 658for data integrity protection.
621Multiple algorithms must be comma-separated. 659Multiple algorithms must be comma-separated.
622The default is 660The default is:
623.Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 . 661.Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 .
624.It Cm NoHostAuthenticationForLocalhost 662.It Cm NoHostAuthenticationForLocalhost
625This option can be used if the home directory is shared across machines. 663This option can be used if the home directory is shared across machines.
@@ -634,7 +672,7 @@ The default is to check the host key for localhost.
634.It Cm NumberOfPasswordPrompts 672.It Cm NumberOfPasswordPrompts
635Specifies the number of password prompts before giving up. 673Specifies the number of password prompts before giving up.
636The argument to this keyword must be an integer. 674The argument to this keyword must be an integer.
637Default is 3. 675The default is 3.
638.It Cm PasswordAuthentication 676.It Cm PasswordAuthentication
639Specifies whether to use password authentication. 677Specifies whether to use password authentication.
640The argument to this keyword must be 678The argument to this keyword must be
@@ -658,7 +696,7 @@ The default is
658.Dq no . 696.Dq no .
659.It Cm Port 697.It Cm Port
660Specifies the port number to connect on the remote host. 698Specifies the port number to connect on the remote host.
661Default is 22. 699The default is 22.
662.It Cm PreferredAuthentications 700.It Cm PreferredAuthentications
663Specifies the order in which the client should try protocol 2 701Specifies the order in which the client should try protocol 2
664authentication methods. 702authentication methods.
@@ -667,20 +705,24 @@ This allows a client to prefer one method (e.g.\&
667over another method (e.g.\& 705over another method (e.g.\&
668.Cm password ) 706.Cm password )
669The default for this option is: 707The default for this option is:
670.Dq hostbased,publickey,keyboard-interactive,password . 708.Do gssapi-with-mic ,
709hostbased,
710publickey,
711keyboard-interactive,
712password
713.Dc .
671.It Cm Protocol 714.It Cm Protocol
672Specifies the protocol versions 715Specifies the protocol versions
673.Nm ssh 716.Xr ssh 1
674should support in order of preference. 717should support in order of preference.
675The possible values are 718The possible values are
676.Dq 1 719.Sq 1
677and 720and
678.Dq 2 . 721.Sq 2 .
679Multiple versions must be comma-separated. 722Multiple versions must be comma-separated.
680The default is 723The default is
681.Dq 2,1 . 724.Dq 2,1 .
682This means that 725This means that ssh
683.Nm ssh
684tries version 2 and falls back to version 1 726tries version 2 and falls back to version 1
685if version 2 is not available. 727if version 2 is not available.
686.It Cm ProxyCommand 728.It Cm ProxyCommand
@@ -738,9 +780,9 @@ or
738.Sq G 780.Sq G
739to indicate Kilobytes, Megabytes, or Gigabytes, respectively. 781to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
740The default is between 782The default is between
741.Dq 1G 783.Sq 1G
742and 784and
743.Dq 4G , 785.Sq 4G ,
744depending on the cipher. 786depending on the cipher.
745This option applies to protocol version 2 only. 787This option applies to protocol version 2 only.
746.It Cm RemoteForward 788.It Cm RemoteForward
@@ -786,7 +828,7 @@ or
786The default is 828The default is
787.Dq no . 829.Dq no .
788This option applies to protocol version 1 only and requires 830This option applies to protocol version 1 only and requires
789.Nm ssh 831.Xr ssh 1
790to be setuid root. 832to be setuid root.
791.It Cm RSAAuthentication 833.It Cm RSAAuthentication
792Specifies whether to try RSA authentication. 834Specifies whether to try RSA authentication.
@@ -804,31 +846,31 @@ Note that this option applies to protocol version 1 only.
804Specifies what variables from the local 846Specifies what variables from the local
805.Xr environ 7 847.Xr environ 7
806should be sent to the server. 848should be sent to the server.
807Note that environment passing is only supported for protocol 2, the 849Note that environment passing is only supported for protocol 2.
808server must also support it, and the server must be configured to 850The server must also support it, and the server must be configured to
809accept these environment variables. 851accept these environment variables.
810Refer to 852Refer to
811.Cm AcceptEnv 853.Cm AcceptEnv
812in 854in
813.Xr sshd_config 5 855.Xr sshd_config 5
814for how to configure the server. 856for how to configure the server.
815Variables are specified by name, which may contain the wildcard characters 857Variables are specified by name, which may contain wildcard characters.
816.Ql \&*
817and
818.Ql \&? .
819Multiple environment variables may be separated by whitespace or spread 858Multiple environment variables may be separated by whitespace or spread
820across multiple 859across multiple
821.Cm SendEnv 860.Cm SendEnv
822directives. 861directives.
823The default is not to send any environment variables. 862The default is not to send any environment variables.
863.Pp
864See
865.Sx PATTERNS
866for more information on patterns.
824.It Cm ServerAliveCountMax 867.It Cm ServerAliveCountMax
825Sets the number of server alive messages (see below) which may be 868Sets the number of server alive messages (see below) which may be
826sent without 869sent without
827.Nm ssh 870.Xr ssh 1
828receiving any messages back from the server. 871receiving any messages back from the server.
829If this threshold is reached while server alive messages are being sent, 872If this threshold is reached while server alive messages are being sent,
830.Nm ssh 873ssh will disconnect from the server, terminating the session.
831will disconnect from the server, terminating the session.
832It is important to note that the use of server alive messages is very 874It is important to note that the use of server alive messages is very
833different from 875different from
834.Cm TCPKeepAlive 876.Cm TCPKeepAlive
@@ -844,14 +886,15 @@ server depend on knowing when a connection has become inactive.
844The default value is 3. 886The default value is 3.
845If, for example, 887If, for example,
846.Cm ServerAliveInterval 888.Cm ServerAliveInterval
847(see below) is set to 15, and 889(see below) is set to 15 and
848.Cm ServerAliveCountMax 890.Cm ServerAliveCountMax
849is left at the default, if the server becomes unresponsive ssh 891is left at the default, if the server becomes unresponsive,
850will disconnect after approximately 45 seconds. 892ssh will disconnect after approximately 45 seconds.
893This option applies to protocol version 2 only.
851.It Cm ServerAliveInterval 894.It Cm ServerAliveInterval
852Sets a timeout interval in seconds after which if no data has been received 895Sets a timeout interval in seconds after which if no data has been received
853from the server, 896from the server,
854.Nm ssh 897.Xr ssh 1
855will send a message through the encrypted 898will send a message through the encrypted
856channel to request a response from the server. 899channel to request a response from the server.
857The default 900The default
@@ -860,41 +903,39 @@ This option applies to protocol version 2 only.
860.It Cm SmartcardDevice 903.It Cm SmartcardDevice
861Specifies which smartcard device to use. 904Specifies which smartcard device to use.
862The argument to this keyword is the device 905The argument to this keyword is the device
863.Nm ssh 906.Xr ssh 1
864should use to communicate with a smartcard used for storing the user's 907should use to communicate with a smartcard used for storing the user's
865private RSA key. 908private RSA key.
866By default, no device is specified and smartcard support is not activated. 909By default, no device is specified and smartcard support is not activated.
867.It Cm StrictHostKeyChecking 910.It Cm StrictHostKeyChecking
868If this flag is set to 911If this flag is set to
869.Dq yes , 912.Dq yes ,
870.Nm ssh 913.Xr ssh 1
871will never automatically add host keys to the 914will never automatically add host keys to the
872.Pa ~/.ssh/known_hosts 915.Pa ~/.ssh/known_hosts
873file, and refuses to connect to hosts whose host key has changed. 916file, and refuses to connect to hosts whose host key has changed.
874This provides maximum protection against trojan horse attacks, 917This provides maximum protection against trojan horse attacks,
875however, can be annoying when the 918though it can be annoying when the
876.Pa /etc/ssh/ssh_known_hosts 919.Pa /etc/ssh/ssh_known_hosts
877file is poorly maintained, or connections to new hosts are 920file is poorly maintained or when connections to new hosts are
878frequently made. 921frequently made.
879This option forces the user to manually 922This option forces the user to manually
880add all new hosts. 923add all new hosts.
881If this flag is set to 924If this flag is set to
882.Dq no , 925.Dq no ,
883.Nm ssh 926ssh will automatically add new host keys to the
884will automatically add new host keys to the
885user known hosts files. 927user known hosts files.
886If this flag is set to 928If this flag is set to
887.Dq ask , 929.Dq ask ,
888new host keys 930new host keys
889will be added to the user known host files only after the user 931will be added to the user known host files only after the user
890has confirmed that is what they really want to do, and 932has confirmed that is what they really want to do, and
891.Nm ssh 933ssh will refuse to connect to hosts whose host key has changed.
892will refuse to connect to hosts whose host key has changed.
893The host keys of 934The host keys of
894known hosts will be verified automatically in all cases. 935known hosts will be verified automatically in all cases.
895The argument must be 936The argument must be
896.Dq yes , 937.Dq yes ,
897.Dq no 938.Dq no ,
898or 939or
899.Dq ask . 940.Dq ask .
900The default is 941The default is
@@ -917,24 +958,44 @@ This is important in scripts, and many users want it too.
917To disable TCP keepalive messages, the value should be set to 958To disable TCP keepalive messages, the value should be set to
918.Dq no . 959.Dq no .
919.It Cm Tunnel 960.It Cm Tunnel
920Request starting 961Request
921.Xr tun 4 962.Xr tun 4
922device forwarding between the client and the server. 963device forwarding between the client and the server.
923This option also allows requesting layer 2 (ethernet)
924instead of layer 3 (point-to-point) tunneling from the server.
925The argument must be 964The argument must be
926.Dq yes , 965.Dq yes ,
927.Dq point-to-point , 966.Dq point-to-point
967(layer 3),
928.Dq ethernet 968.Dq ethernet
969(layer 2),
929or 970or
930.Dq no . 971.Dq no .
972Specifying
973.Dq yes
974requests the default tunnel mode, which is
975.Dq point-to-point .
931The default is 976The default is
932.Dq no . 977.Dq no .
933.It Cm TunnelDevice 978.It Cm TunnelDevice
934Force a specified 979Specifies the
935.Xr tun 4 980.Xr tun 4
936device on the client. 981devices to open on the client
937Without this option, the next available device will be used. 982.Pq Ar local_tun
983and the server
984.Pq Ar remote_tun .
985.Pp
986The argument must be
987.Sm off
988.Ar local_tun Op : Ar remote_tun .
989.Sm on
990The devices may be specified by numerical ID or the keyword
991.Dq any ,
992which uses the next available tunnel device.
993If
994.Ar remote_tun
995is not specified, it defaults to
996.Dq any .
997The default is
998.Dq any:any .
938.It Cm UsePrivilegedPort 999.It Cm UsePrivilegedPort
939Specifies whether to use a privileged port for outgoing connections. 1000Specifies whether to use a privileged port for outgoing connections.
940The argument must be 1001The argument must be
@@ -944,8 +1005,8 @@ or
944The default is 1005The default is
945.Dq no . 1006.Dq no .
946If set to 1007If set to
947.Dq yes 1008.Dq yes ,
948.Nm ssh 1009.Xr ssh 1
949must be setuid root. 1010must be setuid root.
950Note that this option must be set to 1011Note that this option must be set to
951.Dq yes 1012.Dq yes
@@ -978,12 +1039,17 @@ need to confirm new host keys according to the
978option. 1039option.
979The argument must be 1040The argument must be
980.Dq yes , 1041.Dq yes ,
981.Dq no 1042.Dq no ,
982or 1043or
983.Dq ask . 1044.Dq ask .
984The default is 1045The default is
985.Dq no . 1046.Dq no .
986Note that this option applies to protocol version 2 only. 1047Note that this option applies to protocol version 2 only.
1048.Pp
1049See also
1050.Sx VERIFYING HOST KEYS
1051in
1052.Xr ssh 1 .
987.It Cm XAuthLocation 1053.It Cm XAuthLocation
988Specifies the full pathname of the 1054Specifies the full pathname of the
989.Xr xauth 1 1055.Xr xauth 1
@@ -991,14 +1057,47 @@ program.
991The default is 1057The default is
992.Pa /usr/X11R6/bin/xauth . 1058.Pa /usr/X11R6/bin/xauth .
993.El 1059.El
1060.Sh PATTERNS
1061A
1062.Em pattern
1063consists of zero or more non-whitespace characters,
1064.Sq *
1065(a wildcard that matches zero or more characters),
1066or
1067.Sq ?\&
1068(a wildcard that matches exactly one character).
1069For example, to specify a set of declarations for any host in the
1070.Dq .co.uk
1071set of domains,
1072the following pattern could be used:
1073.Pp
1074.Dl Host *.co.uk
1075.Pp
1076The following pattern
1077would match any host in the 192.168.0.[0-9] network range:
1078.Pp
1079.Dl Host 192.168.0.?
1080.Pp
1081A
1082.Em pattern-list
1083is a comma-separated list of patterns.
1084Patterns within pattern-lists may be negated
1085by preceding them with an exclamation mark
1086.Pq Sq !\& .
1087For example,
1088to allow a key to be used from anywhere within an organisation
1089except from the
1090.Dq dialup
1091pool,
1092the following entry (in authorized_keys) could be used:
1093.Pp
1094.Dl from=\&"!*.dialup.example.com,*.example.com\&"
994.Sh FILES 1095.Sh FILES
995.Bl -tag -width Ds 1096.Bl -tag -width Ds
996.It Pa ~/.ssh/config 1097.It Pa ~/.ssh/config
997This is the per-user configuration file. 1098This is the per-user configuration file.
998The format of this file is described above. 1099The format of this file is described above.
999This file is used by the 1100This file is used by the SSH client.
1000.Nm ssh
1001client.
1002Because of the potential for abuse, this file must have strict permissions: 1101Because of the potential for abuse, this file must have strict permissions:
1003read/write for the user, and not accessible by others. 1102read/write for the user, and not accessible by others.
1004.It Pa /etc/ssh/ssh_config 1103.It Pa /etc/ssh/ssh_config
diff --git a/sshconnect.c b/sshconnect.c
index 64ffec240..a222233d0 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: sshconnect.c,v 1.200 2006/10/10 10:12:45 markus Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -13,12 +14,35 @@
13 */ 14 */
14 15
15#include "includes.h" 16#include "includes.h"
16RCSID("$OpenBSD: sshconnect.c,v 1.171 2005/12/06 22:38:27 reyk Exp $");
17 17
18#include <openssl/bn.h> 18#include <sys/types.h>
19#include <sys/wait.h>
20#include <sys/stat.h>
21#include <sys/socket.h>
22#ifdef HAVE_SYS_TIME_H
23# include <sys/time.h>
24#endif
25
26#include <netinet/in.h>
27#include <arpa/inet.h>
28
29#include <ctype.h>
30#include <errno.h>
31#include <netdb.h>
32#ifdef HAVE_PATHS_H
33#include <paths.h>
34#endif
35#include <pwd.h>
36#include <stdarg.h>
37#include <stdio.h>
38#include <stdlib.h>
39#include <string.h>
40#include <unistd.h>
19 41
20#include "ssh.h"
21#include "xmalloc.h" 42#include "xmalloc.h"
43#include "key.h"
44#include "hostfile.h"
45#include "ssh.h"
22#include "rsa.h" 46#include "rsa.h"
23#include "buffer.h" 47#include "buffer.h"
24#include "packet.h" 48#include "packet.h"
@@ -32,6 +56,7 @@ RCSID("$OpenBSD: sshconnect.c,v 1.171 2005/12/06 22:38:27 reyk Exp $");
32#include "atomicio.h" 56#include "atomicio.h"
33#include "misc.h" 57#include "misc.h"
34#include "dns.h" 58#include "dns.h"
59#include "version.h"
35 60
36char *client_version_string = NULL; 61char *client_version_string = NULL;
37char *server_version_string = NULL; 62char *server_version_string = NULL;
@@ -62,7 +87,6 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command)
62 int pin[2], pout[2]; 87 int pin[2], pout[2];
63 pid_t pid; 88 pid_t pid;
64 char strport[NI_MAXSERV]; 89 char strport[NI_MAXSERV];
65 size_t len;
66 90
67 /* Convert the port number into a string. */ 91 /* Convert the port number into a string. */
68 snprintf(strport, sizeof strport, "%hu", port); 92 snprintf(strport, sizeof strport, "%hu", port);
@@ -74,10 +98,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command)
74 * Use "exec" to avoid "sh -c" processes on some platforms 98 * Use "exec" to avoid "sh -c" processes on some platforms
75 * (e.g. Solaris) 99 * (e.g. Solaris)
76 */ 100 */
77 len = strlen(proxy_command) + 6; 101 xasprintf(&tmp, "exec %s", proxy_command);
78 tmp = xmalloc(len);
79 strlcpy(tmp, "exec ", len);
80 strlcat(tmp, proxy_command, len);
81 command_string = percent_expand(tmp, "h", host, 102 command_string = percent_expand(tmp, "h", host,
82 "p", strport, (char *)NULL); 103 "p", strport, (char *)NULL);
83 xfree(tmp); 104 xfree(tmp);
@@ -94,8 +115,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command)
94 char *argv[10]; 115 char *argv[10];
95 116
96 /* Child. Permanently give up superuser privileges. */ 117 /* Child. Permanently give up superuser privileges. */
97 seteuid(original_real_uid); 118 permanently_drop_suid(original_real_uid);
98 setuid(original_real_uid);
99 119
100 /* Redirect stdin and stdout. */ 120 /* Redirect stdin and stdout. */
101 close(pin[1]); 121 close(pin[1]);
@@ -205,7 +225,7 @@ timeout_connect(int sockfd, const struct sockaddr *serv_addr,
205 fd_set *fdset; 225 fd_set *fdset;
206 struct timeval tv; 226 struct timeval tv;
207 socklen_t optlen; 227 socklen_t optlen;
208 int fdsetsz, optval, rc, result = -1; 228 int optval, rc, result = -1;
209 229
210 if (timeout <= 0) 230 if (timeout <= 0)
211 return (connect(sockfd, serv_addr, addrlen)); 231 return (connect(sockfd, serv_addr, addrlen));
@@ -219,10 +239,8 @@ timeout_connect(int sockfd, const struct sockaddr *serv_addr,
219 if (errno != EINPROGRESS) 239 if (errno != EINPROGRESS)
220 return (-1); 240 return (-1);
221 241
222 fdsetsz = howmany(sockfd + 1, NFDBITS) * sizeof(fd_mask); 242 fdset = (fd_set *)xcalloc(howmany(sockfd + 1, NFDBITS),
223 fdset = (fd_set *)xmalloc(fdsetsz); 243 sizeof(fd_mask));
224
225 memset(fdset, 0, fdsetsz);
226 FD_SET(sockfd, fdset); 244 FD_SET(sockfd, fdset);
227 tv.tv_sec = timeout; 245 tv.tv_sec = timeout;
228 tv.tv_usec = 0; 246 tv.tv_usec = 0;
@@ -305,17 +323,16 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
305 fatal("%s: %.100s: %s", __progname, host, 323 fatal("%s: %.100s: %s", __progname, host,
306 gai_strerror(gaierr)); 324 gai_strerror(gaierr));
307 325
308 /* 326 for (attempt = 0; attempt < connection_attempts; attempt++) {
309 * Try to connect several times. On some machines, the first time 327 if (attempt > 0) {
310 * will sometimes fail. In general socket code appears to behave 328 /* Sleep a moment before retrying. */
311 * quite magically on many machines. 329 sleep(1);
312 */
313 for (attempt = 0; ;) {
314 if (attempt > 0)
315 debug("Trying again..."); 330 debug("Trying again...");
316 331 }
317 /* Loop through addresses for this host, and try each one in 332 /*
318 sequence until the connection succeeds. */ 333 * Loop through addresses for this host, and try each one in
334 * sequence until the connection succeeds.
335 */
319 for (ai = aitop; ai; ai = ai->ai_next) { 336 for (ai = aitop; ai; ai = ai->ai_next) {
320 if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6) 337 if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
321 continue; 338 continue;
@@ -342,29 +359,18 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
342 } else { 359 } else {
343 debug("connect to address %s port %s: %s", 360 debug("connect to address %s port %s: %s",
344 ntop, strport, strerror(errno)); 361 ntop, strport, strerror(errno));
345 /*
346 * Close the failed socket; there appear to
347 * be some problems when reusing a socket for
348 * which connect() has already returned an
349 * error.
350 */
351 close(sock); 362 close(sock);
363 sock = -1;
352 } 364 }
353 } 365 }
354 if (ai) 366 if (sock != -1)
355 break; /* Successful connection. */ 367 break; /* Successful connection. */
356
357 attempt++;
358 if (attempt >= connection_attempts)
359 break;
360 /* Sleep a moment before retrying. */
361 sleep(1);
362 } 368 }
363 369
364 freeaddrinfo(aitop); 370 freeaddrinfo(aitop);
365 371
366 /* Return failure if we didn't get a successful connection. */ 372 /* Return failure if we didn't get a successful connection. */
367 if (attempt >= connection_attempts) { 373 if (sock == -1) {
368 error("ssh: connect to host %s port %s: %s", 374 error("ssh: connect to host %s port %s: %s",
369 host, strport, strerror(errno)); 375 host, strport, strerror(errno));
370 return (-1); 376 return (-1);
@@ -396,10 +402,10 @@ ssh_exchange_identification(void)
396 int connection_in = packet_get_connection_in(); 402 int connection_in = packet_get_connection_in();
397 int connection_out = packet_get_connection_out(); 403 int connection_out = packet_get_connection_out();
398 int minor1 = PROTOCOL_MINOR_1; 404 int minor1 = PROTOCOL_MINOR_1;
399 u_int i; 405 u_int i, n;
400 406
401 /* Read other side's version identification. */ 407 /* Read other side's version identification. */
402 for (;;) { 408 for (n = 0;;) {
403 for (i = 0; i < sizeof(buf) - 1; i++) { 409 for (i = 0; i < sizeof(buf) - 1; i++) {
404 size_t len = atomicio(read, connection_in, &buf[i], 1); 410 size_t len = atomicio(read, connection_in, &buf[i], 1);
405 411
@@ -416,6 +422,8 @@ ssh_exchange_identification(void)
416 buf[i + 1] = 0; 422 buf[i + 1] = 0;
417 break; 423 break;
418 } 424 }
425 if (++n > 65536)
426 fatal("ssh_exchange_identification: No banner received");
419 } 427 }
420 buf[sizeof(buf) - 1] = 0; 428 buf[sizeof(buf) - 1] = 0;
421 if (strncmp(buf, "SSH-", 4) == 0) 429 if (strncmp(buf, "SSH-", 4) == 0)
@@ -517,13 +525,17 @@ confirm(const char *prompt)
517 * check whether the supplied host key is valid, return -1 if the key 525 * check whether the supplied host key is valid, return -1 if the key
518 * is not valid. the user_hostfile will not be updated if 'readonly' is true. 526 * is not valid. the user_hostfile will not be updated if 'readonly' is true.
519 */ 527 */
528#define RDRW 0
529#define RDONLY 1
530#define ROQUIET 2
520static int 531static int
521check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key, 532check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
522 int readonly, const char *user_hostfile, const char *system_hostfile) 533 Key *host_key, int readonly, const char *user_hostfile,
534 const char *system_hostfile)
523{ 535{
524 Key *file_key; 536 Key *file_key;
525 const char *type = key_type(host_key); 537 const char *type = key_type(host_key);
526 char *ip = NULL; 538 char *ip = NULL, *host = NULL;
527 char hostline[1000], *hostp, *fp; 539 char hostline[1000], *hostp, *fp;
528 HostStatus host_status; 540 HostStatus host_status;
529 HostStatus ip_status; 541 HostStatus ip_status;
@@ -574,7 +586,7 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key,
574 if (getnameinfo(hostaddr, salen, ntop, sizeof(ntop), 586 if (getnameinfo(hostaddr, salen, ntop, sizeof(ntop),
575 NULL, 0, NI_NUMERICHOST) != 0) 587 NULL, 0, NI_NUMERICHOST) != 0)
576 fatal("check_host_key: getnameinfo failed"); 588 fatal("check_host_key: getnameinfo failed");
577 ip = xstrdup(ntop); 589 ip = put_host_port(ntop, port);
578 } else { 590 } else {
579 ip = xstrdup("<no hostip for proxy command>"); 591 ip = xstrdup("<no hostip for proxy command>");
580 } 592 }
@@ -582,18 +594,21 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key,
582 * Turn off check_host_ip if the connection is to localhost, via proxy 594 * Turn off check_host_ip if the connection is to localhost, via proxy
583 * command or if we don't have a hostname to compare with 595 * command or if we don't have a hostname to compare with
584 */ 596 */
585 if (options.check_host_ip && 597 if (options.check_host_ip && (local ||
586 (local || strcmp(host, ip) == 0 || options.proxy_command != NULL)) 598 strcmp(hostname, ip) == 0 || options.proxy_command != NULL))
587 options.check_host_ip = 0; 599 options.check_host_ip = 0;
588 600
589 /* 601 /*
590 * Allow the user to record the key under a different name. This is 602 * Allow the user to record the key under a different name or
591 * useful for ssh tunneling over forwarded connections or if you run 603 * differentiate a non-standard port. This is useful for ssh
592 * multiple sshd's on different ports on the same machine. 604 * tunneling over forwarded connections or if you run multiple
605 * sshd's on different ports on the same machine.
593 */ 606 */
594 if (options.host_key_alias != NULL) { 607 if (options.host_key_alias != NULL) {
595 host = options.host_key_alias; 608 host = xstrdup(options.host_key_alias);
596 debug("using hostkeyalias: %s", host); 609 debug("using hostkeyalias: %s", host);
610 } else {
611 host = put_host_port(hostname, port);
597 } 612 }
598 613
599 /* 614 /*
@@ -662,6 +677,15 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key,
662 } 677 }
663 break; 678 break;
664 case HOST_NEW: 679 case HOST_NEW:
680 if (options.host_key_alias == NULL && port != 0 &&
681 port != SSH_DEFAULT_PORT) {
682 debug("checking without port identifier");
683 if (check_host_key(hostname, hostaddr, 0, host_key, 2,
684 user_hostfile, system_hostfile) == 0) {
685 debug("found matching key w/out port");
686 break;
687 }
688 }
665 if (readonly) 689 if (readonly)
666 goto fail; 690 goto fail;
667 /* The host is new. */ 691 /* The host is new. */
@@ -741,6 +765,8 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key,
741 "list of known hosts.", hostp, type); 765 "list of known hosts.", hostp, type);
742 break; 766 break;
743 case HOST_CHANGED: 767 case HOST_CHANGED:
768 if (readonly == ROQUIET)
769 goto fail;
744 if (options.check_host_ip && host_ip_differ) { 770 if (options.check_host_ip && host_ip_differ) {
745 char *key_msg; 771 char *key_msg;
746 if (ip_status == HOST_NEW) 772 if (ip_status == HOST_NEW)
@@ -779,7 +805,7 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key,
779 /* 805 /*
780 * If strict host key checking has not been requested, allow 806 * If strict host key checking has not been requested, allow
781 * the connection but without MITM-able authentication or 807 * the connection but without MITM-able authentication or
782 * agent forwarding. 808 * forwarding.
783 */ 809 */
784 if (options.password_authentication) { 810 if (options.password_authentication) {
785 error("Password authentication is disabled to avoid " 811 error("Password authentication is disabled to avoid "
@@ -814,6 +840,11 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key,
814 options.num_local_forwards = 840 options.num_local_forwards =
815 options.num_remote_forwards = 0; 841 options.num_remote_forwards = 0;
816 } 842 }
843 if (options.tun_open != SSH_TUNMODE_NO) {
844 error("Tunnel forwarding is disabled to avoid "
845 "man-in-the-middle attacks.");
846 options.tun_open = SSH_TUNMODE_NO;
847 }
817 /* 848 /*
818 * XXX Should permit the user to change to use the new id. 849 * XXX Should permit the user to change to use the new id.
819 * This could be done by converting the host key to an 850 * This could be done by converting the host key to an
@@ -855,10 +886,12 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key,
855 } 886 }
856 887
857 xfree(ip); 888 xfree(ip);
889 xfree(host);
858 return 0; 890 return 0;
859 891
860fail: 892fail:
861 xfree(ip); 893 xfree(ip);
894 xfree(host);
862 return -1; 895 return -1;
863} 896}
864 897
@@ -892,12 +925,13 @@ verify_host_key(char *host, struct sockaddr *hostaddr, Key *host_key)
892 /* return ok if the key can be found in an old keyfile */ 925 /* return ok if the key can be found in an old keyfile */
893 if (stat(options.system_hostfile2, &st) == 0 || 926 if (stat(options.system_hostfile2, &st) == 0 ||
894 stat(options.user_hostfile2, &st) == 0) { 927 stat(options.user_hostfile2, &st) == 0) {
895 if (check_host_key(host, hostaddr, host_key, /*readonly*/ 1, 928 if (check_host_key(host, hostaddr, options.port, host_key,
896 options.user_hostfile2, options.system_hostfile2) == 0) 929 RDONLY, options.user_hostfile2,
930 options.system_hostfile2) == 0)
897 return 0; 931 return 0;
898 } 932 }
899 return check_host_key(host, hostaddr, host_key, /*readonly*/ 0, 933 return check_host_key(host, hostaddr, options.port, host_key,
900 options.user_hostfile, options.system_hostfile); 934 RDRW, options.user_hostfile, options.system_hostfile);
901} 935}
902 936
903/* 937/*
@@ -921,7 +955,7 @@ ssh_login(Sensitive *sensitive, const char *orighost,
921 host = xstrdup(orighost); 955 host = xstrdup(orighost);
922 for (cp = host; *cp; cp++) 956 for (cp = host; *cp; cp++)
923 if (isupper(*cp)) 957 if (isupper(*cp))
924 *cp = tolower(*cp); 958 *cp = (char)tolower(*cp);
925 959
926 /* Exchange protocol version identification strings with the server. */ 960 /* Exchange protocol version identification strings with the server. */
927 ssh_exchange_identification(); 961 ssh_exchange_identification();
@@ -938,6 +972,7 @@ ssh_login(Sensitive *sensitive, const char *orighost,
938 ssh_kex(host, hostaddr); 972 ssh_kex(host, hostaddr);
939 ssh_userauth1(local_user, server_user, host, sensitive); 973 ssh_userauth1(local_user, server_user, host, sensitive);
940 } 974 }
975 xfree(local_user);
941} 976}
942 977
943void 978void
@@ -951,8 +986,7 @@ ssh_put_password(char *password)
951 return; 986 return;
952 } 987 }
953 size = roundup(strlen(password) + 1, 32); 988 size = roundup(strlen(password) + 1, 32);
954 padded = xmalloc(size); 989 padded = xcalloc(1, size);
955 memset(padded, 0, size);
956 strlcpy(padded, password, size); 990 strlcpy(padded, password, size);
957 packet_put_string(padded, size); 991 packet_put_string(padded, size);
958 memset(padded, 0, size); 992 memset(padded, 0, size);
diff --git a/sshconnect.h b/sshconnect.h
index e7c7a2b34..4e66bbffc 100644
--- a/sshconnect.h
+++ b/sshconnect.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect.h,v 1.18 2005/12/06 22:38:28 reyk Exp $ */ 1/* $OpenBSD: sshconnect.h,v 1.23 2006/08/03 03:34:42 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -23,8 +23,6 @@
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 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. 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26#ifndef SSHCONNECT_H
27#define SSHCONNECT_H
28 26
29typedef struct Sensitive Sensitive; 27typedef struct Sensitive Sensitive;
30struct Sensitive { 28struct Sensitive {
@@ -54,16 +52,18 @@ int ssh_local_cmd(const char *);
54/* 52/*
55 * Macros to raise/lower permissions. 53 * Macros to raise/lower permissions.
56 */ 54 */
57#define PRIV_START do { \ 55#define PRIV_START do { \
58 int save_errno = errno; \ 56 int save_errno = errno; \
59 (void)seteuid(original_effective_uid); \ 57 if (seteuid(original_effective_uid) != 0) \
60 errno = save_errno; \ 58 fatal("PRIV_START: seteuid: %s", \
59 strerror(errno)); \
60 errno = save_errno; \
61} while (0) 61} while (0)
62 62
63#define PRIV_END do { \ 63#define PRIV_END do { \
64 int save_errno = errno; \ 64 int save_errno = errno; \
65 (void)seteuid(original_real_uid); \ 65 if (seteuid(original_real_uid) != 0) \
66 errno = save_errno; \ 66 fatal("PRIV_END: seteuid: %s", \
67 strerror(errno)); \
68 errno = save_errno; \
67} while (0) 69} while (0)
68
69#endif
diff --git a/sshconnect1.c b/sshconnect1.c
index 440d7c5bd..fd07bbf74 100644
--- a/sshconnect1.c
+++ b/sshconnect1.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: sshconnect1.c,v 1.70 2006/11/06 21:25:28 markus Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -13,28 +14,38 @@
13 */ 14 */
14 15
15#include "includes.h" 16#include "includes.h"
16RCSID("$OpenBSD: sshconnect1.c,v 1.62 2005/10/30 08:52:18 djm Exp $"); 17
18#include <sys/types.h>
19#include <sys/socket.h>
17 20
18#include <openssl/bn.h> 21#include <openssl/bn.h>
19#include <openssl/md5.h> 22#include <openssl/md5.h>
20 23
24#include <stdarg.h>
25#include <stdio.h>
26#include <stdlib.h>
27#include <string.h>
28#include <signal.h>
29#include <pwd.h>
30
31#include "xmalloc.h"
21#include "ssh.h" 32#include "ssh.h"
22#include "ssh1.h" 33#include "ssh1.h"
23#include "xmalloc.h"
24#include "rsa.h" 34#include "rsa.h"
25#include "buffer.h" 35#include "buffer.h"
26#include "packet.h" 36#include "packet.h"
37#include "key.h"
38#include "cipher.h"
27#include "kex.h" 39#include "kex.h"
28#include "uidswap.h" 40#include "uidswap.h"
29#include "log.h" 41#include "log.h"
30#include "readconf.h" 42#include "readconf.h"
31#include "key.h"
32#include "authfd.h" 43#include "authfd.h"
33#include "sshconnect.h" 44#include "sshconnect.h"
34#include "authfile.h" 45#include "authfile.h"
35#include "misc.h" 46#include "misc.h"
36#include "cipher.h"
37#include "canohost.h" 47#include "canohost.h"
48#include "hostfile.h"
38#include "auth.h" 49#include "auth.h"
39 50
40/* Session id for the current session. */ 51/* Session id for the current session. */
@@ -197,7 +208,7 @@ try_rsa_authentication(int idx)
197 BIGNUM *challenge; 208 BIGNUM *challenge;
198 Key *public, *private; 209 Key *public, *private;
199 char buf[300], *passphrase, *comment, *authfile; 210 char buf[300], *passphrase, *comment, *authfile;
200 int i, type, quit; 211 int i, perm_ok = 1, type, quit;
201 212
202 public = options.identity_keys[idx]; 213 public = options.identity_keys[idx];
203 authfile = options.identity_files[idx]; 214 authfile = options.identity_files[idx];
@@ -243,15 +254,16 @@ try_rsa_authentication(int idx)
243 if (public->flags & KEY_FLAG_EXT) 254 if (public->flags & KEY_FLAG_EXT)
244 private = public; 255 private = public;
245 else 256 else
246 private = key_load_private_type(KEY_RSA1, authfile, "", NULL); 257 private = key_load_private_type(KEY_RSA1, authfile, "", NULL,
247 if (private == NULL && !options.batch_mode) { 258 &perm_ok);
259 if (private == NULL && !options.batch_mode && perm_ok) {
248 snprintf(buf, sizeof(buf), 260 snprintf(buf, sizeof(buf),
249 "Enter passphrase for RSA key '%.100s': ", comment); 261 "Enter passphrase for RSA key '%.100s': ", comment);
250 for (i = 0; i < options.number_of_password_prompts; i++) { 262 for (i = 0; i < options.number_of_password_prompts; i++) {
251 passphrase = read_passphrase(buf, 0); 263 passphrase = read_passphrase(buf, 0);
252 if (strcmp(passphrase, "") != 0) { 264 if (strcmp(passphrase, "") != 0) {
253 private = key_load_private_type(KEY_RSA1, 265 private = key_load_private_type(KEY_RSA1,
254 authfile, passphrase, NULL); 266 authfile, passphrase, NULL, NULL);
255 quit = 0; 267 quit = 0;
256 } else { 268 } else {
257 debug2("no passphrase given, try next key"); 269 debug2("no passphrase given, try next key");
@@ -268,7 +280,7 @@ try_rsa_authentication(int idx)
268 xfree(comment); 280 xfree(comment);
269 281
270 if (private == NULL) { 282 if (private == NULL) {
271 if (!options.batch_mode) 283 if (!options.batch_mode && perm_ok)
272 error("Bad passphrase."); 284 error("Bad passphrase.");
273 285
274 /* Send a dummy response packet to avoid protocol error. */ 286 /* Send a dummy response packet to avoid protocol error. */
@@ -551,14 +563,20 @@ ssh_kex(char *host, struct sockaddr *hostaddr)
551 * the first 16 bytes of the session id. 563 * the first 16 bytes of the session id.
552 */ 564 */
553 if ((key = BN_new()) == NULL) 565 if ((key = BN_new()) == NULL)
554 fatal("respond_to_rsa_challenge: BN_new failed"); 566 fatal("ssh_kex: BN_new failed");
555 BN_set_word(key, 0); 567 if (BN_set_word(key, 0) == 0)
568 fatal("ssh_kex: BN_set_word failed");
556 for (i = 0; i < SSH_SESSION_KEY_LENGTH; i++) { 569 for (i = 0; i < SSH_SESSION_KEY_LENGTH; i++) {
557 BN_lshift(key, key, 8); 570 if (BN_lshift(key, key, 8) == 0)
558 if (i < 16) 571 fatal("ssh_kex: BN_lshift failed");
559 BN_add_word(key, session_key[i] ^ session_id[i]); 572 if (i < 16) {
560 else 573 if (BN_add_word(key, session_key[i] ^ session_id[i])
561 BN_add_word(key, session_key[i]); 574 == 0)
575 fatal("ssh_kex: BN_add_word failed");
576 } else {
577 if (BN_add_word(key, session_key[i]) == 0)
578 fatal("ssh_kex: BN_add_word failed");
579 }
562 } 580 }
563 581
564 /* 582 /*
diff --git a/sshconnect2.c b/sshconnect2.c
index 1a69c6b2b..5190b07e5 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: sshconnect2.c,v 1.162 2006/08/30 00:06:51 dtucker Exp $ */
1/* 2/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,18 +24,30 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: sshconnect2.c,v 1.143 2005/10/14 02:17:59 stevesk Exp $"); 27
28#include <sys/types.h>
29#include <sys/socket.h>
30#include <sys/wait.h>
31#include <sys/stat.h>
32
33#include <errno.h>
34#include <pwd.h>
35#include <signal.h>
36#include <stdarg.h>
37#include <stdio.h>
38#include <string.h>
39#include <unistd.h>
27 40
28#include "openbsd-compat/sys-queue.h" 41#include "openbsd-compat/sys-queue.h"
29 42
43#include "xmalloc.h"
30#include "ssh.h" 44#include "ssh.h"
31#include "ssh2.h" 45#include "ssh2.h"
32#include "xmalloc.h"
33#include "buffer.h" 46#include "buffer.h"
34#include "packet.h" 47#include "packet.h"
35#include "compat.h" 48#include "compat.h"
36#include "bufaux.h"
37#include "cipher.h" 49#include "cipher.h"
50#include "key.h"
38#include "kex.h" 51#include "kex.h"
39#include "myproposal.h" 52#include "myproposal.h"
40#include "sshconnect.h" 53#include "sshconnect.h"
@@ -49,6 +62,7 @@ RCSID("$OpenBSD: sshconnect2.c,v 1.143 2005/10/14 02:17:59 stevesk Exp $");
49#include "canohost.h" 62#include "canohost.h"
50#include "msg.h" 63#include "msg.h"
51#include "pathnames.h" 64#include "pathnames.h"
65#include "uidswap.h"
52 66
53#ifdef GSSAPI 67#ifdef GSSAPI
54#include "ssh-gss.h" 68#include "ssh-gss.h"
@@ -85,30 +99,30 @@ ssh_kex2(char *host, struct sockaddr *hostaddr)
85 Kex *kex; 99 Kex *kex;
86 100
87#ifdef GSSAPI 101#ifdef GSSAPI
88 char *orig, *gss; 102 char *orig = NULL, *gss = NULL;
89 int len; 103 char *gss_host = NULL;
90 char *gss_host;
91#endif 104#endif
92 105
93 xxx_host = host; 106 xxx_host = host;
94 xxx_hostaddr = hostaddr; 107 xxx_hostaddr = hostaddr;
95 108
96#ifdef GSSAPI 109#ifdef GSSAPI
97 /* Add the GSSAPI mechanisms currently supported on this client to 110 if (options.gss_keyex) {
98 * the key exchange algorithm proposal */ 111 /* Add the GSSAPI mechanisms currently supported on this
99 orig = myproposal[PROPOSAL_KEX_ALGS]; 112 * client to the key exchange algorithm proposal */
100 if (options.gss_trust_dns) 113 orig = myproposal[PROPOSAL_KEX_ALGS];
101 gss_host = (char *)get_canonical_hostname(1); 114
102 else 115 if (options.gss_trust_dns)
103 gss_host = host; 116 gss_host = (char *)get_canonical_hostname(1);
104 117 else
105 gss = ssh_gssapi_client_mechanisms(gss_host); 118 gss_host = host;
106 if (gss) { 119
107 debug("Offering GSSAPI proposal: %s", gss); 120 gss = ssh_gssapi_client_mechanisms(gss_host);
108 len = strlen(orig) + strlen(gss) + 2; 121 if (gss) {
109 myproposal[PROPOSAL_KEX_ALGS] = xmalloc(len); 122 debug("Offering GSSAPI proposal: %s", gss);
110 snprintf(myproposal[PROPOSAL_KEX_ALGS], len, "%s,%s", gss, 123 xasprintf(&myproposal[PROPOSAL_KEX_ALGS],
111 orig); 124 "%s,%s", gss, orig);
125 }
112 } 126 }
113#endif 127#endif
114 128
@@ -142,11 +156,9 @@ ssh_kex2(char *host, struct sockaddr *hostaddr)
142#ifdef GSSAPI 156#ifdef GSSAPI
143 /* If we've got GSSAPI algorithms, then we also support the 157 /* If we've got GSSAPI algorithms, then we also support the
144 * 'null' hostkey, as a last resort */ 158 * 'null' hostkey, as a last resort */
145 if (gss) { 159 if (options.gss_keyex && gss) {
146 orig = myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS]; 160 orig = myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS];
147 len = strlen(orig) + sizeof(",null"); 161 xasprintf(&myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS],
148 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = xmalloc(len);
149 snprintf(myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS], len,
150 "%s,null", orig); 162 "%s,null", orig);
151 } 163 }
152#endif 164#endif
@@ -159,8 +171,10 @@ ssh_kex2(char *host, struct sockaddr *hostaddr)
159 kex->kex[KEX_DH_GRP1_SHA1] = kexdh_client; 171 kex->kex[KEX_DH_GRP1_SHA1] = kexdh_client;
160 kex->kex[KEX_DH_GRP14_SHA1] = kexdh_client; 172 kex->kex[KEX_DH_GRP14_SHA1] = kexdh_client;
161 kex->kex[KEX_DH_GEX_SHA1] = kexgex_client; 173 kex->kex[KEX_DH_GEX_SHA1] = kexgex_client;
174 kex->kex[KEX_DH_GEX_SHA256] = kexgex_client;
162#ifdef GSSAPI 175#ifdef GSSAPI
163 kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_client; 176 kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_client;
177 kex->kex[KEX_GSS_GRP14_SHA1] = kexgss_client;
164 kex->kex[KEX_GSS_GEX_SHA1] = kexgss_client; 178 kex->kex[KEX_GSS_GEX_SHA1] = kexgss_client;
165#endif 179#endif
166 kex->client_version_string=client_version_string; 180 kex->client_version_string=client_version_string;
@@ -415,7 +429,7 @@ input_userauth_banner(int type, u_int32_t seq, void *ctxt)
415 debug3("input_userauth_banner"); 429 debug3("input_userauth_banner");
416 msg = packet_get_string(NULL); 430 msg = packet_get_string(NULL);
417 lang = packet_get_string(NULL); 431 lang = packet_get_string(NULL);
418 if (options.log_level > SYSLOG_LEVEL_QUIET) 432 if (options.log_level >= SYSLOG_LEVEL_INFO)
419 fprintf(stderr, "%s", msg); 433 fprintf(stderr, "%s", msg);
420 xfree(msg); 434 xfree(msg);
421 xfree(lang); 435 xfree(lang);
@@ -537,6 +551,12 @@ userauth_gssapi(Authctxt *authctxt)
537 static u_int mech = 0; 551 static u_int mech = 0;
538 OM_uint32 min; 552 OM_uint32 min;
539 int ok = 0; 553 int ok = 0;
554 char *gss_host = NULL;
555
556 if (options.gss_trust_dns)
557 gss_host = (char *)get_canonical_hostname(1);
558 else
559 gss_host = (char *)authctxt->host;
540 560
541 /* Try one GSSAPI method at a time, rather than sending them all at 561 /* Try one GSSAPI method at a time, rather than sending them all at
542 * once. */ 562 * once. */
@@ -546,15 +566,10 @@ userauth_gssapi(Authctxt *authctxt)
546 566
547 /* Check to see if the mechanism is usable before we offer it */ 567 /* Check to see if the mechanism is usable before we offer it */
548 while (mech < gss_supported->count && !ok) { 568 while (mech < gss_supported->count && !ok) {
549 if (gssctxt)
550 ssh_gssapi_delete_ctx(&gssctxt);
551 ssh_gssapi_build_ctx(&gssctxt);
552 ssh_gssapi_set_oid(gssctxt, &gss_supported->elements[mech]);
553
554 /* My DER encoding requires length<128 */ 569 /* My DER encoding requires length<128 */
555 if (gss_supported->elements[mech].length < 128 && 570 if (gss_supported->elements[mech].length < 128 &&
556 !GSS_ERROR(ssh_gssapi_import_name(gssctxt, 571 ssh_gssapi_check_mechanism(&gssctxt,
557 authctxt->host))) { 572 &gss_supported->elements[mech], gss_host)) {
558 ok = 1; /* Mechanism works */ 573 ok = 1; /* Mechanism works */
559 } else { 574 } else {
560 mech++; 575 mech++;
@@ -650,8 +665,8 @@ input_gssapi_response(int type, u_int32_t plen, void *ctxt)
650{ 665{
651 Authctxt *authctxt = ctxt; 666 Authctxt *authctxt = ctxt;
652 Gssctxt *gssctxt; 667 Gssctxt *gssctxt;
653 int oidlen; 668 u_int oidlen;
654 char *oidv; 669 u_char *oidv;
655 670
656 if (authctxt == NULL) 671 if (authctxt == NULL)
657 fatal("input_gssapi_response: no authentication context"); 672 fatal("input_gssapi_response: no authentication context");
@@ -1057,14 +1072,16 @@ load_identity_file(char *filename)
1057{ 1072{
1058 Key *private; 1073 Key *private;
1059 char prompt[300], *passphrase; 1074 char prompt[300], *passphrase;
1060 int quit, i; 1075 int perm_ok, quit, i;
1061 struct stat st; 1076 struct stat st;
1062 1077
1063 if (stat(filename, &st) < 0) { 1078 if (stat(filename, &st) < 0) {
1064 debug3("no such identity: %s", filename); 1079 debug3("no such identity: %s", filename);
1065 return NULL; 1080 return NULL;
1066 } 1081 }
1067 private = key_load_private_type(KEY_UNSPEC, filename, "", NULL); 1082 private = key_load_private_type(KEY_UNSPEC, filename, "", NULL, &perm_ok);
1083 if (!perm_ok)
1084 return NULL;
1068 if (private == NULL) { 1085 if (private == NULL) {
1069 if (options.batch_mode) 1086 if (options.batch_mode)
1070 return NULL; 1087 return NULL;
@@ -1073,8 +1090,8 @@ load_identity_file(char *filename)
1073 for (i = 0; i < options.number_of_password_prompts; i++) { 1090 for (i = 0; i < options.number_of_password_prompts; i++) {
1074 passphrase = read_passphrase(prompt, 0); 1091 passphrase = read_passphrase(prompt, 0);
1075 if (strcmp(passphrase, "") != 0) { 1092 if (strcmp(passphrase, "") != 0) {
1076 private = key_load_private_type(KEY_UNSPEC, filename, 1093 private = key_load_private_type(KEY_UNSPEC,
1077 passphrase, NULL); 1094 filename, passphrase, NULL, NULL);
1078 quit = 0; 1095 quit = 0;
1079 } else { 1096 } else {
1080 debug2("no passphrase given, try next key"); 1097 debug2("no passphrase given, try next key");
@@ -1117,8 +1134,7 @@ pubkey_prepare(Authctxt *authctxt)
1117 if (key && key->type == KEY_RSA1) 1134 if (key && key->type == KEY_RSA1)
1118 continue; 1135 continue;
1119 options.identity_keys[i] = NULL; 1136 options.identity_keys[i] = NULL;
1120 id = xmalloc(sizeof(*id)); 1137 id = xcalloc(1, sizeof(*id));
1121 memset(id, 0, sizeof(*id));
1122 id->key = key; 1138 id->key = key;
1123 id->filename = xstrdup(options.identity_files[i]); 1139 id->filename = xstrdup(options.identity_files[i]);
1124 TAILQ_INSERT_TAIL(&files, id, next); 1140 TAILQ_INSERT_TAIL(&files, id, next);
@@ -1142,8 +1158,7 @@ pubkey_prepare(Authctxt *authctxt)
1142 } 1158 }
1143 } 1159 }
1144 if (!found && !options.identities_only) { 1160 if (!found && !options.identities_only) {
1145 id = xmalloc(sizeof(*id)); 1161 id = xcalloc(1, sizeof(*id));
1146 memset(id, 0, sizeof(*id));
1147 id->key = key; 1162 id->key = key;
1148 id->filename = comment; 1163 id->filename = comment;
1149 id->ac = ac; 1164 id->ac = ac;
@@ -1339,8 +1354,7 @@ ssh_keysign(Key *key, u_char **sigp, u_int *lenp,
1339 return -1; 1354 return -1;
1340 } 1355 }
1341 if (pid == 0) { 1356 if (pid == 0) {
1342 seteuid(getuid()); 1357 permanently_drop_suid(getuid());
1343 setuid(getuid());
1344 close(from[0]); 1358 close(from[0]);
1345 if (dup2(from[1], STDOUT_FILENO) < 0) 1359 if (dup2(from[1], STDOUT_FILENO) < 0)
1346 fatal("ssh_keysign: dup2: %s", strerror(errno)); 1360 fatal("ssh_keysign: dup2: %s", strerror(errno));
@@ -1420,12 +1434,11 @@ userauth_hostbased(Authctxt *authctxt)
1420 if (p == NULL) { 1434 if (p == NULL) {
1421 error("userauth_hostbased: cannot get local ipaddr/name"); 1435 error("userauth_hostbased: cannot get local ipaddr/name");
1422 key_free(private); 1436 key_free(private);
1437 xfree(blob);
1423 return 0; 1438 return 0;
1424 } 1439 }
1425 len = strlen(p) + 2; 1440 len = strlen(p) + 2;
1426 chost = xmalloc(len); 1441 xasprintf(&chost, "%s.", p);
1427 strlcpy(chost, p, len);
1428 strlcat(chost, ".", len);
1429 debug2("userauth_hostbased: chost %s", chost); 1442 debug2("userauth_hostbased: chost %s", chost);
1430 xfree(p); 1443 xfree(p);
1431 1444
@@ -1458,6 +1471,7 @@ userauth_hostbased(Authctxt *authctxt)
1458 error("key_sign failed"); 1471 error("key_sign failed");
1459 xfree(chost); 1472 xfree(chost);
1460 xfree(pkalg); 1473 xfree(pkalg);
1474 xfree(blob);
1461 return 0; 1475 return 0;
1462 } 1476 }
1463 packet_start(SSH2_MSG_USERAUTH_REQUEST); 1477 packet_start(SSH2_MSG_USERAUTH_REQUEST);
@@ -1473,6 +1487,7 @@ userauth_hostbased(Authctxt *authctxt)
1473 xfree(signature); 1487 xfree(signature);
1474 xfree(chost); 1488 xfree(chost);
1475 xfree(pkalg); 1489 xfree(pkalg);
1490 xfree(blob);
1476 1491
1477 packet_send(); 1492 packet_send();
1478 return 1; 1493 return 1;
diff --git a/sshd.0 b/sshd.0
index 040be6cad..5e21db125 100644
--- a/sshd.0
+++ b/sshd.0
@@ -21,7 +21,7 @@ DESCRIPTION
21 (by default sshd_config(5)); command-line options override values speci- 21 (by default sshd_config(5)); command-line options override values speci-
22 fied in the configuration file. sshd rereads its configuration file when 22 fied in the configuration file. sshd rereads its configuration file when
23 it receives a hangup signal, SIGHUP, by executing itself with the name 23 it receives a hangup signal, SIGHUP, by executing itself with the name
24 and options it was started with, e.g., /usr/sbin/sshd. 24 and options it was started with, e.g. /usr/sbin/sshd.
25 25
26 The options are as follows: 26 The options are as follows:
27 27
@@ -69,7 +69,7 @@ DESCRIPTION
69 not run from inetd because it needs to generate the server key 69 not run from inetd because it needs to generate the server key
70 before it can respond to the client, and this may take tens of 70 before it can respond to the client, and this may take tens of
71 seconds. Clients would have to wait too long if the key was re- 71 seconds. Clients would have to wait too long if the key was re-
72 generated every time. However, with small key sizes (e.g., 512) 72 generated every time. However, with small key sizes (e.g. 512)
73 using sshd from inetd may be feasible. 73 using sshd from inetd may be feasible.
74 74
75 -k key_gen_time 75 -k key_gen_time
@@ -161,17 +161,13 @@ AUTHENTICATION
161 allowing still public-key, then the passwd field should be set to some- 161 allowing still public-key, then the passwd field should be set to some-
162 thing other than these values (eg `NP' or `*NP*' ). 162 thing other than these values (eg `NP' or `*NP*' ).
163 163
164 System security is not improved unless rshd, rlogind, and rexecd are dis-
165 abled (thus completely disabling rlogin and rsh into the machine).
166
167COMMAND EXECUTION AND DATA FORWARDING
168 If the client successfully authenticates itself, a dialog for preparing 164 If the client successfully authenticates itself, a dialog for preparing
169 the session is entered. At this time the client may request things like 165 the session is entered. At this time the client may request things like
170 allocating a pseudo-tty, forwarding X11 connections, forwarding TCP con- 166 allocating a pseudo-tty, forwarding X11 connections, forwarding TCP con-
171 nections, or forwarding the authentication agent connection over the se- 167 nections, or forwarding the authentication agent connection over the se-
172 cure channel. 168 cure channel.
173 169
174 Finally, the client either requests a shell or execution of a command. 170 After this, the client either requests a shell or execution of a command.
175 The sides then enter session mode. In this mode, either side may send 171 The sides then enter session mode. In this mode, either side may send
176 data at any time, and such data is forwarded to/from the shell or command 172 data at any time, and such data is forwarded to/from the shell or command
177 on the server side, and the user terminal in the client side. 173 on the server side, and the user terminal in the client side.
@@ -204,33 +200,60 @@ LOGIN PROCESS
204 200
205 8. If ~/.ssh/rc exists, runs it; else if /etc/ssh/sshrc exists, 201 8. If ~/.ssh/rc exists, runs it; else if /etc/ssh/sshrc exists,
206 runs it; otherwise runs xauth. The ``rc'' files are given the 202 runs it; otherwise runs xauth. The ``rc'' files are given the
207 X11 authentication protocol and cookie in standard input. 203 X11 authentication protocol and cookie in standard input. See
204 SSHRC, below.
208 205
209 9. Runs user's shell or command. 206 9. Runs user's shell or command.
210 207
208SSHRC
209 If the file ~/.ssh/rc exists, sh(1) runs it after reading the environment
210 files but before starting the user's shell or command. It must not pro-
211 duce any output on stdout; stderr must be used instead. If X11 forward-
212 ing is in use, it will receive the "proto cookie" pair in its standard
213 input (and DISPLAY in its environment). The script must call xauth(1)
214 because sshd will not run xauth automatically to add X11 cookies.
215
216 The primary purpose of this file is to run any initialization routines
217 which may be needed before the user's home directory becomes accessible;
218 AFS is a particular example of such an environment.
219
220 This file will probably contain some initialization code followed by
221 something similar to:
222
223 if read proto cookie && [ -n "$DISPLAY" ]; then
224 if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then
225 # X11UseLocalhost=yes
226 echo add unix:`echo $DISPLAY |
227 cut -c11-` $proto $cookie
228 else
229 # X11UseLocalhost=no
230 echo add $DISPLAY $proto $cookie
231 fi | xauth -q -
232 fi
233
234 If this file does not exist, /etc/ssh/sshrc is run, and if that does not
235 exist either, xauth is used to add the cookie.
236
211AUTHORIZED_KEYS FILE FORMAT 237AUTHORIZED_KEYS FILE FORMAT
212 ~/.ssh/authorized_keys is the default file that lists the public keys 238 AuthorizedKeysFile specifies the file containing public keys for public
213 that are permitted for RSA authentication in protocol version 1 and for 239 key authentication; if none is specified, the default is
214 public key authentication (PubkeyAuthentication) in protocol version 2. 240 ~/.ssh/authorized_keys. Each line of the file contains one key (empty
215 AuthorizedKeysFile may be used to specify an alternative file. 241 lines and lines starting with a `#' are ignored as comments). Protocol 1
216 242 public keys consist of the following space-separated fields: options,
217 Each line of the file contains one key (empty lines and lines starting 243 bits, exponent, modulus, comment. Protocol 2 public key consist of: op-
218 with a `#' are ignored as comments). Each RSA public key consists of the 244 tions, keytype, base64-encoded key, comment. The options field is op-
219 following fields, separated by spaces: options, bits, exponent, modulus, 245 tional; its presence is determined by whether the line starts with a num-
220 comment. Each protocol version 2 public key consists of: options, key- 246 ber or not (the options field never starts with a number). The bits, ex-
221 type, base64 encoded key, comment. The options field is optional; its 247 ponent, modulus, and comment fields give the RSA key for protocol version
222 presence is determined by whether the line starts with a number or not 248 1; the comment field is not used for anything (but may be convenient for
223 (the options field never starts with a number). The bits, exponent, mod- 249 the user to identify the key). For protocol version 2 the keytype is
224 ulus and comment fields give the RSA key for protocol version 1; the com- 250 ``ssh-dss'' or ``ssh-rsa''.
225 ment field is not used for anything (but may be convenient for the user
226 to identify the key). For protocol version 2 the keytype is ``ssh-dss''
227 or ``ssh-rsa''.
228 251
229 Note that lines in this file are usually several hundred bytes long (be- 252 Note that lines in this file are usually several hundred bytes long (be-
230 cause of the size of the public key encoding) up to a limit of 8 kilo- 253 cause of the size of the public key encoding) up to a limit of 8 kilo-
231 bytes, which permits DSA keys up to 8 kilobits and RSA keys up to 16 254 bytes, which permits DSA keys up to 8 kilobits and RSA keys up to 16
232 kilobits. You don't want to type them in; instead, copy the 255 kilobits. You don't want to type them in; instead, copy the
233 identity.pub, id_dsa.pub or the id_rsa.pub file and edit it. 256 identity.pub, id_dsa.pub, or the id_rsa.pub file and edit it.
234 257
235 sshd enforces a minimum RSA key modulus size for protocol 1 and protocol 258 sshd enforces a minimum RSA key modulus size for protocol 1 and protocol
236 2 keys of 768 bits. 259 2 keys of 768 bits.
@@ -240,21 +263,6 @@ AUTHORIZED_KEYS FILE FORMAT
240 lowing option specifications are supported (note that option keywords are 263 lowing option specifications are supported (note that option keywords are
241 case-insensitive): 264 case-insensitive):
242 265
243 from="pattern-list"
244 Specifies that in addition to public key authentication, the
245 canonical name of the remote host must be present in the comma-
246 separated list of patterns (`*' and `?' serve as wildcards). The
247 list may also contain patterns negated by prefixing them with
248 `!'; if the canonical host name matches a negated pattern, the
249 key is not accepted. The purpose of this option is to optionally
250 increase security: public key authentication by itself does not
251 trust the network or name servers or anything (but the key); how-
252 ever, if somebody somehow steals the key, the key permits an in-
253 truder to log in from anywhere in the world. This additional op-
254 tion makes using a stolen key more difficult (name servers and/or
255 routers would have to be compromised in addition to just the
256 key).
257
258 command="command" 266 command="command"
259 Specifies that the command is executed whenever this key is used 267 Specifies that the command is executed whenever this key is used
260 for authentication. The command supplied by the user (if any) is 268 for authentication. The command supplied by the user (if any) is
@@ -266,8 +274,10 @@ AUTHORIZED_KEYS FILE FORMAT
266 lic keys to perform just a specific operation. An example might 274 lic keys to perform just a specific operation. An example might
267 be a key that permits remote backups but nothing else. Note that 275 be a key that permits remote backups but nothing else. Note that
268 the client may specify TCP and/or X11 forwarding unless they are 276 the client may specify TCP and/or X11 forwarding unless they are
269 explicitly prohibited. Note that this option applies to shell, 277 explicitly prohibited. The command originally supplied by the
270 command or subsystem execution. 278 client is available in the SSH_ORIGINAL_COMMAND environment vari-
279 able. Note that this option applies to shell, command or subsys-
280 tem execution.
271 281
272 environment="NAME=value" 282 environment="NAME=value"
273 Specifies that the string is to be added to the environment when 283 Specifies that the string is to be added to the environment when
@@ -277,21 +287,35 @@ AUTHORIZED_KEYS FILE FORMAT
277 default and is controlled via the PermitUserEnvironment option. 287 default and is controlled via the PermitUserEnvironment option.
278 This option is automatically disabled if UseLogin is enabled. 288 This option is automatically disabled if UseLogin is enabled.
279 289
280 no-port-forwarding 290 from="pattern-list"
281 Forbids TCP forwarding when this key is used for authentication. 291 Specifies that in addition to public key authentication, the
282 Any port forward requests by the client will return an error. 292 canonical name of the remote host must be present in the comma-
283 This might be used, e.g., in connection with the command option. 293 separated list of patterns. The purpose of this option is to op-
294 tionally increase security: public key authentication by itself
295 does not trust the network or name servers or anything (but the
296 key); however, if somebody somehow steals the key, the key per-
297 mits an intruder to log in from anywhere in the world. This ad-
298 ditional option makes using a stolen key more difficult (name
299 servers and/or routers would have to be compromised in addition
300 to just the key).
284 301
285 no-X11-forwarding 302 See PATTERNS in ssh_config(5) for more information on patterns.
286 Forbids X11 forwarding when this key is used for authentication.
287 Any X11 forward requests by the client will return an error.
288 303
289 no-agent-forwarding 304 no-agent-forwarding
290 Forbids authentication agent forwarding when this key is used for 305 Forbids authentication agent forwarding when this key is used for
291 authentication. 306 authentication.
292 307
308 no-port-forwarding
309 Forbids TCP forwarding when this key is used for authentication.
310 Any port forward requests by the client will return an error.
311 This might be used, e.g. in connection with the command option.
312
293 no-pty Prevents tty allocation (a request to allocate a pty will fail). 313 no-pty Prevents tty allocation (a request to allocate a pty will fail).
294 314
315 no-X11-forwarding
316 Forbids X11 forwarding when this key is used for authentication.
317 Any X11 forward requests by the client will return an error.
318
295 permitopen="host:port" 319 permitopen="host:port"
296 Limit local ``ssh -L'' port forwarding such that it may only con- 320 Limit local ``ssh -L'' port forwarding such that it may only con-
297 nect to the specified host and port. IPv6 addresses can be spec- 321 nect to the specified host and port. IPv6 addresses can be spec-
@@ -305,24 +329,24 @@ AUTHORIZED_KEYS FILE FORMAT
305 next available device will be used if the client requests a tun- 329 next available device will be used if the client requests a tun-
306 nel. 330 nel.
307 331
308 Examples 332 An example authorized_keys file:
309 1024 33 12121...312314325 ylo@foo.bar
310 333
311 from="*.niksula.hut.fi,!pc.niksula.hut.fi" 1024 35 23...2334 ylo@niksula 334 # Comments allowed at start of line
312 335 ssh-rsa AAAAB3Nza...LiPk== user@example.net
313 command="dump /home",no-pty,no-port-forwarding 1024 33 23...2323 back- 336 from="*.sales.example.net,!pc.sales.example.net" ssh-rsa
314 up.hut.fi 337 AAAAB2...19Q== john@example.net
315 338 command="dump /home",no-pty,no-port-forwarding ssh-dss
316 permitopen="10.2.1.55:80",permitopen="10.2.1.56:25" 1024 33 23...2323 339 AAAAC3...51R== example.net
317 340 permitopen="192.0.2.1:80",permitopen="192.0.2.2:25" ssh-dss
318 tunnel="0",command="sh /etc/netstart tun0" ssh-rsa AAAA...== reyk@openb- 341 AAAAB5...21S==
319 sd.org 342 tunnel="0",command="sh /etc/netstart tun0" ssh-rsa AAAA...==
343 jane@example.net
320 344
321SSH_KNOWN_HOSTS FILE FORMAT 345SSH_KNOWN_HOSTS FILE FORMAT
322 The /etc/ssh/ssh_known_hosts and ~/.ssh/known_hosts files contain host 346 The /etc/ssh/ssh_known_hosts and ~/.ssh/known_hosts files contain host
323 public keys for all known hosts. The global file should be prepared by 347 public keys for all known hosts. The global file should be prepared by
324 the administrator (optional), and the per-user file is maintained auto- 348 the administrator (optional), and the per-user file is maintained auto-
325 matically: whenever the user connects from an unknown host its key is 349 matically: whenever the user connects from an unknown host, its key is
326 added to the per-user file. 350 added to the per-user file.
327 351
328 Each line in these files contains the following fields: hostnames, bits, 352 Each line in these files contains the following fields: hostnames, bits,
@@ -333,7 +357,9 @@ SSH_KNOWN_HOSTS FILE FORMAT
333 (when authenticating a client) or against the user-supplied name (when 357 (when authenticating a client) or against the user-supplied name (when
334 authenticating a server). A pattern may also be preceded by `!' to indi- 358 authenticating a server). A pattern may also be preceded by `!' to indi-
335 cate negation: if the host name matches a negated pattern, it is not ac- 359 cate negation: if the host name matches a negated pattern, it is not ac-
336 cepted (by that line) even if it matched another pattern on the line. 360 cepted (by that line) even if it matched another pattern on the line. A
361 hostname or address may optionally be enclosed within `[' and `]' brack-
362 ets then followed by `:' and a non-standard port number.
337 363
338 Alternately, hostnames may be stored in a hashed form which hides host 364 Alternately, hostnames may be stored in a hashed form which hides host
339 names and addresses should the file's contents be disclosed. Hashed 365 names and addresses should the file's contents be disclosed. Hashed
@@ -342,8 +368,8 @@ SSH_KNOWN_HOSTS FILE FORMAT
342 tors may be applied. 368 tors may be applied.
343 369
344 Bits, exponent, and modulus are taken directly from the RSA host key; 370 Bits, exponent, and modulus are taken directly from the RSA host key;
345 they can be obtained, e.g., from /etc/ssh/ssh_host_key.pub. The optional 371 they can be obtained, for example, from /etc/ssh/ssh_host_key.pub. The
346 comment field continues to the end of the line, and is not used. 372 optional comment field continues to the end of the line, and is not used.
347 373
348 Lines starting with `#' and empty lines are ignored as comments. 374 Lines starting with `#' and empty lines are ignored as comments.
349 375
@@ -360,29 +386,115 @@ SSH_KNOWN_HOSTS FILE FORMAT
360 Rather, generate them by a script or by taking /etc/ssh/ssh_host_key.pub 386 Rather, generate them by a script or by taking /etc/ssh/ssh_host_key.pub
361 and adding the host names at the front. 387 and adding the host names at the front.
362 388
363 Examples 389 An example ssh_known_hosts file:
364
365 closenet,...,130.233.208.41 1024 37 159...93 closenet.hut.fi
366 cvs.openbsd.org,199.185.137.3 ssh-rsa AAAA1234.....=
367 390
368 # A hashed hostname 391 # Comments allowed at start of line
369 |1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa 392 closenet,...,192.0.2.53 1024 37 159...93 closenet.example.net
370 AAAA1234.....= 393 cvs.example.net,192.0.2.10 ssh-rsa AAAA1234.....=
394 # A hashed hostname
395 |1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa
396 AAAA1234.....=
371 397
372FILES 398FILES
373 /etc/ssh/sshd_config 399 ~/.hushlogin
374 Contains configuration data for sshd. The file format and con- 400 This file is used to suppress printing the last login time and
375 figuration options are described in sshd_config(5). 401 /etc/motd, if PrintLastLog and PrintMotd, respectively, are en-
402 abled. It does not suppress printing of the banner specified by
403 Banner.
404
405 ~/.rhosts
406 This file is used for host-based authentication (see ssh(1) for
407 more information). On some machines this file may need to be
408 world-readable if the user's home directory is on an NFS parti-
409 tion, because sshd reads it as root. Additionally, this file
410 must be owned by the user, and must not have write permissions
411 for anyone else. The recommended permission for most machines is
412 read/write for the user, and not accessible by others.
413
414 ~/.shosts
415 This file is used in exactly the same way as .rhosts, but allows
416 host-based authentication without permitting login with
417 rlogin/rsh.
418
419 ~/.ssh/authorized_keys
420 Lists the public keys (RSA/DSA) that can be used for logging in
421 as this user. The format of this file is described above. The
422 content of the file is not highly sensitive, but the recommended
423 permissions are read/write for the user, and not accessible by
424 others.
425
426 If this file, the ~/.ssh directory, or the user's home directory
427 are writable by other users, then the file could be modified or
428 replaced by unauthorized users. In this case, sshd will not al-
429 low it to be used unless the StrictModes option has been set to
430 ``no''. The recommended permissions can be set by executing
431 ``chmod go-w ~/ ~/.ssh ~/.ssh/authorized_keys''.
432
433 ~/.ssh/environment
434 This file is read into the environment at login (if it exists).
435 It can only contain empty lines, comment lines (that start with
436 `#'), and assignment lines of the form name=value. The file
437 should be writable only by the user; it need not be readable by
438 anyone else. Environment processing is disabled by default and
439 is controlled via the PermitUserEnvironment option.
440
441 ~/.ssh/known_hosts
442 Contains a list of host keys for all hosts the user has logged
443 into that are not already in the systemwide list of known host
444 keys. The format of this file is described above. This file
445 should be writable only by root/the owner and can, but need not
446 be, world-readable.
447
448 ~/.ssh/rc
449 Contains initialization routines to be run before the user's home
450 directory becomes accessible. This file should be writable only
451 by the user, and need not be readable by anyone else.
452
453 /etc/hosts.allow
454 /etc/hosts.deny
455 Access controls that should be enforced by tcp-wrappers are de-
456 fined here. Further details are described in hosts_access(5).
457
458 /etc/hosts.equiv
459 This file is for host-based authentication (see ssh(1)). It
460 should only be writable by root.
461
462 /etc/moduli
463 Contains Diffie-Hellman groups used for the "Diffie-Hellman Group
464 Exchange". The file format is described in moduli(5).
376 465
377 /etc/ssh/ssh_host_key, /etc/ssh/ssh_host_dsa_key, 466 /etc/motd
378 /etc/ssh/ssh_host_rsa_key 467 See motd(5).
468
469 /etc/nologin
470 If this file exists, sshd refuses to let anyone except root log
471 in. The contents of the file are displayed to anyone trying to
472 log in, and non-root connections are refused. The file should be
473 world-readable.
474
475 /etc/shosts.equiv
476 This file is used in exactly the same way as hosts.equiv, but al-
477 lows host-based authentication without permitting login with
478 rlogin/rsh.
479
480 /etc/ssh/ssh_known_hosts
481 Systemwide list of known host keys. This file should be prepared
482 by the system administrator to contain the public host keys of
483 all machines in the organization. The format of this file is de-
484 scribed above. This file should be writable only by root/the
485 owner and should be world-readable.
486
487 /etc/ssh/ssh_host_key
488 /etc/ssh/ssh_host_dsa_key
489 /etc/ssh/ssh_host_rsa_key
379 These three files contain the private parts of the host keys. 490 These three files contain the private parts of the host keys.
380 These files should only be owned by root, readable only by root, 491 These files should only be owned by root, readable only by root,
381 and not accessible to others. Note that sshd does not start if 492 and not accessible to others. Note that sshd does not start if
382 this file is group/world-accessible. 493 these files are group/world-accessible.
383 494
384 /etc/ssh/ssh_host_key.pub, /etc/ssh/ssh_host_dsa_key.pub, 495 /etc/ssh/ssh_host_key.pub
385 /etc/ssh/ssh_host_rsa_key.pub 496 /etc/ssh/ssh_host_dsa_key.pub
497 /etc/ssh/ssh_host_rsa_key.pub
386 These three files contain the public parts of the host keys. 498 These three files contain the public parts of the host keys.
387 These files should be world-readable but writable only by root. 499 These files should be world-readable but writable only by root.
388 Their contents should match the respective private parts. These 500 Their contents should match the respective private parts. These
@@ -390,9 +502,14 @@ FILES
390 convenience of the user so their contents can be copied to known 502 convenience of the user so their contents can be copied to known
391 hosts files. These files are created using ssh-keygen(1). 503 hosts files. These files are created using ssh-keygen(1).
392 504
393 /etc/moduli 505 /etc/ssh/sshd_config
394 Contains Diffie-Hellman groups used for the "Diffie-Hellman Group 506 Contains configuration data for sshd. The file format and con-
395 Exchange". The file format is described in moduli(5). 507 figuration options are described in sshd_config(5).
508
509 /etc/ssh/sshrc
510 Similar to ~/.ssh/rc, it can be used to specify machine-specific
511 login-time initializations globally. This file should be
512 writable only by root, and should be world-readable.
396 513
397 /var/empty 514 /var/empty
398 chroot(2) directory used by sshd during privilege separation in 515 chroot(2) directory used by sshd during privilege separation in
@@ -407,160 +524,21 @@ FILES
407 The content of this file is not sensitive; it can be world-read- 524 The content of this file is not sensitive; it can be world-read-
408 able. 525 able.
409 526
410 ~/.ssh/authorized_keys
411 Lists the public keys (RSA or DSA) that can be used to log into
412 the user's account. This file must be readable by root (which
413 may on some machines imply it being world-readable if the user's
414 home directory resides on an NFS volume). It is recommended that
415 it not be accessible by others. The format of this file is de-
416 scribed above. Users will place the contents of their
417 identity.pub, id_dsa.pub and/or id_rsa.pub files into this file,
418 as described in ssh-keygen(1).
419
420 /etc/ssh/ssh_known_hosts, ~/.ssh/known_hosts
421 These files are consulted when using rhosts with RSA host authen-
422 tication or protocol version 2 hostbased authentication to check
423 the public key of the host. The key must be listed in one of
424 these files to be accepted. The client uses the same files to
425 verify that it is connecting to the correct remote host. These
426 files should be writable only by root/the owner.
427 /etc/ssh/ssh_known_hosts should be world-readable, and
428 ~/.ssh/known_hosts can, but need not be, world-readable.
429
430 /etc/motd
431 See motd(5).
432
433 ~/.hushlogin
434 This file is used to suppress printing the last login time and
435 /etc/motd, if PrintLastLog and PrintMotd, respectively, are en-
436 abled. It does not suppress printing of the banner specified by
437 Banner.
438
439 /etc/nologin
440 If this file exists, sshd refuses to let anyone except root log
441 in. The contents of the file are displayed to anyone trying to
442 log in, and non-root connections are refused. The file should be
443 world-readable.
444
445 /etc/hosts.allow, /etc/hosts.deny
446 Access controls that should be enforced by tcp-wrappers are de-
447 fined here. Further details are described in hosts_access(5).
448
449 ~/.rhosts
450 This file is used during RhostsRSAAuthentication and
451 HostbasedAuthentication and contains host-username pairs, sepa-
452 rated by a space, one per line. The given user on the corre-
453 sponding host is permitted to log in without a password. The
454 same file is used by rlogind and rshd. The file must be writable
455 only by the user; it is recommended that it not be accessible by
456 others.
457
458 It is also possible to use netgroups in the file. Either host or
459 user name may be of the form +@groupname to specify all hosts or
460 all users in the group.
461
462 ~/.shosts
463 For ssh, this file is exactly the same as for .rhosts. However,
464 this file is not used by rlogin and rshd, so using this permits
465 access using SSH only.
466
467 /etc/hosts.equiv
468 This file is used during RhostsRSAAuthentication and
469 HostbasedAuthentication authentication. In the simplest form,
470 this file contains host names, one per line. Users on those
471 hosts are permitted to log in without a password, provided they
472 have the same user name on both machines. The host name may also
473 be followed by a user name; such users are permitted to log in as
474 any user on this machine (except root). Additionally, the syntax
475 ``+@group'' can be used to specify netgroups. Negated entries
476 start with `-'.
477
478 If the client host/user is successfully matched in this file, lo-
479 gin is automatically permitted provided the client and server us-
480 er names are the same. Additionally, successful client host key
481 authentication is required. This file must be writable only by
482 root; it is recommended that it be world-readable.
483
484 Warning: It is almost never a good idea to use user names in
485 hosts.equiv. Beware that it really means that the named user(s)
486 can log in as anybody, which includes bin, daemon, adm, and other
487 accounts that own critical binaries and directories. Using a us-
488 er name practically grants the user root access. The only valid
489 use for user names that I can think of is in negative entries.
490
491 Note that this warning also applies to rsh/rlogin.
492
493 /etc/shosts.equiv
494 This is processed exactly as /etc/hosts.equiv. However, this
495 file may be useful in environments that want to run both
496 rsh/rlogin and ssh.
497
498 ~/.ssh/environment
499 This file is read into the environment at login (if it exists).
500 It can only contain empty lines, comment lines (that start with
501 `#'), and assignment lines of the form name=value. The file
502 should be writable only by the user; it need not be readable by
503 anyone else. Environment processing is disabled by default and
504 is controlled via the PermitUserEnvironment option.
505
506 ~/.ssh/rc
507 If this file exists, it is run with /bin/sh after reading the en-
508 vironment files but before starting the user's shell or command.
509 It must not produce any output on stdout; stderr must be used in-
510 stead. If X11 forwarding is in use, it will receive the "proto
511 cookie" pair in its standard input (and DISPLAY in its environ-
512 ment). The script must call xauth(1) because sshd will not run
513 xauth automatically to add X11 cookies.
514
515 The primary purpose of this file is to run any initialization
516 routines which may be needed before the user's home directory be-
517 comes accessible; AFS is a particular example of such an environ-
518 ment.
519
520 This file will probably contain some initialization code followed
521 by something similar to:
522
523 if read proto cookie && [ -n "$DISPLAY" ]; then
524 if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then
525 # X11UseLocalhost=yes
526 echo add unix:`echo $DISPLAY |
527 cut -c11-` $proto $cookie
528 else
529 # X11UseLocalhost=no
530 echo add $DISPLAY $proto $cookie
531 fi | xauth -q -
532 fi
533
534 If this file does not exist, /etc/ssh/sshrc is run, and if that
535 does not exist either, xauth is used to add the cookie.
536
537 This file should be writable only by the user, and need not be
538 readable by anyone else.
539
540 /etc/ssh/sshrc
541 Like ~/.ssh/rc. This can be used to specify machine-specific lo-
542 gin-time initializations globally. This file should be writable
543 only by root, and should be world-readable.
544
545SEE ALSO 527SEE ALSO
546 scp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1), 528 scp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1),
547 chroot(2), hosts_access(5), login.conf(5), moduli(5), sshd_config(5), 529 chroot(2), hosts_access(5), login.conf(5), moduli(5), sshd_config(5),
548 inetd(8), sftp-server(8) 530 inetd(8), sftp-server(8)
549 531
550 T. Ylonen, T. Kivinen, M. Saarinen, T. Rinne, and S. Lehtinen, SSH
551 Protocol Architecture, draft-ietf-secsh-architecture-12.txt, January
552 2002, work in progress material.
553
554 M. Friedl, N. Provos, and W. A. Simpson, Diffie-Hellman Group Exchange
555 for the SSH Transport Layer Protocol, draft-ietf-secsh-dh-group-
556 exchange-02.txt, January 2002, work in progress material.
557
558AUTHORS 532AUTHORS
559 OpenSSH is a derivative of the original and free ssh 1.2.12 release by 533 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
560 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo 534 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
561 de Raadt and Dug Song removed many bugs, re-added newer features and 535 de Raadt and Dug Song removed many bugs, re-added newer features and cre-
562 created OpenSSH. Markus Friedl contributed the support for SSH protocol 536 ated OpenSSH. Markus Friedl contributed the support for SSH protocol
563 versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support 537 versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support
564 for privilege separation. 538 for privilege separation.
565 539
566OpenBSD 3.9 September 25, 1999 9 540CAVEATS
541 System security is not improved unless rshd, rlogind, and rexecd are dis-
542 abled (thus completely disabling rlogin and rsh into the machine).
543
544OpenBSD 4.1 September 25, 1999 9
diff --git a/sshd.8 b/sshd.8
index 51d339b65..522279ee3 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.215 2006/02/01 09:11:41 jmc Exp $ 37.\" $OpenBSD: sshd.8,v 1.234 2006/08/21 08:15:57 dtucker Exp $
38.Dd September 25, 1999 38.Dd September 25, 1999
39.Dt SSHD 8 39.Dt SSHD 8
40.Os 40.Os
@@ -81,7 +81,7 @@ configuration file.
81.Nm 81.Nm
82rereads its configuration file when it receives a hangup signal, 82rereads its configuration file when it receives a hangup signal,
83.Dv SIGHUP , 83.Dv SIGHUP ,
84by executing itself with the name and options it was started with, e.g., 84by executing itself with the name and options it was started with, e.g.\&
85.Pa /usr/sbin/sshd . 85.Pa /usr/sbin/sshd .
86.Pp 86.Pp
87The options are as follows: 87The options are as follows:
@@ -154,7 +154,7 @@ is normally not run
154from inetd because it needs to generate the server key before it can 154from inetd because it needs to generate the server key before it can
155respond to the client, and this may take tens of seconds. 155respond to the client, and this may take tens of seconds.
156Clients would have to wait too long if the key was regenerated every time. 156Clients would have to wait too long if the key was regenerated every time.
157However, with small key sizes (e.g., 512) using 157However, with small key sizes (e.g. 512) using
158.Nm 158.Nm
159from inetd may 159from inetd may
160be feasible. 160be feasible.
@@ -308,17 +308,6 @@ or
308.Ql \&*NP\&* 308.Ql \&*NP\&*
309). 309).
310.Pp 310.Pp
311System security is not improved unless
312.Nm rshd ,
313.Nm rlogind ,
314and
315.Nm rexecd
316are disabled (thus completely disabling
317.Xr rlogin
318and
319.Xr rsh
320into the machine).
321.Sh COMMAND EXECUTION AND DATA FORWARDING
322If the client successfully authenticates itself, a dialog for 311If the client successfully authenticates itself, a dialog for
323preparing the session is entered. 312preparing the session is entered.
324At this time the client may request 313At this time the client may request
@@ -326,7 +315,7 @@ things like allocating a pseudo-tty, forwarding X11 connections,
326forwarding TCP connections, or forwarding the authentication agent 315forwarding TCP connections, or forwarding the authentication agent
327connection over the secure channel. 316connection over the secure channel.
328.Pp 317.Pp
329Finally, the client either requests a shell or execution of a command. 318After this, the client either requests a shell or execution of a command.
330The sides then enter session mode. 319The sides then enter session mode.
331In this mode, either side may send 320In this mode, either side may send
332data at any time, and such data is forwarded to/from the shell or 321data at any time, and such data is forwarded to/from the shell or
@@ -381,31 +370,73 @@ The
381.Dq rc 370.Dq rc
382files are given the X11 371files are given the X11
383authentication protocol and cookie in standard input. 372authentication protocol and cookie in standard input.
373See
374.Sx SSHRC ,
375below.
384.It 376.It
385Runs user's shell or command. 377Runs user's shell or command.
386.El 378.El
379.Sh SSHRC
380If the file
381.Pa ~/.ssh/rc
382exists,
383.Xr sh 1
384runs it after reading the
385environment files but before starting the user's shell or command.
386It must not produce any output on stdout; stderr must be used
387instead.
388If X11 forwarding is in use, it will receive the "proto cookie" pair in
389its standard input (and
390.Ev DISPLAY
391in its environment).
392The script must call
393.Xr xauth 1
394because
395.Nm
396will not run xauth automatically to add X11 cookies.
397.Pp
398The primary purpose of this file is to run any initialization routines
399which may be needed before the user's home directory becomes
400accessible; AFS is a particular example of such an environment.
401.Pp
402This file will probably contain some initialization code followed by
403something similar to:
404.Bd -literal -offset 3n
405if read proto cookie && [ -n "$DISPLAY" ]; then
406 if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then
407 # X11UseLocalhost=yes
408 echo add unix:`echo $DISPLAY |
409 cut -c11-` $proto $cookie
410 else
411 # X11UseLocalhost=no
412 echo add $DISPLAY $proto $cookie
413 fi | xauth -q -
414fi
415.Ed
416.Pp
417If this file does not exist,
418.Pa /etc/ssh/sshrc
419is run, and if that
420does not exist either, xauth is used to add the cookie.
387.Sh AUTHORIZED_KEYS FILE FORMAT 421.Sh AUTHORIZED_KEYS FILE FORMAT
388.Pa ~/.ssh/authorized_keys
389is the default file that lists the public keys that are
390permitted for RSA authentication in protocol version 1
391and for public key authentication (PubkeyAuthentication)
392in protocol version 2.
393.Cm AuthorizedKeysFile 422.Cm AuthorizedKeysFile
394may be used to specify an alternative file. 423specifies the file containing public keys for
395.Pp 424public key authentication;
425if none is specified, the default is
426.Pa ~/.ssh/authorized_keys .
396Each line of the file contains one 427Each line of the file contains one
397key (empty lines and lines starting with a 428key (empty lines and lines starting with a
398.Ql # 429.Ql #
399are ignored as 430are ignored as
400comments). 431comments).
401Each RSA public key consists of the following fields, separated by 432Protocol 1 public keys consist of the following space-separated fields:
402spaces: options, bits, exponent, modulus, comment. 433options, bits, exponent, modulus, comment.
403Each protocol version 2 public key consists of: 434Protocol 2 public key consist of:
404options, keytype, base64 encoded key, comment. 435options, keytype, base64-encoded key, comment.
405The options field 436The options field is optional;
406is optional; its presence is determined by whether the line starts 437its presence is determined by whether the line starts
407with a number or not (the options field never starts with a number). 438with a number or not (the options field never starts with a number).
408The bits, exponent, modulus and comment fields give the RSA key for 439The bits, exponent, modulus, and comment fields give the RSA key for
409protocol version 1; the 440protocol version 1; the
410comment field is not used for anything (but may be convenient for the 441comment field is not used for anything (but may be convenient for the
411user to identify the key). 442user to identify the key).
@@ -420,7 +451,7 @@ Note that lines in this file are usually several hundred bytes long
420keys up to 16 kilobits. 451keys up to 16 kilobits.
421You don't want to type them in; instead, copy the 452You don't want to type them in; instead, copy the
422.Pa identity.pub , 453.Pa identity.pub ,
423.Pa id_dsa.pub 454.Pa id_dsa.pub ,
424or the 455or the
425.Pa id_rsa.pub 456.Pa id_rsa.pub
426file and edit it. 457file and edit it.
@@ -435,26 +466,6 @@ No spaces are permitted, except within double quotes.
435The following option specifications are supported (note 466The following option specifications are supported (note
436that option keywords are case-insensitive): 467that option keywords are case-insensitive):
437.Bl -tag -width Ds 468.Bl -tag -width Ds
438.It Cm from="pattern-list"
439Specifies that in addition to public key authentication, the canonical name
440of the remote host must be present in the comma-separated list of
441patterns
442.Pf ( Ql \&*
443and
444.Ql \&?
445serve as wildcards).
446The list may also contain
447patterns negated by prefixing them with
448.Ql \&! ;
449if the canonical host name matches a negated pattern, the key is not accepted.
450The purpose
451of this option is to optionally increase security: public key authentication
452by itself does not trust the network or name servers or anything (but
453the key); however, if somebody somehow steals the key, the key
454permits an intruder to log in from anywhere in the world.
455This additional option makes using a stolen key more difficult (name
456servers and/or routers would have to be compromised in addition to
457just the key).
458.It Cm command="command" 469.It Cm command="command"
459Specifies that the command is executed whenever this key is used for 470Specifies that the command is executed whenever this key is used for
460authentication. 471authentication.
@@ -470,6 +481,9 @@ to restrict certain public keys to perform just a specific operation.
470An example might be a key that permits remote backups but nothing else. 481An example might be a key that permits remote backups but nothing else.
471Note that the client may specify TCP and/or X11 482Note that the client may specify TCP and/or X11
472forwarding unless they are explicitly prohibited. 483forwarding unless they are explicitly prohibited.
484The command originally supplied by the client is available in the
485.Ev SSH_ORIGINAL_COMMAND
486environment variable.
473Note that this option applies to shell, command or subsystem execution. 487Note that this option applies to shell, command or subsystem execution.
474.It Cm environment="NAME=value" 488.It Cm environment="NAME=value"
475Specifies that the string is to be added to the environment when 489Specifies that the string is to be added to the environment when
@@ -484,20 +498,38 @@ option.
484This option is automatically disabled if 498This option is automatically disabled if
485.Cm UseLogin 499.Cm UseLogin
486is enabled. 500is enabled.
501.It Cm from="pattern-list"
502Specifies that in addition to public key authentication, the canonical name
503of the remote host must be present in the comma-separated list of
504patterns.
505The purpose
506of this option is to optionally increase security: public key authentication
507by itself does not trust the network or name servers or anything (but
508the key); however, if somebody somehow steals the key, the key
509permits an intruder to log in from anywhere in the world.
510This additional option makes using a stolen key more difficult (name
511servers and/or routers would have to be compromised in addition to
512just the key).
513.Pp
514See
515.Sx PATTERNS
516in
517.Xr ssh_config 5
518for more information on patterns.
519.It Cm no-agent-forwarding
520Forbids authentication agent forwarding when this key is used for
521authentication.
487.It Cm no-port-forwarding 522.It Cm no-port-forwarding
488Forbids TCP forwarding when this key is used for authentication. 523Forbids TCP forwarding when this key is used for authentication.
489Any port forward requests by the client will return an error. 524Any port forward requests by the client will return an error.
490This might be used, e.g., in connection with the 525This might be used, e.g. in connection with the
491.Cm command 526.Cm command
492option. 527option.
528.It Cm no-pty
529Prevents tty allocation (a request to allocate a pty will fail).
493.It Cm no-X11-forwarding 530.It Cm no-X11-forwarding
494Forbids X11 forwarding when this key is used for authentication. 531Forbids X11 forwarding when this key is used for authentication.
495Any X11 forward requests by the client will return an error. 532Any X11 forward requests by the client will return an error.
496.It Cm no-agent-forwarding
497Forbids authentication agent forwarding when this key is used for
498authentication.
499.It Cm no-pty
500Prevents tty allocation (a request to allocate a pty will fail).
501.It Cm permitopen="host:port" 533.It Cm permitopen="host:port"
502Limit local 534Limit local
503.Li ``ssh -L'' 535.Li ``ssh -L''
@@ -517,16 +549,20 @@ device on the server.
517Without this option, the next available device will be used if 549Without this option, the next available device will be used if
518the client requests a tunnel. 550the client requests a tunnel.
519.El 551.El
520.Ss Examples
5211024 33 12121...312314325 ylo@foo.bar
522.Pp 552.Pp
523from="*.niksula.hut.fi,!pc.niksula.hut.fi" 1024 35 23...2334 ylo@niksula 553An example authorized_keys file:
524.Pp 554.Bd -literal -offset 3n
525command="dump /home",no-pty,no-port-forwarding 1024 33 23...2323 backup.hut.fi 555# Comments allowed at start of line
526.Pp 556ssh-rsa AAAAB3Nza...LiPk== user@example.net
527permitopen="10.2.1.55:80",permitopen="10.2.1.56:25" 1024 33 23...2323 557from="*.sales.example.net,!pc.sales.example.net" ssh-rsa
528.Pp 558AAAAB2...19Q== john@example.net
529tunnel="0",command="sh /etc/netstart tun0" ssh-rsa AAAA...== reyk@openbsd.org 559command="dump /home",no-pty,no-port-forwarding ssh-dss
560AAAAC3...51R== example.net
561permitopen="192.0.2.1:80",permitopen="192.0.2.2:25" ssh-dss
562AAAAB5...21S==
563tunnel="0",command="sh /etc/netstart tun0" ssh-rsa AAAA...==
564jane@example.net
565.Ed
530.Sh SSH_KNOWN_HOSTS FILE FORMAT 566.Sh SSH_KNOWN_HOSTS FILE FORMAT
531The 567The
532.Pa /etc/ssh/ssh_known_hosts 568.Pa /etc/ssh/ssh_known_hosts
@@ -535,7 +571,7 @@ and
535files contain host public keys for all known hosts. 571files contain host public keys for all known hosts.
536The global file should 572The global file should
537be prepared by the administrator (optional), and the per-user file is 573be prepared by the administrator (optional), and the per-user file is
538maintained automatically: whenever the user connects from an unknown host 574maintained automatically: whenever the user connects from an unknown host,
539its key is added to the per-user file. 575its key is added to the per-user file.
540.Pp 576.Pp
541Each line in these files contains the following fields: hostnames, 577Each line in these files contains the following fields: hostnames,
@@ -543,7 +579,7 @@ bits, exponent, modulus, comment.
543The fields are separated by spaces. 579The fields are separated by spaces.
544.Pp 580.Pp
545Hostnames is a comma-separated list of patterns 581Hostnames is a comma-separated list of patterns
546.Pf ( Ql \&* 582.Pf ( Ql *
547and 583and
548.Ql \&? 584.Ql \&?
549act as 585act as
@@ -555,6 +591,13 @@ A pattern may also be preceded by
555to indicate negation: if the host name matches a negated 591to indicate negation: if the host name matches a negated
556pattern, it is not accepted (by that line) even if it matched another 592pattern, it is not accepted (by that line) even if it matched another
557pattern on the line. 593pattern on the line.
594A hostname or address may optionally be enclosed within
595.Ql \&[
596and
597.Ql \&]
598brackets then followed by
599.Ql \&:
600and a non-standard port number.
558.Pp 601.Pp
559Alternately, hostnames may be stored in a hashed form which hides host names 602Alternately, hostnames may be stored in a hashed form which hides host names
560and addresses should the file's contents be disclosed. 603and addresses should the file's contents be disclosed.
@@ -565,7 +608,7 @@ Only one hashed hostname may appear on a single line and none of the above
565negation or wildcard operators may be applied. 608negation or wildcard operators may be applied.
566.Pp 609.Pp
567Bits, exponent, and modulus are taken directly from the RSA host key; they 610Bits, exponent, and modulus are taken directly from the RSA host key; they
568can be obtained, e.g., from 611can be obtained, for example, from
569.Pa /etc/ssh/ssh_host_key.pub . 612.Pa /etc/ssh/ssh_host_key.pub .
570The optional comment field continues to the end of the line, and is not used. 613The optional comment field continues to the end of the line, and is not used.
571.Pp 614.Pp
@@ -590,88 +633,19 @@ Rather, generate them by a script
590or by taking 633or by taking
591.Pa /etc/ssh/ssh_host_key.pub 634.Pa /etc/ssh/ssh_host_key.pub
592and adding the host names at the front. 635and adding the host names at the front.
593.Ss Examples 636.Pp
594.Bd -literal 637An example ssh_known_hosts file:
595closenet,...,130.233.208.41 1024 37 159...93 closenet.hut.fi 638.Bd -literal -offset 3n
596cvs.openbsd.org,199.185.137.3 ssh-rsa AAAA1234.....= 639# Comments allowed at start of line
597.Ed 640closenet,...,192.0.2.53 1024 37 159...93 closenet.example.net
598.Bd -literal 641cvs.example.net,192.0.2.10 ssh-rsa AAAA1234.....=
599# A hashed hostname 642# A hashed hostname
600|1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa 643|1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa
601AAAA1234.....= 644AAAA1234.....=
602.Ed 645.Ed
603.Sh FILES 646.Sh FILES
604.Bl -tag -width Ds 647.Bl -tag -width Ds -compact
605.It Pa /etc/ssh/sshd_config 648.It ~/.hushlogin
606Contains configuration data for
607.Nm sshd .
608The file format and configuration options are described in
609.Xr sshd_config 5 .
610.It Pa /etc/ssh/ssh_host_key, /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_rsa_key
611These three files contain the private parts of the host keys.
612These files should only be owned by root, readable only by root, and not
613accessible to others.
614Note that
615.Nm
616does not start if this file is group/world-accessible.
617.It Pa /etc/ssh/ssh_host_key.pub, /etc/ssh/ssh_host_dsa_key.pub, /etc/ssh/ssh_host_rsa_key.pub
618These three files contain the public parts of the host keys.
619These files should be world-readable but writable only by
620root.
621Their contents should match the respective private parts.
622These files are not
623really used for anything; they are provided for the convenience of
624the user so their contents can be copied to known hosts files.
625These files are created using
626.Xr ssh-keygen 1 .
627.It Pa /etc/moduli
628Contains Diffie-Hellman groups used for the "Diffie-Hellman Group Exchange".
629The file format is described in
630.Xr moduli 5 .
631.It Pa /var/empty
632.Xr chroot 2
633directory used by
634.Nm
635during privilege separation in the pre-authentication phase.
636The directory should not contain any files and must be owned by root
637and not group or world-writable.
638.It Pa /var/run/sshd.pid
639Contains the process ID of the
640.Nm
641listening for connections (if there are several daemons running
642concurrently for different ports, this contains the process ID of the one
643started last).
644The content of this file is not sensitive; it can be world-readable.
645.It Pa ~/.ssh/authorized_keys
646Lists the public keys (RSA or DSA) that can be used to log into the user's account.
647This file must be readable by root (which may on some machines imply
648it being world-readable if the user's home directory resides on an NFS
649volume).
650It is recommended that it not be accessible by others.
651The format of this file is described above.
652Users will place the contents of their
653.Pa identity.pub ,
654.Pa id_dsa.pub
655and/or
656.Pa id_rsa.pub
657files into this file, as described in
658.Xr ssh-keygen 1 .
659.It Pa "/etc/ssh/ssh_known_hosts", "~/.ssh/known_hosts"
660These files are consulted when using rhosts with RSA host
661authentication or protocol version 2 hostbased authentication
662to check the public key of the host.
663The key must be listed in one of these files to be accepted.
664The client uses the same files
665to verify that it is connecting to the correct remote host.
666These files should be writable only by root/the owner.
667.Pa /etc/ssh/ssh_known_hosts
668should be world-readable, and
669.Pa ~/.ssh/known_hosts
670can, but need not be, world-readable.
671.It Pa /etc/motd
672See
673.Xr motd 5 .
674.It Pa ~/.hushlogin
675This file is used to suppress printing the last login time and 649This file is used to suppress printing the last login time and
676.Pa /etc/motd , 650.Pa /etc/motd ,
677if 651if
@@ -682,86 +656,49 @@ respectively,
682are enabled. 656are enabled.
683It does not suppress printing of the banner specified by 657It does not suppress printing of the banner specified by
684.Cm Banner . 658.Cm Banner .
685.It Pa /etc/nologin 659.Pp
686If this file exists, 660.It ~/.rhosts
661This file is used for host-based authentication (see
662.Xr ssh 1
663for more information).
664On some machines this file may need to be
665world-readable if the user's home directory is on an NFS partition,
666because
687.Nm 667.Nm
688refuses to let anyone except root log in. 668reads it as root.
689The contents of the file 669Additionally, this file must be owned by the user,
690are displayed to anyone trying to log in, and non-root connections are 670and must not have write permissions for anyone else.
691refused. 671The recommended
692The file should be world-readable. 672permission for most machines is read/write for the user, and not
693.It Pa /etc/hosts.allow, /etc/hosts.deny
694Access controls that should be enforced by tcp-wrappers are defined here.
695Further details are described in
696.Xr hosts_access 5 .
697.It Pa ~/.rhosts
698This file is used during
699.Cm RhostsRSAAuthentication
700and
701.Cm HostbasedAuthentication
702and contains host-username pairs, separated by a space, one per
703line.
704The given user on the corresponding host is permitted to log in
705without a password.
706The same file is used by rlogind and rshd.
707The file must
708be writable only by the user; it is recommended that it not be
709accessible by others. 673accessible by others.
710.Pp 674.Pp
711It is also possible to use netgroups in the file. 675.It ~/.shosts
712Either host or user 676This file is used in exactly the same way as
713name may be of the form +@groupname to specify all hosts or all users 677.Pa .rhosts ,
714in the group. 678but allows host-based authentication without permitting login with
715.It Pa ~/.shosts 679rlogin/rsh.
716For ssh, 680.Pp
717this file is exactly the same as for 681.It ~/.ssh/authorized_keys
718.Pa .rhosts . 682Lists the public keys (RSA/DSA) that can be used for logging in as this user.
719However, this file is 683The format of this file is described above.
720not used by rlogin and rshd, so using this permits access using SSH only. 684The content of the file is not highly sensitive, but the recommended
721.It Pa /etc/hosts.equiv 685permissions are read/write for the user, and not accessible by others.
722This file is used during 686.Pp
723.Cm RhostsRSAAuthentication 687If this file, the
724and 688.Pa ~/.ssh
725.Cm HostbasedAuthentication 689directory, or the user's home directory are writable
726authentication. 690by other users, then the file could be modified or replaced by unauthorized
727In the simplest form, this file contains host names, one per line. 691users.
728Users on 692In this case,
729those hosts are permitted to log in without a password, provided they 693.Nm
730have the same user name on both machines. 694will not allow it to be used unless the
731The host name may also be 695.Cm StrictModes
732followed by a user name; such users are permitted to log in as 696option has been set to
733.Em any 697.Dq no .
734user on this machine (except root). 698The recommended permissions can be set by executing
735Additionally, the syntax 699.Dq chmod go-w ~/ ~/.ssh ~/.ssh/authorized_keys .
736.Dq +@group 700.Pp
737can be used to specify netgroups. 701.It ~/.ssh/environment
738Negated entries start with
739.Ql \&- .
740.Pp
741If the client host/user is successfully matched in this file, login is
742automatically permitted provided the client and server user names are the
743same.
744Additionally, successful client host key authentication is required.
745This file must be writable only by root; it is recommended
746that it be world-readable.
747.Pp
748.Sy "Warning: It is almost never a good idea to use user names in"
749.Pa hosts.equiv .
750Beware that it really means that the named user(s) can log in as
751.Em anybody ,
752which includes bin, daemon, adm, and other accounts that own critical
753binaries and directories.
754Using a user name practically grants the user root access.
755The only valid use for user names that I can think
756of is in negative entries.
757.Pp
758Note that this warning also applies to rsh/rlogin.
759.It Pa /etc/shosts.equiv
760This is processed exactly as
761.Pa /etc/hosts.equiv .
762However, this file may be useful in environments that want to run both
763rsh/rlogin and ssh.
764.It Pa ~/.ssh/environment
765This file is read into the environment at login (if it exists). 702This file is read into the environment at login (if it exists).
766It can only contain empty lines, comment lines (that start with 703It can only contain empty lines, comment lines (that start with
767.Ql # ) , 704.Ql # ) ,
@@ -772,55 +709,115 @@ Environment processing is disabled by default and is
772controlled via the 709controlled via the
773.Cm PermitUserEnvironment 710.Cm PermitUserEnvironment
774option. 711option.
775.It Pa ~/.ssh/rc 712.Pp
776If this file exists, it is run with 713.It ~/.ssh/known_hosts
777.Pa /bin/sh 714Contains a list of host keys for all hosts the user has logged into
778after reading the 715that are not already in the systemwide list of known host keys.
779environment files but before starting the user's shell or command. 716The format of this file is described above.
780It must not produce any output on stdout; stderr must be used 717This file should be writable only by root/the owner and
781instead. 718can, but need not be, world-readable.
782If X11 forwarding is in use, it will receive the "proto cookie" pair in 719.Pp
783its standard input (and 720.It ~/.ssh/rc
784.Ev DISPLAY 721Contains initialization routines to be run before
785in its environment). 722the user's home directory becomes accessible.
786The script must call 723This file should be writable only by the user, and need not be
787.Xr xauth 1 724readable by anyone else.
788because 725.Pp
726.It /etc/hosts.allow
727.It /etc/hosts.deny
728Access controls that should be enforced by tcp-wrappers are defined here.
729Further details are described in
730.Xr hosts_access 5 .
731.Pp
732.It /etc/hosts.equiv
733This file is for host-based authentication (see
734.Xr ssh 1 ) .
735It should only be writable by root.
736.Pp
737.It /etc/moduli
738Contains Diffie-Hellman groups used for the "Diffie-Hellman Group Exchange".
739The file format is described in
740.Xr moduli 5 .
741.Pp
742.It /etc/motd
743See
744.Xr motd 5 .
745.Pp
746.It /etc/nologin
747If this file exists,
789.Nm 748.Nm
790will not run xauth automatically to add X11 cookies. 749refuses to let anyone except root log in.
750The contents of the file
751are displayed to anyone trying to log in, and non-root connections are
752refused.
753The file should be world-readable.
791.Pp 754.Pp
792The primary purpose of this file is to run any initialization routines 755.It /etc/shosts.equiv
793which may be needed before the user's home directory becomes 756This file is used in exactly the same way as
794accessible; AFS is a particular example of such an environment. 757.Pa hosts.equiv ,
758but allows host-based authentication without permitting login with
759rlogin/rsh.
760.Pp
761.It /etc/ssh/ssh_known_hosts
762Systemwide list of known host keys.
763This file should be prepared by the
764system administrator to contain the public host keys of all machines in the
765organization.
766The format of this file is described above.
767This file should be writable only by root/the owner and
768should be world-readable.
795.Pp 769.Pp
796This file will probably contain some initialization code followed by 770.It /etc/ssh/ssh_host_key
797something similar to: 771.It /etc/ssh/ssh_host_dsa_key
798.Bd -literal 772.It /etc/ssh/ssh_host_rsa_key
799if read proto cookie && [ -n "$DISPLAY" ]; then 773These three files contain the private parts of the host keys.
800 if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then 774These files should only be owned by root, readable only by root, and not
801 # X11UseLocalhost=yes 775accessible to others.
802 echo add unix:`echo $DISPLAY | 776Note that
803 cut -c11-` $proto $cookie 777.Nm
804 else 778does not start if these files are group/world-accessible.
805 # X11UseLocalhost=no
806 echo add $DISPLAY $proto $cookie
807 fi | xauth -q -
808fi
809.Ed
810.Pp 779.Pp
811If this file does not exist, 780.It /etc/ssh/ssh_host_key.pub
812.Pa /etc/ssh/sshrc 781.It /etc/ssh/ssh_host_dsa_key.pub
813is run, and if that 782.It /etc/ssh/ssh_host_rsa_key.pub
814does not exist either, xauth is used to add the cookie. 783These three files contain the public parts of the host keys.
784These files should be world-readable but writable only by
785root.
786Their contents should match the respective private parts.
787These files are not
788really used for anything; they are provided for the convenience of
789the user so their contents can be copied to known hosts files.
790These files are created using
791.Xr ssh-keygen 1 .
815.Pp 792.Pp
816This file should be writable only by the user, and need not be 793.It /etc/ssh/sshd_config
817readable by anyone else. 794Contains configuration data for
818.It Pa /etc/ssh/sshrc 795.Nm sshd .
819Like 796The file format and configuration options are described in
820.Pa ~/.ssh/rc . 797.Xr sshd_config 5 .
821This can be used to specify 798.Pp
799.It /etc/ssh/sshrc
800Similar to
801.Pa ~/.ssh/rc ,
802it can be used to specify
822machine-specific login-time initializations globally. 803machine-specific login-time initializations globally.
823This file should be writable only by root, and should be world-readable. 804This file should be writable only by root, and should be world-readable.
805.Pp
806.It /var/empty
807.Xr chroot 2
808directory used by
809.Nm
810during privilege separation in the pre-authentication phase.
811The directory should not contain any files and must be owned by root
812and not group or world-writable.
813.Pp
814.It /var/run/sshd.pid
815Contains the process ID of the
816.Nm
817listening for connections (if there are several daemons running
818concurrently for different ports, this contains the process ID of the one
819started last).
820The content of this file is not sensitive; it can be world-readable.
824.El 821.El
825.Sh SEE ALSO 822.Sh SEE ALSO
826.Xr scp 1 , 823.Xr scp 1 ,
@@ -836,26 +833,6 @@ This file should be writable only by root, and should be world-readable.
836.Xr sshd_config 5 , 833.Xr sshd_config 5 ,
837.Xr inetd 8 , 834.Xr inetd 8 ,
838.Xr sftp-server 8 835.Xr sftp-server 8
839.Rs
840.%A T. Ylonen
841.%A T. Kivinen
842.%A M. Saarinen
843.%A T. Rinne
844.%A S. Lehtinen
845.%T "SSH Protocol Architecture"
846.%N draft-ietf-secsh-architecture-12.txt
847.%D January 2002
848.%O work in progress material
849.Re
850.Rs
851.%A M. Friedl
852.%A N. Provos
853.%A W. A. Simpson
854.%T "Diffie-Hellman Group Exchange for the SSH Transport Layer Protocol"
855.%N draft-ietf-secsh-dh-group-exchange-02.txt
856.%D January 2002
857.%O work in progress material
858.Re
859.Sh AUTHORS 836.Sh AUTHORS
860OpenSSH is a derivative of the original and free 837OpenSSH is a derivative of the original and free
861ssh 1.2.12 release by Tatu Ylonen. 838ssh 1.2.12 release by Tatu Ylonen.
@@ -867,3 +844,14 @@ Markus Friedl contributed the support for SSH
867protocol versions 1.5 and 2.0. 844protocol versions 1.5 and 2.0.
868Niels Provos and Markus Friedl contributed support 845Niels Provos and Markus Friedl contributed support
869for privilege separation. 846for privilege separation.
847.Sh CAVEATS
848System security is not improved unless
849.Nm rshd ,
850.Nm rlogind ,
851and
852.Nm rexecd
853are disabled (thus completely disabling
854.Xr rlogin
855and
856.Xr rsh
857into the machine).
diff --git a/sshd.c b/sshd.c
index 1eac32797..bfbaa52ca 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.349 2007/02/21 11:00:05 dtucker Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -42,7 +43,33 @@
42 */ 43 */
43 44
44#include "includes.h" 45#include "includes.h"
45RCSID("$OpenBSD: sshd.c,v 1.318 2005/12/24 02:27:41 djm Exp $"); 46
47#include <sys/types.h>
48#include <sys/ioctl.h>
49#include <sys/socket.h>
50#ifdef HAVE_SYS_STAT_H
51# include <sys/stat.h>
52#endif
53#ifdef HAVE_SYS_TIME_H
54# include <sys/time.h>
55#endif
56#include "openbsd-compat/sys-tree.h"
57#include <sys/wait.h>
58
59#include <errno.h>
60#include <fcntl.h>
61#include <netdb.h>
62#ifdef HAVE_PATHS_H
63#include <paths.h>
64#endif
65#include <grp.h>
66#include <pwd.h>
67#include <signal.h>
68#include <stdarg.h>
69#include <stdio.h>
70#include <stdlib.h>
71#include <string.h>
72#include <unistd.h>
46 73
47#include <openssl/dh.h> 74#include <openssl/dh.h>
48#include <openssl/bn.h> 75#include <openssl/bn.h>
@@ -53,28 +80,28 @@ RCSID("$OpenBSD: sshd.c,v 1.318 2005/12/24 02:27:41 djm Exp $");
53#include <prot.h> 80#include <prot.h>
54#endif 81#endif
55 82
83#include "xmalloc.h"
56#include "ssh.h" 84#include "ssh.h"
57#include "ssh1.h" 85#include "ssh1.h"
58#include "ssh2.h" 86#include "ssh2.h"
59#include "xmalloc.h"
60#include "rsa.h" 87#include "rsa.h"
61#include "sshpty.h" 88#include "sshpty.h"
62#include "packet.h" 89#include "packet.h"
63#include "log.h" 90#include "log.h"
91#include "buffer.h"
64#include "servconf.h" 92#include "servconf.h"
65#include "uidswap.h" 93#include "uidswap.h"
66#include "compat.h" 94#include "compat.h"
67#include "buffer.h"
68#include "bufaux.h"
69#include "cipher.h" 95#include "cipher.h"
70#include "kex.h"
71#include "key.h" 96#include "key.h"
97#include "kex.h"
72#include "dh.h" 98#include "dh.h"
73#include "myproposal.h" 99#include "myproposal.h"
74#include "authfile.h" 100#include "authfile.h"
75#include "pathnames.h" 101#include "pathnames.h"
76#include "atomicio.h" 102#include "atomicio.h"
77#include "canohost.h" 103#include "canohost.h"
104#include "hostfile.h"
78#include "auth.h" 105#include "auth.h"
79#include "misc.h" 106#include "misc.h"
80#include "msg.h" 107#include "msg.h"
@@ -83,8 +110,12 @@ RCSID("$OpenBSD: sshd.c,v 1.318 2005/12/24 02:27:41 djm Exp $");
83#include "session.h" 110#include "session.h"
84#include "monitor_mm.h" 111#include "monitor_mm.h"
85#include "monitor.h" 112#include "monitor.h"
113#ifdef GSSAPI
114#include "ssh-gss.h"
115#endif
86#include "monitor_wrap.h" 116#include "monitor_wrap.h"
87#include "monitor_fdpass.h" 117#include "monitor_fdpass.h"
118#include "version.h"
88 119
89#ifdef USE_SECURITY_SESSION_API 120#ifdef USE_SECURITY_SESSION_API
90#include <Security/AuthSession.h> 121#include <Security/AuthSession.h>
@@ -205,15 +236,21 @@ int *startup_pipes = NULL;
205int startup_pipe; /* in child */ 236int startup_pipe; /* in child */
206 237
207/* variables used for privilege separation */ 238/* variables used for privilege separation */
208int use_privsep; 239int use_privsep = -1;
209struct monitor *pmonitor = NULL; 240struct monitor *pmonitor = NULL;
210 241
211/* global authentication context */ 242/* global authentication context */
212Authctxt *the_authctxt = NULL; 243Authctxt *the_authctxt = NULL;
213 244
245/* sshd_config buffer */
246Buffer cfg;
247
214/* message to be displayed after login */ 248/* message to be displayed after login */
215Buffer loginmsg; 249Buffer loginmsg;
216 250
251/* Unprivileged user */
252struct passwd *privsep_pw = NULL;
253
217/* Prototypes for various functions defined later in this file. */ 254/* Prototypes for various functions defined later in this file. */
218void destroy_sensitive_data(void); 255void destroy_sensitive_data(void);
219void demote_sensitive_data(void); 256void demote_sensitive_data(void);
@@ -250,6 +287,8 @@ close_startup_pipes(void)
250 * the effect is to reread the configuration file (and to regenerate 287 * the effect is to reread the configuration file (and to regenerate
251 * the server key). 288 * the server key).
252 */ 289 */
290
291/*ARGSUSED*/
253static void 292static void
254sighup_handler(int sig) 293sighup_handler(int sig)
255{ 294{
@@ -270,6 +309,7 @@ sighup_restart(void)
270 logit("Received SIGHUP; restarting."); 309 logit("Received SIGHUP; restarting.");
271 close_listen_socks(); 310 close_listen_socks();
272 close_startup_pipes(); 311 close_startup_pipes();
312 alarm(0); /* alarm timer persists across exec */
273 execv(saved_argv[0], saved_argv); 313 execv(saved_argv[0], saved_argv);
274 logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0], 314 logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0],
275 strerror(errno)); 315 strerror(errno));
@@ -279,6 +319,7 @@ sighup_restart(void)
279/* 319/*
280 * Generic signal handler for terminating signals in the master daemon. 320 * Generic signal handler for terminating signals in the master daemon.
281 */ 321 */
322/*ARGSUSED*/
282static void 323static void
283sigterm_handler(int sig) 324sigterm_handler(int sig)
284{ 325{
@@ -289,6 +330,7 @@ sigterm_handler(int sig)
289 * SIGCHLD handler. This is called whenever a child dies. This will then 330 * SIGCHLD handler. This is called whenever a child dies. This will then
290 * reap any zombies left by exited children. 331 * reap any zombies left by exited children.
291 */ 332 */
333/*ARGSUSED*/
292static void 334static void
293main_sigchld_handler(int sig) 335main_sigchld_handler(int sig)
294{ 336{
@@ -307,16 +349,15 @@ main_sigchld_handler(int sig)
307/* 349/*
308 * Signal handler for the alarm after the login grace period has expired. 350 * Signal handler for the alarm after the login grace period has expired.
309 */ 351 */
352/*ARGSUSED*/
310static void 353static void
311grace_alarm_handler(int sig) 354grace_alarm_handler(int sig)
312{ 355{
313 /* XXX no idea how fix this signal handler */
314
315 if (use_privsep && pmonitor != NULL && pmonitor->m_pid > 0) 356 if (use_privsep && pmonitor != NULL && pmonitor->m_pid > 0)
316 kill(pmonitor->m_pid, SIGALRM); 357 kill(pmonitor->m_pid, SIGALRM);
317 358
318 /* Log error and exit. */ 359 /* Log error and exit. */
319 fatal("Timeout before authentication for %s", get_remote_ipaddr()); 360 sigdie("Timeout before authentication for %s", get_remote_ipaddr());
320} 361}
321 362
322/* 363/*
@@ -349,6 +390,7 @@ generate_ephemeral_server_key(void)
349 arc4random_stir(); 390 arc4random_stir();
350} 391}
351 392
393/*ARGSUSED*/
352static void 394static void
353key_regeneration_alarm(int sig) 395key_regeneration_alarm(int sig)
354{ 396{
@@ -545,7 +587,6 @@ privsep_preauth_child(void)
545{ 587{
546 u_int32_t rnd[256]; 588 u_int32_t rnd[256];
547 gid_t gidset[1]; 589 gid_t gidset[1];
548 struct passwd *pw;
549 int i; 590 int i;
550 591
551 /* Enable challenge-response authentication for privilege separation */ 592 /* Enable challenge-response authentication for privilege separation */
@@ -558,12 +599,6 @@ privsep_preauth_child(void)
558 /* Demote the private keys to public keys. */ 599 /* Demote the private keys to public keys. */
559 demote_sensitive_data(); 600 demote_sensitive_data();
560 601
561 if ((pw = getpwnam(SSH_PRIVSEP_USER)) == NULL)
562 fatal("Privilege separation user %s does not exist",
563 SSH_PRIVSEP_USER);
564 memset(pw->pw_passwd, 0, strlen(pw->pw_passwd));
565 endpwent();
566
567 /* Change our root directory */ 602 /* Change our root directory */
568 if (chroot(_PATH_PRIVSEP_CHROOT_DIR) == -1) 603 if (chroot(_PATH_PRIVSEP_CHROOT_DIR) == -1)
569 fatal("chroot(\"%s\"): %s", _PATH_PRIVSEP_CHROOT_DIR, 604 fatal("chroot(\"%s\"): %s", _PATH_PRIVSEP_CHROOT_DIR,
@@ -572,16 +607,16 @@ privsep_preauth_child(void)
572 fatal("chdir(\"/\"): %s", strerror(errno)); 607 fatal("chdir(\"/\"): %s", strerror(errno));
573 608
574 /* Drop our privileges */ 609 /* Drop our privileges */
575 debug3("privsep user:group %u:%u", (u_int)pw->pw_uid, 610 debug3("privsep user:group %u:%u", (u_int)privsep_pw->pw_uid,
576 (u_int)pw->pw_gid); 611 (u_int)privsep_pw->pw_gid);
577#if 0 612#if 0
578 /* XXX not ready, too heavy after chroot */ 613 /* XXX not ready, too heavy after chroot */
579 do_setusercontext(pw); 614 do_setusercontext(privsep_pw);
580#else 615#else
581 gidset[0] = pw->pw_gid; 616 gidset[0] = privsep_pw->pw_gid;
582 if (setgroups(1, gidset) < 0) 617 if (setgroups(1, gidset) < 0)
583 fatal("setgroups: %.100s", strerror(errno)); 618 fatal("setgroups: %.100s", strerror(errno));
584 permanently_set_uid(pw); 619 permanently_set_uid(privsep_pw);
585#endif 620#endif
586} 621}
587 622
@@ -870,6 +905,325 @@ recv_rexec_state(int fd, Buffer *conf)
870 debug3("%s: done", __func__); 905 debug3("%s: done", __func__);
871} 906}
872 907
908/* Accept a connection from inetd */
909static void
910server_accept_inetd(int *sock_in, int *sock_out)
911{
912 int fd;
913
914 startup_pipe = -1;
915 if (rexeced_flag) {
916 close(REEXEC_CONFIG_PASS_FD);
917 *sock_in = *sock_out = dup(STDIN_FILENO);
918 if (!debug_flag) {
919 startup_pipe = dup(REEXEC_STARTUP_PIPE_FD);
920 close(REEXEC_STARTUP_PIPE_FD);
921 }
922 } else {
923 *sock_in = dup(STDIN_FILENO);
924 *sock_out = dup(STDOUT_FILENO);
925 }
926 /*
927 * We intentionally do not close the descriptors 0, 1, and 2
928 * as our code for setting the descriptors won't work if
929 * ttyfd happens to be one of those.
930 */
931 if ((fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
932 dup2(fd, STDIN_FILENO);
933 dup2(fd, STDOUT_FILENO);
934 if (fd > STDOUT_FILENO)
935 close(fd);
936 }
937 debug("inetd sockets after dupping: %d, %d", *sock_in, *sock_out);
938}
939
940/*
941 * Listen for TCP connections
942 */
943static void
944server_listen(void)
945{
946 int ret, listen_sock, on = 1;
947 struct addrinfo *ai;
948 char ntop[NI_MAXHOST], strport[NI_MAXSERV];
949
950 for (ai = options.listen_addrs; ai; ai = ai->ai_next) {
951 if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
952 continue;
953 if (num_listen_socks >= MAX_LISTEN_SOCKS)
954 fatal("Too many listen sockets. "
955 "Enlarge MAX_LISTEN_SOCKS");
956 if ((ret = getnameinfo(ai->ai_addr, ai->ai_addrlen,
957 ntop, sizeof(ntop), strport, sizeof(strport),
958 NI_NUMERICHOST|NI_NUMERICSERV)) != 0) {
959 error("getnameinfo failed: %.100s",
960 (ret != EAI_SYSTEM) ? gai_strerror(ret) :
961 strerror(errno));
962 continue;
963 }
964 /* Create socket for listening. */
965 listen_sock = socket(ai->ai_family, ai->ai_socktype,
966 ai->ai_protocol);
967 if (listen_sock < 0) {
968 /* kernel may not support ipv6 */
969 verbose("socket: %.100s", strerror(errno));
970 continue;
971 }
972 if (set_nonblock(listen_sock) == -1) {
973 close(listen_sock);
974 continue;
975 }
976 /*
977 * Set socket options.
978 * Allow local port reuse in TIME_WAIT.
979 */
980 if (setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR,
981 &on, sizeof(on)) == -1)
982 error("setsockopt SO_REUSEADDR: %s", strerror(errno));
983
984 debug("Bind to port %s on %s.", strport, ntop);
985
986 /* Bind the socket to the desired port. */
987 if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) {
988 error("Bind to port %s on %s failed: %.200s.",
989 strport, ntop, strerror(errno));
990 close(listen_sock);
991 continue;
992 }
993 listen_socks[num_listen_socks] = listen_sock;
994 num_listen_socks++;
995
996 /* Start listening on the port. */
997 if (listen(listen_sock, SSH_LISTEN_BACKLOG) < 0)
998 fatal("listen on [%s]:%s: %.100s",
999 ntop, strport, strerror(errno));
1000 logit("Server listening on %s port %s.", ntop, strport);
1001 }
1002 freeaddrinfo(options.listen_addrs);
1003
1004 if (!num_listen_socks)
1005 fatal("Cannot bind any address.");
1006}
1007
1008/*
1009 * The main TCP accept loop. Note that, for the non-debug case, returns
1010 * from this function are in a forked subprocess.
1011 */
1012static void
1013server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
1014{
1015 fd_set *fdset;
1016 int i, j, ret, maxfd;
1017 int key_used = 0, startups = 0;
1018 int startup_p[2] = { -1 , -1 };
1019 struct sockaddr_storage from;
1020 socklen_t fromlen;
1021 pid_t pid;
1022
1023 /* setup fd set for accept */
1024 fdset = NULL;
1025 maxfd = 0;
1026 for (i = 0; i < num_listen_socks; i++)
1027 if (listen_socks[i] > maxfd)
1028 maxfd = listen_socks[i];
1029 /* pipes connected to unauthenticated childs */
1030 startup_pipes = xcalloc(options.max_startups, sizeof(int));
1031 for (i = 0; i < options.max_startups; i++)
1032 startup_pipes[i] = -1;
1033
1034 /*
1035 * Stay listening for connections until the system crashes or
1036 * the daemon is killed with a signal.
1037 */
1038 for (;;) {
1039 if (received_sighup)
1040 sighup_restart();
1041 if (fdset != NULL)
1042 xfree(fdset);
1043 fdset = (fd_set *)xcalloc(howmany(maxfd + 1, NFDBITS),
1044 sizeof(fd_mask));
1045
1046 for (i = 0; i < num_listen_socks; i++)
1047 FD_SET(listen_socks[i], fdset);
1048 for (i = 0; i < options.max_startups; i++)
1049 if (startup_pipes[i] != -1)
1050 FD_SET(startup_pipes[i], fdset);
1051
1052 /* Wait in select until there is a connection. */
1053 ret = select(maxfd+1, fdset, NULL, NULL, NULL);
1054 if (ret < 0 && errno != EINTR)
1055 error("select: %.100s", strerror(errno));
1056 if (received_sigterm) {
1057 logit("Received signal %d; terminating.",
1058 (int) received_sigterm);
1059 close_listen_socks();
1060 unlink(options.pid_file);
1061 exit(255);
1062 }
1063 if (key_used && key_do_regen) {
1064 generate_ephemeral_server_key();
1065 key_used = 0;
1066 key_do_regen = 0;
1067 }
1068 if (ret < 0)
1069 continue;
1070
1071 for (i = 0; i < options.max_startups; i++)
1072 if (startup_pipes[i] != -1 &&
1073 FD_ISSET(startup_pipes[i], fdset)) {
1074 /*
1075 * the read end of the pipe is ready
1076 * if the child has closed the pipe
1077 * after successful authentication
1078 * or if the child has died
1079 */
1080 close(startup_pipes[i]);
1081 startup_pipes[i] = -1;
1082 startups--;
1083 }
1084 for (i = 0; i < num_listen_socks; i++) {
1085 if (!FD_ISSET(listen_socks[i], fdset))
1086 continue;
1087 fromlen = sizeof(from);
1088 *newsock = accept(listen_socks[i],
1089 (struct sockaddr *)&from, &fromlen);
1090 if (*newsock < 0) {
1091 if (errno != EINTR && errno != EWOULDBLOCK)
1092 error("accept: %.100s", strerror(errno));
1093 continue;
1094 }
1095 if (unset_nonblock(*newsock) == -1) {
1096 close(*newsock);
1097 continue;
1098 }
1099 if (drop_connection(startups) == 1) {
1100 debug("drop connection #%d", startups);
1101 close(*newsock);
1102 continue;
1103 }
1104 if (pipe(startup_p) == -1) {
1105 close(*newsock);
1106 continue;
1107 }
1108
1109 if (rexec_flag && socketpair(AF_UNIX,
1110 SOCK_STREAM, 0, config_s) == -1) {
1111 error("reexec socketpair: %s",
1112 strerror(errno));
1113 close(*newsock);
1114 close(startup_p[0]);
1115 close(startup_p[1]);
1116 continue;
1117 }
1118
1119 for (j = 0; j < options.max_startups; j++)
1120 if (startup_pipes[j] == -1) {
1121 startup_pipes[j] = startup_p[0];
1122 if (maxfd < startup_p[0])
1123 maxfd = startup_p[0];
1124 startups++;
1125 break;
1126 }
1127
1128 /*
1129 * Got connection. Fork a child to handle it, unless
1130 * we are in debugging mode.
1131 */
1132 if (debug_flag) {
1133 /*
1134 * In debugging mode. Close the listening
1135 * socket, and start processing the
1136 * connection without forking.
1137 */
1138 debug("Server will not fork when running in debugging mode.");
1139 close_listen_socks();
1140 *sock_in = *newsock;
1141 *sock_out = *newsock;
1142 close(startup_p[0]);
1143 close(startup_p[1]);
1144 startup_pipe = -1;
1145 pid = getpid();
1146 if (rexec_flag) {
1147 send_rexec_state(config_s[0],
1148 &cfg);
1149 close(config_s[0]);
1150 }
1151 break;
1152 }
1153
1154 /*
1155 * Normal production daemon. Fork, and have
1156 * the child process the connection. The
1157 * parent continues listening.
1158 */
1159 platform_pre_fork();
1160 if ((pid = fork()) == 0) {
1161 /*
1162 * Child. Close the listening and
1163 * max_startup sockets. Start using
1164 * the accepted socket. Reinitialize
1165 * logging (since our pid has changed).
1166 * We break out of the loop to handle
1167 * the connection.
1168 */
1169 platform_post_fork_child();
1170 startup_pipe = startup_p[1];
1171 close_startup_pipes();
1172 close_listen_socks();
1173 *sock_in = *newsock;
1174 *sock_out = *newsock;
1175 log_init(__progname,
1176 options.log_level,
1177 options.log_facility,
1178 log_stderr);
1179 if (rexec_flag)
1180 close(config_s[0]);
1181 break;
1182 }
1183
1184 /* Parent. Stay in the loop. */
1185 platform_post_fork_parent(pid);
1186 if (pid < 0)
1187 error("fork: %.100s", strerror(errno));
1188 else
1189 debug("Forked child %ld.", (long)pid);
1190
1191 close(startup_p[1]);
1192
1193 if (rexec_flag) {
1194 send_rexec_state(config_s[0], &cfg);
1195 close(config_s[0]);
1196 close(config_s[1]);
1197 }
1198
1199 /*
1200 * Mark that the key has been used (it
1201 * was "given" to the child).
1202 */
1203 if ((options.protocol & SSH_PROTO_1) &&
1204 key_used == 0) {
1205 /* Schedule server key regeneration alarm. */
1206 signal(SIGALRM, key_regeneration_alarm);
1207 alarm(options.key_regeneration_time);
1208 key_used = 1;
1209 }
1210
1211 close(*newsock);
1212
1213 /*
1214 * Ensure that our random state differs
1215 * from that of the child
1216 */
1217 arc4random_stir();
1218 }
1219
1220 /* child process check (or debug mode) */
1221 if (num_listen_socks < 0)
1222 break;
1223 }
1224}
1225
1226
873/* 1227/*
874 * Main program for the daemon. 1228 * Main program for the daemon.
875 */ 1229 */
@@ -878,25 +1232,14 @@ main(int ac, char **av)
878{ 1232{
879 extern char *optarg; 1233 extern char *optarg;
880 extern int optind; 1234 extern int optind;
881 int opt, j, i, fdsetsz, on = 1; 1235 int opt, i, on = 1;
882 int sock_in = -1, sock_out = -1, newsock = -1; 1236 int sock_in = -1, sock_out = -1, newsock = -1;
883 pid_t pid;
884 socklen_t fromlen;
885 fd_set *fdset;
886 struct sockaddr_storage from;
887 const char *remote_ip; 1237 const char *remote_ip;
888 int remote_port; 1238 int remote_port;
889 FILE *f;
890 struct addrinfo *ai;
891 char ntop[NI_MAXHOST], strport[NI_MAXSERV];
892 char *line; 1239 char *line;
893 int listen_sock, maxfd; 1240 int config_s[2] = { -1 , -1 };
894 int startup_p[2] = { -1 , -1 }, config_s[2] = { -1 , -1 };
895 int startups = 0;
896 Key *key; 1241 Key *key;
897 Authctxt *authctxt; 1242 Authctxt *authctxt;
898 int ret, key_used = 0;
899 Buffer cfg;
900 1243
901#ifdef HAVE_SECUREWARE 1244#ifdef HAVE_SECUREWARE
902 (void)set_auth_parameters(ac, av); 1245 (void)set_auth_parameters(ac, av);
@@ -907,7 +1250,7 @@ main(int ac, char **av)
907 /* Save argv. Duplicate so setproctitle emulation doesn't clobber it */ 1250 /* Save argv. Duplicate so setproctitle emulation doesn't clobber it */
908 saved_argc = ac; 1251 saved_argc = ac;
909 rexec_argc = ac; 1252 rexec_argc = ac;
910 saved_argv = xmalloc(sizeof(*saved_argv) * (ac + 1)); 1253 saved_argv = xcalloc(ac + 1, sizeof(*saved_argv));
911 for (i = 0; i < ac; i++) 1254 for (i = 0; i < ac; i++)
912 saved_argv[i] = xstrdup(av[i]); 1255 saved_argv[i] = xstrdup(av[i]);
913 saved_argv[i] = NULL; 1256 saved_argv[i] = NULL;
@@ -969,7 +1312,8 @@ main(int ac, char **av)
969 options.log_level = SYSLOG_LEVEL_QUIET; 1312 options.log_level = SYSLOG_LEVEL_QUIET;
970 break; 1313 break;
971 case 'b': 1314 case 'b':
972 options.server_key_bits = atoi(optarg); 1315 options.server_key_bits = (int)strtonum(optarg, 256,
1316 32768, NULL);
973 break; 1317 break;
974 case 'p': 1318 case 'p':
975 options.ports_from_cmdline = 1; 1319 options.ports_from_cmdline = 1;
@@ -1006,7 +1350,7 @@ main(int ac, char **av)
1006 test_flag = 1; 1350 test_flag = 1;
1007 break; 1351 break;
1008 case 'u': 1352 case 'u':
1009 utmp_len = atoi(optarg); 1353 utmp_len = (u_int)strtonum(optarg, 0, MAXHOSTNAMELEN+1, NULL);
1010 if (utmp_len > MAXHOSTNAMELEN) { 1354 if (utmp_len > MAXHOSTNAMELEN) {
1011 fprintf(stderr, "Invalid utmp length.\n"); 1355 fprintf(stderr, "Invalid utmp length.\n");
1012 exit(1); 1356 exit(1);
@@ -1015,7 +1359,7 @@ main(int ac, char **av)
1015 case 'o': 1359 case 'o':
1016 line = xstrdup(optarg); 1360 line = xstrdup(optarg);
1017 if (process_server_config_line(&options, line, 1361 if (process_server_config_line(&options, line,
1018 "command-line", 0) != 0) 1362 "command-line", 0, NULL, NULL, NULL, NULL) != 0)
1019 exit(1); 1363 exit(1);
1020 xfree(line); 1364 xfree(line);
1021 break; 1365 break;
@@ -1073,11 +1417,8 @@ main(int ac, char **av)
1073 else 1417 else
1074 load_server_config(config_file_name, &cfg); 1418 load_server_config(config_file_name, &cfg);
1075 1419
1076 parse_server_config(&options, 1420 parse_server_config(&options, rexeced_flag ? "rexec" : config_file_name,
1077 rexeced_flag ? "rexec" : config_file_name, &cfg); 1421 &cfg, NULL, NULL, NULL);
1078
1079 if (!rexec_flag)
1080 buffer_free(&cfg);
1081 1422
1082 seed_rng(); 1423 seed_rng();
1083 1424
@@ -1095,8 +1436,21 @@ main(int ac, char **av)
1095 1436
1096 debug("sshd version %.100s", SSH_RELEASE); 1437 debug("sshd version %.100s", SSH_RELEASE);
1097 1438
1439 /* Store privilege separation user for later use if required. */
1440 if ((privsep_pw = getpwnam(SSH_PRIVSEP_USER)) == NULL) {
1441 if (use_privsep || options.kerberos_authentication)
1442 fatal("Privilege separation user %s does not exist",
1443 SSH_PRIVSEP_USER);
1444 } else {
1445 memset(privsep_pw->pw_passwd, 0, strlen(privsep_pw->pw_passwd));
1446 privsep_pw = pwcopy(privsep_pw);
1447 xfree(privsep_pw->pw_passwd);
1448 privsep_pw->pw_passwd = xstrdup("*");
1449 }
1450 endpwent();
1451
1098 /* load private host keys */ 1452 /* load private host keys */
1099 sensitive_data.host_keys = xmalloc(options.num_host_key_files * 1453 sensitive_data.host_keys = xcalloc(options.num_host_key_files,
1100 sizeof(Key *)); 1454 sizeof(Key *));
1101 for (i = 0; i < options.num_host_key_files; i++) 1455 for (i = 0; i < options.num_host_key_files; i++)
1102 sensitive_data.host_keys[i] = NULL; 1456 sensitive_data.host_keys[i] = NULL;
@@ -1165,12 +1519,8 @@ main(int ac, char **av)
1165 } 1519 }
1166 1520
1167 if (use_privsep) { 1521 if (use_privsep) {
1168 struct passwd *pw;
1169 struct stat st; 1522 struct stat st;
1170 1523
1171 if ((pw = getpwnam(SSH_PRIVSEP_USER)) == NULL)
1172 fatal("Privilege separation user %s does not exist",
1173 SSH_PRIVSEP_USER);
1174 if ((stat(_PATH_PRIVSEP_CHROOT_DIR, &st) == -1) || 1524 if ((stat(_PATH_PRIVSEP_CHROOT_DIR, &st) == -1) ||
1175 (S_ISDIR(st.st_mode) == 0)) 1525 (S_ISDIR(st.st_mode) == 0))
1176 fatal("Missing privilege separation directory: %s", 1526 fatal("Missing privilege separation directory: %s",
@@ -1202,7 +1552,7 @@ main(int ac, char **av)
1202 debug("setgroups() failed: %.200s", strerror(errno)); 1552 debug("setgroups() failed: %.200s", strerror(errno));
1203 1553
1204 if (rexec_flag) { 1554 if (rexec_flag) {
1205 rexec_argv = xmalloc(sizeof(char *) * (rexec_argc + 2)); 1555 rexec_argv = xcalloc(rexec_argc + 2, sizeof(char *));
1206 for (i = 0; i < rexec_argc; i++) { 1556 for (i = 0; i < rexec_argc; i++) {
1207 debug("rexec_argv[%d]='%s'", i, saved_argv[i]); 1557 debug("rexec_argv[%d]='%s'", i, saved_argv[i]);
1208 rexec_argv[i] = saved_argv[i]; 1558 rexec_argv[i] = saved_argv[i];
@@ -1250,121 +1600,31 @@ main(int ac, char **av)
1250 /* ignore SIGPIPE */ 1600 /* ignore SIGPIPE */
1251 signal(SIGPIPE, SIG_IGN); 1601 signal(SIGPIPE, SIG_IGN);
1252 1602
1253 /* Start listening for a socket, unless started from inetd. */ 1603 /* Get a connection, either from inetd or a listening TCP socket */
1254 if (inetd_flag) { 1604 if (inetd_flag) {
1255 int fd; 1605 server_accept_inetd(&sock_in, &sock_out);
1256 1606
1257 startup_pipe = -1;
1258 if (rexeced_flag) {
1259 close(REEXEC_CONFIG_PASS_FD);
1260 sock_in = sock_out = dup(STDIN_FILENO);
1261 if (!debug_flag) {
1262 startup_pipe = dup(REEXEC_STARTUP_PIPE_FD);
1263 close(REEXEC_STARTUP_PIPE_FD);
1264 }
1265 } else {
1266 sock_in = dup(STDIN_FILENO);
1267 sock_out = dup(STDOUT_FILENO);
1268 }
1269 /*
1270 * We intentionally do not close the descriptors 0, 1, and 2
1271 * as our code for setting the descriptors won't work if
1272 * ttyfd happens to be one of those.
1273 */
1274 if ((fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
1275 dup2(fd, STDIN_FILENO);
1276 dup2(fd, STDOUT_FILENO);
1277 if (fd > STDOUT_FILENO)
1278 close(fd);
1279 }
1280 debug("inetd sockets after dupping: %d, %d", sock_in, sock_out);
1281 if ((options.protocol & SSH_PROTO_1) && 1607 if ((options.protocol & SSH_PROTO_1) &&
1282 sensitive_data.server_key == NULL) 1608 sensitive_data.server_key == NULL)
1283 generate_ephemeral_server_key(); 1609 generate_ephemeral_server_key();
1284 } else { 1610 } else {
1285 for (ai = options.listen_addrs; ai; ai = ai->ai_next) { 1611 server_listen();
1286 if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
1287 continue;
1288 if (num_listen_socks >= MAX_LISTEN_SOCKS)
1289 fatal("Too many listen sockets. "
1290 "Enlarge MAX_LISTEN_SOCKS");
1291 if ((ret = getnameinfo(ai->ai_addr, ai->ai_addrlen,
1292 ntop, sizeof(ntop), strport, sizeof(strport),
1293 NI_NUMERICHOST|NI_NUMERICSERV)) != 0) {
1294 error("getnameinfo failed: %.100s",
1295 (ret != EAI_SYSTEM) ? gai_strerror(ret) :
1296 strerror(errno));
1297 continue;
1298 }
1299 /* Create socket for listening. */
1300 listen_sock = socket(ai->ai_family, ai->ai_socktype,
1301 ai->ai_protocol);
1302 if (listen_sock < 0) {
1303 /* kernel may not support ipv6 */
1304 verbose("socket: %.100s", strerror(errno));
1305 continue;
1306 }
1307 if (set_nonblock(listen_sock) == -1) {
1308 close(listen_sock);
1309 continue;
1310 }
1311 /*
1312 * Set socket options.
1313 * Allow local port reuse in TIME_WAIT.
1314 */
1315 if (setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR,
1316 &on, sizeof(on)) == -1)
1317 error("setsockopt SO_REUSEADDR: %s", strerror(errno));
1318
1319 debug("Bind to port %s on %s.", strport, ntop);
1320
1321 /* Bind the socket to the desired port. */
1322 if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) {
1323 if (!ai->ai_next)
1324 error("Bind to port %s on %s failed: %.200s.",
1325 strport, ntop, strerror(errno));
1326 close(listen_sock);
1327 continue;
1328 }
1329 listen_socks[num_listen_socks] = listen_sock;
1330 num_listen_socks++;
1331
1332 /* Start listening on the port. */
1333 logit("Server listening on %s port %s.", ntop, strport);
1334 if (listen(listen_sock, SSH_LISTEN_BACKLOG) < 0)
1335 fatal("listen: %.100s", strerror(errno));
1336
1337 }
1338 freeaddrinfo(options.listen_addrs);
1339
1340 if (!num_listen_socks)
1341 fatal("Cannot bind any address.");
1342 1612
1343 if (options.protocol & SSH_PROTO_1) 1613 if (options.protocol & SSH_PROTO_1)
1344 generate_ephemeral_server_key(); 1614 generate_ephemeral_server_key();
1345 1615
1346 /*
1347 * Arrange to restart on SIGHUP. The handler needs
1348 * listen_sock.
1349 */
1350 signal(SIGHUP, sighup_handler); 1616 signal(SIGHUP, sighup_handler);
1351 1617 signal(SIGCHLD, main_sigchld_handler);
1352 signal(SIGTERM, sigterm_handler); 1618 signal(SIGTERM, sigterm_handler);
1353 signal(SIGQUIT, sigterm_handler); 1619 signal(SIGQUIT, sigterm_handler);
1354 1620
1355 /* Arrange SIGCHLD to be caught. */ 1621 /*
1356 signal(SIGCHLD, main_sigchld_handler); 1622 * Write out the pid file after the sigterm handler
1357 1623 * is setup and the listen sockets are bound
1358 /* Write out the pid file after the sigterm handler is setup */ 1624 */
1359 if (!debug_flag) { 1625 if (!debug_flag) {
1360 /* 1626 FILE *f = fopen(options.pid_file, "w");
1361 * Record our pid in /var/run/sshd.pid to make it 1627
1362 * easier to kill the correct sshd. We don't want to
1363 * do this before the bind above because the bind will
1364 * fail if there already is a daemon, and this will
1365 * overwrite any old pid in the file.
1366 */
1367 f = fopen(options.pid_file, "wb");
1368 if (f == NULL) { 1628 if (f == NULL) {
1369 error("Couldn't create pid file \"%s\": %s", 1629 error("Couldn't create pid file \"%s\": %s",
1370 options.pid_file, strerror(errno)); 1630 options.pid_file, strerror(errno));
@@ -1374,194 +1634,9 @@ main(int ac, char **av)
1374 } 1634 }
1375 } 1635 }
1376 1636
1377 /* setup fd set for listen */ 1637 /* Accept a connection and return in a forked child */
1378 fdset = NULL; 1638 server_accept_loop(&sock_in, &sock_out,
1379 maxfd = 0; 1639 &newsock, config_s);
1380 for (i = 0; i < num_listen_socks; i++)
1381 if (listen_socks[i] > maxfd)
1382 maxfd = listen_socks[i];
1383 /* pipes connected to unauthenticated childs */
1384 startup_pipes = xmalloc(options.max_startups * sizeof(int));
1385 for (i = 0; i < options.max_startups; i++)
1386 startup_pipes[i] = -1;
1387
1388 /*
1389 * Stay listening for connections until the system crashes or
1390 * the daemon is killed with a signal.
1391 */
1392 for (;;) {
1393 if (received_sighup)
1394 sighup_restart();
1395 if (fdset != NULL)
1396 xfree(fdset);
1397 fdsetsz = howmany(maxfd+1, NFDBITS) * sizeof(fd_mask);
1398 fdset = (fd_set *)xmalloc(fdsetsz);
1399 memset(fdset, 0, fdsetsz);
1400
1401 for (i = 0; i < num_listen_socks; i++)
1402 FD_SET(listen_socks[i], fdset);
1403 for (i = 0; i < options.max_startups; i++)
1404 if (startup_pipes[i] != -1)
1405 FD_SET(startup_pipes[i], fdset);
1406
1407 /* Wait in select until there is a connection. */
1408 ret = select(maxfd+1, fdset, NULL, NULL, NULL);
1409 if (ret < 0 && errno != EINTR)
1410 error("select: %.100s", strerror(errno));
1411 if (received_sigterm) {
1412 logit("Received signal %d; terminating.",
1413 (int) received_sigterm);
1414 close_listen_socks();
1415 unlink(options.pid_file);
1416 exit(255);
1417 }
1418 if (key_used && key_do_regen) {
1419 generate_ephemeral_server_key();
1420 key_used = 0;
1421 key_do_regen = 0;
1422 }
1423 if (ret < 0)
1424 continue;
1425
1426 for (i = 0; i < options.max_startups; i++)
1427 if (startup_pipes[i] != -1 &&
1428 FD_ISSET(startup_pipes[i], fdset)) {
1429 /*
1430 * the read end of the pipe is ready
1431 * if the child has closed the pipe
1432 * after successful authentication
1433 * or if the child has died
1434 */
1435 close(startup_pipes[i]);
1436 startup_pipes[i] = -1;
1437 startups--;
1438 }
1439 for (i = 0; i < num_listen_socks; i++) {
1440 if (!FD_ISSET(listen_socks[i], fdset))
1441 continue;
1442 fromlen = sizeof(from);
1443 newsock = accept(listen_socks[i], (struct sockaddr *)&from,
1444 &fromlen);
1445 if (newsock < 0) {
1446 if (errno != EINTR && errno != EWOULDBLOCK)
1447 error("accept: %.100s", strerror(errno));
1448 continue;
1449 }
1450 if (unset_nonblock(newsock) == -1) {
1451 close(newsock);
1452 continue;
1453 }
1454 if (drop_connection(startups) == 1) {
1455 debug("drop connection #%d", startups);
1456 close(newsock);
1457 continue;
1458 }
1459 if (pipe(startup_p) == -1) {
1460 close(newsock);
1461 continue;
1462 }
1463
1464 if (rexec_flag && socketpair(AF_UNIX,
1465 SOCK_STREAM, 0, config_s) == -1) {
1466 error("reexec socketpair: %s",
1467 strerror(errno));
1468 close(newsock);
1469 close(startup_p[0]);
1470 close(startup_p[1]);
1471 continue;
1472 }
1473
1474 for (j = 0; j < options.max_startups; j++)
1475 if (startup_pipes[j] == -1) {
1476 startup_pipes[j] = startup_p[0];
1477 if (maxfd < startup_p[0])
1478 maxfd = startup_p[0];
1479 startups++;
1480 break;
1481 }
1482
1483 /*
1484 * Got connection. Fork a child to handle it, unless
1485 * we are in debugging mode.
1486 */
1487 if (debug_flag) {
1488 /*
1489 * In debugging mode. Close the listening
1490 * socket, and start processing the
1491 * connection without forking.
1492 */
1493 debug("Server will not fork when running in debugging mode.");
1494 close_listen_socks();
1495 sock_in = newsock;
1496 sock_out = newsock;
1497 close(startup_p[0]);
1498 close(startup_p[1]);
1499 startup_pipe = -1;
1500 pid = getpid();
1501 if (rexec_flag) {
1502 send_rexec_state(config_s[0],
1503 &cfg);
1504 close(config_s[0]);
1505 }
1506 break;
1507 } else {
1508 /*
1509 * Normal production daemon. Fork, and have
1510 * the child process the connection. The
1511 * parent continues listening.
1512 */
1513 if ((pid = fork()) == 0) {
1514 /*
1515 * Child. Close the listening and max_startup
1516 * sockets. Start using the accepted socket.
1517 * Reinitialize logging (since our pid has
1518 * changed). We break out of the loop to handle
1519 * the connection.
1520 */
1521 startup_pipe = startup_p[1];
1522 close_startup_pipes();
1523 close_listen_socks();
1524 sock_in = newsock;
1525 sock_out = newsock;
1526 log_init(__progname, options.log_level, options.log_facility, log_stderr);
1527 if (rexec_flag)
1528 close(config_s[0]);
1529 break;
1530 }
1531 }
1532
1533 /* Parent. Stay in the loop. */
1534 if (pid < 0)
1535 error("fork: %.100s", strerror(errno));
1536 else
1537 debug("Forked child %ld.", (long)pid);
1538
1539 close(startup_p[1]);
1540
1541 if (rexec_flag) {
1542 send_rexec_state(config_s[0], &cfg);
1543 close(config_s[0]);
1544 close(config_s[1]);
1545 }
1546
1547 /* Mark that the key has been used (it was "given" to the child). */
1548 if ((options.protocol & SSH_PROTO_1) &&
1549 key_used == 0) {
1550 /* Schedule server key regeneration alarm. */
1551 signal(SIGALRM, key_regeneration_alarm);
1552 alarm(options.key_regeneration_time);
1553 key_used = 1;
1554 }
1555
1556 arc4random_stir();
1557
1558 /* Close the new socket (the child is now taking care of it). */
1559 close(newsock);
1560 }
1561 /* child process check (or debug mode) */
1562 if (num_listen_socks < 0)
1563 break;
1564 }
1565 } 1640 }
1566 1641
1567 /* This is the child processing a new connection. */ 1642 /* This is the child processing a new connection. */
@@ -1656,7 +1731,13 @@ main(int ac, char **av)
1656 * We use get_canonical_hostname with usedns = 0 instead of 1731 * We use get_canonical_hostname with usedns = 0 instead of
1657 * get_remote_ipaddr here so IP options will be checked. 1732 * get_remote_ipaddr here so IP options will be checked.
1658 */ 1733 */
1659 remote_ip = get_canonical_hostname(0); 1734 (void) get_canonical_hostname(0);
1735 /*
1736 * The rest of the code depends on the fact that
1737 * get_remote_ipaddr() caches the remote ip, even if
1738 * the socket goes away.
1739 */
1740 remote_ip = get_remote_ipaddr();
1660 1741
1661#ifdef SSH_AUDIT_EVENTS 1742#ifdef SSH_AUDIT_EVENTS
1662 audit_connection_from(remote_ip, remote_port); 1743 audit_connection_from(remote_ip, remote_port);
@@ -1752,8 +1833,7 @@ main(int ac, char **av)
1752 packet_set_nonblocking(); 1833 packet_set_nonblocking();
1753 1834
1754 /* allocate authentication context */ 1835 /* allocate authentication context */
1755 authctxt = xmalloc(sizeof(*authctxt)); 1836 authctxt = xcalloc(1, sizeof(*authctxt));
1756 memset(authctxt, 0, sizeof(*authctxt));
1757 1837
1758 authctxt->loginmsg = &loginmsg; 1838 authctxt->loginmsg = &loginmsg;
1759 1839
@@ -1792,6 +1872,7 @@ main(int ac, char **av)
1792 */ 1872 */
1793 alarm(0); 1873 alarm(0);
1794 signal(SIGALRM, SIG_DFL); 1874 signal(SIGALRM, SIG_DFL);
1875 authctxt->authenticated = 1;
1795 if (startup_pipe != -1) { 1876 if (startup_pipe != -1) {
1796 close(startup_pipe); 1877 close(startup_pipe);
1797 startup_pipe = -1; 1878 startup_pipe = -1;
@@ -1844,11 +1925,14 @@ ssh1_session_key(BIGNUM *session_key_int)
1844{ 1925{
1845 int rsafail = 0; 1926 int rsafail = 0;
1846 1927
1847 if (BN_cmp(sensitive_data.server_key->rsa->n, sensitive_data.ssh1_host_key->rsa->n) > 0) { 1928 if (BN_cmp(sensitive_data.server_key->rsa->n,
1929 sensitive_data.ssh1_host_key->rsa->n) > 0) {
1848 /* Server key has bigger modulus. */ 1930 /* Server key has bigger modulus. */
1849 if (BN_num_bits(sensitive_data.server_key->rsa->n) < 1931 if (BN_num_bits(sensitive_data.server_key->rsa->n) <
1850 BN_num_bits(sensitive_data.ssh1_host_key->rsa->n) + SSH_KEY_BITS_RESERVED) { 1932 BN_num_bits(sensitive_data.ssh1_host_key->rsa->n) +
1851 fatal("do_connection: %s: server_key %d < host_key %d + SSH_KEY_BITS_RESERVED %d", 1933 SSH_KEY_BITS_RESERVED) {
1934 fatal("do_connection: %s: "
1935 "server_key %d < host_key %d + SSH_KEY_BITS_RESERVED %d",
1852 get_remote_ipaddr(), 1936 get_remote_ipaddr(),
1853 BN_num_bits(sensitive_data.server_key->rsa->n), 1937 BN_num_bits(sensitive_data.server_key->rsa->n),
1854 BN_num_bits(sensitive_data.ssh1_host_key->rsa->n), 1938 BN_num_bits(sensitive_data.ssh1_host_key->rsa->n),
@@ -1863,8 +1947,10 @@ ssh1_session_key(BIGNUM *session_key_int)
1863 } else { 1947 } else {
1864 /* Host key has bigger modulus (or they are equal). */ 1948 /* Host key has bigger modulus (or they are equal). */
1865 if (BN_num_bits(sensitive_data.ssh1_host_key->rsa->n) < 1949 if (BN_num_bits(sensitive_data.ssh1_host_key->rsa->n) <
1866 BN_num_bits(sensitive_data.server_key->rsa->n) + SSH_KEY_BITS_RESERVED) { 1950 BN_num_bits(sensitive_data.server_key->rsa->n) +
1867 fatal("do_connection: %s: host_key %d < server_key %d + SSH_KEY_BITS_RESERVED %d", 1951 SSH_KEY_BITS_RESERVED) {
1952 fatal("do_connection: %s: "
1953 "host_key %d < server_key %d + SSH_KEY_BITS_RESERVED %d",
1868 get_remote_ipaddr(), 1954 get_remote_ipaddr(),
1869 BN_num_bits(sensitive_data.ssh1_host_key->rsa->n), 1955 BN_num_bits(sensitive_data.ssh1_host_key->rsa->n),
1870 BN_num_bits(sensitive_data.server_key->rsa->n), 1956 BN_num_bits(sensitive_data.server_key->rsa->n),
@@ -1989,10 +2075,10 @@ do_ssh1_kex(void)
1989 * key is in the highest bits. 2075 * key is in the highest bits.
1990 */ 2076 */
1991 if (!rsafail) { 2077 if (!rsafail) {
1992 BN_mask_bits(session_key_int, sizeof(session_key) * 8); 2078 (void) BN_mask_bits(session_key_int, sizeof(session_key) * 8);
1993 len = BN_num_bytes(session_key_int); 2079 len = BN_num_bytes(session_key_int);
1994 if (len < 0 || (u_int)len > sizeof(session_key)) { 2080 if (len < 0 || (u_int)len > sizeof(session_key)) {
1995 error("do_connection: bad session key len from %s: " 2081 error("do_ssh1_kex: bad session key len from %s: "
1996 "session_key_int %d > sizeof(session_key) %lu", 2082 "session_key_int %d > sizeof(session_key) %lu",
1997 get_remote_ipaddr(), len, (u_long)sizeof(session_key)); 2083 get_remote_ipaddr(), len, (u_long)sizeof(session_key));
1998 rsafail++; 2084 rsafail++;
@@ -2085,11 +2171,9 @@ do_ssh2_kex(void)
2085 myproposal[PROPOSAL_COMP_ALGS_CTOS] = 2171 myproposal[PROPOSAL_COMP_ALGS_CTOS] =
2086 myproposal[PROPOSAL_COMP_ALGS_STOC] = "none,zlib@openssh.com"; 2172 myproposal[PROPOSAL_COMP_ALGS_STOC] = "none,zlib@openssh.com";
2087 } 2173 }
2088 2174
2089 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = list_hostkey_types(); 2175 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = list_hostkey_types();
2090 2176
2091 /* start key exchange */
2092
2093#ifdef GSSAPI 2177#ifdef GSSAPI
2094 { 2178 {
2095 char *orig; 2179 char *orig;
@@ -2098,8 +2182,8 @@ do_ssh2_kex(void)
2098 orig = myproposal[PROPOSAL_KEX_ALGS]; 2182 orig = myproposal[PROPOSAL_KEX_ALGS];
2099 2183
2100 /* 2184 /*
2101 * If we don't have a host key, then there's no point advertising 2185 * If we don't have a host key, then there's no point advertising
2102 * the other key exchange algorithms 2186 * the other key exchange algorithms
2103 */ 2187 */
2104 2188
2105 if (strlen(myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS]) == 0) 2189 if (strlen(myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS]) == 0)
@@ -2110,15 +2194,13 @@ do_ssh2_kex(void)
2110 else 2194 else
2111 gss = NULL; 2195 gss = NULL;
2112 2196
2113 if (gss && orig) { 2197 if (gss && orig)
2114 int len = strlen(orig) + strlen(gss) + 2; 2198 xasprintf(&newstr, "%s,%s", gss, orig);
2115 newstr = xmalloc(len); 2199 else if (gss)
2116 snprintf(newstr, len, "%s,%s", gss, orig);
2117 } else if (gss) {
2118 newstr = gss; 2200 newstr = gss;
2119 } else if (orig) { 2201 else if (orig)
2120 newstr = orig; 2202 newstr = orig;
2121 } 2203
2122 /* 2204 /*
2123 * If we've got GSSAPI mechanisms, then we've got the 'null' host 2205 * If we've got GSSAPI mechanisms, then we've got the 'null' host
2124 * key alg, but we can't tell people about it unless its the only 2206 * key alg, but we can't tell people about it unless its the only
@@ -2134,18 +2216,20 @@ do_ssh2_kex(void)
2134 } 2216 }
2135#endif 2217#endif
2136 2218
2137 /* start key exchange */ 2219 /* start key exchange */
2138 kex = kex_setup(myproposal); 2220 kex = kex_setup(myproposal);
2139 kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server; 2221 kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server;
2140 kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server; 2222 kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server;
2141 kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; 2223 kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
2224 kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
2142#ifdef GSSAPI 2225#ifdef GSSAPI
2143 kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_server; 2226 kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_server;
2227 kex->kex[KEX_GSS_GRP14_SHA1] = kexgss_server;
2144 kex->kex[KEX_GSS_GEX_SHA1] = kexgss_server; 2228 kex->kex[KEX_GSS_GEX_SHA1] = kexgss_server;
2145#endif 2229#endif
2146 kex->server = 1; 2230 kex->server = 1;
2147 kex->client_version_string=client_version_string; 2231 kex->client_version_string=client_version_string;
2148 kex->server_version_string=server_version_string; 2232 kex->server_version_string=server_version_string;
2149 kex->load_host_key=&get_hostkey_by_type; 2233 kex->load_host_key=&get_hostkey_by_type;
2150 kex->host_key_index=&get_hostkey_index; 2234 kex->host_key_index=&get_hostkey_index;
2151 2235
diff --git a/sshd_config b/sshd_config
index 4957dd1a6..68c8752c0 100644
--- a/sshd_config
+++ b/sshd_config
@@ -1,4 +1,4 @@
1# $OpenBSD: sshd_config,v 1.73 2005/12/06 22:38:28 reyk Exp $ 1# $OpenBSD: sshd_config,v 1.74 2006/07/19 13:07:10 dtucker 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.
@@ -68,15 +68,18 @@
68# GSSAPI options 68# GSSAPI options
69#GSSAPIAuthentication no 69#GSSAPIAuthentication no
70#GSSAPICleanupCredentials yes 70#GSSAPICleanupCredentials yes
71#GSSAPIStrictAcceptorCheck yes
72#GSSAPIKeyExchange no
71 73
72# Set this to 'yes' to enable PAM authentication, account processing, 74# Set this to 'yes' to enable PAM authentication, account processing,
73# and session processing. If this is enabled, PAM authentication will 75# and session processing. If this is enabled, PAM authentication will
74# be allowed through the ChallengeResponseAuthentication mechanism. 76# be allowed through the ChallengeResponseAuthentication and
75# Depending on your PAM configuration, this may bypass the setting of 77# PasswordAuthentication. Depending on your PAM configuration,
76# PasswordAuthentication, PermitEmptyPasswords, and 78# PAM authentication via ChallengeResponseAuthentication may bypass
77# "PermitRootLogin without-password". If you just want the PAM account and 79# the setting of "PermitRootLogin without-password".
78# session checks to run without PAM authentication, then enable this but set 80# If you just want the PAM account and session checks to run without
79# ChallengeResponseAuthentication=no 81# PAM authentication, then enable this but set PasswordAuthentication
82# and ChallengeResponseAuthentication to 'no'.
80#UsePAM no 83#UsePAM no
81 84
82#AllowTcpForwarding yes 85#AllowTcpForwarding yes
@@ -103,3 +106,9 @@
103 106
104# override default of no subsystems 107# override default of no subsystems
105Subsystem sftp /usr/libexec/sftp-server 108Subsystem sftp /usr/libexec/sftp-server
109
110# Example of overriding settings on a per-user basis
111#Match User anoncvs
112# X11Forwarding no
113# AllowTcpForwarding no
114# ForceCommand cvs server
diff --git a/sshd_config.0 b/sshd_config.0
index d2c5454e1..c9a09a4ff 100644
--- a/sshd_config.0
+++ b/sshd_config.0
@@ -7,10 +7,11 @@ SYNOPSIS
7 /etc/ssh/sshd_config 7 /etc/ssh/sshd_config
8 8
9DESCRIPTION 9DESCRIPTION
10 sshd reads configuration data from /etc/ssh/sshd_config (or the file 10 sshd(8) reads configuration data from /etc/ssh/sshd_config (or the file
11 specified with -f on the command line). The file contains keyword-argu- 11 specified with -f on the command line). The file contains keyword-argu-
12 ment pairs, one per line. Lines starting with `#' and empty lines are 12 ment pairs, one per line. Lines starting with `#' and empty lines are
13 interpreted as comments. 13 interpreted as comments. Arguments may optionally be enclosed in double
14 quotes (") in order to represent arguments containing spaces.
14 15
15 The possible keywords and their meanings are as follows (note that key- 16 The possible keywords and their meanings are as follows (note that key-
16 words are case-insensitive and arguments are case-sensitive): 17 words are case-insensitive and arguments are case-sensitive):
@@ -29,17 +30,21 @@ DESCRIPTION
29 any environment variables. 30 any environment variables.
30 31
31 AddressFamily 32 AddressFamily
32 Specifies which address family should be used by sshd. Valid ar- 33 Specifies which address family should be used by sshd(8). Valid
33 guments are ``any'', ``inet'' (use IPv4 only) or ``inet6'' (use 34 arguments are ``any'', ``inet'' (use IPv4 only), or ``inet6''
34 IPv6 only). The default is ``any''. 35 (use IPv6 only). The default is ``any''.
35 36
36 AllowGroups 37 AllowGroups
37 This keyword can be followed by a list of group name patterns, 38 This keyword can be followed by a list of group name patterns,
38 separated by spaces. If specified, login is allowed only for 39 separated by spaces. If specified, login is allowed only for
39 users whose primary group or supplementary group list matches one 40 users whose primary group or supplementary group list matches one
40 of the patterns. `*' and `?' can be used as wildcards in the 41 of the patterns. Only group names are valid; a numerical group
41 patterns. Only group names are valid; a numerical group ID is 42 ID is not recognized. By default, login is allowed for all
42 not recognized. By default, login is allowed for all groups. 43 groups. The allow/deny directives are processed in the following
44 order: DenyUsers, AllowUsers, DenyGroups, and finally
45 AllowGroups.
46
47 See PATTERNS in ssh_config(5) for more information on patterns.
43 48
44 AllowTcpForwarding 49 AllowTcpForwarding
45 Specifies whether TCP forwarding is permitted. The default is 50 Specifies whether TCP forwarding is permitted. The default is
@@ -50,23 +55,26 @@ DESCRIPTION
50 AllowUsers 55 AllowUsers
51 This keyword can be followed by a list of user name patterns, 56 This keyword can be followed by a list of user name patterns,
52 separated by spaces. If specified, login is allowed only for us- 57 separated by spaces. If specified, login is allowed only for us-
53 er names that match one of the patterns. `*' and `?' can be used 58 er names that match one of the patterns. Only user names are
54 as wildcards in the patterns. Only user names are valid; a nu- 59 valid; a numerical user ID is not recognized. By default, login
55 merical user ID is not recognized. By default, login is allowed 60 is allowed for all users. If the pattern takes the form US-
56 for all users. If the pattern takes the form USER@HOST then USER 61 ER@HOST then USER and HOST are separately checked, restricting
57 and HOST are separately checked, restricting logins to particular 62 logins to particular users from particular hosts. The allow/deny
58 users from particular hosts. 63 directives are processed in the following order: DenyUsers,
64 AllowUsers, DenyGroups, and finally AllowGroups.
65
66 See PATTERNS in ssh_config(5) for more information on patterns.
59 67
60 AuthorizedKeysFile 68 AuthorizedKeysFile
61 Specifies the file that contains the public keys that can be used 69 Specifies the file that contains the public keys that can be used
62 for user authentication. AuthorizedKeysFile may contain tokens 70 for user authentication. AuthorizedKeysFile may contain tokens
63 of the form %T which are substituted during connection set-up. 71 of the form %T which are substituted during connection setup.
64 The following tokens are defined: %% is replaced by a literal 72 The following tokens are defined: %% is replaced by a literal
65 '%', %h is replaced by the home directory of the user being au- 73 '%', %h is replaced by the home directory of the user being au-
66 thenticated and %u is replaced by the username of that user. Af- 74 thenticated, and %u is replaced by the username of that user.
67 ter expansion, AuthorizedKeysFile is taken to be an absolute path 75 After expansion, AuthorizedKeysFile is taken to be an absolute
68 or one relative to the user's home directory. The default is 76 path or one relative to the user's home directory. The default
69 ``.ssh/authorized_keys''. 77 is ``.ssh/authorized_keys''.
70 78
71 Banner In some jurisdictions, sending a warning message before authenti- 79 Banner In some jurisdictions, sending a warning message before authenti-
72 cation may be relevant for getting legal protection. The con- 80 cation may be relevant for getting legal protection. The con-
@@ -75,7 +83,7 @@ DESCRIPTION
75 protocol version 2. By default, no banner is displayed. 83 protocol version 2. By default, no banner is displayed.
76 84
77 ChallengeResponseAuthentication 85 ChallengeResponseAuthentication
78 Specifies whether challenge response authentication is allowed. 86 Specifies whether challenge-response authentication is allowed.
79 All authentication styles from login.conf(5) are supported. The 87 All authentication styles from login.conf(5) are supported. The
80 default is ``yes''. 88 default is ``yes''.
81 89
@@ -85,15 +93,15 @@ DESCRIPTION
85 ``3des-cbc'', ``aes128-cbc'', ``aes192-cbc'', ``aes256-cbc'', 93 ``3des-cbc'', ``aes128-cbc'', ``aes192-cbc'', ``aes256-cbc'',
86 ``aes128-ctr'', ``aes192-ctr'', ``aes256-ctr'', ``arcfour128'', 94 ``aes128-ctr'', ``aes192-ctr'', ``aes256-ctr'', ``arcfour128'',
87 ``arcfour256'', ``arcfour'', ``blowfish-cbc'', and 95 ``arcfour256'', ``arcfour'', ``blowfish-cbc'', and
88 ``cast128-cbc''. The default is 96 ``cast128-cbc''. The default is:
89 97
90 ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128, 98 aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,
91 arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr, 99 arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr,
92 aes192-ctr,aes256-ctr'' 100 aes192-ctr,aes256-ctr
93 101
94 ClientAliveCountMax 102 ClientAliveCountMax
95 Sets the number of client alive messages (see below) which may be 103 Sets the number of client alive messages (see below) which may be
96 sent without sshd receiving any messages back from the client. 104 sent without sshd(8) receiving any messages back from the client.
97 If this threshold is reached while client alive messages are be- 105 If this threshold is reached while client alive messages are be-
98 ing sent, sshd will disconnect the client, terminating the ses- 106 ing sent, sshd will disconnect the client, terminating the ses-
99 sion. It is important to note that the use of client alive mes- 107 sion. It is important to note that the use of client alive mes-
@@ -106,15 +114,16 @@ DESCRIPTION
106 114
107 The default value is 3. If ClientAliveInterval (see below) is 115 The default value is 3. If ClientAliveInterval (see below) is
108 set to 15, and ClientAliveCountMax is left at the default, unre- 116 set to 15, and ClientAliveCountMax is left at the default, unre-
109 sponsive ssh clients will be disconnected after approximately 45 117 sponsive SSH clients will be disconnected after approximately 45
110 seconds. 118 seconds. This option applies to protocol version 2 only.
111 119
112 ClientAliveInterval 120 ClientAliveInterval
113 Sets a timeout interval in seconds after which if no data has 121 Sets a timeout interval in seconds after which if no data has
114 been received from the client, sshd will send a message through 122 been received from the client, sshd(8) will send a message
115 the encrypted channel to request a response from the client. The 123 through the encrypted channel to request a response from the
116 default is 0, indicating that these messages will not be sent to 124 client. The default is 0, indicating that these messages will
117 the client. This option applies to protocol version 2 only. 125 not be sent to the client. This option applies to protocol ver-
126 sion 2 only.
118 127
119 Compression 128 Compression
120 Specifies whether compression is allowed, or delayed until the 129 Specifies whether compression is allowed, or delayed until the
@@ -125,23 +134,38 @@ DESCRIPTION
125 This keyword can be followed by a list of group name patterns, 134 This keyword can be followed by a list of group name patterns,
126 separated by spaces. Login is disallowed for users whose primary 135 separated by spaces. Login is disallowed for users whose primary
127 group or supplementary group list matches one of the patterns. 136 group or supplementary group list matches one of the patterns.
128 `*' and `?' can be used as wildcards in the patterns. Only group 137 Only group names are valid; a numerical group ID is not recog-
129 names are valid; a numerical group ID is not recognized. By de- 138 nized. By default, login is allowed for all groups. The al-
130 fault, login is allowed for all groups. 139 low/deny directives are processed in the following order:
140 DenyUsers, AllowUsers, DenyGroups, and finally AllowGroups.
141
142 See PATTERNS in ssh_config(5) for more information on patterns.
131 143
132 DenyUsers 144 DenyUsers
133 This keyword can be followed by a list of user name patterns, 145 This keyword can be followed by a list of user name patterns,
134 separated by spaces. Login is disallowed for user names that 146 separated by spaces. Login is disallowed for user names that
135 match one of the patterns. `*' and `?' can be used as wildcards 147 match one of the patterns. Only user names are valid; a numeri-
136 in the patterns. Only user names are valid; a numerical user ID 148 cal user ID is not recognized. By default, login is allowed for
137 is not recognized. By default, login is allowed for all users. 149 all users. If the pattern takes the form USER@HOST then USER and
138 If the pattern takes the form USER@HOST then USER and HOST are 150 HOST are separately checked, restricting logins to particular
139 separately checked, restricting logins to particular users from 151 users from particular hosts. The allow/deny directives are pro-
140 particular hosts. 152 cessed in the following order: DenyUsers, AllowUsers, DenyGroups,
153 and finally AllowGroups.
154
155 See PATTERNS in ssh_config(5) for more information on patterns.
156
157 ForceCommand
158 Forces the execution of the command specified by ForceCommand,
159 ignoring any command supplied by the client. The command is in-
160 voked by using the user's login shell with the -c option. This
161 applies to shell, command, or subsystem execution. It is most
162 useful inside a Match block. The command originally supplied by
163 the client is available in the SSH_ORIGINAL_COMMAND environment
164 variable.
141 165
142 GatewayPorts 166 GatewayPorts
143 Specifies whether remote hosts are allowed to connect to ports 167 Specifies whether remote hosts are allowed to connect to ports
144 forwarded for the client. By default, sshd binds remote port 168 forwarded for the client. By default, sshd(8) binds remote port
145 forwardings to the loopback address. This prevents other remote 169 forwardings to the loopback address. This prevents other remote
146 hosts from connecting to forwarded ports. GatewayPorts can be 170 hosts from connecting to forwarded ports. GatewayPorts can be
147 used to specify that sshd should allow remote port forwardings to 171 used to specify that sshd should allow remote port forwardings to
@@ -165,18 +189,27 @@ DESCRIPTION
165 HostbasedAuthentication 189 HostbasedAuthentication
166 Specifies whether rhosts or /etc/hosts.equiv authentication to- 190 Specifies whether rhosts or /etc/hosts.equiv authentication to-
167 gether with successful public key client host authentication is 191 gether with successful public key client host authentication is
168 allowed (hostbased authentication). This option is similar to 192 allowed (host-based authentication). This option is similar to
169 RhostsRSAAuthentication and applies to protocol version 2 only. 193 RhostsRSAAuthentication and applies to protocol version 2 only.
170 The default is ``no''. 194 The default is ``no''.
171 195
196 HostbasedUsesNameFromPacketOnly
197 Specifies whether or not the server will attempt to perform a re-
198 verse name lookup when matching the name in the ~/.shosts,
199 ~/.rhosts, and /etc/hosts.equiv files during
200 HostbasedAuthentication. A setting of ``yes'' means that sshd(8)
201 uses the name supplied by the client rather than attempting to
202 resolve the name from the TCP connection itself. The default is
203 ``no''.
204
172 HostKey 205 HostKey
173 Specifies a file containing a private host key used by SSH. The 206 Specifies a file containing a private host key used by SSH. The
174 default is /etc/ssh/ssh_host_key for protocol version 1, and 207 default is /etc/ssh/ssh_host_key for protocol version 1, and
175 /etc/ssh/ssh_host_rsa_key and /etc/ssh/ssh_host_dsa_key for pro- 208 /etc/ssh/ssh_host_rsa_key and /etc/ssh/ssh_host_dsa_key for pro-
176 tocol version 2. Note that sshd will refuse to use a file if it 209 tocol version 2. Note that sshd(8) will refuse to use a file if
177 is group/world-accessible. It is possible to have multiple host 210 it is group/world-accessible. It is possible to have multiple
178 key files. ``rsa1'' keys are used for version 1 and ``dsa'' or 211 host key files. ``rsa1'' keys are used for version 1 and ``dsa''
179 ``rsa'' are used for version 2 of the SSH protocol. 212 or ``rsa'' are used for version 2 of the SSH protocol.
180 213
181 IgnoreRhosts 214 IgnoreRhosts
182 Specifies that .rhosts and .shosts files will not be used in 215 Specifies that .rhosts and .shosts files will not be used in
@@ -186,7 +219,7 @@ DESCRIPTION
186 fault is ``yes''. 219 fault is ``yes''.
187 220
188 IgnoreUserKnownHosts 221 IgnoreUserKnownHosts
189 Specifies whether sshd should ignore the user's 222 Specifies whether sshd(8) should ignore the user's
190 ~/.ssh/known_hosts during RhostsRSAAuthentication or 223 ~/.ssh/known_hosts during RhostsRSAAuthentication or
191 HostbasedAuthentication. The default is ``no''. 224 HostbasedAuthentication. The default is ``no''.
192 225
@@ -194,22 +227,22 @@ DESCRIPTION
194 Specifies whether the password provided by the user for 227 Specifies whether the password provided by the user for
195 PasswordAuthentication will be validated through the Kerberos 228 PasswordAuthentication will be validated through the Kerberos
196 KDC. To use this option, the server needs a Kerberos servtab 229 KDC. To use this option, the server needs a Kerberos servtab
197 which allows the verification of the KDC's identity. Default is 230 which allows the verification of the KDC's identity. The default
198 ``no''. 231 is ``no''.
199 232
200 KerberosGetAFSToken 233 KerberosGetAFSToken
201 If AFS is active and the user has a Kerberos 5 TGT, attempt to 234 If AFS is active and the user has a Kerberos 5 TGT, attempt to
202 acquire an AFS token before accessing the user's home directory. 235 acquire an AFS token before accessing the user's home directory.
203 Default is ``no''. 236 The default is ``no''.
204 237
205 KerberosOrLocalPasswd 238 KerberosOrLocalPasswd
206 If set then if password authentication through Kerberos fails 239 If password authentication through Kerberos fails then the pass-
207 then the password will be validated via any additional local 240 word will be validated via any additional local mechanism such as
208 mechanism such as /etc/passwd. Default is ``yes''. 241 /etc/passwd. The default is ``yes''.
209 242
210 KerberosTicketCleanup 243 KerberosTicketCleanup
211 Specifies whether to automatically destroy the user's ticket 244 Specifies whether to automatically destroy the user's ticket
212 cache file on logout. Default is ``yes''. 245 cache file on logout. The default is ``yes''.
213 246
214 KeyRegenerationInterval 247 KeyRegenerationInterval
215 In protocol version 1, the ephemeral server key is automatically 248 In protocol version 1, the ephemeral server key is automatically
@@ -220,8 +253,8 @@ DESCRIPTION
220 never regenerated. The default is 3600 (seconds). 253 never regenerated. The default is 3600 (seconds).
221 254
222 ListenAddress 255 ListenAddress
223 Specifies the local addresses sshd should listen on. The follow- 256 Specifies the local addresses sshd(8) should listen on. The fol-
224 ing forms may be used: 257 lowing forms may be used:
225 258
226 ListenAddress host|IPv4_addr|IPv6_addr 259 ListenAddress host|IPv4_addr|IPv6_addr
227 ListenAddress host|IPv4_addr:port 260 ListenAddress host|IPv4_addr:port
@@ -230,7 +263,7 @@ DESCRIPTION
230 If port is not specified, sshd will listen on the address and all 263 If port is not specified, sshd will listen on the address and all
231 prior Port options specified. The default is to listen on all 264 prior Port options specified. The default is to listen on all
232 local addresses. Multiple ListenAddress options are permitted. 265 local addresses. Multiple ListenAddress options are permitted.
233 Additionally, any Port options must precede this option for non 266 Additionally, any Port options must precede this option for non-
234 port qualified addresses. 267 port qualified addresses.
235 268
236 LoginGraceTime 269 LoginGraceTime
@@ -240,8 +273,8 @@ DESCRIPTION
240 273
241 LogLevel 274 LogLevel
242 Gives the verbosity level that is used when logging messages from 275 Gives the verbosity level that is used when logging messages from
243 sshd. The possible values are: QUIET, FATAL, ERROR, INFO, VER- 276 sshd(8). The possible values are: QUIET, FATAL, ERROR, INFO,
244 BOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3. The default is INFO. 277 VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. The default is INFO.
245 DEBUG and DEBUG1 are equivalent. DEBUG2 and DEBUG3 each specify 278 DEBUG and DEBUG1 are equivalent. DEBUG2 and DEBUG3 each specify
246 higher levels of debugging output. Logging with a DEBUG level 279 higher levels of debugging output. Logging with a DEBUG level
247 violates the privacy of users and is not recommended. 280 violates the privacy of users and is not recommended.
@@ -249,9 +282,23 @@ DESCRIPTION
249 MACs Specifies the available MAC (message authentication code) algo- 282 MACs Specifies the available MAC (message authentication code) algo-
250 rithms. The MAC algorithm is used in protocol version 2 for data 283 rithms. The MAC algorithm is used in protocol version 2 for data
251 integrity protection. Multiple algorithms must be comma-separat- 284 integrity protection. Multiple algorithms must be comma-separat-
252 ed. The default is ``hmac-md5,hmac-sha1,hmac-ripemd160,hmac- 285 ed. The default is: ``hmac-md5,hmac-sha1,hmac-ripemd160,hmac-
253 sha1-96,hmac-md5-96''. 286 sha1-96,hmac-md5-96''.
254 287
288 Match Introduces a conditional block. If all of the criteria on the
289 Match line are satisfied, the keywords on the following lines
290 override those set in the global section of the config file, un-
291 til either another Match line or the end of the file. The argu-
292 ments to Match are one or more criteria-pattern pairs. The
293 available criteria are User, Group, Host, and Address. Only a
294 subset of keywords may be used on the lines following a Match
295 keyword. Available keywords are AllowTcpForwarding, Banner,
296 ForceCommand, GatewayPorts, GSSApiAuthentication,
297 KbdInteractiveAuthentication, KerberosAuthentication,
298 PasswordAuthentication, PermitOpen, RhostsRSAAuthentication,
299 RSAAuthentication, X11DisplayOffset, X11Forwarding, and
300 X11UseLocalHost.
301
255 MaxAuthTries 302 MaxAuthTries
256 Specifies the maximum number of authentication attempts permitted 303 Specifies the maximum number of authentication attempts permitted
257 per connection. Once the number of failures reaches half this 304 per connection. Once the number of failures reaches half this
@@ -259,17 +306,17 @@ DESCRIPTION
259 306
260 MaxStartups 307 MaxStartups
261 Specifies the maximum number of concurrent unauthenticated con- 308 Specifies the maximum number of concurrent unauthenticated con-
262 nections to the sshd daemon. Additional connections will be 309 nections to the SSH daemon. Additional connections will be
263 dropped until authentication succeeds or the LoginGraceTime ex- 310 dropped until authentication succeeds or the LoginGraceTime ex-
264 pires for a connection. The default is 10. 311 pires for a connection. The default is 10.
265 312
266 Alternatively, random early drop can be enabled by specifying the 313 Alternatively, random early drop can be enabled by specifying the
267 three colon separated values ``start:rate:full'' (e.g., 314 three colon separated values ``start:rate:full'' (e.g.
268 "10:30:60"). sshd will refuse connection attempts with a proba- 315 "10:30:60"). sshd(8) will refuse connection attempts with a
269 bility of ``rate/100'' (30%) if there are currently ``start'' 316 probability of ``rate/100'' (30%) if there are currently
270 (10) unauthenticated connections. The probability increases lin- 317 ``start'' (10) unauthenticated connections. The probability in-
271 early and all connection attempts are refused if the number of 318 creases linearly and all connection attempts are refused if the
272 unauthenticated connections reaches ``full'' (60). 319 number of unauthenticated connections reaches ``full'' (60).
273 320
274 PasswordAuthentication 321 PasswordAuthentication
275 Specifies whether password authentication is allowed. The de- 322 Specifies whether password authentication is allowed. The de-
@@ -280,59 +327,74 @@ DESCRIPTION
280 server allows login to accounts with empty password strings. The 327 server allows login to accounts with empty password strings. The
281 default is ``no''. 328 default is ``no''.
282 329
330 PermitOpen
331 Specifies the destinations to which TCP port forwarding is per-
332 mitted. The forwarding specification must be one of the follow-
333 ing forms:
334
335 PermitOpen host:port
336 PermitOpen IPv4_addr:port
337 PermitOpen [IPv6_addr]:port
338
339 Multiple forwards may be specified by separating them with
340 whitespace. An argument of ``any'' can be used to remove all re-
341 strictions and permit any forwarding requests. By default all
342 port forwarding requests are permitted.
343
283 PermitRootLogin 344 PermitRootLogin
284 Specifies whether root can log in using ssh(1). The argument 345 Specifies whether root can log in using ssh(1). The argument
285 must be ``yes'', ``without-password'', ``forced-commands-only'' 346 must be ``yes'', ``without-password'', ``forced-commands-only'',
286 or ``no''. The default is ``yes''. 347 or ``no''. The default is ``yes''.
287 348
288 If this option is set to ``without-password'' password authenti- 349 If this option is set to ``without-password'', password authenti-
289 cation is disabled for root. 350 cation is disabled for root.
290 351
291 If this option is set to ``forced-commands-only'' root login with 352 If this option is set to ``forced-commands-only'', root login
292 public key authentication will be allowed, but only if the 353 with public key authentication will be allowed, but only if the
293 command option has been specified (which may be useful for taking 354 command option has been specified (which may be useful for taking
294 remote backups even if root login is normally not allowed). All 355 remote backups even if root login is normally not allowed). All
295 other authentication methods are disabled for root. 356 other authentication methods are disabled for root.
296 357
297 If this option is set to ``no'' root is not allowed to log in. 358 If this option is set to ``no'', root is not allowed to log in.
298 359
299 PermitTunnel 360 PermitTunnel
300 Specifies whether tun(4) device forwarding is allowed. The argu- 361 Specifies whether tun(4) device forwarding is allowed. The argu-
301 ment must be ``yes'', ``point-to-point'', ``ethernet'' or ``no''. 362 ment must be ``yes'', ``point-to-point'' (layer 3), ``ethernet''
302 The default is ``no''. 363 (layer 2), or ``no''. Specifying ``yes'' permits both ``point-
364 to-point'' and ``ethernet''. The default is ``no''.
303 365
304 PermitUserEnvironment 366 PermitUserEnvironment
305 Specifies whether ~/.ssh/environment and environment= options in 367 Specifies whether ~/.ssh/environment and environment= options in
306 ~/.ssh/authorized_keys are processed by sshd. The default is 368 ~/.ssh/authorized_keys are processed by sshd(8). The default is
307 ``no''. Enabling environment processing may enable users to by- 369 ``no''. Enabling environment processing may enable users to by-
308 pass access restrictions in some configurations using mechanisms 370 pass access restrictions in some configurations using mechanisms
309 such as LD_PRELOAD. 371 such as LD_PRELOAD.
310 372
311 PidFile 373 PidFile
312 Specifies the file that contains the process ID of the sshd dae- 374 Specifies the file that contains the process ID of the SSH dae-
313 mon. The default is /var/run/sshd.pid. 375 mon. The default is /var/run/sshd.pid.
314 376
315 Port Specifies the port number that sshd listens on. The default is 377 Port Specifies the port number that sshd(8) listens on. The default
316 22. Multiple options of this type are permitted. See also 378 is 22. Multiple options of this type are permitted. See also
317 ListenAddress. 379 ListenAddress.
318 380
319 PrintLastLog 381 PrintLastLog
320 Specifies whether sshd should print the date and time of the last 382 Specifies whether sshd(8) should print the date and time of the
321 user login when a user logs in interactively. The default is 383 last user login when a user logs in interactively. The default
322 ``yes''. 384 is ``yes''.
323 385
324 PrintMotd 386 PrintMotd
325 Specifies whether sshd should print /etc/motd when a user logs in 387 Specifies whether sshd(8) should print /etc/motd when a user logs
326 interactively. (On some systems it is also printed by the shell, 388 in interactively. (On some systems it is also printed by the
327 /etc/profile, or equivalent.) The default is ``yes''. 389 shell, /etc/profile, or equivalent.) The default is ``yes''.
328 390
329 Protocol 391 Protocol
330 Specifies the protocol versions sshd supports. The possible val- 392 Specifies the protocol versions sshd(8) supports. The possible
331 ues are ``1'' and ``2''. Multiple versions must be comma-sepa- 393 values are `1' and `2'. Multiple versions must be comma-separat-
332 rated. The default is ``2,1''. Note that the order of the pro- 394 ed. The default is ``2,1''. Note that the order of the protocol
333 tocol list does not indicate preference, because the client se- 395 list does not indicate preference, because the client selects
334 lects among multiple protocol versions offered by the server. 396 among multiple protocol versions offered by the server. Specify-
335 Specifying ``2,1'' is identical to ``1,2''. 397 ing ``2,1'' is identical to ``1,2''.
336 398
337 PubkeyAuthentication 399 PubkeyAuthentication
338 Specifies whether public key authentication is allowed. The de- 400 Specifies whether public key authentication is allowed. The de-
@@ -355,24 +417,24 @@ DESCRIPTION
355 server key. The minimum value is 512, and the default is 768. 417 server key. The minimum value is 512, and the default is 768.
356 418
357 StrictModes 419 StrictModes
358 Specifies whether sshd should check file modes and ownership of 420 Specifies whether sshd(8) should check file modes and ownership
359 the user's files and home directory before accepting login. This 421 of the user's files and home directory before accepting login.
360 is normally desirable because novices sometimes accidentally 422 This is normally desirable because novices sometimes accidentally
361 leave their directory or files world-writable. The default is 423 leave their directory or files world-writable. The default is
362 ``yes''. 424 ``yes''.
363 425
364 Subsystem 426 Subsystem
365 Configures an external subsystem (e.g., file transfer daemon). 427 Configures an external subsystem (e.g. file transfer daemon).
366 Arguments should be a subsystem name and a command to execute up- 428 Arguments should be a subsystem name and a command (with optional
367 on subsystem request. The command sftp-server(8) implements the 429 arguments) to execute upon subsystem request. The command
368 ``sftp'' file transfer subsystem. By default no subsystems are 430 sftp-server(8) implements the ``sftp'' file transfer subsystem.
369 defined. Note that this option applies to protocol version 2 on- 431 By default no subsystems are defined. Note that this option ap-
370 ly. 432 plies to protocol version 2 only.
371 433
372 SyslogFacility 434 SyslogFacility
373 Gives the facility code that is used when logging messages from 435 Gives the facility code that is used when logging messages from
374 sshd. The possible values are: DAEMON, USER, AUTH, LOCAL0, LO- 436 sshd(8). The possible values are: DAEMON, USER, AUTH, LOCAL0,
375 CAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. The de- 437 LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. The de-
376 fault is AUTH. 438 fault is AUTH.
377 439
378 TCPKeepAlive 440 TCPKeepAlive
@@ -392,7 +454,7 @@ DESCRIPTION
392 To disable TCP keepalive messages, the value should be set to 454 To disable TCP keepalive messages, the value should be set to
393 ``no''. 455 ``no''.
394 456
395 UseDNS Specifies whether sshd should look up the remote host name and 457 UseDNS Specifies whether sshd(8) should look up the remote host name and
396 check that the resolved host name for the remote IP address maps 458 check that the resolved host name for the remote IP address maps
397 back to the very same IP address. The default is ``yes''. 459 back to the very same IP address. The default is ``yes''.
398 460
@@ -406,8 +468,9 @@ DESCRIPTION
406 468
407 UsePAM Enables the Pluggable Authentication Module interface. If set to 469 UsePAM Enables the Pluggable Authentication Module interface. If set to
408 ``yes'' this will enable PAM authentication using 470 ``yes'' this will enable PAM authentication using
409 ChallengeResponseAuthentication and PAM account and session mod- 471 ChallengeResponseAuthentication and PasswordAuthentication in ad-
410 ule processing for all authentication types. 472 dition to PAM account and session module processing for all au-
473 thentication types.
411 474
412 Because PAM challenge-response authentication usually serves an 475 Because PAM challenge-response authentication usually serves an
413 equivalent role to password authentication, you should disable 476 equivalent role to password authentication, you should disable
@@ -417,7 +480,7 @@ DESCRIPTION
417 non-root user. The default is ``no''. 480 non-root user. The default is ``no''.
418 481
419 UsePrivilegeSeparation 482 UsePrivilegeSeparation
420 Specifies whether sshd separates privileges by creating an un- 483 Specifies whether sshd(8) separates privileges by creating an un-
421 privileged child process to deal with incoming network traffic. 484 privileged child process to deal with incoming network traffic.
422 After successful authentication, another process will be created 485 After successful authentication, another process will be created
423 that has the privilege of the authenticated user. The goal of 486 that has the privilege of the authenticated user. The goal of
@@ -426,8 +489,8 @@ DESCRIPTION
426 default is ``yes''. 489 default is ``yes''.
427 490
428 X11DisplayOffset 491 X11DisplayOffset
429 Specifies the first display number available for sshd's X11 for- 492 Specifies the first display number available for sshd(8)'s X11
430 warding. This prevents sshd from interfering with real X11 493 forwarding. This prevents sshd from interfering with real X11
431 servers. The default is 10. 494 servers. The default is 10.
432 495
433 X11Forwarding 496 X11Forwarding
@@ -435,17 +498,17 @@ DESCRIPTION
435 be ``yes'' or ``no''. The default is ``no''. 498 be ``yes'' or ``no''. The default is ``no''.
436 499
437 When X11 forwarding is enabled, there may be additional exposure 500 When X11 forwarding is enabled, there may be additional exposure
438 to the server and to client displays if the sshd proxy display is 501 to the server and to client displays if the sshd(8) proxy display
439 configured to listen on the wildcard address (see X11UseLocalhost 502 is configured to listen on the wildcard address (see
440 below), however this is not the default. Additionally, the au- 503 X11UseLocalhost below), though this is not the default. Addi-
441 thentication spoofing and authentication data verification and 504 tionally, the authentication spoofing and authentication data
442 substitution occur on the client side. The security risk of us- 505 verification and substitution occur on the client side. The se-
443 ing X11 forwarding is that the client's X11 display server may be 506 curity risk of using X11 forwarding is that the client's X11 dis-
444 exposed to attack when the ssh client requests forwarding (see 507 play server may be exposed to attack when the SSH client requests
445 the warnings for ForwardX11 in ssh_config(5)). A system adminis- 508 forwarding (see the warnings for ForwardX11 in ssh_config(5)). A
446 trator may have a stance in which they want to protect clients 509 system administrator may have a stance in which they want to pro-
447 that may expose themselves to attack by unwittingly requesting 510 tect clients that may expose themselves to attack by unwittingly
448 X11 forwarding, which can warrant a ``no'' setting. 511 requesting X11 forwarding, which can warrant a ``no'' setting.
449 512
450 Note that disabling X11 forwarding does not prevent users from 513 Note that disabling X11 forwarding does not prevent users from
451 forwarding X11 traffic, as users can always install their own 514 forwarding X11 traffic, as users can always install their own
@@ -453,8 +516,8 @@ DESCRIPTION
453 is enabled. 516 is enabled.
454 517
455 X11UseLocalhost 518 X11UseLocalhost
456 Specifies whether sshd should bind the X11 forwarding server to 519 Specifies whether sshd(8) should bind the X11 forwarding server
457 the loopback address or to the wildcard address. By default, 520 to the loopback address or to the wildcard address. By default,
458 sshd binds the forwarding server to the loopback address and sets 521 sshd binds the forwarding server to the loopback address and sets
459 the hostname part of the DISPLAY environment variable to 522 the hostname part of the DISPLAY environment variable to
460 ``localhost''. This prevents remote hosts from connecting to the 523 ``localhost''. This prevents remote hosts from connecting to the
@@ -468,9 +531,9 @@ DESCRIPTION
468 Specifies the full pathname of the xauth(1) program. The default 531 Specifies the full pathname of the xauth(1) program. The default
469 is /usr/X11R6/bin/xauth. 532 is /usr/X11R6/bin/xauth.
470 533
471 Time Formats 534TIME FORMATS
472 sshd command-line arguments and configuration file options that specify 535 sshd(8) command-line arguments and configuration file options that speci-
473 time may be expressed using a sequence of the form: time[qualifier], 536 fy time may be expressed using a sequence of the form: time[qualifier],
474 where time is a positive integer value and qualifier is one of the fol- 537 where time is a positive integer value and qualifier is one of the fol-
475 lowing: 538 lowing:
476 539
@@ -492,7 +555,7 @@ DESCRIPTION
492 555
493FILES 556FILES
494 /etc/ssh/sshd_config 557 /etc/ssh/sshd_config
495 Contains configuration data for sshd. This file should be 558 Contains configuration data for sshd(8). This file should be
496 writable by root only, but it is recommended (though not neces- 559 writable by root only, but it is recommended (though not neces-
497 sary) that it be world-readable. 560 sary) that it be world-readable.
498 561
@@ -507,4 +570,4 @@ AUTHORS
507 versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support 570 versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support
508 for privilege separation. 571 for privilege separation.
509 572
510OpenBSD 3.9 September 25, 1999 8 573OpenBSD 4.1 September 25, 1999 9
diff --git a/sshd_config.5 b/sshd_config.5
index 841cb29d3..ce9888d03 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.48 2006/01/02 17:09:49 jmc Exp $ 37.\" $OpenBSD: sshd_config.5,v 1.74 2007/03/01 16:19:33 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
@@ -42,11 +42,9 @@
42.Nm sshd_config 42.Nm sshd_config
43.Nd OpenSSH SSH daemon configuration file 43.Nd OpenSSH SSH daemon configuration file
44.Sh SYNOPSIS 44.Sh SYNOPSIS
45.Bl -tag -width Ds -compact 45.Nm /etc/ssh/sshd_config
46.It Pa /etc/ssh/sshd_config
47.El
48.Sh DESCRIPTION 46.Sh DESCRIPTION
49.Nm sshd 47.Xr sshd 8
50reads configuration data from 48reads configuration data from
51.Pa /etc/ssh/sshd_config 49.Pa /etc/ssh/sshd_config
52(or the file specified with 50(or the file specified with
@@ -56,6 +54,9 @@ The file contains keyword-argument pairs, one per line.
56Lines starting with 54Lines starting with
57.Ql # 55.Ql #
58and empty lines are interpreted as comments. 56and empty lines are interpreted as comments.
57Arguments may optionally be enclosed in double quotes
58.Pq \&"
59in order to represent arguments containing spaces.
59.Pp 60.Pp
60The possible 61The possible
61keywords and their meanings are as follows (note that 62keywords and their meanings are as follows (note that
@@ -72,7 +73,7 @@ in
72for how to configure the client. 73for how to configure the client.
73Note that environment passing is only supported for protocol 2. 74Note that environment passing is only supported for protocol 2.
74Variables are specified by name, which may contain the wildcard characters 75Variables are specified by name, which may contain the wildcard characters
75.Ql \&* 76.Ql *
76and 77and
77.Ql \&? . 78.Ql \&? .
78Multiple environment variables may be separated by whitespace or spread 79Multiple environment variables may be separated by whitespace or spread
@@ -85,11 +86,11 @@ For this reason, care should be taken in the use of this directive.
85The default is not to accept any environment variables. 86The default is not to accept any environment variables.
86.It Cm AddressFamily 87.It Cm AddressFamily
87Specifies which address family should be used by 88Specifies which address family should be used by
88.Nm sshd . 89.Xr sshd 8 .
89Valid arguments are 90Valid arguments are
90.Dq any , 91.Dq any ,
91.Dq inet 92.Dq inet
92(use IPv4 only) or 93(use IPv4 only), or
93.Dq inet6 94.Dq inet6
94(use IPv6 only). 95(use IPv6 only).
95The default is 96The default is
@@ -99,13 +100,20 @@ This keyword can be followed by a list of group name patterns, separated
99by spaces. 100by spaces.
100If specified, login is allowed only for users whose primary 101If specified, login is allowed only for users whose primary
101group or supplementary group list matches one of the patterns. 102group or supplementary group list matches one of the patterns.
102.Ql \&*
103and
104.Ql \&?
105can be used as
106wildcards in the patterns.
107Only group names are valid; a numerical group ID is not recognized. 103Only group names are valid; a numerical group ID is not recognized.
108By default, login is allowed for all groups. 104By default, login is allowed for all groups.
105The allow/deny directives are processed in the following order:
106.Cm DenyUsers ,
107.Cm AllowUsers ,
108.Cm DenyGroups ,
109and finally
110.Cm AllowGroups .
111.Pp
112See
113.Sx PATTERNS
114in
115.Xr ssh_config 5
116for more information on patterns.
109.It Cm AllowTcpForwarding 117.It Cm AllowTcpForwarding
110Specifies whether TCP forwarding is permitted. 118Specifies whether TCP forwarding is permitted.
111The default is 119The default is
@@ -118,24 +126,31 @@ This keyword can be followed by a list of user name patterns, separated
118by spaces. 126by spaces.
119If specified, login is allowed only for user names that 127If specified, login is allowed only for user names that
120match one of the patterns. 128match one of the patterns.
121.Ql \&*
122and
123.Ql \&?
124can be used as
125wildcards in the patterns.
126Only user names are valid; a numerical user ID is not recognized. 129Only user names are valid; a numerical user ID is not recognized.
127By default, login is allowed for all users. 130By default, login is allowed for all users.
128If the pattern takes the form USER@HOST then USER and HOST 131If the pattern takes the form USER@HOST then USER and HOST
129are separately checked, restricting logins to particular 132are separately checked, restricting logins to particular
130users from particular hosts. 133users from particular hosts.
134The allow/deny directives are processed in the following order:
135.Cm DenyUsers ,
136.Cm AllowUsers ,
137.Cm DenyGroups ,
138and finally
139.Cm AllowGroups .
140.Pp
141See
142.Sx PATTERNS
143in
144.Xr ssh_config 5
145for more information on patterns.
131.It Cm AuthorizedKeysFile 146.It Cm AuthorizedKeysFile
132Specifies the file that contains the public keys that can be used 147Specifies the file that contains the public keys that can be used
133for user authentication. 148for user authentication.
134.Cm AuthorizedKeysFile 149.Cm AuthorizedKeysFile
135may contain tokens of the form %T which are substituted during connection 150may contain tokens of the form %T which are substituted during connection
136set-up. 151setup.
137The following tokens are defined: %% is replaced by a literal '%', 152The following tokens are defined: %% is replaced by a literal '%',
138%h is replaced by the home directory of the user being authenticated and 153%h is replaced by the home directory of the user being authenticated, and
139%u is replaced by the username of that user. 154%u is replaced by the username of that user.
140After expansion, 155After expansion,
141.Cm AuthorizedKeysFile 156.Cm AuthorizedKeysFile
@@ -151,7 +166,7 @@ authentication is allowed.
151This option is only available for protocol version 2. 166This option is only available for protocol version 2.
152By default, no banner is displayed. 167By default, no banner is displayed.
153.It Cm ChallengeResponseAuthentication 168.It Cm ChallengeResponseAuthentication
154Specifies whether challenge response authentication is allowed. 169Specifies whether challenge-response authentication is allowed.
155All authentication styles from 170All authentication styles from
156.Xr login.conf 5 171.Xr login.conf 5
157are supported. 172are supported.
@@ -174,20 +189,19 @@ The supported ciphers are
174.Dq blowfish-cbc , 189.Dq blowfish-cbc ,
175and 190and
176.Dq cast128-cbc . 191.Dq cast128-cbc .
177The default is 192The default is:
178.Bd -literal 193.Bd -literal -offset 3n
179 ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128, 194aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,
180 arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr, 195arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr,
181 aes192-ctr,aes256-ctr'' 196aes192-ctr,aes256-ctr
182.Ed 197.Ed
183.It Cm ClientAliveCountMax 198.It Cm ClientAliveCountMax
184Sets the number of client alive messages (see below) which may be 199Sets the number of client alive messages (see below) which may be
185sent without 200sent without
186.Nm sshd 201.Xr sshd 8
187receiving any messages back from the client. 202receiving any messages back from the client.
188If this threshold is reached while client alive messages are being sent, 203If this threshold is reached while client alive messages are being sent,
189.Nm sshd 204sshd will disconnect the client, terminating the session.
190will disconnect the client, terminating the session.
191It is important to note that the use of client alive messages is very 205It is important to note that the use of client alive messages is very
192different from 206different from
193.Cm TCPKeepAlive 207.Cm TCPKeepAlive
@@ -205,12 +219,13 @@ If
205.Cm ClientAliveInterval 219.Cm ClientAliveInterval
206(see below) is set to 15, and 220(see below) is set to 15, and
207.Cm ClientAliveCountMax 221.Cm ClientAliveCountMax
208is left at the default, unresponsive ssh clients 222is left at the default, unresponsive SSH clients
209will be disconnected after approximately 45 seconds. 223will be disconnected after approximately 45 seconds.
224This option applies to protocol version 2 only.
210.It Cm ClientAliveInterval 225.It Cm ClientAliveInterval
211Sets a timeout interval in seconds after which if no data has been received 226Sets a timeout interval in seconds after which if no data has been received
212from the client, 227from the client,
213.Nm sshd 228.Xr sshd 8
214will send a message through the encrypted 229will send a message through the encrypted
215channel to request a response from the client. 230channel to request a response from the client.
216The default 231The default
@@ -231,36 +246,62 @@ This keyword can be followed by a list of group name patterns, separated
231by spaces. 246by spaces.
232Login is disallowed for users whose primary group or supplementary 247Login is disallowed for users whose primary group or supplementary
233group list matches one of the patterns. 248group list matches one of the patterns.
234.Ql \&*
235and
236.Ql \&?
237can be used as
238wildcards in the patterns.
239Only group names are valid; a numerical group ID is not recognized. 249Only group names are valid; a numerical group ID is not recognized.
240By default, login is allowed for all groups. 250By default, login is allowed for all groups.
251The allow/deny directives are processed in the following order:
252.Cm DenyUsers ,
253.Cm AllowUsers ,
254.Cm DenyGroups ,
255and finally
256.Cm AllowGroups .
257.Pp
258See
259.Sx PATTERNS
260in
261.Xr ssh_config 5
262for more information on patterns.
241.It Cm DenyUsers 263.It Cm DenyUsers
242This keyword can be followed by a list of user name patterns, separated 264This keyword can be followed by a list of user name patterns, separated
243by spaces. 265by spaces.
244Login is disallowed for user names that match one of the patterns. 266Login is disallowed for user names that match one of the patterns.
245.Ql \&*
246and
247.Ql \&?
248can be used as wildcards in the patterns.
249Only user names are valid; a numerical user ID is not recognized. 267Only user names are valid; a numerical user ID is not recognized.
250By default, login is allowed for all users. 268By default, login is allowed for all users.
251If the pattern takes the form USER@HOST then USER and HOST 269If the pattern takes the form USER@HOST then USER and HOST
252are separately checked, restricting logins to particular 270are separately checked, restricting logins to particular
253users from particular hosts. 271users from particular hosts.
272The allow/deny directives are processed in the following order:
273.Cm DenyUsers ,
274.Cm AllowUsers ,
275.Cm DenyGroups ,
276and finally
277.Cm AllowGroups .
278.Pp
279See
280.Sx PATTERNS
281in
282.Xr ssh_config 5
283for more information on patterns.
284.It Cm ForceCommand
285Forces the execution of the command specified by
286.Cm ForceCommand ,
287ignoring any command supplied by the client.
288The command is invoked by using the user's login shell with the -c option.
289This applies to shell, command, or subsystem execution.
290It is most useful inside a
291.Cm Match
292block.
293The command originally supplied by the client is available in the
294.Ev SSH_ORIGINAL_COMMAND
295environment variable.
254.It Cm GatewayPorts 296.It Cm GatewayPorts
255Specifies whether remote hosts are allowed to connect to ports 297Specifies whether remote hosts are allowed to connect to ports
256forwarded for the client. 298forwarded for the client.
257By default, 299By default,
258.Nm sshd 300.Xr sshd 8
259binds remote port forwardings to the loopback address. 301binds remote port forwardings to the loopback address.
260This prevents other remote hosts from connecting to forwarded ports. 302This prevents other remote hosts from connecting to forwarded ports.
261.Cm GatewayPorts 303.Cm GatewayPorts
262can be used to specify that 304can be used to specify that sshd
263.Nm sshd
264should allow remote port forwardings to bind to non-loopback addresses, thus 305should allow remote port forwardings to bind to non-loopback addresses, thus
265allowing other hosts to connect. 306allowing other hosts to connect.
266The argument may be 307The argument may be
@@ -289,15 +330,49 @@ on logout.
289The default is 330The default is
290.Dq yes . 331.Dq yes .
291Note that this option applies to protocol version 2 only. 332Note that this option applies to protocol version 2 only.
333.It Cm GSSAPIStrictAcceptorCheck
334Determines whether to be strict about the identity of the GSSAPI acceptor
335a client authenticates against. If
336.Dq yes
337then the client must authenticate against the
338.Pa host
339service on the current hostname. If
340.Dq no
341then the client may authenticate against any service key stored in the
342machine's default store. This facility is provided to assist with operation
343on multi homed machines.
344The default is
345.Dq yes .
346Note that this option applies only to protocol version 2 GSSAPI connections,
347and setting it to
348.Dq no
349may only work with recent Kerberos GSSAPI libraries.
292.It Cm HostbasedAuthentication 350.It Cm HostbasedAuthentication
293Specifies whether rhosts or /etc/hosts.equiv authentication together 351Specifies whether rhosts or /etc/hosts.equiv authentication together
294with successful public key client host authentication is allowed 352with successful public key client host authentication is allowed
295(hostbased authentication). 353(host-based authentication).
296This option is similar to 354This option is similar to
297.Cm RhostsRSAAuthentication 355.Cm RhostsRSAAuthentication
298and applies to protocol version 2 only. 356and applies to protocol version 2 only.
299The default is 357The default is
300.Dq no . 358.Dq no .
359.It Cm HostbasedUsesNameFromPacketOnly
360Specifies whether or not the server will attempt to perform a reverse
361name lookup when matching the name in the
362.Pa ~/.shosts ,
363.Pa ~/.rhosts ,
364and
365.Pa /etc/hosts.equiv
366files during
367.Cm HostbasedAuthentication .
368A setting of
369.Dq yes
370means that
371.Xr sshd 8
372uses the name supplied by the client rather than
373attempting to resolve the name from the TCP connection itself.
374The default is
375.Dq no .
301.It Cm HostKey 376.It Cm HostKey
302Specifies a file containing a private host key 377Specifies a file containing a private host key
303used by SSH. 378used by SSH.
@@ -309,7 +384,7 @@ and
309.Pa /etc/ssh/ssh_host_dsa_key 384.Pa /etc/ssh/ssh_host_dsa_key
310for protocol version 2. 385for protocol version 2.
311Note that 386Note that
312.Nm sshd 387.Xr sshd 8
313will refuse to use a file if it is group/world-accessible. 388will refuse to use a file if it is group/world-accessible.
314It is possible to have multiple host key files. 389It is possible to have multiple host key files.
315.Dq rsa1 390.Dq rsa1
@@ -336,7 +411,7 @@ The default is
336.Dq yes . 411.Dq yes .
337.It Cm IgnoreUserKnownHosts 412.It Cm IgnoreUserKnownHosts
338Specifies whether 413Specifies whether
339.Nm sshd 414.Xr sshd 8
340should ignore the user's 415should ignore the user's
341.Pa ~/.ssh/known_hosts 416.Pa ~/.ssh/known_hosts
342during 417during
@@ -351,24 +426,24 @@ Specifies whether the password provided by the user for
351will be validated through the Kerberos KDC. 426will be validated through the Kerberos KDC.
352To use this option, the server needs a 427To use this option, the server needs a
353Kerberos servtab which allows the verification of the KDC's identity. 428Kerberos servtab which allows the verification of the KDC's identity.
354Default is 429The default is
355.Dq no . 430.Dq no .
356.It Cm KerberosGetAFSToken 431.It Cm KerberosGetAFSToken
357If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire 432If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
358an AFS token before accessing the user's home directory. 433an AFS token before accessing the user's home directory.
359Default is 434The default is
360.Dq no . 435.Dq no .
361.It Cm KerberosOrLocalPasswd 436.It Cm KerberosOrLocalPasswd
362If set then if password authentication through Kerberos fails then 437If password authentication through Kerberos fails then
363the password will be validated via any additional local mechanism 438the password will be validated via any additional local mechanism
364such as 439such as
365.Pa /etc/passwd . 440.Pa /etc/passwd .
366Default is 441The default is
367.Dq yes . 442.Dq yes .
368.It Cm KerberosTicketCleanup 443.It Cm KerberosTicketCleanup
369Specifies whether to automatically destroy the user's ticket cache 444Specifies whether to automatically destroy the user's ticket cache
370file on logout. 445file on logout.
371Default is 446The default is
372.Dq yes . 447.Dq yes .
373.It Cm KeyRegenerationInterval 448.It Cm KeyRegenerationInterval
374In protocol version 1, the ephemeral server key is automatically regenerated 449In protocol version 1, the ephemeral server key is automatically regenerated
@@ -381,7 +456,7 @@ If the value is 0, the key is never regenerated.
381The default is 3600 (seconds). 456The default is 3600 (seconds).
382.It Cm ListenAddress 457.It Cm ListenAddress
383Specifies the local addresses 458Specifies the local addresses
384.Nm sshd 459.Xr sshd 8
385should listen on. 460should listen on.
386The following forms may be used: 461The following forms may be used:
387.Pp 462.Pp
@@ -407,8 +482,7 @@ The following forms may be used:
407If 482If
408.Ar port 483.Ar port
409is not specified, 484is not specified,
410.Nm sshd 485sshd will listen on the address and all prior
411will listen on the address and all prior
412.Cm Port 486.Cm Port
413options specified. 487options specified.
414The default is to listen on all local addresses. 488The default is to listen on all local addresses.
@@ -417,7 +491,7 @@ Multiple
417options are permitted. 491options are permitted.
418Additionally, any 492Additionally, any
419.Cm Port 493.Cm Port
420options must precede this option for non port qualified addresses. 494options must precede this option for non-port qualified addresses.
421.It Cm LoginGraceTime 495.It Cm LoginGraceTime
422The server disconnects after this time if the user has not 496The server disconnects after this time if the user has not
423successfully logged in. 497successfully logged in.
@@ -425,9 +499,9 @@ If the value is 0, there is no time limit.
425The default is 120 seconds. 499The default is 120 seconds.
426.It Cm LogLevel 500.It Cm LogLevel
427Gives the verbosity level that is used when logging messages from 501Gives the verbosity level that is used when logging messages from
428.Nm sshd . 502.Xr sshd 8 .
429The possible values are: 503The possible values are:
430QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3. 504QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
431The default is INFO. 505The default is INFO.
432DEBUG and DEBUG1 are equivalent. 506DEBUG and DEBUG1 are equivalent.
433DEBUG2 and DEBUG3 each specify higher levels of debugging output. 507DEBUG2 and DEBUG3 each specify higher levels of debugging output.
@@ -437,8 +511,44 @@ Specifies the available MAC (message authentication code) algorithms.
437The MAC algorithm is used in protocol version 2 511The MAC algorithm is used in protocol version 2
438for data integrity protection. 512for data integrity protection.
439Multiple algorithms must be comma-separated. 513Multiple algorithms must be comma-separated.
440The default is 514The default is:
441.Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 . 515.Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 .
516.It Cm Match
517Introduces a conditional block.
518If all of the criteria on the
519.Cm Match
520line are satisfied, the keywords on the following lines override those
521set in the global section of the config file, until either another
522.Cm Match
523line or the end of the file.
524The arguments to
525.Cm Match
526are one or more criteria-pattern pairs.
527The available criteria are
528.Cm User ,
529.Cm Group ,
530.Cm Host ,
531and
532.Cm Address .
533Only a subset of keywords may be used on the lines following a
534.Cm Match
535keyword.
536Available keywords are
537.Cm AllowTcpForwarding ,
538.Cm Banner ,
539.Cm ForceCommand ,
540.Cm GatewayPorts ,
541.Cm GSSApiAuthentication ,
542.Cm KbdInteractiveAuthentication ,
543.Cm KerberosAuthentication ,
544.Cm PasswordAuthentication ,
545.Cm PermitOpen ,
546.Cm RhostsRSAAuthentication ,
547.Cm RSAAuthentication ,
548.Cm X11DisplayOffset ,
549.Cm X11Forwarding ,
550and
551.Cm X11UseLocalHost .
442.It Cm MaxAuthTries 552.It Cm MaxAuthTries
443Specifies the maximum number of authentication attempts permitted per 553Specifies the maximum number of authentication attempts permitted per
444connection. 554connection.
@@ -447,8 +557,7 @@ additional failures are logged.
447The default is 6. 557The default is 6.
448.It Cm MaxStartups 558.It Cm MaxStartups
449Specifies the maximum number of concurrent unauthenticated connections to the 559Specifies the maximum number of concurrent unauthenticated connections to the
450.Nm sshd 560SSH daemon.
451daemon.
452Additional connections will be dropped until authentication succeeds or the 561Additional connections will be dropped until authentication succeeds or the
453.Cm LoginGraceTime 562.Cm LoginGraceTime
454expires for a connection. 563expires for a connection.
@@ -457,8 +566,8 @@ The default is 10.
457Alternatively, random early drop can be enabled by specifying 566Alternatively, random early drop can be enabled by specifying
458the three colon separated values 567the three colon separated values
459.Dq start:rate:full 568.Dq start:rate:full
460(e.g., "10:30:60"). 569(e.g. "10:30:60").
461.Nm sshd 570.Xr sshd 8
462will refuse connection attempts with a probability of 571will refuse connection attempts with a probability of
463.Dq rate/100 572.Dq rate/100
464(30%) 573(30%)
@@ -479,24 +588,51 @@ When password authentication is allowed, it specifies whether the
479server allows login to accounts with empty password strings. 588server allows login to accounts with empty password strings.
480The default is 589The default is
481.Dq no . 590.Dq no .
591.It Cm PermitOpen
592Specifies the destinations to which TCP port forwarding is permitted.
593The forwarding specification must be one of the following forms:
594.Pp
595.Bl -item -offset indent -compact
596.It
597.Cm PermitOpen
598.Sm off
599.Ar host : port
600.Sm on
601.It
602.Cm PermitOpen
603.Sm off
604.Ar IPv4_addr : port
605.Sm on
606.It
607.Cm PermitOpen
608.Sm off
609.Ar \&[ IPv6_addr \&] : port
610.Sm on
611.El
612.Pp
613Multiple forwards may be specified by separating them with whitespace.
614An argument of
615.Dq any
616can be used to remove all restrictions and permit any forwarding requests.
617By default all port forwarding requests are permitted.
482.It Cm PermitRootLogin 618.It Cm PermitRootLogin
483Specifies whether root can log in using 619Specifies whether root can log in using
484.Xr ssh 1 . 620.Xr ssh 1 .
485The argument must be 621The argument must be
486.Dq yes , 622.Dq yes ,
487.Dq without-password , 623.Dq without-password ,
488.Dq forced-commands-only 624.Dq forced-commands-only ,
489or 625or
490.Dq no . 626.Dq no .
491The default is 627The default is
492.Dq yes . 628.Dq yes .
493.Pp 629.Pp
494If this option is set to 630If this option is set to
495.Dq without-password 631.Dq without-password ,
496password authentication is disabled for root. 632password authentication is disabled for root.
497.Pp 633.Pp
498If this option is set to 634If this option is set to
499.Dq forced-commands-only 635.Dq forced-commands-only ,
500root login with public key authentication will be allowed, 636root login with public key authentication will be allowed,
501but only if the 637but only if the
502.Ar command 638.Ar command
@@ -506,7 +642,7 @@ normally not allowed).
506All other authentication methods are disabled for root. 642All other authentication methods are disabled for root.
507.Pp 643.Pp
508If this option is set to 644If this option is set to
509.Dq no 645.Dq no ,
510root is not allowed to log in. 646root is not allowed to log in.
511.It Cm PermitTunnel 647.It Cm PermitTunnel
512Specifies whether 648Specifies whether
@@ -514,10 +650,17 @@ Specifies whether
514device forwarding is allowed. 650device forwarding is allowed.
515The argument must be 651The argument must be
516.Dq yes , 652.Dq yes ,
517.Dq point-to-point , 653.Dq point-to-point
654(layer 3),
518.Dq ethernet 655.Dq ethernet
519or 656(layer 2), or
520.Dq no . 657.Dq no .
658Specifying
659.Dq yes
660permits both
661.Dq point-to-point
662and
663.Dq ethernet .
521The default is 664The default is
522.Dq no . 665.Dq no .
523.It Cm PermitUserEnvironment 666.It Cm PermitUserEnvironment
@@ -528,7 +671,7 @@ and
528options in 671options in
529.Pa ~/.ssh/authorized_keys 672.Pa ~/.ssh/authorized_keys
530are processed by 673are processed by
531.Nm sshd . 674.Xr sshd 8 .
532The default is 675The default is
533.Dq no . 676.Dq no .
534Enabling environment processing may enable users to bypass access 677Enabling environment processing may enable users to bypass access
@@ -536,13 +679,12 @@ restrictions in some configurations using mechanisms such as
536.Ev LD_PRELOAD . 679.Ev LD_PRELOAD .
537.It Cm PidFile 680.It Cm PidFile
538Specifies the file that contains the process ID of the 681Specifies the file that contains the process ID of the
539.Nm sshd 682SSH daemon.
540daemon.
541The default is 683The default is
542.Pa /var/run/sshd.pid . 684.Pa /var/run/sshd.pid .
543.It Cm Port 685.It Cm Port
544Specifies the port number that 686Specifies the port number that
545.Nm sshd 687.Xr sshd 8
546listens on. 688listens on.
547The default is 22. 689The default is 22.
548Multiple options of this type are permitted. 690Multiple options of this type are permitted.
@@ -550,14 +692,14 @@ See also
550.Cm ListenAddress . 692.Cm ListenAddress .
551.It Cm PrintLastLog 693.It Cm PrintLastLog
552Specifies whether 694Specifies whether
553.Nm sshd 695.Xr sshd 8
554should print the date and time of the last user login when a user logs 696should print the date and time of the last user login when a user logs
555in interactively. 697in interactively.
556The default is 698The default is
557.Dq yes . 699.Dq yes .
558.It Cm PrintMotd 700.It Cm PrintMotd
559Specifies whether 701Specifies whether
560.Nm sshd 702.Xr sshd 8
561should print 703should print
562.Pa /etc/motd 704.Pa /etc/motd
563when a user logs in interactively. 705when a user logs in interactively.
@@ -568,12 +710,12 @@ The default is
568.Dq yes . 710.Dq yes .
569.It Cm Protocol 711.It Cm Protocol
570Specifies the protocol versions 712Specifies the protocol versions
571.Nm sshd 713.Xr sshd 8
572supports. 714supports.
573The possible values are 715The possible values are
574.Dq 1 716.Sq 1
575and 717and
576.Dq 2 . 718.Sq 2 .
577Multiple versions must be comma-separated. 719Multiple versions must be comma-separated.
578The default is 720The default is
579.Dq 2,1 . 721.Dq 2,1 .
@@ -605,7 +747,7 @@ Defines the number of bits in the ephemeral protocol version 1 server key.
605The minimum value is 512, and the default is 768. 747The minimum value is 512, and the default is 768.
606.It Cm StrictModes 748.It Cm StrictModes
607Specifies whether 749Specifies whether
608.Nm sshd 750.Xr sshd 8
609should check file modes and ownership of the 751should check file modes and ownership of the
610user's files and home directory before accepting login. 752user's files and home directory before accepting login.
611This is normally desirable because novices sometimes accidentally leave their 753This is normally desirable because novices sometimes accidentally leave their
@@ -613,9 +755,9 @@ directory or files world-writable.
613The default is 755The default is
614.Dq yes . 756.Dq yes .
615.It Cm Subsystem 757.It Cm Subsystem
616Configures an external subsystem (e.g., file transfer daemon). 758Configures an external subsystem (e.g. file transfer daemon).
617Arguments should be a subsystem name and a command to execute upon subsystem 759Arguments should be a subsystem name and a command (with optional arguments)
618request. 760to execute upon subsystem request.
619The command 761The command
620.Xr sftp-server 8 762.Xr sftp-server 8
621implements the 763implements the
@@ -625,7 +767,7 @@ By default no subsystems are defined.
625Note that this option applies to protocol version 2 only. 767Note that this option applies to protocol version 2 only.
626.It Cm SyslogFacility 768.It Cm SyslogFacility
627Gives the facility code that is used when logging messages from 769Gives the facility code that is used when logging messages from
628.Nm sshd . 770.Xr sshd 8 .
629The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, 771The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
630LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. 772LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
631The default is AUTH. 773The default is AUTH.
@@ -652,7 +794,7 @@ To disable TCP keepalive messages, the value should be set to
652.Dq no . 794.Dq no .
653.It Cm UseDNS 795.It Cm UseDNS
654Specifies whether 796Specifies whether
655.Nm sshd 797.Xr sshd 8
656should look up the remote host name and check that 798should look up the remote host name and check that
657the resolved host name for the remote IP address maps back to the 799the resolved host name for the remote IP address maps back to the
658very same IP address. 800very same IP address.
@@ -683,7 +825,10 @@ If set to
683.Dq yes 825.Dq yes
684this will enable PAM authentication using 826this will enable PAM authentication using
685.Cm ChallengeResponseAuthentication 827.Cm ChallengeResponseAuthentication
686and PAM account and session module processing for all authentication types. 828and
829.Cm PasswordAuthentication
830in addition to PAM account and session module processing for all
831authentication types.
687.Pp 832.Pp
688Because PAM challenge-response authentication usually serves an equivalent 833Because PAM challenge-response authentication usually serves an equivalent
689role to password authentication, you should disable either 834role to password authentication, you should disable either
@@ -700,7 +845,7 @@ The default is
700.Dq no . 845.Dq no .
701.It Cm UsePrivilegeSeparation 846.It Cm UsePrivilegeSeparation
702Specifies whether 847Specifies whether
703.Nm sshd 848.Xr sshd 8
704separates privileges by creating an unprivileged child process 849separates privileges by creating an unprivileged child process
705to deal with incoming network traffic. 850to deal with incoming network traffic.
706After successful authentication, another process will be created that has 851After successful authentication, another process will be created that has
@@ -711,11 +856,9 @@ The default is
711.Dq yes . 856.Dq yes .
712.It Cm X11DisplayOffset 857.It Cm X11DisplayOffset
713Specifies the first display number available for 858Specifies the first display number available for
714.Nm sshd Ns 's 859.Xr sshd 8 Ns 's
715X11 forwarding. 860X11 forwarding.
716This prevents 861This prevents sshd from interfering with real X11 servers.
717.Nm sshd
718from interfering with real X11 servers.
719The default is 10. 862The default is 10.
720.It Cm X11Forwarding 863.It Cm X11Forwarding
721Specifies whether X11 forwarding is permitted. 864Specifies whether X11 forwarding is permitted.
@@ -728,14 +871,14 @@ The default is
728.Pp 871.Pp
729When X11 forwarding is enabled, there may be additional exposure to 872When X11 forwarding is enabled, there may be additional exposure to
730the server and to client displays if the 873the server and to client displays if the
731.Nm sshd 874.Xr sshd 8
732proxy display is configured to listen on the wildcard address (see 875proxy display is configured to listen on the wildcard address (see
733.Cm X11UseLocalhost 876.Cm X11UseLocalhost
734below), however this is not the default. 877below), though this is not the default.
735Additionally, the authentication spoofing and authentication data 878Additionally, the authentication spoofing and authentication data
736verification and substitution occur on the client side. 879verification and substitution occur on the client side.
737The security risk of using X11 forwarding is that the client's X11 880The security risk of using X11 forwarding is that the client's X11
738display server may be exposed to attack when the ssh client requests 881display server may be exposed to attack when the SSH client requests
739forwarding (see the warnings for 882forwarding (see the warnings for
740.Cm ForwardX11 883.Cm ForwardX11
741in 884in
@@ -753,12 +896,11 @@ X11 forwarding is automatically disabled if
753is enabled. 896is enabled.
754.It Cm X11UseLocalhost 897.It Cm X11UseLocalhost
755Specifies whether 898Specifies whether
756.Nm sshd 899.Xr sshd 8
757should bind the X11 forwarding server to the loopback address or to 900should bind the X11 forwarding server to the loopback address or to
758the wildcard address. 901the wildcard address.
759By default, 902By default,
760.Nm sshd 903sshd binds the forwarding server to the loopback address and sets the
761binds the forwarding server to the loopback address and sets the
762hostname part of the 904hostname part of the
763.Ev DISPLAY 905.Ev DISPLAY
764environment variable to 906environment variable to
@@ -784,8 +926,8 @@ program.
784The default is 926The default is
785.Pa /usr/X11R6/bin/xauth . 927.Pa /usr/X11R6/bin/xauth .
786.El 928.El
787.Ss Time Formats 929.Sh TIME FORMATS
788.Nm sshd 930.Xr sshd 8
789command-line arguments and configuration file options that specify time 931command-line arguments and configuration file options that specify time
790may be expressed using a sequence of the form: 932may be expressed using a sequence of the form:
791.Sm off 933.Sm off
@@ -798,7 +940,7 @@ is a positive integer value and
798is one of the following: 940is one of the following:
799.Pp 941.Pp
800.Bl -tag -width Ds -compact -offset indent 942.Bl -tag -width Ds -compact -offset indent
801.It Cm <none> 943.It Aq Cm none
802seconds 944seconds
803.It Cm s | Cm S 945.It Cm s | Cm S
804seconds 946seconds
@@ -829,7 +971,7 @@ Time format examples:
829.Bl -tag -width Ds 971.Bl -tag -width Ds
830.It Pa /etc/ssh/sshd_config 972.It Pa /etc/ssh/sshd_config
831Contains configuration data for 973Contains configuration data for
832.Nm sshd . 974.Xr sshd 8 .
833This file should be writable by root only, but it is recommended 975This file should be writable by root only, but it is recommended
834(though not necessary) that it be world-readable. 976(though not necessary) that it be world-readable.
835.El 977.El
diff --git a/sshlogin.c b/sshlogin.c
index 15eb916d1..0059ff8d0 100644
--- a/sshlogin.c
+++ b/sshlogin.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: sshlogin.c,v 1.25 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -39,7 +40,20 @@
39 */ 40 */
40 41
41#include "includes.h" 42#include "includes.h"
42RCSID("$OpenBSD: sshlogin.c,v 1.13 2004/08/12 09:18:24 djm Exp $"); 43
44#include <sys/types.h>
45#include <sys/param.h>
46#include <sys/socket.h>
47
48#include <netinet/in.h>
49
50#include <errno.h>
51#include <fcntl.h>
52#include <stdarg.h>
53#include <stdio.h>
54#include <string.h>
55#include <time.h>
56#include <unistd.h>
43 57
44#include "loginrec.h" 58#include "loginrec.h"
45#include "log.h" 59#include "log.h"
@@ -54,15 +68,15 @@ extern ServerOptions options;
54 * information is not available. This must be called before record_login. 68 * information is not available. This must be called before record_login.
55 * The host the user logged in from will be returned in buf. 69 * The host the user logged in from will be returned in buf.
56 */ 70 */
57u_long 71time_t
58get_last_login_time(uid_t uid, const char *logname, 72get_last_login_time(uid_t uid, const char *logname,
59 char *buf, u_int bufsize) 73 char *buf, size_t bufsize)
60{ 74{
61 struct logininfo li; 75 struct logininfo li;
62 76
63 login_get_lastlog(&li, uid); 77 login_get_lastlog(&li, uid);
64 strlcpy(buf, li.hostname, bufsize); 78 strlcpy(buf, li.hostname, bufsize);
65 return li.tv_sec; 79 return (time_t)li.tv_sec;
66} 80}
67 81
68/* 82/*
@@ -103,7 +117,7 @@ store_lastlog_message(const char *user, uid_t uid)
103 */ 117 */
104void 118void
105record_login(pid_t pid, const char *tty, const char *user, uid_t uid, 119record_login(pid_t pid, const char *tty, const char *user, uid_t uid,
106 const char *host, struct sockaddr * addr, socklen_t addrlen) 120 const char *host, struct sockaddr *addr, socklen_t addrlen)
107{ 121{
108 struct logininfo *li; 122 struct logininfo *li;
109 123
@@ -119,7 +133,7 @@ record_login(pid_t pid, const char *tty, const char *user, uid_t uid,
119#ifdef LOGIN_NEEDS_UTMPX 133#ifdef LOGIN_NEEDS_UTMPX
120void 134void
121record_utmp_only(pid_t pid, const char *ttyname, const char *user, 135record_utmp_only(pid_t pid, const char *ttyname, const char *user,
122 const char *host, struct sockaddr * addr, socklen_t addrlen) 136 const char *host, struct sockaddr *addr, socklen_t addrlen)
123{ 137{
124 struct logininfo *li; 138 struct logininfo *li;
125 139
diff --git a/sshlogin.h b/sshlogin.h
index 1c8bfad32..500d3fefd 100644
--- a/sshlogin.h
+++ b/sshlogin.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshlogin.h,v 1.4 2002/08/29 15:57:25 stevesk Exp $ */ 1/* $OpenBSD: sshlogin.h,v 1.8 2006/08/03 03:34:42 deraadt Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -11,18 +11,13 @@
11 * incompatible with the protocol description in the RFC file, it must be 11 * incompatible with the protocol description in the RFC file, it must be
12 * called by a name other than "ssh" or "Secure Shell". 12 * called by a name other than "ssh" or "Secure Shell".
13 */ 13 */
14#ifndef SSHLOGIN_H
15#define SSHLOGIN_H
16 14
17void 15void record_login(pid_t, const char *, const char *, uid_t,
18record_login(pid_t, const char *, const char *, uid_t,
19 const char *, struct sockaddr *, socklen_t); 16 const char *, struct sockaddr *, socklen_t);
20void record_logout(pid_t, const char *, const char *); 17void record_logout(pid_t, const char *, const char *);
21u_long get_last_login_time(uid_t, const char *, char *, u_int); 18time_t get_last_login_time(uid_t, const char *, char *, u_int);
22 19
23#ifdef LOGIN_NEEDS_UTMPX 20#ifdef LOGIN_NEEDS_UTMPX
24void record_utmp_only(pid_t, const char *, const char *, const char *, 21void record_utmp_only(pid_t, const char *, const char *, const char *,
25 struct sockaddr *, socklen_t); 22 struct sockaddr *, socklen_t);
26#endif 23#endif
27
28#endif
diff --git a/sshpty.c b/sshpty.c
index 36788c4d7..79c62ee9c 100644
--- a/sshpty.c
+++ b/sshpty.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: sshpty.c,v 1.26 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -12,11 +13,26 @@
12 */ 13 */
13 14
14#include "includes.h" 15#include "includes.h"
15RCSID("$OpenBSD: sshpty.c,v 1.12 2004/06/21 17:36:31 avsm Exp $");
16 16
17#include <sys/types.h>
18#include <sys/ioctl.h>
19#include <sys/stat.h>
20#include <signal.h>
21
22#include <errno.h>
23#include <fcntl.h>
24#include <grp.h>
25#ifdef HAVE_PATHS_H
26# include <paths.h>
27#endif
28#include <pwd.h>
29#include <stdarg.h>
30#include <string.h>
31#include <termios.h>
17#ifdef HAVE_UTIL_H 32#ifdef HAVE_UTIL_H
18# include <util.h> 33# include <util.h>
19#endif /* HAVE_UTIL_H */ 34#endif
35#include <unistd.h>
20 36
21#include "sshpty.h" 37#include "sshpty.h"
22#include "log.h" 38#include "log.h"
@@ -38,7 +54,7 @@ RCSID("$OpenBSD: sshpty.c,v 1.12 2004/06/21 17:36:31 avsm Exp $");
38 */ 54 */
39 55
40int 56int
41pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen) 57pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen)
42{ 58{
43 /* openpty(3) exists in OSF/1 and some other os'es */ 59 /* openpty(3) exists in OSF/1 and some other os'es */
44 char *name; 60 char *name;
@@ -161,11 +177,12 @@ pty_make_controlling_tty(int *ttyfd, const char *tty)
161/* Changes the window size associated with the pty. */ 177/* Changes the window size associated with the pty. */
162 178
163void 179void
164pty_change_window_size(int ptyfd, int row, int col, 180pty_change_window_size(int ptyfd, u_int row, u_int col,
165 int xpixel, int ypixel) 181 u_int xpixel, u_int ypixel)
166{ 182{
167 struct winsize w; 183 struct winsize w;
168 184
185 /* may truncate u_int -> u_short */
169 w.ws_row = row; 186 w.ws_row = row;
170 w.ws_col = col; 187 w.ws_col = col;
171 w.ws_xpixel = xpixel; 188 w.ws_xpixel = xpixel;
@@ -200,6 +217,10 @@ pty_setowner(struct passwd *pw, const char *tty)
200 fatal("stat(%.100s) failed: %.100s", tty, 217 fatal("stat(%.100s) failed: %.100s", tty,
201 strerror(errno)); 218 strerror(errno));
202 219
220#ifdef WITH_SELINUX
221 ssh_selinux_setup_pty(pw->pw_name, tty);
222#endif
223
203 if (st.st_uid != pw->pw_uid || st.st_gid != gid) { 224 if (st.st_uid != pw->pw_uid || st.st_gid != gid) {
204 if (chown(tty, pw->pw_uid, gid) < 0) { 225 if (chown(tty, pw->pw_uid, gid) < 0) {
205 if (errno == EROFS && 226 if (errno == EROFS &&
diff --git a/sshpty.h b/sshpty.h
index c0678de22..7fac622d9 100644
--- a/sshpty.h
+++ b/sshpty.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshpty.h,v 1.5 2004/05/08 00:01:37 deraadt Exp $ */ 1/* $OpenBSD: sshpty.h,v 1.10 2006/08/03 03:34:42 deraadt Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -14,17 +14,14 @@
14 * called by a name other than "ssh" or "Secure Shell". 14 * called by a name other than "ssh" or "Secure Shell".
15 */ 15 */
16 16
17#ifndef SSHPTY_H 17#include <termios.h>
18#define SSHPTY_H
19 18
20struct termios get_saved_tio(void); 19struct termios get_saved_tio(void);
21void leave_raw_mode(void); 20void leave_raw_mode(void);
22void enter_raw_mode(void); 21void enter_raw_mode(void);
23 22
24int pty_allocate(int *, int *, char *, int); 23int pty_allocate(int *, int *, char *, size_t);
25void pty_release(const char *); 24void pty_release(const char *);
26void pty_make_controlling_tty(int *, const char *); 25void pty_make_controlling_tty(int *, const char *);
27void pty_change_window_size(int, int, int, int, int); 26void pty_change_window_size(int, u_int, u_int, u_int, u_int);
28void pty_setowner(struct passwd *, const char *); 27void pty_setowner(struct passwd *, const char *);
29
30#endif /* SSHPTY_H */
diff --git a/sshtty.c b/sshtty.c
index 0b17c3e2d..04567669b 100644
--- a/sshtty.c
+++ b/sshtty.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: sshtty.c,v 1.12 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -35,10 +36,13 @@
35 */ 36 */
36 37
37#include "includes.h" 38#include "includes.h"
38RCSID("$OpenBSD: sshtty.c,v 1.6 2004/05/08 00:01:37 deraadt Exp $"); 39
40#include <sys/types.h>
41#include <stdio.h>
42#include <termios.h>
43#include <pwd.h>
39 44
40#include "sshpty.h" 45#include "sshpty.h"
41#include "log.h"
42 46
43static struct termios _saved_tio; 47static struct termios _saved_tio;
44static int _in_raw_mode = 0; 48static int _in_raw_mode = 0;
diff --git a/ttymodes.c b/ttymodes.c
index cf4c7d5c6..d8e2c553a 100644
--- a/ttymodes.c
+++ b/ttymodes.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: ttymodes.c,v 1.26 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -43,14 +44,19 @@
43 */ 44 */
44 45
45#include "includes.h" 46#include "includes.h"
46RCSID("$OpenBSD: ttymodes.c,v 1.19 2003/04/08 20:21:29 itojun Exp $"); 47
48#include <sys/types.h>
49
50#include <errno.h>
51#include <string.h>
52#include <termios.h>
53#include <stdarg.h>
47 54
48#include "packet.h" 55#include "packet.h"
49#include "log.h" 56#include "log.h"
50#include "ssh1.h" 57#include "ssh1.h"
51#include "compat.h" 58#include "compat.h"
52#include "buffer.h" 59#include "buffer.h"
53#include "bufaux.h"
54 60
55#define TTY_OP_END 0 61#define TTY_OP_END 0
56/* 62/*
@@ -384,7 +390,8 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
384 n_bytes += 4; 390 n_bytes += 4;
385 baud = packet_get_int(); 391 baud = packet_get_int();
386 debug3("tty_parse_modes: ispeed %d", baud); 392 debug3("tty_parse_modes: ispeed %d", baud);
387 if (failure != -1 && cfsetispeed(&tio, baud_to_speed(baud)) == -1) 393 if (failure != -1 &&
394 cfsetispeed(&tio, baud_to_speed(baud)) == -1)
388 error("cfsetispeed failed for %d", baud); 395 error("cfsetispeed failed for %d", baud);
389 break; 396 break;
390 397
@@ -394,7 +401,8 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
394 n_bytes += 4; 401 n_bytes += 4;
395 baud = packet_get_int(); 402 baud = packet_get_int();
396 debug3("tty_parse_modes: ospeed %d", baud); 403 debug3("tty_parse_modes: ospeed %d", baud);
397 if (failure != -1 && cfsetospeed(&tio, baud_to_speed(baud)) == -1) 404 if (failure != -1 &&
405 cfsetospeed(&tio, baud_to_speed(baud)) == -1)
398 error("cfsetospeed failed for %d", baud); 406 error("cfsetospeed failed for %d", baud);
399 break; 407 break;
400 408
@@ -442,11 +450,12 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
442 /* 450 /*
443 * It is a truly undefined opcode (160 to 255). 451 * It is a truly undefined opcode (160 to 255).
444 * We have no idea about its arguments. So we 452 * We have no idea about its arguments. So we
445 * must stop parsing. Note that some data may be 453 * must stop parsing. Note that some data
446 * left in the packet; hopefully there is nothing 454 * may be left in the packet; hopefully there
447 * more coming after the mode data. 455 * is nothing more coming after the mode data.
448 */ 456 */
449 logit("parse_tty_modes: unknown opcode %d", opcode); 457 logit("parse_tty_modes: unknown opcode %d",
458 opcode);
450 goto set; 459 goto set;
451 } 460 }
452 } else { 461 } else {
@@ -462,7 +471,8 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
462 (void) packet_get_int(); 471 (void) packet_get_int();
463 break; 472 break;
464 } else { 473 } else {
465 logit("parse_tty_modes: unknown opcode %d", opcode); 474 logit("parse_tty_modes: unknown opcode %d",
475 opcode);
466 goto set; 476 goto set;
467 } 477 }
468 } 478 }
diff --git a/ttymodes.h b/ttymodes.h
index 481282cd7..4d848fe3a 100644
--- a/ttymodes.h
+++ b/ttymodes.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ttymodes.h,v 1.13 2004/07/11 17:48:47 deraadt Exp $ */ 1/* $OpenBSD: ttymodes.h,v 1.14 2006/03/25 22:22:43 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
diff --git a/uidswap.c b/uidswap.c
index aab7064eb..91d878c30 100644
--- a/uidswap.c
+++ b/uidswap.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: uidswap.c,v 1.35 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -12,7 +13,15 @@
12 */ 13 */
13 14
14#include "includes.h" 15#include "includes.h"
15RCSID("$OpenBSD: uidswap.c,v 1.24 2003/05/29 16:58:45 deraadt Exp $"); 16
17#include <sys/param.h>
18#include <errno.h>
19#include <pwd.h>
20#include <string.h>
21#include <unistd.h>
22#include <stdarg.h>
23
24#include <grp.h>
16 25
17#include "log.h" 26#include "log.h"
18#include "uidswap.h" 27#include "uidswap.h"
@@ -77,7 +86,7 @@ temporarily_use_uid(struct passwd *pw)
77 fatal("getgroups: %.100s", strerror(errno)); 86 fatal("getgroups: %.100s", strerror(errno));
78 if (saved_egroupslen > 0) { 87 if (saved_egroupslen > 0) {
79 saved_egroups = xrealloc(saved_egroups, 88 saved_egroups = xrealloc(saved_egroups,
80 saved_egroupslen * sizeof(gid_t)); 89 saved_egroupslen, sizeof(gid_t));
81 if (getgroups(saved_egroupslen, saved_egroups) < 0) 90 if (getgroups(saved_egroupslen, saved_egroups) < 0)
82 fatal("getgroups: %.100s", strerror(errno)); 91 fatal("getgroups: %.100s", strerror(errno));
83 } else { /* saved_egroupslen == 0 */ 92 } else { /* saved_egroupslen == 0 */
@@ -96,7 +105,7 @@ temporarily_use_uid(struct passwd *pw)
96 fatal("getgroups: %.100s", strerror(errno)); 105 fatal("getgroups: %.100s", strerror(errno));
97 if (user_groupslen > 0) { 106 if (user_groupslen > 0) {
98 user_groups = xrealloc(user_groups, 107 user_groups = xrealloc(user_groups,
99 user_groupslen * sizeof(gid_t)); 108 user_groupslen, sizeof(gid_t));
100 if (getgroups(user_groupslen, user_groups) < 0) 109 if (getgroups(user_groupslen, user_groups) < 0)
101 fatal("getgroups: %.100s", strerror(errno)); 110 fatal("getgroups: %.100s", strerror(errno));
102 } else { /* user_groupslen == 0 */ 111 } else { /* user_groupslen == 0 */
@@ -123,6 +132,41 @@ temporarily_use_uid(struct passwd *pw)
123 strerror(errno)); 132 strerror(errno));
124} 133}
125 134
135void
136permanently_drop_suid(uid_t uid)
137{
138 uid_t old_uid = getuid();
139
140 debug("permanently_drop_suid: %u", (u_int)uid);
141#if defined(HAVE_SETRESUID) && !defined(BROKEN_SETRESUID)
142 if (setresuid(uid, uid, uid) < 0)
143 fatal("setresuid %u: %.100s", (u_int)uid, strerror(errno));
144#elif defined(HAVE_SETREUID) && !defined(BROKEN_SETREUID)
145 if (setreuid(uid, uid) < 0)
146 fatal("setreuid %u: %.100s", (u_int)uid, strerror(errno));
147#else
148# ifndef SETEUID_BREAKS_SETUID
149 if (seteuid(uid) < 0)
150 fatal("seteuid %u: %.100s", (u_int)uid, strerror(errno));
151# endif
152 if (setuid(uid) < 0)
153 fatal("setuid %u: %.100s", (u_int)uid, strerror(errno));
154#endif
155
156#ifndef HAVE_CYGWIN
157 /* Try restoration of UID if changed (test clearing of saved uid) */
158 if (old_uid != uid &&
159 (setuid(old_uid) != -1 || seteuid(old_uid) != -1))
160 fatal("%s: was able to restore old [e]uid", __func__);
161#endif
162
163 /* Verify UID drop was successful */
164 if (getuid() != uid || geteuid() != uid) {
165 fatal("%s: euid incorrect uid:%u euid:%u (should be %u)",
166 __func__, (u_int)getuid(), (u_int)geteuid(), (u_int)uid);
167 }
168}
169
126/* 170/*
127 * Restores to the original (privileged) uid. 171 * Restores to the original (privileged) uid.
128 */ 172 */
@@ -169,6 +213,8 @@ permanently_set_uid(struct passwd *pw)
169 uid_t old_uid = getuid(); 213 uid_t old_uid = getuid();
170 gid_t old_gid = getgid(); 214 gid_t old_gid = getgid();
171 215
216 if (pw == NULL)
217 fatal("permanently_set_uid: no user given");
172 if (temporarily_use_uid_effective) 218 if (temporarily_use_uid_effective)
173 fatal("permanently_set_uid: temporarily_use_uid effective"); 219 fatal("permanently_set_uid: temporarily_use_uid effective");
174 debug("permanently_set_uid: %u/%u", (u_int)pw->pw_uid, 220 debug("permanently_set_uid: %u/%u", (u_int)pw->pw_uid,
diff --git a/uidswap.h b/uidswap.h
index 0726980d0..1c1163d75 100644
--- a/uidswap.h
+++ b/uidswap.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: uidswap.h,v 1.9 2001/06/26 17:27:25 markus Exp $ */ 1/* $OpenBSD: uidswap.h,v 1.13 2006/08/03 03:34:42 deraadt Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -12,11 +12,7 @@
12 * called by a name other than "ssh" or "Secure Shell". 12 * called by a name other than "ssh" or "Secure Shell".
13 */ 13 */
14 14
15#ifndef UIDSWAP_H
16#define UIDSWAP_H
17
18void temporarily_use_uid(struct passwd *); 15void temporarily_use_uid(struct passwd *);
19void restore_uid(void); 16void restore_uid(void);
20void permanently_set_uid(struct passwd *); 17void permanently_set_uid(struct passwd *);
21 18void permanently_drop_suid(uid_t);
22#endif /* UIDSWAP_H */
diff --git a/uuencode.c b/uuencode.c
index 0a7c8d16a..a13949585 100644
--- a/uuencode.c
+++ b/uuencode.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: uuencode.c,v 1.24 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 * 4 *
@@ -23,7 +24,11 @@
23 */ 24 */
24 25
25#include "includes.h" 26#include "includes.h"
26RCSID("$OpenBSD: uuencode.c,v 1.17 2003/11/10 16:23:41 jakob Exp $"); 27
28#include <sys/types.h>
29#include <netinet/in.h>
30#include <resolv.h>
31#include <stdio.h>
27 32
28#include "xmalloc.h" 33#include "xmalloc.h"
29#include "uuencode.h" 34#include "uuencode.h"
@@ -58,9 +63,14 @@ uudecode(const char *src, u_char *target, size_t targsize)
58void 63void
59dump_base64(FILE *fp, u_char *data, u_int len) 64dump_base64(FILE *fp, u_char *data, u_int len)
60{ 65{
61 char *buf = xmalloc(2*len); 66 char *buf;
62 int i, n; 67 int i, n;
63 68
69 if (len > 65536) {
70 fprintf(fp, "dump_base64: len > 65536\n");
71 return;
72 }
73 buf = xmalloc(2*len);
64 n = uuencode(data, len, buf, 2*len); 74 n = uuencode(data, len, buf, 2*len);
65 for (i = 0; i < n; i++) { 75 for (i = 0; i < n; i++) {
66 fprintf(fp, "%c", buf[i]); 76 fprintf(fp, "%c", buf[i]);
diff --git a/uuencode.h b/uuencode.h
index 08e87c4bc..fec55b491 100644
--- a/uuencode.h
+++ b/uuencode.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: uuencode.h,v 1.10 2003/11/10 16:23:41 jakob Exp $ */ 1/* $OpenBSD: uuencode.h,v 1.13 2006/08/03 03:34:42 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -24,9 +24,6 @@
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27#ifndef UUENCODE_H
28#define UUENCODE_H
29int uuencode(const u_char *, u_int, char *, size_t); 27int uuencode(const u_char *, u_int, char *, size_t);
30int uudecode(const char *, u_char *, size_t); 28int uudecode(const char *, u_char *, size_t);
31void dump_base64(FILE *, u_char *, u_int); 29void dump_base64(FILE *, u_char *, u_int);
32#endif
diff --git a/version.h b/version.h
index d5fd0c6ce..0f4811120 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
1/* $OpenBSD: version.h,v 1.46 2006/02/01 11:27:22 markus Exp $ */ 1/* $OpenBSD: version.h,v 1.49 2007/03/06 10:13:14 djm Exp $ */
2 2
3#define SSH_VERSION "OpenSSH_4.3" 3#define SSH_VERSION "OpenSSH_4.6"
4 4
5#define SSH_PORTABLE "p2" 5#define SSH_PORTABLE "p1"
6#define SSH_RELEASE SSH_VERSION SSH_PORTABLE 6#define SSH_RELEASE SSH_VERSION SSH_PORTABLE
diff --git a/xmalloc.c b/xmalloc.c
index 99c6ac330..9985b4cc2 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: xmalloc.c,v 1.27 2006/08/03 03:34:42 deraadt Exp $ */
1/* 2/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -13,7 +14,12 @@
13 */ 14 */
14 15
15#include "includes.h" 16#include "includes.h"
16RCSID("$OpenBSD: xmalloc.c,v 1.16 2001/07/23 18:21:46 stevesk Exp $"); 17
18#include <sys/param.h>
19#include <stdarg.h>
20#include <stdio.h>
21#include <stdlib.h>
22#include <string.h>
17 23
18#include "xmalloc.h" 24#include "xmalloc.h"
19#include "log.h" 25#include "log.h"
@@ -32,18 +38,38 @@ xmalloc(size_t size)
32} 38}
33 39
34void * 40void *
35xrealloc(void *ptr, size_t new_size) 41xcalloc(size_t nmemb, size_t size)
42{
43 void *ptr;
44
45 if (size == 0 || nmemb == 0)
46 fatal("xcalloc: zero size");
47 if (SIZE_T_MAX / nmemb < size)
48 fatal("xcalloc: nmemb * size > SIZE_T_MAX");
49 ptr = calloc(nmemb, size);
50 if (ptr == NULL)
51 fatal("xcalloc: out of memory (allocating %lu bytes)",
52 (u_long)(size * nmemb));
53 return ptr;
54}
55
56void *
57xrealloc(void *ptr, size_t nmemb, size_t size)
36{ 58{
37 void *new_ptr; 59 void *new_ptr;
60 size_t new_size = nmemb * size;
38 61
39 if (new_size == 0) 62 if (new_size == 0)
40 fatal("xrealloc: zero size"); 63 fatal("xrealloc: zero size");
64 if (SIZE_T_MAX / nmemb < size)
65 fatal("xrealloc: nmemb * size > SIZE_T_MAX");
41 if (ptr == NULL) 66 if (ptr == NULL)
42 new_ptr = malloc(new_size); 67 new_ptr = malloc(new_size);
43 else 68 else
44 new_ptr = realloc(ptr, new_size); 69 new_ptr = realloc(ptr, new_size);
45 if (new_ptr == NULL) 70 if (new_ptr == NULL)
46 fatal("xrealloc: out of memory (new_size %lu bytes)", (u_long) new_size); 71 fatal("xrealloc: out of memory (new_size %lu bytes)",
72 (u_long) new_size);
47 return new_ptr; 73 return new_ptr;
48} 74}
49 75
@@ -66,3 +92,19 @@ xstrdup(const char *str)
66 strlcpy(cp, str, len); 92 strlcpy(cp, str, len);
67 return cp; 93 return cp;
68} 94}
95
96int
97xasprintf(char **ret, const char *fmt, ...)
98{
99 va_list ap;
100 int i;
101
102 va_start(ap, fmt);
103 i = vasprintf(ret, fmt, ap);
104 va_end(ap);
105
106 if (i < 0 || *ret == NULL)
107 fatal("xasprintf: could not allocate memory");
108
109 return (i);
110}
diff --git a/xmalloc.h b/xmalloc.h
index 7ac4b13d6..fb217a45c 100644
--- a/xmalloc.h
+++ b/xmalloc.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: xmalloc.h,v 1.9 2002/06/19 00:27:55 deraadt Exp $ */ 1/* $OpenBSD: xmalloc.h,v 1.13 2006/08/03 03:34:42 deraadt Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -16,12 +16,11 @@
16 * called by a name other than "ssh" or "Secure Shell". 16 * called by a name other than "ssh" or "Secure Shell".
17 */ 17 */
18 18
19#ifndef XMALLOC_H
20#define XMALLOC_H
21
22void *xmalloc(size_t); 19void *xmalloc(size_t);
23void *xrealloc(void *, size_t); 20void *xcalloc(size_t, size_t);
21void *xrealloc(void *, size_t, size_t);
24void xfree(void *); 22void xfree(void *);
25char *xstrdup(const char *); 23char *xstrdup(const char *);
26 24int xasprintf(char **, const char *, ...)
27#endif /* XMALLOC_H */ 25 __attribute__((__format__ (printf, 2, 3)))
26 __attribute__((__nonnull__ (2)));