summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog979
-rw-r--r--INSTALL6
-rw-r--r--Makefile.in42
-rw-r--r--PROTOCOL37
-rw-r--r--PROTOCOL.agent24
-rw-r--r--PROTOCOL.certkeys193
-rw-r--r--PROTOCOL.mux196
-rw-r--r--README4
-rw-r--r--README.smartcard93
-rw-r--r--addrmatch.c78
-rw-r--r--auth-krb5.c13
-rw-r--r--auth-options.c169
-rw-r--r--auth-options.h4
-rw-r--r--auth-rh-rsa.c4
-rw-r--r--auth-rhosts.c10
-rw-r--r--auth-rsa.c8
-rw-r--r--auth.c148
-rw-r--r--auth.h8
-rw-r--r--auth2-hostbased.c4
-rw-r--r--auth2-pubkey.c87
-rw-r--r--authfd.c24
-rw-r--r--authfd.h2
-rw-r--r--authfile.c83
-rw-r--r--authfile.h3
-rw-r--r--bufaux.c28
-rw-r--r--buffer.c8
-rw-r--r--buffer.h9
-rw-r--r--canohost.c20
-rw-r--r--channels.c279
-rw-r--r--channels.h23
-rw-r--r--clientloop.c75
-rw-r--r--clientloop.h12
-rwxr-xr-xconfig.guess149
-rw-r--r--config.h.in53
-rwxr-xr-xconfig.sub47
-rwxr-xr-xconfigure11726
-rw-r--r--configure.ac84
-rw-r--r--contrib/caldera/openssh.spec8
-rw-r--r--contrib/cygwin/Makefile15
-rw-r--r--contrib/gnome-ssh-askpass2.c2
-rw-r--r--contrib/redhat/openssh.spec8
-rw-r--r--contrib/suse/openssh.spec2
-rw-r--r--debian/changelog31
-rw-r--r--debian/patches/authorized-keys-man-symlink.patch2
-rw-r--r--debian/patches/banner-noslash.patch22
-rw-r--r--debian/patches/config-guess-sub.patch387
-rw-r--r--debian/patches/debian-banner.patch36
-rw-r--r--debian/patches/debian-config.patch8
-rw-r--r--debian/patches/doc-connection-sharing.patch2
-rw-r--r--debian/patches/gnome-ssh-askpass2-icon.patch2
-rw-r--r--debian/patches/gssapi-autoconf.patch6
-rw-r--r--debian/patches/gssapi-compat.patch2
-rw-r--r--debian/patches/gssapi-dump.patch2
-rw-r--r--debian/patches/gssapi.patch111
-rw-r--r--debian/patches/hurd-epfnosupport.patch2
-rw-r--r--debian/patches/keepalive-extensions.patch24
-rw-r--r--debian/patches/keyfile-debug.patch25
-rw-r--r--debian/patches/lintian-symlink-pickiness.patch4
-rw-r--r--debian/patches/no-constraint-fallback.patch52
-rw-r--r--debian/patches/oom-adjust.patch219
-rw-r--r--debian/patches/openbsd-docs.patch12
-rw-r--r--debian/patches/package-versioning.patch6
-rw-r--r--debian/patches/quieter-signals.patch2
-rw-r--r--debian/patches/selinux-autoconf.patch46
-rw-r--r--debian/patches/selinux-fix-chroot-directory.patch8
-rw-r--r--debian/patches/selinux-role.patch23
-rw-r--r--debian/patches/series11
-rw-r--r--debian/patches/shell-path.patch4
-rw-r--r--debian/patches/ssh-argv0.patch2
-rw-r--r--debian/patches/ssh-vulnkey.patch245
-rw-r--r--debian/patches/ssh1-keepalive.patch21
-rw-r--r--debian/patches/sshd-ignore-sighup.patch19
-rw-r--r--debian/patches/syslog-level-silent.patch26
-rw-r--r--debian/patches/user-group-modes.patch6
-rw-r--r--defines.h10
-rw-r--r--dh.c4
-rw-r--r--dns.c8
-rw-r--r--dns.h6
-rw-r--r--hostfile.c101
-rw-r--r--hostfile.h7
-rw-r--r--kex.c13
-rw-r--r--kex.h7
-rw-r--r--kexdhs.c19
-rw-r--r--kexgexs.c20
-rw-r--r--key.c613
-rw-r--r--key.h32
-rw-r--r--loginrec.c8
-rw-r--r--match.h4
-rw-r--r--mdoc2man.awk5
-rw-r--r--misc.c29
-rw-r--r--misc.h3
-rw-r--r--monitor.c20
-rw-r--r--monitor_fdpass.c23
-rw-r--r--monitor_wrap.c19
-rw-r--r--mux.c1851
-rw-r--r--myproposal.h6
-rw-r--r--nchan.c21
-rw-r--r--openbsd-compat/Makefile.in4
-rw-r--r--openbsd-compat/bsd-cygwin_util.c9
-rw-r--r--openbsd-compat/openbsd-compat.h10
-rw-r--r--openbsd-compat/openssl-compat.c3
-rw-r--r--openbsd-compat/port-aix.c25
-rw-r--r--openbsd-compat/port-aix.h6
-rw-r--r--openbsd-compat/port-linux.c140
-rw-r--r--openbsd-compat/port-linux.h9
-rw-r--r--openbsd-compat/pwcache.c114
-rw-r--r--openbsd-compat/readpassphrase.c78
-rwxr-xr-xopensshd.init.in2
-rw-r--r--pathnames.h7
-rw-r--r--pkcs11.h1357
-rw-r--r--platform.c24
-rw-r--r--platform.h7
-rw-r--r--readconf.c18
-rw-r--r--readconf.h4
-rw-r--r--regress/Makefile18
-rw-r--r--regress/addrmatch.sh11
-rw-r--r--regress/agent-pkcs11.sh69
-rw-r--r--regress/cert-hostkey.sh211
-rw-r--r--regress/cert-userkey.sh176
-rw-r--r--regress/cfgmatch.sh4
-rw-r--r--regress/cipher-speed.sh4
-rw-r--r--regress/forwarding.sh12
-rw-r--r--regress/keygen-convert.sh33
-rw-r--r--regress/multiplex.sh20
-rw-r--r--regress/portnum.sh34
-rw-r--r--regress/sftp-badcmds.sh16
-rw-r--r--regress/sftp-batch.sh10
-rw-r--r--regress/sftp-cmds.sh73
-rw-r--r--regress/sftp-glob.sh4
-rw-r--r--regress/sftp.sh6
-rw-r--r--regress/ssh-com-sftp.sh4
-rwxr-xr-xregress/ssh2putty.sh1
-rw-r--r--regress/test-exec.sh14
-rw-r--r--roaming.h8
-rw-r--r--roaming_client.c280
-rw-r--r--roaming_common.c57
-rw-r--r--roaming_serv.c31
-rw-r--r--scard-opensc.c532
-rw-r--r--scard.c571
-rw-r--r--scard.h39
-rw-r--r--scard/Makefile.in29
-rw-r--r--scard/Ssh.binbin600 -> 0 bytes
-rw-r--r--scard/Ssh.bin.uu17
-rw-r--r--scard/Ssh.java164
-rw-r--r--scp.04
-rw-r--r--scp.16
-rw-r--r--scp.c21
-rw-r--r--servconf.c57
-rw-r--r--servconf.h8
-rw-r--r--session.c106
-rw-r--r--sftp-client.c301
-rw-r--r--sftp-client.h21
-rw-r--r--sftp-common.c31
-rw-r--r--sftp-common.h4
-rw-r--r--sftp-server.017
-rw-r--r--sftp-server.825
-rw-r--r--sftp-server.c119
-rw-r--r--sftp.077
-rw-r--r--sftp.193
-rw-r--r--sftp.c858
-rw-r--r--ssh-add.029
-rw-r--r--ssh-add.132
-rw-r--r--ssh-add.c51
-rw-r--r--ssh-agent.019
-rw-r--r--ssh-agent.122
-rw-r--r--ssh-agent.c158
-rw-r--r--ssh-dss.c10
-rw-r--r--ssh-keygen.0181
-rw-r--r--ssh-keygen.1210
-rw-r--r--ssh-keygen.c636
-rw-r--r--ssh-keyscan.02
-rw-r--r--ssh-keyscan.14
-rw-r--r--ssh-keyscan.c2
-rw-r--r--ssh-keysign.c4
-rw-r--r--ssh-pkcs11-client.c238
-rw-r--r--ssh-pkcs11-helper.025
-rw-r--r--ssh-pkcs11-helper.843
-rw-r--r--ssh-pkcs11-helper.c372
-rw-r--r--ssh-pkcs11.c564
-rw-r--r--ssh-pkcs11.h20
-rw-r--r--ssh-rand-helper.c9
-rw-r--r--ssh-rsa.c10
-rw-r--r--ssh.056
-rw-r--r--ssh.169
-rw-r--r--ssh.c174
-rw-r--r--ssh2.h12
-rw-r--r--ssh_config3
-rw-r--r--ssh_config.034
-rw-r--r--ssh_config.540
-rw-r--r--sshconnect.c106
-rw-r--r--sshconnect2.c63
-rw-r--r--sshd.093
-rw-r--r--sshd.877
-rw-r--r--sshd.c177
-rw-r--r--sshd_config8
-rw-r--r--sshd_config.051
-rw-r--r--sshd_config.545
-rw-r--r--sshpty.h6
-rw-r--r--sshtty.c23
-rw-r--r--version.h4
200 files changed, 17418 insertions, 11241 deletions
diff --git a/ChangeLog b/ChangeLog
index b2df66023..d6e4a4a25 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,982 @@
120100307
2 - (djm) OpenBSD CVS Sync
3 - djm@cvs.openbsd.org 2010/03/07 22:16:01
4 [ssh-keygen.c]
5 make internal strptime string match strftime format;
6 suggested by vinschen AT redhat.com and markus@
7 - djm@cvs.openbsd.org 2010/03/08 00:28:55
8 [ssh-keygen.1]
9 document permit-agent-forwarding certificate constraint; patch from
10 stevesk@
11 - djm@cvs.openbsd.org 2010/03/07 22:01:32
12 [version.h]
13 openssh-5.4
14 - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
15 crank version numbers
16 - (djm) Release OpenSSH-5.4p1
17
1820100307
19 - (dtucker) [auth.c] Bug #1710: call setauthdb on AIX before getpwuid so that
20 it gets the passwd struct from the LAM that knows about the user which is
21 not necessarily the default. Patch from Alexandre Letourneau.
22 - (dtucker) [session.c] Bug #1567: move setpcred call to before chroot and
23 do not set real uid, since that's needed for the chroot, and will be set
24 by permanently_set_uid.
25 - (dtucker) [session.c] Also initialize creds to NULL for handing to
26 setpcred.
27 - (dtucker) OpenBSD CVS Sync
28 - dtucker@cvs.openbsd.org 2010/03/07 11:57:13
29 [auth-rhosts.c monitor.c monitor_wrap.c session.c auth-options.c sshd.c]
30 Hold authentication debug messages until after successful authentication.
31 Fixes an info leak of environment variables specified in authorized_keys,
32 reported by Jacob Appelbaum. ok djm@
33
3420100305
35 - OpenBSD CVS Sync
36 - jmc@cvs.openbsd.org 2010/03/04 12:51:25
37 [ssh.1 sshd_config.5]
38 tweak previous;
39 - djm@cvs.openbsd.org 2010/03/04 20:35:08
40 [ssh-keygen.1 ssh-keygen.c]
41 Add a -L flag to print the contents of a certificate; ok markus@
42 - jmc@cvs.openbsd.org 2010/03/04 22:52:40
43 [ssh-keygen.1]
44 fix Bk/Ek;
45 - djm@cvs.openbsd.org 2010/03/04 23:17:25
46 [sshd_config.5]
47 missing word; spotted by jmc@
48 - djm@cvs.openbsd.org 2010/03/04 23:19:29
49 [ssh.1 sshd.8]
50 move section on CA and revoked keys from ssh.1 to sshd.8's known hosts
51 format section and rework it a bit; requested by jmc@
52 - djm@cvs.openbsd.org 2010/03/04 23:27:25
53 [auth-options.c ssh-keygen.c]
54 "force-command" is not spelled "forced-command"; spotted by
55 imorgan AT nas.nasa.gov
56 - djm@cvs.openbsd.org 2010/03/05 02:58:11
57 [auth.c]
58 make the warning for a revoked key louder and more noticable
59 - jmc@cvs.openbsd.org 2010/03/05 06:50:35
60 [ssh.1 sshd.8]
61 tweak previous;
62 - jmc@cvs.openbsd.org 2010/03/05 08:31:20
63 [ssh.1]
64 document certificate authentication; help/ok djm
65 - djm@cvs.openbsd.org 2010/03/05 10:28:21
66 [ssh-add.1 ssh.1 ssh_config.5]
67 mention loading of certificate files from [private]-cert.pub when
68 they are present; feedback and ok jmc@
69 - (tim) [ssh-pkcs11.c] Fix "non-constant initializer" errors in older
70 compilers. OK djm@
71 - (djm) [ssh-rand-helper.c] declare optind, avoiding compilation failure
72 on some platforms
73 - (djm) [configure.ac] set -fno-strict-aliasing for gcc4; ok dtucker@
74
7520100304
76 - (djm) [ssh-keygen.c] Use correct local variable, instead of
77 maybe-undefined global "optarg"
78 - (djm) [contrib/redhat/openssh.spec] Replace obsolete BuildPreReq
79 on XFree86-devel with neutral /usr/include/X11/Xlib.h;
80 imorgan AT nas.nasa.gov in bz#1731
81 - (djm) [.cvsignore] Ignore ssh-pkcs11-helper
82 - (djm) [regress/Makefile] Cleanup sshd_proxy_orig
83 - OpenBSD CVS Sync
84 - djm@cvs.openbsd.org 2010/03/03 01:44:36
85 [auth-options.c key.c]
86 reject strings with embedded ASCII nul chars in certificate key IDs,
87 principal names and constraints
88 - djm@cvs.openbsd.org 2010/03/03 22:49:50
89 [sshd.8]
90 the authorized_keys option for CA keys is "cert-authority", not
91 "from=cert-authority". spotted by imorgan AT nas.nasa.gov
92 - djm@cvs.openbsd.org 2010/03/03 22:50:40
93 [PROTOCOL.certkeys]
94 s/similar same/similar/; from imorgan AT nas.nasa.gov
95 - djm@cvs.openbsd.org 2010/03/04 01:44:57
96 [key.c]
97 use buffer_get_string_ptr_ret() where we are checking the return
98 value explicitly instead of the fatal()-causing buffer_get_string_ptr()
99 - djm@cvs.openbsd.org 2010/03/04 10:36:03
100 [auth-rh-rsa.c auth-rsa.c auth.c auth.h auth2-hostbased.c auth2-pubkey.c]
101 [authfile.c authfile.h hostfile.c hostfile.h servconf.c servconf.h]
102 [ssh-keygen.c ssh.1 sshconnect.c sshd_config.5]
103 Add a TrustedUserCAKeys option to sshd_config to specify CA keys that
104 are trusted to authenticate users (in addition than doing it per-user
105 in authorized_keys).
106
107 Add a RevokedKeys option to sshd_config and a @revoked marker to
108 known_hosts to allow keys to me revoked and banned for user or host
109 authentication.
110
111 feedback and ok markus@
112 - djm@cvs.openbsd.org 2010/03/03 00:47:23
113 [regress/cert-hostkey.sh regress/cert-userkey.sh]
114 add an extra test to ensure that authentication with the wrong
115 certificate fails as it should (and it does)
116 - djm@cvs.openbsd.org 2010/03/04 10:38:23
117 [regress/cert-hostkey.sh regress/cert-userkey.sh]
118 additional regression tests for revoked keys and TrustedUserCAKeys
119
12020100303
121 - (djm) [PROTOCOL.certkeys] Add RCS Ident
122 - OpenBSD CVS Sync
123 - jmc@cvs.openbsd.org 2010/02/26 22:09:28
124 [ssh-keygen.1 ssh.1 sshd.8]
125 tweak previous;
126 - otto@cvs.openbsd.org 2010/03/01 11:07:06
127 [ssh-add.c]
128 zap what seems to be a left-over debug message; ok markus@
129 - djm@cvs.openbsd.org 2010/03/02 23:20:57
130 [ssh-keygen.c]
131 POSIX strptime is stricter than OpenBSD's so do a little dance to
132 appease it.
133 - (djm) [regress/cert-userkey.sh] s/echo -n/echon/ here too
134
13520100302
136 - (tim) [config.guess config.sub] Bug 1722: Update to latest versions from
137 http://git.savannah.gnu.org/gitweb/ (2009-12-30 and 2010-01-22
138 respectively).
139
14020100301
141 - (dtucker) [regress/{cert-hostkey,cfgmatch,cipher-speed}.sh} Replace
142 "echo -n" with "echon" for portability.
143 - (dtucker) [openbsd-compat/port-linux.c] Make failure to write to the OOM
144 adjust log at verbose only, since according to cjwatson in bug #1470
145 some virtualization platforms don't allow writes.
146
14720100228
148 - (djm) [auth.c] On Cygwin, refuse usernames that have differences in
149 case from that matched in the system password database. On this
150 platform, passwords are stored case-insensitively, but sshd requires
151 exact case matching for Match blocks in sshd_config(5). Based on
152 a patch from vinschen AT redhat.com.
153 - (tim) [ssh-pkcs11-helper.c] Move declarations before calling functions
154 to make older compilers (gcc 2.95) happy.
155
15620100227
157 - (djm) [ssh-pkcs11-helper.c ] Ensure RNG is initialised and seeded
158 - (djm) [openbsd-compat/bsd-cygwin_util.c] Reduce the set of environment
159 variables copied into sshd child processes. From vinschen AT redhat.com
160
16120100226
162 - OpenBSD CVS Sync
163 - djm@cvs.openbsd.org 2010/02/26 20:29:54
164 [PROTOCOL PROTOCOL.agent PROTOCOL.certkeys addrmatch.c auth-options.c]
165 [auth-options.h auth.h auth2-pubkey.c authfd.c dns.c dns.h hostfile.c]
166 [hostfile.h kex.h kexdhs.c kexgexs.c key.c key.h match.h monitor.c]
167 [myproposal.h servconf.c servconf.h ssh-add.c ssh-agent.c ssh-dss.c]
168 [ssh-keygen.1 ssh-keygen.c ssh-rsa.c ssh.1 ssh.c ssh2.h sshconnect.c]
169 [sshconnect2.c sshd.8 sshd.c sshd_config.5]
170 Add support for certificate key types for users and hosts.
171
172 OpenSSH certificate key types are not X.509 certificates, but a much
173 simpler format that encodes a public key, identity information and
174 some validity constraints and signs it with a CA key. CA keys are
175 regular SSH keys. This certificate style avoids the attack surface
176 of X.509 certificates and is very easy to deploy.
177
178 Certified host keys allow automatic acceptance of new host keys
179 when a CA certificate is marked as trusted in ~/.ssh/known_hosts.
180 see VERIFYING HOST KEYS in ssh(1) for details.
181
182 Certified user keys allow authentication of users when the signing
183 CA key is marked as trusted in authorized_keys. See "AUTHORIZED_KEYS
184 FILE FORMAT" in sshd(8) for details.
185
186 Certificates are minted using ssh-keygen(1), documentation is in
187 the "CERTIFICATES" section of that manpage.
188
189 Documentation on the format of certificates is in the file
190 PROTOCOL.certkeys
191
192 feedback and ok markus@
193 - djm@cvs.openbsd.org 2010/02/26 20:33:21
194 [Makefile regress/cert-hostkey.sh regress/cert-userkey.sh]
195 regression tests for certified keys
196
19720100224
198 - (djm) [pkcs11.h ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c]
199 [ssh-pkcs11.h] Add $OpenBSD$ RCS idents so we can sync portable
200 - (djm) OpenBSD CVS Sync
201 - djm@cvs.openbsd.org 2010/02/11 20:37:47
202 [pathnames.h]
203 correct comment
204 - dtucker@cvs.openbsd.org 2009/11/09 04:20:04
205 [regress/Makefile]
206 add regression test for ssh-keygen pubkey conversions
207 - dtucker@cvs.openbsd.org 2010/01/11 02:53:44
208 [regress/forwarding.sh]
209 regress test for stdio forwarding
210 - djm@cvs.openbsd.org 2010/02/09 04:57:36
211 [regress/addrmatch.sh]
212 clean up droppings
213 - djm@cvs.openbsd.org 2010/02/09 06:29:02
214 [regress/Makefile]
215 turn on all the malloc(3) checking options when running regression
216 tests. this has caught a few bugs for me in the past; ok dtucker@
217 - djm@cvs.openbsd.org 2010/02/24 06:21:56
218 [regress/test-exec.sh]
219 wait for sshd to fully stop in cleanup() function; avoids races in tests
220 that do multiple start_sshd/cleanup cycles; "I hate pidfiles" deraadt@
221 - markus@cvs.openbsd.org 2010/02/08 10:52:47
222 [regress/agent-pkcs11.sh]
223 test for PKCS#11 support (currently disabled)
224 - (djm) [Makefile.in ssh-pkcs11-helper.8] Add manpage for PKCS#11 helper
225 - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
226 [contrib/suse/openssh.spec] Add PKCS#11 helper binary and manpage
227
22820100212
229 - (djm) OpenBSD CVS Sync
230 - djm@cvs.openbsd.org 2010/02/02 22:49:34
231 [bufaux.c]
232 make buffer_get_string_ret() really non-fatal in all cases (it was
233 using buffer_get_int(), which could fatal() on buffer empty);
234 ok markus dtucker
235 - markus@cvs.openbsd.org 2010/02/08 10:50:20
236 [pathnames.h readconf.c readconf.h scp.1 sftp.1 ssh-add.1 ssh-add.c]
237 [ssh-agent.c ssh-keygen.1 ssh-keygen.c ssh.1 ssh.c ssh_config.5]
238 replace our obsolete smartcard code with PKCS#11.
239 ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs-11v2-20.pdf
240 ssh(1) and ssh-keygen(1) use dlopen(3) directly to talk to a PKCS#11
241 provider (shared library) while ssh-agent(1) delegates PKCS#11 to
242 a forked a ssh-pkcs11-helper process.
243 PKCS#11 is currently a compile time option.
244 feedback and ok djm@; inspired by patches from Alon Bar-Lev
245 - jmc@cvs.openbsd.org 2010/02/08 22:03:05
246 [ssh-add.1 ssh-keygen.1 ssh.1 ssh.c]
247 tweak previous; ok markus
248 - djm@cvs.openbsd.org 2010/02/09 00:50:36
249 [ssh-agent.c]
250 fallout from PKCS#11: unbreak -D
251 - djm@cvs.openbsd.org 2010/02/09 00:50:59
252 [ssh-keygen.c]
253 fix -Wall
254 - djm@cvs.openbsd.org 2010/02/09 03:56:28
255 [buffer.c buffer.h]
256 constify the arguments to buffer_len, buffer_ptr and buffer_dump
257 - djm@cvs.openbsd.org 2010/02/09 06:18:46
258 [auth.c]
259 unbreak ChrootDirectory+internal-sftp by skipping check for executable
260 shell when chrooting; reported by danh AT wzrd.com; ok dtucker@
261 - markus@cvs.openbsd.org 2010/02/10 23:20:38
262 [ssh-add.1 ssh-keygen.1 ssh.1 ssh_config.5]
263 pkcs#11 is no longer optional; improve wording; ok jmc@
264 - jmc@cvs.openbsd.org 2010/02/11 13:23:29
265 [ssh.1]
266 libarary -> library;
267 - (djm) [INSTALL Makefile.in README.smartcard configure.ac scard-opensc.c]
268 [scard.c scard.h pkcs11.h scard/Makefile.in scard/Ssh.bin.uu scard/Ssh.java]
269 Remove obsolete smartcard support
270 - (djm) [ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c]
271 Make it compile on OSX
272 - (djm) [ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c]
273 Use ssh_get_progname to fill __progname
274 - (djm) [configure.ac] Enable PKCS#11 support only when we find a working
275 dlopen()
276
27720100210
278 - (djm) add -lselinux to LIBS before calling AC_CHECK_FUNCS for
279 getseuserbyname; patch from calebcase AT gmail.com via
280 cjwatson AT debian.org
281
28220100202
283 - (djm) OpenBSD CVS Sync
284 - djm@cvs.openbsd.org 2010/01/30 21:08:33
285 [sshd.8]
286 debug output goes to stderr, not "the system log"; ok markus dtucker
287 - djm@cvs.openbsd.org 2010/01/30 21:12:08
288 [channels.c]
289 fake local addr:port when stdio fowarding as some servers (Tectia at
290 least) validate that they are well-formed;
291 reported by imorgan AT nas.nasa.gov
292 ok dtucker
293
29420100130
295 - (djm) OpenBSD CVS Sync
296 - djm@cvs.openbsd.org 2010/01/28 00:21:18
297 [clientloop.c]
298 downgrade an error() to a debug() - this particular case can be hit in
299 normal operation for certain sequences of mux slave vs session closure
300 and is harmless
301 - djm@cvs.openbsd.org 2010/01/29 00:20:41
302 [sshd.c]
303 set FD_CLOEXEC on sock_in/sock_out; bz#1706 from jchadima AT redhat.com
304 ok dtucker@
305 - djm@cvs.openbsd.org 2010/01/29 20:16:17
306 [mux.c]
307 kill correct channel (was killing already-dead mux channel, not
308 its session channel)
309 - djm@cvs.openbsd.org 2010/01/30 02:54:53
310 [mux.c]
311 don't mark channel as read failed if it is already closing; suppresses
312 harmless error messages when connecting to SSH.COM Tectia server
313 report by imorgan AT nas.nasa.gov
314
31520100129
316 - (dtucker) [openbsd-compat/openssl-compat.c] Bug #1707: Call OPENSSL_config()
317 after registering the hardware engines, which causes the openssl.cnf file to
318 be processed. See OpenSSL's man page for OPENSSL_config(3) for details.
319 Patch from Solomon Peachy, ok djm@.
320
32120100128
322 - (djm) OpenBSD CVS Sync
323 - djm@cvs.openbsd.org 2010/01/26 02:15:20
324 [mux.c]
325 -Wuninitialized and remove a // comment; from portable
326 (Id sync only)
327 - djm@cvs.openbsd.org 2010/01/27 13:26:17
328 [mux.c]
329 fix bug introduced in mux rewrite:
330
331 In a mux master, when a socket to a mux slave closes before its server
332 session (as may occur when the slave has been signalled), gracefully
333 close the server session rather than deleting its channel immediately.
334 A server may have more messages on that channel to send (e.g. an exit
335 message) that will fatal() the client if they are sent to a channel that
336 has been prematurely deleted.
337
338 spotted by imorgan AT nas.nasa.gov
339 - djm@cvs.openbsd.org 2010/01/27 19:21:39
340 [sftp.c]
341 add missing "p" flag to getopt optstring;
342 bz#1704 from imorgan AT nas.nasa.gov
343
34420100126
345 - (djm) OpenBSD CVS Sync
346 - tedu@cvs.openbsd.org 2010/01/17 21:49:09
347 [ssh-agent.1]
348 Correct and clarify ssh-add's password asking behavior.
349 Improved text dtucker and ok jmc
350 - dtucker@cvs.openbsd.org 2010/01/18 01:50:27
351 [roaming_client.c]
352 s/long long unsigned/unsigned long long/, from tim via portable
353 (Id sync only, change already in portable)
354 - djm@cvs.openbsd.org 2010/01/26 01:28:35
355 [channels.c channels.h clientloop.c clientloop.h mux.c nchan.c ssh.c]
356 rewrite ssh(1) multiplexing code to a more sensible protocol.
357
358 The new multiplexing code uses channels for the listener and
359 accepted control sockets to make the mux master non-blocking, so
360 no stalls when processing messages from a slave.
361
362 avoid use of fatal() in mux master protocol parsing so an errant slave
363 process cannot take down a running master.
364
365 implement requesting of port-forwards over multiplexed sessions. Any
366 port forwards requested by the slave are added to those the master has
367 established.
368
369 add support for stdio forwarding ("ssh -W host:port ...") in mux slaves.
370
371 document master/slave mux protocol so that other tools can use it to
372 control a running ssh(1). Note: there are no guarantees that this
373 protocol won't be incompatibly changed (though it is versioned).
374
375 feedback Salvador Fandino, dtucker@
376 channel changes ok markus@
377
37820100122
379 - (tim) [configure.ac] Due to constraints in Windows Sockets in terms of
380 socket inheritance, reduce the default SO_RCVBUF/SO_SNDBUF buffer size
381 in Cygwin to 65535. Patch from Corinna Vinschen.
382
38320100117
384 - (tim) [configure.ac] OpenServer 5 needs BROKEN_GETADDRINFO too.
385 - (tim) [configure.ac] On SVR5 systems, use the C99-conforming functions
386 snprintf() and vsnprintf() named _xsnprintf() and _xvsnprintf().
387
38820100116
389 - (dtucker) [openbsd-compat/pwcache.c] Pull in includes.h and thus defines.h
390 so we correctly detect whether or not we have a native user_from_uid.
391 - (dtucker) [openbsd-compat/openbsd-compat.h] Prototypes for user_from_uid
392 and group_from_gid.
393 - (dtucker) [openbsd-compat/openbsd-compat.h] Fix prototypes, spotted by
394 Tim.
395 - (dtucker) OpenBSD CVS Sync
396 - markus@cvs.openbsd.org 2010/01/15 09:24:23
397 [sftp-common.c]
398 unused
399 - (dtucker) [openbsd-compat/pwcache.c] Shrink ifdef area to prevent unused
400 variable warnings.
401 - (dtucker) [openbsd-compat/openbsd-compat.h] Typo.
402 - (tim) [regress/portnum.sh] Shell portability fix.
403 - (tim) [configure.ac] Define BROKEN_GETADDRINFO on SVR5 systems. The native
404 getaddrinfo() is too old and limited for addr_pton() in addrmatch.c.
405 - (tim) [roaming_client.c] Use of <sys/queue.h> is not really portable so we
406 use "openbsd-compat/sys-queue.h". s/long long unsigned/unsigned long long/
407 to keep USL compilers happy.
408
40920100115
410 - (dtucker) OpenBSD CVS Sync
411 - jmc@cvs.openbsd.org 2010/01/13 12:48:34
412 [sftp.1 sftp.c]
413 sftp.1: put ls -h in the right place
414 sftp.c: as above, plus add -p to get/put, and shorten their arg names
415 to keep the help usage nicely aligned
416 ok djm
417 - djm@cvs.openbsd.org 2010/01/13 23:47:26
418 [auth.c]
419 when using ChrootDirectory, make sure we test for the existence of the
420 user's shell inside the chroot; bz #1679, patch from alex AT rtfs.hu;
421 ok dtucker
422 - dtucker@cvs.openbsd.org 2010/01/14 23:41:49
423 [sftp-common.c]
424 use user_from{uid,gid} to lookup up ids since it keeps a small cache.
425 ok djm
426 - guenther@cvs.openbsd.org 2010/01/15 00:05:22
427 [sftp.c]
428 Reset SIGTERM to SIG_DFL before executing ssh, so that even if sftp
429 inherited SIGTERM as ignored it will still be able to kill the ssh it
430 starts.
431 ok dtucker@
432 - (dtucker) [openbsd-compat/pwcache.c] Pull in pwcache.c from OpenBSD (no
433 changes yet but there will be some to come).
434 - (dtucker) [configure.ac openbsd-compat/{Makefile.in,pwcache.c} Portability
435 for pwcache. Also, added caching of negative hits.
436
43720100114
438 - (djm) [platform.h] Add missing prototype for
439 platform_krb5_get_principal_name
440
44120100113
442 - (dtucker) [monitor_fdpass.c] Wrap poll.h include in ifdefs.
443 - (dtucker) [openbsd-compat/readpassphrase.c] Resync against OpenBSD's r1.18:
444 missing restore of SIGTTOU and some whitespace.
445 - (dtucker) [openbsd-compat/readpassphrase.c] Update to OpenBSD's r1.21.
446 - (dtucker) [openbsd-compat/readpassphrase.c] Update to OpenBSD's r1.22.
447 Fixes bz #1590, where sometimes you could not interrupt a connection while
448 ssh was prompting for a passphrase or password.
449 - (dtucker) OpenBSD CVS Sync
450 - dtucker@cvs.openbsd.org 2010/01/13 00:19:04
451 [sshconnect.c auth.c]
452 Fix a couple of typos/mispellings in comments
453 - dtucker@cvs.openbsd.org 2010/01/13 01:10:56
454 [key.c]
455 Ignore and log any Protocol 1 keys where the claimed size is not equal to
456 the actual size. Noted by Derek Martin, ok djm@
457 - dtucker@cvs.openbsd.org 2010/01/13 01:20:20
458 [canohost.c ssh-keysign.c sshconnect2.c]
459 Make HostBased authentication work with a ProxyCommand. bz #1569, patch
460 from imorgan at nas nasa gov, ok djm@
461 - djm@cvs.openbsd.org 2010/01/13 01:40:16
462 [sftp.c sftp-server.c sftp.1 sftp-common.c sftp-common.h]
463 support '-h' (human-readable units) for sftp's ls command, just like
464 ls(1); ok dtucker@
465 - djm@cvs.openbsd.org 2010/01/13 03:48:13
466 [servconf.c servconf.h sshd.c]
467 avoid run-time failures when specifying hostkeys via a relative
468 path by prepending the cwd in these cases; bz#1290; ok dtucker@
469 - djm@cvs.openbsd.org 2010/01/13 04:10:50
470 [sftp.c]
471 don't append a space after inserting a completion of a directory (i.e.
472 a path ending in '/') for a slightly better user experience; ok dtucker@
473 - (dtucker) [sftp-common.c] Wrap include of util.h in an ifdef.
474 - (tim) [defines.h] openbsd-compat/readpassphrase.c now needs _NSIG.
475 feedback and ok dtucker@
476
47720100112
478 - (dtucker) OpenBSD CVS Sync
479 - dtucker@cvs.openbsd.org 2010/01/11 01:39:46
480 [ssh_config channels.c ssh.1 channels.h ssh.c]
481 Add a 'netcat mode' (ssh -W). This connects stdio on the client to a
482 single port forward on the server. This allows, for example, using ssh as
483 a ProxyCommand to route connections via intermediate servers.
484 bz #1618, man page help from jmc@, ok markus@
485 - dtucker@cvs.openbsd.org 2010/01/11 04:46:45
486 [authfile.c sshconnect2.c]
487 Do not prompt for a passphrase if we fail to open a keyfile, and log the
488 reason the open failed to debug.
489 bz #1693, found by tj AT castaglia org, ok djm@
490 - djm@cvs.openbsd.org 2010/01/11 10:51:07
491 [ssh-keygen.c]
492 when converting keys, truncate key comments at 72 chars as per RFC4716;
493 bz#1630 reported by tj AT castaglia.org; ok markus@
494 - dtucker@cvs.openbsd.org 2010/01/12 00:16:47
495 [authfile.c]
496 Fix bug introduced in r1.78 (incorrect brace location) that broke key auth.
497 Patch from joachim joachimschipper nl.
498 - djm@cvs.openbsd.org 2010/01/12 00:58:25
499 [monitor_fdpass.c]
500 avoid spinning when fd passing on nonblocking sockets by calling poll()
501 in the EINTR/EAGAIN path, much like we do in atomicio; ok dtucker@
502 - djm@cvs.openbsd.org 2010/01/12 00:59:29
503 [roaming_common.c]
504 delete with extreme prejudice a debug() that fired with every keypress;
505 ok dtucker deraadt
506 - dtucker@cvs.openbsd.org 2010/01/12 01:31:05
507 [session.c]
508 Do not allow logins if /etc/nologin exists but is not readable by the user
509 logging in. Noted by Jan.Pechanec at Sun, ok djm@ deraadt@
510 - djm@cvs.openbsd.org 2010/01/12 01:36:08
511 [buffer.h bufaux.c]
512 add a buffer_get_string_ptr_ret() that does the same as
513 buffer_get_string_ptr() but does not fatal() on error; ok dtucker@
514 - dtucker@cvs.openbsd.org 2010/01/12 08:33:17
515 [session.c]
516 Add explicit stat so we reliably detect nologin with bad perms.
517 ok djm markus
518
51920100110
520 - (dtucker) [configure.ac misc.c readconf.c servconf.c ssh-keyscan.c]
521 Remove hacks add for RoutingDomain in preparation for its removal.
522 - (dtucker) OpenBSD CVS Sync
523 - dtucker@cvs.openbsd.org 2010/01/09 23:04:13
524 [channels.c ssh.1 servconf.c sshd_config.5 sshd.c channels.h servconf.h
525 ssh-keyscan.1 ssh-keyscan.c readconf.c sshconnect.c misc.c ssh.c
526 readconf.h scp.1 sftp.1 ssh_config.5 misc.h]
527 Remove RoutingDomain from ssh since it's now not needed. It can be
528 replaced with "route exec" or "nc -V" as a proxycommand. "route exec"
529 also ensures that trafic such as DNS lookups stays withing the specified
530 routingdomain. For example (from reyk):
531 # route -T 2 exec /usr/sbin/sshd
532 or inherited from the parent process
533 $ route -T 2 exec sh
534 $ ssh 10.1.2.3
535 ok deraadt@ markus@ stevesk@ reyk@
536 - dtucker@cvs.openbsd.org 2010/01/10 03:51:17
537 [servconf.c]
538 Add ChrootDirectory to sshd.c test-mode output
539 - dtucker@cvs.openbsd.org 2010/01/10 07:15:56
540 [auth.c]
541 Output a debug if we can't open an existing keyfile. bz#1694, ok djm@
542
54320100109
544 - (dtucker) Wrap use of IPPROTO_IPV6 in an ifdef for platforms that don't
545 have it.
546 - (dtucker) [defines.h] define PRIu64 for platforms that don't have it.
547 - (dtucker) [roaming_client.c] Wrap inttypes.h in an ifdef.
548 - (dtucker) [loginrec.c] Use the SUSv3 specified name for the user name
549 when using utmpx. Patch from Ed Schouten.
550 - (dtucker) OpenBSD CVS Sync
551 - djm@cvs.openbsd.org 2010/01/09 00:20:26
552 [sftp-server.c sftp-server.8]
553 add a 'read-only' mode to sftp-server(8) that disables open in write mode
554 and all other fs-modifying protocol methods. bz#430 ok dtucker@
555 - djm@cvs.openbsd.org 2010/01/09 00:57:10
556 [PROTOCOL]
557 tweak language
558 - jmc@cvs.openbsd.org 2010/01/09 03:36:00
559 [sftp-server.8]
560 bad place to forget a comma...
561 - djm@cvs.openbsd.org 2010/01/09 05:04:24
562 [mux.c sshpty.h clientloop.c sshtty.c]
563 quell tc[gs]etattr warnings when forcing a tty (ssh -tt), since we
564 usually don't actually have a tty to read/set; bz#1686 ok dtucker@
565 - dtucker@cvs.openbsd.org 2010/01/09 05:17:00
566 [roaming_client.c]
567 Remove a PRIu64 format string that snuck in with roaming. ok djm@
568 - dtucker@cvs.openbsd.org 2010/01/09 11:13:02
569 [sftp.c]
570 Prevent sftp from derefing a null pointer when given a "-" without a
571 command. Also, allow whitespace to follow a "-". bz#1691, path from
572 Colin Watson via Debian. ok djm@ deraadt@
573 - dtucker@cvs.openbsd.org 2010/01/09 11:17:56
574 [sshd.c]
575 Afer sshd receives a SIGHUP, ignore subsequent HUPs while sshd re-execs
576 itself. Prevents two HUPs in quick succession from resulting in sshd
577 dying. bz#1692, patch from Colin Watson via Ubuntu.
578 - (dtucker) [defines.h] Remove now-undeeded PRIu64 define.
579
58020100108
581 - (dtucker) OpenBSD CVS Sync
582 - andreas@cvs.openbsd.org 2009/10/24 11:11:58
583 [roaming.h]
584 Declarations needed for upcoming changes.
585 ok markus@
586 - andreas@cvs.openbsd.org 2009/10/24 11:13:54
587 [sshconnect2.c kex.h kex.c]
588 Let the client detect if the server supports roaming by looking
589 for the resume@appgate.com kex algorithm.
590 ok markus@
591 - andreas@cvs.openbsd.org 2009/10/24 11:15:29
592 [clientloop.c]
593 client_loop() must detect if the session has been suspended and resumed,
594 and take appropriate action in that case.
595 From Martin Forssen, maf at appgate dot com
596 - andreas@cvs.openbsd.org 2009/10/24 11:19:17
597 [ssh2.h]
598 Define the KEX messages used when resuming a suspended connection.
599 ok markus@
600 - andreas@cvs.openbsd.org 2009/10/24 11:22:37
601 [roaming_common.c]
602 Do the actual suspend/resume in the client. This won't be useful until
603 the server side supports roaming.
604 Most code from Martin Forssen, maf at appgate dot com. Some changes by
605 me and markus@
606 ok markus@
607 - andreas@cvs.openbsd.org 2009/10/24 11:23:42
608 [ssh.c]
609 Request roaming to be enabled if UseRoaming is true and the server
610 supports it.
611 ok markus@
612 - reyk@cvs.openbsd.org 2009/10/28 16:38:18
613 [ssh_config.5 sshd.c misc.h ssh-keyscan.1 readconf.h sshconnect.c
614 channels.c channels.h servconf.h servconf.c ssh.1 ssh-keyscan.c scp.1
615 sftp.1 sshd_config.5 readconf.c ssh.c misc.c]
616 Allow to set the rdomain in ssh/sftp/scp/sshd and ssh-keyscan.
617 ok markus@
618 - jmc@cvs.openbsd.org 2009/10/28 21:45:08
619 [sshd_config.5 sftp.1]
620 tweak previous;
621 - djm@cvs.openbsd.org 2009/11/10 02:56:22
622 [ssh_config.5]
623 explain the constraints on LocalCommand some more so people don't
624 try to abuse it.
625 - djm@cvs.openbsd.org 2009/11/10 02:58:56
626 [sshd_config.5]
627 clarify that StrictModes does not apply to ChrootDirectory. Permissions
628 and ownership are always checked when chrooting. bz#1532
629 - dtucker@cvs.openbsd.org 2009/11/10 04:30:45
630 [sshconnect2.c channels.c sshconnect.c]
631 Set close-on-exec on various descriptors so they don't get leaked to
632 child processes. bz #1643, patch from jchadima at redhat, ok deraadt.
633 - markus@cvs.openbsd.org 2009/11/11 21:37:03
634 [channels.c channels.h]
635 fix race condition in x11/agent channel allocation: don't read after
636 the end of the select read/write fdset and make sure a reused FD
637 is not touched before the pre-handlers are called.
638 with and ok djm@
639 - djm@cvs.openbsd.org 2009/11/17 05:31:44
640 [clientloop.c]
641 fix incorrect exit status when multiplexing and channel ID 0 is recycled
642 bz#1570 reported by peter.oliver AT eon-is.co.uk; ok dtucker
643 - djm@cvs.openbsd.org 2009/11/19 23:39:50
644 [session.c]
645 bz#1606: error when an attempt is made to connect to a server
646 with ForceCommand=internal-sftp with a shell session (i.e. not a
647 subsystem session). Avoids stuck client when attempting to ssh to such a
648 service. ok dtucker@
649 - dtucker@cvs.openbsd.org 2009/11/20 00:15:41
650 [session.c]
651 Warn but do not fail if stat()ing the subsystem binary fails. This helps
652 with chrootdirectory+forcecommand=sftp-server and restricted shells.
653 bz #1599, ok djm.
654 - djm@cvs.openbsd.org 2009/11/20 00:54:01
655 [sftp.c]
656 bz#1588 change "Connecting to host..." message to "Connected to host."
657 and delay it until after the sftp protocol connection has been established.
658 Avoids confusing sequence of messages when the underlying ssh connection
659 experiences problems. ok dtucker@
660 - dtucker@cvs.openbsd.org 2009/11/20 00:59:36
661 [sshconnect2.c]
662 Use the HostKeyAlias when prompting for passwords. bz#1039, ok djm@
663 - djm@cvs.openbsd.org 2009/11/20 03:24:07
664 [misc.c]
665 correct off-by-one in percent_expand(): we would fatal() when trying
666 to expand EXPAND_MAX_KEYS, allowing only EXPAND_MAX_KEYS-1 to actually
667 work. Note that nothing in OpenSSH actually uses close to this limit at
668 present. bz#1607 from Jan.Pechanec AT Sun.COM
669 - halex@cvs.openbsd.org 2009/11/22 13:18:00
670 [sftp.c]
671 make passing of zero-length arguments to ssh safe by
672 passing "-<switch>" "<value>" rather than "-<switch><value>"
673 ok dtucker@, guenther@, djm@
674 - dtucker@cvs.openbsd.org 2009/12/06 23:41:15
675 [sshconnect2.c]
676 zap unused variable and strlen; from Steve McClellan, ok djm
677 - djm@cvs.openbsd.org 2009/12/06 23:53:45
678 [roaming_common.c]
679 use socklen_t for getsockopt optlen parameter; reported by
680 Steve.McClellan AT radisys.com, ok dtucker@
681 - dtucker@cvs.openbsd.org 2009/12/06 23:53:54
682 [sftp.c]
683 fix potential divide-by-zero in sftp's "df" output when talking to a server
684 that reports zero files on the filesystem (Unix filesystems always have at
685 least the root inode). From Steve McClellan at radisys, ok djm@
686 - markus@cvs.openbsd.org 2009/12/11 18:16:33
687 [key.c]
688 switch from 35 to the more common value of RSA_F4 == (2**16)+1 == 65537
689 for the RSA public exponent; discussed with provos; ok djm@
690 - guenther@cvs.openbsd.org 2009/12/20 07:28:36
691 [ssh.c sftp.c scp.c]
692 When passing user-controlled options with arguments to other programs,
693 pass the option and option argument as separate argv entries and
694 not smashed into one (e.g., as -l foo and not -lfoo). Also, always
695 pass a "--" argument to stop option parsing, so that a positional
696 argument that starts with a '-' isn't treated as an option. This
697 fixes some error cases as well as the handling of hostnames and
698 filenames that start with a '-'.
699 Based on a diff by halex@
700 ok halex@ djm@ deraadt@
701 - djm@cvs.openbsd.org 2009/12/20 23:20:40
702 [PROTOCOL]
703 fix an incorrect magic number and typo in PROTOCOL; bz#1688
704 report and fix from ueno AT unixuser.org
705 - stevesk@cvs.openbsd.org 2009/12/25 19:40:21
706 [readconf.c servconf.c misc.h ssh-keyscan.c misc.c]
707 validate routing domain is in range 0-RT_TABLEID_MAX.
708 'Looks right' deraadt@
709 - stevesk@cvs.openbsd.org 2009/12/29 16:38:41
710 [sshd_config.5 readconf.c ssh_config.5 scp.1 servconf.c sftp.1 ssh.1]
711 Rename RDomain config option to RoutingDomain to be more clear and
712 consistent with other options.
713 NOTE: if you currently use RDomain in the ssh client or server config,
714 or ssh/sshd -o, you must update to use RoutingDomain.
715 ok markus@ djm@
716 - jmc@cvs.openbsd.org 2009/12/29 18:03:32
717 [sshd_config.5 ssh_config.5]
718 sort previous;
719 - dtucker@cvs.openbsd.org 2010/01/04 01:45:30
720 [sshconnect2.c]
721 Don't escape backslashes in the SSH2 banner. bz#1533, patch from
722 Michal Gorny via Gentoo.
723 - djm@cvs.openbsd.org 2010/01/04 02:03:57
724 [sftp.c]
725 Implement tab-completion of commands, local and remote filenames for sftp.
726 Hacked on and off for some time by myself, mouring, Carlos Silva (via 2009
727 Google Summer of Code) and polished to a fine sheen by myself again.
728 It should deal more-or-less correctly with the ikky corner-cases presented
729 by quoted filenames, but the UI could still be slightly improved.
730 In particular, it is quite slow for remote completion on large directories.
731 bz#200; ok markus@
732 - djm@cvs.openbsd.org 2010/01/04 02:25:15
733 [sftp-server.c]
734 bz#1566 don't unnecessarily dup() in and out fds for sftp-server;
735 ok markus@
736 - dtucker@cvs.openbsd.org 2010/01/08 21:50:49
737 [sftp.c]
738 Fix two warnings: possibly used unitialized and use a nul byte instead of
739 NULL pointer. ok djm@
740 - (dtucker) [Makefile.in added roaming_client.c roaming_serv.c] Import new
741 files for roaming and add to Makefile.
742 - (dtucker) [Makefile.in] .c files do not belong in the OBJ lines.
743 - (dtucker) [sftp.c] ifdef out the sftp completion bits for platforms that
744 don't have libedit.
745 - (dtucker) [configure.ac misc.c readconf.c servconf.c ssh-keyscan.c] Make
746 RoutingDomain an unsupported option on platforms that don't have it.
747 - (dtucker) [sftp.c] Expand ifdef for libedit to cover complete_is_remote
748 too.
749 - (dtucker) [misc.c] Move the routingdomain ifdef to allow the socket to
750 be created.
751 - (dtucker] [misc.c] Shrink the area covered by USE_ROUTINGDOMAIN more
752 to eliminate an unused variable warning.
753 - (dtucker) [roaming_serv.c] Include includes.h for u_intXX_t types.
754
75520091226
756 - (tim) [contrib/cygwin/Makefile] Install ssh-copy-id and ssh-copy-id.1
757 Gzip all man pages. Patch from Corinna Vinschen.
758
75920091221
760 - (dtucker) [auth-krb5.c platform.{c,h} openbsd-compat/port-aix.{c,h}]
761 Bug #1583: Use system's kerberos principal name on AIX if it's available.
762 Based on a patch from and tested by Miguel Sanders
763
76420091208
765 - (dtucker) Bug #1470: Disable OOM-killing of the listening sshd on Linux,
766 based on a patch from Vaclav Ovsik and Colin Watson. ok djm.
767
76820091207
769 - (dtucker) Bug #1160: use pkg-config for opensc config if it's available.
770 Tested by Martin Paljak.
771 - (dtucker) Bug #1677: add conditionals around the source for ssh-askpass.
772
77320091121
774 - (tim) [opensshd.init.in] If PidFile is set in sshd_config, use it.
775 Bug 1628. OK dtucker@
776
77720091120
778 - (djm) [ssh-rand-helper.c] Print error and usage() when passed command-
779 line arguments as none are supported. Exit when passed unrecognised
780 commandline flags. bz#1568 from gson AT araneus.fi
781
78220091118
783 - (djm) [channels.c misc.c misc.h sshd.c] add missing setsockopt() to
784 set IPV6_V6ONLY for local forwarding with GatwayPorts=yes. Unify
785 setting IPV6_V6ONLY behind a new function misc.c:sock_set_v6only()
786 bz#1648, report and fix from jan.kratochvil AT redhat.com
787 - (djm) [contrib/gnome-ssh-askpass2.c] Make askpass dialog desktop-modal.
788 bz#1645, patch from jchadima AT redhat.com
789
79020091107
791 - (dtucker) [authfile.c] Fall back to 3DES for the encryption of private
792 keys when built with OpenSSL versions that don't do AES.
793
79420091105
795 - (dtucker) [authfile.c] Add OpenSSL compat header so this still builds with
796 older versions of OpenSSL.
797
79820091024
799 - (dtucker) OpenBSD CVS Sync
800 - djm@cvs.openbsd.org 2009/10/11 23:03:15
801 [hostfile.c]
802 mention the host name that we are looking for in check_host_in_hostfile()
803 - sobrado@cvs.openbsd.org 2009/10/17 12:10:39
804 [sftp-server.c]
805 sort flags.
806 - sobrado@cvs.openbsd.org 2009/10/22 12:35:53
807 [ssh.1 ssh-agent.1 ssh-add.1]
808 use the UNIX-related macros (.At and .Ux) where appropriate.
809 ok jmc@
810 - sobrado@cvs.openbsd.org 2009/10/22 15:02:12
811 [ssh-agent.1 ssh-add.1 ssh.1]
812 write UNIX-domain in a more consistent way; while here, replace a
813 few remaining ".Tn UNIX" macros with ".Ux" ones.
814 pointed out by ratchov@, thanks!
815 ok jmc@
816 - djm@cvs.openbsd.org 2009/10/22 22:26:13
817 [authfile.c]
818 switch from 3DES to AES-128 for encryption of passphrase-protected
819 SSH protocol 2 private keys; ok several
820 - djm@cvs.openbsd.org 2009/10/23 01:57:11
821 [sshconnect2.c]
822 disallow a hostile server from checking jpake auth by sending an
823 out-of-sequence success message. (doesn't affect code enabled by default)
824 - dtucker@cvs.openbsd.org 2009/10/24 00:48:34
825 [ssh-keygen.1]
826 ssh-keygen now uses AES-128 for private keys
827 - (dtucker) [mdoc2man.awk] Teach it to understand the .Ux macro.
828 - (dtucker) [session.c openbsd-compat/port-linux.{c,h}] Bug #1637: if selinux
829 is enabled set the security context to "sftpd_t" before running the
830 internal sftp server Based on a patch from jchadima at redhat.
831
83220091011
833 - (dtucker) [configure.ac sftp-client.c] Remove the gyrations required for
834 dirent d_type and DTTOIF as we've switched OpenBSD to the more portable
835 lstat.
836 - (dtucker) OpenBSD CVS Sync
837 - markus@cvs.openbsd.org 2009/10/08 14:03:41
838 [sshd_config readconf.c ssh_config.5 servconf.c sshd_config.5]
839 disable protocol 1 by default (after a transition period of about 10 years)
840 ok deraadt
841 - jmc@cvs.openbsd.org 2009/10/08 20:42:12
842 [sshd_config.5 ssh_config.5 sshd.8 ssh.1]
843 some tweaks now that protocol 1 is not offered by default; ok markus
844 - dtucker@cvs.openbsd.org 2009/10/11 10:41:26
845 [sftp-client.c]
846 d_type isn't portable so use lstat to get dirent modes. Suggested by and
847 "looks sane" deraadt@
848 - markus@cvs.openbsd.org 2009/10/08 18:04:27
849 [regress/test-exec.sh]
850 re-enable protocol v1 for the tests.
851
85220091007
853 - (dtucker) OpenBSD CVS Sync
854 - djm@cvs.openbsd.org 2009/08/12 00:13:00
855 [sftp.c sftp.1]
856 support most of scp(1)'s commandline arguments in sftp(1), as a first
857 step towards making sftp(1) a drop-in replacement for scp(1).
858 One conflicting option (-P) has not been changed, pending further
859 discussion.
860 Patch from carlosvsilvapt@gmail.com as part of his work in the
861 Google Summer of Code
862 - jmc@cvs.openbsd.org 2009/08/12 06:31:42
863 [sftp.1]
864 sort options;
865 - djm@cvs.openbsd.org 2009/08/13 01:11:19
866 [sftp.1 sftp.c]
867 Swizzle options: "-P sftp_server_path" moves to "-D sftp_server_path",
868 add "-P port" to match scp(1). Fortunately, the -P option is only really
869 used by our regression scripts.
870 part of larger patch from carlosvsilvapt@gmail.com for his Google Summer
871 of Code work; ok deraadt markus
872 - jmc@cvs.openbsd.org 2009/08/13 13:39:54
873 [sftp.1 sftp.c]
874 sync synopsis and usage();
875 - djm@cvs.openbsd.org 2009/08/14 18:17:49
876 [sftp-client.c]
877 make the "get_handle: ..." error messages vaguely useful by allowing
878 callers to specify their own error message strings.
879 - fgsch@cvs.openbsd.org 2009/08/15 18:56:34
880 [auth.h]
881 remove unused define. markus@ ok.
882 (Id sync only, Portable still uses this.)
883 - dtucker@cvs.openbsd.org 2009/08/16 23:29:26
884 [sshd_config.5]
885 Add PubkeyAuthentication to the list allowed in a Match block (bz #1577)
886 - djm@cvs.openbsd.org 2009/08/18 18:36:21
887 [sftp-client.h sftp.1 sftp-client.c sftp.c]
888 recursive transfer support for get/put and on the commandline
889 work mostly by carlosvsilvapt@gmail.com for the Google Summer of Code
890 with some tweaks by me; "go for it" deraadt@
891 - djm@cvs.openbsd.org 2009/08/18 21:15:59
892 [sftp.1]
893 fix "get" command usage, spotted by jmc@
894 - jmc@cvs.openbsd.org 2009/08/19 04:56:03
895 [sftp.1]
896 ether -> either;
897 - dtucker@cvs.openbsd.org 2009/08/20 23:54:28
898 [mux.c]
899 subsystem_flag is defined in ssh.c so it's extern; ok djm
900 - djm@cvs.openbsd.org 2009/08/27 17:28:52
901 [sftp-server.c]
902 allow setting an explicit umask on the commandline to override whatever
903 default the user has. bz#1229; ok dtucker@ deraadt@ markus@
904 - djm@cvs.openbsd.org 2009/08/27 17:33:49
905 [ssh-keygen.c]
906 force use of correct hash function for random-art signature display
907 as it was inheriting the wrong one when bubblebabble signatures were
908 activated; bz#1611 report and patch from fwojcik+openssh AT besh.com;
909 ok markus@
910 - djm@cvs.openbsd.org 2009/08/27 17:43:00
911 [sftp-server.8]
912 allow setting an explicit umask on the commandline to override whatever
913 default the user has. bz#1229; ok dtucker@ deraadt@ markus@
914 - djm@cvs.openbsd.org 2009/08/27 17:44:52
915 [authfd.c ssh-add.c authfd.h]
916 Do not fall back to adding keys without contraints (ssh-add -c / -t ...)
917 when the agent refuses the constrained add request. This was a useful
918 migration measure back in 2002 when constraints were new, but just
919 adds risk now.
920 bz #1612, report and patch from dkg AT fifthhorseman.net; ok markus@
921 - djm@cvs.openbsd.org 2009/08/31 20:56:02
922 [sftp-server.c]
923 check correct variable for error message, spotted by martynas@
924 - djm@cvs.openbsd.org 2009/08/31 21:01:29
925 [sftp-server.8]
926 document -e and -h; prodded by jmc@
927 - djm@cvs.openbsd.org 2009/09/01 14:43:17
928 [ssh-agent.c]
929 fix a race condition in ssh-agent that could result in a wedged or
930 spinning agent: don't read off the end of the allocated fd_sets, and
931 don't issue blocking read/write on agent sockets - just fall back to
932 select() on retriable read/write errors. bz#1633 reported and tested
933 by "noodle10000 AT googlemail.com"; ok dtucker@ markus@
934 - grunk@cvs.openbsd.org 2009/10/01 11:37:33
935 [dh.c]
936 fix a cast
937 ok djm@ markus@
938 - djm@cvs.openbsd.org 2009/10/06 04:46:40
939 [session.c]
940 bz#1596: fflush(NULL) before exec() to ensure that everying (motd
941 in particular) has made it out before the streams go away.
942 - djm@cvs.openbsd.org 2008/12/07 22:17:48
943 [regress/addrmatch.sh]
944 match string "passwordauthentication" only at start of line, not anywhere
945 in sshd -T output
946 - dtucker@cvs.openbsd.org 2009/05/05 07:51:36
947 [regress/multiplex.sh]
948 Always specify ssh_config for multiplex tests: prevents breakage caused
949 by options in ~/.ssh/config. From Dan Peterson.
950 - djm@cvs.openbsd.org 2009/08/13 00:57:17
951 [regress/Makefile]
952 regression test for port number parsing. written as part of the a2port
953 change that went into 5.2 but I forgot to commit it at the time...
954 - djm@cvs.openbsd.org 2009/08/13 01:11:55
955 [regress/sftp-batch.sh regress/sftp-badcmds.sh regress/sftp.sh
956 regress/sftp-cmds.sh regres/sftp-glob.sh]
957 date: 2009/08/13 01:11:19; author: djm; state: Exp; lines: +10 -7
958 Swizzle options: "-P sftp_server_path" moves to "-D sftp_server_path",
959 add "-P port" to match scp(1). Fortunately, the -P option is only really
960 used by our regression scripts.
961 part of larger patch from carlosvsilvapt@gmail.com for his Google Summer
962 of Code work; ok deraadt markus
963 - djm@cvs.openbsd.org 2009/08/20 18:43:07
964 [regress/ssh-com-sftp.sh]
965 fix one sftp -D ... => sftp -P ... conversion that I missed; from Carlos
966 Silva for Google Summer of Code
967 - dtucker@cvs.openbsd.org 2009/10/06 23:51:49
968 [regress/ssh2putty.sh]
969 Add OpenBSD tag to make syncs easier
970 - (dtucker) [regress/portnum.sh] Import new test.
971 - (dtucker) [configure.ac sftp-client.c] DTOTIF is in fs/ffs/dir.h on at
972 least dragonflybsd.
973 - (dtucker) d_type is not mandated by POSIX, so add fallback code using
974 stat(), needed on at least cygwin.
975
97620091002
977 - (djm) [Makefile.in] Mention readconf.o in ssh-keysign's make deps.
978 spotted by des AT des.no
979
120090926 98020090926
2 - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec] 981 - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
3 [contrib/suse/openssh.spec] Update for release 982 [contrib/suse/openssh.spec] Update for release
diff --git a/INSTALL b/INSTALL
index 001ebb666..09dfd666d 100644
--- a/INSTALL
+++ b/INSTALL
@@ -208,10 +208,6 @@ are installed.
208--with-4in6 Check for IPv4 in IPv6 mapped addresses and convert them to 208--with-4in6 Check for IPv4 in IPv6 mapped addresses and convert them to
209real (AF_INET) IPv4 addresses. Works around some quirks on Linux. 209real (AF_INET) IPv4 addresses. Works around some quirks on Linux.
210 210
211--with-opensc=DIR
212--with-sectok=DIR allows for OpenSC or sectok smartcard libraries to
213be used with OpenSSH. See 'README.smartcard' for more details.
214
215If you need to pass special options to the compiler or linker, you 211If you need to pass special options to the compiler or linker, you
216can specify these as environment variables before running ./configure. 212can specify these as environment variables before running ./configure.
217For example: 213For example:
@@ -266,4 +262,4 @@ Please refer to the "reporting bugs" section of the webpage at
266http://www.openssh.com/ 262http://www.openssh.com/
267 263
268 264
269$Id: INSTALL,v 1.84 2007/08/17 12:52:05 dtucker Exp $ 265$Id: INSTALL,v 1.85 2010/02/11 22:34:22 djm Exp $
diff --git a/Makefile.in b/Makefile.in
index 99f2ccb11..f7e05b22e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,4 +1,4 @@
1# $Id: Makefile.in,v 1.300 2009/08/28 00:47:38 djm Exp $ 1# $Id: Makefile.in,v 1.306 2010/02/24 07:18:51 djm Exp $
2 2
3# uncomment if you run a non bourne compatable shell. Ie. csh 3# uncomment if you run a non bourne compatable shell. Ie. csh
4#SHELL = @SH@ 4#SHELL = @SH@
@@ -25,6 +25,7 @@ SSH_PROGRAM=@bindir@/ssh
25ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass 25ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass
26SFTP_SERVER=$(libexecdir)/sftp-server 26SFTP_SERVER=$(libexecdir)/sftp-server
27SSH_KEYSIGN=$(libexecdir)/ssh-keysign 27SSH_KEYSIGN=$(libexecdir)/ssh-keysign
28SSH_PKCS11_HELPER=$(libexecdir)/ssh-pkcs11-helper
28RAND_HELPER=$(libexecdir)/ssh-rand-helper 29RAND_HELPER=$(libexecdir)/ssh-rand-helper
29SSH_DATADIR=$(datadir)/ssh 30SSH_DATADIR=$(datadir)/ssh
30PRIVSEP_PATH=@PRIVSEP_PATH@ 31PRIVSEP_PATH=@PRIVSEP_PATH@
@@ -36,6 +37,7 @@ PATHS= -DSSHDIR=\"$(sysconfdir)\" \
36 -D_PATH_SSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\" \ 37 -D_PATH_SSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\" \
37 -D_PATH_SFTP_SERVER=\"$(SFTP_SERVER)\" \ 38 -D_PATH_SFTP_SERVER=\"$(SFTP_SERVER)\" \
38 -D_PATH_SSH_KEY_SIGN=\"$(SSH_KEYSIGN)\" \ 39 -D_PATH_SSH_KEY_SIGN=\"$(SSH_KEYSIGN)\" \
40 -D_PATH_SSH_PKCS11_HELPER=\"$(SSH_PKCS11_HELPER)\" \
39 -D_PATH_SSH_PIDDIR=\"$(piddir)\" \ 41 -D_PATH_SSH_PIDDIR=\"$(piddir)\" \
40 -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\" \ 42 -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\" \
41 -DSSH_RAND_HELPER=\"$(RAND_HELPER)\" \ 43 -DSSH_RAND_HELPER=\"$(RAND_HELPER)\" \
@@ -62,7 +64,7 @@ EXEEXT=@EXEEXT@
62INSTALL_SSH_PRNG_CMDS=@INSTALL_SSH_PRNG_CMDS@ 64INSTALL_SSH_PRNG_CMDS=@INSTALL_SSH_PRNG_CMDS@
63INSTALL_SSH_RAND_HELPER=@INSTALL_SSH_RAND_HELPER@ 65INSTALL_SSH_RAND_HELPER=@INSTALL_SSH_RAND_HELPER@
64 66
65TARGETS=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) ssh-vulnkey$(EXEEXT) 67TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) ssh-rand-helper${EXEEXT} sftp-server$(EXEEXT) sftp$(EXEEXT) ssh-vulnkey$(EXEEXT)
66 68
67LIBSSH_OBJS=acss.o authfd.o authfile.o bufaux.o bufbn.o buffer.o \ 69LIBSSH_OBJS=acss.o authfd.o authfile.o bufaux.o bufbn.o buffer.o \
68 canohost.o channels.o cipher.o cipher-acss.o cipher-aes.o \ 70 canohost.o channels.o cipher.o cipher-acss.o cipher-aes.o \
@@ -72,13 +74,13 @@ LIBSSH_OBJS=acss.o authfd.o authfile.o bufaux.o bufbn.o buffer.o \
72 readpass.o rsa.o ttymodes.o xmalloc.o addrmatch.o \ 74 readpass.o rsa.o ttymodes.o xmalloc.o addrmatch.o \
73 atomicio.o key.o dispatch.o kex.o mac.o uidswap.o uuencode.o misc.o \ 75 atomicio.o key.o dispatch.o kex.o mac.o uidswap.o uuencode.o misc.o \
74 monitor_fdpass.o rijndael.o ssh-dss.o ssh-rsa.o dh.o kexdh.o \ 76 monitor_fdpass.o rijndael.o ssh-dss.o ssh-rsa.o dh.o kexdh.o \
75 kexgex.o kexdhc.o kexgexc.o scard.o msg.o progressmeter.o dns.o \ 77 kexgex.o kexdhc.o kexgexc.o msg.o progressmeter.o dns.o \
76 entropy.o scard-opensc.o gss-genr.o umac.o jpake.o schnorr.o \ 78 entropy.o gss-genr.o umac.o jpake.o schnorr.o \
77 kexgssc.o 79 ssh-pkcs11.o kexgssc.o
78 80
79SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \ 81SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \
80 sshconnect.o sshconnect1.o sshconnect2.o mux.o \ 82 sshconnect.o sshconnect1.o sshconnect2.o mux.o \
81 roaming_common.o 83 roaming_common.o roaming_client.o
82 84
83SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \ 85SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \
84 sshpty.o sshlogin.o servconf.o serverloop.o \ 86 sshpty.o sshlogin.o servconf.o serverloop.o \
@@ -91,10 +93,10 @@ SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \
91 auth2-gss.o gss-serv.o gss-serv-krb5.o kexgsss.o\ 93 auth2-gss.o gss-serv.o gss-serv-krb5.o kexgsss.o\
92 loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \ 94 loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \
93 audit.o audit-bsm.o platform.o sftp-server.o sftp-common.o \ 95 audit.o audit-bsm.o platform.o sftp-server.o sftp-common.o \
94 roaming_common.o 96 roaming_common.o roaming_serv.o
95 97
96MANPAGES = moduli.5.out 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 ssh-vulnkey.1.out sshd_config.5.out ssh_config.5.out 98MANPAGES = moduli.5.out 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 ssh-pkcs11-helper.8.out ssh-vulnkey.1.out sshd_config.5.out ssh_config.5.out
97MANPAGES_IN = moduli.5 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 ssh-vulnkey.1 sshd_config.5 ssh_config.5 99MANPAGES_IN = moduli.5 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 ssh-pkcs11-helper.8 ssh-vulnkey.1 sshd_config.5 ssh_config.5
98MANTYPE = @MANTYPE@ 100MANTYPE = @MANTYPE@
99 101
100CONFIGFILES=sshd_config.out ssh_config.out moduli.out 102CONFIGFILES=sshd_config.out ssh_config.out moduli.out
@@ -150,15 +152,18 @@ scp$(EXEEXT): $(LIBCOMPAT) libssh.a scp.o progressmeter.o
150ssh-add$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-add.o 152ssh-add$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-add.o
151 $(LD) -o $@ ssh-add.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) 153 $(LD) -o $@ ssh-add.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
152 154
153ssh-agent$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-agent.o 155ssh-agent$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-agent.o ssh-pkcs11-client.o
154 $(LD) -o $@ ssh-agent.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) 156 $(LD) -o $@ ssh-agent.o ssh-pkcs11-client.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
155 157
156ssh-keygen$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keygen.o 158ssh-keygen$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keygen.o
157 $(LD) -o $@ ssh-keygen.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) 159 $(LD) -o $@ ssh-keygen.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
158 160
159ssh-keysign$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keysign.o roaming_dummy.o 161ssh-keysign$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keysign.o roaming_dummy.o readconf.o
160 $(LD) -o $@ ssh-keysign.o readconf.o roaming_dummy.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) 162 $(LD) -o $@ ssh-keysign.o readconf.o roaming_dummy.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
161 163
164ssh-pkcs11-helper$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-pkcs11-helper.o ssh-pkcs11.o
165 $(LD) -o $@ ssh-pkcs11-helper.o ssh-pkcs11.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
166
162ssh-keyscan$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keyscan.o roaming_dummy.o 167ssh-keyscan$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keyscan.o roaming_dummy.o
163 $(LD) -o $@ ssh-keyscan.o roaming_dummy.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh $(LIBS) 168 $(LD) -o $@ ssh-keyscan.o roaming_dummy.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh $(LIBS)
164 169
@@ -215,7 +220,6 @@ distclean: regressclean
215 rm -f survey.sh openbsd-compat/regress/Makefile *~ 220 rm -f survey.sh openbsd-compat/regress/Makefile *~
216 rm -rf autom4te.cache 221 rm -rf autom4te.cache
217 (cd openbsd-compat && $(MAKE) distclean) 222 (cd openbsd-compat && $(MAKE) distclean)
218 (cd scard && $(MAKE) distclean)
219 if test -d pkg ; then \ 223 if test -d pkg ; then \
220 rm -fr pkg ; \ 224 rm -fr pkg ; \
221 fi 225 fi
@@ -238,7 +242,6 @@ catman-do:
238distprep: catman-do 242distprep: catman-do
239 $(AUTORECONF) 243 $(AUTORECONF)
240 -rm -rf autom4te.cache 244 -rm -rf autom4te.cache
241 (cd scard && $(MAKE) -f Makefile.in distprep)
242 245
243install: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files install-sysconf host-key check-config 246install: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files install-sysconf host-key check-config
244install-nokeys: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files install-sysconf 247install-nokeys: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files install-sysconf
@@ -247,10 +250,7 @@ install-nosysconf: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) insta
247check-config: 250check-config:
248 -$(DESTDIR)$(sbindir)/sshd -t -f $(DESTDIR)$(sysconfdir)/sshd_config 251 -$(DESTDIR)$(sbindir)/sshd -t -f $(DESTDIR)$(sysconfdir)/sshd_config
249 252
250scard-install: 253install-files:
251 (cd scard && env DESTDIR=$(DESTDIR) $(MAKE) DESTDIR=$(DESTDIR) install)
252
253install-files: scard-install
254 $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) 254 $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
255 $(srcdir)/mkinstalldirs $(DESTDIR)$(sbindir) 255 $(srcdir)/mkinstalldirs $(DESTDIR)$(sbindir)
256 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir) 256 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)
@@ -271,6 +271,7 @@ install-files: scard-install
271 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-rand-helper $(DESTDIR)$(libexecdir)/ssh-rand-helper ; \ 271 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-rand-helper $(DESTDIR)$(libexecdir)/ssh-rand-helper ; \
272 fi 272 fi
273 $(INSTALL) -m 4711 $(STRIP_OPT) ssh-keysign $(DESTDIR)$(SSH_KEYSIGN) 273 $(INSTALL) -m 4711 $(STRIP_OPT) ssh-keysign $(DESTDIR)$(SSH_KEYSIGN)
274 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-pkcs11-helper $(DESTDIR)$(SSH_PKCS11_HELPER)
274 $(INSTALL) -m 0755 $(STRIP_OPT) sftp $(DESTDIR)$(bindir)/sftp 275 $(INSTALL) -m 0755 $(STRIP_OPT) sftp $(DESTDIR)$(bindir)/sftp
275 $(INSTALL) -m 0755 $(STRIP_OPT) sftp-server $(DESTDIR)$(SFTP_SERVER) 276 $(INSTALL) -m 0755 $(STRIP_OPT) sftp-server $(DESTDIR)$(SFTP_SERVER)
276 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-vulnkey $(DESTDIR)$(bindir)/ssh-vulnkey 277 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-vulnkey $(DESTDIR)$(bindir)/ssh-vulnkey
@@ -291,6 +292,7 @@ install-files: scard-install
291 $(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1 292 $(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
292 $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8 293 $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
293 $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8 294 $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
295 $(INSTALL) -m 644 ssh-pkcs11-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8
294 $(INSTALL) -m 644 ssh-vulnkey.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-vulnkey.1 296 $(INSTALL) -m 644 ssh-vulnkey.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-vulnkey.1
295 -rm -f $(DESTDIR)$(bindir)/slogin 297 -rm -f $(DESTDIR)$(bindir)/slogin
296 ln -s ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin 298 ln -s ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin
@@ -378,6 +380,7 @@ uninstall:
378 -rm -f $(DESTDIR)$(sbindir)/sshd$(EXEEXT) 380 -rm -f $(DESTDIR)$(sbindir)/sshd$(EXEEXT)
379 -rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT) 381 -rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT)
380 -rm -f $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT) 382 -rm -f $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT)
383 -rm -f $(DESTDIR)$(SSH_PKCS11_HELPER)$(EXEEXT)
381 -rm -f $(DESTDIR)$(RAND_HELPER)$(EXEEXT) 384 -rm -f $(DESTDIR)$(RAND_HELPER)$(EXEEXT)
382 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1 385 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
383 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1 386 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
@@ -391,6 +394,7 @@ uninstall:
391 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-rand-helper.8 394 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-rand-helper.8
392 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8 395 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
393 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8 396 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
397 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8
394 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 398 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
395 399
396tests interop-tests: $(TARGETS) 400tests interop-tests: $(TARGETS)
@@ -404,6 +408,7 @@ tests interop-tests: $(TARGETS)
404 TEST_SSH_SSHAGENT="$${BUILDDIR}/ssh-agent"; \ 408 TEST_SSH_SSHAGENT="$${BUILDDIR}/ssh-agent"; \
405 TEST_SSH_SSHADD="$${BUILDDIR}/ssh-add"; \ 409 TEST_SSH_SSHADD="$${BUILDDIR}/ssh-add"; \
406 TEST_SSH_SSHKEYGEN="$${BUILDDIR}/ssh-keygen"; \ 410 TEST_SSH_SSHKEYGEN="$${BUILDDIR}/ssh-keygen"; \
411 TEST_SSH_SSHPKCS11HELPER="$${BUILDDIR}/ssh-pkcs11-helper"; \
407 TEST_SSH_SSHKEYSCAN="$${BUILDDIR}/ssh-keyscan"; \ 412 TEST_SSH_SSHKEYSCAN="$${BUILDDIR}/ssh-keyscan"; \
408 TEST_SSH_SFTP="$${BUILDDIR}/sftp"; \ 413 TEST_SSH_SFTP="$${BUILDDIR}/sftp"; \
409 TEST_SSH_SFTPSERVER="$${BUILDDIR}/sftp-server"; \ 414 TEST_SSH_SFTPSERVER="$${BUILDDIR}/sftp-server"; \
@@ -424,6 +429,7 @@ tests interop-tests: $(TARGETS)
424 TEST_SSH_SSHAGENT="$${TEST_SSH_SSHAGENT}" \ 429 TEST_SSH_SSHAGENT="$${TEST_SSH_SSHAGENT}" \
425 TEST_SSH_SSHADD="$${TEST_SSH_SSHADD}" \ 430 TEST_SSH_SSHADD="$${TEST_SSH_SSHADD}" \
426 TEST_SSH_SSHKEYGEN="$${TEST_SSH_SSHKEYGEN}" \ 431 TEST_SSH_SSHKEYGEN="$${TEST_SSH_SSHKEYGEN}" \
432 TEST_SSH_SSHPKCS11HELPER="$${TEST_SSH_SSHPKCS11HELPER}" \
427 TEST_SSH_SSHKEYSCAN="$${TEST_SSH_SSHKEYSCAN}" \ 433 TEST_SSH_SSHKEYSCAN="$${TEST_SSH_SSHKEYSCAN}" \
428 TEST_SSH_SFTP="$${TEST_SSH_SFTP}" \ 434 TEST_SSH_SFTP="$${TEST_SSH_SFTP}" \
429 TEST_SSH_SFTPSERVER="$${TEST_SSH_SFTPSERVER}" \ 435 TEST_SSH_SFTPSERVER="$${TEST_SSH_SFTPSERVER}" \
diff --git a/PROTOCOL b/PROTOCOL
index 5aada630d..5fc31eade 100644
--- a/PROTOCOL
+++ b/PROTOCOL
@@ -6,8 +6,8 @@ filexfer protocol described in:
6 6
7http://www.openssh.com/txt/draft-ietf-secsh-filexfer-02.txt 7http://www.openssh.com/txt/draft-ietf-secsh-filexfer-02.txt
8 8
9Features from newer versions of the draft are not supported, unless 9Newer versions of the draft will not be supported, though some features
10explicitly implemented as extensions described below. 10are individually implemented as extensions described below.
11 11
12The protocol used by OpenSSH's ssh-agent is described in the file 12The protocol used by OpenSSH's ssh-agent is described in the file
13PROTOCOL.agent 13PROTOCOL.agent
@@ -31,7 +31,14 @@ The method is documented in:
31 31
32http://www.openssh.com/txt/draft-miller-secsh-compression-delayed-00.txt 32http://www.openssh.com/txt/draft-miller-secsh-compression-delayed-00.txt
33 33
343. connection: Channel write close extension "eow@openssh.com" 343. transport: New public key algorithms "ssh-rsa-cert-v00@openssh.com" and
35 "ssh-dsa-cert-v00@openssh.com"
36
37OpenSSH introduces two new public key algorithms to support certificate
38authentication for users and hostkeys. These methods are documented in
39the file PROTOCOL.certkeys
40
414. connection: Channel write close extension "eow@openssh.com"
35 42
36The SSH connection protocol (rfc4254) provides the SSH_MSG_CHANNEL_EOF 43The SSH connection protocol (rfc4254) provides the SSH_MSG_CHANNEL_EOF
37message to allow an endpoint to signal its peer that it will send no 44message to allow an endpoint to signal its peer that it will send no
@@ -70,7 +77,7 @@ message is only sent to OpenSSH peers (identified by banner).
70Other SSH implementations may be whitelisted to receive this message 77Other SSH implementations may be whitelisted to receive this message
71upon request. 78upon request.
72 79
734. connection: disallow additional sessions extension 805. connection: disallow additional sessions extension
74 "no-more-sessions@openssh.com" 81 "no-more-sessions@openssh.com"
75 82
76Most SSH connections will only ever request a single session, but a 83Most SSH connections will only ever request a single session, but a
@@ -98,7 +105,7 @@ of this message, the no-more-sessions request is only sent to OpenSSH
98servers (identified by banner). Other SSH implementations may be 105servers (identified by banner). Other SSH implementations may be
99whitelisted to receive this message upon request. 106whitelisted to receive this message upon request.
100 107
1015. connection: Tunnel forward extension "tun@openssh.com" 1086. connection: Tunnel forward extension "tun@openssh.com"
102 109
103OpenSSH supports layer 2 and layer 3 tunnelling via the "tun@openssh.com" 110OpenSSH supports layer 2 and layer 3 tunnelling via the "tun@openssh.com"
104channel type. This channel type supports forwarding of network packets 111channel type. This channel type supports forwarding of network packets
@@ -121,10 +128,10 @@ layer 2 frames or layer 3 packets. It may take one of the following values:
121 SSH_TUNMODE_ETHERNET 2 /* layer 2 frames */ 128 SSH_TUNMODE_ETHERNET 2 /* layer 2 frames */
122 129
123The "tunnel unit number" specifies the remote interface number, or may 130The "tunnel unit number" specifies the remote interface number, or may
124be zero to allow the server to automatically chose an interface. A server 131be 0x7fffffff to allow the server to automatically chose an interface. A
125that is not willing to open a client-specified unit should refuse the 132server that is not willing to open a client-specified unit should refuse
126request with a SSH_MSG_CHANNEL_OPEN_FAILURE error. On successful open, 133the request with a SSH_MSG_CHANNEL_OPEN_FAILURE error. On successful
127the server should reply with SSH_MSG_CHANNEL_OPEN_SUCCESS. 134open, the server should reply with SSH_MSG_CHANNEL_OPEN_SUCCESS.
128 135
129Once established the client and server may exchange packet or frames 136Once established the client and server may exchange packet or frames
130over the tunnel channel by encapsulating them in SSH protocol strings 137over the tunnel channel by encapsulating them in SSH protocol strings
@@ -151,7 +158,7 @@ It may be one of:
151The "packet data" field consists of the IPv4/IPv6 datagram itself 158The "packet data" field consists of the IPv4/IPv6 datagram itself
152without any link layer header. 159without any link layer header.
153 160
154The contents of the "data" field for layer 3 packets is: 161The contents of the "data" field for layer 2 packets is:
155 162
156 uint32 packet length 163 uint32 packet length
157 byte[packet length] frame 164 byte[packet length] frame
@@ -159,7 +166,7 @@ The contents of the "data" field for layer 3 packets is:
159The "frame" field contains an IEEE 802.3 Ethernet frame, including 166The "frame" field contains an IEEE 802.3 Ethernet frame, including
160header. 167header.
161 168
1626. sftp: Reversal of arguments to SSH_FXP_SYMLINK 1697. sftp: Reversal of arguments to SSH_FXP_SYMLINK
163 170
164When OpenSSH's sftp-server was implemented, the order of the arguments 171When OpenSSH's sftp-server was implemented, the order of the arguments
165to the SSH_FXP_SYMLINK method was inadvertently reversed. Unfortunately, 172to the SSH_FXP_SYMLINK method was inadvertently reversed. Unfortunately,
@@ -172,7 +179,7 @@ SSH_FXP_SYMLINK as follows:
172 string targetpath 179 string targetpath
173 string linkpath 180 string linkpath
174 181
1757. sftp: Server extension announcement in SSH_FXP_VERSION 1828. sftp: Server extension announcement in SSH_FXP_VERSION
176 183
177OpenSSH's sftp-server lists the extensions it supports using the 184OpenSSH's sftp-server lists the extensions it supports using the
178standard extension announcement mechanism in the SSH_FXP_VERSION server 185standard extension announcement mechanism in the SSH_FXP_VERSION server
@@ -193,7 +200,7 @@ ever changed in an incompatible way. The server MAY advertise the same
193extension with multiple versions (though this is unlikely). Clients MUST 200extension with multiple versions (though this is unlikely). Clients MUST
194check the version number before attempting to use the extension. 201check the version number before attempting to use the extension.
195 202
1968. sftp: Extension request "posix-rename@openssh.com" 2039. sftp: Extension request "posix-rename@openssh.com"
197 204
198This operation provides a rename operation with POSIX semantics, which 205This operation provides a rename operation with POSIX semantics, which
199are different to those provided by the standard SSH_FXP_RENAME in 206are different to those provided by the standard SSH_FXP_RENAME in
@@ -210,7 +217,7 @@ rename(oldpath, newpath) and will respond with a SSH_FXP_STATUS message.
210This extension is advertised in the SSH_FXP_VERSION hello with version 217This extension is advertised in the SSH_FXP_VERSION hello with version
211"1". 218"1".
212 219
2139. sftp: Extension requests "statvfs@openssh.com" and 22010. sftp: Extension requests "statvfs@openssh.com" and
214 "fstatvfs@openssh.com" 221 "fstatvfs@openssh.com"
215 222
216These requests correspond to the statvfs and fstatvfs POSIX system 223These requests correspond to the statvfs and fstatvfs POSIX system
@@ -251,4 +258,4 @@ The values of the f_flag bitmask are as follows:
251Both the "statvfs@openssh.com" and "fstatvfs@openssh.com" extensions are 258Both the "statvfs@openssh.com" and "fstatvfs@openssh.com" extensions are
252advertised in the SSH_FXP_VERSION hello with version "2". 259advertised in the SSH_FXP_VERSION hello with version "2".
253 260
254$OpenBSD: PROTOCOL,v 1.12 2009/02/14 06:35:49 djm Exp $ 261$OpenBSD: PROTOCOL,v 1.15 2010/02/26 20:29:54 djm Exp $
diff --git a/PROTOCOL.agent b/PROTOCOL.agent
index 49adbdd5c..b34fcd318 100644
--- a/PROTOCOL.agent
+++ b/PROTOCOL.agent
@@ -173,6 +173,15 @@ be added using the following request
173 string key_comment 173 string key_comment
174 constraint[] key_constraints 174 constraint[] key_constraints
175 175
176DSA certificates may be added with:
177 byte SSH2_AGENTC_ADD_IDENTITY or
178 SSH2_AGENTC_ADD_ID_CONSTRAINED
179 string "ssh-dss-cert-v00@openssh.com"
180 string certificate
181 mpint dsa_private_key
182 string key_comment
183 constraint[] key_constraints
184
176RSA keys may be added with this request: 185RSA keys may be added with this request:
177 186
178 byte SSH2_AGENTC_ADD_IDENTITY or 187 byte SSH2_AGENTC_ADD_IDENTITY or
@@ -187,6 +196,19 @@ RSA keys may be added with this request:
187 string key_comment 196 string key_comment
188 constraint[] key_constraints 197 constraint[] key_constraints
189 198
199RSA certificates may be added with this request:
200
201 byte SSH2_AGENTC_ADD_IDENTITY or
202 SSH2_AGENTC_ADD_ID_CONSTRAINED
203 string "ssh-rsa-cert-v00@openssh.com"
204 string certificate
205 mpint rsa_d
206 mpint rsa_iqmp
207 mpint rsa_p
208 mpint rsa_q
209 string key_comment
210 constraint[] key_constraints
211
190Note that the 'rsa_p' and 'rsa_q' parameters are sent in the reverse 212Note that the 'rsa_p' and 'rsa_q' parameters are sent in the reverse
191order to the protocol 1 add keys message. As with the corresponding 213order to the protocol 1 add keys message. As with the corresponding
192protocol 1 "add key" request, the private key is overspecified to avoid 214protocol 1 "add key" request, the private key is overspecified to avoid
@@ -513,4 +535,4 @@ Locking and unlocking affects both protocol 1 and protocol 2 keys.
513 SSH_AGENT_CONSTRAIN_LIFETIME 1 535 SSH_AGENT_CONSTRAIN_LIFETIME 1
514 SSH_AGENT_CONSTRAIN_CONFIRM 2 536 SSH_AGENT_CONSTRAIN_CONFIRM 2
515 537
516$OpenBSD: PROTOCOL.agent,v 1.4 2008/07/01 23:12:47 stevesk Exp $ 538$OpenBSD: PROTOCOL.agent,v 1.5 2010/02/26 20:29:54 djm Exp $
diff --git a/PROTOCOL.certkeys b/PROTOCOL.certkeys
new file mode 100644
index 000000000..1ed9e2064
--- /dev/null
+++ b/PROTOCOL.certkeys
@@ -0,0 +1,193 @@
1This document describes a simple public-key certificate authentication
2system for use by SSH.
3
4Background
5----------
6
7The SSH protocol currently supports a simple public key authentication
8mechanism. Unlike other public key implementations, SSH eschews the
9use of X.509 certificates and uses raw keys. This approach has some
10benefits relating to simplicity of configuration and minimisation
11of attack surface, but it does not support the important use-cases
12of centrally managed, passwordless authentication and centrally
13certified host keys.
14
15These protocol extensions build on the simple public key authentication
16system already in SSH to allow certificate-based authentication.
17The certificates used are not traditional X.509 certificates, with
18numerous options and complex encoding rules, but something rather
19more minimal: a key, some identity information and usage constraints
20that have been signed with some other trusted key.
21
22A sshd server may be configured to allow authentication via certified
23keys, by extending the existing ~/.ssh/authorized_keys mechanism
24to allow specification of certification authority keys in addition
25to raw user keys. The ssh client will support automatic verification
26of acceptance of certified host keys, by adding a similar ability
27to specify CA keys in ~/.ssh/known_hosts.
28
29Certified keys are represented using two new key types:
30ssh-rsa-cert-v00@openssh.com and ssh-dss-cert-v00@openssh.com that
31include certification information along with the public key that is used
32to sign challenges. ssh-keygen performs the CA signing operation.
33
34Protocol extensions
35-------------------
36
37The SSH wire protocol includes several extensibility mechanisms.
38These modifications shall take advantage of namespaced public key
39algorithm names to add support for certificate authentication without
40breaking the protocol - implementations that do not support the
41extensions will simply ignore them.
42
43Authentication using the new key formats described below proceeds
44using the existing SSH "publickey" authentication method described
45in RFC4252 section 7.
46
47New public key formats
48----------------------
49
50The ssh-rsa-cert-v00@openssh.com and ssh-dss-cert-v00@openssh.com key
51types take a similar high-level format (note: data types and
52encoding are as per RFC4251 section 5). The serialised wire encoding of
53these certificates is also used for storing them on disk.
54
55#define SSH_CERT_TYPE_USER 1
56#define SSH_CERT_TYPE_HOST 2
57
58RSA certificate
59
60 string "ssh-rsa-cert-v00@openssh.com"
61 mpint e
62 mpint n
63 uint32 type
64 string key id
65 string valid principals
66 uint64 valid after
67 uint64 valid before
68 string constraints
69 string nonce
70 string reserved
71 string signature key
72 string signature
73
74DSA certificate
75
76 string "ssh-dss-cert-v00@openssh.com"
77 mpint p
78 mpint q
79 mpint g
80 mpint y
81 uint32 type
82 string key id
83 string valid principals
84 uint64 valid after
85 uint64 valid before
86 string constraints
87 string nonce
88 string reserved
89 string signature key
90 string signature
91
92e and n are the RSA exponent and public modulus respectively.
93
94p, q, g, y are the DSA parameters as described in FIPS-186-2.
95
96type specifies whether this certificate is for identification of a user
97or a host using a SSH_CERT_TYPE_... value.
98
99key id is a free-form text field that is filled in by the CA at the time
100of signing; the intention is that the contents of this field are used to
101identify the identity principal in log messages.
102
103"valid principals" is a string containing zero or more principals as
104strings packed inside it. These principals list the names for which this
105certificate is valid; hostnames for SSH_CERT_TYPE_HOST certificates and
106usernames for SSH_CERT_TYPE_USER certificates. As a special case, a
107zero-length "valid principals" field means the certificate is valid for
108any principal of the specified type. XXX DNS wildcards?
109
110"valid after" and "valid before" specify a validity period for the
111certificate. Each represents a time in seconds since 1970-01-01
11200:00:00. A certificate is considered valid if:
113 valid after <= current time < valid before
114
115constraints is a set of zero or more key constraints encoded as below.
116
117The nonce field is a CA-provided random bitstring of arbitrary length
118(but typically 16 or 32 bytes) included to make attacks that depend on
119inducing collisions in the signature hash infeasible.
120
121The reserved field is current unused and is ignored in this version of
122the protocol.
123
124signature key contains the CA key used to sign the certificate.
125The valid key types for CA keys are ssh-rsa and ssh-dss. "Chained"
126certificates, where the signature key type is a certificate type itself
127are NOT supported. Note that it is possible for a RSA certificate key to
128be signed by a DSS CA key and vice-versa.
129
130signature is computed over all preceding fields from the initial string
131up to, and including the signature key. Signatures are computed and
132encoded according to the rules defined for the CA's public key algorithm
133(RFC4253 section 6.6 for ssh-rsa and ssh-dss).
134
135Constraints
136-----------
137
138The constraints section of the certificate specifies zero or more
139constraints on the certificates validity. The format of this field
140is a sequence of zero or more tuples:
141
142 string name
143 string data
144
145The name field identifies the constraint and the data field encodes
146constraint-specific information (see below). All constraints are
147"critical", if an implementation does not recognise a constraint
148then the validating party should refuse to accept the certificate.
149
150The supported constraints and the contents and structure of their
151data fields are:
152
153Name Format Description
154-----------------------------------------------------------------------------
155force-command string Specifies a command that is executed
156 (replacing any the user specified on the
157 ssh command-line) whenever this key is
158 used for authentication.
159
160permit-X11-forwarding empty Flag indicating that X11 forwarding
161 should be permitted. X11 forwarding will
162 be refused if this constraint is absent.
163
164permit-agent-forwarding empty Flag indicating that agent forwarding
165 should be allowed. Agent forwarding
166 must not be permitted unless this
167 constraint is present.
168
169permit-port-forwarding empty Flag indicating that port-forwarding
170 should be allowed. If this constraint is
171 not present then no port forwarding will
172 be allowed.
173
174permit-pty empty Flag indicating that PTY allocation
175 should be permitted. In the absence of
176 this constraint PTY allocation will be
177 disabled.
178
179permit-user-rc empty Flag indicating that execution of
180 ~/.ssh/rc should be permitted. Execution
181 of this script will not be permitted if
182 this constraint is not present.
183
184source-address string Comma-separated list of source addresses
185 from which this certificate is accepted
186 for authentication. Addresses are
187 specified in CIDR format (nn.nn.nn.nn/nn
188 or hhhh::hhhh/nn).
189 If this constraint is not present then
190 certificates may be presented from any
191 source address.
192
193$OpenBSD: PROTOCOL.certkeys,v 1.3 2010/03/03 22:50:40 djm Exp $
diff --git a/PROTOCOL.mux b/PROTOCOL.mux
new file mode 100644
index 000000000..d22f7379c
--- /dev/null
+++ b/PROTOCOL.mux
@@ -0,0 +1,196 @@
1This document describes the multiplexing protocol used by ssh(1)'s
2ControlMaster connection-sharing.
3
4Most messages from the client to the server contain a "request id" field.
5This field is returned in replies as "client request id" to facilitate
6matching of responses to requests.
7
81. Connection setup
9
10When a multiplexing connection is made to a ssh(1) operating as a
11ControlMaster from a ssh(1) in multiplex slave mode, the first
12action of each is to exchange hello messages:
13
14 uint32 MUX_MSG_HELLO
15 uint32 protocol version
16 string extension name [optional]
17 string extension value [optional]
18 ...
19
20The current version of the mux protocol is 4. A slave should refuse
21to connect to a master that speaks an unsupported protocol version.
22Following the version identifier are zero or more extensions
23represented as a name/value pair. No extensions are currently
24defined.
25
262. Opening sessions
27
28To open a new multiplexed session, a client may send the following
29request:
30
31 uint32 MUX_C_MSG_NEW_SESSION
32 uint32 request id
33 string reserved
34 bool want tty flag
35 bool want X11 forwarding flag
36 bool want agent flag
37 bool subsystem flag
38 uint32 escape char
39 string terminal type
40 string command
41 string environment string 0 [optional]
42 ...
43
44To disable the use of an escape character, "escape char" may be set
45to 0xffffffff. "terminal type" is generally set to the value of
46$TERM. zero or more environment strings may follow the command.
47
48The client then sends its standard input, output and error file
49descriptors (in that order) using Unix domain socket control messages.
50
51The contents of "reserved" are currently ignored.
52
53If successful, the server will reply with MUX_S_SESSION_OPENED
54
55 uint32 MUX_S_SESSION_OPENED
56 uint32 client request id
57 uint32 session id
58
59Otherwise it will reply with an error: MUX_S_PERMISSION_DENIED or
60MUX_S_FAILURE.
61
62Once the server has received the fds, it will respond with MUX_S_OK
63indicating that the session is up. The client now waits for the
64session to end. When it does, the server will send an exit status
65message:
66
67 uint32 MUX_S_EXIT_MESSAGE
68 uint32 session id
69 uint32 exit value
70
71The client should exit with this value to mimic the behaviour of a
72non-multiplexed ssh(1) connection. Two additional cases that the
73client must cope with are it receiving a signal itself and the
74server disconnecting without sending an exit message.
75
763. Health checks
77
78The client may request a health check/PID report from a server:
79
80 uint32 MUX_C_ALIVE_CHECK
81 uint32 request id
82
83The server replies with:
84
85 uint32 MUX_S_ALIVE
86 uint32 client request id
87 uint32 server pid
88
894. Remotely terminating a master
90
91A client may request that a master terminate immediately:
92
93 uint32 MUX_C_TERMINATE
94 uint32 request id
95
96The server will reply with one of MUX_S_OK or MUX_S_PERMISSION_DENIED.
97
985. Requesting establishment of port forwards
99
100A client may request the master to establish a port forward:
101
102 uint32 MUX_C_OPEN_FORWARD
103 uint32 request id
104 uint32 forwarding type
105 string listen host
106 string listen port
107 string connect host
108 string connect port
109
110forwarding type may be MUX_FWD_LOCAL, MUX_FWD_REMOTE, MUX_FWD_DYNAMIC.
111
112A server may reply with a MUX_S_OK, a MUX_S_PERMISSION_DENIED or a
113MUX_S_FAILURE.
114
1155. Requesting closure of port forwards
116
117A client may request the master to establish a port forward:
118
119 uint32 MUX_C_OPEN_FORWARD
120 uint32 request id
121 uint32 forwarding type
122 string listen host
123 string listen port
124 string connect host
125 string connect port
126
127forwarding type may be MUX_FWD_LOCAL, MUX_FWD_REMOTE, MUX_FWD_DYNAMIC.
128
129A server may reply with a MUX_S_OK, a MUX_S_PERMISSION_DENIED or a
130MUX_S_FAILURE.
131
1326. Requesting stdio forwarding
133
134A client may request the master to establish a stdio forwarding:
135
136 uint32 MUX_C_NEW_STDIO_FWD
137 uint32 request id
138 string reserved
139 string connect host
140 string connect port
141
142The client then sends its standard input and output file descriptors
143(in that order) using Unix domain socket control messages.
144
145The contents of "reserved" are currently ignored.
146
147A server may reply with a MUX_S_SESSION_OPEED, a MUX_S_PERMISSION_DENIED
148or a MUX_S_FAILURE.
149
1507. Status messages
151
152The MUX_S_OK message is empty:
153
154 uint32 MUX_S_OK
155 uint32 client request id
156
157The MUX_S_PERMISSION_DENIED and MUX_S_FAILURE include a reason:
158
159 uint32 MUX_S_PERMISSION_DENIED
160 uint32 client request id
161 string reason
162
163 uint32 MUX_S_FAILURE
164 uint32 client request id
165 string reason
166
1677. Protocol numbers
168
169#define MUX_MSG_HELLO 0x00000001
170#define MUX_C_NEW_SESSION 0x10000002
171#define MUX_C_ALIVE_CHECK 0x10000004
172#define MUX_C_TERMINATE 0x10000005
173#define MUX_C_OPEN_FORWARD 0x10000006
174#define MUX_C_CLOSE_FORWARD 0x10000007
175#define MUX_S_OK 0x80000001
176#define MUX_S_PERMISSION_DENIED 0x80000002
177#define MUX_S_FAILURE 0x80000003
178#define MUX_S_EXIT_MESSAGE 0x80000004
179#define MUX_S_ALIVE 0x80000005
180#define MUX_S_SESSION_OPENED 0x80000006
181
182#define MUX_FWD_LOCAL 1
183#define MUX_FWD_REMOTE 2
184#define MUX_FWD_DYNAMIC 3
185
186XXX TODO
187XXX extended status (e.g. report open channels / forwards)
188XXX graceful close (delete listening socket, but keep existing sessions active)
189XXX lock (maybe)
190XXX watch in/out traffic (pre/post crypto)
191XXX inject packet (what about replies)
192XXX server->client error/warning notifications
193XXX port0 rfwd (need custom response message)
194XXX send signals via mux
195
196$OpenBSD: PROTOCOL.mux,v 1.1 2010/01/26 01:28:35 djm Exp $
diff --git a/README b/README
index 8538e8c9b..0ecb670b6 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
1See http://www.openssh.com/txt/release-5.3 for the release notes. 1See http://www.openssh.com/txt/release-5.4 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.70.4.1 2009/09/26 04:11:47 djm Exp $ 65$Id: README,v 1.72 2010/03/07 22:41:02 djm Exp $
diff --git a/README.smartcard b/README.smartcard
deleted file mode 100644
index fdf83ecab..000000000
--- a/README.smartcard
+++ /dev/null
@@ -1,93 +0,0 @@
1How to use smartcards with OpenSSH?
2
3OpenSSH contains experimental support for authentication using
4Cyberflex smartcards and TODOS card readers, in addition to the cards
5with PKCS#15 structure supported by OpenSC. To enable this you
6need to:
7
8Using libsectok:
9
10(1) enable sectok support in OpenSSH:
11
12 $ ./configure --with-sectok
13
14(2) If you have used a previous version of ssh with your card, you
15 must remove the old applet and keys.
16
17 $ sectok
18 sectok> login -d
19 sectok> junload Ssh.bin
20 sectok> delete 0012
21 sectok> delete sh
22 sectok> quit
23
24(3) load the Java Cardlet to the Cyberflex card and set card passphrase:
25
26 $ sectok
27 sectok> login -d
28 sectok> jload /usr/libdata/ssh/Ssh.bin
29 sectok> setpass
30 Enter new AUT0 passphrase:
31 Re-enter passphrase:
32 sectok> quit
33
34 Do not forget the passphrase. There is no way to
35 recover if you do.
36
37 IMPORTANT WARNING: If you attempt to login with the
38 wrong passphrase three times in a row, you will
39 destroy your card.
40
41(4) load a RSA key to the card:
42
43 $ ssh-keygen -f /path/to/rsakey -U 1
44 (where 1 is the reader number, you can also try 0)
45
46 In spite of the name, this does not generate a key.
47 It just loads an already existing key on to the card.
48
49(5) Optional: If you don't want to use a card passphrase, change the
50 acl on the private key file:
51
52 $ sectok
53 sectok> login -d
54 sectok> acl 0012 world: w
55 world: w
56 AUT0: w inval
57 sectok> quit
58
59 If you do this, anyone who has access to your card
60 can assume your identity. This is not recommended.
61
62
63Using OpenSC:
64
65(1) install OpenSC:
66
67 Sources and instructions are available from
68 http://www.opensc.org/
69
70(2) enable OpenSC support in OpenSSH:
71
72 $ ./configure --with-opensc[=/path/to/opensc] [options]
73
74(3) load a RSA key to the card:
75
76 Not supported yet.
77
78
79Common operations:
80
81(1) tell the ssh client to use the card reader:
82
83 $ ssh -I 1 otherhost
84
85(2) or tell the agent (don't forget to restart) to use the smartcard:
86
87 $ ssh-add -s 1
88
89
90-markus,
91Tue Jul 17 23:54:51 CEST 2001
92
93$OpenBSD: README.smartcard,v 1.9 2003/11/21 11:57:02 djm Exp $
diff --git a/addrmatch.c b/addrmatch.c
index d39885b7b..5b6773cce 100644
--- a/addrmatch.c
+++ b/addrmatch.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: addrmatch.c,v 1.4 2008/12/10 03:55:20 stevesk Exp $ */ 1/* $OpenBSD: addrmatch.c,v 1.5 2010/02/26 20:29:54 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2004-2008 Damien Miller <djm@mindrot.org> 4 * Copyright (c) 2004-2008 Damien Miller <djm@mindrot.org>
@@ -126,6 +126,8 @@ addr_netmask(int af, u_int l, struct xaddr *n)
126 switch (af) { 126 switch (af) {
127 case AF_INET: 127 case AF_INET:
128 n->af = AF_INET; 128 n->af = AF_INET;
129 if (l == 0)
130 return 0;
129 n->v4.s_addr = htonl((0xffffffff << (32 - l)) & 0xffffffff); 131 n->v4.s_addr = htonl((0xffffffff << (32 - l)) & 0xffffffff);
130 return 0; 132 return 0;
131 case AF_INET6: 133 case AF_INET6:
@@ -422,3 +424,77 @@ addr_match_list(const char *addr, const char *_list)
422 424
423 return ret; 425 return ret;
424} 426}
427
428/*
429 * Match "addr" against list CIDR list "_list". Lexical wildcards and
430 * negation are not supported. If "addr" == NULL, will verify structure
431 * of "_list".
432 *
433 * Returns 1 on match found (never returned when addr == NULL).
434 * Returns 0 on if no match found, or no errors found when addr == NULL.
435 * Returns -1 on error
436 */
437int
438addr_match_cidr_list(const char *addr, const char *_list)
439{
440 char *list, *cp, *o;
441 struct xaddr try_addr, match_addr;
442 u_int masklen;
443 int ret = 0, r;
444
445 if (addr != NULL && addr_pton(addr, &try_addr) != 0) {
446 debug2("%s: couldn't parse address %.100s", __func__, addr);
447 return 0;
448 }
449 if ((o = list = strdup(_list)) == NULL)
450 return -1;
451 while ((cp = strsep(&list, ",")) != NULL) {
452 if (*cp == '\0') {
453 error("%s: empty entry in list \"%.100s\"",
454 __func__, o);
455 ret = -1;
456 break;
457 }
458
459 /*
460 * NB. This function is called in pre-auth with untrusted data,
461 * so be extra paranoid about junk reaching getaddrino (via
462 * addr_pton_cidr).
463 */
464
465 /* Stop junk from reaching getaddrinfo. +3 is for masklen */
466 if (strlen(cp) > INET6_ADDRSTRLEN + 3) {
467 error("%s: list entry \"%.100s\" too long",
468 __func__, cp);
469 ret = -1;
470 break;
471 }
472#define VALID_CIDR_CHARS "0123456789abcdefABCDEF.:/"
473 if (strspn(cp, VALID_CIDR_CHARS) != strlen(cp)) {
474 error("%s: list entry \"%.100s\" contains invalid "
475 "characters", __func__, cp);
476 ret = -1;
477 }
478
479 /* Prefer CIDR address matching */
480 r = addr_pton_cidr(cp, &match_addr, &masklen);
481 if (r == -1) {
482 error("Invalid network entry \"%.100s\"", cp);
483 ret = -1;
484 break;
485 } else if (r == -2) {
486 error("Inconsistent mask length for "
487 "network \"%.100s\"", cp);
488 ret = -1;
489 break;
490 } else if (r == 0 && addr != NULL) {
491 if (addr_netmatch(&try_addr, &match_addr,
492 masklen) == 0)
493 ret = 1;
494 continue;
495 }
496 }
497 xfree(o);
498
499 return ret;
500}
diff --git a/auth-krb5.c b/auth-krb5.c
index 38164fda8..821913382 100644
--- a/auth-krb5.c
+++ b/auth-krb5.c
@@ -78,6 +78,11 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
78 krb5_error_code problem; 78 krb5_error_code problem;
79 krb5_ccache ccache = NULL; 79 krb5_ccache ccache = NULL;
80 int len; 80 int len;
81 char *client, *platform_client;
82
83 /* get platform-specific kerberos client principal name (if it exists) */
84 platform_client = platform_krb5_get_principal_name(authctxt->pw->pw_name);
85 client = platform_client ? platform_client : authctxt->pw->pw_name;
81 86
82 temporarily_use_uid(authctxt->pw); 87 temporarily_use_uid(authctxt->pw);
83 88
@@ -85,7 +90,7 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
85 if (problem) 90 if (problem)
86 goto out; 91 goto out;
87 92
88 problem = krb5_parse_name(authctxt->krb5_ctx, authctxt->pw->pw_name, 93 problem = krb5_parse_name(authctxt->krb5_ctx, client,
89 &authctxt->krb5_user); 94 &authctxt->krb5_user);
90 if (problem) 95 if (problem)
91 goto out; 96 goto out;
@@ -141,8 +146,7 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
141 if (problem) 146 if (problem)
142 goto out; 147 goto out;
143 148
144 if (!krb5_kuserok(authctxt->krb5_ctx, authctxt->krb5_user, 149 if (!krb5_kuserok(authctxt->krb5_ctx, authctxt->krb5_user, client)) {
145 authctxt->pw->pw_name)) {
146 problem = -1; 150 problem = -1;
147 goto out; 151 goto out;
148 } 152 }
@@ -181,6 +185,9 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
181 185
182 out: 186 out:
183 restore_uid(); 187 restore_uid();
188
189 if (platform_client != NULL)
190 xfree(platform_client);
184 191
185 if (problem) { 192 if (problem) {
186 if (ccache) 193 if (ccache)
diff --git a/auth-options.c b/auth-options.c
index ab085c233..129301765 100644
--- a/auth-options.c
+++ b/auth-options.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth-options.c,v 1.44 2009/01/22 10:09:16 djm Exp $ */ 1/* $OpenBSD: auth-options.c,v 1.48 2010/03/07 11:57:13 dtucker 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
@@ -44,6 +44,7 @@ int no_agent_forwarding_flag = 0;
44int no_x11_forwarding_flag = 0; 44int no_x11_forwarding_flag = 0;
45int no_pty_flag = 0; 45int no_pty_flag = 0;
46int no_user_rc = 0; 46int no_user_rc = 0;
47int key_is_cert_authority = 0;
47 48
48/* "command=" option. */ 49/* "command=" option. */
49char *forced_command = NULL; 50char *forced_command = NULL;
@@ -64,6 +65,7 @@ auth_clear_options(void)
64 no_pty_flag = 0; 65 no_pty_flag = 0;
65 no_x11_forwarding_flag = 0; 66 no_x11_forwarding_flag = 0;
66 no_user_rc = 0; 67 no_user_rc = 0;
68 key_is_cert_authority = 0;
67 while (custom_environment) { 69 while (custom_environment) {
68 struct envstring *ce = custom_environment; 70 struct envstring *ce = custom_environment;
69 custom_environment = ce->next; 71 custom_environment = ce->next;
@@ -76,7 +78,6 @@ auth_clear_options(void)
76 } 78 }
77 forced_tun_device = -1; 79 forced_tun_device = -1;
78 channel_clear_permitted_opens(); 80 channel_clear_permitted_opens();
79 auth_debug_reset();
80} 81}
81 82
82/* 83/*
@@ -96,6 +97,12 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
96 return 1; 97 return 1;
97 98
98 while (*opts && *opts != ' ' && *opts != '\t') { 99 while (*opts && *opts != ' ' && *opts != '\t') {
100 cp = "cert-authority";
101 if (strncasecmp(opts, cp, strlen(cp)) == 0) {
102 key_is_cert_authority = 1;
103 opts += strlen(cp);
104 goto next_option;
105 }
99 cp = "no-port-forwarding"; 106 cp = "no-port-forwarding";
100 if (strncasecmp(opts, cp, strlen(cp)) == 0) { 107 if (strncasecmp(opts, cp, strlen(cp)) == 0) {
101 auth_debug_add("Port forwarding disabled."); 108 auth_debug_add("Port forwarding disabled.");
@@ -356,9 +363,6 @@ next_option:
356 /* Process the next option. */ 363 /* Process the next option. */
357 } 364 }
358 365
359 if (!use_privsep)
360 auth_debug_send();
361
362 /* grant access */ 366 /* grant access */
363 return 1; 367 return 1;
364 368
@@ -368,9 +372,158 @@ bad_option:
368 auth_debug_add("Bad options in %.100s file, line %lu: %.50s", 372 auth_debug_add("Bad options in %.100s file, line %lu: %.50s",
369 file, linenum, opts); 373 file, linenum, opts);
370 374
371 if (!use_privsep)
372 auth_debug_send();
373
374 /* deny access */ 375 /* deny access */
375 return 0; 376 return 0;
376} 377}
378
379/*
380 * Set options from certificate constraints. These supersede user key options
381 * so this must be called after auth_parse_options().
382 */
383int
384auth_cert_constraints(Buffer *c_orig, struct passwd *pw)
385{
386 u_char *name = NULL, *data_blob = NULL;
387 u_int nlen, dlen, clen;
388 Buffer c, data;
389 int ret = -1;
390
391 int cert_no_port_forwarding_flag = 1;
392 int cert_no_agent_forwarding_flag = 1;
393 int cert_no_x11_forwarding_flag = 1;
394 int cert_no_pty_flag = 1;
395 int cert_no_user_rc = 1;
396 char *cert_forced_command = NULL;
397 int cert_source_address_done = 0;
398
399 buffer_init(&data);
400
401 /* Make copy to avoid altering original */
402 buffer_init(&c);
403 buffer_append(&c, buffer_ptr(c_orig), buffer_len(c_orig));
404
405 while (buffer_len(&c) > 0) {
406 if ((name = buffer_get_string_ret(&c, &nlen)) == NULL ||
407 (data_blob = buffer_get_string_ret(&c, &dlen)) == NULL) {
408 error("Certificate constraints corrupt");
409 goto out;
410 }
411 buffer_append(&data, data_blob, dlen);
412 debug3("found certificate constraint \"%.100s\" len %u",
413 name, dlen);
414 if (strlen(name) != nlen) {
415 error("Certificate constraint name contains \\0");
416 goto out;
417 }
418 if (strcmp(name, "permit-X11-forwarding") == 0)
419 cert_no_x11_forwarding_flag = 0;
420 else if (strcmp(name, "permit-agent-forwarding") == 0)
421 cert_no_agent_forwarding_flag = 0;
422 else if (strcmp(name, "permit-port-forwarding") == 0)
423 cert_no_port_forwarding_flag = 0;
424 else if (strcmp(name, "permit-pty") == 0)
425 cert_no_pty_flag = 0;
426 else if (strcmp(name, "permit-user-rc") == 0)
427 cert_no_user_rc = 0;
428 else if (strcmp(name, "force-command") == 0) {
429 char *command = buffer_get_string_ret(&data, &clen);
430
431 if (command == NULL) {
432 error("Certificate constraint \"%s\" corrupt",
433 name);
434 goto out;
435 }
436 if (strlen(command) != clen) {
437 error("force-command constrain contains \\0");
438 goto out;
439 }
440 if (cert_forced_command != NULL) {
441 error("Certificate has multiple "
442 "force-command constraints");
443 xfree(command);
444 goto out;
445 }
446 cert_forced_command = command;
447 } else if (strcmp(name, "source-address") == 0) {
448 char *allowed = buffer_get_string_ret(&data, &clen);
449 const char *remote_ip = get_remote_ipaddr();
450
451 if (allowed == NULL) {
452 error("Certificate constraint \"%s\" corrupt",
453 name);
454 goto out;
455 }
456 if (strlen(allowed) != clen) {
457 error("source-address constrain contains \\0");
458 goto out;
459 }
460 if (cert_source_address_done++) {
461 error("Certificate has multiple "
462 "source-address constraints");
463 xfree(allowed);
464 goto out;
465 }
466 switch (addr_match_cidr_list(remote_ip, allowed)) {
467 case 1:
468 /* accepted */
469 xfree(allowed);
470 break;
471 case 0:
472 /* no match */
473 logit("Authentication tried for %.100s with "
474 "valid certificate but not from a "
475 "permitted host (ip=%.200s).",
476 pw->pw_name, remote_ip);
477 auth_debug_add("Your address '%.200s' is not "
478 "permitted to use this certificate for "
479 "login.", remote_ip);
480 xfree(allowed);
481 goto out;
482 case -1:
483 error("Certificate source-address contents "
484 "invalid");
485 xfree(allowed);
486 goto out;
487 }
488 } else {
489 error("Certificate constraint \"%s\" is not supported",
490 name);
491 goto out;
492 }
493
494 if (buffer_len(&data) != 0) {
495 error("Certificate constraint \"%s\" corrupt "
496 "(extra data)", name);
497 goto out;
498 }
499 buffer_clear(&data);
500 xfree(name);
501 xfree(data_blob);
502 name = data_blob = NULL;
503 }
504
505 /* successfully parsed all constraints */
506 ret = 0;
507
508 no_port_forwarding_flag |= cert_no_port_forwarding_flag;
509 no_agent_forwarding_flag |= cert_no_agent_forwarding_flag;
510 no_x11_forwarding_flag |= cert_no_x11_forwarding_flag;
511 no_pty_flag |= cert_no_pty_flag;
512 no_user_rc |= cert_no_user_rc;
513 /* CA-specified forced command supersedes key option */
514 if (cert_forced_command != NULL) {
515 if (forced_command != NULL)
516 xfree(forced_command);
517 forced_command = cert_forced_command;
518 }
519
520 out:
521 if (name != NULL)
522 xfree(name);
523 if (data_blob != NULL)
524 xfree(data_blob);
525 buffer_free(&data);
526 buffer_free(&c);
527 return ret;
528}
529
diff --git a/auth-options.h b/auth-options.h
index 14488f72d..694edc842 100644
--- a/auth-options.h
+++ b/auth-options.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth-options.h,v 1.17 2008/03/26 21:28:14 djm Exp $ */ 1/* $OpenBSD: auth-options.h,v 1.18 2010/02/26 20:29:54 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -30,8 +30,10 @@ extern int no_user_rc;
30extern char *forced_command; 30extern char *forced_command;
31extern struct envstring *custom_environment; 31extern struct envstring *custom_environment;
32extern int forced_tun_device; 32extern int forced_tun_device;
33extern int key_is_cert_authority;
33 34
34int auth_parse_options(struct passwd *, char *, char *, u_long); 35int auth_parse_options(struct passwd *, char *, char *, u_long);
35void auth_clear_options(void); 36void auth_clear_options(void);
37int auth_cert_constraints(Buffer *, struct passwd *);
36 38
37#endif 39#endif
diff --git a/auth-rh-rsa.c b/auth-rh-rsa.c
index 20ee7c6c4..891ec3297 100644
--- a/auth-rh-rsa.c
+++ b/auth-rh-rsa.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth-rh-rsa.c,v 1.42 2006/08/03 03:34:41 deraadt Exp $ */ 1/* $OpenBSD: auth-rh-rsa.c,v 1.43 2010/03/04 10:36:03 djm 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
@@ -44,7 +44,7 @@ auth_rhosts_rsa_key_allowed(struct passwd *pw, char *cuser, char *chost,
44{ 44{
45 HostStatus host_status; 45 HostStatus host_status;
46 46
47 if (reject_blacklisted_key(client_host_key, 0) == 1) 47 if (auth_key_is_revoked(client_host_key, 0))
48 return 0; 48 return 0;
49 49
50 /* Check if we would accept it using rhosts authentication. */ 50 /* Check if we would accept it using rhosts authentication. */
diff --git a/auth-rhosts.c b/auth-rhosts.c
index 5c1296701..06ae7f0b9 100644
--- a/auth-rhosts.c
+++ b/auth-rhosts.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth-rhosts.c,v 1.43 2008/06/13 14:18:51 dtucker Exp $ */ 1/* $OpenBSD: auth-rhosts.c,v 1.44 2010/03/07 11:57:13 dtucker 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
@@ -317,11 +317,5 @@ int
317auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname, 317auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname,
318 const char *ipaddr) 318 const char *ipaddr)
319{ 319{
320 int ret; 320 return auth_rhosts2_raw(pw, client_user, hostname, ipaddr);
321
322 auth_debug_reset();
323 ret = auth_rhosts2_raw(pw, client_user, hostname, ipaddr);
324 if (!use_privsep)
325 auth_debug_send();
326 return ret;
327} 321}
diff --git a/auth-rsa.c b/auth-rsa.c
index 4876aad5d..250e9cf78 100644
--- a/auth-rsa.c
+++ b/auth-rsa.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth-rsa.c,v 1.73 2008/07/02 12:03:51 dtucker Exp $ */ 1/* $OpenBSD: auth-rsa.c,v 1.74 2010/03/04 10:36:03 djm 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
@@ -94,6 +94,9 @@ auth_rsa_verify_response(Key *key, BIGNUM *challenge, u_char response[16])
94 MD5_CTX md; 94 MD5_CTX md;
95 int len; 95 int len;
96 96
97 if (auth_key_is_revoked(key, 0))
98 return 0;
99
97 /* don't allow short keys */ 100 /* don't allow short keys */
98 if (BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE) { 101 if (BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE) {
99 error("auth_rsa_verify_response: RSA modulus too small: %d < minimum %d bits", 102 error("auth_rsa_verify_response: RSA modulus too small: %d < minimum %d bits",
@@ -246,9 +249,6 @@ auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
246 "actual %d vs. announced %d.", 249 "actual %d vs. announced %d.",
247 file, linenum, BN_num_bits(key->rsa->n), bits); 250 file, linenum, BN_num_bits(key->rsa->n), bits);
248 251
249 if (reject_blacklisted_key(key, 0) == 1)
250 continue;
251
252 /* We have found the desired key. */ 252 /* We have found the desired key. */
253 /* 253 /*
254 * If our options do not allow this key to be used, 254 * If our options do not allow this key to be used,
diff --git a/auth.c b/auth.c
index 68370ca94..54f4548f1 100644
--- a/auth.c
+++ b/auth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth.c,v 1.80 2008/11/04 07:58:09 djm Exp $ */ 1/* $OpenBSD: auth.c,v 1.86 2010/03/05 02:58:11 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -70,6 +70,7 @@
70#ifdef GSSAPI 70#ifdef GSSAPI
71#include "ssh-gss.h" 71#include "ssh-gss.h"
72#endif 72#endif
73#include "authfile.h"
73#include "monitor_wrap.h" 74#include "monitor_wrap.h"
74 75
75/* import */ 76/* import */
@@ -96,7 +97,6 @@ allowed_user(struct passwd * pw)
96{ 97{
97 struct stat st; 98 struct stat st;
98 const char *hostname = NULL, *ipaddr = NULL, *passwd = NULL; 99 const char *hostname = NULL, *ipaddr = NULL, *passwd = NULL;
99 char *shell;
100 u_int i; 100 u_int i;
101#ifdef USE_SHADOW 101#ifdef USE_SHADOW
102 struct spwd *spw = NULL; 102 struct spwd *spw = NULL;
@@ -154,22 +154,28 @@ allowed_user(struct passwd * pw)
154 } 154 }
155 155
156 /* 156 /*
157 * Get the shell from the password data. An empty shell field is 157 * Deny if shell does not exist or is not executable unless we
158 * legal, and means /bin/sh. 158 * are chrooting.
159 */ 159 */
160 shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell; 160 if (options.chroot_directory == NULL ||
161 161 strcasecmp(options.chroot_directory, "none") == 0) {
162 /* deny if shell does not exists or is not executable */ 162 char *shell = xstrdup((pw->pw_shell[0] == '\0') ?
163 if (stat(shell, &st) != 0) { 163 _PATH_BSHELL : pw->pw_shell); /* empty = /bin/sh */
164 logit("User %.100s not allowed because shell %.100s does not exist", 164
165 pw->pw_name, shell); 165 if (stat(shell, &st) != 0) {
166 return 0; 166 logit("User %.100s not allowed because shell %.100s "
167 } 167 "does not exist", pw->pw_name, shell);
168 if (S_ISREG(st.st_mode) == 0 || 168 xfree(shell);
169 (st.st_mode & (S_IXOTH|S_IXUSR|S_IXGRP)) == 0) { 169 return 0;
170 logit("User %.100s not allowed because shell %.100s is not executable", 170 }
171 pw->pw_name, shell); 171 if (S_ISREG(st.st_mode) == 0 ||
172 return 0; 172 (st.st_mode & (S_IXOTH|S_IXUSR|S_IXGRP)) == 0) {
173 logit("User %.100s not allowed because shell %.100s "
174 "is not executable", pw->pw_name, shell);
175 xfree(shell);
176 return 0;
177 }
178 xfree(shell);
173 } 179 }
174 180
175 if (options.num_deny_users > 0 || options.num_allow_users > 0 || 181 if (options.num_deny_users > 0 || options.num_allow_users > 0 ||
@@ -399,38 +405,6 @@ check_key_in_hostfiles(struct passwd *pw, Key *key, const char *host,
399 return host_status; 405 return host_status;
400} 406}
401 407
402int
403reject_blacklisted_key(Key *key, int hostkey)
404{
405 char *fp;
406
407 if (blacklisted_key(key, &fp) != 1)
408 return 0;
409
410 if (options.permit_blacklisted_keys) {
411 if (hostkey)
412 error("Host key %s blacklisted (see "
413 "ssh-vulnkey(1)); continuing anyway", fp);
414 else
415 logit("Public key %s from %s blacklisted (see "
416 "ssh-vulnkey(1)); continuing anyway",
417 fp, get_remote_ipaddr());
418 xfree(fp);
419 } else {
420 if (hostkey)
421 error("Host key %s blacklisted (see "
422 "ssh-vulnkey(1))", fp);
423 else
424 logit("Public key %s from %s blacklisted (see "
425 "ssh-vulnkey(1))",
426 fp, get_remote_ipaddr());
427 xfree(fp);
428 return 1;
429 }
430
431 return 0;
432}
433
434 408
435/* 409/*
436 * Check a given file for security. This is defined as all components 410 * Check a given file for security. This is defined as all components
@@ -488,7 +462,7 @@ secure_filename(FILE *f, const char *file, struct passwd *pw,
488 return -1; 462 return -1;
489 } 463 }
490 464
491 /* If are passed the homedir then we can stop */ 465 /* If are past the homedir then we can stop */
492 if (comparehome && strcmp(homedir, buf) == 0) { 466 if (comparehome && strcmp(homedir, buf) == 0) {
493 debug3("secure_filename: terminating check at '%s'", 467 debug3("secure_filename: terminating check at '%s'",
494 buf); 468 buf);
@@ -562,7 +536,28 @@ getpwnamallow(const char *user)
562 parse_server_match_config(&options, user, 536 parse_server_match_config(&options, user,
563 get_canonical_hostname(options.use_dns), get_remote_ipaddr()); 537 get_canonical_hostname(options.use_dns), get_remote_ipaddr());
564 538
539#if defined(_AIX) && defined(HAVE_SETAUTHDB)
540 aix_setauthdb(user);
541#endif
542
565 pw = getpwnam(user); 543 pw = getpwnam(user);
544
545#if defined(_AIX) && defined(HAVE_SETAUTHDB)
546 aix_restoreauthdb();
547#endif
548#ifdef HAVE_CYGWIN
549 /*
550 * Windows usernames are case-insensitive. To avoid later problems
551 * when trying to match the username, the user is only allowed to
552 * login if the username is given in the same case as stored in the
553 * user database.
554 */
555 if (pw != NULL && strcmp(user, pw->pw_name) != 0) {
556 logit("Login name %.100s does not match stored username %.100s",
557 user, pw->pw_name);
558 pw = NULL;
559 }
560#endif
566 if (pw == NULL) { 561 if (pw == NULL) {
567 logit("Invalid user %.100s from %.100s", 562 logit("Invalid user %.100s from %.100s",
568 user, get_remote_ipaddr()); 563 user, get_remote_ipaddr());
@@ -597,6 +592,59 @@ getpwnamallow(const char *user)
597 return (NULL); 592 return (NULL);
598} 593}
599 594
595/* Returns 1 if key is revoked by revoked_keys_file, 0 otherwise */
596int
597auth_key_is_revoked(Key *key, int hostkey)
598{
599 char *key_fp;
600
601 if (blacklisted_key(key, &key_fp) == 1) {
602 if (options.permit_blacklisted_keys) {
603 if (hostkey)
604 error("Host key %s blacklisted (see "
605 "ssh-vulnkey(1)); continuing anyway",
606 key_fp);
607 else
608 logit("Public key %s from %s blacklisted (see "
609 "ssh-vulnkey(1)); continuing anyway",
610 key_fp, get_remote_ipaddr());
611 xfree(key_fp);
612 } else {
613 if (hostkey)
614 error("Host key %s blacklisted (see "
615 "ssh-vulnkey(1))", key_fp);
616 else
617 logit("Public key %s from %s blacklisted (see "
618 "ssh-vulnkey(1))",
619 key_fp, get_remote_ipaddr());
620 xfree(key_fp);
621 return 1;
622 }
623 }
624
625 if (options.revoked_keys_file == NULL)
626 return 0;
627
628 switch (key_in_file(key, options.revoked_keys_file, 0)) {
629 case 0:
630 /* key not revoked */
631 return 0;
632 case -1:
633 /* Error opening revoked_keys_file: refuse all keys */
634 error("Revoked keys file is unreadable: refusing public key "
635 "authentication");
636 return 1;
637 case 1:
638 /* Key revoked */
639 key_fp = key_fingerprint(key, SSH_FP_MD5, SSH_FP_HEX);
640 error("WARNING: authentication attempt with a revoked "
641 "%s key %s ", key_type(key), key_fp);
642 xfree(key_fp);
643 return 1;
644 }
645 fatal("key_in_file returned junk");
646}
647
600void 648void
601auth_debug_add(const char *fmt,...) 649auth_debug_add(const char *fmt,...)
602{ 650{
diff --git a/auth.h b/auth.h
index 6c015cfb6..9cd7c53de 100644
--- a/auth.h
+++ b/auth.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth.h,v 1.62 2008/11/04 08:22:12 djm Exp $ */ 1/* $OpenBSD: auth.h,v 1.65 2010/03/04 10:36:03 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -173,16 +173,16 @@ char *authorized_keys_file(struct passwd *);
173char *authorized_keys_file2(struct passwd *); 173char *authorized_keys_file2(struct passwd *);
174 174
175FILE *auth_openkeyfile(const char *, struct passwd *, int); 175FILE *auth_openkeyfile(const char *, struct passwd *, int);
176int auth_key_is_revoked(Key *, int);
176 177
177HostStatus 178HostStatus
178check_key_in_hostfiles(struct passwd *, Key *, const char *, 179check_key_in_hostfiles(struct passwd *, Key *, const char *,
179 const char *, const char *); 180 const char *, const char *);
180 181
181int reject_blacklisted_key(Key *, int);
182
183/* hostkey handling */ 182/* hostkey handling */
184Key *get_hostkey_by_index(int); 183Key *get_hostkey_by_index(int);
185Key *get_hostkey_by_type(int); 184Key *get_hostkey_public_by_type(int);
185Key *get_hostkey_private_by_type(int);
186int get_hostkey_index(Key *); 186int get_hostkey_index(Key *);
187int ssh1_session_key(BIGNUM *); 187int ssh1_session_key(BIGNUM *);
188 188
diff --git a/auth2-hostbased.c b/auth2-hostbased.c
index bc933d434..32c06bbdc 100644
--- a/auth2-hostbased.c
+++ b/auth2-hostbased.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth2-hostbased.c,v 1.12 2008/07/17 08:51:07 djm Exp $ */ 1/* $OpenBSD: auth2-hostbased.c,v 1.13 2010/03/04 10:36:03 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -145,7 +145,7 @@ hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost,
145 HostStatus host_status; 145 HostStatus host_status;
146 int len; 146 int len;
147 147
148 if (reject_blacklisted_key(key, 0) == 1) 148 if (auth_key_is_revoked(key, 0))
149 return 0; 149 return 0;
150 150
151 resolvedname = get_canonical_hostname(options.use_dns); 151 resolvedname = get_canonical_hostname(options.use_dns);
diff --git a/auth2-pubkey.c b/auth2-pubkey.c
index 8cb477662..ae0638825 100644
--- a/auth2-pubkey.c
+++ b/auth2-pubkey.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth2-pubkey.c,v 1.19 2008/07/03 21:46:58 otto Exp $ */ 1/* $OpenBSD: auth2-pubkey.c,v 1.21 2010/03/04 10:36:03 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -32,6 +32,8 @@
32#include <pwd.h> 32#include <pwd.h>
33#include <stdio.h> 33#include <stdio.h>
34#include <stdarg.h> 34#include <stdarg.h>
35#include <string.h>
36#include <time.h>
35#include <unistd.h> 37#include <unistd.h>
36 38
37#include "xmalloc.h" 39#include "xmalloc.h"
@@ -54,6 +56,7 @@
54#endif 56#endif
55#include "monitor_wrap.h" 57#include "monitor_wrap.h"
56#include "misc.h" 58#include "misc.h"
59#include "authfile.h"
57 60
58/* import */ 61/* import */
59extern ServerOptions options; 62extern ServerOptions options;
@@ -178,6 +181,7 @@ static int
178user_key_allowed2(struct passwd *pw, Key *key, char *file) 181user_key_allowed2(struct passwd *pw, Key *key, char *file)
179{ 182{
180 char line[SSH_MAX_PUBKEY_BYTES]; 183 char line[SSH_MAX_PUBKEY_BYTES];
184 const char *reason;
181 int found_key = 0; 185 int found_key = 0;
182 FILE *f; 186 FILE *f;
183 u_long linenum = 0; 187 u_long linenum = 0;
@@ -196,11 +200,13 @@ user_key_allowed2(struct passwd *pw, Key *key, char *file)
196 } 200 }
197 201
198 found_key = 0; 202 found_key = 0;
199 found = key_new(key->type); 203 found = key_new(key_is_cert(key) ? KEY_UNSPEC : key->type);
200 204
201 while (read_keyfile_line(f, file, line, sizeof(line), &linenum) != -1) { 205 while (read_keyfile_line(f, file, line, sizeof(line), &linenum) != -1) {
202 char *cp, *key_options = NULL; 206 char *cp, *key_options = NULL;
203 207
208 auth_clear_options();
209
204 /* Skip leading whitespace, empty and comment lines. */ 210 /* Skip leading whitespace, empty and comment lines. */
205 for (cp = line; *cp == ' ' || *cp == '\t'; cp++) 211 for (cp = line; *cp == ' ' || *cp == '\t'; cp++)
206 ; 212 ;
@@ -227,8 +233,32 @@ user_key_allowed2(struct passwd *pw, Key *key, char *file)
227 continue; 233 continue;
228 } 234 }
229 } 235 }
230 if (key_equal(found, key) && 236 if (auth_parse_options(pw, key_options, file, linenum) != 1)
231 auth_parse_options(pw, key_options, file, linenum) == 1) { 237 continue;
238 if (key->type == KEY_RSA_CERT || key->type == KEY_DSA_CERT) {
239 if (!key_is_cert_authority)
240 continue;
241 if (!key_equal(found, key->cert->signature_key))
242 continue;
243 debug("matching CA found: file %s, line %lu",
244 file, linenum);
245 fp = key_fingerprint(found, SSH_FP_MD5,
246 SSH_FP_HEX);
247 verbose("Found matching %s CA: %s",
248 key_type(found), fp);
249 xfree(fp);
250 if (key_cert_check_authority(key, 0, 0, pw->pw_name,
251 &reason) != 0) {
252 error("%s", reason);
253 auth_debug_add("%s", reason);
254 continue;
255 }
256 if (auth_cert_constraints(&key->cert->constraints,
257 pw) != 0)
258 continue;
259 found_key = 1;
260 break;
261 } else if (!key_is_cert_authority && key_equal(found, key)) {
232 found_key = 1; 262 found_key = 1;
233 debug("matching key found: file %s, line %lu", 263 debug("matching key found: file %s, line %lu",
234 file, linenum); 264 file, linenum);
@@ -247,6 +277,47 @@ user_key_allowed2(struct passwd *pw, Key *key, char *file)
247 return found_key; 277 return found_key;
248} 278}
249 279
280/* Authenticate a certificate key against TrustedUserCAKeys */
281static int
282user_cert_trusted_ca(struct passwd *pw, Key *key)
283{
284 char *key_fp, *ca_fp;
285 const char *reason;
286 int ret = 0;
287
288 if (!key_is_cert(key) || options.trusted_user_ca_keys == NULL)
289 return 0;
290
291 key_fp = key_fingerprint(key, SSH_FP_MD5, SSH_FP_HEX);
292 ca_fp = key_fingerprint(key, SSH_FP_MD5, SSH_FP_HEX);
293
294 if (key_in_file(key->cert->signature_key,
295 options.trusted_user_ca_keys, 1) != 1) {
296 debug2("%s: CA %s %s is not listed in %s", __func__,
297 key_type(key->cert->signature_key), ca_fp,
298 options.trusted_user_ca_keys);
299 goto out;
300 }
301 if (key_cert_check_authority(key, 0, 1, pw->pw_name, &reason) != 0) {
302 error("%s", reason);
303 auth_debug_add("%s", reason);
304 goto out;
305 }
306 if (auth_cert_constraints(&key->cert->constraints, pw) != 0)
307 goto out;
308
309 verbose("%s certificate %s allowed by trusted %s key %s",
310 key_type(key), key_fp, key_type(key->cert->signature_key), ca_fp);
311 ret = 1;
312
313 out:
314 if (key_fp != NULL)
315 xfree(key_fp);
316 if (ca_fp != NULL)
317 xfree(ca_fp);
318 return ret;
319}
320
250/* check whether given key is in .ssh/authorized_keys* */ 321/* check whether given key is in .ssh/authorized_keys* */
251int 322int
252user_key_allowed(struct passwd *pw, Key *key) 323user_key_allowed(struct passwd *pw, Key *key)
@@ -254,9 +325,15 @@ user_key_allowed(struct passwd *pw, Key *key)
254 int success; 325 int success;
255 char *file; 326 char *file;
256 327
257 if (reject_blacklisted_key(key, 0) == 1) 328 if (auth_key_is_revoked(key, 0))
329 return 0;
330 if (key_is_cert(key) && auth_key_is_revoked(key->cert->signature_key))
258 return 0; 331 return 0;
259 332
333 success = user_cert_trusted_ca(pw, key);
334 if (success)
335 return success;
336
260 file = authorized_keys_file(pw); 337 file = authorized_keys_file(pw);
261 success = user_key_allowed2(pw, key, file); 338 success = user_key_allowed2(pw, key, file);
262 xfree(file); 339 xfree(file);
diff --git a/authfd.c b/authfd.c
index 5dba87d26..28a8cf2d7 100644
--- a/authfd.c
+++ b/authfd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: authfd.c,v 1.80 2006/08/03 03:34:41 deraadt Exp $ */ 1/* $OpenBSD: authfd.c,v 1.82 2010/02/26 20:29:54 djm 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
@@ -483,6 +483,16 @@ ssh_encode_identity_ssh2(Buffer *b, Key *key, const char *comment)
483 buffer_put_bignum2(b, key->rsa->p); 483 buffer_put_bignum2(b, key->rsa->p);
484 buffer_put_bignum2(b, key->rsa->q); 484 buffer_put_bignum2(b, key->rsa->q);
485 break; 485 break;
486 case KEY_RSA_CERT:
487 if (key->cert == NULL || buffer_len(&key->cert->certblob) == 0)
488 fatal("%s: no cert/certblob", __func__);
489 buffer_put_string(b, buffer_ptr(&key->cert->certblob),
490 buffer_len(&key->cert->certblob));
491 buffer_put_bignum2(b, key->rsa->d);
492 buffer_put_bignum2(b, key->rsa->iqmp);
493 buffer_put_bignum2(b, key->rsa->p);
494 buffer_put_bignum2(b, key->rsa->q);
495 break;
486 case KEY_DSA: 496 case KEY_DSA:
487 buffer_put_bignum2(b, key->dsa->p); 497 buffer_put_bignum2(b, key->dsa->p);
488 buffer_put_bignum2(b, key->dsa->q); 498 buffer_put_bignum2(b, key->dsa->q);
@@ -490,6 +500,13 @@ ssh_encode_identity_ssh2(Buffer *b, Key *key, const char *comment)
490 buffer_put_bignum2(b, key->dsa->pub_key); 500 buffer_put_bignum2(b, key->dsa->pub_key);
491 buffer_put_bignum2(b, key->dsa->priv_key); 501 buffer_put_bignum2(b, key->dsa->priv_key);
492 break; 502 break;
503 case KEY_DSA_CERT:
504 if (key->cert == NULL || buffer_len(&key->cert->certblob) == 0)
505 fatal("%s: no cert/certblob", __func__);
506 buffer_put_string(b, buffer_ptr(&key->cert->certblob),
507 buffer_len(&key->cert->certblob));
508 buffer_put_bignum2(b, key->dsa->priv_key);
509 break;
493 } 510 }
494 buffer_put_cstring(b, comment); 511 buffer_put_cstring(b, comment);
495} 512}
@@ -517,7 +534,9 @@ ssh_add_identity_constrained(AuthenticationConnection *auth, Key *key,
517 ssh_encode_identity_rsa1(&msg, key->rsa, comment); 534 ssh_encode_identity_rsa1(&msg, key->rsa, comment);
518 break; 535 break;
519 case KEY_RSA: 536 case KEY_RSA:
537 case KEY_RSA_CERT:
520 case KEY_DSA: 538 case KEY_DSA:
539 case KEY_DSA_CERT:
521 type = constrained ? 540 type = constrained ?
522 SSH2_AGENTC_ADD_ID_CONSTRAINED : 541 SSH2_AGENTC_ADD_ID_CONSTRAINED :
523 SSH2_AGENTC_ADD_IDENTITY; 542 SSH2_AGENTC_ADD_IDENTITY;
@@ -565,7 +584,8 @@ ssh_remove_identity(AuthenticationConnection *auth, Key *key)
565 buffer_put_int(&msg, BN_num_bits(key->rsa->n)); 584 buffer_put_int(&msg, BN_num_bits(key->rsa->n));
566 buffer_put_bignum(&msg, key->rsa->e); 585 buffer_put_bignum(&msg, key->rsa->e);
567 buffer_put_bignum(&msg, key->rsa->n); 586 buffer_put_bignum(&msg, key->rsa->n);
568 } else if (key->type == KEY_DSA || key->type == KEY_RSA) { 587 } else if (key_type_plain(key->type) == KEY_DSA ||
588 key_type_plain(key->type) == KEY_RSA) {
569 key_to_blob(key, &blob, &blen); 589 key_to_blob(key, &blob, &blen);
570 buffer_put_char(&msg, SSH2_AGENTC_REMOVE_IDENTITY); 590 buffer_put_char(&msg, SSH2_AGENTC_REMOVE_IDENTITY);
571 buffer_put_string(&msg, blob, blen); 591 buffer_put_string(&msg, blob, blen);
diff --git a/authfd.h b/authfd.h
index 31b24e173..2582a27aa 100644
--- a/authfd.h
+++ b/authfd.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: authfd.h,v 1.36 2006/08/03 03:34:41 deraadt Exp $ */ 1/* $OpenBSD: authfd.h,v 1.37 2009/08/27 17:44:52 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/authfile.c b/authfile.c
index 0d837b9bd..4d0823209 100644
--- a/authfile.c
+++ b/authfile.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: authfile.c,v 1.76 2006/08/03 03:34:41 deraadt Exp $ */ 1/* $OpenBSD: authfile.c,v 1.80 2010/03/04 10:36:03 djm 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
@@ -47,6 +47,9 @@
47#include <openssl/evp.h> 47#include <openssl/evp.h>
48#include <openssl/pem.h> 48#include <openssl/pem.h>
49 49
50/* compatibility with old or broken OpenSSL versions */
51#include "openbsd-compat/openssl-compat.h"
52
50#include <errno.h> 53#include <errno.h>
51#include <fcntl.h> 54#include <fcntl.h>
52#include <stdarg.h> 55#include <stdarg.h>
@@ -185,7 +188,11 @@ key_save_private_pem(Key *key, const char *filename, const char *_passphrase,
185 int success = 0; 188 int success = 0;
186 int len = strlen(_passphrase); 189 int len = strlen(_passphrase);
187 u_char *passphrase = (len > 0) ? (u_char *)_passphrase : NULL; 190 u_char *passphrase = (len > 0) ? (u_char *)_passphrase : NULL;
191#if (OPENSSL_VERSION_NUMBER < 0x00907000L)
188 const EVP_CIPHER *cipher = (len > 0) ? EVP_des_ede3_cbc() : NULL; 192 const EVP_CIPHER *cipher = (len > 0) ? EVP_des_ede3_cbc() : NULL;
193#else
194 const EVP_CIPHER *cipher = (len > 0) ? EVP_aes_128_cbc() : NULL;
195#endif
189 196
190 if (len > 0 && len <= 4) { 197 if (len > 0 && len <= 4) {
191 error("passphrase too short: have %d bytes, need > 4", len); 198 error("passphrase too short: have %d bytes, need > 4", len);
@@ -553,8 +560,13 @@ key_load_private_type(int type, const char *filename, const char *passphrase,
553 int fd; 560 int fd;
554 561
555 fd = open(filename, O_RDONLY); 562 fd = open(filename, O_RDONLY);
556 if (fd < 0) 563 if (fd < 0) {
564 debug("could not open key file '%s': %s", filename,
565 strerror(errno));
566 if (perm_ok != NULL)
567 *perm_ok = 0;
557 return NULL; 568 return NULL;
569 }
558 if (!key_perm_ok(fd, filename)) { 570 if (!key_perm_ok(fd, filename)) {
559 if (perm_ok != NULL) 571 if (perm_ok != NULL)
560 *perm_ok = 0; 572 *perm_ok = 0;
@@ -589,8 +601,11 @@ key_load_private(const char *filename, const char *passphrase,
589 int fd; 601 int fd;
590 602
591 fd = open(filename, O_RDONLY); 603 fd = open(filename, O_RDONLY);
592 if (fd < 0) 604 if (fd < 0) {
605 debug("could not open key file '%s': %s", filename,
606 strerror(errno));
593 return NULL; 607 return NULL;
608 }
594 if (!key_perm_ok(fd, filename)) { 609 if (!key_perm_ok(fd, filename)) {
595 error("bad permissions: ignore key: %s", filename); 610 error("bad permissions: ignore key: %s", filename);
596 close(fd); 611 close(fd);
@@ -679,6 +694,67 @@ key_load_public(const char *filename, char **commentp)
679 return NULL; 694 return NULL;
680} 695}
681 696
697/*
698 * Returns 1 if the specified "key" is listed in the file "filename",
699 * 0 if the key is not listed or -1 on error.
700 * If strict_type is set then the key type must match exactly,
701 * otherwise a comparison that ignores certficiate data is performed.
702 */
703int
704key_in_file(Key *key, const char *filename, int strict_type)
705{
706 FILE *f;
707 char line[SSH_MAX_PUBKEY_BYTES];
708 char *cp;
709 u_long linenum = 0;
710 int ret = 0;
711 Key *pub;
712 int (*key_compare)(const Key *, const Key *) = strict_type ?
713 key_equal : key_equal_public;
714
715 if ((f = fopen(filename, "r")) == NULL) {
716 if (errno == ENOENT) {
717 debug("%s: keyfile \"%s\" missing", __func__, filename);
718 return 0;
719 } else {
720 error("%s: could not open keyfile \"%s\": %s", __func__,
721 filename, strerror(errno));
722 return -1;
723 }
724 }
725
726 while (read_keyfile_line(f, filename, line, sizeof(line),
727 &linenum) != -1) {
728 cp = line;
729
730 /* Skip leading whitespace. */
731 for (; *cp && (*cp == ' ' || *cp == '\t'); cp++)
732 ;
733
734 /* Skip comments and empty lines */
735 switch (*cp) {
736 case '#':
737 case '\n':
738 case '\0':
739 continue;
740 }
741
742 pub = key_new(KEY_UNSPEC);
743 if (key_read(pub, &cp) != 1) {
744 key_free(pub);
745 continue;
746 }
747 if (key_compare(key, pub)) {
748 ret = 1;
749 key_free(pub);
750 break;
751 }
752 key_free(pub);
753 }
754 fclose(f);
755 return ret;
756}
757
682/* Scan a blacklist of known-vulnerable keys in blacklist_file. */ 758/* Scan a blacklist of known-vulnerable keys in blacklist_file. */
683static int 759static int
684blacklisted_key_in_file(const Key *key, const char *blacklist_file, char **fp) 760blacklisted_key_in_file(const Key *key, const char *blacklist_file, char **fp)
@@ -815,3 +891,4 @@ blacklisted_key(const Key *key, char **fp)
815 key_free(public); 891 key_free(public);
816 return ret; 892 return ret;
817} 893}
894
diff --git a/authfile.h b/authfile.h
index e4f59fddb..674fc939f 100644
--- a/authfile.h
+++ b/authfile.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: authfile.h,v 1.13 2006/04/25 08:02:27 dtucker Exp $ */ 1/* $OpenBSD: authfile.h,v 1.14 2010/03/04 10:36:03 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -22,6 +22,7 @@ Key *key_load_private(const char *, const char *, char **);
22Key *key_load_private_type(int, const char *, const char *, char **, int *); 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 *); 24int key_perm_ok(int, const char *);
25int key_in_file(Key *, const char *, int);
25 26
26int blacklisted_key(const Key *key, char **fp); 27int blacklisted_key(const Key *key, char **fp);
27 28
diff --git a/bufaux.c b/bufaux.c
index cd9a35ded..4ef19c454 100644
--- a/bufaux.c
+++ b/bufaux.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bufaux.c,v 1.46 2008/06/10 23:21:34 dtucker Exp $ */ 1/* $OpenBSD: bufaux.c,v 1.48 2010/02/02 22:49:34 djm 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
@@ -166,7 +166,10 @@ buffer_get_string_ret(Buffer *buffer, u_int *length_ptr)
166 u_int len; 166 u_int len;
167 167
168 /* Get the length. */ 168 /* Get the length. */
169 len = buffer_get_int(buffer); 169 if (buffer_get_int_ret(&len, buffer) != 0) {
170 error("buffer_get_string_ret: cannot extract length");
171 return (NULL);
172 }
170 if (len > 256 * 1024) { 173 if (len > 256 * 1024) {
171 error("buffer_get_string_ret: bad string length %u", len); 174 error("buffer_get_string_ret: bad string length %u", len);
172 return (NULL); 175 return (NULL);
@@ -198,14 +201,17 @@ buffer_get_string(Buffer *buffer, u_int *length_ptr)
198} 201}
199 202
200void * 203void *
201buffer_get_string_ptr(Buffer *buffer, u_int *length_ptr) 204buffer_get_string_ptr_ret(Buffer *buffer, u_int *length_ptr)
202{ 205{
203 void *ptr; 206 void *ptr;
204 u_int len; 207 u_int len;
205 208
206 len = buffer_get_int(buffer); 209 if (buffer_get_int_ret(&len, buffer) != 0)
207 if (len > 256 * 1024) 210 return NULL;
208 fatal("buffer_get_string_ptr: bad string length %u", len); 211 if (len > 256 * 1024) {
212 error("buffer_get_string_ptr: bad string length %u", len);
213 return NULL;
214 }
209 ptr = buffer_ptr(buffer); 215 ptr = buffer_ptr(buffer);
210 buffer_consume(buffer, len); 216 buffer_consume(buffer, len);
211 if (length_ptr) 217 if (length_ptr)
@@ -213,6 +219,16 @@ buffer_get_string_ptr(Buffer *buffer, u_int *length_ptr)
213 return (ptr); 219 return (ptr);
214} 220}
215 221
222void *
223buffer_get_string_ptr(Buffer *buffer, u_int *length_ptr)
224{
225 void *ret;
226
227 if ((ret = buffer_get_string_ptr_ret(buffer, length_ptr)) == NULL)
228 fatal("buffer_get_string_ptr: buffer error");
229 return (ret);
230}
231
216/* 232/*
217 * Stores and arbitrary binary string in the buffer. 233 * Stores and arbitrary binary string in the buffer.
218 */ 234 */
diff --git a/buffer.c b/buffer.c
index e02e1e35c..ae9700344 100644
--- a/buffer.c
+++ b/buffer.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: buffer.c,v 1.31 2006/08/03 03:34:41 deraadt Exp $ */ 1/* $OpenBSD: buffer.c,v 1.32 2010/02/09 03:56:28 djm 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
@@ -160,7 +160,7 @@ buffer_check_alloc(Buffer *buffer, u_int len)
160/* Returns the number of bytes of data in the buffer. */ 160/* Returns the number of bytes of data in the buffer. */
161 161
162u_int 162u_int
163buffer_len(Buffer *buffer) 163buffer_len(const Buffer *buffer)
164{ 164{
165 return buffer->end - buffer->offset; 165 return buffer->end - buffer->offset;
166} 166}
@@ -228,7 +228,7 @@ buffer_consume_end(Buffer *buffer, u_int bytes)
228/* Returns a pointer to the first used byte in the buffer. */ 228/* Returns a pointer to the first used byte in the buffer. */
229 229
230void * 230void *
231buffer_ptr(Buffer *buffer) 231buffer_ptr(const Buffer *buffer)
232{ 232{
233 return buffer->buf + buffer->offset; 233 return buffer->buf + buffer->offset;
234} 234}
@@ -236,7 +236,7 @@ buffer_ptr(Buffer *buffer)
236/* Dumps the contents of the buffer to stderr. */ 236/* Dumps the contents of the buffer to stderr. */
237 237
238void 238void
239buffer_dump(Buffer *buffer) 239buffer_dump(const Buffer *buffer)
240{ 240{
241 u_int i; 241 u_int i;
242 u_char *ucp = buffer->buf; 242 u_char *ucp = buffer->buf;
diff --git a/buffer.h b/buffer.h
index d0f354ee7..4ef4f80b3 100644
--- a/buffer.h
+++ b/buffer.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: buffer.h,v 1.17 2008/05/08 06:59:01 markus Exp $ */ 1/* $OpenBSD: buffer.h,v 1.19 2010/02/09 03:56:28 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -27,8 +27,8 @@ void buffer_init(Buffer *);
27void buffer_clear(Buffer *); 27void buffer_clear(Buffer *);
28void buffer_free(Buffer *); 28void buffer_free(Buffer *);
29 29
30u_int buffer_len(Buffer *); 30u_int buffer_len(const Buffer *);
31void *buffer_ptr(Buffer *); 31void *buffer_ptr(const Buffer *);
32 32
33void buffer_append(Buffer *, const void *, u_int); 33void buffer_append(Buffer *, const void *, u_int);
34void *buffer_append_space(Buffer *, u_int); 34void *buffer_append_space(Buffer *, u_int);
@@ -40,7 +40,7 @@ void buffer_get(Buffer *, void *, u_int);
40void buffer_consume(Buffer *, u_int); 40void buffer_consume(Buffer *, u_int);
41void buffer_consume_end(Buffer *, u_int); 41void buffer_consume_end(Buffer *, u_int);
42 42
43void buffer_dump(Buffer *); 43void buffer_dump(const Buffer *);
44 44
45int buffer_get_ret(Buffer *, void *, u_int); 45int buffer_get_ret(Buffer *, void *, u_int);
46int buffer_consume_ret(Buffer *, u_int); 46int buffer_consume_ret(Buffer *, u_int);
@@ -81,6 +81,7 @@ int buffer_get_short_ret(u_short *, Buffer *);
81int buffer_get_int_ret(u_int *, Buffer *); 81int buffer_get_int_ret(u_int *, Buffer *);
82int buffer_get_int64_ret(u_int64_t *, Buffer *); 82int buffer_get_int64_ret(u_int64_t *, Buffer *);
83void *buffer_get_string_ret(Buffer *, u_int *); 83void *buffer_get_string_ret(Buffer *, u_int *);
84void *buffer_get_string_ptr_ret(Buffer *, u_int *);
84int buffer_get_char_ret(char *, Buffer *); 85int buffer_get_char_ret(char *, Buffer *);
85 86
86#endif /* BUFFER_H */ 87#endif /* BUFFER_H */
diff --git a/canohost.c b/canohost.c
index 22b19bb9f..ef94d9155 100644
--- a/canohost.c
+++ b/canohost.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: canohost.c,v 1.65 2009/05/27 06:31:25 andreas Exp $ */ 1/* $OpenBSD: canohost.c,v 1.66 2010/01/13 01:20:20 dtucker 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
@@ -27,6 +27,7 @@
27#include <stdlib.h> 27#include <stdlib.h>
28#include <string.h> 28#include <string.h>
29#include <stdarg.h> 29#include <stdarg.h>
30#include <unistd.h>
30 31
31#include "xmalloc.h" 32#include "xmalloc.h"
32#include "packet.h" 33#include "packet.h"
@@ -301,9 +302,22 @@ get_local_ipaddr(int sock)
301} 302}
302 303
303char * 304char *
304get_local_name(int sock) 305get_local_name(int fd)
305{ 306{
306 return get_socket_address(sock, 0, NI_NAMEREQD); 307 char *host, myname[NI_MAXHOST];
308
309 /* Assume we were passed a socket */
310 if ((host = get_socket_address(fd, 0, NI_NAMEREQD)) != NULL)
311 return host;
312
313 /* Handle the case where we were passed a pipe */
314 if (gethostname(myname, sizeof(myname)) == -1) {
315 verbose("get_local_name: gethostname: %s", strerror(errno));
316 } else {
317 host = xstrdup(myname);
318 }
319
320 return host;
307} 321}
308 322
309void 323void
diff --git a/channels.c b/channels.c
index 94065a443..a55d27817 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.c,v 1.296 2009/05/25 06:48:00 andreas Exp $ */ 1/* $OpenBSD: channels.c,v 1.303 2010/01/30 21:12:08 djm 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
@@ -53,6 +53,7 @@
53#include <arpa/inet.h> 53#include <arpa/inet.h>
54 54
55#include <errno.h> 55#include <errno.h>
56#include <fcntl.h>
56#include <netdb.h> 57#include <netdb.h>
57#include <stdio.h> 58#include <stdio.h>
58#include <stdlib.h> 59#include <stdlib.h>
@@ -228,12 +229,16 @@ channel_register_fds(Channel *c, int rfd, int wfd, int efd,
228 channel_max_fd = MAX(channel_max_fd, wfd); 229 channel_max_fd = MAX(channel_max_fd, wfd);
229 channel_max_fd = MAX(channel_max_fd, efd); 230 channel_max_fd = MAX(channel_max_fd, efd);
230 231
231 /* XXX set close-on-exec -markus */ 232 if (rfd != -1)
233 fcntl(rfd, F_SETFD, FD_CLOEXEC);
234 if (wfd != -1 && wfd != rfd)
235 fcntl(wfd, F_SETFD, FD_CLOEXEC);
236 if (efd != -1 && efd != rfd && efd != wfd)
237 fcntl(efd, F_SETFD, FD_CLOEXEC);
232 238
233 c->rfd = rfd; 239 c->rfd = rfd;
234 c->wfd = wfd; 240 c->wfd = wfd;
235 c->sock = (rfd == wfd) ? rfd : -1; 241 c->sock = (rfd == wfd) ? rfd : -1;
236 c->ctl_fd = -1; /* XXX: set elsewhere */
237 c->efd = efd; 242 c->efd = efd;
238 c->extended_usage = extusage; 243 c->extended_usage = extusage;
239 244
@@ -322,6 +327,10 @@ channel_new(char *ctype, int type, int rfd, int wfd, int efd,
322 c->output_filter = NULL; 327 c->output_filter = NULL;
323 c->filter_ctx = NULL; 328 c->filter_ctx = NULL;
324 c->filter_cleanup = NULL; 329 c->filter_cleanup = NULL;
330 c->ctl_chan = -1;
331 c->mux_rcb = NULL;
332 c->mux_ctx = NULL;
333 c->delayed = 1; /* prevent call to channel_post handler */
325 TAILQ_INIT(&c->status_confirms); 334 TAILQ_INIT(&c->status_confirms);
326 debug("channel %d: new [%s]", found, remote_name); 335 debug("channel %d: new [%s]", found, remote_name);
327 return c; 336 return c;
@@ -363,11 +372,10 @@ channel_close_fd(int *fdp)
363static void 372static void
364channel_close_fds(Channel *c) 373channel_close_fds(Channel *c)
365{ 374{
366 debug3("channel %d: close_fds r %d w %d e %d c %d", 375 debug3("channel %d: close_fds r %d w %d e %d",
367 c->self, c->rfd, c->wfd, c->efd, c->ctl_fd); 376 c->self, c->rfd, c->wfd, c->efd);
368 377
369 channel_close_fd(&c->sock); 378 channel_close_fd(&c->sock);
370 channel_close_fd(&c->ctl_fd);
371 channel_close_fd(&c->rfd); 379 channel_close_fd(&c->rfd);
372 channel_close_fd(&c->wfd); 380 channel_close_fd(&c->wfd);
373 channel_close_fd(&c->efd); 381 channel_close_fd(&c->efd);
@@ -393,8 +401,6 @@ channel_free(Channel *c)
393 401
394 if (c->sock != -1) 402 if (c->sock != -1)
395 shutdown(c->sock, SHUT_RDWR); 403 shutdown(c->sock, SHUT_RDWR);
396 if (c->ctl_fd != -1)
397 shutdown(c->ctl_fd, SHUT_RDWR);
398 channel_close_fds(c); 404 channel_close_fds(c);
399 buffer_free(&c->input); 405 buffer_free(&c->input);
400 buffer_free(&c->output); 406 buffer_free(&c->output);
@@ -516,6 +522,7 @@ channel_still_open(void)
516 case SSH_CHANNEL_X11_LISTENER: 522 case SSH_CHANNEL_X11_LISTENER:
517 case SSH_CHANNEL_PORT_LISTENER: 523 case SSH_CHANNEL_PORT_LISTENER:
518 case SSH_CHANNEL_RPORT_LISTENER: 524 case SSH_CHANNEL_RPORT_LISTENER:
525 case SSH_CHANNEL_MUX_LISTENER:
519 case SSH_CHANNEL_CLOSED: 526 case SSH_CHANNEL_CLOSED:
520 case SSH_CHANNEL_AUTH_SOCKET: 527 case SSH_CHANNEL_AUTH_SOCKET:
521 case SSH_CHANNEL_DYNAMIC: 528 case SSH_CHANNEL_DYNAMIC:
@@ -529,6 +536,7 @@ channel_still_open(void)
529 case SSH_CHANNEL_OPENING: 536 case SSH_CHANNEL_OPENING:
530 case SSH_CHANNEL_OPEN: 537 case SSH_CHANNEL_OPEN:
531 case SSH_CHANNEL_X11_OPEN: 538 case SSH_CHANNEL_X11_OPEN:
539 case SSH_CHANNEL_MUX_CLIENT:
532 return 1; 540 return 1;
533 case SSH_CHANNEL_INPUT_DRAINING: 541 case SSH_CHANNEL_INPUT_DRAINING:
534 case SSH_CHANNEL_OUTPUT_DRAINING: 542 case SSH_CHANNEL_OUTPUT_DRAINING:
@@ -560,6 +568,8 @@ channel_find_open(void)
560 case SSH_CHANNEL_X11_LISTENER: 568 case SSH_CHANNEL_X11_LISTENER:
561 case SSH_CHANNEL_PORT_LISTENER: 569 case SSH_CHANNEL_PORT_LISTENER:
562 case SSH_CHANNEL_RPORT_LISTENER: 570 case SSH_CHANNEL_RPORT_LISTENER:
571 case SSH_CHANNEL_MUX_LISTENER:
572 case SSH_CHANNEL_MUX_CLIENT:
563 case SSH_CHANNEL_OPENING: 573 case SSH_CHANNEL_OPENING:
564 case SSH_CHANNEL_CONNECTING: 574 case SSH_CHANNEL_CONNECTING:
565 case SSH_CHANNEL_ZOMBIE: 575 case SSH_CHANNEL_ZOMBIE:
@@ -610,6 +620,8 @@ channel_open_message(void)
610 case SSH_CHANNEL_CLOSED: 620 case SSH_CHANNEL_CLOSED:
611 case SSH_CHANNEL_AUTH_SOCKET: 621 case SSH_CHANNEL_AUTH_SOCKET:
612 case SSH_CHANNEL_ZOMBIE: 622 case SSH_CHANNEL_ZOMBIE:
623 case SSH_CHANNEL_MUX_CLIENT:
624 case SSH_CHANNEL_MUX_LISTENER:
613 continue; 625 continue;
614 case SSH_CHANNEL_LARVAL: 626 case SSH_CHANNEL_LARVAL:
615 case SSH_CHANNEL_OPENING: 627 case SSH_CHANNEL_OPENING:
@@ -620,12 +632,12 @@ channel_open_message(void)
620 case SSH_CHANNEL_INPUT_DRAINING: 632 case SSH_CHANNEL_INPUT_DRAINING:
621 case SSH_CHANNEL_OUTPUT_DRAINING: 633 case SSH_CHANNEL_OUTPUT_DRAINING:
622 snprintf(buf, sizeof buf, 634 snprintf(buf, sizeof buf,
623 " #%d %.300s (t%d r%d i%d/%d o%d/%d fd %d/%d cfd %d)\r\n", 635 " #%d %.300s (t%d r%d i%d/%d o%d/%d fd %d/%d cc %d)\r\n",
624 c->self, c->remote_name, 636 c->self, c->remote_name,
625 c->type, c->remote_id, 637 c->type, c->remote_id,
626 c->istate, buffer_len(&c->input), 638 c->istate, buffer_len(&c->input),
627 c->ostate, buffer_len(&c->output), 639 c->ostate, buffer_len(&c->output),
628 c->rfd, c->wfd, c->ctl_fd); 640 c->rfd, c->wfd, c->ctl_chan);
629 buffer_append(&buffer, buf, strlen(buf)); 641 buffer_append(&buffer, buf, strlen(buf));
630 continue; 642 continue;
631 default: 643 default:
@@ -832,9 +844,6 @@ channel_pre_open(Channel *c, fd_set *readset, fd_set *writeset)
832 FD_SET(c->efd, readset); 844 FD_SET(c->efd, readset);
833 } 845 }
834 /* XXX: What about efd? races? */ 846 /* XXX: What about efd? races? */
835 if (compat20 && c->ctl_fd != -1 &&
836 c->istate == CHAN_INPUT_OPEN && c->ostate == CHAN_OUTPUT_OPEN)
837 FD_SET(c->ctl_fd, readset);
838} 847}
839 848
840/* ARGSUSED */ 849/* ARGSUSED */
@@ -979,6 +988,28 @@ channel_pre_x11_open(Channel *c, fd_set *readset, fd_set *writeset)
979 } 988 }
980} 989}
981 990
991static void
992channel_pre_mux_client(Channel *c, fd_set *readset, fd_set *writeset)
993{
994 if (c->istate == CHAN_INPUT_OPEN &&
995 buffer_check_alloc(&c->input, CHAN_RBUF))
996 FD_SET(c->rfd, readset);
997 if (c->istate == CHAN_INPUT_WAIT_DRAIN) {
998 /* clear buffer immediately (discard any partial packet) */
999 buffer_clear(&c->input);
1000 chan_ibuf_empty(c);
1001 /* Start output drain. XXX just kill chan? */
1002 chan_rcvd_oclose(c);
1003 }
1004 if (c->ostate == CHAN_OUTPUT_OPEN ||
1005 c->ostate == CHAN_OUTPUT_WAIT_DRAIN) {
1006 if (buffer_len(&c->output) > 0)
1007 FD_SET(c->wfd, writeset);
1008 else if (c->ostate == CHAN_OUTPUT_WAIT_DRAIN)
1009 chan_obuf_empty(c);
1010 }
1011}
1012
982/* try to decode a socks4 header */ 1013/* try to decode a socks4 header */
983/* ARGSUSED */ 1014/* ARGSUSED */
984static int 1015static int
@@ -1210,6 +1241,30 @@ channel_decode_socks5(Channel *c, fd_set *readset, fd_set *writeset)
1210 return 1; 1241 return 1;
1211} 1242}
1212 1243
1244Channel *
1245channel_connect_stdio_fwd(const char *host_to_connect, u_short port_to_connect,
1246 int in, int out)
1247{
1248 Channel *c;
1249
1250 debug("channel_connect_stdio_fwd %s:%d", host_to_connect,
1251 port_to_connect);
1252
1253 c = channel_new("stdio-forward", SSH_CHANNEL_OPENING, in, out,
1254 -1, CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT,
1255 0, "stdio-forward", /*nonblock*/0);
1256
1257 c->path = xstrdup(host_to_connect);
1258 c->host_port = port_to_connect;
1259 c->listening_port = 0;
1260 c->force_drain = 1;
1261
1262 channel_register_fds(c, in, out, -1, 0, 1, 0);
1263 port_open_helper(c, "direct-tcpip");
1264
1265 return c;
1266}
1267
1213/* dynamic port forwarding */ 1268/* dynamic port forwarding */
1214static void 1269static void
1215channel_pre_dynamic(Channel *c, fd_set *readset, fd_set *writeset) 1270channel_pre_dynamic(Channel *c, fd_set *readset, fd_set *writeset)
@@ -1219,7 +1274,6 @@ channel_pre_dynamic(Channel *c, fd_set *readset, fd_set *writeset)
1219 int ret; 1274 int ret;
1220 1275
1221 have = buffer_len(&c->input); 1276 have = buffer_len(&c->input);
1222 c->delayed = 0;
1223 debug2("channel %d: pre_dynamic: have %d", c->self, have); 1277 debug2("channel %d: pre_dynamic: have %d", c->self, have);
1224 /* buffer_dump(&c->input); */ 1278 /* buffer_dump(&c->input); */
1225 /* check if the fixed size part of the packet is in buffer. */ 1279 /* check if the fixed size part of the packet is in buffer. */
@@ -1322,6 +1376,13 @@ port_open_helper(Channel *c, char *rtype)
1322 char *remote_ipaddr = get_peer_ipaddr(c->sock); 1376 char *remote_ipaddr = get_peer_ipaddr(c->sock);
1323 int remote_port = get_peer_port(c->sock); 1377 int remote_port = get_peer_port(c->sock);
1324 1378
1379 if (remote_port == -1) {
1380 /* Fake addr/port to appease peers that validate it (Tectia) */
1381 xfree(remote_ipaddr);
1382 remote_ipaddr = xstrdup("127.0.0.1");
1383 remote_port = 65535;
1384 }
1385
1325 direct = (strcmp(rtype, "direct-tcpip") == 0); 1386 direct = (strcmp(rtype, "direct-tcpip") == 0);
1326 1387
1327 snprintf(buf, sizeof buf, 1388 snprintf(buf, sizeof buf,
@@ -1423,16 +1484,8 @@ channel_post_port_listener(Channel *c, fd_set *readset, fd_set *writeset)
1423 if (c->path != NULL) 1484 if (c->path != NULL)
1424 nc->path = xstrdup(c->path); 1485 nc->path = xstrdup(c->path);
1425 1486
1426 if (nextstate == SSH_CHANNEL_DYNAMIC) { 1487 if (nextstate != SSH_CHANNEL_DYNAMIC)
1427 /*
1428 * do not call the channel_post handler until
1429 * this flag has been reset by a pre-handler.
1430 * otherwise the FD_ISSET calls might overflow
1431 */
1432 nc->delayed = 1;
1433 } else {
1434 port_open_helper(nc, rtype); 1488 port_open_helper(nc, rtype);
1435 }
1436 } 1489 }
1437} 1490}
1438 1491
@@ -1722,36 +1775,6 @@ channel_handle_efd(Channel *c, fd_set *readset, fd_set *writeset)
1722 return 1; 1775 return 1;
1723} 1776}
1724 1777
1725/* ARGSUSED */
1726static int
1727channel_handle_ctl(Channel *c, fd_set *readset, fd_set *writeset)
1728{
1729 char buf[16];
1730 int len;
1731
1732 /* Monitor control fd to detect if the slave client exits */
1733 if (c->ctl_fd != -1 && FD_ISSET(c->ctl_fd, readset)) {
1734 len = read(c->ctl_fd, buf, sizeof(buf));
1735 if (len < 0 &&
1736 (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK))
1737 return 1;
1738 if (len <= 0) {
1739 debug2("channel %d: ctl read<=0", c->self);
1740 if (c->type != SSH_CHANNEL_OPEN) {
1741 debug2("channel %d: not open", c->self);
1742 chan_mark_dead(c);
1743 return -1;
1744 } else {
1745 chan_read_failed(c);
1746 chan_write_failed(c);
1747 }
1748 return -1;
1749 } else
1750 fatal("%s: unexpected data on ctl fd", __func__);
1751 }
1752 return 1;
1753}
1754
1755static int 1778static int
1756channel_check_window(Channel *c) 1779channel_check_window(Channel *c)
1757{ 1780{
@@ -1777,17 +1800,136 @@ channel_check_window(Channel *c)
1777static void 1800static void
1778channel_post_open(Channel *c, fd_set *readset, fd_set *writeset) 1801channel_post_open(Channel *c, fd_set *readset, fd_set *writeset)
1779{ 1802{
1780 if (c->delayed)
1781 return;
1782 channel_handle_rfd(c, readset, writeset); 1803 channel_handle_rfd(c, readset, writeset);
1783 channel_handle_wfd(c, readset, writeset); 1804 channel_handle_wfd(c, readset, writeset);
1784 if (!compat20) 1805 if (!compat20)
1785 return; 1806 return;
1786 channel_handle_efd(c, readset, writeset); 1807 channel_handle_efd(c, readset, writeset);
1787 channel_handle_ctl(c, readset, writeset);
1788 channel_check_window(c); 1808 channel_check_window(c);
1789} 1809}
1790 1810
1811static u_int
1812read_mux(Channel *c, u_int need)
1813{
1814 char buf[CHAN_RBUF];
1815 int len;
1816 u_int rlen;
1817
1818 if (buffer_len(&c->input) < need) {
1819 rlen = need - buffer_len(&c->input);
1820 len = read(c->rfd, buf, MIN(rlen, CHAN_RBUF));
1821 if (len <= 0) {
1822 if (errno != EINTR && errno != EAGAIN) {
1823 debug2("channel %d: ctl read<=0 rfd %d len %d",
1824 c->self, c->rfd, len);
1825 chan_read_failed(c);
1826 return 0;
1827 }
1828 } else
1829 buffer_append(&c->input, buf, len);
1830 }
1831 return buffer_len(&c->input);
1832}
1833
1834static void
1835channel_post_mux_client(Channel *c, fd_set *readset, fd_set *writeset)
1836{
1837 u_int need;
1838 ssize_t len;
1839
1840 if (!compat20)
1841 fatal("%s: entered with !compat20", __func__);
1842
1843 if (c->rfd != -1 && FD_ISSET(c->rfd, readset) &&
1844 (c->istate == CHAN_INPUT_OPEN ||
1845 c->istate == CHAN_INPUT_WAIT_DRAIN)) {
1846 /*
1847 * Don't not read past the precise end of packets to
1848 * avoid disrupting fd passing.
1849 */
1850 if (read_mux(c, 4) < 4) /* read header */
1851 return;
1852 need = get_u32(buffer_ptr(&c->input));
1853#define CHANNEL_MUX_MAX_PACKET (256 * 1024)
1854 if (need > CHANNEL_MUX_MAX_PACKET) {
1855 debug2("channel %d: packet too big %u > %u",
1856 c->self, CHANNEL_MUX_MAX_PACKET, need);
1857 chan_rcvd_oclose(c);
1858 return;
1859 }
1860 if (read_mux(c, need + 4) < need + 4) /* read body */
1861 return;
1862 if (c->mux_rcb(c) != 0) {
1863 debug("channel %d: mux_rcb failed", c->self);
1864 chan_mark_dead(c);
1865 return;
1866 }
1867 }
1868
1869 if (c->wfd != -1 && FD_ISSET(c->wfd, writeset) &&
1870 buffer_len(&c->output) > 0) {
1871 len = write(c->wfd, buffer_ptr(&c->output),
1872 buffer_len(&c->output));
1873 if (len < 0 && (errno == EINTR || errno == EAGAIN))
1874 return;
1875 if (len <= 0) {
1876 chan_mark_dead(c);
1877 return;
1878 }
1879 buffer_consume(&c->output, len);
1880 }
1881}
1882
1883static void
1884channel_post_mux_listener(Channel *c, fd_set *readset, fd_set *writeset)
1885{
1886 Channel *nc;
1887 struct sockaddr_storage addr;
1888 socklen_t addrlen;
1889 int newsock;
1890 uid_t euid;
1891 gid_t egid;
1892
1893 if (!FD_ISSET(c->sock, readset))
1894 return;
1895
1896 debug("multiplexing control connection");
1897
1898 /*
1899 * Accept connection on control socket
1900 */
1901 memset(&addr, 0, sizeof(addr));
1902 addrlen = sizeof(addr);
1903 if ((newsock = accept(c->sock, (struct sockaddr*)&addr,
1904 &addrlen)) == -1) {
1905 error("%s accept: %s", __func__, strerror(errno));
1906 return;
1907 }
1908
1909 if (getpeereid(newsock, &euid, &egid) < 0) {
1910 error("%s getpeereid failed: %s", __func__,
1911 strerror(errno));
1912 close(newsock);
1913 return;
1914 }
1915 if ((euid != 0) && (getuid() != euid)) {
1916 error("multiplex uid mismatch: peer euid %u != uid %u",
1917 (u_int)euid, (u_int)getuid());
1918 close(newsock);
1919 return;
1920 }
1921 nc = channel_new("multiplex client", SSH_CHANNEL_MUX_CLIENT,
1922 newsock, newsock, -1, c->local_window_max,
1923 c->local_maxpacket, 0, "mux-control", 1);
1924 nc->mux_rcb = c->mux_rcb;
1925 debug3("%s: new mux channel %d fd %d", __func__,
1926 nc->self, nc->sock);
1927 /* establish state */
1928 nc->mux_rcb(nc);
1929 /* mux state transitions must not elicit protocol messages */
1930 nc->flags |= CHAN_LOCAL;
1931}
1932
1791/* ARGSUSED */ 1933/* ARGSUSED */
1792static void 1934static void
1793channel_post_output_drain_13(Channel *c, fd_set *readset, fd_set *writeset) 1935channel_post_output_drain_13(Channel *c, fd_set *readset, fd_set *writeset)
@@ -1816,6 +1958,8 @@ channel_handler_init_20(void)
1816 channel_pre[SSH_CHANNEL_AUTH_SOCKET] = &channel_pre_listener; 1958 channel_pre[SSH_CHANNEL_AUTH_SOCKET] = &channel_pre_listener;
1817 channel_pre[SSH_CHANNEL_CONNECTING] = &channel_pre_connecting; 1959 channel_pre[SSH_CHANNEL_CONNECTING] = &channel_pre_connecting;
1818 channel_pre[SSH_CHANNEL_DYNAMIC] = &channel_pre_dynamic; 1960 channel_pre[SSH_CHANNEL_DYNAMIC] = &channel_pre_dynamic;
1961 channel_pre[SSH_CHANNEL_MUX_LISTENER] = &channel_pre_listener;
1962 channel_pre[SSH_CHANNEL_MUX_CLIENT] = &channel_pre_mux_client;
1819 1963
1820 channel_post[SSH_CHANNEL_OPEN] = &channel_post_open; 1964 channel_post[SSH_CHANNEL_OPEN] = &channel_post_open;
1821 channel_post[SSH_CHANNEL_PORT_LISTENER] = &channel_post_port_listener; 1965 channel_post[SSH_CHANNEL_PORT_LISTENER] = &channel_post_port_listener;
@@ -1824,6 +1968,8 @@ channel_handler_init_20(void)
1824 channel_post[SSH_CHANNEL_AUTH_SOCKET] = &channel_post_auth_listener; 1968 channel_post[SSH_CHANNEL_AUTH_SOCKET] = &channel_post_auth_listener;
1825 channel_post[SSH_CHANNEL_CONNECTING] = &channel_post_connecting; 1969 channel_post[SSH_CHANNEL_CONNECTING] = &channel_post_connecting;
1826 channel_post[SSH_CHANNEL_DYNAMIC] = &channel_post_open; 1970 channel_post[SSH_CHANNEL_DYNAMIC] = &channel_post_open;
1971 channel_post[SSH_CHANNEL_MUX_LISTENER] = &channel_post_mux_listener;
1972 channel_post[SSH_CHANNEL_MUX_CLIENT] = &channel_post_mux_client;
1827} 1973}
1828 1974
1829static void 1975static void
@@ -1910,17 +2056,23 @@ static void
1910channel_handler(chan_fn *ftab[], fd_set *readset, fd_set *writeset) 2056channel_handler(chan_fn *ftab[], fd_set *readset, fd_set *writeset)
1911{ 2057{
1912 static int did_init = 0; 2058 static int did_init = 0;
1913 u_int i; 2059 u_int i, oalloc;
1914 Channel *c; 2060 Channel *c;
1915 2061
1916 if (!did_init) { 2062 if (!did_init) {
1917 channel_handler_init(); 2063 channel_handler_init();
1918 did_init = 1; 2064 did_init = 1;
1919 } 2065 }
1920 for (i = 0; i < channels_alloc; i++) { 2066 for (i = 0, oalloc = channels_alloc; i < oalloc; i++) {
1921 c = channels[i]; 2067 c = channels[i];
1922 if (c == NULL) 2068 if (c == NULL)
1923 continue; 2069 continue;
2070 if (c->delayed) {
2071 if (ftab == channel_pre)
2072 c->delayed = 0;
2073 else
2074 continue;
2075 }
1924 if (ftab[c->type] != NULL) 2076 if (ftab[c->type] != NULL)
1925 (*ftab[c->type])(c, readset, writeset); 2077 (*ftab[c->type])(c, readset, writeset);
1926 channel_garbage_collect(c); 2078 channel_garbage_collect(c);
@@ -2577,6 +2729,8 @@ channel_setup_fwd_listener(int type, const char *listen_addr,
2577 } 2729 }
2578 2730
2579 channel_set_reuseaddr(sock); 2731 channel_set_reuseaddr(sock);
2732 if (ai->ai_family == AF_INET6)
2733 sock_set_v6only(sock);
2580 2734
2581 debug("Local forwarding listening on %s port %s.", 2735 debug("Local forwarding listening on %s port %s.",
2582 ntop, strport); 2736 ntop, strport);
@@ -3112,13 +3266,8 @@ x11_create_display_inet(int x11_display_offset, int x11_use_localhost,
3112 continue; 3266 continue;
3113 } 3267 }
3114 } 3268 }
3115#ifdef IPV6_V6ONLY 3269 if (ai->ai_family == AF_INET6)
3116 if (ai->ai_family == AF_INET6) { 3270 sock_set_v6only(sock);
3117 int on = 1;
3118 if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on)) < 0)
3119 error("setsockopt IPV6_V6ONLY: %.100s", strerror(errno));
3120 }
3121#endif
3122 if (x11_use_localhost) 3271 if (x11_use_localhost)
3123 channel_set_reuseaddr(sock); 3272 channel_set_reuseaddr(sock);
3124 if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) { 3273 if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
diff --git a/channels.h b/channels.h
index 1488ed7e5..cc71885f4 100644
--- a/channels.h
+++ b/channels.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.h,v 1.98 2009/02/12 03:00:56 djm Exp $ */ 1/* $OpenBSD: channels.h,v 1.103 2010/01/26 01:28:35 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -53,7 +53,9 @@
53#define SSH_CHANNEL_CONNECTING 12 53#define SSH_CHANNEL_CONNECTING 12
54#define SSH_CHANNEL_DYNAMIC 13 54#define SSH_CHANNEL_DYNAMIC 13
55#define SSH_CHANNEL_ZOMBIE 14 /* Almost dead. */ 55#define SSH_CHANNEL_ZOMBIE 14 /* Almost dead. */
56#define SSH_CHANNEL_MAX_TYPE 15 56#define SSH_CHANNEL_MUX_LISTENER 15 /* Listener for mux conn. */
57#define SSH_CHANNEL_MUX_CLIENT 16 /* Conn. to mux slave */
58#define SSH_CHANNEL_MAX_TYPE 17
57 59
58struct Channel; 60struct Channel;
59typedef struct Channel Channel; 61typedef struct Channel Channel;
@@ -81,6 +83,9 @@ struct channel_connect {
81 struct addrinfo *ai, *aitop; 83 struct addrinfo *ai, *aitop;
82}; 84};
83 85
86/* Callbacks for mux channels back into client-specific code */
87typedef int mux_callback_fn(struct Channel *);
88
84struct Channel { 89struct Channel {
85 int type; /* channel type/state */ 90 int type; /* channel type/state */
86 int self; /* my own channel identifier */ 91 int self; /* my own channel identifier */
@@ -92,12 +97,16 @@ struct Channel {
92 int wfd; /* write fd */ 97 int wfd; /* write fd */
93 int efd; /* extended fd */ 98 int efd; /* extended fd */
94 int sock; /* sock fd */ 99 int sock; /* sock fd */
95 int ctl_fd; /* control fd (client sharing) */ 100 int ctl_chan; /* control channel (multiplexed connections) */
96 int isatty; /* rfd is a tty */ 101 int isatty; /* rfd is a tty */
97 int wfd_isatty; /* wfd is a tty */ 102 int wfd_isatty; /* wfd is a tty */
98 int client_tty; /* (client) TTY has been requested */ 103 int client_tty; /* (client) TTY has been requested */
99 int force_drain; /* force close on iEOF */ 104 int force_drain; /* force close on iEOF */
100 int delayed; /* fdset hack */ 105 int delayed; /* post-select handlers for newly created
106 * channels are delayed until the first call
107 * to a matching pre-select handler.
108 * this way post-select handlers are not
109 * accidenly called if a FD gets reused */
101 Buffer input; /* data read from socket, to be sent over 110 Buffer input; /* data read from socket, to be sent over
102 * encrypted connection */ 111 * encrypted connection */
103 Buffer output; /* data received over encrypted connection for 112 Buffer output; /* data received over encrypted connection for
@@ -138,6 +147,10 @@ struct Channel {
138 147
139 /* non-blocking connect */ 148 /* non-blocking connect */
140 struct channel_connect connect_ctx; 149 struct channel_connect connect_ctx;
150
151 /* multiplexing protocol hook, called for each packet received */
152 mux_callback_fn *mux_rcb;
153 void *mux_ctx;
141}; 154};
142 155
143#define CHAN_EXTENDED_IGNORE 0 156#define CHAN_EXTENDED_IGNORE 0
@@ -168,6 +181,7 @@ struct Channel {
168#define CHAN_CLOSE_RCVD 0x02 181#define CHAN_CLOSE_RCVD 0x02
169#define CHAN_EOF_SENT 0x04 182#define CHAN_EOF_SENT 0x04
170#define CHAN_EOF_RCVD 0x08 183#define CHAN_EOF_RCVD 0x08
184#define CHAN_LOCAL 0x10
171 185
172#define CHAN_RBUF 16*1024 186#define CHAN_RBUF 16*1024
173 187
@@ -239,6 +253,7 @@ void channel_clear_adm_permitted_opens(void);
239void channel_print_adm_permitted_opens(void); 253void channel_print_adm_permitted_opens(void);
240int channel_input_port_forward_request(int, int); 254int channel_input_port_forward_request(int, int);
241Channel *channel_connect_to(const char *, u_short, char *, char *); 255Channel *channel_connect_to(const char *, u_short, char *, char *);
256Channel *channel_connect_stdio_fwd(const char*, u_short, int, int);
242Channel *channel_connect_by_listen_address(u_short, char *, char *); 257Channel *channel_connect_by_listen_address(u_short, char *, char *);
243int channel_request_remote_forwarding(const char *, u_short, 258int channel_request_remote_forwarding(const char *, u_short,
244 const char *, u_short); 259 const char *, u_short);
diff --git a/clientloop.c b/clientloop.c
index cea0d617a..a55fe9995 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.c,v 1.213 2009/07/05 19:28:33 stevesk Exp $ */ 1/* $OpenBSD: clientloop.c,v 1.218 2010/01/28 00:21:18 djm 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
@@ -125,7 +125,7 @@ extern int stdin_null_flag;
125extern int no_shell_flag; 125extern int no_shell_flag;
126 126
127/* Control socket */ 127/* Control socket */
128extern int muxserver_sock; 128extern int muxserver_sock; /* XXX use mux_client_cleanup() instead */
129 129
130/* 130/*
131 * Name of the host we are connecting to. This is the name given on the 131 * Name of the host we are connecting to. This is the name given on the
@@ -134,6 +134,9 @@ extern int muxserver_sock;
134 */ 134 */
135extern char *host; 135extern char *host;
136 136
137/* Force TTY allocation */
138extern int force_tty_flag;
139
137/* 140/*
138 * Flag to indicate that we have received a window change signal which has 141 * Flag to indicate that we have received a window change signal which has
139 * not yet been processed. This will cause a message indicating the new 142 * not yet been processed. This will cause a message indicating the new
@@ -147,7 +150,7 @@ static volatile sig_atomic_t received_signal = 0;
147static int in_non_blocking_mode = 0; 150static int in_non_blocking_mode = 0;
148 151
149/* Common data for the client loop code. */ 152/* Common data for the client loop code. */
150static volatile sig_atomic_t quit_pending; /* Set non-zero to quit the loop. */ 153volatile sig_atomic_t quit_pending; /* Set non-zero to quit the loop. */
151static int escape_char1; /* Escape character. (proto1 only) */ 154static int escape_char1; /* Escape character. (proto1 only) */
152static int escape_pending1; /* Last character was an escape (proto1 only) */ 155static int escape_pending1; /* Last character was an escape (proto1 only) */
153static int last_was_cr; /* Last character was a newline. */ 156static int last_was_cr; /* Last character was a newline. */
@@ -165,6 +168,8 @@ static int session_closed = 0; /* In SSH2: login session closed. */
165static void client_init_dispatch(void); 168static void client_init_dispatch(void);
166int session_ident = -1; 169int session_ident = -1;
167 170
171int session_resumed = 0;
172
168/* Track escape per proto2 channel */ 173/* Track escape per proto2 channel */
169struct escape_filter_ctx { 174struct escape_filter_ctx {
170 int escape_pending; 175 int escape_pending;
@@ -568,9 +573,6 @@ client_wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp,
568 if (packet_have_data_to_write()) 573 if (packet_have_data_to_write())
569 FD_SET(connection_out, *writesetp); 574 FD_SET(connection_out, *writesetp);
570 575
571 if (muxserver_sock != -1)
572 FD_SET(muxserver_sock, *readsetp);
573
574 /* 576 /*
575 * Wait for something to happen. This will suspend the process until 577 * Wait for something to happen. This will suspend the process until
576 * some selected descriptor can be read, written, or has some other 578 * some selected descriptor can be read, written, or has some other
@@ -617,7 +619,7 @@ client_suspend_self(Buffer *bin, Buffer *bout, Buffer *berr)
617 atomicio(vwrite, fileno(stderr), buffer_ptr(berr), 619 atomicio(vwrite, fileno(stderr), buffer_ptr(berr),
618 buffer_len(berr)); 620 buffer_len(berr));
619 621
620 leave_raw_mode(); 622 leave_raw_mode(force_tty_flag);
621 623
622 /* 624 /*
623 * Free (and clear) the buffer to reduce the amount of data that gets 625 * Free (and clear) the buffer to reduce the amount of data that gets
@@ -638,7 +640,7 @@ client_suspend_self(Buffer *bin, Buffer *bout, Buffer *berr)
638 buffer_init(bout); 640 buffer_init(bout);
639 buffer_init(berr); 641 buffer_init(berr);
640 642
641 enter_raw_mode(); 643 enter_raw_mode(force_tty_flag);
642} 644}
643 645
644static void 646static void
@@ -699,7 +701,7 @@ client_status_confirm(int type, Channel *c, void *ctx)
699 701
700 /* XXX supress on mux _client_ quietmode */ 702 /* XXX supress on mux _client_ quietmode */
701 tochan = options.log_level >= SYSLOG_LEVEL_ERROR && 703 tochan = options.log_level >= SYSLOG_LEVEL_ERROR &&
702 c->ctl_fd != -1 && c->extended_usage == CHAN_EXTENDED_WRITE; 704 c->ctl_chan != -1 && c->extended_usage == CHAN_EXTENDED_WRITE;
703 705
704 if (type == SSH2_MSG_CHANNEL_SUCCESS) { 706 if (type == SSH2_MSG_CHANNEL_SUCCESS) {
705 debug2("%s request accepted on channel %d", 707 debug2("%s request accepted on channel %d",
@@ -781,7 +783,7 @@ process_cmdline(void)
781 bzero(&fwd, sizeof(fwd)); 783 bzero(&fwd, sizeof(fwd));
782 fwd.listen_host = fwd.connect_host = NULL; 784 fwd.listen_host = fwd.connect_host = NULL;
783 785
784 leave_raw_mode(); 786 leave_raw_mode(force_tty_flag);
785 handler = signal(SIGINT, SIG_IGN); 787 handler = signal(SIGINT, SIG_IGN);
786 cmd = s = read_passphrase("\r\nssh> ", RP_ECHO); 788 cmd = s = read_passphrase("\r\nssh> ", RP_ECHO);
787 if (s == NULL) 789 if (s == NULL)
@@ -843,6 +845,7 @@ process_cmdline(void)
843 while (isspace(*++s)) 845 while (isspace(*++s))
844 ; 846 ;
845 847
848 /* XXX update list of forwards in options */
846 if (delete) { 849 if (delete) {
847 cancel_port = 0; 850 cancel_port = 0;
848 cancel_host = hpdelim(&s); /* may be NULL */ 851 cancel_host = hpdelim(&s); /* may be NULL */
@@ -884,7 +887,7 @@ process_cmdline(void)
884 887
885out: 888out:
886 signal(SIGINT, handler); 889 signal(SIGINT, handler);
887 enter_raw_mode(); 890 enter_raw_mode(force_tty_flag);
888 if (cmd) 891 if (cmd)
889 xfree(cmd); 892 xfree(cmd);
890 if (fwd.listen_host != NULL) 893 if (fwd.listen_host != NULL)
@@ -940,7 +943,7 @@ process_escapes(Channel *c, Buffer *bin, Buffer *bout, Buffer *berr,
940 escape_char); 943 escape_char);
941 buffer_append(berr, string, strlen(string)); 944 buffer_append(berr, string, strlen(string));
942 945
943 if (c && c->ctl_fd != -1) { 946 if (c && c->ctl_chan != -1) {
944 chan_read_failed(c); 947 chan_read_failed(c);
945 chan_write_failed(c); 948 chan_write_failed(c);
946 return 0; 949 return 0;
@@ -950,7 +953,7 @@ process_escapes(Channel *c, Buffer *bin, Buffer *bout, Buffer *berr,
950 953
951 case 'Z' - 64: 954 case 'Z' - 64:
952 /* XXX support this for mux clients */ 955 /* XXX support this for mux clients */
953 if (c && c->ctl_fd != -1) { 956 if (c && c->ctl_chan != -1) {
954 noescape: 957 noescape:
955 snprintf(string, sizeof string, 958 snprintf(string, sizeof string,
956 "%c%c escape not available to " 959 "%c%c escape not available to "
@@ -995,7 +998,7 @@ process_escapes(Channel *c, Buffer *bin, Buffer *bout, Buffer *berr,
995 continue; 998 continue;
996 999
997 case '&': 1000 case '&':
998 if (c && c->ctl_fd != -1) 1001 if (c && c->ctl_chan != -1)
999 goto noescape; 1002 goto noescape;
1000 /* 1003 /*
1001 * Detach the program (continue to serve 1004 * Detach the program (continue to serve
@@ -1003,7 +1006,7 @@ process_escapes(Channel *c, Buffer *bin, Buffer *bout, Buffer *berr,
1003 * more new connections). 1006 * more new connections).
1004 */ 1007 */
1005 /* Restore tty modes. */ 1008 /* Restore tty modes. */
1006 leave_raw_mode(); 1009 leave_raw_mode(force_tty_flag);
1007 1010
1008 /* Stop listening for new connections. */ 1011 /* Stop listening for new connections. */
1009 channel_stop_listening(); 1012 channel_stop_listening();
@@ -1046,7 +1049,7 @@ process_escapes(Channel *c, Buffer *bin, Buffer *bout, Buffer *berr,
1046 continue; 1049 continue;
1047 1050
1048 case '?': 1051 case '?':
1049 if (c && c->ctl_fd != -1) { 1052 if (c && c->ctl_chan != -1) {
1050 snprintf(string, sizeof string, 1053 snprintf(string, sizeof string,
1051"%c?\r\n\ 1054"%c?\r\n\
1052Supported escape sequences:\r\n\ 1055Supported escape sequences:\r\n\
@@ -1095,7 +1098,7 @@ Supported escape sequences:\r\n\
1095 continue; 1098 continue;
1096 1099
1097 case 'C': 1100 case 'C':
1098 if (c && c->ctl_fd != -1) 1101 if (c && c->ctl_chan != -1)
1099 goto noescape; 1102 goto noescape;
1100 process_cmdline(); 1103 process_cmdline();
1101 continue; 1104 continue;
@@ -1298,7 +1301,7 @@ client_channel_closed(int id, void *arg)
1298{ 1301{
1299 channel_cancel_cleanup(id); 1302 channel_cancel_cleanup(id);
1300 session_closed = 1; 1303 session_closed = 1;
1301 leave_raw_mode(); 1304 leave_raw_mode(force_tty_flag);
1302} 1305}
1303 1306
1304/* 1307/*
@@ -1331,8 +1334,6 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
1331 connection_in = packet_get_connection_in(); 1334 connection_in = packet_get_connection_in();
1332 connection_out = packet_get_connection_out(); 1335 connection_out = packet_get_connection_out();
1333 max_fd = MAX(connection_in, connection_out); 1336 max_fd = MAX(connection_in, connection_out);
1334 if (muxserver_sock != -1)
1335 max_fd = MAX(max_fd, muxserver_sock);
1336 1337
1337 if (!compat20) { 1338 if (!compat20) {
1338 /* enable nonblocking unless tty */ 1339 /* enable nonblocking unless tty */
@@ -1371,7 +1372,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
1371 signal(SIGWINCH, window_change_handler); 1372 signal(SIGWINCH, window_change_handler);
1372 1373
1373 if (have_pty) 1374 if (have_pty)
1374 enter_raw_mode(); 1375 enter_raw_mode(force_tty_flag);
1375 1376
1376 if (compat20) { 1377 if (compat20) {
1377 session_ident = ssh2_chan_id; 1378 session_ident = ssh2_chan_id;
@@ -1459,12 +1460,6 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
1459 /* Buffer input from the connection. */ 1460 /* Buffer input from the connection. */
1460 client_process_net_input(readset); 1461 client_process_net_input(readset);
1461 1462
1462 /* Accept control connections. */
1463 if (muxserver_sock != -1 &&FD_ISSET(muxserver_sock, readset)) {
1464 if (muxserver_accept_control())
1465 quit_pending = 1;
1466 }
1467
1468 if (quit_pending) 1463 if (quit_pending)
1469 break; 1464 break;
1470 1465
@@ -1478,6 +1473,14 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
1478 client_process_output(writeset); 1473 client_process_output(writeset);
1479 } 1474 }
1480 1475
1476 if (session_resumed) {
1477 connection_in = packet_get_connection_in();
1478 connection_out = packet_get_connection_out();
1479 max_fd = MAX(max_fd, connection_out);
1480 max_fd = MAX(max_fd, connection_in);
1481 session_resumed = 0;
1482 }
1483
1481 /* 1484 /*
1482 * Send as much buffered packet data as possible to the 1485 * Send as much buffered packet data as possible to the
1483 * sender. 1486 * sender.
@@ -1506,7 +1509,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
1506 channel_free_all(); 1509 channel_free_all();
1507 1510
1508 if (have_pty) 1511 if (have_pty)
1509 leave_raw_mode(); 1512 leave_raw_mode(force_tty_flag);
1510 1513
1511 /* restore blocking io */ 1514 /* restore blocking io */
1512 if (!isatty(fileno(stdin))) 1515 if (!isatty(fileno(stdin)))
@@ -1866,15 +1869,17 @@ client_input_channel_req(int type, u_int32_t seq, void *ctxt)
1866 chan_rcvd_eow(c); 1869 chan_rcvd_eow(c);
1867 } else if (strcmp(rtype, "exit-status") == 0) { 1870 } else if (strcmp(rtype, "exit-status") == 0) {
1868 exitval = packet_get_int(); 1871 exitval = packet_get_int();
1869 if (id == session_ident) { 1872 if (c->ctl_chan != -1) {
1873 mux_exit_message(c, exitval);
1874 success = 1;
1875 } else if (id == session_ident) {
1876 /* Record exit value of local session */
1870 success = 1; 1877 success = 1;
1871 exit_status = exitval; 1878 exit_status = exitval;
1872 } else if (c->ctl_fd == -1) {
1873 error("client_input_channel_req: unexpected channel %d",
1874 session_ident);
1875 } else { 1879 } else {
1876 atomicio(vwrite, c->ctl_fd, &exitval, sizeof(exitval)); 1880 /* Probably for a mux channel that has already closed */
1877 success = 1; 1881 debug("%s: no sink for exit-status on channel %d",
1882 __func__, id);
1878 } 1883 }
1879 packet_check_eom(); 1884 packet_check_eom();
1880 } 1885 }
@@ -2070,7 +2075,7 @@ client_init_dispatch(void)
2070void 2075void
2071cleanup_exit(int i) 2076cleanup_exit(int i)
2072{ 2077{
2073 leave_raw_mode(); 2078 leave_raw_mode(force_tty_flag);
2074 leave_non_blocking(); 2079 leave_non_blocking();
2075 if (options.control_path != NULL && muxserver_sock != -1) 2080 if (options.control_path != NULL && muxserver_sock != -1)
2076 unlink(options.control_path); 2081 unlink(options.control_path);
diff --git a/clientloop.h b/clientloop.h
index 8bb874b38..0b8257b99 100644
--- a/clientloop.h
+++ b/clientloop.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.h,v 1.22 2008/06/12 15:19:17 djm Exp $ */ 1/* $OpenBSD: clientloop.h,v 1.23 2010/01/26 01:28:35 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -56,18 +56,14 @@ typedef void global_confirm_cb(int, u_int32_t seq, void *);
56void client_register_global_confirm(global_confirm_cb *, void *); 56void client_register_global_confirm(global_confirm_cb *, void *);
57 57
58/* Multiplexing protocol version */ 58/* Multiplexing protocol version */
59#define SSHMUX_VER 2 59#define SSHMUX_VER 4
60 60
61/* Multiplexing control protocol flags */ 61/* Multiplexing control protocol flags */
62#define SSHMUX_COMMAND_OPEN 1 /* Open new connection */ 62#define SSHMUX_COMMAND_OPEN 1 /* Open new connection */
63#define SSHMUX_COMMAND_ALIVE_CHECK 2 /* Check master is alive */ 63#define SSHMUX_COMMAND_ALIVE_CHECK 2 /* Check master is alive */
64#define SSHMUX_COMMAND_TERMINATE 3 /* Ask master to exit */ 64#define SSHMUX_COMMAND_TERMINATE 3 /* Ask master to exit */
65 65#define SSHMUX_COMMAND_STDIO_FWD 4 /* Open stdio fwd (ssh -W) */
66#define SSHMUX_FLAG_TTY (1) /* Request tty on open */
67#define SSHMUX_FLAG_SUBSYS (1<<1) /* Subsystem request on open */
68#define SSHMUX_FLAG_X11_FWD (1<<2) /* Request X11 forwarding */
69#define SSHMUX_FLAG_AGENT_FWD (1<<3) /* Request agent forwarding */
70 66
71void muxserver_listen(void); 67void muxserver_listen(void);
72int muxserver_accept_control(void);
73void muxclient(const char *); 68void muxclient(const char *);
69void mux_exit_message(Channel *, int);
diff --git a/config.guess b/config.guess
index e3a2116a7..c2246a4f7 100755
--- a/config.guess
+++ b/config.guess
@@ -1,10 +1,10 @@
1#! /bin/sh 1#! /bin/sh
2# Attempt to guess a canonical system name. 2# Attempt to guess a canonical system name.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5# Free Software Foundation, Inc. 5# Free Software Foundation, Inc.
6 6
7timestamp='2009-06-10' 7timestamp='2009-12-30'
8 8
9# This file is free software; you can redistribute it and/or modify it 9# This file is free software; you can redistribute it and/or modify it
10# under the terms of the GNU General Public License as published by 10# under the terms of the GNU General Public License as published by
@@ -27,16 +27,16 @@ timestamp='2009-06-10'
27# the same distribution terms that you use for the rest of that program. 27# the same distribution terms that you use for the rest of that program.
28 28
29 29
30# Originally written by Per Bothner <per@bothner.com>. 30# Originally written by Per Bothner. Please send patches (context
31# Please send patches to <config-patches@gnu.org>. Submit a context 31# diff format) to <config-patches@gnu.org> and include a ChangeLog
32# diff and a properly formatted ChangeLog entry. 32# entry.
33# 33#
34# This script attempts to guess a canonical system name similar to 34# This script attempts to guess a canonical system name similar to
35# config.sub. If it succeeds, it prints the system name on stdout, and 35# config.sub. If it succeeds, it prints the system name on stdout, and
36# exits with 0. Otherwise, it exits with 1. 36# exits with 0. Otherwise, it exits with 1.
37# 37#
38# The plan is that this can be called by configure scripts if you 38# You can get the latest version of this script from:
39# don't specify an explicit build system type. 39# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
40 40
41me=`echo "$0" | sed -e 's,.*/,,'` 41me=`echo "$0" | sed -e 's,.*/,,'`
42 42
@@ -56,8 +56,9 @@ version="\
56GNU config.guess ($timestamp) 56GNU config.guess ($timestamp)
57 57
58Originally written by Per Bothner. 58Originally written by Per Bothner.
59Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 59Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
602002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 602001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
61Software Foundation, Inc.
61 62
62This is free software; see the source for copying conditions. There is NO 63This is free software; see the source for copying conditions. There is NO
63warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 64warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -333,6 +334,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
333 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 334 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
334 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 335 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
335 exit ;; 336 exit ;;
337 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
338 echo i386-pc-auroraux${UNAME_RELEASE}
339 exit ;;
336 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 340 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
337 eval $set_cc_for_build 341 eval $set_cc_for_build
338 SUN_ARCH="i386" 342 SUN_ARCH="i386"
@@ -807,12 +811,12 @@ EOF
807 i*:PW*:*) 811 i*:PW*:*)
808 echo ${UNAME_MACHINE}-pc-pw32 812 echo ${UNAME_MACHINE}-pc-pw32
809 exit ;; 813 exit ;;
810 *:Interix*:[3456]*) 814 *:Interix*:*)
811 case ${UNAME_MACHINE} in 815 case ${UNAME_MACHINE} in
812 x86) 816 x86)
813 echo i586-pc-interix${UNAME_RELEASE} 817 echo i586-pc-interix${UNAME_RELEASE}
814 exit ;; 818 exit ;;
815 EM64T | authenticamd | genuineintel) 819 authenticamd | genuineintel | EM64T)
816 echo x86_64-unknown-interix${UNAME_RELEASE} 820 echo x86_64-unknown-interix${UNAME_RELEASE}
817 exit ;; 821 exit ;;
818 IA64) 822 IA64)
@@ -854,6 +858,20 @@ EOF
854 i*86:Minix:*:*) 858 i*86:Minix:*:*)
855 echo ${UNAME_MACHINE}-pc-minix 859 echo ${UNAME_MACHINE}-pc-minix
856 exit ;; 860 exit ;;
861 alpha:Linux:*:*)
862 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
863 EV5) UNAME_MACHINE=alphaev5 ;;
864 EV56) UNAME_MACHINE=alphaev56 ;;
865 PCA56) UNAME_MACHINE=alphapca56 ;;
866 PCA57) UNAME_MACHINE=alphapca56 ;;
867 EV6) UNAME_MACHINE=alphaev6 ;;
868 EV67) UNAME_MACHINE=alphaev67 ;;
869 EV68*) UNAME_MACHINE=alphaev68 ;;
870 esac
871 objdump --private-headers /bin/sh | grep -q ld.so.1
872 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
873 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
874 exit ;;
857 arm*:Linux:*:*) 875 arm*:Linux:*:*)
858 eval $set_cc_for_build 876 eval $set_cc_for_build
859 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 877 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -876,6 +894,17 @@ EOF
876 frv:Linux:*:*) 894 frv:Linux:*:*)
877 echo frv-unknown-linux-gnu 895 echo frv-unknown-linux-gnu
878 exit ;; 896 exit ;;
897 i*86:Linux:*:*)
898 LIBC=gnu
899 eval $set_cc_for_build
900 sed 's/^ //' << EOF >$dummy.c
901 #ifdef __dietlibc__
902 LIBC=dietlibc
903 #endif
904EOF
905 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
906 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
907 exit ;;
879 ia64:Linux:*:*) 908 ia64:Linux:*:*)
880 echo ${UNAME_MACHINE}-unknown-linux-gnu 909 echo ${UNAME_MACHINE}-unknown-linux-gnu
881 exit ;; 910 exit ;;
@@ -901,39 +930,18 @@ EOF
901 #endif 930 #endif
902 #endif 931 #endif
903EOF 932EOF
904 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 933 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
905 /^CPU/{
906 s: ::g
907 p
908 }'`"
909 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 934 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
910 ;; 935 ;;
911 or32:Linux:*:*) 936 or32:Linux:*:*)
912 echo or32-unknown-linux-gnu 937 echo or32-unknown-linux-gnu
913 exit ;; 938 exit ;;
914 ppc:Linux:*:*)
915 echo powerpc-unknown-linux-gnu
916 exit ;;
917 ppc64:Linux:*:*)
918 echo powerpc64-unknown-linux-gnu
919 exit ;;
920 alpha:Linux:*:*)
921 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
922 EV5) UNAME_MACHINE=alphaev5 ;;
923 EV56) UNAME_MACHINE=alphaev56 ;;
924 PCA56) UNAME_MACHINE=alphapca56 ;;
925 PCA57) UNAME_MACHINE=alphapca56 ;;
926 EV6) UNAME_MACHINE=alphaev6 ;;
927 EV67) UNAME_MACHINE=alphaev67 ;;
928 EV68*) UNAME_MACHINE=alphaev68 ;;
929 esac
930 objdump --private-headers /bin/sh | grep -q ld.so.1
931 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
932 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
933 exit ;;
934 padre:Linux:*:*) 939 padre:Linux:*:*)
935 echo sparc-unknown-linux-gnu 940 echo sparc-unknown-linux-gnu
936 exit ;; 941 exit ;;
942 parisc64:Linux:*:* | hppa64:Linux:*:*)
943 echo hppa64-unknown-linux-gnu
944 exit ;;
937 parisc:Linux:*:* | hppa:Linux:*:*) 945 parisc:Linux:*:* | hppa:Linux:*:*)
938 # Look for CPU level 946 # Look for CPU level
939 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 947 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -942,8 +950,11 @@ EOF
942 *) echo hppa-unknown-linux-gnu ;; 950 *) echo hppa-unknown-linux-gnu ;;
943 esac 951 esac
944 exit ;; 952 exit ;;
945 parisc64:Linux:*:* | hppa64:Linux:*:*) 953 ppc64:Linux:*:*)
946 echo hppa64-unknown-linux-gnu 954 echo powerpc64-unknown-linux-gnu
955 exit ;;
956 ppc:Linux:*:*)
957 echo powerpc-unknown-linux-gnu
947 exit ;; 958 exit ;;
948 s390:Linux:*:* | s390x:Linux:*:*) 959 s390:Linux:*:* | s390x:Linux:*:*)
949 echo ${UNAME_MACHINE}-ibm-linux 960 echo ${UNAME_MACHINE}-ibm-linux
@@ -966,58 +977,6 @@ EOF
966 xtensa*:Linux:*:*) 977 xtensa*:Linux:*:*)
967 echo ${UNAME_MACHINE}-unknown-linux-gnu 978 echo ${UNAME_MACHINE}-unknown-linux-gnu
968 exit ;; 979 exit ;;
969 i*86:Linux:*:*)
970 # The BFD linker knows what the default object file format is, so
971 # first see if it will tell us. cd to the root directory to prevent
972 # problems with other programs or directories called `ld' in the path.
973 # Set LC_ALL=C to ensure ld outputs messages in English.
974 ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
975 | sed -ne '/supported targets:/!d
976 s/[ ][ ]*/ /g
977 s/.*supported targets: *//
978 s/ .*//
979 p'`
980 case "$ld_supported_targets" in
981 elf32-i386)
982 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
983 ;;
984 esac
985 # Determine whether the default compiler is a.out or elf
986 eval $set_cc_for_build
987 sed 's/^ //' << EOF >$dummy.c
988 #include <features.h>
989 #ifdef __ELF__
990 # ifdef __GLIBC__
991 # if __GLIBC__ >= 2
992 LIBC=gnu
993 # else
994 LIBC=gnulibc1
995 # endif
996 # else
997 LIBC=gnulibc1
998 # endif
999 #else
1000 #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
1001 LIBC=gnu
1002 #else
1003 LIBC=gnuaout
1004 #endif
1005 #endif
1006 #ifdef __dietlibc__
1007 LIBC=dietlibc
1008 #endif
1009EOF
1010 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1011 /^LIBC/{
1012 s: ::g
1013 p
1014 }'`"
1015 test x"${LIBC}" != x && {
1016 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1017 exit
1018 }
1019 test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1020 ;;
1021 i*86:DYNIX/ptx:4*:*) 980 i*86:DYNIX/ptx:4*:*)
1022 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 981 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1023 # earlier versions are messed up and put the nodename in both 982 # earlier versions are messed up and put the nodename in both
@@ -1247,6 +1206,16 @@ EOF
1247 *:Darwin:*:*) 1206 *:Darwin:*:*)
1248 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1207 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1249 case $UNAME_PROCESSOR in 1208 case $UNAME_PROCESSOR in
1209 i386)
1210 eval $set_cc_for_build
1211 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1212 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1213 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1214 grep IS_64BIT_ARCH >/dev/null
1215 then
1216 UNAME_PROCESSOR="x86_64"
1217 fi
1218 fi ;;
1250 unknown) UNAME_PROCESSOR=powerpc ;; 1219 unknown) UNAME_PROCESSOR=powerpc ;;
1251 esac 1220 esac
1252 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1221 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
diff --git a/config.h.in b/config.h.in
index 939840fc2..a61f0a6b5 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1,8 +1,5 @@
1/* config.h.in. Generated from configure.ac by autoheader. */ 1/* config.h.in. Generated from configure.ac by autoheader. */
2 2
3/* Define if building universal (internal helper macro) */
4#undef AC_APPLE_UNIVERSAL_BUILD
5
6/* Define if you have a getaddrinfo that fails for the all-zeros IPv6 address 3/* Define if you have a getaddrinfo that fails for the all-zeros IPv6 address
7 */ 4 */
8#undef AIX_GETNAMEINFO_HACK 5#undef AIX_GETNAMEINFO_HACK
@@ -125,6 +122,9 @@
125/* Define if you don't want to use wtmpx */ 122/* Define if you don't want to use wtmpx */
126#undef DISABLE_WTMPX 123#undef DISABLE_WTMPX
127 124
125/* Enable for PKCS#11 support */
126#undef ENABLE_PKCS11
127
128/* Builtin PRNG command timeout */ 128/* Builtin PRNG command timeout */
129#undef ENTROPY_TIMEOUT_MSEC 129#undef ENTROPY_TIMEOUT_MSEC
130 130
@@ -464,6 +464,9 @@
464/* Define to 1 if you have the <glob.h> header file. */ 464/* Define to 1 if you have the <glob.h> header file. */
465#undef HAVE_GLOB_H 465#undef HAVE_GLOB_H
466 466
467/* Define to 1 if you have the `group_from_gid' function. */
468#undef HAVE_GROUP_FROM_GID
469
467/* Define to 1 if you have the <gssapi_generic.h> header file. */ 470/* Define to 1 if you have the <gssapi_generic.h> header file. */
468#undef HAVE_GSSAPI_GENERIC_H 471#undef HAVE_GSSAPI_GENERIC_H
469 472
@@ -554,9 +557,6 @@
554/* Define to 1 if you have the `pam' library (-lpam). */ 557/* Define to 1 if you have the `pam' library (-lpam). */
555#undef HAVE_LIBPAM 558#undef HAVE_LIBPAM
556 559
557/* Define to 1 if you have the `sectok' library (-lsectok). */
558#undef HAVE_LIBSECTOK
559
560/* Define to 1 if you have the `socket' library (-lsocket). */ 560/* Define to 1 if you have the `socket' library (-lsocket). */
561#undef HAVE_LIBSOCKET 561#undef HAVE_LIBSOCKET
562 562
@@ -738,9 +738,6 @@
738/* define if you have sa_family_t data type */ 738/* define if you have sa_family_t data type */
739#undef HAVE_SA_FAMILY_T 739#undef HAVE_SA_FAMILY_T
740 740
741/* Define to 1 if you have the <sectok.h> header file. */
742#undef HAVE_SECTOK_H
743
744/* Define if you have SecureWare-based protected password database */ 741/* Define if you have SecureWare-based protected password database */
745#undef HAVE_SECUREWARE 742#undef HAVE_SECUREWARE
746 743
@@ -765,6 +762,9 @@
765/* Define to 1 if you have the `seteuid' function. */ 762/* Define to 1 if you have the `seteuid' function. */
766#undef HAVE_SETEUID 763#undef HAVE_SETEUID
767 764
765/* Define to 1 if you have the `setgroupent' function. */
766#undef HAVE_SETGROUPENT
767
768/* Define to 1 if you have the `setgroups' function. */ 768/* Define to 1 if you have the `setgroups' function. */
769#undef HAVE_SETGROUPS 769#undef HAVE_SETGROUPS
770 770
@@ -774,6 +774,9 @@
774/* Define to 1 if you have the `setluid' function. */ 774/* Define to 1 if you have the `setluid' function. */
775#undef HAVE_SETLUID 775#undef HAVE_SETLUID
776 776
777/* Define to 1 if you have the `setpassent' function. */
778#undef HAVE_SETPASSENT
779
777/* Define to 1 if you have the `setpcred' function. */ 780/* Define to 1 if you have the `setpcred' function. */
778#undef HAVE_SETPCRED 781#undef HAVE_SETPCRED
779 782
@@ -1077,6 +1080,9 @@
1077/* Define to 1 if you have the <usersec.h> header file. */ 1080/* Define to 1 if you have the <usersec.h> header file. */
1078#undef HAVE_USERSEC_H 1081#undef HAVE_USERSEC_H
1079 1082
1083/* Define to 1 if you have the `user_from_uid' function. */
1084#undef HAVE_USER_FROM_UID
1085
1080/* Define to 1 if you have the <util.h> header file. */ 1086/* Define to 1 if you have the <util.h> header file. */
1081#undef HAVE_UTIL_H 1087#undef HAVE_UTIL_H
1082 1088
@@ -1186,6 +1192,9 @@
1186 EOPNOTSUPP. */ 1192 EOPNOTSUPP. */
1187#undef LINK_OPNOTSUPP_ERRNO 1193#undef LINK_OPNOTSUPP_ERRNO
1188 1194
1195/* Adjust Linux out-of-memory killer */
1196#undef LINUX_OOM_ADJUST
1197
1189/* max value of long long calculated by configure */ 1198/* max value of long long calculated by configure */
1190#undef LLONG_MAX 1199#undef LLONG_MAX
1191 1200
@@ -1238,9 +1247,6 @@
1238/* Define if X11 doesn't support AF_UNIX sockets on that system */ 1247/* Define if X11 doesn't support AF_UNIX sockets on that system */
1239#undef NO_X11_UNIX_SOCKETS 1248#undef NO_X11_UNIX_SOCKETS
1240 1249
1241/* Adjust Linux out-of-memory killer */
1242#undef OOM_ADJUST
1243
1244/* Define if EVP_DigestUpdate returns void */ 1250/* Define if EVP_DigestUpdate returns void */
1245#undef OPENSSL_EVP_DIGESTUPDATE_VOID 1251#undef OPENSSL_EVP_DIGESTUPDATE_VOID
1246 1252
@@ -1308,9 +1314,6 @@
1308/* Define if your skeychallenge() function takes 4 arguments (NetBSD) */ 1314/* Define if your skeychallenge() function takes 4 arguments (NetBSD) */
1309#undef SKEYCHALLENGE_4ARG 1315#undef SKEYCHALLENGE_4ARG
1310 1316
1311/* Define if you want smartcard support */
1312#undef SMARTCARD
1313
1314/* Define as const if snprintf() can declare const char *fmt */ 1317/* Define as const if snprintf() can declare const char *fmt */
1315#undef SNPRINTF_CONST 1318#undef SNPRINTF_CONST
1316 1319
@@ -1381,9 +1384,6 @@
1381/* Use libedit for sftp */ 1384/* Use libedit for sftp */
1382#undef USE_LIBEDIT 1385#undef USE_LIBEDIT
1383 1386
1384/* Define if you want smartcard support using OpenSC */
1385#undef USE_OPENSC
1386
1387/* Enable OpenSSL engine support */ 1387/* Enable OpenSSL engine support */
1388#undef USE_OPENSSL_ENGINE 1388#undef USE_OPENSSL_ENGINE
1389 1389
@@ -1393,9 +1393,6 @@
1393/* Use PIPES instead of a socketpair() */ 1393/* Use PIPES instead of a socketpair() */
1394#undef USE_PIPES 1394#undef USE_PIPES
1395 1395
1396/* Define if you want smartcard support using sectok */
1397#undef USE_SECTOK
1398
1399/* platform has the Security Authorization Session API */ 1396/* platform has the Security Authorization Session API */
1400#undef USE_SECURITY_SESSION_API 1397#undef USE_SECURITY_SESSION_API
1401 1398
@@ -1424,17 +1421,9 @@
1424/* Define if you want SELinux support. */ 1421/* Define if you want SELinux support. */
1425#undef WITH_SELINUX 1422#undef WITH_SELINUX
1426 1423
1427/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most 1424/* Define to 1 if your processor stores words with the most significant byte
1428 significant byte first (like Motorola and SPARC, unlike Intel). */ 1425 first (like Motorola and SPARC, unlike Intel and VAX). */
1429#if defined AC_APPLE_UNIVERSAL_BUILD 1426#undef WORDS_BIGENDIAN
1430# if defined __BIG_ENDIAN__
1431# define WORDS_BIGENDIAN 1
1432# endif
1433#else
1434# ifndef WORDS_BIGENDIAN
1435# undef WORDS_BIGENDIAN
1436# endif
1437#endif
1438 1427
1439/* Define if xauth is found in your path */ 1428/* Define if xauth is found in your path */
1440#undef XAUTH_PATH 1429#undef XAUTH_PATH
diff --git a/config.sub b/config.sub
index eb0389a69..c2d125724 100755
--- a/config.sub
+++ b/config.sub
@@ -1,10 +1,10 @@
1#! /bin/sh 1#! /bin/sh
2# Configuration validation subroutine script. 2# Configuration validation subroutine script.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5# Free Software Foundation, Inc. 5# Free Software Foundation, Inc.
6 6
7timestamp='2009-06-11' 7timestamp='2010-01-22'
8 8
9# This file is (in principle) common to ALL GNU software. 9# This file is (in principle) common to ALL GNU software.
10# The presence of a machine in this file suggests that SOME GNU software 10# The presence of a machine in this file suggests that SOME GNU software
@@ -32,13 +32,16 @@ timestamp='2009-06-11'
32 32
33 33
34# Please send patches to <config-patches@gnu.org>. Submit a context 34# Please send patches to <config-patches@gnu.org>. Submit a context
35# diff and a properly formatted ChangeLog entry. 35# diff and a properly formatted GNU ChangeLog entry.
36# 36#
37# Configuration subroutine to validate and canonicalize a configuration type. 37# Configuration subroutine to validate and canonicalize a configuration type.
38# Supply the specified configuration type as an argument. 38# Supply the specified configuration type as an argument.
39# If it is invalid, we print an error message on stderr and exit with code 1. 39# If it is invalid, we print an error message on stderr and exit with code 1.
40# Otherwise, we print the canonical config type on stdout and succeed. 40# Otherwise, we print the canonical config type on stdout and succeed.
41 41
42# You can get the latest version of this script from:
43# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
44
42# This file is supposed to be the same for all GNU packages 45# This file is supposed to be the same for all GNU packages
43# and recognize all the CPU types, system types and aliases 46# and recognize all the CPU types, system types and aliases
44# that are meaningful with *any* GNU software. 47# that are meaningful with *any* GNU software.
@@ -72,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
72version="\ 75version="\
73GNU config.sub ($timestamp) 76GNU config.sub ($timestamp)
74 77
75Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 78Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
762002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 792001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
80Software Foundation, Inc.
77 81
78This is free software; see the source for copying conditions. There is NO 82This is free software; see the source for copying conditions. There is NO
79warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 83warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -149,7 +153,7 @@ case $os in
149 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 153 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
150 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 154 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
151 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 155 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
152 -apple | -axis | -knuth | -cray) 156 -apple | -axis | -knuth | -cray | -microblaze)
153 os= 157 os=
154 basic_machine=$1 158 basic_machine=$1
155 ;; 159 ;;
@@ -284,6 +288,7 @@ case $basic_machine in
284 | pdp10 | pdp11 | pj | pjl \ 288 | pdp10 | pdp11 | pj | pjl \
285 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 289 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
286 | pyramid \ 290 | pyramid \
291 | rx \
287 | score \ 292 | score \
288 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 293 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
289 | sh64 | sh64le \ 294 | sh64 | sh64le \
@@ -291,13 +296,14 @@ case $basic_machine in
291 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 296 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
292 | spu | strongarm \ 297 | spu | strongarm \
293 | tahoe | thumb | tic4x | tic80 | tron \ 298 | tahoe | thumb | tic4x | tic80 | tron \
299 | ubicom32 \
294 | v850 | v850e \ 300 | v850 | v850e \
295 | we32k \ 301 | we32k \
296 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ 302 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
297 | z8k | z80) 303 | z8k | z80)
298 basic_machine=$basic_machine-unknown 304 basic_machine=$basic_machine-unknown
299 ;; 305 ;;
300 m6811 | m68hc11 | m6812 | m68hc12) 306 m6811 | m68hc11 | m6812 | m68hc12 | picochip)
301 # Motorola 68HC11/12. 307 # Motorola 68HC11/12.
302 basic_machine=$basic_machine-unknown 308 basic_machine=$basic_machine-unknown
303 os=-none 309 os=-none
@@ -340,7 +346,7 @@ case $basic_machine in
340 | lm32-* \ 346 | lm32-* \
341 | m32c-* | m32r-* | m32rle-* \ 347 | m32c-* | m32r-* | m32rle-* \
342 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 348 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
343 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ 349 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
344 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 350 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
345 | mips16-* \ 351 | mips16-* \
346 | mips64-* | mips64el-* \ 352 | mips64-* | mips64el-* \
@@ -368,15 +374,17 @@ case $basic_machine in
368 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 374 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
369 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ 375 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
370 | pyramid-* \ 376 | pyramid-* \
371 | romp-* | rs6000-* \ 377 | romp-* | rs6000-* | rx-* \
372 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 378 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
373 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 379 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
374 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 380 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
375 | sparclite-* \ 381 | sparclite-* \
376 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ 382 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
377 | tahoe-* | thumb-* \ 383 | tahoe-* | thumb-* \
378 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ 384 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
385 | tile-* | tilegx-* \
379 | tron-* \ 386 | tron-* \
387 | ubicom32-* \
380 | v850-* | v850e-* | vax-* \ 388 | v850-* | v850e-* | vax-* \
381 | we32k-* \ 389 | we32k-* \
382 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ 390 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
@@ -726,6 +734,9 @@ case $basic_machine in
726 basic_machine=ns32k-utek 734 basic_machine=ns32k-utek
727 os=-sysv 735 os=-sysv
728 ;; 736 ;;
737 microblaze)
738 basic_machine=microblaze-xilinx
739 ;;
729 mingw32) 740 mingw32)
730 basic_machine=i386-pc 741 basic_machine=i386-pc
731 os=-mingw32 742 os=-mingw32
@@ -1076,6 +1087,11 @@ case $basic_machine in
1076 basic_machine=tic6x-unknown 1087 basic_machine=tic6x-unknown
1077 os=-coff 1088 os=-coff
1078 ;; 1089 ;;
1090 # This must be matched before tile*.
1091 tilegx*)
1092 basic_machine=tilegx-unknown
1093 os=-linux-gnu
1094 ;;
1079 tile*) 1095 tile*)
1080 basic_machine=tile-unknown 1096 basic_machine=tile-unknown
1081 os=-linux-gnu 1097 os=-linux-gnu
@@ -1247,6 +1263,9 @@ case $os in
1247 # First match some system type aliases 1263 # First match some system type aliases
1248 # that might get confused with valid system types. 1264 # that might get confused with valid system types.
1249 # -solaris* is a basic system type, with this one exception. 1265 # -solaris* is a basic system type, with this one exception.
1266 -auroraux)
1267 os=-auroraux
1268 ;;
1250 -solaris1 | -solaris1.*) 1269 -solaris1 | -solaris1.*)
1251 os=`echo $os | sed -e 's|solaris1|sunos4|'` 1270 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1252 ;; 1271 ;;
@@ -1268,8 +1287,8 @@ case $os in
1268 # -sysv* is not here because it comes later, after sysvr4. 1287 # -sysv* is not here because it comes later, after sysvr4.
1269 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 1288 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1270 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ 1289 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1271 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ 1290 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1272 | -kopensolaris* \ 1291 | -sym* | -kopensolaris* \
1273 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 1292 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1274 | -aos* | -aros* \ 1293 | -aos* | -aros* \
1275 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 1294 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
@@ -1290,7 +1309,7 @@ case $os in
1290 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 1309 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1291 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 1310 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1292 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 1311 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1293 | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) 1312 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1294 # Remember, each alternative MUST END IN *, to match a version number. 1313 # Remember, each alternative MUST END IN *, to match a version number.
1295 ;; 1314 ;;
1296 -qnx*) 1315 -qnx*)
@@ -1423,6 +1442,8 @@ case $os in
1423 -dicos*) 1442 -dicos*)
1424 os=-dicos 1443 os=-dicos
1425 ;; 1444 ;;
1445 -nacl*)
1446 ;;
1426 -none) 1447 -none)
1427 ;; 1448 ;;
1428 *) 1449 *)
diff --git a/configure b/configure
index 2d999ad47..7c19fc204 100755
--- a/configure
+++ b/configure
@@ -1,12 +1,12 @@
1#! /bin/sh 1#! /bin/sh
2# From configure.ac Revision: 1.427 . 2# From configure.ac Revision: 1.444 .
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.62 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) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 9# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
10# This configure script is free software; the Free Software Foundation 10# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it. 11# gives unlimited permission to copy, distribute and modify it.
12## --------------------- ## 12## --------------------- ##
@@ -18,7 +18,7 @@ DUALCASE=1; export DUALCASE # for MKS sh
18if 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
19 emulate sh 19 emulate sh
20 NULLCMD=: 20 NULLCMD=:
21 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 21 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22 # is contrary to our usage. Disable this feature. 22 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"' 23 alias -g '${1+"$@"}'='"$@"'
24 setopt NO_GLOB_SUBST 24 setopt NO_GLOB_SUBST
@@ -40,45 +40,17 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789' 40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits 41as_cr_alnum=$as_cr_Letters$as_cr_digits
42 42
43as_nl='
44'
45export as_nl
46# Printing a long string crashes Solaris 7 /usr/bin/printf.
47as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
49as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
50if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
61 case $arg in
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73fi
74
75# The user is always right. 43# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then 44if test "${PATH_SEPARATOR+set}" != set; then
77 PATH_SEPARATOR=: 45 echo "#! /bin/sh" >conf$$.sh
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 46 echo "exit 0" >>conf$$.sh
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 47 chmod +x conf$$.sh
80 PATH_SEPARATOR=';' 48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
81 } 49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
82fi 54fi
83 55
84# Support unset when possible. 56# Support unset when possible.
@@ -94,6 +66,8 @@ fi
94# there to prevent editors from complaining about space-tab. 66# there to prevent editors from complaining about space-tab.
95# (If _AS_PATH_WALK were called with IFS unset, it would disable word 67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
96# splitting by setting IFS to empty value.) 68# splitting by setting IFS to empty value.)
69as_nl='
70'
97IFS=" "" $as_nl" 71IFS=" "" $as_nl"
98 72
99# Find who we are. Look in the path if we contain no directory separator. 73# Find who we are. Look in the path if we contain no directory separator.
@@ -116,7 +90,7 @@ if test "x$as_myself" = x; then
116 as_myself=$0 90 as_myself=$0
117fi 91fi
118if test ! -f "$as_myself"; then 92if test ! -f "$as_myself"; then
119 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 93 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
120 { (exit 1); exit 1; } 94 { (exit 1); exit 1; }
121fi 95fi
122 96
@@ -129,10 +103,17 @@ PS2='> '
129PS4='+ ' 103PS4='+ '
130 104
131# NLS nuisances. 105# NLS nuisances.
132LC_ALL=C 106for as_var in \
133export LC_ALL 107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
134LANGUAGE=C 108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
135export LANGUAGE 109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
136 117
137# Required to use basename. 118# Required to use basename.
138if expr a : '\(a\)' >/dev/null 2>&1 && 119if expr a : '\(a\)' >/dev/null 2>&1 &&
@@ -154,7 +135,7 @@ as_me=`$as_basename -- "$0" ||
154$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
155 X"$0" : 'X\(//\)$' \| \ 136 X"$0" : 'X\(//\)$' \| \
156 X"$0" : 'X\(/\)' \| . 2>/dev/null || 137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
157$as_echo X/"$0" | 138echo X/"$0" |
158 sed '/^.*\/\([^/][^/]*\)\/*$/{ 139 sed '/^.*\/\([^/][^/]*\)\/*$/{
159 s//\1/ 140 s//\1/
160 q 141 q
@@ -180,7 +161,7 @@ else
180 as_have_required=no 161 as_have_required=no
181fi 162fi
182 163
183 if test $as_have_required = yes && (eval ": 164 if test $as_have_required = yes && (eval ":
184(as_func_return () { 165(as_func_return () {
185 (exit \$1) 166 (exit \$1)
186} 167}
@@ -262,7 +243,7 @@ IFS=$as_save_IFS
262if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
263 emulate sh 244 emulate sh
264 NULLCMD=: 245 NULLCMD=:
265 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
266 # is contrary to our usage. Disable this feature. 247 # is contrary to our usage. Disable this feature.
267 alias -g '${1+"$@"}'='"$@"' 248 alias -g '${1+"$@"}'='"$@"'
268 setopt NO_GLOB_SUBST 249 setopt NO_GLOB_SUBST
@@ -283,7 +264,7 @@ _ASEOF
283if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
284 emulate sh 265 emulate sh
285 NULLCMD=: 266 NULLCMD=:
286 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
287 # is contrary to our usage. Disable this feature. 268 # is contrary to our usage. Disable this feature.
288 alias -g '${1+"$@"}'='"$@"' 269 alias -g '${1+"$@"}'='"$@"'
289 setopt NO_GLOB_SUBST 270 setopt NO_GLOB_SUBST
@@ -363,10 +344,10 @@ fi
363 344
364 if test "x$CONFIG_SHELL" != x; then 345 if test "x$CONFIG_SHELL" != x; then
365 for as_var in BASH_ENV ENV 346 for as_var in BASH_ENV ENV
366 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var 347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
367 done 348 done
368 export CONFIG_SHELL 349 export CONFIG_SHELL
369 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} 350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
370fi 351fi
371 352
372 353
@@ -435,10 +416,9 @@ fi
435 416
436test \$exitcode = 0") || { 417test \$exitcode = 0") || {
437 echo No shell found that supports shell functions. 418 echo No shell found that supports shell functions.
438 echo Please tell bug-autoconf@gnu.org about your system, 419 echo Please tell autoconf@gnu.org about your system,
439 echo including any error possibly output before this message. 420 echo including any error possibly output before this
440 echo This can help us improve future autoconf versions. 421 echo message
441 echo Configuration will now proceed without shell functions.
442} 422}
443 423
444 424
@@ -474,7 +454,7 @@ test \$exitcode = 0") || {
474 s/-\n.*// 454 s/-\n.*//
475 ' >$as_me.lineno && 455 ' >$as_me.lineno &&
476 chmod +x "$as_me.lineno" || 456 chmod +x "$as_me.lineno" ||
477 { $as_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
478 { (exit 1); exit 1; }; } 458 { (exit 1); exit 1; }; }
479 459
480 # 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
@@ -502,6 +482,7 @@ case `echo -n x` in
502*) 482*)
503 ECHO_N='-n';; 483 ECHO_N='-n';;
504esac 484esac
485
505if expr a : '\(a\)' >/dev/null 2>&1 && 486if expr a : '\(a\)' >/dev/null 2>&1 &&
506 test "X`expr 00001 : '.*\(...\)'`" = X001; then 487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
507 as_expr=expr 488 as_expr=expr
@@ -514,22 +495,19 @@ if test -d conf$$.dir; then
514 rm -f conf$$.dir/conf$$.file 495 rm -f conf$$.dir/conf$$.file
515else 496else
516 rm -f conf$$.dir 497 rm -f conf$$.dir
517 mkdir conf$$.dir 2>/dev/null 498 mkdir conf$$.dir
518fi 499fi
519if (echo >conf$$.file) 2>/dev/null; then 500echo >conf$$.file
520 if ln -s conf$$.file conf$$ 2>/dev/null; then 501if ln -s conf$$.file conf$$ 2>/dev/null; then
521 as_ln_s='ln -s' 502 as_ln_s='ln -s'
522 # ... but there are two gotchas: 503 # ... but there are two gotchas:
523 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
524 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
525 # In both cases, we have to default to `cp -p'. 506 # In both cases, we have to default to `cp -p'.
526 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
527 as_ln_s='cp -p'
528 elif ln conf$$.file conf$$ 2>/dev/null; then
529 as_ln_s=ln
530 else
531 as_ln_s='cp -p' 508 as_ln_s='cp -p'
532 fi 509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
533else 511else
534 as_ln_s='cp -p' 512 as_ln_s='cp -p'
535fi 513fi
@@ -554,10 +532,10 @@ else
554 as_test_x=' 532 as_test_x='
555 eval sh -c '\'' 533 eval sh -c '\''
556 if test -d "$1"; then 534 if test -d "$1"; then
557 test -d "$1/."; 535 test -d "$1/.";
558 else 536 else
559 case $1 in 537 case $1 in
560 -*)set "./$1";; 538 -*)set "./$1";;
561 esac; 539 esac;
562 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in 540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
563 ???[sx]*):;;*)false;;esac;fi 541 ???[sx]*):;;*)false;;esac;fi
@@ -735,7 +713,6 @@ PROG_UPTIME
735PROG_IPCS 713PROG_IPCS
736PROG_TAIL 714PROG_TAIL
737INSTALL_SSH_PRNG_CMDS 715INSTALL_SSH_PRNG_CMDS
738OPENSC_CONFIG
739KRB5CONF 716KRB5CONF
740PRIVSEP_PATH 717PRIVSEP_PATH
741xauth_path 718xauth_path
@@ -750,60 +727,6 @@ TEST_SSH_IPV6
750LIBOBJS 727LIBOBJS
751LTLIBOBJS' 728LTLIBOBJS'
752ac_subst_files='' 729ac_subst_files=''
753ac_user_opts='
754enable_option_checking
755enable_largefile
756with_stackprotect
757with_rpath
758with_cflags
759with_cppflags
760with_ldflags
761with_libs
762with_Werror
763with_solaris_contracts
764with_osfsia
765with_zlib
766with_zlib_version_check
767with_skey
768with_tcp_wrappers
769with_libedit
770with_audit
771with_ssl_dir
772with_openssl_header_check
773with_ssl_engine
774with_pam
775with_rand_helper
776with_prngd_port
777with_prngd_socket
778with_entropy_timeout
779with_privsep_user
780with_sectok
781with_opensc
782with_selinux
783with_kerberos5
784with_privsep_path
785with_xauth
786enable_strip
787with_mantype
788with_md5_passwords
789with_shadow
790with_ipaddr_display
791enable_etc_default_login
792with_default_path
793with_superuser_path
794with_4in6
795with_bsd_auth
796with_pid_dir
797enable_lastlog
798enable_utmp
799enable_utmpx
800enable_wtmp
801enable_wtmpx
802enable_libutil
803enable_pututline
804enable_pututxline
805with_lastlog
806'
807 ac_precious_vars='build_alias 730 ac_precious_vars='build_alias
808host_alias 731host_alias
809target_alias 732target_alias
@@ -818,8 +741,6 @@ CPP'
818# Initialize some variables set by options. 741# Initialize some variables set by options.
819ac_init_help= 742ac_init_help=
820ac_init_version=false 743ac_init_version=false
821ac_unrecognized_opts=
822ac_unrecognized_sep=
823# The variables have the same names as the options, with 744# The variables have the same names as the options, with
824# dashes changed to underlines. 745# dashes changed to underlines.
825cache_file=/dev/null 746cache_file=/dev/null
@@ -918,21 +839,13 @@ do
918 datarootdir=$ac_optarg ;; 839 datarootdir=$ac_optarg ;;
919 840
920 -disable-* | --disable-*) 841 -disable-* | --disable-*)
921 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` 842 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
922 # Reject names that are not valid shell variable names. 843 # Reject names that are not valid shell variable names.
923 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 844 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
924 { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 845 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
925 { (exit 1); exit 1; }; } 846 { (exit 1); exit 1; }; }
926 ac_useropt_orig=$ac_useropt 847 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
927 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 848 eval enable_$ac_feature=no ;;
928 case $ac_user_opts in
929 *"
930"enable_$ac_useropt"
931"*) ;;
932 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
933 ac_unrecognized_sep=', ';;
934 esac
935 eval enable_$ac_useropt=no ;;
936 849
937 -docdir | --docdir | --docdi | --doc | --do) 850 -docdir | --docdir | --docdi | --doc | --do)
938 ac_prev=docdir ;; 851 ac_prev=docdir ;;
@@ -945,21 +858,13 @@ do
945 dvidir=$ac_optarg ;; 858 dvidir=$ac_optarg ;;
946 859
947 -enable-* | --enable-*) 860 -enable-* | --enable-*)
948 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` 861 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
949 # Reject names that are not valid shell variable names. 862 # Reject names that are not valid shell variable names.
950 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 863 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
951 { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 864 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
952 { (exit 1); exit 1; }; } 865 { (exit 1); exit 1; }; }
953 ac_useropt_orig=$ac_useropt 866 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
954 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 867 eval enable_$ac_feature=\$ac_optarg ;;
955 case $ac_user_opts in
956 *"
957"enable_$ac_useropt"
958"*) ;;
959 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
960 ac_unrecognized_sep=', ';;
961 esac
962 eval enable_$ac_useropt=\$ac_optarg ;;
963 868
964 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 869 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
965 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 870 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -1150,38 +1055,22 @@ do
1150 ac_init_version=: ;; 1055 ac_init_version=: ;;
1151 1056
1152 -with-* | --with-*) 1057 -with-* | --with-*)
1153 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` 1058 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1154 # Reject names that are not valid shell variable names. 1059 # Reject names that are not valid shell variable names.
1155 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1060 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1156 { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 1061 { echo "$as_me: error: invalid package name: $ac_package" >&2
1157 { (exit 1); exit 1; }; } 1062 { (exit 1); exit 1; }; }
1158 ac_useropt_orig=$ac_useropt 1063 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1159 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1064 eval with_$ac_package=\$ac_optarg ;;
1160 case $ac_user_opts in
1161 *"
1162"with_$ac_useropt"
1163"*) ;;
1164 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1165 ac_unrecognized_sep=', ';;
1166 esac
1167 eval with_$ac_useropt=\$ac_optarg ;;
1168 1065
1169 -without-* | --without-*) 1066 -without-* | --without-*)
1170 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` 1067 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1171 # Reject names that are not valid shell variable names. 1068 # Reject names that are not valid shell variable names.
1172 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1069 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1173 { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 1070 { echo "$as_me: error: invalid package name: $ac_package" >&2
1174 { (exit 1); exit 1; }; } 1071 { (exit 1); exit 1; }; }
1175 ac_useropt_orig=$ac_useropt 1072 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1176 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1073 eval with_$ac_package=no ;;
1177 case $ac_user_opts in
1178 *"
1179"with_$ac_useropt"
1180"*) ;;
1181 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1182 ac_unrecognized_sep=', ';;
1183 esac
1184 eval with_$ac_useropt=no ;;
1185 1074
1186 --x) 1075 --x)
1187 # Obsolete; use --with-x. 1076 # Obsolete; use --with-x.
@@ -1201,7 +1090,7 @@ do
1201 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 1090 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1202 x_libraries=$ac_optarg ;; 1091 x_libraries=$ac_optarg ;;
1203 1092
1204 -*) { $as_echo "$as_me: error: unrecognized option: $ac_option 1093 -*) { echo "$as_me: error: unrecognized option: $ac_option
1205Try \`$0 --help' for more information." >&2 1094Try \`$0 --help' for more information." >&2
1206 { (exit 1); exit 1; }; } 1095 { (exit 1); exit 1; }; }
1207 ;; 1096 ;;
@@ -1210,16 +1099,16 @@ Try \`$0 --help' for more information." >&2
1210 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` 1099 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1211 # Reject names that are not valid shell variable names. 1100 # Reject names that are not valid shell variable names.
1212 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && 1101 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1213 { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 1102 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1214 { (exit 1); exit 1; }; } 1103 { (exit 1); exit 1; }; }
1215 eval $ac_envvar=\$ac_optarg 1104 eval $ac_envvar=\$ac_optarg
1216 export $ac_envvar ;; 1105 export $ac_envvar ;;
1217 1106
1218 *) 1107 *)
1219 # FIXME: should be removed in autoconf 3.0. 1108 # FIXME: should be removed in autoconf 3.0.
1220 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 1109 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1221 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 1110 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1222 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 1111 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1223 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} 1112 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1224 ;; 1113 ;;
1225 1114
@@ -1228,38 +1117,22 @@ done
1228 1117
1229if test -n "$ac_prev"; then 1118if test -n "$ac_prev"; then
1230 ac_option=--`echo $ac_prev | sed 's/_/-/g'` 1119 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1231 { $as_echo "$as_me: error: missing argument to $ac_option" >&2 1120 { echo "$as_me: error: missing argument to $ac_option" >&2
1232 { (exit 1); exit 1; }; } 1121 { (exit 1); exit 1; }; }
1233fi 1122fi
1234 1123
1235if test -n "$ac_unrecognized_opts"; then 1124# Be sure to have absolute directory names.
1236 case $enable_option_checking in
1237 no) ;;
1238 fatal) { $as_echo "$as_me: error: Unrecognized options: $ac_unrecognized_opts" >&2
1239 { (exit 1); exit 1; }; } ;;
1240 *) $as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2 ;;
1241 esac
1242fi
1243
1244# Check all directory arguments for consistency.
1245for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ 1125for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1246 datadir sysconfdir sharedstatedir localstatedir includedir \ 1126 datadir sysconfdir sharedstatedir localstatedir includedir \
1247 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 1127 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1248 libdir localedir mandir 1128 libdir localedir mandir
1249do 1129do
1250 eval ac_val=\$$ac_var 1130 eval ac_val=\$$ac_var
1251 # Remove trailing slashes.
1252 case $ac_val in
1253 */ )
1254 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1255 eval $ac_var=\$ac_val;;
1256 esac
1257 # Be sure to have absolute directory names.
1258 case $ac_val in 1131 case $ac_val in
1259 [\\/$]* | ?:[\\/]* ) continue;; 1132 [\\/$]* | ?:[\\/]* ) continue;;
1260 NONE | '' ) case $ac_var in *prefix ) continue;; esac;; 1133 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1261 esac 1134 esac
1262 { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 1135 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1263 { (exit 1); exit 1; }; } 1136 { (exit 1); exit 1; }; }
1264done 1137done
1265 1138
@@ -1274,7 +1147,7 @@ target=$target_alias
1274if test "x$host_alias" != x; then 1147if test "x$host_alias" != x; then
1275 if test "x$build_alias" = x; then 1148 if test "x$build_alias" = x; then
1276 cross_compiling=maybe 1149 cross_compiling=maybe
1277 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. 1150 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1278 If a cross compiler is detected then cross compile mode will be used." >&2 1151 If a cross compiler is detected then cross compile mode will be used." >&2
1279 elif test "x$build_alias" != "x$host_alias"; then 1152 elif test "x$build_alias" != "x$host_alias"; then
1280 cross_compiling=yes 1153 cross_compiling=yes
@@ -1290,10 +1163,10 @@ test "$silent" = yes && exec 6>/dev/null
1290ac_pwd=`pwd` && test -n "$ac_pwd" && 1163ac_pwd=`pwd` && test -n "$ac_pwd" &&
1291ac_ls_di=`ls -di .` && 1164ac_ls_di=`ls -di .` &&
1292ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || 1165ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1293 { $as_echo "$as_me: error: Working directory cannot be determined" >&2 1166 { echo "$as_me: error: Working directory cannot be determined" >&2
1294 { (exit 1); exit 1; }; } 1167 { (exit 1); exit 1; }; }
1295test "X$ac_ls_di" = "X$ac_pwd_ls_di" || 1168test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1296 { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 1169 { echo "$as_me: error: pwd does not report name of working directory" >&2
1297 { (exit 1); exit 1; }; } 1170 { (exit 1); exit 1; }; }
1298 1171
1299 1172
@@ -1301,12 +1174,12 @@ test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1301if test -z "$srcdir"; then 1174if test -z "$srcdir"; then
1302 ac_srcdir_defaulted=yes 1175 ac_srcdir_defaulted=yes
1303 # Try the directory containing this script, then the parent directory. 1176 # Try the directory containing this script, then the parent directory.
1304 ac_confdir=`$as_dirname -- "$as_myself" || 1177 ac_confdir=`$as_dirname -- "$0" ||
1305$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 1178$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1306 X"$as_myself" : 'X\(//\)[^/]' \| \ 1179 X"$0" : 'X\(//\)[^/]' \| \
1307 X"$as_myself" : 'X\(//\)$' \| \ 1180 X"$0" : 'X\(//\)$' \| \
1308 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || 1181 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1309$as_echo X"$as_myself" | 1182echo X"$0" |
1310 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 1183 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1311 s//\1/ 1184 s//\1/
1312 q 1185 q
@@ -1333,12 +1206,12 @@ else
1333fi 1206fi
1334if test ! -r "$srcdir/$ac_unique_file"; then 1207if test ! -r "$srcdir/$ac_unique_file"; then
1335 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 1208 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1336 { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 1209 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1337 { (exit 1); exit 1; }; } 1210 { (exit 1); exit 1; }; }
1338fi 1211fi
1339ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" 1212ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1340ac_abs_confdir=`( 1213ac_abs_confdir=`(
1341 cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 1214 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1342 { (exit 1); exit 1; }; } 1215 { (exit 1); exit 1; }; }
1343 pwd)` 1216 pwd)`
1344# When building in place, set srcdir=. 1217# When building in place, set srcdir=.
@@ -1387,9 +1260,9 @@ Configuration:
1387 1260
1388Installation directories: 1261Installation directories:
1389 --prefix=PREFIX install architecture-independent files in PREFIX 1262 --prefix=PREFIX install architecture-independent files in PREFIX
1390 [$ac_default_prefix] 1263 [$ac_default_prefix]
1391 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 1264 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1392 [PREFIX] 1265 [PREFIX]
1393 1266
1394By default, \`make install' will install all the files in 1267By default, \`make install' will install all the files in
1395\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify 1268\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
@@ -1399,25 +1272,25 @@ for instance \`--prefix=\$HOME'.
1399For better control, use the options below. 1272For better control, use the options below.
1400 1273
1401Fine tuning of the installation directories: 1274Fine tuning of the installation directories:
1402 --bindir=DIR user executables [EPREFIX/bin] 1275 --bindir=DIR user executables [EPREFIX/bin]
1403 --sbindir=DIR system admin executables [EPREFIX/sbin] 1276 --sbindir=DIR system admin executables [EPREFIX/sbin]
1404 --libexecdir=DIR program executables [EPREFIX/libexec] 1277 --libexecdir=DIR program executables [EPREFIX/libexec]
1405 --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 1278 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1406 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 1279 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1407 --localstatedir=DIR modifiable single-machine data [PREFIX/var] 1280 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1408 --libdir=DIR object code libraries [EPREFIX/lib] 1281 --libdir=DIR object code libraries [EPREFIX/lib]
1409 --includedir=DIR C header files [PREFIX/include] 1282 --includedir=DIR C header files [PREFIX/include]
1410 --oldincludedir=DIR C header files for non-gcc [/usr/include] 1283 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1411 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] 1284 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1412 --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 1285 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1413 --infodir=DIR info documentation [DATAROOTDIR/info] 1286 --infodir=DIR info documentation [DATAROOTDIR/info]
1414 --localedir=DIR locale-dependent data [DATAROOTDIR/locale] 1287 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1415 --mandir=DIR man documentation [DATAROOTDIR/man] 1288 --mandir=DIR man documentation [DATAROOTDIR/man]
1416 --docdir=DIR documentation root [DATAROOTDIR/doc/openssh] 1289 --docdir=DIR documentation root [DATAROOTDIR/doc/openssh]
1417 --htmldir=DIR html documentation [DOCDIR] 1290 --htmldir=DIR html documentation [DOCDIR]
1418 --dvidir=DIR dvi documentation [DOCDIR] 1291 --dvidir=DIR dvi documentation [DOCDIR]
1419 --pdfdir=DIR pdf documentation [DOCDIR] 1292 --pdfdir=DIR pdf documentation [DOCDIR]
1420 --psdir=DIR ps documentation [DOCDIR] 1293 --psdir=DIR ps documentation [DOCDIR]
1421_ACEOF 1294_ACEOF
1422 1295
1423 cat <<\_ACEOF 1296 cat <<\_ACEOF
@@ -1435,7 +1308,6 @@ if test -n "$ac_init_help"; then
1435 cat <<\_ACEOF 1308 cat <<\_ACEOF
1436 1309
1437Optional Features: 1310Optional Features:
1438 --disable-option-checking ignore unrecognized --enable/--with options
1439 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 1311 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1440 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 1312 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1441 --disable-largefile omit support for large files 1313 --disable-largefile omit support for large files
@@ -1477,8 +1349,6 @@ Optional Packages:
1477 --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool) 1349 --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)
1478 --with-entropy-timeout Specify entropy gathering command timeout (msec) 1350 --with-entropy-timeout Specify entropy gathering command timeout (msec)
1479 --with-privsep-user=user Specify non-privileged user for privilege separation 1351 --with-privsep-user=user Specify non-privileged user for privilege separation
1480 --with-sectok Enable smartcard support using libsectok
1481 --with-opensc[=PFX] Enable smartcard support using OpenSC (optionally in PATH)
1482 --with-selinux Enable SELinux support 1352 --with-selinux Enable SELinux support
1483 --with-kerberos5=PATH Enable Kerberos 5 support 1353 --with-kerberos5=PATH Enable Kerberos 5 support
1484 --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty) 1354 --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)
@@ -1515,17 +1385,15 @@ fi
1515if test "$ac_init_help" = "recursive"; then 1385if test "$ac_init_help" = "recursive"; then
1516 # If there are subdirs, report their specific --help. 1386 # If there are subdirs, report their specific --help.
1517 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue 1387 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1518 test -d "$ac_dir" || 1388 test -d "$ac_dir" || continue
1519 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1520 continue
1521 ac_builddir=. 1389 ac_builddir=.
1522 1390
1523case "$ac_dir" in 1391case "$ac_dir" in
1524.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 1392.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1525*) 1393*)
1526 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 1394 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1527 # A ".." for each directory in $ac_dir_suffix. 1395 # A ".." for each directory in $ac_dir_suffix.
1528 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 1396 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1529 case $ac_top_builddir_sub in 1397 case $ac_top_builddir_sub in
1530 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 1398 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1531 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 1399 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -1561,7 +1429,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1561 echo && 1429 echo &&
1562 $SHELL "$ac_srcdir/configure" --help=recursive 1430 $SHELL "$ac_srcdir/configure" --help=recursive
1563 else 1431 else
1564 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 1432 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1565 fi || ac_status=$? 1433 fi || ac_status=$?
1566 cd "$ac_pwd" || { ac_status=$?; break; } 1434 cd "$ac_pwd" || { ac_status=$?; break; }
1567 done 1435 done
@@ -1571,10 +1439,10 @@ test -n "$ac_init_help" && exit $ac_status
1571if $ac_init_version; then 1439if $ac_init_version; then
1572 cat <<\_ACEOF 1440 cat <<\_ACEOF
1573OpenSSH configure Portable 1441OpenSSH configure Portable
1574generated by GNU Autoconf 2.62 1442generated by GNU Autoconf 2.61
1575 1443
1576Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 1444Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
15772002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 14452002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1578This configure script is free software; the Free Software Foundation 1446This configure script is free software; the Free Software Foundation
1579gives unlimited permission to copy, distribute and modify it. 1447gives unlimited permission to copy, distribute and modify it.
1580_ACEOF 1448_ACEOF
@@ -1585,7 +1453,7 @@ This file contains any messages produced by compilers while
1585running configure, to aid debugging if configure makes a mistake. 1453running configure, to aid debugging if configure makes a mistake.
1586 1454
1587It was created by OpenSSH $as_me Portable, which was 1455It was created by OpenSSH $as_me Portable, which was
1588generated by GNU Autoconf 2.62. Invocation command line was 1456generated by GNU Autoconf 2.61. Invocation command line was
1589 1457
1590 $ $0 $@ 1458 $ $0 $@
1591 1459
@@ -1621,7 +1489,7 @@ for as_dir in $PATH
1621do 1489do
1622 IFS=$as_save_IFS 1490 IFS=$as_save_IFS
1623 test -z "$as_dir" && as_dir=. 1491 test -z "$as_dir" && as_dir=.
1624 $as_echo "PATH: $as_dir" 1492 echo "PATH: $as_dir"
1625done 1493done
1626IFS=$as_save_IFS 1494IFS=$as_save_IFS
1627 1495
@@ -1656,7 +1524,7 @@ do
1656 | -silent | --silent | --silen | --sile | --sil) 1524 | -silent | --silent | --silen | --sile | --sil)
1657 continue ;; 1525 continue ;;
1658 *\'*) 1526 *\'*)
1659 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 1527 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1660 esac 1528 esac
1661 case $ac_pass in 1529 case $ac_pass in
1662 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 1530 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
@@ -1708,12 +1576,11 @@ _ASBOX
1708 case $ac_val in #( 1576 case $ac_val in #(
1709 *${as_nl}*) 1577 *${as_nl}*)
1710 case $ac_var in #( 1578 case $ac_var in #(
1711 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 1579 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1712$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; 1580echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1713 esac 1581 esac
1714 case $ac_var in #( 1582 case $ac_var in #(
1715 _ | IFS | as_nl) ;; #( 1583 _ | IFS | as_nl) ;; #(
1716 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1717 *) $as_unset $ac_var ;; 1584 *) $as_unset $ac_var ;;
1718 esac ;; 1585 esac ;;
1719 esac 1586 esac
@@ -1743,9 +1610,9 @@ _ASBOX
1743 do 1610 do
1744 eval ac_val=\$$ac_var 1611 eval ac_val=\$$ac_var
1745 case $ac_val in 1612 case $ac_val in
1746 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 1613 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1747 esac 1614 esac
1748 $as_echo "$ac_var='\''$ac_val'\''" 1615 echo "$ac_var='\''$ac_val'\''"
1749 done | sort 1616 done | sort
1750 echo 1617 echo
1751 1618
@@ -1760,9 +1627,9 @@ _ASBOX
1760 do 1627 do
1761 eval ac_val=\$$ac_var 1628 eval ac_val=\$$ac_var
1762 case $ac_val in 1629 case $ac_val in
1763 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 1630 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1764 esac 1631 esac
1765 $as_echo "$ac_var='\''$ac_val'\''" 1632 echo "$ac_var='\''$ac_val'\''"
1766 done | sort 1633 done | sort
1767 echo 1634 echo
1768 fi 1635 fi
@@ -1778,8 +1645,8 @@ _ASBOX
1778 echo 1645 echo
1779 fi 1646 fi
1780 test "$ac_signal" != 0 && 1647 test "$ac_signal" != 0 &&
1781 $as_echo "$as_me: caught signal $ac_signal" 1648 echo "$as_me: caught signal $ac_signal"
1782 $as_echo "$as_me: exit $exit_status" 1649 echo "$as_me: exit $exit_status"
1783 } >&5 1650 } >&5
1784 rm -f core *.core core.conftest.* && 1651 rm -f core *.core core.conftest.* &&
1785 rm -f -r conftest* confdefs* conf$$* $ac_clean_files && 1652 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
@@ -1821,24 +1688,21 @@ _ACEOF
1821 1688
1822 1689
1823# Let the site file select an alternate cache file if it wants to. 1690# Let the site file select an alternate cache file if it wants to.
1824# Prefer an explicitly selected file to automatically selected ones. 1691# Prefer explicitly selected file to automatically selected ones.
1825ac_site_file1=NONE
1826ac_site_file2=NONE
1827if test -n "$CONFIG_SITE"; then 1692if test -n "$CONFIG_SITE"; then
1828 ac_site_file1=$CONFIG_SITE 1693 set x "$CONFIG_SITE"
1829elif test "x$prefix" != xNONE; then 1694elif test "x$prefix" != xNONE; then
1830 ac_site_file1=$prefix/share/config.site 1695 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1831 ac_site_file2=$prefix/etc/config.site
1832else 1696else
1833 ac_site_file1=$ac_default_prefix/share/config.site 1697 set x "$ac_default_prefix/share/config.site" \
1834 ac_site_file2=$ac_default_prefix/etc/config.site 1698 "$ac_default_prefix/etc/config.site"
1835fi 1699fi
1836for ac_site_file in "$ac_site_file1" "$ac_site_file2" 1700shift
1701for ac_site_file
1837do 1702do
1838 test "x$ac_site_file" = xNONE && continue
1839 if test -r "$ac_site_file"; then 1703 if test -r "$ac_site_file"; then
1840 { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 1704 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1841$as_echo "$as_me: loading site script $ac_site_file" >&6;} 1705echo "$as_me: loading site script $ac_site_file" >&6;}
1842 sed 's/^/| /' "$ac_site_file" >&5 1706 sed 's/^/| /' "$ac_site_file" >&5
1843 . "$ac_site_file" 1707 . "$ac_site_file"
1844 fi 1708 fi
@@ -1848,16 +1712,16 @@ if test -r "$cache_file"; then
1848 # Some versions of bash will fail to source /dev/null (special 1712 # Some versions of bash will fail to source /dev/null (special
1849 # files actually), so we avoid doing that. 1713 # files actually), so we avoid doing that.
1850 if test -f "$cache_file"; then 1714 if test -f "$cache_file"; then
1851 { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 1715 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1852$as_echo "$as_me: loading cache $cache_file" >&6;} 1716echo "$as_me: loading cache $cache_file" >&6;}
1853 case $cache_file in 1717 case $cache_file in
1854 [\\/]* | ?:[\\/]* ) . "$cache_file";; 1718 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1855 *) . "./$cache_file";; 1719 *) . "./$cache_file";;
1856 esac 1720 esac
1857 fi 1721 fi
1858else 1722else
1859 { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 1723 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1860$as_echo "$as_me: creating cache $cache_file" >&6;} 1724echo "$as_me: creating cache $cache_file" >&6;}
1861 >$cache_file 1725 >$cache_file
1862fi 1726fi
1863 1727
@@ -1871,38 +1735,29 @@ for ac_var in $ac_precious_vars; do
1871 eval ac_new_val=\$ac_env_${ac_var}_value 1735 eval ac_new_val=\$ac_env_${ac_var}_value
1872 case $ac_old_set,$ac_new_set in 1736 case $ac_old_set,$ac_new_set in
1873 set,) 1737 set,)
1874 { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 1738 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1875$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} 1739echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1876 ac_cache_corrupted=: ;; 1740 ac_cache_corrupted=: ;;
1877 ,set) 1741 ,set)
1878 { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 1742 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1879$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 1743echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1880 ac_cache_corrupted=: ;; 1744 ac_cache_corrupted=: ;;
1881 ,);; 1745 ,);;
1882 *) 1746 *)
1883 if test "x$ac_old_val" != "x$ac_new_val"; then 1747 if test "x$ac_old_val" != "x$ac_new_val"; then
1884 # differences in whitespace do not lead to failure. 1748 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1885 ac_old_val_w=`echo x $ac_old_val` 1749echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1886 ac_new_val_w=`echo x $ac_new_val` 1750 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1887 if test "$ac_old_val_w" != "$ac_new_val_w"; then 1751echo "$as_me: former value: $ac_old_val" >&2;}
1888 { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 1752 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1889$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} 1753echo "$as_me: current value: $ac_new_val" >&2;}
1890 ac_cache_corrupted=: 1754 ac_cache_corrupted=:
1891 else
1892 { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1893$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1894 eval $ac_var=\$ac_old_val
1895 fi
1896 { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
1897$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
1898 { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
1899$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
1900 fi;; 1755 fi;;
1901 esac 1756 esac
1902 # Pass precious variables to config.status. 1757 # Pass precious variables to config.status.
1903 if test "$ac_new_set" = set; then 1758 if test "$ac_new_set" = set; then
1904 case $ac_new_val in 1759 case $ac_new_val in
1905 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; 1760 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1906 *) ac_arg=$ac_var=$ac_new_val ;; 1761 *) ac_arg=$ac_var=$ac_new_val ;;
1907 esac 1762 esac
1908 case " $ac_configure_args " in 1763 case " $ac_configure_args " in
@@ -1912,10 +1767,10 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
1912 fi 1767 fi
1913done 1768done
1914if $ac_cache_corrupted; then 1769if $ac_cache_corrupted; then
1915 { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 1770 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1916$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} 1771echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1917 { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 1772 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1918$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} 1773echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1919 { (exit 1); exit 1; }; } 1774 { (exit 1); exit 1; }; }
1920fi 1775fi
1921 1776
@@ -1963,10 +1818,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
1963if test -n "$ac_tool_prefix"; then 1818if test -n "$ac_tool_prefix"; then
1964 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. 1819 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1965set dummy ${ac_tool_prefix}gcc; ac_word=$2 1820set dummy ${ac_tool_prefix}gcc; ac_word=$2
1966{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 1821{ echo "$as_me:$LINENO: checking for $ac_word" >&5
1967$as_echo_n "checking for $ac_word... " >&6; } 1822echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1968if test "${ac_cv_prog_CC+set}" = set; then 1823if test "${ac_cv_prog_CC+set}" = set; then
1969 $as_echo_n "(cached) " >&6 1824 echo $ECHO_N "(cached) $ECHO_C" >&6
1970else 1825else
1971 if test -n "$CC"; then 1826 if test -n "$CC"; then
1972 ac_cv_prog_CC="$CC" # Let the user override the test. 1827 ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1979,7 +1834,7 @@ do
1979 for ac_exec_ext in '' $ac_executable_extensions; do 1834 for ac_exec_ext in '' $ac_executable_extensions; do
1980 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 1835 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1981 ac_cv_prog_CC="${ac_tool_prefix}gcc" 1836 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1982 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 1837 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1983 break 2 1838 break 2
1984 fi 1839 fi
1985done 1840done
@@ -1990,11 +1845,11 @@ fi
1990fi 1845fi
1991CC=$ac_cv_prog_CC 1846CC=$ac_cv_prog_CC
1992if test -n "$CC"; then 1847if test -n "$CC"; then
1993 { $as_echo "$as_me:$LINENO: result: $CC" >&5 1848 { echo "$as_me:$LINENO: result: $CC" >&5
1994$as_echo "$CC" >&6; } 1849echo "${ECHO_T}$CC" >&6; }
1995else 1850else
1996 { $as_echo "$as_me:$LINENO: result: no" >&5 1851 { echo "$as_me:$LINENO: result: no" >&5
1997$as_echo "no" >&6; } 1852echo "${ECHO_T}no" >&6; }
1998fi 1853fi
1999 1854
2000 1855
@@ -2003,10 +1858,10 @@ if test -z "$ac_cv_prog_CC"; then
2003 ac_ct_CC=$CC 1858 ac_ct_CC=$CC
2004 # Extract the first word of "gcc", so it can be a program name with args. 1859 # Extract the first word of "gcc", so it can be a program name with args.
2005set dummy gcc; ac_word=$2 1860set dummy gcc; ac_word=$2
2006{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 1861{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2007$as_echo_n "checking for $ac_word... " >&6; } 1862echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2008if test "${ac_cv_prog_ac_ct_CC+set}" = set; then 1863if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2009 $as_echo_n "(cached) " >&6 1864 echo $ECHO_N "(cached) $ECHO_C" >&6
2010else 1865else
2011 if test -n "$ac_ct_CC"; then 1866 if test -n "$ac_ct_CC"; then
2012 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 1867 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -2019,7 +1874,7 @@ do
2019 for ac_exec_ext in '' $ac_executable_extensions; do 1874 for ac_exec_ext in '' $ac_executable_extensions; do
2020 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 1875 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2021 ac_cv_prog_ac_ct_CC="gcc" 1876 ac_cv_prog_ac_ct_CC="gcc"
2022 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 1877 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2023 break 2 1878 break 2
2024 fi 1879 fi
2025done 1880done
@@ -2030,11 +1885,11 @@ fi
2030fi 1885fi
2031ac_ct_CC=$ac_cv_prog_ac_ct_CC 1886ac_ct_CC=$ac_cv_prog_ac_ct_CC
2032if test -n "$ac_ct_CC"; then 1887if test -n "$ac_ct_CC"; then
2033 { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 1888 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2034$as_echo "$ac_ct_CC" >&6; } 1889echo "${ECHO_T}$ac_ct_CC" >&6; }
2035else 1890else
2036 { $as_echo "$as_me:$LINENO: result: no" >&5 1891 { echo "$as_me:$LINENO: result: no" >&5
2037$as_echo "no" >&6; } 1892echo "${ECHO_T}no" >&6; }
2038fi 1893fi
2039 1894
2040 if test "x$ac_ct_CC" = x; then 1895 if test "x$ac_ct_CC" = x; then
@@ -2042,10 +1897,10 @@ fi
2042 else 1897 else
2043 case $cross_compiling:$ac_tool_warned in 1898 case $cross_compiling:$ac_tool_warned in
2044yes:) 1899yes:)
2045{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools 1900{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2046whose name does not start with the host triplet. If you think this 1901whose name does not start with the host triplet. If you think this
2047configuration is useful to you, please write to autoconf@gnu.org." >&5 1902configuration is useful to you, please write to autoconf@gnu.org." >&5
2048$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools 1903echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2049whose name does not start with the host triplet. If you think this 1904whose name does not start with the host triplet. If you think this
2050configuration is useful to you, please write to autoconf@gnu.org." >&2;} 1905configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2051ac_tool_warned=yes ;; 1906ac_tool_warned=yes ;;
@@ -2060,10 +1915,10 @@ if test -z "$CC"; then
2060 if test -n "$ac_tool_prefix"; then 1915 if test -n "$ac_tool_prefix"; then
2061 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. 1916 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2062set dummy ${ac_tool_prefix}cc; ac_word=$2 1917set dummy ${ac_tool_prefix}cc; ac_word=$2
2063{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 1918{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2064$as_echo_n "checking for $ac_word... " >&6; } 1919echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2065if test "${ac_cv_prog_CC+set}" = set; then 1920if test "${ac_cv_prog_CC+set}" = set; then
2066 $as_echo_n "(cached) " >&6 1921 echo $ECHO_N "(cached) $ECHO_C" >&6
2067else 1922else
2068 if test -n "$CC"; then 1923 if test -n "$CC"; then
2069 ac_cv_prog_CC="$CC" # Let the user override the test. 1924 ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2076,7 +1931,7 @@ do
2076 for ac_exec_ext in '' $ac_executable_extensions; do 1931 for ac_exec_ext in '' $ac_executable_extensions; do
2077 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 1932 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2078 ac_cv_prog_CC="${ac_tool_prefix}cc" 1933 ac_cv_prog_CC="${ac_tool_prefix}cc"
2079 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 1934 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2080 break 2 1935 break 2
2081 fi 1936 fi
2082done 1937done
@@ -2087,11 +1942,11 @@ fi
2087fi 1942fi
2088CC=$ac_cv_prog_CC 1943CC=$ac_cv_prog_CC
2089if test -n "$CC"; then 1944if test -n "$CC"; then
2090 { $as_echo "$as_me:$LINENO: result: $CC" >&5 1945 { echo "$as_me:$LINENO: result: $CC" >&5
2091$as_echo "$CC" >&6; } 1946echo "${ECHO_T}$CC" >&6; }
2092else 1947else
2093 { $as_echo "$as_me:$LINENO: result: no" >&5 1948 { echo "$as_me:$LINENO: result: no" >&5
2094$as_echo "no" >&6; } 1949echo "${ECHO_T}no" >&6; }
2095fi 1950fi
2096 1951
2097 1952
@@ -2100,10 +1955,10 @@ fi
2100if test -z "$CC"; then 1955if test -z "$CC"; then
2101 # Extract the first word of "cc", so it can be a program name with args. 1956 # Extract the first word of "cc", so it can be a program name with args.
2102set dummy cc; ac_word=$2 1957set dummy cc; ac_word=$2
2103{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 1958{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2104$as_echo_n "checking for $ac_word... " >&6; } 1959echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2105if test "${ac_cv_prog_CC+set}" = set; then 1960if test "${ac_cv_prog_CC+set}" = set; then
2106 $as_echo_n "(cached) " >&6 1961 echo $ECHO_N "(cached) $ECHO_C" >&6
2107else 1962else
2108 if test -n "$CC"; then 1963 if test -n "$CC"; then
2109 ac_cv_prog_CC="$CC" # Let the user override the test. 1964 ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2121,7 +1976,7 @@ do
2121 continue 1976 continue
2122 fi 1977 fi
2123 ac_cv_prog_CC="cc" 1978 ac_cv_prog_CC="cc"
2124 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 1979 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2125 break 2 1980 break 2
2126 fi 1981 fi
2127done 1982done
@@ -2144,11 +1999,11 @@ fi
2144fi 1999fi
2145CC=$ac_cv_prog_CC 2000CC=$ac_cv_prog_CC
2146if test -n "$CC"; then 2001if test -n "$CC"; then
2147 { $as_echo "$as_me:$LINENO: result: $CC" >&5 2002 { echo "$as_me:$LINENO: result: $CC" >&5
2148$as_echo "$CC" >&6; } 2003echo "${ECHO_T}$CC" >&6; }
2149else 2004else
2150 { $as_echo "$as_me:$LINENO: result: no" >&5 2005 { echo "$as_me:$LINENO: result: no" >&5
2151$as_echo "no" >&6; } 2006echo "${ECHO_T}no" >&6; }
2152fi 2007fi
2153 2008
2154 2009
@@ -2159,10 +2014,10 @@ if test -z "$CC"; then
2159 do 2014 do
2160 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 2015 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2161set dummy $ac_tool_prefix$ac_prog; ac_word=$2 2016set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2162{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 2017{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2163$as_echo_n "checking for $ac_word... " >&6; } 2018echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2164if test "${ac_cv_prog_CC+set}" = set; then 2019if test "${ac_cv_prog_CC+set}" = set; then
2165 $as_echo_n "(cached) " >&6 2020 echo $ECHO_N "(cached) $ECHO_C" >&6
2166else 2021else
2167 if test -n "$CC"; then 2022 if test -n "$CC"; then
2168 ac_cv_prog_CC="$CC" # Let the user override the test. 2023 ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2175,7 +2030,7 @@ do
2175 for ac_exec_ext in '' $ac_executable_extensions; do 2030 for ac_exec_ext in '' $ac_executable_extensions; do
2176 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 2031 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2177 ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 2032 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2178 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2033 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2179 break 2 2034 break 2
2180 fi 2035 fi
2181done 2036done
@@ -2186,11 +2041,11 @@ fi
2186fi 2041fi
2187CC=$ac_cv_prog_CC 2042CC=$ac_cv_prog_CC
2188if test -n "$CC"; then 2043if test -n "$CC"; then
2189 { $as_echo "$as_me:$LINENO: result: $CC" >&5 2044 { echo "$as_me:$LINENO: result: $CC" >&5
2190$as_echo "$CC" >&6; } 2045echo "${ECHO_T}$CC" >&6; }
2191else 2046else
2192 { $as_echo "$as_me:$LINENO: result: no" >&5 2047 { echo "$as_me:$LINENO: result: no" >&5
2193$as_echo "no" >&6; } 2048echo "${ECHO_T}no" >&6; }
2194fi 2049fi
2195 2050
2196 2051
@@ -2203,10 +2058,10 @@ if test -z "$CC"; then
2203do 2058do
2204 # Extract the first word of "$ac_prog", so it can be a program name with args. 2059 # Extract the first word of "$ac_prog", so it can be a program name with args.
2205set dummy $ac_prog; ac_word=$2 2060set dummy $ac_prog; ac_word=$2
2206{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 2061{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2207$as_echo_n "checking for $ac_word... " >&6; } 2062echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2208if test "${ac_cv_prog_ac_ct_CC+set}" = set; then 2063if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2209 $as_echo_n "(cached) " >&6 2064 echo $ECHO_N "(cached) $ECHO_C" >&6
2210else 2065else
2211 if test -n "$ac_ct_CC"; then 2066 if test -n "$ac_ct_CC"; then
2212 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 2067 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -2219,7 +2074,7 @@ do
2219 for ac_exec_ext in '' $ac_executable_extensions; do 2074 for ac_exec_ext in '' $ac_executable_extensions; do
2220 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 2075 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2221 ac_cv_prog_ac_ct_CC="$ac_prog" 2076 ac_cv_prog_ac_ct_CC="$ac_prog"
2222 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2077 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2223 break 2 2078 break 2
2224 fi 2079 fi
2225done 2080done
@@ -2230,11 +2085,11 @@ fi
2230fi 2085fi
2231ac_ct_CC=$ac_cv_prog_ac_ct_CC 2086ac_ct_CC=$ac_cv_prog_ac_ct_CC
2232if test -n "$ac_ct_CC"; then 2087if test -n "$ac_ct_CC"; then
2233 { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 2088 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2234$as_echo "$ac_ct_CC" >&6; } 2089echo "${ECHO_T}$ac_ct_CC" >&6; }
2235else 2090else
2236 { $as_echo "$as_me:$LINENO: result: no" >&5 2091 { echo "$as_me:$LINENO: result: no" >&5
2237$as_echo "no" >&6; } 2092echo "${ECHO_T}no" >&6; }
2238fi 2093fi
2239 2094
2240 2095
@@ -2246,10 +2101,10 @@ done
2246 else 2101 else
2247 case $cross_compiling:$ac_tool_warned in 2102 case $cross_compiling:$ac_tool_warned in
2248yes:) 2103yes:)
2249{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools 2104{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2250whose name does not start with the host triplet. If you think this 2105whose name does not start with the host triplet. If you think this
2251configuration is useful to you, please write to autoconf@gnu.org." >&5 2106configuration is useful to you, please write to autoconf@gnu.org." >&5
2252$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools 2107echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2253whose name does not start with the host triplet. If you think this 2108whose name does not start with the host triplet. If you think this
2254configuration is useful to you, please write to autoconf@gnu.org." >&2;} 2109configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2255ac_tool_warned=yes ;; 2110ac_tool_warned=yes ;;
@@ -2261,48 +2116,44 @@ fi
2261fi 2116fi
2262 2117
2263 2118
2264test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH 2119test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2265See \`config.log' for more details." >&5 2120See \`config.log' for more details." >&5
2266$as_echo "$as_me: error: no acceptable C compiler found in \$PATH 2121echo "$as_me: error: no acceptable C compiler found in \$PATH
2267See \`config.log' for more details." >&2;} 2122See \`config.log' for more details." >&2;}
2268 { (exit 1); exit 1; }; } 2123 { (exit 1); exit 1; }; }
2269 2124
2270# Provide some information about the compiler. 2125# Provide some information about the compiler.
2271$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 2126echo "$as_me:$LINENO: checking for C compiler version" >&5
2272set X $ac_compile 2127ac_compiler=`set X $ac_compile; echo $2`
2273ac_compiler=$2
2274{ (ac_try="$ac_compiler --version >&5" 2128{ (ac_try="$ac_compiler --version >&5"
2275case "(($ac_try" in 2129case "(($ac_try" in
2276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2277 *) ac_try_echo=$ac_try;; 2131 *) ac_try_echo=$ac_try;;
2278esac 2132esac
2279eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 2133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2280$as_echo "$ac_try_echo") >&5
2281 (eval "$ac_compiler --version >&5") 2>&5 2134 (eval "$ac_compiler --version >&5") 2>&5
2282 ac_status=$? 2135 ac_status=$?
2283 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 2136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2284 (exit $ac_status); } 2137 (exit $ac_status); }
2285{ (ac_try="$ac_compiler -v >&5" 2138{ (ac_try="$ac_compiler -v >&5"
2286case "(($ac_try" in 2139case "(($ac_try" in
2287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2288 *) ac_try_echo=$ac_try;; 2141 *) ac_try_echo=$ac_try;;
2289esac 2142esac
2290eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 2143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2291$as_echo "$ac_try_echo") >&5
2292 (eval "$ac_compiler -v >&5") 2>&5 2144 (eval "$ac_compiler -v >&5") 2>&5
2293 ac_status=$? 2145 ac_status=$?
2294 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 2146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2295 (exit $ac_status); } 2147 (exit $ac_status); }
2296{ (ac_try="$ac_compiler -V >&5" 2148{ (ac_try="$ac_compiler -V >&5"
2297case "(($ac_try" in 2149case "(($ac_try" in
2298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2299 *) ac_try_echo=$ac_try;; 2151 *) ac_try_echo=$ac_try;;
2300esac 2152esac
2301eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 2153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2302$as_echo "$ac_try_echo") >&5
2303 (eval "$ac_compiler -V >&5") 2>&5 2154 (eval "$ac_compiler -V >&5") 2>&5
2304 ac_status=$? 2155 ac_status=$?
2305 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 2156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2306 (exit $ac_status); } 2157 (exit $ac_status); }
2307 2158
2308cat >conftest.$ac_ext <<_ACEOF 2159cat >conftest.$ac_ext <<_ACEOF
@@ -2321,22 +2172,27 @@ main ()
2321} 2172}
2322_ACEOF 2173_ACEOF
2323ac_clean_files_save=$ac_clean_files 2174ac_clean_files_save=$ac_clean_files
2324ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" 2175ac_clean_files="$ac_clean_files a.out a.exe b.out"
2325# Try to create an executable without -o first, disregard a.out. 2176# Try to create an executable without -o first, disregard a.out.
2326# It will help us diagnose broken compilers, and finding out an intuition 2177# It will help us diagnose broken compilers, and finding out an intuition
2327# of exeext. 2178# of exeext.
2328{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 2179{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2329$as_echo_n "checking for C compiler default output file name... " >&6; } 2180echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2330ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` 2181ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2331 2182#
2332# The possible output files: 2183# List of possible output files, starting from the most likely.
2333ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" 2184# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2334 2185# only as a last resort. b.out is created by i960 compilers.
2186ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2187#
2188# The IRIX 6 linker writes into existing files which may not be
2189# executable, retaining their permissions. Remove them first so a
2190# subsequent execution test works.
2335ac_rmfiles= 2191ac_rmfiles=
2336for ac_file in $ac_files 2192for ac_file in $ac_files
2337do 2193do
2338 case $ac_file in 2194 case $ac_file in
2339 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 2195 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2340 * ) ac_rmfiles="$ac_rmfiles $ac_file";; 2196 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2341 esac 2197 esac
2342done 2198done
@@ -2347,11 +2203,10 @@ case "(($ac_try" in
2347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2348 *) ac_try_echo=$ac_try;; 2204 *) ac_try_echo=$ac_try;;
2349esac 2205esac
2350eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 2206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2351$as_echo "$ac_try_echo") >&5
2352 (eval "$ac_link_default") 2>&5 2207 (eval "$ac_link_default") 2>&5
2353 ac_status=$? 2208 ac_status=$?
2354 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 2209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2355 (exit $ac_status); }; then 2210 (exit $ac_status); }; then
2356 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. 2211 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2357# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' 2212# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
@@ -2362,7 +2217,7 @@ for ac_file in $ac_files ''
2362do 2217do
2363 test -f "$ac_file" || continue 2218 test -f "$ac_file" || continue
2364 case $ac_file in 2219 case $ac_file in
2365 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) 2220 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2366 ;; 2221 ;;
2367 [ab].out ) 2222 [ab].out )
2368 # We found the default executable, but exeext='' is most 2223 # We found the default executable, but exeext='' is most
@@ -2389,15 +2244,15 @@ else
2389 ac_file='' 2244 ac_file=''
2390fi 2245fi
2391 2246
2392{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 2247{ echo "$as_me:$LINENO: result: $ac_file" >&5
2393$as_echo "$ac_file" >&6; } 2248echo "${ECHO_T}$ac_file" >&6; }
2394if test -z "$ac_file"; then 2249if test -z "$ac_file"; then
2395 $as_echo "$as_me: failed program was:" >&5 2250 echo "$as_me: failed program was:" >&5
2396sed 's/^/| /' conftest.$ac_ext >&5 2251sed 's/^/| /' conftest.$ac_ext >&5
2397 2252
2398{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables 2253{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2399See \`config.log' for more details." >&5 2254See \`config.log' for more details." >&5
2400$as_echo "$as_me: error: C compiler cannot create executables 2255echo "$as_me: error: C compiler cannot create executables
2401See \`config.log' for more details." >&2;} 2256See \`config.log' for more details." >&2;}
2402 { (exit 77); exit 77; }; } 2257 { (exit 77); exit 77; }; }
2403fi 2258fi
@@ -2406,8 +2261,8 @@ ac_exeext=$ac_cv_exeext
2406 2261
2407# Check that the compiler produces executables we can run. If not, either 2262# Check that the compiler produces executables we can run. If not, either
2408# the compiler is broken, or we cross compile. 2263# the compiler is broken, or we cross compile.
2409{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 2264{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2410$as_echo_n "checking whether the C compiler works... " >&6; } 2265echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2411# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 2266# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2412# If not cross compiling, check that we can run a simple program. 2267# If not cross compiling, check that we can run a simple program.
2413if test "$cross_compiling" != yes; then 2268if test "$cross_compiling" != yes; then
@@ -2416,51 +2271,49 @@ if test "$cross_compiling" != yes; then
2416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2417 *) ac_try_echo=$ac_try;; 2272 *) ac_try_echo=$ac_try;;
2418esac 2273esac
2419eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 2274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2420$as_echo "$ac_try_echo") >&5
2421 (eval "$ac_try") 2>&5 2275 (eval "$ac_try") 2>&5
2422 ac_status=$? 2276 ac_status=$?
2423 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 2277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2424 (exit $ac_status); }; }; then 2278 (exit $ac_status); }; }; then
2425 cross_compiling=no 2279 cross_compiling=no
2426 else 2280 else
2427 if test "$cross_compiling" = maybe; then 2281 if test "$cross_compiling" = maybe; then
2428 cross_compiling=yes 2282 cross_compiling=yes
2429 else 2283 else
2430 { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. 2284 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2431If you meant to cross compile, use \`--host'. 2285If you meant to cross compile, use \`--host'.
2432See \`config.log' for more details." >&5 2286See \`config.log' for more details." >&5
2433$as_echo "$as_me: error: cannot run C compiled programs. 2287echo "$as_me: error: cannot run C compiled programs.
2434If you meant to cross compile, use \`--host'. 2288If you meant to cross compile, use \`--host'.
2435See \`config.log' for more details." >&2;} 2289See \`config.log' for more details." >&2;}
2436 { (exit 1); exit 1; }; } 2290 { (exit 1); exit 1; }; }
2437 fi 2291 fi
2438 fi 2292 fi
2439fi 2293fi
2440{ $as_echo "$as_me:$LINENO: result: yes" >&5 2294{ echo "$as_me:$LINENO: result: yes" >&5
2441$as_echo "yes" >&6; } 2295echo "${ECHO_T}yes" >&6; }
2442 2296
2443rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out 2297rm -f a.out a.exe conftest$ac_cv_exeext b.out
2444ac_clean_files=$ac_clean_files_save 2298ac_clean_files=$ac_clean_files_save
2445# Check that the compiler produces executables we can run. If not, either 2299# Check that the compiler produces executables we can run. If not, either
2446# the compiler is broken, or we cross compile. 2300# the compiler is broken, or we cross compile.
2447{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 2301{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2448$as_echo_n "checking whether we are cross compiling... " >&6; } 2302echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2449{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 2303{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2450$as_echo "$cross_compiling" >&6; } 2304echo "${ECHO_T}$cross_compiling" >&6; }
2451 2305
2452{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 2306{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2453$as_echo_n "checking for suffix of executables... " >&6; } 2307echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2454if { (ac_try="$ac_link" 2308if { (ac_try="$ac_link"
2455case "(($ac_try" in 2309case "(($ac_try" in
2456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2457 *) ac_try_echo=$ac_try;; 2311 *) ac_try_echo=$ac_try;;
2458esac 2312esac
2459eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 2313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2460$as_echo "$ac_try_echo") >&5
2461 (eval "$ac_link") 2>&5 2314 (eval "$ac_link") 2>&5
2462 ac_status=$? 2315 ac_status=$?
2463 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 2316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2464 (exit $ac_status); }; then 2317 (exit $ac_status); }; then
2465 # If both `conftest.exe' and `conftest' are `present' (well, observable) 2318 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2466# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will 2319# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
@@ -2469,31 +2322,31 @@ $as_echo "$ac_try_echo") >&5
2469for ac_file in conftest.exe conftest conftest.*; do 2322for ac_file in conftest.exe conftest conftest.*; do
2470 test -f "$ac_file" || continue 2323 test -f "$ac_file" || continue
2471 case $ac_file in 2324 case $ac_file in
2472 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 2325 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2473 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 2326 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2474 break;; 2327 break;;
2475 * ) break;; 2328 * ) break;;
2476 esac 2329 esac
2477done 2330done
2478else 2331else
2479 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link 2332 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2480See \`config.log' for more details." >&5 2333See \`config.log' for more details." >&5
2481$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link 2334echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2482See \`config.log' for more details." >&2;} 2335See \`config.log' for more details." >&2;}
2483 { (exit 1); exit 1; }; } 2336 { (exit 1); exit 1; }; }
2484fi 2337fi
2485 2338
2486rm -f conftest$ac_cv_exeext 2339rm -f conftest$ac_cv_exeext
2487{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 2340{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2488$as_echo "$ac_cv_exeext" >&6; } 2341echo "${ECHO_T}$ac_cv_exeext" >&6; }
2489 2342
2490rm -f conftest.$ac_ext 2343rm -f conftest.$ac_ext
2491EXEEXT=$ac_cv_exeext 2344EXEEXT=$ac_cv_exeext
2492ac_exeext=$EXEEXT 2345ac_exeext=$EXEEXT
2493{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 2346{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2494$as_echo_n "checking for suffix of object files... " >&6; } 2347echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
2495if test "${ac_cv_objext+set}" = set; then 2348if test "${ac_cv_objext+set}" = set; then
2496 $as_echo_n "(cached) " >&6 2349 echo $ECHO_N "(cached) $ECHO_C" >&6
2497else 2350else
2498 cat >conftest.$ac_ext <<_ACEOF 2351 cat >conftest.$ac_ext <<_ACEOF
2499/* confdefs.h. */ 2352/* confdefs.h. */
@@ -2516,41 +2369,40 @@ case "(($ac_try" in
2516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2517 *) ac_try_echo=$ac_try;; 2370 *) ac_try_echo=$ac_try;;
2518esac 2371esac
2519eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 2372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2520$as_echo "$ac_try_echo") >&5
2521 (eval "$ac_compile") 2>&5 2373 (eval "$ac_compile") 2>&5
2522 ac_status=$? 2374 ac_status=$?
2523 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 2375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2524 (exit $ac_status); }; then 2376 (exit $ac_status); }; then
2525 for ac_file in conftest.o conftest.obj conftest.*; do 2377 for ac_file in conftest.o conftest.obj conftest.*; do
2526 test -f "$ac_file" || continue; 2378 test -f "$ac_file" || continue;
2527 case $ac_file in 2379 case $ac_file in
2528 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; 2380 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
2529 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` 2381 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2530 break;; 2382 break;;
2531 esac 2383 esac
2532done 2384done
2533else 2385else
2534 $as_echo "$as_me: failed program was:" >&5 2386 echo "$as_me: failed program was:" >&5
2535sed 's/^/| /' conftest.$ac_ext >&5 2387sed 's/^/| /' conftest.$ac_ext >&5
2536 2388
2537{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile 2389{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2538See \`config.log' for more details." >&5 2390See \`config.log' for more details." >&5
2539$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile 2391echo "$as_me: error: cannot compute suffix of object files: cannot compile
2540See \`config.log' for more details." >&2;} 2392See \`config.log' for more details." >&2;}
2541 { (exit 1); exit 1; }; } 2393 { (exit 1); exit 1; }; }
2542fi 2394fi
2543 2395
2544rm -f conftest.$ac_cv_objext conftest.$ac_ext 2396rm -f conftest.$ac_cv_objext conftest.$ac_ext
2545fi 2397fi
2546{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 2398{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2547$as_echo "$ac_cv_objext" >&6; } 2399echo "${ECHO_T}$ac_cv_objext" >&6; }
2548OBJEXT=$ac_cv_objext 2400OBJEXT=$ac_cv_objext
2549ac_objext=$OBJEXT 2401ac_objext=$OBJEXT
2550{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 2402{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2551$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } 2403echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
2552if test "${ac_cv_c_compiler_gnu+set}" = set; then 2404if test "${ac_cv_c_compiler_gnu+set}" = set; then
2553 $as_echo_n "(cached) " >&6 2405 echo $ECHO_N "(cached) $ECHO_C" >&6
2554else 2406else
2555 cat >conftest.$ac_ext <<_ACEOF 2407 cat >conftest.$ac_ext <<_ACEOF
2556/* confdefs.h. */ 2408/* confdefs.h. */
@@ -2576,21 +2428,20 @@ case "(($ac_try" in
2576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2577 *) ac_try_echo=$ac_try;; 2429 *) ac_try_echo=$ac_try;;
2578esac 2430esac
2579eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 2431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2580$as_echo "$ac_try_echo") >&5
2581 (eval "$ac_compile") 2>conftest.er1 2432 (eval "$ac_compile") 2>conftest.er1
2582 ac_status=$? 2433 ac_status=$?
2583 grep -v '^ *+' conftest.er1 >conftest.err 2434 grep -v '^ *+' conftest.er1 >conftest.err
2584 rm -f conftest.er1 2435 rm -f conftest.er1
2585 cat conftest.err >&5 2436 cat conftest.err >&5
2586 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 2437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2587 (exit $ac_status); } && { 2438 (exit $ac_status); } && {
2588 test -z "$ac_c_werror_flag" || 2439 test -z "$ac_c_werror_flag" ||
2589 test ! -s conftest.err 2440 test ! -s conftest.err
2590 } && test -s conftest.$ac_objext; then 2441 } && test -s conftest.$ac_objext; then
2591 ac_compiler_gnu=yes 2442 ac_compiler_gnu=yes
2592else 2443else
2593 $as_echo "$as_me: failed program was:" >&5 2444 echo "$as_me: failed program was:" >&5
2594sed 's/^/| /' conftest.$ac_ext >&5 2445sed 's/^/| /' conftest.$ac_ext >&5
2595 2446
2596 ac_compiler_gnu=no 2447 ac_compiler_gnu=no
@@ -2600,19 +2451,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2600ac_cv_c_compiler_gnu=$ac_compiler_gnu 2451ac_cv_c_compiler_gnu=$ac_compiler_gnu
2601 2452
2602fi 2453fi
2603{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 2454{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2604$as_echo "$ac_cv_c_compiler_gnu" >&6; } 2455echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2605if test $ac_compiler_gnu = yes; then 2456GCC=`test $ac_compiler_gnu = yes && echo yes`
2606 GCC=yes
2607else
2608 GCC=
2609fi
2610ac_test_CFLAGS=${CFLAGS+set} 2457ac_test_CFLAGS=${CFLAGS+set}
2611ac_save_CFLAGS=$CFLAGS 2458ac_save_CFLAGS=$CFLAGS
2612{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 2459{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2613$as_echo_n "checking whether $CC accepts -g... " >&6; } 2460echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
2614if test "${ac_cv_prog_cc_g+set}" = set; then 2461if test "${ac_cv_prog_cc_g+set}" = set; then
2615 $as_echo_n "(cached) " >&6 2462 echo $ECHO_N "(cached) $ECHO_C" >&6
2616else 2463else
2617 ac_save_c_werror_flag=$ac_c_werror_flag 2464 ac_save_c_werror_flag=$ac_c_werror_flag
2618 ac_c_werror_flag=yes 2465 ac_c_werror_flag=yes
@@ -2639,21 +2486,20 @@ case "(($ac_try" in
2639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2640 *) ac_try_echo=$ac_try;; 2487 *) ac_try_echo=$ac_try;;
2641esac 2488esac
2642eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 2489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2643$as_echo "$ac_try_echo") >&5
2644 (eval "$ac_compile") 2>conftest.er1 2490 (eval "$ac_compile") 2>conftest.er1
2645 ac_status=$? 2491 ac_status=$?
2646 grep -v '^ *+' conftest.er1 >conftest.err 2492 grep -v '^ *+' conftest.er1 >conftest.err
2647 rm -f conftest.er1 2493 rm -f conftest.er1
2648 cat conftest.err >&5 2494 cat conftest.err >&5
2649 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 2495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2650 (exit $ac_status); } && { 2496 (exit $ac_status); } && {
2651 test -z "$ac_c_werror_flag" || 2497 test -z "$ac_c_werror_flag" ||
2652 test ! -s conftest.err 2498 test ! -s conftest.err
2653 } && test -s conftest.$ac_objext; then 2499 } && test -s conftest.$ac_objext; then
2654 ac_cv_prog_cc_g=yes 2500 ac_cv_prog_cc_g=yes
2655else 2501else
2656 $as_echo "$as_me: failed program was:" >&5 2502 echo "$as_me: failed program was:" >&5
2657sed 's/^/| /' conftest.$ac_ext >&5 2503sed 's/^/| /' conftest.$ac_ext >&5
2658 2504
2659 CFLAGS="" 2505 CFLAGS=""
@@ -2678,21 +2524,20 @@ case "(($ac_try" in
2678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2679 *) ac_try_echo=$ac_try;; 2525 *) ac_try_echo=$ac_try;;
2680esac 2526esac
2681eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 2527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2682$as_echo "$ac_try_echo") >&5
2683 (eval "$ac_compile") 2>conftest.er1 2528 (eval "$ac_compile") 2>conftest.er1
2684 ac_status=$? 2529 ac_status=$?
2685 grep -v '^ *+' conftest.er1 >conftest.err 2530 grep -v '^ *+' conftest.er1 >conftest.err
2686 rm -f conftest.er1 2531 rm -f conftest.er1
2687 cat conftest.err >&5 2532 cat conftest.err >&5
2688 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 2533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2689 (exit $ac_status); } && { 2534 (exit $ac_status); } && {
2690 test -z "$ac_c_werror_flag" || 2535 test -z "$ac_c_werror_flag" ||
2691 test ! -s conftest.err 2536 test ! -s conftest.err
2692 } && test -s conftest.$ac_objext; then 2537 } && test -s conftest.$ac_objext; then
2693 : 2538 :
2694else 2539else
2695 $as_echo "$as_me: failed program was:" >&5 2540 echo "$as_me: failed program was:" >&5
2696sed 's/^/| /' conftest.$ac_ext >&5 2541sed 's/^/| /' conftest.$ac_ext >&5
2697 2542
2698 ac_c_werror_flag=$ac_save_c_werror_flag 2543 ac_c_werror_flag=$ac_save_c_werror_flag
@@ -2718,21 +2563,20 @@ case "(($ac_try" in
2718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2719 *) ac_try_echo=$ac_try;; 2564 *) ac_try_echo=$ac_try;;
2720esac 2565esac
2721eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 2566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2722$as_echo "$ac_try_echo") >&5
2723 (eval "$ac_compile") 2>conftest.er1 2567 (eval "$ac_compile") 2>conftest.er1
2724 ac_status=$? 2568 ac_status=$?
2725 grep -v '^ *+' conftest.er1 >conftest.err 2569 grep -v '^ *+' conftest.er1 >conftest.err
2726 rm -f conftest.er1 2570 rm -f conftest.er1
2727 cat conftest.err >&5 2571 cat conftest.err >&5
2728 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 2572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2729 (exit $ac_status); } && { 2573 (exit $ac_status); } && {
2730 test -z "$ac_c_werror_flag" || 2574 test -z "$ac_c_werror_flag" ||
2731 test ! -s conftest.err 2575 test ! -s conftest.err
2732 } && test -s conftest.$ac_objext; then 2576 } && test -s conftest.$ac_objext; then
2733 ac_cv_prog_cc_g=yes 2577 ac_cv_prog_cc_g=yes
2734else 2578else
2735 $as_echo "$as_me: failed program was:" >&5 2579 echo "$as_me: failed program was:" >&5
2736sed 's/^/| /' conftest.$ac_ext >&5 2580sed 's/^/| /' conftest.$ac_ext >&5
2737 2581
2738 2582
@@ -2747,8 +2591,8 @@ fi
2747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2748 ac_c_werror_flag=$ac_save_c_werror_flag 2592 ac_c_werror_flag=$ac_save_c_werror_flag
2749fi 2593fi
2750{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 2594{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2751$as_echo "$ac_cv_prog_cc_g" >&6; } 2595echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
2752if test "$ac_test_CFLAGS" = set; then 2596if test "$ac_test_CFLAGS" = set; then
2753 CFLAGS=$ac_save_CFLAGS 2597 CFLAGS=$ac_save_CFLAGS
2754elif test $ac_cv_prog_cc_g = yes; then 2598elif test $ac_cv_prog_cc_g = yes; then
@@ -2764,10 +2608,10 @@ else
2764 CFLAGS= 2608 CFLAGS=
2765 fi 2609 fi
2766fi 2610fi
2767{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 2611{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
2768$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } 2612echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
2769if test "${ac_cv_prog_cc_c89+set}" = set; then 2613if test "${ac_cv_prog_cc_c89+set}" = set; then
2770 $as_echo_n "(cached) " >&6 2614 echo $ECHO_N "(cached) $ECHO_C" >&6
2771else 2615else
2772 ac_cv_prog_cc_c89=no 2616 ac_cv_prog_cc_c89=no
2773ac_save_CC=$CC 2617ac_save_CC=$CC
@@ -2838,21 +2682,20 @@ case "(($ac_try" in
2838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2839 *) ac_try_echo=$ac_try;; 2683 *) ac_try_echo=$ac_try;;
2840esac 2684esac
2841eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 2685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2842$as_echo "$ac_try_echo") >&5
2843 (eval "$ac_compile") 2>conftest.er1 2686 (eval "$ac_compile") 2>conftest.er1
2844 ac_status=$? 2687 ac_status=$?
2845 grep -v '^ *+' conftest.er1 >conftest.err 2688 grep -v '^ *+' conftest.er1 >conftest.err
2846 rm -f conftest.er1 2689 rm -f conftest.er1
2847 cat conftest.err >&5 2690 cat conftest.err >&5
2848 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 2691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2849 (exit $ac_status); } && { 2692 (exit $ac_status); } && {
2850 test -z "$ac_c_werror_flag" || 2693 test -z "$ac_c_werror_flag" ||
2851 test ! -s conftest.err 2694 test ! -s conftest.err
2852 } && test -s conftest.$ac_objext; then 2695 } && test -s conftest.$ac_objext; then
2853 ac_cv_prog_cc_c89=$ac_arg 2696 ac_cv_prog_cc_c89=$ac_arg
2854else 2697else
2855 $as_echo "$as_me: failed program was:" >&5 2698 echo "$as_me: failed program was:" >&5
2856sed 's/^/| /' conftest.$ac_ext >&5 2699sed 's/^/| /' conftest.$ac_ext >&5
2857 2700
2858 2701
@@ -2868,15 +2711,15 @@ fi
2868# AC_CACHE_VAL 2711# AC_CACHE_VAL
2869case "x$ac_cv_prog_cc_c89" in 2712case "x$ac_cv_prog_cc_c89" in
2870 x) 2713 x)
2871 { $as_echo "$as_me:$LINENO: result: none needed" >&5 2714 { echo "$as_me:$LINENO: result: none needed" >&5
2872$as_echo "none needed" >&6; } ;; 2715echo "${ECHO_T}none needed" >&6; } ;;
2873 xno) 2716 xno)
2874 { $as_echo "$as_me:$LINENO: result: unsupported" >&5 2717 { echo "$as_me:$LINENO: result: unsupported" >&5
2875$as_echo "unsupported" >&6; } ;; 2718echo "${ECHO_T}unsupported" >&6; } ;;
2876 *) 2719 *)
2877 CC="$CC $ac_cv_prog_cc_c89" 2720 CC="$CC $ac_cv_prog_cc_c89"
2878 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 2721 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
2879$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; 2722echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
2880esac 2723esac
2881 2724
2882 2725
@@ -2903,8 +2746,8 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2903 fi 2746 fi
2904done 2747done
2905if test -z "$ac_aux_dir"; then 2748if test -z "$ac_aux_dir"; then
2906 { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 2749 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2907$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} 2750echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
2908 { (exit 1); exit 1; }; } 2751 { (exit 1); exit 1; }; }
2909fi 2752fi
2910 2753
@@ -2919,34 +2762,34 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2919 2762
2920# Make sure we can run config.sub. 2763# Make sure we can run config.sub.
2921$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || 2764$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2922 { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 2765 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2923$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} 2766echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2924 { (exit 1); exit 1; }; } 2767 { (exit 1); exit 1; }; }
2925 2768
2926{ $as_echo "$as_me:$LINENO: checking build system type" >&5 2769{ echo "$as_me:$LINENO: checking build system type" >&5
2927$as_echo_n "checking build system type... " >&6; } 2770echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
2928if test "${ac_cv_build+set}" = set; then 2771if test "${ac_cv_build+set}" = set; then
2929 $as_echo_n "(cached) " >&6 2772 echo $ECHO_N "(cached) $ECHO_C" >&6
2930else 2773else
2931 ac_build_alias=$build_alias 2774 ac_build_alias=$build_alias
2932test "x$ac_build_alias" = x && 2775test "x$ac_build_alias" = x &&
2933 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` 2776 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2934test "x$ac_build_alias" = x && 2777test "x$ac_build_alias" = x &&
2935 { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 2778 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2936$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} 2779echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2937 { (exit 1); exit 1; }; } 2780 { (exit 1); exit 1; }; }
2938ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || 2781ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2939 { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 2782 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2940$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} 2783echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2941 { (exit 1); exit 1; }; } 2784 { (exit 1); exit 1; }; }
2942 2785
2943fi 2786fi
2944{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 2787{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2945$as_echo "$ac_cv_build" >&6; } 2788echo "${ECHO_T}$ac_cv_build" >&6; }
2946case $ac_cv_build in 2789case $ac_cv_build in
2947*-*-*) ;; 2790*-*-*) ;;
2948*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 2791*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2949$as_echo "$as_me: error: invalid value of canonical build" >&2;} 2792echo "$as_me: error: invalid value of canonical build" >&2;}
2950 { (exit 1); exit 1; }; };; 2793 { (exit 1); exit 1; }; };;
2951esac 2794esac
2952build=$ac_cv_build 2795build=$ac_cv_build
@@ -2963,27 +2806,27 @@ IFS=$ac_save_IFS
2963case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac 2806case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2964 2807
2965 2808
2966{ $as_echo "$as_me:$LINENO: checking host system type" >&5 2809{ echo "$as_me:$LINENO: checking host system type" >&5
2967$as_echo_n "checking host system type... " >&6; } 2810echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
2968if test "${ac_cv_host+set}" = set; then 2811if test "${ac_cv_host+set}" = set; then
2969 $as_echo_n "(cached) " >&6 2812 echo $ECHO_N "(cached) $ECHO_C" >&6
2970else 2813else
2971 if test "x$host_alias" = x; then 2814 if test "x$host_alias" = x; then
2972 ac_cv_host=$ac_cv_build 2815 ac_cv_host=$ac_cv_build
2973else 2816else
2974 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || 2817 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2975 { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 2818 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2976$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} 2819echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2977 { (exit 1); exit 1; }; } 2820 { (exit 1); exit 1; }; }
2978fi 2821fi
2979 2822
2980fi 2823fi
2981{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 2824{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2982$as_echo "$ac_cv_host" >&6; } 2825echo "${ECHO_T}$ac_cv_host" >&6; }
2983case $ac_cv_host in 2826case $ac_cv_host in
2984*-*-*) ;; 2827*-*-*) ;;
2985*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 2828*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2986$as_echo "$as_me: error: invalid value of canonical host" >&2;} 2829echo "$as_me: error: invalid value of canonical host" >&2;}
2987 { (exit 1); exit 1; }; };; 2830 { (exit 1); exit 1; }; };;
2988esac 2831esac
2989host=$ac_cv_host 2832host=$ac_cv_host
@@ -3006,15 +2849,15 @@ ac_cpp='$CPP $CPPFLAGS'
3006ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2849ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3007ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2850ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3008ac_compiler_gnu=$ac_cv_c_compiler_gnu 2851ac_compiler_gnu=$ac_cv_c_compiler_gnu
3009{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 2852{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3010$as_echo_n "checking how to run the C preprocessor... " >&6; } 2853echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3011# On Suns, sometimes $CPP names a directory. 2854# On Suns, sometimes $CPP names a directory.
3012if test -n "$CPP" && test -d "$CPP"; then 2855if test -n "$CPP" && test -d "$CPP"; then
3013 CPP= 2856 CPP=
3014fi 2857fi
3015if test -z "$CPP"; then 2858if test -z "$CPP"; then
3016 if test "${ac_cv_prog_CPP+set}" = set; then 2859 if test "${ac_cv_prog_CPP+set}" = set; then
3017 $as_echo_n "(cached) " >&6 2860 echo $ECHO_N "(cached) $ECHO_C" >&6
3018else 2861else
3019 # Double quotes because CPP needs to be expanded 2862 # Double quotes because CPP needs to be expanded
3020 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" 2863 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
@@ -3046,21 +2889,20 @@ case "(($ac_try" in
3046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3047 *) ac_try_echo=$ac_try;; 2890 *) ac_try_echo=$ac_try;;
3048esac 2891esac
3049eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 2892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3050$as_echo "$ac_try_echo") >&5
3051 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 2893 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3052 ac_status=$? 2894 ac_status=$?
3053 grep -v '^ *+' conftest.er1 >conftest.err 2895 grep -v '^ *+' conftest.er1 >conftest.err
3054 rm -f conftest.er1 2896 rm -f conftest.er1
3055 cat conftest.err >&5 2897 cat conftest.err >&5
3056 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 2898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3057 (exit $ac_status); } >/dev/null && { 2899 (exit $ac_status); } >/dev/null && {
3058 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 2900 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3059 test ! -s conftest.err 2901 test ! -s conftest.err
3060 }; then 2902 }; then
3061 : 2903 :
3062else 2904else
3063 $as_echo "$as_me: failed program was:" >&5 2905 echo "$as_me: failed program was:" >&5
3064sed 's/^/| /' conftest.$ac_ext >&5 2906sed 's/^/| /' conftest.$ac_ext >&5
3065 2907
3066 # Broken: fails on valid input. 2908 # Broken: fails on valid input.
@@ -3084,14 +2926,13 @@ case "(($ac_try" in
3084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3085 *) ac_try_echo=$ac_try;; 2927 *) ac_try_echo=$ac_try;;
3086esac 2928esac
3087eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 2929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3088$as_echo "$ac_try_echo") >&5
3089 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 2930 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3090 ac_status=$? 2931 ac_status=$?
3091 grep -v '^ *+' conftest.er1 >conftest.err 2932 grep -v '^ *+' conftest.er1 >conftest.err
3092 rm -f conftest.er1 2933 rm -f conftest.er1
3093 cat conftest.err >&5 2934 cat conftest.err >&5
3094 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 2935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3095 (exit $ac_status); } >/dev/null && { 2936 (exit $ac_status); } >/dev/null && {
3096 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 2937 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3097 test ! -s conftest.err 2938 test ! -s conftest.err
@@ -3099,7 +2940,7 @@ $as_echo "$ac_try_echo") >&5
3099 # Broken: success on invalid input. 2940 # Broken: success on invalid input.
3100continue 2941continue
3101else 2942else
3102 $as_echo "$as_me: failed program was:" >&5 2943 echo "$as_me: failed program was:" >&5
3103sed 's/^/| /' conftest.$ac_ext >&5 2944sed 's/^/| /' conftest.$ac_ext >&5
3104 2945
3105 # Passes both tests. 2946 # Passes both tests.
@@ -3124,8 +2965,8 @@ fi
3124else 2965else
3125 ac_cv_prog_CPP=$CPP 2966 ac_cv_prog_CPP=$CPP
3126fi 2967fi
3127{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 2968{ echo "$as_me:$LINENO: result: $CPP" >&5
3128$as_echo "$CPP" >&6; } 2969echo "${ECHO_T}$CPP" >&6; }
3129ac_preproc_ok=false 2970ac_preproc_ok=false
3130for ac_c_preproc_warn_flag in '' yes 2971for ac_c_preproc_warn_flag in '' yes
3131do 2972do
@@ -3153,21 +2994,20 @@ case "(($ac_try" in
3153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3154 *) ac_try_echo=$ac_try;; 2995 *) ac_try_echo=$ac_try;;
3155esac 2996esac
3156eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 2997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3157$as_echo "$ac_try_echo") >&5
3158 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 2998 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3159 ac_status=$? 2999 ac_status=$?
3160 grep -v '^ *+' conftest.er1 >conftest.err 3000 grep -v '^ *+' conftest.er1 >conftest.err
3161 rm -f conftest.er1 3001 rm -f conftest.er1
3162 cat conftest.err >&5 3002 cat conftest.err >&5
3163 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 3003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3164 (exit $ac_status); } >/dev/null && { 3004 (exit $ac_status); } >/dev/null && {
3165 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 3005 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3166 test ! -s conftest.err 3006 test ! -s conftest.err
3167 }; then 3007 }; then
3168 : 3008 :
3169else 3009else
3170 $as_echo "$as_me: failed program was:" >&5 3010 echo "$as_me: failed program was:" >&5
3171sed 's/^/| /' conftest.$ac_ext >&5 3011sed 's/^/| /' conftest.$ac_ext >&5
3172 3012
3173 # Broken: fails on valid input. 3013 # Broken: fails on valid input.
@@ -3191,14 +3031,13 @@ case "(($ac_try" in
3191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3192 *) ac_try_echo=$ac_try;; 3032 *) ac_try_echo=$ac_try;;
3193esac 3033esac
3194eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 3034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3195$as_echo "$ac_try_echo") >&5
3196 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 3035 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3197 ac_status=$? 3036 ac_status=$?
3198 grep -v '^ *+' conftest.er1 >conftest.err 3037 grep -v '^ *+' conftest.er1 >conftest.err
3199 rm -f conftest.er1 3038 rm -f conftest.er1
3200 cat conftest.err >&5 3039 cat conftest.err >&5
3201 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 3040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3202 (exit $ac_status); } >/dev/null && { 3041 (exit $ac_status); } >/dev/null && {
3203 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 3042 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3204 test ! -s conftest.err 3043 test ! -s conftest.err
@@ -3206,7 +3045,7 @@ $as_echo "$ac_try_echo") >&5
3206 # Broken: success on invalid input. 3045 # Broken: success on invalid input.
3207continue 3046continue
3208else 3047else
3209 $as_echo "$as_me: failed program was:" >&5 3048 echo "$as_me: failed program was:" >&5
3210sed 's/^/| /' conftest.$ac_ext >&5 3049sed 's/^/| /' conftest.$ac_ext >&5
3211 3050
3212 # Passes both tests. 3051 # Passes both tests.
@@ -3222,9 +3061,9 @@ rm -f conftest.err conftest.$ac_ext
3222if $ac_preproc_ok; then 3061if $ac_preproc_ok; then
3223 : 3062 :
3224else 3063else
3225 { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check 3064 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3226See \`config.log' for more details." >&5 3065See \`config.log' for more details." >&5
3227$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check 3066echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3228See \`config.log' for more details." >&2;} 3067See \`config.log' for more details." >&2;}
3229 { (exit 1); exit 1; }; } 3068 { (exit 1); exit 1; }; }
3230fi 3069fi
@@ -3236,37 +3075,42 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
3236ac_compiler_gnu=$ac_cv_c_compiler_gnu 3075ac_compiler_gnu=$ac_cv_c_compiler_gnu
3237 3076
3238 3077
3239{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 3078{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3240$as_echo_n "checking for grep that handles long lines and -e... " >&6; } 3079echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3080if test "${ac_cv_path_GREP+set}" = set; then
3081 echo $ECHO_N "(cached) $ECHO_C" >&6
3082else
3083 # Extract the first word of "grep ggrep" to use in msg output
3084if test -z "$GREP"; then
3085set dummy grep ggrep; ac_prog_name=$2
3241if test "${ac_cv_path_GREP+set}" = set; then 3086if test "${ac_cv_path_GREP+set}" = set; then
3242 $as_echo_n "(cached) " >&6 3087 echo $ECHO_N "(cached) $ECHO_C" >&6
3243else 3088else
3244 if test -z "$GREP"; then
3245 ac_path_GREP_found=false 3089 ac_path_GREP_found=false
3246 # Loop through the user's path and test for each of PROGNAME-LIST 3090# Loop through the user's path and test for each of PROGNAME-LIST
3247 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3091as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3248for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 3092for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3249do 3093do
3250 IFS=$as_save_IFS 3094 IFS=$as_save_IFS
3251 test -z "$as_dir" && as_dir=. 3095 test -z "$as_dir" && as_dir=.
3252 for ac_prog in grep ggrep; do 3096 for ac_prog in grep ggrep; do
3253 for ac_exec_ext in '' $ac_executable_extensions; do 3097 for ac_exec_ext in '' $ac_executable_extensions; do
3254 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" 3098 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3255 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue 3099 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3256# Check for GNU ac_path_GREP and select it if it is found. 3100 # Check for GNU ac_path_GREP and select it if it is found.
3257 # Check for GNU $ac_path_GREP 3101 # Check for GNU $ac_path_GREP
3258case `"$ac_path_GREP" --version 2>&1` in 3102case `"$ac_path_GREP" --version 2>&1` in
3259*GNU*) 3103*GNU*)
3260 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; 3104 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3261*) 3105*)
3262 ac_count=0 3106 ac_count=0
3263 $as_echo_n 0123456789 >"conftest.in" 3107 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3264 while : 3108 while :
3265 do 3109 do
3266 cat "conftest.in" "conftest.in" >"conftest.tmp" 3110 cat "conftest.in" "conftest.in" >"conftest.tmp"
3267 mv "conftest.tmp" "conftest.in" 3111 mv "conftest.tmp" "conftest.in"
3268 cp "conftest.in" "conftest.nl" 3112 cp "conftest.in" "conftest.nl"
3269 $as_echo 'GREP' >> "conftest.nl" 3113 echo 'GREP' >> "conftest.nl"
3270 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break 3114 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3271 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 3115 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3272 ac_count=`expr $ac_count + 1` 3116 ac_count=`expr $ac_count + 1`
@@ -3281,60 +3125,74 @@ case `"$ac_path_GREP" --version 2>&1` in
3281 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 3125 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3282esac 3126esac
3283 3127
3284 $ac_path_GREP_found && break 3 3128
3285 done 3129 $ac_path_GREP_found && break 3
3286 done 3130 done
3287done 3131done
3132
3133done
3288IFS=$as_save_IFS 3134IFS=$as_save_IFS
3289 if test -z "$ac_cv_path_GREP"; then 3135
3290 { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 3136
3291$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} 3137fi
3138
3139GREP="$ac_cv_path_GREP"
3140if test -z "$GREP"; then
3141 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3142echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3292 { (exit 1); exit 1; }; } 3143 { (exit 1); exit 1; }; }
3293 fi 3144fi
3145
3294else 3146else
3295 ac_cv_path_GREP=$GREP 3147 ac_cv_path_GREP=$GREP
3296fi 3148fi
3297 3149
3150
3298fi 3151fi
3299{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 3152{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3300$as_echo "$ac_cv_path_GREP" >&6; } 3153echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3301 GREP="$ac_cv_path_GREP" 3154 GREP="$ac_cv_path_GREP"
3302 3155
3303 3156
3304{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 3157{ echo "$as_me:$LINENO: checking for egrep" >&5
3305$as_echo_n "checking for egrep... " >&6; } 3158echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3306if test "${ac_cv_path_EGREP+set}" = set; then 3159if test "${ac_cv_path_EGREP+set}" = set; then
3307 $as_echo_n "(cached) " >&6 3160 echo $ECHO_N "(cached) $ECHO_C" >&6
3308else 3161else
3309 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 3162 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3310 then ac_cv_path_EGREP="$GREP -E" 3163 then ac_cv_path_EGREP="$GREP -E"
3311 else 3164 else
3312 if test -z "$EGREP"; then 3165 # Extract the first word of "egrep" to use in msg output
3166if test -z "$EGREP"; then
3167set dummy egrep; ac_prog_name=$2
3168if test "${ac_cv_path_EGREP+set}" = set; then
3169 echo $ECHO_N "(cached) $ECHO_C" >&6
3170else
3313 ac_path_EGREP_found=false 3171 ac_path_EGREP_found=false
3314 # Loop through the user's path and test for each of PROGNAME-LIST 3172# Loop through the user's path and test for each of PROGNAME-LIST
3315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3316for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 3174for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3317do 3175do
3318 IFS=$as_save_IFS 3176 IFS=$as_save_IFS
3319 test -z "$as_dir" && as_dir=. 3177 test -z "$as_dir" && as_dir=.
3320 for ac_prog in egrep; do 3178 for ac_prog in egrep; do
3321 for ac_exec_ext in '' $ac_executable_extensions; do 3179 for ac_exec_ext in '' $ac_executable_extensions; do
3322 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" 3180 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3323 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue 3181 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3324# Check for GNU ac_path_EGREP and select it if it is found. 3182 # Check for GNU ac_path_EGREP and select it if it is found.
3325 # Check for GNU $ac_path_EGREP 3183 # Check for GNU $ac_path_EGREP
3326case `"$ac_path_EGREP" --version 2>&1` in 3184case `"$ac_path_EGREP" --version 2>&1` in
3327*GNU*) 3185*GNU*)
3328 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; 3186 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3329*) 3187*)
3330 ac_count=0 3188 ac_count=0
3331 $as_echo_n 0123456789 >"conftest.in" 3189 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3332 while : 3190 while :
3333 do 3191 do
3334 cat "conftest.in" "conftest.in" >"conftest.tmp" 3192 cat "conftest.in" "conftest.in" >"conftest.tmp"
3335 mv "conftest.tmp" "conftest.in" 3193 mv "conftest.tmp" "conftest.in"
3336 cp "conftest.in" "conftest.nl" 3194 cp "conftest.in" "conftest.nl"
3337 $as_echo 'EGREP' >> "conftest.nl" 3195 echo 'EGREP' >> "conftest.nl"
3338 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break 3196 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3339 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 3197 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3340 ac_count=`expr $ac_count + 1` 3198 ac_count=`expr $ac_count + 1`
@@ -3349,31 +3207,40 @@ case `"$ac_path_EGREP" --version 2>&1` in
3349 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 3207 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3350esac 3208esac
3351 3209
3352 $ac_path_EGREP_found && break 3 3210
3353 done 3211 $ac_path_EGREP_found && break 3
3354 done 3212 done
3355done 3213done
3214
3215done
3356IFS=$as_save_IFS 3216IFS=$as_save_IFS
3357 if test -z "$ac_cv_path_EGREP"; then 3217
3358 { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 3218
3359$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} 3219fi
3220
3221EGREP="$ac_cv_path_EGREP"
3222if test -z "$EGREP"; then
3223 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3224echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3360 { (exit 1); exit 1; }; } 3225 { (exit 1); exit 1; }; }
3361 fi 3226fi
3227
3362else 3228else
3363 ac_cv_path_EGREP=$EGREP 3229 ac_cv_path_EGREP=$EGREP
3364fi 3230fi
3365 3231
3232
3366 fi 3233 fi
3367fi 3234fi
3368{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 3235{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3369$as_echo "$ac_cv_path_EGREP" >&6; } 3236echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3370 EGREP="$ac_cv_path_EGREP" 3237 EGREP="$ac_cv_path_EGREP"
3371 3238
3372 3239
3373{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 3240{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3374$as_echo_n "checking for ANSI C header files... " >&6; } 3241echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
3375if test "${ac_cv_header_stdc+set}" = set; then 3242if test "${ac_cv_header_stdc+set}" = set; then
3376 $as_echo_n "(cached) " >&6 3243 echo $ECHO_N "(cached) $ECHO_C" >&6
3377else 3244else
3378 cat >conftest.$ac_ext <<_ACEOF 3245 cat >conftest.$ac_ext <<_ACEOF
3379/* confdefs.h. */ 3246/* confdefs.h. */
@@ -3400,21 +3267,20 @@ case "(($ac_try" in
3400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3401 *) ac_try_echo=$ac_try;; 3268 *) ac_try_echo=$ac_try;;
3402esac 3269esac
3403eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 3270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3404$as_echo "$ac_try_echo") >&5
3405 (eval "$ac_compile") 2>conftest.er1 3271 (eval "$ac_compile") 2>conftest.er1
3406 ac_status=$? 3272 ac_status=$?
3407 grep -v '^ *+' conftest.er1 >conftest.err 3273 grep -v '^ *+' conftest.er1 >conftest.err
3408 rm -f conftest.er1 3274 rm -f conftest.er1
3409 cat conftest.err >&5 3275 cat conftest.err >&5
3410 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 3276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3411 (exit $ac_status); } && { 3277 (exit $ac_status); } && {
3412 test -z "$ac_c_werror_flag" || 3278 test -z "$ac_c_werror_flag" ||
3413 test ! -s conftest.err 3279 test ! -s conftest.err
3414 } && test -s conftest.$ac_objext; then 3280 } && test -s conftest.$ac_objext; then
3415 ac_cv_header_stdc=yes 3281 ac_cv_header_stdc=yes
3416else 3282else
3417 $as_echo "$as_me: failed program was:" >&5 3283 echo "$as_me: failed program was:" >&5
3418sed 's/^/| /' conftest.$ac_ext >&5 3284sed 's/^/| /' conftest.$ac_ext >&5
3419 3285
3420 ac_cv_header_stdc=no 3286 ac_cv_header_stdc=no
@@ -3506,40 +3372,37 @@ case "(($ac_try" in
3506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3507 *) ac_try_echo=$ac_try;; 3373 *) ac_try_echo=$ac_try;;
3508esac 3374esac
3509eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 3375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3510$as_echo "$ac_try_echo") >&5
3511 (eval "$ac_link") 2>&5 3376 (eval "$ac_link") 2>&5
3512 ac_status=$? 3377 ac_status=$?
3513 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 3378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3514 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 3379 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3515 { (case "(($ac_try" in 3380 { (case "(($ac_try" in
3516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3517 *) ac_try_echo=$ac_try;; 3382 *) ac_try_echo=$ac_try;;
3518esac 3383esac
3519eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 3384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3520$as_echo "$ac_try_echo") >&5
3521 (eval "$ac_try") 2>&5 3385 (eval "$ac_try") 2>&5
3522 ac_status=$? 3386 ac_status=$?
3523 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 3387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3524 (exit $ac_status); }; }; then 3388 (exit $ac_status); }; }; then
3525 : 3389 :
3526else 3390else
3527 $as_echo "$as_me: program exited with status $ac_status" >&5 3391 echo "$as_me: program exited with status $ac_status" >&5
3528$as_echo "$as_me: failed program was:" >&5 3392echo "$as_me: failed program was:" >&5
3529sed 's/^/| /' conftest.$ac_ext >&5 3393sed 's/^/| /' conftest.$ac_ext >&5
3530 3394
3531( exit $ac_status ) 3395( exit $ac_status )
3532ac_cv_header_stdc=no 3396ac_cv_header_stdc=no
3533fi 3397fi
3534rm -rf conftest.dSYM
3535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 3398rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3536fi 3399fi
3537 3400
3538 3401
3539fi 3402fi
3540fi 3403fi
3541{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 3404{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3542$as_echo "$ac_cv_header_stdc" >&6; } 3405echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
3543if test $ac_cv_header_stdc = yes; then 3406if test $ac_cv_header_stdc = yes; then
3544 3407
3545cat >>confdefs.h <<\_ACEOF 3408cat >>confdefs.h <<\_ACEOF
@@ -3561,11 +3424,11 @@ fi
3561for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ 3424for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3562 inttypes.h stdint.h unistd.h 3425 inttypes.h stdint.h unistd.h
3563do 3426do
3564as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 3427as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3565{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 3428{ echo "$as_me:$LINENO: checking for $ac_header" >&5
3566$as_echo_n "checking for $ac_header... " >&6; } 3429echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
3567if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 3430if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
3568 $as_echo_n "(cached) " >&6 3431 echo $ECHO_N "(cached) $ECHO_C" >&6
3569else 3432else
3570 cat >conftest.$ac_ext <<_ACEOF 3433 cat >conftest.$ac_ext <<_ACEOF
3571/* confdefs.h. */ 3434/* confdefs.h. */
@@ -3583,21 +3446,20 @@ case "(($ac_try" in
3583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3584 *) ac_try_echo=$ac_try;; 3447 *) ac_try_echo=$ac_try;;
3585esac 3448esac
3586eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 3449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3587$as_echo "$ac_try_echo") >&5
3588 (eval "$ac_compile") 2>conftest.er1 3450 (eval "$ac_compile") 2>conftest.er1
3589 ac_status=$? 3451 ac_status=$?
3590 grep -v '^ *+' conftest.er1 >conftest.err 3452 grep -v '^ *+' conftest.er1 >conftest.err
3591 rm -f conftest.er1 3453 rm -f conftest.er1
3592 cat conftest.err >&5 3454 cat conftest.err >&5
3593 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 3455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3594 (exit $ac_status); } && { 3456 (exit $ac_status); } && {
3595 test -z "$ac_c_werror_flag" || 3457 test -z "$ac_c_werror_flag" ||
3596 test ! -s conftest.err 3458 test ! -s conftest.err
3597 } && test -s conftest.$ac_objext; then 3459 } && test -s conftest.$ac_objext; then
3598 eval "$as_ac_Header=yes" 3460 eval "$as_ac_Header=yes"
3599else 3461else
3600 $as_echo "$as_me: failed program was:" >&5 3462 echo "$as_me: failed program was:" >&5
3601sed 's/^/| /' conftest.$ac_ext >&5 3463sed 's/^/| /' conftest.$ac_ext >&5
3602 3464
3603 eval "$as_ac_Header=no" 3465 eval "$as_ac_Header=no"
@@ -3605,14 +3467,12 @@ fi
3605 3467
3606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3607fi 3469fi
3608ac_res=`eval 'as_val=${'$as_ac_Header'} 3470ac_res=`eval echo '${'$as_ac_Header'}'`
3609 $as_echo "$as_val"'` 3471 { echo "$as_me:$LINENO: result: $ac_res" >&5
3610 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 3472echo "${ECHO_T}$ac_res" >&6; }
3611$as_echo "$ac_res" >&6; } 3473if test `eval echo '${'$as_ac_Header'}'` = yes; then
3612if test `eval 'as_val=${'$as_ac_Header'}
3613 $as_echo "$as_val"'` = yes; then
3614 cat >>confdefs.h <<_ACEOF 3474 cat >>confdefs.h <<_ACEOF
3615#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 3475#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3616_ACEOF 3476_ACEOF
3617 3477
3618fi 3478fi
@@ -3620,78 +3480,28 @@ fi
3620done 3480done
3621 3481
3622 3482
3623 3483{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
3624 { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 3484echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
3625$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
3626if test "${ac_cv_c_bigendian+set}" = set; then 3485if test "${ac_cv_c_bigendian+set}" = set; then
3627 $as_echo_n "(cached) " >&6 3486 echo $ECHO_N "(cached) $ECHO_C" >&6
3628else
3629 ac_cv_c_bigendian=unknown
3630 # See if we're dealing with a universal compiler.
3631 cat >conftest.$ac_ext <<_ACEOF
3632/* confdefs.h. */
3633_ACEOF
3634cat confdefs.h >>conftest.$ac_ext
3635cat >>conftest.$ac_ext <<_ACEOF
3636/* end confdefs.h. */
3637#ifndef __APPLE_CC__
3638 not a universal capable compiler
3639 #endif
3640 typedef int dummy;
3641
3642_ACEOF
3643rm -f conftest.$ac_objext
3644if { (ac_try="$ac_compile"
3645case "(($ac_try" in
3646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3647 *) ac_try_echo=$ac_try;;
3648esac
3649eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3650$as_echo "$ac_try_echo") >&5
3651 (eval "$ac_compile") 2>conftest.er1
3652 ac_status=$?
3653 grep -v '^ *+' conftest.er1 >conftest.err
3654 rm -f conftest.er1
3655 cat conftest.err >&5
3656 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3657 (exit $ac_status); } && {
3658 test -z "$ac_c_werror_flag" ||
3659 test ! -s conftest.err
3660 } && test -s conftest.$ac_objext; then
3661
3662 # Check for potential -arch flags. It is not universal unless
3663 # there are some -arch flags. Note that *ppc* also matches
3664 # ppc64. This check is also rather less than ideal.
3665 case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #(
3666 *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
3667 esac
3668else 3487else
3669 $as_echo "$as_me: failed program was:" >&5 3488 # See if sys/param.h defines the BYTE_ORDER macro.
3670sed 's/^/| /' conftest.$ac_ext >&5 3489cat >conftest.$ac_ext <<_ACEOF
3671
3672
3673fi
3674
3675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3676 if test $ac_cv_c_bigendian = unknown; then
3677 # See if sys/param.h defines the BYTE_ORDER macro.
3678 cat >conftest.$ac_ext <<_ACEOF
3679/* confdefs.h. */ 3490/* confdefs.h. */
3680_ACEOF 3491_ACEOF
3681cat confdefs.h >>conftest.$ac_ext 3492cat confdefs.h >>conftest.$ac_ext
3682cat >>conftest.$ac_ext <<_ACEOF 3493cat >>conftest.$ac_ext <<_ACEOF
3683/* end confdefs.h. */ 3494/* end confdefs.h. */
3684#include <sys/types.h> 3495#include <sys/types.h>
3685 #include <sys/param.h> 3496#include <sys/param.h>
3686 3497
3687int 3498int
3688main () 3499main ()
3689{ 3500{
3690#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ 3501#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
3691 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ 3502 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
3692 && LITTLE_ENDIAN) 3503 bogus endian macros
3693 bogus endian macros 3504#endif
3694 #endif
3695 3505
3696 ; 3506 ;
3697 return 0; 3507 return 0;
@@ -3703,34 +3513,33 @@ case "(($ac_try" in
3703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3704 *) ac_try_echo=$ac_try;; 3514 *) ac_try_echo=$ac_try;;
3705esac 3515esac
3706eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 3516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3707$as_echo "$ac_try_echo") >&5
3708 (eval "$ac_compile") 2>conftest.er1 3517 (eval "$ac_compile") 2>conftest.er1
3709 ac_status=$? 3518 ac_status=$?
3710 grep -v '^ *+' conftest.er1 >conftest.err 3519 grep -v '^ *+' conftest.er1 >conftest.err
3711 rm -f conftest.er1 3520 rm -f conftest.er1
3712 cat conftest.err >&5 3521 cat conftest.err >&5
3713 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 3522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3714 (exit $ac_status); } && { 3523 (exit $ac_status); } && {
3715 test -z "$ac_c_werror_flag" || 3524 test -z "$ac_c_werror_flag" ||
3716 test ! -s conftest.err 3525 test ! -s conftest.err
3717 } && test -s conftest.$ac_objext; then 3526 } && test -s conftest.$ac_objext; then
3718 # It does; now see whether it defined to BIG_ENDIAN or not. 3527 # It does; now see whether it defined to BIG_ENDIAN or not.
3719 cat >conftest.$ac_ext <<_ACEOF 3528cat >conftest.$ac_ext <<_ACEOF
3720/* confdefs.h. */ 3529/* confdefs.h. */
3721_ACEOF 3530_ACEOF
3722cat confdefs.h >>conftest.$ac_ext 3531cat confdefs.h >>conftest.$ac_ext
3723cat >>conftest.$ac_ext <<_ACEOF 3532cat >>conftest.$ac_ext <<_ACEOF
3724/* end confdefs.h. */ 3533/* end confdefs.h. */
3725#include <sys/types.h> 3534#include <sys/types.h>
3726 #include <sys/param.h> 3535#include <sys/param.h>
3727 3536
3728int 3537int
3729main () 3538main ()
3730{ 3539{
3731#if BYTE_ORDER != BIG_ENDIAN 3540#if BYTE_ORDER != BIG_ENDIAN
3732 not big endian 3541 not big endian
3733 #endif 3542#endif
3734 3543
3735 ; 3544 ;
3736 return 0; 3545 return 0;
@@ -3742,21 +3551,20 @@ case "(($ac_try" in
3742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3743 *) ac_try_echo=$ac_try;; 3552 *) ac_try_echo=$ac_try;;
3744esac 3553esac
3745eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 3554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3746$as_echo "$ac_try_echo") >&5
3747 (eval "$ac_compile") 2>conftest.er1 3555 (eval "$ac_compile") 2>conftest.er1
3748 ac_status=$? 3556 ac_status=$?
3749 grep -v '^ *+' conftest.er1 >conftest.err 3557 grep -v '^ *+' conftest.er1 >conftest.err
3750 rm -f conftest.er1 3558 rm -f conftest.er1
3751 cat conftest.err >&5 3559 cat conftest.err >&5
3752 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 3560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3753 (exit $ac_status); } && { 3561 (exit $ac_status); } && {
3754 test -z "$ac_c_werror_flag" || 3562 test -z "$ac_c_werror_flag" ||
3755 test ! -s conftest.err 3563 test ! -s conftest.err
3756 } && test -s conftest.$ac_objext; then 3564 } && test -s conftest.$ac_objext; then
3757 ac_cv_c_bigendian=yes 3565 ac_cv_c_bigendian=yes
3758else 3566else
3759 $as_echo "$as_me: failed program was:" >&5 3567 echo "$as_me: failed program was:" >&5
3760sed 's/^/| /' conftest.$ac_ext >&5 3568sed 's/^/| /' conftest.$ac_ext >&5
3761 3569
3762 ac_cv_c_bigendian=no 3570 ac_cv_c_bigendian=no
@@ -3764,69 +3572,29 @@ fi
3764 3572
3765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3766else 3574else
3767 $as_echo "$as_me: failed program was:" >&5 3575 echo "$as_me: failed program was:" >&5
3768sed 's/^/| /' conftest.$ac_ext >&5 3576sed 's/^/| /' conftest.$ac_ext >&5
3769 3577
3770 3578 # It does not; compile a test program.
3771fi 3579if test "$cross_compiling" = yes; then
3772 3580 # try to guess the endianness by grepping values into an object file
3773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3581 ac_cv_c_bigendian=unknown
3774 fi 3582 cat >conftest.$ac_ext <<_ACEOF
3775 if test $ac_cv_c_bigendian = unknown; then
3776 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
3777 cat >conftest.$ac_ext <<_ACEOF
3778/* confdefs.h. */
3779_ACEOF
3780cat confdefs.h >>conftest.$ac_ext
3781cat >>conftest.$ac_ext <<_ACEOF
3782/* end confdefs.h. */
3783#include <limits.h>
3784
3785int
3786main ()
3787{
3788#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
3789 bogus endian macros
3790 #endif
3791
3792 ;
3793 return 0;
3794}
3795_ACEOF
3796rm -f conftest.$ac_objext
3797if { (ac_try="$ac_compile"
3798case "(($ac_try" in
3799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3800 *) ac_try_echo=$ac_try;;
3801esac
3802eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3803$as_echo "$ac_try_echo") >&5
3804 (eval "$ac_compile") 2>conftest.er1
3805 ac_status=$?
3806 grep -v '^ *+' conftest.er1 >conftest.err
3807 rm -f conftest.er1
3808 cat conftest.err >&5
3809 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3810 (exit $ac_status); } && {
3811 test -z "$ac_c_werror_flag" ||
3812 test ! -s conftest.err
3813 } && test -s conftest.$ac_objext; then
3814 # It does; now see whether it defined to _BIG_ENDIAN or not.
3815 cat >conftest.$ac_ext <<_ACEOF
3816/* confdefs.h. */ 3583/* confdefs.h. */
3817_ACEOF 3584_ACEOF
3818cat confdefs.h >>conftest.$ac_ext 3585cat confdefs.h >>conftest.$ac_ext
3819cat >>conftest.$ac_ext <<_ACEOF 3586cat >>conftest.$ac_ext <<_ACEOF
3820/* end confdefs.h. */ 3587/* end confdefs.h. */
3821#include <limits.h> 3588short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3822 3589short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3590void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
3591short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3592short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3593void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
3823int 3594int
3824main () 3595main ()
3825{ 3596{
3826#ifndef _BIG_ENDIAN 3597 _ascii (); _ebcdic ();
3827 not big endian
3828 #endif
3829
3830 ; 3598 ;
3831 return 0; 3599 return 0;
3832} 3600}
@@ -3837,101 +3605,30 @@ case "(($ac_try" in
3837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3838 *) ac_try_echo=$ac_try;; 3606 *) ac_try_echo=$ac_try;;
3839esac 3607esac
3840eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 3608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3841$as_echo "$ac_try_echo") >&5
3842 (eval "$ac_compile") 2>conftest.er1 3609 (eval "$ac_compile") 2>conftest.er1
3843 ac_status=$? 3610 ac_status=$?
3844 grep -v '^ *+' conftest.er1 >conftest.err 3611 grep -v '^ *+' conftest.er1 >conftest.err
3845 rm -f conftest.er1 3612 rm -f conftest.er1
3846 cat conftest.err >&5 3613 cat conftest.err >&5
3847 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 3614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3848 (exit $ac_status); } && { 3615 (exit $ac_status); } && {
3849 test -z "$ac_c_werror_flag" || 3616 test -z "$ac_c_werror_flag" ||
3850 test ! -s conftest.err 3617 test ! -s conftest.err
3851 } && test -s conftest.$ac_objext; then 3618 } && test -s conftest.$ac_objext; then
3619 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
3852 ac_cv_c_bigendian=yes 3620 ac_cv_c_bigendian=yes
3853else
3854 $as_echo "$as_me: failed program was:" >&5
3855sed 's/^/| /' conftest.$ac_ext >&5
3856
3857 ac_cv_c_bigendian=no
3858fi 3621fi
3859 3622if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
3860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3623 if test "$ac_cv_c_bigendian" = unknown; then
3861else 3624 ac_cv_c_bigendian=no
3862 $as_echo "$as_me: failed program was:" >&5 3625 else
3863sed 's/^/| /' conftest.$ac_ext >&5 3626 # finding both strings is unlikely to happen, but who knows?
3864 3627 ac_cv_c_bigendian=unknown
3865 3628 fi
3866fi 3629fi
3867
3868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3869 fi
3870 if test $ac_cv_c_bigendian = unknown; then
3871 # Compile a test program.
3872 if test "$cross_compiling" = yes; then
3873 # Try to guess by grepping values from an object file.
3874 cat >conftest.$ac_ext <<_ACEOF
3875/* confdefs.h. */
3876_ACEOF
3877cat confdefs.h >>conftest.$ac_ext
3878cat >>conftest.$ac_ext <<_ACEOF
3879/* end confdefs.h. */
3880short int ascii_mm[] =
3881 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3882 short int ascii_ii[] =
3883 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3884 int use_ascii (int i) {
3885 return ascii_mm[i] + ascii_ii[i];
3886 }
3887 short int ebcdic_ii[] =
3888 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3889 short int ebcdic_mm[] =
3890 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3891 int use_ebcdic (int i) {
3892 return ebcdic_mm[i] + ebcdic_ii[i];
3893 }
3894 extern int foo;
3895
3896int
3897main ()
3898{
3899return use_ascii (foo) == use_ebcdic (foo);
3900 ;
3901 return 0;
3902}
3903_ACEOF
3904rm -f conftest.$ac_objext
3905if { (ac_try="$ac_compile"
3906case "(($ac_try" in
3907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3908 *) ac_try_echo=$ac_try;;
3909esac
3910eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3911$as_echo "$ac_try_echo") >&5
3912 (eval "$ac_compile") 2>conftest.er1
3913 ac_status=$?
3914 grep -v '^ *+' conftest.er1 >conftest.err
3915 rm -f conftest.er1
3916 cat conftest.err >&5
3917 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3918 (exit $ac_status); } && {
3919 test -z "$ac_c_werror_flag" ||
3920 test ! -s conftest.err
3921 } && test -s conftest.$ac_objext; then
3922 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
3923 ac_cv_c_bigendian=yes
3924 fi
3925 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
3926 if test "$ac_cv_c_bigendian" = unknown; then
3927 ac_cv_c_bigendian=no
3928 else
3929 # finding both strings is unlikely to happen, but who knows?
3930 ac_cv_c_bigendian=unknown
3931 fi
3932 fi
3933else 3630else
3934 $as_echo "$as_me: failed program was:" >&5 3631 echo "$as_me: failed program was:" >&5
3935sed 's/^/| /' conftest.$ac_ext >&5 3632sed 's/^/| /' conftest.$ac_ext >&5
3936 3633
3937 3634
@@ -3950,14 +3647,14 @@ int
3950main () 3647main ()
3951{ 3648{
3952 3649
3953 /* Are we little or big endian? From Harbison&Steele. */ 3650 /* Are we little or big endian? From Harbison&Steele. */
3954 union 3651 union
3955 { 3652 {
3956 long int l; 3653 long int l;
3957 char c[sizeof (long int)]; 3654 char c[sizeof (long int)];
3958 } u; 3655 } u;
3959 u.l = 1; 3656 u.l = 1;
3960 return u.c[sizeof (long int) - 1] == 1; 3657 return u.c[sizeof (long int) - 1] == 1;
3961 3658
3962 ; 3659 ;
3963 return 0; 3660 return 0;
@@ -3969,62 +3666,55 @@ case "(($ac_try" in
3969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3970 *) ac_try_echo=$ac_try;; 3667 *) ac_try_echo=$ac_try;;
3971esac 3668esac
3972eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 3669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3973$as_echo "$ac_try_echo") >&5
3974 (eval "$ac_link") 2>&5 3670 (eval "$ac_link") 2>&5
3975 ac_status=$? 3671 ac_status=$?
3976 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 3672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3977 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 3673 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3978 { (case "(($ac_try" in 3674 { (case "(($ac_try" in
3979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3980 *) ac_try_echo=$ac_try;; 3676 *) ac_try_echo=$ac_try;;
3981esac 3677esac
3982eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 3678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3983$as_echo "$ac_try_echo") >&5
3984 (eval "$ac_try") 2>&5 3679 (eval "$ac_try") 2>&5
3985 ac_status=$? 3680 ac_status=$?
3986 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 3681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3987 (exit $ac_status); }; }; then 3682 (exit $ac_status); }; }; then
3988 ac_cv_c_bigendian=no 3683 ac_cv_c_bigendian=no
3989else 3684else
3990 $as_echo "$as_me: program exited with status $ac_status" >&5 3685 echo "$as_me: program exited with status $ac_status" >&5
3991$as_echo "$as_me: failed program was:" >&5 3686echo "$as_me: failed program was:" >&5
3992sed 's/^/| /' conftest.$ac_ext >&5 3687sed 's/^/| /' conftest.$ac_ext >&5
3993 3688
3994( exit $ac_status ) 3689( exit $ac_status )
3995ac_cv_c_bigendian=yes 3690ac_cv_c_bigendian=yes
3996fi 3691fi
3997rm -rf conftest.dSYM
3998rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 3692rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3999fi 3693fi
4000 3694
4001 3695
4002 fi
4003fi 3696fi
4004{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 3697
4005$as_echo "$ac_cv_c_bigendian" >&6; } 3698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4006 case $ac_cv_c_bigendian in #( 3699fi
4007 yes) 3700{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
4008 cat >>confdefs.h <<\_ACEOF 3701echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
4009#define WORDS_BIGENDIAN 1 3702case $ac_cv_c_bigendian in
4010_ACEOF 3703 yes)
4011;; #(
4012 no)
4013 ;; #(
4014 universal)
4015 3704
4016cat >>confdefs.h <<\_ACEOF 3705cat >>confdefs.h <<\_ACEOF
4017#define AC_APPLE_UNIVERSAL_BUILD 1 3706#define WORDS_BIGENDIAN 1
4018_ACEOF 3707_ACEOF
4019 3708 ;;
4020 ;; #( 3709 no)
4021 *) 3710 ;;
4022 { { $as_echo "$as_me:$LINENO: error: unknown endianness 3711 *)
4023 presetting ac_cv_c_bigendian=no (or yes) will help" >&5 3712 { { echo "$as_me:$LINENO: error: unknown endianness
4024$as_echo "$as_me: error: unknown endianness 3713presetting ac_cv_c_bigendian=no (or yes) will help" >&5
4025 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} 3714echo "$as_me: error: unknown endianness
3715presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
4026 { (exit 1); exit 1; }; } ;; 3716 { (exit 1); exit 1; }; } ;;
4027 esac 3717esac
4028 3718
4029 3719
4030# Checks for programs. 3720# Checks for programs.
@@ -4032,10 +3722,10 @@ for ac_prog in gawk mawk nawk awk
4032do 3722do
4033 # Extract the first word of "$ac_prog", so it can be a program name with args. 3723 # Extract the first word of "$ac_prog", so it can be a program name with args.
4034set dummy $ac_prog; ac_word=$2 3724set dummy $ac_prog; ac_word=$2
4035{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 3725{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4036$as_echo_n "checking for $ac_word... " >&6; } 3726echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4037if test "${ac_cv_prog_AWK+set}" = set; then 3727if test "${ac_cv_prog_AWK+set}" = set; then
4038 $as_echo_n "(cached) " >&6 3728 echo $ECHO_N "(cached) $ECHO_C" >&6
4039else 3729else
4040 if test -n "$AWK"; then 3730 if test -n "$AWK"; then
4041 ac_cv_prog_AWK="$AWK" # Let the user override the test. 3731 ac_cv_prog_AWK="$AWK" # Let the user override the test.
@@ -4048,7 +3738,7 @@ do
4048 for ac_exec_ext in '' $ac_executable_extensions; do 3738 for ac_exec_ext in '' $ac_executable_extensions; do
4049 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 3739 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4050 ac_cv_prog_AWK="$ac_prog" 3740 ac_cv_prog_AWK="$ac_prog"
4051 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 3741 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4052 break 2 3742 break 2
4053 fi 3743 fi
4054done 3744done
@@ -4059,11 +3749,11 @@ fi
4059fi 3749fi
4060AWK=$ac_cv_prog_AWK 3750AWK=$ac_cv_prog_AWK
4061if test -n "$AWK"; then 3751if test -n "$AWK"; then
4062 { $as_echo "$as_me:$LINENO: result: $AWK" >&5 3752 { echo "$as_me:$LINENO: result: $AWK" >&5
4063$as_echo "$AWK" >&6; } 3753echo "${ECHO_T}$AWK" >&6; }
4064else 3754else
4065 { $as_echo "$as_me:$LINENO: result: no" >&5 3755 { echo "$as_me:$LINENO: result: no" >&5
4066$as_echo "no" >&6; } 3756echo "${ECHO_T}no" >&6; }
4067fi 3757fi
4068 3758
4069 3759
@@ -4075,15 +3765,15 @@ ac_cpp='$CPP $CPPFLAGS'
4075ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 3765ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4076ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 3766ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4077ac_compiler_gnu=$ac_cv_c_compiler_gnu 3767ac_compiler_gnu=$ac_cv_c_compiler_gnu
4078{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 3768{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4079$as_echo_n "checking how to run the C preprocessor... " >&6; } 3769echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
4080# On Suns, sometimes $CPP names a directory. 3770# On Suns, sometimes $CPP names a directory.
4081if test -n "$CPP" && test -d "$CPP"; then 3771if test -n "$CPP" && test -d "$CPP"; then
4082 CPP= 3772 CPP=
4083fi 3773fi
4084if test -z "$CPP"; then 3774if test -z "$CPP"; then
4085 if test "${ac_cv_prog_CPP+set}" = set; then 3775 if test "${ac_cv_prog_CPP+set}" = set; then
4086 $as_echo_n "(cached) " >&6 3776 echo $ECHO_N "(cached) $ECHO_C" >&6
4087else 3777else
4088 # Double quotes because CPP needs to be expanded 3778 # Double quotes because CPP needs to be expanded
4089 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" 3779 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
@@ -4115,21 +3805,20 @@ case "(($ac_try" in
4115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4116 *) ac_try_echo=$ac_try;; 3806 *) ac_try_echo=$ac_try;;
4117esac 3807esac
4118eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 3808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4119$as_echo "$ac_try_echo") >&5
4120 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 3809 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4121 ac_status=$? 3810 ac_status=$?
4122 grep -v '^ *+' conftest.er1 >conftest.err 3811 grep -v '^ *+' conftest.er1 >conftest.err
4123 rm -f conftest.er1 3812 rm -f conftest.er1
4124 cat conftest.err >&5 3813 cat conftest.err >&5
4125 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 3814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4126 (exit $ac_status); } >/dev/null && { 3815 (exit $ac_status); } >/dev/null && {
4127 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 3816 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4128 test ! -s conftest.err 3817 test ! -s conftest.err
4129 }; then 3818 }; then
4130 : 3819 :
4131else 3820else
4132 $as_echo "$as_me: failed program was:" >&5 3821 echo "$as_me: failed program was:" >&5
4133sed 's/^/| /' conftest.$ac_ext >&5 3822sed 's/^/| /' conftest.$ac_ext >&5
4134 3823
4135 # Broken: fails on valid input. 3824 # Broken: fails on valid input.
@@ -4153,14 +3842,13 @@ case "(($ac_try" in
4153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4154 *) ac_try_echo=$ac_try;; 3843 *) ac_try_echo=$ac_try;;
4155esac 3844esac
4156eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 3845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4157$as_echo "$ac_try_echo") >&5
4158 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 3846 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4159 ac_status=$? 3847 ac_status=$?
4160 grep -v '^ *+' conftest.er1 >conftest.err 3848 grep -v '^ *+' conftest.er1 >conftest.err
4161 rm -f conftest.er1 3849 rm -f conftest.er1
4162 cat conftest.err >&5 3850 cat conftest.err >&5
4163 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 3851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4164 (exit $ac_status); } >/dev/null && { 3852 (exit $ac_status); } >/dev/null && {
4165 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 3853 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4166 test ! -s conftest.err 3854 test ! -s conftest.err
@@ -4168,7 +3856,7 @@ $as_echo "$ac_try_echo") >&5
4168 # Broken: success on invalid input. 3856 # Broken: success on invalid input.
4169continue 3857continue
4170else 3858else
4171 $as_echo "$as_me: failed program was:" >&5 3859 echo "$as_me: failed program was:" >&5
4172sed 's/^/| /' conftest.$ac_ext >&5 3860sed 's/^/| /' conftest.$ac_ext >&5
4173 3861
4174 # Passes both tests. 3862 # Passes both tests.
@@ -4193,8 +3881,8 @@ fi
4193else 3881else
4194 ac_cv_prog_CPP=$CPP 3882 ac_cv_prog_CPP=$CPP
4195fi 3883fi
4196{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 3884{ echo "$as_me:$LINENO: result: $CPP" >&5
4197$as_echo "$CPP" >&6; } 3885echo "${ECHO_T}$CPP" >&6; }
4198ac_preproc_ok=false 3886ac_preproc_ok=false
4199for ac_c_preproc_warn_flag in '' yes 3887for ac_c_preproc_warn_flag in '' yes
4200do 3888do
@@ -4222,21 +3910,20 @@ case "(($ac_try" in
4222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4223 *) ac_try_echo=$ac_try;; 3911 *) ac_try_echo=$ac_try;;
4224esac 3912esac
4225eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 3913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4226$as_echo "$ac_try_echo") >&5
4227 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 3914 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4228 ac_status=$? 3915 ac_status=$?
4229 grep -v '^ *+' conftest.er1 >conftest.err 3916 grep -v '^ *+' conftest.er1 >conftest.err
4230 rm -f conftest.er1 3917 rm -f conftest.er1
4231 cat conftest.err >&5 3918 cat conftest.err >&5
4232 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 3919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4233 (exit $ac_status); } >/dev/null && { 3920 (exit $ac_status); } >/dev/null && {
4234 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 3921 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4235 test ! -s conftest.err 3922 test ! -s conftest.err
4236 }; then 3923 }; then
4237 : 3924 :
4238else 3925else
4239 $as_echo "$as_me: failed program was:" >&5 3926 echo "$as_me: failed program was:" >&5
4240sed 's/^/| /' conftest.$ac_ext >&5 3927sed 's/^/| /' conftest.$ac_ext >&5
4241 3928
4242 # Broken: fails on valid input. 3929 # Broken: fails on valid input.
@@ -4260,14 +3947,13 @@ case "(($ac_try" in
4260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4261 *) ac_try_echo=$ac_try;; 3948 *) ac_try_echo=$ac_try;;
4262esac 3949esac
4263eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 3950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4264$as_echo "$ac_try_echo") >&5
4265 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 3951 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4266 ac_status=$? 3952 ac_status=$?
4267 grep -v '^ *+' conftest.er1 >conftest.err 3953 grep -v '^ *+' conftest.er1 >conftest.err
4268 rm -f conftest.er1 3954 rm -f conftest.er1
4269 cat conftest.err >&5 3955 cat conftest.err >&5
4270 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 3956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4271 (exit $ac_status); } >/dev/null && { 3957 (exit $ac_status); } >/dev/null && {
4272 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 3958 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4273 test ! -s conftest.err 3959 test ! -s conftest.err
@@ -4275,7 +3961,7 @@ $as_echo "$ac_try_echo") >&5
4275 # Broken: success on invalid input. 3961 # Broken: success on invalid input.
4276continue 3962continue
4277else 3963else
4278 $as_echo "$as_me: failed program was:" >&5 3964 echo "$as_me: failed program was:" >&5
4279sed 's/^/| /' conftest.$ac_ext >&5 3965sed 's/^/| /' conftest.$ac_ext >&5
4280 3966
4281 # Passes both tests. 3967 # Passes both tests.
@@ -4291,9 +3977,9 @@ rm -f conftest.err conftest.$ac_ext
4291if $ac_preproc_ok; then 3977if $ac_preproc_ok; then
4292 : 3978 :
4293else 3979else
4294 { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check 3980 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4295See \`config.log' for more details." >&5 3981See \`config.log' for more details." >&5
4296$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check 3982echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4297See \`config.log' for more details." >&2;} 3983See \`config.log' for more details." >&2;}
4298 { (exit 1); exit 1; }; } 3984 { (exit 1); exit 1; }; }
4299fi 3985fi
@@ -4307,10 +3993,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
4307if test -n "$ac_tool_prefix"; then 3993if test -n "$ac_tool_prefix"; then
4308 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. 3994 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4309set dummy ${ac_tool_prefix}ranlib; ac_word=$2 3995set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4310{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 3996{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4311$as_echo_n "checking for $ac_word... " >&6; } 3997echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4312if test "${ac_cv_prog_RANLIB+set}" = set; then 3998if test "${ac_cv_prog_RANLIB+set}" = set; then
4313 $as_echo_n "(cached) " >&6 3999 echo $ECHO_N "(cached) $ECHO_C" >&6
4314else 4000else
4315 if test -n "$RANLIB"; then 4001 if test -n "$RANLIB"; then
4316 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. 4002 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -4323,7 +4009,7 @@ do
4323 for ac_exec_ext in '' $ac_executable_extensions; do 4009 for ac_exec_ext in '' $ac_executable_extensions; do
4324 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4010 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4325 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" 4011 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4326 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4012 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4327 break 2 4013 break 2
4328 fi 4014 fi
4329done 4015done
@@ -4334,11 +4020,11 @@ fi
4334fi 4020fi
4335RANLIB=$ac_cv_prog_RANLIB 4021RANLIB=$ac_cv_prog_RANLIB
4336if test -n "$RANLIB"; then 4022if test -n "$RANLIB"; then
4337 { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 4023 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4338$as_echo "$RANLIB" >&6; } 4024echo "${ECHO_T}$RANLIB" >&6; }
4339else 4025else
4340 { $as_echo "$as_me:$LINENO: result: no" >&5 4026 { echo "$as_me:$LINENO: result: no" >&5
4341$as_echo "no" >&6; } 4027echo "${ECHO_T}no" >&6; }
4342fi 4028fi
4343 4029
4344 4030
@@ -4347,10 +4033,10 @@ if test -z "$ac_cv_prog_RANLIB"; then
4347 ac_ct_RANLIB=$RANLIB 4033 ac_ct_RANLIB=$RANLIB
4348 # Extract the first word of "ranlib", so it can be a program name with args. 4034 # Extract the first word of "ranlib", so it can be a program name with args.
4349set dummy ranlib; ac_word=$2 4035set dummy ranlib; ac_word=$2
4350{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 4036{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4351$as_echo_n "checking for $ac_word... " >&6; } 4037echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4352if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then 4038if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4353 $as_echo_n "(cached) " >&6 4039 echo $ECHO_N "(cached) $ECHO_C" >&6
4354else 4040else
4355 if test -n "$ac_ct_RANLIB"; then 4041 if test -n "$ac_ct_RANLIB"; then
4356 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. 4042 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
@@ -4363,7 +4049,7 @@ do
4363 for ac_exec_ext in '' $ac_executable_extensions; do 4049 for ac_exec_ext in '' $ac_executable_extensions; do
4364 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4050 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4365 ac_cv_prog_ac_ct_RANLIB="ranlib" 4051 ac_cv_prog_ac_ct_RANLIB="ranlib"
4366 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4052 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4367 break 2 4053 break 2
4368 fi 4054 fi
4369done 4055done
@@ -4374,11 +4060,11 @@ fi
4374fi 4060fi
4375ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB 4061ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4376if test -n "$ac_ct_RANLIB"; then 4062if test -n "$ac_ct_RANLIB"; then
4377 { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 4063 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4378$as_echo "$ac_ct_RANLIB" >&6; } 4064echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
4379else 4065else
4380 { $as_echo "$as_me:$LINENO: result: no" >&5 4066 { echo "$as_me:$LINENO: result: no" >&5
4381$as_echo "no" >&6; } 4067echo "${ECHO_T}no" >&6; }
4382fi 4068fi
4383 4069
4384 if test "x$ac_ct_RANLIB" = x; then 4070 if test "x$ac_ct_RANLIB" = x; then
@@ -4386,10 +4072,10 @@ fi
4386 else 4072 else
4387 case $cross_compiling:$ac_tool_warned in 4073 case $cross_compiling:$ac_tool_warned in
4388yes:) 4074yes:)
4389{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools 4075{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4390whose name does not start with the host triplet. If you think this 4076whose name does not start with the host triplet. If you think this
4391configuration is useful to you, please write to autoconf@gnu.org." >&5 4077configuration is useful to you, please write to autoconf@gnu.org." >&5
4392$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools 4078echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4393whose name does not start with the host triplet. If you think this 4079whose name does not start with the host triplet. If you think this
4394configuration is useful to you, please write to autoconf@gnu.org." >&2;} 4080configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4395ac_tool_warned=yes ;; 4081ac_tool_warned=yes ;;
@@ -4413,12 +4099,11 @@ fi
4413# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" 4099# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4414# OS/2's system install, which has a completely different semantic 4100# OS/2's system install, which has a completely different semantic
4415# ./install, which can be erroneously created by make from ./install.sh. 4101# ./install, which can be erroneously created by make from ./install.sh.
4416# Reject install programs that cannot install multiple files. 4102{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4417{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 4103echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
4418$as_echo_n "checking for a BSD-compatible install... " >&6; }
4419if test -z "$INSTALL"; then 4104if test -z "$INSTALL"; then
4420if test "${ac_cv_path_install+set}" = set; then 4105if test "${ac_cv_path_install+set}" = set; then
4421 $as_echo_n "(cached) " >&6 4106 echo $ECHO_N "(cached) $ECHO_C" >&6
4422else 4107else
4423 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4108 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4424for as_dir in $PATH 4109for as_dir in $PATH
@@ -4447,29 +4132,17 @@ case $as_dir/ in
4447 # program-specific install script used by HP pwplus--don't use. 4132 # program-specific install script used by HP pwplus--don't use.
4448 : 4133 :
4449 else 4134 else
4450 rm -rf conftest.one conftest.two conftest.dir 4135 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4451 echo one > conftest.one 4136 break 3
4452 echo two > conftest.two
4453 mkdir conftest.dir
4454 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4455 test -s conftest.one && test -s conftest.two &&
4456 test -s conftest.dir/conftest.one &&
4457 test -s conftest.dir/conftest.two
4458 then
4459 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4460 break 3
4461 fi
4462 fi 4137 fi
4463 fi 4138 fi
4464 done 4139 done
4465 done 4140 done
4466 ;; 4141 ;;
4467esac 4142esac
4468
4469done 4143done
4470IFS=$as_save_IFS 4144IFS=$as_save_IFS
4471 4145
4472rm -rf conftest.one conftest.two conftest.dir
4473 4146
4474fi 4147fi
4475 if test "${ac_cv_path_install+set}" = set; then 4148 if test "${ac_cv_path_install+set}" = set; then
@@ -4482,8 +4155,8 @@ fi
4482 INSTALL=$ac_install_sh 4155 INSTALL=$ac_install_sh
4483 fi 4156 fi
4484fi 4157fi
4485{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 4158{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4486$as_echo "$INSTALL" >&6; } 4159echo "${ECHO_T}$INSTALL" >&6; }
4487 4160
4488# Use test -z because SunOS4 sh mishandles braces in ${var-val}. 4161# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4489# It thinks the first close brace ends the variable substitution. 4162# It thinks the first close brace ends the variable substitution.
@@ -4493,40 +4166,45 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4493 4166
4494test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' 4167test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4495 4168
4496{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 4169{ echo "$as_me:$LINENO: checking for egrep" >&5
4497$as_echo_n "checking for egrep... " >&6; } 4170echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4498if test "${ac_cv_path_EGREP+set}" = set; then 4171if test "${ac_cv_path_EGREP+set}" = set; then
4499 $as_echo_n "(cached) " >&6 4172 echo $ECHO_N "(cached) $ECHO_C" >&6
4500else 4173else
4501 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 4174 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4502 then ac_cv_path_EGREP="$GREP -E" 4175 then ac_cv_path_EGREP="$GREP -E"
4503 else 4176 else
4504 if test -z "$EGREP"; then 4177 # Extract the first word of "egrep" to use in msg output
4178if test -z "$EGREP"; then
4179set dummy egrep; ac_prog_name=$2
4180if test "${ac_cv_path_EGREP+set}" = set; then
4181 echo $ECHO_N "(cached) $ECHO_C" >&6
4182else
4505 ac_path_EGREP_found=false 4183 ac_path_EGREP_found=false
4506 # Loop through the user's path and test for each of PROGNAME-LIST 4184# Loop through the user's path and test for each of PROGNAME-LIST
4507 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4508for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 4186for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4509do 4187do
4510 IFS=$as_save_IFS 4188 IFS=$as_save_IFS
4511 test -z "$as_dir" && as_dir=. 4189 test -z "$as_dir" && as_dir=.
4512 for ac_prog in egrep; do 4190 for ac_prog in egrep; do
4513 for ac_exec_ext in '' $ac_executable_extensions; do 4191 for ac_exec_ext in '' $ac_executable_extensions; do
4514 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" 4192 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4515 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue 4193 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4516# Check for GNU ac_path_EGREP and select it if it is found. 4194 # Check for GNU ac_path_EGREP and select it if it is found.
4517 # Check for GNU $ac_path_EGREP 4195 # Check for GNU $ac_path_EGREP
4518case `"$ac_path_EGREP" --version 2>&1` in 4196case `"$ac_path_EGREP" --version 2>&1` in
4519*GNU*) 4197*GNU*)
4520 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; 4198 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4521*) 4199*)
4522 ac_count=0 4200 ac_count=0
4523 $as_echo_n 0123456789 >"conftest.in" 4201 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4524 while : 4202 while :
4525 do 4203 do
4526 cat "conftest.in" "conftest.in" >"conftest.tmp" 4204 cat "conftest.in" "conftest.in" >"conftest.tmp"
4527 mv "conftest.tmp" "conftest.in" 4205 mv "conftest.tmp" "conftest.in"
4528 cp "conftest.in" "conftest.nl" 4206 cp "conftest.in" "conftest.nl"
4529 $as_echo 'EGREP' >> "conftest.nl" 4207 echo 'EGREP' >> "conftest.nl"
4530 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break 4208 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4531 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 4209 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4532 ac_count=`expr $ac_count + 1` 4210 ac_count=`expr $ac_count + 1`
@@ -4541,33 +4219,42 @@ case `"$ac_path_EGREP" --version 2>&1` in
4541 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 4219 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4542esac 4220esac
4543 4221
4544 $ac_path_EGREP_found && break 3 4222
4545 done 4223 $ac_path_EGREP_found && break 3
4546 done 4224 done
4547done 4225done
4226
4227done
4548IFS=$as_save_IFS 4228IFS=$as_save_IFS
4549 if test -z "$ac_cv_path_EGREP"; then 4229
4550 { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 4230
4551$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} 4231fi
4232
4233EGREP="$ac_cv_path_EGREP"
4234if test -z "$EGREP"; then
4235 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4236echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4552 { (exit 1); exit 1; }; } 4237 { (exit 1); exit 1; }; }
4553 fi 4238fi
4239
4554else 4240else
4555 ac_cv_path_EGREP=$EGREP 4241 ac_cv_path_EGREP=$EGREP
4556fi 4242fi
4557 4243
4244
4558 fi 4245 fi
4559fi 4246fi
4560{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 4247{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4561$as_echo "$ac_cv_path_EGREP" >&6; } 4248echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4562 EGREP="$ac_cv_path_EGREP" 4249 EGREP="$ac_cv_path_EGREP"
4563 4250
4564 4251
4565# Extract the first word of "ar", so it can be a program name with args. 4252# Extract the first word of "ar", so it can be a program name with args.
4566set dummy ar; ac_word=$2 4253set dummy ar; ac_word=$2
4567{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 4254{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4568$as_echo_n "checking for $ac_word... " >&6; } 4255echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4569if test "${ac_cv_path_AR+set}" = set; then 4256if test "${ac_cv_path_AR+set}" = set; then
4570 $as_echo_n "(cached) " >&6 4257 echo $ECHO_N "(cached) $ECHO_C" >&6
4571else 4258else
4572 case $AR in 4259 case $AR in
4573 [\\/]* | ?:[\\/]*) 4260 [\\/]* | ?:[\\/]*)
@@ -4582,7 +4269,7 @@ do
4582 for ac_exec_ext in '' $ac_executable_extensions; do 4269 for ac_exec_ext in '' $ac_executable_extensions; do
4583 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4270 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4584 ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext" 4271 ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
4585 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4272 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4586 break 2 4273 break 2
4587 fi 4274 fi
4588done 4275done
@@ -4594,20 +4281,20 @@ esac
4594fi 4281fi
4595AR=$ac_cv_path_AR 4282AR=$ac_cv_path_AR
4596if test -n "$AR"; then 4283if test -n "$AR"; then
4597 { $as_echo "$as_me:$LINENO: result: $AR" >&5 4284 { echo "$as_me:$LINENO: result: $AR" >&5
4598$as_echo "$AR" >&6; } 4285echo "${ECHO_T}$AR" >&6; }
4599else 4286else
4600 { $as_echo "$as_me:$LINENO: result: no" >&5 4287 { echo "$as_me:$LINENO: result: no" >&5
4601$as_echo "no" >&6; } 4288echo "${ECHO_T}no" >&6; }
4602fi 4289fi
4603 4290
4604 4291
4605# Extract the first word of "cat", so it can be a program name with args. 4292# Extract the first word of "cat", so it can be a program name with args.
4606set dummy cat; ac_word=$2 4293set dummy cat; ac_word=$2
4607{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 4294{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4608$as_echo_n "checking for $ac_word... " >&6; } 4295echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4609if test "${ac_cv_path_CAT+set}" = set; then 4296if test "${ac_cv_path_CAT+set}" = set; then
4610 $as_echo_n "(cached) " >&6 4297 echo $ECHO_N "(cached) $ECHO_C" >&6
4611else 4298else
4612 case $CAT in 4299 case $CAT in
4613 [\\/]* | ?:[\\/]*) 4300 [\\/]* | ?:[\\/]*)
@@ -4622,7 +4309,7 @@ do
4622 for ac_exec_ext in '' $ac_executable_extensions; do 4309 for ac_exec_ext in '' $ac_executable_extensions; do
4623 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4310 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4624 ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext" 4311 ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4625 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4312 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4626 break 2 4313 break 2
4627 fi 4314 fi
4628done 4315done
@@ -4634,20 +4321,20 @@ esac
4634fi 4321fi
4635CAT=$ac_cv_path_CAT 4322CAT=$ac_cv_path_CAT
4636if test -n "$CAT"; then 4323if test -n "$CAT"; then
4637 { $as_echo "$as_me:$LINENO: result: $CAT" >&5 4324 { echo "$as_me:$LINENO: result: $CAT" >&5
4638$as_echo "$CAT" >&6; } 4325echo "${ECHO_T}$CAT" >&6; }
4639else 4326else
4640 { $as_echo "$as_me:$LINENO: result: no" >&5 4327 { echo "$as_me:$LINENO: result: no" >&5
4641$as_echo "no" >&6; } 4328echo "${ECHO_T}no" >&6; }
4642fi 4329fi
4643 4330
4644 4331
4645# Extract the first word of "kill", so it can be a program name with args. 4332# Extract the first word of "kill", so it can be a program name with args.
4646set dummy kill; ac_word=$2 4333set dummy kill; ac_word=$2
4647{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 4334{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4648$as_echo_n "checking for $ac_word... " >&6; } 4335echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4649if test "${ac_cv_path_KILL+set}" = set; then 4336if test "${ac_cv_path_KILL+set}" = set; then
4650 $as_echo_n "(cached) " >&6 4337 echo $ECHO_N "(cached) $ECHO_C" >&6
4651else 4338else
4652 case $KILL in 4339 case $KILL in
4653 [\\/]* | ?:[\\/]*) 4340 [\\/]* | ?:[\\/]*)
@@ -4662,7 +4349,7 @@ do
4662 for ac_exec_ext in '' $ac_executable_extensions; do 4349 for ac_exec_ext in '' $ac_executable_extensions; do
4663 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4350 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4664 ac_cv_path_KILL="$as_dir/$ac_word$ac_exec_ext" 4351 ac_cv_path_KILL="$as_dir/$ac_word$ac_exec_ext"
4665 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4352 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4666 break 2 4353 break 2
4667 fi 4354 fi
4668done 4355done
@@ -4674,11 +4361,11 @@ esac
4674fi 4361fi
4675KILL=$ac_cv_path_KILL 4362KILL=$ac_cv_path_KILL
4676if test -n "$KILL"; then 4363if test -n "$KILL"; then
4677 { $as_echo "$as_me:$LINENO: result: $KILL" >&5 4364 { echo "$as_me:$LINENO: result: $KILL" >&5
4678$as_echo "$KILL" >&6; } 4365echo "${ECHO_T}$KILL" >&6; }
4679else 4366else
4680 { $as_echo "$as_me:$LINENO: result: no" >&5 4367 { echo "$as_me:$LINENO: result: no" >&5
4681$as_echo "no" >&6; } 4368echo "${ECHO_T}no" >&6; }
4682fi 4369fi
4683 4370
4684 4371
@@ -4686,10 +4373,10 @@ for ac_prog in perl5 perl
4686do 4373do
4687 # Extract the first word of "$ac_prog", so it can be a program name with args. 4374 # Extract the first word of "$ac_prog", so it can be a program name with args.
4688set dummy $ac_prog; ac_word=$2 4375set dummy $ac_prog; ac_word=$2
4689{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 4376{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4690$as_echo_n "checking for $ac_word... " >&6; } 4377echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4691if test "${ac_cv_path_PERL+set}" = set; then 4378if test "${ac_cv_path_PERL+set}" = set; then
4692 $as_echo_n "(cached) " >&6 4379 echo $ECHO_N "(cached) $ECHO_C" >&6
4693else 4380else
4694 case $PERL in 4381 case $PERL in
4695 [\\/]* | ?:[\\/]*) 4382 [\\/]* | ?:[\\/]*)
@@ -4704,7 +4391,7 @@ do
4704 for ac_exec_ext in '' $ac_executable_extensions; do 4391 for ac_exec_ext in '' $ac_executable_extensions; do
4705 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4392 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4706 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" 4393 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4707 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4394 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4708 break 2 4395 break 2
4709 fi 4396 fi
4710done 4397done
@@ -4716,11 +4403,11 @@ esac
4716fi 4403fi
4717PERL=$ac_cv_path_PERL 4404PERL=$ac_cv_path_PERL
4718if test -n "$PERL"; then 4405if test -n "$PERL"; then
4719 { $as_echo "$as_me:$LINENO: result: $PERL" >&5 4406 { echo "$as_me:$LINENO: result: $PERL" >&5
4720$as_echo "$PERL" >&6; } 4407echo "${ECHO_T}$PERL" >&6; }
4721else 4408else
4722 { $as_echo "$as_me:$LINENO: result: no" >&5 4409 { echo "$as_me:$LINENO: result: no" >&5
4723$as_echo "no" >&6; } 4410echo "${ECHO_T}no" >&6; }
4724fi 4411fi
4725 4412
4726 4413
@@ -4729,10 +4416,10 @@ done
4729 4416
4730# Extract the first word of "sed", so it can be a program name with args. 4417# Extract the first word of "sed", so it can be a program name with args.
4731set dummy sed; ac_word=$2 4418set dummy sed; ac_word=$2
4732{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 4419{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4733$as_echo_n "checking for $ac_word... " >&6; } 4420echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4734if test "${ac_cv_path_SED+set}" = set; then 4421if test "${ac_cv_path_SED+set}" = set; then
4735 $as_echo_n "(cached) " >&6 4422 echo $ECHO_N "(cached) $ECHO_C" >&6
4736else 4423else
4737 case $SED in 4424 case $SED in
4738 [\\/]* | ?:[\\/]*) 4425 [\\/]* | ?:[\\/]*)
@@ -4747,7 +4434,7 @@ do
4747 for ac_exec_ext in '' $ac_executable_extensions; do 4434 for ac_exec_ext in '' $ac_executable_extensions; do
4748 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4435 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4749 ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" 4436 ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
4750 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4437 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4751 break 2 4438 break 2
4752 fi 4439 fi
4753done 4440done
@@ -4759,21 +4446,21 @@ esac
4759fi 4446fi
4760SED=$ac_cv_path_SED 4447SED=$ac_cv_path_SED
4761if test -n "$SED"; then 4448if test -n "$SED"; then
4762 { $as_echo "$as_me:$LINENO: result: $SED" >&5 4449 { echo "$as_me:$LINENO: result: $SED" >&5
4763$as_echo "$SED" >&6; } 4450echo "${ECHO_T}$SED" >&6; }
4764else 4451else
4765 { $as_echo "$as_me:$LINENO: result: no" >&5 4452 { echo "$as_me:$LINENO: result: no" >&5
4766$as_echo "no" >&6; } 4453echo "${ECHO_T}no" >&6; }
4767fi 4454fi
4768 4455
4769 4456
4770 4457
4771# Extract the first word of "ent", so it can be a program name with args. 4458# Extract the first word of "ent", so it can be a program name with args.
4772set dummy ent; ac_word=$2 4459set dummy ent; ac_word=$2
4773{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 4460{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4774$as_echo_n "checking for $ac_word... " >&6; } 4461echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4775if test "${ac_cv_path_ENT+set}" = set; then 4462if test "${ac_cv_path_ENT+set}" = set; then
4776 $as_echo_n "(cached) " >&6 4463 echo $ECHO_N "(cached) $ECHO_C" >&6
4777else 4464else
4778 case $ENT in 4465 case $ENT in
4779 [\\/]* | ?:[\\/]*) 4466 [\\/]* | ?:[\\/]*)
@@ -4788,7 +4475,7 @@ do
4788 for ac_exec_ext in '' $ac_executable_extensions; do 4475 for ac_exec_ext in '' $ac_executable_extensions; do
4789 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4476 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4790 ac_cv_path_ENT="$as_dir/$ac_word$ac_exec_ext" 4477 ac_cv_path_ENT="$as_dir/$ac_word$ac_exec_ext"
4791 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4478 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4792 break 2 4479 break 2
4793 fi 4480 fi
4794done 4481done
@@ -4800,21 +4487,21 @@ esac
4800fi 4487fi
4801ENT=$ac_cv_path_ENT 4488ENT=$ac_cv_path_ENT
4802if test -n "$ENT"; then 4489if test -n "$ENT"; then
4803 { $as_echo "$as_me:$LINENO: result: $ENT" >&5 4490 { echo "$as_me:$LINENO: result: $ENT" >&5
4804$as_echo "$ENT" >&6; } 4491echo "${ECHO_T}$ENT" >&6; }
4805else 4492else
4806 { $as_echo "$as_me:$LINENO: result: no" >&5 4493 { echo "$as_me:$LINENO: result: no" >&5
4807$as_echo "no" >&6; } 4494echo "${ECHO_T}no" >&6; }
4808fi 4495fi
4809 4496
4810 4497
4811 4498
4812# Extract the first word of "bash", so it can be a program name with args. 4499# Extract the first word of "bash", so it can be a program name with args.
4813set dummy bash; ac_word=$2 4500set dummy bash; ac_word=$2
4814{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 4501{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4815$as_echo_n "checking for $ac_word... " >&6; } 4502echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4816if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then 4503if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then
4817 $as_echo_n "(cached) " >&6 4504 echo $ECHO_N "(cached) $ECHO_C" >&6
4818else 4505else
4819 case $TEST_MINUS_S_SH in 4506 case $TEST_MINUS_S_SH in
4820 [\\/]* | ?:[\\/]*) 4507 [\\/]* | ?:[\\/]*)
@@ -4829,7 +4516,7 @@ do
4829 for ac_exec_ext in '' $ac_executable_extensions; do 4516 for ac_exec_ext in '' $ac_executable_extensions; do
4830 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4517 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4831 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext" 4518 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4832 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4519 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4833 break 2 4520 break 2
4834 fi 4521 fi
4835done 4522done
@@ -4841,20 +4528,20 @@ esac
4841fi 4528fi
4842TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH 4529TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4843if test -n "$TEST_MINUS_S_SH"; then 4530if test -n "$TEST_MINUS_S_SH"; then
4844 { $as_echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5 4531 { echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5
4845$as_echo "$TEST_MINUS_S_SH" >&6; } 4532echo "${ECHO_T}$TEST_MINUS_S_SH" >&6; }
4846else 4533else
4847 { $as_echo "$as_me:$LINENO: result: no" >&5 4534 { echo "$as_me:$LINENO: result: no" >&5
4848$as_echo "no" >&6; } 4535echo "${ECHO_T}no" >&6; }
4849fi 4536fi
4850 4537
4851 4538
4852# Extract the first word of "ksh", so it can be a program name with args. 4539# Extract the first word of "ksh", so it can be a program name with args.
4853set dummy ksh; ac_word=$2 4540set dummy ksh; ac_word=$2
4854{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 4541{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4855$as_echo_n "checking for $ac_word... " >&6; } 4542echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4856if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then 4543if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then
4857 $as_echo_n "(cached) " >&6 4544 echo $ECHO_N "(cached) $ECHO_C" >&6
4858else 4545else
4859 case $TEST_MINUS_S_SH in 4546 case $TEST_MINUS_S_SH in
4860 [\\/]* | ?:[\\/]*) 4547 [\\/]* | ?:[\\/]*)
@@ -4869,7 +4556,7 @@ do
4869 for ac_exec_ext in '' $ac_executable_extensions; do 4556 for ac_exec_ext in '' $ac_executable_extensions; do
4870 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4557 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4871 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext" 4558 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4872 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4559 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4873 break 2 4560 break 2
4874 fi 4561 fi
4875done 4562done
@@ -4881,20 +4568,20 @@ esac
4881fi 4568fi
4882TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH 4569TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4883if test -n "$TEST_MINUS_S_SH"; then 4570if test -n "$TEST_MINUS_S_SH"; then
4884 { $as_echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5 4571 { echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5
4885$as_echo "$TEST_MINUS_S_SH" >&6; } 4572echo "${ECHO_T}$TEST_MINUS_S_SH" >&6; }
4886else 4573else
4887 { $as_echo "$as_me:$LINENO: result: no" >&5 4574 { echo "$as_me:$LINENO: result: no" >&5
4888$as_echo "no" >&6; } 4575echo "${ECHO_T}no" >&6; }
4889fi 4576fi
4890 4577
4891 4578
4892# Extract the first word of "sh", so it can be a program name with args. 4579# Extract the first word of "sh", so it can be a program name with args.
4893set dummy sh; ac_word=$2 4580set dummy sh; ac_word=$2
4894{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 4581{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4895$as_echo_n "checking for $ac_word... " >&6; } 4582echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4896if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then 4583if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then
4897 $as_echo_n "(cached) " >&6 4584 echo $ECHO_N "(cached) $ECHO_C" >&6
4898else 4585else
4899 case $TEST_MINUS_S_SH in 4586 case $TEST_MINUS_S_SH in
4900 [\\/]* | ?:[\\/]*) 4587 [\\/]* | ?:[\\/]*)
@@ -4909,7 +4596,7 @@ do
4909 for ac_exec_ext in '' $ac_executable_extensions; do 4596 for ac_exec_ext in '' $ac_executable_extensions; do
4910 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4597 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4911 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext" 4598 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4912 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4599 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4913 break 2 4600 break 2
4914 fi 4601 fi
4915done 4602done
@@ -4921,20 +4608,20 @@ esac
4921fi 4608fi
4922TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH 4609TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4923if test -n "$TEST_MINUS_S_SH"; then 4610if test -n "$TEST_MINUS_S_SH"; then
4924 { $as_echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5 4611 { echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5
4925$as_echo "$TEST_MINUS_S_SH" >&6; } 4612echo "${ECHO_T}$TEST_MINUS_S_SH" >&6; }
4926else 4613else
4927 { $as_echo "$as_me:$LINENO: result: no" >&5 4614 { echo "$as_me:$LINENO: result: no" >&5
4928$as_echo "no" >&6; } 4615echo "${ECHO_T}no" >&6; }
4929fi 4616fi
4930 4617
4931 4618
4932# Extract the first word of "sh", so it can be a program name with args. 4619# Extract the first word of "sh", so it can be a program name with args.
4933set dummy sh; ac_word=$2 4620set dummy sh; ac_word=$2
4934{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 4621{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4935$as_echo_n "checking for $ac_word... " >&6; } 4622echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4936if test "${ac_cv_path_SH+set}" = set; then 4623if test "${ac_cv_path_SH+set}" = set; then
4937 $as_echo_n "(cached) " >&6 4624 echo $ECHO_N "(cached) $ECHO_C" >&6
4938else 4625else
4939 case $SH in 4626 case $SH in
4940 [\\/]* | ?:[\\/]*) 4627 [\\/]* | ?:[\\/]*)
@@ -4949,7 +4636,7 @@ do
4949 for ac_exec_ext in '' $ac_executable_extensions; do 4636 for ac_exec_ext in '' $ac_executable_extensions; do
4950 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4637 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4951 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext" 4638 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
4952 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4639 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4953 break 2 4640 break 2
4954 fi 4641 fi
4955done 4642done
@@ -4961,11 +4648,11 @@ esac
4961fi 4648fi
4962SH=$ac_cv_path_SH 4649SH=$ac_cv_path_SH
4963if test -n "$SH"; then 4650if test -n "$SH"; then
4964 { $as_echo "$as_me:$LINENO: result: $SH" >&5 4651 { echo "$as_me:$LINENO: result: $SH" >&5
4965$as_echo "$SH" >&6; } 4652echo "${ECHO_T}$SH" >&6; }
4966else 4653else
4967 { $as_echo "$as_me:$LINENO: result: no" >&5 4654 { echo "$as_me:$LINENO: result: no" >&5
4968$as_echo "no" >&6; } 4655echo "${ECHO_T}no" >&6; }
4969fi 4656fi
4970 4657
4971 4658
@@ -4974,10 +4661,10 @@ TEST_SHELL=sh
4974 4661
4975# Extract the first word of "groupadd", so it can be a program name with args. 4662# Extract the first word of "groupadd", so it can be a program name with args.
4976set dummy groupadd; ac_word=$2 4663set dummy groupadd; ac_word=$2
4977{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 4664{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4978$as_echo_n "checking for $ac_word... " >&6; } 4665echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4979if test "${ac_cv_path_PATH_GROUPADD_PROG+set}" = set; then 4666if test "${ac_cv_path_PATH_GROUPADD_PROG+set}" = set; then
4980 $as_echo_n "(cached) " >&6 4667 echo $ECHO_N "(cached) $ECHO_C" >&6
4981else 4668else
4982 case $PATH_GROUPADD_PROG in 4669 case $PATH_GROUPADD_PROG in
4983 [\\/]* | ?:[\\/]*) 4670 [\\/]* | ?:[\\/]*)
@@ -4992,7 +4679,7 @@ do
4992 for ac_exec_ext in '' $ac_executable_extensions; do 4679 for ac_exec_ext in '' $ac_executable_extensions; do
4993 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4680 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4994 ac_cv_path_PATH_GROUPADD_PROG="$as_dir/$ac_word$ac_exec_ext" 4681 ac_cv_path_PATH_GROUPADD_PROG="$as_dir/$ac_word$ac_exec_ext"
4995 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4682 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4996 break 2 4683 break 2
4997 fi 4684 fi
4998done 4685done
@@ -5005,20 +4692,20 @@ esac
5005fi 4692fi
5006PATH_GROUPADD_PROG=$ac_cv_path_PATH_GROUPADD_PROG 4693PATH_GROUPADD_PROG=$ac_cv_path_PATH_GROUPADD_PROG
5007if test -n "$PATH_GROUPADD_PROG"; then 4694if test -n "$PATH_GROUPADD_PROG"; then
5008 { $as_echo "$as_me:$LINENO: result: $PATH_GROUPADD_PROG" >&5 4695 { echo "$as_me:$LINENO: result: $PATH_GROUPADD_PROG" >&5
5009$as_echo "$PATH_GROUPADD_PROG" >&6; } 4696echo "${ECHO_T}$PATH_GROUPADD_PROG" >&6; }
5010else 4697else
5011 { $as_echo "$as_me:$LINENO: result: no" >&5 4698 { echo "$as_me:$LINENO: result: no" >&5
5012$as_echo "no" >&6; } 4699echo "${ECHO_T}no" >&6; }
5013fi 4700fi
5014 4701
5015 4702
5016# Extract the first word of "useradd", so it can be a program name with args. 4703# Extract the first word of "useradd", so it can be a program name with args.
5017set dummy useradd; ac_word=$2 4704set dummy useradd; ac_word=$2
5018{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 4705{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5019$as_echo_n "checking for $ac_word... " >&6; } 4706echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5020if test "${ac_cv_path_PATH_USERADD_PROG+set}" = set; then 4707if test "${ac_cv_path_PATH_USERADD_PROG+set}" = set; then
5021 $as_echo_n "(cached) " >&6 4708 echo $ECHO_N "(cached) $ECHO_C" >&6
5022else 4709else
5023 case $PATH_USERADD_PROG in 4710 case $PATH_USERADD_PROG in
5024 [\\/]* | ?:[\\/]*) 4711 [\\/]* | ?:[\\/]*)
@@ -5033,7 +4720,7 @@ do
5033 for ac_exec_ext in '' $ac_executable_extensions; do 4720 for ac_exec_ext in '' $ac_executable_extensions; do
5034 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4721 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5035 ac_cv_path_PATH_USERADD_PROG="$as_dir/$ac_word$ac_exec_ext" 4722 ac_cv_path_PATH_USERADD_PROG="$as_dir/$ac_word$ac_exec_ext"
5036 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4723 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5037 break 2 4724 break 2
5038 fi 4725 fi
5039done 4726done
@@ -5046,20 +4733,20 @@ esac
5046fi 4733fi
5047PATH_USERADD_PROG=$ac_cv_path_PATH_USERADD_PROG 4734PATH_USERADD_PROG=$ac_cv_path_PATH_USERADD_PROG
5048if test -n "$PATH_USERADD_PROG"; then 4735if test -n "$PATH_USERADD_PROG"; then
5049 { $as_echo "$as_me:$LINENO: result: $PATH_USERADD_PROG" >&5 4736 { echo "$as_me:$LINENO: result: $PATH_USERADD_PROG" >&5
5050$as_echo "$PATH_USERADD_PROG" >&6; } 4737echo "${ECHO_T}$PATH_USERADD_PROG" >&6; }
5051else 4738else
5052 { $as_echo "$as_me:$LINENO: result: no" >&5 4739 { echo "$as_me:$LINENO: result: no" >&5
5053$as_echo "no" >&6; } 4740echo "${ECHO_T}no" >&6; }
5054fi 4741fi
5055 4742
5056 4743
5057# Extract the first word of "pkgmk", so it can be a program name with args. 4744# Extract the first word of "pkgmk", so it can be a program name with args.
5058set dummy pkgmk; ac_word=$2 4745set dummy pkgmk; ac_word=$2
5059{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 4746{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5060$as_echo_n "checking for $ac_word... " >&6; } 4747echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5061if test "${ac_cv_prog_MAKE_PACKAGE_SUPPORTED+set}" = set; then 4748if test "${ac_cv_prog_MAKE_PACKAGE_SUPPORTED+set}" = set; then
5062 $as_echo_n "(cached) " >&6 4749 echo $ECHO_N "(cached) $ECHO_C" >&6
5063else 4750else
5064 if test -n "$MAKE_PACKAGE_SUPPORTED"; then 4751 if test -n "$MAKE_PACKAGE_SUPPORTED"; then
5065 ac_cv_prog_MAKE_PACKAGE_SUPPORTED="$MAKE_PACKAGE_SUPPORTED" # Let the user override the test. 4752 ac_cv_prog_MAKE_PACKAGE_SUPPORTED="$MAKE_PACKAGE_SUPPORTED" # Let the user override the test.
@@ -5072,7 +4759,7 @@ do
5072 for ac_exec_ext in '' $ac_executable_extensions; do 4759 for ac_exec_ext in '' $ac_executable_extensions; do
5073 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4760 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5074 ac_cv_prog_MAKE_PACKAGE_SUPPORTED="yes" 4761 ac_cv_prog_MAKE_PACKAGE_SUPPORTED="yes"
5075 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4762 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5076 break 2 4763 break 2
5077 fi 4764 fi
5078done 4765done
@@ -5084,11 +4771,11 @@ fi
5084fi 4771fi
5085MAKE_PACKAGE_SUPPORTED=$ac_cv_prog_MAKE_PACKAGE_SUPPORTED 4772MAKE_PACKAGE_SUPPORTED=$ac_cv_prog_MAKE_PACKAGE_SUPPORTED
5086if test -n "$MAKE_PACKAGE_SUPPORTED"; then 4773if test -n "$MAKE_PACKAGE_SUPPORTED"; then
5087 { $as_echo "$as_me:$LINENO: result: $MAKE_PACKAGE_SUPPORTED" >&5 4774 { echo "$as_me:$LINENO: result: $MAKE_PACKAGE_SUPPORTED" >&5
5088$as_echo "$MAKE_PACKAGE_SUPPORTED" >&6; } 4775echo "${ECHO_T}$MAKE_PACKAGE_SUPPORTED" >&6; }
5089else 4776else
5090 { $as_echo "$as_me:$LINENO: result: no" >&5 4777 { echo "$as_me:$LINENO: result: no" >&5
5091$as_echo "no" >&6; } 4778echo "${ECHO_T}no" >&6; }
5092fi 4779fi
5093 4780
5094 4781
@@ -5108,10 +4795,10 @@ fi
5108 4795
5109if test "$enable_largefile" != no; then 4796if test "$enable_largefile" != no; then
5110 4797
5111 { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 4798 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5112$as_echo_n "checking for special C compiler options needed for large files... " >&6; } 4799echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
5113if test "${ac_cv_sys_largefile_CC+set}" = set; then 4800if test "${ac_cv_sys_largefile_CC+set}" = set; then
5114 $as_echo_n "(cached) " >&6 4801 echo $ECHO_N "(cached) $ECHO_C" >&6
5115else 4802else
5116 ac_cv_sys_largefile_CC=no 4803 ac_cv_sys_largefile_CC=no
5117 if test "$GCC" != yes; then 4804 if test "$GCC" != yes; then
@@ -5148,21 +4835,20 @@ case "(($ac_try" in
5148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5149 *) ac_try_echo=$ac_try;; 4836 *) ac_try_echo=$ac_try;;
5150esac 4837esac
5151eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 4838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5152$as_echo "$ac_try_echo") >&5
5153 (eval "$ac_compile") 2>conftest.er1 4839 (eval "$ac_compile") 2>conftest.er1
5154 ac_status=$? 4840 ac_status=$?
5155 grep -v '^ *+' conftest.er1 >conftest.err 4841 grep -v '^ *+' conftest.er1 >conftest.err
5156 rm -f conftest.er1 4842 rm -f conftest.er1
5157 cat conftest.err >&5 4843 cat conftest.err >&5
5158 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 4844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5159 (exit $ac_status); } && { 4845 (exit $ac_status); } && {
5160 test -z "$ac_c_werror_flag" || 4846 test -z "$ac_c_werror_flag" ||
5161 test ! -s conftest.err 4847 test ! -s conftest.err
5162 } && test -s conftest.$ac_objext; then 4848 } && test -s conftest.$ac_objext; then
5163 break 4849 break
5164else 4850else
5165 $as_echo "$as_me: failed program was:" >&5 4851 echo "$as_me: failed program was:" >&5
5166sed 's/^/| /' conftest.$ac_ext >&5 4852sed 's/^/| /' conftest.$ac_ext >&5
5167 4853
5168 4854
@@ -5176,21 +4862,20 @@ case "(($ac_try" in
5176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5177 *) ac_try_echo=$ac_try;; 4863 *) ac_try_echo=$ac_try;;
5178esac 4864esac
5179eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 4865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5180$as_echo "$ac_try_echo") >&5
5181 (eval "$ac_compile") 2>conftest.er1 4866 (eval "$ac_compile") 2>conftest.er1
5182 ac_status=$? 4867 ac_status=$?
5183 grep -v '^ *+' conftest.er1 >conftest.err 4868 grep -v '^ *+' conftest.er1 >conftest.err
5184 rm -f conftest.er1 4869 rm -f conftest.er1
5185 cat conftest.err >&5 4870 cat conftest.err >&5
5186 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 4871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5187 (exit $ac_status); } && { 4872 (exit $ac_status); } && {
5188 test -z "$ac_c_werror_flag" || 4873 test -z "$ac_c_werror_flag" ||
5189 test ! -s conftest.err 4874 test ! -s conftest.err
5190 } && test -s conftest.$ac_objext; then 4875 } && test -s conftest.$ac_objext; then
5191 ac_cv_sys_largefile_CC=' -n32'; break 4876 ac_cv_sys_largefile_CC=' -n32'; break
5192else 4877else
5193 $as_echo "$as_me: failed program was:" >&5 4878 echo "$as_me: failed program was:" >&5
5194sed 's/^/| /' conftest.$ac_ext >&5 4879sed 's/^/| /' conftest.$ac_ext >&5
5195 4880
5196 4881
@@ -5203,16 +4888,16 @@ rm -f core conftest.err conftest.$ac_objext
5203 rm -f conftest.$ac_ext 4888 rm -f conftest.$ac_ext
5204 fi 4889 fi
5205fi 4890fi
5206{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 4891{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5207$as_echo "$ac_cv_sys_largefile_CC" >&6; } 4892echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
5208 if test "$ac_cv_sys_largefile_CC" != no; then 4893 if test "$ac_cv_sys_largefile_CC" != no; then
5209 CC=$CC$ac_cv_sys_largefile_CC 4894 CC=$CC$ac_cv_sys_largefile_CC
5210 fi 4895 fi
5211 4896
5212 { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 4897 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5213$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } 4898echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
5214if test "${ac_cv_sys_file_offset_bits+set}" = set; then 4899if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5215 $as_echo_n "(cached) " >&6 4900 echo $ECHO_N "(cached) $ECHO_C" >&6
5216else 4901else
5217 while :; do 4902 while :; do
5218 cat >conftest.$ac_ext <<_ACEOF 4903 cat >conftest.$ac_ext <<_ACEOF
@@ -5244,21 +4929,20 @@ case "(($ac_try" in
5244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5245 *) ac_try_echo=$ac_try;; 4930 *) ac_try_echo=$ac_try;;
5246esac 4931esac
5247eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 4932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5248$as_echo "$ac_try_echo") >&5
5249 (eval "$ac_compile") 2>conftest.er1 4933 (eval "$ac_compile") 2>conftest.er1
5250 ac_status=$? 4934 ac_status=$?
5251 grep -v '^ *+' conftest.er1 >conftest.err 4935 grep -v '^ *+' conftest.er1 >conftest.err
5252 rm -f conftest.er1 4936 rm -f conftest.er1
5253 cat conftest.err >&5 4937 cat conftest.err >&5
5254 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 4938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5255 (exit $ac_status); } && { 4939 (exit $ac_status); } && {
5256 test -z "$ac_c_werror_flag" || 4940 test -z "$ac_c_werror_flag" ||
5257 test ! -s conftest.err 4941 test ! -s conftest.err
5258 } && test -s conftest.$ac_objext; then 4942 } && test -s conftest.$ac_objext; then
5259 ac_cv_sys_file_offset_bits=no; break 4943 ac_cv_sys_file_offset_bits=no; break
5260else 4944else
5261 $as_echo "$as_me: failed program was:" >&5 4945 echo "$as_me: failed program was:" >&5
5262sed 's/^/| /' conftest.$ac_ext >&5 4946sed 's/^/| /' conftest.$ac_ext >&5
5263 4947
5264 4948
@@ -5295,21 +4979,20 @@ case "(($ac_try" in
5295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5296 *) ac_try_echo=$ac_try;; 4980 *) ac_try_echo=$ac_try;;
5297esac 4981esac
5298eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 4982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5299$as_echo "$ac_try_echo") >&5
5300 (eval "$ac_compile") 2>conftest.er1 4983 (eval "$ac_compile") 2>conftest.er1
5301 ac_status=$? 4984 ac_status=$?
5302 grep -v '^ *+' conftest.er1 >conftest.err 4985 grep -v '^ *+' conftest.er1 >conftest.err
5303 rm -f conftest.er1 4986 rm -f conftest.er1
5304 cat conftest.err >&5 4987 cat conftest.err >&5
5305 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 4988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5306 (exit $ac_status); } && { 4989 (exit $ac_status); } && {
5307 test -z "$ac_c_werror_flag" || 4990 test -z "$ac_c_werror_flag" ||
5308 test ! -s conftest.err 4991 test ! -s conftest.err
5309 } && test -s conftest.$ac_objext; then 4992 } && test -s conftest.$ac_objext; then
5310 ac_cv_sys_file_offset_bits=64; break 4993 ac_cv_sys_file_offset_bits=64; break
5311else 4994else
5312 $as_echo "$as_me: failed program was:" >&5 4995 echo "$as_me: failed program was:" >&5
5313sed 's/^/| /' conftest.$ac_ext >&5 4996sed 's/^/| /' conftest.$ac_ext >&5
5314 4997
5315 4998
@@ -5320,8 +5003,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5320 break 5003 break
5321done 5004done
5322fi 5005fi
5323{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 5006{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5324$as_echo "$ac_cv_sys_file_offset_bits" >&6; } 5007echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
5325case $ac_cv_sys_file_offset_bits in #( 5008case $ac_cv_sys_file_offset_bits in #(
5326 no | unknown) ;; 5009 no | unknown) ;;
5327 *) 5010 *)
@@ -5330,12 +5013,12 @@ cat >>confdefs.h <<_ACEOF
5330_ACEOF 5013_ACEOF
5331;; 5014;;
5332esac 5015esac
5333rm -rf conftest* 5016rm -f conftest*
5334 if test $ac_cv_sys_file_offset_bits = unknown; then 5017 if test $ac_cv_sys_file_offset_bits = unknown; then
5335 { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 5018 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
5336$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } 5019echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
5337if test "${ac_cv_sys_large_files+set}" = set; then 5020if test "${ac_cv_sys_large_files+set}" = set; then
5338 $as_echo_n "(cached) " >&6 5021 echo $ECHO_N "(cached) $ECHO_C" >&6
5339else 5022else
5340 while :; do 5023 while :; do
5341 cat >conftest.$ac_ext <<_ACEOF 5024 cat >conftest.$ac_ext <<_ACEOF
@@ -5367,21 +5050,20 @@ case "(($ac_try" in
5367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 5050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5368 *) ac_try_echo=$ac_try;; 5051 *) ac_try_echo=$ac_try;;
5369esac 5052esac
5370eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 5053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5371$as_echo "$ac_try_echo") >&5
5372 (eval "$ac_compile") 2>conftest.er1 5054 (eval "$ac_compile") 2>conftest.er1
5373 ac_status=$? 5055 ac_status=$?
5374 grep -v '^ *+' conftest.er1 >conftest.err 5056 grep -v '^ *+' conftest.er1 >conftest.err
5375 rm -f conftest.er1 5057 rm -f conftest.er1
5376 cat conftest.err >&5 5058 cat conftest.err >&5
5377 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 5059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5378 (exit $ac_status); } && { 5060 (exit $ac_status); } && {
5379 test -z "$ac_c_werror_flag" || 5061 test -z "$ac_c_werror_flag" ||
5380 test ! -s conftest.err 5062 test ! -s conftest.err
5381 } && test -s conftest.$ac_objext; then 5063 } && test -s conftest.$ac_objext; then
5382 ac_cv_sys_large_files=no; break 5064 ac_cv_sys_large_files=no; break
5383else 5065else
5384 $as_echo "$as_me: failed program was:" >&5 5066 echo "$as_me: failed program was:" >&5
5385sed 's/^/| /' conftest.$ac_ext >&5 5067sed 's/^/| /' conftest.$ac_ext >&5
5386 5068
5387 5069
@@ -5418,21 +5100,20 @@ case "(($ac_try" in
5418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 5100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5419 *) ac_try_echo=$ac_try;; 5101 *) ac_try_echo=$ac_try;;
5420esac 5102esac
5421eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 5103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5422$as_echo "$ac_try_echo") >&5
5423 (eval "$ac_compile") 2>conftest.er1 5104 (eval "$ac_compile") 2>conftest.er1
5424 ac_status=$? 5105 ac_status=$?
5425 grep -v '^ *+' conftest.er1 >conftest.err 5106 grep -v '^ *+' conftest.er1 >conftest.err
5426 rm -f conftest.er1 5107 rm -f conftest.er1
5427 cat conftest.err >&5 5108 cat conftest.err >&5
5428 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 5109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5429 (exit $ac_status); } && { 5110 (exit $ac_status); } && {
5430 test -z "$ac_c_werror_flag" || 5111 test -z "$ac_c_werror_flag" ||
5431 test ! -s conftest.err 5112 test ! -s conftest.err
5432 } && test -s conftest.$ac_objext; then 5113 } && test -s conftest.$ac_objext; then
5433 ac_cv_sys_large_files=1; break 5114 ac_cv_sys_large_files=1; break
5434else 5115else
5435 $as_echo "$as_me: failed program was:" >&5 5116 echo "$as_me: failed program was:" >&5
5436sed 's/^/| /' conftest.$ac_ext >&5 5117sed 's/^/| /' conftest.$ac_ext >&5
5437 5118
5438 5119
@@ -5443,8 +5124,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5443 break 5124 break
5444done 5125done
5445fi 5126fi
5446{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 5127{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
5447$as_echo "$ac_cv_sys_large_files" >&6; } 5128echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
5448case $ac_cv_sys_large_files in #( 5129case $ac_cv_sys_large_files in #(
5449 no | unknown) ;; 5130 no | unknown) ;;
5450 *) 5131 *)
@@ -5453,14 +5134,14 @@ cat >>confdefs.h <<_ACEOF
5453_ACEOF 5134_ACEOF
5454;; 5135;;
5455esac 5136esac
5456rm -rf conftest* 5137rm -f conftest*
5457 fi 5138 fi
5458fi 5139fi
5459 5140
5460 5141
5461if test -z "$AR" ; then 5142if test -z "$AR" ; then
5462 { { $as_echo "$as_me:$LINENO: error: *** 'ar' missing, please install or fix your \$PATH ***" >&5 5143 { { echo "$as_me:$LINENO: error: *** 'ar' missing, please install or fix your \$PATH ***" >&5
5463$as_echo "$as_me: error: *** 'ar' missing, please install or fix your \$PATH ***" >&2;} 5144echo "$as_me: error: *** 'ar' missing, please install or fix your \$PATH ***" >&2;}
5464 { (exit 1); exit 1; }; } 5145 { (exit 1); exit 1; }; }
5465fi 5146fi
5466 5147
@@ -5475,10 +5156,10 @@ else
5475 # Search for login 5156 # Search for login
5476 # Extract the first word of "login", so it can be a program name with args. 5157 # Extract the first word of "login", so it can be a program name with args.
5477set dummy login; ac_word=$2 5158set dummy login; ac_word=$2
5478{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 5159{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5479$as_echo_n "checking for $ac_word... " >&6; } 5160echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5480if test "${ac_cv_path_LOGIN_PROGRAM_FALLBACK+set}" = set; then 5161if test "${ac_cv_path_LOGIN_PROGRAM_FALLBACK+set}" = set; then
5481 $as_echo_n "(cached) " >&6 5162 echo $ECHO_N "(cached) $ECHO_C" >&6
5482else 5163else
5483 case $LOGIN_PROGRAM_FALLBACK in 5164 case $LOGIN_PROGRAM_FALLBACK in
5484 [\\/]* | ?:[\\/]*) 5165 [\\/]* | ?:[\\/]*)
@@ -5493,7 +5174,7 @@ do
5493 for ac_exec_ext in '' $ac_executable_extensions; do 5174 for ac_exec_ext in '' $ac_executable_extensions; do
5494 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5175 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5495 ac_cv_path_LOGIN_PROGRAM_FALLBACK="$as_dir/$ac_word$ac_exec_ext" 5176 ac_cv_path_LOGIN_PROGRAM_FALLBACK="$as_dir/$ac_word$ac_exec_ext"
5496 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 5177 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5497 break 2 5178 break 2
5498 fi 5179 fi
5499done 5180done
@@ -5505,11 +5186,11 @@ esac
5505fi 5186fi
5506LOGIN_PROGRAM_FALLBACK=$ac_cv_path_LOGIN_PROGRAM_FALLBACK 5187LOGIN_PROGRAM_FALLBACK=$ac_cv_path_LOGIN_PROGRAM_FALLBACK
5507if test -n "$LOGIN_PROGRAM_FALLBACK"; then 5188if test -n "$LOGIN_PROGRAM_FALLBACK"; then
5508 { $as_echo "$as_me:$LINENO: result: $LOGIN_PROGRAM_FALLBACK" >&5 5189 { echo "$as_me:$LINENO: result: $LOGIN_PROGRAM_FALLBACK" >&5
5509$as_echo "$LOGIN_PROGRAM_FALLBACK" >&6; } 5190echo "${ECHO_T}$LOGIN_PROGRAM_FALLBACK" >&6; }
5510else 5191else
5511 { $as_echo "$as_me:$LINENO: result: no" >&5 5192 { echo "$as_me:$LINENO: result: no" >&5
5512$as_echo "no" >&6; } 5193echo "${ECHO_T}no" >&6; }
5513fi 5194fi
5514 5195
5515 5196
@@ -5523,10 +5204,10 @@ fi
5523 5204
5524# Extract the first word of "passwd", so it can be a program name with args. 5205# Extract the first word of "passwd", so it can be a program name with args.
5525set dummy passwd; ac_word=$2 5206set dummy passwd; ac_word=$2
5526{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 5207{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5527$as_echo_n "checking for $ac_word... " >&6; } 5208echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5528if test "${ac_cv_path_PATH_PASSWD_PROG+set}" = set; then 5209if test "${ac_cv_path_PATH_PASSWD_PROG+set}" = set; then
5529 $as_echo_n "(cached) " >&6 5210 echo $ECHO_N "(cached) $ECHO_C" >&6
5530else 5211else
5531 case $PATH_PASSWD_PROG in 5212 case $PATH_PASSWD_PROG in
5532 [\\/]* | ?:[\\/]*) 5213 [\\/]* | ?:[\\/]*)
@@ -5541,7 +5222,7 @@ do
5541 for ac_exec_ext in '' $ac_executable_extensions; do 5222 for ac_exec_ext in '' $ac_executable_extensions; do
5542 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5223 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5543 ac_cv_path_PATH_PASSWD_PROG="$as_dir/$ac_word$ac_exec_ext" 5224 ac_cv_path_PATH_PASSWD_PROG="$as_dir/$ac_word$ac_exec_ext"
5544 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 5225 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5545 break 2 5226 break 2
5546 fi 5227 fi
5547done 5228done
@@ -5553,11 +5234,11 @@ esac
5553fi 5234fi
5554PATH_PASSWD_PROG=$ac_cv_path_PATH_PASSWD_PROG 5235PATH_PASSWD_PROG=$ac_cv_path_PATH_PASSWD_PROG
5555if test -n "$PATH_PASSWD_PROG"; then 5236if test -n "$PATH_PASSWD_PROG"; then
5556 { $as_echo "$as_me:$LINENO: result: $PATH_PASSWD_PROG" >&5 5237 { echo "$as_me:$LINENO: result: $PATH_PASSWD_PROG" >&5
5557$as_echo "$PATH_PASSWD_PROG" >&6; } 5238echo "${ECHO_T}$PATH_PASSWD_PROG" >&6; }
5558else 5239else
5559 { $as_echo "$as_me:$LINENO: result: no" >&5 5240 { echo "$as_me:$LINENO: result: no" >&5
5560$as_echo "no" >&6; } 5241echo "${ECHO_T}no" >&6; }
5561fi 5242fi
5562 5243
5563 5244
@@ -5574,10 +5255,10 @@ if test -z "$LD" ; then
5574fi 5255fi
5575 5256
5576 5257
5577{ $as_echo "$as_me:$LINENO: checking for inline" >&5 5258{ echo "$as_me:$LINENO: checking for inline" >&5
5578$as_echo_n "checking for inline... " >&6; } 5259echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
5579if test "${ac_cv_c_inline+set}" = set; then 5260if test "${ac_cv_c_inline+set}" = set; then
5580 $as_echo_n "(cached) " >&6 5261 echo $ECHO_N "(cached) $ECHO_C" >&6
5581else 5262else
5582 ac_cv_c_inline=no 5263 ac_cv_c_inline=no
5583for ac_kw in inline __inline__ __inline; do 5264for ac_kw in inline __inline__ __inline; do
@@ -5600,21 +5281,20 @@ case "(($ac_try" in
5600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 5281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5601 *) ac_try_echo=$ac_try;; 5282 *) ac_try_echo=$ac_try;;
5602esac 5283esac
5603eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 5284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5604$as_echo "$ac_try_echo") >&5
5605 (eval "$ac_compile") 2>conftest.er1 5285 (eval "$ac_compile") 2>conftest.er1
5606 ac_status=$? 5286 ac_status=$?
5607 grep -v '^ *+' conftest.er1 >conftest.err 5287 grep -v '^ *+' conftest.er1 >conftest.err
5608 rm -f conftest.er1 5288 rm -f conftest.er1
5609 cat conftest.err >&5 5289 cat conftest.err >&5
5610 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 5290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5611 (exit $ac_status); } && { 5291 (exit $ac_status); } && {
5612 test -z "$ac_c_werror_flag" || 5292 test -z "$ac_c_werror_flag" ||
5613 test ! -s conftest.err 5293 test ! -s conftest.err
5614 } && test -s conftest.$ac_objext; then 5294 } && test -s conftest.$ac_objext; then
5615 ac_cv_c_inline=$ac_kw 5295 ac_cv_c_inline=$ac_kw
5616else 5296else
5617 $as_echo "$as_me: failed program was:" >&5 5297 echo "$as_me: failed program was:" >&5
5618sed 's/^/| /' conftest.$ac_ext >&5 5298sed 's/^/| /' conftest.$ac_ext >&5
5619 5299
5620 5300
@@ -5625,8 +5305,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5625done 5305done
5626 5306
5627fi 5307fi
5628{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 5308{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
5629$as_echo "$ac_cv_c_inline" >&6; } 5309echo "${ECHO_T}$ac_cv_c_inline" >&6; }
5630 5310
5631 5311
5632case $ac_cv_c_inline in 5312case $ac_cv_c_inline in
@@ -5645,10 +5325,10 @@ _ACEOF
5645esac 5325esac
5646 5326
5647 5327
5648{ $as_echo "$as_me:$LINENO: checking whether LLONG_MAX is declared" >&5 5328{ echo "$as_me:$LINENO: checking whether LLONG_MAX is declared" >&5
5649$as_echo_n "checking whether LLONG_MAX is declared... " >&6; } 5329echo $ECHO_N "checking whether LLONG_MAX is declared... $ECHO_C" >&6; }
5650if test "${ac_cv_have_decl_LLONG_MAX+set}" = set; then 5330if test "${ac_cv_have_decl_LLONG_MAX+set}" = set; then
5651 $as_echo_n "(cached) " >&6 5331 echo $ECHO_N "(cached) $ECHO_C" >&6
5652else 5332else
5653 cat >conftest.$ac_ext <<_ACEOF 5333 cat >conftest.$ac_ext <<_ACEOF
5654/* confdefs.h. */ 5334/* confdefs.h. */
@@ -5675,21 +5355,20 @@ case "(($ac_try" in
5675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 5355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5676 *) ac_try_echo=$ac_try;; 5356 *) ac_try_echo=$ac_try;;
5677esac 5357esac
5678eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 5358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5679$as_echo "$ac_try_echo") >&5
5680 (eval "$ac_compile") 2>conftest.er1 5359 (eval "$ac_compile") 2>conftest.er1
5681 ac_status=$? 5360 ac_status=$?
5682 grep -v '^ *+' conftest.er1 >conftest.err 5361 grep -v '^ *+' conftest.er1 >conftest.err
5683 rm -f conftest.er1 5362 rm -f conftest.er1
5684 cat conftest.err >&5 5363 cat conftest.err >&5
5685 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 5364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5686 (exit $ac_status); } && { 5365 (exit $ac_status); } && {
5687 test -z "$ac_c_werror_flag" || 5366 test -z "$ac_c_werror_flag" ||
5688 test ! -s conftest.err 5367 test ! -s conftest.err
5689 } && test -s conftest.$ac_objext; then 5368 } && test -s conftest.$ac_objext; then
5690 ac_cv_have_decl_LLONG_MAX=yes 5369 ac_cv_have_decl_LLONG_MAX=yes
5691else 5370else
5692 $as_echo "$as_me: failed program was:" >&5 5371 echo "$as_me: failed program was:" >&5
5693sed 's/^/| /' conftest.$ac_ext >&5 5372sed 's/^/| /' conftest.$ac_ext >&5
5694 5373
5695 ac_cv_have_decl_LLONG_MAX=no 5374 ac_cv_have_decl_LLONG_MAX=no
@@ -5697,8 +5376,8 @@ fi
5697 5376
5698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5699fi 5378fi
5700{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_LLONG_MAX" >&5 5379{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_LLONG_MAX" >&5
5701$as_echo "$ac_cv_have_decl_LLONG_MAX" >&6; } 5380echo "${ECHO_T}$ac_cv_have_decl_LLONG_MAX" >&6; }
5702if test $ac_cv_have_decl_LLONG_MAX = yes; then 5381if test $ac_cv_have_decl_LLONG_MAX = yes; then
5703 have_llong_max=1 5382 have_llong_max=1
5704fi 5383fi
@@ -5726,12 +5405,12 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
5726 ;; 5405 ;;
5727 2.*) no_attrib_nonnull=1 ;; 5406 2.*) no_attrib_nonnull=1 ;;
5728 3.*) CFLAGS="$CFLAGS -Wsign-compare -Wformat-security" ;; 5407 3.*) CFLAGS="$CFLAGS -Wsign-compare -Wformat-security" ;;
5729 4.*) CFLAGS="$CFLAGS -Wsign-compare -Wno-pointer-sign -Wformat-security" ;; 5408 4.*) CFLAGS="$CFLAGS -Wsign-compare -Wno-pointer-sign -Wformat-security -fno-strict-aliasing" ;;
5730 *) ;; 5409 *) ;;
5731 esac 5410 esac
5732 5411
5733 { $as_echo "$as_me:$LINENO: checking if $CC accepts -fno-builtin-memset" >&5 5412 { echo "$as_me:$LINENO: checking if $CC accepts -fno-builtin-memset" >&5
5734$as_echo_n "checking if $CC accepts -fno-builtin-memset... " >&6; } 5413echo $ECHO_N "checking if $CC accepts -fno-builtin-memset... $ECHO_C" >&6; }
5735 saved_CFLAGS="$CFLAGS" 5414 saved_CFLAGS="$CFLAGS"
5736 CFLAGS="$CFLAGS -fno-builtin-memset" 5415 CFLAGS="$CFLAGS -fno-builtin-memset"
5737 cat >conftest.$ac_ext <<_ACEOF 5416 cat >conftest.$ac_ext <<_ACEOF
@@ -5751,34 +5430,30 @@ case "(($ac_try" in
5751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 5430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5752 *) ac_try_echo=$ac_try;; 5431 *) ac_try_echo=$ac_try;;
5753esac 5432esac
5754eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 5433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5755$as_echo "$ac_try_echo") >&5
5756 (eval "$ac_link") 2>conftest.er1 5434 (eval "$ac_link") 2>conftest.er1
5757 ac_status=$? 5435 ac_status=$?
5758 grep -v '^ *+' conftest.er1 >conftest.err 5436 grep -v '^ *+' conftest.er1 >conftest.err
5759 rm -f conftest.er1 5437 rm -f conftest.er1
5760 cat conftest.err >&5 5438 cat conftest.err >&5
5761 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 5439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5762 (exit $ac_status); } && { 5440 (exit $ac_status); } && {
5763 test -z "$ac_c_werror_flag" || 5441 test -z "$ac_c_werror_flag" ||
5764 test ! -s conftest.err 5442 test ! -s conftest.err
5765 } && test -s conftest$ac_exeext && { 5443 } && test -s conftest$ac_exeext &&
5766 test "$cross_compiling" = yes || 5444 $as_test_x conftest$ac_exeext; then
5767 $as_test_x conftest$ac_exeext 5445 { echo "$as_me:$LINENO: result: yes" >&5
5768 }; then 5446echo "${ECHO_T}yes" >&6; }
5769 { $as_echo "$as_me:$LINENO: result: yes" >&5
5770$as_echo "yes" >&6; }
5771else 5447else
5772 $as_echo "$as_me: failed program was:" >&5 5448 echo "$as_me: failed program was:" >&5
5773sed 's/^/| /' conftest.$ac_ext >&5 5449sed 's/^/| /' conftest.$ac_ext >&5
5774 5450
5775 { $as_echo "$as_me:$LINENO: result: no" >&5 5451 { echo "$as_me:$LINENO: result: no" >&5
5776$as_echo "no" >&6; } 5452echo "${ECHO_T}no" >&6; }
5777 CFLAGS="$saved_CFLAGS" 5453 CFLAGS="$saved_CFLAGS"
5778 5454
5779fi 5455fi
5780 5456
5781rm -rf conftest.dSYM
5782rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 5457rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5783 conftest$ac_exeext conftest.$ac_ext 5458 conftest$ac_exeext conftest.$ac_ext
5784 5459
@@ -5787,8 +5462,8 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5787 # on a given platform gcc will emit a warning so we use -Werror. 5462 # on a given platform gcc will emit a warning so we use -Werror.
5788 if test "x$use_stack_protector" = "x1"; then 5463 if test "x$use_stack_protector" = "x1"; then
5789 for t in -fstack-protector-all -fstack-protector; do 5464 for t in -fstack-protector-all -fstack-protector; do
5790 { $as_echo "$as_me:$LINENO: checking if $CC supports $t" >&5 5465 { echo "$as_me:$LINENO: checking if $CC supports $t" >&5
5791$as_echo_n "checking if $CC supports $t... " >&6; } 5466echo $ECHO_N "checking if $CC supports $t... $ECHO_C" >&6; }
5792 saved_CFLAGS="$CFLAGS" 5467 saved_CFLAGS="$CFLAGS"
5793 saved_LDFLAGS="$LDFLAGS" 5468 saved_LDFLAGS="$LDFLAGS"
5794 CFLAGS="$CFLAGS $t -Werror" 5469 CFLAGS="$CFLAGS $t -Werror"
@@ -5810,30 +5485,27 @@ case "(($ac_try" in
5810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 5485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5811 *) ac_try_echo=$ac_try;; 5486 *) ac_try_echo=$ac_try;;
5812esac 5487esac
5813eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 5488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5814$as_echo "$ac_try_echo") >&5
5815 (eval "$ac_link") 2>conftest.er1 5489 (eval "$ac_link") 2>conftest.er1
5816 ac_status=$? 5490 ac_status=$?
5817 grep -v '^ *+' conftest.er1 >conftest.err 5491 grep -v '^ *+' conftest.er1 >conftest.err
5818 rm -f conftest.er1 5492 rm -f conftest.er1
5819 cat conftest.err >&5 5493 cat conftest.err >&5
5820 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 5494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5821 (exit $ac_status); } && { 5495 (exit $ac_status); } && {
5822 test -z "$ac_c_werror_flag" || 5496 test -z "$ac_c_werror_flag" ||
5823 test ! -s conftest.err 5497 test ! -s conftest.err
5824 } && test -s conftest$ac_exeext && { 5498 } && test -s conftest$ac_exeext &&
5825 test "$cross_compiling" = yes || 5499 $as_test_x conftest$ac_exeext; then
5826 $as_test_x conftest$ac_exeext 5500 { echo "$as_me:$LINENO: result: yes" >&5
5827 }; then 5501echo "${ECHO_T}yes" >&6; }
5828 { $as_echo "$as_me:$LINENO: result: yes" >&5
5829$as_echo "yes" >&6; }
5830 CFLAGS="$saved_CFLAGS $t" 5502 CFLAGS="$saved_CFLAGS $t"
5831 LDFLAGS="$saved_LDFLAGS $t" 5503 LDFLAGS="$saved_LDFLAGS $t"
5832 { $as_echo "$as_me:$LINENO: checking if $t works" >&5 5504 { echo "$as_me:$LINENO: checking if $t works" >&5
5833$as_echo_n "checking if $t works... " >&6; } 5505echo $ECHO_N "checking if $t works... $ECHO_C" >&6; }
5834 if test "$cross_compiling" = yes; then 5506 if test "$cross_compiling" = yes; then
5835 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: cannot test" >&5 5507 { echo "$as_me:$LINENO: WARNING: cross compiling: cannot test" >&5
5836$as_echo "$as_me: WARNING: cross compiling: cannot test" >&2;} 5508echo "$as_me: WARNING: cross compiling: cannot test" >&2;}
5837 break 5509 break
5838 5510
5839else 5511else
@@ -5854,50 +5526,46 @@ case "(($ac_try" in
5854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 5526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5855 *) ac_try_echo=$ac_try;; 5527 *) ac_try_echo=$ac_try;;
5856esac 5528esac
5857eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 5529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5858$as_echo "$ac_try_echo") >&5
5859 (eval "$ac_link") 2>&5 5530 (eval "$ac_link") 2>&5
5860 ac_status=$? 5531 ac_status=$?
5861 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 5532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5862 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 5533 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5863 { (case "(($ac_try" in 5534 { (case "(($ac_try" in
5864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 5535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5865 *) ac_try_echo=$ac_try;; 5536 *) ac_try_echo=$ac_try;;
5866esac 5537esac
5867eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 5538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5868$as_echo "$ac_try_echo") >&5
5869 (eval "$ac_try") 2>&5 5539 (eval "$ac_try") 2>&5
5870 ac_status=$? 5540 ac_status=$?
5871 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 5541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5872 (exit $ac_status); }; }; then 5542 (exit $ac_status); }; }; then
5873 { $as_echo "$as_me:$LINENO: result: yes" >&5 5543 { echo "$as_me:$LINENO: result: yes" >&5
5874$as_echo "yes" >&6; } 5544echo "${ECHO_T}yes" >&6; }
5875 break 5545 break
5876else 5546else
5877 $as_echo "$as_me: program exited with status $ac_status" >&5 5547 echo "$as_me: program exited with status $ac_status" >&5
5878$as_echo "$as_me: failed program was:" >&5 5548echo "$as_me: failed program was:" >&5
5879sed 's/^/| /' conftest.$ac_ext >&5 5549sed 's/^/| /' conftest.$ac_ext >&5
5880 5550
5881( exit $ac_status ) 5551( exit $ac_status )
5882 { $as_echo "$as_me:$LINENO: result: no" >&5 5552 { echo "$as_me:$LINENO: result: no" >&5
5883$as_echo "no" >&6; } 5553echo "${ECHO_T}no" >&6; }
5884fi 5554fi
5885rm -rf conftest.dSYM
5886rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 5555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5887fi 5556fi
5888 5557
5889 5558
5890 5559
5891else 5560else
5892 $as_echo "$as_me: failed program was:" >&5 5561 echo "$as_me: failed program was:" >&5
5893sed 's/^/| /' conftest.$ac_ext >&5 5562sed 's/^/| /' conftest.$ac_ext >&5
5894 5563
5895 { $as_echo "$as_me:$LINENO: result: no" >&5 5564 { echo "$as_me:$LINENO: result: no" >&5
5896$as_echo "no" >&6; } 5565echo "${ECHO_T}no" >&6; }
5897 5566
5898fi 5567fi
5899 5568
5900rm -rf conftest.dSYM
5901rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 5569rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5902 conftest$ac_exeext conftest.$ac_ext 5570 conftest$ac_exeext conftest.$ac_ext
5903 CFLAGS="$saved_CFLAGS" 5571 CFLAGS="$saved_CFLAGS"
@@ -5910,10 +5578,10 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5910 unset ac_cv_have_decl_LLONG_MAX 5578 unset ac_cv_have_decl_LLONG_MAX
5911 saved_CFLAGS="$CFLAGS" 5579 saved_CFLAGS="$CFLAGS"
5912 CFLAGS="$CFLAGS -std=gnu99" 5580 CFLAGS="$CFLAGS -std=gnu99"
5913 { $as_echo "$as_me:$LINENO: checking whether LLONG_MAX is declared" >&5 5581 { echo "$as_me:$LINENO: checking whether LLONG_MAX is declared" >&5
5914$as_echo_n "checking whether LLONG_MAX is declared... " >&6; } 5582echo $ECHO_N "checking whether LLONG_MAX is declared... $ECHO_C" >&6; }
5915if test "${ac_cv_have_decl_LLONG_MAX+set}" = set; then 5583if test "${ac_cv_have_decl_LLONG_MAX+set}" = set; then
5916 $as_echo_n "(cached) " >&6 5584 echo $ECHO_N "(cached) $ECHO_C" >&6
5917else 5585else
5918 cat >conftest.$ac_ext <<_ACEOF 5586 cat >conftest.$ac_ext <<_ACEOF
5919/* confdefs.h. */ 5587/* confdefs.h. */
@@ -5941,21 +5609,20 @@ case "(($ac_try" in
5941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 5609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5942 *) ac_try_echo=$ac_try;; 5610 *) ac_try_echo=$ac_try;;
5943esac 5611esac
5944eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 5612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5945$as_echo "$ac_try_echo") >&5
5946 (eval "$ac_compile") 2>conftest.er1 5613 (eval "$ac_compile") 2>conftest.er1
5947 ac_status=$? 5614 ac_status=$?
5948 grep -v '^ *+' conftest.er1 >conftest.err 5615 grep -v '^ *+' conftest.er1 >conftest.err
5949 rm -f conftest.er1 5616 rm -f conftest.er1
5950 cat conftest.err >&5 5617 cat conftest.err >&5
5951 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 5618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5952 (exit $ac_status); } && { 5619 (exit $ac_status); } && {
5953 test -z "$ac_c_werror_flag" || 5620 test -z "$ac_c_werror_flag" ||
5954 test ! -s conftest.err 5621 test ! -s conftest.err
5955 } && test -s conftest.$ac_objext; then 5622 } && test -s conftest.$ac_objext; then
5956 ac_cv_have_decl_LLONG_MAX=yes 5623 ac_cv_have_decl_LLONG_MAX=yes
5957else 5624else
5958 $as_echo "$as_me: failed program was:" >&5 5625 echo "$as_me: failed program was:" >&5
5959sed 's/^/| /' conftest.$ac_ext >&5 5626sed 's/^/| /' conftest.$ac_ext >&5
5960 5627
5961 ac_cv_have_decl_LLONG_MAX=no 5628 ac_cv_have_decl_LLONG_MAX=no
@@ -5963,8 +5630,8 @@ fi
5963 5630
5964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5965fi 5632fi
5966{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_LLONG_MAX" >&5 5633{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_LLONG_MAX" >&5
5967$as_echo "$ac_cv_have_decl_LLONG_MAX" >&6; } 5634echo "${ECHO_T}$ac_cv_have_decl_LLONG_MAX" >&6; }
5968if test $ac_cv_have_decl_LLONG_MAX = yes; then 5635if test $ac_cv_have_decl_LLONG_MAX = yes; then
5969 have_llong_max=1 5636 have_llong_max=1
5970else 5637else
@@ -6190,21 +5857,20 @@ for ac_header in \
6190 vis.h \ 5857 vis.h \
6191 5858
6192do 5859do
6193as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 5860as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6194if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 5861if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6195 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 5862 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6196$as_echo_n "checking for $ac_header... " >&6; } 5863echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6197if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 5864if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6198 $as_echo_n "(cached) " >&6 5865 echo $ECHO_N "(cached) $ECHO_C" >&6
6199fi 5866fi
6200ac_res=`eval 'as_val=${'$as_ac_Header'} 5867ac_res=`eval echo '${'$as_ac_Header'}'`
6201 $as_echo "$as_val"'` 5868 { echo "$as_me:$LINENO: result: $ac_res" >&5
6202 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 5869echo "${ECHO_T}$ac_res" >&6; }
6203$as_echo "$ac_res" >&6; }
6204else 5870else
6205 # Is the header compilable? 5871 # Is the header compilable?
6206{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 5872{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6207$as_echo_n "checking $ac_header usability... " >&6; } 5873echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
6208cat >conftest.$ac_ext <<_ACEOF 5874cat >conftest.$ac_ext <<_ACEOF
6209/* confdefs.h. */ 5875/* confdefs.h. */
6210_ACEOF 5876_ACEOF
@@ -6220,33 +5886,32 @@ case "(($ac_try" in
6220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 5886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6221 *) ac_try_echo=$ac_try;; 5887 *) ac_try_echo=$ac_try;;
6222esac 5888esac
6223eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 5889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6224$as_echo "$ac_try_echo") >&5
6225 (eval "$ac_compile") 2>conftest.er1 5890 (eval "$ac_compile") 2>conftest.er1
6226 ac_status=$? 5891 ac_status=$?
6227 grep -v '^ *+' conftest.er1 >conftest.err 5892 grep -v '^ *+' conftest.er1 >conftest.err
6228 rm -f conftest.er1 5893 rm -f conftest.er1
6229 cat conftest.err >&5 5894 cat conftest.err >&5
6230 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 5895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6231 (exit $ac_status); } && { 5896 (exit $ac_status); } && {
6232 test -z "$ac_c_werror_flag" || 5897 test -z "$ac_c_werror_flag" ||
6233 test ! -s conftest.err 5898 test ! -s conftest.err
6234 } && test -s conftest.$ac_objext; then 5899 } && test -s conftest.$ac_objext; then
6235 ac_header_compiler=yes 5900 ac_header_compiler=yes
6236else 5901else
6237 $as_echo "$as_me: failed program was:" >&5 5902 echo "$as_me: failed program was:" >&5
6238sed 's/^/| /' conftest.$ac_ext >&5 5903sed 's/^/| /' conftest.$ac_ext >&5
6239 5904
6240 ac_header_compiler=no 5905 ac_header_compiler=no
6241fi 5906fi
6242 5907
6243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6244{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 5909{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6245$as_echo "$ac_header_compiler" >&6; } 5910echo "${ECHO_T}$ac_header_compiler" >&6; }
6246 5911
6247# Is the header present? 5912# Is the header present?
6248{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 5913{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6249$as_echo_n "checking $ac_header presence... " >&6; } 5914echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
6250cat >conftest.$ac_ext <<_ACEOF 5915cat >conftest.$ac_ext <<_ACEOF
6251/* confdefs.h. */ 5916/* confdefs.h. */
6252_ACEOF 5917_ACEOF
@@ -6260,52 +5925,51 @@ case "(($ac_try" in
6260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 5925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6261 *) ac_try_echo=$ac_try;; 5926 *) ac_try_echo=$ac_try;;
6262esac 5927esac
6263eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 5928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6264$as_echo "$ac_try_echo") >&5
6265 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 5929 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6266 ac_status=$? 5930 ac_status=$?
6267 grep -v '^ *+' conftest.er1 >conftest.err 5931 grep -v '^ *+' conftest.er1 >conftest.err
6268 rm -f conftest.er1 5932 rm -f conftest.er1
6269 cat conftest.err >&5 5933 cat conftest.err >&5
6270 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 5934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6271 (exit $ac_status); } >/dev/null && { 5935 (exit $ac_status); } >/dev/null && {
6272 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 5936 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6273 test ! -s conftest.err 5937 test ! -s conftest.err
6274 }; then 5938 }; then
6275 ac_header_preproc=yes 5939 ac_header_preproc=yes
6276else 5940else
6277 $as_echo "$as_me: failed program was:" >&5 5941 echo "$as_me: failed program was:" >&5
6278sed 's/^/| /' conftest.$ac_ext >&5 5942sed 's/^/| /' conftest.$ac_ext >&5
6279 5943
6280 ac_header_preproc=no 5944 ac_header_preproc=no
6281fi 5945fi
6282 5946
6283rm -f conftest.err conftest.$ac_ext 5947rm -f conftest.err conftest.$ac_ext
6284{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 5948{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6285$as_echo "$ac_header_preproc" >&6; } 5949echo "${ECHO_T}$ac_header_preproc" >&6; }
6286 5950
6287# So? What about this header? 5951# So? What about this header?
6288case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 5952case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6289 yes:no: ) 5953 yes:no: )
6290 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 5954 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6291$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} 5955echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6292 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 5956 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6293$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} 5957echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6294 ac_header_preproc=yes 5958 ac_header_preproc=yes
6295 ;; 5959 ;;
6296 no:yes:* ) 5960 no:yes:* )
6297 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 5961 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6298$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} 5962echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6299 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 5963 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6300$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} 5964echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6301 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 5965 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6302$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 5966echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6303 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 5967 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6304$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} 5968echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6305 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 5969 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6306$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 5970echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6307 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 5971 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6308$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 5972echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6309 ( cat <<\_ASBOX 5973 ( cat <<\_ASBOX
6310## ------------------------------------------- ## 5974## ------------------------------------------- ##
6311## Report this to openssh-unix-dev@mindrot.org ## 5975## Report this to openssh-unix-dev@mindrot.org ##
@@ -6314,23 +5978,21 @@ _ASBOX
6314 ) | sed "s/^/$as_me: WARNING: /" >&2 5978 ) | sed "s/^/$as_me: WARNING: /" >&2
6315 ;; 5979 ;;
6316esac 5980esac
6317{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 5981{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6318$as_echo_n "checking for $ac_header... " >&6; } 5982echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6319if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 5983if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6320 $as_echo_n "(cached) " >&6 5984 echo $ECHO_N "(cached) $ECHO_C" >&6
6321else 5985else
6322 eval "$as_ac_Header=\$ac_header_preproc" 5986 eval "$as_ac_Header=\$ac_header_preproc"
6323fi 5987fi
6324ac_res=`eval 'as_val=${'$as_ac_Header'} 5988ac_res=`eval echo '${'$as_ac_Header'}'`
6325 $as_echo "$as_val"'` 5989 { echo "$as_me:$LINENO: result: $ac_res" >&5
6326 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 5990echo "${ECHO_T}$ac_res" >&6; }
6327$as_echo "$ac_res" >&6; }
6328 5991
6329fi 5992fi
6330if test `eval 'as_val=${'$as_ac_Header'} 5993if test `eval echo '${'$as_ac_Header'}'` = yes; then
6331 $as_echo "$as_val"'` = yes; then
6332 cat >>confdefs.h <<_ACEOF 5994 cat >>confdefs.h <<_ACEOF
6333#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 5995#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6334_ACEOF 5996_ACEOF
6335 5997
6336fi 5998fi
@@ -6342,11 +6004,11 @@ done
6342 6004
6343for ac_header in lastlog.h 6005for ac_header in lastlog.h
6344do 6006do
6345as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 6007as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6346{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 6008{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6347$as_echo_n "checking for $ac_header... " >&6; } 6009echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6348if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 6010if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6349 $as_echo_n "(cached) " >&6 6011 echo $ECHO_N "(cached) $ECHO_C" >&6
6350else 6012else
6351 cat >conftest.$ac_ext <<_ACEOF 6013 cat >conftest.$ac_ext <<_ACEOF
6352/* confdefs.h. */ 6014/* confdefs.h. */
@@ -6368,21 +6030,20 @@ case "(($ac_try" in
6368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6369 *) ac_try_echo=$ac_try;; 6031 *) ac_try_echo=$ac_try;;
6370esac 6032esac
6371eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 6033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6372$as_echo "$ac_try_echo") >&5
6373 (eval "$ac_compile") 2>conftest.er1 6034 (eval "$ac_compile") 2>conftest.er1
6374 ac_status=$? 6035 ac_status=$?
6375 grep -v '^ *+' conftest.er1 >conftest.err 6036 grep -v '^ *+' conftest.er1 >conftest.err
6376 rm -f conftest.er1 6037 rm -f conftest.er1
6377 cat conftest.err >&5 6038 cat conftest.err >&5
6378 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 6039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6379 (exit $ac_status); } && { 6040 (exit $ac_status); } && {
6380 test -z "$ac_c_werror_flag" || 6041 test -z "$ac_c_werror_flag" ||
6381 test ! -s conftest.err 6042 test ! -s conftest.err
6382 } && test -s conftest.$ac_objext; then 6043 } && test -s conftest.$ac_objext; then
6383 eval "$as_ac_Header=yes" 6044 eval "$as_ac_Header=yes"
6384else 6045else
6385 $as_echo "$as_me: failed program was:" >&5 6046 echo "$as_me: failed program was:" >&5
6386sed 's/^/| /' conftest.$ac_ext >&5 6047sed 's/^/| /' conftest.$ac_ext >&5
6387 6048
6388 eval "$as_ac_Header=no" 6049 eval "$as_ac_Header=no"
@@ -6390,14 +6051,12 @@ fi
6390 6051
6391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6392fi 6053fi
6393ac_res=`eval 'as_val=${'$as_ac_Header'} 6054ac_res=`eval echo '${'$as_ac_Header'}'`
6394 $as_echo "$as_val"'` 6055 { echo "$as_me:$LINENO: result: $ac_res" >&5
6395 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 6056echo "${ECHO_T}$ac_res" >&6; }
6396$as_echo "$ac_res" >&6; } 6057if test `eval echo '${'$as_ac_Header'}'` = yes; then
6397if test `eval 'as_val=${'$as_ac_Header'}
6398 $as_echo "$as_val"'` = yes; then
6399 cat >>confdefs.h <<_ACEOF 6058 cat >>confdefs.h <<_ACEOF
6400#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 6059#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6401_ACEOF 6060_ACEOF
6402 6061
6403fi 6062fi
@@ -6409,11 +6068,11 @@ done
6409 6068
6410for ac_header in sys/ptms.h 6069for ac_header in sys/ptms.h
6411do 6070do
6412as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 6071as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6413{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 6072{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6414$as_echo_n "checking for $ac_header... " >&6; } 6073echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6415if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 6074if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6416 $as_echo_n "(cached) " >&6 6075 echo $ECHO_N "(cached) $ECHO_C" >&6
6417else 6076else
6418 cat >conftest.$ac_ext <<_ACEOF 6077 cat >conftest.$ac_ext <<_ACEOF
6419/* confdefs.h. */ 6078/* confdefs.h. */
@@ -6435,21 +6094,20 @@ case "(($ac_try" in
6435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6436 *) ac_try_echo=$ac_try;; 6095 *) ac_try_echo=$ac_try;;
6437esac 6096esac
6438eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 6097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6439$as_echo "$ac_try_echo") >&5
6440 (eval "$ac_compile") 2>conftest.er1 6098 (eval "$ac_compile") 2>conftest.er1
6441 ac_status=$? 6099 ac_status=$?
6442 grep -v '^ *+' conftest.er1 >conftest.err 6100 grep -v '^ *+' conftest.er1 >conftest.err
6443 rm -f conftest.er1 6101 rm -f conftest.er1
6444 cat conftest.err >&5 6102 cat conftest.err >&5
6445 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 6103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6446 (exit $ac_status); } && { 6104 (exit $ac_status); } && {
6447 test -z "$ac_c_werror_flag" || 6105 test -z "$ac_c_werror_flag" ||
6448 test ! -s conftest.err 6106 test ! -s conftest.err
6449 } && test -s conftest.$ac_objext; then 6107 } && test -s conftest.$ac_objext; then
6450 eval "$as_ac_Header=yes" 6108 eval "$as_ac_Header=yes"
6451else 6109else
6452 $as_echo "$as_me: failed program was:" >&5 6110 echo "$as_me: failed program was:" >&5
6453sed 's/^/| /' conftest.$ac_ext >&5 6111sed 's/^/| /' conftest.$ac_ext >&5
6454 6112
6455 eval "$as_ac_Header=no" 6113 eval "$as_ac_Header=no"
@@ -6457,14 +6115,12 @@ fi
6457 6115
6458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6459fi 6117fi
6460ac_res=`eval 'as_val=${'$as_ac_Header'} 6118ac_res=`eval echo '${'$as_ac_Header'}'`
6461 $as_echo "$as_val"'` 6119 { echo "$as_me:$LINENO: result: $ac_res" >&5
6462 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 6120echo "${ECHO_T}$ac_res" >&6; }
6463$as_echo "$ac_res" >&6; } 6121if test `eval echo '${'$as_ac_Header'}'` = yes; then
6464if test `eval 'as_val=${'$as_ac_Header'}
6465 $as_echo "$as_val"'` = yes; then
6466 cat >>confdefs.h <<_ACEOF 6122 cat >>confdefs.h <<_ACEOF
6467#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 6123#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6468_ACEOF 6124_ACEOF
6469 6125
6470fi 6126fi
@@ -6476,11 +6132,11 @@ done
6476 6132
6477for ac_header in login_cap.h 6133for ac_header in login_cap.h
6478do 6134do
6479as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 6135as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6480{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 6136{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6481$as_echo_n "checking for $ac_header... " >&6; } 6137echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6482if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 6138if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6483 $as_echo_n "(cached) " >&6 6139 echo $ECHO_N "(cached) $ECHO_C" >&6
6484else 6140else
6485 cat >conftest.$ac_ext <<_ACEOF 6141 cat >conftest.$ac_ext <<_ACEOF
6486/* confdefs.h. */ 6142/* confdefs.h. */
@@ -6500,21 +6156,20 @@ case "(($ac_try" in
6500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6501 *) ac_try_echo=$ac_try;; 6157 *) ac_try_echo=$ac_try;;
6502esac 6158esac
6503eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 6159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6504$as_echo "$ac_try_echo") >&5
6505 (eval "$ac_compile") 2>conftest.er1 6160 (eval "$ac_compile") 2>conftest.er1
6506 ac_status=$? 6161 ac_status=$?
6507 grep -v '^ *+' conftest.er1 >conftest.err 6162 grep -v '^ *+' conftest.er1 >conftest.err
6508 rm -f conftest.er1 6163 rm -f conftest.er1
6509 cat conftest.err >&5 6164 cat conftest.err >&5
6510 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 6165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6511 (exit $ac_status); } && { 6166 (exit $ac_status); } && {
6512 test -z "$ac_c_werror_flag" || 6167 test -z "$ac_c_werror_flag" ||
6513 test ! -s conftest.err 6168 test ! -s conftest.err
6514 } && test -s conftest.$ac_objext; then 6169 } && test -s conftest.$ac_objext; then
6515 eval "$as_ac_Header=yes" 6170 eval "$as_ac_Header=yes"
6516else 6171else
6517 $as_echo "$as_me: failed program was:" >&5 6172 echo "$as_me: failed program was:" >&5
6518sed 's/^/| /' conftest.$ac_ext >&5 6173sed 's/^/| /' conftest.$ac_ext >&5
6519 6174
6520 eval "$as_ac_Header=no" 6175 eval "$as_ac_Header=no"
@@ -6522,14 +6177,12 @@ fi
6522 6177
6523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6524fi 6179fi
6525ac_res=`eval 'as_val=${'$as_ac_Header'} 6180ac_res=`eval echo '${'$as_ac_Header'}'`
6526 $as_echo "$as_val"'` 6181 { echo "$as_me:$LINENO: result: $ac_res" >&5
6527 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 6182echo "${ECHO_T}$ac_res" >&6; }
6528$as_echo "$ac_res" >&6; } 6183if test `eval echo '${'$as_ac_Header'}'` = yes; then
6529if test `eval 'as_val=${'$as_ac_Header'}
6530 $as_echo "$as_val"'` = yes; then
6531 cat >>confdefs.h <<_ACEOF 6184 cat >>confdefs.h <<_ACEOF
6532#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 6185#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6533_ACEOF 6186_ACEOF
6534 6187
6535fi 6188fi
@@ -6541,11 +6194,11 @@ done
6541 6194
6542for ac_header in sys/mount.h 6195for ac_header in sys/mount.h
6543do 6196do
6544as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 6197as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6545{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 6198{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6546$as_echo_n "checking for $ac_header... " >&6; } 6199echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6547if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 6200if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6548 $as_echo_n "(cached) " >&6 6201 echo $ECHO_N "(cached) $ECHO_C" >&6
6549else 6202else
6550 cat >conftest.$ac_ext <<_ACEOF 6203 cat >conftest.$ac_ext <<_ACEOF
6551/* confdefs.h. */ 6204/* confdefs.h. */
@@ -6565,21 +6218,20 @@ case "(($ac_try" in
6565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6566 *) ac_try_echo=$ac_try;; 6219 *) ac_try_echo=$ac_try;;
6567esac 6220esac
6568eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 6221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6569$as_echo "$ac_try_echo") >&5
6570 (eval "$ac_compile") 2>conftest.er1 6222 (eval "$ac_compile") 2>conftest.er1
6571 ac_status=$? 6223 ac_status=$?
6572 grep -v '^ *+' conftest.er1 >conftest.err 6224 grep -v '^ *+' conftest.er1 >conftest.err
6573 rm -f conftest.er1 6225 rm -f conftest.er1
6574 cat conftest.err >&5 6226 cat conftest.err >&5
6575 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 6227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6576 (exit $ac_status); } && { 6228 (exit $ac_status); } && {
6577 test -z "$ac_c_werror_flag" || 6229 test -z "$ac_c_werror_flag" ||
6578 test ! -s conftest.err 6230 test ! -s conftest.err
6579 } && test -s conftest.$ac_objext; then 6231 } && test -s conftest.$ac_objext; then
6580 eval "$as_ac_Header=yes" 6232 eval "$as_ac_Header=yes"
6581else 6233else
6582 $as_echo "$as_me: failed program was:" >&5 6234 echo "$as_me: failed program was:" >&5
6583sed 's/^/| /' conftest.$ac_ext >&5 6235sed 's/^/| /' conftest.$ac_ext >&5
6584 6236
6585 eval "$as_ac_Header=no" 6237 eval "$as_ac_Header=no"
@@ -6587,14 +6239,12 @@ fi
6587 6239
6588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6589fi 6241fi
6590ac_res=`eval 'as_val=${'$as_ac_Header'} 6242ac_res=`eval echo '${'$as_ac_Header'}'`
6591 $as_echo "$as_val"'` 6243 { echo "$as_me:$LINENO: result: $ac_res" >&5
6592 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 6244echo "${ECHO_T}$ac_res" >&6; }
6593$as_echo "$ac_res" >&6; } 6245if test `eval echo '${'$as_ac_Header'}'` = yes; then
6594if test `eval 'as_val=${'$as_ac_Header'}
6595 $as_echo "$as_val"'` = yes; then
6596 cat >>confdefs.h <<_ACEOF 6246 cat >>confdefs.h <<_ACEOF
6597#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 6247#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6598_ACEOF 6248_ACEOF
6599 6249
6600fi 6250fi
@@ -6614,8 +6264,8 @@ case "$host" in
6614 # particularly with older versions of vac or xlc. 6264 # particularly with older versions of vac or xlc.
6615 # It also throws errors about null macro argments, but these are 6265 # It also throws errors about null macro argments, but these are
6616 # not fatal. 6266 # not fatal.
6617 { $as_echo "$as_me:$LINENO: checking if compiler allows macro redefinitions" >&5 6267 { echo "$as_me:$LINENO: checking if compiler allows macro redefinitions" >&5
6618$as_echo_n "checking if compiler allows macro redefinitions... " >&6; } 6268echo $ECHO_N "checking if compiler allows macro redefinitions... $ECHO_C" >&6; }
6619 cat >conftest.$ac_ext <<_ACEOF 6269 cat >conftest.$ac_ext <<_ACEOF
6620/* confdefs.h. */ 6270/* confdefs.h. */
6621_ACEOF 6271_ACEOF
@@ -6634,26 +6284,25 @@ case "(($ac_try" in
6634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6635 *) ac_try_echo=$ac_try;; 6285 *) ac_try_echo=$ac_try;;
6636esac 6286esac
6637eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 6287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6638$as_echo "$ac_try_echo") >&5
6639 (eval "$ac_compile") 2>conftest.er1 6288 (eval "$ac_compile") 2>conftest.er1
6640 ac_status=$? 6289 ac_status=$?
6641 grep -v '^ *+' conftest.er1 >conftest.err 6290 grep -v '^ *+' conftest.er1 >conftest.err
6642 rm -f conftest.er1 6291 rm -f conftest.er1
6643 cat conftest.err >&5 6292 cat conftest.err >&5
6644 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 6293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6645 (exit $ac_status); } && { 6294 (exit $ac_status); } && {
6646 test -z "$ac_c_werror_flag" || 6295 test -z "$ac_c_werror_flag" ||
6647 test ! -s conftest.err 6296 test ! -s conftest.err
6648 } && test -s conftest.$ac_objext; then 6297 } && test -s conftest.$ac_objext; then
6649 { $as_echo "$as_me:$LINENO: result: yes" >&5 6298 { echo "$as_me:$LINENO: result: yes" >&5
6650$as_echo "yes" >&6; } 6299echo "${ECHO_T}yes" >&6; }
6651else 6300else
6652 $as_echo "$as_me: failed program was:" >&5 6301 echo "$as_me: failed program was:" >&5
6653sed 's/^/| /' conftest.$ac_ext >&5 6302sed 's/^/| /' conftest.$ac_ext >&5
6654 6303
6655 { $as_echo "$as_me:$LINENO: result: no" >&5 6304 { echo "$as_me:$LINENO: result: no" >&5
6656$as_echo "no" >&6; } 6305echo "${ECHO_T}no" >&6; }
6657 CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`" 6306 CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`"
6658 LD="`echo $LD | sed 's/-qlanglvl\=ansi//g'`" 6307 LD="`echo $LD | sed 's/-qlanglvl\=ansi//g'`"
6659 CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`" 6308 CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`"
@@ -6664,8 +6313,8 @@ fi
6664 6313
6665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6666 6315
6667 { $as_echo "$as_me:$LINENO: checking how to specify blibpath for linker ($LD)" >&5 6316 { echo "$as_me:$LINENO: checking how to specify blibpath for linker ($LD)" >&5
6668$as_echo_n "checking how to specify blibpath for linker ($LD)... " >&6; } 6317echo $ECHO_N "checking how to specify blibpath for linker ($LD)... $ECHO_C" >&6; }
6669 if (test -z "$blibpath"); then 6318 if (test -z "$blibpath"); then
6670 blibpath="/usr/lib:/lib" 6319 blibpath="/usr/lib:/lib"
6671 fi 6320 fi
@@ -6699,49 +6348,45 @@ case "(($ac_try" in
6699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6700 *) ac_try_echo=$ac_try;; 6349 *) ac_try_echo=$ac_try;;
6701esac 6350esac
6702eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 6351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6703$as_echo "$ac_try_echo") >&5
6704 (eval "$ac_link") 2>conftest.er1 6352 (eval "$ac_link") 2>conftest.er1
6705 ac_status=$? 6353 ac_status=$?
6706 grep -v '^ *+' conftest.er1 >conftest.err 6354 grep -v '^ *+' conftest.er1 >conftest.err
6707 rm -f conftest.er1 6355 rm -f conftest.er1
6708 cat conftest.err >&5 6356 cat conftest.err >&5
6709 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 6357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6710 (exit $ac_status); } && { 6358 (exit $ac_status); } && {
6711 test -z "$ac_c_werror_flag" || 6359 test -z "$ac_c_werror_flag" ||
6712 test ! -s conftest.err 6360 test ! -s conftest.err
6713 } && test -s conftest$ac_exeext && { 6361 } && test -s conftest$ac_exeext &&
6714 test "$cross_compiling" = yes || 6362 $as_test_x conftest$ac_exeext; then
6715 $as_test_x conftest$ac_exeext
6716 }; then
6717 blibflags=$tryflags 6363 blibflags=$tryflags
6718else 6364else
6719 $as_echo "$as_me: failed program was:" >&5 6365 echo "$as_me: failed program was:" >&5
6720sed 's/^/| /' conftest.$ac_ext >&5 6366sed 's/^/| /' conftest.$ac_ext >&5
6721 6367
6722 6368
6723fi 6369fi
6724 6370
6725rm -rf conftest.dSYM
6726rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 6371rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6727 conftest$ac_exeext conftest.$ac_ext 6372 conftest$ac_exeext conftest.$ac_ext
6728 fi 6373 fi
6729 done 6374 done
6730 if (test -z "$blibflags"); then 6375 if (test -z "$blibflags"); then
6731 { $as_echo "$as_me:$LINENO: result: not found" >&5 6376 { echo "$as_me:$LINENO: result: not found" >&5
6732$as_echo "not found" >&6; } 6377echo "${ECHO_T}not found" >&6; }
6733 { { $as_echo "$as_me:$LINENO: error: *** must be able to specify blibpath on AIX - check config.log" >&5 6378 { { echo "$as_me:$LINENO: error: *** must be able to specify blibpath on AIX - check config.log" >&5
6734$as_echo "$as_me: error: *** must be able to specify blibpath on AIX - check config.log" >&2;} 6379echo "$as_me: error: *** must be able to specify blibpath on AIX - check config.log" >&2;}
6735 { (exit 1); exit 1; }; } 6380 { (exit 1); exit 1; }; }
6736 else 6381 else
6737 { $as_echo "$as_me:$LINENO: result: $blibflags" >&5 6382 { echo "$as_me:$LINENO: result: $blibflags" >&5
6738$as_echo "$blibflags" >&6; } 6383echo "${ECHO_T}$blibflags" >&6; }
6739 fi 6384 fi
6740 LDFLAGS="$saved_LDFLAGS" 6385 LDFLAGS="$saved_LDFLAGS"
6741 { $as_echo "$as_me:$LINENO: checking for authenticate" >&5 6386 { echo "$as_me:$LINENO: checking for authenticate" >&5
6742$as_echo_n "checking for authenticate... " >&6; } 6387echo $ECHO_N "checking for authenticate... $ECHO_C" >&6; }
6743if test "${ac_cv_func_authenticate+set}" = set; then 6388if test "${ac_cv_func_authenticate+set}" = set; then
6744 $as_echo_n "(cached) " >&6 6389 echo $ECHO_N "(cached) $ECHO_C" >&6
6745else 6390else
6746 cat >conftest.$ac_ext <<_ACEOF 6391 cat >conftest.$ac_ext <<_ACEOF
6747/* confdefs.h. */ 6392/* confdefs.h. */
@@ -6794,35 +6439,31 @@ case "(($ac_try" in
6794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6795 *) ac_try_echo=$ac_try;; 6440 *) ac_try_echo=$ac_try;;
6796esac 6441esac
6797eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 6442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6798$as_echo "$ac_try_echo") >&5
6799 (eval "$ac_link") 2>conftest.er1 6443 (eval "$ac_link") 2>conftest.er1
6800 ac_status=$? 6444 ac_status=$?
6801 grep -v '^ *+' conftest.er1 >conftest.err 6445 grep -v '^ *+' conftest.er1 >conftest.err
6802 rm -f conftest.er1 6446 rm -f conftest.er1
6803 cat conftest.err >&5 6447 cat conftest.err >&5
6804 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 6448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6805 (exit $ac_status); } && { 6449 (exit $ac_status); } && {
6806 test -z "$ac_c_werror_flag" || 6450 test -z "$ac_c_werror_flag" ||
6807 test ! -s conftest.err 6451 test ! -s conftest.err
6808 } && test -s conftest$ac_exeext && { 6452 } && test -s conftest$ac_exeext &&
6809 test "$cross_compiling" = yes || 6453 $as_test_x conftest$ac_exeext; then
6810 $as_test_x conftest$ac_exeext
6811 }; then
6812 ac_cv_func_authenticate=yes 6454 ac_cv_func_authenticate=yes
6813else 6455else
6814 $as_echo "$as_me: failed program was:" >&5 6456 echo "$as_me: failed program was:" >&5
6815sed 's/^/| /' conftest.$ac_ext >&5 6457sed 's/^/| /' conftest.$ac_ext >&5
6816 6458
6817 ac_cv_func_authenticate=no 6459 ac_cv_func_authenticate=no
6818fi 6460fi
6819 6461
6820rm -rf conftest.dSYM
6821rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 6462rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6822 conftest$ac_exeext conftest.$ac_ext 6463 conftest$ac_exeext conftest.$ac_ext
6823fi 6464fi
6824{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_authenticate" >&5 6465{ echo "$as_me:$LINENO: result: $ac_cv_func_authenticate" >&5
6825$as_echo "$ac_cv_func_authenticate" >&6; } 6466echo "${ECHO_T}$ac_cv_func_authenticate" >&6; }
6826if test $ac_cv_func_authenticate = yes; then 6467if test $ac_cv_func_authenticate = yes; then
6827 6468
6828cat >>confdefs.h <<\_ACEOF 6469cat >>confdefs.h <<\_ACEOF
@@ -6830,10 +6471,10 @@ cat >>confdefs.h <<\_ACEOF
6830_ACEOF 6471_ACEOF
6831 6472
6832else 6473else
6833 { $as_echo "$as_me:$LINENO: checking for authenticate in -ls" >&5 6474 { echo "$as_me:$LINENO: checking for authenticate in -ls" >&5
6834$as_echo_n "checking for authenticate in -ls... " >&6; } 6475echo $ECHO_N "checking for authenticate in -ls... $ECHO_C" >&6; }
6835if test "${ac_cv_lib_s_authenticate+set}" = set; then 6476if test "${ac_cv_lib_s_authenticate+set}" = set; then
6836 $as_echo_n "(cached) " >&6 6477 echo $ECHO_N "(cached) $ECHO_C" >&6
6837else 6478else
6838 ac_check_lib_save_LIBS=$LIBS 6479 ac_check_lib_save_LIBS=$LIBS
6839LIBS="-ls $LIBS" 6480LIBS="-ls $LIBS"
@@ -6865,36 +6506,32 @@ case "(($ac_try" in
6865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6866 *) ac_try_echo=$ac_try;; 6507 *) ac_try_echo=$ac_try;;
6867esac 6508esac
6868eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 6509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6869$as_echo "$ac_try_echo") >&5
6870 (eval "$ac_link") 2>conftest.er1 6510 (eval "$ac_link") 2>conftest.er1
6871 ac_status=$? 6511 ac_status=$?
6872 grep -v '^ *+' conftest.er1 >conftest.err 6512 grep -v '^ *+' conftest.er1 >conftest.err
6873 rm -f conftest.er1 6513 rm -f conftest.er1
6874 cat conftest.err >&5 6514 cat conftest.err >&5
6875 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 6515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6876 (exit $ac_status); } && { 6516 (exit $ac_status); } && {
6877 test -z "$ac_c_werror_flag" || 6517 test -z "$ac_c_werror_flag" ||
6878 test ! -s conftest.err 6518 test ! -s conftest.err
6879 } && test -s conftest$ac_exeext && { 6519 } && test -s conftest$ac_exeext &&
6880 test "$cross_compiling" = yes || 6520 $as_test_x conftest$ac_exeext; then
6881 $as_test_x conftest$ac_exeext
6882 }; then
6883 ac_cv_lib_s_authenticate=yes 6521 ac_cv_lib_s_authenticate=yes
6884else 6522else
6885 $as_echo "$as_me: failed program was:" >&5 6523 echo "$as_me: failed program was:" >&5
6886sed 's/^/| /' conftest.$ac_ext >&5 6524sed 's/^/| /' conftest.$ac_ext >&5
6887 6525
6888 ac_cv_lib_s_authenticate=no 6526 ac_cv_lib_s_authenticate=no
6889fi 6527fi
6890 6528
6891rm -rf conftest.dSYM
6892rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 6529rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6893 conftest$ac_exeext conftest.$ac_ext 6530 conftest$ac_exeext conftest.$ac_ext
6894LIBS=$ac_check_lib_save_LIBS 6531LIBS=$ac_check_lib_save_LIBS
6895fi 6532fi
6896{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_s_authenticate" >&5 6533{ echo "$as_me:$LINENO: result: $ac_cv_lib_s_authenticate" >&5
6897$as_echo "$ac_cv_lib_s_authenticate" >&6; } 6534echo "${ECHO_T}$ac_cv_lib_s_authenticate" >&6; }
6898if test $ac_cv_lib_s_authenticate = yes; then 6535if test $ac_cv_lib_s_authenticate = yes; then
6899 cat >>confdefs.h <<\_ACEOF 6536 cat >>confdefs.h <<\_ACEOF
6900#define WITH_AIXAUTHENTICATE 1 6537#define WITH_AIXAUTHENTICATE 1
@@ -6907,10 +6544,10 @@ fi
6907 6544
6908fi 6545fi
6909 6546
6910 { $as_echo "$as_me:$LINENO: checking whether authenticate is declared" >&5 6547 { echo "$as_me:$LINENO: checking whether authenticate is declared" >&5
6911$as_echo_n "checking whether authenticate is declared... " >&6; } 6548echo $ECHO_N "checking whether authenticate is declared... $ECHO_C" >&6; }
6912if test "${ac_cv_have_decl_authenticate+set}" = set; then 6549if test "${ac_cv_have_decl_authenticate+set}" = set; then
6913 $as_echo_n "(cached) " >&6 6550 echo $ECHO_N "(cached) $ECHO_C" >&6
6914else 6551else
6915 cat >conftest.$ac_ext <<_ACEOF 6552 cat >conftest.$ac_ext <<_ACEOF
6916/* confdefs.h. */ 6553/* confdefs.h. */
@@ -6937,21 +6574,20 @@ case "(($ac_try" in
6937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6938 *) ac_try_echo=$ac_try;; 6575 *) ac_try_echo=$ac_try;;
6939esac 6576esac
6940eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 6577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6941$as_echo "$ac_try_echo") >&5
6942 (eval "$ac_compile") 2>conftest.er1 6578 (eval "$ac_compile") 2>conftest.er1
6943 ac_status=$? 6579 ac_status=$?
6944 grep -v '^ *+' conftest.er1 >conftest.err 6580 grep -v '^ *+' conftest.er1 >conftest.err
6945 rm -f conftest.er1 6581 rm -f conftest.er1
6946 cat conftest.err >&5 6582 cat conftest.err >&5
6947 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 6583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6948 (exit $ac_status); } && { 6584 (exit $ac_status); } && {
6949 test -z "$ac_c_werror_flag" || 6585 test -z "$ac_c_werror_flag" ||
6950 test ! -s conftest.err 6586 test ! -s conftest.err
6951 } && test -s conftest.$ac_objext; then 6587 } && test -s conftest.$ac_objext; then
6952 ac_cv_have_decl_authenticate=yes 6588 ac_cv_have_decl_authenticate=yes
6953else 6589else
6954 $as_echo "$as_me: failed program was:" >&5 6590 echo "$as_me: failed program was:" >&5
6955sed 's/^/| /' conftest.$ac_ext >&5 6591sed 's/^/| /' conftest.$ac_ext >&5
6956 6592
6957 ac_cv_have_decl_authenticate=no 6593 ac_cv_have_decl_authenticate=no
@@ -6959,8 +6595,8 @@ fi
6959 6595
6960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6961fi 6597fi
6962{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_authenticate" >&5 6598{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_authenticate" >&5
6963$as_echo "$ac_cv_have_decl_authenticate" >&6; } 6599echo "${ECHO_T}$ac_cv_have_decl_authenticate" >&6; }
6964if test $ac_cv_have_decl_authenticate = yes; then 6600if test $ac_cv_have_decl_authenticate = yes; then
6965 6601
6966cat >>confdefs.h <<_ACEOF 6602cat >>confdefs.h <<_ACEOF
@@ -6975,10 +6611,10 @@ _ACEOF
6975 6611
6976 6612
6977fi 6613fi
6978{ $as_echo "$as_me:$LINENO: checking whether loginrestrictions is declared" >&5 6614{ echo "$as_me:$LINENO: checking whether loginrestrictions is declared" >&5
6979$as_echo_n "checking whether loginrestrictions is declared... " >&6; } 6615echo $ECHO_N "checking whether loginrestrictions is declared... $ECHO_C" >&6; }
6980if test "${ac_cv_have_decl_loginrestrictions+set}" = set; then 6616if test "${ac_cv_have_decl_loginrestrictions+set}" = set; then
6981 $as_echo_n "(cached) " >&6 6617 echo $ECHO_N "(cached) $ECHO_C" >&6
6982else 6618else
6983 cat >conftest.$ac_ext <<_ACEOF 6619 cat >conftest.$ac_ext <<_ACEOF
6984/* confdefs.h. */ 6620/* confdefs.h. */
@@ -7005,21 +6641,20 @@ case "(($ac_try" in
7005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7006 *) ac_try_echo=$ac_try;; 6642 *) ac_try_echo=$ac_try;;
7007esac 6643esac
7008eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 6644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7009$as_echo "$ac_try_echo") >&5
7010 (eval "$ac_compile") 2>conftest.er1 6645 (eval "$ac_compile") 2>conftest.er1
7011 ac_status=$? 6646 ac_status=$?
7012 grep -v '^ *+' conftest.er1 >conftest.err 6647 grep -v '^ *+' conftest.er1 >conftest.err
7013 rm -f conftest.er1 6648 rm -f conftest.er1
7014 cat conftest.err >&5 6649 cat conftest.err >&5
7015 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 6650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7016 (exit $ac_status); } && { 6651 (exit $ac_status); } && {
7017 test -z "$ac_c_werror_flag" || 6652 test -z "$ac_c_werror_flag" ||
7018 test ! -s conftest.err 6653 test ! -s conftest.err
7019 } && test -s conftest.$ac_objext; then 6654 } && test -s conftest.$ac_objext; then
7020 ac_cv_have_decl_loginrestrictions=yes 6655 ac_cv_have_decl_loginrestrictions=yes
7021else 6656else
7022 $as_echo "$as_me: failed program was:" >&5 6657 echo "$as_me: failed program was:" >&5
7023sed 's/^/| /' conftest.$ac_ext >&5 6658sed 's/^/| /' conftest.$ac_ext >&5
7024 6659
7025 ac_cv_have_decl_loginrestrictions=no 6660 ac_cv_have_decl_loginrestrictions=no
@@ -7027,8 +6662,8 @@ fi
7027 6662
7028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7029fi 6664fi
7030{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_loginrestrictions" >&5 6665{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_loginrestrictions" >&5
7031$as_echo "$ac_cv_have_decl_loginrestrictions" >&6; } 6666echo "${ECHO_T}$ac_cv_have_decl_loginrestrictions" >&6; }
7032if test $ac_cv_have_decl_loginrestrictions = yes; then 6667if test $ac_cv_have_decl_loginrestrictions = yes; then
7033 6668
7034cat >>confdefs.h <<_ACEOF 6669cat >>confdefs.h <<_ACEOF
@@ -7043,10 +6678,10 @@ _ACEOF
7043 6678
7044 6679
7045fi 6680fi
7046{ $as_echo "$as_me:$LINENO: checking whether loginsuccess is declared" >&5 6681{ echo "$as_me:$LINENO: checking whether loginsuccess is declared" >&5
7047$as_echo_n "checking whether loginsuccess is declared... " >&6; } 6682echo $ECHO_N "checking whether loginsuccess is declared... $ECHO_C" >&6; }
7048if test "${ac_cv_have_decl_loginsuccess+set}" = set; then 6683if test "${ac_cv_have_decl_loginsuccess+set}" = set; then
7049 $as_echo_n "(cached) " >&6 6684 echo $ECHO_N "(cached) $ECHO_C" >&6
7050else 6685else
7051 cat >conftest.$ac_ext <<_ACEOF 6686 cat >conftest.$ac_ext <<_ACEOF
7052/* confdefs.h. */ 6687/* confdefs.h. */
@@ -7073,21 +6708,20 @@ case "(($ac_try" in
7073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7074 *) ac_try_echo=$ac_try;; 6709 *) ac_try_echo=$ac_try;;
7075esac 6710esac
7076eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 6711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7077$as_echo "$ac_try_echo") >&5
7078 (eval "$ac_compile") 2>conftest.er1 6712 (eval "$ac_compile") 2>conftest.er1
7079 ac_status=$? 6713 ac_status=$?
7080 grep -v '^ *+' conftest.er1 >conftest.err 6714 grep -v '^ *+' conftest.er1 >conftest.err
7081 rm -f conftest.er1 6715 rm -f conftest.er1
7082 cat conftest.err >&5 6716 cat conftest.err >&5
7083 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 6717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7084 (exit $ac_status); } && { 6718 (exit $ac_status); } && {
7085 test -z "$ac_c_werror_flag" || 6719 test -z "$ac_c_werror_flag" ||
7086 test ! -s conftest.err 6720 test ! -s conftest.err
7087 } && test -s conftest.$ac_objext; then 6721 } && test -s conftest.$ac_objext; then
7088 ac_cv_have_decl_loginsuccess=yes 6722 ac_cv_have_decl_loginsuccess=yes
7089else 6723else
7090 $as_echo "$as_me: failed program was:" >&5 6724 echo "$as_me: failed program was:" >&5
7091sed 's/^/| /' conftest.$ac_ext >&5 6725sed 's/^/| /' conftest.$ac_ext >&5
7092 6726
7093 ac_cv_have_decl_loginsuccess=no 6727 ac_cv_have_decl_loginsuccess=no
@@ -7095,8 +6729,8 @@ fi
7095 6729
7096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7097fi 6731fi
7098{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_loginsuccess" >&5 6732{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_loginsuccess" >&5
7099$as_echo "$ac_cv_have_decl_loginsuccess" >&6; } 6733echo "${ECHO_T}$ac_cv_have_decl_loginsuccess" >&6; }
7100if test $ac_cv_have_decl_loginsuccess = yes; then 6734if test $ac_cv_have_decl_loginsuccess = yes; then
7101 6735
7102cat >>confdefs.h <<_ACEOF 6736cat >>confdefs.h <<_ACEOF
@@ -7111,10 +6745,10 @@ _ACEOF
7111 6745
7112 6746
7113fi 6747fi
7114{ $as_echo "$as_me:$LINENO: checking whether passwdexpired is declared" >&5 6748{ echo "$as_me:$LINENO: checking whether passwdexpired is declared" >&5
7115$as_echo_n "checking whether passwdexpired is declared... " >&6; } 6749echo $ECHO_N "checking whether passwdexpired is declared... $ECHO_C" >&6; }
7116if test "${ac_cv_have_decl_passwdexpired+set}" = set; then 6750if test "${ac_cv_have_decl_passwdexpired+set}" = set; then
7117 $as_echo_n "(cached) " >&6 6751 echo $ECHO_N "(cached) $ECHO_C" >&6
7118else 6752else
7119 cat >conftest.$ac_ext <<_ACEOF 6753 cat >conftest.$ac_ext <<_ACEOF
7120/* confdefs.h. */ 6754/* confdefs.h. */
@@ -7141,21 +6775,20 @@ case "(($ac_try" in
7141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7142 *) ac_try_echo=$ac_try;; 6776 *) ac_try_echo=$ac_try;;
7143esac 6777esac
7144eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 6778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7145$as_echo "$ac_try_echo") >&5
7146 (eval "$ac_compile") 2>conftest.er1 6779 (eval "$ac_compile") 2>conftest.er1
7147 ac_status=$? 6780 ac_status=$?
7148 grep -v '^ *+' conftest.er1 >conftest.err 6781 grep -v '^ *+' conftest.er1 >conftest.err
7149 rm -f conftest.er1 6782 rm -f conftest.er1
7150 cat conftest.err >&5 6783 cat conftest.err >&5
7151 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 6784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7152 (exit $ac_status); } && { 6785 (exit $ac_status); } && {
7153 test -z "$ac_c_werror_flag" || 6786 test -z "$ac_c_werror_flag" ||
7154 test ! -s conftest.err 6787 test ! -s conftest.err
7155 } && test -s conftest.$ac_objext; then 6788 } && test -s conftest.$ac_objext; then
7156 ac_cv_have_decl_passwdexpired=yes 6789 ac_cv_have_decl_passwdexpired=yes
7157else 6790else
7158 $as_echo "$as_me: failed program was:" >&5 6791 echo "$as_me: failed program was:" >&5
7159sed 's/^/| /' conftest.$ac_ext >&5 6792sed 's/^/| /' conftest.$ac_ext >&5
7160 6793
7161 ac_cv_have_decl_passwdexpired=no 6794 ac_cv_have_decl_passwdexpired=no
@@ -7163,8 +6796,8 @@ fi
7163 6796
7164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7165fi 6798fi
7166{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_passwdexpired" >&5 6799{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_passwdexpired" >&5
7167$as_echo "$ac_cv_have_decl_passwdexpired" >&6; } 6800echo "${ECHO_T}$ac_cv_have_decl_passwdexpired" >&6; }
7168if test $ac_cv_have_decl_passwdexpired = yes; then 6801if test $ac_cv_have_decl_passwdexpired = yes; then
7169 6802
7170cat >>confdefs.h <<_ACEOF 6803cat >>confdefs.h <<_ACEOF
@@ -7179,10 +6812,10 @@ _ACEOF
7179 6812
7180 6813
7181fi 6814fi
7182{ $as_echo "$as_me:$LINENO: checking whether setauthdb is declared" >&5 6815{ echo "$as_me:$LINENO: checking whether setauthdb is declared" >&5
7183$as_echo_n "checking whether setauthdb is declared... " >&6; } 6816echo $ECHO_N "checking whether setauthdb is declared... $ECHO_C" >&6; }
7184if test "${ac_cv_have_decl_setauthdb+set}" = set; then 6817if test "${ac_cv_have_decl_setauthdb+set}" = set; then
7185 $as_echo_n "(cached) " >&6 6818 echo $ECHO_N "(cached) $ECHO_C" >&6
7186else 6819else
7187 cat >conftest.$ac_ext <<_ACEOF 6820 cat >conftest.$ac_ext <<_ACEOF
7188/* confdefs.h. */ 6821/* confdefs.h. */
@@ -7209,21 +6842,20 @@ case "(($ac_try" in
7209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7210 *) ac_try_echo=$ac_try;; 6843 *) ac_try_echo=$ac_try;;
7211esac 6844esac
7212eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 6845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7213$as_echo "$ac_try_echo") >&5
7214 (eval "$ac_compile") 2>conftest.er1 6846 (eval "$ac_compile") 2>conftest.er1
7215 ac_status=$? 6847 ac_status=$?
7216 grep -v '^ *+' conftest.er1 >conftest.err 6848 grep -v '^ *+' conftest.er1 >conftest.err
7217 rm -f conftest.er1 6849 rm -f conftest.er1
7218 cat conftest.err >&5 6850 cat conftest.err >&5
7219 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 6851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7220 (exit $ac_status); } && { 6852 (exit $ac_status); } && {
7221 test -z "$ac_c_werror_flag" || 6853 test -z "$ac_c_werror_flag" ||
7222 test ! -s conftest.err 6854 test ! -s conftest.err
7223 } && test -s conftest.$ac_objext; then 6855 } && test -s conftest.$ac_objext; then
7224 ac_cv_have_decl_setauthdb=yes 6856 ac_cv_have_decl_setauthdb=yes
7225else 6857else
7226 $as_echo "$as_me: failed program was:" >&5 6858 echo "$as_me: failed program was:" >&5
7227sed 's/^/| /' conftest.$ac_ext >&5 6859sed 's/^/| /' conftest.$ac_ext >&5
7228 6860
7229 ac_cv_have_decl_setauthdb=no 6861 ac_cv_have_decl_setauthdb=no
@@ -7231,8 +6863,8 @@ fi
7231 6863
7232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7233fi 6865fi
7234{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_setauthdb" >&5 6866{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_setauthdb" >&5
7235$as_echo "$ac_cv_have_decl_setauthdb" >&6; } 6867echo "${ECHO_T}$ac_cv_have_decl_setauthdb" >&6; }
7236if test $ac_cv_have_decl_setauthdb = yes; then 6868if test $ac_cv_have_decl_setauthdb = yes; then
7237 6869
7238cat >>confdefs.h <<_ACEOF 6870cat >>confdefs.h <<_ACEOF
@@ -7249,10 +6881,10 @@ _ACEOF
7249fi 6881fi
7250 6882
7251 6883
7252 { $as_echo "$as_me:$LINENO: checking whether loginfailed is declared" >&5 6884 { echo "$as_me:$LINENO: checking whether loginfailed is declared" >&5
7253$as_echo_n "checking whether loginfailed is declared... " >&6; } 6885echo $ECHO_N "checking whether loginfailed is declared... $ECHO_C" >&6; }
7254if test "${ac_cv_have_decl_loginfailed+set}" = set; then 6886if test "${ac_cv_have_decl_loginfailed+set}" = set; then
7255 $as_echo_n "(cached) " >&6 6887 echo $ECHO_N "(cached) $ECHO_C" >&6
7256else 6888else
7257 cat >conftest.$ac_ext <<_ACEOF 6889 cat >conftest.$ac_ext <<_ACEOF
7258/* confdefs.h. */ 6890/* confdefs.h. */
@@ -7280,21 +6912,20 @@ case "(($ac_try" in
7280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7281 *) ac_try_echo=$ac_try;; 6913 *) ac_try_echo=$ac_try;;
7282esac 6914esac
7283eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 6915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7284$as_echo "$ac_try_echo") >&5
7285 (eval "$ac_compile") 2>conftest.er1 6916 (eval "$ac_compile") 2>conftest.er1
7286 ac_status=$? 6917 ac_status=$?
7287 grep -v '^ *+' conftest.er1 >conftest.err 6918 grep -v '^ *+' conftest.er1 >conftest.err
7288 rm -f conftest.er1 6919 rm -f conftest.er1
7289 cat conftest.err >&5 6920 cat conftest.err >&5
7290 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 6921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7291 (exit $ac_status); } && { 6922 (exit $ac_status); } && {
7292 test -z "$ac_c_werror_flag" || 6923 test -z "$ac_c_werror_flag" ||
7293 test ! -s conftest.err 6924 test ! -s conftest.err
7294 } && test -s conftest.$ac_objext; then 6925 } && test -s conftest.$ac_objext; then
7295 ac_cv_have_decl_loginfailed=yes 6926 ac_cv_have_decl_loginfailed=yes
7296else 6927else
7297 $as_echo "$as_me: failed program was:" >&5 6928 echo "$as_me: failed program was:" >&5
7298sed 's/^/| /' conftest.$ac_ext >&5 6929sed 's/^/| /' conftest.$ac_ext >&5
7299 6930
7300 ac_cv_have_decl_loginfailed=no 6931 ac_cv_have_decl_loginfailed=no
@@ -7302,16 +6933,16 @@ fi
7302 6933
7303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7304fi 6935fi
7305{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_loginfailed" >&5 6936{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_loginfailed" >&5
7306$as_echo "$ac_cv_have_decl_loginfailed" >&6; } 6937echo "${ECHO_T}$ac_cv_have_decl_loginfailed" >&6; }
7307if test $ac_cv_have_decl_loginfailed = yes; then 6938if test $ac_cv_have_decl_loginfailed = yes; then
7308 6939
7309cat >>confdefs.h <<_ACEOF 6940cat >>confdefs.h <<_ACEOF
7310#define HAVE_DECL_LOGINFAILED 1 6941#define HAVE_DECL_LOGINFAILED 1
7311_ACEOF 6942_ACEOF
7312 6943
7313{ $as_echo "$as_me:$LINENO: checking if loginfailed takes 4 arguments" >&5 6944{ echo "$as_me:$LINENO: checking if loginfailed takes 4 arguments" >&5
7314$as_echo_n "checking if loginfailed takes 4 arguments... " >&6; } 6945echo $ECHO_N "checking if loginfailed takes 4 arguments... $ECHO_C" >&6; }
7315 cat >conftest.$ac_ext <<_ACEOF 6946 cat >conftest.$ac_ext <<_ACEOF
7316/* confdefs.h. */ 6947/* confdefs.h. */
7317_ACEOF 6948_ACEOF
@@ -7333,31 +6964,30 @@ case "(($ac_try" in
7333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7334 *) ac_try_echo=$ac_try;; 6965 *) ac_try_echo=$ac_try;;
7335esac 6966esac
7336eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 6967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7337$as_echo "$ac_try_echo") >&5
7338 (eval "$ac_compile") 2>conftest.er1 6968 (eval "$ac_compile") 2>conftest.er1
7339 ac_status=$? 6969 ac_status=$?
7340 grep -v '^ *+' conftest.er1 >conftest.err 6970 grep -v '^ *+' conftest.er1 >conftest.err
7341 rm -f conftest.er1 6971 rm -f conftest.er1
7342 cat conftest.err >&5 6972 cat conftest.err >&5
7343 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 6973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7344 (exit $ac_status); } && { 6974 (exit $ac_status); } && {
7345 test -z "$ac_c_werror_flag" || 6975 test -z "$ac_c_werror_flag" ||
7346 test ! -s conftest.err 6976 test ! -s conftest.err
7347 } && test -s conftest.$ac_objext; then 6977 } && test -s conftest.$ac_objext; then
7348 { $as_echo "$as_me:$LINENO: result: yes" >&5 6978 { echo "$as_me:$LINENO: result: yes" >&5
7349$as_echo "yes" >&6; } 6979echo "${ECHO_T}yes" >&6; }
7350 6980
7351cat >>confdefs.h <<\_ACEOF 6981cat >>confdefs.h <<\_ACEOF
7352#define AIX_LOGINFAILED_4ARG 1 6982#define AIX_LOGINFAILED_4ARG 1
7353_ACEOF 6983_ACEOF
7354 6984
7355else 6985else
7356 $as_echo "$as_me: failed program was:" >&5 6986 echo "$as_me: failed program was:" >&5
7357sed 's/^/| /' conftest.$ac_ext >&5 6987sed 's/^/| /' conftest.$ac_ext >&5
7358 6988
7359 { $as_echo "$as_me:$LINENO: result: no" >&5 6989 { echo "$as_me:$LINENO: result: no" >&5
7360$as_echo "no" >&6; } 6990echo "${ECHO_T}no" >&6; }
7361 6991
7362fi 6992fi
7363 6993
@@ -7375,11 +7005,11 @@ fi
7375 7005
7376for ac_func in getgrset setauthdb 7006for ac_func in getgrset setauthdb
7377do 7007do
7378as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 7008as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7379{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 7009{ echo "$as_me:$LINENO: checking for $ac_func" >&5
7380$as_echo_n "checking for $ac_func... " >&6; } 7010echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
7381if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 7011if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7382 $as_echo_n "(cached) " >&6 7012 echo $ECHO_N "(cached) $ECHO_C" >&6
7383else 7013else
7384 cat >conftest.$ac_ext <<_ACEOF 7014 cat >conftest.$ac_ext <<_ACEOF
7385/* confdefs.h. */ 7015/* confdefs.h. */
@@ -7432,50 +7062,44 @@ case "(($ac_try" in
7432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 7062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7433 *) ac_try_echo=$ac_try;; 7063 *) ac_try_echo=$ac_try;;
7434esac 7064esac
7435eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 7065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7436$as_echo "$ac_try_echo") >&5
7437 (eval "$ac_link") 2>conftest.er1 7066 (eval "$ac_link") 2>conftest.er1
7438 ac_status=$? 7067 ac_status=$?
7439 grep -v '^ *+' conftest.er1 >conftest.err 7068 grep -v '^ *+' conftest.er1 >conftest.err
7440 rm -f conftest.er1 7069 rm -f conftest.er1
7441 cat conftest.err >&5 7070 cat conftest.err >&5
7442 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 7071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7443 (exit $ac_status); } && { 7072 (exit $ac_status); } && {
7444 test -z "$ac_c_werror_flag" || 7073 test -z "$ac_c_werror_flag" ||
7445 test ! -s conftest.err 7074 test ! -s conftest.err
7446 } && test -s conftest$ac_exeext && { 7075 } && test -s conftest$ac_exeext &&
7447 test "$cross_compiling" = yes || 7076 $as_test_x conftest$ac_exeext; then
7448 $as_test_x conftest$ac_exeext
7449 }; then
7450 eval "$as_ac_var=yes" 7077 eval "$as_ac_var=yes"
7451else 7078else
7452 $as_echo "$as_me: failed program was:" >&5 7079 echo "$as_me: failed program was:" >&5
7453sed 's/^/| /' conftest.$ac_ext >&5 7080sed 's/^/| /' conftest.$ac_ext >&5
7454 7081
7455 eval "$as_ac_var=no" 7082 eval "$as_ac_var=no"
7456fi 7083fi
7457 7084
7458rm -rf conftest.dSYM
7459rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 7085rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7460 conftest$ac_exeext conftest.$ac_ext 7086 conftest$ac_exeext conftest.$ac_ext
7461fi 7087fi
7462ac_res=`eval 'as_val=${'$as_ac_var'} 7088ac_res=`eval echo '${'$as_ac_var'}'`
7463 $as_echo "$as_val"'` 7089 { echo "$as_me:$LINENO: result: $ac_res" >&5
7464 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 7090echo "${ECHO_T}$ac_res" >&6; }
7465$as_echo "$ac_res" >&6; } 7091if test `eval echo '${'$as_ac_var'}'` = yes; then
7466if test `eval 'as_val=${'$as_ac_var'}
7467 $as_echo "$as_val"'` = yes; then
7468 cat >>confdefs.h <<_ACEOF 7092 cat >>confdefs.h <<_ACEOF
7469#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 7093#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7470_ACEOF 7094_ACEOF
7471 7095
7472fi 7096fi
7473done 7097done
7474 7098
7475 { $as_echo "$as_me:$LINENO: checking whether F_CLOSEM is declared" >&5 7099 { echo "$as_me:$LINENO: checking whether F_CLOSEM is declared" >&5
7476$as_echo_n "checking whether F_CLOSEM is declared... " >&6; } 7100echo $ECHO_N "checking whether F_CLOSEM is declared... $ECHO_C" >&6; }
7477if test "${ac_cv_have_decl_F_CLOSEM+set}" = set; then 7101if test "${ac_cv_have_decl_F_CLOSEM+set}" = set; then
7478 $as_echo_n "(cached) " >&6 7102 echo $ECHO_N "(cached) $ECHO_C" >&6
7479else 7103else
7480 cat >conftest.$ac_ext <<_ACEOF 7104 cat >conftest.$ac_ext <<_ACEOF
7481/* confdefs.h. */ 7105/* confdefs.h. */
@@ -7504,21 +7128,20 @@ case "(($ac_try" in
7504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 7128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7505 *) ac_try_echo=$ac_try;; 7129 *) ac_try_echo=$ac_try;;
7506esac 7130esac
7507eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 7131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7508$as_echo "$ac_try_echo") >&5
7509 (eval "$ac_compile") 2>conftest.er1 7132 (eval "$ac_compile") 2>conftest.er1
7510 ac_status=$? 7133 ac_status=$?
7511 grep -v '^ *+' conftest.er1 >conftest.err 7134 grep -v '^ *+' conftest.er1 >conftest.err
7512 rm -f conftest.er1 7135 rm -f conftest.er1
7513 cat conftest.err >&5 7136 cat conftest.err >&5
7514 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 7137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7515 (exit $ac_status); } && { 7138 (exit $ac_status); } && {
7516 test -z "$ac_c_werror_flag" || 7139 test -z "$ac_c_werror_flag" ||
7517 test ! -s conftest.err 7140 test ! -s conftest.err
7518 } && test -s conftest.$ac_objext; then 7141 } && test -s conftest.$ac_objext; then
7519 ac_cv_have_decl_F_CLOSEM=yes 7142 ac_cv_have_decl_F_CLOSEM=yes
7520else 7143else
7521 $as_echo "$as_me: failed program was:" >&5 7144 echo "$as_me: failed program was:" >&5
7522sed 's/^/| /' conftest.$ac_ext >&5 7145sed 's/^/| /' conftest.$ac_ext >&5
7523 7146
7524 ac_cv_have_decl_F_CLOSEM=no 7147 ac_cv_have_decl_F_CLOSEM=no
@@ -7526,8 +7149,8 @@ fi
7526 7149
7527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7528fi 7151fi
7529{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_CLOSEM" >&5 7152{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_CLOSEM" >&5
7530$as_echo "$ac_cv_have_decl_F_CLOSEM" >&6; } 7153echo "${ECHO_T}$ac_cv_have_decl_F_CLOSEM" >&6; }
7531if test $ac_cv_have_decl_F_CLOSEM = yes; then 7154if test $ac_cv_have_decl_F_CLOSEM = yes; then
7532 7155
7533cat >>confdefs.h <<\_ACEOF 7156cat >>confdefs.h <<\_ACEOF
@@ -7618,7 +7241,7 @@ _ACEOF
7618 7241
7619 7242
7620cat >>confdefs.h <<\_ACEOF 7243cat >>confdefs.h <<\_ACEOF
7621#define SSH_IOBUFSZ 65536 7244#define SSH_IOBUFSZ 65535
7622_ACEOF 7245_ACEOF
7623 7246
7624 ;; 7247 ;;
@@ -7642,11 +7265,11 @@ _ACEOF
7642 7265
7643 ;; 7266 ;;
7644*-*-darwin*) 7267*-*-darwin*)
7645 { $as_echo "$as_me:$LINENO: checking if we have working getaddrinfo" >&5 7268 { echo "$as_me:$LINENO: checking if we have working getaddrinfo" >&5
7646$as_echo_n "checking if we have working getaddrinfo... " >&6; } 7269echo $ECHO_N "checking if we have working getaddrinfo... $ECHO_C" >&6; }
7647 if test "$cross_compiling" = yes; then 7270 if test "$cross_compiling" = yes; then
7648 { $as_echo "$as_me:$LINENO: result: assume it is working" >&5 7271 { echo "$as_me:$LINENO: result: assume it is working" >&5
7649$as_echo "assume it is working" >&6; } 7272echo "${ECHO_T}assume it is working" >&6; }
7650else 7273else
7651 cat >conftest.$ac_ext <<_ACEOF 7274 cat >conftest.$ac_ext <<_ACEOF
7652/* confdefs.h. */ 7275/* confdefs.h. */
@@ -7667,39 +7290,36 @@ case "(($ac_try" in
7667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 7290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7668 *) ac_try_echo=$ac_try;; 7291 *) ac_try_echo=$ac_try;;
7669esac 7292esac
7670eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 7293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7671$as_echo "$ac_try_echo") >&5
7672 (eval "$ac_link") 2>&5 7294 (eval "$ac_link") 2>&5
7673 ac_status=$? 7295 ac_status=$?
7674 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 7296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7675 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 7297 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7676 { (case "(($ac_try" in 7298 { (case "(($ac_try" in
7677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 7299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7678 *) ac_try_echo=$ac_try;; 7300 *) ac_try_echo=$ac_try;;
7679esac 7301esac
7680eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 7302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7681$as_echo "$ac_try_echo") >&5
7682 (eval "$ac_try") 2>&5 7303 (eval "$ac_try") 2>&5
7683 ac_status=$? 7304 ac_status=$?
7684 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 7305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7685 (exit $ac_status); }; }; then 7306 (exit $ac_status); }; }; then
7686 { $as_echo "$as_me:$LINENO: result: working" >&5 7307 { echo "$as_me:$LINENO: result: working" >&5
7687$as_echo "working" >&6; } 7308echo "${ECHO_T}working" >&6; }
7688else 7309else
7689 $as_echo "$as_me: program exited with status $ac_status" >&5 7310 echo "$as_me: program exited with status $ac_status" >&5
7690$as_echo "$as_me: failed program was:" >&5 7311echo "$as_me: failed program was:" >&5
7691sed 's/^/| /' conftest.$ac_ext >&5 7312sed 's/^/| /' conftest.$ac_ext >&5
7692 7313
7693( exit $ac_status ) 7314( exit $ac_status )
7694{ $as_echo "$as_me:$LINENO: result: buggy" >&5 7315{ echo "$as_me:$LINENO: result: buggy" >&5
7695$as_echo "buggy" >&6; } 7316echo "${ECHO_T}buggy" >&6; }
7696 7317
7697cat >>confdefs.h <<\_ACEOF 7318cat >>confdefs.h <<\_ACEOF
7698#define BROKEN_GETADDRINFO 1 7319#define BROKEN_GETADDRINFO 1
7699_ACEOF 7320_ACEOF
7700 7321
7701fi 7322fi
7702rm -rf conftest.dSYM
7703rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 7323rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7704fi 7324fi
7705 7325
@@ -7742,10 +7362,10 @@ cat >>confdefs.h <<\_ACEOF
7742_ACEOF 7362_ACEOF
7743 7363
7744 7364
7745 { $as_echo "$as_me:$LINENO: checking whether AU_IPv4 is declared" >&5 7365 { echo "$as_me:$LINENO: checking whether AU_IPv4 is declared" >&5
7746$as_echo_n "checking whether AU_IPv4 is declared... " >&6; } 7366echo $ECHO_N "checking whether AU_IPv4 is declared... $ECHO_C" >&6; }
7747if test "${ac_cv_have_decl_AU_IPv4+set}" = set; then 7367if test "${ac_cv_have_decl_AU_IPv4+set}" = set; then
7748 $as_echo_n "(cached) " >&6 7368 echo $ECHO_N "(cached) $ECHO_C" >&6
7749else 7369else
7750 cat >conftest.$ac_ext <<_ACEOF 7370 cat >conftest.$ac_ext <<_ACEOF
7751/* confdefs.h. */ 7371/* confdefs.h. */
@@ -7771,21 +7391,20 @@ case "(($ac_try" in
7771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 7391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7772 *) ac_try_echo=$ac_try;; 7392 *) ac_try_echo=$ac_try;;
7773esac 7393esac
7774eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 7394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7775$as_echo "$ac_try_echo") >&5
7776 (eval "$ac_compile") 2>conftest.er1 7395 (eval "$ac_compile") 2>conftest.er1
7777 ac_status=$? 7396 ac_status=$?
7778 grep -v '^ *+' conftest.er1 >conftest.err 7397 grep -v '^ *+' conftest.er1 >conftest.err
7779 rm -f conftest.er1 7398 rm -f conftest.er1
7780 cat conftest.err >&5 7399 cat conftest.err >&5
7781 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 7400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7782 (exit $ac_status); } && { 7401 (exit $ac_status); } && {
7783 test -z "$ac_c_werror_flag" || 7402 test -z "$ac_c_werror_flag" ||
7784 test ! -s conftest.err 7403 test ! -s conftest.err
7785 } && test -s conftest.$ac_objext; then 7404 } && test -s conftest.$ac_objext; then
7786 ac_cv_have_decl_AU_IPv4=yes 7405 ac_cv_have_decl_AU_IPv4=yes
7787else 7406else
7788 $as_echo "$as_me: failed program was:" >&5 7407 echo "$as_me: failed program was:" >&5
7789sed 's/^/| /' conftest.$ac_ext >&5 7408sed 's/^/| /' conftest.$ac_ext >&5
7790 7409
7791 ac_cv_have_decl_AU_IPv4=no 7410 ac_cv_have_decl_AU_IPv4=no
@@ -7793,8 +7412,8 @@ fi
7793 7412
7794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7795fi 7414fi
7796{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_AU_IPv4" >&5 7415{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_AU_IPv4" >&5
7797$as_echo "$ac_cv_have_decl_AU_IPv4" >&6; } 7416echo "${ECHO_T}$ac_cv_have_decl_AU_IPv4" >&6; }
7798if test $ac_cv_have_decl_AU_IPv4 = yes; then 7417if test $ac_cv_have_decl_AU_IPv4 = yes; then
7799 : 7418 :
7800else 7419else
@@ -7845,10 +7464,10 @@ _ACEOF
7845 MAIL="/var/mail/username" 7464 MAIL="/var/mail/username"
7846 LIBS="$LIBS -lsec" 7465 LIBS="$LIBS -lsec"
7847 7466
7848{ $as_echo "$as_me:$LINENO: checking for t_error in -lxnet" >&5 7467{ echo "$as_me:$LINENO: checking for t_error in -lxnet" >&5
7849$as_echo_n "checking for t_error in -lxnet... " >&6; } 7468echo $ECHO_N "checking for t_error in -lxnet... $ECHO_C" >&6; }
7850if test "${ac_cv_lib_xnet_t_error+set}" = set; then 7469if test "${ac_cv_lib_xnet_t_error+set}" = set; then
7851 $as_echo_n "(cached) " >&6 7470 echo $ECHO_N "(cached) $ECHO_C" >&6
7852else 7471else
7853 ac_check_lib_save_LIBS=$LIBS 7472 ac_check_lib_save_LIBS=$LIBS
7854LIBS="-lxnet $LIBS" 7473LIBS="-lxnet $LIBS"
@@ -7880,36 +7499,32 @@ case "(($ac_try" in
7880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 7499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7881 *) ac_try_echo=$ac_try;; 7500 *) ac_try_echo=$ac_try;;
7882esac 7501esac
7883eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 7502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7884$as_echo "$ac_try_echo") >&5
7885 (eval "$ac_link") 2>conftest.er1 7503 (eval "$ac_link") 2>conftest.er1
7886 ac_status=$? 7504 ac_status=$?
7887 grep -v '^ *+' conftest.er1 >conftest.err 7505 grep -v '^ *+' conftest.er1 >conftest.err
7888 rm -f conftest.er1 7506 rm -f conftest.er1
7889 cat conftest.err >&5 7507 cat conftest.err >&5
7890 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 7508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7891 (exit $ac_status); } && { 7509 (exit $ac_status); } && {
7892 test -z "$ac_c_werror_flag" || 7510 test -z "$ac_c_werror_flag" ||
7893 test ! -s conftest.err 7511 test ! -s conftest.err
7894 } && test -s conftest$ac_exeext && { 7512 } && test -s conftest$ac_exeext &&
7895 test "$cross_compiling" = yes || 7513 $as_test_x conftest$ac_exeext; then
7896 $as_test_x conftest$ac_exeext
7897 }; then
7898 ac_cv_lib_xnet_t_error=yes 7514 ac_cv_lib_xnet_t_error=yes
7899else 7515else
7900 $as_echo "$as_me: failed program was:" >&5 7516 echo "$as_me: failed program was:" >&5
7901sed 's/^/| /' conftest.$ac_ext >&5 7517sed 's/^/| /' conftest.$ac_ext >&5
7902 7518
7903 ac_cv_lib_xnet_t_error=no 7519 ac_cv_lib_xnet_t_error=no
7904fi 7520fi
7905 7521
7906rm -rf conftest.dSYM
7907rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 7522rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7908 conftest$ac_exeext conftest.$ac_ext 7523 conftest$ac_exeext conftest.$ac_ext
7909LIBS=$ac_check_lib_save_LIBS 7524LIBS=$ac_check_lib_save_LIBS
7910fi 7525fi
7911{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_xnet_t_error" >&5 7526{ echo "$as_me:$LINENO: result: $ac_cv_lib_xnet_t_error" >&5
7912$as_echo "$ac_cv_lib_xnet_t_error" >&6; } 7527echo "${ECHO_T}$ac_cv_lib_xnet_t_error" >&6; }
7913if test $ac_cv_lib_xnet_t_error = yes; then 7528if test $ac_cv_lib_xnet_t_error = yes; then
7914 cat >>confdefs.h <<_ACEOF 7529 cat >>confdefs.h <<_ACEOF
7915#define HAVE_LIBXNET 1 7530#define HAVE_LIBXNET 1
@@ -7918,8 +7533,8 @@ _ACEOF
7918 LIBS="-lxnet $LIBS" 7533 LIBS="-lxnet $LIBS"
7919 7534
7920else 7535else
7921 { { $as_echo "$as_me:$LINENO: error: *** -lxnet needed on HP-UX - check config.log ***" >&5 7536 { { echo "$as_me:$LINENO: error: *** -lxnet needed on HP-UX - check config.log ***" >&5
7922$as_echo "$as_me: error: *** -lxnet needed on HP-UX - check config.log ***" >&2;} 7537echo "$as_me: error: *** -lxnet needed on HP-UX - check config.log ***" >&2;}
7923 { (exit 1); exit 1; }; } 7538 { (exit 1); exit 1; }; }
7924fi 7539fi
7925 7540
@@ -8011,10 +7626,10 @@ cat >>confdefs.h <<\_ACEOF
8011#define WITH_IRIX_AUDIT 1 7626#define WITH_IRIX_AUDIT 1
8012_ACEOF 7627_ACEOF
8013 7628
8014 { $as_echo "$as_me:$LINENO: checking for jlimit_startjob" >&5 7629 { echo "$as_me:$LINENO: checking for jlimit_startjob" >&5
8015$as_echo_n "checking for jlimit_startjob... " >&6; } 7630echo $ECHO_N "checking for jlimit_startjob... $ECHO_C" >&6; }
8016if test "${ac_cv_func_jlimit_startjob+set}" = set; then 7631if test "${ac_cv_func_jlimit_startjob+set}" = set; then
8017 $as_echo_n "(cached) " >&6 7632 echo $ECHO_N "(cached) $ECHO_C" >&6
8018else 7633else
8019 cat >conftest.$ac_ext <<_ACEOF 7634 cat >conftest.$ac_ext <<_ACEOF
8020/* confdefs.h. */ 7635/* confdefs.h. */
@@ -8067,35 +7682,31 @@ case "(($ac_try" in
8067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 7682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8068 *) ac_try_echo=$ac_try;; 7683 *) ac_try_echo=$ac_try;;
8069esac 7684esac
8070eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 7685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8071$as_echo "$ac_try_echo") >&5
8072 (eval "$ac_link") 2>conftest.er1 7686 (eval "$ac_link") 2>conftest.er1
8073 ac_status=$? 7687 ac_status=$?
8074 grep -v '^ *+' conftest.er1 >conftest.err 7688 grep -v '^ *+' conftest.er1 >conftest.err
8075 rm -f conftest.er1 7689 rm -f conftest.er1
8076 cat conftest.err >&5 7690 cat conftest.err >&5
8077 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 7691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8078 (exit $ac_status); } && { 7692 (exit $ac_status); } && {
8079 test -z "$ac_c_werror_flag" || 7693 test -z "$ac_c_werror_flag" ||
8080 test ! -s conftest.err 7694 test ! -s conftest.err
8081 } && test -s conftest$ac_exeext && { 7695 } && test -s conftest$ac_exeext &&
8082 test "$cross_compiling" = yes || 7696 $as_test_x conftest$ac_exeext; then
8083 $as_test_x conftest$ac_exeext
8084 }; then
8085 ac_cv_func_jlimit_startjob=yes 7697 ac_cv_func_jlimit_startjob=yes
8086else 7698else
8087 $as_echo "$as_me: failed program was:" >&5 7699 echo "$as_me: failed program was:" >&5
8088sed 's/^/| /' conftest.$ac_ext >&5 7700sed 's/^/| /' conftest.$ac_ext >&5
8089 7701
8090 ac_cv_func_jlimit_startjob=no 7702 ac_cv_func_jlimit_startjob=no
8091fi 7703fi
8092 7704
8093rm -rf conftest.dSYM
8094rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 7705rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8095 conftest$ac_exeext conftest.$ac_ext 7706 conftest$ac_exeext conftest.$ac_ext
8096fi 7707fi
8097{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_jlimit_startjob" >&5 7708{ echo "$as_me:$LINENO: result: $ac_cv_func_jlimit_startjob" >&5
8098$as_echo "$ac_cv_func_jlimit_startjob" >&6; } 7709echo "${ECHO_T}$ac_cv_func_jlimit_startjob" >&6; }
8099if test $ac_cv_func_jlimit_startjob = yes; then 7710if test $ac_cv_func_jlimit_startjob = yes; then
8100 7711
8101cat >>confdefs.h <<\_ACEOF 7712cat >>confdefs.h <<\_ACEOF
@@ -8191,6 +7802,11 @@ _ACEOF
8191#define USE_BTMP 1 7802#define USE_BTMP 1
8192_ACEOF 7803_ACEOF
8193 7804
7805
7806cat >>confdefs.h <<\_ACEOF
7807#define LINUX_OOM_ADJUST 1
7808_ACEOF
7809
8194 inet6_default_4in6=yes 7810 inet6_default_4in6=yes
8195 case `uname -r` in 7811 case `uname -r` in
8196 1.*|2.0.*) 7812 1.*|2.0.*)
@@ -8205,21 +7821,20 @@ _ACEOF
8205 7821
8206for ac_header in linux/if_tun.h 7822for ac_header in linux/if_tun.h
8207do 7823do
8208as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 7824as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8209if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 7825if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8210 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 7826 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8211$as_echo_n "checking for $ac_header... " >&6; } 7827echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8212if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 7828if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8213 $as_echo_n "(cached) " >&6 7829 echo $ECHO_N "(cached) $ECHO_C" >&6
8214fi 7830fi
8215ac_res=`eval 'as_val=${'$as_ac_Header'} 7831ac_res=`eval echo '${'$as_ac_Header'}'`
8216 $as_echo "$as_val"'` 7832 { echo "$as_me:$LINENO: result: $ac_res" >&5
8217 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 7833echo "${ECHO_T}$ac_res" >&6; }
8218$as_echo "$ac_res" >&6; }
8219else 7834else
8220 # Is the header compilable? 7835 # Is the header compilable?
8221{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 7836{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
8222$as_echo_n "checking $ac_header usability... " >&6; } 7837echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8223cat >conftest.$ac_ext <<_ACEOF 7838cat >conftest.$ac_ext <<_ACEOF
8224/* confdefs.h. */ 7839/* confdefs.h. */
8225_ACEOF 7840_ACEOF
@@ -8235,33 +7850,32 @@ case "(($ac_try" in
8235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 7850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8236 *) ac_try_echo=$ac_try;; 7851 *) ac_try_echo=$ac_try;;
8237esac 7852esac
8238eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 7853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8239$as_echo "$ac_try_echo") >&5
8240 (eval "$ac_compile") 2>conftest.er1 7854 (eval "$ac_compile") 2>conftest.er1
8241 ac_status=$? 7855 ac_status=$?
8242 grep -v '^ *+' conftest.er1 >conftest.err 7856 grep -v '^ *+' conftest.er1 >conftest.err
8243 rm -f conftest.er1 7857 rm -f conftest.er1
8244 cat conftest.err >&5 7858 cat conftest.err >&5
8245 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 7859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8246 (exit $ac_status); } && { 7860 (exit $ac_status); } && {
8247 test -z "$ac_c_werror_flag" || 7861 test -z "$ac_c_werror_flag" ||
8248 test ! -s conftest.err 7862 test ! -s conftest.err
8249 } && test -s conftest.$ac_objext; then 7863 } && test -s conftest.$ac_objext; then
8250 ac_header_compiler=yes 7864 ac_header_compiler=yes
8251else 7865else
8252 $as_echo "$as_me: failed program was:" >&5 7866 echo "$as_me: failed program was:" >&5
8253sed 's/^/| /' conftest.$ac_ext >&5 7867sed 's/^/| /' conftest.$ac_ext >&5
8254 7868
8255 ac_header_compiler=no 7869 ac_header_compiler=no
8256fi 7870fi
8257 7871
8258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8259{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 7873{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8260$as_echo "$ac_header_compiler" >&6; } 7874echo "${ECHO_T}$ac_header_compiler" >&6; }
8261 7875
8262# Is the header present? 7876# Is the header present?
8263{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 7877{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
8264$as_echo_n "checking $ac_header presence... " >&6; } 7878echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8265cat >conftest.$ac_ext <<_ACEOF 7879cat >conftest.$ac_ext <<_ACEOF
8266/* confdefs.h. */ 7880/* confdefs.h. */
8267_ACEOF 7881_ACEOF
@@ -8275,52 +7889,51 @@ case "(($ac_try" in
8275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 7889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8276 *) ac_try_echo=$ac_try;; 7890 *) ac_try_echo=$ac_try;;
8277esac 7891esac
8278eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 7892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8279$as_echo "$ac_try_echo") >&5
8280 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 7893 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8281 ac_status=$? 7894 ac_status=$?
8282 grep -v '^ *+' conftest.er1 >conftest.err 7895 grep -v '^ *+' conftest.er1 >conftest.err
8283 rm -f conftest.er1 7896 rm -f conftest.er1
8284 cat conftest.err >&5 7897 cat conftest.err >&5
8285 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 7898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8286 (exit $ac_status); } >/dev/null && { 7899 (exit $ac_status); } >/dev/null && {
8287 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 7900 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8288 test ! -s conftest.err 7901 test ! -s conftest.err
8289 }; then 7902 }; then
8290 ac_header_preproc=yes 7903 ac_header_preproc=yes
8291else 7904else
8292 $as_echo "$as_me: failed program was:" >&5 7905 echo "$as_me: failed program was:" >&5
8293sed 's/^/| /' conftest.$ac_ext >&5 7906sed 's/^/| /' conftest.$ac_ext >&5
8294 7907
8295 ac_header_preproc=no 7908 ac_header_preproc=no
8296fi 7909fi
8297 7910
8298rm -f conftest.err conftest.$ac_ext 7911rm -f conftest.err conftest.$ac_ext
8299{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 7912{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8300$as_echo "$ac_header_preproc" >&6; } 7913echo "${ECHO_T}$ac_header_preproc" >&6; }
8301 7914
8302# So? What about this header? 7915# So? What about this header?
8303case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 7916case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8304 yes:no: ) 7917 yes:no: )
8305 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 7918 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8306$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} 7919echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8307 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 7920 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8308$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} 7921echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8309 ac_header_preproc=yes 7922 ac_header_preproc=yes
8310 ;; 7923 ;;
8311 no:yes:* ) 7924 no:yes:* )
8312 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 7925 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8313$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} 7926echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8314 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 7927 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8315$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} 7928echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8316 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 7929 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8317$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 7930echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8318 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 7931 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8319$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} 7932echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
8320 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 7933 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8321$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 7934echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8322 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 7935 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8323$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 7936echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8324 ( cat <<\_ASBOX 7937 ( cat <<\_ASBOX
8325## ------------------------------------------- ## 7938## ------------------------------------------- ##
8326## Report this to openssh-unix-dev@mindrot.org ## 7939## Report this to openssh-unix-dev@mindrot.org ##
@@ -8329,23 +7942,21 @@ _ASBOX
8329 ) | sed "s/^/$as_me: WARNING: /" >&2 7942 ) | sed "s/^/$as_me: WARNING: /" >&2
8330 ;; 7943 ;;
8331esac 7944esac
8332{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 7945{ echo "$as_me:$LINENO: checking for $ac_header" >&5
8333$as_echo_n "checking for $ac_header... " >&6; } 7946echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8334if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 7947if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8335 $as_echo_n "(cached) " >&6 7948 echo $ECHO_N "(cached) $ECHO_C" >&6
8336else 7949else
8337 eval "$as_ac_Header=\$ac_header_preproc" 7950 eval "$as_ac_Header=\$ac_header_preproc"
8338fi 7951fi
8339ac_res=`eval 'as_val=${'$as_ac_Header'} 7952ac_res=`eval echo '${'$as_ac_Header'}'`
8340 $as_echo "$as_val"'` 7953 { echo "$as_me:$LINENO: result: $ac_res" >&5
8341 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 7954echo "${ECHO_T}$ac_res" >&6; }
8342$as_echo "$ac_res" >&6; }
8343 7955
8344fi 7956fi
8345if test `eval 'as_val=${'$as_ac_Header'} 7957if test `eval echo '${'$as_ac_Header'}'` = yes; then
8346 $as_echo "$as_val"'` = yes; then
8347 cat >>confdefs.h <<_ACEOF 7958 cat >>confdefs.h <<_ACEOF
8348#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 7959#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8349_ACEOF 7960_ACEOF
8350 7961
8351fi 7962fi
@@ -8369,11 +7980,6 @@ cat >>confdefs.h <<\_ACEOF
8369_ACEOF 7980_ACEOF
8370 7981
8371 fi 7982 fi
8372
8373cat >>confdefs.h <<\_ACEOF
8374#define OOM_ADJUST 1
8375_ACEOF
8376
8377 ;; 7983 ;;
8378mips-sony-bsd|mips-sony-newsos4) 7984mips-sony-bsd|mips-sony-newsos4)
8379 7985
@@ -8394,17 +8000,17 @@ cat >>confdefs.h <<\_ACEOF
8394_ACEOF 8000_ACEOF
8395 8001
8396 if test "${ac_cv_header_net_if_tap_h+set}" = set; then 8002 if test "${ac_cv_header_net_if_tap_h+set}" = set; then
8397 { $as_echo "$as_me:$LINENO: checking for net/if_tap.h" >&5 8003 { echo "$as_me:$LINENO: checking for net/if_tap.h" >&5
8398$as_echo_n "checking for net/if_tap.h... " >&6; } 8004echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6; }
8399if test "${ac_cv_header_net_if_tap_h+set}" = set; then 8005if test "${ac_cv_header_net_if_tap_h+set}" = set; then
8400 $as_echo_n "(cached) " >&6 8006 echo $ECHO_N "(cached) $ECHO_C" >&6
8401fi 8007fi
8402{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5 8008{ echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5
8403$as_echo "$ac_cv_header_net_if_tap_h" >&6; } 8009echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6; }
8404else 8010else
8405 # Is the header compilable? 8011 # Is the header compilable?
8406{ $as_echo "$as_me:$LINENO: checking net/if_tap.h usability" >&5 8012{ echo "$as_me:$LINENO: checking net/if_tap.h usability" >&5
8407$as_echo_n "checking net/if_tap.h usability... " >&6; } 8013echo $ECHO_N "checking net/if_tap.h usability... $ECHO_C" >&6; }
8408cat >conftest.$ac_ext <<_ACEOF 8014cat >conftest.$ac_ext <<_ACEOF
8409/* confdefs.h. */ 8015/* confdefs.h. */
8410_ACEOF 8016_ACEOF
@@ -8420,33 +8026,32 @@ case "(($ac_try" in
8420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 8026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8421 *) ac_try_echo=$ac_try;; 8027 *) ac_try_echo=$ac_try;;
8422esac 8028esac
8423eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 8029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8424$as_echo "$ac_try_echo") >&5
8425 (eval "$ac_compile") 2>conftest.er1 8030 (eval "$ac_compile") 2>conftest.er1
8426 ac_status=$? 8031 ac_status=$?
8427 grep -v '^ *+' conftest.er1 >conftest.err 8032 grep -v '^ *+' conftest.er1 >conftest.err
8428 rm -f conftest.er1 8033 rm -f conftest.er1
8429 cat conftest.err >&5 8034 cat conftest.err >&5
8430 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 8035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8431 (exit $ac_status); } && { 8036 (exit $ac_status); } && {
8432 test -z "$ac_c_werror_flag" || 8037 test -z "$ac_c_werror_flag" ||
8433 test ! -s conftest.err 8038 test ! -s conftest.err
8434 } && test -s conftest.$ac_objext; then 8039 } && test -s conftest.$ac_objext; then
8435 ac_header_compiler=yes 8040 ac_header_compiler=yes
8436else 8041else
8437 $as_echo "$as_me: failed program was:" >&5 8042 echo "$as_me: failed program was:" >&5
8438sed 's/^/| /' conftest.$ac_ext >&5 8043sed 's/^/| /' conftest.$ac_ext >&5
8439 8044
8440 ac_header_compiler=no 8045 ac_header_compiler=no
8441fi 8046fi
8442 8047
8443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 8048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8444{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 8049{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8445$as_echo "$ac_header_compiler" >&6; } 8050echo "${ECHO_T}$ac_header_compiler" >&6; }
8446 8051
8447# Is the header present? 8052# Is the header present?
8448{ $as_echo "$as_me:$LINENO: checking net/if_tap.h presence" >&5 8053{ echo "$as_me:$LINENO: checking net/if_tap.h presence" >&5
8449$as_echo_n "checking net/if_tap.h presence... " >&6; } 8054echo $ECHO_N "checking net/if_tap.h presence... $ECHO_C" >&6; }
8450cat >conftest.$ac_ext <<_ACEOF 8055cat >conftest.$ac_ext <<_ACEOF
8451/* confdefs.h. */ 8056/* confdefs.h. */
8452_ACEOF 8057_ACEOF
@@ -8460,52 +8065,51 @@ case "(($ac_try" in
8460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 8065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8461 *) ac_try_echo=$ac_try;; 8066 *) ac_try_echo=$ac_try;;
8462esac 8067esac
8463eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 8068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8464$as_echo "$ac_try_echo") >&5
8465 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 8069 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8466 ac_status=$? 8070 ac_status=$?
8467 grep -v '^ *+' conftest.er1 >conftest.err 8071 grep -v '^ *+' conftest.er1 >conftest.err
8468 rm -f conftest.er1 8072 rm -f conftest.er1
8469 cat conftest.err >&5 8073 cat conftest.err >&5
8470 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 8074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8471 (exit $ac_status); } >/dev/null && { 8075 (exit $ac_status); } >/dev/null && {
8472 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 8076 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8473 test ! -s conftest.err 8077 test ! -s conftest.err
8474 }; then 8078 }; then
8475 ac_header_preproc=yes 8079 ac_header_preproc=yes
8476else 8080else
8477 $as_echo "$as_me: failed program was:" >&5 8081 echo "$as_me: failed program was:" >&5
8478sed 's/^/| /' conftest.$ac_ext >&5 8082sed 's/^/| /' conftest.$ac_ext >&5
8479 8083
8480 ac_header_preproc=no 8084 ac_header_preproc=no
8481fi 8085fi
8482 8086
8483rm -f conftest.err conftest.$ac_ext 8087rm -f conftest.err conftest.$ac_ext
8484{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 8088{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8485$as_echo "$ac_header_preproc" >&6; } 8089echo "${ECHO_T}$ac_header_preproc" >&6; }
8486 8090
8487# So? What about this header? 8091# So? What about this header?
8488case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 8092case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8489 yes:no: ) 8093 yes:no: )
8490 { $as_echo "$as_me:$LINENO: WARNING: net/if_tap.h: accepted by the compiler, rejected by the preprocessor!" >&5 8094 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: accepted by the compiler, rejected by the preprocessor!" >&5
8491$as_echo "$as_me: WARNING: net/if_tap.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 8095echo "$as_me: WARNING: net/if_tap.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8492 { $as_echo "$as_me:$LINENO: WARNING: net/if_tap.h: proceeding with the compiler's result" >&5 8096 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: proceeding with the compiler's result" >&5
8493$as_echo "$as_me: WARNING: net/if_tap.h: proceeding with the compiler's result" >&2;} 8097echo "$as_me: WARNING: net/if_tap.h: proceeding with the compiler's result" >&2;}
8494 ac_header_preproc=yes 8098 ac_header_preproc=yes
8495 ;; 8099 ;;
8496 no:yes:* ) 8100 no:yes:* )
8497 { $as_echo "$as_me:$LINENO: WARNING: net/if_tap.h: present but cannot be compiled" >&5 8101 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: present but cannot be compiled" >&5
8498$as_echo "$as_me: WARNING: net/if_tap.h: present but cannot be compiled" >&2;} 8102echo "$as_me: WARNING: net/if_tap.h: present but cannot be compiled" >&2;}
8499 { $as_echo "$as_me:$LINENO: WARNING: net/if_tap.h: check for missing prerequisite headers?" >&5 8103 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: check for missing prerequisite headers?" >&5
8500$as_echo "$as_me: WARNING: net/if_tap.h: check for missing prerequisite headers?" >&2;} 8104echo "$as_me: WARNING: net/if_tap.h: check for missing prerequisite headers?" >&2;}
8501 { $as_echo "$as_me:$LINENO: WARNING: net/if_tap.h: see the Autoconf documentation" >&5 8105 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: see the Autoconf documentation" >&5
8502$as_echo "$as_me: WARNING: net/if_tap.h: see the Autoconf documentation" >&2;} 8106echo "$as_me: WARNING: net/if_tap.h: see the Autoconf documentation" >&2;}
8503 { $as_echo "$as_me:$LINENO: WARNING: net/if_tap.h: section \"Present But Cannot Be Compiled\"" >&5 8107 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: section \"Present But Cannot Be Compiled\"" >&5
8504$as_echo "$as_me: WARNING: net/if_tap.h: section \"Present But Cannot Be Compiled\"" >&2;} 8108echo "$as_me: WARNING: net/if_tap.h: section \"Present But Cannot Be Compiled\"" >&2;}
8505 { $as_echo "$as_me:$LINENO: WARNING: net/if_tap.h: proceeding with the preprocessor's result" >&5 8109 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: proceeding with the preprocessor's result" >&5
8506$as_echo "$as_me: WARNING: net/if_tap.h: proceeding with the preprocessor's result" >&2;} 8110echo "$as_me: WARNING: net/if_tap.h: proceeding with the preprocessor's result" >&2;}
8507 { $as_echo "$as_me:$LINENO: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&5 8111 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&5
8508$as_echo "$as_me: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&2;} 8112echo "$as_me: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&2;}
8509 ( cat <<\_ASBOX 8113 ( cat <<\_ASBOX
8510## ------------------------------------------- ## 8114## ------------------------------------------- ##
8511## Report this to openssh-unix-dev@mindrot.org ## 8115## Report this to openssh-unix-dev@mindrot.org ##
@@ -8514,15 +8118,15 @@ _ASBOX
8514 ) | sed "s/^/$as_me: WARNING: /" >&2 8118 ) | sed "s/^/$as_me: WARNING: /" >&2
8515 ;; 8119 ;;
8516esac 8120esac
8517{ $as_echo "$as_me:$LINENO: checking for net/if_tap.h" >&5 8121{ echo "$as_me:$LINENO: checking for net/if_tap.h" >&5
8518$as_echo_n "checking for net/if_tap.h... " >&6; } 8122echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6; }
8519if test "${ac_cv_header_net_if_tap_h+set}" = set; then 8123if test "${ac_cv_header_net_if_tap_h+set}" = set; then
8520 $as_echo_n "(cached) " >&6 8124 echo $ECHO_N "(cached) $ECHO_C" >&6
8521else 8125else
8522 ac_cv_header_net_if_tap_h=$ac_header_preproc 8126 ac_cv_header_net_if_tap_h=$ac_header_preproc
8523fi 8127fi
8524{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5 8128{ echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5
8525$as_echo "$ac_cv_header_net_if_tap_h" >&6; } 8129echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6; }
8526 8130
8527fi 8131fi
8528if test $ac_cv_header_net_if_tap_h = yes; then 8132if test $ac_cv_header_net_if_tap_h = yes; then
@@ -8555,17 +8159,17 @@ cat >>confdefs.h <<\_ACEOF
8555_ACEOF 8159_ACEOF
8556 8160
8557 if test "${ac_cv_header_net_if_tap_h+set}" = set; then 8161 if test "${ac_cv_header_net_if_tap_h+set}" = set; then
8558 { $as_echo "$as_me:$LINENO: checking for net/if_tap.h" >&5 8162 { echo "$as_me:$LINENO: checking for net/if_tap.h" >&5
8559$as_echo_n "checking for net/if_tap.h... " >&6; } 8163echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6; }
8560if test "${ac_cv_header_net_if_tap_h+set}" = set; then 8164if test "${ac_cv_header_net_if_tap_h+set}" = set; then
8561 $as_echo_n "(cached) " >&6 8165 echo $ECHO_N "(cached) $ECHO_C" >&6
8562fi 8166fi
8563{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5 8167{ echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5
8564$as_echo "$ac_cv_header_net_if_tap_h" >&6; } 8168echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6; }
8565else 8169else
8566 # Is the header compilable? 8170 # Is the header compilable?
8567{ $as_echo "$as_me:$LINENO: checking net/if_tap.h usability" >&5 8171{ echo "$as_me:$LINENO: checking net/if_tap.h usability" >&5
8568$as_echo_n "checking net/if_tap.h usability... " >&6; } 8172echo $ECHO_N "checking net/if_tap.h usability... $ECHO_C" >&6; }
8569cat >conftest.$ac_ext <<_ACEOF 8173cat >conftest.$ac_ext <<_ACEOF
8570/* confdefs.h. */ 8174/* confdefs.h. */
8571_ACEOF 8175_ACEOF
@@ -8581,33 +8185,32 @@ case "(($ac_try" in
8581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 8185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8582 *) ac_try_echo=$ac_try;; 8186 *) ac_try_echo=$ac_try;;
8583esac 8187esac
8584eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 8188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8585$as_echo "$ac_try_echo") >&5
8586 (eval "$ac_compile") 2>conftest.er1 8189 (eval "$ac_compile") 2>conftest.er1
8587 ac_status=$? 8190 ac_status=$?
8588 grep -v '^ *+' conftest.er1 >conftest.err 8191 grep -v '^ *+' conftest.er1 >conftest.err
8589 rm -f conftest.er1 8192 rm -f conftest.er1
8590 cat conftest.err >&5 8193 cat conftest.err >&5
8591 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 8194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8592 (exit $ac_status); } && { 8195 (exit $ac_status); } && {
8593 test -z "$ac_c_werror_flag" || 8196 test -z "$ac_c_werror_flag" ||
8594 test ! -s conftest.err 8197 test ! -s conftest.err
8595 } && test -s conftest.$ac_objext; then 8198 } && test -s conftest.$ac_objext; then
8596 ac_header_compiler=yes 8199 ac_header_compiler=yes
8597else 8200else
8598 $as_echo "$as_me: failed program was:" >&5 8201 echo "$as_me: failed program was:" >&5
8599sed 's/^/| /' conftest.$ac_ext >&5 8202sed 's/^/| /' conftest.$ac_ext >&5
8600 8203
8601 ac_header_compiler=no 8204 ac_header_compiler=no
8602fi 8205fi
8603 8206
8604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 8207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8605{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 8208{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8606$as_echo "$ac_header_compiler" >&6; } 8209echo "${ECHO_T}$ac_header_compiler" >&6; }
8607 8210
8608# Is the header present? 8211# Is the header present?
8609{ $as_echo "$as_me:$LINENO: checking net/if_tap.h presence" >&5 8212{ echo "$as_me:$LINENO: checking net/if_tap.h presence" >&5
8610$as_echo_n "checking net/if_tap.h presence... " >&6; } 8213echo $ECHO_N "checking net/if_tap.h presence... $ECHO_C" >&6; }
8611cat >conftest.$ac_ext <<_ACEOF 8214cat >conftest.$ac_ext <<_ACEOF
8612/* confdefs.h. */ 8215/* confdefs.h. */
8613_ACEOF 8216_ACEOF
@@ -8621,52 +8224,51 @@ case "(($ac_try" in
8621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 8224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8622 *) ac_try_echo=$ac_try;; 8225 *) ac_try_echo=$ac_try;;
8623esac 8226esac
8624eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 8227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8625$as_echo "$ac_try_echo") >&5
8626 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 8228 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8627 ac_status=$? 8229 ac_status=$?
8628 grep -v '^ *+' conftest.er1 >conftest.err 8230 grep -v '^ *+' conftest.er1 >conftest.err
8629 rm -f conftest.er1 8231 rm -f conftest.er1
8630 cat conftest.err >&5 8232 cat conftest.err >&5
8631 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 8233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8632 (exit $ac_status); } >/dev/null && { 8234 (exit $ac_status); } >/dev/null && {
8633 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 8235 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8634 test ! -s conftest.err 8236 test ! -s conftest.err
8635 }; then 8237 }; then
8636 ac_header_preproc=yes 8238 ac_header_preproc=yes
8637else 8239else
8638 $as_echo "$as_me: failed program was:" >&5 8240 echo "$as_me: failed program was:" >&5
8639sed 's/^/| /' conftest.$ac_ext >&5 8241sed 's/^/| /' conftest.$ac_ext >&5
8640 8242
8641 ac_header_preproc=no 8243 ac_header_preproc=no
8642fi 8244fi
8643 8245
8644rm -f conftest.err conftest.$ac_ext 8246rm -f conftest.err conftest.$ac_ext
8645{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 8247{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8646$as_echo "$ac_header_preproc" >&6; } 8248echo "${ECHO_T}$ac_header_preproc" >&6; }
8647 8249
8648# So? What about this header? 8250# So? What about this header?
8649case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 8251case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8650 yes:no: ) 8252 yes:no: )
8651 { $as_echo "$as_me:$LINENO: WARNING: net/if_tap.h: accepted by the compiler, rejected by the preprocessor!" >&5 8253 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: accepted by the compiler, rejected by the preprocessor!" >&5
8652$as_echo "$as_me: WARNING: net/if_tap.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 8254echo "$as_me: WARNING: net/if_tap.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8653 { $as_echo "$as_me:$LINENO: WARNING: net/if_tap.h: proceeding with the compiler's result" >&5 8255 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: proceeding with the compiler's result" >&5
8654$as_echo "$as_me: WARNING: net/if_tap.h: proceeding with the compiler's result" >&2;} 8256echo "$as_me: WARNING: net/if_tap.h: proceeding with the compiler's result" >&2;}
8655 ac_header_preproc=yes 8257 ac_header_preproc=yes
8656 ;; 8258 ;;
8657 no:yes:* ) 8259 no:yes:* )
8658 { $as_echo "$as_me:$LINENO: WARNING: net/if_tap.h: present but cannot be compiled" >&5 8260 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: present but cannot be compiled" >&5
8659$as_echo "$as_me: WARNING: net/if_tap.h: present but cannot be compiled" >&2;} 8261echo "$as_me: WARNING: net/if_tap.h: present but cannot be compiled" >&2;}
8660 { $as_echo "$as_me:$LINENO: WARNING: net/if_tap.h: check for missing prerequisite headers?" >&5 8262 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: check for missing prerequisite headers?" >&5
8661$as_echo "$as_me: WARNING: net/if_tap.h: check for missing prerequisite headers?" >&2;} 8263echo "$as_me: WARNING: net/if_tap.h: check for missing prerequisite headers?" >&2;}
8662 { $as_echo "$as_me:$LINENO: WARNING: net/if_tap.h: see the Autoconf documentation" >&5 8264 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: see the Autoconf documentation" >&5
8663$as_echo "$as_me: WARNING: net/if_tap.h: see the Autoconf documentation" >&2;} 8265echo "$as_me: WARNING: net/if_tap.h: see the Autoconf documentation" >&2;}
8664 { $as_echo "$as_me:$LINENO: WARNING: net/if_tap.h: section \"Present But Cannot Be Compiled\"" >&5 8266 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: section \"Present But Cannot Be Compiled\"" >&5
8665$as_echo "$as_me: WARNING: net/if_tap.h: section \"Present But Cannot Be Compiled\"" >&2;} 8267echo "$as_me: WARNING: net/if_tap.h: section \"Present But Cannot Be Compiled\"" >&2;}
8666 { $as_echo "$as_me:$LINENO: WARNING: net/if_tap.h: proceeding with the preprocessor's result" >&5 8268 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: proceeding with the preprocessor's result" >&5
8667$as_echo "$as_me: WARNING: net/if_tap.h: proceeding with the preprocessor's result" >&2;} 8269echo "$as_me: WARNING: net/if_tap.h: proceeding with the preprocessor's result" >&2;}
8668 { $as_echo "$as_me:$LINENO: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&5 8270 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&5
8669$as_echo "$as_me: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&2;} 8271echo "$as_me: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&2;}
8670 ( cat <<\_ASBOX 8272 ( cat <<\_ASBOX
8671## ------------------------------------------- ## 8273## ------------------------------------------- ##
8672## Report this to openssh-unix-dev@mindrot.org ## 8274## Report this to openssh-unix-dev@mindrot.org ##
@@ -8675,15 +8277,15 @@ _ASBOX
8675 ) | sed "s/^/$as_me: WARNING: /" >&2 8277 ) | sed "s/^/$as_me: WARNING: /" >&2
8676 ;; 8278 ;;
8677esac 8279esac
8678{ $as_echo "$as_me:$LINENO: checking for net/if_tap.h" >&5 8280{ echo "$as_me:$LINENO: checking for net/if_tap.h" >&5
8679$as_echo_n "checking for net/if_tap.h... " >&6; } 8281echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6; }
8680if test "${ac_cv_header_net_if_tap_h+set}" = set; then 8282if test "${ac_cv_header_net_if_tap_h+set}" = set; then
8681 $as_echo_n "(cached) " >&6 8283 echo $ECHO_N "(cached) $ECHO_C" >&6
8682else 8284else
8683 ac_cv_header_net_if_tap_h=$ac_header_preproc 8285 ac_cv_header_net_if_tap_h=$ac_header_preproc
8684fi 8286fi
8685{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5 8287{ echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5
8686$as_echo "$ac_cv_header_net_if_tap_h" >&6; } 8288echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6; }
8687 8289
8688fi 8290fi
8689if test $ac_cv_header_net_if_tap_h = yes; then 8291if test $ac_cv_header_net_if_tap_h = yes; then
@@ -8812,12 +8414,12 @@ _ACEOF
8812 external_path_file=/etc/default/login 8414 external_path_file=/etc/default/login
8813 # hardwire lastlog location (can't detect it on some versions) 8415 # hardwire lastlog location (can't detect it on some versions)
8814 conf_lastlog_location="/var/adm/lastlog" 8416 conf_lastlog_location="/var/adm/lastlog"
8815 { $as_echo "$as_me:$LINENO: checking for obsolete utmp and wtmp in solaris2.x" >&5 8417 { echo "$as_me:$LINENO: checking for obsolete utmp and wtmp in solaris2.x" >&5
8816$as_echo_n "checking for obsolete utmp and wtmp in solaris2.x... " >&6; } 8418echo $ECHO_N "checking for obsolete utmp and wtmp in solaris2.x... $ECHO_C" >&6; }
8817 sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'` 8419 sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'`
8818 if test "$sol2ver" -ge 8; then 8420 if test "$sol2ver" -ge 8; then
8819 { $as_echo "$as_me:$LINENO: result: yes" >&5 8421 { echo "$as_me:$LINENO: result: yes" >&5
8820$as_echo "yes" >&6; } 8422echo "${ECHO_T}yes" >&6; }
8821 cat >>confdefs.h <<\_ACEOF 8423 cat >>confdefs.h <<\_ACEOF
8822#define DISABLE_UTMP 1 8424#define DISABLE_UTMP 1
8823_ACEOF 8425_ACEOF
@@ -8828,17 +8430,17 @@ cat >>confdefs.h <<\_ACEOF
8828_ACEOF 8430_ACEOF
8829 8431
8830 else 8432 else
8831 { $as_echo "$as_me:$LINENO: result: no" >&5 8433 { echo "$as_me:$LINENO: result: no" >&5
8832$as_echo "no" >&6; } 8434echo "${ECHO_T}no" >&6; }
8833 fi 8435 fi
8834 8436
8835# Check whether --with-solaris-contracts was given. 8437# Check whether --with-solaris-contracts was given.
8836if test "${with_solaris_contracts+set}" = set; then 8438if test "${with_solaris_contracts+set}" = set; then
8837 withval=$with_solaris_contracts; 8439 withval=$with_solaris_contracts;
8838 { $as_echo "$as_me:$LINENO: checking for ct_tmpl_activate in -lcontract" >&5 8440 { echo "$as_me:$LINENO: checking for ct_tmpl_activate in -lcontract" >&5
8839$as_echo_n "checking for ct_tmpl_activate in -lcontract... " >&6; } 8441echo $ECHO_N "checking for ct_tmpl_activate in -lcontract... $ECHO_C" >&6; }
8840if test "${ac_cv_lib_contract_ct_tmpl_activate+set}" = set; then 8442if test "${ac_cv_lib_contract_ct_tmpl_activate+set}" = set; then
8841 $as_echo_n "(cached) " >&6 8443 echo $ECHO_N "(cached) $ECHO_C" >&6
8842else 8444else
8843 ac_check_lib_save_LIBS=$LIBS 8445 ac_check_lib_save_LIBS=$LIBS
8844LIBS="-lcontract $LIBS" 8446LIBS="-lcontract $LIBS"
@@ -8870,36 +8472,32 @@ case "(($ac_try" in
8870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 8472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8871 *) ac_try_echo=$ac_try;; 8473 *) ac_try_echo=$ac_try;;
8872esac 8474esac
8873eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 8475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8874$as_echo "$ac_try_echo") >&5
8875 (eval "$ac_link") 2>conftest.er1 8476 (eval "$ac_link") 2>conftest.er1
8876 ac_status=$? 8477 ac_status=$?
8877 grep -v '^ *+' conftest.er1 >conftest.err 8478 grep -v '^ *+' conftest.er1 >conftest.err
8878 rm -f conftest.er1 8479 rm -f conftest.er1
8879 cat conftest.err >&5 8480 cat conftest.err >&5
8880 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 8481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8881 (exit $ac_status); } && { 8482 (exit $ac_status); } && {
8882 test -z "$ac_c_werror_flag" || 8483 test -z "$ac_c_werror_flag" ||
8883 test ! -s conftest.err 8484 test ! -s conftest.err
8884 } && test -s conftest$ac_exeext && { 8485 } && test -s conftest$ac_exeext &&
8885 test "$cross_compiling" = yes || 8486 $as_test_x conftest$ac_exeext; then
8886 $as_test_x conftest$ac_exeext
8887 }; then
8888 ac_cv_lib_contract_ct_tmpl_activate=yes 8487 ac_cv_lib_contract_ct_tmpl_activate=yes
8889else 8488else
8890 $as_echo "$as_me: failed program was:" >&5 8489 echo "$as_me: failed program was:" >&5
8891sed 's/^/| /' conftest.$ac_ext >&5 8490sed 's/^/| /' conftest.$ac_ext >&5
8892 8491
8893 ac_cv_lib_contract_ct_tmpl_activate=no 8492 ac_cv_lib_contract_ct_tmpl_activate=no
8894fi 8493fi
8895 8494
8896rm -rf conftest.dSYM
8897rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 8495rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8898 conftest$ac_exeext conftest.$ac_ext 8496 conftest$ac_exeext conftest.$ac_ext
8899LIBS=$ac_check_lib_save_LIBS 8497LIBS=$ac_check_lib_save_LIBS
8900fi 8498fi
8901{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_contract_ct_tmpl_activate" >&5 8499{ echo "$as_me:$LINENO: result: $ac_cv_lib_contract_ct_tmpl_activate" >&5
8902$as_echo "$ac_cv_lib_contract_ct_tmpl_activate" >&6; } 8500echo "${ECHO_T}$ac_cv_lib_contract_ct_tmpl_activate" >&6; }
8903if test $ac_cv_lib_contract_ct_tmpl_activate = yes; then 8501if test $ac_cv_lib_contract_ct_tmpl_activate = yes; then
8904 8502
8905cat >>confdefs.h <<\_ACEOF 8503cat >>confdefs.h <<\_ACEOF
@@ -8920,11 +8518,11 @@ fi
8920 8518
8921for ac_func in getpwanam 8519for ac_func in getpwanam
8922do 8520do
8923as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 8521as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8924{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 8522{ echo "$as_me:$LINENO: checking for $ac_func" >&5
8925$as_echo_n "checking for $ac_func... " >&6; } 8523echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
8926if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 8524if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8927 $as_echo_n "(cached) " >&6 8525 echo $ECHO_N "(cached) $ECHO_C" >&6
8928else 8526else
8929 cat >conftest.$ac_ext <<_ACEOF 8527 cat >conftest.$ac_ext <<_ACEOF
8930/* confdefs.h. */ 8528/* confdefs.h. */
@@ -8977,41 +8575,35 @@ case "(($ac_try" in
8977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 8575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8978 *) ac_try_echo=$ac_try;; 8576 *) ac_try_echo=$ac_try;;
8979esac 8577esac
8980eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 8578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8981$as_echo "$ac_try_echo") >&5
8982 (eval "$ac_link") 2>conftest.er1 8579 (eval "$ac_link") 2>conftest.er1
8983 ac_status=$? 8580 ac_status=$?
8984 grep -v '^ *+' conftest.er1 >conftest.err 8581 grep -v '^ *+' conftest.er1 >conftest.err
8985 rm -f conftest.er1 8582 rm -f conftest.er1
8986 cat conftest.err >&5 8583 cat conftest.err >&5
8987 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 8584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8988 (exit $ac_status); } && { 8585 (exit $ac_status); } && {
8989 test -z "$ac_c_werror_flag" || 8586 test -z "$ac_c_werror_flag" ||
8990 test ! -s conftest.err 8587 test ! -s conftest.err
8991 } && test -s conftest$ac_exeext && { 8588 } && test -s conftest$ac_exeext &&
8992 test "$cross_compiling" = yes || 8589 $as_test_x conftest$ac_exeext; then
8993 $as_test_x conftest$ac_exeext
8994 }; then
8995 eval "$as_ac_var=yes" 8590 eval "$as_ac_var=yes"
8996else 8591else
8997 $as_echo "$as_me: failed program was:" >&5 8592 echo "$as_me: failed program was:" >&5
8998sed 's/^/| /' conftest.$ac_ext >&5 8593sed 's/^/| /' conftest.$ac_ext >&5
8999 8594
9000 eval "$as_ac_var=no" 8595 eval "$as_ac_var=no"
9001fi 8596fi
9002 8597
9003rm -rf conftest.dSYM
9004rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 8598rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9005 conftest$ac_exeext conftest.$ac_ext 8599 conftest$ac_exeext conftest.$ac_ext
9006fi 8600fi
9007ac_res=`eval 'as_val=${'$as_ac_var'} 8601ac_res=`eval echo '${'$as_ac_var'}'`
9008 $as_echo "$as_val"'` 8602 { echo "$as_me:$LINENO: result: $ac_res" >&5
9009 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 8603echo "${ECHO_T}$ac_res" >&6; }
9010$as_echo "$ac_res" >&6; } 8604if test `eval echo '${'$as_ac_var'}'` = yes; then
9011if test `eval 'as_val=${'$as_ac_var'}
9012 $as_echo "$as_val"'` = yes; then
9013 cat >>confdefs.h <<_ACEOF 8605 cat >>confdefs.h <<_ACEOF
9014#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 8606#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9015_ACEOF 8607_ACEOF
9016 8608
9017fi 8609fi
@@ -9055,10 +8647,10 @@ _ACEOF
9055*-sni-sysv*) 8647*-sni-sysv*)
9056 # /usr/ucblib MUST NOT be searched on ReliantUNIX 8648 # /usr/ucblib MUST NOT be searched on ReliantUNIX
9057 8649
9058{ $as_echo "$as_me:$LINENO: checking for dlsym in -ldl" >&5 8650{ echo "$as_me:$LINENO: checking for dlsym in -ldl" >&5
9059$as_echo_n "checking for dlsym in -ldl... " >&6; } 8651echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6; }
9060if test "${ac_cv_lib_dl_dlsym+set}" = set; then 8652if test "${ac_cv_lib_dl_dlsym+set}" = set; then
9061 $as_echo_n "(cached) " >&6 8653 echo $ECHO_N "(cached) $ECHO_C" >&6
9062else 8654else
9063 ac_check_lib_save_LIBS=$LIBS 8655 ac_check_lib_save_LIBS=$LIBS
9064LIBS="-ldl $LIBS" 8656LIBS="-ldl $LIBS"
@@ -9090,36 +8682,32 @@ case "(($ac_try" in
9090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 8682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9091 *) ac_try_echo=$ac_try;; 8683 *) ac_try_echo=$ac_try;;
9092esac 8684esac
9093eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 8685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9094$as_echo "$ac_try_echo") >&5
9095 (eval "$ac_link") 2>conftest.er1 8686 (eval "$ac_link") 2>conftest.er1
9096 ac_status=$? 8687 ac_status=$?
9097 grep -v '^ *+' conftest.er1 >conftest.err 8688 grep -v '^ *+' conftest.er1 >conftest.err
9098 rm -f conftest.er1 8689 rm -f conftest.er1
9099 cat conftest.err >&5 8690 cat conftest.err >&5
9100 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 8691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9101 (exit $ac_status); } && { 8692 (exit $ac_status); } && {
9102 test -z "$ac_c_werror_flag" || 8693 test -z "$ac_c_werror_flag" ||
9103 test ! -s conftest.err 8694 test ! -s conftest.err
9104 } && test -s conftest$ac_exeext && { 8695 } && test -s conftest$ac_exeext &&
9105 test "$cross_compiling" = yes || 8696 $as_test_x conftest$ac_exeext; then
9106 $as_test_x conftest$ac_exeext
9107 }; then
9108 ac_cv_lib_dl_dlsym=yes 8697 ac_cv_lib_dl_dlsym=yes
9109else 8698else
9110 $as_echo "$as_me: failed program was:" >&5 8699 echo "$as_me: failed program was:" >&5
9111sed 's/^/| /' conftest.$ac_ext >&5 8700sed 's/^/| /' conftest.$ac_ext >&5
9112 8701
9113 ac_cv_lib_dl_dlsym=no 8702 ac_cv_lib_dl_dlsym=no
9114fi 8703fi
9115 8704
9116rm -rf conftest.dSYM
9117rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 8705rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9118 conftest$ac_exeext conftest.$ac_ext 8706 conftest$ac_exeext conftest.$ac_ext
9119LIBS=$ac_check_lib_save_LIBS 8707LIBS=$ac_check_lib_save_LIBS
9120fi 8708fi
9121{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlsym" >&5 8709{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlsym" >&5
9122$as_echo "$ac_cv_lib_dl_dlsym" >&6; } 8710echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6; }
9123if test $ac_cv_lib_dl_dlsym = yes; then 8711if test $ac_cv_lib_dl_dlsym = yes; then
9124 cat >>confdefs.h <<_ACEOF 8712 cat >>confdefs.h <<_ACEOF
9125#define HAVE_LIBDL 1 8713#define HAVE_LIBDL 1
@@ -9130,10 +8718,10 @@ _ACEOF
9130fi 8718fi
9131 8719
9132 # -lresolv needs to be at the end of LIBS or DNS lookups break 8720 # -lresolv needs to be at the end of LIBS or DNS lookups break
9133 { $as_echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5 8721 { echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5
9134$as_echo_n "checking for res_query in -lresolv... " >&6; } 8722echo $ECHO_N "checking for res_query in -lresolv... $ECHO_C" >&6; }
9135if test "${ac_cv_lib_resolv_res_query+set}" = set; then 8723if test "${ac_cv_lib_resolv_res_query+set}" = set; then
9136 $as_echo_n "(cached) " >&6 8724 echo $ECHO_N "(cached) $ECHO_C" >&6
9137else 8725else
9138 ac_check_lib_save_LIBS=$LIBS 8726 ac_check_lib_save_LIBS=$LIBS
9139LIBS="-lresolv $LIBS" 8727LIBS="-lresolv $LIBS"
@@ -9165,36 +8753,32 @@ case "(($ac_try" in
9165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 8753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9166 *) ac_try_echo=$ac_try;; 8754 *) ac_try_echo=$ac_try;;
9167esac 8755esac
9168eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 8756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9169$as_echo "$ac_try_echo") >&5
9170 (eval "$ac_link") 2>conftest.er1 8757 (eval "$ac_link") 2>conftest.er1
9171 ac_status=$? 8758 ac_status=$?
9172 grep -v '^ *+' conftest.er1 >conftest.err 8759 grep -v '^ *+' conftest.er1 >conftest.err
9173 rm -f conftest.er1 8760 rm -f conftest.er1
9174 cat conftest.err >&5 8761 cat conftest.err >&5
9175 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 8762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9176 (exit $ac_status); } && { 8763 (exit $ac_status); } && {
9177 test -z "$ac_c_werror_flag" || 8764 test -z "$ac_c_werror_flag" ||
9178 test ! -s conftest.err 8765 test ! -s conftest.err
9179 } && test -s conftest$ac_exeext && { 8766 } && test -s conftest$ac_exeext &&
9180 test "$cross_compiling" = yes || 8767 $as_test_x conftest$ac_exeext; then
9181 $as_test_x conftest$ac_exeext
9182 }; then
9183 ac_cv_lib_resolv_res_query=yes 8768 ac_cv_lib_resolv_res_query=yes
9184else 8769else
9185 $as_echo "$as_me: failed program was:" >&5 8770 echo "$as_me: failed program was:" >&5
9186sed 's/^/| /' conftest.$ac_ext >&5 8771sed 's/^/| /' conftest.$ac_ext >&5
9187 8772
9188 ac_cv_lib_resolv_res_query=no 8773 ac_cv_lib_resolv_res_query=no
9189fi 8774fi
9190 8775
9191rm -rf conftest.dSYM
9192rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 8776rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9193 conftest$ac_exeext conftest.$ac_ext 8777 conftest$ac_exeext conftest.$ac_ext
9194LIBS=$ac_check_lib_save_LIBS 8778LIBS=$ac_check_lib_save_LIBS
9195fi 8779fi
9196{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_query" >&5 8780{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_query" >&5
9197$as_echo "$ac_cv_lib_resolv_res_query" >&6; } 8781echo "${ECHO_T}$ac_cv_lib_resolv_res_query" >&6; }
9198if test $ac_cv_lib_resolv_res_query = yes; then 8782if test $ac_cv_lib_resolv_res_query = yes; then
9199 LIBS="$LIBS -lresolv" 8783 LIBS="$LIBS -lresolv"
9200fi 8784fi
@@ -9259,6 +8843,7 @@ _ACEOF
9259 ;; 8843 ;;
9260# UnixWare 7.x, OpenUNIX 8 8844# UnixWare 7.x, OpenUNIX 8
9261*-*-sysv5*) 8845*-*-sysv5*)
8846 CPPFLAGS="$CPPFLAGS -Dvsnprintf=_xvsnprintf -Dsnprintf=_xsnprintf"
9262 8847
9263cat >>confdefs.h <<\_ACEOF 8848cat >>confdefs.h <<\_ACEOF
9264#define UNIXWARE_LONG_PASSWORDS 1 8849#define UNIXWARE_LONG_PASSWORDS 1
@@ -9273,6 +8858,10 @@ _ACEOF
9273_ACEOF 8858_ACEOF
9274 8859
9275 cat >>confdefs.h <<\_ACEOF 8860 cat >>confdefs.h <<\_ACEOF
8861#define BROKEN_GETADDRINFO 1
8862_ACEOF
8863
8864 cat >>confdefs.h <<\_ACEOF
9276#define BROKEN_SETREUID 1 8865#define BROKEN_SETREUID 1
9277_ACEOF 8866_ACEOF
9278 8867
@@ -9296,10 +8885,10 @@ _ACEOF
9296#define BROKEN_UPDWTMPX 1 8885#define BROKEN_UPDWTMPX 1
9297_ACEOF 8886_ACEOF
9298 8887
9299 { $as_echo "$as_me:$LINENO: checking for getluid in -lprot" >&5 8888 { echo "$as_me:$LINENO: checking for getluid in -lprot" >&5
9300$as_echo_n "checking for getluid in -lprot... " >&6; } 8889echo $ECHO_N "checking for getluid in -lprot... $ECHO_C" >&6; }
9301if test "${ac_cv_lib_prot_getluid+set}" = set; then 8890if test "${ac_cv_lib_prot_getluid+set}" = set; then
9302 $as_echo_n "(cached) " >&6 8891 echo $ECHO_N "(cached) $ECHO_C" >&6
9303else 8892else
9304 ac_check_lib_save_LIBS=$LIBS 8893 ac_check_lib_save_LIBS=$LIBS
9305LIBS="-lprot $LIBS" 8894LIBS="-lprot $LIBS"
@@ -9331,47 +8920,43 @@ case "(($ac_try" in
9331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 8920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9332 *) ac_try_echo=$ac_try;; 8921 *) ac_try_echo=$ac_try;;
9333esac 8922esac
9334eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 8923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9335$as_echo "$ac_try_echo") >&5
9336 (eval "$ac_link") 2>conftest.er1 8924 (eval "$ac_link") 2>conftest.er1
9337 ac_status=$? 8925 ac_status=$?
9338 grep -v '^ *+' conftest.er1 >conftest.err 8926 grep -v '^ *+' conftest.er1 >conftest.err
9339 rm -f conftest.er1 8927 rm -f conftest.er1
9340 cat conftest.err >&5 8928 cat conftest.err >&5
9341 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 8929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9342 (exit $ac_status); } && { 8930 (exit $ac_status); } && {
9343 test -z "$ac_c_werror_flag" || 8931 test -z "$ac_c_werror_flag" ||
9344 test ! -s conftest.err 8932 test ! -s conftest.err
9345 } && test -s conftest$ac_exeext && { 8933 } && test -s conftest$ac_exeext &&
9346 test "$cross_compiling" = yes || 8934 $as_test_x conftest$ac_exeext; then
9347 $as_test_x conftest$ac_exeext
9348 }; then
9349 ac_cv_lib_prot_getluid=yes 8935 ac_cv_lib_prot_getluid=yes
9350else 8936else
9351 $as_echo "$as_me: failed program was:" >&5 8937 echo "$as_me: failed program was:" >&5
9352sed 's/^/| /' conftest.$ac_ext >&5 8938sed 's/^/| /' conftest.$ac_ext >&5
9353 8939
9354 ac_cv_lib_prot_getluid=no 8940 ac_cv_lib_prot_getluid=no
9355fi 8941fi
9356 8942
9357rm -rf conftest.dSYM
9358rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 8943rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9359 conftest$ac_exeext conftest.$ac_ext 8944 conftest$ac_exeext conftest.$ac_ext
9360LIBS=$ac_check_lib_save_LIBS 8945LIBS=$ac_check_lib_save_LIBS
9361fi 8946fi
9362{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getluid" >&5 8947{ echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getluid" >&5
9363$as_echo "$ac_cv_lib_prot_getluid" >&6; } 8948echo "${ECHO_T}$ac_cv_lib_prot_getluid" >&6; }
9364if test $ac_cv_lib_prot_getluid = yes; then 8949if test $ac_cv_lib_prot_getluid = yes; then
9365 LIBS="$LIBS -lprot" 8950 LIBS="$LIBS -lprot"
9366 8951
9367 8952
9368for ac_func in getluid setluid 8953for ac_func in getluid setluid
9369do 8954do
9370as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 8955as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9371{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 8956{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9372$as_echo_n "checking for $ac_func... " >&6; } 8957echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9373if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 8958if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9374 $as_echo_n "(cached) " >&6 8959 echo $ECHO_N "(cached) $ECHO_C" >&6
9375else 8960else
9376 cat >conftest.$ac_ext <<_ACEOF 8961 cat >conftest.$ac_ext <<_ACEOF
9377/* confdefs.h. */ 8962/* confdefs.h. */
@@ -9424,41 +9009,35 @@ case "(($ac_try" in
9424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9425 *) ac_try_echo=$ac_try;; 9010 *) ac_try_echo=$ac_try;;
9426esac 9011esac
9427eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 9012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9428$as_echo "$ac_try_echo") >&5
9429 (eval "$ac_link") 2>conftest.er1 9013 (eval "$ac_link") 2>conftest.er1
9430 ac_status=$? 9014 ac_status=$?
9431 grep -v '^ *+' conftest.er1 >conftest.err 9015 grep -v '^ *+' conftest.er1 >conftest.err
9432 rm -f conftest.er1 9016 rm -f conftest.er1
9433 cat conftest.err >&5 9017 cat conftest.err >&5
9434 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 9018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9435 (exit $ac_status); } && { 9019 (exit $ac_status); } && {
9436 test -z "$ac_c_werror_flag" || 9020 test -z "$ac_c_werror_flag" ||
9437 test ! -s conftest.err 9021 test ! -s conftest.err
9438 } && test -s conftest$ac_exeext && { 9022 } && test -s conftest$ac_exeext &&
9439 test "$cross_compiling" = yes || 9023 $as_test_x conftest$ac_exeext; then
9440 $as_test_x conftest$ac_exeext
9441 }; then
9442 eval "$as_ac_var=yes" 9024 eval "$as_ac_var=yes"
9443else 9025else
9444 $as_echo "$as_me: failed program was:" >&5 9026 echo "$as_me: failed program was:" >&5
9445sed 's/^/| /' conftest.$ac_ext >&5 9027sed 's/^/| /' conftest.$ac_ext >&5
9446 9028
9447 eval "$as_ac_var=no" 9029 eval "$as_ac_var=no"
9448fi 9030fi
9449 9031
9450rm -rf conftest.dSYM
9451rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 9032rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9452 conftest$ac_exeext conftest.$ac_ext 9033 conftest$ac_exeext conftest.$ac_ext
9453fi 9034fi
9454ac_res=`eval 'as_val=${'$as_ac_var'} 9035ac_res=`eval echo '${'$as_ac_var'}'`
9455 $as_echo "$as_val"'` 9036 { echo "$as_me:$LINENO: result: $ac_res" >&5
9456 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 9037echo "${ECHO_T}$ac_res" >&6; }
9457$as_echo "$ac_res" >&6; } 9038if test `eval echo '${'$as_ac_var'}'` = yes; then
9458if test `eval 'as_val=${'$as_ac_var'}
9459 $as_echo "$as_val"'` = yes; then
9460 cat >>confdefs.h <<_ACEOF 9039 cat >>confdefs.h <<_ACEOF
9461#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 9040#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9462_ACEOF 9041_ACEOF
9463 9042
9464fi 9043fi
@@ -9488,8 +9067,8 @@ _ACEOF
9488 ;; 9067 ;;
9489# SCO UNIX and OEM versions of SCO UNIX 9068# SCO UNIX and OEM versions of SCO UNIX
9490*-*-sco3.2v4*) 9069*-*-sco3.2v4*)
9491 { { $as_echo "$as_me:$LINENO: error: \"This Platform is no longer supported.\"" >&5 9070 { { echo "$as_me:$LINENO: error: \"This Platform is no longer supported.\"" >&5
9492$as_echo "$as_me: error: \"This Platform is no longer supported.\"" >&2;} 9071echo "$as_me: error: \"This Platform is no longer supported.\"" >&2;}
9493 { (exit 1); exit 1; }; } 9072 { (exit 1); exit 1; }; }
9494 ;; 9073 ;;
9495# SCO OpenServer 5.x 9074# SCO OpenServer 5.x
@@ -9520,6 +9099,10 @@ _ACEOF
9520_ACEOF 9099_ACEOF
9521 9100
9522 cat >>confdefs.h <<\_ACEOF 9101 cat >>confdefs.h <<\_ACEOF
9102#define BROKEN_GETADDRINFO 1
9103_ACEOF
9104
9105 cat >>confdefs.h <<\_ACEOF
9523#define BROKEN_SETREUID 1 9106#define BROKEN_SETREUID 1
9524_ACEOF 9107_ACEOF
9525 9108
@@ -9543,11 +9126,11 @@ _ACEOF
9543 9126
9544for ac_func in getluid setluid 9127for ac_func in getluid setluid
9545do 9128do
9546as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 9129as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9547{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 9130{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9548$as_echo_n "checking for $ac_func... " >&6; } 9131echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9549if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 9132if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9550 $as_echo_n "(cached) " >&6 9133 echo $ECHO_N "(cached) $ECHO_C" >&6
9551else 9134else
9552 cat >conftest.$ac_ext <<_ACEOF 9135 cat >conftest.$ac_ext <<_ACEOF
9553/* confdefs.h. */ 9136/* confdefs.h. */
@@ -9600,41 +9183,35 @@ case "(($ac_try" in
9600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9601 *) ac_try_echo=$ac_try;; 9184 *) ac_try_echo=$ac_try;;
9602esac 9185esac
9603eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 9186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9604$as_echo "$ac_try_echo") >&5
9605 (eval "$ac_link") 2>conftest.er1 9187 (eval "$ac_link") 2>conftest.er1
9606 ac_status=$? 9188 ac_status=$?
9607 grep -v '^ *+' conftest.er1 >conftest.err 9189 grep -v '^ *+' conftest.er1 >conftest.err
9608 rm -f conftest.er1 9190 rm -f conftest.er1
9609 cat conftest.err >&5 9191 cat conftest.err >&5
9610 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 9192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9611 (exit $ac_status); } && { 9193 (exit $ac_status); } && {
9612 test -z "$ac_c_werror_flag" || 9194 test -z "$ac_c_werror_flag" ||
9613 test ! -s conftest.err 9195 test ! -s conftest.err
9614 } && test -s conftest$ac_exeext && { 9196 } && test -s conftest$ac_exeext &&
9615 test "$cross_compiling" = yes || 9197 $as_test_x conftest$ac_exeext; then
9616 $as_test_x conftest$ac_exeext
9617 }; then
9618 eval "$as_ac_var=yes" 9198 eval "$as_ac_var=yes"
9619else 9199else
9620 $as_echo "$as_me: failed program was:" >&5 9200 echo "$as_me: failed program was:" >&5
9621sed 's/^/| /' conftest.$ac_ext >&5 9201sed 's/^/| /' conftest.$ac_ext >&5
9622 9202
9623 eval "$as_ac_var=no" 9203 eval "$as_ac_var=no"
9624fi 9204fi
9625 9205
9626rm -rf conftest.dSYM
9627rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 9206rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9628 conftest$ac_exeext conftest.$ac_ext 9207 conftest$ac_exeext conftest.$ac_ext
9629fi 9208fi
9630ac_res=`eval 'as_val=${'$as_ac_var'} 9209ac_res=`eval echo '${'$as_ac_var'}'`
9631 $as_echo "$as_val"'` 9210 { echo "$as_me:$LINENO: result: $ac_res" >&5
9632 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 9211echo "${ECHO_T}$ac_res" >&6; }
9633$as_echo "$ac_res" >&6; } 9212if test `eval echo '${'$as_ac_var'}'` = yes; then
9634if test `eval 'as_val=${'$as_ac_var'}
9635 $as_echo "$as_val"'` = yes; then
9636 cat >>confdefs.h <<_ACEOF 9213 cat >>confdefs.h <<_ACEOF
9637#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 9214#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9638_ACEOF 9215_ACEOF
9639 9216
9640fi 9217fi
@@ -9732,16 +9309,16 @@ _ACEOF
9732 MANTYPE=cat 9309 MANTYPE=cat
9733 ;; 9310 ;;
9734*-dec-osf*) 9311*-dec-osf*)
9735 { $as_echo "$as_me:$LINENO: checking for Digital Unix SIA" >&5 9312 { echo "$as_me:$LINENO: checking for Digital Unix SIA" >&5
9736$as_echo_n "checking for Digital Unix SIA... " >&6; } 9313echo $ECHO_N "checking for Digital Unix SIA... $ECHO_C" >&6; }
9737 no_osfsia="" 9314 no_osfsia=""
9738 9315
9739# Check whether --with-osfsia was given. 9316# Check whether --with-osfsia was given.
9740if test "${with_osfsia+set}" = set; then 9317if test "${with_osfsia+set}" = set; then
9741 withval=$with_osfsia; 9318 withval=$with_osfsia;
9742 if test "x$withval" = "xno" ; then 9319 if test "x$withval" = "xno" ; then
9743 { $as_echo "$as_me:$LINENO: result: disabled" >&5 9320 { echo "$as_me:$LINENO: result: disabled" >&5
9744$as_echo "disabled" >&6; } 9321echo "${ECHO_T}disabled" >&6; }
9745 no_osfsia=1 9322 no_osfsia=1
9746 fi 9323 fi
9747 9324
@@ -9749,8 +9326,8 @@ fi
9749 9326
9750 if test -z "$no_osfsia" ; then 9327 if test -z "$no_osfsia" ; then
9751 if test -f /etc/sia/matrix.conf; then 9328 if test -f /etc/sia/matrix.conf; then
9752 { $as_echo "$as_me:$LINENO: result: yes" >&5 9329 { echo "$as_me:$LINENO: result: yes" >&5
9753$as_echo "yes" >&6; } 9330echo "${ECHO_T}yes" >&6; }
9754 9331
9755cat >>confdefs.h <<\_ACEOF 9332cat >>confdefs.h <<\_ACEOF
9756#define HAVE_OSF_SIA 1 9333#define HAVE_OSF_SIA 1
@@ -9768,8 +9345,8 @@ _ACEOF
9768 LIBS="$LIBS -lsecurity -ldb -lm -laud" 9345 LIBS="$LIBS -lsecurity -ldb -lm -laud"
9769 SIA_MSG="yes" 9346 SIA_MSG="yes"
9770 else 9347 else
9771 { $as_echo "$as_me:$LINENO: result: no" >&5 9348 { echo "$as_me:$LINENO: result: no" >&5
9772$as_echo "no" >&6; } 9349echo "${ECHO_T}no" >&6; }
9773 9350
9774cat >>confdefs.h <<\_ACEOF 9351cat >>confdefs.h <<\_ACEOF
9775#define LOCKED_PASSWD_SUBSTR "Nologin" 9352#define LOCKED_PASSWD_SUBSTR "Nologin"
@@ -9884,11 +9461,11 @@ _ACEOF
9884 ;; 9461 ;;
9885esac 9462esac
9886 9463
9887{ $as_echo "$as_me:$LINENO: checking compiler and flags for sanity" >&5 9464{ echo "$as_me:$LINENO: checking compiler and flags for sanity" >&5
9888$as_echo_n "checking compiler and flags for sanity... " >&6; } 9465echo $ECHO_N "checking compiler and flags for sanity... $ECHO_C" >&6; }
9889if test "$cross_compiling" = yes; then 9466if test "$cross_compiling" = yes; then
9890 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: not checking compiler sanity" >&5 9467 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking compiler sanity" >&5
9891$as_echo "$as_me: WARNING: cross compiling: not checking compiler sanity" >&2;} 9468echo "$as_me: WARNING: cross compiling: not checking compiler sanity" >&2;}
9892 9469
9893else 9470else
9894 cat >conftest.$ac_ext <<_ACEOF 9471 cat >conftest.$ac_ext <<_ACEOF
@@ -9908,49 +9485,46 @@ case "(($ac_try" in
9908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9909 *) ac_try_echo=$ac_try;; 9486 *) ac_try_echo=$ac_try;;
9910esac 9487esac
9911eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 9488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9912$as_echo "$ac_try_echo") >&5
9913 (eval "$ac_link") 2>&5 9489 (eval "$ac_link") 2>&5
9914 ac_status=$? 9490 ac_status=$?
9915 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 9491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9916 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 9492 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9917 { (case "(($ac_try" in 9493 { (case "(($ac_try" in
9918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9919 *) ac_try_echo=$ac_try;; 9495 *) ac_try_echo=$ac_try;;
9920esac 9496esac
9921eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 9497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9922$as_echo "$ac_try_echo") >&5
9923 (eval "$ac_try") 2>&5 9498 (eval "$ac_try") 2>&5
9924 ac_status=$? 9499 ac_status=$?
9925 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 9500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9926 (exit $ac_status); }; }; then 9501 (exit $ac_status); }; }; then
9927 { $as_echo "$as_me:$LINENO: result: yes" >&5 9502 { echo "$as_me:$LINENO: result: yes" >&5
9928$as_echo "yes" >&6; } 9503echo "${ECHO_T}yes" >&6; }
9929else 9504else
9930 $as_echo "$as_me: program exited with status $ac_status" >&5 9505 echo "$as_me: program exited with status $ac_status" >&5
9931$as_echo "$as_me: failed program was:" >&5 9506echo "$as_me: failed program was:" >&5
9932sed 's/^/| /' conftest.$ac_ext >&5 9507sed 's/^/| /' conftest.$ac_ext >&5
9933 9508
9934( exit $ac_status ) 9509( exit $ac_status )
9935 9510
9936 { $as_echo "$as_me:$LINENO: result: no" >&5 9511 { echo "$as_me:$LINENO: result: no" >&5
9937$as_echo "no" >&6; } 9512echo "${ECHO_T}no" >&6; }
9938 { { $as_echo "$as_me:$LINENO: error: *** compiler cannot create working executables, check config.log ***" >&5 9513 { { echo "$as_me:$LINENO: error: *** compiler cannot create working executables, check config.log ***" >&5
9939$as_echo "$as_me: error: *** compiler cannot create working executables, check config.log ***" >&2;} 9514echo "$as_me: error: *** compiler cannot create working executables, check config.log ***" >&2;}
9940 { (exit 1); exit 1; }; } 9515 { (exit 1); exit 1; }; }
9941 9516
9942fi 9517fi
9943rm -rf conftest.dSYM
9944rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 9518rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9945fi 9519fi
9946 9520
9947 9521
9948 9522
9949# Checks for libraries. 9523# Checks for libraries.
9950{ $as_echo "$as_me:$LINENO: checking for yp_match" >&5 9524{ echo "$as_me:$LINENO: checking for yp_match" >&5
9951$as_echo_n "checking for yp_match... " >&6; } 9525echo $ECHO_N "checking for yp_match... $ECHO_C" >&6; }
9952if test "${ac_cv_func_yp_match+set}" = set; then 9526if test "${ac_cv_func_yp_match+set}" = set; then
9953 $as_echo_n "(cached) " >&6 9527 echo $ECHO_N "(cached) $ECHO_C" >&6
9954else 9528else
9955 cat >conftest.$ac_ext <<_ACEOF 9529 cat >conftest.$ac_ext <<_ACEOF
9956/* confdefs.h. */ 9530/* confdefs.h. */
@@ -10003,43 +9577,39 @@ case "(($ac_try" in
10003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10004 *) ac_try_echo=$ac_try;; 9578 *) ac_try_echo=$ac_try;;
10005esac 9579esac
10006eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 9580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10007$as_echo "$ac_try_echo") >&5
10008 (eval "$ac_link") 2>conftest.er1 9581 (eval "$ac_link") 2>conftest.er1
10009 ac_status=$? 9582 ac_status=$?
10010 grep -v '^ *+' conftest.er1 >conftest.err 9583 grep -v '^ *+' conftest.er1 >conftest.err
10011 rm -f conftest.er1 9584 rm -f conftest.er1
10012 cat conftest.err >&5 9585 cat conftest.err >&5
10013 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 9586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10014 (exit $ac_status); } && { 9587 (exit $ac_status); } && {
10015 test -z "$ac_c_werror_flag" || 9588 test -z "$ac_c_werror_flag" ||
10016 test ! -s conftest.err 9589 test ! -s conftest.err
10017 } && test -s conftest$ac_exeext && { 9590 } && test -s conftest$ac_exeext &&
10018 test "$cross_compiling" = yes || 9591 $as_test_x conftest$ac_exeext; then
10019 $as_test_x conftest$ac_exeext
10020 }; then
10021 ac_cv_func_yp_match=yes 9592 ac_cv_func_yp_match=yes
10022else 9593else
10023 $as_echo "$as_me: failed program was:" >&5 9594 echo "$as_me: failed program was:" >&5
10024sed 's/^/| /' conftest.$ac_ext >&5 9595sed 's/^/| /' conftest.$ac_ext >&5
10025 9596
10026 ac_cv_func_yp_match=no 9597 ac_cv_func_yp_match=no
10027fi 9598fi
10028 9599
10029rm -rf conftest.dSYM
10030rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 9600rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10031 conftest$ac_exeext conftest.$ac_ext 9601 conftest$ac_exeext conftest.$ac_ext
10032fi 9602fi
10033{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_yp_match" >&5 9603{ echo "$as_me:$LINENO: result: $ac_cv_func_yp_match" >&5
10034$as_echo "$ac_cv_func_yp_match" >&6; } 9604echo "${ECHO_T}$ac_cv_func_yp_match" >&6; }
10035if test $ac_cv_func_yp_match = yes; then 9605if test $ac_cv_func_yp_match = yes; then
10036 : 9606 :
10037else 9607else
10038 9608
10039{ $as_echo "$as_me:$LINENO: checking for yp_match in -lnsl" >&5 9609{ echo "$as_me:$LINENO: checking for yp_match in -lnsl" >&5
10040$as_echo_n "checking for yp_match in -lnsl... " >&6; } 9610echo $ECHO_N "checking for yp_match in -lnsl... $ECHO_C" >&6; }
10041if test "${ac_cv_lib_nsl_yp_match+set}" = set; then 9611if test "${ac_cv_lib_nsl_yp_match+set}" = set; then
10042 $as_echo_n "(cached) " >&6 9612 echo $ECHO_N "(cached) $ECHO_C" >&6
10043else 9613else
10044 ac_check_lib_save_LIBS=$LIBS 9614 ac_check_lib_save_LIBS=$LIBS
10045LIBS="-lnsl $LIBS" 9615LIBS="-lnsl $LIBS"
@@ -10071,36 +9641,32 @@ case "(($ac_try" in
10071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10072 *) ac_try_echo=$ac_try;; 9642 *) ac_try_echo=$ac_try;;
10073esac 9643esac
10074eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 9644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10075$as_echo "$ac_try_echo") >&5
10076 (eval "$ac_link") 2>conftest.er1 9645 (eval "$ac_link") 2>conftest.er1
10077 ac_status=$? 9646 ac_status=$?
10078 grep -v '^ *+' conftest.er1 >conftest.err 9647 grep -v '^ *+' conftest.er1 >conftest.err
10079 rm -f conftest.er1 9648 rm -f conftest.er1
10080 cat conftest.err >&5 9649 cat conftest.err >&5
10081 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 9650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10082 (exit $ac_status); } && { 9651 (exit $ac_status); } && {
10083 test -z "$ac_c_werror_flag" || 9652 test -z "$ac_c_werror_flag" ||
10084 test ! -s conftest.err 9653 test ! -s conftest.err
10085 } && test -s conftest$ac_exeext && { 9654 } && test -s conftest$ac_exeext &&
10086 test "$cross_compiling" = yes || 9655 $as_test_x conftest$ac_exeext; then
10087 $as_test_x conftest$ac_exeext
10088 }; then
10089 ac_cv_lib_nsl_yp_match=yes 9656 ac_cv_lib_nsl_yp_match=yes
10090else 9657else
10091 $as_echo "$as_me: failed program was:" >&5 9658 echo "$as_me: failed program was:" >&5
10092sed 's/^/| /' conftest.$ac_ext >&5 9659sed 's/^/| /' conftest.$ac_ext >&5
10093 9660
10094 ac_cv_lib_nsl_yp_match=no 9661 ac_cv_lib_nsl_yp_match=no
10095fi 9662fi
10096 9663
10097rm -rf conftest.dSYM
10098rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 9664rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10099 conftest$ac_exeext conftest.$ac_ext 9665 conftest$ac_exeext conftest.$ac_ext
10100LIBS=$ac_check_lib_save_LIBS 9666LIBS=$ac_check_lib_save_LIBS
10101fi 9667fi
10102{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_yp_match" >&5 9668{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_yp_match" >&5
10103$as_echo "$ac_cv_lib_nsl_yp_match" >&6; } 9669echo "${ECHO_T}$ac_cv_lib_nsl_yp_match" >&6; }
10104if test $ac_cv_lib_nsl_yp_match = yes; then 9670if test $ac_cv_lib_nsl_yp_match = yes; then
10105 cat >>confdefs.h <<_ACEOF 9671 cat >>confdefs.h <<_ACEOF
10106#define HAVE_LIBNSL 1 9672#define HAVE_LIBNSL 1
@@ -10112,10 +9678,10 @@ fi
10112 9678
10113fi 9679fi
10114 9680
10115{ $as_echo "$as_me:$LINENO: checking for setsockopt" >&5 9681{ echo "$as_me:$LINENO: checking for setsockopt" >&5
10116$as_echo_n "checking for setsockopt... " >&6; } 9682echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; }
10117if test "${ac_cv_func_setsockopt+set}" = set; then 9683if test "${ac_cv_func_setsockopt+set}" = set; then
10118 $as_echo_n "(cached) " >&6 9684 echo $ECHO_N "(cached) $ECHO_C" >&6
10119else 9685else
10120 cat >conftest.$ac_ext <<_ACEOF 9686 cat >conftest.$ac_ext <<_ACEOF
10121/* confdefs.h. */ 9687/* confdefs.h. */
@@ -10168,43 +9734,39 @@ case "(($ac_try" in
10168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10169 *) ac_try_echo=$ac_try;; 9735 *) ac_try_echo=$ac_try;;
10170esac 9736esac
10171eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 9737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10172$as_echo "$ac_try_echo") >&5
10173 (eval "$ac_link") 2>conftest.er1 9738 (eval "$ac_link") 2>conftest.er1
10174 ac_status=$? 9739 ac_status=$?
10175 grep -v '^ *+' conftest.er1 >conftest.err 9740 grep -v '^ *+' conftest.er1 >conftest.err
10176 rm -f conftest.er1 9741 rm -f conftest.er1
10177 cat conftest.err >&5 9742 cat conftest.err >&5
10178 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 9743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10179 (exit $ac_status); } && { 9744 (exit $ac_status); } && {
10180 test -z "$ac_c_werror_flag" || 9745 test -z "$ac_c_werror_flag" ||
10181 test ! -s conftest.err 9746 test ! -s conftest.err
10182 } && test -s conftest$ac_exeext && { 9747 } && test -s conftest$ac_exeext &&
10183 test "$cross_compiling" = yes || 9748 $as_test_x conftest$ac_exeext; then
10184 $as_test_x conftest$ac_exeext
10185 }; then
10186 ac_cv_func_setsockopt=yes 9749 ac_cv_func_setsockopt=yes
10187else 9750else
10188 $as_echo "$as_me: failed program was:" >&5 9751 echo "$as_me: failed program was:" >&5
10189sed 's/^/| /' conftest.$ac_ext >&5 9752sed 's/^/| /' conftest.$ac_ext >&5
10190 9753
10191 ac_cv_func_setsockopt=no 9754 ac_cv_func_setsockopt=no
10192fi 9755fi
10193 9756
10194rm -rf conftest.dSYM
10195rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 9757rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10196 conftest$ac_exeext conftest.$ac_ext 9758 conftest$ac_exeext conftest.$ac_ext
10197fi 9759fi
10198{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 9760{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
10199$as_echo "$ac_cv_func_setsockopt" >&6; } 9761echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; }
10200if test $ac_cv_func_setsockopt = yes; then 9762if test $ac_cv_func_setsockopt = yes; then
10201 : 9763 :
10202else 9764else
10203 9765
10204{ $as_echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 9766{ echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
10205$as_echo_n "checking for setsockopt in -lsocket... " >&6; } 9767echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; }
10206if test "${ac_cv_lib_socket_setsockopt+set}" = set; then 9768if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
10207 $as_echo_n "(cached) " >&6 9769 echo $ECHO_N "(cached) $ECHO_C" >&6
10208else 9770else
10209 ac_check_lib_save_LIBS=$LIBS 9771 ac_check_lib_save_LIBS=$LIBS
10210LIBS="-lsocket $LIBS" 9772LIBS="-lsocket $LIBS"
@@ -10236,36 +9798,32 @@ case "(($ac_try" in
10236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10237 *) ac_try_echo=$ac_try;; 9799 *) ac_try_echo=$ac_try;;
10238esac 9800esac
10239eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 9801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10240$as_echo "$ac_try_echo") >&5
10241 (eval "$ac_link") 2>conftest.er1 9802 (eval "$ac_link") 2>conftest.er1
10242 ac_status=$? 9803 ac_status=$?
10243 grep -v '^ *+' conftest.er1 >conftest.err 9804 grep -v '^ *+' conftest.er1 >conftest.err
10244 rm -f conftest.er1 9805 rm -f conftest.er1
10245 cat conftest.err >&5 9806 cat conftest.err >&5
10246 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 9807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10247 (exit $ac_status); } && { 9808 (exit $ac_status); } && {
10248 test -z "$ac_c_werror_flag" || 9809 test -z "$ac_c_werror_flag" ||
10249 test ! -s conftest.err 9810 test ! -s conftest.err
10250 } && test -s conftest$ac_exeext && { 9811 } && test -s conftest$ac_exeext &&
10251 test "$cross_compiling" = yes || 9812 $as_test_x conftest$ac_exeext; then
10252 $as_test_x conftest$ac_exeext
10253 }; then
10254 ac_cv_lib_socket_setsockopt=yes 9813 ac_cv_lib_socket_setsockopt=yes
10255else 9814else
10256 $as_echo "$as_me: failed program was:" >&5 9815 echo "$as_me: failed program was:" >&5
10257sed 's/^/| /' conftest.$ac_ext >&5 9816sed 's/^/| /' conftest.$ac_ext >&5
10258 9817
10259 ac_cv_lib_socket_setsockopt=no 9818 ac_cv_lib_socket_setsockopt=no
10260fi 9819fi
10261 9820
10262rm -rf conftest.dSYM
10263rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 9821rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10264 conftest$ac_exeext conftest.$ac_ext 9822 conftest$ac_exeext conftest.$ac_ext
10265LIBS=$ac_check_lib_save_LIBS 9823LIBS=$ac_check_lib_save_LIBS
10266fi 9824fi
10267{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 9825{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
10268$as_echo "$ac_cv_lib_socket_setsockopt" >&6; } 9826echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; }
10269if test $ac_cv_lib_socket_setsockopt = yes; then 9827if test $ac_cv_lib_socket_setsockopt = yes; then
10270 cat >>confdefs.h <<_ACEOF 9828 cat >>confdefs.h <<_ACEOF
10271#define HAVE_LIBSOCKET 1 9829#define HAVE_LIBSOCKET 1
@@ -10281,11 +9839,11 @@ fi
10281 9839
10282for ac_func in dirname 9840for ac_func in dirname
10283do 9841do
10284as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 9842as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10285{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 9843{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10286$as_echo_n "checking for $ac_func... " >&6; } 9844echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10287if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 9845if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10288 $as_echo_n "(cached) " >&6 9846 echo $ECHO_N "(cached) $ECHO_C" >&6
10289else 9847else
10290 cat >conftest.$ac_ext <<_ACEOF 9848 cat >conftest.$ac_ext <<_ACEOF
10291/* confdefs.h. */ 9849/* confdefs.h. */
@@ -10338,60 +9896,53 @@ case "(($ac_try" in
10338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10339 *) ac_try_echo=$ac_try;; 9897 *) ac_try_echo=$ac_try;;
10340esac 9898esac
10341eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 9899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10342$as_echo "$ac_try_echo") >&5
10343 (eval "$ac_link") 2>conftest.er1 9900 (eval "$ac_link") 2>conftest.er1
10344 ac_status=$? 9901 ac_status=$?
10345 grep -v '^ *+' conftest.er1 >conftest.err 9902 grep -v '^ *+' conftest.er1 >conftest.err
10346 rm -f conftest.er1 9903 rm -f conftest.er1
10347 cat conftest.err >&5 9904 cat conftest.err >&5
10348 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 9905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10349 (exit $ac_status); } && { 9906 (exit $ac_status); } && {
10350 test -z "$ac_c_werror_flag" || 9907 test -z "$ac_c_werror_flag" ||
10351 test ! -s conftest.err 9908 test ! -s conftest.err
10352 } && test -s conftest$ac_exeext && { 9909 } && test -s conftest$ac_exeext &&
10353 test "$cross_compiling" = yes || 9910 $as_test_x conftest$ac_exeext; then
10354 $as_test_x conftest$ac_exeext
10355 }; then
10356 eval "$as_ac_var=yes" 9911 eval "$as_ac_var=yes"
10357else 9912else
10358 $as_echo "$as_me: failed program was:" >&5 9913 echo "$as_me: failed program was:" >&5
10359sed 's/^/| /' conftest.$ac_ext >&5 9914sed 's/^/| /' conftest.$ac_ext >&5
10360 9915
10361 eval "$as_ac_var=no" 9916 eval "$as_ac_var=no"
10362fi 9917fi
10363 9918
10364rm -rf conftest.dSYM
10365rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 9919rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10366 conftest$ac_exeext conftest.$ac_ext 9920 conftest$ac_exeext conftest.$ac_ext
10367fi 9921fi
10368ac_res=`eval 'as_val=${'$as_ac_var'} 9922ac_res=`eval echo '${'$as_ac_var'}'`
10369 $as_echo "$as_val"'` 9923 { echo "$as_me:$LINENO: result: $ac_res" >&5
10370 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 9924echo "${ECHO_T}$ac_res" >&6; }
10371$as_echo "$ac_res" >&6; } 9925if test `eval echo '${'$as_ac_var'}'` = yes; then
10372if test `eval 'as_val=${'$as_ac_var'}
10373 $as_echo "$as_val"'` = yes; then
10374 cat >>confdefs.h <<_ACEOF 9926 cat >>confdefs.h <<_ACEOF
10375#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 9927#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10376_ACEOF 9928_ACEOF
10377 9929
10378for ac_header in libgen.h 9930for ac_header in libgen.h
10379do 9931do
10380as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 9932as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10381if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 9933if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10382 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 9934 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10383$as_echo_n "checking for $ac_header... " >&6; } 9935echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10384if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 9936if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10385 $as_echo_n "(cached) " >&6 9937 echo $ECHO_N "(cached) $ECHO_C" >&6
10386fi 9938fi
10387ac_res=`eval 'as_val=${'$as_ac_Header'} 9939ac_res=`eval echo '${'$as_ac_Header'}'`
10388 $as_echo "$as_val"'` 9940 { echo "$as_me:$LINENO: result: $ac_res" >&5
10389 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 9941echo "${ECHO_T}$ac_res" >&6; }
10390$as_echo "$ac_res" >&6; }
10391else 9942else
10392 # Is the header compilable? 9943 # Is the header compilable?
10393{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 9944{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
10394$as_echo_n "checking $ac_header usability... " >&6; } 9945echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10395cat >conftest.$ac_ext <<_ACEOF 9946cat >conftest.$ac_ext <<_ACEOF
10396/* confdefs.h. */ 9947/* confdefs.h. */
10397_ACEOF 9948_ACEOF
@@ -10407,33 +9958,32 @@ case "(($ac_try" in
10407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10408 *) ac_try_echo=$ac_try;; 9959 *) ac_try_echo=$ac_try;;
10409esac 9960esac
10410eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 9961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10411$as_echo "$ac_try_echo") >&5
10412 (eval "$ac_compile") 2>conftest.er1 9962 (eval "$ac_compile") 2>conftest.er1
10413 ac_status=$? 9963 ac_status=$?
10414 grep -v '^ *+' conftest.er1 >conftest.err 9964 grep -v '^ *+' conftest.er1 >conftest.err
10415 rm -f conftest.er1 9965 rm -f conftest.er1
10416 cat conftest.err >&5 9966 cat conftest.err >&5
10417 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 9967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10418 (exit $ac_status); } && { 9968 (exit $ac_status); } && {
10419 test -z "$ac_c_werror_flag" || 9969 test -z "$ac_c_werror_flag" ||
10420 test ! -s conftest.err 9970 test ! -s conftest.err
10421 } && test -s conftest.$ac_objext; then 9971 } && test -s conftest.$ac_objext; then
10422 ac_header_compiler=yes 9972 ac_header_compiler=yes
10423else 9973else
10424 $as_echo "$as_me: failed program was:" >&5 9974 echo "$as_me: failed program was:" >&5
10425sed 's/^/| /' conftest.$ac_ext >&5 9975sed 's/^/| /' conftest.$ac_ext >&5
10426 9976
10427 ac_header_compiler=no 9977 ac_header_compiler=no
10428fi 9978fi
10429 9979
10430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10431{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 9981{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10432$as_echo "$ac_header_compiler" >&6; } 9982echo "${ECHO_T}$ac_header_compiler" >&6; }
10433 9983
10434# Is the header present? 9984# Is the header present?
10435{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 9985{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
10436$as_echo_n "checking $ac_header presence... " >&6; } 9986echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10437cat >conftest.$ac_ext <<_ACEOF 9987cat >conftest.$ac_ext <<_ACEOF
10438/* confdefs.h. */ 9988/* confdefs.h. */
10439_ACEOF 9989_ACEOF
@@ -10447,52 +9997,51 @@ case "(($ac_try" in
10447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10448 *) ac_try_echo=$ac_try;; 9998 *) ac_try_echo=$ac_try;;
10449esac 9999esac
10450eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10451$as_echo "$ac_try_echo") >&5
10452 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 10001 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10453 ac_status=$? 10002 ac_status=$?
10454 grep -v '^ *+' conftest.er1 >conftest.err 10003 grep -v '^ *+' conftest.er1 >conftest.err
10455 rm -f conftest.er1 10004 rm -f conftest.er1
10456 cat conftest.err >&5 10005 cat conftest.err >&5
10457 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10458 (exit $ac_status); } >/dev/null && { 10007 (exit $ac_status); } >/dev/null && {
10459 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 10008 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10460 test ! -s conftest.err 10009 test ! -s conftest.err
10461 }; then 10010 }; then
10462 ac_header_preproc=yes 10011 ac_header_preproc=yes
10463else 10012else
10464 $as_echo "$as_me: failed program was:" >&5 10013 echo "$as_me: failed program was:" >&5
10465sed 's/^/| /' conftest.$ac_ext >&5 10014sed 's/^/| /' conftest.$ac_ext >&5
10466 10015
10467 ac_header_preproc=no 10016 ac_header_preproc=no
10468fi 10017fi
10469 10018
10470rm -f conftest.err conftest.$ac_ext 10019rm -f conftest.err conftest.$ac_ext
10471{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 10020{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10472$as_echo "$ac_header_preproc" >&6; } 10021echo "${ECHO_T}$ac_header_preproc" >&6; }
10473 10022
10474# So? What about this header? 10023# So? What about this header?
10475case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 10024case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10476 yes:no: ) 10025 yes:no: )
10477 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 10026 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10478$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} 10027echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10479 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 10028 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10480$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} 10029echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10481 ac_header_preproc=yes 10030 ac_header_preproc=yes
10482 ;; 10031 ;;
10483 no:yes:* ) 10032 no:yes:* )
10484 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 10033 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10485$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} 10034echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10486 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 10035 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10487$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} 10036echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10488 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 10037 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10489$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 10038echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10490 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 10039 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10491$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} 10040echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
10492 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 10041 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10493$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 10042echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10494 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 10043 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10495$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 10044echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10496 ( cat <<\_ASBOX 10045 ( cat <<\_ASBOX
10497## ------------------------------------------- ## 10046## ------------------------------------------- ##
10498## Report this to openssh-unix-dev@mindrot.org ## 10047## Report this to openssh-unix-dev@mindrot.org ##
@@ -10501,23 +10050,21 @@ _ASBOX
10501 ) | sed "s/^/$as_me: WARNING: /" >&2 10050 ) | sed "s/^/$as_me: WARNING: /" >&2
10502 ;; 10051 ;;
10503esac 10052esac
10504{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 10053{ echo "$as_me:$LINENO: checking for $ac_header" >&5
10505$as_echo_n "checking for $ac_header... " >&6; } 10054echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10506if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 10055if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10507 $as_echo_n "(cached) " >&6 10056 echo $ECHO_N "(cached) $ECHO_C" >&6
10508else 10057else
10509 eval "$as_ac_Header=\$ac_header_preproc" 10058 eval "$as_ac_Header=\$ac_header_preproc"
10510fi 10059fi
10511ac_res=`eval 'as_val=${'$as_ac_Header'} 10060ac_res=`eval echo '${'$as_ac_Header'}'`
10512 $as_echo "$as_val"'` 10061 { echo "$as_me:$LINENO: result: $ac_res" >&5
10513 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 10062echo "${ECHO_T}$ac_res" >&6; }
10514$as_echo "$ac_res" >&6; }
10515 10063
10516fi 10064fi
10517if test `eval 'as_val=${'$as_ac_Header'} 10065if test `eval echo '${'$as_ac_Header'}'` = yes; then
10518 $as_echo "$as_val"'` = yes; then
10519 cat >>confdefs.h <<_ACEOF 10066 cat >>confdefs.h <<_ACEOF
10520#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 10067#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10521_ACEOF 10068_ACEOF
10522 10069
10523fi 10070fi
@@ -10526,10 +10073,10 @@ done
10526 10073
10527else 10074else
10528 10075
10529 { $as_echo "$as_me:$LINENO: checking for dirname in -lgen" >&5 10076 { echo "$as_me:$LINENO: checking for dirname in -lgen" >&5
10530$as_echo_n "checking for dirname in -lgen... " >&6; } 10077echo $ECHO_N "checking for dirname in -lgen... $ECHO_C" >&6; }
10531if test "${ac_cv_lib_gen_dirname+set}" = set; then 10078if test "${ac_cv_lib_gen_dirname+set}" = set; then
10532 $as_echo_n "(cached) " >&6 10079 echo $ECHO_N "(cached) $ECHO_C" >&6
10533else 10080else
10534 ac_check_lib_save_LIBS=$LIBS 10081 ac_check_lib_save_LIBS=$LIBS
10535LIBS="-lgen $LIBS" 10082LIBS="-lgen $LIBS"
@@ -10561,42 +10108,38 @@ case "(($ac_try" in
10561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10562 *) ac_try_echo=$ac_try;; 10109 *) ac_try_echo=$ac_try;;
10563esac 10110esac
10564eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10565$as_echo "$ac_try_echo") >&5
10566 (eval "$ac_link") 2>conftest.er1 10112 (eval "$ac_link") 2>conftest.er1
10567 ac_status=$? 10113 ac_status=$?
10568 grep -v '^ *+' conftest.er1 >conftest.err 10114 grep -v '^ *+' conftest.er1 >conftest.err
10569 rm -f conftest.er1 10115 rm -f conftest.er1
10570 cat conftest.err >&5 10116 cat conftest.err >&5
10571 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10572 (exit $ac_status); } && { 10118 (exit $ac_status); } && {
10573 test -z "$ac_c_werror_flag" || 10119 test -z "$ac_c_werror_flag" ||
10574 test ! -s conftest.err 10120 test ! -s conftest.err
10575 } && test -s conftest$ac_exeext && { 10121 } && test -s conftest$ac_exeext &&
10576 test "$cross_compiling" = yes || 10122 $as_test_x conftest$ac_exeext; then
10577 $as_test_x conftest$ac_exeext
10578 }; then
10579 ac_cv_lib_gen_dirname=yes 10123 ac_cv_lib_gen_dirname=yes
10580else 10124else
10581 $as_echo "$as_me: failed program was:" >&5 10125 echo "$as_me: failed program was:" >&5
10582sed 's/^/| /' conftest.$ac_ext >&5 10126sed 's/^/| /' conftest.$ac_ext >&5
10583 10127
10584 ac_cv_lib_gen_dirname=no 10128 ac_cv_lib_gen_dirname=no
10585fi 10129fi
10586 10130
10587rm -rf conftest.dSYM
10588rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10131rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10589 conftest$ac_exeext conftest.$ac_ext 10132 conftest$ac_exeext conftest.$ac_ext
10590LIBS=$ac_check_lib_save_LIBS 10133LIBS=$ac_check_lib_save_LIBS
10591fi 10134fi
10592{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gen_dirname" >&5 10135{ echo "$as_me:$LINENO: result: $ac_cv_lib_gen_dirname" >&5
10593$as_echo "$ac_cv_lib_gen_dirname" >&6; } 10136echo "${ECHO_T}$ac_cv_lib_gen_dirname" >&6; }
10594if test $ac_cv_lib_gen_dirname = yes; then 10137if test $ac_cv_lib_gen_dirname = yes; then
10595 10138
10596 { $as_echo "$as_me:$LINENO: checking for broken dirname" >&5 10139 { echo "$as_me:$LINENO: checking for broken dirname" >&5
10597$as_echo_n "checking for broken dirname... " >&6; } 10140echo $ECHO_N "checking for broken dirname... $ECHO_C" >&6; }
10598if test "${ac_cv_have_broken_dirname+set}" = set; then 10141if test "${ac_cv_have_broken_dirname+set}" = set; then
10599 $as_echo_n "(cached) " >&6 10142 echo $ECHO_N "(cached) $ECHO_C" >&6
10600else 10143else
10601 10144
10602 save_LIBS="$LIBS" 10145 save_LIBS="$LIBS"
@@ -10633,32 +10176,29 @@ case "(($ac_try" in
10633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10634 *) ac_try_echo=$ac_try;; 10177 *) ac_try_echo=$ac_try;;
10635esac 10178esac
10636eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10637$as_echo "$ac_try_echo") >&5
10638 (eval "$ac_link") 2>&5 10180 (eval "$ac_link") 2>&5
10639 ac_status=$? 10181 ac_status=$?
10640 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10641 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 10183 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10642 { (case "(($ac_try" in 10184 { (case "(($ac_try" in
10643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10644 *) ac_try_echo=$ac_try;; 10186 *) ac_try_echo=$ac_try;;
10645esac 10187esac
10646eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10647$as_echo "$ac_try_echo") >&5
10648 (eval "$ac_try") 2>&5 10189 (eval "$ac_try") 2>&5
10649 ac_status=$? 10190 ac_status=$?
10650 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10651 (exit $ac_status); }; }; then 10192 (exit $ac_status); }; }; then
10652 ac_cv_have_broken_dirname="no" 10193 ac_cv_have_broken_dirname="no"
10653else 10194else
10654 $as_echo "$as_me: program exited with status $ac_status" >&5 10195 echo "$as_me: program exited with status $ac_status" >&5
10655$as_echo "$as_me: failed program was:" >&5 10196echo "$as_me: failed program was:" >&5
10656sed 's/^/| /' conftest.$ac_ext >&5 10197sed 's/^/| /' conftest.$ac_ext >&5
10657 10198
10658( exit $ac_status ) 10199( exit $ac_status )
10659 ac_cv_have_broken_dirname="yes" 10200 ac_cv_have_broken_dirname="yes"
10660fi 10201fi
10661rm -rf conftest.dSYM
10662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 10202rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10663fi 10203fi
10664 10204
@@ -10666,8 +10206,8 @@ fi
10666 LIBS="$save_LIBS" 10206 LIBS="$save_LIBS"
10667 10207
10668fi 10208fi
10669{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_broken_dirname" >&5 10209{ echo "$as_me:$LINENO: result: $ac_cv_have_broken_dirname" >&5
10670$as_echo "$ac_cv_have_broken_dirname" >&6; } 10210echo "${ECHO_T}$ac_cv_have_broken_dirname" >&6; }
10671 if test "x$ac_cv_have_broken_dirname" = "xno" ; then 10211 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
10672 LIBS="$LIBS -lgen" 10212 LIBS="$LIBS -lgen"
10673 cat >>confdefs.h <<\_ACEOF 10213 cat >>confdefs.h <<\_ACEOF
@@ -10677,21 +10217,20 @@ _ACEOF
10677 10217
10678for ac_header in libgen.h 10218for ac_header in libgen.h
10679do 10219do
10680as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 10220as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10681if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 10221if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10682 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 10222 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10683$as_echo_n "checking for $ac_header... " >&6; } 10223echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10684if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 10224if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10685 $as_echo_n "(cached) " >&6 10225 echo $ECHO_N "(cached) $ECHO_C" >&6
10686fi 10226fi
10687ac_res=`eval 'as_val=${'$as_ac_Header'} 10227ac_res=`eval echo '${'$as_ac_Header'}'`
10688 $as_echo "$as_val"'` 10228 { echo "$as_me:$LINENO: result: $ac_res" >&5
10689 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 10229echo "${ECHO_T}$ac_res" >&6; }
10690$as_echo "$ac_res" >&6; }
10691else 10230else
10692 # Is the header compilable? 10231 # Is the header compilable?
10693{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 10232{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
10694$as_echo_n "checking $ac_header usability... " >&6; } 10233echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10695cat >conftest.$ac_ext <<_ACEOF 10234cat >conftest.$ac_ext <<_ACEOF
10696/* confdefs.h. */ 10235/* confdefs.h. */
10697_ACEOF 10236_ACEOF
@@ -10707,33 +10246,32 @@ case "(($ac_try" in
10707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10708 *) ac_try_echo=$ac_try;; 10247 *) ac_try_echo=$ac_try;;
10709esac 10248esac
10710eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10711$as_echo "$ac_try_echo") >&5
10712 (eval "$ac_compile") 2>conftest.er1 10250 (eval "$ac_compile") 2>conftest.er1
10713 ac_status=$? 10251 ac_status=$?
10714 grep -v '^ *+' conftest.er1 >conftest.err 10252 grep -v '^ *+' conftest.er1 >conftest.err
10715 rm -f conftest.er1 10253 rm -f conftest.er1
10716 cat conftest.err >&5 10254 cat conftest.err >&5
10717 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10718 (exit $ac_status); } && { 10256 (exit $ac_status); } && {
10719 test -z "$ac_c_werror_flag" || 10257 test -z "$ac_c_werror_flag" ||
10720 test ! -s conftest.err 10258 test ! -s conftest.err
10721 } && test -s conftest.$ac_objext; then 10259 } && test -s conftest.$ac_objext; then
10722 ac_header_compiler=yes 10260 ac_header_compiler=yes
10723else 10261else
10724 $as_echo "$as_me: failed program was:" >&5 10262 echo "$as_me: failed program was:" >&5
10725sed 's/^/| /' conftest.$ac_ext >&5 10263sed 's/^/| /' conftest.$ac_ext >&5
10726 10264
10727 ac_header_compiler=no 10265 ac_header_compiler=no
10728fi 10266fi
10729 10267
10730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10731{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 10269{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10732$as_echo "$ac_header_compiler" >&6; } 10270echo "${ECHO_T}$ac_header_compiler" >&6; }
10733 10271
10734# Is the header present? 10272# Is the header present?
10735{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 10273{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
10736$as_echo_n "checking $ac_header presence... " >&6; } 10274echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10737cat >conftest.$ac_ext <<_ACEOF 10275cat >conftest.$ac_ext <<_ACEOF
10738/* confdefs.h. */ 10276/* confdefs.h. */
10739_ACEOF 10277_ACEOF
@@ -10747,52 +10285,51 @@ case "(($ac_try" in
10747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10748 *) ac_try_echo=$ac_try;; 10286 *) ac_try_echo=$ac_try;;
10749esac 10287esac
10750eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10751$as_echo "$ac_try_echo") >&5
10752 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 10289 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10753 ac_status=$? 10290 ac_status=$?
10754 grep -v '^ *+' conftest.er1 >conftest.err 10291 grep -v '^ *+' conftest.er1 >conftest.err
10755 rm -f conftest.er1 10292 rm -f conftest.er1
10756 cat conftest.err >&5 10293 cat conftest.err >&5
10757 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10758 (exit $ac_status); } >/dev/null && { 10295 (exit $ac_status); } >/dev/null && {
10759 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 10296 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10760 test ! -s conftest.err 10297 test ! -s conftest.err
10761 }; then 10298 }; then
10762 ac_header_preproc=yes 10299 ac_header_preproc=yes
10763else 10300else
10764 $as_echo "$as_me: failed program was:" >&5 10301 echo "$as_me: failed program was:" >&5
10765sed 's/^/| /' conftest.$ac_ext >&5 10302sed 's/^/| /' conftest.$ac_ext >&5
10766 10303
10767 ac_header_preproc=no 10304 ac_header_preproc=no
10768fi 10305fi
10769 10306
10770rm -f conftest.err conftest.$ac_ext 10307rm -f conftest.err conftest.$ac_ext
10771{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 10308{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10772$as_echo "$ac_header_preproc" >&6; } 10309echo "${ECHO_T}$ac_header_preproc" >&6; }
10773 10310
10774# So? What about this header? 10311# So? What about this header?
10775case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 10312case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10776 yes:no: ) 10313 yes:no: )
10777 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 10314 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10778$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} 10315echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10779 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 10316 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10780$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} 10317echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10781 ac_header_preproc=yes 10318 ac_header_preproc=yes
10782 ;; 10319 ;;
10783 no:yes:* ) 10320 no:yes:* )
10784 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 10321 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10785$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} 10322echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10786 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 10323 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10787$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} 10324echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10788 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 10325 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10789$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 10326echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10790 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 10327 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10791$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} 10328echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
10792 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 10329 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10793$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 10330echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10794 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 10331 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10795$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 10332echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10796 ( cat <<\_ASBOX 10333 ( cat <<\_ASBOX
10797## ------------------------------------------- ## 10334## ------------------------------------------- ##
10798## Report this to openssh-unix-dev@mindrot.org ## 10335## Report this to openssh-unix-dev@mindrot.org ##
@@ -10801,23 +10338,21 @@ _ASBOX
10801 ) | sed "s/^/$as_me: WARNING: /" >&2 10338 ) | sed "s/^/$as_me: WARNING: /" >&2
10802 ;; 10339 ;;
10803esac 10340esac
10804{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 10341{ echo "$as_me:$LINENO: checking for $ac_header" >&5
10805$as_echo_n "checking for $ac_header... " >&6; } 10342echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10806if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 10343if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10807 $as_echo_n "(cached) " >&6 10344 echo $ECHO_N "(cached) $ECHO_C" >&6
10808else 10345else
10809 eval "$as_ac_Header=\$ac_header_preproc" 10346 eval "$as_ac_Header=\$ac_header_preproc"
10810fi 10347fi
10811ac_res=`eval 'as_val=${'$as_ac_Header'} 10348ac_res=`eval echo '${'$as_ac_Header'}'`
10812 $as_echo "$as_val"'` 10349 { echo "$as_me:$LINENO: result: $ac_res" >&5
10813 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 10350echo "${ECHO_T}$ac_res" >&6; }
10814$as_echo "$ac_res" >&6; }
10815 10351
10816fi 10352fi
10817if test `eval 'as_val=${'$as_ac_Header'} 10353if test `eval echo '${'$as_ac_Header'}'` = yes; then
10818 $as_echo "$as_val"'` = yes; then
10819 cat >>confdefs.h <<_ACEOF 10354 cat >>confdefs.h <<_ACEOF
10820#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 10355#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10821_ACEOF 10356_ACEOF
10822 10357
10823fi 10358fi
@@ -10833,10 +10368,10 @@ fi
10833done 10368done
10834 10369
10835 10370
10836{ $as_echo "$as_me:$LINENO: checking for getspnam" >&5 10371{ echo "$as_me:$LINENO: checking for getspnam" >&5
10837$as_echo_n "checking for getspnam... " >&6; } 10372echo $ECHO_N "checking for getspnam... $ECHO_C" >&6; }
10838if test "${ac_cv_func_getspnam+set}" = set; then 10373if test "${ac_cv_func_getspnam+set}" = set; then
10839 $as_echo_n "(cached) " >&6 10374 echo $ECHO_N "(cached) $ECHO_C" >&6
10840else 10375else
10841 cat >conftest.$ac_ext <<_ACEOF 10376 cat >conftest.$ac_ext <<_ACEOF
10842/* confdefs.h. */ 10377/* confdefs.h. */
@@ -10889,42 +10424,38 @@ case "(($ac_try" in
10889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10890 *) ac_try_echo=$ac_try;; 10425 *) ac_try_echo=$ac_try;;
10891esac 10426esac
10892eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10893$as_echo "$ac_try_echo") >&5
10894 (eval "$ac_link") 2>conftest.er1 10428 (eval "$ac_link") 2>conftest.er1
10895 ac_status=$? 10429 ac_status=$?
10896 grep -v '^ *+' conftest.er1 >conftest.err 10430 grep -v '^ *+' conftest.er1 >conftest.err
10897 rm -f conftest.er1 10431 rm -f conftest.er1
10898 cat conftest.err >&5 10432 cat conftest.err >&5
10899 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10900 (exit $ac_status); } && { 10434 (exit $ac_status); } && {
10901 test -z "$ac_c_werror_flag" || 10435 test -z "$ac_c_werror_flag" ||
10902 test ! -s conftest.err 10436 test ! -s conftest.err
10903 } && test -s conftest$ac_exeext && { 10437 } && test -s conftest$ac_exeext &&
10904 test "$cross_compiling" = yes || 10438 $as_test_x conftest$ac_exeext; then
10905 $as_test_x conftest$ac_exeext
10906 }; then
10907 ac_cv_func_getspnam=yes 10439 ac_cv_func_getspnam=yes
10908else 10440else
10909 $as_echo "$as_me: failed program was:" >&5 10441 echo "$as_me: failed program was:" >&5
10910sed 's/^/| /' conftest.$ac_ext >&5 10442sed 's/^/| /' conftest.$ac_ext >&5
10911 10443
10912 ac_cv_func_getspnam=no 10444 ac_cv_func_getspnam=no
10913fi 10445fi
10914 10446
10915rm -rf conftest.dSYM
10916rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10447rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10917 conftest$ac_exeext conftest.$ac_ext 10448 conftest$ac_exeext conftest.$ac_ext
10918fi 10449fi
10919{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getspnam" >&5 10450{ echo "$as_me:$LINENO: result: $ac_cv_func_getspnam" >&5
10920$as_echo "$ac_cv_func_getspnam" >&6; } 10451echo "${ECHO_T}$ac_cv_func_getspnam" >&6; }
10921if test $ac_cv_func_getspnam = yes; then 10452if test $ac_cv_func_getspnam = yes; then
10922 : 10453 :
10923else 10454else
10924 { $as_echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5 10455 { echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
10925$as_echo_n "checking for getspnam in -lgen... " >&6; } 10456echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6; }
10926if test "${ac_cv_lib_gen_getspnam+set}" = set; then 10457if test "${ac_cv_lib_gen_getspnam+set}" = set; then
10927 $as_echo_n "(cached) " >&6 10458 echo $ECHO_N "(cached) $ECHO_C" >&6
10928else 10459else
10929 ac_check_lib_save_LIBS=$LIBS 10460 ac_check_lib_save_LIBS=$LIBS
10930LIBS="-lgen $LIBS" 10461LIBS="-lgen $LIBS"
@@ -10956,46 +10487,42 @@ case "(($ac_try" in
10956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10957 *) ac_try_echo=$ac_try;; 10488 *) ac_try_echo=$ac_try;;
10958esac 10489esac
10959eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10960$as_echo "$ac_try_echo") >&5
10961 (eval "$ac_link") 2>conftest.er1 10491 (eval "$ac_link") 2>conftest.er1
10962 ac_status=$? 10492 ac_status=$?
10963 grep -v '^ *+' conftest.er1 >conftest.err 10493 grep -v '^ *+' conftest.er1 >conftest.err
10964 rm -f conftest.er1 10494 rm -f conftest.er1
10965 cat conftest.err >&5 10495 cat conftest.err >&5
10966 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10967 (exit $ac_status); } && { 10497 (exit $ac_status); } && {
10968 test -z "$ac_c_werror_flag" || 10498 test -z "$ac_c_werror_flag" ||
10969 test ! -s conftest.err 10499 test ! -s conftest.err
10970 } && test -s conftest$ac_exeext && { 10500 } && test -s conftest$ac_exeext &&
10971 test "$cross_compiling" = yes || 10501 $as_test_x conftest$ac_exeext; then
10972 $as_test_x conftest$ac_exeext
10973 }; then
10974 ac_cv_lib_gen_getspnam=yes 10502 ac_cv_lib_gen_getspnam=yes
10975else 10503else
10976 $as_echo "$as_me: failed program was:" >&5 10504 echo "$as_me: failed program was:" >&5
10977sed 's/^/| /' conftest.$ac_ext >&5 10505sed 's/^/| /' conftest.$ac_ext >&5
10978 10506
10979 ac_cv_lib_gen_getspnam=no 10507 ac_cv_lib_gen_getspnam=no
10980fi 10508fi
10981 10509
10982rm -rf conftest.dSYM
10983rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10510rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10984 conftest$ac_exeext conftest.$ac_ext 10511 conftest$ac_exeext conftest.$ac_ext
10985LIBS=$ac_check_lib_save_LIBS 10512LIBS=$ac_check_lib_save_LIBS
10986fi 10513fi
10987{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5 10514{ echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
10988$as_echo "$ac_cv_lib_gen_getspnam" >&6; } 10515echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6; }
10989if test $ac_cv_lib_gen_getspnam = yes; then 10516if test $ac_cv_lib_gen_getspnam = yes; then
10990 LIBS="$LIBS -lgen" 10517 LIBS="$LIBS -lgen"
10991fi 10518fi
10992 10519
10993fi 10520fi
10994 10521
10995{ $as_echo "$as_me:$LINENO: checking for library containing basename" >&5 10522{ echo "$as_me:$LINENO: checking for library containing basename" >&5
10996$as_echo_n "checking for library containing basename... " >&6; } 10523echo $ECHO_N "checking for library containing basename... $ECHO_C" >&6; }
10997if test "${ac_cv_search_basename+set}" = set; then 10524if test "${ac_cv_search_basename+set}" = set; then
10998 $as_echo_n "(cached) " >&6 10525 echo $ECHO_N "(cached) $ECHO_C" >&6
10999else 10526else
11000 ac_func_search_save_LIBS=$LIBS 10527 ac_func_search_save_LIBS=$LIBS
11001cat >conftest.$ac_ext <<_ACEOF 10528cat >conftest.$ac_ext <<_ACEOF
@@ -11033,30 +10560,26 @@ case "(($ac_try" in
11033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11034 *) ac_try_echo=$ac_try;; 10561 *) ac_try_echo=$ac_try;;
11035esac 10562esac
11036eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11037$as_echo "$ac_try_echo") >&5
11038 (eval "$ac_link") 2>conftest.er1 10564 (eval "$ac_link") 2>conftest.er1
11039 ac_status=$? 10565 ac_status=$?
11040 grep -v '^ *+' conftest.er1 >conftest.err 10566 grep -v '^ *+' conftest.er1 >conftest.err
11041 rm -f conftest.er1 10567 rm -f conftest.er1
11042 cat conftest.err >&5 10568 cat conftest.err >&5
11043 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11044 (exit $ac_status); } && { 10570 (exit $ac_status); } && {
11045 test -z "$ac_c_werror_flag" || 10571 test -z "$ac_c_werror_flag" ||
11046 test ! -s conftest.err 10572 test ! -s conftest.err
11047 } && test -s conftest$ac_exeext && { 10573 } && test -s conftest$ac_exeext &&
11048 test "$cross_compiling" = yes || 10574 $as_test_x conftest$ac_exeext; then
11049 $as_test_x conftest$ac_exeext
11050 }; then
11051 ac_cv_search_basename=$ac_res 10575 ac_cv_search_basename=$ac_res
11052else 10576else
11053 $as_echo "$as_me: failed program was:" >&5 10577 echo "$as_me: failed program was:" >&5
11054sed 's/^/| /' conftest.$ac_ext >&5 10578sed 's/^/| /' conftest.$ac_ext >&5
11055 10579
11056 10580
11057fi 10581fi
11058 10582
11059rm -rf conftest.dSYM
11060rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10583rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11061 conftest$ac_exeext 10584 conftest$ac_exeext
11062 if test "${ac_cv_search_basename+set}" = set; then 10585 if test "${ac_cv_search_basename+set}" = set; then
@@ -11071,8 +10594,8 @@ fi
11071rm conftest.$ac_ext 10594rm conftest.$ac_ext
11072LIBS=$ac_func_search_save_LIBS 10595LIBS=$ac_func_search_save_LIBS
11073fi 10596fi
11074{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_basename" >&5 10597{ echo "$as_me:$LINENO: result: $ac_cv_search_basename" >&5
11075$as_echo "$ac_cv_search_basename" >&6; } 10598echo "${ECHO_T}$ac_cv_search_basename" >&6; }
11076ac_res=$ac_cv_search_basename 10599ac_res=$ac_cv_search_basename
11077if test "$ac_res" != no; then 10600if test "$ac_res" != no; then
11078 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 10601 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
@@ -11088,8 +10611,8 @@ fi
11088# Check whether --with-zlib was given. 10611# Check whether --with-zlib was given.
11089if test "${with_zlib+set}" = set; then 10612if test "${with_zlib+set}" = set; then
11090 withval=$with_zlib; if test "x$withval" = "xno" ; then 10613 withval=$with_zlib; if test "x$withval" = "xno" ; then
11091 { { $as_echo "$as_me:$LINENO: error: *** zlib is required ***" >&5 10614 { { echo "$as_me:$LINENO: error: *** zlib is required ***" >&5
11092$as_echo "$as_me: error: *** zlib is required ***" >&2;} 10615echo "$as_me: error: *** zlib is required ***" >&2;}
11093 { (exit 1); exit 1; }; } 10616 { (exit 1); exit 1; }; }
11094 elif test "x$withval" != "xyes"; then 10617 elif test "x$withval" != "xyes"; then
11095 if test -d "$withval/lib"; then 10618 if test -d "$withval/lib"; then
@@ -11116,17 +10639,17 @@ fi
11116 10639
11117 10640
11118if test "${ac_cv_header_zlib_h+set}" = set; then 10641if test "${ac_cv_header_zlib_h+set}" = set; then
11119 { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5 10642 { echo "$as_me:$LINENO: checking for zlib.h" >&5
11120$as_echo_n "checking for zlib.h... " >&6; } 10643echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
11121if test "${ac_cv_header_zlib_h+set}" = set; then 10644if test "${ac_cv_header_zlib_h+set}" = set; then
11122 $as_echo_n "(cached) " >&6 10645 echo $ECHO_N "(cached) $ECHO_C" >&6
11123fi 10646fi
11124{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 10647{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
11125$as_echo "$ac_cv_header_zlib_h" >&6; } 10648echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
11126else 10649else
11127 # Is the header compilable? 10650 # Is the header compilable?
11128{ $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5 10651{ echo "$as_me:$LINENO: checking zlib.h usability" >&5
11129$as_echo_n "checking zlib.h usability... " >&6; } 10652echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; }
11130cat >conftest.$ac_ext <<_ACEOF 10653cat >conftest.$ac_ext <<_ACEOF
11131/* confdefs.h. */ 10654/* confdefs.h. */
11132_ACEOF 10655_ACEOF
@@ -11142,33 +10665,32 @@ case "(($ac_try" in
11142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11143 *) ac_try_echo=$ac_try;; 10666 *) ac_try_echo=$ac_try;;
11144esac 10667esac
11145eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11146$as_echo "$ac_try_echo") >&5
11147 (eval "$ac_compile") 2>conftest.er1 10669 (eval "$ac_compile") 2>conftest.er1
11148 ac_status=$? 10670 ac_status=$?
11149 grep -v '^ *+' conftest.er1 >conftest.err 10671 grep -v '^ *+' conftest.er1 >conftest.err
11150 rm -f conftest.er1 10672 rm -f conftest.er1
11151 cat conftest.err >&5 10673 cat conftest.err >&5
11152 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11153 (exit $ac_status); } && { 10675 (exit $ac_status); } && {
11154 test -z "$ac_c_werror_flag" || 10676 test -z "$ac_c_werror_flag" ||
11155 test ! -s conftest.err 10677 test ! -s conftest.err
11156 } && test -s conftest.$ac_objext; then 10678 } && test -s conftest.$ac_objext; then
11157 ac_header_compiler=yes 10679 ac_header_compiler=yes
11158else 10680else
11159 $as_echo "$as_me: failed program was:" >&5 10681 echo "$as_me: failed program was:" >&5
11160sed 's/^/| /' conftest.$ac_ext >&5 10682sed 's/^/| /' conftest.$ac_ext >&5
11161 10683
11162 ac_header_compiler=no 10684 ac_header_compiler=no
11163fi 10685fi
11164 10686
11165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11166{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 10688{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11167$as_echo "$ac_header_compiler" >&6; } 10689echo "${ECHO_T}$ac_header_compiler" >&6; }
11168 10690
11169# Is the header present? 10691# Is the header present?
11170{ $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5 10692{ echo "$as_me:$LINENO: checking zlib.h presence" >&5
11171$as_echo_n "checking zlib.h presence... " >&6; } 10693echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; }
11172cat >conftest.$ac_ext <<_ACEOF 10694cat >conftest.$ac_ext <<_ACEOF
11173/* confdefs.h. */ 10695/* confdefs.h. */
11174_ACEOF 10696_ACEOF
@@ -11182,52 +10704,51 @@ case "(($ac_try" in
11182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11183 *) ac_try_echo=$ac_try;; 10705 *) ac_try_echo=$ac_try;;
11184esac 10706esac
11185eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11186$as_echo "$ac_try_echo") >&5
11187 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 10708 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11188 ac_status=$? 10709 ac_status=$?
11189 grep -v '^ *+' conftest.er1 >conftest.err 10710 grep -v '^ *+' conftest.er1 >conftest.err
11190 rm -f conftest.er1 10711 rm -f conftest.er1
11191 cat conftest.err >&5 10712 cat conftest.err >&5
11192 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11193 (exit $ac_status); } >/dev/null && { 10714 (exit $ac_status); } >/dev/null && {
11194 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 10715 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11195 test ! -s conftest.err 10716 test ! -s conftest.err
11196 }; then 10717 }; then
11197 ac_header_preproc=yes 10718 ac_header_preproc=yes
11198else 10719else
11199 $as_echo "$as_me: failed program was:" >&5 10720 echo "$as_me: failed program was:" >&5
11200sed 's/^/| /' conftest.$ac_ext >&5 10721sed 's/^/| /' conftest.$ac_ext >&5
11201 10722
11202 ac_header_preproc=no 10723 ac_header_preproc=no
11203fi 10724fi
11204 10725
11205rm -f conftest.err conftest.$ac_ext 10726rm -f conftest.err conftest.$ac_ext
11206{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 10727{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11207$as_echo "$ac_header_preproc" >&6; } 10728echo "${ECHO_T}$ac_header_preproc" >&6; }
11208 10729
11209# So? What about this header? 10730# So? What about this header?
11210case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 10731case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11211 yes:no: ) 10732 yes:no: )
11212 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 10733 { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
11213$as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 10734echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11214 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 10735 { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
11215$as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} 10736echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
11216 ac_header_preproc=yes 10737 ac_header_preproc=yes
11217 ;; 10738 ;;
11218 no:yes:* ) 10739 no:yes:* )
11219 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 10740 { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
11220$as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} 10741echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
11221 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 10742 { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5
11222$as_echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} 10743echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;}
11223 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 10744 { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
11224$as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} 10745echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
11225 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 10746 { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5
11226$as_echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} 10747echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
11227 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 10748 { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
11228$as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} 10749echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
11229 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 10750 { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
11230$as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} 10751echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
11231 ( cat <<\_ASBOX 10752 ( cat <<\_ASBOX
11232## ------------------------------------------- ## 10753## ------------------------------------------- ##
11233## Report this to openssh-unix-dev@mindrot.org ## 10754## Report this to openssh-unix-dev@mindrot.org ##
@@ -11236,31 +10757,31 @@ _ASBOX
11236 ) | sed "s/^/$as_me: WARNING: /" >&2 10757 ) | sed "s/^/$as_me: WARNING: /" >&2
11237 ;; 10758 ;;
11238esac 10759esac
11239{ $as_echo "$as_me:$LINENO: checking for zlib.h" >&5 10760{ echo "$as_me:$LINENO: checking for zlib.h" >&5
11240$as_echo_n "checking for zlib.h... " >&6; } 10761echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
11241if test "${ac_cv_header_zlib_h+set}" = set; then 10762if test "${ac_cv_header_zlib_h+set}" = set; then
11242 $as_echo_n "(cached) " >&6 10763 echo $ECHO_N "(cached) $ECHO_C" >&6
11243else 10764else
11244 ac_cv_header_zlib_h=$ac_header_preproc 10765 ac_cv_header_zlib_h=$ac_header_preproc
11245fi 10766fi
11246{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 10767{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
11247$as_echo "$ac_cv_header_zlib_h" >&6; } 10768echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
11248 10769
11249fi 10770fi
11250if test $ac_cv_header_zlib_h = yes; then 10771if test $ac_cv_header_zlib_h = yes; then
11251 : 10772 :
11252else 10773else
11253 { { $as_echo "$as_me:$LINENO: error: *** zlib.h missing - please install first or check config.log ***" >&5 10774 { { echo "$as_me:$LINENO: error: *** zlib.h missing - please install first or check config.log ***" >&5
11254$as_echo "$as_me: error: *** zlib.h missing - please install first or check config.log ***" >&2;} 10775echo "$as_me: error: *** zlib.h missing - please install first or check config.log ***" >&2;}
11255 { (exit 1); exit 1; }; } 10776 { (exit 1); exit 1; }; }
11256fi 10777fi
11257 10778
11258 10779
11259 10780
11260{ $as_echo "$as_me:$LINENO: checking for deflate in -lz" >&5 10781{ echo "$as_me:$LINENO: checking for deflate in -lz" >&5
11261$as_echo_n "checking for deflate in -lz... " >&6; } 10782echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6; }
11262if test "${ac_cv_lib_z_deflate+set}" = set; then 10783if test "${ac_cv_lib_z_deflate+set}" = set; then
11263 $as_echo_n "(cached) " >&6 10784 echo $ECHO_N "(cached) $ECHO_C" >&6
11264else 10785else
11265 ac_check_lib_save_LIBS=$LIBS 10786 ac_check_lib_save_LIBS=$LIBS
11266LIBS="-lz $LIBS" 10787LIBS="-lz $LIBS"
@@ -11292,36 +10813,32 @@ case "(($ac_try" in
11292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11293 *) ac_try_echo=$ac_try;; 10814 *) ac_try_echo=$ac_try;;
11294esac 10815esac
11295eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11296$as_echo "$ac_try_echo") >&5
11297 (eval "$ac_link") 2>conftest.er1 10817 (eval "$ac_link") 2>conftest.er1
11298 ac_status=$? 10818 ac_status=$?
11299 grep -v '^ *+' conftest.er1 >conftest.err 10819 grep -v '^ *+' conftest.er1 >conftest.err
11300 rm -f conftest.er1 10820 rm -f conftest.er1
11301 cat conftest.err >&5 10821 cat conftest.err >&5
11302 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11303 (exit $ac_status); } && { 10823 (exit $ac_status); } && {
11304 test -z "$ac_c_werror_flag" || 10824 test -z "$ac_c_werror_flag" ||
11305 test ! -s conftest.err 10825 test ! -s conftest.err
11306 } && test -s conftest$ac_exeext && { 10826 } && test -s conftest$ac_exeext &&
11307 test "$cross_compiling" = yes || 10827 $as_test_x conftest$ac_exeext; then
11308 $as_test_x conftest$ac_exeext
11309 }; then
11310 ac_cv_lib_z_deflate=yes 10828 ac_cv_lib_z_deflate=yes
11311else 10829else
11312 $as_echo "$as_me: failed program was:" >&5 10830 echo "$as_me: failed program was:" >&5
11313sed 's/^/| /' conftest.$ac_ext >&5 10831sed 's/^/| /' conftest.$ac_ext >&5
11314 10832
11315 ac_cv_lib_z_deflate=no 10833 ac_cv_lib_z_deflate=no
11316fi 10834fi
11317 10835
11318rm -rf conftest.dSYM
11319rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10836rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11320 conftest$ac_exeext conftest.$ac_ext 10837 conftest$ac_exeext conftest.$ac_ext
11321LIBS=$ac_check_lib_save_LIBS 10838LIBS=$ac_check_lib_save_LIBS
11322fi 10839fi
11323{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5 10840{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5
11324$as_echo "$ac_cv_lib_z_deflate" >&6; } 10841echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6; }
11325if test $ac_cv_lib_z_deflate = yes; then 10842if test $ac_cv_lib_z_deflate = yes; then
11326 cat >>confdefs.h <<_ACEOF 10843 cat >>confdefs.h <<_ACEOF
11327#define HAVE_LIBZ 1 10844#define HAVE_LIBZ 1
@@ -11369,38 +10886,34 @@ case "(($ac_try" in
11369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11370 *) ac_try_echo=$ac_try;; 10887 *) ac_try_echo=$ac_try;;
11371esac 10888esac
11372eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11373$as_echo "$ac_try_echo") >&5
11374 (eval "$ac_link") 2>conftest.er1 10890 (eval "$ac_link") 2>conftest.er1
11375 ac_status=$? 10891 ac_status=$?
11376 grep -v '^ *+' conftest.er1 >conftest.err 10892 grep -v '^ *+' conftest.er1 >conftest.err
11377 rm -f conftest.er1 10893 rm -f conftest.er1
11378 cat conftest.err >&5 10894 cat conftest.err >&5
11379 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11380 (exit $ac_status); } && { 10896 (exit $ac_status); } && {
11381 test -z "$ac_c_werror_flag" || 10897 test -z "$ac_c_werror_flag" ||
11382 test ! -s conftest.err 10898 test ! -s conftest.err
11383 } && test -s conftest$ac_exeext && { 10899 } && test -s conftest$ac_exeext &&
11384 test "$cross_compiling" = yes || 10900 $as_test_x conftest$ac_exeext; then
11385 $as_test_x conftest$ac_exeext
11386 }; then
11387 cat >>confdefs.h <<\_ACEOF 10901 cat >>confdefs.h <<\_ACEOF
11388#define HAVE_LIBZ 1 10902#define HAVE_LIBZ 1
11389_ACEOF 10903_ACEOF
11390 10904
11391else 10905else
11392 $as_echo "$as_me: failed program was:" >&5 10906 echo "$as_me: failed program was:" >&5
11393sed 's/^/| /' conftest.$ac_ext >&5 10907sed 's/^/| /' conftest.$ac_ext >&5
11394 10908
11395 10909
11396 { { $as_echo "$as_me:$LINENO: error: *** zlib missing - please install first or check config.log ***" >&5 10910 { { echo "$as_me:$LINENO: error: *** zlib missing - please install first or check config.log ***" >&5
11397$as_echo "$as_me: error: *** zlib missing - please install first or check config.log ***" >&2;} 10911echo "$as_me: error: *** zlib missing - please install first or check config.log ***" >&2;}
11398 { (exit 1); exit 1; }; } 10912 { (exit 1); exit 1; }; }
11399 10913
11400 10914
11401fi 10915fi
11402 10916
11403rm -rf conftest.dSYM
11404rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10917rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11405 conftest$ac_exeext conftest.$ac_ext 10918 conftest$ac_exeext conftest.$ac_ext
11406 10919
@@ -11419,11 +10932,11 @@ if test "${with_zlib_version_check+set}" = set; then
11419fi 10932fi
11420 10933
11421 10934
11422{ $as_echo "$as_me:$LINENO: checking for possibly buggy zlib" >&5 10935{ echo "$as_me:$LINENO: checking for possibly buggy zlib" >&5
11423$as_echo_n "checking for possibly buggy zlib... " >&6; } 10936echo $ECHO_N "checking for possibly buggy zlib... $ECHO_C" >&6; }
11424if test "$cross_compiling" = yes; then 10937if test "$cross_compiling" = yes; then
11425 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: not checking zlib version" >&5 10938 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking zlib version" >&5
11426$as_echo "$as_me: WARNING: cross compiling: not checking zlib version" >&2;} 10939echo "$as_me: WARNING: cross compiling: not checking zlib version" >&2;}
11427 10940
11428else 10941else
11429 cat >conftest.$ac_ext <<_ACEOF 10942 cat >conftest.$ac_ext <<_ACEOF
@@ -11462,41 +10975,39 @@ case "(($ac_try" in
11462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11463 *) ac_try_echo=$ac_try;; 10976 *) ac_try_echo=$ac_try;;
11464esac 10977esac
11465eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11466$as_echo "$ac_try_echo") >&5
11467 (eval "$ac_link") 2>&5 10979 (eval "$ac_link") 2>&5
11468 ac_status=$? 10980 ac_status=$?
11469 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11470 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 10982 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11471 { (case "(($ac_try" in 10983 { (case "(($ac_try" in
11472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11473 *) ac_try_echo=$ac_try;; 10985 *) ac_try_echo=$ac_try;;
11474esac 10986esac
11475eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11476$as_echo "$ac_try_echo") >&5
11477 (eval "$ac_try") 2>&5 10988 (eval "$ac_try") 2>&5
11478 ac_status=$? 10989 ac_status=$?
11479 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11480 (exit $ac_status); }; }; then 10991 (exit $ac_status); }; }; then
11481 { $as_echo "$as_me:$LINENO: result: no" >&5 10992 { echo "$as_me:$LINENO: result: no" >&5
11482$as_echo "no" >&6; } 10993echo "${ECHO_T}no" >&6; }
11483else 10994else
11484 $as_echo "$as_me: program exited with status $ac_status" >&5 10995 echo "$as_me: program exited with status $ac_status" >&5
11485$as_echo "$as_me: failed program was:" >&5 10996echo "$as_me: failed program was:" >&5
11486sed 's/^/| /' conftest.$ac_ext >&5 10997sed 's/^/| /' conftest.$ac_ext >&5
11487 10998
11488( exit $ac_status ) 10999( exit $ac_status )
11489 { $as_echo "$as_me:$LINENO: result: yes" >&5 11000 { echo "$as_me:$LINENO: result: yes" >&5
11490$as_echo "yes" >&6; } 11001echo "${ECHO_T}yes" >&6; }
11491 if test -z "$zlib_check_nonfatal" ; then 11002 if test -z "$zlib_check_nonfatal" ; then
11492 { { $as_echo "$as_me:$LINENO: error: *** zlib too old - check config.log *** 11003 { { echo "$as_me:$LINENO: error: *** zlib too old - check config.log ***
11493Your reported zlib version has known security problems. It's possible your 11004Your reported zlib version has known security problems. It's possible your
11494vendor has fixed these problems without changing the version number. If you 11005vendor has fixed these problems without changing the version number. If you
11495are sure this is the case, you can disable the check by running 11006are sure this is the case, you can disable the check by running
11496\"./configure --without-zlib-version-check\". 11007\"./configure --without-zlib-version-check\".
11497If you are in doubt, upgrade zlib to version 1.2.3 or greater. 11008If you are in doubt, upgrade zlib to version 1.2.3 or greater.
11498See http://www.gzip.org/zlib/ for details." >&5 11009See http://www.gzip.org/zlib/ for details." >&5
11499$as_echo "$as_me: error: *** zlib too old - check config.log *** 11010echo "$as_me: error: *** zlib too old - check config.log ***
11500Your reported zlib version has known security problems. It's possible your 11011Your reported zlib version has known security problems. It's possible your
11501vendor has fixed these problems without changing the version number. If you 11012vendor has fixed these problems without changing the version number. If you
11502are sure this is the case, you can disable the check by running 11013are sure this is the case, you can disable the check by running
@@ -11505,21 +11016,20 @@ If you are in doubt, upgrade zlib to version 1.2.3 or greater.
11505See http://www.gzip.org/zlib/ for details." >&2;} 11016See http://www.gzip.org/zlib/ for details." >&2;}
11506 { (exit 1); exit 1; }; } 11017 { (exit 1); exit 1; }; }
11507 else 11018 else
11508 { $as_echo "$as_me:$LINENO: WARNING: zlib version may have security problems" >&5 11019 { echo "$as_me:$LINENO: WARNING: zlib version may have security problems" >&5
11509$as_echo "$as_me: WARNING: zlib version may have security problems" >&2;} 11020echo "$as_me: WARNING: zlib version may have security problems" >&2;}
11510 fi 11021 fi
11511 11022
11512fi 11023fi
11513rm -rf conftest.dSYM
11514rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 11024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11515fi 11025fi
11516 11026
11517 11027
11518 11028
11519{ $as_echo "$as_me:$LINENO: checking for strcasecmp" >&5 11029{ echo "$as_me:$LINENO: checking for strcasecmp" >&5
11520$as_echo_n "checking for strcasecmp... " >&6; } 11030echo $ECHO_N "checking for strcasecmp... $ECHO_C" >&6; }
11521if test "${ac_cv_func_strcasecmp+set}" = set; then 11031if test "${ac_cv_func_strcasecmp+set}" = set; then
11522 $as_echo_n "(cached) " >&6 11032 echo $ECHO_N "(cached) $ECHO_C" >&6
11523else 11033else
11524 cat >conftest.$ac_ext <<_ACEOF 11034 cat >conftest.$ac_ext <<_ACEOF
11525/* confdefs.h. */ 11035/* confdefs.h. */
@@ -11572,42 +11082,38 @@ case "(($ac_try" in
11572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11573 *) ac_try_echo=$ac_try;; 11083 *) ac_try_echo=$ac_try;;
11574esac 11084esac
11575eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11576$as_echo "$ac_try_echo") >&5
11577 (eval "$ac_link") 2>conftest.er1 11086 (eval "$ac_link") 2>conftest.er1
11578 ac_status=$? 11087 ac_status=$?
11579 grep -v '^ *+' conftest.er1 >conftest.err 11088 grep -v '^ *+' conftest.er1 >conftest.err
11580 rm -f conftest.er1 11089 rm -f conftest.er1
11581 cat conftest.err >&5 11090 cat conftest.err >&5
11582 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11583 (exit $ac_status); } && { 11092 (exit $ac_status); } && {
11584 test -z "$ac_c_werror_flag" || 11093 test -z "$ac_c_werror_flag" ||
11585 test ! -s conftest.err 11094 test ! -s conftest.err
11586 } && test -s conftest$ac_exeext && { 11095 } && test -s conftest$ac_exeext &&
11587 test "$cross_compiling" = yes || 11096 $as_test_x conftest$ac_exeext; then
11588 $as_test_x conftest$ac_exeext
11589 }; then
11590 ac_cv_func_strcasecmp=yes 11097 ac_cv_func_strcasecmp=yes
11591else 11098else
11592 $as_echo "$as_me: failed program was:" >&5 11099 echo "$as_me: failed program was:" >&5
11593sed 's/^/| /' conftest.$ac_ext >&5 11100sed 's/^/| /' conftest.$ac_ext >&5
11594 11101
11595 ac_cv_func_strcasecmp=no 11102 ac_cv_func_strcasecmp=no
11596fi 11103fi
11597 11104
11598rm -rf conftest.dSYM
11599rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 11105rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11600 conftest$ac_exeext conftest.$ac_ext 11106 conftest$ac_exeext conftest.$ac_ext
11601fi 11107fi
11602{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_strcasecmp" >&5 11108{ echo "$as_me:$LINENO: result: $ac_cv_func_strcasecmp" >&5
11603$as_echo "$ac_cv_func_strcasecmp" >&6; } 11109echo "${ECHO_T}$ac_cv_func_strcasecmp" >&6; }
11604if test $ac_cv_func_strcasecmp = yes; then 11110if test $ac_cv_func_strcasecmp = yes; then
11605 : 11111 :
11606else 11112else
11607 { $as_echo "$as_me:$LINENO: checking for strcasecmp in -lresolv" >&5 11113 { echo "$as_me:$LINENO: checking for strcasecmp in -lresolv" >&5
11608$as_echo_n "checking for strcasecmp in -lresolv... " >&6; } 11114echo $ECHO_N "checking for strcasecmp in -lresolv... $ECHO_C" >&6; }
11609if test "${ac_cv_lib_resolv_strcasecmp+set}" = set; then 11115if test "${ac_cv_lib_resolv_strcasecmp+set}" = set; then
11610 $as_echo_n "(cached) " >&6 11116 echo $ECHO_N "(cached) $ECHO_C" >&6
11611else 11117else
11612 ac_check_lib_save_LIBS=$LIBS 11118 ac_check_lib_save_LIBS=$LIBS
11613LIBS="-lresolv $LIBS" 11119LIBS="-lresolv $LIBS"
@@ -11639,36 +11145,32 @@ case "(($ac_try" in
11639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11640 *) ac_try_echo=$ac_try;; 11146 *) ac_try_echo=$ac_try;;
11641esac 11147esac
11642eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11643$as_echo "$ac_try_echo") >&5
11644 (eval "$ac_link") 2>conftest.er1 11149 (eval "$ac_link") 2>conftest.er1
11645 ac_status=$? 11150 ac_status=$?
11646 grep -v '^ *+' conftest.er1 >conftest.err 11151 grep -v '^ *+' conftest.er1 >conftest.err
11647 rm -f conftest.er1 11152 rm -f conftest.er1
11648 cat conftest.err >&5 11153 cat conftest.err >&5
11649 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11650 (exit $ac_status); } && { 11155 (exit $ac_status); } && {
11651 test -z "$ac_c_werror_flag" || 11156 test -z "$ac_c_werror_flag" ||
11652 test ! -s conftest.err 11157 test ! -s conftest.err
11653 } && test -s conftest$ac_exeext && { 11158 } && test -s conftest$ac_exeext &&
11654 test "$cross_compiling" = yes || 11159 $as_test_x conftest$ac_exeext; then
11655 $as_test_x conftest$ac_exeext
11656 }; then
11657 ac_cv_lib_resolv_strcasecmp=yes 11160 ac_cv_lib_resolv_strcasecmp=yes
11658else 11161else
11659 $as_echo "$as_me: failed program was:" >&5 11162 echo "$as_me: failed program was:" >&5
11660sed 's/^/| /' conftest.$ac_ext >&5 11163sed 's/^/| /' conftest.$ac_ext >&5
11661 11164
11662 ac_cv_lib_resolv_strcasecmp=no 11165 ac_cv_lib_resolv_strcasecmp=no
11663fi 11166fi
11664 11167
11665rm -rf conftest.dSYM
11666rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 11168rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11667 conftest$ac_exeext conftest.$ac_ext 11169 conftest$ac_exeext conftest.$ac_ext
11668LIBS=$ac_check_lib_save_LIBS 11170LIBS=$ac_check_lib_save_LIBS
11669fi 11171fi
11670{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_strcasecmp" >&5 11172{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_strcasecmp" >&5
11671$as_echo "$ac_cv_lib_resolv_strcasecmp" >&6; } 11173echo "${ECHO_T}$ac_cv_lib_resolv_strcasecmp" >&6; }
11672if test $ac_cv_lib_resolv_strcasecmp = yes; then 11174if test $ac_cv_lib_resolv_strcasecmp = yes; then
11673 LIBS="$LIBS -lresolv" 11175 LIBS="$LIBS -lresolv"
11674fi 11176fi
@@ -11679,11 +11181,11 @@ fi
11679 11181
11680for ac_func in utimes 11182for ac_func in utimes
11681do 11183do
11682as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 11184as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11683{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 11185{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11684$as_echo_n "checking for $ac_func... " >&6; } 11186echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11685if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 11187if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
11686 $as_echo_n "(cached) " >&6 11188 echo $ECHO_N "(cached) $ECHO_C" >&6
11687else 11189else
11688 cat >conftest.$ac_ext <<_ACEOF 11190 cat >conftest.$ac_ext <<_ACEOF
11689/* confdefs.h. */ 11191/* confdefs.h. */
@@ -11736,48 +11238,42 @@ case "(($ac_try" in
11736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11737 *) ac_try_echo=$ac_try;; 11239 *) ac_try_echo=$ac_try;;
11738esac 11240esac
11739eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11740$as_echo "$ac_try_echo") >&5
11741 (eval "$ac_link") 2>conftest.er1 11242 (eval "$ac_link") 2>conftest.er1
11742 ac_status=$? 11243 ac_status=$?
11743 grep -v '^ *+' conftest.er1 >conftest.err 11244 grep -v '^ *+' conftest.er1 >conftest.err
11744 rm -f conftest.er1 11245 rm -f conftest.er1
11745 cat conftest.err >&5 11246 cat conftest.err >&5
11746 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11747 (exit $ac_status); } && { 11248 (exit $ac_status); } && {
11748 test -z "$ac_c_werror_flag" || 11249 test -z "$ac_c_werror_flag" ||
11749 test ! -s conftest.err 11250 test ! -s conftest.err
11750 } && test -s conftest$ac_exeext && { 11251 } && test -s conftest$ac_exeext &&
11751 test "$cross_compiling" = yes || 11252 $as_test_x conftest$ac_exeext; then
11752 $as_test_x conftest$ac_exeext
11753 }; then
11754 eval "$as_ac_var=yes" 11253 eval "$as_ac_var=yes"
11755else 11254else
11756 $as_echo "$as_me: failed program was:" >&5 11255 echo "$as_me: failed program was:" >&5
11757sed 's/^/| /' conftest.$ac_ext >&5 11256sed 's/^/| /' conftest.$ac_ext >&5
11758 11257
11759 eval "$as_ac_var=no" 11258 eval "$as_ac_var=no"
11760fi 11259fi
11761 11260
11762rm -rf conftest.dSYM
11763rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 11261rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11764 conftest$ac_exeext conftest.$ac_ext 11262 conftest$ac_exeext conftest.$ac_ext
11765fi 11263fi
11766ac_res=`eval 'as_val=${'$as_ac_var'} 11264ac_res=`eval echo '${'$as_ac_var'}'`
11767 $as_echo "$as_val"'` 11265 { echo "$as_me:$LINENO: result: $ac_res" >&5
11768 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 11266echo "${ECHO_T}$ac_res" >&6; }
11769$as_echo "$ac_res" >&6; } 11267if test `eval echo '${'$as_ac_var'}'` = yes; then
11770if test `eval 'as_val=${'$as_ac_var'}
11771 $as_echo "$as_val"'` = yes; then
11772 cat >>confdefs.h <<_ACEOF 11268 cat >>confdefs.h <<_ACEOF
11773#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 11269#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11774_ACEOF 11270_ACEOF
11775 11271
11776else 11272else
11777 { $as_echo "$as_me:$LINENO: checking for utimes in -lc89" >&5 11273 { echo "$as_me:$LINENO: checking for utimes in -lc89" >&5
11778$as_echo_n "checking for utimes in -lc89... " >&6; } 11274echo $ECHO_N "checking for utimes in -lc89... $ECHO_C" >&6; }
11779if test "${ac_cv_lib_c89_utimes+set}" = set; then 11275if test "${ac_cv_lib_c89_utimes+set}" = set; then
11780 $as_echo_n "(cached) " >&6 11276 echo $ECHO_N "(cached) $ECHO_C" >&6
11781else 11277else
11782 ac_check_lib_save_LIBS=$LIBS 11278 ac_check_lib_save_LIBS=$LIBS
11783LIBS="-lc89 $LIBS" 11279LIBS="-lc89 $LIBS"
@@ -11809,36 +11305,32 @@ case "(($ac_try" in
11809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11810 *) ac_try_echo=$ac_try;; 11306 *) ac_try_echo=$ac_try;;
11811esac 11307esac
11812eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11813$as_echo "$ac_try_echo") >&5
11814 (eval "$ac_link") 2>conftest.er1 11309 (eval "$ac_link") 2>conftest.er1
11815 ac_status=$? 11310 ac_status=$?
11816 grep -v '^ *+' conftest.er1 >conftest.err 11311 grep -v '^ *+' conftest.er1 >conftest.err
11817 rm -f conftest.er1 11312 rm -f conftest.er1
11818 cat conftest.err >&5 11313 cat conftest.err >&5
11819 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11820 (exit $ac_status); } && { 11315 (exit $ac_status); } && {
11821 test -z "$ac_c_werror_flag" || 11316 test -z "$ac_c_werror_flag" ||
11822 test ! -s conftest.err 11317 test ! -s conftest.err
11823 } && test -s conftest$ac_exeext && { 11318 } && test -s conftest$ac_exeext &&
11824 test "$cross_compiling" = yes || 11319 $as_test_x conftest$ac_exeext; then
11825 $as_test_x conftest$ac_exeext
11826 }; then
11827 ac_cv_lib_c89_utimes=yes 11320 ac_cv_lib_c89_utimes=yes
11828else 11321else
11829 $as_echo "$as_me: failed program was:" >&5 11322 echo "$as_me: failed program was:" >&5
11830sed 's/^/| /' conftest.$ac_ext >&5 11323sed 's/^/| /' conftest.$ac_ext >&5
11831 11324
11832 ac_cv_lib_c89_utimes=no 11325 ac_cv_lib_c89_utimes=no
11833fi 11326fi
11834 11327
11835rm -rf conftest.dSYM
11836rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 11328rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11837 conftest$ac_exeext conftest.$ac_ext 11329 conftest$ac_exeext conftest.$ac_ext
11838LIBS=$ac_check_lib_save_LIBS 11330LIBS=$ac_check_lib_save_LIBS
11839fi 11331fi
11840{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c89_utimes" >&5 11332{ echo "$as_me:$LINENO: result: $ac_cv_lib_c89_utimes" >&5
11841$as_echo "$ac_cv_lib_c89_utimes" >&6; } 11333echo "${ECHO_T}$ac_cv_lib_c89_utimes" >&6; }
11842if test $ac_cv_lib_c89_utimes = yes; then 11334if test $ac_cv_lib_c89_utimes = yes; then
11843 cat >>confdefs.h <<\_ACEOF 11335 cat >>confdefs.h <<\_ACEOF
11844#define HAVE_UTIMES 1 11336#define HAVE_UTIMES 1
@@ -11855,21 +11347,20 @@ done
11855 11347
11856for ac_header in libutil.h 11348for ac_header in libutil.h
11857do 11349do
11858as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 11350as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11859if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 11351if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11860 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 11352 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11861$as_echo_n "checking for $ac_header... " >&6; } 11353echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11862if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 11354if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11863 $as_echo_n "(cached) " >&6 11355 echo $ECHO_N "(cached) $ECHO_C" >&6
11864fi 11356fi
11865ac_res=`eval 'as_val=${'$as_ac_Header'} 11357ac_res=`eval echo '${'$as_ac_Header'}'`
11866 $as_echo "$as_val"'` 11358 { echo "$as_me:$LINENO: result: $ac_res" >&5
11867 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 11359echo "${ECHO_T}$ac_res" >&6; }
11868$as_echo "$ac_res" >&6; }
11869else 11360else
11870 # Is the header compilable? 11361 # Is the header compilable?
11871{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 11362{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11872$as_echo_n "checking $ac_header usability... " >&6; } 11363echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
11873cat >conftest.$ac_ext <<_ACEOF 11364cat >conftest.$ac_ext <<_ACEOF
11874/* confdefs.h. */ 11365/* confdefs.h. */
11875_ACEOF 11366_ACEOF
@@ -11885,33 +11376,32 @@ case "(($ac_try" in
11885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11886 *) ac_try_echo=$ac_try;; 11377 *) ac_try_echo=$ac_try;;
11887esac 11378esac
11888eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11889$as_echo "$ac_try_echo") >&5
11890 (eval "$ac_compile") 2>conftest.er1 11380 (eval "$ac_compile") 2>conftest.er1
11891 ac_status=$? 11381 ac_status=$?
11892 grep -v '^ *+' conftest.er1 >conftest.err 11382 grep -v '^ *+' conftest.er1 >conftest.err
11893 rm -f conftest.er1 11383 rm -f conftest.er1
11894 cat conftest.err >&5 11384 cat conftest.err >&5
11895 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11896 (exit $ac_status); } && { 11386 (exit $ac_status); } && {
11897 test -z "$ac_c_werror_flag" || 11387 test -z "$ac_c_werror_flag" ||
11898 test ! -s conftest.err 11388 test ! -s conftest.err
11899 } && test -s conftest.$ac_objext; then 11389 } && test -s conftest.$ac_objext; then
11900 ac_header_compiler=yes 11390 ac_header_compiler=yes
11901else 11391else
11902 $as_echo "$as_me: failed program was:" >&5 11392 echo "$as_me: failed program was:" >&5
11903sed 's/^/| /' conftest.$ac_ext >&5 11393sed 's/^/| /' conftest.$ac_ext >&5
11904 11394
11905 ac_header_compiler=no 11395 ac_header_compiler=no
11906fi 11396fi
11907 11397
11908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11909{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 11399{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11910$as_echo "$ac_header_compiler" >&6; } 11400echo "${ECHO_T}$ac_header_compiler" >&6; }
11911 11401
11912# Is the header present? 11402# Is the header present?
11913{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 11403{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11914$as_echo_n "checking $ac_header presence... " >&6; } 11404echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
11915cat >conftest.$ac_ext <<_ACEOF 11405cat >conftest.$ac_ext <<_ACEOF
11916/* confdefs.h. */ 11406/* confdefs.h. */
11917_ACEOF 11407_ACEOF
@@ -11925,52 +11415,51 @@ case "(($ac_try" in
11925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11926 *) ac_try_echo=$ac_try;; 11416 *) ac_try_echo=$ac_try;;
11927esac 11417esac
11928eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11929$as_echo "$ac_try_echo") >&5
11930 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 11419 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11931 ac_status=$? 11420 ac_status=$?
11932 grep -v '^ *+' conftest.er1 >conftest.err 11421 grep -v '^ *+' conftest.er1 >conftest.err
11933 rm -f conftest.er1 11422 rm -f conftest.er1
11934 cat conftest.err >&5 11423 cat conftest.err >&5
11935 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11936 (exit $ac_status); } >/dev/null && { 11425 (exit $ac_status); } >/dev/null && {
11937 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 11426 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11938 test ! -s conftest.err 11427 test ! -s conftest.err
11939 }; then 11428 }; then
11940 ac_header_preproc=yes 11429 ac_header_preproc=yes
11941else 11430else
11942 $as_echo "$as_me: failed program was:" >&5 11431 echo "$as_me: failed program was:" >&5
11943sed 's/^/| /' conftest.$ac_ext >&5 11432sed 's/^/| /' conftest.$ac_ext >&5
11944 11433
11945 ac_header_preproc=no 11434 ac_header_preproc=no
11946fi 11435fi
11947 11436
11948rm -f conftest.err conftest.$ac_ext 11437rm -f conftest.err conftest.$ac_ext
11949{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 11438{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11950$as_echo "$ac_header_preproc" >&6; } 11439echo "${ECHO_T}$ac_header_preproc" >&6; }
11951 11440
11952# So? What about this header? 11441# So? What about this header?
11953case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 11442case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11954 yes:no: ) 11443 yes:no: )
11955 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 11444 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11956$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} 11445echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11957 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 11446 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11958$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} 11447echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11959 ac_header_preproc=yes 11448 ac_header_preproc=yes
11960 ;; 11449 ;;
11961 no:yes:* ) 11450 no:yes:* )
11962 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 11451 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11963$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} 11452echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11964 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 11453 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11965$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} 11454echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11966 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 11455 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11967$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 11456echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11968 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 11457 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11969$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} 11458echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
11970 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 11459 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11971$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 11460echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11972 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 11461 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11973$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 11462echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11974 ( cat <<\_ASBOX 11463 ( cat <<\_ASBOX
11975## ------------------------------------------- ## 11464## ------------------------------------------- ##
11976## Report this to openssh-unix-dev@mindrot.org ## 11465## Report this to openssh-unix-dev@mindrot.org ##
@@ -11979,33 +11468,31 @@ _ASBOX
11979 ) | sed "s/^/$as_me: WARNING: /" >&2 11468 ) | sed "s/^/$as_me: WARNING: /" >&2
11980 ;; 11469 ;;
11981esac 11470esac
11982{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 11471{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11983$as_echo_n "checking for $ac_header... " >&6; } 11472echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11984if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 11473if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11985 $as_echo_n "(cached) " >&6 11474 echo $ECHO_N "(cached) $ECHO_C" >&6
11986else 11475else
11987 eval "$as_ac_Header=\$ac_header_preproc" 11476 eval "$as_ac_Header=\$ac_header_preproc"
11988fi 11477fi
11989ac_res=`eval 'as_val=${'$as_ac_Header'} 11478ac_res=`eval echo '${'$as_ac_Header'}'`
11990 $as_echo "$as_val"'` 11479 { echo "$as_me:$LINENO: result: $ac_res" >&5
11991 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 11480echo "${ECHO_T}$ac_res" >&6; }
11992$as_echo "$ac_res" >&6; }
11993 11481
11994fi 11482fi
11995if test `eval 'as_val=${'$as_ac_Header'} 11483if test `eval echo '${'$as_ac_Header'}'` = yes; then
11996 $as_echo "$as_val"'` = yes; then
11997 cat >>confdefs.h <<_ACEOF 11484 cat >>confdefs.h <<_ACEOF
11998#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 11485#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11999_ACEOF 11486_ACEOF
12000 11487
12001fi 11488fi
12002 11489
12003done 11490done
12004 11491
12005{ $as_echo "$as_me:$LINENO: checking for library containing login" >&5 11492{ echo "$as_me:$LINENO: checking for library containing login" >&5
12006$as_echo_n "checking for library containing login... " >&6; } 11493echo $ECHO_N "checking for library containing login... $ECHO_C" >&6; }
12007if test "${ac_cv_search_login+set}" = set; then 11494if test "${ac_cv_search_login+set}" = set; then
12008 $as_echo_n "(cached) " >&6 11495 echo $ECHO_N "(cached) $ECHO_C" >&6
12009else 11496else
12010 ac_func_search_save_LIBS=$LIBS 11497 ac_func_search_save_LIBS=$LIBS
12011cat >conftest.$ac_ext <<_ACEOF 11498cat >conftest.$ac_ext <<_ACEOF
@@ -12043,30 +11530,26 @@ case "(($ac_try" in
12043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12044 *) ac_try_echo=$ac_try;; 11531 *) ac_try_echo=$ac_try;;
12045esac 11532esac
12046eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12047$as_echo "$ac_try_echo") >&5
12048 (eval "$ac_link") 2>conftest.er1 11534 (eval "$ac_link") 2>conftest.er1
12049 ac_status=$? 11535 ac_status=$?
12050 grep -v '^ *+' conftest.er1 >conftest.err 11536 grep -v '^ *+' conftest.er1 >conftest.err
12051 rm -f conftest.er1 11537 rm -f conftest.er1
12052 cat conftest.err >&5 11538 cat conftest.err >&5
12053 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12054 (exit $ac_status); } && { 11540 (exit $ac_status); } && {
12055 test -z "$ac_c_werror_flag" || 11541 test -z "$ac_c_werror_flag" ||
12056 test ! -s conftest.err 11542 test ! -s conftest.err
12057 } && test -s conftest$ac_exeext && { 11543 } && test -s conftest$ac_exeext &&
12058 test "$cross_compiling" = yes || 11544 $as_test_x conftest$ac_exeext; then
12059 $as_test_x conftest$ac_exeext
12060 }; then
12061 ac_cv_search_login=$ac_res 11545 ac_cv_search_login=$ac_res
12062else 11546else
12063 $as_echo "$as_me: failed program was:" >&5 11547 echo "$as_me: failed program was:" >&5
12064sed 's/^/| /' conftest.$ac_ext >&5 11548sed 's/^/| /' conftest.$ac_ext >&5
12065 11549
12066 11550
12067fi 11551fi
12068 11552
12069rm -rf conftest.dSYM
12070rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 11553rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12071 conftest$ac_exeext 11554 conftest$ac_exeext
12072 if test "${ac_cv_search_login+set}" = set; then 11555 if test "${ac_cv_search_login+set}" = set; then
@@ -12081,8 +11564,8 @@ fi
12081rm conftest.$ac_ext 11564rm conftest.$ac_ext
12082LIBS=$ac_func_search_save_LIBS 11565LIBS=$ac_func_search_save_LIBS
12083fi 11566fi
12084{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_login" >&5 11567{ echo "$as_me:$LINENO: result: $ac_cv_search_login" >&5
12085$as_echo "$ac_cv_search_login" >&6; } 11568echo "${ECHO_T}$ac_cv_search_login" >&6; }
12086ac_res=$ac_cv_search_login 11569ac_res=$ac_cv_search_login
12087if test "$ac_res" != no; then 11570if test "$ac_res" != no; then
12088 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 11571 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
@@ -12099,11 +11582,11 @@ fi
12099 11582
12100for ac_func in fmt_scaled logout updwtmp logwtmp 11583for ac_func in fmt_scaled logout updwtmp logwtmp
12101do 11584do
12102as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 11585as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12103{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 11586{ echo "$as_me:$LINENO: checking for $ac_func" >&5
12104$as_echo_n "checking for $ac_func... " >&6; } 11587echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
12105if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 11588if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
12106 $as_echo_n "(cached) " >&6 11589 echo $ECHO_N "(cached) $ECHO_C" >&6
12107else 11590else
12108 cat >conftest.$ac_ext <<_ACEOF 11591 cat >conftest.$ac_ext <<_ACEOF
12109/* confdefs.h. */ 11592/* confdefs.h. */
@@ -12156,41 +11639,35 @@ case "(($ac_try" in
12156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12157 *) ac_try_echo=$ac_try;; 11640 *) ac_try_echo=$ac_try;;
12158esac 11641esac
12159eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12160$as_echo "$ac_try_echo") >&5
12161 (eval "$ac_link") 2>conftest.er1 11643 (eval "$ac_link") 2>conftest.er1
12162 ac_status=$? 11644 ac_status=$?
12163 grep -v '^ *+' conftest.er1 >conftest.err 11645 grep -v '^ *+' conftest.er1 >conftest.err
12164 rm -f conftest.er1 11646 rm -f conftest.er1
12165 cat conftest.err >&5 11647 cat conftest.err >&5
12166 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12167 (exit $ac_status); } && { 11649 (exit $ac_status); } && {
12168 test -z "$ac_c_werror_flag" || 11650 test -z "$ac_c_werror_flag" ||
12169 test ! -s conftest.err 11651 test ! -s conftest.err
12170 } && test -s conftest$ac_exeext && { 11652 } && test -s conftest$ac_exeext &&
12171 test "$cross_compiling" = yes || 11653 $as_test_x conftest$ac_exeext; then
12172 $as_test_x conftest$ac_exeext
12173 }; then
12174 eval "$as_ac_var=yes" 11654 eval "$as_ac_var=yes"
12175else 11655else
12176 $as_echo "$as_me: failed program was:" >&5 11656 echo "$as_me: failed program was:" >&5
12177sed 's/^/| /' conftest.$ac_ext >&5 11657sed 's/^/| /' conftest.$ac_ext >&5
12178 11658
12179 eval "$as_ac_var=no" 11659 eval "$as_ac_var=no"
12180fi 11660fi
12181 11661
12182rm -rf conftest.dSYM
12183rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 11662rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12184 conftest$ac_exeext conftest.$ac_ext 11663 conftest$ac_exeext conftest.$ac_ext
12185fi 11664fi
12186ac_res=`eval 'as_val=${'$as_ac_var'} 11665ac_res=`eval echo '${'$as_ac_var'}'`
12187 $as_echo "$as_val"'` 11666 { echo "$as_me:$LINENO: result: $ac_res" >&5
12188 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 11667echo "${ECHO_T}$ac_res" >&6; }
12189$as_echo "$ac_res" >&6; } 11668if test `eval echo '${'$as_ac_var'}'` = yes; then
12190if test `eval 'as_val=${'$as_ac_var'}
12191 $as_echo "$as_val"'` = yes; then
12192 cat >>confdefs.h <<_ACEOF 11669 cat >>confdefs.h <<_ACEOF
12193#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 11670#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12194_ACEOF 11671_ACEOF
12195 11672
12196fi 11673fi
@@ -12200,11 +11677,11 @@ done
12200 11677
12201for ac_func in strftime 11678for ac_func in strftime
12202do 11679do
12203as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 11680as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12204{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 11681{ echo "$as_me:$LINENO: checking for $ac_func" >&5
12205$as_echo_n "checking for $ac_func... " >&6; } 11682echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
12206if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 11683if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
12207 $as_echo_n "(cached) " >&6 11684 echo $ECHO_N "(cached) $ECHO_C" >&6
12208else 11685else
12209 cat >conftest.$ac_ext <<_ACEOF 11686 cat >conftest.$ac_ext <<_ACEOF
12210/* confdefs.h. */ 11687/* confdefs.h. */
@@ -12257,49 +11734,43 @@ case "(($ac_try" in
12257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12258 *) ac_try_echo=$ac_try;; 11735 *) ac_try_echo=$ac_try;;
12259esac 11736esac
12260eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12261$as_echo "$ac_try_echo") >&5
12262 (eval "$ac_link") 2>conftest.er1 11738 (eval "$ac_link") 2>conftest.er1
12263 ac_status=$? 11739 ac_status=$?
12264 grep -v '^ *+' conftest.er1 >conftest.err 11740 grep -v '^ *+' conftest.er1 >conftest.err
12265 rm -f conftest.er1 11741 rm -f conftest.er1
12266 cat conftest.err >&5 11742 cat conftest.err >&5
12267 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12268 (exit $ac_status); } && { 11744 (exit $ac_status); } && {
12269 test -z "$ac_c_werror_flag" || 11745 test -z "$ac_c_werror_flag" ||
12270 test ! -s conftest.err 11746 test ! -s conftest.err
12271 } && test -s conftest$ac_exeext && { 11747 } && test -s conftest$ac_exeext &&
12272 test "$cross_compiling" = yes || 11748 $as_test_x conftest$ac_exeext; then
12273 $as_test_x conftest$ac_exeext
12274 }; then
12275 eval "$as_ac_var=yes" 11749 eval "$as_ac_var=yes"
12276else 11750else
12277 $as_echo "$as_me: failed program was:" >&5 11751 echo "$as_me: failed program was:" >&5
12278sed 's/^/| /' conftest.$ac_ext >&5 11752sed 's/^/| /' conftest.$ac_ext >&5
12279 11753
12280 eval "$as_ac_var=no" 11754 eval "$as_ac_var=no"
12281fi 11755fi
12282 11756
12283rm -rf conftest.dSYM
12284rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 11757rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12285 conftest$ac_exeext conftest.$ac_ext 11758 conftest$ac_exeext conftest.$ac_ext
12286fi 11759fi
12287ac_res=`eval 'as_val=${'$as_ac_var'} 11760ac_res=`eval echo '${'$as_ac_var'}'`
12288 $as_echo "$as_val"'` 11761 { echo "$as_me:$LINENO: result: $ac_res" >&5
12289 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 11762echo "${ECHO_T}$ac_res" >&6; }
12290$as_echo "$ac_res" >&6; } 11763if test `eval echo '${'$as_ac_var'}'` = yes; then
12291if test `eval 'as_val=${'$as_ac_var'}
12292 $as_echo "$as_val"'` = yes; then
12293 cat >>confdefs.h <<_ACEOF 11764 cat >>confdefs.h <<_ACEOF
12294#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 11765#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12295_ACEOF 11766_ACEOF
12296 11767
12297else 11768else
12298 # strftime is in -lintl on SCO UNIX. 11769 # strftime is in -lintl on SCO UNIX.
12299{ $as_echo "$as_me:$LINENO: checking for strftime in -lintl" >&5 11770{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
12300$as_echo_n "checking for strftime in -lintl... " >&6; } 11771echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
12301if test "${ac_cv_lib_intl_strftime+set}" = set; then 11772if test "${ac_cv_lib_intl_strftime+set}" = set; then
12302 $as_echo_n "(cached) " >&6 11773 echo $ECHO_N "(cached) $ECHO_C" >&6
12303else 11774else
12304 ac_check_lib_save_LIBS=$LIBS 11775 ac_check_lib_save_LIBS=$LIBS
12305LIBS="-lintl $LIBS" 11776LIBS="-lintl $LIBS"
@@ -12331,36 +11802,32 @@ case "(($ac_try" in
12331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12332 *) ac_try_echo=$ac_try;; 11803 *) ac_try_echo=$ac_try;;
12333esac 11804esac
12334eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12335$as_echo "$ac_try_echo") >&5
12336 (eval "$ac_link") 2>conftest.er1 11806 (eval "$ac_link") 2>conftest.er1
12337 ac_status=$? 11807 ac_status=$?
12338 grep -v '^ *+' conftest.er1 >conftest.err 11808 grep -v '^ *+' conftest.er1 >conftest.err
12339 rm -f conftest.er1 11809 rm -f conftest.er1
12340 cat conftest.err >&5 11810 cat conftest.err >&5
12341 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12342 (exit $ac_status); } && { 11812 (exit $ac_status); } && {
12343 test -z "$ac_c_werror_flag" || 11813 test -z "$ac_c_werror_flag" ||
12344 test ! -s conftest.err 11814 test ! -s conftest.err
12345 } && test -s conftest$ac_exeext && { 11815 } && test -s conftest$ac_exeext &&
12346 test "$cross_compiling" = yes || 11816 $as_test_x conftest$ac_exeext; then
12347 $as_test_x conftest$ac_exeext
12348 }; then
12349 ac_cv_lib_intl_strftime=yes 11817 ac_cv_lib_intl_strftime=yes
12350else 11818else
12351 $as_echo "$as_me: failed program was:" >&5 11819 echo "$as_me: failed program was:" >&5
12352sed 's/^/| /' conftest.$ac_ext >&5 11820sed 's/^/| /' conftest.$ac_ext >&5
12353 11821
12354 ac_cv_lib_intl_strftime=no 11822 ac_cv_lib_intl_strftime=no
12355fi 11823fi
12356 11824
12357rm -rf conftest.dSYM
12358rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 11825rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12359 conftest$ac_exeext conftest.$ac_ext 11826 conftest$ac_exeext conftest.$ac_ext
12360LIBS=$ac_check_lib_save_LIBS 11827LIBS=$ac_check_lib_save_LIBS
12361fi 11828fi
12362{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5 11829{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
12363$as_echo "$ac_cv_lib_intl_strftime" >&6; } 11830echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
12364if test $ac_cv_lib_intl_strftime = yes; then 11831if test $ac_cv_lib_intl_strftime = yes; then
12365 cat >>confdefs.h <<\_ACEOF 11832 cat >>confdefs.h <<\_ACEOF
12366#define HAVE_STRFTIME 1 11833#define HAVE_STRFTIME 1
@@ -12374,8 +11841,8 @@ done
12374 11841
12375 11842
12376# Check for ALTDIRFUNC glob() extension 11843# Check for ALTDIRFUNC glob() extension
12377{ $as_echo "$as_me:$LINENO: checking for GLOB_ALTDIRFUNC support" >&5 11844{ echo "$as_me:$LINENO: checking for GLOB_ALTDIRFUNC support" >&5
12378$as_echo_n "checking for GLOB_ALTDIRFUNC support... " >&6; } 11845echo $ECHO_N "checking for GLOB_ALTDIRFUNC support... $ECHO_C" >&6; }
12379cat >conftest.$ac_ext <<_ACEOF 11846cat >conftest.$ac_ext <<_ACEOF
12380/* confdefs.h. */ 11847/* confdefs.h. */
12381_ACEOF 11848_ACEOF
@@ -12397,13 +11864,13 @@ cat >>confdefs.h <<\_ACEOF
12397#define GLOB_HAS_ALTDIRFUNC 1 11864#define GLOB_HAS_ALTDIRFUNC 1
12398_ACEOF 11865_ACEOF
12399 11866
12400 { $as_echo "$as_me:$LINENO: result: yes" >&5 11867 { echo "$as_me:$LINENO: result: yes" >&5
12401$as_echo "yes" >&6; } 11868echo "${ECHO_T}yes" >&6; }
12402 11869
12403else 11870else
12404 11871
12405 { $as_echo "$as_me:$LINENO: result: no" >&5 11872 { echo "$as_me:$LINENO: result: no" >&5
12406$as_echo "no" >&6; } 11873echo "${ECHO_T}no" >&6; }
12407 11874
12408 11875
12409fi 11876fi
@@ -12411,8 +11878,8 @@ rm -f conftest*
12411 11878
12412 11879
12413# Check for g.gl_matchc glob() extension 11880# Check for g.gl_matchc glob() extension
12414{ $as_echo "$as_me:$LINENO: checking for gl_matchc field in glob_t" >&5 11881{ echo "$as_me:$LINENO: checking for gl_matchc field in glob_t" >&5
12415$as_echo_n "checking for gl_matchc field in glob_t... " >&6; } 11882echo $ECHO_N "checking for gl_matchc field in glob_t... $ECHO_C" >&6; }
12416cat >conftest.$ac_ext <<_ACEOF 11883cat >conftest.$ac_ext <<_ACEOF
12417/* confdefs.h. */ 11884/* confdefs.h. */
12418_ACEOF 11885_ACEOF
@@ -12434,14 +11901,13 @@ case "(($ac_try" in
12434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12435 *) ac_try_echo=$ac_try;; 11902 *) ac_try_echo=$ac_try;;
12436esac 11903esac
12437eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12438$as_echo "$ac_try_echo") >&5
12439 (eval "$ac_compile") 2>conftest.er1 11905 (eval "$ac_compile") 2>conftest.er1
12440 ac_status=$? 11906 ac_status=$?
12441 grep -v '^ *+' conftest.er1 >conftest.err 11907 grep -v '^ *+' conftest.er1 >conftest.err
12442 rm -f conftest.er1 11908 rm -f conftest.er1
12443 cat conftest.err >&5 11909 cat conftest.err >&5
12444 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12445 (exit $ac_status); } && { 11911 (exit $ac_status); } && {
12446 test -z "$ac_c_werror_flag" || 11912 test -z "$ac_c_werror_flag" ||
12447 test ! -s conftest.err 11913 test ! -s conftest.err
@@ -12452,26 +11918,26 @@ cat >>confdefs.h <<\_ACEOF
12452#define GLOB_HAS_GL_MATCHC 1 11918#define GLOB_HAS_GL_MATCHC 1
12453_ACEOF 11919_ACEOF
12454 11920
12455 { $as_echo "$as_me:$LINENO: result: yes" >&5 11921 { echo "$as_me:$LINENO: result: yes" >&5
12456$as_echo "yes" >&6; } 11922echo "${ECHO_T}yes" >&6; }
12457 11923
12458else 11924else
12459 $as_echo "$as_me: failed program was:" >&5 11925 echo "$as_me: failed program was:" >&5
12460sed 's/^/| /' conftest.$ac_ext >&5 11926sed 's/^/| /' conftest.$ac_ext >&5
12461 11927
12462 11928
12463 { $as_echo "$as_me:$LINENO: result: no" >&5 11929 { echo "$as_me:$LINENO: result: no" >&5
12464$as_echo "no" >&6; } 11930echo "${ECHO_T}no" >&6; }
12465 11931
12466 11932
12467fi 11933fi
12468 11934
12469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12470 11936
12471{ $as_echo "$as_me:$LINENO: checking whether GLOB_NOMATCH is declared" >&5 11937{ echo "$as_me:$LINENO: checking whether GLOB_NOMATCH is declared" >&5
12472$as_echo_n "checking whether GLOB_NOMATCH is declared... " >&6; } 11938echo $ECHO_N "checking whether GLOB_NOMATCH is declared... $ECHO_C" >&6; }
12473if test "${ac_cv_have_decl_GLOB_NOMATCH+set}" = set; then 11939if test "${ac_cv_have_decl_GLOB_NOMATCH+set}" = set; then
12474 $as_echo_n "(cached) " >&6 11940 echo $ECHO_N "(cached) $ECHO_C" >&6
12475else 11941else
12476 cat >conftest.$ac_ext <<_ACEOF 11942 cat >conftest.$ac_ext <<_ACEOF
12477/* confdefs.h. */ 11943/* confdefs.h. */
@@ -12498,21 +11964,20 @@ case "(($ac_try" in
12498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12499 *) ac_try_echo=$ac_try;; 11965 *) ac_try_echo=$ac_try;;
12500esac 11966esac
12501eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12502$as_echo "$ac_try_echo") >&5
12503 (eval "$ac_compile") 2>conftest.er1 11968 (eval "$ac_compile") 2>conftest.er1
12504 ac_status=$? 11969 ac_status=$?
12505 grep -v '^ *+' conftest.er1 >conftest.err 11970 grep -v '^ *+' conftest.er1 >conftest.err
12506 rm -f conftest.er1 11971 rm -f conftest.er1
12507 cat conftest.err >&5 11972 cat conftest.err >&5
12508 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12509 (exit $ac_status); } && { 11974 (exit $ac_status); } && {
12510 test -z "$ac_c_werror_flag" || 11975 test -z "$ac_c_werror_flag" ||
12511 test ! -s conftest.err 11976 test ! -s conftest.err
12512 } && test -s conftest.$ac_objext; then 11977 } && test -s conftest.$ac_objext; then
12513 ac_cv_have_decl_GLOB_NOMATCH=yes 11978 ac_cv_have_decl_GLOB_NOMATCH=yes
12514else 11979else
12515 $as_echo "$as_me: failed program was:" >&5 11980 echo "$as_me: failed program was:" >&5
12516sed 's/^/| /' conftest.$ac_ext >&5 11981sed 's/^/| /' conftest.$ac_ext >&5
12517 11982
12518 ac_cv_have_decl_GLOB_NOMATCH=no 11983 ac_cv_have_decl_GLOB_NOMATCH=no
@@ -12520,8 +11985,8 @@ fi
12520 11985
12521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12522fi 11987fi
12523{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_GLOB_NOMATCH" >&5 11988{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_GLOB_NOMATCH" >&5
12524$as_echo "$ac_cv_have_decl_GLOB_NOMATCH" >&6; } 11989echo "${ECHO_T}$ac_cv_have_decl_GLOB_NOMATCH" >&6; }
12525if test $ac_cv_have_decl_GLOB_NOMATCH = yes; then 11990if test $ac_cv_have_decl_GLOB_NOMATCH = yes; then
12526 11991
12527cat >>confdefs.h <<_ACEOF 11992cat >>confdefs.h <<_ACEOF
@@ -12539,12 +12004,12 @@ fi
12539 12004
12540 12005
12541 12006
12542{ $as_echo "$as_me:$LINENO: checking whether struct dirent allocates space for d_name" >&5 12007{ echo "$as_me:$LINENO: checking whether struct dirent allocates space for d_name" >&5
12543$as_echo_n "checking whether struct dirent allocates space for d_name... " >&6; } 12008echo $ECHO_N "checking whether struct dirent allocates space for d_name... $ECHO_C" >&6; }
12544if test "$cross_compiling" = yes; then 12009if test "$cross_compiling" = yes; then
12545 12010
12546 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&5 12011 { echo "$as_me:$LINENO: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&5
12547$as_echo "$as_me: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&2;} 12012echo "$as_me: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&2;}
12548 cat >>confdefs.h <<\_ACEOF 12013 cat >>confdefs.h <<\_ACEOF
12549#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1 12014#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1
12550_ACEOF 12015_ACEOF
@@ -12570,33 +12035,31 @@ case "(($ac_try" in
12570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12571 *) ac_try_echo=$ac_try;; 12036 *) ac_try_echo=$ac_try;;
12572esac 12037esac
12573eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12574$as_echo "$ac_try_echo") >&5
12575 (eval "$ac_link") 2>&5 12039 (eval "$ac_link") 2>&5
12576 ac_status=$? 12040 ac_status=$?
12577 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12578 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 12042 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12579 { (case "(($ac_try" in 12043 { (case "(($ac_try" in
12580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12581 *) ac_try_echo=$ac_try;; 12045 *) ac_try_echo=$ac_try;;
12582esac 12046esac
12583eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12584$as_echo "$ac_try_echo") >&5
12585 (eval "$ac_try") 2>&5 12048 (eval "$ac_try") 2>&5
12586 ac_status=$? 12049 ac_status=$?
12587 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12588 (exit $ac_status); }; }; then 12051 (exit $ac_status); }; }; then
12589 { $as_echo "$as_me:$LINENO: result: yes" >&5 12052 { echo "$as_me:$LINENO: result: yes" >&5
12590$as_echo "yes" >&6; } 12053echo "${ECHO_T}yes" >&6; }
12591else 12054else
12592 $as_echo "$as_me: program exited with status $ac_status" >&5 12055 echo "$as_me: program exited with status $ac_status" >&5
12593$as_echo "$as_me: failed program was:" >&5 12056echo "$as_me: failed program was:" >&5
12594sed 's/^/| /' conftest.$ac_ext >&5 12057sed 's/^/| /' conftest.$ac_ext >&5
12595 12058
12596( exit $ac_status ) 12059( exit $ac_status )
12597 12060
12598 { $as_echo "$as_me:$LINENO: result: no" >&5 12061 { echo "$as_me:$LINENO: result: no" >&5
12599$as_echo "no" >&6; } 12062echo "${ECHO_T}no" >&6; }
12600 12063
12601cat >>confdefs.h <<\_ACEOF 12064cat >>confdefs.h <<\_ACEOF
12602#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1 12065#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1
@@ -12604,25 +12067,24 @@ _ACEOF
12604 12067
12605 12068
12606fi 12069fi
12607rm -rf conftest.dSYM
12608rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 12070rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12609fi 12071fi
12610 12072
12611 12073
12612 12074
12613{ $as_echo "$as_me:$LINENO: checking for /proc/pid/fd directory" >&5 12075{ echo "$as_me:$LINENO: checking for /proc/pid/fd directory" >&5
12614$as_echo_n "checking for /proc/pid/fd directory... " >&6; } 12076echo $ECHO_N "checking for /proc/pid/fd directory... $ECHO_C" >&6; }
12615if test -d "/proc/$$/fd" ; then 12077if test -d "/proc/$$/fd" ; then
12616 12078
12617cat >>confdefs.h <<\_ACEOF 12079cat >>confdefs.h <<\_ACEOF
12618#define HAVE_PROC_PID 1 12080#define HAVE_PROC_PID 1
12619_ACEOF 12081_ACEOF
12620 12082
12621 { $as_echo "$as_me:$LINENO: result: yes" >&5 12083 { echo "$as_me:$LINENO: result: yes" >&5
12622$as_echo "yes" >&6; } 12084echo "${ECHO_T}yes" >&6; }
12623else 12085else
12624 { $as_echo "$as_me:$LINENO: result: no" >&5 12086 { echo "$as_me:$LINENO: result: no" >&5
12625$as_echo "no" >&6; } 12087echo "${ECHO_T}no" >&6; }
12626fi 12088fi
12627 12089
12628# Check whether user wants S/Key support 12090# Check whether user wants S/Key support
@@ -12646,8 +12108,8 @@ _ACEOF
12646 LIBS="-lskey $LIBS" 12108 LIBS="-lskey $LIBS"
12647 SKEY_MSG="yes" 12109 SKEY_MSG="yes"
12648 12110
12649 { $as_echo "$as_me:$LINENO: checking for s/key support" >&5 12111 { echo "$as_me:$LINENO: checking for s/key support" >&5
12650$as_echo_n "checking for s/key support... " >&6; } 12112echo $ECHO_N "checking for s/key support... $ECHO_C" >&6; }
12651 cat >conftest.$ac_ext <<_ACEOF 12113 cat >conftest.$ac_ext <<_ACEOF
12652/* confdefs.h. */ 12114/* confdefs.h. */
12653_ACEOF 12115_ACEOF
@@ -12666,41 +12128,37 @@ case "(($ac_try" in
12666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12667 *) ac_try_echo=$ac_try;; 12129 *) ac_try_echo=$ac_try;;
12668esac 12130esac
12669eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12670$as_echo "$ac_try_echo") >&5
12671 (eval "$ac_link") 2>conftest.er1 12132 (eval "$ac_link") 2>conftest.er1
12672 ac_status=$? 12133 ac_status=$?
12673 grep -v '^ *+' conftest.er1 >conftest.err 12134 grep -v '^ *+' conftest.er1 >conftest.err
12674 rm -f conftest.er1 12135 rm -f conftest.er1
12675 cat conftest.err >&5 12136 cat conftest.err >&5
12676 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12677 (exit $ac_status); } && { 12138 (exit $ac_status); } && {
12678 test -z "$ac_c_werror_flag" || 12139 test -z "$ac_c_werror_flag" ||
12679 test ! -s conftest.err 12140 test ! -s conftest.err
12680 } && test -s conftest$ac_exeext && { 12141 } && test -s conftest$ac_exeext &&
12681 test "$cross_compiling" = yes || 12142 $as_test_x conftest$ac_exeext; then
12682 $as_test_x conftest$ac_exeext 12143 { echo "$as_me:$LINENO: result: yes" >&5
12683 }; then 12144echo "${ECHO_T}yes" >&6; }
12684 { $as_echo "$as_me:$LINENO: result: yes" >&5
12685$as_echo "yes" >&6; }
12686else 12145else
12687 $as_echo "$as_me: failed program was:" >&5 12146 echo "$as_me: failed program was:" >&5
12688sed 's/^/| /' conftest.$ac_ext >&5 12147sed 's/^/| /' conftest.$ac_ext >&5
12689 12148
12690 12149
12691 { $as_echo "$as_me:$LINENO: result: no" >&5 12150 { echo "$as_me:$LINENO: result: no" >&5
12692$as_echo "no" >&6; } 12151echo "${ECHO_T}no" >&6; }
12693 { { $as_echo "$as_me:$LINENO: error: ** Incomplete or missing s/key libraries." >&5 12152 { { echo "$as_me:$LINENO: error: ** Incomplete or missing s/key libraries." >&5
12694$as_echo "$as_me: error: ** Incomplete or missing s/key libraries." >&2;} 12153echo "$as_me: error: ** Incomplete or missing s/key libraries." >&2;}
12695 { (exit 1); exit 1; }; } 12154 { (exit 1); exit 1; }; }
12696 12155
12697fi 12156fi
12698 12157
12699rm -rf conftest.dSYM
12700rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 12158rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12701 conftest$ac_exeext conftest.$ac_ext 12159 conftest$ac_exeext conftest.$ac_ext
12702 { $as_echo "$as_me:$LINENO: checking if skeychallenge takes 4 arguments" >&5 12160 { echo "$as_me:$LINENO: checking if skeychallenge takes 4 arguments" >&5
12703$as_echo_n "checking if skeychallenge takes 4 arguments... " >&6; } 12161echo $ECHO_N "checking if skeychallenge takes 4 arguments... $ECHO_C" >&6; }
12704 cat >conftest.$ac_ext <<_ACEOF 12162 cat >conftest.$ac_ext <<_ACEOF
12705/* confdefs.h. */ 12163/* confdefs.h. */
12706_ACEOF 12164_ACEOF
@@ -12723,31 +12181,30 @@ case "(($ac_try" in
12723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12724 *) ac_try_echo=$ac_try;; 12182 *) ac_try_echo=$ac_try;;
12725esac 12183esac
12726eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12727$as_echo "$ac_try_echo") >&5
12728 (eval "$ac_compile") 2>conftest.er1 12185 (eval "$ac_compile") 2>conftest.er1
12729 ac_status=$? 12186 ac_status=$?
12730 grep -v '^ *+' conftest.er1 >conftest.err 12187 grep -v '^ *+' conftest.er1 >conftest.err
12731 rm -f conftest.er1 12188 rm -f conftest.er1
12732 cat conftest.err >&5 12189 cat conftest.err >&5
12733 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12734 (exit $ac_status); } && { 12191 (exit $ac_status); } && {
12735 test -z "$ac_c_werror_flag" || 12192 test -z "$ac_c_werror_flag" ||
12736 test ! -s conftest.err 12193 test ! -s conftest.err
12737 } && test -s conftest.$ac_objext; then 12194 } && test -s conftest.$ac_objext; then
12738 { $as_echo "$as_me:$LINENO: result: yes" >&5 12195 { echo "$as_me:$LINENO: result: yes" >&5
12739$as_echo "yes" >&6; } 12196echo "${ECHO_T}yes" >&6; }
12740 12197
12741cat >>confdefs.h <<\_ACEOF 12198cat >>confdefs.h <<\_ACEOF
12742#define SKEYCHALLENGE_4ARG 1 12199#define SKEYCHALLENGE_4ARG 1
12743_ACEOF 12200_ACEOF
12744 12201
12745else 12202else
12746 $as_echo "$as_me: failed program was:" >&5 12203 echo "$as_me: failed program was:" >&5
12747sed 's/^/| /' conftest.$ac_ext >&5 12204sed 's/^/| /' conftest.$ac_ext >&5
12748 12205
12749 { $as_echo "$as_me:$LINENO: result: no" >&5 12206 { echo "$as_me:$LINENO: result: no" >&5
12750$as_echo "no" >&6; } 12207echo "${ECHO_T}no" >&6; }
12751 12208
12752fi 12209fi
12753 12210
@@ -12790,8 +12247,8 @@ if test "${with_tcp_wrappers+set}" = set; then
12790 fi 12247 fi
12791 fi 12248 fi
12792 LIBS="-lwrap $LIBS" 12249 LIBS="-lwrap $LIBS"
12793 { $as_echo "$as_me:$LINENO: checking for libwrap" >&5 12250 { echo "$as_me:$LINENO: checking for libwrap" >&5
12794$as_echo_n "checking for libwrap... " >&6; } 12251echo $ECHO_N "checking for libwrap... $ECHO_C" >&6; }
12795 cat >conftest.$ac_ext <<_ACEOF 12252 cat >conftest.$ac_ext <<_ACEOF
12796/* confdefs.h. */ 12253/* confdefs.h. */
12797_ACEOF 12254_ACEOF
@@ -12819,24 +12276,21 @@ case "(($ac_try" in
12819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12820 *) ac_try_echo=$ac_try;; 12277 *) ac_try_echo=$ac_try;;
12821esac 12278esac
12822eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12823$as_echo "$ac_try_echo") >&5
12824 (eval "$ac_link") 2>conftest.er1 12280 (eval "$ac_link") 2>conftest.er1
12825 ac_status=$? 12281 ac_status=$?
12826 grep -v '^ *+' conftest.er1 >conftest.err 12282 grep -v '^ *+' conftest.er1 >conftest.err
12827 rm -f conftest.er1 12283 rm -f conftest.er1
12828 cat conftest.err >&5 12284 cat conftest.err >&5
12829 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12830 (exit $ac_status); } && { 12286 (exit $ac_status); } && {
12831 test -z "$ac_c_werror_flag" || 12287 test -z "$ac_c_werror_flag" ||
12832 test ! -s conftest.err 12288 test ! -s conftest.err
12833 } && test -s conftest$ac_exeext && { 12289 } && test -s conftest$ac_exeext &&
12834 test "$cross_compiling" = yes || 12290 $as_test_x conftest$ac_exeext; then
12835 $as_test_x conftest$ac_exeext
12836 }; then
12837 12291
12838 { $as_echo "$as_me:$LINENO: result: yes" >&5 12292 { echo "$as_me:$LINENO: result: yes" >&5
12839$as_echo "yes" >&6; } 12293echo "${ECHO_T}yes" >&6; }
12840 12294
12841cat >>confdefs.h <<\_ACEOF 12295cat >>confdefs.h <<\_ACEOF
12842#define LIBWRAP 1 12296#define LIBWRAP 1
@@ -12846,18 +12300,17 @@ _ACEOF
12846 TCPW_MSG="yes" 12300 TCPW_MSG="yes"
12847 12301
12848else 12302else
12849 $as_echo "$as_me: failed program was:" >&5 12303 echo "$as_me: failed program was:" >&5
12850sed 's/^/| /' conftest.$ac_ext >&5 12304sed 's/^/| /' conftest.$ac_ext >&5
12851 12305
12852 12306
12853 { { $as_echo "$as_me:$LINENO: error: *** libwrap missing" >&5 12307 { { echo "$as_me:$LINENO: error: *** libwrap missing" >&5
12854$as_echo "$as_me: error: *** libwrap missing" >&2;} 12308echo "$as_me: error: *** libwrap missing" >&2;}
12855 { (exit 1); exit 1; }; } 12309 { (exit 1); exit 1; }; }
12856 12310
12857 12311
12858fi 12312fi
12859 12313
12860rm -rf conftest.dSYM
12861rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 12314rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12862 conftest$ac_exeext conftest.$ac_ext 12315 conftest$ac_exeext conftest.$ac_ext
12863 LIBS="$saved_LIBS" 12316 LIBS="$saved_LIBS"
@@ -12881,10 +12334,10 @@ if test "${with_libedit+set}" = set; then
12881 LDFLAGS="-L${withval}/lib ${LDFLAGS}" 12334 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
12882 fi 12335 fi
12883 fi 12336 fi
12884 { $as_echo "$as_me:$LINENO: checking for el_init in -ledit" >&5 12337 { echo "$as_me:$LINENO: checking for el_init in -ledit" >&5
12885$as_echo_n "checking for el_init in -ledit... " >&6; } 12338echo $ECHO_N "checking for el_init in -ledit... $ECHO_C" >&6; }
12886if test "${ac_cv_lib_edit_el_init+set}" = set; then 12339if test "${ac_cv_lib_edit_el_init+set}" = set; then
12887 $as_echo_n "(cached) " >&6 12340 echo $ECHO_N "(cached) $ECHO_C" >&6
12888else 12341else
12889 ac_check_lib_save_LIBS=$LIBS 12342 ac_check_lib_save_LIBS=$LIBS
12890LIBS="-ledit -lcurses 12343LIBS="-ledit -lcurses
@@ -12917,36 +12370,32 @@ case "(($ac_try" in
12917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12918 *) ac_try_echo=$ac_try;; 12371 *) ac_try_echo=$ac_try;;
12919esac 12372esac
12920eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12921$as_echo "$ac_try_echo") >&5
12922 (eval "$ac_link") 2>conftest.er1 12374 (eval "$ac_link") 2>conftest.er1
12923 ac_status=$? 12375 ac_status=$?
12924 grep -v '^ *+' conftest.er1 >conftest.err 12376 grep -v '^ *+' conftest.er1 >conftest.err
12925 rm -f conftest.er1 12377 rm -f conftest.er1
12926 cat conftest.err >&5 12378 cat conftest.err >&5
12927 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12928 (exit $ac_status); } && { 12380 (exit $ac_status); } && {
12929 test -z "$ac_c_werror_flag" || 12381 test -z "$ac_c_werror_flag" ||
12930 test ! -s conftest.err 12382 test ! -s conftest.err
12931 } && test -s conftest$ac_exeext && { 12383 } && test -s conftest$ac_exeext &&
12932 test "$cross_compiling" = yes || 12384 $as_test_x conftest$ac_exeext; then
12933 $as_test_x conftest$ac_exeext
12934 }; then
12935 ac_cv_lib_edit_el_init=yes 12385 ac_cv_lib_edit_el_init=yes
12936else 12386else
12937 $as_echo "$as_me: failed program was:" >&5 12387 echo "$as_me: failed program was:" >&5
12938sed 's/^/| /' conftest.$ac_ext >&5 12388sed 's/^/| /' conftest.$ac_ext >&5
12939 12389
12940 ac_cv_lib_edit_el_init=no 12390 ac_cv_lib_edit_el_init=no
12941fi 12391fi
12942 12392
12943rm -rf conftest.dSYM
12944rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 12393rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12945 conftest$ac_exeext conftest.$ac_ext 12394 conftest$ac_exeext conftest.$ac_ext
12946LIBS=$ac_check_lib_save_LIBS 12395LIBS=$ac_check_lib_save_LIBS
12947fi 12396fi
12948{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_edit_el_init" >&5 12397{ echo "$as_me:$LINENO: result: $ac_cv_lib_edit_el_init" >&5
12949$as_echo "$ac_cv_lib_edit_el_init" >&6; } 12398echo "${ECHO_T}$ac_cv_lib_edit_el_init" >&6; }
12950if test $ac_cv_lib_edit_el_init = yes; then 12399if test $ac_cv_lib_edit_el_init = yes; then
12951 12400
12952cat >>confdefs.h <<\_ACEOF 12401cat >>confdefs.h <<\_ACEOF
@@ -12958,13 +12407,13 @@ _ACEOF
12958 12407
12959 12408
12960else 12409else
12961 { { $as_echo "$as_me:$LINENO: error: libedit not found" >&5 12410 { { echo "$as_me:$LINENO: error: libedit not found" >&5
12962$as_echo "$as_me: error: libedit not found" >&2;} 12411echo "$as_me: error: libedit not found" >&2;}
12963 { (exit 1); exit 1; }; } 12412 { (exit 1); exit 1; }; }
12964fi 12413fi
12965 12414
12966 { $as_echo "$as_me:$LINENO: checking if libedit version is compatible" >&5 12415 { echo "$as_me:$LINENO: checking if libedit version is compatible" >&5
12967$as_echo_n "checking if libedit version is compatible... " >&6; } 12416echo $ECHO_N "checking if libedit version is compatible... $ECHO_C" >&6; }
12968 cat >conftest.$ac_ext <<_ACEOF 12417 cat >conftest.$ac_ext <<_ACEOF
12969/* confdefs.h. */ 12418/* confdefs.h. */
12970_ACEOF 12419_ACEOF
@@ -12987,28 +12436,27 @@ case "(($ac_try" in
12987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12988 *) ac_try_echo=$ac_try;; 12437 *) ac_try_echo=$ac_try;;
12989esac 12438esac
12990eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12991$as_echo "$ac_try_echo") >&5
12992 (eval "$ac_compile") 2>conftest.er1 12440 (eval "$ac_compile") 2>conftest.er1
12993 ac_status=$? 12441 ac_status=$?
12994 grep -v '^ *+' conftest.er1 >conftest.err 12442 grep -v '^ *+' conftest.er1 >conftest.err
12995 rm -f conftest.er1 12443 rm -f conftest.er1
12996 cat conftest.err >&5 12444 cat conftest.err >&5
12997 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12998 (exit $ac_status); } && { 12446 (exit $ac_status); } && {
12999 test -z "$ac_c_werror_flag" || 12447 test -z "$ac_c_werror_flag" ||
13000 test ! -s conftest.err 12448 test ! -s conftest.err
13001 } && test -s conftest.$ac_objext; then 12449 } && test -s conftest.$ac_objext; then
13002 { $as_echo "$as_me:$LINENO: result: yes" >&5 12450 { echo "$as_me:$LINENO: result: yes" >&5
13003$as_echo "yes" >&6; } 12451echo "${ECHO_T}yes" >&6; }
13004else 12452else
13005 $as_echo "$as_me: failed program was:" >&5 12453 echo "$as_me: failed program was:" >&5
13006sed 's/^/| /' conftest.$ac_ext >&5 12454sed 's/^/| /' conftest.$ac_ext >&5
13007 12455
13008 { $as_echo "$as_me:$LINENO: result: no" >&5 12456 { echo "$as_me:$LINENO: result: no" >&5
13009$as_echo "no" >&6; } 12457echo "${ECHO_T}no" >&6; }
13010 { { $as_echo "$as_me:$LINENO: error: libedit version is not compatible" >&5 12458 { { echo "$as_me:$LINENO: error: libedit version is not compatible" >&5
13011$as_echo "$as_me: error: libedit version is not compatible" >&2;} 12459echo "$as_me: error: libedit version is not compatible" >&2;}
13012 { (exit 1); exit 1; }; } 12460 { (exit 1); exit 1; }; }
13013 12461
13014fi 12462fi
@@ -13024,21 +12472,21 @@ AUDIT_MODULE=none
13024# Check whether --with-audit was given. 12472# Check whether --with-audit was given.
13025if test "${with_audit+set}" = set; then 12473if test "${with_audit+set}" = set; then
13026 withval=$with_audit; 12474 withval=$with_audit;
13027 { $as_echo "$as_me:$LINENO: checking for supported audit module" >&5 12475 { echo "$as_me:$LINENO: checking for supported audit module" >&5
13028$as_echo_n "checking for supported audit module... " >&6; } 12476echo $ECHO_N "checking for supported audit module... $ECHO_C" >&6; }
13029 case "$withval" in 12477 case "$withval" in
13030 bsm) 12478 bsm)
13031 { $as_echo "$as_me:$LINENO: result: bsm" >&5 12479 { echo "$as_me:$LINENO: result: bsm" >&5
13032$as_echo "bsm" >&6; } 12480echo "${ECHO_T}bsm" >&6; }
13033 AUDIT_MODULE=bsm 12481 AUDIT_MODULE=bsm
13034 12482
13035for ac_header in bsm/audit.h 12483for ac_header in bsm/audit.h
13036do 12484do
13037as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 12485as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13038{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 12486{ echo "$as_me:$LINENO: checking for $ac_header" >&5
13039$as_echo_n "checking for $ac_header... " >&6; } 12487echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13040if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 12488if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13041 $as_echo_n "(cached) " >&6 12489 echo $ECHO_N "(cached) $ECHO_C" >&6
13042else 12490else
13043 cat >conftest.$ac_ext <<_ACEOF 12491 cat >conftest.$ac_ext <<_ACEOF
13044/* confdefs.h. */ 12492/* confdefs.h. */
@@ -13061,21 +12509,20 @@ case "(($ac_try" in
13061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13062 *) ac_try_echo=$ac_try;; 12510 *) ac_try_echo=$ac_try;;
13063esac 12511esac
13064eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13065$as_echo "$ac_try_echo") >&5
13066 (eval "$ac_compile") 2>conftest.er1 12513 (eval "$ac_compile") 2>conftest.er1
13067 ac_status=$? 12514 ac_status=$?
13068 grep -v '^ *+' conftest.er1 >conftest.err 12515 grep -v '^ *+' conftest.er1 >conftest.err
13069 rm -f conftest.er1 12516 rm -f conftest.er1
13070 cat conftest.err >&5 12517 cat conftest.err >&5
13071 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13072 (exit $ac_status); } && { 12519 (exit $ac_status); } && {
13073 test -z "$ac_c_werror_flag" || 12520 test -z "$ac_c_werror_flag" ||
13074 test ! -s conftest.err 12521 test ! -s conftest.err
13075 } && test -s conftest.$ac_objext; then 12522 } && test -s conftest.$ac_objext; then
13076 eval "$as_ac_Header=yes" 12523 eval "$as_ac_Header=yes"
13077else 12524else
13078 $as_echo "$as_me: failed program was:" >&5 12525 echo "$as_me: failed program was:" >&5
13079sed 's/^/| /' conftest.$ac_ext >&5 12526sed 's/^/| /' conftest.$ac_ext >&5
13080 12527
13081 eval "$as_ac_Header=no" 12528 eval "$as_ac_Header=no"
@@ -13083,29 +12530,27 @@ fi
13083 12530
13084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13085fi 12532fi
13086ac_res=`eval 'as_val=${'$as_ac_Header'} 12533ac_res=`eval echo '${'$as_ac_Header'}'`
13087 $as_echo "$as_val"'` 12534 { echo "$as_me:$LINENO: result: $ac_res" >&5
13088 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 12535echo "${ECHO_T}$ac_res" >&6; }
13089$as_echo "$ac_res" >&6; } 12536if test `eval echo '${'$as_ac_Header'}'` = yes; then
13090if test `eval 'as_val=${'$as_ac_Header'}
13091 $as_echo "$as_val"'` = yes; then
13092 cat >>confdefs.h <<_ACEOF 12537 cat >>confdefs.h <<_ACEOF
13093#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 12538#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13094_ACEOF 12539_ACEOF
13095 12540
13096else 12541else
13097 { { $as_echo "$as_me:$LINENO: error: BSM enabled and bsm/audit.h not found" >&5 12542 { { echo "$as_me:$LINENO: error: BSM enabled and bsm/audit.h not found" >&5
13098$as_echo "$as_me: error: BSM enabled and bsm/audit.h not found" >&2;} 12543echo "$as_me: error: BSM enabled and bsm/audit.h not found" >&2;}
13099 { (exit 1); exit 1; }; } 12544 { (exit 1); exit 1; }; }
13100fi 12545fi
13101 12546
13102done 12547done
13103 12548
13104 12549
13105{ $as_echo "$as_me:$LINENO: checking for getaudit in -lbsm" >&5 12550{ echo "$as_me:$LINENO: checking for getaudit in -lbsm" >&5
13106$as_echo_n "checking for getaudit in -lbsm... " >&6; } 12551echo $ECHO_N "checking for getaudit in -lbsm... $ECHO_C" >&6; }
13107if test "${ac_cv_lib_bsm_getaudit+set}" = set; then 12552if test "${ac_cv_lib_bsm_getaudit+set}" = set; then
13108 $as_echo_n "(cached) " >&6 12553 echo $ECHO_N "(cached) $ECHO_C" >&6
13109else 12554else
13110 ac_check_lib_save_LIBS=$LIBS 12555 ac_check_lib_save_LIBS=$LIBS
13111LIBS="-lbsm $LIBS" 12556LIBS="-lbsm $LIBS"
@@ -13137,36 +12582,32 @@ case "(($ac_try" in
13137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13138 *) ac_try_echo=$ac_try;; 12583 *) ac_try_echo=$ac_try;;
13139esac 12584esac
13140eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13141$as_echo "$ac_try_echo") >&5
13142 (eval "$ac_link") 2>conftest.er1 12586 (eval "$ac_link") 2>conftest.er1
13143 ac_status=$? 12587 ac_status=$?
13144 grep -v '^ *+' conftest.er1 >conftest.err 12588 grep -v '^ *+' conftest.er1 >conftest.err
13145 rm -f conftest.er1 12589 rm -f conftest.er1
13146 cat conftest.err >&5 12590 cat conftest.err >&5
13147 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13148 (exit $ac_status); } && { 12592 (exit $ac_status); } && {
13149 test -z "$ac_c_werror_flag" || 12593 test -z "$ac_c_werror_flag" ||
13150 test ! -s conftest.err 12594 test ! -s conftest.err
13151 } && test -s conftest$ac_exeext && { 12595 } && test -s conftest$ac_exeext &&
13152 test "$cross_compiling" = yes || 12596 $as_test_x conftest$ac_exeext; then
13153 $as_test_x conftest$ac_exeext
13154 }; then
13155 ac_cv_lib_bsm_getaudit=yes 12597 ac_cv_lib_bsm_getaudit=yes
13156else 12598else
13157 $as_echo "$as_me: failed program was:" >&5 12599 echo "$as_me: failed program was:" >&5
13158sed 's/^/| /' conftest.$ac_ext >&5 12600sed 's/^/| /' conftest.$ac_ext >&5
13159 12601
13160 ac_cv_lib_bsm_getaudit=no 12602 ac_cv_lib_bsm_getaudit=no
13161fi 12603fi
13162 12604
13163rm -rf conftest.dSYM
13164rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 12605rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13165 conftest$ac_exeext conftest.$ac_ext 12606 conftest$ac_exeext conftest.$ac_ext
13166LIBS=$ac_check_lib_save_LIBS 12607LIBS=$ac_check_lib_save_LIBS
13167fi 12608fi
13168{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsm_getaudit" >&5 12609{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsm_getaudit" >&5
13169$as_echo "$ac_cv_lib_bsm_getaudit" >&6; } 12610echo "${ECHO_T}$ac_cv_lib_bsm_getaudit" >&6; }
13170if test $ac_cv_lib_bsm_getaudit = yes; then 12611if test $ac_cv_lib_bsm_getaudit = yes; then
13171 cat >>confdefs.h <<_ACEOF 12612 cat >>confdefs.h <<_ACEOF
13172#define HAVE_LIBBSM 1 12613#define HAVE_LIBBSM 1
@@ -13175,19 +12616,19 @@ _ACEOF
13175 LIBS="-lbsm $LIBS" 12616 LIBS="-lbsm $LIBS"
13176 12617
13177else 12618else
13178 { { $as_echo "$as_me:$LINENO: error: BSM enabled and required library not found" >&5 12619 { { echo "$as_me:$LINENO: error: BSM enabled and required library not found" >&5
13179$as_echo "$as_me: error: BSM enabled and required library not found" >&2;} 12620echo "$as_me: error: BSM enabled and required library not found" >&2;}
13180 { (exit 1); exit 1; }; } 12621 { (exit 1); exit 1; }; }
13181fi 12622fi
13182 12623
13183 12624
13184for ac_func in getaudit 12625for ac_func in getaudit
13185do 12626do
13186as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 12627as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13187{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 12628{ echo "$as_me:$LINENO: checking for $ac_func" >&5
13188$as_echo_n "checking for $ac_func... " >&6; } 12629echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
13189if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 12630if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
13190 $as_echo_n "(cached) " >&6 12631 echo $ECHO_N "(cached) $ECHO_C" >&6
13191else 12632else
13192 cat >conftest.$ac_ext <<_ACEOF 12633 cat >conftest.$ac_ext <<_ACEOF
13193/* confdefs.h. */ 12634/* confdefs.h. */
@@ -13240,46 +12681,40 @@ case "(($ac_try" in
13240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13241 *) ac_try_echo=$ac_try;; 12682 *) ac_try_echo=$ac_try;;
13242esac 12683esac
13243eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13244$as_echo "$ac_try_echo") >&5
13245 (eval "$ac_link") 2>conftest.er1 12685 (eval "$ac_link") 2>conftest.er1
13246 ac_status=$? 12686 ac_status=$?
13247 grep -v '^ *+' conftest.er1 >conftest.err 12687 grep -v '^ *+' conftest.er1 >conftest.err
13248 rm -f conftest.er1 12688 rm -f conftest.er1
13249 cat conftest.err >&5 12689 cat conftest.err >&5
13250 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13251 (exit $ac_status); } && { 12691 (exit $ac_status); } && {
13252 test -z "$ac_c_werror_flag" || 12692 test -z "$ac_c_werror_flag" ||
13253 test ! -s conftest.err 12693 test ! -s conftest.err
13254 } && test -s conftest$ac_exeext && { 12694 } && test -s conftest$ac_exeext &&
13255 test "$cross_compiling" = yes || 12695 $as_test_x conftest$ac_exeext; then
13256 $as_test_x conftest$ac_exeext
13257 }; then
13258 eval "$as_ac_var=yes" 12696 eval "$as_ac_var=yes"
13259else 12697else
13260 $as_echo "$as_me: failed program was:" >&5 12698 echo "$as_me: failed program was:" >&5
13261sed 's/^/| /' conftest.$ac_ext >&5 12699sed 's/^/| /' conftest.$ac_ext >&5
13262 12700
13263 eval "$as_ac_var=no" 12701 eval "$as_ac_var=no"
13264fi 12702fi
13265 12703
13266rm -rf conftest.dSYM
13267rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 12704rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13268 conftest$ac_exeext conftest.$ac_ext 12705 conftest$ac_exeext conftest.$ac_ext
13269fi 12706fi
13270ac_res=`eval 'as_val=${'$as_ac_var'} 12707ac_res=`eval echo '${'$as_ac_var'}'`
13271 $as_echo "$as_val"'` 12708 { echo "$as_me:$LINENO: result: $ac_res" >&5
13272 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 12709echo "${ECHO_T}$ac_res" >&6; }
13273$as_echo "$ac_res" >&6; } 12710if test `eval echo '${'$as_ac_var'}'` = yes; then
13274if test `eval 'as_val=${'$as_ac_var'}
13275 $as_echo "$as_val"'` = yes; then
13276 cat >>confdefs.h <<_ACEOF 12711 cat >>confdefs.h <<_ACEOF
13277#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 12712#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13278_ACEOF 12713_ACEOF
13279 12714
13280else 12715else
13281 { { $as_echo "$as_me:$LINENO: error: BSM enabled and required function not found" >&5 12716 { { echo "$as_me:$LINENO: error: BSM enabled and required function not found" >&5
13282$as_echo "$as_me: error: BSM enabled and required function not found" >&2;} 12717echo "$as_me: error: BSM enabled and required function not found" >&2;}
13283 { (exit 1); exit 1; }; } 12718 { (exit 1); exit 1; }; }
13284fi 12719fi
13285done 12720done
@@ -13289,11 +12724,11 @@ done
13289 12724
13290for ac_func in getaudit_addr aug_get_machine 12725for ac_func in getaudit_addr aug_get_machine
13291do 12726do
13292as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 12727as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13293{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 12728{ echo "$as_me:$LINENO: checking for $ac_func" >&5
13294$as_echo_n "checking for $ac_func... " >&6; } 12729echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
13295if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 12730if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
13296 $as_echo_n "(cached) " >&6 12731 echo $ECHO_N "(cached) $ECHO_C" >&6
13297else 12732else
13298 cat >conftest.$ac_ext <<_ACEOF 12733 cat >conftest.$ac_ext <<_ACEOF
13299/* confdefs.h. */ 12734/* confdefs.h. */
@@ -13346,41 +12781,35 @@ case "(($ac_try" in
13346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13347 *) ac_try_echo=$ac_try;; 12782 *) ac_try_echo=$ac_try;;
13348esac 12783esac
13349eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13350$as_echo "$ac_try_echo") >&5
13351 (eval "$ac_link") 2>conftest.er1 12785 (eval "$ac_link") 2>conftest.er1
13352 ac_status=$? 12786 ac_status=$?
13353 grep -v '^ *+' conftest.er1 >conftest.err 12787 grep -v '^ *+' conftest.er1 >conftest.err
13354 rm -f conftest.er1 12788 rm -f conftest.er1
13355 cat conftest.err >&5 12789 cat conftest.err >&5
13356 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13357 (exit $ac_status); } && { 12791 (exit $ac_status); } && {
13358 test -z "$ac_c_werror_flag" || 12792 test -z "$ac_c_werror_flag" ||
13359 test ! -s conftest.err 12793 test ! -s conftest.err
13360 } && test -s conftest$ac_exeext && { 12794 } && test -s conftest$ac_exeext &&
13361 test "$cross_compiling" = yes || 12795 $as_test_x conftest$ac_exeext; then
13362 $as_test_x conftest$ac_exeext
13363 }; then
13364 eval "$as_ac_var=yes" 12796 eval "$as_ac_var=yes"
13365else 12797else
13366 $as_echo "$as_me: failed program was:" >&5 12798 echo "$as_me: failed program was:" >&5
13367sed 's/^/| /' conftest.$ac_ext >&5 12799sed 's/^/| /' conftest.$ac_ext >&5
13368 12800
13369 eval "$as_ac_var=no" 12801 eval "$as_ac_var=no"
13370fi 12802fi
13371 12803
13372rm -rf conftest.dSYM
13373rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 12804rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13374 conftest$ac_exeext conftest.$ac_ext 12805 conftest$ac_exeext conftest.$ac_ext
13375fi 12806fi
13376ac_res=`eval 'as_val=${'$as_ac_var'} 12807ac_res=`eval echo '${'$as_ac_var'}'`
13377 $as_echo "$as_val"'` 12808 { echo "$as_me:$LINENO: result: $ac_res" >&5
13378 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 12809echo "${ECHO_T}$ac_res" >&6; }
13379$as_echo "$ac_res" >&6; } 12810if test `eval echo '${'$as_ac_var'}'` = yes; then
13380if test `eval 'as_val=${'$as_ac_var'}
13381 $as_echo "$as_val"'` = yes; then
13382 cat >>confdefs.h <<_ACEOF 12811 cat >>confdefs.h <<_ACEOF
13383#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 12812#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13384_ACEOF 12813_ACEOF
13385 12814
13386fi 12815fi
@@ -13394,8 +12823,8 @@ _ACEOF
13394 ;; 12823 ;;
13395 debug) 12824 debug)
13396 AUDIT_MODULE=debug 12825 AUDIT_MODULE=debug
13397 { $as_echo "$as_me:$LINENO: result: debug" >&5 12826 { echo "$as_me:$LINENO: result: debug" >&5
13398$as_echo "debug" >&6; } 12827echo "${ECHO_T}debug" >&6; }
13399 12828
13400cat >>confdefs.h <<\_ACEOF 12829cat >>confdefs.h <<\_ACEOF
13401#define SSH_AUDIT_EVENTS 1 12830#define SSH_AUDIT_EVENTS 1
@@ -13403,12 +12832,12 @@ _ACEOF
13403 12832
13404 ;; 12833 ;;
13405 no) 12834 no)
13406 { $as_echo "$as_me:$LINENO: result: no" >&5 12835 { echo "$as_me:$LINENO: result: no" >&5
13407$as_echo "no" >&6; } 12836echo "${ECHO_T}no" >&6; }
13408 ;; 12837 ;;
13409 *) 12838 *)
13410 { { $as_echo "$as_me:$LINENO: error: Unknown audit module $withval" >&5 12839 { { echo "$as_me:$LINENO: error: Unknown audit module $withval" >&5
13411$as_echo "$as_me: error: Unknown audit module $withval" >&2;} 12840echo "$as_me: error: Unknown audit module $withval" >&2;}
13412 { (exit 1); exit 1; }; } 12841 { (exit 1); exit 1; }; }
13413 ;; 12842 ;;
13414 esac 12843 esac
@@ -13505,6 +12934,10 @@ fi
13505 12934
13506 12935
13507 12936
12937
12938
12939
12940
13508for ac_func in \ 12941for ac_func in \
13509 arc4random \ 12942 arc4random \
13510 arc4random_buf \ 12943 arc4random_buf \
@@ -13535,6 +12968,7 @@ for ac_func in \
13535 getrlimit \ 12968 getrlimit \
13536 getttyent \ 12969 getttyent \
13537 glob \ 12970 glob \
12971 group_from_gid \
13538 inet_aton \ 12972 inet_aton \
13539 inet_ntoa \ 12973 inet_ntoa \
13540 inet_ntop \ 12974 inet_ntop \
@@ -13561,8 +12995,10 @@ for ac_func in \
13561 setegid \ 12995 setegid \
13562 setenv \ 12996 setenv \
13563 seteuid \ 12997 seteuid \
12998 setgroupent \
13564 setgroups \ 12999 setgroups \
13565 setlogin \ 13000 setlogin \
13001 setpassent\
13566 setpcred \ 13002 setpcred \
13567 setproctitle \ 13003 setproctitle \
13568 setregid \ 13004 setregid \
@@ -13591,17 +13027,18 @@ for ac_func in \
13591 truncate \ 13027 truncate \
13592 unsetenv \ 13028 unsetenv \
13593 updwtmpx \ 13029 updwtmpx \
13030 user_from_uid \
13594 vasprintf \ 13031 vasprintf \
13595 vhangup \ 13032 vhangup \
13596 vsnprintf \ 13033 vsnprintf \
13597 waitpid \ 13034 waitpid \
13598 13035
13599do 13036do
13600as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 13037as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13601{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 13038{ echo "$as_me:$LINENO: checking for $ac_func" >&5
13602$as_echo_n "checking for $ac_func... " >&6; } 13039echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
13603if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 13040if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
13604 $as_echo_n "(cached) " >&6 13041 echo $ECHO_N "(cached) $ECHO_C" >&6
13605else 13042else
13606 cat >conftest.$ac_ext <<_ACEOF 13043 cat >conftest.$ac_ext <<_ACEOF
13607/* confdefs.h. */ 13044/* confdefs.h. */
@@ -13654,56 +13091,140 @@ case "(($ac_try" in
13654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13655 *) ac_try_echo=$ac_try;; 13092 *) ac_try_echo=$ac_try;;
13656esac 13093esac
13657eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13658$as_echo "$ac_try_echo") >&5
13659 (eval "$ac_link") 2>conftest.er1 13095 (eval "$ac_link") 2>conftest.er1
13660 ac_status=$? 13096 ac_status=$?
13661 grep -v '^ *+' conftest.er1 >conftest.err 13097 grep -v '^ *+' conftest.er1 >conftest.err
13662 rm -f conftest.er1 13098 rm -f conftest.er1
13663 cat conftest.err >&5 13099 cat conftest.err >&5
13664 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13665 (exit $ac_status); } && { 13101 (exit $ac_status); } && {
13666 test -z "$ac_c_werror_flag" || 13102 test -z "$ac_c_werror_flag" ||
13667 test ! -s conftest.err 13103 test ! -s conftest.err
13668 } && test -s conftest$ac_exeext && { 13104 } && test -s conftest$ac_exeext &&
13669 test "$cross_compiling" = yes || 13105 $as_test_x conftest$ac_exeext; then
13670 $as_test_x conftest$ac_exeext
13671 }; then
13672 eval "$as_ac_var=yes" 13106 eval "$as_ac_var=yes"
13673else 13107else
13674 $as_echo "$as_me: failed program was:" >&5 13108 echo "$as_me: failed program was:" >&5
13675sed 's/^/| /' conftest.$ac_ext >&5 13109sed 's/^/| /' conftest.$ac_ext >&5
13676 13110
13677 eval "$as_ac_var=no" 13111 eval "$as_ac_var=no"
13678fi 13112fi
13679 13113
13680rm -rf conftest.dSYM
13681rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 13114rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13682 conftest$ac_exeext conftest.$ac_ext 13115 conftest$ac_exeext conftest.$ac_ext
13683fi 13116fi
13684ac_res=`eval 'as_val=${'$as_ac_var'} 13117ac_res=`eval echo '${'$as_ac_var'}'`
13685 $as_echo "$as_val"'` 13118 { echo "$as_me:$LINENO: result: $ac_res" >&5
13686 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 13119echo "${ECHO_T}$ac_res" >&6; }
13687$as_echo "$ac_res" >&6; } 13120if test `eval echo '${'$as_ac_var'}'` = yes; then
13688if test `eval 'as_val=${'$as_ac_var'}
13689 $as_echo "$as_val"'` = yes; then
13690 cat >>confdefs.h <<_ACEOF 13121 cat >>confdefs.h <<_ACEOF
13691#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 13122#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13123_ACEOF
13124
13125fi
13126done
13127
13128
13129# PKCS#11 support requires dlopen() and co
13130{ echo "$as_me:$LINENO: checking for library containing dlopen" >&5
13131echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6; }
13132if test "${ac_cv_search_dlopen+set}" = set; then
13133 echo $ECHO_N "(cached) $ECHO_C" >&6
13134else
13135 ac_func_search_save_LIBS=$LIBS
13136cat >conftest.$ac_ext <<_ACEOF
13137/* confdefs.h. */
13138_ACEOF
13139cat confdefs.h >>conftest.$ac_ext
13140cat >>conftest.$ac_ext <<_ACEOF
13141/* end confdefs.h. */
13142
13143/* Override any GCC internal prototype to avoid an error.
13144 Use char because int might match the return type of a GCC
13145 builtin and then its argument prototype would still apply. */
13146#ifdef __cplusplus
13147extern "C"
13148#endif
13149char dlopen ();
13150int
13151main ()
13152{
13153return dlopen ();
13154 ;
13155 return 0;
13156}
13692_ACEOF 13157_ACEOF
13158for ac_lib in '' dl; do
13159 if test -z "$ac_lib"; then
13160 ac_res="none required"
13161 else
13162 ac_res=-l$ac_lib
13163 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13164 fi
13165 rm -f conftest.$ac_objext conftest$ac_exeext
13166if { (ac_try="$ac_link"
13167case "(($ac_try" in
13168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13169 *) ac_try_echo=$ac_try;;
13170esac
13171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13172 (eval "$ac_link") 2>conftest.er1
13173 ac_status=$?
13174 grep -v '^ *+' conftest.er1 >conftest.err
13175 rm -f conftest.er1
13176 cat conftest.err >&5
13177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13178 (exit $ac_status); } && {
13179 test -z "$ac_c_werror_flag" ||
13180 test ! -s conftest.err
13181 } && test -s conftest$ac_exeext &&
13182 $as_test_x conftest$ac_exeext; then
13183 ac_cv_search_dlopen=$ac_res
13184else
13185 echo "$as_me: failed program was:" >&5
13186sed 's/^/| /' conftest.$ac_ext >&5
13187
13693 13188
13694fi 13189fi
13190
13191rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13192 conftest$ac_exeext
13193 if test "${ac_cv_search_dlopen+set}" = set; then
13194 break
13195fi
13695done 13196done
13197if test "${ac_cv_search_dlopen+set}" = set; then
13198 :
13199else
13200 ac_cv_search_dlopen=no
13201fi
13202rm conftest.$ac_ext
13203LIBS=$ac_func_search_save_LIBS
13204fi
13205{ echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
13206echo "${ECHO_T}$ac_cv_search_dlopen" >&6; }
13207ac_res=$ac_cv_search_dlopen
13208if test "$ac_res" != no; then
13209 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13210
13211cat >>confdefs.h <<\_ACEOF
13212#define ENABLE_PKCS11
13213_ACEOF
13214
13215
13216fi
13696 13217
13697 13218
13698# IRIX has a const char return value for gai_strerror() 13219# IRIX has a const char return value for gai_strerror()
13699 13220
13700for ac_func in gai_strerror 13221for ac_func in gai_strerror
13701do 13222do
13702as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 13223as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13703{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 13224{ echo "$as_me:$LINENO: checking for $ac_func" >&5
13704$as_echo_n "checking for $ac_func... " >&6; } 13225echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
13705if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 13226if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
13706 $as_echo_n "(cached) " >&6 13227 echo $ECHO_N "(cached) $ECHO_C" >&6
13707else 13228else
13708 cat >conftest.$ac_ext <<_ACEOF 13229 cat >conftest.$ac_ext <<_ACEOF
13709/* confdefs.h. */ 13230/* confdefs.h. */
@@ -13756,41 +13277,35 @@ case "(($ac_try" in
13756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13757 *) ac_try_echo=$ac_try;; 13278 *) ac_try_echo=$ac_try;;
13758esac 13279esac
13759eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13760$as_echo "$ac_try_echo") >&5
13761 (eval "$ac_link") 2>conftest.er1 13281 (eval "$ac_link") 2>conftest.er1
13762 ac_status=$? 13282 ac_status=$?
13763 grep -v '^ *+' conftest.er1 >conftest.err 13283 grep -v '^ *+' conftest.er1 >conftest.err
13764 rm -f conftest.er1 13284 rm -f conftest.er1
13765 cat conftest.err >&5 13285 cat conftest.err >&5
13766 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13767 (exit $ac_status); } && { 13287 (exit $ac_status); } && {
13768 test -z "$ac_c_werror_flag" || 13288 test -z "$ac_c_werror_flag" ||
13769 test ! -s conftest.err 13289 test ! -s conftest.err
13770 } && test -s conftest$ac_exeext && { 13290 } && test -s conftest$ac_exeext &&
13771 test "$cross_compiling" = yes || 13291 $as_test_x conftest$ac_exeext; then
13772 $as_test_x conftest$ac_exeext
13773 }; then
13774 eval "$as_ac_var=yes" 13292 eval "$as_ac_var=yes"
13775else 13293else
13776 $as_echo "$as_me: failed program was:" >&5 13294 echo "$as_me: failed program was:" >&5
13777sed 's/^/| /' conftest.$ac_ext >&5 13295sed 's/^/| /' conftest.$ac_ext >&5
13778 13296
13779 eval "$as_ac_var=no" 13297 eval "$as_ac_var=no"
13780fi 13298fi
13781 13299
13782rm -rf conftest.dSYM
13783rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 13300rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13784 conftest$ac_exeext conftest.$ac_ext 13301 conftest$ac_exeext conftest.$ac_ext
13785fi 13302fi
13786ac_res=`eval 'as_val=${'$as_ac_var'} 13303ac_res=`eval echo '${'$as_ac_var'}'`
13787 $as_echo "$as_val"'` 13304 { echo "$as_me:$LINENO: result: $ac_res" >&5
13788 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 13305echo "${ECHO_T}$ac_res" >&6; }
13789$as_echo "$ac_res" >&6; } 13306if test `eval echo '${'$as_ac_var'}'` = yes; then
13790if test `eval 'as_val=${'$as_ac_var'}
13791 $as_echo "$as_val"'` = yes; then
13792 cat >>confdefs.h <<_ACEOF 13307 cat >>confdefs.h <<_ACEOF
13793#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 13308#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13794_ACEOF 13309_ACEOF
13795 13310
13796 cat >>confdefs.h <<\_ACEOF 13311 cat >>confdefs.h <<\_ACEOF
@@ -13826,14 +13341,13 @@ case "(($ac_try" in
13826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13827 *) ac_try_echo=$ac_try;; 13342 *) ac_try_echo=$ac_try;;
13828esac 13343esac
13829eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13830$as_echo "$ac_try_echo") >&5
13831 (eval "$ac_compile") 2>conftest.er1 13345 (eval "$ac_compile") 2>conftest.er1
13832 ac_status=$? 13346 ac_status=$?
13833 grep -v '^ *+' conftest.er1 >conftest.err 13347 grep -v '^ *+' conftest.er1 >conftest.err
13834 rm -f conftest.er1 13348 rm -f conftest.er1
13835 cat conftest.err >&5 13349 cat conftest.err >&5
13836 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13837 (exit $ac_status); } && { 13351 (exit $ac_status); } && {
13838 test -z "$ac_c_werror_flag" || 13352 test -z "$ac_c_werror_flag" ||
13839 test ! -s conftest.err 13353 test ! -s conftest.err
@@ -13845,7 +13359,7 @@ cat >>confdefs.h <<\_ACEOF
13845_ACEOF 13359_ACEOF
13846 13360
13847else 13361else
13848 $as_echo "$as_me: failed program was:" >&5 13362 echo "$as_me: failed program was:" >&5
13849sed 's/^/| /' conftest.$ac_ext >&5 13363sed 's/^/| /' conftest.$ac_ext >&5
13850 13364
13851 13365
@@ -13856,10 +13370,10 @@ fi
13856done 13370done
13857 13371
13858 13372
13859{ $as_echo "$as_me:$LINENO: checking for library containing nanosleep" >&5 13373{ echo "$as_me:$LINENO: checking for library containing nanosleep" >&5
13860$as_echo_n "checking for library containing nanosleep... " >&6; } 13374echo $ECHO_N "checking for library containing nanosleep... $ECHO_C" >&6; }
13861if test "${ac_cv_search_nanosleep+set}" = set; then 13375if test "${ac_cv_search_nanosleep+set}" = set; then
13862 $as_echo_n "(cached) " >&6 13376 echo $ECHO_N "(cached) $ECHO_C" >&6
13863else 13377else
13864 ac_func_search_save_LIBS=$LIBS 13378 ac_func_search_save_LIBS=$LIBS
13865cat >conftest.$ac_ext <<_ACEOF 13379cat >conftest.$ac_ext <<_ACEOF
@@ -13897,30 +13411,26 @@ case "(($ac_try" in
13897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13898 *) ac_try_echo=$ac_try;; 13412 *) ac_try_echo=$ac_try;;
13899esac 13413esac
13900eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13901$as_echo "$ac_try_echo") >&5
13902 (eval "$ac_link") 2>conftest.er1 13415 (eval "$ac_link") 2>conftest.er1
13903 ac_status=$? 13416 ac_status=$?
13904 grep -v '^ *+' conftest.er1 >conftest.err 13417 grep -v '^ *+' conftest.er1 >conftest.err
13905 rm -f conftest.er1 13418 rm -f conftest.er1
13906 cat conftest.err >&5 13419 cat conftest.err >&5
13907 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13908 (exit $ac_status); } && { 13421 (exit $ac_status); } && {
13909 test -z "$ac_c_werror_flag" || 13422 test -z "$ac_c_werror_flag" ||
13910 test ! -s conftest.err 13423 test ! -s conftest.err
13911 } && test -s conftest$ac_exeext && { 13424 } && test -s conftest$ac_exeext &&
13912 test "$cross_compiling" = yes || 13425 $as_test_x conftest$ac_exeext; then
13913 $as_test_x conftest$ac_exeext
13914 }; then
13915 ac_cv_search_nanosleep=$ac_res 13426 ac_cv_search_nanosleep=$ac_res
13916else 13427else
13917 $as_echo "$as_me: failed program was:" >&5 13428 echo "$as_me: failed program was:" >&5
13918sed 's/^/| /' conftest.$ac_ext >&5 13429sed 's/^/| /' conftest.$ac_ext >&5
13919 13430
13920 13431
13921fi 13432fi
13922 13433
13923rm -rf conftest.dSYM
13924rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 13434rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13925 conftest$ac_exeext 13435 conftest$ac_exeext
13926 if test "${ac_cv_search_nanosleep+set}" = set; then 13436 if test "${ac_cv_search_nanosleep+set}" = set; then
@@ -13935,8 +13445,8 @@ fi
13935rm conftest.$ac_ext 13445rm conftest.$ac_ext
13936LIBS=$ac_func_search_save_LIBS 13446LIBS=$ac_func_search_save_LIBS
13937fi 13447fi
13938{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_nanosleep" >&5 13448{ echo "$as_me:$LINENO: result: $ac_cv_search_nanosleep" >&5
13939$as_echo "$ac_cv_search_nanosleep" >&6; } 13449echo "${ECHO_T}$ac_cv_search_nanosleep" >&6; }
13940ac_res=$ac_cv_search_nanosleep 13450ac_res=$ac_cv_search_nanosleep
13941if test "$ac_res" != no; then 13451if test "$ac_res" != no; then
13942 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 13452 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
@@ -13948,10 +13458,10 @@ _ACEOF
13948fi 13458fi
13949 13459
13950 13460
13951{ $as_echo "$as_me:$LINENO: checking whether getrusage is declared" >&5 13461{ echo "$as_me:$LINENO: checking whether getrusage is declared" >&5
13952$as_echo_n "checking whether getrusage is declared... " >&6; } 13462echo $ECHO_N "checking whether getrusage is declared... $ECHO_C" >&6; }
13953if test "${ac_cv_have_decl_getrusage+set}" = set; then 13463if test "${ac_cv_have_decl_getrusage+set}" = set; then
13954 $as_echo_n "(cached) " >&6 13464 echo $ECHO_N "(cached) $ECHO_C" >&6
13955else 13465else
13956 cat >conftest.$ac_ext <<_ACEOF 13466 cat >conftest.$ac_ext <<_ACEOF
13957/* confdefs.h. */ 13467/* confdefs.h. */
@@ -13977,21 +13487,20 @@ case "(($ac_try" in
13977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13978 *) ac_try_echo=$ac_try;; 13488 *) ac_try_echo=$ac_try;;
13979esac 13489esac
13980eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13981$as_echo "$ac_try_echo") >&5
13982 (eval "$ac_compile") 2>conftest.er1 13491 (eval "$ac_compile") 2>conftest.er1
13983 ac_status=$? 13492 ac_status=$?
13984 grep -v '^ *+' conftest.er1 >conftest.err 13493 grep -v '^ *+' conftest.er1 >conftest.err
13985 rm -f conftest.er1 13494 rm -f conftest.er1
13986 cat conftest.err >&5 13495 cat conftest.err >&5
13987 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13988 (exit $ac_status); } && { 13497 (exit $ac_status); } && {
13989 test -z "$ac_c_werror_flag" || 13498 test -z "$ac_c_werror_flag" ||
13990 test ! -s conftest.err 13499 test ! -s conftest.err
13991 } && test -s conftest.$ac_objext; then 13500 } && test -s conftest.$ac_objext; then
13992 ac_cv_have_decl_getrusage=yes 13501 ac_cv_have_decl_getrusage=yes
13993else 13502else
13994 $as_echo "$as_me: failed program was:" >&5 13503 echo "$as_me: failed program was:" >&5
13995sed 's/^/| /' conftest.$ac_ext >&5 13504sed 's/^/| /' conftest.$ac_ext >&5
13996 13505
13997 ac_cv_have_decl_getrusage=no 13506 ac_cv_have_decl_getrusage=no
@@ -13999,17 +13508,17 @@ fi
13999 13508
14000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14001fi 13510fi
14002{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getrusage" >&5 13511{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getrusage" >&5
14003$as_echo "$ac_cv_have_decl_getrusage" >&6; } 13512echo "${ECHO_T}$ac_cv_have_decl_getrusage" >&6; }
14004if test $ac_cv_have_decl_getrusage = yes; then 13513if test $ac_cv_have_decl_getrusage = yes; then
14005 13514
14006for ac_func in getrusage 13515for ac_func in getrusage
14007do 13516do
14008as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 13517as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14009{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 13518{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14010$as_echo_n "checking for $ac_func... " >&6; } 13519echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14011if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 13520if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
14012 $as_echo_n "(cached) " >&6 13521 echo $ECHO_N "(cached) $ECHO_C" >&6
14013else 13522else
14014 cat >conftest.$ac_ext <<_ACEOF 13523 cat >conftest.$ac_ext <<_ACEOF
14015/* confdefs.h. */ 13524/* confdefs.h. */
@@ -14062,41 +13571,35 @@ case "(($ac_try" in
14062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14063 *) ac_try_echo=$ac_try;; 13572 *) ac_try_echo=$ac_try;;
14064esac 13573esac
14065eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14066$as_echo "$ac_try_echo") >&5
14067 (eval "$ac_link") 2>conftest.er1 13575 (eval "$ac_link") 2>conftest.er1
14068 ac_status=$? 13576 ac_status=$?
14069 grep -v '^ *+' conftest.er1 >conftest.err 13577 grep -v '^ *+' conftest.er1 >conftest.err
14070 rm -f conftest.er1 13578 rm -f conftest.er1
14071 cat conftest.err >&5 13579 cat conftest.err >&5
14072 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14073 (exit $ac_status); } && { 13581 (exit $ac_status); } && {
14074 test -z "$ac_c_werror_flag" || 13582 test -z "$ac_c_werror_flag" ||
14075 test ! -s conftest.err 13583 test ! -s conftest.err
14076 } && test -s conftest$ac_exeext && { 13584 } && test -s conftest$ac_exeext &&
14077 test "$cross_compiling" = yes || 13585 $as_test_x conftest$ac_exeext; then
14078 $as_test_x conftest$ac_exeext
14079 }; then
14080 eval "$as_ac_var=yes" 13586 eval "$as_ac_var=yes"
14081else 13587else
14082 $as_echo "$as_me: failed program was:" >&5 13588 echo "$as_me: failed program was:" >&5
14083sed 's/^/| /' conftest.$ac_ext >&5 13589sed 's/^/| /' conftest.$ac_ext >&5
14084 13590
14085 eval "$as_ac_var=no" 13591 eval "$as_ac_var=no"
14086fi 13592fi
14087 13593
14088rm -rf conftest.dSYM
14089rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 13594rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14090 conftest$ac_exeext conftest.$ac_ext 13595 conftest$ac_exeext conftest.$ac_ext
14091fi 13596fi
14092ac_res=`eval 'as_val=${'$as_ac_var'} 13597ac_res=`eval echo '${'$as_ac_var'}'`
14093 $as_echo "$as_val"'` 13598 { echo "$as_me:$LINENO: result: $ac_res" >&5
14094 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 13599echo "${ECHO_T}$ac_res" >&6; }
14095$as_echo "$ac_res" >&6; } 13600if test `eval echo '${'$as_ac_var'}'` = yes; then
14096if test `eval 'as_val=${'$as_ac_var'}
14097 $as_echo "$as_val"'` = yes; then
14098 cat >>confdefs.h <<_ACEOF 13601 cat >>confdefs.h <<_ACEOF
14099#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 13602#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14100_ACEOF 13603_ACEOF
14101 13604
14102fi 13605fi
@@ -14104,10 +13607,10 @@ done
14104 13607
14105fi 13608fi
14106 13609
14107{ $as_echo "$as_me:$LINENO: checking whether strsep is declared" >&5 13610{ echo "$as_me:$LINENO: checking whether strsep is declared" >&5
14108$as_echo_n "checking whether strsep is declared... " >&6; } 13611echo $ECHO_N "checking whether strsep is declared... $ECHO_C" >&6; }
14109if test "${ac_cv_have_decl_strsep+set}" = set; then 13612if test "${ac_cv_have_decl_strsep+set}" = set; then
14110 $as_echo_n "(cached) " >&6 13613 echo $ECHO_N "(cached) $ECHO_C" >&6
14111else 13614else
14112 cat >conftest.$ac_ext <<_ACEOF 13615 cat >conftest.$ac_ext <<_ACEOF
14113/* confdefs.h. */ 13616/* confdefs.h. */
@@ -14138,21 +13641,20 @@ case "(($ac_try" in
14138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14139 *) ac_try_echo=$ac_try;; 13642 *) ac_try_echo=$ac_try;;
14140esac 13643esac
14141eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14142$as_echo "$ac_try_echo") >&5
14143 (eval "$ac_compile") 2>conftest.er1 13645 (eval "$ac_compile") 2>conftest.er1
14144 ac_status=$? 13646 ac_status=$?
14145 grep -v '^ *+' conftest.er1 >conftest.err 13647 grep -v '^ *+' conftest.er1 >conftest.err
14146 rm -f conftest.er1 13648 rm -f conftest.er1
14147 cat conftest.err >&5 13649 cat conftest.err >&5
14148 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14149 (exit $ac_status); } && { 13651 (exit $ac_status); } && {
14150 test -z "$ac_c_werror_flag" || 13652 test -z "$ac_c_werror_flag" ||
14151 test ! -s conftest.err 13653 test ! -s conftest.err
14152 } && test -s conftest.$ac_objext; then 13654 } && test -s conftest.$ac_objext; then
14153 ac_cv_have_decl_strsep=yes 13655 ac_cv_have_decl_strsep=yes
14154else 13656else
14155 $as_echo "$as_me: failed program was:" >&5 13657 echo "$as_me: failed program was:" >&5
14156sed 's/^/| /' conftest.$ac_ext >&5 13658sed 's/^/| /' conftest.$ac_ext >&5
14157 13659
14158 ac_cv_have_decl_strsep=no 13660 ac_cv_have_decl_strsep=no
@@ -14160,17 +13662,17 @@ fi
14160 13662
14161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14162fi 13664fi
14163{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strsep" >&5 13665{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_strsep" >&5
14164$as_echo "$ac_cv_have_decl_strsep" >&6; } 13666echo "${ECHO_T}$ac_cv_have_decl_strsep" >&6; }
14165if test $ac_cv_have_decl_strsep = yes; then 13667if test $ac_cv_have_decl_strsep = yes; then
14166 13668
14167for ac_func in strsep 13669for ac_func in strsep
14168do 13670do
14169as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 13671as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14170{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 13672{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14171$as_echo_n "checking for $ac_func... " >&6; } 13673echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14172if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 13674if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
14173 $as_echo_n "(cached) " >&6 13675 echo $ECHO_N "(cached) $ECHO_C" >&6
14174else 13676else
14175 cat >conftest.$ac_ext <<_ACEOF 13677 cat >conftest.$ac_ext <<_ACEOF
14176/* confdefs.h. */ 13678/* confdefs.h. */
@@ -14223,41 +13725,35 @@ case "(($ac_try" in
14223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14224 *) ac_try_echo=$ac_try;; 13726 *) ac_try_echo=$ac_try;;
14225esac 13727esac
14226eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14227$as_echo "$ac_try_echo") >&5
14228 (eval "$ac_link") 2>conftest.er1 13729 (eval "$ac_link") 2>conftest.er1
14229 ac_status=$? 13730 ac_status=$?
14230 grep -v '^ *+' conftest.er1 >conftest.err 13731 grep -v '^ *+' conftest.er1 >conftest.err
14231 rm -f conftest.er1 13732 rm -f conftest.er1
14232 cat conftest.err >&5 13733 cat conftest.err >&5
14233 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14234 (exit $ac_status); } && { 13735 (exit $ac_status); } && {
14235 test -z "$ac_c_werror_flag" || 13736 test -z "$ac_c_werror_flag" ||
14236 test ! -s conftest.err 13737 test ! -s conftest.err
14237 } && test -s conftest$ac_exeext && { 13738 } && test -s conftest$ac_exeext &&
14238 test "$cross_compiling" = yes || 13739 $as_test_x conftest$ac_exeext; then
14239 $as_test_x conftest$ac_exeext
14240 }; then
14241 eval "$as_ac_var=yes" 13740 eval "$as_ac_var=yes"
14242else 13741else
14243 $as_echo "$as_me: failed program was:" >&5 13742 echo "$as_me: failed program was:" >&5
14244sed 's/^/| /' conftest.$ac_ext >&5 13743sed 's/^/| /' conftest.$ac_ext >&5
14245 13744
14246 eval "$as_ac_var=no" 13745 eval "$as_ac_var=no"
14247fi 13746fi
14248 13747
14249rm -rf conftest.dSYM
14250rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 13748rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14251 conftest$ac_exeext conftest.$ac_ext 13749 conftest$ac_exeext conftest.$ac_ext
14252fi 13750fi
14253ac_res=`eval 'as_val=${'$as_ac_var'} 13751ac_res=`eval echo '${'$as_ac_var'}'`
14254 $as_echo "$as_val"'` 13752 { echo "$as_me:$LINENO: result: $ac_res" >&5
14255 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 13753echo "${ECHO_T}$ac_res" >&6; }
14256$as_echo "$ac_res" >&6; } 13754if test `eval echo '${'$as_ac_var'}'` = yes; then
14257if test `eval 'as_val=${'$as_ac_var'}
14258 $as_echo "$as_val"'` = yes; then
14259 cat >>confdefs.h <<_ACEOF 13755 cat >>confdefs.h <<_ACEOF
14260#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 13756#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14261_ACEOF 13757_ACEOF
14262 13758
14263fi 13759fi
@@ -14266,10 +13762,10 @@ done
14266fi 13762fi
14267 13763
14268 13764
14269{ $as_echo "$as_me:$LINENO: checking whether tcsendbreak is declared" >&5 13765{ echo "$as_me:$LINENO: checking whether tcsendbreak is declared" >&5
14270$as_echo_n "checking whether tcsendbreak is declared... " >&6; } 13766echo $ECHO_N "checking whether tcsendbreak is declared... $ECHO_C" >&6; }
14271if test "${ac_cv_have_decl_tcsendbreak+set}" = set; then 13767if test "${ac_cv_have_decl_tcsendbreak+set}" = set; then
14272 $as_echo_n "(cached) " >&6 13768 echo $ECHO_N "(cached) $ECHO_C" >&6
14273else 13769else
14274 cat >conftest.$ac_ext <<_ACEOF 13770 cat >conftest.$ac_ext <<_ACEOF
14275/* confdefs.h. */ 13771/* confdefs.h. */
@@ -14297,21 +13793,20 @@ case "(($ac_try" in
14297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14298 *) ac_try_echo=$ac_try;; 13794 *) ac_try_echo=$ac_try;;
14299esac 13795esac
14300eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14301$as_echo "$ac_try_echo") >&5
14302 (eval "$ac_compile") 2>conftest.er1 13797 (eval "$ac_compile") 2>conftest.er1
14303 ac_status=$? 13798 ac_status=$?
14304 grep -v '^ *+' conftest.er1 >conftest.err 13799 grep -v '^ *+' conftest.er1 >conftest.err
14305 rm -f conftest.er1 13800 rm -f conftest.er1
14306 cat conftest.err >&5 13801 cat conftest.err >&5
14307 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14308 (exit $ac_status); } && { 13803 (exit $ac_status); } && {
14309 test -z "$ac_c_werror_flag" || 13804 test -z "$ac_c_werror_flag" ||
14310 test ! -s conftest.err 13805 test ! -s conftest.err
14311 } && test -s conftest.$ac_objext; then 13806 } && test -s conftest.$ac_objext; then
14312 ac_cv_have_decl_tcsendbreak=yes 13807 ac_cv_have_decl_tcsendbreak=yes
14313else 13808else
14314 $as_echo "$as_me: failed program was:" >&5 13809 echo "$as_me: failed program was:" >&5
14315sed 's/^/| /' conftest.$ac_ext >&5 13810sed 's/^/| /' conftest.$ac_ext >&5
14316 13811
14317 ac_cv_have_decl_tcsendbreak=no 13812 ac_cv_have_decl_tcsendbreak=no
@@ -14319,8 +13814,8 @@ fi
14319 13814
14320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14321fi 13816fi
14322{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tcsendbreak" >&5 13817{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tcsendbreak" >&5
14323$as_echo "$ac_cv_have_decl_tcsendbreak" >&6; } 13818echo "${ECHO_T}$ac_cv_have_decl_tcsendbreak" >&6; }
14324if test $ac_cv_have_decl_tcsendbreak = yes; then 13819if test $ac_cv_have_decl_tcsendbreak = yes; then
14325 cat >>confdefs.h <<\_ACEOF 13820 cat >>confdefs.h <<\_ACEOF
14326#define HAVE_TCSENDBREAK 1 13821#define HAVE_TCSENDBREAK 1
@@ -14330,11 +13825,11 @@ else
14330 13825
14331for ac_func in tcsendbreak 13826for ac_func in tcsendbreak
14332do 13827do
14333as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 13828as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14334{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 13829{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14335$as_echo_n "checking for $ac_func... " >&6; } 13830echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14336if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 13831if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
14337 $as_echo_n "(cached) " >&6 13832 echo $ECHO_N "(cached) $ECHO_C" >&6
14338else 13833else
14339 cat >conftest.$ac_ext <<_ACEOF 13834 cat >conftest.$ac_ext <<_ACEOF
14340/* confdefs.h. */ 13835/* confdefs.h. */
@@ -14387,41 +13882,35 @@ case "(($ac_try" in
14387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14388 *) ac_try_echo=$ac_try;; 13883 *) ac_try_echo=$ac_try;;
14389esac 13884esac
14390eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14391$as_echo "$ac_try_echo") >&5
14392 (eval "$ac_link") 2>conftest.er1 13886 (eval "$ac_link") 2>conftest.er1
14393 ac_status=$? 13887 ac_status=$?
14394 grep -v '^ *+' conftest.er1 >conftest.err 13888 grep -v '^ *+' conftest.er1 >conftest.err
14395 rm -f conftest.er1 13889 rm -f conftest.er1
14396 cat conftest.err >&5 13890 cat conftest.err >&5
14397 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14398 (exit $ac_status); } && { 13892 (exit $ac_status); } && {
14399 test -z "$ac_c_werror_flag" || 13893 test -z "$ac_c_werror_flag" ||
14400 test ! -s conftest.err 13894 test ! -s conftest.err
14401 } && test -s conftest$ac_exeext && { 13895 } && test -s conftest$ac_exeext &&
14402 test "$cross_compiling" = yes || 13896 $as_test_x conftest$ac_exeext; then
14403 $as_test_x conftest$ac_exeext
14404 }; then
14405 eval "$as_ac_var=yes" 13897 eval "$as_ac_var=yes"
14406else 13898else
14407 $as_echo "$as_me: failed program was:" >&5 13899 echo "$as_me: failed program was:" >&5
14408sed 's/^/| /' conftest.$ac_ext >&5 13900sed 's/^/| /' conftest.$ac_ext >&5
14409 13901
14410 eval "$as_ac_var=no" 13902 eval "$as_ac_var=no"
14411fi 13903fi
14412 13904
14413rm -rf conftest.dSYM
14414rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 13905rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14415 conftest$ac_exeext conftest.$ac_ext 13906 conftest$ac_exeext conftest.$ac_ext
14416fi 13907fi
14417ac_res=`eval 'as_val=${'$as_ac_var'} 13908ac_res=`eval echo '${'$as_ac_var'}'`
14418 $as_echo "$as_val"'` 13909 { echo "$as_me:$LINENO: result: $ac_res" >&5
14419 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 13910echo "${ECHO_T}$ac_res" >&6; }
14420$as_echo "$ac_res" >&6; } 13911if test `eval echo '${'$as_ac_var'}'` = yes; then
14421if test `eval 'as_val=${'$as_ac_var'}
14422 $as_echo "$as_val"'` = yes; then
14423 cat >>confdefs.h <<_ACEOF 13912 cat >>confdefs.h <<_ACEOF
14424#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 13913#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14425_ACEOF 13914_ACEOF
14426 13915
14427fi 13916fi
@@ -14430,10 +13919,10 @@ done
14430fi 13919fi
14431 13920
14432 13921
14433{ $as_echo "$as_me:$LINENO: checking whether h_errno is declared" >&5 13922{ echo "$as_me:$LINENO: checking whether h_errno is declared" >&5
14434$as_echo_n "checking whether h_errno is declared... " >&6; } 13923echo $ECHO_N "checking whether h_errno is declared... $ECHO_C" >&6; }
14435if test "${ac_cv_have_decl_h_errno+set}" = set; then 13924if test "${ac_cv_have_decl_h_errno+set}" = set; then
14436 $as_echo_n "(cached) " >&6 13925 echo $ECHO_N "(cached) $ECHO_C" >&6
14437else 13926else
14438 cat >conftest.$ac_ext <<_ACEOF 13927 cat >conftest.$ac_ext <<_ACEOF
14439/* confdefs.h. */ 13928/* confdefs.h. */
@@ -14460,21 +13949,20 @@ case "(($ac_try" in
14460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14461 *) ac_try_echo=$ac_try;; 13950 *) ac_try_echo=$ac_try;;
14462esac 13951esac
14463eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14464$as_echo "$ac_try_echo") >&5
14465 (eval "$ac_compile") 2>conftest.er1 13953 (eval "$ac_compile") 2>conftest.er1
14466 ac_status=$? 13954 ac_status=$?
14467 grep -v '^ *+' conftest.er1 >conftest.err 13955 grep -v '^ *+' conftest.er1 >conftest.err
14468 rm -f conftest.er1 13956 rm -f conftest.er1
14469 cat conftest.err >&5 13957 cat conftest.err >&5
14470 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14471 (exit $ac_status); } && { 13959 (exit $ac_status); } && {
14472 test -z "$ac_c_werror_flag" || 13960 test -z "$ac_c_werror_flag" ||
14473 test ! -s conftest.err 13961 test ! -s conftest.err
14474 } && test -s conftest.$ac_objext; then 13962 } && test -s conftest.$ac_objext; then
14475 ac_cv_have_decl_h_errno=yes 13963 ac_cv_have_decl_h_errno=yes
14476else 13964else
14477 $as_echo "$as_me: failed program was:" >&5 13965 echo "$as_me: failed program was:" >&5
14478sed 's/^/| /' conftest.$ac_ext >&5 13966sed 's/^/| /' conftest.$ac_ext >&5
14479 13967
14480 ac_cv_have_decl_h_errno=no 13968 ac_cv_have_decl_h_errno=no
@@ -14482,8 +13970,8 @@ fi
14482 13970
14483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14484fi 13972fi
14485{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_h_errno" >&5 13973{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_h_errno" >&5
14486$as_echo "$ac_cv_have_decl_h_errno" >&6; } 13974echo "${ECHO_T}$ac_cv_have_decl_h_errno" >&6; }
14487if test $ac_cv_have_decl_h_errno = yes; then 13975if test $ac_cv_have_decl_h_errno = yes; then
14488 13976
14489cat >>confdefs.h <<_ACEOF 13977cat >>confdefs.h <<_ACEOF
@@ -14501,10 +13989,10 @@ fi
14501 13989
14502 13990
14503 13991
14504{ $as_echo "$as_me:$LINENO: checking whether SHUT_RD is declared" >&5 13992{ echo "$as_me:$LINENO: checking whether SHUT_RD is declared" >&5
14505$as_echo_n "checking whether SHUT_RD is declared... " >&6; } 13993echo $ECHO_N "checking whether SHUT_RD is declared... $ECHO_C" >&6; }
14506if test "${ac_cv_have_decl_SHUT_RD+set}" = set; then 13994if test "${ac_cv_have_decl_SHUT_RD+set}" = set; then
14507 $as_echo_n "(cached) " >&6 13995 echo $ECHO_N "(cached) $ECHO_C" >&6
14508else 13996else
14509 cat >conftest.$ac_ext <<_ACEOF 13997 cat >conftest.$ac_ext <<_ACEOF
14510/* confdefs.h. */ 13998/* confdefs.h. */
@@ -14534,21 +14022,20 @@ case "(($ac_try" in
14534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14535 *) ac_try_echo=$ac_try;; 14023 *) ac_try_echo=$ac_try;;
14536esac 14024esac
14537eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14538$as_echo "$ac_try_echo") >&5
14539 (eval "$ac_compile") 2>conftest.er1 14026 (eval "$ac_compile") 2>conftest.er1
14540 ac_status=$? 14027 ac_status=$?
14541 grep -v '^ *+' conftest.er1 >conftest.err 14028 grep -v '^ *+' conftest.er1 >conftest.err
14542 rm -f conftest.er1 14029 rm -f conftest.er1
14543 cat conftest.err >&5 14030 cat conftest.err >&5
14544 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14545 (exit $ac_status); } && { 14032 (exit $ac_status); } && {
14546 test -z "$ac_c_werror_flag" || 14033 test -z "$ac_c_werror_flag" ||
14547 test ! -s conftest.err 14034 test ! -s conftest.err
14548 } && test -s conftest.$ac_objext; then 14035 } && test -s conftest.$ac_objext; then
14549 ac_cv_have_decl_SHUT_RD=yes 14036 ac_cv_have_decl_SHUT_RD=yes
14550else 14037else
14551 $as_echo "$as_me: failed program was:" >&5 14038 echo "$as_me: failed program was:" >&5
14552sed 's/^/| /' conftest.$ac_ext >&5 14039sed 's/^/| /' conftest.$ac_ext >&5
14553 14040
14554 ac_cv_have_decl_SHUT_RD=no 14041 ac_cv_have_decl_SHUT_RD=no
@@ -14556,8 +14043,8 @@ fi
14556 14043
14557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14558fi 14045fi
14559{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_SHUT_RD" >&5 14046{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_SHUT_RD" >&5
14560$as_echo "$ac_cv_have_decl_SHUT_RD" >&6; } 14047echo "${ECHO_T}$ac_cv_have_decl_SHUT_RD" >&6; }
14561if test $ac_cv_have_decl_SHUT_RD = yes; then 14048if test $ac_cv_have_decl_SHUT_RD = yes; then
14562 14049
14563cat >>confdefs.h <<_ACEOF 14050cat >>confdefs.h <<_ACEOF
@@ -14575,10 +14062,10 @@ fi
14575 14062
14576 14063
14577 14064
14578{ $as_echo "$as_me:$LINENO: checking whether O_NONBLOCK is declared" >&5 14065{ echo "$as_me:$LINENO: checking whether O_NONBLOCK is declared" >&5
14579$as_echo_n "checking whether O_NONBLOCK is declared... " >&6; } 14066echo $ECHO_N "checking whether O_NONBLOCK is declared... $ECHO_C" >&6; }
14580if test "${ac_cv_have_decl_O_NONBLOCK+set}" = set; then 14067if test "${ac_cv_have_decl_O_NONBLOCK+set}" = set; then
14581 $as_echo_n "(cached) " >&6 14068 echo $ECHO_N "(cached) $ECHO_C" >&6
14582else 14069else
14583 cat >conftest.$ac_ext <<_ACEOF 14070 cat >conftest.$ac_ext <<_ACEOF
14584/* confdefs.h. */ 14071/* confdefs.h. */
@@ -14613,21 +14100,20 @@ case "(($ac_try" in
14613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14614 *) ac_try_echo=$ac_try;; 14101 *) ac_try_echo=$ac_try;;
14615esac 14102esac
14616eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14617$as_echo "$ac_try_echo") >&5
14618 (eval "$ac_compile") 2>conftest.er1 14104 (eval "$ac_compile") 2>conftest.er1
14619 ac_status=$? 14105 ac_status=$?
14620 grep -v '^ *+' conftest.er1 >conftest.err 14106 grep -v '^ *+' conftest.er1 >conftest.err
14621 rm -f conftest.er1 14107 rm -f conftest.er1
14622 cat conftest.err >&5 14108 cat conftest.err >&5
14623 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14624 (exit $ac_status); } && { 14110 (exit $ac_status); } && {
14625 test -z "$ac_c_werror_flag" || 14111 test -z "$ac_c_werror_flag" ||
14626 test ! -s conftest.err 14112 test ! -s conftest.err
14627 } && test -s conftest.$ac_objext; then 14113 } && test -s conftest.$ac_objext; then
14628 ac_cv_have_decl_O_NONBLOCK=yes 14114 ac_cv_have_decl_O_NONBLOCK=yes
14629else 14115else
14630 $as_echo "$as_me: failed program was:" >&5 14116 echo "$as_me: failed program was:" >&5
14631sed 's/^/| /' conftest.$ac_ext >&5 14117sed 's/^/| /' conftest.$ac_ext >&5
14632 14118
14633 ac_cv_have_decl_O_NONBLOCK=no 14119 ac_cv_have_decl_O_NONBLOCK=no
@@ -14635,8 +14121,8 @@ fi
14635 14121
14636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14637fi 14123fi
14638{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_O_NONBLOCK" >&5 14124{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_O_NONBLOCK" >&5
14639$as_echo "$ac_cv_have_decl_O_NONBLOCK" >&6; } 14125echo "${ECHO_T}$ac_cv_have_decl_O_NONBLOCK" >&6; }
14640if test $ac_cv_have_decl_O_NONBLOCK = yes; then 14126if test $ac_cv_have_decl_O_NONBLOCK = yes; then
14641 14127
14642cat >>confdefs.h <<_ACEOF 14128cat >>confdefs.h <<_ACEOF
@@ -14654,10 +14140,10 @@ fi
14654 14140
14655 14141
14656 14142
14657{ $as_echo "$as_me:$LINENO: checking whether writev is declared" >&5 14143{ echo "$as_me:$LINENO: checking whether writev is declared" >&5
14658$as_echo_n "checking whether writev is declared... " >&6; } 14144echo $ECHO_N "checking whether writev is declared... $ECHO_C" >&6; }
14659if test "${ac_cv_have_decl_writev+set}" = set; then 14145if test "${ac_cv_have_decl_writev+set}" = set; then
14660 $as_echo_n "(cached) " >&6 14146 echo $ECHO_N "(cached) $ECHO_C" >&6
14661else 14147else
14662 cat >conftest.$ac_ext <<_ACEOF 14148 cat >conftest.$ac_ext <<_ACEOF
14663/* confdefs.h. */ 14149/* confdefs.h. */
@@ -14688,21 +14174,20 @@ case "(($ac_try" in
14688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14689 *) ac_try_echo=$ac_try;; 14175 *) ac_try_echo=$ac_try;;
14690esac 14176esac
14691eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14692$as_echo "$ac_try_echo") >&5
14693 (eval "$ac_compile") 2>conftest.er1 14178 (eval "$ac_compile") 2>conftest.er1
14694 ac_status=$? 14179 ac_status=$?
14695 grep -v '^ *+' conftest.er1 >conftest.err 14180 grep -v '^ *+' conftest.er1 >conftest.err
14696 rm -f conftest.er1 14181 rm -f conftest.er1
14697 cat conftest.err >&5 14182 cat conftest.err >&5
14698 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14699 (exit $ac_status); } && { 14184 (exit $ac_status); } && {
14700 test -z "$ac_c_werror_flag" || 14185 test -z "$ac_c_werror_flag" ||
14701 test ! -s conftest.err 14186 test ! -s conftest.err
14702 } && test -s conftest.$ac_objext; then 14187 } && test -s conftest.$ac_objext; then
14703 ac_cv_have_decl_writev=yes 14188 ac_cv_have_decl_writev=yes
14704else 14189else
14705 $as_echo "$as_me: failed program was:" >&5 14190 echo "$as_me: failed program was:" >&5
14706sed 's/^/| /' conftest.$ac_ext >&5 14191sed 's/^/| /' conftest.$ac_ext >&5
14707 14192
14708 ac_cv_have_decl_writev=no 14193 ac_cv_have_decl_writev=no
@@ -14710,8 +14195,8 @@ fi
14710 14195
14711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14712fi 14197fi
14713{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_writev" >&5 14198{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_writev" >&5
14714$as_echo "$ac_cv_have_decl_writev" >&6; } 14199echo "${ECHO_T}$ac_cv_have_decl_writev" >&6; }
14715if test $ac_cv_have_decl_writev = yes; then 14200if test $ac_cv_have_decl_writev = yes; then
14716 14201
14717cat >>confdefs.h <<_ACEOF 14202cat >>confdefs.h <<_ACEOF
@@ -14729,10 +14214,10 @@ fi
14729 14214
14730 14215
14731 14216
14732{ $as_echo "$as_me:$LINENO: checking whether MAXSYMLINKS is declared" >&5 14217{ echo "$as_me:$LINENO: checking whether MAXSYMLINKS is declared" >&5
14733$as_echo_n "checking whether MAXSYMLINKS is declared... " >&6; } 14218echo $ECHO_N "checking whether MAXSYMLINKS is declared... $ECHO_C" >&6; }
14734if test "${ac_cv_have_decl_MAXSYMLINKS+set}" = set; then 14219if test "${ac_cv_have_decl_MAXSYMLINKS+set}" = set; then
14735 $as_echo_n "(cached) " >&6 14220 echo $ECHO_N "(cached) $ECHO_C" >&6
14736else 14221else
14737 cat >conftest.$ac_ext <<_ACEOF 14222 cat >conftest.$ac_ext <<_ACEOF
14738/* confdefs.h. */ 14223/* confdefs.h. */
@@ -14761,21 +14246,20 @@ case "(($ac_try" in
14761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14762 *) ac_try_echo=$ac_try;; 14247 *) ac_try_echo=$ac_try;;
14763esac 14248esac
14764eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14765$as_echo "$ac_try_echo") >&5
14766 (eval "$ac_compile") 2>conftest.er1 14250 (eval "$ac_compile") 2>conftest.er1
14767 ac_status=$? 14251 ac_status=$?
14768 grep -v '^ *+' conftest.er1 >conftest.err 14252 grep -v '^ *+' conftest.er1 >conftest.err
14769 rm -f conftest.er1 14253 rm -f conftest.er1
14770 cat conftest.err >&5 14254 cat conftest.err >&5
14771 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14772 (exit $ac_status); } && { 14256 (exit $ac_status); } && {
14773 test -z "$ac_c_werror_flag" || 14257 test -z "$ac_c_werror_flag" ||
14774 test ! -s conftest.err 14258 test ! -s conftest.err
14775 } && test -s conftest.$ac_objext; then 14259 } && test -s conftest.$ac_objext; then
14776 ac_cv_have_decl_MAXSYMLINKS=yes 14260 ac_cv_have_decl_MAXSYMLINKS=yes
14777else 14261else
14778 $as_echo "$as_me: failed program was:" >&5 14262 echo "$as_me: failed program was:" >&5
14779sed 's/^/| /' conftest.$ac_ext >&5 14263sed 's/^/| /' conftest.$ac_ext >&5
14780 14264
14781 ac_cv_have_decl_MAXSYMLINKS=no 14265 ac_cv_have_decl_MAXSYMLINKS=no
@@ -14783,8 +14267,8 @@ fi
14783 14267
14784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14785fi 14269fi
14786{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_MAXSYMLINKS" >&5 14270{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_MAXSYMLINKS" >&5
14787$as_echo "$ac_cv_have_decl_MAXSYMLINKS" >&6; } 14271echo "${ECHO_T}$ac_cv_have_decl_MAXSYMLINKS" >&6; }
14788if test $ac_cv_have_decl_MAXSYMLINKS = yes; then 14272if test $ac_cv_have_decl_MAXSYMLINKS = yes; then
14789 14273
14790cat >>confdefs.h <<_ACEOF 14274cat >>confdefs.h <<_ACEOF
@@ -14802,10 +14286,10 @@ fi
14802 14286
14803 14287
14804 14288
14805{ $as_echo "$as_me:$LINENO: checking whether offsetof is declared" >&5 14289{ echo "$as_me:$LINENO: checking whether offsetof is declared" >&5
14806$as_echo_n "checking whether offsetof is declared... " >&6; } 14290echo $ECHO_N "checking whether offsetof is declared... $ECHO_C" >&6; }
14807if test "${ac_cv_have_decl_offsetof+set}" = set; then 14291if test "${ac_cv_have_decl_offsetof+set}" = set; then
14808 $as_echo_n "(cached) " >&6 14292 echo $ECHO_N "(cached) $ECHO_C" >&6
14809else 14293else
14810 cat >conftest.$ac_ext <<_ACEOF 14294 cat >conftest.$ac_ext <<_ACEOF
14811/* confdefs.h. */ 14295/* confdefs.h. */
@@ -14834,21 +14318,20 @@ case "(($ac_try" in
14834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14835 *) ac_try_echo=$ac_try;; 14319 *) ac_try_echo=$ac_try;;
14836esac 14320esac
14837eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14838$as_echo "$ac_try_echo") >&5
14839 (eval "$ac_compile") 2>conftest.er1 14322 (eval "$ac_compile") 2>conftest.er1
14840 ac_status=$? 14323 ac_status=$?
14841 grep -v '^ *+' conftest.er1 >conftest.err 14324 grep -v '^ *+' conftest.er1 >conftest.err
14842 rm -f conftest.er1 14325 rm -f conftest.er1
14843 cat conftest.err >&5 14326 cat conftest.err >&5
14844 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14845 (exit $ac_status); } && { 14328 (exit $ac_status); } && {
14846 test -z "$ac_c_werror_flag" || 14329 test -z "$ac_c_werror_flag" ||
14847 test ! -s conftest.err 14330 test ! -s conftest.err
14848 } && test -s conftest.$ac_objext; then 14331 } && test -s conftest.$ac_objext; then
14849 ac_cv_have_decl_offsetof=yes 14332 ac_cv_have_decl_offsetof=yes
14850else 14333else
14851 $as_echo "$as_me: failed program was:" >&5 14334 echo "$as_me: failed program was:" >&5
14852sed 's/^/| /' conftest.$ac_ext >&5 14335sed 's/^/| /' conftest.$ac_ext >&5
14853 14336
14854 ac_cv_have_decl_offsetof=no 14337 ac_cv_have_decl_offsetof=no
@@ -14856,8 +14339,8 @@ fi
14856 14339
14857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14858fi 14341fi
14859{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_offsetof" >&5 14342{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_offsetof" >&5
14860$as_echo "$ac_cv_have_decl_offsetof" >&6; } 14343echo "${ECHO_T}$ac_cv_have_decl_offsetof" >&6; }
14861if test $ac_cv_have_decl_offsetof = yes; then 14344if test $ac_cv_have_decl_offsetof = yes; then
14862 14345
14863cat >>confdefs.h <<_ACEOF 14346cat >>confdefs.h <<_ACEOF
@@ -14878,11 +14361,11 @@ fi
14878 14361
14879for ac_func in setresuid 14362for ac_func in setresuid
14880do 14363do
14881as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 14364as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14882{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 14365{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14883$as_echo_n "checking for $ac_func... " >&6; } 14366echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14884if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 14367if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
14885 $as_echo_n "(cached) " >&6 14368 echo $ECHO_N "(cached) $ECHO_C" >&6
14886else 14369else
14887 cat >conftest.$ac_ext <<_ACEOF 14370 cat >conftest.$ac_ext <<_ACEOF
14888/* confdefs.h. */ 14371/* confdefs.h. */
@@ -14935,48 +14418,42 @@ case "(($ac_try" in
14935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14936 *) ac_try_echo=$ac_try;; 14419 *) ac_try_echo=$ac_try;;
14937esac 14420esac
14938eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14939$as_echo "$ac_try_echo") >&5
14940 (eval "$ac_link") 2>conftest.er1 14422 (eval "$ac_link") 2>conftest.er1
14941 ac_status=$? 14423 ac_status=$?
14942 grep -v '^ *+' conftest.er1 >conftest.err 14424 grep -v '^ *+' conftest.er1 >conftest.err
14943 rm -f conftest.er1 14425 rm -f conftest.er1
14944 cat conftest.err >&5 14426 cat conftest.err >&5
14945 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14946 (exit $ac_status); } && { 14428 (exit $ac_status); } && {
14947 test -z "$ac_c_werror_flag" || 14429 test -z "$ac_c_werror_flag" ||
14948 test ! -s conftest.err 14430 test ! -s conftest.err
14949 } && test -s conftest$ac_exeext && { 14431 } && test -s conftest$ac_exeext &&
14950 test "$cross_compiling" = yes || 14432 $as_test_x conftest$ac_exeext; then
14951 $as_test_x conftest$ac_exeext
14952 }; then
14953 eval "$as_ac_var=yes" 14433 eval "$as_ac_var=yes"
14954else 14434else
14955 $as_echo "$as_me: failed program was:" >&5 14435 echo "$as_me: failed program was:" >&5
14956sed 's/^/| /' conftest.$ac_ext >&5 14436sed 's/^/| /' conftest.$ac_ext >&5
14957 14437
14958 eval "$as_ac_var=no" 14438 eval "$as_ac_var=no"
14959fi 14439fi
14960 14440
14961rm -rf conftest.dSYM
14962rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14441rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14963 conftest$ac_exeext conftest.$ac_ext 14442 conftest$ac_exeext conftest.$ac_ext
14964fi 14443fi
14965ac_res=`eval 'as_val=${'$as_ac_var'} 14444ac_res=`eval echo '${'$as_ac_var'}'`
14966 $as_echo "$as_val"'` 14445 { echo "$as_me:$LINENO: result: $ac_res" >&5
14967 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 14446echo "${ECHO_T}$ac_res" >&6; }
14968$as_echo "$ac_res" >&6; } 14447if test `eval echo '${'$as_ac_var'}'` = yes; then
14969if test `eval 'as_val=${'$as_ac_var'}
14970 $as_echo "$as_val"'` = yes; then
14971 cat >>confdefs.h <<_ACEOF 14448 cat >>confdefs.h <<_ACEOF
14972#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 14449#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14973_ACEOF 14450_ACEOF
14974 14451
14975 { $as_echo "$as_me:$LINENO: checking if setresuid seems to work" >&5 14452 { echo "$as_me:$LINENO: checking if setresuid seems to work" >&5
14976$as_echo_n "checking if setresuid seems to work... " >&6; } 14453echo $ECHO_N "checking if setresuid seems to work... $ECHO_C" >&6; }
14977 if test "$cross_compiling" = yes; then 14454 if test "$cross_compiling" = yes; then
14978 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: not checking setresuid" >&5 14455 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking setresuid" >&5
14979$as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;} 14456echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
14980 14457
14981else 14458else
14982 cat >conftest.$ac_ext <<_ACEOF 14459 cat >conftest.$ac_ext <<_ACEOF
@@ -14997,27 +14474,25 @@ case "(($ac_try" in
14997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14998 *) ac_try_echo=$ac_try;; 14475 *) ac_try_echo=$ac_try;;
14999esac 14476esac
15000eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15001$as_echo "$ac_try_echo") >&5
15002 (eval "$ac_link") 2>&5 14478 (eval "$ac_link") 2>&5
15003 ac_status=$? 14479 ac_status=$?
15004 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15005 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 14481 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15006 { (case "(($ac_try" in 14482 { (case "(($ac_try" in
15007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15008 *) ac_try_echo=$ac_try;; 14484 *) ac_try_echo=$ac_try;;
15009esac 14485esac
15010eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15011$as_echo "$ac_try_echo") >&5
15012 (eval "$ac_try") 2>&5 14487 (eval "$ac_try") 2>&5
15013 ac_status=$? 14488 ac_status=$?
15014 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15015 (exit $ac_status); }; }; then 14490 (exit $ac_status); }; }; then
15016 { $as_echo "$as_me:$LINENO: result: yes" >&5 14491 { echo "$as_me:$LINENO: result: yes" >&5
15017$as_echo "yes" >&6; } 14492echo "${ECHO_T}yes" >&6; }
15018else 14493else
15019 $as_echo "$as_me: program exited with status $ac_status" >&5 14494 echo "$as_me: program exited with status $ac_status" >&5
15020$as_echo "$as_me: failed program was:" >&5 14495echo "$as_me: failed program was:" >&5
15021sed 's/^/| /' conftest.$ac_ext >&5 14496sed 's/^/| /' conftest.$ac_ext >&5
15022 14497
15023( exit $ac_status ) 14498( exit $ac_status )
@@ -15026,10 +14501,9 @@ cat >>confdefs.h <<\_ACEOF
15026#define BROKEN_SETRESUID 1 14501#define BROKEN_SETRESUID 1
15027_ACEOF 14502_ACEOF
15028 14503
15029 { $as_echo "$as_me:$LINENO: result: not implemented" >&5 14504 { echo "$as_me:$LINENO: result: not implemented" >&5
15030$as_echo "not implemented" >&6; } 14505echo "${ECHO_T}not implemented" >&6; }
15031fi 14506fi
15032rm -rf conftest.dSYM
15033rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 14507rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15034fi 14508fi
15035 14509
@@ -15042,11 +14516,11 @@ done
15042 14516
15043for ac_func in setresgid 14517for ac_func in setresgid
15044do 14518do
15045as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 14519as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15046{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 14520{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15047$as_echo_n "checking for $ac_func... " >&6; } 14521echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15048if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 14522if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
15049 $as_echo_n "(cached) " >&6 14523 echo $ECHO_N "(cached) $ECHO_C" >&6
15050else 14524else
15051 cat >conftest.$ac_ext <<_ACEOF 14525 cat >conftest.$ac_ext <<_ACEOF
15052/* confdefs.h. */ 14526/* confdefs.h. */
@@ -15099,48 +14573,42 @@ case "(($ac_try" in
15099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15100 *) ac_try_echo=$ac_try;; 14574 *) ac_try_echo=$ac_try;;
15101esac 14575esac
15102eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15103$as_echo "$ac_try_echo") >&5
15104 (eval "$ac_link") 2>conftest.er1 14577 (eval "$ac_link") 2>conftest.er1
15105 ac_status=$? 14578 ac_status=$?
15106 grep -v '^ *+' conftest.er1 >conftest.err 14579 grep -v '^ *+' conftest.er1 >conftest.err
15107 rm -f conftest.er1 14580 rm -f conftest.er1
15108 cat conftest.err >&5 14581 cat conftest.err >&5
15109 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15110 (exit $ac_status); } && { 14583 (exit $ac_status); } && {
15111 test -z "$ac_c_werror_flag" || 14584 test -z "$ac_c_werror_flag" ||
15112 test ! -s conftest.err 14585 test ! -s conftest.err
15113 } && test -s conftest$ac_exeext && { 14586 } && test -s conftest$ac_exeext &&
15114 test "$cross_compiling" = yes || 14587 $as_test_x conftest$ac_exeext; then
15115 $as_test_x conftest$ac_exeext
15116 }; then
15117 eval "$as_ac_var=yes" 14588 eval "$as_ac_var=yes"
15118else 14589else
15119 $as_echo "$as_me: failed program was:" >&5 14590 echo "$as_me: failed program was:" >&5
15120sed 's/^/| /' conftest.$ac_ext >&5 14591sed 's/^/| /' conftest.$ac_ext >&5
15121 14592
15122 eval "$as_ac_var=no" 14593 eval "$as_ac_var=no"
15123fi 14594fi
15124 14595
15125rm -rf conftest.dSYM
15126rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14596rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15127 conftest$ac_exeext conftest.$ac_ext 14597 conftest$ac_exeext conftest.$ac_ext
15128fi 14598fi
15129ac_res=`eval 'as_val=${'$as_ac_var'} 14599ac_res=`eval echo '${'$as_ac_var'}'`
15130 $as_echo "$as_val"'` 14600 { echo "$as_me:$LINENO: result: $ac_res" >&5
15131 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 14601echo "${ECHO_T}$ac_res" >&6; }
15132$as_echo "$ac_res" >&6; } 14602if test `eval echo '${'$as_ac_var'}'` = yes; then
15133if test `eval 'as_val=${'$as_ac_var'}
15134 $as_echo "$as_val"'` = yes; then
15135 cat >>confdefs.h <<_ACEOF 14603 cat >>confdefs.h <<_ACEOF
15136#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 14604#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15137_ACEOF 14605_ACEOF
15138 14606
15139 { $as_echo "$as_me:$LINENO: checking if setresgid seems to work" >&5 14607 { echo "$as_me:$LINENO: checking if setresgid seems to work" >&5
15140$as_echo_n "checking if setresgid seems to work... " >&6; } 14608echo $ECHO_N "checking if setresgid seems to work... $ECHO_C" >&6; }
15141 if test "$cross_compiling" = yes; then 14609 if test "$cross_compiling" = yes; then
15142 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: not checking setresuid" >&5 14610 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking setresuid" >&5
15143$as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;} 14611echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
15144 14612
15145else 14613else
15146 cat >conftest.$ac_ext <<_ACEOF 14614 cat >conftest.$ac_ext <<_ACEOF
@@ -15161,27 +14629,25 @@ case "(($ac_try" in
15161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15162 *) ac_try_echo=$ac_try;; 14630 *) ac_try_echo=$ac_try;;
15163esac 14631esac
15164eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15165$as_echo "$ac_try_echo") >&5
15166 (eval "$ac_link") 2>&5 14633 (eval "$ac_link") 2>&5
15167 ac_status=$? 14634 ac_status=$?
15168 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15169 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 14636 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15170 { (case "(($ac_try" in 14637 { (case "(($ac_try" in
15171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15172 *) ac_try_echo=$ac_try;; 14639 *) ac_try_echo=$ac_try;;
15173esac 14640esac
15174eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15175$as_echo "$ac_try_echo") >&5
15176 (eval "$ac_try") 2>&5 14642 (eval "$ac_try") 2>&5
15177 ac_status=$? 14643 ac_status=$?
15178 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15179 (exit $ac_status); }; }; then 14645 (exit $ac_status); }; }; then
15180 { $as_echo "$as_me:$LINENO: result: yes" >&5 14646 { echo "$as_me:$LINENO: result: yes" >&5
15181$as_echo "yes" >&6; } 14647echo "${ECHO_T}yes" >&6; }
15182else 14648else
15183 $as_echo "$as_me: program exited with status $ac_status" >&5 14649 echo "$as_me: program exited with status $ac_status" >&5
15184$as_echo "$as_me: failed program was:" >&5 14650echo "$as_me: failed program was:" >&5
15185sed 's/^/| /' conftest.$ac_ext >&5 14651sed 's/^/| /' conftest.$ac_ext >&5
15186 14652
15187( exit $ac_status ) 14653( exit $ac_status )
@@ -15190,10 +14656,9 @@ cat >>confdefs.h <<\_ACEOF
15190#define BROKEN_SETRESGID 1 14656#define BROKEN_SETRESGID 1
15191_ACEOF 14657_ACEOF
15192 14658
15193 { $as_echo "$as_me:$LINENO: result: not implemented" >&5 14659 { echo "$as_me:$LINENO: result: not implemented" >&5
15194$as_echo "not implemented" >&6; } 14660echo "${ECHO_T}not implemented" >&6; }
15195fi 14661fi
15196rm -rf conftest.dSYM
15197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 14662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15198fi 14663fi
15199 14664
@@ -15207,11 +14672,11 @@ done
15207 14672
15208for ac_func in gettimeofday time 14673for ac_func in gettimeofday time
15209do 14674do
15210as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 14675as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15211{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 14676{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15212$as_echo_n "checking for $ac_func... " >&6; } 14677echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15213if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 14678if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
15214 $as_echo_n "(cached) " >&6 14679 echo $ECHO_N "(cached) $ECHO_C" >&6
15215else 14680else
15216 cat >conftest.$ac_ext <<_ACEOF 14681 cat >conftest.$ac_ext <<_ACEOF
15217/* confdefs.h. */ 14682/* confdefs.h. */
@@ -15264,41 +14729,35 @@ case "(($ac_try" in
15264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15265 *) ac_try_echo=$ac_try;; 14730 *) ac_try_echo=$ac_try;;
15266esac 14731esac
15267eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15268$as_echo "$ac_try_echo") >&5
15269 (eval "$ac_link") 2>conftest.er1 14733 (eval "$ac_link") 2>conftest.er1
15270 ac_status=$? 14734 ac_status=$?
15271 grep -v '^ *+' conftest.er1 >conftest.err 14735 grep -v '^ *+' conftest.er1 >conftest.err
15272 rm -f conftest.er1 14736 rm -f conftest.er1
15273 cat conftest.err >&5 14737 cat conftest.err >&5
15274 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15275 (exit $ac_status); } && { 14739 (exit $ac_status); } && {
15276 test -z "$ac_c_werror_flag" || 14740 test -z "$ac_c_werror_flag" ||
15277 test ! -s conftest.err 14741 test ! -s conftest.err
15278 } && test -s conftest$ac_exeext && { 14742 } && test -s conftest$ac_exeext &&
15279 test "$cross_compiling" = yes || 14743 $as_test_x conftest$ac_exeext; then
15280 $as_test_x conftest$ac_exeext
15281 }; then
15282 eval "$as_ac_var=yes" 14744 eval "$as_ac_var=yes"
15283else 14745else
15284 $as_echo "$as_me: failed program was:" >&5 14746 echo "$as_me: failed program was:" >&5
15285sed 's/^/| /' conftest.$ac_ext >&5 14747sed 's/^/| /' conftest.$ac_ext >&5
15286 14748
15287 eval "$as_ac_var=no" 14749 eval "$as_ac_var=no"
15288fi 14750fi
15289 14751
15290rm -rf conftest.dSYM
15291rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14752rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15292 conftest$ac_exeext conftest.$ac_ext 14753 conftest$ac_exeext conftest.$ac_ext
15293fi 14754fi
15294ac_res=`eval 'as_val=${'$as_ac_var'} 14755ac_res=`eval echo '${'$as_ac_var'}'`
15295 $as_echo "$as_val"'` 14756 { echo "$as_me:$LINENO: result: $ac_res" >&5
15296 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 14757echo "${ECHO_T}$ac_res" >&6; }
15297$as_echo "$ac_res" >&6; } 14758if test `eval echo '${'$as_ac_var'}'` = yes; then
15298if test `eval 'as_val=${'$as_ac_var'}
15299 $as_echo "$as_val"'` = yes; then
15300 cat >>confdefs.h <<_ACEOF 14759 cat >>confdefs.h <<_ACEOF
15301#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 14760#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15302_ACEOF 14761_ACEOF
15303 14762
15304fi 14763fi
@@ -15312,11 +14771,11 @@ done
15312 14771
15313for ac_func in endutent getutent getutid getutline pututline setutent 14772for ac_func in endutent getutent getutid getutline pututline setutent
15314do 14773do
15315as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 14774as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15316{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 14775{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15317$as_echo_n "checking for $ac_func... " >&6; } 14776echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15318if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 14777if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
15319 $as_echo_n "(cached) " >&6 14778 echo $ECHO_N "(cached) $ECHO_C" >&6
15320else 14779else
15321 cat >conftest.$ac_ext <<_ACEOF 14780 cat >conftest.$ac_ext <<_ACEOF
15322/* confdefs.h. */ 14781/* confdefs.h. */
@@ -15369,41 +14828,35 @@ case "(($ac_try" in
15369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15370 *) ac_try_echo=$ac_try;; 14829 *) ac_try_echo=$ac_try;;
15371esac 14830esac
15372eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15373$as_echo "$ac_try_echo") >&5
15374 (eval "$ac_link") 2>conftest.er1 14832 (eval "$ac_link") 2>conftest.er1
15375 ac_status=$? 14833 ac_status=$?
15376 grep -v '^ *+' conftest.er1 >conftest.err 14834 grep -v '^ *+' conftest.er1 >conftest.err
15377 rm -f conftest.er1 14835 rm -f conftest.er1
15378 cat conftest.err >&5 14836 cat conftest.err >&5
15379 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15380 (exit $ac_status); } && { 14838 (exit $ac_status); } && {
15381 test -z "$ac_c_werror_flag" || 14839 test -z "$ac_c_werror_flag" ||
15382 test ! -s conftest.err 14840 test ! -s conftest.err
15383 } && test -s conftest$ac_exeext && { 14841 } && test -s conftest$ac_exeext &&
15384 test "$cross_compiling" = yes || 14842 $as_test_x conftest$ac_exeext; then
15385 $as_test_x conftest$ac_exeext
15386 }; then
15387 eval "$as_ac_var=yes" 14843 eval "$as_ac_var=yes"
15388else 14844else
15389 $as_echo "$as_me: failed program was:" >&5 14845 echo "$as_me: failed program was:" >&5
15390sed 's/^/| /' conftest.$ac_ext >&5 14846sed 's/^/| /' conftest.$ac_ext >&5
15391 14847
15392 eval "$as_ac_var=no" 14848 eval "$as_ac_var=no"
15393fi 14849fi
15394 14850
15395rm -rf conftest.dSYM
15396rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14851rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15397 conftest$ac_exeext conftest.$ac_ext 14852 conftest$ac_exeext conftest.$ac_ext
15398fi 14853fi
15399ac_res=`eval 'as_val=${'$as_ac_var'} 14854ac_res=`eval echo '${'$as_ac_var'}'`
15400 $as_echo "$as_val"'` 14855 { echo "$as_me:$LINENO: result: $ac_res" >&5
15401 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 14856echo "${ECHO_T}$ac_res" >&6; }
15402$as_echo "$ac_res" >&6; } 14857if test `eval echo '${'$as_ac_var'}'` = yes; then
15403if test `eval 'as_val=${'$as_ac_var'}
15404 $as_echo "$as_val"'` = yes; then
15405 cat >>confdefs.h <<_ACEOF 14858 cat >>confdefs.h <<_ACEOF
15406#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 14859#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15407_ACEOF 14860_ACEOF
15408 14861
15409fi 14862fi
@@ -15412,11 +14865,11 @@ done
15412 14865
15413for ac_func in utmpname 14866for ac_func in utmpname
15414do 14867do
15415as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 14868as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15416{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 14869{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15417$as_echo_n "checking for $ac_func... " >&6; } 14870echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15418if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 14871if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
15419 $as_echo_n "(cached) " >&6 14872 echo $ECHO_N "(cached) $ECHO_C" >&6
15420else 14873else
15421 cat >conftest.$ac_ext <<_ACEOF 14874 cat >conftest.$ac_ext <<_ACEOF
15422/* confdefs.h. */ 14875/* confdefs.h. */
@@ -15469,41 +14922,35 @@ case "(($ac_try" in
15469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15470 *) ac_try_echo=$ac_try;; 14923 *) ac_try_echo=$ac_try;;
15471esac 14924esac
15472eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15473$as_echo "$ac_try_echo") >&5
15474 (eval "$ac_link") 2>conftest.er1 14926 (eval "$ac_link") 2>conftest.er1
15475 ac_status=$? 14927 ac_status=$?
15476 grep -v '^ *+' conftest.er1 >conftest.err 14928 grep -v '^ *+' conftest.er1 >conftest.err
15477 rm -f conftest.er1 14929 rm -f conftest.er1
15478 cat conftest.err >&5 14930 cat conftest.err >&5
15479 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15480 (exit $ac_status); } && { 14932 (exit $ac_status); } && {
15481 test -z "$ac_c_werror_flag" || 14933 test -z "$ac_c_werror_flag" ||
15482 test ! -s conftest.err 14934 test ! -s conftest.err
15483 } && test -s conftest$ac_exeext && { 14935 } && test -s conftest$ac_exeext &&
15484 test "$cross_compiling" = yes || 14936 $as_test_x conftest$ac_exeext; then
15485 $as_test_x conftest$ac_exeext
15486 }; then
15487 eval "$as_ac_var=yes" 14937 eval "$as_ac_var=yes"
15488else 14938else
15489 $as_echo "$as_me: failed program was:" >&5 14939 echo "$as_me: failed program was:" >&5
15490sed 's/^/| /' conftest.$ac_ext >&5 14940sed 's/^/| /' conftest.$ac_ext >&5
15491 14941
15492 eval "$as_ac_var=no" 14942 eval "$as_ac_var=no"
15493fi 14943fi
15494 14944
15495rm -rf conftest.dSYM
15496rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14945rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15497 conftest$ac_exeext conftest.$ac_ext 14946 conftest$ac_exeext conftest.$ac_ext
15498fi 14947fi
15499ac_res=`eval 'as_val=${'$as_ac_var'} 14948ac_res=`eval echo '${'$as_ac_var'}'`
15500 $as_echo "$as_val"'` 14949 { echo "$as_me:$LINENO: result: $ac_res" >&5
15501 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 14950echo "${ECHO_T}$ac_res" >&6; }
15502$as_echo "$ac_res" >&6; } 14951if test `eval echo '${'$as_ac_var'}'` = yes; then
15503if test `eval 'as_val=${'$as_ac_var'}
15504 $as_echo "$as_val"'` = yes; then
15505 cat >>confdefs.h <<_ACEOF 14952 cat >>confdefs.h <<_ACEOF
15506#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 14953#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15507_ACEOF 14954_ACEOF
15508 14955
15509fi 14956fi
@@ -15516,11 +14963,11 @@ done
15516 14963
15517for ac_func in endutxent getutxent getutxid getutxline pututxline 14964for ac_func in endutxent getutxent getutxid getutxline pututxline
15518do 14965do
15519as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 14966as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15520{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 14967{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15521$as_echo_n "checking for $ac_func... " >&6; } 14968echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15522if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 14969if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
15523 $as_echo_n "(cached) " >&6 14970 echo $ECHO_N "(cached) $ECHO_C" >&6
15524else 14971else
15525 cat >conftest.$ac_ext <<_ACEOF 14972 cat >conftest.$ac_ext <<_ACEOF
15526/* confdefs.h. */ 14973/* confdefs.h. */
@@ -15573,41 +15020,35 @@ case "(($ac_try" in
15573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15574 *) ac_try_echo=$ac_try;; 15021 *) ac_try_echo=$ac_try;;
15575esac 15022esac
15576eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15577$as_echo "$ac_try_echo") >&5
15578 (eval "$ac_link") 2>conftest.er1 15024 (eval "$ac_link") 2>conftest.er1
15579 ac_status=$? 15025 ac_status=$?
15580 grep -v '^ *+' conftest.er1 >conftest.err 15026 grep -v '^ *+' conftest.er1 >conftest.err
15581 rm -f conftest.er1 15027 rm -f conftest.er1
15582 cat conftest.err >&5 15028 cat conftest.err >&5
15583 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15584 (exit $ac_status); } && { 15030 (exit $ac_status); } && {
15585 test -z "$ac_c_werror_flag" || 15031 test -z "$ac_c_werror_flag" ||
15586 test ! -s conftest.err 15032 test ! -s conftest.err
15587 } && test -s conftest$ac_exeext && { 15033 } && test -s conftest$ac_exeext &&
15588 test "$cross_compiling" = yes || 15034 $as_test_x conftest$ac_exeext; then
15589 $as_test_x conftest$ac_exeext
15590 }; then
15591 eval "$as_ac_var=yes" 15035 eval "$as_ac_var=yes"
15592else 15036else
15593 $as_echo "$as_me: failed program was:" >&5 15037 echo "$as_me: failed program was:" >&5
15594sed 's/^/| /' conftest.$ac_ext >&5 15038sed 's/^/| /' conftest.$ac_ext >&5
15595 15039
15596 eval "$as_ac_var=no" 15040 eval "$as_ac_var=no"
15597fi 15041fi
15598 15042
15599rm -rf conftest.dSYM
15600rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 15043rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15601 conftest$ac_exeext conftest.$ac_ext 15044 conftest$ac_exeext conftest.$ac_ext
15602fi 15045fi
15603ac_res=`eval 'as_val=${'$as_ac_var'} 15046ac_res=`eval echo '${'$as_ac_var'}'`
15604 $as_echo "$as_val"'` 15047 { echo "$as_me:$LINENO: result: $ac_res" >&5
15605 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 15048echo "${ECHO_T}$ac_res" >&6; }
15606$as_echo "$ac_res" >&6; } 15049if test `eval echo '${'$as_ac_var'}'` = yes; then
15607if test `eval 'as_val=${'$as_ac_var'}
15608 $as_echo "$as_val"'` = yes; then
15609 cat >>confdefs.h <<_ACEOF 15050 cat >>confdefs.h <<_ACEOF
15610#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 15051#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15611_ACEOF 15052_ACEOF
15612 15053
15613fi 15054fi
@@ -15617,11 +15058,11 @@ done
15617 15058
15618for ac_func in setutxent utmpxname 15059for ac_func in setutxent utmpxname
15619do 15060do
15620as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 15061as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15621{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 15062{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15622$as_echo_n "checking for $ac_func... " >&6; } 15063echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15623if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 15064if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
15624 $as_echo_n "(cached) " >&6 15065 echo $ECHO_N "(cached) $ECHO_C" >&6
15625else 15066else
15626 cat >conftest.$ac_ext <<_ACEOF 15067 cat >conftest.$ac_ext <<_ACEOF
15627/* confdefs.h. */ 15068/* confdefs.h. */
@@ -15674,41 +15115,35 @@ case "(($ac_try" in
15674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15675 *) ac_try_echo=$ac_try;; 15116 *) ac_try_echo=$ac_try;;
15676esac 15117esac
15677eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15678$as_echo "$ac_try_echo") >&5
15679 (eval "$ac_link") 2>conftest.er1 15119 (eval "$ac_link") 2>conftest.er1
15680 ac_status=$? 15120 ac_status=$?
15681 grep -v '^ *+' conftest.er1 >conftest.err 15121 grep -v '^ *+' conftest.er1 >conftest.err
15682 rm -f conftest.er1 15122 rm -f conftest.er1
15683 cat conftest.err >&5 15123 cat conftest.err >&5
15684 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15685 (exit $ac_status); } && { 15125 (exit $ac_status); } && {
15686 test -z "$ac_c_werror_flag" || 15126 test -z "$ac_c_werror_flag" ||
15687 test ! -s conftest.err 15127 test ! -s conftest.err
15688 } && test -s conftest$ac_exeext && { 15128 } && test -s conftest$ac_exeext &&
15689 test "$cross_compiling" = yes || 15129 $as_test_x conftest$ac_exeext; then
15690 $as_test_x conftest$ac_exeext
15691 }; then
15692 eval "$as_ac_var=yes" 15130 eval "$as_ac_var=yes"
15693else 15131else
15694 $as_echo "$as_me: failed program was:" >&5 15132 echo "$as_me: failed program was:" >&5
15695sed 's/^/| /' conftest.$ac_ext >&5 15133sed 's/^/| /' conftest.$ac_ext >&5
15696 15134
15697 eval "$as_ac_var=no" 15135 eval "$as_ac_var=no"
15698fi 15136fi
15699 15137
15700rm -rf conftest.dSYM
15701rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 15138rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15702 conftest$ac_exeext conftest.$ac_ext 15139 conftest$ac_exeext conftest.$ac_ext
15703fi 15140fi
15704ac_res=`eval 'as_val=${'$as_ac_var'} 15141ac_res=`eval echo '${'$as_ac_var'}'`
15705 $as_echo "$as_val"'` 15142 { echo "$as_me:$LINENO: result: $ac_res" >&5
15706 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 15143echo "${ECHO_T}$ac_res" >&6; }
15707$as_echo "$ac_res" >&6; } 15144if test `eval echo '${'$as_ac_var'}'` = yes; then
15708if test `eval 'as_val=${'$as_ac_var'}
15709 $as_echo "$as_val"'` = yes; then
15710 cat >>confdefs.h <<_ACEOF 15145 cat >>confdefs.h <<_ACEOF
15711#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 15146#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15712_ACEOF 15147_ACEOF
15713 15148
15714fi 15149fi
@@ -15717,11 +15152,11 @@ done
15717 15152
15718for ac_func in getlastlogxbyname 15153for ac_func in getlastlogxbyname
15719do 15154do
15720as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 15155as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15721{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 15156{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15722$as_echo_n "checking for $ac_func... " >&6; } 15157echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15723if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 15158if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
15724 $as_echo_n "(cached) " >&6 15159 echo $ECHO_N "(cached) $ECHO_C" >&6
15725else 15160else
15726 cat >conftest.$ac_ext <<_ACEOF 15161 cat >conftest.$ac_ext <<_ACEOF
15727/* confdefs.h. */ 15162/* confdefs.h. */
@@ -15774,51 +15209,45 @@ case "(($ac_try" in
15774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15775 *) ac_try_echo=$ac_try;; 15210 *) ac_try_echo=$ac_try;;
15776esac 15211esac
15777eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15778$as_echo "$ac_try_echo") >&5
15779 (eval "$ac_link") 2>conftest.er1 15213 (eval "$ac_link") 2>conftest.er1
15780 ac_status=$? 15214 ac_status=$?
15781 grep -v '^ *+' conftest.er1 >conftest.err 15215 grep -v '^ *+' conftest.er1 >conftest.err
15782 rm -f conftest.er1 15216 rm -f conftest.er1
15783 cat conftest.err >&5 15217 cat conftest.err >&5
15784 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15785 (exit $ac_status); } && { 15219 (exit $ac_status); } && {
15786 test -z "$ac_c_werror_flag" || 15220 test -z "$ac_c_werror_flag" ||
15787 test ! -s conftest.err 15221 test ! -s conftest.err
15788 } && test -s conftest$ac_exeext && { 15222 } && test -s conftest$ac_exeext &&
15789 test "$cross_compiling" = yes || 15223 $as_test_x conftest$ac_exeext; then
15790 $as_test_x conftest$ac_exeext
15791 }; then
15792 eval "$as_ac_var=yes" 15224 eval "$as_ac_var=yes"
15793else 15225else
15794 $as_echo "$as_me: failed program was:" >&5 15226 echo "$as_me: failed program was:" >&5
15795sed 's/^/| /' conftest.$ac_ext >&5 15227sed 's/^/| /' conftest.$ac_ext >&5
15796 15228
15797 eval "$as_ac_var=no" 15229 eval "$as_ac_var=no"
15798fi 15230fi
15799 15231
15800rm -rf conftest.dSYM
15801rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 15232rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15802 conftest$ac_exeext conftest.$ac_ext 15233 conftest$ac_exeext conftest.$ac_ext
15803fi 15234fi
15804ac_res=`eval 'as_val=${'$as_ac_var'} 15235ac_res=`eval echo '${'$as_ac_var'}'`
15805 $as_echo "$as_val"'` 15236 { echo "$as_me:$LINENO: result: $ac_res" >&5
15806 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 15237echo "${ECHO_T}$ac_res" >&6; }
15807$as_echo "$ac_res" >&6; } 15238if test `eval echo '${'$as_ac_var'}'` = yes; then
15808if test `eval 'as_val=${'$as_ac_var'}
15809 $as_echo "$as_val"'` = yes; then
15810 cat >>confdefs.h <<_ACEOF 15239 cat >>confdefs.h <<_ACEOF
15811#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 15240#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15812_ACEOF 15241_ACEOF
15813 15242
15814fi 15243fi
15815done 15244done
15816 15245
15817 15246
15818{ $as_echo "$as_me:$LINENO: checking for daemon" >&5 15247{ echo "$as_me:$LINENO: checking for daemon" >&5
15819$as_echo_n "checking for daemon... " >&6; } 15248echo $ECHO_N "checking for daemon... $ECHO_C" >&6; }
15820if test "${ac_cv_func_daemon+set}" = set; then 15249if test "${ac_cv_func_daemon+set}" = set; then
15821 $as_echo_n "(cached) " >&6 15250 echo $ECHO_N "(cached) $ECHO_C" >&6
15822else 15251else
15823 cat >conftest.$ac_ext <<_ACEOF 15252 cat >conftest.$ac_ext <<_ACEOF
15824/* confdefs.h. */ 15253/* confdefs.h. */
@@ -15871,35 +15300,31 @@ case "(($ac_try" in
15871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15872 *) ac_try_echo=$ac_try;; 15301 *) ac_try_echo=$ac_try;;
15873esac 15302esac
15874eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15875$as_echo "$ac_try_echo") >&5
15876 (eval "$ac_link") 2>conftest.er1 15304 (eval "$ac_link") 2>conftest.er1
15877 ac_status=$? 15305 ac_status=$?
15878 grep -v '^ *+' conftest.er1 >conftest.err 15306 grep -v '^ *+' conftest.er1 >conftest.err
15879 rm -f conftest.er1 15307 rm -f conftest.er1
15880 cat conftest.err >&5 15308 cat conftest.err >&5
15881 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15882 (exit $ac_status); } && { 15310 (exit $ac_status); } && {
15883 test -z "$ac_c_werror_flag" || 15311 test -z "$ac_c_werror_flag" ||
15884 test ! -s conftest.err 15312 test ! -s conftest.err
15885 } && test -s conftest$ac_exeext && { 15313 } && test -s conftest$ac_exeext &&
15886 test "$cross_compiling" = yes || 15314 $as_test_x conftest$ac_exeext; then
15887 $as_test_x conftest$ac_exeext
15888 }; then
15889 ac_cv_func_daemon=yes 15315 ac_cv_func_daemon=yes
15890else 15316else
15891 $as_echo "$as_me: failed program was:" >&5 15317 echo "$as_me: failed program was:" >&5
15892sed 's/^/| /' conftest.$ac_ext >&5 15318sed 's/^/| /' conftest.$ac_ext >&5
15893 15319
15894 ac_cv_func_daemon=no 15320 ac_cv_func_daemon=no
15895fi 15321fi
15896 15322
15897rm -rf conftest.dSYM
15898rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 15323rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15899 conftest$ac_exeext conftest.$ac_ext 15324 conftest$ac_exeext conftest.$ac_ext
15900fi 15325fi
15901{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_daemon" >&5 15326{ echo "$as_me:$LINENO: result: $ac_cv_func_daemon" >&5
15902$as_echo "$ac_cv_func_daemon" >&6; } 15327echo "${ECHO_T}$ac_cv_func_daemon" >&6; }
15903if test $ac_cv_func_daemon = yes; then 15328if test $ac_cv_func_daemon = yes; then
15904 15329
15905cat >>confdefs.h <<\_ACEOF 15330cat >>confdefs.h <<\_ACEOF
@@ -15907,10 +15332,10 @@ cat >>confdefs.h <<\_ACEOF
15907_ACEOF 15332_ACEOF
15908 15333
15909else 15334else
15910 { $as_echo "$as_me:$LINENO: checking for daemon in -lbsd" >&5 15335 { echo "$as_me:$LINENO: checking for daemon in -lbsd" >&5
15911$as_echo_n "checking for daemon in -lbsd... " >&6; } 15336echo $ECHO_N "checking for daemon in -lbsd... $ECHO_C" >&6; }
15912if test "${ac_cv_lib_bsd_daemon+set}" = set; then 15337if test "${ac_cv_lib_bsd_daemon+set}" = set; then
15913 $as_echo_n "(cached) " >&6 15338 echo $ECHO_N "(cached) $ECHO_C" >&6
15914else 15339else
15915 ac_check_lib_save_LIBS=$LIBS 15340 ac_check_lib_save_LIBS=$LIBS
15916LIBS="-lbsd $LIBS" 15341LIBS="-lbsd $LIBS"
@@ -15942,36 +15367,32 @@ case "(($ac_try" in
15942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15943 *) ac_try_echo=$ac_try;; 15368 *) ac_try_echo=$ac_try;;
15944esac 15369esac
15945eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15946$as_echo "$ac_try_echo") >&5
15947 (eval "$ac_link") 2>conftest.er1 15371 (eval "$ac_link") 2>conftest.er1
15948 ac_status=$? 15372 ac_status=$?
15949 grep -v '^ *+' conftest.er1 >conftest.err 15373 grep -v '^ *+' conftest.er1 >conftest.err
15950 rm -f conftest.er1 15374 rm -f conftest.er1
15951 cat conftest.err >&5 15375 cat conftest.err >&5
15952 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15953 (exit $ac_status); } && { 15377 (exit $ac_status); } && {
15954 test -z "$ac_c_werror_flag" || 15378 test -z "$ac_c_werror_flag" ||
15955 test ! -s conftest.err 15379 test ! -s conftest.err
15956 } && test -s conftest$ac_exeext && { 15380 } && test -s conftest$ac_exeext &&
15957 test "$cross_compiling" = yes || 15381 $as_test_x conftest$ac_exeext; then
15958 $as_test_x conftest$ac_exeext
15959 }; then
15960 ac_cv_lib_bsd_daemon=yes 15382 ac_cv_lib_bsd_daemon=yes
15961else 15383else
15962 $as_echo "$as_me: failed program was:" >&5 15384 echo "$as_me: failed program was:" >&5
15963sed 's/^/| /' conftest.$ac_ext >&5 15385sed 's/^/| /' conftest.$ac_ext >&5
15964 15386
15965 ac_cv_lib_bsd_daemon=no 15387 ac_cv_lib_bsd_daemon=no
15966fi 15388fi
15967 15389
15968rm -rf conftest.dSYM
15969rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 15390rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15970 conftest$ac_exeext conftest.$ac_ext 15391 conftest$ac_exeext conftest.$ac_ext
15971LIBS=$ac_check_lib_save_LIBS 15392LIBS=$ac_check_lib_save_LIBS
15972fi 15393fi
15973{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_daemon" >&5 15394{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_daemon" >&5
15974$as_echo "$ac_cv_lib_bsd_daemon" >&6; } 15395echo "${ECHO_T}$ac_cv_lib_bsd_daemon" >&6; }
15975if test $ac_cv_lib_bsd_daemon = yes; then 15396if test $ac_cv_lib_bsd_daemon = yes; then
15976 LIBS="$LIBS -lbsd"; cat >>confdefs.h <<\_ACEOF 15397 LIBS="$LIBS -lbsd"; cat >>confdefs.h <<\_ACEOF
15977#define HAVE_DAEMON 1 15398#define HAVE_DAEMON 1
@@ -15983,10 +15404,10 @@ fi
15983fi 15404fi
15984 15405
15985 15406
15986{ $as_echo "$as_me:$LINENO: checking for getpagesize" >&5 15407{ echo "$as_me:$LINENO: checking for getpagesize" >&5
15987$as_echo_n "checking for getpagesize... " >&6; } 15408echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
15988if test "${ac_cv_func_getpagesize+set}" = set; then 15409if test "${ac_cv_func_getpagesize+set}" = set; then
15989 $as_echo_n "(cached) " >&6 15410 echo $ECHO_N "(cached) $ECHO_C" >&6
15990else 15411else
15991 cat >conftest.$ac_ext <<_ACEOF 15412 cat >conftest.$ac_ext <<_ACEOF
15992/* confdefs.h. */ 15413/* confdefs.h. */
@@ -16039,35 +15460,31 @@ case "(($ac_try" in
16039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16040 *) ac_try_echo=$ac_try;; 15461 *) ac_try_echo=$ac_try;;
16041esac 15462esac
16042eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16043$as_echo "$ac_try_echo") >&5
16044 (eval "$ac_link") 2>conftest.er1 15464 (eval "$ac_link") 2>conftest.er1
16045 ac_status=$? 15465 ac_status=$?
16046 grep -v '^ *+' conftest.er1 >conftest.err 15466 grep -v '^ *+' conftest.er1 >conftest.err
16047 rm -f conftest.er1 15467 rm -f conftest.er1
16048 cat conftest.err >&5 15468 cat conftest.err >&5
16049 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16050 (exit $ac_status); } && { 15470 (exit $ac_status); } && {
16051 test -z "$ac_c_werror_flag" || 15471 test -z "$ac_c_werror_flag" ||
16052 test ! -s conftest.err 15472 test ! -s conftest.err
16053 } && test -s conftest$ac_exeext && { 15473 } && test -s conftest$ac_exeext &&
16054 test "$cross_compiling" = yes || 15474 $as_test_x conftest$ac_exeext; then
16055 $as_test_x conftest$ac_exeext
16056 }; then
16057 ac_cv_func_getpagesize=yes 15475 ac_cv_func_getpagesize=yes
16058else 15476else
16059 $as_echo "$as_me: failed program was:" >&5 15477 echo "$as_me: failed program was:" >&5
16060sed 's/^/| /' conftest.$ac_ext >&5 15478sed 's/^/| /' conftest.$ac_ext >&5
16061 15479
16062 ac_cv_func_getpagesize=no 15480 ac_cv_func_getpagesize=no
16063fi 15481fi
16064 15482
16065rm -rf conftest.dSYM
16066rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 15483rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16067 conftest$ac_exeext conftest.$ac_ext 15484 conftest$ac_exeext conftest.$ac_ext
16068fi 15485fi
16069{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getpagesize" >&5 15486{ echo "$as_me:$LINENO: result: $ac_cv_func_getpagesize" >&5
16070$as_echo "$ac_cv_func_getpagesize" >&6; } 15487echo "${ECHO_T}$ac_cv_func_getpagesize" >&6; }
16071if test $ac_cv_func_getpagesize = yes; then 15488if test $ac_cv_func_getpagesize = yes; then
16072 15489
16073cat >>confdefs.h <<\_ACEOF 15490cat >>confdefs.h <<\_ACEOF
@@ -16075,10 +15492,10 @@ cat >>confdefs.h <<\_ACEOF
16075_ACEOF 15492_ACEOF
16076 15493
16077else 15494else
16078 { $as_echo "$as_me:$LINENO: checking for getpagesize in -lucb" >&5 15495 { echo "$as_me:$LINENO: checking for getpagesize in -lucb" >&5
16079$as_echo_n "checking for getpagesize in -lucb... " >&6; } 15496echo $ECHO_N "checking for getpagesize in -lucb... $ECHO_C" >&6; }
16080if test "${ac_cv_lib_ucb_getpagesize+set}" = set; then 15497if test "${ac_cv_lib_ucb_getpagesize+set}" = set; then
16081 $as_echo_n "(cached) " >&6 15498 echo $ECHO_N "(cached) $ECHO_C" >&6
16082else 15499else
16083 ac_check_lib_save_LIBS=$LIBS 15500 ac_check_lib_save_LIBS=$LIBS
16084LIBS="-lucb $LIBS" 15501LIBS="-lucb $LIBS"
@@ -16110,36 +15527,32 @@ case "(($ac_try" in
16110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16111 *) ac_try_echo=$ac_try;; 15528 *) ac_try_echo=$ac_try;;
16112esac 15529esac
16113eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16114$as_echo "$ac_try_echo") >&5
16115 (eval "$ac_link") 2>conftest.er1 15531 (eval "$ac_link") 2>conftest.er1
16116 ac_status=$? 15532 ac_status=$?
16117 grep -v '^ *+' conftest.er1 >conftest.err 15533 grep -v '^ *+' conftest.er1 >conftest.err
16118 rm -f conftest.er1 15534 rm -f conftest.er1
16119 cat conftest.err >&5 15535 cat conftest.err >&5
16120 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16121 (exit $ac_status); } && { 15537 (exit $ac_status); } && {
16122 test -z "$ac_c_werror_flag" || 15538 test -z "$ac_c_werror_flag" ||
16123 test ! -s conftest.err 15539 test ! -s conftest.err
16124 } && test -s conftest$ac_exeext && { 15540 } && test -s conftest$ac_exeext &&
16125 test "$cross_compiling" = yes || 15541 $as_test_x conftest$ac_exeext; then
16126 $as_test_x conftest$ac_exeext
16127 }; then
16128 ac_cv_lib_ucb_getpagesize=yes 15542 ac_cv_lib_ucb_getpagesize=yes
16129else 15543else
16130 $as_echo "$as_me: failed program was:" >&5 15544 echo "$as_me: failed program was:" >&5
16131sed 's/^/| /' conftest.$ac_ext >&5 15545sed 's/^/| /' conftest.$ac_ext >&5
16132 15546
16133 ac_cv_lib_ucb_getpagesize=no 15547 ac_cv_lib_ucb_getpagesize=no
16134fi 15548fi
16135 15549
16136rm -rf conftest.dSYM
16137rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 15550rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16138 conftest$ac_exeext conftest.$ac_ext 15551 conftest$ac_exeext conftest.$ac_ext
16139LIBS=$ac_check_lib_save_LIBS 15552LIBS=$ac_check_lib_save_LIBS
16140fi 15553fi
16141{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ucb_getpagesize" >&5 15554{ echo "$as_me:$LINENO: result: $ac_cv_lib_ucb_getpagesize" >&5
16142$as_echo "$ac_cv_lib_ucb_getpagesize" >&6; } 15555echo "${ECHO_T}$ac_cv_lib_ucb_getpagesize" >&6; }
16143if test $ac_cv_lib_ucb_getpagesize = yes; then 15556if test $ac_cv_lib_ucb_getpagesize = yes; then
16144 LIBS="$LIBS -lucb"; cat >>confdefs.h <<\_ACEOF 15557 LIBS="$LIBS -lucb"; cat >>confdefs.h <<\_ACEOF
16145#define HAVE_GETPAGESIZE 1 15558#define HAVE_GETPAGESIZE 1
@@ -16153,11 +15566,11 @@ fi
16153 15566
16154# Check for broken snprintf 15567# Check for broken snprintf
16155if test "x$ac_cv_func_snprintf" = "xyes" ; then 15568if test "x$ac_cv_func_snprintf" = "xyes" ; then
16156 { $as_echo "$as_me:$LINENO: checking whether snprintf correctly terminates long strings" >&5 15569 { echo "$as_me:$LINENO: checking whether snprintf correctly terminates long strings" >&5
16157$as_echo_n "checking whether snprintf correctly terminates long strings... " >&6; } 15570echo $ECHO_N "checking whether snprintf correctly terminates long strings... $ECHO_C" >&6; }
16158 if test "$cross_compiling" = yes; then 15571 if test "$cross_compiling" = yes; then
16159 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working snprintf()" >&5 15572 { echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working snprintf()" >&5
16160$as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;} 15573echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
16161 15574
16162else 15575else
16163 cat >conftest.$ac_ext <<_ACEOF 15576 cat >conftest.$ac_ext <<_ACEOF
@@ -16177,43 +15590,40 @@ case "(($ac_try" in
16177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16178 *) ac_try_echo=$ac_try;; 15591 *) ac_try_echo=$ac_try;;
16179esac 15592esac
16180eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16181$as_echo "$ac_try_echo") >&5
16182 (eval "$ac_link") 2>&5 15594 (eval "$ac_link") 2>&5
16183 ac_status=$? 15595 ac_status=$?
16184 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16185 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 15597 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16186 { (case "(($ac_try" in 15598 { (case "(($ac_try" in
16187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16188 *) ac_try_echo=$ac_try;; 15600 *) ac_try_echo=$ac_try;;
16189esac 15601esac
16190eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16191$as_echo "$ac_try_echo") >&5
16192 (eval "$ac_try") 2>&5 15603 (eval "$ac_try") 2>&5
16193 ac_status=$? 15604 ac_status=$?
16194 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16195 (exit $ac_status); }; }; then 15606 (exit $ac_status); }; }; then
16196 { $as_echo "$as_me:$LINENO: result: yes" >&5 15607 { echo "$as_me:$LINENO: result: yes" >&5
16197$as_echo "yes" >&6; } 15608echo "${ECHO_T}yes" >&6; }
16198else 15609else
16199 $as_echo "$as_me: program exited with status $ac_status" >&5 15610 echo "$as_me: program exited with status $ac_status" >&5
16200$as_echo "$as_me: failed program was:" >&5 15611echo "$as_me: failed program was:" >&5
16201sed 's/^/| /' conftest.$ac_ext >&5 15612sed 's/^/| /' conftest.$ac_ext >&5
16202 15613
16203( exit $ac_status ) 15614( exit $ac_status )
16204 15615
16205 { $as_echo "$as_me:$LINENO: result: no" >&5 15616 { echo "$as_me:$LINENO: result: no" >&5
16206$as_echo "no" >&6; } 15617echo "${ECHO_T}no" >&6; }
16207 15618
16208cat >>confdefs.h <<\_ACEOF 15619cat >>confdefs.h <<\_ACEOF
16209#define BROKEN_SNPRINTF 1 15620#define BROKEN_SNPRINTF 1
16210_ACEOF 15621_ACEOF
16211 15622
16212 { $as_echo "$as_me:$LINENO: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5 15623 { echo "$as_me:$LINENO: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5
16213$as_echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;} 15624echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;}
16214 15625
16215fi 15626fi
16216rm -rf conftest.dSYM
16217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 15627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16218fi 15628fi
16219 15629
@@ -16225,11 +15635,11 @@ fi
16225# create (as per SUSv3) 15635# create (as per SUSv3)
16226if test "x$ac_cv_func_asprintf" != "xyes" && \ 15636if test "x$ac_cv_func_asprintf" != "xyes" && \
16227 test "x$ac_cv_func_vsnprintf" = "xyes" ; then 15637 test "x$ac_cv_func_vsnprintf" = "xyes" ; then
16228 { $as_echo "$as_me:$LINENO: checking whether vsnprintf returns correct values on overflow" >&5 15638 { echo "$as_me:$LINENO: checking whether vsnprintf returns correct values on overflow" >&5
16229$as_echo_n "checking whether vsnprintf returns correct values on overflow... " >&6; } 15639echo $ECHO_N "checking whether vsnprintf returns correct values on overflow... $ECHO_C" >&6; }
16230 if test "$cross_compiling" = yes; then 15640 if test "$cross_compiling" = yes; then
16231 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working vsnprintf()" >&5 15641 { echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working vsnprintf()" >&5
16232$as_echo "$as_me: WARNING: cross compiling: Assuming working vsnprintf()" >&2;} 15642echo "$as_me: WARNING: cross compiling: Assuming working vsnprintf()" >&2;}
16233 15643
16234else 15644else
16235 cat >conftest.$ac_ext <<_ACEOF 15645 cat >conftest.$ac_ext <<_ACEOF
@@ -16261,43 +15671,40 @@ case "(($ac_try" in
16261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16262 *) ac_try_echo=$ac_try;; 15672 *) ac_try_echo=$ac_try;;
16263esac 15673esac
16264eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16265$as_echo "$ac_try_echo") >&5
16266 (eval "$ac_link") 2>&5 15675 (eval "$ac_link") 2>&5
16267 ac_status=$? 15676 ac_status=$?
16268 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16269 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 15678 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16270 { (case "(($ac_try" in 15679 { (case "(($ac_try" in
16271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16272 *) ac_try_echo=$ac_try;; 15681 *) ac_try_echo=$ac_try;;
16273esac 15682esac
16274eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16275$as_echo "$ac_try_echo") >&5
16276 (eval "$ac_try") 2>&5 15684 (eval "$ac_try") 2>&5
16277 ac_status=$? 15685 ac_status=$?
16278 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16279 (exit $ac_status); }; }; then 15687 (exit $ac_status); }; }; then
16280 { $as_echo "$as_me:$LINENO: result: yes" >&5 15688 { echo "$as_me:$LINENO: result: yes" >&5
16281$as_echo "yes" >&6; } 15689echo "${ECHO_T}yes" >&6; }
16282else 15690else
16283 $as_echo "$as_me: program exited with status $ac_status" >&5 15691 echo "$as_me: program exited with status $ac_status" >&5
16284$as_echo "$as_me: failed program was:" >&5 15692echo "$as_me: failed program was:" >&5
16285sed 's/^/| /' conftest.$ac_ext >&5 15693sed 's/^/| /' conftest.$ac_ext >&5
16286 15694
16287( exit $ac_status ) 15695( exit $ac_status )
16288 15696
16289 { $as_echo "$as_me:$LINENO: result: no" >&5 15697 { echo "$as_me:$LINENO: result: no" >&5
16290$as_echo "no" >&6; } 15698echo "${ECHO_T}no" >&6; }
16291 15699
16292cat >>confdefs.h <<\_ACEOF 15700cat >>confdefs.h <<\_ACEOF
16293#define BROKEN_SNPRINTF 1 15701#define BROKEN_SNPRINTF 1
16294_ACEOF 15702_ACEOF
16295 15703
16296 { $as_echo "$as_me:$LINENO: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&5 15704 { echo "$as_me:$LINENO: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&5
16297$as_echo "$as_me: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&2;} 15705echo "$as_me: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&2;}
16298 15706
16299fi 15707fi
16300rm -rf conftest.dSYM
16301rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 15708rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16302fi 15709fi
16303 15710
@@ -16307,8 +15714,8 @@ fi
16307# On systems where [v]snprintf is broken, but is declared in stdio, 15714# On systems where [v]snprintf is broken, but is declared in stdio,
16308# check that the fmt argument is const char * or just char *. 15715# check that the fmt argument is const char * or just char *.
16309# This is only useful for when BROKEN_SNPRINTF 15716# This is only useful for when BROKEN_SNPRINTF
16310{ $as_echo "$as_me:$LINENO: checking whether snprintf can declare const char *fmt" >&5 15717{ echo "$as_me:$LINENO: checking whether snprintf can declare const char *fmt" >&5
16311$as_echo_n "checking whether snprintf can declare const char *fmt... " >&6; } 15718echo $ECHO_N "checking whether snprintf can declare const char *fmt... $ECHO_C" >&6; }
16312cat >conftest.$ac_ext <<_ACEOF 15719cat >conftest.$ac_ext <<_ACEOF
16313/* confdefs.h. */ 15720/* confdefs.h. */
16314_ACEOF 15721_ACEOF
@@ -16326,31 +15733,30 @@ case "(($ac_try" in
16326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16327 *) ac_try_echo=$ac_try;; 15734 *) ac_try_echo=$ac_try;;
16328esac 15735esac
16329eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16330$as_echo "$ac_try_echo") >&5
16331 (eval "$ac_compile") 2>conftest.er1 15737 (eval "$ac_compile") 2>conftest.er1
16332 ac_status=$? 15738 ac_status=$?
16333 grep -v '^ *+' conftest.er1 >conftest.err 15739 grep -v '^ *+' conftest.er1 >conftest.err
16334 rm -f conftest.er1 15740 rm -f conftest.er1
16335 cat conftest.err >&5 15741 cat conftest.err >&5
16336 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16337 (exit $ac_status); } && { 15743 (exit $ac_status); } && {
16338 test -z "$ac_c_werror_flag" || 15744 test -z "$ac_c_werror_flag" ||
16339 test ! -s conftest.err 15745 test ! -s conftest.err
16340 } && test -s conftest.$ac_objext; then 15746 } && test -s conftest.$ac_objext; then
16341 { $as_echo "$as_me:$LINENO: result: yes" >&5 15747 { echo "$as_me:$LINENO: result: yes" >&5
16342$as_echo "yes" >&6; } 15748echo "${ECHO_T}yes" >&6; }
16343 15749
16344cat >>confdefs.h <<\_ACEOF 15750cat >>confdefs.h <<\_ACEOF
16345#define SNPRINTF_CONST const 15751#define SNPRINTF_CONST const
16346_ACEOF 15752_ACEOF
16347 15753
16348else 15754else
16349 $as_echo "$as_me: failed program was:" >&5 15755 echo "$as_me: failed program was:" >&5
16350sed 's/^/| /' conftest.$ac_ext >&5 15756sed 's/^/| /' conftest.$ac_ext >&5
16351 15757
16352 { $as_echo "$as_me:$LINENO: result: no" >&5 15758 { echo "$as_me:$LINENO: result: no" >&5
16353$as_echo "no" >&6; } 15759echo "${ECHO_T}no" >&6; }
16354 cat >>confdefs.h <<\_ACEOF 15760 cat >>confdefs.h <<\_ACEOF
16355#define SNPRINTF_CONST /* not const */ 15761#define SNPRINTF_CONST /* not const */
16356_ACEOF 15762_ACEOF
@@ -16362,8 +15768,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16362# Check for missing getpeereid (or equiv) support 15768# Check for missing getpeereid (or equiv) support
16363NO_PEERCHECK="" 15769NO_PEERCHECK=""
16364if test "x$ac_cv_func_getpeereid" != "xyes" -a "x$ac_cv_func_getpeerucred" != "xyes"; then 15770if test "x$ac_cv_func_getpeereid" != "xyes" -a "x$ac_cv_func_getpeerucred" != "xyes"; then
16365 { $as_echo "$as_me:$LINENO: checking whether system supports SO_PEERCRED getsockopt" >&5 15771 { echo "$as_me:$LINENO: checking whether system supports SO_PEERCRED getsockopt" >&5
16366$as_echo_n "checking whether system supports SO_PEERCRED getsockopt... " >&6; } 15772echo $ECHO_N "checking whether system supports SO_PEERCRED getsockopt... $ECHO_C" >&6; }
16367 cat >conftest.$ac_ext <<_ACEOF 15773 cat >conftest.$ac_ext <<_ACEOF
16368/* confdefs.h. */ 15774/* confdefs.h. */
16369_ACEOF 15775_ACEOF
@@ -16386,20 +15792,19 @@ case "(($ac_try" in
16386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16387 *) ac_try_echo=$ac_try;; 15793 *) ac_try_echo=$ac_try;;
16388esac 15794esac
16389eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16390$as_echo "$ac_try_echo") >&5
16391 (eval "$ac_compile") 2>conftest.er1 15796 (eval "$ac_compile") 2>conftest.er1
16392 ac_status=$? 15797 ac_status=$?
16393 grep -v '^ *+' conftest.er1 >conftest.err 15798 grep -v '^ *+' conftest.er1 >conftest.err
16394 rm -f conftest.er1 15799 rm -f conftest.er1
16395 cat conftest.err >&5 15800 cat conftest.err >&5
16396 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16397 (exit $ac_status); } && { 15802 (exit $ac_status); } && {
16398 test -z "$ac_c_werror_flag" || 15803 test -z "$ac_c_werror_flag" ||
16399 test ! -s conftest.err 15804 test ! -s conftest.err
16400 } && test -s conftest.$ac_objext; then 15805 } && test -s conftest.$ac_objext; then
16401 { $as_echo "$as_me:$LINENO: result: yes" >&5 15806 { echo "$as_me:$LINENO: result: yes" >&5
16402$as_echo "yes" >&6; } 15807echo "${ECHO_T}yes" >&6; }
16403 15808
16404cat >>confdefs.h <<\_ACEOF 15809cat >>confdefs.h <<\_ACEOF
16405#define HAVE_SO_PEERCRED 1 15810#define HAVE_SO_PEERCRED 1
@@ -16407,11 +15812,11 @@ _ACEOF
16407 15812
16408 15813
16409else 15814else
16410 $as_echo "$as_me: failed program was:" >&5 15815 echo "$as_me: failed program was:" >&5
16411sed 's/^/| /' conftest.$ac_ext >&5 15816sed 's/^/| /' conftest.$ac_ext >&5
16412 15817
16413 { $as_echo "$as_me:$LINENO: result: no" >&5 15818 { echo "$as_me:$LINENO: result: no" >&5
16414$as_echo "no" >&6; } 15819echo "${ECHO_T}no" >&6; }
16415 NO_PEERCHECK=1 15820 NO_PEERCHECK=1
16416 15821
16417fi 15822fi
@@ -16420,12 +15825,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16420fi 15825fi
16421 15826
16422if test "x$ac_cv_func_mkdtemp" = "xyes" ; then 15827if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
16423{ $as_echo "$as_me:$LINENO: checking for (overly) strict mkstemp" >&5 15828{ echo "$as_me:$LINENO: checking for (overly) strict mkstemp" >&5
16424$as_echo_n "checking for (overly) strict mkstemp... " >&6; } 15829echo $ECHO_N "checking for (overly) strict mkstemp... $ECHO_C" >&6; }
16425if test "$cross_compiling" = yes; then 15830if test "$cross_compiling" = yes; then
16426 15831
16427 { $as_echo "$as_me:$LINENO: result: yes" >&5 15832 { echo "$as_me:$LINENO: result: yes" >&5
16428$as_echo "yes" >&6; } 15833echo "${ECHO_T}yes" >&6; }
16429 cat >>confdefs.h <<\_ACEOF 15834 cat >>confdefs.h <<\_ACEOF
16430#define HAVE_STRICT_MKSTEMP 1 15835#define HAVE_STRICT_MKSTEMP 1
16431_ACEOF 15836_ACEOF
@@ -16454,35 +15859,33 @@ case "(($ac_try" in
16454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16455 *) ac_try_echo=$ac_try;; 15860 *) ac_try_echo=$ac_try;;
16456esac 15861esac
16457eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16458$as_echo "$ac_try_echo") >&5
16459 (eval "$ac_link") 2>&5 15863 (eval "$ac_link") 2>&5
16460 ac_status=$? 15864 ac_status=$?
16461 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16462 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 15866 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16463 { (case "(($ac_try" in 15867 { (case "(($ac_try" in
16464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16465 *) ac_try_echo=$ac_try;; 15869 *) ac_try_echo=$ac_try;;
16466esac 15870esac
16467eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16468$as_echo "$ac_try_echo") >&5
16469 (eval "$ac_try") 2>&5 15872 (eval "$ac_try") 2>&5
16470 ac_status=$? 15873 ac_status=$?
16471 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16472 (exit $ac_status); }; }; then 15875 (exit $ac_status); }; }; then
16473 15876
16474 { $as_echo "$as_me:$LINENO: result: no" >&5 15877 { echo "$as_me:$LINENO: result: no" >&5
16475$as_echo "no" >&6; } 15878echo "${ECHO_T}no" >&6; }
16476 15879
16477else 15880else
16478 $as_echo "$as_me: program exited with status $ac_status" >&5 15881 echo "$as_me: program exited with status $ac_status" >&5
16479$as_echo "$as_me: failed program was:" >&5 15882echo "$as_me: failed program was:" >&5
16480sed 's/^/| /' conftest.$ac_ext >&5 15883sed 's/^/| /' conftest.$ac_ext >&5
16481 15884
16482( exit $ac_status ) 15885( exit $ac_status )
16483 15886
16484 { $as_echo "$as_me:$LINENO: result: yes" >&5 15887 { echo "$as_me:$LINENO: result: yes" >&5
16485$as_echo "yes" >&6; } 15888echo "${ECHO_T}yes" >&6; }
16486 15889
16487cat >>confdefs.h <<\_ACEOF 15890cat >>confdefs.h <<\_ACEOF
16488#define HAVE_STRICT_MKSTEMP 1 15891#define HAVE_STRICT_MKSTEMP 1
@@ -16490,7 +15893,6 @@ _ACEOF
16490 15893
16491 15894
16492fi 15895fi
16493rm -rf conftest.dSYM
16494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 15896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16495fi 15897fi
16496 15898
@@ -16498,12 +15900,12 @@ fi
16498fi 15900fi
16499 15901
16500if test ! -z "$check_for_openpty_ctty_bug"; then 15902if test ! -z "$check_for_openpty_ctty_bug"; then
16501 { $as_echo "$as_me:$LINENO: checking if openpty correctly handles controlling tty" >&5 15903 { echo "$as_me:$LINENO: checking if openpty correctly handles controlling tty" >&5
16502$as_echo_n "checking if openpty correctly handles controlling tty... " >&6; } 15904echo $ECHO_N "checking if openpty correctly handles controlling tty... $ECHO_C" >&6; }
16503 if test "$cross_compiling" = yes; then 15905 if test "$cross_compiling" = yes; then
16504 15906
16505 { $as_echo "$as_me:$LINENO: result: cross-compiling" >&5 15907 { echo "$as_me:$LINENO: result: cross-compiling" >&5
16506$as_echo "cross-compiling" >&6; } 15908echo "${ECHO_T}cross-compiling" >&6; }
16507 15909
16508 15910
16509else 15911else
@@ -16553,42 +15955,39 @@ case "(($ac_try" in
16553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16554 *) ac_try_echo=$ac_try;; 15956 *) ac_try_echo=$ac_try;;
16555esac 15957esac
16556eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16557$as_echo "$ac_try_echo") >&5
16558 (eval "$ac_link") 2>&5 15959 (eval "$ac_link") 2>&5
16559 ac_status=$? 15960 ac_status=$?
16560 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16561 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 15962 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16562 { (case "(($ac_try" in 15963 { (case "(($ac_try" in
16563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16564 *) ac_try_echo=$ac_try;; 15965 *) ac_try_echo=$ac_try;;
16565esac 15966esac
16566eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16567$as_echo "$ac_try_echo") >&5
16568 (eval "$ac_try") 2>&5 15968 (eval "$ac_try") 2>&5
16569 ac_status=$? 15969 ac_status=$?
16570 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16571 (exit $ac_status); }; }; then 15971 (exit $ac_status); }; }; then
16572 15972
16573 { $as_echo "$as_me:$LINENO: result: yes" >&5 15973 { echo "$as_me:$LINENO: result: yes" >&5
16574$as_echo "yes" >&6; } 15974echo "${ECHO_T}yes" >&6; }
16575 15975
16576else 15976else
16577 $as_echo "$as_me: program exited with status $ac_status" >&5 15977 echo "$as_me: program exited with status $ac_status" >&5
16578$as_echo "$as_me: failed program was:" >&5 15978echo "$as_me: failed program was:" >&5
16579sed 's/^/| /' conftest.$ac_ext >&5 15979sed 's/^/| /' conftest.$ac_ext >&5
16580 15980
16581( exit $ac_status ) 15981( exit $ac_status )
16582 15982
16583 { $as_echo "$as_me:$LINENO: result: no" >&5 15983 { echo "$as_me:$LINENO: result: no" >&5
16584$as_echo "no" >&6; } 15984echo "${ECHO_T}no" >&6; }
16585 cat >>confdefs.h <<\_ACEOF 15985 cat >>confdefs.h <<\_ACEOF
16586#define SSHD_ACQUIRES_CTTY 1 15986#define SSHD_ACQUIRES_CTTY 1
16587_ACEOF 15987_ACEOF
16588 15988
16589 15989
16590fi 15990fi
16591rm -rf conftest.dSYM
16592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 15991rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16593fi 15992fi
16594 15993
@@ -16597,12 +15996,12 @@ fi
16597 15996
16598if test "x$ac_cv_func_getaddrinfo" = "xyes" && \ 15997if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
16599 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then 15998 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
16600 { $as_echo "$as_me:$LINENO: checking if getaddrinfo seems to work" >&5 15999 { echo "$as_me:$LINENO: checking if getaddrinfo seems to work" >&5
16601$as_echo_n "checking if getaddrinfo seems to work... " >&6; } 16000echo $ECHO_N "checking if getaddrinfo seems to work... $ECHO_C" >&6; }
16602 if test "$cross_compiling" = yes; then 16001 if test "$cross_compiling" = yes; then
16603 16002
16604 { $as_echo "$as_me:$LINENO: result: cross-compiling" >&5 16003 { echo "$as_me:$LINENO: result: cross-compiling" >&5
16605$as_echo "cross-compiling" >&6; } 16004echo "${ECHO_T}cross-compiling" >&6; }
16606 16005
16607 16006
16608else 16007else
@@ -16674,42 +16073,39 @@ case "(($ac_try" in
16674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16675 *) ac_try_echo=$ac_try;; 16074 *) ac_try_echo=$ac_try;;
16676esac 16075esac
16677eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16678$as_echo "$ac_try_echo") >&5
16679 (eval "$ac_link") 2>&5 16077 (eval "$ac_link") 2>&5
16680 ac_status=$? 16078 ac_status=$?
16681 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16682 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 16080 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16683 { (case "(($ac_try" in 16081 { (case "(($ac_try" in
16684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16685 *) ac_try_echo=$ac_try;; 16083 *) ac_try_echo=$ac_try;;
16686esac 16084esac
16687eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16688$as_echo "$ac_try_echo") >&5
16689 (eval "$ac_try") 2>&5 16086 (eval "$ac_try") 2>&5
16690 ac_status=$? 16087 ac_status=$?
16691 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16692 (exit $ac_status); }; }; then 16089 (exit $ac_status); }; }; then
16693 16090
16694 { $as_echo "$as_me:$LINENO: result: yes" >&5 16091 { echo "$as_me:$LINENO: result: yes" >&5
16695$as_echo "yes" >&6; } 16092echo "${ECHO_T}yes" >&6; }
16696 16093
16697else 16094else
16698 $as_echo "$as_me: program exited with status $ac_status" >&5 16095 echo "$as_me: program exited with status $ac_status" >&5
16699$as_echo "$as_me: failed program was:" >&5 16096echo "$as_me: failed program was:" >&5
16700sed 's/^/| /' conftest.$ac_ext >&5 16097sed 's/^/| /' conftest.$ac_ext >&5
16701 16098
16702( exit $ac_status ) 16099( exit $ac_status )
16703 16100
16704 { $as_echo "$as_me:$LINENO: result: no" >&5 16101 { echo "$as_me:$LINENO: result: no" >&5
16705$as_echo "no" >&6; } 16102echo "${ECHO_T}no" >&6; }
16706 cat >>confdefs.h <<\_ACEOF 16103 cat >>confdefs.h <<\_ACEOF
16707#define BROKEN_GETADDRINFO 1 16104#define BROKEN_GETADDRINFO 1
16708_ACEOF 16105_ACEOF
16709 16106
16710 16107
16711fi 16108fi
16712rm -rf conftest.dSYM
16713rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 16109rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16714fi 16110fi
16715 16111
@@ -16718,12 +16114,12 @@ fi
16718 16114
16719if test "x$ac_cv_func_getaddrinfo" = "xyes" && \ 16115if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
16720 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then 16116 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then
16721 { $as_echo "$as_me:$LINENO: checking if getaddrinfo seems to work" >&5 16117 { echo "$as_me:$LINENO: checking if getaddrinfo seems to work" >&5
16722$as_echo_n "checking if getaddrinfo seems to work... " >&6; } 16118echo $ECHO_N "checking if getaddrinfo seems to work... $ECHO_C" >&6; }
16723 if test "$cross_compiling" = yes; then 16119 if test "$cross_compiling" = yes; then
16724 16120
16725 { $as_echo "$as_me:$LINENO: result: cross-compiling" >&5 16121 { echo "$as_me:$LINENO: result: cross-compiling" >&5
16726$as_echo "cross-compiling" >&6; } 16122echo "${ECHO_T}cross-compiling" >&6; }
16727 16123
16728 16124
16729else 16125else
@@ -16783,25 +16179,23 @@ case "(($ac_try" in
16783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16784 *) ac_try_echo=$ac_try;; 16180 *) ac_try_echo=$ac_try;;
16785esac 16181esac
16786eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16787$as_echo "$ac_try_echo") >&5
16788 (eval "$ac_link") 2>&5 16183 (eval "$ac_link") 2>&5
16789 ac_status=$? 16184 ac_status=$?
16790 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16791 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 16186 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16792 { (case "(($ac_try" in 16187 { (case "(($ac_try" in
16793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16794 *) ac_try_echo=$ac_try;; 16189 *) ac_try_echo=$ac_try;;
16795esac 16190esac
16796eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16797$as_echo "$ac_try_echo") >&5
16798 (eval "$ac_try") 2>&5 16192 (eval "$ac_try") 2>&5
16799 ac_status=$? 16193 ac_status=$?
16800 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16801 (exit $ac_status); }; }; then 16195 (exit $ac_status); }; }; then
16802 16196
16803 { $as_echo "$as_me:$LINENO: result: yes" >&5 16197 { echo "$as_me:$LINENO: result: yes" >&5
16804$as_echo "yes" >&6; } 16198echo "${ECHO_T}yes" >&6; }
16805 16199
16806cat >>confdefs.h <<\_ACEOF 16200cat >>confdefs.h <<\_ACEOF
16807#define AIX_GETNAMEINFO_HACK 1 16201#define AIX_GETNAMEINFO_HACK 1
@@ -16809,21 +16203,20 @@ _ACEOF
16809 16203
16810 16204
16811else 16205else
16812 $as_echo "$as_me: program exited with status $ac_status" >&5 16206 echo "$as_me: program exited with status $ac_status" >&5
16813$as_echo "$as_me: failed program was:" >&5 16207echo "$as_me: failed program was:" >&5
16814sed 's/^/| /' conftest.$ac_ext >&5 16208sed 's/^/| /' conftest.$ac_ext >&5
16815 16209
16816( exit $ac_status ) 16210( exit $ac_status )
16817 16211
16818 { $as_echo "$as_me:$LINENO: result: no" >&5 16212 { echo "$as_me:$LINENO: result: no" >&5
16819$as_echo "no" >&6; } 16213echo "${ECHO_T}no" >&6; }
16820 cat >>confdefs.h <<\_ACEOF 16214 cat >>confdefs.h <<\_ACEOF
16821#define BROKEN_GETADDRINFO 1 16215#define BROKEN_GETADDRINFO 1
16822_ACEOF 16216_ACEOF
16823 16217
16824 16218
16825fi 16219fi
16826rm -rf conftest.dSYM
16827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 16220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16828fi 16221fi
16829 16222
@@ -16831,8 +16224,8 @@ fi
16831fi 16224fi
16832 16225
16833if test "x$check_for_conflicting_getspnam" = "x1"; then 16226if test "x$check_for_conflicting_getspnam" = "x1"; then
16834 { $as_echo "$as_me:$LINENO: checking for conflicting getspnam in shadow.h" >&5 16227 { echo "$as_me:$LINENO: checking for conflicting getspnam in shadow.h" >&5
16835$as_echo_n "checking for conflicting getspnam in shadow.h... " >&6; } 16228echo $ECHO_N "checking for conflicting getspnam in shadow.h... $ECHO_C" >&6; }
16836 cat >conftest.$ac_ext <<_ACEOF 16229 cat >conftest.$ac_ext <<_ACEOF
16837 16230
16838#include <shadow.h> 16231#include <shadow.h>
@@ -16845,29 +16238,28 @@ case "(($ac_try" in
16845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16846 *) ac_try_echo=$ac_try;; 16239 *) ac_try_echo=$ac_try;;
16847esac 16240esac
16848eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16849$as_echo "$ac_try_echo") >&5
16850 (eval "$ac_compile") 2>conftest.er1 16242 (eval "$ac_compile") 2>conftest.er1
16851 ac_status=$? 16243 ac_status=$?
16852 grep -v '^ *+' conftest.er1 >conftest.err 16244 grep -v '^ *+' conftest.er1 >conftest.err
16853 rm -f conftest.er1 16245 rm -f conftest.er1
16854 cat conftest.err >&5 16246 cat conftest.err >&5
16855 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16856 (exit $ac_status); } && { 16248 (exit $ac_status); } && {
16857 test -z "$ac_c_werror_flag" || 16249 test -z "$ac_c_werror_flag" ||
16858 test ! -s conftest.err 16250 test ! -s conftest.err
16859 } && test -s conftest.$ac_objext; then 16251 } && test -s conftest.$ac_objext; then
16860 16252
16861 { $as_echo "$as_me:$LINENO: result: no" >&5 16253 { echo "$as_me:$LINENO: result: no" >&5
16862$as_echo "no" >&6; } 16254echo "${ECHO_T}no" >&6; }
16863 16255
16864else 16256else
16865 $as_echo "$as_me: failed program was:" >&5 16257 echo "$as_me: failed program was:" >&5
16866sed 's/^/| /' conftest.$ac_ext >&5 16258sed 's/^/| /' conftest.$ac_ext >&5
16867 16259
16868 16260
16869 { $as_echo "$as_me:$LINENO: result: yes" >&5 16261 { echo "$as_me:$LINENO: result: yes" >&5
16870$as_echo "yes" >&6; } 16262echo "${ECHO_T}yes" >&6; }
16871 16263
16872cat >>confdefs.h <<\_ACEOF 16264cat >>confdefs.h <<\_ACEOF
16873#define GETSPNAM_CONFLICTING_DEFS 1 16265#define GETSPNAM_CONFLICTING_DEFS 1
@@ -16880,10 +16272,10 @@ fi
16880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16881fi 16273fi
16882 16274
16883{ $as_echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5 16275{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
16884$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } 16276echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
16885if test "${ac_cv_func_getpgrp_void+set}" = set; then 16277if test "${ac_cv_func_getpgrp_void+set}" = set; then
16886 $as_echo_n "(cached) " >&6 16278 echo $ECHO_N "(cached) $ECHO_C" >&6
16887else 16279else
16888 # Use it with a single arg. 16280 # Use it with a single arg.
16889cat >conftest.$ac_ext <<_ACEOF 16281cat >conftest.$ac_ext <<_ACEOF
@@ -16907,21 +16299,20 @@ case "(($ac_try" in
16907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16908 *) ac_try_echo=$ac_try;; 16300 *) ac_try_echo=$ac_try;;
16909esac 16301esac
16910eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16911$as_echo "$ac_try_echo") >&5
16912 (eval "$ac_compile") 2>conftest.er1 16303 (eval "$ac_compile") 2>conftest.er1
16913 ac_status=$? 16304 ac_status=$?
16914 grep -v '^ *+' conftest.er1 >conftest.err 16305 grep -v '^ *+' conftest.er1 >conftest.err
16915 rm -f conftest.er1 16306 rm -f conftest.er1
16916 cat conftest.err >&5 16307 cat conftest.err >&5
16917 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16918 (exit $ac_status); } && { 16309 (exit $ac_status); } && {
16919 test -z "$ac_c_werror_flag" || 16310 test -z "$ac_c_werror_flag" ||
16920 test ! -s conftest.err 16311 test ! -s conftest.err
16921 } && test -s conftest.$ac_objext; then 16312 } && test -s conftest.$ac_objext; then
16922 ac_cv_func_getpgrp_void=no 16313 ac_cv_func_getpgrp_void=no
16923else 16314else
16924 $as_echo "$as_me: failed program was:" >&5 16315 echo "$as_me: failed program was:" >&5
16925sed 's/^/| /' conftest.$ac_ext >&5 16316sed 's/^/| /' conftest.$ac_ext >&5
16926 16317
16927 ac_cv_func_getpgrp_void=yes 16318 ac_cv_func_getpgrp_void=yes
@@ -16930,8 +16321,8 @@ fi
16930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16931 16322
16932fi 16323fi
16933{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5 16324{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
16934$as_echo "$ac_cv_func_getpgrp_void" >&6; } 16325echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
16935if test $ac_cv_func_getpgrp_void = yes; then 16326if test $ac_cv_func_getpgrp_void = yes; then
16936 16327
16937cat >>confdefs.h <<\_ACEOF 16328cat >>confdefs.h <<\_ACEOF
@@ -17005,28 +16396,25 @@ case "(($ac_try" in
17005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17006 *) ac_try_echo=$ac_try;; 16397 *) ac_try_echo=$ac_try;;
17007esac 16398esac
17008eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17009$as_echo "$ac_try_echo") >&5
17010 (eval "$ac_link") 2>conftest.er1 16400 (eval "$ac_link") 2>conftest.er1
17011 ac_status=$? 16401 ac_status=$?
17012 grep -v '^ *+' conftest.er1 >conftest.err 16402 grep -v '^ *+' conftest.er1 >conftest.err
17013 rm -f conftest.er1 16403 rm -f conftest.er1
17014 cat conftest.err >&5 16404 cat conftest.err >&5
17015 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17016 (exit $ac_status); } && { 16406 (exit $ac_status); } && {
17017 test -z "$ac_c_werror_flag" || 16407 test -z "$ac_c_werror_flag" ||
17018 test ! -s conftest.err 16408 test ! -s conftest.err
17019 } && test -s conftest$ac_exeext && { 16409 } && test -s conftest$ac_exeext &&
17020 test "$cross_compiling" = yes || 16410 $as_test_x conftest$ac_exeext; then
17021 $as_test_x conftest$ac_exeext
17022 }; then
17023 16411
17024cat >>confdefs.h <<\_ACEOF 16412cat >>confdefs.h <<\_ACEOF
17025#define HAVE_OPENSSL 1 16413#define HAVE_OPENSSL 1
17026_ACEOF 16414_ACEOF
17027 16415
17028else 16416else
17029 $as_echo "$as_me: failed program was:" >&5 16417 echo "$as_me: failed program was:" >&5
17030sed 's/^/| /' conftest.$ac_ext >&5 16418sed 's/^/| /' conftest.$ac_ext >&5
17031 16419
17032 16420
@@ -17037,17 +16425,17 @@ sed 's/^/| /' conftest.$ac_ext >&5
17037 fi 16425 fi
17038 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}" 16426 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
17039 if test "${ac_cv_header_openssl_opensslv_h+set}" = set; then 16427 if test "${ac_cv_header_openssl_opensslv_h+set}" = set; then
17040 { $as_echo "$as_me:$LINENO: checking for openssl/opensslv.h" >&5 16428 { echo "$as_me:$LINENO: checking for openssl/opensslv.h" >&5
17041$as_echo_n "checking for openssl/opensslv.h... " >&6; } 16429echo $ECHO_N "checking for openssl/opensslv.h... $ECHO_C" >&6; }
17042if test "${ac_cv_header_openssl_opensslv_h+set}" = set; then 16430if test "${ac_cv_header_openssl_opensslv_h+set}" = set; then
17043 $as_echo_n "(cached) " >&6 16431 echo $ECHO_N "(cached) $ECHO_C" >&6
17044fi 16432fi
17045{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_opensslv_h" >&5 16433{ echo "$as_me:$LINENO: result: $ac_cv_header_openssl_opensslv_h" >&5
17046$as_echo "$ac_cv_header_openssl_opensslv_h" >&6; } 16434echo "${ECHO_T}$ac_cv_header_openssl_opensslv_h" >&6; }
17047else 16435else
17048 # Is the header compilable? 16436 # Is the header compilable?
17049{ $as_echo "$as_me:$LINENO: checking openssl/opensslv.h usability" >&5 16437{ echo "$as_me:$LINENO: checking openssl/opensslv.h usability" >&5
17050$as_echo_n "checking openssl/opensslv.h usability... " >&6; } 16438echo $ECHO_N "checking openssl/opensslv.h usability... $ECHO_C" >&6; }
17051cat >conftest.$ac_ext <<_ACEOF 16439cat >conftest.$ac_ext <<_ACEOF
17052/* confdefs.h. */ 16440/* confdefs.h. */
17053_ACEOF 16441_ACEOF
@@ -17063,33 +16451,32 @@ case "(($ac_try" in
17063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17064 *) ac_try_echo=$ac_try;; 16452 *) ac_try_echo=$ac_try;;
17065esac 16453esac
17066eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17067$as_echo "$ac_try_echo") >&5
17068 (eval "$ac_compile") 2>conftest.er1 16455 (eval "$ac_compile") 2>conftest.er1
17069 ac_status=$? 16456 ac_status=$?
17070 grep -v '^ *+' conftest.er1 >conftest.err 16457 grep -v '^ *+' conftest.er1 >conftest.err
17071 rm -f conftest.er1 16458 rm -f conftest.er1
17072 cat conftest.err >&5 16459 cat conftest.err >&5
17073 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17074 (exit $ac_status); } && { 16461 (exit $ac_status); } && {
17075 test -z "$ac_c_werror_flag" || 16462 test -z "$ac_c_werror_flag" ||
17076 test ! -s conftest.err 16463 test ! -s conftest.err
17077 } && test -s conftest.$ac_objext; then 16464 } && test -s conftest.$ac_objext; then
17078 ac_header_compiler=yes 16465 ac_header_compiler=yes
17079else 16466else
17080 $as_echo "$as_me: failed program was:" >&5 16467 echo "$as_me: failed program was:" >&5
17081sed 's/^/| /' conftest.$ac_ext >&5 16468sed 's/^/| /' conftest.$ac_ext >&5
17082 16469
17083 ac_header_compiler=no 16470 ac_header_compiler=no
17084fi 16471fi
17085 16472
17086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17087{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 16474{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17088$as_echo "$ac_header_compiler" >&6; } 16475echo "${ECHO_T}$ac_header_compiler" >&6; }
17089 16476
17090# Is the header present? 16477# Is the header present?
17091{ $as_echo "$as_me:$LINENO: checking openssl/opensslv.h presence" >&5 16478{ echo "$as_me:$LINENO: checking openssl/opensslv.h presence" >&5
17092$as_echo_n "checking openssl/opensslv.h presence... " >&6; } 16479echo $ECHO_N "checking openssl/opensslv.h presence... $ECHO_C" >&6; }
17093cat >conftest.$ac_ext <<_ACEOF 16480cat >conftest.$ac_ext <<_ACEOF
17094/* confdefs.h. */ 16481/* confdefs.h. */
17095_ACEOF 16482_ACEOF
@@ -17103,52 +16490,51 @@ case "(($ac_try" in
17103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17104 *) ac_try_echo=$ac_try;; 16491 *) ac_try_echo=$ac_try;;
17105esac 16492esac
17106eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17107$as_echo "$ac_try_echo") >&5
17108 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 16494 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17109 ac_status=$? 16495 ac_status=$?
17110 grep -v '^ *+' conftest.er1 >conftest.err 16496 grep -v '^ *+' conftest.er1 >conftest.err
17111 rm -f conftest.er1 16497 rm -f conftest.er1
17112 cat conftest.err >&5 16498 cat conftest.err >&5
17113 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17114 (exit $ac_status); } >/dev/null && { 16500 (exit $ac_status); } >/dev/null && {
17115 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 16501 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17116 test ! -s conftest.err 16502 test ! -s conftest.err
17117 }; then 16503 }; then
17118 ac_header_preproc=yes 16504 ac_header_preproc=yes
17119else 16505else
17120 $as_echo "$as_me: failed program was:" >&5 16506 echo "$as_me: failed program was:" >&5
17121sed 's/^/| /' conftest.$ac_ext >&5 16507sed 's/^/| /' conftest.$ac_ext >&5
17122 16508
17123 ac_header_preproc=no 16509 ac_header_preproc=no
17124fi 16510fi
17125 16511
17126rm -f conftest.err conftest.$ac_ext 16512rm -f conftest.err conftest.$ac_ext
17127{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 16513{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17128$as_echo "$ac_header_preproc" >&6; } 16514echo "${ECHO_T}$ac_header_preproc" >&6; }
17129 16515
17130# So? What about this header? 16516# So? What about this header?
17131case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 16517case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17132 yes:no: ) 16518 yes:no: )
17133 { $as_echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: accepted by the compiler, rejected by the preprocessor!" >&5 16519 { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: accepted by the compiler, rejected by the preprocessor!" >&5
17134$as_echo "$as_me: WARNING: openssl/opensslv.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 16520echo "$as_me: WARNING: openssl/opensslv.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17135 { $as_echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: proceeding with the compiler's result" >&5 16521 { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: proceeding with the compiler's result" >&5
17136$as_echo "$as_me: WARNING: openssl/opensslv.h: proceeding with the compiler's result" >&2;} 16522echo "$as_me: WARNING: openssl/opensslv.h: proceeding with the compiler's result" >&2;}
17137 ac_header_preproc=yes 16523 ac_header_preproc=yes
17138 ;; 16524 ;;
17139 no:yes:* ) 16525 no:yes:* )
17140 { $as_echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: present but cannot be compiled" >&5 16526 { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: present but cannot be compiled" >&5
17141$as_echo "$as_me: WARNING: openssl/opensslv.h: present but cannot be compiled" >&2;} 16527echo "$as_me: WARNING: openssl/opensslv.h: present but cannot be compiled" >&2;}
17142 { $as_echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: check for missing prerequisite headers?" >&5 16528 { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: check for missing prerequisite headers?" >&5
17143$as_echo "$as_me: WARNING: openssl/opensslv.h: check for missing prerequisite headers?" >&2;} 16529echo "$as_me: WARNING: openssl/opensslv.h: check for missing prerequisite headers?" >&2;}
17144 { $as_echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: see the Autoconf documentation" >&5 16530 { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: see the Autoconf documentation" >&5
17145$as_echo "$as_me: WARNING: openssl/opensslv.h: see the Autoconf documentation" >&2;} 16531echo "$as_me: WARNING: openssl/opensslv.h: see the Autoconf documentation" >&2;}
17146 { $as_echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: section \"Present But Cannot Be Compiled\"" >&5 16532 { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: section \"Present But Cannot Be Compiled\"" >&5
17147$as_echo "$as_me: WARNING: openssl/opensslv.h: section \"Present But Cannot Be Compiled\"" >&2;} 16533echo "$as_me: WARNING: openssl/opensslv.h: section \"Present But Cannot Be Compiled\"" >&2;}
17148 { $as_echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: proceeding with the preprocessor's result" >&5 16534 { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: proceeding with the preprocessor's result" >&5
17149$as_echo "$as_me: WARNING: openssl/opensslv.h: proceeding with the preprocessor's result" >&2;} 16535echo "$as_me: WARNING: openssl/opensslv.h: proceeding with the preprocessor's result" >&2;}
17150 { $as_echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: in the future, the compiler will take precedence" >&5 16536 { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: in the future, the compiler will take precedence" >&5
17151$as_echo "$as_me: WARNING: openssl/opensslv.h: in the future, the compiler will take precedence" >&2;} 16537echo "$as_me: WARNING: openssl/opensslv.h: in the future, the compiler will take precedence" >&2;}
17152 ( cat <<\_ASBOX 16538 ( cat <<\_ASBOX
17153## ------------------------------------------- ## 16539## ------------------------------------------- ##
17154## Report this to openssh-unix-dev@mindrot.org ## 16540## Report this to openssh-unix-dev@mindrot.org ##
@@ -17157,22 +16543,22 @@ _ASBOX
17157 ) | sed "s/^/$as_me: WARNING: /" >&2 16543 ) | sed "s/^/$as_me: WARNING: /" >&2
17158 ;; 16544 ;;
17159esac 16545esac
17160{ $as_echo "$as_me:$LINENO: checking for openssl/opensslv.h" >&5 16546{ echo "$as_me:$LINENO: checking for openssl/opensslv.h" >&5
17161$as_echo_n "checking for openssl/opensslv.h... " >&6; } 16547echo $ECHO_N "checking for openssl/opensslv.h... $ECHO_C" >&6; }
17162if test "${ac_cv_header_openssl_opensslv_h+set}" = set; then 16548if test "${ac_cv_header_openssl_opensslv_h+set}" = set; then
17163 $as_echo_n "(cached) " >&6 16549 echo $ECHO_N "(cached) $ECHO_C" >&6
17164else 16550else
17165 ac_cv_header_openssl_opensslv_h=$ac_header_preproc 16551 ac_cv_header_openssl_opensslv_h=$ac_header_preproc
17166fi 16552fi
17167{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_opensslv_h" >&5 16553{ echo "$as_me:$LINENO: result: $ac_cv_header_openssl_opensslv_h" >&5
17168$as_echo "$ac_cv_header_openssl_opensslv_h" >&6; } 16554echo "${ECHO_T}$ac_cv_header_openssl_opensslv_h" >&6; }
17169 16555
17170fi 16556fi
17171if test $ac_cv_header_openssl_opensslv_h = yes; then 16557if test $ac_cv_header_openssl_opensslv_h = yes; then
17172 : 16558 :
17173else 16559else
17174 { { $as_echo "$as_me:$LINENO: error: *** OpenSSL headers missing - please install first or check config.log ***" >&5 16560 { { echo "$as_me:$LINENO: error: *** OpenSSL headers missing - please install first or check config.log ***" >&5
17175$as_echo "$as_me: error: *** OpenSSL headers missing - please install first or check config.log ***" >&2;} 16561echo "$as_me: error: *** OpenSSL headers missing - please install first or check config.log ***" >&2;}
17176 { (exit 1); exit 1; }; } 16562 { (exit 1); exit 1; }; }
17177fi 16563fi
17178 16564
@@ -17205,55 +16591,50 @@ case "(($ac_try" in
17205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17206 *) ac_try_echo=$ac_try;; 16592 *) ac_try_echo=$ac_try;;
17207esac 16593esac
17208eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17209$as_echo "$ac_try_echo") >&5
17210 (eval "$ac_link") 2>conftest.er1 16595 (eval "$ac_link") 2>conftest.er1
17211 ac_status=$? 16596 ac_status=$?
17212 grep -v '^ *+' conftest.er1 >conftest.err 16597 grep -v '^ *+' conftest.er1 >conftest.err
17213 rm -f conftest.er1 16598 rm -f conftest.er1
17214 cat conftest.err >&5 16599 cat conftest.err >&5
17215 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17216 (exit $ac_status); } && { 16601 (exit $ac_status); } && {
17217 test -z "$ac_c_werror_flag" || 16602 test -z "$ac_c_werror_flag" ||
17218 test ! -s conftest.err 16603 test ! -s conftest.err
17219 } && test -s conftest$ac_exeext && { 16604 } && test -s conftest$ac_exeext &&
17220 test "$cross_compiling" = yes || 16605 $as_test_x conftest$ac_exeext; then
17221 $as_test_x conftest$ac_exeext
17222 }; then
17223 cat >>confdefs.h <<\_ACEOF 16606 cat >>confdefs.h <<\_ACEOF
17224#define HAVE_OPENSSL 1 16607#define HAVE_OPENSSL 1
17225_ACEOF 16608_ACEOF
17226 16609
17227else 16610else
17228 $as_echo "$as_me: failed program was:" >&5 16611 echo "$as_me: failed program was:" >&5
17229sed 's/^/| /' conftest.$ac_ext >&5 16612sed 's/^/| /' conftest.$ac_ext >&5
17230 16613
17231 16614
17232 { { $as_echo "$as_me:$LINENO: error: *** Can't find recent OpenSSL libcrypto (see config.log for details) ***" >&5 16615 { { echo "$as_me:$LINENO: error: *** Can't find recent OpenSSL libcrypto (see config.log for details) ***" >&5
17233$as_echo "$as_me: error: *** Can't find recent OpenSSL libcrypto (see config.log for details) ***" >&2;} 16616echo "$as_me: error: *** Can't find recent OpenSSL libcrypto (see config.log for details) ***" >&2;}
17234 { (exit 1); exit 1; }; } 16617 { (exit 1); exit 1; }; }
17235 16618
17236 16619
17237fi 16620fi
17238 16621
17239rm -rf conftest.dSYM
17240rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 16622rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17241 conftest$ac_exeext conftest.$ac_ext 16623 conftest$ac_exeext conftest.$ac_ext
17242 16624
17243 16625
17244fi 16626fi
17245 16627
17246rm -rf conftest.dSYM
17247rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 16628rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17248 conftest$ac_exeext conftest.$ac_ext 16629 conftest$ac_exeext conftest.$ac_ext
17249 16630
17250# Determine OpenSSL header version 16631# Determine OpenSSL header version
17251{ $as_echo "$as_me:$LINENO: checking OpenSSL header version" >&5 16632{ echo "$as_me:$LINENO: checking OpenSSL header version" >&5
17252$as_echo_n "checking OpenSSL header version... " >&6; } 16633echo $ECHO_N "checking OpenSSL header version... $ECHO_C" >&6; }
17253if test "$cross_compiling" = yes; then 16634if test "$cross_compiling" = yes; then
17254 16635
17255 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5 16636 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5
17256$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;} 16637echo "$as_me: WARNING: cross compiling: not checking" >&2;}
17257 16638
17258 16639
17259else 16640else
@@ -17289,54 +16670,51 @@ case "(($ac_try" in
17289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17290 *) ac_try_echo=$ac_try;; 16671 *) ac_try_echo=$ac_try;;
17291esac 16672esac
17292eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17293$as_echo "$ac_try_echo") >&5
17294 (eval "$ac_link") 2>&5 16674 (eval "$ac_link") 2>&5
17295 ac_status=$? 16675 ac_status=$?
17296 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17297 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 16677 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17298 { (case "(($ac_try" in 16678 { (case "(($ac_try" in
17299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17300 *) ac_try_echo=$ac_try;; 16680 *) ac_try_echo=$ac_try;;
17301esac 16681esac
17302eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17303$as_echo "$ac_try_echo") >&5
17304 (eval "$ac_try") 2>&5 16683 (eval "$ac_try") 2>&5
17305 ac_status=$? 16684 ac_status=$?
17306 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17307 (exit $ac_status); }; }; then 16686 (exit $ac_status); }; }; then
17308 16687
17309 ssl_header_ver=`cat conftest.sslincver` 16688 ssl_header_ver=`cat conftest.sslincver`
17310 { $as_echo "$as_me:$LINENO: result: $ssl_header_ver" >&5 16689 { echo "$as_me:$LINENO: result: $ssl_header_ver" >&5
17311$as_echo "$ssl_header_ver" >&6; } 16690echo "${ECHO_T}$ssl_header_ver" >&6; }
17312 16691
17313else 16692else
17314 $as_echo "$as_me: program exited with status $ac_status" >&5 16693 echo "$as_me: program exited with status $ac_status" >&5
17315$as_echo "$as_me: failed program was:" >&5 16694echo "$as_me: failed program was:" >&5
17316sed 's/^/| /' conftest.$ac_ext >&5 16695sed 's/^/| /' conftest.$ac_ext >&5
17317 16696
17318( exit $ac_status ) 16697( exit $ac_status )
17319 16698
17320 { $as_echo "$as_me:$LINENO: result: not found" >&5 16699 { echo "$as_me:$LINENO: result: not found" >&5
17321$as_echo "not found" >&6; } 16700echo "${ECHO_T}not found" >&6; }
17322 { { $as_echo "$as_me:$LINENO: error: OpenSSL version header not found." >&5 16701 { { echo "$as_me:$LINENO: error: OpenSSL version header not found." >&5
17323$as_echo "$as_me: error: OpenSSL version header not found." >&2;} 16702echo "$as_me: error: OpenSSL version header not found." >&2;}
17324 { (exit 1); exit 1; }; } 16703 { (exit 1); exit 1; }; }
17325 16704
17326fi 16705fi
17327rm -rf conftest.dSYM
17328rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 16706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17329fi 16707fi
17330 16708
17331 16709
17332 16710
17333# Determine OpenSSL library version 16711# Determine OpenSSL library version
17334{ $as_echo "$as_me:$LINENO: checking OpenSSL library version" >&5 16712{ echo "$as_me:$LINENO: checking OpenSSL library version" >&5
17335$as_echo_n "checking OpenSSL library version... " >&6; } 16713echo $ECHO_N "checking OpenSSL library version... $ECHO_C" >&6; }
17336if test "$cross_compiling" = yes; then 16714if test "$cross_compiling" = yes; then
17337 16715
17338 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5 16716 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5
17339$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;} 16717echo "$as_me: WARNING: cross compiling: not checking" >&2;}
17340 16718
17341 16719
17342else 16720else
@@ -17373,42 +16751,39 @@ case "(($ac_try" in
17373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17374 *) ac_try_echo=$ac_try;; 16752 *) ac_try_echo=$ac_try;;
17375esac 16753esac
17376eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17377$as_echo "$ac_try_echo") >&5
17378 (eval "$ac_link") 2>&5 16755 (eval "$ac_link") 2>&5
17379 ac_status=$? 16756 ac_status=$?
17380 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17381 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 16758 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17382 { (case "(($ac_try" in 16759 { (case "(($ac_try" in
17383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17384 *) ac_try_echo=$ac_try;; 16761 *) ac_try_echo=$ac_try;;
17385esac 16762esac
17386eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17387$as_echo "$ac_try_echo") >&5
17388 (eval "$ac_try") 2>&5 16764 (eval "$ac_try") 2>&5
17389 ac_status=$? 16765 ac_status=$?
17390 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17391 (exit $ac_status); }; }; then 16767 (exit $ac_status); }; }; then
17392 16768
17393 ssl_library_ver=`cat conftest.ssllibver` 16769 ssl_library_ver=`cat conftest.ssllibver`
17394 { $as_echo "$as_me:$LINENO: result: $ssl_library_ver" >&5 16770 { echo "$as_me:$LINENO: result: $ssl_library_ver" >&5
17395$as_echo "$ssl_library_ver" >&6; } 16771echo "${ECHO_T}$ssl_library_ver" >&6; }
17396 16772
17397else 16773else
17398 $as_echo "$as_me: program exited with status $ac_status" >&5 16774 echo "$as_me: program exited with status $ac_status" >&5
17399$as_echo "$as_me: failed program was:" >&5 16775echo "$as_me: failed program was:" >&5
17400sed 's/^/| /' conftest.$ac_ext >&5 16776sed 's/^/| /' conftest.$ac_ext >&5
17401 16777
17402( exit $ac_status ) 16778( exit $ac_status )
17403 16779
17404 { $as_echo "$as_me:$LINENO: result: not found" >&5 16780 { echo "$as_me:$LINENO: result: not found" >&5
17405$as_echo "not found" >&6; } 16781echo "${ECHO_T}not found" >&6; }
17406 { { $as_echo "$as_me:$LINENO: error: OpenSSL library not found." >&5 16782 { { echo "$as_me:$LINENO: error: OpenSSL library not found." >&5
17407$as_echo "$as_me: error: OpenSSL library not found." >&2;} 16783echo "$as_me: error: OpenSSL library not found." >&2;}
17408 { (exit 1); exit 1; }; } 16784 { (exit 1); exit 1; }; }
17409 16785
17410fi 16786fi
17411rm -rf conftest.dSYM
17412rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 16787rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17413fi 16788fi
17414 16789
@@ -17426,12 +16801,12 @@ fi
17426 16801
17427 16802
17428# Sanity check OpenSSL headers 16803# Sanity check OpenSSL headers
17429{ $as_echo "$as_me:$LINENO: checking whether OpenSSL's headers match the library" >&5 16804{ echo "$as_me:$LINENO: checking whether OpenSSL's headers match the library" >&5
17430$as_echo_n "checking whether OpenSSL's headers match the library... " >&6; } 16805echo $ECHO_N "checking whether OpenSSL's headers match the library... $ECHO_C" >&6; }
17431if test "$cross_compiling" = yes; then 16806if test "$cross_compiling" = yes; then
17432 16807
17433 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5 16808 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5
17434$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;} 16809echo "$as_me: WARNING: cross compiling: not checking" >&2;}
17435 16810
17436 16811
17437else 16812else
@@ -17453,43 +16828,41 @@ case "(($ac_try" in
17453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17454 *) ac_try_echo=$ac_try;; 16829 *) ac_try_echo=$ac_try;;
17455esac 16830esac
17456eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17457$as_echo "$ac_try_echo") >&5
17458 (eval "$ac_link") 2>&5 16832 (eval "$ac_link") 2>&5
17459 ac_status=$? 16833 ac_status=$?
17460 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17461 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 16835 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17462 { (case "(($ac_try" in 16836 { (case "(($ac_try" in
17463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17464 *) ac_try_echo=$ac_try;; 16838 *) ac_try_echo=$ac_try;;
17465esac 16839esac
17466eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17467$as_echo "$ac_try_echo") >&5
17468 (eval "$ac_try") 2>&5 16841 (eval "$ac_try") 2>&5
17469 ac_status=$? 16842 ac_status=$?
17470 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17471 (exit $ac_status); }; }; then 16844 (exit $ac_status); }; }; then
17472 16845
17473 { $as_echo "$as_me:$LINENO: result: yes" >&5 16846 { echo "$as_me:$LINENO: result: yes" >&5
17474$as_echo "yes" >&6; } 16847echo "${ECHO_T}yes" >&6; }
17475 16848
17476else 16849else
17477 $as_echo "$as_me: program exited with status $ac_status" >&5 16850 echo "$as_me: program exited with status $ac_status" >&5
17478$as_echo "$as_me: failed program was:" >&5 16851echo "$as_me: failed program was:" >&5
17479sed 's/^/| /' conftest.$ac_ext >&5 16852sed 's/^/| /' conftest.$ac_ext >&5
17480 16853
17481( exit $ac_status ) 16854( exit $ac_status )
17482 16855
17483 { $as_echo "$as_me:$LINENO: result: no" >&5 16856 { echo "$as_me:$LINENO: result: no" >&5
17484$as_echo "no" >&6; } 16857echo "${ECHO_T}no" >&6; }
17485 if test "x$openssl_check_nonfatal" = "x"; then 16858 if test "x$openssl_check_nonfatal" = "x"; then
17486 { { $as_echo "$as_me:$LINENO: error: Your OpenSSL headers do not match your 16859 { { echo "$as_me:$LINENO: error: Your OpenSSL headers do not match your
17487library. Check config.log for details. 16860library. Check config.log for details.
17488If you are sure your installation is consistent, you can disable the check 16861If you are sure your installation is consistent, you can disable the check
17489by running \"./configure --without-openssl-header-check\". 16862by running \"./configure --without-openssl-header-check\".
17490Also see contrib/findssl.sh for help identifying header/library mismatches. 16863Also see contrib/findssl.sh for help identifying header/library mismatches.
17491" >&5 16864" >&5
17492$as_echo "$as_me: error: Your OpenSSL headers do not match your 16865echo "$as_me: error: Your OpenSSL headers do not match your
17493library. Check config.log for details. 16866library. Check config.log for details.
17494If you are sure your installation is consistent, you can disable the check 16867If you are sure your installation is consistent, you can disable the check
17495by running \"./configure --without-openssl-header-check\". 16868by running \"./configure --without-openssl-header-check\".
@@ -17497,23 +16870,22 @@ Also see contrib/findssl.sh for help identifying header/library mismatches.
17497" >&2;} 16870" >&2;}
17498 { (exit 1); exit 1; }; } 16871 { (exit 1); exit 1; }; }
17499 else 16872 else
17500 { $as_echo "$as_me:$LINENO: WARNING: Your OpenSSL headers do not match your 16873 { echo "$as_me:$LINENO: WARNING: Your OpenSSL headers do not match your
17501library. Check config.log for details. 16874library. Check config.log for details.
17502Also see contrib/findssl.sh for help identifying header/library mismatches." >&5 16875Also see contrib/findssl.sh for help identifying header/library mismatches." >&5
17503$as_echo "$as_me: WARNING: Your OpenSSL headers do not match your 16876echo "$as_me: WARNING: Your OpenSSL headers do not match your
17504library. Check config.log for details. 16877library. Check config.log for details.
17505Also see contrib/findssl.sh for help identifying header/library mismatches." >&2;} 16878Also see contrib/findssl.sh for help identifying header/library mismatches." >&2;}
17506 fi 16879 fi
17507 16880
17508fi 16881fi
17509rm -rf conftest.dSYM
17510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 16882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17511fi 16883fi
17512 16884
17513 16885
17514 16886
17515{ $as_echo "$as_me:$LINENO: checking if programs using OpenSSL functions will link" >&5 16887{ echo "$as_me:$LINENO: checking if programs using OpenSSL functions will link" >&5
17516$as_echo_n "checking if programs using OpenSSL functions will link... " >&6; } 16888echo $ECHO_N "checking if programs using OpenSSL functions will link... $ECHO_C" >&6; }
17517cat >conftest.$ac_ext <<_ACEOF 16889cat >conftest.$ac_ext <<_ACEOF
17518/* confdefs.h. */ 16890/* confdefs.h. */
17519_ACEOF 16891_ACEOF
@@ -17531,36 +16903,33 @@ case "(($ac_try" in
17531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17532 *) ac_try_echo=$ac_try;; 16904 *) ac_try_echo=$ac_try;;
17533esac 16905esac
17534eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17535$as_echo "$ac_try_echo") >&5
17536 (eval "$ac_link") 2>conftest.er1 16907 (eval "$ac_link") 2>conftest.er1
17537 ac_status=$? 16908 ac_status=$?
17538 grep -v '^ *+' conftest.er1 >conftest.err 16909 grep -v '^ *+' conftest.er1 >conftest.err
17539 rm -f conftest.er1 16910 rm -f conftest.er1
17540 cat conftest.err >&5 16911 cat conftest.err >&5
17541 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17542 (exit $ac_status); } && { 16913 (exit $ac_status); } && {
17543 test -z "$ac_c_werror_flag" || 16914 test -z "$ac_c_werror_flag" ||
17544 test ! -s conftest.err 16915 test ! -s conftest.err
17545 } && test -s conftest$ac_exeext && { 16916 } && test -s conftest$ac_exeext &&
17546 test "$cross_compiling" = yes || 16917 $as_test_x conftest$ac_exeext; then
17547 $as_test_x conftest$ac_exeext
17548 }; then
17549 16918
17550 { $as_echo "$as_me:$LINENO: result: yes" >&5 16919 { echo "$as_me:$LINENO: result: yes" >&5
17551$as_echo "yes" >&6; } 16920echo "${ECHO_T}yes" >&6; }
17552 16921
17553else 16922else
17554 $as_echo "$as_me: failed program was:" >&5 16923 echo "$as_me: failed program was:" >&5
17555sed 's/^/| /' conftest.$ac_ext >&5 16924sed 's/^/| /' conftest.$ac_ext >&5
17556 16925
17557 16926
17558 { $as_echo "$as_me:$LINENO: result: no" >&5 16927 { echo "$as_me:$LINENO: result: no" >&5
17559$as_echo "no" >&6; } 16928echo "${ECHO_T}no" >&6; }
17560 saved_LIBS="$LIBS" 16929 saved_LIBS="$LIBS"
17561 LIBS="$LIBS -ldl" 16930 LIBS="$LIBS -ldl"
17562 { $as_echo "$as_me:$LINENO: checking if programs using OpenSSL need -ldl" >&5 16931 { echo "$as_me:$LINENO: checking if programs using OpenSSL need -ldl" >&5
17563$as_echo_n "checking if programs using OpenSSL need -ldl... " >&6; } 16932echo $ECHO_N "checking if programs using OpenSSL need -ldl... $ECHO_C" >&6; }
17564 cat >conftest.$ac_ext <<_ACEOF 16933 cat >conftest.$ac_ext <<_ACEOF
17565/* confdefs.h. */ 16934/* confdefs.h. */
17566_ACEOF 16935_ACEOF
@@ -17578,45 +16947,40 @@ case "(($ac_try" in
17578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17579 *) ac_try_echo=$ac_try;; 16948 *) ac_try_echo=$ac_try;;
17580esac 16949esac
17581eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17582$as_echo "$ac_try_echo") >&5
17583 (eval "$ac_link") 2>conftest.er1 16951 (eval "$ac_link") 2>conftest.er1
17584 ac_status=$? 16952 ac_status=$?
17585 grep -v '^ *+' conftest.er1 >conftest.err 16953 grep -v '^ *+' conftest.er1 >conftest.err
17586 rm -f conftest.er1 16954 rm -f conftest.er1
17587 cat conftest.err >&5 16955 cat conftest.err >&5
17588 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17589 (exit $ac_status); } && { 16957 (exit $ac_status); } && {
17590 test -z "$ac_c_werror_flag" || 16958 test -z "$ac_c_werror_flag" ||
17591 test ! -s conftest.err 16959 test ! -s conftest.err
17592 } && test -s conftest$ac_exeext && { 16960 } && test -s conftest$ac_exeext &&
17593 test "$cross_compiling" = yes || 16961 $as_test_x conftest$ac_exeext; then
17594 $as_test_x conftest$ac_exeext
17595 }; then
17596 16962
17597 { $as_echo "$as_me:$LINENO: result: yes" >&5 16963 { echo "$as_me:$LINENO: result: yes" >&5
17598$as_echo "yes" >&6; } 16964echo "${ECHO_T}yes" >&6; }
17599 16965
17600else 16966else
17601 $as_echo "$as_me: failed program was:" >&5 16967 echo "$as_me: failed program was:" >&5
17602sed 's/^/| /' conftest.$ac_ext >&5 16968sed 's/^/| /' conftest.$ac_ext >&5
17603 16969
17604 16970
17605 { $as_echo "$as_me:$LINENO: result: no" >&5 16971 { echo "$as_me:$LINENO: result: no" >&5
17606$as_echo "no" >&6; } 16972echo "${ECHO_T}no" >&6; }
17607 LIBS="$saved_LIBS" 16973 LIBS="$saved_LIBS"
17608 16974
17609 16975
17610fi 16976fi
17611 16977
17612rm -rf conftest.dSYM
17613rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 16978rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17614 conftest$ac_exeext conftest.$ac_ext 16979 conftest$ac_exeext conftest.$ac_ext
17615 16980
17616 16981
17617fi 16982fi
17618 16983
17619rm -rf conftest.dSYM
17620rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 16984rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17621 conftest$ac_exeext conftest.$ac_ext 16985 conftest$ac_exeext conftest.$ac_ext
17622 16986
@@ -17624,8 +16988,8 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17624# Check whether --with-ssl-engine was given. 16988# Check whether --with-ssl-engine was given.
17625if test "${with_ssl_engine+set}" = set; then 16989if test "${with_ssl_engine+set}" = set; then
17626 withval=$with_ssl_engine; if test "x$withval" != "xno" ; then 16990 withval=$with_ssl_engine; if test "x$withval" != "xno" ; then
17627 { $as_echo "$as_me:$LINENO: checking for OpenSSL ENGINE support" >&5 16991 { echo "$as_me:$LINENO: checking for OpenSSL ENGINE support" >&5
17628$as_echo_n "checking for OpenSSL ENGINE support... " >&6; } 16992echo $ECHO_N "checking for OpenSSL ENGINE support... $ECHO_C" >&6; }
17629 cat >conftest.$ac_ext <<_ACEOF 16993 cat >conftest.$ac_ext <<_ACEOF
17630/* confdefs.h. */ 16994/* confdefs.h. */
17631_ACEOF 16995_ACEOF
@@ -17649,20 +17013,19 @@ case "(($ac_try" in
17649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17650 *) ac_try_echo=$ac_try;; 17014 *) ac_try_echo=$ac_try;;
17651esac 17015esac
17652eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17653$as_echo "$ac_try_echo") >&5
17654 (eval "$ac_compile") 2>conftest.er1 17017 (eval "$ac_compile") 2>conftest.er1
17655 ac_status=$? 17018 ac_status=$?
17656 grep -v '^ *+' conftest.er1 >conftest.err 17019 grep -v '^ *+' conftest.er1 >conftest.err
17657 rm -f conftest.er1 17020 rm -f conftest.er1
17658 cat conftest.err >&5 17021 cat conftest.err >&5
17659 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17660 (exit $ac_status); } && { 17023 (exit $ac_status); } && {
17661 test -z "$ac_c_werror_flag" || 17024 test -z "$ac_c_werror_flag" ||
17662 test ! -s conftest.err 17025 test ! -s conftest.err
17663 } && test -s conftest.$ac_objext; then 17026 } && test -s conftest.$ac_objext; then
17664 { $as_echo "$as_me:$LINENO: result: yes" >&5 17027 { echo "$as_me:$LINENO: result: yes" >&5
17665$as_echo "yes" >&6; } 17028echo "${ECHO_T}yes" >&6; }
17666 17029
17667cat >>confdefs.h <<\_ACEOF 17030cat >>confdefs.h <<\_ACEOF
17668#define USE_OPENSSL_ENGINE 1 17031#define USE_OPENSSL_ENGINE 1
@@ -17670,11 +17033,11 @@ _ACEOF
17670 17033
17671 17034
17672else 17035else
17673 $as_echo "$as_me: failed program was:" >&5 17036 echo "$as_me: failed program was:" >&5
17674sed 's/^/| /' conftest.$ac_ext >&5 17037sed 's/^/| /' conftest.$ac_ext >&5
17675 17038
17676 { { $as_echo "$as_me:$LINENO: error: OpenSSL ENGINE support not found" >&5 17039 { { echo "$as_me:$LINENO: error: OpenSSL ENGINE support not found" >&5
17677$as_echo "$as_me: error: OpenSSL ENGINE support not found" >&2;} 17040echo "$as_me: error: OpenSSL ENGINE support not found" >&2;}
17678 { (exit 1); exit 1; }; } 17041 { (exit 1); exit 1; }; }
17679 17042
17680fi 17043fi
@@ -17686,8 +17049,8 @@ fi
17686 17049
17687 17050
17688# Check for OpenSSL without EVP_aes_{192,256}_cbc 17051# Check for OpenSSL without EVP_aes_{192,256}_cbc
17689{ $as_echo "$as_me:$LINENO: checking whether OpenSSL has crippled AES support" >&5 17052{ echo "$as_me:$LINENO: checking whether OpenSSL has crippled AES support" >&5
17690$as_echo_n "checking whether OpenSSL has crippled AES support... " >&6; } 17053echo $ECHO_N "checking whether OpenSSL has crippled AES support... $ECHO_C" >&6; }
17691cat >conftest.$ac_ext <<_ACEOF 17054cat >conftest.$ac_ext <<_ACEOF
17692/* confdefs.h. */ 17055/* confdefs.h. */
17693_ACEOF 17056_ACEOF
@@ -17706,32 +17069,29 @@ case "(($ac_try" in
17706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17707 *) ac_try_echo=$ac_try;; 17070 *) ac_try_echo=$ac_try;;
17708esac 17071esac
17709eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17710$as_echo "$ac_try_echo") >&5
17711 (eval "$ac_link") 2>conftest.er1 17073 (eval "$ac_link") 2>conftest.er1
17712 ac_status=$? 17074 ac_status=$?
17713 grep -v '^ *+' conftest.er1 >conftest.err 17075 grep -v '^ *+' conftest.er1 >conftest.err
17714 rm -f conftest.er1 17076 rm -f conftest.er1
17715 cat conftest.err >&5 17077 cat conftest.err >&5
17716 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17717 (exit $ac_status); } && { 17079 (exit $ac_status); } && {
17718 test -z "$ac_c_werror_flag" || 17080 test -z "$ac_c_werror_flag" ||
17719 test ! -s conftest.err 17081 test ! -s conftest.err
17720 } && test -s conftest$ac_exeext && { 17082 } && test -s conftest$ac_exeext &&
17721 test "$cross_compiling" = yes || 17083 $as_test_x conftest$ac_exeext; then
17722 $as_test_x conftest$ac_exeext
17723 }; then
17724 17084
17725 { $as_echo "$as_me:$LINENO: result: no" >&5 17085 { echo "$as_me:$LINENO: result: no" >&5
17726$as_echo "no" >&6; } 17086echo "${ECHO_T}no" >&6; }
17727 17087
17728else 17088else
17729 $as_echo "$as_me: failed program was:" >&5 17089 echo "$as_me: failed program was:" >&5
17730sed 's/^/| /' conftest.$ac_ext >&5 17090sed 's/^/| /' conftest.$ac_ext >&5
17731 17091
17732 17092
17733 { $as_echo "$as_me:$LINENO: result: yes" >&5 17093 { echo "$as_me:$LINENO: result: yes" >&5
17734$as_echo "yes" >&6; } 17094echo "${ECHO_T}yes" >&6; }
17735 17095
17736cat >>confdefs.h <<\_ACEOF 17096cat >>confdefs.h <<\_ACEOF
17737#define OPENSSL_LOBOTOMISED_AES 1 17097#define OPENSSL_LOBOTOMISED_AES 1
@@ -17741,12 +17101,11 @@ _ACEOF
17741 17101
17742fi 17102fi
17743 17103
17744rm -rf conftest.dSYM
17745rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17104rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17746 conftest$ac_exeext conftest.$ac_ext 17105 conftest$ac_exeext conftest.$ac_ext
17747 17106
17748{ $as_echo "$as_me:$LINENO: checking if EVP_DigestUpdate returns an int" >&5 17107{ echo "$as_me:$LINENO: checking if EVP_DigestUpdate returns an int" >&5
17749$as_echo_n "checking if EVP_DigestUpdate returns an int... " >&6; } 17108echo $ECHO_N "checking if EVP_DigestUpdate returns an int... $ECHO_C" >&6; }
17750cat >conftest.$ac_ext <<_ACEOF 17109cat >conftest.$ac_ext <<_ACEOF
17751/* confdefs.h. */ 17110/* confdefs.h. */
17752_ACEOF 17111_ACEOF
@@ -17765,32 +17124,29 @@ case "(($ac_try" in
17765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17766 *) ac_try_echo=$ac_try;; 17125 *) ac_try_echo=$ac_try;;
17767esac 17126esac
17768eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17769$as_echo "$ac_try_echo") >&5
17770 (eval "$ac_link") 2>conftest.er1 17128 (eval "$ac_link") 2>conftest.er1
17771 ac_status=$? 17129 ac_status=$?
17772 grep -v '^ *+' conftest.er1 >conftest.err 17130 grep -v '^ *+' conftest.er1 >conftest.err
17773 rm -f conftest.er1 17131 rm -f conftest.er1
17774 cat conftest.err >&5 17132 cat conftest.err >&5
17775 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17776 (exit $ac_status); } && { 17134 (exit $ac_status); } && {
17777 test -z "$ac_c_werror_flag" || 17135 test -z "$ac_c_werror_flag" ||
17778 test ! -s conftest.err 17136 test ! -s conftest.err
17779 } && test -s conftest$ac_exeext && { 17137 } && test -s conftest$ac_exeext &&
17780 test "$cross_compiling" = yes || 17138 $as_test_x conftest$ac_exeext; then
17781 $as_test_x conftest$ac_exeext
17782 }; then
17783 17139
17784 { $as_echo "$as_me:$LINENO: result: yes" >&5 17140 { echo "$as_me:$LINENO: result: yes" >&5
17785$as_echo "yes" >&6; } 17141echo "${ECHO_T}yes" >&6; }
17786 17142
17787else 17143else
17788 $as_echo "$as_me: failed program was:" >&5 17144 echo "$as_me: failed program was:" >&5
17789sed 's/^/| /' conftest.$ac_ext >&5 17145sed 's/^/| /' conftest.$ac_ext >&5
17790 17146
17791 17147
17792 { $as_echo "$as_me:$LINENO: result: no" >&5 17148 { echo "$as_me:$LINENO: result: no" >&5
17793$as_echo "no" >&6; } 17149echo "${ECHO_T}no" >&6; }
17794 17150
17795cat >>confdefs.h <<\_ACEOF 17151cat >>confdefs.h <<\_ACEOF
17796#define OPENSSL_EVP_DIGESTUPDATE_VOID 1 17152#define OPENSSL_EVP_DIGESTUPDATE_VOID 1
@@ -17800,7 +17156,6 @@ _ACEOF
17800 17156
17801fi 17157fi
17802 17158
17803rm -rf conftest.dSYM
17804rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17159rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17805 conftest$ac_exeext conftest.$ac_ext 17160 conftest$ac_exeext conftest.$ac_ext
17806 17161
@@ -17808,10 +17163,10 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17808# because the system crypt() is more featureful. 17163# because the system crypt() is more featureful.
17809if test "x$check_for_libcrypt_before" = "x1"; then 17164if test "x$check_for_libcrypt_before" = "x1"; then
17810 17165
17811{ $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 17166{ echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
17812$as_echo_n "checking for crypt in -lcrypt... " >&6; } 17167echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
17813if test "${ac_cv_lib_crypt_crypt+set}" = set; then 17168if test "${ac_cv_lib_crypt_crypt+set}" = set; then
17814 $as_echo_n "(cached) " >&6 17169 echo $ECHO_N "(cached) $ECHO_C" >&6
17815else 17170else
17816 ac_check_lib_save_LIBS=$LIBS 17171 ac_check_lib_save_LIBS=$LIBS
17817LIBS="-lcrypt $LIBS" 17172LIBS="-lcrypt $LIBS"
@@ -17843,36 +17198,32 @@ case "(($ac_try" in
17843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17844 *) ac_try_echo=$ac_try;; 17199 *) ac_try_echo=$ac_try;;
17845esac 17200esac
17846eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17847$as_echo "$ac_try_echo") >&5
17848 (eval "$ac_link") 2>conftest.er1 17202 (eval "$ac_link") 2>conftest.er1
17849 ac_status=$? 17203 ac_status=$?
17850 grep -v '^ *+' conftest.er1 >conftest.err 17204 grep -v '^ *+' conftest.er1 >conftest.err
17851 rm -f conftest.er1 17205 rm -f conftest.er1
17852 cat conftest.err >&5 17206 cat conftest.err >&5
17853 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17854 (exit $ac_status); } && { 17208 (exit $ac_status); } && {
17855 test -z "$ac_c_werror_flag" || 17209 test -z "$ac_c_werror_flag" ||
17856 test ! -s conftest.err 17210 test ! -s conftest.err
17857 } && test -s conftest$ac_exeext && { 17211 } && test -s conftest$ac_exeext &&
17858 test "$cross_compiling" = yes || 17212 $as_test_x conftest$ac_exeext; then
17859 $as_test_x conftest$ac_exeext
17860 }; then
17861 ac_cv_lib_crypt_crypt=yes 17213 ac_cv_lib_crypt_crypt=yes
17862else 17214else
17863 $as_echo "$as_me: failed program was:" >&5 17215 echo "$as_me: failed program was:" >&5
17864sed 's/^/| /' conftest.$ac_ext >&5 17216sed 's/^/| /' conftest.$ac_ext >&5
17865 17217
17866 ac_cv_lib_crypt_crypt=no 17218 ac_cv_lib_crypt_crypt=no
17867fi 17219fi
17868 17220
17869rm -rf conftest.dSYM
17870rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17221rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17871 conftest$ac_exeext conftest.$ac_ext 17222 conftest$ac_exeext conftest.$ac_ext
17872LIBS=$ac_check_lib_save_LIBS 17223LIBS=$ac_check_lib_save_LIBS
17873fi 17224fi
17874{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 17225{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
17875$as_echo "$ac_cv_lib_crypt_crypt" >&6; } 17226echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
17876if test $ac_cv_lib_crypt_crypt = yes; then 17227if test $ac_cv_lib_crypt_crypt = yes; then
17877 cat >>confdefs.h <<_ACEOF 17228 cat >>confdefs.h <<_ACEOF
17878#define HAVE_LIBCRYPT 1 17229#define HAVE_LIBCRYPT 1
@@ -17887,10 +17238,10 @@ fi
17887# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the 17238# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
17888# version in OpenSSL. 17239# version in OpenSSL.
17889if test "x$check_for_libcrypt_later" = "x1"; then 17240if test "x$check_for_libcrypt_later" = "x1"; then
17890 { $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 17241 { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
17891$as_echo_n "checking for crypt in -lcrypt... " >&6; } 17242echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
17892if test "${ac_cv_lib_crypt_crypt+set}" = set; then 17243if test "${ac_cv_lib_crypt_crypt+set}" = set; then
17893 $as_echo_n "(cached) " >&6 17244 echo $ECHO_N "(cached) $ECHO_C" >&6
17894else 17245else
17895 ac_check_lib_save_LIBS=$LIBS 17246 ac_check_lib_save_LIBS=$LIBS
17896LIBS="-lcrypt $LIBS" 17247LIBS="-lcrypt $LIBS"
@@ -17922,36 +17273,32 @@ case "(($ac_try" in
17922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17923 *) ac_try_echo=$ac_try;; 17274 *) ac_try_echo=$ac_try;;
17924esac 17275esac
17925eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17926$as_echo "$ac_try_echo") >&5
17927 (eval "$ac_link") 2>conftest.er1 17277 (eval "$ac_link") 2>conftest.er1
17928 ac_status=$? 17278 ac_status=$?
17929 grep -v '^ *+' conftest.er1 >conftest.err 17279 grep -v '^ *+' conftest.er1 >conftest.err
17930 rm -f conftest.er1 17280 rm -f conftest.er1
17931 cat conftest.err >&5 17281 cat conftest.err >&5
17932 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17933 (exit $ac_status); } && { 17283 (exit $ac_status); } && {
17934 test -z "$ac_c_werror_flag" || 17284 test -z "$ac_c_werror_flag" ||
17935 test ! -s conftest.err 17285 test ! -s conftest.err
17936 } && test -s conftest$ac_exeext && { 17286 } && test -s conftest$ac_exeext &&
17937 test "$cross_compiling" = yes || 17287 $as_test_x conftest$ac_exeext; then
17938 $as_test_x conftest$ac_exeext
17939 }; then
17940 ac_cv_lib_crypt_crypt=yes 17288 ac_cv_lib_crypt_crypt=yes
17941else 17289else
17942 $as_echo "$as_me: failed program was:" >&5 17290 echo "$as_me: failed program was:" >&5
17943sed 's/^/| /' conftest.$ac_ext >&5 17291sed 's/^/| /' conftest.$ac_ext >&5
17944 17292
17945 ac_cv_lib_crypt_crypt=no 17293 ac_cv_lib_crypt_crypt=no
17946fi 17294fi
17947 17295
17948rm -rf conftest.dSYM
17949rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17296rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17950 conftest$ac_exeext conftest.$ac_ext 17297 conftest$ac_exeext conftest.$ac_ext
17951LIBS=$ac_check_lib_save_LIBS 17298LIBS=$ac_check_lib_save_LIBS
17952fi 17299fi
17953{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 17300{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
17954$as_echo "$ac_cv_lib_crypt_crypt" >&6; } 17301echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
17955if test $ac_cv_lib_crypt_crypt = yes; then 17302if test $ac_cv_lib_crypt_crypt = yes; then
17956 LIBS="$LIBS -lcrypt" 17303 LIBS="$LIBS -lcrypt"
17957fi 17304fi
@@ -17963,11 +17310,11 @@ fi
17963 17310
17964for ac_func in SHA256_Update EVP_sha256 17311for ac_func in SHA256_Update EVP_sha256
17965do 17312do
17966as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 17313as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17967{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 17314{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17968$as_echo_n "checking for $ac_func... " >&6; } 17315echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17969if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 17316if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17970 $as_echo_n "(cached) " >&6 17317 echo $ECHO_N "(cached) $ECHO_C" >&6
17971else 17318else
17972 cat >conftest.$ac_ext <<_ACEOF 17319 cat >conftest.$ac_ext <<_ACEOF
17973/* confdefs.h. */ 17320/* confdefs.h. */
@@ -18020,41 +17367,35 @@ case "(($ac_try" in
18020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18021 *) ac_try_echo=$ac_try;; 17368 *) ac_try_echo=$ac_try;;
18022esac 17369esac
18023eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18024$as_echo "$ac_try_echo") >&5
18025 (eval "$ac_link") 2>conftest.er1 17371 (eval "$ac_link") 2>conftest.er1
18026 ac_status=$? 17372 ac_status=$?
18027 grep -v '^ *+' conftest.er1 >conftest.err 17373 grep -v '^ *+' conftest.er1 >conftest.err
18028 rm -f conftest.er1 17374 rm -f conftest.er1
18029 cat conftest.err >&5 17375 cat conftest.err >&5
18030 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18031 (exit $ac_status); } && { 17377 (exit $ac_status); } && {
18032 test -z "$ac_c_werror_flag" || 17378 test -z "$ac_c_werror_flag" ||
18033 test ! -s conftest.err 17379 test ! -s conftest.err
18034 } && test -s conftest$ac_exeext && { 17380 } && test -s conftest$ac_exeext &&
18035 test "$cross_compiling" = yes || 17381 $as_test_x conftest$ac_exeext; then
18036 $as_test_x conftest$ac_exeext
18037 }; then
18038 eval "$as_ac_var=yes" 17382 eval "$as_ac_var=yes"
18039else 17383else
18040 $as_echo "$as_me: failed program was:" >&5 17384 echo "$as_me: failed program was:" >&5
18041sed 's/^/| /' conftest.$ac_ext >&5 17385sed 's/^/| /' conftest.$ac_ext >&5
18042 17386
18043 eval "$as_ac_var=no" 17387 eval "$as_ac_var=no"
18044fi 17388fi
18045 17389
18046rm -rf conftest.dSYM
18047rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17390rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18048 conftest$ac_exeext conftest.$ac_ext 17391 conftest$ac_exeext conftest.$ac_ext
18049fi 17392fi
18050ac_res=`eval 'as_val=${'$as_ac_var'} 17393ac_res=`eval echo '${'$as_ac_var'}'`
18051 $as_echo "$as_val"'` 17394 { echo "$as_me:$LINENO: result: $ac_res" >&5
18052 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 17395echo "${ECHO_T}$ac_res" >&6; }
18053$as_echo "$ac_res" >&6; } 17396if test `eval echo '${'$as_ac_var'}'` = yes; then
18054if test `eval 'as_val=${'$as_ac_var'}
18055 $as_echo "$as_val"'` = yes; then
18056 cat >>confdefs.h <<_ACEOF 17397 cat >>confdefs.h <<_ACEOF
18057#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 17398#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18058_ACEOF 17399_ACEOF
18059 17400
18060fi 17401fi
@@ -18062,10 +17403,10 @@ done
18062 17403
18063 17404
18064saved_LIBS="$LIBS" 17405saved_LIBS="$LIBS"
18065{ $as_echo "$as_me:$LINENO: checking for ia_openinfo in -liaf" >&5 17406{ echo "$as_me:$LINENO: checking for ia_openinfo in -liaf" >&5
18066$as_echo_n "checking for ia_openinfo in -liaf... " >&6; } 17407echo $ECHO_N "checking for ia_openinfo in -liaf... $ECHO_C" >&6; }
18067if test "${ac_cv_lib_iaf_ia_openinfo+set}" = set; then 17408if test "${ac_cv_lib_iaf_ia_openinfo+set}" = set; then
18068 $as_echo_n "(cached) " >&6 17409 echo $ECHO_N "(cached) $ECHO_C" >&6
18069else 17410else
18070 ac_check_lib_save_LIBS=$LIBS 17411 ac_check_lib_save_LIBS=$LIBS
18071LIBS="-liaf $LIBS" 17412LIBS="-liaf $LIBS"
@@ -18097,47 +17438,43 @@ case "(($ac_try" in
18097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18098 *) ac_try_echo=$ac_try;; 17439 *) ac_try_echo=$ac_try;;
18099esac 17440esac
18100eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18101$as_echo "$ac_try_echo") >&5
18102 (eval "$ac_link") 2>conftest.er1 17442 (eval "$ac_link") 2>conftest.er1
18103 ac_status=$? 17443 ac_status=$?
18104 grep -v '^ *+' conftest.er1 >conftest.err 17444 grep -v '^ *+' conftest.er1 >conftest.err
18105 rm -f conftest.er1 17445 rm -f conftest.er1
18106 cat conftest.err >&5 17446 cat conftest.err >&5
18107 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18108 (exit $ac_status); } && { 17448 (exit $ac_status); } && {
18109 test -z "$ac_c_werror_flag" || 17449 test -z "$ac_c_werror_flag" ||
18110 test ! -s conftest.err 17450 test ! -s conftest.err
18111 } && test -s conftest$ac_exeext && { 17451 } && test -s conftest$ac_exeext &&
18112 test "$cross_compiling" = yes || 17452 $as_test_x conftest$ac_exeext; then
18113 $as_test_x conftest$ac_exeext
18114 }; then
18115 ac_cv_lib_iaf_ia_openinfo=yes 17453 ac_cv_lib_iaf_ia_openinfo=yes
18116else 17454else
18117 $as_echo "$as_me: failed program was:" >&5 17455 echo "$as_me: failed program was:" >&5
18118sed 's/^/| /' conftest.$ac_ext >&5 17456sed 's/^/| /' conftest.$ac_ext >&5
18119 17457
18120 ac_cv_lib_iaf_ia_openinfo=no 17458 ac_cv_lib_iaf_ia_openinfo=no
18121fi 17459fi
18122 17460
18123rm -rf conftest.dSYM
18124rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17461rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18125 conftest$ac_exeext conftest.$ac_ext 17462 conftest$ac_exeext conftest.$ac_ext
18126LIBS=$ac_check_lib_save_LIBS 17463LIBS=$ac_check_lib_save_LIBS
18127fi 17464fi
18128{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_iaf_ia_openinfo" >&5 17465{ echo "$as_me:$LINENO: result: $ac_cv_lib_iaf_ia_openinfo" >&5
18129$as_echo "$ac_cv_lib_iaf_ia_openinfo" >&6; } 17466echo "${ECHO_T}$ac_cv_lib_iaf_ia_openinfo" >&6; }
18130if test $ac_cv_lib_iaf_ia_openinfo = yes; then 17467if test $ac_cv_lib_iaf_ia_openinfo = yes; then
18131 17468
18132 LIBS="$LIBS -liaf" 17469 LIBS="$LIBS -liaf"
18133 17470
18134for ac_func in set_id 17471for ac_func in set_id
18135do 17472do
18136as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 17473as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18137{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 17474{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18138$as_echo_n "checking for $ac_func... " >&6; } 17475echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18139if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 17476if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18140 $as_echo_n "(cached) " >&6 17477 echo $ECHO_N "(cached) $ECHO_C" >&6
18141else 17478else
18142 cat >conftest.$ac_ext <<_ACEOF 17479 cat >conftest.$ac_ext <<_ACEOF
18143/* confdefs.h. */ 17480/* confdefs.h. */
@@ -18190,41 +17527,35 @@ case "(($ac_try" in
18190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18191 *) ac_try_echo=$ac_try;; 17528 *) ac_try_echo=$ac_try;;
18192esac 17529esac
18193eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18194$as_echo "$ac_try_echo") >&5
18195 (eval "$ac_link") 2>conftest.er1 17531 (eval "$ac_link") 2>conftest.er1
18196 ac_status=$? 17532 ac_status=$?
18197 grep -v '^ *+' conftest.er1 >conftest.err 17533 grep -v '^ *+' conftest.er1 >conftest.err
18198 rm -f conftest.er1 17534 rm -f conftest.er1
18199 cat conftest.err >&5 17535 cat conftest.err >&5
18200 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18201 (exit $ac_status); } && { 17537 (exit $ac_status); } && {
18202 test -z "$ac_c_werror_flag" || 17538 test -z "$ac_c_werror_flag" ||
18203 test ! -s conftest.err 17539 test ! -s conftest.err
18204 } && test -s conftest$ac_exeext && { 17540 } && test -s conftest$ac_exeext &&
18205 test "$cross_compiling" = yes || 17541 $as_test_x conftest$ac_exeext; then
18206 $as_test_x conftest$ac_exeext
18207 }; then
18208 eval "$as_ac_var=yes" 17542 eval "$as_ac_var=yes"
18209else 17543else
18210 $as_echo "$as_me: failed program was:" >&5 17544 echo "$as_me: failed program was:" >&5
18211sed 's/^/| /' conftest.$ac_ext >&5 17545sed 's/^/| /' conftest.$ac_ext >&5
18212 17546
18213 eval "$as_ac_var=no" 17547 eval "$as_ac_var=no"
18214fi 17548fi
18215 17549
18216rm -rf conftest.dSYM
18217rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17550rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18218 conftest$ac_exeext conftest.$ac_ext 17551 conftest$ac_exeext conftest.$ac_ext
18219fi 17552fi
18220ac_res=`eval 'as_val=${'$as_ac_var'} 17553ac_res=`eval echo '${'$as_ac_var'}'`
18221 $as_echo "$as_val"'` 17554 { echo "$as_me:$LINENO: result: $ac_res" >&5
18222 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 17555echo "${ECHO_T}$ac_res" >&6; }
18223$as_echo "$ac_res" >&6; } 17556if test `eval echo '${'$as_ac_var'}'` = yes; then
18224if test `eval 'as_val=${'$as_ac_var'}
18225 $as_echo "$as_val"'` = yes; then
18226 cat >>confdefs.h <<_ACEOF 17557 cat >>confdefs.h <<_ACEOF
18227#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 17558#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18228_ACEOF 17559_ACEOF
18229 SSHDLIBS="$SSHDLIBS -liaf" 17560 SSHDLIBS="$SSHDLIBS -liaf"
18230 17561
@@ -18244,12 +17575,12 @@ LIBS="$saved_LIBS"
18244### Configure cryptographic random number support 17575### Configure cryptographic random number support
18245 17576
18246# Check wheter OpenSSL seeds itself 17577# Check wheter OpenSSL seeds itself
18247{ $as_echo "$as_me:$LINENO: checking whether OpenSSL's PRNG is internally seeded" >&5 17578{ echo "$as_me:$LINENO: checking whether OpenSSL's PRNG is internally seeded" >&5
18248$as_echo_n "checking whether OpenSSL's PRNG is internally seeded... " >&6; } 17579echo $ECHO_N "checking whether OpenSSL's PRNG is internally seeded... $ECHO_C" >&6; }
18249if test "$cross_compiling" = yes; then 17580if test "$cross_compiling" = yes; then
18250 17581
18251 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: assuming yes" >&5 17582 { echo "$as_me:$LINENO: WARNING: cross compiling: assuming yes" >&5
18252$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;} 17583echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
18253 # This is safe, since all recent OpenSSL versions will 17584 # This is safe, since all recent OpenSSL versions will
18254 # complain at runtime if not seeded correctly. 17585 # complain at runtime if not seeded correctly.
18255 OPENSSL_SEEDS_ITSELF=yes 17586 OPENSSL_SEEDS_ITSELF=yes
@@ -18274,42 +17605,39 @@ case "(($ac_try" in
18274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18275 *) ac_try_echo=$ac_try;; 17606 *) ac_try_echo=$ac_try;;
18276esac 17607esac
18277eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18278$as_echo "$ac_try_echo") >&5
18279 (eval "$ac_link") 2>&5 17609 (eval "$ac_link") 2>&5
18280 ac_status=$? 17610 ac_status=$?
18281 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18282 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 17612 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18283 { (case "(($ac_try" in 17613 { (case "(($ac_try" in
18284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18285 *) ac_try_echo=$ac_try;; 17615 *) ac_try_echo=$ac_try;;
18286esac 17616esac
18287eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18288$as_echo "$ac_try_echo") >&5
18289 (eval "$ac_try") 2>&5 17618 (eval "$ac_try") 2>&5
18290 ac_status=$? 17619 ac_status=$?
18291 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18292 (exit $ac_status); }; }; then 17621 (exit $ac_status); }; }; then
18293 17622
18294 OPENSSL_SEEDS_ITSELF=yes 17623 OPENSSL_SEEDS_ITSELF=yes
18295 { $as_echo "$as_me:$LINENO: result: yes" >&5 17624 { echo "$as_me:$LINENO: result: yes" >&5
18296$as_echo "yes" >&6; } 17625echo "${ECHO_T}yes" >&6; }
18297 17626
18298else 17627else
18299 $as_echo "$as_me: program exited with status $ac_status" >&5 17628 echo "$as_me: program exited with status $ac_status" >&5
18300$as_echo "$as_me: failed program was:" >&5 17629echo "$as_me: failed program was:" >&5
18301sed 's/^/| /' conftest.$ac_ext >&5 17630sed 's/^/| /' conftest.$ac_ext >&5
18302 17631
18303( exit $ac_status ) 17632( exit $ac_status )
18304 17633
18305 { $as_echo "$as_me:$LINENO: result: no" >&5 17634 { echo "$as_me:$LINENO: result: no" >&5
18306$as_echo "no" >&6; } 17635echo "${ECHO_T}no" >&6; }
18307 # Default to use of the rand helper if OpenSSL doesn't 17636 # Default to use of the rand helper if OpenSSL doesn't
18308 # seed itself 17637 # seed itself
18309 USE_RAND_HELPER=yes 17638 USE_RAND_HELPER=yes
18310 17639
18311fi 17640fi
18312rm -rf conftest.dSYM
18313rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 17641rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18314fi 17642fi
18315 17643
@@ -18324,17 +17652,17 @@ if test "${with_pam+set}" = set; then
18324 if test "x$withval" != "xno" ; then 17652 if test "x$withval" != "xno" ; then
18325 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \ 17653 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
18326 test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then 17654 test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
18327 { { $as_echo "$as_me:$LINENO: error: PAM headers not found" >&5 17655 { { echo "$as_me:$LINENO: error: PAM headers not found" >&5
18328$as_echo "$as_me: error: PAM headers not found" >&2;} 17656echo "$as_me: error: PAM headers not found" >&2;}
18329 { (exit 1); exit 1; }; } 17657 { (exit 1); exit 1; }; }
18330 fi 17658 fi
18331 17659
18332 saved_LIBS="$LIBS" 17660 saved_LIBS="$LIBS"
18333 17661
18334{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 17662{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
18335$as_echo_n "checking for dlopen in -ldl... " >&6; } 17663echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
18336if test "${ac_cv_lib_dl_dlopen+set}" = set; then 17664if test "${ac_cv_lib_dl_dlopen+set}" = set; then
18337 $as_echo_n "(cached) " >&6 17665 echo $ECHO_N "(cached) $ECHO_C" >&6
18338else 17666else
18339 ac_check_lib_save_LIBS=$LIBS 17667 ac_check_lib_save_LIBS=$LIBS
18340LIBS="-ldl $LIBS" 17668LIBS="-ldl $LIBS"
@@ -18366,36 +17694,32 @@ case "(($ac_try" in
18366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18367 *) ac_try_echo=$ac_try;; 17695 *) ac_try_echo=$ac_try;;
18368esac 17696esac
18369eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18370$as_echo "$ac_try_echo") >&5
18371 (eval "$ac_link") 2>conftest.er1 17698 (eval "$ac_link") 2>conftest.er1
18372 ac_status=$? 17699 ac_status=$?
18373 grep -v '^ *+' conftest.er1 >conftest.err 17700 grep -v '^ *+' conftest.er1 >conftest.err
18374 rm -f conftest.er1 17701 rm -f conftest.er1
18375 cat conftest.err >&5 17702 cat conftest.err >&5
18376 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18377 (exit $ac_status); } && { 17704 (exit $ac_status); } && {
18378 test -z "$ac_c_werror_flag" || 17705 test -z "$ac_c_werror_flag" ||
18379 test ! -s conftest.err 17706 test ! -s conftest.err
18380 } && test -s conftest$ac_exeext && { 17707 } && test -s conftest$ac_exeext &&
18381 test "$cross_compiling" = yes || 17708 $as_test_x conftest$ac_exeext; then
18382 $as_test_x conftest$ac_exeext
18383 }; then
18384 ac_cv_lib_dl_dlopen=yes 17709 ac_cv_lib_dl_dlopen=yes
18385else 17710else
18386 $as_echo "$as_me: failed program was:" >&5 17711 echo "$as_me: failed program was:" >&5
18387sed 's/^/| /' conftest.$ac_ext >&5 17712sed 's/^/| /' conftest.$ac_ext >&5
18388 17713
18389 ac_cv_lib_dl_dlopen=no 17714 ac_cv_lib_dl_dlopen=no
18390fi 17715fi
18391 17716
18392rm -rf conftest.dSYM
18393rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17717rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18394 conftest$ac_exeext conftest.$ac_ext 17718 conftest$ac_exeext conftest.$ac_ext
18395LIBS=$ac_check_lib_save_LIBS 17719LIBS=$ac_check_lib_save_LIBS
18396fi 17720fi
18397{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 17721{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
18398$as_echo "$ac_cv_lib_dl_dlopen" >&6; } 17722echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
18399if test $ac_cv_lib_dl_dlopen = yes; then 17723if test $ac_cv_lib_dl_dlopen = yes; then
18400 cat >>confdefs.h <<_ACEOF 17724 cat >>confdefs.h <<_ACEOF
18401#define HAVE_LIBDL 1 17725#define HAVE_LIBDL 1
@@ -18406,10 +17730,10 @@ _ACEOF
18406fi 17730fi
18407 17731
18408 17732
18409{ $as_echo "$as_me:$LINENO: checking for pam_set_item in -lpam" >&5 17733{ echo "$as_me:$LINENO: checking for pam_set_item in -lpam" >&5
18410$as_echo_n "checking for pam_set_item in -lpam... " >&6; } 17734echo $ECHO_N "checking for pam_set_item in -lpam... $ECHO_C" >&6; }
18411if test "${ac_cv_lib_pam_pam_set_item+set}" = set; then 17735if test "${ac_cv_lib_pam_pam_set_item+set}" = set; then
18412 $as_echo_n "(cached) " >&6 17736 echo $ECHO_N "(cached) $ECHO_C" >&6
18413else 17737else
18414 ac_check_lib_save_LIBS=$LIBS 17738 ac_check_lib_save_LIBS=$LIBS
18415LIBS="-lpam $LIBS" 17739LIBS="-lpam $LIBS"
@@ -18441,36 +17765,32 @@ case "(($ac_try" in
18441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18442 *) ac_try_echo=$ac_try;; 17766 *) ac_try_echo=$ac_try;;
18443esac 17767esac
18444eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18445$as_echo "$ac_try_echo") >&5
18446 (eval "$ac_link") 2>conftest.er1 17769 (eval "$ac_link") 2>conftest.er1
18447 ac_status=$? 17770 ac_status=$?
18448 grep -v '^ *+' conftest.er1 >conftest.err 17771 grep -v '^ *+' conftest.er1 >conftest.err
18449 rm -f conftest.er1 17772 rm -f conftest.er1
18450 cat conftest.err >&5 17773 cat conftest.err >&5
18451 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18452 (exit $ac_status); } && { 17775 (exit $ac_status); } && {
18453 test -z "$ac_c_werror_flag" || 17776 test -z "$ac_c_werror_flag" ||
18454 test ! -s conftest.err 17777 test ! -s conftest.err
18455 } && test -s conftest$ac_exeext && { 17778 } && test -s conftest$ac_exeext &&
18456 test "$cross_compiling" = yes || 17779 $as_test_x conftest$ac_exeext; then
18457 $as_test_x conftest$ac_exeext
18458 }; then
18459 ac_cv_lib_pam_pam_set_item=yes 17780 ac_cv_lib_pam_pam_set_item=yes
18460else 17781else
18461 $as_echo "$as_me: failed program was:" >&5 17782 echo "$as_me: failed program was:" >&5
18462sed 's/^/| /' conftest.$ac_ext >&5 17783sed 's/^/| /' conftest.$ac_ext >&5
18463 17784
18464 ac_cv_lib_pam_pam_set_item=no 17785 ac_cv_lib_pam_pam_set_item=no
18465fi 17786fi
18466 17787
18467rm -rf conftest.dSYM
18468rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17788rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18469 conftest$ac_exeext conftest.$ac_ext 17789 conftest$ac_exeext conftest.$ac_ext
18470LIBS=$ac_check_lib_save_LIBS 17790LIBS=$ac_check_lib_save_LIBS
18471fi 17791fi
18472{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_set_item" >&5 17792{ echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_set_item" >&5
18473$as_echo "$ac_cv_lib_pam_pam_set_item" >&6; } 17793echo "${ECHO_T}$ac_cv_lib_pam_pam_set_item" >&6; }
18474if test $ac_cv_lib_pam_pam_set_item = yes; then 17794if test $ac_cv_lib_pam_pam_set_item = yes; then
18475 cat >>confdefs.h <<_ACEOF 17795 cat >>confdefs.h <<_ACEOF
18476#define HAVE_LIBPAM 1 17796#define HAVE_LIBPAM 1
@@ -18479,19 +17799,19 @@ _ACEOF
18479 LIBS="-lpam $LIBS" 17799 LIBS="-lpam $LIBS"
18480 17800
18481else 17801else
18482 { { $as_echo "$as_me:$LINENO: error: *** libpam missing" >&5 17802 { { echo "$as_me:$LINENO: error: *** libpam missing" >&5
18483$as_echo "$as_me: error: *** libpam missing" >&2;} 17803echo "$as_me: error: *** libpam missing" >&2;}
18484 { (exit 1); exit 1; }; } 17804 { (exit 1); exit 1; }; }
18485fi 17805fi
18486 17806
18487 17807
18488for ac_func in pam_getenvlist 17808for ac_func in pam_getenvlist
18489do 17809do
18490as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 17810as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18491{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 17811{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18492$as_echo_n "checking for $ac_func... " >&6; } 17812echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18493if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 17813if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18494 $as_echo_n "(cached) " >&6 17814 echo $ECHO_N "(cached) $ECHO_C" >&6
18495else 17815else
18496 cat >conftest.$ac_ext <<_ACEOF 17816 cat >conftest.$ac_ext <<_ACEOF
18497/* confdefs.h. */ 17817/* confdefs.h. */
@@ -18544,41 +17864,35 @@ case "(($ac_try" in
18544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18545 *) ac_try_echo=$ac_try;; 17865 *) ac_try_echo=$ac_try;;
18546esac 17866esac
18547eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18548$as_echo "$ac_try_echo") >&5
18549 (eval "$ac_link") 2>conftest.er1 17868 (eval "$ac_link") 2>conftest.er1
18550 ac_status=$? 17869 ac_status=$?
18551 grep -v '^ *+' conftest.er1 >conftest.err 17870 grep -v '^ *+' conftest.er1 >conftest.err
18552 rm -f conftest.er1 17871 rm -f conftest.er1
18553 cat conftest.err >&5 17872 cat conftest.err >&5
18554 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18555 (exit $ac_status); } && { 17874 (exit $ac_status); } && {
18556 test -z "$ac_c_werror_flag" || 17875 test -z "$ac_c_werror_flag" ||
18557 test ! -s conftest.err 17876 test ! -s conftest.err
18558 } && test -s conftest$ac_exeext && { 17877 } && test -s conftest$ac_exeext &&
18559 test "$cross_compiling" = yes || 17878 $as_test_x conftest$ac_exeext; then
18560 $as_test_x conftest$ac_exeext
18561 }; then
18562 eval "$as_ac_var=yes" 17879 eval "$as_ac_var=yes"
18563else 17880else
18564 $as_echo "$as_me: failed program was:" >&5 17881 echo "$as_me: failed program was:" >&5
18565sed 's/^/| /' conftest.$ac_ext >&5 17882sed 's/^/| /' conftest.$ac_ext >&5
18566 17883
18567 eval "$as_ac_var=no" 17884 eval "$as_ac_var=no"
18568fi 17885fi
18569 17886
18570rm -rf conftest.dSYM
18571rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17887rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18572 conftest$ac_exeext conftest.$ac_ext 17888 conftest$ac_exeext conftest.$ac_ext
18573fi 17889fi
18574ac_res=`eval 'as_val=${'$as_ac_var'} 17890ac_res=`eval echo '${'$as_ac_var'}'`
18575 $as_echo "$as_val"'` 17891 { echo "$as_me:$LINENO: result: $ac_res" >&5
18576 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 17892echo "${ECHO_T}$ac_res" >&6; }
18577$as_echo "$ac_res" >&6; } 17893if test `eval echo '${'$as_ac_var'}'` = yes; then
18578if test `eval 'as_val=${'$as_ac_var'}
18579 $as_echo "$as_val"'` = yes; then
18580 cat >>confdefs.h <<_ACEOF 17894 cat >>confdefs.h <<_ACEOF
18581#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 17895#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18582_ACEOF 17896_ACEOF
18583 17897
18584fi 17898fi
@@ -18587,11 +17901,11 @@ done
18587 17901
18588for ac_func in pam_putenv 17902for ac_func in pam_putenv
18589do 17903do
18590as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 17904as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18591{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 17905{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18592$as_echo_n "checking for $ac_func... " >&6; } 17906echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18593if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 17907if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18594 $as_echo_n "(cached) " >&6 17908 echo $ECHO_N "(cached) $ECHO_C" >&6
18595else 17909else
18596 cat >conftest.$ac_ext <<_ACEOF 17910 cat >conftest.$ac_ext <<_ACEOF
18597/* confdefs.h. */ 17911/* confdefs.h. */
@@ -18644,41 +17958,35 @@ case "(($ac_try" in
18644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18645 *) ac_try_echo=$ac_try;; 17959 *) ac_try_echo=$ac_try;;
18646esac 17960esac
18647eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18648$as_echo "$ac_try_echo") >&5
18649 (eval "$ac_link") 2>conftest.er1 17962 (eval "$ac_link") 2>conftest.er1
18650 ac_status=$? 17963 ac_status=$?
18651 grep -v '^ *+' conftest.er1 >conftest.err 17964 grep -v '^ *+' conftest.er1 >conftest.err
18652 rm -f conftest.er1 17965 rm -f conftest.er1
18653 cat conftest.err >&5 17966 cat conftest.err >&5
18654 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18655 (exit $ac_status); } && { 17968 (exit $ac_status); } && {
18656 test -z "$ac_c_werror_flag" || 17969 test -z "$ac_c_werror_flag" ||
18657 test ! -s conftest.err 17970 test ! -s conftest.err
18658 } && test -s conftest$ac_exeext && { 17971 } && test -s conftest$ac_exeext &&
18659 test "$cross_compiling" = yes || 17972 $as_test_x conftest$ac_exeext; then
18660 $as_test_x conftest$ac_exeext
18661 }; then
18662 eval "$as_ac_var=yes" 17973 eval "$as_ac_var=yes"
18663else 17974else
18664 $as_echo "$as_me: failed program was:" >&5 17975 echo "$as_me: failed program was:" >&5
18665sed 's/^/| /' conftest.$ac_ext >&5 17976sed 's/^/| /' conftest.$ac_ext >&5
18666 17977
18667 eval "$as_ac_var=no" 17978 eval "$as_ac_var=no"
18668fi 17979fi
18669 17980
18670rm -rf conftest.dSYM
18671rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17981rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18672 conftest$ac_exeext conftest.$ac_ext 17982 conftest$ac_exeext conftest.$ac_ext
18673fi 17983fi
18674ac_res=`eval 'as_val=${'$as_ac_var'} 17984ac_res=`eval echo '${'$as_ac_var'}'`
18675 $as_echo "$as_val"'` 17985 { echo "$as_me:$LINENO: result: $ac_res" >&5
18676 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 17986echo "${ECHO_T}$ac_res" >&6; }
18677$as_echo "$ac_res" >&6; } 17987if test `eval echo '${'$as_ac_var'}'` = yes; then
18678if test `eval 'as_val=${'$as_ac_var'}
18679 $as_echo "$as_val"'` = yes; then
18680 cat >>confdefs.h <<_ACEOF 17988 cat >>confdefs.h <<_ACEOF
18681#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 17989#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18682_ACEOF 17990_ACEOF
18683 17991
18684fi 17992fi
@@ -18714,8 +18022,8 @@ fi
18714# Check for older PAM 18022# Check for older PAM
18715if test "x$PAM_MSG" = "xyes" ; then 18023if test "x$PAM_MSG" = "xyes" ; then
18716 # Check PAM strerror arguments (old PAM) 18024 # Check PAM strerror arguments (old PAM)
18717 { $as_echo "$as_me:$LINENO: checking whether pam_strerror takes only one argument" >&5 18025 { echo "$as_me:$LINENO: checking whether pam_strerror takes only one argument" >&5
18718$as_echo_n "checking whether pam_strerror takes only one argument... " >&6; } 18026echo $ECHO_N "checking whether pam_strerror takes only one argument... $ECHO_C" >&6; }
18719 cat >conftest.$ac_ext <<_ACEOF 18027 cat >conftest.$ac_ext <<_ACEOF
18720/* confdefs.h. */ 18028/* confdefs.h. */
18721_ACEOF 18029_ACEOF
@@ -18744,22 +18052,21 @@ case "(($ac_try" in
18744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 18052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18745 *) ac_try_echo=$ac_try;; 18053 *) ac_try_echo=$ac_try;;
18746esac 18054esac
18747eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 18055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18748$as_echo "$ac_try_echo") >&5
18749 (eval "$ac_compile") 2>conftest.er1 18056 (eval "$ac_compile") 2>conftest.er1
18750 ac_status=$? 18057 ac_status=$?
18751 grep -v '^ *+' conftest.er1 >conftest.err 18058 grep -v '^ *+' conftest.er1 >conftest.err
18752 rm -f conftest.er1 18059 rm -f conftest.er1
18753 cat conftest.err >&5 18060 cat conftest.err >&5
18754 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 18061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18755 (exit $ac_status); } && { 18062 (exit $ac_status); } && {
18756 test -z "$ac_c_werror_flag" || 18063 test -z "$ac_c_werror_flag" ||
18757 test ! -s conftest.err 18064 test ! -s conftest.err
18758 } && test -s conftest.$ac_objext; then 18065 } && test -s conftest.$ac_objext; then
18759 { $as_echo "$as_me:$LINENO: result: no" >&5 18066 { echo "$as_me:$LINENO: result: no" >&5
18760$as_echo "no" >&6; } 18067echo "${ECHO_T}no" >&6; }
18761else 18068else
18762 $as_echo "$as_me: failed program was:" >&5 18069 echo "$as_me: failed program was:" >&5
18763sed 's/^/| /' conftest.$ac_ext >&5 18070sed 's/^/| /' conftest.$ac_ext >&5
18764 18071
18765 18072
@@ -18768,8 +18075,8 @@ cat >>confdefs.h <<\_ACEOF
18768#define HAVE_OLD_PAM 1 18075#define HAVE_OLD_PAM 1
18769_ACEOF 18076_ACEOF
18770 18077
18771 { $as_echo "$as_me:$LINENO: result: yes" >&5 18078 { echo "$as_me:$LINENO: result: yes" >&5
18772$as_echo "yes" >&6; } 18079echo "${ECHO_T}yes" >&6; }
18773 PAM_MSG="yes (old library)" 18080 PAM_MSG="yes (old library)"
18774 18081
18775 18082
@@ -18787,8 +18094,8 @@ if test "${with_rand_helper+set}" = set; then
18787 # Force use of OpenSSL's internal RNG, even if 18094 # Force use of OpenSSL's internal RNG, even if
18788 # the previous test showed it to be unseeded. 18095 # the previous test showed it to be unseeded.
18789 if test -z "$OPENSSL_SEEDS_ITSELF" ; then 18096 if test -z "$OPENSSL_SEEDS_ITSELF" ; then
18790 { $as_echo "$as_me:$LINENO: WARNING: *** Forcing use of OpenSSL's non-self-seeding PRNG" >&5 18097 { echo "$as_me:$LINENO: WARNING: *** Forcing use of OpenSSL's non-self-seeding PRNG" >&5
18791$as_echo "$as_me: WARNING: *** Forcing use of OpenSSL's non-self-seeding PRNG" >&2;} 18098echo "$as_me: WARNING: *** Forcing use of OpenSSL's non-self-seeding PRNG" >&2;}
18792 OPENSSL_SEEDS_ITSELF=yes 18099 OPENSSL_SEEDS_ITSELF=yes
18793 USE_RAND_HELPER="" 18100 USE_RAND_HELPER=""
18794 fi 18101 fi
@@ -18830,8 +18137,8 @@ if test "${with_prngd_port+set}" = set; then
18830 [0-9]*) 18137 [0-9]*)
18831 ;; 18138 ;;
18832 *) 18139 *)
18833 { { $as_echo "$as_me:$LINENO: error: You must specify a numeric port number for --with-prngd-port" >&5 18140 { { echo "$as_me:$LINENO: error: You must specify a numeric port number for --with-prngd-port" >&5
18834$as_echo "$as_me: error: You must specify a numeric port number for --with-prngd-port" >&2;} 18141echo "$as_me: error: You must specify a numeric port number for --with-prngd-port" >&2;}
18835 { (exit 1); exit 1; }; } 18142 { (exit 1); exit 1; }; }
18836 ;; 18143 ;;
18837 esac 18144 esac
@@ -18863,21 +18170,21 @@ if test "${with_prngd_socket+set}" = set; then
18863 /*) 18170 /*)
18864 ;; 18171 ;;
18865 *) 18172 *)
18866 { { $as_echo "$as_me:$LINENO: error: You must specify an absolute path to the entropy socket" >&5 18173 { { echo "$as_me:$LINENO: error: You must specify an absolute path to the entropy socket" >&5
18867$as_echo "$as_me: error: You must specify an absolute path to the entropy socket" >&2;} 18174echo "$as_me: error: You must specify an absolute path to the entropy socket" >&2;}
18868 { (exit 1); exit 1; }; } 18175 { (exit 1); exit 1; }; }
18869 ;; 18176 ;;
18870 esac 18177 esac
18871 18178
18872 if test ! -z "$withval" ; then 18179 if test ! -z "$withval" ; then
18873 if test ! -z "$PRNGD_PORT" ; then 18180 if test ! -z "$PRNGD_PORT" ; then
18874 { { $as_echo "$as_me:$LINENO: error: You may not specify both a PRNGD/EGD port and socket" >&5 18181 { { echo "$as_me:$LINENO: error: You may not specify both a PRNGD/EGD port and socket" >&5
18875$as_echo "$as_me: error: You may not specify both a PRNGD/EGD port and socket" >&2;} 18182echo "$as_me: error: You may not specify both a PRNGD/EGD port and socket" >&2;}
18876 { (exit 1); exit 1; }; } 18183 { (exit 1); exit 1; }; }
18877 fi 18184 fi
18878 if test ! -r "$withval" ; then 18185 if test ! -r "$withval" ; then
18879 { $as_echo "$as_me:$LINENO: WARNING: Entropy socket is not readable" >&5 18186 { echo "$as_me:$LINENO: WARNING: Entropy socket is not readable" >&5
18880$as_echo "$as_me: WARNING: Entropy socket is not readable" >&2;} 18187echo "$as_me: WARNING: Entropy socket is not readable" >&2;}
18881 fi 18188 fi
18882 PRNGD_SOCKET="$withval" 18189 PRNGD_SOCKET="$withval"
18883 18190
@@ -18891,8 +18198,8 @@ else
18891 18198
18892 # Check for existing socket only if we don't have a random device already 18199 # Check for existing socket only if we don't have a random device already
18893 if test "$USE_RAND_HELPER" = yes ; then 18200 if test "$USE_RAND_HELPER" = yes ; then
18894 { $as_echo "$as_me:$LINENO: checking for PRNGD/EGD socket" >&5 18201 { echo "$as_me:$LINENO: checking for PRNGD/EGD socket" >&5
18895$as_echo_n "checking for PRNGD/EGD socket... " >&6; } 18202echo $ECHO_N "checking for PRNGD/EGD socket... $ECHO_C" >&6; }
18896 # Insert other locations here 18203 # Insert other locations here
18897 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do 18204 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
18898 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then 18205 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
@@ -18905,11 +18212,11 @@ _ACEOF
18905 fi 18212 fi
18906 done 18213 done
18907 if test ! -z "$PRNGD_SOCKET" ; then 18214 if test ! -z "$PRNGD_SOCKET" ; then
18908 { $as_echo "$as_me:$LINENO: result: $PRNGD_SOCKET" >&5 18215 { echo "$as_me:$LINENO: result: $PRNGD_SOCKET" >&5
18909$as_echo "$PRNGD_SOCKET" >&6; } 18216echo "${ECHO_T}$PRNGD_SOCKET" >&6; }
18910 else 18217 else
18911 { $as_echo "$as_me:$LINENO: result: not found" >&5 18218 { echo "$as_me:$LINENO: result: not found" >&5
18912$as_echo "not found" >&6; } 18219echo "${ECHO_T}not found" >&6; }
18913 fi 18220 fi
18914 fi 18221 fi
18915 18222
@@ -18975,10 +18282,10 @@ PATH=$PATH:/etc:$OPATH
18975 18282
18976 # Extract the first word of "ls", so it can be a program name with args. 18283 # Extract the first word of "ls", so it can be a program name with args.
18977set dummy ls; ac_word=$2 18284set dummy ls; ac_word=$2
18978{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18285{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18979$as_echo_n "checking for $ac_word... " >&6; } 18286echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
18980if test "${ac_cv_path_PROG_LS+set}" = set; then 18287if test "${ac_cv_path_PROG_LS+set}" = set; then
18981 $as_echo_n "(cached) " >&6 18288 echo $ECHO_N "(cached) $ECHO_C" >&6
18982else 18289else
18983 case $PROG_LS in 18290 case $PROG_LS in
18984 [\\/]* | ?:[\\/]*) 18291 [\\/]* | ?:[\\/]*)
@@ -18993,7 +18300,7 @@ do
18993 for ac_exec_ext in '' $ac_executable_extensions; do 18300 for ac_exec_ext in '' $ac_executable_extensions; do
18994 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18301 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18995 ac_cv_path_PROG_LS="$as_dir/$ac_word$ac_exec_ext" 18302 ac_cv_path_PROG_LS="$as_dir/$ac_word$ac_exec_ext"
18996 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 18303 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18997 break 2 18304 break 2
18998 fi 18305 fi
18999done 18306done
@@ -19005,11 +18312,11 @@ esac
19005fi 18312fi
19006PROG_LS=$ac_cv_path_PROG_LS 18313PROG_LS=$ac_cv_path_PROG_LS
19007if test -n "$PROG_LS"; then 18314if test -n "$PROG_LS"; then
19008 { $as_echo "$as_me:$LINENO: result: $PROG_LS" >&5 18315 { echo "$as_me:$LINENO: result: $PROG_LS" >&5
19009$as_echo "$PROG_LS" >&6; } 18316echo "${ECHO_T}$PROG_LS" >&6; }
19010else 18317else
19011 { $as_echo "$as_me:$LINENO: result: no" >&5 18318 { echo "$as_me:$LINENO: result: no" >&5
19012$as_echo "no" >&6; } 18319echo "${ECHO_T}no" >&6; }
19013fi 18320fi
19014 18321
19015 18322
@@ -19021,10 +18328,10 @@ fi
19021 18328
19022 # Extract the first word of "netstat", so it can be a program name with args. 18329 # Extract the first word of "netstat", so it can be a program name with args.
19023set dummy netstat; ac_word=$2 18330set dummy netstat; ac_word=$2
19024{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18331{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19025$as_echo_n "checking for $ac_word... " >&6; } 18332echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19026if test "${ac_cv_path_PROG_NETSTAT+set}" = set; then 18333if test "${ac_cv_path_PROG_NETSTAT+set}" = set; then
19027 $as_echo_n "(cached) " >&6 18334 echo $ECHO_N "(cached) $ECHO_C" >&6
19028else 18335else
19029 case $PROG_NETSTAT in 18336 case $PROG_NETSTAT in
19030 [\\/]* | ?:[\\/]*) 18337 [\\/]* | ?:[\\/]*)
@@ -19039,7 +18346,7 @@ do
19039 for ac_exec_ext in '' $ac_executable_extensions; do 18346 for ac_exec_ext in '' $ac_executable_extensions; do
19040 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18347 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19041 ac_cv_path_PROG_NETSTAT="$as_dir/$ac_word$ac_exec_ext" 18348 ac_cv_path_PROG_NETSTAT="$as_dir/$ac_word$ac_exec_ext"
19042 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 18349 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19043 break 2 18350 break 2
19044 fi 18351 fi
19045done 18352done
@@ -19051,11 +18358,11 @@ esac
19051fi 18358fi
19052PROG_NETSTAT=$ac_cv_path_PROG_NETSTAT 18359PROG_NETSTAT=$ac_cv_path_PROG_NETSTAT
19053if test -n "$PROG_NETSTAT"; then 18360if test -n "$PROG_NETSTAT"; then
19054 { $as_echo "$as_me:$LINENO: result: $PROG_NETSTAT" >&5 18361 { echo "$as_me:$LINENO: result: $PROG_NETSTAT" >&5
19055$as_echo "$PROG_NETSTAT" >&6; } 18362echo "${ECHO_T}$PROG_NETSTAT" >&6; }
19056else 18363else
19057 { $as_echo "$as_me:$LINENO: result: no" >&5 18364 { echo "$as_me:$LINENO: result: no" >&5
19058$as_echo "no" >&6; } 18365echo "${ECHO_T}no" >&6; }
19059fi 18366fi
19060 18367
19061 18368
@@ -19067,10 +18374,10 @@ fi
19067 18374
19068 # Extract the first word of "arp", so it can be a program name with args. 18375 # Extract the first word of "arp", so it can be a program name with args.
19069set dummy arp; ac_word=$2 18376set dummy arp; ac_word=$2
19070{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18377{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19071$as_echo_n "checking for $ac_word... " >&6; } 18378echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19072if test "${ac_cv_path_PROG_ARP+set}" = set; then 18379if test "${ac_cv_path_PROG_ARP+set}" = set; then
19073 $as_echo_n "(cached) " >&6 18380 echo $ECHO_N "(cached) $ECHO_C" >&6
19074else 18381else
19075 case $PROG_ARP in 18382 case $PROG_ARP in
19076 [\\/]* | ?:[\\/]*) 18383 [\\/]* | ?:[\\/]*)
@@ -19085,7 +18392,7 @@ do
19085 for ac_exec_ext in '' $ac_executable_extensions; do 18392 for ac_exec_ext in '' $ac_executable_extensions; do
19086 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18393 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19087 ac_cv_path_PROG_ARP="$as_dir/$ac_word$ac_exec_ext" 18394 ac_cv_path_PROG_ARP="$as_dir/$ac_word$ac_exec_ext"
19088 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 18395 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19089 break 2 18396 break 2
19090 fi 18397 fi
19091done 18398done
@@ -19097,11 +18404,11 @@ esac
19097fi 18404fi
19098PROG_ARP=$ac_cv_path_PROG_ARP 18405PROG_ARP=$ac_cv_path_PROG_ARP
19099if test -n "$PROG_ARP"; then 18406if test -n "$PROG_ARP"; then
19100 { $as_echo "$as_me:$LINENO: result: $PROG_ARP" >&5 18407 { echo "$as_me:$LINENO: result: $PROG_ARP" >&5
19101$as_echo "$PROG_ARP" >&6; } 18408echo "${ECHO_T}$PROG_ARP" >&6; }
19102else 18409else
19103 { $as_echo "$as_me:$LINENO: result: no" >&5 18410 { echo "$as_me:$LINENO: result: no" >&5
19104$as_echo "no" >&6; } 18411echo "${ECHO_T}no" >&6; }
19105fi 18412fi
19106 18413
19107 18414
@@ -19113,10 +18420,10 @@ fi
19113 18420
19114 # Extract the first word of "ifconfig", so it can be a program name with args. 18421 # Extract the first word of "ifconfig", so it can be a program name with args.
19115set dummy ifconfig; ac_word=$2 18422set dummy ifconfig; ac_word=$2
19116{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18423{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19117$as_echo_n "checking for $ac_word... " >&6; } 18424echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19118if test "${ac_cv_path_PROG_IFCONFIG+set}" = set; then 18425if test "${ac_cv_path_PROG_IFCONFIG+set}" = set; then
19119 $as_echo_n "(cached) " >&6 18426 echo $ECHO_N "(cached) $ECHO_C" >&6
19120else 18427else
19121 case $PROG_IFCONFIG in 18428 case $PROG_IFCONFIG in
19122 [\\/]* | ?:[\\/]*) 18429 [\\/]* | ?:[\\/]*)
@@ -19131,7 +18438,7 @@ do
19131 for ac_exec_ext in '' $ac_executable_extensions; do 18438 for ac_exec_ext in '' $ac_executable_extensions; do
19132 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18439 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19133 ac_cv_path_PROG_IFCONFIG="$as_dir/$ac_word$ac_exec_ext" 18440 ac_cv_path_PROG_IFCONFIG="$as_dir/$ac_word$ac_exec_ext"
19134 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 18441 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19135 break 2 18442 break 2
19136 fi 18443 fi
19137done 18444done
@@ -19143,11 +18450,11 @@ esac
19143fi 18450fi
19144PROG_IFCONFIG=$ac_cv_path_PROG_IFCONFIG 18451PROG_IFCONFIG=$ac_cv_path_PROG_IFCONFIG
19145if test -n "$PROG_IFCONFIG"; then 18452if test -n "$PROG_IFCONFIG"; then
19146 { $as_echo "$as_me:$LINENO: result: $PROG_IFCONFIG" >&5 18453 { echo "$as_me:$LINENO: result: $PROG_IFCONFIG" >&5
19147$as_echo "$PROG_IFCONFIG" >&6; } 18454echo "${ECHO_T}$PROG_IFCONFIG" >&6; }
19148else 18455else
19149 { $as_echo "$as_me:$LINENO: result: no" >&5 18456 { echo "$as_me:$LINENO: result: no" >&5
19150$as_echo "no" >&6; } 18457echo "${ECHO_T}no" >&6; }
19151fi 18458fi
19152 18459
19153 18460
@@ -19159,10 +18466,10 @@ fi
19159 18466
19160 # Extract the first word of "jstat", so it can be a program name with args. 18467 # Extract the first word of "jstat", so it can be a program name with args.
19161set dummy jstat; ac_word=$2 18468set dummy jstat; ac_word=$2
19162{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18469{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19163$as_echo_n "checking for $ac_word... " >&6; } 18470echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19164if test "${ac_cv_path_PROG_JSTAT+set}" = set; then 18471if test "${ac_cv_path_PROG_JSTAT+set}" = set; then
19165 $as_echo_n "(cached) " >&6 18472 echo $ECHO_N "(cached) $ECHO_C" >&6
19166else 18473else
19167 case $PROG_JSTAT in 18474 case $PROG_JSTAT in
19168 [\\/]* | ?:[\\/]*) 18475 [\\/]* | ?:[\\/]*)
@@ -19177,7 +18484,7 @@ do
19177 for ac_exec_ext in '' $ac_executable_extensions; do 18484 for ac_exec_ext in '' $ac_executable_extensions; do
19178 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18485 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19179 ac_cv_path_PROG_JSTAT="$as_dir/$ac_word$ac_exec_ext" 18486 ac_cv_path_PROG_JSTAT="$as_dir/$ac_word$ac_exec_ext"
19180 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 18487 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19181 break 2 18488 break 2
19182 fi 18489 fi
19183done 18490done
@@ -19189,11 +18496,11 @@ esac
19189fi 18496fi
19190PROG_JSTAT=$ac_cv_path_PROG_JSTAT 18497PROG_JSTAT=$ac_cv_path_PROG_JSTAT
19191if test -n "$PROG_JSTAT"; then 18498if test -n "$PROG_JSTAT"; then
19192 { $as_echo "$as_me:$LINENO: result: $PROG_JSTAT" >&5 18499 { echo "$as_me:$LINENO: result: $PROG_JSTAT" >&5
19193$as_echo "$PROG_JSTAT" >&6; } 18500echo "${ECHO_T}$PROG_JSTAT" >&6; }
19194else 18501else
19195 { $as_echo "$as_me:$LINENO: result: no" >&5 18502 { echo "$as_me:$LINENO: result: no" >&5
19196$as_echo "no" >&6; } 18503echo "${ECHO_T}no" >&6; }
19197fi 18504fi
19198 18505
19199 18506
@@ -19205,10 +18512,10 @@ fi
19205 18512
19206 # Extract the first word of "ps", so it can be a program name with args. 18513 # Extract the first word of "ps", so it can be a program name with args.
19207set dummy ps; ac_word=$2 18514set dummy ps; ac_word=$2
19208{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18515{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19209$as_echo_n "checking for $ac_word... " >&6; } 18516echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19210if test "${ac_cv_path_PROG_PS+set}" = set; then 18517if test "${ac_cv_path_PROG_PS+set}" = set; then
19211 $as_echo_n "(cached) " >&6 18518 echo $ECHO_N "(cached) $ECHO_C" >&6
19212else 18519else
19213 case $PROG_PS in 18520 case $PROG_PS in
19214 [\\/]* | ?:[\\/]*) 18521 [\\/]* | ?:[\\/]*)
@@ -19223,7 +18530,7 @@ do
19223 for ac_exec_ext in '' $ac_executable_extensions; do 18530 for ac_exec_ext in '' $ac_executable_extensions; do
19224 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18531 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19225 ac_cv_path_PROG_PS="$as_dir/$ac_word$ac_exec_ext" 18532 ac_cv_path_PROG_PS="$as_dir/$ac_word$ac_exec_ext"
19226 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 18533 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19227 break 2 18534 break 2
19228 fi 18535 fi
19229done 18536done
@@ -19235,11 +18542,11 @@ esac
19235fi 18542fi
19236PROG_PS=$ac_cv_path_PROG_PS 18543PROG_PS=$ac_cv_path_PROG_PS
19237if test -n "$PROG_PS"; then 18544if test -n "$PROG_PS"; then
19238 { $as_echo "$as_me:$LINENO: result: $PROG_PS" >&5 18545 { echo "$as_me:$LINENO: result: $PROG_PS" >&5
19239$as_echo "$PROG_PS" >&6; } 18546echo "${ECHO_T}$PROG_PS" >&6; }
19240else 18547else
19241 { $as_echo "$as_me:$LINENO: result: no" >&5 18548 { echo "$as_me:$LINENO: result: no" >&5
19242$as_echo "no" >&6; } 18549echo "${ECHO_T}no" >&6; }
19243fi 18550fi
19244 18551
19245 18552
@@ -19251,10 +18558,10 @@ fi
19251 18558
19252 # Extract the first word of "sar", so it can be a program name with args. 18559 # Extract the first word of "sar", so it can be a program name with args.
19253set dummy sar; ac_word=$2 18560set dummy sar; ac_word=$2
19254{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18561{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19255$as_echo_n "checking for $ac_word... " >&6; } 18562echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19256if test "${ac_cv_path_PROG_SAR+set}" = set; then 18563if test "${ac_cv_path_PROG_SAR+set}" = set; then
19257 $as_echo_n "(cached) " >&6 18564 echo $ECHO_N "(cached) $ECHO_C" >&6
19258else 18565else
19259 case $PROG_SAR in 18566 case $PROG_SAR in
19260 [\\/]* | ?:[\\/]*) 18567 [\\/]* | ?:[\\/]*)
@@ -19269,7 +18576,7 @@ do
19269 for ac_exec_ext in '' $ac_executable_extensions; do 18576 for ac_exec_ext in '' $ac_executable_extensions; do
19270 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18577 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19271 ac_cv_path_PROG_SAR="$as_dir/$ac_word$ac_exec_ext" 18578 ac_cv_path_PROG_SAR="$as_dir/$ac_word$ac_exec_ext"
19272 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 18579 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19273 break 2 18580 break 2
19274 fi 18581 fi
19275done 18582done
@@ -19281,11 +18588,11 @@ esac
19281fi 18588fi
19282PROG_SAR=$ac_cv_path_PROG_SAR 18589PROG_SAR=$ac_cv_path_PROG_SAR
19283if test -n "$PROG_SAR"; then 18590if test -n "$PROG_SAR"; then
19284 { $as_echo "$as_me:$LINENO: result: $PROG_SAR" >&5 18591 { echo "$as_me:$LINENO: result: $PROG_SAR" >&5
19285$as_echo "$PROG_SAR" >&6; } 18592echo "${ECHO_T}$PROG_SAR" >&6; }
19286else 18593else
19287 { $as_echo "$as_me:$LINENO: result: no" >&5 18594 { echo "$as_me:$LINENO: result: no" >&5
19288$as_echo "no" >&6; } 18595echo "${ECHO_T}no" >&6; }
19289fi 18596fi
19290 18597
19291 18598
@@ -19297,10 +18604,10 @@ fi
19297 18604
19298 # Extract the first word of "w", so it can be a program name with args. 18605 # Extract the first word of "w", so it can be a program name with args.
19299set dummy w; ac_word=$2 18606set dummy w; ac_word=$2
19300{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18607{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19301$as_echo_n "checking for $ac_word... " >&6; } 18608echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19302if test "${ac_cv_path_PROG_W+set}" = set; then 18609if test "${ac_cv_path_PROG_W+set}" = set; then
19303 $as_echo_n "(cached) " >&6 18610 echo $ECHO_N "(cached) $ECHO_C" >&6
19304else 18611else
19305 case $PROG_W in 18612 case $PROG_W in
19306 [\\/]* | ?:[\\/]*) 18613 [\\/]* | ?:[\\/]*)
@@ -19315,7 +18622,7 @@ do
19315 for ac_exec_ext in '' $ac_executable_extensions; do 18622 for ac_exec_ext in '' $ac_executable_extensions; do
19316 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18623 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19317 ac_cv_path_PROG_W="$as_dir/$ac_word$ac_exec_ext" 18624 ac_cv_path_PROG_W="$as_dir/$ac_word$ac_exec_ext"
19318 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 18625 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19319 break 2 18626 break 2
19320 fi 18627 fi
19321done 18628done
@@ -19327,11 +18634,11 @@ esac
19327fi 18634fi
19328PROG_W=$ac_cv_path_PROG_W 18635PROG_W=$ac_cv_path_PROG_W
19329if test -n "$PROG_W"; then 18636if test -n "$PROG_W"; then
19330 { $as_echo "$as_me:$LINENO: result: $PROG_W" >&5 18637 { echo "$as_me:$LINENO: result: $PROG_W" >&5
19331$as_echo "$PROG_W" >&6; } 18638echo "${ECHO_T}$PROG_W" >&6; }
19332else 18639else
19333 { $as_echo "$as_me:$LINENO: result: no" >&5 18640 { echo "$as_me:$LINENO: result: no" >&5
19334$as_echo "no" >&6; } 18641echo "${ECHO_T}no" >&6; }
19335fi 18642fi
19336 18643
19337 18644
@@ -19343,10 +18650,10 @@ fi
19343 18650
19344 # Extract the first word of "who", so it can be a program name with args. 18651 # Extract the first word of "who", so it can be a program name with args.
19345set dummy who; ac_word=$2 18652set dummy who; ac_word=$2
19346{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18653{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19347$as_echo_n "checking for $ac_word... " >&6; } 18654echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19348if test "${ac_cv_path_PROG_WHO+set}" = set; then 18655if test "${ac_cv_path_PROG_WHO+set}" = set; then
19349 $as_echo_n "(cached) " >&6 18656 echo $ECHO_N "(cached) $ECHO_C" >&6
19350else 18657else
19351 case $PROG_WHO in 18658 case $PROG_WHO in
19352 [\\/]* | ?:[\\/]*) 18659 [\\/]* | ?:[\\/]*)
@@ -19361,7 +18668,7 @@ do
19361 for ac_exec_ext in '' $ac_executable_extensions; do 18668 for ac_exec_ext in '' $ac_executable_extensions; do
19362 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18669 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19363 ac_cv_path_PROG_WHO="$as_dir/$ac_word$ac_exec_ext" 18670 ac_cv_path_PROG_WHO="$as_dir/$ac_word$ac_exec_ext"
19364 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 18671 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19365 break 2 18672 break 2
19366 fi 18673 fi
19367done 18674done
@@ -19373,11 +18680,11 @@ esac
19373fi 18680fi
19374PROG_WHO=$ac_cv_path_PROG_WHO 18681PROG_WHO=$ac_cv_path_PROG_WHO
19375if test -n "$PROG_WHO"; then 18682if test -n "$PROG_WHO"; then
19376 { $as_echo "$as_me:$LINENO: result: $PROG_WHO" >&5 18683 { echo "$as_me:$LINENO: result: $PROG_WHO" >&5
19377$as_echo "$PROG_WHO" >&6; } 18684echo "${ECHO_T}$PROG_WHO" >&6; }
19378else 18685else
19379 { $as_echo "$as_me:$LINENO: result: no" >&5 18686 { echo "$as_me:$LINENO: result: no" >&5
19380$as_echo "no" >&6; } 18687echo "${ECHO_T}no" >&6; }
19381fi 18688fi
19382 18689
19383 18690
@@ -19389,10 +18696,10 @@ fi
19389 18696
19390 # Extract the first word of "last", so it can be a program name with args. 18697 # Extract the first word of "last", so it can be a program name with args.
19391set dummy last; ac_word=$2 18698set dummy last; ac_word=$2
19392{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18699{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19393$as_echo_n "checking for $ac_word... " >&6; } 18700echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19394if test "${ac_cv_path_PROG_LAST+set}" = set; then 18701if test "${ac_cv_path_PROG_LAST+set}" = set; then
19395 $as_echo_n "(cached) " >&6 18702 echo $ECHO_N "(cached) $ECHO_C" >&6
19396else 18703else
19397 case $PROG_LAST in 18704 case $PROG_LAST in
19398 [\\/]* | ?:[\\/]*) 18705 [\\/]* | ?:[\\/]*)
@@ -19407,7 +18714,7 @@ do
19407 for ac_exec_ext in '' $ac_executable_extensions; do 18714 for ac_exec_ext in '' $ac_executable_extensions; do
19408 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18715 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19409 ac_cv_path_PROG_LAST="$as_dir/$ac_word$ac_exec_ext" 18716 ac_cv_path_PROG_LAST="$as_dir/$ac_word$ac_exec_ext"
19410 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 18717 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19411 break 2 18718 break 2
19412 fi 18719 fi
19413done 18720done
@@ -19419,11 +18726,11 @@ esac
19419fi 18726fi
19420PROG_LAST=$ac_cv_path_PROG_LAST 18727PROG_LAST=$ac_cv_path_PROG_LAST
19421if test -n "$PROG_LAST"; then 18728if test -n "$PROG_LAST"; then
19422 { $as_echo "$as_me:$LINENO: result: $PROG_LAST" >&5 18729 { echo "$as_me:$LINENO: result: $PROG_LAST" >&5
19423$as_echo "$PROG_LAST" >&6; } 18730echo "${ECHO_T}$PROG_LAST" >&6; }
19424else 18731else
19425 { $as_echo "$as_me:$LINENO: result: no" >&5 18732 { echo "$as_me:$LINENO: result: no" >&5
19426$as_echo "no" >&6; } 18733echo "${ECHO_T}no" >&6; }
19427fi 18734fi
19428 18735
19429 18736
@@ -19435,10 +18742,10 @@ fi
19435 18742
19436 # Extract the first word of "lastlog", so it can be a program name with args. 18743 # Extract the first word of "lastlog", so it can be a program name with args.
19437set dummy lastlog; ac_word=$2 18744set dummy lastlog; ac_word=$2
19438{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18745{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19439$as_echo_n "checking for $ac_word... " >&6; } 18746echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19440if test "${ac_cv_path_PROG_LASTLOG+set}" = set; then 18747if test "${ac_cv_path_PROG_LASTLOG+set}" = set; then
19441 $as_echo_n "(cached) " >&6 18748 echo $ECHO_N "(cached) $ECHO_C" >&6
19442else 18749else
19443 case $PROG_LASTLOG in 18750 case $PROG_LASTLOG in
19444 [\\/]* | ?:[\\/]*) 18751 [\\/]* | ?:[\\/]*)
@@ -19453,7 +18760,7 @@ do
19453 for ac_exec_ext in '' $ac_executable_extensions; do 18760 for ac_exec_ext in '' $ac_executable_extensions; do
19454 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18761 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19455 ac_cv_path_PROG_LASTLOG="$as_dir/$ac_word$ac_exec_ext" 18762 ac_cv_path_PROG_LASTLOG="$as_dir/$ac_word$ac_exec_ext"
19456 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 18763 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19457 break 2 18764 break 2
19458 fi 18765 fi
19459done 18766done
@@ -19465,11 +18772,11 @@ esac
19465fi 18772fi
19466PROG_LASTLOG=$ac_cv_path_PROG_LASTLOG 18773PROG_LASTLOG=$ac_cv_path_PROG_LASTLOG
19467if test -n "$PROG_LASTLOG"; then 18774if test -n "$PROG_LASTLOG"; then
19468 { $as_echo "$as_me:$LINENO: result: $PROG_LASTLOG" >&5 18775 { echo "$as_me:$LINENO: result: $PROG_LASTLOG" >&5
19469$as_echo "$PROG_LASTLOG" >&6; } 18776echo "${ECHO_T}$PROG_LASTLOG" >&6; }
19470else 18777else
19471 { $as_echo "$as_me:$LINENO: result: no" >&5 18778 { echo "$as_me:$LINENO: result: no" >&5
19472$as_echo "no" >&6; } 18779echo "${ECHO_T}no" >&6; }
19473fi 18780fi
19474 18781
19475 18782
@@ -19481,10 +18788,10 @@ fi
19481 18788
19482 # Extract the first word of "df", so it can be a program name with args. 18789 # Extract the first word of "df", so it can be a program name with args.
19483set dummy df; ac_word=$2 18790set dummy df; ac_word=$2
19484{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18791{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19485$as_echo_n "checking for $ac_word... " >&6; } 18792echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19486if test "${ac_cv_path_PROG_DF+set}" = set; then 18793if test "${ac_cv_path_PROG_DF+set}" = set; then
19487 $as_echo_n "(cached) " >&6 18794 echo $ECHO_N "(cached) $ECHO_C" >&6
19488else 18795else
19489 case $PROG_DF in 18796 case $PROG_DF in
19490 [\\/]* | ?:[\\/]*) 18797 [\\/]* | ?:[\\/]*)
@@ -19499,7 +18806,7 @@ do
19499 for ac_exec_ext in '' $ac_executable_extensions; do 18806 for ac_exec_ext in '' $ac_executable_extensions; do
19500 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18807 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19501 ac_cv_path_PROG_DF="$as_dir/$ac_word$ac_exec_ext" 18808 ac_cv_path_PROG_DF="$as_dir/$ac_word$ac_exec_ext"
19502 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 18809 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19503 break 2 18810 break 2
19504 fi 18811 fi
19505done 18812done
@@ -19511,11 +18818,11 @@ esac
19511fi 18818fi
19512PROG_DF=$ac_cv_path_PROG_DF 18819PROG_DF=$ac_cv_path_PROG_DF
19513if test -n "$PROG_DF"; then 18820if test -n "$PROG_DF"; then
19514 { $as_echo "$as_me:$LINENO: result: $PROG_DF" >&5 18821 { echo "$as_me:$LINENO: result: $PROG_DF" >&5
19515$as_echo "$PROG_DF" >&6; } 18822echo "${ECHO_T}$PROG_DF" >&6; }
19516else 18823else
19517 { $as_echo "$as_me:$LINENO: result: no" >&5 18824 { echo "$as_me:$LINENO: result: no" >&5
19518$as_echo "no" >&6; } 18825echo "${ECHO_T}no" >&6; }
19519fi 18826fi
19520 18827
19521 18828
@@ -19527,10 +18834,10 @@ fi
19527 18834
19528 # Extract the first word of "vmstat", so it can be a program name with args. 18835 # Extract the first word of "vmstat", so it can be a program name with args.
19529set dummy vmstat; ac_word=$2 18836set dummy vmstat; ac_word=$2
19530{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18837{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19531$as_echo_n "checking for $ac_word... " >&6; } 18838echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19532if test "${ac_cv_path_PROG_VMSTAT+set}" = set; then 18839if test "${ac_cv_path_PROG_VMSTAT+set}" = set; then
19533 $as_echo_n "(cached) " >&6 18840 echo $ECHO_N "(cached) $ECHO_C" >&6
19534else 18841else
19535 case $PROG_VMSTAT in 18842 case $PROG_VMSTAT in
19536 [\\/]* | ?:[\\/]*) 18843 [\\/]* | ?:[\\/]*)
@@ -19545,7 +18852,7 @@ do
19545 for ac_exec_ext in '' $ac_executable_extensions; do 18852 for ac_exec_ext in '' $ac_executable_extensions; do
19546 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18853 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19547 ac_cv_path_PROG_VMSTAT="$as_dir/$ac_word$ac_exec_ext" 18854 ac_cv_path_PROG_VMSTAT="$as_dir/$ac_word$ac_exec_ext"
19548 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 18855 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19549 break 2 18856 break 2
19550 fi 18857 fi
19551done 18858done
@@ -19557,11 +18864,11 @@ esac
19557fi 18864fi
19558PROG_VMSTAT=$ac_cv_path_PROG_VMSTAT 18865PROG_VMSTAT=$ac_cv_path_PROG_VMSTAT
19559if test -n "$PROG_VMSTAT"; then 18866if test -n "$PROG_VMSTAT"; then
19560 { $as_echo "$as_me:$LINENO: result: $PROG_VMSTAT" >&5 18867 { echo "$as_me:$LINENO: result: $PROG_VMSTAT" >&5
19561$as_echo "$PROG_VMSTAT" >&6; } 18868echo "${ECHO_T}$PROG_VMSTAT" >&6; }
19562else 18869else
19563 { $as_echo "$as_me:$LINENO: result: no" >&5 18870 { echo "$as_me:$LINENO: result: no" >&5
19564$as_echo "no" >&6; } 18871echo "${ECHO_T}no" >&6; }
19565fi 18872fi
19566 18873
19567 18874
@@ -19573,10 +18880,10 @@ fi
19573 18880
19574 # Extract the first word of "uptime", so it can be a program name with args. 18881 # Extract the first word of "uptime", so it can be a program name with args.
19575set dummy uptime; ac_word=$2 18882set dummy uptime; ac_word=$2
19576{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18883{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19577$as_echo_n "checking for $ac_word... " >&6; } 18884echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19578if test "${ac_cv_path_PROG_UPTIME+set}" = set; then 18885if test "${ac_cv_path_PROG_UPTIME+set}" = set; then
19579 $as_echo_n "(cached) " >&6 18886 echo $ECHO_N "(cached) $ECHO_C" >&6
19580else 18887else
19581 case $PROG_UPTIME in 18888 case $PROG_UPTIME in
19582 [\\/]* | ?:[\\/]*) 18889 [\\/]* | ?:[\\/]*)
@@ -19591,7 +18898,7 @@ do
19591 for ac_exec_ext in '' $ac_executable_extensions; do 18898 for ac_exec_ext in '' $ac_executable_extensions; do
19592 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18899 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19593 ac_cv_path_PROG_UPTIME="$as_dir/$ac_word$ac_exec_ext" 18900 ac_cv_path_PROG_UPTIME="$as_dir/$ac_word$ac_exec_ext"
19594 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 18901 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19595 break 2 18902 break 2
19596 fi 18903 fi
19597done 18904done
@@ -19603,11 +18910,11 @@ esac
19603fi 18910fi
19604PROG_UPTIME=$ac_cv_path_PROG_UPTIME 18911PROG_UPTIME=$ac_cv_path_PROG_UPTIME
19605if test -n "$PROG_UPTIME"; then 18912if test -n "$PROG_UPTIME"; then
19606 { $as_echo "$as_me:$LINENO: result: $PROG_UPTIME" >&5 18913 { echo "$as_me:$LINENO: result: $PROG_UPTIME" >&5
19607$as_echo "$PROG_UPTIME" >&6; } 18914echo "${ECHO_T}$PROG_UPTIME" >&6; }
19608else 18915else
19609 { $as_echo "$as_me:$LINENO: result: no" >&5 18916 { echo "$as_me:$LINENO: result: no" >&5
19610$as_echo "no" >&6; } 18917echo "${ECHO_T}no" >&6; }
19611fi 18918fi
19612 18919
19613 18920
@@ -19619,10 +18926,10 @@ fi
19619 18926
19620 # Extract the first word of "ipcs", so it can be a program name with args. 18927 # Extract the first word of "ipcs", so it can be a program name with args.
19621set dummy ipcs; ac_word=$2 18928set dummy ipcs; ac_word=$2
19622{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18929{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19623$as_echo_n "checking for $ac_word... " >&6; } 18930echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19624if test "${ac_cv_path_PROG_IPCS+set}" = set; then 18931if test "${ac_cv_path_PROG_IPCS+set}" = set; then
19625 $as_echo_n "(cached) " >&6 18932 echo $ECHO_N "(cached) $ECHO_C" >&6
19626else 18933else
19627 case $PROG_IPCS in 18934 case $PROG_IPCS in
19628 [\\/]* | ?:[\\/]*) 18935 [\\/]* | ?:[\\/]*)
@@ -19637,7 +18944,7 @@ do
19637 for ac_exec_ext in '' $ac_executable_extensions; do 18944 for ac_exec_ext in '' $ac_executable_extensions; do
19638 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18945 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19639 ac_cv_path_PROG_IPCS="$as_dir/$ac_word$ac_exec_ext" 18946 ac_cv_path_PROG_IPCS="$as_dir/$ac_word$ac_exec_ext"
19640 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 18947 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19641 break 2 18948 break 2
19642 fi 18949 fi
19643done 18950done
@@ -19649,11 +18956,11 @@ esac
19649fi 18956fi
19650PROG_IPCS=$ac_cv_path_PROG_IPCS 18957PROG_IPCS=$ac_cv_path_PROG_IPCS
19651if test -n "$PROG_IPCS"; then 18958if test -n "$PROG_IPCS"; then
19652 { $as_echo "$as_me:$LINENO: result: $PROG_IPCS" >&5 18959 { echo "$as_me:$LINENO: result: $PROG_IPCS" >&5
19653$as_echo "$PROG_IPCS" >&6; } 18960echo "${ECHO_T}$PROG_IPCS" >&6; }
19654else 18961else
19655 { $as_echo "$as_me:$LINENO: result: no" >&5 18962 { echo "$as_me:$LINENO: result: no" >&5
19656$as_echo "no" >&6; } 18963echo "${ECHO_T}no" >&6; }
19657fi 18964fi
19658 18965
19659 18966
@@ -19665,10 +18972,10 @@ fi
19665 18972
19666 # Extract the first word of "tail", so it can be a program name with args. 18973 # Extract the first word of "tail", so it can be a program name with args.
19667set dummy tail; ac_word=$2 18974set dummy tail; ac_word=$2
19668{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18975{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19669$as_echo_n "checking for $ac_word... " >&6; } 18976echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19670if test "${ac_cv_path_PROG_TAIL+set}" = set; then 18977if test "${ac_cv_path_PROG_TAIL+set}" = set; then
19671 $as_echo_n "(cached) " >&6 18978 echo $ECHO_N "(cached) $ECHO_C" >&6
19672else 18979else
19673 case $PROG_TAIL in 18980 case $PROG_TAIL in
19674 [\\/]* | ?:[\\/]*) 18981 [\\/]* | ?:[\\/]*)
@@ -19683,7 +18990,7 @@ do
19683 for ac_exec_ext in '' $ac_executable_extensions; do 18990 for ac_exec_ext in '' $ac_executable_extensions; do
19684 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 18991 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19685 ac_cv_path_PROG_TAIL="$as_dir/$ac_word$ac_exec_ext" 18992 ac_cv_path_PROG_TAIL="$as_dir/$ac_word$ac_exec_ext"
19686 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 18993 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19687 break 2 18994 break 2
19688 fi 18995 fi
19689done 18996done
@@ -19695,11 +19002,11 @@ esac
19695fi 19002fi
19696PROG_TAIL=$ac_cv_path_PROG_TAIL 19003PROG_TAIL=$ac_cv_path_PROG_TAIL
19697if test -n "$PROG_TAIL"; then 19004if test -n "$PROG_TAIL"; then
19698 { $as_echo "$as_me:$LINENO: result: $PROG_TAIL" >&5 19005 { echo "$as_me:$LINENO: result: $PROG_TAIL" >&5
19699$as_echo "$PROG_TAIL" >&6; } 19006echo "${ECHO_T}$PROG_TAIL" >&6; }
19700else 19007else
19701 { $as_echo "$as_me:$LINENO: result: no" >&5 19008 { echo "$as_me:$LINENO: result: no" >&5
19702$as_echo "no" >&6; } 19009echo "${ECHO_T}no" >&6; }
19703fi 19010fi
19704 19011
19705 19012
@@ -19733,46 +19040,11 @@ if test ! -z "$SONY" ; then
19733fi 19040fi
19734 19041
19735# Check for long long datatypes 19042# Check for long long datatypes
19736{ $as_echo "$as_me:$LINENO: checking for long long" >&5 19043{ echo "$as_me:$LINENO: checking for long long" >&5
19737$as_echo_n "checking for long long... " >&6; } 19044echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
19738if test "${ac_cv_type_long_long+set}" = set; then 19045if test "${ac_cv_type_long_long+set}" = set; then
19739 $as_echo_n "(cached) " >&6 19046 echo $ECHO_N "(cached) $ECHO_C" >&6
19740else 19047else
19741 ac_cv_type_long_long=no
19742cat >conftest.$ac_ext <<_ACEOF
19743/* confdefs.h. */
19744_ACEOF
19745cat confdefs.h >>conftest.$ac_ext
19746cat >>conftest.$ac_ext <<_ACEOF
19747/* end confdefs.h. */
19748$ac_includes_default
19749int
19750main ()
19751{
19752if (sizeof (long long))
19753 return 0;
19754 ;
19755 return 0;
19756}
19757_ACEOF
19758rm -f conftest.$ac_objext
19759if { (ac_try="$ac_compile"
19760case "(($ac_try" in
19761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19762 *) ac_try_echo=$ac_try;;
19763esac
19764eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19765$as_echo "$ac_try_echo") >&5
19766 (eval "$ac_compile") 2>conftest.er1
19767 ac_status=$?
19768 grep -v '^ *+' conftest.er1 >conftest.err
19769 rm -f conftest.er1
19770 cat conftest.err >&5
19771 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19772 (exit $ac_status); } && {
19773 test -z "$ac_c_werror_flag" ||
19774 test ! -s conftest.err
19775 } && test -s conftest.$ac_objext; then
19776 cat >conftest.$ac_ext <<_ACEOF 19048 cat >conftest.$ac_ext <<_ACEOF
19777/* confdefs.h. */ 19049/* confdefs.h. */
19778_ACEOF 19050_ACEOF
@@ -19780,11 +19052,14 @@ cat confdefs.h >>conftest.$ac_ext
19780cat >>conftest.$ac_ext <<_ACEOF 19052cat >>conftest.$ac_ext <<_ACEOF
19781/* end confdefs.h. */ 19053/* end confdefs.h. */
19782$ac_includes_default 19054$ac_includes_default
19055typedef long long ac__type_new_;
19783int 19056int
19784main () 19057main ()
19785{ 19058{
19786if (sizeof ((long long))) 19059if ((ac__type_new_ *) 0)
19787 return 0; 19060 return 0;
19061if (sizeof (ac__type_new_))
19062 return 0;
19788 ; 19063 ;
19789 return 0; 19064 return 0;
19790} 19065}
@@ -19795,38 +19070,29 @@ case "(($ac_try" in
19795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19796 *) ac_try_echo=$ac_try;; 19071 *) ac_try_echo=$ac_try;;
19797esac 19072esac
19798eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19799$as_echo "$ac_try_echo") >&5
19800 (eval "$ac_compile") 2>conftest.er1 19074 (eval "$ac_compile") 2>conftest.er1
19801 ac_status=$? 19075 ac_status=$?
19802 grep -v '^ *+' conftest.er1 >conftest.err 19076 grep -v '^ *+' conftest.er1 >conftest.err
19803 rm -f conftest.er1 19077 rm -f conftest.er1
19804 cat conftest.err >&5 19078 cat conftest.err >&5
19805 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19806 (exit $ac_status); } && { 19080 (exit $ac_status); } && {
19807 test -z "$ac_c_werror_flag" || 19081 test -z "$ac_c_werror_flag" ||
19808 test ! -s conftest.err 19082 test ! -s conftest.err
19809 } && test -s conftest.$ac_objext; then 19083 } && test -s conftest.$ac_objext; then
19810 : 19084 ac_cv_type_long_long=yes
19811else 19085else
19812 $as_echo "$as_me: failed program was:" >&5 19086 echo "$as_me: failed program was:" >&5
19813sed 's/^/| /' conftest.$ac_ext >&5 19087sed 's/^/| /' conftest.$ac_ext >&5
19814 19088
19815 ac_cv_type_long_long=yes 19089 ac_cv_type_long_long=no
19816fi 19090fi
19817 19091
19818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19819else
19820 $as_echo "$as_me: failed program was:" >&5
19821sed 's/^/| /' conftest.$ac_ext >&5
19822
19823
19824fi 19093fi
19825 19094{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
19826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19095echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
19827fi
19828{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
19829$as_echo "$ac_cv_type_long_long" >&6; }
19830if test $ac_cv_type_long_long = yes; then 19096if test $ac_cv_type_long_long = yes; then
19831 19097
19832cat >>confdefs.h <<_ACEOF 19098cat >>confdefs.h <<_ACEOF
@@ -19835,46 +19101,11 @@ _ACEOF
19835 19101
19836 19102
19837fi 19103fi
19838{ $as_echo "$as_me:$LINENO: checking for unsigned long long" >&5 19104{ echo "$as_me:$LINENO: checking for unsigned long long" >&5
19839$as_echo_n "checking for unsigned long long... " >&6; } 19105echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6; }
19840if test "${ac_cv_type_unsigned_long_long+set}" = set; then 19106if test "${ac_cv_type_unsigned_long_long+set}" = set; then
19841 $as_echo_n "(cached) " >&6 19107 echo $ECHO_N "(cached) $ECHO_C" >&6
19842else 19108else
19843 ac_cv_type_unsigned_long_long=no
19844cat >conftest.$ac_ext <<_ACEOF
19845/* confdefs.h. */
19846_ACEOF
19847cat confdefs.h >>conftest.$ac_ext
19848cat >>conftest.$ac_ext <<_ACEOF
19849/* end confdefs.h. */
19850$ac_includes_default
19851int
19852main ()
19853{
19854if (sizeof (unsigned long long))
19855 return 0;
19856 ;
19857 return 0;
19858}
19859_ACEOF
19860rm -f conftest.$ac_objext
19861if { (ac_try="$ac_compile"
19862case "(($ac_try" in
19863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19864 *) ac_try_echo=$ac_try;;
19865esac
19866eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19867$as_echo "$ac_try_echo") >&5
19868 (eval "$ac_compile") 2>conftest.er1
19869 ac_status=$?
19870 grep -v '^ *+' conftest.er1 >conftest.err
19871 rm -f conftest.er1
19872 cat conftest.err >&5
19873 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19874 (exit $ac_status); } && {
19875 test -z "$ac_c_werror_flag" ||
19876 test ! -s conftest.err
19877 } && test -s conftest.$ac_objext; then
19878 cat >conftest.$ac_ext <<_ACEOF 19109 cat >conftest.$ac_ext <<_ACEOF
19879/* confdefs.h. */ 19110/* confdefs.h. */
19880_ACEOF 19111_ACEOF
@@ -19882,11 +19113,14 @@ cat confdefs.h >>conftest.$ac_ext
19882cat >>conftest.$ac_ext <<_ACEOF 19113cat >>conftest.$ac_ext <<_ACEOF
19883/* end confdefs.h. */ 19114/* end confdefs.h. */
19884$ac_includes_default 19115$ac_includes_default
19116typedef unsigned long long ac__type_new_;
19885int 19117int
19886main () 19118main ()
19887{ 19119{
19888if (sizeof ((unsigned long long))) 19120if ((ac__type_new_ *) 0)
19889 return 0; 19121 return 0;
19122if (sizeof (ac__type_new_))
19123 return 0;
19890 ; 19124 ;
19891 return 0; 19125 return 0;
19892} 19126}
@@ -19897,38 +19131,29 @@ case "(($ac_try" in
19897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19898 *) ac_try_echo=$ac_try;; 19132 *) ac_try_echo=$ac_try;;
19899esac 19133esac
19900eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19901$as_echo "$ac_try_echo") >&5
19902 (eval "$ac_compile") 2>conftest.er1 19135 (eval "$ac_compile") 2>conftest.er1
19903 ac_status=$? 19136 ac_status=$?
19904 grep -v '^ *+' conftest.er1 >conftest.err 19137 grep -v '^ *+' conftest.er1 >conftest.err
19905 rm -f conftest.er1 19138 rm -f conftest.er1
19906 cat conftest.err >&5 19139 cat conftest.err >&5
19907 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19908 (exit $ac_status); } && { 19141 (exit $ac_status); } && {
19909 test -z "$ac_c_werror_flag" || 19142 test -z "$ac_c_werror_flag" ||
19910 test ! -s conftest.err 19143 test ! -s conftest.err
19911 } && test -s conftest.$ac_objext; then 19144 } && test -s conftest.$ac_objext; then
19912 : 19145 ac_cv_type_unsigned_long_long=yes
19913else 19146else
19914 $as_echo "$as_me: failed program was:" >&5 19147 echo "$as_me: failed program was:" >&5
19915sed 's/^/| /' conftest.$ac_ext >&5 19148sed 's/^/| /' conftest.$ac_ext >&5
19916 19149
19917 ac_cv_type_unsigned_long_long=yes 19150 ac_cv_type_unsigned_long_long=no
19918fi
19919
19920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19921else
19922 $as_echo "$as_me: failed program was:" >&5
19923sed 's/^/| /' conftest.$ac_ext >&5
19924
19925
19926fi 19151fi
19927 19152
19928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19929fi 19154fi
19930{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5 19155{ echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5
19931$as_echo "$ac_cv_type_unsigned_long_long" >&6; } 19156echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6; }
19932if test $ac_cv_type_unsigned_long_long = yes; then 19157if test $ac_cv_type_unsigned_long_long = yes; then
19933 19158
19934cat >>confdefs.h <<_ACEOF 19159cat >>confdefs.h <<_ACEOF
@@ -19937,24 +19162,26 @@ _ACEOF
19937 19162
19938 19163
19939fi 19164fi
19940{ $as_echo "$as_me:$LINENO: checking for long double" >&5 19165{ echo "$as_me:$LINENO: checking for long double" >&5
19941$as_echo_n "checking for long double... " >&6; } 19166echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
19942if test "${ac_cv_type_long_double+set}" = set; then 19167if test "${ac_cv_type_long_double+set}" = set; then
19943 $as_echo_n "(cached) " >&6 19168 echo $ECHO_N "(cached) $ECHO_C" >&6
19944else 19169else
19945 ac_cv_type_long_double=no 19170 cat >conftest.$ac_ext <<_ACEOF
19946cat >conftest.$ac_ext <<_ACEOF
19947/* confdefs.h. */ 19171/* confdefs.h. */
19948_ACEOF 19172_ACEOF
19949cat confdefs.h >>conftest.$ac_ext 19173cat confdefs.h >>conftest.$ac_ext
19950cat >>conftest.$ac_ext <<_ACEOF 19174cat >>conftest.$ac_ext <<_ACEOF
19951/* end confdefs.h. */ 19175/* end confdefs.h. */
19952$ac_includes_default 19176$ac_includes_default
19177typedef long double ac__type_new_;
19953int 19178int
19954main () 19179main ()
19955{ 19180{
19956if (sizeof (long double)) 19181if ((ac__type_new_ *) 0)
19957 return 0; 19182 return 0;
19183if (sizeof (ac__type_new_))
19184 return 0;
19958 ; 19185 ;
19959 return 0; 19186 return 0;
19960} 19187}
@@ -19965,18 +19192,45 @@ case "(($ac_try" in
19965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19966 *) ac_try_echo=$ac_try;; 19193 *) ac_try_echo=$ac_try;;
19967esac 19194esac
19968eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19969$as_echo "$ac_try_echo") >&5
19970 (eval "$ac_compile") 2>conftest.er1 19196 (eval "$ac_compile") 2>conftest.er1
19971 ac_status=$? 19197 ac_status=$?
19972 grep -v '^ *+' conftest.er1 >conftest.err 19198 grep -v '^ *+' conftest.er1 >conftest.err
19973 rm -f conftest.er1 19199 rm -f conftest.er1
19974 cat conftest.err >&5 19200 cat conftest.err >&5
19975 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19976 (exit $ac_status); } && { 19202 (exit $ac_status); } && {
19977 test -z "$ac_c_werror_flag" || 19203 test -z "$ac_c_werror_flag" ||
19978 test ! -s conftest.err 19204 test ! -s conftest.err
19979 } && test -s conftest.$ac_objext; then 19205 } && test -s conftest.$ac_objext; then
19206 ac_cv_type_long_double=yes
19207else
19208 echo "$as_me: failed program was:" >&5
19209sed 's/^/| /' conftest.$ac_ext >&5
19210
19211 ac_cv_type_long_double=no
19212fi
19213
19214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19215fi
19216{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
19217echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
19218if test $ac_cv_type_long_double = yes; then
19219
19220cat >>confdefs.h <<_ACEOF
19221#define HAVE_LONG_DOUBLE 1
19222_ACEOF
19223
19224
19225fi
19226
19227
19228# Check datatype sizes
19229{ echo "$as_me:$LINENO: checking for char" >&5
19230echo $ECHO_N "checking for char... $ECHO_C" >&6; }
19231if test "${ac_cv_type_char+set}" = set; then
19232 echo $ECHO_N "(cached) $ECHO_C" >&6
19233else
19980 cat >conftest.$ac_ext <<_ACEOF 19234 cat >conftest.$ac_ext <<_ACEOF
19981/* confdefs.h. */ 19235/* confdefs.h. */
19982_ACEOF 19236_ACEOF
@@ -19984,11 +19238,14 @@ cat confdefs.h >>conftest.$ac_ext
19984cat >>conftest.$ac_ext <<_ACEOF 19238cat >>conftest.$ac_ext <<_ACEOF
19985/* end confdefs.h. */ 19239/* end confdefs.h. */
19986$ac_includes_default 19240$ac_includes_default
19241typedef char ac__type_new_;
19987int 19242int
19988main () 19243main ()
19989{ 19244{
19990if (sizeof ((long double))) 19245if ((ac__type_new_ *) 0)
19991 return 0; 19246 return 0;
19247if (sizeof (ac__type_new_))
19248 return 0;
19992 ; 19249 ;
19993 return 0; 19250 return 0;
19994} 19251}
@@ -19999,57 +19256,38 @@ case "(($ac_try" in
19999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20000 *) ac_try_echo=$ac_try;; 19257 *) ac_try_echo=$ac_try;;
20001esac 19258esac
20002eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20003$as_echo "$ac_try_echo") >&5
20004 (eval "$ac_compile") 2>conftest.er1 19260 (eval "$ac_compile") 2>conftest.er1
20005 ac_status=$? 19261 ac_status=$?
20006 grep -v '^ *+' conftest.er1 >conftest.err 19262 grep -v '^ *+' conftest.er1 >conftest.err
20007 rm -f conftest.er1 19263 rm -f conftest.er1
20008 cat conftest.err >&5 19264 cat conftest.err >&5
20009 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20010 (exit $ac_status); } && { 19266 (exit $ac_status); } && {
20011 test -z "$ac_c_werror_flag" || 19267 test -z "$ac_c_werror_flag" ||
20012 test ! -s conftest.err 19268 test ! -s conftest.err
20013 } && test -s conftest.$ac_objext; then 19269 } && test -s conftest.$ac_objext; then
20014 : 19270 ac_cv_type_char=yes
20015else
20016 $as_echo "$as_me: failed program was:" >&5
20017sed 's/^/| /' conftest.$ac_ext >&5
20018
20019 ac_cv_type_long_double=yes
20020fi
20021
20022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20023else 19271else
20024 $as_echo "$as_me: failed program was:" >&5 19272 echo "$as_me: failed program was:" >&5
20025sed 's/^/| /' conftest.$ac_ext >&5 19273sed 's/^/| /' conftest.$ac_ext >&5
20026 19274
20027 19275 ac_cv_type_char=no
20028fi 19276fi
20029 19277
20030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20031fi 19279fi
20032{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5 19280{ echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
20033$as_echo "$ac_cv_type_long_double" >&6; } 19281echo "${ECHO_T}$ac_cv_type_char" >&6; }
20034if test $ac_cv_type_long_double = yes; then
20035
20036cat >>confdefs.h <<_ACEOF
20037#define HAVE_LONG_DOUBLE 1
20038_ACEOF
20039
20040
20041fi
20042 19282
20043
20044# Check datatype sizes
20045# The cast to long int works around a bug in the HP C Compiler 19283# The cast to long int works around a bug in the HP C Compiler
20046# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 19284# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
20047# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 19285# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20048# This bug is HP SR number 8606223364. 19286# This bug is HP SR number 8606223364.
20049{ $as_echo "$as_me:$LINENO: checking size of char" >&5 19287{ echo "$as_me:$LINENO: checking size of char" >&5
20050$as_echo_n "checking size of char... " >&6; } 19288echo $ECHO_N "checking size of char... $ECHO_C" >&6; }
20051if test "${ac_cv_sizeof_char+set}" = set; then 19289if test "${ac_cv_sizeof_char+set}" = set; then
20052 $as_echo_n "(cached) " >&6 19290 echo $ECHO_N "(cached) $ECHO_C" >&6
20053else 19291else
20054 if test "$cross_compiling" = yes; then 19292 if test "$cross_compiling" = yes; then
20055 # Depending upon the size, compute the lo and hi bounds. 19293 # Depending upon the size, compute the lo and hi bounds.
@@ -20060,10 +19298,11 @@ cat confdefs.h >>conftest.$ac_ext
20060cat >>conftest.$ac_ext <<_ACEOF 19298cat >>conftest.$ac_ext <<_ACEOF
20061/* end confdefs.h. */ 19299/* end confdefs.h. */
20062$ac_includes_default 19300$ac_includes_default
19301 typedef char ac__type_sizeof_;
20063int 19302int
20064main () 19303main ()
20065{ 19304{
20066static int test_array [1 - 2 * !(((long int) (sizeof (char))) >= 0)]; 19305static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
20067test_array [0] = 0 19306test_array [0] = 0
20068 19307
20069 ; 19308 ;
@@ -20076,14 +19315,13 @@ case "(($ac_try" in
20076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20077 *) ac_try_echo=$ac_try;; 19316 *) ac_try_echo=$ac_try;;
20078esac 19317esac
20079eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20080$as_echo "$ac_try_echo") >&5
20081 (eval "$ac_compile") 2>conftest.er1 19319 (eval "$ac_compile") 2>conftest.er1
20082 ac_status=$? 19320 ac_status=$?
20083 grep -v '^ *+' conftest.er1 >conftest.err 19321 grep -v '^ *+' conftest.er1 >conftest.err
20084 rm -f conftest.er1 19322 rm -f conftest.er1
20085 cat conftest.err >&5 19323 cat conftest.err >&5
20086 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20087 (exit $ac_status); } && { 19325 (exit $ac_status); } && {
20088 test -z "$ac_c_werror_flag" || 19326 test -z "$ac_c_werror_flag" ||
20089 test ! -s conftest.err 19327 test ! -s conftest.err
@@ -20097,10 +19335,11 @@ cat confdefs.h >>conftest.$ac_ext
20097cat >>conftest.$ac_ext <<_ACEOF 19335cat >>conftest.$ac_ext <<_ACEOF
20098/* end confdefs.h. */ 19336/* end confdefs.h. */
20099$ac_includes_default 19337$ac_includes_default
19338 typedef char ac__type_sizeof_;
20100int 19339int
20101main () 19340main ()
20102{ 19341{
20103static int test_array [1 - 2 * !(((long int) (sizeof (char))) <= $ac_mid)]; 19342static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20104test_array [0] = 0 19343test_array [0] = 0
20105 19344
20106 ; 19345 ;
@@ -20113,21 +19352,20 @@ case "(($ac_try" in
20113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20114 *) ac_try_echo=$ac_try;; 19353 *) ac_try_echo=$ac_try;;
20115esac 19354esac
20116eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20117$as_echo "$ac_try_echo") >&5
20118 (eval "$ac_compile") 2>conftest.er1 19356 (eval "$ac_compile") 2>conftest.er1
20119 ac_status=$? 19357 ac_status=$?
20120 grep -v '^ *+' conftest.er1 >conftest.err 19358 grep -v '^ *+' conftest.er1 >conftest.err
20121 rm -f conftest.er1 19359 rm -f conftest.er1
20122 cat conftest.err >&5 19360 cat conftest.err >&5
20123 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20124 (exit $ac_status); } && { 19362 (exit $ac_status); } && {
20125 test -z "$ac_c_werror_flag" || 19363 test -z "$ac_c_werror_flag" ||
20126 test ! -s conftest.err 19364 test ! -s conftest.err
20127 } && test -s conftest.$ac_objext; then 19365 } && test -s conftest.$ac_objext; then
20128 ac_hi=$ac_mid; break 19366 ac_hi=$ac_mid; break
20129else 19367else
20130 $as_echo "$as_me: failed program was:" >&5 19368 echo "$as_me: failed program was:" >&5
20131sed 's/^/| /' conftest.$ac_ext >&5 19369sed 's/^/| /' conftest.$ac_ext >&5
20132 19370
20133 ac_lo=`expr $ac_mid + 1` 19371 ac_lo=`expr $ac_mid + 1`
@@ -20141,7 +19379,7 @@ fi
20141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20142 done 19380 done
20143else 19381else
20144 $as_echo "$as_me: failed program was:" >&5 19382 echo "$as_me: failed program was:" >&5
20145sed 's/^/| /' conftest.$ac_ext >&5 19383sed 's/^/| /' conftest.$ac_ext >&5
20146 19384
20147 cat >conftest.$ac_ext <<_ACEOF 19385 cat >conftest.$ac_ext <<_ACEOF
@@ -20151,10 +19389,11 @@ cat confdefs.h >>conftest.$ac_ext
20151cat >>conftest.$ac_ext <<_ACEOF 19389cat >>conftest.$ac_ext <<_ACEOF
20152/* end confdefs.h. */ 19390/* end confdefs.h. */
20153$ac_includes_default 19391$ac_includes_default
19392 typedef char ac__type_sizeof_;
20154int 19393int
20155main () 19394main ()
20156{ 19395{
20157static int test_array [1 - 2 * !(((long int) (sizeof (char))) < 0)]; 19396static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
20158test_array [0] = 0 19397test_array [0] = 0
20159 19398
20160 ; 19399 ;
@@ -20167,14 +19406,13 @@ case "(($ac_try" in
20167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20168 *) ac_try_echo=$ac_try;; 19407 *) ac_try_echo=$ac_try;;
20169esac 19408esac
20170eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20171$as_echo "$ac_try_echo") >&5
20172 (eval "$ac_compile") 2>conftest.er1 19410 (eval "$ac_compile") 2>conftest.er1
20173 ac_status=$? 19411 ac_status=$?
20174 grep -v '^ *+' conftest.er1 >conftest.err 19412 grep -v '^ *+' conftest.er1 >conftest.err
20175 rm -f conftest.er1 19413 rm -f conftest.er1
20176 cat conftest.err >&5 19414 cat conftest.err >&5
20177 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20178 (exit $ac_status); } && { 19416 (exit $ac_status); } && {
20179 test -z "$ac_c_werror_flag" || 19417 test -z "$ac_c_werror_flag" ||
20180 test ! -s conftest.err 19418 test ! -s conftest.err
@@ -20188,10 +19426,11 @@ cat confdefs.h >>conftest.$ac_ext
20188cat >>conftest.$ac_ext <<_ACEOF 19426cat >>conftest.$ac_ext <<_ACEOF
20189/* end confdefs.h. */ 19427/* end confdefs.h. */
20190$ac_includes_default 19428$ac_includes_default
19429 typedef char ac__type_sizeof_;
20191int 19430int
20192main () 19431main ()
20193{ 19432{
20194static int test_array [1 - 2 * !(((long int) (sizeof (char))) >= $ac_mid)]; 19433static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
20195test_array [0] = 0 19434test_array [0] = 0
20196 19435
20197 ; 19436 ;
@@ -20204,21 +19443,20 @@ case "(($ac_try" in
20204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20205 *) ac_try_echo=$ac_try;; 19444 *) ac_try_echo=$ac_try;;
20206esac 19445esac
20207eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20208$as_echo "$ac_try_echo") >&5
20209 (eval "$ac_compile") 2>conftest.er1 19447 (eval "$ac_compile") 2>conftest.er1
20210 ac_status=$? 19448 ac_status=$?
20211 grep -v '^ *+' conftest.er1 >conftest.err 19449 grep -v '^ *+' conftest.er1 >conftest.err
20212 rm -f conftest.er1 19450 rm -f conftest.er1
20213 cat conftest.err >&5 19451 cat conftest.err >&5
20214 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20215 (exit $ac_status); } && { 19453 (exit $ac_status); } && {
20216 test -z "$ac_c_werror_flag" || 19454 test -z "$ac_c_werror_flag" ||
20217 test ! -s conftest.err 19455 test ! -s conftest.err
20218 } && test -s conftest.$ac_objext; then 19456 } && test -s conftest.$ac_objext; then
20219 ac_lo=$ac_mid; break 19457 ac_lo=$ac_mid; break
20220else 19458else
20221 $as_echo "$as_me: failed program was:" >&5 19459 echo "$as_me: failed program was:" >&5
20222sed 's/^/| /' conftest.$ac_ext >&5 19460sed 's/^/| /' conftest.$ac_ext >&5
20223 19461
20224 ac_hi=`expr '(' $ac_mid ')' - 1` 19462 ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -20232,7 +19470,7 @@ fi
20232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20233 done 19471 done
20234else 19472else
20235 $as_echo "$as_me: failed program was:" >&5 19473 echo "$as_me: failed program was:" >&5
20236sed 's/^/| /' conftest.$ac_ext >&5 19474sed 's/^/| /' conftest.$ac_ext >&5
20237 19475
20238 ac_lo= ac_hi= 19476 ac_lo= ac_hi=
@@ -20252,10 +19490,11 @@ cat confdefs.h >>conftest.$ac_ext
20252cat >>conftest.$ac_ext <<_ACEOF 19490cat >>conftest.$ac_ext <<_ACEOF
20253/* end confdefs.h. */ 19491/* end confdefs.h. */
20254$ac_includes_default 19492$ac_includes_default
19493 typedef char ac__type_sizeof_;
20255int 19494int
20256main () 19495main ()
20257{ 19496{
20258static int test_array [1 - 2 * !(((long int) (sizeof (char))) <= $ac_mid)]; 19497static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20259test_array [0] = 0 19498test_array [0] = 0
20260 19499
20261 ; 19500 ;
@@ -20268,21 +19507,20 @@ case "(($ac_try" in
20268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20269 *) ac_try_echo=$ac_try;; 19508 *) ac_try_echo=$ac_try;;
20270esac 19509esac
20271eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20272$as_echo "$ac_try_echo") >&5
20273 (eval "$ac_compile") 2>conftest.er1 19511 (eval "$ac_compile") 2>conftest.er1
20274 ac_status=$? 19512 ac_status=$?
20275 grep -v '^ *+' conftest.er1 >conftest.err 19513 grep -v '^ *+' conftest.er1 >conftest.err
20276 rm -f conftest.er1 19514 rm -f conftest.er1
20277 cat conftest.err >&5 19515 cat conftest.err >&5
20278 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20279 (exit $ac_status); } && { 19517 (exit $ac_status); } && {
20280 test -z "$ac_c_werror_flag" || 19518 test -z "$ac_c_werror_flag" ||
20281 test ! -s conftest.err 19519 test ! -s conftest.err
20282 } && test -s conftest.$ac_objext; then 19520 } && test -s conftest.$ac_objext; then
20283 ac_hi=$ac_mid 19521 ac_hi=$ac_mid
20284else 19522else
20285 $as_echo "$as_me: failed program was:" >&5 19523 echo "$as_me: failed program was:" >&5
20286sed 's/^/| /' conftest.$ac_ext >&5 19524sed 's/^/| /' conftest.$ac_ext >&5
20287 19525
20288 ac_lo=`expr '(' $ac_mid ')' + 1` 19526 ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -20293,9 +19531,9 @@ done
20293case $ac_lo in 19531case $ac_lo in
20294?*) ac_cv_sizeof_char=$ac_lo;; 19532?*) ac_cv_sizeof_char=$ac_lo;;
20295'') if test "$ac_cv_type_char" = yes; then 19533'') if test "$ac_cv_type_char" = yes; then
20296 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (char) 19534 { { echo "$as_me:$LINENO: error: cannot compute sizeof (char)
20297See \`config.log' for more details." >&5 19535See \`config.log' for more details." >&5
20298$as_echo "$as_me: error: cannot compute sizeof (char) 19536echo "$as_me: error: cannot compute sizeof (char)
20299See \`config.log' for more details." >&2;} 19537See \`config.log' for more details." >&2;}
20300 { (exit 77); exit 77; }; } 19538 { (exit 77); exit 77; }; }
20301 else 19539 else
@@ -20310,8 +19548,9 @@ cat confdefs.h >>conftest.$ac_ext
20310cat >>conftest.$ac_ext <<_ACEOF 19548cat >>conftest.$ac_ext <<_ACEOF
20311/* end confdefs.h. */ 19549/* end confdefs.h. */
20312$ac_includes_default 19550$ac_includes_default
20313static long int longval () { return (long int) (sizeof (char)); } 19551 typedef char ac__type_sizeof_;
20314static unsigned long int ulongval () { return (long int) (sizeof (char)); } 19552static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
19553static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
20315#include <stdio.h> 19554#include <stdio.h>
20316#include <stdlib.h> 19555#include <stdlib.h>
20317int 19556int
@@ -20321,22 +19560,20 @@ main ()
20321 FILE *f = fopen ("conftest.val", "w"); 19560 FILE *f = fopen ("conftest.val", "w");
20322 if (! f) 19561 if (! f)
20323 return 1; 19562 return 1;
20324 if (((long int) (sizeof (char))) < 0) 19563 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
20325 { 19564 {
20326 long int i = longval (); 19565 long int i = longval ();
20327 if (i != ((long int) (sizeof (char)))) 19566 if (i != ((long int) (sizeof (ac__type_sizeof_))))
20328 return 1; 19567 return 1;
20329 fprintf (f, "%ld", i); 19568 fprintf (f, "%ld\n", i);
20330 } 19569 }
20331 else 19570 else
20332 { 19571 {
20333 unsigned long int i = ulongval (); 19572 unsigned long int i = ulongval ();
20334 if (i != ((long int) (sizeof (char)))) 19573 if (i != ((long int) (sizeof (ac__type_sizeof_))))
20335 return 1; 19574 return 1;
20336 fprintf (f, "%lu", i); 19575 fprintf (f, "%lu\n", i);
20337 } 19576 }
20338 /* Do not output a trailing newline, as this causes \r\n confusion
20339 on some platforms. */
20340 return ferror (f) || fclose (f) != 0; 19577 return ferror (f) || fclose (f) != 0;
20341 19578
20342 ; 19579 ;
@@ -20349,46 +19586,43 @@ case "(($ac_try" in
20349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20350 *) ac_try_echo=$ac_try;; 19587 *) ac_try_echo=$ac_try;;
20351esac 19588esac
20352eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20353$as_echo "$ac_try_echo") >&5
20354 (eval "$ac_link") 2>&5 19590 (eval "$ac_link") 2>&5
20355 ac_status=$? 19591 ac_status=$?
20356 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20357 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 19593 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20358 { (case "(($ac_try" in 19594 { (case "(($ac_try" in
20359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20360 *) ac_try_echo=$ac_try;; 19596 *) ac_try_echo=$ac_try;;
20361esac 19597esac
20362eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20363$as_echo "$ac_try_echo") >&5
20364 (eval "$ac_try") 2>&5 19599 (eval "$ac_try") 2>&5
20365 ac_status=$? 19600 ac_status=$?
20366 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20367 (exit $ac_status); }; }; then 19602 (exit $ac_status); }; }; then
20368 ac_cv_sizeof_char=`cat conftest.val` 19603 ac_cv_sizeof_char=`cat conftest.val`
20369else 19604else
20370 $as_echo "$as_me: program exited with status $ac_status" >&5 19605 echo "$as_me: program exited with status $ac_status" >&5
20371$as_echo "$as_me: failed program was:" >&5 19606echo "$as_me: failed program was:" >&5
20372sed 's/^/| /' conftest.$ac_ext >&5 19607sed 's/^/| /' conftest.$ac_ext >&5
20373 19608
20374( exit $ac_status ) 19609( exit $ac_status )
20375if test "$ac_cv_type_char" = yes; then 19610if test "$ac_cv_type_char" = yes; then
20376 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (char) 19611 { { echo "$as_me:$LINENO: error: cannot compute sizeof (char)
20377See \`config.log' for more details." >&5 19612See \`config.log' for more details." >&5
20378$as_echo "$as_me: error: cannot compute sizeof (char) 19613echo "$as_me: error: cannot compute sizeof (char)
20379See \`config.log' for more details." >&2;} 19614See \`config.log' for more details." >&2;}
20380 { (exit 77); exit 77; }; } 19615 { (exit 77); exit 77; }; }
20381 else 19616 else
20382 ac_cv_sizeof_char=0 19617 ac_cv_sizeof_char=0
20383 fi 19618 fi
20384fi 19619fi
20385rm -rf conftest.dSYM
20386rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 19620rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20387fi 19621fi
20388rm -f conftest.val 19622rm -f conftest.val
20389fi 19623fi
20390{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5 19624{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
20391$as_echo "$ac_cv_sizeof_char" >&6; } 19625echo "${ECHO_T}$ac_cv_sizeof_char" >&6; }
20392 19626
20393 19627
20394 19628
@@ -20397,14 +19631,68 @@ cat >>confdefs.h <<_ACEOF
20397_ACEOF 19631_ACEOF
20398 19632
20399 19633
19634{ echo "$as_me:$LINENO: checking for short int" >&5
19635echo $ECHO_N "checking for short int... $ECHO_C" >&6; }
19636if test "${ac_cv_type_short_int+set}" = set; then
19637 echo $ECHO_N "(cached) $ECHO_C" >&6
19638else
19639 cat >conftest.$ac_ext <<_ACEOF
19640/* confdefs.h. */
19641_ACEOF
19642cat confdefs.h >>conftest.$ac_ext
19643cat >>conftest.$ac_ext <<_ACEOF
19644/* end confdefs.h. */
19645$ac_includes_default
19646typedef short int ac__type_new_;
19647int
19648main ()
19649{
19650if ((ac__type_new_ *) 0)
19651 return 0;
19652if (sizeof (ac__type_new_))
19653 return 0;
19654 ;
19655 return 0;
19656}
19657_ACEOF
19658rm -f conftest.$ac_objext
19659if { (ac_try="$ac_compile"
19660case "(($ac_try" in
19661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19662 *) ac_try_echo=$ac_try;;
19663esac
19664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19665 (eval "$ac_compile") 2>conftest.er1
19666 ac_status=$?
19667 grep -v '^ *+' conftest.er1 >conftest.err
19668 rm -f conftest.er1
19669 cat conftest.err >&5
19670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19671 (exit $ac_status); } && {
19672 test -z "$ac_c_werror_flag" ||
19673 test ! -s conftest.err
19674 } && test -s conftest.$ac_objext; then
19675 ac_cv_type_short_int=yes
19676else
19677 echo "$as_me: failed program was:" >&5
19678sed 's/^/| /' conftest.$ac_ext >&5
19679
19680 ac_cv_type_short_int=no
19681fi
19682
19683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19684fi
19685{ echo "$as_me:$LINENO: result: $ac_cv_type_short_int" >&5
19686echo "${ECHO_T}$ac_cv_type_short_int" >&6; }
19687
20400# The cast to long int works around a bug in the HP C Compiler 19688# The cast to long int works around a bug in the HP C Compiler
20401# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 19689# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
20402# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 19690# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20403# This bug is HP SR number 8606223364. 19691# This bug is HP SR number 8606223364.
20404{ $as_echo "$as_me:$LINENO: checking size of short int" >&5 19692{ echo "$as_me:$LINENO: checking size of short int" >&5
20405$as_echo_n "checking size of short int... " >&6; } 19693echo $ECHO_N "checking size of short int... $ECHO_C" >&6; }
20406if test "${ac_cv_sizeof_short_int+set}" = set; then 19694if test "${ac_cv_sizeof_short_int+set}" = set; then
20407 $as_echo_n "(cached) " >&6 19695 echo $ECHO_N "(cached) $ECHO_C" >&6
20408else 19696else
20409 if test "$cross_compiling" = yes; then 19697 if test "$cross_compiling" = yes; then
20410 # Depending upon the size, compute the lo and hi bounds. 19698 # Depending upon the size, compute the lo and hi bounds.
@@ -20415,10 +19703,11 @@ cat confdefs.h >>conftest.$ac_ext
20415cat >>conftest.$ac_ext <<_ACEOF 19703cat >>conftest.$ac_ext <<_ACEOF
20416/* end confdefs.h. */ 19704/* end confdefs.h. */
20417$ac_includes_default 19705$ac_includes_default
19706 typedef short int ac__type_sizeof_;
20418int 19707int
20419main () 19708main ()
20420{ 19709{
20421static int test_array [1 - 2 * !(((long int) (sizeof (short int))) >= 0)]; 19710static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
20422test_array [0] = 0 19711test_array [0] = 0
20423 19712
20424 ; 19713 ;
@@ -20431,14 +19720,13 @@ case "(($ac_try" in
20431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20432 *) ac_try_echo=$ac_try;; 19721 *) ac_try_echo=$ac_try;;
20433esac 19722esac
20434eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20435$as_echo "$ac_try_echo") >&5
20436 (eval "$ac_compile") 2>conftest.er1 19724 (eval "$ac_compile") 2>conftest.er1
20437 ac_status=$? 19725 ac_status=$?
20438 grep -v '^ *+' conftest.er1 >conftest.err 19726 grep -v '^ *+' conftest.er1 >conftest.err
20439 rm -f conftest.er1 19727 rm -f conftest.er1
20440 cat conftest.err >&5 19728 cat conftest.err >&5
20441 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20442 (exit $ac_status); } && { 19730 (exit $ac_status); } && {
20443 test -z "$ac_c_werror_flag" || 19731 test -z "$ac_c_werror_flag" ||
20444 test ! -s conftest.err 19732 test ! -s conftest.err
@@ -20452,10 +19740,11 @@ cat confdefs.h >>conftest.$ac_ext
20452cat >>conftest.$ac_ext <<_ACEOF 19740cat >>conftest.$ac_ext <<_ACEOF
20453/* end confdefs.h. */ 19741/* end confdefs.h. */
20454$ac_includes_default 19742$ac_includes_default
19743 typedef short int ac__type_sizeof_;
20455int 19744int
20456main () 19745main ()
20457{ 19746{
20458static int test_array [1 - 2 * !(((long int) (sizeof (short int))) <= $ac_mid)]; 19747static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20459test_array [0] = 0 19748test_array [0] = 0
20460 19749
20461 ; 19750 ;
@@ -20468,21 +19757,20 @@ case "(($ac_try" in
20468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20469 *) ac_try_echo=$ac_try;; 19758 *) ac_try_echo=$ac_try;;
20470esac 19759esac
20471eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20472$as_echo "$ac_try_echo") >&5
20473 (eval "$ac_compile") 2>conftest.er1 19761 (eval "$ac_compile") 2>conftest.er1
20474 ac_status=$? 19762 ac_status=$?
20475 grep -v '^ *+' conftest.er1 >conftest.err 19763 grep -v '^ *+' conftest.er1 >conftest.err
20476 rm -f conftest.er1 19764 rm -f conftest.er1
20477 cat conftest.err >&5 19765 cat conftest.err >&5
20478 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20479 (exit $ac_status); } && { 19767 (exit $ac_status); } && {
20480 test -z "$ac_c_werror_flag" || 19768 test -z "$ac_c_werror_flag" ||
20481 test ! -s conftest.err 19769 test ! -s conftest.err
20482 } && test -s conftest.$ac_objext; then 19770 } && test -s conftest.$ac_objext; then
20483 ac_hi=$ac_mid; break 19771 ac_hi=$ac_mid; break
20484else 19772else
20485 $as_echo "$as_me: failed program was:" >&5 19773 echo "$as_me: failed program was:" >&5
20486sed 's/^/| /' conftest.$ac_ext >&5 19774sed 's/^/| /' conftest.$ac_ext >&5
20487 19775
20488 ac_lo=`expr $ac_mid + 1` 19776 ac_lo=`expr $ac_mid + 1`
@@ -20496,7 +19784,7 @@ fi
20496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20497 done 19785 done
20498else 19786else
20499 $as_echo "$as_me: failed program was:" >&5 19787 echo "$as_me: failed program was:" >&5
20500sed 's/^/| /' conftest.$ac_ext >&5 19788sed 's/^/| /' conftest.$ac_ext >&5
20501 19789
20502 cat >conftest.$ac_ext <<_ACEOF 19790 cat >conftest.$ac_ext <<_ACEOF
@@ -20506,10 +19794,11 @@ cat confdefs.h >>conftest.$ac_ext
20506cat >>conftest.$ac_ext <<_ACEOF 19794cat >>conftest.$ac_ext <<_ACEOF
20507/* end confdefs.h. */ 19795/* end confdefs.h. */
20508$ac_includes_default 19796$ac_includes_default
19797 typedef short int ac__type_sizeof_;
20509int 19798int
20510main () 19799main ()
20511{ 19800{
20512static int test_array [1 - 2 * !(((long int) (sizeof (short int))) < 0)]; 19801static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
20513test_array [0] = 0 19802test_array [0] = 0
20514 19803
20515 ; 19804 ;
@@ -20522,14 +19811,13 @@ case "(($ac_try" in
20522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20523 *) ac_try_echo=$ac_try;; 19812 *) ac_try_echo=$ac_try;;
20524esac 19813esac
20525eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20526$as_echo "$ac_try_echo") >&5
20527 (eval "$ac_compile") 2>conftest.er1 19815 (eval "$ac_compile") 2>conftest.er1
20528 ac_status=$? 19816 ac_status=$?
20529 grep -v '^ *+' conftest.er1 >conftest.err 19817 grep -v '^ *+' conftest.er1 >conftest.err
20530 rm -f conftest.er1 19818 rm -f conftest.er1
20531 cat conftest.err >&5 19819 cat conftest.err >&5
20532 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20533 (exit $ac_status); } && { 19821 (exit $ac_status); } && {
20534 test -z "$ac_c_werror_flag" || 19822 test -z "$ac_c_werror_flag" ||
20535 test ! -s conftest.err 19823 test ! -s conftest.err
@@ -20543,10 +19831,11 @@ cat confdefs.h >>conftest.$ac_ext
20543cat >>conftest.$ac_ext <<_ACEOF 19831cat >>conftest.$ac_ext <<_ACEOF
20544/* end confdefs.h. */ 19832/* end confdefs.h. */
20545$ac_includes_default 19833$ac_includes_default
19834 typedef short int ac__type_sizeof_;
20546int 19835int
20547main () 19836main ()
20548{ 19837{
20549static int test_array [1 - 2 * !(((long int) (sizeof (short int))) >= $ac_mid)]; 19838static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
20550test_array [0] = 0 19839test_array [0] = 0
20551 19840
20552 ; 19841 ;
@@ -20559,21 +19848,20 @@ case "(($ac_try" in
20559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20560 *) ac_try_echo=$ac_try;; 19849 *) ac_try_echo=$ac_try;;
20561esac 19850esac
20562eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20563$as_echo "$ac_try_echo") >&5
20564 (eval "$ac_compile") 2>conftest.er1 19852 (eval "$ac_compile") 2>conftest.er1
20565 ac_status=$? 19853 ac_status=$?
20566 grep -v '^ *+' conftest.er1 >conftest.err 19854 grep -v '^ *+' conftest.er1 >conftest.err
20567 rm -f conftest.er1 19855 rm -f conftest.er1
20568 cat conftest.err >&5 19856 cat conftest.err >&5
20569 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20570 (exit $ac_status); } && { 19858 (exit $ac_status); } && {
20571 test -z "$ac_c_werror_flag" || 19859 test -z "$ac_c_werror_flag" ||
20572 test ! -s conftest.err 19860 test ! -s conftest.err
20573 } && test -s conftest.$ac_objext; then 19861 } && test -s conftest.$ac_objext; then
20574 ac_lo=$ac_mid; break 19862 ac_lo=$ac_mid; break
20575else 19863else
20576 $as_echo "$as_me: failed program was:" >&5 19864 echo "$as_me: failed program was:" >&5
20577sed 's/^/| /' conftest.$ac_ext >&5 19865sed 's/^/| /' conftest.$ac_ext >&5
20578 19866
20579 ac_hi=`expr '(' $ac_mid ')' - 1` 19867 ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -20587,7 +19875,7 @@ fi
20587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20588 done 19876 done
20589else 19877else
20590 $as_echo "$as_me: failed program was:" >&5 19878 echo "$as_me: failed program was:" >&5
20591sed 's/^/| /' conftest.$ac_ext >&5 19879sed 's/^/| /' conftest.$ac_ext >&5
20592 19880
20593 ac_lo= ac_hi= 19881 ac_lo= ac_hi=
@@ -20607,10 +19895,11 @@ cat confdefs.h >>conftest.$ac_ext
20607cat >>conftest.$ac_ext <<_ACEOF 19895cat >>conftest.$ac_ext <<_ACEOF
20608/* end confdefs.h. */ 19896/* end confdefs.h. */
20609$ac_includes_default 19897$ac_includes_default
19898 typedef short int ac__type_sizeof_;
20610int 19899int
20611main () 19900main ()
20612{ 19901{
20613static int test_array [1 - 2 * !(((long int) (sizeof (short int))) <= $ac_mid)]; 19902static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20614test_array [0] = 0 19903test_array [0] = 0
20615 19904
20616 ; 19905 ;
@@ -20623,21 +19912,20 @@ case "(($ac_try" in
20623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20624 *) ac_try_echo=$ac_try;; 19913 *) ac_try_echo=$ac_try;;
20625esac 19914esac
20626eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20627$as_echo "$ac_try_echo") >&5
20628 (eval "$ac_compile") 2>conftest.er1 19916 (eval "$ac_compile") 2>conftest.er1
20629 ac_status=$? 19917 ac_status=$?
20630 grep -v '^ *+' conftest.er1 >conftest.err 19918 grep -v '^ *+' conftest.er1 >conftest.err
20631 rm -f conftest.er1 19919 rm -f conftest.er1
20632 cat conftest.err >&5 19920 cat conftest.err >&5
20633 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20634 (exit $ac_status); } && { 19922 (exit $ac_status); } && {
20635 test -z "$ac_c_werror_flag" || 19923 test -z "$ac_c_werror_flag" ||
20636 test ! -s conftest.err 19924 test ! -s conftest.err
20637 } && test -s conftest.$ac_objext; then 19925 } && test -s conftest.$ac_objext; then
20638 ac_hi=$ac_mid 19926 ac_hi=$ac_mid
20639else 19927else
20640 $as_echo "$as_me: failed program was:" >&5 19928 echo "$as_me: failed program was:" >&5
20641sed 's/^/| /' conftest.$ac_ext >&5 19929sed 's/^/| /' conftest.$ac_ext >&5
20642 19930
20643 ac_lo=`expr '(' $ac_mid ')' + 1` 19931 ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -20648,9 +19936,9 @@ done
20648case $ac_lo in 19936case $ac_lo in
20649?*) ac_cv_sizeof_short_int=$ac_lo;; 19937?*) ac_cv_sizeof_short_int=$ac_lo;;
20650'') if test "$ac_cv_type_short_int" = yes; then 19938'') if test "$ac_cv_type_short_int" = yes; then
20651 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short int) 19939 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short int)
20652See \`config.log' for more details." >&5 19940See \`config.log' for more details." >&5
20653$as_echo "$as_me: error: cannot compute sizeof (short int) 19941echo "$as_me: error: cannot compute sizeof (short int)
20654See \`config.log' for more details." >&2;} 19942See \`config.log' for more details." >&2;}
20655 { (exit 77); exit 77; }; } 19943 { (exit 77); exit 77; }; }
20656 else 19944 else
@@ -20665,8 +19953,9 @@ cat confdefs.h >>conftest.$ac_ext
20665cat >>conftest.$ac_ext <<_ACEOF 19953cat >>conftest.$ac_ext <<_ACEOF
20666/* end confdefs.h. */ 19954/* end confdefs.h. */
20667$ac_includes_default 19955$ac_includes_default
20668static long int longval () { return (long int) (sizeof (short int)); } 19956 typedef short int ac__type_sizeof_;
20669static unsigned long int ulongval () { return (long int) (sizeof (short int)); } 19957static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
19958static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
20670#include <stdio.h> 19959#include <stdio.h>
20671#include <stdlib.h> 19960#include <stdlib.h>
20672int 19961int
@@ -20676,22 +19965,20 @@ main ()
20676 FILE *f = fopen ("conftest.val", "w"); 19965 FILE *f = fopen ("conftest.val", "w");
20677 if (! f) 19966 if (! f)
20678 return 1; 19967 return 1;
20679 if (((long int) (sizeof (short int))) < 0) 19968 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
20680 { 19969 {
20681 long int i = longval (); 19970 long int i = longval ();
20682 if (i != ((long int) (sizeof (short int)))) 19971 if (i != ((long int) (sizeof (ac__type_sizeof_))))
20683 return 1; 19972 return 1;
20684 fprintf (f, "%ld", i); 19973 fprintf (f, "%ld\n", i);
20685 } 19974 }
20686 else 19975 else
20687 { 19976 {
20688 unsigned long int i = ulongval (); 19977 unsigned long int i = ulongval ();
20689 if (i != ((long int) (sizeof (short int)))) 19978 if (i != ((long int) (sizeof (ac__type_sizeof_))))
20690 return 1; 19979 return 1;
20691 fprintf (f, "%lu", i); 19980 fprintf (f, "%lu\n", i);
20692 } 19981 }
20693 /* Do not output a trailing newline, as this causes \r\n confusion
20694 on some platforms. */
20695 return ferror (f) || fclose (f) != 0; 19982 return ferror (f) || fclose (f) != 0;
20696 19983
20697 ; 19984 ;
@@ -20704,46 +19991,43 @@ case "(($ac_try" in
20704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20705 *) ac_try_echo=$ac_try;; 19992 *) ac_try_echo=$ac_try;;
20706esac 19993esac
20707eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20708$as_echo "$ac_try_echo") >&5
20709 (eval "$ac_link") 2>&5 19995 (eval "$ac_link") 2>&5
20710 ac_status=$? 19996 ac_status=$?
20711 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20712 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 19998 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20713 { (case "(($ac_try" in 19999 { (case "(($ac_try" in
20714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20715 *) ac_try_echo=$ac_try;; 20001 *) ac_try_echo=$ac_try;;
20716esac 20002esac
20717eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20718$as_echo "$ac_try_echo") >&5
20719 (eval "$ac_try") 2>&5 20004 (eval "$ac_try") 2>&5
20720 ac_status=$? 20005 ac_status=$?
20721 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20722 (exit $ac_status); }; }; then 20007 (exit $ac_status); }; }; then
20723 ac_cv_sizeof_short_int=`cat conftest.val` 20008 ac_cv_sizeof_short_int=`cat conftest.val`
20724else 20009else
20725 $as_echo "$as_me: program exited with status $ac_status" >&5 20010 echo "$as_me: program exited with status $ac_status" >&5
20726$as_echo "$as_me: failed program was:" >&5 20011echo "$as_me: failed program was:" >&5
20727sed 's/^/| /' conftest.$ac_ext >&5 20012sed 's/^/| /' conftest.$ac_ext >&5
20728 20013
20729( exit $ac_status ) 20014( exit $ac_status )
20730if test "$ac_cv_type_short_int" = yes; then 20015if test "$ac_cv_type_short_int" = yes; then
20731 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short int) 20016 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short int)
20732See \`config.log' for more details." >&5 20017See \`config.log' for more details." >&5
20733$as_echo "$as_me: error: cannot compute sizeof (short int) 20018echo "$as_me: error: cannot compute sizeof (short int)
20734See \`config.log' for more details." >&2;} 20019See \`config.log' for more details." >&2;}
20735 { (exit 77); exit 77; }; } 20020 { (exit 77); exit 77; }; }
20736 else 20021 else
20737 ac_cv_sizeof_short_int=0 20022 ac_cv_sizeof_short_int=0
20738 fi 20023 fi
20739fi 20024fi
20740rm -rf conftest.dSYM
20741rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 20025rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20742fi 20026fi
20743rm -f conftest.val 20027rm -f conftest.val
20744fi 20028fi
20745{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short_int" >&5 20029{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short_int" >&5
20746$as_echo "$ac_cv_sizeof_short_int" >&6; } 20030echo "${ECHO_T}$ac_cv_sizeof_short_int" >&6; }
20747 20031
20748 20032
20749 20033
@@ -20752,14 +20036,68 @@ cat >>confdefs.h <<_ACEOF
20752_ACEOF 20036_ACEOF
20753 20037
20754 20038
20039{ echo "$as_me:$LINENO: checking for int" >&5
20040echo $ECHO_N "checking for int... $ECHO_C" >&6; }
20041if test "${ac_cv_type_int+set}" = set; then
20042 echo $ECHO_N "(cached) $ECHO_C" >&6
20043else
20044 cat >conftest.$ac_ext <<_ACEOF
20045/* confdefs.h. */
20046_ACEOF
20047cat confdefs.h >>conftest.$ac_ext
20048cat >>conftest.$ac_ext <<_ACEOF
20049/* end confdefs.h. */
20050$ac_includes_default
20051typedef int ac__type_new_;
20052int
20053main ()
20054{
20055if ((ac__type_new_ *) 0)
20056 return 0;
20057if (sizeof (ac__type_new_))
20058 return 0;
20059 ;
20060 return 0;
20061}
20062_ACEOF
20063rm -f conftest.$ac_objext
20064if { (ac_try="$ac_compile"
20065case "(($ac_try" in
20066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20067 *) ac_try_echo=$ac_try;;
20068esac
20069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20070 (eval "$ac_compile") 2>conftest.er1
20071 ac_status=$?
20072 grep -v '^ *+' conftest.er1 >conftest.err
20073 rm -f conftest.er1
20074 cat conftest.err >&5
20075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20076 (exit $ac_status); } && {
20077 test -z "$ac_c_werror_flag" ||
20078 test ! -s conftest.err
20079 } && test -s conftest.$ac_objext; then
20080 ac_cv_type_int=yes
20081else
20082 echo "$as_me: failed program was:" >&5
20083sed 's/^/| /' conftest.$ac_ext >&5
20084
20085 ac_cv_type_int=no
20086fi
20087
20088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20089fi
20090{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
20091echo "${ECHO_T}$ac_cv_type_int" >&6; }
20092
20755# The cast to long int works around a bug in the HP C Compiler 20093# The cast to long int works around a bug in the HP C Compiler
20756# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 20094# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
20757# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 20095# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20758# This bug is HP SR number 8606223364. 20096# This bug is HP SR number 8606223364.
20759{ $as_echo "$as_me:$LINENO: checking size of int" >&5 20097{ echo "$as_me:$LINENO: checking size of int" >&5
20760$as_echo_n "checking size of int... " >&6; } 20098echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
20761if test "${ac_cv_sizeof_int+set}" = set; then 20099if test "${ac_cv_sizeof_int+set}" = set; then
20762 $as_echo_n "(cached) " >&6 20100 echo $ECHO_N "(cached) $ECHO_C" >&6
20763else 20101else
20764 if test "$cross_compiling" = yes; then 20102 if test "$cross_compiling" = yes; then
20765 # Depending upon the size, compute the lo and hi bounds. 20103 # Depending upon the size, compute the lo and hi bounds.
@@ -20770,10 +20108,11 @@ cat confdefs.h >>conftest.$ac_ext
20770cat >>conftest.$ac_ext <<_ACEOF 20108cat >>conftest.$ac_ext <<_ACEOF
20771/* end confdefs.h. */ 20109/* end confdefs.h. */
20772$ac_includes_default 20110$ac_includes_default
20111 typedef int ac__type_sizeof_;
20773int 20112int
20774main () 20113main ()
20775{ 20114{
20776static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)]; 20115static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
20777test_array [0] = 0 20116test_array [0] = 0
20778 20117
20779 ; 20118 ;
@@ -20786,14 +20125,13 @@ case "(($ac_try" in
20786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20787 *) ac_try_echo=$ac_try;; 20126 *) ac_try_echo=$ac_try;;
20788esac 20127esac
20789eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20790$as_echo "$ac_try_echo") >&5
20791 (eval "$ac_compile") 2>conftest.er1 20129 (eval "$ac_compile") 2>conftest.er1
20792 ac_status=$? 20130 ac_status=$?
20793 grep -v '^ *+' conftest.er1 >conftest.err 20131 grep -v '^ *+' conftest.er1 >conftest.err
20794 rm -f conftest.er1 20132 rm -f conftest.er1
20795 cat conftest.err >&5 20133 cat conftest.err >&5
20796 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20797 (exit $ac_status); } && { 20135 (exit $ac_status); } && {
20798 test -z "$ac_c_werror_flag" || 20136 test -z "$ac_c_werror_flag" ||
20799 test ! -s conftest.err 20137 test ! -s conftest.err
@@ -20807,10 +20145,11 @@ cat confdefs.h >>conftest.$ac_ext
20807cat >>conftest.$ac_ext <<_ACEOF 20145cat >>conftest.$ac_ext <<_ACEOF
20808/* end confdefs.h. */ 20146/* end confdefs.h. */
20809$ac_includes_default 20147$ac_includes_default
20148 typedef int ac__type_sizeof_;
20810int 20149int
20811main () 20150main ()
20812{ 20151{
20813static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; 20152static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20814test_array [0] = 0 20153test_array [0] = 0
20815 20154
20816 ; 20155 ;
@@ -20823,21 +20162,20 @@ case "(($ac_try" in
20823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20824 *) ac_try_echo=$ac_try;; 20163 *) ac_try_echo=$ac_try;;
20825esac 20164esac
20826eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20827$as_echo "$ac_try_echo") >&5
20828 (eval "$ac_compile") 2>conftest.er1 20166 (eval "$ac_compile") 2>conftest.er1
20829 ac_status=$? 20167 ac_status=$?
20830 grep -v '^ *+' conftest.er1 >conftest.err 20168 grep -v '^ *+' conftest.er1 >conftest.err
20831 rm -f conftest.er1 20169 rm -f conftest.er1
20832 cat conftest.err >&5 20170 cat conftest.err >&5
20833 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20834 (exit $ac_status); } && { 20172 (exit $ac_status); } && {
20835 test -z "$ac_c_werror_flag" || 20173 test -z "$ac_c_werror_flag" ||
20836 test ! -s conftest.err 20174 test ! -s conftest.err
20837 } && test -s conftest.$ac_objext; then 20175 } && test -s conftest.$ac_objext; then
20838 ac_hi=$ac_mid; break 20176 ac_hi=$ac_mid; break
20839else 20177else
20840 $as_echo "$as_me: failed program was:" >&5 20178 echo "$as_me: failed program was:" >&5
20841sed 's/^/| /' conftest.$ac_ext >&5 20179sed 's/^/| /' conftest.$ac_ext >&5
20842 20180
20843 ac_lo=`expr $ac_mid + 1` 20181 ac_lo=`expr $ac_mid + 1`
@@ -20851,7 +20189,7 @@ fi
20851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20852 done 20190 done
20853else 20191else
20854 $as_echo "$as_me: failed program was:" >&5 20192 echo "$as_me: failed program was:" >&5
20855sed 's/^/| /' conftest.$ac_ext >&5 20193sed 's/^/| /' conftest.$ac_ext >&5
20856 20194
20857 cat >conftest.$ac_ext <<_ACEOF 20195 cat >conftest.$ac_ext <<_ACEOF
@@ -20861,10 +20199,11 @@ cat confdefs.h >>conftest.$ac_ext
20861cat >>conftest.$ac_ext <<_ACEOF 20199cat >>conftest.$ac_ext <<_ACEOF
20862/* end confdefs.h. */ 20200/* end confdefs.h. */
20863$ac_includes_default 20201$ac_includes_default
20202 typedef int ac__type_sizeof_;
20864int 20203int
20865main () 20204main ()
20866{ 20205{
20867static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)]; 20206static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
20868test_array [0] = 0 20207test_array [0] = 0
20869 20208
20870 ; 20209 ;
@@ -20877,14 +20216,13 @@ case "(($ac_try" in
20877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20878 *) ac_try_echo=$ac_try;; 20217 *) ac_try_echo=$ac_try;;
20879esac 20218esac
20880eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20881$as_echo "$ac_try_echo") >&5
20882 (eval "$ac_compile") 2>conftest.er1 20220 (eval "$ac_compile") 2>conftest.er1
20883 ac_status=$? 20221 ac_status=$?
20884 grep -v '^ *+' conftest.er1 >conftest.err 20222 grep -v '^ *+' conftest.er1 >conftest.err
20885 rm -f conftest.er1 20223 rm -f conftest.er1
20886 cat conftest.err >&5 20224 cat conftest.err >&5
20887 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20888 (exit $ac_status); } && { 20226 (exit $ac_status); } && {
20889 test -z "$ac_c_werror_flag" || 20227 test -z "$ac_c_werror_flag" ||
20890 test ! -s conftest.err 20228 test ! -s conftest.err
@@ -20898,10 +20236,11 @@ cat confdefs.h >>conftest.$ac_ext
20898cat >>conftest.$ac_ext <<_ACEOF 20236cat >>conftest.$ac_ext <<_ACEOF
20899/* end confdefs.h. */ 20237/* end confdefs.h. */
20900$ac_includes_default 20238$ac_includes_default
20239 typedef int ac__type_sizeof_;
20901int 20240int
20902main () 20241main ()
20903{ 20242{
20904static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)]; 20243static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
20905test_array [0] = 0 20244test_array [0] = 0
20906 20245
20907 ; 20246 ;
@@ -20914,21 +20253,20 @@ case "(($ac_try" in
20914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20915 *) ac_try_echo=$ac_try;; 20254 *) ac_try_echo=$ac_try;;
20916esac 20255esac
20917eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20918$as_echo "$ac_try_echo") >&5
20919 (eval "$ac_compile") 2>conftest.er1 20257 (eval "$ac_compile") 2>conftest.er1
20920 ac_status=$? 20258 ac_status=$?
20921 grep -v '^ *+' conftest.er1 >conftest.err 20259 grep -v '^ *+' conftest.er1 >conftest.err
20922 rm -f conftest.er1 20260 rm -f conftest.er1
20923 cat conftest.err >&5 20261 cat conftest.err >&5
20924 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20925 (exit $ac_status); } && { 20263 (exit $ac_status); } && {
20926 test -z "$ac_c_werror_flag" || 20264 test -z "$ac_c_werror_flag" ||
20927 test ! -s conftest.err 20265 test ! -s conftest.err
20928 } && test -s conftest.$ac_objext; then 20266 } && test -s conftest.$ac_objext; then
20929 ac_lo=$ac_mid; break 20267 ac_lo=$ac_mid; break
20930else 20268else
20931 $as_echo "$as_me: failed program was:" >&5 20269 echo "$as_me: failed program was:" >&5
20932sed 's/^/| /' conftest.$ac_ext >&5 20270sed 's/^/| /' conftest.$ac_ext >&5
20933 20271
20934 ac_hi=`expr '(' $ac_mid ')' - 1` 20272 ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -20942,7 +20280,7 @@ fi
20942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20943 done 20281 done
20944else 20282else
20945 $as_echo "$as_me: failed program was:" >&5 20283 echo "$as_me: failed program was:" >&5
20946sed 's/^/| /' conftest.$ac_ext >&5 20284sed 's/^/| /' conftest.$ac_ext >&5
20947 20285
20948 ac_lo= ac_hi= 20286 ac_lo= ac_hi=
@@ -20962,10 +20300,11 @@ cat confdefs.h >>conftest.$ac_ext
20962cat >>conftest.$ac_ext <<_ACEOF 20300cat >>conftest.$ac_ext <<_ACEOF
20963/* end confdefs.h. */ 20301/* end confdefs.h. */
20964$ac_includes_default 20302$ac_includes_default
20303 typedef int ac__type_sizeof_;
20965int 20304int
20966main () 20305main ()
20967{ 20306{
20968static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; 20307static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20969test_array [0] = 0 20308test_array [0] = 0
20970 20309
20971 ; 20310 ;
@@ -20978,21 +20317,20 @@ case "(($ac_try" in
20978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20979 *) ac_try_echo=$ac_try;; 20318 *) ac_try_echo=$ac_try;;
20980esac 20319esac
20981eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20982$as_echo "$ac_try_echo") >&5
20983 (eval "$ac_compile") 2>conftest.er1 20321 (eval "$ac_compile") 2>conftest.er1
20984 ac_status=$? 20322 ac_status=$?
20985 grep -v '^ *+' conftest.er1 >conftest.err 20323 grep -v '^ *+' conftest.er1 >conftest.err
20986 rm -f conftest.er1 20324 rm -f conftest.er1
20987 cat conftest.err >&5 20325 cat conftest.err >&5
20988 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20989 (exit $ac_status); } && { 20327 (exit $ac_status); } && {
20990 test -z "$ac_c_werror_flag" || 20328 test -z "$ac_c_werror_flag" ||
20991 test ! -s conftest.err 20329 test ! -s conftest.err
20992 } && test -s conftest.$ac_objext; then 20330 } && test -s conftest.$ac_objext; then
20993 ac_hi=$ac_mid 20331 ac_hi=$ac_mid
20994else 20332else
20995 $as_echo "$as_me: failed program was:" >&5 20333 echo "$as_me: failed program was:" >&5
20996sed 's/^/| /' conftest.$ac_ext >&5 20334sed 's/^/| /' conftest.$ac_ext >&5
20997 20335
20998 ac_lo=`expr '(' $ac_mid ')' + 1` 20336 ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -21003,9 +20341,9 @@ done
21003case $ac_lo in 20341case $ac_lo in
21004?*) ac_cv_sizeof_int=$ac_lo;; 20342?*) ac_cv_sizeof_int=$ac_lo;;
21005'') if test "$ac_cv_type_int" = yes; then 20343'') if test "$ac_cv_type_int" = yes; then
21006 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) 20344 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
21007See \`config.log' for more details." >&5 20345See \`config.log' for more details." >&5
21008$as_echo "$as_me: error: cannot compute sizeof (int) 20346echo "$as_me: error: cannot compute sizeof (int)
21009See \`config.log' for more details." >&2;} 20347See \`config.log' for more details." >&2;}
21010 { (exit 77); exit 77; }; } 20348 { (exit 77); exit 77; }; }
21011 else 20349 else
@@ -21020,8 +20358,9 @@ cat confdefs.h >>conftest.$ac_ext
21020cat >>conftest.$ac_ext <<_ACEOF 20358cat >>conftest.$ac_ext <<_ACEOF
21021/* end confdefs.h. */ 20359/* end confdefs.h. */
21022$ac_includes_default 20360$ac_includes_default
21023static long int longval () { return (long int) (sizeof (int)); } 20361 typedef int ac__type_sizeof_;
21024static unsigned long int ulongval () { return (long int) (sizeof (int)); } 20362static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
20363static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
21025#include <stdio.h> 20364#include <stdio.h>
21026#include <stdlib.h> 20365#include <stdlib.h>
21027int 20366int
@@ -21031,22 +20370,20 @@ main ()
21031 FILE *f = fopen ("conftest.val", "w"); 20370 FILE *f = fopen ("conftest.val", "w");
21032 if (! f) 20371 if (! f)
21033 return 1; 20372 return 1;
21034 if (((long int) (sizeof (int))) < 0) 20373 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
21035 { 20374 {
21036 long int i = longval (); 20375 long int i = longval ();
21037 if (i != ((long int) (sizeof (int)))) 20376 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21038 return 1; 20377 return 1;
21039 fprintf (f, "%ld", i); 20378 fprintf (f, "%ld\n", i);
21040 } 20379 }
21041 else 20380 else
21042 { 20381 {
21043 unsigned long int i = ulongval (); 20382 unsigned long int i = ulongval ();
21044 if (i != ((long int) (sizeof (int)))) 20383 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21045 return 1; 20384 return 1;
21046 fprintf (f, "%lu", i); 20385 fprintf (f, "%lu\n", i);
21047 } 20386 }
21048 /* Do not output a trailing newline, as this causes \r\n confusion
21049 on some platforms. */
21050 return ferror (f) || fclose (f) != 0; 20387 return ferror (f) || fclose (f) != 0;
21051 20388
21052 ; 20389 ;
@@ -21059,46 +20396,43 @@ case "(($ac_try" in
21059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21060 *) ac_try_echo=$ac_try;; 20397 *) ac_try_echo=$ac_try;;
21061esac 20398esac
21062eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21063$as_echo "$ac_try_echo") >&5
21064 (eval "$ac_link") 2>&5 20400 (eval "$ac_link") 2>&5
21065 ac_status=$? 20401 ac_status=$?
21066 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21067 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 20403 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21068 { (case "(($ac_try" in 20404 { (case "(($ac_try" in
21069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21070 *) ac_try_echo=$ac_try;; 20406 *) ac_try_echo=$ac_try;;
21071esac 20407esac
21072eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21073$as_echo "$ac_try_echo") >&5
21074 (eval "$ac_try") 2>&5 20409 (eval "$ac_try") 2>&5
21075 ac_status=$? 20410 ac_status=$?
21076 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21077 (exit $ac_status); }; }; then 20412 (exit $ac_status); }; }; then
21078 ac_cv_sizeof_int=`cat conftest.val` 20413 ac_cv_sizeof_int=`cat conftest.val`
21079else 20414else
21080 $as_echo "$as_me: program exited with status $ac_status" >&5 20415 echo "$as_me: program exited with status $ac_status" >&5
21081$as_echo "$as_me: failed program was:" >&5 20416echo "$as_me: failed program was:" >&5
21082sed 's/^/| /' conftest.$ac_ext >&5 20417sed 's/^/| /' conftest.$ac_ext >&5
21083 20418
21084( exit $ac_status ) 20419( exit $ac_status )
21085if test "$ac_cv_type_int" = yes; then 20420if test "$ac_cv_type_int" = yes; then
21086 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) 20421 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
21087See \`config.log' for more details." >&5 20422See \`config.log' for more details." >&5
21088$as_echo "$as_me: error: cannot compute sizeof (int) 20423echo "$as_me: error: cannot compute sizeof (int)
21089See \`config.log' for more details." >&2;} 20424See \`config.log' for more details." >&2;}
21090 { (exit 77); exit 77; }; } 20425 { (exit 77); exit 77; }; }
21091 else 20426 else
21092 ac_cv_sizeof_int=0 20427 ac_cv_sizeof_int=0
21093 fi 20428 fi
21094fi 20429fi
21095rm -rf conftest.dSYM
21096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 20430rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21097fi 20431fi
21098rm -f conftest.val 20432rm -f conftest.val
21099fi 20433fi
21100{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 20434{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
21101$as_echo "$ac_cv_sizeof_int" >&6; } 20435echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
21102 20436
21103 20437
21104 20438
@@ -21107,14 +20441,68 @@ cat >>confdefs.h <<_ACEOF
21107_ACEOF 20441_ACEOF
21108 20442
21109 20443
20444{ echo "$as_me:$LINENO: checking for long int" >&5
20445echo $ECHO_N "checking for long int... $ECHO_C" >&6; }
20446if test "${ac_cv_type_long_int+set}" = set; then
20447 echo $ECHO_N "(cached) $ECHO_C" >&6
20448else
20449 cat >conftest.$ac_ext <<_ACEOF
20450/* confdefs.h. */
20451_ACEOF
20452cat confdefs.h >>conftest.$ac_ext
20453cat >>conftest.$ac_ext <<_ACEOF
20454/* end confdefs.h. */
20455$ac_includes_default
20456typedef long int ac__type_new_;
20457int
20458main ()
20459{
20460if ((ac__type_new_ *) 0)
20461 return 0;
20462if (sizeof (ac__type_new_))
20463 return 0;
20464 ;
20465 return 0;
20466}
20467_ACEOF
20468rm -f conftest.$ac_objext
20469if { (ac_try="$ac_compile"
20470case "(($ac_try" in
20471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20472 *) ac_try_echo=$ac_try;;
20473esac
20474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20475 (eval "$ac_compile") 2>conftest.er1
20476 ac_status=$?
20477 grep -v '^ *+' conftest.er1 >conftest.err
20478 rm -f conftest.er1
20479 cat conftest.err >&5
20480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20481 (exit $ac_status); } && {
20482 test -z "$ac_c_werror_flag" ||
20483 test ! -s conftest.err
20484 } && test -s conftest.$ac_objext; then
20485 ac_cv_type_long_int=yes
20486else
20487 echo "$as_me: failed program was:" >&5
20488sed 's/^/| /' conftest.$ac_ext >&5
20489
20490 ac_cv_type_long_int=no
20491fi
20492
20493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20494fi
20495{ echo "$as_me:$LINENO: result: $ac_cv_type_long_int" >&5
20496echo "${ECHO_T}$ac_cv_type_long_int" >&6; }
20497
21110# The cast to long int works around a bug in the HP C Compiler 20498# The cast to long int works around a bug in the HP C Compiler
21111# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 20499# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21112# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 20500# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21113# This bug is HP SR number 8606223364. 20501# This bug is HP SR number 8606223364.
21114{ $as_echo "$as_me:$LINENO: checking size of long int" >&5 20502{ echo "$as_me:$LINENO: checking size of long int" >&5
21115$as_echo_n "checking size of long int... " >&6; } 20503echo $ECHO_N "checking size of long int... $ECHO_C" >&6; }
21116if test "${ac_cv_sizeof_long_int+set}" = set; then 20504if test "${ac_cv_sizeof_long_int+set}" = set; then
21117 $as_echo_n "(cached) " >&6 20505 echo $ECHO_N "(cached) $ECHO_C" >&6
21118else 20506else
21119 if test "$cross_compiling" = yes; then 20507 if test "$cross_compiling" = yes; then
21120 # Depending upon the size, compute the lo and hi bounds. 20508 # Depending upon the size, compute the lo and hi bounds.
@@ -21125,10 +20513,11 @@ cat confdefs.h >>conftest.$ac_ext
21125cat >>conftest.$ac_ext <<_ACEOF 20513cat >>conftest.$ac_ext <<_ACEOF
21126/* end confdefs.h. */ 20514/* end confdefs.h. */
21127$ac_includes_default 20515$ac_includes_default
20516 typedef long int ac__type_sizeof_;
21128int 20517int
21129main () 20518main ()
21130{ 20519{
21131static int test_array [1 - 2 * !(((long int) (sizeof (long int))) >= 0)]; 20520static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
21132test_array [0] = 0 20521test_array [0] = 0
21133 20522
21134 ; 20523 ;
@@ -21141,14 +20530,13 @@ case "(($ac_try" in
21141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21142 *) ac_try_echo=$ac_try;; 20531 *) ac_try_echo=$ac_try;;
21143esac 20532esac
21144eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21145$as_echo "$ac_try_echo") >&5
21146 (eval "$ac_compile") 2>conftest.er1 20534 (eval "$ac_compile") 2>conftest.er1
21147 ac_status=$? 20535 ac_status=$?
21148 grep -v '^ *+' conftest.er1 >conftest.err 20536 grep -v '^ *+' conftest.er1 >conftest.err
21149 rm -f conftest.er1 20537 rm -f conftest.er1
21150 cat conftest.err >&5 20538 cat conftest.err >&5
21151 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21152 (exit $ac_status); } && { 20540 (exit $ac_status); } && {
21153 test -z "$ac_c_werror_flag" || 20541 test -z "$ac_c_werror_flag" ||
21154 test ! -s conftest.err 20542 test ! -s conftest.err
@@ -21162,10 +20550,11 @@ cat confdefs.h >>conftest.$ac_ext
21162cat >>conftest.$ac_ext <<_ACEOF 20550cat >>conftest.$ac_ext <<_ACEOF
21163/* end confdefs.h. */ 20551/* end confdefs.h. */
21164$ac_includes_default 20552$ac_includes_default
20553 typedef long int ac__type_sizeof_;
21165int 20554int
21166main () 20555main ()
21167{ 20556{
21168static int test_array [1 - 2 * !(((long int) (sizeof (long int))) <= $ac_mid)]; 20557static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
21169test_array [0] = 0 20558test_array [0] = 0
21170 20559
21171 ; 20560 ;
@@ -21178,21 +20567,20 @@ case "(($ac_try" in
21178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21179 *) ac_try_echo=$ac_try;; 20568 *) ac_try_echo=$ac_try;;
21180esac 20569esac
21181eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21182$as_echo "$ac_try_echo") >&5
21183 (eval "$ac_compile") 2>conftest.er1 20571 (eval "$ac_compile") 2>conftest.er1
21184 ac_status=$? 20572 ac_status=$?
21185 grep -v '^ *+' conftest.er1 >conftest.err 20573 grep -v '^ *+' conftest.er1 >conftest.err
21186 rm -f conftest.er1 20574 rm -f conftest.er1
21187 cat conftest.err >&5 20575 cat conftest.err >&5
21188 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21189 (exit $ac_status); } && { 20577 (exit $ac_status); } && {
21190 test -z "$ac_c_werror_flag" || 20578 test -z "$ac_c_werror_flag" ||
21191 test ! -s conftest.err 20579 test ! -s conftest.err
21192 } && test -s conftest.$ac_objext; then 20580 } && test -s conftest.$ac_objext; then
21193 ac_hi=$ac_mid; break 20581 ac_hi=$ac_mid; break
21194else 20582else
21195 $as_echo "$as_me: failed program was:" >&5 20583 echo "$as_me: failed program was:" >&5
21196sed 's/^/| /' conftest.$ac_ext >&5 20584sed 's/^/| /' conftest.$ac_ext >&5
21197 20585
21198 ac_lo=`expr $ac_mid + 1` 20586 ac_lo=`expr $ac_mid + 1`
@@ -21206,7 +20594,7 @@ fi
21206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21207 done 20595 done
21208else 20596else
21209 $as_echo "$as_me: failed program was:" >&5 20597 echo "$as_me: failed program was:" >&5
21210sed 's/^/| /' conftest.$ac_ext >&5 20598sed 's/^/| /' conftest.$ac_ext >&5
21211 20599
21212 cat >conftest.$ac_ext <<_ACEOF 20600 cat >conftest.$ac_ext <<_ACEOF
@@ -21216,10 +20604,11 @@ cat confdefs.h >>conftest.$ac_ext
21216cat >>conftest.$ac_ext <<_ACEOF 20604cat >>conftest.$ac_ext <<_ACEOF
21217/* end confdefs.h. */ 20605/* end confdefs.h. */
21218$ac_includes_default 20606$ac_includes_default
20607 typedef long int ac__type_sizeof_;
21219int 20608int
21220main () 20609main ()
21221{ 20610{
21222static int test_array [1 - 2 * !(((long int) (sizeof (long int))) < 0)]; 20611static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
21223test_array [0] = 0 20612test_array [0] = 0
21224 20613
21225 ; 20614 ;
@@ -21232,14 +20621,13 @@ case "(($ac_try" in
21232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21233 *) ac_try_echo=$ac_try;; 20622 *) ac_try_echo=$ac_try;;
21234esac 20623esac
21235eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21236$as_echo "$ac_try_echo") >&5
21237 (eval "$ac_compile") 2>conftest.er1 20625 (eval "$ac_compile") 2>conftest.er1
21238 ac_status=$? 20626 ac_status=$?
21239 grep -v '^ *+' conftest.er1 >conftest.err 20627 grep -v '^ *+' conftest.er1 >conftest.err
21240 rm -f conftest.er1 20628 rm -f conftest.er1
21241 cat conftest.err >&5 20629 cat conftest.err >&5
21242 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21243 (exit $ac_status); } && { 20631 (exit $ac_status); } && {
21244 test -z "$ac_c_werror_flag" || 20632 test -z "$ac_c_werror_flag" ||
21245 test ! -s conftest.err 20633 test ! -s conftest.err
@@ -21253,10 +20641,11 @@ cat confdefs.h >>conftest.$ac_ext
21253cat >>conftest.$ac_ext <<_ACEOF 20641cat >>conftest.$ac_ext <<_ACEOF
21254/* end confdefs.h. */ 20642/* end confdefs.h. */
21255$ac_includes_default 20643$ac_includes_default
20644 typedef long int ac__type_sizeof_;
21256int 20645int
21257main () 20646main ()
21258{ 20647{
21259static int test_array [1 - 2 * !(((long int) (sizeof (long int))) >= $ac_mid)]; 20648static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
21260test_array [0] = 0 20649test_array [0] = 0
21261 20650
21262 ; 20651 ;
@@ -21269,21 +20658,20 @@ case "(($ac_try" in
21269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21270 *) ac_try_echo=$ac_try;; 20659 *) ac_try_echo=$ac_try;;
21271esac 20660esac
21272eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21273$as_echo "$ac_try_echo") >&5
21274 (eval "$ac_compile") 2>conftest.er1 20662 (eval "$ac_compile") 2>conftest.er1
21275 ac_status=$? 20663 ac_status=$?
21276 grep -v '^ *+' conftest.er1 >conftest.err 20664 grep -v '^ *+' conftest.er1 >conftest.err
21277 rm -f conftest.er1 20665 rm -f conftest.er1
21278 cat conftest.err >&5 20666 cat conftest.err >&5
21279 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21280 (exit $ac_status); } && { 20668 (exit $ac_status); } && {
21281 test -z "$ac_c_werror_flag" || 20669 test -z "$ac_c_werror_flag" ||
21282 test ! -s conftest.err 20670 test ! -s conftest.err
21283 } && test -s conftest.$ac_objext; then 20671 } && test -s conftest.$ac_objext; then
21284 ac_lo=$ac_mid; break 20672 ac_lo=$ac_mid; break
21285else 20673else
21286 $as_echo "$as_me: failed program was:" >&5 20674 echo "$as_me: failed program was:" >&5
21287sed 's/^/| /' conftest.$ac_ext >&5 20675sed 's/^/| /' conftest.$ac_ext >&5
21288 20676
21289 ac_hi=`expr '(' $ac_mid ')' - 1` 20677 ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -21297,7 +20685,7 @@ fi
21297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21298 done 20686 done
21299else 20687else
21300 $as_echo "$as_me: failed program was:" >&5 20688 echo "$as_me: failed program was:" >&5
21301sed 's/^/| /' conftest.$ac_ext >&5 20689sed 's/^/| /' conftest.$ac_ext >&5
21302 20690
21303 ac_lo= ac_hi= 20691 ac_lo= ac_hi=
@@ -21317,10 +20705,11 @@ cat confdefs.h >>conftest.$ac_ext
21317cat >>conftest.$ac_ext <<_ACEOF 20705cat >>conftest.$ac_ext <<_ACEOF
21318/* end confdefs.h. */ 20706/* end confdefs.h. */
21319$ac_includes_default 20707$ac_includes_default
20708 typedef long int ac__type_sizeof_;
21320int 20709int
21321main () 20710main ()
21322{ 20711{
21323static int test_array [1 - 2 * !(((long int) (sizeof (long int))) <= $ac_mid)]; 20712static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
21324test_array [0] = 0 20713test_array [0] = 0
21325 20714
21326 ; 20715 ;
@@ -21333,21 +20722,20 @@ case "(($ac_try" in
21333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21334 *) ac_try_echo=$ac_try;; 20723 *) ac_try_echo=$ac_try;;
21335esac 20724esac
21336eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21337$as_echo "$ac_try_echo") >&5
21338 (eval "$ac_compile") 2>conftest.er1 20726 (eval "$ac_compile") 2>conftest.er1
21339 ac_status=$? 20727 ac_status=$?
21340 grep -v '^ *+' conftest.er1 >conftest.err 20728 grep -v '^ *+' conftest.er1 >conftest.err
21341 rm -f conftest.er1 20729 rm -f conftest.er1
21342 cat conftest.err >&5 20730 cat conftest.err >&5
21343 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21344 (exit $ac_status); } && { 20732 (exit $ac_status); } && {
21345 test -z "$ac_c_werror_flag" || 20733 test -z "$ac_c_werror_flag" ||
21346 test ! -s conftest.err 20734 test ! -s conftest.err
21347 } && test -s conftest.$ac_objext; then 20735 } && test -s conftest.$ac_objext; then
21348 ac_hi=$ac_mid 20736 ac_hi=$ac_mid
21349else 20737else
21350 $as_echo "$as_me: failed program was:" >&5 20738 echo "$as_me: failed program was:" >&5
21351sed 's/^/| /' conftest.$ac_ext >&5 20739sed 's/^/| /' conftest.$ac_ext >&5
21352 20740
21353 ac_lo=`expr '(' $ac_mid ')' + 1` 20741 ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -21358,9 +20746,9 @@ done
21358case $ac_lo in 20746case $ac_lo in
21359?*) ac_cv_sizeof_long_int=$ac_lo;; 20747?*) ac_cv_sizeof_long_int=$ac_lo;;
21360'') if test "$ac_cv_type_long_int" = yes; then 20748'') if test "$ac_cv_type_long_int" = yes; then
21361 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long int) 20749 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int)
21362See \`config.log' for more details." >&5 20750See \`config.log' for more details." >&5
21363$as_echo "$as_me: error: cannot compute sizeof (long int) 20751echo "$as_me: error: cannot compute sizeof (long int)
21364See \`config.log' for more details." >&2;} 20752See \`config.log' for more details." >&2;}
21365 { (exit 77); exit 77; }; } 20753 { (exit 77); exit 77; }; }
21366 else 20754 else
@@ -21375,8 +20763,9 @@ cat confdefs.h >>conftest.$ac_ext
21375cat >>conftest.$ac_ext <<_ACEOF 20763cat >>conftest.$ac_ext <<_ACEOF
21376/* end confdefs.h. */ 20764/* end confdefs.h. */
21377$ac_includes_default 20765$ac_includes_default
21378static long int longval () { return (long int) (sizeof (long int)); } 20766 typedef long int ac__type_sizeof_;
21379static unsigned long int ulongval () { return (long int) (sizeof (long int)); } 20767static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
20768static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
21380#include <stdio.h> 20769#include <stdio.h>
21381#include <stdlib.h> 20770#include <stdlib.h>
21382int 20771int
@@ -21386,22 +20775,20 @@ main ()
21386 FILE *f = fopen ("conftest.val", "w"); 20775 FILE *f = fopen ("conftest.val", "w");
21387 if (! f) 20776 if (! f)
21388 return 1; 20777 return 1;
21389 if (((long int) (sizeof (long int))) < 0) 20778 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
21390 { 20779 {
21391 long int i = longval (); 20780 long int i = longval ();
21392 if (i != ((long int) (sizeof (long int)))) 20781 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21393 return 1; 20782 return 1;
21394 fprintf (f, "%ld", i); 20783 fprintf (f, "%ld\n", i);
21395 } 20784 }
21396 else 20785 else
21397 { 20786 {
21398 unsigned long int i = ulongval (); 20787 unsigned long int i = ulongval ();
21399 if (i != ((long int) (sizeof (long int)))) 20788 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21400 return 1; 20789 return 1;
21401 fprintf (f, "%lu", i); 20790 fprintf (f, "%lu\n", i);
21402 } 20791 }
21403 /* Do not output a trailing newline, as this causes \r\n confusion
21404 on some platforms. */
21405 return ferror (f) || fclose (f) != 0; 20792 return ferror (f) || fclose (f) != 0;
21406 20793
21407 ; 20794 ;
@@ -21414,46 +20801,43 @@ case "(($ac_try" in
21414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21415 *) ac_try_echo=$ac_try;; 20802 *) ac_try_echo=$ac_try;;
21416esac 20803esac
21417eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21418$as_echo "$ac_try_echo") >&5
21419 (eval "$ac_link") 2>&5 20805 (eval "$ac_link") 2>&5
21420 ac_status=$? 20806 ac_status=$?
21421 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21422 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 20808 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21423 { (case "(($ac_try" in 20809 { (case "(($ac_try" in
21424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21425 *) ac_try_echo=$ac_try;; 20811 *) ac_try_echo=$ac_try;;
21426esac 20812esac
21427eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21428$as_echo "$ac_try_echo") >&5
21429 (eval "$ac_try") 2>&5 20814 (eval "$ac_try") 2>&5
21430 ac_status=$? 20815 ac_status=$?
21431 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21432 (exit $ac_status); }; }; then 20817 (exit $ac_status); }; }; then
21433 ac_cv_sizeof_long_int=`cat conftest.val` 20818 ac_cv_sizeof_long_int=`cat conftest.val`
21434else 20819else
21435 $as_echo "$as_me: program exited with status $ac_status" >&5 20820 echo "$as_me: program exited with status $ac_status" >&5
21436$as_echo "$as_me: failed program was:" >&5 20821echo "$as_me: failed program was:" >&5
21437sed 's/^/| /' conftest.$ac_ext >&5 20822sed 's/^/| /' conftest.$ac_ext >&5
21438 20823
21439( exit $ac_status ) 20824( exit $ac_status )
21440if test "$ac_cv_type_long_int" = yes; then 20825if test "$ac_cv_type_long_int" = yes; then
21441 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long int) 20826 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int)
21442See \`config.log' for more details." >&5 20827See \`config.log' for more details." >&5
21443$as_echo "$as_me: error: cannot compute sizeof (long int) 20828echo "$as_me: error: cannot compute sizeof (long int)
21444See \`config.log' for more details." >&2;} 20829See \`config.log' for more details." >&2;}
21445 { (exit 77); exit 77; }; } 20830 { (exit 77); exit 77; }; }
21446 else 20831 else
21447 ac_cv_sizeof_long_int=0 20832 ac_cv_sizeof_long_int=0
21448 fi 20833 fi
21449fi 20834fi
21450rm -rf conftest.dSYM
21451rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 20835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21452fi 20836fi
21453rm -f conftest.val 20837rm -f conftest.val
21454fi 20838fi
21455{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5 20839{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5
21456$as_echo "$ac_cv_sizeof_long_int" >&6; } 20840echo "${ECHO_T}$ac_cv_sizeof_long_int" >&6; }
21457 20841
21458 20842
21459 20843
@@ -21462,14 +20846,68 @@ cat >>confdefs.h <<_ACEOF
21462_ACEOF 20846_ACEOF
21463 20847
21464 20848
20849{ echo "$as_me:$LINENO: checking for long long int" >&5
20850echo $ECHO_N "checking for long long int... $ECHO_C" >&6; }
20851if test "${ac_cv_type_long_long_int+set}" = set; then
20852 echo $ECHO_N "(cached) $ECHO_C" >&6
20853else
20854 cat >conftest.$ac_ext <<_ACEOF
20855/* confdefs.h. */
20856_ACEOF
20857cat confdefs.h >>conftest.$ac_ext
20858cat >>conftest.$ac_ext <<_ACEOF
20859/* end confdefs.h. */
20860$ac_includes_default
20861typedef long long int ac__type_new_;
20862int
20863main ()
20864{
20865if ((ac__type_new_ *) 0)
20866 return 0;
20867if (sizeof (ac__type_new_))
20868 return 0;
20869 ;
20870 return 0;
20871}
20872_ACEOF
20873rm -f conftest.$ac_objext
20874if { (ac_try="$ac_compile"
20875case "(($ac_try" in
20876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20877 *) ac_try_echo=$ac_try;;
20878esac
20879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20880 (eval "$ac_compile") 2>conftest.er1
20881 ac_status=$?
20882 grep -v '^ *+' conftest.er1 >conftest.err
20883 rm -f conftest.er1
20884 cat conftest.err >&5
20885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20886 (exit $ac_status); } && {
20887 test -z "$ac_c_werror_flag" ||
20888 test ! -s conftest.err
20889 } && test -s conftest.$ac_objext; then
20890 ac_cv_type_long_long_int=yes
20891else
20892 echo "$as_me: failed program was:" >&5
20893sed 's/^/| /' conftest.$ac_ext >&5
20894
20895 ac_cv_type_long_long_int=no
20896fi
20897
20898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20899fi
20900{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
20901echo "${ECHO_T}$ac_cv_type_long_long_int" >&6; }
20902
21465# The cast to long int works around a bug in the HP C Compiler 20903# The cast to long int works around a bug in the HP C Compiler
21466# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 20904# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21467# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 20905# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21468# This bug is HP SR number 8606223364. 20906# This bug is HP SR number 8606223364.
21469{ $as_echo "$as_me:$LINENO: checking size of long long int" >&5 20907{ echo "$as_me:$LINENO: checking size of long long int" >&5
21470$as_echo_n "checking size of long long int... " >&6; } 20908echo $ECHO_N "checking size of long long int... $ECHO_C" >&6; }
21471if test "${ac_cv_sizeof_long_long_int+set}" = set; then 20909if test "${ac_cv_sizeof_long_long_int+set}" = set; then
21472 $as_echo_n "(cached) " >&6 20910 echo $ECHO_N "(cached) $ECHO_C" >&6
21473else 20911else
21474 if test "$cross_compiling" = yes; then 20912 if test "$cross_compiling" = yes; then
21475 # Depending upon the size, compute the lo and hi bounds. 20913 # Depending upon the size, compute the lo and hi bounds.
@@ -21480,10 +20918,11 @@ cat confdefs.h >>conftest.$ac_ext
21480cat >>conftest.$ac_ext <<_ACEOF 20918cat >>conftest.$ac_ext <<_ACEOF
21481/* end confdefs.h. */ 20919/* end confdefs.h. */
21482$ac_includes_default 20920$ac_includes_default
20921 typedef long long int ac__type_sizeof_;
21483int 20922int
21484main () 20923main ()
21485{ 20924{
21486static int test_array [1 - 2 * !(((long int) (sizeof (long long int))) >= 0)]; 20925static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
21487test_array [0] = 0 20926test_array [0] = 0
21488 20927
21489 ; 20928 ;
@@ -21496,14 +20935,13 @@ case "(($ac_try" in
21496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21497 *) ac_try_echo=$ac_try;; 20936 *) ac_try_echo=$ac_try;;
21498esac 20937esac
21499eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21500$as_echo "$ac_try_echo") >&5
21501 (eval "$ac_compile") 2>conftest.er1 20939 (eval "$ac_compile") 2>conftest.er1
21502 ac_status=$? 20940 ac_status=$?
21503 grep -v '^ *+' conftest.er1 >conftest.err 20941 grep -v '^ *+' conftest.er1 >conftest.err
21504 rm -f conftest.er1 20942 rm -f conftest.er1
21505 cat conftest.err >&5 20943 cat conftest.err >&5
21506 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21507 (exit $ac_status); } && { 20945 (exit $ac_status); } && {
21508 test -z "$ac_c_werror_flag" || 20946 test -z "$ac_c_werror_flag" ||
21509 test ! -s conftest.err 20947 test ! -s conftest.err
@@ -21517,10 +20955,11 @@ cat confdefs.h >>conftest.$ac_ext
21517cat >>conftest.$ac_ext <<_ACEOF 20955cat >>conftest.$ac_ext <<_ACEOF
21518/* end confdefs.h. */ 20956/* end confdefs.h. */
21519$ac_includes_default 20957$ac_includes_default
20958 typedef long long int ac__type_sizeof_;
21520int 20959int
21521main () 20960main ()
21522{ 20961{
21523static int test_array [1 - 2 * !(((long int) (sizeof (long long int))) <= $ac_mid)]; 20962static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
21524test_array [0] = 0 20963test_array [0] = 0
21525 20964
21526 ; 20965 ;
@@ -21533,21 +20972,20 @@ case "(($ac_try" in
21533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21534 *) ac_try_echo=$ac_try;; 20973 *) ac_try_echo=$ac_try;;
21535esac 20974esac
21536eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21537$as_echo "$ac_try_echo") >&5
21538 (eval "$ac_compile") 2>conftest.er1 20976 (eval "$ac_compile") 2>conftest.er1
21539 ac_status=$? 20977 ac_status=$?
21540 grep -v '^ *+' conftest.er1 >conftest.err 20978 grep -v '^ *+' conftest.er1 >conftest.err
21541 rm -f conftest.er1 20979 rm -f conftest.er1
21542 cat conftest.err >&5 20980 cat conftest.err >&5
21543 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21544 (exit $ac_status); } && { 20982 (exit $ac_status); } && {
21545 test -z "$ac_c_werror_flag" || 20983 test -z "$ac_c_werror_flag" ||
21546 test ! -s conftest.err 20984 test ! -s conftest.err
21547 } && test -s conftest.$ac_objext; then 20985 } && test -s conftest.$ac_objext; then
21548 ac_hi=$ac_mid; break 20986 ac_hi=$ac_mid; break
21549else 20987else
21550 $as_echo "$as_me: failed program was:" >&5 20988 echo "$as_me: failed program was:" >&5
21551sed 's/^/| /' conftest.$ac_ext >&5 20989sed 's/^/| /' conftest.$ac_ext >&5
21552 20990
21553 ac_lo=`expr $ac_mid + 1` 20991 ac_lo=`expr $ac_mid + 1`
@@ -21561,7 +20999,7 @@ fi
21561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21562 done 21000 done
21563else 21001else
21564 $as_echo "$as_me: failed program was:" >&5 21002 echo "$as_me: failed program was:" >&5
21565sed 's/^/| /' conftest.$ac_ext >&5 21003sed 's/^/| /' conftest.$ac_ext >&5
21566 21004
21567 cat >conftest.$ac_ext <<_ACEOF 21005 cat >conftest.$ac_ext <<_ACEOF
@@ -21571,10 +21009,11 @@ cat confdefs.h >>conftest.$ac_ext
21571cat >>conftest.$ac_ext <<_ACEOF 21009cat >>conftest.$ac_ext <<_ACEOF
21572/* end confdefs.h. */ 21010/* end confdefs.h. */
21573$ac_includes_default 21011$ac_includes_default
21012 typedef long long int ac__type_sizeof_;
21574int 21013int
21575main () 21014main ()
21576{ 21015{
21577static int test_array [1 - 2 * !(((long int) (sizeof (long long int))) < 0)]; 21016static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
21578test_array [0] = 0 21017test_array [0] = 0
21579 21018
21580 ; 21019 ;
@@ -21587,14 +21026,13 @@ case "(($ac_try" in
21587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21588 *) ac_try_echo=$ac_try;; 21027 *) ac_try_echo=$ac_try;;
21589esac 21028esac
21590eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21591$as_echo "$ac_try_echo") >&5
21592 (eval "$ac_compile") 2>conftest.er1 21030 (eval "$ac_compile") 2>conftest.er1
21593 ac_status=$? 21031 ac_status=$?
21594 grep -v '^ *+' conftest.er1 >conftest.err 21032 grep -v '^ *+' conftest.er1 >conftest.err
21595 rm -f conftest.er1 21033 rm -f conftest.er1
21596 cat conftest.err >&5 21034 cat conftest.err >&5
21597 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21598 (exit $ac_status); } && { 21036 (exit $ac_status); } && {
21599 test -z "$ac_c_werror_flag" || 21037 test -z "$ac_c_werror_flag" ||
21600 test ! -s conftest.err 21038 test ! -s conftest.err
@@ -21608,10 +21046,11 @@ cat confdefs.h >>conftest.$ac_ext
21608cat >>conftest.$ac_ext <<_ACEOF 21046cat >>conftest.$ac_ext <<_ACEOF
21609/* end confdefs.h. */ 21047/* end confdefs.h. */
21610$ac_includes_default 21048$ac_includes_default
21049 typedef long long int ac__type_sizeof_;
21611int 21050int
21612main () 21051main ()
21613{ 21052{
21614static int test_array [1 - 2 * !(((long int) (sizeof (long long int))) >= $ac_mid)]; 21053static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
21615test_array [0] = 0 21054test_array [0] = 0
21616 21055
21617 ; 21056 ;
@@ -21624,21 +21063,20 @@ case "(($ac_try" in
21624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21625 *) ac_try_echo=$ac_try;; 21064 *) ac_try_echo=$ac_try;;
21626esac 21065esac
21627eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21628$as_echo "$ac_try_echo") >&5
21629 (eval "$ac_compile") 2>conftest.er1 21067 (eval "$ac_compile") 2>conftest.er1
21630 ac_status=$? 21068 ac_status=$?
21631 grep -v '^ *+' conftest.er1 >conftest.err 21069 grep -v '^ *+' conftest.er1 >conftest.err
21632 rm -f conftest.er1 21070 rm -f conftest.er1
21633 cat conftest.err >&5 21071 cat conftest.err >&5
21634 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21635 (exit $ac_status); } && { 21073 (exit $ac_status); } && {
21636 test -z "$ac_c_werror_flag" || 21074 test -z "$ac_c_werror_flag" ||
21637 test ! -s conftest.err 21075 test ! -s conftest.err
21638 } && test -s conftest.$ac_objext; then 21076 } && test -s conftest.$ac_objext; then
21639 ac_lo=$ac_mid; break 21077 ac_lo=$ac_mid; break
21640else 21078else
21641 $as_echo "$as_me: failed program was:" >&5 21079 echo "$as_me: failed program was:" >&5
21642sed 's/^/| /' conftest.$ac_ext >&5 21080sed 's/^/| /' conftest.$ac_ext >&5
21643 21081
21644 ac_hi=`expr '(' $ac_mid ')' - 1` 21082 ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -21652,7 +21090,7 @@ fi
21652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21653 done 21091 done
21654else 21092else
21655 $as_echo "$as_me: failed program was:" >&5 21093 echo "$as_me: failed program was:" >&5
21656sed 's/^/| /' conftest.$ac_ext >&5 21094sed 's/^/| /' conftest.$ac_ext >&5
21657 21095
21658 ac_lo= ac_hi= 21096 ac_lo= ac_hi=
@@ -21672,10 +21110,11 @@ cat confdefs.h >>conftest.$ac_ext
21672cat >>conftest.$ac_ext <<_ACEOF 21110cat >>conftest.$ac_ext <<_ACEOF
21673/* end confdefs.h. */ 21111/* end confdefs.h. */
21674$ac_includes_default 21112$ac_includes_default
21113 typedef long long int ac__type_sizeof_;
21675int 21114int
21676main () 21115main ()
21677{ 21116{
21678static int test_array [1 - 2 * !(((long int) (sizeof (long long int))) <= $ac_mid)]; 21117static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
21679test_array [0] = 0 21118test_array [0] = 0
21680 21119
21681 ; 21120 ;
@@ -21688,21 +21127,20 @@ case "(($ac_try" in
21688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21689 *) ac_try_echo=$ac_try;; 21128 *) ac_try_echo=$ac_try;;
21690esac 21129esac
21691eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21692$as_echo "$ac_try_echo") >&5
21693 (eval "$ac_compile") 2>conftest.er1 21131 (eval "$ac_compile") 2>conftest.er1
21694 ac_status=$? 21132 ac_status=$?
21695 grep -v '^ *+' conftest.er1 >conftest.err 21133 grep -v '^ *+' conftest.er1 >conftest.err
21696 rm -f conftest.er1 21134 rm -f conftest.er1
21697 cat conftest.err >&5 21135 cat conftest.err >&5
21698 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21699 (exit $ac_status); } && { 21137 (exit $ac_status); } && {
21700 test -z "$ac_c_werror_flag" || 21138 test -z "$ac_c_werror_flag" ||
21701 test ! -s conftest.err 21139 test ! -s conftest.err
21702 } && test -s conftest.$ac_objext; then 21140 } && test -s conftest.$ac_objext; then
21703 ac_hi=$ac_mid 21141 ac_hi=$ac_mid
21704else 21142else
21705 $as_echo "$as_me: failed program was:" >&5 21143 echo "$as_me: failed program was:" >&5
21706sed 's/^/| /' conftest.$ac_ext >&5 21144sed 's/^/| /' conftest.$ac_ext >&5
21707 21145
21708 ac_lo=`expr '(' $ac_mid ')' + 1` 21146 ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -21713,9 +21151,9 @@ done
21713case $ac_lo in 21151case $ac_lo in
21714?*) ac_cv_sizeof_long_long_int=$ac_lo;; 21152?*) ac_cv_sizeof_long_long_int=$ac_lo;;
21715'') if test "$ac_cv_type_long_long_int" = yes; then 21153'') if test "$ac_cv_type_long_long_int" = yes; then
21716 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long int) 21154 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int)
21717See \`config.log' for more details." >&5 21155See \`config.log' for more details." >&5
21718$as_echo "$as_me: error: cannot compute sizeof (long long int) 21156echo "$as_me: error: cannot compute sizeof (long long int)
21719See \`config.log' for more details." >&2;} 21157See \`config.log' for more details." >&2;}
21720 { (exit 77); exit 77; }; } 21158 { (exit 77); exit 77; }; }
21721 else 21159 else
@@ -21730,8 +21168,9 @@ cat confdefs.h >>conftest.$ac_ext
21730cat >>conftest.$ac_ext <<_ACEOF 21168cat >>conftest.$ac_ext <<_ACEOF
21731/* end confdefs.h. */ 21169/* end confdefs.h. */
21732$ac_includes_default 21170$ac_includes_default
21733static long int longval () { return (long int) (sizeof (long long int)); } 21171 typedef long long int ac__type_sizeof_;
21734static unsigned long int ulongval () { return (long int) (sizeof (long long int)); } 21172static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21173static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
21735#include <stdio.h> 21174#include <stdio.h>
21736#include <stdlib.h> 21175#include <stdlib.h>
21737int 21176int
@@ -21741,22 +21180,20 @@ main ()
21741 FILE *f = fopen ("conftest.val", "w"); 21180 FILE *f = fopen ("conftest.val", "w");
21742 if (! f) 21181 if (! f)
21743 return 1; 21182 return 1;
21744 if (((long int) (sizeof (long long int))) < 0) 21183 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
21745 { 21184 {
21746 long int i = longval (); 21185 long int i = longval ();
21747 if (i != ((long int) (sizeof (long long int)))) 21186 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21748 return 1; 21187 return 1;
21749 fprintf (f, "%ld", i); 21188 fprintf (f, "%ld\n", i);
21750 } 21189 }
21751 else 21190 else
21752 { 21191 {
21753 unsigned long int i = ulongval (); 21192 unsigned long int i = ulongval ();
21754 if (i != ((long int) (sizeof (long long int)))) 21193 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21755 return 1; 21194 return 1;
21756 fprintf (f, "%lu", i); 21195 fprintf (f, "%lu\n", i);
21757 } 21196 }
21758 /* Do not output a trailing newline, as this causes \r\n confusion
21759 on some platforms. */
21760 return ferror (f) || fclose (f) != 0; 21197 return ferror (f) || fclose (f) != 0;
21761 21198
21762 ; 21199 ;
@@ -21769,46 +21206,43 @@ case "(($ac_try" in
21769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21770 *) ac_try_echo=$ac_try;; 21207 *) ac_try_echo=$ac_try;;
21771esac 21208esac
21772eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21773$as_echo "$ac_try_echo") >&5
21774 (eval "$ac_link") 2>&5 21210 (eval "$ac_link") 2>&5
21775 ac_status=$? 21211 ac_status=$?
21776 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21777 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 21213 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21778 { (case "(($ac_try" in 21214 { (case "(($ac_try" in
21779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21780 *) ac_try_echo=$ac_try;; 21216 *) ac_try_echo=$ac_try;;
21781esac 21217esac
21782eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21783$as_echo "$ac_try_echo") >&5
21784 (eval "$ac_try") 2>&5 21219 (eval "$ac_try") 2>&5
21785 ac_status=$? 21220 ac_status=$?
21786 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21787 (exit $ac_status); }; }; then 21222 (exit $ac_status); }; }; then
21788 ac_cv_sizeof_long_long_int=`cat conftest.val` 21223 ac_cv_sizeof_long_long_int=`cat conftest.val`
21789else 21224else
21790 $as_echo "$as_me: program exited with status $ac_status" >&5 21225 echo "$as_me: program exited with status $ac_status" >&5
21791$as_echo "$as_me: failed program was:" >&5 21226echo "$as_me: failed program was:" >&5
21792sed 's/^/| /' conftest.$ac_ext >&5 21227sed 's/^/| /' conftest.$ac_ext >&5
21793 21228
21794( exit $ac_status ) 21229( exit $ac_status )
21795if test "$ac_cv_type_long_long_int" = yes; then 21230if test "$ac_cv_type_long_long_int" = yes; then
21796 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long int) 21231 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int)
21797See \`config.log' for more details." >&5 21232See \`config.log' for more details." >&5
21798$as_echo "$as_me: error: cannot compute sizeof (long long int) 21233echo "$as_me: error: cannot compute sizeof (long long int)
21799See \`config.log' for more details." >&2;} 21234See \`config.log' for more details." >&2;}
21800 { (exit 77); exit 77; }; } 21235 { (exit 77); exit 77; }; }
21801 else 21236 else
21802 ac_cv_sizeof_long_long_int=0 21237 ac_cv_sizeof_long_long_int=0
21803 fi 21238 fi
21804fi 21239fi
21805rm -rf conftest.dSYM
21806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 21240rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21807fi 21241fi
21808rm -f conftest.val 21242rm -f conftest.val
21809fi 21243fi
21810{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long_int" >&5 21244{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long_int" >&5
21811$as_echo "$ac_cv_sizeof_long_long_int" >&6; } 21245echo "${ECHO_T}$ac_cv_sizeof_long_long_int" >&6; }
21812 21246
21813 21247
21814 21248
@@ -21825,12 +21259,12 @@ fi
21825 21259
21826# compute LLONG_MIN and LLONG_MAX if we don't know them. 21260# compute LLONG_MIN and LLONG_MAX if we don't know them.
21827if test -z "$have_llong_max"; then 21261if test -z "$have_llong_max"; then
21828 { $as_echo "$as_me:$LINENO: checking for max value of long long" >&5 21262 { echo "$as_me:$LINENO: checking for max value of long long" >&5
21829$as_echo_n "checking for max value of long long... " >&6; } 21263echo $ECHO_N "checking for max value of long long... $ECHO_C" >&6; }
21830 if test "$cross_compiling" = yes; then 21264 if test "$cross_compiling" = yes; then
21831 21265
21832 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5 21266 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5
21833$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;} 21267echo "$as_me: WARNING: cross compiling: not checking" >&2;}
21834 21268
21835 21269
21836else 21270else
@@ -21920,37 +21354,35 @@ case "(($ac_try" in
21920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21921 *) ac_try_echo=$ac_try;; 21355 *) ac_try_echo=$ac_try;;
21922esac 21356esac
21923eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21924$as_echo "$ac_try_echo") >&5
21925 (eval "$ac_link") 2>&5 21358 (eval "$ac_link") 2>&5
21926 ac_status=$? 21359 ac_status=$?
21927 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21928 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 21361 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21929 { (case "(($ac_try" in 21362 { (case "(($ac_try" in
21930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21931 *) ac_try_echo=$ac_try;; 21364 *) ac_try_echo=$ac_try;;
21932esac 21365esac
21933eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21934$as_echo "$ac_try_echo") >&5
21935 (eval "$ac_try") 2>&5 21367 (eval "$ac_try") 2>&5
21936 ac_status=$? 21368 ac_status=$?
21937 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21938 (exit $ac_status); }; }; then 21370 (exit $ac_status); }; }; then
21939 21371
21940 llong_min=`$AWK '{print $1}' conftest.llminmax` 21372 llong_min=`$AWK '{print $1}' conftest.llminmax`
21941 llong_max=`$AWK '{print $2}' conftest.llminmax` 21373 llong_max=`$AWK '{print $2}' conftest.llminmax`
21942 21374
21943 { $as_echo "$as_me:$LINENO: result: $llong_max" >&5 21375 { echo "$as_me:$LINENO: result: $llong_max" >&5
21944$as_echo "$llong_max" >&6; } 21376echo "${ECHO_T}$llong_max" >&6; }
21945 21377
21946cat >>confdefs.h <<_ACEOF 21378cat >>confdefs.h <<_ACEOF
21947#define LLONG_MAX ${llong_max}LL 21379#define LLONG_MAX ${llong_max}LL
21948_ACEOF 21380_ACEOF
21949 21381
21950 { $as_echo "$as_me:$LINENO: checking for min value of long long" >&5 21382 { echo "$as_me:$LINENO: checking for min value of long long" >&5
21951$as_echo_n "checking for min value of long long... " >&6; } 21383echo $ECHO_N "checking for min value of long long... $ECHO_C" >&6; }
21952 { $as_echo "$as_me:$LINENO: result: $llong_min" >&5 21384 { echo "$as_me:$LINENO: result: $llong_min" >&5
21953$as_echo "$llong_min" >&6; } 21385echo "${ECHO_T}$llong_min" >&6; }
21954 21386
21955cat >>confdefs.h <<_ACEOF 21387cat >>confdefs.h <<_ACEOF
21956#define LLONG_MIN ${llong_min}LL 21388#define LLONG_MIN ${llong_min}LL
@@ -21958,17 +21390,16 @@ _ACEOF
21958 21390
21959 21391
21960else 21392else
21961 $as_echo "$as_me: program exited with status $ac_status" >&5 21393 echo "$as_me: program exited with status $ac_status" >&5
21962$as_echo "$as_me: failed program was:" >&5 21394echo "$as_me: failed program was:" >&5
21963sed 's/^/| /' conftest.$ac_ext >&5 21395sed 's/^/| /' conftest.$ac_ext >&5
21964 21396
21965( exit $ac_status ) 21397( exit $ac_status )
21966 21398
21967 { $as_echo "$as_me:$LINENO: result: not found" >&5 21399 { echo "$as_me:$LINENO: result: not found" >&5
21968$as_echo "not found" >&6; } 21400echo "${ECHO_T}not found" >&6; }
21969 21401
21970fi 21402fi
21971rm -rf conftest.dSYM
21972rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 21403rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21973fi 21404fi
21974 21405
@@ -21977,10 +21408,10 @@ fi
21977 21408
21978 21409
21979# More checks for data types 21410# More checks for data types
21980{ $as_echo "$as_me:$LINENO: checking for u_int type" >&5 21411{ echo "$as_me:$LINENO: checking for u_int type" >&5
21981$as_echo_n "checking for u_int type... " >&6; } 21412echo $ECHO_N "checking for u_int type... $ECHO_C" >&6; }
21982if test "${ac_cv_have_u_int+set}" = set; then 21413if test "${ac_cv_have_u_int+set}" = set; then
21983 $as_echo_n "(cached) " >&6 21414 echo $ECHO_N "(cached) $ECHO_C" >&6
21984else 21415else
21985 21416
21986 cat >conftest.$ac_ext <<_ACEOF 21417 cat >conftest.$ac_ext <<_ACEOF
@@ -22004,21 +21435,20 @@ case "(($ac_try" in
22004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22005 *) ac_try_echo=$ac_try;; 21436 *) ac_try_echo=$ac_try;;
22006esac 21437esac
22007eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22008$as_echo "$ac_try_echo") >&5
22009 (eval "$ac_compile") 2>conftest.er1 21439 (eval "$ac_compile") 2>conftest.er1
22010 ac_status=$? 21440 ac_status=$?
22011 grep -v '^ *+' conftest.er1 >conftest.err 21441 grep -v '^ *+' conftest.er1 >conftest.err
22012 rm -f conftest.er1 21442 rm -f conftest.er1
22013 cat conftest.err >&5 21443 cat conftest.err >&5
22014 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22015 (exit $ac_status); } && { 21445 (exit $ac_status); } && {
22016 test -z "$ac_c_werror_flag" || 21446 test -z "$ac_c_werror_flag" ||
22017 test ! -s conftest.err 21447 test ! -s conftest.err
22018 } && test -s conftest.$ac_objext; then 21448 } && test -s conftest.$ac_objext; then
22019 ac_cv_have_u_int="yes" 21449 ac_cv_have_u_int="yes"
22020else 21450else
22021 $as_echo "$as_me: failed program was:" >&5 21451 echo "$as_me: failed program was:" >&5
22022sed 's/^/| /' conftest.$ac_ext >&5 21452sed 's/^/| /' conftest.$ac_ext >&5
22023 21453
22024 ac_cv_have_u_int="no" 21454 ac_cv_have_u_int="no"
@@ -22028,8 +21458,8 @@ fi
22028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22029 21459
22030fi 21460fi
22031{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_u_int" >&5 21461{ echo "$as_me:$LINENO: result: $ac_cv_have_u_int" >&5
22032$as_echo "$ac_cv_have_u_int" >&6; } 21462echo "${ECHO_T}$ac_cv_have_u_int" >&6; }
22033if test "x$ac_cv_have_u_int" = "xyes" ; then 21463if test "x$ac_cv_have_u_int" = "xyes" ; then
22034 21464
22035cat >>confdefs.h <<\_ACEOF 21465cat >>confdefs.h <<\_ACEOF
@@ -22039,10 +21469,10 @@ _ACEOF
22039 have_u_int=1 21469 have_u_int=1
22040fi 21470fi
22041 21471
22042{ $as_echo "$as_me:$LINENO: checking for intXX_t types" >&5 21472{ echo "$as_me:$LINENO: checking for intXX_t types" >&5
22043$as_echo_n "checking for intXX_t types... " >&6; } 21473echo $ECHO_N "checking for intXX_t types... $ECHO_C" >&6; }
22044if test "${ac_cv_have_intxx_t+set}" = set; then 21474if test "${ac_cv_have_intxx_t+set}" = set; then
22045 $as_echo_n "(cached) " >&6 21475 echo $ECHO_N "(cached) $ECHO_C" >&6
22046else 21476else
22047 21477
22048 cat >conftest.$ac_ext <<_ACEOF 21478 cat >conftest.$ac_ext <<_ACEOF
@@ -22066,21 +21496,20 @@ case "(($ac_try" in
22066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22067 *) ac_try_echo=$ac_try;; 21497 *) ac_try_echo=$ac_try;;
22068esac 21498esac
22069eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22070$as_echo "$ac_try_echo") >&5
22071 (eval "$ac_compile") 2>conftest.er1 21500 (eval "$ac_compile") 2>conftest.er1
22072 ac_status=$? 21501 ac_status=$?
22073 grep -v '^ *+' conftest.er1 >conftest.err 21502 grep -v '^ *+' conftest.er1 >conftest.err
22074 rm -f conftest.er1 21503 rm -f conftest.er1
22075 cat conftest.err >&5 21504 cat conftest.err >&5
22076 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22077 (exit $ac_status); } && { 21506 (exit $ac_status); } && {
22078 test -z "$ac_c_werror_flag" || 21507 test -z "$ac_c_werror_flag" ||
22079 test ! -s conftest.err 21508 test ! -s conftest.err
22080 } && test -s conftest.$ac_objext; then 21509 } && test -s conftest.$ac_objext; then
22081 ac_cv_have_intxx_t="yes" 21510 ac_cv_have_intxx_t="yes"
22082else 21511else
22083 $as_echo "$as_me: failed program was:" >&5 21512 echo "$as_me: failed program was:" >&5
22084sed 's/^/| /' conftest.$ac_ext >&5 21513sed 's/^/| /' conftest.$ac_ext >&5
22085 21514
22086 ac_cv_have_intxx_t="no" 21515 ac_cv_have_intxx_t="no"
@@ -22090,8 +21519,8 @@ fi
22090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22091 21520
22092fi 21521fi
22093{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_intxx_t" >&5 21522{ echo "$as_me:$LINENO: result: $ac_cv_have_intxx_t" >&5
22094$as_echo "$ac_cv_have_intxx_t" >&6; } 21523echo "${ECHO_T}$ac_cv_have_intxx_t" >&6; }
22095if test "x$ac_cv_have_intxx_t" = "xyes" ; then 21524if test "x$ac_cv_have_intxx_t" = "xyes" ; then
22096 21525
22097cat >>confdefs.h <<\_ACEOF 21526cat >>confdefs.h <<\_ACEOF
@@ -22104,8 +21533,8 @@ fi
22104if (test -z "$have_intxx_t" && \ 21533if (test -z "$have_intxx_t" && \
22105 test "x$ac_cv_header_stdint_h" = "xyes") 21534 test "x$ac_cv_header_stdint_h" = "xyes")
22106then 21535then
22107 { $as_echo "$as_me:$LINENO: checking for intXX_t types in stdint.h" >&5 21536 { echo "$as_me:$LINENO: checking for intXX_t types in stdint.h" >&5
22108$as_echo_n "checking for intXX_t types in stdint.h... " >&6; } 21537echo $ECHO_N "checking for intXX_t types in stdint.h... $ECHO_C" >&6; }
22109 cat >conftest.$ac_ext <<_ACEOF 21538 cat >conftest.$ac_ext <<_ACEOF
22110/* confdefs.h. */ 21539/* confdefs.h. */
22111_ACEOF 21540_ACEOF
@@ -22127,14 +21556,13 @@ case "(($ac_try" in
22127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22128 *) ac_try_echo=$ac_try;; 21557 *) ac_try_echo=$ac_try;;
22129esac 21558esac
22130eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22131$as_echo "$ac_try_echo") >&5
22132 (eval "$ac_compile") 2>conftest.er1 21560 (eval "$ac_compile") 2>conftest.er1
22133 ac_status=$? 21561 ac_status=$?
22134 grep -v '^ *+' conftest.er1 >conftest.err 21562 grep -v '^ *+' conftest.er1 >conftest.err
22135 rm -f conftest.er1 21563 rm -f conftest.er1
22136 cat conftest.err >&5 21564 cat conftest.err >&5
22137 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22138 (exit $ac_status); } && { 21566 (exit $ac_status); } && {
22139 test -z "$ac_c_werror_flag" || 21567 test -z "$ac_c_werror_flag" ||
22140 test ! -s conftest.err 21568 test ! -s conftest.err
@@ -22144,25 +21572,25 @@ $as_echo "$ac_try_echo") >&5
22144#define HAVE_INTXX_T 1 21572#define HAVE_INTXX_T 1
22145_ACEOF 21573_ACEOF
22146 21574
22147 { $as_echo "$as_me:$LINENO: result: yes" >&5 21575 { echo "$as_me:$LINENO: result: yes" >&5
22148$as_echo "yes" >&6; } 21576echo "${ECHO_T}yes" >&6; }
22149 21577
22150else 21578else
22151 $as_echo "$as_me: failed program was:" >&5 21579 echo "$as_me: failed program was:" >&5
22152sed 's/^/| /' conftest.$ac_ext >&5 21580sed 's/^/| /' conftest.$ac_ext >&5
22153 21581
22154 { $as_echo "$as_me:$LINENO: result: no" >&5 21582 { echo "$as_me:$LINENO: result: no" >&5
22155$as_echo "no" >&6; } 21583echo "${ECHO_T}no" >&6; }
22156 21584
22157fi 21585fi
22158 21586
22159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22160fi 21588fi
22161 21589
22162{ $as_echo "$as_me:$LINENO: checking for int64_t type" >&5 21590{ echo "$as_me:$LINENO: checking for int64_t type" >&5
22163$as_echo_n "checking for int64_t type... " >&6; } 21591echo $ECHO_N "checking for int64_t type... $ECHO_C" >&6; }
22164if test "${ac_cv_have_int64_t+set}" = set; then 21592if test "${ac_cv_have_int64_t+set}" = set; then
22165 $as_echo_n "(cached) " >&6 21593 echo $ECHO_N "(cached) $ECHO_C" >&6
22166else 21594else
22167 21595
22168 cat >conftest.$ac_ext <<_ACEOF 21596 cat >conftest.$ac_ext <<_ACEOF
@@ -22195,21 +21623,20 @@ case "(($ac_try" in
22195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22196 *) ac_try_echo=$ac_try;; 21624 *) ac_try_echo=$ac_try;;
22197esac 21625esac
22198eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22199$as_echo "$ac_try_echo") >&5
22200 (eval "$ac_compile") 2>conftest.er1 21627 (eval "$ac_compile") 2>conftest.er1
22201 ac_status=$? 21628 ac_status=$?
22202 grep -v '^ *+' conftest.er1 >conftest.err 21629 grep -v '^ *+' conftest.er1 >conftest.err
22203 rm -f conftest.er1 21630 rm -f conftest.er1
22204 cat conftest.err >&5 21631 cat conftest.err >&5
22205 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22206 (exit $ac_status); } && { 21633 (exit $ac_status); } && {
22207 test -z "$ac_c_werror_flag" || 21634 test -z "$ac_c_werror_flag" ||
22208 test ! -s conftest.err 21635 test ! -s conftest.err
22209 } && test -s conftest.$ac_objext; then 21636 } && test -s conftest.$ac_objext; then
22210 ac_cv_have_int64_t="yes" 21637 ac_cv_have_int64_t="yes"
22211else 21638else
22212 $as_echo "$as_me: failed program was:" >&5 21639 echo "$as_me: failed program was:" >&5
22213sed 's/^/| /' conftest.$ac_ext >&5 21640sed 's/^/| /' conftest.$ac_ext >&5
22214 21641
22215 ac_cv_have_int64_t="no" 21642 ac_cv_have_int64_t="no"
@@ -22219,8 +21646,8 @@ fi
22219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22220 21647
22221fi 21648fi
22222{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_int64_t" >&5 21649{ echo "$as_me:$LINENO: result: $ac_cv_have_int64_t" >&5
22223$as_echo "$ac_cv_have_int64_t" >&6; } 21650echo "${ECHO_T}$ac_cv_have_int64_t" >&6; }
22224if test "x$ac_cv_have_int64_t" = "xyes" ; then 21651if test "x$ac_cv_have_int64_t" = "xyes" ; then
22225 21652
22226cat >>confdefs.h <<\_ACEOF 21653cat >>confdefs.h <<\_ACEOF
@@ -22229,10 +21656,10 @@ _ACEOF
22229 21656
22230fi 21657fi
22231 21658
22232{ $as_echo "$as_me:$LINENO: checking for u_intXX_t types" >&5 21659{ echo "$as_me:$LINENO: checking for u_intXX_t types" >&5
22233$as_echo_n "checking for u_intXX_t types... " >&6; } 21660echo $ECHO_N "checking for u_intXX_t types... $ECHO_C" >&6; }
22234if test "${ac_cv_have_u_intxx_t+set}" = set; then 21661if test "${ac_cv_have_u_intxx_t+set}" = set; then
22235 $as_echo_n "(cached) " >&6 21662 echo $ECHO_N "(cached) $ECHO_C" >&6
22236else 21663else
22237 21664
22238 cat >conftest.$ac_ext <<_ACEOF 21665 cat >conftest.$ac_ext <<_ACEOF
@@ -22256,21 +21683,20 @@ case "(($ac_try" in
22256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22257 *) ac_try_echo=$ac_try;; 21684 *) ac_try_echo=$ac_try;;
22258esac 21685esac
22259eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22260$as_echo "$ac_try_echo") >&5
22261 (eval "$ac_compile") 2>conftest.er1 21687 (eval "$ac_compile") 2>conftest.er1
22262 ac_status=$? 21688 ac_status=$?
22263 grep -v '^ *+' conftest.er1 >conftest.err 21689 grep -v '^ *+' conftest.er1 >conftest.err
22264 rm -f conftest.er1 21690 rm -f conftest.er1
22265 cat conftest.err >&5 21691 cat conftest.err >&5
22266 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22267 (exit $ac_status); } && { 21693 (exit $ac_status); } && {
22268 test -z "$ac_c_werror_flag" || 21694 test -z "$ac_c_werror_flag" ||
22269 test ! -s conftest.err 21695 test ! -s conftest.err
22270 } && test -s conftest.$ac_objext; then 21696 } && test -s conftest.$ac_objext; then
22271 ac_cv_have_u_intxx_t="yes" 21697 ac_cv_have_u_intxx_t="yes"
22272else 21698else
22273 $as_echo "$as_me: failed program was:" >&5 21699 echo "$as_me: failed program was:" >&5
22274sed 's/^/| /' conftest.$ac_ext >&5 21700sed 's/^/| /' conftest.$ac_ext >&5
22275 21701
22276 ac_cv_have_u_intxx_t="no" 21702 ac_cv_have_u_intxx_t="no"
@@ -22280,8 +21706,8 @@ fi
22280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22281 21707
22282fi 21708fi
22283{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_u_intxx_t" >&5 21709{ echo "$as_me:$LINENO: result: $ac_cv_have_u_intxx_t" >&5
22284$as_echo "$ac_cv_have_u_intxx_t" >&6; } 21710echo "${ECHO_T}$ac_cv_have_u_intxx_t" >&6; }
22285if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then 21711if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
22286 21712
22287cat >>confdefs.h <<\_ACEOF 21713cat >>confdefs.h <<\_ACEOF
@@ -22292,8 +21718,8 @@ _ACEOF
22292fi 21718fi
22293 21719
22294if test -z "$have_u_intxx_t" ; then 21720if test -z "$have_u_intxx_t" ; then
22295 { $as_echo "$as_me:$LINENO: checking for u_intXX_t types in sys/socket.h" >&5 21721 { echo "$as_me:$LINENO: checking for u_intXX_t types in sys/socket.h" >&5
22296$as_echo_n "checking for u_intXX_t types in sys/socket.h... " >&6; } 21722echo $ECHO_N "checking for u_intXX_t types in sys/socket.h... $ECHO_C" >&6; }
22297 cat >conftest.$ac_ext <<_ACEOF 21723 cat >conftest.$ac_ext <<_ACEOF
22298/* confdefs.h. */ 21724/* confdefs.h. */
22299_ACEOF 21725_ACEOF
@@ -22315,14 +21741,13 @@ case "(($ac_try" in
22315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22316 *) ac_try_echo=$ac_try;; 21742 *) ac_try_echo=$ac_try;;
22317esac 21743esac
22318eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22319$as_echo "$ac_try_echo") >&5
22320 (eval "$ac_compile") 2>conftest.er1 21745 (eval "$ac_compile") 2>conftest.er1
22321 ac_status=$? 21746 ac_status=$?
22322 grep -v '^ *+' conftest.er1 >conftest.err 21747 grep -v '^ *+' conftest.er1 >conftest.err
22323 rm -f conftest.er1 21748 rm -f conftest.er1
22324 cat conftest.err >&5 21749 cat conftest.err >&5
22325 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22326 (exit $ac_status); } && { 21751 (exit $ac_status); } && {
22327 test -z "$ac_c_werror_flag" || 21752 test -z "$ac_c_werror_flag" ||
22328 test ! -s conftest.err 21753 test ! -s conftest.err
@@ -22332,25 +21757,25 @@ $as_echo "$ac_try_echo") >&5
22332#define HAVE_U_INTXX_T 1 21757#define HAVE_U_INTXX_T 1
22333_ACEOF 21758_ACEOF
22334 21759
22335 { $as_echo "$as_me:$LINENO: result: yes" >&5 21760 { echo "$as_me:$LINENO: result: yes" >&5
22336$as_echo "yes" >&6; } 21761echo "${ECHO_T}yes" >&6; }
22337 21762
22338else 21763else
22339 $as_echo "$as_me: failed program was:" >&5 21764 echo "$as_me: failed program was:" >&5
22340sed 's/^/| /' conftest.$ac_ext >&5 21765sed 's/^/| /' conftest.$ac_ext >&5
22341 21766
22342 { $as_echo "$as_me:$LINENO: result: no" >&5 21767 { echo "$as_me:$LINENO: result: no" >&5
22343$as_echo "no" >&6; } 21768echo "${ECHO_T}no" >&6; }
22344 21769
22345fi 21770fi
22346 21771
22347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22348fi 21773fi
22349 21774
22350{ $as_echo "$as_me:$LINENO: checking for u_int64_t types" >&5 21775{ echo "$as_me:$LINENO: checking for u_int64_t types" >&5
22351$as_echo_n "checking for u_int64_t types... " >&6; } 21776echo $ECHO_N "checking for u_int64_t types... $ECHO_C" >&6; }
22352if test "${ac_cv_have_u_int64_t+set}" = set; then 21777if test "${ac_cv_have_u_int64_t+set}" = set; then
22353 $as_echo_n "(cached) " >&6 21778 echo $ECHO_N "(cached) $ECHO_C" >&6
22354else 21779else
22355 21780
22356 cat >conftest.$ac_ext <<_ACEOF 21781 cat >conftest.$ac_ext <<_ACEOF
@@ -22374,21 +21799,20 @@ case "(($ac_try" in
22374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22375 *) ac_try_echo=$ac_try;; 21800 *) ac_try_echo=$ac_try;;
22376esac 21801esac
22377eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22378$as_echo "$ac_try_echo") >&5
22379 (eval "$ac_compile") 2>conftest.er1 21803 (eval "$ac_compile") 2>conftest.er1
22380 ac_status=$? 21804 ac_status=$?
22381 grep -v '^ *+' conftest.er1 >conftest.err 21805 grep -v '^ *+' conftest.er1 >conftest.err
22382 rm -f conftest.er1 21806 rm -f conftest.er1
22383 cat conftest.err >&5 21807 cat conftest.err >&5
22384 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22385 (exit $ac_status); } && { 21809 (exit $ac_status); } && {
22386 test -z "$ac_c_werror_flag" || 21810 test -z "$ac_c_werror_flag" ||
22387 test ! -s conftest.err 21811 test ! -s conftest.err
22388 } && test -s conftest.$ac_objext; then 21812 } && test -s conftest.$ac_objext; then
22389 ac_cv_have_u_int64_t="yes" 21813 ac_cv_have_u_int64_t="yes"
22390else 21814else
22391 $as_echo "$as_me: failed program was:" >&5 21815 echo "$as_me: failed program was:" >&5
22392sed 's/^/| /' conftest.$ac_ext >&5 21816sed 's/^/| /' conftest.$ac_ext >&5
22393 21817
22394 ac_cv_have_u_int64_t="no" 21818 ac_cv_have_u_int64_t="no"
@@ -22398,8 +21822,8 @@ fi
22398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22399 21823
22400fi 21824fi
22401{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_u_int64_t" >&5 21825{ echo "$as_me:$LINENO: result: $ac_cv_have_u_int64_t" >&5
22402$as_echo "$ac_cv_have_u_int64_t" >&6; } 21826echo "${ECHO_T}$ac_cv_have_u_int64_t" >&6; }
22403if test "x$ac_cv_have_u_int64_t" = "xyes" ; then 21827if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
22404 21828
22405cat >>confdefs.h <<\_ACEOF 21829cat >>confdefs.h <<\_ACEOF
@@ -22410,8 +21834,8 @@ _ACEOF
22410fi 21834fi
22411 21835
22412if test -z "$have_u_int64_t" ; then 21836if test -z "$have_u_int64_t" ; then
22413 { $as_echo "$as_me:$LINENO: checking for u_int64_t type in sys/bitypes.h" >&5 21837 { echo "$as_me:$LINENO: checking for u_int64_t type in sys/bitypes.h" >&5
22414$as_echo_n "checking for u_int64_t type in sys/bitypes.h... " >&6; } 21838echo $ECHO_N "checking for u_int64_t type in sys/bitypes.h... $ECHO_C" >&6; }
22415 cat >conftest.$ac_ext <<_ACEOF 21839 cat >conftest.$ac_ext <<_ACEOF
22416/* confdefs.h. */ 21840/* confdefs.h. */
22417_ACEOF 21841_ACEOF
@@ -22433,14 +21857,13 @@ case "(($ac_try" in
22433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22434 *) ac_try_echo=$ac_try;; 21858 *) ac_try_echo=$ac_try;;
22435esac 21859esac
22436eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22437$as_echo "$ac_try_echo") >&5
22438 (eval "$ac_compile") 2>conftest.er1 21861 (eval "$ac_compile") 2>conftest.er1
22439 ac_status=$? 21862 ac_status=$?
22440 grep -v '^ *+' conftest.er1 >conftest.err 21863 grep -v '^ *+' conftest.er1 >conftest.err
22441 rm -f conftest.er1 21864 rm -f conftest.er1
22442 cat conftest.err >&5 21865 cat conftest.err >&5
22443 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22444 (exit $ac_status); } && { 21867 (exit $ac_status); } && {
22445 test -z "$ac_c_werror_flag" || 21868 test -z "$ac_c_werror_flag" ||
22446 test ! -s conftest.err 21869 test ! -s conftest.err
@@ -22450,15 +21873,15 @@ $as_echo "$ac_try_echo") >&5
22450#define HAVE_U_INT64_T 1 21873#define HAVE_U_INT64_T 1
22451_ACEOF 21874_ACEOF
22452 21875
22453 { $as_echo "$as_me:$LINENO: result: yes" >&5 21876 { echo "$as_me:$LINENO: result: yes" >&5
22454$as_echo "yes" >&6; } 21877echo "${ECHO_T}yes" >&6; }
22455 21878
22456else 21879else
22457 $as_echo "$as_me: failed program was:" >&5 21880 echo "$as_me: failed program was:" >&5
22458sed 's/^/| /' conftest.$ac_ext >&5 21881sed 's/^/| /' conftest.$ac_ext >&5
22459 21882
22460 { $as_echo "$as_me:$LINENO: result: no" >&5 21883 { echo "$as_me:$LINENO: result: no" >&5
22461$as_echo "no" >&6; } 21884echo "${ECHO_T}no" >&6; }
22462 21885
22463fi 21886fi
22464 21887
@@ -22466,10 +21889,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22466fi 21889fi
22467 21890
22468if test -z "$have_u_intxx_t" ; then 21891if test -z "$have_u_intxx_t" ; then
22469 { $as_echo "$as_me:$LINENO: checking for uintXX_t types" >&5 21892 { echo "$as_me:$LINENO: checking for uintXX_t types" >&5
22470$as_echo_n "checking for uintXX_t types... " >&6; } 21893echo $ECHO_N "checking for uintXX_t types... $ECHO_C" >&6; }
22471if test "${ac_cv_have_uintxx_t+set}" = set; then 21894if test "${ac_cv_have_uintxx_t+set}" = set; then
22472 $as_echo_n "(cached) " >&6 21895 echo $ECHO_N "(cached) $ECHO_C" >&6
22473else 21896else
22474 21897
22475 cat >conftest.$ac_ext <<_ACEOF 21898 cat >conftest.$ac_ext <<_ACEOF
@@ -22495,21 +21918,20 @@ case "(($ac_try" in
22495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22496 *) ac_try_echo=$ac_try;; 21919 *) ac_try_echo=$ac_try;;
22497esac 21920esac
22498eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22499$as_echo "$ac_try_echo") >&5
22500 (eval "$ac_compile") 2>conftest.er1 21922 (eval "$ac_compile") 2>conftest.er1
22501 ac_status=$? 21923 ac_status=$?
22502 grep -v '^ *+' conftest.er1 >conftest.err 21924 grep -v '^ *+' conftest.er1 >conftest.err
22503 rm -f conftest.er1 21925 rm -f conftest.er1
22504 cat conftest.err >&5 21926 cat conftest.err >&5
22505 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22506 (exit $ac_status); } && { 21928 (exit $ac_status); } && {
22507 test -z "$ac_c_werror_flag" || 21929 test -z "$ac_c_werror_flag" ||
22508 test ! -s conftest.err 21930 test ! -s conftest.err
22509 } && test -s conftest.$ac_objext; then 21931 } && test -s conftest.$ac_objext; then
22510 ac_cv_have_uintxx_t="yes" 21932 ac_cv_have_uintxx_t="yes"
22511else 21933else
22512 $as_echo "$as_me: failed program was:" >&5 21934 echo "$as_me: failed program was:" >&5
22513sed 's/^/| /' conftest.$ac_ext >&5 21935sed 's/^/| /' conftest.$ac_ext >&5
22514 21936
22515 ac_cv_have_uintxx_t="no" 21937 ac_cv_have_uintxx_t="no"
@@ -22519,8 +21941,8 @@ fi
22519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22520 21942
22521fi 21943fi
22522{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_uintxx_t" >&5 21944{ echo "$as_me:$LINENO: result: $ac_cv_have_uintxx_t" >&5
22523$as_echo "$ac_cv_have_uintxx_t" >&6; } 21945echo "${ECHO_T}$ac_cv_have_uintxx_t" >&6; }
22524 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then 21946 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
22525 21947
22526cat >>confdefs.h <<\_ACEOF 21948cat >>confdefs.h <<\_ACEOF
@@ -22531,8 +21953,8 @@ _ACEOF
22531fi 21953fi
22532 21954
22533if test -z "$have_uintxx_t" ; then 21955if test -z "$have_uintxx_t" ; then
22534 { $as_echo "$as_me:$LINENO: checking for uintXX_t types in stdint.h" >&5 21956 { echo "$as_me:$LINENO: checking for uintXX_t types in stdint.h" >&5
22535$as_echo_n "checking for uintXX_t types in stdint.h... " >&6; } 21957echo $ECHO_N "checking for uintXX_t types in stdint.h... $ECHO_C" >&6; }
22536 cat >conftest.$ac_ext <<_ACEOF 21958 cat >conftest.$ac_ext <<_ACEOF
22537/* confdefs.h. */ 21959/* confdefs.h. */
22538_ACEOF 21960_ACEOF
@@ -22554,14 +21976,13 @@ case "(($ac_try" in
22554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22555 *) ac_try_echo=$ac_try;; 21977 *) ac_try_echo=$ac_try;;
22556esac 21978esac
22557eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22558$as_echo "$ac_try_echo") >&5
22559 (eval "$ac_compile") 2>conftest.er1 21980 (eval "$ac_compile") 2>conftest.er1
22560 ac_status=$? 21981 ac_status=$?
22561 grep -v '^ *+' conftest.er1 >conftest.err 21982 grep -v '^ *+' conftest.er1 >conftest.err
22562 rm -f conftest.er1 21983 rm -f conftest.er1
22563 cat conftest.err >&5 21984 cat conftest.err >&5
22564 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22565 (exit $ac_status); } && { 21986 (exit $ac_status); } && {
22566 test -z "$ac_c_werror_flag" || 21987 test -z "$ac_c_werror_flag" ||
22567 test ! -s conftest.err 21988 test ! -s conftest.err
@@ -22571,15 +21992,15 @@ $as_echo "$ac_try_echo") >&5
22571#define HAVE_UINTXX_T 1 21992#define HAVE_UINTXX_T 1
22572_ACEOF 21993_ACEOF
22573 21994
22574 { $as_echo "$as_me:$LINENO: result: yes" >&5 21995 { echo "$as_me:$LINENO: result: yes" >&5
22575$as_echo "yes" >&6; } 21996echo "${ECHO_T}yes" >&6; }
22576 21997
22577else 21998else
22578 $as_echo "$as_me: failed program was:" >&5 21999 echo "$as_me: failed program was:" >&5
22579sed 's/^/| /' conftest.$ac_ext >&5 22000sed 's/^/| /' conftest.$ac_ext >&5
22580 22001
22581 { $as_echo "$as_me:$LINENO: result: no" >&5 22002 { echo "$as_me:$LINENO: result: no" >&5
22582$as_echo "no" >&6; } 22003echo "${ECHO_T}no" >&6; }
22583 22004
22584fi 22005fi
22585 22006
@@ -22589,8 +22010,8 @@ fi
22589if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \ 22010if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
22590 test "x$ac_cv_header_sys_bitypes_h" = "xyes") 22011 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
22591then 22012then
22592 { $as_echo "$as_me:$LINENO: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5 22013 { echo "$as_me:$LINENO: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
22593$as_echo_n "checking for intXX_t and u_intXX_t types in sys/bitypes.h... " >&6; } 22014echo $ECHO_N "checking for intXX_t and u_intXX_t types in sys/bitypes.h... $ECHO_C" >&6; }
22594 cat >conftest.$ac_ext <<_ACEOF 22015 cat >conftest.$ac_ext <<_ACEOF
22595/* confdefs.h. */ 22016/* confdefs.h. */
22596_ACEOF 22017_ACEOF
@@ -22618,14 +22039,13 @@ case "(($ac_try" in
22618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22619 *) ac_try_echo=$ac_try;; 22040 *) ac_try_echo=$ac_try;;
22620esac 22041esac
22621eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22622$as_echo "$ac_try_echo") >&5
22623 (eval "$ac_compile") 2>conftest.er1 22043 (eval "$ac_compile") 2>conftest.er1
22624 ac_status=$? 22044 ac_status=$?
22625 grep -v '^ *+' conftest.er1 >conftest.err 22045 grep -v '^ *+' conftest.er1 >conftest.err
22626 rm -f conftest.er1 22046 rm -f conftest.er1
22627 cat conftest.err >&5 22047 cat conftest.err >&5
22628 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22629 (exit $ac_status); } && { 22049 (exit $ac_status); } && {
22630 test -z "$ac_c_werror_flag" || 22050 test -z "$ac_c_werror_flag" ||
22631 test ! -s conftest.err 22051 test ! -s conftest.err
@@ -22639,15 +22059,15 @@ _ACEOF
22639#define HAVE_INTXX_T 1 22059#define HAVE_INTXX_T 1
22640_ACEOF 22060_ACEOF
22641 22061
22642 { $as_echo "$as_me:$LINENO: result: yes" >&5 22062 { echo "$as_me:$LINENO: result: yes" >&5
22643$as_echo "yes" >&6; } 22063echo "${ECHO_T}yes" >&6; }
22644 22064
22645else 22065else
22646 $as_echo "$as_me: failed program was:" >&5 22066 echo "$as_me: failed program was:" >&5
22647sed 's/^/| /' conftest.$ac_ext >&5 22067sed 's/^/| /' conftest.$ac_ext >&5
22648 22068
22649 { $as_echo "$as_me:$LINENO: result: no" >&5 22069 { echo "$as_me:$LINENO: result: no" >&5
22650$as_echo "no" >&6; } 22070echo "${ECHO_T}no" >&6; }
22651 22071
22652fi 22072fi
22653 22073
@@ -22655,10 +22075,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22655fi 22075fi
22656 22076
22657 22077
22658{ $as_echo "$as_me:$LINENO: checking for u_char" >&5 22078{ echo "$as_me:$LINENO: checking for u_char" >&5
22659$as_echo_n "checking for u_char... " >&6; } 22079echo $ECHO_N "checking for u_char... $ECHO_C" >&6; }
22660if test "${ac_cv_have_u_char+set}" = set; then 22080if test "${ac_cv_have_u_char+set}" = set; then
22661 $as_echo_n "(cached) " >&6 22081 echo $ECHO_N "(cached) $ECHO_C" >&6
22662else 22082else
22663 22083
22664 cat >conftest.$ac_ext <<_ACEOF 22084 cat >conftest.$ac_ext <<_ACEOF
@@ -22684,21 +22104,20 @@ case "(($ac_try" in
22684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22685 *) ac_try_echo=$ac_try;; 22105 *) ac_try_echo=$ac_try;;
22686esac 22106esac
22687eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22688$as_echo "$ac_try_echo") >&5
22689 (eval "$ac_compile") 2>conftest.er1 22108 (eval "$ac_compile") 2>conftest.er1
22690 ac_status=$? 22109 ac_status=$?
22691 grep -v '^ *+' conftest.er1 >conftest.err 22110 grep -v '^ *+' conftest.er1 >conftest.err
22692 rm -f conftest.er1 22111 rm -f conftest.er1
22693 cat conftest.err >&5 22112 cat conftest.err >&5
22694 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22695 (exit $ac_status); } && { 22114 (exit $ac_status); } && {
22696 test -z "$ac_c_werror_flag" || 22115 test -z "$ac_c_werror_flag" ||
22697 test ! -s conftest.err 22116 test ! -s conftest.err
22698 } && test -s conftest.$ac_objext; then 22117 } && test -s conftest.$ac_objext; then
22699 ac_cv_have_u_char="yes" 22118 ac_cv_have_u_char="yes"
22700else 22119else
22701 $as_echo "$as_me: failed program was:" >&5 22120 echo "$as_me: failed program was:" >&5
22702sed 's/^/| /' conftest.$ac_ext >&5 22121sed 's/^/| /' conftest.$ac_ext >&5
22703 22122
22704 ac_cv_have_u_char="no" 22123 ac_cv_have_u_char="no"
@@ -22708,8 +22127,8 @@ fi
22708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22709 22128
22710fi 22129fi
22711{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_u_char" >&5 22130{ echo "$as_me:$LINENO: result: $ac_cv_have_u_char" >&5
22712$as_echo "$ac_cv_have_u_char" >&6; } 22131echo "${ECHO_T}$ac_cv_have_u_char" >&6; }
22713if test "x$ac_cv_have_u_char" = "xyes" ; then 22132if test "x$ac_cv_have_u_char" = "xyes" ; then
22714 22133
22715cat >>confdefs.h <<\_ACEOF 22134cat >>confdefs.h <<\_ACEOF
@@ -22719,48 +22138,11 @@ _ACEOF
22719fi 22138fi
22720 22139
22721 22140
22722 { $as_echo "$as_me:$LINENO: checking for socklen_t" >&5 22141 { echo "$as_me:$LINENO: checking for socklen_t" >&5
22723$as_echo_n "checking for socklen_t... " >&6; } 22142echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
22724if test "${ac_cv_type_socklen_t+set}" = set; then 22143if test "${ac_cv_type_socklen_t+set}" = set; then
22725 $as_echo_n "(cached) " >&6 22144 echo $ECHO_N "(cached) $ECHO_C" >&6
22726else 22145else
22727 ac_cv_type_socklen_t=no
22728cat >conftest.$ac_ext <<_ACEOF
22729/* confdefs.h. */
22730_ACEOF
22731cat confdefs.h >>conftest.$ac_ext
22732cat >>conftest.$ac_ext <<_ACEOF
22733/* end confdefs.h. */
22734#include <sys/types.h>
22735#include <sys/socket.h>
22736
22737int
22738main ()
22739{
22740if (sizeof (socklen_t))
22741 return 0;
22742 ;
22743 return 0;
22744}
22745_ACEOF
22746rm -f conftest.$ac_objext
22747if { (ac_try="$ac_compile"
22748case "(($ac_try" in
22749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22750 *) ac_try_echo=$ac_try;;
22751esac
22752eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22753$as_echo "$ac_try_echo") >&5
22754 (eval "$ac_compile") 2>conftest.er1
22755 ac_status=$?
22756 grep -v '^ *+' conftest.er1 >conftest.err
22757 rm -f conftest.er1
22758 cat conftest.err >&5
22759 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22760 (exit $ac_status); } && {
22761 test -z "$ac_c_werror_flag" ||
22762 test ! -s conftest.err
22763 } && test -s conftest.$ac_objext; then
22764 cat >conftest.$ac_ext <<_ACEOF 22146 cat >conftest.$ac_ext <<_ACEOF
22765/* confdefs.h. */ 22147/* confdefs.h. */
22766_ACEOF 22148_ACEOF
@@ -22770,11 +22152,14 @@ cat >>conftest.$ac_ext <<_ACEOF
22770#include <sys/types.h> 22152#include <sys/types.h>
22771#include <sys/socket.h> 22153#include <sys/socket.h>
22772 22154
22155typedef socklen_t ac__type_new_;
22773int 22156int
22774main () 22157main ()
22775{ 22158{
22776if (sizeof ((socklen_t))) 22159if ((ac__type_new_ *) 0)
22777 return 0; 22160 return 0;
22161if (sizeof (ac__type_new_))
22162 return 0;
22778 ; 22163 ;
22779 return 0; 22164 return 0;
22780} 22165}
@@ -22785,46 +22170,37 @@ case "(($ac_try" in
22785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22786 *) ac_try_echo=$ac_try;; 22171 *) ac_try_echo=$ac_try;;
22787esac 22172esac
22788eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22789$as_echo "$ac_try_echo") >&5
22790 (eval "$ac_compile") 2>conftest.er1 22174 (eval "$ac_compile") 2>conftest.er1
22791 ac_status=$? 22175 ac_status=$?
22792 grep -v '^ *+' conftest.er1 >conftest.err 22176 grep -v '^ *+' conftest.er1 >conftest.err
22793 rm -f conftest.er1 22177 rm -f conftest.er1
22794 cat conftest.err >&5 22178 cat conftest.err >&5
22795 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22796 (exit $ac_status); } && { 22180 (exit $ac_status); } && {
22797 test -z "$ac_c_werror_flag" || 22181 test -z "$ac_c_werror_flag" ||
22798 test ! -s conftest.err 22182 test ! -s conftest.err
22799 } && test -s conftest.$ac_objext; then 22183 } && test -s conftest.$ac_objext; then
22800 : 22184 ac_cv_type_socklen_t=yes
22801else 22185else
22802 $as_echo "$as_me: failed program was:" >&5 22186 echo "$as_me: failed program was:" >&5
22803sed 's/^/| /' conftest.$ac_ext >&5 22187sed 's/^/| /' conftest.$ac_ext >&5
22804 22188
22805 ac_cv_type_socklen_t=yes 22189 ac_cv_type_socklen_t=no
22806fi 22190fi
22807 22191
22808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22809else
22810 $as_echo "$as_me: failed program was:" >&5
22811sed 's/^/| /' conftest.$ac_ext >&5
22812
22813
22814fi 22193fi
22815 22194{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
22816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22195echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
22817fi
22818{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
22819$as_echo "$ac_cv_type_socklen_t" >&6; }
22820if test $ac_cv_type_socklen_t = yes; then 22196if test $ac_cv_type_socklen_t = yes; then
22821 : 22197 :
22822else 22198else
22823 22199
22824 { $as_echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5 22200 { echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5
22825$as_echo_n "checking for socklen_t equivalent... " >&6; } 22201echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6; }
22826 if test "${curl_cv_socklen_t_equiv+set}" = set; then 22202 if test "${curl_cv_socklen_t_equiv+set}" = set; then
22827 $as_echo_n "(cached) " >&6 22203 echo $ECHO_N "(cached) $ECHO_C" >&6
22828else 22204else
22829 22205
22830 # Systems have either "struct sockaddr *" or 22206 # Systems have either "struct sockaddr *" or
@@ -22861,14 +22237,13 @@ case "(($ac_try" in
22861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22862 *) ac_try_echo=$ac_try;; 22238 *) ac_try_echo=$ac_try;;
22863esac 22239esac
22864eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22865$as_echo "$ac_try_echo") >&5
22866 (eval "$ac_compile") 2>conftest.er1 22241 (eval "$ac_compile") 2>conftest.er1
22867 ac_status=$? 22242 ac_status=$?
22868 grep -v '^ *+' conftest.er1 >conftest.err 22243 grep -v '^ *+' conftest.er1 >conftest.err
22869 rm -f conftest.er1 22244 rm -f conftest.er1
22870 cat conftest.err >&5 22245 cat conftest.err >&5
22871 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22872 (exit $ac_status); } && { 22247 (exit $ac_status); } && {
22873 test -z "$ac_c_werror_flag" || 22248 test -z "$ac_c_werror_flag" ||
22874 test ! -s conftest.err 22249 test ! -s conftest.err
@@ -22878,7 +22253,7 @@ $as_echo "$ac_try_echo") >&5
22878 break 22253 break
22879 22254
22880else 22255else
22881 $as_echo "$as_me: failed program was:" >&5 22256 echo "$as_me: failed program was:" >&5
22882sed 's/^/| /' conftest.$ac_ext >&5 22257sed 's/^/| /' conftest.$ac_ext >&5
22883 22258
22884 22259
@@ -22889,15 +22264,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22889 done 22264 done
22890 22265
22891 if test "x$curl_cv_socklen_t_equiv" = x; then 22266 if test "x$curl_cv_socklen_t_equiv" = x; then
22892 { { $as_echo "$as_me:$LINENO: error: Cannot find a type to use in place of socklen_t" >&5 22267 { { echo "$as_me:$LINENO: error: Cannot find a type to use in place of socklen_t" >&5
22893$as_echo "$as_me: error: Cannot find a type to use in place of socklen_t" >&2;} 22268echo "$as_me: error: Cannot find a type to use in place of socklen_t" >&2;}
22894 { (exit 1); exit 1; }; } 22269 { (exit 1); exit 1; }; }
22895 fi 22270 fi
22896 22271
22897fi 22272fi
22898 22273
22899 { $as_echo "$as_me:$LINENO: result: $curl_cv_socklen_t_equiv" >&5 22274 { echo "$as_me:$LINENO: result: $curl_cv_socklen_t_equiv" >&5
22900$as_echo "$curl_cv_socklen_t_equiv" >&6; } 22275echo "${ECHO_T}$curl_cv_socklen_t_equiv" >&6; }
22901 22276
22902cat >>confdefs.h <<_ACEOF 22277cat >>confdefs.h <<_ACEOF
22903#define socklen_t $curl_cv_socklen_t_equiv 22278#define socklen_t $curl_cv_socklen_t_equiv
@@ -22907,47 +22282,11 @@ fi
22907 22282
22908 22283
22909 22284
22910{ $as_echo "$as_me:$LINENO: checking for sig_atomic_t" >&5 22285{ echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
22911$as_echo_n "checking for sig_atomic_t... " >&6; } 22286echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6; }
22912if test "${ac_cv_type_sig_atomic_t+set}" = set; then 22287if test "${ac_cv_type_sig_atomic_t+set}" = set; then
22913 $as_echo_n "(cached) " >&6 22288 echo $ECHO_N "(cached) $ECHO_C" >&6
22914else 22289else
22915 ac_cv_type_sig_atomic_t=no
22916cat >conftest.$ac_ext <<_ACEOF
22917/* confdefs.h. */
22918_ACEOF
22919cat confdefs.h >>conftest.$ac_ext
22920cat >>conftest.$ac_ext <<_ACEOF
22921/* end confdefs.h. */
22922#include <signal.h>
22923
22924int
22925main ()
22926{
22927if (sizeof (sig_atomic_t))
22928 return 0;
22929 ;
22930 return 0;
22931}
22932_ACEOF
22933rm -f conftest.$ac_objext
22934if { (ac_try="$ac_compile"
22935case "(($ac_try" in
22936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22937 *) ac_try_echo=$ac_try;;
22938esac
22939eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22940$as_echo "$ac_try_echo") >&5
22941 (eval "$ac_compile") 2>conftest.er1
22942 ac_status=$?
22943 grep -v '^ *+' conftest.er1 >conftest.err
22944 rm -f conftest.er1
22945 cat conftest.err >&5
22946 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22947 (exit $ac_status); } && {
22948 test -z "$ac_c_werror_flag" ||
22949 test ! -s conftest.err
22950 } && test -s conftest.$ac_objext; then
22951 cat >conftest.$ac_ext <<_ACEOF 22290 cat >conftest.$ac_ext <<_ACEOF
22952/* confdefs.h. */ 22291/* confdefs.h. */
22953_ACEOF 22292_ACEOF
@@ -22956,11 +22295,14 @@ cat >>conftest.$ac_ext <<_ACEOF
22956/* end confdefs.h. */ 22295/* end confdefs.h. */
22957#include <signal.h> 22296#include <signal.h>
22958 22297
22298typedef sig_atomic_t ac__type_new_;
22959int 22299int
22960main () 22300main ()
22961{ 22301{
22962if (sizeof ((sig_atomic_t))) 22302if ((ac__type_new_ *) 0)
22963 return 0; 22303 return 0;
22304if (sizeof (ac__type_new_))
22305 return 0;
22964 ; 22306 ;
22965 return 0; 22307 return 0;
22966} 22308}
@@ -22971,38 +22313,29 @@ case "(($ac_try" in
22971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22972 *) ac_try_echo=$ac_try;; 22314 *) ac_try_echo=$ac_try;;
22973esac 22315esac
22974eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22975$as_echo "$ac_try_echo") >&5
22976 (eval "$ac_compile") 2>conftest.er1 22317 (eval "$ac_compile") 2>conftest.er1
22977 ac_status=$? 22318 ac_status=$?
22978 grep -v '^ *+' conftest.er1 >conftest.err 22319 grep -v '^ *+' conftest.er1 >conftest.err
22979 rm -f conftest.er1 22320 rm -f conftest.er1
22980 cat conftest.err >&5 22321 cat conftest.err >&5
22981 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22982 (exit $ac_status); } && { 22323 (exit $ac_status); } && {
22983 test -z "$ac_c_werror_flag" || 22324 test -z "$ac_c_werror_flag" ||
22984 test ! -s conftest.err 22325 test ! -s conftest.err
22985 } && test -s conftest.$ac_objext; then 22326 } && test -s conftest.$ac_objext; then
22986 : 22327 ac_cv_type_sig_atomic_t=yes
22987else
22988 $as_echo "$as_me: failed program was:" >&5
22989sed 's/^/| /' conftest.$ac_ext >&5
22990
22991 ac_cv_type_sig_atomic_t=yes
22992fi
22993
22994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22995else 22328else
22996 $as_echo "$as_me: failed program was:" >&5 22329 echo "$as_me: failed program was:" >&5
22997sed 's/^/| /' conftest.$ac_ext >&5 22330sed 's/^/| /' conftest.$ac_ext >&5
22998 22331
22999 22332 ac_cv_type_sig_atomic_t=no
23000fi 22333fi
23001 22334
23002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23003fi 22336fi
23004{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5 22337{ echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
23005$as_echo "$ac_cv_type_sig_atomic_t" >&6; } 22338echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6; }
23006if test $ac_cv_type_sig_atomic_t = yes; then 22339if test $ac_cv_type_sig_atomic_t = yes; then
23007 22340
23008cat >>confdefs.h <<_ACEOF 22341cat >>confdefs.h <<_ACEOF
@@ -23012,58 +22345,11 @@ _ACEOF
23012 22345
23013fi 22346fi
23014 22347
23015{ $as_echo "$as_me:$LINENO: checking for fsblkcnt_t" >&5 22348{ echo "$as_me:$LINENO: checking for fsblkcnt_t" >&5
23016$as_echo_n "checking for fsblkcnt_t... " >&6; } 22349echo $ECHO_N "checking for fsblkcnt_t... $ECHO_C" >&6; }
23017if test "${ac_cv_type_fsblkcnt_t+set}" = set; then 22350if test "${ac_cv_type_fsblkcnt_t+set}" = set; then
23018 $as_echo_n "(cached) " >&6 22351 echo $ECHO_N "(cached) $ECHO_C" >&6
23019else 22352else
23020 ac_cv_type_fsblkcnt_t=no
23021cat >conftest.$ac_ext <<_ACEOF
23022/* confdefs.h. */
23023_ACEOF
23024cat confdefs.h >>conftest.$ac_ext
23025cat >>conftest.$ac_ext <<_ACEOF
23026/* end confdefs.h. */
23027
23028#include <sys/types.h>
23029#ifdef HAVE_SYS_BITYPES_H
23030#include <sys/bitypes.h>
23031#endif
23032#ifdef HAVE_SYS_STATFS_H
23033#include <sys/statfs.h>
23034#endif
23035#ifdef HAVE_SYS_STATVFS_H
23036#include <sys/statvfs.h>
23037#endif
23038
23039
23040int
23041main ()
23042{
23043if (sizeof (fsblkcnt_t))
23044 return 0;
23045 ;
23046 return 0;
23047}
23048_ACEOF
23049rm -f conftest.$ac_objext
23050if { (ac_try="$ac_compile"
23051case "(($ac_try" in
23052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23053 *) ac_try_echo=$ac_try;;
23054esac
23055eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23056$as_echo "$ac_try_echo") >&5
23057 (eval "$ac_compile") 2>conftest.er1
23058 ac_status=$?
23059 grep -v '^ *+' conftest.er1 >conftest.err
23060 rm -f conftest.er1
23061 cat conftest.err >&5
23062 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23063 (exit $ac_status); } && {
23064 test -z "$ac_c_werror_flag" ||
23065 test ! -s conftest.err
23066 } && test -s conftest.$ac_objext; then
23067 cat >conftest.$ac_ext <<_ACEOF 22353 cat >conftest.$ac_ext <<_ACEOF
23068/* confdefs.h. */ 22354/* confdefs.h. */
23069_ACEOF 22355_ACEOF
@@ -23083,11 +22369,14 @@ cat >>conftest.$ac_ext <<_ACEOF
23083#endif 22369#endif
23084 22370
23085 22371
22372typedef fsblkcnt_t ac__type_new_;
23086int 22373int
23087main () 22374main ()
23088{ 22375{
23089if (sizeof ((fsblkcnt_t))) 22376if ((ac__type_new_ *) 0)
23090 return 0; 22377 return 0;
22378if (sizeof (ac__type_new_))
22379 return 0;
23091 ; 22380 ;
23092 return 0; 22381 return 0;
23093} 22382}
@@ -23098,38 +22387,29 @@ case "(($ac_try" in
23098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23099 *) ac_try_echo=$ac_try;; 22388 *) ac_try_echo=$ac_try;;
23100esac 22389esac
23101eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23102$as_echo "$ac_try_echo") >&5
23103 (eval "$ac_compile") 2>conftest.er1 22391 (eval "$ac_compile") 2>conftest.er1
23104 ac_status=$? 22392 ac_status=$?
23105 grep -v '^ *+' conftest.er1 >conftest.err 22393 grep -v '^ *+' conftest.er1 >conftest.err
23106 rm -f conftest.er1 22394 rm -f conftest.er1
23107 cat conftest.err >&5 22395 cat conftest.err >&5
23108 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23109 (exit $ac_status); } && { 22397 (exit $ac_status); } && {
23110 test -z "$ac_c_werror_flag" || 22398 test -z "$ac_c_werror_flag" ||
23111 test ! -s conftest.err 22399 test ! -s conftest.err
23112 } && test -s conftest.$ac_objext; then 22400 } && test -s conftest.$ac_objext; then
23113 : 22401 ac_cv_type_fsblkcnt_t=yes
23114else
23115 $as_echo "$as_me: failed program was:" >&5
23116sed 's/^/| /' conftest.$ac_ext >&5
23117
23118 ac_cv_type_fsblkcnt_t=yes
23119fi
23120
23121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23122else 22402else
23123 $as_echo "$as_me: failed program was:" >&5 22403 echo "$as_me: failed program was:" >&5
23124sed 's/^/| /' conftest.$ac_ext >&5 22404sed 's/^/| /' conftest.$ac_ext >&5
23125 22405
23126 22406 ac_cv_type_fsblkcnt_t=no
23127fi 22407fi
23128 22408
23129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23130fi 22410fi
23131{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_fsblkcnt_t" >&5 22411{ echo "$as_me:$LINENO: result: $ac_cv_type_fsblkcnt_t" >&5
23132$as_echo "$ac_cv_type_fsblkcnt_t" >&6; } 22412echo "${ECHO_T}$ac_cv_type_fsblkcnt_t" >&6; }
23133if test $ac_cv_type_fsblkcnt_t = yes; then 22413if test $ac_cv_type_fsblkcnt_t = yes; then
23134 22414
23135cat >>confdefs.h <<_ACEOF 22415cat >>confdefs.h <<_ACEOF
@@ -23138,58 +22418,11 @@ _ACEOF
23138 22418
23139 22419
23140fi 22420fi
23141{ $as_echo "$as_me:$LINENO: checking for fsfilcnt_t" >&5 22421{ echo "$as_me:$LINENO: checking for fsfilcnt_t" >&5
23142$as_echo_n "checking for fsfilcnt_t... " >&6; } 22422echo $ECHO_N "checking for fsfilcnt_t... $ECHO_C" >&6; }
23143if test "${ac_cv_type_fsfilcnt_t+set}" = set; then 22423if test "${ac_cv_type_fsfilcnt_t+set}" = set; then
23144 $as_echo_n "(cached) " >&6 22424 echo $ECHO_N "(cached) $ECHO_C" >&6
23145else 22425else
23146 ac_cv_type_fsfilcnt_t=no
23147cat >conftest.$ac_ext <<_ACEOF
23148/* confdefs.h. */
23149_ACEOF
23150cat confdefs.h >>conftest.$ac_ext
23151cat >>conftest.$ac_ext <<_ACEOF
23152/* end confdefs.h. */
23153
23154#include <sys/types.h>
23155#ifdef HAVE_SYS_BITYPES_H
23156#include <sys/bitypes.h>
23157#endif
23158#ifdef HAVE_SYS_STATFS_H
23159#include <sys/statfs.h>
23160#endif
23161#ifdef HAVE_SYS_STATVFS_H
23162#include <sys/statvfs.h>
23163#endif
23164
23165
23166int
23167main ()
23168{
23169if (sizeof (fsfilcnt_t))
23170 return 0;
23171 ;
23172 return 0;
23173}
23174_ACEOF
23175rm -f conftest.$ac_objext
23176if { (ac_try="$ac_compile"
23177case "(($ac_try" in
23178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23179 *) ac_try_echo=$ac_try;;
23180esac
23181eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23182$as_echo "$ac_try_echo") >&5
23183 (eval "$ac_compile") 2>conftest.er1
23184 ac_status=$?
23185 grep -v '^ *+' conftest.er1 >conftest.err
23186 rm -f conftest.er1
23187 cat conftest.err >&5
23188 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23189 (exit $ac_status); } && {
23190 test -z "$ac_c_werror_flag" ||
23191 test ! -s conftest.err
23192 } && test -s conftest.$ac_objext; then
23193 cat >conftest.$ac_ext <<_ACEOF 22426 cat >conftest.$ac_ext <<_ACEOF
23194/* confdefs.h. */ 22427/* confdefs.h. */
23195_ACEOF 22428_ACEOF
@@ -23209,11 +22442,14 @@ cat >>conftest.$ac_ext <<_ACEOF
23209#endif 22442#endif
23210 22443
23211 22444
22445typedef fsfilcnt_t ac__type_new_;
23212int 22446int
23213main () 22447main ()
23214{ 22448{
23215if (sizeof ((fsfilcnt_t))) 22449if ((ac__type_new_ *) 0)
23216 return 0; 22450 return 0;
22451if (sizeof (ac__type_new_))
22452 return 0;
23217 ; 22453 ;
23218 return 0; 22454 return 0;
23219} 22455}
@@ -23224,38 +22460,29 @@ case "(($ac_try" in
23224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23225 *) ac_try_echo=$ac_try;; 22461 *) ac_try_echo=$ac_try;;
23226esac 22462esac
23227eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23228$as_echo "$ac_try_echo") >&5
23229 (eval "$ac_compile") 2>conftest.er1 22464 (eval "$ac_compile") 2>conftest.er1
23230 ac_status=$? 22465 ac_status=$?
23231 grep -v '^ *+' conftest.er1 >conftest.err 22466 grep -v '^ *+' conftest.er1 >conftest.err
23232 rm -f conftest.er1 22467 rm -f conftest.er1
23233 cat conftest.err >&5 22468 cat conftest.err >&5
23234 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23235 (exit $ac_status); } && { 22470 (exit $ac_status); } && {
23236 test -z "$ac_c_werror_flag" || 22471 test -z "$ac_c_werror_flag" ||
23237 test ! -s conftest.err 22472 test ! -s conftest.err
23238 } && test -s conftest.$ac_objext; then 22473 } && test -s conftest.$ac_objext; then
23239 : 22474 ac_cv_type_fsfilcnt_t=yes
23240else
23241 $as_echo "$as_me: failed program was:" >&5
23242sed 's/^/| /' conftest.$ac_ext >&5
23243
23244 ac_cv_type_fsfilcnt_t=yes
23245fi
23246
23247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23248else 22475else
23249 $as_echo "$as_me: failed program was:" >&5 22476 echo "$as_me: failed program was:" >&5
23250sed 's/^/| /' conftest.$ac_ext >&5 22477sed 's/^/| /' conftest.$ac_ext >&5
23251 22478
23252 22479 ac_cv_type_fsfilcnt_t=no
23253fi 22480fi
23254 22481
23255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23256fi 22483fi
23257{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_fsfilcnt_t" >&5 22484{ echo "$as_me:$LINENO: result: $ac_cv_type_fsfilcnt_t" >&5
23258$as_echo "$ac_cv_type_fsfilcnt_t" >&6; } 22485echo "${ECHO_T}$ac_cv_type_fsfilcnt_t" >&6; }
23259if test $ac_cv_type_fsfilcnt_t = yes; then 22486if test $ac_cv_type_fsfilcnt_t = yes; then
23260 22487
23261cat >>confdefs.h <<_ACEOF 22488cat >>confdefs.h <<_ACEOF
@@ -23266,48 +22493,11 @@ _ACEOF
23266fi 22493fi
23267 22494
23268 22495
23269{ $as_echo "$as_me:$LINENO: checking for in_addr_t" >&5 22496{ echo "$as_me:$LINENO: checking for in_addr_t" >&5
23270$as_echo_n "checking for in_addr_t... " >&6; } 22497echo $ECHO_N "checking for in_addr_t... $ECHO_C" >&6; }
23271if test "${ac_cv_type_in_addr_t+set}" = set; then 22498if test "${ac_cv_type_in_addr_t+set}" = set; then
23272 $as_echo_n "(cached) " >&6 22499 echo $ECHO_N "(cached) $ECHO_C" >&6
23273else 22500else
23274 ac_cv_type_in_addr_t=no
23275cat >conftest.$ac_ext <<_ACEOF
23276/* confdefs.h. */
23277_ACEOF
23278cat confdefs.h >>conftest.$ac_ext
23279cat >>conftest.$ac_ext <<_ACEOF
23280/* end confdefs.h. */
23281#include <sys/types.h>
23282#include <netinet/in.h>
23283
23284int
23285main ()
23286{
23287if (sizeof (in_addr_t))
23288 return 0;
23289 ;
23290 return 0;
23291}
23292_ACEOF
23293rm -f conftest.$ac_objext
23294if { (ac_try="$ac_compile"
23295case "(($ac_try" in
23296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23297 *) ac_try_echo=$ac_try;;
23298esac
23299eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23300$as_echo "$ac_try_echo") >&5
23301 (eval "$ac_compile") 2>conftest.er1
23302 ac_status=$?
23303 grep -v '^ *+' conftest.er1 >conftest.err
23304 rm -f conftest.er1
23305 cat conftest.err >&5
23306 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23307 (exit $ac_status); } && {
23308 test -z "$ac_c_werror_flag" ||
23309 test ! -s conftest.err
23310 } && test -s conftest.$ac_objext; then
23311 cat >conftest.$ac_ext <<_ACEOF 22501 cat >conftest.$ac_ext <<_ACEOF
23312/* confdefs.h. */ 22502/* confdefs.h. */
23313_ACEOF 22503_ACEOF
@@ -23317,11 +22507,14 @@ cat >>conftest.$ac_ext <<_ACEOF
23317#include <sys/types.h> 22507#include <sys/types.h>
23318#include <netinet/in.h> 22508#include <netinet/in.h>
23319 22509
22510typedef in_addr_t ac__type_new_;
23320int 22511int
23321main () 22512main ()
23322{ 22513{
23323if (sizeof ((in_addr_t))) 22514if ((ac__type_new_ *) 0)
23324 return 0; 22515 return 0;
22516if (sizeof (ac__type_new_))
22517 return 0;
23325 ; 22518 ;
23326 return 0; 22519 return 0;
23327} 22520}
@@ -23332,38 +22525,29 @@ case "(($ac_try" in
23332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23333 *) ac_try_echo=$ac_try;; 22526 *) ac_try_echo=$ac_try;;
23334esac 22527esac
23335eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23336$as_echo "$ac_try_echo") >&5
23337 (eval "$ac_compile") 2>conftest.er1 22529 (eval "$ac_compile") 2>conftest.er1
23338 ac_status=$? 22530 ac_status=$?
23339 grep -v '^ *+' conftest.er1 >conftest.err 22531 grep -v '^ *+' conftest.er1 >conftest.err
23340 rm -f conftest.er1 22532 rm -f conftest.er1
23341 cat conftest.err >&5 22533 cat conftest.err >&5
23342 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23343 (exit $ac_status); } && { 22535 (exit $ac_status); } && {
23344 test -z "$ac_c_werror_flag" || 22536 test -z "$ac_c_werror_flag" ||
23345 test ! -s conftest.err 22537 test ! -s conftest.err
23346 } && test -s conftest.$ac_objext; then 22538 } && test -s conftest.$ac_objext; then
23347 : 22539 ac_cv_type_in_addr_t=yes
23348else
23349 $as_echo "$as_me: failed program was:" >&5
23350sed 's/^/| /' conftest.$ac_ext >&5
23351
23352 ac_cv_type_in_addr_t=yes
23353fi
23354
23355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23356else 22540else
23357 $as_echo "$as_me: failed program was:" >&5 22541 echo "$as_me: failed program was:" >&5
23358sed 's/^/| /' conftest.$ac_ext >&5 22542sed 's/^/| /' conftest.$ac_ext >&5
23359 22543
23360 22544 ac_cv_type_in_addr_t=no
23361fi 22545fi
23362 22546
23363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23364fi 22548fi
23365{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_in_addr_t" >&5 22549{ echo "$as_me:$LINENO: result: $ac_cv_type_in_addr_t" >&5
23366$as_echo "$ac_cv_type_in_addr_t" >&6; } 22550echo "${ECHO_T}$ac_cv_type_in_addr_t" >&6; }
23367if test $ac_cv_type_in_addr_t = yes; then 22551if test $ac_cv_type_in_addr_t = yes; then
23368 22552
23369cat >>confdefs.h <<_ACEOF 22553cat >>confdefs.h <<_ACEOF
@@ -23372,48 +22556,11 @@ _ACEOF
23372 22556
23373 22557
23374fi 22558fi
23375{ $as_echo "$as_me:$LINENO: checking for in_port_t" >&5 22559{ echo "$as_me:$LINENO: checking for in_port_t" >&5
23376$as_echo_n "checking for in_port_t... " >&6; } 22560echo $ECHO_N "checking for in_port_t... $ECHO_C" >&6; }
23377if test "${ac_cv_type_in_port_t+set}" = set; then 22561if test "${ac_cv_type_in_port_t+set}" = set; then
23378 $as_echo_n "(cached) " >&6 22562 echo $ECHO_N "(cached) $ECHO_C" >&6
23379else 22563else
23380 ac_cv_type_in_port_t=no
23381cat >conftest.$ac_ext <<_ACEOF
23382/* confdefs.h. */
23383_ACEOF
23384cat confdefs.h >>conftest.$ac_ext
23385cat >>conftest.$ac_ext <<_ACEOF
23386/* end confdefs.h. */
23387#include <sys/types.h>
23388#include <netinet/in.h>
23389
23390int
23391main ()
23392{
23393if (sizeof (in_port_t))
23394 return 0;
23395 ;
23396 return 0;
23397}
23398_ACEOF
23399rm -f conftest.$ac_objext
23400if { (ac_try="$ac_compile"
23401case "(($ac_try" in
23402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23403 *) ac_try_echo=$ac_try;;
23404esac
23405eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23406$as_echo "$ac_try_echo") >&5
23407 (eval "$ac_compile") 2>conftest.er1
23408 ac_status=$?
23409 grep -v '^ *+' conftest.er1 >conftest.err
23410 rm -f conftest.er1
23411 cat conftest.err >&5
23412 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23413 (exit $ac_status); } && {
23414 test -z "$ac_c_werror_flag" ||
23415 test ! -s conftest.err
23416 } && test -s conftest.$ac_objext; then
23417 cat >conftest.$ac_ext <<_ACEOF 22564 cat >conftest.$ac_ext <<_ACEOF
23418/* confdefs.h. */ 22565/* confdefs.h. */
23419_ACEOF 22566_ACEOF
@@ -23423,11 +22570,14 @@ cat >>conftest.$ac_ext <<_ACEOF
23423#include <sys/types.h> 22570#include <sys/types.h>
23424#include <netinet/in.h> 22571#include <netinet/in.h>
23425 22572
22573typedef in_port_t ac__type_new_;
23426int 22574int
23427main () 22575main ()
23428{ 22576{
23429if (sizeof ((in_port_t))) 22577if ((ac__type_new_ *) 0)
23430 return 0; 22578 return 0;
22579if (sizeof (ac__type_new_))
22580 return 0;
23431 ; 22581 ;
23432 return 0; 22582 return 0;
23433} 22583}
@@ -23438,38 +22588,29 @@ case "(($ac_try" in
23438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23439 *) ac_try_echo=$ac_try;; 22589 *) ac_try_echo=$ac_try;;
23440esac 22590esac
23441eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23442$as_echo "$ac_try_echo") >&5
23443 (eval "$ac_compile") 2>conftest.er1 22592 (eval "$ac_compile") 2>conftest.er1
23444 ac_status=$? 22593 ac_status=$?
23445 grep -v '^ *+' conftest.er1 >conftest.err 22594 grep -v '^ *+' conftest.er1 >conftest.err
23446 rm -f conftest.er1 22595 rm -f conftest.er1
23447 cat conftest.err >&5 22596 cat conftest.err >&5
23448 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23449 (exit $ac_status); } && { 22598 (exit $ac_status); } && {
23450 test -z "$ac_c_werror_flag" || 22599 test -z "$ac_c_werror_flag" ||
23451 test ! -s conftest.err 22600 test ! -s conftest.err
23452 } && test -s conftest.$ac_objext; then 22601 } && test -s conftest.$ac_objext; then
23453 : 22602 ac_cv_type_in_port_t=yes
23454else
23455 $as_echo "$as_me: failed program was:" >&5
23456sed 's/^/| /' conftest.$ac_ext >&5
23457
23458 ac_cv_type_in_port_t=yes
23459fi
23460
23461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23462else 22603else
23463 $as_echo "$as_me: failed program was:" >&5 22604 echo "$as_me: failed program was:" >&5
23464sed 's/^/| /' conftest.$ac_ext >&5 22605sed 's/^/| /' conftest.$ac_ext >&5
23465 22606
23466 22607 ac_cv_type_in_port_t=no
23467fi 22608fi
23468 22609
23469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23470fi 22611fi
23471{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_in_port_t" >&5 22612{ echo "$as_me:$LINENO: result: $ac_cv_type_in_port_t" >&5
23472$as_echo "$ac_cv_type_in_port_t" >&6; } 22613echo "${ECHO_T}$ac_cv_type_in_port_t" >&6; }
23473if test $ac_cv_type_in_port_t = yes; then 22614if test $ac_cv_type_in_port_t = yes; then
23474 22615
23475cat >>confdefs.h <<_ACEOF 22616cat >>confdefs.h <<_ACEOF
@@ -23480,10 +22621,10 @@ _ACEOF
23480fi 22621fi
23481 22622
23482 22623
23483{ $as_echo "$as_me:$LINENO: checking for size_t" >&5 22624{ echo "$as_me:$LINENO: checking for size_t" >&5
23484$as_echo_n "checking for size_t... " >&6; } 22625echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
23485if test "${ac_cv_have_size_t+set}" = set; then 22626if test "${ac_cv_have_size_t+set}" = set; then
23486 $as_echo_n "(cached) " >&6 22627 echo $ECHO_N "(cached) $ECHO_C" >&6
23487else 22628else
23488 22629
23489 cat >conftest.$ac_ext <<_ACEOF 22630 cat >conftest.$ac_ext <<_ACEOF
@@ -23509,21 +22650,20 @@ case "(($ac_try" in
23509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23510 *) ac_try_echo=$ac_try;; 22651 *) ac_try_echo=$ac_try;;
23511esac 22652esac
23512eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23513$as_echo "$ac_try_echo") >&5
23514 (eval "$ac_compile") 2>conftest.er1 22654 (eval "$ac_compile") 2>conftest.er1
23515 ac_status=$? 22655 ac_status=$?
23516 grep -v '^ *+' conftest.er1 >conftest.err 22656 grep -v '^ *+' conftest.er1 >conftest.err
23517 rm -f conftest.er1 22657 rm -f conftest.er1
23518 cat conftest.err >&5 22658 cat conftest.err >&5
23519 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23520 (exit $ac_status); } && { 22660 (exit $ac_status); } && {
23521 test -z "$ac_c_werror_flag" || 22661 test -z "$ac_c_werror_flag" ||
23522 test ! -s conftest.err 22662 test ! -s conftest.err
23523 } && test -s conftest.$ac_objext; then 22663 } && test -s conftest.$ac_objext; then
23524 ac_cv_have_size_t="yes" 22664 ac_cv_have_size_t="yes"
23525else 22665else
23526 $as_echo "$as_me: failed program was:" >&5 22666 echo "$as_me: failed program was:" >&5
23527sed 's/^/| /' conftest.$ac_ext >&5 22667sed 's/^/| /' conftest.$ac_ext >&5
23528 22668
23529 ac_cv_have_size_t="no" 22669 ac_cv_have_size_t="no"
@@ -23533,8 +22673,8 @@ fi
23533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23534 22674
23535fi 22675fi
23536{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_size_t" >&5 22676{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t" >&5
23537$as_echo "$ac_cv_have_size_t" >&6; } 22677echo "${ECHO_T}$ac_cv_have_size_t" >&6; }
23538if test "x$ac_cv_have_size_t" = "xyes" ; then 22678if test "x$ac_cv_have_size_t" = "xyes" ; then
23539 22679
23540cat >>confdefs.h <<\_ACEOF 22680cat >>confdefs.h <<\_ACEOF
@@ -23543,10 +22683,10 @@ _ACEOF
23543 22683
23544fi 22684fi
23545 22685
23546{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5 22686{ echo "$as_me:$LINENO: checking for ssize_t" >&5
23547$as_echo_n "checking for ssize_t... " >&6; } 22687echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
23548if test "${ac_cv_have_ssize_t+set}" = set; then 22688if test "${ac_cv_have_ssize_t+set}" = set; then
23549 $as_echo_n "(cached) " >&6 22689 echo $ECHO_N "(cached) $ECHO_C" >&6
23550else 22690else
23551 22691
23552 cat >conftest.$ac_ext <<_ACEOF 22692 cat >conftest.$ac_ext <<_ACEOF
@@ -23572,21 +22712,20 @@ case "(($ac_try" in
23572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23573 *) ac_try_echo=$ac_try;; 22713 *) ac_try_echo=$ac_try;;
23574esac 22714esac
23575eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23576$as_echo "$ac_try_echo") >&5
23577 (eval "$ac_compile") 2>conftest.er1 22716 (eval "$ac_compile") 2>conftest.er1
23578 ac_status=$? 22717 ac_status=$?
23579 grep -v '^ *+' conftest.er1 >conftest.err 22718 grep -v '^ *+' conftest.er1 >conftest.err
23580 rm -f conftest.er1 22719 rm -f conftest.er1
23581 cat conftest.err >&5 22720 cat conftest.err >&5
23582 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23583 (exit $ac_status); } && { 22722 (exit $ac_status); } && {
23584 test -z "$ac_c_werror_flag" || 22723 test -z "$ac_c_werror_flag" ||
23585 test ! -s conftest.err 22724 test ! -s conftest.err
23586 } && test -s conftest.$ac_objext; then 22725 } && test -s conftest.$ac_objext; then
23587 ac_cv_have_ssize_t="yes" 22726 ac_cv_have_ssize_t="yes"
23588else 22727else
23589 $as_echo "$as_me: failed program was:" >&5 22728 echo "$as_me: failed program was:" >&5
23590sed 's/^/| /' conftest.$ac_ext >&5 22729sed 's/^/| /' conftest.$ac_ext >&5
23591 22730
23592 ac_cv_have_ssize_t="no" 22731 ac_cv_have_ssize_t="no"
@@ -23596,8 +22735,8 @@ fi
23596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23597 22736
23598fi 22737fi
23599{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_ssize_t" >&5 22738{ echo "$as_me:$LINENO: result: $ac_cv_have_ssize_t" >&5
23600$as_echo "$ac_cv_have_ssize_t" >&6; } 22739echo "${ECHO_T}$ac_cv_have_ssize_t" >&6; }
23601if test "x$ac_cv_have_ssize_t" = "xyes" ; then 22740if test "x$ac_cv_have_ssize_t" = "xyes" ; then
23602 22741
23603cat >>confdefs.h <<\_ACEOF 22742cat >>confdefs.h <<\_ACEOF
@@ -23606,10 +22745,10 @@ _ACEOF
23606 22745
23607fi 22746fi
23608 22747
23609{ $as_echo "$as_me:$LINENO: checking for clock_t" >&5 22748{ echo "$as_me:$LINENO: checking for clock_t" >&5
23610$as_echo_n "checking for clock_t... " >&6; } 22749echo $ECHO_N "checking for clock_t... $ECHO_C" >&6; }
23611if test "${ac_cv_have_clock_t+set}" = set; then 22750if test "${ac_cv_have_clock_t+set}" = set; then
23612 $as_echo_n "(cached) " >&6 22751 echo $ECHO_N "(cached) $ECHO_C" >&6
23613else 22752else
23614 22753
23615 cat >conftest.$ac_ext <<_ACEOF 22754 cat >conftest.$ac_ext <<_ACEOF
@@ -23635,21 +22774,20 @@ case "(($ac_try" in
23635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23636 *) ac_try_echo=$ac_try;; 22775 *) ac_try_echo=$ac_try;;
23637esac 22776esac
23638eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23639$as_echo "$ac_try_echo") >&5
23640 (eval "$ac_compile") 2>conftest.er1 22778 (eval "$ac_compile") 2>conftest.er1
23641 ac_status=$? 22779 ac_status=$?
23642 grep -v '^ *+' conftest.er1 >conftest.err 22780 grep -v '^ *+' conftest.er1 >conftest.err
23643 rm -f conftest.er1 22781 rm -f conftest.er1
23644 cat conftest.err >&5 22782 cat conftest.err >&5
23645 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23646 (exit $ac_status); } && { 22784 (exit $ac_status); } && {
23647 test -z "$ac_c_werror_flag" || 22785 test -z "$ac_c_werror_flag" ||
23648 test ! -s conftest.err 22786 test ! -s conftest.err
23649 } && test -s conftest.$ac_objext; then 22787 } && test -s conftest.$ac_objext; then
23650 ac_cv_have_clock_t="yes" 22788 ac_cv_have_clock_t="yes"
23651else 22789else
23652 $as_echo "$as_me: failed program was:" >&5 22790 echo "$as_me: failed program was:" >&5
23653sed 's/^/| /' conftest.$ac_ext >&5 22791sed 's/^/| /' conftest.$ac_ext >&5
23654 22792
23655 ac_cv_have_clock_t="no" 22793 ac_cv_have_clock_t="no"
@@ -23659,8 +22797,8 @@ fi
23659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23660 22798
23661fi 22799fi
23662{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_clock_t" >&5 22800{ echo "$as_me:$LINENO: result: $ac_cv_have_clock_t" >&5
23663$as_echo "$ac_cv_have_clock_t" >&6; } 22801echo "${ECHO_T}$ac_cv_have_clock_t" >&6; }
23664if test "x$ac_cv_have_clock_t" = "xyes" ; then 22802if test "x$ac_cv_have_clock_t" = "xyes" ; then
23665 22803
23666cat >>confdefs.h <<\_ACEOF 22804cat >>confdefs.h <<\_ACEOF
@@ -23669,10 +22807,10 @@ _ACEOF
23669 22807
23670fi 22808fi
23671 22809
23672{ $as_echo "$as_me:$LINENO: checking for sa_family_t" >&5 22810{ echo "$as_me:$LINENO: checking for sa_family_t" >&5
23673$as_echo_n "checking for sa_family_t... " >&6; } 22811echo $ECHO_N "checking for sa_family_t... $ECHO_C" >&6; }
23674if test "${ac_cv_have_sa_family_t+set}" = set; then 22812if test "${ac_cv_have_sa_family_t+set}" = set; then
23675 $as_echo_n "(cached) " >&6 22813 echo $ECHO_N "(cached) $ECHO_C" >&6
23676else 22814else
23677 22815
23678 cat >conftest.$ac_ext <<_ACEOF 22816 cat >conftest.$ac_ext <<_ACEOF
@@ -23699,21 +22837,20 @@ case "(($ac_try" in
23699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23700 *) ac_try_echo=$ac_try;; 22838 *) ac_try_echo=$ac_try;;
23701esac 22839esac
23702eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23703$as_echo "$ac_try_echo") >&5
23704 (eval "$ac_compile") 2>conftest.er1 22841 (eval "$ac_compile") 2>conftest.er1
23705 ac_status=$? 22842 ac_status=$?
23706 grep -v '^ *+' conftest.er1 >conftest.err 22843 grep -v '^ *+' conftest.er1 >conftest.err
23707 rm -f conftest.er1 22844 rm -f conftest.er1
23708 cat conftest.err >&5 22845 cat conftest.err >&5
23709 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23710 (exit $ac_status); } && { 22847 (exit $ac_status); } && {
23711 test -z "$ac_c_werror_flag" || 22848 test -z "$ac_c_werror_flag" ||
23712 test ! -s conftest.err 22849 test ! -s conftest.err
23713 } && test -s conftest.$ac_objext; then 22850 } && test -s conftest.$ac_objext; then
23714 ac_cv_have_sa_family_t="yes" 22851 ac_cv_have_sa_family_t="yes"
23715else 22852else
23716 $as_echo "$as_me: failed program was:" >&5 22853 echo "$as_me: failed program was:" >&5
23717sed 's/^/| /' conftest.$ac_ext >&5 22854sed 's/^/| /' conftest.$ac_ext >&5
23718 22855
23719 cat >conftest.$ac_ext <<_ACEOF 22856 cat >conftest.$ac_ext <<_ACEOF
@@ -23741,21 +22878,20 @@ case "(($ac_try" in
23741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23742 *) ac_try_echo=$ac_try;; 22879 *) ac_try_echo=$ac_try;;
23743esac 22880esac
23744eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23745$as_echo "$ac_try_echo") >&5
23746 (eval "$ac_compile") 2>conftest.er1 22882 (eval "$ac_compile") 2>conftest.er1
23747 ac_status=$? 22883 ac_status=$?
23748 grep -v '^ *+' conftest.er1 >conftest.err 22884 grep -v '^ *+' conftest.er1 >conftest.err
23749 rm -f conftest.er1 22885 rm -f conftest.er1
23750 cat conftest.err >&5 22886 cat conftest.err >&5
23751 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23752 (exit $ac_status); } && { 22888 (exit $ac_status); } && {
23753 test -z "$ac_c_werror_flag" || 22889 test -z "$ac_c_werror_flag" ||
23754 test ! -s conftest.err 22890 test ! -s conftest.err
23755 } && test -s conftest.$ac_objext; then 22891 } && test -s conftest.$ac_objext; then
23756 ac_cv_have_sa_family_t="yes" 22892 ac_cv_have_sa_family_t="yes"
23757else 22893else
23758 $as_echo "$as_me: failed program was:" >&5 22894 echo "$as_me: failed program was:" >&5
23759sed 's/^/| /' conftest.$ac_ext >&5 22895sed 's/^/| /' conftest.$ac_ext >&5
23760 22896
23761 ac_cv_have_sa_family_t="no" 22897 ac_cv_have_sa_family_t="no"
@@ -23769,8 +22905,8 @@ fi
23769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23770 22906
23771fi 22907fi
23772{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_sa_family_t" >&5 22908{ echo "$as_me:$LINENO: result: $ac_cv_have_sa_family_t" >&5
23773$as_echo "$ac_cv_have_sa_family_t" >&6; } 22909echo "${ECHO_T}$ac_cv_have_sa_family_t" >&6; }
23774if test "x$ac_cv_have_sa_family_t" = "xyes" ; then 22910if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
23775 22911
23776cat >>confdefs.h <<\_ACEOF 22912cat >>confdefs.h <<\_ACEOF
@@ -23779,10 +22915,10 @@ _ACEOF
23779 22915
23780fi 22916fi
23781 22917
23782{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5 22918{ echo "$as_me:$LINENO: checking for pid_t" >&5
23783$as_echo_n "checking for pid_t... " >&6; } 22919echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
23784if test "${ac_cv_have_pid_t+set}" = set; then 22920if test "${ac_cv_have_pid_t+set}" = set; then
23785 $as_echo_n "(cached) " >&6 22921 echo $ECHO_N "(cached) $ECHO_C" >&6
23786else 22922else
23787 22923
23788 cat >conftest.$ac_ext <<_ACEOF 22924 cat >conftest.$ac_ext <<_ACEOF
@@ -23808,21 +22944,20 @@ case "(($ac_try" in
23808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23809 *) ac_try_echo=$ac_try;; 22945 *) ac_try_echo=$ac_try;;
23810esac 22946esac
23811eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23812$as_echo "$ac_try_echo") >&5
23813 (eval "$ac_compile") 2>conftest.er1 22948 (eval "$ac_compile") 2>conftest.er1
23814 ac_status=$? 22949 ac_status=$?
23815 grep -v '^ *+' conftest.er1 >conftest.err 22950 grep -v '^ *+' conftest.er1 >conftest.err
23816 rm -f conftest.er1 22951 rm -f conftest.er1
23817 cat conftest.err >&5 22952 cat conftest.err >&5
23818 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23819 (exit $ac_status); } && { 22954 (exit $ac_status); } && {
23820 test -z "$ac_c_werror_flag" || 22955 test -z "$ac_c_werror_flag" ||
23821 test ! -s conftest.err 22956 test ! -s conftest.err
23822 } && test -s conftest.$ac_objext; then 22957 } && test -s conftest.$ac_objext; then
23823 ac_cv_have_pid_t="yes" 22958 ac_cv_have_pid_t="yes"
23824else 22959else
23825 $as_echo "$as_me: failed program was:" >&5 22960 echo "$as_me: failed program was:" >&5
23826sed 's/^/| /' conftest.$ac_ext >&5 22961sed 's/^/| /' conftest.$ac_ext >&5
23827 22962
23828 ac_cv_have_pid_t="no" 22963 ac_cv_have_pid_t="no"
@@ -23832,8 +22967,8 @@ fi
23832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23833 22968
23834fi 22969fi
23835{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_pid_t" >&5 22970{ echo "$as_me:$LINENO: result: $ac_cv_have_pid_t" >&5
23836$as_echo "$ac_cv_have_pid_t" >&6; } 22971echo "${ECHO_T}$ac_cv_have_pid_t" >&6; }
23837if test "x$ac_cv_have_pid_t" = "xyes" ; then 22972if test "x$ac_cv_have_pid_t" = "xyes" ; then
23838 22973
23839cat >>confdefs.h <<\_ACEOF 22974cat >>confdefs.h <<\_ACEOF
@@ -23842,10 +22977,10 @@ _ACEOF
23842 22977
23843fi 22978fi
23844 22979
23845{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5 22980{ echo "$as_me:$LINENO: checking for mode_t" >&5
23846$as_echo_n "checking for mode_t... " >&6; } 22981echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
23847if test "${ac_cv_have_mode_t+set}" = set; then 22982if test "${ac_cv_have_mode_t+set}" = set; then
23848 $as_echo_n "(cached) " >&6 22983 echo $ECHO_N "(cached) $ECHO_C" >&6
23849else 22984else
23850 22985
23851 cat >conftest.$ac_ext <<_ACEOF 22986 cat >conftest.$ac_ext <<_ACEOF
@@ -23871,21 +23006,20 @@ case "(($ac_try" in
23871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23872 *) ac_try_echo=$ac_try;; 23007 *) ac_try_echo=$ac_try;;
23873esac 23008esac
23874eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23875$as_echo "$ac_try_echo") >&5
23876 (eval "$ac_compile") 2>conftest.er1 23010 (eval "$ac_compile") 2>conftest.er1
23877 ac_status=$? 23011 ac_status=$?
23878 grep -v '^ *+' conftest.er1 >conftest.err 23012 grep -v '^ *+' conftest.er1 >conftest.err
23879 rm -f conftest.er1 23013 rm -f conftest.er1
23880 cat conftest.err >&5 23014 cat conftest.err >&5
23881 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23882 (exit $ac_status); } && { 23016 (exit $ac_status); } && {
23883 test -z "$ac_c_werror_flag" || 23017 test -z "$ac_c_werror_flag" ||
23884 test ! -s conftest.err 23018 test ! -s conftest.err
23885 } && test -s conftest.$ac_objext; then 23019 } && test -s conftest.$ac_objext; then
23886 ac_cv_have_mode_t="yes" 23020 ac_cv_have_mode_t="yes"
23887else 23021else
23888 $as_echo "$as_me: failed program was:" >&5 23022 echo "$as_me: failed program was:" >&5
23889sed 's/^/| /' conftest.$ac_ext >&5 23023sed 's/^/| /' conftest.$ac_ext >&5
23890 23024
23891 ac_cv_have_mode_t="no" 23025 ac_cv_have_mode_t="no"
@@ -23895,8 +23029,8 @@ fi
23895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 23029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23896 23030
23897fi 23031fi
23898{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_mode_t" >&5 23032{ echo "$as_me:$LINENO: result: $ac_cv_have_mode_t" >&5
23899$as_echo "$ac_cv_have_mode_t" >&6; } 23033echo "${ECHO_T}$ac_cv_have_mode_t" >&6; }
23900if test "x$ac_cv_have_mode_t" = "xyes" ; then 23034if test "x$ac_cv_have_mode_t" = "xyes" ; then
23901 23035
23902cat >>confdefs.h <<\_ACEOF 23036cat >>confdefs.h <<\_ACEOF
@@ -23906,10 +23040,10 @@ _ACEOF
23906fi 23040fi
23907 23041
23908 23042
23909{ $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5 23043{ echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
23910$as_echo_n "checking for struct sockaddr_storage... " >&6; } 23044echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6; }
23911if test "${ac_cv_have_struct_sockaddr_storage+set}" = set; then 23045if test "${ac_cv_have_struct_sockaddr_storage+set}" = set; then
23912 $as_echo_n "(cached) " >&6 23046 echo $ECHO_N "(cached) $ECHO_C" >&6
23913else 23047else
23914 23048
23915 cat >conftest.$ac_ext <<_ACEOF 23049 cat >conftest.$ac_ext <<_ACEOF
@@ -23936,21 +23070,20 @@ case "(($ac_try" in
23936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23937 *) ac_try_echo=$ac_try;; 23071 *) ac_try_echo=$ac_try;;
23938esac 23072esac
23939eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23940$as_echo "$ac_try_echo") >&5
23941 (eval "$ac_compile") 2>conftest.er1 23074 (eval "$ac_compile") 2>conftest.er1
23942 ac_status=$? 23075 ac_status=$?
23943 grep -v '^ *+' conftest.er1 >conftest.err 23076 grep -v '^ *+' conftest.er1 >conftest.err
23944 rm -f conftest.er1 23077 rm -f conftest.er1
23945 cat conftest.err >&5 23078 cat conftest.err >&5
23946 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23947 (exit $ac_status); } && { 23080 (exit $ac_status); } && {
23948 test -z "$ac_c_werror_flag" || 23081 test -z "$ac_c_werror_flag" ||
23949 test ! -s conftest.err 23082 test ! -s conftest.err
23950 } && test -s conftest.$ac_objext; then 23083 } && test -s conftest.$ac_objext; then
23951 ac_cv_have_struct_sockaddr_storage="yes" 23084 ac_cv_have_struct_sockaddr_storage="yes"
23952else 23085else
23953 $as_echo "$as_me: failed program was:" >&5 23086 echo "$as_me: failed program was:" >&5
23954sed 's/^/| /' conftest.$ac_ext >&5 23087sed 's/^/| /' conftest.$ac_ext >&5
23955 23088
23956 ac_cv_have_struct_sockaddr_storage="no" 23089 ac_cv_have_struct_sockaddr_storage="no"
@@ -23960,8 +23093,8 @@ fi
23960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 23093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23961 23094
23962fi 23095fi
23963{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_struct_sockaddr_storage" >&5 23096{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_sockaddr_storage" >&5
23964$as_echo "$ac_cv_have_struct_sockaddr_storage" >&6; } 23097echo "${ECHO_T}$ac_cv_have_struct_sockaddr_storage" >&6; }
23965if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then 23098if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
23966 23099
23967cat >>confdefs.h <<\_ACEOF 23100cat >>confdefs.h <<\_ACEOF
@@ -23970,10 +23103,10 @@ _ACEOF
23970 23103
23971fi 23104fi
23972 23105
23973{ $as_echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5 23106{ echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
23974$as_echo_n "checking for struct sockaddr_in6... " >&6; } 23107echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6; }
23975if test "${ac_cv_have_struct_sockaddr_in6+set}" = set; then 23108if test "${ac_cv_have_struct_sockaddr_in6+set}" = set; then
23976 $as_echo_n "(cached) " >&6 23109 echo $ECHO_N "(cached) $ECHO_C" >&6
23977else 23110else
23978 23111
23979 cat >conftest.$ac_ext <<_ACEOF 23112 cat >conftest.$ac_ext <<_ACEOF
@@ -24000,21 +23133,20 @@ case "(($ac_try" in
24000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24001 *) ac_try_echo=$ac_try;; 23134 *) ac_try_echo=$ac_try;;
24002esac 23135esac
24003eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24004$as_echo "$ac_try_echo") >&5
24005 (eval "$ac_compile") 2>conftest.er1 23137 (eval "$ac_compile") 2>conftest.er1
24006 ac_status=$? 23138 ac_status=$?
24007 grep -v '^ *+' conftest.er1 >conftest.err 23139 grep -v '^ *+' conftest.er1 >conftest.err
24008 rm -f conftest.er1 23140 rm -f conftest.er1
24009 cat conftest.err >&5 23141 cat conftest.err >&5
24010 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24011 (exit $ac_status); } && { 23143 (exit $ac_status); } && {
24012 test -z "$ac_c_werror_flag" || 23144 test -z "$ac_c_werror_flag" ||
24013 test ! -s conftest.err 23145 test ! -s conftest.err
24014 } && test -s conftest.$ac_objext; then 23146 } && test -s conftest.$ac_objext; then
24015 ac_cv_have_struct_sockaddr_in6="yes" 23147 ac_cv_have_struct_sockaddr_in6="yes"
24016else 23148else
24017 $as_echo "$as_me: failed program was:" >&5 23149 echo "$as_me: failed program was:" >&5
24018sed 's/^/| /' conftest.$ac_ext >&5 23150sed 's/^/| /' conftest.$ac_ext >&5
24019 23151
24020 ac_cv_have_struct_sockaddr_in6="no" 23152 ac_cv_have_struct_sockaddr_in6="no"
@@ -24024,8 +23156,8 @@ fi
24024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 23156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24025 23157
24026fi 23158fi
24027{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_struct_sockaddr_in6" >&5 23159{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_sockaddr_in6" >&5
24028$as_echo "$ac_cv_have_struct_sockaddr_in6" >&6; } 23160echo "${ECHO_T}$ac_cv_have_struct_sockaddr_in6" >&6; }
24029if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then 23161if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
24030 23162
24031cat >>confdefs.h <<\_ACEOF 23163cat >>confdefs.h <<\_ACEOF
@@ -24034,10 +23166,10 @@ _ACEOF
24034 23166
24035fi 23167fi
24036 23168
24037{ $as_echo "$as_me:$LINENO: checking for struct in6_addr" >&5 23169{ echo "$as_me:$LINENO: checking for struct in6_addr" >&5
24038$as_echo_n "checking for struct in6_addr... " >&6; } 23170echo $ECHO_N "checking for struct in6_addr... $ECHO_C" >&6; }
24039if test "${ac_cv_have_struct_in6_addr+set}" = set; then 23171if test "${ac_cv_have_struct_in6_addr+set}" = set; then
24040 $as_echo_n "(cached) " >&6 23172 echo $ECHO_N "(cached) $ECHO_C" >&6
24041else 23173else
24042 23174
24043 cat >conftest.$ac_ext <<_ACEOF 23175 cat >conftest.$ac_ext <<_ACEOF
@@ -24064,21 +23196,20 @@ case "(($ac_try" in
24064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24065 *) ac_try_echo=$ac_try;; 23197 *) ac_try_echo=$ac_try;;
24066esac 23198esac
24067eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24068$as_echo "$ac_try_echo") >&5
24069 (eval "$ac_compile") 2>conftest.er1 23200 (eval "$ac_compile") 2>conftest.er1
24070 ac_status=$? 23201 ac_status=$?
24071 grep -v '^ *+' conftest.er1 >conftest.err 23202 grep -v '^ *+' conftest.er1 >conftest.err
24072 rm -f conftest.er1 23203 rm -f conftest.er1
24073 cat conftest.err >&5 23204 cat conftest.err >&5
24074 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24075 (exit $ac_status); } && { 23206 (exit $ac_status); } && {
24076 test -z "$ac_c_werror_flag" || 23207 test -z "$ac_c_werror_flag" ||
24077 test ! -s conftest.err 23208 test ! -s conftest.err
24078 } && test -s conftest.$ac_objext; then 23209 } && test -s conftest.$ac_objext; then
24079 ac_cv_have_struct_in6_addr="yes" 23210 ac_cv_have_struct_in6_addr="yes"
24080else 23211else
24081 $as_echo "$as_me: failed program was:" >&5 23212 echo "$as_me: failed program was:" >&5
24082sed 's/^/| /' conftest.$ac_ext >&5 23213sed 's/^/| /' conftest.$ac_ext >&5
24083 23214
24084 ac_cv_have_struct_in6_addr="no" 23215 ac_cv_have_struct_in6_addr="no"
@@ -24088,8 +23219,8 @@ fi
24088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 23219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24089 23220
24090fi 23221fi
24091{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_struct_in6_addr" >&5 23222{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_in6_addr" >&5
24092$as_echo "$ac_cv_have_struct_in6_addr" >&6; } 23223echo "${ECHO_T}$ac_cv_have_struct_in6_addr" >&6; }
24093if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then 23224if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
24094 23225
24095cat >>confdefs.h <<\_ACEOF 23226cat >>confdefs.h <<\_ACEOF
@@ -24097,10 +23228,10 @@ cat >>confdefs.h <<\_ACEOF
24097_ACEOF 23228_ACEOF
24098 23229
24099 23230
24100 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_in6.sin6_scope_id" >&5 23231 { echo "$as_me:$LINENO: checking for struct sockaddr_in6.sin6_scope_id" >&5
24101$as_echo_n "checking for struct sockaddr_in6.sin6_scope_id... " >&6; } 23232echo $ECHO_N "checking for struct sockaddr_in6.sin6_scope_id... $ECHO_C" >&6; }
24102if test "${ac_cv_member_struct_sockaddr_in6_sin6_scope_id+set}" = set; then 23233if test "${ac_cv_member_struct_sockaddr_in6_sin6_scope_id+set}" = set; then
24103 $as_echo_n "(cached) " >&6 23234 echo $ECHO_N "(cached) $ECHO_C" >&6
24104else 23235else
24105 cat >conftest.$ac_ext <<_ACEOF 23236 cat >conftest.$ac_ext <<_ACEOF
24106/* confdefs.h. */ 23237/* confdefs.h. */
@@ -24131,21 +23262,20 @@ case "(($ac_try" in
24131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24132 *) ac_try_echo=$ac_try;; 23263 *) ac_try_echo=$ac_try;;
24133esac 23264esac
24134eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24135$as_echo "$ac_try_echo") >&5
24136 (eval "$ac_compile") 2>conftest.er1 23266 (eval "$ac_compile") 2>conftest.er1
24137 ac_status=$? 23267 ac_status=$?
24138 grep -v '^ *+' conftest.er1 >conftest.err 23268 grep -v '^ *+' conftest.er1 >conftest.err
24139 rm -f conftest.er1 23269 rm -f conftest.er1
24140 cat conftest.err >&5 23270 cat conftest.err >&5
24141 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24142 (exit $ac_status); } && { 23272 (exit $ac_status); } && {
24143 test -z "$ac_c_werror_flag" || 23273 test -z "$ac_c_werror_flag" ||
24144 test ! -s conftest.err 23274 test ! -s conftest.err
24145 } && test -s conftest.$ac_objext; then 23275 } && test -s conftest.$ac_objext; then
24146 ac_cv_member_struct_sockaddr_in6_sin6_scope_id=yes 23276 ac_cv_member_struct_sockaddr_in6_sin6_scope_id=yes
24147else 23277else
24148 $as_echo "$as_me: failed program was:" >&5 23278 echo "$as_me: failed program was:" >&5
24149sed 's/^/| /' conftest.$ac_ext >&5 23279sed 's/^/| /' conftest.$ac_ext >&5
24150 23280
24151 cat >conftest.$ac_ext <<_ACEOF 23281 cat >conftest.$ac_ext <<_ACEOF
@@ -24177,21 +23307,20 @@ case "(($ac_try" in
24177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24178 *) ac_try_echo=$ac_try;; 23308 *) ac_try_echo=$ac_try;;
24179esac 23309esac
24180eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24181$as_echo "$ac_try_echo") >&5
24182 (eval "$ac_compile") 2>conftest.er1 23311 (eval "$ac_compile") 2>conftest.er1
24183 ac_status=$? 23312 ac_status=$?
24184 grep -v '^ *+' conftest.er1 >conftest.err 23313 grep -v '^ *+' conftest.er1 >conftest.err
24185 rm -f conftest.er1 23314 rm -f conftest.er1
24186 cat conftest.err >&5 23315 cat conftest.err >&5
24187 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24188 (exit $ac_status); } && { 23317 (exit $ac_status); } && {
24189 test -z "$ac_c_werror_flag" || 23318 test -z "$ac_c_werror_flag" ||
24190 test ! -s conftest.err 23319 test ! -s conftest.err
24191 } && test -s conftest.$ac_objext; then 23320 } && test -s conftest.$ac_objext; then
24192 ac_cv_member_struct_sockaddr_in6_sin6_scope_id=yes 23321 ac_cv_member_struct_sockaddr_in6_sin6_scope_id=yes
24193else 23322else
24194 $as_echo "$as_me: failed program was:" >&5 23323 echo "$as_me: failed program was:" >&5
24195sed 's/^/| /' conftest.$ac_ext >&5 23324sed 's/^/| /' conftest.$ac_ext >&5
24196 23325
24197 ac_cv_member_struct_sockaddr_in6_sin6_scope_id=no 23326 ac_cv_member_struct_sockaddr_in6_sin6_scope_id=no
@@ -24202,8 +23331,8 @@ fi
24202 23331
24203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 23332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24204fi 23333fi
24205{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_in6_sin6_scope_id" >&5 23334{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_in6_sin6_scope_id" >&5
24206$as_echo "$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" >&6; } 23335echo "${ECHO_T}$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" >&6; }
24207if test $ac_cv_member_struct_sockaddr_in6_sin6_scope_id = yes; then 23336if test $ac_cv_member_struct_sockaddr_in6_sin6_scope_id = yes; then
24208 23337
24209cat >>confdefs.h <<_ACEOF 23338cat >>confdefs.h <<_ACEOF
@@ -24215,10 +23344,10 @@ fi
24215 23344
24216fi 23345fi
24217 23346
24218{ $as_echo "$as_me:$LINENO: checking for struct addrinfo" >&5 23347{ echo "$as_me:$LINENO: checking for struct addrinfo" >&5
24219$as_echo_n "checking for struct addrinfo... " >&6; } 23348echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6; }
24220if test "${ac_cv_have_struct_addrinfo+set}" = set; then 23349if test "${ac_cv_have_struct_addrinfo+set}" = set; then
24221 $as_echo_n "(cached) " >&6 23350 echo $ECHO_N "(cached) $ECHO_C" >&6
24222else 23351else
24223 23352
24224 cat >conftest.$ac_ext <<_ACEOF 23353 cat >conftest.$ac_ext <<_ACEOF
@@ -24246,21 +23375,20 @@ case "(($ac_try" in
24246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24247 *) ac_try_echo=$ac_try;; 23376 *) ac_try_echo=$ac_try;;
24248esac 23377esac
24249eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24250$as_echo "$ac_try_echo") >&5
24251 (eval "$ac_compile") 2>conftest.er1 23379 (eval "$ac_compile") 2>conftest.er1
24252 ac_status=$? 23380 ac_status=$?
24253 grep -v '^ *+' conftest.er1 >conftest.err 23381 grep -v '^ *+' conftest.er1 >conftest.err
24254 rm -f conftest.er1 23382 rm -f conftest.er1
24255 cat conftest.err >&5 23383 cat conftest.err >&5
24256 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24257 (exit $ac_status); } && { 23385 (exit $ac_status); } && {
24258 test -z "$ac_c_werror_flag" || 23386 test -z "$ac_c_werror_flag" ||
24259 test ! -s conftest.err 23387 test ! -s conftest.err
24260 } && test -s conftest.$ac_objext; then 23388 } && test -s conftest.$ac_objext; then
24261 ac_cv_have_struct_addrinfo="yes" 23389 ac_cv_have_struct_addrinfo="yes"
24262else 23390else
24263 $as_echo "$as_me: failed program was:" >&5 23391 echo "$as_me: failed program was:" >&5
24264sed 's/^/| /' conftest.$ac_ext >&5 23392sed 's/^/| /' conftest.$ac_ext >&5
24265 23393
24266 ac_cv_have_struct_addrinfo="no" 23394 ac_cv_have_struct_addrinfo="no"
@@ -24270,8 +23398,8 @@ fi
24270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 23398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24271 23399
24272fi 23400fi
24273{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_struct_addrinfo" >&5 23401{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_addrinfo" >&5
24274$as_echo "$ac_cv_have_struct_addrinfo" >&6; } 23402echo "${ECHO_T}$ac_cv_have_struct_addrinfo" >&6; }
24275if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then 23403if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
24276 23404
24277cat >>confdefs.h <<\_ACEOF 23405cat >>confdefs.h <<\_ACEOF
@@ -24280,10 +23408,10 @@ _ACEOF
24280 23408
24281fi 23409fi
24282 23410
24283{ $as_echo "$as_me:$LINENO: checking for struct timeval" >&5 23411{ echo "$as_me:$LINENO: checking for struct timeval" >&5
24284$as_echo_n "checking for struct timeval... " >&6; } 23412echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
24285if test "${ac_cv_have_struct_timeval+set}" = set; then 23413if test "${ac_cv_have_struct_timeval+set}" = set; then
24286 $as_echo_n "(cached) " >&6 23414 echo $ECHO_N "(cached) $ECHO_C" >&6
24287else 23415else
24288 23416
24289 cat >conftest.$ac_ext <<_ACEOF 23417 cat >conftest.$ac_ext <<_ACEOF
@@ -24307,21 +23435,20 @@ case "(($ac_try" in
24307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24308 *) ac_try_echo=$ac_try;; 23436 *) ac_try_echo=$ac_try;;
24309esac 23437esac
24310eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24311$as_echo "$ac_try_echo") >&5
24312 (eval "$ac_compile") 2>conftest.er1 23439 (eval "$ac_compile") 2>conftest.er1
24313 ac_status=$? 23440 ac_status=$?
24314 grep -v '^ *+' conftest.er1 >conftest.err 23441 grep -v '^ *+' conftest.er1 >conftest.err
24315 rm -f conftest.er1 23442 rm -f conftest.er1
24316 cat conftest.err >&5 23443 cat conftest.err >&5
24317 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24318 (exit $ac_status); } && { 23445 (exit $ac_status); } && {
24319 test -z "$ac_c_werror_flag" || 23446 test -z "$ac_c_werror_flag" ||
24320 test ! -s conftest.err 23447 test ! -s conftest.err
24321 } && test -s conftest.$ac_objext; then 23448 } && test -s conftest.$ac_objext; then
24322 ac_cv_have_struct_timeval="yes" 23449 ac_cv_have_struct_timeval="yes"
24323else 23450else
24324 $as_echo "$as_me: failed program was:" >&5 23451 echo "$as_me: failed program was:" >&5
24325sed 's/^/| /' conftest.$ac_ext >&5 23452sed 's/^/| /' conftest.$ac_ext >&5
24326 23453
24327 ac_cv_have_struct_timeval="no" 23454 ac_cv_have_struct_timeval="no"
@@ -24331,8 +23458,8 @@ fi
24331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 23458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24332 23459
24333fi 23460fi
24334{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_struct_timeval" >&5 23461{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_timeval" >&5
24335$as_echo "$ac_cv_have_struct_timeval" >&6; } 23462echo "${ECHO_T}$ac_cv_have_struct_timeval" >&6; }
24336if test "x$ac_cv_have_struct_timeval" = "xyes" ; then 23463if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
24337 23464
24338cat >>confdefs.h <<\_ACEOF 23465cat >>confdefs.h <<\_ACEOF
@@ -24342,46 +23469,11 @@ _ACEOF
24342 have_struct_timeval=1 23469 have_struct_timeval=1
24343fi 23470fi
24344 23471
24345{ $as_echo "$as_me:$LINENO: checking for struct timespec" >&5 23472{ echo "$as_me:$LINENO: checking for struct timespec" >&5
24346$as_echo_n "checking for struct timespec... " >&6; } 23473echo $ECHO_N "checking for struct timespec... $ECHO_C" >&6; }
24347if test "${ac_cv_type_struct_timespec+set}" = set; then 23474if test "${ac_cv_type_struct_timespec+set}" = set; then
24348 $as_echo_n "(cached) " >&6 23475 echo $ECHO_N "(cached) $ECHO_C" >&6
24349else 23476else
24350 ac_cv_type_struct_timespec=no
24351cat >conftest.$ac_ext <<_ACEOF
24352/* confdefs.h. */
24353_ACEOF
24354cat confdefs.h >>conftest.$ac_ext
24355cat >>conftest.$ac_ext <<_ACEOF
24356/* end confdefs.h. */
24357$ac_includes_default
24358int
24359main ()
24360{
24361if (sizeof (struct timespec))
24362 return 0;
24363 ;
24364 return 0;
24365}
24366_ACEOF
24367rm -f conftest.$ac_objext
24368if { (ac_try="$ac_compile"
24369case "(($ac_try" in
24370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24371 *) ac_try_echo=$ac_try;;
24372esac
24373eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24374$as_echo "$ac_try_echo") >&5
24375 (eval "$ac_compile") 2>conftest.er1
24376 ac_status=$?
24377 grep -v '^ *+' conftest.er1 >conftest.err
24378 rm -f conftest.er1
24379 cat conftest.err >&5
24380 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24381 (exit $ac_status); } && {
24382 test -z "$ac_c_werror_flag" ||
24383 test ! -s conftest.err
24384 } && test -s conftest.$ac_objext; then
24385 cat >conftest.$ac_ext <<_ACEOF 23477 cat >conftest.$ac_ext <<_ACEOF
24386/* confdefs.h. */ 23478/* confdefs.h. */
24387_ACEOF 23479_ACEOF
@@ -24389,11 +23481,14 @@ cat confdefs.h >>conftest.$ac_ext
24389cat >>conftest.$ac_ext <<_ACEOF 23481cat >>conftest.$ac_ext <<_ACEOF
24390/* end confdefs.h. */ 23482/* end confdefs.h. */
24391$ac_includes_default 23483$ac_includes_default
23484typedef struct timespec ac__type_new_;
24392int 23485int
24393main () 23486main ()
24394{ 23487{
24395if (sizeof ((struct timespec))) 23488if ((ac__type_new_ *) 0)
24396 return 0; 23489 return 0;
23490if (sizeof (ac__type_new_))
23491 return 0;
24397 ; 23492 ;
24398 return 0; 23493 return 0;
24399} 23494}
@@ -24404,38 +23499,29 @@ case "(($ac_try" in
24404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24405 *) ac_try_echo=$ac_try;; 23500 *) ac_try_echo=$ac_try;;
24406esac 23501esac
24407eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24408$as_echo "$ac_try_echo") >&5
24409 (eval "$ac_compile") 2>conftest.er1 23503 (eval "$ac_compile") 2>conftest.er1
24410 ac_status=$? 23504 ac_status=$?
24411 grep -v '^ *+' conftest.er1 >conftest.err 23505 grep -v '^ *+' conftest.er1 >conftest.err
24412 rm -f conftest.er1 23506 rm -f conftest.er1
24413 cat conftest.err >&5 23507 cat conftest.err >&5
24414 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24415 (exit $ac_status); } && { 23509 (exit $ac_status); } && {
24416 test -z "$ac_c_werror_flag" || 23510 test -z "$ac_c_werror_flag" ||
24417 test ! -s conftest.err 23511 test ! -s conftest.err
24418 } && test -s conftest.$ac_objext; then 23512 } && test -s conftest.$ac_objext; then
24419 : 23513 ac_cv_type_struct_timespec=yes
24420else 23514else
24421 $as_echo "$as_me: failed program was:" >&5 23515 echo "$as_me: failed program was:" >&5
24422sed 's/^/| /' conftest.$ac_ext >&5 23516sed 's/^/| /' conftest.$ac_ext >&5
24423 23517
24424 ac_cv_type_struct_timespec=yes 23518 ac_cv_type_struct_timespec=no
24425fi
24426
24427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24428else
24429 $as_echo "$as_me: failed program was:" >&5
24430sed 's/^/| /' conftest.$ac_ext >&5
24431
24432
24433fi 23519fi
24434 23520
24435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 23521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24436fi 23522fi
24437{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_timespec" >&5 23523{ echo "$as_me:$LINENO: result: $ac_cv_type_struct_timespec" >&5
24438$as_echo "$ac_cv_type_struct_timespec" >&6; } 23524echo "${ECHO_T}$ac_cv_type_struct_timespec" >&6; }
24439if test $ac_cv_type_struct_timespec = yes; then 23525if test $ac_cv_type_struct_timespec = yes; then
24440 23526
24441cat >>confdefs.h <<_ACEOF 23527cat >>confdefs.h <<_ACEOF
@@ -24456,8 +23542,8 @@ if test "x$ac_cv_have_int64_t" = "xno" && \
24456 exit 1; 23542 exit 1;
24457else 23543else
24458 if test "$cross_compiling" = yes; then 23544 if test "$cross_compiling" = yes; then
24459 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working snprintf()" >&5 23545 { echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working snprintf()" >&5
24460$as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;} 23546echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
24461 23547
24462else 23548else
24463 cat >conftest.$ac_ext <<_ACEOF 23549 cat >conftest.$ac_ext <<_ACEOF
@@ -24497,26 +23583,24 @@ case "(($ac_try" in
24497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24498 *) ac_try_echo=$ac_try;; 23584 *) ac_try_echo=$ac_try;;
24499esac 23585esac
24500eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24501$as_echo "$ac_try_echo") >&5
24502 (eval "$ac_link") 2>&5 23587 (eval "$ac_link") 2>&5
24503 ac_status=$? 23588 ac_status=$?
24504 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24505 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 23590 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24506 { (case "(($ac_try" in 23591 { (case "(($ac_try" in
24507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24508 *) ac_try_echo=$ac_try;; 23593 *) ac_try_echo=$ac_try;;
24509esac 23594esac
24510eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24511$as_echo "$ac_try_echo") >&5
24512 (eval "$ac_try") 2>&5 23596 (eval "$ac_try") 2>&5
24513 ac_status=$? 23597 ac_status=$?
24514 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24515 (exit $ac_status); }; }; then 23599 (exit $ac_status); }; }; then
24516 true 23600 true
24517else 23601else
24518 $as_echo "$as_me: program exited with status $ac_status" >&5 23602 echo "$as_me: program exited with status $ac_status" >&5
24519$as_echo "$as_me: failed program was:" >&5 23603echo "$as_me: failed program was:" >&5
24520sed 's/^/| /' conftest.$ac_ext >&5 23604sed 's/^/| /' conftest.$ac_ext >&5
24521 23605
24522( exit $ac_status ) 23606( exit $ac_status )
@@ -24525,7 +23609,6 @@ sed 's/^/| /' conftest.$ac_ext >&5
24525_ACEOF 23609_ACEOF
24526 23610
24527fi 23611fi
24528rm -rf conftest.dSYM
24529rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 23612rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24530fi 23613fi
24531 23614
@@ -24536,10 +23619,10 @@ fi
24536# look for field 'ut_host' in header 'utmp.h' 23619# look for field 'ut_host' in header 'utmp.h'
24537 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 23620 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
24538 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host 23621 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
24539 { $as_echo "$as_me:$LINENO: checking for ut_host field in utmp.h" >&5 23622 { echo "$as_me:$LINENO: checking for ut_host field in utmp.h" >&5
24540$as_echo_n "checking for ut_host field in utmp.h... " >&6; } 23623echo $ECHO_N "checking for ut_host field in utmp.h... $ECHO_C" >&6; }
24541 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 23624 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
24542 $as_echo_n "(cached) " >&6 23625 echo $ECHO_N "(cached) $ECHO_C" >&6
24543else 23626else
24544 23627
24545 cat >conftest.$ac_ext <<_ACEOF 23628 cat >conftest.$ac_ext <<_ACEOF
@@ -24563,8 +23646,8 @@ fi
24563 23646
24564 ossh_result=`eval 'echo $'"$ossh_varname"` 23647 ossh_result=`eval 'echo $'"$ossh_varname"`
24565 if test -n "`echo $ossh_varname`"; then 23648 if test -n "`echo $ossh_varname`"; then
24566 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 23649 { echo "$as_me:$LINENO: result: $ossh_result" >&5
24567$as_echo "$ossh_result" >&6; } 23650echo "${ECHO_T}$ossh_result" >&6; }
24568 if test "x$ossh_result" = "xyes"; then 23651 if test "x$ossh_result" = "xyes"; then
24569 23652
24570cat >>confdefs.h <<\_ACEOF 23653cat >>confdefs.h <<\_ACEOF
@@ -24573,18 +23656,18 @@ _ACEOF
24573 23656
24574 fi 23657 fi
24575 else 23658 else
24576 { $as_echo "$as_me:$LINENO: result: no" >&5 23659 { echo "$as_me:$LINENO: result: no" >&5
24577$as_echo "no" >&6; } 23660echo "${ECHO_T}no" >&6; }
24578 fi 23661 fi
24579 23662
24580 23663
24581# look for field 'ut_host' in header 'utmpx.h' 23664# look for field 'ut_host' in header 'utmpx.h'
24582 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 23665 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
24583 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host 23666 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
24584 { $as_echo "$as_me:$LINENO: checking for ut_host field in utmpx.h" >&5 23667 { echo "$as_me:$LINENO: checking for ut_host field in utmpx.h" >&5
24585$as_echo_n "checking for ut_host field in utmpx.h... " >&6; } 23668echo $ECHO_N "checking for ut_host field in utmpx.h... $ECHO_C" >&6; }
24586 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 23669 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
24587 $as_echo_n "(cached) " >&6 23670 echo $ECHO_N "(cached) $ECHO_C" >&6
24588else 23671else
24589 23672
24590 cat >conftest.$ac_ext <<_ACEOF 23673 cat >conftest.$ac_ext <<_ACEOF
@@ -24608,8 +23691,8 @@ fi
24608 23691
24609 ossh_result=`eval 'echo $'"$ossh_varname"` 23692 ossh_result=`eval 'echo $'"$ossh_varname"`
24610 if test -n "`echo $ossh_varname`"; then 23693 if test -n "`echo $ossh_varname`"; then
24611 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 23694 { echo "$as_me:$LINENO: result: $ossh_result" >&5
24612$as_echo "$ossh_result" >&6; } 23695echo "${ECHO_T}$ossh_result" >&6; }
24613 if test "x$ossh_result" = "xyes"; then 23696 if test "x$ossh_result" = "xyes"; then
24614 23697
24615cat >>confdefs.h <<\_ACEOF 23698cat >>confdefs.h <<\_ACEOF
@@ -24618,18 +23701,18 @@ _ACEOF
24618 23701
24619 fi 23702 fi
24620 else 23703 else
24621 { $as_echo "$as_me:$LINENO: result: no" >&5 23704 { echo "$as_me:$LINENO: result: no" >&5
24622$as_echo "no" >&6; } 23705echo "${ECHO_T}no" >&6; }
24623 fi 23706 fi
24624 23707
24625 23708
24626# look for field 'syslen' in header 'utmpx.h' 23709# look for field 'syslen' in header 'utmpx.h'
24627 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 23710 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
24628 ossh_varname="ossh_cv_$ossh_safe""_has_"syslen 23711 ossh_varname="ossh_cv_$ossh_safe""_has_"syslen
24629 { $as_echo "$as_me:$LINENO: checking for syslen field in utmpx.h" >&5 23712 { echo "$as_me:$LINENO: checking for syslen field in utmpx.h" >&5
24630$as_echo_n "checking for syslen field in utmpx.h... " >&6; } 23713echo $ECHO_N "checking for syslen field in utmpx.h... $ECHO_C" >&6; }
24631 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 23714 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
24632 $as_echo_n "(cached) " >&6 23715 echo $ECHO_N "(cached) $ECHO_C" >&6
24633else 23716else
24634 23717
24635 cat >conftest.$ac_ext <<_ACEOF 23718 cat >conftest.$ac_ext <<_ACEOF
@@ -24653,8 +23736,8 @@ fi
24653 23736
24654 ossh_result=`eval 'echo $'"$ossh_varname"` 23737 ossh_result=`eval 'echo $'"$ossh_varname"`
24655 if test -n "`echo $ossh_varname`"; then 23738 if test -n "`echo $ossh_varname`"; then
24656 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 23739 { echo "$as_me:$LINENO: result: $ossh_result" >&5
24657$as_echo "$ossh_result" >&6; } 23740echo "${ECHO_T}$ossh_result" >&6; }
24658 if test "x$ossh_result" = "xyes"; then 23741 if test "x$ossh_result" = "xyes"; then
24659 23742
24660cat >>confdefs.h <<\_ACEOF 23743cat >>confdefs.h <<\_ACEOF
@@ -24663,18 +23746,18 @@ _ACEOF
24663 23746
24664 fi 23747 fi
24665 else 23748 else
24666 { $as_echo "$as_me:$LINENO: result: no" >&5 23749 { echo "$as_me:$LINENO: result: no" >&5
24667$as_echo "no" >&6; } 23750echo "${ECHO_T}no" >&6; }
24668 fi 23751 fi
24669 23752
24670 23753
24671# look for field 'ut_pid' in header 'utmp.h' 23754# look for field 'ut_pid' in header 'utmp.h'
24672 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 23755 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
24673 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid 23756 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid
24674 { $as_echo "$as_me:$LINENO: checking for ut_pid field in utmp.h" >&5 23757 { echo "$as_me:$LINENO: checking for ut_pid field in utmp.h" >&5
24675$as_echo_n "checking for ut_pid field in utmp.h... " >&6; } 23758echo $ECHO_N "checking for ut_pid field in utmp.h... $ECHO_C" >&6; }
24676 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 23759 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
24677 $as_echo_n "(cached) " >&6 23760 echo $ECHO_N "(cached) $ECHO_C" >&6
24678else 23761else
24679 23762
24680 cat >conftest.$ac_ext <<_ACEOF 23763 cat >conftest.$ac_ext <<_ACEOF
@@ -24698,8 +23781,8 @@ fi
24698 23781
24699 ossh_result=`eval 'echo $'"$ossh_varname"` 23782 ossh_result=`eval 'echo $'"$ossh_varname"`
24700 if test -n "`echo $ossh_varname`"; then 23783 if test -n "`echo $ossh_varname`"; then
24701 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 23784 { echo "$as_me:$LINENO: result: $ossh_result" >&5
24702$as_echo "$ossh_result" >&6; } 23785echo "${ECHO_T}$ossh_result" >&6; }
24703 if test "x$ossh_result" = "xyes"; then 23786 if test "x$ossh_result" = "xyes"; then
24704 23787
24705cat >>confdefs.h <<\_ACEOF 23788cat >>confdefs.h <<\_ACEOF
@@ -24708,18 +23791,18 @@ _ACEOF
24708 23791
24709 fi 23792 fi
24710 else 23793 else
24711 { $as_echo "$as_me:$LINENO: result: no" >&5 23794 { echo "$as_me:$LINENO: result: no" >&5
24712$as_echo "no" >&6; } 23795echo "${ECHO_T}no" >&6; }
24713 fi 23796 fi
24714 23797
24715 23798
24716# look for field 'ut_type' in header 'utmp.h' 23799# look for field 'ut_type' in header 'utmp.h'
24717 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 23800 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
24718 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type 23801 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
24719 { $as_echo "$as_me:$LINENO: checking for ut_type field in utmp.h" >&5 23802 { echo "$as_me:$LINENO: checking for ut_type field in utmp.h" >&5
24720$as_echo_n "checking for ut_type field in utmp.h... " >&6; } 23803echo $ECHO_N "checking for ut_type field in utmp.h... $ECHO_C" >&6; }
24721 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 23804 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
24722 $as_echo_n "(cached) " >&6 23805 echo $ECHO_N "(cached) $ECHO_C" >&6
24723else 23806else
24724 23807
24725 cat >conftest.$ac_ext <<_ACEOF 23808 cat >conftest.$ac_ext <<_ACEOF
@@ -24743,8 +23826,8 @@ fi
24743 23826
24744 ossh_result=`eval 'echo $'"$ossh_varname"` 23827 ossh_result=`eval 'echo $'"$ossh_varname"`
24745 if test -n "`echo $ossh_varname`"; then 23828 if test -n "`echo $ossh_varname`"; then
24746 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 23829 { echo "$as_me:$LINENO: result: $ossh_result" >&5
24747$as_echo "$ossh_result" >&6; } 23830echo "${ECHO_T}$ossh_result" >&6; }
24748 if test "x$ossh_result" = "xyes"; then 23831 if test "x$ossh_result" = "xyes"; then
24749 23832
24750cat >>confdefs.h <<\_ACEOF 23833cat >>confdefs.h <<\_ACEOF
@@ -24753,18 +23836,18 @@ _ACEOF
24753 23836
24754 fi 23837 fi
24755 else 23838 else
24756 { $as_echo "$as_me:$LINENO: result: no" >&5 23839 { echo "$as_me:$LINENO: result: no" >&5
24757$as_echo "no" >&6; } 23840echo "${ECHO_T}no" >&6; }
24758 fi 23841 fi
24759 23842
24760 23843
24761# look for field 'ut_type' in header 'utmpx.h' 23844# look for field 'ut_type' in header 'utmpx.h'
24762 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 23845 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
24763 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type 23846 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
24764 { $as_echo "$as_me:$LINENO: checking for ut_type field in utmpx.h" >&5 23847 { echo "$as_me:$LINENO: checking for ut_type field in utmpx.h" >&5
24765$as_echo_n "checking for ut_type field in utmpx.h... " >&6; } 23848echo $ECHO_N "checking for ut_type field in utmpx.h... $ECHO_C" >&6; }
24766 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 23849 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
24767 $as_echo_n "(cached) " >&6 23850 echo $ECHO_N "(cached) $ECHO_C" >&6
24768else 23851else
24769 23852
24770 cat >conftest.$ac_ext <<_ACEOF 23853 cat >conftest.$ac_ext <<_ACEOF
@@ -24788,8 +23871,8 @@ fi
24788 23871
24789 ossh_result=`eval 'echo $'"$ossh_varname"` 23872 ossh_result=`eval 'echo $'"$ossh_varname"`
24790 if test -n "`echo $ossh_varname`"; then 23873 if test -n "`echo $ossh_varname`"; then
24791 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 23874 { echo "$as_me:$LINENO: result: $ossh_result" >&5
24792$as_echo "$ossh_result" >&6; } 23875echo "${ECHO_T}$ossh_result" >&6; }
24793 if test "x$ossh_result" = "xyes"; then 23876 if test "x$ossh_result" = "xyes"; then
24794 23877
24795cat >>confdefs.h <<\_ACEOF 23878cat >>confdefs.h <<\_ACEOF
@@ -24798,18 +23881,18 @@ _ACEOF
24798 23881
24799 fi 23882 fi
24800 else 23883 else
24801 { $as_echo "$as_me:$LINENO: result: no" >&5 23884 { echo "$as_me:$LINENO: result: no" >&5
24802$as_echo "no" >&6; } 23885echo "${ECHO_T}no" >&6; }
24803 fi 23886 fi
24804 23887
24805 23888
24806# look for field 'ut_tv' in header 'utmp.h' 23889# look for field 'ut_tv' in header 'utmp.h'
24807 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 23890 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
24808 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv 23891 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
24809 { $as_echo "$as_me:$LINENO: checking for ut_tv field in utmp.h" >&5 23892 { echo "$as_me:$LINENO: checking for ut_tv field in utmp.h" >&5
24810$as_echo_n "checking for ut_tv field in utmp.h... " >&6; } 23893echo $ECHO_N "checking for ut_tv field in utmp.h... $ECHO_C" >&6; }
24811 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 23894 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
24812 $as_echo_n "(cached) " >&6 23895 echo $ECHO_N "(cached) $ECHO_C" >&6
24813else 23896else
24814 23897
24815 cat >conftest.$ac_ext <<_ACEOF 23898 cat >conftest.$ac_ext <<_ACEOF
@@ -24833,8 +23916,8 @@ fi
24833 23916
24834 ossh_result=`eval 'echo $'"$ossh_varname"` 23917 ossh_result=`eval 'echo $'"$ossh_varname"`
24835 if test -n "`echo $ossh_varname`"; then 23918 if test -n "`echo $ossh_varname`"; then
24836 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 23919 { echo "$as_me:$LINENO: result: $ossh_result" >&5
24837$as_echo "$ossh_result" >&6; } 23920echo "${ECHO_T}$ossh_result" >&6; }
24838 if test "x$ossh_result" = "xyes"; then 23921 if test "x$ossh_result" = "xyes"; then
24839 23922
24840cat >>confdefs.h <<\_ACEOF 23923cat >>confdefs.h <<\_ACEOF
@@ -24843,18 +23926,18 @@ _ACEOF
24843 23926
24844 fi 23927 fi
24845 else 23928 else
24846 { $as_echo "$as_me:$LINENO: result: no" >&5 23929 { echo "$as_me:$LINENO: result: no" >&5
24847$as_echo "no" >&6; } 23930echo "${ECHO_T}no" >&6; }
24848 fi 23931 fi
24849 23932
24850 23933
24851# look for field 'ut_id' in header 'utmp.h' 23934# look for field 'ut_id' in header 'utmp.h'
24852 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 23935 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
24853 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id 23936 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
24854 { $as_echo "$as_me:$LINENO: checking for ut_id field in utmp.h" >&5 23937 { echo "$as_me:$LINENO: checking for ut_id field in utmp.h" >&5
24855$as_echo_n "checking for ut_id field in utmp.h... " >&6; } 23938echo $ECHO_N "checking for ut_id field in utmp.h... $ECHO_C" >&6; }
24856 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 23939 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
24857 $as_echo_n "(cached) " >&6 23940 echo $ECHO_N "(cached) $ECHO_C" >&6
24858else 23941else
24859 23942
24860 cat >conftest.$ac_ext <<_ACEOF 23943 cat >conftest.$ac_ext <<_ACEOF
@@ -24878,8 +23961,8 @@ fi
24878 23961
24879 ossh_result=`eval 'echo $'"$ossh_varname"` 23962 ossh_result=`eval 'echo $'"$ossh_varname"`
24880 if test -n "`echo $ossh_varname`"; then 23963 if test -n "`echo $ossh_varname`"; then
24881 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 23964 { echo "$as_me:$LINENO: result: $ossh_result" >&5
24882$as_echo "$ossh_result" >&6; } 23965echo "${ECHO_T}$ossh_result" >&6; }
24883 if test "x$ossh_result" = "xyes"; then 23966 if test "x$ossh_result" = "xyes"; then
24884 23967
24885cat >>confdefs.h <<\_ACEOF 23968cat >>confdefs.h <<\_ACEOF
@@ -24888,18 +23971,18 @@ _ACEOF
24888 23971
24889 fi 23972 fi
24890 else 23973 else
24891 { $as_echo "$as_me:$LINENO: result: no" >&5 23974 { echo "$as_me:$LINENO: result: no" >&5
24892$as_echo "no" >&6; } 23975echo "${ECHO_T}no" >&6; }
24893 fi 23976 fi
24894 23977
24895 23978
24896# look for field 'ut_id' in header 'utmpx.h' 23979# look for field 'ut_id' in header 'utmpx.h'
24897 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 23980 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
24898 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id 23981 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
24899 { $as_echo "$as_me:$LINENO: checking for ut_id field in utmpx.h" >&5 23982 { echo "$as_me:$LINENO: checking for ut_id field in utmpx.h" >&5
24900$as_echo_n "checking for ut_id field in utmpx.h... " >&6; } 23983echo $ECHO_N "checking for ut_id field in utmpx.h... $ECHO_C" >&6; }
24901 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 23984 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
24902 $as_echo_n "(cached) " >&6 23985 echo $ECHO_N "(cached) $ECHO_C" >&6
24903else 23986else
24904 23987
24905 cat >conftest.$ac_ext <<_ACEOF 23988 cat >conftest.$ac_ext <<_ACEOF
@@ -24923,8 +24006,8 @@ fi
24923 24006
24924 ossh_result=`eval 'echo $'"$ossh_varname"` 24007 ossh_result=`eval 'echo $'"$ossh_varname"`
24925 if test -n "`echo $ossh_varname`"; then 24008 if test -n "`echo $ossh_varname`"; then
24926 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 24009 { echo "$as_me:$LINENO: result: $ossh_result" >&5
24927$as_echo "$ossh_result" >&6; } 24010echo "${ECHO_T}$ossh_result" >&6; }
24928 if test "x$ossh_result" = "xyes"; then 24011 if test "x$ossh_result" = "xyes"; then
24929 24012
24930cat >>confdefs.h <<\_ACEOF 24013cat >>confdefs.h <<\_ACEOF
@@ -24933,18 +24016,18 @@ _ACEOF
24933 24016
24934 fi 24017 fi
24935 else 24018 else
24936 { $as_echo "$as_me:$LINENO: result: no" >&5 24019 { echo "$as_me:$LINENO: result: no" >&5
24937$as_echo "no" >&6; } 24020echo "${ECHO_T}no" >&6; }
24938 fi 24021 fi
24939 24022
24940 24023
24941# look for field 'ut_addr' in header 'utmp.h' 24024# look for field 'ut_addr' in header 'utmp.h'
24942 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 24025 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
24943 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr 24026 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
24944 { $as_echo "$as_me:$LINENO: checking for ut_addr field in utmp.h" >&5 24027 { echo "$as_me:$LINENO: checking for ut_addr field in utmp.h" >&5
24945$as_echo_n "checking for ut_addr field in utmp.h... " >&6; } 24028echo $ECHO_N "checking for ut_addr field in utmp.h... $ECHO_C" >&6; }
24946 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 24029 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
24947 $as_echo_n "(cached) " >&6 24030 echo $ECHO_N "(cached) $ECHO_C" >&6
24948else 24031else
24949 24032
24950 cat >conftest.$ac_ext <<_ACEOF 24033 cat >conftest.$ac_ext <<_ACEOF
@@ -24968,8 +24051,8 @@ fi
24968 24051
24969 ossh_result=`eval 'echo $'"$ossh_varname"` 24052 ossh_result=`eval 'echo $'"$ossh_varname"`
24970 if test -n "`echo $ossh_varname`"; then 24053 if test -n "`echo $ossh_varname`"; then
24971 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 24054 { echo "$as_me:$LINENO: result: $ossh_result" >&5
24972$as_echo "$ossh_result" >&6; } 24055echo "${ECHO_T}$ossh_result" >&6; }
24973 if test "x$ossh_result" = "xyes"; then 24056 if test "x$ossh_result" = "xyes"; then
24974 24057
24975cat >>confdefs.h <<\_ACEOF 24058cat >>confdefs.h <<\_ACEOF
@@ -24978,18 +24061,18 @@ _ACEOF
24978 24061
24979 fi 24062 fi
24980 else 24063 else
24981 { $as_echo "$as_me:$LINENO: result: no" >&5 24064 { echo "$as_me:$LINENO: result: no" >&5
24982$as_echo "no" >&6; } 24065echo "${ECHO_T}no" >&6; }
24983 fi 24066 fi
24984 24067
24985 24068
24986# look for field 'ut_addr' in header 'utmpx.h' 24069# look for field 'ut_addr' in header 'utmpx.h'
24987 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 24070 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
24988 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr 24071 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
24989 { $as_echo "$as_me:$LINENO: checking for ut_addr field in utmpx.h" >&5 24072 { echo "$as_me:$LINENO: checking for ut_addr field in utmpx.h" >&5
24990$as_echo_n "checking for ut_addr field in utmpx.h... " >&6; } 24073echo $ECHO_N "checking for ut_addr field in utmpx.h... $ECHO_C" >&6; }
24991 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 24074 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
24992 $as_echo_n "(cached) " >&6 24075 echo $ECHO_N "(cached) $ECHO_C" >&6
24993else 24076else
24994 24077
24995 cat >conftest.$ac_ext <<_ACEOF 24078 cat >conftest.$ac_ext <<_ACEOF
@@ -25013,8 +24096,8 @@ fi
25013 24096
25014 ossh_result=`eval 'echo $'"$ossh_varname"` 24097 ossh_result=`eval 'echo $'"$ossh_varname"`
25015 if test -n "`echo $ossh_varname`"; then 24098 if test -n "`echo $ossh_varname`"; then
25016 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 24099 { echo "$as_me:$LINENO: result: $ossh_result" >&5
25017$as_echo "$ossh_result" >&6; } 24100echo "${ECHO_T}$ossh_result" >&6; }
25018 if test "x$ossh_result" = "xyes"; then 24101 if test "x$ossh_result" = "xyes"; then
25019 24102
25020cat >>confdefs.h <<\_ACEOF 24103cat >>confdefs.h <<\_ACEOF
@@ -25023,18 +24106,18 @@ _ACEOF
25023 24106
25024 fi 24107 fi
25025 else 24108 else
25026 { $as_echo "$as_me:$LINENO: result: no" >&5 24109 { echo "$as_me:$LINENO: result: no" >&5
25027$as_echo "no" >&6; } 24110echo "${ECHO_T}no" >&6; }
25028 fi 24111 fi
25029 24112
25030 24113
25031# look for field 'ut_addr_v6' in header 'utmp.h' 24114# look for field 'ut_addr_v6' in header 'utmp.h'
25032 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 24115 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
25033 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6 24116 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
25034 { $as_echo "$as_me:$LINENO: checking for ut_addr_v6 field in utmp.h" >&5 24117 { echo "$as_me:$LINENO: checking for ut_addr_v6 field in utmp.h" >&5
25035$as_echo_n "checking for ut_addr_v6 field in utmp.h... " >&6; } 24118echo $ECHO_N "checking for ut_addr_v6 field in utmp.h... $ECHO_C" >&6; }
25036 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 24119 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
25037 $as_echo_n "(cached) " >&6 24120 echo $ECHO_N "(cached) $ECHO_C" >&6
25038else 24121else
25039 24122
25040 cat >conftest.$ac_ext <<_ACEOF 24123 cat >conftest.$ac_ext <<_ACEOF
@@ -25058,8 +24141,8 @@ fi
25058 24141
25059 ossh_result=`eval 'echo $'"$ossh_varname"` 24142 ossh_result=`eval 'echo $'"$ossh_varname"`
25060 if test -n "`echo $ossh_varname`"; then 24143 if test -n "`echo $ossh_varname`"; then
25061 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 24144 { echo "$as_me:$LINENO: result: $ossh_result" >&5
25062$as_echo "$ossh_result" >&6; } 24145echo "${ECHO_T}$ossh_result" >&6; }
25063 if test "x$ossh_result" = "xyes"; then 24146 if test "x$ossh_result" = "xyes"; then
25064 24147
25065cat >>confdefs.h <<\_ACEOF 24148cat >>confdefs.h <<\_ACEOF
@@ -25068,18 +24151,18 @@ _ACEOF
25068 24151
25069 fi 24152 fi
25070 else 24153 else
25071 { $as_echo "$as_me:$LINENO: result: no" >&5 24154 { echo "$as_me:$LINENO: result: no" >&5
25072$as_echo "no" >&6; } 24155echo "${ECHO_T}no" >&6; }
25073 fi 24156 fi
25074 24157
25075 24158
25076# look for field 'ut_addr_v6' in header 'utmpx.h' 24159# look for field 'ut_addr_v6' in header 'utmpx.h'
25077 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 24160 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
25078 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6 24161 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
25079 { $as_echo "$as_me:$LINENO: checking for ut_addr_v6 field in utmpx.h" >&5 24162 { echo "$as_me:$LINENO: checking for ut_addr_v6 field in utmpx.h" >&5
25080$as_echo_n "checking for ut_addr_v6 field in utmpx.h... " >&6; } 24163echo $ECHO_N "checking for ut_addr_v6 field in utmpx.h... $ECHO_C" >&6; }
25081 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 24164 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
25082 $as_echo_n "(cached) " >&6 24165 echo $ECHO_N "(cached) $ECHO_C" >&6
25083else 24166else
25084 24167
25085 cat >conftest.$ac_ext <<_ACEOF 24168 cat >conftest.$ac_ext <<_ACEOF
@@ -25103,8 +24186,8 @@ fi
25103 24186
25104 ossh_result=`eval 'echo $'"$ossh_varname"` 24187 ossh_result=`eval 'echo $'"$ossh_varname"`
25105 if test -n "`echo $ossh_varname`"; then 24188 if test -n "`echo $ossh_varname`"; then
25106 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 24189 { echo "$as_me:$LINENO: result: $ossh_result" >&5
25107$as_echo "$ossh_result" >&6; } 24190echo "${ECHO_T}$ossh_result" >&6; }
25108 if test "x$ossh_result" = "xyes"; then 24191 if test "x$ossh_result" = "xyes"; then
25109 24192
25110cat >>confdefs.h <<\_ACEOF 24193cat >>confdefs.h <<\_ACEOF
@@ -25113,18 +24196,18 @@ _ACEOF
25113 24196
25114 fi 24197 fi
25115 else 24198 else
25116 { $as_echo "$as_me:$LINENO: result: no" >&5 24199 { echo "$as_me:$LINENO: result: no" >&5
25117$as_echo "no" >&6; } 24200echo "${ECHO_T}no" >&6; }
25118 fi 24201 fi
25119 24202
25120 24203
25121# look for field 'ut_exit' in header 'utmp.h' 24204# look for field 'ut_exit' in header 'utmp.h'
25122 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 24205 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
25123 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit 24206 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit
25124 { $as_echo "$as_me:$LINENO: checking for ut_exit field in utmp.h" >&5 24207 { echo "$as_me:$LINENO: checking for ut_exit field in utmp.h" >&5
25125$as_echo_n "checking for ut_exit field in utmp.h... " >&6; } 24208echo $ECHO_N "checking for ut_exit field in utmp.h... $ECHO_C" >&6; }
25126 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 24209 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
25127 $as_echo_n "(cached) " >&6 24210 echo $ECHO_N "(cached) $ECHO_C" >&6
25128else 24211else
25129 24212
25130 cat >conftest.$ac_ext <<_ACEOF 24213 cat >conftest.$ac_ext <<_ACEOF
@@ -25148,8 +24231,8 @@ fi
25148 24231
25149 ossh_result=`eval 'echo $'"$ossh_varname"` 24232 ossh_result=`eval 'echo $'"$ossh_varname"`
25150 if test -n "`echo $ossh_varname`"; then 24233 if test -n "`echo $ossh_varname`"; then
25151 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 24234 { echo "$as_me:$LINENO: result: $ossh_result" >&5
25152$as_echo "$ossh_result" >&6; } 24235echo "${ECHO_T}$ossh_result" >&6; }
25153 if test "x$ossh_result" = "xyes"; then 24236 if test "x$ossh_result" = "xyes"; then
25154 24237
25155cat >>confdefs.h <<\_ACEOF 24238cat >>confdefs.h <<\_ACEOF
@@ -25158,18 +24241,18 @@ _ACEOF
25158 24241
25159 fi 24242 fi
25160 else 24243 else
25161 { $as_echo "$as_me:$LINENO: result: no" >&5 24244 { echo "$as_me:$LINENO: result: no" >&5
25162$as_echo "no" >&6; } 24245echo "${ECHO_T}no" >&6; }
25163 fi 24246 fi
25164 24247
25165 24248
25166# look for field 'ut_time' in header 'utmp.h' 24249# look for field 'ut_time' in header 'utmp.h'
25167 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 24250 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
25168 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time 24251 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
25169 { $as_echo "$as_me:$LINENO: checking for ut_time field in utmp.h" >&5 24252 { echo "$as_me:$LINENO: checking for ut_time field in utmp.h" >&5
25170$as_echo_n "checking for ut_time field in utmp.h... " >&6; } 24253echo $ECHO_N "checking for ut_time field in utmp.h... $ECHO_C" >&6; }
25171 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 24254 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
25172 $as_echo_n "(cached) " >&6 24255 echo $ECHO_N "(cached) $ECHO_C" >&6
25173else 24256else
25174 24257
25175 cat >conftest.$ac_ext <<_ACEOF 24258 cat >conftest.$ac_ext <<_ACEOF
@@ -25193,8 +24276,8 @@ fi
25193 24276
25194 ossh_result=`eval 'echo $'"$ossh_varname"` 24277 ossh_result=`eval 'echo $'"$ossh_varname"`
25195 if test -n "`echo $ossh_varname`"; then 24278 if test -n "`echo $ossh_varname`"; then
25196 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 24279 { echo "$as_me:$LINENO: result: $ossh_result" >&5
25197$as_echo "$ossh_result" >&6; } 24280echo "${ECHO_T}$ossh_result" >&6; }
25198 if test "x$ossh_result" = "xyes"; then 24281 if test "x$ossh_result" = "xyes"; then
25199 24282
25200cat >>confdefs.h <<\_ACEOF 24283cat >>confdefs.h <<\_ACEOF
@@ -25203,18 +24286,18 @@ _ACEOF
25203 24286
25204 fi 24287 fi
25205 else 24288 else
25206 { $as_echo "$as_me:$LINENO: result: no" >&5 24289 { echo "$as_me:$LINENO: result: no" >&5
25207$as_echo "no" >&6; } 24290echo "${ECHO_T}no" >&6; }
25208 fi 24291 fi
25209 24292
25210 24293
25211# look for field 'ut_time' in header 'utmpx.h' 24294# look for field 'ut_time' in header 'utmpx.h'
25212 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 24295 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
25213 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time 24296 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
25214 { $as_echo "$as_me:$LINENO: checking for ut_time field in utmpx.h" >&5 24297 { echo "$as_me:$LINENO: checking for ut_time field in utmpx.h" >&5
25215$as_echo_n "checking for ut_time field in utmpx.h... " >&6; } 24298echo $ECHO_N "checking for ut_time field in utmpx.h... $ECHO_C" >&6; }
25216 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 24299 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
25217 $as_echo_n "(cached) " >&6 24300 echo $ECHO_N "(cached) $ECHO_C" >&6
25218else 24301else
25219 24302
25220 cat >conftest.$ac_ext <<_ACEOF 24303 cat >conftest.$ac_ext <<_ACEOF
@@ -25238,8 +24321,8 @@ fi
25238 24321
25239 ossh_result=`eval 'echo $'"$ossh_varname"` 24322 ossh_result=`eval 'echo $'"$ossh_varname"`
25240 if test -n "`echo $ossh_varname`"; then 24323 if test -n "`echo $ossh_varname`"; then
25241 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 24324 { echo "$as_me:$LINENO: result: $ossh_result" >&5
25242$as_echo "$ossh_result" >&6; } 24325echo "${ECHO_T}$ossh_result" >&6; }
25243 if test "x$ossh_result" = "xyes"; then 24326 if test "x$ossh_result" = "xyes"; then
25244 24327
25245cat >>confdefs.h <<\_ACEOF 24328cat >>confdefs.h <<\_ACEOF
@@ -25248,18 +24331,18 @@ _ACEOF
25248 24331
25249 fi 24332 fi
25250 else 24333 else
25251 { $as_echo "$as_me:$LINENO: result: no" >&5 24334 { echo "$as_me:$LINENO: result: no" >&5
25252$as_echo "no" >&6; } 24335echo "${ECHO_T}no" >&6; }
25253 fi 24336 fi
25254 24337
25255 24338
25256# look for field 'ut_tv' in header 'utmpx.h' 24339# look for field 'ut_tv' in header 'utmpx.h'
25257 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 24340 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
25258 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv 24341 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
25259 { $as_echo "$as_me:$LINENO: checking for ut_tv field in utmpx.h" >&5 24342 { echo "$as_me:$LINENO: checking for ut_tv field in utmpx.h" >&5
25260$as_echo_n "checking for ut_tv field in utmpx.h... " >&6; } 24343echo $ECHO_N "checking for ut_tv field in utmpx.h... $ECHO_C" >&6; }
25261 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 24344 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then
25262 $as_echo_n "(cached) " >&6 24345 echo $ECHO_N "(cached) $ECHO_C" >&6
25263else 24346else
25264 24347
25265 cat >conftest.$ac_ext <<_ACEOF 24348 cat >conftest.$ac_ext <<_ACEOF
@@ -25283,8 +24366,8 @@ fi
25283 24366
25284 ossh_result=`eval 'echo $'"$ossh_varname"` 24367 ossh_result=`eval 'echo $'"$ossh_varname"`
25285 if test -n "`echo $ossh_varname`"; then 24368 if test -n "`echo $ossh_varname`"; then
25286 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 24369 { echo "$as_me:$LINENO: result: $ossh_result" >&5
25287$as_echo "$ossh_result" >&6; } 24370echo "${ECHO_T}$ossh_result" >&6; }
25288 if test "x$ossh_result" = "xyes"; then 24371 if test "x$ossh_result" = "xyes"; then
25289 24372
25290cat >>confdefs.h <<\_ACEOF 24373cat >>confdefs.h <<\_ACEOF
@@ -25293,15 +24376,15 @@ _ACEOF
25293 24376
25294 fi 24377 fi
25295 else 24378 else
25296 { $as_echo "$as_me:$LINENO: result: no" >&5 24379 { echo "$as_me:$LINENO: result: no" >&5
25297$as_echo "no" >&6; } 24380echo "${ECHO_T}no" >&6; }
25298 fi 24381 fi
25299 24382
25300 24383
25301{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 24384{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
25302$as_echo_n "checking for struct stat.st_blksize... " >&6; } 24385echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
25303if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then 24386if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
25304 $as_echo_n "(cached) " >&6 24387 echo $ECHO_N "(cached) $ECHO_C" >&6
25305else 24388else
25306 cat >conftest.$ac_ext <<_ACEOF 24389 cat >conftest.$ac_ext <<_ACEOF
25307/* confdefs.h. */ 24390/* confdefs.h. */
@@ -25326,21 +24409,20 @@ case "(($ac_try" in
25326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 24409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25327 *) ac_try_echo=$ac_try;; 24410 *) ac_try_echo=$ac_try;;
25328esac 24411esac
25329eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 24412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25330$as_echo "$ac_try_echo") >&5
25331 (eval "$ac_compile") 2>conftest.er1 24413 (eval "$ac_compile") 2>conftest.er1
25332 ac_status=$? 24414 ac_status=$?
25333 grep -v '^ *+' conftest.er1 >conftest.err 24415 grep -v '^ *+' conftest.er1 >conftest.err
25334 rm -f conftest.er1 24416 rm -f conftest.er1
25335 cat conftest.err >&5 24417 cat conftest.err >&5
25336 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 24418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25337 (exit $ac_status); } && { 24419 (exit $ac_status); } && {
25338 test -z "$ac_c_werror_flag" || 24420 test -z "$ac_c_werror_flag" ||
25339 test ! -s conftest.err 24421 test ! -s conftest.err
25340 } && test -s conftest.$ac_objext; then 24422 } && test -s conftest.$ac_objext; then
25341 ac_cv_member_struct_stat_st_blksize=yes 24423 ac_cv_member_struct_stat_st_blksize=yes
25342else 24424else
25343 $as_echo "$as_me: failed program was:" >&5 24425 echo "$as_me: failed program was:" >&5
25344sed 's/^/| /' conftest.$ac_ext >&5 24426sed 's/^/| /' conftest.$ac_ext >&5
25345 24427
25346 cat >conftest.$ac_ext <<_ACEOF 24428 cat >conftest.$ac_ext <<_ACEOF
@@ -25366,21 +24448,20 @@ case "(($ac_try" in
25366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 24448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25367 *) ac_try_echo=$ac_try;; 24449 *) ac_try_echo=$ac_try;;
25368esac 24450esac
25369eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 24451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25370$as_echo "$ac_try_echo") >&5
25371 (eval "$ac_compile") 2>conftest.er1 24452 (eval "$ac_compile") 2>conftest.er1
25372 ac_status=$? 24453 ac_status=$?
25373 grep -v '^ *+' conftest.er1 >conftest.err 24454 grep -v '^ *+' conftest.er1 >conftest.err
25374 rm -f conftest.er1 24455 rm -f conftest.er1
25375 cat conftest.err >&5 24456 cat conftest.err >&5
25376 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 24457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25377 (exit $ac_status); } && { 24458 (exit $ac_status); } && {
25378 test -z "$ac_c_werror_flag" || 24459 test -z "$ac_c_werror_flag" ||
25379 test ! -s conftest.err 24460 test ! -s conftest.err
25380 } && test -s conftest.$ac_objext; then 24461 } && test -s conftest.$ac_objext; then
25381 ac_cv_member_struct_stat_st_blksize=yes 24462 ac_cv_member_struct_stat_st_blksize=yes
25382else 24463else
25383 $as_echo "$as_me: failed program was:" >&5 24464 echo "$as_me: failed program was:" >&5
25384sed 's/^/| /' conftest.$ac_ext >&5 24465sed 's/^/| /' conftest.$ac_ext >&5
25385 24466
25386 ac_cv_member_struct_stat_st_blksize=no 24467 ac_cv_member_struct_stat_st_blksize=no
@@ -25391,8 +24472,8 @@ fi
25391 24472
25392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 24473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25393fi 24474fi
25394{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 24475{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
25395$as_echo "$ac_cv_member_struct_stat_st_blksize" >&6; } 24476echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
25396if test $ac_cv_member_struct_stat_st_blksize = yes; then 24477if test $ac_cv_member_struct_stat_st_blksize = yes; then
25397 24478
25398cat >>confdefs.h <<_ACEOF 24479cat >>confdefs.h <<_ACEOF
@@ -25402,10 +24483,10 @@ _ACEOF
25402 24483
25403fi 24484fi
25404 24485
25405{ $as_echo "$as_me:$LINENO: checking for struct __res_state.retrans" >&5 24486{ echo "$as_me:$LINENO: checking for struct __res_state.retrans" >&5
25406$as_echo_n "checking for struct __res_state.retrans... " >&6; } 24487echo $ECHO_N "checking for struct __res_state.retrans... $ECHO_C" >&6; }
25407if test "${ac_cv_member_struct___res_state_retrans+set}" = set; then 24488if test "${ac_cv_member_struct___res_state_retrans+set}" = set; then
25408 $as_echo_n "(cached) " >&6 24489 echo $ECHO_N "(cached) $ECHO_C" >&6
25409else 24490else
25410 cat >conftest.$ac_ext <<_ACEOF 24491 cat >conftest.$ac_ext <<_ACEOF
25411/* confdefs.h. */ 24492/* confdefs.h. */
@@ -25439,21 +24520,20 @@ case "(($ac_try" in
25439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 24520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25440 *) ac_try_echo=$ac_try;; 24521 *) ac_try_echo=$ac_try;;
25441esac 24522esac
25442eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 24523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25443$as_echo "$ac_try_echo") >&5
25444 (eval "$ac_compile") 2>conftest.er1 24524 (eval "$ac_compile") 2>conftest.er1
25445 ac_status=$? 24525 ac_status=$?
25446 grep -v '^ *+' conftest.er1 >conftest.err 24526 grep -v '^ *+' conftest.er1 >conftest.err
25447 rm -f conftest.er1 24527 rm -f conftest.er1
25448 cat conftest.err >&5 24528 cat conftest.err >&5
25449 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 24529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25450 (exit $ac_status); } && { 24530 (exit $ac_status); } && {
25451 test -z "$ac_c_werror_flag" || 24531 test -z "$ac_c_werror_flag" ||
25452 test ! -s conftest.err 24532 test ! -s conftest.err
25453 } && test -s conftest.$ac_objext; then 24533 } && test -s conftest.$ac_objext; then
25454 ac_cv_member_struct___res_state_retrans=yes 24534 ac_cv_member_struct___res_state_retrans=yes
25455else 24535else
25456 $as_echo "$as_me: failed program was:" >&5 24536 echo "$as_me: failed program was:" >&5
25457sed 's/^/| /' conftest.$ac_ext >&5 24537sed 's/^/| /' conftest.$ac_ext >&5
25458 24538
25459 cat >conftest.$ac_ext <<_ACEOF 24539 cat >conftest.$ac_ext <<_ACEOF
@@ -25488,21 +24568,20 @@ case "(($ac_try" in
25488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 24568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25489 *) ac_try_echo=$ac_try;; 24569 *) ac_try_echo=$ac_try;;
25490esac 24570esac
25491eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 24571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25492$as_echo "$ac_try_echo") >&5
25493 (eval "$ac_compile") 2>conftest.er1 24572 (eval "$ac_compile") 2>conftest.er1
25494 ac_status=$? 24573 ac_status=$?
25495 grep -v '^ *+' conftest.er1 >conftest.err 24574 grep -v '^ *+' conftest.er1 >conftest.err
25496 rm -f conftest.er1 24575 rm -f conftest.er1
25497 cat conftest.err >&5 24576 cat conftest.err >&5
25498 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 24577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25499 (exit $ac_status); } && { 24578 (exit $ac_status); } && {
25500 test -z "$ac_c_werror_flag" || 24579 test -z "$ac_c_werror_flag" ||
25501 test ! -s conftest.err 24580 test ! -s conftest.err
25502 } && test -s conftest.$ac_objext; then 24581 } && test -s conftest.$ac_objext; then
25503 ac_cv_member_struct___res_state_retrans=yes 24582 ac_cv_member_struct___res_state_retrans=yes
25504else 24583else
25505 $as_echo "$as_me: failed program was:" >&5 24584 echo "$as_me: failed program was:" >&5
25506sed 's/^/| /' conftest.$ac_ext >&5 24585sed 's/^/| /' conftest.$ac_ext >&5
25507 24586
25508 ac_cv_member_struct___res_state_retrans=no 24587 ac_cv_member_struct___res_state_retrans=no
@@ -25513,8 +24592,8 @@ fi
25513 24592
25514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 24593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25515fi 24594fi
25516{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct___res_state_retrans" >&5 24595{ echo "$as_me:$LINENO: result: $ac_cv_member_struct___res_state_retrans" >&5
25517$as_echo "$ac_cv_member_struct___res_state_retrans" >&6; } 24596echo "${ECHO_T}$ac_cv_member_struct___res_state_retrans" >&6; }
25518if test $ac_cv_member_struct___res_state_retrans = yes; then 24597if test $ac_cv_member_struct___res_state_retrans = yes; then
25519 : 24598 :
25520else 24599else
@@ -25526,10 +24605,10 @@ _ACEOF
25526fi 24605fi
25527 24606
25528 24607
25529{ $as_echo "$as_me:$LINENO: checking for ss_family field in struct sockaddr_storage" >&5 24608{ echo "$as_me:$LINENO: checking for ss_family field in struct sockaddr_storage" >&5
25530$as_echo_n "checking for ss_family field in struct sockaddr_storage... " >&6; } 24609echo $ECHO_N "checking for ss_family field in struct sockaddr_storage... $ECHO_C" >&6; }
25531if test "${ac_cv_have_ss_family_in_struct_ss+set}" = set; then 24610if test "${ac_cv_have_ss_family_in_struct_ss+set}" = set; then
25532 $as_echo_n "(cached) " >&6 24611 echo $ECHO_N "(cached) $ECHO_C" >&6
25533else 24612else
25534 24613
25535 cat >conftest.$ac_ext <<_ACEOF 24614 cat >conftest.$ac_ext <<_ACEOF
@@ -25556,21 +24635,20 @@ case "(($ac_try" in
25556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 24635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25557 *) ac_try_echo=$ac_try;; 24636 *) ac_try_echo=$ac_try;;
25558esac 24637esac
25559eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 24638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25560$as_echo "$ac_try_echo") >&5
25561 (eval "$ac_compile") 2>conftest.er1 24639 (eval "$ac_compile") 2>conftest.er1
25562 ac_status=$? 24640 ac_status=$?
25563 grep -v '^ *+' conftest.er1 >conftest.err 24641 grep -v '^ *+' conftest.er1 >conftest.err
25564 rm -f conftest.er1 24642 rm -f conftest.er1
25565 cat conftest.err >&5 24643 cat conftest.err >&5
25566 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 24644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25567 (exit $ac_status); } && { 24645 (exit $ac_status); } && {
25568 test -z "$ac_c_werror_flag" || 24646 test -z "$ac_c_werror_flag" ||
25569 test ! -s conftest.err 24647 test ! -s conftest.err
25570 } && test -s conftest.$ac_objext; then 24648 } && test -s conftest.$ac_objext; then
25571 ac_cv_have_ss_family_in_struct_ss="yes" 24649 ac_cv_have_ss_family_in_struct_ss="yes"
25572else 24650else
25573 $as_echo "$as_me: failed program was:" >&5 24651 echo "$as_me: failed program was:" >&5
25574sed 's/^/| /' conftest.$ac_ext >&5 24652sed 's/^/| /' conftest.$ac_ext >&5
25575 24653
25576 ac_cv_have_ss_family_in_struct_ss="no" 24654 ac_cv_have_ss_family_in_struct_ss="no"
@@ -25579,8 +24657,8 @@ fi
25579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 24657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25580 24658
25581fi 24659fi
25582{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_ss_family_in_struct_ss" >&5 24660{ echo "$as_me:$LINENO: result: $ac_cv_have_ss_family_in_struct_ss" >&5
25583$as_echo "$ac_cv_have_ss_family_in_struct_ss" >&6; } 24661echo "${ECHO_T}$ac_cv_have_ss_family_in_struct_ss" >&6; }
25584if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then 24662if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
25585 24663
25586cat >>confdefs.h <<\_ACEOF 24664cat >>confdefs.h <<\_ACEOF
@@ -25589,10 +24667,10 @@ _ACEOF
25589 24667
25590fi 24668fi
25591 24669
25592{ $as_echo "$as_me:$LINENO: checking for __ss_family field in struct sockaddr_storage" >&5 24670{ echo "$as_me:$LINENO: checking for __ss_family field in struct sockaddr_storage" >&5
25593$as_echo_n "checking for __ss_family field in struct sockaddr_storage... " >&6; } 24671echo $ECHO_N "checking for __ss_family field in struct sockaddr_storage... $ECHO_C" >&6; }
25594if test "${ac_cv_have___ss_family_in_struct_ss+set}" = set; then 24672if test "${ac_cv_have___ss_family_in_struct_ss+set}" = set; then
25595 $as_echo_n "(cached) " >&6 24673 echo $ECHO_N "(cached) $ECHO_C" >&6
25596else 24674else
25597 24675
25598 cat >conftest.$ac_ext <<_ACEOF 24676 cat >conftest.$ac_ext <<_ACEOF
@@ -25619,21 +24697,20 @@ case "(($ac_try" in
25619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 24697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25620 *) ac_try_echo=$ac_try;; 24698 *) ac_try_echo=$ac_try;;
25621esac 24699esac
25622eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 24700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25623$as_echo "$ac_try_echo") >&5
25624 (eval "$ac_compile") 2>conftest.er1 24701 (eval "$ac_compile") 2>conftest.er1
25625 ac_status=$? 24702 ac_status=$?
25626 grep -v '^ *+' conftest.er1 >conftest.err 24703 grep -v '^ *+' conftest.er1 >conftest.err
25627 rm -f conftest.er1 24704 rm -f conftest.er1
25628 cat conftest.err >&5 24705 cat conftest.err >&5
25629 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 24706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25630 (exit $ac_status); } && { 24707 (exit $ac_status); } && {
25631 test -z "$ac_c_werror_flag" || 24708 test -z "$ac_c_werror_flag" ||
25632 test ! -s conftest.err 24709 test ! -s conftest.err
25633 } && test -s conftest.$ac_objext; then 24710 } && test -s conftest.$ac_objext; then
25634 ac_cv_have___ss_family_in_struct_ss="yes" 24711 ac_cv_have___ss_family_in_struct_ss="yes"
25635else 24712else
25636 $as_echo "$as_me: failed program was:" >&5 24713 echo "$as_me: failed program was:" >&5
25637sed 's/^/| /' conftest.$ac_ext >&5 24714sed 's/^/| /' conftest.$ac_ext >&5
25638 24715
25639 ac_cv_have___ss_family_in_struct_ss="no" 24716 ac_cv_have___ss_family_in_struct_ss="no"
@@ -25643,8 +24720,8 @@ fi
25643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 24720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25644 24721
25645fi 24722fi
25646{ $as_echo "$as_me:$LINENO: result: $ac_cv_have___ss_family_in_struct_ss" >&5 24723{ echo "$as_me:$LINENO: result: $ac_cv_have___ss_family_in_struct_ss" >&5
25647$as_echo "$ac_cv_have___ss_family_in_struct_ss" >&6; } 24724echo "${ECHO_T}$ac_cv_have___ss_family_in_struct_ss" >&6; }
25648if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then 24725if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
25649 24726
25650cat >>confdefs.h <<\_ACEOF 24727cat >>confdefs.h <<\_ACEOF
@@ -25653,10 +24730,10 @@ _ACEOF
25653 24730
25654fi 24731fi
25655 24732
25656{ $as_echo "$as_me:$LINENO: checking for pw_class field in struct passwd" >&5 24733{ echo "$as_me:$LINENO: checking for pw_class field in struct passwd" >&5
25657$as_echo_n "checking for pw_class field in struct passwd... " >&6; } 24734echo $ECHO_N "checking for pw_class field in struct passwd... $ECHO_C" >&6; }
25658if test "${ac_cv_have_pw_class_in_struct_passwd+set}" = set; then 24735if test "${ac_cv_have_pw_class_in_struct_passwd+set}" = set; then
25659 $as_echo_n "(cached) " >&6 24736 echo $ECHO_N "(cached) $ECHO_C" >&6
25660else 24737else
25661 24738
25662 cat >conftest.$ac_ext <<_ACEOF 24739 cat >conftest.$ac_ext <<_ACEOF
@@ -25682,21 +24759,20 @@ case "(($ac_try" in
25682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 24759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25683 *) ac_try_echo=$ac_try;; 24760 *) ac_try_echo=$ac_try;;
25684esac 24761esac
25685eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 24762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25686$as_echo "$ac_try_echo") >&5
25687 (eval "$ac_compile") 2>conftest.er1 24763 (eval "$ac_compile") 2>conftest.er1
25688 ac_status=$? 24764 ac_status=$?
25689 grep -v '^ *+' conftest.er1 >conftest.err 24765 grep -v '^ *+' conftest.er1 >conftest.err
25690 rm -f conftest.er1 24766 rm -f conftest.er1
25691 cat conftest.err >&5 24767 cat conftest.err >&5
25692 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 24768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25693 (exit $ac_status); } && { 24769 (exit $ac_status); } && {
25694 test -z "$ac_c_werror_flag" || 24770 test -z "$ac_c_werror_flag" ||
25695 test ! -s conftest.err 24771 test ! -s conftest.err
25696 } && test -s conftest.$ac_objext; then 24772 } && test -s conftest.$ac_objext; then
25697 ac_cv_have_pw_class_in_struct_passwd="yes" 24773 ac_cv_have_pw_class_in_struct_passwd="yes"
25698else 24774else
25699 $as_echo "$as_me: failed program was:" >&5 24775 echo "$as_me: failed program was:" >&5
25700sed 's/^/| /' conftest.$ac_ext >&5 24776sed 's/^/| /' conftest.$ac_ext >&5
25701 24777
25702 ac_cv_have_pw_class_in_struct_passwd="no" 24778 ac_cv_have_pw_class_in_struct_passwd="no"
@@ -25706,8 +24782,8 @@ fi
25706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 24782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25707 24783
25708fi 24784fi
25709{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_pw_class_in_struct_passwd" >&5 24785{ echo "$as_me:$LINENO: result: $ac_cv_have_pw_class_in_struct_passwd" >&5
25710$as_echo "$ac_cv_have_pw_class_in_struct_passwd" >&6; } 24786echo "${ECHO_T}$ac_cv_have_pw_class_in_struct_passwd" >&6; }
25711if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then 24787if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
25712 24788
25713cat >>confdefs.h <<\_ACEOF 24789cat >>confdefs.h <<\_ACEOF
@@ -25716,10 +24792,10 @@ _ACEOF
25716 24792
25717fi 24793fi
25718 24794
25719{ $as_echo "$as_me:$LINENO: checking for pw_expire field in struct passwd" >&5 24795{ echo "$as_me:$LINENO: checking for pw_expire field in struct passwd" >&5
25720$as_echo_n "checking for pw_expire field in struct passwd... " >&6; } 24796echo $ECHO_N "checking for pw_expire field in struct passwd... $ECHO_C" >&6; }
25721if test "${ac_cv_have_pw_expire_in_struct_passwd+set}" = set; then 24797if test "${ac_cv_have_pw_expire_in_struct_passwd+set}" = set; then
25722 $as_echo_n "(cached) " >&6 24798 echo $ECHO_N "(cached) $ECHO_C" >&6
25723else 24799else
25724 24800
25725 cat >conftest.$ac_ext <<_ACEOF 24801 cat >conftest.$ac_ext <<_ACEOF
@@ -25745,21 +24821,20 @@ case "(($ac_try" in
25745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 24821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25746 *) ac_try_echo=$ac_try;; 24822 *) ac_try_echo=$ac_try;;
25747esac 24823esac
25748eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 24824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25749$as_echo "$ac_try_echo") >&5
25750 (eval "$ac_compile") 2>conftest.er1 24825 (eval "$ac_compile") 2>conftest.er1
25751 ac_status=$? 24826 ac_status=$?
25752 grep -v '^ *+' conftest.er1 >conftest.err 24827 grep -v '^ *+' conftest.er1 >conftest.err
25753 rm -f conftest.er1 24828 rm -f conftest.er1
25754 cat conftest.err >&5 24829 cat conftest.err >&5
25755 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 24830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25756 (exit $ac_status); } && { 24831 (exit $ac_status); } && {
25757 test -z "$ac_c_werror_flag" || 24832 test -z "$ac_c_werror_flag" ||
25758 test ! -s conftest.err 24833 test ! -s conftest.err
25759 } && test -s conftest.$ac_objext; then 24834 } && test -s conftest.$ac_objext; then
25760 ac_cv_have_pw_expire_in_struct_passwd="yes" 24835 ac_cv_have_pw_expire_in_struct_passwd="yes"
25761else 24836else
25762 $as_echo "$as_me: failed program was:" >&5 24837 echo "$as_me: failed program was:" >&5
25763sed 's/^/| /' conftest.$ac_ext >&5 24838sed 's/^/| /' conftest.$ac_ext >&5
25764 24839
25765 ac_cv_have_pw_expire_in_struct_passwd="no" 24840 ac_cv_have_pw_expire_in_struct_passwd="no"
@@ -25769,8 +24844,8 @@ fi
25769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 24844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25770 24845
25771fi 24846fi
25772{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_pw_expire_in_struct_passwd" >&5 24847{ echo "$as_me:$LINENO: result: $ac_cv_have_pw_expire_in_struct_passwd" >&5
25773$as_echo "$ac_cv_have_pw_expire_in_struct_passwd" >&6; } 24848echo "${ECHO_T}$ac_cv_have_pw_expire_in_struct_passwd" >&6; }
25774if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then 24849if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
25775 24850
25776cat >>confdefs.h <<\_ACEOF 24851cat >>confdefs.h <<\_ACEOF
@@ -25779,10 +24854,10 @@ _ACEOF
25779 24854
25780fi 24855fi
25781 24856
25782{ $as_echo "$as_me:$LINENO: checking for pw_change field in struct passwd" >&5 24857{ echo "$as_me:$LINENO: checking for pw_change field in struct passwd" >&5
25783$as_echo_n "checking for pw_change field in struct passwd... " >&6; } 24858echo $ECHO_N "checking for pw_change field in struct passwd... $ECHO_C" >&6; }
25784if test "${ac_cv_have_pw_change_in_struct_passwd+set}" = set; then 24859if test "${ac_cv_have_pw_change_in_struct_passwd+set}" = set; then
25785 $as_echo_n "(cached) " >&6 24860 echo $ECHO_N "(cached) $ECHO_C" >&6
25786else 24861else
25787 24862
25788 cat >conftest.$ac_ext <<_ACEOF 24863 cat >conftest.$ac_ext <<_ACEOF
@@ -25808,21 +24883,20 @@ case "(($ac_try" in
25808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 24883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25809 *) ac_try_echo=$ac_try;; 24884 *) ac_try_echo=$ac_try;;
25810esac 24885esac
25811eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 24886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25812$as_echo "$ac_try_echo") >&5
25813 (eval "$ac_compile") 2>conftest.er1 24887 (eval "$ac_compile") 2>conftest.er1
25814 ac_status=$? 24888 ac_status=$?
25815 grep -v '^ *+' conftest.er1 >conftest.err 24889 grep -v '^ *+' conftest.er1 >conftest.err
25816 rm -f conftest.er1 24890 rm -f conftest.er1
25817 cat conftest.err >&5 24891 cat conftest.err >&5
25818 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 24892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25819 (exit $ac_status); } && { 24893 (exit $ac_status); } && {
25820 test -z "$ac_c_werror_flag" || 24894 test -z "$ac_c_werror_flag" ||
25821 test ! -s conftest.err 24895 test ! -s conftest.err
25822 } && test -s conftest.$ac_objext; then 24896 } && test -s conftest.$ac_objext; then
25823 ac_cv_have_pw_change_in_struct_passwd="yes" 24897 ac_cv_have_pw_change_in_struct_passwd="yes"
25824else 24898else
25825 $as_echo "$as_me: failed program was:" >&5 24899 echo "$as_me: failed program was:" >&5
25826sed 's/^/| /' conftest.$ac_ext >&5 24900sed 's/^/| /' conftest.$ac_ext >&5
25827 24901
25828 ac_cv_have_pw_change_in_struct_passwd="no" 24902 ac_cv_have_pw_change_in_struct_passwd="no"
@@ -25832,8 +24906,8 @@ fi
25832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 24906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25833 24907
25834fi 24908fi
25835{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_pw_change_in_struct_passwd" >&5 24909{ echo "$as_me:$LINENO: result: $ac_cv_have_pw_change_in_struct_passwd" >&5
25836$as_echo "$ac_cv_have_pw_change_in_struct_passwd" >&6; } 24910echo "${ECHO_T}$ac_cv_have_pw_change_in_struct_passwd" >&6; }
25837if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then 24911if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
25838 24912
25839cat >>confdefs.h <<\_ACEOF 24913cat >>confdefs.h <<\_ACEOF
@@ -25842,10 +24916,10 @@ _ACEOF
25842 24916
25843fi 24917fi
25844 24918
25845{ $as_echo "$as_me:$LINENO: checking for msg_accrights field in struct msghdr" >&5 24919{ echo "$as_me:$LINENO: checking for msg_accrights field in struct msghdr" >&5
25846$as_echo_n "checking for msg_accrights field in struct msghdr... " >&6; } 24920echo $ECHO_N "checking for msg_accrights field in struct msghdr... $ECHO_C" >&6; }
25847if test "${ac_cv_have_accrights_in_msghdr+set}" = set; then 24921if test "${ac_cv_have_accrights_in_msghdr+set}" = set; then
25848 $as_echo_n "(cached) " >&6 24922 echo $ECHO_N "(cached) $ECHO_C" >&6
25849else 24923else
25850 24924
25851 cat >conftest.$ac_ext <<_ACEOF 24925 cat >conftest.$ac_ext <<_ACEOF
@@ -25870,21 +24944,20 @@ case "(($ac_try" in
25870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 24944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25871 *) ac_try_echo=$ac_try;; 24945 *) ac_try_echo=$ac_try;;
25872esac 24946esac
25873eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 24947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25874$as_echo "$ac_try_echo") >&5
25875 (eval "$ac_compile") 2>conftest.er1 24948 (eval "$ac_compile") 2>conftest.er1
25876 ac_status=$? 24949 ac_status=$?
25877 grep -v '^ *+' conftest.er1 >conftest.err 24950 grep -v '^ *+' conftest.er1 >conftest.err
25878 rm -f conftest.er1 24951 rm -f conftest.er1
25879 cat conftest.err >&5 24952 cat conftest.err >&5
25880 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 24953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25881 (exit $ac_status); } && { 24954 (exit $ac_status); } && {
25882 test -z "$ac_c_werror_flag" || 24955 test -z "$ac_c_werror_flag" ||
25883 test ! -s conftest.err 24956 test ! -s conftest.err
25884 } && test -s conftest.$ac_objext; then 24957 } && test -s conftest.$ac_objext; then
25885 ac_cv_have_accrights_in_msghdr="yes" 24958 ac_cv_have_accrights_in_msghdr="yes"
25886else 24959else
25887 $as_echo "$as_me: failed program was:" >&5 24960 echo "$as_me: failed program was:" >&5
25888sed 's/^/| /' conftest.$ac_ext >&5 24961sed 's/^/| /' conftest.$ac_ext >&5
25889 24962
25890 ac_cv_have_accrights_in_msghdr="no" 24963 ac_cv_have_accrights_in_msghdr="no"
@@ -25894,8 +24967,8 @@ fi
25894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 24967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25895 24968
25896fi 24969fi
25897{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_accrights_in_msghdr" >&5 24970{ echo "$as_me:$LINENO: result: $ac_cv_have_accrights_in_msghdr" >&5
25898$as_echo "$ac_cv_have_accrights_in_msghdr" >&6; } 24971echo "${ECHO_T}$ac_cv_have_accrights_in_msghdr" >&6; }
25899if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then 24972if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
25900 24973
25901cat >>confdefs.h <<\_ACEOF 24974cat >>confdefs.h <<\_ACEOF
@@ -25904,8 +24977,8 @@ _ACEOF
25904 24977
25905fi 24978fi
25906 24979
25907{ $as_echo "$as_me:$LINENO: checking if struct statvfs.f_fsid is integral type" >&5 24980{ echo "$as_me:$LINENO: checking if struct statvfs.f_fsid is integral type" >&5
25908$as_echo_n "checking if struct statvfs.f_fsid is integral type... " >&6; } 24981echo $ECHO_N "checking if struct statvfs.f_fsid is integral type... $ECHO_C" >&6; }
25909cat >conftest.$ac_ext <<_ACEOF 24982cat >conftest.$ac_ext <<_ACEOF
25910/* confdefs.h. */ 24983/* confdefs.h. */
25911_ACEOF 24984_ACEOF
@@ -25939,29 +25012,28 @@ case "(($ac_try" in
25939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25940 *) ac_try_echo=$ac_try;; 25013 *) ac_try_echo=$ac_try;;
25941esac 25014esac
25942eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25943$as_echo "$ac_try_echo") >&5
25944 (eval "$ac_compile") 2>conftest.er1 25016 (eval "$ac_compile") 2>conftest.er1
25945 ac_status=$? 25017 ac_status=$?
25946 grep -v '^ *+' conftest.er1 >conftest.err 25018 grep -v '^ *+' conftest.er1 >conftest.err
25947 rm -f conftest.er1 25019 rm -f conftest.er1
25948 cat conftest.err >&5 25020 cat conftest.err >&5
25949 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25950 (exit $ac_status); } && { 25022 (exit $ac_status); } && {
25951 test -z "$ac_c_werror_flag" || 25023 test -z "$ac_c_werror_flag" ||
25952 test ! -s conftest.err 25024 test ! -s conftest.err
25953 } && test -s conftest.$ac_objext; then 25025 } && test -s conftest.$ac_objext; then
25954 { $as_echo "$as_me:$LINENO: result: yes" >&5 25026 { echo "$as_me:$LINENO: result: yes" >&5
25955$as_echo "yes" >&6; } 25027echo "${ECHO_T}yes" >&6; }
25956else 25028else
25957 $as_echo "$as_me: failed program was:" >&5 25029 echo "$as_me: failed program was:" >&5
25958sed 's/^/| /' conftest.$ac_ext >&5 25030sed 's/^/| /' conftest.$ac_ext >&5
25959 25031
25960 { $as_echo "$as_me:$LINENO: result: no" >&5 25032 { echo "$as_me:$LINENO: result: no" >&5
25961$as_echo "no" >&6; } 25033echo "${ECHO_T}no" >&6; }
25962 25034
25963 { $as_echo "$as_me:$LINENO: checking if fsid_t has member val" >&5 25035 { echo "$as_me:$LINENO: checking if fsid_t has member val" >&5
25964$as_echo_n "checking if fsid_t has member val... " >&6; } 25036echo $ECHO_N "checking if fsid_t has member val... $ECHO_C" >&6; }
25965 cat >conftest.$ac_ext <<_ACEOF 25037 cat >conftest.$ac_ext <<_ACEOF
25966/* confdefs.h. */ 25038/* confdefs.h. */
25967_ACEOF 25039_ACEOF
@@ -25985,37 +25057,36 @@ case "(($ac_try" in
25985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25986 *) ac_try_echo=$ac_try;; 25058 *) ac_try_echo=$ac_try;;
25987esac 25059esac
25988eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25989$as_echo "$ac_try_echo") >&5
25990 (eval "$ac_compile") 2>conftest.er1 25061 (eval "$ac_compile") 2>conftest.er1
25991 ac_status=$? 25062 ac_status=$?
25992 grep -v '^ *+' conftest.er1 >conftest.err 25063 grep -v '^ *+' conftest.er1 >conftest.err
25993 rm -f conftest.er1 25064 rm -f conftest.er1
25994 cat conftest.err >&5 25065 cat conftest.err >&5
25995 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25996 (exit $ac_status); } && { 25067 (exit $ac_status); } && {
25997 test -z "$ac_c_werror_flag" || 25068 test -z "$ac_c_werror_flag" ||
25998 test ! -s conftest.err 25069 test ! -s conftest.err
25999 } && test -s conftest.$ac_objext; then 25070 } && test -s conftest.$ac_objext; then
26000 { $as_echo "$as_me:$LINENO: result: yes" >&5 25071 { echo "$as_me:$LINENO: result: yes" >&5
26001$as_echo "yes" >&6; } 25072echo "${ECHO_T}yes" >&6; }
26002 25073
26003cat >>confdefs.h <<\_ACEOF 25074cat >>confdefs.h <<\_ACEOF
26004#define FSID_HAS_VAL 1 25075#define FSID_HAS_VAL 1
26005_ACEOF 25076_ACEOF
26006 25077
26007else 25078else
26008 $as_echo "$as_me: failed program was:" >&5 25079 echo "$as_me: failed program was:" >&5
26009sed 's/^/| /' conftest.$ac_ext >&5 25080sed 's/^/| /' conftest.$ac_ext >&5
26010 25081
26011 { $as_echo "$as_me:$LINENO: result: no" >&5 25082 { echo "$as_me:$LINENO: result: no" >&5
26012$as_echo "no" >&6; } 25083echo "${ECHO_T}no" >&6; }
26013fi 25084fi
26014 25085
26015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 25086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26016 25087
26017 { $as_echo "$as_me:$LINENO: checking if f_fsid has member __val" >&5 25088 { echo "$as_me:$LINENO: checking if f_fsid has member __val" >&5
26018$as_echo_n "checking if f_fsid has member __val... " >&6; } 25089echo $ECHO_N "checking if f_fsid has member __val... $ECHO_C" >&6; }
26019 cat >conftest.$ac_ext <<_ACEOF 25090 cat >conftest.$ac_ext <<_ACEOF
26020/* confdefs.h. */ 25091/* confdefs.h. */
26021_ACEOF 25092_ACEOF
@@ -26039,31 +25110,30 @@ case "(($ac_try" in
26039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26040 *) ac_try_echo=$ac_try;; 25111 *) ac_try_echo=$ac_try;;
26041esac 25112esac
26042eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26043$as_echo "$ac_try_echo") >&5
26044 (eval "$ac_compile") 2>conftest.er1 25114 (eval "$ac_compile") 2>conftest.er1
26045 ac_status=$? 25115 ac_status=$?
26046 grep -v '^ *+' conftest.er1 >conftest.err 25116 grep -v '^ *+' conftest.er1 >conftest.err
26047 rm -f conftest.er1 25117 rm -f conftest.er1
26048 cat conftest.err >&5 25118 cat conftest.err >&5
26049 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26050 (exit $ac_status); } && { 25120 (exit $ac_status); } && {
26051 test -z "$ac_c_werror_flag" || 25121 test -z "$ac_c_werror_flag" ||
26052 test ! -s conftest.err 25122 test ! -s conftest.err
26053 } && test -s conftest.$ac_objext; then 25123 } && test -s conftest.$ac_objext; then
26054 { $as_echo "$as_me:$LINENO: result: yes" >&5 25124 { echo "$as_me:$LINENO: result: yes" >&5
26055$as_echo "yes" >&6; } 25125echo "${ECHO_T}yes" >&6; }
26056 25126
26057cat >>confdefs.h <<\_ACEOF 25127cat >>confdefs.h <<\_ACEOF
26058#define FSID_HAS___VAL 1 25128#define FSID_HAS___VAL 1
26059_ACEOF 25129_ACEOF
26060 25130
26061else 25131else
26062 $as_echo "$as_me: failed program was:" >&5 25132 echo "$as_me: failed program was:" >&5
26063sed 's/^/| /' conftest.$ac_ext >&5 25133sed 's/^/| /' conftest.$ac_ext >&5
26064 25134
26065 { $as_echo "$as_me:$LINENO: result: no" >&5 25135 { echo "$as_me:$LINENO: result: no" >&5
26066$as_echo "no" >&6; } 25136echo "${ECHO_T}no" >&6; }
26067fi 25137fi
26068 25138
26069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 25139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -26072,10 +25142,10 @@ fi
26072 25142
26073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 25143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26074 25144
26075{ $as_echo "$as_me:$LINENO: checking for msg_control field in struct msghdr" >&5 25145{ echo "$as_me:$LINENO: checking for msg_control field in struct msghdr" >&5
26076$as_echo_n "checking for msg_control field in struct msghdr... " >&6; } 25146echo $ECHO_N "checking for msg_control field in struct msghdr... $ECHO_C" >&6; }
26077if test "${ac_cv_have_control_in_msghdr+set}" = set; then 25147if test "${ac_cv_have_control_in_msghdr+set}" = set; then
26078 $as_echo_n "(cached) " >&6 25148 echo $ECHO_N "(cached) $ECHO_C" >&6
26079else 25149else
26080 25150
26081 cat >conftest.$ac_ext <<_ACEOF 25151 cat >conftest.$ac_ext <<_ACEOF
@@ -26100,21 +25170,20 @@ case "(($ac_try" in
26100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26101 *) ac_try_echo=$ac_try;; 25171 *) ac_try_echo=$ac_try;;
26102esac 25172esac
26103eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26104$as_echo "$ac_try_echo") >&5
26105 (eval "$ac_compile") 2>conftest.er1 25174 (eval "$ac_compile") 2>conftest.er1
26106 ac_status=$? 25175 ac_status=$?
26107 grep -v '^ *+' conftest.er1 >conftest.err 25176 grep -v '^ *+' conftest.er1 >conftest.err
26108 rm -f conftest.er1 25177 rm -f conftest.er1
26109 cat conftest.err >&5 25178 cat conftest.err >&5
26110 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26111 (exit $ac_status); } && { 25180 (exit $ac_status); } && {
26112 test -z "$ac_c_werror_flag" || 25181 test -z "$ac_c_werror_flag" ||
26113 test ! -s conftest.err 25182 test ! -s conftest.err
26114 } && test -s conftest.$ac_objext; then 25183 } && test -s conftest.$ac_objext; then
26115 ac_cv_have_control_in_msghdr="yes" 25184 ac_cv_have_control_in_msghdr="yes"
26116else 25185else
26117 $as_echo "$as_me: failed program was:" >&5 25186 echo "$as_me: failed program was:" >&5
26118sed 's/^/| /' conftest.$ac_ext >&5 25187sed 's/^/| /' conftest.$ac_ext >&5
26119 25188
26120 ac_cv_have_control_in_msghdr="no" 25189 ac_cv_have_control_in_msghdr="no"
@@ -26124,8 +25193,8 @@ fi
26124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 25193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26125 25194
26126fi 25195fi
26127{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_control_in_msghdr" >&5 25196{ echo "$as_me:$LINENO: result: $ac_cv_have_control_in_msghdr" >&5
26128$as_echo "$ac_cv_have_control_in_msghdr" >&6; } 25197echo "${ECHO_T}$ac_cv_have_control_in_msghdr" >&6; }
26129if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then 25198if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
26130 25199
26131cat >>confdefs.h <<\_ACEOF 25200cat >>confdefs.h <<\_ACEOF
@@ -26134,10 +25203,10 @@ _ACEOF
26134 25203
26135fi 25204fi
26136 25205
26137{ $as_echo "$as_me:$LINENO: checking if libc defines __progname" >&5 25206{ echo "$as_me:$LINENO: checking if libc defines __progname" >&5
26138$as_echo_n "checking if libc defines __progname... " >&6; } 25207echo $ECHO_N "checking if libc defines __progname... $ECHO_C" >&6; }
26139if test "${ac_cv_libc_defines___progname+set}" = set; then 25208if test "${ac_cv_libc_defines___progname+set}" = set; then
26140 $as_echo_n "(cached) " >&6 25209 echo $ECHO_N "(cached) $ECHO_C" >&6
26141else 25210else
26142 25211
26143 cat >conftest.$ac_ext <<_ACEOF 25212 cat >conftest.$ac_ext <<_ACEOF
@@ -26161,37 +25230,33 @@ case "(($ac_try" in
26161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26162 *) ac_try_echo=$ac_try;; 25231 *) ac_try_echo=$ac_try;;
26163esac 25232esac
26164eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26165$as_echo "$ac_try_echo") >&5
26166 (eval "$ac_link") 2>conftest.er1 25234 (eval "$ac_link") 2>conftest.er1
26167 ac_status=$? 25235 ac_status=$?
26168 grep -v '^ *+' conftest.er1 >conftest.err 25236 grep -v '^ *+' conftest.er1 >conftest.err
26169 rm -f conftest.er1 25237 rm -f conftest.er1
26170 cat conftest.err >&5 25238 cat conftest.err >&5
26171 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26172 (exit $ac_status); } && { 25240 (exit $ac_status); } && {
26173 test -z "$ac_c_werror_flag" || 25241 test -z "$ac_c_werror_flag" ||
26174 test ! -s conftest.err 25242 test ! -s conftest.err
26175 } && test -s conftest$ac_exeext && { 25243 } && test -s conftest$ac_exeext &&
26176 test "$cross_compiling" = yes || 25244 $as_test_x conftest$ac_exeext; then
26177 $as_test_x conftest$ac_exeext
26178 }; then
26179 ac_cv_libc_defines___progname="yes" 25245 ac_cv_libc_defines___progname="yes"
26180else 25246else
26181 $as_echo "$as_me: failed program was:" >&5 25247 echo "$as_me: failed program was:" >&5
26182sed 's/^/| /' conftest.$ac_ext >&5 25248sed 's/^/| /' conftest.$ac_ext >&5
26183 25249
26184 ac_cv_libc_defines___progname="no" 25250 ac_cv_libc_defines___progname="no"
26185 25251
26186fi 25252fi
26187 25253
26188rm -rf conftest.dSYM
26189rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25254rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26190 conftest$ac_exeext conftest.$ac_ext 25255 conftest$ac_exeext conftest.$ac_ext
26191 25256
26192fi 25257fi
26193{ $as_echo "$as_me:$LINENO: result: $ac_cv_libc_defines___progname" >&5 25258{ echo "$as_me:$LINENO: result: $ac_cv_libc_defines___progname" >&5
26194$as_echo "$ac_cv_libc_defines___progname" >&6; } 25259echo "${ECHO_T}$ac_cv_libc_defines___progname" >&6; }
26195if test "x$ac_cv_libc_defines___progname" = "xyes" ; then 25260if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
26196 25261
26197cat >>confdefs.h <<\_ACEOF 25262cat >>confdefs.h <<\_ACEOF
@@ -26200,10 +25265,10 @@ _ACEOF
26200 25265
26201fi 25266fi
26202 25267
26203{ $as_echo "$as_me:$LINENO: checking whether $CC implements __FUNCTION__" >&5 25268{ echo "$as_me:$LINENO: checking whether $CC implements __FUNCTION__" >&5
26204$as_echo_n "checking whether $CC implements __FUNCTION__... " >&6; } 25269echo $ECHO_N "checking whether $CC implements __FUNCTION__... $ECHO_C" >&6; }
26205if test "${ac_cv_cc_implements___FUNCTION__+set}" = set; then 25270if test "${ac_cv_cc_implements___FUNCTION__+set}" = set; then
26206 $as_echo_n "(cached) " >&6 25271 echo $ECHO_N "(cached) $ECHO_C" >&6
26207else 25272else
26208 25273
26209 cat >conftest.$ac_ext <<_ACEOF 25274 cat >conftest.$ac_ext <<_ACEOF
@@ -26229,37 +25294,33 @@ case "(($ac_try" in
26229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26230 *) ac_try_echo=$ac_try;; 25295 *) ac_try_echo=$ac_try;;
26231esac 25296esac
26232eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26233$as_echo "$ac_try_echo") >&5
26234 (eval "$ac_link") 2>conftest.er1 25298 (eval "$ac_link") 2>conftest.er1
26235 ac_status=$? 25299 ac_status=$?
26236 grep -v '^ *+' conftest.er1 >conftest.err 25300 grep -v '^ *+' conftest.er1 >conftest.err
26237 rm -f conftest.er1 25301 rm -f conftest.er1
26238 cat conftest.err >&5 25302 cat conftest.err >&5
26239 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26240 (exit $ac_status); } && { 25304 (exit $ac_status); } && {
26241 test -z "$ac_c_werror_flag" || 25305 test -z "$ac_c_werror_flag" ||
26242 test ! -s conftest.err 25306 test ! -s conftest.err
26243 } && test -s conftest$ac_exeext && { 25307 } && test -s conftest$ac_exeext &&
26244 test "$cross_compiling" = yes || 25308 $as_test_x conftest$ac_exeext; then
26245 $as_test_x conftest$ac_exeext
26246 }; then
26247 ac_cv_cc_implements___FUNCTION__="yes" 25309 ac_cv_cc_implements___FUNCTION__="yes"
26248else 25310else
26249 $as_echo "$as_me: failed program was:" >&5 25311 echo "$as_me: failed program was:" >&5
26250sed 's/^/| /' conftest.$ac_ext >&5 25312sed 's/^/| /' conftest.$ac_ext >&5
26251 25313
26252 ac_cv_cc_implements___FUNCTION__="no" 25314 ac_cv_cc_implements___FUNCTION__="no"
26253 25315
26254fi 25316fi
26255 25317
26256rm -rf conftest.dSYM
26257rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25318rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26258 conftest$ac_exeext conftest.$ac_ext 25319 conftest$ac_exeext conftest.$ac_ext
26259 25320
26260fi 25321fi
26261{ $as_echo "$as_me:$LINENO: result: $ac_cv_cc_implements___FUNCTION__" >&5 25322{ echo "$as_me:$LINENO: result: $ac_cv_cc_implements___FUNCTION__" >&5
26262$as_echo "$ac_cv_cc_implements___FUNCTION__" >&6; } 25323echo "${ECHO_T}$ac_cv_cc_implements___FUNCTION__" >&6; }
26263if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then 25324if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
26264 25325
26265cat >>confdefs.h <<\_ACEOF 25326cat >>confdefs.h <<\_ACEOF
@@ -26268,10 +25329,10 @@ _ACEOF
26268 25329
26269fi 25330fi
26270 25331
26271{ $as_echo "$as_me:$LINENO: checking whether $CC implements __func__" >&5 25332{ echo "$as_me:$LINENO: checking whether $CC implements __func__" >&5
26272$as_echo_n "checking whether $CC implements __func__... " >&6; } 25333echo $ECHO_N "checking whether $CC implements __func__... $ECHO_C" >&6; }
26273if test "${ac_cv_cc_implements___func__+set}" = set; then 25334if test "${ac_cv_cc_implements___func__+set}" = set; then
26274 $as_echo_n "(cached) " >&6 25335 echo $ECHO_N "(cached) $ECHO_C" >&6
26275else 25336else
26276 25337
26277 cat >conftest.$ac_ext <<_ACEOF 25338 cat >conftest.$ac_ext <<_ACEOF
@@ -26297,37 +25358,33 @@ case "(($ac_try" in
26297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26298 *) ac_try_echo=$ac_try;; 25359 *) ac_try_echo=$ac_try;;
26299esac 25360esac
26300eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26301$as_echo "$ac_try_echo") >&5
26302 (eval "$ac_link") 2>conftest.er1 25362 (eval "$ac_link") 2>conftest.er1
26303 ac_status=$? 25363 ac_status=$?
26304 grep -v '^ *+' conftest.er1 >conftest.err 25364 grep -v '^ *+' conftest.er1 >conftest.err
26305 rm -f conftest.er1 25365 rm -f conftest.er1
26306 cat conftest.err >&5 25366 cat conftest.err >&5
26307 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26308 (exit $ac_status); } && { 25368 (exit $ac_status); } && {
26309 test -z "$ac_c_werror_flag" || 25369 test -z "$ac_c_werror_flag" ||
26310 test ! -s conftest.err 25370 test ! -s conftest.err
26311 } && test -s conftest$ac_exeext && { 25371 } && test -s conftest$ac_exeext &&
26312 test "$cross_compiling" = yes || 25372 $as_test_x conftest$ac_exeext; then
26313 $as_test_x conftest$ac_exeext
26314 }; then
26315 ac_cv_cc_implements___func__="yes" 25373 ac_cv_cc_implements___func__="yes"
26316else 25374else
26317 $as_echo "$as_me: failed program was:" >&5 25375 echo "$as_me: failed program was:" >&5
26318sed 's/^/| /' conftest.$ac_ext >&5 25376sed 's/^/| /' conftest.$ac_ext >&5
26319 25377
26320 ac_cv_cc_implements___func__="no" 25378 ac_cv_cc_implements___func__="no"
26321 25379
26322fi 25380fi
26323 25381
26324rm -rf conftest.dSYM
26325rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25382rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26326 conftest$ac_exeext conftest.$ac_ext 25383 conftest$ac_exeext conftest.$ac_ext
26327 25384
26328fi 25385fi
26329{ $as_echo "$as_me:$LINENO: result: $ac_cv_cc_implements___func__" >&5 25386{ echo "$as_me:$LINENO: result: $ac_cv_cc_implements___func__" >&5
26330$as_echo "$ac_cv_cc_implements___func__" >&6; } 25387echo "${ECHO_T}$ac_cv_cc_implements___func__" >&6; }
26331if test "x$ac_cv_cc_implements___func__" = "xyes" ; then 25388if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
26332 25389
26333cat >>confdefs.h <<\_ACEOF 25390cat >>confdefs.h <<\_ACEOF
@@ -26336,10 +25393,10 @@ _ACEOF
26336 25393
26337fi 25394fi
26338 25395
26339{ $as_echo "$as_me:$LINENO: checking whether va_copy exists" >&5 25396{ echo "$as_me:$LINENO: checking whether va_copy exists" >&5
26340$as_echo_n "checking whether va_copy exists... " >&6; } 25397echo $ECHO_N "checking whether va_copy exists... $ECHO_C" >&6; }
26341if test "${ac_cv_have_va_copy+set}" = set; then 25398if test "${ac_cv_have_va_copy+set}" = set; then
26342 $as_echo_n "(cached) " >&6 25399 echo $ECHO_N "(cached) $ECHO_C" >&6
26343else 25400else
26344 25401
26345 cat >conftest.$ac_ext <<_ACEOF 25402 cat >conftest.$ac_ext <<_ACEOF
@@ -26364,37 +25421,33 @@ case "(($ac_try" in
26364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26365 *) ac_try_echo=$ac_try;; 25422 *) ac_try_echo=$ac_try;;
26366esac 25423esac
26367eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26368$as_echo "$ac_try_echo") >&5
26369 (eval "$ac_link") 2>conftest.er1 25425 (eval "$ac_link") 2>conftest.er1
26370 ac_status=$? 25426 ac_status=$?
26371 grep -v '^ *+' conftest.er1 >conftest.err 25427 grep -v '^ *+' conftest.er1 >conftest.err
26372 rm -f conftest.er1 25428 rm -f conftest.er1
26373 cat conftest.err >&5 25429 cat conftest.err >&5
26374 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26375 (exit $ac_status); } && { 25431 (exit $ac_status); } && {
26376 test -z "$ac_c_werror_flag" || 25432 test -z "$ac_c_werror_flag" ||
26377 test ! -s conftest.err 25433 test ! -s conftest.err
26378 } && test -s conftest$ac_exeext && { 25434 } && test -s conftest$ac_exeext &&
26379 test "$cross_compiling" = yes || 25435 $as_test_x conftest$ac_exeext; then
26380 $as_test_x conftest$ac_exeext
26381 }; then
26382 ac_cv_have_va_copy="yes" 25436 ac_cv_have_va_copy="yes"
26383else 25437else
26384 $as_echo "$as_me: failed program was:" >&5 25438 echo "$as_me: failed program was:" >&5
26385sed 's/^/| /' conftest.$ac_ext >&5 25439sed 's/^/| /' conftest.$ac_ext >&5
26386 25440
26387 ac_cv_have_va_copy="no" 25441 ac_cv_have_va_copy="no"
26388 25442
26389fi 25443fi
26390 25444
26391rm -rf conftest.dSYM
26392rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25445rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26393 conftest$ac_exeext conftest.$ac_ext 25446 conftest$ac_exeext conftest.$ac_ext
26394 25447
26395fi 25448fi
26396{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_va_copy" >&5 25449{ echo "$as_me:$LINENO: result: $ac_cv_have_va_copy" >&5
26397$as_echo "$ac_cv_have_va_copy" >&6; } 25450echo "${ECHO_T}$ac_cv_have_va_copy" >&6; }
26398if test "x$ac_cv_have_va_copy" = "xyes" ; then 25451if test "x$ac_cv_have_va_copy" = "xyes" ; then
26399 25452
26400cat >>confdefs.h <<\_ACEOF 25453cat >>confdefs.h <<\_ACEOF
@@ -26403,10 +25456,10 @@ _ACEOF
26403 25456
26404fi 25457fi
26405 25458
26406{ $as_echo "$as_me:$LINENO: checking whether __va_copy exists" >&5 25459{ echo "$as_me:$LINENO: checking whether __va_copy exists" >&5
26407$as_echo_n "checking whether __va_copy exists... " >&6; } 25460echo $ECHO_N "checking whether __va_copy exists... $ECHO_C" >&6; }
26408if test "${ac_cv_have___va_copy+set}" = set; then 25461if test "${ac_cv_have___va_copy+set}" = set; then
26409 $as_echo_n "(cached) " >&6 25462 echo $ECHO_N "(cached) $ECHO_C" >&6
26410else 25463else
26411 25464
26412 cat >conftest.$ac_ext <<_ACEOF 25465 cat >conftest.$ac_ext <<_ACEOF
@@ -26431,37 +25484,33 @@ case "(($ac_try" in
26431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26432 *) ac_try_echo=$ac_try;; 25485 *) ac_try_echo=$ac_try;;
26433esac 25486esac
26434eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26435$as_echo "$ac_try_echo") >&5
26436 (eval "$ac_link") 2>conftest.er1 25488 (eval "$ac_link") 2>conftest.er1
26437 ac_status=$? 25489 ac_status=$?
26438 grep -v '^ *+' conftest.er1 >conftest.err 25490 grep -v '^ *+' conftest.er1 >conftest.err
26439 rm -f conftest.er1 25491 rm -f conftest.er1
26440 cat conftest.err >&5 25492 cat conftest.err >&5
26441 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26442 (exit $ac_status); } && { 25494 (exit $ac_status); } && {
26443 test -z "$ac_c_werror_flag" || 25495 test -z "$ac_c_werror_flag" ||
26444 test ! -s conftest.err 25496 test ! -s conftest.err
26445 } && test -s conftest$ac_exeext && { 25497 } && test -s conftest$ac_exeext &&
26446 test "$cross_compiling" = yes || 25498 $as_test_x conftest$ac_exeext; then
26447 $as_test_x conftest$ac_exeext
26448 }; then
26449 ac_cv_have___va_copy="yes" 25499 ac_cv_have___va_copy="yes"
26450else 25500else
26451 $as_echo "$as_me: failed program was:" >&5 25501 echo "$as_me: failed program was:" >&5
26452sed 's/^/| /' conftest.$ac_ext >&5 25502sed 's/^/| /' conftest.$ac_ext >&5
26453 25503
26454 ac_cv_have___va_copy="no" 25504 ac_cv_have___va_copy="no"
26455 25505
26456fi 25506fi
26457 25507
26458rm -rf conftest.dSYM
26459rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25508rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26460 conftest$ac_exeext conftest.$ac_ext 25509 conftest$ac_exeext conftest.$ac_ext
26461 25510
26462fi 25511fi
26463{ $as_echo "$as_me:$LINENO: result: $ac_cv_have___va_copy" >&5 25512{ echo "$as_me:$LINENO: result: $ac_cv_have___va_copy" >&5
26464$as_echo "$ac_cv_have___va_copy" >&6; } 25513echo "${ECHO_T}$ac_cv_have___va_copy" >&6; }
26465if test "x$ac_cv_have___va_copy" = "xyes" ; then 25514if test "x$ac_cv_have___va_copy" = "xyes" ; then
26466 25515
26467cat >>confdefs.h <<\_ACEOF 25516cat >>confdefs.h <<\_ACEOF
@@ -26470,10 +25519,10 @@ _ACEOF
26470 25519
26471fi 25520fi
26472 25521
26473{ $as_echo "$as_me:$LINENO: checking whether getopt has optreset support" >&5 25522{ echo "$as_me:$LINENO: checking whether getopt has optreset support" >&5
26474$as_echo_n "checking whether getopt has optreset support... " >&6; } 25523echo $ECHO_N "checking whether getopt has optreset support... $ECHO_C" >&6; }
26475if test "${ac_cv_have_getopt_optreset+set}" = set; then 25524if test "${ac_cv_have_getopt_optreset+set}" = set; then
26476 $as_echo_n "(cached) " >&6 25525 echo $ECHO_N "(cached) $ECHO_C" >&6
26477else 25526else
26478 25527
26479 cat >conftest.$ac_ext <<_ACEOF 25528 cat >conftest.$ac_ext <<_ACEOF
@@ -26499,37 +25548,33 @@ case "(($ac_try" in
26499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26500 *) ac_try_echo=$ac_try;; 25549 *) ac_try_echo=$ac_try;;
26501esac 25550esac
26502eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26503$as_echo "$ac_try_echo") >&5
26504 (eval "$ac_link") 2>conftest.er1 25552 (eval "$ac_link") 2>conftest.er1
26505 ac_status=$? 25553 ac_status=$?
26506 grep -v '^ *+' conftest.er1 >conftest.err 25554 grep -v '^ *+' conftest.er1 >conftest.err
26507 rm -f conftest.er1 25555 rm -f conftest.er1
26508 cat conftest.err >&5 25556 cat conftest.err >&5
26509 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26510 (exit $ac_status); } && { 25558 (exit $ac_status); } && {
26511 test -z "$ac_c_werror_flag" || 25559 test -z "$ac_c_werror_flag" ||
26512 test ! -s conftest.err 25560 test ! -s conftest.err
26513 } && test -s conftest$ac_exeext && { 25561 } && test -s conftest$ac_exeext &&
26514 test "$cross_compiling" = yes || 25562 $as_test_x conftest$ac_exeext; then
26515 $as_test_x conftest$ac_exeext
26516 }; then
26517 ac_cv_have_getopt_optreset="yes" 25563 ac_cv_have_getopt_optreset="yes"
26518else 25564else
26519 $as_echo "$as_me: failed program was:" >&5 25565 echo "$as_me: failed program was:" >&5
26520sed 's/^/| /' conftest.$ac_ext >&5 25566sed 's/^/| /' conftest.$ac_ext >&5
26521 25567
26522 ac_cv_have_getopt_optreset="no" 25568 ac_cv_have_getopt_optreset="no"
26523 25569
26524fi 25570fi
26525 25571
26526rm -rf conftest.dSYM
26527rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25572rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26528 conftest$ac_exeext conftest.$ac_ext 25573 conftest$ac_exeext conftest.$ac_ext
26529 25574
26530fi 25575fi
26531{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_getopt_optreset" >&5 25576{ echo "$as_me:$LINENO: result: $ac_cv_have_getopt_optreset" >&5
26532$as_echo "$ac_cv_have_getopt_optreset" >&6; } 25577echo "${ECHO_T}$ac_cv_have_getopt_optreset" >&6; }
26533if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then 25578if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
26534 25579
26535cat >>confdefs.h <<\_ACEOF 25580cat >>confdefs.h <<\_ACEOF
@@ -26538,10 +25583,10 @@ _ACEOF
26538 25583
26539fi 25584fi
26540 25585
26541{ $as_echo "$as_me:$LINENO: checking if libc defines sys_errlist" >&5 25586{ echo "$as_me:$LINENO: checking if libc defines sys_errlist" >&5
26542$as_echo_n "checking if libc defines sys_errlist... " >&6; } 25587echo $ECHO_N "checking if libc defines sys_errlist... $ECHO_C" >&6; }
26543if test "${ac_cv_libc_defines_sys_errlist+set}" = set; then 25588if test "${ac_cv_libc_defines_sys_errlist+set}" = set; then
26544 $as_echo_n "(cached) " >&6 25589 echo $ECHO_N "(cached) $ECHO_C" >&6
26545else 25590else
26546 25591
26547 cat >conftest.$ac_ext <<_ACEOF 25592 cat >conftest.$ac_ext <<_ACEOF
@@ -26565,37 +25610,33 @@ case "(($ac_try" in
26565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26566 *) ac_try_echo=$ac_try;; 25611 *) ac_try_echo=$ac_try;;
26567esac 25612esac
26568eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26569$as_echo "$ac_try_echo") >&5
26570 (eval "$ac_link") 2>conftest.er1 25614 (eval "$ac_link") 2>conftest.er1
26571 ac_status=$? 25615 ac_status=$?
26572 grep -v '^ *+' conftest.er1 >conftest.err 25616 grep -v '^ *+' conftest.er1 >conftest.err
26573 rm -f conftest.er1 25617 rm -f conftest.er1
26574 cat conftest.err >&5 25618 cat conftest.err >&5
26575 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26576 (exit $ac_status); } && { 25620 (exit $ac_status); } && {
26577 test -z "$ac_c_werror_flag" || 25621 test -z "$ac_c_werror_flag" ||
26578 test ! -s conftest.err 25622 test ! -s conftest.err
26579 } && test -s conftest$ac_exeext && { 25623 } && test -s conftest$ac_exeext &&
26580 test "$cross_compiling" = yes || 25624 $as_test_x conftest$ac_exeext; then
26581 $as_test_x conftest$ac_exeext
26582 }; then
26583 ac_cv_libc_defines_sys_errlist="yes" 25625 ac_cv_libc_defines_sys_errlist="yes"
26584else 25626else
26585 $as_echo "$as_me: failed program was:" >&5 25627 echo "$as_me: failed program was:" >&5
26586sed 's/^/| /' conftest.$ac_ext >&5 25628sed 's/^/| /' conftest.$ac_ext >&5
26587 25629
26588 ac_cv_libc_defines_sys_errlist="no" 25630 ac_cv_libc_defines_sys_errlist="no"
26589 25631
26590fi 25632fi
26591 25633
26592rm -rf conftest.dSYM
26593rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25634rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26594 conftest$ac_exeext conftest.$ac_ext 25635 conftest$ac_exeext conftest.$ac_ext
26595 25636
26596fi 25637fi
26597{ $as_echo "$as_me:$LINENO: result: $ac_cv_libc_defines_sys_errlist" >&5 25638{ echo "$as_me:$LINENO: result: $ac_cv_libc_defines_sys_errlist" >&5
26598$as_echo "$ac_cv_libc_defines_sys_errlist" >&6; } 25639echo "${ECHO_T}$ac_cv_libc_defines_sys_errlist" >&6; }
26599if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then 25640if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
26600 25641
26601cat >>confdefs.h <<\_ACEOF 25642cat >>confdefs.h <<\_ACEOF
@@ -26605,10 +25646,10 @@ _ACEOF
26605fi 25646fi
26606 25647
26607 25648
26608{ $as_echo "$as_me:$LINENO: checking if libc defines sys_nerr" >&5 25649{ echo "$as_me:$LINENO: checking if libc defines sys_nerr" >&5
26609$as_echo_n "checking if libc defines sys_nerr... " >&6; } 25650echo $ECHO_N "checking if libc defines sys_nerr... $ECHO_C" >&6; }
26610if test "${ac_cv_libc_defines_sys_nerr+set}" = set; then 25651if test "${ac_cv_libc_defines_sys_nerr+set}" = set; then
26611 $as_echo_n "(cached) " >&6 25652 echo $ECHO_N "(cached) $ECHO_C" >&6
26612else 25653else
26613 25654
26614 cat >conftest.$ac_ext <<_ACEOF 25655 cat >conftest.$ac_ext <<_ACEOF
@@ -26632,37 +25673,33 @@ case "(($ac_try" in
26632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26633 *) ac_try_echo=$ac_try;; 25674 *) ac_try_echo=$ac_try;;
26634esac 25675esac
26635eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26636$as_echo "$ac_try_echo") >&5
26637 (eval "$ac_link") 2>conftest.er1 25677 (eval "$ac_link") 2>conftest.er1
26638 ac_status=$? 25678 ac_status=$?
26639 grep -v '^ *+' conftest.er1 >conftest.err 25679 grep -v '^ *+' conftest.er1 >conftest.err
26640 rm -f conftest.er1 25680 rm -f conftest.er1
26641 cat conftest.err >&5 25681 cat conftest.err >&5
26642 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26643 (exit $ac_status); } && { 25683 (exit $ac_status); } && {
26644 test -z "$ac_c_werror_flag" || 25684 test -z "$ac_c_werror_flag" ||
26645 test ! -s conftest.err 25685 test ! -s conftest.err
26646 } && test -s conftest$ac_exeext && { 25686 } && test -s conftest$ac_exeext &&
26647 test "$cross_compiling" = yes || 25687 $as_test_x conftest$ac_exeext; then
26648 $as_test_x conftest$ac_exeext
26649 }; then
26650 ac_cv_libc_defines_sys_nerr="yes" 25688 ac_cv_libc_defines_sys_nerr="yes"
26651else 25689else
26652 $as_echo "$as_me: failed program was:" >&5 25690 echo "$as_me: failed program was:" >&5
26653sed 's/^/| /' conftest.$ac_ext >&5 25691sed 's/^/| /' conftest.$ac_ext >&5
26654 25692
26655 ac_cv_libc_defines_sys_nerr="no" 25693 ac_cv_libc_defines_sys_nerr="no"
26656 25694
26657fi 25695fi
26658 25696
26659rm -rf conftest.dSYM
26660rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25697rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26661 conftest$ac_exeext conftest.$ac_ext 25698 conftest$ac_exeext conftest.$ac_ext
26662 25699
26663fi 25700fi
26664{ $as_echo "$as_me:$LINENO: result: $ac_cv_libc_defines_sys_nerr" >&5 25701{ echo "$as_me:$LINENO: result: $ac_cv_libc_defines_sys_nerr" >&5
26665$as_echo "$ac_cv_libc_defines_sys_nerr" >&6; } 25702echo "${ECHO_T}$ac_cv_libc_defines_sys_nerr" >&6; }
26666if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then 25703if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
26667 25704
26668cat >>confdefs.h <<\_ACEOF 25705cat >>confdefs.h <<\_ACEOF
@@ -26671,354 +25708,11 @@ _ACEOF
26671 25708
26672fi 25709fi
26673 25710
26674SCARD_MSG="no"
26675# Check whether user wants sectok support
26676
26677# Check whether --with-sectok was given.
26678if test "${with_sectok+set}" = set; then
26679 withval=$with_sectok;
26680 if test "x$withval" != "xno" ; then
26681 if test "x$withval" != "xyes" ; then
26682 CPPFLAGS="$CPPFLAGS -I${withval}"
26683 LDFLAGS="$LDFLAGS -L${withval}"
26684 if test ! -z "$need_dash_r" ; then
26685 LDFLAGS="$LDFLAGS -R${withval}"
26686 fi
26687 if test ! -z "$blibpath" ; then
26688 blibpath="$blibpath:${withval}"
26689 fi
26690 fi
26691
26692for ac_header in sectok.h
26693do
26694as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
26695if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
26696 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
26697$as_echo_n "checking for $ac_header... " >&6; }
26698if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
26699 $as_echo_n "(cached) " >&6
26700fi
26701ac_res=`eval 'as_val=${'$as_ac_Header'}
26702 $as_echo "$as_val"'`
26703 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
26704$as_echo "$ac_res" >&6; }
26705else
26706 # Is the header compilable?
26707{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
26708$as_echo_n "checking $ac_header usability... " >&6; }
26709cat >conftest.$ac_ext <<_ACEOF
26710/* confdefs.h. */
26711_ACEOF
26712cat confdefs.h >>conftest.$ac_ext
26713cat >>conftest.$ac_ext <<_ACEOF
26714/* end confdefs.h. */
26715$ac_includes_default
26716#include <$ac_header>
26717_ACEOF
26718rm -f conftest.$ac_objext
26719if { (ac_try="$ac_compile"
26720case "(($ac_try" in
26721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26722 *) ac_try_echo=$ac_try;;
26723esac
26724eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26725$as_echo "$ac_try_echo") >&5
26726 (eval "$ac_compile") 2>conftest.er1
26727 ac_status=$?
26728 grep -v '^ *+' conftest.er1 >conftest.err
26729 rm -f conftest.er1
26730 cat conftest.err >&5
26731 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26732 (exit $ac_status); } && {
26733 test -z "$ac_c_werror_flag" ||
26734 test ! -s conftest.err
26735 } && test -s conftest.$ac_objext; then
26736 ac_header_compiler=yes
26737else
26738 $as_echo "$as_me: failed program was:" >&5
26739sed 's/^/| /' conftest.$ac_ext >&5
26740
26741 ac_header_compiler=no
26742fi
26743
26744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26745{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26746$as_echo "$ac_header_compiler" >&6; }
26747
26748# Is the header present?
26749{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
26750$as_echo_n "checking $ac_header presence... " >&6; }
26751cat >conftest.$ac_ext <<_ACEOF
26752/* confdefs.h. */
26753_ACEOF
26754cat confdefs.h >>conftest.$ac_ext
26755cat >>conftest.$ac_ext <<_ACEOF
26756/* end confdefs.h. */
26757#include <$ac_header>
26758_ACEOF
26759if { (ac_try="$ac_cpp conftest.$ac_ext"
26760case "(($ac_try" in
26761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26762 *) ac_try_echo=$ac_try;;
26763esac
26764eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26765$as_echo "$ac_try_echo") >&5
26766 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
26767 ac_status=$?
26768 grep -v '^ *+' conftest.er1 >conftest.err
26769 rm -f conftest.er1
26770 cat conftest.err >&5
26771 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26772 (exit $ac_status); } >/dev/null && {
26773 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26774 test ! -s conftest.err
26775 }; then
26776 ac_header_preproc=yes
26777else
26778 $as_echo "$as_me: failed program was:" >&5
26779sed 's/^/| /' conftest.$ac_ext >&5
26780
26781 ac_header_preproc=no
26782fi
26783
26784rm -f conftest.err conftest.$ac_ext
26785{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26786$as_echo "$ac_header_preproc" >&6; }
26787
26788# So? What about this header?
26789case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26790 yes:no: )
26791 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26792$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26793 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26794$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26795 ac_header_preproc=yes
26796 ;;
26797 no:yes:* )
26798 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26799$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26800 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
26801$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
26802 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26803$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26804 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
26805$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
26806 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26807$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26808 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26809$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26810 ( cat <<\_ASBOX
26811## ------------------------------------------- ##
26812## Report this to openssh-unix-dev@mindrot.org ##
26813## ------------------------------------------- ##
26814_ASBOX
26815 ) | sed "s/^/$as_me: WARNING: /" >&2
26816 ;;
26817esac
26818{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
26819$as_echo_n "checking for $ac_header... " >&6; }
26820if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
26821 $as_echo_n "(cached) " >&6
26822else
26823 eval "$as_ac_Header=\$ac_header_preproc"
26824fi
26825ac_res=`eval 'as_val=${'$as_ac_Header'}
26826 $as_echo "$as_val"'`
26827 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
26828$as_echo "$ac_res" >&6; }
26829
26830fi
26831if test `eval 'as_val=${'$as_ac_Header'}
26832 $as_echo "$as_val"'` = yes; then
26833 cat >>confdefs.h <<_ACEOF
26834#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
26835_ACEOF
26836
26837fi
26838
26839done
26840
26841 if test "$ac_cv_header_sectok_h" != yes; then
26842 { { $as_echo "$as_me:$LINENO: error: Can't find sectok.h" >&5
26843$as_echo "$as_me: error: Can't find sectok.h" >&2;}
26844 { (exit 1); exit 1; }; }
26845 fi
26846
26847{ $as_echo "$as_me:$LINENO: checking for sectok_open in -lsectok" >&5
26848$as_echo_n "checking for sectok_open in -lsectok... " >&6; }
26849if test "${ac_cv_lib_sectok_sectok_open+set}" = set; then
26850 $as_echo_n "(cached) " >&6
26851else
26852 ac_check_lib_save_LIBS=$LIBS
26853LIBS="-lsectok $LIBS"
26854cat >conftest.$ac_ext <<_ACEOF
26855/* confdefs.h. */
26856_ACEOF
26857cat confdefs.h >>conftest.$ac_ext
26858cat >>conftest.$ac_ext <<_ACEOF
26859/* end confdefs.h. */
26860
26861/* Override any GCC internal prototype to avoid an error.
26862 Use char because int might match the return type of a GCC
26863 builtin and then its argument prototype would still apply. */
26864#ifdef __cplusplus
26865extern "C"
26866#endif
26867char sectok_open ();
26868int
26869main ()
26870{
26871return sectok_open ();
26872 ;
26873 return 0;
26874}
26875_ACEOF
26876rm -f conftest.$ac_objext conftest$ac_exeext
26877if { (ac_try="$ac_link"
26878case "(($ac_try" in
26879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26880 *) ac_try_echo=$ac_try;;
26881esac
26882eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26883$as_echo "$ac_try_echo") >&5
26884 (eval "$ac_link") 2>conftest.er1
26885 ac_status=$?
26886 grep -v '^ *+' conftest.er1 >conftest.err
26887 rm -f conftest.er1
26888 cat conftest.err >&5
26889 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26890 (exit $ac_status); } && {
26891 test -z "$ac_c_werror_flag" ||
26892 test ! -s conftest.err
26893 } && test -s conftest$ac_exeext && {
26894 test "$cross_compiling" = yes ||
26895 $as_test_x conftest$ac_exeext
26896 }; then
26897 ac_cv_lib_sectok_sectok_open=yes
26898else
26899 $as_echo "$as_me: failed program was:" >&5
26900sed 's/^/| /' conftest.$ac_ext >&5
26901
26902 ac_cv_lib_sectok_sectok_open=no
26903fi
26904
26905rm -rf conftest.dSYM
26906rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26907 conftest$ac_exeext conftest.$ac_ext
26908LIBS=$ac_check_lib_save_LIBS
26909fi
26910{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sectok_sectok_open" >&5
26911$as_echo "$ac_cv_lib_sectok_sectok_open" >&6; }
26912if test $ac_cv_lib_sectok_sectok_open = yes; then
26913 cat >>confdefs.h <<_ACEOF
26914#define HAVE_LIBSECTOK 1
26915_ACEOF
26916
26917 LIBS="-lsectok $LIBS"
26918
26919fi
26920
26921 if test "$ac_cv_lib_sectok_sectok_open" != yes; then
26922 { { $as_echo "$as_me:$LINENO: error: Can't find libsectok" >&5
26923$as_echo "$as_me: error: Can't find libsectok" >&2;}
26924 { (exit 1); exit 1; }; }
26925 fi
26926
26927cat >>confdefs.h <<\_ACEOF
26928#define SMARTCARD 1
26929_ACEOF
26930
26931
26932cat >>confdefs.h <<\_ACEOF
26933#define USE_SECTOK 1
26934_ACEOF
26935
26936 SCARD_MSG="yes, using sectok"
26937 fi
26938
26939
26940fi
26941
26942
26943# Check whether user wants OpenSC support
26944OPENSC_CONFIG="no"
26945
26946# Check whether --with-opensc was given.
26947if test "${with_opensc+set}" = set; then
26948 withval=$with_opensc;
26949 if test "x$withval" != "xno" ; then
26950 if test "x$withval" != "xyes" ; then
26951 OPENSC_CONFIG=$withval/bin/opensc-config
26952 else
26953 # Extract the first word of "opensc-config", so it can be a program name with args.
26954set dummy opensc-config; ac_word=$2
26955{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
26956$as_echo_n "checking for $ac_word... " >&6; }
26957if test "${ac_cv_path_OPENSC_CONFIG+set}" = set; then
26958 $as_echo_n "(cached) " >&6
26959else
26960 case $OPENSC_CONFIG in
26961 [\\/]* | ?:[\\/]*)
26962 ac_cv_path_OPENSC_CONFIG="$OPENSC_CONFIG" # Let the user override the test with a path.
26963 ;;
26964 *)
26965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26966for as_dir in $PATH
26967do
26968 IFS=$as_save_IFS
26969 test -z "$as_dir" && as_dir=.
26970 for ac_exec_ext in '' $ac_executable_extensions; do
26971 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26972 ac_cv_path_OPENSC_CONFIG="$as_dir/$ac_word$ac_exec_ext"
26973 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26974 break 2
26975 fi
26976done
26977done
26978IFS=$as_save_IFS
26979
26980 test -z "$ac_cv_path_OPENSC_CONFIG" && ac_cv_path_OPENSC_CONFIG="no"
26981 ;;
26982esac
26983fi
26984OPENSC_CONFIG=$ac_cv_path_OPENSC_CONFIG
26985if test -n "$OPENSC_CONFIG"; then
26986 { $as_echo "$as_me:$LINENO: result: $OPENSC_CONFIG" >&5
26987$as_echo "$OPENSC_CONFIG" >&6; }
26988else
26989 { $as_echo "$as_me:$LINENO: result: no" >&5
26990$as_echo "no" >&6; }
26991fi
26992
26993
26994 fi
26995 if test "$OPENSC_CONFIG" != "no"; then
26996 LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags`
26997 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs`
26998 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
26999 LIBS="$LIBS $LIBOPENSC_LIBS"
27000 cat >>confdefs.h <<\_ACEOF
27001#define SMARTCARD 1
27002_ACEOF
27003
27004
27005cat >>confdefs.h <<\_ACEOF
27006#define USE_OPENSC 1
27007_ACEOF
27008
27009 SCARD_MSG="yes, using OpenSC"
27010 fi
27011 fi
27012
27013
27014fi
27015
27016
27017# Check libraries needed by DNS fingerprint support 25711# Check libraries needed by DNS fingerprint support
27018{ $as_echo "$as_me:$LINENO: checking for library containing getrrsetbyname" >&5 25712{ echo "$as_me:$LINENO: checking for library containing getrrsetbyname" >&5
27019$as_echo_n "checking for library containing getrrsetbyname... " >&6; } 25713echo $ECHO_N "checking for library containing getrrsetbyname... $ECHO_C" >&6; }
27020if test "${ac_cv_search_getrrsetbyname+set}" = set; then 25714if test "${ac_cv_search_getrrsetbyname+set}" = set; then
27021 $as_echo_n "(cached) " >&6 25715 echo $ECHO_N "(cached) $ECHO_C" >&6
27022else 25716else
27023 ac_func_search_save_LIBS=$LIBS 25717 ac_func_search_save_LIBS=$LIBS
27024cat >conftest.$ac_ext <<_ACEOF 25718cat >conftest.$ac_ext <<_ACEOF
@@ -27056,30 +25750,26 @@ case "(($ac_try" in
27056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27057 *) ac_try_echo=$ac_try;; 25751 *) ac_try_echo=$ac_try;;
27058esac 25752esac
27059eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27060$as_echo "$ac_try_echo") >&5
27061 (eval "$ac_link") 2>conftest.er1 25754 (eval "$ac_link") 2>conftest.er1
27062 ac_status=$? 25755 ac_status=$?
27063 grep -v '^ *+' conftest.er1 >conftest.err 25756 grep -v '^ *+' conftest.er1 >conftest.err
27064 rm -f conftest.er1 25757 rm -f conftest.er1
27065 cat conftest.err >&5 25758 cat conftest.err >&5
27066 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27067 (exit $ac_status); } && { 25760 (exit $ac_status); } && {
27068 test -z "$ac_c_werror_flag" || 25761 test -z "$ac_c_werror_flag" ||
27069 test ! -s conftest.err 25762 test ! -s conftest.err
27070 } && test -s conftest$ac_exeext && { 25763 } && test -s conftest$ac_exeext &&
27071 test "$cross_compiling" = yes || 25764 $as_test_x conftest$ac_exeext; then
27072 $as_test_x conftest$ac_exeext
27073 }; then
27074 ac_cv_search_getrrsetbyname=$ac_res 25765 ac_cv_search_getrrsetbyname=$ac_res
27075else 25766else
27076 $as_echo "$as_me: failed program was:" >&5 25767 echo "$as_me: failed program was:" >&5
27077sed 's/^/| /' conftest.$ac_ext >&5 25768sed 's/^/| /' conftest.$ac_ext >&5
27078 25769
27079 25770
27080fi 25771fi
27081 25772
27082rm -rf conftest.dSYM
27083rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25773rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27084 conftest$ac_exeext 25774 conftest$ac_exeext
27085 if test "${ac_cv_search_getrrsetbyname+set}" = set; then 25775 if test "${ac_cv_search_getrrsetbyname+set}" = set; then
@@ -27094,8 +25784,8 @@ fi
27094rm conftest.$ac_ext 25784rm conftest.$ac_ext
27095LIBS=$ac_func_search_save_LIBS 25785LIBS=$ac_func_search_save_LIBS
27096fi 25786fi
27097{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_getrrsetbyname" >&5 25787{ echo "$as_me:$LINENO: result: $ac_cv_search_getrrsetbyname" >&5
27098$as_echo "$ac_cv_search_getrrsetbyname" >&6; } 25788echo "${ECHO_T}$ac_cv_search_getrrsetbyname" >&6; }
27099ac_res=$ac_cv_search_getrrsetbyname 25789ac_res=$ac_cv_search_getrrsetbyname
27100if test "$ac_res" != no; then 25790if test "$ac_res" != no; then
27101 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 25791 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
@@ -27107,10 +25797,10 @@ _ACEOF
27107else 25797else
27108 25798
27109 # Needed by our getrrsetbyname() 25799 # Needed by our getrrsetbyname()
27110 { $as_echo "$as_me:$LINENO: checking for library containing res_query" >&5 25800 { echo "$as_me:$LINENO: checking for library containing res_query" >&5
27111$as_echo_n "checking for library containing res_query... " >&6; } 25801echo $ECHO_N "checking for library containing res_query... $ECHO_C" >&6; }
27112if test "${ac_cv_search_res_query+set}" = set; then 25802if test "${ac_cv_search_res_query+set}" = set; then
27113 $as_echo_n "(cached) " >&6 25803 echo $ECHO_N "(cached) $ECHO_C" >&6
27114else 25804else
27115 ac_func_search_save_LIBS=$LIBS 25805 ac_func_search_save_LIBS=$LIBS
27116cat >conftest.$ac_ext <<_ACEOF 25806cat >conftest.$ac_ext <<_ACEOF
@@ -27148,30 +25838,26 @@ case "(($ac_try" in
27148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27149 *) ac_try_echo=$ac_try;; 25839 *) ac_try_echo=$ac_try;;
27150esac 25840esac
27151eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27152$as_echo "$ac_try_echo") >&5
27153 (eval "$ac_link") 2>conftest.er1 25842 (eval "$ac_link") 2>conftest.er1
27154 ac_status=$? 25843 ac_status=$?
27155 grep -v '^ *+' conftest.er1 >conftest.err 25844 grep -v '^ *+' conftest.er1 >conftest.err
27156 rm -f conftest.er1 25845 rm -f conftest.er1
27157 cat conftest.err >&5 25846 cat conftest.err >&5
27158 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27159 (exit $ac_status); } && { 25848 (exit $ac_status); } && {
27160 test -z "$ac_c_werror_flag" || 25849 test -z "$ac_c_werror_flag" ||
27161 test ! -s conftest.err 25850 test ! -s conftest.err
27162 } && test -s conftest$ac_exeext && { 25851 } && test -s conftest$ac_exeext &&
27163 test "$cross_compiling" = yes || 25852 $as_test_x conftest$ac_exeext; then
27164 $as_test_x conftest$ac_exeext
27165 }; then
27166 ac_cv_search_res_query=$ac_res 25853 ac_cv_search_res_query=$ac_res
27167else 25854else
27168 $as_echo "$as_me: failed program was:" >&5 25855 echo "$as_me: failed program was:" >&5
27169sed 's/^/| /' conftest.$ac_ext >&5 25856sed 's/^/| /' conftest.$ac_ext >&5
27170 25857
27171 25858
27172fi 25859fi
27173 25860
27174rm -rf conftest.dSYM
27175rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25861rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27176 conftest$ac_exeext 25862 conftest$ac_exeext
27177 if test "${ac_cv_search_res_query+set}" = set; then 25863 if test "${ac_cv_search_res_query+set}" = set; then
@@ -27186,18 +25872,18 @@ fi
27186rm conftest.$ac_ext 25872rm conftest.$ac_ext
27187LIBS=$ac_func_search_save_LIBS 25873LIBS=$ac_func_search_save_LIBS
27188fi 25874fi
27189{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_res_query" >&5 25875{ echo "$as_me:$LINENO: result: $ac_cv_search_res_query" >&5
27190$as_echo "$ac_cv_search_res_query" >&6; } 25876echo "${ECHO_T}$ac_cv_search_res_query" >&6; }
27191ac_res=$ac_cv_search_res_query 25877ac_res=$ac_cv_search_res_query
27192if test "$ac_res" != no; then 25878if test "$ac_res" != no; then
27193 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 25879 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27194 25880
27195fi 25881fi
27196 25882
27197 { $as_echo "$as_me:$LINENO: checking for library containing dn_expand" >&5 25883 { echo "$as_me:$LINENO: checking for library containing dn_expand" >&5
27198$as_echo_n "checking for library containing dn_expand... " >&6; } 25884echo $ECHO_N "checking for library containing dn_expand... $ECHO_C" >&6; }
27199if test "${ac_cv_search_dn_expand+set}" = set; then 25885if test "${ac_cv_search_dn_expand+set}" = set; then
27200 $as_echo_n "(cached) " >&6 25886 echo $ECHO_N "(cached) $ECHO_C" >&6
27201else 25887else
27202 ac_func_search_save_LIBS=$LIBS 25888 ac_func_search_save_LIBS=$LIBS
27203cat >conftest.$ac_ext <<_ACEOF 25889cat >conftest.$ac_ext <<_ACEOF
@@ -27235,30 +25921,26 @@ case "(($ac_try" in
27235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27236 *) ac_try_echo=$ac_try;; 25922 *) ac_try_echo=$ac_try;;
27237esac 25923esac
27238eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27239$as_echo "$ac_try_echo") >&5
27240 (eval "$ac_link") 2>conftest.er1 25925 (eval "$ac_link") 2>conftest.er1
27241 ac_status=$? 25926 ac_status=$?
27242 grep -v '^ *+' conftest.er1 >conftest.err 25927 grep -v '^ *+' conftest.er1 >conftest.err
27243 rm -f conftest.er1 25928 rm -f conftest.er1
27244 cat conftest.err >&5 25929 cat conftest.err >&5
27245 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27246 (exit $ac_status); } && { 25931 (exit $ac_status); } && {
27247 test -z "$ac_c_werror_flag" || 25932 test -z "$ac_c_werror_flag" ||
27248 test ! -s conftest.err 25933 test ! -s conftest.err
27249 } && test -s conftest$ac_exeext && { 25934 } && test -s conftest$ac_exeext &&
27250 test "$cross_compiling" = yes || 25935 $as_test_x conftest$ac_exeext; then
27251 $as_test_x conftest$ac_exeext
27252 }; then
27253 ac_cv_search_dn_expand=$ac_res 25936 ac_cv_search_dn_expand=$ac_res
27254else 25937else
27255 $as_echo "$as_me: failed program was:" >&5 25938 echo "$as_me: failed program was:" >&5
27256sed 's/^/| /' conftest.$ac_ext >&5 25939sed 's/^/| /' conftest.$ac_ext >&5
27257 25940
27258 25941
27259fi 25942fi
27260 25943
27261rm -rf conftest.dSYM
27262rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25944rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27263 conftest$ac_exeext 25945 conftest$ac_exeext
27264 if test "${ac_cv_search_dn_expand+set}" = set; then 25946 if test "${ac_cv_search_dn_expand+set}" = set; then
@@ -27273,16 +25955,16 @@ fi
27273rm conftest.$ac_ext 25955rm conftest.$ac_ext
27274LIBS=$ac_func_search_save_LIBS 25956LIBS=$ac_func_search_save_LIBS
27275fi 25957fi
27276{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_dn_expand" >&5 25958{ echo "$as_me:$LINENO: result: $ac_cv_search_dn_expand" >&5
27277$as_echo "$ac_cv_search_dn_expand" >&6; } 25959echo "${ECHO_T}$ac_cv_search_dn_expand" >&6; }
27278ac_res=$ac_cv_search_dn_expand 25960ac_res=$ac_cv_search_dn_expand
27279if test "$ac_res" != no; then 25961if test "$ac_res" != no; then
27280 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 25962 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27281 25963
27282fi 25964fi
27283 25965
27284 { $as_echo "$as_me:$LINENO: checking if res_query will link" >&5 25966 { echo "$as_me:$LINENO: checking if res_query will link" >&5
27285$as_echo_n "checking if res_query will link... " >&6; } 25967echo $ECHO_N "checking if res_query will link... $ECHO_C" >&6; }
27286 cat >conftest.$ac_ext <<_ACEOF 25968 cat >conftest.$ac_ext <<_ACEOF
27287 25969
27288#include "confdefs.h" 25970#include "confdefs.h"
@@ -27304,33 +25986,30 @@ case "(($ac_try" in
27304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27305 *) ac_try_echo=$ac_try;; 25987 *) ac_try_echo=$ac_try;;
27306esac 25988esac
27307eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27308$as_echo "$ac_try_echo") >&5
27309 (eval "$ac_link") 2>conftest.er1 25990 (eval "$ac_link") 2>conftest.er1
27310 ac_status=$? 25991 ac_status=$?
27311 grep -v '^ *+' conftest.er1 >conftest.err 25992 grep -v '^ *+' conftest.er1 >conftest.err
27312 rm -f conftest.er1 25993 rm -f conftest.er1
27313 cat conftest.err >&5 25994 cat conftest.err >&5
27314 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27315 (exit $ac_status); } && { 25996 (exit $ac_status); } && {
27316 test -z "$ac_c_werror_flag" || 25997 test -z "$ac_c_werror_flag" ||
27317 test ! -s conftest.err 25998 test ! -s conftest.err
27318 } && test -s conftest$ac_exeext && { 25999 } && test -s conftest$ac_exeext &&
27319 test "$cross_compiling" = yes || 26000 $as_test_x conftest$ac_exeext; then
27320 $as_test_x conftest$ac_exeext 26001 { echo "$as_me:$LINENO: result: yes" >&5
27321 }; then 26002echo "${ECHO_T}yes" >&6; }
27322 { $as_echo "$as_me:$LINENO: result: yes" >&5
27323$as_echo "yes" >&6; }
27324else 26003else
27325 $as_echo "$as_me: failed program was:" >&5 26004 echo "$as_me: failed program was:" >&5
27326sed 's/^/| /' conftest.$ac_ext >&5 26005sed 's/^/| /' conftest.$ac_ext >&5
27327 26006
27328 { $as_echo "$as_me:$LINENO: result: no" >&5 26007 { echo "$as_me:$LINENO: result: no" >&5
27329$as_echo "no" >&6; } 26008echo "${ECHO_T}no" >&6; }
27330 saved_LIBS="$LIBS" 26009 saved_LIBS="$LIBS"
27331 LIBS="$LIBS -lresolv" 26010 LIBS="$LIBS -lresolv"
27332 { $as_echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5 26011 { echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5
27333$as_echo_n "checking for res_query in -lresolv... " >&6; } 26012echo $ECHO_N "checking for res_query in -lresolv... $ECHO_C" >&6; }
27334 cat >conftest.$ac_ext <<_ACEOF 26013 cat >conftest.$ac_ext <<_ACEOF
27335 26014
27336#include "confdefs.h" 26015#include "confdefs.h"
@@ -27352,50 +26031,45 @@ case "(($ac_try" in
27352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27353 *) ac_try_echo=$ac_try;; 26032 *) ac_try_echo=$ac_try;;
27354esac 26033esac
27355eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27356$as_echo "$ac_try_echo") >&5
27357 (eval "$ac_link") 2>conftest.er1 26035 (eval "$ac_link") 2>conftest.er1
27358 ac_status=$? 26036 ac_status=$?
27359 grep -v '^ *+' conftest.er1 >conftest.err 26037 grep -v '^ *+' conftest.er1 >conftest.err
27360 rm -f conftest.er1 26038 rm -f conftest.er1
27361 cat conftest.err >&5 26039 cat conftest.err >&5
27362 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27363 (exit $ac_status); } && { 26041 (exit $ac_status); } && {
27364 test -z "$ac_c_werror_flag" || 26042 test -z "$ac_c_werror_flag" ||
27365 test ! -s conftest.err 26043 test ! -s conftest.err
27366 } && test -s conftest$ac_exeext && { 26044 } && test -s conftest$ac_exeext &&
27367 test "$cross_compiling" = yes || 26045 $as_test_x conftest$ac_exeext; then
27368 $as_test_x conftest$ac_exeext 26046 { echo "$as_me:$LINENO: result: yes" >&5
27369 }; then 26047echo "${ECHO_T}yes" >&6; }
27370 { $as_echo "$as_me:$LINENO: result: yes" >&5
27371$as_echo "yes" >&6; }
27372else 26048else
27373 $as_echo "$as_me: failed program was:" >&5 26049 echo "$as_me: failed program was:" >&5
27374sed 's/^/| /' conftest.$ac_ext >&5 26050sed 's/^/| /' conftest.$ac_ext >&5
27375 26051
27376 LIBS="$saved_LIBS" 26052 LIBS="$saved_LIBS"
27377 { $as_echo "$as_me:$LINENO: result: no" >&5 26053 { echo "$as_me:$LINENO: result: no" >&5
27378$as_echo "no" >&6; } 26054echo "${ECHO_T}no" >&6; }
27379fi 26055fi
27380 26056
27381rm -rf conftest.dSYM
27382rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 26057rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27383 conftest$ac_exeext conftest.$ac_ext 26058 conftest$ac_exeext conftest.$ac_ext
27384 26059
27385fi 26060fi
27386 26061
27387rm -rf conftest.dSYM
27388rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 26062rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27389 conftest$ac_exeext conftest.$ac_ext 26063 conftest$ac_exeext conftest.$ac_ext
27390 26064
27391 26065
27392for ac_func in _getshort _getlong 26066for ac_func in _getshort _getlong
27393do 26067do
27394as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 26068as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
27395{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 26069{ echo "$as_me:$LINENO: checking for $ac_func" >&5
27396$as_echo_n "checking for $ac_func... " >&6; } 26070echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
27397if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 26071if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
27398 $as_echo_n "(cached) " >&6 26072 echo $ECHO_N "(cached) $ECHO_C" >&6
27399else 26073else
27400 cat >conftest.$ac_ext <<_ACEOF 26074 cat >conftest.$ac_ext <<_ACEOF
27401/* confdefs.h. */ 26075/* confdefs.h. */
@@ -27448,50 +26122,44 @@ case "(($ac_try" in
27448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27449 *) ac_try_echo=$ac_try;; 26123 *) ac_try_echo=$ac_try;;
27450esac 26124esac
27451eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27452$as_echo "$ac_try_echo") >&5
27453 (eval "$ac_link") 2>conftest.er1 26126 (eval "$ac_link") 2>conftest.er1
27454 ac_status=$? 26127 ac_status=$?
27455 grep -v '^ *+' conftest.er1 >conftest.err 26128 grep -v '^ *+' conftest.er1 >conftest.err
27456 rm -f conftest.er1 26129 rm -f conftest.er1
27457 cat conftest.err >&5 26130 cat conftest.err >&5
27458 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27459 (exit $ac_status); } && { 26132 (exit $ac_status); } && {
27460 test -z "$ac_c_werror_flag" || 26133 test -z "$ac_c_werror_flag" ||
27461 test ! -s conftest.err 26134 test ! -s conftest.err
27462 } && test -s conftest$ac_exeext && { 26135 } && test -s conftest$ac_exeext &&
27463 test "$cross_compiling" = yes || 26136 $as_test_x conftest$ac_exeext; then
27464 $as_test_x conftest$ac_exeext
27465 }; then
27466 eval "$as_ac_var=yes" 26137 eval "$as_ac_var=yes"
27467else 26138else
27468 $as_echo "$as_me: failed program was:" >&5 26139 echo "$as_me: failed program was:" >&5
27469sed 's/^/| /' conftest.$ac_ext >&5 26140sed 's/^/| /' conftest.$ac_ext >&5
27470 26141
27471 eval "$as_ac_var=no" 26142 eval "$as_ac_var=no"
27472fi 26143fi
27473 26144
27474rm -rf conftest.dSYM
27475rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 26145rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27476 conftest$ac_exeext conftest.$ac_ext 26146 conftest$ac_exeext conftest.$ac_ext
27477fi 26147fi
27478ac_res=`eval 'as_val=${'$as_ac_var'} 26148ac_res=`eval echo '${'$as_ac_var'}'`
27479 $as_echo "$as_val"'` 26149 { echo "$as_me:$LINENO: result: $ac_res" >&5
27480 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 26150echo "${ECHO_T}$ac_res" >&6; }
27481$as_echo "$ac_res" >&6; } 26151if test `eval echo '${'$as_ac_var'}'` = yes; then
27482if test `eval 'as_val=${'$as_ac_var'}
27483 $as_echo "$as_val"'` = yes; then
27484 cat >>confdefs.h <<_ACEOF 26152 cat >>confdefs.h <<_ACEOF
27485#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 26153#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
27486_ACEOF 26154_ACEOF
27487 26155
27488fi 26156fi
27489done 26157done
27490 26158
27491 { $as_echo "$as_me:$LINENO: checking whether _getshort is declared" >&5 26159 { echo "$as_me:$LINENO: checking whether _getshort is declared" >&5
27492$as_echo_n "checking whether _getshort is declared... " >&6; } 26160echo $ECHO_N "checking whether _getshort is declared... $ECHO_C" >&6; }
27493if test "${ac_cv_have_decl__getshort+set}" = set; then 26161if test "${ac_cv_have_decl__getshort+set}" = set; then
27494 $as_echo_n "(cached) " >&6 26162 echo $ECHO_N "(cached) $ECHO_C" >&6
27495else 26163else
27496 cat >conftest.$ac_ext <<_ACEOF 26164 cat >conftest.$ac_ext <<_ACEOF
27497/* confdefs.h. */ 26165/* confdefs.h. */
@@ -27519,21 +26187,20 @@ case "(($ac_try" in
27519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27520 *) ac_try_echo=$ac_try;; 26188 *) ac_try_echo=$ac_try;;
27521esac 26189esac
27522eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27523$as_echo "$ac_try_echo") >&5
27524 (eval "$ac_compile") 2>conftest.er1 26191 (eval "$ac_compile") 2>conftest.er1
27525 ac_status=$? 26192 ac_status=$?
27526 grep -v '^ *+' conftest.er1 >conftest.err 26193 grep -v '^ *+' conftest.er1 >conftest.err
27527 rm -f conftest.er1 26194 rm -f conftest.er1
27528 cat conftest.err >&5 26195 cat conftest.err >&5
27529 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27530 (exit $ac_status); } && { 26197 (exit $ac_status); } && {
27531 test -z "$ac_c_werror_flag" || 26198 test -z "$ac_c_werror_flag" ||
27532 test ! -s conftest.err 26199 test ! -s conftest.err
27533 } && test -s conftest.$ac_objext; then 26200 } && test -s conftest.$ac_objext; then
27534 ac_cv_have_decl__getshort=yes 26201 ac_cv_have_decl__getshort=yes
27535else 26202else
27536 $as_echo "$as_me: failed program was:" >&5 26203 echo "$as_me: failed program was:" >&5
27537sed 's/^/| /' conftest.$ac_ext >&5 26204sed 's/^/| /' conftest.$ac_ext >&5
27538 26205
27539 ac_cv_have_decl__getshort=no 26206 ac_cv_have_decl__getshort=no
@@ -27541,8 +26208,8 @@ fi
27541 26208
27542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 26209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27543fi 26210fi
27544{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl__getshort" >&5 26211{ echo "$as_me:$LINENO: result: $ac_cv_have_decl__getshort" >&5
27545$as_echo "$ac_cv_have_decl__getshort" >&6; } 26212echo "${ECHO_T}$ac_cv_have_decl__getshort" >&6; }
27546if test $ac_cv_have_decl__getshort = yes; then 26213if test $ac_cv_have_decl__getshort = yes; then
27547 26214
27548cat >>confdefs.h <<_ACEOF 26215cat >>confdefs.h <<_ACEOF
@@ -27557,10 +26224,10 @@ _ACEOF
27557 26224
27558 26225
27559fi 26226fi
27560{ $as_echo "$as_me:$LINENO: checking whether _getlong is declared" >&5 26227{ echo "$as_me:$LINENO: checking whether _getlong is declared" >&5
27561$as_echo_n "checking whether _getlong is declared... " >&6; } 26228echo $ECHO_N "checking whether _getlong is declared... $ECHO_C" >&6; }
27562if test "${ac_cv_have_decl__getlong+set}" = set; then 26229if test "${ac_cv_have_decl__getlong+set}" = set; then
27563 $as_echo_n "(cached) " >&6 26230 echo $ECHO_N "(cached) $ECHO_C" >&6
27564else 26231else
27565 cat >conftest.$ac_ext <<_ACEOF 26232 cat >conftest.$ac_ext <<_ACEOF
27566/* confdefs.h. */ 26233/* confdefs.h. */
@@ -27588,21 +26255,20 @@ case "(($ac_try" in
27588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27589 *) ac_try_echo=$ac_try;; 26256 *) ac_try_echo=$ac_try;;
27590esac 26257esac
27591eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27592$as_echo "$ac_try_echo") >&5
27593 (eval "$ac_compile") 2>conftest.er1 26259 (eval "$ac_compile") 2>conftest.er1
27594 ac_status=$? 26260 ac_status=$?
27595 grep -v '^ *+' conftest.er1 >conftest.err 26261 grep -v '^ *+' conftest.er1 >conftest.err
27596 rm -f conftest.er1 26262 rm -f conftest.er1
27597 cat conftest.err >&5 26263 cat conftest.err >&5
27598 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27599 (exit $ac_status); } && { 26265 (exit $ac_status); } && {
27600 test -z "$ac_c_werror_flag" || 26266 test -z "$ac_c_werror_flag" ||
27601 test ! -s conftest.err 26267 test ! -s conftest.err
27602 } && test -s conftest.$ac_objext; then 26268 } && test -s conftest.$ac_objext; then
27603 ac_cv_have_decl__getlong=yes 26269 ac_cv_have_decl__getlong=yes
27604else 26270else
27605 $as_echo "$as_me: failed program was:" >&5 26271 echo "$as_me: failed program was:" >&5
27606sed 's/^/| /' conftest.$ac_ext >&5 26272sed 's/^/| /' conftest.$ac_ext >&5
27607 26273
27608 ac_cv_have_decl__getlong=no 26274 ac_cv_have_decl__getlong=no
@@ -27610,8 +26276,8 @@ fi
27610 26276
27611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 26277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27612fi 26278fi
27613{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl__getlong" >&5 26279{ echo "$as_me:$LINENO: result: $ac_cv_have_decl__getlong" >&5
27614$as_echo "$ac_cv_have_decl__getlong" >&6; } 26280echo "${ECHO_T}$ac_cv_have_decl__getlong" >&6; }
27615if test $ac_cv_have_decl__getlong = yes; then 26281if test $ac_cv_have_decl__getlong = yes; then
27616 26282
27617cat >>confdefs.h <<_ACEOF 26283cat >>confdefs.h <<_ACEOF
@@ -27628,10 +26294,10 @@ _ACEOF
27628fi 26294fi
27629 26295
27630 26296
27631 { $as_echo "$as_me:$LINENO: checking for HEADER.ad" >&5 26297 { echo "$as_me:$LINENO: checking for HEADER.ad" >&5
27632$as_echo_n "checking for HEADER.ad... " >&6; } 26298echo $ECHO_N "checking for HEADER.ad... $ECHO_C" >&6; }
27633if test "${ac_cv_member_HEADER_ad+set}" = set; then 26299if test "${ac_cv_member_HEADER_ad+set}" = set; then
27634 $as_echo_n "(cached) " >&6 26300 echo $ECHO_N "(cached) $ECHO_C" >&6
27635else 26301else
27636 cat >conftest.$ac_ext <<_ACEOF 26302 cat >conftest.$ac_ext <<_ACEOF
27637/* confdefs.h. */ 26303/* confdefs.h. */
@@ -27657,21 +26323,20 @@ case "(($ac_try" in
27657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27658 *) ac_try_echo=$ac_try;; 26324 *) ac_try_echo=$ac_try;;
27659esac 26325esac
27660eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27661$as_echo "$ac_try_echo") >&5
27662 (eval "$ac_compile") 2>conftest.er1 26327 (eval "$ac_compile") 2>conftest.er1
27663 ac_status=$? 26328 ac_status=$?
27664 grep -v '^ *+' conftest.er1 >conftest.err 26329 grep -v '^ *+' conftest.er1 >conftest.err
27665 rm -f conftest.er1 26330 rm -f conftest.er1
27666 cat conftest.err >&5 26331 cat conftest.err >&5
27667 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27668 (exit $ac_status); } && { 26333 (exit $ac_status); } && {
27669 test -z "$ac_c_werror_flag" || 26334 test -z "$ac_c_werror_flag" ||
27670 test ! -s conftest.err 26335 test ! -s conftest.err
27671 } && test -s conftest.$ac_objext; then 26336 } && test -s conftest.$ac_objext; then
27672 ac_cv_member_HEADER_ad=yes 26337 ac_cv_member_HEADER_ad=yes
27673else 26338else
27674 $as_echo "$as_me: failed program was:" >&5 26339 echo "$as_me: failed program was:" >&5
27675sed 's/^/| /' conftest.$ac_ext >&5 26340sed 's/^/| /' conftest.$ac_ext >&5
27676 26341
27677 cat >conftest.$ac_ext <<_ACEOF 26342 cat >conftest.$ac_ext <<_ACEOF
@@ -27698,21 +26363,20 @@ case "(($ac_try" in
27698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27699 *) ac_try_echo=$ac_try;; 26364 *) ac_try_echo=$ac_try;;
27700esac 26365esac
27701eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27702$as_echo "$ac_try_echo") >&5
27703 (eval "$ac_compile") 2>conftest.er1 26367 (eval "$ac_compile") 2>conftest.er1
27704 ac_status=$? 26368 ac_status=$?
27705 grep -v '^ *+' conftest.er1 >conftest.err 26369 grep -v '^ *+' conftest.er1 >conftest.err
27706 rm -f conftest.er1 26370 rm -f conftest.er1
27707 cat conftest.err >&5 26371 cat conftest.err >&5
27708 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27709 (exit $ac_status); } && { 26373 (exit $ac_status); } && {
27710 test -z "$ac_c_werror_flag" || 26374 test -z "$ac_c_werror_flag" ||
27711 test ! -s conftest.err 26375 test ! -s conftest.err
27712 } && test -s conftest.$ac_objext; then 26376 } && test -s conftest.$ac_objext; then
27713 ac_cv_member_HEADER_ad=yes 26377 ac_cv_member_HEADER_ad=yes
27714else 26378else
27715 $as_echo "$as_me: failed program was:" >&5 26379 echo "$as_me: failed program was:" >&5
27716sed 's/^/| /' conftest.$ac_ext >&5 26380sed 's/^/| /' conftest.$ac_ext >&5
27717 26381
27718 ac_cv_member_HEADER_ad=no 26382 ac_cv_member_HEADER_ad=no
@@ -27723,8 +26387,8 @@ fi
27723 26387
27724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 26388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27725fi 26389fi
27726{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_HEADER_ad" >&5 26390{ echo "$as_me:$LINENO: result: $ac_cv_member_HEADER_ad" >&5
27727$as_echo "$ac_cv_member_HEADER_ad" >&6; } 26391echo "${ECHO_T}$ac_cv_member_HEADER_ad" >&6; }
27728if test $ac_cv_member_HEADER_ad = yes; then 26392if test $ac_cv_member_HEADER_ad = yes; then
27729 26393
27730cat >>confdefs.h <<\_ACEOF 26394cat >>confdefs.h <<\_ACEOF
@@ -27737,8 +26401,8 @@ fi
27737fi 26401fi
27738 26402
27739 26403
27740{ $as_echo "$as_me:$LINENO: checking if struct __res_state _res is an extern" >&5 26404{ echo "$as_me:$LINENO: checking if struct __res_state _res is an extern" >&5
27741$as_echo_n "checking if struct __res_state _res is an extern... " >&6; } 26405echo $ECHO_N "checking if struct __res_state _res is an extern... $ECHO_C" >&6; }
27742cat >conftest.$ac_ext <<_ACEOF 26406cat >conftest.$ac_ext <<_ACEOF
27743 26407
27744#include <stdio.h> 26408#include <stdio.h>
@@ -27758,23 +26422,20 @@ case "(($ac_try" in
27758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27759 *) ac_try_echo=$ac_try;; 26423 *) ac_try_echo=$ac_try;;
27760esac 26424esac
27761eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27762$as_echo "$ac_try_echo") >&5
27763 (eval "$ac_link") 2>conftest.er1 26426 (eval "$ac_link") 2>conftest.er1
27764 ac_status=$? 26427 ac_status=$?
27765 grep -v '^ *+' conftest.er1 >conftest.err 26428 grep -v '^ *+' conftest.er1 >conftest.err
27766 rm -f conftest.er1 26429 rm -f conftest.er1
27767 cat conftest.err >&5 26430 cat conftest.err >&5
27768 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27769 (exit $ac_status); } && { 26432 (exit $ac_status); } && {
27770 test -z "$ac_c_werror_flag" || 26433 test -z "$ac_c_werror_flag" ||
27771 test ! -s conftest.err 26434 test ! -s conftest.err
27772 } && test -s conftest$ac_exeext && { 26435 } && test -s conftest$ac_exeext &&
27773 test "$cross_compiling" = yes || 26436 $as_test_x conftest$ac_exeext; then
27774 $as_test_x conftest$ac_exeext 26437 { echo "$as_me:$LINENO: result: yes" >&5
27775 }; then 26438echo "${ECHO_T}yes" >&6; }
27776 { $as_echo "$as_me:$LINENO: result: yes" >&5
27777$as_echo "yes" >&6; }
27778 26439
27779cat >>confdefs.h <<\_ACEOF 26440cat >>confdefs.h <<\_ACEOF
27780#define HAVE__RES_EXTERN 1 26441#define HAVE__RES_EXTERN 1
@@ -27782,15 +26443,14 @@ _ACEOF
27782 26443
27783 26444
27784else 26445else
27785 $as_echo "$as_me: failed program was:" >&5 26446 echo "$as_me: failed program was:" >&5
27786sed 's/^/| /' conftest.$ac_ext >&5 26447sed 's/^/| /' conftest.$ac_ext >&5
27787 26448
27788 { $as_echo "$as_me:$LINENO: result: no" >&5 26449 { echo "$as_me:$LINENO: result: no" >&5
27789$as_echo "no" >&6; } 26450echo "${ECHO_T}no" >&6; }
27790 26451
27791fi 26452fi
27792 26453
27793rm -rf conftest.dSYM
27794rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 26454rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27795 conftest$ac_exeext conftest.$ac_ext 26455 conftest$ac_exeext conftest.$ac_ext
27796 26456
@@ -27809,17 +26469,17 @@ _ACEOF
27809 26469
27810 SELINUX_MSG="yes" 26470 SELINUX_MSG="yes"
27811 if test "${ac_cv_header_selinux_selinux_h+set}" = set; then 26471 if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
27812 { $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5 26472 { echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5
27813$as_echo_n "checking for selinux/selinux.h... " >&6; } 26473echo $ECHO_N "checking for selinux/selinux.h... $ECHO_C" >&6; }
27814if test "${ac_cv_header_selinux_selinux_h+set}" = set; then 26474if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
27815 $as_echo_n "(cached) " >&6 26475 echo $ECHO_N "(cached) $ECHO_C" >&6
27816fi 26476fi
27817{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5 26477{ echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5
27818$as_echo "$ac_cv_header_selinux_selinux_h" >&6; } 26478echo "${ECHO_T}$ac_cv_header_selinux_selinux_h" >&6; }
27819else 26479else
27820 # Is the header compilable? 26480 # Is the header compilable?
27821{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h usability" >&5 26481{ echo "$as_me:$LINENO: checking selinux/selinux.h usability" >&5
27822$as_echo_n "checking selinux/selinux.h usability... " >&6; } 26482echo $ECHO_N "checking selinux/selinux.h usability... $ECHO_C" >&6; }
27823cat >conftest.$ac_ext <<_ACEOF 26483cat >conftest.$ac_ext <<_ACEOF
27824/* confdefs.h. */ 26484/* confdefs.h. */
27825_ACEOF 26485_ACEOF
@@ -27835,33 +26495,32 @@ case "(($ac_try" in
27835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27836 *) ac_try_echo=$ac_try;; 26496 *) ac_try_echo=$ac_try;;
27837esac 26497esac
27838eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27839$as_echo "$ac_try_echo") >&5
27840 (eval "$ac_compile") 2>conftest.er1 26499 (eval "$ac_compile") 2>conftest.er1
27841 ac_status=$? 26500 ac_status=$?
27842 grep -v '^ *+' conftest.er1 >conftest.err 26501 grep -v '^ *+' conftest.er1 >conftest.err
27843 rm -f conftest.er1 26502 rm -f conftest.er1
27844 cat conftest.err >&5 26503 cat conftest.err >&5
27845 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27846 (exit $ac_status); } && { 26505 (exit $ac_status); } && {
27847 test -z "$ac_c_werror_flag" || 26506 test -z "$ac_c_werror_flag" ||
27848 test ! -s conftest.err 26507 test ! -s conftest.err
27849 } && test -s conftest.$ac_objext; then 26508 } && test -s conftest.$ac_objext; then
27850 ac_header_compiler=yes 26509 ac_header_compiler=yes
27851else 26510else
27852 $as_echo "$as_me: failed program was:" >&5 26511 echo "$as_me: failed program was:" >&5
27853sed 's/^/| /' conftest.$ac_ext >&5 26512sed 's/^/| /' conftest.$ac_ext >&5
27854 26513
27855 ac_header_compiler=no 26514 ac_header_compiler=no
27856fi 26515fi
27857 26516
27858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 26517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27859{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 26518{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27860$as_echo "$ac_header_compiler" >&6; } 26519echo "${ECHO_T}$ac_header_compiler" >&6; }
27861 26520
27862# Is the header present? 26521# Is the header present?
27863{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h presence" >&5 26522{ echo "$as_me:$LINENO: checking selinux/selinux.h presence" >&5
27864$as_echo_n "checking selinux/selinux.h presence... " >&6; } 26523echo $ECHO_N "checking selinux/selinux.h presence... $ECHO_C" >&6; }
27865cat >conftest.$ac_ext <<_ACEOF 26524cat >conftest.$ac_ext <<_ACEOF
27866/* confdefs.h. */ 26525/* confdefs.h. */
27867_ACEOF 26526_ACEOF
@@ -27875,52 +26534,51 @@ case "(($ac_try" in
27875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27876 *) ac_try_echo=$ac_try;; 26535 *) ac_try_echo=$ac_try;;
27877esac 26536esac
27878eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27879$as_echo "$ac_try_echo") >&5
27880 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 26538 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
27881 ac_status=$? 26539 ac_status=$?
27882 grep -v '^ *+' conftest.er1 >conftest.err 26540 grep -v '^ *+' conftest.er1 >conftest.err
27883 rm -f conftest.er1 26541 rm -f conftest.er1
27884 cat conftest.err >&5 26542 cat conftest.err >&5
27885 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27886 (exit $ac_status); } >/dev/null && { 26544 (exit $ac_status); } >/dev/null && {
27887 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 26545 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
27888 test ! -s conftest.err 26546 test ! -s conftest.err
27889 }; then 26547 }; then
27890 ac_header_preproc=yes 26548 ac_header_preproc=yes
27891else 26549else
27892 $as_echo "$as_me: failed program was:" >&5 26550 echo "$as_me: failed program was:" >&5
27893sed 's/^/| /' conftest.$ac_ext >&5 26551sed 's/^/| /' conftest.$ac_ext >&5
27894 26552
27895 ac_header_preproc=no 26553 ac_header_preproc=no
27896fi 26554fi
27897 26555
27898rm -f conftest.err conftest.$ac_ext 26556rm -f conftest.err conftest.$ac_ext
27899{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 26557{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27900$as_echo "$ac_header_preproc" >&6; } 26558echo "${ECHO_T}$ac_header_preproc" >&6; }
27901 26559
27902# So? What about this header? 26560# So? What about this header?
27903case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 26561case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
27904 yes:no: ) 26562 yes:no: )
27905 { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&5 26563 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&5
27906$as_echo "$as_me: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 26564echo "$as_me: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
27907 { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&5 26565 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&5
27908$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&2;} 26566echo "$as_me: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&2;}
27909 ac_header_preproc=yes 26567 ac_header_preproc=yes
27910 ;; 26568 ;;
27911 no:yes:* ) 26569 no:yes:* )
27912 { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: present but cannot be compiled" >&5 26570 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: present but cannot be compiled" >&5
27913$as_echo "$as_me: WARNING: selinux/selinux.h: present but cannot be compiled" >&2;} 26571echo "$as_me: WARNING: selinux/selinux.h: present but cannot be compiled" >&2;}
27914 { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&5 26572 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&5
27915$as_echo "$as_me: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&2;} 26573echo "$as_me: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&2;}
27916 { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: see the Autoconf documentation" >&5 26574 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: see the Autoconf documentation" >&5
27917$as_echo "$as_me: WARNING: selinux/selinux.h: see the Autoconf documentation" >&2;} 26575echo "$as_me: WARNING: selinux/selinux.h: see the Autoconf documentation" >&2;}
27918 { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&5 26576 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&5
27919$as_echo "$as_me: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&2;} 26577echo "$as_me: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&2;}
27920 { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&5 26578 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&5
27921$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&2;} 26579echo "$as_me: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&2;}
27922 { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&5 26580 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&5
27923$as_echo "$as_me: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&2;} 26581echo "$as_me: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&2;}
27924 ( cat <<\_ASBOX 26582 ( cat <<\_ASBOX
27925## ------------------------------------------- ## 26583## ------------------------------------------- ##
27926## Report this to openssh-unix-dev@mindrot.org ## 26584## Report this to openssh-unix-dev@mindrot.org ##
@@ -27929,30 +26587,30 @@ _ASBOX
27929 ) | sed "s/^/$as_me: WARNING: /" >&2 26587 ) | sed "s/^/$as_me: WARNING: /" >&2
27930 ;; 26588 ;;
27931esac 26589esac
27932{ $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5 26590{ echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5
27933$as_echo_n "checking for selinux/selinux.h... " >&6; } 26591echo $ECHO_N "checking for selinux/selinux.h... $ECHO_C" >&6; }
27934if test "${ac_cv_header_selinux_selinux_h+set}" = set; then 26592if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
27935 $as_echo_n "(cached) " >&6 26593 echo $ECHO_N "(cached) $ECHO_C" >&6
27936else 26594else
27937 ac_cv_header_selinux_selinux_h=$ac_header_preproc 26595 ac_cv_header_selinux_selinux_h=$ac_header_preproc
27938fi 26596fi
27939{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5 26597{ echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5
27940$as_echo "$ac_cv_header_selinux_selinux_h" >&6; } 26598echo "${ECHO_T}$ac_cv_header_selinux_selinux_h" >&6; }
27941 26599
27942fi 26600fi
27943if test $ac_cv_header_selinux_selinux_h = yes; then 26601if test $ac_cv_header_selinux_selinux_h = yes; then
27944 : 26602 :
27945else 26603else
27946 { { $as_echo "$as_me:$LINENO: error: SELinux support requires selinux.h header" >&5 26604 { { echo "$as_me:$LINENO: error: SELinux support requires selinux.h header" >&5
27947$as_echo "$as_me: error: SELinux support requires selinux.h header" >&2;} 26605echo "$as_me: error: SELinux support requires selinux.h header" >&2;}
27948 { (exit 1); exit 1; }; } 26606 { (exit 1); exit 1; }; }
27949fi 26607fi
27950 26608
27951 26609
27952 { $as_echo "$as_me:$LINENO: checking for setexeccon in -lselinux" >&5 26610 { echo "$as_me:$LINENO: checking for setexeccon in -lselinux" >&5
27953$as_echo_n "checking for setexeccon in -lselinux... " >&6; } 26611echo $ECHO_N "checking for setexeccon in -lselinux... $ECHO_C" >&6; }
27954if test "${ac_cv_lib_selinux_setexeccon+set}" = set; then 26612if test "${ac_cv_lib_selinux_setexeccon+set}" = set; then
27955 $as_echo_n "(cached) " >&6 26613 echo $ECHO_N "(cached) $ECHO_C" >&6
27956else 26614else
27957 ac_check_lib_save_LIBS=$LIBS 26615 ac_check_lib_save_LIBS=$LIBS
27958LIBS="-lselinux $LIBS" 26616LIBS="-lselinux $LIBS"
@@ -27984,43 +26642,39 @@ case "(($ac_try" in
27984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27985 *) ac_try_echo=$ac_try;; 26643 *) ac_try_echo=$ac_try;;
27986esac 26644esac
27987eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27988$as_echo "$ac_try_echo") >&5
27989 (eval "$ac_link") 2>conftest.er1 26646 (eval "$ac_link") 2>conftest.er1
27990 ac_status=$? 26647 ac_status=$?
27991 grep -v '^ *+' conftest.er1 >conftest.err 26648 grep -v '^ *+' conftest.er1 >conftest.err
27992 rm -f conftest.er1 26649 rm -f conftest.er1
27993 cat conftest.err >&5 26650 cat conftest.err >&5
27994 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27995 (exit $ac_status); } && { 26652 (exit $ac_status); } && {
27996 test -z "$ac_c_werror_flag" || 26653 test -z "$ac_c_werror_flag" ||
27997 test ! -s conftest.err 26654 test ! -s conftest.err
27998 } && test -s conftest$ac_exeext && { 26655 } && test -s conftest$ac_exeext &&
27999 test "$cross_compiling" = yes || 26656 $as_test_x conftest$ac_exeext; then
28000 $as_test_x conftest$ac_exeext
28001 }; then
28002 ac_cv_lib_selinux_setexeccon=yes 26657 ac_cv_lib_selinux_setexeccon=yes
28003else 26658else
28004 $as_echo "$as_me: failed program was:" >&5 26659 echo "$as_me: failed program was:" >&5
28005sed 's/^/| /' conftest.$ac_ext >&5 26660sed 's/^/| /' conftest.$ac_ext >&5
28006 26661
28007 ac_cv_lib_selinux_setexeccon=no 26662 ac_cv_lib_selinux_setexeccon=no
28008fi 26663fi
28009 26664
28010rm -rf conftest.dSYM
28011rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 26665rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28012 conftest$ac_exeext conftest.$ac_ext 26666 conftest$ac_exeext conftest.$ac_ext
28013LIBS=$ac_check_lib_save_LIBS 26667LIBS=$ac_check_lib_save_LIBS
28014fi 26668fi
28015{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_setexeccon" >&5 26669{ echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_setexeccon" >&5
28016$as_echo "$ac_cv_lib_selinux_setexeccon" >&6; } 26670echo "${ECHO_T}$ac_cv_lib_selinux_setexeccon" >&6; }
28017if test $ac_cv_lib_selinux_setexeccon = yes; then 26671if test $ac_cv_lib_selinux_setexeccon = yes; then
28018 LIBSELINUX="-lselinux" 26672 LIBSELINUX="-lselinux"
28019 LIBS="$LIBS -lselinux" 26673 LIBS="$LIBS -lselinux"
28020 26674
28021else 26675else
28022 { { $as_echo "$as_me:$LINENO: error: SELinux support requires libselinux library" >&5 26676 { { echo "$as_me:$LINENO: error: SELinux support requires libselinux library" >&5
28023$as_echo "$as_me: error: SELinux support requires libselinux library" >&2;} 26677echo "$as_me: error: SELinux support requires libselinux library" >&2;}
28024 { (exit 1); exit 1; }; } 26678 { (exit 1); exit 1; }; }
28025fi 26679fi
28026 26680
@@ -28029,11 +26683,11 @@ fi
28029 26683
28030for ac_func in getseuserbyname get_default_context_with_level 26684for ac_func in getseuserbyname get_default_context_with_level
28031do 26685do
28032as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 26686as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
28033{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 26687{ echo "$as_me:$LINENO: checking for $ac_func" >&5
28034$as_echo_n "checking for $ac_func... " >&6; } 26688echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
28035if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 26689if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
28036 $as_echo_n "(cached) " >&6 26690 echo $ECHO_N "(cached) $ECHO_C" >&6
28037else 26691else
28038 cat >conftest.$ac_ext <<_ACEOF 26692 cat >conftest.$ac_ext <<_ACEOF
28039/* confdefs.h. */ 26693/* confdefs.h. */
@@ -28086,41 +26740,35 @@ case "(($ac_try" in
28086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28087 *) ac_try_echo=$ac_try;; 26741 *) ac_try_echo=$ac_try;;
28088esac 26742esac
28089eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28090$as_echo "$ac_try_echo") >&5
28091 (eval "$ac_link") 2>conftest.er1 26744 (eval "$ac_link") 2>conftest.er1
28092 ac_status=$? 26745 ac_status=$?
28093 grep -v '^ *+' conftest.er1 >conftest.err 26746 grep -v '^ *+' conftest.er1 >conftest.err
28094 rm -f conftest.er1 26747 rm -f conftest.er1
28095 cat conftest.err >&5 26748 cat conftest.err >&5
28096 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28097 (exit $ac_status); } && { 26750 (exit $ac_status); } && {
28098 test -z "$ac_c_werror_flag" || 26751 test -z "$ac_c_werror_flag" ||
28099 test ! -s conftest.err 26752 test ! -s conftest.err
28100 } && test -s conftest$ac_exeext && { 26753 } && test -s conftest$ac_exeext &&
28101 test "$cross_compiling" = yes || 26754 $as_test_x conftest$ac_exeext; then
28102 $as_test_x conftest$ac_exeext
28103 }; then
28104 eval "$as_ac_var=yes" 26755 eval "$as_ac_var=yes"
28105else 26756else
28106 $as_echo "$as_me: failed program was:" >&5 26757 echo "$as_me: failed program was:" >&5
28107sed 's/^/| /' conftest.$ac_ext >&5 26758sed 's/^/| /' conftest.$ac_ext >&5
28108 26759
28109 eval "$as_ac_var=no" 26760 eval "$as_ac_var=no"
28110fi 26761fi
28111 26762
28112rm -rf conftest.dSYM
28113rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 26763rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28114 conftest$ac_exeext conftest.$ac_ext 26764 conftest$ac_exeext conftest.$ac_ext
28115fi 26765fi
28116ac_res=`eval 'as_val=${'$as_ac_var'} 26766ac_res=`eval echo '${'$as_ac_var'}'`
28117 $as_echo "$as_val"'` 26767 { echo "$as_me:$LINENO: result: $ac_res" >&5
28118 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 26768echo "${ECHO_T}$ac_res" >&6; }
28119$as_echo "$ac_res" >&6; } 26769if test `eval echo '${'$as_ac_var'}'` = yes; then
28120if test `eval 'as_val=${'$as_ac_var'}
28121 $as_echo "$as_val"'` = yes; then
28122 cat >>confdefs.h <<_ACEOF 26770 cat >>confdefs.h <<_ACEOF
28123#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 26771#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
28124_ACEOF 26772_ACEOF
28125 26773
28126fi 26774fi
@@ -28153,10 +26801,10 @@ _ACEOF
28153 26801
28154 # Extract the first word of "krb5-config", so it can be a program name with args. 26802 # Extract the first word of "krb5-config", so it can be a program name with args.
28155set dummy krb5-config; ac_word=$2 26803set dummy krb5-config; ac_word=$2
28156{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 26804{ echo "$as_me:$LINENO: checking for $ac_word" >&5
28157$as_echo_n "checking for $ac_word... " >&6; } 26805echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
28158if test "${ac_cv_path_KRB5CONF+set}" = set; then 26806if test "${ac_cv_path_KRB5CONF+set}" = set; then
28159 $as_echo_n "(cached) " >&6 26807 echo $ECHO_N "(cached) $ECHO_C" >&6
28160else 26808else
28161 case $KRB5CONF in 26809 case $KRB5CONF in
28162 [\\/]* | ?:[\\/]*) 26810 [\\/]* | ?:[\\/]*)
@@ -28172,7 +26820,7 @@ do
28172 for ac_exec_ext in '' $ac_executable_extensions; do 26820 for ac_exec_ext in '' $ac_executable_extensions; do
28173 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 26821 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28174 ac_cv_path_KRB5CONF="$as_dir/$ac_word$ac_exec_ext" 26822 ac_cv_path_KRB5CONF="$as_dir/$ac_word$ac_exec_ext"
28175 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 26823 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
28176 break 2 26824 break 2
28177 fi 26825 fi
28178done 26826done
@@ -28185,21 +26833,21 @@ esac
28185fi 26833fi
28186KRB5CONF=$ac_cv_path_KRB5CONF 26834KRB5CONF=$ac_cv_path_KRB5CONF
28187if test -n "$KRB5CONF"; then 26835if test -n "$KRB5CONF"; then
28188 { $as_echo "$as_me:$LINENO: result: $KRB5CONF" >&5 26836 { echo "$as_me:$LINENO: result: $KRB5CONF" >&5
28189$as_echo "$KRB5CONF" >&6; } 26837echo "${ECHO_T}$KRB5CONF" >&6; }
28190else 26838else
28191 { $as_echo "$as_me:$LINENO: result: no" >&5 26839 { echo "$as_me:$LINENO: result: no" >&5
28192$as_echo "no" >&6; } 26840echo "${ECHO_T}no" >&6; }
28193fi 26841fi
28194 26842
28195 26843
28196 if test -x $KRB5CONF ; then 26844 if test -x $KRB5CONF ; then
28197 26845
28198 { $as_echo "$as_me:$LINENO: checking for gssapi support" >&5 26846 { echo "$as_me:$LINENO: checking for gssapi support" >&5
28199$as_echo_n "checking for gssapi support... " >&6; } 26847echo $ECHO_N "checking for gssapi support... $ECHO_C" >&6; }
28200 if $KRB5CONF | grep gssapi >/dev/null ; then 26848 if $KRB5CONF | grep gssapi >/dev/null ; then
28201 { $as_echo "$as_me:$LINENO: result: yes" >&5 26849 { echo "$as_me:$LINENO: result: yes" >&5
28202$as_echo "yes" >&6; } 26850echo "${ECHO_T}yes" >&6; }
28203 26851
28204cat >>confdefs.h <<\_ACEOF 26852cat >>confdefs.h <<\_ACEOF
28205#define GSSAPI 1 26853#define GSSAPI 1
@@ -28207,15 +26855,15 @@ _ACEOF
28207 26855
28208 k5confopts=gssapi 26856 k5confopts=gssapi
28209 else 26857 else
28210 { $as_echo "$as_me:$LINENO: result: no" >&5 26858 { echo "$as_me:$LINENO: result: no" >&5
28211$as_echo "no" >&6; } 26859echo "${ECHO_T}no" >&6; }
28212 k5confopts="" 26860 k5confopts=""
28213 fi 26861 fi
28214 K5CFLAGS="`$KRB5CONF --cflags $k5confopts`" 26862 K5CFLAGS="`$KRB5CONF --cflags $k5confopts`"
28215 K5LIBS="`$KRB5CONF --libs $k5confopts`" 26863 K5LIBS="`$KRB5CONF --libs $k5confopts`"
28216 CPPFLAGS="$CPPFLAGS $K5CFLAGS" 26864 CPPFLAGS="$CPPFLAGS $K5CFLAGS"
28217 { $as_echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5 26865 { echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5
28218$as_echo_n "checking whether we are using Heimdal... " >&6; } 26866echo $ECHO_N "checking whether we are using Heimdal... $ECHO_C" >&6; }
28219 cat >conftest.$ac_ext <<_ACEOF 26867 cat >conftest.$ac_ext <<_ACEOF
28220/* confdefs.h. */ 26868/* confdefs.h. */
28221_ACEOF 26869_ACEOF
@@ -28237,31 +26885,30 @@ case "(($ac_try" in
28237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28238 *) ac_try_echo=$ac_try;; 26886 *) ac_try_echo=$ac_try;;
28239esac 26887esac
28240eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28241$as_echo "$ac_try_echo") >&5
28242 (eval "$ac_compile") 2>conftest.er1 26889 (eval "$ac_compile") 2>conftest.er1
28243 ac_status=$? 26890 ac_status=$?
28244 grep -v '^ *+' conftest.er1 >conftest.err 26891 grep -v '^ *+' conftest.er1 >conftest.err
28245 rm -f conftest.er1 26892 rm -f conftest.er1
28246 cat conftest.err >&5 26893 cat conftest.err >&5
28247 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28248 (exit $ac_status); } && { 26895 (exit $ac_status); } && {
28249 test -z "$ac_c_werror_flag" || 26896 test -z "$ac_c_werror_flag" ||
28250 test ! -s conftest.err 26897 test ! -s conftest.err
28251 } && test -s conftest.$ac_objext; then 26898 } && test -s conftest.$ac_objext; then
28252 { $as_echo "$as_me:$LINENO: result: yes" >&5 26899 { echo "$as_me:$LINENO: result: yes" >&5
28253$as_echo "yes" >&6; } 26900echo "${ECHO_T}yes" >&6; }
28254 26901
28255cat >>confdefs.h <<\_ACEOF 26902cat >>confdefs.h <<\_ACEOF
28256#define HEIMDAL 1 26903#define HEIMDAL 1
28257_ACEOF 26904_ACEOF
28258 26905
28259else 26906else
28260 $as_echo "$as_me: failed program was:" >&5 26907 echo "$as_me: failed program was:" >&5
28261sed 's/^/| /' conftest.$ac_ext >&5 26908sed 's/^/| /' conftest.$ac_ext >&5
28262 26909
28263 { $as_echo "$as_me:$LINENO: result: no" >&5 26910 { echo "$as_me:$LINENO: result: no" >&5
28264$as_echo "no" >&6; } 26911echo "${ECHO_T}no" >&6; }
28265 26912
28266fi 26913fi
28267 26914
@@ -28269,8 +26916,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28269 else 26916 else
28270 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include" 26917 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
28271 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib" 26918 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
28272 { $as_echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5 26919 { echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5
28273$as_echo_n "checking whether we are using Heimdal... " >&6; } 26920echo $ECHO_N "checking whether we are using Heimdal... $ECHO_C" >&6; }
28274 cat >conftest.$ac_ext <<_ACEOF 26921 cat >conftest.$ac_ext <<_ACEOF
28275/* confdefs.h. */ 26922/* confdefs.h. */
28276_ACEOF 26923_ACEOF
@@ -28292,30 +26939,29 @@ case "(($ac_try" in
28292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28293 *) ac_try_echo=$ac_try;; 26940 *) ac_try_echo=$ac_try;;
28294esac 26941esac
28295eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28296$as_echo "$ac_try_echo") >&5
28297 (eval "$ac_compile") 2>conftest.er1 26943 (eval "$ac_compile") 2>conftest.er1
28298 ac_status=$? 26944 ac_status=$?
28299 grep -v '^ *+' conftest.er1 >conftest.err 26945 grep -v '^ *+' conftest.er1 >conftest.err
28300 rm -f conftest.er1 26946 rm -f conftest.er1
28301 cat conftest.err >&5 26947 cat conftest.err >&5
28302 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28303 (exit $ac_status); } && { 26949 (exit $ac_status); } && {
28304 test -z "$ac_c_werror_flag" || 26950 test -z "$ac_c_werror_flag" ||
28305 test ! -s conftest.err 26951 test ! -s conftest.err
28306 } && test -s conftest.$ac_objext; then 26952 } && test -s conftest.$ac_objext; then
28307 { $as_echo "$as_me:$LINENO: result: yes" >&5 26953 { echo "$as_me:$LINENO: result: yes" >&5
28308$as_echo "yes" >&6; } 26954echo "${ECHO_T}yes" >&6; }
28309 cat >>confdefs.h <<\_ACEOF 26955 cat >>confdefs.h <<\_ACEOF
28310#define HEIMDAL 1 26956#define HEIMDAL 1
28311_ACEOF 26957_ACEOF
28312 26958
28313 K5LIBS="-lkrb5 -ldes" 26959 K5LIBS="-lkrb5 -ldes"
28314 K5LIBS="$K5LIBS -lcom_err -lasn1" 26960 K5LIBS="$K5LIBS -lcom_err -lasn1"
28315 { $as_echo "$as_me:$LINENO: checking for net_write in -lroken" >&5 26961 { echo "$as_me:$LINENO: checking for net_write in -lroken" >&5
28316$as_echo_n "checking for net_write in -lroken... " >&6; } 26962echo $ECHO_N "checking for net_write in -lroken... $ECHO_C" >&6; }
28317if test "${ac_cv_lib_roken_net_write+set}" = set; then 26963if test "${ac_cv_lib_roken_net_write+set}" = set; then
28318 $as_echo_n "(cached) " >&6 26964 echo $ECHO_N "(cached) $ECHO_C" >&6
28319else 26965else
28320 ac_check_lib_save_LIBS=$LIBS 26966 ac_check_lib_save_LIBS=$LIBS
28321LIBS="-lroken $LIBS" 26967LIBS="-lroken $LIBS"
@@ -28347,57 +26993,53 @@ case "(($ac_try" in
28347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28348 *) ac_try_echo=$ac_try;; 26994 *) ac_try_echo=$ac_try;;
28349esac 26995esac
28350eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28351$as_echo "$ac_try_echo") >&5
28352 (eval "$ac_link") 2>conftest.er1 26997 (eval "$ac_link") 2>conftest.er1
28353 ac_status=$? 26998 ac_status=$?
28354 grep -v '^ *+' conftest.er1 >conftest.err 26999 grep -v '^ *+' conftest.er1 >conftest.err
28355 rm -f conftest.er1 27000 rm -f conftest.er1
28356 cat conftest.err >&5 27001 cat conftest.err >&5
28357 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28358 (exit $ac_status); } && { 27003 (exit $ac_status); } && {
28359 test -z "$ac_c_werror_flag" || 27004 test -z "$ac_c_werror_flag" ||
28360 test ! -s conftest.err 27005 test ! -s conftest.err
28361 } && test -s conftest$ac_exeext && { 27006 } && test -s conftest$ac_exeext &&
28362 test "$cross_compiling" = yes || 27007 $as_test_x conftest$ac_exeext; then
28363 $as_test_x conftest$ac_exeext
28364 }; then
28365 ac_cv_lib_roken_net_write=yes 27008 ac_cv_lib_roken_net_write=yes
28366else 27009else
28367 $as_echo "$as_me: failed program was:" >&5 27010 echo "$as_me: failed program was:" >&5
28368sed 's/^/| /' conftest.$ac_ext >&5 27011sed 's/^/| /' conftest.$ac_ext >&5
28369 27012
28370 ac_cv_lib_roken_net_write=no 27013 ac_cv_lib_roken_net_write=no
28371fi 27014fi
28372 27015
28373rm -rf conftest.dSYM
28374rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 27016rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28375 conftest$ac_exeext conftest.$ac_ext 27017 conftest$ac_exeext conftest.$ac_ext
28376LIBS=$ac_check_lib_save_LIBS 27018LIBS=$ac_check_lib_save_LIBS
28377fi 27019fi
28378{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_roken_net_write" >&5 27020{ echo "$as_me:$LINENO: result: $ac_cv_lib_roken_net_write" >&5
28379$as_echo "$ac_cv_lib_roken_net_write" >&6; } 27021echo "${ECHO_T}$ac_cv_lib_roken_net_write" >&6; }
28380if test $ac_cv_lib_roken_net_write = yes; then 27022if test $ac_cv_lib_roken_net_write = yes; then
28381 K5LIBS="$K5LIBS -lroken" 27023 K5LIBS="$K5LIBS -lroken"
28382fi 27024fi
28383 27025
28384 27026
28385else 27027else
28386 $as_echo "$as_me: failed program was:" >&5 27028 echo "$as_me: failed program was:" >&5
28387sed 's/^/| /' conftest.$ac_ext >&5 27029sed 's/^/| /' conftest.$ac_ext >&5
28388 27030
28389 { $as_echo "$as_me:$LINENO: result: no" >&5 27031 { echo "$as_me:$LINENO: result: no" >&5
28390$as_echo "no" >&6; } 27032echo "${ECHO_T}no" >&6; }
28391 K5LIBS="-lkrb5 -lk5crypto -lcom_err" 27033 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
28392 27034
28393 27035
28394fi 27036fi
28395 27037
28396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 27038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28397 { $as_echo "$as_me:$LINENO: checking for library containing dn_expand" >&5 27039 { echo "$as_me:$LINENO: checking for library containing dn_expand" >&5
28398$as_echo_n "checking for library containing dn_expand... " >&6; } 27040echo $ECHO_N "checking for library containing dn_expand... $ECHO_C" >&6; }
28399if test "${ac_cv_search_dn_expand+set}" = set; then 27041if test "${ac_cv_search_dn_expand+set}" = set; then
28400 $as_echo_n "(cached) " >&6 27042 echo $ECHO_N "(cached) $ECHO_C" >&6
28401else 27043else
28402 ac_func_search_save_LIBS=$LIBS 27044 ac_func_search_save_LIBS=$LIBS
28403cat >conftest.$ac_ext <<_ACEOF 27045cat >conftest.$ac_ext <<_ACEOF
@@ -28435,30 +27077,26 @@ case "(($ac_try" in
28435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28436 *) ac_try_echo=$ac_try;; 27078 *) ac_try_echo=$ac_try;;
28437esac 27079esac
28438eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28439$as_echo "$ac_try_echo") >&5
28440 (eval "$ac_link") 2>conftest.er1 27081 (eval "$ac_link") 2>conftest.er1
28441 ac_status=$? 27082 ac_status=$?
28442 grep -v '^ *+' conftest.er1 >conftest.err 27083 grep -v '^ *+' conftest.er1 >conftest.err
28443 rm -f conftest.er1 27084 rm -f conftest.er1
28444 cat conftest.err >&5 27085 cat conftest.err >&5
28445 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28446 (exit $ac_status); } && { 27087 (exit $ac_status); } && {
28447 test -z "$ac_c_werror_flag" || 27088 test -z "$ac_c_werror_flag" ||
28448 test ! -s conftest.err 27089 test ! -s conftest.err
28449 } && test -s conftest$ac_exeext && { 27090 } && test -s conftest$ac_exeext &&
28450 test "$cross_compiling" = yes || 27091 $as_test_x conftest$ac_exeext; then
28451 $as_test_x conftest$ac_exeext
28452 }; then
28453 ac_cv_search_dn_expand=$ac_res 27092 ac_cv_search_dn_expand=$ac_res
28454else 27093else
28455 $as_echo "$as_me: failed program was:" >&5 27094 echo "$as_me: failed program was:" >&5
28456sed 's/^/| /' conftest.$ac_ext >&5 27095sed 's/^/| /' conftest.$ac_ext >&5
28457 27096
28458 27097
28459fi 27098fi
28460 27099
28461rm -rf conftest.dSYM
28462rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 27100rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28463 conftest$ac_exeext 27101 conftest$ac_exeext
28464 if test "${ac_cv_search_dn_expand+set}" = set; then 27102 if test "${ac_cv_search_dn_expand+set}" = set; then
@@ -28473,8 +27111,8 @@ fi
28473rm conftest.$ac_ext 27111rm conftest.$ac_ext
28474LIBS=$ac_func_search_save_LIBS 27112LIBS=$ac_func_search_save_LIBS
28475fi 27113fi
28476{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_dn_expand" >&5 27114{ echo "$as_me:$LINENO: result: $ac_cv_search_dn_expand" >&5
28477$as_echo "$ac_cv_search_dn_expand" >&6; } 27115echo "${ECHO_T}$ac_cv_search_dn_expand" >&6; }
28478ac_res=$ac_cv_search_dn_expand 27116ac_res=$ac_cv_search_dn_expand
28479if test "$ac_res" != no; then 27117if test "$ac_res" != no; then
28480 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 27118 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
@@ -28482,10 +27120,10 @@ if test "$ac_res" != no; then
28482fi 27120fi
28483 27121
28484 27122
28485 { $as_echo "$as_me:$LINENO: checking for gss_init_sec_context in -lgssapi_krb5" >&5 27123 { echo "$as_me:$LINENO: checking for gss_init_sec_context in -lgssapi_krb5" >&5
28486$as_echo_n "checking for gss_init_sec_context in -lgssapi_krb5... " >&6; } 27124echo $ECHO_N "checking for gss_init_sec_context in -lgssapi_krb5... $ECHO_C" >&6; }
28487if test "${ac_cv_lib_gssapi_krb5_gss_init_sec_context+set}" = set; then 27125if test "${ac_cv_lib_gssapi_krb5_gss_init_sec_context+set}" = set; then
28488 $as_echo_n "(cached) " >&6 27126 echo $ECHO_N "(cached) $ECHO_C" >&6
28489else 27127else
28490 ac_check_lib_save_LIBS=$LIBS 27128 ac_check_lib_save_LIBS=$LIBS
28491LIBS="-lgssapi_krb5 $K5LIBS $LIBS" 27129LIBS="-lgssapi_krb5 $K5LIBS $LIBS"
@@ -28517,36 +27155,32 @@ case "(($ac_try" in
28517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28518 *) ac_try_echo=$ac_try;; 27156 *) ac_try_echo=$ac_try;;
28519esac 27157esac
28520eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28521$as_echo "$ac_try_echo") >&5
28522 (eval "$ac_link") 2>conftest.er1 27159 (eval "$ac_link") 2>conftest.er1
28523 ac_status=$? 27160 ac_status=$?
28524 grep -v '^ *+' conftest.er1 >conftest.err 27161 grep -v '^ *+' conftest.er1 >conftest.err
28525 rm -f conftest.er1 27162 rm -f conftest.er1
28526 cat conftest.err >&5 27163 cat conftest.err >&5
28527 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28528 (exit $ac_status); } && { 27165 (exit $ac_status); } && {
28529 test -z "$ac_c_werror_flag" || 27166 test -z "$ac_c_werror_flag" ||
28530 test ! -s conftest.err 27167 test ! -s conftest.err
28531 } && test -s conftest$ac_exeext && { 27168 } && test -s conftest$ac_exeext &&
28532 test "$cross_compiling" = yes || 27169 $as_test_x conftest$ac_exeext; then
28533 $as_test_x conftest$ac_exeext
28534 }; then
28535 ac_cv_lib_gssapi_krb5_gss_init_sec_context=yes 27170 ac_cv_lib_gssapi_krb5_gss_init_sec_context=yes
28536else 27171else
28537 $as_echo "$as_me: failed program was:" >&5 27172 echo "$as_me: failed program was:" >&5
28538sed 's/^/| /' conftest.$ac_ext >&5 27173sed 's/^/| /' conftest.$ac_ext >&5
28539 27174
28540 ac_cv_lib_gssapi_krb5_gss_init_sec_context=no 27175 ac_cv_lib_gssapi_krb5_gss_init_sec_context=no
28541fi 27176fi
28542 27177
28543rm -rf conftest.dSYM
28544rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 27178rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28545 conftest$ac_exeext conftest.$ac_ext 27179 conftest$ac_exeext conftest.$ac_ext
28546LIBS=$ac_check_lib_save_LIBS 27180LIBS=$ac_check_lib_save_LIBS
28547fi 27181fi
28548{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&5 27182{ echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&5
28549$as_echo "$ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&6; } 27183echo "${ECHO_T}$ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&6; }
28550if test $ac_cv_lib_gssapi_krb5_gss_init_sec_context = yes; then 27184if test $ac_cv_lib_gssapi_krb5_gss_init_sec_context = yes; then
28551 cat >>confdefs.h <<\_ACEOF 27185 cat >>confdefs.h <<\_ACEOF
28552#define GSSAPI 1 27186#define GSSAPI 1
@@ -28554,10 +27188,10 @@ _ACEOF
28554 27188
28555 K5LIBS="-lgssapi_krb5 $K5LIBS" 27189 K5LIBS="-lgssapi_krb5 $K5LIBS"
28556else 27190else
28557 { $as_echo "$as_me:$LINENO: checking for gss_init_sec_context in -lgssapi" >&5 27191 { echo "$as_me:$LINENO: checking for gss_init_sec_context in -lgssapi" >&5
28558$as_echo_n "checking for gss_init_sec_context in -lgssapi... " >&6; } 27192echo $ECHO_N "checking for gss_init_sec_context in -lgssapi... $ECHO_C" >&6; }
28559if test "${ac_cv_lib_gssapi_gss_init_sec_context+set}" = set; then 27193if test "${ac_cv_lib_gssapi_gss_init_sec_context+set}" = set; then
28560 $as_echo_n "(cached) " >&6 27194 echo $ECHO_N "(cached) $ECHO_C" >&6
28561else 27195else
28562 ac_check_lib_save_LIBS=$LIBS 27196 ac_check_lib_save_LIBS=$LIBS
28563LIBS="-lgssapi $K5LIBS $LIBS" 27197LIBS="-lgssapi $K5LIBS $LIBS"
@@ -28589,36 +27223,32 @@ case "(($ac_try" in
28589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28590 *) ac_try_echo=$ac_try;; 27224 *) ac_try_echo=$ac_try;;
28591esac 27225esac
28592eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28593$as_echo "$ac_try_echo") >&5
28594 (eval "$ac_link") 2>conftest.er1 27227 (eval "$ac_link") 2>conftest.er1
28595 ac_status=$? 27228 ac_status=$?
28596 grep -v '^ *+' conftest.er1 >conftest.err 27229 grep -v '^ *+' conftest.er1 >conftest.err
28597 rm -f conftest.er1 27230 rm -f conftest.er1
28598 cat conftest.err >&5 27231 cat conftest.err >&5
28599 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28600 (exit $ac_status); } && { 27233 (exit $ac_status); } && {
28601 test -z "$ac_c_werror_flag" || 27234 test -z "$ac_c_werror_flag" ||
28602 test ! -s conftest.err 27235 test ! -s conftest.err
28603 } && test -s conftest$ac_exeext && { 27236 } && test -s conftest$ac_exeext &&
28604 test "$cross_compiling" = yes || 27237 $as_test_x conftest$ac_exeext; then
28605 $as_test_x conftest$ac_exeext
28606 }; then
28607 ac_cv_lib_gssapi_gss_init_sec_context=yes 27238 ac_cv_lib_gssapi_gss_init_sec_context=yes
28608else 27239else
28609 $as_echo "$as_me: failed program was:" >&5 27240 echo "$as_me: failed program was:" >&5
28610sed 's/^/| /' conftest.$ac_ext >&5 27241sed 's/^/| /' conftest.$ac_ext >&5
28611 27242
28612 ac_cv_lib_gssapi_gss_init_sec_context=no 27243 ac_cv_lib_gssapi_gss_init_sec_context=no
28613fi 27244fi
28614 27245
28615rm -rf conftest.dSYM
28616rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 27246rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28617 conftest$ac_exeext conftest.$ac_ext 27247 conftest$ac_exeext conftest.$ac_ext
28618LIBS=$ac_check_lib_save_LIBS 27248LIBS=$ac_check_lib_save_LIBS
28619fi 27249fi
28620{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_gss_init_sec_context" >&5 27250{ echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_gss_init_sec_context" >&5
28621$as_echo "$ac_cv_lib_gssapi_gss_init_sec_context" >&6; } 27251echo "${ECHO_T}$ac_cv_lib_gssapi_gss_init_sec_context" >&6; }
28622if test $ac_cv_lib_gssapi_gss_init_sec_context = yes; then 27252if test $ac_cv_lib_gssapi_gss_init_sec_context = yes; then
28623 cat >>confdefs.h <<\_ACEOF 27253 cat >>confdefs.h <<\_ACEOF
28624#define GSSAPI 1 27254#define GSSAPI 1
@@ -28626,8 +27256,8 @@ _ACEOF
28626 27256
28627 K5LIBS="-lgssapi $K5LIBS" 27257 K5LIBS="-lgssapi $K5LIBS"
28628else 27258else
28629 { $as_echo "$as_me:$LINENO: WARNING: Cannot find any suitable gss-api library - build may fail" >&5 27259 { echo "$as_me:$LINENO: WARNING: Cannot find any suitable gss-api library - build may fail" >&5
28630$as_echo "$as_me: WARNING: Cannot find any suitable gss-api library - build may fail" >&2;} 27260echo "$as_me: WARNING: Cannot find any suitable gss-api library - build may fail" >&2;}
28631fi 27261fi
28632 27262
28633 27263
@@ -28635,17 +27265,17 @@ fi
28635 27265
28636 27266
28637 if test "${ac_cv_header_gssapi_h+set}" = set; then 27267 if test "${ac_cv_header_gssapi_h+set}" = set; then
28638 { $as_echo "$as_me:$LINENO: checking for gssapi.h" >&5 27268 { echo "$as_me:$LINENO: checking for gssapi.h" >&5
28639$as_echo_n "checking for gssapi.h... " >&6; } 27269echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6; }
28640if test "${ac_cv_header_gssapi_h+set}" = set; then 27270if test "${ac_cv_header_gssapi_h+set}" = set; then
28641 $as_echo_n "(cached) " >&6 27271 echo $ECHO_N "(cached) $ECHO_C" >&6
28642fi 27272fi
28643{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5 27273{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
28644$as_echo "$ac_cv_header_gssapi_h" >&6; } 27274echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6; }
28645else 27275else
28646 # Is the header compilable? 27276 # Is the header compilable?
28647{ $as_echo "$as_me:$LINENO: checking gssapi.h usability" >&5 27277{ echo "$as_me:$LINENO: checking gssapi.h usability" >&5
28648$as_echo_n "checking gssapi.h usability... " >&6; } 27278echo $ECHO_N "checking gssapi.h usability... $ECHO_C" >&6; }
28649cat >conftest.$ac_ext <<_ACEOF 27279cat >conftest.$ac_ext <<_ACEOF
28650/* confdefs.h. */ 27280/* confdefs.h. */
28651_ACEOF 27281_ACEOF
@@ -28661,33 +27291,32 @@ case "(($ac_try" in
28661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28662 *) ac_try_echo=$ac_try;; 27292 *) ac_try_echo=$ac_try;;
28663esac 27293esac
28664eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28665$as_echo "$ac_try_echo") >&5
28666 (eval "$ac_compile") 2>conftest.er1 27295 (eval "$ac_compile") 2>conftest.er1
28667 ac_status=$? 27296 ac_status=$?
28668 grep -v '^ *+' conftest.er1 >conftest.err 27297 grep -v '^ *+' conftest.er1 >conftest.err
28669 rm -f conftest.er1 27298 rm -f conftest.er1
28670 cat conftest.err >&5 27299 cat conftest.err >&5
28671 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28672 (exit $ac_status); } && { 27301 (exit $ac_status); } && {
28673 test -z "$ac_c_werror_flag" || 27302 test -z "$ac_c_werror_flag" ||
28674 test ! -s conftest.err 27303 test ! -s conftest.err
28675 } && test -s conftest.$ac_objext; then 27304 } && test -s conftest.$ac_objext; then
28676 ac_header_compiler=yes 27305 ac_header_compiler=yes
28677else 27306else
28678 $as_echo "$as_me: failed program was:" >&5 27307 echo "$as_me: failed program was:" >&5
28679sed 's/^/| /' conftest.$ac_ext >&5 27308sed 's/^/| /' conftest.$ac_ext >&5
28680 27309
28681 ac_header_compiler=no 27310 ac_header_compiler=no
28682fi 27311fi
28683 27312
28684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 27313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28685{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 27314{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
28686$as_echo "$ac_header_compiler" >&6; } 27315echo "${ECHO_T}$ac_header_compiler" >&6; }
28687 27316
28688# Is the header present? 27317# Is the header present?
28689{ $as_echo "$as_me:$LINENO: checking gssapi.h presence" >&5 27318{ echo "$as_me:$LINENO: checking gssapi.h presence" >&5
28690$as_echo_n "checking gssapi.h presence... " >&6; } 27319echo $ECHO_N "checking gssapi.h presence... $ECHO_C" >&6; }
28691cat >conftest.$ac_ext <<_ACEOF 27320cat >conftest.$ac_ext <<_ACEOF
28692/* confdefs.h. */ 27321/* confdefs.h. */
28693_ACEOF 27322_ACEOF
@@ -28701,52 +27330,51 @@ case "(($ac_try" in
28701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28702 *) ac_try_echo=$ac_try;; 27331 *) ac_try_echo=$ac_try;;
28703esac 27332esac
28704eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28705$as_echo "$ac_try_echo") >&5
28706 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 27334 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
28707 ac_status=$? 27335 ac_status=$?
28708 grep -v '^ *+' conftest.er1 >conftest.err 27336 grep -v '^ *+' conftest.er1 >conftest.err
28709 rm -f conftest.er1 27337 rm -f conftest.er1
28710 cat conftest.err >&5 27338 cat conftest.err >&5
28711 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28712 (exit $ac_status); } >/dev/null && { 27340 (exit $ac_status); } >/dev/null && {
28713 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 27341 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
28714 test ! -s conftest.err 27342 test ! -s conftest.err
28715 }; then 27343 }; then
28716 ac_header_preproc=yes 27344 ac_header_preproc=yes
28717else 27345else
28718 $as_echo "$as_me: failed program was:" >&5 27346 echo "$as_me: failed program was:" >&5
28719sed 's/^/| /' conftest.$ac_ext >&5 27347sed 's/^/| /' conftest.$ac_ext >&5
28720 27348
28721 ac_header_preproc=no 27349 ac_header_preproc=no
28722fi 27350fi
28723 27351
28724rm -f conftest.err conftest.$ac_ext 27352rm -f conftest.err conftest.$ac_ext
28725{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 27353{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
28726$as_echo "$ac_header_preproc" >&6; } 27354echo "${ECHO_T}$ac_header_preproc" >&6; }
28727 27355
28728# So? What about this header? 27356# So? What about this header?
28729case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 27357case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
28730 yes:no: ) 27358 yes:no: )
28731 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5 27359 { echo "$as_me:$LINENO: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
28732$as_echo "$as_me: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 27360echo "$as_me: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
28733 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the compiler's result" >&5 27361 { echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the compiler's result" >&5
28734$as_echo "$as_me: WARNING: gssapi.h: proceeding with the compiler's result" >&2;} 27362echo "$as_me: WARNING: gssapi.h: proceeding with the compiler's result" >&2;}
28735 ac_header_preproc=yes 27363 ac_header_preproc=yes
28736 ;; 27364 ;;
28737 no:yes:* ) 27365 no:yes:* )
28738 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: present but cannot be compiled" >&5 27366 { echo "$as_me:$LINENO: WARNING: gssapi.h: present but cannot be compiled" >&5
28739$as_echo "$as_me: WARNING: gssapi.h: present but cannot be compiled" >&2;} 27367echo "$as_me: WARNING: gssapi.h: present but cannot be compiled" >&2;}
28740 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: check for missing prerequisite headers?" >&5 27368 { echo "$as_me:$LINENO: WARNING: gssapi.h: check for missing prerequisite headers?" >&5
28741$as_echo "$as_me: WARNING: gssapi.h: check for missing prerequisite headers?" >&2;} 27369echo "$as_me: WARNING: gssapi.h: check for missing prerequisite headers?" >&2;}
28742 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: see the Autoconf documentation" >&5 27370 { echo "$as_me:$LINENO: WARNING: gssapi.h: see the Autoconf documentation" >&5
28743$as_echo "$as_me: WARNING: gssapi.h: see the Autoconf documentation" >&2;} 27371echo "$as_me: WARNING: gssapi.h: see the Autoconf documentation" >&2;}
28744 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: section \"Present But Cannot Be Compiled\"" >&5 27372 { echo "$as_me:$LINENO: WARNING: gssapi.h: section \"Present But Cannot Be Compiled\"" >&5
28745$as_echo "$as_me: WARNING: gssapi.h: section \"Present But Cannot Be Compiled\"" >&2;} 27373echo "$as_me: WARNING: gssapi.h: section \"Present But Cannot Be Compiled\"" >&2;}
28746 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the preprocessor's result" >&5 27374 { echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the preprocessor's result" >&5
28747$as_echo "$as_me: WARNING: gssapi.h: proceeding with the preprocessor's result" >&2;} 27375echo "$as_me: WARNING: gssapi.h: proceeding with the preprocessor's result" >&2;}
28748 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: in the future, the compiler will take precedence" >&5 27376 { echo "$as_me:$LINENO: WARNING: gssapi.h: in the future, the compiler will take precedence" >&5
28749$as_echo "$as_me: WARNING: gssapi.h: in the future, the compiler will take precedence" >&2;} 27377echo "$as_me: WARNING: gssapi.h: in the future, the compiler will take precedence" >&2;}
28750 ( cat <<\_ASBOX 27378 ( cat <<\_ASBOX
28751## ------------------------------------------- ## 27379## ------------------------------------------- ##
28752## Report this to openssh-unix-dev@mindrot.org ## 27380## Report this to openssh-unix-dev@mindrot.org ##
@@ -28755,15 +27383,15 @@ _ASBOX
28755 ) | sed "s/^/$as_me: WARNING: /" >&2 27383 ) | sed "s/^/$as_me: WARNING: /" >&2
28756 ;; 27384 ;;
28757esac 27385esac
28758{ $as_echo "$as_me:$LINENO: checking for gssapi.h" >&5 27386{ echo "$as_me:$LINENO: checking for gssapi.h" >&5
28759$as_echo_n "checking for gssapi.h... " >&6; } 27387echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6; }
28760if test "${ac_cv_header_gssapi_h+set}" = set; then 27388if test "${ac_cv_header_gssapi_h+set}" = set; then
28761 $as_echo_n "(cached) " >&6 27389 echo $ECHO_N "(cached) $ECHO_C" >&6
28762else 27390else
28763 ac_cv_header_gssapi_h=$ac_header_preproc 27391 ac_cv_header_gssapi_h=$ac_header_preproc
28764fi 27392fi
28765{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5 27393{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
28766$as_echo "$ac_cv_header_gssapi_h" >&6; } 27394echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6; }
28767 27395
28768fi 27396fi
28769if test $ac_cv_header_gssapi_h = yes; then 27397if test $ac_cv_header_gssapi_h = yes; then
@@ -28774,21 +27402,20 @@ else
28774 27402
28775for ac_header in gssapi.h 27403for ac_header in gssapi.h
28776do 27404do
28777as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 27405as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
28778if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 27406if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
28779 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 27407 { echo "$as_me:$LINENO: checking for $ac_header" >&5
28780$as_echo_n "checking for $ac_header... " >&6; } 27408echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
28781if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 27409if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
28782 $as_echo_n "(cached) " >&6 27410 echo $ECHO_N "(cached) $ECHO_C" >&6
28783fi 27411fi
28784ac_res=`eval 'as_val=${'$as_ac_Header'} 27412ac_res=`eval echo '${'$as_ac_Header'}'`
28785 $as_echo "$as_val"'` 27413 { echo "$as_me:$LINENO: result: $ac_res" >&5
28786 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 27414echo "${ECHO_T}$ac_res" >&6; }
28787$as_echo "$ac_res" >&6; }
28788else 27415else
28789 # Is the header compilable? 27416 # Is the header compilable?
28790{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 27417{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
28791$as_echo_n "checking $ac_header usability... " >&6; } 27418echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
28792cat >conftest.$ac_ext <<_ACEOF 27419cat >conftest.$ac_ext <<_ACEOF
28793/* confdefs.h. */ 27420/* confdefs.h. */
28794_ACEOF 27421_ACEOF
@@ -28804,33 +27431,32 @@ case "(($ac_try" in
28804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28805 *) ac_try_echo=$ac_try;; 27432 *) ac_try_echo=$ac_try;;
28806esac 27433esac
28807eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28808$as_echo "$ac_try_echo") >&5
28809 (eval "$ac_compile") 2>conftest.er1 27435 (eval "$ac_compile") 2>conftest.er1
28810 ac_status=$? 27436 ac_status=$?
28811 grep -v '^ *+' conftest.er1 >conftest.err 27437 grep -v '^ *+' conftest.er1 >conftest.err
28812 rm -f conftest.er1 27438 rm -f conftest.er1
28813 cat conftest.err >&5 27439 cat conftest.err >&5
28814 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28815 (exit $ac_status); } && { 27441 (exit $ac_status); } && {
28816 test -z "$ac_c_werror_flag" || 27442 test -z "$ac_c_werror_flag" ||
28817 test ! -s conftest.err 27443 test ! -s conftest.err
28818 } && test -s conftest.$ac_objext; then 27444 } && test -s conftest.$ac_objext; then
28819 ac_header_compiler=yes 27445 ac_header_compiler=yes
28820else 27446else
28821 $as_echo "$as_me: failed program was:" >&5 27447 echo "$as_me: failed program was:" >&5
28822sed 's/^/| /' conftest.$ac_ext >&5 27448sed 's/^/| /' conftest.$ac_ext >&5
28823 27449
28824 ac_header_compiler=no 27450 ac_header_compiler=no
28825fi 27451fi
28826 27452
28827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 27453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28828{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 27454{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
28829$as_echo "$ac_header_compiler" >&6; } 27455echo "${ECHO_T}$ac_header_compiler" >&6; }
28830 27456
28831# Is the header present? 27457# Is the header present?
28832{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 27458{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
28833$as_echo_n "checking $ac_header presence... " >&6; } 27459echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
28834cat >conftest.$ac_ext <<_ACEOF 27460cat >conftest.$ac_ext <<_ACEOF
28835/* confdefs.h. */ 27461/* confdefs.h. */
28836_ACEOF 27462_ACEOF
@@ -28844,52 +27470,51 @@ case "(($ac_try" in
28844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28845 *) ac_try_echo=$ac_try;; 27471 *) ac_try_echo=$ac_try;;
28846esac 27472esac
28847eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28848$as_echo "$ac_try_echo") >&5
28849 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 27474 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
28850 ac_status=$? 27475 ac_status=$?
28851 grep -v '^ *+' conftest.er1 >conftest.err 27476 grep -v '^ *+' conftest.er1 >conftest.err
28852 rm -f conftest.er1 27477 rm -f conftest.er1
28853 cat conftest.err >&5 27478 cat conftest.err >&5
28854 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28855 (exit $ac_status); } >/dev/null && { 27480 (exit $ac_status); } >/dev/null && {
28856 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 27481 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
28857 test ! -s conftest.err 27482 test ! -s conftest.err
28858 }; then 27483 }; then
28859 ac_header_preproc=yes 27484 ac_header_preproc=yes
28860else 27485else
28861 $as_echo "$as_me: failed program was:" >&5 27486 echo "$as_me: failed program was:" >&5
28862sed 's/^/| /' conftest.$ac_ext >&5 27487sed 's/^/| /' conftest.$ac_ext >&5
28863 27488
28864 ac_header_preproc=no 27489 ac_header_preproc=no
28865fi 27490fi
28866 27491
28867rm -f conftest.err conftest.$ac_ext 27492rm -f conftest.err conftest.$ac_ext
28868{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 27493{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
28869$as_echo "$ac_header_preproc" >&6; } 27494echo "${ECHO_T}$ac_header_preproc" >&6; }
28870 27495
28871# So? What about this header? 27496# So? What about this header?
28872case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 27497case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
28873 yes:no: ) 27498 yes:no: )
28874 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 27499 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
28875$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} 27500echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
28876 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 27501 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
28877$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} 27502echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
28878 ac_header_preproc=yes 27503 ac_header_preproc=yes
28879 ;; 27504 ;;
28880 no:yes:* ) 27505 no:yes:* )
28881 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 27506 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
28882$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} 27507echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
28883 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 27508 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
28884$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} 27509echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
28885 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 27510 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
28886$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 27511echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
28887 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 27512 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
28888$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} 27513echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
28889 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 27514 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
28890$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 27515echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
28891 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 27516 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
28892$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 27517echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
28893 ( cat <<\_ASBOX 27518 ( cat <<\_ASBOX
28894## ------------------------------------------- ## 27519## ------------------------------------------- ##
28895## Report this to openssh-unix-dev@mindrot.org ## 27520## Report this to openssh-unix-dev@mindrot.org ##
@@ -28898,28 +27523,26 @@ _ASBOX
28898 ) | sed "s/^/$as_me: WARNING: /" >&2 27523 ) | sed "s/^/$as_me: WARNING: /" >&2
28899 ;; 27524 ;;
28900esac 27525esac
28901{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 27526{ echo "$as_me:$LINENO: checking for $ac_header" >&5
28902$as_echo_n "checking for $ac_header... " >&6; } 27527echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
28903if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 27528if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
28904 $as_echo_n "(cached) " >&6 27529 echo $ECHO_N "(cached) $ECHO_C" >&6
28905else 27530else
28906 eval "$as_ac_Header=\$ac_header_preproc" 27531 eval "$as_ac_Header=\$ac_header_preproc"
28907fi 27532fi
28908ac_res=`eval 'as_val=${'$as_ac_Header'} 27533ac_res=`eval echo '${'$as_ac_Header'}'`
28909 $as_echo "$as_val"'` 27534 { echo "$as_me:$LINENO: result: $ac_res" >&5
28910 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 27535echo "${ECHO_T}$ac_res" >&6; }
28911$as_echo "$ac_res" >&6; }
28912 27536
28913fi 27537fi
28914if test `eval 'as_val=${'$as_ac_Header'} 27538if test `eval echo '${'$as_ac_Header'}'` = yes; then
28915 $as_echo "$as_val"'` = yes; then
28916 cat >>confdefs.h <<_ACEOF 27539 cat >>confdefs.h <<_ACEOF
28917#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 27540#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
28918_ACEOF 27541_ACEOF
28919 27542
28920else 27543else
28921 { $as_echo "$as_me:$LINENO: WARNING: Cannot find any suitable gss-api header - build may fail" >&5 27544 { echo "$as_me:$LINENO: WARNING: Cannot find any suitable gss-api header - build may fail" >&5
28922$as_echo "$as_me: WARNING: Cannot find any suitable gss-api header - build may fail" >&2;} 27545echo "$as_me: WARNING: Cannot find any suitable gss-api header - build may fail" >&2;}
28923 27546
28924fi 27547fi
28925 27548
@@ -28934,17 +27557,17 @@ fi
28934 oldCPP="$CPPFLAGS" 27557 oldCPP="$CPPFLAGS"
28935 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi" 27558 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
28936 if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then 27559 if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then
28937 { $as_echo "$as_me:$LINENO: checking for gssapi_krb5.h" >&5 27560 { echo "$as_me:$LINENO: checking for gssapi_krb5.h" >&5
28938$as_echo_n "checking for gssapi_krb5.h... " >&6; } 27561echo $ECHO_N "checking for gssapi_krb5.h... $ECHO_C" >&6; }
28939if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then 27562if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then
28940 $as_echo_n "(cached) " >&6 27563 echo $ECHO_N "(cached) $ECHO_C" >&6
28941fi 27564fi
28942{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_krb5_h" >&5 27565{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_krb5_h" >&5
28943$as_echo "$ac_cv_header_gssapi_krb5_h" >&6; } 27566echo "${ECHO_T}$ac_cv_header_gssapi_krb5_h" >&6; }
28944else 27567else
28945 # Is the header compilable? 27568 # Is the header compilable?
28946{ $as_echo "$as_me:$LINENO: checking gssapi_krb5.h usability" >&5 27569{ echo "$as_me:$LINENO: checking gssapi_krb5.h usability" >&5
28947$as_echo_n "checking gssapi_krb5.h usability... " >&6; } 27570echo $ECHO_N "checking gssapi_krb5.h usability... $ECHO_C" >&6; }
28948cat >conftest.$ac_ext <<_ACEOF 27571cat >conftest.$ac_ext <<_ACEOF
28949/* confdefs.h. */ 27572/* confdefs.h. */
28950_ACEOF 27573_ACEOF
@@ -28960,33 +27583,32 @@ case "(($ac_try" in
28960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28961 *) ac_try_echo=$ac_try;; 27584 *) ac_try_echo=$ac_try;;
28962esac 27585esac
28963eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28964$as_echo "$ac_try_echo") >&5
28965 (eval "$ac_compile") 2>conftest.er1 27587 (eval "$ac_compile") 2>conftest.er1
28966 ac_status=$? 27588 ac_status=$?
28967 grep -v '^ *+' conftest.er1 >conftest.err 27589 grep -v '^ *+' conftest.er1 >conftest.err
28968 rm -f conftest.er1 27590 rm -f conftest.er1
28969 cat conftest.err >&5 27591 cat conftest.err >&5
28970 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28971 (exit $ac_status); } && { 27593 (exit $ac_status); } && {
28972 test -z "$ac_c_werror_flag" || 27594 test -z "$ac_c_werror_flag" ||
28973 test ! -s conftest.err 27595 test ! -s conftest.err
28974 } && test -s conftest.$ac_objext; then 27596 } && test -s conftest.$ac_objext; then
28975 ac_header_compiler=yes 27597 ac_header_compiler=yes
28976else 27598else
28977 $as_echo "$as_me: failed program was:" >&5 27599 echo "$as_me: failed program was:" >&5
28978sed 's/^/| /' conftest.$ac_ext >&5 27600sed 's/^/| /' conftest.$ac_ext >&5
28979 27601
28980 ac_header_compiler=no 27602 ac_header_compiler=no
28981fi 27603fi
28982 27604
28983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 27605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28984{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 27606{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
28985$as_echo "$ac_header_compiler" >&6; } 27607echo "${ECHO_T}$ac_header_compiler" >&6; }
28986 27608
28987# Is the header present? 27609# Is the header present?
28988{ $as_echo "$as_me:$LINENO: checking gssapi_krb5.h presence" >&5 27610{ echo "$as_me:$LINENO: checking gssapi_krb5.h presence" >&5
28989$as_echo_n "checking gssapi_krb5.h presence... " >&6; } 27611echo $ECHO_N "checking gssapi_krb5.h presence... $ECHO_C" >&6; }
28990cat >conftest.$ac_ext <<_ACEOF 27612cat >conftest.$ac_ext <<_ACEOF
28991/* confdefs.h. */ 27613/* confdefs.h. */
28992_ACEOF 27614_ACEOF
@@ -29000,52 +27622,51 @@ case "(($ac_try" in
29000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29001 *) ac_try_echo=$ac_try;; 27623 *) ac_try_echo=$ac_try;;
29002esac 27624esac
29003eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29004$as_echo "$ac_try_echo") >&5
29005 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 27626 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
29006 ac_status=$? 27627 ac_status=$?
29007 grep -v '^ *+' conftest.er1 >conftest.err 27628 grep -v '^ *+' conftest.er1 >conftest.err
29008 rm -f conftest.er1 27629 rm -f conftest.er1
29009 cat conftest.err >&5 27630 cat conftest.err >&5
29010 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29011 (exit $ac_status); } >/dev/null && { 27632 (exit $ac_status); } >/dev/null && {
29012 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 27633 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
29013 test ! -s conftest.err 27634 test ! -s conftest.err
29014 }; then 27635 }; then
29015 ac_header_preproc=yes 27636 ac_header_preproc=yes
29016else 27637else
29017 $as_echo "$as_me: failed program was:" >&5 27638 echo "$as_me: failed program was:" >&5
29018sed 's/^/| /' conftest.$ac_ext >&5 27639sed 's/^/| /' conftest.$ac_ext >&5
29019 27640
29020 ac_header_preproc=no 27641 ac_header_preproc=no
29021fi 27642fi
29022 27643
29023rm -f conftest.err conftest.$ac_ext 27644rm -f conftest.err conftest.$ac_ext
29024{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 27645{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
29025$as_echo "$ac_header_preproc" >&6; } 27646echo "${ECHO_T}$ac_header_preproc" >&6; }
29026 27647
29027# So? What about this header? 27648# So? What about this header?
29028case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 27649case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
29029 yes:no: ) 27650 yes:no: )
29030 { $as_echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5 27651 { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
29031$as_echo "$as_me: WARNING: gssapi_krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 27652echo "$as_me: WARNING: gssapi_krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
29032 { $as_echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: proceeding with the compiler's result" >&5 27653 { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: proceeding with the compiler's result" >&5
29033$as_echo "$as_me: WARNING: gssapi_krb5.h: proceeding with the compiler's result" >&2;} 27654echo "$as_me: WARNING: gssapi_krb5.h: proceeding with the compiler's result" >&2;}
29034 ac_header_preproc=yes 27655 ac_header_preproc=yes
29035 ;; 27656 ;;
29036 no:yes:* ) 27657 no:yes:* )
29037 { $as_echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: present but cannot be compiled" >&5 27658 { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: present but cannot be compiled" >&5
29038$as_echo "$as_me: WARNING: gssapi_krb5.h: present but cannot be compiled" >&2;} 27659echo "$as_me: WARNING: gssapi_krb5.h: present but cannot be compiled" >&2;}
29039 { $as_echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: check for missing prerequisite headers?" >&5 27660 { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: check for missing prerequisite headers?" >&5
29040$as_echo "$as_me: WARNING: gssapi_krb5.h: check for missing prerequisite headers?" >&2;} 27661echo "$as_me: WARNING: gssapi_krb5.h: check for missing prerequisite headers?" >&2;}
29041 { $as_echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: see the Autoconf documentation" >&5 27662 { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: see the Autoconf documentation" >&5
29042$as_echo "$as_me: WARNING: gssapi_krb5.h: see the Autoconf documentation" >&2;} 27663echo "$as_me: WARNING: gssapi_krb5.h: see the Autoconf documentation" >&2;}
29043 { $as_echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: section \"Present But Cannot Be Compiled\"" >&5 27664 { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: section \"Present But Cannot Be Compiled\"" >&5
29044$as_echo "$as_me: WARNING: gssapi_krb5.h: section \"Present But Cannot Be Compiled\"" >&2;} 27665echo "$as_me: WARNING: gssapi_krb5.h: section \"Present But Cannot Be Compiled\"" >&2;}
29045 { $as_echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: proceeding with the preprocessor's result" >&5 27666 { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: proceeding with the preprocessor's result" >&5
29046$as_echo "$as_me: WARNING: gssapi_krb5.h: proceeding with the preprocessor's result" >&2;} 27667echo "$as_me: WARNING: gssapi_krb5.h: proceeding with the preprocessor's result" >&2;}
29047 { $as_echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: in the future, the compiler will take precedence" >&5 27668 { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: in the future, the compiler will take precedence" >&5
29048$as_echo "$as_me: WARNING: gssapi_krb5.h: in the future, the compiler will take precedence" >&2;} 27669echo "$as_me: WARNING: gssapi_krb5.h: in the future, the compiler will take precedence" >&2;}
29049 ( cat <<\_ASBOX 27670 ( cat <<\_ASBOX
29050## ------------------------------------------- ## 27671## ------------------------------------------- ##
29051## Report this to openssh-unix-dev@mindrot.org ## 27672## Report this to openssh-unix-dev@mindrot.org ##
@@ -29054,15 +27675,15 @@ _ASBOX
29054 ) | sed "s/^/$as_me: WARNING: /" >&2 27675 ) | sed "s/^/$as_me: WARNING: /" >&2
29055 ;; 27676 ;;
29056esac 27677esac
29057{ $as_echo "$as_me:$LINENO: checking for gssapi_krb5.h" >&5 27678{ echo "$as_me:$LINENO: checking for gssapi_krb5.h" >&5
29058$as_echo_n "checking for gssapi_krb5.h... " >&6; } 27679echo $ECHO_N "checking for gssapi_krb5.h... $ECHO_C" >&6; }
29059if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then 27680if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then
29060 $as_echo_n "(cached) " >&6 27681 echo $ECHO_N "(cached) $ECHO_C" >&6
29061else 27682else
29062 ac_cv_header_gssapi_krb5_h=$ac_header_preproc 27683 ac_cv_header_gssapi_krb5_h=$ac_header_preproc
29063fi 27684fi
29064{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_krb5_h" >&5 27685{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_krb5_h" >&5
29065$as_echo "$ac_cv_header_gssapi_krb5_h" >&6; } 27686echo "${ECHO_T}$ac_cv_header_gssapi_krb5_h" >&6; }
29066 27687
29067fi 27688fi
29068if test $ac_cv_header_gssapi_krb5_h = yes; then 27689if test $ac_cv_header_gssapi_krb5_h = yes; then
@@ -29085,21 +27706,20 @@ fi
29085 27706
29086for ac_header in gssapi.h gssapi/gssapi.h 27707for ac_header in gssapi.h gssapi/gssapi.h
29087do 27708do
29088as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 27709as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
29089if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 27710if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29090 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 27711 { echo "$as_me:$LINENO: checking for $ac_header" >&5
29091$as_echo_n "checking for $ac_header... " >&6; } 27712echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
29092if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 27713if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29093 $as_echo_n "(cached) " >&6 27714 echo $ECHO_N "(cached) $ECHO_C" >&6
29094fi 27715fi
29095ac_res=`eval 'as_val=${'$as_ac_Header'} 27716ac_res=`eval echo '${'$as_ac_Header'}'`
29096 $as_echo "$as_val"'` 27717 { echo "$as_me:$LINENO: result: $ac_res" >&5
29097 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 27718echo "${ECHO_T}$ac_res" >&6; }
29098$as_echo "$ac_res" >&6; }
29099else 27719else
29100 # Is the header compilable? 27720 # Is the header compilable?
29101{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 27721{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
29102$as_echo_n "checking $ac_header usability... " >&6; } 27722echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
29103cat >conftest.$ac_ext <<_ACEOF 27723cat >conftest.$ac_ext <<_ACEOF
29104/* confdefs.h. */ 27724/* confdefs.h. */
29105_ACEOF 27725_ACEOF
@@ -29115,33 +27735,32 @@ case "(($ac_try" in
29115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29116 *) ac_try_echo=$ac_try;; 27736 *) ac_try_echo=$ac_try;;
29117esac 27737esac
29118eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29119$as_echo "$ac_try_echo") >&5
29120 (eval "$ac_compile") 2>conftest.er1 27739 (eval "$ac_compile") 2>conftest.er1
29121 ac_status=$? 27740 ac_status=$?
29122 grep -v '^ *+' conftest.er1 >conftest.err 27741 grep -v '^ *+' conftest.er1 >conftest.err
29123 rm -f conftest.er1 27742 rm -f conftest.er1
29124 cat conftest.err >&5 27743 cat conftest.err >&5
29125 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29126 (exit $ac_status); } && { 27745 (exit $ac_status); } && {
29127 test -z "$ac_c_werror_flag" || 27746 test -z "$ac_c_werror_flag" ||
29128 test ! -s conftest.err 27747 test ! -s conftest.err
29129 } && test -s conftest.$ac_objext; then 27748 } && test -s conftest.$ac_objext; then
29130 ac_header_compiler=yes 27749 ac_header_compiler=yes
29131else 27750else
29132 $as_echo "$as_me: failed program was:" >&5 27751 echo "$as_me: failed program was:" >&5
29133sed 's/^/| /' conftest.$ac_ext >&5 27752sed 's/^/| /' conftest.$ac_ext >&5
29134 27753
29135 ac_header_compiler=no 27754 ac_header_compiler=no
29136fi 27755fi
29137 27756
29138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 27757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29139{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 27758{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
29140$as_echo "$ac_header_compiler" >&6; } 27759echo "${ECHO_T}$ac_header_compiler" >&6; }
29141 27760
29142# Is the header present? 27761# Is the header present?
29143{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 27762{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
29144$as_echo_n "checking $ac_header presence... " >&6; } 27763echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
29145cat >conftest.$ac_ext <<_ACEOF 27764cat >conftest.$ac_ext <<_ACEOF
29146/* confdefs.h. */ 27765/* confdefs.h. */
29147_ACEOF 27766_ACEOF
@@ -29155,52 +27774,51 @@ case "(($ac_try" in
29155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29156 *) ac_try_echo=$ac_try;; 27775 *) ac_try_echo=$ac_try;;
29157esac 27776esac
29158eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29159$as_echo "$ac_try_echo") >&5
29160 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 27778 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
29161 ac_status=$? 27779 ac_status=$?
29162 grep -v '^ *+' conftest.er1 >conftest.err 27780 grep -v '^ *+' conftest.er1 >conftest.err
29163 rm -f conftest.er1 27781 rm -f conftest.er1
29164 cat conftest.err >&5 27782 cat conftest.err >&5
29165 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29166 (exit $ac_status); } >/dev/null && { 27784 (exit $ac_status); } >/dev/null && {
29167 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 27785 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
29168 test ! -s conftest.err 27786 test ! -s conftest.err
29169 }; then 27787 }; then
29170 ac_header_preproc=yes 27788 ac_header_preproc=yes
29171else 27789else
29172 $as_echo "$as_me: failed program was:" >&5 27790 echo "$as_me: failed program was:" >&5
29173sed 's/^/| /' conftest.$ac_ext >&5 27791sed 's/^/| /' conftest.$ac_ext >&5
29174 27792
29175 ac_header_preproc=no 27793 ac_header_preproc=no
29176fi 27794fi
29177 27795
29178rm -f conftest.err conftest.$ac_ext 27796rm -f conftest.err conftest.$ac_ext
29179{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 27797{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
29180$as_echo "$ac_header_preproc" >&6; } 27798echo "${ECHO_T}$ac_header_preproc" >&6; }
29181 27799
29182# So? What about this header? 27800# So? What about this header?
29183case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 27801case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
29184 yes:no: ) 27802 yes:no: )
29185 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 27803 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
29186$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} 27804echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
29187 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 27805 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
29188$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} 27806echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
29189 ac_header_preproc=yes 27807 ac_header_preproc=yes
29190 ;; 27808 ;;
29191 no:yes:* ) 27809 no:yes:* )
29192 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 27810 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
29193$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} 27811echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
29194 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 27812 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
29195$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} 27813echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
29196 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 27814 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
29197$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 27815echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
29198 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 27816 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
29199$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} 27817echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
29200 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 27818 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
29201$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 27819echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
29202 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 27820 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
29203$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 27821echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
29204 ( cat <<\_ASBOX 27822 ( cat <<\_ASBOX
29205## ------------------------------------------- ## 27823## ------------------------------------------- ##
29206## Report this to openssh-unix-dev@mindrot.org ## 27824## Report this to openssh-unix-dev@mindrot.org ##
@@ -29209,23 +27827,21 @@ _ASBOX
29209 ) | sed "s/^/$as_me: WARNING: /" >&2 27827 ) | sed "s/^/$as_me: WARNING: /" >&2
29210 ;; 27828 ;;
29211esac 27829esac
29212{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 27830{ echo "$as_me:$LINENO: checking for $ac_header" >&5
29213$as_echo_n "checking for $ac_header... " >&6; } 27831echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
29214if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 27832if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29215 $as_echo_n "(cached) " >&6 27833 echo $ECHO_N "(cached) $ECHO_C" >&6
29216else 27834else
29217 eval "$as_ac_Header=\$ac_header_preproc" 27835 eval "$as_ac_Header=\$ac_header_preproc"
29218fi 27836fi
29219ac_res=`eval 'as_val=${'$as_ac_Header'} 27837ac_res=`eval echo '${'$as_ac_Header'}'`
29220 $as_echo "$as_val"'` 27838 { echo "$as_me:$LINENO: result: $ac_res" >&5
29221 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 27839echo "${ECHO_T}$ac_res" >&6; }
29222$as_echo "$ac_res" >&6; }
29223 27840
29224fi 27841fi
29225if test `eval 'as_val=${'$as_ac_Header'} 27842if test `eval echo '${'$as_ac_Header'}'` = yes; then
29226 $as_echo "$as_val"'` = yes; then
29227 cat >>confdefs.h <<_ACEOF 27843 cat >>confdefs.h <<_ACEOF
29228#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 27844#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
29229_ACEOF 27845_ACEOF
29230 27846
29231fi 27847fi
@@ -29236,21 +27852,20 @@ done
29236 27852
29237for ac_header in gssapi_krb5.h gssapi/gssapi_krb5.h 27853for ac_header in gssapi_krb5.h gssapi/gssapi_krb5.h
29238do 27854do
29239as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 27855as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
29240if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 27856if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29241 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 27857 { echo "$as_me:$LINENO: checking for $ac_header" >&5
29242$as_echo_n "checking for $ac_header... " >&6; } 27858echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
29243if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 27859if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29244 $as_echo_n "(cached) " >&6 27860 echo $ECHO_N "(cached) $ECHO_C" >&6
29245fi 27861fi
29246ac_res=`eval 'as_val=${'$as_ac_Header'} 27862ac_res=`eval echo '${'$as_ac_Header'}'`
29247 $as_echo "$as_val"'` 27863 { echo "$as_me:$LINENO: result: $ac_res" >&5
29248 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 27864echo "${ECHO_T}$ac_res" >&6; }
29249$as_echo "$ac_res" >&6; }
29250else 27865else
29251 # Is the header compilable? 27866 # Is the header compilable?
29252{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 27867{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
29253$as_echo_n "checking $ac_header usability... " >&6; } 27868echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
29254cat >conftest.$ac_ext <<_ACEOF 27869cat >conftest.$ac_ext <<_ACEOF
29255/* confdefs.h. */ 27870/* confdefs.h. */
29256_ACEOF 27871_ACEOF
@@ -29266,33 +27881,32 @@ case "(($ac_try" in
29266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29267 *) ac_try_echo=$ac_try;; 27882 *) ac_try_echo=$ac_try;;
29268esac 27883esac
29269eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29270$as_echo "$ac_try_echo") >&5
29271 (eval "$ac_compile") 2>conftest.er1 27885 (eval "$ac_compile") 2>conftest.er1
29272 ac_status=$? 27886 ac_status=$?
29273 grep -v '^ *+' conftest.er1 >conftest.err 27887 grep -v '^ *+' conftest.er1 >conftest.err
29274 rm -f conftest.er1 27888 rm -f conftest.er1
29275 cat conftest.err >&5 27889 cat conftest.err >&5
29276 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29277 (exit $ac_status); } && { 27891 (exit $ac_status); } && {
29278 test -z "$ac_c_werror_flag" || 27892 test -z "$ac_c_werror_flag" ||
29279 test ! -s conftest.err 27893 test ! -s conftest.err
29280 } && test -s conftest.$ac_objext; then 27894 } && test -s conftest.$ac_objext; then
29281 ac_header_compiler=yes 27895 ac_header_compiler=yes
29282else 27896else
29283 $as_echo "$as_me: failed program was:" >&5 27897 echo "$as_me: failed program was:" >&5
29284sed 's/^/| /' conftest.$ac_ext >&5 27898sed 's/^/| /' conftest.$ac_ext >&5
29285 27899
29286 ac_header_compiler=no 27900 ac_header_compiler=no
29287fi 27901fi
29288 27902
29289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 27903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29290{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 27904{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
29291$as_echo "$ac_header_compiler" >&6; } 27905echo "${ECHO_T}$ac_header_compiler" >&6; }
29292 27906
29293# Is the header present? 27907# Is the header present?
29294{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 27908{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
29295$as_echo_n "checking $ac_header presence... " >&6; } 27909echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
29296cat >conftest.$ac_ext <<_ACEOF 27910cat >conftest.$ac_ext <<_ACEOF
29297/* confdefs.h. */ 27911/* confdefs.h. */
29298_ACEOF 27912_ACEOF
@@ -29306,52 +27920,51 @@ case "(($ac_try" in
29306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29307 *) ac_try_echo=$ac_try;; 27921 *) ac_try_echo=$ac_try;;
29308esac 27922esac
29309eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29310$as_echo "$ac_try_echo") >&5
29311 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 27924 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
29312 ac_status=$? 27925 ac_status=$?
29313 grep -v '^ *+' conftest.er1 >conftest.err 27926 grep -v '^ *+' conftest.er1 >conftest.err
29314 rm -f conftest.er1 27927 rm -f conftest.er1
29315 cat conftest.err >&5 27928 cat conftest.err >&5
29316 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29317 (exit $ac_status); } >/dev/null && { 27930 (exit $ac_status); } >/dev/null && {
29318 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 27931 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
29319 test ! -s conftest.err 27932 test ! -s conftest.err
29320 }; then 27933 }; then
29321 ac_header_preproc=yes 27934 ac_header_preproc=yes
29322else 27935else
29323 $as_echo "$as_me: failed program was:" >&5 27936 echo "$as_me: failed program was:" >&5
29324sed 's/^/| /' conftest.$ac_ext >&5 27937sed 's/^/| /' conftest.$ac_ext >&5
29325 27938
29326 ac_header_preproc=no 27939 ac_header_preproc=no
29327fi 27940fi
29328 27941
29329rm -f conftest.err conftest.$ac_ext 27942rm -f conftest.err conftest.$ac_ext
29330{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 27943{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
29331$as_echo "$ac_header_preproc" >&6; } 27944echo "${ECHO_T}$ac_header_preproc" >&6; }
29332 27945
29333# So? What about this header? 27946# So? What about this header?
29334case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 27947case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
29335 yes:no: ) 27948 yes:no: )
29336 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 27949 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
29337$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} 27950echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
29338 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 27951 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
29339$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} 27952echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
29340 ac_header_preproc=yes 27953 ac_header_preproc=yes
29341 ;; 27954 ;;
29342 no:yes:* ) 27955 no:yes:* )
29343 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 27956 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
29344$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} 27957echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
29345 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 27958 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
29346$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} 27959echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
29347 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 27960 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
29348$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 27961echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
29349 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 27962 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
29350$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} 27963echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
29351 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 27964 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
29352$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 27965echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
29353 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 27966 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
29354$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 27967echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
29355 ( cat <<\_ASBOX 27968 ( cat <<\_ASBOX
29356## ------------------------------------------- ## 27969## ------------------------------------------- ##
29357## Report this to openssh-unix-dev@mindrot.org ## 27970## Report this to openssh-unix-dev@mindrot.org ##
@@ -29360,23 +27973,21 @@ _ASBOX
29360 ) | sed "s/^/$as_me: WARNING: /" >&2 27973 ) | sed "s/^/$as_me: WARNING: /" >&2
29361 ;; 27974 ;;
29362esac 27975esac
29363{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 27976{ echo "$as_me:$LINENO: checking for $ac_header" >&5
29364$as_echo_n "checking for $ac_header... " >&6; } 27977echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
29365if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 27978if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29366 $as_echo_n "(cached) " >&6 27979 echo $ECHO_N "(cached) $ECHO_C" >&6
29367else 27980else
29368 eval "$as_ac_Header=\$ac_header_preproc" 27981 eval "$as_ac_Header=\$ac_header_preproc"
29369fi 27982fi
29370ac_res=`eval 'as_val=${'$as_ac_Header'} 27983ac_res=`eval echo '${'$as_ac_Header'}'`
29371 $as_echo "$as_val"'` 27984 { echo "$as_me:$LINENO: result: $ac_res" >&5
29372 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 27985echo "${ECHO_T}$ac_res" >&6; }
29373$as_echo "$ac_res" >&6; }
29374 27986
29375fi 27987fi
29376if test `eval 'as_val=${'$as_ac_Header'} 27988if test `eval echo '${'$as_ac_Header'}'` = yes; then
29377 $as_echo "$as_val"'` = yes; then
29378 cat >>confdefs.h <<_ACEOF 27989 cat >>confdefs.h <<_ACEOF
29379#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 27990#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
29380_ACEOF 27991_ACEOF
29381 27992
29382fi 27993fi
@@ -29387,21 +27998,20 @@ done
29387 27998
29388for ac_header in gssapi_generic.h gssapi/gssapi_generic.h 27999for ac_header in gssapi_generic.h gssapi/gssapi_generic.h
29389do 28000do
29390as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 28001as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
29391if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 28002if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29392 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 28003 { echo "$as_me:$LINENO: checking for $ac_header" >&5
29393$as_echo_n "checking for $ac_header... " >&6; } 28004echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
29394if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 28005if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29395 $as_echo_n "(cached) " >&6 28006 echo $ECHO_N "(cached) $ECHO_C" >&6
29396fi 28007fi
29397ac_res=`eval 'as_val=${'$as_ac_Header'} 28008ac_res=`eval echo '${'$as_ac_Header'}'`
29398 $as_echo "$as_val"'` 28009 { echo "$as_me:$LINENO: result: $ac_res" >&5
29399 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 28010echo "${ECHO_T}$ac_res" >&6; }
29400$as_echo "$ac_res" >&6; }
29401else 28011else
29402 # Is the header compilable? 28012 # Is the header compilable?
29403{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 28013{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
29404$as_echo_n "checking $ac_header usability... " >&6; } 28014echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
29405cat >conftest.$ac_ext <<_ACEOF 28015cat >conftest.$ac_ext <<_ACEOF
29406/* confdefs.h. */ 28016/* confdefs.h. */
29407_ACEOF 28017_ACEOF
@@ -29417,33 +28027,32 @@ case "(($ac_try" in
29417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 28027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29418 *) ac_try_echo=$ac_try;; 28028 *) ac_try_echo=$ac_try;;
29419esac 28029esac
29420eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 28030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29421$as_echo "$ac_try_echo") >&5
29422 (eval "$ac_compile") 2>conftest.er1 28031 (eval "$ac_compile") 2>conftest.er1
29423 ac_status=$? 28032 ac_status=$?
29424 grep -v '^ *+' conftest.er1 >conftest.err 28033 grep -v '^ *+' conftest.er1 >conftest.err
29425 rm -f conftest.er1 28034 rm -f conftest.er1
29426 cat conftest.err >&5 28035 cat conftest.err >&5
29427 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 28036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29428 (exit $ac_status); } && { 28037 (exit $ac_status); } && {
29429 test -z "$ac_c_werror_flag" || 28038 test -z "$ac_c_werror_flag" ||
29430 test ! -s conftest.err 28039 test ! -s conftest.err
29431 } && test -s conftest.$ac_objext; then 28040 } && test -s conftest.$ac_objext; then
29432 ac_header_compiler=yes 28041 ac_header_compiler=yes
29433else 28042else
29434 $as_echo "$as_me: failed program was:" >&5 28043 echo "$as_me: failed program was:" >&5
29435sed 's/^/| /' conftest.$ac_ext >&5 28044sed 's/^/| /' conftest.$ac_ext >&5
29436 28045
29437 ac_header_compiler=no 28046 ac_header_compiler=no
29438fi 28047fi
29439 28048
29440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29441{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 28050{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
29442$as_echo "$ac_header_compiler" >&6; } 28051echo "${ECHO_T}$ac_header_compiler" >&6; }
29443 28052
29444# Is the header present? 28053# Is the header present?
29445{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 28054{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
29446$as_echo_n "checking $ac_header presence... " >&6; } 28055echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
29447cat >conftest.$ac_ext <<_ACEOF 28056cat >conftest.$ac_ext <<_ACEOF
29448/* confdefs.h. */ 28057/* confdefs.h. */
29449_ACEOF 28058_ACEOF
@@ -29457,52 +28066,51 @@ case "(($ac_try" in
29457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 28066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29458 *) ac_try_echo=$ac_try;; 28067 *) ac_try_echo=$ac_try;;
29459esac 28068esac
29460eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 28069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29461$as_echo "$ac_try_echo") >&5
29462 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 28070 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
29463 ac_status=$? 28071 ac_status=$?
29464 grep -v '^ *+' conftest.er1 >conftest.err 28072 grep -v '^ *+' conftest.er1 >conftest.err
29465 rm -f conftest.er1 28073 rm -f conftest.er1
29466 cat conftest.err >&5 28074 cat conftest.err >&5
29467 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 28075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29468 (exit $ac_status); } >/dev/null && { 28076 (exit $ac_status); } >/dev/null && {
29469 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 28077 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
29470 test ! -s conftest.err 28078 test ! -s conftest.err
29471 }; then 28079 }; then
29472 ac_header_preproc=yes 28080 ac_header_preproc=yes
29473else 28081else
29474 $as_echo "$as_me: failed program was:" >&5 28082 echo "$as_me: failed program was:" >&5
29475sed 's/^/| /' conftest.$ac_ext >&5 28083sed 's/^/| /' conftest.$ac_ext >&5
29476 28084
29477 ac_header_preproc=no 28085 ac_header_preproc=no
29478fi 28086fi
29479 28087
29480rm -f conftest.err conftest.$ac_ext 28088rm -f conftest.err conftest.$ac_ext
29481{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 28089{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
29482$as_echo "$ac_header_preproc" >&6; } 28090echo "${ECHO_T}$ac_header_preproc" >&6; }
29483 28091
29484# So? What about this header? 28092# So? What about this header?
29485case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 28093case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
29486 yes:no: ) 28094 yes:no: )
29487 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 28095 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
29488$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} 28096echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
29489 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 28097 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
29490$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} 28098echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
29491 ac_header_preproc=yes 28099 ac_header_preproc=yes
29492 ;; 28100 ;;
29493 no:yes:* ) 28101 no:yes:* )
29494 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 28102 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
29495$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} 28103echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
29496 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 28104 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
29497$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} 28105echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
29498 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 28106 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
29499$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 28107echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
29500 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 28108 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
29501$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} 28109echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
29502 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 28110 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
29503$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} 28111echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
29504 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 28112 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
29505$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} 28113echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
29506 ( cat <<\_ASBOX 28114 ( cat <<\_ASBOX
29507## ------------------------------------------- ## 28115## ------------------------------------------- ##
29508## Report this to openssh-unix-dev@mindrot.org ## 28116## Report this to openssh-unix-dev@mindrot.org ##
@@ -29511,23 +28119,21 @@ _ASBOX
29511 ) | sed "s/^/$as_me: WARNING: /" >&2 28119 ) | sed "s/^/$as_me: WARNING: /" >&2
29512 ;; 28120 ;;
29513esac 28121esac
29514{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 28122{ echo "$as_me:$LINENO: checking for $ac_header" >&5
29515$as_echo_n "checking for $ac_header... " >&6; } 28123echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
29516if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 28124if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29517 $as_echo_n "(cached) " >&6 28125 echo $ECHO_N "(cached) $ECHO_C" >&6
29518else 28126else
29519 eval "$as_ac_Header=\$ac_header_preproc" 28127 eval "$as_ac_Header=\$ac_header_preproc"
29520fi 28128fi
29521ac_res=`eval 'as_val=${'$as_ac_Header'} 28129ac_res=`eval echo '${'$as_ac_Header'}'`
29522 $as_echo "$as_val"'` 28130 { echo "$as_me:$LINENO: result: $ac_res" >&5
29523 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 28131echo "${ECHO_T}$ac_res" >&6; }
29524$as_echo "$ac_res" >&6; }
29525 28132
29526fi 28133fi
29527if test `eval 'as_val=${'$as_ac_Header'} 28134if test `eval echo '${'$as_ac_Header'}'` = yes; then
29528 $as_echo "$as_val"'` = yes; then
29529 cat >>confdefs.h <<_ACEOF 28135 cat >>confdefs.h <<_ACEOF
29530#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 28136#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
29531_ACEOF 28137_ACEOF
29532 28138
29533fi 28139fi
@@ -29536,10 +28142,10 @@ done
29536 28142
29537 28143
29538 LIBS="$LIBS $K5LIBS" 28144 LIBS="$LIBS $K5LIBS"
29539 { $as_echo "$as_me:$LINENO: checking for library containing k_hasafs" >&5 28145 { echo "$as_me:$LINENO: checking for library containing k_hasafs" >&5
29540$as_echo_n "checking for library containing k_hasafs... " >&6; } 28146echo $ECHO_N "checking for library containing k_hasafs... $ECHO_C" >&6; }
29541if test "${ac_cv_search_k_hasafs+set}" = set; then 28147if test "${ac_cv_search_k_hasafs+set}" = set; then
29542 $as_echo_n "(cached) " >&6 28148 echo $ECHO_N "(cached) $ECHO_C" >&6
29543else 28149else
29544 ac_func_search_save_LIBS=$LIBS 28150 ac_func_search_save_LIBS=$LIBS
29545cat >conftest.$ac_ext <<_ACEOF 28151cat >conftest.$ac_ext <<_ACEOF
@@ -29577,30 +28183,26 @@ case "(($ac_try" in
29577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 28183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29578 *) ac_try_echo=$ac_try;; 28184 *) ac_try_echo=$ac_try;;
29579esac 28185esac
29580eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 28186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29581$as_echo "$ac_try_echo") >&5
29582 (eval "$ac_link") 2>conftest.er1 28187 (eval "$ac_link") 2>conftest.er1
29583 ac_status=$? 28188 ac_status=$?
29584 grep -v '^ *+' conftest.er1 >conftest.err 28189 grep -v '^ *+' conftest.er1 >conftest.err
29585 rm -f conftest.er1 28190 rm -f conftest.er1
29586 cat conftest.err >&5 28191 cat conftest.err >&5
29587 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 28192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29588 (exit $ac_status); } && { 28193 (exit $ac_status); } && {
29589 test -z "$ac_c_werror_flag" || 28194 test -z "$ac_c_werror_flag" ||
29590 test ! -s conftest.err 28195 test ! -s conftest.err
29591 } && test -s conftest$ac_exeext && { 28196 } && test -s conftest$ac_exeext &&
29592 test "$cross_compiling" = yes || 28197 $as_test_x conftest$ac_exeext; then
29593 $as_test_x conftest$ac_exeext
29594 }; then
29595 ac_cv_search_k_hasafs=$ac_res 28198 ac_cv_search_k_hasafs=$ac_res
29596else 28199else
29597 $as_echo "$as_me: failed program was:" >&5 28200 echo "$as_me: failed program was:" >&5
29598sed 's/^/| /' conftest.$ac_ext >&5 28201sed 's/^/| /' conftest.$ac_ext >&5
29599 28202
29600 28203
29601fi 28204fi
29602 28205
29603rm -rf conftest.dSYM
29604rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 28206rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29605 conftest$ac_exeext 28207 conftest$ac_exeext
29606 if test "${ac_cv_search_k_hasafs+set}" = set; then 28208 if test "${ac_cv_search_k_hasafs+set}" = set; then
@@ -29615,8 +28217,8 @@ fi
29615rm conftest.$ac_ext 28217rm conftest.$ac_ext
29616LIBS=$ac_func_search_save_LIBS 28218LIBS=$ac_func_search_save_LIBS
29617fi 28219fi
29618{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_k_hasafs" >&5 28220{ echo "$as_me:$LINENO: result: $ac_cv_search_k_hasafs" >&5
29619$as_echo "$ac_cv_search_k_hasafs" >&6; } 28221echo "${ECHO_T}$ac_cv_search_k_hasafs" >&6; }
29620ac_res=$ac_cv_search_k_hasafs 28222ac_res=$ac_cv_search_k_hasafs
29621if test "$ac_res" != no; then 28223if test "$ac_res" != no; then
29622 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 28224 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
@@ -29668,10 +28270,10 @@ else
29668 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin" 28270 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin"
29669 # Extract the first word of "xauth", so it can be a program name with args. 28271 # Extract the first word of "xauth", so it can be a program name with args.
29670set dummy xauth; ac_word=$2 28272set dummy xauth; ac_word=$2
29671{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 28273{ echo "$as_me:$LINENO: checking for $ac_word" >&5
29672$as_echo_n "checking for $ac_word... " >&6; } 28274echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
29673if test "${ac_cv_path_xauth_path+set}" = set; then 28275if test "${ac_cv_path_xauth_path+set}" = set; then
29674 $as_echo_n "(cached) " >&6 28276 echo $ECHO_N "(cached) $ECHO_C" >&6
29675else 28277else
29676 case $xauth_path in 28278 case $xauth_path in
29677 [\\/]* | ?:[\\/]*) 28279 [\\/]* | ?:[\\/]*)
@@ -29686,7 +28288,7 @@ do
29686 for ac_exec_ext in '' $ac_executable_extensions; do 28288 for ac_exec_ext in '' $ac_executable_extensions; do
29687 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 28289 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29688 ac_cv_path_xauth_path="$as_dir/$ac_word$ac_exec_ext" 28290 ac_cv_path_xauth_path="$as_dir/$ac_word$ac_exec_ext"
29689 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 28291 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29690 break 2 28292 break 2
29691 fi 28293 fi
29692done 28294done
@@ -29698,11 +28300,11 @@ esac
29698fi 28300fi
29699xauth_path=$ac_cv_path_xauth_path 28301xauth_path=$ac_cv_path_xauth_path
29700if test -n "$xauth_path"; then 28302if test -n "$xauth_path"; then
29701 { $as_echo "$as_me:$LINENO: result: $xauth_path" >&5 28303 { echo "$as_me:$LINENO: result: $xauth_path" >&5
29702$as_echo "$xauth_path" >&6; } 28304echo "${ECHO_T}$xauth_path" >&6; }
29703else 28305else
29704 { $as_echo "$as_me:$LINENO: result: no" >&5 28306 { echo "$as_me:$LINENO: result: no" >&5
29705$as_echo "no" >&6; } 28307echo "${ECHO_T}no" >&6; }
29706fi 28308fi
29707 28309
29708 28310
@@ -29751,20 +28353,20 @@ _ACEOF
29751fi 28353fi
29752 28354
29753if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then 28355if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then
29754 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: Disabling /dev/ptmx test" >&5 28356 { echo "$as_me:$LINENO: WARNING: cross compiling: Disabling /dev/ptmx test" >&5
29755$as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptmx test" >&2;} 28357echo "$as_me: WARNING: cross compiling: Disabling /dev/ptmx test" >&2;}
29756 disable_ptmx_check=yes 28358 disable_ptmx_check=yes
29757fi 28359fi
29758if test -z "$no_dev_ptmx" ; then 28360if test -z "$no_dev_ptmx" ; then
29759 if test "x$disable_ptmx_check" != "xyes" ; then 28361 if test "x$disable_ptmx_check" != "xyes" ; then
29760 { $as_echo "$as_me:$LINENO: checking for \"/dev/ptmx\"" >&5 28362 { echo "$as_me:$LINENO: checking for \"/dev/ptmx\"" >&5
29761$as_echo_n "checking for \"/dev/ptmx\"... " >&6; } 28363echo $ECHO_N "checking for \"/dev/ptmx\"... $ECHO_C" >&6; }
29762if test "${ac_cv_file___dev_ptmx_+set}" = set; then 28364if test "${ac_cv_file___dev_ptmx_+set}" = set; then
29763 $as_echo_n "(cached) " >&6 28365 echo $ECHO_N "(cached) $ECHO_C" >&6
29764else 28366else
29765 test "$cross_compiling" = yes && 28367 test "$cross_compiling" = yes &&
29766 { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 28368 { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
29767$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} 28369echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
29768 { (exit 1); exit 1; }; } 28370 { (exit 1); exit 1; }; }
29769if test -r ""/dev/ptmx""; then 28371if test -r ""/dev/ptmx""; then
29770 ac_cv_file___dev_ptmx_=yes 28372 ac_cv_file___dev_ptmx_=yes
@@ -29772,8 +28374,8 @@ else
29772 ac_cv_file___dev_ptmx_=no 28374 ac_cv_file___dev_ptmx_=no
29773fi 28375fi
29774fi 28376fi
29775{ $as_echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptmx_" >&5 28377{ echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptmx_" >&5
29776$as_echo "$ac_cv_file___dev_ptmx_" >&6; } 28378echo "${ECHO_T}$ac_cv_file___dev_ptmx_" >&6; }
29777if test $ac_cv_file___dev_ptmx_ = yes; then 28379if test $ac_cv_file___dev_ptmx_ = yes; then
29778 28380
29779 28381
@@ -29790,14 +28392,14 @@ fi
29790fi 28392fi
29791 28393
29792if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then 28394if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then
29793 { $as_echo "$as_me:$LINENO: checking for \"/dev/ptc\"" >&5 28395 { echo "$as_me:$LINENO: checking for \"/dev/ptc\"" >&5
29794$as_echo_n "checking for \"/dev/ptc\"... " >&6; } 28396echo $ECHO_N "checking for \"/dev/ptc\"... $ECHO_C" >&6; }
29795if test "${ac_cv_file___dev_ptc_+set}" = set; then 28397if test "${ac_cv_file___dev_ptc_+set}" = set; then
29796 $as_echo_n "(cached) " >&6 28398 echo $ECHO_N "(cached) $ECHO_C" >&6
29797else 28399else
29798 test "$cross_compiling" = yes && 28400 test "$cross_compiling" = yes &&
29799 { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 28401 { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
29800$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} 28402echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
29801 { (exit 1); exit 1; }; } 28403 { (exit 1); exit 1; }; }
29802if test -r ""/dev/ptc""; then 28404if test -r ""/dev/ptc""; then
29803 ac_cv_file___dev_ptc_=yes 28405 ac_cv_file___dev_ptc_=yes
@@ -29805,8 +28407,8 @@ else
29805 ac_cv_file___dev_ptc_=no 28407 ac_cv_file___dev_ptc_=no
29806fi 28408fi
29807fi 28409fi
29808{ $as_echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptc_" >&5 28410{ echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptc_" >&5
29809$as_echo "$ac_cv_file___dev_ptc_" >&6; } 28411echo "${ECHO_T}$ac_cv_file___dev_ptc_" >&6; }
29810if test $ac_cv_file___dev_ptc_ = yes; then 28412if test $ac_cv_file___dev_ptc_ = yes; then
29811 28413
29812 28414
@@ -29820,8 +28422,8 @@ _ACEOF
29820fi 28422fi
29821 28423
29822else 28424else
29823 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: Disabling /dev/ptc test" >&5 28425 { echo "$as_me:$LINENO: WARNING: cross compiling: Disabling /dev/ptc test" >&5
29824$as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptc test" >&2;} 28426echo "$as_me: WARNING: cross compiling: Disabling /dev/ptc test" >&2;}
29825fi 28427fi
29826 28428
29827# Options from here on. Some of these are preset by platform above 28429# Options from here on. Some of these are preset by platform above
@@ -29834,8 +28436,8 @@ if test "${with_mantype+set}" = set; then
29834 MANTYPE=$withval 28436 MANTYPE=$withval
29835 ;; 28437 ;;
29836 *) 28438 *)
29837 { { $as_echo "$as_me:$LINENO: error: invalid man type: $withval" >&5 28439 { { echo "$as_me:$LINENO: error: invalid man type: $withval" >&5
29838$as_echo "$as_me: error: invalid man type: $withval" >&2;} 28440echo "$as_me: error: invalid man type: $withval" >&2;}
29839 { (exit 1); exit 1; }; } 28441 { (exit 1); exit 1; }; }
29840 ;; 28442 ;;
29841 esac 28443 esac
@@ -29849,10 +28451,10 @@ if test -z "$MANTYPE"; then
29849do 28451do
29850 # Extract the first word of "$ac_prog", so it can be a program name with args. 28452 # Extract the first word of "$ac_prog", so it can be a program name with args.
29851set dummy $ac_prog; ac_word=$2 28453set dummy $ac_prog; ac_word=$2
29852{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 28454{ echo "$as_me:$LINENO: checking for $ac_word" >&5
29853$as_echo_n "checking for $ac_word... " >&6; } 28455echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
29854if test "${ac_cv_path_NROFF+set}" = set; then 28456if test "${ac_cv_path_NROFF+set}" = set; then
29855 $as_echo_n "(cached) " >&6 28457 echo $ECHO_N "(cached) $ECHO_C" >&6
29856else 28458else
29857 case $NROFF in 28459 case $NROFF in
29858 [\\/]* | ?:[\\/]*) 28460 [\\/]* | ?:[\\/]*)
@@ -29867,7 +28469,7 @@ do
29867 for ac_exec_ext in '' $ac_executable_extensions; do 28469 for ac_exec_ext in '' $ac_executable_extensions; do
29868 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 28470 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29869 ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext" 28471 ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
29870 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 28472 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29871 break 2 28473 break 2
29872 fi 28474 fi
29873done 28475done
@@ -29879,11 +28481,11 @@ esac
29879fi 28481fi
29880NROFF=$ac_cv_path_NROFF 28482NROFF=$ac_cv_path_NROFF
29881if test -n "$NROFF"; then 28483if test -n "$NROFF"; then
29882 { $as_echo "$as_me:$LINENO: result: $NROFF" >&5 28484 { echo "$as_me:$LINENO: result: $NROFF" >&5
29883$as_echo "$NROFF" >&6; } 28485echo "${ECHO_T}$NROFF" >&6; }
29884else 28486else
29885 { $as_echo "$as_me:$LINENO: result: no" >&5 28487 { echo "$as_me:$LINENO: result: no" >&5
29886$as_echo "no" >&6; } 28488echo "${ECHO_T}no" >&6; }
29887fi 28489fi
29888 28490
29889 28491
@@ -29944,8 +28546,8 @@ fi
29944 28546
29945 28547
29946if test -z "$disable_shadow" ; then 28548if test -z "$disable_shadow" ; then
29947 { $as_echo "$as_me:$LINENO: checking if the systems has expire shadow information" >&5 28549 { echo "$as_me:$LINENO: checking if the systems has expire shadow information" >&5
29948$as_echo_n "checking if the systems has expire shadow information... " >&6; } 28550echo $ECHO_N "checking if the systems has expire shadow information... $ECHO_C" >&6; }
29949 cat >conftest.$ac_ext <<_ACEOF 28551 cat >conftest.$ac_ext <<_ACEOF
29950/* confdefs.h. */ 28552/* confdefs.h. */
29951_ACEOF 28553_ACEOF
@@ -29971,21 +28573,20 @@ case "(($ac_try" in
29971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 28573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29972 *) ac_try_echo=$ac_try;; 28574 *) ac_try_echo=$ac_try;;
29973esac 28575esac
29974eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 28576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29975$as_echo "$ac_try_echo") >&5
29976 (eval "$ac_compile") 2>conftest.er1 28577 (eval "$ac_compile") 2>conftest.er1
29977 ac_status=$? 28578 ac_status=$?
29978 grep -v '^ *+' conftest.er1 >conftest.err 28579 grep -v '^ *+' conftest.er1 >conftest.err
29979 rm -f conftest.er1 28580 rm -f conftest.er1
29980 cat conftest.err >&5 28581 cat conftest.err >&5
29981 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 28582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29982 (exit $ac_status); } && { 28583 (exit $ac_status); } && {
29983 test -z "$ac_c_werror_flag" || 28584 test -z "$ac_c_werror_flag" ||
29984 test ! -s conftest.err 28585 test ! -s conftest.err
29985 } && test -s conftest.$ac_objext; then 28586 } && test -s conftest.$ac_objext; then
29986 sp_expire_available=yes 28587 sp_expire_available=yes
29987else 28588else
29988 $as_echo "$as_me: failed program was:" >&5 28589 echo "$as_me: failed program was:" >&5
29989sed 's/^/| /' conftest.$ac_ext >&5 28590sed 's/^/| /' conftest.$ac_ext >&5
29990 28591
29991 28592
@@ -29995,16 +28596,16 @@ fi
29995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29996 28597
29997 if test "x$sp_expire_available" = "xyes" ; then 28598 if test "x$sp_expire_available" = "xyes" ; then
29998 { $as_echo "$as_me:$LINENO: result: yes" >&5 28599 { echo "$as_me:$LINENO: result: yes" >&5
29999$as_echo "yes" >&6; } 28600echo "${ECHO_T}yes" >&6; }
30000 28601
30001cat >>confdefs.h <<\_ACEOF 28602cat >>confdefs.h <<\_ACEOF
30002#define HAS_SHADOW_EXPIRE 1 28603#define HAS_SHADOW_EXPIRE 1
30003_ACEOF 28604_ACEOF
30004 28605
30005 else 28606 else
30006 { $as_echo "$as_me:$LINENO: result: no" >&5 28607 { echo "$as_me:$LINENO: result: no" >&5
30007$as_echo "no" >&6; } 28608echo "${ECHO_T}no" >&6; }
30008 fi 28609 fi
30009fi 28610fi
30010 28611
@@ -30039,8 +28640,8 @@ fi
30039# Check whether --enable-etc-default-login was given. 28640# Check whether --enable-etc-default-login was given.
30040if test "${enable_etc_default_login+set}" = set; then 28641if test "${enable_etc_default_login+set}" = set; then
30041 enableval=$enable_etc_default_login; if test "x$enableval" = "xno"; then 28642 enableval=$enable_etc_default_login; if test "x$enableval" = "xno"; then
30042 { $as_echo "$as_me:$LINENO: /etc/default/login handling disabled" >&5 28643 { echo "$as_me:$LINENO: /etc/default/login handling disabled" >&5
30043$as_echo "$as_me: /etc/default/login handling disabled" >&6;} 28644echo "$as_me: /etc/default/login handling disabled" >&6;}
30044 etc_default_login=no 28645 etc_default_login=no
30045 else 28646 else
30046 etc_default_login=yes 28647 etc_default_login=yes
@@ -30048,8 +28649,8 @@ $as_echo "$as_me: /etc/default/login handling disabled" >&6;}
30048else 28649else
30049 if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; 28650 if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes";
30050 then 28651 then
30051 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: not checking /etc/default/login" >&5 28652 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking /etc/default/login" >&5
30052$as_echo "$as_me: WARNING: cross compiling: not checking /etc/default/login" >&2;} 28653echo "$as_me: WARNING: cross compiling: not checking /etc/default/login" >&2;}
30053 etc_default_login=no 28654 etc_default_login=no
30054 else 28655 else
30055 etc_default_login=yes 28656 etc_default_login=yes
@@ -30059,14 +28660,14 @@ fi
30059 28660
30060 28661
30061if test "x$etc_default_login" != "xno"; then 28662if test "x$etc_default_login" != "xno"; then
30062 { $as_echo "$as_me:$LINENO: checking for \"/etc/default/login\"" >&5 28663 { echo "$as_me:$LINENO: checking for \"/etc/default/login\"" >&5
30063$as_echo_n "checking for \"/etc/default/login\"... " >&6; } 28664echo $ECHO_N "checking for \"/etc/default/login\"... $ECHO_C" >&6; }
30064if test "${ac_cv_file___etc_default_login_+set}" = set; then 28665if test "${ac_cv_file___etc_default_login_+set}" = set; then
30065 $as_echo_n "(cached) " >&6 28666 echo $ECHO_N "(cached) $ECHO_C" >&6
30066else 28667else
30067 test "$cross_compiling" = yes && 28668 test "$cross_compiling" = yes &&
30068 { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 28669 { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
30069$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} 28670echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
30070 { (exit 1); exit 1; }; } 28671 { (exit 1); exit 1; }; }
30071if test -r ""/etc/default/login""; then 28672if test -r ""/etc/default/login""; then
30072 ac_cv_file___etc_default_login_=yes 28673 ac_cv_file___etc_default_login_=yes
@@ -30074,8 +28675,8 @@ else
30074 ac_cv_file___etc_default_login_=no 28675 ac_cv_file___etc_default_login_=no
30075fi 28676fi
30076fi 28677fi
30077{ $as_echo "$as_me:$LINENO: result: $ac_cv_file___etc_default_login_" >&5 28678{ echo "$as_me:$LINENO: result: $ac_cv_file___etc_default_login_" >&5
30078$as_echo "$ac_cv_file___etc_default_login_" >&6; } 28679echo "${ECHO_T}$ac_cv_file___etc_default_login_" >&6; }
30079if test $ac_cv_file___etc_default_login_ = yes; then 28680if test $ac_cv_file___etc_default_login_ = yes; then
30080 external_path_file=/etc/default/login 28681 external_path_file=/etc/default/login
30081fi 28682fi
@@ -30101,18 +28702,18 @@ SERVER_PATH_MSG="(default)"
30101if test "${with_default_path+set}" = set; then 28702if test "${with_default_path+set}" = set; then
30102 withval=$with_default_path; 28703 withval=$with_default_path;
30103 if test "x$external_path_file" = "x/etc/login.conf" ; then 28704 if test "x$external_path_file" = "x/etc/login.conf" ; then
30104 { $as_echo "$as_me:$LINENO: WARNING: 28705 { echo "$as_me:$LINENO: WARNING:
30105--with-default-path=PATH has no effect on this system. 28706--with-default-path=PATH has no effect on this system.
30106Edit /etc/login.conf instead." >&5 28707Edit /etc/login.conf instead." >&5
30107$as_echo "$as_me: WARNING: 28708echo "$as_me: WARNING:
30108--with-default-path=PATH has no effect on this system. 28709--with-default-path=PATH has no effect on this system.
30109Edit /etc/login.conf instead." >&2;} 28710Edit /etc/login.conf instead." >&2;}
30110 elif test "x$withval" != "xno" ; then 28711 elif test "x$withval" != "xno" ; then
30111 if test ! -z "$external_path_file" ; then 28712 if test ! -z "$external_path_file" ; then
30112 { $as_echo "$as_me:$LINENO: WARNING: 28713 { echo "$as_me:$LINENO: WARNING:
30113--with-default-path=PATH will only be used if PATH is not defined in 28714--with-default-path=PATH will only be used if PATH is not defined in
30114$external_path_file ." >&5 28715$external_path_file ." >&5
30115$as_echo "$as_me: WARNING: 28716echo "$as_me: WARNING:
30116--with-default-path=PATH will only be used if PATH is not defined in 28717--with-default-path=PATH will only be used if PATH is not defined in
30117$external_path_file ." >&2;} 28718$external_path_file ." >&2;}
30118 fi 28719 fi
@@ -30122,14 +28723,14 @@ $external_path_file ." >&2;}
30122 28723
30123else 28724else
30124 if test "x$external_path_file" = "x/etc/login.conf" ; then 28725 if test "x$external_path_file" = "x/etc/login.conf" ; then
30125 { $as_echo "$as_me:$LINENO: WARNING: Make sure the path to scp is in /etc/login.conf" >&5 28726 { echo "$as_me:$LINENO: WARNING: Make sure the path to scp is in /etc/login.conf" >&5
30126$as_echo "$as_me: WARNING: Make sure the path to scp is in /etc/login.conf" >&2;} 28727echo "$as_me: WARNING: Make sure the path to scp is in /etc/login.conf" >&2;}
30127 else 28728 else
30128 if test ! -z "$external_path_file" ; then 28729 if test ! -z "$external_path_file" ; then
30129 { $as_echo "$as_me:$LINENO: WARNING: 28730 { echo "$as_me:$LINENO: WARNING:
30130If PATH is defined in $external_path_file, ensure the path to scp is included, 28731If PATH is defined in $external_path_file, ensure the path to scp is included,
30131otherwise scp will not work." >&5 28732otherwise scp will not work." >&5
30132$as_echo "$as_me: WARNING: 28733echo "$as_me: WARNING:
30133If PATH is defined in $external_path_file, ensure the path to scp is included, 28734If PATH is defined in $external_path_file, ensure the path to scp is included,
30134otherwise scp will not work." >&2;} 28735otherwise scp will not work." >&2;}
30135 fi 28736 fi
@@ -30183,32 +28784,29 @@ case "(($ac_try" in
30183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 28784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30184 *) ac_try_echo=$ac_try;; 28785 *) ac_try_echo=$ac_try;;
30185esac 28786esac
30186eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 28787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30187$as_echo "$ac_try_echo") >&5
30188 (eval "$ac_link") 2>&5 28788 (eval "$ac_link") 2>&5
30189 ac_status=$? 28789 ac_status=$?
30190 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 28790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30191 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 28791 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
30192 { (case "(($ac_try" in 28792 { (case "(($ac_try" in
30193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 28793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30194 *) ac_try_echo=$ac_try;; 28794 *) ac_try_echo=$ac_try;;
30195esac 28795esac
30196eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 28796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30197$as_echo "$ac_try_echo") >&5
30198 (eval "$ac_try") 2>&5 28797 (eval "$ac_try") 2>&5
30199 ac_status=$? 28798 ac_status=$?
30200 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 28799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30201 (exit $ac_status); }; }; then 28800 (exit $ac_status); }; }; then
30202 user_path=`cat conftest.stdpath` 28801 user_path=`cat conftest.stdpath`
30203else 28802else
30204 $as_echo "$as_me: program exited with status $ac_status" >&5 28803 echo "$as_me: program exited with status $ac_status" >&5
30205$as_echo "$as_me: failed program was:" >&5 28804echo "$as_me: failed program was:" >&5
30206sed 's/^/| /' conftest.$ac_ext >&5 28805sed 's/^/| /' conftest.$ac_ext >&5
30207 28806
30208( exit $ac_status ) 28807( exit $ac_status )
30209 user_path="/usr/bin:/bin:/usr/sbin:/sbin" 28808 user_path="/usr/bin:/bin:/usr/sbin:/sbin"
30210fi 28809fi
30211rm -rf conftest.dSYM
30212rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 28810rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
30213fi 28811fi
30214 28812
@@ -30226,8 +28824,8 @@ fi
30226 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1 28824 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1
30227 if test $? -ne 0 ; then 28825 if test $? -ne 0 ; then
30228 user_path=$user_path:$t_bindir 28826 user_path=$user_path:$t_bindir
30229 { $as_echo "$as_me:$LINENO: result: Adding $t_bindir to USER_PATH so scp will work" >&5 28827 { echo "$as_me:$LINENO: result: Adding $t_bindir to USER_PATH so scp will work" >&5
30230$as_echo "Adding $t_bindir to USER_PATH so scp will work" >&6; } 28828echo "${ECHO_T}Adding $t_bindir to USER_PATH so scp will work" >&6; }
30231 fi 28829 fi
30232 fi 28830 fi
30233 fi 28831 fi
@@ -30263,16 +28861,16 @@ fi
30263 28861
30264 28862
30265 28863
30266{ $as_echo "$as_me:$LINENO: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5 28864{ echo "$as_me:$LINENO: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5
30267$as_echo_n "checking if we need to convert IPv4 in IPv6-mapped addresses... " >&6; } 28865echo $ECHO_N "checking if we need to convert IPv4 in IPv6-mapped addresses... $ECHO_C" >&6; }
30268IPV4_IN6_HACK_MSG="no" 28866IPV4_IN6_HACK_MSG="no"
30269 28867
30270# Check whether --with-4in6 was given. 28868# Check whether --with-4in6 was given.
30271if test "${with_4in6+set}" = set; then 28869if test "${with_4in6+set}" = set; then
30272 withval=$with_4in6; 28870 withval=$with_4in6;
30273 if test "x$withval" != "xno" ; then 28871 if test "x$withval" != "xno" ; then
30274 { $as_echo "$as_me:$LINENO: result: yes" >&5 28872 { echo "$as_me:$LINENO: result: yes" >&5
30275$as_echo "yes" >&6; } 28873echo "${ECHO_T}yes" >&6; }
30276 28874
30277cat >>confdefs.h <<\_ACEOF 28875cat >>confdefs.h <<\_ACEOF
30278#define IPV4_IN_IPV6 1 28876#define IPV4_IN_IPV6 1
@@ -30280,23 +28878,23 @@ _ACEOF
30280 28878
30281 IPV4_IN6_HACK_MSG="yes" 28879 IPV4_IN6_HACK_MSG="yes"
30282 else 28880 else
30283 { $as_echo "$as_me:$LINENO: result: no" >&5 28881 { echo "$as_me:$LINENO: result: no" >&5
30284$as_echo "no" >&6; } 28882echo "${ECHO_T}no" >&6; }
30285 fi 28883 fi
30286 28884
30287else 28885else
30288 28886
30289 if test "x$inet6_default_4in6" = "xyes"; then 28887 if test "x$inet6_default_4in6" = "xyes"; then
30290 { $as_echo "$as_me:$LINENO: result: yes (default)" >&5 28888 { echo "$as_me:$LINENO: result: yes (default)" >&5
30291$as_echo "yes (default)" >&6; } 28889echo "${ECHO_T}yes (default)" >&6; }
30292 cat >>confdefs.h <<\_ACEOF 28890 cat >>confdefs.h <<\_ACEOF
30293#define IPV4_IN_IPV6 1 28891#define IPV4_IN_IPV6 1
30294_ACEOF 28892_ACEOF
30295 28893
30296 IPV4_IN6_HACK_MSG="yes" 28894 IPV4_IN6_HACK_MSG="yes"
30297 else 28895 else
30298 { $as_echo "$as_me:$LINENO: result: no (default)" >&5 28896 { echo "$as_me:$LINENO: result: no (default)" >&5
30299$as_echo "no (default)" >&6; } 28897echo "${ECHO_T}no (default)" >&6; }
30300 fi 28898 fi
30301 28899
30302 28900
@@ -30340,8 +28938,8 @@ if test "${with_pid_dir+set}" = set; then
30340 test "x${withval}" != "xyes"; then 28938 test "x${withval}" != "xyes"; then
30341 piddir=$withval 28939 piddir=$withval
30342 if test ! -d $piddir ; then 28940 if test ! -d $piddir ; then
30343 { $as_echo "$as_me:$LINENO: WARNING: ** no $piddir directory on this system **" >&5 28941 { echo "$as_me:$LINENO: WARNING: ** no $piddir directory on this system **" >&5
30344$as_echo "$as_me: WARNING: ** no $piddir directory on this system **" >&2;} 28942echo "$as_me: WARNING: ** no $piddir directory on this system **" >&2;}
30345 fi 28943 fi
30346 fi 28944 fi
30347 28945
@@ -30482,8 +29080,8 @@ fi
30482 29080
30483 29081
30484 29082
30485{ $as_echo "$as_me:$LINENO: checking if your system defines LASTLOG_FILE" >&5 29083{ echo "$as_me:$LINENO: checking if your system defines LASTLOG_FILE" >&5
30486$as_echo_n "checking if your system defines LASTLOG_FILE... " >&6; } 29084echo $ECHO_N "checking if your system defines LASTLOG_FILE... $ECHO_C" >&6; }
30487cat >conftest.$ac_ext <<_ACEOF 29085cat >conftest.$ac_ext <<_ACEOF
30488/* confdefs.h. */ 29086/* confdefs.h. */
30489_ACEOF 29087_ACEOF
@@ -30517,29 +29115,28 @@ case "(($ac_try" in
30517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 29115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30518 *) ac_try_echo=$ac_try;; 29116 *) ac_try_echo=$ac_try;;
30519esac 29117esac
30520eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 29118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30521$as_echo "$ac_try_echo") >&5
30522 (eval "$ac_compile") 2>conftest.er1 29119 (eval "$ac_compile") 2>conftest.er1
30523 ac_status=$? 29120 ac_status=$?
30524 grep -v '^ *+' conftest.er1 >conftest.err 29121 grep -v '^ *+' conftest.er1 >conftest.err
30525 rm -f conftest.er1 29122 rm -f conftest.er1
30526 cat conftest.err >&5 29123 cat conftest.err >&5
30527 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 29124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30528 (exit $ac_status); } && { 29125 (exit $ac_status); } && {
30529 test -z "$ac_c_werror_flag" || 29126 test -z "$ac_c_werror_flag" ||
30530 test ! -s conftest.err 29127 test ! -s conftest.err
30531 } && test -s conftest.$ac_objext; then 29128 } && test -s conftest.$ac_objext; then
30532 { $as_echo "$as_me:$LINENO: result: yes" >&5 29129 { echo "$as_me:$LINENO: result: yes" >&5
30533$as_echo "yes" >&6; } 29130echo "${ECHO_T}yes" >&6; }
30534else 29131else
30535 $as_echo "$as_me: failed program was:" >&5 29132 echo "$as_me: failed program was:" >&5
30536sed 's/^/| /' conftest.$ac_ext >&5 29133sed 's/^/| /' conftest.$ac_ext >&5
30537 29134
30538 29135
30539 { $as_echo "$as_me:$LINENO: result: no" >&5 29136 { echo "$as_me:$LINENO: result: no" >&5
30540$as_echo "no" >&6; } 29137echo "${ECHO_T}no" >&6; }
30541 { $as_echo "$as_me:$LINENO: checking if your system defines _PATH_LASTLOG" >&5 29138 { echo "$as_me:$LINENO: checking if your system defines _PATH_LASTLOG" >&5
30542$as_echo_n "checking if your system defines _PATH_LASTLOG... " >&6; } 29139echo $ECHO_N "checking if your system defines _PATH_LASTLOG... $ECHO_C" >&6; }
30543 cat >conftest.$ac_ext <<_ACEOF 29140 cat >conftest.$ac_ext <<_ACEOF
30544/* confdefs.h. */ 29141/* confdefs.h. */
30545_ACEOF 29142_ACEOF
@@ -30570,27 +29167,26 @@ case "(($ac_try" in
30570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 29167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30571 *) ac_try_echo=$ac_try;; 29168 *) ac_try_echo=$ac_try;;
30572esac 29169esac
30573eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 29170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30574$as_echo "$ac_try_echo") >&5
30575 (eval "$ac_compile") 2>conftest.er1 29171 (eval "$ac_compile") 2>conftest.er1
30576 ac_status=$? 29172 ac_status=$?
30577 grep -v '^ *+' conftest.er1 >conftest.err 29173 grep -v '^ *+' conftest.er1 >conftest.err
30578 rm -f conftest.er1 29174 rm -f conftest.er1
30579 cat conftest.err >&5 29175 cat conftest.err >&5
30580 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 29176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30581 (exit $ac_status); } && { 29177 (exit $ac_status); } && {
30582 test -z "$ac_c_werror_flag" || 29178 test -z "$ac_c_werror_flag" ||
30583 test ! -s conftest.err 29179 test ! -s conftest.err
30584 } && test -s conftest.$ac_objext; then 29180 } && test -s conftest.$ac_objext; then
30585 { $as_echo "$as_me:$LINENO: result: yes" >&5 29181 { echo "$as_me:$LINENO: result: yes" >&5
30586$as_echo "yes" >&6; } 29182echo "${ECHO_T}yes" >&6; }
30587else 29183else
30588 $as_echo "$as_me: failed program was:" >&5 29184 echo "$as_me: failed program was:" >&5
30589sed 's/^/| /' conftest.$ac_ext >&5 29185sed 's/^/| /' conftest.$ac_ext >&5
30590 29186
30591 29187
30592 { $as_echo "$as_me:$LINENO: result: no" >&5 29188 { echo "$as_me:$LINENO: result: no" >&5
30593$as_echo "no" >&6; } 29189echo "${ECHO_T}no" >&6; }
30594 system_lastlog_path=no 29190 system_lastlog_path=no
30595 29191
30596fi 29192fi
@@ -30610,8 +29206,8 @@ if test -z "$conf_lastlog_location"; then
30610 fi 29206 fi
30611 done 29207 done
30612 if test -z "$conf_lastlog_location"; then 29208 if test -z "$conf_lastlog_location"; then
30613 { $as_echo "$as_me:$LINENO: WARNING: ** Cannot find lastlog **" >&5 29209 { echo "$as_me:$LINENO: WARNING: ** Cannot find lastlog **" >&5
30614$as_echo "$as_me: WARNING: ** Cannot find lastlog **" >&2;} 29210echo "$as_me: WARNING: ** Cannot find lastlog **" >&2;}
30615 fi 29211 fi
30616 fi 29212 fi
30617fi 29213fi
@@ -30624,8 +29220,8 @@ _ACEOF
30624 29220
30625fi 29221fi
30626 29222
30627{ $as_echo "$as_me:$LINENO: checking if your system defines UTMP_FILE" >&5 29223{ echo "$as_me:$LINENO: checking if your system defines UTMP_FILE" >&5
30628$as_echo_n "checking if your system defines UTMP_FILE... " >&6; } 29224echo $ECHO_N "checking if your system defines UTMP_FILE... $ECHO_C" >&6; }
30629cat >conftest.$ac_ext <<_ACEOF 29225cat >conftest.$ac_ext <<_ACEOF
30630/* confdefs.h. */ 29226/* confdefs.h. */
30631_ACEOF 29227_ACEOF
@@ -30653,26 +29249,25 @@ case "(($ac_try" in
30653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 29249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30654 *) ac_try_echo=$ac_try;; 29250 *) ac_try_echo=$ac_try;;
30655esac 29251esac
30656eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 29252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30657$as_echo "$ac_try_echo") >&5
30658 (eval "$ac_compile") 2>conftest.er1 29253 (eval "$ac_compile") 2>conftest.er1
30659 ac_status=$? 29254 ac_status=$?
30660 grep -v '^ *+' conftest.er1 >conftest.err 29255 grep -v '^ *+' conftest.er1 >conftest.err
30661 rm -f conftest.er1 29256 rm -f conftest.er1
30662 cat conftest.err >&5 29257 cat conftest.err >&5
30663 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 29258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30664 (exit $ac_status); } && { 29259 (exit $ac_status); } && {
30665 test -z "$ac_c_werror_flag" || 29260 test -z "$ac_c_werror_flag" ||
30666 test ! -s conftest.err 29261 test ! -s conftest.err
30667 } && test -s conftest.$ac_objext; then 29262 } && test -s conftest.$ac_objext; then
30668 { $as_echo "$as_me:$LINENO: result: yes" >&5 29263 { echo "$as_me:$LINENO: result: yes" >&5
30669$as_echo "yes" >&6; } 29264echo "${ECHO_T}yes" >&6; }
30670else 29265else
30671 $as_echo "$as_me: failed program was:" >&5 29266 echo "$as_me: failed program was:" >&5
30672sed 's/^/| /' conftest.$ac_ext >&5 29267sed 's/^/| /' conftest.$ac_ext >&5
30673 29268
30674 { $as_echo "$as_me:$LINENO: result: no" >&5 29269 { echo "$as_me:$LINENO: result: no" >&5
30675$as_echo "no" >&6; } 29270echo "${ECHO_T}no" >&6; }
30676 system_utmp_path=no 29271 system_utmp_path=no
30677 29272
30678fi 29273fi
@@ -30701,8 +29296,8 @@ _ACEOF
30701 29296
30702fi 29297fi
30703 29298
30704{ $as_echo "$as_me:$LINENO: checking if your system defines WTMP_FILE" >&5 29299{ echo "$as_me:$LINENO: checking if your system defines WTMP_FILE" >&5
30705$as_echo_n "checking if your system defines WTMP_FILE... " >&6; } 29300echo $ECHO_N "checking if your system defines WTMP_FILE... $ECHO_C" >&6; }
30706cat >conftest.$ac_ext <<_ACEOF 29301cat >conftest.$ac_ext <<_ACEOF
30707/* confdefs.h. */ 29302/* confdefs.h. */
30708_ACEOF 29303_ACEOF
@@ -30730,26 +29325,25 @@ case "(($ac_try" in
30730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 29325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30731 *) ac_try_echo=$ac_try;; 29326 *) ac_try_echo=$ac_try;;
30732esac 29327esac
30733eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 29328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30734$as_echo "$ac_try_echo") >&5
30735 (eval "$ac_compile") 2>conftest.er1 29329 (eval "$ac_compile") 2>conftest.er1
30736 ac_status=$? 29330 ac_status=$?
30737 grep -v '^ *+' conftest.er1 >conftest.err 29331 grep -v '^ *+' conftest.er1 >conftest.err
30738 rm -f conftest.er1 29332 rm -f conftest.er1
30739 cat conftest.err >&5 29333 cat conftest.err >&5
30740 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 29334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30741 (exit $ac_status); } && { 29335 (exit $ac_status); } && {
30742 test -z "$ac_c_werror_flag" || 29336 test -z "$ac_c_werror_flag" ||
30743 test ! -s conftest.err 29337 test ! -s conftest.err
30744 } && test -s conftest.$ac_objext; then 29338 } && test -s conftest.$ac_objext; then
30745 { $as_echo "$as_me:$LINENO: result: yes" >&5 29339 { echo "$as_me:$LINENO: result: yes" >&5
30746$as_echo "yes" >&6; } 29340echo "${ECHO_T}yes" >&6; }
30747else 29341else
30748 $as_echo "$as_me: failed program was:" >&5 29342 echo "$as_me: failed program was:" >&5
30749sed 's/^/| /' conftest.$ac_ext >&5 29343sed 's/^/| /' conftest.$ac_ext >&5
30750 29344
30751 { $as_echo "$as_me:$LINENO: result: no" >&5 29345 { echo "$as_me:$LINENO: result: no" >&5
30752$as_echo "no" >&6; } 29346echo "${ECHO_T}no" >&6; }
30753 system_wtmp_path=no 29347 system_wtmp_path=no
30754 29348
30755fi 29349fi
@@ -30779,8 +29373,8 @@ _ACEOF
30779fi 29373fi
30780 29374
30781 29375
30782{ $as_echo "$as_me:$LINENO: checking if your system defines UTMPX_FILE" >&5 29376{ echo "$as_me:$LINENO: checking if your system defines UTMPX_FILE" >&5
30783$as_echo_n "checking if your system defines UTMPX_FILE... " >&6; } 29377echo $ECHO_N "checking if your system defines UTMPX_FILE... $ECHO_C" >&6; }
30784cat >conftest.$ac_ext <<_ACEOF 29378cat >conftest.$ac_ext <<_ACEOF
30785/* confdefs.h. */ 29379/* confdefs.h. */
30786_ACEOF 29380_ACEOF
@@ -30811,26 +29405,25 @@ case "(($ac_try" in
30811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 29405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30812 *) ac_try_echo=$ac_try;; 29406 *) ac_try_echo=$ac_try;;
30813esac 29407esac
30814eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 29408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30815$as_echo "$ac_try_echo") >&5
30816 (eval "$ac_compile") 2>conftest.er1 29409 (eval "$ac_compile") 2>conftest.er1
30817 ac_status=$? 29410 ac_status=$?
30818 grep -v '^ *+' conftest.er1 >conftest.err 29411 grep -v '^ *+' conftest.er1 >conftest.err
30819 rm -f conftest.er1 29412 rm -f conftest.er1
30820 cat conftest.err >&5 29413 cat conftest.err >&5
30821 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 29414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30822 (exit $ac_status); } && { 29415 (exit $ac_status); } && {
30823 test -z "$ac_c_werror_flag" || 29416 test -z "$ac_c_werror_flag" ||
30824 test ! -s conftest.err 29417 test ! -s conftest.err
30825 } && test -s conftest.$ac_objext; then 29418 } && test -s conftest.$ac_objext; then
30826 { $as_echo "$as_me:$LINENO: result: yes" >&5 29419 { echo "$as_me:$LINENO: result: yes" >&5
30827$as_echo "yes" >&6; } 29420echo "${ECHO_T}yes" >&6; }
30828else 29421else
30829 $as_echo "$as_me: failed program was:" >&5 29422 echo "$as_me: failed program was:" >&5
30830sed 's/^/| /' conftest.$ac_ext >&5 29423sed 's/^/| /' conftest.$ac_ext >&5
30831 29424
30832 { $as_echo "$as_me:$LINENO: result: no" >&5 29425 { echo "$as_me:$LINENO: result: no" >&5
30833$as_echo "no" >&6; } 29426echo "${ECHO_T}no" >&6; }
30834 system_utmpx_path=no 29427 system_utmpx_path=no
30835 29428
30836fi 29429fi
@@ -30851,8 +29444,8 @@ _ACEOF
30851 29444
30852fi 29445fi
30853 29446
30854{ $as_echo "$as_me:$LINENO: checking if your system defines WTMPX_FILE" >&5 29447{ echo "$as_me:$LINENO: checking if your system defines WTMPX_FILE" >&5
30855$as_echo_n "checking if your system defines WTMPX_FILE... " >&6; } 29448echo $ECHO_N "checking if your system defines WTMPX_FILE... $ECHO_C" >&6; }
30856cat >conftest.$ac_ext <<_ACEOF 29449cat >conftest.$ac_ext <<_ACEOF
30857/* confdefs.h. */ 29450/* confdefs.h. */
30858_ACEOF 29451_ACEOF
@@ -30883,26 +29476,25 @@ case "(($ac_try" in
30883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 29476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30884 *) ac_try_echo=$ac_try;; 29477 *) ac_try_echo=$ac_try;;
30885esac 29478esac
30886eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 29479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30887$as_echo "$ac_try_echo") >&5
30888 (eval "$ac_compile") 2>conftest.er1 29480 (eval "$ac_compile") 2>conftest.er1
30889 ac_status=$? 29481 ac_status=$?
30890 grep -v '^ *+' conftest.er1 >conftest.err 29482 grep -v '^ *+' conftest.er1 >conftest.err
30891 rm -f conftest.er1 29483 rm -f conftest.er1
30892 cat conftest.err >&5 29484 cat conftest.err >&5
30893 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 29485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30894 (exit $ac_status); } && { 29486 (exit $ac_status); } && {
30895 test -z "$ac_c_werror_flag" || 29487 test -z "$ac_c_werror_flag" ||
30896 test ! -s conftest.err 29488 test ! -s conftest.err
30897 } && test -s conftest.$ac_objext; then 29489 } && test -s conftest.$ac_objext; then
30898 { $as_echo "$as_me:$LINENO: result: yes" >&5 29490 { echo "$as_me:$LINENO: result: yes" >&5
30899$as_echo "yes" >&6; } 29491echo "${ECHO_T}yes" >&6; }
30900else 29492else
30901 $as_echo "$as_me: failed program was:" >&5 29493 echo "$as_me: failed program was:" >&5
30902sed 's/^/| /' conftest.$ac_ext >&5 29494sed 's/^/| /' conftest.$ac_ext >&5
30903 29495
30904 { $as_echo "$as_me:$LINENO: result: no" >&5 29496 { echo "$as_me:$LINENO: result: no" >&5
30905$as_echo "no" >&6; } 29497echo "${ECHO_T}no" >&6; }
30906 system_wtmpx_path=no 29498 system_wtmpx_path=no
30907 29499
30908fi 29500fi
@@ -30926,8 +29518,8 @@ fi
30926 29518
30927if test ! -z "$blibpath" ; then 29519if test ! -z "$blibpath" ; then
30928 LDFLAGS="$LDFLAGS $blibflags$blibpath" 29520 LDFLAGS="$LDFLAGS $blibflags$blibpath"
30929 { $as_echo "$as_me:$LINENO: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&5 29521 { echo "$as_me:$LINENO: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&5
30930$as_echo "$as_me: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&2;} 29522echo "$as_me: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&2;}
30931fi 29523fi
30932 29524
30933CFLAGS="$CFLAGS $werror_flags" 29525CFLAGS="$CFLAGS $werror_flags"
@@ -30942,7 +29534,7 @@ else
30942fi 29534fi
30943 29535
30944 29536
30945ac_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" 29537ac_config_files="$ac_config_files Makefile buildpkg.sh opensshd.init openssh.xml openbsd-compat/Makefile openbsd-compat/regress/Makefile ssh_prng_cmds survey.sh"
30946 29538
30947cat >confcache <<\_ACEOF 29539cat >confcache <<\_ACEOF
30948# This file is a shell script that caches the results of configure 29540# This file is a shell script that caches the results of configure
@@ -30971,12 +29563,11 @@ _ACEOF
30971 case $ac_val in #( 29563 case $ac_val in #(
30972 *${as_nl}*) 29564 *${as_nl}*)
30973 case $ac_var in #( 29565 case $ac_var in #(
30974 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 29566 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
30975$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; 29567echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
30976 esac 29568 esac
30977 case $ac_var in #( 29569 case $ac_var in #(
30978 _ | IFS | as_nl) ;; #( 29570 _ | IFS | as_nl) ;; #(
30979 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
30980 *) $as_unset $ac_var ;; 29571 *) $as_unset $ac_var ;;
30981 esac ;; 29572 esac ;;
30982 esac 29573 esac
@@ -31009,12 +29600,12 @@ $as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
31009if diff "$cache_file" confcache >/dev/null 2>&1; then :; else 29600if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31010 if test -w "$cache_file"; then 29601 if test -w "$cache_file"; then
31011 test "x$cache_file" != "x/dev/null" && 29602 test "x$cache_file" != "x/dev/null" &&
31012 { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 29603 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
31013$as_echo "$as_me: updating cache $cache_file" >&6;} 29604echo "$as_me: updating cache $cache_file" >&6;}
31014 cat confcache >$cache_file 29605 cat confcache >$cache_file
31015 else 29606 else
31016 { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 29607 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
31017$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} 29608echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31018 fi 29609 fi
31019fi 29610fi
31020rm -f confcache 29611rm -f confcache
@@ -31030,7 +29621,7 @@ ac_ltlibobjs=
31030for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 29621for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31031 # 1. Remove the extension, and $U if already installed. 29622 # 1. Remove the extension, and $U if already installed.
31032 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' 29623 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31033 ac_i=`$as_echo "$ac_i" | sed "$ac_script"` 29624 ac_i=`echo "$ac_i" | sed "$ac_script"`
31034 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR 29625 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
31035 # will be set to the directory where LIBOBJS objects are built. 29626 # will be set to the directory where LIBOBJS objects are built.
31036 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" 29627 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
@@ -31042,14 +29633,12 @@ LTLIBOBJS=$ac_ltlibobjs
31042 29633
31043 29634
31044 29635
31045
31046: ${CONFIG_STATUS=./config.status} 29636: ${CONFIG_STATUS=./config.status}
31047ac_write_fail=0
31048ac_clean_files_save=$ac_clean_files 29637ac_clean_files_save=$ac_clean_files
31049ac_clean_files="$ac_clean_files $CONFIG_STATUS" 29638ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31050{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 29639{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
31051$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} 29640echo "$as_me: creating $CONFIG_STATUS" >&6;}
31052cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 29641cat >$CONFIG_STATUS <<_ACEOF
31053#! $SHELL 29642#! $SHELL
31054# Generated by $as_me. 29643# Generated by $as_me.
31055# Run this file to recreate the current configuration. 29644# Run this file to recreate the current configuration.
@@ -31062,7 +29651,7 @@ ac_cs_silent=false
31062SHELL=\${CONFIG_SHELL-$SHELL} 29651SHELL=\${CONFIG_SHELL-$SHELL}
31063_ACEOF 29652_ACEOF
31064 29653
31065cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 29654cat >>$CONFIG_STATUS <<\_ACEOF
31066## --------------------- ## 29655## --------------------- ##
31067## M4sh Initialization. ## 29656## M4sh Initialization. ##
31068## --------------------- ## 29657## --------------------- ##
@@ -31072,7 +29661,7 @@ DUALCASE=1; export DUALCASE # for MKS sh
31072if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 29661if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
31073 emulate sh 29662 emulate sh
31074 NULLCMD=: 29663 NULLCMD=:
31075 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 29664 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
31076 # is contrary to our usage. Disable this feature. 29665 # is contrary to our usage. Disable this feature.
31077 alias -g '${1+"$@"}'='"$@"' 29666 alias -g '${1+"$@"}'='"$@"'
31078 setopt NO_GLOB_SUBST 29667 setopt NO_GLOB_SUBST
@@ -31094,45 +29683,17 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
31094as_cr_digits='0123456789' 29683as_cr_digits='0123456789'
31095as_cr_alnum=$as_cr_Letters$as_cr_digits 29684as_cr_alnum=$as_cr_Letters$as_cr_digits
31096 29685
31097as_nl='
31098'
31099export as_nl
31100# Printing a long string crashes Solaris 7 /usr/bin/printf.
31101as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31102as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31103as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31104if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31105 as_echo='printf %s\n'
31106 as_echo_n='printf %s'
31107else
31108 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31109 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31110 as_echo_n='/usr/ucb/echo -n'
31111 else
31112 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31113 as_echo_n_body='eval
31114 arg=$1;
31115 case $arg in
31116 *"$as_nl"*)
31117 expr "X$arg" : "X\\(.*\\)$as_nl";
31118 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31119 esac;
31120 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31121 '
31122 export as_echo_n_body
31123 as_echo_n='sh -c $as_echo_n_body as_echo'
31124 fi
31125 export as_echo_body
31126 as_echo='sh -c $as_echo_body as_echo'
31127fi
31128
31129# The user is always right. 29686# The user is always right.
31130if test "${PATH_SEPARATOR+set}" != set; then 29687if test "${PATH_SEPARATOR+set}" != set; then
31131 PATH_SEPARATOR=: 29688 echo "#! /bin/sh" >conf$$.sh
31132 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 29689 echo "exit 0" >>conf$$.sh
31133 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 29690 chmod +x conf$$.sh
31134 PATH_SEPARATOR=';' 29691 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
31135 } 29692 PATH_SEPARATOR=';'
29693 else
29694 PATH_SEPARATOR=:
29695 fi
29696 rm -f conf$$.sh
31136fi 29697fi
31137 29698
31138# Support unset when possible. 29699# Support unset when possible.
@@ -31148,6 +29709,8 @@ fi
31148# there to prevent editors from complaining about space-tab. 29709# there to prevent editors from complaining about space-tab.
31149# (If _AS_PATH_WALK were called with IFS unset, it would disable word 29710# (If _AS_PATH_WALK were called with IFS unset, it would disable word
31150# splitting by setting IFS to empty value.) 29711# splitting by setting IFS to empty value.)
29712as_nl='
29713'
31151IFS=" "" $as_nl" 29714IFS=" "" $as_nl"
31152 29715
31153# Find who we are. Look in the path if we contain no directory separator. 29716# Find who we are. Look in the path if we contain no directory separator.
@@ -31170,7 +29733,7 @@ if test "x$as_myself" = x; then
31170 as_myself=$0 29733 as_myself=$0
31171fi 29734fi
31172if test ! -f "$as_myself"; then 29735if test ! -f "$as_myself"; then
31173 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 29736 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
31174 { (exit 1); exit 1; } 29737 { (exit 1); exit 1; }
31175fi 29738fi
31176 29739
@@ -31183,10 +29746,17 @@ PS2='> '
31183PS4='+ ' 29746PS4='+ '
31184 29747
31185# NLS nuisances. 29748# NLS nuisances.
31186LC_ALL=C 29749for as_var in \
31187export LC_ALL 29750 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
31188LANGUAGE=C 29751 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
31189export LANGUAGE 29752 LC_TELEPHONE LC_TIME
29753do
29754 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
29755 eval $as_var=C; export $as_var
29756 else
29757 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
29758 fi
29759done
31190 29760
31191# Required to use basename. 29761# Required to use basename.
31192if expr a : '\(a\)' >/dev/null 2>&1 && 29762if expr a : '\(a\)' >/dev/null 2>&1 &&
@@ -31208,7 +29778,7 @@ as_me=`$as_basename -- "$0" ||
31208$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 29778$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
31209 X"$0" : 'X\(//\)$' \| \ 29779 X"$0" : 'X\(//\)$' \| \
31210 X"$0" : 'X\(/\)' \| . 2>/dev/null || 29780 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
31211$as_echo X/"$0" | 29781echo X/"$0" |
31212 sed '/^.*\/\([^/][^/]*\)\/*$/{ 29782 sed '/^.*\/\([^/][^/]*\)\/*$/{
31213 s//\1/ 29783 s//\1/
31214 q 29784 q
@@ -31259,7 +29829,7 @@ $as_unset CDPATH
31259 s/-\n.*// 29829 s/-\n.*//
31260 ' >$as_me.lineno && 29830 ' >$as_me.lineno &&
31261 chmod +x "$as_me.lineno" || 29831 chmod +x "$as_me.lineno" ||
31262 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 29832 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
31263 { (exit 1); exit 1; }; } 29833 { (exit 1); exit 1; }; }
31264 29834
31265 # Don't try to exec as it changes $[0], causing all sort of problems 29835 # Don't try to exec as it changes $[0], causing all sort of problems
@@ -31287,6 +29857,7 @@ case `echo -n x` in
31287*) 29857*)
31288 ECHO_N='-n';; 29858 ECHO_N='-n';;
31289esac 29859esac
29860
31290if expr a : '\(a\)' >/dev/null 2>&1 && 29861if expr a : '\(a\)' >/dev/null 2>&1 &&
31291 test "X`expr 00001 : '.*\(...\)'`" = X001; then 29862 test "X`expr 00001 : '.*\(...\)'`" = X001; then
31292 as_expr=expr 29863 as_expr=expr
@@ -31299,22 +29870,19 @@ if test -d conf$$.dir; then
31299 rm -f conf$$.dir/conf$$.file 29870 rm -f conf$$.dir/conf$$.file
31300else 29871else
31301 rm -f conf$$.dir 29872 rm -f conf$$.dir
31302 mkdir conf$$.dir 2>/dev/null 29873 mkdir conf$$.dir
31303fi 29874fi
31304if (echo >conf$$.file) 2>/dev/null; then 29875echo >conf$$.file
31305 if ln -s conf$$.file conf$$ 2>/dev/null; then 29876if ln -s conf$$.file conf$$ 2>/dev/null; then
31306 as_ln_s='ln -s' 29877 as_ln_s='ln -s'
31307 # ... but there are two gotchas: 29878 # ... but there are two gotchas:
31308 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 29879 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
31309 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 29880 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
31310 # In both cases, we have to default to `cp -p'. 29881 # In both cases, we have to default to `cp -p'.
31311 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 29882 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
31312 as_ln_s='cp -p'
31313 elif ln conf$$.file conf$$ 2>/dev/null; then
31314 as_ln_s=ln
31315 else
31316 as_ln_s='cp -p' 29883 as_ln_s='cp -p'
31317 fi 29884elif ln conf$$.file conf$$ 2>/dev/null; then
29885 as_ln_s=ln
31318else 29886else
31319 as_ln_s='cp -p' 29887 as_ln_s='cp -p'
31320fi 29888fi
@@ -31339,10 +29907,10 @@ else
31339 as_test_x=' 29907 as_test_x='
31340 eval sh -c '\'' 29908 eval sh -c '\''
31341 if test -d "$1"; then 29909 if test -d "$1"; then
31342 test -d "$1/."; 29910 test -d "$1/.";
31343 else 29911 else
31344 case $1 in 29912 case $1 in
31345 -*)set "./$1";; 29913 -*)set "./$1";;
31346 esac; 29914 esac;
31347 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in 29915 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
31348 ???[sx]*):;;*)false;;esac;fi 29916 ???[sx]*):;;*)false;;esac;fi
@@ -31365,7 +29933,7 @@ exec 6>&1
31365# values after options handling. 29933# values after options handling.
31366ac_log=" 29934ac_log="
31367This file was extended by OpenSSH $as_me Portable, which was 29935This file was extended by OpenSSH $as_me Portable, which was
31368generated by GNU Autoconf 2.62. Invocation command line was 29936generated by GNU Autoconf 2.61. Invocation command line was
31369 29937
31370 CONFIG_FILES = $CONFIG_FILES 29938 CONFIG_FILES = $CONFIG_FILES
31371 CONFIG_HEADERS = $CONFIG_HEADERS 29939 CONFIG_HEADERS = $CONFIG_HEADERS
@@ -31378,14 +29946,14 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q`
31378 29946
31379_ACEOF 29947_ACEOF
31380 29948
31381cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 29949cat >>$CONFIG_STATUS <<_ACEOF
31382# Files that config.status was made for. 29950# Files that config.status was made for.
31383config_files="$ac_config_files" 29951config_files="$ac_config_files"
31384config_headers="$ac_config_headers" 29952config_headers="$ac_config_headers"
31385 29953
31386_ACEOF 29954_ACEOF
31387 29955
31388cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 29956cat >>$CONFIG_STATUS <<\_ACEOF
31389ac_cs_usage="\ 29957ac_cs_usage="\
31390\`$as_me' instantiates files from templates according to the 29958\`$as_me' instantiates files from templates according to the
31391current configuration. 29959current configuration.
@@ -31398,9 +29966,9 @@ Usage: $0 [OPTIONS] [FILE]...
31398 -d, --debug don't remove temporary files 29966 -d, --debug don't remove temporary files
31399 --recheck update $as_me by reconfiguring in the same conditions 29967 --recheck update $as_me by reconfiguring in the same conditions
31400 --file=FILE[:TEMPLATE] 29968 --file=FILE[:TEMPLATE]
31401 instantiate the configuration file FILE 29969 instantiate the configuration file FILE
31402 --header=FILE[:TEMPLATE] 29970 --header=FILE[:TEMPLATE]
31403 instantiate the configuration header FILE 29971 instantiate the configuration header FILE
31404 29972
31405Configuration files: 29973Configuration files:
31406$config_files 29974$config_files
@@ -31411,25 +29979,24 @@ $config_headers
31411Report bugs to <bug-autoconf@gnu.org>." 29979Report bugs to <bug-autoconf@gnu.org>."
31412 29980
31413_ACEOF 29981_ACEOF
31414cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 29982cat >>$CONFIG_STATUS <<_ACEOF
31415ac_cs_version="\\ 29983ac_cs_version="\\
31416OpenSSH config.status Portable 29984OpenSSH config.status Portable
31417configured by $0, generated by GNU Autoconf 2.62, 29985configured by $0, generated by GNU Autoconf 2.61,
31418 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" 29986 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
31419 29987
31420Copyright (C) 2008 Free Software Foundation, Inc. 29988Copyright (C) 2006 Free Software Foundation, Inc.
31421This config.status script is free software; the Free Software Foundation 29989This config.status script is free software; the Free Software Foundation
31422gives unlimited permission to copy, distribute and modify it." 29990gives unlimited permission to copy, distribute and modify it."
31423 29991
31424ac_pwd='$ac_pwd' 29992ac_pwd='$ac_pwd'
31425srcdir='$srcdir' 29993srcdir='$srcdir'
31426INSTALL='$INSTALL' 29994INSTALL='$INSTALL'
31427AWK='$AWK'
31428test -n "\$AWK" || AWK=awk
31429_ACEOF 29995_ACEOF
31430 29996
31431cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 29997cat >>$CONFIG_STATUS <<\_ACEOF
31432# The default lists apply if the user does not specify any file. 29998# If no file are specified by the user, then we need to provide default
29999# value. By we need to know if files were specified by the user.
31433ac_need_defaults=: 30000ac_need_defaults=:
31434while test $# != 0 30001while test $# != 0
31435do 30002do
@@ -31451,36 +30018,30 @@ do
31451 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 30018 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
31452 ac_cs_recheck=: ;; 30019 ac_cs_recheck=: ;;
31453 --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) 30020 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
31454 $as_echo "$ac_cs_version"; exit ;; 30021 echo "$ac_cs_version"; exit ;;
31455 --debug | --debu | --deb | --de | --d | -d ) 30022 --debug | --debu | --deb | --de | --d | -d )
31456 debug=: ;; 30023 debug=: ;;
31457 --file | --fil | --fi | --f ) 30024 --file | --fil | --fi | --f )
31458 $ac_shift 30025 $ac_shift
31459 case $ac_optarg in 30026 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
31460 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31461 esac
31462 CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
31463 ac_need_defaults=false;; 30027 ac_need_defaults=false;;
31464 --header | --heade | --head | --hea ) 30028 --header | --heade | --head | --hea )
31465 $ac_shift 30029 $ac_shift
31466 case $ac_optarg in 30030 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
31467 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31468 esac
31469 CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
31470 ac_need_defaults=false;; 30031 ac_need_defaults=false;;
31471 --he | --h) 30032 --he | --h)
31472 # Conflict between --help and --header 30033 # Conflict between --help and --header
31473 { $as_echo "$as_me: error: ambiguous option: $1 30034 { echo "$as_me: error: ambiguous option: $1
31474Try \`$0 --help' for more information." >&2 30035Try \`$0 --help' for more information." >&2
31475 { (exit 1); exit 1; }; };; 30036 { (exit 1); exit 1; }; };;
31476 --help | --hel | -h ) 30037 --help | --hel | -h )
31477 $as_echo "$ac_cs_usage"; exit ;; 30038 echo "$ac_cs_usage"; exit ;;
31478 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 30039 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
31479 | -silent | --silent | --silen | --sile | --sil | --si | --s) 30040 | -silent | --silent | --silen | --sile | --sil | --si | --s)
31480 ac_cs_silent=: ;; 30041 ac_cs_silent=: ;;
31481 30042
31482 # This is an error. 30043 # This is an error.
31483 -*) { $as_echo "$as_me: error: unrecognized option: $1 30044 -*) { echo "$as_me: error: unrecognized option: $1
31484Try \`$0 --help' for more information." >&2 30045Try \`$0 --help' for more information." >&2
31485 { (exit 1); exit 1; }; } ;; 30046 { (exit 1); exit 1; }; } ;;
31486 30047
@@ -31499,32 +30060,30 @@ if $ac_cs_silent; then
31499fi 30060fi
31500 30061
31501_ACEOF 30062_ACEOF
31502cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 30063cat >>$CONFIG_STATUS <<_ACEOF
31503if \$ac_cs_recheck; then 30064if \$ac_cs_recheck; then
31504 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion 30065 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
31505 shift 30066 CONFIG_SHELL=$SHELL
31506 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
31507 CONFIG_SHELL='$SHELL'
31508 export CONFIG_SHELL 30067 export CONFIG_SHELL
31509 exec "\$@" 30068 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
31510fi 30069fi
31511 30070
31512_ACEOF 30071_ACEOF
31513cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 30072cat >>$CONFIG_STATUS <<\_ACEOF
31514exec 5>>config.log 30073exec 5>>config.log
31515{ 30074{
31516 echo 30075 echo
31517 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 30076 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
31518## Running $as_me. ## 30077## Running $as_me. ##
31519_ASBOX 30078_ASBOX
31520 $as_echo "$ac_log" 30079 echo "$ac_log"
31521} >&5 30080} >&5
31522 30081
31523_ACEOF 30082_ACEOF
31524cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 30083cat >>$CONFIG_STATUS <<_ACEOF
31525_ACEOF 30084_ACEOF
31526 30085
31527cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 30086cat >>$CONFIG_STATUS <<\_ACEOF
31528 30087
31529# Handling of arguments. 30088# Handling of arguments.
31530for ac_config_target in $ac_config_targets 30089for ac_config_target in $ac_config_targets
@@ -31537,12 +30096,11 @@ do
31537 "openssh.xml") CONFIG_FILES="$CONFIG_FILES openssh.xml" ;; 30096 "openssh.xml") CONFIG_FILES="$CONFIG_FILES openssh.xml" ;;
31538 "openbsd-compat/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/Makefile" ;; 30097 "openbsd-compat/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/Makefile" ;;
31539 "openbsd-compat/regress/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/regress/Makefile" ;; 30098 "openbsd-compat/regress/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/regress/Makefile" ;;
31540 "scard/Makefile") CONFIG_FILES="$CONFIG_FILES scard/Makefile" ;;
31541 "ssh_prng_cmds") CONFIG_FILES="$CONFIG_FILES ssh_prng_cmds" ;; 30099 "ssh_prng_cmds") CONFIG_FILES="$CONFIG_FILES ssh_prng_cmds" ;;
31542 "survey.sh") CONFIG_FILES="$CONFIG_FILES survey.sh" ;; 30100 "survey.sh") CONFIG_FILES="$CONFIG_FILES survey.sh" ;;
31543 30101
31544 *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 30102 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
31545$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} 30103echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
31546 { (exit 1); exit 1; }; };; 30104 { (exit 1); exit 1; }; };;
31547 esac 30105 esac
31548done 30106done
@@ -31582,143 +30140,216 @@ $debug ||
31582 (umask 077 && mkdir "$tmp") 30140 (umask 077 && mkdir "$tmp")
31583} || 30141} ||
31584{ 30142{
31585 $as_echo "$as_me: cannot create a temporary directory in ." >&2 30143 echo "$me: cannot create a temporary directory in ." >&2
31586 { (exit 1); exit 1; } 30144 { (exit 1); exit 1; }
31587} 30145}
31588 30146
31589# Set up the scripts for CONFIG_FILES section. 30147#
31590# No need to generate them if there are no CONFIG_FILES. 30148# Set up the sed scripts for CONFIG_FILES section.
31591# This happens for instance with `./config.status config.h'. 30149#
30150
30151# No need to generate the scripts if there are no CONFIG_FILES.
30152# This happens for instance when ./config.status config.h
31592if test -n "$CONFIG_FILES"; then 30153if test -n "$CONFIG_FILES"; then
31593 30154
30155_ACEOF
31594 30156
31595ac_cr=' ' 30157
31596ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` 30158
31597if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then 30159ac_delim='%!_!# '
31598 ac_cs_awk_cr='\\r' 30160for ac_last_try in false false false false false :; do
31599else 30161 cat >conf$$subs.sed <<_ACEOF
31600 ac_cs_awk_cr=$ac_cr 30162SHELL!$SHELL$ac_delim
30163PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
30164PACKAGE_NAME!$PACKAGE_NAME$ac_delim
30165PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
30166PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
30167PACKAGE_STRING!$PACKAGE_STRING$ac_delim
30168PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
30169exec_prefix!$exec_prefix$ac_delim
30170prefix!$prefix$ac_delim
30171program_transform_name!$program_transform_name$ac_delim
30172bindir!$bindir$ac_delim
30173sbindir!$sbindir$ac_delim
30174libexecdir!$libexecdir$ac_delim
30175datarootdir!$datarootdir$ac_delim
30176datadir!$datadir$ac_delim
30177sysconfdir!$sysconfdir$ac_delim
30178sharedstatedir!$sharedstatedir$ac_delim
30179localstatedir!$localstatedir$ac_delim
30180includedir!$includedir$ac_delim
30181oldincludedir!$oldincludedir$ac_delim
30182docdir!$docdir$ac_delim
30183infodir!$infodir$ac_delim
30184htmldir!$htmldir$ac_delim
30185dvidir!$dvidir$ac_delim
30186pdfdir!$pdfdir$ac_delim
30187psdir!$psdir$ac_delim
30188libdir!$libdir$ac_delim
30189localedir!$localedir$ac_delim
30190mandir!$mandir$ac_delim
30191DEFS!$DEFS$ac_delim
30192ECHO_C!$ECHO_C$ac_delim
30193ECHO_N!$ECHO_N$ac_delim
30194ECHO_T!$ECHO_T$ac_delim
30195LIBS!$LIBS$ac_delim
30196build_alias!$build_alias$ac_delim
30197host_alias!$host_alias$ac_delim
30198target_alias!$target_alias$ac_delim
30199CC!$CC$ac_delim
30200CFLAGS!$CFLAGS$ac_delim
30201LDFLAGS!$LDFLAGS$ac_delim
30202CPPFLAGS!$CPPFLAGS$ac_delim
30203ac_ct_CC!$ac_ct_CC$ac_delim
30204EXEEXT!$EXEEXT$ac_delim
30205OBJEXT!$OBJEXT$ac_delim
30206build!$build$ac_delim
30207build_cpu!$build_cpu$ac_delim
30208build_vendor!$build_vendor$ac_delim
30209build_os!$build_os$ac_delim
30210host!$host$ac_delim
30211host_cpu!$host_cpu$ac_delim
30212host_vendor!$host_vendor$ac_delim
30213host_os!$host_os$ac_delim
30214CPP!$CPP$ac_delim
30215GREP!$GREP$ac_delim
30216EGREP!$EGREP$ac_delim
30217AWK!$AWK$ac_delim
30218RANLIB!$RANLIB$ac_delim
30219INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
30220INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
30221INSTALL_DATA!$INSTALL_DATA$ac_delim
30222AR!$AR$ac_delim
30223CAT!$CAT$ac_delim
30224KILL!$KILL$ac_delim
30225PERL!$PERL$ac_delim
30226SED!$SED$ac_delim
30227ENT!$ENT$ac_delim
30228TEST_MINUS_S_SH!$TEST_MINUS_S_SH$ac_delim
30229SH!$SH$ac_delim
30230TEST_SHELL!$TEST_SHELL$ac_delim
30231PATH_GROUPADD_PROG!$PATH_GROUPADD_PROG$ac_delim
30232PATH_USERADD_PROG!$PATH_USERADD_PROG$ac_delim
30233MAKE_PACKAGE_SUPPORTED!$MAKE_PACKAGE_SUPPORTED$ac_delim
30234STARTUP_SCRIPT_SHELL!$STARTUP_SCRIPT_SHELL$ac_delim
30235LOGIN_PROGRAM_FALLBACK!$LOGIN_PROGRAM_FALLBACK$ac_delim
30236PATH_PASSWD_PROG!$PATH_PASSWD_PROG$ac_delim
30237LD!$LD$ac_delim
30238SSHDLIBS!$SSHDLIBS$ac_delim
30239LIBEDIT!$LIBEDIT$ac_delim
30240INSTALL_SSH_RAND_HELPER!$INSTALL_SSH_RAND_HELPER$ac_delim
30241SSH_PRIVSEP_USER!$SSH_PRIVSEP_USER$ac_delim
30242PROG_LS!$PROG_LS$ac_delim
30243PROG_NETSTAT!$PROG_NETSTAT$ac_delim
30244PROG_ARP!$PROG_ARP$ac_delim
30245PROG_IFCONFIG!$PROG_IFCONFIG$ac_delim
30246PROG_JSTAT!$PROG_JSTAT$ac_delim
30247PROG_PS!$PROG_PS$ac_delim
30248PROG_SAR!$PROG_SAR$ac_delim
30249PROG_W!$PROG_W$ac_delim
30250PROG_WHO!$PROG_WHO$ac_delim
30251PROG_LAST!$PROG_LAST$ac_delim
30252PROG_LASTLOG!$PROG_LASTLOG$ac_delim
30253PROG_DF!$PROG_DF$ac_delim
30254PROG_VMSTAT!$PROG_VMSTAT$ac_delim
30255PROG_UPTIME!$PROG_UPTIME$ac_delim
30256PROG_IPCS!$PROG_IPCS$ac_delim
30257PROG_TAIL!$PROG_TAIL$ac_delim
30258INSTALL_SSH_PRNG_CMDS!$INSTALL_SSH_PRNG_CMDS$ac_delim
30259_ACEOF
30260
30261 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
30262 break
30263 elif $ac_last_try; then
30264 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
30265echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
30266 { (exit 1); exit 1; }; }
30267 else
30268 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
30269 fi
30270done
30271
30272ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
30273if test -n "$ac_eof"; then
30274 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
30275 ac_eof=`expr $ac_eof + 1`
31601fi 30276fi
31602 30277
31603echo 'BEGIN {' >"$tmp/subs1.awk" && 30278cat >>$CONFIG_STATUS <<_ACEOF
30279cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
30280/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30281_ACEOF
30282sed '
30283s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
30284s/^/s,@/; s/!/@,|#_!!_#|/
30285:n
30286t n
30287s/'"$ac_delim"'$/,g/; t
30288s/$/\\/; p
30289N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
30290' >>$CONFIG_STATUS <conf$$subs.sed
30291rm -f conf$$subs.sed
30292cat >>$CONFIG_STATUS <<_ACEOF
30293CEOF$ac_eof
31604_ACEOF 30294_ACEOF
31605 30295
31606 30296
31607{
31608 echo "cat >conf$$subs.awk <<_ACEOF" &&
31609 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
31610 echo "_ACEOF"
31611} >conf$$subs.sh ||
31612 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
31613$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
31614 { (exit 1); exit 1; }; }
31615ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
31616ac_delim='%!_!# ' 30297ac_delim='%!_!# '
31617for ac_last_try in false false false false false :; do 30298for ac_last_try in false false false false false :; do
31618 . ./conf$$subs.sh || 30299 cat >conf$$subs.sed <<_ACEOF
31619 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 30300KRB5CONF!$KRB5CONF$ac_delim
31620$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} 30301PRIVSEP_PATH!$PRIVSEP_PATH$ac_delim
31621 { (exit 1); exit 1; }; } 30302xauth_path!$xauth_path$ac_delim
31622 30303STRIP_OPT!$STRIP_OPT$ac_delim
31623 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` = $ac_delim_num; then 30304XAUTH_PATH!$XAUTH_PATH$ac_delim
30305NROFF!$NROFF$ac_delim
30306MANTYPE!$MANTYPE$ac_delim
30307mansubdir!$mansubdir$ac_delim
30308user_path!$user_path$ac_delim
30309piddir!$piddir$ac_delim
30310TEST_SSH_IPV6!$TEST_SSH_IPV6$ac_delim
30311LIBOBJS!$LIBOBJS$ac_delim
30312LTLIBOBJS!$LTLIBOBJS$ac_delim
30313_ACEOF
30314
30315 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 13; then
31624 break 30316 break
31625 elif $ac_last_try; then 30317 elif $ac_last_try; then
31626 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 30318 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
31627$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} 30319echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
31628 { (exit 1); exit 1; }; } 30320 { (exit 1); exit 1; }; }
31629 else 30321 else
31630 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 30322 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31631 fi 30323 fi
31632done 30324done
31633rm -f conf$$subs.sh
31634
31635cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31636cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
31637_ACEOF
31638sed -n '
31639h
31640s/^/S["/; s/!.*/"]=/
31641p
31642g
31643s/^[^!]*!//
31644:repl
31645t repl
31646s/'"$ac_delim"'$//
31647t delim
31648:nl
31649h
31650s/\(.\{148\}\).*/\1/
31651t more1
31652s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
31653p
31654n
31655b repl
31656:more1
31657s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31658p
31659g
31660s/.\{148\}//
31661t nl
31662:delim
31663h
31664s/\(.\{148\}\).*/\1/
31665t more2
31666s/["\\]/\\&/g; s/^/"/; s/$/"/
31667p
31668b
31669:more2
31670s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31671p
31672g
31673s/.\{148\}//
31674t delim
31675' <conf$$subs.awk | sed '
31676/^[^""]/{
31677 N
31678 s/\n//
31679}
31680' >>$CONFIG_STATUS || ac_write_fail=1
31681rm -f conf$$subs.awk
31682cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31683_ACAWK
31684cat >>"\$tmp/subs1.awk" <<_ACAWK &&
31685 for (key in S) S_is_set[key] = 1
31686 FS = ""
31687 30325
31688} 30326ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
31689{ 30327if test -n "$ac_eof"; then
31690 line = $ 0 30328 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
31691 nfields = split(line, field, "@") 30329 ac_eof=`expr $ac_eof + 1`
31692 substed = 0 30330fi
31693 len = length(field[1]) 30331
31694 for (i = 2; i < nfields; i++) { 30332cat >>$CONFIG_STATUS <<_ACEOF
31695 key = field[i] 30333cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
31696 keylen = length(key) 30334/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
31697 if (S_is_set[key]) { 30335_ACEOF
31698 value = S[key] 30336sed '
31699 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) 30337s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
31700 len += length(value) + length(field[++i]) 30338s/^/s,@/; s/!/@,|#_!!_#|/
31701 substed = 1 30339:n
31702 } else 30340t n
31703 len += 1 + keylen 30341s/'"$ac_delim"'$/,g/; t
31704 } 30342s/$/\\/; p
31705 30343N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
31706 print line 30344' >>$CONFIG_STATUS <conf$$subs.sed
31707} 30345rm -f conf$$subs.sed
31708 30346cat >>$CONFIG_STATUS <<_ACEOF
31709_ACAWK 30347:end
31710_ACEOF 30348s/|#_!!_#|//g
31711cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 30349CEOF$ac_eof
31712if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
31713 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
31714else
31715 cat
31716fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
31717 || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
31718$as_echo "$as_me: error: could not setup config files machinery" >&2;}
31719 { (exit 1); exit 1; }; }
31720_ACEOF 30350_ACEOF
31721 30351
30352
31722# VPATH may cause trouble with some makes, so we remove $(srcdir), 30353# VPATH may cause trouble with some makes, so we remove $(srcdir),
31723# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and 30354# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
31724# trailing colons and then remove the whole line if VPATH becomes empty 30355# trailing colons and then remove the whole line if VPATH becomes empty
@@ -31734,133 +30365,19 @@ s/^[^=]*=[ ]*$//
31734}' 30365}'
31735fi 30366fi
31736 30367
31737cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 30368cat >>$CONFIG_STATUS <<\_ACEOF
31738fi # test -n "$CONFIG_FILES" 30369fi # test -n "$CONFIG_FILES"
31739 30370
31740# Set up the scripts for CONFIG_HEADERS section.
31741# No need to generate them if there are no CONFIG_HEADERS.
31742# This happens for instance with `./config.status Makefile'.
31743if test -n "$CONFIG_HEADERS"; then
31744cat >"$tmp/defines.awk" <<\_ACAWK ||
31745BEGIN {
31746_ACEOF
31747
31748# Transform confdefs.h into an awk script `defines.awk', embedded as
31749# here-document in config.status, that substitutes the proper values into
31750# config.h.in to produce config.h.
31751
31752# Create a delimiter string that does not exist in confdefs.h, to ease
31753# handling of long lines.
31754ac_delim='%!_!# '
31755for ac_last_try in false false :; do
31756 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
31757 if test -z "$ac_t"; then
31758 break
31759 elif $ac_last_try; then
31760 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
31761$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
31762 { (exit 1); exit 1; }; }
31763 else
31764 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31765 fi
31766done
31767
31768# For the awk script, D is an array of macro values keyed by name,
31769# likewise P contains macro parameters if any. Preserve backslash
31770# newline sequences.
31771 30371
31772ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* 30372for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
31773sed -n '
31774s/.\{148\}/&'"$ac_delim"'/g
31775t rset
31776:rset
31777s/^[ ]*#[ ]*define[ ][ ]*/ /
31778t def
31779d
31780:def
31781s/\\$//
31782t bsnl
31783s/["\\]/\\&/g
31784s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
31785D["\1"]=" \3"/p
31786s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
31787d
31788:bsnl
31789s/["\\]/\\&/g
31790s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
31791D["\1"]=" \3\\\\\\n"\\/p
31792t cont
31793s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
31794t cont
31795d
31796:cont
31797n
31798s/.\{148\}/&'"$ac_delim"'/g
31799t clear
31800:clear
31801s/\\$//
31802t bsnlc
31803s/["\\]/\\&/g; s/^/"/; s/$/"/p
31804d
31805:bsnlc
31806s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
31807b cont
31808' <confdefs.h | sed '
31809s/'"$ac_delim"'/"\\\
31810"/g' >>$CONFIG_STATUS || ac_write_fail=1
31811
31812cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31813 for (key in D) D_is_set[key] = 1
31814 FS = ""
31815}
31816/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
31817 line = \$ 0
31818 split(line, arg, " ")
31819 if (arg[1] == "#") {
31820 defundef = arg[2]
31821 mac1 = arg[3]
31822 } else {
31823 defundef = substr(arg[1], 2)
31824 mac1 = arg[2]
31825 }
31826 split(mac1, mac2, "(") #)
31827 macro = mac2[1]
31828 if (D_is_set[macro]) {
31829 # Preserve the white space surrounding the "#".
31830 prefix = substr(line, 1, index(line, defundef) - 1)
31831 print prefix "define", macro P[macro] D[macro]
31832 next
31833 } else {
31834 # Replace #undef with comments. This is necessary, for example,
31835 # in the case of _POSIX_SOURCE, which is predefined and required
31836 # on some systems where configure will not decide to define it.
31837 if (defundef == "undef") {
31838 print "/*", line, "*/"
31839 next
31840 }
31841 }
31842}
31843{ print }
31844_ACAWK
31845_ACEOF
31846cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31847 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
31848$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
31849 { (exit 1); exit 1; }; }
31850fi # test -n "$CONFIG_HEADERS"
31851
31852
31853eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
31854shift
31855for ac_tag
31856do 30373do
31857 case $ac_tag in 30374 case $ac_tag in
31858 :[FHLC]) ac_mode=$ac_tag; continue;; 30375 :[FHLC]) ac_mode=$ac_tag; continue;;
31859 esac 30376 esac
31860 case $ac_mode$ac_tag in 30377 case $ac_mode$ac_tag in
31861 :[FHL]*:*);; 30378 :[FHL]*:*);;
31862 :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 30379 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
31863$as_echo "$as_me: error: Invalid tag $ac_tag." >&2;} 30380echo "$as_me: error: Invalid tag $ac_tag." >&2;}
31864 { (exit 1); exit 1; }; };; 30381 { (exit 1); exit 1; }; };;
31865 :[FH]-) ac_tag=-:-;; 30382 :[FH]-) ac_tag=-:-;;
31866 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 30383 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
@@ -31889,38 +30406,26 @@ $as_echo "$as_me: error: Invalid tag $ac_tag." >&2;}
31889 [\\/$]*) false;; 30406 [\\/$]*) false;;
31890 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 30407 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
31891 esac || 30408 esac ||
31892 { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 30409 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
31893$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} 30410echo "$as_me: error: cannot find input file: $ac_f" >&2;}
31894 { (exit 1); exit 1; }; };; 30411 { (exit 1); exit 1; }; };;
31895 esac 30412 esac
31896 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac 30413 ac_file_inputs="$ac_file_inputs $ac_f"
31897 ac_file_inputs="$ac_file_inputs '$ac_f'"
31898 done 30414 done
31899 30415
31900 # Let's still pretend it is `configure' which instantiates (i.e., don't 30416 # Let's still pretend it is `configure' which instantiates (i.e., don't
31901 # use $as_me), people would be surprised to read: 30417 # use $as_me), people would be surprised to read:
31902 # /* config.h. Generated by config.status. */ 30418 # /* config.h. Generated by config.status. */
31903 configure_input='Generated from '` 30419 configure_input="Generated from "`IFS=:
31904 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' 30420 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
31905 `' by configure.'
31906 if test x"$ac_file" != x-; then 30421 if test x"$ac_file" != x-; then
31907 configure_input="$ac_file. $configure_input" 30422 configure_input="$ac_file. $configure_input"
31908 { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 30423 { echo "$as_me:$LINENO: creating $ac_file" >&5
31909$as_echo "$as_me: creating $ac_file" >&6;} 30424echo "$as_me: creating $ac_file" >&6;}
31910 fi 30425 fi
31911 # Neutralize special characters interpreted by sed in replacement strings.
31912 case $configure_input in #(
31913 *\&* | *\|* | *\\* )
31914 ac_sed_conf_input=`$as_echo "$configure_input" |
31915 sed 's/[\\\\&|]/\\\\&/g'`;; #(
31916 *) ac_sed_conf_input=$configure_input;;
31917 esac
31918 30426
31919 case $ac_tag in 30427 case $ac_tag in
31920 *:-:* | *:-) cat >"$tmp/stdin" \ 30428 *:-:* | *:-) cat >"$tmp/stdin";;
31921 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
31922$as_echo "$as_me: error: could not create $ac_file" >&2;}
31923 { (exit 1); exit 1; }; } ;;
31924 esac 30429 esac
31925 ;; 30430 ;;
31926 esac 30431 esac
@@ -31930,7 +30435,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31930 X"$ac_file" : 'X\(//\)[^/]' \| \ 30435 X"$ac_file" : 'X\(//\)[^/]' \| \
31931 X"$ac_file" : 'X\(//\)$' \| \ 30436 X"$ac_file" : 'X\(//\)$' \| \
31932 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || 30437 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
31933$as_echo X"$ac_file" | 30438echo X"$ac_file" |
31934 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 30439 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31935 s//\1/ 30440 s//\1/
31936 q 30441 q
@@ -31956,7 +30461,7 @@ $as_echo X"$ac_file" |
31956 as_dirs= 30461 as_dirs=
31957 while :; do 30462 while :; do
31958 case $as_dir in #( 30463 case $as_dir in #(
31959 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 30464 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
31960 *) as_qdir=$as_dir;; 30465 *) as_qdir=$as_dir;;
31961 esac 30466 esac
31962 as_dirs="'$as_qdir' $as_dirs" 30467 as_dirs="'$as_qdir' $as_dirs"
@@ -31965,7 +30470,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31965 X"$as_dir" : 'X\(//\)[^/]' \| \ 30470 X"$as_dir" : 'X\(//\)[^/]' \| \
31966 X"$as_dir" : 'X\(//\)$' \| \ 30471 X"$as_dir" : 'X\(//\)$' \| \
31967 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 30472 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
31968$as_echo X"$as_dir" | 30473echo X"$as_dir" |
31969 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 30474 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31970 s//\1/ 30475 s//\1/
31971 q 30476 q
@@ -31986,17 +30491,17 @@ $as_echo X"$as_dir" |
31986 test -d "$as_dir" && break 30491 test -d "$as_dir" && break
31987 done 30492 done
31988 test -z "$as_dirs" || eval "mkdir $as_dirs" 30493 test -z "$as_dirs" || eval "mkdir $as_dirs"
31989 } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 30494 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
31990$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} 30495echo "$as_me: error: cannot create directory $as_dir" >&2;}
31991 { (exit 1); exit 1; }; }; } 30496 { (exit 1); exit 1; }; }; }
31992 ac_builddir=. 30497 ac_builddir=.
31993 30498
31994case "$ac_dir" in 30499case "$ac_dir" in
31995.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 30500.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
31996*) 30501*)
31997 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 30502 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
31998 # A ".." for each directory in $ac_dir_suffix. 30503 # A ".." for each directory in $ac_dir_suffix.
31999 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 30504 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
32000 case $ac_top_builddir_sub in 30505 case $ac_top_builddir_sub in
32001 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 30506 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32002 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 30507 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -32036,13 +30541,12 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32036 esac 30541 esac
32037_ACEOF 30542_ACEOF
32038 30543
32039cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 30544cat >>$CONFIG_STATUS <<\_ACEOF
32040# If the template does not know about datarootdir, expand it. 30545# If the template does not know about datarootdir, expand it.
32041# FIXME: This hack should be removed a few years after 2.60. 30546# FIXME: This hack should be removed a few years after 2.60.
32042ac_datarootdir_hack=; ac_datarootdir_seen= 30547ac_datarootdir_hack=; ac_datarootdir_seen=
32043 30548
32044ac_sed_dataroot=' 30549case `sed -n '/datarootdir/ {
32045/datarootdir/ {
32046 p 30550 p
32047 q 30551 q
32048} 30552}
@@ -32051,14 +30555,13 @@ ac_sed_dataroot='
32051/@infodir@/p 30555/@infodir@/p
32052/@localedir@/p 30556/@localedir@/p
32053/@mandir@/p 30557/@mandir@/p
32054' 30558' $ac_file_inputs` in
32055case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32056*datarootdir*) ac_datarootdir_seen=yes;; 30559*datarootdir*) ac_datarootdir_seen=yes;;
32057*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) 30560*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32058 { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 30561 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32059$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} 30562echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32060_ACEOF 30563_ACEOF
32061cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 30564cat >>$CONFIG_STATUS <<_ACEOF
32062 ac_datarootdir_hack=' 30565 ac_datarootdir_hack='
32063 s&@datadir@&$datadir&g 30566 s&@datadir@&$datadir&g
32064 s&@docdir@&$docdir&g 30567 s&@docdir@&$docdir&g
@@ -32072,16 +30575,15 @@ _ACEOF
32072# Neutralize VPATH when `$srcdir' = `.'. 30575# Neutralize VPATH when `$srcdir' = `.'.
32073# Shell code in configure.ac might set extrasub. 30576# Shell code in configure.ac might set extrasub.
32074# FIXME: do we really want to maintain this feature? 30577# FIXME: do we really want to maintain this feature?
32075cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 30578cat >>$CONFIG_STATUS <<_ACEOF
32076ac_sed_extra="$ac_vpsub 30579 sed "$ac_vpsub
32077$extrasub 30580$extrasub
32078_ACEOF 30581_ACEOF
32079cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 30582cat >>$CONFIG_STATUS <<\_ACEOF
32080:t 30583:t
32081/@[a-zA-Z_][a-zA-Z_0-9]*@/!b 30584/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32082s|@configure_input@|$ac_sed_conf_input|;t t 30585s&@configure_input@&$configure_input&;t t
32083s&@top_builddir@&$ac_top_builddir_sub&;t t 30586s&@top_builddir@&$ac_top_builddir_sub&;t t
32084s&@top_build_prefix@&$ac_top_build_prefix&;t t
32085s&@srcdir@&$ac_srcdir&;t t 30587s&@srcdir@&$ac_srcdir&;t t
32086s&@abs_srcdir@&$ac_abs_srcdir&;t t 30588s&@abs_srcdir@&$ac_abs_srcdir&;t t
32087s&@top_srcdir@&$ac_top_srcdir&;t t 30589s&@top_srcdir@&$ac_top_srcdir&;t t
@@ -32091,58 +30593,119 @@ s&@abs_builddir@&$ac_abs_builddir&;t t
32091s&@abs_top_builddir@&$ac_abs_top_builddir&;t t 30593s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32092s&@INSTALL@&$ac_INSTALL&;t t 30594s&@INSTALL@&$ac_INSTALL&;t t
32093$ac_datarootdir_hack 30595$ac_datarootdir_hack
32094" 30596" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
32095eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
32096 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
32097$as_echo "$as_me: error: could not create $ac_file" >&2;}
32098 { (exit 1); exit 1; }; }
32099 30597
32100test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && 30598test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32101 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && 30599 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
32102 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && 30600 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
32103 { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' 30601 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32104which seems to be undefined. Please make sure it is defined." >&5 30602which seems to be undefined. Please make sure it is defined." >&5
32105$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' 30603echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32106which seems to be undefined. Please make sure it is defined." >&2;} 30604which seems to be undefined. Please make sure it is defined." >&2;}
32107 30605
32108 rm -f "$tmp/stdin" 30606 rm -f "$tmp/stdin"
32109 case $ac_file in 30607 case $ac_file in
32110 -) cat "$tmp/out" && rm -f "$tmp/out";; 30608 -) cat "$tmp/out"; rm -f "$tmp/out";;
32111 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; 30609 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
32112 esac \ 30610 esac
32113 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
32114$as_echo "$as_me: error: could not create $ac_file" >&2;}
32115 { (exit 1); exit 1; }; }
32116 ;; 30611 ;;
32117 :H) 30612 :H)
32118 # 30613 #
32119 # CONFIG_HEADER 30614 # CONFIG_HEADER
32120 # 30615 #
30616_ACEOF
30617
30618# Transform confdefs.h into a sed script `conftest.defines', that
30619# substitutes the proper values into config.h.in to produce config.h.
30620rm -f conftest.defines conftest.tail
30621# First, append a space to every undef/define line, to ease matching.
30622echo 's/$/ /' >conftest.defines
30623# Then, protect against being on the right side of a sed subst, or in
30624# an unquoted here document, in config.status. If some macros were
30625# called several times there might be several #defines for the same
30626# symbol, which is useless. But do not sort them, since the last
30627# AC_DEFINE must be honored.
30628ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
30629# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
30630# NAME is the cpp macro being defined, VALUE is the value it is being given.
30631# PARAMS is the parameter list in the macro definition--in most cases, it's
30632# just an empty string.
30633ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
30634ac_dB='\\)[ (].*,\\1define\\2'
30635ac_dC=' '
30636ac_dD=' ,'
30637
30638uniq confdefs.h |
30639 sed -n '
30640 t rset
30641 :rset
30642 s/^[ ]*#[ ]*define[ ][ ]*//
30643 t ok
30644 d
30645 :ok
30646 s/[\\&,]/\\&/g
30647 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
30648 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
30649 ' >>conftest.defines
30650
30651# Remove the space that was appended to ease matching.
30652# Then replace #undef with comments. This is necessary, for
30653# example, in the case of _POSIX_SOURCE, which is predefined and required
30654# on some systems where configure will not decide to define it.
30655# (The regexp can be short, since the line contains either #define or #undef.)
30656echo 's/ $//
30657s,^[ #]*u.*,/* & */,' >>conftest.defines
30658
30659# Break up conftest.defines:
30660ac_max_sed_lines=50
30661
30662# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
30663# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
30664# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
30665# et cetera.
30666ac_in='$ac_file_inputs'
30667ac_out='"$tmp/out1"'
30668ac_nxt='"$tmp/out2"'
30669
30670while :
30671do
30672 # Write a here document:
30673 cat >>$CONFIG_STATUS <<_ACEOF
30674 # First, check the format of the line:
30675 cat >"\$tmp/defines.sed" <<\\CEOF
30676/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
30677/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
30678b
30679:def
30680_ACEOF
30681 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
30682 echo 'CEOF
30683 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
30684 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
30685 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
30686 grep . conftest.tail >/dev/null || break
30687 rm -f conftest.defines
30688 mv conftest.tail conftest.defines
30689done
30690rm -f conftest.defines conftest.tail
30691
30692echo "ac_result=$ac_in" >>$CONFIG_STATUS
30693cat >>$CONFIG_STATUS <<\_ACEOF
32121 if test x"$ac_file" != x-; then 30694 if test x"$ac_file" != x-; then
32122 { 30695 echo "/* $configure_input */" >"$tmp/config.h"
32123 $as_echo "/* $configure_input */" \ 30696 cat "$ac_result" >>"$tmp/config.h"
32124 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" 30697 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
32125 } >"$tmp/config.h" \ 30698 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
32126 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 30699echo "$as_me: $ac_file is unchanged" >&6;}
32127$as_echo "$as_me: error: could not create $ac_file" >&2;}
32128 { (exit 1); exit 1; }; }
32129 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
32130 { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
32131$as_echo "$as_me: $ac_file is unchanged" >&6;}
32132 else 30700 else
32133 rm -f "$ac_file" 30701 rm -f $ac_file
32134 mv "$tmp/config.h" "$ac_file" \ 30702 mv "$tmp/config.h" $ac_file
32135 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
32136$as_echo "$as_me: error: could not create $ac_file" >&2;}
32137 { (exit 1); exit 1; }; }
32138 fi 30703 fi
32139 else 30704 else
32140 $as_echo "/* $configure_input */" \ 30705 echo "/* $configure_input */"
32141 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ 30706 cat "$ac_result"
32142 || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
32143$as_echo "$as_me: error: could not create -" >&2;}
32144 { (exit 1); exit 1; }; }
32145 fi 30707 fi
30708 rm -f "$tmp/out12"
32146 ;; 30709 ;;
32147 30710
32148 30711
@@ -32156,11 +30719,6 @@ _ACEOF
32156chmod +x $CONFIG_STATUS 30719chmod +x $CONFIG_STATUS
32157ac_clean_files=$ac_clean_files_save 30720ac_clean_files=$ac_clean_files_save
32158 30721
32159test $ac_write_fail = 0 ||
32160 { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
32161$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
32162 { (exit 1); exit 1; }; }
32163
32164 30722
32165# configure is writing to config.log, and then calls config.status. 30723# configure is writing to config.log, and then calls config.status.
32166# config.status does its own redirection, appending to config.log. 30724# config.status does its own redirection, appending to config.log.
@@ -32182,10 +30740,6 @@ if test "$no_create" != yes; then
32182 # would make configure fail if this is the last instruction. 30740 # would make configure fail if this is the last instruction.
32183 $ac_cs_success || { (exit 1); exit 1; } 30741 $ac_cs_success || { (exit 1); exit 1; }
32184fi 30742fi
32185if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
32186 { $as_echo "$as_me:$LINENO: WARNING: Unrecognized options: $ac_unrecognized_opts" >&5
32187$as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2;}
32188fi
32189 30743
32190 30744
32191# Print summary of options 30745# Print summary of options
diff --git a/configure.ac b/configure.ac
index a3ff2b545..dfd63765b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.427 2009/09/11 04:56:08 dtucker Exp $ 1# $Id: configure.ac,v 1.444 2010/03/05 04:04:35 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.427 $) 18AC_REVISION($Revision: 1.444 $)
19AC_CONFIG_SRCDIR([ssh.c]) 19AC_CONFIG_SRCDIR([ssh.c])
20 20
21AC_CONFIG_HEADER(config.h) 21AC_CONFIG_HEADER(config.h)
@@ -108,7 +108,7 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
108 ;; 108 ;;
109 2.*) no_attrib_nonnull=1 ;; 109 2.*) no_attrib_nonnull=1 ;;
110 3.*) CFLAGS="$CFLAGS -Wsign-compare -Wformat-security" ;; 110 3.*) CFLAGS="$CFLAGS -Wsign-compare -Wformat-security" ;;
111 4.*) CFLAGS="$CFLAGS -Wsign-compare -Wno-pointer-sign -Wformat-security" ;; 111 4.*) CFLAGS="$CFLAGS -Wsign-compare -Wno-pointer-sign -Wformat-security -fno-strict-aliasing" ;;
112 *) ;; 112 *) ;;
113 esac 113 esac
114 114
@@ -446,7 +446,7 @@ int main(void) { exit(0); }
446 AC_DEFINE(DISABLE_FD_PASSING, 1, 446 AC_DEFINE(DISABLE_FD_PASSING, 1,
447 [Define if your platform needs to skip post auth 447 [Define if your platform needs to skip post auth
448 file descriptor passing]) 448 file descriptor passing])
449 AC_DEFINE(SSH_IOBUFSZ, 65536, [Windows is sensitive to read buffer size]) 449 AC_DEFINE(SSH_IOBUFSZ, 65535, [Windows is sensitive to read buffer size])
450 ;; 450 ;;
451*-*-dgux*) 451*-*-dgux*)
452 AC_DEFINE(IP_TOS_IS_BROKEN, 1, 452 AC_DEFINE(IP_TOS_IS_BROKEN, 1,
@@ -613,6 +613,7 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
613 if it doesn't return EOPNOTSUPP.]) 613 if it doesn't return EOPNOTSUPP.])
614 AC_DEFINE(_PATH_BTMP, "/var/log/btmp", [log for bad login attempts]) 614 AC_DEFINE(_PATH_BTMP, "/var/log/btmp", [log for bad login attempts])
615 AC_DEFINE(USE_BTMP) 615 AC_DEFINE(USE_BTMP)
616 AC_DEFINE(LINUX_OOM_ADJUST, 1, [Adjust Linux out-of-memory killer])
616 inet6_default_4in6=yes 617 inet6_default_4in6=yes
617 case `uname -r` in 618 case `uname -r` in
618 1.*|2.0.*) 619 1.*|2.0.*)
@@ -630,7 +631,6 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
630 AC_DEFINE(SSH_TUN_PREPEND_AF, 1, 631 AC_DEFINE(SSH_TUN_PREPEND_AF, 1,
631 [Prepend the address family to IP tunnel traffic]) 632 [Prepend the address family to IP tunnel traffic])
632 fi 633 fi
633 AC_DEFINE(OOM_ADJUST, 1, [Adjust Linux out-of-memory killer])
634 ;; 634 ;;
635mips-sony-bsd|mips-sony-newsos4) 635mips-sony-bsd|mips-sony-newsos4)
636 AC_DEFINE(NEED_SETPGRP, 1, [Need setpgrp to acquire controlling tty]) 636 AC_DEFINE(NEED_SETPGRP, 1, [Need setpgrp to acquire controlling tty])
@@ -768,9 +768,11 @@ mips-sony-bsd|mips-sony-newsos4)
768 ;; 768 ;;
769# UnixWare 7.x, OpenUNIX 8 769# UnixWare 7.x, OpenUNIX 8
770*-*-sysv5*) 770*-*-sysv5*)
771 CPPFLAGS="$CPPFLAGS -Dvsnprintf=_xvsnprintf -Dsnprintf=_xsnprintf"
771 AC_DEFINE(UNIXWARE_LONG_PASSWORDS, 1, [Support passwords > 8 chars]) 772 AC_DEFINE(UNIXWARE_LONG_PASSWORDS, 1, [Support passwords > 8 chars])
772 AC_DEFINE(USE_PIPES) 773 AC_DEFINE(USE_PIPES)
773 AC_DEFINE(SETEUID_BREAKS_SETUID) 774 AC_DEFINE(SETEUID_BREAKS_SETUID)
775 AC_DEFINE(BROKEN_GETADDRINFO)
774 AC_DEFINE(BROKEN_SETREUID) 776 AC_DEFINE(BROKEN_SETREUID)
775 AC_DEFINE(BROKEN_SETREGID) 777 AC_DEFINE(BROKEN_SETREGID)
776 AC_DEFINE(PASSWD_NEEDS_USERNAME) 778 AC_DEFINE(PASSWD_NEEDS_USERNAME)
@@ -809,6 +811,7 @@ mips-sony-bsd|mips-sony-newsos4)
809 AC_DEFINE(DISABLE_SHADOW) 811 AC_DEFINE(DISABLE_SHADOW)
810 AC_DEFINE(DISABLE_FD_PASSING) 812 AC_DEFINE(DISABLE_FD_PASSING)
811 AC_DEFINE(SETEUID_BREAKS_SETUID) 813 AC_DEFINE(SETEUID_BREAKS_SETUID)
814 AC_DEFINE(BROKEN_GETADDRINFO)
812 AC_DEFINE(BROKEN_SETREUID) 815 AC_DEFINE(BROKEN_SETREUID)
813 AC_DEFINE(BROKEN_SETREGID) 816 AC_DEFINE(BROKEN_SETREGID)
814 AC_DEFINE(WITH_ABBREV_NO_TTY) 817 AC_DEFINE(WITH_ABBREV_NO_TTY)
@@ -1375,6 +1378,7 @@ AC_CHECK_FUNCS( \
1375 getrlimit \ 1378 getrlimit \
1376 getttyent \ 1379 getttyent \
1377 glob \ 1380 glob \
1381 group_from_gid \
1378 inet_aton \ 1382 inet_aton \
1379 inet_ntoa \ 1383 inet_ntoa \
1380 inet_ntop \ 1384 inet_ntop \
@@ -1401,8 +1405,10 @@ AC_CHECK_FUNCS( \
1401 setegid \ 1405 setegid \
1402 setenv \ 1406 setenv \
1403 seteuid \ 1407 seteuid \
1408 setgroupent \
1404 setgroups \ 1409 setgroups \
1405 setlogin \ 1410 setlogin \
1411 setpassent\
1406 setpcred \ 1412 setpcred \
1407 setproctitle \ 1413 setproctitle \
1408 setregid \ 1414 setregid \
@@ -1431,12 +1437,18 @@ AC_CHECK_FUNCS( \
1431 truncate \ 1437 truncate \
1432 unsetenv \ 1438 unsetenv \
1433 updwtmpx \ 1439 updwtmpx \
1440 user_from_uid \
1434 vasprintf \ 1441 vasprintf \
1435 vhangup \ 1442 vhangup \
1436 vsnprintf \ 1443 vsnprintf \
1437 waitpid \ 1444 waitpid \
1438) 1445)
1439 1446
1447# PKCS#11 support requires dlopen() and co
1448AC_SEARCH_LIBS(dlopen, dl,
1449 AC_DEFINE([ENABLE_PKCS11], [], [Enable for PKCS#11 support])
1450)
1451
1440# IRIX has a const char return value for gai_strerror() 1452# IRIX has a const char return value for gai_strerror()
1441AC_CHECK_FUNCS(gai_strerror,[ 1453AC_CHECK_FUNCS(gai_strerror,[
1442 AC_DEFINE(HAVE_GAI_STRERROR) 1454 AC_DEFINE(HAVE_GAI_STRERROR)
@@ -3280,66 +3292,6 @@ if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
3280 AC_DEFINE(HAVE_SYS_NERR, 1, [Define if your system defines sys_nerr]) 3292 AC_DEFINE(HAVE_SYS_NERR, 1, [Define if your system defines sys_nerr])
3281fi 3293fi
3282 3294
3283SCARD_MSG="no"
3284# Check whether user wants sectok support
3285AC_ARG_WITH(sectok,
3286 [ --with-sectok Enable smartcard support using libsectok],
3287 [
3288 if test "x$withval" != "xno" ; then
3289 if test "x$withval" != "xyes" ; then
3290 CPPFLAGS="$CPPFLAGS -I${withval}"
3291 LDFLAGS="$LDFLAGS -L${withval}"
3292 if test ! -z "$need_dash_r" ; then
3293 LDFLAGS="$LDFLAGS -R${withval}"
3294 fi
3295 if test ! -z "$blibpath" ; then
3296 blibpath="$blibpath:${withval}"
3297 fi
3298 fi
3299 AC_CHECK_HEADERS(sectok.h)
3300 if test "$ac_cv_header_sectok_h" != yes; then
3301 AC_MSG_ERROR(Can't find sectok.h)
3302 fi
3303 AC_CHECK_LIB(sectok, sectok_open)
3304 if test "$ac_cv_lib_sectok_sectok_open" != yes; then
3305 AC_MSG_ERROR(Can't find libsectok)
3306 fi
3307 AC_DEFINE(SMARTCARD, 1,
3308 [Define if you want smartcard support])
3309 AC_DEFINE(USE_SECTOK, 1,
3310 [Define if you want smartcard support
3311 using sectok])
3312 SCARD_MSG="yes, using sectok"
3313 fi
3314 ]
3315)
3316
3317# Check whether user wants OpenSC support
3318OPENSC_CONFIG="no"
3319AC_ARG_WITH(opensc,
3320 [ --with-opensc[[=PFX]] Enable smartcard support using OpenSC (optionally in PATH)],
3321 [
3322 if test "x$withval" != "xno" ; then
3323 if test "x$withval" != "xyes" ; then
3324 OPENSC_CONFIG=$withval/bin/opensc-config
3325 else
3326 AC_PATH_PROG(OPENSC_CONFIG, opensc-config, no)
3327 fi
3328 if test "$OPENSC_CONFIG" != "no"; then
3329 LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags`
3330 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs`
3331 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
3332 LIBS="$LIBS $LIBOPENSC_LIBS"
3333 AC_DEFINE(SMARTCARD)
3334 AC_DEFINE(USE_OPENSC, 1,
3335 [Define if you want smartcard support
3336 using OpenSC])
3337 SCARD_MSG="yes, using OpenSC"
3338 fi
3339 fi
3340 ]
3341)
3342
3343# Check libraries needed by DNS fingerprint support 3295# Check libraries needed by DNS fingerprint support
3344AC_SEARCH_LIBS(getrrsetbyname, resolv, 3296AC_SEARCH_LIBS(getrrsetbyname, resolv,
3345 [AC_DEFINE(HAVE_GETRRSETBYNAME, 1, 3297 [AC_DEFINE(HAVE_GETRRSETBYNAME, 1,
@@ -4210,7 +4162,7 @@ fi
4210AC_EXEEXT 4162AC_EXEEXT
4211AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openssh.xml \ 4163AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openssh.xml \
4212 openbsd-compat/Makefile openbsd-compat/regress/Makefile \ 4164 openbsd-compat/Makefile openbsd-compat/regress/Makefile \
4213 scard/Makefile ssh_prng_cmds survey.sh]) 4165 ssh_prng_cmds survey.sh])
4214AC_OUTPUT 4166AC_OUTPUT
4215 4167
4216# Print summary of options 4168# Print summary of options
diff --git a/contrib/caldera/openssh.spec b/contrib/caldera/openssh.spec
index 37e1b9411..7c291a0eb 100644
--- a/contrib/caldera/openssh.spec
+++ b/contrib/caldera/openssh.spec
@@ -17,11 +17,11 @@
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 5.3p1 20 %define version 5.4p1
21 %define cvs %{nil} 21 %define cvs %{nil}
22 %define release 1 22 %define release 1
23%else 23%else
24 %define version 5.3p1 24 %define version 5.4p1
25 %define cvs cvs20050315 25 %define cvs cvs20050315
26 %define release 0r1 26 %define release 0r1
27%endif 27%endif
@@ -319,6 +319,7 @@ fi
319%{_bindir}/ssh-keyscan 319%{_bindir}/ssh-keyscan
320%dir %{_libexecdir} 320%dir %{_libexecdir}
321%attr(4711,root,root) %{_libexecdir}/ssh-keysign 321%attr(4711,root,root) %{_libexecdir}/ssh-keysign
322%{_libexecdir}/ssh-pkcs11-helper
322%{_sbindir}/ssh-host-keygen 323%{_sbindir}/ssh-host-keygen
323%dir %{_defaultdocdir}/%{name}-%{version} 324%dir %{_defaultdocdir}/%{name}-%{version}
324%{_defaultdocdir}/%{name}-%{version}/CREDITS 325%{_defaultdocdir}/%{name}-%{version}/CREDITS
@@ -330,6 +331,7 @@ fi
330%{_defaultdocdir}/%{name}-%{version}/faq.html 331%{_defaultdocdir}/%{name}-%{version}/faq.html
331%{_mandir}/man1/* 332%{_mandir}/man1/*
332%{_mandir}/man8/ssh-keysign.8.gz 333%{_mandir}/man8/ssh-keysign.8.gz
334%{_mandir}/man8/ssh-pkcs11-helper.8.gz
333%{_mandir}/man5/ssh_config.5.gz 335%{_mandir}/man5/ssh_config.5.gz
334 336
335%Files server 337%Files server
@@ -358,4 +360,4 @@ fi
358* Mon Jan 01 1998 ... 360* Mon Jan 01 1998 ...
359Template Version: 1.31 361Template Version: 1.31
360 362
361$Id: openssh.spec,v 1.66.4.1 2009/09/26 04:09:35 djm Exp $ 363$Id: openssh.spec,v 1.69 2010/03/07 22:41:03 djm Exp $
diff --git a/contrib/cygwin/Makefile b/contrib/cygwin/Makefile
index 2ebd143dc..9f680c16c 100644
--- a/contrib/cygwin/Makefile
+++ b/contrib/cygwin/Makefile
@@ -1,8 +1,10 @@
1srcdir=../.. 1srcdir=../..
2copyidsrcdir=..
2prefix=/usr 3prefix=/usr
3exec_prefix=$(prefix) 4exec_prefix=$(prefix)
4bindir=$(prefix)/bin 5bindir=$(prefix)/bin
5datadir=$(prefix)/share 6datadir=$(prefix)/share
7mandir=$(datadir)/man
6docdir=$(datadir)/doc 8docdir=$(datadir)/doc
7sshdocdir=$(docdir)/openssh 9sshdocdir=$(docdir)/openssh
8cygdocdir=$(docdir)/Cygwin 10cygdocdir=$(docdir)/Cygwin
@@ -59,5 +61,16 @@ install-scripts: ssh-host-config ssh-user-config
59 $(INSTALL) -m 755 ssh-host-config $(DESTDIR)$(bindir)/ssh-host-config 61 $(INSTALL) -m 755 ssh-host-config $(DESTDIR)$(bindir)/ssh-host-config
60 $(INSTALL) -m 755 ssh-user-config $(DESTDIR)$(bindir)/ssh-user-config 62 $(INSTALL) -m 755 ssh-user-config $(DESTDIR)$(bindir)/ssh-user-config
61 63
62cygwin-postinstall: move-config-files remove-empty-dir install-inetd-config install-doc install-scripts 64install-copy-id: $(copyidsrcdir)/ssh-copy-id $(copyidsrcdir)/ssh-copy-id.1
65 $(INSTALL) -m 755 $(copyidsrcdir)/ssh-copy-id $(DESTDIR)$(bindir)/ssh-copy-id
66 $(INSTALL) -m 644 $(copyidsrcdir)/ssh-copy-id.1 $(DESTDIR)$(mandir)/man1/ssh-copy-id.1
67
68gzip-man-pages:
69 rm $(DESTDIR)$(mandir)/man1/slogin.1
70 gzip $(DESTDIR)$(mandir)/man1/*.1
71 gzip $(DESTDIR)$(mandir)/man5/*.5
72 gzip $(DESTDIR)$(mandir)/man8/*.8
73 cd $(DESTDIR)$(mandir)/man1 && ln -s ssh.1.gz slogin.1.gz
74
75cygwin-postinstall: move-config-files remove-empty-dir install-inetd-config install-doc install-scripts install-copy-id gzip-man-pages
63 @echo "Cygwin specific configuration finished." 76 @echo "Cygwin specific configuration finished."
diff --git a/contrib/gnome-ssh-askpass2.c b/contrib/gnome-ssh-askpass2.c
index 86d9f9d05..04b3a110e 100644
--- a/contrib/gnome-ssh-askpass2.c
+++ b/contrib/gnome-ssh-askpass2.c
@@ -120,6 +120,8 @@ passphrase_dialog(char *message)
120 g_signal_connect(G_OBJECT(entry), "activate", 120 g_signal_connect(G_OBJECT(entry), "activate",
121 G_CALLBACK(ok_dialog), dialog); 121 G_CALLBACK(ok_dialog), dialog);
122 122
123 gtk_window_set_keep_above(GTK_WINDOW(dialog), TRUE);
124
123 /* Grab focus */ 125 /* Grab focus */
124 gtk_widget_show_now(dialog); 126 gtk_widget_show_now(dialog);
125 if (grab_pointer) { 127 if (grab_pointer) {
diff --git a/contrib/redhat/openssh.spec b/contrib/redhat/openssh.spec
index 680906cf3..de24f1c5d 100644
--- a/contrib/redhat/openssh.spec
+++ b/contrib/redhat/openssh.spec
@@ -1,4 +1,4 @@
1%define ver 5.3p1 1%define ver 5.4p1
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
@@ -74,7 +74,9 @@ Release: %{rel}
74%endif 74%endif
75URL: http://www.openssh.com/portable.html 75URL: http://www.openssh.com/portable.html
76Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz 76Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz
77%if ! %{skip_x11_askpass}
77Source1: http://www.jmknoble.net/software/x11-ssh-askpass/x11-ssh-askpass-%{aversion}.tar.gz 78Source1: http://www.jmknoble.net/software/x11-ssh-askpass/x11-ssh-askpass-%{aversion}.tar.gz
79%endif
78License: BSD 80License: BSD
79Group: Applications/Internet 81Group: Applications/Internet
80BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot 82BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
@@ -92,7 +94,7 @@ BuildPreReq: glibc-devel, pam
92BuildPreReq: /usr/include/security/pam_appl.h 94BuildPreReq: /usr/include/security/pam_appl.h
93%endif 95%endif
94%if ! %{no_x11_askpass} 96%if ! %{no_x11_askpass}
95BuildPreReq: XFree86-devel 97BuildPreReq: /usr/include/X11/Xlib.h
96%endif 98%endif
97%if ! %{no_gnome_askpass} 99%if ! %{no_gnome_askpass}
98BuildPreReq: pkgconfig 100BuildPreReq: pkgconfig
@@ -343,7 +345,9 @@ fi
343%attr(0644,root,root) %{_mandir}/man1/ssh-keygen.1* 345%attr(0644,root,root) %{_mandir}/man1/ssh-keygen.1*
344%attr(0755,root,root) %dir %{_libexecdir}/openssh 346%attr(0755,root,root) %dir %{_libexecdir}/openssh
345%attr(4711,root,root) %{_libexecdir}/openssh/ssh-keysign 347%attr(4711,root,root) %{_libexecdir}/openssh/ssh-keysign
348%attr(0755,root,root) %{_libexecdir}/openssh/ssh-pkcs11-helper
346%attr(0644,root,root) %{_mandir}/man8/ssh-keysign.8* 349%attr(0644,root,root) %{_mandir}/man8/ssh-keysign.8*
350%attr(0644,root,root) %{_mandir}/man8/ssh-pkcs11-helper.8*
347%endif 351%endif
348%if %{scard} 352%if %{scard}
349%attr(0755,root,root) %dir %{_datadir}/openssh 353%attr(0755,root,root) %dir %{_datadir}/openssh
diff --git a/contrib/suse/openssh.spec b/contrib/suse/openssh.spec
index 12661eeae..c09246d1f 100644
--- a/contrib/suse/openssh.spec
+++ b/contrib/suse/openssh.spec
@@ -220,6 +220,7 @@ fi
220%attr(0755,root,root) %dir %{_libdir}/ssh 220%attr(0755,root,root) %dir %{_libdir}/ssh
221%attr(0755,root,root) %{_libdir}/ssh/sftp-server 221%attr(0755,root,root) %{_libdir}/ssh/sftp-server
222%attr(4711,root,root) %{_libdir}/ssh/ssh-keysign 222%attr(4711,root,root) %{_libdir}/ssh/ssh-keysign
223%attr(0755,root,root) %{_libdir}/ssh/ssh-pkcs11-helper
223%attr(0644,root,root) %doc %{_mandir}/man1/scp.1* 224%attr(0644,root,root) %doc %{_mandir}/man1/scp.1*
224%attr(0644,root,root) %doc %{_mandir}/man1/sftp.1* 225%attr(0644,root,root) %doc %{_mandir}/man1/sftp.1*
225%attr(-,root,root) %doc %{_mandir}/man1/slogin.1* 226%attr(-,root,root) %doc %{_mandir}/man1/slogin.1*
@@ -233,6 +234,7 @@ fi
233%attr(0644,root,root) %doc %{_mandir}/man5/sshd_config.5* 234%attr(0644,root,root) %doc %{_mandir}/man5/sshd_config.5*
234%attr(0644,root,root) %doc %{_mandir}/man8/sftp-server.8* 235%attr(0644,root,root) %doc %{_mandir}/man8/sftp-server.8*
235%attr(0644,root,root) %doc %{_mandir}/man8/ssh-keysign.8* 236%attr(0644,root,root) %doc %{_mandir}/man8/ssh-keysign.8*
237%attr(0644,root,root) %doc %{_mandir}/man8/ssh-pkcs11-helper.8*
236%attr(0644,root,root) %doc %{_mandir}/man8/sshd.8* 238%attr(0644,root,root) %doc %{_mandir}/man8/sshd.8*
237%attr(0644,root,root) /var/adm/fillup-templates/sysconfig.ssh 239%attr(0644,root,root) /var/adm/fillup-templates/sysconfig.ssh
238 240
diff --git a/debian/changelog b/debian/changelog
index d349e6ef9..e792fc91b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,33 @@
1openssh (1:5.3p1-4) UNRELEASED; urgency=low 1openssh (1:5.4p1-1) UNRELEASED; urgency=low
2
3 * New upstream release (LP: #535029).
4 - After a transition period of about 10 years, this release disables SSH
5 protocol 1 by default. Clients and servers that need to use the
6 legacy protocol must explicitly enable it in ssh_config / sshd_config
7 or on the command-line.
8 - Remove the libsectok/OpenSC-based smartcard code and add support for
9 PKCS#11 tokens. This support is enabled by default in the Debian
10 packaging, since it now doesn't involve additional library
11 dependencies (closes: #231472, LP: #16918).
12 - Add support for certificate authentication of users and hosts using a
13 new, minimal OpenSSH certificate format (closes: #482806).
14 - Added a 'netcat mode' to ssh(1): "ssh -W host:port ...".
15 - Add the ability to revoke keys in sshd(8) and ssh(1). (For the Debian
16 package, this overlaps with the key blacklisting facility added in
17 openssh 1:4.7p1-9, but with different file formats and slightly
18 different scopes; for the moment, I've roughly merged the two.)
19 - Various multiplexing improvements, including support for requesting
20 port-forwardings via the multiplex protocol (closes: #360151).
21 - Allow setting an explicit umask on the sftp-server(8) commandline to
22 override whatever default the user has (closes: #496843).
23 - Many sftp client improvements, including tab-completion, more options,
24 and recursive transfer support for get/put (LP: #33378). The old
25 mget/mput commands never worked properly and have been removed
26 (closes: #270399, #428082).
27 - Do not prompt for a passphrase if we fail to open a keyfile, and log
28 the reason why the open failed to debug (closes: #431538).
29 - Prevent sftp from crashing when given a "-" without a command. Also,
30 allow whitespace to follow a "-" (closes: #531561).
2 31
3 * Fix 'debian/rules quilt-setup' to avoid writing .orig files if some 32 * Fix 'debian/rules quilt-setup' to avoid writing .orig files if some
4 patches apply with offsets. 33 patches apply with offsets.
diff --git a/debian/patches/authorized-keys-man-symlink.patch b/debian/patches/authorized-keys-man-symlink.patch
index 34535f001..32b1dcc72 100644
--- a/debian/patches/authorized-keys-man-symlink.patch
+++ b/debian/patches/authorized-keys-man-symlink.patch
@@ -8,7 +8,7 @@ Index: b/Makefile.in
8=================================================================== 8===================================================================
9--- a/Makefile.in 9--- a/Makefile.in
10+++ b/Makefile.in 10+++ b/Makefile.in
11@@ -284,6 +284,7 @@ 11@@ -285,6 +285,7 @@
12 $(INSTALL) -m 644 sshd_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/sshd_config.5 12 $(INSTALL) -m 644 sshd_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/sshd_config.5
13 $(INSTALL) -m 644 ssh_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/ssh_config.5 13 $(INSTALL) -m 644 ssh_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/ssh_config.5
14 $(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8 14 $(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
diff --git a/debian/patches/banner-noslash.patch b/debian/patches/banner-noslash.patch
deleted file mode 100644
index fa7b08f23..000000000
--- a/debian/patches/banner-noslash.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1Description: Don't duplicate backslashes when displaying server banner
2Origin: vendor, http://bugs.gentoo.org/show_bug.cgi?id=244222
3Author: Michał Górny <gentoo@mgorny.alt.pl>
4Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1533
5Bug-Debian: http://bugs.debian.org/505378
6Bug-Ubuntu: https://bugs.launchpad.net/bugs/425346
7Bug-Gentoo: http://bugs.gentoo.org/show_bug.cgi?id=244222
8Last-Update: 2010-02-27
9
10Index: b/sshconnect2.c
11===================================================================
12--- a/sshconnect2.c
13+++ b/sshconnect2.c
14@@ -472,7 +472,7 @@
15 if (len > 65536)
16 len = 65536;
17 msg = xmalloc(len * 4 + 1); /* max expansion from strnvis() */
18- strnvis(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL);
19+ strnvis(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL|VIS_NOSLASH);
20 fprintf(stderr, "%s", msg);
21 xfree(msg);
22 }
diff --git a/debian/patches/config-guess-sub.patch b/debian/patches/config-guess-sub.patch
deleted file mode 100644
index aabe99b9e..000000000
--- a/debian/patches/config-guess-sub.patch
+++ /dev/null
@@ -1,387 +0,0 @@
1Description: Update config.guess and config.sub from autotools-dev 20090611.1
2From: Bradley Smith <bradsmith@debian.org>
3Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1722
4Bug-Debian: http://bugs.debian.org/538301
5Last-Update: 2010-03-01
6
7Index: b/config.guess
8===================================================================
9--- a/config.guess
10+++ b/config.guess
11@@ -1,10 +1,10 @@
12 #! /bin/sh
13 # Attempt to guess a canonical system name.
14 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
15-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
16+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
17 # Free Software Foundation, Inc.
18
19-timestamp='2008-04-14'
20+timestamp='2009-06-10'
21
22 # This file is free software; you can redistribute it and/or modify it
23 # under the terms of the GNU General Public License as published by
24@@ -170,7 +170,7 @@
25 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
26 eval $set_cc_for_build
27 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
28- | grep __ELF__ >/dev/null
29+ | grep -q __ELF__
30 then
31 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
32 # Return netbsd for either. FIX?
33@@ -324,6 +324,9 @@
34 case `/usr/bin/uname -p` in
35 sparc) echo sparc-icl-nx7; exit ;;
36 esac ;;
37+ s390x:SunOS:*:*)
38+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
39+ exit ;;
40 sun4H:SunOS:5.*:*)
41 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
42 exit ;;
43@@ -331,7 +334,20 @@
44 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
45 exit ;;
46 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
47- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
48+ eval $set_cc_for_build
49+ SUN_ARCH="i386"
50+ # If there is a compiler, see if it is configured for 64-bit objects.
51+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
52+ # This test works for both compilers.
53+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
54+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
55+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
56+ grep IS_64BIT_ARCH >/dev/null
57+ then
58+ SUN_ARCH="x86_64"
59+ fi
60+ fi
61+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
62 exit ;;
63 sun4*:SunOS:6*:*)
64 # According to config.sub, this is the proper way to canonicalize
65@@ -640,7 +656,7 @@
66 # => hppa64-hp-hpux11.23
67
68 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
69- grep __LP64__ >/dev/null
70+ grep -q __LP64__
71 then
72 HP_ARCH="hppa2.0w"
73 else
74@@ -796,7 +812,7 @@
75 x86)
76 echo i586-pc-interix${UNAME_RELEASE}
77 exit ;;
78- EM64T | authenticamd)
79+ EM64T | authenticamd | genuineintel)
80 echo x86_64-unknown-interix${UNAME_RELEASE}
81 exit ;;
82 IA64)
83@@ -806,6 +822,9 @@
84 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
85 echo i${UNAME_MACHINE}-pc-mks
86 exit ;;
87+ 8664:Windows_NT:*)
88+ echo x86_64-pc-mks
89+ exit ;;
90 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
91 # How do we know it's Interix rather than the generic POSIX subsystem?
92 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
93@@ -866,40 +885,17 @@
94 m68*:Linux:*:*)
95 echo ${UNAME_MACHINE}-unknown-linux-gnu
96 exit ;;
97- mips:Linux:*:*)
98+ mips:Linux:*:* | mips64:Linux:*:*)
99 eval $set_cc_for_build
100 sed 's/^ //' << EOF >$dummy.c
101 #undef CPU
102- #undef mips
103- #undef mipsel
104+ #undef ${UNAME_MACHINE}
105+ #undef ${UNAME_MACHINE}el
106 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
107- CPU=mipsel
108+ CPU=${UNAME_MACHINE}el
109 #else
110 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
111- CPU=mips
112- #else
113- CPU=
114- #endif
115- #endif
116-EOF
117- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
118- /^CPU/{
119- s: ::g
120- p
121- }'`"
122- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
123- ;;
124- mips64:Linux:*:*)
125- eval $set_cc_for_build
126- sed 's/^ //' << EOF >$dummy.c
127- #undef CPU
128- #undef mips64
129- #undef mips64el
130- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
131- CPU=mips64el
132- #else
133- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
134- CPU=mips64
135+ CPU=${UNAME_MACHINE}
136 #else
137 CPU=
138 #endif
139@@ -931,10 +927,13 @@
140 EV67) UNAME_MACHINE=alphaev67 ;;
141 EV68*) UNAME_MACHINE=alphaev68 ;;
142 esac
143- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
144+ objdump --private-headers /bin/sh | grep -q ld.so.1
145 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
146 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
147 exit ;;
148+ padre:Linux:*:*)
149+ echo sparc-unknown-linux-gnu
150+ exit ;;
151 parisc:Linux:*:* | hppa:Linux:*:*)
152 # Look for CPU level
153 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
154@@ -982,14 +981,6 @@
155 elf32-i386)
156 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
157 ;;
158- a.out-i386-linux)
159- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
160- exit ;;
161- "")
162- # Either a pre-BFD a.out linker (linux-gnuoldld) or
163- # one that does not give us useful --help.
164- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
165- exit ;;
166 esac
167 # Determine whether the default compiler is a.out or elf
168 eval $set_cc_for_build
169@@ -1055,7 +1046,7 @@
170 i*86:syllable:*:*)
171 echo ${UNAME_MACHINE}-pc-syllable
172 exit ;;
173- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
174+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
175 echo i386-unknown-lynxos${UNAME_RELEASE}
176 exit ;;
177 i*86:*DOS:*:*)
178@@ -1099,8 +1090,11 @@
179 pc:*:*:*)
180 # Left here for compatibility:
181 # uname -m prints for DJGPP always 'pc', but it prints nothing about
182- # the processor, so we play safe by assuming i386.
183- echo i386-pc-msdosdjgpp
184+ # the processor, so we play safe by assuming i586.
185+ # Note: whatever this is, it MUST be the same as what config.sub
186+ # prints for the "djgpp" host, or else GDB configury will decide that
187+ # this is a cross-build.
188+ echo i586-pc-msdosdjgpp
189 exit ;;
190 Intel:Mach:3*:*)
191 echo i386-pc-mach3
192@@ -1138,6 +1132,16 @@
193 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
194 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
195 && { echo i486-ncr-sysv4; exit; } ;;
196+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
197+ OS_REL='.3'
198+ test -r /etc/.relid \
199+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
200+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
201+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
202+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
203+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
204+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
205+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
206 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
207 echo m68k-unknown-lynxos${UNAME_RELEASE}
208 exit ;;
209@@ -1150,7 +1154,7 @@
210 rs6000:LynxOS:2.*:*)
211 echo rs6000-unknown-lynxos${UNAME_RELEASE}
212 exit ;;
213- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
214+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
215 echo powerpc-unknown-lynxos${UNAME_RELEASE}
216 exit ;;
217 SM[BE]S:UNIX_SV:*:*)
218@@ -1324,6 +1328,9 @@
219 i*86:rdos:*:*)
220 echo ${UNAME_MACHINE}-pc-rdos
221 exit ;;
222+ i*86:AROS:*:*)
223+ echo ${UNAME_MACHINE}-pc-aros
224+ exit ;;
225 esac
226
227 #echo '(No uname command or uname output not recognized.)' 1>&2
228Index: b/config.sub
229===================================================================
230--- a/config.sub
231+++ b/config.sub
232@@ -1,10 +1,10 @@
233 #! /bin/sh
234 # Configuration validation subroutine script.
235 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
236-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
237+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
238 # Free Software Foundation, Inc.
239
240-timestamp='2008-06-16'
241+timestamp='2009-06-11'
242
243 # This file is (in principle) common to ALL GNU software.
244 # The presence of a machine in this file suggests that SOME GNU software
245@@ -122,6 +122,7 @@
246 case $maybe_os in
247 nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
248 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
249+ kopensolaris*-gnu* | \
250 storm-chaos* | os2-emx* | rtmk-nova*)
251 os=-$maybe_os
252 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
253@@ -152,6 +153,9 @@
254 os=
255 basic_machine=$1
256 ;;
257+ -bluegene*)
258+ os=-cnk
259+ ;;
260 -sim | -cisco | -oki | -wec | -winbond)
261 os=
262 basic_machine=$1
263@@ -249,6 +253,7 @@
264 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
265 | i370 | i860 | i960 | ia64 \
266 | ip2k | iq2000 \
267+ | lm32 \
268 | m32c | m32r | m32rle | m68000 | m68k | m88k \
269 | maxq | mb | microblaze | mcore | mep | metag \
270 | mips | mipsbe | mipseb | mipsel | mipsle \
271@@ -270,6 +275,7 @@
272 | mipsisa64sr71k | mipsisa64sr71kel \
273 | mipstx39 | mipstx39el \
274 | mn10200 | mn10300 \
275+ | moxie \
276 | mt \
277 | msp430 \
278 | nios | nios2 \
279@@ -279,7 +285,7 @@
280 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
281 | pyramid \
282 | score \
283- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
284+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
285 | sh64 | sh64le \
286 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
287 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
288@@ -288,7 +294,7 @@
289 | v850 | v850e \
290 | we32k \
291 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
292- | z8k)
293+ | z8k | z80)
294 basic_machine=$basic_machine-unknown
295 ;;
296 m6811 | m68hc11 | m6812 | m68hc12)
297@@ -331,6 +337,7 @@
298 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
299 | i*86-* | i860-* | i960-* | ia64-* \
300 | ip2k-* | iq2000-* \
301+ | lm32-* \
302 | m32c-* | m32r-* | m32rle-* \
303 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
304 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
305@@ -362,7 +369,7 @@
306 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
307 | pyramid-* \
308 | romp-* | rs6000-* \
309- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
310+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
311 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
312 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
313 | sparclite-* \
314@@ -375,7 +382,7 @@
315 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
316 | xstormy16-* | xtensa*-* \
317 | ymp-* \
318- | z8k-*)
319+ | z8k-* | z80-*)
320 ;;
321 # Recognize the basic CPU types without company name, with glob match.
322 xtensa*)
323@@ -443,6 +450,10 @@
324 basic_machine=m68k-apollo
325 os=-bsd
326 ;;
327+ aros)
328+ basic_machine=i386-pc
329+ os=-aros
330+ ;;
331 aux)
332 basic_machine=m68k-apple
333 os=-aux
334@@ -459,6 +470,10 @@
335 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
336 os=-linux
337 ;;
338+ bluegene*)
339+ basic_machine=powerpc-ibm
340+ os=-cnk
341+ ;;
342 c90)
343 basic_machine=c90-cray
344 os=-unicos
345@@ -1140,6 +1155,10 @@
346 basic_machine=z8k-unknown
347 os=-sim
348 ;;
349+ z80-*-coff)
350+ basic_machine=z80-unknown
351+ os=-sim
352+ ;;
353 none)
354 basic_machine=none-none
355 os=-none
356@@ -1178,7 +1197,7 @@
357 we32k)
358 basic_machine=we32k-att
359 ;;
360- sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
361+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
362 basic_machine=sh-unknown
363 ;;
364 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
365@@ -1248,10 +1267,11 @@
366 # Each alternative MUST END IN A *, to match a version number.
367 # -sysv* is not here because it comes later, after sysvr4.
368 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
369- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
370+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
371 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
372+ | -kopensolaris* \
373 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
374- | -aos* \
375+ | -aos* | -aros* \
376 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
377 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
378 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
379@@ -1600,7 +1620,7 @@
380 -sunos*)
381 vendor=sun
382 ;;
383- -aix*)
384+ -cnk*|-aix*)
385 vendor=ibm
386 ;;
387 -beos*)
diff --git a/debian/patches/debian-banner.patch b/debian/patches/debian-banner.patch
index a9b38e281..c0567f264 100644
--- a/debian/patches/debian-banner.patch
+++ b/debian/patches/debian-banner.patch
@@ -10,15 +10,15 @@ Index: b/servconf.c
10=================================================================== 10===================================================================
11--- a/servconf.c 11--- a/servconf.c
12+++ b/servconf.c 12+++ b/servconf.c
13@@ -132,6 +132,7 @@ 13@@ -135,6 +135,7 @@
14 options->adm_forced_command = NULL;
15 options->chroot_directory = NULL;
16 options->zero_knowledge_password_authentication = -1; 14 options->zero_knowledge_password_authentication = -1;
15 options->revoked_keys_file = NULL;
16 options->trusted_user_ca_keys = NULL;
17+ options->debian_banner = -1; 17+ options->debian_banner = -1;
18 } 18 }
19 19
20 void 20 void
21@@ -273,6 +274,8 @@ 21@@ -277,6 +278,8 @@
22 options->permit_tun = SSH_TUNMODE_NO; 22 options->permit_tun = SSH_TUNMODE_NO;
23 if (options->zero_knowledge_password_authentication == -1) 23 if (options->zero_knowledge_password_authentication == -1)
24 options->zero_knowledge_password_authentication = 0; 24 options->zero_knowledge_password_authentication = 0;
@@ -27,25 +27,25 @@ Index: b/servconf.c
27 27
28 /* Turn privilege separation on by default */ 28 /* Turn privilege separation on by default */
29 if (use_privsep == -1) 29 if (use_privsep == -1)
30@@ -320,6 +323,7 @@ 30@@ -325,6 +328,7 @@
31 sMatch, sPermitOpen, sForceCommand, sChrootDirectory,
32 sUsePrivilegeSeparation, sAllowAgentForwarding, 31 sUsePrivilegeSeparation, sAllowAgentForwarding,
33 sZeroKnowledgePasswordAuthentication, 32 sZeroKnowledgePasswordAuthentication, sHostCertificate,
33 sRevokedKeys, sTrustedUserCAKeys,
34+ sDebianBanner, 34+ sDebianBanner,
35 sDeprecated, sUnsupported 35 sDeprecated, sUnsupported
36 } ServerOpCodes; 36 } ServerOpCodes;
37 37
38@@ -449,6 +453,7 @@ 38@@ -457,6 +461,7 @@
39 { "permitopen", sPermitOpen, SSHCFG_ALL }, 39 { "hostcertificate", sHostCertificate, SSHCFG_GLOBAL },
40 { "forcecommand", sForceCommand, SSHCFG_ALL }, 40 { "revokedkeys", sRevokedKeys, SSHCFG_ALL },
41 { "chrootdirectory", sChrootDirectory, SSHCFG_ALL }, 41 { "trustedusercakeys", sTrustedUserCAKeys, SSHCFG_ALL },
42+ { "debianbanner", sDebianBanner, SSHCFG_GLOBAL }, 42+ { "debianbanner", sDebianBanner, SSHCFG_GLOBAL },
43 { NULL, sBadOption, 0 } 43 { NULL, sBadOption, 0 }
44 }; 44 };
45 45
46@@ -1335,6 +1340,10 @@ 46@@ -1377,6 +1382,10 @@
47 *charptr = xstrdup(arg); 47 charptr = &options->revoked_keys_file;
48 break; 48 goto parse_filename;
49 49
50+ case sDebianBanner: 50+ case sDebianBanner:
51+ intptr = &options->debian_banner; 51+ intptr = &options->debian_banner;
@@ -58,20 +58,20 @@ Index: b/servconf.h
58=================================================================== 58===================================================================
59--- a/servconf.h 59--- a/servconf.h
60+++ b/servconf.h 60+++ b/servconf.h
61@@ -154,6 +154,8 @@ 61@@ -157,6 +157,8 @@
62 62
63 int num_permitted_opens; 63 int num_permitted_opens;
64 64
65+ int debian_banner; 65+ int debian_banner;
66+ 66+
67 char *chroot_directory; 67 char *chroot_directory;
68 } ServerOptions; 68 char *revoked_keys_file;
69 69 char *trusted_user_ca_keys;
70Index: b/sshd.c 70Index: b/sshd.c
71=================================================================== 71===================================================================
72--- a/sshd.c 72--- a/sshd.c
73+++ b/sshd.c 73+++ b/sshd.c
74@@ -426,7 +426,8 @@ 74@@ -422,7 +422,8 @@
75 minor = PROTOCOL_MINOR_1; 75 minor = PROTOCOL_MINOR_1;
76 } 76 }
77 snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s", major, minor, 77 snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s", major, minor,
diff --git a/debian/patches/debian-config.patch b/debian/patches/debian-config.patch
index 3c8bbb0a4..a395d43a0 100644
--- a/debian/patches/debian-config.patch
+++ b/debian/patches/debian-config.patch
@@ -24,7 +24,7 @@ Index: b/readconf.c
24=================================================================== 24===================================================================
25--- a/readconf.c 25--- a/readconf.c
26+++ b/readconf.c 26+++ b/readconf.c
27@@ -1150,7 +1150,7 @@ 27@@ -1152,7 +1152,7 @@
28 if (options->forward_x11 == -1) 28 if (options->forward_x11 == -1)
29 options->forward_x11 = 0; 29 options->forward_x11 = 0;
30 if (options->forward_x11_trusted == -1) 30 if (options->forward_x11_trusted == -1)
@@ -49,10 +49,10 @@ Index: b/ssh_config
49 # RhostsRSAAuthentication no 49 # RhostsRSAAuthentication no
50 # RSAAuthentication yes 50 # RSAAuthentication yes
51 # PasswordAuthentication yes 51 # PasswordAuthentication yes
52@@ -46,3 +47,7 @@ 52@@ -47,3 +48,7 @@
53 # TunnelDevice any:any
54 # PermitLocalCommand no 53 # PermitLocalCommand no
55 # VisualHostKey no 54 # VisualHostKey no
55 # ProxyCommand ssh -q -W %h:%p gateway.example.com
56+ SendEnv LANG LC_* 56+ SendEnv LANG LC_*
57+ HashKnownHosts yes 57+ HashKnownHosts yes
58+ GSSAPIAuthentication yes 58+ GSSAPIAuthentication yes
@@ -98,7 +98,7 @@ Index: b/sshd_config
98=================================================================== 98===================================================================
99--- a/sshd_config 99--- a/sshd_config
100+++ b/sshd_config 100+++ b/sshd_config
101@@ -38,6 +38,7 @@ 101@@ -36,6 +36,7 @@
102 # Authentication: 102 # Authentication:
103 103
104 #LoginGraceTime 2m 104 #LoginGraceTime 2m
diff --git a/debian/patches/doc-connection-sharing.patch b/debian/patches/doc-connection-sharing.patch
index b53e95d34..759f86b30 100644
--- a/debian/patches/doc-connection-sharing.patch
+++ b/debian/patches/doc-connection-sharing.patch
@@ -9,7 +9,7 @@ Index: b/ssh.1
9=================================================================== 9===================================================================
10--- a/ssh.1 10--- a/ssh.1
11+++ b/ssh.1 11+++ b/ssh.1
12@@ -559,7 +559,10 @@ 12@@ -563,7 +563,10 @@
13 the listen port will be dynamically allocated on the server and reported 13 the listen port will be dynamically allocated on the server and reported
14 to the client at run time. 14 to the client at run time.
15 .It Fl S Ar ctl_path 15 .It Fl S Ar ctl_path
diff --git a/debian/patches/gnome-ssh-askpass2-icon.patch b/debian/patches/gnome-ssh-askpass2-icon.patch
index 400415511..96bbf3a09 100644
--- a/debian/patches/gnome-ssh-askpass2-icon.patch
+++ b/debian/patches/gnome-ssh-askpass2-icon.patch
@@ -7,7 +7,7 @@ Index: b/contrib/gnome-ssh-askpass2.c
7=================================================================== 7===================================================================
8--- a/contrib/gnome-ssh-askpass2.c 8--- a/contrib/gnome-ssh-askpass2.c
9+++ b/contrib/gnome-ssh-askpass2.c 9+++ b/contrib/gnome-ssh-askpass2.c
10@@ -207,6 +207,8 @@ 10@@ -209,6 +209,8 @@
11 11
12 gtk_init(&argc, &argv); 12 gtk_init(&argc, &argv);
13 13
diff --git a/debian/patches/gssapi-autoconf.patch b/debian/patches/gssapi-autoconf.patch
index 0ae7d0129..5ef959de7 100644
--- a/debian/patches/gssapi-autoconf.patch
+++ b/debian/patches/gssapi-autoconf.patch
@@ -7,7 +7,7 @@ Index: b/config.h.in
7=================================================================== 7===================================================================
8--- a/config.h.in 8--- a/config.h.in
9+++ b/config.h.in 9+++ b/config.h.in
10@@ -1372,6 +1372,9 @@ 10@@ -1378,6 +1378,9 @@
11 /* Use btmp to log bad logins */ 11 /* Use btmp to log bad logins */
12 #undef USE_BTMP 12 #undef USE_BTMP
13 13
@@ -18,8 +18,8 @@ Index: b/config.h.in
18 #undef USE_LIBEDIT 18 #undef USE_LIBEDIT
19 19
20@@ -1390,6 +1393,9 @@ 20@@ -1390,6 +1393,9 @@
21 /* Define if you want smartcard support using sectok */ 21 /* Use PIPES instead of a socketpair() */
22 #undef USE_SECTOK 22 #undef USE_PIPES
23 23
24+/* platform has the Security Authorization Session API */ 24+/* platform has the Security Authorization Session API */
25+#undef USE_SECURITY_SESSION_API 25+#undef USE_SECURITY_SESSION_API
diff --git a/debian/patches/gssapi-compat.patch b/debian/patches/gssapi-compat.patch
index b97ce9afd..369a23360 100644
--- a/debian/patches/gssapi-compat.patch
+++ b/debian/patches/gssapi-compat.patch
@@ -10,7 +10,7 @@ Index: b/servconf.c
10=================================================================== 10===================================================================
11--- a/servconf.c 11--- a/servconf.c
12+++ b/servconf.c 12+++ b/servconf.c
13@@ -375,16 +375,20 @@ 13@@ -380,16 +380,20 @@
14 #ifdef GSSAPI 14 #ifdef GSSAPI
15 { "gssapiauthentication", sGssAuthentication, SSHCFG_ALL }, 15 { "gssapiauthentication", sGssAuthentication, SSHCFG_ALL },
16 { "gssapicleanupcredentials", sGssCleanupCreds, SSHCFG_GLOBAL }, 16 { "gssapicleanupcredentials", sGssCleanupCreds, SSHCFG_GLOBAL },
diff --git a/debian/patches/gssapi-dump.patch b/debian/patches/gssapi-dump.patch
index 14856e544..9ed033359 100644
--- a/debian/patches/gssapi-dump.patch
+++ b/debian/patches/gssapi-dump.patch
@@ -11,7 +11,7 @@ Index: b/servconf.c
11=================================================================== 11===================================================================
12--- a/servconf.c 12--- a/servconf.c
13+++ b/servconf.c 13+++ b/servconf.c
14@@ -1624,7 +1624,10 @@ 14@@ -1668,7 +1668,10 @@
15 #endif 15 #endif
16 #ifdef GSSAPI 16 #ifdef GSSAPI
17 dump_cfg_fmtint(sGssAuthentication, o->gss_authentication); 17 dump_cfg_fmtint(sGssAuthentication, o->gss_authentication);
diff --git a/debian/patches/gssapi.patch b/debian/patches/gssapi.patch
index 6550ba60b..5c1b83415 100644
--- a/debian/patches/gssapi.patch
+++ b/debian/patches/gssapi.patch
@@ -127,17 +127,16 @@ Index: b/Makefile.in
127=================================================================== 127===================================================================
128--- a/Makefile.in 128--- a/Makefile.in
129+++ b/Makefile.in 129+++ b/Makefile.in
130@@ -71,7 +71,8 @@ 130@@ -74,7 +74,7 @@
131 atomicio.o key.o dispatch.o kex.o mac.o uidswap.o uuencode.o misc.o \
132 monitor_fdpass.o rijndael.o ssh-dss.o ssh-rsa.o dh.o kexdh.o \ 131 monitor_fdpass.o rijndael.o ssh-dss.o ssh-rsa.o dh.o kexdh.o \
133 kexgex.o kexdhc.o kexgexc.o scard.o msg.o progressmeter.o dns.o \ 132 kexgex.o kexdhc.o kexgexc.o msg.o progressmeter.o dns.o \
134- entropy.o scard-opensc.o gss-genr.o umac.o jpake.o schnorr.o 133 entropy.o gss-genr.o umac.o jpake.o schnorr.o \
135+ entropy.o scard-opensc.o gss-genr.o umac.o jpake.o schnorr.o \ 134- ssh-pkcs11.o
136+ kexgssc.o 135+ ssh-pkcs11.o kexgssc.o
137 136
138 SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \ 137 SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \
139 sshconnect.o sshconnect1.o sshconnect2.o mux.o \ 138 sshconnect.o sshconnect1.o sshconnect2.o mux.o \
140@@ -85,7 +86,7 @@ 139@@ -88,7 +88,7 @@
141 auth2-none.o auth2-passwd.o auth2-pubkey.o auth2-jpake.o \ 140 auth2-none.o auth2-passwd.o auth2-pubkey.o auth2-jpake.o \
142 monitor_mm.o monitor.o monitor_wrap.o kexdhs.o kexgexs.o \ 141 monitor_mm.o monitor.o monitor_wrap.o kexdhs.o kexgexs.o \
143 auth-krb5.o \ 142 auth-krb5.o \
@@ -145,12 +144,12 @@ Index: b/Makefile.in
145+ auth2-gss.o gss-serv.o gss-serv-krb5.o kexgsss.o\ 144+ auth2-gss.o gss-serv.o gss-serv-krb5.o kexgsss.o\
146 loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \ 145 loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \
147 audit.o audit-bsm.o platform.o sftp-server.o sftp-common.o \ 146 audit.o audit-bsm.o platform.o sftp-server.o sftp-common.o \
148 roaming_common.o 147 roaming_common.o roaming_serv.o
149Index: b/auth-krb5.c 148Index: b/auth-krb5.c
150=================================================================== 149===================================================================
151--- a/auth-krb5.c 150--- a/auth-krb5.c
152+++ b/auth-krb5.c 151+++ b/auth-krb5.c
153@@ -166,8 +166,13 @@ 152@@ -170,8 +170,13 @@
154 153
155 len = strlen(authctxt->krb5_ticket_file) + 6; 154 len = strlen(authctxt->krb5_ticket_file) + 6;
156 authctxt->krb5_ccname = xmalloc(len); 155 authctxt->krb5_ccname = xmalloc(len);
@@ -164,7 +163,7 @@ Index: b/auth-krb5.c
164 163
165 #ifdef USE_PAM 164 #ifdef USE_PAM
166 if (options.use_pam) 165 if (options.use_pam)
167@@ -219,15 +224,22 @@ 166@@ -226,15 +231,22 @@
168 #ifndef HEIMDAL 167 #ifndef HEIMDAL
169 krb5_error_code 168 krb5_error_code
170 ssh_krb5_cc_gen(krb5_context ctx, krb5_ccache *ccache) { 169 ssh_krb5_cc_gen(krb5_context ctx, krb5_ccache *ccache) {
@@ -189,7 +188,7 @@ Index: b/auth-krb5.c
189 old_umask = umask(0177); 188 old_umask = umask(0177);
190 tmpfd = mkstemp(ccname + strlen("FILE:")); 189 tmpfd = mkstemp(ccname + strlen("FILE:"));
191 umask(old_umask); 190 umask(old_umask);
192@@ -242,6 +254,7 @@ 191@@ -249,6 +261,7 @@
193 return errno; 192 return errno;
194 } 193 }
195 close(tmpfd); 194 close(tmpfd);
@@ -365,7 +364,7 @@ Index: b/clientloop.c
365 /* import options */ 364 /* import options */
366 extern Options options; 365 extern Options options;
367 366
368@@ -1430,6 +1434,15 @@ 367@@ -1431,6 +1435,15 @@
369 /* Do channel operations unless rekeying in progress. */ 368 /* Do channel operations unless rekeying in progress. */
370 if (!rekeying) { 369 if (!rekeying) {
371 channel_after_select(readset, writeset); 370 channel_after_select(readset, writeset);
@@ -1212,9 +1211,9 @@ Index: b/kex.c
1212=================================================================== 1211===================================================================
1213--- a/kex.c 1212--- a/kex.c
1214+++ b/kex.c 1213+++ b/kex.c
1215@@ -49,6 +49,10 @@ 1214@@ -50,6 +50,10 @@
1216 #include "dispatch.h"
1217 #include "monitor.h" 1215 #include "monitor.h"
1216 #include "roaming.h"
1218 1217
1219+#ifdef GSSAPI 1218+#ifdef GSSAPI
1220+#include "ssh-gss.h" 1219+#include "ssh-gss.h"
@@ -1223,7 +1222,7 @@ Index: b/kex.c
1223 #if OPENSSL_VERSION_NUMBER >= 0x00907000L 1222 #if OPENSSL_VERSION_NUMBER >= 0x00907000L
1224 # if defined(HAVE_EVP_SHA256) 1223 # if defined(HAVE_EVP_SHA256)
1225 # define evp_ssh_sha256 EVP_sha256 1224 # define evp_ssh_sha256 EVP_sha256
1226@@ -325,6 +329,20 @@ 1225@@ -326,6 +330,20 @@
1227 k->kex_type = KEX_DH_GEX_SHA256; 1226 k->kex_type = KEX_DH_GEX_SHA256;
1228 k->evp_md = evp_ssh_sha256(); 1227 k->evp_md = evp_ssh_sha256();
1229 #endif 1228 #endif
@@ -1248,7 +1247,7 @@ Index: b/kex.h
1248=================================================================== 1247===================================================================
1249--- a/kex.h 1248--- a/kex.h
1250+++ b/kex.h 1249+++ b/kex.h
1251@@ -66,6 +66,9 @@ 1250@@ -67,6 +67,9 @@
1252 KEX_DH_GRP14_SHA1, 1251 KEX_DH_GRP14_SHA1,
1253 KEX_DH_GEX_SHA1, 1252 KEX_DH_GEX_SHA1,
1254 KEX_DH_GEX_SHA256, 1253 KEX_DH_GEX_SHA256,
@@ -1258,7 +1257,7 @@ Index: b/kex.h
1258 KEX_MAX 1257 KEX_MAX
1259 }; 1258 };
1260 1259
1261@@ -121,6 +124,12 @@ 1260@@ -123,6 +126,12 @@
1262 sig_atomic_t done; 1261 sig_atomic_t done;
1263 int flags; 1262 int flags;
1264 const EVP_MD *evp_md; 1263 const EVP_MD *evp_md;
@@ -1271,7 +1270,7 @@ Index: b/kex.h
1271 char *client_version_string; 1270 char *client_version_string;
1272 char *server_version_string; 1271 char *server_version_string;
1273 int (*verify_host_key)(Key *); 1272 int (*verify_host_key)(Key *);
1274@@ -143,6 +152,11 @@ 1273@@ -146,6 +155,11 @@
1275 void kexgex_client(Kex *); 1274 void kexgex_client(Kex *);
1276 void kexgex_server(Kex *); 1275 void kexgex_server(Kex *);
1277 1276
@@ -1919,10 +1918,10 @@ Index: b/key.c
1919=================================================================== 1918===================================================================
1920--- a/key.c 1919--- a/key.c
1921+++ b/key.c 1920+++ b/key.c
1922@@ -764,6 +764,8 @@ 1921@@ -969,6 +969,8 @@
1923 return KEY_RSA; 1922 return KEY_RSA_CERT;
1924 } else if (strcmp(name, "ssh-dss") == 0) { 1923 } else if (strcmp(name, "ssh-dss-cert-v00@openssh.com") == 0) {
1925 return KEY_DSA; 1924 return KEY_DSA_CERT;
1926+ } else if (strcmp(name, "null") == 0) { 1925+ } else if (strcmp(name, "null") == 0) {
1927+ return KEY_NULL; 1926+ return KEY_NULL;
1928 } 1927 }
@@ -1932,10 +1931,10 @@ Index: b/key.h
1932=================================================================== 1931===================================================================
1933--- a/key.h 1932--- a/key.h
1934+++ b/key.h 1933+++ b/key.h
1935@@ -34,6 +34,7 @@ 1934@@ -37,6 +37,7 @@
1936 KEY_RSA1,
1937 KEY_RSA,
1938 KEY_DSA, 1935 KEY_DSA,
1936 KEY_RSA_CERT,
1937 KEY_DSA_CERT,
1939+ KEY_NULL, 1938+ KEY_NULL,
1940 KEY_UNSPEC 1939 KEY_UNSPEC
1941 }; 1940 };
@@ -1996,7 +1995,7 @@ Index: b/monitor.c
1996 } else { 1995 } else {
1997 mon_dispatch = mon_dispatch_postauth15; 1996 mon_dispatch = mon_dispatch_postauth15;
1998 monitor_permit(mon_dispatch, MONITOR_REQ_TERM, 1); 1997 monitor_permit(mon_dispatch, MONITOR_REQ_TERM, 1);
1999@@ -1706,6 +1723,13 @@ 1998@@ -1691,6 +1708,13 @@
2000 kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server; 1999 kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server;
2001 kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; 2000 kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
2002 kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; 2001 kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
@@ -2010,7 +2009,7 @@ Index: b/monitor.c
2010 kex->server = 1; 2009 kex->server = 1;
2011 kex->hostkey_type = buffer_get_int(m); 2010 kex->hostkey_type = buffer_get_int(m);
2012 kex->kex_type = buffer_get_int(m); 2011 kex->kex_type = buffer_get_int(m);
2013@@ -1911,6 +1935,9 @@ 2012@@ -1897,6 +1921,9 @@
2014 OM_uint32 major; 2013 OM_uint32 major;
2015 u_int len; 2014 u_int len;
2016 2015
@@ -2020,7 +2019,7 @@ Index: b/monitor.c
2020 goid.elements = buffer_get_string(m, &len); 2019 goid.elements = buffer_get_string(m, &len);
2021 goid.length = len; 2020 goid.length = len;
2022 2021
2023@@ -1938,6 +1965,9 @@ 2022@@ -1924,6 +1951,9 @@
2024 OM_uint32 flags = 0; /* GSI needs this */ 2023 OM_uint32 flags = 0; /* GSI needs this */
2025 u_int len; 2024 u_int len;
2026 2025
@@ -2030,7 +2029,7 @@ Index: b/monitor.c
2030 in.value = buffer_get_string(m, &len); 2029 in.value = buffer_get_string(m, &len);
2031 in.length = len; 2030 in.length = len;
2032 major = ssh_gssapi_accept_ctx(gsscontext, &in, &out, &flags); 2031 major = ssh_gssapi_accept_ctx(gsscontext, &in, &out, &flags);
2033@@ -1955,6 +1985,7 @@ 2032@@ -1941,6 +1971,7 @@
2034 monitor_permit(mon_dispatch, MONITOR_REQ_GSSSTEP, 0); 2033 monitor_permit(mon_dispatch, MONITOR_REQ_GSSSTEP, 0);
2035 monitor_permit(mon_dispatch, MONITOR_REQ_GSSUSEROK, 1); 2034 monitor_permit(mon_dispatch, MONITOR_REQ_GSSUSEROK, 1);
2036 monitor_permit(mon_dispatch, MONITOR_REQ_GSSCHECKMIC, 1); 2035 monitor_permit(mon_dispatch, MONITOR_REQ_GSSCHECKMIC, 1);
@@ -2038,7 +2037,7 @@ Index: b/monitor.c
2038 } 2037 }
2039 return (0); 2038 return (0);
2040 } 2039 }
2041@@ -1966,6 +1997,9 @@ 2040@@ -1952,6 +1983,9 @@
2042 OM_uint32 ret; 2041 OM_uint32 ret;
2043 u_int len; 2042 u_int len;
2044 2043
@@ -2048,7 +2047,7 @@ Index: b/monitor.c
2048 gssbuf.value = buffer_get_string(m, &len); 2047 gssbuf.value = buffer_get_string(m, &len);
2049 gssbuf.length = len; 2048 gssbuf.length = len;
2050 mic.value = buffer_get_string(m, &len); 2049 mic.value = buffer_get_string(m, &len);
2051@@ -1992,7 +2026,11 @@ 2050@@ -1978,7 +2012,11 @@
2052 { 2051 {
2053 int authenticated; 2052 int authenticated;
2054 2053
@@ -2061,7 +2060,7 @@ Index: b/monitor.c
2061 2060
2062 buffer_clear(m); 2061 buffer_clear(m);
2063 buffer_put_int(m, authenticated); 2062 buffer_put_int(m, authenticated);
2064@@ -2005,6 +2043,74 @@ 2063@@ -1991,6 +2029,74 @@
2065 /* Monitor loop will terminate if authenticated */ 2064 /* Monitor loop will terminate if authenticated */
2066 return (authenticated); 2065 return (authenticated);
2067 } 2066 }
@@ -2153,7 +2152,7 @@ Index: b/monitor_wrap.c
2153=================================================================== 2152===================================================================
2154--- a/monitor_wrap.c 2153--- a/monitor_wrap.c
2155+++ b/monitor_wrap.c 2154+++ b/monitor_wrap.c
2156@@ -1248,7 +1248,7 @@ 2155@@ -1231,7 +1231,7 @@
2157 } 2156 }
2158 2157
2159 int 2158 int
@@ -2162,7 +2161,7 @@ Index: b/monitor_wrap.c
2162 { 2161 {
2163 Buffer m; 2162 Buffer m;
2164 int authenticated = 0; 2163 int authenticated = 0;
2165@@ -1265,6 +1265,51 @@ 2164@@ -1248,6 +1248,51 @@
2166 debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not "); 2165 debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not ");
2167 return (authenticated); 2166 return (authenticated);
2168 } 2167 }
@@ -2261,7 +2260,7 @@ Index: b/readconf.c
2261 #endif 2260 #endif
2262 { "fallbacktorsh", oDeprecated }, 2261 { "fallbacktorsh", oDeprecated },
2263 { "usersh", oDeprecated }, 2262 { "usersh", oDeprecated },
2264@@ -454,10 +463,26 @@ 2263@@ -456,10 +465,26 @@
2265 intptr = &options->gss_authentication; 2264 intptr = &options->gss_authentication;
2266 goto parse_flag; 2265 goto parse_flag;
2267 2266
@@ -2288,7 +2287,7 @@ Index: b/readconf.c
2288 case oBatchMode: 2287 case oBatchMode:
2289 intptr = &options->batch_mode; 2288 intptr = &options->batch_mode;
2290 goto parse_flag; 2289 goto parse_flag;
2291@@ -1013,7 +1038,11 @@ 2290@@ -1015,7 +1040,11 @@
2292 options->pubkey_authentication = -1; 2291 options->pubkey_authentication = -1;
2293 options->challenge_response_authentication = -1; 2292 options->challenge_response_authentication = -1;
2294 options->gss_authentication = -1; 2293 options->gss_authentication = -1;
@@ -2300,7 +2299,7 @@ Index: b/readconf.c
2300 options->password_authentication = -1; 2299 options->password_authentication = -1;
2301 options->kbd_interactive_authentication = -1; 2300 options->kbd_interactive_authentication = -1;
2302 options->kbd_interactive_devices = NULL; 2301 options->kbd_interactive_devices = NULL;
2303@@ -1105,8 +1134,14 @@ 2302@@ -1107,8 +1136,14 @@
2304 options->challenge_response_authentication = 1; 2303 options->challenge_response_authentication = 1;
2305 if (options->gss_authentication == -1) 2304 if (options->gss_authentication == -1)
2306 options->gss_authentication = 0; 2305 options->gss_authentication = 0;
@@ -2335,7 +2334,7 @@ Index: b/servconf.c
2335=================================================================== 2334===================================================================
2336--- a/servconf.c 2335--- a/servconf.c
2337+++ b/servconf.c 2336+++ b/servconf.c
2338@@ -92,7 +92,10 @@ 2337@@ -93,7 +93,10 @@
2339 options->kerberos_ticket_cleanup = -1; 2338 options->kerberos_ticket_cleanup = -1;
2340 options->kerberos_get_afs_token = -1; 2339 options->kerberos_get_afs_token = -1;
2341 options->gss_authentication=-1; 2340 options->gss_authentication=-1;
@@ -2346,7 +2345,7 @@ Index: b/servconf.c
2346 options->password_authentication = -1; 2345 options->password_authentication = -1;
2347 options->kbd_interactive_authentication = -1; 2346 options->kbd_interactive_authentication = -1;
2348 options->challenge_response_authentication = -1; 2347 options->challenge_response_authentication = -1;
2349@@ -210,8 +213,14 @@ 2348@@ -214,8 +217,14 @@
2350 options->kerberos_get_afs_token = 0; 2349 options->kerberos_get_afs_token = 0;
2351 if (options->gss_authentication == -1) 2350 if (options->gss_authentication == -1)
2352 options->gss_authentication = 0; 2351 options->gss_authentication = 0;
@@ -2361,7 +2360,7 @@ Index: b/servconf.c
2361 if (options->password_authentication == -1) 2360 if (options->password_authentication == -1)
2362 options->password_authentication = 1; 2361 options->password_authentication = 1;
2363 if (options->kbd_interactive_authentication == -1) 2362 if (options->kbd_interactive_authentication == -1)
2364@@ -302,7 +311,9 @@ 2363@@ -306,7 +315,9 @@
2365 sBanner, sUseDNS, sHostbasedAuthentication, 2364 sBanner, sUseDNS, sHostbasedAuthentication,
2366 sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, 2365 sHostbasedUsesNameFromPacketOnly, sClientAliveInterval,
2367 sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, 2366 sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2,
@@ -2371,8 +2370,8 @@ Index: b/servconf.c
2371+ sAcceptEnv, sPermitTunnel, 2370+ sAcceptEnv, sPermitTunnel,
2372 sMatch, sPermitOpen, sForceCommand, sChrootDirectory, 2371 sMatch, sPermitOpen, sForceCommand, sChrootDirectory,
2373 sUsePrivilegeSeparation, sAllowAgentForwarding, 2372 sUsePrivilegeSeparation, sAllowAgentForwarding,
2374 sZeroKnowledgePasswordAuthentication, 2373 sZeroKnowledgePasswordAuthentication, sHostCertificate,
2375@@ -364,9 +375,15 @@ 2374@@ -369,9 +380,15 @@
2376 #ifdef GSSAPI 2375 #ifdef GSSAPI
2377 { "gssapiauthentication", sGssAuthentication, SSHCFG_ALL }, 2376 { "gssapiauthentication", sGssAuthentication, SSHCFG_ALL },
2378 { "gssapicleanupcredentials", sGssCleanupCreds, SSHCFG_GLOBAL }, 2377 { "gssapicleanupcredentials", sGssCleanupCreds, SSHCFG_GLOBAL },
@@ -2388,7 +2387,7 @@ Index: b/servconf.c
2388 #endif 2387 #endif
2389 { "passwordauthentication", sPasswordAuthentication, SSHCFG_ALL }, 2388 { "passwordauthentication", sPasswordAuthentication, SSHCFG_ALL },
2390 { "kbdinteractiveauthentication", sKbdInteractiveAuthentication, SSHCFG_ALL }, 2389 { "kbdinteractiveauthentication", sKbdInteractiveAuthentication, SSHCFG_ALL },
2391@@ -891,10 +908,22 @@ 2390@@ -925,10 +942,22 @@
2392 intptr = &options->gss_authentication; 2391 intptr = &options->gss_authentication;
2393 goto parse_flag; 2392 goto parse_flag;
2394 2393
@@ -2415,7 +2414,7 @@ Index: b/servconf.h
2415=================================================================== 2414===================================================================
2416--- a/servconf.h 2415--- a/servconf.h
2417+++ b/servconf.h 2416+++ b/servconf.h
2418@@ -91,7 +91,10 @@ 2417@@ -94,7 +94,10 @@
2419 int kerberos_get_afs_token; /* If true, try to get AFS token if 2418 int kerberos_get_afs_token; /* If true, try to get AFS token if
2420 * authenticated with Kerberos. */ 2419 * authenticated with Kerberos. */
2421 int gss_authentication; /* If true, permit GSSAPI authentication */ 2420 int gss_authentication; /* If true, permit GSSAPI authentication */
@@ -2588,7 +2587,7 @@ Index: b/sshconnect2.c
2588=================================================================== 2587===================================================================
2589--- a/sshconnect2.c 2588--- a/sshconnect2.c
2590+++ b/sshconnect2.c 2589+++ b/sshconnect2.c
2591@@ -105,9 +105,34 @@ 2590@@ -106,9 +106,34 @@
2592 { 2591 {
2593 Kex *kex; 2592 Kex *kex;
2594 2593
@@ -2623,7 +2622,7 @@ Index: b/sshconnect2.c
2623 if (options.ciphers == (char *)-1) { 2622 if (options.ciphers == (char *)-1) {
2624 logit("No valid ciphers for protocol version 2 given, using defaults."); 2623 logit("No valid ciphers for protocol version 2 given, using defaults.");
2625 options.ciphers = NULL; 2624 options.ciphers = NULL;
2626@@ -135,6 +160,17 @@ 2625@@ -136,6 +161,17 @@
2627 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = 2626 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] =
2628 options.hostkeyalgorithms; 2627 options.hostkeyalgorithms;
2629 2628
@@ -2641,7 +2640,7 @@ Index: b/sshconnect2.c
2641 if (options.rekey_limit) 2640 if (options.rekey_limit)
2642 packet_set_rekey_limit((u_int32_t)options.rekey_limit); 2641 packet_set_rekey_limit((u_int32_t)options.rekey_limit);
2643 2642
2644@@ -144,10 +180,26 @@ 2643@@ -145,10 +181,26 @@
2645 kex->kex[KEX_DH_GRP14_SHA1] = kexdh_client; 2644 kex->kex[KEX_DH_GRP14_SHA1] = kexdh_client;
2646 kex->kex[KEX_DH_GEX_SHA1] = kexgex_client; 2645 kex->kex[KEX_DH_GEX_SHA1] = kexgex_client;
2647 kex->kex[KEX_DH_GEX_SHA256] = kexgex_client; 2646 kex->kex[KEX_DH_GEX_SHA256] = kexgex_client;
@@ -2668,7 +2667,7 @@ Index: b/sshconnect2.c
2668 xxx_kex = kex; 2667 xxx_kex = kex;
2669 2668
2670 dispatch_run(DISPATCH_BLOCK, &kex->done, kex); 2669 dispatch_run(DISPATCH_BLOCK, &kex->done, kex);
2671@@ -236,6 +288,7 @@ 2670@@ -243,6 +295,7 @@
2672 void input_gssapi_hash(int type, u_int32_t, void *); 2671 void input_gssapi_hash(int type, u_int32_t, void *);
2673 void input_gssapi_error(int, u_int32_t, void *); 2672 void input_gssapi_error(int, u_int32_t, void *);
2674 void input_gssapi_errtok(int, u_int32_t, void *); 2673 void input_gssapi_errtok(int, u_int32_t, void *);
@@ -2676,7 +2675,7 @@ Index: b/sshconnect2.c
2676 #endif 2675 #endif
2677 2676
2678 void userauth(Authctxt *, char *); 2677 void userauth(Authctxt *, char *);
2679@@ -251,6 +304,11 @@ 2678@@ -258,6 +311,11 @@
2680 2679
2681 Authmethod authmethods[] = { 2680 Authmethod authmethods[] = {
2682 #ifdef GSSAPI 2681 #ifdef GSSAPI
@@ -2688,7 +2687,7 @@ Index: b/sshconnect2.c
2688 {"gssapi-with-mic", 2687 {"gssapi-with-mic",
2689 userauth_gssapi, 2688 userauth_gssapi,
2690 NULL, 2689 NULL,
2691@@ -542,19 +600,29 @@ 2690@@ -564,19 +622,29 @@
2692 static u_int mech = 0; 2691 static u_int mech = 0;
2693 OM_uint32 min; 2692 OM_uint32 min;
2694 int ok = 0; 2693 int ok = 0;
@@ -2720,7 +2719,7 @@ Index: b/sshconnect2.c
2720 ok = 1; /* Mechanism works */ 2719 ok = 1; /* Mechanism works */
2721 } else { 2720 } else {
2722 mech++; 2721 mech++;
2723@@ -651,8 +719,8 @@ 2722@@ -673,8 +741,8 @@
2724 { 2723 {
2725 Authctxt *authctxt = ctxt; 2724 Authctxt *authctxt = ctxt;
2726 Gssctxt *gssctxt; 2725 Gssctxt *gssctxt;
@@ -2731,7 +2730,7 @@ Index: b/sshconnect2.c
2731 2730
2732 if (authctxt == NULL) 2731 if (authctxt == NULL)
2733 fatal("input_gssapi_response: no authentication context"); 2732 fatal("input_gssapi_response: no authentication context");
2734@@ -762,6 +830,48 @@ 2733@@ -784,6 +852,48 @@
2735 xfree(msg); 2734 xfree(msg);
2736 xfree(lang); 2735 xfree(lang);
2737 } 2736 }
@@ -2795,7 +2794,7 @@ Index: b/sshd.c
2795 #ifdef LIBWRAP 2794 #ifdef LIBWRAP
2796 #include <tcpd.h> 2795 #include <tcpd.h>
2797 #include <syslog.h> 2796 #include <syslog.h>
2798@@ -1531,10 +1535,13 @@ 2797@@ -1577,10 +1581,13 @@
2799 logit("Disabling protocol version 1. Could not load host key"); 2798 logit("Disabling protocol version 1. Could not load host key");
2800 options.protocol &= ~SSH_PROTO_1; 2799 options.protocol &= ~SSH_PROTO_1;
2801 } 2800 }
@@ -2809,7 +2808,7 @@ Index: b/sshd.c
2809 if (!(options.protocol & (SSH_PROTO_1|SSH_PROTO_2))) { 2808 if (!(options.protocol & (SSH_PROTO_1|SSH_PROTO_2))) {
2810 logit("sshd: no hostkeys available -- exiting."); 2809 logit("sshd: no hostkeys available -- exiting.");
2811 exit(1); 2810 exit(1);
2812@@ -1818,6 +1825,60 @@ 2811@@ -1909,6 +1916,60 @@
2813 /* Log the connection. */ 2812 /* Log the connection. */
2814 verbose("Connection from %.500s port %d", remote_ip, remote_port); 2813 verbose("Connection from %.500s port %d", remote_ip, remote_port);
2815 2814
@@ -2870,7 +2869,7 @@ Index: b/sshd.c
2870 /* 2869 /*
2871 * We don't want to listen forever unless the other side 2870 * We don't want to listen forever unless the other side
2872 * successfully authenticates itself. So we set up an alarm which is 2871 * successfully authenticates itself. So we set up an alarm which is
2873@@ -2195,12 +2256,61 @@ 2872@@ -2287,12 +2348,61 @@
2874 2873
2875 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = list_hostkey_types(); 2874 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = list_hostkey_types();
2876 2875
@@ -2936,7 +2935,7 @@ Index: b/sshd_config
2936=================================================================== 2935===================================================================
2937--- a/sshd_config 2936--- a/sshd_config
2938+++ b/sshd_config 2937+++ b/sshd_config
2939@@ -73,6 +73,8 @@ 2938@@ -71,6 +71,8 @@
2940 # GSSAPI options 2939 # GSSAPI options
2941 #GSSAPIAuthentication no 2940 #GSSAPIAuthentication no
2942 #GSSAPICleanupCredentials yes 2941 #GSSAPICleanupCredentials yes
diff --git a/debian/patches/hurd-epfnosupport.patch b/debian/patches/hurd-epfnosupport.patch
index b8ae070f7..e06b46309 100644
--- a/debian/patches/hurd-epfnosupport.patch
+++ b/debian/patches/hurd-epfnosupport.patch
@@ -9,7 +9,7 @@ Index: b/channels.c
9=================================================================== 9===================================================================
10--- a/channels.c 10--- a/channels.c
11+++ b/channels.c 11+++ b/channels.c
12@@ -3098,7 +3098,11 @@ 12@@ -3252,7 +3252,11 @@
13 sock = socket(ai->ai_family, ai->ai_socktype, 13 sock = socket(ai->ai_family, ai->ai_socktype,
14 ai->ai_protocol); 14 ai->ai_protocol);
15 if (sock < 0) { 15 if (sock < 0) {
diff --git a/debian/patches/keepalive-extensions.patch b/debian/patches/keepalive-extensions.patch
index 1bfc9c798..55d07e0d6 100644
--- a/debian/patches/keepalive-extensions.patch
+++ b/debian/patches/keepalive-extensions.patch
@@ -26,7 +26,7 @@ Index: b/readconf.c
26 oDeprecated, oUnsupported 26 oDeprecated, oUnsupported
27 } OpCodes; 27 } OpCodes;
28 28
29@@ -246,6 +247,8 @@ 29@@ -248,6 +249,8 @@
30 #else 30 #else
31 { "zeroknowledgepasswordauthentication", oUnsupported }, 31 { "zeroknowledgepasswordauthentication", oUnsupported },
32 #endif 32 #endif
@@ -35,7 +35,7 @@ Index: b/readconf.c
35 35
36 { NULL, oBadOption } 36 { NULL, oBadOption }
37 }; 37 };
38@@ -845,6 +848,8 @@ 38@@ -847,6 +850,8 @@
39 goto parse_flag; 39 goto parse_flag;
40 40
41 case oServerAliveInterval: 41 case oServerAliveInterval:
@@ -44,7 +44,7 @@ Index: b/readconf.c
44 intptr = &options->server_alive_interval; 44 intptr = &options->server_alive_interval;
45 goto parse_time; 45 goto parse_time;
46 46
47@@ -1233,8 +1238,13 @@ 47@@ -1235,8 +1240,13 @@
48 options->rekey_limit = 0; 48 options->rekey_limit = 0;
49 if (options->verify_host_key_dns == -1) 49 if (options->verify_host_key_dns == -1)
50 options->verify_host_key_dns = 0; 50 options->verify_host_key_dns = 0;
@@ -78,7 +78,7 @@ Index: b/ssh_config.5
78 The argument must be 78 The argument must be
79 .Dq yes 79 .Dq yes
80 or 80 or
81@@ -946,8 +950,15 @@ 81@@ -967,8 +971,15 @@
82 will send a message through the encrypted 82 will send a message through the encrypted
83 channel to request a response from the server. 83 channel to request a response from the server.
84 The default 84 The default
@@ -92,10 +92,10 @@ Index: b/ssh_config.5
92+and 92+and
93+.Cm SetupTimeOut 93+.Cm SetupTimeOut
94+are Debian-specific compatibility aliases for this option. 94+are Debian-specific compatibility aliases for this option.
95 .It Cm SmartcardDevice 95 .It Cm StrictHostKeyChecking
96 Specifies which smartcard device to use. 96 If this flag is set to
97 The argument to this keyword is the device 97 .Dq yes ,
98@@ -993,6 +1004,12 @@ 98@@ -1007,6 +1018,12 @@
99 other side. 99 other side.
100 If they are sent, death of the connection or crash of one 100 If they are sent, death of the connection or crash of one
101 of the machines will be properly noticed. 101 of the machines will be properly noticed.
@@ -112,13 +112,13 @@ Index: b/sshd_config.5
112=================================================================== 112===================================================================
113--- a/sshd_config.5 113--- a/sshd_config.5
114+++ b/sshd_config.5 114+++ b/sshd_config.5
115@@ -919,6 +919,9 @@ 115@@ -936,6 +936,9 @@
116 .Pp 116 .Pp
117 To disable TCP keepalive messages, the value should be set to 117 To disable TCP keepalive messages, the value should be set to
118 .Dq no . 118 .Dq no .
119+.Pp 119+.Pp
120+This option was formerly called 120+This option was formerly called
121+.Cm KeepAlive . 121+.Cm KeepAlive .
122 .It Cm UseDNS 122 .It Cm TrustedUserCAKeys
123 Specifies whether 123 Specifies a file containing public keys of certificate authorities that are
124 .Xr sshd 8 124 trusted to sign user certificates for authentication.
diff --git a/debian/patches/keyfile-debug.patch b/debian/patches/keyfile-debug.patch
deleted file mode 100644
index 2e5f209f3..000000000
--- a/debian/patches/keyfile-debug.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1Description: Output a debug if we can't open an existing keyfile
2Origin: upstream, http://bazaar.launchpad.net/~vcs-imports/openssh/main/revision/5873
3Author: Darren Tucker <dtucker@zip.com.au>
4Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1694
5Bug-Ubuntu: https://bugs.launchpad.net/bugs/505301
6Last-Update: 2010-02-27
7
8Index: b/auth.c
9===================================================================
10--- a/auth.c
11+++ b/auth.c
12@@ -516,8 +516,12 @@
13 * Open the file containing the authorized keys
14 * Fail quietly if file does not exist
15 */
16- if ((fd = open(file, O_RDONLY|O_NONBLOCK)) == -1)
17+ if ((fd = open(file, O_RDONLY|O_NONBLOCK)) == -1) {
18+ if (errno != ENOENT)
19+ debug("Could not open keyfile '%s': %s", file,
20+ strerror(errno));
21 return NULL;
22+ }
23
24 if (fstat(fd, &st) < 0) {
25 close(fd);
diff --git a/debian/patches/lintian-symlink-pickiness.patch b/debian/patches/lintian-symlink-pickiness.patch
index abfad4509..3afddb70e 100644
--- a/debian/patches/lintian-symlink-pickiness.patch
+++ b/debian/patches/lintian-symlink-pickiness.patch
@@ -7,8 +7,8 @@ Index: b/Makefile.in
7=================================================================== 7===================================================================
8--- a/Makefile.in 8--- a/Makefile.in
9+++ b/Makefile.in 9+++ b/Makefile.in
10@@ -293,9 +293,9 @@ 10@@ -295,9 +295,9 @@
11 $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8 11 $(INSTALL) -m 644 ssh-pkcs11-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8
12 $(INSTALL) -m 644 ssh-vulnkey.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-vulnkey.1 12 $(INSTALL) -m 644 ssh-vulnkey.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-vulnkey.1
13 -rm -f $(DESTDIR)$(bindir)/slogin 13 -rm -f $(DESTDIR)$(bindir)/slogin
14- ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin 14- ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin
diff --git a/debian/patches/no-constraint-fallback.patch b/debian/patches/no-constraint-fallback.patch
deleted file mode 100644
index dc01085cb..000000000
--- a/debian/patches/no-constraint-fallback.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1Description: ssh-add: Don't discard constraints when agent refuses request
2 This was a useful migration measure back in 2002 when constraints were new,
3 but just adds risk now.
4Origin: upstream, http://bazaar.launchpad.net/~vcs-imports/openssh/main/revision/5777
5Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
6Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1612
7Bug-Ubuntu: https://bugs.launchpad.net/bugs/209447
8Last-Update: 2010-02-28
9
10Index: b/authfd.c
11===================================================================
12--- a/authfd.c
13+++ b/authfd.c
14@@ -545,12 +545,6 @@
15 return decode_reply(type);
16 }
17
18-int
19-ssh_add_identity(AuthenticationConnection *auth, Key *key, const char *comment)
20-{
21- return ssh_add_identity_constrained(auth, key, comment, 0, 0);
22-}
23-
24 /*
25 * Removes an identity from the authentication server. This call is not
26 * meant to be used by normal applications.
27Index: b/authfd.h
28===================================================================
29--- a/authfd.h
30+++ b/authfd.h
31@@ -75,7 +75,6 @@
32 int ssh_get_num_identities(AuthenticationConnection *, int);
33 Key *ssh_get_first_identity(AuthenticationConnection *, char **, int);
34 Key *ssh_get_next_identity(AuthenticationConnection *, char **, int);
35-int ssh_add_identity(AuthenticationConnection *, Key *, const char *);
36 int ssh_add_identity_constrained(AuthenticationConnection *, Key *,
37 const char *, u_int, u_int);
38 int ssh_remove_identity(AuthenticationConnection *, Key *);
39Index: b/ssh-add.c
40===================================================================
41--- a/ssh-add.c
42+++ b/ssh-add.c
43@@ -203,9 +203,6 @@
44 if (confirm != 0)
45 fprintf(stderr,
46 "The user has to confirm each use of the key\n");
47- } else if (ssh_add_identity(ac, private, comment)) {
48- fprintf(stderr, "Identity added: %s (%s)\n", filename, comment);
49- ret = 0;
50 } else {
51 fprintf(stderr, "Could not add identity: %s\n", filename);
52 }
diff --git a/debian/patches/oom-adjust.patch b/debian/patches/oom-adjust.patch
deleted file mode 100644
index ce79053f7..000000000
--- a/debian/patches/oom-adjust.patch
+++ /dev/null
@@ -1,219 +0,0 @@
1Description: Disable the Linux kernel's OOM-killer for the sshd parent
2Author: Vaclav Ovsik <vaclav.ovsik@i.cz>
3Author: Colin Watson <cjwatson@debian.org>
4Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1470
5Bug-Debian: http://bugs.debian.org/480020
6Last-Update: 2010-02-27
7
8Index: b/config.h.in
9===================================================================
10--- a/config.h.in
11+++ b/config.h.in
12@@ -1238,6 +1238,9 @@
13 /* Define if X11 doesn't support AF_UNIX sockets on that system */
14 #undef NO_X11_UNIX_SOCKETS
15
16+/* Adjust Linux out-of-memory killer */
17+#undef OOM_ADJUST
18+
19 /* Define if EVP_DigestUpdate returns void */
20 #undef OPENSSL_EVP_DIGESTUPDATE_VOID
21
22Index: b/configure
23===================================================================
24--- a/configure
25+++ b/configure
26@@ -8369,6 +8369,11 @@
27 _ACEOF
28
29 fi
30+
31+cat >>confdefs.h <<\_ACEOF
32+#define OOM_ADJUST 1
33+_ACEOF
34+
35 ;;
36 mips-sony-bsd|mips-sony-newsos4)
37
38Index: b/configure.ac
39===================================================================
40--- a/configure.ac
41+++ b/configure.ac
42@@ -630,6 +630,7 @@
43 AC_DEFINE(SSH_TUN_PREPEND_AF, 1,
44 [Prepend the address family to IP tunnel traffic])
45 fi
46+ AC_DEFINE(OOM_ADJUST, 1, [Adjust Linux out-of-memory killer])
47 ;;
48 mips-sony-bsd|mips-sony-newsos4)
49 AC_DEFINE(NEED_SETPGRP, 1, [Need setpgrp to acquire controlling tty])
50Index: b/openbsd-compat/port-linux.c
51===================================================================
52--- a/openbsd-compat/port-linux.c
53+++ b/openbsd-compat/port-linux.c
54@@ -18,7 +18,7 @@
55 */
56
57 /*
58- * Linux-specific portability code - just SELinux support at present
59+ * Linux-specific portability code
60 */
61
62 #include "includes.h"
63@@ -27,6 +27,15 @@
64 #include <stdarg.h>
65 #include <string.h>
66
67+#ifdef OOM_ADJUST
68+#include <sys/types.h>
69+#include <sys/stat.h>
70+#include <fcntl.h>
71+#include <unistd.h>
72+#endif
73+
74+#include "log.h"
75+
76 #ifdef WITH_SELINUX
77 #include "key.h"
78 #include "hostfile.h"
79@@ -34,7 +43,6 @@
80 #ifdef HAVE_GETSEUSERBYNAME
81 #include "xmalloc.h"
82 #endif
83-#include "log.h"
84 #include "port-linux.h"
85
86 #include <selinux/selinux.h>
87@@ -186,3 +194,47 @@
88 debug3("%s: done", __func__);
89 }
90 #endif /* WITH_SELINUX */
91+
92+#ifdef OOM_ADJUST
93+/* Get the out-of-memory adjustment file for the current process */
94+static int
95+oom_adj_open(int oflag)
96+{
97+ int fd = open("/proc/self/oom_adj", oflag);
98+ if (fd < 0)
99+ logit("error opening /proc/self/oom_adj: %s", strerror(errno));
100+ return fd;
101+}
102+
103+/* Get the current OOM adjustment */
104+int
105+oom_adj_get(char *buf, size_t maxlen)
106+{
107+ ssize_t n;
108+ int fd = oom_adj_open(O_RDONLY);
109+ if (fd < 0)
110+ return -1;
111+ n = read(fd, buf, maxlen);
112+ if (n < 0)
113+ logit("error reading /proc/self/oom_adj: %s", strerror(errno));
114+ else
115+ buf[n] = '\0';
116+ close(fd);
117+ return n < 0 ? -1 : 0;
118+}
119+
120+/* Set the current OOM adjustment */
121+int
122+oom_adj_set(const char *buf)
123+{
124+ ssize_t n;
125+ int fd = oom_adj_open(O_WRONLY);
126+ if (fd < 0)
127+ return -1;
128+ n = write(fd, buf, strlen(buf));
129+ if (n < 0)
130+ logit("error writing /proc/self/oom_adj: %s", strerror(errno));
131+ close(fd);
132+ return n < 0 ? -1 : 0;
133+}
134+#endif
135Index: b/openbsd-compat/port-linux.h
136===================================================================
137--- a/openbsd-compat/port-linux.h
138+++ b/openbsd-compat/port-linux.h
139@@ -25,4 +25,9 @@
140 void ssh_selinux_setup_exec_context(char *);
141 #endif
142
143+#ifdef OOM_ADJUST
144+int oom_adj_get(char *buf, size_t maxlen);
145+int oom_adj_set(const char *buf);
146+#endif
147+
148 #endif /* ! _PORT_LINUX_H */
149Index: b/sshd.c
150===================================================================
151--- a/sshd.c
152+++ b/sshd.c
153@@ -254,6 +254,11 @@
154 /* Unprivileged user */
155 struct passwd *privsep_pw = NULL;
156
157+#ifdef OOM_ADJUST
158+/* Linux out-of-memory killer adjustment */
159+static char oom_adj_save[8];
160+#endif
161+
162 /* Prototypes for various functions defined later in this file. */
163 void destroy_sensitive_data(void);
164 void demote_sensitive_data(void);
165@@ -908,6 +913,31 @@
166 debug3("%s: done", __func__);
167 }
168
169+#ifdef OOM_ADJUST
170+/*
171+ * If requested in the environment, tell the Linux kernel's out-of-memory
172+ * killer to avoid sshd. The old state will be restored when forking child
173+ * processes.
174+ */
175+static void
176+oom_adjust_startup(void)
177+{
178+ const char *oom_adj = getenv("SSHD_OOM_ADJUST");
179+
180+ if (!oom_adj || !*oom_adj)
181+ return;
182+ oom_adj_get(oom_adj_save, sizeof(oom_adj_save));
183+ oom_adj_set(oom_adj);
184+}
185+
186+static void
187+oom_restore(void)
188+{
189+ if (oom_adj_save[0])
190+ oom_adj_set(oom_adj_save);
191+}
192+#endif
193+
194 /* Accept a connection from inetd */
195 static void
196 server_accept_inetd(int *sock_in, int *sock_out)
197@@ -1670,6 +1700,11 @@
198 /* ignore SIGPIPE */
199 signal(SIGPIPE, SIG_IGN);
200
201+#ifdef OOM_ADJUST
202+ /* Adjust out-of-memory killer */
203+ oom_adjust_startup();
204+#endif
205+
206 /* Get a connection, either from inetd or a listening TCP socket */
207 if (inetd_flag) {
208 server_accept_inetd(&sock_in, &sock_out);
209@@ -1708,6 +1743,10 @@
210 /* This is the child processing a new connection. */
211 setproctitle("%s", "[accepted]");
212
213+#ifdef OOM_ADJUST
214+ oom_restore();
215+#endif
216+
217 /*
218 * Create a new session and process group since the 4.4BSD
219 * setlogin() affects the entire process group. We don't
diff --git a/debian/patches/openbsd-docs.patch b/debian/patches/openbsd-docs.patch
index f34a7f7e2..e98938c15 100644
--- a/debian/patches/openbsd-docs.patch
+++ b/debian/patches/openbsd-docs.patch
@@ -34,7 +34,7 @@ Index: b/ssh-keygen.1
34=================================================================== 34===================================================================
35--- a/ssh-keygen.1 35--- a/ssh-keygen.1
36+++ b/ssh-keygen.1 36+++ b/ssh-keygen.1
37@@ -137,9 +137,7 @@ 37@@ -145,9 +145,7 @@
38 .Pa ~/.ssh/id_dsa 38 .Pa ~/.ssh/id_dsa
39 or 39 or
40 .Pa ~/.ssh/id_rsa . 40 .Pa ~/.ssh/id_rsa .
@@ -45,7 +45,7 @@ Index: b/ssh-keygen.1
45 .Pp 45 .Pp
46 Normally this program generates the key and asks for a file in which 46 Normally this program generates the key and asks for a file in which
47 to store the private key. 47 to store the private key.
48@@ -282,9 +280,7 @@ 48@@ -368,9 +366,7 @@
49 .It Fl q 49 .It Fl q
50 Silence 50 Silence
51 .Nm ssh-keygen . 51 .Nm ssh-keygen .
@@ -60,7 +60,7 @@ Index: b/ssh.1
60=================================================================== 60===================================================================
61--- a/ssh.1 61--- a/ssh.1
62+++ b/ssh.1 62+++ b/ssh.1
63@@ -749,6 +749,10 @@ 63@@ -764,6 +764,10 @@
64 .Sx HISTORY 64 .Sx HISTORY
65 section of 65 section of
66 .Xr ssl 8 66 .Xr ssl 8
@@ -75,7 +75,7 @@ Index: b/sshd.8
75=================================================================== 75===================================================================
76--- a/sshd.8 76--- a/sshd.8
77+++ b/sshd.8 77+++ b/sshd.8
78@@ -69,7 +69,7 @@ 78@@ -70,7 +70,7 @@
79 .Nm 79 .Nm
80 listens for connections from clients. 80 listens for connections from clients.
81 It is normally started at boot from 81 It is normally started at boot from
@@ -84,7 +84,7 @@ Index: b/sshd.8
84 It forks a new 84 It forks a new
85 daemon for each incoming connection. 85 daemon for each incoming connection.
86 The forked daemons handle 86 The forked daemons handle
87@@ -781,7 +781,7 @@ 87@@ -838,7 +838,7 @@
88 .Xr ssh 1 ) . 88 .Xr ssh 1 ) .
89 It should only be writable by root. 89 It should only be writable by root.
90 .Pp 90 .Pp
@@ -93,7 +93,7 @@ Index: b/sshd.8
93 Contains Diffie-Hellman groups used for the "Diffie-Hellman Group Exchange". 93 Contains Diffie-Hellman groups used for the "Diffie-Hellman Group Exchange".
94 The file format is described in 94 The file format is described in
95 .Xr moduli 5 . 95 .Xr moduli 5 .
96@@ -877,7 +877,6 @@ 96@@ -934,7 +934,6 @@
97 .Xr ssh-vulnkey 1 , 97 .Xr ssh-vulnkey 1 ,
98 .Xr chroot 2 , 98 .Xr chroot 2 ,
99 .Xr hosts_access 5 , 99 .Xr hosts_access 5 ,
diff --git a/debian/patches/package-versioning.patch b/debian/patches/package-versioning.patch
index 939b9adca..b1162bfec 100644
--- a/debian/patches/package-versioning.patch
+++ b/debian/patches/package-versioning.patch
@@ -11,7 +11,7 @@ Index: b/sshconnect.c
11=================================================================== 11===================================================================
12--- a/sshconnect.c 12--- a/sshconnect.c
13+++ b/sshconnect.c 13+++ b/sshconnect.c
14@@ -537,7 +537,7 @@ 14@@ -542,7 +542,7 @@
15 snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s", 15 snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s",
16 compat20 ? PROTOCOL_MAJOR_2 : PROTOCOL_MAJOR_1, 16 compat20 ? PROTOCOL_MAJOR_2 : PROTOCOL_MAJOR_1,
17 compat20 ? PROTOCOL_MINOR_2 : minor1, 17 compat20 ? PROTOCOL_MINOR_2 : minor1,
@@ -24,7 +24,7 @@ Index: b/sshd.c
24=================================================================== 24===================================================================
25--- a/sshd.c 25--- a/sshd.c
26+++ b/sshd.c 26+++ b/sshd.c
27@@ -426,7 +426,7 @@ 27@@ -422,7 +422,7 @@
28 minor = PROTOCOL_MINOR_1; 28 minor = PROTOCOL_MINOR_1;
29 } 29 }
30 snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s", major, minor, 30 snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s", major, minor,
@@ -38,7 +38,7 @@ Index: b/version.h
38--- a/version.h 38--- a/version.h
39+++ b/version.h 39+++ b/version.h
40@@ -3,4 +3,9 @@ 40@@ -3,4 +3,9 @@
41 #define SSH_VERSION "OpenSSH_5.3" 41 #define SSH_VERSION "OpenSSH_5.4"
42 42
43 #define SSH_PORTABLE "p1" 43 #define SSH_PORTABLE "p1"
44-#define SSH_RELEASE SSH_VERSION SSH_PORTABLE 44-#define SSH_RELEASE SSH_VERSION SSH_PORTABLE
diff --git a/debian/patches/quieter-signals.patch b/debian/patches/quieter-signals.patch
index 79bbfe7a9..572a6e67c 100644
--- a/debian/patches/quieter-signals.patch
+++ b/debian/patches/quieter-signals.patch
@@ -16,7 +16,7 @@ Index: b/clientloop.c
16=================================================================== 16===================================================================
17--- a/clientloop.c 17--- a/clientloop.c
18+++ b/clientloop.c 18+++ b/clientloop.c
19@@ -1526,8 +1526,10 @@ 19@@ -1529,8 +1529,10 @@
20 exit_status = 0; 20 exit_status = 0;
21 } 21 }
22 22
diff --git a/debian/patches/selinux-autoconf.patch b/debian/patches/selinux-autoconf.patch
deleted file mode 100644
index 9ac4cd435..000000000
--- a/debian/patches/selinux-autoconf.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1Description: Fix seusers detection at configure time
2 configure didn't add -lselinux to LIBS before it checked for the existence
3 of getseuserbyname and get_default_context_with_level. This resulted in
4 seusers configuration not being handled correctly. Most policies use the
5 seusers feature, and without it login security contexts will not be
6 correct.
7Author: Caleb Case <calebcase@gmail.com>
8Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1713
9Bug-Debian: http://bugs.debian.org/465614
10Bug-Ubuntu: https://bugs.launchpad.net/bugs/188136
11Reviewed-by: Colin Watson <cjwatson@debian.org>
12Last-Update: 2010-02-27
13
14Index: b/configure
15===================================================================
16--- a/configure
17+++ b/configure
18@@ -28011,6 +28011,8 @@
19 $as_echo "$ac_cv_lib_selinux_setexeccon" >&6; }
20 if test $ac_cv_lib_selinux_setexeccon = yes; then
21 LIBSELINUX="-lselinux"
22+ LIBS="$LIBS -lselinux"
23+
24 else
25 { { $as_echo "$as_me:$LINENO: error: SELinux support requires libselinux library" >&5
26 $as_echo "$as_me: error: SELinux support requires libselinux library" >&2;}
27Index: b/configure.ac
28===================================================================
29--- a/configure.ac
30+++ b/configure.ac
31@@ -3422,9 +3422,12 @@
32 AC_DEFINE(WITH_SELINUX,1,[Define if you want SELinux support.])
33 SELINUX_MSG="yes"
34 AC_CHECK_HEADER([selinux/selinux.h], ,
35- AC_MSG_ERROR(SELinux support requires selinux.h header))
36- AC_CHECK_LIB(selinux, setexeccon, [ LIBSELINUX="-lselinux" ],
37- AC_MSG_ERROR(SELinux support requires libselinux library))
38+ AC_MSG_ERROR(SELinux support requires selinux.h header))
39+ AC_CHECK_LIB(selinux, setexeccon,
40+ [ LIBSELINUX="-lselinux"
41+ LIBS="$LIBS -lselinux"
42+ ],
43+ AC_MSG_ERROR(SELinux support requires libselinux library))
44 SSHDLIBS="$SSHDLIBS $LIBSELINUX"
45 AC_CHECK_FUNCS(getseuserbyname get_default_context_with_level)
46 LIBS="$save_LIBS"
diff --git a/debian/patches/selinux-fix-chroot-directory.patch b/debian/patches/selinux-fix-chroot-directory.patch
index 7b3fdac1a..03942392b 100644
--- a/debian/patches/selinux-fix-chroot-directory.patch
+++ b/debian/patches/selinux-fix-chroot-directory.patch
@@ -12,9 +12,9 @@ Index: b/session.c
12=================================================================== 12===================================================================
13--- a/session.c 13--- a/session.c
14+++ b/session.c 14+++ b/session.c
15@@ -1522,6 +1522,10 @@ 15@@ -1551,6 +1551,10 @@
16 # endif /* USE_LIBIAF */ 16 }
17 #endif 17 #endif /* HAVE_SETPCRED */
18 18
19+#ifdef WITH_SELINUX 19+#ifdef WITH_SELINUX
20+ ssh_selinux_setup_exec_context(pw->pw_name); 20+ ssh_selinux_setup_exec_context(pw->pw_name);
@@ -23,7 +23,7 @@ Index: b/session.c
23 if (options.chroot_directory != NULL && 23 if (options.chroot_directory != NULL &&
24 strcasecmp(options.chroot_directory, "none") != 0) { 24 strcasecmp(options.chroot_directory, "none") != 0) {
25 tmp = tilde_expand_filename(options.chroot_directory, 25 tmp = tilde_expand_filename(options.chroot_directory,
26@@ -1550,10 +1554,6 @@ 26@@ -1575,10 +1579,6 @@
27 27
28 if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid) 28 if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid)
29 fatal("Failed to set uids to %u.", (u_int) pw->pw_uid); 29 fatal("Failed to set uids to %u.", (u_int) pw->pw_uid);
diff --git a/debian/patches/selinux-role.patch b/debian/patches/selinux-role.patch
index ab343b083..8a7e7c687 100644
--- a/debian/patches/selinux-role.patch
+++ b/debian/patches/selinux-role.patch
@@ -186,7 +186,7 @@ Index: b/monitor_wrap.c
186 { 186 {
187 Buffer m; 187 Buffer m;
188 188
189@@ -291,11 +291,29 @@ 189@@ -291,12 +291,30 @@
190 buffer_init(&m); 190 buffer_init(&m);
191 buffer_put_cstring(&m, service); 191 buffer_put_cstring(&m, service);
192 buffer_put_cstring(&m, style ? style : ""); 192 buffer_put_cstring(&m, style ? style : "");
@@ -196,7 +196,7 @@ Index: b/monitor_wrap.c
196 196
197 buffer_free(&m); 197 buffer_free(&m);
198 } 198 }
199+ 199
200+/* Inform the privileged process about role */ 200+/* Inform the privileged process about role */
201+ 201+
202+void 202+void
@@ -213,9 +213,10 @@ Index: b/monitor_wrap.c
213+ 213+
214+ buffer_free(&m); 214+ buffer_free(&m);
215+} 215+}
216 216+
217 /* Do the password authentication */ 217 /* Do the password authentication */
218 int 218 int
219 mm_auth_password(Authctxt *authctxt, char *password)
219Index: b/monitor_wrap.h 220Index: b/monitor_wrap.h
220=================================================================== 221===================================================================
221--- a/monitor_wrap.h 222--- a/monitor_wrap.h
@@ -234,20 +235,20 @@ Index: b/openbsd-compat/port-linux.c
234=================================================================== 235===================================================================
235--- a/openbsd-compat/port-linux.c 236--- a/openbsd-compat/port-linux.c
236+++ b/openbsd-compat/port-linux.c 237+++ b/openbsd-compat/port-linux.c
237@@ -28,6 +28,12 @@ 238@@ -29,6 +29,12 @@
238 #include <string.h> 239 #include <string.h>
240 #include <stdio.h>
239 241
240 #ifdef WITH_SELINUX 242+#ifdef WITH_SELINUX
241+#include "key.h" 243+#include "key.h"
242+#include "hostfile.h" 244+#include "hostfile.h"
243+#include "auth.h" 245+#include "auth.h"
244+#ifdef HAVE_GETSEUSERBYNAME
245+#include "xmalloc.h"
246+#endif 246+#endif
247+
247 #include "log.h" 248 #include "log.h"
249 #include "xmalloc.h"
248 #include "port-linux.h" 250 #include "port-linux.h"
249 251@@ -38,6 +44,8 @@
250@@ -35,6 +41,8 @@
251 #include <selinux/flask.h> 252 #include <selinux/flask.h>
252 #include <selinux/get_context_list.h> 253 #include <selinux/get_context_list.h>
253 254
@@ -256,7 +257,7 @@ Index: b/openbsd-compat/port-linux.c
256 /* Wrapper around is_selinux_enabled() to log its return value once only */ 257 /* Wrapper around is_selinux_enabled() to log its return value once only */
257 int 258 int
258 ssh_selinux_enabled(void) 259 ssh_selinux_enabled(void)
259@@ -53,8 +61,8 @@ 260@@ -56,8 +64,8 @@
260 static security_context_t 261 static security_context_t
261 ssh_selinux_getctxbyname(char *pwname) 262 ssh_selinux_getctxbyname(char *pwname)
262 { 263 {
@@ -267,7 +268,7 @@ Index: b/openbsd-compat/port-linux.c
267 int r; 268 int r;
268 269
269 #ifdef HAVE_GETSEUSERBYNAME 270 #ifdef HAVE_GETSEUSERBYNAME
270@@ -64,11 +72,20 @@ 271@@ -67,11 +75,20 @@
271 sename = pwname; 272 sename = pwname;
272 lvl = NULL; 273 lvl = NULL;
273 #endif 274 #endif
diff --git a/debian/patches/series b/debian/patches/series
index 7f410e363..aaee184ee 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,12 +4,8 @@ gssapi-autoconf.patch
4gssapi-compat.patch 4gssapi-compat.patch
5gssapi-dump.patch 5gssapi-dump.patch
6 6
7# Autotools
8config-guess-sub.patch
9
10# SELinux 7# SELinux
11selinux-role.patch 8selinux-role.patch
12selinux-autoconf.patch
13selinux-fix-chroot-directory.patch 9selinux-fix-chroot-directory.patch
14 10
15# Key blacklisting 11# Key blacklisting
@@ -19,15 +15,10 @@ ssh-vulnkey.patch
19ssh1-keepalive.patch 15ssh1-keepalive.patch
20keepalive-extensions.patch 16keepalive-extensions.patch
21 17
22# Linux OOM handling
23oom-adjust.patch
24
25# Message adjustments 18# Message adjustments
26syslog-level-silent.patch 19syslog-level-silent.patch
27quieter-signals.patch 20quieter-signals.patch
28helpful-wait-terminate.patch 21helpful-wait-terminate.patch
29banner-noslash.patch
30keyfile-debug.patch
31 22
32# Miscellaneous bug fixes 23# Miscellaneous bug fixes
33gnome-ssh-askpass2-link.patch 24gnome-ssh-askpass2-link.patch
@@ -37,8 +28,6 @@ scp-quoting.patch
37shell-path.patch 28shell-path.patch
38ssh-copy-id-status-check.patch 29ssh-copy-id-status-check.patch
39ssh-copy-id-trailing-colons.patch 30ssh-copy-id-trailing-colons.patch
40no-constraint-fallback.patch
41sshd-ignore-sighup.patch
42 31
43# Versioning 32# Versioning
44package-versioning.patch 33package-versioning.patch
diff --git a/debian/patches/shell-path.patch b/debian/patches/shell-path.patch
index cd1bafe83..ddae43a45 100644
--- a/debian/patches/shell-path.patch
+++ b/debian/patches/shell-path.patch
@@ -10,7 +10,7 @@ Index: b/sshconnect.c
10=================================================================== 10===================================================================
11--- a/sshconnect.c 11--- a/sshconnect.c
12+++ b/sshconnect.c 12+++ b/sshconnect.c
13@@ -139,7 +139,7 @@ 13@@ -141,7 +141,7 @@
14 14
15 /* Execute the proxy command. Note that we gave up any 15 /* Execute the proxy command. Note that we gave up any
16 extra privileges above. */ 16 extra privileges above. */
@@ -19,7 +19,7 @@ Index: b/sshconnect.c
19 perror(argv[0]); 19 perror(argv[0]);
20 exit(1); 20 exit(1);
21 } 21 }
22@@ -1167,7 +1167,7 @@ 22@@ -1243,7 +1243,7 @@
23 pid = fork(); 23 pid = fork();
24 if (pid == 0) { 24 if (pid == 0) {
25 debug3("Executing %s -c \"%s\"", shell, args); 25 debug3("Executing %s -c \"%s\"", shell, args);
diff --git a/debian/patches/ssh-argv0.patch b/debian/patches/ssh-argv0.patch
index 4fd544b3f..c0b747e84 100644
--- a/debian/patches/ssh-argv0.patch
+++ b/debian/patches/ssh-argv0.patch
@@ -11,7 +11,7 @@ Index: b/ssh.1
11=================================================================== 11===================================================================
12--- a/ssh.1 12--- a/ssh.1
13+++ b/ssh.1 13+++ b/ssh.1
14@@ -1405,6 +1405,7 @@ 14@@ -1432,6 +1432,7 @@
15 .Xr sftp 1 , 15 .Xr sftp 1 ,
16 .Xr ssh-add 1 , 16 .Xr ssh-add 1 ,
17 .Xr ssh-agent 1 , 17 .Xr ssh-agent 1 ,
diff --git a/debian/patches/ssh-vulnkey.patch b/debian/patches/ssh-vulnkey.patch
index a0396a6eb..c2842a4cf 100644
--- a/debian/patches/ssh-vulnkey.patch
+++ b/debian/patches/ssh-vulnkey.patch
@@ -14,16 +14,16 @@ Index: b/Makefile.in
14=================================================================== 14===================================================================
15--- a/Makefile.in 15--- a/Makefile.in
16+++ b/Makefile.in 16+++ b/Makefile.in
17@@ -26,6 +26,7 @@ 17@@ -27,6 +27,7 @@
18 SFTP_SERVER=$(libexecdir)/sftp-server
19 SSH_KEYSIGN=$(libexecdir)/ssh-keysign 18 SSH_KEYSIGN=$(libexecdir)/ssh-keysign
19 SSH_PKCS11_HELPER=$(libexecdir)/ssh-pkcs11-helper
20 RAND_HELPER=$(libexecdir)/ssh-rand-helper 20 RAND_HELPER=$(libexecdir)/ssh-rand-helper
21+SSH_DATADIR=$(datadir)/ssh 21+SSH_DATADIR=$(datadir)/ssh
22 PRIVSEP_PATH=@PRIVSEP_PATH@ 22 PRIVSEP_PATH=@PRIVSEP_PATH@
23 SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@ 23 SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@
24 STRIP_OPT=@STRIP_OPT@ 24 STRIP_OPT=@STRIP_OPT@
25@@ -37,7 +38,8 @@ 25@@ -39,7 +40,8 @@
26 -D_PATH_SSH_KEY_SIGN=\"$(SSH_KEYSIGN)\" \ 26 -D_PATH_SSH_PKCS11_HELPER=\"$(SSH_PKCS11_HELPER)\" \
27 -D_PATH_SSH_PIDDIR=\"$(piddir)\" \ 27 -D_PATH_SSH_PIDDIR=\"$(piddir)\" \
28 -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\" \ 28 -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\" \
29- -DSSH_RAND_HELPER=\"$(RAND_HELPER)\" 29- -DSSH_RAND_HELPER=\"$(RAND_HELPER)\"
@@ -32,27 +32,27 @@ Index: b/Makefile.in
32 32
33 CC=@CC@ 33 CC=@CC@
34 LD=@LD@ 34 LD=@LD@
35@@ -60,7 +62,7 @@ 35@@ -62,7 +64,7 @@
36 INSTALL_SSH_PRNG_CMDS=@INSTALL_SSH_PRNG_CMDS@ 36 INSTALL_SSH_PRNG_CMDS=@INSTALL_SSH_PRNG_CMDS@
37 INSTALL_SSH_RAND_HELPER=@INSTALL_SSH_RAND_HELPER@ 37 INSTALL_SSH_RAND_HELPER=@INSTALL_SSH_RAND_HELPER@
38 38
39-TARGETS=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) 39-TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) ssh-rand-helper${EXEEXT} sftp-server$(EXEEXT) sftp$(EXEEXT)
40+TARGETS=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) ssh-vulnkey$(EXEEXT) 40+TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) ssh-rand-helper${EXEEXT} sftp-server$(EXEEXT) sftp$(EXEEXT) ssh-vulnkey$(EXEEXT)
41 41
42 LIBSSH_OBJS=acss.o authfd.o authfile.o bufaux.o bufbn.o buffer.o \ 42 LIBSSH_OBJS=acss.o authfd.o authfile.o bufaux.o bufbn.o buffer.o \
43 canohost.o channels.o cipher.o cipher-acss.o cipher-aes.o \ 43 canohost.o channels.o cipher.o cipher-acss.o cipher-aes.o \
44@@ -91,8 +93,8 @@ 44@@ -93,8 +95,8 @@
45 audit.o audit-bsm.o platform.o sftp-server.o sftp-common.o \ 45 audit.o audit-bsm.o platform.o sftp-server.o sftp-common.o \
46 roaming_common.o 46 roaming_common.o roaming_serv.o
47 47
48-MANPAGES = moduli.5.out 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 48-MANPAGES = moduli.5.out 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 ssh-pkcs11-helper.8.out sshd_config.5.out ssh_config.5.out
49-MANPAGES_IN = moduli.5 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 49-MANPAGES_IN = moduli.5 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 ssh-pkcs11-helper.8 sshd_config.5 ssh_config.5
50+MANPAGES = moduli.5.out 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 ssh-vulnkey.1.out sshd_config.5.out ssh_config.5.out 50+MANPAGES = moduli.5.out 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 ssh-pkcs11-helper.8.out ssh-vulnkey.1.out sshd_config.5.out ssh_config.5.out
51+MANPAGES_IN = moduli.5 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 ssh-vulnkey.1 sshd_config.5 ssh_config.5 51+MANPAGES_IN = moduli.5 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 ssh-pkcs11-helper.8 ssh-vulnkey.1 sshd_config.5 ssh_config.5
52 MANTYPE = @MANTYPE@ 52 MANTYPE = @MANTYPE@
53 53
54 CONFIGFILES=sshd_config.out ssh_config.out moduli.out 54 CONFIGFILES=sshd_config.out ssh_config.out moduli.out
55@@ -169,6 +171,9 @@ 55@@ -174,6 +176,9 @@
56 ssh-rand-helper${EXEEXT}: $(LIBCOMPAT) libssh.a ssh-rand-helper.o 56 ssh-rand-helper${EXEEXT}: $(LIBCOMPAT) libssh.a ssh-rand-helper.o
57 $(LD) -o $@ ssh-rand-helper.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) 57 $(LD) -o $@ ssh-rand-helper.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
58 58
@@ -62,23 +62,23 @@ Index: b/Makefile.in
62 # test driver for the loginrec code - not built by default 62 # test driver for the loginrec code - not built by default
63 logintest: logintest.o $(LIBCOMPAT) libssh.a loginrec.o 63 logintest: logintest.o $(LIBCOMPAT) libssh.a loginrec.o
64 $(LD) -o $@ logintest.o $(LDFLAGS) loginrec.o -lopenbsd-compat -lssh $(LIBS) 64 $(LD) -o $@ logintest.o $(LDFLAGS) loginrec.o -lopenbsd-compat -lssh $(LIBS)
65@@ -268,6 +273,7 @@ 65@@ -269,6 +274,7 @@
66 $(INSTALL) -m 4711 $(STRIP_OPT) ssh-keysign $(DESTDIR)$(SSH_KEYSIGN) 66 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-pkcs11-helper $(DESTDIR)$(SSH_PKCS11_HELPER)
67 $(INSTALL) -m 0755 $(STRIP_OPT) sftp $(DESTDIR)$(bindir)/sftp 67 $(INSTALL) -m 0755 $(STRIP_OPT) sftp $(DESTDIR)$(bindir)/sftp
68 $(INSTALL) -m 0755 $(STRIP_OPT) sftp-server $(DESTDIR)$(SFTP_SERVER) 68 $(INSTALL) -m 0755 $(STRIP_OPT) sftp-server $(DESTDIR)$(SFTP_SERVER)
69+ $(INSTALL) -m 0755 $(STRIP_OPT) ssh-vulnkey $(DESTDIR)$(bindir)/ssh-vulnkey 69+ $(INSTALL) -m 0755 $(STRIP_OPT) ssh-vulnkey $(DESTDIR)$(bindir)/ssh-vulnkey
70 $(INSTALL) -m 644 ssh.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1 70 $(INSTALL) -m 644 ssh.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
71 $(INSTALL) -m 644 scp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1 71 $(INSTALL) -m 644 scp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
72 $(INSTALL) -m 644 ssh-add.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1 72 $(INSTALL) -m 644 ssh-add.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
73@@ -284,6 +290,7 @@ 73@@ -286,6 +292,7 @@
74 $(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
75 $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8 74 $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
76 $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8 75 $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
76 $(INSTALL) -m 644 ssh-pkcs11-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8
77+ $(INSTALL) -m 644 ssh-vulnkey.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-vulnkey.1 77+ $(INSTALL) -m 644 ssh-vulnkey.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-vulnkey.1
78 -rm -f $(DESTDIR)$(bindir)/slogin 78 -rm -f $(DESTDIR)$(bindir)/slogin
79 ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin 79 ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin
80 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 80 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
81@@ -365,6 +372,7 @@ 81@@ -367,6 +374,7 @@
82 -rm -f $(DESTDIR)$(bindir)/ssh-agent$(EXEEXT) 82 -rm -f $(DESTDIR)$(bindir)/ssh-agent$(EXEEXT)
83 -rm -f $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT) 83 -rm -f $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT)
84 -rm -f $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT) 84 -rm -f $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT)
@@ -86,7 +86,7 @@ Index: b/Makefile.in
86 -rm -f $(DESTDIR)$(bindir)/sftp$(EXEEXT) 86 -rm -f $(DESTDIR)$(bindir)/sftp$(EXEEXT)
87 -rm -f $(DESTDIR)$(sbindir)/sshd$(EXEEXT) 87 -rm -f $(DESTDIR)$(sbindir)/sshd$(EXEEXT)
88 -rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT) 88 -rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT)
89@@ -377,6 +385,7 @@ 89@@ -380,6 +388,7 @@
90 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1 90 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1
91 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1 91 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
92 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1 92 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1
@@ -98,30 +98,28 @@ Index: b/auth-rh-rsa.c
98=================================================================== 98===================================================================
99--- a/auth-rh-rsa.c 99--- a/auth-rh-rsa.c
100+++ b/auth-rh-rsa.c 100+++ b/auth-rh-rsa.c
101@@ -44,6 +44,9 @@ 101@@ -44,7 +44,7 @@
102 { 102 {
103 HostStatus host_status; 103 HostStatus host_status;
104 104
105+ if (reject_blacklisted_key(client_host_key, 0) == 1) 105- if (auth_key_is_revoked(client_host_key))
106+ return 0; 106+ if (auth_key_is_revoked(client_host_key, 0))
107+
108 /* Check if we would accept it using rhosts authentication. */
109 if (!auth_rhosts(pw, cuser))
110 return 0; 107 return 0;
108
109 /* Check if we would accept it using rhosts authentication. */
111Index: b/auth-rsa.c 110Index: b/auth-rsa.c
112=================================================================== 111===================================================================
113--- a/auth-rsa.c 112--- a/auth-rsa.c
114+++ b/auth-rsa.c 113+++ b/auth-rsa.c
115@@ -246,6 +246,9 @@ 114@@ -94,7 +94,7 @@
116 "actual %d vs. announced %d.", 115 MD5_CTX md;
117 file, linenum, BN_num_bits(key->rsa->n), bits); 116 int len;
118 117
119+ if (reject_blacklisted_key(key, 0) == 1) 118- if (auth_key_is_revoked(key))
120+ continue; 119+ if (auth_key_is_revoked(key, 0))
121+ 120 return 0;
122 /* We have found the desired key. */ 121
123 /* 122 /* don't allow short keys */
124 * If our options do not allow this key to be used,
125Index: b/auth.c 123Index: b/auth.c
126=================================================================== 124===================================================================
127--- a/auth.c 125--- a/auth.c
@@ -134,91 +132,86 @@ Index: b/auth.c
134 #include "auth.h" 132 #include "auth.h"
135 #include "auth-options.h" 133 #include "auth-options.h"
136 #include "canohost.h" 134 #include "canohost.h"
137@@ -398,6 +399,38 @@ 135@@ -593,10 +594,34 @@
138 return host_status;
139 }
140 136
141+int 137 /* Returns 1 if key is revoked by revoked_keys_file, 0 otherwise */
142+reject_blacklisted_key(Key *key, int hostkey) 138 int
143+{ 139-auth_key_is_revoked(Key *key)
144+ char *fp; 140+auth_key_is_revoked(Key *key, int hostkey)
145+ 141 {
146+ if (blacklisted_key(key, &fp) != 1) 142 char *key_fp;
147+ return 0; 143
148+ 144+ if (blacklisted_key(key, &key_fp) == 1) {
149+ if (options.permit_blacklisted_keys) { 145+ if (options.permit_blacklisted_keys) {
150+ if (hostkey) 146+ if (hostkey)
151+ error("Host key %s blacklisted (see " 147+ error("Host key %s blacklisted (see "
152+ "ssh-vulnkey(1)); continuing anyway", fp); 148+ "ssh-vulnkey(1)); continuing anyway",
153+ else 149+ key_fp);
154+ logit("Public key %s from %s blacklisted (see " 150+ else
155+ "ssh-vulnkey(1)); continuing anyway", 151+ logit("Public key %s from %s blacklisted (see "
156+ fp, get_remote_ipaddr()); 152+ "ssh-vulnkey(1)); continuing anyway",
157+ xfree(fp); 153+ key_fp, get_remote_ipaddr());
158+ } else { 154+ xfree(key_fp);
159+ if (hostkey) 155+ } else {
160+ error("Host key %s blacklisted (see " 156+ if (hostkey)
161+ "ssh-vulnkey(1))", fp); 157+ error("Host key %s blacklisted (see "
162+ else 158+ "ssh-vulnkey(1))", key_fp);
163+ logit("Public key %s from %s blacklisted (see " 159+ else
164+ "ssh-vulnkey(1))", 160+ logit("Public key %s from %s blacklisted (see "
165+ fp, get_remote_ipaddr()); 161+ "ssh-vulnkey(1))",
166+ xfree(fp); 162+ key_fp, get_remote_ipaddr());
167+ return 1; 163+ xfree(key_fp);
164+ return 1;
165+ }
168+ } 166+ }
169+ 167+
170+ return 0; 168 if (options.revoked_keys_file == NULL)
171+} 169 return 0;
172+
173 170
174 /*
175 * Check a given file for security. This is defined as all components
176Index: b/auth.h 171Index: b/auth.h
177=================================================================== 172===================================================================
178--- a/auth.h 173--- a/auth.h
179+++ b/auth.h 174+++ b/auth.h
180@@ -178,6 +178,8 @@ 175@@ -173,7 +173,7 @@
181 check_key_in_hostfiles(struct passwd *, Key *, const char *, 176 char *authorized_keys_file2(struct passwd *);
182 const char *, const char *);
183 177
184+int reject_blacklisted_key(Key *, int); 178 FILE *auth_openkeyfile(const char *, struct passwd *, int);
185+ 179-int auth_key_is_revoked(Key *);
186 /* hostkey handling */ 180+int auth_key_is_revoked(Key *, int);
187 Key *get_hostkey_by_index(int); 181
188 Key *get_hostkey_by_type(int); 182 HostStatus
183 check_key_in_hostfiles(struct passwd *, Key *, const char *,
189Index: b/auth2-hostbased.c 184Index: b/auth2-hostbased.c
190=================================================================== 185===================================================================
191--- a/auth2-hostbased.c 186--- a/auth2-hostbased.c
192+++ b/auth2-hostbased.c 187+++ b/auth2-hostbased.c
193@@ -145,6 +145,9 @@ 188@@ -145,7 +145,7 @@
194 HostStatus host_status; 189 HostStatus host_status;
195 int len; 190 int len;
196 191
197+ if (reject_blacklisted_key(key, 0) == 1) 192- if (auth_key_is_revoked(key))
198+ return 0; 193+ if (auth_key_is_revoked(key, 0))
199+ 194 return 0;
200 resolvedname = get_canonical_hostname(options.use_dns);
201 ipaddr = get_remote_ipaddr();
202 195
196 resolvedname = get_canonical_hostname(options.use_dns);
203Index: b/auth2-pubkey.c 197Index: b/auth2-pubkey.c
204=================================================================== 198===================================================================
205--- a/auth2-pubkey.c 199--- a/auth2-pubkey.c
206+++ b/auth2-pubkey.c 200+++ b/auth2-pubkey.c
207@@ -254,6 +254,9 @@ 201@@ -325,7 +325,7 @@
208 int success; 202 int success;
209 char *file; 203 char *file;
210 204
211+ if (reject_blacklisted_key(key, 0) == 1) 205- if (auth_key_is_revoked(key))
212+ return 0; 206+ if (auth_key_is_revoked(key, 0))
213+ 207 return 0;
214 file = authorized_keys_file(pw); 208 if (key_is_cert(key) && auth_key_is_revoked(key->cert->signature_key))
215 success = user_key_allowed2(pw, key, file); 209 return 0;
216 xfree(file);
217Index: b/authfile.c 210Index: b/authfile.c
218=================================================================== 211===================================================================
219--- a/authfile.c 212--- a/authfile.c
220+++ b/authfile.c 213+++ b/authfile.c
221@@ -65,6 +65,7 @@ 214@@ -68,6 +68,7 @@
222 #include "rsa.h" 215 #include "rsa.h"
223 #include "misc.h" 216 #include "misc.h"
224 #include "atomicio.h" 217 #include "atomicio.h"
@@ -226,11 +219,10 @@ Index: b/authfile.c
226 219
227 /* Version identification string for SSH v1 identity files. */ 220 /* Version identification string for SSH v1 identity files. */
228 static const char authfile_id_string[] = 221 static const char authfile_id_string[] =
229@@ -677,3 +678,140 @@ 222@@ -754,3 +755,140 @@
230 key_free(pub); 223 return ret;
231 return NULL;
232 } 224 }
233+ 225
234+/* Scan a blacklist of known-vulnerable keys in blacklist_file. */ 226+/* Scan a blacklist of known-vulnerable keys in blacklist_file. */
235+static int 227+static int
236+blacklisted_key_in_file(const Key *key, const char *blacklist_file, char **fp) 228+blacklisted_key_in_file(const Key *key, const char *blacklist_file, char **fp)
@@ -367,13 +359,14 @@ Index: b/authfile.c
367+ key_free(public); 359+ key_free(public);
368+ return ret; 360+ return ret;
369+} 361+}
362+
370Index: b/authfile.h 363Index: b/authfile.h
371=================================================================== 364===================================================================
372--- a/authfile.h 365--- a/authfile.h
373+++ b/authfile.h 366+++ b/authfile.h
374@@ -23,4 +23,6 @@ 367@@ -24,4 +24,6 @@
375 Key *key_load_private_pem(int, int, const char *, char **);
376 int key_perm_ok(int, const char *); 368 int key_perm_ok(int, const char *);
369 int key_in_file(Key *, const char *, int);
377 370
378+int blacklisted_key(const Key *key, char **fp); 371+int blacklisted_key(const Key *key, char **fp);
379+ 372+
@@ -412,7 +405,7 @@ Index: b/readconf.c
412 oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias, 405 oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias,
413 oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication, 406 oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication,
414+ oUseBlacklistedKeys, 407+ oUseBlacklistedKeys,
415 oHostKeyAlgorithms, oBindAddress, oSmartcardDevice, 408 oHostKeyAlgorithms, oBindAddress, oPKCS11Provider,
416 oClearAllForwardings, oNoHostAuthenticationForLocalhost, 409 oClearAllForwardings, oNoHostAuthenticationForLocalhost,
417 oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout, 410 oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,
418@@ -152,6 +153,7 @@ 411@@ -152,6 +153,7 @@
@@ -423,7 +416,7 @@ Index: b/readconf.c
423 { "rsaauthentication", oRSAAuthentication }, 416 { "rsaauthentication", oRSAAuthentication },
424 { "pubkeyauthentication", oPubkeyAuthentication }, 417 { "pubkeyauthentication", oPubkeyAuthentication },
425 { "dsaauthentication", oPubkeyAuthentication }, /* alias */ 418 { "dsaauthentication", oPubkeyAuthentication }, /* alias */
426@@ -459,6 +461,10 @@ 419@@ -461,6 +463,10 @@
427 intptr = &options->challenge_response_authentication; 420 intptr = &options->challenge_response_authentication;
428 goto parse_flag; 421 goto parse_flag;
429 422
@@ -434,7 +427,7 @@ Index: b/readconf.c
434 case oGssAuthentication: 427 case oGssAuthentication:
435 intptr = &options->gss_authentication; 428 intptr = &options->gss_authentication;
436 goto parse_flag; 429 goto parse_flag;
437@@ -1048,6 +1054,7 @@ 430@@ -1050,6 +1056,7 @@
438 options->kbd_interactive_devices = NULL; 431 options->kbd_interactive_devices = NULL;
439 options->rhosts_rsa_authentication = -1; 432 options->rhosts_rsa_authentication = -1;
440 options->hostbased_authentication = -1; 433 options->hostbased_authentication = -1;
@@ -442,7 +435,7 @@ Index: b/readconf.c
442 options->batch_mode = -1; 435 options->batch_mode = -1;
443 options->check_host_ip = -1; 436 options->check_host_ip = -1;
444 options->strict_host_key_checking = -1; 437 options->strict_host_key_checking = -1;
445@@ -1150,6 +1157,8 @@ 438@@ -1152,6 +1159,8 @@
446 options->rhosts_rsa_authentication = 0; 439 options->rhosts_rsa_authentication = 0;
447 if (options->hostbased_authentication == -1) 440 if (options->hostbased_authentication == -1)
448 options->hostbased_authentication = 0; 441 options->hostbased_authentication = 0;
@@ -467,7 +460,7 @@ Index: b/servconf.c
467=================================================================== 460===================================================================
468--- a/servconf.c 461--- a/servconf.c
469+++ b/servconf.c 462+++ b/servconf.c
470@@ -99,6 +99,7 @@ 463@@ -100,6 +100,7 @@
471 options->password_authentication = -1; 464 options->password_authentication = -1;
472 options->kbd_interactive_authentication = -1; 465 options->kbd_interactive_authentication = -1;
473 options->challenge_response_authentication = -1; 466 options->challenge_response_authentication = -1;
@@ -475,7 +468,7 @@ Index: b/servconf.c
475 options->permit_empty_passwd = -1; 468 options->permit_empty_passwd = -1;
476 options->permit_user_env = -1; 469 options->permit_user_env = -1;
477 options->use_login = -1; 470 options->use_login = -1;
478@@ -227,6 +228,8 @@ 471@@ -231,6 +232,8 @@
479 options->kbd_interactive_authentication = 0; 472 options->kbd_interactive_authentication = 0;
480 if (options->challenge_response_authentication == -1) 473 if (options->challenge_response_authentication == -1)
481 options->challenge_response_authentication = 1; 474 options->challenge_response_authentication = 1;
@@ -484,7 +477,7 @@ Index: b/servconf.c
484 if (options->permit_empty_passwd == -1) 477 if (options->permit_empty_passwd == -1)
485 options->permit_empty_passwd = 0; 478 options->permit_empty_passwd = 0;
486 if (options->permit_user_env == -1) 479 if (options->permit_user_env == -1)
487@@ -302,7 +305,7 @@ 480@@ -306,7 +309,7 @@
488 sListenAddress, sAddressFamily, 481 sListenAddress, sAddressFamily,
489 sPrintMotd, sPrintLastLog, sIgnoreRhosts, 482 sPrintMotd, sPrintLastLog, sIgnoreRhosts,
490 sX11Forwarding, sX11DisplayOffset, sX11UseLocalhost, 483 sX11Forwarding, sX11DisplayOffset, sX11UseLocalhost,
@@ -493,7 +486,7 @@ Index: b/servconf.c
493 sPermitUserEnvironment, sUseLogin, sAllowTcpForwarding, sCompression, 486 sPermitUserEnvironment, sUseLogin, sAllowTcpForwarding, sCompression,
494 sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, 487 sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups,
495 sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile, 488 sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile,
496@@ -410,6 +413,7 @@ 489@@ -415,6 +418,7 @@
497 { "x11uselocalhost", sX11UseLocalhost, SSHCFG_ALL }, 490 { "x11uselocalhost", sX11UseLocalhost, SSHCFG_ALL },
498 { "xauthlocation", sXAuthLocation, SSHCFG_GLOBAL }, 491 { "xauthlocation", sXAuthLocation, SSHCFG_GLOBAL },
499 { "strictmodes", sStrictModes, SSHCFG_GLOBAL }, 492 { "strictmodes", sStrictModes, SSHCFG_GLOBAL },
@@ -501,7 +494,7 @@ Index: b/servconf.c
501 { "permitemptypasswords", sEmptyPasswd, SSHCFG_ALL }, 494 { "permitemptypasswords", sEmptyPasswd, SSHCFG_ALL },
502 { "permituserenvironment", sPermitUserEnvironment, SSHCFG_GLOBAL }, 495 { "permituserenvironment", sPermitUserEnvironment, SSHCFG_GLOBAL },
503 { "uselogin", sUseLogin, SSHCFG_GLOBAL }, 496 { "uselogin", sUseLogin, SSHCFG_GLOBAL },
504@@ -976,6 +980,10 @@ 497@@ -1010,6 +1014,10 @@
505 intptr = &options->tcp_keep_alive; 498 intptr = &options->tcp_keep_alive;
506 goto parse_flag; 499 goto parse_flag;
507 500
@@ -512,7 +505,7 @@ Index: b/servconf.c
512 case sEmptyPasswd: 505 case sEmptyPasswd:
513 intptr = &options->permit_empty_passwd; 506 intptr = &options->permit_empty_passwd;
514 goto parse_flag; 507 goto parse_flag;
515@@ -1644,6 +1652,7 @@ 508@@ -1688,6 +1696,7 @@
516 dump_cfg_fmtint(sX11UseLocalhost, o->x11_use_localhost); 509 dump_cfg_fmtint(sX11UseLocalhost, o->x11_use_localhost);
517 dump_cfg_fmtint(sStrictModes, o->strict_modes); 510 dump_cfg_fmtint(sStrictModes, o->strict_modes);
518 dump_cfg_fmtint(sTCPKeepAlive, o->tcp_keep_alive); 511 dump_cfg_fmtint(sTCPKeepAlive, o->tcp_keep_alive);
@@ -524,7 +517,7 @@ Index: b/servconf.h
524=================================================================== 517===================================================================
525--- a/servconf.h 518--- a/servconf.h
526+++ b/servconf.h 519+++ b/servconf.h
527@@ -101,6 +101,7 @@ 520@@ -104,6 +104,7 @@
528 int challenge_response_authentication; 521 int challenge_response_authentication;
529 int zero_knowledge_password_authentication; 522 int zero_knowledge_password_authentication;
530 /* If true, permit jpake auth */ 523 /* If true, permit jpake auth */
@@ -536,7 +529,7 @@ Index: b/ssh-add.1
536=================================================================== 529===================================================================
537--- a/ssh-add.1 530--- a/ssh-add.1
538+++ b/ssh-add.1 531+++ b/ssh-add.1
539@@ -75,6 +75,10 @@ 532@@ -82,6 +82,10 @@
540 .Nm 533 .Nm
541 to work. 534 to work.
542 .Pp 535 .Pp
@@ -547,7 +540,7 @@ Index: b/ssh-add.1
547 The options are as follows: 540 The options are as follows:
548 .Bl -tag -width Ds 541 .Bl -tag -width Ds
549 .It Fl c 542 .It Fl c
550@@ -174,6 +178,7 @@ 543@@ -182,6 +186,7 @@
551 .Xr ssh 1 , 544 .Xr ssh 1 ,
552 .Xr ssh-agent 1 , 545 .Xr ssh-agent 1 ,
553 .Xr ssh-keygen 1 , 546 .Xr ssh-keygen 1 ,
@@ -562,10 +555,10 @@ Index: b/ssh-add.c
562@@ -139,7 +139,7 @@ 555@@ -139,7 +139,7 @@
563 add_file(AuthenticationConnection *ac, const char *filename) 556 add_file(AuthenticationConnection *ac, const char *filename)
564 { 557 {
565 Key *private; 558 Key *private, *cert;
566- char *comment = NULL; 559- char *comment = NULL;
567+ char *comment = NULL, *fp; 560+ char *comment = NULL, *fp;
568 char msg[1024]; 561 char msg[1024], *certpath;
569 int fd, perms_ok, ret = -1; 562 int fd, perms_ok, ret = -1;
570 563
571@@ -184,6 +184,14 @@ 564@@ -184,6 +184,14 @@
@@ -587,7 +580,7 @@ Index: b/ssh-keygen.1
587=================================================================== 580===================================================================
588--- a/ssh-keygen.1 581--- a/ssh-keygen.1
589+++ b/ssh-keygen.1 582+++ b/ssh-keygen.1
590@@ -451,6 +451,7 @@ 583@@ -629,6 +629,7 @@
591 .Xr ssh 1 , 584 .Xr ssh 1 ,
592 .Xr ssh-add 1 , 585 .Xr ssh-add 1 ,
593 .Xr ssh-agent 1 , 586 .Xr ssh-agent 1 ,
@@ -1239,7 +1232,7 @@ Index: b/ssh.1
1239=================================================================== 1232===================================================================
1240--- a/ssh.1 1233--- a/ssh.1
1241+++ b/ssh.1 1234+++ b/ssh.1
1242@@ -1396,6 +1396,7 @@ 1235@@ -1423,6 +1423,7 @@
1243 .Xr ssh-agent 1 , 1236 .Xr ssh-agent 1 ,
1244 .Xr ssh-keygen 1 , 1237 .Xr ssh-keygen 1 ,
1245 .Xr ssh-keyscan 1 , 1238 .Xr ssh-keyscan 1 ,
@@ -1251,7 +1244,7 @@ Index: b/ssh.c
1251=================================================================== 1244===================================================================
1252--- a/ssh.c 1245--- a/ssh.c
1253+++ b/ssh.c 1246+++ b/ssh.c
1254@@ -1229,7 +1229,7 @@ 1247@@ -1301,7 +1301,7 @@
1255 static void 1248 static void
1256 load_public_identity_files(void) 1249 load_public_identity_files(void)
1257 { 1250 {
@@ -1260,7 +1253,7 @@ Index: b/ssh.c
1260 char *pwdir = NULL, *pwname = NULL; 1253 char *pwdir = NULL, *pwname = NULL;
1261 int i = 0; 1254 int i = 0;
1262 Key *public; 1255 Key *public;
1263@@ -1276,6 +1276,22 @@ 1256@@ -1358,6 +1358,22 @@
1264 public = key_load_public(filename, NULL); 1257 public = key_load_public(filename, NULL);
1265 debug("identity file %s type %d", filename, 1258 debug("identity file %s type %d", filename,
1266 public ? public->type : -1); 1259 public ? public->type : -1);
@@ -1281,13 +1274,13 @@ Index: b/ssh.c
1281+ } 1274+ }
1282+ } 1275+ }
1283 xfree(options.identity_files[i]); 1276 xfree(options.identity_files[i]);
1284 options.identity_files[i] = filename; 1277 identity_files[n_ids] = filename;
1285 options.identity_keys[i] = public; 1278 identity_keys[n_ids] = public;
1286Index: b/ssh_config.5 1279Index: b/ssh_config.5
1287=================================================================== 1280===================================================================
1288--- a/ssh_config.5 1281--- a/ssh_config.5
1289+++ b/ssh_config.5 1282+++ b/ssh_config.5
1290@@ -1041,6 +1041,23 @@ 1283@@ -1055,6 +1055,23 @@
1291 .Dq any . 1284 .Dq any .
1292 The default is 1285 The default is
1293 .Dq any:any . 1286 .Dq any:any .
@@ -1315,7 +1308,7 @@ Index: b/sshconnect2.c
1315=================================================================== 1308===================================================================
1316--- a/sshconnect2.c 1309--- a/sshconnect2.c
1317+++ b/sshconnect2.c 1310+++ b/sshconnect2.c
1318@@ -1392,6 +1392,8 @@ 1311@@ -1418,6 +1418,8 @@
1319 1312
1320 /* list of keys stored in the filesystem */ 1313 /* list of keys stored in the filesystem */
1321 for (i = 0; i < options.num_identity_files; i++) { 1314 for (i = 0; i < options.num_identity_files; i++) {
@@ -1324,7 +1317,7 @@ Index: b/sshconnect2.c
1324 key = options.identity_keys[i]; 1317 key = options.identity_keys[i];
1325 if (key && key->type == KEY_RSA1) 1318 if (key && key->type == KEY_RSA1)
1326 continue; 1319 continue;
1327@@ -1482,7 +1484,7 @@ 1320@@ -1510,7 +1512,7 @@
1328 if (id->key && id->key->type != KEY_RSA1) { 1321 if (id->key && id->key->type != KEY_RSA1) {
1329 debug("Offering public key: %s", id->filename); 1322 debug("Offering public key: %s", id->filename);
1330 sent = send_pubkey_test(authctxt, id); 1323 sent = send_pubkey_test(authctxt, id);
@@ -1337,7 +1330,7 @@ Index: b/sshd.8
1337=================================================================== 1330===================================================================
1338--- a/sshd.8 1331--- a/sshd.8
1339+++ b/sshd.8 1332+++ b/sshd.8
1340@@ -871,6 +871,7 @@ 1333@@ -928,6 +928,7 @@
1341 .Xr ssh-agent 1 , 1334 .Xr ssh-agent 1 ,
1342 .Xr ssh-keygen 1 , 1335 .Xr ssh-keygen 1 ,
1343 .Xr ssh-keyscan 1 , 1336 .Xr ssh-keyscan 1 ,
@@ -1349,11 +1342,11 @@ Index: b/sshd.c
1349=================================================================== 1342===================================================================
1350--- a/sshd.c 1343--- a/sshd.c
1351+++ b/sshd.c 1344+++ b/sshd.c
1352@@ -1518,6 +1518,11 @@ 1345@@ -1564,6 +1564,11 @@
1353 sensitive_data.host_keys[i] = NULL; 1346 sensitive_data.host_keys[i] = NULL;
1354 continue; 1347 continue;
1355 } 1348 }
1356+ if (reject_blacklisted_key(key, 1) == 1) { 1349+ if (auth_key_is_revoked(key, 1)) {
1357+ key_free(key); 1350+ key_free(key);
1358+ sensitive_data.host_keys[i] = NULL; 1351+ sensitive_data.host_keys[i] = NULL;
1359+ continue; 1352+ continue;
@@ -1365,7 +1358,7 @@ Index: b/sshd_config.5
1365=================================================================== 1358===================================================================
1366--- a/sshd_config.5 1359--- a/sshd_config.5
1367+++ b/sshd_config.5 1360+++ b/sshd_config.5
1368@@ -685,6 +685,20 @@ 1361@@ -694,6 +694,20 @@
1369 Specifies whether password authentication is allowed. 1362 Specifies whether password authentication is allowed.
1370 The default is 1363 The default is
1371 .Dq yes . 1364 .Dq yes .
diff --git a/debian/patches/ssh1-keepalive.patch b/debian/patches/ssh1-keepalive.patch
index c82563033..ccd9a668e 100644
--- a/debian/patches/ssh1-keepalive.patch
+++ b/debian/patches/ssh1-keepalive.patch
@@ -7,13 +7,20 @@ Index: b/clientloop.c
7=================================================================== 7===================================================================
8--- a/clientloop.c 8--- a/clientloop.c
9+++ b/clientloop.c 9+++ b/clientloop.c
10@@ -502,16 +502,21 @@ 10@@ -507,16 +507,21 @@
11 static void 11 static void
12 server_alive_check(void) 12 server_alive_check(void)
13 { 13 {
14- if (packet_inc_alive_timeouts() > options.server_alive_count_max) { 14- if (packet_inc_alive_timeouts() > options.server_alive_count_max) {
15- logit("Timeout, server not responding."); 15- logit("Timeout, server not responding.");
16- cleanup_exit(255); 16- cleanup_exit(255);
17- }
18- packet_start(SSH2_MSG_GLOBAL_REQUEST);
19- packet_put_cstring("keepalive@openssh.com");
20- packet_put_char(1); /* boolean: want reply */
21- packet_send();
22- /* Insert an empty placeholder to maintain ordering */
23- client_register_global_confirm(NULL, NULL);
17+ if (compat20) { 24+ if (compat20) {
18+ if (packet_inc_alive_timeouts() > options.server_alive_count_max) { 25+ if (packet_inc_alive_timeouts() > options.server_alive_count_max) {
19+ logit("Timeout, server not responding."); 26+ logit("Timeout, server not responding.");
@@ -28,17 +35,11 @@ Index: b/clientloop.c
28+ } else { 35+ } else {
29+ packet_send_ignore(0); 36+ packet_send_ignore(0);
30+ packet_send(); 37+ packet_send();
31 } 38+ }
32- packet_start(SSH2_MSG_GLOBAL_REQUEST);
33- packet_put_cstring("keepalive@openssh.com");
34- packet_put_char(1); /* boolean: want reply */
35- packet_send();
36- /* Insert an empty placeholder to maintain ordering */
37- client_register_global_confirm(NULL, NULL);
38 } 39 }
39 40
40 /* 41 /*
41@@ -572,7 +577,7 @@ 42@@ -574,7 +579,7 @@
42 * event pending. 43 * event pending.
43 */ 44 */
44 45
@@ -51,7 +52,7 @@ Index: b/ssh_config.5
51=================================================================== 52===================================================================
52--- a/ssh_config.5 53--- a/ssh_config.5
53+++ b/ssh_config.5 54+++ b/ssh_config.5
54@@ -935,7 +935,10 @@ 55@@ -956,7 +956,10 @@
55 .Cm ServerAliveCountMax 56 .Cm ServerAliveCountMax
56 is left at the default, if the server becomes unresponsive, 57 is left at the default, if the server becomes unresponsive,
57 ssh will disconnect after approximately 45 seconds. 58 ssh will disconnect after approximately 45 seconds.
diff --git a/debian/patches/sshd-ignore-sighup.patch b/debian/patches/sshd-ignore-sighup.patch
deleted file mode 100644
index ded8bc247..000000000
--- a/debian/patches/sshd-ignore-sighup.patch
+++ /dev/null
@@ -1,19 +0,0 @@
1Description: sshd: Ignore subsequent SIGHUPs during re-exec
2 Prevents two HUPs in quick succession from resulting in sshd dying.
3Author: Colin Watson <cjwatson@debian.org>
4Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1692
5Bug-Ubuntu: https://bugs.launchpad.net/bugs/497781
6Last-Update: 2010-02-28
7
8Index: b/sshd.c
9===================================================================
10--- a/sshd.c
11+++ b/sshd.c
12@@ -318,6 +318,7 @@
13 close_listen_socks();
14 close_startup_pipes();
15 alarm(0); /* alarm timer persists across exec */
16+ signal(SIGHUP, SIG_IGN); /* will be restored after exec */
17 execv(saved_argv[0], saved_argv);
18 logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0],
19 strerror(errno));
diff --git a/debian/patches/syslog-level-silent.patch b/debian/patches/syslog-level-silent.patch
index 04ea64d34..3ed46c8f8 100644
--- a/debian/patches/syslog-level-silent.patch
+++ b/debian/patches/syslog-level-silent.patch
@@ -18,7 +18,7 @@ Index: b/clientloop.c
18=================================================================== 18===================================================================
19--- a/clientloop.c 19--- a/clientloop.c
20+++ b/clientloop.c 20+++ b/clientloop.c
21@@ -1533,7 +1533,7 @@ 21@@ -1536,7 +1536,7 @@
22 * In interactive mode (with pseudo tty) display a message indicating 22 * In interactive mode (with pseudo tty) display a message indicating
23 * that the connection has been closed. 23 * that the connection has been closed.
24 */ 24 */
@@ -63,20 +63,20 @@ Index: b/mux.c
63=================================================================== 63===================================================================
64--- a/mux.c 64--- a/mux.c
65+++ b/mux.c 65+++ b/mux.c
66@@ -721,7 +721,7 @@ 66@@ -1553,7 +1553,7 @@
67 } else 67 } else
68 debug2("Received exit status from master %d", exitval[0]); 68 debug2("Received exit status from master %d", exitval);
69 69
70- if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET) 70- if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET)
71+ if (tty_flag && options.log_level > SYSLOG_LEVEL_QUIET) 71+ if (tty_flag && options.log_level > SYSLOG_LEVEL_QUIET)
72 fprintf(stderr, "Shared connection to %s closed.\r\n", host); 72 fprintf(stderr, "Shared connection to %s closed.\r\n", host);
73 73
74 exit(exitval[0]); 74 exit(exitval);
75Index: b/sftp-server.8 75Index: b/sftp-server.8
76=================================================================== 76===================================================================
77--- a/sftp-server.8 77--- a/sftp-server.8
78+++ b/sftp-server.8 78+++ b/sftp-server.8
79@@ -64,7 +64,7 @@ 79@@ -74,7 +74,7 @@
80 Specifies which messages will be logged by 80 Specifies which messages will be logged by
81 .Nm . 81 .Nm .
82 The possible values are: 82 The possible values are:
@@ -89,7 +89,7 @@ Index: b/ssh.1
89=================================================================== 89===================================================================
90--- a/ssh.1 90--- a/ssh.1
91+++ b/ssh.1 91+++ b/ssh.1
92@@ -500,6 +500,11 @@ 92@@ -504,6 +504,11 @@
93 .It Fl q 93 .It Fl q
94 Quiet mode. 94 Quiet mode.
95 Causes most warning and diagnostic messages to be suppressed. 95 Causes most warning and diagnostic messages to be suppressed.
@@ -105,8 +105,8 @@ Index: b/ssh.c
105=================================================================== 105===================================================================
106--- a/ssh.c 106--- a/ssh.c
107+++ b/ssh.c 107+++ b/ssh.c
108@@ -389,7 +389,12 @@ 108@@ -421,7 +421,12 @@
109 } 109 options.exit_on_forward_failure = 1;
110 break; 110 break;
111 case 'q': 111 case 'q':
112- options.log_level = SYSLOG_LEVEL_QUIET; 112- options.log_level = SYSLOG_LEVEL_QUIET;
@@ -119,7 +119,7 @@ Index: b/ssh.c
119 break; 119 break;
120 case 'e': 120 case 'e':
121 if (optarg[0] == '^' && optarg[2] == 0 && 121 if (optarg[0] == '^' && optarg[2] == 0 &&
122@@ -592,7 +597,7 @@ 122@@ -624,7 +629,7 @@
123 tty_flag = 0; 123 tty_flag = 0;
124 /* Do not allocate a tty if stdin is not a tty. */ 124 /* Do not allocate a tty if stdin is not a tty. */
125 if ((!isatty(fileno(stdin)) || stdin_null_flag) && !force_tty_flag) { 125 if ((!isatty(fileno(stdin)) || stdin_null_flag) && !force_tty_flag) {
@@ -132,7 +132,7 @@ Index: b/ssh_config.5
132=================================================================== 132===================================================================
133--- a/ssh_config.5 133--- a/ssh_config.5
134+++ b/ssh_config.5 134+++ b/ssh_config.5
135@@ -685,7 +685,7 @@ 135@@ -698,7 +698,7 @@
136 Gives the verbosity level that is used when logging messages from 136 Gives the verbosity level that is used when logging messages from
137 .Xr ssh 1 . 137 .Xr ssh 1 .
138 The possible values are: 138 The possible values are:
@@ -145,7 +145,7 @@ Index: b/sshd.8
145=================================================================== 145===================================================================
146--- a/sshd.8 146--- a/sshd.8
147+++ b/sshd.8 147+++ b/sshd.8
148@@ -207,9 +207,12 @@ 148@@ -217,9 +217,12 @@
149 option override command-line ports. 149 option override command-line ports.
150 .It Fl q 150 .It Fl q
151 Quiet mode. 151 Quiet mode.
@@ -163,7 +163,7 @@ Index: b/sshd.c
163=================================================================== 163===================================================================
164--- a/sshd.c 164--- a/sshd.c
165+++ b/sshd.c 165+++ b/sshd.c
166@@ -1355,7 +1355,12 @@ 166@@ -1370,7 +1370,12 @@
167 /* ignored */ 167 /* ignored */
168 break; 168 break;
169 case 'q': 169 case 'q':
@@ -181,7 +181,7 @@ Index: b/sshd_config.5
181=================================================================== 181===================================================================
182--- a/sshd_config.5 182--- a/sshd_config.5
183+++ b/sshd_config.5 183+++ b/sshd_config.5
184@@ -567,7 +567,7 @@ 184@@ -575,7 +575,7 @@
185 Gives the verbosity level that is used when logging messages from 185 Gives the verbosity level that is used when logging messages from
186 .Xr sshd 8 . 186 .Xr sshd 8 .
187 The possible values are: 187 The possible values are:
diff --git a/debian/patches/user-group-modes.patch b/debian/patches/user-group-modes.patch
index c99c796f3..375a098f9 100644
--- a/debian/patches/user-group-modes.patch
+++ b/debian/patches/user-group-modes.patch
@@ -23,7 +23,7 @@ Index: b/readconf.c
23 23
24 #include "xmalloc.h" 24 #include "xmalloc.h"
25 #include "ssh.h" 25 #include "ssh.h"
26@@ -998,11 +1000,30 @@ 26@@ -1000,11 +1002,30 @@
27 27
28 if (checkperm) { 28 if (checkperm) {
29 struct stat sb; 29 struct stat sb;
@@ -60,7 +60,7 @@ Index: b/ssh.1
60=================================================================== 60===================================================================
61--- a/ssh.1 61--- a/ssh.1
62+++ b/ssh.1 62+++ b/ssh.1
63@@ -1299,6 +1299,8 @@ 63@@ -1326,6 +1326,8 @@
64 .Xr ssh_config 5 . 64 .Xr ssh_config 5 .
65 Because of the potential for abuse, this file must have strict permissions: 65 Because of the potential for abuse, this file must have strict permissions:
66 read/write for the user, and not accessible by others. 66 read/write for the user, and not accessible by others.
@@ -73,7 +73,7 @@ Index: b/ssh_config.5
73=================================================================== 73===================================================================
74--- a/ssh_config.5 74--- a/ssh_config.5
75+++ b/ssh_config.5 75+++ b/ssh_config.5
76@@ -1194,6 +1194,8 @@ 76@@ -1208,6 +1208,8 @@
77 This file is used by the SSH client. 77 This file is used by the SSH client.
78 Because of the potential for abuse, this file must have strict permissions: 78 Because of the potential for abuse, this file must have strict permissions:
79 read/write for the user, and not accessible by others. 79 read/write for the user, and not accessible by others.
diff --git a/defines.h b/defines.h
index 2ddfd96d0..c9b93bf71 100644
--- a/defines.h
+++ b/defines.h
@@ -25,7 +25,7 @@
25#ifndef _DEFINES_H 25#ifndef _DEFINES_H
26#define _DEFINES_H 26#define _DEFINES_H
27 27
28/* $Id: defines.h,v 1.156 2009/08/28 01:21:07 dtucker Exp $ */ 28/* $Id: defines.h,v 1.159 2010/01/13 23:44:34 tim Exp $ */
29 29
30 30
31/* Constants */ 31/* Constants */
@@ -753,4 +753,12 @@ struct winsize {
753# define SSH_IOBUFSZ 8192 753# define SSH_IOBUFSZ 8192
754#endif 754#endif
755 755
756#ifndef _NSIG
757# ifdef NSIG
758# define _NSIG NSIG
759# else
760# define _NSIG 128
761# endif
762#endif
763
756#endif /* _DEFINES_H */ 764#endif /* _DEFINES_H */
diff --git a/dh.c b/dh.c
index b76605325..b9029d867 100644
--- a/dh.c
+++ b/dh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh.c,v 1.47 2008/06/26 09:19:39 djm Exp $ */ 1/* $OpenBSD: dh.c,v 1.48 2009/10/01 11:37:33 grunk Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Niels Provos. All rights reserved. 3 * Copyright (c) 2000 Niels Provos. All rights reserved.
4 * 4 *
@@ -83,7 +83,7 @@ parse_prime(int linenum, char *line, struct dhgroup *dhg)
83 goto fail; 83 goto fail;
84 strsize = strsep(&cp, " "); /* size */ 84 strsize = strsep(&cp, " "); /* size */
85 if (cp == NULL || *strsize == '\0' || 85 if (cp == NULL || *strsize == '\0' ||
86 (dhg->size = (u_int)strtonum(strsize, 0, 64*1024, &errstr)) == 0 || 86 (dhg->size = (int)strtonum(strsize, 0, 64*1024, &errstr)) == 0 ||
87 errstr) 87 errstr)
88 goto fail; 88 goto fail;
89 /* The whole group is one bit larger */ 89 /* The whole group is one bit larger */
diff --git a/dns.c b/dns.c
index a7da03fa3..2e7bb5aae 100644
--- a/dns.c
+++ b/dns.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dns.c,v 1.25 2008/06/12 00:03:49 dtucker Exp $ */ 1/* $OpenBSD: dns.c,v 1.26 2010/02/26 20:29:54 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2003 Wesley Griffin. All rights reserved. 4 * Copyright (c) 2003 Wesley Griffin. All rights reserved.
@@ -75,7 +75,7 @@ dns_result_totext(unsigned int res)
75 */ 75 */
76static int 76static int
77dns_read_key(u_int8_t *algorithm, u_int8_t *digest_type, 77dns_read_key(u_int8_t *algorithm, u_int8_t *digest_type,
78 u_char **digest, u_int *digest_len, const Key *key) 78 u_char **digest, u_int *digest_len, Key *key)
79{ 79{
80 int success = 0; 80 int success = 0;
81 81
@@ -172,7 +172,7 @@ is_numeric_hostname(const char *hostname)
172 */ 172 */
173int 173int
174verify_host_key_dns(const char *hostname, struct sockaddr *address, 174verify_host_key_dns(const char *hostname, struct sockaddr *address,
175 const Key *hostkey, int *flags) 175 Key *hostkey, int *flags)
176{ 176{
177 u_int counter; 177 u_int counter;
178 int result; 178 int result;
@@ -271,7 +271,7 @@ verify_host_key_dns(const char *hostname, struct sockaddr *address,
271 * Export the fingerprint of a key as a DNS resource record 271 * Export the fingerprint of a key as a DNS resource record
272 */ 272 */
273int 273int
274export_dns_rr(const char *hostname, const Key *key, FILE *f, int generic) 274export_dns_rr(const char *hostname, Key *key, FILE *f, int generic)
275{ 275{
276 u_int8_t rdata_pubkey_algorithm = 0; 276 u_int8_t rdata_pubkey_algorithm = 0;
277 u_int8_t rdata_digest_type = SSHFP_HASH_SHA1; 277 u_int8_t rdata_digest_type = SSHFP_HASH_SHA1;
diff --git a/dns.h b/dns.h
index b2633a1fe..90cfd7b92 100644
--- a/dns.h
+++ b/dns.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: dns.h,v 1.10 2006/08/03 03:34:42 deraadt Exp $ */ 1/* $OpenBSD: dns.h,v 1.11 2010/02/26 20:29:54 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2003 Wesley Griffin. All rights reserved. 4 * Copyright (c) 2003 Wesley Griffin. All rights reserved.
@@ -46,7 +46,7 @@ enum sshfp_hashes {
46#define DNS_VERIFY_MATCH 0x00000002 46#define DNS_VERIFY_MATCH 0x00000002
47#define DNS_VERIFY_SECURE 0x00000004 47#define DNS_VERIFY_SECURE 0x00000004
48 48
49int verify_host_key_dns(const char *, struct sockaddr *, const Key *, int *); 49int verify_host_key_dns(const char *, struct sockaddr *, Key *, int *);
50int export_dns_rr(const char *, const Key *, FILE *, int); 50int export_dns_rr(const char *, Key *, FILE *, int);
51 51
52#endif /* DNS_H */ 52#endif /* DNS_H */
diff --git a/hostfile.c b/hostfile.c
index 2cceb352a..afab6dad1 100644
--- a/hostfile.c
+++ b/hostfile.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: hostfile.c,v 1.45 2006/08/03 03:34:42 deraadt Exp $ */ 1/* $OpenBSD: hostfile.c,v 1.48 2010/03/04 10:36:03 djm 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
@@ -183,6 +183,41 @@ hostfile_check_key(int bits, const Key *key, const char *host, const char *filen
183 return 1; 183 return 1;
184} 184}
185 185
186static enum { MRK_ERROR, MRK_NONE, MRK_REVOKE, MRK_CA }
187check_markers(char **cpp)
188{
189 char marker[32], *sp, *cp = *cpp;
190 int ret = MRK_NONE;
191
192 while (*cp == '@') {
193 /* Only one marker is allowed */
194 if (ret != MRK_NONE)
195 return MRK_ERROR;
196 /* Markers are terminated by whitespace */
197 if ((sp = strchr(cp, ' ')) == NULL &&
198 (sp = strchr(cp, '\t')) == NULL)
199 return MRK_ERROR;
200 /* Extract marker for comparison */
201 if (sp <= cp + 1 || sp >= cp + sizeof(marker))
202 return MRK_ERROR;
203 memcpy(marker, cp, sp - cp);
204 marker[sp - cp] = '\0';
205 if (strcmp(marker, CA_MARKER) == 0)
206 ret = MRK_CA;
207 else if (strcmp(marker, REVOKE_MARKER) == 0)
208 ret = MRK_REVOKE;
209 else
210 return MRK_ERROR;
211
212 /* Skip past marker and any whitespace that follows it */
213 cp = sp;
214 for (; *cp == ' ' || *cp == '\t'; cp++)
215 ;
216 }
217 *cpp = cp;
218 return ret;
219}
220
186/* 221/*
187 * Checks whether the given host (which must be in all lowercase) is already 222 * Checks whether the given host (which must be in all lowercase) is already
188 * in the list of our known hosts. Returns HOST_OK if the host is known and 223 * in the list of our known hosts. Returns HOST_OK if the host is known and
@@ -195,16 +230,20 @@ hostfile_check_key(int bits, const Key *key, const char *host, const char *filen
195 230
196static HostStatus 231static HostStatus
197check_host_in_hostfile_by_key_or_type(const char *filename, 232check_host_in_hostfile_by_key_or_type(const char *filename,
198 const char *host, const Key *key, int keytype, Key *found, int *numret) 233 const char *host, const Key *key, int keytype, Key *found,
234 int want_revocation, int *numret)
199{ 235{
200 FILE *f; 236 FILE *f;
201 char line[8192]; 237 char line[8192];
202 int linenum = 0; 238 int want, have, linenum = 0, want_cert = key_is_cert(key);
203 u_int kbits; 239 u_int kbits;
204 char *cp, *cp2, *hashed_host; 240 char *cp, *cp2, *hashed_host;
205 HostStatus end_return; 241 HostStatus end_return;
206 242
207 debug3("check_host_in_hostfile: filename %s", filename); 243 debug3("check_host_in_hostfile: host %s filename %s", host, filename);
244
245 if (want_revocation && (key == NULL || keytype != 0 || found != NULL))
246 fatal("%s: invalid arguments", __func__);
208 247
209 /* Open the file containing the list of known hosts. */ 248 /* Open the file containing the list of known hosts. */
210 f = fopen(filename, "r"); 249 f = fopen(filename, "r");
@@ -229,6 +268,20 @@ check_host_in_hostfile_by_key_or_type(const char *filename,
229 if (!*cp || *cp == '#' || *cp == '\n') 268 if (!*cp || *cp == '#' || *cp == '\n')
230 continue; 269 continue;
231 270
271 if (want_revocation)
272 want = MRK_REVOKE;
273 else if (want_cert)
274 want = MRK_CA;
275 else
276 want = MRK_NONE;
277
278 if ((have = check_markers(&cp)) == MRK_ERROR) {
279 verbose("%s: invalid marker at %s:%d",
280 __func__, filename, linenum);
281 continue;
282 } else if (want != have)
283 continue;
284
232 /* Find the end of the host name portion. */ 285 /* Find the end of the host name portion. */
233 for (cp2 = cp; *cp2 && *cp2 != ' ' && *cp2 != '\t'; cp2++) 286 for (cp2 = cp; *cp2 && *cp2 != ' ' && *cp2 != '\t'; cp2++)
234 ; 287 ;
@@ -250,6 +303,9 @@ check_host_in_hostfile_by_key_or_type(const char *filename,
250 /* Got a match. Skip host name. */ 303 /* Got a match. Skip host name. */
251 cp = cp2; 304 cp = cp2;
252 305
306 if (want_revocation)
307 found = key_new(KEY_UNSPEC);
308
253 /* 309 /*
254 * Extract the key from the line. This will skip any leading 310 * Extract the key from the line. This will skip any leading
255 * whitespace. Ignore badly formatted lines. 311 * whitespace. Ignore badly formatted lines.
@@ -272,9 +328,33 @@ check_host_in_hostfile_by_key_or_type(const char *filename,
272 if (!hostfile_check_key(kbits, found, host, filename, linenum)) 328 if (!hostfile_check_key(kbits, found, host, filename, linenum))
273 continue; 329 continue;
274 330
331 if (want_revocation) {
332 if (key_is_cert(key) &&
333 key_equal_public(key->cert->signature_key, found)) {
334 verbose("check_host_in_hostfile: revoked CA "
335 "line %d", linenum);
336 key_free(found);
337 return HOST_REVOKED;
338 }
339 if (key_equal_public(key, found)) {
340 verbose("check_host_in_hostfile: revoked key "
341 "line %d", linenum);
342 key_free(found);
343 return HOST_REVOKED;
344 }
345 key_free(found);
346 continue;
347 }
348
275 /* Check if the current key is the same as the given key. */ 349 /* Check if the current key is the same as the given key. */
276 if (key_equal(key, found)) { 350 if (want_cert && key_equal(key->cert->signature_key, found)) {
277 /* Ok, they match. */ 351 /* Found CA cert for key */
352 debug3("check_host_in_hostfile: CA match line %d",
353 linenum);
354 fclose(f);
355 return HOST_OK;
356 } else if (!want_cert && key_equal(key, found)) {
357 /* Found identical key */
278 debug3("check_host_in_hostfile: match line %d", linenum); 358 debug3("check_host_in_hostfile: match line %d", linenum);
279 fclose(f); 359 fclose(f);
280 return HOST_OK; 360 return HOST_OK;
@@ -302,8 +382,11 @@ check_host_in_hostfile(const char *filename, const char *host, const Key *key,
302{ 382{
303 if (key == NULL) 383 if (key == NULL)
304 fatal("no key to look up"); 384 fatal("no key to look up");
305 return (check_host_in_hostfile_by_key_or_type(filename, host, key, 0, 385 if (check_host_in_hostfile_by_key_or_type(filename, host,
306 found, numret)); 386 key, 0, NULL, 1, NULL) == HOST_REVOKED)
387 return HOST_REVOKED;
388 return check_host_in_hostfile_by_key_or_type(filename, host, key, 0,
389 found, 0, numret);
307} 390}
308 391
309int 392int
@@ -311,7 +394,7 @@ lookup_key_in_hostfile_by_type(const char *filename, const char *host,
311 int keytype, Key *found, int *numret) 394 int keytype, Key *found, int *numret)
312{ 395{
313 return (check_host_in_hostfile_by_key_or_type(filename, host, NULL, 396 return (check_host_in_hostfile_by_key_or_type(filename, host, NULL,
314 keytype, found, numret) == HOST_FOUND); 397 keytype, found, 0, numret) == HOST_FOUND);
315} 398}
316 399
317/* 400/*
diff --git a/hostfile.h b/hostfile.h
index d1983b3e0..1d460c1a9 100644
--- a/hostfile.h
+++ b/hostfile.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: hostfile.h,v 1.16 2006/03/25 22:22:43 djm Exp $ */ 1/* $OpenBSD: hostfile.h,v 1.18 2010/03/04 10:36:03 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -15,7 +15,7 @@
15#define HOSTFILE_H 15#define HOSTFILE_H
16 16
17typedef enum { 17typedef enum {
18 HOST_OK, HOST_NEW, HOST_CHANGED, HOST_FOUND 18 HOST_OK, HOST_NEW, HOST_CHANGED, HOST_REVOKED, HOST_FOUND
19} HostStatus; 19} HostStatus;
20 20
21int hostfile_read_key(char **, u_int *, Key *); 21int hostfile_read_key(char **, u_int *, Key *);
@@ -28,6 +28,9 @@ int lookup_key_in_hostfile_by_type(const char *, const char *,
28#define HASH_MAGIC "|1|" 28#define HASH_MAGIC "|1|"
29#define HASH_DELIM '|' 29#define HASH_DELIM '|'
30 30
31#define CA_MARKER "@cert-authority"
32#define REVOKE_MARKER "@revoked"
33
31char *host_hash(const char *, const char *, u_int); 34char *host_hash(const char *, const char *, u_int);
32 35
33#endif 36#endif
diff --git a/kex.c b/kex.c
index 4c19be9a0..a09e25228 100644
--- a/kex.c
+++ b/kex.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: kex.c,v 1.81 2009/05/27 06:34:36 andreas Exp $ */ 1/* $OpenBSD: kex.c,v 1.82 2009/10/24 11:13:54 andreas Exp $ */
2/* 2/*
3 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
4 * 4 *
@@ -48,6 +48,7 @@
48#include "match.h" 48#include "match.h"
49#include "dispatch.h" 49#include "dispatch.h"
50#include "monitor.h" 50#include "monitor.h"
51#include "roaming.h"
51 52
52#ifdef GSSAPI 53#ifdef GSSAPI
53#include "ssh-gss.h" 54#include "ssh-gss.h"
@@ -404,6 +405,16 @@ kex_choose_conf(Kex *kex)
404 sprop=peer; 405 sprop=peer;
405 } 406 }
406 407
408 /* Check whether server offers roaming */
409 if (!kex->server) {
410 char *roaming;
411 roaming = match_list(KEX_RESUME, peer[PROPOSAL_KEX_ALGS], NULL);
412 if (roaming) {
413 kex->roaming = 1;
414 xfree(roaming);
415 }
416 }
417
407 /* Algorithm Negotiation */ 418 /* Algorithm Negotiation */
408 for (mode = 0; mode < MODE_MAX; mode++) { 419 for (mode = 0; mode < MODE_MAX; mode++) {
409 newkeys = xcalloc(1, sizeof(*newkeys)); 420 newkeys = xcalloc(1, sizeof(*newkeys));
diff --git a/kex.h b/kex.h
index c3856f0bc..d2668b149 100644
--- a/kex.h
+++ b/kex.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: kex.h,v 1.47 2009/05/27 06:34:36 andreas Exp $ */ 1/* $OpenBSD: kex.h,v 1.49 2010/02/26 20:29:54 djm 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.
@@ -36,6 +36,7 @@
36#define KEX_DH14 "diffie-hellman-group14-sha1" 36#define KEX_DH14 "diffie-hellman-group14-sha1"
37#define KEX_DHGEX_SHA1 "diffie-hellman-group-exchange-sha1" 37#define KEX_DHGEX_SHA1 "diffie-hellman-group-exchange-sha1"
38#define KEX_DHGEX_SHA256 "diffie-hellman-group-exchange-sha256" 38#define KEX_DHGEX_SHA256 "diffie-hellman-group-exchange-sha256"
39#define KEX_RESUME "resume@appgate.com"
39 40
40#define COMP_NONE 0 41#define COMP_NONE 0
41#define COMP_ZLIB 1 42#define COMP_ZLIB 1
@@ -119,6 +120,7 @@ struct Kex {
119 char *name; 120 char *name;
120 int hostkey_type; 121 int hostkey_type;
121 int kex_type; 122 int kex_type;
123 int roaming;
122 Buffer my; 124 Buffer my;
123 Buffer peer; 125 Buffer peer;
124 sig_atomic_t done; 126 sig_atomic_t done;
@@ -133,7 +135,8 @@ struct Kex {
133 char *client_version_string; 135 char *client_version_string;
134 char *server_version_string; 136 char *server_version_string;
135 int (*verify_host_key)(Key *); 137 int (*verify_host_key)(Key *);
136 Key *(*load_host_key)(int); 138 Key *(*load_host_public_key)(int);
139 Key *(*load_host_private_key)(int);
137 int (*host_key_index)(Key *); 140 int (*host_key_index)(Key *);
138 void (*kex[KEX_MAX])(Kex *); 141 void (*kex[KEX_MAX])(Kex *);
139}; 142};
diff --git a/kexdhs.c b/kexdhs.c
index a6719f672..e722877d5 100644
--- a/kexdhs.c
+++ b/kexdhs.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: kexdhs.c,v 1.10 2009/06/21 07:37:15 dtucker Exp $ */ 1/* $OpenBSD: kexdhs.c,v 1.11 2010/02/26 20:29:54 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
4 * 4 *
@@ -50,7 +50,7 @@ kexdh_server(Kex *kex)
50{ 50{
51 BIGNUM *shared_secret = NULL, *dh_client_pub = NULL; 51 BIGNUM *shared_secret = NULL, *dh_client_pub = NULL;
52 DH *dh; 52 DH *dh;
53 Key *server_host_key; 53 Key *server_host_public, *server_host_private;
54 u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL; 54 u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL;
55 u_int sbloblen, klen, hashlen, slen; 55 u_int sbloblen, klen, hashlen, slen;
56 int kout; 56 int kout;
@@ -71,11 +71,16 @@ kexdh_server(Kex *kex)
71 debug("expecting SSH2_MSG_KEXDH_INIT"); 71 debug("expecting SSH2_MSG_KEXDH_INIT");
72 packet_read_expect(SSH2_MSG_KEXDH_INIT); 72 packet_read_expect(SSH2_MSG_KEXDH_INIT);
73 73
74 if (kex->load_host_key == NULL) 74 if (kex->load_host_public_key == NULL ||
75 kex->load_host_private_key == NULL)
75 fatal("Cannot load hostkey"); 76 fatal("Cannot load hostkey");
76 server_host_key = kex->load_host_key(kex->hostkey_type); 77 server_host_public = kex->load_host_public_key(kex->hostkey_type);
77 if (server_host_key == NULL) 78 if (server_host_public == NULL)
78 fatal("Unsupported hostkey type %d", kex->hostkey_type); 79 fatal("Unsupported hostkey type %d", kex->hostkey_type);
80 server_host_private = kex->load_host_private_key(kex->hostkey_type);
81 if (server_host_private == NULL)
82 fatal("Missing private key for hostkey type %d",
83 kex->hostkey_type);
79 84
80 /* key, cert */ 85 /* key, cert */
81 if ((dh_client_pub = BN_new()) == NULL) 86 if ((dh_client_pub = BN_new()) == NULL)
@@ -113,7 +118,7 @@ kexdh_server(Kex *kex)
113 memset(kbuf, 0, klen); 118 memset(kbuf, 0, klen);
114 xfree(kbuf); 119 xfree(kbuf);
115 120
116 key_to_blob(server_host_key, &server_host_key_blob, &sbloblen); 121 key_to_blob(server_host_public, &server_host_key_blob, &sbloblen);
117 122
118 /* calc H */ 123 /* calc H */
119 kex_dh_hash( 124 kex_dh_hash(
@@ -137,7 +142,7 @@ kexdh_server(Kex *kex)
137 } 142 }
138 143
139 /* sign H */ 144 /* sign H */
140 if (PRIVSEP(key_sign(server_host_key, &signature, &slen, hash, 145 if (PRIVSEP(key_sign(server_host_private, &signature, &slen, hash,
141 hashlen)) < 0) 146 hashlen)) < 0)
142 fatal("kexdh_server: key_sign failed"); 147 fatal("kexdh_server: key_sign failed");
143 148
diff --git a/kexgexs.c b/kexgexs.c
index 8515568b3..f4156af96 100644
--- a/kexgexs.c
+++ b/kexgexs.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: kexgexs.c,v 1.12 2009/06/21 07:37:15 dtucker Exp $ */ 1/* $OpenBSD: kexgexs.c,v 1.13 2010/02/26 20:29:54 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Niels Provos. All rights reserved. 3 * Copyright (c) 2000 Niels Provos. All rights reserved.
4 * Copyright (c) 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -52,18 +52,24 @@ void
52kexgex_server(Kex *kex) 52kexgex_server(Kex *kex)
53{ 53{
54 BIGNUM *shared_secret = NULL, *dh_client_pub = NULL; 54 BIGNUM *shared_secret = NULL, *dh_client_pub = NULL;
55 Key *server_host_key; 55 Key *server_host_public, *server_host_private;
56 DH *dh; 56 DH *dh;
57 u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL; 57 u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL;
58 u_int sbloblen, klen, slen, hashlen; 58 u_int sbloblen, klen, slen, hashlen;
59 int omin = -1, min = -1, omax = -1, max = -1, onbits = -1, nbits = -1; 59 int omin = -1, min = -1, omax = -1, max = -1, onbits = -1, nbits = -1;
60 int type, kout; 60 int type, kout;
61 61
62 if (kex->load_host_key == NULL) 62 if (kex->load_host_public_key == NULL ||
63 kex->load_host_private_key == NULL)
63 fatal("Cannot load hostkey"); 64 fatal("Cannot load hostkey");
64 server_host_key = kex->load_host_key(kex->hostkey_type); 65 server_host_public = kex->load_host_public_key(kex->hostkey_type);
65 if (server_host_key == NULL) 66 if (server_host_public == NULL)
66 fatal("Unsupported hostkey type %d", kex->hostkey_type); 67 fatal("Unsupported hostkey type %d", kex->hostkey_type);
68 server_host_private = kex->load_host_private_key(kex->hostkey_type);
69 if (server_host_private == NULL)
70 fatal("Missing private key for hostkey type %d",
71 kex->hostkey_type);
72
67 73
68 type = packet_read(); 74 type = packet_read();
69 switch (type) { 75 switch (type) {
@@ -149,7 +155,7 @@ kexgex_server(Kex *kex)
149 memset(kbuf, 0, klen); 155 memset(kbuf, 0, klen);
150 xfree(kbuf); 156 xfree(kbuf);
151 157
152 key_to_blob(server_host_key, &server_host_key_blob, &sbloblen); 158 key_to_blob(server_host_public, &server_host_key_blob, &sbloblen);
153 159
154 if (type == SSH2_MSG_KEX_DH_GEX_REQUEST_OLD) 160 if (type == SSH2_MSG_KEX_DH_GEX_REQUEST_OLD)
155 omin = min = omax = max = -1; 161 omin = min = omax = max = -1;
@@ -179,7 +185,7 @@ kexgex_server(Kex *kex)
179 } 185 }
180 186
181 /* sign H */ 187 /* sign H */
182 if (PRIVSEP(key_sign(server_host_key, &signature, &slen, hash, 188 if (PRIVSEP(key_sign(server_host_private, &signature, &slen, hash,
183 hashlen)) < 0) 189 hashlen)) < 0)
184 fatal("kexgex_server: key_sign failed"); 190 fatal("kexgex_server: key_sign failed");
185 191
diff --git a/key.c b/key.c
index 327aa4e7f..f67a799c1 100644
--- a/key.c
+++ b/key.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: key.c,v 1.80 2008/10/10 05:00:12 stevesk Exp $ */ 1/* $OpenBSD: key.c,v 1.85 2010/03/04 01:44:57 djm Exp $ */
2/* 2/*
3 * read_bignum(): 3 * read_bignum():
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -52,6 +52,21 @@
52#include "uuencode.h" 52#include "uuencode.h"
53#include "buffer.h" 53#include "buffer.h"
54#include "log.h" 54#include "log.h"
55#include "ssh2.h"
56
57static struct KeyCert *
58cert_new(void)
59{
60 struct KeyCert *cert;
61
62 cert = xcalloc(1, sizeof(*cert));
63 buffer_init(&cert->certblob);
64 buffer_init(&cert->constraints);
65 cert->key_id = NULL;
66 cert->principals = NULL;
67 cert->signature_key = NULL;
68 return cert;
69}
55 70
56Key * 71Key *
57key_new(int type) 72key_new(int type)
@@ -63,9 +78,11 @@ key_new(int type)
63 k->type = type; 78 k->type = type;
64 k->dsa = NULL; 79 k->dsa = NULL;
65 k->rsa = NULL; 80 k->rsa = NULL;
81 k->cert = NULL;
66 switch (k->type) { 82 switch (k->type) {
67 case KEY_RSA1: 83 case KEY_RSA1:
68 case KEY_RSA: 84 case KEY_RSA:
85 case KEY_RSA_CERT:
69 if ((rsa = RSA_new()) == NULL) 86 if ((rsa = RSA_new()) == NULL)
70 fatal("key_new: RSA_new failed"); 87 fatal("key_new: RSA_new failed");
71 if ((rsa->n = BN_new()) == NULL) 88 if ((rsa->n = BN_new()) == NULL)
@@ -75,6 +92,7 @@ key_new(int type)
75 k->rsa = rsa; 92 k->rsa = rsa;
76 break; 93 break;
77 case KEY_DSA: 94 case KEY_DSA:
95 case KEY_DSA_CERT:
78 if ((dsa = DSA_new()) == NULL) 96 if ((dsa = DSA_new()) == NULL)
79 fatal("key_new: DSA_new failed"); 97 fatal("key_new: DSA_new failed");
80 if ((dsa->p = BN_new()) == NULL) 98 if ((dsa->p = BN_new()) == NULL)
@@ -93,16 +111,20 @@ key_new(int type)
93 fatal("key_new: bad key type %d", k->type); 111 fatal("key_new: bad key type %d", k->type);
94 break; 112 break;
95 } 113 }
114
115 if (key_is_cert(k))
116 k->cert = cert_new();
117
96 return k; 118 return k;
97} 119}
98 120
99Key * 121void
100key_new_private(int type) 122key_add_private(Key *k)
101{ 123{
102 Key *k = key_new(type);
103 switch (k->type) { 124 switch (k->type) {
104 case KEY_RSA1: 125 case KEY_RSA1:
105 case KEY_RSA: 126 case KEY_RSA:
127 case KEY_RSA_CERT:
106 if ((k->rsa->d = BN_new()) == NULL) 128 if ((k->rsa->d = BN_new()) == NULL)
107 fatal("key_new_private: BN_new failed"); 129 fatal("key_new_private: BN_new failed");
108 if ((k->rsa->iqmp = BN_new()) == NULL) 130 if ((k->rsa->iqmp = BN_new()) == NULL)
@@ -117,6 +139,7 @@ key_new_private(int type)
117 fatal("key_new_private: BN_new failed"); 139 fatal("key_new_private: BN_new failed");
118 break; 140 break;
119 case KEY_DSA: 141 case KEY_DSA:
142 case KEY_DSA_CERT:
120 if ((k->dsa->priv_key = BN_new()) == NULL) 143 if ((k->dsa->priv_key = BN_new()) == NULL)
121 fatal("key_new_private: BN_new failed"); 144 fatal("key_new_private: BN_new failed");
122 break; 145 break;
@@ -125,9 +148,34 @@ key_new_private(int type)
125 default: 148 default:
126 break; 149 break;
127 } 150 }
151}
152
153Key *
154key_new_private(int type)
155{
156 Key *k = key_new(type);
157
158 key_add_private(k);
128 return k; 159 return k;
129} 160}
130 161
162static void
163cert_free(struct KeyCert *cert)
164{
165 u_int i;
166
167 buffer_free(&cert->certblob);
168 buffer_free(&cert->constraints);
169 if (cert->key_id != NULL)
170 xfree(cert->key_id);
171 for (i = 0; i < cert->nprincipals; i++)
172 xfree(cert->principals[i]);
173 if (cert->principals != NULL)
174 xfree(cert->principals);
175 if (cert->signature_key != NULL)
176 key_free(cert->signature_key);
177}
178
131void 179void
132key_free(Key *k) 180key_free(Key *k)
133{ 181{
@@ -136,11 +184,13 @@ key_free(Key *k)
136 switch (k->type) { 184 switch (k->type) {
137 case KEY_RSA1: 185 case KEY_RSA1:
138 case KEY_RSA: 186 case KEY_RSA:
187 case KEY_RSA_CERT:
139 if (k->rsa != NULL) 188 if (k->rsa != NULL)
140 RSA_free(k->rsa); 189 RSA_free(k->rsa);
141 k->rsa = NULL; 190 k->rsa = NULL;
142 break; 191 break;
143 case KEY_DSA: 192 case KEY_DSA:
193 case KEY_DSA_CERT:
144 if (k->dsa != NULL) 194 if (k->dsa != NULL)
145 DSA_free(k->dsa); 195 DSA_free(k->dsa);
146 k->dsa = NULL; 196 k->dsa = NULL;
@@ -151,20 +201,49 @@ key_free(Key *k)
151 fatal("key_free: bad key type %d", k->type); 201 fatal("key_free: bad key type %d", k->type);
152 break; 202 break;
153 } 203 }
204 if (key_is_cert(k)) {
205 if (k->cert != NULL)
206 cert_free(k->cert);
207 k->cert = NULL;
208 }
209
154 xfree(k); 210 xfree(k);
155} 211}
156 212
213static int
214cert_compare(struct KeyCert *a, struct KeyCert *b)
215{
216 if (a == NULL && b == NULL)
217 return 1;
218 if (a == NULL || b == NULL)
219 return 0;
220 if (buffer_len(&a->certblob) != buffer_len(&b->certblob))
221 return 0;
222 if (memcmp(buffer_ptr(&a->certblob), buffer_ptr(&b->certblob),
223 buffer_len(&a->certblob)) != 0)
224 return 0;
225 return 1;
226}
227
228/*
229 * Compare public portions of key only, allowing comparisons between
230 * certificates and plain keys too.
231 */
157int 232int
158key_equal(const Key *a, const Key *b) 233key_equal_public(const Key *a, const Key *b)
159{ 234{
160 if (a == NULL || b == NULL || a->type != b->type) 235 if (a == NULL || b == NULL ||
236 key_type_plain(a->type) != key_type_plain(b->type))
161 return 0; 237 return 0;
238
162 switch (a->type) { 239 switch (a->type) {
163 case KEY_RSA1: 240 case KEY_RSA1:
241 case KEY_RSA_CERT:
164 case KEY_RSA: 242 case KEY_RSA:
165 return a->rsa != NULL && b->rsa != NULL && 243 return a->rsa != NULL && b->rsa != NULL &&
166 BN_cmp(a->rsa->e, b->rsa->e) == 0 && 244 BN_cmp(a->rsa->e, b->rsa->e) == 0 &&
167 BN_cmp(a->rsa->n, b->rsa->n) == 0; 245 BN_cmp(a->rsa->n, b->rsa->n) == 0;
246 case KEY_DSA_CERT:
168 case KEY_DSA: 247 case KEY_DSA:
169 return a->dsa != NULL && b->dsa != NULL && 248 return a->dsa != NULL && b->dsa != NULL &&
170 BN_cmp(a->dsa->p, b->dsa->p) == 0 && 249 BN_cmp(a->dsa->p, b->dsa->p) == 0 &&
@@ -177,16 +256,27 @@ key_equal(const Key *a, const Key *b)
177 /* NOTREACHED */ 256 /* NOTREACHED */
178} 257}
179 258
259int
260key_equal(const Key *a, const Key *b)
261{
262 if (a == NULL || b == NULL || a->type != b->type)
263 return 0;
264 if (key_is_cert(a)) {
265 if (!cert_compare(a->cert, b->cert))
266 return 0;
267 }
268 return key_equal_public(a, b);
269}
270
180u_char* 271u_char*
181key_fingerprint_raw(const Key *k, enum fp_type dgst_type, 272key_fingerprint_raw(Key *k, enum fp_type dgst_type, u_int *dgst_raw_length)
182 u_int *dgst_raw_length)
183{ 273{
184 const EVP_MD *md = NULL; 274 const EVP_MD *md = NULL;
185 EVP_MD_CTX ctx; 275 EVP_MD_CTX ctx;
186 u_char *blob = NULL; 276 u_char *blob = NULL;
187 u_char *retval = NULL; 277 u_char *retval = NULL;
188 u_int len = 0; 278 u_int len = 0;
189 int nlen, elen; 279 int nlen, elen, otype;
190 280
191 *dgst_raw_length = 0; 281 *dgst_raw_length = 0;
192 282
@@ -214,6 +304,14 @@ key_fingerprint_raw(const Key *k, enum fp_type dgst_type,
214 case KEY_RSA: 304 case KEY_RSA:
215 key_to_blob(k, &blob, &len); 305 key_to_blob(k, &blob, &len);
216 break; 306 break;
307 case KEY_DSA_CERT:
308 case KEY_RSA_CERT:
309 /* We want a fingerprint of the _key_ not of the cert */
310 otype = k->type;
311 k->type = key_type_plain(k->type);
312 key_to_blob(k, &blob, &len);
313 k->type = otype;
314 break;
217 case KEY_UNSPEC: 315 case KEY_UNSPEC:
218 return retval; 316 return retval;
219 default: 317 default:
@@ -408,7 +506,7 @@ key_fingerprint_randomart(u_char *dgst_raw, u_int dgst_raw_len, const Key *k)
408} 506}
409 507
410char * 508char *
411key_fingerprint(const Key *k, enum fp_type dgst_type, enum fp_rep dgst_rep) 509key_fingerprint(Key *k, enum fp_type dgst_type, enum fp_rep dgst_rep)
412{ 510{
413 char *retval = NULL; 511 char *retval = NULL;
414 u_char *dgst_raw; 512 u_char *dgst_raw;
@@ -522,11 +620,19 @@ key_read(Key *ret, char **cpp)
522 return -1; 620 return -1;
523 if (!read_bignum(cpp, ret->rsa->n)) 621 if (!read_bignum(cpp, ret->rsa->n))
524 return -1; 622 return -1;
623 /* validate the claimed number of bits */
624 if ((u_int)BN_num_bits(ret->rsa->n) != bits) {
625 verbose("key_read: claimed key size %d does not match "
626 "actual %d", bits, BN_num_bits(ret->rsa->n));
627 return -1;
628 }
525 success = 1; 629 success = 1;
526 break; 630 break;
527 case KEY_UNSPEC: 631 case KEY_UNSPEC:
528 case KEY_RSA: 632 case KEY_RSA:
529 case KEY_DSA: 633 case KEY_DSA:
634 case KEY_DSA_CERT:
635 case KEY_RSA_CERT:
530 space = strchr(cp, ' '); 636 space = strchr(cp, ' ');
531 if (space == NULL) { 637 if (space == NULL) {
532 debug3("key_read: missing whitespace"); 638 debug3("key_read: missing whitespace");
@@ -571,25 +677,36 @@ key_read(Key *ret, char **cpp)
571 return -1; 677 return -1;
572 } 678 }
573/*XXXX*/ 679/*XXXX*/
574 if (ret->type == KEY_RSA) { 680 if (key_is_cert(ret)) {
681 if (!key_is_cert(k)) {
682 error("key_read: loaded key is not a cert");
683 key_free(k);
684 return -1;
685 }
686 if (ret->cert != NULL)
687 cert_free(ret->cert);
688 ret->cert = k->cert;
689 k->cert = NULL;
690 }
691 if (key_type_plain(ret->type) == KEY_RSA) {
575 if (ret->rsa != NULL) 692 if (ret->rsa != NULL)
576 RSA_free(ret->rsa); 693 RSA_free(ret->rsa);
577 ret->rsa = k->rsa; 694 ret->rsa = k->rsa;
578 k->rsa = NULL; 695 k->rsa = NULL;
579 success = 1;
580#ifdef DEBUG_PK 696#ifdef DEBUG_PK
581 RSA_print_fp(stderr, ret->rsa, 8); 697 RSA_print_fp(stderr, ret->rsa, 8);
582#endif 698#endif
583 } else { 699 }
700 if (key_type_plain(ret->type) == KEY_DSA) {
584 if (ret->dsa != NULL) 701 if (ret->dsa != NULL)
585 DSA_free(ret->dsa); 702 DSA_free(ret->dsa);
586 ret->dsa = k->dsa; 703 ret->dsa = k->dsa;
587 k->dsa = NULL; 704 k->dsa = NULL;
588 success = 1;
589#ifdef DEBUG_PK 705#ifdef DEBUG_PK
590 DSA_print_fp(stderr, ret->dsa, 8); 706 DSA_print_fp(stderr, ret->dsa, 8);
591#endif 707#endif
592 } 708 }
709 success = 1;
593/*XXXX*/ 710/*XXXX*/
594 key_free(k); 711 key_free(k);
595 if (success != 1) 712 if (success != 1)
@@ -616,28 +733,53 @@ key_write(const Key *key, FILE *f)
616 u_char *blob; 733 u_char *blob;
617 char *uu; 734 char *uu;
618 735
619 if (key->type == KEY_RSA1 && key->rsa != NULL) { 736 if (key_is_cert(key)) {
737 if (key->cert == NULL) {
738 error("%s: no cert data", __func__);
739 return 0;
740 }
741 if (buffer_len(&key->cert->certblob) == 0) {
742 error("%s: no signed certificate blob", __func__);
743 return 0;
744 }
745 }
746
747 switch (key->type) {
748 case KEY_RSA1:
749 if (key->rsa == NULL)
750 return 0;
620 /* size of modulus 'n' */ 751 /* size of modulus 'n' */
621 bits = BN_num_bits(key->rsa->n); 752 bits = BN_num_bits(key->rsa->n);
622 fprintf(f, "%u", bits); 753 fprintf(f, "%u", bits);
623 if (write_bignum(f, key->rsa->e) && 754 if (write_bignum(f, key->rsa->e) &&
624 write_bignum(f, key->rsa->n)) { 755 write_bignum(f, key->rsa->n))
625 success = 1; 756 return 1;
626 } else { 757 error("key_write: failed for RSA key");
627 error("key_write: failed for RSA key"); 758 return 0;
628 } 759 case KEY_DSA:
629 } else if ((key->type == KEY_DSA && key->dsa != NULL) || 760 case KEY_DSA_CERT:
630 (key->type == KEY_RSA && key->rsa != NULL)) { 761 if (key->dsa == NULL)
631 key_to_blob(key, &blob, &len); 762 return 0;
632 uu = xmalloc(2*len); 763 break;
633 n = uuencode(blob, len, uu, 2*len); 764 case KEY_RSA:
634 if (n > 0) { 765 case KEY_RSA_CERT:
635 fprintf(f, "%s %s", key_ssh_name(key), uu); 766 if (key->rsa == NULL)
636 success = 1; 767 return 0;
637 } 768 break;
638 xfree(blob); 769 default:
639 xfree(uu); 770 return 0;
771 }
772
773 key_to_blob(key, &blob, &len);
774 uu = xmalloc(2*len);
775 n = uuencode(blob, len, uu, 2*len);
776 if (n > 0) {
777 fprintf(f, "%s %s", key_ssh_name(key), uu);
778 success = 1;
640 } 779 }
780 xfree(blob);
781 xfree(uu);
782
641 return success; 783 return success;
642} 784}
643 785
@@ -651,6 +793,10 @@ key_type(const Key *k)
651 return "RSA"; 793 return "RSA";
652 case KEY_DSA: 794 case KEY_DSA:
653 return "DSA"; 795 return "DSA";
796 case KEY_RSA_CERT:
797 return "RSA-CERT";
798 case KEY_DSA_CERT:
799 return "DSA-CERT";
654 } 800 }
655 return "unknown"; 801 return "unknown";
656} 802}
@@ -663,6 +809,10 @@ key_ssh_name(const Key *k)
663 return "ssh-rsa"; 809 return "ssh-rsa";
664 case KEY_DSA: 810 case KEY_DSA:
665 return "ssh-dss"; 811 return "ssh-dss";
812 case KEY_RSA_CERT:
813 return "ssh-rsa-cert-v00@openssh.com";
814 case KEY_DSA_CERT:
815 return "ssh-dss-cert-v00@openssh.com";
666 } 816 }
667 return "ssh-unknown"; 817 return "ssh-unknown";
668} 818}
@@ -673,8 +823,10 @@ key_size(const Key *k)
673 switch (k->type) { 823 switch (k->type) {
674 case KEY_RSA1: 824 case KEY_RSA1:
675 case KEY_RSA: 825 case KEY_RSA:
826 case KEY_RSA_CERT:
676 return BN_num_bits(k->rsa->n); 827 return BN_num_bits(k->rsa->n);
677 case KEY_DSA: 828 case KEY_DSA:
829 case KEY_DSA_CERT:
678 return BN_num_bits(k->dsa->p); 830 return BN_num_bits(k->dsa->p);
679 } 831 }
680 return 0; 832 return 0;
@@ -685,7 +837,7 @@ rsa_generate_private_key(u_int bits)
685{ 837{
686 RSA *private; 838 RSA *private;
687 839
688 private = RSA_generate_key(bits, 35, NULL, NULL); 840 private = RSA_generate_key(bits, RSA_F4, NULL, NULL);
689 if (private == NULL) 841 if (private == NULL)
690 fatal("rsa_generate_private_key: key generation failed."); 842 fatal("rsa_generate_private_key: key generation failed.");
691 return private; 843 return private;
@@ -717,6 +869,9 @@ key_generate(int type, u_int bits)
717 case KEY_RSA1: 869 case KEY_RSA1:
718 k->rsa = rsa_generate_private_key(bits); 870 k->rsa = rsa_generate_private_key(bits);
719 break; 871 break;
872 case KEY_RSA_CERT:
873 case KEY_DSA_CERT:
874 fatal("key_generate: cert keys cannot be generated directly");
720 default: 875 default:
721 fatal("key_generate: unknown type %d", type); 876 fatal("key_generate: unknown type %d", type);
722 } 877 }
@@ -724,12 +879,55 @@ key_generate(int type, u_int bits)
724 return k; 879 return k;
725} 880}
726 881
882void
883key_cert_copy(const Key *from_key, struct Key *to_key)
884{
885 u_int i;
886 const struct KeyCert *from;
887 struct KeyCert *to;
888
889 if (to_key->cert != NULL) {
890 cert_free(to_key->cert);
891 to_key->cert = NULL;
892 }
893
894 if ((from = from_key->cert) == NULL)
895 return;
896
897 to = to_key->cert = cert_new();
898
899 buffer_append(&to->certblob, buffer_ptr(&from->certblob),
900 buffer_len(&from->certblob));
901
902 buffer_append(&to->constraints, buffer_ptr(&from->constraints),
903 buffer_len(&from->constraints));
904
905 to->type = from->type;
906 to->key_id = from->key_id == NULL ? NULL : xstrdup(from->key_id);
907 to->valid_after = from->valid_after;
908 to->valid_before = from->valid_before;
909 to->signature_key = from->signature_key == NULL ?
910 NULL : key_from_private(from->signature_key);
911
912 to->nprincipals = from->nprincipals;
913 if (to->nprincipals > CERT_MAX_PRINCIPALS)
914 fatal("%s: nprincipals (%u) > CERT_MAX_PRINCIPALS (%u)",
915 __func__, to->nprincipals, CERT_MAX_PRINCIPALS);
916 if (to->nprincipals > 0) {
917 to->principals = xcalloc(from->nprincipals,
918 sizeof(*to->principals));
919 for (i = 0; i < to->nprincipals; i++)
920 to->principals[i] = xstrdup(from->principals[i]);
921 }
922}
923
727Key * 924Key *
728key_from_private(const Key *k) 925key_from_private(const Key *k)
729{ 926{
730 Key *n = NULL; 927 Key *n = NULL;
731 switch (k->type) { 928 switch (k->type) {
732 case KEY_DSA: 929 case KEY_DSA:
930 case KEY_DSA_CERT:
733 n = key_new(k->type); 931 n = key_new(k->type);
734 if ((BN_copy(n->dsa->p, k->dsa->p) == NULL) || 932 if ((BN_copy(n->dsa->p, k->dsa->p) == NULL) ||
735 (BN_copy(n->dsa->q, k->dsa->q) == NULL) || 933 (BN_copy(n->dsa->q, k->dsa->q) == NULL) ||
@@ -739,6 +937,7 @@ key_from_private(const Key *k)
739 break; 937 break;
740 case KEY_RSA: 938 case KEY_RSA:
741 case KEY_RSA1: 939 case KEY_RSA1:
940 case KEY_RSA_CERT:
742 n = key_new(k->type); 941 n = key_new(k->type);
743 if ((BN_copy(n->rsa->n, k->rsa->n) == NULL) || 942 if ((BN_copy(n->rsa->n, k->rsa->n) == NULL) ||
744 (BN_copy(n->rsa->e, k->rsa->e) == NULL)) 943 (BN_copy(n->rsa->e, k->rsa->e) == NULL))
@@ -748,6 +947,8 @@ key_from_private(const Key *k)
748 fatal("key_from_private: unknown type %d", k->type); 947 fatal("key_from_private: unknown type %d", k->type);
749 break; 948 break;
750 } 949 }
950 if (key_is_cert(k))
951 key_cert_copy(k, n);
751 return n; 952 return n;
752} 953}
753 954
@@ -764,6 +965,10 @@ key_type_from_name(char *name)
764 return KEY_RSA; 965 return KEY_RSA;
765 } else if (strcmp(name, "ssh-dss") == 0) { 966 } else if (strcmp(name, "ssh-dss") == 0) {
766 return KEY_DSA; 967 return KEY_DSA;
968 } else if (strcmp(name, "ssh-rsa-cert-v00@openssh.com") == 0) {
969 return KEY_RSA_CERT;
970 } else if (strcmp(name, "ssh-dss-cert-v00@openssh.com") == 0) {
971 return KEY_DSA_CERT;
767 } else if (strcmp(name, "null") == 0) { 972 } else if (strcmp(name, "null") == 0) {
768 return KEY_NULL; 973 return KEY_NULL;
769 } 974 }
@@ -793,6 +998,127 @@ key_names_valid2(const char *names)
793 return 1; 998 return 1;
794} 999}
795 1000
1001static int
1002cert_parse(Buffer *b, Key *key, const u_char *blob, u_int blen)
1003{
1004 u_char *principals, *constraints, *sig_key, *sig;
1005 u_int signed_len, plen, clen, sklen, slen, kidlen;
1006 Buffer tmp;
1007 char *principal;
1008 int ret = -1;
1009
1010 buffer_init(&tmp);
1011
1012 /* Copy the entire key blob for verification and later serialisation */
1013 buffer_append(&key->cert->certblob, blob, blen);
1014
1015 principals = constraints = sig_key = sig = NULL;
1016 if (buffer_get_int_ret(&key->cert->type, b) != 0 ||
1017 (key->cert->key_id = buffer_get_string_ret(b, &kidlen)) == NULL ||
1018 (principals = buffer_get_string_ret(b, &plen)) == NULL ||
1019 buffer_get_int64_ret(&key->cert->valid_after, b) != 0 ||
1020 buffer_get_int64_ret(&key->cert->valid_before, b) != 0 ||
1021 (constraints = buffer_get_string_ret(b, &clen)) == NULL ||
1022 /* skip nonce */ buffer_get_string_ptr_ret(b, NULL) == NULL ||
1023 /* skip reserved */ buffer_get_string_ptr_ret(b, NULL) == NULL ||
1024 (sig_key = buffer_get_string_ret(b, &sklen)) == NULL) {
1025 error("%s: parse error", __func__);
1026 goto out;
1027 }
1028
1029 if (kidlen != strlen(key->cert->key_id)) {
1030 error("%s: key ID contains \\0 character", __func__);
1031 goto out;
1032 }
1033
1034 /* Signature is left in the buffer so we can calculate this length */
1035 signed_len = buffer_len(&key->cert->certblob) - buffer_len(b);
1036
1037 if ((sig = buffer_get_string_ret(b, &slen)) == NULL) {
1038 error("%s: parse error", __func__);
1039 goto out;
1040 }
1041
1042 if (key->cert->type != SSH2_CERT_TYPE_USER &&
1043 key->cert->type != SSH2_CERT_TYPE_HOST) {
1044 error("Unknown certificate type %u", key->cert->type);
1045 goto out;
1046 }
1047
1048 buffer_append(&tmp, principals, plen);
1049 while (buffer_len(&tmp) > 0) {
1050 if (key->cert->nprincipals >= CERT_MAX_PRINCIPALS) {
1051 error("%s: Too many principals", __func__);
1052 goto out;
1053 }
1054 if ((principal = buffer_get_string_ret(&tmp, &plen)) == NULL) {
1055 error("%s: Principals data invalid", __func__);
1056 goto out;
1057 }
1058 if (strlen(principal) != plen) {
1059 error("%s: Principal contains \\0 character",
1060 __func__);
1061 goto out;
1062 }
1063 key->cert->principals = xrealloc(key->cert->principals,
1064 key->cert->nprincipals + 1, sizeof(*key->cert->principals));
1065 key->cert->principals[key->cert->nprincipals++] = principal;
1066 }
1067
1068 buffer_clear(&tmp);
1069
1070 buffer_append(&key->cert->constraints, constraints, clen);
1071 buffer_append(&tmp, constraints, clen);
1072 /* validate structure */
1073 while (buffer_len(&tmp) != 0) {
1074 if (buffer_get_string_ptr_ret(&tmp, NULL) == NULL ||
1075 buffer_get_string_ptr_ret(&tmp, NULL) == NULL) {
1076 error("%s: Constraints data invalid", __func__);
1077 goto out;
1078 }
1079 }
1080 buffer_clear(&tmp);
1081
1082 if ((key->cert->signature_key = key_from_blob(sig_key,
1083 sklen)) == NULL) {
1084 error("%s: Signature key invalid", __func__);
1085 goto out;
1086 }
1087 if (key->cert->signature_key->type != KEY_RSA &&
1088 key->cert->signature_key->type != KEY_DSA) {
1089 error("%s: Invalid signature key type %s (%d)", __func__,
1090 key_type(key->cert->signature_key),
1091 key->cert->signature_key->type);
1092 goto out;
1093 }
1094
1095 switch (key_verify(key->cert->signature_key, sig, slen,
1096 buffer_ptr(&key->cert->certblob), signed_len)) {
1097 case 1:
1098 ret = 0;
1099 break; /* Good signature */
1100 case 0:
1101 error("%s: Invalid signature on certificate", __func__);
1102 goto out;
1103 case -1:
1104 error("%s: Certificate signature verification failed",
1105 __func__);
1106 goto out;
1107 }
1108
1109 out:
1110 buffer_free(&tmp);
1111 if (principals != NULL)
1112 xfree(principals);
1113 if (constraints != NULL)
1114 xfree(constraints);
1115 if (sig_key != NULL)
1116 xfree(sig_key);
1117 if (sig != NULL)
1118 xfree(sig);
1119 return ret;
1120}
1121
796Key * 1122Key *
797key_from_blob(const u_char *blob, u_int blen) 1123key_from_blob(const u_char *blob, u_int blen)
798{ 1124{
@@ -815,10 +1141,12 @@ key_from_blob(const u_char *blob, u_int blen)
815 1141
816 switch (type) { 1142 switch (type) {
817 case KEY_RSA: 1143 case KEY_RSA:
1144 case KEY_RSA_CERT:
818 key = key_new(type); 1145 key = key_new(type);
819 if (buffer_get_bignum2_ret(&b, key->rsa->e) == -1 || 1146 if (buffer_get_bignum2_ret(&b, key->rsa->e) == -1 ||
820 buffer_get_bignum2_ret(&b, key->rsa->n) == -1) { 1147 buffer_get_bignum2_ret(&b, key->rsa->n) == -1) {
821 error("key_from_blob: can't read rsa key"); 1148 error("key_from_blob: can't read rsa key");
1149 badkey:
822 key_free(key); 1150 key_free(key);
823 key = NULL; 1151 key = NULL;
824 goto out; 1152 goto out;
@@ -828,15 +1156,14 @@ key_from_blob(const u_char *blob, u_int blen)
828#endif 1156#endif
829 break; 1157 break;
830 case KEY_DSA: 1158 case KEY_DSA:
1159 case KEY_DSA_CERT:
831 key = key_new(type); 1160 key = key_new(type);
832 if (buffer_get_bignum2_ret(&b, key->dsa->p) == -1 || 1161 if (buffer_get_bignum2_ret(&b, key->dsa->p) == -1 ||
833 buffer_get_bignum2_ret(&b, key->dsa->q) == -1 || 1162 buffer_get_bignum2_ret(&b, key->dsa->q) == -1 ||
834 buffer_get_bignum2_ret(&b, key->dsa->g) == -1 || 1163 buffer_get_bignum2_ret(&b, key->dsa->g) == -1 ||
835 buffer_get_bignum2_ret(&b, key->dsa->pub_key) == -1) { 1164 buffer_get_bignum2_ret(&b, key->dsa->pub_key) == -1) {
836 error("key_from_blob: can't read dsa key"); 1165 error("key_from_blob: can't read dsa key");
837 key_free(key); 1166 goto badkey;
838 key = NULL;
839 goto out;
840 } 1167 }
841#ifdef DEBUG_PK 1168#ifdef DEBUG_PK
842 DSA_print_fp(stderr, key->dsa, 8); 1169 DSA_print_fp(stderr, key->dsa, 8);
@@ -849,6 +1176,10 @@ key_from_blob(const u_char *blob, u_int blen)
849 error("key_from_blob: cannot handle type %s", ktype); 1176 error("key_from_blob: cannot handle type %s", ktype);
850 goto out; 1177 goto out;
851 } 1178 }
1179 if (key_is_cert(key) && cert_parse(&b, key, blob, blen) == -1) {
1180 error("key_from_blob: can't parse cert data");
1181 goto badkey;
1182 }
852 rlen = buffer_len(&b); 1183 rlen = buffer_len(&b);
853 if (key != NULL && rlen != 0) 1184 if (key != NULL && rlen != 0)
854 error("key_from_blob: remaining bytes in key blob %d", rlen); 1185 error("key_from_blob: remaining bytes in key blob %d", rlen);
@@ -871,6 +1202,12 @@ key_to_blob(const Key *key, u_char **blobp, u_int *lenp)
871 } 1202 }
872 buffer_init(&b); 1203 buffer_init(&b);
873 switch (key->type) { 1204 switch (key->type) {
1205 case KEY_DSA_CERT:
1206 case KEY_RSA_CERT:
1207 /* Use the existing blob */
1208 buffer_append(&b, buffer_ptr(&key->cert->certblob),
1209 buffer_len(&key->cert->certblob));
1210 break;
874 case KEY_DSA: 1211 case KEY_DSA:
875 buffer_put_cstring(&b, key_ssh_name(key)); 1212 buffer_put_cstring(&b, key_ssh_name(key));
876 buffer_put_bignum2(&b, key->dsa->p); 1213 buffer_put_bignum2(&b, key->dsa->p);
@@ -907,8 +1244,10 @@ key_sign(
907 const u_char *data, u_int datalen) 1244 const u_char *data, u_int datalen)
908{ 1245{
909 switch (key->type) { 1246 switch (key->type) {
1247 case KEY_DSA_CERT:
910 case KEY_DSA: 1248 case KEY_DSA:
911 return ssh_dss_sign(key, sigp, lenp, data, datalen); 1249 return ssh_dss_sign(key, sigp, lenp, data, datalen);
1250 case KEY_RSA_CERT:
912 case KEY_RSA: 1251 case KEY_RSA:
913 return ssh_rsa_sign(key, sigp, lenp, data, datalen); 1252 return ssh_rsa_sign(key, sigp, lenp, data, datalen);
914 default: 1253 default:
@@ -931,8 +1270,10 @@ key_verify(
931 return -1; 1270 return -1;
932 1271
933 switch (key->type) { 1272 switch (key->type) {
1273 case KEY_DSA_CERT:
934 case KEY_DSA: 1274 case KEY_DSA:
935 return ssh_dss_verify(key, signature, signaturelen, data, datalen); 1275 return ssh_dss_verify(key, signature, signaturelen, data, datalen);
1276 case KEY_RSA_CERT:
936 case KEY_RSA: 1277 case KEY_RSA:
937 return ssh_rsa_verify(key, signature, signaturelen, data, datalen); 1278 return ssh_rsa_verify(key, signature, signaturelen, data, datalen);
938 default: 1279 default:
@@ -954,6 +1295,9 @@ key_demote(const Key *k)
954 pk->rsa = NULL; 1295 pk->rsa = NULL;
955 1296
956 switch (k->type) { 1297 switch (k->type) {
1298 case KEY_RSA_CERT:
1299 key_cert_copy(k, pk);
1300 /* FALLTHROUGH */
957 case KEY_RSA1: 1301 case KEY_RSA1:
958 case KEY_RSA: 1302 case KEY_RSA:
959 if ((pk->rsa = RSA_new()) == NULL) 1303 if ((pk->rsa = RSA_new()) == NULL)
@@ -963,6 +1307,9 @@ key_demote(const Key *k)
963 if ((pk->rsa->n = BN_dup(k->rsa->n)) == NULL) 1307 if ((pk->rsa->n = BN_dup(k->rsa->n)) == NULL)
964 fatal("key_demote: BN_dup failed"); 1308 fatal("key_demote: BN_dup failed");
965 break; 1309 break;
1310 case KEY_DSA_CERT:
1311 key_cert_copy(k, pk);
1312 /* FALLTHROUGH */
966 case KEY_DSA: 1313 case KEY_DSA:
967 if ((pk->dsa = DSA_new()) == NULL) 1314 if ((pk->dsa = DSA_new()) == NULL)
968 fatal("key_demote: DSA_new failed"); 1315 fatal("key_demote: DSA_new failed");
@@ -982,3 +1329,199 @@ key_demote(const Key *k)
982 1329
983 return (pk); 1330 return (pk);
984} 1331}
1332
1333int
1334key_is_cert(const Key *k)
1335{
1336 return k != NULL &&
1337 (k->type == KEY_RSA_CERT || k->type == KEY_DSA_CERT);
1338}
1339
1340/* Return the cert-less equivalent to a certified key type */
1341int
1342key_type_plain(int type)
1343{
1344 switch (type) {
1345 case KEY_RSA_CERT:
1346 return KEY_RSA;
1347 case KEY_DSA_CERT:
1348 return KEY_DSA;
1349 default:
1350 return type;
1351 }
1352}
1353
1354/* Convert a KEY_RSA or KEY_DSA to their _CERT equivalent */
1355int
1356key_to_certified(Key *k)
1357{
1358 switch (k->type) {
1359 case KEY_RSA:
1360 k->cert = cert_new();
1361 k->type = KEY_RSA_CERT;
1362 return 0;
1363 case KEY_DSA:
1364 k->cert = cert_new();
1365 k->type = KEY_DSA_CERT;
1366 return 0;
1367 default:
1368 error("%s: key has incorrect type %s", __func__, key_type(k));
1369 return -1;
1370 }
1371}
1372
1373/* Convert a KEY_RSA_CERT or KEY_DSA_CERT to their raw key equivalent */
1374int
1375key_drop_cert(Key *k)
1376{
1377 switch (k->type) {
1378 case KEY_RSA_CERT:
1379 cert_free(k->cert);
1380 k->type = KEY_RSA;
1381 return 0;
1382 case KEY_DSA_CERT:
1383 cert_free(k->cert);
1384 k->type = KEY_DSA;
1385 return 0;
1386 default:
1387 error("%s: key has incorrect type %s", __func__, key_type(k));
1388 return -1;
1389 }
1390}
1391
1392/* Sign a KEY_RSA_CERT or KEY_DSA_CERT, (re-)generating the signed certblob */
1393int
1394key_certify(Key *k, Key *ca)
1395{
1396 Buffer principals;
1397 u_char *ca_blob, *sig_blob, nonce[32];
1398 u_int i, ca_len, sig_len;
1399
1400 if (k->cert == NULL) {
1401 error("%s: key lacks cert info", __func__);
1402 return -1;
1403 }
1404
1405 if (!key_is_cert(k)) {
1406 error("%s: certificate has unknown type %d", __func__,
1407 k->cert->type);
1408 return -1;
1409 }
1410
1411 if (ca->type != KEY_RSA && ca->type != KEY_DSA) {
1412 error("%s: CA key has unsupported type %s", __func__,
1413 key_type(ca));
1414 return -1;
1415 }
1416
1417 key_to_blob(ca, &ca_blob, &ca_len);
1418
1419 buffer_clear(&k->cert->certblob);
1420 buffer_put_cstring(&k->cert->certblob, key_ssh_name(k));
1421
1422 switch (k->type) {
1423 case KEY_DSA_CERT:
1424 buffer_put_bignum2(&k->cert->certblob, k->dsa->p);
1425 buffer_put_bignum2(&k->cert->certblob, k->dsa->q);
1426 buffer_put_bignum2(&k->cert->certblob, k->dsa->g);
1427 buffer_put_bignum2(&k->cert->certblob, k->dsa->pub_key);
1428 break;
1429 case KEY_RSA_CERT:
1430 buffer_put_bignum2(&k->cert->certblob, k->rsa->e);
1431 buffer_put_bignum2(&k->cert->certblob, k->rsa->n);
1432 break;
1433 default:
1434 error("%s: key has incorrect type %s", __func__, key_type(k));
1435 buffer_clear(&k->cert->certblob);
1436 xfree(ca_blob);
1437 return -1;
1438 }
1439
1440 buffer_put_int(&k->cert->certblob, k->cert->type);
1441 buffer_put_cstring(&k->cert->certblob, k->cert->key_id);
1442
1443 buffer_init(&principals);
1444 for (i = 0; i < k->cert->nprincipals; i++)
1445 buffer_put_cstring(&principals, k->cert->principals[i]);
1446 buffer_put_string(&k->cert->certblob, buffer_ptr(&principals),
1447 buffer_len(&principals));
1448 buffer_free(&principals);
1449
1450 buffer_put_int64(&k->cert->certblob, k->cert->valid_after);
1451 buffer_put_int64(&k->cert->certblob, k->cert->valid_before);
1452 buffer_put_string(&k->cert->certblob,
1453 buffer_ptr(&k->cert->constraints),
1454 buffer_len(&k->cert->constraints));
1455
1456 arc4random_buf(&nonce, sizeof(nonce));
1457 buffer_put_string(&k->cert->certblob, nonce, sizeof(nonce));
1458 buffer_put_string(&k->cert->certblob, NULL, 0); /* reserved */
1459 buffer_put_string(&k->cert->certblob, ca_blob, ca_len);
1460 xfree(ca_blob);
1461
1462 /* Sign the whole mess */
1463 if (key_sign(ca, &sig_blob, &sig_len, buffer_ptr(&k->cert->certblob),
1464 buffer_len(&k->cert->certblob)) != 0) {
1465 error("%s: signature operation failed", __func__);
1466 buffer_clear(&k->cert->certblob);
1467 return -1;
1468 }
1469 /* Append signature and we are done */
1470 buffer_put_string(&k->cert->certblob, sig_blob, sig_len);
1471 xfree(sig_blob);
1472
1473 return 0;
1474}
1475
1476int
1477key_cert_check_authority(const Key *k, int want_host, int require_principal,
1478 const char *name, const char **reason)
1479{
1480 u_int i, principal_matches;
1481 time_t now = time(NULL);
1482
1483 if (want_host) {
1484 if (k->cert->type != SSH2_CERT_TYPE_HOST) {
1485 *reason = "Certificate invalid: not a host certificate";
1486 return -1;
1487 }
1488 } else {
1489 if (k->cert->type != SSH2_CERT_TYPE_USER) {
1490 *reason = "Certificate invalid: not a user certificate";
1491 return -1;
1492 }
1493 }
1494 if (now < 0) {
1495 error("%s: system clock lies before epoch", __func__);
1496 *reason = "Certificate invalid: not yet valid";
1497 return -1;
1498 }
1499 if ((u_int64_t)now < k->cert->valid_after) {
1500 *reason = "Certificate invalid: not yet valid";
1501 return -1;
1502 }
1503 if ((u_int64_t)now >= k->cert->valid_before) {
1504 *reason = "Certificate invalid: expired";
1505 return -1;
1506 }
1507 if (k->cert->nprincipals == 0) {
1508 if (require_principal) {
1509 *reason = "Certificate lacks principal list";
1510 return -1;
1511 }
1512 } else {
1513 principal_matches = 0;
1514 for (i = 0; i < k->cert->nprincipals; i++) {
1515 if (strcmp(name, k->cert->principals[i]) == 0) {
1516 principal_matches = 1;
1517 break;
1518 }
1519 }
1520 if (!principal_matches) {
1521 *reason = "Certificate invalid: name is not a listed "
1522 "principal";
1523 return -1;
1524 }
1525 }
1526 return 0;
1527}
diff --git a/key.h b/key.h
index db609d326..aaf4b56bd 100644
--- a/key.h
+++ b/key.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: key.h,v 1.27 2008/06/11 21:01:35 grunk Exp $ */ 1/* $OpenBSD: key.h,v 1.28 2010/02/26 20:29:54 djm 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,6 +26,7 @@
26#ifndef KEY_H 26#ifndef KEY_H
27#define KEY_H 27#define KEY_H
28 28
29#include "buffer.h"
29#include <openssl/rsa.h> 30#include <openssl/rsa.h>
30#include <openssl/dsa.h> 31#include <openssl/dsa.h>
31 32
@@ -34,6 +35,8 @@ enum types {
34 KEY_RSA1, 35 KEY_RSA1,
35 KEY_RSA, 36 KEY_RSA,
36 KEY_DSA, 37 KEY_DSA,
38 KEY_RSA_CERT,
39 KEY_DSA_CERT,
37 KEY_NULL, 40 KEY_NULL,
38 KEY_UNSPEC 41 KEY_UNSPEC
39}; 42};
@@ -50,20 +53,35 @@ enum fp_rep {
50/* key is stored in external hardware */ 53/* key is stored in external hardware */
51#define KEY_FLAG_EXT 0x0001 54#define KEY_FLAG_EXT 0x0001
52 55
56#define CERT_MAX_PRINCIPALS 256
57struct KeyCert {
58 Buffer certblob; /* Kept around for use on wire */
59 u_int type; /* SSH2_CERT_TYPE_USER or SSH2_CERT_TYPE_HOST */
60 char *key_id;
61 u_int nprincipals;
62 char **principals;
63 u_int64_t valid_after, valid_before;
64 Buffer constraints;
65 Key *signature_key;
66};
67
53struct Key { 68struct Key {
54 int type; 69 int type;
55 int flags; 70 int flags;
56 RSA *rsa; 71 RSA *rsa;
57 DSA *dsa; 72 DSA *dsa;
73 struct KeyCert *cert;
58}; 74};
59 75
60Key *key_new(int); 76Key *key_new(int);
77void key_add_private(Key *);
61Key *key_new_private(int); 78Key *key_new_private(int);
62void key_free(Key *); 79void key_free(Key *);
63Key *key_demote(const Key *); 80Key *key_demote(const Key *);
81int key_equal_public(const Key *, const Key *);
64int key_equal(const Key *, const Key *); 82int key_equal(const Key *, const Key *);
65char *key_fingerprint(const Key *, enum fp_type, enum fp_rep); 83char *key_fingerprint(Key *, enum fp_type, enum fp_rep);
66u_char *key_fingerprint_raw(const Key *, enum fp_type, u_int *); 84u_char *key_fingerprint_raw(Key *, enum fp_type, u_int *);
67const char *key_type(const Key *); 85const char *key_type(const Key *);
68int key_write(const Key *, FILE *); 86int key_write(const Key *, FILE *);
69int key_read(Key *, char **); 87int key_read(Key *, char **);
@@ -72,6 +90,14 @@ u_int key_size(const Key *);
72Key *key_generate(int, u_int); 90Key *key_generate(int, u_int);
73Key *key_from_private(const Key *); 91Key *key_from_private(const Key *);
74int key_type_from_name(char *); 92int key_type_from_name(char *);
93int key_is_cert(const Key *);
94int key_type_plain(int);
95int key_to_certified(Key *);
96int key_drop_cert(Key *);
97int key_certify(Key *, Key *);
98void key_cert_copy(const Key *, struct Key *);
99int key_cert_check_authority(const Key *, int, int, const char *,
100 const char **);
75 101
76Key *key_from_blob(const u_char *, u_int); 102Key *key_from_blob(const u_char *, u_int);
77int key_to_blob(const Key *, u_char **, u_int *); 103int key_to_blob(const Key *, u_char **, u_int *);
diff --git a/loginrec.c b/loginrec.c
index f4af06736..bca959707 100644
--- a/loginrec.c
+++ b/loginrec.c
@@ -758,8 +758,8 @@ construct_utmpx(struct logininfo *li, struct utmpx *utx)
758 utx->ut_pid = li->pid; 758 utx->ut_pid = li->pid;
759 759
760 /* strncpy(): Don't necessarily want null termination */ 760 /* strncpy(): Don't necessarily want null termination */
761 strncpy(utx->ut_name, li->username, 761 strncpy(utx->ut_user, li->username,
762 MIN_SIZEOF(utx->ut_name, li->username)); 762 MIN_SIZEOF(utx->ut_user, li->username));
763 763
764 if (li->type == LTYPE_LOGOUT) 764 if (li->type == LTYPE_LOGOUT)
765 return; 765 return;
@@ -1316,8 +1316,8 @@ wtmpx_write_entry(struct logininfo *li)
1316static int 1316static int
1317wtmpx_islogin(struct logininfo *li, struct utmpx *utx) 1317wtmpx_islogin(struct logininfo *li, struct utmpx *utx)
1318{ 1318{
1319 if (strncmp(li->username, utx->ut_name, 1319 if (strncmp(li->username, utx->ut_user,
1320 MIN_SIZEOF(li->username, utx->ut_name)) == 0 ) { 1320 MIN_SIZEOF(li->username, utx->ut_user)) == 0 ) {
1321# ifdef HAVE_TYPE_IN_UTMPX 1321# ifdef HAVE_TYPE_IN_UTMPX
1322 if (utx->ut_type == USER_PROCESS) 1322 if (utx->ut_type == USER_PROCESS)
1323 return (1); 1323 return (1);
diff --git a/match.h b/match.h
index 18f683070..3d7f70fc0 100644
--- a/match.h
+++ b/match.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: match.h,v 1.14 2008/06/10 03:57:27 djm Exp $ */ 1/* $OpenBSD: match.h,v 1.15 2010/02/26 20:29:54 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -23,5 +23,5 @@ char *match_list(const char *, const char *, u_int *);
23 23
24/* addrmatch.c */ 24/* addrmatch.c */
25int addr_match_list(const char *, const char *); 25int addr_match_list(const char *, const char *);
26 26int addr_match_cidr_list(const char *, const char *);
27#endif 27#endif
diff --git a/mdoc2man.awk b/mdoc2man.awk
index 9d1126769..80e8d5ffa 100644
--- a/mdoc2man.awk
+++ b/mdoc2man.awk
@@ -1,6 +1,6 @@
1#!/usr/bin/awk 1#!/usr/bin/awk
2# 2#
3# $Id: mdoc2man.awk,v 1.8 2007/06/05 10:01:16 dtucker Exp $ 3# $Id: mdoc2man.awk,v 1.9 2009/10/24 00:52:42 dtucker Exp $
4# 4#
5# Version history: 5# Version history:
6# v4+ Adapted for OpenSSH Portable (see cvs Id and history) 6# v4+ Adapted for OpenSSH Portable (see cvs Id and history)
@@ -149,6 +149,9 @@ function add(str) {
149 } else if(match(words[w],"^Dt$")) { 149 } else if(match(words[w],"^Dt$")) {
150 id=wtail() 150 id=wtail()
151 next 151 next
152 } else if(match(words[w],"^Ux$")) {
153 add("UNIX")
154 skip=1
152 } else if(match(words[w],"^Ox$")) { 155 } else if(match(words[w],"^Ox$")) {
153 add("OpenBSD") 156 add("OpenBSD")
154 skip=1 157 skip=1
diff --git a/misc.c b/misc.c
index 143dbf0e2..e1f723123 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: misc.c,v 1.71 2009/02/21 19:32:04 tobias Exp $ */ 1/* $OpenBSD: misc.c,v 1.75 2010/01/09 23:04:13 dtucker Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved. 4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved.
@@ -560,11 +560,11 @@ char *
560percent_expand(const char *string, ...) 560percent_expand(const char *string, ...)
561{ 561{
562#define EXPAND_MAX_KEYS 16 562#define EXPAND_MAX_KEYS 16
563 u_int num_keys, i, j;
563 struct { 564 struct {
564 const char *key; 565 const char *key;
565 const char *repl; 566 const char *repl;
566 } keys[EXPAND_MAX_KEYS]; 567 } keys[EXPAND_MAX_KEYS];
567 u_int num_keys, i, j;
568 char buf[4096]; 568 char buf[4096];
569 va_list ap; 569 va_list ap;
570 570
@@ -576,13 +576,12 @@ percent_expand(const char *string, ...)
576 break; 576 break;
577 keys[num_keys].repl = va_arg(ap, char *); 577 keys[num_keys].repl = va_arg(ap, char *);
578 if (keys[num_keys].repl == NULL) 578 if (keys[num_keys].repl == NULL)
579 fatal("percent_expand: NULL replacement"); 579 fatal("%s: NULL replacement", __func__);
580 } 580 }
581 if (num_keys == EXPAND_MAX_KEYS && va_arg(ap, char *) != NULL)
582 fatal("%s: too many keys", __func__);
581 va_end(ap); 583 va_end(ap);
582 584
583 if (num_keys >= EXPAND_MAX_KEYS)
584 fatal("percent_expand: too many keys");
585
586 /* Expand string */ 585 /* Expand string */
587 *buf = '\0'; 586 *buf = '\0';
588 for (i = 0; *string != '\0'; string++) { 587 for (i = 0; *string != '\0'; string++) {
@@ -590,23 +589,24 @@ percent_expand(const char *string, ...)
590 append: 589 append:
591 buf[i++] = *string; 590 buf[i++] = *string;
592 if (i >= sizeof(buf)) 591 if (i >= sizeof(buf))
593 fatal("percent_expand: string too long"); 592 fatal("%s: string too long", __func__);
594 buf[i] = '\0'; 593 buf[i] = '\0';
595 continue; 594 continue;
596 } 595 }
597 string++; 596 string++;
597 /* %% case */
598 if (*string == '%') 598 if (*string == '%')
599 goto append; 599 goto append;
600 for (j = 0; j < num_keys; j++) { 600 for (j = 0; j < num_keys; j++) {
601 if (strchr(keys[j].key, *string) != NULL) { 601 if (strchr(keys[j].key, *string) != NULL) {
602 i = strlcat(buf, keys[j].repl, sizeof(buf)); 602 i = strlcat(buf, keys[j].repl, sizeof(buf));
603 if (i >= sizeof(buf)) 603 if (i >= sizeof(buf))
604 fatal("percent_expand: string too long"); 604 fatal("%s: string too long", __func__);
605 break; 605 break;
606 } 606 }
607 } 607 }
608 if (j >= num_keys) 608 if (j >= num_keys)
609 fatal("percent_expand: unknown key %%%c", *string); 609 fatal("%s: unknown key %%%c", __func__, *string);
610 } 610 }
611 return (xstrdup(buf)); 611 return (xstrdup(buf));
612#undef EXPAND_MAX_KEYS 612#undef EXPAND_MAX_KEYS
@@ -849,3 +849,14 @@ ms_to_timeval(struct timeval *tv, int ms)
849 tv->tv_usec = (ms % 1000) * 1000; 849 tv->tv_usec = (ms % 1000) * 1000;
850} 850}
851 851
852void
853sock_set_v6only(int s)
854{
855#ifdef IPV6_V6ONLY
856 int on = 1;
857
858 debug3("%s: set socket %d IPV6_V6ONLY", __func__, s);
859 if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on)) == -1)
860 error("setsockopt IPV6_V6ONLY: %s", strerror(errno));
861#endif
862}
diff --git a/misc.h b/misc.h
index 5da170d2f..32073acd4 100644
--- a/misc.h
+++ b/misc.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: misc.h,v 1.38 2008/06/12 20:38:28 dtucker Exp $ */ 1/* $OpenBSD: misc.h,v 1.41 2010/01/09 23:04:13 dtucker Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -35,6 +35,7 @@ char *tohex(const void *, size_t);
35void sanitise_stdfd(void); 35void sanitise_stdfd(void);
36void ms_subtract_diff(struct timeval *, int *); 36void ms_subtract_diff(struct timeval *, int *);
37void ms_to_timeval(struct timeval *, int); 37void ms_to_timeval(struct timeval *, int);
38void sock_set_v6only(int);
38 39
39struct passwd *pwcopy(struct passwd *); 40struct passwd *pwcopy(struct passwd *);
40const char *ssh_gai_strerror(int); 41const char *ssh_gai_strerror(int);
diff --git a/monitor.c b/monitor.c
index cd2ca4057..a1f4a2e05 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor.c,v 1.104 2009/06/12 20:43:22 andreas Exp $ */ 1/* $OpenBSD: monitor.c,v 1.106 2010/03/07 11:57:13 dtucker Exp $ */
2/* 2/*
3 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
4 * Copyright 2002 Markus Friedl <markus@openbsd.org> 4 * Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -1040,17 +1040,6 @@ mm_answer_pam_free_ctx(int sock, Buffer *m)
1040} 1040}
1041#endif 1041#endif
1042 1042
1043static void
1044mm_append_debug(Buffer *m)
1045{
1046 if (auth_debug_init && buffer_len(&auth_debug)) {
1047 debug3("%s: Appending debug messages for child", __func__);
1048 buffer_append(m, buffer_ptr(&auth_debug),
1049 buffer_len(&auth_debug));
1050 buffer_clear(&auth_debug);
1051 }
1052}
1053
1054int 1043int
1055mm_answer_keyallowed(int sock, Buffer *m) 1044mm_answer_keyallowed(int sock, Buffer *m)
1056{ 1045{
@@ -1133,8 +1122,6 @@ mm_answer_keyallowed(int sock, Buffer *m)
1133 buffer_put_int(m, allowed); 1122 buffer_put_int(m, allowed);
1134 buffer_put_int(m, forced_command != NULL); 1123 buffer_put_int(m, forced_command != NULL);
1135 1124
1136 mm_append_debug(m);
1137
1138 mm_request_send(sock, MONITOR_ANS_KEYALLOWED, m); 1125 mm_request_send(sock, MONITOR_ANS_KEYALLOWED, m);
1139 1126
1140 if (type == MM_RSAHOSTKEY) 1127 if (type == MM_RSAHOSTKEY)
@@ -1518,8 +1505,6 @@ mm_answer_rsa_keyallowed(int sock, Buffer *m)
1518 if (key != NULL) 1505 if (key != NULL)
1519 key_free(key); 1506 key_free(key);
1520 1507
1521 mm_append_debug(m);
1522
1523 mm_request_send(sock, MONITOR_ANS_RSAKEYALLOWED, m); 1508 mm_request_send(sock, MONITOR_ANS_RSAKEYALLOWED, m);
1524 1509
1525 monitor_permit(mon_dispatch, MONITOR_REQ_RSACHALLENGE, allowed); 1510 monitor_permit(mon_dispatch, MONITOR_REQ_RSACHALLENGE, allowed);
@@ -1771,7 +1756,8 @@ mm_get_kex(Buffer *m)
1771 kex->flags = buffer_get_int(m); 1756 kex->flags = buffer_get_int(m);
1772 kex->client_version_string = buffer_get_string(m, NULL); 1757 kex->client_version_string = buffer_get_string(m, NULL);
1773 kex->server_version_string = buffer_get_string(m, NULL); 1758 kex->server_version_string = buffer_get_string(m, NULL);
1774 kex->load_host_key=&get_hostkey_by_type; 1759 kex->load_host_public_key=&get_hostkey_public_by_type;
1760 kex->load_host_private_key=&get_hostkey_private_by_type;
1775 kex->host_key_index=&get_hostkey_index; 1761 kex->host_key_index=&get_hostkey_index;
1776 1762
1777 return (kex); 1763 return (kex);
diff --git a/monitor_fdpass.c b/monitor_fdpass.c
index 4b9a066bc..7eb6f5c6e 100644
--- a/monitor_fdpass.c
+++ b/monitor_fdpass.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor_fdpass.c,v 1.18 2008/11/30 11:59:26 dtucker Exp $ */ 1/* $OpenBSD: monitor_fdpass.c,v 1.19 2010/01/12 00:58:25 djm Exp $ */
2/* 2/*
3 * Copyright 2001 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2001 Niels Provos <provos@citi.umich.edu>
4 * All rights reserved. 4 * All rights reserved.
@@ -34,6 +34,9 @@
34#endif 34#endif
35 35
36#include <errno.h> 36#include <errno.h>
37#ifdef HAVE_POLL_H
38#include <poll.h>
39#endif
37#include <string.h> 40#include <string.h>
38#include <stdarg.h> 41#include <stdarg.h>
39 42
@@ -55,6 +58,7 @@ mm_send_fd(int sock, int fd)
55 struct iovec vec; 58 struct iovec vec;
56 char ch = '\0'; 59 char ch = '\0';
57 ssize_t n; 60 ssize_t n;
61 struct pollfd pfd;
58 62
59 memset(&msg, 0, sizeof(msg)); 63 memset(&msg, 0, sizeof(msg));
60#ifdef HAVE_ACCRIGHTS_IN_MSGHDR 64#ifdef HAVE_ACCRIGHTS_IN_MSGHDR
@@ -75,9 +79,13 @@ mm_send_fd(int sock, int fd)
75 msg.msg_iov = &vec; 79 msg.msg_iov = &vec;
76 msg.msg_iovlen = 1; 80 msg.msg_iovlen = 1;
77 81
78 while ((n = sendmsg(sock, &msg, 0)) == -1 && (errno == EAGAIN || 82 pfd.fd = sock;
79 errno == EINTR)) 83 pfd.events = POLLOUT;
84 while ((n = sendmsg(sock, &msg, 0)) == -1 &&
85 (errno == EAGAIN || errno == EINTR)) {
80 debug3("%s: sendmsg(%d): %s", __func__, fd, strerror(errno)); 86 debug3("%s: sendmsg(%d): %s", __func__, fd, strerror(errno));
87 (void)poll(&pfd, 1, -1);
88 }
81 if (n == -1) { 89 if (n == -1) {
82 error("%s: sendmsg(%d): %s", __func__, fd, 90 error("%s: sendmsg(%d): %s", __func__, fd,
83 strerror(errno)); 91 strerror(errno));
@@ -112,6 +120,7 @@ mm_receive_fd(int sock)
112 ssize_t n; 120 ssize_t n;
113 char ch; 121 char ch;
114 int fd; 122 int fd;
123 struct pollfd pfd;
115 124
116 memset(&msg, 0, sizeof(msg)); 125 memset(&msg, 0, sizeof(msg));
117 vec.iov_base = &ch; 126 vec.iov_base = &ch;
@@ -126,9 +135,13 @@ mm_receive_fd(int sock)
126 msg.msg_controllen = sizeof(cmsgbuf.buf); 135 msg.msg_controllen = sizeof(cmsgbuf.buf);
127#endif 136#endif
128 137
129 while ((n = recvmsg(sock, &msg, 0)) == -1 && (errno == EAGAIN || 138 pfd.fd = sock;
130 errno == EINTR)) 139 pfd.events = POLLIN;
140 while ((n = recvmsg(sock, &msg, 0)) == -1 &&
141 (errno == EAGAIN || errno == EINTR)) {
131 debug3("%s: recvmsg: %s", __func__, strerror(errno)); 142 debug3("%s: recvmsg: %s", __func__, strerror(errno));
143 (void)poll(&pfd, 1, -1);
144 }
132 if (n == -1) { 145 if (n == -1) {
133 error("%s: recvmsg: %s", __func__, strerror(errno)); 146 error("%s: recvmsg: %s", __func__, strerror(errno));
134 return -1; 147 return -1;
diff --git a/monitor_wrap.c b/monitor_wrap.c
index 743e34079..24b54e4a4 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor_wrap.c,v 1.68 2009/06/22 05:39:28 dtucker Exp $ */ 1/* $OpenBSD: monitor_wrap.c,v 1.69 2010/03/07 11:57:13 dtucker Exp $ */
2/* 2/*
3 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
4 * Copyright 2002 Markus Friedl <markus@openbsd.org> 4 * Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -365,19 +365,6 @@ mm_auth_rhosts_rsa_key_allowed(struct passwd *pw, char *user,
365 return (ret); 365 return (ret);
366} 366}
367 367
368static void
369mm_send_debug(Buffer *m)
370{
371 char *msg;
372
373 while (buffer_len(m)) {
374 msg = buffer_get_string(m, NULL);
375 debug3("%s: Sending debug: %s", __func__, msg);
376 packet_send_debug("%s", msg);
377 xfree(msg);
378 }
379}
380
381int 368int
382mm_key_allowed(enum mm_keytype type, char *user, char *host, Key *key) 369mm_key_allowed(enum mm_keytype type, char *user, char *host, Key *key)
383{ 370{
@@ -411,9 +398,6 @@ mm_key_allowed(enum mm_keytype type, char *user, char *host, Key *key)
411 have_forced = buffer_get_int(&m); 398 have_forced = buffer_get_int(&m);
412 forced_command = have_forced ? xstrdup("true") : NULL; 399 forced_command = have_forced ? xstrdup("true") : NULL;
413 400
414 /* Send potential debug messages */
415 mm_send_debug(&m);
416
417 buffer_free(&m); 401 buffer_free(&m);
418 402
419 return (allowed); 403 return (allowed);
@@ -1103,7 +1087,6 @@ mm_auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
1103 *rkey = key; 1087 *rkey = key;
1104 xfree(blob); 1088 xfree(blob);
1105 } 1089 }
1106 mm_send_debug(&m);
1107 buffer_free(&m); 1090 buffer_free(&m);
1108 1091
1109 return (allowed); 1092 return (allowed);
diff --git a/mux.c b/mux.c
index 4669e5328..5df5245f6 100644
--- a/mux.c
+++ b/mux.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: mux.c,v 1.7 2008/06/13 17:21:20 dtucker Exp $ */ 1/* $OpenBSD: mux.c,v 1.14 2010/01/30 02:54:53 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -17,25 +17,21 @@
17 17
18/* ssh session multiplexing support */ 18/* ssh session multiplexing support */
19 19
20#include "includes.h"
21
22/* 20/*
23 * TODO: 21 * TODO:
24 * 1. partial reads in muxserver_accept_control (maybe make channels 22 * - Better signalling from master to slave, especially passing of
25 * from accepted connections)
26 * 2. Better signalling from master to slave, especially passing of
27 * error messages 23 * error messages
28 * 3. Better fall-back from mux slave error to new connection. 24 * - Better fall-back from mux slave error to new connection.
29 * 3. Add/delete forwardings via slave 25 * - ExitOnForwardingFailure
30 * 4. ExitOnForwardingFailure (after #3 obviously) 26 * - Maybe extension mechanisms for multi-X11/multi-agent forwarding
31 * 5. Maybe extension mechanisms for multi-X11/multi-agent forwarding 27 * - Support ~^Z in mux slaves.
32 * 6. Document the mux mini-protocol somewhere. 28 * - Inspect or control sessions in master.
33 * 7. Support ~^Z in mux slaves. 29 * - If we ever support the "signal" channel request, send signals on
34 * 8. Inspect or control sessions in master. 30 * sessions in master.
35 * 9. If we ever support the "signal" channel request, send signals on
36 * sessions in master.
37 */ 31 */
38 32
33#include "includes.h"
34
39#include <sys/types.h> 35#include <sys/types.h>
40#include <sys/param.h> 36#include <sys/param.h>
41#include <sys/stat.h> 37#include <sys/stat.h>
@@ -55,6 +51,14 @@
55#include <paths.h> 51#include <paths.h>
56#endif 52#endif
57 53
54#ifdef HAVE_POLL_H
55#include <poll.h>
56#else
57# ifdef HAVE_SYS_POLL_H
58# include <sys/poll.h>
59# endif
60#endif
61
58#ifdef HAVE_UTIL_H 62#ifdef HAVE_UTIL_H
59# include <util.h> 63# include <util.h>
60#endif 64#endif
@@ -82,18 +86,22 @@
82 86
83/* from ssh.c */ 87/* from ssh.c */
84extern int tty_flag; 88extern int tty_flag;
89extern int force_tty_flag;
85extern Options options; 90extern Options options;
86extern int stdin_null_flag; 91extern int stdin_null_flag;
87extern char *host; 92extern char *host;
88int subsystem_flag; 93extern int subsystem_flag;
89extern Buffer command; 94extern Buffer command;
95extern volatile sig_atomic_t quit_pending;
96extern char *stdio_forward_host;
97extern int stdio_forward_port;
90 98
91/* Context for session open confirmation callback */ 99/* Context for session open confirmation callback */
92struct mux_session_confirm_ctx { 100struct mux_session_confirm_ctx {
93 int want_tty; 101 u_int want_tty;
94 int want_subsys; 102 u_int want_subsys;
95 int want_x_fwd; 103 u_int want_x_fwd;
96 int want_agent_fwd; 104 u_int want_agent_fwd;
97 Buffer cmd; 105 Buffer cmd;
98 char *term; 106 char *term;
99 struct termios tio; 107 struct termios tio;
@@ -103,6 +111,9 @@ struct mux_session_confirm_ctx {
103/* fd to control socket */ 111/* fd to control socket */
104int muxserver_sock = -1; 112int muxserver_sock = -1;
105 113
114/* client request id */
115u_int muxclient_request_id = 0;
116
106/* Multiplexing control command */ 117/* Multiplexing control command */
107u_int muxclient_command = 0; 118u_int muxclient_command = 0;
108 119
@@ -112,16 +123,831 @@ static volatile sig_atomic_t muxclient_terminate = 0;
112/* PID of multiplex server */ 123/* PID of multiplex server */
113static u_int muxserver_pid = 0; 124static u_int muxserver_pid = 0;
114 125
126static Channel *mux_listener_channel = NULL;
127
128struct mux_master_state {
129 int hello_rcvd;
130};
131
132/* mux protocol messages */
133#define MUX_MSG_HELLO 0x00000001
134#define MUX_C_NEW_SESSION 0x10000002
135#define MUX_C_ALIVE_CHECK 0x10000004
136#define MUX_C_TERMINATE 0x10000005
137#define MUX_C_OPEN_FWD 0x10000006
138#define MUX_C_CLOSE_FWD 0x10000007
139#define MUX_C_NEW_STDIO_FWD 0x10000008
140#define MUX_S_OK 0x80000001
141#define MUX_S_PERMISSION_DENIED 0x80000002
142#define MUX_S_FAILURE 0x80000003
143#define MUX_S_EXIT_MESSAGE 0x80000004
144#define MUX_S_ALIVE 0x80000005
145#define MUX_S_SESSION_OPENED 0x80000006
146
147/* type codes for MUX_C_OPEN_FWD and MUX_C_CLOSE_FWD */
148#define MUX_FWD_LOCAL 1
149#define MUX_FWD_REMOTE 2
150#define MUX_FWD_DYNAMIC 3
151
152static void mux_session_confirm(int, void *);
153
154static int process_mux_master_hello(u_int, Channel *, Buffer *, Buffer *);
155static int process_mux_new_session(u_int, Channel *, Buffer *, Buffer *);
156static int process_mux_alive_check(u_int, Channel *, Buffer *, Buffer *);
157static int process_mux_terminate(u_int, Channel *, Buffer *, Buffer *);
158static int process_mux_open_fwd(u_int, Channel *, Buffer *, Buffer *);
159static int process_mux_close_fwd(u_int, Channel *, Buffer *, Buffer *);
160static int process_mux_stdio_fwd(u_int, Channel *, Buffer *, Buffer *);
161
162static const struct {
163 u_int type;
164 int (*handler)(u_int, Channel *, Buffer *, Buffer *);
165} mux_master_handlers[] = {
166 { MUX_MSG_HELLO, process_mux_master_hello },
167 { MUX_C_NEW_SESSION, process_mux_new_session },
168 { MUX_C_ALIVE_CHECK, process_mux_alive_check },
169 { MUX_C_TERMINATE, process_mux_terminate },
170 { MUX_C_OPEN_FWD, process_mux_open_fwd },
171 { MUX_C_CLOSE_FWD, process_mux_close_fwd },
172 { MUX_C_NEW_STDIO_FWD, process_mux_stdio_fwd },
173 { 0, NULL }
174};
175
176/* Cleanup callback fired on closure of mux slave _session_ channel */
177/* ARGSUSED */
178static void
179mux_master_session_cleanup_cb(int cid, void *unused)
180{
181 Channel *cc, *c = channel_by_id(cid);
182
183 debug3("%s: entering for channel %d", __func__, cid);
184 if (c == NULL)
185 fatal("%s: channel_by_id(%i) == NULL", __func__, cid);
186 if (c->ctl_chan != -1) {
187 if ((cc = channel_by_id(c->ctl_chan)) == NULL)
188 fatal("%s: channel %d missing control channel %d",
189 __func__, c->self, c->ctl_chan);
190 c->ctl_chan = -1;
191 cc->remote_id = -1;
192 chan_rcvd_oclose(cc);
193 }
194 channel_cancel_cleanup(c->self);
195}
196
197/* Cleanup callback fired on closure of mux slave _control_ channel */
198/* ARGSUSED */
199static void
200mux_master_control_cleanup_cb(int cid, void *unused)
201{
202 Channel *sc, *c = channel_by_id(cid);
203
204 debug3("%s: entering for channel %d", __func__, cid);
205 if (c == NULL)
206 fatal("%s: channel_by_id(%i) == NULL", __func__, cid);
207 if (c->remote_id != -1) {
208 if ((sc = channel_by_id(c->remote_id)) == NULL)
209 debug2("%s: channel %d n session channel %d",
210 __func__, c->self, c->remote_id);
211 c->remote_id = -1;
212 sc->ctl_chan = -1;
213 if (sc->type != SSH_CHANNEL_OPEN) {
214 debug2("%s: channel %d: not open", __func__, sc->self);
215 chan_mark_dead(sc);
216 } else {
217 if (sc->istate == CHAN_INPUT_OPEN)
218 chan_read_failed(sc);
219 if (sc->ostate == CHAN_OUTPUT_OPEN)
220 chan_write_failed(sc);
221 }
222 }
223 channel_cancel_cleanup(c->self);
224}
225
226/* Check mux client environment variables before passing them to mux master. */
227static int
228env_permitted(char *env)
229{
230 int i, ret;
231 char name[1024], *cp;
232
233 if ((cp = strchr(env, '=')) == NULL || cp == env)
234 return 0;
235 ret = snprintf(name, sizeof(name), "%.*s", (int)(cp - env), env);
236 if (ret <= 0 || (size_t)ret >= sizeof(name)) {
237 error("env_permitted: name '%.100s...' too long", env);
238 return 0;
239 }
240
241 for (i = 0; i < options.num_send_env; i++)
242 if (match_pattern(name, options.send_env[i]))
243 return 1;
244
245 return 0;
246}
247
248/* Mux master protocol message handlers */
249
250static int
251process_mux_master_hello(u_int rid, Channel *c, Buffer *m, Buffer *r)
252{
253 u_int ver;
254 struct mux_master_state *state = (struct mux_master_state *)c->mux_ctx;
255
256 if (state == NULL)
257 fatal("%s: channel %d: c->mux_ctx == NULL", __func__, c->self);
258 if (state->hello_rcvd) {
259 error("%s: HELLO received twice", __func__);
260 return -1;
261 }
262 if (buffer_get_int_ret(&ver, m) != 0) {
263 malf:
264 error("%s: malformed message", __func__);
265 return -1;
266 }
267 if (ver != SSHMUX_VER) {
268 error("Unsupported multiplexing protocol version %d "
269 "(expected %d)", ver, SSHMUX_VER);
270 return -1;
271 }
272 debug2("%s: channel %d slave version %u", __func__, c->self, ver);
273
274 /* No extensions are presently defined */
275 while (buffer_len(m) > 0) {
276 char *name = buffer_get_string_ret(m, NULL);
277 char *value = buffer_get_string_ret(m, NULL);
278
279 if (name == NULL || value == NULL) {
280 if (name != NULL)
281 xfree(name);
282 goto malf;
283 }
284 debug2("Unrecognised slave extension \"%s\"", name);
285 xfree(name);
286 xfree(value);
287 }
288 state->hello_rcvd = 1;
289 return 0;
290}
291
292static int
293process_mux_new_session(u_int rid, Channel *c, Buffer *m, Buffer *r)
294{
295 Channel *nc;
296 struct mux_session_confirm_ctx *cctx;
297 char *reserved, *cmd, *cp;
298 u_int i, j, len, env_len, escape_char, window, packetmax;
299 int new_fd[3];
300
301 /* Reply for SSHMUX_COMMAND_OPEN */
302 cctx = xcalloc(1, sizeof(*cctx));
303 cctx->term = NULL;
304 cmd = reserved = NULL;
305 if ((reserved = buffer_get_string_ret(m, NULL)) == NULL ||
306 buffer_get_int_ret(&cctx->want_tty, m) != 0 ||
307 buffer_get_int_ret(&cctx->want_x_fwd, m) != 0 ||
308 buffer_get_int_ret(&cctx->want_agent_fwd, m) != 0 ||
309 buffer_get_int_ret(&cctx->want_subsys, m) != 0 ||
310 buffer_get_int_ret(&escape_char, m) != 0 ||
311 (cctx->term = buffer_get_string_ret(m, &len)) == NULL ||
312 (cmd = buffer_get_string_ret(m, &len)) == NULL) {
313 malf:
314 if (cmd != NULL)
315 xfree(cmd);
316 if (reserved != NULL)
317 xfree(reserved);
318 if (cctx->term != NULL)
319 xfree(cctx->term);
320 error("%s: malformed message", __func__);
321 return -1;
322 }
323 xfree(reserved);
324 reserved = NULL;
325
326 cctx->env = NULL;
327 env_len = 0;
328 while (buffer_len(m) > 0) {
329#define MUX_MAX_ENV_VARS 4096
330 if ((cp = buffer_get_string_ret(m, &len)) == NULL) {
331 xfree(cmd);
332 goto malf;
333 }
334 if (!env_permitted(cp)) {
335 xfree(cp);
336 continue;
337 }
338 cctx->env = xrealloc(cctx->env, env_len + 2,
339 sizeof(*cctx->env));
340 cctx->env[env_len++] = cp;
341 cctx->env[env_len] = NULL;
342 if (env_len > MUX_MAX_ENV_VARS) {
343 error(">%d environment variables received, ignoring "
344 "additional", MUX_MAX_ENV_VARS);
345 break;
346 }
347 }
348
349 debug2("%s: channel %d: request tty %d, X %d, agent %d, subsys %d, "
350 "term \"%s\", cmd \"%s\", env %u", __func__, c->self,
351 cctx->want_tty, cctx->want_x_fwd, cctx->want_agent_fwd,
352 cctx->want_subsys, cctx->term, cmd, env_len);
353
354 buffer_init(&cctx->cmd);
355 buffer_append(&cctx->cmd, cmd, strlen(cmd));
356 xfree(cmd);
357 cmd = NULL;
358
359 /* Gather fds from client */
360 for(i = 0; i < 3; i++) {
361 if ((new_fd[i] = mm_receive_fd(c->sock)) == -1) {
362 error("%s: failed to receive fd %d from slave",
363 __func__, i);
364 for (j = 0; j < i; j++)
365 close(new_fd[j]);
366 for (j = 0; j < env_len; j++)
367 xfree(cctx->env[j]);
368 if (env_len > 0)
369 xfree(cctx->env);
370 xfree(cctx->term);
371 buffer_free(&cctx->cmd);
372 xfree(cctx);
373
374 /* prepare reply */
375 buffer_put_int(r, MUX_S_FAILURE);
376 buffer_put_int(r, rid);
377 buffer_put_cstring(r,
378 "did not receive file descriptors");
379 return -1;
380 }
381 }
382
383 debug3("%s: got fds stdin %d, stdout %d, stderr %d", __func__,
384 new_fd[0], new_fd[1], new_fd[2]);
385
386 /* XXX support multiple child sessions in future */
387 if (c->remote_id != -1) {
388 debug2("%s: session already open", __func__);
389 /* prepare reply */
390 buffer_put_int(r, MUX_S_FAILURE);
391 buffer_put_int(r, rid);
392 buffer_put_cstring(r, "Multiple sessions not supported");
393 cleanup:
394 close(new_fd[0]);
395 close(new_fd[1]);
396 close(new_fd[2]);
397 xfree(cctx->term);
398 if (env_len != 0) {
399 for (i = 0; i < env_len; i++)
400 xfree(cctx->env[i]);
401 xfree(cctx->env);
402 }
403 buffer_free(&cctx->cmd);
404 return 0;
405 }
406
407 if (options.control_master == SSHCTL_MASTER_ASK ||
408 options.control_master == SSHCTL_MASTER_AUTO_ASK) {
409 if (!ask_permission("Allow shared connection to %s? ", host)) {
410 debug2("%s: session refused by user", __func__);
411 /* prepare reply */
412 buffer_put_int(r, MUX_S_PERMISSION_DENIED);
413 buffer_put_int(r, rid);
414 buffer_put_cstring(r, "Permission denied");
415 goto cleanup;
416 }
417 }
418
419 /* Try to pick up ttymodes from client before it goes raw */
420 if (cctx->want_tty && tcgetattr(new_fd[0], &cctx->tio) == -1)
421 error("%s: tcgetattr: %s", __func__, strerror(errno));
422
423 /* enable nonblocking unless tty */
424 if (!isatty(new_fd[0]))
425 set_nonblock(new_fd[0]);
426 if (!isatty(new_fd[1]))
427 set_nonblock(new_fd[1]);
428 if (!isatty(new_fd[2]))
429 set_nonblock(new_fd[2]);
430
431 window = CHAN_SES_WINDOW_DEFAULT;
432 packetmax = CHAN_SES_PACKET_DEFAULT;
433 if (cctx->want_tty) {
434 window >>= 1;
435 packetmax >>= 1;
436 }
437
438 nc = channel_new("session", SSH_CHANNEL_OPENING,
439 new_fd[0], new_fd[1], new_fd[2], window, packetmax,
440 CHAN_EXTENDED_WRITE, "client-session", /*nonblock*/0);
441
442 nc->ctl_chan = c->self; /* link session -> control channel */
443 c->remote_id = nc->self; /* link control -> session channel */
444
445 if (cctx->want_tty && escape_char != 0xffffffff) {
446 channel_register_filter(nc->self,
447 client_simple_escape_filter, NULL,
448 client_filter_cleanup,
449 client_new_escape_filter_ctx((int)escape_char));
450 }
451
452 debug2("%s: channel_new: %d linked to control channel %d",
453 __func__, nc->self, nc->ctl_chan);
454
455 channel_send_open(nc->self);
456 channel_register_open_confirm(nc->self, mux_session_confirm, cctx);
457 channel_register_cleanup(nc->self, mux_master_session_cleanup_cb, 0);
458
459 /* prepare reply */
460 /* XXX defer until mux_session_confirm() fires */
461 buffer_put_int(r, MUX_S_SESSION_OPENED);
462 buffer_put_int(r, rid);
463 buffer_put_int(r, nc->self);
464
465 return 0;
466}
467
468static int
469process_mux_alive_check(u_int rid, Channel *c, Buffer *m, Buffer *r)
470{
471 debug2("%s: channel %d: alive check", __func__, c->self);
472
473 /* prepare reply */
474 buffer_put_int(r, MUX_S_ALIVE);
475 buffer_put_int(r, rid);
476 buffer_put_int(r, (u_int)getpid());
477
478 return 0;
479}
480
481static int
482process_mux_terminate(u_int rid, Channel *c, Buffer *m, Buffer *r)
483{
484 debug2("%s: channel %d: terminate request", __func__, c->self);
485
486 if (options.control_master == SSHCTL_MASTER_ASK ||
487 options.control_master == SSHCTL_MASTER_AUTO_ASK) {
488 if (!ask_permission("Terminate shared connection to %s? ",
489 host)) {
490 debug2("%s: termination refused by user", __func__);
491 buffer_put_int(r, MUX_S_PERMISSION_DENIED);
492 buffer_put_int(r, rid);
493 buffer_put_cstring(r, "Permission denied");
494 return 0;
495 }
496 }
497
498 quit_pending = 1;
499 buffer_put_int(r, MUX_S_OK);
500 buffer_put_int(r, rid);
501 /* XXX exit happens too soon - message never makes it to client */
502 return 0;
503}
504
505static char *
506format_forward(u_int ftype, Forward *fwd)
507{
508 char *ret;
509
510 switch (ftype) {
511 case MUX_FWD_LOCAL:
512 xasprintf(&ret, "local forward %.200s:%d -> %.200s:%d",
513 (fwd->listen_host == NULL) ?
514 (options.gateway_ports ? "*" : "LOCALHOST") :
515 fwd->listen_host, fwd->listen_port,
516 fwd->connect_host, fwd->connect_port);
517 break;
518 case MUX_FWD_DYNAMIC:
519 xasprintf(&ret, "dynamic forward %.200s:%d -> *",
520 (fwd->listen_host == NULL) ?
521 (options.gateway_ports ? "*" : "LOCALHOST") :
522 fwd->listen_host, fwd->listen_port);
523 break;
524 case MUX_FWD_REMOTE:
525 xasprintf(&ret, "remote forward %.200s:%d -> %.200s:%d",
526 (fwd->listen_host == NULL) ?
527 "LOCALHOST" : fwd->listen_host,
528 fwd->listen_port,
529 fwd->connect_host, fwd->connect_port);
530 break;
531 default:
532 fatal("%s: unknown forward type %u", __func__, ftype);
533 }
534 return ret;
535}
536
537static int
538compare_host(const char *a, const char *b)
539{
540 if (a == NULL && b == NULL)
541 return 1;
542 if (a == NULL || b == NULL)
543 return 0;
544 return strcmp(a, b) == 0;
545}
546
547static int
548compare_forward(Forward *a, Forward *b)
549{
550 if (!compare_host(a->listen_host, b->listen_host))
551 return 0;
552 if (a->listen_port != b->listen_port)
553 return 0;
554 if (!compare_host(a->connect_host, b->connect_host))
555 return 0;
556 if (a->connect_port != b->connect_port)
557 return 0;
558
559 return 1;
560}
561
562static int
563process_mux_open_fwd(u_int rid, Channel *c, Buffer *m, Buffer *r)
564{
565 Forward fwd;
566 char *fwd_desc = NULL;
567 u_int ftype;
568 int i, ret = 0, freefwd = 1;
569
570 fwd.listen_host = fwd.connect_host = NULL;
571 if (buffer_get_int_ret(&ftype, m) != 0 ||
572 (fwd.listen_host = buffer_get_string_ret(m, NULL)) == NULL ||
573 buffer_get_int_ret(&fwd.listen_port, m) != 0 ||
574 (fwd.connect_host = buffer_get_string_ret(m, NULL)) == NULL ||
575 buffer_get_int_ret(&fwd.connect_port, m) != 0) {
576 error("%s: malformed message", __func__);
577 ret = -1;
578 goto out;
579 }
580
581 if (*fwd.listen_host == '\0') {
582 xfree(fwd.listen_host);
583 fwd.listen_host = NULL;
584 }
585 if (*fwd.connect_host == '\0') {
586 xfree(fwd.connect_host);
587 fwd.connect_host = NULL;
588 }
589
590 debug2("%s: channel %d: request %s", __func__, c->self,
591 (fwd_desc = format_forward(ftype, &fwd)));
592
593 if (ftype != MUX_FWD_LOCAL && ftype != MUX_FWD_REMOTE &&
594 ftype != MUX_FWD_DYNAMIC) {
595 logit("%s: invalid forwarding type %u", __func__, ftype);
596 invalid:
597 xfree(fwd.listen_host);
598 xfree(fwd.connect_host);
599 buffer_put_int(r, MUX_S_FAILURE);
600 buffer_put_int(r, rid);
601 buffer_put_cstring(r, "Invalid forwarding request");
602 return 0;
603 }
604 /* XXX support rport0 forwarding with reply of port assigned */
605 if (fwd.listen_port == 0 || fwd.listen_port >= 65536) {
606 logit("%s: invalid listen port %u", __func__,
607 fwd.listen_port);
608 goto invalid;
609 }
610 if (fwd.connect_port >= 65536 || (ftype != MUX_FWD_DYNAMIC &&
611 ftype != MUX_FWD_REMOTE && fwd.connect_port == 0)) {
612 logit("%s: invalid connect port %u", __func__,
613 fwd.connect_port);
614 goto invalid;
615 }
616 if (ftype != MUX_FWD_DYNAMIC && fwd.connect_host == NULL) {
617 logit("%s: missing connect host", __func__);
618 goto invalid;
619 }
620
621 /* Skip forwards that have already been requested */
622 switch (ftype) {
623 case MUX_FWD_LOCAL:
624 case MUX_FWD_DYNAMIC:
625 for (i = 0; i < options.num_local_forwards; i++) {
626 if (compare_forward(&fwd,
627 options.local_forwards + i)) {
628 exists:
629 debug2("%s: found existing forwarding",
630 __func__);
631 buffer_put_int(r, MUX_S_OK);
632 buffer_put_int(r, rid);
633 goto out;
634 }
635 }
636 break;
637 case MUX_FWD_REMOTE:
638 for (i = 0; i < options.num_remote_forwards; i++) {
639 if (compare_forward(&fwd,
640 options.remote_forwards + i))
641 goto exists;
642 }
643 break;
644 }
645
646 if (options.control_master == SSHCTL_MASTER_ASK ||
647 options.control_master == SSHCTL_MASTER_AUTO_ASK) {
648 if (!ask_permission("Open %s on %s?", fwd_desc, host)) {
649 debug2("%s: forwarding refused by user", __func__);
650 buffer_put_int(r, MUX_S_PERMISSION_DENIED);
651 buffer_put_int(r, rid);
652 buffer_put_cstring(r, "Permission denied");
653 goto out;
654 }
655 }
656
657 if (ftype == MUX_FWD_LOCAL || ftype == MUX_FWD_DYNAMIC) {
658 if (options.num_local_forwards + 1 >=
659 SSH_MAX_FORWARDS_PER_DIRECTION ||
660 channel_setup_local_fwd_listener(fwd.listen_host,
661 fwd.listen_port, fwd.connect_host, fwd.connect_port,
662 options.gateway_ports) < 0) {
663 fail:
664 logit("slave-requested %s failed", fwd_desc);
665 buffer_put_int(r, MUX_S_FAILURE);
666 buffer_put_int(r, rid);
667 buffer_put_cstring(r, "Port forwarding failed");
668 goto out;
669 }
670 add_local_forward(&options, &fwd);
671 freefwd = 0;
672 } else {
673 /* XXX wait for remote to confirm */
674 if (options.num_remote_forwards + 1 >=
675 SSH_MAX_FORWARDS_PER_DIRECTION ||
676 channel_request_remote_forwarding(fwd.listen_host,
677 fwd.listen_port, fwd.connect_host, fwd.connect_port) < 0)
678 goto fail;
679 add_remote_forward(&options, &fwd);
680 freefwd = 0;
681 }
682 buffer_put_int(r, MUX_S_OK);
683 buffer_put_int(r, rid);
684 out:
685 if (fwd_desc != NULL)
686 xfree(fwd_desc);
687 if (freefwd) {
688 if (fwd.listen_host != NULL)
689 xfree(fwd.listen_host);
690 if (fwd.connect_host != NULL)
691 xfree(fwd.connect_host);
692 }
693 return ret;
694}
695
696static int
697process_mux_close_fwd(u_int rid, Channel *c, Buffer *m, Buffer *r)
698{
699 Forward fwd;
700 char *fwd_desc = NULL;
701 u_int ftype;
702 int ret = 0;
703
704 fwd.listen_host = fwd.connect_host = NULL;
705 if (buffer_get_int_ret(&ftype, m) != 0 ||
706 (fwd.listen_host = buffer_get_string_ret(m, NULL)) == NULL ||
707 buffer_get_int_ret(&fwd.listen_port, m) != 0 ||
708 (fwd.connect_host = buffer_get_string_ret(m, NULL)) == NULL ||
709 buffer_get_int_ret(&fwd.connect_port, m) != 0) {
710 error("%s: malformed message", __func__);
711 ret = -1;
712 goto out;
713 }
714
715 if (*fwd.listen_host == '\0') {
716 xfree(fwd.listen_host);
717 fwd.listen_host = NULL;
718 }
719 if (*fwd.connect_host == '\0') {
720 xfree(fwd.connect_host);
721 fwd.connect_host = NULL;
722 }
723
724 debug2("%s: channel %d: request %s", __func__, c->self,
725 (fwd_desc = format_forward(ftype, &fwd)));
726
727 /* XXX implement this */
728 buffer_put_int(r, MUX_S_FAILURE);
729 buffer_put_int(r, rid);
730 buffer_put_cstring(r, "unimplemented");
731
732 out:
733 if (fwd_desc != NULL)
734 xfree(fwd_desc);
735 if (fwd.listen_host != NULL)
736 xfree(fwd.listen_host);
737 if (fwd.connect_host != NULL)
738 xfree(fwd.connect_host);
739
740 return ret;
741}
742
743static int
744process_mux_stdio_fwd(u_int rid, Channel *c, Buffer *m, Buffer *r)
745{
746 Channel *nc;
747 char *reserved, *chost;
748 u_int cport, i, j;
749 int new_fd[2];
750
751 chost = reserved = NULL;
752 if ((reserved = buffer_get_string_ret(m, NULL)) == NULL ||
753 (chost = buffer_get_string_ret(m, NULL)) == NULL ||
754 buffer_get_int_ret(&cport, m) != 0) {
755 if (reserved != NULL)
756 xfree(reserved);
757 if (chost != NULL)
758 xfree(chost);
759 error("%s: malformed message", __func__);
760 return -1;
761 }
762 xfree(reserved);
763
764 debug2("%s: channel %d: request stdio fwd to %s:%u",
765 __func__, c->self, chost, cport);
766
767 /* Gather fds from client */
768 for(i = 0; i < 2; i++) {
769 if ((new_fd[i] = mm_receive_fd(c->sock)) == -1) {
770 error("%s: failed to receive fd %d from slave",
771 __func__, i);
772 for (j = 0; j < i; j++)
773 close(new_fd[j]);
774 xfree(chost);
775
776 /* prepare reply */
777 buffer_put_int(r, MUX_S_FAILURE);
778 buffer_put_int(r, rid);
779 buffer_put_cstring(r,
780 "did not receive file descriptors");
781 return -1;
782 }
783 }
784
785 debug3("%s: got fds stdin %d, stdout %d", __func__,
786 new_fd[0], new_fd[1]);
787
788 /* XXX support multiple child sessions in future */
789 if (c->remote_id != -1) {
790 debug2("%s: session already open", __func__);
791 /* prepare reply */
792 buffer_put_int(r, MUX_S_FAILURE);
793 buffer_put_int(r, rid);
794 buffer_put_cstring(r, "Multiple sessions not supported");
795 cleanup:
796 close(new_fd[0]);
797 close(new_fd[1]);
798 xfree(chost);
799 return 0;
800 }
801
802 if (options.control_master == SSHCTL_MASTER_ASK ||
803 options.control_master == SSHCTL_MASTER_AUTO_ASK) {
804 if (!ask_permission("Allow forward to to %s:%u? ",
805 chost, cport)) {
806 debug2("%s: stdio fwd refused by user", __func__);
807 /* prepare reply */
808 buffer_put_int(r, MUX_S_PERMISSION_DENIED);
809 buffer_put_int(r, rid);
810 buffer_put_cstring(r, "Permission denied");
811 goto cleanup;
812 }
813 }
814
815 /* enable nonblocking unless tty */
816 if (!isatty(new_fd[0]))
817 set_nonblock(new_fd[0]);
818 if (!isatty(new_fd[1]))
819 set_nonblock(new_fd[1]);
820
821 nc = channel_connect_stdio_fwd(chost, cport, new_fd[0], new_fd[1]);
115 822
116/* ** Multiplexing master support */ 823 nc->ctl_chan = c->self; /* link session -> control channel */
824 c->remote_id = nc->self; /* link control -> session channel */
825
826 debug2("%s: channel_new: %d linked to control channel %d",
827 __func__, nc->self, nc->ctl_chan);
828
829 channel_register_cleanup(nc->self, mux_master_session_cleanup_cb, 0);
830
831 /* prepare reply */
832 /* XXX defer until channel confirmed */
833 buffer_put_int(r, MUX_S_SESSION_OPENED);
834 buffer_put_int(r, rid);
835 buffer_put_int(r, nc->self);
836
837 return 0;
838}
839
840/* Channel callbacks fired on read/write from mux slave fd */
841static int
842mux_master_read_cb(Channel *c)
843{
844 struct mux_master_state *state = (struct mux_master_state *)c->mux_ctx;
845 Buffer in, out;
846 void *ptr;
847 u_int type, rid, have, i;
848 int ret = -1;
849
850 /* Setup ctx and */
851 if (c->mux_ctx == NULL) {
852 state = xcalloc(1, sizeof(state));
853 c->mux_ctx = state;
854 channel_register_cleanup(c->self,
855 mux_master_control_cleanup_cb, 0);
856
857 /* Send hello */
858 buffer_init(&out);
859 buffer_put_int(&out, MUX_MSG_HELLO);
860 buffer_put_int(&out, SSHMUX_VER);
861 /* no extensions */
862 buffer_put_string(&c->output, buffer_ptr(&out),
863 buffer_len(&out));
864 buffer_free(&out);
865 debug3("%s: channel %d: hello sent", __func__, c->self);
866 return 0;
867 }
868
869 buffer_init(&in);
870 buffer_init(&out);
871
872 /* Channel code ensures that we receive whole packets */
873 if ((ptr = buffer_get_string_ptr_ret(&c->input, &have)) == NULL) {
874 malf:
875 error("%s: malformed message", __func__);
876 goto out;
877 }
878 buffer_append(&in, ptr, have);
879
880 if (buffer_get_int_ret(&type, &in) != 0)
881 goto malf;
882 debug3("%s: channel %d packet type 0x%08x len %u",
883 __func__, c->self, type, buffer_len(&in));
884
885 if (type == MUX_MSG_HELLO)
886 rid = 0;
887 else {
888 if (!state->hello_rcvd) {
889 error("%s: expected MUX_MSG_HELLO(0x%08x), "
890 "received 0x%08x", __func__, MUX_MSG_HELLO, type);
891 goto out;
892 }
893 if (buffer_get_int_ret(&rid, &in) != 0)
894 goto malf;
895 }
896
897 for (i = 0; mux_master_handlers[i].handler != NULL; i++) {
898 if (type == mux_master_handlers[i].type) {
899 ret = mux_master_handlers[i].handler(rid, c, &in, &out);
900 break;
901 }
902 }
903 if (mux_master_handlers[i].handler == NULL) {
904 error("%s: unsupported mux message 0x%08x", __func__, type);
905 buffer_put_int(&out, MUX_S_FAILURE);
906 buffer_put_int(&out, rid);
907 buffer_put_cstring(&out, "unsupported request");
908 ret = 0;
909 }
910 /* Enqueue reply packet */
911 if (buffer_len(&out) != 0) {
912 buffer_put_string(&c->output, buffer_ptr(&out),
913 buffer_len(&out));
914 }
915 out:
916 buffer_free(&in);
917 buffer_free(&out);
918 return ret;
919}
920
921void
922mux_exit_message(Channel *c, int exitval)
923{
924 Buffer m;
925 Channel *mux_chan;
926
927 debug3("%s: channel %d: exit message, evitval %d", __func__, c->self,
928 exitval);
929
930 if ((mux_chan = channel_by_id(c->ctl_chan)) == NULL)
931 fatal("%s: channel %d missing mux channel %d",
932 __func__, c->self, c->ctl_chan);
933
934 /* Append exit message packet to control socket output queue */
935 buffer_init(&m);
936 buffer_put_int(&m, MUX_S_EXIT_MESSAGE);
937 buffer_put_int(&m, c->self);
938 buffer_put_int(&m, exitval);
939
940 buffer_put_string(&mux_chan->output, buffer_ptr(&m), buffer_len(&m));
941 buffer_free(&m);
942}
117 943
118/* Prepare a mux master to listen on a Unix domain socket. */ 944/* Prepare a mux master to listen on a Unix domain socket. */
119void 945void
120muxserver_listen(void) 946muxserver_listen(void)
121{ 947{
122 struct sockaddr_un addr; 948 struct sockaddr_un addr;
949 socklen_t sun_len;
123 mode_t old_umask; 950 mode_t old_umask;
124 int addr_len;
125 951
126 if (options.control_path == NULL || 952 if (options.control_path == NULL ||
127 options.control_master == SSHCTL_MASTER_NO) 953 options.control_master == SSHCTL_MASTER_NO)
@@ -131,7 +957,7 @@ muxserver_listen(void)
131 957
132 memset(&addr, '\0', sizeof(addr)); 958 memset(&addr, '\0', sizeof(addr));
133 addr.sun_family = AF_UNIX; 959 addr.sun_family = AF_UNIX;
134 addr_len = offsetof(struct sockaddr_un, sun_path) + 960 sun_len = offsetof(struct sockaddr_un, sun_path) +
135 strlen(options.control_path) + 1; 961 strlen(options.control_path) + 1;
136 962
137 if (strlcpy(addr.sun_path, options.control_path, 963 if (strlcpy(addr.sun_path, options.control_path,
@@ -142,7 +968,7 @@ muxserver_listen(void)
142 fatal("%s socket(): %s", __func__, strerror(errno)); 968 fatal("%s socket(): %s", __func__, strerror(errno));
143 969
144 old_umask = umask(0177); 970 old_umask = umask(0177);
145 if (bind(muxserver_sock, (struct sockaddr *)&addr, addr_len) == -1) { 971 if (bind(muxserver_sock, (struct sockaddr *)&addr, sun_len) == -1) {
146 muxserver_sock = -1; 972 muxserver_sock = -1;
147 if (errno == EINVAL || errno == EADDRINUSE) { 973 if (errno == EINVAL || errno == EADDRINUSE) {
148 error("ControlSocket %s already exists, " 974 error("ControlSocket %s already exists, "
@@ -162,6 +988,14 @@ muxserver_listen(void)
162 fatal("%s listen(): %s", __func__, strerror(errno)); 988 fatal("%s listen(): %s", __func__, strerror(errno));
163 989
164 set_nonblock(muxserver_sock); 990 set_nonblock(muxserver_sock);
991
992 mux_listener_channel = channel_new("mux listener",
993 SSH_CHANNEL_MUX_LISTENER, muxserver_sock, muxserver_sock, -1,
994 CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT,
995 0, addr.sun_path, 1);
996 mux_listener_channel->mux_rcb = mux_master_read_cb;
997 debug3("%s: mux listener channel %d fd %d", __func__,
998 mux_listener_channel->self, mux_listener_channel->sock);
165} 999}
166 1000
167/* Callback on open confirmation in mux master for a mux client session. */ 1001/* Callback on open confirmation in mux master for a mux client session. */
@@ -175,7 +1009,7 @@ mux_session_confirm(int id, void *arg)
175 1009
176 if (cctx == NULL) 1010 if (cctx == NULL)
177 fatal("%s: cctx == NULL", __func__); 1011 fatal("%s: cctx == NULL", __func__);
178 if ((c = channel_lookup(id)) == NULL) 1012 if ((c = channel_by_id(id)) == NULL)
179 fatal("%s: no channel for id %d", __func__, id); 1013 fatal("%s: no channel for id %d", __func__, id);
180 1014
181 display = getenv("DISPLAY"); 1015 display = getenv("DISPLAY");
@@ -210,291 +1044,616 @@ mux_session_confirm(int id, void *arg)
210 xfree(cctx); 1044 xfree(cctx);
211} 1045}
212 1046
1047/* ** Multiplexing client support */
1048
1049/* Exit signal handler */
1050static void
1051control_client_sighandler(int signo)
1052{
1053 muxclient_terminate = signo;
1054}
1055
213/* 1056/*
214 * Accept a connection on the mux master socket and process the 1057 * Relay signal handler - used to pass some signals from mux client to
215 * client's request. Returns flag indicating whether mux master should 1058 * mux master.
216 * begin graceful close.
217 */ 1059 */
218int 1060static void
219muxserver_accept_control(void) 1061control_client_sigrelay(int signo)
220{ 1062{
221 Buffer m; 1063 int save_errno = errno;
222 Channel *c;
223 int client_fd, new_fd[3], ver, allowed, window, packetmax;
224 socklen_t addrlen;
225 struct sockaddr_storage addr;
226 struct mux_session_confirm_ctx *cctx;
227 char *cmd;
228 u_int i, j, len, env_len, mux_command, flags, escape_char;
229 uid_t euid;
230 gid_t egid;
231 int start_close = 0;
232 1064
233 /* 1065 if (muxserver_pid > 1)
234 * Accept connection on control socket 1066 kill(muxserver_pid, signo);
235 */ 1067
236 memset(&addr, 0, sizeof(addr)); 1068 errno = save_errno;
237 addrlen = sizeof(addr); 1069}
238 if ((client_fd = accept(muxserver_sock, 1070
239 (struct sockaddr*)&addr, &addrlen)) == -1) { 1071static int
240 error("%s accept: %s", __func__, strerror(errno)); 1072mux_client_read(int fd, Buffer *b, u_int need)
241 return 0; 1073{
1074 u_int have;
1075 ssize_t len;
1076 u_char *p;
1077 struct pollfd pfd;
1078
1079 pfd.fd = fd;
1080 pfd.events = POLLIN;
1081 p = buffer_append_space(b, need);
1082 for (have = 0; have < need; ) {
1083 if (muxclient_terminate) {
1084 errno = EINTR;
1085 return -1;
1086 }
1087 len = read(fd, p + have, need - have);
1088 if (len < 0) {
1089 switch (errno) {
1090#if defined(EWOULDBLOCK) && (EWOULDBLOCK != EAGAIN)
1091 case EWOULDBLOCK:
1092#endif
1093 case EAGAIN:
1094 (void)poll(&pfd, 1, -1);
1095 /* FALLTHROUGH */
1096 case EINTR:
1097 continue;
1098 default:
1099 return -1;
1100 }
1101 }
1102 if (len == 0) {
1103 errno = EPIPE;
1104 return -1;
1105 }
1106 have += (u_int)len;
242 } 1107 }
1108 return 0;
1109}
243 1110
244 if (getpeereid(client_fd, &euid, &egid) < 0) { 1111static int
245 error("%s getpeereid failed: %s", __func__, strerror(errno)); 1112mux_client_write_packet(int fd, Buffer *m)
246 close(client_fd); 1113{
247 return 0; 1114 Buffer queue;
1115 u_int have, need;
1116 int oerrno, len;
1117 u_char *ptr;
1118 struct pollfd pfd;
1119
1120 pfd.fd = fd;
1121 pfd.events = POLLOUT;
1122 buffer_init(&queue);
1123 buffer_put_string(&queue, buffer_ptr(m), buffer_len(m));
1124
1125 need = buffer_len(&queue);
1126 ptr = buffer_ptr(&queue);
1127
1128 for (have = 0; have < need; ) {
1129 if (muxclient_terminate) {
1130 buffer_free(&queue);
1131 errno = EINTR;
1132 return -1;
1133 }
1134 len = write(fd, ptr + have, need - have);
1135 if (len < 0) {
1136 switch (errno) {
1137#if defined(EWOULDBLOCK) && (EWOULDBLOCK != EAGAIN)
1138 case EWOULDBLOCK:
1139#endif
1140 case EAGAIN:
1141 (void)poll(&pfd, 1, -1);
1142 /* FALLTHROUGH */
1143 case EINTR:
1144 continue;
1145 default:
1146 oerrno = errno;
1147 buffer_free(&queue);
1148 errno = oerrno;
1149 return -1;
1150 }
1151 }
1152 if (len == 0) {
1153 buffer_free(&queue);
1154 errno = EPIPE;
1155 return -1;
1156 }
1157 have += (u_int)len;
248 } 1158 }
249 if ((euid != 0) && (getuid() != euid)) { 1159 buffer_free(&queue);
250 error("control mode uid mismatch: peer euid %u != uid %u", 1160 return 0;
251 (u_int) euid, (u_int) getuid()); 1161}
252 close(client_fd); 1162
253 return 0; 1163static int
1164mux_client_read_packet(int fd, Buffer *m)
1165{
1166 Buffer queue;
1167 u_int need, have;
1168 void *ptr;
1169 int oerrno;
1170
1171 buffer_init(&queue);
1172 if (mux_client_read(fd, &queue, 4) != 0) {
1173 if ((oerrno = errno) == EPIPE)
1174 debug3("%s: read header failed: %s", __func__, strerror(errno));
1175 errno = oerrno;
1176 return -1;
254 } 1177 }
1178 need = get_u32(buffer_ptr(&queue));
1179 if (mux_client_read(fd, &queue, need) != 0) {
1180 oerrno = errno;
1181 debug3("%s: read body failed: %s", __func__, strerror(errno));
1182 errno = oerrno;
1183 return -1;
1184 }
1185 ptr = buffer_get_string_ptr(&queue, &have);
1186 buffer_append(m, ptr, have);
1187 buffer_free(&queue);
1188 return 0;
1189}
255 1190
256 /* XXX handle asynchronously */ 1191static int
257 unset_nonblock(client_fd); 1192mux_client_hello_exchange(int fd)
1193{
1194 Buffer m;
1195 u_int type, ver;
258 1196
259 /* Read command */
260 buffer_init(&m); 1197 buffer_init(&m);
261 if (ssh_msg_recv(client_fd, &m) == -1) { 1198 buffer_put_int(&m, MUX_MSG_HELLO);
262 error("%s: client msg_recv failed", __func__); 1199 buffer_put_int(&m, SSHMUX_VER);
263 close(client_fd); 1200 /* no extensions */
1201
1202 if (mux_client_write_packet(fd, &m) != 0)
1203 fatal("%s: write packet: %s", __func__, strerror(errno));
1204
1205 buffer_clear(&m);
1206
1207 /* Read their HELLO */
1208 if (mux_client_read_packet(fd, &m) != 0) {
264 buffer_free(&m); 1209 buffer_free(&m);
265 return 0; 1210 return -1;
1211 }
1212
1213 type = buffer_get_int(&m);
1214 if (type != MUX_MSG_HELLO)
1215 fatal("%s: expected HELLO (%u) received %u",
1216 __func__, MUX_MSG_HELLO, type);
1217 ver = buffer_get_int(&m);
1218 if (ver != SSHMUX_VER)
1219 fatal("Unsupported multiplexing protocol version %d "
1220 "(expected %d)", ver, SSHMUX_VER);
1221 debug2("%s: master version %u", __func__, ver);
1222 /* No extensions are presently defined */
1223 while (buffer_len(&m) > 0) {
1224 char *name = buffer_get_string(&m, NULL);
1225 char *value = buffer_get_string(&m, NULL);
1226
1227 debug2("Unrecognised master extension \"%s\"", name);
1228 xfree(name);
1229 xfree(value);
266 } 1230 }
267 if ((ver = buffer_get_char(&m)) != SSHMUX_VER) { 1231 buffer_free(&m);
268 error("%s: wrong client version %d", __func__, ver); 1232 return 0;
1233}
1234
1235static u_int
1236mux_client_request_alive(int fd)
1237{
1238 Buffer m;
1239 char *e;
1240 u_int pid, type, rid;
1241
1242 debug3("%s: entering", __func__);
1243
1244 buffer_init(&m);
1245 buffer_put_int(&m, MUX_C_ALIVE_CHECK);
1246 buffer_put_int(&m, muxclient_request_id);
1247
1248 if (mux_client_write_packet(fd, &m) != 0)
1249 fatal("%s: write packet: %s", __func__, strerror(errno));
1250
1251 buffer_clear(&m);
1252
1253 /* Read their reply */
1254 if (mux_client_read_packet(fd, &m) != 0) {
269 buffer_free(&m); 1255 buffer_free(&m);
270 close(client_fd);
271 return 0; 1256 return 0;
272 } 1257 }
273 1258
274 allowed = 1; 1259 type = buffer_get_int(&m);
275 mux_command = buffer_get_int(&m); 1260 if (type != MUX_S_ALIVE) {
276 flags = buffer_get_int(&m); 1261 e = buffer_get_string(&m, NULL);
1262 fatal("%s: master returned error: %s", __func__, e);
1263 }
1264
1265 if ((rid = buffer_get_int(&m)) != muxclient_request_id)
1266 fatal("%s: out of sequence reply: my id %u theirs %u",
1267 __func__, muxclient_request_id, rid);
1268 pid = buffer_get_int(&m);
1269 buffer_free(&m);
1270
1271 debug3("%s: done pid = %u", __func__, pid);
1272
1273 muxclient_request_id++;
1274
1275 return pid;
1276}
1277
1278static void
1279mux_client_request_terminate(int fd)
1280{
1281 Buffer m;
1282 char *e;
1283 u_int type, rid;
1284
1285 debug3("%s: entering", __func__);
1286
1287 buffer_init(&m);
1288 buffer_put_int(&m, MUX_C_TERMINATE);
1289 buffer_put_int(&m, muxclient_request_id);
1290
1291 if (mux_client_write_packet(fd, &m) != 0)
1292 fatal("%s: write packet: %s", __func__, strerror(errno));
277 1293
278 buffer_clear(&m); 1294 buffer_clear(&m);
279 1295
280 switch (mux_command) { 1296 /* Read their reply */
281 case SSHMUX_COMMAND_OPEN: 1297 if (mux_client_read_packet(fd, &m) != 0) {
282 if (options.control_master == SSHCTL_MASTER_ASK || 1298 /* Remote end exited already */
283 options.control_master == SSHCTL_MASTER_AUTO_ASK) 1299 if (errno == EPIPE) {
284 allowed = ask_permission("Allow shared connection "
285 "to %s? ", host);
286 /* continue below */
287 break;
288 case SSHMUX_COMMAND_TERMINATE:
289 if (options.control_master == SSHCTL_MASTER_ASK ||
290 options.control_master == SSHCTL_MASTER_AUTO_ASK)
291 allowed = ask_permission("Terminate shared connection "
292 "to %s? ", host);
293 if (allowed)
294 start_close = 1;
295 /* FALLTHROUGH */
296 case SSHMUX_COMMAND_ALIVE_CHECK:
297 /* Reply for SSHMUX_COMMAND_TERMINATE and ALIVE_CHECK */
298 buffer_clear(&m);
299 buffer_put_int(&m, allowed);
300 buffer_put_int(&m, getpid());
301 if (ssh_msg_send(client_fd, SSHMUX_VER, &m) == -1) {
302 error("%s: client msg_send failed", __func__);
303 close(client_fd);
304 buffer_free(&m); 1300 buffer_free(&m);
305 return start_close; 1301 return;
306 } 1302 }
307 buffer_free(&m); 1303 fatal("%s: read from master failed: %s",
308 close(client_fd); 1304 __func__, strerror(errno));
309 return start_close; 1305 }
1306
1307 type = buffer_get_int(&m);
1308 if ((rid = buffer_get_int(&m)) != muxclient_request_id)
1309 fatal("%s: out of sequence reply: my id %u theirs %u",
1310 __func__, muxclient_request_id, rid);
1311 switch (type) {
1312 case MUX_S_OK:
1313 break;
1314 case MUX_S_PERMISSION_DENIED:
1315 e = buffer_get_string(&m, NULL);
1316 fatal("Master refused termination request: %s", e);
1317 case MUX_S_FAILURE:
1318 e = buffer_get_string(&m, NULL);
1319 fatal("%s: termination request failed: %s", __func__, e);
310 default: 1320 default:
311 error("Unsupported command %d", mux_command); 1321 fatal("%s: unexpected response from master 0x%08x",
312 buffer_free(&m); 1322 __func__, type);
313 close(client_fd);
314 return 0;
315 } 1323 }
1324 buffer_free(&m);
1325 muxclient_request_id++;
1326}
1327
1328static int
1329mux_client_request_forward(int fd, u_int ftype, Forward *fwd)
1330{
1331 Buffer m;
1332 char *e, *fwd_desc;
1333 u_int type, rid;
1334
1335 fwd_desc = format_forward(ftype, fwd);
1336 debug("Requesting %s", fwd_desc);
1337 xfree(fwd_desc);
1338
1339 buffer_init(&m);
1340 buffer_put_int(&m, MUX_C_OPEN_FWD);
1341 buffer_put_int(&m, muxclient_request_id);
1342 buffer_put_int(&m, ftype);
1343 buffer_put_cstring(&m,
1344 fwd->listen_host == NULL ? "" : fwd->listen_host);
1345 buffer_put_int(&m, fwd->listen_port);
1346 buffer_put_cstring(&m,
1347 fwd->connect_host == NULL ? "" : fwd->connect_host);
1348 buffer_put_int(&m, fwd->connect_port);
1349
1350 if (mux_client_write_packet(fd, &m) != 0)
1351 fatal("%s: write packet: %s", __func__, strerror(errno));
316 1352
317 /* Reply for SSHMUX_COMMAND_OPEN */
318 buffer_clear(&m); 1353 buffer_clear(&m);
319 buffer_put_int(&m, allowed); 1354
320 buffer_put_int(&m, getpid()); 1355 /* Read their reply */
321 if (ssh_msg_send(client_fd, SSHMUX_VER, &m) == -1) { 1356 if (mux_client_read_packet(fd, &m) != 0) {
322 error("%s: client msg_send failed", __func__);
323 close(client_fd);
324 buffer_free(&m); 1357 buffer_free(&m);
325 return 0; 1358 return -1;
326 } 1359 }
327 1360
328 if (!allowed) { 1361 type = buffer_get_int(&m);
329 error("Refused control connection"); 1362 if ((rid = buffer_get_int(&m)) != muxclient_request_id)
330 close(client_fd); 1363 fatal("%s: out of sequence reply: my id %u theirs %u",
1364 __func__, muxclient_request_id, rid);
1365 switch (type) {
1366 case MUX_S_OK:
1367 break;
1368 case MUX_S_PERMISSION_DENIED:
1369 e = buffer_get_string(&m, NULL);
331 buffer_free(&m); 1370 buffer_free(&m);
332 return 0; 1371 error("Master refused forwarding request: %s", e);
1372 return -1;
1373 case MUX_S_FAILURE:
1374 e = buffer_get_string(&m, NULL);
1375 buffer_free(&m);
1376 error("%s: session request failed: %s", __func__, e);
1377 return -1;
1378 default:
1379 fatal("%s: unexpected response from master 0x%08x",
1380 __func__, type);
333 } 1381 }
1382 buffer_free(&m);
334 1383
335 buffer_clear(&m); 1384 muxclient_request_id++;
336 if (ssh_msg_recv(client_fd, &m) == -1) { 1385 return 0;
337 error("%s: client msg_recv failed", __func__); 1386}
338 close(client_fd); 1387
339 buffer_free(&m); 1388static int
340 return 0; 1389mux_client_request_forwards(int fd)
1390{
1391 int i;
1392
1393 debug3("%s: requesting forwardings: %d local, %d remote", __func__,
1394 options.num_local_forwards, options.num_remote_forwards);
1395
1396 /* XXX ExitOnForwardingFailure */
1397 for (i = 0; i < options.num_local_forwards; i++) {
1398 if (mux_client_request_forward(fd,
1399 options.local_forwards[i].connect_port == 0 ?
1400 MUX_FWD_DYNAMIC : MUX_FWD_LOCAL,
1401 options.local_forwards + i) != 0)
1402 return -1;
341 } 1403 }
342 if ((ver = buffer_get_char(&m)) != SSHMUX_VER) { 1404 for (i = 0; i < options.num_remote_forwards; i++) {
343 error("%s: wrong client version %d", __func__, ver); 1405 if (mux_client_request_forward(fd, MUX_FWD_REMOTE,
344 buffer_free(&m); 1406 options.remote_forwards + i) != 0)
345 close(client_fd); 1407 return -1;
346 return 0;
347 } 1408 }
1409 return 0;
1410}
348 1411
349 cctx = xcalloc(1, sizeof(*cctx)); 1412static int
350 cctx->want_tty = (flags & SSHMUX_FLAG_TTY) != 0; 1413mux_client_request_session(int fd)
351 cctx->want_subsys = (flags & SSHMUX_FLAG_SUBSYS) != 0; 1414{
352 cctx->want_x_fwd = (flags & SSHMUX_FLAG_X11_FWD) != 0; 1415 Buffer m;
353 cctx->want_agent_fwd = (flags & SSHMUX_FLAG_AGENT_FWD) != 0; 1416 char *e, *term;
354 cctx->term = buffer_get_string(&m, &len); 1417 u_int i, rid, sid, esid, exitval, type, exitval_seen;
355 escape_char = buffer_get_int(&m); 1418 extern char **environ;
356 1419 int devnull;
357 cmd = buffer_get_string(&m, &len); 1420
358 buffer_init(&cctx->cmd); 1421 debug3("%s: entering", __func__);
359 buffer_append(&cctx->cmd, cmd, strlen(cmd));
360 1422
361 env_len = buffer_get_int(&m); 1423 if ((muxserver_pid = mux_client_request_alive(fd)) == 0) {
362 env_len = MIN(env_len, 4096); 1424 error("%s: master alive request failed", __func__);
363 debug3("%s: receiving %d env vars", __func__, env_len); 1425 return -1;
364 if (env_len != 0) {
365 cctx->env = xcalloc(env_len + 1, sizeof(*cctx->env));
366 for (i = 0; i < env_len; i++)
367 cctx->env[i] = buffer_get_string(&m, &len);
368 cctx->env[i] = NULL;
369 } 1426 }
370 1427
371 debug2("%s: accepted tty %d, subsys %d, cmd %s", __func__, 1428 signal(SIGPIPE, SIG_IGN);
372 cctx->want_tty, cctx->want_subsys, cmd);
373 xfree(cmd);
374 1429
375 /* Gather fds from client */ 1430 if (stdin_null_flag) {
376 for(i = 0; i < 3; i++) { 1431 if ((devnull = open(_PATH_DEVNULL, O_RDONLY)) == -1)
377 if ((new_fd[i] = mm_receive_fd(client_fd)) == -1) { 1432 fatal("open(/dev/null): %s", strerror(errno));
378 error("%s: failed to receive fd %d from slave", 1433 if (dup2(devnull, STDIN_FILENO) == -1)
379 __func__, i); 1434 fatal("dup2: %s", strerror(errno));
380 for (j = 0; j < i; j++) 1435 if (devnull > STDERR_FILENO)
381 close(new_fd[j]); 1436 close(devnull);
382 for (j = 0; j < env_len; j++) 1437 }
383 xfree(cctx->env[j]); 1438
384 if (env_len > 0) 1439 term = getenv("TERM");
385 xfree(cctx->env); 1440
386 xfree(cctx->term); 1441 buffer_init(&m);
387 buffer_free(&cctx->cmd); 1442 buffer_put_int(&m, MUX_C_NEW_SESSION);
388 close(client_fd); 1443 buffer_put_int(&m, muxclient_request_id);
389 xfree(cctx); 1444 buffer_put_cstring(&m, ""); /* reserved */
390 return 0; 1445 buffer_put_int(&m, tty_flag);
1446 buffer_put_int(&m, options.forward_x11);
1447 buffer_put_int(&m, options.forward_agent);
1448 buffer_put_int(&m, subsystem_flag);
1449 buffer_put_int(&m, options.escape_char == SSH_ESCAPECHAR_NONE ?
1450 0xffffffff : (u_int)options.escape_char);
1451 buffer_put_cstring(&m, term == NULL ? "" : term);
1452 buffer_put_string(&m, buffer_ptr(&command), buffer_len(&command));
1453
1454 if (options.num_send_env > 0 && environ != NULL) {
1455 /* Pass environment */
1456 for (i = 0; environ[i] != NULL; i++) {
1457 if (env_permitted(environ[i])) {
1458 buffer_put_cstring(&m, environ[i]);
1459 }
391 } 1460 }
392 } 1461 }
393 1462
394 debug2("%s: got fds stdin %d, stdout %d, stderr %d", __func__, 1463 if (mux_client_write_packet(fd, &m) != 0)
395 new_fd[0], new_fd[1], new_fd[2]); 1464 fatal("%s: write packet: %s", __func__, strerror(errno));
396 1465
397 /* Try to pick up ttymodes from client before it goes raw */ 1466 /* Send the stdio file descriptors */
398 if (cctx->want_tty && tcgetattr(new_fd[0], &cctx->tio) == -1) 1467 if (mm_send_fd(fd, STDIN_FILENO) == -1 ||
399 error("%s: tcgetattr: %s", __func__, strerror(errno)); 1468 mm_send_fd(fd, STDOUT_FILENO) == -1 ||
1469 mm_send_fd(fd, STDERR_FILENO) == -1)
1470 fatal("%s: send fds failed", __func__);
1471
1472 debug3("%s: session request sent", __func__);
400 1473
401 /* This roundtrip is just for synchronisation of ttymodes */ 1474 /* Read their reply */
402 buffer_clear(&m); 1475 buffer_clear(&m);
403 if (ssh_msg_send(client_fd, SSHMUX_VER, &m) == -1) { 1476 if (mux_client_read_packet(fd, &m) != 0) {
404 error("%s: client msg_send failed", __func__); 1477 error("%s: read from master failed: %s",
405 close(client_fd); 1478 __func__, strerror(errno));
406 close(new_fd[0]);
407 close(new_fd[1]);
408 close(new_fd[2]);
409 buffer_free(&m); 1479 buffer_free(&m);
410 xfree(cctx->term); 1480 return -1;
411 if (env_len != 0) {
412 for (i = 0; i < env_len; i++)
413 xfree(cctx->env[i]);
414 xfree(cctx->env);
415 }
416 return 0;
417 } 1481 }
418 buffer_free(&m);
419 1482
420 /* enable nonblocking unless tty */ 1483 type = buffer_get_int(&m);
421 if (!isatty(new_fd[0])) 1484 if ((rid = buffer_get_int(&m)) != muxclient_request_id)
422 set_nonblock(new_fd[0]); 1485 fatal("%s: out of sequence reply: my id %u theirs %u",
423 if (!isatty(new_fd[1])) 1486 __func__, muxclient_request_id, rid);
424 set_nonblock(new_fd[1]); 1487 switch (type) {
425 if (!isatty(new_fd[2])) 1488 case MUX_S_SESSION_OPENED:
426 set_nonblock(new_fd[2]); 1489 sid = buffer_get_int(&m);
1490 debug("%s: master session id: %u", __func__, sid);
1491 break;
1492 case MUX_S_PERMISSION_DENIED:
1493 e = buffer_get_string(&m, NULL);
1494 buffer_free(&m);
1495 error("Master refused forwarding request: %s", e);
1496 return -1;
1497 case MUX_S_FAILURE:
1498 e = buffer_get_string(&m, NULL);
1499 buffer_free(&m);
1500 error("%s: forwarding request failed: %s", __func__, e);
1501 return -1;
1502 default:
1503 buffer_free(&m);
1504 error("%s: unexpected response from master 0x%08x",
1505 __func__, type);
1506 return -1;
1507 }
1508 muxclient_request_id++;
427 1509
428 set_nonblock(client_fd); 1510 signal(SIGHUP, control_client_sighandler);
1511 signal(SIGINT, control_client_sighandler);
1512 signal(SIGTERM, control_client_sighandler);
1513 signal(SIGWINCH, control_client_sigrelay);
429 1514
430 window = CHAN_SES_WINDOW_DEFAULT; 1515 if (tty_flag)
431 packetmax = CHAN_SES_PACKET_DEFAULT; 1516 enter_raw_mode(force_tty_flag);
432 if (cctx->want_tty) {
433 window >>= 1;
434 packetmax >>= 1;
435 }
436
437 c = channel_new("session", SSH_CHANNEL_OPENING,
438 new_fd[0], new_fd[1], new_fd[2], window, packetmax,
439 CHAN_EXTENDED_WRITE, "client-session", /*nonblock*/0);
440 1517
441 c->ctl_fd = client_fd; 1518 /*
442 if (cctx->want_tty && escape_char != 0xffffffff) { 1519 * Stick around until the controlee closes the client_fd.
443 channel_register_filter(c->self, 1520 * Before it does, it is expected to write an exit message.
444 client_simple_escape_filter, NULL, 1521 * This process must read the value and wait for the closure of
445 client_filter_cleanup, 1522 * the client_fd; if this one closes early, the multiplex master will
446 client_new_escape_filter_ctx((int)escape_char)); 1523 * terminate early too (possibly losing data).
1524 */
1525 for (exitval = 255, exitval_seen = 0;;) {
1526 buffer_clear(&m);
1527 if (mux_client_read_packet(fd, &m) != 0)
1528 break;
1529 type = buffer_get_int(&m);
1530 if (type != MUX_S_EXIT_MESSAGE) {
1531 e = buffer_get_string(&m, NULL);
1532 fatal("%s: master returned error: %s", __func__, e);
1533 }
1534 if ((esid = buffer_get_int(&m)) != sid)
1535 fatal("%s: exit on unknown session: my id %u theirs %u",
1536 __func__, sid, esid);
1537 debug("%s: master session id: %u", __func__, sid);
1538 if (exitval_seen)
1539 fatal("%s: exitval sent twice", __func__);
1540 exitval = buffer_get_int(&m);
1541 exitval_seen = 1;
447 } 1542 }
448 1543
449 debug3("%s: channel_new: %d", __func__, c->self); 1544 close(fd);
1545 leave_raw_mode(force_tty_flag);
450 1546
451 channel_send_open(c->self); 1547 if (muxclient_terminate) {
452 channel_register_open_confirm(c->self, mux_session_confirm, cctx); 1548 debug2("Exiting on signal %d", muxclient_terminate);
453 return 0; 1549 exitval = 255;
454} 1550 } else if (!exitval_seen) {
1551 debug2("Control master terminated unexpectedly");
1552 exitval = 255;
1553 } else
1554 debug2("Received exit status from master %d", exitval);
455 1555
456/* ** Multiplexing client support */ 1556 if (tty_flag && options.log_level > SYSLOG_LEVEL_QUIET)
1557 fprintf(stderr, "Shared connection to %s closed.\r\n", host);
457 1558
458/* Exit signal handler */ 1559 exit(exitval);
459static void
460control_client_sighandler(int signo)
461{
462 muxclient_terminate = signo;
463} 1560}
464 1561
465/* 1562static int
466 * Relay signal handler - used to pass some signals from mux client to 1563mux_client_request_stdio_fwd(int fd)
467 * mux master.
468 */
469static void
470control_client_sigrelay(int signo)
471{ 1564{
472 int save_errno = errno; 1565 Buffer m;
1566 char *e;
1567 u_int type, rid, sid;
1568 int devnull;
473 1569
474 if (muxserver_pid > 1) 1570 debug3("%s: entering", __func__);
475 kill(muxserver_pid, signo);
476 1571
477 errno = save_errno; 1572 if ((muxserver_pid = mux_client_request_alive(fd)) == 0) {
478} 1573 error("%s: master alive request failed", __func__);
1574 return -1;
1575 }
479 1576
480/* Check mux client environment variables before passing them to mux master. */ 1577 signal(SIGPIPE, SIG_IGN);
481static int
482env_permitted(char *env)
483{
484 int i, ret;
485 char name[1024], *cp;
486 1578
487 if ((cp = strchr(env, '=')) == NULL || cp == env) 1579 if (stdin_null_flag) {
488 return (0); 1580 if ((devnull = open(_PATH_DEVNULL, O_RDONLY)) == -1)
489 ret = snprintf(name, sizeof(name), "%.*s", (int)(cp - env), env); 1581 fatal("open(/dev/null): %s", strerror(errno));
490 if (ret <= 0 || (size_t)ret >= sizeof(name)) 1582 if (dup2(devnull, STDIN_FILENO) == -1)
491 fatal("env_permitted: name '%.100s...' too long", env); 1583 fatal("dup2: %s", strerror(errno));
1584 if (devnull > STDERR_FILENO)
1585 close(devnull);
1586 }
492 1587
493 for (i = 0; i < options.num_send_env; i++) 1588 buffer_init(&m);
494 if (match_pattern(name, options.send_env[i])) 1589 buffer_put_int(&m, MUX_C_NEW_STDIO_FWD);
495 return (1); 1590 buffer_put_int(&m, muxclient_request_id);
1591 buffer_put_cstring(&m, ""); /* reserved */
1592 buffer_put_cstring(&m, stdio_forward_host);
1593 buffer_put_int(&m, stdio_forward_port);
1594
1595 if (mux_client_write_packet(fd, &m) != 0)
1596 fatal("%s: write packet: %s", __func__, strerror(errno));
1597
1598 /* Send the stdio file descriptors */
1599 if (mm_send_fd(fd, STDIN_FILENO) == -1 ||
1600 mm_send_fd(fd, STDOUT_FILENO) == -1)
1601 fatal("%s: send fds failed", __func__);
1602
1603 debug3("%s: stdio forward request sent", __func__);
1604
1605 /* Read their reply */
1606 buffer_clear(&m);
1607
1608 if (mux_client_read_packet(fd, &m) != 0) {
1609 error("%s: read from master failed: %s",
1610 __func__, strerror(errno));
1611 buffer_free(&m);
1612 return -1;
1613 }
1614
1615 type = buffer_get_int(&m);
1616 if ((rid = buffer_get_int(&m)) != muxclient_request_id)
1617 fatal("%s: out of sequence reply: my id %u theirs %u",
1618 __func__, muxclient_request_id, rid);
1619 switch (type) {
1620 case MUX_S_SESSION_OPENED:
1621 sid = buffer_get_int(&m);
1622 debug("%s: master session id: %u", __func__, sid);
1623 break;
1624 case MUX_S_PERMISSION_DENIED:
1625 e = buffer_get_string(&m, NULL);
1626 buffer_free(&m);
1627 fatal("Master refused forwarding request: %s", e);
1628 case MUX_S_FAILURE:
1629 e = buffer_get_string(&m, NULL);
1630 buffer_free(&m);
1631 fatal("%s: stdio forwarding request failed: %s", __func__, e);
1632 default:
1633 buffer_free(&m);
1634 error("%s: unexpected response from master 0x%08x",
1635 __func__, type);
1636 return -1;
1637 }
1638 muxclient_request_id++;
1639
1640 signal(SIGHUP, control_client_sighandler);
1641 signal(SIGINT, control_client_sighandler);
1642 signal(SIGTERM, control_client_sighandler);
1643 signal(SIGWINCH, control_client_sigrelay);
496 1644
497 return (0); 1645 /*
1646 * Stick around until the controlee closes the client_fd.
1647 */
1648 buffer_clear(&m);
1649 if (mux_client_read_packet(fd, &m) != 0) {
1650 if (errno == EPIPE ||
1651 (errno == EINTR && muxclient_terminate != 0))
1652 return 0;
1653 fatal("%s: mux_client_read_packet: %s",
1654 __func__, strerror(errno));
1655 }
1656 fatal("%s: master returned unexpected message %u", __func__, type);
498} 1657}
499 1658
500/* Multiplex client main loop. */ 1659/* Multiplex client main loop. */
@@ -502,14 +1661,16 @@ void
502muxclient(const char *path) 1661muxclient(const char *path)
503{ 1662{
504 struct sockaddr_un addr; 1663 struct sockaddr_un addr;
505 int i, r, fd, sock, exitval[2], num_env, addr_len; 1664 socklen_t sun_len;
506 Buffer m; 1665 int sock;
507 char *term; 1666 u_int pid;
508 extern char **environ;
509 u_int allowed, flags;
510 1667
511 if (muxclient_command == 0) 1668 if (muxclient_command == 0) {
512 muxclient_command = SSHMUX_COMMAND_OPEN; 1669 if (stdio_forward_host != NULL)
1670 muxclient_command = SSHMUX_COMMAND_STDIO_FWD;
1671 else
1672 muxclient_command = SSHMUX_COMMAND_OPEN;
1673 }
513 1674
514 switch (options.control_master) { 1675 switch (options.control_master) {
515 case SSHCTL_MASTER_AUTO: 1676 case SSHCTL_MASTER_AUTO:
@@ -524,7 +1685,7 @@ muxclient(const char *path)
524 1685
525 memset(&addr, '\0', sizeof(addr)); 1686 memset(&addr, '\0', sizeof(addr));
526 addr.sun_family = AF_UNIX; 1687 addr.sun_family = AF_UNIX;
527 addr_len = offsetof(struct sockaddr_un, sun_path) + 1688 sun_len = offsetof(struct sockaddr_un, sun_path) +
528 strlen(path) + 1; 1689 strlen(path) + 1;
529 1690
530 if (strlcpy(addr.sun_path, path, 1691 if (strlcpy(addr.sun_path, path,
@@ -534,8 +1695,12 @@ muxclient(const char *path)
534 if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) 1695 if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0)
535 fatal("%s socket(): %s", __func__, strerror(errno)); 1696 fatal("%s socket(): %s", __func__, strerror(errno));
536 1697
537 if (connect(sock, (struct sockaddr *)&addr, addr_len) == -1) { 1698 if (connect(sock, (struct sockaddr *)&addr, sun_len) == -1) {
538 if (muxclient_command != SSHMUX_COMMAND_OPEN) { 1699 switch (muxclient_command) {
1700 case SSHMUX_COMMAND_OPEN:
1701 case SSHMUX_COMMAND_STDIO_FWD:
1702 break;
1703 default:
539 fatal("Control socket connect(%.100s): %s", path, 1704 fatal("Control socket connect(%.100s): %s", path,
540 strerror(errno)); 1705 strerror(errno));
541 } 1706 }
@@ -548,181 +1713,35 @@ muxclient(const char *path)
548 close(sock); 1713 close(sock);
549 return; 1714 return;
550 } 1715 }
1716 set_nonblock(sock);
551 1717
552 if (stdin_null_flag) { 1718 if (mux_client_hello_exchange(sock) != 0) {
553 if ((fd = open(_PATH_DEVNULL, O_RDONLY)) == -1) 1719 error("%s: master hello exchange failed", __func__);
554 fatal("open(/dev/null): %s", strerror(errno));
555 if (dup2(fd, STDIN_FILENO) == -1)
556 fatal("dup2: %s", strerror(errno));
557 if (fd > STDERR_FILENO)
558 close(fd);
559 }
560
561 term = getenv("TERM");
562
563 flags = 0;
564 if (tty_flag)
565 flags |= SSHMUX_FLAG_TTY;
566 if (subsystem_flag)
567 flags |= SSHMUX_FLAG_SUBSYS;
568 if (options.forward_x11)
569 flags |= SSHMUX_FLAG_X11_FWD;
570 if (options.forward_agent)
571 flags |= SSHMUX_FLAG_AGENT_FWD;
572
573 signal(SIGPIPE, SIG_IGN);
574
575 buffer_init(&m);
576
577 /* Send our command to server */
578 buffer_put_int(&m, muxclient_command);
579 buffer_put_int(&m, flags);
580 if (ssh_msg_send(sock, SSHMUX_VER, &m) == -1) {
581 error("%s: msg_send", __func__);
582 muxerr:
583 close(sock); 1720 close(sock);
584 buffer_free(&m);
585 if (muxclient_command != SSHMUX_COMMAND_OPEN)
586 cleanup_exit(255);
587 logit("Falling back to non-multiplexed connection");
588 xfree(options.control_path);
589 options.control_path = NULL;
590 options.control_master = SSHCTL_MASTER_NO;
591 return; 1721 return;
592 } 1722 }
593 buffer_clear(&m);
594
595 /* Get authorisation status and PID of controlee */
596 if (ssh_msg_recv(sock, &m) == -1) {
597 error("%s: Did not receive reply from master", __func__);
598 goto muxerr;
599 }
600 if (buffer_get_char(&m) != SSHMUX_VER) {
601 error("%s: Master replied with wrong version", __func__);
602 goto muxerr;
603 }
604 if (buffer_get_int_ret(&allowed, &m) != 0) {
605 error("%s: bad server reply", __func__);
606 goto muxerr;
607 }
608 if (allowed != 1) {
609 error("Connection to master denied");
610 goto muxerr;
611 }
612 muxserver_pid = buffer_get_int(&m);
613
614 buffer_clear(&m);
615 1723
616 switch (muxclient_command) { 1724 switch (muxclient_command) {
617 case SSHMUX_COMMAND_ALIVE_CHECK: 1725 case SSHMUX_COMMAND_ALIVE_CHECK:
618 fprintf(stderr, "Master running (pid=%d)\r\n", 1726 if ((pid = mux_client_request_alive(sock)) == 0)
619 muxserver_pid); 1727 fatal("%s: master alive check failed", __func__);
1728 fprintf(stderr, "Master running (pid=%d)\r\n", pid);
620 exit(0); 1729 exit(0);
621 case SSHMUX_COMMAND_TERMINATE: 1730 case SSHMUX_COMMAND_TERMINATE:
1731 mux_client_request_terminate(sock);
622 fprintf(stderr, "Exit request sent.\r\n"); 1732 fprintf(stderr, "Exit request sent.\r\n");
623 exit(0); 1733 exit(0);
624 case SSHMUX_COMMAND_OPEN: 1734 case SSHMUX_COMMAND_OPEN:
625 buffer_put_cstring(&m, term ? term : ""); 1735 if (mux_client_request_forwards(sock) != 0) {
626 if (options.escape_char == SSH_ESCAPECHAR_NONE) 1736 error("%s: master forward request failed", __func__);
627 buffer_put_int(&m, 0xffffffff); 1737 return;
628 else
629 buffer_put_int(&m, options.escape_char);
630 buffer_append(&command, "\0", 1);
631 buffer_put_cstring(&m, buffer_ptr(&command));
632
633 if (options.num_send_env == 0 || environ == NULL) {
634 buffer_put_int(&m, 0);
635 } else {
636 /* Pass environment */
637 num_env = 0;
638 for (i = 0; environ[i] != NULL; i++) {
639 if (env_permitted(environ[i]))
640 num_env++; /* Count */
641 }
642 buffer_put_int(&m, num_env);
643 for (i = 0; environ[i] != NULL && num_env >= 0; i++) {
644 if (env_permitted(environ[i])) {
645 num_env--;
646 buffer_put_cstring(&m, environ[i]);
647 }
648 }
649 } 1738 }
650 break; 1739 mux_client_request_session(sock);
1740 return;
1741 case SSHMUX_COMMAND_STDIO_FWD:
1742 mux_client_request_stdio_fwd(sock);
1743 exit(0);
651 default: 1744 default:
652 fatal("unrecognised muxclient_command %d", muxclient_command); 1745 fatal("unrecognised muxclient_command %d", muxclient_command);
653 } 1746 }
654
655 if (ssh_msg_send(sock, SSHMUX_VER, &m) == -1) {
656 error("%s: msg_send", __func__);
657 goto muxerr;
658 }
659
660 if (mm_send_fd(sock, STDIN_FILENO) == -1 ||
661 mm_send_fd(sock, STDOUT_FILENO) == -1 ||
662 mm_send_fd(sock, STDERR_FILENO) == -1) {
663 error("%s: send fds failed", __func__);
664 goto muxerr;
665 }
666
667 /*
668 * Mux errors are non-recoverable from this point as the master
669 * has ownership of the session now.
670 */
671
672 /* Wait for reply, so master has a chance to gather ttymodes */
673 buffer_clear(&m);
674 if (ssh_msg_recv(sock, &m) == -1)
675 fatal("%s: msg_recv", __func__);
676 if (buffer_get_char(&m) != SSHMUX_VER)
677 fatal("%s: wrong version", __func__);
678 buffer_free(&m);
679
680 signal(SIGHUP, control_client_sighandler);
681 signal(SIGINT, control_client_sighandler);
682 signal(SIGTERM, control_client_sighandler);
683 signal(SIGWINCH, control_client_sigrelay);
684
685 if (tty_flag)
686 enter_raw_mode();
687
688 /*
689 * Stick around until the controlee closes the client_fd.
690 * Before it does, it is expected to write this process' exit
691 * value (one int). This process must read the value and wait for
692 * the closure of the client_fd; if this one closes early, the
693 * multiplex master will terminate early too (possibly losing data).
694 */
695 exitval[0] = 0;
696 for (i = 0; !muxclient_terminate && i < (int)sizeof(exitval);) {
697 r = read(sock, (char *)exitval + i, sizeof(exitval) - i);
698 if (r == 0) {
699 debug2("Received EOF from master");
700 break;
701 }
702 if (r == -1) {
703 if (errno == EINTR)
704 continue;
705 fatal("%s: read %s", __func__, strerror(errno));
706 }
707 i += r;
708 }
709
710 close(sock);
711 leave_raw_mode();
712 if (i > (int)sizeof(int))
713 fatal("%s: master returned too much data (%d > %lu)",
714 __func__, i, (u_long)sizeof(int));
715 if (muxclient_terminate) {
716 debug2("Exiting on signal %d", muxclient_terminate);
717 exitval[0] = 255;
718 } else if (i < (int)sizeof(int)) {
719 debug2("Control master terminated unexpectedly");
720 exitval[0] = 255;
721 } else
722 debug2("Received exit status from master %d", exitval[0]);
723
724 if (tty_flag && options.log_level > SYSLOG_LEVEL_QUIET)
725 fprintf(stderr, "Shared connection to %s closed.\r\n", host);
726
727 exit(exitval[0]);
728} 1747}
diff --git a/myproposal.h b/myproposal.h
index 7bca3bcae..98f27fd15 100644
--- a/myproposal.h
+++ b/myproposal.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: myproposal.h,v 1.23 2009/01/23 07:58:11 djm Exp $ */ 1/* $OpenBSD: myproposal.h,v 1.24 2010/02/26 20:29:54 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -40,7 +40,9 @@
40 "diffie-hellman-group1-sha1" 40 "diffie-hellman-group1-sha1"
41#endif 41#endif
42 42
43#define KEX_DEFAULT_PK_ALG "ssh-rsa,ssh-dss" 43#define KEX_DEFAULT_PK_ALG "ssh-rsa-cert-v00@openssh.com," \
44 "ssh-dss-cert-v00@openssh.com," \
45 "ssh-rsa,ssh-dss"
44 46
45#define KEX_DEFAULT_ENCRYPT \ 47#define KEX_DEFAULT_ENCRYPT \
46 "aes128-ctr,aes192-ctr,aes256-ctr," \ 48 "aes128-ctr,aes192-ctr,aes256-ctr," \
diff --git a/nchan.c b/nchan.c
index 160445e5a..20f6a2f49 100644
--- a/nchan.c
+++ b/nchan.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: nchan.c,v 1.62 2008/11/07 18:50:18 stevesk Exp $ */ 1/* $OpenBSD: nchan.c,v 1.63 2010/01/26 01:28:35 djm Exp $ */
2/* 2/*
3 * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. 3 * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved.
4 * 4 *
@@ -161,7 +161,7 @@ chan_ibuf_empty(Channel *c)
161 switch (c->istate) { 161 switch (c->istate) {
162 case CHAN_INPUT_WAIT_DRAIN: 162 case CHAN_INPUT_WAIT_DRAIN:
163 if (compat20) { 163 if (compat20) {
164 if (!(c->flags & CHAN_CLOSE_SENT)) 164 if (!(c->flags & (CHAN_CLOSE_SENT|CHAN_LOCAL)))
165 chan_send_eof2(c); 165 chan_send_eof2(c);
166 chan_set_istate(c, CHAN_INPUT_CLOSED); 166 chan_set_istate(c, CHAN_INPUT_CLOSED);
167 } else { 167 } else {
@@ -278,9 +278,12 @@ static void
278chan_rcvd_close2(Channel *c) 278chan_rcvd_close2(Channel *c)
279{ 279{
280 debug2("channel %d: rcvd close", c->self); 280 debug2("channel %d: rcvd close", c->self);
281 if (c->flags & CHAN_CLOSE_RCVD) 281 if (!(c->flags & CHAN_LOCAL)) {
282 error("channel %d: protocol error: close rcvd twice", c->self); 282 if (c->flags & CHAN_CLOSE_RCVD)
283 c->flags |= CHAN_CLOSE_RCVD; 283 error("channel %d: protocol error: close rcvd twice",
284 c->self);
285 c->flags |= CHAN_CLOSE_RCVD;
286 }
284 if (c->type == SSH_CHANNEL_LARVAL) { 287 if (c->type == SSH_CHANNEL_LARVAL) {
285 /* tear down larval channels immediately */ 288 /* tear down larval channels immediately */
286 chan_set_ostate(c, CHAN_OUTPUT_CLOSED); 289 chan_set_ostate(c, CHAN_OUTPUT_CLOSED);
@@ -302,11 +305,13 @@ chan_rcvd_close2(Channel *c)
302 chan_set_istate(c, CHAN_INPUT_CLOSED); 305 chan_set_istate(c, CHAN_INPUT_CLOSED);
303 break; 306 break;
304 case CHAN_INPUT_WAIT_DRAIN: 307 case CHAN_INPUT_WAIT_DRAIN:
305 chan_send_eof2(c); 308 if (!(c->flags & CHAN_LOCAL))
309 chan_send_eof2(c);
306 chan_set_istate(c, CHAN_INPUT_CLOSED); 310 chan_set_istate(c, CHAN_INPUT_CLOSED);
307 break; 311 break;
308 } 312 }
309} 313}
314
310void 315void
311chan_rcvd_eow(Channel *c) 316chan_rcvd_eow(Channel *c)
312{ 317{
@@ -454,6 +459,10 @@ chan_is_dead(Channel *c, int do_send)
454 c->self, c->efd, buffer_len(&c->extended)); 459 c->self, c->efd, buffer_len(&c->extended));
455 return 0; 460 return 0;
456 } 461 }
462 if (c->flags & CHAN_LOCAL) {
463 debug2("channel %d: is dead (local)", c->self);
464 return 1;
465 }
457 if (!(c->flags & CHAN_CLOSE_SENT)) { 466 if (!(c->flags & CHAN_CLOSE_SENT)) {
458 if (do_send) { 467 if (do_send) {
459 chan_send_close2(c); 468 chan_send_close2(c);
diff --git a/openbsd-compat/Makefile.in b/openbsd-compat/Makefile.in
index a60e5a68d..d65b77b5b 100644
--- a/openbsd-compat/Makefile.in
+++ b/openbsd-compat/Makefile.in
@@ -1,4 +1,4 @@
1# $Id: Makefile.in,v 1.43 2008/06/08 17:32:29 dtucker Exp $ 1# $Id: Makefile.in,v 1.44 2010/01/15 01:38:30 dtucker Exp $
2 2
3sysconfdir=@sysconfdir@ 3sysconfdir=@sysconfdir@
4piddir=@piddir@ 4piddir=@piddir@
@@ -16,7 +16,7 @@ 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 fmt_scaled.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 19OPENBSD=base64.o basename.o bindresvport.o daemon.o dirname.o fmt_scaled.o getcwd.o getgrouplist.o getopt.o getrrsetbyname.o glob.o inet_aton.o inet_ntoa.o inet_ntop.o mktemp.o pwcache.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-poll.o bsd-snprintf.o bsd-statvfs.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-poll.o bsd-snprintf.o bsd-statvfs.o bsd-waitpid.o fake-rfc2553.o openssl-compat.o xmmap.o xcrypt.o
22 22
diff --git a/openbsd-compat/bsd-cygwin_util.c b/openbsd-compat/bsd-cygwin_util.c
index e90c1597f..e9fa3a0e2 100644
--- a/openbsd-compat/bsd-cygwin_util.c
+++ b/openbsd-compat/bsd-cygwin_util.c
@@ -85,23 +85,14 @@ static struct wenv {
85 size_t namelen; 85 size_t namelen;
86} wenv_arr[] = { 86} wenv_arr[] = {
87 { NL("ALLUSERSPROFILE=") }, 87 { NL("ALLUSERSPROFILE=") },
88 { NL("COMMONPROGRAMFILES=") },
89 { NL("COMPUTERNAME=") }, 88 { NL("COMPUTERNAME=") },
90 { NL("COMSPEC=") }, 89 { NL("COMSPEC=") },
91 { NL("CYGWIN=") }, 90 { NL("CYGWIN=") },
92 { NL("NUMBER_OF_PROCESSORS=") },
93 { NL("OS=") }, 91 { NL("OS=") },
94 { NL("PATH=") }, 92 { NL("PATH=") },
95 { NL("PATHEXT=") }, 93 { NL("PATHEXT=") },
96 { NL("PROCESSOR_ARCHITECTURE=") },
97 { NL("PROCESSOR_IDENTIFIER=") },
98 { NL("PROCESSOR_LEVEL=") },
99 { NL("PROCESSOR_REVISION=") },
100 { NL("PROGRAMFILES=") },
101 { NL("SYSTEMDRIVE=") }, 94 { NL("SYSTEMDRIVE=") },
102 { NL("SYSTEMROOT=") }, 95 { NL("SYSTEMROOT=") },
103 { NL("TMP=") },
104 { NL("TEMP=") },
105 { NL("WINDIR=") } 96 { NL("WINDIR=") }
106}; 97};
107 98
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
index 50c6d990b..cad2408d6 100644
--- a/openbsd-compat/openbsd-compat.h
+++ b/openbsd-compat/openbsd-compat.h
@@ -1,4 +1,4 @@
1/* $Id: openbsd-compat.h,v 1.46 2008/06/08 17:32:29 dtucker Exp $ */ 1/* $Id: openbsd-compat.h,v 1.49 2010/01/16 12:58:37 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.
@@ -200,6 +200,14 @@ int vasprintf(char **, const char *, va_list);
200int vsnprintf(char *, size_t, const char *, va_list); 200int vsnprintf(char *, size_t, const char *, va_list);
201#endif 201#endif
202 202
203#ifndef HAVE_USER_FROM_UID
204char *user_from_uid(uid_t, int);
205#endif
206
207#ifndef HAVE_GROUP_FROM_GID
208char *group_from_gid(gid_t, int);
209#endif
210
203void *xmmap(size_t size); 211void *xmmap(size_t size);
204char *xcrypt(const char *password, const char *salt); 212char *xcrypt(const char *password, const char *salt);
205char *shadow_pw(struct passwd *pw); 213char *shadow_pw(struct passwd *pw);
diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c
index dd326c00f..420496caa 100644
--- a/openbsd-compat/openssl-compat.c
+++ b/openbsd-compat/openssl-compat.c
@@ -1,4 +1,4 @@
1/* $Id: openssl-compat.c,v 1.8 2009/03/07 11:22:35 dtucker Exp $ */ 1/* $Id: openssl-compat.c,v 1.9 2010/01/28 23:54:11 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>
@@ -67,5 +67,6 @@ ssh_SSLeay_add_all_algorithms(void)
67 /* Enable use of crypto hardware */ 67 /* Enable use of crypto hardware */
68 ENGINE_load_builtin_engines(); 68 ENGINE_load_builtin_engines();
69 ENGINE_register_all_complete(); 69 ENGINE_register_all_complete();
70 OPENSSL_config(NULL);
70} 71}
71#endif 72#endif
diff --git a/openbsd-compat/port-aix.c b/openbsd-compat/port-aix.c
index d9c0876f3..0bdefbf6d 100644
--- a/openbsd-compat/port-aix.c
+++ b/openbsd-compat/port-aix.c
@@ -374,6 +374,31 @@ aix_restoreauthdb(void)
374 374
375# endif /* WITH_AIXAUTHENTICATE */ 375# endif /* WITH_AIXAUTHENTICATE */
376 376
377# ifdef USE_AIX_KRB_NAME
378/*
379 * aix_krb5_get_principal_name: returns the user's kerberos client principal name if
380 * configured, otherwise NULL. Caller must free returned string.
381 */
382char *
383aix_krb5_get_principal_name(char *pw_name)
384{
385 char *authname = NULL, *authdomain = NULL, *principal = NULL;
386
387 setuserdb(S_READ);
388 if (getuserattr(pw_name, S_AUTHDOMAIN, &authdomain, SEC_CHAR) != 0)
389 debug("AIX getuserattr S_AUTHDOMAIN: %s", strerror(errno));
390 if (getuserattr(pw_name, S_AUTHNAME, &authname, SEC_CHAR) != 0)
391 debug("AIX getuserattr S_AUTHNAME: %s", strerror(errno));
392
393 if (authdomain != NULL)
394 xasprintf(&principal, "%s@%s", authname ? authname : pw_name, authdomain);
395 else if (authname != NULL)
396 principal = xstrdup(authname);
397 enduserdb();
398 return principal;
399}
400# endif /* USE_AIX_KRB_NAME */
401
377# if defined(AIX_GETNAMEINFO_HACK) && !defined(BROKEN_ADDRINFO) 402# if defined(AIX_GETNAMEINFO_HACK) && !defined(BROKEN_ADDRINFO)
378# undef getnameinfo 403# undef getnameinfo
379/* 404/*
diff --git a/openbsd-compat/port-aix.h b/openbsd-compat/port-aix.h
index 3ac76ae15..53e4e88a0 100644
--- a/openbsd-compat/port-aix.h
+++ b/openbsd-compat/port-aix.h
@@ -1,4 +1,4 @@
1/* $Id: port-aix.h,v 1.31 2009/08/20 06:20:50 dtucker Exp $ */ 1/* $Id: port-aix.h,v 1.32 2009/12/20 23:49:22 dtucker Exp $ */
2 2
3/* 3/*
4 * 4 *
@@ -95,6 +95,10 @@ int sys_auth_record_login(const char *, const char *, const char *, Buffer *);
95# define CUSTOM_SYS_AUTH_GET_LASTLOGIN_MSG 95# define CUSTOM_SYS_AUTH_GET_LASTLOGIN_MSG
96char *sys_auth_get_lastlogin_msg(const char *, uid_t); 96char *sys_auth_get_lastlogin_msg(const char *, uid_t);
97# define CUSTOM_FAILED_LOGIN 1 97# define CUSTOM_FAILED_LOGIN 1
98# if defined(S_AUTHDOMAIN) && defined (S_AUTHNAME)
99# define USE_AIX_KRB_NAME
100char *aix_krb5_get_principal_name(char *);
101# endif
98#endif 102#endif
99 103
100void aix_setauthdb(const char *); 104void aix_setauthdb(const char *);
diff --git a/openbsd-compat/port-linux.c b/openbsd-compat/port-linux.c
index 9cb58e369..c0ac9065e 100644
--- a/openbsd-compat/port-linux.c
+++ b/openbsd-compat/port-linux.c
@@ -1,4 +1,4 @@
1/* $Id: port-linux.c,v 1.5 2008/03/26 20:27:21 dtucker Exp $ */ 1/* $Id: port-linux.c,v 1.8 2010/03/01 04:52:50 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2005 Daniel Walsh <dwalsh@redhat.com> 4 * Copyright (c) 2005 Daniel Walsh <dwalsh@redhat.com>
@@ -18,33 +18,28 @@
18 */ 18 */
19 19
20/* 20/*
21 * Linux-specific portability code 21 * Linux-specific portability code - just SELinux support at present
22 */ 22 */
23 23
24#include "includes.h" 24#include "includes.h"
25 25
26#if defined(WITH_SELINUX) || defined(LINUX_OOM_ADJUST)
26#include <errno.h> 27#include <errno.h>
27#include <stdarg.h> 28#include <stdarg.h>
28#include <string.h> 29#include <string.h>
29 30#include <stdio.h>
30#ifdef OOM_ADJUST
31#include <sys/types.h>
32#include <sys/stat.h>
33#include <fcntl.h>
34#include <unistd.h>
35#endif
36
37#include "log.h"
38 31
39#ifdef WITH_SELINUX 32#ifdef WITH_SELINUX
40#include "key.h" 33#include "key.h"
41#include "hostfile.h" 34#include "hostfile.h"
42#include "auth.h" 35#include "auth.h"
43#ifdef HAVE_GETSEUSERBYNAME
44#include "xmalloc.h"
45#endif 36#endif
37
38#include "log.h"
39#include "xmalloc.h"
46#include "port-linux.h" 40#include "port-linux.h"
47 41
42#ifdef WITH_SELINUX
48#include <selinux/selinux.h> 43#include <selinux/selinux.h>
49#include <selinux/flask.h> 44#include <selinux/flask.h>
50#include <selinux/get_context_list.h> 45#include <selinux/get_context_list.h>
@@ -193,48 +188,95 @@ ssh_selinux_setup_pty(char *pwname, const char *tty)
193 freecon(user_ctx); 188 freecon(user_ctx);
194 debug3("%s: done", __func__); 189 debug3("%s: done", __func__);
195} 190}
196#endif /* WITH_SELINUX */
197 191
198#ifdef OOM_ADJUST 192void
199/* Get the out-of-memory adjustment file for the current process */ 193ssh_selinux_change_context(const char *newname)
200static int
201oom_adj_open(int oflag)
202{ 194{
203 int fd = open("/proc/self/oom_adj", oflag); 195 int len, newlen;
204 if (fd < 0) 196 char *oldctx, *newctx, *cx;
205 logit("error opening /proc/self/oom_adj: %s", strerror(errno)); 197
206 return fd; 198 if (!ssh_selinux_enabled())
199 return;
200
201 if (getcon((security_context_t *)&oldctx) < 0) {
202 logit("%s: getcon failed with %s", __func__, strerror (errno));
203 return;
204 }
205 if ((cx = index(oldctx, ':')) == NULL || (cx = index(cx + 1, ':')) ==
206 NULL) {
207 logit ("%s: unparseable context %s", __func__, oldctx);
208 return;
209 }
210
211 newlen = strlen(oldctx) + strlen(newname) + 1;
212 newctx = xmalloc(newlen);
213 len = cx - oldctx + 1;
214 memcpy(newctx, oldctx, len);
215 strlcpy(newctx + len, newname, newlen - len);
216 if ((cx = index(cx + 1, ':')))
217 strlcat(newctx, cx, newlen);
218 debug3("%s: setting context from '%s' to '%s'", __func__, oldctx,
219 newctx);
220 if (setcon(newctx) < 0)
221 logit("%s: setcon failed with %s", __func__, strerror (errno));
222 xfree(oldctx);
223 xfree(newctx);
207} 224}
225#endif /* WITH_SELINUX */
208 226
209/* Get the current OOM adjustment */ 227#ifdef LINUX_OOM_ADJUST
210int 228#define OOM_ADJ_PATH "/proc/self/oom_adj"
211oom_adj_get(char *buf, size_t maxlen) 229/*
230 * The magic "don't kill me", as documented in eg:
231 * http://lxr.linux.no/#linux+v2.6.32/Documentation/filesystems/proc.txt
232 */
233#define OOM_ADJ_NOKILL -17
234
235static int oom_adj_save = INT_MIN;
236
237/*
238 * Tell the kernel's out-of-memory killer to avoid sshd.
239 * Returns the previous oom_adj value or zero.
240 */
241void
242oom_adjust_setup(void)
212{ 243{
213 ssize_t n; 244 FILE *fp;
214 int fd = oom_adj_open(O_RDONLY); 245
215 if (fd < 0) 246 debug3("%s", __func__);
216 return -1; 247 if ((fp = fopen(OOM_ADJ_PATH, "r+")) != NULL) {
217 n = read(fd, buf, maxlen); 248 if (fscanf(fp, "%d", &oom_adj_save) != 1)
218 if (n < 0) 249 verbose("error reading %s: %s", OOM_ADJ_PATH, strerror(errno));
219 logit("error reading /proc/self/oom_adj: %s", strerror(errno)); 250 else {
220 else 251 rewind(fp);
221 buf[n] = '\0'; 252 if (fprintf(fp, "%d\n", OOM_ADJ_NOKILL) <= 0)
222 close(fd); 253 verbose("error writing %s: %s",
223 return n < 0 ? -1 : 0; 254 OOM_ADJ_PATH, strerror(errno));
255 else
256 verbose("Set %s from %d to %d",
257 OOM_ADJ_PATH, oom_adj_save, OOM_ADJ_NOKILL);
258 }
259 fclose(fp);
260 }
224} 261}
225 262
226/* Set the current OOM adjustment */ 263/* Restore the saved OOM adjustment */
227int 264void
228oom_adj_set(const char *buf) 265oom_adjust_restore(void)
229{ 266{
230 ssize_t n; 267 FILE *fp;
231 int fd = oom_adj_open(O_WRONLY); 268
232 if (fd < 0) 269 debug3("%s", __func__);
233 return -1; 270 if (oom_adj_save == INT_MIN || (fp = fopen(OOM_ADJ_PATH, "w")) == NULL)
234 n = write(fd, buf, strlen(buf)); 271 return;
235 if (n < 0) 272
236 logit("error writing /proc/self/oom_adj: %s", strerror(errno)); 273 if (fprintf(fp, "%d\n", oom_adj_save) <= 0)
237 close(fd); 274 verbose("error writing %s: %s", OOM_ADJ_PATH, strerror(errno));
238 return n < 0 ? -1 : 0; 275 else
276 verbose("Set %s to %d", OOM_ADJ_PATH, oom_adj_save);
277
278 fclose(fp);
279 return;
239} 280}
240#endif 281#endif /* LINUX_OOM_ADJUST */
282#endif /* WITH_SELINUX || LINUX_OOM_ADJUST */
diff --git a/openbsd-compat/port-linux.h b/openbsd-compat/port-linux.h
index 6e6a8acfd..209d9a7a2 100644
--- a/openbsd-compat/port-linux.h
+++ b/openbsd-compat/port-linux.h
@@ -1,4 +1,4 @@
1/* $Id: port-linux.h,v 1.2 2008/03/26 20:27:21 dtucker Exp $ */ 1/* $Id: port-linux.h,v 1.4 2009/12/08 02:39:48 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2006 Damien Miller <djm@openbsd.org> 4 * Copyright (c) 2006 Damien Miller <djm@openbsd.org>
@@ -23,11 +23,12 @@
23int ssh_selinux_enabled(void); 23int ssh_selinux_enabled(void);
24void ssh_selinux_setup_pty(char *, const char *); 24void ssh_selinux_setup_pty(char *, const char *);
25void ssh_selinux_setup_exec_context(char *); 25void ssh_selinux_setup_exec_context(char *);
26void ssh_selinux_change_context(const char *);
26#endif 27#endif
27 28
28#ifdef OOM_ADJUST 29#ifdef LINUX_OOM_ADJUST
29int oom_adj_get(char *buf, size_t maxlen); 30void oom_adjust_restore(void);
30int oom_adj_set(const char *buf); 31void oom_adjust_setup(void);
31#endif 32#endif
32 33
33#endif /* ! _PORT_LINUX_H */ 34#endif /* ! _PORT_LINUX_H */
diff --git a/openbsd-compat/pwcache.c b/openbsd-compat/pwcache.c
new file mode 100644
index 000000000..5a8b78801
--- /dev/null
+++ b/openbsd-compat/pwcache.c
@@ -0,0 +1,114 @@
1/* $OpenBSD: pwcache.c,v 1.9 2005/08/08 08:05:34 espie Exp $ */
2/*
3 * Copyright (c) 1989, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of the University nor the names of its contributors
15 * may be used to endorse or promote products derived from this software
16 * without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 */
30
31/* OPENBSD ORIGINAL: lib/libc/gen/pwcache.c */
32
33#include "includes.h"
34
35#include <sys/types.h>
36
37#include <grp.h>
38#include <pwd.h>
39#include <stdio.h>
40#include <stdlib.h>
41#include <string.h>
42
43#define NCACHE 64 /* power of 2 */
44#define MASK (NCACHE - 1) /* bits to store with */
45
46#ifndef HAVE_USER_FROM_UID
47char *
48user_from_uid(uid_t uid, int nouser)
49{
50 static struct ncache {
51 uid_t uid;
52 char *name;
53 } c_uid[NCACHE];
54 static int pwopen;
55 static char nbuf[15]; /* 32 bits == 10 digits */
56 struct passwd *pw;
57 struct ncache *cp;
58
59 cp = c_uid + (uid & MASK);
60 if (cp->uid != uid || cp->name == NULL) {
61 if (pwopen == 0) {
62#ifdef HAVE_SETPASSENT
63 setpassent(1);
64#endif
65 pwopen = 1;
66 }
67 if ((pw = getpwuid(uid)) == NULL) {
68 if (nouser)
69 return (NULL);
70 (void)snprintf(nbuf, sizeof(nbuf), "%u", uid);
71 }
72 cp->uid = uid;
73 if (cp->name != NULL)
74 free(cp->name);
75 cp->name = strdup(pw ? pw->pw_name : nbuf);
76 }
77 return (cp->name);
78}
79#endif
80
81#ifndef HAVE_GROUP_FROM_GID
82char *
83group_from_gid(gid_t gid, int nogroup)
84{
85 static struct ncache {
86 gid_t gid;
87 char *name;
88 } c_gid[NCACHE];
89 static int gropen;
90 static char nbuf[15]; /* 32 bits == 10 digits */
91 struct group *gr;
92 struct ncache *cp;
93
94 cp = c_gid + (gid & MASK);
95 if (cp->gid != gid || cp->name == NULL) {
96 if (gropen == 0) {
97#ifdef HAVE_SETGROUPENT
98 setgroupent(1);
99#endif
100 gropen = 1;
101 }
102 if ((gr = getgrgid(gid)) == NULL) {
103 if (nogroup)
104 return (NULL);
105 (void)snprintf(nbuf, sizeof(nbuf), "%u", gid);
106 }
107 cp->gid = gid;
108 if (cp->name != NULL)
109 free(cp->name);
110 cp->name = strdup(gr ? gr->gr_name : nbuf);
111 }
112 return (cp->name);
113}
114#endif
diff --git a/openbsd-compat/readpassphrase.c b/openbsd-compat/readpassphrase.c
index 11bd8f646..62b6d0d84 100644
--- a/openbsd-compat/readpassphrase.c
+++ b/openbsd-compat/readpassphrase.c
@@ -1,7 +1,7 @@
1/* $OpenBSD: readpassphrase.c,v 1.18 2005/08/08 08:05:34 espie Exp $ */ 1/* $OpenBSD: readpassphrase.c,v 1.22 2010/01/13 10:20:54 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000-2002 Todd C. Miller <Todd.Miller@courtesan.com> 4 * Copyright (c) 2000-2002, 2007 Todd C. Miller <Todd.Miller@courtesan.com>
5 * 5 *
6 * Permission to use, copy, modify, and distribute this software for any 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 7 * purpose with or without fee is hereby granted, provided that the above
@@ -46,7 +46,7 @@
46# define _POSIX_VDISABLE VDISABLE 46# define _POSIX_VDISABLE VDISABLE
47#endif 47#endif
48 48
49static volatile sig_atomic_t signo; 49static volatile sig_atomic_t signo[_NSIG];
50 50
51static void handler(int); 51static void handler(int);
52 52
@@ -54,7 +54,7 @@ char *
54readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags) 54readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags)
55{ 55{
56 ssize_t nr; 56 ssize_t nr;
57 int input, output, save_errno; 57 int input, output, save_errno, i, need_restart;
58 char ch, *p, *end; 58 char ch, *p, *end;
59 struct termios term, oterm; 59 struct termios term, oterm;
60 struct sigaction sa, savealrm, saveint, savehup, savequit, saveterm; 60 struct sigaction sa, savealrm, saveint, savehup, savequit, saveterm;
@@ -67,7 +67,11 @@ readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags)
67 } 67 }
68 68
69restart: 69restart:
70 signo = 0; 70 for (i = 0; i < _NSIG; i++)
71 signo[i] = 0;
72 nr = -1;
73 save_errno = 0;
74 need_restart = 0;
71 /* 75 /*
72 * Read and write to /dev/tty if available. If not, read from 76 * Read and write to /dev/tty if available. If not, read from
73 * stdin and write to stderr unless a tty is required. 77 * stdin and write to stderr unless a tty is required.
@@ -117,26 +121,30 @@ restart:
117 oterm.c_lflag |= ECHO; 121 oterm.c_lflag |= ECHO;
118 } 122 }
119 123
120 if (!(flags & RPP_STDIN)) 124 /* No I/O if we are already backgrounded. */
121 (void)write(output, prompt, strlen(prompt)); 125 if (signo[SIGTTOU] != 1 && signo[SIGTTIN] != 1) {
122 end = buf + bufsiz - 1; 126 if (!(flags & RPP_STDIN))
123 for (p = buf; (nr = read(input, &ch, 1)) == 1 && ch != '\n' && ch != '\r';) { 127 (void)write(output, prompt, strlen(prompt));
124 if (p < end) { 128 end = buf + bufsiz - 1;
125 if ((flags & RPP_SEVENBIT)) 129 p = buf;
126 ch &= 0x7f; 130 while ((nr = read(input, &ch, 1)) == 1 && ch != '\n' && ch != '\r') {
127 if (isalpha(ch)) { 131 if (p < end) {
128 if ((flags & RPP_FORCELOWER)) 132 if ((flags & RPP_SEVENBIT))
129 ch = tolower(ch); 133 ch &= 0x7f;
130 if ((flags & RPP_FORCEUPPER)) 134 if (isalpha(ch)) {
131 ch = toupper(ch); 135 if ((flags & RPP_FORCELOWER))
136 ch = (char)tolower(ch);
137 if ((flags & RPP_FORCEUPPER))
138 ch = (char)toupper(ch);
139 }
140 *p++ = ch;
132 } 141 }
133 *p++ = ch;
134 } 142 }
143 *p = '\0';
144 save_errno = errno;
145 if (!(term.c_lflag & ECHO))
146 (void)write(output, "\n", 1);
135 } 147 }
136 *p = '\0';
137 save_errno = errno;
138 if (!(term.c_lflag & ECHO))
139 (void)write(output, "\n", 1);
140 148
141 /* Restore old terminal settings and signals. */ 149 /* Restore old terminal settings and signals. */
142 if (memcmp(&term, &oterm, sizeof(term)) != 0) { 150 if (memcmp(&term, &oterm, sizeof(term)) != 0) {
@@ -152,6 +160,7 @@ restart:
152 (void)sigaction(SIGTERM, &saveterm, NULL); 160 (void)sigaction(SIGTERM, &saveterm, NULL);
153 (void)sigaction(SIGTSTP, &savetstp, NULL); 161 (void)sigaction(SIGTSTP, &savetstp, NULL);
154 (void)sigaction(SIGTTIN, &savettin, NULL); 162 (void)sigaction(SIGTTIN, &savettin, NULL);
163 (void)sigaction(SIGTTOU, &savettou, NULL);
155 if (input != STDIN_FILENO) 164 if (input != STDIN_FILENO)
156 (void)close(input); 165 (void)close(input);
157 166
@@ -159,20 +168,25 @@ restart:
159 * If we were interrupted by a signal, resend it to ourselves 168 * If we were interrupted by a signal, resend it to ourselves
160 * now that we have restored the signal handlers. 169 * now that we have restored the signal handlers.
161 */ 170 */
162 if (signo) { 171 for (i = 0; i < _NSIG; i++) {
163 kill(getpid(), signo); 172 if (signo[i]) {
164 switch (signo) { 173 kill(getpid(), i);
165 case SIGTSTP: 174 switch (i) {
166 case SIGTTIN: 175 case SIGTSTP:
167 case SIGTTOU: 176 case SIGTTIN:
168 goto restart; 177 case SIGTTOU:
178 need_restart = 1;
179 }
169 } 180 }
170 } 181 }
182 if (need_restart)
183 goto restart;
171 184
172 errno = save_errno; 185 if (save_errno)
186 errno = save_errno;
173 return(nr == -1 ? NULL : buf); 187 return(nr == -1 ? NULL : buf);
174} 188}
175 189
176#if 0 190#if 0
177char * 191char *
178getpass(const char *prompt) 192getpass(const char *prompt)
@@ -186,6 +200,6 @@ getpass(const char *prompt)
186static void handler(int s) 200static void handler(int s)
187{ 201{
188 202
189 signo = s; 203 signo[s] = 1;
190} 204}
191#endif /* HAVE_READPASSPHRASE */ 205#endif /* HAVE_READPASSPHRASE */
diff --git a/opensshd.init.in b/opensshd.init.in
index c36c5c88a..d0aff7794 100755
--- a/opensshd.init.in
+++ b/opensshd.init.in
@@ -14,6 +14,8 @@ piddir=@piddir@
14 14
15SSHD=$prefix/sbin/sshd 15SSHD=$prefix/sbin/sshd
16PIDFILE=$piddir/sshd.pid 16PIDFILE=$piddir/sshd.pid
17PidFile=`grep "^PidFile" ${sysconfdir}/sshd_config | tr "=" " " | awk '{print $2}'`
18[ X$PidFile = X ] || PIDFILE=$PidFile
17SSH_KEYGEN=$prefix/bin/ssh-keygen 19SSH_KEYGEN=$prefix/bin/ssh-keygen
18HOST_KEY_RSA1=$sysconfdir/ssh_host_key 20HOST_KEY_RSA1=$sysconfdir/ssh_host_key
19HOST_KEY_DSA=$sysconfdir/ssh_host_dsa_key 21HOST_KEY_DSA=$sysconfdir/ssh_host_dsa_key
diff --git a/pathnames.h b/pathnames.h
index 9f0030d46..9cef1299f 100644
--- a/pathnames.h
+++ b/pathnames.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: pathnames.h,v 1.17 2008/12/29 02:23:26 stevesk Exp $ */ 1/* $OpenBSD: pathnames.h,v 1.19 2010/02/11 20:37:47 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -132,6 +132,11 @@
132#define _PATH_SSH_KEY_SIGN "/usr/libexec/ssh-keysign" 132#define _PATH_SSH_KEY_SIGN "/usr/libexec/ssh-keysign"
133#endif 133#endif
134 134
135/* Location of ssh-pkcs11-helper to support keys in tokens */
136#ifndef _PATH_SSH_PKCS11_HELPER
137#define _PATH_SSH_PKCS11_HELPER "/usr/libexec/ssh-pkcs11-helper"
138#endif
139
135/* xauth for X11 forwarding */ 140/* xauth for X11 forwarding */
136#ifndef _PATH_XAUTH 141#ifndef _PATH_XAUTH
137#define _PATH_XAUTH "/usr/X11R6/bin/xauth" 142#define _PATH_XAUTH "/usr/X11R6/bin/xauth"
diff --git a/pkcs11.h b/pkcs11.h
new file mode 100644
index 000000000..2cde5b3f4
--- /dev/null
+++ b/pkcs11.h
@@ -0,0 +1,1357 @@
1/* $OpenBSD: pkcs11.h,v 1.2 2010/02/24 06:12:53 djm Exp $ */
2/* pkcs11.h
3 Copyright 2006, 2007 g10 Code GmbH
4 Copyright 2006 Andreas Jellinghaus
5
6 This file is free software; as a special exception the author gives
7 unlimited permission to copy and/or distribute it, with or without
8 modifications, as long as this notice is preserved.
9
10 This file is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY, to the extent permitted by law; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. */
14
15/* Please submit changes back to the Scute project at
16 http://www.scute.org/ (or send them to marcus@g10code.com), so that
17 they can be picked up by other projects from there as well. */
18
19/* This file is a modified implementation of the PKCS #11 standard by
20 RSA Security Inc. It is mostly a drop-in replacement, with the
21 following change:
22
23 This header file does not require any macro definitions by the user
24 (like CK_DEFINE_FUNCTION etc). In fact, it defines those macros
25 for you (if useful, some are missing, let me know if you need
26 more).
27
28 There is an additional API available that does comply better to the
29 GNU coding standard. It can be switched on by defining
30 CRYPTOKI_GNU before including this header file. For this, the
31 following changes are made to the specification:
32
33 All structure types are changed to a "struct ck_foo" where CK_FOO
34 is the type name in PKCS #11.
35
36 All non-structure types are changed to ck_foo_t where CK_FOO is the
37 lowercase version of the type name in PKCS #11. The basic types
38 (CK_ULONG et al.) are removed without substitute.
39
40 All members of structures are modified in the following way: Type
41 indication prefixes are removed, and underscore characters are
42 inserted before words. Then the result is lowercased.
43
44 Note that function names are still in the original case, as they
45 need for ABI compatibility.
46
47 CK_FALSE, CK_TRUE and NULL_PTR are removed without substitute. Use
48 <stdbool.h>.
49
50 If CRYPTOKI_COMPAT is defined before including this header file,
51 then none of the API changes above take place, and the API is the
52 one defined by the PKCS #11 standard. */
53
54#ifndef PKCS11_H
55#define PKCS11_H 1
56
57#if defined(__cplusplus)
58extern "C" {
59#endif
60
61
62/* The version of cryptoki we implement. The revision is changed with
63 each modification of this file. If you do not use the "official"
64 version of this file, please consider deleting the revision macro
65 (you may use a macro with a different name to keep track of your
66 versions). */
67#define CRYPTOKI_VERSION_MAJOR 2
68#define CRYPTOKI_VERSION_MINOR 20
69#define CRYPTOKI_VERSION_REVISION 6
70
71
72/* Compatibility interface is default, unless CRYPTOKI_GNU is
73 given. */
74#ifndef CRYPTOKI_GNU
75#ifndef CRYPTOKI_COMPAT
76#define CRYPTOKI_COMPAT 1
77#endif
78#endif
79
80/* System dependencies. */
81
82#if defined(_WIN32) || defined(CRYPTOKI_FORCE_WIN32)
83
84/* There is a matching pop below. */
85#pragma pack(push, cryptoki, 1)
86
87#ifdef CRYPTOKI_EXPORTS
88#define CK_SPEC __declspec(dllexport)
89#else
90#define CK_SPEC __declspec(dllimport)
91#endif
92
93#else
94
95#define CK_SPEC
96
97#endif
98
99
100#ifdef CRYPTOKI_COMPAT
101 /* If we are in compatibility mode, switch all exposed names to the
102 PKCS #11 variant. There are corresponding #undefs below. */
103
104#define ck_flags_t CK_FLAGS
105#define ck_version _CK_VERSION
106
107#define ck_info _CK_INFO
108#define cryptoki_version cryptokiVersion
109#define manufacturer_id manufacturerID
110#define library_description libraryDescription
111#define library_version libraryVersion
112
113#define ck_notification_t CK_NOTIFICATION
114#define ck_slot_id_t CK_SLOT_ID
115
116#define ck_slot_info _CK_SLOT_INFO
117#define slot_description slotDescription
118#define hardware_version hardwareVersion
119#define firmware_version firmwareVersion
120
121#define ck_token_info _CK_TOKEN_INFO
122#define serial_number serialNumber
123#define max_session_count ulMaxSessionCount
124#define session_count ulSessionCount
125#define max_rw_session_count ulMaxRwSessionCount
126#define rw_session_count ulRwSessionCount
127#define max_pin_len ulMaxPinLen
128#define min_pin_len ulMinPinLen
129#define total_public_memory ulTotalPublicMemory
130#define free_public_memory ulFreePublicMemory
131#define total_private_memory ulTotalPrivateMemory
132#define free_private_memory ulFreePrivateMemory
133#define utc_time utcTime
134
135#define ck_session_handle_t CK_SESSION_HANDLE
136#define ck_user_type_t CK_USER_TYPE
137#define ck_state_t CK_STATE
138
139#define ck_session_info _CK_SESSION_INFO
140#define slot_id slotID
141#define device_error ulDeviceError
142
143#define ck_object_handle_t CK_OBJECT_HANDLE
144#define ck_object_class_t CK_OBJECT_CLASS
145#define ck_hw_feature_type_t CK_HW_FEATURE_TYPE
146#define ck_key_type_t CK_KEY_TYPE
147#define ck_certificate_type_t CK_CERTIFICATE_TYPE
148#define ck_attribute_type_t CK_ATTRIBUTE_TYPE
149
150#define ck_attribute _CK_ATTRIBUTE
151#define value pValue
152#define value_len ulValueLen
153
154#define ck_date _CK_DATE
155
156#define ck_mechanism_type_t CK_MECHANISM_TYPE
157
158#define ck_mechanism _CK_MECHANISM
159#define parameter pParameter
160#define parameter_len ulParameterLen
161
162#define ck_mechanism_info _CK_MECHANISM_INFO
163#define min_key_size ulMinKeySize
164#define max_key_size ulMaxKeySize
165
166#define ck_rv_t CK_RV
167#define ck_notify_t CK_NOTIFY
168
169#define ck_function_list _CK_FUNCTION_LIST
170
171#define ck_createmutex_t CK_CREATEMUTEX
172#define ck_destroymutex_t CK_DESTROYMUTEX
173#define ck_lockmutex_t CK_LOCKMUTEX
174#define ck_unlockmutex_t CK_UNLOCKMUTEX
175
176#define ck_c_initialize_args _CK_C_INITIALIZE_ARGS
177#define create_mutex CreateMutex
178#define destroy_mutex DestroyMutex
179#define lock_mutex LockMutex
180#define unlock_mutex UnlockMutex
181#define reserved pReserved
182
183#endif /* CRYPTOKI_COMPAT */
184
185
186
187typedef unsigned long ck_flags_t;
188
189struct ck_version
190{
191 unsigned char major;
192 unsigned char minor;
193};
194
195
196struct ck_info
197{
198 struct ck_version cryptoki_version;
199 unsigned char manufacturer_id[32];
200 ck_flags_t flags;
201 unsigned char library_description[32];
202 struct ck_version library_version;
203};
204
205
206typedef unsigned long ck_notification_t;
207
208#define CKN_SURRENDER (0)
209
210
211typedef unsigned long ck_slot_id_t;
212
213
214struct ck_slot_info
215{
216 unsigned char slot_description[64];
217 unsigned char manufacturer_id[32];
218 ck_flags_t flags;
219 struct ck_version hardware_version;
220 struct ck_version firmware_version;
221};
222
223
224#define CKF_TOKEN_PRESENT (1 << 0)
225#define CKF_REMOVABLE_DEVICE (1 << 1)
226#define CKF_HW_SLOT (1 << 2)
227#define CKF_ARRAY_ATTRIBUTE (1 << 30)
228
229
230struct ck_token_info
231{
232 unsigned char label[32];
233 unsigned char manufacturer_id[32];
234 unsigned char model[16];
235 unsigned char serial_number[16];
236 ck_flags_t flags;
237 unsigned long max_session_count;
238 unsigned long session_count;
239 unsigned long max_rw_session_count;
240 unsigned long rw_session_count;
241 unsigned long max_pin_len;
242 unsigned long min_pin_len;
243 unsigned long total_public_memory;
244 unsigned long free_public_memory;
245 unsigned long total_private_memory;
246 unsigned long free_private_memory;
247 struct ck_version hardware_version;
248 struct ck_version firmware_version;
249 unsigned char utc_time[16];
250};
251
252
253#define CKF_RNG (1 << 0)
254#define CKF_WRITE_PROTECTED (1 << 1)
255#define CKF_LOGIN_REQUIRED (1 << 2)
256#define CKF_USER_PIN_INITIALIZED (1 << 3)
257#define CKF_RESTORE_KEY_NOT_NEEDED (1 << 5)
258#define CKF_CLOCK_ON_TOKEN (1 << 6)
259#define CKF_PROTECTED_AUTHENTICATION_PATH (1 << 8)
260#define CKF_DUAL_CRYPTO_OPERATIONS (1 << 9)
261#define CKF_TOKEN_INITIALIZED (1 << 10)
262#define CKF_SECONDARY_AUTHENTICATION (1 << 11)
263#define CKF_USER_PIN_COUNT_LOW (1 << 16)
264#define CKF_USER_PIN_FINAL_TRY (1 << 17)
265#define CKF_USER_PIN_LOCKED (1 << 18)
266#define CKF_USER_PIN_TO_BE_CHANGED (1 << 19)
267#define CKF_SO_PIN_COUNT_LOW (1 << 20)
268#define CKF_SO_PIN_FINAL_TRY (1 << 21)
269#define CKF_SO_PIN_LOCKED (1 << 22)
270#define CKF_SO_PIN_TO_BE_CHANGED (1 << 23)
271
272#define CK_UNAVAILABLE_INFORMATION ((unsigned long) -1)
273#define CK_EFFECTIVELY_INFINITE (0)
274
275
276typedef unsigned long ck_session_handle_t;
277
278#define CK_INVALID_HANDLE (0)
279
280
281typedef unsigned long ck_user_type_t;
282
283#define CKU_SO (0)
284#define CKU_USER (1)
285#define CKU_CONTEXT_SPECIFIC (2)
286
287
288typedef unsigned long ck_state_t;
289
290#define CKS_RO_PUBLIC_SESSION (0)
291#define CKS_RO_USER_FUNCTIONS (1)
292#define CKS_RW_PUBLIC_SESSION (2)
293#define CKS_RW_USER_FUNCTIONS (3)
294#define CKS_RW_SO_FUNCTIONS (4)
295
296
297struct ck_session_info
298{
299 ck_slot_id_t slot_id;
300 ck_state_t state;
301 ck_flags_t flags;
302 unsigned long device_error;
303};
304
305#define CKF_RW_SESSION (1 << 1)
306#define CKF_SERIAL_SESSION (1 << 2)
307
308
309typedef unsigned long ck_object_handle_t;
310
311
312typedef unsigned long ck_object_class_t;
313
314#define CKO_DATA (0)
315#define CKO_CERTIFICATE (1)
316#define CKO_PUBLIC_KEY (2)
317#define CKO_PRIVATE_KEY (3)
318#define CKO_SECRET_KEY (4)
319#define CKO_HW_FEATURE (5)
320#define CKO_DOMAIN_PARAMETERS (6)
321#define CKO_MECHANISM (7)
322#define CKO_VENDOR_DEFINED ((unsigned long) (1 << 31))
323
324
325typedef unsigned long ck_hw_feature_type_t;
326
327#define CKH_MONOTONIC_COUNTER (1)
328#define CKH_CLOCK (2)
329#define CKH_USER_INTERFACE (3)
330#define CKH_VENDOR_DEFINED ((unsigned long) (1 << 31))
331
332
333typedef unsigned long ck_key_type_t;
334
335#define CKK_RSA (0)
336#define CKK_DSA (1)
337#define CKK_DH (2)
338#define CKK_ECDSA (3)
339#define CKK_EC (3)
340#define CKK_X9_42_DH (4)
341#define CKK_KEA (5)
342#define CKK_GENERIC_SECRET (0x10)
343#define CKK_RC2 (0x11)
344#define CKK_RC4 (0x12)
345#define CKK_DES (0x13)
346#define CKK_DES2 (0x14)
347#define CKK_DES3 (0x15)
348#define CKK_CAST (0x16)
349#define CKK_CAST3 (0x17)
350#define CKK_CAST128 (0x18)
351#define CKK_RC5 (0x19)
352#define CKK_IDEA (0x1a)
353#define CKK_SKIPJACK (0x1b)
354#define CKK_BATON (0x1c)
355#define CKK_JUNIPER (0x1d)
356#define CKK_CDMF (0x1e)
357#define CKK_AES (0x1f)
358#define CKK_BLOWFISH (0x20)
359#define CKK_TWOFISH (0x21)
360#define CKK_VENDOR_DEFINED ((unsigned long) (1 << 31))
361
362typedef unsigned long ck_certificate_type_t;
363
364#define CKC_X_509 (0)
365#define CKC_X_509_ATTR_CERT (1)
366#define CKC_WTLS (2)
367#define CKC_VENDOR_DEFINED ((unsigned long) (1 << 31))
368
369
370typedef unsigned long ck_attribute_type_t;
371
372#define CKA_CLASS (0)
373#define CKA_TOKEN (1)
374#define CKA_PRIVATE (2)
375#define CKA_LABEL (3)
376#define CKA_APPLICATION (0x10)
377#define CKA_VALUE (0x11)
378#define CKA_OBJECT_ID (0x12)
379#define CKA_CERTIFICATE_TYPE (0x80)
380#define CKA_ISSUER (0x81)
381#define CKA_SERIAL_NUMBER (0x82)
382#define CKA_AC_ISSUER (0x83)
383#define CKA_OWNER (0x84)
384#define CKA_ATTR_TYPES (0x85)
385#define CKA_TRUSTED (0x86)
386#define CKA_CERTIFICATE_CATEGORY (0x87)
387#define CKA_JAVA_MIDP_SECURITY_DOMAIN (0x88)
388#define CKA_URL (0x89)
389#define CKA_HASH_OF_SUBJECT_PUBLIC_KEY (0x8a)
390#define CKA_HASH_OF_ISSUER_PUBLIC_KEY (0x8b)
391#define CKA_CHECK_VALUE (0x90)
392#define CKA_KEY_TYPE (0x100)
393#define CKA_SUBJECT (0x101)
394#define CKA_ID (0x102)
395#define CKA_SENSITIVE (0x103)
396#define CKA_ENCRYPT (0x104)
397#define CKA_DECRYPT (0x105)
398#define CKA_WRAP (0x106)
399#define CKA_UNWRAP (0x107)
400#define CKA_SIGN (0x108)
401#define CKA_SIGN_RECOVER (0x109)
402#define CKA_VERIFY (0x10a)
403#define CKA_VERIFY_RECOVER (0x10b)
404#define CKA_DERIVE (0x10c)
405#define CKA_START_DATE (0x110)
406#define CKA_END_DATE (0x111)
407#define CKA_MODULUS (0x120)
408#define CKA_MODULUS_BITS (0x121)
409#define CKA_PUBLIC_EXPONENT (0x122)
410#define CKA_PRIVATE_EXPONENT (0x123)
411#define CKA_PRIME_1 (0x124)
412#define CKA_PRIME_2 (0x125)
413#define CKA_EXPONENT_1 (0x126)
414#define CKA_EXPONENT_2 (0x127)
415#define CKA_COEFFICIENT (0x128)
416#define CKA_PRIME (0x130)
417#define CKA_SUBPRIME (0x131)
418#define CKA_BASE (0x132)
419#define CKA_PRIME_BITS (0x133)
420#define CKA_SUB_PRIME_BITS (0x134)
421#define CKA_VALUE_BITS (0x160)
422#define CKA_VALUE_LEN (0x161)
423#define CKA_EXTRACTABLE (0x162)
424#define CKA_LOCAL (0x163)
425#define CKA_NEVER_EXTRACTABLE (0x164)
426#define CKA_ALWAYS_SENSITIVE (0x165)
427#define CKA_KEY_GEN_MECHANISM (0x166)
428#define CKA_MODIFIABLE (0x170)
429#define CKA_ECDSA_PARAMS (0x180)
430#define CKA_EC_PARAMS (0x180)
431#define CKA_EC_POINT (0x181)
432#define CKA_SECONDARY_AUTH (0x200)
433#define CKA_AUTH_PIN_FLAGS (0x201)
434#define CKA_ALWAYS_AUTHENTICATE (0x202)
435#define CKA_WRAP_WITH_TRUSTED (0x210)
436#define CKA_HW_FEATURE_TYPE (0x300)
437#define CKA_RESET_ON_INIT (0x301)
438#define CKA_HAS_RESET (0x302)
439#define CKA_PIXEL_X (0x400)
440#define CKA_PIXEL_Y (0x401)
441#define CKA_RESOLUTION (0x402)
442#define CKA_CHAR_ROWS (0x403)
443#define CKA_CHAR_COLUMNS (0x404)
444#define CKA_COLOR (0x405)
445#define CKA_BITS_PER_PIXEL (0x406)
446#define CKA_CHAR_SETS (0x480)
447#define CKA_ENCODING_METHODS (0x481)
448#define CKA_MIME_TYPES (0x482)
449#define CKA_MECHANISM_TYPE (0x500)
450#define CKA_REQUIRED_CMS_ATTRIBUTES (0x501)
451#define CKA_DEFAULT_CMS_ATTRIBUTES (0x502)
452#define CKA_SUPPORTED_CMS_ATTRIBUTES (0x503)
453#define CKA_WRAP_TEMPLATE (CKF_ARRAY_ATTRIBUTE | 0x211)
454#define CKA_UNWRAP_TEMPLATE (CKF_ARRAY_ATTRIBUTE | 0x212)
455#define CKA_ALLOWED_MECHANISMS (CKF_ARRAY_ATTRIBUTE | 0x600)
456#define CKA_VENDOR_DEFINED ((unsigned long) (1 << 31))
457
458
459struct ck_attribute
460{
461 ck_attribute_type_t type;
462 void *value;
463 unsigned long value_len;
464};
465
466
467struct ck_date
468{
469 unsigned char year[4];
470 unsigned char month[2];
471 unsigned char day[2];
472};
473
474
475typedef unsigned long ck_mechanism_type_t;
476
477#define CKM_RSA_PKCS_KEY_PAIR_GEN (0)
478#define CKM_RSA_PKCS (1)
479#define CKM_RSA_9796 (2)
480#define CKM_RSA_X_509 (3)
481#define CKM_MD2_RSA_PKCS (4)
482#define CKM_MD5_RSA_PKCS (5)
483#define CKM_SHA1_RSA_PKCS (6)
484#define CKM_RIPEMD128_RSA_PKCS (7)
485#define CKM_RIPEMD160_RSA_PKCS (8)
486#define CKM_RSA_PKCS_OAEP (9)
487#define CKM_RSA_X9_31_KEY_PAIR_GEN (0xa)
488#define CKM_RSA_X9_31 (0xb)
489#define CKM_SHA1_RSA_X9_31 (0xc)
490#define CKM_RSA_PKCS_PSS (0xd)
491#define CKM_SHA1_RSA_PKCS_PSS (0xe)
492#define CKM_DSA_KEY_PAIR_GEN (0x10)
493#define CKM_DSA (0x11)
494#define CKM_DSA_SHA1 (0x12)
495#define CKM_DH_PKCS_KEY_PAIR_GEN (0x20)
496#define CKM_DH_PKCS_DERIVE (0x21)
497#define CKM_X9_42_DH_KEY_PAIR_GEN (0x30)
498#define CKM_X9_42_DH_DERIVE (0x31)
499#define CKM_X9_42_DH_HYBRID_DERIVE (0x32)
500#define CKM_X9_42_MQV_DERIVE (0x33)
501#define CKM_SHA256_RSA_PKCS (0x40)
502#define CKM_SHA384_RSA_PKCS (0x41)
503#define CKM_SHA512_RSA_PKCS (0x42)
504#define CKM_SHA256_RSA_PKCS_PSS (0x43)
505#define CKM_SHA384_RSA_PKCS_PSS (0x44)
506#define CKM_SHA512_RSA_PKCS_PSS (0x45)
507#define CKM_RC2_KEY_GEN (0x100)
508#define CKM_RC2_ECB (0x101)
509#define CKM_RC2_CBC (0x102)
510#define CKM_RC2_MAC (0x103)
511#define CKM_RC2_MAC_GENERAL (0x104)
512#define CKM_RC2_CBC_PAD (0x105)
513#define CKM_RC4_KEY_GEN (0x110)
514#define CKM_RC4 (0x111)
515#define CKM_DES_KEY_GEN (0x120)
516#define CKM_DES_ECB (0x121)
517#define CKM_DES_CBC (0x122)
518#define CKM_DES_MAC (0x123)
519#define CKM_DES_MAC_GENERAL (0x124)
520#define CKM_DES_CBC_PAD (0x125)
521#define CKM_DES2_KEY_GEN (0x130)
522#define CKM_DES3_KEY_GEN (0x131)
523#define CKM_DES3_ECB (0x132)
524#define CKM_DES3_CBC (0x133)
525#define CKM_DES3_MAC (0x134)
526#define CKM_DES3_MAC_GENERAL (0x135)
527#define CKM_DES3_CBC_PAD (0x136)
528#define CKM_CDMF_KEY_GEN (0x140)
529#define CKM_CDMF_ECB (0x141)
530#define CKM_CDMF_CBC (0x142)
531#define CKM_CDMF_MAC (0x143)
532#define CKM_CDMF_MAC_GENERAL (0x144)
533#define CKM_CDMF_CBC_PAD (0x145)
534#define CKM_MD2 (0x200)
535#define CKM_MD2_HMAC (0x201)
536#define CKM_MD2_HMAC_GENERAL (0x202)
537#define CKM_MD5 (0x210)
538#define CKM_MD5_HMAC (0x211)
539#define CKM_MD5_HMAC_GENERAL (0x212)
540#define CKM_SHA_1 (0x220)
541#define CKM_SHA_1_HMAC (0x221)
542#define CKM_SHA_1_HMAC_GENERAL (0x222)
543#define CKM_RIPEMD128 (0x230)
544#define CKM_RIPEMD128_HMAC (0x231)
545#define CKM_RIPEMD128_HMAC_GENERAL (0x232)
546#define CKM_RIPEMD160 (0x240)
547#define CKM_RIPEMD160_HMAC (0x241)
548#define CKM_RIPEMD160_HMAC_GENERAL (0x242)
549#define CKM_SHA256 (0x250)
550#define CKM_SHA256_HMAC (0x251)
551#define CKM_SHA256_HMAC_GENERAL (0x252)
552#define CKM_SHA384 (0x260)
553#define CKM_SHA384_HMAC (0x261)
554#define CKM_SHA384_HMAC_GENERAL (0x262)
555#define CKM_SHA512 (0x270)
556#define CKM_SHA512_HMAC (0x271)
557#define CKM_SHA512_HMAC_GENERAL (0x272)
558#define CKM_CAST_KEY_GEN (0x300)
559#define CKM_CAST_ECB (0x301)
560#define CKM_CAST_CBC (0x302)
561#define CKM_CAST_MAC (0x303)
562#define CKM_CAST_MAC_GENERAL (0x304)
563#define CKM_CAST_CBC_PAD (0x305)
564#define CKM_CAST3_KEY_GEN (0x310)
565#define CKM_CAST3_ECB (0x311)
566#define CKM_CAST3_CBC (0x312)
567#define CKM_CAST3_MAC (0x313)
568#define CKM_CAST3_MAC_GENERAL (0x314)
569#define CKM_CAST3_CBC_PAD (0x315)
570#define CKM_CAST5_KEY_GEN (0x320)
571#define CKM_CAST128_KEY_GEN (0x320)
572#define CKM_CAST5_ECB (0x321)
573#define CKM_CAST128_ECB (0x321)
574#define CKM_CAST5_CBC (0x322)
575#define CKM_CAST128_CBC (0x322)
576#define CKM_CAST5_MAC (0x323)
577#define CKM_CAST128_MAC (0x323)
578#define CKM_CAST5_MAC_GENERAL (0x324)
579#define CKM_CAST128_MAC_GENERAL (0x324)
580#define CKM_CAST5_CBC_PAD (0x325)
581#define CKM_CAST128_CBC_PAD (0x325)
582#define CKM_RC5_KEY_GEN (0x330)
583#define CKM_RC5_ECB (0x331)
584#define CKM_RC5_CBC (0x332)
585#define CKM_RC5_MAC (0x333)
586#define CKM_RC5_MAC_GENERAL (0x334)
587#define CKM_RC5_CBC_PAD (0x335)
588#define CKM_IDEA_KEY_GEN (0x340)
589#define CKM_IDEA_ECB (0x341)
590#define CKM_IDEA_CBC (0x342)
591#define CKM_IDEA_MAC (0x343)
592#define CKM_IDEA_MAC_GENERAL (0x344)
593#define CKM_IDEA_CBC_PAD (0x345)
594#define CKM_GENERIC_SECRET_KEY_GEN (0x350)
595#define CKM_CONCATENATE_BASE_AND_KEY (0x360)
596#define CKM_CONCATENATE_BASE_AND_DATA (0x362)
597#define CKM_CONCATENATE_DATA_AND_BASE (0x363)
598#define CKM_XOR_BASE_AND_DATA (0x364)
599#define CKM_EXTRACT_KEY_FROM_KEY (0x365)
600#define CKM_SSL3_PRE_MASTER_KEY_GEN (0x370)
601#define CKM_SSL3_MASTER_KEY_DERIVE (0x371)
602#define CKM_SSL3_KEY_AND_MAC_DERIVE (0x372)
603#define CKM_SSL3_MASTER_KEY_DERIVE_DH (0x373)
604#define CKM_TLS_PRE_MASTER_KEY_GEN (0x374)
605#define CKM_TLS_MASTER_KEY_DERIVE (0x375)
606#define CKM_TLS_KEY_AND_MAC_DERIVE (0x376)
607#define CKM_TLS_MASTER_KEY_DERIVE_DH (0x377)
608#define CKM_SSL3_MD5_MAC (0x380)
609#define CKM_SSL3_SHA1_MAC (0x381)
610#define CKM_MD5_KEY_DERIVATION (0x390)
611#define CKM_MD2_KEY_DERIVATION (0x391)
612#define CKM_SHA1_KEY_DERIVATION (0x392)
613#define CKM_PBE_MD2_DES_CBC (0x3a0)
614#define CKM_PBE_MD5_DES_CBC (0x3a1)
615#define CKM_PBE_MD5_CAST_CBC (0x3a2)
616#define CKM_PBE_MD5_CAST3_CBC (0x3a3)
617#define CKM_PBE_MD5_CAST5_CBC (0x3a4)
618#define CKM_PBE_MD5_CAST128_CBC (0x3a4)
619#define CKM_PBE_SHA1_CAST5_CBC (0x3a5)
620#define CKM_PBE_SHA1_CAST128_CBC (0x3a5)
621#define CKM_PBE_SHA1_RC4_128 (0x3a6)
622#define CKM_PBE_SHA1_RC4_40 (0x3a7)
623#define CKM_PBE_SHA1_DES3_EDE_CBC (0x3a8)
624#define CKM_PBE_SHA1_DES2_EDE_CBC (0x3a9)
625#define CKM_PBE_SHA1_RC2_128_CBC (0x3aa)
626#define CKM_PBE_SHA1_RC2_40_CBC (0x3ab)
627#define CKM_PKCS5_PBKD2 (0x3b0)
628#define CKM_PBA_SHA1_WITH_SHA1_HMAC (0x3c0)
629#define CKM_KEY_WRAP_LYNKS (0x400)
630#define CKM_KEY_WRAP_SET_OAEP (0x401)
631#define CKM_SKIPJACK_KEY_GEN (0x1000)
632#define CKM_SKIPJACK_ECB64 (0x1001)
633#define CKM_SKIPJACK_CBC64 (0x1002)
634#define CKM_SKIPJACK_OFB64 (0x1003)
635#define CKM_SKIPJACK_CFB64 (0x1004)
636#define CKM_SKIPJACK_CFB32 (0x1005)
637#define CKM_SKIPJACK_CFB16 (0x1006)
638#define CKM_SKIPJACK_CFB8 (0x1007)
639#define CKM_SKIPJACK_WRAP (0x1008)
640#define CKM_SKIPJACK_PRIVATE_WRAP (0x1009)
641#define CKM_SKIPJACK_RELAYX (0x100a)
642#define CKM_KEA_KEY_PAIR_GEN (0x1010)
643#define CKM_KEA_KEY_DERIVE (0x1011)
644#define CKM_FORTEZZA_TIMESTAMP (0x1020)
645#define CKM_BATON_KEY_GEN (0x1030)
646#define CKM_BATON_ECB128 (0x1031)
647#define CKM_BATON_ECB96 (0x1032)
648#define CKM_BATON_CBC128 (0x1033)
649#define CKM_BATON_COUNTER (0x1034)
650#define CKM_BATON_SHUFFLE (0x1035)
651#define CKM_BATON_WRAP (0x1036)
652#define CKM_ECDSA_KEY_PAIR_GEN (0x1040)
653#define CKM_EC_KEY_PAIR_GEN (0x1040)
654#define CKM_ECDSA (0x1041)
655#define CKM_ECDSA_SHA1 (0x1042)
656#define CKM_ECDH1_DERIVE (0x1050)
657#define CKM_ECDH1_COFACTOR_DERIVE (0x1051)
658#define CKM_ECMQV_DERIVE (0x1052)
659#define CKM_JUNIPER_KEY_GEN (0x1060)
660#define CKM_JUNIPER_ECB128 (0x1061)
661#define CKM_JUNIPER_CBC128 (0x1062)
662#define CKM_JUNIPER_COUNTER (0x1063)
663#define CKM_JUNIPER_SHUFFLE (0x1064)
664#define CKM_JUNIPER_WRAP (0x1065)
665#define CKM_FASTHASH (0x1070)
666#define CKM_AES_KEY_GEN (0x1080)
667#define CKM_AES_ECB (0x1081)
668#define CKM_AES_CBC (0x1082)
669#define CKM_AES_MAC (0x1083)
670#define CKM_AES_MAC_GENERAL (0x1084)
671#define CKM_AES_CBC_PAD (0x1085)
672#define CKM_DSA_PARAMETER_GEN (0x2000)
673#define CKM_DH_PKCS_PARAMETER_GEN (0x2001)
674#define CKM_X9_42_DH_PARAMETER_GEN (0x2002)
675#define CKM_VENDOR_DEFINED ((unsigned long) (1 << 31))
676
677
678struct ck_mechanism
679{
680 ck_mechanism_type_t mechanism;
681 void *parameter;
682 unsigned long parameter_len;
683};
684
685
686struct ck_mechanism_info
687{
688 unsigned long min_key_size;
689 unsigned long max_key_size;
690 ck_flags_t flags;
691};
692
693#define CKF_HW (1 << 0)
694#define CKF_ENCRYPT (1 << 8)
695#define CKF_DECRYPT (1 << 9)
696#define CKF_DIGEST (1 << 10)
697#define CKF_SIGN (1 << 11)
698#define CKF_SIGN_RECOVER (1 << 12)
699#define CKF_VERIFY (1 << 13)
700#define CKF_VERIFY_RECOVER (1 << 14)
701#define CKF_GENERATE (1 << 15)
702#define CKF_GENERATE_KEY_PAIR (1 << 16)
703#define CKF_WRAP (1 << 17)
704#define CKF_UNWRAP (1 << 18)
705#define CKF_DERIVE (1 << 19)
706#define CKF_EXTENSION ((unsigned long) (1 << 31))
707
708
709/* Flags for C_WaitForSlotEvent. */
710#define CKF_DONT_BLOCK (1)
711
712
713typedef unsigned long ck_rv_t;
714
715
716typedef ck_rv_t (*ck_notify_t) (ck_session_handle_t session,
717 ck_notification_t event, void *application);
718
719/* Forward reference. */
720struct ck_function_list;
721
722#define _CK_DECLARE_FUNCTION(name, args) \
723typedef ck_rv_t (*CK_ ## name) args; \
724ck_rv_t CK_SPEC name args
725
726_CK_DECLARE_FUNCTION (C_Initialize, (void *init_args));
727_CK_DECLARE_FUNCTION (C_Finalize, (void *reserved));
728_CK_DECLARE_FUNCTION (C_GetInfo, (struct ck_info *info));
729_CK_DECLARE_FUNCTION (C_GetFunctionList,
730 (struct ck_function_list **function_list));
731
732_CK_DECLARE_FUNCTION (C_GetSlotList,
733 (unsigned char token_present, ck_slot_id_t *slot_list,
734 unsigned long *count));
735_CK_DECLARE_FUNCTION (C_GetSlotInfo,
736 (ck_slot_id_t slot_id, struct ck_slot_info *info));
737_CK_DECLARE_FUNCTION (C_GetTokenInfo,
738 (ck_slot_id_t slot_id, struct ck_token_info *info));
739_CK_DECLARE_FUNCTION (C_WaitForSlotEvent,
740 (ck_flags_t flags, ck_slot_id_t *slot, void *reserved));
741_CK_DECLARE_FUNCTION (C_GetMechanismList,
742 (ck_slot_id_t slot_id,
743 ck_mechanism_type_t *mechanism_list,
744 unsigned long *count));
745_CK_DECLARE_FUNCTION (C_GetMechanismInfo,
746 (ck_slot_id_t slot_id, ck_mechanism_type_t type,
747 struct ck_mechanism_info *info));
748_CK_DECLARE_FUNCTION (C_InitToken,
749 (ck_slot_id_t slot_id, unsigned char *pin,
750 unsigned long pin_len, unsigned char *label));
751_CK_DECLARE_FUNCTION (C_InitPIN,
752 (ck_session_handle_t session, unsigned char *pin,
753 unsigned long pin_len));
754_CK_DECLARE_FUNCTION (C_SetPIN,
755 (ck_session_handle_t session, unsigned char *old_pin,
756 unsigned long old_len, unsigned char *new_pin,
757 unsigned long new_len));
758
759_CK_DECLARE_FUNCTION (C_OpenSession,
760 (ck_slot_id_t slot_id, ck_flags_t flags,
761 void *application, ck_notify_t notify,
762 ck_session_handle_t *session));
763_CK_DECLARE_FUNCTION (C_CloseSession, (ck_session_handle_t session));
764_CK_DECLARE_FUNCTION (C_CloseAllSessions, (ck_slot_id_t slot_id));
765_CK_DECLARE_FUNCTION (C_GetSessionInfo,
766 (ck_session_handle_t session,
767 struct ck_session_info *info));
768_CK_DECLARE_FUNCTION (C_GetOperationState,
769 (ck_session_handle_t session,
770 unsigned char *operation_state,
771 unsigned long *operation_state_len));
772_CK_DECLARE_FUNCTION (C_SetOperationState,
773 (ck_session_handle_t session,
774 unsigned char *operation_state,
775 unsigned long operation_state_len,
776 ck_object_handle_t encryption_key,
777 ck_object_handle_t authentiation_key));
778_CK_DECLARE_FUNCTION (C_Login,
779 (ck_session_handle_t session, ck_user_type_t user_type,
780 unsigned char *pin, unsigned long pin_len));
781_CK_DECLARE_FUNCTION (C_Logout, (ck_session_handle_t session));
782
783_CK_DECLARE_FUNCTION (C_CreateObject,
784 (ck_session_handle_t session,
785 struct ck_attribute *templ,
786 unsigned long count, ck_object_handle_t *object));
787_CK_DECLARE_FUNCTION (C_CopyObject,
788 (ck_session_handle_t session, ck_object_handle_t object,
789 struct ck_attribute *templ, unsigned long count,
790 ck_object_handle_t *new_object));
791_CK_DECLARE_FUNCTION (C_DestroyObject,
792 (ck_session_handle_t session,
793 ck_object_handle_t object));
794_CK_DECLARE_FUNCTION (C_GetObjectSize,
795 (ck_session_handle_t session,
796 ck_object_handle_t object,
797 unsigned long *size));
798_CK_DECLARE_FUNCTION (C_GetAttributeValue,
799 (ck_session_handle_t session,
800 ck_object_handle_t object,
801 struct ck_attribute *templ,
802 unsigned long count));
803_CK_DECLARE_FUNCTION (C_SetAttributeValue,
804 (ck_session_handle_t session,
805 ck_object_handle_t object,
806 struct ck_attribute *templ,
807 unsigned long count));
808_CK_DECLARE_FUNCTION (C_FindObjectsInit,
809 (ck_session_handle_t session,
810 struct ck_attribute *templ,
811 unsigned long count));
812_CK_DECLARE_FUNCTION (C_FindObjects,
813 (ck_session_handle_t session,
814 ck_object_handle_t *object,
815 unsigned long max_object_count,
816 unsigned long *object_count));
817_CK_DECLARE_FUNCTION (C_FindObjectsFinal,
818 (ck_session_handle_t session));
819
820_CK_DECLARE_FUNCTION (C_EncryptInit,
821 (ck_session_handle_t session,
822 struct ck_mechanism *mechanism,
823 ck_object_handle_t key));
824_CK_DECLARE_FUNCTION (C_Encrypt,
825 (ck_session_handle_t session,
826 unsigned char *data, unsigned long data_len,
827 unsigned char *encrypted_data,
828 unsigned long *encrypted_data_len));
829_CK_DECLARE_FUNCTION (C_EncryptUpdate,
830 (ck_session_handle_t session,
831 unsigned char *part, unsigned long part_len,
832 unsigned char *encrypted_part,
833 unsigned long *encrypted_part_len));
834_CK_DECLARE_FUNCTION (C_EncryptFinal,
835 (ck_session_handle_t session,
836 unsigned char *last_encrypted_part,
837 unsigned long *last_encrypted_part_len));
838
839_CK_DECLARE_FUNCTION (C_DecryptInit,
840 (ck_session_handle_t session,
841 struct ck_mechanism *mechanism,
842 ck_object_handle_t key));
843_CK_DECLARE_FUNCTION (C_Decrypt,
844 (ck_session_handle_t session,
845 unsigned char *encrypted_data,
846 unsigned long encrypted_data_len,
847 unsigned char *data, unsigned long *data_len));
848_CK_DECLARE_FUNCTION (C_DecryptUpdate,
849 (ck_session_handle_t session,
850 unsigned char *encrypted_part,
851 unsigned long encrypted_part_len,
852 unsigned char *part, unsigned long *part_len));
853_CK_DECLARE_FUNCTION (C_DecryptFinal,
854 (ck_session_handle_t session,
855 unsigned char *last_part,
856 unsigned long *last_part_len));
857
858_CK_DECLARE_FUNCTION (C_DigestInit,
859 (ck_session_handle_t session,
860 struct ck_mechanism *mechanism));
861_CK_DECLARE_FUNCTION (C_Digest,
862 (ck_session_handle_t session,
863 unsigned char *data, unsigned long data_len,
864 unsigned char *digest,
865 unsigned long *digest_len));
866_CK_DECLARE_FUNCTION (C_DigestUpdate,
867 (ck_session_handle_t session,
868 unsigned char *part, unsigned long part_len));
869_CK_DECLARE_FUNCTION (C_DigestKey,
870 (ck_session_handle_t session, ck_object_handle_t key));
871_CK_DECLARE_FUNCTION (C_DigestFinal,
872 (ck_session_handle_t session,
873 unsigned char *digest,
874 unsigned long *digest_len));
875
876_CK_DECLARE_FUNCTION (C_SignInit,
877 (ck_session_handle_t session,
878 struct ck_mechanism *mechanism,
879 ck_object_handle_t key));
880_CK_DECLARE_FUNCTION (C_Sign,
881 (ck_session_handle_t session,
882 unsigned char *data, unsigned long data_len,
883 unsigned char *signature,
884 unsigned long *signature_len));
885_CK_DECLARE_FUNCTION (C_SignUpdate,
886 (ck_session_handle_t session,
887 unsigned char *part, unsigned long part_len));
888_CK_DECLARE_FUNCTION (C_SignFinal,
889 (ck_session_handle_t session,
890 unsigned char *signature,
891 unsigned long *signature_len));
892_CK_DECLARE_FUNCTION (C_SignRecoverInit,
893 (ck_session_handle_t session,
894 struct ck_mechanism *mechanism,
895 ck_object_handle_t key));
896_CK_DECLARE_FUNCTION (C_SignRecover,
897 (ck_session_handle_t session,
898 unsigned char *data, unsigned long data_len,
899 unsigned char *signature,
900 unsigned long *signature_len));
901
902_CK_DECLARE_FUNCTION (C_VerifyInit,
903 (ck_session_handle_t session,
904 struct ck_mechanism *mechanism,
905 ck_object_handle_t key));
906_CK_DECLARE_FUNCTION (C_Verify,
907 (ck_session_handle_t session,
908 unsigned char *data, unsigned long data_len,
909 unsigned char *signature,
910 unsigned long signature_len));
911_CK_DECLARE_FUNCTION (C_VerifyUpdate,
912 (ck_session_handle_t session,
913 unsigned char *part, unsigned long part_len));
914_CK_DECLARE_FUNCTION (C_VerifyFinal,
915 (ck_session_handle_t session,
916 unsigned char *signature,
917 unsigned long signature_len));
918_CK_DECLARE_FUNCTION (C_VerifyRecoverInit,
919 (ck_session_handle_t session,
920 struct ck_mechanism *mechanism,
921 ck_object_handle_t key));
922_CK_DECLARE_FUNCTION (C_VerifyRecover,
923 (ck_session_handle_t session,
924 unsigned char *signature,
925 unsigned long signature_len,
926 unsigned char *data,
927 unsigned long *data_len));
928
929_CK_DECLARE_FUNCTION (C_DigestEncryptUpdate,
930 (ck_session_handle_t session,
931 unsigned char *part, unsigned long part_len,
932 unsigned char *encrypted_part,
933 unsigned long *encrypted_part_len));
934_CK_DECLARE_FUNCTION (C_DecryptDigestUpdate,
935 (ck_session_handle_t session,
936 unsigned char *encrypted_part,
937 unsigned long encrypted_part_len,
938 unsigned char *part,
939 unsigned long *part_len));
940_CK_DECLARE_FUNCTION (C_SignEncryptUpdate,
941 (ck_session_handle_t session,
942 unsigned char *part, unsigned long part_len,
943 unsigned char *encrypted_part,
944 unsigned long *encrypted_part_len));
945_CK_DECLARE_FUNCTION (C_DecryptVerifyUpdate,
946 (ck_session_handle_t session,
947 unsigned char *encrypted_part,
948 unsigned long encrypted_part_len,
949 unsigned char *part,
950 unsigned long *part_len));
951
952_CK_DECLARE_FUNCTION (C_GenerateKey,
953 (ck_session_handle_t session,
954 struct ck_mechanism *mechanism,
955 struct ck_attribute *templ,
956 unsigned long count,
957 ck_object_handle_t *key));
958_CK_DECLARE_FUNCTION (C_GenerateKeyPair,
959 (ck_session_handle_t session,
960 struct ck_mechanism *mechanism,
961 struct ck_attribute *public_key_template,
962 unsigned long public_key_attribute_count,
963 struct ck_attribute *private_key_template,
964 unsigned long private_key_attribute_count,
965 ck_object_handle_t *public_key,
966 ck_object_handle_t *private_key));
967_CK_DECLARE_FUNCTION (C_WrapKey,
968 (ck_session_handle_t session,
969 struct ck_mechanism *mechanism,
970 ck_object_handle_t wrapping_key,
971 ck_object_handle_t key,
972 unsigned char *wrapped_key,
973 unsigned long *wrapped_key_len));
974_CK_DECLARE_FUNCTION (C_UnwrapKey,
975 (ck_session_handle_t session,
976 struct ck_mechanism *mechanism,
977 ck_object_handle_t unwrapping_key,
978 unsigned char *wrapped_key,
979 unsigned long wrapped_key_len,
980 struct ck_attribute *templ,
981 unsigned long attribute_count,
982 ck_object_handle_t *key));
983_CK_DECLARE_FUNCTION (C_DeriveKey,
984 (ck_session_handle_t session,
985 struct ck_mechanism *mechanism,
986 ck_object_handle_t base_key,
987 struct ck_attribute *templ,
988 unsigned long attribute_count,
989 ck_object_handle_t *key));
990
991_CK_DECLARE_FUNCTION (C_SeedRandom,
992 (ck_session_handle_t session, unsigned char *seed,
993 unsigned long seed_len));
994_CK_DECLARE_FUNCTION (C_GenerateRandom,
995 (ck_session_handle_t session,
996 unsigned char *random_data,
997 unsigned long random_len));
998
999_CK_DECLARE_FUNCTION (C_GetFunctionStatus, (ck_session_handle_t session));
1000_CK_DECLARE_FUNCTION (C_CancelFunction, (ck_session_handle_t session));
1001
1002
1003struct ck_function_list
1004{
1005 struct ck_version version;
1006 CK_C_Initialize C_Initialize;
1007 CK_C_Finalize C_Finalize;
1008 CK_C_GetInfo C_GetInfo;
1009 CK_C_GetFunctionList C_GetFunctionList;
1010 CK_C_GetSlotList C_GetSlotList;
1011 CK_C_GetSlotInfo C_GetSlotInfo;
1012 CK_C_GetTokenInfo C_GetTokenInfo;
1013 CK_C_GetMechanismList C_GetMechanismList;
1014 CK_C_GetMechanismInfo C_GetMechanismInfo;
1015 CK_C_InitToken C_InitToken;
1016 CK_C_InitPIN C_InitPIN;
1017 CK_C_SetPIN C_SetPIN;
1018 CK_C_OpenSession C_OpenSession;
1019 CK_C_CloseSession C_CloseSession;
1020 CK_C_CloseAllSessions C_CloseAllSessions;
1021 CK_C_GetSessionInfo C_GetSessionInfo;
1022 CK_C_GetOperationState C_GetOperationState;
1023 CK_C_SetOperationState C_SetOperationState;
1024 CK_C_Login C_Login;
1025 CK_C_Logout C_Logout;
1026 CK_C_CreateObject C_CreateObject;
1027 CK_C_CopyObject C_CopyObject;
1028 CK_C_DestroyObject C_DestroyObject;
1029 CK_C_GetObjectSize C_GetObjectSize;
1030 CK_C_GetAttributeValue C_GetAttributeValue;
1031 CK_C_SetAttributeValue C_SetAttributeValue;
1032 CK_C_FindObjectsInit C_FindObjectsInit;
1033 CK_C_FindObjects C_FindObjects;
1034 CK_C_FindObjectsFinal C_FindObjectsFinal;
1035 CK_C_EncryptInit C_EncryptInit;
1036 CK_C_Encrypt C_Encrypt;
1037 CK_C_EncryptUpdate C_EncryptUpdate;
1038 CK_C_EncryptFinal C_EncryptFinal;
1039 CK_C_DecryptInit C_DecryptInit;
1040 CK_C_Decrypt C_Decrypt;
1041 CK_C_DecryptUpdate C_DecryptUpdate;
1042 CK_C_DecryptFinal C_DecryptFinal;
1043 CK_C_DigestInit C_DigestInit;
1044 CK_C_Digest C_Digest;
1045 CK_C_DigestUpdate C_DigestUpdate;
1046 CK_C_DigestKey C_DigestKey;
1047 CK_C_DigestFinal C_DigestFinal;
1048 CK_C_SignInit C_SignInit;
1049 CK_C_Sign C_Sign;
1050 CK_C_SignUpdate C_SignUpdate;
1051 CK_C_SignFinal C_SignFinal;
1052 CK_C_SignRecoverInit C_SignRecoverInit;
1053 CK_C_SignRecover C_SignRecover;
1054 CK_C_VerifyInit C_VerifyInit;
1055 CK_C_Verify C_Verify;
1056 CK_C_VerifyUpdate C_VerifyUpdate;
1057 CK_C_VerifyFinal C_VerifyFinal;
1058 CK_C_VerifyRecoverInit C_VerifyRecoverInit;
1059 CK_C_VerifyRecover C_VerifyRecover;
1060 CK_C_DigestEncryptUpdate C_DigestEncryptUpdate;
1061 CK_C_DecryptDigestUpdate C_DecryptDigestUpdate;
1062 CK_C_SignEncryptUpdate C_SignEncryptUpdate;
1063 CK_C_DecryptVerifyUpdate C_DecryptVerifyUpdate;
1064 CK_C_GenerateKey C_GenerateKey;
1065 CK_C_GenerateKeyPair C_GenerateKeyPair;
1066 CK_C_WrapKey C_WrapKey;
1067 CK_C_UnwrapKey C_UnwrapKey;
1068 CK_C_DeriveKey C_DeriveKey;
1069 CK_C_SeedRandom C_SeedRandom;
1070 CK_C_GenerateRandom C_GenerateRandom;
1071 CK_C_GetFunctionStatus C_GetFunctionStatus;
1072 CK_C_CancelFunction C_CancelFunction;
1073 CK_C_WaitForSlotEvent C_WaitForSlotEvent;
1074};
1075
1076
1077typedef ck_rv_t (*ck_createmutex_t) (void **mutex);
1078typedef ck_rv_t (*ck_destroymutex_t) (void *mutex);
1079typedef ck_rv_t (*ck_lockmutex_t) (void *mutex);
1080typedef ck_rv_t (*ck_unlockmutex_t) (void *mutex);
1081
1082
1083struct ck_c_initialize_args
1084{
1085 ck_createmutex_t create_mutex;
1086 ck_destroymutex_t destroy_mutex;
1087 ck_lockmutex_t lock_mutex;
1088 ck_unlockmutex_t unlock_mutex;
1089 ck_flags_t flags;
1090 void *reserved;
1091};
1092
1093
1094#define CKF_LIBRARY_CANT_CREATE_OS_THREADS (1 << 0)
1095#define CKF_OS_LOCKING_OK (1 << 1)
1096
1097#define CKR_OK (0)
1098#define CKR_CANCEL (1)
1099#define CKR_HOST_MEMORY (2)
1100#define CKR_SLOT_ID_INVALID (3)
1101#define CKR_GENERAL_ERROR (5)
1102#define CKR_FUNCTION_FAILED (6)
1103#define CKR_ARGUMENTS_BAD (7)
1104#define CKR_NO_EVENT (8)
1105#define CKR_NEED_TO_CREATE_THREADS (9)
1106#define CKR_CANT_LOCK (0xa)
1107#define CKR_ATTRIBUTE_READ_ONLY (0x10)
1108#define CKR_ATTRIBUTE_SENSITIVE (0x11)
1109#define CKR_ATTRIBUTE_TYPE_INVALID (0x12)
1110#define CKR_ATTRIBUTE_VALUE_INVALID (0x13)
1111#define CKR_DATA_INVALID (0x20)
1112#define CKR_DATA_LEN_RANGE (0x21)
1113#define CKR_DEVICE_ERROR (0x30)
1114#define CKR_DEVICE_MEMORY (0x31)
1115#define CKR_DEVICE_REMOVED (0x32)
1116#define CKR_ENCRYPTED_DATA_INVALID (0x40)
1117#define CKR_ENCRYPTED_DATA_LEN_RANGE (0x41)
1118#define CKR_FUNCTION_CANCELED (0x50)
1119#define CKR_FUNCTION_NOT_PARALLEL (0x51)
1120#define CKR_FUNCTION_NOT_SUPPORTED (0x54)
1121#define CKR_KEY_HANDLE_INVALID (0x60)
1122#define CKR_KEY_SIZE_RANGE (0x62)
1123#define CKR_KEY_TYPE_INCONSISTENT (0x63)
1124#define CKR_KEY_NOT_NEEDED (0x64)
1125#define CKR_KEY_CHANGED (0x65)
1126#define CKR_KEY_NEEDED (0x66)
1127#define CKR_KEY_INDIGESTIBLE (0x67)
1128#define CKR_KEY_FUNCTION_NOT_PERMITTED (0x68)
1129#define CKR_KEY_NOT_WRAPPABLE (0x69)
1130#define CKR_KEY_UNEXTRACTABLE (0x6a)
1131#define CKR_MECHANISM_INVALID (0x70)
1132#define CKR_MECHANISM_PARAM_INVALID (0x71)
1133#define CKR_OBJECT_HANDLE_INVALID (0x82)
1134#define CKR_OPERATION_ACTIVE (0x90)
1135#define CKR_OPERATION_NOT_INITIALIZED (0x91)
1136#define CKR_PIN_INCORRECT (0xa0)
1137#define CKR_PIN_INVALID (0xa1)
1138#define CKR_PIN_LEN_RANGE (0xa2)
1139#define CKR_PIN_EXPIRED (0xa3)
1140#define CKR_PIN_LOCKED (0xa4)
1141#define CKR_SESSION_CLOSED (0xb0)
1142#define CKR_SESSION_COUNT (0xb1)
1143#define CKR_SESSION_HANDLE_INVALID (0xb3)
1144#define CKR_SESSION_PARALLEL_NOT_SUPPORTED (0xb4)
1145#define CKR_SESSION_READ_ONLY (0xb5)
1146#define CKR_SESSION_EXISTS (0xb6)
1147#define CKR_SESSION_READ_ONLY_EXISTS (0xb7)
1148#define CKR_SESSION_READ_WRITE_SO_EXISTS (0xb8)
1149#define CKR_SIGNATURE_INVALID (0xc0)
1150#define CKR_SIGNATURE_LEN_RANGE (0xc1)
1151#define CKR_TEMPLATE_INCOMPLETE (0xd0)
1152#define CKR_TEMPLATE_INCONSISTENT (0xd1)
1153#define CKR_TOKEN_NOT_PRESENT (0xe0)
1154#define CKR_TOKEN_NOT_RECOGNIZED (0xe1)
1155#define CKR_TOKEN_WRITE_PROTECTED (0xe2)
1156#define CKR_UNWRAPPING_KEY_HANDLE_INVALID (0xf0)
1157#define CKR_UNWRAPPING_KEY_SIZE_RANGE (0xf1)
1158#define CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT (0xf2)
1159#define CKR_USER_ALREADY_LOGGED_IN (0x100)
1160#define CKR_USER_NOT_LOGGED_IN (0x101)
1161#define CKR_USER_PIN_NOT_INITIALIZED (0x102)
1162#define CKR_USER_TYPE_INVALID (0x103)
1163#define CKR_USER_ANOTHER_ALREADY_LOGGED_IN (0x104)
1164#define CKR_USER_TOO_MANY_TYPES (0x105)
1165#define CKR_WRAPPED_KEY_INVALID (0x110)
1166#define CKR_WRAPPED_KEY_LEN_RANGE (0x112)
1167#define CKR_WRAPPING_KEY_HANDLE_INVALID (0x113)
1168#define CKR_WRAPPING_KEY_SIZE_RANGE (0x114)
1169#define CKR_WRAPPING_KEY_TYPE_INCONSISTENT (0x115)
1170#define CKR_RANDOM_SEED_NOT_SUPPORTED (0x120)
1171#define CKR_RANDOM_NO_RNG (0x121)
1172#define CKR_DOMAIN_PARAMS_INVALID (0x130)
1173#define CKR_BUFFER_TOO_SMALL (0x150)
1174#define CKR_SAVED_STATE_INVALID (0x160)
1175#define CKR_INFORMATION_SENSITIVE (0x170)
1176#define CKR_STATE_UNSAVEABLE (0x180)
1177#define CKR_CRYPTOKI_NOT_INITIALIZED (0x190)
1178#define CKR_CRYPTOKI_ALREADY_INITIALIZED (0x191)
1179#define CKR_MUTEX_BAD (0x1a0)
1180#define CKR_MUTEX_NOT_LOCKED (0x1a1)
1181#define CKR_FUNCTION_REJECTED (0x200)
1182#define CKR_VENDOR_DEFINED ((unsigned long) (1 << 31))
1183
1184
1185
1186/* Compatibility layer. */
1187
1188#ifdef CRYPTOKI_COMPAT
1189
1190#undef CK_DEFINE_FUNCTION
1191#define CK_DEFINE_FUNCTION(retval, name) retval CK_SPEC name
1192
1193/* For NULL. */
1194#include <stddef.h>
1195
1196typedef unsigned char CK_BYTE;
1197typedef unsigned char CK_CHAR;
1198typedef unsigned char CK_UTF8CHAR;
1199typedef unsigned char CK_BBOOL;
1200typedef unsigned long int CK_ULONG;
1201typedef long int CK_LONG;
1202typedef CK_BYTE *CK_BYTE_PTR;
1203typedef CK_CHAR *CK_CHAR_PTR;
1204typedef CK_UTF8CHAR *CK_UTF8CHAR_PTR;
1205typedef CK_ULONG *CK_ULONG_PTR;
1206typedef void *CK_VOID_PTR;
1207typedef void **CK_VOID_PTR_PTR;
1208#define CK_FALSE 0
1209#define CK_TRUE 1
1210#ifndef CK_DISABLE_TRUE_FALSE
1211#ifndef FALSE
1212#define FALSE 0
1213#endif
1214#ifndef TRUE
1215#define TRUE 1
1216#endif
1217#endif
1218
1219typedef struct ck_version CK_VERSION;
1220typedef struct ck_version *CK_VERSION_PTR;
1221
1222typedef struct ck_info CK_INFO;
1223typedef struct ck_info *CK_INFO_PTR;
1224
1225typedef ck_slot_id_t *CK_SLOT_ID_PTR;
1226
1227typedef struct ck_slot_info CK_SLOT_INFO;
1228typedef struct ck_slot_info *CK_SLOT_INFO_PTR;
1229
1230typedef struct ck_token_info CK_TOKEN_INFO;
1231typedef struct ck_token_info *CK_TOKEN_INFO_PTR;
1232
1233typedef ck_session_handle_t *CK_SESSION_HANDLE_PTR;
1234
1235typedef struct ck_session_info CK_SESSION_INFO;
1236typedef struct ck_session_info *CK_SESSION_INFO_PTR;
1237
1238typedef ck_object_handle_t *CK_OBJECT_HANDLE_PTR;
1239
1240typedef ck_object_class_t *CK_OBJECT_CLASS_PTR;
1241
1242typedef struct ck_attribute CK_ATTRIBUTE;
1243typedef struct ck_attribute *CK_ATTRIBUTE_PTR;
1244
1245typedef struct ck_date CK_DATE;
1246typedef struct ck_date *CK_DATE_PTR;
1247
1248typedef ck_mechanism_type_t *CK_MECHANISM_TYPE_PTR;
1249
1250typedef struct ck_mechanism CK_MECHANISM;
1251typedef struct ck_mechanism *CK_MECHANISM_PTR;
1252
1253typedef struct ck_mechanism_info CK_MECHANISM_INFO;
1254typedef struct ck_mechanism_info *CK_MECHANISM_INFO_PTR;
1255
1256typedef struct ck_function_list CK_FUNCTION_LIST;
1257typedef struct ck_function_list *CK_FUNCTION_LIST_PTR;
1258typedef struct ck_function_list **CK_FUNCTION_LIST_PTR_PTR;
1259
1260typedef struct ck_c_initialize_args CK_C_INITIALIZE_ARGS;
1261typedef struct ck_c_initialize_args *CK_C_INITIALIZE_ARGS_PTR;
1262
1263#define NULL_PTR NULL
1264
1265/* Delete the helper macros defined at the top of the file. */
1266#undef ck_flags_t
1267#undef ck_version
1268
1269#undef ck_info
1270#undef cryptoki_version
1271#undef manufacturer_id
1272#undef library_description
1273#undef library_version
1274
1275#undef ck_notification_t
1276#undef ck_slot_id_t
1277
1278#undef ck_slot_info
1279#undef slot_description
1280#undef hardware_version
1281#undef firmware_version
1282
1283#undef ck_token_info
1284#undef serial_number
1285#undef max_session_count
1286#undef session_count
1287#undef max_rw_session_count
1288#undef rw_session_count
1289#undef max_pin_len
1290#undef min_pin_len
1291#undef total_public_memory
1292#undef free_public_memory
1293#undef total_private_memory
1294#undef free_private_memory
1295#undef utc_time
1296
1297#undef ck_session_handle_t
1298#undef ck_user_type_t
1299#undef ck_state_t
1300
1301#undef ck_session_info
1302#undef slot_id
1303#undef device_error
1304
1305#undef ck_object_handle_t
1306#undef ck_object_class_t
1307#undef ck_hw_feature_type_t
1308#undef ck_key_type_t
1309#undef ck_certificate_type_t
1310#undef ck_attribute_type_t
1311
1312#undef ck_attribute
1313#undef value
1314#undef value_len
1315
1316#undef ck_date
1317
1318#undef ck_mechanism_type_t
1319
1320#undef ck_mechanism
1321#undef parameter
1322#undef parameter_len
1323
1324#undef ck_mechanism_info
1325#undef min_key_size
1326#undef max_key_size
1327
1328#undef ck_rv_t
1329#undef ck_notify_t
1330
1331#undef ck_function_list
1332
1333#undef ck_createmutex_t
1334#undef ck_destroymutex_t
1335#undef ck_lockmutex_t
1336#undef ck_unlockmutex_t
1337
1338#undef ck_c_initialize_args
1339#undef create_mutex
1340#undef destroy_mutex
1341#undef lock_mutex
1342#undef unlock_mutex
1343#undef reserved
1344
1345#endif /* CRYPTOKI_COMPAT */
1346
1347
1348/* System dependencies. */
1349#if defined(_WIN32) || defined(CRYPTOKI_FORCE_WIN32)
1350#pragma pack(pop, cryptoki)
1351#endif
1352
1353#if defined(__cplusplus)
1354}
1355#endif
1356
1357#endif /* PKCS11_H */
diff --git a/platform.c b/platform.c
index aee4b01e7..e3a428aaa 100644
--- a/platform.c
+++ b/platform.c
@@ -1,4 +1,4 @@
1/* $Id: platform.c,v 1.1 2006/08/30 17:24:41 djm Exp $ */ 1/* $Id: platform.c,v 1.3 2009/12/20 23:49:22 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2006 Darren Tucker. All rights reserved. 4 * Copyright (c) 2006 Darren Tucker. All rights reserved.
@@ -22,6 +22,15 @@
22#include "openbsd-compat/openbsd-compat.h" 22#include "openbsd-compat/openbsd-compat.h"
23 23
24void 24void
25platform_pre_listen(void)
26{
27#ifdef LINUX_OOM_ADJUST
28 /* Adjust out-of-memory killer so listening process is not killed */
29 oom_adjust_setup();
30#endif
31}
32
33void
25platform_pre_fork(void) 34platform_pre_fork(void)
26{ 35{
27#ifdef USE_SOLARIS_PROCESS_CONTRACTS 36#ifdef USE_SOLARIS_PROCESS_CONTRACTS
@@ -43,4 +52,17 @@ platform_post_fork_child(void)
43#ifdef USE_SOLARIS_PROCESS_CONTRACTS 52#ifdef USE_SOLARIS_PROCESS_CONTRACTS
44 solaris_contract_post_fork_child(); 53 solaris_contract_post_fork_child();
45#endif 54#endif
55#ifdef LINUX_OOM_ADJUST
56 oom_adjust_restore();
57#endif
58}
59
60char *
61platform_krb5_get_principal_name(const char *pw_name)
62{
63#ifdef USE_AIX_KRB_NAME
64 return aix_krb5_get_principal_name(pw_name);
65#else
66 return NULL;
67#endif
46} 68}
diff --git a/platform.h b/platform.h
index cf93bc57c..30a1d2259 100644
--- a/platform.h
+++ b/platform.h
@@ -1,4 +1,4 @@
1/* $Id: platform.h,v 1.1 2006/08/30 17:24:41 djm Exp $ */ 1/* $Id: platform.h,v 1.4 2010/01/14 01:44:16 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2006 Darren Tucker. All rights reserved. 4 * Copyright (c) 2006 Darren Tucker. All rights reserved.
@@ -18,6 +18,11 @@
18 18
19#include <sys/types.h> 19#include <sys/types.h>
20 20
21void platform_pre_listen(void);
21void platform_pre_fork(void); 22void platform_pre_fork(void);
22void platform_post_fork_parent(pid_t child_pid); 23void platform_post_fork_parent(pid_t child_pid);
23void platform_post_fork_child(void); 24void platform_post_fork_child(void);
25char *platform_get_krb5_client(const char *);
26char *platform_krb5_get_principal_name(const char *);
27
28
diff --git a/readconf.c b/readconf.c
index 163244ed9..487c3399b 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.c,v 1.177 2009/06/27 09:35:06 andreas Exp $ */ 1/* $OpenBSD: readconf.c,v 1.183 2010/02/08 10:50:20 markus 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
@@ -126,7 +126,7 @@ typedef enum {
126 oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias, 126 oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias,
127 oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication, 127 oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication,
128 oUseBlacklistedKeys, 128 oUseBlacklistedKeys,
129 oHostKeyAlgorithms, oBindAddress, oSmartcardDevice, 129 oHostKeyAlgorithms, oBindAddress, oPKCS11Provider,
130 oClearAllForwardings, oNoHostAuthenticationForLocalhost, 130 oClearAllForwardings, oNoHostAuthenticationForLocalhost,
131 oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout, 131 oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,
132 oAddressFamily, oGssAuthentication, oGssDelegateCreds, 132 oAddressFamily, oGssAuthentication, oGssDelegateCreds,
@@ -219,10 +219,12 @@ static struct {
219 { "preferredauthentications", oPreferredAuthentications }, 219 { "preferredauthentications", oPreferredAuthentications },
220 { "hostkeyalgorithms", oHostKeyAlgorithms }, 220 { "hostkeyalgorithms", oHostKeyAlgorithms },
221 { "bindaddress", oBindAddress }, 221 { "bindaddress", oBindAddress },
222#ifdef SMARTCARD 222#ifdef ENABLE_PKCS11
223 { "smartcarddevice", oSmartcardDevice }, 223 { "smartcarddevice", oPKCS11Provider },
224 { "pkcs11provider", oPKCS11Provider },
224#else 225#else
225 { "smartcarddevice", oUnsupported }, 226 { "smartcarddevice", oUnsupported },
227 { "pkcs11provider", oUnsupported },
226#endif 228#endif
227 { "clearallforwardings", oClearAllForwardings }, 229 { "clearallforwardings", oClearAllForwardings },
228 { "enablesshkeysign", oEnableSSHKeysign }, 230 { "enablesshkeysign", oEnableSSHKeysign },
@@ -645,8 +647,8 @@ parse_string:
645 charptr = &options->bind_address; 647 charptr = &options->bind_address;
646 goto parse_string; 648 goto parse_string;
647 649
648 case oSmartcardDevice: 650 case oPKCS11Provider:
649 charptr = &options->smartcard_device; 651 charptr = &options->pkcs11_provider;
650 goto parse_string; 652 goto parse_string;
651 653
652 case oProxyCommand: 654 case oProxyCommand:
@@ -1113,7 +1115,7 @@ initialize_options(Options * options)
1113 options->log_level = SYSLOG_LEVEL_NOT_SET; 1115 options->log_level = SYSLOG_LEVEL_NOT_SET;
1114 options->preferred_authentications = NULL; 1116 options->preferred_authentications = NULL;
1115 options->bind_address = NULL; 1117 options->bind_address = NULL;
1116 options->smartcard_device = NULL; 1118 options->pkcs11_provider = NULL;
1117 options->enable_ssh_keysign = - 1; 1119 options->enable_ssh_keysign = - 1;
1118 options->no_host_authentication_for_localhost = - 1; 1120 options->no_host_authentication_for_localhost = - 1;
1119 options->identities_only = - 1; 1121 options->identities_only = - 1;
@@ -1212,7 +1214,7 @@ fill_default_options(Options * options)
1212 /* options->macs, default set in myproposals.h */ 1214 /* options->macs, default set in myproposals.h */
1213 /* options->hostkeyalgorithms, default set in myproposals.h */ 1215 /* options->hostkeyalgorithms, default set in myproposals.h */
1214 if (options->protocol == SSH_PROTO_UNKNOWN) 1216 if (options->protocol == SSH_PROTO_UNKNOWN)
1215 options->protocol = SSH_PROTO_1|SSH_PROTO_2; 1217 options->protocol = SSH_PROTO_2;
1216 if (options->num_identity_files == 0) { 1218 if (options->num_identity_files == 0) {
1217 if (options->protocol & SSH_PROTO_1) { 1219 if (options->protocol & SSH_PROTO_1) {
1218 len = 2 + strlen(_PATH_SSH_CLIENT_IDENTITY) + 1; 1220 len = 2 + strlen(_PATH_SSH_CLIENT_IDENTITY) + 1;
diff --git a/readconf.h b/readconf.h
index 8ac426dbd..24762e71c 100644
--- a/readconf.h
+++ b/readconf.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.h,v 1.79 2009/06/27 09:35:06 andreas Exp $ */ 1/* $OpenBSD: readconf.h,v 1.82 2010/02/08 10:50:20 markus Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -89,7 +89,7 @@ typedef struct {
89 char *user_hostfile2; 89 char *user_hostfile2;
90 char *preferred_authentications; 90 char *preferred_authentications;
91 char *bind_address; /* local socket address for connection to sshd */ 91 char *bind_address; /* local socket address for connection to sshd */
92 char *smartcard_device; /* Smartcard reader device */ 92 char *pkcs11_provider; /* PKCS#11 provider */
93 int verify_host_key_dns; /* Verify host key using DNS */ 93 int verify_host_key_dns; /* Verify host key using DNS */
94 94
95 int num_identity_files; /* Number of files for RSA/DSA identities. */ 95 int num_identity_files; /* Number of files for RSA/DSA identities. */
diff --git a/regress/Makefile b/regress/Makefile
index 3b8ea245b..d25a64555 100644
--- a/regress/Makefile
+++ b/regress/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.48 2008/06/28 13:57:25 djm Exp $ 1# $OpenBSD: Makefile,v 1.52 2010/02/26 20:33:21 djm 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)
@@ -34,6 +34,7 @@ LTESTS= connect \
34 agent-ptrace \ 34 agent-ptrace \
35 keyscan \ 35 keyscan \
36 keygen-change \ 36 keygen-change \
37 keygen-convert \
37 key-options \ 38 key-options \
38 scp \ 39 scp \
39 sftp \ 40 sftp \
@@ -50,7 +51,10 @@ LTESTS= connect \
50 cfgmatch \ 51 cfgmatch \
51 addrmatch \ 52 addrmatch \
52 localcommand \ 53 localcommand \
53 forcecommand 54 forcecommand \
55 portnum \
56 cert-hostkey \
57 cert-userkey
54 58
55INTEROP_TESTS= putty-transfer putty-ciphers putty-kex conch-ciphers 59INTEROP_TESTS= putty-transfer putty-ciphers putty-kex conch-ciphers
56#INTEROP_TESTS+=ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp 60#INTEROP_TESTS+=ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp
@@ -64,7 +68,11 @@ CLEANFILES= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \
64 ls.copy banner.in banner.out empty.in \ 68 ls.copy banner.in banner.out empty.in \
65 scp-ssh-wrapper.scp ssh_proxy_envpass remote_pid \ 69 scp-ssh-wrapper.scp ssh_proxy_envpass remote_pid \
66 sshd_proxy_bak rsa_ssh2_cr.prv rsa_ssh2_crnl.prv \ 70 sshd_proxy_bak rsa_ssh2_cr.prv rsa_ssh2_crnl.prv \
67 putty.rsa2 71 known_hosts-cert host_ca_key* cert_host_key* \
72 putty.rsa2 sshd_proxy_orig
73
74# Enable all malloc(3) randomisations and checks
75TEST_ENV= "MALLOC_OPTIONS=AFGJPRX"
68 76
69t1: 77t1:
70 ssh-keygen -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv 78 ssh-keygen -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv
@@ -104,13 +112,13 @@ t-exec: ${LTESTS:=.sh}
104 @if [ "x$?" = "x" ]; then exit 0; fi; \ 112 @if [ "x$?" = "x" ]; then exit 0; fi; \
105 for TEST in ""$?; do \ 113 for TEST in ""$?; do \
106 echo "run test $${TEST}" ... 1>&2; \ 114 echo "run test $${TEST}" ... 1>&2; \
107 (env SUDO=${SUDO} sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \ 115 (env SUDO=${SUDO} TEST_ENV=${TEST_ENV} sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \
108 done 116 done
109 117
110t-exec-interop: ${INTEROP_TESTS:=.sh} 118t-exec-interop: ${INTEROP_TESTS:=.sh}
111 @if [ "x$?" = "x" ]; then exit 0; fi; \ 119 @if [ "x$?" = "x" ]; then exit 0; fi; \
112 for TEST in ""$?; do \ 120 for TEST in ""$?; do \
113 echo "run test $${TEST}" ... 1>&2; \ 121 echo "run test $${TEST}" ... 1>&2; \
114 (env SUDO=${SUDO} sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \ 122 (env SUDO=${SUDO} TEST_ENV=${TEST_ENV} sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \
115 done 123 done
116 124
diff --git a/regress/addrmatch.sh b/regress/addrmatch.sh
index a258f7bb4..23ddd65ce 100644
--- a/regress/addrmatch.sh
+++ b/regress/addrmatch.sh
@@ -1,9 +1,9 @@
1# $OpenBSD: addrmatch.sh,v 1.1 2008/06/10 05:23:32 dtucker Exp $ 1# $OpenBSD: addrmatch.sh,v 1.3 2010/02/09 04:57:36 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="address match" 4tid="address match"
5 5
6mv $OBJ/sshd_proxy $OBJ/sshd_proxy_orig 6mv $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
7 7
8run_trial() 8run_trial()
9{ 9{
@@ -12,13 +12,13 @@ run_trial()
12 verbose "test $descr for $user $addr $host" 12 verbose "test $descr for $user $addr $host"
13 result=`${SSHD} -f $OBJ/sshd_proxy -T \ 13 result=`${SSHD} -f $OBJ/sshd_proxy -T \
14 -C user=${user},addr=${addr},host=${host} | \ 14 -C user=${user},addr=${addr},host=${host} | \
15 awk '/passwordauthentication/ {print $2}'` 15 awk '/^passwordauthentication/ {print $2}'`
16 if [ "$result" != "$expected" ]; then 16 if [ "$result" != "$expected" ]; then
17 fail "failed for $user $addr $host: expected $expected, got $result" 17 fail "failed for $user $addr $host: expected $expected, got $result"
18 fi 18 fi
19} 19}
20 20
21cp $OBJ/sshd_proxy_orig $OBJ/sshd_proxy 21cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy
22cat >>$OBJ/sshd_proxy <<EOD 22cat >>$OBJ/sshd_proxy <<EOD
23PasswordAuthentication no 23PasswordAuthentication no
24Match Address 192.168.0.0/16,!192.168.30.0/24,10.0.0.0/8,host.example.com 24Match Address 192.168.0.0/16,!192.168.30.0/24,10.0.0.0/8,host.example.com
@@ -40,3 +40,6 @@ run_trial user ::3 somehost no "deny IP6 negated"
40run_trial user ::4 somehost no "deny, IP6 no match" 40run_trial user ::4 somehost no "deny, IP6 no match"
41run_trial user 2000::1 somehost yes "permit, IP6 network" 41run_trial user 2000::1 somehost yes "permit, IP6 network"
42run_trial user 2001::1 somehost no "deny, IP6 network" 42run_trial user 2001::1 somehost no "deny, IP6 network"
43
44cp $OBJ/sshd_proxy_bak $OBJ/sshd_proxy
45rm $OBJ/sshd_proxy_bak
diff --git a/regress/agent-pkcs11.sh b/regress/agent-pkcs11.sh
new file mode 100644
index 000000000..db33ab37e
--- /dev/null
+++ b/regress/agent-pkcs11.sh
@@ -0,0 +1,69 @@
1# $OpenBSD: agent-pkcs11.sh,v 1.1 2010/02/08 10:52:47 markus Exp $
2# Placed in the Public Domain.
3
4tid="pkcs11 agent test"
5
6TEST_SSH_PIN=""
7TEST_SSH_PKCS11=/usr/local/lib/soft-pkcs11.so.0.0
8
9# setup environment for soft-pkcs11 token
10SOFTPKCS11RC=$OBJ/pkcs11.info
11export SOFTPKCS11RC
12# prevent ssh-agent from calling ssh-askpass
13SSH_ASKPASS=/usr/bin/true
14export SSH_ASKPASS
15unset DISPLAY
16
17# start command w/o tty, so ssh-add accepts pin from stdin
18notty() {
19 perl -e 'use POSIX; POSIX::setsid();
20 if (fork) { wait; exit($? >> 8); } else { exec(@ARGV) }' "$@"
21}
22
23trace "start agent"
24eval `${SSHAGENT} -s` > /dev/null
25r=$?
26if [ $r -ne 0 ]; then
27 fail "could not start ssh-agent: exit code $r"
28else
29 trace "generating key/cert"
30 rm -f $OBJ/pkcs11.key $OBJ/pkcs11.crt
31 openssl genrsa -out $OBJ/pkcs11.key 2048 > /dev/null 2>&1
32 chmod 600 $OBJ/pkcs11.key
33 openssl req -key $OBJ/pkcs11.key -new -x509 \
34 -out $OBJ/pkcs11.crt -text -subj '/CN=pkcs11 test' > /dev/null
35 printf "a\ta\t$OBJ/pkcs11.crt\t$OBJ/pkcs11.key" > $SOFTPKCS11RC
36 # add to authorized keys
37 ${SSHKEYGEN} -y -f $OBJ/pkcs11.key > $OBJ/authorized_keys_$USER
38
39 trace "add pkcs11 key to agent"
40 echo ${TEST_SSH_PIN} | notty ${SSHADD} -s ${TEST_SSH_PKCS11} > /dev/null 2>&1
41 r=$?
42 if [ $r -ne 0 ]; then
43 fail "ssh-add -s failed: exit code $r"
44 fi
45
46 trace "pkcs11 list via agent"
47 ${SSHADD} -l > /dev/null 2>&1
48 r=$?
49 if [ $r -ne 0 ]; then
50 fail "ssh-add -l failed: exit code $r"
51 fi
52
53 trace "pkcs11 connect via agent"
54 ${SSH} -2 -F $OBJ/ssh_proxy somehost exit 5
55 r=$?
56 if [ $r -ne 5 ]; then
57 fail "ssh connect failed (exit code $r)"
58 fi
59
60 trace "remove pkcs11 keys"
61 echo ${TEST_SSH_PIN} | notty ${SSHADD} -e ${TEST_SSH_PKCS11} > /dev/null 2>&1
62 r=$?
63 if [ $r -ne 0 ]; then
64 fail "ssh-add -e failed: exit code $r"
65 fi
66
67 trace "kill agent"
68 ${SSHAGENT} -k > /dev/null
69fi
diff --git a/regress/cert-hostkey.sh b/regress/cert-hostkey.sh
new file mode 100644
index 000000000..3fda667cb
--- /dev/null
+++ b/regress/cert-hostkey.sh
@@ -0,0 +1,211 @@
1# $OpenBSD: cert-hostkey.sh,v 1.3 2010/03/04 10:38:23 djm Exp $
2# Placed in the Public Domain.
3
4tid="certified host keys"
5
6rm -f $OBJ/known_hosts-cert $OBJ/host_ca_key* $OBJ/cert_host_key*
7cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
8
9HOSTS='localhost-with-alias,127.0.0.1,::1'
10
11# Create a CA key and add it to known hosts
12${SSHKEYGEN} -q -N '' -t rsa -f $OBJ/host_ca_key ||\
13 fail "ssh-keygen of host_ca_key failed"
14(
15 echon '@cert-authority '
16 echon "$HOSTS "
17 cat $OBJ/host_ca_key.pub
18) > $OBJ/known_hosts-cert
19
20# Generate and sign host keys
21for ktype in rsa dsa ; do
22 verbose "$tid: sign host ${ktype} cert"
23 # Generate and sign a host key
24 ${SSHKEYGEN} -q -N '' -t ${ktype} \
25 -f $OBJ/cert_host_key_${ktype} || \
26 fail "ssh-keygen of cert_host_key_${ktype} failed"
27 ${SSHKEYGEN} -h -q -s $OBJ/host_ca_key \
28 -I "regress host key for $USER" \
29 -n $HOSTS $OBJ/cert_host_key_${ktype} ||
30 fail "couldn't sign cert_host_key_${ktype}"
31done
32
33# Basic connect tests
34for privsep in yes no ; do
35 for ktype in rsa dsa ; do
36 verbose "$tid: host ${ktype} cert connect privsep $privsep"
37 (
38 cat $OBJ/sshd_proxy_bak
39 echo HostKey $OBJ/cert_host_key_${ktype}
40 echo HostCertificate $OBJ/cert_host_key_${ktype}-cert.pub
41 echo UsePrivilegeSeparation $privsep
42 ) > $OBJ/sshd_proxy
43
44 ${SSH} -2 -oUserKnownHostsFile=$OBJ/known_hosts-cert \
45 -oGlobalKnownHostsFile=$OBJ/known_hosts-cert \
46 -F $OBJ/ssh_proxy somehost true
47 if [ $? -ne 0 ]; then
48 fail "ssh cert connect failed"
49 fi
50 done
51done
52
53# Revoked certificates with key present
54(
55 echon '@cert-authority '
56 echon "$HOSTS "
57 cat $OBJ/host_ca_key.pub
58 echon '@revoked '
59 echon "* "
60 cat $OBJ/cert_host_key_rsa.pub
61 echon '@revoked '
62 echon "* "
63 cat $OBJ/cert_host_key_dsa.pub
64) > $OBJ/known_hosts-cert
65for privsep in yes no ; do
66 for ktype in rsa dsa ; do
67 verbose "$tid: host ${ktype} revoked cert privsep $privsep"
68 (
69 cat $OBJ/sshd_proxy_bak
70 echo HostKey $OBJ/cert_host_key_${ktype}
71 echo HostCertificate $OBJ/cert_host_key_${ktype}-cert.pub
72 echo UsePrivilegeSeparation $privsep
73 ) > $OBJ/sshd_proxy
74
75 ${SSH} -2 -oUserKnownHostsFile=$OBJ/known_hosts-cert \
76 -oGlobalKnownHostsFile=$OBJ/known_hosts-cert \
77 -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
78 if [ $? -eq 0 ]; then
79 fail "ssh cert connect succeeded unexpectedly"
80 fi
81 done
82done
83
84# Revoked CA
85(
86 echon '@cert-authority '
87 echon "$HOSTS "
88 cat $OBJ/host_ca_key.pub
89 echon '@revoked '
90 echon "* "
91 cat $OBJ/host_ca_key.pub
92) > $OBJ/known_hosts-cert
93for ktype in rsa dsa ; do
94 verbose "$tid: host ${ktype} revoked cert"
95 (
96 cat $OBJ/sshd_proxy_bak
97 echo HostKey $OBJ/cert_host_key_${ktype}
98 echo HostCertificate $OBJ/cert_host_key_${ktype}-cert.pub
99 ) > $OBJ/sshd_proxy
100 ${SSH} -2 -oUserKnownHostsFile=$OBJ/known_hosts-cert \
101 -oGlobalKnownHostsFile=$OBJ/known_hosts-cert \
102 -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
103 if [ $? -eq 0 ]; then
104 fail "ssh cert connect succeeded unexpectedly"
105 fi
106done
107
108# Create a CA key and add it to known hosts
109(
110 echon '@cert-authority '
111 echon "$HOSTS "
112 cat $OBJ/host_ca_key.pub
113) > $OBJ/known_hosts-cert
114
115test_one() {
116 ident=$1
117 result=$2
118 sign_opts=$3
119
120 verbose "$tid: test host cert connect $ident expect $result"
121
122 ${SSHKEYGEN} -q -s $OBJ/host_ca_key -I "regress host key for $USER" \
123 $sign_opts \
124 $OBJ/cert_host_key_rsa ||
125 fail "couldn't sign cert_host_key_rsa"
126 (
127 cat $OBJ/sshd_proxy_bak
128 echo HostKey $OBJ/cert_host_key_rsa
129 echo HostCertificate $OBJ/cert_host_key_rsa-cert.pub
130 ) > $OBJ/sshd_proxy
131
132 ${SSH} -2 -oUserKnownHostsFile=$OBJ/known_hosts-cert \
133 -oGlobalKnownHostsFile=$OBJ/known_hosts-cert \
134 -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
135 rc=$?
136 if [ "x$result" = "xsuccess" ] ; then
137 if [ $rc -ne 0 ]; then
138 fail "ssh cert connect $ident failed unexpectedly"
139 fi
140 else
141 if [ $rc -eq 0 ]; then
142 fail "ssh cert connect $ident succeeded unexpectedly"
143 fi
144 fi
145}
146
147test_one "user-certificate" failure "-n $HOSTS"
148test_one "empty principals" success "-h"
149test_one "wrong principals" failure "-h -n foo"
150test_one "cert not yet valid" failure "-h -V20200101:20300101"
151test_one "cert expired" failure "-h -V19800101:19900101"
152test_one "cert valid interval" success "-h -V-1w:+2w"
153test_one "cert has constraints" failure "-h -Oforce-command=false"
154
155# Check downgrade of cert to raw key when no CA found
156rm -f $OBJ/known_hosts-cert $OBJ/cert_host_key*
157for ktype in rsa dsa ; do
158 verbose "$tid: host ${ktype} cert downgrade to raw key"
159 # Generate and sign a host key
160 ${SSHKEYGEN} -q -N '' -t ${ktype} \
161 -f $OBJ/cert_host_key_${ktype} || \
162 fail "ssh-keygen of cert_host_key_${ktype} failed"
163 ${SSHKEYGEN} -h -q -s $OBJ/host_ca_key -I "regress host key for $USER" \
164 -n $HOSTS $OBJ/cert_host_key_${ktype} ||
165 fail "couldn't sign cert_host_key_${ktype}"
166 (
167 echon "$HOSTS "
168 cat $OBJ/cert_host_key_${ktype}.pub
169 ) > $OBJ/known_hosts-cert
170 (
171 cat $OBJ/sshd_proxy_bak
172 echo HostKey $OBJ/cert_host_key_${ktype}
173 echo HostCertificate $OBJ/cert_host_key_${ktype}-cert.pub
174 ) > $OBJ/sshd_proxy
175
176 ${SSH} -2 -oUserKnownHostsFile=$OBJ/known_hosts-cert \
177 -oGlobalKnownHostsFile=$OBJ/known_hosts-cert \
178 -F $OBJ/ssh_proxy somehost true
179 if [ $? -ne 0 ]; then
180 fail "ssh cert connect failed"
181 fi
182done
183
184# Wrong certificate
185(
186 echon '@cert-authority '
187 echon "$HOSTS "
188 cat $OBJ/host_ca_key.pub
189) > $OBJ/known_hosts-cert
190for ktype in rsa dsa ; do
191 # Self-sign key
192 ${SSHKEYGEN} -h -q -s $OBJ/cert_host_key_${ktype} \
193 -I "regress host key for $USER" \
194 -n $HOSTS $OBJ/cert_host_key_${ktype} ||
195 fail "couldn't sign cert_host_key_${ktype}"
196 verbose "$tid: host ${ktype} connect wrong cert"
197 (
198 cat $OBJ/sshd_proxy_bak
199 echo HostKey $OBJ/cert_host_key_${ktype}
200 echo HostCertificate $OBJ/cert_host_key_${ktype}-cert.pub
201 ) > $OBJ/sshd_proxy
202
203 ${SSH} -2 -oUserKnownHostsFile=$OBJ/known_hosts-cert \
204 -oGlobalKnownHostsFile=$OBJ/known_hosts-cert \
205 -F $OBJ/ssh_proxy -q somehost true >/dev/null 2>&1
206 if [ $? -eq 0 ]; then
207 fail "ssh cert connect $ident succeeded unexpectedly"
208 fi
209done
210
211rm -f $OBJ/known_hosts-cert $OBJ/host_ca_key* $OBJ/cert_host_key*
diff --git a/regress/cert-userkey.sh b/regress/cert-userkey.sh
new file mode 100644
index 000000000..7a58e7b75
--- /dev/null
+++ b/regress/cert-userkey.sh
@@ -0,0 +1,176 @@
1# $OpenBSD: cert-userkey.sh,v 1.3 2010/03/04 10:38:23 djm Exp $
2# Placed in the Public Domain.
3
4tid="certified user keys"
5
6rm -f $OBJ/authorized_keys_$USER $OBJ/user_ca_key* $OBJ/cert_user_key*
7cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
8
9# Create a CA key
10${SSHKEYGEN} -q -N '' -t rsa -f $OBJ/user_ca_key ||\
11 fail "ssh-keygen of user_ca_key failed"
12
13# Generate and sign user keys
14for ktype in rsa dsa ; do
15 verbose "$tid: sign user ${ktype} cert"
16 ${SSHKEYGEN} -q -N '' -t ${ktype} \
17 -f $OBJ/cert_user_key_${ktype} || \
18 fail "ssh-keygen of cert_user_key_${ktype} failed"
19 ${SSHKEYGEN} -q -s $OBJ/user_ca_key -I \
20 "regress user key for $USER" \
21 -n $USER $OBJ/cert_user_key_${ktype} ||
22 fail "couldn't sign cert_user_key_${ktype}"
23done
24
25basic_tests() {
26 auth=$1
27 if test "x$auth" = "xauthorized_keys" ; then
28 # Add CA to authorized_keys
29 (
30 echon 'cert-authority '
31 cat $OBJ/user_ca_key.pub
32 ) > $OBJ/authorized_keys_$USER
33 else
34 echo > $OBJ/authorized_keys_$USER
35 extra_sshd="TrustedUserCAKeys $OBJ/user_ca_key.pub"
36 fi
37
38 for ktype in rsa dsa ; do
39 for privsep in yes no ; do
40 _prefix="${ktype} privsep $privsep $auth"
41 # Simple connect
42 verbose "$tid: ${_prefix} connect"
43 (
44 cat $OBJ/sshd_proxy_bak
45 echo "UsePrivilegeSeparation $privsep"
46 echo "$extra_sshd"
47 ) > $OBJ/sshd_proxy
48
49 ${SSH} -2i $OBJ/cert_user_key_${ktype} \
50 -F $OBJ/ssh_proxy somehost true
51 if [ $? -ne 0 ]; then
52 fail "ssh cert connect failed"
53 fi
54
55 # Revoked keys
56 verbose "$tid: ${_prefix} revoked key"
57 (
58 cat $OBJ/sshd_proxy_bak
59 echo "UsePrivilegeSeparation $privsep"
60 echo "RevokedKeys $OBJ/cert_user_key_${ktype}.pub"
61 echo "$extra_sshd"
62 ) > $OBJ/sshd_proxy
63 ${SSH} -2i $OBJ/cert_user_key_${ktype} \
64 -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
65 if [ $? -eq 0 ]; then
66 fail "ssh cert connect succeeded unexpecedly"
67 fi
68 done
69
70 # Revoked CA
71 verbose "$tid: ${ktype} $auth revoked CA key"
72 (
73 cat $OBJ/sshd_proxy_bak
74 echo "RevokedKeys $OBJ/user_ca_key.pub"
75 echo "$extra_sshd"
76 ) > $OBJ/sshd_proxy
77 ${SSH} -2i $OBJ/cert_user_key_${ktype} -F $OBJ/ssh_proxy \
78 somehost true >/dev/null 2>&1
79 if [ $? -eq 0 ]; then
80 fail "ssh cert connect succeeded unexpecedly"
81 fi
82 done
83
84 verbose "$tid: $auth CA does not authenticate"
85 (
86 cat $OBJ/sshd_proxy_bak
87 echo "$extra_sshd"
88 ) > $OBJ/sshd_proxy
89 verbose "$tid: ensure CA key does not authenticate user"
90 ${SSH} -2i $OBJ/user_ca_key \
91 -F $OBJ/ssh_proxy somehost true >/dev/null 2>&1
92 if [ $? -eq 0 ]; then
93 fail "ssh cert connect with CA key succeeded unexpectedly"
94 fi
95}
96
97basic_tests authorized_keys
98basic_tests TrustedUserCAKeys
99
100test_one() {
101 ident=$1
102 result=$2
103 sign_opts=$3
104 auth_choice=$4
105
106 if test "x$auth_choice" = "x" ; then
107 auth_choice="authorized_keys TrustedUserCAKeys"
108 fi
109
110 for auth in $auth_choice ; do
111 cat $OBJ/sshd_proxy_bak > $OBJ/sshd_proxy
112 if test "x$auth" = "xauthorized_keys" ; then
113 # Add CA to authorized_keys
114 (
115 echon 'cert-authority '
116 cat $OBJ/user_ca_key.pub
117 ) > $OBJ/authorized_keys_$USER
118 else
119 echo > $OBJ/authorized_keys_$USER
120 echo "TrustedUserCAKeys $OBJ/user_ca_key.pub" >> \
121 $OBJ/sshd_proxy
122
123 fi
124
125 verbose "$tid: $ident auth $auth expect $result"
126 ${SSHKEYGEN} -q -s $OBJ/user_ca_key \
127 -I "regress user key for $USER" \
128 $sign_opts \
129 $OBJ/cert_user_key_rsa ||
130 fail "couldn't sign cert_user_key_rsa"
131
132 ${SSH} -2i $OBJ/cert_user_key_rsa -F $OBJ/ssh_proxy \
133 somehost true >/dev/null 2>&1
134 rc=$?
135 if [ "x$result" = "xsuccess" ] ; then
136 if [ $rc -ne 0 ]; then
137 fail "$ident failed unexpectedly"
138 fi
139 else
140 if [ $rc -eq 0 ]; then
141 fail "$ident succeeded unexpectedly"
142 fi
143 fi
144 done
145}
146
147test_one "correct principal" success "-n ${USER}"
148test_one "host-certificate" failure "-n ${USER} -h"
149test_one "wrong principals" failure "-n foo"
150test_one "cert not yet valid" failure "-n ${USER} -V20200101:20300101"
151test_one "cert expired" failure "-n ${USER} -V19800101:19900101"
152test_one "cert valid interval" success "-n ${USER} -V-1w:+2w"
153test_one "wrong source-address" failure "-n ${USER} -Osource-address=10.0.0.0/8"
154test_one "force-command" failure "-n ${USER} -Oforce-command=false"
155
156# Behaviour is different here: TrustedUserCAKeys doesn't allow empty principals
157test_one "empty principals" success "" authorized_keys
158test_one "empty principals" failure "" TrustedUserCAKeys
159
160# Wrong certificate
161for ktype in rsa dsa ; do
162 # Self-sign
163 ${SSHKEYGEN} -q -s $OBJ/cert_user_key_${ktype} -I \
164 "regress user key for $USER" \
165 -n $USER $OBJ/cert_user_key_${ktype} ||
166 fail "couldn't sign cert_user_key_${ktype}"
167 verbose "$tid: user ${ktype} connect wrong cert"
168 ${SSH} -2i $OBJ/cert_user_key_${ktype} -F $OBJ/ssh_proxy \
169 somehost true >/dev/null 2>&1
170 if [ $? -eq 0 ]; then
171 fail "ssh cert connect $ident succeeded unexpectedly"
172 fi
173done
174
175rm -f $OBJ/authorized_keys_$USER $OBJ/user_ca_key* $OBJ/cert_user_key*
176
diff --git a/regress/cfgmatch.sh b/regress/cfgmatch.sh
index 35c5e52a1..96badd51b 100644
--- a/regress/cfgmatch.sh
+++ b/regress/cfgmatch.sh
@@ -57,9 +57,9 @@ for p in 1 2; do
57done 57done
58 58
59# Retry previous with key option, should also be denied. 59# Retry previous with key option, should also be denied.
60echo -n 'permitopen="127.0.0.1:'$PORT'" ' >$OBJ/authorized_keys_$USER 60echon 'permitopen="127.0.0.1:'$PORT'" ' >$OBJ/authorized_keys_$USER
61cat $OBJ/rsa.pub >> $OBJ/authorized_keys_$USER 61cat $OBJ/rsa.pub >> $OBJ/authorized_keys_$USER
62echo -n 'permitopen="127.0.0.1:'$PORT'" ' >>$OBJ/authorized_keys_$USER 62echon 'permitopen="127.0.0.1:'$PORT'" ' >>$OBJ/authorized_keys_$USER
63cat $OBJ/rsa1.pub >> $OBJ/authorized_keys_$USER 63cat $OBJ/rsa1.pub >> $OBJ/authorized_keys_$USER
64for p in 1 2; do 64for p in 1 2; do
65 rm -f $pidfile 65 rm -f $pidfile
diff --git a/regress/cipher-speed.sh b/regress/cipher-speed.sh
index d39a829d4..85de6d585 100644
--- a/regress/cipher-speed.sh
+++ b/regress/cipher-speed.sh
@@ -19,7 +19,7 @@ ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
19for c in $ciphers; do for m in $macs; do 19for c in $ciphers; do for m in $macs; do
20 trace "proto 2 cipher $c mac $m" 20 trace "proto 2 cipher $c mac $m"
21 for x in $tries; do 21 for x in $tries; do
22 echo -n "$c/$m:\t" 22 echon "$c/$m:\t"
23 ( ${SSH} -o 'compression no' \ 23 ( ${SSH} -o 'compression no' \
24 -F $OBJ/ssh_proxy -2 -m $m -c $c somehost \ 24 -F $OBJ/ssh_proxy -2 -m $m -c $c somehost \
25 exec sh -c \'"dd of=/dev/null obs=32k"\' \ 25 exec sh -c \'"dd of=/dev/null obs=32k"\' \
@@ -35,7 +35,7 @@ ciphers="3des blowfish"
35for c in $ciphers; do 35for c in $ciphers; do
36 trace "proto 1 cipher $c" 36 trace "proto 1 cipher $c"
37 for x in $tries; do 37 for x in $tries; do
38 echo -n "$c:\t" 38 echon "$c:\t"
39 ( ${SSH} -o 'compression no' \ 39 ( ${SSH} -o 'compression no' \
40 -F $OBJ/ssh_proxy -1 -c $c somehost \ 40 -F $OBJ/ssh_proxy -1 -c $c somehost \
41 exec sh -c \'"dd of=/dev/null obs=32k"\' \ 41 exec sh -c \'"dd of=/dev/null obs=32k"\' \
diff --git a/regress/forwarding.sh b/regress/forwarding.sh
index 9ffbb3dd4..6dec991a6 100644
--- a/regress/forwarding.sh
+++ b/regress/forwarding.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: forwarding.sh,v 1.6 2006/07/11 18:51:21 markus Exp $ 1# $OpenBSD: forwarding.sh,v 1.7 2010/01/11 02:53:44 dtucker 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"
@@ -93,3 +93,13 @@ for p in 1 2; do
93 fi 93 fi
94 sleep 10 94 sleep 10
95done 95done
96
97for p in 2; do
98 trace "stdio forwarding proto $p"
99 cmd="${SSH} -$p -F $OBJ/ssh_config"
100 $cmd -o "ProxyCommand $cmd -q -W localhost:$PORT somehost" \
101 somehost true
102 if [ $? != 0 ]; then
103 fail "stdio forwarding proto $p"
104 fi
105done
diff --git a/regress/keygen-convert.sh b/regress/keygen-convert.sh
new file mode 100644
index 000000000..ad0e9c637
--- /dev/null
+++ b/regress/keygen-convert.sh
@@ -0,0 +1,33 @@
1# $OpenBSD: keygen-convert.sh,v 1.1 2009/11/09 04:20:04 dtucker Exp $
2# Placed in the Public Domain.
3
4tid="convert keys"
5
6for t in rsa dsa; do
7 # generate user key for agent
8 trace "generating $t key"
9 rm -f $OBJ/$t-key
10 ${SSHKEYGEN} -q -N "" -t $t -f $OBJ/$t-key
11
12 trace "export $t private to rfc4716 public"
13 ${SSHKEYGEN} -q -e -f $OBJ/$t-key >$OBJ/$t-key-rfc || \
14 fail "export $t private to rfc4716 public"
15
16 trace "export $t public to rfc4716 public"
17 ${SSHKEYGEN} -q -e -f $OBJ/$t-key.pub >$OBJ/$t-key-rfc.pub || \
18 fail "$t public to rfc4716 public"
19
20 cmp $OBJ/$t-key-rfc $OBJ/$t-key-rfc.pub || \
21 fail "$t rfc4716 exports differ between public and private"
22
23 trace "import $t rfc4716 public"
24 ${SSHKEYGEN} -q -i -f $OBJ/$t-key-rfc >$OBJ/$t-rfc-imported || \
25 fail "$t import rfc4716 public"
26
27 cut -f1,2 -d " " $OBJ/$t-key.pub >$OBJ/$t-key-nocomment.pub
28 cmp $OBJ/$t-key-nocomment.pub $OBJ/$t-rfc-imported || \
29 fail "$t imported differs from original"
30
31 rm -f $OBJ/$t-key $OBJ/$t-key.pub $OBJ/$t-key-rfc $OBJ/$t-key-rfc.pub \
32 $OBJ/$t-rfc-imported $OBJ/$t-key-nocomment.pub
33done
diff --git a/regress/multiplex.sh b/regress/multiplex.sh
index 4fba7b5ac..8a98a6e54 100644
--- a/regress/multiplex.sh
+++ b/regress/multiplex.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: multiplex.sh,v 1.11 2005/04/25 09:54:09 dtucker Exp $ 1# $OpenBSD: multiplex.sh,v 1.12 2009/05/05 07:51:36 dtucker Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4CTL=/tmp/openssh.regress.ctl-sock.$$ 4CTL=/tmp/openssh.regress.ctl-sock.$$
@@ -26,7 +26,7 @@ sleep 5
26 26
27verbose "test $tid: envpass" 27verbose "test $tid: envpass"
28trace "env passing over multiplexed connection" 28trace "env passing over multiplexed connection"
29_XXX_TEST=blah ${SSH} -oSendEnv="_XXX_TEST" -S$CTL otherhost sh << 'EOF' 29_XXX_TEST=blah ${SSH} -F $OBJ/ssh_config -oSendEnv="_XXX_TEST" -S$CTL otherhost sh << 'EOF'
30 test X"$_XXX_TEST" = X"blah" 30 test X"$_XXX_TEST" = X"blah"
31EOF 31EOF
32if [ $? -ne 0 ]; then 32if [ $? -ne 0 ]; then
@@ -36,26 +36,26 @@ fi
36verbose "test $tid: transfer" 36verbose "test $tid: transfer"
37rm -f ${COPY} 37rm -f ${COPY}
38trace "ssh transfer over multiplexed connection and check result" 38trace "ssh transfer over multiplexed connection and check result"
39${SSH} -S$CTL otherhost cat ${DATA} > ${COPY} 39${SSH} -F $OBJ/ssh_config -S$CTL otherhost cat ${DATA} > ${COPY}
40test -f ${COPY} || fail "ssh -Sctl: failed copy ${DATA}" 40test -f ${COPY} || fail "ssh -Sctl: failed copy ${DATA}"
41cmp ${DATA} ${COPY} || fail "ssh -Sctl: corrupted copy of ${DATA}" 41cmp ${DATA} ${COPY} || fail "ssh -Sctl: corrupted copy of ${DATA}"
42 42
43rm -f ${COPY} 43rm -f ${COPY}
44trace "ssh transfer over multiplexed connection and check result" 44trace "ssh transfer over multiplexed connection and check result"
45${SSH} -S $CTL otherhost cat ${DATA} > ${COPY} 45${SSH} -F $OBJ/ssh_config -S $CTL otherhost cat ${DATA} > ${COPY}
46test -f ${COPY} || fail "ssh -S ctl: failed copy ${DATA}" 46test -f ${COPY} || fail "ssh -S ctl: failed copy ${DATA}"
47cmp ${DATA} ${COPY} || fail "ssh -S ctl: corrupted copy of ${DATA}" 47cmp ${DATA} ${COPY} || fail "ssh -S ctl: corrupted copy of ${DATA}"
48 48
49rm -f ${COPY} 49rm -f ${COPY}
50trace "sftp transfer over multiplexed connection and check result" 50trace "sftp transfer over multiplexed connection and check result"
51echo "get ${DATA} ${COPY}" | \ 51echo "get ${DATA} ${COPY}" | \
52 ${SFTP} -S ${SSH} -oControlPath=$CTL otherhost >$LOG 2>&1 52 ${SFTP} -S ${SSH} -F $OBJ/ssh_config -oControlPath=$CTL otherhost >$LOG 2>&1
53test -f ${COPY} || fail "sftp: failed copy ${DATA}" 53test -f ${COPY} || fail "sftp: failed copy ${DATA}"
54cmp ${DATA} ${COPY} || fail "sftp: corrupted copy of ${DATA}" 54cmp ${DATA} ${COPY} || fail "sftp: corrupted copy of ${DATA}"
55 55
56rm -f ${COPY} 56rm -f ${COPY}
57trace "scp transfer over multiplexed connection and check result" 57trace "scp transfer over multiplexed connection and check result"
58${SCP} -S ${SSH} -oControlPath=$CTL otherhost:${DATA} ${COPY} >$LOG 2>&1 58${SCP} -S ${SSH} -F $OBJ/ssh_config -oControlPath=$CTL otherhost:${DATA} ${COPY} >$LOG 2>&1
59test -f ${COPY} || fail "scp: failed copy ${DATA}" 59test -f ${COPY} || fail "scp: failed copy ${DATA}"
60cmp ${DATA} ${COPY} || fail "scp: corrupted copy of ${DATA}" 60cmp ${DATA} ${COPY} || fail "scp: corrupted copy of ${DATA}"
61 61
@@ -64,7 +64,7 @@ rm -f ${COPY}
64for s in 0 1 4 5 44; do 64for s in 0 1 4 5 44; do
65 trace "exit status $s over multiplexed connection" 65 trace "exit status $s over multiplexed connection"
66 verbose "test $tid: status $s" 66 verbose "test $tid: status $s"
67 ${SSH} -S $CTL otherhost exit $s 67 ${SSH} -F $OBJ/ssh_config -S $CTL otherhost exit $s
68 r=$? 68 r=$?
69 if [ $r -ne $s ]; then 69 if [ $r -ne $s ]; then
70 fail "exit code mismatch for protocol $p: $r != $s" 70 fail "exit code mismatch for protocol $p: $r != $s"
@@ -72,7 +72,7 @@ for s in 0 1 4 5 44; do
72 72
73 # same with early close of stdout/err 73 # same with early close of stdout/err
74 trace "exit status $s with early close over multiplexed connection" 74 trace "exit status $s with early close over multiplexed connection"
75 ${SSH} -S $CTL -n otherhost \ 75 ${SSH} -F $OBJ/ssh_config -S $CTL -n otherhost \
76 exec sh -c \'"sleep 2; exec > /dev/null 2>&1; sleep 3; exit $s"\' 76 exec sh -c \'"sleep 2; exec > /dev/null 2>&1; sleep 3; exit $s"\'
77 r=$? 77 r=$?
78 if [ $r -ne $s ]; then 78 if [ $r -ne $s ]; then
@@ -81,10 +81,10 @@ for s in 0 1 4 5 44; do
81done 81done
82 82
83trace "test check command" 83trace "test check command"
84${SSH} -S $CTL -Ocheck otherhost || fail "check command failed" 84${SSH} -F $OBJ/ssh_config -S $CTL -Ocheck otherhost || fail "check command failed"
85 85
86trace "test exit command" 86trace "test exit command"
87${SSH} -S $CTL -Oexit otherhost || fail "send exit command failed" 87${SSH} -F $OBJ/ssh_config -S $CTL -Oexit otherhost || fail "send exit command failed"
88 88
89# Wait for master to exit 89# Wait for master to exit
90sleep 2 90sleep 2
diff --git a/regress/portnum.sh b/regress/portnum.sh
new file mode 100644
index 000000000..1de0680fe
--- /dev/null
+++ b/regress/portnum.sh
@@ -0,0 +1,34 @@
1# $OpenBSD: portnum.sh,v 1.1 2009/08/13 00:57:17 djm Exp $
2# Placed in the Public Domain.
3
4tid="port number parsing"
5
6badport() {
7 port=$1
8 verbose "$tid: invalid port $port"
9 if ${SSH} -F $OBJ/ssh_proxy -p $port somehost true 2>/dev/null ; then
10 fail "$tid accepted invalid port $port"
11 fi
12}
13goodport() {
14 port=$1
15 verbose "$tid: valid port $port"
16 if ${SSH} -F $OBJ/ssh_proxy -p $port somehost true 2>/dev/null ; then
17 :
18 else
19 fail "$tid rejected valid port $port"
20 fi
21}
22
23badport 0
24badport 65536
25badport 131073
26badport 2000blah
27badport blah2000
28
29goodport 1
30goodport 22
31goodport 2222
32goodport 22222
33goodport 65535
34
diff --git a/regress/sftp-badcmds.sh b/regress/sftp-badcmds.sh
index b48b1cb01..08009f26b 100644
--- a/regress/sftp-badcmds.sh
+++ b/regress/sftp-badcmds.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: sftp-badcmds.sh,v 1.3 2008/03/24 21:46:54 djm Exp $ 1# $OpenBSD: sftp-badcmds.sh,v 1.4 2009/08/13 01:11:55 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="sftp invalid commands" 4tid="sftp invalid commands"
@@ -13,13 +13,13 @@ rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd
13 13
14rm -f ${COPY} 14rm -f ${COPY}
15verbose "$tid: get nonexistent" 15verbose "$tid: get nonexistent"
16echo "get $NONEXIST $COPY" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 16echo "get $NONEXIST $COPY" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
17 || fail "get nonexistent failed" 17 || fail "get nonexistent failed"
18test -f ${COPY} && fail "existing copy after get nonexistent" 18test -f ${COPY} && fail "existing copy after get nonexistent"
19 19
20rm -f ${COPY}.dd/* 20rm -f ${COPY}.dd/*
21verbose "$tid: glob get to nonexistent directory" 21verbose "$tid: glob get to nonexistent directory"
22echo "get /bin/l* $NONEXIST" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 22echo "get /bin/l* $NONEXIST" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
23 || fail "get nonexistent failed" 23 || fail "get nonexistent failed"
24for x in $GLOBFILES; do 24for x in $GLOBFILES; do
25 test -f ${COPY}.dd/$x && fail "existing copy after get nonexistent" 25 test -f ${COPY}.dd/$x && fail "existing copy after get nonexistent"
@@ -27,13 +27,13 @@ done
27 27
28rm -f ${COPY} 28rm -f ${COPY}
29verbose "$tid: put nonexistent" 29verbose "$tid: put nonexistent"
30echo "put $NONEXIST $COPY" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 30echo "put $NONEXIST $COPY" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
31 || fail "put nonexistent failed" 31 || fail "put nonexistent failed"
32test -f ${COPY} && fail "existing copy after put nonexistent" 32test -f ${COPY} && fail "existing copy after put nonexistent"
33 33
34rm -f ${COPY}.dd/* 34rm -f ${COPY}.dd/*
35verbose "$tid: glob put to nonexistent directory" 35verbose "$tid: glob put to nonexistent directory"
36echo "put /bin/l* ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 36echo "put /bin/l* ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
37 || fail "put nonexistent failed" 37 || fail "put nonexistent failed"
38for x in $GLOBFILES; do 38for x in $GLOBFILES; do
39 test -f ${COPY}.dd/$x && fail "existing copy after nonexistent" 39 test -f ${COPY}.dd/$x && fail "existing copy after nonexistent"
@@ -41,7 +41,7 @@ done
41 41
42rm -f ${COPY} 42rm -f ${COPY}
43verbose "$tid: rename nonexistent" 43verbose "$tid: rename nonexistent"
44echo "rename $NONEXIST ${COPY}.1" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 44echo "rename $NONEXIST ${COPY}.1" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
45 || fail "rename nonexist failed" 45 || fail "rename nonexist failed"
46test -f ${COPY}.1 && fail "file exists after rename nonexistent" 46test -f ${COPY}.1 && fail "file exists after rename nonexistent"
47 47
@@ -49,7 +49,7 @@ rm -rf ${COPY} ${COPY}.dd
49cp $DATA $COPY 49cp $DATA $COPY
50mkdir ${COPY}.dd 50mkdir ${COPY}.dd
51verbose "$tid: rename target exists (directory)" 51verbose "$tid: rename target exists (directory)"
52echo "rename $COPY ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 52echo "rename $COPY ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
53 || fail "rename target exists (directory) failed" 53 || fail "rename target exists (directory) failed"
54test -f ${COPY} || fail "oldname missing after rename target exists (directory)" 54test -f ${COPY} || fail "oldname missing after rename target exists (directory)"
55test -d ${COPY}.dd || fail "newname missing after rename target exists (directory)" 55test -d ${COPY}.dd || fail "newname missing after rename target exists (directory)"
@@ -59,7 +59,7 @@ rm -f ${COPY}.dd/*
59rm -rf ${COPY} 59rm -rf ${COPY}
60cp ${DATA2} ${COPY} 60cp ${DATA2} ${COPY}
61verbose "$tid: glob put files to local file" 61verbose "$tid: glob put files to local file"
62echo "put /bin/l* $COPY" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 62echo "put /bin/l* $COPY" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1
63cmp ${DATA2} ${COPY} || fail "put successed when it should have failed" 63cmp ${DATA2} ${COPY} || fail "put successed when it should have failed"
64 64
65rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd 65rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd
diff --git a/regress/sftp-batch.sh b/regress/sftp-batch.sh
index 365c47cfc..a51ef0782 100644
--- a/regress/sftp-batch.sh
+++ b/regress/sftp-batch.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: sftp-batch.sh,v 1.3 2004/01/13 09:49:06 djm Exp $ 1# $OpenBSD: sftp-batch.sh,v 1.4 2009/08/13 01:11:55 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="sftp batchfile" 4tid="sftp batchfile"
@@ -37,19 +37,19 @@ cat << EOF > ${BATCH}.fail.2
37EOF 37EOF
38 38
39verbose "$tid: good commands" 39verbose "$tid: good commands"
40${SFTP} -b ${BATCH}.pass.1 -P ${SFTPSERVER} >/dev/null 2>&1 \ 40${SFTP} -b ${BATCH}.pass.1 -D ${SFTPSERVER} >/dev/null 2>&1 \
41 || fail "good commands failed" 41 || fail "good commands failed"
42 42
43verbose "$tid: bad commands" 43verbose "$tid: bad commands"
44${SFTP} -b ${BATCH}.fail.1 -P ${SFTPSERVER} >/dev/null 2>&1 \ 44${SFTP} -b ${BATCH}.fail.1 -D ${SFTPSERVER} >/dev/null 2>&1 \
45 && fail "bad commands succeeded" 45 && fail "bad commands succeeded"
46 46
47verbose "$tid: comments and blanks" 47verbose "$tid: comments and blanks"
48${SFTP} -b ${BATCH}.pass.2 -P ${SFTPSERVER} >/dev/null 2>&1 \ 48${SFTP} -b ${BATCH}.pass.2 -D ${SFTPSERVER} >/dev/null 2>&1 \
49 || fail "comments & blanks failed" 49 || fail "comments & blanks failed"
50 50
51verbose "$tid: junk command" 51verbose "$tid: junk command"
52${SFTP} -b ${BATCH}.fail.2 -P ${SFTPSERVER} >/dev/null 2>&1 \ 52${SFTP} -b ${BATCH}.fail.2 -D ${SFTPSERVER} >/dev/null 2>&1 \
53 && fail "junk command succeeded" 53 && fail "junk command succeeded"
54 54
55rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${BATCH}.* 55rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${BATCH}.*
diff --git a/regress/sftp-cmds.sh b/regress/sftp-cmds.sh
index 3b453c5e8..c4d6ae2de 100644
--- a/regress/sftp-cmds.sh
+++ b/regress/sftp-cmds.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: sftp-cmds.sh,v 1.9 2007/12/12 05:04:03 djm Exp $ 1# $OpenBSD: sftp-cmds.sh,v 1.10 2009/08/13 01:11:55 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4# XXX - TODO: 4# XXX - TODO:
@@ -40,56 +40,56 @@ SPACECOPY_ARG="${COPY}\ this\ has\ spaces.txt"
40# File with glob metacharacters 40# File with glob metacharacters
41GLOBMETACOPY="${COPY} [metachar].txt" 41GLOBMETACOPY="${COPY} [metachar].txt"
42 42
43rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${COPY}.dd2 43rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${COPY}.dd2 ${BATCH}.*
44mkdir ${COPY}.dd 44mkdir ${COPY}.dd
45 45
46verbose "$tid: lls" 46verbose "$tid: lls"
47(echo "lcd ${OBJ}" ; echo "lls") | ${SFTP} -P ${SFTPSERVER} 2>&1 | \ 47(echo "lcd ${OBJ}" ; echo "lls") | ${SFTP} -D ${SFTPSERVER} 2>&1 | \
48 grep copy.dd >/dev/null 2>&1 || fail "lls failed" 48 grep copy.dd >/dev/null 2>&1 || fail "lls failed"
49 49
50verbose "$tid: lls w/path" 50verbose "$tid: lls w/path"
51echo "lls ${OBJ}" | ${SFTP} -P ${SFTPSERVER} 2>&1 | \ 51echo "lls ${OBJ}" | ${SFTP} -D ${SFTPSERVER} 2>&1 | \
52 grep copy.dd >/dev/null 2>&1 || fail "lls w/path failed" 52 grep copy.dd >/dev/null 2>&1 || fail "lls w/path failed"
53 53
54verbose "$tid: ls" 54verbose "$tid: ls"
55echo "ls ${OBJ}" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 55echo "ls ${OBJ}" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
56 || fail "ls failed" 56 || fail "ls failed"
57# XXX always successful 57# XXX always successful
58 58
59verbose "$tid: shell" 59verbose "$tid: shell"
60echo "!echo hi there" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 60echo "!echo hi there" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
61 || fail "shell failed" 61 || fail "shell failed"
62# XXX always successful 62# XXX always successful
63 63
64verbose "$tid: pwd" 64verbose "$tid: pwd"
65echo "pwd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 65echo "pwd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
66 || fail "pwd failed" 66 || fail "pwd failed"
67# XXX always successful 67# XXX always successful
68 68
69verbose "$tid: lpwd" 69verbose "$tid: lpwd"
70echo "lpwd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 70echo "lpwd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
71 || fail "lpwd failed" 71 || fail "lpwd failed"
72# XXX always successful 72# XXX always successful
73 73
74verbose "$tid: quit" 74verbose "$tid: quit"
75echo "quit" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 75echo "quit" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
76 || fail "quit failed" 76 || fail "quit failed"
77# XXX always successful 77# XXX always successful
78 78
79verbose "$tid: help" 79verbose "$tid: help"
80echo "help" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 80echo "help" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
81 || fail "help failed" 81 || fail "help failed"
82# XXX always successful 82# XXX always successful
83 83
84rm -f ${COPY} 84rm -f ${COPY}
85verbose "$tid: get" 85verbose "$tid: get"
86echo "get $DATA $COPY" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 86echo "get $DATA $COPY" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
87 || fail "get failed" 87 || fail "get failed"
88cmp $DATA ${COPY} || fail "corrupted copy after get" 88cmp $DATA ${COPY} || fail "corrupted copy after get"
89 89
90rm -f ${COPY} 90rm -f ${COPY}
91verbose "$tid: get quoted" 91verbose "$tid: get quoted"
92echo "get \"$DATA\" $COPY" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 92echo "get \"$DATA\" $COPY" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
93 || fail "get failed" 93 || fail "get failed"
94cmp $DATA ${COPY} || fail "corrupted copy after get" 94cmp $DATA ${COPY} || fail "corrupted copy after get"
95 95
@@ -97,8 +97,8 @@ if [ "$os" != "cygwin" ]; then
97rm -f ${QUOTECOPY} 97rm -f ${QUOTECOPY}
98cp $DATA ${QUOTECOPY} 98cp $DATA ${QUOTECOPY}
99verbose "$tid: get filename with quotes" 99verbose "$tid: get filename with quotes"
100echo "get \"$QUOTECOPY_ARG\" ${COPY}" | \ 100echo "get \"$QUOTECOPY_ARG\" ${COPY}" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
101 ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ || fail "get failed" 101 || fail "get failed"
102cmp ${COPY} ${QUOTECOPY} || fail "corrupted copy after get with quotes" 102cmp ${COPY} ${QUOTECOPY} || fail "corrupted copy after get with quotes"
103rm -f ${QUOTECOPY} ${COPY} 103rm -f ${QUOTECOPY} ${COPY}
104fi 104fi
@@ -106,7 +106,7 @@ fi
106rm -f "$SPACECOPY" ${COPY} 106rm -f "$SPACECOPY" ${COPY}
107cp $DATA "$SPACECOPY" 107cp $DATA "$SPACECOPY"
108verbose "$tid: get filename with spaces" 108verbose "$tid: get filename with spaces"
109echo "get ${SPACECOPY_ARG} ${COPY}" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 109echo "get ${SPACECOPY_ARG} ${COPY}" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
110 || fail "get failed" 110 || fail "get failed"
111cmp ${COPY} "$SPACECOPY" || fail "corrupted copy after get with spaces" 111cmp ${COPY} "$SPACECOPY" || fail "corrupted copy after get with spaces"
112 112
@@ -114,19 +114,19 @@ rm -f "$GLOBMETACOPY" ${COPY}
114cp $DATA "$GLOBMETACOPY" 114cp $DATA "$GLOBMETACOPY"
115verbose "$tid: get filename with glob metacharacters" 115verbose "$tid: get filename with glob metacharacters"
116echo "get \"${GLOBMETACOPY}\" ${COPY}" | \ 116echo "get \"${GLOBMETACOPY}\" ${COPY}" | \
117 ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 || fail "get failed" 117 ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 || fail "get failed"
118cmp ${COPY} "$GLOBMETACOPY" || \ 118cmp ${COPY} "$GLOBMETACOPY" || \
119 fail "corrupted copy after get with glob metacharacters" 119 fail "corrupted copy after get with glob metacharacters"
120 120
121rm -f ${COPY}.dd/* 121rm -f ${COPY}.dd/*
122verbose "$tid: get to directory" 122verbose "$tid: get to directory"
123echo "get $DATA ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 123echo "get $DATA ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
124 || fail "get failed" 124 || fail "get failed"
125cmp $DATA ${COPY}.dd/`basename $DATA` || fail "corrupted copy after get" 125cmp $DATA ${COPY}.dd/`basename $DATA` || fail "corrupted copy after get"
126 126
127rm -f ${COPY}.dd/* 127rm -f ${COPY}.dd/*
128verbose "$tid: glob get to directory" 128verbose "$tid: glob get to directory"
129echo "get /bin/l* ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 129echo "get /bin/l* ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
130 || fail "get failed" 130 || fail "get failed"
131for x in $GLOBFILES; do 131for x in $GLOBFILES; do
132 cmp /bin/$x ${COPY}.dd/$x || fail "corrupted copy after get" 132 cmp /bin/$x ${COPY}.dd/$x || fail "corrupted copy after get"
@@ -134,13 +134,13 @@ done
134 134
135rm -f ${COPY}.dd/* 135rm -f ${COPY}.dd/*
136verbose "$tid: get to local dir" 136verbose "$tid: get to local dir"
137(echo "lcd ${COPY}.dd"; echo "get $DATA" ) | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 137(echo "lcd ${COPY}.dd"; echo "get $DATA" ) | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
138 || fail "get failed" 138 || fail "get failed"
139cmp $DATA ${COPY}.dd/`basename $DATA` || fail "corrupted copy after get" 139cmp $DATA ${COPY}.dd/`basename $DATA` || fail "corrupted copy after get"
140 140
141rm -f ${COPY}.dd/* 141rm -f ${COPY}.dd/*
142verbose "$tid: glob get to local dir" 142verbose "$tid: glob get to local dir"
143(echo "lcd ${COPY}.dd"; echo "get /bin/l*") | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 143(echo "lcd ${COPY}.dd"; echo "get /bin/l*") | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
144 || fail "get failed" 144 || fail "get failed"
145for x in $GLOBFILES; do 145for x in $GLOBFILES; do
146 cmp /bin/$x ${COPY}.dd/$x || fail "corrupted copy after get" 146 cmp /bin/$x ${COPY}.dd/$x || fail "corrupted copy after get"
@@ -149,32 +149,32 @@ done
149rm -f ${COPY} 149rm -f ${COPY}
150verbose "$tid: put" 150verbose "$tid: put"
151echo "put $DATA $COPY" | \ 151echo "put $DATA $COPY" | \
152 ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 || fail "put failed" 152 ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 || fail "put failed"
153cmp $DATA ${COPY} || fail "corrupted copy after put" 153cmp $DATA ${COPY} || fail "corrupted copy after put"
154 154
155if [ "$os" != "cygwin" ]; then 155if [ "$os" != "cygwin" ]; then
156rm -f ${QUOTECOPY} 156rm -f ${QUOTECOPY}
157verbose "$tid: put filename with quotes" 157verbose "$tid: put filename with quotes"
158echo "put $DATA \"$QUOTECOPY_ARG\"" | \ 158echo "put $DATA \"$QUOTECOPY_ARG\"" | \
159 ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 || fail "put failed" 159 ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 || fail "put failed"
160cmp $DATA ${QUOTECOPY} || fail "corrupted copy after put with quotes" 160cmp $DATA ${QUOTECOPY} || fail "corrupted copy after put with quotes"
161fi 161fi
162 162
163rm -f "$SPACECOPY" 163rm -f "$SPACECOPY"
164verbose "$tid: put filename with spaces" 164verbose "$tid: put filename with spaces"
165echo "put $DATA ${SPACECOPY_ARG}" | \ 165echo "put $DATA ${SPACECOPY_ARG}" | \
166 ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 || fail "put failed" 166 ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 || fail "put failed"
167cmp $DATA "$SPACECOPY" || fail "corrupted copy after put with spaces" 167cmp $DATA "$SPACECOPY" || fail "corrupted copy after put with spaces"
168 168
169rm -f ${COPY}.dd/* 169rm -f ${COPY}.dd/*
170verbose "$tid: put to directory" 170verbose "$tid: put to directory"
171echo "put $DATA ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 171echo "put $DATA ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
172 || fail "put failed" 172 || fail "put failed"
173cmp $DATA ${COPY}.dd/`basename $DATA` || fail "corrupted copy after put" 173cmp $DATA ${COPY}.dd/`basename $DATA` || fail "corrupted copy after put"
174 174
175rm -f ${COPY}.dd/* 175rm -f ${COPY}.dd/*
176verbose "$tid: glob put to directory" 176verbose "$tid: glob put to directory"
177echo "put /bin/l? ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 177echo "put /bin/l? ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
178 || fail "put failed" 178 || fail "put failed"
179for x in $GLOBFILES; do 179for x in $GLOBFILES; do
180 cmp /bin/$x ${COPY}.dd/$x || fail "corrupted copy after put" 180 cmp /bin/$x ${COPY}.dd/$x || fail "corrupted copy after put"
@@ -182,60 +182,61 @@ done
182 182
183rm -f ${COPY}.dd/* 183rm -f ${COPY}.dd/*
184verbose "$tid: put to local dir" 184verbose "$tid: put to local dir"
185(echo "cd ${COPY}.dd"; echo "put $DATA") | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 185(echo "cd ${COPY}.dd"; echo "put $DATA") | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
186 || fail "put failed" 186 || fail "put failed"
187cmp $DATA ${COPY}.dd/`basename $DATA` || fail "corrupted copy after put" 187cmp $DATA ${COPY}.dd/`basename $DATA` || fail "corrupted copy after put"
188 188
189rm -f ${COPY}.dd/* 189rm -f ${COPY}.dd/*
190verbose "$tid: glob put to local dir" 190verbose "$tid: glob put to local dir"
191(echo "cd ${COPY}.dd"; echo "put /bin/l?") | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 191(echo "cd ${COPY}.dd"; echo "put /bin/l?") | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
192 || fail "put failed" 192 || fail "put failed"
193for x in $GLOBFILES; do 193for x in $GLOBFILES; do
194 cmp /bin/$x ${COPY}.dd/$x || fail "corrupted copy after put" 194 cmp /bin/$x ${COPY}.dd/$x || fail "corrupted copy after put"
195done 195done
196 196
197verbose "$tid: rename" 197verbose "$tid: rename"
198echo "rename $COPY ${COPY}.1" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 198echo "rename $COPY ${COPY}.1" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
199 || fail "rename failed" 199 || fail "rename failed"
200test -f ${COPY}.1 || fail "missing file after rename" 200test -f ${COPY}.1 || fail "missing file after rename"
201cmp $DATA ${COPY}.1 >/dev/null 2>&1 || fail "corrupted copy after rename" 201cmp $DATA ${COPY}.1 >/dev/null 2>&1 || fail "corrupted copy after rename"
202 202
203verbose "$tid: rename directory" 203verbose "$tid: rename directory"
204echo "rename ${COPY}.dd ${COPY}.dd2" | \ 204echo "rename ${COPY}.dd ${COPY}.dd2" | \
205 ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 || \ 205 ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 || \
206 fail "rename directory failed" 206 fail "rename directory failed"
207test -d ${COPY}.dd && fail "oldname exists after rename directory" 207test -d ${COPY}.dd && fail "oldname exists after rename directory"
208test -d ${COPY}.dd2 || fail "missing newname after rename directory" 208test -d ${COPY}.dd2 || fail "missing newname after rename directory"
209 209
210verbose "$tid: ln" 210verbose "$tid: ln"
211echo "ln ${COPY}.1 ${COPY}.2" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 || fail "ln failed" 211echo "ln ${COPY}.1 ${COPY}.2" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 || fail "ln failed"
212test -h ${COPY}.2 || fail "missing file after ln" 212test -h ${COPY}.2 || fail "missing file after ln"
213 213
214verbose "$tid: mkdir" 214verbose "$tid: mkdir"
215echo "mkdir ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 215echo "mkdir ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
216 || fail "mkdir failed" 216 || fail "mkdir failed"
217test -d ${COPY}.dd || fail "missing directory after mkdir" 217test -d ${COPY}.dd || fail "missing directory after mkdir"
218 218
219# XXX do more here 219# XXX do more here
220verbose "$tid: chdir" 220verbose "$tid: chdir"
221echo "chdir ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 221echo "chdir ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
222 || fail "chdir failed" 222 || fail "chdir failed"
223 223
224verbose "$tid: rmdir" 224verbose "$tid: rmdir"
225echo "rmdir ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 225echo "rmdir ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
226 || fail "rmdir failed" 226 || fail "rmdir failed"
227test -d ${COPY}.1 && fail "present directory after rmdir" 227test -d ${COPY}.1 && fail "present directory after rmdir"
228 228
229verbose "$tid: lmkdir" 229verbose "$tid: lmkdir"
230echo "lmkdir ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 230echo "lmkdir ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
231 || fail "lmkdir failed" 231 || fail "lmkdir failed"
232test -d ${COPY}.dd || fail "missing directory after lmkdir" 232test -d ${COPY}.dd || fail "missing directory after lmkdir"
233 233
234# XXX do more here 234# XXX do more here
235verbose "$tid: lchdir" 235verbose "$tid: lchdir"
236echo "lchdir ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 236echo "lchdir ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
237 || fail "lchdir failed" 237 || fail "lchdir failed"
238 238
239rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${COPY}.dd2 239rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${COPY}.dd2 ${BATCH}.*
240rm -rf ${QUOTECOPY} "$SPACECOPY" "$GLOBMETACOPY" 240rm -rf ${QUOTECOPY} "$SPACECOPY" "$GLOBMETACOPY"
241 241
242
diff --git a/regress/sftp-glob.sh b/regress/sftp-glob.sh
index 60116a748..72bb17d75 100644
--- a/regress/sftp-glob.sh
+++ b/regress/sftp-glob.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: sftp-glob.sh,v 1.3 2007/10/26 05:30:01 djm Exp $ 1# $OpenBSD: sftp-glob.sh,v 1.4 2009/08/13 01:11:55 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="sftp glob" 4tid="sftp glob"
@@ -10,7 +10,7 @@ sftp_ls() {
10 unexpected=$4 10 unexpected=$4
11 verbose "$tid: $errtag" 11 verbose "$tid: $errtag"
12 printf "ls -l %s" "${target}" | \ 12 printf "ls -l %s" "${target}" | \
13 ${SFTP} -b - -P ${SFTPSERVER} 2>/dev/null | \ 13 ${SFTP} -b - -D ${SFTPSERVER} 2>/dev/null | \
14 grep -v "^sftp>" > ${RESULTS} 14 grep -v "^sftp>" > ${RESULTS}
15 if [ $? -ne 0 ]; then 15 if [ $? -ne 0 ]; then
16 fail "$errtag failed" 16 fail "$errtag failed"
diff --git a/regress/sftp.sh b/regress/sftp.sh
index 0e22f8f6b..f84fa6f4e 100644
--- a/regress/sftp.sh
+++ b/regress/sftp.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: sftp.sh,v 1.2 2002/03/27 22:39:52 markus Exp $ 1# $OpenBSD: sftp.sh,v 1.3 2009/08/13 01:11:55 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="basic sftp put/get" 4tid="basic sftp put/get"
@@ -19,8 +19,8 @@ REQUESTS="1 2 10"
19for B in ${BUFFERSIZE}; do 19for B in ${BUFFERSIZE}; do
20 for R in ${REQUESTS}; do 20 for R in ${REQUESTS}; do
21 verbose "test $tid: buffer_size $B num_requests $R" 21 verbose "test $tid: buffer_size $B num_requests $R"
22 rm -f ${COPY}.1 ${COPY}.2 22 rm -f ${COPY}.1 ${COPY}.2
23 ${SFTP} -P ${SFTPSERVER} -B $B -R $R -b $SFTPCMDFILE \ 23 ${SFTP} -D ${SFTPSERVER} -B $B -R $R -b $SFTPCMDFILE \
24 > /dev/null 2>&1 24 > /dev/null 2>&1
25 r=$? 25 r=$?
26 if [ $r -ne 0 ]; then 26 if [ $r -ne 0 ]; then
diff --git a/regress/ssh-com-sftp.sh b/regress/ssh-com-sftp.sh
index 936b4cca7..be6f4e0dc 100644
--- a/regress/ssh-com-sftp.sh
+++ b/regress/ssh-com-sftp.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: ssh-com-sftp.sh,v 1.5 2004/02/24 17:06:52 markus Exp $ 1# $OpenBSD: ssh-com-sftp.sh,v 1.6 2009/08/20 18:43:07 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="basic sftp put/get with ssh.com server" 4tid="basic sftp put/get with ssh.com server"
@@ -51,7 +51,7 @@ for v in ${VERSIONS}; do
51 for R in ${REQUESTS}; do 51 for R in ${REQUESTS}; do
52 verbose "test $tid: buffer_size $B num_requests $R" 52 verbose "test $tid: buffer_size $B num_requests $R"
53 rm -f ${COPY}.1 ${COPY}.2 53 rm -f ${COPY}.1 ${COPY}.2
54 ${SFTP} -P ${server} -B $B -R $R -b $SFTPCMDFILE \ 54 ${SFTP} -D ${server} -B $B -R $R -b $SFTPCMDFILE \
55 > /dev/null 2>&1 55 > /dev/null 2>&1
56 r=$? 56 r=$?
57 if [ $r -ne 0 ]; then 57 if [ $r -ne 0 ]; then
diff --git a/regress/ssh2putty.sh b/regress/ssh2putty.sh
index dfdeeff4a..691db1690 100755
--- a/regress/ssh2putty.sh
+++ b/regress/ssh2putty.sh
@@ -1,4 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# $OpenBSD: ssh2putty.sh,v 1.2 2009/10/06 23:51:49 dtucker Exp $
2 3
3if test "x$1" = "x" -o "x$2" = "x" -o "x$3" = "x" ; then 4if test "x$1" = "x" -o "x$2" = "x" -o "x$3" = "x" ; then
4 echo "Usage: ssh2putty hostname port ssh-private-key" 5 echo "Usage: ssh2putty hostname port ssh-private-key"
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index b54448912..b3a19389d 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: test-exec.sh,v 1.35 2008/06/28 13:57:25 djm Exp $ 1# $OpenBSD: test-exec.sh,v 1.37 2010/02/24 06:21:56 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4#SUDO=sudo 4#SUDO=sudo
@@ -172,9 +172,17 @@ cleanup ()
172 echo no sshd running 172 echo no sshd running
173 else 173 else
174 if [ $pid -lt 2 ]; then 174 if [ $pid -lt 2 ]; then
175 echo bad pid for ssd: $pid 175 echo bad pid for ssh: $pid
176 else 176 else
177 $SUDO kill $pid 177 $SUDO kill $pid
178 trace "wait for sshd to exit"
179 i=0;
180 while [ -f $PIDFILE -a $i -lt 5 ]; do
181 i=`expr $i + 1`
182 sleep $i
183 done
184 test -f $PIDFILE && \
185 fatal "sshd didn't exit port $PORT pid $pid"
178 fi 186 fi
179 fi 187 fi
180 fi 188 fi
@@ -222,6 +230,7 @@ trap fatal 3 2
222cat << EOF > $OBJ/sshd_config 230cat << EOF > $OBJ/sshd_config
223 StrictModes no 231 StrictModes no
224 Port $PORT 232 Port $PORT
233 Protocol 2,1
225 AddressFamily inet 234 AddressFamily inet
226 ListenAddress 127.0.0.1 235 ListenAddress 127.0.0.1
227 #ListenAddress ::1 236 #ListenAddress ::1
@@ -247,6 +256,7 @@ echo 'StrictModes no' >> $OBJ/sshd_proxy
247# create client config 256# create client config
248cat << EOF > $OBJ/ssh_config 257cat << EOF > $OBJ/ssh_config
249Host * 258Host *
259 Protocol 2,1
250 Hostname 127.0.0.1 260 Hostname 127.0.0.1
251 HostKeyAlias localhost-with-alias 261 HostKeyAlias localhost-with-alias
252 Port $PORT 262 Port $PORT
diff --git a/roaming.h b/roaming.h
index e517161f6..6bb94cc39 100644
--- a/roaming.h
+++ b/roaming.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: roaming.h,v 1.4 2009/06/27 09:32:43 andreas Exp $ */ 1/* $OpenBSD: roaming.h,v 1.5 2009/10/24 11:11:58 andreas Exp $ */
2/* 2/*
3 * Copyright (c) 2004-2009 AppGate Network Security AB 3 * Copyright (c) 2004-2009 AppGate Network Security AB
4 * 4 *
@@ -19,12 +19,17 @@
19#define ROAMING_H 19#define ROAMING_H
20 20
21#define DEFAULT_ROAMBUF 65536 21#define DEFAULT_ROAMBUF 65536
22#define ROAMING_REQUEST "roaming@appgate.com"
22 23
24extern int roaming_enabled;
23extern int resume_in_progress; 25extern int resume_in_progress;
24 26
27void request_roaming(void);
25int get_snd_buf_size(void); 28int get_snd_buf_size(void);
26int get_recv_buf_size(void); 29int get_recv_buf_size(void);
27void add_recv_bytes(u_int64_t); 30void add_recv_bytes(u_int64_t);
31int wait_for_roaming_reconnect(void);
32void roaming_reply(int, u_int32_t, void *);
28void set_out_buffer_size(size_t); 33void set_out_buffer_size(size_t);
29ssize_t roaming_write(int, const void *, size_t, int *); 34ssize_t roaming_write(int, const void *, size_t, int *);
30ssize_t roaming_read(int, void *, size_t, int *); 35ssize_t roaming_read(int, void *, size_t, int *);
@@ -33,6 +38,7 @@ u_int64_t get_recv_bytes(void);
33u_int64_t get_sent_bytes(void); 38u_int64_t get_sent_bytes(void);
34void roam_set_bytes(u_int64_t, u_int64_t); 39void roam_set_bytes(u_int64_t, u_int64_t);
35void resend_bytes(int, u_int64_t *); 40void resend_bytes(int, u_int64_t *);
41void calculate_new_key(u_int64_t *, u_int64_t, u_int64_t);
36int resume_kex(void); 42int resume_kex(void);
37 43
38#endif /* ROAMING */ 44#endif /* ROAMING */
diff --git a/roaming_client.c b/roaming_client.c
new file mode 100644
index 000000000..cea8e7360
--- /dev/null
+++ b/roaming_client.c
@@ -0,0 +1,280 @@
1/* $OpenBSD: roaming_client.c,v 1.3 2010/01/18 01:50:27 dtucker Exp $ */
2/*
3 * Copyright (c) 2004-2009 AppGate Network Security AB
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#include "includes.h"
19
20#include "openbsd-compat/sys-queue.h"
21#include <sys/types.h>
22#include <sys/socket.h>
23
24#ifdef HAVE_INTTYPES_H
25#include <inttypes.h>
26#endif
27#include <signal.h>
28#include <string.h>
29#include <unistd.h>
30
31#include <openssl/crypto.h>
32#include <openssl/sha.h>
33
34#include "xmalloc.h"
35#include "buffer.h"
36#include "channels.h"
37#include "cipher.h"
38#include "dispatch.h"
39#include "clientloop.h"
40#include "log.h"
41#include "match.h"
42#include "misc.h"
43#include "packet.h"
44#include "ssh.h"
45#include "key.h"
46#include "kex.h"
47#include "readconf.h"
48#include "roaming.h"
49#include "ssh2.h"
50#include "sshconnect.h"
51
52/* import */
53extern Options options;
54extern char *host;
55extern struct sockaddr_storage hostaddr;
56extern int session_resumed;
57
58static u_int32_t roaming_id;
59static u_int64_t cookie;
60static u_int64_t lastseenchall;
61static u_int64_t key1, key2, oldkey1, oldkey2;
62
63void
64roaming_reply(int type, u_int32_t seq, void *ctxt)
65{
66 if (type == SSH2_MSG_REQUEST_FAILURE) {
67 logit("Server denied roaming");
68 return;
69 }
70 verbose("Roaming enabled");
71 roaming_id = packet_get_int();
72 cookie = packet_get_int64();
73 key1 = oldkey1 = packet_get_int64();
74 key2 = oldkey2 = packet_get_int64();
75 set_out_buffer_size(packet_get_int() + get_snd_buf_size());
76 roaming_enabled = 1;
77}
78
79void
80request_roaming(void)
81{
82 packet_start(SSH2_MSG_GLOBAL_REQUEST);
83 packet_put_cstring(ROAMING_REQUEST);
84 packet_put_char(1);
85 packet_put_int(get_recv_buf_size());
86 packet_send();
87 client_register_global_confirm(roaming_reply, NULL);
88}
89
90static void
91roaming_auth_required(void)
92{
93 u_char digest[SHA_DIGEST_LENGTH];
94 EVP_MD_CTX md;
95 Buffer b;
96 const EVP_MD *evp_md = EVP_sha1();
97 u_int64_t chall, oldchall;
98
99 chall = packet_get_int64();
100 oldchall = packet_get_int64();
101 if (oldchall != lastseenchall) {
102 key1 = oldkey1;
103 key2 = oldkey2;
104 }
105 lastseenchall = chall;
106
107 buffer_init(&b);
108 buffer_put_int64(&b, cookie);
109 buffer_put_int64(&b, chall);
110 EVP_DigestInit(&md, evp_md);
111 EVP_DigestUpdate(&md, buffer_ptr(&b), buffer_len(&b));
112 EVP_DigestFinal(&md, digest, NULL);
113 buffer_free(&b);
114
115 packet_start(SSH2_MSG_KEX_ROAMING_AUTH);
116 packet_put_int64(key1 ^ get_recv_bytes());
117 packet_put_raw(digest, sizeof(digest));
118 packet_send();
119
120 oldkey1 = key1;
121 oldkey2 = key2;
122 calculate_new_key(&key1, cookie, chall);
123 calculate_new_key(&key2, cookie, chall);
124
125 debug("Received %llu bytes", (unsigned long long)get_recv_bytes());
126 debug("Sent roaming_auth packet");
127}
128
129int
130resume_kex(void)
131{
132 /*
133 * This should not happen - if the client sends the kex method
134 * resume@appgate.com then the kex is done in roaming_resume().
135 */
136 return 1;
137}
138
139static int
140roaming_resume(void)
141{
142 u_int64_t recv_bytes;
143 char *str = NULL, *kexlist = NULL, *c;
144 int i, type;
145 int timeout_ms = options.connection_timeout * 1000;
146 u_int len;
147 u_int32_t rnd = 0;
148
149 resume_in_progress = 1;
150
151 /* Exchange banners */
152 ssh_exchange_identification(timeout_ms);
153 packet_set_nonblocking();
154
155 /* Send a kexinit message with resume@appgate.com as only kex algo */
156 packet_start(SSH2_MSG_KEXINIT);
157 for (i = 0; i < KEX_COOKIE_LEN; i++) {
158 if (i % 4 == 0)
159 rnd = arc4random();
160 packet_put_char(rnd & 0xff);
161 rnd >>= 8;
162 }
163 packet_put_cstring(KEX_RESUME);
164 for (i = 1; i < PROPOSAL_MAX; i++) {
165 /* kex algorithm added so start with i=1 and not 0 */
166 packet_put_cstring(""); /* Not used when we resume */
167 }
168 packet_put_char(1); /* first kex_packet follows */
169 packet_put_int(0); /* reserved */
170 packet_send();
171
172 /* Assume that resume@appgate.com will be accepted */
173 packet_start(SSH2_MSG_KEX_ROAMING_RESUME);
174 packet_put_int(roaming_id);
175 packet_send();
176
177 /* Read the server's kexinit and check for resume@appgate.com */
178 if ((type = packet_read()) != SSH2_MSG_KEXINIT) {
179 debug("expected kexinit on resume, got %d", type);
180 goto fail;
181 }
182 for (i = 0; i < KEX_COOKIE_LEN; i++)
183 (void)packet_get_char();
184 kexlist = packet_get_string(&len);
185 if (!kexlist
186 || (str = match_list(KEX_RESUME, kexlist, NULL)) == NULL) {
187 debug("server doesn't allow resume");
188 goto fail;
189 }
190 xfree(str);
191 for (i = 1; i < PROPOSAL_MAX; i++) {
192 /* kex algorithm taken care of so start with i=1 and not 0 */
193 xfree(packet_get_string(&len));
194 }
195 i = packet_get_char(); /* first_kex_packet_follows */
196 if (i && (c = strchr(kexlist, ',')))
197 *c = 0;
198 if (i && strcmp(kexlist, KEX_RESUME)) {
199 debug("server's kex guess (%s) was wrong, skipping", kexlist);
200 (void)packet_read(); /* Wrong guess - discard packet */
201 }
202
203 /*
204 * Read the ROAMING_AUTH_REQUIRED challenge from the server and
205 * send ROAMING_AUTH
206 */
207 if ((type = packet_read()) != SSH2_MSG_KEX_ROAMING_AUTH_REQUIRED) {
208 debug("expected roaming_auth_required, got %d", type);
209 goto fail;
210 }
211 roaming_auth_required();
212
213 /* Read ROAMING_AUTH_OK from the server */
214 if ((type = packet_read()) != SSH2_MSG_KEX_ROAMING_AUTH_OK) {
215 debug("expected roaming_auth_ok, got %d", type);
216 goto fail;
217 }
218 recv_bytes = packet_get_int64() ^ oldkey2;
219 debug("Peer received %llu bytes", (unsigned long long)recv_bytes);
220 resend_bytes(packet_get_connection_out(), &recv_bytes);
221
222 resume_in_progress = 0;
223
224 session_resumed = 1; /* Tell clientloop */
225
226 return 0;
227
228fail:
229 if (kexlist)
230 xfree(kexlist);
231 if (packet_get_connection_in() == packet_get_connection_out())
232 close(packet_get_connection_in());
233 else {
234 close(packet_get_connection_in());
235 close(packet_get_connection_out());
236 }
237 return 1;
238}
239
240int
241wait_for_roaming_reconnect(void)
242{
243 static int reenter_guard = 0;
244 int timeout_ms = options.connection_timeout * 1000;
245 int c;
246
247 if (reenter_guard != 0)
248 fatal("Server refused resume, roaming timeout may be exceeded");
249 reenter_guard = 1;
250
251 fprintf(stderr, "[connection suspended, press return to resume]");
252 fflush(stderr);
253 packet_backup_state();
254 /* TODO Perhaps we should read from tty here */
255 while ((c = fgetc(stdin)) != EOF) {
256 if (c == 'Z' - 64) {
257 kill(getpid(), SIGTSTP);
258 continue;
259 }
260 if (c != '\n' && c != '\r')
261 continue;
262
263 if (ssh_connect(host, &hostaddr, options.port,
264 options.address_family, 1, &timeout_ms,
265 options.tcp_keep_alive, options.use_privileged_port,
266 options.proxy_command) == 0 && roaming_resume() == 0) {
267 packet_restore_state();
268 reenter_guard = 0;
269 fprintf(stderr, "[connection resumed]\n");
270 fflush(stderr);
271 return 0;
272 }
273
274 fprintf(stderr, "[reconnect failed, press return to retry]");
275 fflush(stderr);
276 }
277 fprintf(stderr, "[exiting]\n");
278 fflush(stderr);
279 exit(0);
280}
diff --git a/roaming_common.c b/roaming_common.c
index 73db09d79..9adbe56fc 100644
--- a/roaming_common.c
+++ b/roaming_common.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: roaming_common.c,v 1.5 2009/06/27 09:32:43 andreas Exp $ */ 1/* $OpenBSD: roaming_common.c,v 1.8 2010/01/12 00:59:29 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2004-2009 AppGate Network Security AB 3 * Copyright (c) 2004-2009 AppGate Network Security AB
4 * 4 *
@@ -52,9 +52,9 @@ int
52get_snd_buf_size() 52get_snd_buf_size()
53{ 53{
54 int fd = packet_get_connection_out(); 54 int fd = packet_get_connection_out();
55 int optval, optvallen; 55 int optval;
56 socklen_t optvallen = sizeof(optval);
56 57
57 optvallen = sizeof(optval);
58 if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &optval, &optvallen) != 0) 58 if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &optval, &optvallen) != 0)
59 optval = DEFAULT_ROAMBUF; 59 optval = DEFAULT_ROAMBUF;
60 return optval; 60 return optval;
@@ -64,9 +64,9 @@ int
64get_recv_buf_size() 64get_recv_buf_size()
65{ 65{
66 int fd = packet_get_connection_in(); 66 int fd = packet_get_connection_in();
67 int optval, optvallen; 67 int optval;
68 socklen_t optvallen = sizeof(optval);
68 69
69 optvallen = sizeof(optval);
70 if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &optval, &optvallen) != 0) 70 if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &optval, &optvallen) != 0)
71 optval = DEFAULT_ROAMBUF; 71 optval = DEFAULT_ROAMBUF;
72 return optval; 72 return optval;
@@ -145,8 +145,16 @@ roaming_write(int fd, const void *buf, size_t count, int *cont)
145 if (out_buf_size > 0) 145 if (out_buf_size > 0)
146 buf_append(buf, ret); 146 buf_append(buf, ret);
147 } 147 }
148 debug3("Wrote %ld bytes for a total of %llu", (long)ret, 148 if (out_buf_size > 0 &&
149 (unsigned long long)write_bytes); 149 (ret == 0 || (ret == -1 && errno == EPIPE))) {
150 if (wait_for_roaming_reconnect() != 0) {
151 ret = 0;
152 *cont = 1;
153 } else {
154 ret = -1;
155 errno = EAGAIN;
156 }
157 }
150 return ret; 158 return ret;
151} 159}
152 160
@@ -158,6 +166,15 @@ roaming_read(int fd, void *buf, size_t count, int *cont)
158 if (!resume_in_progress) { 166 if (!resume_in_progress) {
159 read_bytes += ret; 167 read_bytes += ret;
160 } 168 }
169 } else if (out_buf_size > 0 &&
170 (ret == 0 || (ret == -1 && (errno == ECONNRESET
171 || errno == ECONNABORTED || errno == ETIMEDOUT
172 || errno == EHOSTUNREACH)))) {
173 debug("roaming_read failed for %d ret=%ld errno=%d",
174 fd, (long)ret, errno);
175 ret = 0;
176 if (wait_for_roaming_reconnect() == 0)
177 *cont = 1;
161 } 178 }
162 return ret; 179 return ret;
163} 180}
@@ -199,3 +216,29 @@ resend_bytes(int fd, u_int64_t *offset)
199 atomicio(vwrite, fd, out_buf + (out_last - needed), needed); 216 atomicio(vwrite, fd, out_buf + (out_last - needed), needed);
200 } 217 }
201} 218}
219
220/*
221 * Caclulate a new key after a reconnect
222 */
223void
224calculate_new_key(u_int64_t *key, u_int64_t cookie, u_int64_t challenge)
225{
226 const EVP_MD *md = EVP_sha1();
227 EVP_MD_CTX ctx;
228 char hash[EVP_MAX_MD_SIZE];
229 Buffer b;
230
231 buffer_init(&b);
232 buffer_put_int64(&b, *key);
233 buffer_put_int64(&b, cookie);
234 buffer_put_int64(&b, challenge);
235
236 EVP_DigestInit(&ctx, md);
237 EVP_DigestUpdate(&ctx, buffer_ptr(&b), buffer_len(&b));
238 EVP_DigestFinal(&ctx, hash, NULL);
239
240 buffer_clear(&b);
241 buffer_append(&b, hash, EVP_MD_size(md));
242 *key = buffer_get_int64(&b);
243 buffer_free(&b);
244}
diff --git a/roaming_serv.c b/roaming_serv.c
new file mode 100644
index 000000000..511ca8461
--- /dev/null
+++ b/roaming_serv.c
@@ -0,0 +1,31 @@
1/* $OpenBSD: roaming_serv.c,v 1.1 2009/10/24 11:18:23 andreas Exp $ */
2/*
3 * Copyright (c) 2004-2009 AppGate Network Security AB
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#include "includes.h"
19
20#include <sys/types.h>
21
22#include "roaming.h"
23
24/*
25 * Wait for the roaming client to reconnect. Returns 0 if a connect ocurred.
26 */
27int
28wait_for_roaming_reconnect(void)
29{
30 return 1;
31}
diff --git a/scard-opensc.c b/scard-opensc.c
deleted file mode 100644
index 36dae05fd..000000000
--- a/scard-opensc.c
+++ /dev/null
@@ -1,532 +0,0 @@
1/*
2 * Copyright (c) 2002 Juha Yrjölä. All rights reserved.
3 * Copyright (c) 2001 Markus Friedl.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include "includes.h"
27#if defined(SMARTCARD) && defined(USE_OPENSC)
28
29#include <sys/types.h>
30
31#include <openssl/evp.h>
32#include <openssl/x509.h>
33
34#include <stdarg.h>
35#include <string.h>
36
37#include <opensc/opensc.h>
38#include <opensc/pkcs15.h>
39
40#include "key.h"
41#include "log.h"
42#include "xmalloc.h"
43#include "misc.h"
44#include "scard.h"
45
46#if OPENSSL_VERSION_NUMBER < 0x00907000L && defined(CRYPTO_LOCK_ENGINE)
47#define USE_ENGINE
48#define RSA_get_default_method RSA_get_default_openssl_method
49#else
50#endif
51
52#ifdef USE_ENGINE
53#include <openssl/engine.h>
54#define sc_get_rsa sc_get_engine
55#else
56#define sc_get_rsa sc_get_rsa_method
57#endif
58
59static int sc_reader_id;
60static sc_context_t *ctx = NULL;
61static sc_card_t *card = NULL;
62static sc_pkcs15_card_t *p15card = NULL;
63
64static char *sc_pin = NULL;
65
66struct sc_priv_data
67{
68 struct sc_pkcs15_id cert_id;
69 int ref_count;
70};
71
72void
73sc_close(void)
74{
75 if (p15card) {
76 sc_pkcs15_unbind(p15card);
77 p15card = NULL;
78 }
79 if (card) {
80 sc_disconnect_card(card, 0);
81 card = NULL;
82 }
83 if (ctx) {
84 sc_release_context(ctx);
85 ctx = NULL;
86 }
87}
88
89static int
90sc_init(void)
91{
92 int r;
93
94 r = sc_establish_context(&ctx, "openssh");
95 if (r)
96 goto err;
97 if (sc_reader_id >= ctx->reader_count) {
98 r = SC_ERROR_NO_READERS_FOUND;
99 error("Illegal reader number %d (max %d)", sc_reader_id,
100 ctx->reader_count -1);
101 goto err;
102 }
103 r = sc_connect_card(ctx->reader[sc_reader_id], 0, &card);
104 if (r)
105 goto err;
106 r = sc_pkcs15_bind(card, &p15card);
107 if (r)
108 goto err;
109 return 0;
110err:
111 sc_close();
112 return r;
113}
114
115/* private key operations */
116
117static int
118sc_prkey_op_init(RSA *rsa, struct sc_pkcs15_object **key_obj_out,
119 unsigned int usage)
120{
121 int r;
122 struct sc_priv_data *priv;
123 struct sc_pkcs15_object *key_obj;
124 struct sc_pkcs15_prkey_info *key;
125 struct sc_pkcs15_object *pin_obj;
126 struct sc_pkcs15_pin_info *pin;
127
128 priv = (struct sc_priv_data *) RSA_get_app_data(rsa);
129 if (priv == NULL)
130 return -1;
131 if (p15card == NULL) {
132 sc_close();
133 r = sc_init();
134 if (r) {
135 error("SmartCard init failed: %s", sc_strerror(r));
136 goto err;
137 }
138 }
139 r = sc_pkcs15_find_prkey_by_id_usage(p15card, &priv->cert_id,
140 usage, &key_obj);
141 if (r) {
142 error("Unable to find private key from SmartCard: %s",
143 sc_strerror(r));
144 goto err;
145 }
146 key = key_obj->data;
147 r = sc_pkcs15_find_pin_by_auth_id(p15card, &key_obj->auth_id,
148 &pin_obj);
149 if (r == SC_ERROR_OBJECT_NOT_FOUND) {
150 /* no pin required */
151 r = sc_lock(card);
152 if (r) {
153 error("Unable to lock smartcard: %s", sc_strerror(r));
154 goto err;
155 }
156 *key_obj_out = key_obj;
157 return 0;
158 } else if (r) {
159 error("Unable to find PIN object from SmartCard: %s",
160 sc_strerror(r));
161 goto err;
162 }
163 pin = pin_obj->data;
164 r = sc_lock(card);
165 if (r) {
166 error("Unable to lock smartcard: %s", sc_strerror(r));
167 goto err;
168 }
169 if (sc_pin != NULL) {
170 r = sc_pkcs15_verify_pin(p15card, pin, sc_pin,
171 strlen(sc_pin));
172 if (r) {
173 sc_unlock(card);
174 error("PIN code verification failed: %s",
175 sc_strerror(r));
176 goto err;
177 }
178 }
179 *key_obj_out = key_obj;
180 return 0;
181err:
182 sc_close();
183 return -1;
184}
185
186#define SC_USAGE_DECRYPT SC_PKCS15_PRKEY_USAGE_DECRYPT | \
187 SC_PKCS15_PRKEY_USAGE_UNWRAP
188
189static int
190sc_private_decrypt(int flen, u_char *from, u_char *to, RSA *rsa,
191 int padding)
192{
193 struct sc_pkcs15_object *key_obj;
194 int r;
195
196 if (padding != RSA_PKCS1_PADDING)
197 return -1;
198 r = sc_prkey_op_init(rsa, &key_obj, SC_USAGE_DECRYPT);
199 if (r)
200 return -1;
201 r = sc_pkcs15_decipher(p15card, key_obj, SC_ALGORITHM_RSA_PAD_PKCS1,
202 from, flen, to, flen);
203 sc_unlock(card);
204 if (r < 0) {
205 error("sc_pkcs15_decipher() failed: %s", sc_strerror(r));
206 goto err;
207 }
208 return r;
209err:
210 sc_close();
211 return -1;
212}
213
214#define SC_USAGE_SIGN SC_PKCS15_PRKEY_USAGE_SIGN | \
215 SC_PKCS15_PRKEY_USAGE_SIGNRECOVER
216
217static int
218sc_sign(int type, u_char *m, unsigned int m_len,
219 unsigned char *sigret, unsigned int *siglen, RSA *rsa)
220{
221 struct sc_pkcs15_object *key_obj;
222 int r;
223 unsigned long flags = 0;
224
225 /* XXX: sc_prkey_op_init will search for a pkcs15 private
226 * key object with the sign or signrecover usage flag set.
227 * If the signing key has only the non-repudiation flag set
228 * the key will be rejected as using a non-repudiation key
229 * for authentication is not recommended. Note: This does not
230 * prevent the use of a non-repudiation key for authentication
231 * if the sign or signrecover flag is set as well.
232 */
233 r = sc_prkey_op_init(rsa, &key_obj, SC_USAGE_SIGN);
234 if (r)
235 return -1;
236 /* FIXME: length of sigret correct? */
237 /* FIXME: check 'type' and modify flags accordingly */
238 flags = SC_ALGORITHM_RSA_PAD_PKCS1 | SC_ALGORITHM_RSA_HASH_SHA1;
239 r = sc_pkcs15_compute_signature(p15card, key_obj, flags,
240 m, m_len, sigret, RSA_size(rsa));
241 sc_unlock(card);
242 if (r < 0) {
243 error("sc_pkcs15_compute_signature() failed: %s",
244 sc_strerror(r));
245 goto err;
246 }
247 *siglen = r;
248 return 1;
249err:
250 sc_close();
251 return 0;
252}
253
254static int
255sc_private_encrypt(int flen, u_char *from, u_char *to, RSA *rsa,
256 int padding)
257{
258 error("Private key encryption not supported");
259 return -1;
260}
261
262/* called on free */
263
264static int (*orig_finish)(RSA *rsa) = NULL;
265
266static int
267sc_finish(RSA *rsa)
268{
269 struct sc_priv_data *priv;
270
271 priv = RSA_get_app_data(rsa);
272 priv->ref_count--;
273 if (priv->ref_count == 0) {
274 free(priv);
275 sc_close();
276 }
277 if (orig_finish)
278 orig_finish(rsa);
279 return 1;
280}
281
282/* engine for overloading private key operations */
283
284static RSA_METHOD *
285sc_get_rsa_method(void)
286{
287 static RSA_METHOD smart_rsa;
288 const RSA_METHOD *def = RSA_get_default_method();
289
290 /* use the OpenSSL version */
291 memcpy(&smart_rsa, def, sizeof(smart_rsa));
292
293 smart_rsa.name = "opensc";
294
295 /* overload */
296 smart_rsa.rsa_priv_enc = sc_private_encrypt;
297 smart_rsa.rsa_priv_dec = sc_private_decrypt;
298 smart_rsa.rsa_sign = sc_sign;
299
300 /* save original */
301 orig_finish = def->finish;
302 smart_rsa.finish = sc_finish;
303
304 return &smart_rsa;
305}
306
307#ifdef USE_ENGINE
308static ENGINE *
309sc_get_engine(void)
310{
311 static ENGINE *smart_engine = NULL;
312
313 if ((smart_engine = ENGINE_new()) == NULL)
314 fatal("ENGINE_new failed");
315
316 ENGINE_set_id(smart_engine, "opensc");
317 ENGINE_set_name(smart_engine, "OpenSC");
318
319 ENGINE_set_RSA(smart_engine, sc_get_rsa_method());
320 ENGINE_set_DSA(smart_engine, DSA_get_default_openssl_method());
321 ENGINE_set_DH(smart_engine, DH_get_default_openssl_method());
322 ENGINE_set_RAND(smart_engine, RAND_SSLeay());
323 ENGINE_set_BN_mod_exp(smart_engine, BN_mod_exp);
324
325 return smart_engine;
326}
327#endif
328
329static void
330convert_rsa_to_rsa1(Key * in, Key * out)
331{
332 struct sc_priv_data *priv;
333
334 out->rsa->flags = in->rsa->flags;
335 out->flags = in->flags;
336 RSA_set_method(out->rsa, RSA_get_method(in->rsa));
337 BN_copy(out->rsa->n, in->rsa->n);
338 BN_copy(out->rsa->e, in->rsa->e);
339 priv = RSA_get_app_data(in->rsa);
340 priv->ref_count++;
341 RSA_set_app_data(out->rsa, priv);
342 return;
343}
344
345static int
346sc_read_pubkey(Key * k, const struct sc_pkcs15_object *cert_obj)
347{
348 int r;
349 sc_pkcs15_cert_t *cert = NULL;
350 struct sc_priv_data *priv = NULL;
351 sc_pkcs15_cert_info_t *cinfo = cert_obj->data;
352
353 X509 *x509 = NULL;
354 EVP_PKEY *pubkey = NULL;
355 u8 *p;
356 char *tmp;
357
358 debug("sc_read_pubkey() with cert id %02X", cinfo->id.value[0]);
359 r = sc_pkcs15_read_certificate(p15card, cinfo, &cert);
360 if (r) {
361 logit("Certificate read failed: %s", sc_strerror(r));
362 goto err;
363 }
364 x509 = X509_new();
365 if (x509 == NULL) {
366 r = -1;
367 goto err;
368 }
369 p = cert->data;
370 if (!d2i_X509(&x509, &p, cert->data_len)) {
371 logit("Unable to parse X.509 certificate");
372 r = -1;
373 goto err;
374 }
375 sc_pkcs15_free_certificate(cert);
376 cert = NULL;
377 pubkey = X509_get_pubkey(x509);
378 X509_free(x509);
379 x509 = NULL;
380 if (pubkey->type != EVP_PKEY_RSA) {
381 logit("Public key is of unknown type");
382 r = -1;
383 goto err;
384 }
385 k->rsa = EVP_PKEY_get1_RSA(pubkey);
386 EVP_PKEY_free(pubkey);
387
388 k->rsa->flags |= RSA_FLAG_SIGN_VER;
389 RSA_set_method(k->rsa, sc_get_rsa_method());
390 priv = xmalloc(sizeof(struct sc_priv_data));
391 priv->cert_id = cinfo->id;
392 priv->ref_count = 1;
393 RSA_set_app_data(k->rsa, priv);
394
395 k->flags = KEY_FLAG_EXT;
396 tmp = key_fingerprint(k, SSH_FP_MD5, SSH_FP_HEX);
397 debug("fingerprint %d %s", key_size(k), tmp);
398 xfree(tmp);
399
400 return 0;
401err:
402 if (cert)
403 sc_pkcs15_free_certificate(cert);
404 if (pubkey)
405 EVP_PKEY_free(pubkey);
406 if (x509)
407 X509_free(x509);
408 return r;
409}
410
411Key **
412sc_get_keys(const char *id, const char *pin)
413{
414 Key *k, **keys;
415 int i, r, real_count = 0, key_count;
416 sc_pkcs15_id_t cert_id;
417 sc_pkcs15_object_t *certs[32];
418 char *buf = xstrdup(id), *p;
419
420 debug("sc_get_keys called: id = %s", id);
421
422 if (sc_pin != NULL)
423 xfree(sc_pin);
424 sc_pin = (pin == NULL) ? NULL : xstrdup(pin);
425
426 cert_id.len = 0;
427 if ((p = strchr(buf, ':')) != NULL) {
428 *p = 0;
429 p++;
430 sc_pkcs15_hex_string_to_id(p, &cert_id);
431 }
432 r = sscanf(buf, "%d", &sc_reader_id);
433 xfree(buf);
434 if (r != 1)
435 goto err;
436 if (p15card == NULL) {
437 sc_close();
438 r = sc_init();
439 if (r) {
440 error("Smartcard init failed: %s", sc_strerror(r));
441 goto err;
442 }
443 }
444 if (cert_id.len) {
445 r = sc_pkcs15_find_cert_by_id(p15card, &cert_id, &certs[0]);
446 if (r < 0)
447 goto err;
448 key_count = 1;
449 } else {
450 r = sc_pkcs15_get_objects(p15card, SC_PKCS15_TYPE_CERT_X509,
451 certs, 32);
452 if (r == 0) {
453 logit("No certificates found on smartcard");
454 r = -1;
455 goto err;
456 } else if (r < 0) {
457 error("Certificate enumeration failed: %s",
458 sc_strerror(r));
459 goto err;
460 }
461 key_count = r;
462 }
463 if (key_count > 1024)
464 fatal("Too many keys (%u), expected <= 1024", key_count);
465 keys = xcalloc(key_count * 2 + 1, sizeof(Key *));
466 for (i = 0; i < key_count; i++) {
467 sc_pkcs15_object_t *tmp_obj = NULL;
468 cert_id = ((sc_pkcs15_cert_info_t *)(certs[i]->data))->id;
469 if (sc_pkcs15_find_prkey_by_id(p15card, &cert_id, &tmp_obj))
470 /* skip the public key (certificate) if no
471 * corresponding private key is present */
472 continue;
473 k = key_new(KEY_RSA);
474 if (k == NULL)
475 break;
476 r = sc_read_pubkey(k, certs[i]);
477 if (r) {
478 error("sc_read_pubkey failed: %s", sc_strerror(r));
479 key_free(k);
480 continue;
481 }
482 keys[real_count] = k;
483 real_count++;
484 k = key_new(KEY_RSA1);
485 if (k == NULL)
486 break;
487 convert_rsa_to_rsa1(keys[real_count-1], k);
488 keys[real_count] = k;
489 real_count++;
490 }
491 keys[real_count] = NULL;
492
493 return keys;
494err:
495 sc_close();
496 return NULL;
497}
498
499int
500sc_put_key(Key *prv, const char *id)
501{
502 error("key uploading not yet supported");
503 return -1;
504}
505
506char *
507sc_get_key_label(Key *key)
508{
509 int r;
510 const struct sc_priv_data *priv;
511 struct sc_pkcs15_object *key_obj;
512
513 priv = (const struct sc_priv_data *) RSA_get_app_data(key->rsa);
514 if (priv == NULL || p15card == NULL) {
515 logit("SmartCard key not loaded");
516 /* internal error => return default label */
517 return xstrdup("smartcard key");
518 }
519 r = sc_pkcs15_find_prkey_by_id(p15card, &priv->cert_id, &key_obj);
520 if (r) {
521 logit("Unable to find private key from SmartCard: %s",
522 sc_strerror(r));
523 return xstrdup("smartcard key");
524 }
525 if (key_obj == NULL || key_obj->label == NULL)
526 /* the optional PKCS#15 label does not exists
527 * => return the default label */
528 return xstrdup("smartcard key");
529 return xstrdup(key_obj->label);
530}
531
532#endif /* SMARTCARD */
diff --git a/scard.c b/scard.c
deleted file mode 100644
index 9fd3ca1b4..000000000
--- a/scard.c
+++ /dev/null
@@ -1,571 +0,0 @@
1/* $OpenBSD: scard.c,v 1.36 2006/11/06 21:25:28 markus Exp $ */
2/*
3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include "includes.h"
27#if defined(SMARTCARD) && defined(USE_SECTOK)
28
29#include <sys/types.h>
30
31#include <sectok.h>
32#include <stdarg.h>
33#include <string.h>
34
35#include <openssl/evp.h>
36
37#include "xmalloc.h"
38#include "key.h"
39#include "log.h"
40#include "misc.h"
41#include "scard.h"
42
43#if OPENSSL_VERSION_NUMBER < 0x00907000L
44#define USE_ENGINE
45#define RSA_get_default_method RSA_get_default_openssl_method
46#else
47#endif
48
49#ifdef USE_ENGINE
50#include <openssl/engine.h>
51#define sc_get_rsa sc_get_engine
52#else
53#define sc_get_rsa sc_get_rsa_method
54#endif
55
56#define CLA_SSH 0x05
57#define INS_DECRYPT 0x10
58#define INS_GET_KEYLENGTH 0x20
59#define INS_GET_PUBKEY 0x30
60#define INS_GET_RESPONSE 0xc0
61
62#define MAX_BUF_SIZE 256
63
64u_char DEFAUT0[] = {0xad, 0x9f, 0x61, 0xfe, 0xfa, 0x20, 0xce, 0x63};
65
66static int sc_fd = -1;
67static char *sc_reader_id = NULL;
68static char *sc_pin = NULL;
69static int cla = 0x00; /* class */
70
71static void sc_mk_digest(const char *pin, u_char *digest);
72static int get_AUT0(u_char *aut0);
73static int try_AUT0(void);
74
75/* interface to libsectok */
76
77static int
78sc_open(void)
79{
80 int sw;
81
82 if (sc_fd >= 0)
83 return sc_fd;
84
85 sc_fd = sectok_friendly_open(sc_reader_id, STONOWAIT, &sw);
86 if (sc_fd < 0) {
87 error("sectok_open failed: %s", sectok_get_sw(sw));
88 return SCARD_ERROR_FAIL;
89 }
90 if (! sectok_cardpresent(sc_fd)) {
91 debug("smartcard in reader %s not present, skipping",
92 sc_reader_id);
93 sc_close();
94 return SCARD_ERROR_NOCARD;
95 }
96 if (sectok_reset(sc_fd, 0, NULL, &sw) <= 0) {
97 error("sectok_reset failed: %s", sectok_get_sw(sw));
98 sc_fd = -1;
99 return SCARD_ERROR_FAIL;
100 }
101 if ((cla = cyberflex_inq_class(sc_fd)) < 0)
102 cla = 0;
103
104 debug("sc_open ok %d", sc_fd);
105 return sc_fd;
106}
107
108static int
109sc_enable_applet(void)
110{
111 static u_char aid[] = {0xfc, 0x53, 0x73, 0x68, 0x2e, 0x62, 0x69, 0x6e};
112 int sw = 0;
113
114 /* select applet id */
115 sectok_apdu(sc_fd, cla, 0xa4, 0x04, 0, sizeof aid, aid, 0, NULL, &sw);
116 if (!sectok_swOK(sw)) {
117 error("sectok_apdu failed: %s", sectok_get_sw(sw));
118 sc_close();
119 return -1;
120 }
121 return 0;
122}
123
124static int
125sc_init(void)
126{
127 int status;
128
129 status = sc_open();
130 if (status == SCARD_ERROR_NOCARD) {
131 return SCARD_ERROR_NOCARD;
132 }
133 if (status < 0) {
134 error("sc_open failed");
135 return status;
136 }
137 if (sc_enable_applet() < 0) {
138 error("sc_enable_applet failed");
139 return SCARD_ERROR_APPLET;
140 }
141 return 0;
142}
143
144static int
145sc_read_pubkey(Key * k)
146{
147 u_char buf[2], *n;
148 char *p;
149 int len, sw, status = -1;
150
151 len = sw = 0;
152 n = NULL;
153
154 if (sc_fd < 0) {
155 if (sc_init() < 0)
156 goto err;
157 }
158
159 /* get key size */
160 sectok_apdu(sc_fd, CLA_SSH, INS_GET_KEYLENGTH, 0, 0, 0, NULL,
161 sizeof(buf), buf, &sw);
162 if (!sectok_swOK(sw)) {
163 error("could not obtain key length: %s", sectok_get_sw(sw));
164 goto err;
165 }
166 len = (buf[0] << 8) | buf[1];
167 len /= 8;
168 debug("INS_GET_KEYLENGTH: len %d sw %s", len, sectok_get_sw(sw));
169
170 n = xmalloc(len);
171 /* get n */
172 sectok_apdu(sc_fd, CLA_SSH, INS_GET_PUBKEY, 0, 0, 0, NULL, len, n, &sw);
173
174 if (sw == 0x6982) {
175 if (try_AUT0() < 0)
176 goto err;
177 sectok_apdu(sc_fd, CLA_SSH, INS_GET_PUBKEY, 0, 0, 0, NULL, len, n, &sw);
178 }
179 if (!sectok_swOK(sw)) {
180 error("could not obtain public key: %s", sectok_get_sw(sw));
181 goto err;
182 }
183
184 debug("INS_GET_KEYLENGTH: sw %s", sectok_get_sw(sw));
185
186 if (BN_bin2bn(n, len, k->rsa->n) == NULL) {
187 error("c_read_pubkey: BN_bin2bn failed");
188 goto err;
189 }
190
191 /* currently the java applet just stores 'n' */
192 if (!BN_set_word(k->rsa->e, 35)) {
193 error("c_read_pubkey: BN_set_word(e, 35) failed");
194 goto err;
195 }
196
197 status = 0;
198 p = key_fingerprint(k, SSH_FP_MD5, SSH_FP_HEX);
199 debug("fingerprint %u %s", key_size(k), p);
200 xfree(p);
201
202err:
203 if (n != NULL)
204 xfree(n);
205 sc_close();
206 return status;
207}
208
209/* private key operations */
210
211static int
212sc_private_decrypt(int flen, u_char *from, u_char *to, RSA *rsa,
213 int padding)
214{
215 u_char *padded = NULL;
216 int sw, len, olen, status = -1;
217
218 debug("sc_private_decrypt called");
219
220 olen = len = sw = 0;
221 if (sc_fd < 0) {
222 status = sc_init();
223 if (status < 0)
224 goto err;
225 }
226 if (padding != RSA_PKCS1_PADDING)
227 goto err;
228
229 len = BN_num_bytes(rsa->n);
230 padded = xmalloc(len);
231
232 sectok_apdu(sc_fd, CLA_SSH, INS_DECRYPT, 0, 0, len, from, len, padded, &sw);
233
234 if (sw == 0x6982) {
235 if (try_AUT0() < 0)
236 goto err;
237 sectok_apdu(sc_fd, CLA_SSH, INS_DECRYPT, 0, 0, len, from, len, padded, &sw);
238 }
239 if (!sectok_swOK(sw)) {
240 error("sc_private_decrypt: INS_DECRYPT failed: %s",
241 sectok_get_sw(sw));
242 goto err;
243 }
244 olen = RSA_padding_check_PKCS1_type_2(to, len, padded + 1, len - 1,
245 len);
246err:
247 if (padded)
248 xfree(padded);
249 sc_close();
250 return (olen >= 0 ? olen : status);
251}
252
253static int
254sc_private_encrypt(int flen, u_char *from, u_char *to, RSA *rsa,
255 int padding)
256{
257 u_char *padded = NULL;
258 int sw, len, status = -1;
259
260 len = sw = 0;
261 if (sc_fd < 0) {
262 status = sc_init();
263 if (status < 0)
264 goto err;
265 }
266 if (padding != RSA_PKCS1_PADDING)
267 goto err;
268
269 debug("sc_private_encrypt called");
270 len = BN_num_bytes(rsa->n);
271 padded = xmalloc(len);
272
273 if (RSA_padding_add_PKCS1_type_1(padded, len, (u_char *)from, flen) <= 0) {
274 error("RSA_padding_add_PKCS1_type_1 failed");
275 goto err;
276 }
277 sectok_apdu(sc_fd, CLA_SSH, INS_DECRYPT, 0, 0, len, padded, len, to, &sw);
278 if (sw == 0x6982) {
279 if (try_AUT0() < 0)
280 goto err;
281 sectok_apdu(sc_fd, CLA_SSH, INS_DECRYPT, 0, 0, len, padded, len, to, &sw);
282 }
283 if (!sectok_swOK(sw)) {
284 error("sc_private_encrypt: INS_DECRYPT failed: %s",
285 sectok_get_sw(sw));
286 goto err;
287 }
288err:
289 if (padded)
290 xfree(padded);
291 sc_close();
292 return (len >= 0 ? len : status);
293}
294
295/* called on free */
296
297static int (*orig_finish)(RSA *rsa) = NULL;
298
299static int
300sc_finish(RSA *rsa)
301{
302 if (orig_finish)
303 orig_finish(rsa);
304 sc_close();
305 return 1;
306}
307
308/* engine for overloading private key operations */
309
310static RSA_METHOD *
311sc_get_rsa_method(void)
312{
313 static RSA_METHOD smart_rsa;
314 const RSA_METHOD *def = RSA_get_default_method();
315
316 /* use the OpenSSL version */
317 memcpy(&smart_rsa, def, sizeof(smart_rsa));
318
319 smart_rsa.name = "sectok";
320
321 /* overload */
322 smart_rsa.rsa_priv_enc = sc_private_encrypt;
323 smart_rsa.rsa_priv_dec = sc_private_decrypt;
324
325 /* save original */
326 orig_finish = def->finish;
327 smart_rsa.finish = sc_finish;
328
329 return &smart_rsa;
330}
331
332#ifdef USE_ENGINE
333static ENGINE *
334sc_get_engine(void)
335{
336 static ENGINE *smart_engine = NULL;
337
338 if ((smart_engine = ENGINE_new()) == NULL)
339 fatal("ENGINE_new failed");
340
341 ENGINE_set_id(smart_engine, "sectok");
342 ENGINE_set_name(smart_engine, "libsectok");
343
344 ENGINE_set_RSA(smart_engine, sc_get_rsa_method());
345 ENGINE_set_DSA(smart_engine, DSA_get_default_openssl_method());
346 ENGINE_set_DH(smart_engine, DH_get_default_openssl_method());
347 ENGINE_set_RAND(smart_engine, RAND_SSLeay());
348 ENGINE_set_BN_mod_exp(smart_engine, BN_mod_exp);
349
350 return smart_engine;
351}
352#endif
353
354void
355sc_close(void)
356{
357 if (sc_fd >= 0) {
358 sectok_close(sc_fd);
359 sc_fd = -1;
360 }
361}
362
363Key **
364sc_get_keys(const char *id, const char *pin)
365{
366 Key *k, *n, **keys;
367 int status, nkeys = 2;
368
369 if (sc_reader_id != NULL)
370 xfree(sc_reader_id);
371 sc_reader_id = xstrdup(id);
372
373 if (sc_pin != NULL)
374 xfree(sc_pin);
375 sc_pin = (pin == NULL) ? NULL : xstrdup(pin);
376
377 k = key_new(KEY_RSA);
378 if (k == NULL) {
379 return NULL;
380 }
381 status = sc_read_pubkey(k);
382 if (status == SCARD_ERROR_NOCARD) {
383 key_free(k);
384 return NULL;
385 }
386 if (status < 0) {
387 error("sc_read_pubkey failed");
388 key_free(k);
389 return NULL;
390 }
391 keys = xcalloc((nkeys+1), sizeof(Key *));
392
393 n = key_new(KEY_RSA1);
394 if ((BN_copy(n->rsa->n, k->rsa->n) == NULL) ||
395 (BN_copy(n->rsa->e, k->rsa->e) == NULL))
396 fatal("sc_get_keys: BN_copy failed");
397 RSA_set_method(n->rsa, sc_get_rsa());
398 n->flags |= KEY_FLAG_EXT;
399 keys[0] = n;
400
401 n = key_new(KEY_RSA);
402 if ((BN_copy(n->rsa->n, k->rsa->n) == NULL) ||
403 (BN_copy(n->rsa->e, k->rsa->e) == NULL))
404 fatal("sc_get_keys: BN_copy failed");
405 RSA_set_method(n->rsa, sc_get_rsa());
406 n->flags |= KEY_FLAG_EXT;
407 keys[1] = n;
408
409 keys[2] = NULL;
410
411 key_free(k);
412 return keys;
413}
414
415#define NUM_RSA_KEY_ELEMENTS 5+1
416#define COPY_RSA_KEY(x, i) \
417 do { \
418 len = BN_num_bytes(prv->rsa->x); \
419 elements[i] = xmalloc(len); \
420 debug("#bytes %d", len); \
421 if (BN_bn2bin(prv->rsa->x, elements[i]) < 0) \
422 goto done; \
423 } while (0)
424
425static void
426sc_mk_digest(const char *pin, u_char *digest)
427{
428 const EVP_MD *evp_md = EVP_sha1();
429 EVP_MD_CTX md;
430
431 EVP_DigestInit(&md, evp_md);
432 EVP_DigestUpdate(&md, pin, strlen(pin));
433 EVP_DigestFinal(&md, digest, NULL);
434}
435
436static int
437get_AUT0(u_char *aut0)
438{
439 char *pass;
440
441 pass = read_passphrase("Enter passphrase for smartcard: ", RP_ALLOW_STDIN);
442 if (pass == NULL)
443 return -1;
444 if (!strcmp(pass, "-")) {
445 memcpy(aut0, DEFAUT0, sizeof DEFAUT0);
446 return 0;
447 }
448 sc_mk_digest(pass, aut0);
449 memset(pass, 0, strlen(pass));
450 xfree(pass);
451 return 0;
452}
453
454static int
455try_AUT0(void)
456{
457 u_char aut0[EVP_MAX_MD_SIZE];
458
459 /* permission denied; try PIN if provided */
460 if (sc_pin && strlen(sc_pin) > 0) {
461 sc_mk_digest(sc_pin, aut0);
462 if (cyberflex_verify_AUT0(sc_fd, cla, aut0, 8) < 0) {
463 error("smartcard passphrase incorrect");
464 return (-1);
465 }
466 } else {
467 /* try default AUT0 key */
468 if (cyberflex_verify_AUT0(sc_fd, cla, DEFAUT0, 8) < 0) {
469 /* default AUT0 key failed; prompt for passphrase */
470 if (get_AUT0(aut0) < 0 ||
471 cyberflex_verify_AUT0(sc_fd, cla, aut0, 8) < 0) {
472 error("smartcard passphrase incorrect");
473 return (-1);
474 }
475 }
476 }
477 return (0);
478}
479
480int
481sc_put_key(Key *prv, const char *id)
482{
483 u_char *elements[NUM_RSA_KEY_ELEMENTS];
484 u_char key_fid[2];
485 u_char AUT0[EVP_MAX_MD_SIZE];
486 int len, status = -1, i, fd = -1, ret;
487 int sw = 0, cla = 0x00;
488
489 for (i = 0; i < NUM_RSA_KEY_ELEMENTS; i++)
490 elements[i] = NULL;
491
492 COPY_RSA_KEY(q, 0);
493 COPY_RSA_KEY(p, 1);
494 COPY_RSA_KEY(iqmp, 2);
495 COPY_RSA_KEY(dmq1, 3);
496 COPY_RSA_KEY(dmp1, 4);
497 COPY_RSA_KEY(n, 5);
498 len = BN_num_bytes(prv->rsa->n);
499 fd = sectok_friendly_open(id, STONOWAIT, &sw);
500 if (fd < 0) {
501 error("sectok_open failed: %s", sectok_get_sw(sw));
502 goto done;
503 }
504 if (! sectok_cardpresent(fd)) {
505 error("smartcard in reader %s not present", id);
506 goto done;
507 }
508 ret = sectok_reset(fd, 0, NULL, &sw);
509 if (ret <= 0) {
510 error("sectok_reset failed: %s", sectok_get_sw(sw));
511 goto done;
512 }
513 if ((cla = cyberflex_inq_class(fd)) < 0) {
514 error("cyberflex_inq_class failed");
515 goto done;
516 }
517 memcpy(AUT0, DEFAUT0, sizeof(DEFAUT0));
518 if (cyberflex_verify_AUT0(fd, cla, AUT0, sizeof(DEFAUT0)) < 0) {
519 if (get_AUT0(AUT0) < 0 ||
520 cyberflex_verify_AUT0(fd, cla, AUT0, sizeof(DEFAUT0)) < 0) {
521 memset(AUT0, 0, sizeof(DEFAUT0));
522 error("smartcard passphrase incorrect");
523 goto done;
524 }
525 }
526 memset(AUT0, 0, sizeof(DEFAUT0));
527 key_fid[0] = 0x00;
528 key_fid[1] = 0x12;
529 if (cyberflex_load_rsa_priv(fd, cla, key_fid, 5, 8*len, elements,
530 &sw) < 0) {
531 error("cyberflex_load_rsa_priv failed: %s", sectok_get_sw(sw));
532 goto done;
533 }
534 if (!sectok_swOK(sw))
535 goto done;
536 logit("cyberflex_load_rsa_priv done");
537 key_fid[0] = 0x73;
538 key_fid[1] = 0x68;
539 if (cyberflex_load_rsa_pub(fd, cla, key_fid, len, elements[5],
540 &sw) < 0) {
541 error("cyberflex_load_rsa_pub failed: %s", sectok_get_sw(sw));
542 goto done;
543 }
544 if (!sectok_swOK(sw))
545 goto done;
546 logit("cyberflex_load_rsa_pub done");
547 status = 0;
548
549done:
550 memset(elements[0], '\0', BN_num_bytes(prv->rsa->q));
551 memset(elements[1], '\0', BN_num_bytes(prv->rsa->p));
552 memset(elements[2], '\0', BN_num_bytes(prv->rsa->iqmp));
553 memset(elements[3], '\0', BN_num_bytes(prv->rsa->dmq1));
554 memset(elements[4], '\0', BN_num_bytes(prv->rsa->dmp1));
555 memset(elements[5], '\0', BN_num_bytes(prv->rsa->n));
556
557 for (i = 0; i < NUM_RSA_KEY_ELEMENTS; i++)
558 if (elements[i])
559 xfree(elements[i]);
560 if (fd != -1)
561 sectok_close(fd);
562 return (status);
563}
564
565char *
566sc_get_key_label(Key *key)
567{
568 return xstrdup("smartcard key");
569}
570
571#endif /* SMARTCARD && USE_SECTOK */
diff --git a/scard.h b/scard.h
deleted file mode 100644
index 82efe4839..000000000
--- a/scard.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/* $OpenBSD: scard.h,v 1.14 2006/08/03 03:34:42 deraadt Exp $ */
2
3/*
4 * Copyright (c) 2001 Markus Friedl. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#ifndef SCARD_H
28#define SCARD_H
29
30#define SCARD_ERROR_FAIL -1
31#define SCARD_ERROR_NOCARD -2
32#define SCARD_ERROR_APPLET -3
33
34Key **sc_get_keys(const char *, const char *);
35void sc_close(void);
36int sc_put_key(Key *, const char *);
37char *sc_get_key_label(Key *);
38
39#endif
diff --git a/scard/Makefile.in b/scard/Makefile.in
deleted file mode 100644
index 8519e208b..000000000
--- a/scard/Makefile.in
+++ /dev/null
@@ -1,29 +0,0 @@
1# $Id: Makefile.in,v 1.5 2006/10/23 21:44:47 tim Exp $
2
3prefix=@prefix@
4datadir=@datadir@
5datarootdir=@datarootdir@
6srcdir=@srcdir@
7top_srcdir=@top_srcdir@
8
9INSTALL=@INSTALL@
10
11VPATH=@srcdir@
12
13all:
14
15#Ssh.bin: Ssh.bin.uu
16# uudecode Ssh.bin.uu
17
18clean:
19# rm -rf Ssh.bin
20
21distprep:
22 uudecode Ssh.bin.uu
23
24distclean: clean
25 rm -f Makefile *~
26
27install: $(srcdir)/Ssh.bin
28 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir)
29 $(INSTALL) -m 0644 $(srcdir)/Ssh.bin $(DESTDIR)$(datadir)/Ssh.bin
diff --git a/scard/Ssh.bin b/scard/Ssh.bin
deleted file mode 100644
index edbadc618..000000000
--- a/scard/Ssh.bin
+++ /dev/null
Binary files differ
diff --git a/scard/Ssh.bin.uu b/scard/Ssh.bin.uu
deleted file mode 100644
index ea3986a69..000000000
--- a/scard/Ssh.bin.uu
+++ /dev/null
@@ -1,17 +0,0 @@
1begin 644 Ssh.bin
2M`P)!&P`801X`>``!`E@"`/Y@\`4`_J'P!0!!&T$=`?Z@\`4`01M!'`'^>/,!
3M`4$;01X!_G#S%P'^0],1`?Y@\!0`_G/S'0#^<]4``D$;L`4`_F'3``#^8=,%
4M`/ZAT`$!_J#0)P'^H],*`?ZCTPD`_G/5"P7^8=,'`OZAT`H`_J#0$@3^:-,@
5M`T$;`P`%`/Y@`<P``$$<\@\``$$=\B$``$$>\A```/`0__(%`@8!`0H``&``
6M0205!!D)I$L`"0J0`&``*!4$&58``````.P````%____P````.D````0````
7M,P```"````#'````,````(T````R````V!4#&0A*``D*;@!@`"@5!QD*`/\]
8M(6``1A)*``D*9P!@`"@*/P!@`$LK"1)@`$LK!6``4!P$#00#2@`.#01@`%5@
9M`%I@`"@37``>%0@2%0A>`%\($F``9%(`:`H_`&``2RL*<VA@`$LK8`!I"1`U
10M(14#`Q)@`&X<!`T$`TL`"P,28`!D4@`.#01@`%5@`%I@`"A2`"X5`PH$`&``
11M<RL#!6``9%(`'14#"@$"8`!S*P,%8`!D4@`,4@`)"FT`8``H60``\`+_\@$!
12M`0D`"```"I``8``H60#P$__R`0$""0`,``!B01LM7P`\*UD```#P$O_V`0$#
13M`0`8```37``>7@`R10`/$UP`'@H`R`D07@`W!%>P!?_R`0$$`@`\```37P``
14M$V+^H2U?``5=``H38OZ@+5\`#UT`%!-B_G@M"@0`7P`970`>"@0`8``C10`)
15/"F<`8``H$UX`+5D`````
16`
17end
diff --git a/scard/Ssh.java b/scard/Ssh.java
deleted file mode 100644
index 6418957c2..000000000
--- a/scard/Ssh.java
+++ /dev/null
@@ -1,164 +0,0 @@
1// $Id: Ssh.java,v 1.3 2002/05/22 04:24:02 djm Exp $
2//
3// Ssh.java
4// SSH / smartcard integration project, smartcard side
5//
6// Tomoko Fukuzawa, created, Feb., 2000
7//
8// Naomaru Itoi, modified, Apr., 2000
9//
10
11// copyright 2000
12// the regents of the university of michigan
13// all rights reserved
14//
15// permission is granted to use, copy, create derivative works
16// and redistribute this software and such derivative works
17// for any purpose, so long as the name of the university of
18// michigan is not used in any advertising or publicity
19// pertaining to the use or distribution of this software
20// without specific, written prior authorization. if the
21// above copyright notice or any other identification of the
22// university of michigan is included in any copy of any
23// portion of this software, then the disclaimer below must
24// also be included.
25//
26// this software is provided as is, without representation
27// from the university of michigan as to its fitness for any
28// purpose, and without warranty by the university of
29// michigan of any kind, either express or implied, including
30// without limitation the implied warranties of
31// merchantability and fitness for a particular purpose. the
32// regents of the university of michigan shall not be liable
33// for any damages, including special, indirect, incidental, or
34// consequential damages, with respect to any claim arising
35// out of or in connection with the use of the software, even
36// if it has been or is hereafter advised of the possibility of
37// such damages.
38
39import javacard.framework.*;
40import javacardx.framework.*;
41import javacardx.crypto.*;
42
43public class Ssh extends javacard.framework.Applet
44{
45 // Change this when the applet changes; hi byte is major, low byte is minor
46 static final short applet_version = (short)0x0102;
47
48 /* constants declaration */
49 // code of CLA byte in the command APDU header
50 static final byte Ssh_CLA =(byte)0x05;
51
52 // codes of INS byte in the command APDU header
53 static final byte DECRYPT = (byte) 0x10;
54 static final byte GET_KEYLENGTH = (byte) 0x20;
55 static final byte GET_PUBKEY = (byte) 0x30;
56 static final byte GET_VERSION = (byte) 0x32;
57 static final byte GET_RESPONSE = (byte) 0xc0;
58
59 static final short keysize = 1024;
60 static final short root_fid = (short)0x3f00;
61 static final short privkey_fid = (short)0x0012;
62 static final short pubkey_fid = (short)(('s'<<8)|'h');
63
64 /* instance variables declaration */
65 AsymKey rsakey;
66 CyberflexFile file;
67 CyberflexOS os;
68
69 private Ssh()
70 {
71 file = new CyberflexFile();
72 os = new CyberflexOS();
73
74 rsakey = new RSA_CRT_PrivateKey (keysize);
75
76 if ( ! rsakey.isSupportedLength (keysize) )
77 ISOException.throwIt (ISO.SW_WRONG_LENGTH);
78
79 register();
80 } // end of the constructor
81
82 public boolean select() {
83 if (!rsakey.isInitialized())
84 rsakey.setKeyInstance ((short)0xc8, (short)0x10);
85
86 return true;
87 }
88
89 public static void install(APDU apdu)
90 {
91 new Ssh(); // create a Ssh applet instance (card)
92 } // end of install method
93
94 public static void main(String args[]) {
95 ISOException.throwIt((short) 0x9000);
96 }
97
98 public void process(APDU apdu)
99 {
100 // APDU object carries a byte array (buffer) to
101 // transfer incoming and outgoing APDU header
102 // and data bytes between card and CAD
103 byte buffer[] = apdu.getBuffer();
104 short size, st;
105
106 // verify that if the applet can accept this
107 // APDU message
108 // NI: change suggested by Wayne Dyksen, Purdue
109 if (buffer[ISO.OFFSET_INS] == ISO.INS_SELECT)
110 ISOException.throwIt(ISO.SW_NO_ERROR);
111
112 switch (buffer[ISO.OFFSET_INS]) {
113 case DECRYPT:
114 if (buffer[ISO.OFFSET_CLA] != Ssh_CLA)
115 ISOException.throwIt(ISO.SW_CLA_NOT_SUPPORTED);
116 //decrypt (apdu);
117 size = (short) (buffer[ISO.OFFSET_LC] & 0x00FF);
118
119 if (apdu.setIncomingAndReceive() != size)
120 ISOException.throwIt (ISO.SW_WRONG_LENGTH);
121
122 // check access; depends on bit 2 (x/a)
123 file.selectFile(root_fid);
124 file.selectFile(privkey_fid);
125 st = os.checkAccess(ACL.EXECUTE);
126 if (st != ST.ACCESS_CLEARED) {
127 CyberflexAPDU.prepareSW1SW2(st);
128 ISOException.throwIt(CyberflexAPDU.getSW1SW2());
129 }
130
131 rsakey.cryptoUpdate (buffer, (short) ISO.OFFSET_CDATA, size,
132 buffer, (short) ISO.OFFSET_CDATA);
133
134 apdu.setOutgoingAndSend ((short) ISO.OFFSET_CDATA, size);
135 break;
136 case GET_PUBKEY:
137 file.selectFile(root_fid); // select root
138 file.selectFile(pubkey_fid); // select public key file
139 size = (short)(file.getFileSize() - 16);
140 st = os.readBinaryFile(buffer, (short)0, (short)0, size);
141 if (st == ST.SUCCESS)
142 apdu.setOutgoingAndSend((short)0, size);
143 else {
144 CyberflexAPDU.prepareSW1SW2(st);
145 ISOException.throwIt(CyberflexAPDU.getSW1SW2());
146 }
147 break;
148 case GET_KEYLENGTH:
149 Util.setShort(buffer, (short)0, keysize);
150 apdu.setOutgoingAndSend ((short)0, (short)2);
151 break;
152 case GET_VERSION:
153 Util.setShort(buffer, (short)0, applet_version);
154 apdu.setOutgoingAndSend ((short)0, (short)2);
155 break;
156 case GET_RESPONSE:
157 break;
158 default:
159 ISOException.throwIt (ISO.SW_INS_NOT_SUPPORTED);
160 }
161
162 } // end of process method
163
164} // end of class Ssh
diff --git a/scp.0 b/scp.0
index 2cf4a2a7d..74dcf81da 100644
--- a/scp.0
+++ b/scp.0
@@ -89,6 +89,7 @@ DESCRIPTION
89 NoHostAuthenticationForLocalhost 89 NoHostAuthenticationForLocalhost
90 NumberOfPasswordPrompts 90 NumberOfPasswordPrompts
91 PasswordAuthentication 91 PasswordAuthentication
92 PKCS11Provider
92 Port 93 Port
93 PreferredAuthentications 94 PreferredAuthentications
94 Protocol 95 Protocol
@@ -100,7 +101,6 @@ DESCRIPTION
100 SendEnv 101 SendEnv
101 ServerAliveInterval 102 ServerAliveInterval
102 ServerAliveCountMax 103 ServerAliveCountMax
103 SmartcardDevice
104 StrictHostKeyChecking 104 StrictHostKeyChecking
105 TCPKeepAlive 105 TCPKeepAlive
106 UsePrivilegedPort 106 UsePrivilegedPort
@@ -145,4 +145,4 @@ AUTHORS
145 Timo Rinne <tri@iki.fi> 145 Timo Rinne <tri@iki.fi>
146 Tatu Ylonen <ylo@cs.hut.fi> 146 Tatu Ylonen <ylo@cs.hut.fi>
147 147
148OpenBSD 4.6 July 12, 2008 3 148OpenBSD 4.6 February 8, 2010 3
diff --git a/scp.1 b/scp.1
index 5033d84f2..bc5e259f5 100644
--- a/scp.1
+++ b/scp.1
@@ -9,9 +9,9 @@
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.46 2008/07/12 05:33:41 djm Exp $ 12.\" $OpenBSD: scp.1,v 1.50 2010/02/08 10:50:20 markus Exp $
13.\" 13.\"
14.Dd $Mdocdate: July 12 2008 $ 14.Dd $Mdocdate: February 8 2010 $
15.Dt SCP 1 15.Dt SCP 1
16.Os 16.Os
17.Sh NAME 17.Sh NAME
@@ -153,6 +153,7 @@ For full details of the options listed below, and their possible values, see
153.It NoHostAuthenticationForLocalhost 153.It NoHostAuthenticationForLocalhost
154.It NumberOfPasswordPrompts 154.It NumberOfPasswordPrompts
155.It PasswordAuthentication 155.It PasswordAuthentication
156.It PKCS11Provider
156.It Port 157.It Port
157.It PreferredAuthentications 158.It PreferredAuthentications
158.It Protocol 159.It Protocol
@@ -164,7 +165,6 @@ For full details of the options listed below, and their possible values, see
164.It SendEnv 165.It SendEnv
165.It ServerAliveInterval 166.It ServerAliveInterval
166.It ServerAliveCountMax 167.It ServerAliveCountMax
167.It SmartcardDevice
168.It StrictHostKeyChecking 168.It StrictHostKeyChecking
169.It TCPKeepAlive 169.It TCPKeepAlive
170.It UsePrivilegedPort 170.It UsePrivilegedPort
diff --git a/scp.c b/scp.c
index 3b7ca5a8d..0b483df99 100644
--- a/scp.c
+++ b/scp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: scp.c,v 1.164 2008/10/10 04:55:16 stevesk Exp $ */ 1/* $OpenBSD: scp.c,v 1.165 2009/12/20 07:28:36 guenther Exp $ */
2/* 2/*
3 * scp - secure remote copy. This is basically patched BSD rcp which 3 * scp - secure remote copy. This is basically patched BSD rcp which
4 * uses ssh to do the data transfer (instead of using rcmd). 4 * uses ssh to do the data transfer (instead of using rcmd).
@@ -252,8 +252,11 @@ do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout)
252 close(pout[1]); 252 close(pout[1]);
253 253
254 replacearg(&args, 0, "%s", ssh_program); 254 replacearg(&args, 0, "%s", ssh_program);
255 if (remuser != NULL) 255 if (remuser != NULL) {
256 addargs(&args, "-l%s", remuser); 256 addargs(&args, "-l");
257 addargs(&args, "%s", remuser);
258 }
259 addargs(&args, "--");
257 addargs(&args, "%s", host); 260 addargs(&args, "%s", host);
258 addargs(&args, "%s", cmd); 261 addargs(&args, "%s", cmd);
259 262
@@ -345,10 +348,12 @@ main(int argc, char **argv)
345 case 'c': 348 case 'c':
346 case 'i': 349 case 'i':
347 case 'F': 350 case 'F':
348 addargs(&args, "-%c%s", ch, optarg); 351 addargs(&args, "-%c", ch);
352 addargs(&args, "%s", optarg);
349 break; 353 break;
350 case 'P': 354 case 'P':
351 addargs(&args, "-p%s", optarg); 355 addargs(&args, "-p");
356 addargs(&args, "%s", optarg);
352 break; 357 break;
353 case 'B': 358 case 'B':
354 addargs(&args, "-oBatchmode yes"); 359 addargs(&args, "-oBatchmode yes");
@@ -556,6 +561,7 @@ toremote(char *targ, int argc, char **argv)
556 } else { 561 } else {
557 host = cleanhostname(argv[i]); 562 host = cleanhostname(argv[i]);
558 } 563 }
564 addargs(&alist, "--");
559 addargs(&alist, "%s", host); 565 addargs(&alist, "%s", host);
560 addargs(&alist, "%s", cmd); 566 addargs(&alist, "%s", cmd);
561 addargs(&alist, "%s", src); 567 addargs(&alist, "%s", src);
@@ -566,7 +572,7 @@ toremote(char *targ, int argc, char **argv)
566 errs = 1; 572 errs = 1;
567 } else { /* local to remote */ 573 } else { /* local to remote */
568 if (remin == -1) { 574 if (remin == -1) {
569 xasprintf(&bp, "%s -t %s", cmd, targ); 575 xasprintf(&bp, "%s -t -- %s", cmd, targ);
570 host = cleanhostname(thost); 576 host = cleanhostname(thost);
571 if (do_cmd(host, tuser, bp, &remin, 577 if (do_cmd(host, tuser, bp, &remin,
572 &remout) < 0) 578 &remout) < 0)
@@ -599,6 +605,7 @@ tolocal(int argc, char **argv)
599 addargs(&alist, "-r"); 605 addargs(&alist, "-r");
600 if (pflag) 606 if (pflag)
601 addargs(&alist, "-p"); 607 addargs(&alist, "-p");
608 addargs(&alist, "--");
602 addargs(&alist, "%s", argv[i]); 609 addargs(&alist, "%s", argv[i]);
603 addargs(&alist, "%s", argv[argc-1]); 610 addargs(&alist, "%s", argv[argc-1]);
604 if (do_local_cmd(&alist)) 611 if (do_local_cmd(&alist))
@@ -618,7 +625,7 @@ tolocal(int argc, char **argv)
618 suser = pwd->pw_name; 625 suser = pwd->pw_name;
619 } 626 }
620 host = cleanhostname(host); 627 host = cleanhostname(host);
621 xasprintf(&bp, "%s -f %s", cmd, src); 628 xasprintf(&bp, "%s -f -- %s", cmd, src);
622 if (do_cmd(host, suser, bp, &remin, &remout) < 0) { 629 if (do_cmd(host, suser, bp, &remin, &remout) < 0) {
623 (void) xfree(bp); 630 (void) xfree(bp);
624 ++errs; 631 ++errs;
diff --git a/servconf.c b/servconf.c
index 55b56e59e..62417def7 100644
--- a/servconf.c
+++ b/servconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: servconf.c,v 1.195 2009/04/14 21:10:54 jj Exp $ */ 1/* $OpenBSD: servconf.c,v 1.204 2010/03/04 10:36:03 djm Exp $ */
2/* 2/*
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
@@ -65,6 +65,7 @@ initialize_server_options(ServerOptions *options)
65 options->listen_addrs = NULL; 65 options->listen_addrs = NULL;
66 options->address_family = -1; 66 options->address_family = -1;
67 options->num_host_key_files = 0; 67 options->num_host_key_files = 0;
68 options->num_host_cert_files = 0;
68 options->pid_file = NULL; 69 options->pid_file = NULL;
69 options->server_key_bits = -1; 70 options->server_key_bits = -1;
70 options->login_grace_time = -1; 71 options->login_grace_time = -1;
@@ -132,6 +133,8 @@ initialize_server_options(ServerOptions *options)
132 options->adm_forced_command = NULL; 133 options->adm_forced_command = NULL;
133 options->chroot_directory = NULL; 134 options->chroot_directory = NULL;
134 options->zero_knowledge_password_authentication = -1; 135 options->zero_knowledge_password_authentication = -1;
136 options->revoked_keys_file = NULL;
137 options->trusted_user_ca_keys = NULL;
135 options->debian_banner = -1; 138 options->debian_banner = -1;
136} 139}
137 140
@@ -144,7 +147,7 @@ fill_default_server_options(ServerOptions *options)
144 147
145 /* Standard Options */ 148 /* Standard Options */
146 if (options->protocol == SSH_PROTO_UNKNOWN) 149 if (options->protocol == SSH_PROTO_UNKNOWN)
147 options->protocol = SSH_PROTO_1|SSH_PROTO_2; 150 options->protocol = SSH_PROTO_2;
148 if (options->num_host_key_files == 0) { 151 if (options->num_host_key_files == 0) {
149 /* fill default hostkeys for protocols */ 152 /* fill default hostkeys for protocols */
150 if (options->protocol & SSH_PROTO_1) 153 if (options->protocol & SSH_PROTO_1)
@@ -157,6 +160,7 @@ fill_default_server_options(ServerOptions *options)
157 _PATH_HOST_DSA_KEY_FILE; 160 _PATH_HOST_DSA_KEY_FILE;
158 } 161 }
159 } 162 }
163 /* No certificates by default */
160 if (options->num_ports == 0) 164 if (options->num_ports == 0)
161 options->ports[options->num_ports++] = SSH_DEFAULT_PORT; 165 options->ports[options->num_ports++] = SSH_DEFAULT_PORT;
162 if (options->listen_addrs == NULL) 166 if (options->listen_addrs == NULL)
@@ -322,7 +326,8 @@ typedef enum {
322 sAcceptEnv, sPermitTunnel, 326 sAcceptEnv, sPermitTunnel,
323 sMatch, sPermitOpen, sForceCommand, sChrootDirectory, 327 sMatch, sPermitOpen, sForceCommand, sChrootDirectory,
324 sUsePrivilegeSeparation, sAllowAgentForwarding, 328 sUsePrivilegeSeparation, sAllowAgentForwarding,
325 sZeroKnowledgePasswordAuthentication, 329 sZeroKnowledgePasswordAuthentication, sHostCertificate,
330 sRevokedKeys, sTrustedUserCAKeys,
326 sDebianBanner, 331 sDebianBanner,
327 sDeprecated, sUnsupported 332 sDeprecated, sUnsupported
328} ServerOpCodes; 333} ServerOpCodes;
@@ -453,6 +458,9 @@ static struct {
453 { "permitopen", sPermitOpen, SSHCFG_ALL }, 458 { "permitopen", sPermitOpen, SSHCFG_ALL },
454 { "forcecommand", sForceCommand, SSHCFG_ALL }, 459 { "forcecommand", sForceCommand, SSHCFG_ALL },
455 { "chrootdirectory", sChrootDirectory, SSHCFG_ALL }, 460 { "chrootdirectory", sChrootDirectory, SSHCFG_ALL },
461 { "hostcertificate", sHostCertificate, SSHCFG_GLOBAL },
462 { "revokedkeys", sRevokedKeys, SSHCFG_ALL },
463 { "trustedusercakeys", sTrustedUserCAKeys, SSHCFG_ALL },
456 { "debianbanner", sDebianBanner, SSHCFG_GLOBAL }, 464 { "debianbanner", sDebianBanner, SSHCFG_GLOBAL },
457 { NULL, sBadOption, 0 } 465 { NULL, sBadOption, 0 }
458}; 466};
@@ -489,6 +497,22 @@ parse_token(const char *cp, const char *filename,
489 return sBadOption; 497 return sBadOption;
490} 498}
491 499
500char *
501derelativise_path(const char *path)
502{
503 char *expanded, *ret, *cwd;
504
505 expanded = tilde_expand_filename(path, getuid());
506 if (*expanded == '/')
507 return expanded;
508 if ((cwd = getcwd(NULL, 0)) == NULL)
509 fatal("%s: getcwd: %s", __func__, strerror(errno));
510 xasprintf(&ret, "%s/%s", cwd, expanded);
511 xfree(cwd);
512 xfree(expanded);
513 return ret;
514}
515
492static void 516static void
493add_listen_addr(ServerOptions *options, char *addr, int port) 517add_listen_addr(ServerOptions *options, char *addr, int port)
494{ 518{
@@ -823,13 +847,23 @@ process_server_config_line(ServerOptions *options, char *line,
823 fatal("%s line %d: missing file name.", 847 fatal("%s line %d: missing file name.",
824 filename, linenum); 848 filename, linenum);
825 if (*activep && *charptr == NULL) { 849 if (*activep && *charptr == NULL) {
826 *charptr = tilde_expand_filename(arg, getuid()); 850 *charptr = derelativise_path(arg);
827 /* increase optional counter */ 851 /* increase optional counter */
828 if (intptr != NULL) 852 if (intptr != NULL)
829 *intptr = *intptr + 1; 853 *intptr = *intptr + 1;
830 } 854 }
831 break; 855 break;
832 856
857 case sHostCertificate:
858 intptr = &options->num_host_cert_files;
859 if (*intptr >= MAX_HOSTKEYS)
860 fatal("%s line %d: too many host certificates "
861 "specified (max %d).", filename, linenum,
862 MAX_HOSTCERTS);
863 charptr = &options->host_cert_files[*intptr];
864 goto parse_filename;
865 break;
866
833 case sPidFile: 867 case sPidFile:
834 charptr = &options->pid_file; 868 charptr = &options->pid_file;
835 goto parse_filename; 869 goto parse_filename;
@@ -1340,6 +1374,14 @@ process_server_config_line(ServerOptions *options, char *line,
1340 *charptr = xstrdup(arg); 1374 *charptr = xstrdup(arg);
1341 break; 1375 break;
1342 1376
1377 case sTrustedUserCAKeys:
1378 charptr = &options->trusted_user_ca_keys;
1379 goto parse_filename;
1380
1381 case sRevokedKeys:
1382 charptr = &options->revoked_keys_file;
1383 goto parse_filename;
1384
1343 case sDebianBanner: 1385 case sDebianBanner:
1344 intptr = &options->debian_banner; 1386 intptr = &options->debian_banner;
1345 goto parse_int; 1387 goto parse_int;
@@ -1458,6 +1500,8 @@ copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth)
1458 return; 1500 return;
1459 M_CP_STROPT(adm_forced_command); 1501 M_CP_STROPT(adm_forced_command);
1460 M_CP_STROPT(chroot_directory); 1502 M_CP_STROPT(chroot_directory);
1503 M_CP_STROPT(trusted_user_ca_keys);
1504 M_CP_STROPT(revoked_keys_file);
1461} 1505}
1462 1506
1463#undef M_CP_INTOPT 1507#undef M_CP_INTOPT
@@ -1680,6 +1724,9 @@ dump_config(ServerOptions *o)
1680 dump_cfg_string(sAuthorizedKeysFile, o->authorized_keys_file); 1724 dump_cfg_string(sAuthorizedKeysFile, o->authorized_keys_file);
1681 dump_cfg_string(sAuthorizedKeysFile2, o->authorized_keys_file2); 1725 dump_cfg_string(sAuthorizedKeysFile2, o->authorized_keys_file2);
1682 dump_cfg_string(sForceCommand, o->adm_forced_command); 1726 dump_cfg_string(sForceCommand, o->adm_forced_command);
1727 dump_cfg_string(sChrootDirectory, o->chroot_directory);
1728 dump_cfg_string(sTrustedUserCAKeys, o->trusted_user_ca_keys);
1729 dump_cfg_string(sRevokedKeys, o->revoked_keys_file);
1683 1730
1684 /* string arguments requiring a lookup */ 1731 /* string arguments requiring a lookup */
1685 dump_cfg_string(sLogLevel, log_level_name(o->log_level)); 1732 dump_cfg_string(sLogLevel, log_level_name(o->log_level));
@@ -1688,6 +1735,8 @@ dump_config(ServerOptions *o)
1688 /* string array arguments */ 1735 /* string array arguments */
1689 dump_cfg_strarray(sHostKeyFile, o->num_host_key_files, 1736 dump_cfg_strarray(sHostKeyFile, o->num_host_key_files,
1690 o->host_key_files); 1737 o->host_key_files);
1738 dump_cfg_strarray(sHostKeyFile, o->num_host_cert_files,
1739 o->host_cert_files);
1691 dump_cfg_strarray(sAllowUsers, o->num_allow_users, o->allow_users); 1740 dump_cfg_strarray(sAllowUsers, o->num_allow_users, o->allow_users);
1692 dump_cfg_strarray(sDenyUsers, o->num_deny_users, o->deny_users); 1741 dump_cfg_strarray(sDenyUsers, o->num_deny_users, o->deny_users);
1693 dump_cfg_strarray(sAllowGroups, o->num_allow_groups, o->allow_groups); 1742 dump_cfg_strarray(sAllowGroups, o->num_allow_groups, o->allow_groups);
diff --git a/servconf.h b/servconf.h
index 0cd78bc22..4f20ad595 100644
--- a/servconf.h
+++ b/servconf.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: servconf.h,v 1.87 2009/01/22 10:02:34 djm Exp $ */ 1/* $OpenBSD: servconf.h,v 1.92 2010/03/04 10:36:03 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -24,6 +24,7 @@
24#define MAX_DENY_GROUPS 256 /* Max # groups on deny list. */ 24#define MAX_DENY_GROUPS 256 /* Max # groups on deny list. */
25#define MAX_SUBSYSTEMS 256 /* Max # subsystems. */ 25#define MAX_SUBSYSTEMS 256 /* Max # subsystems. */
26#define MAX_HOSTKEYS 256 /* Max # hostkeys. */ 26#define MAX_HOSTKEYS 256 /* Max # hostkeys. */
27#define MAX_HOSTCERTS 256 /* Max # host certificates. */
27#define MAX_ACCEPT_ENV 256 /* Max # of env vars. */ 28#define MAX_ACCEPT_ENV 256 /* Max # of env vars. */
28#define MAX_MATCH_GROUPS 256 /* Max # of groups for Match. */ 29#define MAX_MATCH_GROUPS 256 /* Max # of groups for Match. */
29 30
@@ -49,6 +50,8 @@ typedef struct {
49 int address_family; /* Address family used by the server. */ 50 int address_family; /* Address family used by the server. */
50 char *host_key_files[MAX_HOSTKEYS]; /* Files containing host keys. */ 51 char *host_key_files[MAX_HOSTKEYS]; /* Files containing host keys. */
51 int num_host_key_files; /* Number of files for host keys. */ 52 int num_host_key_files; /* Number of files for host keys. */
53 char *host_cert_files[MAX_HOSTCERTS]; /* Files containing host certs. */
54 int num_host_cert_files; /* Number of files for host certs. */
52 char *pid_file; /* Where to put our pid */ 55 char *pid_file; /* Where to put our pid */
53 int server_key_bits;/* Size of the server key. */ 56 int server_key_bits;/* Size of the server key. */
54 int login_grace_time; /* Disconnect if no auth in this time 57 int login_grace_time; /* Disconnect if no auth in this time
@@ -157,6 +160,8 @@ typedef struct {
157 int debian_banner; 160 int debian_banner;
158 161
159 char *chroot_directory; 162 char *chroot_directory;
163 char *revoked_keys_file;
164 char *trusted_user_ca_keys;
160} ServerOptions; 165} ServerOptions;
161 166
162void initialize_server_options(ServerOptions *); 167void initialize_server_options(ServerOptions *);
@@ -170,5 +175,6 @@ void parse_server_match_config(ServerOptions *, const char *, const char *,
170 const char *); 175 const char *);
171void copy_set_server_options(ServerOptions *, ServerOptions *, int); 176void copy_set_server_options(ServerOptions *, ServerOptions *, int);
172void dump_config(ServerOptions *); 177void dump_config(ServerOptions *);
178char *derelativise_path(const char *);
173 179
174#endif /* SERVCONF_H */ 180#endif /* SERVCONF_H */
diff --git a/session.c b/session.c
index 44e0ac5fa..e032de692 100644
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: session.c,v 1.246 2009/04/17 19:23:06 stevesk Exp $ */ 1/* $OpenBSD: session.c,v 1.252 2010/03/07 11:57:13 dtucker Exp $ */
2/* 2/*
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
@@ -142,9 +142,10 @@ static int sessions_first_unused = -1;
142static int sessions_nalloc = 0; 142static int sessions_nalloc = 0;
143static Session *sessions = NULL; 143static Session *sessions = NULL;
144 144
145#define SUBSYSTEM_NONE 0 145#define SUBSYSTEM_NONE 0
146#define SUBSYSTEM_EXT 1 146#define SUBSYSTEM_EXT 1
147#define SUBSYSTEM_INT_SFTP 2 147#define SUBSYSTEM_INT_SFTP 2
148#define SUBSYSTEM_INT_SFTP_ERROR 3
148 149
149#ifdef HAVE_LOGIN_CAP 150#ifdef HAVE_LOGIN_CAP
150login_cap_t *lc; 151login_cap_t *lc;
@@ -270,6 +271,8 @@ do_authenticated(Authctxt *authctxt)
270 if (!no_port_forwarding_flag && options.allow_tcp_forwarding) 271 if (!no_port_forwarding_flag && options.allow_tcp_forwarding)
271 channel_permit_all_opens(); 272 channel_permit_all_opens();
272 273
274 auth_debug_send();
275
273 if (compat20) 276 if (compat20)
274 do_authenticated2(authctxt); 277 do_authenticated2(authctxt);
275 else 278 else
@@ -785,17 +788,19 @@ do_exec(Session *s, const char *command)
785 if (options.adm_forced_command) { 788 if (options.adm_forced_command) {
786 original_command = command; 789 original_command = command;
787 command = options.adm_forced_command; 790 command = options.adm_forced_command;
788 if (IS_INTERNAL_SFTP(command)) 791 if (IS_INTERNAL_SFTP(command)) {
789 s->is_subsystem = SUBSYSTEM_INT_SFTP; 792 s->is_subsystem = s->is_subsystem ?
790 else if (s->is_subsystem) 793 SUBSYSTEM_INT_SFTP : SUBSYSTEM_INT_SFTP_ERROR;
794 } else if (s->is_subsystem)
791 s->is_subsystem = SUBSYSTEM_EXT; 795 s->is_subsystem = SUBSYSTEM_EXT;
792 debug("Forced command (config) '%.900s'", command); 796 debug("Forced command (config) '%.900s'", command);
793 } else if (forced_command) { 797 } else if (forced_command) {
794 original_command = command; 798 original_command = command;
795 command = forced_command; 799 command = forced_command;
796 if (IS_INTERNAL_SFTP(command)) 800 if (IS_INTERNAL_SFTP(command)) {
797 s->is_subsystem = SUBSYSTEM_INT_SFTP; 801 s->is_subsystem = s->is_subsystem ?
798 else if (s->is_subsystem) 802 SUBSYSTEM_INT_SFTP : SUBSYSTEM_INT_SFTP_ERROR;
803 } else if (s->is_subsystem)
799 s->is_subsystem = SUBSYSTEM_EXT; 804 s->is_subsystem = SUBSYSTEM_EXT;
800 debug("Forced command (key option) '%.900s'", command); 805 debug("Forced command (key option) '%.900s'", command);
801 } 806 }
@@ -1374,26 +1379,32 @@ static void
1374do_nologin(struct passwd *pw) 1379do_nologin(struct passwd *pw)
1375{ 1380{
1376 FILE *f = NULL; 1381 FILE *f = NULL;
1377 char buf[1024]; 1382 char buf[1024], *nl, *def_nl = _PATH_NOLOGIN;
1383 struct stat sb;
1378 1384
1379#ifdef HAVE_LOGIN_CAP 1385#ifdef HAVE_LOGIN_CAP
1380 if (!login_getcapbool(lc, "ignorenologin", 0) && pw->pw_uid) 1386 if (login_getcapbool(lc, "ignorenologin", 0) && pw->pw_uid)
1381 f = fopen(login_getcapstr(lc, "nologin", _PATH_NOLOGIN, 1387 return;
1382 _PATH_NOLOGIN), "r"); 1388 nl = login_getcapstr(lc, "nologin", def_nl, def_nl);
1383#else 1389#else
1384 if (pw->pw_uid) 1390 if (pw->pw_uid == 0)
1385 f = fopen(_PATH_NOLOGIN, "r"); 1391 return;
1392 nl = def_nl;
1386#endif 1393#endif
1387 if (f) { 1394 if (stat(nl, &sb) == -1) {
1388 /* /etc/nologin exists. Print its contents and exit. */ 1395 if (nl != def_nl)
1389 logit("User %.100s not allowed because %s exists", 1396 xfree(nl);
1390 pw->pw_name, _PATH_NOLOGIN); 1397 return;
1391 while (fgets(buf, sizeof(buf), f))
1392 fputs(buf, stderr);
1393 fclose(f);
1394 fflush(NULL);
1395 exit(254);
1396 } 1398 }
1399
1400 /* /etc/nologin exists. Print its contents if we can and exit. */
1401 logit("User %.100s not allowed because %s exists", pw->pw_name, nl);
1402 if ((f = fopen(nl, "r")) != NULL) {
1403 while (fgets(buf, sizeof(buf), f))
1404 fputs(buf, stderr);
1405 fclose(f);
1406 }
1407 exit(254);
1397} 1408}
1398 1409
1399/* 1410/*
@@ -1521,6 +1532,24 @@ do_setusercontext(struct passwd *pw)
1521 } 1532 }
1522# endif /* USE_LIBIAF */ 1533# endif /* USE_LIBIAF */
1523#endif 1534#endif
1535#ifdef HAVE_SETPCRED
1536 /*
1537 * If we have a chroot directory, we set all creds except real
1538 * uid which we will need for chroot. If we don't have a
1539 * chroot directory, we don't override anything.
1540 */
1541 {
1542 char **creds = NULL, *chroot_creds[] =
1543 { "REAL_USER=root", NULL };
1544
1545 if (options.chroot_directory != NULL &&
1546 strcasecmp(options.chroot_directory, "none") != 0)
1547 creds = chroot_creds;
1548
1549 if (setpcred(pw->pw_name, creds) == -1)
1550 fatal("Failed to set process credentials");
1551 }
1552#endif /* HAVE_SETPCRED */
1524 1553
1525#ifdef WITH_SELINUX 1554#ifdef WITH_SELINUX
1526 ssh_selinux_setup_exec_context(pw->pw_name); 1555 ssh_selinux_setup_exec_context(pw->pw_name);
@@ -1537,10 +1566,6 @@ do_setusercontext(struct passwd *pw)
1537 free(chroot_path); 1566 free(chroot_path);
1538 } 1567 }
1539 1568
1540#ifdef HAVE_SETPCRED
1541 if (setpcred(pw->pw_name, (char **)NULL) == -1)
1542 fatal("Failed to set process credentials");
1543#endif /* HAVE_SETPCRED */
1544#ifdef HAVE_LOGIN_CAP 1569#ifdef HAVE_LOGIN_CAP
1545 if (setusercontext(lc, pw, pw->pw_uid, LOGIN_SETUSER) < 0) { 1570 if (setusercontext(lc, pw, pw->pw_uid, LOGIN_SETUSER) < 0) {
1546 perror("unable to set user context (setuser)"); 1571 perror("unable to set user context (setuser)");
@@ -1783,7 +1808,11 @@ do_child(Session *s, const char *command)
1783 /* restore SIGPIPE for child */ 1808 /* restore SIGPIPE for child */
1784 signal(SIGPIPE, SIG_DFL); 1809 signal(SIGPIPE, SIG_DFL);
1785 1810
1786 if (s->is_subsystem == SUBSYSTEM_INT_SFTP) { 1811 if (s->is_subsystem == SUBSYSTEM_INT_SFTP_ERROR) {
1812 printf("This service allows sftp connections only.\n");
1813 fflush(NULL);
1814 exit(1);
1815 } else if (s->is_subsystem == SUBSYSTEM_INT_SFTP) {
1787 extern int optind, optreset; 1816 extern int optind, optreset;
1788 int i; 1817 int i;
1789 char *p, *args; 1818 char *p, *args;
@@ -1796,9 +1825,14 @@ do_child(Session *s, const char *command)
1796 argv[i] = NULL; 1825 argv[i] = NULL;
1797 optind = optreset = 1; 1826 optind = optreset = 1;
1798 __progname = argv[0]; 1827 __progname = argv[0];
1828#ifdef WITH_SELINUX
1829 ssh_selinux_change_context("sftpd_t");
1830#endif
1799 exit(sftp_server_main(i, argv, s->pw)); 1831 exit(sftp_server_main(i, argv, s->pw));
1800 } 1832 }
1801 1833
1834 fflush(NULL);
1835
1802 if (options.use_login) { 1836 if (options.use_login) {
1803 launch_login(pw, hostname); 1837 launch_login(pw, hostname);
1804 /* NEVERREACHED */ 1838 /* NEVERREACHED */
@@ -2109,16 +2143,16 @@ session_subsystem_req(Session *s)
2109 if (strcmp(subsys, options.subsystem_name[i]) == 0) { 2143 if (strcmp(subsys, options.subsystem_name[i]) == 0) {
2110 prog = options.subsystem_command[i]; 2144 prog = options.subsystem_command[i];
2111 cmd = options.subsystem_args[i]; 2145 cmd = options.subsystem_args[i];
2112 if (!strcmp(INTERNAL_SFTP_NAME, prog)) { 2146 if (strcmp(INTERNAL_SFTP_NAME, prog) == 0) {
2113 s->is_subsystem = SUBSYSTEM_INT_SFTP; 2147 s->is_subsystem = SUBSYSTEM_INT_SFTP;
2114 } else if (stat(prog, &st) < 0) { 2148 debug("subsystem: %s", prog);
2115 error("subsystem: cannot stat %s: %s", prog,
2116 strerror(errno));
2117 break;
2118 } else { 2149 } else {
2150 if (stat(prog, &st) < 0)
2151 debug("subsystem: cannot stat %s: %s",
2152 prog, strerror(errno));
2119 s->is_subsystem = SUBSYSTEM_EXT; 2153 s->is_subsystem = SUBSYSTEM_EXT;
2154 debug("subsystem: exec() %s", cmd);
2120 } 2155 }
2121 debug("subsystem: exec() %s", cmd);
2122 success = do_exec(s, cmd) == 0; 2156 success = do_exec(s, cmd) == 0;
2123 break; 2157 break;
2124 } 2158 }
diff --git a/sftp-client.c b/sftp-client.c
index 0990b7912..6124c0f40 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp-client.c,v 1.87 2009/06/22 05:39:28 dtucker Exp $ */ 1/* $OpenBSD: sftp-client.c,v 1.90 2009/10/11 10:41:26 dtucker Exp $ */
2/* 2/*
3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -36,6 +36,7 @@
36#endif 36#endif
37#include <sys/uio.h> 37#include <sys/uio.h>
38 38
39#include <dirent.h>
39#include <errno.h> 40#include <errno.h>
40#include <fcntl.h> 41#include <fcntl.h>
41#include <signal.h> 42#include <signal.h>
@@ -61,6 +62,9 @@ extern int showprogress;
61/* Minimum amount of data to read at a time */ 62/* Minimum amount of data to read at a time */
62#define MIN_READ_SIZE 512 63#define MIN_READ_SIZE 512
63 64
65/* Maximum depth to descend in directory trees */
66#define MAX_DIR_DEPTH 64
67
64struct sftp_conn { 68struct sftp_conn {
65 int fd_in; 69 int fd_in;
66 int fd_out; 70 int fd_out;
@@ -74,6 +78,10 @@ struct sftp_conn {
74 u_int exts; 78 u_int exts;
75}; 79};
76 80
81static char *
82get_handle(int fd, u_int expected_id, u_int *len, const char *errfmt, ...)
83 __attribute__((format(printf, 4, 5)));
84
77static void 85static void
78send_msg(int fd, Buffer *m) 86send_msg(int fd, Buffer *m)
79{ 87{
@@ -179,11 +187,18 @@ get_status(int fd, u_int expected_id)
179} 187}
180 188
181static char * 189static char *
182get_handle(int fd, u_int expected_id, u_int *len) 190get_handle(int fd, u_int expected_id, u_int *len, const char *errfmt, ...)
183{ 191{
184 Buffer msg; 192 Buffer msg;
185 u_int type, id; 193 u_int type, id;
186 char *handle; 194 char *handle, errmsg[256];
195 va_list args;
196 int status;
197
198 va_start(args, errfmt);
199 if (errfmt != NULL)
200 vsnprintf(errmsg, sizeof(errmsg), errfmt, args);
201 va_end(args);
187 202
188 buffer_init(&msg); 203 buffer_init(&msg);
189 get_msg(fd, &msg); 204 get_msg(fd, &msg);
@@ -191,16 +206,17 @@ get_handle(int fd, u_int expected_id, u_int *len)
191 id = buffer_get_int(&msg); 206 id = buffer_get_int(&msg);
192 207
193 if (id != expected_id) 208 if (id != expected_id)
194 fatal("ID mismatch (%u != %u)", id, expected_id); 209 fatal("%s: ID mismatch (%u != %u)",
210 errfmt == NULL ? __func__ : errmsg, id, expected_id);
195 if (type == SSH2_FXP_STATUS) { 211 if (type == SSH2_FXP_STATUS) {
196 int status = buffer_get_int(&msg); 212 status = buffer_get_int(&msg);
197 213 if (errfmt != NULL)
198 error("Couldn't get handle: %s", fx2txt(status)); 214 error("%s: %s", errmsg, fx2txt(status));
199 buffer_free(&msg); 215 buffer_free(&msg);
200 return(NULL); 216 return(NULL);
201 } else if (type != SSH2_FXP_HANDLE) 217 } else if (type != SSH2_FXP_HANDLE)
202 fatal("Expected SSH2_FXP_HANDLE(%u) packet, got %u", 218 fatal("%s: Expected SSH2_FXP_HANDLE(%u) packet, got %u",
203 SSH2_FXP_HANDLE, type); 219 errfmt == NULL ? __func__ : errmsg, SSH2_FXP_HANDLE, type);
204 220
205 handle = buffer_get_string(&msg, len); 221 handle = buffer_get_string(&msg, len);
206 buffer_free(&msg); 222 buffer_free(&msg);
@@ -418,7 +434,8 @@ do_lsreaddir(struct sftp_conn *conn, char *path, int printflag,
418 434
419 buffer_clear(&msg); 435 buffer_clear(&msg);
420 436
421 handle = get_handle(conn->fd_in, id, &handle_len); 437 handle = get_handle(conn->fd_in, id, &handle_len,
438 "remote readdir(\"%s\")", path);
422 if (handle == NULL) 439 if (handle == NULL)
423 return(-1); 440 return(-1);
424 441
@@ -484,6 +501,17 @@ do_lsreaddir(struct sftp_conn *conn, char *path, int printflag,
484 if (printflag) 501 if (printflag)
485 printf("%s\n", longname); 502 printf("%s\n", longname);
486 503
504 /*
505 * Directory entries should never contain '/'
506 * These can be used to attack recursive ops
507 * (e.g. send '../../../../etc/passwd')
508 */
509 if (strchr(filename, '/') != NULL) {
510 error("Server sent suspect path \"%s\" "
511 "during readdir of \"%s\"", filename, path);
512 goto next;
513 }
514
487 if (dir) { 515 if (dir) {
488 *dir = xrealloc(*dir, ents + 2, sizeof(**dir)); 516 *dir = xrealloc(*dir, ents + 2, sizeof(**dir));
489 (*dir)[ents] = xmalloc(sizeof(***dir)); 517 (*dir)[ents] = xmalloc(sizeof(***dir));
@@ -492,7 +520,7 @@ do_lsreaddir(struct sftp_conn *conn, char *path, int printflag,
492 memcpy(&(*dir)[ents]->a, a, sizeof(*a)); 520 memcpy(&(*dir)[ents]->a, a, sizeof(*a));
493 (*dir)[++ents] = NULL; 521 (*dir)[++ents] = NULL;
494 } 522 }
495 523 next:
496 xfree(filename); 524 xfree(filename);
497 xfree(longname); 525 xfree(longname);
498 } 526 }
@@ -547,7 +575,7 @@ do_rm(struct sftp_conn *conn, char *path)
547} 575}
548 576
549int 577int
550do_mkdir(struct sftp_conn *conn, char *path, Attrib *a) 578do_mkdir(struct sftp_conn *conn, char *path, Attrib *a, int printflag)
551{ 579{
552 u_int status, id; 580 u_int status, id;
553 581
@@ -556,7 +584,7 @@ do_mkdir(struct sftp_conn *conn, char *path, Attrib *a)
556 strlen(path), a); 584 strlen(path), a);
557 585
558 status = get_status(conn->fd_in, id); 586 status = get_status(conn->fd_in, id);
559 if (status != SSH2_FX_OK) 587 if (status != SSH2_FX_OK && printflag)
560 error("Couldn't create directory: %s", fx2txt(status)); 588 error("Couldn't create directory: %s", fx2txt(status));
561 589
562 return(status); 590 return(status);
@@ -895,9 +923,9 @@ send_read_request(int fd_out, u_int id, u_int64_t offset, u_int len,
895 923
896int 924int
897do_download(struct sftp_conn *conn, char *remote_path, char *local_path, 925do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
898 int pflag) 926 Attrib *a, int pflag)
899{ 927{
900 Attrib junk, *a; 928 Attrib junk;
901 Buffer msg; 929 Buffer msg;
902 char *handle; 930 char *handle;
903 int local_fd, status = 0, write_error; 931 int local_fd, status = 0, write_error;
@@ -916,9 +944,8 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
916 944
917 TAILQ_INIT(&requests); 945 TAILQ_INIT(&requests);
918 946
919 a = do_stat(conn, remote_path, 0); 947 if (a == NULL && (a = do_stat(conn, remote_path, 0)) == NULL)
920 if (a == NULL) 948 return -1;
921 return(-1);
922 949
923 /* Do not preserve set[ug]id here, as we do not preserve ownership */ 950 /* Do not preserve set[ug]id here, as we do not preserve ownership */
924 if (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) 951 if (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS)
@@ -951,7 +978,8 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
951 send_msg(conn->fd_out, &msg); 978 send_msg(conn->fd_out, &msg);
952 debug3("Sent message SSH2_FXP_OPEN I:%u P:%s", id, remote_path); 979 debug3("Sent message SSH2_FXP_OPEN I:%u P:%s", id, remote_path);
953 980
954 handle = get_handle(conn->fd_in, id, &handle_len); 981 handle = get_handle(conn->fd_in, id, &handle_len,
982 "remote open(\"%s\")", remote_path);
955 if (handle == NULL) { 983 if (handle == NULL) {
956 buffer_free(&msg); 984 buffer_free(&msg);
957 return(-1); 985 return(-1);
@@ -1132,6 +1160,114 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
1132 return(status); 1160 return(status);
1133} 1161}
1134 1162
1163static int
1164download_dir_internal(struct sftp_conn *conn, char *src, char *dst,
1165 Attrib *dirattrib, int pflag, int printflag, int depth)
1166{
1167 int i, ret = 0;
1168 SFTP_DIRENT **dir_entries;
1169 char *filename, *new_src, *new_dst;
1170 mode_t mode = 0777;
1171
1172 if (depth >= MAX_DIR_DEPTH) {
1173 error("Maximum directory depth exceeded: %d levels", depth);
1174 return -1;
1175 }
1176
1177 if (dirattrib == NULL &&
1178 (dirattrib = do_stat(conn, src, 1)) == NULL) {
1179 error("Unable to stat remote directory \"%s\"", src);
1180 return -1;
1181 }
1182 if (!S_ISDIR(dirattrib->perm)) {
1183 error("\"%s\" is not a directory", src);
1184 return -1;
1185 }
1186 if (printflag)
1187 printf("Retrieving %s\n", src);
1188
1189 if (dirattrib->flags & SSH2_FILEXFER_ATTR_PERMISSIONS)
1190 mode = dirattrib->perm & 01777;
1191 else {
1192 debug("Server did not send permissions for "
1193 "directory \"%s\"", dst);
1194 }
1195
1196 if (mkdir(dst, mode) == -1 && errno != EEXIST) {
1197 error("mkdir %s: %s", dst, strerror(errno));
1198 return -1;
1199 }
1200
1201 if (do_readdir(conn, src, &dir_entries) == -1) {
1202 error("%s: Failed to get directory contents", src);
1203 return -1;
1204 }
1205
1206 for (i = 0; dir_entries[i] != NULL && !interrupted; i++) {
1207 filename = dir_entries[i]->filename;
1208
1209 new_dst = path_append(dst, filename);
1210 new_src = path_append(src, filename);
1211
1212 if (S_ISDIR(dir_entries[i]->a.perm)) {
1213 if (strcmp(filename, ".") == 0 ||
1214 strcmp(filename, "..") == 0)
1215 continue;
1216 if (download_dir_internal(conn, new_src, new_dst,
1217 &(dir_entries[i]->a), pflag, printflag,
1218 depth + 1) == -1)
1219 ret = -1;
1220 } else if (S_ISREG(dir_entries[i]->a.perm) ) {
1221 if (do_download(conn, new_src, new_dst,
1222 &(dir_entries[i]->a), pflag) == -1) {
1223 error("Download of file %s to %s failed",
1224 new_src, new_dst);
1225 ret = -1;
1226 }
1227 } else
1228 logit("%s: not a regular file\n", new_src);
1229
1230 xfree(new_dst);
1231 xfree(new_src);
1232 }
1233
1234 if (pflag) {
1235 if (dirattrib->flags & SSH2_FILEXFER_ATTR_ACMODTIME) {
1236 struct timeval tv[2];
1237 tv[0].tv_sec = dirattrib->atime;
1238 tv[1].tv_sec = dirattrib->mtime;
1239 tv[0].tv_usec = tv[1].tv_usec = 0;
1240 if (utimes(dst, tv) == -1)
1241 error("Can't set times on \"%s\": %s",
1242 dst, strerror(errno));
1243 } else
1244 debug("Server did not send times for directory "
1245 "\"%s\"", dst);
1246 }
1247
1248 free_sftp_dirents(dir_entries);
1249
1250 return ret;
1251}
1252
1253int
1254download_dir(struct sftp_conn *conn, char *src, char *dst,
1255 Attrib *dirattrib, int pflag, int printflag)
1256{
1257 char *src_canon;
1258 int ret;
1259
1260 if ((src_canon = do_realpath(conn, src)) == NULL) {
1261 error("Unable to canonicalise path \"%s\"", src);
1262 return -1;
1263 }
1264
1265 ret = download_dir_internal(conn, src_canon, dst,
1266 dirattrib, pflag, printflag, 0);
1267 xfree(src_canon);
1268 return ret;
1269}
1270
1135int 1271int
1136do_upload(struct sftp_conn *conn, char *local_path, char *remote_path, 1272do_upload(struct sftp_conn *conn, char *local_path, char *remote_path,
1137 int pflag) 1273 int pflag)
@@ -1195,7 +1331,8 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path,
1195 1331
1196 buffer_clear(&msg); 1332 buffer_clear(&msg);
1197 1333
1198 handle = get_handle(conn->fd_in, id, &handle_len); 1334 handle = get_handle(conn->fd_in, id, &handle_len,
1335 "remote open(\"%s\")", remote_path);
1199 if (handle == NULL) { 1336 if (handle == NULL) {
1200 close(local_fd); 1337 close(local_fd);
1201 buffer_free(&msg); 1338 buffer_free(&msg);
@@ -1313,3 +1450,127 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path,
1313 1450
1314 return status; 1451 return status;
1315} 1452}
1453
1454static int
1455upload_dir_internal(struct sftp_conn *conn, char *src, char *dst,
1456 int pflag, int printflag, int depth)
1457{
1458 int ret = 0, status;
1459 DIR *dirp;
1460 struct dirent *dp;
1461 char *filename, *new_src, *new_dst;
1462 struct stat sb;
1463 Attrib a;
1464
1465 if (depth >= MAX_DIR_DEPTH) {
1466 error("Maximum directory depth exceeded: %d levels", depth);
1467 return -1;
1468 }
1469
1470 if (stat(src, &sb) == -1) {
1471 error("Couldn't stat directory \"%s\": %s",
1472 src, strerror(errno));
1473 return -1;
1474 }
1475 if (!S_ISDIR(sb.st_mode)) {
1476 error("\"%s\" is not a directory", src);
1477 return -1;
1478 }
1479 if (printflag)
1480 printf("Entering %s\n", src);
1481
1482 attrib_clear(&a);
1483 stat_to_attrib(&sb, &a);
1484 a.flags &= ~SSH2_FILEXFER_ATTR_SIZE;
1485 a.flags &= ~SSH2_FILEXFER_ATTR_UIDGID;
1486 a.perm &= 01777;
1487 if (!pflag)
1488 a.flags &= ~SSH2_FILEXFER_ATTR_ACMODTIME;
1489
1490 status = do_mkdir(conn, dst, &a, 0);
1491 /*
1492 * we lack a portable status for errno EEXIST,
1493 * so if we get a SSH2_FX_FAILURE back we must check
1494 * if it was created successfully.
1495 */
1496 if (status != SSH2_FX_OK) {
1497 if (status != SSH2_FX_FAILURE)
1498 return -1;
1499 if (do_stat(conn, dst, 0) == NULL)
1500 return -1;
1501 }
1502
1503 if ((dirp = opendir(src)) == NULL) {
1504 error("Failed to open dir \"%s\": %s", src, strerror(errno));
1505 return -1;
1506 }
1507
1508 while (((dp = readdir(dirp)) != NULL) && !interrupted) {
1509 if (dp->d_ino == 0)
1510 continue;
1511 filename = dp->d_name;
1512 new_dst = path_append(dst, filename);
1513 new_src = path_append(src, filename);
1514
1515 if (lstat(new_src, &sb) == -1) {
1516 logit("%s: lstat failed: %s", filename,
1517 strerror(errno));
1518 ret = -1;
1519 } else if (S_ISDIR(sb.st_mode)) {
1520 if (strcmp(filename, ".") == 0 ||
1521 strcmp(filename, "..") == 0)
1522 continue;
1523
1524 if (upload_dir_internal(conn, new_src, new_dst,
1525 pflag, depth + 1, printflag) == -1)
1526 ret = -1;
1527 } else if (S_ISREG(sb.st_mode)) {
1528 if (do_upload(conn, new_src, new_dst, pflag) == -1) {
1529 error("Uploading of file %s to %s failed!",
1530 new_src, new_dst);
1531 ret = -1;
1532 }
1533 } else
1534 logit("%s: not a regular file\n", filename);
1535 xfree(new_dst);
1536 xfree(new_src);
1537 }
1538
1539 do_setstat(conn, dst, &a);
1540
1541 (void) closedir(dirp);
1542 return ret;
1543}
1544
1545int
1546upload_dir(struct sftp_conn *conn, char *src, char *dst, int printflag,
1547 int pflag)
1548{
1549 char *dst_canon;
1550 int ret;
1551
1552 if ((dst_canon = do_realpath(conn, dst)) == NULL) {
1553 error("Unable to canonicalise path \"%s\"", dst);
1554 return -1;
1555 }
1556
1557 ret = upload_dir_internal(conn, src, dst_canon, pflag, printflag, 0);
1558 xfree(dst_canon);
1559 return ret;
1560}
1561
1562char *
1563path_append(char *p1, char *p2)
1564{
1565 char *ret;
1566 size_t len = strlen(p1) + strlen(p2) + 2;
1567
1568 ret = xmalloc(len);
1569 strlcpy(ret, p1, len);
1570 if (p1[0] != '\0' && p1[strlen(p1) - 1] != '/')
1571 strlcat(ret, "/", len);
1572 strlcat(ret, p2, len);
1573
1574 return(ret);
1575}
1576
diff --git a/sftp-client.h b/sftp-client.h
index edb46790f..1d08c4049 100644
--- a/sftp-client.h
+++ b/sftp-client.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp-client.h,v 1.17 2008/06/08 20:15:29 dtucker Exp $ */ 1/* $OpenBSD: sftp-client.h,v 1.18 2009/08/18 18:36:20 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> 4 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
@@ -68,7 +68,7 @@ void free_sftp_dirents(SFTP_DIRENT **);
68int do_rm(struct sftp_conn *, char *); 68int do_rm(struct sftp_conn *, char *);
69 69
70/* Create directory 'path' */ 70/* Create directory 'path' */
71int do_mkdir(struct sftp_conn *, char *, Attrib *); 71int do_mkdir(struct sftp_conn *, char *, Attrib *, int);
72 72
73/* Remove directory 'path' */ 73/* Remove directory 'path' */
74int do_rmdir(struct sftp_conn *, char *); 74int do_rmdir(struct sftp_conn *, char *);
@@ -103,7 +103,13 @@ int do_symlink(struct sftp_conn *, char *, char *);
103 * Download 'remote_path' to 'local_path'. Preserve permissions and times 103 * Download 'remote_path' to 'local_path'. Preserve permissions and times
104 * if 'pflag' is set 104 * if 'pflag' is set
105 */ 105 */
106int do_download(struct sftp_conn *, char *, char *, int); 106int do_download(struct sftp_conn *, char *, char *, Attrib *, int);
107
108/*
109 * Recursively download 'remote_directory' to 'local_directory'. Preserve
110 * times if 'pflag' is set
111 */
112int download_dir(struct sftp_conn *, char *, char *, Attrib *, int, int);
107 113
108/* 114/*
109 * Upload 'local_path' to 'remote_path'. Preserve permissions and times 115 * Upload 'local_path' to 'remote_path'. Preserve permissions and times
@@ -111,4 +117,13 @@ int do_download(struct sftp_conn *, char *, char *, int);
111 */ 117 */
112int do_upload(struct sftp_conn *, char *, char *, int); 118int do_upload(struct sftp_conn *, char *, char *, int);
113 119
120/*
121 * Recursively upload 'local_directory' to 'remote_directory'. Preserve
122 * times if 'pflag' is set
123 */
124int upload_dir(struct sftp_conn *, char *, char *, int, int);
125
126/* Concatenate paths, taking care of slashes. Caller must free result. */
127char *path_append(char *, char *);
128
114#endif 129#endif
diff --git a/sftp-common.c b/sftp-common.c
index 7ebadcc53..a042875c6 100644
--- a/sftp-common.c
+++ b/sftp-common.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp-common.c,v 1.20 2006/08/03 03:34:42 deraadt Exp $ */ 1/* $OpenBSD: sftp-common.c,v 1.23 2010/01/15 09:24:23 markus Exp $ */
2/* 2/*
3 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
4 * Copyright (c) 2001 Damien Miller. All rights reserved. 4 * Copyright (c) 2001 Damien Miller. All rights reserved.
@@ -36,6 +36,9 @@
36#include <string.h> 36#include <string.h>
37#include <time.h> 37#include <time.h>
38#include <stdarg.h> 38#include <stdarg.h>
39#ifdef HAVE_UTIL_H
40#include <util.h>
41#endif
39 42
40#include "xmalloc.h" 43#include "xmalloc.h"
41#include "buffer.h" 44#include "buffer.h"
@@ -184,24 +187,23 @@ fx2txt(int status)
184 * drwxr-xr-x 5 markus markus 1024 Jan 13 18:39 .ssh 187 * drwxr-xr-x 5 markus markus 1024 Jan 13 18:39 .ssh
185 */ 188 */
186char * 189char *
187ls_file(const char *name, const struct stat *st, int remote) 190ls_file(const char *name, const struct stat *st, int remote, int si_units)
188{ 191{
189 int ulen, glen, sz = 0; 192 int ulen, glen, sz = 0;
190 struct passwd *pw;
191 struct group *gr;
192 struct tm *ltime = localtime(&st->st_mtime); 193 struct tm *ltime = localtime(&st->st_mtime);
193 char *user, *group; 194 char *user, *group;
194 char buf[1024], mode[11+1], tbuf[12+1], ubuf[11+1], gbuf[11+1]; 195 char buf[1024], mode[11+1], tbuf[12+1], ubuf[11+1], gbuf[11+1];
196 char sbuf[FMT_SCALED_STRSIZE];
195 197
196 strmode(st->st_mode, mode); 198 strmode(st->st_mode, mode);
197 if (!remote && (pw = getpwuid(st->st_uid)) != NULL) { 199 if (!remote) {
198 user = pw->pw_name; 200 user = user_from_uid(st->st_uid, 0);
199 } else { 201 } else {
200 snprintf(ubuf, sizeof ubuf, "%u", (u_int)st->st_uid); 202 snprintf(ubuf, sizeof ubuf, "%u", (u_int)st->st_uid);
201 user = ubuf; 203 user = ubuf;
202 } 204 }
203 if (!remote && (gr = getgrgid(st->st_gid)) != NULL) { 205 if (!remote) {
204 group = gr->gr_name; 206 group = group_from_gid(st->st_gid, 0);
205 } else { 207 } else {
206 snprintf(gbuf, sizeof gbuf, "%u", (u_int)st->st_gid); 208 snprintf(gbuf, sizeof gbuf, "%u", (u_int)st->st_gid);
207 group = gbuf; 209 group = gbuf;
@@ -216,8 +218,15 @@ ls_file(const char *name, const struct stat *st, int remote)
216 tbuf[0] = '\0'; 218 tbuf[0] = '\0';
217 ulen = MAX(strlen(user), 8); 219 ulen = MAX(strlen(user), 8);
218 glen = MAX(strlen(group), 8); 220 glen = MAX(strlen(group), 8);
219 snprintf(buf, sizeof buf, "%s %3u %-*s %-*s %8llu %s %s", mode, 221 if (si_units) {
220 (u_int)st->st_nlink, ulen, user, glen, group, 222 fmt_scaled((long long)st->st_size, sbuf);
221 (unsigned long long)st->st_size, tbuf, name); 223 snprintf(buf, sizeof buf, "%s %3u %-*s %-*s %8s %s %s", mode,
224 (u_int)st->st_nlink, ulen, user, glen, group,
225 sbuf, tbuf, name);
226 } else {
227 snprintf(buf, sizeof buf, "%s %3u %-*s %-*s %8llu %s %s", mode,
228 (u_int)st->st_nlink, ulen, user, glen, group,
229 (unsigned long long)st->st_size, tbuf, name);
230 }
222 return xstrdup(buf); 231 return xstrdup(buf);
223} 232}
diff --git a/sftp-common.h b/sftp-common.h
index 9b5848462..9ed86c070 100644
--- a/sftp-common.h
+++ b/sftp-common.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp-common.h,v 1.10 2006/08/03 03:34:42 deraadt Exp $ */ 1/* $OpenBSD: sftp-common.h,v 1.11 2010/01/13 01:40:16 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -46,6 +46,6 @@ void stat_to_attrib(const struct stat *, Attrib *);
46void attrib_to_stat(const Attrib *, struct stat *); 46void attrib_to_stat(const Attrib *, struct stat *);
47Attrib *decode_attrib(Buffer *); 47Attrib *decode_attrib(Buffer *);
48void encode_attrib(Buffer *, const Attrib *); 48void encode_attrib(Buffer *, const Attrib *);
49char *ls_file(const char *, const struct stat *, int); 49char *ls_file(const char *, const struct stat *, int, int);
50 50
51const char *fx2txt(int); 51const char *fx2txt(int);
diff --git a/sftp-server.0 b/sftp-server.0
index d47fc0ceb..6628dcfca 100644
--- a/sftp-server.0
+++ b/sftp-server.0
@@ -4,7 +4,7 @@ NAME
4 sftp-server - SFTP server subsystem 4 sftp-server - SFTP server subsystem
5 5
6SYNOPSIS 6SYNOPSIS
7 sftp-server [-f log_facility] [-l log_level] 7 sftp-server [-ehR] [-f log_facility] [-l log_level] [-u umask]
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
@@ -17,12 +17,17 @@ DESCRIPTION
17 17
18 Valid options are: 18 Valid options are:
19 19
20 -e Causes sftp-server to print logging information to stderr instead
21 of syslog for debugging.
22
20 -f log_facility 23 -f log_facility
21 Specifies the facility code that is used when logging messages 24 Specifies the facility code that is used when logging messages
22 from sftp-server. The possible values are: DAEMON, USER, AUTH, 25 from sftp-server. The possible values are: DAEMON, USER, AUTH,
23 LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. 26 LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
24 The default is AUTH. 27 The default is AUTH.
25 28
29 -h Displays sftp-server usage information.
30
26 -l log_level 31 -l log_level
27 Specifies which messages will be logged by sftp-server. The pos- 32 Specifies which messages will be logged by sftp-server. The pos-
28 sible values are: QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DE- 33 sible values are: QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DE-
@@ -31,6 +36,14 @@ DESCRIPTION
31 are equivalent. DEBUG2 and DEBUG3 each specify higher levels of 36 are equivalent. DEBUG2 and DEBUG3 each specify higher levels of
32 debugging output. The default is ERROR. 37 debugging output. The default is ERROR.
33 38
39 -R Places this instance of sftp-server into a read-only mode. At-
40 tempts to open files for writing, as well as other operations
41 that change the state of the filesystem, will be denied.
42
43 -u umask
44 Sets an explicit umask(2) to be applied to newly-created files
45 and directories, instead of the user's default mask.
46
34 For logging to work, sftp-server must be able to access /dev/log. Use of 47 For logging to work, sftp-server must be able to access /dev/log. Use of
35 sftp-server in a chroot configuration therefore requires that syslogd(8) 48 sftp-server in a chroot configuration therefore requires that syslogd(8)
36 establish a logging socket inside the chroot directory. 49 establish a logging socket inside the chroot directory.
@@ -47,4 +60,4 @@ HISTORY
47AUTHORS 60AUTHORS
48 Markus Friedl <markus@openbsd.org> 61 Markus Friedl <markus@openbsd.org>
49 62
50OpenBSD 4.6 March 26, 2009 1 63OpenBSD 4.6 January 9, 2010 1
diff --git a/sftp-server.8 b/sftp-server.8
index 3667398cb..69ad8beb1 100644
--- a/sftp-server.8
+++ b/sftp-server.8
@@ -1,4 +1,4 @@
1.\" $OpenBSD: sftp-server.8,v 1.15 2009/03/26 08:38:39 sobrado Exp $ 1.\" $OpenBSD: sftp-server.8,v 1.19 2010/01/09 03:36:00 jmc Exp $
2.\" 2.\"
3.\" Copyright (c) 2000 Markus Friedl. All rights reserved. 3.\" Copyright (c) 2000 Markus Friedl. All rights reserved.
4.\" 4.\"
@@ -22,7 +22,7 @@
22.\" (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
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.Dd $Mdocdate: March 26 2009 $ 25.Dd $Mdocdate: January 9 2010 $
26.Dt SFTP-SERVER 8 26.Dt SFTP-SERVER 8
27.Os 27.Os
28.Sh NAME 28.Sh NAME
@@ -30,8 +30,10 @@
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 ehR
33.Op Fl f Ar log_facility 34.Op Fl f Ar log_facility
34.Op Fl l Ar log_level 35.Op Fl l Ar log_level
36.Op Fl u Ar umask
35.Sh DESCRIPTION 37.Sh DESCRIPTION
36.Nm 38.Nm
37is a program that speaks the server side of SFTP protocol 39is a program that speaks the server side of SFTP protocol
@@ -54,12 +56,20 @@ for more information.
54.Pp 56.Pp
55Valid options are: 57Valid options are:
56.Bl -tag -width Ds 58.Bl -tag -width Ds
59.It Fl e
60Causes
61.Nm
62to print logging information to stderr instead of syslog for debugging.
57.It Fl f Ar log_facility 63.It Fl f Ar log_facility
58Specifies the facility code that is used when logging messages from 64Specifies the facility code that is used when logging messages from
59.Nm . 65.Nm .
60The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, 66The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
61LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. 67LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
62The default is AUTH. 68The default is AUTH.
69.It Fl h
70Displays
71.Nm
72usage information.
63.It Fl l Ar log_level 73.It Fl l Ar log_level
64Specifies which messages will be logged by 74Specifies which messages will be logged by
65.Nm . 75.Nm .
@@ -71,6 +81,17 @@ performs on behalf of the client.
71DEBUG and DEBUG1 are equivalent. 81DEBUG and DEBUG1 are equivalent.
72DEBUG2 and DEBUG3 each specify higher levels of debugging output. 82DEBUG2 and DEBUG3 each specify higher levels of debugging output.
73The default is ERROR. 83The default is ERROR.
84.It Fl R
85Places this instance of
86.Nm
87into a read-only mode.
88Attempts to open files for writing, as well as other operations that change
89the state of the filesystem, will be denied.
90.It Fl u Ar umask
91Sets an explicit
92.Xr umask 2
93to be applied to newly-created files and directories, instead of the
94user's default mask.
74.El 95.El
75.Pp 96.Pp
76For logging to work, 97For logging to work,
diff --git a/sftp-server.c b/sftp-server.c
index d984e6049..a98ac2b6d 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp-server.c,v 1.85 2009/04/14 16:33:42 stevesk Exp $ */ 1/* $OpenBSD: sftp-server.c,v 1.91 2010/01/13 01:40:16 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000-2004 Markus Friedl. All rights reserved.
4 * 4 *
@@ -70,6 +70,9 @@ Buffer oqueue;
70/* Version of client */ 70/* Version of client */
71int version; 71int version;
72 72
73/* Disable writes */
74int readonly;
75
73/* portable attributes, etc. */ 76/* portable attributes, etc. */
74 77
75typedef struct Stat Stat; 78typedef struct Stat Stat;
@@ -553,16 +556,21 @@ process_open(void)
553 mode = (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) ? a->perm : 0666; 556 mode = (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) ? a->perm : 0666;
554 logit("open \"%s\" flags %s mode 0%o", 557 logit("open \"%s\" flags %s mode 0%o",
555 name, string_from_portable(pflags), mode); 558 name, string_from_portable(pflags), mode);
556 fd = open(name, flags, mode); 559 if (readonly &&
557 if (fd < 0) { 560 ((flags & O_ACCMODE) == O_WRONLY || (flags & O_ACCMODE) == O_RDWR))
558 status = errno_to_portable(errno); 561 status = SSH2_FX_PERMISSION_DENIED;
559 } else { 562 else {
560 handle = handle_new(HANDLE_FILE, name, fd, NULL); 563 fd = open(name, flags, mode);
561 if (handle < 0) { 564 if (fd < 0) {
562 close(fd); 565 status = errno_to_portable(errno);
563 } else { 566 } else {
564 send_handle(id, handle); 567 handle = handle_new(HANDLE_FILE, name, fd, NULL);
565 status = SSH2_FX_OK; 568 if (handle < 0) {
569 close(fd);
570 } else {
571 send_handle(id, handle);
572 status = SSH2_FX_OK;
573 }
566 } 574 }
567 } 575 }
568 if (status != SSH2_FX_OK) 576 if (status != SSH2_FX_OK)
@@ -632,7 +640,7 @@ process_write(void)
632 u_int32_t id; 640 u_int32_t id;
633 u_int64_t off; 641 u_int64_t off;
634 u_int len; 642 u_int len;
635 int handle, fd, ret, status = SSH2_FX_FAILURE; 643 int handle, fd, ret, status;
636 char *data; 644 char *data;
637 645
638 id = get_int(); 646 id = get_int();
@@ -643,7 +651,12 @@ process_write(void)
643 debug("request %u: write \"%s\" (handle %d) off %llu len %d", 651 debug("request %u: write \"%s\" (handle %d) off %llu len %d",
644 id, handle_to_name(handle), handle, (unsigned long long)off, len); 652 id, handle_to_name(handle), handle, (unsigned long long)off, len);
645 fd = handle_to_fd(handle); 653 fd = handle_to_fd(handle);
646 if (fd >= 0) { 654
655 if (fd < 0)
656 status = SSH2_FX_FAILURE;
657 else if (readonly)
658 status = SSH2_FX_PERMISSION_DENIED;
659 else {
647 if (lseek(fd, off, SEEK_SET) < 0) { 660 if (lseek(fd, off, SEEK_SET) < 0) {
648 status = errno_to_portable(errno); 661 status = errno_to_portable(errno);
649 error("process_write: seek failed"); 662 error("process_write: seek failed");
@@ -658,6 +671,7 @@ process_write(void)
658 handle_update_write(handle, ret); 671 handle_update_write(handle, ret);
659 } else { 672 } else {
660 debug2("nothing at all written"); 673 debug2("nothing at all written");
674 status = SSH2_FX_FAILURE;
661 } 675 }
662 } 676 }
663 } 677 }
@@ -754,6 +768,10 @@ process_setstat(void)
754 name = get_string(NULL); 768 name = get_string(NULL);
755 a = get_attrib(); 769 a = get_attrib();
756 debug("request %u: setstat name \"%s\"", id, name); 770 debug("request %u: setstat name \"%s\"", id, name);
771 if (readonly) {
772 status = SSH2_FX_PERMISSION_DENIED;
773 a->flags = 0;
774 }
757 if (a->flags & SSH2_FILEXFER_ATTR_SIZE) { 775 if (a->flags & SSH2_FILEXFER_ATTR_SIZE) {
758 logit("set \"%s\" size %llu", 776 logit("set \"%s\" size %llu",
759 name, (unsigned long long)a->size); 777 name, (unsigned long long)a->size);
@@ -802,9 +820,11 @@ process_fsetstat(void)
802 a = get_attrib(); 820 a = get_attrib();
803 debug("request %u: fsetstat handle %d", id, handle); 821 debug("request %u: fsetstat handle %d", id, handle);
804 fd = handle_to_fd(handle); 822 fd = handle_to_fd(handle);
805 if (fd < 0) { 823 if (fd < 0)
806 status = SSH2_FX_FAILURE; 824 status = SSH2_FX_FAILURE;
807 } else { 825 else if (readonly)
826 status = SSH2_FX_PERMISSION_DENIED;
827 else {
808 char *name = handle_to_name(handle); 828 char *name = handle_to_name(handle);
809 829
810 if (a->flags & SSH2_FILEXFER_ATTR_SIZE) { 830 if (a->flags & SSH2_FILEXFER_ATTR_SIZE) {
@@ -920,7 +940,7 @@ process_readdir(void)
920 continue; 940 continue;
921 stat_to_attrib(&st, &(stats[count].attrib)); 941 stat_to_attrib(&st, &(stats[count].attrib));
922 stats[count].name = xstrdup(dp->d_name); 942 stats[count].name = xstrdup(dp->d_name);
923 stats[count].long_name = ls_file(dp->d_name, &st, 0); 943 stats[count].long_name = ls_file(dp->d_name, &st, 0, 0);
924 count++; 944 count++;
925 /* send up to 100 entries in one message */ 945 /* send up to 100 entries in one message */
926 /* XXX check packet size instead */ 946 /* XXX check packet size instead */
@@ -952,8 +972,12 @@ process_remove(void)
952 name = get_string(NULL); 972 name = get_string(NULL);
953 debug3("request %u: remove", id); 973 debug3("request %u: remove", id);
954 logit("remove name \"%s\"", name); 974 logit("remove name \"%s\"", name);
955 ret = unlink(name); 975 if (readonly)
956 status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK; 976 status = SSH2_FX_PERMISSION_DENIED;
977 else {
978 ret = unlink(name);
979 status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK;
980 }
957 send_status(id, status); 981 send_status(id, status);
958 xfree(name); 982 xfree(name);
959} 983}
@@ -973,8 +997,12 @@ process_mkdir(void)
973 a->perm & 07777 : 0777; 997 a->perm & 07777 : 0777;
974 debug3("request %u: mkdir", id); 998 debug3("request %u: mkdir", id);
975 logit("mkdir name \"%s\" mode 0%o", name, mode); 999 logit("mkdir name \"%s\" mode 0%o", name, mode);
976 ret = mkdir(name, mode); 1000 if (readonly)
977 status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK; 1001 status = SSH2_FX_PERMISSION_DENIED;
1002 else {
1003 ret = mkdir(name, mode);
1004 status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK;
1005 }
978 send_status(id, status); 1006 send_status(id, status);
979 xfree(name); 1007 xfree(name);
980} 1008}
@@ -990,8 +1018,12 @@ process_rmdir(void)
990 name = get_string(NULL); 1018 name = get_string(NULL);
991 debug3("request %u: rmdir", id); 1019 debug3("request %u: rmdir", id);
992 logit("rmdir name \"%s\"", name); 1020 logit("rmdir name \"%s\"", name);
993 ret = rmdir(name); 1021 if (readonly)
994 status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK; 1022 status = SSH2_FX_PERMISSION_DENIED;
1023 else {
1024 ret = rmdir(name);
1025 status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK;
1026 }
995 send_status(id, status); 1027 send_status(id, status);
996 xfree(name); 1028 xfree(name);
997} 1029}
@@ -1036,7 +1068,9 @@ process_rename(void)
1036 debug3("request %u: rename", id); 1068 debug3("request %u: rename", id);
1037 logit("rename old \"%s\" new \"%s\"", oldpath, newpath); 1069 logit("rename old \"%s\" new \"%s\"", oldpath, newpath);
1038 status = SSH2_FX_FAILURE; 1070 status = SSH2_FX_FAILURE;
1039 if (lstat(oldpath, &sb) == -1) 1071 if (readonly)
1072 status = SSH2_FX_PERMISSION_DENIED;
1073 else if (lstat(oldpath, &sb) == -1)
1040 status = errno_to_portable(errno); 1074 status = errno_to_portable(errno);
1041 else if (S_ISREG(sb.st_mode)) { 1075 else if (S_ISREG(sb.st_mode)) {
1042 /* Race-free rename of regular files */ 1076 /* Race-free rename of regular files */
@@ -1120,8 +1154,12 @@ process_symlink(void)
1120 debug3("request %u: symlink", id); 1154 debug3("request %u: symlink", id);
1121 logit("symlink old \"%s\" new \"%s\"", oldpath, newpath); 1155 logit("symlink old \"%s\" new \"%s\"", oldpath, newpath);
1122 /* this will fail if 'newpath' exists */ 1156 /* this will fail if 'newpath' exists */
1123 ret = symlink(oldpath, newpath); 1157 if (readonly)
1124 status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK; 1158 status = SSH2_FX_PERMISSION_DENIED;
1159 else {
1160 ret = symlink(oldpath, newpath);
1161 status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK;
1162 }
1125 send_status(id, status); 1163 send_status(id, status);
1126 xfree(oldpath); 1164 xfree(oldpath);
1127 xfree(newpath); 1165 xfree(newpath);
@@ -1131,15 +1169,19 @@ static void
1131process_extended_posix_rename(u_int32_t id) 1169process_extended_posix_rename(u_int32_t id)
1132{ 1170{
1133 char *oldpath, *newpath; 1171 char *oldpath, *newpath;
1172 int ret, status;
1134 1173
1135 oldpath = get_string(NULL); 1174 oldpath = get_string(NULL);
1136 newpath = get_string(NULL); 1175 newpath = get_string(NULL);
1137 debug3("request %u: posix-rename", id); 1176 debug3("request %u: posix-rename", id);
1138 logit("posix-rename old \"%s\" new \"%s\"", oldpath, newpath); 1177 logit("posix-rename old \"%s\" new \"%s\"", oldpath, newpath);
1139 if (rename(oldpath, newpath) == -1) 1178 if (readonly)
1140 send_status(id, errno_to_portable(errno)); 1179 status = SSH2_FX_PERMISSION_DENIED;
1141 else 1180 else {
1142 send_status(id, SSH2_FX_OK); 1181 ret = rename(oldpath, newpath);
1182 status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK;
1183 }
1184 send_status(id, status);
1143 xfree(oldpath); 1185 xfree(oldpath);
1144 xfree(newpath); 1186 xfree(newpath);
1145} 1187}
@@ -1322,7 +1364,8 @@ sftp_server_usage(void)
1322 extern char *__progname; 1364 extern char *__progname;
1323 1365
1324 fprintf(stderr, 1366 fprintf(stderr,
1325 "usage: %s [-he] [-l log_level] [-f log_facility]\n", __progname); 1367 "usage: %s [-ehR] [-f log_facility] [-l log_level] [-u umask]\n",
1368 __progname);
1326 exit(1); 1369 exit(1);
1327} 1370}
1328 1371
@@ -1334,6 +1377,8 @@ sftp_server_main(int argc, char **argv, struct passwd *user_pw)
1334 ssize_t len, olen, set_size; 1377 ssize_t len, olen, set_size;
1335 SyslogFacility log_facility = SYSLOG_FACILITY_AUTH; 1378 SyslogFacility log_facility = SYSLOG_FACILITY_AUTH;
1336 char *cp, buf[4*4096]; 1379 char *cp, buf[4*4096];
1380 const char *errmsg;
1381 mode_t mask;
1337 1382
1338 extern char *optarg; 1383 extern char *optarg;
1339 extern char *__progname; 1384 extern char *__progname;
@@ -1341,8 +1386,11 @@ sftp_server_main(int argc, char **argv, struct passwd *user_pw)
1341 __progname = ssh_get_progname(argv[0]); 1386 __progname = ssh_get_progname(argv[0]);
1342 log_init(__progname, log_level, log_facility, log_stderr); 1387 log_init(__progname, log_level, log_facility, log_stderr);
1343 1388
1344 while (!skipargs && (ch = getopt(argc, argv, "f:l:che")) != -1) { 1389 while (!skipargs && (ch = getopt(argc, argv, "f:l:u:cehR")) != -1) {
1345 switch (ch) { 1390 switch (ch) {
1391 case 'R':
1392 readonly = 1;
1393 break;
1346 case 'c': 1394 case 'c':
1347 /* 1395 /*
1348 * Ignore all arguments if we are invoked as a 1396 * Ignore all arguments if we are invoked as a
@@ -1363,6 +1411,13 @@ sftp_server_main(int argc, char **argv, struct passwd *user_pw)
1363 if (log_facility == SYSLOG_FACILITY_NOT_SET) 1411 if (log_facility == SYSLOG_FACILITY_NOT_SET)
1364 error("Invalid log facility \"%s\"", optarg); 1412 error("Invalid log facility \"%s\"", optarg);
1365 break; 1413 break;
1414 case 'u':
1415 mask = (mode_t)strtonum(optarg, 0, 0777, &errmsg);
1416 if (errmsg != NULL)
1417 fatal("Invalid umask \"%s\": %s",
1418 optarg, errmsg);
1419 (void)umask(mask);
1420 break;
1366 case 'h': 1421 case 'h':
1367 default: 1422 default:
1368 sftp_server_usage(); 1423 sftp_server_usage();
@@ -1387,8 +1442,8 @@ sftp_server_main(int argc, char **argv, struct passwd *user_pw)
1387 logit("session opened for local user %s from [%s]", 1442 logit("session opened for local user %s from [%s]",
1388 pw->pw_name, client_addr); 1443 pw->pw_name, client_addr);
1389 1444
1390 in = dup(STDIN_FILENO); 1445 in = STDIN_FILENO;
1391 out = dup(STDOUT_FILENO); 1446 out = STDOUT_FILENO;
1392 1447
1393#ifdef HAVE_CYGWIN 1448#ifdef HAVE_CYGWIN
1394 setmode(in, O_BINARY); 1449 setmode(in, O_BINARY);
diff --git a/sftp.0 b/sftp.0
index 1b81391e5..cb1bb033e 100644
--- a/sftp.0
+++ b/sftp.0
@@ -4,8 +4,9 @@ NAME
4 sftp - secure file transfer program 4 sftp - secure file transfer program
5 5
6SYNOPSIS 6SYNOPSIS
7 sftp [-1Cv] [-B buffer_size] [-b batchfile] [-F ssh_config] 7 sftp [-1246Cpqrv] [-B buffer_size] [-b batchfile] [-c cipher]
8 [-o ssh_option] [-P sftp_server_path] [-R num_requests] [-S program] 8 [-D sftp_server_path] [-F ssh_config] [-i identity_file]
9 [-o ssh_option] [-P port] [-R num_requests] [-S program]
9 [-s subsystem | sftp_server] host 10 [-s subsystem | sftp_server] host
10 sftp [user@]host[:file ...] 11 sftp [user@]host[:file ...]
11 sftp [user@]host[:dir[/]] 12 sftp [user@]host[:dir[/]]
@@ -31,6 +32,12 @@ DESCRIPTION
31 32
32 -1 Specify the use of protocol version 1. 33 -1 Specify the use of protocol version 1.
33 34
35 -2 Specify the use of protocol version 2.
36
37 -4 Forces sftp to use IPv4 addresses only.
38
39 -6 Forces sftp to use IPv6 addresses only.
40
34 -B buffer_size 41 -B buffer_size
35 Specify the size of the buffer that sftp uses when transferring 42 Specify the size of the buffer that sftp uses when transferring
36 files. Larger buffers require fewer round trips at the cost of 43 files. Larger buffers require fewer round trips at the cost of
@@ -49,10 +56,23 @@ DESCRIPTION
49 56
50 -C Enables compression (via ssh's -C flag). 57 -C Enables compression (via ssh's -C flag).
51 58
59 -c cipher
60 Selects the cipher to use for encrypting the data transfers.
61 This option is directly passed to ssh(1).
62
63 -D sftp_server_path
64 Connect directly to a local sftp server (rather than via ssh(1)).
65 This option may be useful in debugging the client and server.
66
52 -F ssh_config 67 -F ssh_config
53 Specifies an alternative per-user configuration file for ssh(1). 68 Specifies an alternative per-user configuration file for ssh(1).
54 This option is directly passed to ssh(1). 69 This option is directly passed to ssh(1).
55 70
71 -i identity_file
72 Selects the file from which the identity (private key) for public
73 key authentication is read. This option is directly passed to
74 ssh(1).
75
56 -o ssh_option 76 -o ssh_option
57 Can be used to pass options to ssh in the format used in 77 Can be used to pass options to ssh in the format used in
58 ssh_config(5). This is useful for specifying options for which 78 ssh_config(5). This is useful for specifying options for which
@@ -91,6 +111,7 @@ DESCRIPTION
91 NoHostAuthenticationForLocalhost 111 NoHostAuthenticationForLocalhost
92 NumberOfPasswordPrompts 112 NumberOfPasswordPrompts
93 PasswordAuthentication 113 PasswordAuthentication
114 PKCS11Provider
94 Port 115 Port
95 PreferredAuthentications 116 PreferredAuthentications
96 Protocol 117 Protocol
@@ -102,7 +123,6 @@ DESCRIPTION
102 SendEnv 123 SendEnv
103 ServerAliveInterval 124 ServerAliveInterval
104 ServerAliveCountMax 125 ServerAliveCountMax
105 SmartcardDevice
106 StrictHostKeyChecking 126 StrictHostKeyChecking
107 TCPKeepAlive 127 TCPKeepAlive
108 UsePrivilegedPort 128 UsePrivilegedPort
@@ -110,15 +130,24 @@ DESCRIPTION
110 UserKnownHostsFile 130 UserKnownHostsFile
111 VerifyHostKeyDNS 131 VerifyHostKeyDNS
112 132
113 -P sftp_server_path 133 -P port
114 Connect directly to a local sftp server (rather than via ssh(1)). 134 Specifies the port to connect to on the remote host.
115 This option may be useful in debugging the client and server. 135
136 -p Preserves modification times, access times, and modes from the
137 original files transferred.
138
139 -q Quiet mode: disables the progress meter as well as warning and
140 diagnostic messages from ssh(1).
116 141
117 -R num_requests 142 -R num_requests
118 Specify how many requests may be outstanding at any one time. 143 Specify how many requests may be outstanding at any one time.
119 Increasing this may slightly improve file transfer speed but will 144 Increasing this may slightly improve file transfer speed but will
120 increase memory usage. The default is 64 outstanding requests. 145 increase memory usage. The default is 64 outstanding requests.
121 146
147 -r Recursively copy entire directories when uploading and download-
148 ing. Note that sftp does not follow symbolic links encountered
149 in the tree traversal.
150
122 -S program 151 -S program
123 Name of the program to use for the encrypted connection. The 152 Name of the program to use for the encrypted connection. The
124 program must understand ssh(1) options. 153 program must understand ssh(1) options.
@@ -165,14 +194,19 @@ INTERACTIVE COMMANDS
165 194
166 exit Quit sftp. 195 exit Quit sftp.
167 196
168 get [-P] remote-path [local-path] 197 get [-Ppr] remote-path [local-path]
169 Retrieve the remote-path and store it on the local machine. If 198 Retrieve the remote-path and store it on the local machine. If
170 the local path name is not specified, it is given the same name 199 the local path name is not specified, it is given the same name
171 it has on the remote machine. remote-path may contain glob(3) 200 it has on the remote machine. remote-path may contain glob(3)
172 characters and may match multiple files. If it does and local- 201 characters and may match multiple files. If it does and local-
173 path is specified, then local-path must specify a directory. If 202 path is specified, then local-path must specify a directory.
174 the -P flag is specified, then full file permissions and access 203
175 times are copied too. 204 If either the -P or -p flag is specified, then full file permis-
205 sions and access times are copied too.
206
207 If the -r flag is specified then directories will be copied re-
208 cursively. Note that sftp does not follow symbolic links when
209 performing recursive transfers.
176 210
177 help Display help text. 211 help Display help text.
178 212
@@ -193,7 +227,7 @@ INTERACTIVE COMMANDS
193 227
194 lpwd Print local working directory. 228 lpwd Print local working directory.
195 229
196 ls [-1aflnrSt] [path] 230 ls [-1afhlnrSt] [path]
197 Display a remote directory listing of either path or the current 231 Display a remote directory listing of either path or the current
198 directory if path is not specified. path may contain glob(3) 232 directory if path is not specified. path may contain glob(3)
199 characters and may match multiple files. 233 characters and may match multiple files.
@@ -208,6 +242,12 @@ INTERACTIVE COMMANDS
208 -f Do not sort the listing. The default sort order is lexi- 242 -f Do not sort the listing. The default sort order is lexi-
209 cographical. 243 cographical.
210 244
245 -h When used with a long format option, use unit suffixes:
246 Byte, Kilobyte, Megabyte, Gigabyte, Terabyte, Petabyte,
247 and Exabyte in order to reduce the number of digits to
248 four or fewer using powers of 2 for sizes (K=1024,
249 M=1048576, etc.).
250
211 -l Display additional details including permissions and own- 251 -l Display additional details including permissions and own-
212 ership information. 252 ership information.
213 253
@@ -229,14 +269,19 @@ INTERACTIVE COMMANDS
229 progress 269 progress
230 Toggle display of progress meter. 270 Toggle display of progress meter.
231 271
232 put [-P] local-path [remote-path] 272 put [-Ppr] local-path [remote-path]
233 Upload local-path and store it on the remote machine. If the re- 273 Upload local-path and store it on the remote machine. If the re-
234 mote path name is not specified, it is given the same name it has 274 mote path name is not specified, it is given the same name it has
235 on the local machine. local-path may contain glob(3) characters 275 on the local machine. local-path may contain glob(3) characters
236 and may match multiple files. If it does and remote-path is 276 and may match multiple files. If it does and remote-path is
237 specified, then remote-path must specify a directory. If the -P 277 specified, then remote-path must specify a directory.
238 flag is specified, then the file's full permission and access 278
239 time are copied too. 279 If ether the -P or -p flag is specified, then full file permis-
280 sions and access times are copied too.
281
282 If the -r flag is specified then directories will be copied re-
283 cursively. Note that sftp does not follow symbolic links when
284 performing recursive transfers.
240 285
241 pwd Display remote working directory. 286 pwd Display remote working directory.
242 287
@@ -271,4 +316,4 @@ SEE ALSO
271 T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh- 316 T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh-
272 filexfer-00.txt, January 2001, work in progress material. 317 filexfer-00.txt, January 2001, work in progress material.
273 318
274OpenBSD 4.6 December 9, 2008 5 319OpenBSD 4.6 February 8, 2010 5
diff --git a/sftp.1 b/sftp.1
index 37ccb3a38..777b02a58 100644
--- a/sftp.1
+++ b/sftp.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: sftp.1,v 1.69 2008/12/09 15:35:00 sobrado Exp $ 1.\" $OpenBSD: sftp.1,v 1.83 2010/02/08 10:50:20 markus Exp $
2.\" 2.\"
3.\" Copyright (c) 2001 Damien Miller. All rights reserved. 3.\" Copyright (c) 2001 Damien Miller. All rights reserved.
4.\" 4.\"
@@ -22,7 +22,7 @@
22.\" (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
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.Dd $Mdocdate: December 9 2008 $ 25.Dd $Mdocdate: February 8 2010 $
26.Dt SFTP 1 26.Dt SFTP 1
27.Os 27.Os
28.Sh NAME 28.Sh NAME
@@ -31,12 +31,15 @@
31.Sh SYNOPSIS 31.Sh SYNOPSIS
32.Nm sftp 32.Nm sftp
33.Bk -words 33.Bk -words
34.Op Fl 1Cv 34.Op Fl 1246Cpqrv
35.Op Fl B Ar buffer_size 35.Op Fl B Ar buffer_size
36.Op Fl b Ar batchfile 36.Op Fl b Ar batchfile
37.Op Fl c Ar cipher
38.Op Fl D Ar sftp_server_path
37.Op Fl F Ar ssh_config 39.Op Fl F Ar ssh_config
40.Op Fl i Ar identity_file
38.Op Fl o Ar ssh_option 41.Op Fl o Ar ssh_option
39.Op Fl P Ar sftp_server_path 42.Op Fl P Ar port
40.Op Fl R Ar num_requests 43.Op Fl R Ar num_requests
41.Op Fl S Ar program 44.Op Fl S Ar program
42.Op Fl s Ar subsystem | sftp_server 45.Op Fl s Ar subsystem | sftp_server
@@ -87,6 +90,16 @@ The options are as follows:
87.Bl -tag -width Ds 90.Bl -tag -width Ds
88.It Fl 1 91.It Fl 1
89Specify the use of protocol version 1. 92Specify the use of protocol version 1.
93.It Fl 2
94Specify the use of protocol version 2.
95.It Fl 4
96Forces
97.Nm
98to use IPv4 addresses only.
99.It Fl 6
100Forces
101.Nm
102to use IPv6 addresses only.
90.It Fl B Ar buffer_size 103.It Fl B Ar buffer_size
91Specify the size of the buffer that 104Specify the size of the buffer that
92.Nm 105.Nm
@@ -124,12 +137,26 @@ character (for example,
124Enables compression (via ssh's 137Enables compression (via ssh's
125.Fl C 138.Fl C
126flag). 139flag).
140.It Fl c Ar cipher
141Selects the cipher to use for encrypting the data transfers.
142This option is directly passed to
143.Xr ssh 1 .
144.It Fl D Ar sftp_server_path
145Connect directly to a local sftp server
146(rather than via
147.Xr ssh 1 ) .
148This option may be useful in debugging the client and server.
127.It Fl F Ar ssh_config 149.It Fl F Ar ssh_config
128Specifies an alternative 150Specifies an alternative
129per-user configuration file for 151per-user configuration file for
130.Xr ssh 1 . 152.Xr ssh 1 .
131This option is directly passed to 153This option is directly passed to
132.Xr ssh 1 . 154.Xr ssh 1 .
155.It Fl i Ar identity_file
156Selects the file from which the identity (private key) for public key
157authentication is read.
158This option is directly passed to
159.Xr ssh 1 .
133.It Fl o Ar ssh_option 160.It Fl o Ar ssh_option
134Can be used to pass options to 161Can be used to pass options to
135.Nm ssh 162.Nm ssh
@@ -175,6 +202,7 @@ For full details of the options listed below, and their possible values, see
175.It NoHostAuthenticationForLocalhost 202.It NoHostAuthenticationForLocalhost
176.It NumberOfPasswordPrompts 203.It NumberOfPasswordPrompts
177.It PasswordAuthentication 204.It PasswordAuthentication
205.It PKCS11Provider
178.It Port 206.It Port
179.It PreferredAuthentications 207.It PreferredAuthentications
180.It Protocol 208.It Protocol
@@ -186,7 +214,6 @@ For full details of the options listed below, and their possible values, see
186.It SendEnv 214.It SendEnv
187.It ServerAliveInterval 215.It ServerAliveInterval
188.It ServerAliveCountMax 216.It ServerAliveCountMax
189.It SmartcardDevice
190.It StrictHostKeyChecking 217.It StrictHostKeyChecking
191.It TCPKeepAlive 218.It TCPKeepAlive
192.It UsePrivilegedPort 219.It UsePrivilegedPort
@@ -194,16 +221,25 @@ For full details of the options listed below, and their possible values, see
194.It UserKnownHostsFile 221.It UserKnownHostsFile
195.It VerifyHostKeyDNS 222.It VerifyHostKeyDNS
196.El 223.El
197.It Fl P Ar sftp_server_path 224.It Fl P Ar port
198Connect directly to a local sftp server 225Specifies the port to connect to on the remote host.
199(rather than via 226.It Fl p
200.Xr ssh 1 ) . 227Preserves modification times, access times, and modes from the
201This option may be useful in debugging the client and server. 228original files transferred.
229.It Fl q
230Quiet mode: disables the progress meter as well as warning and
231diagnostic messages from
232.Xr ssh 1 .
202.It Fl R Ar num_requests 233.It Fl R Ar num_requests
203Specify how many requests may be outstanding at any one time. 234Specify how many requests may be outstanding at any one time.
204Increasing this may slightly improve file transfer speed 235Increasing this may slightly improve file transfer speed
205but will increase memory usage. 236but will increase memory usage.
206The default is 64 outstanding requests. 237The default is 64 outstanding requests.
238.It Fl r
239Recursively copy entire directories when uploading and downloading.
240Note that
241.Nm
242does not follow symbolic links encountered in the tree traversal.
207.It Fl S Ar program 243.It Fl S Ar program
208Name of the 244Name of the
209.Ar program 245.Ar program
@@ -294,7 +330,7 @@ extension.
294Quit 330Quit
295.Nm sftp . 331.Nm sftp .
296.It Xo Ic get 332.It Xo Ic get
297.Op Fl P 333.Op Fl Ppr
298.Ar remote-path 334.Ar remote-path
299.Op Ar local-path 335.Op Ar local-path
300.Xc 336.Xc
@@ -313,10 +349,20 @@ If it does and
313is specified, then 349is specified, then
314.Ar local-path 350.Ar local-path
315must specify a directory. 351must specify a directory.
316If the 352.Pp
353If either the
317.Fl P 354.Fl P
355or
356.Fl p
318flag is specified, then full file permissions and access times are 357flag is specified, then full file permissions and access times are
319copied too. 358copied too.
359.Pp
360If the
361.Fl r
362flag is specified then directories will be copied recursively.
363Note that
364.Nm
365does not follow symbolic links when performing recursive transfers.
320.It Ic help 366.It Ic help
321Display help text. 367Display help text.
322.It Ic lcd Ar path 368.It Ic lcd Ar path
@@ -347,7 +393,7 @@ to
347.It Ic lpwd 393.It Ic lpwd
348Print local working directory. 394Print local working directory.
349.It Xo Ic ls 395.It Xo Ic ls
350.Op Fl 1aflnrSt 396.Op Fl 1afhlnrSt
351.Op Ar path 397.Op Ar path
352.Xc 398.Xc
353Display a remote directory listing of either 399Display a remote directory listing of either
@@ -372,6 +418,11 @@ List files beginning with a dot
372.It Fl f 418.It Fl f
373Do not sort the listing. 419Do not sort the listing.
374The default sort order is lexicographical. 420The default sort order is lexicographical.
421.It Fl h
422When used with a long format option, use unit suffixes: Byte, Kilobyte,
423Megabyte, Gigabyte, Terabyte, Petabyte, and Exabyte in order to reduce
424the number of digits to four or fewer using powers of 2 for sizes (K=1024,
425M=1048576, etc.).
375.It Fl l 426.It Fl l
376Display additional details including permissions 427Display additional details including permissions
377and ownership information. 428and ownership information.
@@ -394,7 +445,7 @@ Create remote directory specified by
394.It Ic progress 445.It Ic progress
395Toggle display of progress meter. 446Toggle display of progress meter.
396.It Xo Ic put 447.It Xo Ic put
397.Op Fl P 448.Op Fl Ppr
398.Ar local-path 449.Ar local-path
399.Op Ar remote-path 450.Op Ar remote-path
400.Xc 451.Xc
@@ -412,10 +463,20 @@ If it does and
412is specified, then 463is specified, then
413.Ar remote-path 464.Ar remote-path
414must specify a directory. 465must specify a directory.
415If the 466.Pp
467If ether the
416.Fl P 468.Fl P
417flag is specified, then the file's full permission and access time are 469or
470.Fl p
471flag is specified, then full file permissions and access times are
418copied too. 472copied too.
473.Pp
474If the
475.Fl r
476flag is specified then directories will be copied recursively.
477Note that
478.Nm
479does not follow symbolic links when performing recursive transfers.
419.It Ic pwd 480.It Ic pwd
420Display remote working directory. 481Display remote working directory.
421.It Ic quit 482.It Ic quit
diff --git a/sftp.c b/sftp.c
index 66bd111b1..d65d4ec62 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp.c,v 1.107 2009/02/02 11:15:14 dtucker Exp $ */ 1/* $OpenBSD: sftp.c,v 1.123 2010/01/27 19:21:39 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -35,6 +35,9 @@
35#ifdef HAVE_PATHS_H 35#ifdef HAVE_PATHS_H
36# include <paths.h> 36# include <paths.h>
37#endif 37#endif
38#ifdef HAVE_LIBGEN_H
39#include <libgen.h>
40#endif
38#ifdef USE_LIBEDIT 41#ifdef USE_LIBEDIT
39#include <histedit.h> 42#include <histedit.h>
40#else 43#else
@@ -65,30 +68,39 @@ typedef void EditLine;
65#include "sftp-common.h" 68#include "sftp-common.h"
66#include "sftp-client.h" 69#include "sftp-client.h"
67 70
71#define DEFAULT_COPY_BUFLEN 32768 /* Size of buffer for up/download */
72#define DEFAULT_NUM_REQUESTS 64 /* # concurrent outstanding requests */
73
68/* File to read commands from */ 74/* File to read commands from */
69FILE* infile; 75FILE* infile;
70 76
71/* Are we in batchfile mode? */ 77/* Are we in batchfile mode? */
72int batchmode = 0; 78int batchmode = 0;
73 79
74/* Size of buffer used when copying files */
75size_t copy_buffer_len = 32768;
76
77/* Number of concurrent outstanding requests */
78size_t num_requests = 64;
79
80/* PID of ssh transport process */ 80/* PID of ssh transport process */
81static pid_t sshpid = -1; 81static pid_t sshpid = -1;
82 82
83/* This is set to 0 if the progressmeter is not desired. */ 83/* This is set to 0 if the progressmeter is not desired. */
84int showprogress = 1; 84int showprogress = 1;
85 85
86/* When this option is set, we always recursively download/upload directories */
87int global_rflag = 0;
88
89/* When this option is set, the file transfers will always preserve times */
90int global_pflag = 0;
91
86/* SIGINT received during command processing */ 92/* SIGINT received during command processing */
87volatile sig_atomic_t interrupted = 0; 93volatile sig_atomic_t interrupted = 0;
88 94
89/* I wish qsort() took a separate ctx for the comparison function...*/ 95/* I wish qsort() took a separate ctx for the comparison function...*/
90int sort_flag; 96int sort_flag;
91 97
98/* Context used for commandline completion */
99struct complete_ctx {
100 struct sftp_conn *conn;
101 char **remote_pathp;
102};
103
92int remote_glob(struct sftp_conn *, const char *, int, 104int remote_glob(struct sftp_conn *, const char *, int,
93 int (*)(const char *, int), glob_t *); /* proto for sftp-glob.c */ 105 int (*)(const char *, int), glob_t *); /* proto for sftp-glob.c */
94 106
@@ -98,16 +110,17 @@ extern char *__progname;
98#define WHITESPACE " \t\r\n" 110#define WHITESPACE " \t\r\n"
99 111
100/* ls flags */ 112/* ls flags */
101#define LS_LONG_VIEW 0x01 /* Full view ala ls -l */ 113#define LS_LONG_VIEW 0x0001 /* Full view ala ls -l */
102#define LS_SHORT_VIEW 0x02 /* Single row view ala ls -1 */ 114#define LS_SHORT_VIEW 0x0002 /* Single row view ala ls -1 */
103#define LS_NUMERIC_VIEW 0x04 /* Long view with numeric uid/gid */ 115#define LS_NUMERIC_VIEW 0x0004 /* Long view with numeric uid/gid */
104#define LS_NAME_SORT 0x08 /* Sort by name (default) */ 116#define LS_NAME_SORT 0x0008 /* Sort by name (default) */
105#define LS_TIME_SORT 0x10 /* Sort by mtime */ 117#define LS_TIME_SORT 0x0010 /* Sort by mtime */
106#define LS_SIZE_SORT 0x20 /* Sort by file size */ 118#define LS_SIZE_SORT 0x0020 /* Sort by file size */
107#define LS_REVERSE_SORT 0x40 /* Reverse sort order */ 119#define LS_REVERSE_SORT 0x0040 /* Reverse sort order */
108#define LS_SHOW_ALL 0x80 /* Don't skip filenames starting with '.' */ 120#define LS_SHOW_ALL 0x0080 /* Don't skip filenames starting with '.' */
109 121#define LS_SI_UNITS 0x0100 /* Display sizes as K, M, G, etc. */
110#define VIEW_FLAGS (LS_LONG_VIEW|LS_SHORT_VIEW|LS_NUMERIC_VIEW) 122
123#define VIEW_FLAGS (LS_LONG_VIEW|LS_SHORT_VIEW|LS_NUMERIC_VIEW|LS_SI_UNITS)
111#define SORT_FLAGS (LS_NAME_SORT|LS_TIME_SORT|LS_SIZE_SORT) 124#define SORT_FLAGS (LS_NAME_SORT|LS_TIME_SORT|LS_SIZE_SORT)
112 125
113/* Commands for interactive mode */ 126/* Commands for interactive mode */
@@ -139,46 +152,50 @@ extern char *__progname;
139struct CMD { 152struct CMD {
140 const char *c; 153 const char *c;
141 const int n; 154 const int n;
155 const int t;
142}; 156};
143 157
158/* Type of completion */
159#define NOARGS 0
160#define REMOTE 1
161#define LOCAL 2
162
144static const struct CMD cmds[] = { 163static const struct CMD cmds[] = {
145 { "bye", I_QUIT }, 164 { "bye", I_QUIT, NOARGS },
146 { "cd", I_CHDIR }, 165 { "cd", I_CHDIR, REMOTE },
147 { "chdir", I_CHDIR }, 166 { "chdir", I_CHDIR, REMOTE },
148 { "chgrp", I_CHGRP }, 167 { "chgrp", I_CHGRP, REMOTE },
149 { "chmod", I_CHMOD }, 168 { "chmod", I_CHMOD, REMOTE },
150 { "chown", I_CHOWN }, 169 { "chown", I_CHOWN, REMOTE },
151 { "df", I_DF }, 170 { "df", I_DF, REMOTE },
152 { "dir", I_LS }, 171 { "dir", I_LS, REMOTE },
153 { "exit", I_QUIT }, 172 { "exit", I_QUIT, NOARGS },
154 { "get", I_GET }, 173 { "get", I_GET, REMOTE },
155 { "mget", I_GET }, 174 { "help", I_HELP, NOARGS },
156 { "help", I_HELP }, 175 { "lcd", I_LCHDIR, LOCAL },
157 { "lcd", I_LCHDIR }, 176 { "lchdir", I_LCHDIR, LOCAL },
158 { "lchdir", I_LCHDIR }, 177 { "lls", I_LLS, LOCAL },
159 { "lls", I_LLS }, 178 { "lmkdir", I_LMKDIR, LOCAL },
160 { "lmkdir", I_LMKDIR }, 179 { "ln", I_SYMLINK, REMOTE },
161 { "ln", I_SYMLINK }, 180 { "lpwd", I_LPWD, LOCAL },
162 { "lpwd", I_LPWD }, 181 { "ls", I_LS, REMOTE },
163 { "ls", I_LS }, 182 { "lumask", I_LUMASK, NOARGS },
164 { "lumask", I_LUMASK }, 183 { "mkdir", I_MKDIR, REMOTE },
165 { "mkdir", I_MKDIR }, 184 { "progress", I_PROGRESS, NOARGS },
166 { "progress", I_PROGRESS }, 185 { "put", I_PUT, LOCAL },
167 { "put", I_PUT }, 186 { "pwd", I_PWD, REMOTE },
168 { "mput", I_PUT }, 187 { "quit", I_QUIT, NOARGS },
169 { "pwd", I_PWD }, 188 { "rename", I_RENAME, REMOTE },
170 { "quit", I_QUIT }, 189 { "rm", I_RM, REMOTE },
171 { "rename", I_RENAME }, 190 { "rmdir", I_RMDIR, REMOTE },
172 { "rm", I_RM }, 191 { "symlink", I_SYMLINK, REMOTE },
173 { "rmdir", I_RMDIR }, 192 { "version", I_VERSION, NOARGS },
174 { "symlink", I_SYMLINK }, 193 { "!", I_SHELL, NOARGS },
175 { "version", I_VERSION }, 194 { "?", I_HELP, NOARGS },
176 { "!", I_SHELL }, 195 { NULL, -1, -1 }
177 { "?", I_HELP },
178 { NULL, -1}
179}; 196};
180 197
181int interactive_loop(int fd_in, int fd_out, char *file1, char *file2); 198int interactive_loop(struct sftp_conn *, char *file1, char *file2);
182 199
183/* ARGSUSED */ 200/* ARGSUSED */
184static void 201static void
@@ -216,18 +233,18 @@ help(void)
216 "df [-hi] [path] Display statistics for current directory or\n" 233 "df [-hi] [path] Display statistics for current directory or\n"
217 " filesystem containing 'path'\n" 234 " filesystem containing 'path'\n"
218 "exit Quit sftp\n" 235 "exit Quit sftp\n"
219 "get [-P] remote-path [local-path] Download file\n" 236 "get [-Ppr] remote [local] Download file\n"
220 "help Display this help text\n" 237 "help Display this help text\n"
221 "lcd path Change local directory to 'path'\n" 238 "lcd path Change local directory to 'path'\n"
222 "lls [ls-options [path]] Display local directory listing\n" 239 "lls [ls-options [path]] Display local directory listing\n"
223 "lmkdir path Create local directory\n" 240 "lmkdir path Create local directory\n"
224 "ln oldpath newpath Symlink remote file\n" 241 "ln oldpath newpath Symlink remote file\n"
225 "lpwd Print local working directory\n" 242 "lpwd Print local working directory\n"
226 "ls [-1aflnrSt] [path] Display remote directory listing\n" 243 "ls [-1afhlnrSt] [path] Display remote directory listing\n"
227 "lumask umask Set local umask to 'umask'\n" 244 "lumask umask Set local umask to 'umask'\n"
228 "mkdir path Create remote directory\n" 245 "mkdir path Create remote directory\n"
229 "progress Toggle display of progress meter\n" 246 "progress Toggle display of progress meter\n"
230 "put [-P] local-path [remote-path] Upload file\n" 247 "put [-Ppr] local [remote] Upload file\n"
231 "pwd Display remote working directory\n" 248 "pwd Display remote working directory\n"
232 "quit Quit sftp\n" 249 "quit Quit sftp\n"
233 "rename oldpath newpath Rename remote file\n" 250 "rename oldpath newpath Rename remote file\n"
@@ -314,21 +331,6 @@ path_strip(char *path, char *strip)
314} 331}
315 332
316static char * 333static char *
317path_append(char *p1, char *p2)
318{
319 char *ret;
320 size_t len = strlen(p1) + strlen(p2) + 2;
321
322 ret = xmalloc(len);
323 strlcpy(ret, p1, len);
324 if (p1[0] != '\0' && p1[strlen(p1) - 1] != '/')
325 strlcat(ret, "/", len);
326 strlcat(ret, p2, len);
327
328 return(ret);
329}
330
331static char *
332make_absolute(char *p, char *pwd) 334make_absolute(char *p, char *pwd)
333{ 335{
334 char *abs_str; 336 char *abs_str;
@@ -343,27 +345,8 @@ make_absolute(char *p, char *pwd)
343} 345}
344 346
345static int 347static int
346infer_path(const char *p, char **ifp) 348parse_getput_flags(const char *cmd, char **argv, int argc, int *pflag,
347{ 349 int *rflag)
348 char *cp;
349
350 cp = strrchr(p, '/');
351 if (cp == NULL) {
352 *ifp = xstrdup(p);
353 return(0);
354 }
355
356 if (!cp[1]) {
357 error("Invalid path");
358 return(-1);
359 }
360
361 *ifp = xstrdup(cp + 1);
362 return(0);
363}
364
365static int
366parse_getput_flags(const char *cmd, char **argv, int argc, int *pflag)
367{ 350{
368 extern int opterr, optind, optopt, optreset; 351 extern int opterr, optind, optopt, optreset;
369 int ch; 352 int ch;
@@ -371,13 +354,17 @@ parse_getput_flags(const char *cmd, char **argv, int argc, int *pflag)
371 optind = optreset = 1; 354 optind = optreset = 1;
372 opterr = 0; 355 opterr = 0;
373 356
374 *pflag = 0; 357 *rflag = *pflag = 0;
375 while ((ch = getopt(argc, argv, "Pp")) != -1) { 358 while ((ch = getopt(argc, argv, "PpRr")) != -1) {
376 switch (ch) { 359 switch (ch) {
377 case 'p': 360 case 'p':
378 case 'P': 361 case 'P':
379 *pflag = 1; 362 *pflag = 1;
380 break; 363 break;
364 case 'r':
365 case 'R':
366 *rflag = 1;
367 break;
381 default: 368 default:
382 error("%s: Invalid flag -%c", cmd, optopt); 369 error("%s: Invalid flag -%c", cmd, optopt);
383 return -1; 370 return -1;
@@ -397,7 +384,7 @@ parse_ls_flags(char **argv, int argc, int *lflag)
397 opterr = 0; 384 opterr = 0;
398 385
399 *lflag = LS_NAME_SORT; 386 *lflag = LS_NAME_SORT;
400 while ((ch = getopt(argc, argv, "1Saflnrt")) != -1) { 387 while ((ch = getopt(argc, argv, "1Safhlnrt")) != -1) {
401 switch (ch) { 388 switch (ch) {
402 case '1': 389 case '1':
403 *lflag &= ~VIEW_FLAGS; 390 *lflag &= ~VIEW_FLAGS;
@@ -413,12 +400,15 @@ parse_ls_flags(char **argv, int argc, int *lflag)
413 case 'f': 400 case 'f':
414 *lflag &= ~SORT_FLAGS; 401 *lflag &= ~SORT_FLAGS;
415 break; 402 break;
403 case 'h':
404 *lflag |= LS_SI_UNITS;
405 break;
416 case 'l': 406 case 'l':
417 *lflag &= ~VIEW_FLAGS; 407 *lflag &= ~LS_SHORT_VIEW;
418 *lflag |= LS_LONG_VIEW; 408 *lflag |= LS_LONG_VIEW;
419 break; 409 break;
420 case 'n': 410 case 'n':
421 *lflag &= ~VIEW_FLAGS; 411 *lflag &= ~LS_SHORT_VIEW;
422 *lflag |= LS_NUMERIC_VIEW|LS_LONG_VIEW; 412 *lflag |= LS_NUMERIC_VIEW|LS_LONG_VIEW;
423 break; 413 break;
424 case 'r': 414 case 'r':
@@ -489,62 +479,79 @@ remote_is_dir(struct sftp_conn *conn, char *path)
489 return(S_ISDIR(a->perm)); 479 return(S_ISDIR(a->perm));
490} 480}
491 481
482/* Check whether path returned from glob(..., GLOB_MARK, ...) is a directory */
483static int
484pathname_is_dir(char *pathname)
485{
486 size_t l = strlen(pathname);
487
488 return l > 0 && pathname[l - 1] == '/';
489}
490
492static int 491static int
493process_get(struct sftp_conn *conn, char *src, char *dst, char *pwd, int pflag) 492process_get(struct sftp_conn *conn, char *src, char *dst, char *pwd,
493 int pflag, int rflag)
494{ 494{
495 char *abs_src = NULL; 495 char *abs_src = NULL;
496 char *abs_dst = NULL; 496 char *abs_dst = NULL;
497 char *tmp;
498 glob_t g; 497 glob_t g;
499 int err = 0; 498 char *filename, *tmp=NULL;
500 int i; 499 int i, err = 0;
501 500
502 abs_src = xstrdup(src); 501 abs_src = xstrdup(src);
503 abs_src = make_absolute(abs_src, pwd); 502 abs_src = make_absolute(abs_src, pwd);
504
505 memset(&g, 0, sizeof(g)); 503 memset(&g, 0, sizeof(g));
504
506 debug3("Looking up %s", abs_src); 505 debug3("Looking up %s", abs_src);
507 if (remote_glob(conn, abs_src, 0, NULL, &g)) { 506 if (remote_glob(conn, abs_src, GLOB_MARK, NULL, &g)) {
508 error("File \"%s\" not found.", abs_src); 507 error("File \"%s\" not found.", abs_src);
509 err = -1; 508 err = -1;
510 goto out; 509 goto out;
511 } 510 }
512 511
513 /* If multiple matches, dst must be a directory or unspecified */ 512 /*
514 if (g.gl_matchc > 1 && dst && !is_dir(dst)) { 513 * If multiple matches then dst must be a directory or
515 error("Multiple files match, but \"%s\" is not a directory", 514 * unspecified.
516 dst); 515 */
516 if (g.gl_matchc > 1 && dst != NULL && !is_dir(dst)) {
517 error("Multiple source paths, but destination "
518 "\"%s\" is not a directory", dst);
517 err = -1; 519 err = -1;
518 goto out; 520 goto out;
519 } 521 }
520 522
521 for (i = 0; g.gl_pathv[i] && !interrupted; i++) { 523 for (i = 0; g.gl_pathv[i] && !interrupted; i++) {
522 if (infer_path(g.gl_pathv[i], &tmp)) { 524 tmp = xstrdup(g.gl_pathv[i]);
525 if ((filename = basename(tmp)) == NULL) {
526 error("basename %s: %s", tmp, strerror(errno));
527 xfree(tmp);
523 err = -1; 528 err = -1;
524 goto out; 529 goto out;
525 } 530 }
526 531
527 if (g.gl_matchc == 1 && dst) { 532 if (g.gl_matchc == 1 && dst) {
528 /* If directory specified, append filename */
529 xfree(tmp);
530 if (is_dir(dst)) { 533 if (is_dir(dst)) {
531 if (infer_path(g.gl_pathv[0], &tmp)) { 534 abs_dst = path_append(dst, filename);
532 err = 1; 535 } else {
533 goto out;
534 }
535 abs_dst = path_append(dst, tmp);
536 xfree(tmp);
537 } else
538 abs_dst = xstrdup(dst); 536 abs_dst = xstrdup(dst);
537 }
539 } else if (dst) { 538 } else if (dst) {
540 abs_dst = path_append(dst, tmp); 539 abs_dst = path_append(dst, filename);
541 xfree(tmp); 540 } else {
542 } else 541 abs_dst = xstrdup(filename);
543 abs_dst = tmp; 542 }
543 xfree(tmp);
544 544
545 printf("Fetching %s to %s\n", g.gl_pathv[i], abs_dst); 545 printf("Fetching %s to %s\n", g.gl_pathv[i], abs_dst);
546 if (do_download(conn, g.gl_pathv[i], abs_dst, pflag) == -1) 546 if (pathname_is_dir(g.gl_pathv[i]) && (rflag || global_rflag)) {
547 err = -1; 547 if (download_dir(conn, g.gl_pathv[i], abs_dst, NULL,
548 pflag || global_pflag, 1) == -1)
549 err = -1;
550 } else {
551 if (do_download(conn, g.gl_pathv[i], abs_dst, NULL,
552 pflag || global_pflag) == -1)
553 err = -1;
554 }
548 xfree(abs_dst); 555 xfree(abs_dst);
549 abs_dst = NULL; 556 abs_dst = NULL;
550 } 557 }
@@ -556,14 +563,15 @@ out:
556} 563}
557 564
558static int 565static int
559process_put(struct sftp_conn *conn, char *src, char *dst, char *pwd, int pflag) 566process_put(struct sftp_conn *conn, char *src, char *dst, char *pwd,
567 int pflag, int rflag)
560{ 568{
561 char *tmp_dst = NULL; 569 char *tmp_dst = NULL;
562 char *abs_dst = NULL; 570 char *abs_dst = NULL;
563 char *tmp; 571 char *tmp = NULL, *filename = NULL;
564 glob_t g; 572 glob_t g;
565 int err = 0; 573 int err = 0;
566 int i; 574 int i, dst_is_dir = 1;
567 struct stat sb; 575 struct stat sb;
568 576
569 if (dst) { 577 if (dst) {
@@ -573,16 +581,20 @@ process_put(struct sftp_conn *conn, char *src, char *dst, char *pwd, int pflag)
573 581
574 memset(&g, 0, sizeof(g)); 582 memset(&g, 0, sizeof(g));
575 debug3("Looking up %s", src); 583 debug3("Looking up %s", src);
576 if (glob(src, GLOB_NOCHECK, NULL, &g)) { 584 if (glob(src, GLOB_NOCHECK | GLOB_MARK, NULL, &g)) {
577 error("File \"%s\" not found.", src); 585 error("File \"%s\" not found.", src);
578 err = -1; 586 err = -1;
579 goto out; 587 goto out;
580 } 588 }
581 589
590 /* If we aren't fetching to pwd then stash this status for later */
591 if (tmp_dst != NULL)
592 dst_is_dir = remote_is_dir(conn, tmp_dst);
593
582 /* If multiple matches, dst may be directory or unspecified */ 594 /* If multiple matches, dst may be directory or unspecified */
583 if (g.gl_matchc > 1 && tmp_dst && !remote_is_dir(conn, tmp_dst)) { 595 if (g.gl_matchc > 1 && tmp_dst && !dst_is_dir) {
584 error("Multiple files match, but \"%s\" is not a directory", 596 error("Multiple paths match, but destination "
585 tmp_dst); 597 "\"%s\" is not a directory", tmp_dst);
586 err = -1; 598 err = -1;
587 goto out; 599 goto out;
588 } 600 }
@@ -593,38 +605,38 @@ process_put(struct sftp_conn *conn, char *src, char *dst, char *pwd, int pflag)
593 error("stat %s: %s", g.gl_pathv[i], strerror(errno)); 605 error("stat %s: %s", g.gl_pathv[i], strerror(errno));
594 continue; 606 continue;
595 } 607 }
596 608
597 if (!S_ISREG(sb.st_mode)) { 609 tmp = xstrdup(g.gl_pathv[i]);
598 error("skipping non-regular file %s", 610 if ((filename = basename(tmp)) == NULL) {
599 g.gl_pathv[i]); 611 error("basename %s: %s", tmp, strerror(errno));
600 continue; 612 xfree(tmp);
601 }
602 if (infer_path(g.gl_pathv[i], &tmp)) {
603 err = -1; 613 err = -1;
604 goto out; 614 goto out;
605 } 615 }
606 616
607 if (g.gl_matchc == 1 && tmp_dst) { 617 if (g.gl_matchc == 1 && tmp_dst) {
608 /* If directory specified, append filename */ 618 /* If directory specified, append filename */
609 if (remote_is_dir(conn, tmp_dst)) { 619 if (dst_is_dir)
610 if (infer_path(g.gl_pathv[0], &tmp)) { 620 abs_dst = path_append(tmp_dst, filename);
611 err = 1; 621 else
612 goto out;
613 }
614 abs_dst = path_append(tmp_dst, tmp);
615 xfree(tmp);
616 } else
617 abs_dst = xstrdup(tmp_dst); 622 abs_dst = xstrdup(tmp_dst);
618
619 } else if (tmp_dst) { 623 } else if (tmp_dst) {
620 abs_dst = path_append(tmp_dst, tmp); 624 abs_dst = path_append(tmp_dst, filename);
621 xfree(tmp); 625 } else {
622 } else 626 abs_dst = make_absolute(xstrdup(filename), pwd);
623 abs_dst = make_absolute(tmp, pwd); 627 }
628 xfree(tmp);
624 629
625 printf("Uploading %s to %s\n", g.gl_pathv[i], abs_dst); 630 printf("Uploading %s to %s\n", g.gl_pathv[i], abs_dst);
626 if (do_upload(conn, g.gl_pathv[i], abs_dst, pflag) == -1) 631 if (pathname_is_dir(g.gl_pathv[i]) && (rflag || global_rflag)) {
627 err = -1; 632 if (upload_dir(conn, g.gl_pathv[i], abs_dst,
633 pflag || global_pflag, 1) == -1)
634 err = -1;
635 } else {
636 if (do_upload(conn, g.gl_pathv[i], abs_dst,
637 pflag || global_pflag) == -1)
638 err = -1;
639 }
628 } 640 }
629 641
630out: 642out:
@@ -708,13 +720,14 @@ do_ls_dir(struct sftp_conn *conn, char *path, char *strip_path, int lflag)
708 xfree(tmp); 720 xfree(tmp);
709 721
710 if (lflag & LS_LONG_VIEW) { 722 if (lflag & LS_LONG_VIEW) {
711 if (lflag & LS_NUMERIC_VIEW) { 723 if (lflag & (LS_NUMERIC_VIEW|LS_SI_UNITS)) {
712 char *lname; 724 char *lname;
713 struct stat sb; 725 struct stat sb;
714 726
715 memset(&sb, 0, sizeof(sb)); 727 memset(&sb, 0, sizeof(sb));
716 attrib_to_stat(&d[n]->a, &sb); 728 attrib_to_stat(&d[n]->a, &sb);
717 lname = ls_file(fname, &sb, 1); 729 lname = ls_file(fname, &sb, 1,
730 (lflag & LS_SI_UNITS));
718 printf("%s\n", lname); 731 printf("%s\n", lname);
719 xfree(lname); 732 xfree(lname);
720 } else 733 } else
@@ -816,7 +829,7 @@ do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path,
816 a = do_lstat(conn, g.gl_pathv[i], 1); 829 a = do_lstat(conn, g.gl_pathv[i], 1);
817 if (a != NULL) 830 if (a != NULL)
818 attrib_to_stat(a, &sb); 831 attrib_to_stat(a, &sb);
819 lname = ls_file(fname, &sb, 1); 832 lname = ls_file(fname, &sb, 1, (lflag & LS_SI_UNITS));
820 printf("%s\n", lname); 833 printf("%s\n", lname);
821 xfree(lname); 834 xfree(lname);
822 } else { 835 } else {
@@ -848,19 +861,19 @@ do_df(struct sftp_conn *conn, char *path, int hflag, int iflag)
848 char s_avail[FMT_SCALED_STRSIZE]; 861 char s_avail[FMT_SCALED_STRSIZE];
849 char s_root[FMT_SCALED_STRSIZE]; 862 char s_root[FMT_SCALED_STRSIZE];
850 char s_total[FMT_SCALED_STRSIZE]; 863 char s_total[FMT_SCALED_STRSIZE];
864 unsigned long long ffree;
851 865
852 if (do_statvfs(conn, path, &st, 1) == -1) 866 if (do_statvfs(conn, path, &st, 1) == -1)
853 return -1; 867 return -1;
854 if (iflag) { 868 if (iflag) {
869 ffree = st.f_files ? (100 * (st.f_files - st.f_ffree) / st.f_files) : 0;
855 printf(" Inodes Used Avail " 870 printf(" Inodes Used Avail "
856 "(root) %%Capacity\n"); 871 "(root) %%Capacity\n");
857 printf("%11llu %11llu %11llu %11llu %3llu%%\n", 872 printf("%11llu %11llu %11llu %11llu %3llu%%\n",
858 (unsigned long long)st.f_files, 873 (unsigned long long)st.f_files,
859 (unsigned long long)(st.f_files - st.f_ffree), 874 (unsigned long long)(st.f_files - st.f_ffree),
860 (unsigned long long)st.f_favail, 875 (unsigned long long)st.f_favail,
861 (unsigned long long)st.f_ffree, 876 (unsigned long long)st.f_ffree, ffree);
862 (unsigned long long)(100 * (st.f_files - st.f_ffree) /
863 st.f_files));
864 } else if (hflag) { 877 } else if (hflag) {
865 strlcpy(s_used, "error", sizeof(s_used)); 878 strlcpy(s_used, "error", sizeof(s_used));
866 strlcpy(s_avail, "error", sizeof(s_avail)); 879 strlcpy(s_avail, "error", sizeof(s_avail));
@@ -934,12 +947,23 @@ undo_glob_escape(char *s)
934 * Split a string into an argument vector using sh(1)-style quoting, 947 * Split a string into an argument vector using sh(1)-style quoting,
935 * comment and escaping rules, but with some tweaks to handle glob(3) 948 * comment and escaping rules, but with some tweaks to handle glob(3)
936 * wildcards. 949 * wildcards.
950 * The "sloppy" flag allows for recovery from missing terminating quote, for
951 * use in parsing incomplete commandlines during tab autocompletion.
952 *
937 * Returns NULL on error or a NULL-terminated array of arguments. 953 * Returns NULL on error or a NULL-terminated array of arguments.
954 *
955 * If "lastquote" is not NULL, the quoting character used for the last
956 * argument is placed in *lastquote ("\0", "'" or "\"").
957 *
958 * If "terminated" is not NULL, *terminated will be set to 1 when the
959 * last argument's quote has been properly terminated or 0 otherwise.
960 * This parameter is only of use if "sloppy" is set.
938 */ 961 */
939#define MAXARGS 128 962#define MAXARGS 128
940#define MAXARGLEN 8192 963#define MAXARGLEN 8192
941static char ** 964static char **
942makeargv(const char *arg, int *argcp) 965makeargv(const char *arg, int *argcp, int sloppy, char *lastquote,
966 u_int *terminated)
943{ 967{
944 int argc, quot; 968 int argc, quot;
945 size_t i, j; 969 size_t i, j;
@@ -953,6 +977,10 @@ makeargv(const char *arg, int *argcp)
953 error("string too long"); 977 error("string too long");
954 return NULL; 978 return NULL;
955 } 979 }
980 if (terminated != NULL)
981 *terminated = 1;
982 if (lastquote != NULL)
983 *lastquote = '\0';
956 state = MA_START; 984 state = MA_START;
957 i = j = 0; 985 i = j = 0;
958 for (;;) { 986 for (;;) {
@@ -969,6 +997,8 @@ makeargv(const char *arg, int *argcp)
969 if (state == MA_START) { 997 if (state == MA_START) {
970 argv[argc] = argvs + j; 998 argv[argc] = argvs + j;
971 state = q; 999 state = q;
1000 if (lastquote != NULL)
1001 *lastquote = arg[i];
972 } else if (state == MA_UNQUOTED) 1002 } else if (state == MA_UNQUOTED)
973 state = q; 1003 state = q;
974 else if (state == q) 1004 else if (state == q)
@@ -1005,6 +1035,8 @@ makeargv(const char *arg, int *argcp)
1005 if (state == MA_START) { 1035 if (state == MA_START) {
1006 argv[argc] = argvs + j; 1036 argv[argc] = argvs + j;
1007 state = MA_UNQUOTED; 1037 state = MA_UNQUOTED;
1038 if (lastquote != NULL)
1039 *lastquote = '\0';
1008 } 1040 }
1009 if (arg[i + 1] == '?' || arg[i + 1] == '[' || 1041 if (arg[i + 1] == '?' || arg[i + 1] == '[' ||
1010 arg[i + 1] == '*' || arg[i + 1] == '\\') { 1042 arg[i + 1] == '*' || arg[i + 1] == '\\') {
@@ -1030,6 +1062,12 @@ makeargv(const char *arg, int *argcp)
1030 goto string_done; 1062 goto string_done;
1031 } else if (arg[i] == '\0') { 1063 } else if (arg[i] == '\0') {
1032 if (state == MA_SQUOTE || state == MA_DQUOTE) { 1064 if (state == MA_SQUOTE || state == MA_DQUOTE) {
1065 if (sloppy) {
1066 state = MA_UNQUOTED;
1067 if (terminated != NULL)
1068 *terminated = 0;
1069 goto string_done;
1070 }
1033 error("Unterminated quoted argument"); 1071 error("Unterminated quoted argument");
1034 return NULL; 1072 return NULL;
1035 } 1073 }
@@ -1043,6 +1081,8 @@ makeargv(const char *arg, int *argcp)
1043 if (state == MA_START) { 1081 if (state == MA_START) {
1044 argv[argc] = argvs + j; 1082 argv[argc] = argvs + j;
1045 state = MA_UNQUOTED; 1083 state = MA_UNQUOTED;
1084 if (lastquote != NULL)
1085 *lastquote = '\0';
1046 } 1086 }
1047 if ((state == MA_SQUOTE || state == MA_DQUOTE) && 1087 if ((state == MA_SQUOTE || state == MA_DQUOTE) &&
1048 (arg[i] == '?' || arg[i] == '[' || arg[i] == '*')) { 1088 (arg[i] == '?' || arg[i] == '[' || arg[i] == '*')) {
@@ -1065,8 +1105,8 @@ makeargv(const char *arg, int *argcp)
1065} 1105}
1066 1106
1067static int 1107static int
1068parse_args(const char **cpp, int *pflag, int *lflag, int *iflag, int *hflag, 1108parse_args(const char **cpp, int *pflag, int *rflag, int *lflag, int *iflag,
1069 unsigned long *n_arg, char **path1, char **path2) 1109 int *hflag, unsigned long *n_arg, char **path1, char **path2)
1070{ 1110{
1071 const char *cmd, *cp = *cpp; 1111 const char *cmd, *cp = *cpp;
1072 char *cp2, **argv; 1112 char *cp2, **argv;
@@ -1077,18 +1117,19 @@ parse_args(const char **cpp, int *pflag, int *lflag, int *iflag, int *hflag,
1077 /* Skip leading whitespace */ 1117 /* Skip leading whitespace */
1078 cp = cp + strspn(cp, WHITESPACE); 1118 cp = cp + strspn(cp, WHITESPACE);
1079 1119
1080 /* Ignore blank lines and lines which begin with comment '#' char */
1081 if (*cp == '\0' || *cp == '#')
1082 return (0);
1083
1084 /* Check for leading '-' (disable error processing) */ 1120 /* Check for leading '-' (disable error processing) */
1085 *iflag = 0; 1121 *iflag = 0;
1086 if (*cp == '-') { 1122 if (*cp == '-') {
1087 *iflag = 1; 1123 *iflag = 1;
1088 cp++; 1124 cp++;
1125 cp = cp + strspn(cp, WHITESPACE);
1089 } 1126 }
1090 1127
1091 if ((argv = makeargv(cp, &argc)) == NULL) 1128 /* Ignore blank lines and lines which begin with comment '#' char */
1129 if (*cp == '\0' || *cp == '#')
1130 return (0);
1131
1132 if ((argv = makeargv(cp, &argc, 0, NULL, NULL)) == NULL)
1092 return -1; 1133 return -1;
1093 1134
1094 /* Figure out which command we have */ 1135 /* Figure out which command we have */
@@ -1109,13 +1150,13 @@ parse_args(const char **cpp, int *pflag, int *lflag, int *iflag, int *hflag,
1109 } 1150 }
1110 1151
1111 /* Get arguments and parse flags */ 1152 /* Get arguments and parse flags */
1112 *lflag = *pflag = *hflag = *n_arg = 0; 1153 *lflag = *pflag = *rflag = *hflag = *n_arg = 0;
1113 *path1 = *path2 = NULL; 1154 *path1 = *path2 = NULL;
1114 optidx = 1; 1155 optidx = 1;
1115 switch (cmdnum) { 1156 switch (cmdnum) {
1116 case I_GET: 1157 case I_GET:
1117 case I_PUT: 1158 case I_PUT:
1118 if ((optidx = parse_getput_flags(cmd, argv, argc, pflag)) == -1) 1159 if ((optidx = parse_getput_flags(cmd, argv, argc, pflag, rflag)) == -1)
1119 return -1; 1160 return -1;
1120 /* Get first pathname (mandatory) */ 1161 /* Get first pathname (mandatory) */
1121 if (argc - optidx < 1) { 1162 if (argc - optidx < 1) {
@@ -1235,7 +1276,7 @@ parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd,
1235 int err_abort) 1276 int err_abort)
1236{ 1277{
1237 char *path1, *path2, *tmp; 1278 char *path1, *path2, *tmp;
1238 int pflag = 0, lflag = 0, iflag = 0, hflag = 0, cmdnum, i; 1279 int pflag = 0, rflag = 0, lflag = 0, iflag = 0, hflag = 0, cmdnum, i;
1239 unsigned long n_arg = 0; 1280 unsigned long n_arg = 0;
1240 Attrib a, *aa; 1281 Attrib a, *aa;
1241 char path_buf[MAXPATHLEN]; 1282 char path_buf[MAXPATHLEN];
@@ -1243,7 +1284,7 @@ parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd,
1243 glob_t g; 1284 glob_t g;
1244 1285
1245 path1 = path2 = NULL; 1286 path1 = path2 = NULL;
1246 cmdnum = parse_args(&cmd, &pflag, &lflag, &iflag, &hflag, &n_arg, 1287 cmdnum = parse_args(&cmd, &pflag, &rflag, &lflag, &iflag, &hflag, &n_arg,
1247 &path1, &path2); 1288 &path1, &path2);
1248 1289
1249 if (iflag != 0) 1290 if (iflag != 0)
@@ -1261,10 +1302,10 @@ parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd,
1261 err = -1; 1302 err = -1;
1262 break; 1303 break;
1263 case I_GET: 1304 case I_GET:
1264 err = process_get(conn, path1, path2, *pwd, pflag); 1305 err = process_get(conn, path1, path2, *pwd, pflag, rflag);
1265 break; 1306 break;
1266 case I_PUT: 1307 case I_PUT:
1267 err = process_put(conn, path1, path2, *pwd, pflag); 1308 err = process_put(conn, path1, path2, *pwd, pflag, rflag);
1268 break; 1309 break;
1269 case I_RENAME: 1310 case I_RENAME:
1270 path1 = make_absolute(path1, *pwd); 1311 path1 = make_absolute(path1, *pwd);
@@ -1290,7 +1331,7 @@ parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd,
1290 attrib_clear(&a); 1331 attrib_clear(&a);
1291 a.flags |= SSH2_FILEXFER_ATTR_PERMISSIONS; 1332 a.flags |= SSH2_FILEXFER_ATTR_PERMISSIONS;
1292 a.perm = 0777; 1333 a.perm = 0777;
1293 err = do_mkdir(conn, path1, &a); 1334 err = do_mkdir(conn, path1, &a, 1);
1294 break; 1335 break;
1295 case I_RMDIR: 1336 case I_RMDIR:
1296 path1 = make_absolute(path1, *pwd); 1337 path1 = make_absolute(path1, *pwd);
@@ -1468,21 +1509,352 @@ prompt(EditLine *el)
1468{ 1509{
1469 return ("sftp> "); 1510 return ("sftp> ");
1470} 1511}
1471#endif 1512
1513/* Display entries in 'list' after skipping the first 'len' chars */
1514static void
1515complete_display(char **list, u_int len)
1516{
1517 u_int y, m = 0, width = 80, columns = 1, colspace = 0, llen;
1518 struct winsize ws;
1519 char *tmp;
1520
1521 /* Count entries for sort and find longest */
1522 for (y = 0; list[y]; y++)
1523 m = MAX(m, strlen(list[y]));
1524
1525 if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) != -1)
1526 width = ws.ws_col;
1527
1528 m = m > len ? m - len : 0;
1529 columns = width / (m + 2);
1530 columns = MAX(columns, 1);
1531 colspace = width / columns;
1532 colspace = MIN(colspace, width);
1533
1534 printf("\n");
1535 m = 1;
1536 for (y = 0; list[y]; y++) {
1537 llen = strlen(list[y]);
1538 tmp = llen > len ? list[y] + len : "";
1539 printf("%-*s", colspace, tmp);
1540 if (m >= columns) {
1541 printf("\n");
1542 m = 1;
1543 } else
1544 m++;
1545 }
1546 printf("\n");
1547}
1548
1549/*
1550 * Given a "list" of words that begin with a common prefix of "word",
1551 * attempt to find an autocompletion to extends "word" by the next
1552 * characters common to all entries in "list".
1553 */
1554static char *
1555complete_ambiguous(const char *word, char **list, size_t count)
1556{
1557 if (word == NULL)
1558 return NULL;
1559
1560 if (count > 0) {
1561 u_int y, matchlen = strlen(list[0]);
1562
1563 /* Find length of common stem */
1564 for (y = 1; list[y]; y++) {
1565 u_int x;
1566
1567 for (x = 0; x < matchlen; x++)
1568 if (list[0][x] != list[y][x])
1569 break;
1570
1571 matchlen = x;
1572 }
1573
1574 if (matchlen > strlen(word)) {
1575 char *tmp = xstrdup(list[0]);
1576
1577 tmp[matchlen] = '\0';
1578 return tmp;
1579 }
1580 }
1581
1582 return xstrdup(word);
1583}
1584
1585/* Autocomplete a sftp command */
1586static int
1587complete_cmd_parse(EditLine *el, char *cmd, int lastarg, char quote,
1588 int terminated)
1589{
1590 u_int y, count = 0, cmdlen, tmplen;
1591 char *tmp, **list, argterm[3];
1592 const LineInfo *lf;
1593
1594 list = xcalloc((sizeof(cmds) / sizeof(*cmds)) + 1, sizeof(char *));
1595
1596 /* No command specified: display all available commands */
1597 if (cmd == NULL) {
1598 for (y = 0; cmds[y].c; y++)
1599 list[count++] = xstrdup(cmds[y].c);
1600
1601 list[count] = NULL;
1602 complete_display(list, 0);
1603
1604 for (y = 0; list[y] != NULL; y++)
1605 xfree(list[y]);
1606 xfree(list);
1607 return count;
1608 }
1609
1610 /* Prepare subset of commands that start with "cmd" */
1611 cmdlen = strlen(cmd);
1612 for (y = 0; cmds[y].c; y++) {
1613 if (!strncasecmp(cmd, cmds[y].c, cmdlen))
1614 list[count++] = xstrdup(cmds[y].c);
1615 }
1616 list[count] = NULL;
1617
1618 if (count == 0)
1619 return 0;
1620
1621 /* Complete ambigious command */
1622 tmp = complete_ambiguous(cmd, list, count);
1623 if (count > 1)
1624 complete_display(list, 0);
1625
1626 for (y = 0; list[y]; y++)
1627 xfree(list[y]);
1628 xfree(list);
1629
1630 if (tmp != NULL) {
1631 tmplen = strlen(tmp);
1632 cmdlen = strlen(cmd);
1633 /* If cmd may be extended then do so */
1634 if (tmplen > cmdlen)
1635 if (el_insertstr(el, tmp + cmdlen) == -1)
1636 fatal("el_insertstr failed.");
1637 lf = el_line(el);
1638 /* Terminate argument cleanly */
1639 if (count == 1) {
1640 y = 0;
1641 if (!terminated)
1642 argterm[y++] = quote;
1643 if (lastarg || *(lf->cursor) != ' ')
1644 argterm[y++] = ' ';
1645 argterm[y] = '\0';
1646 if (y > 0 && el_insertstr(el, argterm) == -1)
1647 fatal("el_insertstr failed.");
1648 }
1649 xfree(tmp);
1650 }
1651
1652 return count;
1653}
1654
1655/*
1656 * Determine whether a particular sftp command's arguments (if any)
1657 * represent local or remote files.
1658 */
1659static int
1660complete_is_remote(char *cmd) {
1661 int i;
1662
1663 if (cmd == NULL)
1664 return -1;
1665
1666 for (i = 0; cmds[i].c; i++) {
1667 if (!strncasecmp(cmd, cmds[i].c, strlen(cmds[i].c)))
1668 return cmds[i].t;
1669 }
1670
1671 return -1;
1672}
1673
1674/* Autocomplete a filename "file" */
1675static int
1676complete_match(EditLine *el, struct sftp_conn *conn, char *remote_path,
1677 char *file, int remote, int lastarg, char quote, int terminated)
1678{
1679 glob_t g;
1680 char *tmp, *tmp2, ins[3];
1681 u_int i, hadglob, pwdlen, len, tmplen, filelen;
1682 const LineInfo *lf;
1683
1684 /* Glob from "file" location */
1685 if (file == NULL)
1686 tmp = xstrdup("*");
1687 else
1688 xasprintf(&tmp, "%s*", file);
1689
1690 memset(&g, 0, sizeof(g));
1691 if (remote != LOCAL) {
1692 tmp = make_absolute(tmp, remote_path);
1693 remote_glob(conn, tmp, GLOB_DOOFFS|GLOB_MARK, NULL, &g);
1694 } else
1695 glob(tmp, GLOB_DOOFFS|GLOB_MARK, NULL, &g);
1696
1697 /* Determine length of pwd so we can trim completion display */
1698 for (hadglob = tmplen = pwdlen = 0; tmp[tmplen] != 0; tmplen++) {
1699 /* Terminate counting on first unescaped glob metacharacter */
1700 if (tmp[tmplen] == '*' || tmp[tmplen] == '?') {
1701 if (tmp[tmplen] != '*' || tmp[tmplen + 1] != '\0')
1702 hadglob = 1;
1703 break;
1704 }
1705 if (tmp[tmplen] == '\\' && tmp[tmplen + 1] != '\0')
1706 tmplen++;
1707 if (tmp[tmplen] == '/')
1708 pwdlen = tmplen + 1; /* track last seen '/' */
1709 }
1710 xfree(tmp);
1711
1712 if (g.gl_matchc == 0)
1713 goto out;
1714
1715 if (g.gl_matchc > 1)
1716 complete_display(g.gl_pathv, pwdlen);
1717
1718 tmp = NULL;
1719 /* Don't try to extend globs */
1720 if (file == NULL || hadglob)
1721 goto out;
1722
1723 tmp2 = complete_ambiguous(file, g.gl_pathv, g.gl_matchc);
1724 tmp = path_strip(tmp2, remote_path);
1725 xfree(tmp2);
1726
1727 if (tmp == NULL)
1728 goto out;
1729
1730 tmplen = strlen(tmp);
1731 filelen = strlen(file);
1732
1733 if (tmplen > filelen) {
1734 tmp2 = tmp + filelen;
1735 len = strlen(tmp2);
1736 /* quote argument on way out */
1737 for (i = 0; i < len; i++) {
1738 ins[0] = '\\';
1739 ins[1] = tmp2[i];
1740 ins[2] = '\0';
1741 switch (tmp2[i]) {
1742 case '\'':
1743 case '"':
1744 case '\\':
1745 case '\t':
1746 case ' ':
1747 if (quote == '\0' || tmp2[i] == quote) {
1748 if (el_insertstr(el, ins) == -1)
1749 fatal("el_insertstr "
1750 "failed.");
1751 break;
1752 }
1753 /* FALLTHROUGH */
1754 default:
1755 if (el_insertstr(el, ins + 1) == -1)
1756 fatal("el_insertstr failed.");
1757 break;
1758 }
1759 }
1760 }
1761
1762 lf = el_line(el);
1763 if (g.gl_matchc == 1) {
1764 i = 0;
1765 if (!terminated)
1766 ins[i++] = quote;
1767 if (*(lf->cursor - 1) != '/' &&
1768 (lastarg || *(lf->cursor) != ' '))
1769 ins[i++] = ' ';
1770 ins[i] = '\0';
1771 if (i > 0 && el_insertstr(el, ins) == -1)
1772 fatal("el_insertstr failed.");
1773 }
1774 xfree(tmp);
1775
1776 out:
1777 globfree(&g);
1778 return g.gl_matchc;
1779}
1780
1781/* tab-completion hook function, called via libedit */
1782static unsigned char
1783complete(EditLine *el, int ch)
1784{
1785 char **argv, *line, quote;
1786 u_int argc, carg, cursor, len, terminated, ret = CC_ERROR;
1787 const LineInfo *lf;
1788 struct complete_ctx *complete_ctx;
1789
1790 lf = el_line(el);
1791 if (el_get(el, EL_CLIENTDATA, (void**)&complete_ctx) != 0)
1792 fatal("%s: el_get failed", __func__);
1793
1794 /* Figure out which argument the cursor points to */
1795 cursor = lf->cursor - lf->buffer;
1796 line = (char *)xmalloc(cursor + 1);
1797 memcpy(line, lf->buffer, cursor);
1798 line[cursor] = '\0';
1799 argv = makeargv(line, &carg, 1, &quote, &terminated);
1800 xfree(line);
1801
1802 /* Get all the arguments on the line */
1803 len = lf->lastchar - lf->buffer;
1804 line = (char *)xmalloc(len + 1);
1805 memcpy(line, lf->buffer, len);
1806 line[len] = '\0';
1807 argv = makeargv(line, &argc, 1, NULL, NULL);
1808
1809 /* Ensure cursor is at EOL or a argument boundary */
1810 if (line[cursor] != ' ' && line[cursor] != '\0' &&
1811 line[cursor] != '\n') {
1812 xfree(line);
1813 return ret;
1814 }
1815
1816 if (carg == 0) {
1817 /* Show all available commands */
1818 complete_cmd_parse(el, NULL, argc == carg, '\0', 1);
1819 ret = CC_REDISPLAY;
1820 } else if (carg == 1 && cursor > 0 && line[cursor - 1] != ' ') {
1821 /* Handle the command parsing */
1822 if (complete_cmd_parse(el, argv[0], argc == carg,
1823 quote, terminated) != 0)
1824 ret = CC_REDISPLAY;
1825 } else if (carg >= 1) {
1826 /* Handle file parsing */
1827 int remote = complete_is_remote(argv[0]);
1828 char *filematch = NULL;
1829
1830 if (carg > 1 && line[cursor-1] != ' ')
1831 filematch = argv[carg - 1];
1832
1833 if (remote != 0 &&
1834 complete_match(el, complete_ctx->conn,
1835 *complete_ctx->remote_pathp, filematch,
1836 remote, carg == argc, quote, terminated) != 0)
1837 ret = CC_REDISPLAY;
1838 }
1839
1840 xfree(line);
1841 return ret;
1842}
1843#endif /* USE_LIBEDIT */
1472 1844
1473int 1845int
1474interactive_loop(int fd_in, int fd_out, char *file1, char *file2) 1846interactive_loop(struct sftp_conn *conn, char *file1, char *file2)
1475{ 1847{
1476 char *pwd; 1848 char *remote_path;
1477 char *dir = NULL; 1849 char *dir = NULL;
1478 char cmd[2048]; 1850 char cmd[2048];
1479 struct sftp_conn *conn;
1480 int err, interactive; 1851 int err, interactive;
1481 EditLine *el = NULL; 1852 EditLine *el = NULL;
1482#ifdef USE_LIBEDIT 1853#ifdef USE_LIBEDIT
1483 History *hl = NULL; 1854 History *hl = NULL;
1484 HistEvent hev; 1855 HistEvent hev;
1485 extern char *__progname; 1856 extern char *__progname;
1857 struct complete_ctx complete_ctx;
1486 1858
1487 if (!batchmode && isatty(STDIN_FILENO)) { 1859 if (!batchmode && isatty(STDIN_FILENO)) {
1488 if ((el = el_init(__progname, stdin, stdout, stderr)) == NULL) 1860 if ((el = el_init(__progname, stdin, stdout, stderr)) == NULL)
@@ -1497,27 +1869,32 @@ interactive_loop(int fd_in, int fd_out, char *file1, char *file2)
1497 el_set(el, EL_TERMINAL, NULL); 1869 el_set(el, EL_TERMINAL, NULL);
1498 el_set(el, EL_SIGNAL, 1); 1870 el_set(el, EL_SIGNAL, 1);
1499 el_source(el, NULL); 1871 el_source(el, NULL);
1872
1873 /* Tab Completion */
1874 el_set(el, EL_ADDFN, "ftp-complete",
1875 "Context senstive argument completion", complete);
1876 complete_ctx.conn = conn;
1877 complete_ctx.remote_pathp = &remote_path;
1878 el_set(el, EL_CLIENTDATA, (void*)&complete_ctx);
1879 el_set(el, EL_BIND, "^I", "ftp-complete", NULL);
1500 } 1880 }
1501#endif /* USE_LIBEDIT */ 1881#endif /* USE_LIBEDIT */
1502 1882
1503 conn = do_init(fd_in, fd_out, copy_buffer_len, num_requests); 1883 remote_path = do_realpath(conn, ".");
1504 if (conn == NULL) 1884 if (remote_path == NULL)
1505 fatal("Couldn't initialise connection to server");
1506
1507 pwd = do_realpath(conn, ".");
1508 if (pwd == NULL)
1509 fatal("Need cwd"); 1885 fatal("Need cwd");
1510 1886
1511 if (file1 != NULL) { 1887 if (file1 != NULL) {
1512 dir = xstrdup(file1); 1888 dir = xstrdup(file1);
1513 dir = make_absolute(dir, pwd); 1889 dir = make_absolute(dir, remote_path);
1514 1890
1515 if (remote_is_dir(conn, dir) && file2 == NULL) { 1891 if (remote_is_dir(conn, dir) && file2 == NULL) {
1516 printf("Changing to: %s\n", dir); 1892 printf("Changing to: %s\n", dir);
1517 snprintf(cmd, sizeof cmd, "cd \"%s\"", dir); 1893 snprintf(cmd, sizeof cmd, "cd \"%s\"", dir);
1518 if (parse_dispatch_command(conn, cmd, &pwd, 1) != 0) { 1894 if (parse_dispatch_command(conn, cmd,
1895 &remote_path, 1) != 0) {
1519 xfree(dir); 1896 xfree(dir);
1520 xfree(pwd); 1897 xfree(remote_path);
1521 xfree(conn); 1898 xfree(conn);
1522 return (-1); 1899 return (-1);
1523 } 1900 }
@@ -1528,9 +1905,10 @@ interactive_loop(int fd_in, int fd_out, char *file1, char *file2)
1528 snprintf(cmd, sizeof cmd, "get %s %s", dir, 1905 snprintf(cmd, sizeof cmd, "get %s %s", dir,
1529 file2); 1906 file2);
1530 1907
1531 err = parse_dispatch_command(conn, cmd, &pwd, 1); 1908 err = parse_dispatch_command(conn, cmd,
1909 &remote_path, 1);
1532 xfree(dir); 1910 xfree(dir);
1533 xfree(pwd); 1911 xfree(remote_path);
1534 xfree(conn); 1912 xfree(conn);
1535 return (err); 1913 return (err);
1536 } 1914 }
@@ -1571,7 +1949,8 @@ interactive_loop(int fd_in, int fd_out, char *file1, char *file2)
1571 const char *line; 1949 const char *line;
1572 int count = 0; 1950 int count = 0;
1573 1951
1574 if ((line = el_gets(el, &count)) == NULL || count <= 0) { 1952 if ((line = el_gets(el, &count)) == NULL ||
1953 count <= 0) {
1575 printf("\n"); 1954 printf("\n");
1576 break; 1955 break;
1577 } 1956 }
@@ -1591,11 +1970,12 @@ interactive_loop(int fd_in, int fd_out, char *file1, char *file2)
1591 interrupted = 0; 1970 interrupted = 0;
1592 signal(SIGINT, cmd_interrupt); 1971 signal(SIGINT, cmd_interrupt);
1593 1972
1594 err = parse_dispatch_command(conn, cmd, &pwd, batchmode); 1973 err = parse_dispatch_command(conn, cmd, &remote_path,
1974 batchmode);
1595 if (err != 0) 1975 if (err != 0)
1596 break; 1976 break;
1597 } 1977 }
1598 xfree(pwd); 1978 xfree(remote_path);
1599 xfree(conn); 1979 xfree(conn);
1600 1980
1601#ifdef USE_LIBEDIT 1981#ifdef USE_LIBEDIT
@@ -1647,9 +2027,11 @@ connect_to_server(char *path, char **args, int *in, int *out)
1647 * The underlying ssh is in the same process group, so we must 2027 * The underlying ssh is in the same process group, so we must
1648 * ignore SIGINT if we want to gracefully abort commands, 2028 * ignore SIGINT if we want to gracefully abort commands,
1649 * otherwise the signal will make it to the ssh process and 2029 * otherwise the signal will make it to the ssh process and
1650 * kill it too 2030 * kill it too. Contrawise, since sftp sends SIGTERMs to the
2031 * underlying ssh, it must *not* ignore that signal.
1651 */ 2032 */
1652 signal(SIGINT, SIG_IGN); 2033 signal(SIGINT, SIG_IGN);
2034 signal(SIGTERM, SIG_DFL);
1653 execvp(path, args); 2035 execvp(path, args);
1654 fprintf(stderr, "exec: %s: %s\n", path, strerror(errno)); 2036 fprintf(stderr, "exec: %s: %s\n", path, strerror(errno));
1655 _exit(1); 2037 _exit(1);
@@ -1668,12 +2050,16 @@ usage(void)
1668 extern char *__progname; 2050 extern char *__progname;
1669 2051
1670 fprintf(stderr, 2052 fprintf(stderr,
1671 "usage: %s [-1Cv] [-B buffer_size] [-b batchfile] [-F ssh_config]\n" 2053 "usage: %s [-1246Cpqrv] [-B buffer_size] [-b batchfile] [-c cipher]\n"
1672 " [-o ssh_option] [-P sftp_server_path] [-R num_requests]\n" 2054 " [-D sftp_server_path] [-F ssh_config] "
1673 " [-S program] [-s subsystem | sftp_server] host\n" 2055 "[-i identity_file]\n"
2056 " [-o ssh_option] [-P port] [-R num_requests] "
2057 "[-S program]\n"
2058 " [-s subsystem | sftp_server] host\n"
1674 " %s [user@]host[:file ...]\n" 2059 " %s [user@]host[:file ...]\n"
1675 " %s [user@]host[:dir[/]]\n" 2060 " %s [user@]host[:dir[/]]\n"
1676 " %s -b batchfile [user@]host\n", __progname, __progname, __progname, __progname); 2061 " %s -b batchfile [user@]host\n",
2062 __progname, __progname, __progname, __progname);
1677 exit(1); 2063 exit(1);
1678} 2064}
1679 2065
@@ -1681,7 +2067,7 @@ int
1681main(int argc, char **argv) 2067main(int argc, char **argv)
1682{ 2068{
1683 int in, out, ch, err; 2069 int in, out, ch, err;
1684 char *host, *userhost, *cp, *file2 = NULL; 2070 char *host = NULL, *userhost, *cp, *file2 = NULL;
1685 int debug_level = 0, sshver = 2; 2071 int debug_level = 0, sshver = 2;
1686 char *file1 = NULL, *sftp_server = NULL; 2072 char *file1 = NULL, *sftp_server = NULL;
1687 char *ssh_program = _PATH_SSH_PROGRAM, *sftp_direct = NULL; 2073 char *ssh_program = _PATH_SSH_PROGRAM, *sftp_direct = NULL;
@@ -1689,6 +2075,9 @@ main(int argc, char **argv)
1689 arglist args; 2075 arglist args;
1690 extern int optind; 2076 extern int optind;
1691 extern char *optarg; 2077 extern char *optarg;
2078 struct sftp_conn *conn;
2079 size_t copy_buffer_len = DEFAULT_COPY_BUFLEN;
2080 size_t num_requests = DEFAULT_NUM_REQUESTS;
1692 2081
1693 /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ 2082 /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
1694 sanitise_stdfd(); 2083 sanitise_stdfd();
@@ -1705,10 +2094,29 @@ main(int argc, char **argv)
1705 ll = SYSLOG_LEVEL_INFO; 2094 ll = SYSLOG_LEVEL_INFO;
1706 infile = stdin; 2095 infile = stdin;
1707 2096
1708 while ((ch = getopt(argc, argv, "1hvCo:s:S:b:B:F:P:R:")) != -1) { 2097 while ((ch = getopt(argc, argv,
2098 "1246hpqrvCc:D:i:o:s:S:b:B:F:P:R:")) != -1) {
1709 switch (ch) { 2099 switch (ch) {
2100 /* Passed through to ssh(1) */
2101 case '4':
2102 case '6':
1710 case 'C': 2103 case 'C':
1711 addargs(&args, "-C"); 2104 addargs(&args, "-%c", ch);
2105 break;
2106 /* Passed through to ssh(1) with argument */
2107 case 'F':
2108 case 'c':
2109 case 'i':
2110 case 'o':
2111 addargs(&args, "-%c", ch);
2112 addargs(&args, "%s", optarg);
2113 break;
2114 case 'q':
2115 showprogress = 0;
2116 addargs(&args, "-%c", ch);
2117 break;
2118 case 'P':
2119 addargs(&args, "-oPort %s", optarg);
1712 break; 2120 break;
1713 case 'v': 2121 case 'v':
1714 if (debug_level < 3) { 2122 if (debug_level < 3) {
@@ -1717,21 +2125,18 @@ main(int argc, char **argv)
1717 } 2125 }
1718 debug_level++; 2126 debug_level++;
1719 break; 2127 break;
1720 case 'F':
1721 case 'o':
1722 addargs(&args, "-%c%s", ch, optarg);
1723 break;
1724 case '1': 2128 case '1':
1725 sshver = 1; 2129 sshver = 1;
1726 if (sftp_server == NULL) 2130 if (sftp_server == NULL)
1727 sftp_server = _PATH_SFTP_SERVER; 2131 sftp_server = _PATH_SFTP_SERVER;
1728 break; 2132 break;
1729 case 's': 2133 case '2':
1730 sftp_server = optarg; 2134 sshver = 2;
1731 break; 2135 break;
1732 case 'S': 2136 case 'B':
1733 ssh_program = optarg; 2137 copy_buffer_len = strtol(optarg, &cp, 10);
1734 replacearg(&args, 0, "%s", ssh_program); 2138 if (copy_buffer_len == 0 || *cp != '\0')
2139 fatal("Invalid buffer size \"%s\"", optarg);
1735 break; 2140 break;
1736 case 'b': 2141 case 'b':
1737 if (batchmode) 2142 if (batchmode)
@@ -1745,13 +2150,14 @@ main(int argc, char **argv)
1745 batchmode = 1; 2150 batchmode = 1;
1746 addargs(&args, "-obatchmode yes"); 2151 addargs(&args, "-obatchmode yes");
1747 break; 2152 break;
1748 case 'P': 2153 case 'p':
2154 global_pflag = 1;
2155 break;
2156 case 'D':
1749 sftp_direct = optarg; 2157 sftp_direct = optarg;
1750 break; 2158 break;
1751 case 'B': 2159 case 'r':
1752 copy_buffer_len = strtol(optarg, &cp, 10); 2160 global_rflag = 1;
1753 if (copy_buffer_len == 0 || *cp != '\0')
1754 fatal("Invalid buffer size \"%s\"", optarg);
1755 break; 2161 break;
1756 case 'R': 2162 case 'R':
1757 num_requests = strtol(optarg, &cp, 10); 2163 num_requests = strtol(optarg, &cp, 10);
@@ -1759,6 +2165,13 @@ main(int argc, char **argv)
1759 fatal("Invalid number of requests \"%s\"", 2165 fatal("Invalid number of requests \"%s\"",
1760 optarg); 2166 optarg);
1761 break; 2167 break;
2168 case 's':
2169 sftp_server = optarg;
2170 break;
2171 case 'S':
2172 ssh_program = optarg;
2173 replacearg(&args, 0, "%s", ssh_program);
2174 break;
1762 case 'h': 2175 case 'h':
1763 default: 2176 default:
1764 usage(); 2177 usage();
@@ -1785,7 +2198,8 @@ main(int argc, char **argv)
1785 fprintf(stderr, "Missing username\n"); 2198 fprintf(stderr, "Missing username\n");
1786 usage(); 2199 usage();
1787 } 2200 }
1788 addargs(&args, "-l%s", userhost); 2201 addargs(&args, "-l");
2202 addargs(&args, "%s", userhost);
1789 } 2203 }
1790 2204
1791 if ((cp = colon(host)) != NULL) { 2205 if ((cp = colon(host)) != NULL) {
@@ -1805,24 +2219,32 @@ main(int argc, char **argv)
1805 if (sftp_server == NULL || strchr(sftp_server, '/') == NULL) 2219 if (sftp_server == NULL || strchr(sftp_server, '/') == NULL)
1806 addargs(&args, "-s"); 2220 addargs(&args, "-s");
1807 2221
2222 addargs(&args, "--");
1808 addargs(&args, "%s", host); 2223 addargs(&args, "%s", host);
1809 addargs(&args, "%s", (sftp_server != NULL ? 2224 addargs(&args, "%s", (sftp_server != NULL ?
1810 sftp_server : "sftp")); 2225 sftp_server : "sftp"));
1811 2226
1812 if (!batchmode)
1813 fprintf(stderr, "Connecting to %s...\n", host);
1814 connect_to_server(ssh_program, args.list, &in, &out); 2227 connect_to_server(ssh_program, args.list, &in, &out);
1815 } else { 2228 } else {
1816 args.list = NULL; 2229 args.list = NULL;
1817 addargs(&args, "sftp-server"); 2230 addargs(&args, "sftp-server");
1818 2231
1819 if (!batchmode)
1820 fprintf(stderr, "Attaching to %s...\n", sftp_direct);
1821 connect_to_server(sftp_direct, args.list, &in, &out); 2232 connect_to_server(sftp_direct, args.list, &in, &out);
1822 } 2233 }
1823 freeargs(&args); 2234 freeargs(&args);
1824 2235
1825 err = interactive_loop(in, out, file1, file2); 2236 conn = do_init(in, out, copy_buffer_len, num_requests);
2237 if (conn == NULL)
2238 fatal("Couldn't initialise connection to server");
2239
2240 if (!batchmode) {
2241 if (sftp_direct == NULL)
2242 fprintf(stderr, "Connected to %s.\n", host);
2243 else
2244 fprintf(stderr, "Attached to %s.\n", sftp_direct);
2245 }
2246
2247 err = interactive_loop(conn, file1, file2);
1826 2248
1827#if !defined(USE_PIPES) 2249#if !defined(USE_PIPES)
1828 shutdown(in, SHUT_RDWR); 2250 shutdown(in, SHUT_RDWR);
diff --git a/ssh-add.0 b/ssh-add.0
index ac88b3d3e..8fbd1e100 100644
--- a/ssh-add.0
+++ b/ssh-add.0
@@ -5,17 +5,20 @@ NAME
5 5
6SYNOPSIS 6SYNOPSIS
7 ssh-add [-cDdLlXx] [-t life] [file ...] 7 ssh-add [-cDdLlXx] [-t life] [file ...]
8 ssh-add -s reader 8 ssh-add -s pkcs11
9 ssh-add -e reader 9 ssh-add -e pkcs11
10 10
11DESCRIPTION 11DESCRIPTION
12 ssh-add adds RSA or DSA identities to the authentication agent, 12 ssh-add adds RSA or DSA identities to the authentication agent,
13 ssh-agent(1). When run without arguments, it adds the files 13 ssh-agent(1). When run without arguments, it adds the files
14 ~/.ssh/id_rsa, ~/.ssh/id_dsa and ~/.ssh/identity. Alternative file names 14 ~/.ssh/id_rsa, ~/.ssh/id_dsa and ~/.ssh/identity. After loading a pri-
15 can be given on the command line. If any file requires a passphrase, 15 vate key, ssh-add will try to load corresponding certificate information
16 ssh-add asks for the passphrase from the user. The passphrase is read 16 from the filename obtained by appending -cert.pub to the name of the pri-
17 from the user's tty. ssh-add retries the last passphrase if multiple 17 vate key file. Alternative file names can be given on the command line.
18 identity files are given. 18
19 If any file requires a passphrase, ssh-add asks for the passphrase from
20 the user. The passphrase is read from the user's tty. ssh-add retries
21 the last passphrase if multiple identity files are given.
19 22
20 The authentication agent must be running and the SSH_AUTH_SOCK environ- 23 The authentication agent must be running and the SSH_AUTH_SOCK environ-
21 ment variable must contain the name of its socket for ssh-add to work. 24 ment variable must contain the name of its socket for ssh-add to work.
@@ -37,8 +40,8 @@ DESCRIPTION
37 matching keys will be removed from the agent. If no public key 40 matching keys will be removed from the agent. If no public key
38 is found at a given path, ssh-add will append .pub and retry. 41 is found at a given path, ssh-add will append .pub and retry.
39 42
40 -e reader 43 -e pkcs11
41 Remove key in smartcard reader. 44 Remove keys provided by the PKCS#11 shared library pkcs11.
42 45
43 -L Lists public key parameters of all identities currently repre- 46 -L Lists public key parameters of all identities currently repre-
44 sented by the agent. 47 sented by the agent.
@@ -46,8 +49,8 @@ DESCRIPTION
46 -l Lists fingerprints of all identities currently represented by the 49 -l Lists fingerprints of all identities currently represented by the
47 agent. 50 agent.
48 51
49 -s reader 52 -s pkcs11
50 Add key in smartcard reader. 53 Add keys provided by the PKCS#11 shared library pkcs11.
51 54
52 -t life 55 -t life
53 Set a maximum lifetime when adding identities to an agent. The 56 Set a maximum lifetime when adding identities to an agent. The
@@ -70,7 +73,7 @@ ENVIRONMENT
70 to redirect the input from /dev/null to make this work.) 73 to redirect the input from /dev/null to make this work.)
71 74
72 SSH_AUTH_SOCK 75 SSH_AUTH_SOCK
73 Identifies the path of a unix-domain socket used to communicate 76 Identifies the path of a UNIX-domain socket used to communicate
74 with the agent. 77 with the agent.
75 78
76FILES 79FILES
@@ -103,4 +106,4 @@ AUTHORS
103 ated OpenSSH. Markus Friedl contributed the support for SSH protocol 106 ated OpenSSH. Markus Friedl contributed the support for SSH protocol
104 versions 1.5 and 2.0. 107 versions 1.5 and 2.0.
105 108
106OpenBSD 4.6 June 12, 2007 2 109OpenBSD 4.6 March 5, 2010 2
diff --git a/ssh-add.1 b/ssh-add.1
index 829c85445..7e8936262 100644
--- a/ssh-add.1
+++ b/ssh-add.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ssh-add.1,v 1.46 2007/06/12 13:41:03 jmc Exp $ 1.\" $OpenBSD: ssh-add.1,v 1.52 2010/03/05 10:28:21 djm Exp $
2.\" 2.\"
3.\" -*- nroff -*- 3.\" -*- nroff -*-
4.\" 4.\"
@@ -37,7 +37,7 @@
37.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 37.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
38.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39.\" 39.\"
40.Dd $Mdocdate: June 12 2007 $ 40.Dd $Mdocdate: March 5 2010 $
41.Dt SSH-ADD 1 41.Dt SSH-ADD 1
42.Os 42.Os
43.Sh NAME 43.Sh NAME
@@ -49,9 +49,9 @@
49.Op Fl t Ar life 49.Op Fl t Ar life
50.Op Ar 50.Op Ar
51.Nm ssh-add 51.Nm ssh-add
52.Fl s Ar reader 52.Fl s Ar pkcs11
53.Nm ssh-add 53.Nm ssh-add
54.Fl e Ar reader 54.Fl e Ar pkcs11
55.Sh DESCRIPTION 55.Sh DESCRIPTION
56.Nm 56.Nm
57adds RSA or DSA identities to the authentication agent, 57adds RSA or DSA identities to the authentication agent,
@@ -61,7 +61,14 @@ When run without arguments, it adds the files
61.Pa ~/.ssh/id_dsa 61.Pa ~/.ssh/id_dsa
62and 62and
63.Pa ~/.ssh/identity . 63.Pa ~/.ssh/identity .
64After loading a private key,
65.Nm
66will try to load corresponding certificate information from the
67filename obtained by appending
68.Pa -cert.pub
69to the name of the private key file.
64Alternative file names can be given on the command line. 70Alternative file names can be given on the command line.
71.Pp
65If any file requires a passphrase, 72If any file requires a passphrase,
66.Nm 73.Nm
67asks for the passphrase from the user. 74asks for the passphrase from the user.
@@ -105,17 +112,17 @@ If no public key is found at a given path,
105will append 112will append
106.Pa .pub 113.Pa .pub
107and retry. 114and retry.
108.It Fl e Ar reader 115.It Fl e Ar pkcs11
109Remove key in smartcard 116Remove keys provided by the PKCS#11 shared library
110.Ar reader . 117.Ar pkcs11 .
111.It Fl L 118.It Fl L
112Lists public key parameters of all identities currently represented 119Lists public key parameters of all identities currently represented
113by the agent. 120by the agent.
114.It Fl l 121.It Fl l
115Lists fingerprints of all identities currently represented by the agent. 122Lists fingerprints of all identities currently represented by the agent.
116.It Fl s Ar reader 123.It Fl s Ar pkcs11
117Add key in smartcard 124Add keys provided by the PKCS#11 shared library
118.Ar reader . 125.Ar pkcs11 .
119.It Fl t Ar life 126.It Fl t Ar life
120Set a maximum lifetime when adding identities to an agent. 127Set a maximum lifetime when adding identities to an agent.
121The lifetime may be specified in seconds or in a time format 128The lifetime may be specified in seconds or in a time format
@@ -152,8 +159,9 @@ may be necessary to redirect the input from
152.Pa /dev/null 159.Pa /dev/null
153to make this work.) 160to make this work.)
154.It Ev SSH_AUTH_SOCK 161.It Ev SSH_AUTH_SOCK
155Identifies the path of a unix-domain socket used to communicate with the 162Identifies the path of a
156agent. 163.Ux Ns -domain
164socket used to communicate with the agent.
157.El 165.El
158.Sh FILES 166.Sh FILES
159.Bl -tag -width Ds 167.Bl -tag -width Ds
diff --git a/ssh-add.c b/ssh-add.c
index b31a88636..7249f0da6 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-add.c,v 1.90 2007/09/09 11:38:01 sobrado Exp $ */ 1/* $OpenBSD: ssh-add.c,v 1.94 2010/03/01 11:07:06 otto 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
@@ -138,9 +138,9 @@ delete_all(AuthenticationConnection *ac)
138static int 138static int
139add_file(AuthenticationConnection *ac, const char *filename) 139add_file(AuthenticationConnection *ac, const char *filename)
140{ 140{
141 Key *private; 141 Key *private, *cert;
142 char *comment = NULL, *fp; 142 char *comment = NULL, *fp;
143 char msg[1024]; 143 char msg[1024], *certpath;
144 int fd, perms_ok, ret = -1; 144 int fd, perms_ok, ret = -1;
145 145
146 if ((fd = open(filename, O_RDONLY)) < 0) { 146 if ((fd = open(filename, O_RDONLY)) < 0) {
@@ -207,6 +207,33 @@ add_file(AuthenticationConnection *ac, const char *filename)
207 fprintf(stderr, "Could not add identity: %s\n", filename); 207 fprintf(stderr, "Could not add identity: %s\n", filename);
208 } 208 }
209 209
210
211 /* Now try to add the certificate flavour too */
212 xasprintf(&certpath, "%s-cert.pub", filename);
213 if ((cert = key_load_public(certpath, NULL)) != NULL) {
214 /* Graft with private bits */
215 if (key_to_certified(private) != 0)
216 fatal("%s: key_to_certified failed", __func__);
217 key_cert_copy(cert, private);
218 key_free(cert);
219
220 if (ssh_add_identity_constrained(ac, private, comment,
221 lifetime, confirm)) {
222 fprintf(stderr, "Certificate added: %s (%s)\n",
223 certpath, private->cert->key_id);
224 if (lifetime != 0)
225 fprintf(stderr, "Lifetime set to %d seconds\n",
226 lifetime);
227 if (confirm != 0)
228 fprintf(stderr, "The user has to confirm each "
229 "use of the key\n");
230 } else {
231 error("Certificate %s (%s) add failed", certpath,
232 private->cert->key_id);
233 }
234 }
235
236 xfree(certpath);
210 xfree(comment); 237 xfree(comment);
211 key_free(private); 238 key_free(private);
212 239
@@ -219,7 +246,7 @@ update_card(AuthenticationConnection *ac, int add, const char *id)
219 char *pin; 246 char *pin;
220 int ret = -1; 247 int ret = -1;
221 248
222 pin = read_passphrase("Enter passphrase for smartcard: ", RP_ALLOW_STDIN); 249 pin = read_passphrase("Enter passphrase for PKCS#11: ", RP_ALLOW_STDIN);
223 if (pin == NULL) 250 if (pin == NULL)
224 return -1; 251 return -1;
225 252
@@ -325,10 +352,8 @@ usage(void)
325 fprintf(stderr, " -X Unlock agent.\n"); 352 fprintf(stderr, " -X Unlock agent.\n");
326 fprintf(stderr, " -t life Set lifetime (in seconds) when adding identities.\n"); 353 fprintf(stderr, " -t life Set lifetime (in seconds) when adding identities.\n");
327 fprintf(stderr, " -c Require confirmation to sign using identities\n"); 354 fprintf(stderr, " -c Require confirmation to sign using identities\n");
328#ifdef SMARTCARD 355 fprintf(stderr, " -s pkcs11 Add keys from PKCS#11 provider.\n");
329 fprintf(stderr, " -s reader Add key in smartcard reader.\n"); 356 fprintf(stderr, " -e pkcs11 Remove keys provided by PKCS#11 provider.\n");
330 fprintf(stderr, " -e reader Remove key in smartcard reader.\n");
331#endif
332} 357}
333 358
334int 359int
@@ -337,7 +362,7 @@ main(int argc, char **argv)
337 extern char *optarg; 362 extern char *optarg;
338 extern int optind; 363 extern int optind;
339 AuthenticationConnection *ac = NULL; 364 AuthenticationConnection *ac = NULL;
340 char *sc_reader_id = NULL; 365 char *pkcs11provider = NULL;
341 int i, ch, deleting = 0, ret = 0; 366 int i, ch, deleting = 0, ret = 0;
342 367
343 /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ 368 /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
@@ -379,11 +404,11 @@ main(int argc, char **argv)
379 ret = 1; 404 ret = 1;
380 goto done; 405 goto done;
381 case 's': 406 case 's':
382 sc_reader_id = optarg; 407 pkcs11provider = optarg;
383 break; 408 break;
384 case 'e': 409 case 'e':
385 deleting = 1; 410 deleting = 1;
386 sc_reader_id = optarg; 411 pkcs11provider = optarg;
387 break; 412 break;
388 case 't': 413 case 't':
389 if ((lifetime = convtime(optarg)) == -1) { 414 if ((lifetime = convtime(optarg)) == -1) {
@@ -400,8 +425,8 @@ main(int argc, char **argv)
400 } 425 }
401 argc -= optind; 426 argc -= optind;
402 argv += optind; 427 argv += optind;
403 if (sc_reader_id != NULL) { 428 if (pkcs11provider != NULL) {
404 if (update_card(ac, !deleting, sc_reader_id) == -1) 429 if (update_card(ac, !deleting, pkcs11provider) == -1)
405 ret = 1; 430 ret = 1;
406 goto done; 431 goto done;
407 } 432 }
diff --git a/ssh-agent.0 b/ssh-agent.0
index 689942c7a..c178dcd01 100644
--- a/ssh-agent.0
+++ b/ssh-agent.0
@@ -18,7 +18,7 @@ DESCRIPTION
18 The options are as follows: 18 The options are as follows:
19 19
20 -a bind_address 20 -a bind_address
21 Bind the agent to the unix-domain socket bind_address. The de- 21 Bind the agent to the UNIX-domain socket bind_address. The de-
22 fault is /tmp/ssh-XXXXXXXXXX/agent.<ppid>. 22 fault is /tmp/ssh-XXXXXXXXXX/agent.<ppid>.
23 23
24 -c Generate C-shell commands on stdout. This is the default if 24 -c Generate C-shell commands on stdout. This is the default if
@@ -46,11 +46,12 @@ DESCRIPTION
46 The agent initially does not have any private keys. Keys are added using 46 The agent initially does not have any private keys. Keys are added using
47 ssh-add(1). When executed without arguments, ssh-add(1) adds the files 47 ssh-add(1). When executed without arguments, ssh-add(1) adds the files
48 ~/.ssh/id_rsa, ~/.ssh/id_dsa and ~/.ssh/identity. If the identity has a 48 ~/.ssh/id_rsa, ~/.ssh/id_dsa and ~/.ssh/identity. If the identity has a
49 passphrase, ssh-add(1) asks for the passphrase (using a small X11 appli- 49 passphrase, ssh-add(1) asks for the passphrase on the terminal if it has
50 cation if running under X11, or from the terminal if running without X). 50 one or from a small X11 program if running under X11. If neither of
51 It then sends the identity to the agent. Several identities can be 51 these is the case then the authentication will fail. It then sends the
52 stored in the agent; the agent can automatically use any of these identi- 52 identity to the agent. Several identities can be stored in the agent;
53 ties. ssh-add -l displays the identities currently held by the agent. 53 the agent can automatically use any of these identities. ssh-add -l dis-
54 plays the identities currently held by the agent.
54 55
55 The idea is that the agent is run in the user's local PC, laptop, or ter- 56 The idea is that the agent is run in the user's local PC, laptop, or ter-
56 minal. Authentication data need not be stored on any other machine, and 57 minal. Authentication data need not be stored on any other machine, and
@@ -75,7 +76,7 @@ DESCRIPTION
75 agent, and the result will be returned to the requester. This way, pri- 76 agent, and the result will be returned to the requester. This way, pri-
76 vate keys are not exposed to clients using the agent. 77 vate keys are not exposed to clients using the agent.
77 78
78 A unix-domain socket is created and the name of this socket is stored in 79 A UNIX-domain socket is created and the name of this socket is stored in
79 the SSH_AUTH_SOCK environment variable. The socket is made accessible 80 the SSH_AUTH_SOCK environment variable. The socket is made accessible
80 only to the current user. This method is easily abused by root or anoth- 81 only to the current user. This method is easily abused by root or anoth-
81 er instance of the same user. 82 er instance of the same user.
@@ -99,7 +100,7 @@ FILES
99 the user. 100 the user.
100 101
101 /tmp/ssh-XXXXXXXXXX/agent.<ppid> 102 /tmp/ssh-XXXXXXXXXX/agent.<ppid>
102 Unix-domain sockets used to contain the connection to the authen- 103 UNIX-domain sockets used to contain the connection to the authen-
103 tication agent. These sockets should only be readable by the 104 tication agent. These sockets should only be readable by the
104 owner. The sockets should get automatically removed when the 105 owner. The sockets should get automatically removed when the
105 agent exits. 106 agent exits.
@@ -114,4 +115,4 @@ AUTHORS
114 ated OpenSSH. Markus Friedl contributed the support for SSH protocol 115 ated OpenSSH. Markus Friedl contributed the support for SSH protocol
115 versions 1.5 and 2.0. 116 versions 1.5 and 2.0.
116 117
117OpenBSD 4.6 March 26, 2009 2 118OpenBSD 4.6 January 17, 2010 2
diff --git a/ssh-agent.1 b/ssh-agent.1
index 533cd6f6b..f65e8e625 100644
--- a/ssh-agent.1
+++ b/ssh-agent.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ssh-agent.1,v 1.47 2009/03/26 08:38:39 sobrado Exp $ 1.\" $OpenBSD: ssh-agent.1,v 1.50 2010/01/17 21:49:09 tedu 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
@@ -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.Dd $Mdocdate: March 26 2009 $ 37.Dd $Mdocdate: January 17 2010 $
38.Dt SSH-AGENT 1 38.Dt SSH-AGENT 1
39.Os 39.Os
40.Sh NAME 40.Sh NAME
@@ -67,7 +67,9 @@ machines using
67The options are as follows: 67The options are as follows:
68.Bl -tag -width Ds 68.Bl -tag -width Ds
69.It Fl a Ar bind_address 69.It Fl a Ar bind_address
70Bind the agent to the unix-domain socket 70Bind the agent to the
71.Ux Ns -domain
72socket
71.Ar bind_address . 73.Ar bind_address .
72The default is 74The default is
73.Pa /tmp/ssh-XXXXXXXXXX/agent.\*(Ltppid\*(Gt . 75.Pa /tmp/ssh-XXXXXXXXXX/agent.\*(Ltppid\*(Gt .
@@ -117,8 +119,9 @@ and
117.Pa ~/.ssh/identity . 119.Pa ~/.ssh/identity .
118If the identity has a passphrase, 120If the identity has a passphrase,
119.Xr ssh-add 1 121.Xr ssh-add 1
120asks for the passphrase (using a small X11 application if running 122asks for the passphrase on the terminal if it has one or from a small X11
121under X11, or from the terminal if running without X). 123program if running under X11.
124If neither of these is the case then the authentication will fail.
122It then sends the identity to the agent. 125It then sends the identity to the agent.
123Several identities can be stored in the 126Several identities can be stored in the
124agent; the agent can automatically use any of these identities. 127agent; the agent can automatically use any of these identities.
@@ -162,8 +165,9 @@ Instead, operations that require a private key will be performed
162by the agent, and the result will be returned to the requester. 165by the agent, and the result will be returned to the requester.
163This way, private keys are not exposed to clients using the agent. 166This way, private keys are not exposed to clients using the agent.
164.Pp 167.Pp
165A unix-domain socket is created 168A
166and the name of this socket is stored in the 169.Ux Ns -domain
170socket is created and the name of this socket is stored in the
167.Ev SSH_AUTH_SOCK 171.Ev SSH_AUTH_SOCK
168environment 172environment
169variable. 173variable.
@@ -186,8 +190,8 @@ Contains the protocol version 2 DSA authentication identity of the user.
186.It Pa ~/.ssh/id_rsa 190.It Pa ~/.ssh/id_rsa
187Contains the protocol version 2 RSA authentication identity of the user. 191Contains the protocol version 2 RSA authentication identity of the user.
188.It Pa /tmp/ssh-XXXXXXXXXX/agent.\*(Ltppid\*(Gt 192.It Pa /tmp/ssh-XXXXXXXXXX/agent.\*(Ltppid\*(Gt
189Unix-domain sockets used to contain the connection to the 193.Ux Ns -domain
190authentication agent. 194sockets used to contain the connection to the authentication agent.
191These sockets should only be readable by the owner. 195These sockets should only be readable by the owner.
192The sockets should get automatically removed when the agent exits. 196The sockets should get automatically removed when the agent exits.
193.El 197.El
diff --git a/ssh-agent.c b/ssh-agent.c
index f77dea3a6..b5c565271 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-agent.c,v 1.161 2009/03/23 19:38:04 tobias Exp $ */ 1/* $OpenBSD: ssh-agent.c,v 1.165 2010/02/26 20:29:54 djm 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
@@ -76,8 +76,8 @@
76#include "log.h" 76#include "log.h"
77#include "misc.h" 77#include "misc.h"
78 78
79#ifdef SMARTCARD 79#ifdef ENABLE_PKCS11
80#include "scard.h" 80#include "ssh-pkcs11.h"
81#endif 81#endif
82 82
83#if defined(HAVE_SYS_PRCTL_H) 83#if defined(HAVE_SYS_PRCTL_H)
@@ -105,6 +105,7 @@ typedef struct identity {
105 TAILQ_ENTRY(identity) next; 105 TAILQ_ENTRY(identity) next;
106 Key *key; 106 Key *key;
107 char *comment; 107 char *comment;
108 char *provider;
108 u_int death; 109 u_int death;
109 u_int confirm; 110 u_int confirm;
110} Identity; 111} Identity;
@@ -171,6 +172,8 @@ static void
171free_identity(Identity *id) 172free_identity(Identity *id)
172{ 173{
173 key_free(id->key); 174 key_free(id->key);
175 if (id->provider != NULL)
176 xfree(id->provider);
174 xfree(id->comment); 177 xfree(id->comment);
175 xfree(id); 178 xfree(id);
176} 179}
@@ -465,6 +468,8 @@ process_add_identity(SocketEntry *e, int version)
465 int type, success = 0, death = 0, confirm = 0; 468 int type, success = 0, death = 0, confirm = 0;
466 char *type_name, *comment; 469 char *type_name, *comment;
467 Key *k = NULL; 470 Key *k = NULL;
471 u_char *cert;
472 u_int len;
468 473
469 switch (version) { 474 switch (version) {
470 case 1: 475 case 1:
@@ -495,6 +500,14 @@ process_add_identity(SocketEntry *e, int version)
495 buffer_get_bignum2(&e->request, k->dsa->pub_key); 500 buffer_get_bignum2(&e->request, k->dsa->pub_key);
496 buffer_get_bignum2(&e->request, k->dsa->priv_key); 501 buffer_get_bignum2(&e->request, k->dsa->priv_key);
497 break; 502 break;
503 case KEY_DSA_CERT:
504 cert = buffer_get_string(&e->request, &len);
505 if ((k = key_from_blob(cert, len)) == NULL)
506 fatal("Certificate parse failed");
507 xfree(cert);
508 key_add_private(k);
509 buffer_get_bignum2(&e->request, k->dsa->priv_key);
510 break;
498 case KEY_RSA: 511 case KEY_RSA:
499 k = key_new_private(type); 512 k = key_new_private(type);
500 buffer_get_bignum2(&e->request, k->rsa->n); 513 buffer_get_bignum2(&e->request, k->rsa->n);
@@ -507,6 +520,17 @@ process_add_identity(SocketEntry *e, int version)
507 /* Generate additional parameters */ 520 /* Generate additional parameters */
508 rsa_generate_additional_parameters(k->rsa); 521 rsa_generate_additional_parameters(k->rsa);
509 break; 522 break;
523 case KEY_RSA_CERT:
524 cert = buffer_get_string(&e->request, &len);
525 if ((k = key_from_blob(cert, len)) == NULL)
526 fatal("Certificate parse failed");
527 xfree(cert);
528 key_add_private(k);
529 buffer_get_bignum2(&e->request, k->rsa->d);
530 buffer_get_bignum2(&e->request, k->rsa->iqmp);
531 buffer_get_bignum2(&e->request, k->rsa->p);
532 buffer_get_bignum2(&e->request, k->rsa->q);
533 break;
510 default: 534 default:
511 buffer_clear(&e->request); 535 buffer_clear(&e->request);
512 goto send; 536 goto send;
@@ -516,6 +540,7 @@ process_add_identity(SocketEntry *e, int version)
516 /* enable blinding */ 540 /* enable blinding */
517 switch (k->type) { 541 switch (k->type) {
518 case KEY_RSA: 542 case KEY_RSA:
543 case KEY_RSA_CERT:
519 case KEY_RSA1: 544 case KEY_RSA1:
520 if (RSA_blinding_on(k->rsa, NULL) != 1) { 545 if (RSA_blinding_on(k->rsa, NULL) != 1) {
521 error("process_add_identity: RSA_blinding_on failed"); 546 error("process_add_identity: RSA_blinding_on failed");
@@ -549,7 +574,7 @@ process_add_identity(SocketEntry *e, int version)
549 if (lifetime && !death) 574 if (lifetime && !death)
550 death = time(NULL) + lifetime; 575 death = time(NULL) + lifetime;
551 if ((id = lookup_identity(k, version)) == NULL) { 576 if ((id = lookup_identity(k, version)) == NULL) {
552 id = xmalloc(sizeof(Identity)); 577 id = xcalloc(1, sizeof(Identity));
553 id->key = k; 578 id->key = k;
554 TAILQ_INSERT_TAIL(&tab->idlist, id, next); 579 TAILQ_INSERT_TAIL(&tab->idlist, id, next);
555 /* Increment the number of identities. */ 580 /* Increment the number of identities. */
@@ -609,17 +634,17 @@ no_identities(SocketEntry *e, u_int type)
609 buffer_free(&msg); 634 buffer_free(&msg);
610} 635}
611 636
612#ifdef SMARTCARD 637#ifdef ENABLE_PKCS11
613static void 638static void
614process_add_smartcard_key(SocketEntry *e) 639process_add_smartcard_key(SocketEntry *e)
615{ 640{
616 char *sc_reader_id = NULL, *pin; 641 char *provider = NULL, *pin;
617 int i, type, version, success = 0, death = 0, confirm = 0; 642 int i, type, version, count = 0, success = 0, death = 0, confirm = 0;
618 Key **keys, *k; 643 Key **keys = NULL, *k;
619 Identity *id; 644 Identity *id;
620 Idtab *tab; 645 Idtab *tab;
621 646
622 sc_reader_id = buffer_get_string(&e->request, NULL); 647 provider = buffer_get_string(&e->request, NULL);
623 pin = buffer_get_string(&e->request, NULL); 648 pin = buffer_get_string(&e->request, NULL);
624 649
625 while (buffer_len(&e->request)) { 650 while (buffer_len(&e->request)) {
@@ -633,30 +658,22 @@ process_add_smartcard_key(SocketEntry *e)
633 default: 658 default:
634 error("process_add_smartcard_key: " 659 error("process_add_smartcard_key: "
635 "Unknown constraint type %d", type); 660 "Unknown constraint type %d", type);
636 xfree(sc_reader_id);
637 xfree(pin);
638 goto send; 661 goto send;
639 } 662 }
640 } 663 }
641 if (lifetime && !death) 664 if (lifetime && !death)
642 death = time(NULL) + lifetime; 665 death = time(NULL) + lifetime;
643 666
644 keys = sc_get_keys(sc_reader_id, pin); 667 count = pkcs11_add_provider(provider, pin, &keys);
645 xfree(sc_reader_id); 668 for (i = 0; i < count; i++) {
646 xfree(pin);
647
648 if (keys == NULL || keys[0] == NULL) {
649 error("sc_get_keys failed");
650 goto send;
651 }
652 for (i = 0; keys[i] != NULL; i++) {
653 k = keys[i]; 669 k = keys[i];
654 version = k->type == KEY_RSA1 ? 1 : 2; 670 version = k->type == KEY_RSA1 ? 1 : 2;
655 tab = idtab_lookup(version); 671 tab = idtab_lookup(version);
656 if (lookup_identity(k, version) == NULL) { 672 if (lookup_identity(k, version) == NULL) {
657 id = xmalloc(sizeof(Identity)); 673 id = xcalloc(1, sizeof(Identity));
658 id->key = k; 674 id->key = k;
659 id->comment = sc_get_key_label(k); 675 id->provider = xstrdup(provider);
676 id->comment = xstrdup(provider); /* XXX */
660 id->death = death; 677 id->death = death;
661 id->confirm = confirm; 678 id->confirm = confirm;
662 TAILQ_INSERT_TAIL(&tab->idlist, id, next); 679 TAILQ_INSERT_TAIL(&tab->idlist, id, next);
@@ -667,8 +684,13 @@ process_add_smartcard_key(SocketEntry *e)
667 } 684 }
668 keys[i] = NULL; 685 keys[i] = NULL;
669 } 686 }
670 xfree(keys);
671send: 687send:
688 if (pin)
689 xfree(pin);
690 if (provider)
691 xfree(provider);
692 if (keys)
693 xfree(keys);
672 buffer_put_int(&e->output, 1); 694 buffer_put_int(&e->output, 1);
673 buffer_put_char(&e->output, 695 buffer_put_char(&e->output,
674 success ? SSH_AGENT_SUCCESS : SSH_AGENT_FAILURE); 696 success ? SSH_AGENT_SUCCESS : SSH_AGENT_FAILURE);
@@ -677,42 +699,37 @@ send:
677static void 699static void
678process_remove_smartcard_key(SocketEntry *e) 700process_remove_smartcard_key(SocketEntry *e)
679{ 701{
680 char *sc_reader_id = NULL, *pin; 702 char *provider = NULL, *pin = NULL;
681 int i, version, success = 0; 703 int version, success = 0;
682 Key **keys, *k = NULL; 704 Identity *id, *nxt;
683 Identity *id;
684 Idtab *tab; 705 Idtab *tab;
685 706
686 sc_reader_id = buffer_get_string(&e->request, NULL); 707 provider = buffer_get_string(&e->request, NULL);
687 pin = buffer_get_string(&e->request, NULL); 708 pin = buffer_get_string(&e->request, NULL);
688 keys = sc_get_keys(sc_reader_id, pin);
689 xfree(sc_reader_id);
690 xfree(pin); 709 xfree(pin);
691 710
692 if (keys == NULL || keys[0] == NULL) { 711 for (version = 1; version < 3; version++) {
693 error("sc_get_keys failed"); 712 tab = idtab_lookup(version);
694 goto send; 713 for (id = TAILQ_FIRST(&tab->idlist); id; id = nxt) {
695 } 714 nxt = TAILQ_NEXT(id, next);
696 for (i = 0; keys[i] != NULL; i++) { 715 if (!strcmp(provider, id->provider)) {
697 k = keys[i]; 716 TAILQ_REMOVE(&tab->idlist, id, next);
698 version = k->type == KEY_RSA1 ? 1 : 2; 717 free_identity(id);
699 if ((id = lookup_identity(k, version)) != NULL) { 718 tab->nentries--;
700 tab = idtab_lookup(version); 719 }
701 TAILQ_REMOVE(&tab->idlist, id, next);
702 tab->nentries--;
703 free_identity(id);
704 success = 1;
705 } 720 }
706 key_free(k);
707 keys[i] = NULL;
708 } 721 }
709 xfree(keys); 722 if (pkcs11_del_provider(provider) == 0)
710send: 723 success = 1;
724 else
725 error("process_remove_smartcard_key:"
726 " pkcs11_del_provider failed");
727 xfree(provider);
711 buffer_put_int(&e->output, 1); 728 buffer_put_int(&e->output, 1);
712 buffer_put_char(&e->output, 729 buffer_put_char(&e->output,
713 success ? SSH_AGENT_SUCCESS : SSH_AGENT_FAILURE); 730 success ? SSH_AGENT_SUCCESS : SSH_AGENT_FAILURE);
714} 731}
715#endif /* SMARTCARD */ 732#endif /* ENABLE_PKCS11 */
716 733
717/* dispatch incoming messages */ 734/* dispatch incoming messages */
718 735
@@ -797,7 +814,7 @@ process_message(SocketEntry *e)
797 case SSH2_AGENTC_REMOVE_ALL_IDENTITIES: 814 case SSH2_AGENTC_REMOVE_ALL_IDENTITIES:
798 process_remove_all_identities(e, 2); 815 process_remove_all_identities(e, 2);
799 break; 816 break;
800#ifdef SMARTCARD 817#ifdef ENABLE_PKCS11
801 case SSH_AGENTC_ADD_SMARTCARD_KEY: 818 case SSH_AGENTC_ADD_SMARTCARD_KEY:
802 case SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED: 819 case SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED:
803 process_add_smartcard_key(e); 820 process_add_smartcard_key(e);
@@ -805,7 +822,7 @@ process_message(SocketEntry *e)
805 case SSH_AGENTC_REMOVE_SMARTCARD_KEY: 822 case SSH_AGENTC_REMOVE_SMARTCARD_KEY:
806 process_remove_smartcard_key(e); 823 process_remove_smartcard_key(e);
807 break; 824 break;
808#endif /* SMARTCARD */ 825#endif /* ENABLE_PKCS11 */
809 default: 826 default:
810 /* Unknown message. Respond with failure. */ 827 /* Unknown message. Respond with failure. */
811 error("Unknown message %d", type); 828 error("Unknown message %d", type);
@@ -919,11 +936,11 @@ after_select(fd_set *readset, fd_set *writeset)
919 socklen_t slen; 936 socklen_t slen;
920 char buf[1024]; 937 char buf[1024];
921 int len, sock; 938 int len, sock;
922 u_int i; 939 u_int i, orig_alloc;
923 uid_t euid; 940 uid_t euid;
924 gid_t egid; 941 gid_t egid;
925 942
926 for (i = 0; i < sockets_alloc; i++) 943 for (i = 0, orig_alloc = sockets_alloc; i < orig_alloc; i++)
927 switch (sockets[i].type) { 944 switch (sockets[i].type) {
928 case AUTH_UNUSED: 945 case AUTH_UNUSED:
929 break; 946 break;
@@ -956,16 +973,13 @@ after_select(fd_set *readset, fd_set *writeset)
956 case AUTH_CONNECTION: 973 case AUTH_CONNECTION:
957 if (buffer_len(&sockets[i].output) > 0 && 974 if (buffer_len(&sockets[i].output) > 0 &&
958 FD_ISSET(sockets[i].fd, writeset)) { 975 FD_ISSET(sockets[i].fd, writeset)) {
959 do { 976 len = write(sockets[i].fd,
960 len = write(sockets[i].fd, 977 buffer_ptr(&sockets[i].output),
961 buffer_ptr(&sockets[i].output), 978 buffer_len(&sockets[i].output));
962 buffer_len(&sockets[i].output)); 979 if (len == -1 && (errno == EAGAIN ||
963 if (len == -1 && (errno == EAGAIN || 980 errno == EWOULDBLOCK ||
964 errno == EINTR || 981 errno == EINTR))
965 errno == EWOULDBLOCK)) 982 continue;
966 continue;
967 break;
968 } while (1);
969 if (len <= 0) { 983 if (len <= 0) {
970 close_socket(&sockets[i]); 984 close_socket(&sockets[i]);
971 break; 985 break;
@@ -973,14 +987,11 @@ after_select(fd_set *readset, fd_set *writeset)
973 buffer_consume(&sockets[i].output, len); 987 buffer_consume(&sockets[i].output, len);
974 } 988 }
975 if (FD_ISSET(sockets[i].fd, readset)) { 989 if (FD_ISSET(sockets[i].fd, readset)) {
976 do { 990 len = read(sockets[i].fd, buf, sizeof(buf));
977 len = read(sockets[i].fd, buf, sizeof(buf)); 991 if (len == -1 && (errno == EAGAIN ||
978 if (len == -1 && (errno == EAGAIN || 992 errno == EWOULDBLOCK ||
979 errno == EINTR || 993 errno == EINTR))
980 errno == EWOULDBLOCK)) 994 continue;
981 continue;
982 break;
983 } while (1);
984 if (len <= 0) { 995 if (len <= 0) {
985 close_socket(&sockets[i]); 996 close_socket(&sockets[i]);
986 break; 997 break;
@@ -1015,6 +1026,9 @@ static void
1015cleanup_handler(int sig) 1026cleanup_handler(int sig)
1016{ 1027{
1017 cleanup_socket(); 1028 cleanup_socket();
1029#ifdef ENABLE_PKCS11
1030 pkcs11_terminate();
1031#endif
1018 _exit(2); 1032 _exit(2);
1019} 1033}
1020 1034
@@ -1261,6 +1275,10 @@ main(int ac, char **av)
1261#endif 1275#endif
1262 1276
1263skip: 1277skip:
1278
1279#ifdef ENABLE_PKCS11
1280 pkcs11_init(0);
1281#endif
1264 new_socket(AUTH_SOCKET, sock); 1282 new_socket(AUTH_SOCKET, sock);
1265 if (ac > 0) 1283 if (ac > 0)
1266 parent_alive_interval = 10; 1284 parent_alive_interval = 10;
diff --git a/ssh-dss.c b/ssh-dss.c
index 51a06e98f..449f493b4 100644
--- a/ssh-dss.c
+++ b/ssh-dss.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-dss.c,v 1.24 2006/11/06 21:25:28 markus Exp $ */ 1/* $OpenBSD: ssh-dss.c,v 1.25 2010/02/26 20:29:54 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -53,7 +53,9 @@ ssh_dss_sign(const Key *key, u_char **sigp, u_int *lenp,
53 u_int rlen, slen, len, dlen; 53 u_int rlen, slen, len, dlen;
54 Buffer b; 54 Buffer b;
55 55
56 if (key == NULL || key->type != KEY_DSA || key->dsa == NULL) { 56 if (key == NULL ||
57 (key->type != KEY_DSA && key->type != KEY_DSA_CERT) ||
58 key->dsa == NULL) {
57 error("ssh_dss_sign: no DSA key"); 59 error("ssh_dss_sign: no DSA key");
58 return -1; 60 return -1;
59 } 61 }
@@ -116,7 +118,9 @@ ssh_dss_verify(const Key *key, const u_char *signature, u_int signaturelen,
116 int rlen, ret; 118 int rlen, ret;
117 Buffer b; 119 Buffer b;
118 120
119 if (key == NULL || key->type != KEY_DSA || key->dsa == NULL) { 121 if (key == NULL ||
122 (key->type != KEY_DSA && key->type != KEY_DSA_CERT) ||
123 key->dsa == NULL) {
120 error("ssh_dss_verify: no DSA key"); 124 error("ssh_dss_verify: no DSA key");
121 return -1; 125 return -1;
122 } 126 }
diff --git a/ssh-keygen.0 b/ssh-keygen.0
index 75703483e..c9877300e 100644
--- a/ssh-keygen.0
+++ b/ssh-keygen.0
@@ -13,15 +13,17 @@ SYNOPSIS
13 ssh-keygen -c [-P passphrase] [-C comment] [-f keyfile] 13 ssh-keygen -c [-P passphrase] [-C comment] [-f keyfile]
14 ssh-keygen -l [-f input_keyfile] 14 ssh-keygen -l [-f input_keyfile]
15 ssh-keygen -B [-f input_keyfile] 15 ssh-keygen -B [-f input_keyfile]
16 ssh-keygen -D reader 16 ssh-keygen -D pkcs11
17 ssh-keygen -F hostname [-f known_hosts_file] [-l] 17 ssh-keygen -F hostname [-f known_hosts_file] [-l]
18 ssh-keygen -H [-f known_hosts_file] 18 ssh-keygen -H [-f known_hosts_file]
19 ssh-keygen -R hostname [-f known_hosts_file] 19 ssh-keygen -R hostname [-f known_hosts_file]
20 ssh-keygen -U reader [-f input_keyfile]
21 ssh-keygen -r hostname [-f input_keyfile] [-g] 20 ssh-keygen -r hostname [-f input_keyfile] [-g]
22 ssh-keygen -G output_file [-v] [-b bits] [-M memory] [-S start_point] 21 ssh-keygen -G output_file [-v] [-b bits] [-M memory] [-S start_point]
23 ssh-keygen -T output_file -f input_file [-v] [-a num_trials] [-W 22 ssh-keygen -T output_file -f input_file [-v] [-a num_trials]
24 generator] 23 [-W generator]
24 ssh-keygen -s ca_key -I certificate_identity [-h] [-n principals]
25 [-O constraint] [-V validity_interval] file ...
26 ssh-keygen -L [-f input_keyfile]
25 27
26DESCRIPTION 28DESCRIPTION
27 ssh-keygen generates, manages and converts authentication keys for 29 ssh-keygen generates, manages and converts authentication keys for
@@ -89,8 +91,9 @@ DESCRIPTION
89 gram will prompt for the file containing the private keys, for 91 gram will prompt for the file containing the private keys, for
90 the passphrase if the key has one, and for the new comment. 92 the passphrase if the key has one, and for the new comment.
91 93
92 -D reader 94 -D pkcs11
93 Download the RSA public key stored in the smartcard in reader. 95 Download the RSA public keys provided by the PKCS#11 shared li-
96 brary pkcs11.
94 97
95 -e This option will read a private or public OpenSSH key file and 98 -e This option will read a private or public OpenSSH key file and
96 print the key in RFC 4716 SSH Public Key File Format to stdout. 99 print the key in RFC 4716 SSH Public Key File Format to stdout.
@@ -122,12 +125,21 @@ DESCRIPTION
122 and is therefore safe to use on files that mix hashed and non- 125 and is therefore safe to use on files that mix hashed and non-
123 hashed names. 126 hashed names.
124 127
128 -h When signing a key, create a host certificate instead of a user
129 certificate. Please see the CERTIFICATES section for details.
130
131 -I certificate_identity
132 Specify the key identity when signing a public key. Please see
133 the CERTIFICATES section for details.
134
125 -i This option will read an unencrypted private (or public) key file 135 -i This option will read an unencrypted private (or public) key file
126 in SSH2-compatible format and print an OpenSSH compatible private 136 in SSH2-compatible format and print an OpenSSH compatible private
127 (or public) key to stdout. ssh-keygen also reads the RFC 4716 137 (or public) key to stdout. ssh-keygen also reads the RFC 4716
128 SSH Public Key File Format. This option allows importing keys 138 SSH Public Key File Format. This option allows importing keys
129 from several commercial SSH implementations. 139 from several commercial SSH implementations.
130 140
141 -L Prints the contents of a certificate.
142
131 -l Show fingerprint of specified public key file. Private RSA1 keys 143 -l Show fingerprint of specified public key file. Private RSA1 keys
132 are also supported. For RSA and DSA keys ssh-keygen tries to 144 are also supported. For RSA and DSA keys ssh-keygen tries to
133 find the matching public key file and prints its fingerprint. If 145 find the matching public key file and prints its fingerprint. If
@@ -141,6 +153,65 @@ DESCRIPTION
141 -N new_passphrase 153 -N new_passphrase
142 Provides the new passphrase. 154 Provides the new passphrase.
143 155
156 -n principals
157 Specify one or more principals (user or host names) to be includ-
158 ed in a certificate when signing a key. Multiple principals may
159 be specified, separated by commas. Please see the CERTIFICATES
160 section for details.
161
162 -O constraint
163 Specify a certificate constraint when signing a key. This option
164 may be specified multiple times. Please see the CERTIFICATES
165 section for details. The constraints that are valid for user
166 certificates are:
167
168 no-x11-forwarding
169 Disable X11 forwarding (permitted by default).
170
171 no-agent-forwarding
172 Disable ssh-agent(1) forwarding (permitted by default).
173
174 no-port-forwarding
175 Disable port forwarding (permitted by default).
176
177 no-pty Disable PTY allocation (permitted by default).
178
179 no-user-rc
180 Disable execution of ~/.ssh/rc by sshd(8) (permitted by
181 default).
182
183 clear Clear all enabled permissions. This is useful for clear-
184 ing the default set of permissions so permissions may be
185 added individually.
186
187 permit-x11-forwarding
188 Allows X11 forwarding.
189
190 permit-agent-forwarding
191 Allows ssh-agent(1) forwarding.
192
193 permit-port-forwarding
194 Allows port forwarding.
195
196 permit-pty
197 Allows PTY allocation.
198
199 permit-user-rc
200 Allows execution of ~/.ssh/rc by sshd(8).
201
202 force-command=command
203 Forces the execution of command instead of any shell or
204 command specified by the user when the certificate is
205 used for authentication.
206
207 source-address=address_list
208 Restrict the source addresses from which the certificate
209 is considered valid from. The address_list is a comma-
210 separated list of one or more address/netmask pairs in
211 CIDR format.
212
213 At present, no constraints are valid for host keys.
214
144 -P passphrase 215 -P passphrase
145 Provides the (old) passphrase. 216 Provides the (old) passphrase.
146 217
@@ -164,6 +235,10 @@ DESCRIPTION
164 Specify start point (in hex) when generating candidate moduli for 235 Specify start point (in hex) when generating candidate moduli for
165 DH-GEX. 236 DH-GEX.
166 237
238 -s ca_key
239 Certify (sign) a public key using the specified CA key. Please
240 see the CERTIFICATES section for details.
241
167 -T output_file 242 -T output_file
168 Test DH group exchange candidate primes (generated using the -G 243 Test DH group exchange candidate primes (generated using the -G
169 option) for safety. 244 option) for safety.
@@ -173,8 +248,25 @@ DESCRIPTION
173 ``rsa1'' for protocol version 1 and ``rsa'' or ``dsa'' for proto- 248 ``rsa1'' for protocol version 1 and ``rsa'' or ``dsa'' for proto-
174 col version 2. 249 col version 2.
175 250
176 -U reader 251 -V validity_interval
177 Upload an existing RSA private key into the smartcard in reader. 252 Specify a validity interval when signing a certificate. A valid-
253 ity interval may consist of a single time, indicating that the
254 certificate is valid beginning now and expiring at that time, or
255 may consist of two times separated by a colon to indicate an ex-
256 plicit time interval. The start time may be specified as a date
257 in YYYYMMDD format, a time in YYYYMMDDHHMMSS format or a relative
258 time (to the current time) consisting of a minus sign followed by
259 a relative time in the format described in the TIME FORMATS sec-
260 tion of ssh_config(5). The end time may be specified as a YYYYM-
261 MDD date, a YYYYMMDDHHMMSS time or a relative time starting with
262 a plus character.
263
264 For example: ``+52w1d'' (valid from now to 52 weeks and one day
265 from now), ``-4w:+4w'' (valid from four weeks ago to four weeks
266 from now), ``20100101123000:20110101123000'' (valid from 12:30
267 PM, January 1st, 2010 to 12:30 PM, January 1st, 2011),
268 ``-1d:20110101'' (valid from yesterday to midnight, January 1st,
269 2011).
178 270
179 -v Verbose mode. Causes ssh-keygen to print debugging messages 271 -v Verbose mode. Causes ssh-keygen to print debugging messages
180 about its progress. This is helpful for debugging moduli genera- 272 about its progress. This is helpful for debugging moduli genera-
@@ -221,15 +313,66 @@ MODULI GENERATION
221 this file contains moduli of a range of bit lengths and that both ends of 313 this file contains moduli of a range of bit lengths and that both ends of
222 a connection share common moduli. 314 a connection share common moduli.
223 315
316CERTIFICATES
317 ssh-keygen supports signing of keys to produce certificates that may be
318 used for user or host authentication. Certificates consist of a public
319 key, some identity information, zero or more principal (user or host)
320 names and an optional set of constraints that are signed by a Certifica-
321 tion Authority (CA) key. Clients or servers may then trust only the CA
322 key and verify its signature on a certificate rather than trusting many
323 user/host keys. Note that OpenSSH certificates are a different, and much
324 simpler, format to the X.509 certificates used in ssl(8).
325
326 ssh-keygen supports two types of certificates: user and host. User cer-
327 tificates authenticate users to servers, whereas host certificates au-
328 thenticate server hosts to users. To generate a user certificate:
329
330 $ ssh-keygen -s /path/to/ca_key -I key_id /path/to/user_key.pub
331
332 The resultant certificate will be placed in /path/to/user_key_cert.pub.
333 A host certificate requires the -h option:
334
335 $ ssh-keygen -s /path/to/ca_key -I key_id -h /path/to/host_key.pub
336
337 The host certificate will be output to /path/to/host_key_cert.pub. In
338 both cases, key_id is a "key identifier" that is logged by the server
339 when the certificate is used for authentication.
340
341 Certificates may be limited to be valid for a set of principal (us-
342 er/host) names. By default, generated certificates are valid for all
343 users or hosts. To generate a certificate for a specified set of princi-
344 pals:
345
346 $ ssh-keygen -s ca_key -I key_id -n user1,user2 user_key.pub
347 $ ssh-keygen -s ca_key -I key_id -h -n host.domain $0
348
349 Additional limitations on the validity and use of user certificates may
350 be specified through certificate constraints. A constrained certificate
351 may disable features of the SSH session, may be valid only when presented
352 from particular source addresses or may force the use of a specific com-
353 mand. For a list of valid certificate constraints, see the documentation
354 for the -O option above.
355
356 Finally, certificates may be defined with a validity lifetime. The -V
357 option allows specification of certificate start and end times. A cer-
358 tificate that is presented at a time outside this range will not be con-
359 sidered valid. By default, certificates have a maximum validity inter-
360 val.
361
362 For certificates to be used for user or host authentication, the CA pub-
363 lic key must be trusted by sshd(8) or ssh(1). Please refer to those man-
364 ual pages for details.
365
224FILES 366FILES
225 ~/.ssh/identity 367 ~/.ssh/identity
226 Contains the protocol version 1 RSA authentication identity of 368 Contains the protocol version 1 RSA authentication identity of
227 the user. This file should not be readable by anyone but the us- 369 the user. This file should not be readable by anyone but the us-
228 er. It is possible to specify a passphrase when generating the 370 er. It is possible to specify a passphrase when generating the
229 key; that passphrase will be used to encrypt the private part of 371 key; that passphrase will be used to encrypt the private part of
230 this file using 3DES. This file is not automatically accessed by 372 this file using 128-bit AES. This file is not automatically ac-
231 ssh-keygen but it is offered as the default file for the private 373 cessed by ssh-keygen but it is offered as the default file for
232 key. ssh(1) will read this file when a login attempt is made. 374 the private key. ssh(1) will read this file when a login attempt
375 is made.
233 376
234 ~/.ssh/identity.pub 377 ~/.ssh/identity.pub
235 Contains the protocol version 1 RSA public key for authentica- 378 Contains the protocol version 1 RSA public key for authentica-
@@ -243,9 +386,10 @@ FILES
243 the user. This file should not be readable by anyone but the us- 386 the user. This file should not be readable by anyone but the us-
244 er. It is possible to specify a passphrase when generating the 387 er. It is possible to specify a passphrase when generating the
245 key; that passphrase will be used to encrypt the private part of 388 key; that passphrase will be used to encrypt the private part of
246 this file using 3DES. This file is not automatically accessed by 389 this file using 128-bit AES. This file is not automatically ac-
247 ssh-keygen but it is offered as the default file for the private 390 cessed by ssh-keygen but it is offered as the default file for
248 key. ssh(1) will read this file when a login attempt is made. 391 the private key. ssh(1) will read this file when a login attempt
392 is made.
249 393
250 ~/.ssh/id_dsa.pub 394 ~/.ssh/id_dsa.pub
251 Contains the protocol version 2 DSA public key for authentica- 395 Contains the protocol version 2 DSA public key for authentica-
@@ -259,9 +403,10 @@ FILES
259 the user. This file should not be readable by anyone but the us- 403 the user. This file should not be readable by anyone but the us-
260 er. It is possible to specify a passphrase when generating the 404 er. It is possible to specify a passphrase when generating the
261 key; that passphrase will be used to encrypt the private part of 405 key; that passphrase will be used to encrypt the private part of
262 this file using 3DES. This file is not automatically accessed by 406 this file using 128-bit AES. This file is not automatically ac-
263 ssh-keygen but it is offered as the default file for the private 407 cessed by ssh-keygen but it is offered as the default file for
264 key. ssh(1) will read this file when a login attempt is made. 408 the private key. ssh(1) will read this file when a login attempt
409 is made.
265 410
266 ~/.ssh/id_rsa.pub 411 ~/.ssh/id_rsa.pub
267 Contains the protocol version 2 RSA public key for authentica- 412 Contains the protocol version 2 RSA public key for authentica-
@@ -286,4 +431,4 @@ AUTHORS
286 created OpenSSH. Markus Friedl contributed the support for SSH protocol 431 created OpenSSH. Markus Friedl contributed the support for SSH protocol
287 versions 1.5 and 2.0. 432 versions 1.5 and 2.0.
288 433
289OpenBSD 4.6 July 24, 2008 5 434OpenBSD 4.6 March 8, 2010 7
diff --git a/ssh-keygen.1 b/ssh-keygen.1
index c87d8031a..9dec5a098 100644
--- a/ssh-keygen.1
+++ b/ssh-keygen.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ssh-keygen.1,v 1.79 2008/07/24 23:55:30 sthen Exp $ 1.\" $OpenBSD: ssh-keygen.1,v 1.88 2010/03/08 00:28:55 djm Exp $
2.\" 2.\"
3.\" -*- nroff -*- 3.\" -*- nroff -*-
4.\" 4.\"
@@ -37,7 +37,7 @@
37.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 37.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
38.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39.\" 39.\"
40.Dd $Mdocdate: July 24 2008 $ 40.Dd $Mdocdate: March 8 2010 $
41.Dt SSH-KEYGEN 1 41.Dt SSH-KEYGEN 1
42.Os 42.Os
43.Sh NAME 43.Sh NAME
@@ -52,7 +52,6 @@
52.Op Fl N Ar new_passphrase 52.Op Fl N Ar new_passphrase
53.Op Fl C Ar comment 53.Op Fl C Ar comment
54.Op Fl f Ar output_keyfile 54.Op Fl f Ar output_keyfile
55.Ek
56.Nm ssh-keygen 55.Nm ssh-keygen
57.Fl p 56.Fl p
58.Op Fl P Ar old_passphrase 57.Op Fl P Ar old_passphrase
@@ -79,7 +78,7 @@
79.Fl B 78.Fl B
80.Op Fl f Ar input_keyfile 79.Op Fl f Ar input_keyfile
81.Nm ssh-keygen 80.Nm ssh-keygen
82.Fl D Ar reader 81.Fl D Ar pkcs11
83.Nm ssh-keygen 82.Nm ssh-keygen
84.Fl F Ar hostname 83.Fl F Ar hostname
85.Op Fl f Ar known_hosts_file 84.Op Fl f Ar known_hosts_file
@@ -91,9 +90,6 @@
91.Fl R Ar hostname 90.Fl R Ar hostname
92.Op Fl f Ar known_hosts_file 91.Op Fl f Ar known_hosts_file
93.Nm ssh-keygen 92.Nm ssh-keygen
94.Fl U Ar reader
95.Op Fl f Ar input_keyfile
96.Nm ssh-keygen
97.Fl r Ar hostname 93.Fl r Ar hostname
98.Op Fl f Ar input_keyfile 94.Op Fl f Ar input_keyfile
99.Op Fl g 95.Op Fl g
@@ -109,6 +105,18 @@
109.Op Fl v 105.Op Fl v
110.Op Fl a Ar num_trials 106.Op Fl a Ar num_trials
111.Op Fl W Ar generator 107.Op Fl W Ar generator
108.Nm ssh-keygen
109.Fl s Ar ca_key
110.Fl I Ar certificate_identity
111.Op Fl h
112.Op Fl n Ar principals
113.Op Fl O Ar constraint
114.Op Fl V Ar validity_interval
115.Ar
116.Nm ssh-keygen
117.Fl L
118.Op Fl f Ar input_keyfile
119.Ek
112.Sh DESCRIPTION 120.Sh DESCRIPTION
113.Nm 121.Nm
114generates, manages and converts authentication keys for 122generates, manages and converts authentication keys for
@@ -199,9 +207,9 @@ Requests changing the comment in the private and public key files.
199This operation is only supported for RSA1 keys. 207This operation is only supported for RSA1 keys.
200The program will prompt for the file containing the private keys, for 208The program will prompt for the file containing the private keys, for
201the passphrase if the key has one, and for the new comment. 209the passphrase if the key has one, and for the new comment.
202.It Fl D Ar reader 210.It Fl D Ar pkcs11
203Download the RSA public key stored in the smartcard in 211Download the RSA public keys provided by the PKCS#11 shared library
204.Ar reader . 212.Ar pkcs11 .
205.It Fl e 213.It Fl e
206This option will read a private or public OpenSSH key file and 214This option will read a private or public OpenSSH key file and
207print the key in 215print the key in
@@ -246,6 +254,17 @@ but they do not reveal identifying information should the file's contents
246be disclosed. 254be disclosed.
247This option will not modify existing hashed hostnames and is therefore safe 255This option will not modify existing hashed hostnames and is therefore safe
248to use on files that mix hashed and non-hashed names. 256to use on files that mix hashed and non-hashed names.
257.It Fl h
258When signing a key, create a host certificate instead of a user
259certificate.
260Please see the
261.Sx CERTIFICATES
262section for details.
263.It Fl I Ar certificate_identity
264Specify the key identity when signing a public key.
265Please see the
266.Sx CERTIFICATES
267section for details.
249.It Fl i 268.It Fl i
250This option will read an unencrypted private (or public) key file 269This option will read an unencrypted private (or public) key file
251in SSH2-compatible format and print an OpenSSH compatible private 270in SSH2-compatible format and print an OpenSSH compatible private
@@ -255,6 +274,8 @@ also reads the
255RFC 4716 SSH Public Key File Format. 274RFC 4716 SSH Public Key File Format.
256This option allows importing keys from several commercial 275This option allows importing keys from several commercial
257SSH implementations. 276SSH implementations.
277.It Fl L
278Prints the contents of a certificate.
258.It Fl l 279.It Fl l
259Show fingerprint of specified public key file. 280Show fingerprint of specified public key file.
260Private RSA1 keys are also supported. 281Private RSA1 keys are also supported.
@@ -269,6 +290,71 @@ Specify the amount of memory to use (in megabytes) when generating
269candidate moduli for DH-GEX. 290candidate moduli for DH-GEX.
270.It Fl N Ar new_passphrase 291.It Fl N Ar new_passphrase
271Provides the new passphrase. 292Provides the new passphrase.
293.It Fl n Ar principals
294Specify one or more principals (user or host names) to be included in
295a certificate when signing a key.
296Multiple principals may be specified, separated by commas.
297Please see the
298.Sx CERTIFICATES
299section for details.
300.It Fl O Ar constraint
301Specify a certificate constraint when signing a key.
302This option may be specified multiple times.
303Please see the
304.Sx CERTIFICATES
305section for details.
306The constraints that are valid for user certificates are:
307.Bl -tag -width Ds
308.It Ic no-x11-forwarding
309Disable X11 forwarding (permitted by default).
310.It Ic no-agent-forwarding
311Disable
312.Xr ssh-agent 1
313forwarding (permitted by default).
314.It Ic no-port-forwarding
315Disable port forwarding (permitted by default).
316.It Ic no-pty
317Disable PTY allocation (permitted by default).
318.It Ic no-user-rc
319Disable execution of
320.Pa ~/.ssh/rc
321by
322.Xr sshd 8
323(permitted by default).
324.It Ic clear
325Clear all enabled permissions.
326This is useful for clearing the default set of permissions so permissions may
327be added individually.
328.It Ic permit-x11-forwarding
329Allows X11 forwarding.
330.It Ic permit-agent-forwarding
331Allows
332.Xr ssh-agent 1
333forwarding.
334.It Ic permit-port-forwarding
335Allows port forwarding.
336.It Ic permit-pty
337Allows PTY allocation.
338.It Ic permit-user-rc
339Allows execution of
340.Pa ~/.ssh/rc
341by
342.Xr sshd 8 .
343.It Ic force-command=command
344Forces the execution of
345.Ar command
346instead of any shell or command specified by the user when
347the certificate is used for authentication.
348.It Ic source-address=address_list
349Restrict the source addresses from which the certificate is considered valid
350from.
351The
352.Ar address_list
353is a comma-separated list of one or more address/netmask pairs in CIDR
354format.
355.El
356.Pp
357At present, no constraints are valid for host keys.
272.It Fl P Ar passphrase 358.It Fl P Ar passphrase
273Provides the (old) passphrase. 359Provides the (old) passphrase.
274.It Fl p 360.It Fl p
@@ -296,6 +382,11 @@ Print the SSHFP fingerprint resource record named
296for the specified public key file. 382for the specified public key file.
297.It Fl S Ar start 383.It Fl S Ar start
298Specify start point (in hex) when generating candidate moduli for DH-GEX. 384Specify start point (in hex) when generating candidate moduli for DH-GEX.
385.It Fl s Ar ca_key
386Certify (sign) a public key using the specified CA key.
387Please see the
388.Sx CERTIFICATES
389section for details.
299.It Fl T Ar output_file 390.It Fl T Ar output_file
300Test DH group exchange candidate primes (generated using the 391Test DH group exchange candidate primes (generated using the
301.Fl G 392.Fl G
@@ -309,9 +400,29 @@ for protocol version 1 and
309or 400or
310.Dq dsa 401.Dq dsa
311for protocol version 2. 402for protocol version 2.
312.It Fl U Ar reader 403.It Fl V Ar validity_interval
313Upload an existing RSA private key into the smartcard in 404Specify a validity interval when signing a certificate.
314.Ar reader . 405A validity interval may consist of a single time, indicating that the
406certificate is valid beginning now and expiring at that time, or may consist
407of two times separated by a colon to indicate an explicit time interval.
408The start time may be specified as a date in YYYYMMDD format, a time
409in YYYYMMDDHHMMSS format or a relative time (to the current time) consisting
410of a minus sign followed by a relative time in the format described in the
411.Sx TIME FORMATS
412section of
413.Xr ssh_config 5 .
414The end time may be specified as a YYYYMMDD date, a YYYYMMDDHHMMSS time or
415a relative time starting with a plus character.
416.Pp
417For example:
418.Dq +52w1d
419(valid from now to 52 weeks and one day from now),
420.Dq -4w:+4w
421(valid from four weeks ago to four weeks from now),
422.Dq 20100101123000:20110101123000
423(valid from 12:30 PM, January 1st, 2010 to 12:30 PM, January 1st, 2011),
424.Dq -1d:20110101
425(valid from yesterday to midnight, January 1st, 2011).
315.It Fl v 426.It Fl v
316Verbose mode. 427Verbose mode.
317Causes 428Causes
@@ -382,6 +493,73 @@ Screened DH groups may be installed in
382.Pa /etc/moduli . 493.Pa /etc/moduli .
383It is important that this file contains moduli of a range of bit lengths and 494It is important that this file contains moduli of a range of bit lengths and
384that both ends of a connection share common moduli. 495that both ends of a connection share common moduli.
496.Sh CERTIFICATES
497.Nm
498supports signing of keys to produce certificates that may be used for
499user or host authentication.
500Certificates consist of a public key, some identity information, zero or
501more principal (user or host) names and an optional set of constraints that
502are signed by a Certification Authority (CA) key.
503Clients or servers may then trust only the CA key and verify its signature
504on a certificate rather than trusting many user/host keys.
505Note that OpenSSH certificates are a different, and much simpler, format to
506the X.509 certificates used in
507.Xr ssl 8 .
508.Pp
509.Nm
510supports two types of certificates: user and host.
511User certificates authenticate users to servers, whereas host certificates
512authenticate server hosts to users.
513To generate a user certificate:
514.Pp
515.Dl $ ssh-keygen -s /path/to/ca_key -I key_id /path/to/user_key.pub
516.Pp
517The resultant certificate will be placed in
518.Pa /path/to/user_key_cert.pub .
519A host certificate requires the
520.Fl h
521option:
522.Pp
523.Dl $ ssh-keygen -s /path/to/ca_key -I key_id -h /path/to/host_key.pub
524.Pp
525The host certificate will be output to
526.Pa /path/to/host_key_cert.pub .
527In both cases,
528.Ar key_id
529is a "key identifier" that is logged by the server when the certificate
530is used for authentication.
531.Pp
532Certificates may be limited to be valid for a set of principal (user/host)
533names.
534By default, generated certificates are valid for all users or hosts.
535To generate a certificate for a specified set of principals:
536.Pp
537.Dl $ ssh-keygen -s ca_key -I key_id -n user1,user2 user_key.pub
538.Dl $ ssh-keygen -s ca_key -I key_id -h -n host.domain user_key.pub
539.Pp
540Additional limitations on the validity and use of user certificates may
541be specified through certificate constraints.
542A constrained certificate may disable features of the SSH session, may be
543valid only when presented from particular source addresses or may
544force the use of a specific command.
545For a list of valid certificate constraints, see the documentation for the
546.Fl O
547option above.
548.Pp
549Finally, certificates may be defined with a validity lifetime.
550The
551.Fl V
552option allows specification of certificate start and end times.
553A certificate that is presented at a time outside this range will not be
554considered valid.
555By default, certificates have a maximum validity interval.
556.Pp
557For certificates to be used for user or host authentication, the CA
558public key must be trusted by
559.Xr sshd 8
560or
561.Xr ssh 1 .
562Please refer to those manual pages for details.
385.Sh FILES 563.Sh FILES
386.Bl -tag -width Ds 564.Bl -tag -width Ds
387.It Pa ~/.ssh/identity 565.It Pa ~/.ssh/identity
@@ -389,7 +567,7 @@ Contains the protocol version 1 RSA authentication identity of the user.
389This file should not be readable by anyone but the user. 567This file should not be readable by anyone but the user.
390It is possible to 568It is possible to
391specify a passphrase when generating the key; that passphrase will be 569specify a passphrase when generating the key; that passphrase will be
392used to encrypt the private part of this file using 3DES. 570used to encrypt the private part of this file using 128-bit AES.
393This file is not automatically accessed by 571This file is not automatically accessed by
394.Nm 572.Nm
395but it is offered as the default file for the private key. 573but it is offered as the default file for the private key.
@@ -407,7 +585,7 @@ Contains the protocol version 2 DSA authentication identity of the user.
407This file should not be readable by anyone but the user. 585This file should not be readable by anyone but the user.
408It is possible to 586It is possible to
409specify a passphrase when generating the key; that passphrase will be 587specify a passphrase when generating the key; that passphrase will be
410used to encrypt the private part of this file using 3DES. 588used to encrypt the private part of this file using 128-bit AES.
411This file is not automatically accessed by 589This file is not automatically accessed by
412.Nm 590.Nm
413but it is offered as the default file for the private key. 591but it is offered as the default file for the private key.
@@ -425,7 +603,7 @@ Contains the protocol version 2 RSA authentication identity of the user.
425This file should not be readable by anyone but the user. 603This file should not be readable by anyone but the user.
426It is possible to 604It is possible to
427specify a passphrase when generating the key; that passphrase will be 605specify a passphrase when generating the key; that passphrase will be
428used to encrypt the private part of this file using 3DES. 606used to encrypt the private part of this file using 128-bit AES.
429This file is not automatically accessed by 607This file is not automatically accessed by
430.Nm 608.Nm
431but it is offered as the default file for the private key. 609but it is offered as the default file for the private key.
diff --git a/ssh-keygen.c b/ssh-keygen.c
index da5db9845..dd662c907 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keygen.c,v 1.174 2009/06/22 05:39:28 dtucker Exp $ */ 1/* $OpenBSD: ssh-keygen.c,v 1.184 2010/03/07 22:16:01 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -48,9 +48,10 @@
48#include "match.h" 48#include "match.h"
49#include "hostfile.h" 49#include "hostfile.h"
50#include "dns.h" 50#include "dns.h"
51#include "ssh2.h"
51 52
52#ifdef SMARTCARD 53#ifdef ENABLE_PKCS11
53#include "scard.h" 54#include "ssh-pkcs11.h"
54#endif 55#endif
55 56
56/* Number of bits in the RSA/DSA key. This value can be set on the command line. */ 57/* Number of bits in the RSA/DSA key. This value can be set on the command line. */
@@ -81,6 +82,9 @@ int find_host = 0;
81/* Flag indicating that we want to delete a host from a known_hosts file */ 82/* Flag indicating that we want to delete a host from a known_hosts file */
82int delete_host = 0; 83int delete_host = 0;
83 84
85/* Flag indicating that we want to show the contents of a certificate */
86int show_cert = 0;
87
84/* Flag indicating that we just want to see the key fingerprint */ 88/* Flag indicating that we just want to see the key fingerprint */
85int print_fingerprint = 0; 89int print_fingerprint = 0;
86int print_bubblebabble = 0; 90int print_bubblebabble = 0;
@@ -98,6 +102,35 @@ char *identity_new_passphrase = NULL;
98/* This is set to the new comment if given on the command line. */ 102/* This is set to the new comment if given on the command line. */
99char *identity_comment = NULL; 103char *identity_comment = NULL;
100 104
105/* Path to CA key when certifying keys. */
106char *ca_key_path = NULL;
107
108/* Key type when certifying */
109u_int cert_key_type = SSH2_CERT_TYPE_USER;
110
111/* "key ID" of signed key */
112char *cert_key_id = NULL;
113
114/* Comma-separated list of principal names for certifying keys */
115char *cert_principals = NULL;
116
117/* Validity period for certificates */
118u_int64_t cert_valid_from = 0;
119u_int64_t cert_valid_to = ~0ULL;
120
121/* Certificate constraints */
122#define CONSTRAINT_X_FWD (1)
123#define CONSTRAINT_AGENT_FWD (1<<1)
124#define CONSTRAINT_PORT_FWD (1<<2)
125#define CONSTRAINT_PTY (1<<3)
126#define CONSTRAINT_USER_RC (1<<4)
127#define CONSTRAINT_DEFAULT (CONSTRAINT_X_FWD|CONSTRAINT_AGENT_FWD| \
128 CONSTRAINT_PORT_FWD|CONSTRAINT_PTY| \
129 CONSTRAINT_USER_RC)
130u_int32_t constraint_flags = CONSTRAINT_DEFAULT;
131char *constraint_command = NULL;
132char *constraint_src_addr = NULL;
133
101/* Dump public key file in format used by real and the original SSH 2 */ 134/* Dump public key file in format used by real and the original SSH 2 */
102int convert_to_ssh2 = 0; 135int convert_to_ssh2 = 0;
103int convert_from_ssh2 = 0; 136int convert_from_ssh2 = 0;
@@ -181,6 +214,7 @@ do_convert_to_ssh2(struct passwd *pw)
181 Key *k; 214 Key *k;
182 u_int len; 215 u_int len;
183 u_char *blob; 216 u_char *blob;
217 char comment[61];
184 struct stat st; 218 struct stat st;
185 219
186 if (!have_identity) 220 if (!have_identity)
@@ -203,11 +237,14 @@ do_convert_to_ssh2(struct passwd *pw)
203 fprintf(stderr, "key_to_blob failed\n"); 237 fprintf(stderr, "key_to_blob failed\n");
204 exit(1); 238 exit(1);
205 } 239 }
206 fprintf(stdout, "%s\n", SSH_COM_PUBLIC_BEGIN); 240 /* Comment + surrounds must fit into 72 chars (RFC 4716 sec 3.3) */
207 fprintf(stdout, 241 snprintf(comment, sizeof(comment),
208 "Comment: \"%u-bit %s, converted from OpenSSH by %s@%s\"\n", 242 "%u-bit %s, converted by %s@%s from OpenSSH",
209 key_size(k), key_type(k), 243 key_size(k), key_type(k),
210 pw->pw_name, hostname); 244 pw->pw_name, hostname);
245
246 fprintf(stdout, "%s\n", SSH_COM_PUBLIC_BEGIN);
247 fprintf(stdout, "Comment: \"%s\"\n", comment);
211 dump_base64(stdout, blob, len); 248 dump_base64(stdout, blob, len);
212 fprintf(stdout, "%s\n", SSH_COM_PUBLIC_END); 249 fprintf(stdout, "%s\n", SSH_COM_PUBLIC_END);
213 key_free(k); 250 key_free(k);
@@ -455,51 +492,29 @@ do_print_public(struct passwd *pw)
455 exit(0); 492 exit(0);
456} 493}
457 494
458#ifdef SMARTCARD
459static void 495static void
460do_upload(struct passwd *pw, const char *sc_reader_id) 496do_download(struct passwd *pw, char *pkcs11provider)
461{
462 Key *prv = NULL;
463 struct stat st;
464 int ret;
465
466 if (!have_identity)
467 ask_filename(pw, "Enter file in which the key is");
468 if (stat(identity_file, &st) < 0) {
469 perror(identity_file);
470 exit(1);
471 }
472 prv = load_identity(identity_file);
473 if (prv == NULL) {
474 error("load failed");
475 exit(1);
476 }
477 ret = sc_put_key(prv, sc_reader_id);
478 key_free(prv);
479 if (ret < 0)
480 exit(1);
481 logit("loading key done");
482 exit(0);
483}
484
485static void
486do_download(struct passwd *pw, const char *sc_reader_id)
487{ 497{
498#ifdef ENABLE_PKCS11
488 Key **keys = NULL; 499 Key **keys = NULL;
489 int i; 500 int i, nkeys;
490 501
491 keys = sc_get_keys(sc_reader_id, NULL); 502 pkcs11_init(0);
492 if (keys == NULL) 503 nkeys = pkcs11_add_provider(pkcs11provider, NULL, &keys);
493 fatal("cannot read public key from smartcard"); 504 if (nkeys <= 0)
494 for (i = 0; keys[i]; i++) { 505 fatal("cannot read public key from pkcs11");
506 for (i = 0; i < nkeys; i++) {
495 key_write(keys[i], stdout); 507 key_write(keys[i], stdout);
496 key_free(keys[i]); 508 key_free(keys[i]);
497 fprintf(stdout, "\n"); 509 fprintf(stdout, "\n");
498 } 510 }
499 xfree(keys); 511 xfree(keys);
512 pkcs11_terminate();
500 exit(0); 513 exit(0);
514#else
515 fatal("no pkcs11 support");
516#endif /* ENABLE_PKCS11 */
501} 517}
502#endif /* SMARTCARD */
503 518
504static void 519static void
505do_fingerprint(struct passwd *pw) 520do_fingerprint(struct passwd *pw)
@@ -524,7 +539,7 @@ do_fingerprint(struct passwd *pw)
524 public = key_load_public(identity_file, &comment); 539 public = key_load_public(identity_file, &comment);
525 if (public != NULL) { 540 if (public != NULL) {
526 fp = key_fingerprint(public, fptype, rep); 541 fp = key_fingerprint(public, fptype, rep);
527 ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART); 542 ra = key_fingerprint(public, SSH_FP_MD5, SSH_FP_RANDOMART);
528 printf("%u %s %s (%s)\n", key_size(public), fp, comment, 543 printf("%u %s %s (%s)\n", key_size(public), fp, comment,
529 key_type(public)); 544 key_type(public));
530 if (log_level >= SYSLOG_LEVEL_VERBOSE) 545 if (log_level >= SYSLOG_LEVEL_VERBOSE)
@@ -589,7 +604,7 @@ do_fingerprint(struct passwd *pw)
589 } 604 }
590 comment = *cp ? cp : comment; 605 comment = *cp ? cp : comment;
591 fp = key_fingerprint(public, fptype, rep); 606 fp = key_fingerprint(public, fptype, rep);
592 ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART); 607 ra = key_fingerprint(public, SSH_FP_MD5, SSH_FP_RANDOMART);
593 printf("%u %s %s (%s)\n", key_size(public), fp, 608 printf("%u %s %s (%s)\n", key_size(public), fp,
594 comment ? comment : "no comment", key_type(public)); 609 comment ? comment : "no comment", key_type(public));
595 if (log_level >= SYSLOG_LEVEL_VERBOSE) 610 if (log_level >= SYSLOG_LEVEL_VERBOSE)
@@ -609,7 +624,7 @@ do_fingerprint(struct passwd *pw)
609} 624}
610 625
611static void 626static void
612print_host(FILE *f, const char *name, Key *public, int hash) 627printhost(FILE *f, const char *name, Key *public, int ca, int hash)
613{ 628{
614 if (print_fingerprint) { 629 if (print_fingerprint) {
615 enum fp_rep rep; 630 enum fp_rep rep;
@@ -619,7 +634,7 @@ print_host(FILE *f, const char *name, Key *public, int hash)
619 fptype = print_bubblebabble ? SSH_FP_SHA1 : SSH_FP_MD5; 634 fptype = print_bubblebabble ? SSH_FP_SHA1 : SSH_FP_MD5;
620 rep = print_bubblebabble ? SSH_FP_BUBBLEBABBLE : SSH_FP_HEX; 635 rep = print_bubblebabble ? SSH_FP_BUBBLEBABBLE : SSH_FP_HEX;
621 fp = key_fingerprint(public, fptype, rep); 636 fp = key_fingerprint(public, fptype, rep);
622 ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART); 637 ra = key_fingerprint(public, SSH_FP_MD5, SSH_FP_RANDOMART);
623 printf("%u %s %s (%s)\n", key_size(public), fp, name, 638 printf("%u %s %s (%s)\n", key_size(public), fp, name,
624 key_type(public)); 639 key_type(public));
625 if (log_level >= SYSLOG_LEVEL_VERBOSE) 640 if (log_level >= SYSLOG_LEVEL_VERBOSE)
@@ -629,7 +644,7 @@ print_host(FILE *f, const char *name, Key *public, int hash)
629 } else { 644 } else {
630 if (hash && (name = host_hash(name, NULL, 0)) == NULL) 645 if (hash && (name = host_hash(name, NULL, 0)) == NULL)
631 fatal("hash_host failed"); 646 fatal("hash_host failed");
632 fprintf(f, "%s ", name); 647 fprintf(f, "%s%s%s ", ca ? CA_MARKER : "", ca ? " " : "", name);
633 if (!key_write(public, f)) 648 if (!key_write(public, f))
634 fatal("key_write failed"); 649 fatal("key_write failed");
635 fprintf(f, "\n"); 650 fprintf(f, "\n");
@@ -640,10 +655,11 @@ static void
640do_known_hosts(struct passwd *pw, const char *name) 655do_known_hosts(struct passwd *pw, const char *name)
641{ 656{
642 FILE *in, *out = stdout; 657 FILE *in, *out = stdout;
643 Key *public; 658 Key *pub;
644 char *cp, *cp2, *kp, *kp2; 659 char *cp, *cp2, *kp, *kp2;
645 char line[16*1024], tmp[MAXPATHLEN], old[MAXPATHLEN]; 660 char line[16*1024], tmp[MAXPATHLEN], old[MAXPATHLEN];
646 int c, skip = 0, inplace = 0, num = 0, invalid = 0, has_unhashed = 0; 661 int c, skip = 0, inplace = 0, num = 0, invalid = 0, has_unhashed = 0;
662 int ca;
647 663
648 if (!have_identity) { 664 if (!have_identity) {
649 cp = tilde_expand_filename(_PATH_SSH_USER_HOSTFILE, pw->pw_uid); 665 cp = tilde_expand_filename(_PATH_SSH_USER_HOSTFILE, pw->pw_uid);
@@ -699,9 +715,19 @@ do_known_hosts(struct passwd *pw, const char *name)
699 fprintf(out, "%s\n", cp); 715 fprintf(out, "%s\n", cp);
700 continue; 716 continue;
701 } 717 }
718 /* Check whether this is a CA key */
719 if (strncasecmp(cp, CA_MARKER, sizeof(CA_MARKER) - 1) == 0 &&
720 (cp[sizeof(CA_MARKER) - 1] == ' ' ||
721 cp[sizeof(CA_MARKER) - 1] == '\t')) {
722 ca = 1;
723 cp += sizeof(CA_MARKER);
724 } else
725 ca = 0;
726
702 /* Find the end of the host name portion. */ 727 /* Find the end of the host name portion. */
703 for (kp = cp; *kp && *kp != ' ' && *kp != '\t'; kp++) 728 for (kp = cp; *kp && *kp != ' ' && *kp != '\t'; kp++)
704 ; 729 ;
730
705 if (*kp == '\0' || *(kp + 1) == '\0') { 731 if (*kp == '\0' || *(kp + 1) == '\0') {
706 error("line %d missing key: %.40s...", 732 error("line %d missing key: %.40s...",
707 num, line); 733 num, line);
@@ -711,15 +737,15 @@ do_known_hosts(struct passwd *pw, const char *name)
711 *kp++ = '\0'; 737 *kp++ = '\0';
712 kp2 = kp; 738 kp2 = kp;
713 739
714 public = key_new(KEY_RSA1); 740 pub = key_new(KEY_RSA1);
715 if (key_read(public, &kp) != 1) { 741 if (key_read(pub, &kp) != 1) {
716 kp = kp2; 742 kp = kp2;
717 key_free(public); 743 key_free(pub);
718 public = key_new(KEY_UNSPEC); 744 pub = key_new(KEY_UNSPEC);
719 if (key_read(public, &kp) != 1) { 745 if (key_read(pub, &kp) != 1) {
720 error("line %d invalid key: %.40s...", 746 error("line %d invalid key: %.40s...",
721 num, line); 747 num, line);
722 key_free(public); 748 key_free(pub);
723 invalid = 1; 749 invalid = 1;
724 continue; 750 continue;
725 } 751 }
@@ -737,43 +763,52 @@ do_known_hosts(struct passwd *pw, const char *name)
737 c = (strcmp(cp2, cp) == 0); 763 c = (strcmp(cp2, cp) == 0);
738 if (find_host && c) { 764 if (find_host && c) {
739 printf("# Host %s found: " 765 printf("# Host %s found: "
740 "line %d type %s\n", name, 766 "line %d type %s%s\n", name,
741 num, key_type(public)); 767 num, key_type(pub),
742 print_host(out, cp, public, 0); 768 ca ? " (CA key)" : "");
769 printhost(out, cp, pub, ca, 0);
743 } 770 }
744 if (delete_host && !c) 771 if (delete_host && !c && !ca)
745 print_host(out, cp, public, 0); 772 printhost(out, cp, pub, ca, 0);
746 } else if (hash_hosts) 773 } else if (hash_hosts)
747 print_host(out, cp, public, 0); 774 printhost(out, cp, pub, ca, 0);
748 } else { 775 } else {
749 if (find_host || delete_host) { 776 if (find_host || delete_host) {
750 c = (match_hostname(name, cp, 777 c = (match_hostname(name, cp,
751 strlen(cp)) == 1); 778 strlen(cp)) == 1);
752 if (find_host && c) { 779 if (find_host && c) {
753 printf("# Host %s found: " 780 printf("# Host %s found: "
754 "line %d type %s\n", name, 781 "line %d type %s%s\n", name,
755 num, key_type(public)); 782 num, key_type(pub),
756 print_host(out, name, public, 783 ca ? " (CA key)" : "");
757 hash_hosts); 784 printhost(out, name, pub,
785 ca, hash_hosts && !ca);
758 } 786 }
759 if (delete_host && !c) 787 if (delete_host && !c && !ca)
760 print_host(out, cp, public, 0); 788 printhost(out, cp, pub, ca, 0);
761 } else if (hash_hosts) { 789 } else if (hash_hosts) {
762 for (cp2 = strsep(&cp, ","); 790 for (cp2 = strsep(&cp, ",");
763 cp2 != NULL && *cp2 != '\0'; 791 cp2 != NULL && *cp2 != '\0';
764 cp2 = strsep(&cp, ",")) { 792 cp2 = strsep(&cp, ",")) {
765 if (strcspn(cp2, "*?!") != strlen(cp2)) 793 if (ca) {
794 fprintf(stderr, "Warning: "
795 "ignoring CA key for host: "
796 "%.64s\n", cp2);
797 printhost(out, cp2, pub, ca, 0);
798 } else if (strcspn(cp2, "*?!") !=
799 strlen(cp2)) {
766 fprintf(stderr, "Warning: " 800 fprintf(stderr, "Warning: "
767 "ignoring host name with " 801 "ignoring host name with "
768 "metacharacters: %.64s\n", 802 "metacharacters: %.64s\n",
769 cp2); 803 cp2);
770 else 804 printhost(out, cp2, pub, ca, 0);
771 print_host(out, cp2, public, 1); 805 } else
806 printhost(out, cp2, pub, ca, 1);
772 } 807 }
773 has_unhashed = 1; 808 has_unhashed = 1;
774 } 809 }
775 } 810 }
776 key_free(public); 811 key_free(pub);
777 } 812 }
778 fclose(in); 813 fclose(in);
779 814
@@ -1030,6 +1065,391 @@ do_change_comment(struct passwd *pw)
1030 exit(0); 1065 exit(0);
1031} 1066}
1032 1067
1068static const char *
1069fmt_validity(u_int64_t valid_from, u_int64_t valid_to)
1070{
1071 char from[32], to[32];
1072 static char ret[64];
1073 time_t tt;
1074 struct tm *tm;
1075
1076 *from = *to = '\0';
1077 if (valid_from == 0 && valid_to == 0xffffffffffffffffULL)
1078 return "forever";
1079
1080 if (valid_from != 0) {
1081 /* XXX revisit INT_MAX in 2038 :) */
1082 tt = valid_from > INT_MAX ? INT_MAX : valid_from;
1083 tm = localtime(&tt);
1084 strftime(from, sizeof(from), "%Y-%m-%dT%H:%M:%S", tm);
1085 }
1086 if (valid_to != 0xffffffffffffffffULL) {
1087 /* XXX revisit INT_MAX in 2038 :) */
1088 tt = valid_to > INT_MAX ? INT_MAX : valid_to;
1089 tm = localtime(&tt);
1090 strftime(to, sizeof(to), "%Y-%m-%dT%H:%M:%S", tm);
1091 }
1092
1093 if (valid_from == 0) {
1094 snprintf(ret, sizeof(ret), "before %s", to);
1095 return ret;
1096 }
1097 if (valid_to == 0xffffffffffffffffULL) {
1098 snprintf(ret, sizeof(ret), "after %s", from);
1099 return ret;
1100 }
1101
1102 snprintf(ret, sizeof(ret), "from %s to %s", from, to);
1103 return ret;
1104}
1105
1106static void
1107add_flag_constraint(Buffer *c, const char *name)
1108{
1109 debug3("%s: %s", __func__, name);
1110 buffer_put_cstring(c, name);
1111 buffer_put_string(c, NULL, 0);
1112}
1113
1114static void
1115add_string_constraint(Buffer *c, const char *name, const char *value)
1116{
1117 Buffer b;
1118
1119 debug3("%s: %s=%s", __func__, name, value);
1120 buffer_init(&b);
1121 buffer_put_cstring(&b, value);
1122
1123 buffer_put_cstring(c, name);
1124 buffer_put_string(c, buffer_ptr(&b), buffer_len(&b));
1125
1126 buffer_free(&b);
1127}
1128
1129static void
1130prepare_constraint_buf(Buffer *c)
1131{
1132
1133 buffer_clear(c);
1134 if ((constraint_flags & CONSTRAINT_X_FWD) != 0)
1135 add_flag_constraint(c, "permit-X11-forwarding");
1136 if ((constraint_flags & CONSTRAINT_AGENT_FWD) != 0)
1137 add_flag_constraint(c, "permit-agent-forwarding");
1138 if ((constraint_flags & CONSTRAINT_PORT_FWD) != 0)
1139 add_flag_constraint(c, "permit-port-forwarding");
1140 if ((constraint_flags & CONSTRAINT_PTY) != 0)
1141 add_flag_constraint(c, "permit-pty");
1142 if ((constraint_flags & CONSTRAINT_USER_RC) != 0)
1143 add_flag_constraint(c, "permit-user-rc");
1144 if (constraint_command != NULL)
1145 add_string_constraint(c, "force-command", constraint_command);
1146 if (constraint_src_addr != NULL)
1147 add_string_constraint(c, "source-address", constraint_src_addr);
1148}
1149
1150static void
1151do_ca_sign(struct passwd *pw, int argc, char **argv)
1152{
1153 int i, fd;
1154 u_int n;
1155 Key *ca, *public;
1156 char *otmp, *tmp, *cp, *out, *comment, **plist = NULL;
1157 FILE *f;
1158
1159 tmp = tilde_expand_filename(ca_key_path, pw->pw_uid);
1160 if ((ca = load_identity(tmp)) == NULL)
1161 fatal("Couldn't load CA key \"%s\"", tmp);
1162 xfree(tmp);
1163
1164 for (i = 0; i < argc; i++) {
1165 /* Split list of principals */
1166 n = 0;
1167 if (cert_principals != NULL) {
1168 otmp = tmp = xstrdup(cert_principals);
1169 plist = NULL;
1170 for (; (cp = strsep(&tmp, ",")) != NULL; n++) {
1171 plist = xrealloc(plist, n + 1, sizeof(*plist));
1172 if (*(plist[n] = xstrdup(cp)) == '\0')
1173 fatal("Empty principal name");
1174 }
1175 xfree(otmp);
1176 }
1177
1178 tmp = tilde_expand_filename(argv[i], pw->pw_uid);
1179 if ((public = key_load_public(tmp, &comment)) == NULL)
1180 fatal("%s: unable to open \"%s\"", __func__, tmp);
1181 if (public->type != KEY_RSA && public->type != KEY_DSA)
1182 fatal("%s: key \"%s\" type %s cannot be certified",
1183 __func__, tmp, key_type(public));
1184
1185 /* Prepare certificate to sign */
1186 if (key_to_certified(public) != 0)
1187 fatal("Could not upgrade key %s to certificate", tmp);
1188 public->cert->type = cert_key_type;
1189 public->cert->key_id = xstrdup(cert_key_id);
1190 public->cert->nprincipals = n;
1191 public->cert->principals = plist;
1192 public->cert->valid_after = cert_valid_from;
1193 public->cert->valid_before = cert_valid_to;
1194 prepare_constraint_buf(&public->cert->constraints);
1195 public->cert->signature_key = key_from_private(ca);
1196
1197 if (key_certify(public, ca) != 0)
1198 fatal("Couldn't not certify key %s", tmp);
1199
1200 if ((cp = strrchr(tmp, '.')) != NULL && strcmp(cp, ".pub") == 0)
1201 *cp = '\0';
1202 xasprintf(&out, "%s-cert.pub", tmp);
1203 xfree(tmp);
1204
1205 if ((fd = open(out, O_WRONLY|O_CREAT|O_TRUNC, 0644)) == -1)
1206 fatal("Could not open \"%s\" for writing: %s", out,
1207 strerror(errno));
1208 if ((f = fdopen(fd, "w")) == NULL)
1209 fatal("%s: fdopen: %s", __func__, strerror(errno));
1210 if (!key_write(public, f))
1211 fatal("Could not write certified key to %s", out);
1212 fprintf(f, " %s\n", comment);
1213 fclose(f);
1214
1215 if (!quiet)
1216 logit("Signed %s key %s: id \"%s\"%s%s valid %s",
1217 cert_key_type == SSH2_CERT_TYPE_USER?"user":"host",
1218 out, cert_key_id,
1219 cert_principals != NULL ? " for " : "",
1220 cert_principals != NULL ? cert_principals : "",
1221 fmt_validity(cert_valid_from, cert_valid_to));
1222
1223 key_free(public);
1224 xfree(out);
1225 }
1226 exit(0);
1227}
1228
1229static u_int64_t
1230parse_relative_time(const char *s, time_t now)
1231{
1232 int64_t mul, secs;
1233
1234 mul = *s == '-' ? -1 : 1;
1235
1236 if ((secs = convtime(s + 1)) == -1)
1237 fatal("Invalid relative certificate time %s", s);
1238 if (mul == -1 && secs > now)
1239 fatal("Certificate time %s cannot be represented", s);
1240 return now + (u_int64_t)(secs * mul);
1241}
1242
1243static u_int64_t
1244parse_absolute_time(const char *s)
1245{
1246 struct tm tm;
1247 time_t tt;
1248 char buf[32], *fmt;
1249
1250 /*
1251 * POSIX strptime says "The application shall ensure that there
1252 * is white-space or other non-alphanumeric characters between
1253 * any two conversion specifications" so arrange things this way.
1254 */
1255 switch (strlen(s)) {
1256 case 8:
1257 fmt = "%Y-%m-%d";
1258 snprintf(buf, sizeof(buf), "%.4s-%.2s-%.2s", s, s + 4, s + 6);
1259 break;
1260 case 14:
1261 fmt = "%Y-%m-%dT%H:%M:%S";
1262 snprintf(buf, sizeof(buf), "%.4s-%.2s-%.2sT%.2s:%.2s:%.2s",
1263 s, s + 4, s + 6, s + 8, s + 10, s + 12);
1264 break;
1265 default:
1266 fatal("Invalid certificate time format %s", s);
1267 }
1268
1269 bzero(&tm, sizeof(tm));
1270 if (strptime(buf, fmt, &tm) == NULL)
1271 fatal("Invalid certificate time %s", s);
1272 if ((tt = mktime(&tm)) < 0)
1273 fatal("Certificate time %s cannot be represented", s);
1274 return (u_int64_t)tt;
1275}
1276
1277static void
1278parse_cert_times(char *timespec)
1279{
1280 char *from, *to;
1281 time_t now = time(NULL);
1282 int64_t secs;
1283
1284 /* +timespec relative to now */
1285 if (*timespec == '+' && strchr(timespec, ':') == NULL) {
1286 if ((secs = convtime(timespec + 1)) == -1)
1287 fatal("Invalid relative certificate life %s", timespec);
1288 cert_valid_to = now + secs;
1289 /*
1290 * Backdate certificate one minute to avoid problems on hosts
1291 * with poorly-synchronised clocks.
1292 */
1293 cert_valid_from = ((now - 59)/ 60) * 60;
1294 return;
1295 }
1296
1297 /*
1298 * from:to, where
1299 * from := [+-]timespec | YYYYMMDD | YYYYMMDDHHMMSS
1300 * to := [+-]timespec | YYYYMMDD | YYYYMMDDHHMMSS
1301 */
1302 from = xstrdup(timespec);
1303 to = strchr(from, ':');
1304 if (to == NULL || from == to || *(to + 1) == '\0')
1305 fatal("Invalid certificate life specification %s", timespec);
1306 *to++ = '\0';
1307
1308 if (*from == '-' || *from == '+')
1309 cert_valid_from = parse_relative_time(from, now);
1310 else
1311 cert_valid_from = parse_absolute_time(from);
1312
1313 if (*to == '-' || *to == '+')
1314 cert_valid_to = parse_relative_time(to, cert_valid_from);
1315 else
1316 cert_valid_to = parse_absolute_time(to);
1317
1318 if (cert_valid_to <= cert_valid_from)
1319 fatal("Empty certificate validity interval");
1320 xfree(from);
1321}
1322
1323static void
1324add_cert_constraint(char *opt)
1325{
1326 char *val;
1327
1328 if (strcmp(opt, "clear") == 0)
1329 constraint_flags = 0;
1330 else if (strcasecmp(opt, "no-x11-forwarding") == 0)
1331 constraint_flags &= ~CONSTRAINT_X_FWD;
1332 else if (strcasecmp(opt, "permit-x11-forwarding") == 0)
1333 constraint_flags |= CONSTRAINT_X_FWD;
1334 else if (strcasecmp(opt, "no-agent-forwarding") == 0)
1335 constraint_flags &= ~CONSTRAINT_AGENT_FWD;
1336 else if (strcasecmp(opt, "permit-agent-forwarding") == 0)
1337 constraint_flags |= CONSTRAINT_AGENT_FWD;
1338 else if (strcasecmp(opt, "no-port-forwarding") == 0)
1339 constraint_flags &= ~CONSTRAINT_PORT_FWD;
1340 else if (strcasecmp(opt, "permit-port-forwarding") == 0)
1341 constraint_flags |= CONSTRAINT_PORT_FWD;
1342 else if (strcasecmp(opt, "no-pty") == 0)
1343 constraint_flags &= ~CONSTRAINT_PTY;
1344 else if (strcasecmp(opt, "permit-pty") == 0)
1345 constraint_flags |= CONSTRAINT_PTY;
1346 else if (strcasecmp(opt, "no-user-rc") == 0)
1347 constraint_flags &= ~CONSTRAINT_USER_RC;
1348 else if (strcasecmp(opt, "permit-user-rc") == 0)
1349 constraint_flags |= CONSTRAINT_USER_RC;
1350 else if (strncasecmp(opt, "force-command=", 14) == 0) {
1351 val = opt + 14;
1352 if (*val == '\0')
1353 fatal("Empty force-command constraint");
1354 if (constraint_command != NULL)
1355 fatal("force-command already specified");
1356 constraint_command = xstrdup(val);
1357 } else if (strncasecmp(opt, "source-address=", 15) == 0) {
1358 val = opt + 15;
1359 if (*val == '\0')
1360 fatal("Empty source-address constraint");
1361 if (constraint_src_addr != NULL)
1362 fatal("source-address already specified");
1363 if (addr_match_cidr_list(NULL, val) != 0)
1364 fatal("Invalid source-address list");
1365 constraint_src_addr = xstrdup(val);
1366 } else
1367 fatal("Unsupported certificate constraint \"%s\"", opt);
1368}
1369
1370static void
1371do_show_cert(struct passwd *pw)
1372{
1373 Key *key;
1374 struct stat st;
1375 char *key_fp, *ca_fp;
1376 Buffer constraints, constraint;
1377 u_char *name, *data;
1378 u_int i, dlen;
1379
1380 if (!have_identity)
1381 ask_filename(pw, "Enter file in which the key is");
1382 if (stat(identity_file, &st) < 0) {
1383 perror(identity_file);
1384 exit(1);
1385 }
1386 if ((key = key_load_public(identity_file, NULL)) == NULL)
1387 fatal("%s is not a public key", identity_file);
1388 if (!key_is_cert(key))
1389 fatal("%s is not a certificate", identity_file);
1390
1391 key_fp = key_fingerprint(key, SSH_FP_MD5, SSH_FP_HEX);
1392 ca_fp = key_fingerprint(key->cert->signature_key,
1393 SSH_FP_MD5, SSH_FP_HEX);
1394
1395 printf("%s:\n", identity_file);
1396 printf(" %s certificate %s\n", key_type(key), key_fp);
1397 printf(" Signed by %s CA %s\n",
1398 key_type(key->cert->signature_key), ca_fp);
1399 printf(" Key ID \"%s\"\n", key->cert->key_id);
1400 printf(" Valid: %s\n",
1401 fmt_validity(key->cert->valid_after, key->cert->valid_before));
1402 printf(" Principals: ");
1403 if (key->cert->nprincipals == 0)
1404 printf("(none)\n");
1405 else {
1406 for (i = 0; i < key->cert->nprincipals; i++)
1407 printf("\n %s",
1408 key->cert->principals[i]);
1409 printf("\n");
1410 }
1411 printf(" Constraints: ");
1412 if (buffer_len(&key->cert->constraints) == 0)
1413 printf("(none)\n");
1414 else {
1415 printf("\n");
1416 buffer_init(&constraints);
1417 buffer_append(&constraints,
1418 buffer_ptr(&key->cert->constraints),
1419 buffer_len(&key->cert->constraints));
1420 buffer_init(&constraint);
1421 while (buffer_len(&constraints) != 0) {
1422 name = buffer_get_string(&constraints, NULL);
1423 data = buffer_get_string_ptr(&constraints, &dlen);
1424 buffer_append(&constraint, data, dlen);
1425 printf(" %s", name);
1426 if (strcmp(name, "permit-X11-forwarding") == 0 ||
1427 strcmp(name, "permit-agent-forwarding") == 0 ||
1428 strcmp(name, "permit-port-forwarding") == 0 ||
1429 strcmp(name, "permit-pty") == 0 ||
1430 strcmp(name, "permit-user-rc") == 0)
1431 printf("\n");
1432 else if (strcmp(name, "force-command") == 0 ||
1433 strcmp(name, "source-address") == 0) {
1434 data = buffer_get_string(&constraint, NULL);
1435 printf(" %s\n", data);
1436 xfree(data);
1437 } else {
1438 printf(" UNKNOWN CONSTRAINT (len %u)\n",
1439 buffer_len(&constraint));
1440 buffer_clear(&constraint);
1441 }
1442 xfree(name);
1443 if (buffer_len(&constraint) != 0)
1444 fatal("Constraint corrupt: extra data at end");
1445 }
1446 buffer_free(&constraint);
1447 buffer_free(&constraints);
1448 }
1449
1450 exit(0);
1451}
1452
1033static void 1453static void
1034usage(void) 1454usage(void)
1035{ 1455{
@@ -1040,30 +1460,34 @@ usage(void)
1040 fprintf(stderr, " -b bits Number of bits in the key to create.\n"); 1460 fprintf(stderr, " -b bits Number of bits in the key to create.\n");
1041 fprintf(stderr, " -C comment Provide new comment.\n"); 1461 fprintf(stderr, " -C comment Provide new comment.\n");
1042 fprintf(stderr, " -c Change comment in private and public key files.\n"); 1462 fprintf(stderr, " -c Change comment in private and public key files.\n");
1043#ifdef SMARTCARD 1463#ifdef ENABLE_PKCS11
1044 fprintf(stderr, " -D reader Download public key from smartcard.\n"); 1464 fprintf(stderr, " -D pkcs11 Download public key from pkcs11 token.\n");
1045#endif /* SMARTCARD */ 1465#endif
1046 fprintf(stderr, " -e Convert OpenSSH to RFC 4716 key file.\n"); 1466 fprintf(stderr, " -e Convert OpenSSH to RFC 4716 key file.\n");
1047 fprintf(stderr, " -F hostname Find hostname in known hosts file.\n"); 1467 fprintf(stderr, " -F hostname Find hostname in known hosts file.\n");
1048 fprintf(stderr, " -f filename Filename of the key file.\n"); 1468 fprintf(stderr, " -f filename Filename of the key file.\n");
1049 fprintf(stderr, " -G file Generate candidates for DH-GEX moduli.\n"); 1469 fprintf(stderr, " -G file Generate candidates for DH-GEX moduli.\n");
1050 fprintf(stderr, " -g Use generic DNS resource record format.\n"); 1470 fprintf(stderr, " -g Use generic DNS resource record format.\n");
1051 fprintf(stderr, " -H Hash names in known_hosts file.\n"); 1471 fprintf(stderr, " -H Hash names in known_hosts file.\n");
1472 fprintf(stderr, " -h Generate host certificate instead of a user certificate.\n");
1473 fprintf(stderr, " -I key_id Key identifier to include in certificate.\n");
1052 fprintf(stderr, " -i Convert RFC 4716 to OpenSSH key file.\n"); 1474 fprintf(stderr, " -i Convert RFC 4716 to OpenSSH key file.\n");
1475 fprintf(stderr, " -L Print the contents of a certificate.\n");
1053 fprintf(stderr, " -l Show fingerprint of key file.\n"); 1476 fprintf(stderr, " -l Show fingerprint of key file.\n");
1054 fprintf(stderr, " -M memory Amount of memory (MB) to use for generating DH-GEX moduli.\n"); 1477 fprintf(stderr, " -M memory Amount of memory (MB) to use for generating DH-GEX moduli.\n");
1478 fprintf(stderr, " -n name,... User/host principal names to include in certificate\n");
1055 fprintf(stderr, " -N phrase Provide new passphrase.\n"); 1479 fprintf(stderr, " -N phrase Provide new passphrase.\n");
1480 fprintf(stderr, " -O cnstr Specify a certificate constraint.\n");
1056 fprintf(stderr, " -P phrase Provide old passphrase.\n"); 1481 fprintf(stderr, " -P phrase Provide old passphrase.\n");
1057 fprintf(stderr, " -p Change passphrase of private key file.\n"); 1482 fprintf(stderr, " -p Change passphrase of private key file.\n");
1058 fprintf(stderr, " -q Quiet.\n"); 1483 fprintf(stderr, " -q Quiet.\n");
1059 fprintf(stderr, " -R hostname Remove host from known_hosts file.\n"); 1484 fprintf(stderr, " -R hostname Remove host from known_hosts file.\n");
1060 fprintf(stderr, " -r hostname Print DNS resource record.\n"); 1485 fprintf(stderr, " -r hostname Print DNS resource record.\n");
1486 fprintf(stderr, " -s ca_key Certify keys with CA key.\n");
1061 fprintf(stderr, " -S start Start point (hex) for generating DH-GEX moduli.\n"); 1487 fprintf(stderr, " -S start Start point (hex) for generating DH-GEX moduli.\n");
1062 fprintf(stderr, " -T file Screen candidates for DH-GEX moduli.\n"); 1488 fprintf(stderr, " -T file Screen candidates for DH-GEX moduli.\n");
1063 fprintf(stderr, " -t type Specify type of key to create.\n"); 1489 fprintf(stderr, " -t type Specify type of key to create.\n");
1064#ifdef SMARTCARD 1490 fprintf(stderr, " -V from:to Specify certificate validity interval.\n");
1065 fprintf(stderr, " -U reader Upload private key to smartcard.\n");
1066#endif /* SMARTCARD */
1067 fprintf(stderr, " -v Verbose.\n"); 1491 fprintf(stderr, " -v Verbose.\n");
1068 fprintf(stderr, " -W gen Generator to use for generating DH-GEX moduli.\n"); 1492 fprintf(stderr, " -W gen Generator to use for generating DH-GEX moduli.\n");
1069 fprintf(stderr, " -y Read private key file and print public key.\n"); 1493 fprintf(stderr, " -y Read private key file and print public key.\n");
@@ -1078,12 +1502,12 @@ int
1078main(int argc, char **argv) 1502main(int argc, char **argv)
1079{ 1503{
1080 char dotsshdir[MAXPATHLEN], comment[1024], *passphrase1, *passphrase2; 1504 char dotsshdir[MAXPATHLEN], comment[1024], *passphrase1, *passphrase2;
1081 char out_file[MAXPATHLEN], *reader_id = NULL; 1505 char out_file[MAXPATHLEN], *pkcs11provider = NULL;
1082 char *rr_hostname = NULL; 1506 char *rr_hostname = NULL;
1083 Key *private, *public; 1507 Key *private, *public;
1084 struct passwd *pw; 1508 struct passwd *pw;
1085 struct stat st; 1509 struct stat st;
1086 int opt, type, fd, download = 0; 1510 int opt, type, fd;
1087 u_int32_t memory = 0, generator_wanted = 0, trials = 100; 1511 u_int32_t memory = 0, generator_wanted = 0, trials = 100;
1088 int do_gen_candidates = 0, do_screen_candidates = 0; 1512 int do_gen_candidates = 0, do_screen_candidates = 0;
1089 BIGNUM *start = NULL; 1513 BIGNUM *start = NULL;
@@ -1115,8 +1539,8 @@ main(int argc, char **argv)
1115 exit(1); 1539 exit(1);
1116 } 1540 }
1117 1541
1118 while ((opt = getopt(argc, argv, 1542 while ((opt = getopt(argc, argv, "degiqpclBHLhvxXyF:b:f:t:D:I:P:N:n:"
1119 "degiqpclBHvxXyF:b:f:t:U:D:P:N:C:r:g:R:T:G:M:S:a:W:")) != -1) { 1543 "O:C:r:g:R:T:G:M:S:s:a:V:W:")) != -1) {
1120 switch (opt) { 1544 switch (opt) {
1121 case 'b': 1545 case 'b':
1122 bits = (u_int32_t)strtonum(optarg, 768, 32768, &errstr); 1546 bits = (u_int32_t)strtonum(optarg, 768, 32768, &errstr);
@@ -1131,16 +1555,25 @@ main(int argc, char **argv)
1131 case 'H': 1555 case 'H':
1132 hash_hosts = 1; 1556 hash_hosts = 1;
1133 break; 1557 break;
1558 case 'I':
1559 cert_key_id = optarg;
1560 break;
1134 case 'R': 1561 case 'R':
1135 delete_host = 1; 1562 delete_host = 1;
1136 rr_hostname = optarg; 1563 rr_hostname = optarg;
1137 break; 1564 break;
1565 case 'L':
1566 show_cert = 1;
1567 break;
1138 case 'l': 1568 case 'l':
1139 print_fingerprint = 1; 1569 print_fingerprint = 1;
1140 break; 1570 break;
1141 case 'B': 1571 case 'B':
1142 print_bubblebabble = 1; 1572 print_bubblebabble = 1;
1143 break; 1573 break;
1574 case 'n':
1575 cert_principals = optarg;
1576 break;
1144 case 'p': 1577 case 'p':
1145 change_passphrase = 1; 1578 change_passphrase = 1;
1146 break; 1579 break;
@@ -1162,6 +1595,9 @@ main(int argc, char **argv)
1162 case 'N': 1595 case 'N':
1163 identity_new_passphrase = optarg; 1596 identity_new_passphrase = optarg;
1164 break; 1597 break;
1598 case 'O':
1599 add_cert_constraint(optarg);
1600 break;
1165 case 'C': 1601 case 'C':
1166 identity_comment = optarg; 1602 identity_comment = optarg;
1167 break; 1603 break;
@@ -1173,6 +1609,10 @@ main(int argc, char **argv)
1173 /* export key */ 1609 /* export key */
1174 convert_to_ssh2 = 1; 1610 convert_to_ssh2 = 1;
1175 break; 1611 break;
1612 case 'h':
1613 cert_key_type = SSH2_CERT_TYPE_HOST;
1614 constraint_flags = 0;
1615 break;
1176 case 'i': 1616 case 'i':
1177 case 'X': 1617 case 'X':
1178 /* import key */ 1618 /* import key */
@@ -1184,14 +1624,14 @@ main(int argc, char **argv)
1184 case 'd': 1624 case 'd':
1185 key_type_name = "dsa"; 1625 key_type_name = "dsa";
1186 break; 1626 break;
1627 case 's':
1628 ca_key_path = optarg;
1629 break;
1187 case 't': 1630 case 't':
1188 key_type_name = optarg; 1631 key_type_name = optarg;
1189 break; 1632 break;
1190 case 'D': 1633 case 'D':
1191 download = 1; 1634 pkcs11provider = optarg;
1192 /*FALLTHROUGH*/
1193 case 'U':
1194 reader_id = optarg;
1195 break; 1635 break;
1196 case 'v': 1636 case 'v':
1197 if (log_level == SYSLOG_LEVEL_INFO) 1637 if (log_level == SYSLOG_LEVEL_INFO)
@@ -1241,6 +1681,9 @@ main(int argc, char **argv)
1241 if (BN_hex2bn(&start, optarg) == 0) 1681 if (BN_hex2bn(&start, optarg) == 0)
1242 fatal("Invalid start point."); 1682 fatal("Invalid start point.");
1243 break; 1683 break;
1684 case 'V':
1685 parse_cert_times(optarg);
1686 break;
1244 case '?': 1687 case '?':
1245 default: 1688 default:
1246 usage(); 1689 usage();
@@ -1250,7 +1693,15 @@ main(int argc, char **argv)
1250 /* reinit */ 1693 /* reinit */
1251 log_init(argv[0], log_level, SYSLOG_FACILITY_USER, 1); 1694 log_init(argv[0], log_level, SYSLOG_FACILITY_USER, 1);
1252 1695
1253 if (optind < argc) { 1696 argv += optind;
1697 argc -= optind;
1698
1699 if (ca_key_path != NULL) {
1700 if (argc < 1) {
1701 printf("Too few arguments.\n");
1702 usage();
1703 }
1704 } else if (argc > 0) {
1254 printf("Too many arguments.\n"); 1705 printf("Too many arguments.\n");
1255 usage(); 1706 usage();
1256 } 1707 }
@@ -1262,6 +1713,13 @@ main(int argc, char **argv)
1262 printf("Cannot use -l with -D or -R.\n"); 1713 printf("Cannot use -l with -D or -R.\n");
1263 usage(); 1714 usage();
1264 } 1715 }
1716 if (ca_key_path != NULL) {
1717 if (cert_key_id == NULL)
1718 fatal("Must specify key id (-I) when certifying");
1719 do_ca_sign(pw, argc, argv);
1720 }
1721 if (show_cert)
1722 do_show_cert(pw);
1265 if (delete_host || hash_hosts || find_host) 1723 if (delete_host || hash_hosts || find_host)
1266 do_known_hosts(pw, rr_hostname); 1724 do_known_hosts(pw, rr_hostname);
1267 if (print_fingerprint || print_bubblebabble) 1725 if (print_fingerprint || print_bubblebabble)
@@ -1299,16 +1757,8 @@ main(int argc, char **argv)
1299 exit(0); 1757 exit(0);
1300 } 1758 }
1301 } 1759 }
1302 if (reader_id != NULL) { 1760 if (pkcs11provider != NULL)
1303#ifdef SMARTCARD 1761 do_download(pw, pkcs11provider);
1304 if (download)
1305 do_download(pw, reader_id);
1306 else
1307 do_upload(pw, reader_id);
1308#else /* SMARTCARD */
1309 fatal("no support for smartcards.");
1310#endif /* SMARTCARD */
1311 }
1312 1762
1313 if (do_gen_candidates) { 1763 if (do_gen_candidates) {
1314 FILE *out = fopen(out_file, "w"); 1764 FILE *out = fopen(out_file, "w");
diff --git a/ssh-keyscan.0 b/ssh-keyscan.0
index bc7c1bb67..1100a69b6 100644
--- a/ssh-keyscan.0
+++ b/ssh-keyscan.0
@@ -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 4.6 December 29, 2008 2 107OpenBSD 4.6 January 9, 2010 2
diff --git a/ssh-keyscan.1 b/ssh-keyscan.1
index 4a5864566..78255ff79 100644
--- a/ssh-keyscan.1
+++ b/ssh-keyscan.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ssh-keyscan.1,v 1.26 2008/12/29 01:12:36 stevesk Exp $ 1.\" $OpenBSD: ssh-keyscan.1,v 1.28 2010/01/09 23:04:13 dtucker 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.\"
@@ -6,7 +6,7 @@
6.\" permitted provided that due credit is given to the author and the 6.\" permitted provided that due credit is given to the author and the
7.\" OpenBSD project by leaving this copyright notice intact. 7.\" OpenBSD project by leaving this copyright notice intact.
8.\" 8.\"
9.Dd $Mdocdate: December 29 2008 $ 9.Dd $Mdocdate: January 9 2010 $
10.Dt SSH-KEYSCAN 1 10.Dt SSH-KEYSCAN 1
11.Os 11.Os
12.Sh NAME 12.Sh NAME
diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index 9a91be499..7afe446ae 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keyscan.c,v 1.78 2009/01/22 10:02:34 djm Exp $ */ 1/* $OpenBSD: ssh-keyscan.c,v 1.81 2010/01/09 23:04:13 dtucker 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 *
diff --git a/ssh-keysign.c b/ssh-keysign.c
index c4bc7e56e..0fdcebbd2 100644
--- a/ssh-keysign.c
+++ b/ssh-keysign.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keysign.c,v 1.29 2006/08/03 03:34:42 deraadt Exp $ */ 1/* $OpenBSD: ssh-keysign.c,v 1.30 2010/01/13 01:20:20 dtucker Exp $ */
2/* 2/*
3 * Copyright (c) 2002 Markus Friedl. All rights reserved. 3 * Copyright (c) 2002 Markus Friedl. All rights reserved.
4 * 4 *
@@ -222,7 +222,7 @@ main(int argc, char **argv)
222 if ((fd == STDIN_FILENO) || (fd == STDOUT_FILENO)) 222 if ((fd == STDIN_FILENO) || (fd == STDOUT_FILENO))
223 fatal("bad fd"); 223 fatal("bad fd");
224 if ((host = get_local_name(fd)) == NULL) 224 if ((host = get_local_name(fd)) == NULL)
225 fatal("cannot get sockname for fd"); 225 fatal("cannot get local name for fd");
226 226
227 data = buffer_get_string(&b, &dlen); 227 data = buffer_get_string(&b, &dlen);
228 if (valid_request(pw, host, &key, data, dlen) < 0) 228 if (valid_request(pw, host, &key, data, dlen) < 0)
diff --git a/ssh-pkcs11-client.c b/ssh-pkcs11-client.c
new file mode 100644
index 000000000..650c37342
--- /dev/null
+++ b/ssh-pkcs11-client.c
@@ -0,0 +1,238 @@
1/* $OpenBSD: ssh-pkcs11-client.c,v 1.2 2010/02/24 06:12:53 djm Exp $ */
2/*
3 * Copyright (c) 2010 Markus Friedl. All rights reserved.
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#include "includes.h"
19
20#ifdef ENABLE_PKCS11
21
22#include <sys/types.h>
23#ifdef HAVE_SYS_TIME_H
24# include <sys/time.h>
25#endif
26#include <sys/socket.h>
27
28#include <stdarg.h>
29#include <string.h>
30#include <unistd.h>
31#include <errno.h>
32
33#include "pathnames.h"
34#include "xmalloc.h"
35#include "buffer.h"
36#include "log.h"
37#include "misc.h"
38#include "key.h"
39#include "authfd.h"
40#include "atomicio.h"
41#include "ssh-pkcs11.h"
42
43/* borrows code from sftp-server and ssh-agent */
44
45int fd = -1;
46pid_t pid = -1;
47
48static void
49send_msg(Buffer *m)
50{
51 u_char buf[4];
52 int mlen = buffer_len(m);
53
54 put_u32(buf, mlen);
55 if (atomicio(vwrite, fd, buf, 4) != 4 ||
56 atomicio(vwrite, fd, buffer_ptr(m),
57 buffer_len(m)) != buffer_len(m))
58 error("write to helper failed");
59 buffer_consume(m, mlen);
60}
61
62static int
63recv_msg(Buffer *m)
64{
65 u_int l, len;
66 u_char buf[1024];
67
68 if ((len = atomicio(read, fd, buf, 4)) != 4) {
69 error("read from helper failed: %u", len);
70 return (0); /* XXX */
71 }
72 len = get_u32(buf);
73 if (len > 256 * 1024)
74 fatal("response too long: %u", len);
75 /* read len bytes into m */
76 buffer_clear(m);
77 while (len > 0) {
78 l = len;
79 if (l > sizeof(buf))
80 l = sizeof(buf);
81 if (atomicio(read, fd, buf, l) != l) {
82 error("response from helper failed.");
83 return (0); /* XXX */
84 }
85 buffer_append(m, buf, l);
86 len -= l;
87 }
88 return (buffer_get_char(m));
89}
90
91int
92pkcs11_init(int interactive)
93{
94 return (0);
95}
96
97void
98pkcs11_terminate(void)
99{
100 close(fd);
101}
102
103static int
104pkcs11_rsa_private_encrypt(int flen, const u_char *from, u_char *to, RSA *rsa,
105 int padding)
106{
107 Key key;
108 u_char *blob, *signature = NULL;
109 u_int blen, slen = 0;
110 int ret = -1;
111 Buffer msg;
112
113 if (padding != RSA_PKCS1_PADDING)
114 return (-1);
115 key.type = KEY_RSA;
116 key.rsa = rsa;
117 if (key_to_blob(&key, &blob, &blen) == 0)
118 return -1;
119 buffer_init(&msg);
120 buffer_put_char(&msg, SSH2_AGENTC_SIGN_REQUEST);
121 buffer_put_string(&msg, blob, blen);
122 buffer_put_string(&msg, from, flen);
123 buffer_put_int(&msg, 0);
124 xfree(blob);
125 send_msg(&msg);
126
127 if (recv_msg(&msg) == SSH2_AGENT_SIGN_RESPONSE) {
128 signature = buffer_get_string(&msg, &slen);
129 if (slen <= (u_int)RSA_size(rsa)) {
130 memcpy(to, signature, slen);
131 ret = slen;
132 }
133 xfree(signature);
134 }
135 return (ret);
136}
137
138/* redirect the private key encrypt operation to the ssh-pkcs11-helper */
139static int
140wrap_key(RSA *rsa)
141{
142 static RSA_METHOD helper_rsa;
143
144 memcpy(&helper_rsa, RSA_get_default_method(), sizeof(helper_rsa));
145 helper_rsa.name = "ssh-pkcs11-helper";
146 helper_rsa.rsa_priv_enc = pkcs11_rsa_private_encrypt;
147 RSA_set_method(rsa, &helper_rsa);
148 return (0);
149}
150
151static int
152pkcs11_start_helper(void)
153{
154 int pair[2];
155
156 if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1) {
157 error("socketpair: %s", strerror(errno));
158 return (-1);
159 }
160 if ((pid = fork()) == -1) {
161 error("fork: %s", strerror(errno));
162 return (-1);
163 } else if (pid == 0) {
164 if ((dup2(pair[1], STDIN_FILENO) == -1) ||
165 (dup2(pair[1], STDOUT_FILENO) == -1)) {
166 fprintf(stderr, "dup2: %s\n", strerror(errno));
167 _exit(1);
168 }
169 close(pair[0]);
170 close(pair[1]);
171 execlp(_PATH_SSH_PKCS11_HELPER, _PATH_SSH_PKCS11_HELPER,
172 (char *) 0);
173 fprintf(stderr, "exec: %s: %s\n", _PATH_SSH_PKCS11_HELPER,
174 strerror(errno));
175 _exit(1);
176 }
177 close(pair[1]);
178 fd = pair[0];
179 return (0);
180}
181
182int
183pkcs11_add_provider(char *name, char *pin, Key ***keysp)
184{
185 Key *k;
186 int i, nkeys;
187 u_char *blob;
188 u_int blen;
189 Buffer msg;
190
191 if (fd < 0 && pkcs11_start_helper() < 0)
192 return (-1);
193
194 buffer_init(&msg);
195 buffer_put_char(&msg, SSH_AGENTC_ADD_SMARTCARD_KEY);
196 buffer_put_cstring(&msg, name);
197 buffer_put_cstring(&msg, pin);
198 send_msg(&msg);
199 buffer_clear(&msg);
200
201 if (recv_msg(&msg) == SSH2_AGENT_IDENTITIES_ANSWER) {
202 nkeys = buffer_get_int(&msg);
203 *keysp = xcalloc(nkeys, sizeof(Key *));
204 for (i = 0; i < nkeys; i++) {
205 blob = buffer_get_string(&msg, &blen);
206 xfree(buffer_get_string(&msg, NULL));
207 k = key_from_blob(blob, blen);
208 wrap_key(k->rsa);
209 (*keysp)[i] = k;
210 xfree(blob);
211 }
212 } else {
213 nkeys = -1;
214 }
215 buffer_free(&msg);
216 return (nkeys);
217}
218
219int
220pkcs11_del_provider(char *name)
221{
222 int ret = -1;
223 Buffer msg;
224
225 buffer_init(&msg);
226 buffer_put_char(&msg, SSH_AGENTC_REMOVE_SMARTCARD_KEY);
227 buffer_put_cstring(&msg, name);
228 buffer_put_cstring(&msg, "");
229 send_msg(&msg);
230 buffer_clear(&msg);
231
232 if (recv_msg(&msg) == SSH_AGENT_SUCCESS)
233 ret = 0;
234 buffer_free(&msg);
235 return (ret);
236}
237
238#endif /* ENABLE_PKCS11 */
diff --git a/ssh-pkcs11-helper.0 b/ssh-pkcs11-helper.0
new file mode 100644
index 000000000..2760cad94
--- /dev/null
+++ b/ssh-pkcs11-helper.0
@@ -0,0 +1,25 @@
1SSH-PKCS11-HELPER(8) OpenBSD System Manager's Manual SSH-PKCS11-HELPER(8)
2
3NAME
4 ssh-pkcs11-helper - ssh-agent helper program for PKCS#11 support
5
6SYNOPSIS
7 ssh-pkcs11-helper
8
9DESCRIPTION
10 ssh-pkcs11-helper is used by ssh-agent(1) to access keys provided by a
11 PKCS#11 token.
12
13 ssh-pkcs11-helper is not intended to be invoked by the user, but from
14 ssh-agent(1).
15
16SEE ALSO
17 ssh(1), ssh-add(1), ssh-agent(1)
18
19HISTORY
20 ssh-pkcs11-helper first appeared in OpenBSD 4.7.
21
22AUTHORS
23 Markus Friedl <markus@openbsd.org>
24
25OpenBSD 4.6 February 10, 2010 1
diff --git a/ssh-pkcs11-helper.8 b/ssh-pkcs11-helper.8
new file mode 100644
index 000000000..9bdaadc01
--- /dev/null
+++ b/ssh-pkcs11-helper.8
@@ -0,0 +1,43 @@
1.\" $OpenBSD: ssh-pkcs11-helper.8,v 1.3 2010/02/10 23:20:38 markus Exp $
2.\"
3.\" Copyright (c) 2010 Markus Friedl. All rights reserved.
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.Dd $Mdocdate: February 10 2010 $
18.Dt SSH-PKCS11-HELPER 8
19.Os
20.Sh NAME
21.Nm ssh-pkcs11-helper
22.Nd ssh-agent helper program for PKCS#11 support
23.Sh SYNOPSIS
24.Nm
25.Sh DESCRIPTION
26.Nm
27is used by
28.Xr ssh-agent 1
29to access keys provided by a PKCS#11 token.
30.Pp
31.Nm
32is not intended to be invoked by the user, but from
33.Xr ssh-agent 1 .
34.Sh SEE ALSO
35.Xr ssh 1 ,
36.Xr ssh-add 1 ,
37.Xr ssh-agent 1
38.Sh HISTORY
39.Nm
40first appeared in
41.Ox 4.7 .
42.Sh AUTHORS
43.An Markus Friedl Aq markus@openbsd.org
diff --git a/ssh-pkcs11-helper.c b/ssh-pkcs11-helper.c
new file mode 100644
index 000000000..d3bfb9838
--- /dev/null
+++ b/ssh-pkcs11-helper.c
@@ -0,0 +1,372 @@
1/* $OpenBSD: ssh-pkcs11-helper.c,v 1.3 2010/02/24 06:12:53 djm Exp $ */
2/*
3 * Copyright (c) 2010 Markus Friedl. All rights reserved.
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#include "includes.h"
19
20#ifdef ENABLE_PKCS11
21
22#include <sys/types.h>
23#ifdef HAVE_SYS_TIME_H
24# include <sys/time.h>
25#endif
26
27#include "openbsd-compat/sys-queue.h"
28
29#include <stdarg.h>
30#include <string.h>
31#include <unistd.h>
32#include <errno.h>
33
34#include "xmalloc.h"
35#include "buffer.h"
36#include "log.h"
37#include "misc.h"
38#include "key.h"
39#include "authfd.h"
40#include "ssh-pkcs11.h"
41
42/* borrows code from sftp-server and ssh-agent */
43
44struct pkcs11_keyinfo {
45 Key *key;
46 char *providername;
47 TAILQ_ENTRY(pkcs11_keyinfo) next;
48};
49
50TAILQ_HEAD(, pkcs11_keyinfo) pkcs11_keylist;
51
52#define MAX_MSG_LENGTH 10240 /*XXX*/
53
54/* helper */
55#define get_int() buffer_get_int(&iqueue);
56#define get_string(lenp) buffer_get_string(&iqueue, lenp);
57
58/* input and output queue */
59Buffer iqueue;
60Buffer oqueue;
61
62static void
63add_key(Key *k, char *name)
64{
65 struct pkcs11_keyinfo *ki;
66
67 ki = xcalloc(1, sizeof(*ki));
68 ki->providername = xstrdup(name);
69 ki->key = k;
70 TAILQ_INSERT_TAIL(&pkcs11_keylist, ki, next);
71}
72
73static void
74del_keys_by_name(char *name)
75{
76 struct pkcs11_keyinfo *ki, *nxt;
77
78 for (ki = TAILQ_FIRST(&pkcs11_keylist); ki; ki = nxt) {
79 nxt = TAILQ_NEXT(ki, next);
80 if (!strcmp(ki->providername, name)) {
81 TAILQ_REMOVE(&pkcs11_keylist, ki, next);
82 xfree(ki->providername);
83 key_free(ki->key);
84 free(ki);
85 }
86 }
87}
88
89/* lookup matching 'private' key */
90static Key *
91lookup_key(Key *k)
92{
93 struct pkcs11_keyinfo *ki;
94
95 TAILQ_FOREACH(ki, &pkcs11_keylist, next) {
96 debug("check %p %s", ki, ki->providername);
97 if (key_equal(k, ki->key))
98 return (ki->key);
99 }
100 return (NULL);
101}
102
103static void
104send_msg(Buffer *m)
105{
106 int mlen = buffer_len(m);
107
108 buffer_put_int(&oqueue, mlen);
109 buffer_append(&oqueue, buffer_ptr(m), mlen);
110 buffer_consume(m, mlen);
111}
112
113static void
114process_add(void)
115{
116 char *name, *pin;
117 Key **keys;
118 int i, nkeys;
119 u_char *blob;
120 u_int blen;
121 Buffer msg;
122
123 buffer_init(&msg);
124 name = get_string(NULL);
125 pin = get_string(NULL);
126 if ((nkeys = pkcs11_add_provider(name, pin, &keys)) > 0) {
127 buffer_put_char(&msg, SSH2_AGENT_IDENTITIES_ANSWER);
128 buffer_put_int(&msg, nkeys);
129 for (i = 0; i < nkeys; i++) {
130 key_to_blob(keys[i], &blob, &blen);
131 buffer_put_string(&msg, blob, blen);
132 buffer_put_cstring(&msg, name);
133 xfree(blob);
134 add_key(keys[i], name);
135 }
136 xfree(keys);
137 } else {
138 buffer_put_char(&msg, SSH_AGENT_FAILURE);
139 }
140 xfree(pin);
141 xfree(name);
142 send_msg(&msg);
143 buffer_free(&msg);
144}
145
146static void
147process_del(void)
148{
149 char *name, *pin;
150 Buffer msg;
151
152 buffer_init(&msg);
153 name = get_string(NULL);
154 pin = get_string(NULL);
155 del_keys_by_name(name);
156 if (pkcs11_del_provider(name) == 0)
157 buffer_put_char(&msg, SSH_AGENT_SUCCESS);
158 else
159 buffer_put_char(&msg, SSH_AGENT_FAILURE);
160 xfree(pin);
161 xfree(name);
162 send_msg(&msg);
163 buffer_free(&msg);
164}
165
166static void
167process_sign(void)
168{
169 u_char *blob, *data, *signature = NULL;
170 u_int blen, dlen, slen = 0;
171 int ok = -1, flags, ret;
172 Key *key, *found;
173 Buffer msg;
174
175 blob = get_string(&blen);
176 data = get_string(&dlen);
177 flags = get_int(); /* XXX ignore */
178
179 if ((key = key_from_blob(blob, blen)) != NULL) {
180 if ((found = lookup_key(key)) != NULL) {
181 slen = RSA_size(key->rsa);
182 signature = xmalloc(slen);
183 if ((ret = RSA_private_encrypt(dlen, data, signature,
184 found->rsa, RSA_PKCS1_PADDING)) != -1) {
185 slen = ret;
186 ok = 0;
187 }
188 }
189 key_free(key);
190 }
191 buffer_init(&msg);
192 if (ok == 0) {
193 buffer_put_char(&msg, SSH2_AGENT_SIGN_RESPONSE);
194 buffer_put_string(&msg, signature, slen);
195 } else {
196 buffer_put_char(&msg, SSH_AGENT_FAILURE);
197 }
198 xfree(data);
199 xfree(blob);
200 if (signature != NULL)
201 xfree(signature);
202 send_msg(&msg);
203 buffer_free(&msg);
204}
205
206static void
207process(void)
208{
209 u_int msg_len;
210 u_int buf_len;
211 u_int consumed;
212 u_int type;
213 u_char *cp;
214
215 buf_len = buffer_len(&iqueue);
216 if (buf_len < 5)
217 return; /* Incomplete message. */
218 cp = buffer_ptr(&iqueue);
219 msg_len = get_u32(cp);
220 if (msg_len > MAX_MSG_LENGTH) {
221 error("bad message len %d", msg_len);
222 cleanup_exit(11);
223 }
224 if (buf_len < msg_len + 4)
225 return;
226 buffer_consume(&iqueue, 4);
227 buf_len -= 4;
228 type = buffer_get_char(&iqueue);
229 switch (type) {
230 case SSH_AGENTC_ADD_SMARTCARD_KEY:
231 debug("process_add");
232 process_add();
233 break;
234 case SSH_AGENTC_REMOVE_SMARTCARD_KEY:
235 debug("process_del");
236 process_del();
237 break;
238 case SSH2_AGENTC_SIGN_REQUEST:
239 debug("process_sign");
240 process_sign();
241 break;
242 default:
243 error("Unknown message %d", type);
244 break;
245 }
246 /* discard the remaining bytes from the current packet */
247 if (buf_len < buffer_len(&iqueue)) {
248 error("iqueue grew unexpectedly");
249 cleanup_exit(255);
250 }
251 consumed = buf_len - buffer_len(&iqueue);
252 if (msg_len < consumed) {
253 error("msg_len %d < consumed %d", msg_len, consumed);
254 cleanup_exit(255);
255 }
256 if (msg_len > consumed)
257 buffer_consume(&iqueue, msg_len - consumed);
258}
259
260void
261cleanup_exit(int i)
262{
263 /* XXX */
264 _exit(i);
265}
266
267int
268main(int argc, char **argv)
269{
270 fd_set *rset, *wset;
271 int in, out, max, log_stderr = 0;
272 ssize_t len, olen, set_size;
273 SyslogFacility log_facility = SYSLOG_FACILITY_AUTH;
274 LogLevel log_level = SYSLOG_LEVEL_ERROR;
275 char buf[4*4096];
276
277 extern char *optarg;
278 extern char *__progname;
279
280 TAILQ_INIT(&pkcs11_keylist);
281 pkcs11_init(0);
282
283 init_rng();
284 seed_rng();
285 __progname = ssh_get_progname(argv[0]);
286
287 log_init(__progname, log_level, log_facility, log_stderr);
288
289 in = STDIN_FILENO;
290 out = STDOUT_FILENO;
291
292 max = 0;
293 if (in > max)
294 max = in;
295 if (out > max)
296 max = out;
297
298 buffer_init(&iqueue);
299 buffer_init(&oqueue);
300
301 set_size = howmany(max + 1, NFDBITS) * sizeof(fd_mask);
302 rset = (fd_set *)xmalloc(set_size);
303 wset = (fd_set *)xmalloc(set_size);
304
305 for (;;) {
306 memset(rset, 0, set_size);
307 memset(wset, 0, set_size);
308
309 /*
310 * Ensure that we can read a full buffer and handle
311 * the worst-case length packet it can generate,
312 * otherwise apply backpressure by stopping reads.
313 */
314 if (buffer_check_alloc(&iqueue, sizeof(buf)) &&
315 buffer_check_alloc(&oqueue, MAX_MSG_LENGTH))
316 FD_SET(in, rset);
317
318 olen = buffer_len(&oqueue);
319 if (olen > 0)
320 FD_SET(out, wset);
321
322 if (select(max+1, rset, wset, NULL, NULL) < 0) {
323 if (errno == EINTR)
324 continue;
325 error("select: %s", strerror(errno));
326 cleanup_exit(2);
327 }
328
329 /* copy stdin to iqueue */
330 if (FD_ISSET(in, rset)) {
331 len = read(in, buf, sizeof buf);
332 if (len == 0) {
333 debug("read eof");
334 cleanup_exit(0);
335 } else if (len < 0) {
336 error("read: %s", strerror(errno));
337 cleanup_exit(1);
338 } else {
339 buffer_append(&iqueue, buf, len);
340 }
341 }
342 /* send oqueue to stdout */
343 if (FD_ISSET(out, wset)) {
344 len = write(out, buffer_ptr(&oqueue), olen);
345 if (len < 0) {
346 error("write: %s", strerror(errno));
347 cleanup_exit(1);
348 } else {
349 buffer_consume(&oqueue, len);
350 }
351 }
352
353 /*
354 * Process requests from client if we can fit the results
355 * into the output buffer, otherwise stop processing input
356 * and let the output queue drain.
357 */
358 if (buffer_check_alloc(&oqueue, MAX_MSG_LENGTH))
359 process();
360 }
361}
362#else /* ENABLE_PKCS11 */
363int
364main(int argc, char **argv)
365{
366 extern char *__progname;
367
368 __progname = ssh_get_progname(argv[0]);
369 log_init(__progname, SYSLOG_LEVEL_ERROR, SYSLOG_FACILITY_AUTH, 0);
370 fatal("PKCS#11 support disabled at compile time");
371}
372#endif /* ENABLE_PKCS11 */
diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c
new file mode 100644
index 000000000..f0192dcf1
--- /dev/null
+++ b/ssh-pkcs11.c
@@ -0,0 +1,564 @@
1/* $OpenBSD: ssh-pkcs11.c,v 1.4 2010/02/24 06:12:53 djm Exp $ */
2/*
3 * Copyright (c) 2010 Markus Friedl. All rights reserved.
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#include "includes.h"
19
20#ifdef ENABLE_PKCS11
21
22#include <sys/types.h>
23#ifdef HAVE_SYS_TIME_H
24# include <sys/time.h>
25#endif
26#include <stdarg.h>
27#include <stdio.h>
28
29#include <string.h>
30#include <dlfcn.h>
31
32#include "openbsd-compat/sys-queue.h"
33
34#define CRYPTOKI_COMPAT
35#include "pkcs11.h"
36
37#include "log.h"
38#include "misc.h"
39#include "key.h"
40#include "ssh-pkcs11.h"
41#include "xmalloc.h"
42
43struct pkcs11_slotinfo {
44 CK_TOKEN_INFO token;
45 CK_SESSION_HANDLE session;
46 int logged_in;
47};
48
49struct pkcs11_provider {
50 char *name;
51 void *handle;
52 CK_FUNCTION_LIST *function_list;
53 CK_INFO info;
54 CK_ULONG nslots;
55 CK_SLOT_ID *slotlist;
56 struct pkcs11_slotinfo *slotinfo;
57 int valid;
58 int refcount;
59 TAILQ_ENTRY(pkcs11_provider) next;
60};
61
62TAILQ_HEAD(, pkcs11_provider) pkcs11_providers;
63
64struct pkcs11_key {
65 struct pkcs11_provider *provider;
66 CK_ULONG slotidx;
67 int (*orig_finish)(RSA *rsa);
68 RSA_METHOD rsa_method;
69 char *keyid;
70 int keyid_len;
71};
72
73int pkcs11_interactive = 0;
74
75int
76pkcs11_init(int interactive)
77{
78 pkcs11_interactive = interactive;
79 TAILQ_INIT(&pkcs11_providers);
80 return (0);
81}
82
83/*
84 * finalize a provider shared libarary, it's no longer usable.
85 * however, there might still be keys referencing this provider,
86 * so the actuall freeing of memory is handled by pkcs11_provider_unref().
87 * this is called when a provider gets unregistered.
88 */
89static void
90pkcs11_provider_finalize(struct pkcs11_provider *p)
91{
92 CK_RV rv;
93 CK_ULONG i;
94
95 debug("pkcs11_provider_finalize: %p refcount %d valid %d",
96 p, p->refcount, p->valid);
97 if (!p->valid)
98 return;
99 for (i = 0; i < p->nslots; i++) {
100 if (p->slotinfo[i].session &&
101 (rv = p->function_list->C_CloseSession(
102 p->slotinfo[i].session)) != CKR_OK)
103 error("C_CloseSession failed: %lu", rv);
104 }
105 if ((rv = p->function_list->C_Finalize(NULL)) != CKR_OK)
106 error("C_Finalize failed: %lu", rv);
107 p->valid = 0;
108 p->function_list = NULL;
109 dlclose(p->handle);
110}
111
112/*
113 * remove a reference to the provider.
114 * called when a key gets destroyed or when the provider is unregistered.
115 */
116static void
117pkcs11_provider_unref(struct pkcs11_provider *p)
118{
119 debug("pkcs11_provider_unref: %p refcount %d", p, p->refcount);
120 if (--p->refcount <= 0) {
121 if (p->valid)
122 error("pkcs11_provider_unref: %p still valid", p);
123 xfree(p->slotlist);
124 xfree(p->slotinfo);
125 xfree(p);
126 }
127}
128
129/* unregister all providers, keys might still point to the providers */
130void
131pkcs11_terminate(void)
132{
133 struct pkcs11_provider *p;
134
135 while ((p = TAILQ_FIRST(&pkcs11_providers)) != NULL) {
136 TAILQ_REMOVE(&pkcs11_providers, p, next);
137 pkcs11_provider_finalize(p);
138 pkcs11_provider_unref(p);
139 }
140}
141
142/* lookup provider by name */
143static struct pkcs11_provider *
144pkcs11_provider_lookup(char *provider_id)
145{
146 struct pkcs11_provider *p;
147
148 TAILQ_FOREACH(p, &pkcs11_providers, next) {
149 debug("check %p %s", p, p->name);
150 if (!strcmp(provider_id, p->name))
151 return (p);
152 }
153 return (NULL);
154}
155
156/* unregister provider by name */
157int
158pkcs11_del_provider(char *provider_id)
159{
160 struct pkcs11_provider *p;
161
162 if ((p = pkcs11_provider_lookup(provider_id)) != NULL) {
163 TAILQ_REMOVE(&pkcs11_providers, p, next);
164 pkcs11_provider_finalize(p);
165 pkcs11_provider_unref(p);
166 return (0);
167 }
168 return (-1);
169}
170
171/* openssl callback for freeing an RSA key */
172static int
173pkcs11_rsa_finish(RSA *rsa)
174{
175 struct pkcs11_key *k11;
176 int rv = -1;
177
178 if ((k11 = RSA_get_app_data(rsa)) != NULL) {
179 if (k11->orig_finish)
180 rv = k11->orig_finish(rsa);
181 if (k11->provider)
182 pkcs11_provider_unref(k11->provider);
183 if (k11->keyid)
184 xfree(k11->keyid);
185 xfree(k11);
186 }
187 return (rv);
188}
189
190/* openssl callback doing the actual signing operation */
191static int
192pkcs11_rsa_private_encrypt(int flen, const u_char *from, u_char *to, RSA *rsa,
193 int padding)
194{
195 struct pkcs11_key *k11;
196 struct pkcs11_slotinfo *si;
197 CK_FUNCTION_LIST *f;
198 CK_OBJECT_HANDLE obj;
199 CK_ULONG tlen = 0, nfound = 0;
200 CK_RV rv;
201 CK_OBJECT_CLASS private_key_class = CKO_PRIVATE_KEY;
202 CK_BBOOL true_val = CK_TRUE;
203 CK_MECHANISM mech = {
204 CKM_RSA_PKCS, NULL_PTR, 0
205 };
206 CK_ATTRIBUTE key_filter[] = {
207 {CKA_CLASS, NULL, sizeof(private_key_class) },
208 {CKA_ID, NULL, 0},
209 {CKA_SIGN, NULL, sizeof(true_val) }
210 };
211 char *pin, prompt[1024];
212 int rval = -1;
213
214 /* some compilers complain about non-constant initializer so we
215 use NULL in CK_ATTRIBUTE above and set the values here */
216 key_filter[0].pValue = &private_key_class;
217 key_filter[2].pValue = &true_val;
218
219 if ((k11 = RSA_get_app_data(rsa)) == NULL) {
220 error("RSA_get_app_data failed for rsa %p", rsa);
221 return (-1);
222 }
223 if (!k11->provider || !k11->provider->valid) {
224 error("no pkcs11 (valid) provider for rsa %p", rsa);
225 return (-1);
226 }
227 f = k11->provider->function_list;
228 si = &k11->provider->slotinfo[k11->slotidx];
229 if ((si->token.flags & CKF_LOGIN_REQUIRED) && !si->logged_in) {
230 if (!pkcs11_interactive) {
231 error("need pin");
232 return (-1);
233 }
234 snprintf(prompt, sizeof(prompt), "Enter PIN for '%s': ",
235 si->token.label);
236 pin = read_passphrase(prompt, RP_ALLOW_EOF);
237 if (pin == NULL)
238 return (-1); /* bail out */
239 if ((rv = f->C_Login(si->session, CKU_USER, pin, strlen(pin)))
240 != CKR_OK) {
241 xfree(pin);
242 error("C_Login failed: %lu", rv);
243 return (-1);
244 }
245 xfree(pin);
246 si->logged_in = 1;
247 }
248 key_filter[1].pValue = k11->keyid;
249 key_filter[1].ulValueLen = k11->keyid_len;
250 if ((rv = f->C_FindObjectsInit(si->session, key_filter, 3)) != CKR_OK) {
251 error("C_FindObjectsInit failed: %lu", rv);
252 return (-1);
253 }
254 if ((rv = f->C_FindObjects(si->session, &obj, 1, &nfound)) != CKR_OK ||
255 nfound != 1) {
256 error("C_FindObjects failed (%lu nfound): %lu", nfound, rv);
257 } else if ((rv = f->C_SignInit(si->session, &mech, obj)) != CKR_OK) {
258 error("C_SignInit failed: %lu", rv);
259 } else {
260 /* XXX handle CKR_BUFFER_TOO_SMALL */
261 tlen = RSA_size(rsa);
262 rv = f->C_Sign(si->session, (CK_BYTE *)from, flen, to, &tlen);
263 if (rv == CKR_OK)
264 rval = tlen;
265 else
266 error("C_Sign failed: %lu", rv);
267 }
268 if ((rv = f->C_FindObjectsFinal(si->session)) != CKR_OK)
269 error("C_FindObjectsFinal failed: %lu", rv);
270 return (rval);
271}
272
273static int
274pkcs11_rsa_private_decrypt(int flen, const u_char *from, u_char *to, RSA *rsa,
275 int padding)
276{
277 return (-1);
278}
279
280/* redirect private key operations for rsa key to pkcs11 token */
281static int
282pkcs11_rsa_wrap(struct pkcs11_provider *provider, CK_ULONG slotidx,
283 CK_ATTRIBUTE *keyid_attrib, RSA *rsa)
284{
285 struct pkcs11_key *k11;
286 const RSA_METHOD *def = RSA_get_default_method();
287
288 k11 = xcalloc(1, sizeof(*k11));
289 k11->provider = provider;
290 provider->refcount++; /* provider referenced by RSA key */
291 k11->slotidx = slotidx;
292 /* identify key object on smartcard */
293 k11->keyid_len = keyid_attrib->ulValueLen;
294 k11->keyid = xmalloc(k11->keyid_len);
295 memcpy(k11->keyid, keyid_attrib->pValue, k11->keyid_len);
296 k11->orig_finish = def->finish;
297 memcpy(&k11->rsa_method, def, sizeof(k11->rsa_method));
298 k11->rsa_method.name = "pkcs11";
299 k11->rsa_method.rsa_priv_enc = pkcs11_rsa_private_encrypt;
300 k11->rsa_method.rsa_priv_dec = pkcs11_rsa_private_decrypt;
301 k11->rsa_method.finish = pkcs11_rsa_finish;
302 RSA_set_method(rsa, &k11->rsa_method);
303 RSA_set_app_data(rsa, k11);
304 return (0);
305}
306
307/* remove trailing spaces */
308static void
309rmspace(char *buf, size_t len)
310{
311 size_t i;
312
313 if (!len)
314 return;
315 for (i = len - 1; i > 0; i--)
316 if (i == len - 1 || buf[i] == ' ')
317 buf[i] = '\0';
318 else
319 break;
320}
321
322/*
323 * open a pkcs11 session and login if required.
324 * if pin == NULL we delay login until key use
325 */
326static int
327pkcs11_open_session(struct pkcs11_provider *p, CK_ULONG slotidx, char *pin)
328{
329 CK_RV rv;
330 CK_FUNCTION_LIST *f;
331 CK_SESSION_HANDLE session;
332 int login_required;
333
334 f = p->function_list;
335 login_required = p->slotinfo[slotidx].token.flags & CKF_LOGIN_REQUIRED;
336 if (pin && login_required && !strlen(pin)) {
337 error("pin required");
338 return (-1);
339 }
340 if ((rv = f->C_OpenSession(p->slotlist[slotidx], CKF_RW_SESSION|
341 CKF_SERIAL_SESSION, NULL, NULL, &session))
342 != CKR_OK) {
343 error("C_OpenSession failed: %lu", rv);
344 return (-1);
345 }
346 if (login_required && pin) {
347 if ((rv = f->C_Login(session, CKU_USER, pin, strlen(pin)))
348 != CKR_OK) {
349 error("C_Login failed: %lu", rv);
350 if ((rv = f->C_CloseSession(session)) != CKR_OK)
351 error("C_CloseSession failed: %lu", rv);
352 return (-1);
353 }
354 p->slotinfo[slotidx].logged_in = 1;
355 }
356 p->slotinfo[slotidx].session = session;
357 return (0);
358}
359
360/*
361 * lookup public keys for token in slot identified by slotidx,
362 * add 'wrapped' public keys to the 'keysp' array and increment nkeys.
363 * keysp points to an (possibly empty) array with *nkeys keys.
364 */
365static int
366pkcs11_fetch_keys(struct pkcs11_provider *p, CK_ULONG slotidx, Key ***keysp,
367 int *nkeys)
368{
369 Key *key;
370 RSA *rsa;
371 int i;
372 CK_RV rv;
373 CK_OBJECT_HANDLE obj;
374 CK_ULONG nfound;
375 CK_SESSION_HANDLE session;
376 CK_FUNCTION_LIST *f;
377 CK_OBJECT_CLASS pubkey_class = CKO_PUBLIC_KEY;
378 CK_ATTRIBUTE pubkey_filter[] = {
379 { CKA_CLASS, NULL, sizeof(pubkey_class) }
380 };
381 CK_ATTRIBUTE attribs[] = {
382 { CKA_ID, NULL, 0 },
383 { CKA_MODULUS, NULL, 0 },
384 { CKA_PUBLIC_EXPONENT, NULL, 0 }
385 };
386
387 /* some compilers complain about non-constant initializer so we
388 use NULL in CK_ATTRIBUTE above and set the value here */
389 pubkey_filter[0].pValue = &pubkey_class;
390
391 f = p->function_list;
392 session = p->slotinfo[slotidx].session;
393 /* setup a filter the looks for public keys */
394 if ((rv = f->C_FindObjectsInit(session, pubkey_filter, 1)) != CKR_OK) {
395 error("C_FindObjectsInit failed: %lu", rv);
396 return (-1);
397 }
398 while (1) {
399 /* XXX 3 attributes in attribs[] */
400 for (i = 0; i < 3; i++) {
401 attribs[i].pValue = NULL;
402 attribs[i].ulValueLen = 0;
403 }
404 if ((rv = f->C_FindObjects(session, &obj, 1, &nfound)) != CKR_OK
405 || nfound == 0)
406 break;
407 /* found a key, so figure out size of the attributes */
408 if ((rv = f->C_GetAttributeValue(session, obj, attribs, 3))
409 != CKR_OK) {
410 error("C_GetAttributeValue failed: %lu", rv);
411 continue;
412 }
413 /* allocate buffers for attributes, XXX check ulValueLen? */
414 for (i = 0; i < 3; i++)
415 attribs[i].pValue = xmalloc(attribs[i].ulValueLen);
416 /* retrieve ID, modulus and public exponent of RSA key */
417 if ((rv = f->C_GetAttributeValue(session, obj, attribs, 3))
418 != CKR_OK) {
419 error("C_GetAttributeValue failed: %lu", rv);
420 } else if ((rsa = RSA_new()) == NULL) {
421 error("RSA_new failed");
422 } else {
423 rsa->n = BN_bin2bn(attribs[1].pValue,
424 attribs[1].ulValueLen, NULL);
425 rsa->e = BN_bin2bn(attribs[2].pValue,
426 attribs[2].ulValueLen, NULL);
427 if (rsa->n && rsa->e &&
428 pkcs11_rsa_wrap(p, slotidx, &attribs[0], rsa) == 0) {
429 key = key_new(KEY_UNSPEC);
430 key->rsa = rsa;
431 key->type = KEY_RSA;
432 key->flags |= KEY_FLAG_EXT;
433 /* expand key array and add key */
434 *keysp = xrealloc(*keysp, *nkeys + 1,
435 sizeof(Key *));
436 (*keysp)[*nkeys] = key;
437 *nkeys = *nkeys + 1;
438 debug("have %d keys", *nkeys);
439 } else {
440 RSA_free(rsa);
441 }
442 }
443 for (i = 0; i < 3; i++)
444 xfree(attribs[i].pValue);
445 }
446 if ((rv = f->C_FindObjectsFinal(session)) != CKR_OK)
447 error("C_FindObjectsFinal failed: %lu", rv);
448 return (0);
449}
450
451/* register a new provider, fails if provider already exists */
452int
453pkcs11_add_provider(char *provider_id, char *pin, Key ***keyp)
454{
455 int nkeys, need_finalize = 0;
456 struct pkcs11_provider *p = NULL;
457 void *handle = NULL;
458 CK_RV (*getfunctionlist)(CK_FUNCTION_LIST **);
459 CK_RV rv;
460 CK_FUNCTION_LIST *f = NULL;
461 CK_TOKEN_INFO *token;
462 CK_ULONG i;
463
464 *keyp = NULL;
465 if (pkcs11_provider_lookup(provider_id) != NULL) {
466 error("provider already registered: %s", provider_id);
467 goto fail;
468 }
469 /* open shared pkcs11-libarary */
470 if ((handle = dlopen(provider_id, RTLD_NOW)) == NULL) {
471 error("dlopen %s failed: %s", provider_id, dlerror());
472 goto fail;
473 }
474 if ((getfunctionlist = dlsym(handle, "C_GetFunctionList")) == NULL) {
475 error("dlsym(C_GetFunctionList) failed: %s", dlerror());
476 goto fail;
477 }
478 p = xcalloc(1, sizeof(*p));
479 p->name = xstrdup(provider_id);
480 p->handle = handle;
481 /* setup the pkcs11 callbacks */
482 if ((rv = (*getfunctionlist)(&f)) != CKR_OK) {
483 error("C_GetFunctionList failed: %lu", rv);
484 goto fail;
485 }
486 p->function_list = f;
487 if ((rv = f->C_Initialize(NULL)) != CKR_OK) {
488 error("C_Initialize failed: %lu", rv);
489 goto fail;
490 }
491 need_finalize = 1;
492 if ((rv = f->C_GetInfo(&p->info)) != CKR_OK) {
493 error("C_GetInfo failed: %lu", rv);
494 goto fail;
495 }
496 rmspace(p->info.manufacturerID, sizeof(p->info.manufacturerID));
497 rmspace(p->info.libraryDescription, sizeof(p->info.libraryDescription));
498 debug("manufacturerID <%s> cryptokiVersion %d.%d"
499 " libraryDescription <%s> libraryVersion %d.%d",
500 p->info.manufacturerID,
501 p->info.cryptokiVersion.major,
502 p->info.cryptokiVersion.minor,
503 p->info.libraryDescription,
504 p->info.libraryVersion.major,
505 p->info.libraryVersion.minor);
506 if ((rv = f->C_GetSlotList(CK_TRUE, NULL, &p->nslots)) != CKR_OK) {
507 error("C_GetSlotList failed: %lu", rv);
508 goto fail;
509 }
510 if (p->nslots == 0) {
511 error("no slots");
512 goto fail;
513 }
514 p->slotlist = xcalloc(p->nslots, sizeof(CK_SLOT_ID));
515 if ((rv = f->C_GetSlotList(CK_TRUE, p->slotlist, &p->nslots))
516 != CKR_OK) {
517 error("C_GetSlotList failed: %lu", rv);
518 goto fail;
519 }
520 p->slotinfo = xcalloc(p->nslots, sizeof(struct pkcs11_slotinfo));
521 p->valid = 1;
522 nkeys = 0;
523 for (i = 0; i < p->nslots; i++) {
524 token = &p->slotinfo[i].token;
525 if ((rv = f->C_GetTokenInfo(p->slotlist[i], token))
526 != CKR_OK) {
527 error("C_GetTokenInfo failed: %lu", rv);
528 continue;
529 }
530 rmspace(token->label, sizeof(token->label));
531 rmspace(token->manufacturerID, sizeof(token->manufacturerID));
532 rmspace(token->model, sizeof(token->model));
533 rmspace(token->serialNumber, sizeof(token->serialNumber));
534 debug("label <%s> manufacturerID <%s> model <%s> serial <%s>"
535 " flags 0x%lx",
536 token->label, token->manufacturerID, token->model,
537 token->serialNumber, token->flags);
538 /* open session, login with pin and retrieve public keys */
539 if (pkcs11_open_session(p, i, pin) == 0)
540 pkcs11_fetch_keys(p, i, keyp, &nkeys);
541 }
542 if (nkeys > 0) {
543 TAILQ_INSERT_TAIL(&pkcs11_providers, p, next);
544 p->refcount++; /* add to provider list */
545 return (nkeys);
546 }
547 error("no keys");
548 /* don't add the provider, since it does not have any keys */
549fail:
550 if (need_finalize && (rv = f->C_Finalize(NULL)) != CKR_OK)
551 error("C_Finalize failed: %lu", rv);
552 if (p) {
553 if (p->slotlist)
554 xfree(p->slotlist);
555 if (p->slotinfo)
556 xfree(p->slotinfo);
557 xfree(p);
558 }
559 if (handle)
560 dlclose(handle);
561 return (-1);
562}
563
564#endif /* ENABLE_PKCS11 */
diff --git a/ssh-pkcs11.h b/ssh-pkcs11.h
new file mode 100644
index 000000000..59f456adf
--- /dev/null
+++ b/ssh-pkcs11.h
@@ -0,0 +1,20 @@
1/* $OpenBSD: ssh-pkcs11.h,v 1.2 2010/02/24 06:12:53 djm Exp $ */
2/*
3 * Copyright (c) 2010 Markus Friedl. All rights reserved.
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 */
17int pkcs11_init(int);
18void pkcs11_terminate(void);
19int pkcs11_add_provider(char *, char *, Key ***);
20int pkcs11_del_provider(char *);
diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c
index 8b1c4b4f4..fa5070499 100644
--- a/ssh-rand-helper.c
+++ b/ssh-rand-helper.c
@@ -818,6 +818,7 @@ main(int argc, char **argv)
818 unsigned char *buf; 818 unsigned char *buf;
819 int ret, ch, debug_level, output_hex, bytes; 819 int ret, ch, debug_level, output_hex, bytes;
820 extern char *optarg; 820 extern char *optarg;
821 extern int optind;
821 LogLevel ll; 822 LogLevel ll;
822 823
823 __progname = ssh_get_progname(argv[0]); 824 __progname = ssh_get_progname(argv[0]);
@@ -853,11 +854,17 @@ main(int argc, char **argv)
853 default: 854 default:
854 error("Invalid commandline option"); 855 error("Invalid commandline option");
855 usage(); 856 usage();
857 exit(1);
856 } 858 }
857 } 859 }
858
859 log_init(argv[0], ll, SYSLOG_FACILITY_USER, 1); 860 log_init(argv[0], ll, SYSLOG_FACILITY_USER, 1);
860 861
862 if (argc != optind) {
863 error("Unexpected commandline arguments.");
864 usage();
865 exit(1);
866 }
867
861#ifdef USE_SEED_FILES 868#ifdef USE_SEED_FILES
862 prng_read_seedfile(); 869 prng_read_seedfile();
863#endif 870#endif
diff --git a/ssh-rsa.c b/ssh-rsa.c
index 0e16ff85f..842857fee 100644
--- a/ssh-rsa.c
+++ b/ssh-rsa.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-rsa.c,v 1.39 2006/08/03 03:34:42 deraadt Exp $ */ 1/* $OpenBSD: ssh-rsa.c,v 1.40 2010/02/26 20:29:54 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000, 2003 Markus Friedl <markus@openbsd.org> 3 * Copyright (c) 2000, 2003 Markus Friedl <markus@openbsd.org>
4 * 4 *
@@ -46,7 +46,9 @@ ssh_rsa_sign(const Key *key, u_char **sigp, u_int *lenp,
46 int ok, nid; 46 int ok, nid;
47 Buffer b; 47 Buffer b;
48 48
49 if (key == NULL || key->type != KEY_RSA || key->rsa == NULL) { 49 if (key == NULL ||
50 (key->type != KEY_RSA && key->type != KEY_RSA_CERT) ||
51 key->rsa == NULL) {
50 error("ssh_rsa_sign: no RSA key"); 52 error("ssh_rsa_sign: no RSA key");
51 return -1; 53 return -1;
52 } 54 }
@@ -113,7 +115,9 @@ ssh_rsa_verify(const Key *key, const u_char *signature, u_int signaturelen,
113 u_int len, dlen, modlen; 115 u_int len, dlen, modlen;
114 int rlen, ret, nid; 116 int rlen, ret, nid;
115 117
116 if (key == NULL || key->type != KEY_RSA || key->rsa == NULL) { 118 if (key == NULL ||
119 (key->type != KEY_RSA && key->type != KEY_RSA_CERT) ||
120 key->rsa == NULL) {
117 error("ssh_rsa_verify: no RSA key"); 121 error("ssh_rsa_verify: no RSA key");
118 return -1; 122 return -1;
119 } 123 }
diff --git a/ssh.0 b/ssh.0
index af73167b2..deab90e73 100644
--- a/ssh.0
+++ b/ssh.0
@@ -5,10 +5,10 @@ NAME
5 5
6SYNOPSIS 6SYNOPSIS
7 ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] 7 ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
8 [-D [bind_address:]port] [-e escape_char] [-F configfile] 8 [-D [bind_address:]port] [-e escape_char] [-F configfile] [-I pkcs11]
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] [-W host:port]
12 [-w local_tun[:remote_tun]] [user@]hostname [command] 12 [-w local_tun[:remote_tun]] [user@]hostname [command]
13 13
14DESCRIPTION 14DESCRIPTION
@@ -42,7 +42,7 @@ DESCRIPTION
42 42
43 Agent forwarding should be enabled with caution. Users with the 43 Agent forwarding should be enabled with caution. Users with the
44 ability to bypass file permissions on the remote host (for the 44 ability to bypass file permissions on the remote host (for the
45 agent's Unix-domain socket) can access the local agent through 45 agent's UNIX-domain socket) can access the local agent through
46 the forwarded connection. An attacker cannot obtain key material 46 the forwarded connection. An attacker cannot obtain key material
47 from the agent, however they can perform operations on the keys 47 from the agent, however they can perform operations on the keys
48 that enable them to authenticate using the identities loaded into 48 that enable them to authenticate using the identities loaded into
@@ -131,11 +131,9 @@ DESCRIPTION
131 131
132 -g Allows remote hosts to connect to local forwarded ports. 132 -g Allows remote hosts to connect to local forwarded ports.
133 133
134 -I smartcard_device 134 -I pkcs11
135 Specify the device ssh should use to communicate with a smartcard 135 Specify the PKCS#11 shared library ssh should use to communicate
136 used for storing the user's private RSA key. This option is only 136 with a PKCS#11 token providing the user's private RSA key.
137 available if support for smartcard devices is compiled in (de-
138 fault is no support).
139 137
140 -i identity_file 138 -i identity_file
141 Selects a file from which the identity (private key) for RSA or 139 Selects a file from which the identity (private key) for RSA or
@@ -144,7 +142,9 @@ DESCRIPTION
144 tocol version 2. Identity files may also be specified on a per- 142 tocol version 2. Identity files may also be specified on a per-
145 host basis in the configuration file. It is possible to have 143 host basis in the configuration file. It is possible to have
146 multiple -i options (and multiple identities specified in config- 144 multiple -i options (and multiple identities specified in config-
147 uration files). 145 uration files). ssh will also try to load certificate informa-
146 tion from the filename obtained by appending -cert.pub to identi-
147 ty filenames.
148 148
149 -K Enables GSSAPI-based authentication and forwarding (delegation) 149 -K Enables GSSAPI-based authentication and forwarding (delegation)
150 of GSSAPI credentials to the server. 150 of GSSAPI credentials to the server.
@@ -252,6 +252,7 @@ DESCRIPTION
252 NumberOfPasswordPrompts 252 NumberOfPasswordPrompts
253 PasswordAuthentication 253 PasswordAuthentication
254 PermitLocalCommand 254 PermitLocalCommand
255 PKCS11Provider
255 Port 256 Port
256 PreferredAuthentications 257 PreferredAuthentications
257 Protocol 258 Protocol
@@ -264,7 +265,6 @@ DESCRIPTION
264 SendEnv 265 SendEnv
265 ServerAliveInterval 266 ServerAliveInterval
266 ServerAliveCountMax 267 ServerAliveCountMax
267 SmartcardDevice
268 StrictHostKeyChecking 268 StrictHostKeyChecking
269 TCPKeepAlive 269 TCPKeepAlive
270 Tunnel 270 Tunnel
@@ -332,6 +332,12 @@ DESCRIPTION
332 tion, and configuration problems. Multiple -v options increase 332 tion, and configuration problems. Multiple -v options increase
333 the verbosity. The maximum is 3. 333 the verbosity. The maximum is 3.
334 334
335 -W host:port
336 Requests that standard input and output on the client be forward-
337 ed to host on port over the secure channel. Implies -N, -T,
338 ExitOnForwardFailure and ClearAllForwardings and works with Pro-
339 tocol version 2 only.
340
335 -w local_tun[:remote_tun] 341 -w local_tun[:remote_tun]
336 Requests tunnel device forwarding with the specified tun(4) de- 342 Requests tunnel device forwarding with the specified tun(4) de-
337 vices between the client (local_tun) and the server (remote_tun). 343 vices between the client (local_tun) and the server (remote_tun).
@@ -373,15 +379,14 @@ DESCRIPTION
373 error occurred. 379 error occurred.
374 380
375AUTHENTICATION 381AUTHENTICATION
376 The OpenSSH SSH client supports SSH protocols 1 and 2. Protocol 2 is the 382 The OpenSSH SSH client supports SSH protocols 1 and 2. The default is to
377 default, with ssh falling back to protocol 1 if it detects protocol 2 is 383 use protocol 2 only, though this can be changed via the Protocol option
378 unsupported. These settings may be altered using the Protocol option in 384 in ssh_config(5) or the -1 and -2 options (see above). Both protocols
379 ssh_config(5), or enforced using the -1 and -2 options (see above). Both 385 support similar authentication methods, but protocol 2 is the default
380 protocols support similar authentication methods, but protocol 2 is pre- 386 since it provides additional mechanisms for confidentiality (the traffic
381 ferred since it provides additional mechanisms for confidentiality (the 387 is encrypted using AES, 3DES, Blowfish, CAST128, or Arcfour) and integri-
382 traffic is encrypted using AES, 3DES, Blowfish, CAST128, or Arcfour) and 388 ty (hmac-md5, hmac-sha1, umac-64, hmac-ripemd160). Protocol 1 lacks a
383 integrity (hmac-md5, hmac-sha1, umac-64, hmac-ripemd160). Protocol 1 389 strong mechanism for ensuring the integrity of the connection.
384 lacks a strong mechanism for ensuring the integrity of the connection.
385 390
386 The methods available for authentication are: GSSAPI-based authentica- 391 The methods available for authentication are: GSSAPI-based authentica-
387 tion, host-based authentication, public key authentication, challenge-re- 392 tion, host-based authentication, public key authentication, challenge-re-
@@ -431,8 +436,15 @@ AUTHENTICATION
431 though the lines can be very long. After this, the user can log in with- 436 though the lines can be very long. After this, the user can log in with-
432 out giving the password. 437 out giving the password.
433 438
434 The most convenient way to use public key authentication may be with an 439 A variation on public key authentication is available in the form of cer-
435 authentication agent. See ssh-agent(1) for more information. 440 tificate authentication: instead of a set of public/private keys, signed
441 certificates are used. This has the advantage that a single trusted cer-
442 tification authority can be used in place of many public/private keys.
443 See the CERTIFICATES section of ssh-keygen(1) for more information.
444
445 The most convenient way to use public key or certificate authentication
446 may be with an authentication agent. See ssh-agent(1) for more informa-
447 tion.
436 448
437 Challenge-response authentication works as follows: The server sends an 449 Challenge-response authentication works as follows: The server sends an
438 arbitrary "challenge" text, and prompts for a response. Protocol 2 al- 450 arbitrary "challenge" text, and prompts for a response. Protocol 2 al-
@@ -864,4 +876,4 @@ AUTHORS
864 created OpenSSH. Markus Friedl contributed the support for SSH protocol 876 created OpenSSH. Markus Friedl contributed the support for SSH protocol
865 versions 1.5 and 2.0. 877 versions 1.5 and 2.0.
866 878
867OpenBSD 4.6 March 19, 2009 14 879OpenBSD 4.6 March 5, 2010 14
diff --git a/ssh.1 b/ssh.1
index d84063487..48c11c733 100644
--- a/ssh.1
+++ b/ssh.1
@@ -34,8 +34,8 @@
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.283 2009/03/19 15:15:09 jmc Exp $ 37.\" $OpenBSD: ssh.1,v 1.302 2010/03/05 10:28:21 djm Exp $
38.Dd $Mdocdate: March 19 2009 $ 38.Dd $Mdocdate: March 5 2010 $
39.Dt SSH 1 39.Dt SSH 1
40.Os 40.Os
41.Sh NAME 41.Sh NAME
@@ -54,6 +54,7 @@
54.Oc 54.Oc
55.Op Fl e Ar escape_char 55.Op Fl e Ar escape_char
56.Op Fl F Ar configfile 56.Op Fl F Ar configfile
57.Op Fl I Ar pkcs11
57.Bk -words 58.Bk -words
58.Op Fl i Ar identity_file 59.Op Fl i Ar identity_file
59.Ek 60.Ek
@@ -77,12 +78,11 @@
77.Sm on 78.Sm on
78.Oc 79.Oc
79.Op Fl S Ar ctl_path 80.Op Fl S Ar ctl_path
80.Bk -words 81.Op Fl W Ar host : Ns Ar port
81.Oo Fl w Ar local_tun Ns 82.Oo Fl w Ar local_tun Ns
82.Op : Ns Ar remote_tun Oc 83.Op : Ns Ar remote_tun Oc
83.Oo Ar user Ns @ Oc Ns Ar hostname 84.Oo Ar user Ns @ Oc Ns Ar hostname
84.Op Ar command 85.Op Ar command
85.Ek
86.Sh DESCRIPTION 86.Sh DESCRIPTION
87.Nm 87.Nm
88(SSH client) is a program for logging into a remote machine and for 88(SSH client) is a program for logging into a remote machine and for
@@ -132,8 +132,9 @@ This can also be specified on a per-host basis in a configuration file.
132.Pp 132.Pp
133Agent forwarding should be enabled with caution. 133Agent forwarding should be enabled with caution.
134Users with the ability to bypass file permissions on the remote host 134Users with the ability to bypass file permissions on the remote host
135(for the agent's Unix-domain socket) 135(for the agent's
136can access the local agent through the forwarded connection. 136.Ux Ns -domain
137socket) can access the local agent through the forwarded connection.
137An attacker cannot obtain key material from the agent, 138An attacker cannot obtain key material from the agent,
138however they can perform operations on the keys that enable them to 139however they can perform operations on the keys that enable them to
139authenticate using the identities loaded into the agent. 140authenticate using the identities loaded into the agent.
@@ -284,13 +285,11 @@ will wait for all remote port forwards to be successfully established
284before placing itself in the background. 285before placing itself in the background.
285.It Fl g 286.It Fl g
286Allows remote hosts to connect to local forwarded ports. 287Allows remote hosts to connect to local forwarded ports.
287.It Fl I Ar smartcard_device 288.It Fl I Ar pkcs11
288Specify the device 289Specify the PKCS#11 shared library
289.Nm 290.Nm
290should use to communicate with a smartcard used for storing the user's 291should use to communicate with a PKCS#11 token providing the user's
291private RSA key. 292private RSA key.
292This option is only available if support for smartcard devices
293is compiled in (default is no support).
294.It Fl i Ar identity_file 293.It Fl i Ar identity_file
295Selects a file from which the identity (private key) for 294Selects a file from which the identity (private key) for
296RSA or DSA authentication is read. 295RSA or DSA authentication is read.
@@ -307,6 +306,11 @@ It is possible to have multiple
307.Fl i 306.Fl i
308options (and multiple identities specified in 307options (and multiple identities specified in
309configuration files). 308configuration files).
309.Nm
310will also try to load certificate information from the filename obtained
311by appending
312.Pa -cert.pub
313to identity filenames.
310.It Fl K 314.It Fl K
311Enables GSSAPI-based authentication and forwarding (delegation) of GSSAPI 315Enables GSSAPI-based authentication and forwarding (delegation) of GSSAPI
312credentials to the server. 316credentials to the server.
@@ -469,6 +473,7 @@ For full details of the options listed below, and their possible values, see
469.It NumberOfPasswordPrompts 473.It NumberOfPasswordPrompts
470.It PasswordAuthentication 474.It PasswordAuthentication
471.It PermitLocalCommand 475.It PermitLocalCommand
476.It PKCS11Provider
472.It Port 477.It Port
473.It PreferredAuthentications 478.It PreferredAuthentications
474.It Protocol 479.It Protocol
@@ -481,7 +486,6 @@ For full details of the options listed below, and their possible values, see
481.It SendEnv 486.It SendEnv
482.It ServerAliveInterval 487.It ServerAliveInterval
483.It ServerAliveCountMax 488.It ServerAliveCountMax
484.It SmartcardDevice
485.It StrictHostKeyChecking 489.It StrictHostKeyChecking
486.It TCPKeepAlive 490.It TCPKeepAlive
487.It Tunnel 491.It Tunnel
@@ -601,6 +605,19 @@ Multiple
601.Fl v 605.Fl v
602options increase the verbosity. 606options increase the verbosity.
603The maximum is 3. 607The maximum is 3.
608.It Fl W Ar host : Ns Ar port
609Requests that standard input and output on the client be forwarded to
610.Ar host
611on
612.Ar port
613over the secure channel.
614Implies
615.Fl N ,
616.Fl T ,
617.Cm ExitOnForwardFailure
618and
619.Cm ClearAllForwardings
620and works with Protocol version 2 only.
604.It Fl w Xo 621.It Fl w Xo
605.Ar local_tun Ns Op : Ns Ar remote_tun 622.Ar local_tun Ns Op : Ns Ar remote_tun
606.Xc 623.Xc
@@ -674,20 +691,18 @@ exits with the exit status of the remote command or with 255
674if an error occurred. 691if an error occurred.
675.Sh AUTHENTICATION 692.Sh AUTHENTICATION
676The OpenSSH SSH client supports SSH protocols 1 and 2. 693The OpenSSH SSH client supports SSH protocols 1 and 2.
677Protocol 2 is the default, with 694The default is to use protocol 2 only,
678.Nm 695though this can be changed via the
679falling back to protocol 1 if it detects protocol 2 is unsupported.
680These settings may be altered using the
681.Cm Protocol 696.Cm Protocol
682option in 697option in
683.Xr ssh_config 5 , 698.Xr ssh_config 5
684or enforced using the 699or the
685.Fl 1 700.Fl 1
686and 701and
687.Fl 2 702.Fl 2
688options (see above). 703options (see above).
689Both protocols support similar authentication methods, 704Both protocols support similar authentication methods,
690but protocol 2 is preferred since 705but protocol 2 is the default since
691it provides additional mechanisms for confidentiality 706it provides additional mechanisms for confidentiality
692(the traffic is encrypted using AES, 3DES, Blowfish, CAST128, or Arcfour) 707(the traffic is encrypted using AES, 3DES, Blowfish, CAST128, or Arcfour)
693and integrity (hmac-md5, hmac-sha1, umac-64, hmac-ripemd160). 708and integrity (hmac-md5, hmac-sha1, umac-64, hmac-ripemd160).
@@ -800,8 +815,20 @@ file, and has one key
800per line, though the lines can be very long. 815per line, though the lines can be very long.
801After this, the user can log in without giving the password. 816After this, the user can log in without giving the password.
802.Pp 817.Pp
803The most convenient way to use public key authentication may be with an 818A variation on public key authentication
804authentication agent. 819is available in the form of certificate authentication:
820instead of a set of public/private keys,
821signed certificates are used.
822This has the advantage that a single trusted certification authority
823can be used in place of many public/private keys.
824See the
825.Sx CERTIFICATES
826section of
827.Xr ssh-keygen 1
828for more information.
829.Pp
830The most convenient way to use public key or certificate authentication
831may be with an authentication agent.
805See 832See
806.Xr ssh-agent 1 833.Xr ssh-agent 1
807for more information. 834for more information.
diff --git a/ssh.c b/ssh.c
index a72f16c63..68178ff95 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh.c,v 1.326 2009/07/02 02:11:47 dtucker Exp $ */ 1/* $OpenBSD: ssh.c,v 1.335 2010/02/26 20:29:54 djm 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
@@ -100,10 +100,11 @@
100#include "match.h" 100#include "match.h"
101#include "msg.h" 101#include "msg.h"
102#include "uidswap.h" 102#include "uidswap.h"
103#include "roaming.h"
103#include "version.h" 104#include "version.h"
104 105
105#ifdef SMARTCARD 106#ifdef ENABLE_PKCS11
106#include "scard.h" 107#include "ssh-pkcs11.h"
107#endif 108#endif
108 109
109extern char *__progname; 110extern char *__progname;
@@ -132,6 +133,10 @@ int stdin_null_flag = 0;
132 */ 133 */
133int fork_after_authentication_flag = 0; 134int fork_after_authentication_flag = 0;
134 135
136/* forward stdio to remote host and port */
137char *stdio_forward_host = NULL;
138int stdio_forward_port = 0;
139
135/* 140/*
136 * General data structure for command line options and options configurable 141 * General data structure for command line options and options configurable
137 * in configuration files. See readconf.h. 142 * in configuration files. See readconf.h.
@@ -182,10 +187,12 @@ usage(void)
182 fprintf(stderr, 187 fprintf(stderr,
183"usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]\n" 188"usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]\n"
184" [-D [bind_address:]port] [-e escape_char] [-F configfile]\n" 189" [-D [bind_address:]port] [-e escape_char] [-F configfile]\n"
185" [-i identity_file] [-L [bind_address:]port:host:hostport]\n" 190" [-I pkcs11] [-i identity_file]\n"
191" [-L [bind_address:]port:host:hostport]\n"
186" [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]\n" 192" [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]\n"
187" [-R [bind_address:]port:host:hostport] [-S ctl_path]\n" 193" [-R [bind_address:]port:host:hostport] [-S ctl_path]\n"
188" [-w local_tun[:remote_tun]] [user@]hostname [command]\n" 194" [-W host:port] [-w local_tun[:remote_tun]]\n"
195" [user@]hostname [command]\n"
189 ); 196 );
190 exit(255); 197 exit(255);
191} 198}
@@ -275,7 +282,7 @@ main(int ac, char **av)
275 282
276 again: 283 again:
277 while ((opt = getopt(ac, av, "1246ab:c:e:fgi:kl:m:no:p:qstvx" 284 while ((opt = getopt(ac, av, "1246ab:c:e:fgi:kl:m:no:p:qstvx"
278 "ACD:F:I:KL:MNO:PR:S:TVw:XYy")) != -1) { 285 "ACD:F:I:KL:MNO:PR:S:TVw:W:XYy")) != -1) {
279 switch (opt) { 286 switch (opt) {
280 case '1': 287 case '1':
281 options.protocol = SSH_PROTO_1; 288 options.protocol = SSH_PROTO_1;
@@ -313,6 +320,11 @@ main(int ac, char **av)
313 options.gateway_ports = 1; 320 options.gateway_ports = 1;
314 break; 321 break;
315 case 'O': 322 case 'O':
323 if (stdio_forward_host != NULL)
324 fatal("Cannot specify multiplexing "
325 "command with -W");
326 else if (muxclient_command != 0)
327 fatal("Multiplexing command already specified");
316 if (strcmp(optarg, "check") == 0) 328 if (strcmp(optarg, "check") == 0)
317 muxclient_command = SSHMUX_COMMAND_ALIVE_CHECK; 329 muxclient_command = SSHMUX_COMMAND_ALIVE_CHECK;
318 else if (strcmp(optarg, "exit") == 0) 330 else if (strcmp(optarg, "exit") == 0)
@@ -351,10 +363,10 @@ main(int ac, char **av)
351 xstrdup(optarg); 363 xstrdup(optarg);
352 break; 364 break;
353 case 'I': 365 case 'I':
354#ifdef SMARTCARD 366#ifdef ENABLE_PKCS11
355 options.smartcard_device = xstrdup(optarg); 367 options.pkcs11_provider = xstrdup(optarg);
356#else 368#else
357 fprintf(stderr, "no support for smartcards.\n"); 369 fprintf(stderr, "no support for PKCS#11.\n");
358#endif 370#endif
359 break; 371 break;
360 case 't': 372 case 't':
@@ -388,6 +400,26 @@ main(int ac, char **av)
388 exit(255); 400 exit(255);
389 } 401 }
390 break; 402 break;
403 case 'W':
404 if (stdio_forward_host != NULL)
405 fatal("stdio forward already specified");
406 if (muxclient_command != 0)
407 fatal("Cannot specify stdio forward with -O");
408 if (parse_forward(&fwd, optarg, 1, 0)) {
409 stdio_forward_host = fwd.listen_host;
410 stdio_forward_port = fwd.listen_port;
411 xfree(fwd.connect_host);
412 } else {
413 fprintf(stderr,
414 "Bad stdio forwarding specification '%s'\n",
415 optarg);
416 exit(255);
417 }
418 no_tty_flag = 1;
419 no_shell_flag = 1;
420 options.clear_forwardings = 1;
421 options.exit_on_forward_failure = 1;
422 break;
391 case 'q': 423 case 'q':
392 if (options.log_level == SYSLOG_LEVEL_QUIET) { 424 if (options.log_level == SYSLOG_LEVEL_QUIET) {
393 options.log_level = SYSLOG_LEVEL_SILENT; 425 options.log_level = SYSLOG_LEVEL_SILENT;
@@ -532,7 +564,7 @@ main(int ac, char **av)
532 ac -= optind; 564 ac -= optind;
533 av += optind; 565 av += optind;
534 566
535 if (ac > 0 && !host && **av != '-') { 567 if (ac > 0 && !host) {
536 if (strrchr(*av, '@')) { 568 if (strrchr(*av, '@')) {
537 p = xstrdup(*av); 569 p = xstrdup(*av);
538 cp = strrchr(p, '@'); 570 cp = strrchr(p, '@');
@@ -875,11 +907,48 @@ ssh_confirm_remote_forward(int type, u_int32_t seq, void *ctxt)
875} 907}
876 908
877static void 909static void
910client_cleanup_stdio_fwd(int id, void *arg)
911{
912 debug("stdio forwarding: done");
913 cleanup_exit(0);
914}
915
916static int
917client_setup_stdio_fwd(const char *host_to_connect, u_short port_to_connect)
918{
919 Channel *c;
920 int in, out;
921
922 debug3("client_setup_stdio_fwd %s:%d", host_to_connect,
923 port_to_connect);
924
925 in = dup(STDIN_FILENO);
926 out = dup(STDOUT_FILENO);
927 if (in < 0 || out < 0)
928 fatal("channel_connect_stdio_fwd: dup() in/out failed");
929
930 if ((c = channel_connect_stdio_fwd(host_to_connect, port_to_connect,
931 in, out)) == NULL)
932 return 0;
933 channel_register_cleanup(c->self, client_cleanup_stdio_fwd, 0);
934 return 1;
935}
936
937static void
878ssh_init_forwarding(void) 938ssh_init_forwarding(void)
879{ 939{
880 int success = 0; 940 int success = 0;
881 int i; 941 int i;
882 942
943 if (stdio_forward_host != NULL) {
944 if (!compat20) {
945 fatal("stdio forwarding require Protocol 2");
946 }
947 if (!client_setup_stdio_fwd(stdio_forward_host,
948 stdio_forward_port))
949 fatal("Failed to connect in stdio forward mode.");
950 }
951
883 /* Initiate local TCP/IP port forwardings. */ 952 /* Initiate local TCP/IP port forwardings. */
884 for (i = 0; i < options.num_local_forwards; i++) { 953 for (i = 0; i < options.num_local_forwards; i++) {
885 debug("Local connections to %.200s:%d forwarded to remote " 954 debug("Local connections to %.200s:%d forwarded to remote "
@@ -1227,6 +1296,9 @@ ssh_session2(void)
1227 fatal("daemon() failed: %.200s", strerror(errno)); 1296 fatal("daemon() failed: %.200s", strerror(errno));
1228 } 1297 }
1229 1298
1299 if (options.use_roaming)
1300 request_roaming();
1301
1230 return client_loop(tty_flag, tty_flag ? 1302 return client_loop(tty_flag, tty_flag ?
1231 options.escape_char : SSH_ESCAPECHAR_NONE, id); 1303 options.escape_char : SSH_ESCAPECHAR_NONE, id);
1232} 1304}
@@ -1239,31 +1311,37 @@ load_public_identity_files(void)
1239 int i = 0; 1311 int i = 0;
1240 Key *public; 1312 Key *public;
1241 struct passwd *pw; 1313 struct passwd *pw;
1242#ifdef SMARTCARD 1314 u_int n_ids;
1315 char *identity_files[SSH_MAX_IDENTITY_FILES];
1316 Key *identity_keys[SSH_MAX_IDENTITY_FILES];
1317#ifdef ENABLE_PKCS11
1243 Key **keys; 1318 Key **keys;
1319 int nkeys;
1320#endif /* PKCS11 */
1244 1321
1245 if (options.smartcard_device != NULL && 1322 n_ids = 0;
1323 bzero(identity_files, sizeof(identity_files));
1324 bzero(identity_keys, sizeof(identity_keys));
1325
1326#ifdef ENABLE_PKCS11
1327 if (options.pkcs11_provider != NULL &&
1246 options.num_identity_files < SSH_MAX_IDENTITY_FILES && 1328 options.num_identity_files < SSH_MAX_IDENTITY_FILES &&
1247 (keys = sc_get_keys(options.smartcard_device, NULL)) != NULL) { 1329 (pkcs11_init(!options.batch_mode) == 0) &&
1248 int count = 0; 1330 (nkeys = pkcs11_add_provider(options.pkcs11_provider, NULL,
1249 for (i = 0; keys[i] != NULL; i++) { 1331 &keys)) > 0) {
1250 count++; 1332 for (i = 0; i < nkeys; i++) {
1251 memmove(&options.identity_files[1], 1333 if (n_ids >= SSH_MAX_IDENTITY_FILES) {
1252 &options.identity_files[0], 1334 key_free(keys[i]);
1253 sizeof(char *) * (SSH_MAX_IDENTITY_FILES - 1)); 1335 continue;
1254 memmove(&options.identity_keys[1], 1336 }
1255 &options.identity_keys[0], 1337 identity_keys[n_ids] = keys[i];
1256 sizeof(Key *) * (SSH_MAX_IDENTITY_FILES - 1)); 1338 identity_files[n_ids] =
1257 options.num_identity_files++; 1339 xstrdup(options.pkcs11_provider); /* XXX */
1258 options.identity_keys[0] = keys[i]; 1340 n_ids++;
1259 options.identity_files[0] = sc_get_key_label(keys[i]);
1260 } 1341 }
1261 if (options.num_identity_files > SSH_MAX_IDENTITY_FILES)
1262 options.num_identity_files = SSH_MAX_IDENTITY_FILES;
1263 i = count;
1264 xfree(keys); 1342 xfree(keys);
1265 } 1343 }
1266#endif /* SMARTCARD */ 1344#endif /* ENABLE_PKCS11 */
1267 if ((pw = getpwuid(original_real_uid)) == NULL) 1345 if ((pw = getpwuid(original_real_uid)) == NULL)
1268 fatal("load_public_identity_files: getpwuid failed"); 1346 fatal("load_public_identity_files: getpwuid failed");
1269 pwname = xstrdup(pw->pw_name); 1347 pwname = xstrdup(pw->pw_name);
@@ -1271,7 +1349,11 @@ load_public_identity_files(void)
1271 if (gethostname(thishost, sizeof(thishost)) == -1) 1349 if (gethostname(thishost, sizeof(thishost)) == -1)
1272 fatal("load_public_identity_files: gethostname: %s", 1350 fatal("load_public_identity_files: gethostname: %s",
1273 strerror(errno)); 1351 strerror(errno));
1274 for (; i < options.num_identity_files; i++) { 1352 for (i = 0; i < options.num_identity_files; i++) {
1353 if (n_ids >= SSH_MAX_IDENTITY_FILES) {
1354 xfree(options.identity_files[i]);
1355 continue;
1356 }
1275 cp = tilde_expand_filename(options.identity_files[i], 1357 cp = tilde_expand_filename(options.identity_files[i],
1276 original_real_uid); 1358 original_real_uid);
1277 filename = percent_expand(cp, "d", pwdir, 1359 filename = percent_expand(cp, "d", pwdir,
@@ -1298,9 +1380,37 @@ load_public_identity_files(void)
1298 } 1380 }
1299 } 1381 }
1300 xfree(options.identity_files[i]); 1382 xfree(options.identity_files[i]);
1301 options.identity_files[i] = filename; 1383 identity_files[n_ids] = filename;
1302 options.identity_keys[i] = public; 1384 identity_keys[n_ids] = public;
1385
1386 if (++n_ids >= SSH_MAX_IDENTITY_FILES)
1387 continue;
1388
1389 /* Try to add the certificate variant too */
1390 xasprintf(&cp, "%s-cert", filename);
1391 public = key_load_public(cp, NULL);
1392 debug("identity file %s type %d", cp,
1393 public ? public->type : -1);
1394 if (public == NULL) {
1395 xfree(cp);
1396 continue;
1397 }
1398 if (!key_is_cert(public)) {
1399 debug("%s: key %s type %s is not a certificate",
1400 __func__, cp, key_type(public));
1401 key_free(public);
1402 xfree(cp);
1403 continue;
1404 }
1405 identity_keys[n_ids] = public;
1406 /* point to the original path, most likely the private key */
1407 identity_files[n_ids] = xstrdup(filename);
1408 n_ids++;
1303 } 1409 }
1410 options.num_identity_files = n_ids;
1411 memcpy(options.identity_files, identity_files, sizeof(identity_files));
1412 memcpy(options.identity_keys, identity_keys, sizeof(identity_keys));
1413
1304 bzero(pwname, strlen(pwname)); 1414 bzero(pwname, strlen(pwname));
1305 xfree(pwname); 1415 xfree(pwname);
1306 bzero(pwdir, strlen(pwdir)); 1416 bzero(pwdir, strlen(pwdir));
diff --git a/ssh2.h b/ssh2.h
index 1c33dc268..3ffaf686b 100644
--- a/ssh2.h
+++ b/ssh2.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh2.h,v 1.11 2008/11/04 08:22:13 djm Exp $ */ 1/* $OpenBSD: ssh2.h,v 1.13 2010/02/26 20:29:54 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -166,3 +166,13 @@
166 166
167#define SSH2_EXTENDED_DATA_STDERR 1 167#define SSH2_EXTENDED_DATA_STDERR 1
168 168
169/* kex messages for resume@appgate.com */
170#define SSH2_MSG_KEX_ROAMING_RESUME 30
171#define SSH2_MSG_KEX_ROAMING_AUTH_REQUIRED 31
172#define SSH2_MSG_KEX_ROAMING_AUTH 32
173#define SSH2_MSG_KEX_ROAMING_AUTH_OK 33
174#define SSH2_MSG_KEX_ROAMING_AUTH_FAIL 34
175
176/* Certificate types for OpenSSH certificate keys extension */
177#define SSH2_CERT_TYPE_USER 1
178#define SSH2_CERT_TYPE_HOST 2
diff --git a/ssh_config b/ssh_config
index b8c420c23..4281e7317 100644
--- a/ssh_config
+++ b/ssh_config
@@ -1,4 +1,4 @@
1# $OpenBSD: ssh_config,v 1.25 2009/02/17 01:28:32 djm Exp $ 1# $OpenBSD: ssh_config,v 1.26 2010/01/11 01:39:46 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
@@ -47,6 +47,7 @@ Host *
47# TunnelDevice any:any 47# TunnelDevice any:any
48# PermitLocalCommand no 48# PermitLocalCommand no
49# VisualHostKey no 49# VisualHostKey no
50# ProxyCommand ssh -q -W %h:%p gateway.example.com
50 SendEnv LANG LC_* 51 SendEnv LANG LC_*
51 HashKnownHosts yes 52 HashKnownHosts yes
52 GSSAPIAuthentication yes 53 GSSAPIAuthentication yes
diff --git a/ssh_config.0 b/ssh_config.0
index 756fc6dbb..48969a22a 100644
--- a/ssh_config.0
+++ b/ssh_config.0
@@ -316,7 +316,9 @@ DESCRIPTION
316 identity is read. The default is ~/.ssh/identity for protocol 316 identity is read. The default is ~/.ssh/identity for protocol
317 version 1, and ~/.ssh/id_rsa and ~/.ssh/id_dsa for protocol ver- 317 version 1, and ~/.ssh/id_rsa and ~/.ssh/id_dsa for protocol ver-
318 sion 2. Additionally, any identities represented by the authen- 318 sion 2. Additionally, any identities represented by the authen-
319 tication agent will be used for authentication. 319 tication agent will be used for authentication. ssh(1) will try
320 to load certificate information from the filename obtained by ap-
321 pending -cert.pub to the path of a specified IdentityFile.
320 322
321 The file name may use the tilde syntax to refer to a user's home 323 The file name may use the tilde syntax to refer to a user's home
322 directory or one of the following escape characters: `%d' (local 324 directory or one of the following escape characters: `%d' (local
@@ -347,8 +349,14 @@ DESCRIPTION
347 `%d' (local user's home directory), `%h' (remote host name), `%l' 349 `%d' (local user's home directory), `%h' (remote host name), `%l'
348 (local host name), `%n' (host name as provided on the command 350 (local host name), `%n' (host name as provided on the command
349 line), `%p' (remote port), `%r' (remote user name) or `%u' (local 351 line), `%p' (remote port), `%r' (remote user name) or `%u' (local
350 user name). This directive is ignored unless PermitLocalCommand 352 user name).
351 has been enabled. 353
354 The command is run synchronously and does not have access to the
355 session of the ssh(1) that spawned it. It should not be used for
356 interactive commands.
357
358 This directive is ignored unless PermitLocalCommand has been en-
359 abled.
352 360
353 LocalForward 361 LocalForward
354 Specifies that a TCP port on the local machine be forwarded over 362 Specifies that a TCP port on the local machine be forwarded over
@@ -405,6 +413,11 @@ DESCRIPTION
405 ing the !command escape sequence in ssh(1). The argument must be 413 ing the !command escape sequence in ssh(1). The argument must be
406 ``yes'' or ``no''. The default is ``no''. 414 ``yes'' or ``no''. The default is ``no''.
407 415
416 PKCS11Provider
417 Specifies which PKCS#11 provider to use. The argument to this
418 keyword is the PKCS#11 shared libary ssh(1) should use to commu-
419 nicate with a PKCS#11 token providing the user's private RSA key.
420
408 Port Specifies the port number to connect on the remote host. The de- 421 Port Specifies the port number to connect on the remote host. The de-
409 fault is 22. 422 fault is 22.
410 423
@@ -418,9 +431,9 @@ DESCRIPTION
418 Protocol 431 Protocol
419 Specifies the protocol versions ssh(1) should support in order of 432 Specifies the protocol versions ssh(1) should support in order of
420 preference. The possible values are `1' and `2'. Multiple ver- 433 preference. The possible values are `1' and `2'. Multiple ver-
421 sions must be comma-separated. The default is ``2,1''. This 434 sions must be comma-separated. When this option is set to
422 means that ssh tries version 2 and falls back to version 1 if 435 ``2,1'' ssh will try version 2 and fall back to version 1 if ver-
423 version 2 is not available. 436 sion 2 is not available. The default is `2'.
424 437
425 ProxyCommand 438 ProxyCommand
426 Specifies the command to use to connect to the server. The com- 439 Specifies the command to use to connect to the server. The com-
@@ -527,13 +540,6 @@ DESCRIPTION
527 default is 0, indicating that these messages will not be sent to 540 default is 0, indicating that these messages will not be sent to
528 the server. This option applies to protocol version 2 only. 541 the server. This option applies to protocol version 2 only.
529 542
530 SmartcardDevice
531 Specifies which smartcard device to use. The argument to this
532 keyword is the device ssh(1) should use to communicate with a
533 smartcard used for storing the user's private RSA key. By de-
534 fault, no device is specified and smartcard support is not acti-
535 vated.
536
537 StrictHostKeyChecking 543 StrictHostKeyChecking
538 If this flag is set to ``yes'', ssh(1) will never automatically 544 If this flag is set to ``yes'', ssh(1) will never automatically
539 add host keys to the ~/.ssh/known_hosts file, and refuses to con- 545 add host keys to the ~/.ssh/known_hosts file, and refuses to con-
@@ -667,4 +673,4 @@ AUTHORS
667 ated OpenSSH. Markus Friedl contributed the support for SSH protocol 673 ated OpenSSH. Markus Friedl contributed the support for SSH protocol
668 versions 1.5 and 2.0. 674 versions 1.5 and 2.0.
669 675
670OpenBSD 4.6 February 22, 2009 11 676OpenBSD 4.6 March 5, 2010 11
diff --git a/ssh_config.5 b/ssh_config.5
index 76e451079..0ce851aa8 100644
--- a/ssh_config.5
+++ b/ssh_config.5
@@ -34,8 +34,8 @@
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.119 2009/02/22 23:50:57 djm Exp $ 37.\" $OpenBSD: ssh_config.5,v 1.129 2010/03/05 10:28:21 djm Exp $
38.Dd $Mdocdate: February 22 2009 $ 38.Dd $Mdocdate: March 5 2010 $
39.Dt SSH_CONFIG 5 39.Dt SSH_CONFIG 5
40.Os 40.Os
41.Sh NAME 41.Sh NAME
@@ -610,6 +610,12 @@ and
610for protocol version 2. 610for protocol version 2.
611Additionally, any identities represented by the authentication agent 611Additionally, any identities represented by the authentication agent
612will be used for authentication. 612will be used for authentication.
613.Xr ssh 1
614will try to load certificate information from the filename obtained by
615appending
616.Pa -cert.pub
617to the path of a specified
618.Cm IdentityFile .
613.Pp 619.Pp
614The file name may use the tilde 620The file name may use the tilde
615syntax to refer to a user's home directory or one of the following 621syntax to refer to a user's home directory or one of the following
@@ -667,6 +673,13 @@ The following escape character substitutions will be performed:
667(remote user name) or 673(remote user name) or
668.Ql %u 674.Ql %u
669(local user name). 675(local user name).
676.Pp
677The command is run synchronously and does not have access to the
678session of the
679.Xr ssh 1
680that spawned it.
681It should not be used for interactive commands.
682.Pp
670This directive is ignored unless 683This directive is ignored unless
671.Cm PermitLocalCommand 684.Cm PermitLocalCommand
672has been enabled. 685has been enabled.
@@ -755,6 +768,12 @@ or
755.Dq no . 768.Dq no .
756The default is 769The default is
757.Dq no . 770.Dq no .
771.It Cm PKCS11Provider
772Specifies which PKCS#11 provider to use.
773The argument to this keyword is the PKCS#11 shared libary
774.Xr ssh 1
775should use to communicate with a PKCS#11 token providing the user's
776private RSA key.
758.It Cm Port 777.It Cm Port
759Specifies the port number to connect on the remote host. 778Specifies the port number to connect on the remote host.
760The default is 22. 779The default is 22.
@@ -781,11 +800,13 @@ The possible values are
781and 800and
782.Sq 2 . 801.Sq 2 .
783Multiple versions must be comma-separated. 802Multiple versions must be comma-separated.
784The default is 803When this option is set to
785.Dq 2,1 . 804.Dq 2,1
786This means that ssh 805.Nm ssh
787tries version 2 and falls back to version 1 806will try version 2 and fall back to version 1
788if version 2 is not available. 807if version 2 is not available.
808The default is
809.Sq 2 .
789.It Cm ProxyCommand 810.It Cm ProxyCommand
790Specifies the command to use to connect to the server. 811Specifies the command to use to connect to the server.
791The command 812The command
@@ -979,13 +1000,6 @@ This option applies to protocol version 2 only.
979and 1000and
980.Cm SetupTimeOut 1001.Cm SetupTimeOut
981are Debian-specific compatibility aliases for this option. 1002are Debian-specific compatibility aliases for this option.
982.It Cm SmartcardDevice
983Specifies which smartcard device to use.
984The argument to this keyword is the device
985.Xr ssh 1
986should use to communicate with a smartcard used for storing the user's
987private RSA key.
988By default, no device is specified and smartcard support is not activated.
989.It Cm StrictHostKeyChecking 1003.It Cm StrictHostKeyChecking
990If this flag is set to 1004If this flag is set to
991.Dq yes , 1005.Dq yes ,
diff --git a/sshconnect.c b/sshconnect.c
index 96f823f93..b6fea4d7e 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect.c,v 1.214 2009/05/28 16:50:16 andreas Exp $ */ 1/* $OpenBSD: sshconnect.c,v 1.220 2010/03/04 10:36:03 djm 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
@@ -28,6 +28,7 @@
28 28
29#include <ctype.h> 29#include <ctype.h>
30#include <errno.h> 30#include <errno.h>
31#include <fcntl.h>
31#include <netdb.h> 32#include <netdb.h>
32#ifdef HAVE_PATHS_H 33#ifdef HAVE_PATHS_H
33#include <paths.h> 34#include <paths.h>
@@ -57,6 +58,7 @@
57#include "misc.h" 58#include "misc.h"
58#include "dns.h" 59#include "dns.h"
59#include "roaming.h" 60#include "roaming.h"
61#include "ssh2.h"
60#include "version.h" 62#include "version.h"
61 63
62char *client_version_string = NULL; 64char *client_version_string = NULL;
@@ -191,8 +193,11 @@ ssh_create_socket(int privileged, struct addrinfo *ai)
191 return sock; 193 return sock;
192 } 194 }
193 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); 195 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
194 if (sock < 0) 196 if (sock < 0) {
195 error("socket: %.100s", strerror(errno)); 197 error("socket: %.100s", strerror(errno));
198 return -1;
199 }
200 fcntl(sock, F_SETFD, FD_CLOEXEC);
196 201
197 /* Bind the socket to an alternative local IP address */ 202 /* Bind the socket to an alternative local IP address */
198 if (options.bind_address == NULL) 203 if (options.bind_address == NULL)
@@ -572,6 +577,23 @@ confirm(const char *prompt)
572 } 577 }
573} 578}
574 579
580static int
581check_host_cert(const char *host, const Key *host_key)
582{
583 const char *reason;
584
585 if (key_cert_check_authority(host_key, 1, 0, host, &reason) != 0) {
586 error("%s", reason);
587 return 0;
588 }
589 if (buffer_len(&host_key->cert->constraints) != 0) {
590 error("Certificate for %s contains unsupported constraint(s)",
591 host);
592 return 0;
593 }
594 return 1;
595}
596
575/* 597/*
576 * check whether the supplied host key is valid, return -1 if the key 598 * check whether the supplied host key is valid, return -1 if the key
577 * is not valid. the user_hostfile will not be updated if 'readonly' is true. 599 * is not valid. the user_hostfile will not be updated if 'readonly' is true.
@@ -584,13 +606,13 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
584 Key *host_key, int readonly, const char *user_hostfile, 606 Key *host_key, int readonly, const char *user_hostfile,
585 const char *system_hostfile) 607 const char *system_hostfile)
586{ 608{
587 Key *file_key; 609 Key *file_key, *raw_key = NULL;
588 const char *type = key_type(host_key); 610 const char *type;
589 char *ip = NULL, *host = NULL; 611 char *ip = NULL, *host = NULL;
590 char hostline[1000], *hostp, *fp, *ra; 612 char hostline[1000], *hostp, *fp, *ra;
591 HostStatus host_status; 613 HostStatus host_status;
592 HostStatus ip_status; 614 HostStatus ip_status;
593 int r, local = 0, host_ip_differ = 0; 615 int r, want_cert, local = 0, host_ip_differ = 0;
594 int salen; 616 int salen;
595 char ntop[NI_MAXHOST]; 617 char ntop[NI_MAXHOST];
596 char msg[1024]; 618 char msg[1024];
@@ -663,11 +685,15 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
663 host = put_host_port(hostname, port); 685 host = put_host_port(hostname, port);
664 } 686 }
665 687
688 retry:
689 want_cert = key_is_cert(host_key);
690 type = key_type(host_key);
691
666 /* 692 /*
667 * Store the host key from the known host file in here so that we can 693 * Store the host key from the known host file in here so that we can
668 * compare it with the key for the IP address. 694 * compare it with the key for the IP address.
669 */ 695 */
670 file_key = key_new(host_key->type); 696 file_key = key_new(key_is_cert(host_key) ? KEY_UNSPEC : host_key->type);
671 697
672 /* 698 /*
673 * Check if the host key is present in the user's list of known 699 * Check if the host key is present in the user's list of known
@@ -683,9 +709,10 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
683 } 709 }
684 /* 710 /*
685 * Also perform check for the ip address, skip the check if we are 711 * Also perform check for the ip address, skip the check if we are
686 * localhost or the hostname was an ip address to begin with 712 * localhost, looking for a certificate, or the hostname was an ip
713 * address to begin with.
687 */ 714 */
688 if (options.check_host_ip) { 715 if (!want_cert && options.check_host_ip) {
689 Key *ip_key = key_new(host_key->type); 716 Key *ip_key = key_new(host_key->type);
690 717
691 ip_file = user_hostfile; 718 ip_file = user_hostfile;
@@ -709,11 +736,14 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
709 switch (host_status) { 736 switch (host_status) {
710 case HOST_OK: 737 case HOST_OK:
711 /* The host is known and the key matches. */ 738 /* The host is known and the key matches. */
712 debug("Host '%.200s' is known and matches the %s host key.", 739 debug("Host '%.200s' is known and matches the %s host %s.",
713 host, type); 740 host, type, want_cert ? "certificate" : "key");
714 debug("Found key in %s:%d", host_file, host_line); 741 debug("Found %s in %s:%d",
742 want_cert ? "certificate" : "key", host_file, host_line);
743 if (want_cert && !check_host_cert(hostname, host_key))
744 goto fail;
715 if (options.check_host_ip && ip_status == HOST_NEW) { 745 if (options.check_host_ip && ip_status == HOST_NEW) {
716 if (readonly) 746 if (readonly || want_cert)
717 logit("%s host key for IP address " 747 logit("%s host key for IP address "
718 "'%.128s' not in list of known hosts.", 748 "'%.128s' not in list of known hosts.",
719 type, ip); 749 type, ip);
@@ -745,7 +775,7 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
745 break; 775 break;
746 } 776 }
747 } 777 }
748 if (readonly) 778 if (readonly || want_cert)
749 goto fail; 779 goto fail;
750 /* The host is new. */ 780 /* The host is new. */
751 if (options.strict_host_key_checking == 1) { 781 if (options.strict_host_key_checking == 1) {
@@ -829,7 +859,37 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
829 logit("Warning: Permanently added '%.200s' (%s) to the " 859 logit("Warning: Permanently added '%.200s' (%s) to the "
830 "list of known hosts.", hostp, type); 860 "list of known hosts.", hostp, type);
831 break; 861 break;
862 case HOST_REVOKED:
863 error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
864 error("@ WARNING: REVOKED HOST KEY DETECTED! @");
865 error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
866 error("The %s host key for %s is marked as revoked.", type, host);
867 error("This could mean that a stolen key is being used to");
868 error("impersonate this host.");
869
870 /*
871 * If strict host key checking is in use, the user will have
872 * to edit the key manually and we can only abort.
873 */
874 if (options.strict_host_key_checking) {
875 error("%s host key for %.200s was revoked and you have "
876 "requested strict checking.", type, host);
877 goto fail;
878 }
879 goto continue_unsafe;
880
832 case HOST_CHANGED: 881 case HOST_CHANGED:
882 if (want_cert) {
883 /*
884 * This is only a debug() since it is valid to have
885 * CAs with wildcard DNS matches that don't match
886 * all hosts that one might visit.
887 */
888 debug("Host certificate authority does not "
889 "match %s in %s:%d", CA_MARKER,
890 host_file, host_line);
891 goto fail;
892 }
833 if (readonly == ROQUIET) 893 if (readonly == ROQUIET)
834 goto fail; 894 goto fail;
835 if (options.check_host_ip && host_ip_differ) { 895 if (options.check_host_ip && host_ip_differ) {
@@ -867,6 +927,7 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
867 goto fail; 927 goto fail;
868 } 928 }
869 929
930 continue_unsafe:
870 /* 931 /*
871 * If strict host key checking has not been requested, allow 932 * If strict host key checking has not been requested, allow
872 * the connection but without MITM-able authentication or 933 * the connection but without MITM-able authentication or
@@ -925,7 +986,7 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
925 * XXX Should permit the user to change to use the new id. 986 * XXX Should permit the user to change to use the new id.
926 * This could be done by converting the host key to an 987 * This could be done by converting the host key to an
927 * identifying sentence, tell that the host identifies itself 988 * identifying sentence, tell that the host identifies itself
928 * by that sentence, and ask the user if he/she whishes to 989 * by that sentence, and ask the user if he/she wishes to
929 * accept the authentication. 990 * accept the authentication.
930 */ 991 */
931 break; 992 break;
@@ -966,6 +1027,20 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
966 return 0; 1027 return 0;
967 1028
968fail: 1029fail:
1030 if (want_cert && host_status != HOST_REVOKED) {
1031 /*
1032 * No matching certificate. Downgrade cert to raw key and
1033 * search normally.
1034 */
1035 debug("No matching CA found. Retry with plain key");
1036 raw_key = key_from_private(host_key);
1037 if (key_drop_cert(raw_key) != 0)
1038 fatal("Couldn't drop certificate");
1039 host_key = raw_key;
1040 goto retry;
1041 }
1042 if (raw_key != NULL)
1043 key_free(raw_key);
969 xfree(ip); 1044 xfree(ip);
970 xfree(host); 1045 xfree(host);
971 return -1; 1046 return -1;
@@ -978,7 +1053,8 @@ verify_host_key(char *host, struct sockaddr *hostaddr, Key *host_key)
978 struct stat st; 1053 struct stat st;
979 int flags = 0; 1054 int flags = 0;
980 1055
981 if (options.verify_host_key_dns && 1056 /* XXX certs are not yet supported for DNS */
1057 if (!key_is_cert(host_key) && options.verify_host_key_dns &&
982 verify_host_key_dns(host, hostaddr, host_key, &flags) == 0) { 1058 verify_host_key_dns(host, hostaddr, host_key, &flags) == 0) {
983 1059
984 if (flags & DNS_VERIFY_FOUND) { 1060 if (flags & DNS_VERIFY_FOUND) {
diff --git a/sshconnect2.c b/sshconnect2.c
index bc8d206ae..f10f6bf8c 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect2.c,v 1.171 2009/03/05 07:18:19 djm Exp $ */ 1/* $OpenBSD: sshconnect2.c,v 1.180 2010/02/26 20:29:54 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2008 Damien Miller. All rights reserved. 4 * Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -32,6 +32,7 @@
32#include <sys/stat.h> 32#include <sys/stat.h>
33 33
34#include <errno.h> 34#include <errno.h>
35#include <fcntl.h>
35#include <netdb.h> 36#include <netdb.h>
36#include <pwd.h> 37#include <pwd.h>
37#include <signal.h> 38#include <signal.h>
@@ -204,6 +205,11 @@ ssh_kex2(char *host, struct sockaddr *hostaddr)
204 205
205 dispatch_run(DISPATCH_BLOCK, &kex->done, kex); 206 dispatch_run(DISPATCH_BLOCK, &kex->done, kex);
206 207
208 if (options.use_roaming && !kex->roaming) {
209 debug("Roaming not allowed by server");
210 options.use_roaming = 0;
211 }
212
207 session_id2 = kex->session_id; 213 session_id2 = kex->session_id;
208 session_id2_len = kex->session_id_len; 214 session_id2_len = kex->session_id_len;
209 215
@@ -262,6 +268,7 @@ struct Authmethod {
262}; 268};
263 269
264void input_userauth_success(int, u_int32_t, void *); 270void input_userauth_success(int, u_int32_t, void *);
271void input_userauth_success_unexpected(int, u_int32_t, void *);
265void input_userauth_failure(int, u_int32_t, void *); 272void input_userauth_failure(int, u_int32_t, void *);
266void input_userauth_banner(int, u_int32_t, void *); 273void input_userauth_banner(int, u_int32_t, void *);
267void input_userauth_error(int, u_int32_t, void *); 274void input_userauth_error(int, u_int32_t, void *);
@@ -485,12 +492,15 @@ void
485input_userauth_success(int type, u_int32_t seq, void *ctxt) 492input_userauth_success(int type, u_int32_t seq, void *ctxt)
486{ 493{
487 Authctxt *authctxt = ctxt; 494 Authctxt *authctxt = ctxt;
495
488 if (authctxt == NULL) 496 if (authctxt == NULL)
489 fatal("input_userauth_success: no authentication context"); 497 fatal("input_userauth_success: no authentication context");
490 if (authctxt->authlist) { 498 if (authctxt->authlist) {
491 xfree(authctxt->authlist); 499 xfree(authctxt->authlist);
492 authctxt->authlist = NULL; 500 authctxt->authlist = NULL;
493 } 501 }
502 if (authctxt->method != NULL && authctxt->method->cleanup != NULL)
503 authctxt->method->cleanup(authctxt);
494 if (authctxt->methoddata) { 504 if (authctxt->methoddata) {
495 xfree(authctxt->methoddata); 505 xfree(authctxt->methoddata);
496 authctxt->methoddata = NULL; 506 authctxt->methoddata = NULL;
@@ -498,6 +508,18 @@ input_userauth_success(int type, u_int32_t seq, void *ctxt)
498 authctxt->success = 1; /* break out */ 508 authctxt->success = 1; /* break out */
499} 509}
500 510
511void
512input_userauth_success_unexpected(int type, u_int32_t seq, void *ctxt)
513{
514 Authctxt *authctxt = ctxt;
515
516 if (authctxt == NULL)
517 fatal("%s: no authentication context", __func__);
518
519 fatal("Unexpected authentication success during %s.",
520 authctxt->method->name);
521}
522
501/* ARGSUSED */ 523/* ARGSUSED */
502void 524void
503input_userauth_failure(int type, u_int32_t seq, void *ctxt) 525input_userauth_failure(int type, u_int32_t seq, void *ctxt)
@@ -892,6 +914,8 @@ userauth_passwd(Authctxt *authctxt)
892 static int attempt = 0; 914 static int attempt = 0;
893 char prompt[150]; 915 char prompt[150];
894 char *password; 916 char *password;
917 const char *host = options.host_key_alias ? options.host_key_alias :
918 authctxt->host;
895 919
896 if (attempt++ >= options.number_of_password_prompts) 920 if (attempt++ >= options.number_of_password_prompts)
897 return 0; 921 return 0;
@@ -900,7 +924,7 @@ userauth_passwd(Authctxt *authctxt)
900 error("Permission denied, please try again."); 924 error("Permission denied, please try again.");
901 925
902 snprintf(prompt, sizeof(prompt), "%.30s@%.128s's password: ", 926 snprintf(prompt, sizeof(prompt), "%.30s@%.128s's password: ",
903 authctxt->server_user, authctxt->host); 927 authctxt->server_user, host);
904 password = read_passphrase(prompt, 0); 928 password = read_passphrase(prompt, 0);
905 packet_start(SSH2_MSG_USERAUTH_REQUEST); 929 packet_start(SSH2_MSG_USERAUTH_REQUEST);
906 packet_put_cstring(authctxt->server_user); 930 packet_put_cstring(authctxt->server_user);
@@ -929,6 +953,8 @@ input_userauth_passwd_changereq(int type, u_int32_t seqnr, void *ctxt)
929 Authctxt *authctxt = ctxt; 953 Authctxt *authctxt = ctxt;
930 char *info, *lang, *password = NULL, *retype = NULL; 954 char *info, *lang, *password = NULL, *retype = NULL;
931 char prompt[150]; 955 char prompt[150];
956 const char *host = options.host_key_alias ? options.host_key_alias :
957 authctxt->host;
932 958
933 debug2("input_userauth_passwd_changereq"); 959 debug2("input_userauth_passwd_changereq");
934 960
@@ -949,7 +975,7 @@ input_userauth_passwd_changereq(int type, u_int32_t seqnr, void *ctxt)
949 packet_put_char(1); /* additional info */ 975 packet_put_char(1); /* additional info */
950 snprintf(prompt, sizeof(prompt), 976 snprintf(prompt, sizeof(prompt),
951 "Enter %.30s@%.128s's old password: ", 977 "Enter %.30s@%.128s's old password: ",
952 authctxt->server_user, authctxt->host); 978 authctxt->server_user, host);
953 password = read_passphrase(prompt, 0); 979 password = read_passphrase(prompt, 0);
954 packet_put_cstring(password); 980 packet_put_cstring(password);
955 memset(password, 0, strlen(password)); 981 memset(password, 0, strlen(password));
@@ -958,7 +984,7 @@ input_userauth_passwd_changereq(int type, u_int32_t seqnr, void *ctxt)
958 while (password == NULL) { 984 while (password == NULL) {
959 snprintf(prompt, sizeof(prompt), 985 snprintf(prompt, sizeof(prompt),
960 "Enter %.30s@%.128s's new password: ", 986 "Enter %.30s@%.128s's new password: ",
961 authctxt->server_user, authctxt->host); 987 authctxt->server_user, host);
962 password = read_passphrase(prompt, RP_ALLOW_EOF); 988 password = read_passphrase(prompt, RP_ALLOW_EOF);
963 if (password == NULL) { 989 if (password == NULL) {
964 /* bail out */ 990 /* bail out */
@@ -966,7 +992,7 @@ input_userauth_passwd_changereq(int type, u_int32_t seqnr, void *ctxt)
966 } 992 }
967 snprintf(prompt, sizeof(prompt), 993 snprintf(prompt, sizeof(prompt),
968 "Retype %.30s@%.128s's new password: ", 994 "Retype %.30s@%.128s's new password: ",
969 authctxt->server_user, authctxt->host); 995 authctxt->server_user, host);
970 retype = read_passphrase(prompt, 0); 996 retype = read_passphrase(prompt, 0);
971 if (strcmp(password, retype) != 0) { 997 if (strcmp(password, retype) != 0) {
972 memset(password, 0, strlen(password)); 998 memset(password, 0, strlen(password));
@@ -1334,7 +1360,7 @@ load_identity_file(char *filename)
1334{ 1360{
1335 Key *private; 1361 Key *private;
1336 char prompt[300], *passphrase; 1362 char prompt[300], *passphrase;
1337 int perm_ok, quit, i; 1363 int perm_ok = 0, quit, i;
1338 struct stat st; 1364 struct stat st;
1339 1365
1340 if (stat(filename, &st) < 0) { 1366 if (stat(filename, &st) < 0) {
@@ -1397,6 +1423,8 @@ pubkey_prepare(Authctxt *authctxt)
1397 key = options.identity_keys[i]; 1423 key = options.identity_keys[i];
1398 if (key && key->type == KEY_RSA1) 1424 if (key && key->type == KEY_RSA1)
1399 continue; 1425 continue;
1426 if (key && key->cert && key->cert->type != SSH2_CERT_TYPE_USER)
1427 continue;
1400 options.identity_keys[i] = NULL; 1428 options.identity_keys[i] = NULL;
1401 id = xcalloc(1, sizeof(*id)); 1429 id = xcalloc(1, sizeof(*id));
1402 id->key = key; 1430 id->key = key;
@@ -1600,7 +1628,7 @@ ssh_keysign(Key *key, u_char **sigp, u_int *lenp,
1600 debug2("ssh_keysign called"); 1628 debug2("ssh_keysign called");
1601 1629
1602 if (stat(_PATH_SSH_KEY_SIGN, &st) < 0) { 1630 if (stat(_PATH_SSH_KEY_SIGN, &st) < 0) {
1603 error("ssh_keysign: no installed: %s", strerror(errno)); 1631 error("ssh_keysign: not installed: %s", strerror(errno));
1604 return -1; 1632 return -1;
1605 } 1633 }
1606 if (fflush(stdout) != 0) 1634 if (fflush(stdout) != 0)
@@ -1618,6 +1646,8 @@ ssh_keysign(Key *key, u_char **sigp, u_int *lenp,
1618 return -1; 1646 return -1;
1619 } 1647 }
1620 if (pid == 0) { 1648 if (pid == 0) {
1649 /* keep the socket on exec */
1650 fcntl(packet_get_connection_in(), F_SETFD, 0);
1621 permanently_drop_suid(getuid()); 1651 permanently_drop_suid(getuid());
1622 close(from[0]); 1652 close(from[0]);
1623 if (dup2(from[1], STDOUT_FILENO) < 0) 1653 if (dup2(from[1], STDOUT_FILENO) < 0)
@@ -1670,10 +1700,10 @@ userauth_hostbased(Authctxt *authctxt)
1670 Sensitive *sensitive = authctxt->sensitive; 1700 Sensitive *sensitive = authctxt->sensitive;
1671 Buffer b; 1701 Buffer b;
1672 u_char *signature, *blob; 1702 u_char *signature, *blob;
1673 char *chost, *pkalg, *p, myname[NI_MAXHOST]; 1703 char *chost, *pkalg, *p;
1674 const char *service; 1704 const char *service;
1675 u_int blen, slen; 1705 u_int blen, slen;
1676 int ok, i, len, found = 0; 1706 int ok, i, found = 0;
1677 1707
1678 /* check for a useful key */ 1708 /* check for a useful key */
1679 for (i = 0; i < sensitive->nkeys; i++) { 1709 for (i = 0; i < sensitive->nkeys; i++) {
@@ -1694,23 +1724,13 @@ userauth_hostbased(Authctxt *authctxt)
1694 return 0; 1724 return 0;
1695 } 1725 }
1696 /* figure out a name for the client host */ 1726 /* figure out a name for the client host */
1697 p = NULL; 1727 p = get_local_name(packet_get_connection_in());
1698 if (packet_connection_is_on_socket())
1699 p = get_local_name(packet_get_connection_in());
1700 if (p == NULL) {
1701 if (gethostname(myname, sizeof(myname)) == -1) {
1702 verbose("userauth_hostbased: gethostname: %s",
1703 strerror(errno));
1704 } else
1705 p = xstrdup(myname);
1706 }
1707 if (p == NULL) { 1728 if (p == NULL) {
1708 error("userauth_hostbased: cannot get local ipaddr/name"); 1729 error("userauth_hostbased: cannot get local ipaddr/name");
1709 key_free(private); 1730 key_free(private);
1710 xfree(blob); 1731 xfree(blob);
1711 return 0; 1732 return 0;
1712 } 1733 }
1713 len = strlen(p) + 2;
1714 xasprintf(&chost, "%s.", p); 1734 xasprintf(&chost, "%s.", p);
1715 debug2("userauth_hostbased: chost %s", chost); 1735 debug2("userauth_hostbased: chost %s", chost);
1716 xfree(p); 1736 xfree(p);
@@ -1821,6 +1841,8 @@ userauth_jpake(Authctxt *authctxt)
1821 /* Expect step 1 packet from peer */ 1841 /* Expect step 1 packet from peer */
1822 dispatch_set(SSH2_MSG_USERAUTH_JPAKE_SERVER_STEP1, 1842 dispatch_set(SSH2_MSG_USERAUTH_JPAKE_SERVER_STEP1,
1823 input_userauth_jpake_server_step1); 1843 input_userauth_jpake_server_step1);
1844 dispatch_set(SSH2_MSG_USERAUTH_SUCCESS,
1845 &input_userauth_success_unexpected);
1824 1846
1825 return 1; 1847 return 1;
1826} 1848}
@@ -1833,6 +1855,7 @@ userauth_jpake_cleanup(Authctxt *authctxt)
1833 jpake_free(authctxt->methoddata); 1855 jpake_free(authctxt->methoddata);
1834 authctxt->methoddata = NULL; 1856 authctxt->methoddata = NULL;
1835 } 1857 }
1858 dispatch_set(SSH2_MSG_USERAUTH_SUCCESS, &input_userauth_success);
1836} 1859}
1837#endif /* JPAKE */ 1860#endif /* JPAKE */
1838 1861
diff --git a/sshd.0 b/sshd.0
index 6e37c9fc1..34eaafc92 100644
--- a/sshd.0
+++ b/sshd.0
@@ -4,9 +4,9 @@ NAME
4 sshd - OpenSSH SSH daemon 4 sshd - OpenSSH SSH daemon
5 5
6SYNOPSIS 6SYNOPSIS
7 sshd [-46DdeiqTt] [-b bits] [-C connection_spec] [-f config_file] 7 sshd [-46DdeiqTt] [-b bits] [-C connection_spec]
8 [-g login_grace_time] [-h host_key_file] [-k key_gen_time] 8 [-c host_certificate_file] [-f config_file] [-g login_grace_time]
9 [-o option] [-p port] [-u len] 9 [-h host_key_file] [-k key_gen_time] [-o option] [-p port] [-u len]
10 10
11DESCRIPTION 11DESCRIPTION
12 sshd (OpenSSH Daemon) is the daemon program for ssh(1). Together these 12 sshd (OpenSSH Daemon) is the daemon program for ssh(1). Together these
@@ -44,14 +44,20 @@ DESCRIPTION
44 are required and may be supplied in any order, either with multi- 44 are required and may be supplied in any order, either with multi-
45 ple -C options or as a comma-separated list. 45 ple -C options or as a comma-separated list.
46 46
47 -c host_certificate_file
48 Specifies a path to a certificate file to identify sshd during
49 key exchange. The certificate file must match a host key file
50 specified using the -h option or the HostKey configuration direc-
51 tive.
52
47 -D When this option is specified, sshd will not detach and does not 53 -D When this option is specified, sshd will not detach and does not
48 become a daemon. This allows easy monitoring of sshd. 54 become a daemon. This allows easy monitoring of sshd.
49 55
50 -d Debug mode. The server sends verbose debug output to the system 56 -d Debug mode. The server sends verbose debug output to standard
51 log, and does not put itself in the background. The server also 57 error, and does not put itself in the background. The server al-
52 will not fork and will only process one connection. This option 58 so will not fork and will only process one connection. This op-
53 is only intended for debugging for the server. Multiple -d op- 59 tion is only intended for debugging for the server. Multiple -d
54 tions increase the debugging level. Maximum is 3. 60 options increase the debugging level. Maximum is 3.
55 61
56 -e When this option is specified, sshd will send the output to the 62 -e When this option is specified, sshd will send the output to the
57 standard error instead of the system log. 63 standard error instead of the system log.
@@ -133,11 +139,11 @@ DESCRIPTION
133 AllowUsers or DenyUsers. 139 AllowUsers or DenyUsers.
134 140
135AUTHENTICATION 141AUTHENTICATION
136 The OpenSSH SSH daemon supports SSH protocols 1 and 2. Both protocols 142 The OpenSSH SSH daemon supports SSH protocols 1 and 2. The default is to
137 are supported by default, though this can be changed via the Protocol op- 143 use protocol 2 only, though this can be changed via the Protocol option
138 tion in sshd_config(5). Protocol 2 supports both RSA and DSA keys; pro- 144 in sshd_config(5). Protocol 2 supports both RSA and DSA keys; protocol 1
139 tocol 1 only supports RSA keys. For both protocols, each host has a 145 only supports RSA keys. For both protocols, each host has a host-specif-
140 host-specific key, normally 2048 bits, used to identify the host. 146 ic key, normally 2048 bits, used to identify the host.
141 147
142 Forward security for protocol 1 is provided through an additional server 148 Forward security for protocol 1 is provided through an additional server
143 key, normally 768 bits, generated when the server starts. This key is 149 key, normally 768 bits, generated when the server starts. This key is
@@ -280,6 +286,15 @@ AUTHORIZED_KEYS FILE FORMAT
280 lowing option specifications are supported (note that option keywords are 286 lowing option specifications are supported (note that option keywords are
281 case-insensitive): 287 case-insensitive):
282 288
289 cert-authority
290 Specifies that the listed key is a certification authority (CA)
291 that is trusted to validate signed certificates for user authen-
292 tication.
293
294 Certificates may encode access restrictions similar to these key
295 options. If both certificate restrictions and key options are
296 present, the most restrictive union of the two is applied.
297
283 command="command" 298 command="command"
284 Specifies that the command is executed whenever this key is used 299 Specifies that the command is executed whenever this key is used
285 for authentication. The command supplied by the user (if any) is 300 for authentication. The command supplied by the user (if any) is
@@ -294,7 +309,9 @@ AUTHORIZED_KEYS FILE FORMAT
294 explicitly prohibited. The command originally supplied by the 309 explicitly prohibited. The command originally supplied by the
295 client is available in the SSH_ORIGINAL_COMMAND environment vari- 310 client is available in the SSH_ORIGINAL_COMMAND environment vari-
296 able. Note that this option applies to shell, command or subsys- 311 able. Note that this option applies to shell, command or subsys-
297 tem execution. 312 tem execution. Also note that this command may be superseded by
313 either a sshd_config(5) ForceCommand directive or a command em-
314 bedded in a certificate.
298 315
299 environment="NAME=value" 316 environment="NAME=value"
300 Specifies that the string is to be added to the environment when 317 Specifies that the string is to be added to the environment when
@@ -373,8 +390,15 @@ SSH_KNOWN_HOSTS FILE FORMAT
373 matically: whenever the user connects from an unknown host, its key is 390 matically: whenever the user connects from an unknown host, its key is
374 added to the per-user file. 391 added to the per-user file.
375 392
376 Each line in these files contains the following fields: hostnames, bits, 393 Each line in these files contains the following fields: markers (option-
377 exponent, modulus, comment. The fields are separated by spaces. 394 al), hostnames, bits, exponent, modulus, comment. The fields are sepa-
395 rated by spaces.
396
397 The marker is optional, but if it is present then it must be one of
398 ``@cert-authority'', to indicate that the line contains a certification
399 authority (CA) key, or ``@revoked'', to indicate that the key contained
400 on the line is revoked and must not ever be accepted. Only one marker
401 should be used on a key line.
378 402
379 Hostnames is a comma-separated list of patterns (`*' and `?' act as wild- 403 Hostnames is a comma-separated list of patterns (`*' and `?' act as wild-
380 cards); each pattern in turn is matched against the canonical host name 404 cards); each pattern in turn is matched against the canonical host name
@@ -398,17 +422,32 @@ SSH_KNOWN_HOSTS FILE FORMAT
398 Lines starting with `#' and empty lines are ignored as comments. 422 Lines starting with `#' and empty lines are ignored as comments.
399 423
400 When performing host authentication, authentication is accepted if any 424 When performing host authentication, authentication is accepted if any
401 matching line has the proper key. It is thus permissible (but not recom- 425 matching line has the proper key; either one that matches exactly or, if
402 mended) to have several lines or different host keys for the same names. 426 the server has presented a certificate for authentication, the key of the
403 This will inevitably happen when short forms of host names from different 427 certification authority that signed the certificate. For a key to be
404 domains are put in the file. It is possible that the files contain con- 428 trusted as a certification authority, it must use the ``@cert-authority''
405 flicting information; authentication is accepted if valid information can 429 marker described above.
406 be found from either file. 430
431 The known hosts file also provides a facility to mark keys as revoked,
432 for example when it is known that the associated private key has been
433 stolen. Revoked keys are specified by including the ``@revoked'' marker
434 at the beginning of the key line, and are never accepted for authentica-
435 tion or as certification authorities, but instead will produce a warning
436 from ssh(1) when they are encountered.
437
438 It is permissible (but not recommended) to have several lines or differ-
439 ent host keys for the same names. This will inevitably happen when short
440 forms of host names from different domains are put in the file. It is
441 possible that the files contain conflicting information; authentication
442 is accepted if valid information can be found from either file.
407 443
408 Note that the lines in these files are typically hundreds of characters 444 Note that the lines in these files are typically hundreds of characters
409 long, and you definitely don't want to type in the host keys by hand. 445 long, and you definitely don't want to type in the host keys by hand.
410 Rather, generate them by a script or by taking /etc/ssh/ssh_host_key.pub 446 Rather, generate them by a script, ssh-keyscan(1) or by taking
411 and adding the host names at the front. 447 /etc/ssh/ssh_host_key.pub and adding the host names at the front.
448 ssh-keygen(1) also offers some basic automated editing for
449 ~/.ssh/known_hosts including removing hosts matching a host name and con-
450 verting all host names to their hashed representations.
412 451
413 An example ssh_known_hosts file: 452 An example ssh_known_hosts file:
414 453
@@ -418,6 +457,10 @@ SSH_KNOWN_HOSTS FILE FORMAT
418 # A hashed hostname 457 # A hashed hostname
419 |1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa 458 |1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa
420 AAAA1234.....= 459 AAAA1234.....=
460 # A revoked key
461 @revoked * ssh-rsa AAAAB5W...
462 # A CA key, accepted for any host in *.mydomain.com or *.mydomain.org
463 @cert-authority *.mydomain.org,*.mydomain.com ssh-rsa AAAAB5W...
421 464
422FILES 465FILES
423 ~/.hushlogin 466 ~/.hushlogin
@@ -571,4 +614,4 @@ CAVEATS
571 System security is not improved unless rshd, rlogind, and rexecd are dis- 614 System security is not improved unless rshd, rlogind, and rexecd are dis-
572 abled (thus completely disabling rlogin and rsh into the machine). 615 abled (thus completely disabling rlogin and rsh into the machine).
573 616
574OpenBSD 4.6 March 26, 2009 9 617OpenBSD 4.6 March 5, 2010 10
diff --git a/sshd.8 b/sshd.8
index 5b527b0f2..5df48a005 100644
--- a/sshd.8
+++ b/sshd.8
@@ -34,8 +34,8 @@
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.248 2009/03/26 08:38:39 sobrado Exp $ 37.\" $OpenBSD: sshd.8,v 1.255 2010/03/05 06:50:35 jmc Exp $
38.Dd $Mdocdate: March 26 2009 $ 38.Dd $Mdocdate: March 5 2010 $
39.Dt SSHD 8 39.Dt SSHD 8
40.Os 40.Os
41.Sh NAME 41.Sh NAME
@@ -47,6 +47,7 @@
47.Op Fl 46DdeiqTt 47.Op Fl 46DdeiqTt
48.Op Fl b Ar bits 48.Op Fl b Ar bits
49.Op Fl C Ar connection_spec 49.Op Fl C Ar connection_spec
50.Op Fl c Ar host_certificate_file
50.Op Fl f Ar config_file 51.Op Fl f Ar config_file
51.Op Fl g Ar login_grace_time 52.Op Fl g Ar login_grace_time
52.Op Fl h Ar host_key_file 53.Op Fl h Ar host_key_file
@@ -119,6 +120,15 @@ and
119All are required and may be supplied in any order, either with multiple 120All are required and may be supplied in any order, either with multiple
120.Fl C 121.Fl C
121options or as a comma-separated list. 122options or as a comma-separated list.
123.It Fl c Ar host_certificate_file
124Specifies a path to a certificate file to identify
125.Nm
126during key exchange.
127The certificate file must match a host key file specified using the
128.Fl h
129option or the
130.Cm HostKey
131configuration directive.
122.It Fl D 132.It Fl D
123When this option is specified, 133When this option is specified,
124.Nm 134.Nm
@@ -127,8 +137,8 @@ This allows easy monitoring of
127.Nm sshd . 137.Nm sshd .
128.It Fl d 138.It Fl d
129Debug mode. 139Debug mode.
130The server sends verbose debug output to the system 140The server sends verbose debug output to standard error,
131log, and does not put itself in the background. 141and does not put itself in the background.
132The server also will not fork and will only process one connection. 142The server also will not fork and will only process one connection.
133This option is only intended for debugging for the server. 143This option is only intended for debugging for the server.
134Multiple 144Multiple
@@ -263,7 +273,7 @@ or
263.El 273.El
264.Sh AUTHENTICATION 274.Sh AUTHENTICATION
265The OpenSSH SSH daemon supports SSH protocols 1 and 2. 275The OpenSSH SSH daemon supports SSH protocols 1 and 2.
266Both protocols are supported by default, 276The default is to use protocol 2 only,
267though this can be changed via the 277though this can be changed via the
268.Cm Protocol 278.Cm Protocol
269option in 279option in
@@ -501,6 +511,13 @@ No spaces are permitted, except within double quotes.
501The following option specifications are supported (note 511The following option specifications are supported (note
502that option keywords are case-insensitive): 512that option keywords are case-insensitive):
503.Bl -tag -width Ds 513.Bl -tag -width Ds
514.It Cm cert-authority
515Specifies that the listed key is a certification authority (CA) that is
516trusted to validate signed certificates for user authentication.
517.Pp
518Certificates may encode access restrictions similar to these key options.
519If both certificate restrictions and key options are present, the most
520restrictive union of the two is applied.
504.It Cm command="command" 521.It Cm command="command"
505Specifies that the command is executed whenever this key is used for 522Specifies that the command is executed whenever this key is used for
506authentication. 523authentication.
@@ -520,6 +537,10 @@ The command originally supplied by the client is available in the
520.Ev SSH_ORIGINAL_COMMAND 537.Ev SSH_ORIGINAL_COMMAND
521environment variable. 538environment variable.
522Note that this option applies to shell, command or subsystem execution. 539Note that this option applies to shell, command or subsystem execution.
540Also note that this command may be superseded by either a
541.Xr sshd_config 5
542.Cm ForceCommand
543directive or a command embedded in a certificate.
523.It Cm environment="NAME=value" 544.It Cm environment="NAME=value"
524Specifies that the string is to be added to the environment when 545Specifies that the string is to be added to the environment when
525logging in using this key. 546logging in using this key.
@@ -616,10 +637,19 @@ be prepared by the administrator (optional), and the per-user file is
616maintained automatically: whenever the user connects from an unknown host, 637maintained automatically: whenever the user connects from an unknown host,
617its key is added to the per-user file. 638its key is added to the per-user file.
618.Pp 639.Pp
619Each line in these files contains the following fields: hostnames, 640Each line in these files contains the following fields: markers (optional),
620bits, exponent, modulus, comment. 641hostnames, bits, exponent, modulus, comment.
621The fields are separated by spaces. 642The fields are separated by spaces.
622.Pp 643.Pp
644The marker is optional, but if it is present then it must be one of
645.Dq @cert-authority ,
646to indicate that the line contains a certification authority (CA) key,
647or
648.Dq @revoked ,
649to indicate that the key contained on the line is revoked and must not ever
650be accepted.
651Only one marker should be used on a key line.
652.Pp
623Hostnames is a comma-separated list of patterns 653Hostnames is a comma-separated list of patterns
624.Pf ( Ql * 654.Pf ( Ql *
625and 655and
@@ -659,8 +689,25 @@ Lines starting with
659and empty lines are ignored as comments. 689and empty lines are ignored as comments.
660.Pp 690.Pp
661When performing host authentication, authentication is accepted if any 691When performing host authentication, authentication is accepted if any
662matching line has the proper key. 692matching line has the proper key; either one that matches exactly or,
663It is thus permissible (but not 693if the server has presented a certificate for authentication, the key
694of the certification authority that signed the certificate.
695For a key to be trusted as a certification authority, it must use the
696.Dq @cert-authority
697marker described above.
698.Pp
699The known hosts file also provides a facility to mark keys as revoked,
700for example when it is known that the associated private key has been
701stolen.
702Revoked keys are specified by including the
703.Dq @revoked
704marker at the beginning of the key line, and are never accepted for
705authentication or as certification authorities, but instead will
706produce a warning from
707.Xr ssh 1
708when they are encountered.
709.Pp
710It is permissible (but not
664recommended) to have several lines or different host keys for the same 711recommended) to have several lines or different host keys for the same
665names. 712names.
666This will inevitably happen when short forms of host names 713This will inevitably happen when short forms of host names
@@ -671,10 +718,16 @@ accepted if valid information can be found from either file.
671.Pp 718.Pp
672Note that the lines in these files are typically hundreds of characters 719Note that the lines in these files are typically hundreds of characters
673long, and you definitely don't want to type in the host keys by hand. 720long, and you definitely don't want to type in the host keys by hand.
674Rather, generate them by a script 721Rather, generate them by a script,
722.Xr ssh-keyscan 1
675or by taking 723or by taking
676.Pa /etc/ssh/ssh_host_key.pub 724.Pa /etc/ssh/ssh_host_key.pub
677and adding the host names at the front. 725and adding the host names at the front.
726.Xr ssh-keygen 1
727also offers some basic automated editing for
728.Pa ~/.ssh/known_hosts
729including removing hosts matching a host name and converting all host
730names to their hashed representations.
678.Pp 731.Pp
679An example ssh_known_hosts file: 732An example ssh_known_hosts file:
680.Bd -literal -offset 3n 733.Bd -literal -offset 3n
@@ -684,6 +737,10 @@ cvs.example.net,192.0.2.10 ssh-rsa AAAA1234.....=
684# A hashed hostname 737# A hashed hostname
685|1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa 738|1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa
686AAAA1234.....= 739AAAA1234.....=
740# A revoked key
741@revoked * ssh-rsa AAAAB5W...
742# A CA key, accepted for any host in *.mydomain.com or *.mydomain.org
743@cert-authority *.mydomain.org,*.mydomain.com ssh-rsa AAAAB5W...
687.Ed 744.Ed
688.Sh FILES 745.Sh FILES
689.Bl -tag -width Ds -compact 746.Bl -tag -width Ds -compact
diff --git a/sshd.c b/sshd.c
index 248ad2976..df6c9d24e 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.367 2009/05/28 16:50:16 andreas Exp $ */ 1/* $OpenBSD: sshd.c,v 1.374 2010/03/07 11:57:13 dtucker 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
@@ -209,6 +209,7 @@ struct {
209 Key *server_key; /* ephemeral server key */ 209 Key *server_key; /* ephemeral server key */
210 Key *ssh1_host_key; /* ssh1 host key */ 210 Key *ssh1_host_key; /* ssh1 host key */
211 Key **host_keys; /* all private host keys */ 211 Key **host_keys; /* all private host keys */
212 Key **host_certificates; /* all public host certificates */
212 int have_ssh1_key; 213 int have_ssh1_key;
213 int have_ssh2_key; 214 int have_ssh2_key;
214 u_char ssh1_cookie[SSH_SESSION_KEY_LENGTH]; 215 u_char ssh1_cookie[SSH_SESSION_KEY_LENGTH];
@@ -254,11 +255,6 @@ Buffer loginmsg;
254/* Unprivileged user */ 255/* Unprivileged user */
255struct passwd *privsep_pw = NULL; 256struct passwd *privsep_pw = NULL;
256 257
257#ifdef OOM_ADJUST
258/* Linux out-of-memory killer adjustment */
259static char oom_adj_save[8];
260#endif
261
262/* Prototypes for various functions defined later in this file. */ 258/* Prototypes for various functions defined later in this file. */
263void destroy_sensitive_data(void); 259void destroy_sensitive_data(void);
264void demote_sensitive_data(void); 260void demote_sensitive_data(void);
@@ -555,6 +551,10 @@ destroy_sensitive_data(void)
555 key_free(sensitive_data.host_keys[i]); 551 key_free(sensitive_data.host_keys[i]);
556 sensitive_data.host_keys[i] = NULL; 552 sensitive_data.host_keys[i] = NULL;
557 } 553 }
554 if (sensitive_data.host_certificates[i]) {
555 key_free(sensitive_data.host_certificates[i]);
556 sensitive_data.host_certificates[i] = NULL;
557 }
558 } 558 }
559 sensitive_data.ssh1_host_key = NULL; 559 sensitive_data.ssh1_host_key = NULL;
560 memset(sensitive_data.ssh1_cookie, 0, SSH_SESSION_KEY_LENGTH); 560 memset(sensitive_data.ssh1_cookie, 0, SSH_SESSION_KEY_LENGTH);
@@ -581,6 +581,7 @@ demote_sensitive_data(void)
581 if (tmp->type == KEY_RSA1) 581 if (tmp->type == KEY_RSA1)
582 sensitive_data.ssh1_host_key = tmp; 582 sensitive_data.ssh1_host_key = tmp;
583 } 583 }
584 /* Certs do not need demotion */
584 } 585 }
585 586
586 /* We do not clear ssh1_host key and cookie. XXX - Okay Niels? */ 587 /* We do not clear ssh1_host key and cookie. XXX - Okay Niels? */
@@ -727,10 +728,11 @@ list_hostkey_types(void)
727 const char *p; 728 const char *p;
728 char *ret; 729 char *ret;
729 int i; 730 int i;
731 Key *key;
730 732
731 buffer_init(&b); 733 buffer_init(&b);
732 for (i = 0; i < options.num_host_key_files; i++) { 734 for (i = 0; i < options.num_host_key_files; i++) {
733 Key *key = sensitive_data.host_keys[i]; 735 key = sensitive_data.host_keys[i];
734 if (key == NULL) 736 if (key == NULL)
735 continue; 737 continue;
736 switch (key->type) { 738 switch (key->type) {
@@ -742,6 +744,19 @@ list_hostkey_types(void)
742 buffer_append(&b, p, strlen(p)); 744 buffer_append(&b, p, strlen(p));
743 break; 745 break;
744 } 746 }
747 /* If the private key has a cert peer, then list that too */
748 key = sensitive_data.host_certificates[i];
749 if (key == NULL)
750 continue;
751 switch (key->type) {
752 case KEY_RSA_CERT:
753 case KEY_DSA_CERT:
754 if (buffer_len(&b) > 0)
755 buffer_append(&b, ",", 1);
756 p = key_ssh_name(key);
757 buffer_append(&b, p, strlen(p));
758 break;
759 }
745 } 760 }
746 buffer_append(&b, "\0", 1); 761 buffer_append(&b, "\0", 1);
747 ret = xstrdup(buffer_ptr(&b)); 762 ret = xstrdup(buffer_ptr(&b));
@@ -750,20 +765,37 @@ list_hostkey_types(void)
750 return ret; 765 return ret;
751} 766}
752 767
753Key * 768static Key *
754get_hostkey_by_type(int type) 769get_hostkey_by_type(int type, int need_private)
755{ 770{
756 int i; 771 int i;
772 Key *key;
757 773
758 for (i = 0; i < options.num_host_key_files; i++) { 774 for (i = 0; i < options.num_host_key_files; i++) {
759 Key *key = sensitive_data.host_keys[i]; 775 if (type == KEY_RSA_CERT || type == KEY_DSA_CERT)
776 key = sensitive_data.host_certificates[i];
777 else
778 key = sensitive_data.host_keys[i];
760 if (key != NULL && key->type == type) 779 if (key != NULL && key->type == type)
761 return key; 780 return need_private ?
781 sensitive_data.host_keys[i] : key;
762 } 782 }
763 return NULL; 783 return NULL;
764} 784}
765 785
766Key * 786Key *
787get_hostkey_public_by_type(int type)
788{
789 return get_hostkey_by_type(type, 0);
790}
791
792Key *
793get_hostkey_private_by_type(int type)
794{
795 return get_hostkey_by_type(type, 1);
796}
797
798Key *
767get_hostkey_by_index(int ind) 799get_hostkey_by_index(int ind)
768{ 800{
769 if (ind < 0 || ind >= options.num_host_key_files) 801 if (ind < 0 || ind >= options.num_host_key_files)
@@ -777,8 +809,13 @@ get_hostkey_index(Key *key)
777 int i; 809 int i;
778 810
779 for (i = 0; i < options.num_host_key_files; i++) { 811 for (i = 0; i < options.num_host_key_files; i++) {
780 if (key == sensitive_data.host_keys[i]) 812 if (key_is_cert(key)) {
781 return (i); 813 if (key == sensitive_data.host_certificates[i])
814 return (i);
815 } else {
816 if (key == sensitive_data.host_keys[i])
817 return (i);
818 }
782 } 819 }
783 return (-1); 820 return (-1);
784} 821}
@@ -817,9 +854,9 @@ usage(void)
817 fprintf(stderr, "%s, %s\n", 854 fprintf(stderr, "%s, %s\n",
818 SSH_RELEASE, SSLeay_version(SSLEAY_VERSION)); 855 SSH_RELEASE, SSLeay_version(SSLEAY_VERSION));
819 fprintf(stderr, 856 fprintf(stderr,
820"usage: sshd [-46DdeiqTt] [-b bits] [-C connection_spec] [-f config_file]\n" 857"usage: sshd [-46DdeiqTt] [-b bits] [-C connection_spec] [-c host_cert_file]\n"
821" [-g login_grace_time] [-h host_key_file] [-k key_gen_time]\n" 858" [-f config_file] [-g login_grace_time] [-h host_key_file]\n"
822" [-o option] [-p port] [-u len]\n" 859" [-k key_gen_time] [-o option] [-p port] [-u len]\n"
823 ); 860 );
824 exit(1); 861 exit(1);
825} 862}
@@ -915,31 +952,6 @@ recv_rexec_state(int fd, Buffer *conf)
915 debug3("%s: done", __func__); 952 debug3("%s: done", __func__);
916} 953}
917 954
918#ifdef OOM_ADJUST
919/*
920 * If requested in the environment, tell the Linux kernel's out-of-memory
921 * killer to avoid sshd. The old state will be restored when forking child
922 * processes.
923 */
924static void
925oom_adjust_startup(void)
926{
927 const char *oom_adj = getenv("SSHD_OOM_ADJUST");
928
929 if (!oom_adj || !*oom_adj)
930 return;
931 oom_adj_get(oom_adj_save, sizeof(oom_adj_save));
932 oom_adj_set(oom_adj);
933}
934
935static void
936oom_restore(void)
937{
938 if (oom_adj_save[0])
939 oom_adj_set(oom_adj_save);
940}
941#endif
942
943/* Accept a connection from inetd */ 955/* Accept a connection from inetd */
944static void 956static void
945server_accept_inetd(int *sock_in, int *sock_out) 957server_accept_inetd(int *sock_in, int *sock_out)
@@ -1015,15 +1027,9 @@ server_listen(void)
1015 &on, sizeof(on)) == -1) 1027 &on, sizeof(on)) == -1)
1016 error("setsockopt SO_REUSEADDR: %s", strerror(errno)); 1028 error("setsockopt SO_REUSEADDR: %s", strerror(errno));
1017 1029
1018#ifdef IPV6_V6ONLY
1019 /* Only communicate in IPv6 over AF_INET6 sockets. */ 1030 /* Only communicate in IPv6 over AF_INET6 sockets. */
1020 if (ai->ai_family == AF_INET6) { 1031 if (ai->ai_family == AF_INET6)
1021 if (setsockopt(listen_sock, IPPROTO_IPV6, IPV6_V6ONLY, 1032 sock_set_v6only(listen_sock);
1022 &on, sizeof(on)) == -1)
1023 error("setsockopt IPV6_V6ONLY: %s",
1024 strerror(errno));
1025 }
1026#endif
1027 1033
1028 debug("Bind to port %s on %s.", strport, ntop); 1034 debug("Bind to port %s on %s.", strport, ntop);
1029 1035
@@ -1277,7 +1283,7 @@ main(int ac, char **av)
1277{ 1283{
1278 extern char *optarg; 1284 extern char *optarg;
1279 extern int optind; 1285 extern int optind;
1280 int opt, i, on = 1; 1286 int opt, i, j, on = 1;
1281 int sock_in = -1, sock_out = -1, newsock = -1; 1287 int sock_in = -1, sock_out = -1, newsock = -1;
1282 const char *remote_ip; 1288 const char *remote_ip;
1283 char *test_user = NULL, *test_host = NULL, *test_addr = NULL; 1289 char *test_user = NULL, *test_host = NULL, *test_addr = NULL;
@@ -1330,6 +1336,14 @@ main(int ac, char **av)
1330 case 'f': 1336 case 'f':
1331 config_file_name = optarg; 1337 config_file_name = optarg;
1332 break; 1338 break;
1339 case 'c':
1340 if (options.num_host_cert_files >= MAX_HOSTCERTS) {
1341 fprintf(stderr, "too many host certificates.\n");
1342 exit(1);
1343 }
1344 options.host_cert_files[options.num_host_cert_files++] =
1345 derelativise_path(optarg);
1346 break;
1333 case 'd': 1347 case 'd':
1334 if (debug_flag == 0) { 1348 if (debug_flag == 0) {
1335 debug_flag = 1; 1349 debug_flag = 1;
@@ -1397,7 +1411,8 @@ main(int ac, char **av)
1397 fprintf(stderr, "too many host keys.\n"); 1411 fprintf(stderr, "too many host keys.\n");
1398 exit(1); 1412 exit(1);
1399 } 1413 }
1400 options.host_key_files[options.num_host_key_files++] = optarg; 1414 options.host_key_files[options.num_host_key_files++] =
1415 derelativise_path(optarg);
1401 break; 1416 break;
1402 case 't': 1417 case 't':
1403 test_flag = 1; 1418 test_flag = 1;
@@ -1555,7 +1570,7 @@ main(int ac, char **av)
1555 sensitive_data.host_keys[i] = NULL; 1570 sensitive_data.host_keys[i] = NULL;
1556 continue; 1571 continue;
1557 } 1572 }
1558 if (reject_blacklisted_key(key, 1) == 1) { 1573 if (auth_key_is_revoked(key, 1)) {
1559 key_free(key); 1574 key_free(key);
1560 sensitive_data.host_keys[i] = NULL; 1575 sensitive_data.host_keys[i] = NULL;
1561 continue; 1576 continue;
@@ -1589,6 +1604,46 @@ main(int ac, char **av)
1589 exit(1); 1604 exit(1);
1590 } 1605 }
1591 1606
1607 /*
1608 * Load certificates. They are stored in an array at identical
1609 * indices to the public keys that they relate to.
1610 */
1611 sensitive_data.host_certificates = xcalloc(options.num_host_key_files,
1612 sizeof(Key *));
1613 for (i = 0; i < options.num_host_key_files; i++)
1614 sensitive_data.host_certificates[i] = NULL;
1615
1616 for (i = 0; i < options.num_host_cert_files; i++) {
1617 key = key_load_public(options.host_cert_files[i], NULL);
1618 if (key == NULL) {
1619 error("Could not load host certificate: %s",
1620 options.host_cert_files[i]);
1621 continue;
1622 }
1623 if (!key_is_cert(key)) {
1624 error("Certificate file is not a certificate: %s",
1625 options.host_cert_files[i]);
1626 key_free(key);
1627 continue;
1628 }
1629 /* Find matching private key */
1630 for (j = 0; j < options.num_host_key_files; j++) {
1631 if (key_equal_public(key,
1632 sensitive_data.host_keys[j])) {
1633 sensitive_data.host_certificates[j] = key;
1634 break;
1635 }
1636 }
1637 if (j >= options.num_host_key_files) {
1638 error("No matching private key for certificate: %s",
1639 options.host_cert_files[i]);
1640 key_free(key);
1641 continue;
1642 }
1643 sensitive_data.host_certificates[j] = key;
1644 debug("host certificate: #%d type %d %s", j, key->type,
1645 key_type(key));
1646 }
1592 /* Check certain values for sanity. */ 1647 /* Check certain values for sanity. */
1593 if (options.protocol & SSH_PROTO_1) { 1648 if (options.protocol & SSH_PROTO_1) {
1594 if (options.server_key_bits < 512 || 1649 if (options.server_key_bits < 512 ||
@@ -1707,15 +1762,11 @@ main(int ac, char **av)
1707 /* ignore SIGPIPE */ 1762 /* ignore SIGPIPE */
1708 signal(SIGPIPE, SIG_IGN); 1763 signal(SIGPIPE, SIG_IGN);
1709 1764
1710#ifdef OOM_ADJUST
1711 /* Adjust out-of-memory killer */
1712 oom_adjust_startup();
1713#endif
1714
1715 /* Get a connection, either from inetd or a listening TCP socket */ 1765 /* Get a connection, either from inetd or a listening TCP socket */
1716 if (inetd_flag) { 1766 if (inetd_flag) {
1717 server_accept_inetd(&sock_in, &sock_out); 1767 server_accept_inetd(&sock_in, &sock_out);
1718 } else { 1768 } else {
1769 platform_pre_listen();
1719 server_listen(); 1770 server_listen();
1720 1771
1721 if (options.protocol & SSH_PROTO_1) 1772 if (options.protocol & SSH_PROTO_1)
@@ -1750,10 +1801,6 @@ main(int ac, char **av)
1750 /* This is the child processing a new connection. */ 1801 /* This is the child processing a new connection. */
1751 setproctitle("%s", "[accepted]"); 1802 setproctitle("%s", "[accepted]");
1752 1803
1753#ifdef OOM_ADJUST
1754 oom_restore();
1755#endif
1756
1757 /* 1804 /*
1758 * Create a new session and process group since the 4.4BSD 1805 * Create a new session and process group since the 4.4BSD
1759 * setlogin() affects the entire process group. We don't 1806 * setlogin() affects the entire process group. We don't
@@ -1809,6 +1856,10 @@ main(int ac, char **av)
1809 sock_in, sock_out, newsock, startup_pipe, config_s[0]); 1856 sock_in, sock_out, newsock, startup_pipe, config_s[0]);
1810 } 1857 }
1811 1858
1859 /* Executed child processes don't need these. */
1860 fcntl(sock_out, F_SETFD, FD_CLOEXEC);
1861 fcntl(sock_in, F_SETFD, FD_CLOEXEC);
1862
1812 /* 1863 /*
1813 * Disable the key regeneration alarm. We will not regenerate the 1864 * Disable the key regeneration alarm. We will not regenerate the
1814 * key since we are no longer in a position to give it to anyone. We 1865 * key since we are no longer in a position to give it to anyone. We
@@ -1960,6 +2011,7 @@ main(int ac, char **av)
1960 2011
1961 /* prepare buffer to collect messages to display to user after login */ 2012 /* prepare buffer to collect messages to display to user after login */
1962 buffer_init(&loginmsg); 2013 buffer_init(&loginmsg);
2014 auth_debug_reset();
1963 2015
1964 if (use_privsep) 2016 if (use_privsep)
1965 if (privsep_preauth(authctxt) == 1) 2017 if (privsep_preauth(authctxt) == 1)
@@ -2365,7 +2417,8 @@ do_ssh2_kex(void)
2365 kex->server = 1; 2417 kex->server = 1;
2366 kex->client_version_string=client_version_string; 2418 kex->client_version_string=client_version_string;
2367 kex->server_version_string=server_version_string; 2419 kex->server_version_string=server_version_string;
2368 kex->load_host_key=&get_hostkey_by_type; 2420 kex->load_host_public_key=&get_hostkey_public_by_type;
2421 kex->load_host_private_key=&get_hostkey_private_by_type;
2369 kex->host_key_index=&get_hostkey_index; 2422 kex->host_key_index=&get_hostkey_index;
2370 2423
2371 xxx_kex = kex; 2424 xxx_kex = kex;
diff --git a/sshd_config b/sshd_config
index 2cb14e2e3..56965d93b 100644
--- a/sshd_config
+++ b/sshd_config
@@ -1,4 +1,4 @@
1# $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $ 1# $OpenBSD: sshd_config,v 1.81 2009/10/08 14:03:41 markus Exp $
2 2
3# This is the sshd server system-wide configuration file. See 3# This is the sshd server system-wide configuration file. See
4# sshd_config(5) for more information. 4# sshd_config(5) for more information.
@@ -15,10 +15,8 @@
15#ListenAddress 0.0.0.0 15#ListenAddress 0.0.0.0
16#ListenAddress :: 16#ListenAddress ::
17 17
18# Disable legacy (protocol version 1) support in the server for new 18# The default requires explicit activation of protocol 1
19# installations. In future the default will change to require explicit 19#Protocol 2
20# activation of protocol 1
21Protocol 2
22 20
23# HostKey for protocol version 1 21# HostKey for protocol version 1
24#HostKey /etc/ssh/ssh_host_key 22#HostKey /etc/ssh/ssh_host_key
diff --git a/sshd_config.0 b/sshd_config.0
index 9e73c5906..a9162f18d 100644
--- a/sshd_config.0
+++ b/sshd_config.0
@@ -93,14 +93,14 @@ DESCRIPTION
93 login.conf(5)) The default is ``yes''. 93 login.conf(5)) The default is ``yes''.
94 94
95 ChrootDirectory 95 ChrootDirectory
96 Specifies a path to chroot(2) to after authentication. This 96 Specifies the pathname of a directory to chroot(2) to after au-
97 path, and all its components, must be root-owned directories that 97 thentication. All components of the pathname must be root-owned
98 are not writable by any other user or group. After the chroot, 98 directories that are not writable by any other user or group.
99 sshd(8) changes the working directory to the user's home directo- 99 After the chroot, sshd(8) changes the working directory to the
100 ry. 100 user's home directory.
101 101
102 The path may contain the following tokens that are expanded at 102 The pathname may contain the following tokens that are expanded
103 runtime once the connecting user has been authenticated: %% is 103 at runtime once the connecting user has been authenticated: %% is
104 replaced by a literal '%', %h is replaced by the home directory 104 replaced by a literal '%', %h is replaced by the home directory
105 of the user being authenticated, and %u is replaced by the user- 105 of the user being authenticated, and %u is replaced by the user-
106 name of that user. 106 name of that user.
@@ -235,6 +235,12 @@ DESCRIPTION
235 resolve the name from the TCP connection itself. The default is 235 resolve the name from the TCP connection itself. The default is
236 ``no''. 236 ``no''.
237 237
238 HostCertificate
239 Specifies a file containing a public host certificate. The cer-
240 tificate's public key must match a private host key already spec-
241 ified by HostKey. The default behaviour of sshd(8) is not to
242 load any certificates.
243
238 HostKey 244 HostKey
239 Specifies a file containing a private host key used by SSH. The 245 Specifies a file containing a private host key used by SSH. The
240 default is /etc/ssh/ssh_host_key for protocol version 1, and 246 default is /etc/ssh/ssh_host_key for protocol version 1, and
@@ -346,8 +352,8 @@ DESCRIPTION
346 KbdInteractiveAuthentication, KerberosAuthentication, 352 KbdInteractiveAuthentication, KerberosAuthentication,
347 MaxAuthTries, MaxSessions, PasswordAuthentication, 353 MaxAuthTries, MaxSessions, PasswordAuthentication,
348 PermitEmptyPasswords, PermitOpen, PermitRootLogin, 354 PermitEmptyPasswords, PermitOpen, PermitRootLogin,
349 RhostsRSAAuthentication, RSAAuthentication, X11DisplayOffset, 355 PubkeyAuthentication, RhostsRSAAuthentication, RSAAuthentication,
350 X11Forwarding and X11UseLocalHost. 356 X11DisplayOffset, X11Forwarding and X11UseLocalHost.
351 357
352 MaxAuthTries 358 MaxAuthTries
353 Specifies the maximum number of authentication attempts permitted 359 Specifies the maximum number of authentication attempts permitted
@@ -445,7 +451,7 @@ DESCRIPTION
445 Protocol 451 Protocol
446 Specifies the protocol versions sshd(8) supports. The possible 452 Specifies the protocol versions sshd(8) supports. The possible
447 values are `1' and `2'. Multiple versions must be comma-separat- 453 values are `1' and `2'. Multiple versions must be comma-separat-
448 ed. The default is ``2,1''. Note that the order of the protocol 454 ed. The default is `2'. Note that the order of the protocol
449 list does not indicate preference, because the client selects 455 list does not indicate preference, because the client selects
450 among multiple protocol versions offered by the server. Specify- 456 among multiple protocol versions offered by the server. Specify-
451 ing ``2,1'' is identical to ``1,2''. 457 ing ``2,1'' is identical to ``1,2''.
@@ -455,6 +461,12 @@ DESCRIPTION
455 fault is ``yes''. Note that this option applies to protocol ver- 461 fault is ``yes''. Note that this option applies to protocol ver-
456 sion 2 only. 462 sion 2 only.
457 463
464 RevokedKeys
465 Specifies a list of revoked public keys. Keys listed in this
466 file will be refused for public key authentication. Note that if
467 this file is not readable, then public key authentication will be
468 refused for all users.
469
458 RhostsRSAAuthentication 470 RhostsRSAAuthentication
459 Specifies whether rhosts or /etc/hosts.equiv authentication to- 471 Specifies whether rhosts or /etc/hosts.equiv authentication to-
460 gether with successful RSA host authentication is allowed. The 472 gether with successful RSA host authentication is allowed. The
@@ -475,7 +487,8 @@ DESCRIPTION
475 of the user's files and home directory before accepting login. 487 of the user's files and home directory before accepting login.
476 This is normally desirable because novices sometimes accidentally 488 This is normally desirable because novices sometimes accidentally
477 leave their directory or files world-writable. The default is 489 leave their directory or files world-writable. The default is
478 ``yes''. 490 ``yes''. Note that this does not apply to ChrootDirectory, whose
491 permissions and ownership are checked unconditionally.
479 492
480 Subsystem 493 Subsystem
481 Configures an external subsystem (e.g. file transfer daemon). 494 Configures an external subsystem (e.g. file transfer daemon).
@@ -515,6 +528,18 @@ DESCRIPTION
515 To disable TCP keepalive messages, the value should be set to 528 To disable TCP keepalive messages, the value should be set to
516 ``no''. 529 ``no''.
517 530
531 TrustedUserCAKeys
532 Specifies a file containing public keys of certificate authori-
533 ties that are trusted to sign user certificates for authentica-
534 tion. Keys are listed one per line; empty lines and comments
535 starting with `#' are allowed. If a certificate is presented for
536 authentication and has its signing CA key listed in this file,
537 then it may be used for authentication for any user listed in the
538 certificate's principals list. Note that certificates that lack
539 a list of principals will not be permitted for authentication us-
540 ing TrustedUserCAKeys. For more details on certificates, see the
541 CERTIFICATES section in ssh-keygen(1).
542
518 UseDNS Specifies whether sshd(8) should look up the remote host name and 543 UseDNS Specifies whether sshd(8) should look up the remote host name and
519 check that the resolved host name for the remote IP address maps 544 check that the resolved host name for the remote IP address maps
520 back to the very same IP address. The default is ``yes''. 545 back to the very same IP address. The default is ``yes''.
@@ -631,4 +656,4 @@ AUTHORS
631 versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support 656 versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support
632 for privilege separation. 657 for privilege separation.
633 658
634OpenBSD 4.6 April 21, 2009 10 659OpenBSD 4.6 March 4, 2010 10
diff --git a/sshd_config.5 b/sshd_config.5
index 522ac103f..39ef781ff 100644
--- a/sshd_config.5
+++ b/sshd_config.5
@@ -34,8 +34,8 @@
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.106 2009/04/21 15:13:17 stevesk Exp $ 37.\" $OpenBSD: sshd_config.5,v 1.120 2010/03/04 23:17:25 djm Exp $
38.Dd $Mdocdate: April 21 2009 $ 38.Dd $Mdocdate: March 4 2010 $
39.Dt SSHD_CONFIG 5 39.Dt SSHD_CONFIG 5
40.Os 40.Os
41.Sh NAME 41.Sh NAME
@@ -208,16 +208,16 @@ PAM).
208The default is 208The default is
209.Dq yes . 209.Dq yes .
210.It Cm ChrootDirectory 210.It Cm ChrootDirectory
211Specifies a path to 211Specifies the pathname of a directory to
212.Xr chroot 2 212.Xr chroot 2
213to after authentication. 213to after authentication.
214This path, and all its components, must be root-owned directories that are 214All components of the pathname must be root-owned directories that are
215not writable by any other user or group. 215not writable by any other user or group.
216After the chroot, 216After the chroot,
217.Xr sshd 8 217.Xr sshd 8
218changes the working directory to the user's home directory. 218changes the working directory to the user's home directory.
219.Pp 219.Pp
220The path may contain the following tokens that are expanded at runtime once 220The pathname may contain the following tokens that are expanded at runtime once
221the connecting user has been authenticated: %% is replaced by a literal '%', 221the connecting user has been authenticated: %% is replaced by a literal '%',
222%h is replaced by the home directory of the user being authenticated, and 222%h is replaced by the home directory of the user being authenticated, and
223%u is replaced by the username of that user. 223%u is replaced by the username of that user.
@@ -470,6 +470,14 @@ uses the name supplied by the client rather than
470attempting to resolve the name from the TCP connection itself. 470attempting to resolve the name from the TCP connection itself.
471The default is 471The default is
472.Dq no . 472.Dq no .
473.It Cm HostCertificate
474Specifies a file containing a public host certificate.
475The certificate's public key must match a private host key already specified
476by
477.Cm HostKey .
478The default behaviour of
479.Xr sshd 8
480is not to load any certificates.
473.It Cm HostKey 481.It Cm HostKey
474Specifies a file containing a private host key 482Specifies a file containing a private host key
475used by SSH. 483used by SSH.
@@ -673,6 +681,7 @@ Available keywords are
673.Cm PermitEmptyPasswords , 681.Cm PermitEmptyPasswords ,
674.Cm PermitOpen , 682.Cm PermitOpen ,
675.Cm PermitRootLogin , 683.Cm PermitRootLogin ,
684.Cm PubkeyAuthentication ,
676.Cm RhostsRSAAuthentication , 685.Cm RhostsRSAAuthentication ,
677.Cm RSAAuthentication , 686.Cm RSAAuthentication ,
678.Cm X11DisplayOffset , 687.Cm X11DisplayOffset ,
@@ -865,7 +874,7 @@ and
865.Sq 2 . 874.Sq 2 .
866Multiple versions must be comma-separated. 875Multiple versions must be comma-separated.
867The default is 876The default is
868.Dq 2,1 . 877.Sq 2 .
869Note that the order of the protocol list does not indicate preference, 878Note that the order of the protocol list does not indicate preference,
870because the client selects among multiple protocol versions offered 879because the client selects among multiple protocol versions offered
871by the server. 880by the server.
@@ -878,6 +887,11 @@ Specifies whether public key authentication is allowed.
878The default is 887The default is
879.Dq yes . 888.Dq yes .
880Note that this option applies to protocol version 2 only. 889Note that this option applies to protocol version 2 only.
890.It Cm RevokedKeys
891Specifies a list of revoked public keys.
892Keys listed in this file will be refused for public key authentication.
893Note that if this file is not readable, then public key authentication will
894be refused for all users.
881.It Cm RhostsRSAAuthentication 895.It Cm RhostsRSAAuthentication
882Specifies whether rhosts or /etc/hosts.equiv authentication together 896Specifies whether rhosts or /etc/hosts.equiv authentication together
883with successful RSA host authentication is allowed. 897with successful RSA host authentication is allowed.
@@ -901,6 +915,9 @@ This is normally desirable because novices sometimes accidentally leave their
901directory or files world-writable. 915directory or files world-writable.
902The default is 916The default is
903.Dq yes . 917.Dq yes .
918Note that this does not apply to
919.Cm ChrootDirectory ,
920whose permissions and ownership are checked unconditionally.
904.It Cm Subsystem 921.It Cm Subsystem
905Configures an external subsystem (e.g. file transfer daemon). 922Configures an external subsystem (e.g. file transfer daemon).
906Arguments should be a subsystem name and a command (with optional arguments) 923Arguments should be a subsystem name and a command (with optional arguments)
@@ -953,6 +970,22 @@ To disable TCP keepalive messages, the value should be set to
953.Pp 970.Pp
954This option was formerly called 971This option was formerly called
955.Cm KeepAlive . 972.Cm KeepAlive .
973.It Cm TrustedUserCAKeys
974Specifies a file containing public keys of certificate authorities that are
975trusted to sign user certificates for authentication.
976Keys are listed one per line; empty lines and comments starting with
977.Ql #
978are allowed.
979If a certificate is presented for authentication and has its signing CA key
980listed in this file, then it may be used for authentication for any user
981listed in the certificate's principals list.
982Note that certificates that lack a list of principals will not be permitted
983for authentication using
984.Cm TrustedUserCAKeys .
985For more details on certificates, see the
986.Sx CERTIFICATES
987section in
988.Xr ssh-keygen 1 .
956.It Cm UseDNS 989.It Cm UseDNS
957Specifies whether 990Specifies whether
958.Xr sshd 8 991.Xr sshd 8
diff --git a/sshpty.h b/sshpty.h
index ac9003584..cfa322480 100644
--- a/sshpty.h
+++ b/sshpty.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshpty.h,v 1.11 2008/05/19 15:45:07 djm Exp $ */ 1/* $OpenBSD: sshpty.h,v 1.12 2010/01/09 05:04:24 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -17,8 +17,8 @@
17#include <termios.h> 17#include <termios.h>
18 18
19struct termios *get_saved_tio(void); 19struct termios *get_saved_tio(void);
20void leave_raw_mode(void); 20void leave_raw_mode(int);
21void enter_raw_mode(void); 21void enter_raw_mode(int);
22 22
23int pty_allocate(int *, int *, char *, size_t); 23int pty_allocate(int *, int *, char *, size_t);
24void pty_release(const char *); 24void pty_release(const char *);
diff --git a/sshtty.c b/sshtty.c
index 21ade4e51..d214ce3bb 100644
--- a/sshtty.c
+++ b/sshtty.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshtty.c,v 1.13 2008/05/19 15:45:07 djm Exp $ */ 1/* $OpenBSD: sshtty.c,v 1.14 2010/01/09 05:04:24 djm 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
@@ -54,23 +54,25 @@ get_saved_tio(void)
54} 54}
55 55
56void 56void
57leave_raw_mode(void) 57leave_raw_mode(int quiet)
58{ 58{
59 if (!_in_raw_mode) 59 if (!_in_raw_mode)
60 return; 60 return;
61 if (tcsetattr(fileno(stdin), TCSADRAIN, &_saved_tio) == -1) 61 if (tcsetattr(fileno(stdin), TCSADRAIN, &_saved_tio) == -1) {
62 perror("tcsetattr"); 62 if (!quiet)
63 else 63 perror("tcsetattr");
64 } else
64 _in_raw_mode = 0; 65 _in_raw_mode = 0;
65} 66}
66 67
67void 68void
68enter_raw_mode(void) 69enter_raw_mode(int quiet)
69{ 70{
70 struct termios tio; 71 struct termios tio;
71 72
72 if (tcgetattr(fileno(stdin), &tio) == -1) { 73 if (tcgetattr(fileno(stdin), &tio) == -1) {
73 perror("tcgetattr"); 74 if (!quiet)
75 perror("tcgetattr");
74 return; 76 return;
75 } 77 }
76 _saved_tio = tio; 78 _saved_tio = tio;
@@ -86,8 +88,9 @@ enter_raw_mode(void)
86 tio.c_oflag &= ~OPOST; 88 tio.c_oflag &= ~OPOST;
87 tio.c_cc[VMIN] = 1; 89 tio.c_cc[VMIN] = 1;
88 tio.c_cc[VTIME] = 0; 90 tio.c_cc[VTIME] = 0;
89 if (tcsetattr(fileno(stdin), TCSADRAIN, &tio) == -1) 91 if (tcsetattr(fileno(stdin), TCSADRAIN, &tio) == -1) {
90 perror("tcsetattr"); 92 if (!quiet)
91 else 93 perror("tcsetattr");
94 } else
92 _in_raw_mode = 1; 95 _in_raw_mode = 1;
93} 96}
diff --git a/version.h b/version.h
index 7fdd00221..bda322e7f 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
1/* $OpenBSD: version.h,v 1.56 2009/06/30 14:54:40 markus Exp $ */ 1/* $OpenBSD: version.h,v 1.57 2010/03/07 22:01:32 djm Exp $ */
2 2
3#define SSH_VERSION "OpenSSH_5.3" 3#define SSH_VERSION "OpenSSH_5.4"
4 4
5#define SSH_PORTABLE "p1" 5#define SSH_PORTABLE "p1"
6#define SSH_RELEASE_MINIMUM SSH_VERSION SSH_PORTABLE 6#define SSH_RELEASE_MINIMUM SSH_VERSION SSH_PORTABLE