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.c5
-rw-r--r--auth-rhosts.c10
-rw-r--r--auth-rsa.c5
-rw-r--r--auth.c98
-rw-r--r--auth.h6
-rw-r--r--auth2-hostbased.c5
-rw-r--r--auth2-pubkey.c88
-rw-r--r--authfd.c30
-rw-r--r--authfd.h3
-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.guess238
-rw-r--r--config.h.in50
-rwxr-xr-xconfig.sub81
-rwxr-xr-xconfigure11723
-rw-r--r--configure.ac92
-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--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.c98
-rw-r--r--openbsd-compat/port-linux.h8
-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.c54
-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.c65
-rw-r--r--sshd.093
-rw-r--r--sshd.877
-rw-r--r--sshd.c137
-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
168 files changed, 17191 insertions, 10102 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 f122f4b39..e840d958d 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
29PRIVSEP_PATH=@PRIVSEP_PATH@ 30PRIVSEP_PATH=@PRIVSEP_PATH@
30SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@ 31SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@
@@ -35,6 +36,7 @@ PATHS= -DSSHDIR=\"$(sysconfdir)\" \
35 -D_PATH_SSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\" \ 36 -D_PATH_SSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\" \
36 -D_PATH_SFTP_SERVER=\"$(SFTP_SERVER)\" \ 37 -D_PATH_SFTP_SERVER=\"$(SFTP_SERVER)\" \
37 -D_PATH_SSH_KEY_SIGN=\"$(SSH_KEYSIGN)\" \ 38 -D_PATH_SSH_KEY_SIGN=\"$(SSH_KEYSIGN)\" \
39 -D_PATH_SSH_PKCS11_HELPER=\"$(SSH_PKCS11_HELPER)\" \
38 -D_PATH_SSH_PIDDIR=\"$(piddir)\" \ 40 -D_PATH_SSH_PIDDIR=\"$(piddir)\" \
39 -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\" \ 41 -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\" \
40 -DSSH_RAND_HELPER=\"$(RAND_HELPER)\" 42 -DSSH_RAND_HELPER=\"$(RAND_HELPER)\"
@@ -60,7 +62,7 @@ EXEEXT=@EXEEXT@
60INSTALL_SSH_PRNG_CMDS=@INSTALL_SSH_PRNG_CMDS@ 62INSTALL_SSH_PRNG_CMDS=@INSTALL_SSH_PRNG_CMDS@
61INSTALL_SSH_RAND_HELPER=@INSTALL_SSH_RAND_HELPER@ 63INSTALL_SSH_RAND_HELPER=@INSTALL_SSH_RAND_HELPER@
62 64
63TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-agent$(EXEEXT) scp$(EXEEXT) ssh-rand-helper${EXEEXT} sftp-server$(EXEEXT) sftp$(EXEEXT) 65TARGETS=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)
64 66
65LIBSSH_OBJS=acss.o authfd.o authfile.o bufaux.o bufbn.o buffer.o \ 67LIBSSH_OBJS=acss.o authfd.o authfile.o bufaux.o bufbn.o buffer.o \
66 canohost.o channels.o cipher.o cipher-acss.o cipher-aes.o \ 68 canohost.o channels.o cipher.o cipher-acss.o cipher-aes.o \
@@ -70,13 +72,13 @@ LIBSSH_OBJS=acss.o authfd.o authfile.o bufaux.o bufbn.o buffer.o \
70 readpass.o rsa.o ttymodes.o xmalloc.o addrmatch.o \ 72 readpass.o rsa.o ttymodes.o xmalloc.o addrmatch.o \
71 atomicio.o key.o dispatch.o kex.o mac.o uidswap.o uuencode.o misc.o \ 73 atomicio.o key.o dispatch.o kex.o mac.o uidswap.o uuencode.o misc.o \
72 monitor_fdpass.o rijndael.o ssh-dss.o ssh-rsa.o dh.o kexdh.o \ 74 monitor_fdpass.o rijndael.o ssh-dss.o ssh-rsa.o dh.o kexdh.o \
73 kexgex.o kexdhc.o kexgexc.o scard.o msg.o progressmeter.o dns.o \ 75 kexgex.o kexdhc.o kexgexc.o msg.o progressmeter.o dns.o \
74 entropy.o scard-opensc.o gss-genr.o umac.o jpake.o schnorr.o \ 76 entropy.o gss-genr.o umac.o jpake.o schnorr.o \
75 kexgssc.o 77 ssh-pkcs11.o kexgssc.o
76 78
77SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \ 79SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \
78 sshconnect.o sshconnect1.o sshconnect2.o mux.o \ 80 sshconnect.o sshconnect1.o sshconnect2.o mux.o \
79 roaming_common.o 81 roaming_common.o roaming_client.o
80 82
81SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \ 83SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \
82 sshpty.o sshlogin.o servconf.o serverloop.o \ 84 sshpty.o sshlogin.o servconf.o serverloop.o \
@@ -89,10 +91,10 @@ SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \
89 auth2-gss.o gss-serv.o gss-serv-krb5.o kexgsss.o\ 91 auth2-gss.o gss-serv.o gss-serv-krb5.o kexgsss.o\
90 loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \ 92 loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \
91 audit.o audit-bsm.o platform.o sftp-server.o sftp-common.o \ 93 audit.o audit-bsm.o platform.o sftp-server.o sftp-common.o \
92 roaming_common.o 94 roaming_common.o roaming_serv.o
93 95
94MANPAGES = 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 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-pkcs11-helper.8.out sshd_config.5.out ssh_config.5.out
95MANPAGES_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 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-pkcs11-helper.8 sshd_config.5 ssh_config.5
96MANTYPE = @MANTYPE@ 98MANTYPE = @MANTYPE@
97 99
98CONFIGFILES=sshd_config.out ssh_config.out moduli.out 100CONFIGFILES=sshd_config.out ssh_config.out moduli.out
@@ -148,15 +150,18 @@ scp$(EXEEXT): $(LIBCOMPAT) libssh.a scp.o progressmeter.o
148ssh-add$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-add.o 150ssh-add$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-add.o
149 $(LD) -o $@ ssh-add.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) 151 $(LD) -o $@ ssh-add.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
150 152
151ssh-agent$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-agent.o 153ssh-agent$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-agent.o ssh-pkcs11-client.o
152 $(LD) -o $@ ssh-agent.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) 154 $(LD) -o $@ ssh-agent.o ssh-pkcs11-client.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
153 155
154ssh-keygen$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keygen.o 156ssh-keygen$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keygen.o
155 $(LD) -o $@ ssh-keygen.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) 157 $(LD) -o $@ ssh-keygen.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
156 158
157ssh-keysign$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keysign.o roaming_dummy.o 159ssh-keysign$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keysign.o roaming_dummy.o readconf.o
158 $(LD) -o $@ ssh-keysign.o readconf.o roaming_dummy.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) 160 $(LD) -o $@ ssh-keysign.o readconf.o roaming_dummy.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
159 161
162ssh-pkcs11-helper$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-pkcs11-helper.o ssh-pkcs11.o
163 $(LD) -o $@ ssh-pkcs11-helper.o ssh-pkcs11.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
164
160ssh-keyscan$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keyscan.o roaming_dummy.o 165ssh-keyscan$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keyscan.o roaming_dummy.o
161 $(LD) -o $@ ssh-keyscan.o roaming_dummy.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh $(LIBS) 166 $(LD) -o $@ ssh-keyscan.o roaming_dummy.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh $(LIBS)
162 167
@@ -210,7 +215,6 @@ distclean: regressclean
210 rm -f survey.sh openbsd-compat/regress/Makefile *~ 215 rm -f survey.sh openbsd-compat/regress/Makefile *~
211 rm -rf autom4te.cache 216 rm -rf autom4te.cache
212 (cd openbsd-compat && $(MAKE) distclean) 217 (cd openbsd-compat && $(MAKE) distclean)
213 (cd scard && $(MAKE) distclean)
214 if test -d pkg ; then \ 218 if test -d pkg ; then \
215 rm -fr pkg ; \ 219 rm -fr pkg ; \
216 fi 220 fi
@@ -233,7 +237,6 @@ catman-do:
233distprep: catman-do 237distprep: catman-do
234 $(AUTORECONF) 238 $(AUTORECONF)
235 -rm -rf autom4te.cache 239 -rm -rf autom4te.cache
236 (cd scard && $(MAKE) -f Makefile.in distprep)
237 240
238install: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files install-sysconf host-key check-config 241install: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files install-sysconf host-key check-config
239install-nokeys: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files install-sysconf 242install-nokeys: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files install-sysconf
@@ -242,10 +245,7 @@ install-nosysconf: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) insta
242check-config: 245check-config:
243 -$(DESTDIR)$(sbindir)/sshd -t -f $(DESTDIR)$(sysconfdir)/sshd_config 246 -$(DESTDIR)$(sbindir)/sshd -t -f $(DESTDIR)$(sysconfdir)/sshd_config
244 247
245scard-install: 248install-files:
246 (cd scard && env DESTDIR=$(DESTDIR) $(MAKE) DESTDIR=$(DESTDIR) install)
247
248install-files: scard-install
249 $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) 249 $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
250 $(srcdir)/mkinstalldirs $(DESTDIR)$(sbindir) 250 $(srcdir)/mkinstalldirs $(DESTDIR)$(sbindir)
251 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir) 251 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)
@@ -266,6 +266,7 @@ install-files: scard-install
266 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-rand-helper $(DESTDIR)$(libexecdir)/ssh-rand-helper ; \ 266 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-rand-helper $(DESTDIR)$(libexecdir)/ssh-rand-helper ; \
267 fi 267 fi
268 $(INSTALL) -m 4711 $(STRIP_OPT) ssh-keysign $(DESTDIR)$(SSH_KEYSIGN) 268 $(INSTALL) -m 4711 $(STRIP_OPT) ssh-keysign $(DESTDIR)$(SSH_KEYSIGN)
269 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-pkcs11-helper $(DESTDIR)$(SSH_PKCS11_HELPER)
269 $(INSTALL) -m 0755 $(STRIP_OPT) sftp $(DESTDIR)$(bindir)/sftp 270 $(INSTALL) -m 0755 $(STRIP_OPT) sftp $(DESTDIR)$(bindir)/sftp
270 $(INSTALL) -m 0755 $(STRIP_OPT) sftp-server $(DESTDIR)$(SFTP_SERVER) 271 $(INSTALL) -m 0755 $(STRIP_OPT) sftp-server $(DESTDIR)$(SFTP_SERVER)
271 $(INSTALL) -m 644 ssh.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1 272 $(INSTALL) -m 644 ssh.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
@@ -284,6 +285,7 @@ install-files: scard-install
284 $(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1 285 $(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
285 $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8 286 $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
286 $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8 287 $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
288 $(INSTALL) -m 644 ssh-pkcs11-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8
287 -rm -f $(DESTDIR)$(bindir)/slogin 289 -rm -f $(DESTDIR)$(bindir)/slogin
288 ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin 290 ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin
289 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 291 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
@@ -369,6 +371,7 @@ uninstall:
369 -rm -f $(DESTDIR)$(sbindir)/sshd$(EXEEXT) 371 -rm -f $(DESTDIR)$(sbindir)/sshd$(EXEEXT)
370 -rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT) 372 -rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT)
371 -rm -f $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT) 373 -rm -f $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT)
374 -rm -f $(DESTDIR)$(SSH_PKCS11_HELPER)$(EXEEXT)
372 -rm -f $(DESTDIR)$(RAND_HELPER)$(EXEEXT) 375 -rm -f $(DESTDIR)$(RAND_HELPER)$(EXEEXT)
373 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1 376 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
374 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1 377 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
@@ -381,6 +384,7 @@ uninstall:
381 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-rand-helper.8 384 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-rand-helper.8
382 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8 385 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
383 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8 386 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
387 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8
384 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 388 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
385 389
386tests interop-tests: $(TARGETS) 390tests interop-tests: $(TARGETS)
@@ -394,6 +398,7 @@ tests interop-tests: $(TARGETS)
394 TEST_SSH_SSHAGENT="$${BUILDDIR}/ssh-agent"; \ 398 TEST_SSH_SSHAGENT="$${BUILDDIR}/ssh-agent"; \
395 TEST_SSH_SSHADD="$${BUILDDIR}/ssh-add"; \ 399 TEST_SSH_SSHADD="$${BUILDDIR}/ssh-add"; \
396 TEST_SSH_SSHKEYGEN="$${BUILDDIR}/ssh-keygen"; \ 400 TEST_SSH_SSHKEYGEN="$${BUILDDIR}/ssh-keygen"; \
401 TEST_SSH_SSHPKCS11HELPER="$${BUILDDIR}/ssh-pkcs11-helper"; \
397 TEST_SSH_SSHKEYSCAN="$${BUILDDIR}/ssh-keyscan"; \ 402 TEST_SSH_SSHKEYSCAN="$${BUILDDIR}/ssh-keyscan"; \
398 TEST_SSH_SFTP="$${BUILDDIR}/sftp"; \ 403 TEST_SSH_SFTP="$${BUILDDIR}/sftp"; \
399 TEST_SSH_SFTPSERVER="$${BUILDDIR}/sftp-server"; \ 404 TEST_SSH_SFTPSERVER="$${BUILDDIR}/sftp-server"; \
@@ -414,6 +419,7 @@ tests interop-tests: $(TARGETS)
414 TEST_SSH_SSHAGENT="$${TEST_SSH_SSHAGENT}" \ 419 TEST_SSH_SSHAGENT="$${TEST_SSH_SSHAGENT}" \
415 TEST_SSH_SSHADD="$${TEST_SSH_SSHADD}" \ 420 TEST_SSH_SSHADD="$${TEST_SSH_SSHADD}" \
416 TEST_SSH_SSHKEYGEN="$${TEST_SSH_SSHKEYGEN}" \ 421 TEST_SSH_SSHKEYGEN="$${TEST_SSH_SSHKEYGEN}" \
422 TEST_SSH_SSHPKCS11HELPER="$${TEST_SSH_SSHPKCS11HELPER}" \
417 TEST_SSH_SSHKEYSCAN="$${TEST_SSH_SSHKEYSCAN}" \ 423 TEST_SSH_SSHKEYSCAN="$${TEST_SSH_SSHKEYSCAN}" \
418 TEST_SSH_SFTP="$${TEST_SSH_SFTP}" \ 424 TEST_SSH_SFTP="$${TEST_SSH_SFTP}" \
419 TEST_SSH_SFTPSERVER="$${TEST_SSH_SFTPSERVER}" \ 425 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 eca750275..b21a0f4a2 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,6 +44,9 @@ 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 (auth_key_is_revoked(client_host_key))
48 return 0;
49
47 /* Check if we would accept it using rhosts authentication. */ 50 /* Check if we would accept it using rhosts authentication. */
48 if (!auth_rhosts(pw, cuser)) 51 if (!auth_rhosts(pw, cuser))
49 return 0; 52 return 0;
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 bf5462076..65571a890 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))
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",
diff --git a/auth.c b/auth.c
index 3585daadc..89a936068 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 *
@@ -69,6 +69,7 @@
69#ifdef GSSAPI 69#ifdef GSSAPI
70#include "ssh-gss.h" 70#include "ssh-gss.h"
71#endif 71#endif
72#include "authfile.h"
72#include "monitor_wrap.h" 73#include "monitor_wrap.h"
73 74
74/* import */ 75/* import */
@@ -95,7 +96,6 @@ allowed_user(struct passwd * pw)
95{ 96{
96 struct stat st; 97 struct stat st;
97 const char *hostname = NULL, *ipaddr = NULL, *passwd = NULL; 98 const char *hostname = NULL, *ipaddr = NULL, *passwd = NULL;
98 char *shell;
99 u_int i; 99 u_int i;
100#ifdef USE_SHADOW 100#ifdef USE_SHADOW
101 struct spwd *spw = NULL; 101 struct spwd *spw = NULL;
@@ -153,22 +153,28 @@ allowed_user(struct passwd * pw)
153 } 153 }
154 154
155 /* 155 /*
156 * Get the shell from the password data. An empty shell field is 156 * Deny if shell does not exist or is not executable unless we
157 * legal, and means /bin/sh. 157 * are chrooting.
158 */ 158 */
159 shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell; 159 if (options.chroot_directory == NULL ||
160 160 strcasecmp(options.chroot_directory, "none") == 0) {
161 /* deny if shell does not exists or is not executable */ 161 char *shell = xstrdup((pw->pw_shell[0] == '\0') ?
162 if (stat(shell, &st) != 0) { 162 _PATH_BSHELL : pw->pw_shell); /* empty = /bin/sh */
163 logit("User %.100s not allowed because shell %.100s does not exist", 163
164 pw->pw_name, shell); 164 if (stat(shell, &st) != 0) {
165 return 0; 165 logit("User %.100s not allowed because shell %.100s "
166 } 166 "does not exist", pw->pw_name, shell);
167 if (S_ISREG(st.st_mode) == 0 || 167 xfree(shell);
168 (st.st_mode & (S_IXOTH|S_IXUSR|S_IXGRP)) == 0) { 168 return 0;
169 logit("User %.100s not allowed because shell %.100s is not executable", 169 }
170 pw->pw_name, shell); 170 if (S_ISREG(st.st_mode) == 0 ||
171 return 0; 171 (st.st_mode & (S_IXOTH|S_IXUSR|S_IXGRP)) == 0) {
172 logit("User %.100s not allowed because shell %.100s "
173 "is not executable", pw->pw_name, shell);
174 xfree(shell);
175 return 0;
176 }
177 xfree(shell);
172 } 178 }
173 179
174 if (options.num_deny_users > 0 || options.num_allow_users > 0 || 180 if (options.num_deny_users > 0 || options.num_allow_users > 0 ||
@@ -455,7 +461,7 @@ secure_filename(FILE *f, const char *file, struct passwd *pw,
455 return -1; 461 return -1;
456 } 462 }
457 463
458 /* If are passed the homedir then we can stop */ 464 /* If are past the homedir then we can stop */
459 if (comparehome && strcmp(homedir, buf) == 0) { 465 if (comparehome && strcmp(homedir, buf) == 0) {
460 debug3("secure_filename: terminating check at '%s'", 466 debug3("secure_filename: terminating check at '%s'",
461 buf); 467 buf);
@@ -483,8 +489,12 @@ auth_openkeyfile(const char *file, struct passwd *pw, int strict_modes)
483 * Open the file containing the authorized keys 489 * Open the file containing the authorized keys
484 * Fail quietly if file does not exist 490 * Fail quietly if file does not exist
485 */ 491 */
486 if ((fd = open(file, O_RDONLY|O_NONBLOCK)) == -1) 492 if ((fd = open(file, O_RDONLY|O_NONBLOCK)) == -1) {
493 if (errno != ENOENT)
494 debug("Could not open keyfile '%s': %s", file,
495 strerror(errno));
487 return NULL; 496 return NULL;
497 }
488 498
489 if (fstat(fd, &st) < 0) { 499 if (fstat(fd, &st) < 0) {
490 close(fd); 500 close(fd);
@@ -525,7 +535,28 @@ getpwnamallow(const char *user)
525 parse_server_match_config(&options, user, 535 parse_server_match_config(&options, user,
526 get_canonical_hostname(options.use_dns), get_remote_ipaddr()); 536 get_canonical_hostname(options.use_dns), get_remote_ipaddr());
527 537
538#if defined(_AIX) && defined(HAVE_SETAUTHDB)
539 aix_setauthdb(user);
540#endif
541
528 pw = getpwnam(user); 542 pw = getpwnam(user);
543
544#if defined(_AIX) && defined(HAVE_SETAUTHDB)
545 aix_restoreauthdb();
546#endif
547#ifdef HAVE_CYGWIN
548 /*
549 * Windows usernames are case-insensitive. To avoid later problems
550 * when trying to match the username, the user is only allowed to
551 * login if the username is given in the same case as stored in the
552 * user database.
553 */
554 if (pw != NULL && strcmp(user, pw->pw_name) != 0) {
555 logit("Login name %.100s does not match stored username %.100s",
556 user, pw->pw_name);
557 pw = NULL;
558 }
559#endif
529 if (pw == NULL) { 560 if (pw == NULL) {
530 logit("Invalid user %.100s from %.100s", 561 logit("Invalid user %.100s from %.100s",
531 user, get_remote_ipaddr()); 562 user, get_remote_ipaddr());
@@ -560,6 +591,35 @@ getpwnamallow(const char *user)
560 return (NULL); 591 return (NULL);
561} 592}
562 593
594/* Returns 1 if key is revoked by revoked_keys_file, 0 otherwise */
595int
596auth_key_is_revoked(Key *key)
597{
598 char *key_fp;
599
600 if (options.revoked_keys_file == NULL)
601 return 0;
602
603 switch (key_in_file(key, options.revoked_keys_file, 0)) {
604 case 0:
605 /* key not revoked */
606 return 0;
607 case -1:
608 /* Error opening revoked_keys_file: refuse all keys */
609 error("Revoked keys file is unreadable: refusing public key "
610 "authentication");
611 return 1;
612 case 1:
613 /* Key revoked */
614 key_fp = key_fingerprint(key, SSH_FP_MD5, SSH_FP_HEX);
615 error("WARNING: authentication attempt with a revoked "
616 "%s key %s ", key_type(key), key_fp);
617 xfree(key_fp);
618 return 1;
619 }
620 fatal("key_in_file returned junk");
621}
622
563void 623void
564auth_debug_add(const char *fmt,...) 624auth_debug_add(const char *fmt,...)
565{ 625{
diff --git a/auth.h b/auth.h
index 303c22d30..d4583f7ea 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.
@@ -172,6 +172,7 @@ char *authorized_keys_file(struct passwd *);
172char *authorized_keys_file2(struct passwd *); 172char *authorized_keys_file2(struct passwd *);
173 173
174FILE *auth_openkeyfile(const char *, struct passwd *, int); 174FILE *auth_openkeyfile(const char *, struct passwd *, int);
175int auth_key_is_revoked(Key *);
175 176
176HostStatus 177HostStatus
177check_key_in_hostfiles(struct passwd *, Key *, const char *, 178check_key_in_hostfiles(struct passwd *, Key *, const char *,
@@ -179,7 +180,8 @@ check_key_in_hostfiles(struct passwd *, Key *, const char *,
179 180
180/* hostkey handling */ 181/* hostkey handling */
181Key *get_hostkey_by_index(int); 182Key *get_hostkey_by_index(int);
182Key *get_hostkey_by_type(int); 183Key *get_hostkey_public_by_type(int);
184Key *get_hostkey_private_by_type(int);
183int get_hostkey_index(Key *); 185int get_hostkey_index(Key *);
184int ssh1_session_key(BIGNUM *); 186int ssh1_session_key(BIGNUM *);
185 187
diff --git a/auth2-hostbased.c b/auth2-hostbased.c
index 041051c53..721646520 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,6 +145,9 @@ 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 (auth_key_is_revoked(key))
149 return 0;
150
148 resolvedname = get_canonical_hostname(options.use_dns); 151 resolvedname = get_canonical_hostname(options.use_dns);
149 ipaddr = get_remote_ipaddr(); 152 ipaddr = get_remote_ipaddr();
150 153
diff --git a/auth2-pubkey.c b/auth2-pubkey.c
index 2886f1275..51aa77487 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,6 +325,15 @@ user_key_allowed(struct passwd *pw, Key *key)
254 int success; 325 int success;
255 char *file; 326 char *file;
256 327
328 if (auth_key_is_revoked(key))
329 return 0;
330 if (key_is_cert(key) && auth_key_is_revoked(key->cert->signature_key))
331 return 0;
332
333 success = user_cert_trusted_ca(pw, key);
334 if (success)
335 return success;
336
257 file = authorized_keys_file(pw); 337 file = authorized_keys_file(pw);
258 success = user_key_allowed2(pw, key, file); 338 success = user_key_allowed2(pw, key, file);
259 xfree(file); 339 xfree(file);
diff --git a/authfd.c b/authfd.c
index 61faad123..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;
@@ -545,12 +564,6 @@ ssh_add_identity_constrained(AuthenticationConnection *auth, Key *key,
545 return decode_reply(type); 564 return decode_reply(type);
546} 565}
547 566
548int
549ssh_add_identity(AuthenticationConnection *auth, Key *key, const char *comment)
550{
551 return ssh_add_identity_constrained(auth, key, comment, 0, 0);
552}
553
554/* 567/*
555 * Removes an identity from the authentication server. This call is not 568 * Removes an identity from the authentication server. This call is not
556 * meant to be used by normal applications. 569 * meant to be used by normal applications.
@@ -571,7 +584,8 @@ ssh_remove_identity(AuthenticationConnection *auth, Key *key)
571 buffer_put_int(&msg, BN_num_bits(key->rsa->n)); 584 buffer_put_int(&msg, BN_num_bits(key->rsa->n));
572 buffer_put_bignum(&msg, key->rsa->e); 585 buffer_put_bignum(&msg, key->rsa->e);
573 buffer_put_bignum(&msg, key->rsa->n); 586 buffer_put_bignum(&msg, key->rsa->n);
574 } 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) {
575 key_to_blob(key, &blob, &blen); 589 key_to_blob(key, &blob, &blen);
576 buffer_put_char(&msg, SSH2_AGENTC_REMOVE_IDENTITY); 590 buffer_put_char(&msg, SSH2_AGENTC_REMOVE_IDENTITY);
577 buffer_put_string(&msg, blob, blen); 591 buffer_put_string(&msg, blob, blen);
diff --git a/authfd.h b/authfd.h
index 3da256112..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>
@@ -75,7 +75,6 @@ void ssh_close_authentication_connection(AuthenticationConnection *);
75int ssh_get_num_identities(AuthenticationConnection *, int); 75int ssh_get_num_identities(AuthenticationConnection *, int);
76Key *ssh_get_first_identity(AuthenticationConnection *, char **, int); 76Key *ssh_get_first_identity(AuthenticationConnection *, char **, int);
77Key *ssh_get_next_identity(AuthenticationConnection *, char **, int); 77Key *ssh_get_next_identity(AuthenticationConnection *, char **, int);
78int ssh_add_identity(AuthenticationConnection *, Key *, const char *);
79int ssh_add_identity_constrained(AuthenticationConnection *, Key *, 78int ssh_add_identity_constrained(AuthenticationConnection *, Key *,
80 const char *, u_int, u_int); 79 const char *, u_int, u_int);
81int ssh_remove_identity(AuthenticationConnection *, Key *); 80int ssh_remove_identity(AuthenticationConnection *, Key *);
diff --git a/authfile.c b/authfile.c
index 735c64780..224c6aa80 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>
@@ -184,7 +187,11 @@ key_save_private_pem(Key *key, const char *filename, const char *_passphrase,
184 int success = 0; 187 int success = 0;
185 int len = strlen(_passphrase); 188 int len = strlen(_passphrase);
186 u_char *passphrase = (len > 0) ? (u_char *)_passphrase : NULL; 189 u_char *passphrase = (len > 0) ? (u_char *)_passphrase : NULL;
190#if (OPENSSL_VERSION_NUMBER < 0x00907000L)
187 const EVP_CIPHER *cipher = (len > 0) ? EVP_des_ede3_cbc() : NULL; 191 const EVP_CIPHER *cipher = (len > 0) ? EVP_des_ede3_cbc() : NULL;
192#else
193 const EVP_CIPHER *cipher = (len > 0) ? EVP_aes_128_cbc() : NULL;
194#endif
188 195
189 if (len > 0 && len <= 4) { 196 if (len > 0 && len <= 4) {
190 error("passphrase too short: have %d bytes, need > 4", len); 197 error("passphrase too short: have %d bytes, need > 4", len);
@@ -552,8 +559,13 @@ key_load_private_type(int type, const char *filename, const char *passphrase,
552 int fd; 559 int fd;
553 560
554 fd = open(filename, O_RDONLY); 561 fd = open(filename, O_RDONLY);
555 if (fd < 0) 562 if (fd < 0) {
563 debug("could not open key file '%s': %s", filename,
564 strerror(errno));
565 if (perm_ok != NULL)
566 *perm_ok = 0;
556 return NULL; 567 return NULL;
568 }
557 if (!key_perm_ok(fd, filename)) { 569 if (!key_perm_ok(fd, filename)) {
558 if (perm_ok != NULL) 570 if (perm_ok != NULL)
559 *perm_ok = 0; 571 *perm_ok = 0;
@@ -588,8 +600,11 @@ key_load_private(const char *filename, const char *passphrase,
588 int fd; 600 int fd;
589 601
590 fd = open(filename, O_RDONLY); 602 fd = open(filename, O_RDONLY);
591 if (fd < 0) 603 if (fd < 0) {
604 debug("could not open key file '%s': %s", filename,
605 strerror(errno));
592 return NULL; 606 return NULL;
607 }
593 if (!key_perm_ok(fd, filename)) { 608 if (!key_perm_ok(fd, filename)) {
594 error("bad permissions: ignore key: %s", filename); 609 error("bad permissions: ignore key: %s", filename);
595 close(fd); 610 close(fd);
@@ -677,3 +692,65 @@ key_load_public(const char *filename, char **commentp)
677 key_free(pub); 692 key_free(pub);
678 return NULL; 693 return NULL;
679} 694}
695
696/*
697 * Returns 1 if the specified "key" is listed in the file "filename",
698 * 0 if the key is not listed or -1 on error.
699 * If strict_type is set then the key type must match exactly,
700 * otherwise a comparison that ignores certficiate data is performed.
701 */
702int
703key_in_file(Key *key, const char *filename, int strict_type)
704{
705 FILE *f;
706 char line[SSH_MAX_PUBKEY_BYTES];
707 char *cp;
708 u_long linenum = 0;
709 int ret = 0;
710 Key *pub;
711 int (*key_compare)(const Key *, const Key *) = strict_type ?
712 key_equal : key_equal_public;
713
714 if ((f = fopen(filename, "r")) == NULL) {
715 if (errno == ENOENT) {
716 debug("%s: keyfile \"%s\" missing", __func__, filename);
717 return 0;
718 } else {
719 error("%s: could not open keyfile \"%s\": %s", __func__,
720 filename, strerror(errno));
721 return -1;
722 }
723 }
724
725 while (read_keyfile_line(f, filename, line, sizeof(line),
726 &linenum) != -1) {
727 cp = line;
728
729 /* Skip leading whitespace. */
730 for (; *cp && (*cp == ' ' || *cp == '\t'); cp++)
731 ;
732
733 /* Skip comments and empty lines */
734 switch (*cp) {
735 case '#':
736 case '\n':
737 case '\0':
738 continue;
739 }
740
741 pub = key_new(KEY_UNSPEC);
742 if (key_read(pub, &cp) != 1) {
743 key_free(pub);
744 continue;
745 }
746 if (key_compare(key, pub)) {
747 ret = 1;
748 key_free(pub);
749 break;
750 }
751 key_free(pub);
752 }
753 fclose(f);
754 return ret;
755}
756
diff --git a/authfile.h b/authfile.h
index a6c74934d..6dfa478e7 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,5 +22,6 @@ 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
26#endif 27#endif
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 e8b8aa07e..d8c53a4a8 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);
@@ -3108,13 +3262,8 @@ x11_create_display_inet(int x11_display_offset, int x11_use_localhost,
3108 continue; 3262 continue;
3109 } 3263 }
3110 } 3264 }
3111#ifdef IPV6_V6ONLY 3265 if (ai->ai_family == AF_INET6)
3112 if (ai->ai_family == AF_INET6) { 3266 sock_set_v6only(sock);
3113 int on = 1;
3114 if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on)) < 0)
3115 error("setsockopt IPV6_V6ONLY: %.100s", strerror(errno));
3116 }
3117#endif
3118 if (x11_use_localhost) 3267 if (x11_use_localhost)
3119 channel_set_reuseaddr(sock); 3268 channel_set_reuseaddr(sock);
3120 if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) { 3269 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 141e0fff5..e5ea74e26 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;
@@ -563,9 +568,6 @@ client_wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp,
563 if (packet_have_data_to_write()) 568 if (packet_have_data_to_write())
564 FD_SET(connection_out, *writesetp); 569 FD_SET(connection_out, *writesetp);
565 570
566 if (muxserver_sock != -1)
567 FD_SET(muxserver_sock, *readsetp);
568
569 /* 571 /*
570 * Wait for something to happen. This will suspend the process until 572 * Wait for something to happen. This will suspend the process until
571 * some selected descriptor can be read, written, or has some other 573 * some selected descriptor can be read, written, or has some other
@@ -612,7 +614,7 @@ client_suspend_self(Buffer *bin, Buffer *bout, Buffer *berr)
612 atomicio(vwrite, fileno(stderr), buffer_ptr(berr), 614 atomicio(vwrite, fileno(stderr), buffer_ptr(berr),
613 buffer_len(berr)); 615 buffer_len(berr));
614 616
615 leave_raw_mode(); 617 leave_raw_mode(force_tty_flag);
616 618
617 /* 619 /*
618 * Free (and clear) the buffer to reduce the amount of data that gets 620 * Free (and clear) the buffer to reduce the amount of data that gets
@@ -633,7 +635,7 @@ client_suspend_self(Buffer *bin, Buffer *bout, Buffer *berr)
633 buffer_init(bout); 635 buffer_init(bout);
634 buffer_init(berr); 636 buffer_init(berr);
635 637
636 enter_raw_mode(); 638 enter_raw_mode(force_tty_flag);
637} 639}
638 640
639static void 641static void
@@ -694,7 +696,7 @@ client_status_confirm(int type, Channel *c, void *ctx)
694 696
695 /* XXX supress on mux _client_ quietmode */ 697 /* XXX supress on mux _client_ quietmode */
696 tochan = options.log_level >= SYSLOG_LEVEL_ERROR && 698 tochan = options.log_level >= SYSLOG_LEVEL_ERROR &&
697 c->ctl_fd != -1 && c->extended_usage == CHAN_EXTENDED_WRITE; 699 c->ctl_chan != -1 && c->extended_usage == CHAN_EXTENDED_WRITE;
698 700
699 if (type == SSH2_MSG_CHANNEL_SUCCESS) { 701 if (type == SSH2_MSG_CHANNEL_SUCCESS) {
700 debug2("%s request accepted on channel %d", 702 debug2("%s request accepted on channel %d",
@@ -776,7 +778,7 @@ process_cmdline(void)
776 bzero(&fwd, sizeof(fwd)); 778 bzero(&fwd, sizeof(fwd));
777 fwd.listen_host = fwd.connect_host = NULL; 779 fwd.listen_host = fwd.connect_host = NULL;
778 780
779 leave_raw_mode(); 781 leave_raw_mode(force_tty_flag);
780 handler = signal(SIGINT, SIG_IGN); 782 handler = signal(SIGINT, SIG_IGN);
781 cmd = s = read_passphrase("\r\nssh> ", RP_ECHO); 783 cmd = s = read_passphrase("\r\nssh> ", RP_ECHO);
782 if (s == NULL) 784 if (s == NULL)
@@ -838,6 +840,7 @@ process_cmdline(void)
838 while (isspace(*++s)) 840 while (isspace(*++s))
839 ; 841 ;
840 842
843 /* XXX update list of forwards in options */
841 if (delete) { 844 if (delete) {
842 cancel_port = 0; 845 cancel_port = 0;
843 cancel_host = hpdelim(&s); /* may be NULL */ 846 cancel_host = hpdelim(&s); /* may be NULL */
@@ -879,7 +882,7 @@ process_cmdline(void)
879 882
880out: 883out:
881 signal(SIGINT, handler); 884 signal(SIGINT, handler);
882 enter_raw_mode(); 885 enter_raw_mode(force_tty_flag);
883 if (cmd) 886 if (cmd)
884 xfree(cmd); 887 xfree(cmd);
885 if (fwd.listen_host != NULL) 888 if (fwd.listen_host != NULL)
@@ -935,7 +938,7 @@ process_escapes(Channel *c, Buffer *bin, Buffer *bout, Buffer *berr,
935 escape_char); 938 escape_char);
936 buffer_append(berr, string, strlen(string)); 939 buffer_append(berr, string, strlen(string));
937 940
938 if (c && c->ctl_fd != -1) { 941 if (c && c->ctl_chan != -1) {
939 chan_read_failed(c); 942 chan_read_failed(c);
940 chan_write_failed(c); 943 chan_write_failed(c);
941 return 0; 944 return 0;
@@ -945,7 +948,7 @@ process_escapes(Channel *c, Buffer *bin, Buffer *bout, Buffer *berr,
945 948
946 case 'Z' - 64: 949 case 'Z' - 64:
947 /* XXX support this for mux clients */ 950 /* XXX support this for mux clients */
948 if (c && c->ctl_fd != -1) { 951 if (c && c->ctl_chan != -1) {
949 noescape: 952 noescape:
950 snprintf(string, sizeof string, 953 snprintf(string, sizeof string,
951 "%c%c escape not available to " 954 "%c%c escape not available to "
@@ -990,7 +993,7 @@ process_escapes(Channel *c, Buffer *bin, Buffer *bout, Buffer *berr,
990 continue; 993 continue;
991 994
992 case '&': 995 case '&':
993 if (c && c->ctl_fd != -1) 996 if (c && c->ctl_chan != -1)
994 goto noescape; 997 goto noescape;
995 /* 998 /*
996 * Detach the program (continue to serve 999 * Detach the program (continue to serve
@@ -998,7 +1001,7 @@ process_escapes(Channel *c, Buffer *bin, Buffer *bout, Buffer *berr,
998 * more new connections). 1001 * more new connections).
999 */ 1002 */
1000 /* Restore tty modes. */ 1003 /* Restore tty modes. */
1001 leave_raw_mode(); 1004 leave_raw_mode(force_tty_flag);
1002 1005
1003 /* Stop listening for new connections. */ 1006 /* Stop listening for new connections. */
1004 channel_stop_listening(); 1007 channel_stop_listening();
@@ -1041,7 +1044,7 @@ process_escapes(Channel *c, Buffer *bin, Buffer *bout, Buffer *berr,
1041 continue; 1044 continue;
1042 1045
1043 case '?': 1046 case '?':
1044 if (c && c->ctl_fd != -1) { 1047 if (c && c->ctl_chan != -1) {
1045 snprintf(string, sizeof string, 1048 snprintf(string, sizeof string,
1046"%c?\r\n\ 1049"%c?\r\n\
1047Supported escape sequences:\r\n\ 1050Supported escape sequences:\r\n\
@@ -1090,7 +1093,7 @@ Supported escape sequences:\r\n\
1090 continue; 1093 continue;
1091 1094
1092 case 'C': 1095 case 'C':
1093 if (c && c->ctl_fd != -1) 1096 if (c && c->ctl_chan != -1)
1094 goto noescape; 1097 goto noescape;
1095 process_cmdline(); 1098 process_cmdline();
1096 continue; 1099 continue;
@@ -1293,7 +1296,7 @@ client_channel_closed(int id, void *arg)
1293{ 1296{
1294 channel_cancel_cleanup(id); 1297 channel_cancel_cleanup(id);
1295 session_closed = 1; 1298 session_closed = 1;
1296 leave_raw_mode(); 1299 leave_raw_mode(force_tty_flag);
1297} 1300}
1298 1301
1299/* 1302/*
@@ -1326,8 +1329,6 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
1326 connection_in = packet_get_connection_in(); 1329 connection_in = packet_get_connection_in();
1327 connection_out = packet_get_connection_out(); 1330 connection_out = packet_get_connection_out();
1328 max_fd = MAX(connection_in, connection_out); 1331 max_fd = MAX(connection_in, connection_out);
1329 if (muxserver_sock != -1)
1330 max_fd = MAX(max_fd, muxserver_sock);
1331 1332
1332 if (!compat20) { 1333 if (!compat20) {
1333 /* enable nonblocking unless tty */ 1334 /* enable nonblocking unless tty */
@@ -1366,7 +1367,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
1366 signal(SIGWINCH, window_change_handler); 1367 signal(SIGWINCH, window_change_handler);
1367 1368
1368 if (have_pty) 1369 if (have_pty)
1369 enter_raw_mode(); 1370 enter_raw_mode(force_tty_flag);
1370 1371
1371 if (compat20) { 1372 if (compat20) {
1372 session_ident = ssh2_chan_id; 1373 session_ident = ssh2_chan_id;
@@ -1454,12 +1455,6 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
1454 /* Buffer input from the connection. */ 1455 /* Buffer input from the connection. */
1455 client_process_net_input(readset); 1456 client_process_net_input(readset);
1456 1457
1457 /* Accept control connections. */
1458 if (muxserver_sock != -1 &&FD_ISSET(muxserver_sock, readset)) {
1459 if (muxserver_accept_control())
1460 quit_pending = 1;
1461 }
1462
1463 if (quit_pending) 1458 if (quit_pending)
1464 break; 1459 break;
1465 1460
@@ -1473,6 +1468,14 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
1473 client_process_output(writeset); 1468 client_process_output(writeset);
1474 } 1469 }
1475 1470
1471 if (session_resumed) {
1472 connection_in = packet_get_connection_in();
1473 connection_out = packet_get_connection_out();
1474 max_fd = MAX(max_fd, connection_out);
1475 max_fd = MAX(max_fd, connection_in);
1476 session_resumed = 0;
1477 }
1478
1476 /* 1479 /*
1477 * Send as much buffered packet data as possible to the 1480 * Send as much buffered packet data as possible to the
1478 * sender. 1481 * sender.
@@ -1501,7 +1504,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
1501 channel_free_all(); 1504 channel_free_all();
1502 1505
1503 if (have_pty) 1506 if (have_pty)
1504 leave_raw_mode(); 1507 leave_raw_mode(force_tty_flag);
1505 1508
1506 /* restore blocking io */ 1509 /* restore blocking io */
1507 if (!isatty(fileno(stdin))) 1510 if (!isatty(fileno(stdin)))
@@ -1859,15 +1862,17 @@ client_input_channel_req(int type, u_int32_t seq, void *ctxt)
1859 chan_rcvd_eow(c); 1862 chan_rcvd_eow(c);
1860 } else if (strcmp(rtype, "exit-status") == 0) { 1863 } else if (strcmp(rtype, "exit-status") == 0) {
1861 exitval = packet_get_int(); 1864 exitval = packet_get_int();
1862 if (id == session_ident) { 1865 if (c->ctl_chan != -1) {
1866 mux_exit_message(c, exitval);
1867 success = 1;
1868 } else if (id == session_ident) {
1869 /* Record exit value of local session */
1863 success = 1; 1870 success = 1;
1864 exit_status = exitval; 1871 exit_status = exitval;
1865 } else if (c->ctl_fd == -1) {
1866 error("client_input_channel_req: unexpected channel %d",
1867 session_ident);
1868 } else { 1872 } else {
1869 atomicio(vwrite, c->ctl_fd, &exitval, sizeof(exitval)); 1873 /* Probably for a mux channel that has already closed */
1870 success = 1; 1874 debug("%s: no sink for exit-status on channel %d",
1875 __func__, id);
1871 } 1876 }
1872 packet_check_eom(); 1877 packet_check_eom();
1873 } 1878 }
@@ -2063,7 +2068,7 @@ client_init_dispatch(void)
2063void 2068void
2064cleanup_exit(int i) 2069cleanup_exit(int i)
2065{ 2070{
2066 leave_raw_mode(); 2071 leave_raw_mode(force_tty_flag);
2067 leave_non_blocking(); 2072 leave_non_blocking();
2068 if (options.control_path != NULL && muxserver_sock != -1) 2073 if (options.control_path != NULL && muxserver_sock != -1)
2069 unlink(options.control_path); 2074 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 c7607c74f..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 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='2008-04-14' 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='2008-04-14'
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."
@@ -170,7 +171,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
170 arm*|i386|m68k|ns32k|sh3*|sparc|vax) 171 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
171 eval $set_cc_for_build 172 eval $set_cc_for_build
172 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 173 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
173 | grep __ELF__ >/dev/null 174 | grep -q __ELF__
174 then 175 then
175 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 176 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
176 # Return netbsd for either. FIX? 177 # Return netbsd for either. FIX?
@@ -324,14 +325,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
324 case `/usr/bin/uname -p` in 325 case `/usr/bin/uname -p` in
325 sparc) echo sparc-icl-nx7; exit ;; 326 sparc) echo sparc-icl-nx7; exit ;;
326 esac ;; 327 esac ;;
328 s390x:SunOS:*:*)
329 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
330 exit ;;
327 sun4H:SunOS:5.*:*) 331 sun4H:SunOS:5.*:*)
328 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 332 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
329 exit ;; 333 exit ;;
330 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 334 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
331 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 335 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
332 exit ;; 336 exit ;;
337 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
338 echo i386-pc-auroraux${UNAME_RELEASE}
339 exit ;;
333 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 340 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
334 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 341 eval $set_cc_for_build
342 SUN_ARCH="i386"
343 # If there is a compiler, see if it is configured for 64-bit objects.
344 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
345 # This test works for both compilers.
346 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
347 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
348 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
349 grep IS_64BIT_ARCH >/dev/null
350 then
351 SUN_ARCH="x86_64"
352 fi
353 fi
354 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
335 exit ;; 355 exit ;;
336 sun4*:SunOS:6*:*) 356 sun4*:SunOS:6*:*)
337 # According to config.sub, this is the proper way to canonicalize 357 # According to config.sub, this is the proper way to canonicalize
@@ -640,7 +660,7 @@ EOF
640 # => hppa64-hp-hpux11.23 660 # => hppa64-hp-hpux11.23
641 661
642 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 662 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
643 grep __LP64__ >/dev/null 663 grep -q __LP64__
644 then 664 then
645 HP_ARCH="hppa2.0w" 665 HP_ARCH="hppa2.0w"
646 else 666 else
@@ -791,12 +811,12 @@ EOF
791 i*:PW*:*) 811 i*:PW*:*)
792 echo ${UNAME_MACHINE}-pc-pw32 812 echo ${UNAME_MACHINE}-pc-pw32
793 exit ;; 813 exit ;;
794 *:Interix*:[3456]*) 814 *:Interix*:*)
795 case ${UNAME_MACHINE} in 815 case ${UNAME_MACHINE} in
796 x86) 816 x86)
797 echo i586-pc-interix${UNAME_RELEASE} 817 echo i586-pc-interix${UNAME_RELEASE}
798 exit ;; 818 exit ;;
799 EM64T | authenticamd) 819 authenticamd | genuineintel | EM64T)
800 echo x86_64-unknown-interix${UNAME_RELEASE} 820 echo x86_64-unknown-interix${UNAME_RELEASE}
801 exit ;; 821 exit ;;
802 IA64) 822 IA64)
@@ -806,6 +826,9 @@ EOF
806 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 826 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
807 echo i${UNAME_MACHINE}-pc-mks 827 echo i${UNAME_MACHINE}-pc-mks
808 exit ;; 828 exit ;;
829 8664:Windows_NT:*)
830 echo x86_64-pc-mks
831 exit ;;
809 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 832 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
810 # How do we know it's Interix rather than the generic POSIX subsystem? 833 # How do we know it's Interix rather than the generic POSIX subsystem?
811 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 834 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -835,6 +858,20 @@ EOF
835 i*86:Minix:*:*) 858 i*86:Minix:*:*)
836 echo ${UNAME_MACHINE}-pc-minix 859 echo ${UNAME_MACHINE}-pc-minix
837 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 ;;
838 arm*:Linux:*:*) 875 arm*:Linux:*:*)
839 eval $set_cc_for_build 876 eval $set_cc_for_build
840 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 877 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -857,6 +894,17 @@ EOF
857 frv:Linux:*:*) 894 frv:Linux:*:*)
858 echo frv-unknown-linux-gnu 895 echo frv-unknown-linux-gnu
859 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 ;;
860 ia64:Linux:*:*) 908 ia64:Linux:*:*)
861 echo ${UNAME_MACHINE}-unknown-linux-gnu 909 echo ${UNAME_MACHINE}-unknown-linux-gnu
862 exit ;; 910 exit ;;
@@ -866,74 +914,33 @@ EOF
866 m68*:Linux:*:*) 914 m68*:Linux:*:*)
867 echo ${UNAME_MACHINE}-unknown-linux-gnu 915 echo ${UNAME_MACHINE}-unknown-linux-gnu
868 exit ;; 916 exit ;;
869 mips:Linux:*:*) 917 mips:Linux:*:* | mips64:Linux:*:*)
870 eval $set_cc_for_build 918 eval $set_cc_for_build
871 sed 's/^ //' << EOF >$dummy.c 919 sed 's/^ //' << EOF >$dummy.c
872 #undef CPU 920 #undef CPU
873 #undef mips 921 #undef ${UNAME_MACHINE}
874 #undef mipsel 922 #undef ${UNAME_MACHINE}el
875 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 923 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
876 CPU=mipsel 924 CPU=${UNAME_MACHINE}el
877 #else 925 #else
878 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 926 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
879 CPU=mips 927 CPU=${UNAME_MACHINE}
880 #else 928 #else
881 CPU= 929 CPU=
882 #endif 930 #endif
883 #endif 931 #endif
884EOF 932EOF
885 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'`
886 /^CPU/{
887 s: ::g
888 p
889 }'`"
890 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
891 ;;
892 mips64:Linux:*:*)
893 eval $set_cc_for_build
894 sed 's/^ //' << EOF >$dummy.c
895 #undef CPU
896 #undef mips64
897 #undef mips64el
898 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
899 CPU=mips64el
900 #else
901 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
902 CPU=mips64
903 #else
904 CPU=
905 #endif
906 #endif
907EOF
908 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
909 /^CPU/{
910 s: ::g
911 p
912 }'`"
913 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 934 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
914 ;; 935 ;;
915 or32:Linux:*:*) 936 or32:Linux:*:*)
916 echo or32-unknown-linux-gnu 937 echo or32-unknown-linux-gnu
917 exit ;; 938 exit ;;
918 ppc:Linux:*:*) 939 padre:Linux:*:*)
919 echo powerpc-unknown-linux-gnu 940 echo sparc-unknown-linux-gnu
920 exit ;;
921 ppc64:Linux:*:*)
922 echo powerpc64-unknown-linux-gnu
923 exit ;; 941 exit ;;
924 alpha:Linux:*:*) 942 parisc64:Linux:*:* | hppa64:Linux:*:*)
925 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 943 echo hppa64-unknown-linux-gnu
926 EV5) UNAME_MACHINE=alphaev5 ;;
927 EV56) UNAME_MACHINE=alphaev56 ;;
928 PCA56) UNAME_MACHINE=alphapca56 ;;
929 PCA57) UNAME_MACHINE=alphapca56 ;;
930 EV6) UNAME_MACHINE=alphaev6 ;;
931 EV67) UNAME_MACHINE=alphaev67 ;;
932 EV68*) UNAME_MACHINE=alphaev68 ;;
933 esac
934 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
935 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
936 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
937 exit ;; 944 exit ;;
938 parisc:Linux:*:* | hppa:Linux:*:*) 945 parisc:Linux:*:* | hppa:Linux:*:*)
939 # Look for CPU level 946 # Look for CPU level
@@ -943,8 +950,11 @@ EOF
943 *) echo hppa-unknown-linux-gnu ;; 950 *) echo hppa-unknown-linux-gnu ;;
944 esac 951 esac
945 exit ;; 952 exit ;;
946 parisc64:Linux:*:* | hppa64:Linux:*:*) 953 ppc64:Linux:*:*)
947 echo hppa64-unknown-linux-gnu 954 echo powerpc64-unknown-linux-gnu
955 exit ;;
956 ppc:Linux:*:*)
957 echo powerpc-unknown-linux-gnu
948 exit ;; 958 exit ;;
949 s390:Linux:*:* | s390x:Linux:*:*) 959 s390:Linux:*:* | s390x:Linux:*:*)
950 echo ${UNAME_MACHINE}-ibm-linux 960 echo ${UNAME_MACHINE}-ibm-linux
@@ -967,66 +977,6 @@ EOF
967 xtensa*:Linux:*:*) 977 xtensa*:Linux:*:*)
968 echo ${UNAME_MACHINE}-unknown-linux-gnu 978 echo ${UNAME_MACHINE}-unknown-linux-gnu
969 exit ;; 979 exit ;;
970 i*86:Linux:*:*)
971 # The BFD linker knows what the default object file format is, so
972 # first see if it will tell us. cd to the root directory to prevent
973 # problems with other programs or directories called `ld' in the path.
974 # Set LC_ALL=C to ensure ld outputs messages in English.
975 ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
976 | sed -ne '/supported targets:/!d
977 s/[ ][ ]*/ /g
978 s/.*supported targets: *//
979 s/ .*//
980 p'`
981 case "$ld_supported_targets" in
982 elf32-i386)
983 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
984 ;;
985 a.out-i386-linux)
986 echo "${UNAME_MACHINE}-pc-linux-gnuaout"
987 exit ;;
988 "")
989 # Either a pre-BFD a.out linker (linux-gnuoldld) or
990 # one that does not give us useful --help.
991 echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
992 exit ;;
993 esac
994 # Determine whether the default compiler is a.out or elf
995 eval $set_cc_for_build
996 sed 's/^ //' << EOF >$dummy.c
997 #include <features.h>
998 #ifdef __ELF__
999 # ifdef __GLIBC__
1000 # if __GLIBC__ >= 2
1001 LIBC=gnu
1002 # else
1003 LIBC=gnulibc1
1004 # endif
1005 # else
1006 LIBC=gnulibc1
1007 # endif
1008 #else
1009 #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
1010 LIBC=gnu
1011 #else
1012 LIBC=gnuaout
1013 #endif
1014 #endif
1015 #ifdef __dietlibc__
1016 LIBC=dietlibc
1017 #endif
1018EOF
1019 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1020 /^LIBC/{
1021 s: ::g
1022 p
1023 }'`"
1024 test x"${LIBC}" != x && {
1025 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1026 exit
1027 }
1028 test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1029 ;;
1030 i*86:DYNIX/ptx:4*:*) 980 i*86:DYNIX/ptx:4*:*)
1031 # 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.
1032 # earlier versions are messed up and put the nodename in both 982 # earlier versions are messed up and put the nodename in both
@@ -1055,7 +1005,7 @@ EOF
1055 i*86:syllable:*:*) 1005 i*86:syllable:*:*)
1056 echo ${UNAME_MACHINE}-pc-syllable 1006 echo ${UNAME_MACHINE}-pc-syllable
1057 exit ;; 1007 exit ;;
1058 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 1008 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1059 echo i386-unknown-lynxos${UNAME_RELEASE} 1009 echo i386-unknown-lynxos${UNAME_RELEASE}
1060 exit ;; 1010 exit ;;
1061 i*86:*DOS:*:*) 1011 i*86:*DOS:*:*)
@@ -1099,8 +1049,11 @@ EOF
1099 pc:*:*:*) 1049 pc:*:*:*)
1100 # Left here for compatibility: 1050 # Left here for compatibility:
1101 # uname -m prints for DJGPP always 'pc', but it prints nothing about 1051 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1102 # the processor, so we play safe by assuming i386. 1052 # the processor, so we play safe by assuming i586.
1103 echo i386-pc-msdosdjgpp 1053 # Note: whatever this is, it MUST be the same as what config.sub
1054 # prints for the "djgpp" host, or else GDB configury will decide that
1055 # this is a cross-build.
1056 echo i586-pc-msdosdjgpp
1104 exit ;; 1057 exit ;;
1105 Intel:Mach:3*:*) 1058 Intel:Mach:3*:*)
1106 echo i386-pc-mach3 1059 echo i386-pc-mach3
@@ -1138,6 +1091,16 @@ EOF
1138 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1091 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1139 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1092 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1140 && { echo i486-ncr-sysv4; exit; } ;; 1093 && { echo i486-ncr-sysv4; exit; } ;;
1094 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1095 OS_REL='.3'
1096 test -r /etc/.relid \
1097 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1098 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1099 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1100 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1101 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1102 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1103 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1141 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1104 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1142 echo m68k-unknown-lynxos${UNAME_RELEASE} 1105 echo m68k-unknown-lynxos${UNAME_RELEASE}
1143 exit ;; 1106 exit ;;
@@ -1150,7 +1113,7 @@ EOF
1150 rs6000:LynxOS:2.*:*) 1113 rs6000:LynxOS:2.*:*)
1151 echo rs6000-unknown-lynxos${UNAME_RELEASE} 1114 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1152 exit ;; 1115 exit ;;
1153 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 1116 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1154 echo powerpc-unknown-lynxos${UNAME_RELEASE} 1117 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1155 exit ;; 1118 exit ;;
1156 SM[BE]S:UNIX_SV:*:*) 1119 SM[BE]S:UNIX_SV:*:*)
@@ -1243,6 +1206,16 @@ EOF
1243 *:Darwin:*:*) 1206 *:Darwin:*:*)
1244 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1207 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1245 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 ;;
1246 unknown) UNAME_PROCESSOR=powerpc ;; 1219 unknown) UNAME_PROCESSOR=powerpc ;;
1247 esac 1220 esac
1248 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1221 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1324,6 +1297,9 @@ EOF
1324 i*86:rdos:*:*) 1297 i*86:rdos:*:*)
1325 echo ${UNAME_MACHINE}-pc-rdos 1298 echo ${UNAME_MACHINE}-pc-rdos
1326 exit ;; 1299 exit ;;
1300 i*86:AROS:*:*)
1301 echo ${UNAME_MACHINE}-pc-aros
1302 exit ;;
1327esac 1303esac
1328 1304
1329#echo '(No uname command or uname output not recognized.)' 1>&2 1305#echo '(No uname command or uname output not recognized.)' 1>&2
diff --git a/config.h.in b/config.h.in
index fc195bad5..a61dec609 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
@@ -1305,9 +1314,6 @@
1305/* Define if your skeychallenge() function takes 4 arguments (NetBSD) */ 1314/* Define if your skeychallenge() function takes 4 arguments (NetBSD) */
1306#undef SKEYCHALLENGE_4ARG 1315#undef SKEYCHALLENGE_4ARG
1307 1316
1308/* Define if you want smartcard support */
1309#undef SMARTCARD
1310
1311/* Define as const if snprintf() can declare const char *fmt */ 1317/* Define as const if snprintf() can declare const char *fmt */
1312#undef SNPRINTF_CONST 1318#undef SNPRINTF_CONST
1313 1319
@@ -1375,9 +1381,6 @@
1375/* Use libedit for sftp */ 1381/* Use libedit for sftp */
1376#undef USE_LIBEDIT 1382#undef USE_LIBEDIT
1377 1383
1378/* Define if you want smartcard support using OpenSC */
1379#undef USE_OPENSC
1380
1381/* Enable OpenSSL engine support */ 1384/* Enable OpenSSL engine support */
1382#undef USE_OPENSSL_ENGINE 1385#undef USE_OPENSSL_ENGINE
1383 1386
@@ -1387,9 +1390,6 @@
1387/* Use PIPES instead of a socketpair() */ 1390/* Use PIPES instead of a socketpair() */
1388#undef USE_PIPES 1391#undef USE_PIPES
1389 1392
1390/* Define if you want smartcard support using sectok */
1391#undef USE_SECTOK
1392
1393/* Define if you have Solaris process contracts */ 1393/* Define if you have Solaris process contracts */
1394#undef USE_SOLARIS_PROCESS_CONTRACTS 1394#undef USE_SOLARIS_PROCESS_CONTRACTS
1395 1395
@@ -1415,17 +1415,9 @@
1415/* Define if you want SELinux support. */ 1415/* Define if you want SELinux support. */
1416#undef WITH_SELINUX 1416#undef WITH_SELINUX
1417 1417
1418/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most 1418/* Define to 1 if your processor stores words with the most significant byte
1419 significant byte first (like Motorola and SPARC, unlike Intel). */ 1419 first (like Motorola and SPARC, unlike Intel and VAX). */
1420#if defined AC_APPLE_UNIVERSAL_BUILD 1420#undef WORDS_BIGENDIAN
1421# if defined __BIG_ENDIAN__
1422# define WORDS_BIGENDIAN 1
1423# endif
1424#else
1425# ifndef WORDS_BIGENDIAN
1426# undef WORDS_BIGENDIAN
1427# endif
1428#endif
1429 1421
1430/* Define if xauth is found in your path */ 1422/* Define if xauth is found in your path */
1431#undef XAUTH_PATH 1423#undef XAUTH_PATH
diff --git a/config.sub b/config.sub
index a649350a6..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 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='2008-06-16' 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='2008-06-16'
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."
@@ -122,6 +126,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
122case $maybe_os in 126case $maybe_os in
123 nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ 127 nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
124 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ 128 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
129 kopensolaris*-gnu* | \
125 storm-chaos* | os2-emx* | rtmk-nova*) 130 storm-chaos* | os2-emx* | rtmk-nova*)
126 os=-$maybe_os 131 os=-$maybe_os
127 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 132 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -148,10 +153,13 @@ case $os in
148 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 153 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
149 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 154 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
150 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 155 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
151 -apple | -axis | -knuth | -cray) 156 -apple | -axis | -knuth | -cray | -microblaze)
152 os= 157 os=
153 basic_machine=$1 158 basic_machine=$1
154 ;; 159 ;;
160 -bluegene*)
161 os=-cnk
162 ;;
155 -sim | -cisco | -oki | -wec | -winbond) 163 -sim | -cisco | -oki | -wec | -winbond)
156 os= 164 os=
157 basic_machine=$1 165 basic_machine=$1
@@ -249,6 +257,7 @@ case $basic_machine in
249 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 257 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
250 | i370 | i860 | i960 | ia64 \ 258 | i370 | i860 | i960 | ia64 \
251 | ip2k | iq2000 \ 259 | ip2k | iq2000 \
260 | lm32 \
252 | m32c | m32r | m32rle | m68000 | m68k | m88k \ 261 | m32c | m32r | m32rle | m68000 | m68k | m88k \
253 | maxq | mb | microblaze | mcore | mep | metag \ 262 | maxq | mb | microblaze | mcore | mep | metag \
254 | mips | mipsbe | mipseb | mipsel | mipsle \ 263 | mips | mipsbe | mipseb | mipsel | mipsle \
@@ -270,6 +279,7 @@ case $basic_machine in
270 | mipsisa64sr71k | mipsisa64sr71kel \ 279 | mipsisa64sr71k | mipsisa64sr71kel \
271 | mipstx39 | mipstx39el \ 280 | mipstx39 | mipstx39el \
272 | mn10200 | mn10300 \ 281 | mn10200 | mn10300 \
282 | moxie \
273 | mt \ 283 | mt \
274 | msp430 \ 284 | msp430 \
275 | nios | nios2 \ 285 | nios | nios2 \
@@ -278,20 +288,22 @@ case $basic_machine in
278 | pdp10 | pdp11 | pj | pjl \ 288 | pdp10 | pdp11 | pj | pjl \
279 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 289 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
280 | pyramid \ 290 | pyramid \
291 | rx \
281 | score \ 292 | score \
282 | sh | sh[1234] | sh[24]a | 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 \
283 | sh64 | sh64le \ 294 | sh64 | sh64le \
284 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 295 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
285 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 296 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
286 | spu | strongarm \ 297 | spu | strongarm \
287 | tahoe | thumb | tic4x | tic80 | tron \ 298 | tahoe | thumb | tic4x | tic80 | tron \
299 | ubicom32 \
288 | v850 | v850e \ 300 | v850 | v850e \
289 | we32k \ 301 | we32k \
290 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ 302 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
291 | z8k) 303 | z8k | z80)
292 basic_machine=$basic_machine-unknown 304 basic_machine=$basic_machine-unknown
293 ;; 305 ;;
294 m6811 | m68hc11 | m6812 | m68hc12) 306 m6811 | m68hc11 | m6812 | m68hc12 | picochip)
295 # Motorola 68HC11/12. 307 # Motorola 68HC11/12.
296 basic_machine=$basic_machine-unknown 308 basic_machine=$basic_machine-unknown
297 os=-none 309 os=-none
@@ -331,9 +343,10 @@ case $basic_machine in
331 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 343 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
332 | i*86-* | i860-* | i960-* | ia64-* \ 344 | i*86-* | i860-* | i960-* | ia64-* \
333 | ip2k-* | iq2000-* \ 345 | ip2k-* | iq2000-* \
346 | lm32-* \
334 | m32c-* | m32r-* | m32rle-* \ 347 | m32c-* | m32r-* | m32rle-* \
335 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 348 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
336 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ 349 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
337 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 350 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
338 | mips16-* \ 351 | mips16-* \
339 | mips64-* | mips64el-* \ 352 | mips64-* | mips64el-* \
@@ -361,21 +374,23 @@ case $basic_machine in
361 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 374 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
362 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ 375 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
363 | pyramid-* \ 376 | pyramid-* \
364 | romp-* | rs6000-* \ 377 | romp-* | rs6000-* | rx-* \
365 | sh-* | sh[1234]-* | sh[24]a-* | 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-* \
366 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 379 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
367 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 380 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
368 | sparclite-* \ 381 | sparclite-* \
369 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ 382 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
370 | tahoe-* | thumb-* \ 383 | tahoe-* | thumb-* \
371 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ 384 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
385 | tile-* | tilegx-* \
372 | tron-* \ 386 | tron-* \
387 | ubicom32-* \
373 | v850-* | v850e-* | vax-* \ 388 | v850-* | v850e-* | vax-* \
374 | we32k-* \ 389 | we32k-* \
375 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ 390 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
376 | xstormy16-* | xtensa*-* \ 391 | xstormy16-* | xtensa*-* \
377 | ymp-* \ 392 | ymp-* \
378 | z8k-*) 393 | z8k-* | z80-*)
379 ;; 394 ;;
380 # Recognize the basic CPU types without company name, with glob match. 395 # Recognize the basic CPU types without company name, with glob match.
381 xtensa*) 396 xtensa*)
@@ -443,6 +458,10 @@ case $basic_machine in
443 basic_machine=m68k-apollo 458 basic_machine=m68k-apollo
444 os=-bsd 459 os=-bsd
445 ;; 460 ;;
461 aros)
462 basic_machine=i386-pc
463 os=-aros
464 ;;
446 aux) 465 aux)
447 basic_machine=m68k-apple 466 basic_machine=m68k-apple
448 os=-aux 467 os=-aux
@@ -459,6 +478,10 @@ case $basic_machine in
459 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` 478 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
460 os=-linux 479 os=-linux
461 ;; 480 ;;
481 bluegene*)
482 basic_machine=powerpc-ibm
483 os=-cnk
484 ;;
462 c90) 485 c90)
463 basic_machine=c90-cray 486 basic_machine=c90-cray
464 os=-unicos 487 os=-unicos
@@ -711,6 +734,9 @@ case $basic_machine in
711 basic_machine=ns32k-utek 734 basic_machine=ns32k-utek
712 os=-sysv 735 os=-sysv
713 ;; 736 ;;
737 microblaze)
738 basic_machine=microblaze-xilinx
739 ;;
714 mingw32) 740 mingw32)
715 basic_machine=i386-pc 741 basic_machine=i386-pc
716 os=-mingw32 742 os=-mingw32
@@ -1061,6 +1087,11 @@ case $basic_machine in
1061 basic_machine=tic6x-unknown 1087 basic_machine=tic6x-unknown
1062 os=-coff 1088 os=-coff
1063 ;; 1089 ;;
1090 # This must be matched before tile*.
1091 tilegx*)
1092 basic_machine=tilegx-unknown
1093 os=-linux-gnu
1094 ;;
1064 tile*) 1095 tile*)
1065 basic_machine=tile-unknown 1096 basic_machine=tile-unknown
1066 os=-linux-gnu 1097 os=-linux-gnu
@@ -1140,6 +1171,10 @@ case $basic_machine in
1140 basic_machine=z8k-unknown 1171 basic_machine=z8k-unknown
1141 os=-sim 1172 os=-sim
1142 ;; 1173 ;;
1174 z80-*-coff)
1175 basic_machine=z80-unknown
1176 os=-sim
1177 ;;
1143 none) 1178 none)
1144 basic_machine=none-none 1179 basic_machine=none-none
1145 os=-none 1180 os=-none
@@ -1178,7 +1213,7 @@ case $basic_machine in
1178 we32k) 1213 we32k)
1179 basic_machine=we32k-att 1214 basic_machine=we32k-att
1180 ;; 1215 ;;
1181 sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) 1216 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1182 basic_machine=sh-unknown 1217 basic_machine=sh-unknown
1183 ;; 1218 ;;
1184 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 1219 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@@ -1228,6 +1263,9 @@ case $os in
1228 # First match some system type aliases 1263 # First match some system type aliases
1229 # that might get confused with valid system types. 1264 # that might get confused with valid system types.
1230 # -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 ;;
1231 -solaris1 | -solaris1.*) 1269 -solaris1 | -solaris1.*)
1232 os=`echo $os | sed -e 's|solaris1|sunos4|'` 1270 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1233 ;; 1271 ;;
@@ -1248,10 +1286,11 @@ case $os in
1248 # Each alternative MUST END IN A *, to match a version number. 1286 # Each alternative MUST END IN A *, to match a version number.
1249 # -sysv* is not here because it comes later, after sysvr4. 1287 # -sysv* is not here because it comes later, after sysvr4.
1250 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 1288 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1251 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ 1289 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1252 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ 1290 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1291 | -sym* | -kopensolaris* \
1253 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 1292 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1254 | -aos* \ 1293 | -aos* | -aros* \
1255 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 1294 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1256 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 1295 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1257 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ 1296 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@@ -1270,7 +1309,7 @@ case $os in
1270 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 1309 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1271 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 1310 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1272 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 1311 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1273 | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) 1312 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1274 # Remember, each alternative MUST END IN *, to match a version number. 1313 # Remember, each alternative MUST END IN *, to match a version number.
1275 ;; 1314 ;;
1276 -qnx*) 1315 -qnx*)
@@ -1403,6 +1442,8 @@ case $os in
1403 -dicos*) 1442 -dicos*)
1404 os=-dicos 1443 os=-dicos
1405 ;; 1444 ;;
1445 -nacl*)
1446 ;;
1406 -none) 1447 -none)
1407 ;; 1448 ;;
1408 *) 1449 *)
@@ -1600,7 +1641,7 @@ case $basic_machine in
1600 -sunos*) 1641 -sunos*)
1601 vendor=sun 1642 vendor=sun
1602 ;; 1643 ;;
1603 -aix*) 1644 -cnk*|-aix*)
1604 vendor=ibm 1645 vendor=ibm
1605 ;; 1646 ;;
1606 -beos*) 1647 -beos*)
diff --git a/configure b/configure
index 416ea6f7d..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
@@ -8389,17 +8000,17 @@ cat >>confdefs.h <<\_ACEOF
8389_ACEOF 8000_ACEOF
8390 8001
8391 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
8392 { $as_echo "$as_me:$LINENO: checking for net/if_tap.h" >&5 8003 { echo "$as_me:$LINENO: checking for net/if_tap.h" >&5
8393$as_echo_n "checking for net/if_tap.h... " >&6; } 8004echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6; }
8394if test "${ac_cv_header_net_if_tap_h+set}" = set; then 8005if test "${ac_cv_header_net_if_tap_h+set}" = set; then
8395 $as_echo_n "(cached) " >&6 8006 echo $ECHO_N "(cached) $ECHO_C" >&6
8396fi 8007fi
8397{ $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
8398$as_echo "$ac_cv_header_net_if_tap_h" >&6; } 8009echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6; }
8399else 8010else
8400 # Is the header compilable? 8011 # Is the header compilable?
8401{ $as_echo "$as_me:$LINENO: checking net/if_tap.h usability" >&5 8012{ echo "$as_me:$LINENO: checking net/if_tap.h usability" >&5
8402$as_echo_n "checking net/if_tap.h usability... " >&6; } 8013echo $ECHO_N "checking net/if_tap.h usability... $ECHO_C" >&6; }
8403cat >conftest.$ac_ext <<_ACEOF 8014cat >conftest.$ac_ext <<_ACEOF
8404/* confdefs.h. */ 8015/* confdefs.h. */
8405_ACEOF 8016_ACEOF
@@ -8415,33 +8026,32 @@ case "(($ac_try" in
8415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 8026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8416 *) ac_try_echo=$ac_try;; 8027 *) ac_try_echo=$ac_try;;
8417esac 8028esac
8418eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 8029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8419$as_echo "$ac_try_echo") >&5
8420 (eval "$ac_compile") 2>conftest.er1 8030 (eval "$ac_compile") 2>conftest.er1
8421 ac_status=$? 8031 ac_status=$?
8422 grep -v '^ *+' conftest.er1 >conftest.err 8032 grep -v '^ *+' conftest.er1 >conftest.err
8423 rm -f conftest.er1 8033 rm -f conftest.er1
8424 cat conftest.err >&5 8034 cat conftest.err >&5
8425 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 8035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8426 (exit $ac_status); } && { 8036 (exit $ac_status); } && {
8427 test -z "$ac_c_werror_flag" || 8037 test -z "$ac_c_werror_flag" ||
8428 test ! -s conftest.err 8038 test ! -s conftest.err
8429 } && test -s conftest.$ac_objext; then 8039 } && test -s conftest.$ac_objext; then
8430 ac_header_compiler=yes 8040 ac_header_compiler=yes
8431else 8041else
8432 $as_echo "$as_me: failed program was:" >&5 8042 echo "$as_me: failed program was:" >&5
8433sed 's/^/| /' conftest.$ac_ext >&5 8043sed 's/^/| /' conftest.$ac_ext >&5
8434 8044
8435 ac_header_compiler=no 8045 ac_header_compiler=no
8436fi 8046fi
8437 8047
8438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 8048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8439{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 8049{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8440$as_echo "$ac_header_compiler" >&6; } 8050echo "${ECHO_T}$ac_header_compiler" >&6; }
8441 8051
8442# Is the header present? 8052# Is the header present?
8443{ $as_echo "$as_me:$LINENO: checking net/if_tap.h presence" >&5 8053{ echo "$as_me:$LINENO: checking net/if_tap.h presence" >&5
8444$as_echo_n "checking net/if_tap.h presence... " >&6; } 8054echo $ECHO_N "checking net/if_tap.h presence... $ECHO_C" >&6; }
8445cat >conftest.$ac_ext <<_ACEOF 8055cat >conftest.$ac_ext <<_ACEOF
8446/* confdefs.h. */ 8056/* confdefs.h. */
8447_ACEOF 8057_ACEOF
@@ -8455,52 +8065,51 @@ case "(($ac_try" in
8455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 8065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8456 *) ac_try_echo=$ac_try;; 8066 *) ac_try_echo=$ac_try;;
8457esac 8067esac
8458eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 8068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8459$as_echo "$ac_try_echo") >&5
8460 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 8069 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8461 ac_status=$? 8070 ac_status=$?
8462 grep -v '^ *+' conftest.er1 >conftest.err 8071 grep -v '^ *+' conftest.er1 >conftest.err
8463 rm -f conftest.er1 8072 rm -f conftest.er1
8464 cat conftest.err >&5 8073 cat conftest.err >&5
8465 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 8074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8466 (exit $ac_status); } >/dev/null && { 8075 (exit $ac_status); } >/dev/null && {
8467 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 8076 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8468 test ! -s conftest.err 8077 test ! -s conftest.err
8469 }; then 8078 }; then
8470 ac_header_preproc=yes 8079 ac_header_preproc=yes
8471else 8080else
8472 $as_echo "$as_me: failed program was:" >&5 8081 echo "$as_me: failed program was:" >&5
8473sed 's/^/| /' conftest.$ac_ext >&5 8082sed 's/^/| /' conftest.$ac_ext >&5
8474 8083
8475 ac_header_preproc=no 8084 ac_header_preproc=no
8476fi 8085fi
8477 8086
8478rm -f conftest.err conftest.$ac_ext 8087rm -f conftest.err conftest.$ac_ext
8479{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 8088{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8480$as_echo "$ac_header_preproc" >&6; } 8089echo "${ECHO_T}$ac_header_preproc" >&6; }
8481 8090
8482# So? What about this header? 8091# So? What about this header?
8483case $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
8484 yes:no: ) 8093 yes:no: )
8485 { $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
8486$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;}
8487 { $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
8488$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;}
8489 ac_header_preproc=yes 8098 ac_header_preproc=yes
8490 ;; 8099 ;;
8491 no:yes:* ) 8100 no:yes:* )
8492 { $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
8493$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;}
8494 { $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
8495$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;}
8496 { $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
8497$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;}
8498 { $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
8499$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;}
8500 { $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
8501$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;}
8502 { $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
8503$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;}
8504 ( cat <<\_ASBOX 8113 ( cat <<\_ASBOX
8505## ------------------------------------------- ## 8114## ------------------------------------------- ##
8506## Report this to openssh-unix-dev@mindrot.org ## 8115## Report this to openssh-unix-dev@mindrot.org ##
@@ -8509,15 +8118,15 @@ _ASBOX
8509 ) | sed "s/^/$as_me: WARNING: /" >&2 8118 ) | sed "s/^/$as_me: WARNING: /" >&2
8510 ;; 8119 ;;
8511esac 8120esac
8512{ $as_echo "$as_me:$LINENO: checking for net/if_tap.h" >&5 8121{ echo "$as_me:$LINENO: checking for net/if_tap.h" >&5
8513$as_echo_n "checking for net/if_tap.h... " >&6; } 8122echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6; }
8514if test "${ac_cv_header_net_if_tap_h+set}" = set; then 8123if test "${ac_cv_header_net_if_tap_h+set}" = set; then
8515 $as_echo_n "(cached) " >&6 8124 echo $ECHO_N "(cached) $ECHO_C" >&6
8516else 8125else
8517 ac_cv_header_net_if_tap_h=$ac_header_preproc 8126 ac_cv_header_net_if_tap_h=$ac_header_preproc
8518fi 8127fi
8519{ $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
8520$as_echo "$ac_cv_header_net_if_tap_h" >&6; } 8129echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6; }
8521 8130
8522fi 8131fi
8523if test $ac_cv_header_net_if_tap_h = yes; then 8132if test $ac_cv_header_net_if_tap_h = yes; then
@@ -8550,17 +8159,17 @@ cat >>confdefs.h <<\_ACEOF
8550_ACEOF 8159_ACEOF
8551 8160
8552 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
8553 { $as_echo "$as_me:$LINENO: checking for net/if_tap.h" >&5 8162 { echo "$as_me:$LINENO: checking for net/if_tap.h" >&5
8554$as_echo_n "checking for net/if_tap.h... " >&6; } 8163echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6; }
8555if test "${ac_cv_header_net_if_tap_h+set}" = set; then 8164if test "${ac_cv_header_net_if_tap_h+set}" = set; then
8556 $as_echo_n "(cached) " >&6 8165 echo $ECHO_N "(cached) $ECHO_C" >&6
8557fi 8166fi
8558{ $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
8559$as_echo "$ac_cv_header_net_if_tap_h" >&6; } 8168echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6; }
8560else 8169else
8561 # Is the header compilable? 8170 # Is the header compilable?
8562{ $as_echo "$as_me:$LINENO: checking net/if_tap.h usability" >&5 8171{ echo "$as_me:$LINENO: checking net/if_tap.h usability" >&5
8563$as_echo_n "checking net/if_tap.h usability... " >&6; } 8172echo $ECHO_N "checking net/if_tap.h usability... $ECHO_C" >&6; }
8564cat >conftest.$ac_ext <<_ACEOF 8173cat >conftest.$ac_ext <<_ACEOF
8565/* confdefs.h. */ 8174/* confdefs.h. */
8566_ACEOF 8175_ACEOF
@@ -8576,33 +8185,32 @@ case "(($ac_try" in
8576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 8185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8577 *) ac_try_echo=$ac_try;; 8186 *) ac_try_echo=$ac_try;;
8578esac 8187esac
8579eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 8188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8580$as_echo "$ac_try_echo") >&5
8581 (eval "$ac_compile") 2>conftest.er1 8189 (eval "$ac_compile") 2>conftest.er1
8582 ac_status=$? 8190 ac_status=$?
8583 grep -v '^ *+' conftest.er1 >conftest.err 8191 grep -v '^ *+' conftest.er1 >conftest.err
8584 rm -f conftest.er1 8192 rm -f conftest.er1
8585 cat conftest.err >&5 8193 cat conftest.err >&5
8586 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 8194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8587 (exit $ac_status); } && { 8195 (exit $ac_status); } && {
8588 test -z "$ac_c_werror_flag" || 8196 test -z "$ac_c_werror_flag" ||
8589 test ! -s conftest.err 8197 test ! -s conftest.err
8590 } && test -s conftest.$ac_objext; then 8198 } && test -s conftest.$ac_objext; then
8591 ac_header_compiler=yes 8199 ac_header_compiler=yes
8592else 8200else
8593 $as_echo "$as_me: failed program was:" >&5 8201 echo "$as_me: failed program was:" >&5
8594sed 's/^/| /' conftest.$ac_ext >&5 8202sed 's/^/| /' conftest.$ac_ext >&5
8595 8203
8596 ac_header_compiler=no 8204 ac_header_compiler=no
8597fi 8205fi
8598 8206
8599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 8207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8600{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 8208{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8601$as_echo "$ac_header_compiler" >&6; } 8209echo "${ECHO_T}$ac_header_compiler" >&6; }
8602 8210
8603# Is the header present? 8211# Is the header present?
8604{ $as_echo "$as_me:$LINENO: checking net/if_tap.h presence" >&5 8212{ echo "$as_me:$LINENO: checking net/if_tap.h presence" >&5
8605$as_echo_n "checking net/if_tap.h presence... " >&6; } 8213echo $ECHO_N "checking net/if_tap.h presence... $ECHO_C" >&6; }
8606cat >conftest.$ac_ext <<_ACEOF 8214cat >conftest.$ac_ext <<_ACEOF
8607/* confdefs.h. */ 8215/* confdefs.h. */
8608_ACEOF 8216_ACEOF
@@ -8616,52 +8224,51 @@ case "(($ac_try" in
8616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 8224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8617 *) ac_try_echo=$ac_try;; 8225 *) ac_try_echo=$ac_try;;
8618esac 8226esac
8619eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 8227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8620$as_echo "$ac_try_echo") >&5
8621 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 8228 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8622 ac_status=$? 8229 ac_status=$?
8623 grep -v '^ *+' conftest.er1 >conftest.err 8230 grep -v '^ *+' conftest.er1 >conftest.err
8624 rm -f conftest.er1 8231 rm -f conftest.er1
8625 cat conftest.err >&5 8232 cat conftest.err >&5
8626 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 8233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8627 (exit $ac_status); } >/dev/null && { 8234 (exit $ac_status); } >/dev/null && {
8628 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 8235 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8629 test ! -s conftest.err 8236 test ! -s conftest.err
8630 }; then 8237 }; then
8631 ac_header_preproc=yes 8238 ac_header_preproc=yes
8632else 8239else
8633 $as_echo "$as_me: failed program was:" >&5 8240 echo "$as_me: failed program was:" >&5
8634sed 's/^/| /' conftest.$ac_ext >&5 8241sed 's/^/| /' conftest.$ac_ext >&5
8635 8242
8636 ac_header_preproc=no 8243 ac_header_preproc=no
8637fi 8244fi
8638 8245
8639rm -f conftest.err conftest.$ac_ext 8246rm -f conftest.err conftest.$ac_ext
8640{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 8247{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8641$as_echo "$ac_header_preproc" >&6; } 8248echo "${ECHO_T}$ac_header_preproc" >&6; }
8642 8249
8643# So? What about this header? 8250# So? What about this header?
8644case $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
8645 yes:no: ) 8252 yes:no: )
8646 { $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
8647$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;}
8648 { $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
8649$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;}
8650 ac_header_preproc=yes 8257 ac_header_preproc=yes
8651 ;; 8258 ;;
8652 no:yes:* ) 8259 no:yes:* )
8653 { $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
8654$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;}
8655 { $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
8656$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;}
8657 { $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
8658$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;}
8659 { $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
8660$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;}
8661 { $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
8662$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;}
8663 { $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
8664$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;}
8665 ( cat <<\_ASBOX 8272 ( cat <<\_ASBOX
8666## ------------------------------------------- ## 8273## ------------------------------------------- ##
8667## Report this to openssh-unix-dev@mindrot.org ## 8274## Report this to openssh-unix-dev@mindrot.org ##
@@ -8670,15 +8277,15 @@ _ASBOX
8670 ) | sed "s/^/$as_me: WARNING: /" >&2 8277 ) | sed "s/^/$as_me: WARNING: /" >&2
8671 ;; 8278 ;;
8672esac 8279esac
8673{ $as_echo "$as_me:$LINENO: checking for net/if_tap.h" >&5 8280{ echo "$as_me:$LINENO: checking for net/if_tap.h" >&5
8674$as_echo_n "checking for net/if_tap.h... " >&6; } 8281echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6; }
8675if test "${ac_cv_header_net_if_tap_h+set}" = set; then 8282if test "${ac_cv_header_net_if_tap_h+set}" = set; then
8676 $as_echo_n "(cached) " >&6 8283 echo $ECHO_N "(cached) $ECHO_C" >&6
8677else 8284else
8678 ac_cv_header_net_if_tap_h=$ac_header_preproc 8285 ac_cv_header_net_if_tap_h=$ac_header_preproc
8679fi 8286fi
8680{ $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
8681$as_echo "$ac_cv_header_net_if_tap_h" >&6; } 8288echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6; }
8682 8289
8683fi 8290fi
8684if test $ac_cv_header_net_if_tap_h = yes; then 8291if test $ac_cv_header_net_if_tap_h = yes; then
@@ -8807,12 +8414,12 @@ _ACEOF
8807 external_path_file=/etc/default/login 8414 external_path_file=/etc/default/login
8808 # hardwire lastlog location (can't detect it on some versions) 8415 # hardwire lastlog location (can't detect it on some versions)
8809 conf_lastlog_location="/var/adm/lastlog" 8416 conf_lastlog_location="/var/adm/lastlog"
8810 { $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
8811$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; }
8812 sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'` 8419 sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'`
8813 if test "$sol2ver" -ge 8; then 8420 if test "$sol2ver" -ge 8; then
8814 { $as_echo "$as_me:$LINENO: result: yes" >&5 8421 { echo "$as_me:$LINENO: result: yes" >&5
8815$as_echo "yes" >&6; } 8422echo "${ECHO_T}yes" >&6; }
8816 cat >>confdefs.h <<\_ACEOF 8423 cat >>confdefs.h <<\_ACEOF
8817#define DISABLE_UTMP 1 8424#define DISABLE_UTMP 1
8818_ACEOF 8425_ACEOF
@@ -8823,17 +8430,17 @@ cat >>confdefs.h <<\_ACEOF
8823_ACEOF 8430_ACEOF
8824 8431
8825 else 8432 else
8826 { $as_echo "$as_me:$LINENO: result: no" >&5 8433 { echo "$as_me:$LINENO: result: no" >&5
8827$as_echo "no" >&6; } 8434echo "${ECHO_T}no" >&6; }
8828 fi 8435 fi
8829 8436
8830# Check whether --with-solaris-contracts was given. 8437# Check whether --with-solaris-contracts was given.
8831if test "${with_solaris_contracts+set}" = set; then 8438if test "${with_solaris_contracts+set}" = set; then
8832 withval=$with_solaris_contracts; 8439 withval=$with_solaris_contracts;
8833 { $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
8834$as_echo_n "checking for ct_tmpl_activate in -lcontract... " >&6; } 8441echo $ECHO_N "checking for ct_tmpl_activate in -lcontract... $ECHO_C" >&6; }
8835if test "${ac_cv_lib_contract_ct_tmpl_activate+set}" = set; then 8442if test "${ac_cv_lib_contract_ct_tmpl_activate+set}" = set; then
8836 $as_echo_n "(cached) " >&6 8443 echo $ECHO_N "(cached) $ECHO_C" >&6
8837else 8444else
8838 ac_check_lib_save_LIBS=$LIBS 8445 ac_check_lib_save_LIBS=$LIBS
8839LIBS="-lcontract $LIBS" 8446LIBS="-lcontract $LIBS"
@@ -8865,36 +8472,32 @@ case "(($ac_try" in
8865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 8472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8866 *) ac_try_echo=$ac_try;; 8473 *) ac_try_echo=$ac_try;;
8867esac 8474esac
8868eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 8475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8869$as_echo "$ac_try_echo") >&5
8870 (eval "$ac_link") 2>conftest.er1 8476 (eval "$ac_link") 2>conftest.er1
8871 ac_status=$? 8477 ac_status=$?
8872 grep -v '^ *+' conftest.er1 >conftest.err 8478 grep -v '^ *+' conftest.er1 >conftest.err
8873 rm -f conftest.er1 8479 rm -f conftest.er1
8874 cat conftest.err >&5 8480 cat conftest.err >&5
8875 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 8481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8876 (exit $ac_status); } && { 8482 (exit $ac_status); } && {
8877 test -z "$ac_c_werror_flag" || 8483 test -z "$ac_c_werror_flag" ||
8878 test ! -s conftest.err 8484 test ! -s conftest.err
8879 } && test -s conftest$ac_exeext && { 8485 } && test -s conftest$ac_exeext &&
8880 test "$cross_compiling" = yes || 8486 $as_test_x conftest$ac_exeext; then
8881 $as_test_x conftest$ac_exeext
8882 }; then
8883 ac_cv_lib_contract_ct_tmpl_activate=yes 8487 ac_cv_lib_contract_ct_tmpl_activate=yes
8884else 8488else
8885 $as_echo "$as_me: failed program was:" >&5 8489 echo "$as_me: failed program was:" >&5
8886sed 's/^/| /' conftest.$ac_ext >&5 8490sed 's/^/| /' conftest.$ac_ext >&5
8887 8491
8888 ac_cv_lib_contract_ct_tmpl_activate=no 8492 ac_cv_lib_contract_ct_tmpl_activate=no
8889fi 8493fi
8890 8494
8891rm -rf conftest.dSYM
8892rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 8495rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8893 conftest$ac_exeext conftest.$ac_ext 8496 conftest$ac_exeext conftest.$ac_ext
8894LIBS=$ac_check_lib_save_LIBS 8497LIBS=$ac_check_lib_save_LIBS
8895fi 8498fi
8896{ $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
8897$as_echo "$ac_cv_lib_contract_ct_tmpl_activate" >&6; } 8500echo "${ECHO_T}$ac_cv_lib_contract_ct_tmpl_activate" >&6; }
8898if test $ac_cv_lib_contract_ct_tmpl_activate = yes; then 8501if test $ac_cv_lib_contract_ct_tmpl_activate = yes; then
8899 8502
8900cat >>confdefs.h <<\_ACEOF 8503cat >>confdefs.h <<\_ACEOF
@@ -8915,11 +8518,11 @@ fi
8915 8518
8916for ac_func in getpwanam 8519for ac_func in getpwanam
8917do 8520do
8918as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 8521as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8919{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 8522{ echo "$as_me:$LINENO: checking for $ac_func" >&5
8920$as_echo_n "checking for $ac_func... " >&6; } 8523echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
8921if { 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
8922 $as_echo_n "(cached) " >&6 8525 echo $ECHO_N "(cached) $ECHO_C" >&6
8923else 8526else
8924 cat >conftest.$ac_ext <<_ACEOF 8527 cat >conftest.$ac_ext <<_ACEOF
8925/* confdefs.h. */ 8528/* confdefs.h. */
@@ -8972,41 +8575,35 @@ case "(($ac_try" in
8972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 8575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8973 *) ac_try_echo=$ac_try;; 8576 *) ac_try_echo=$ac_try;;
8974esac 8577esac
8975eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 8578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8976$as_echo "$ac_try_echo") >&5
8977 (eval "$ac_link") 2>conftest.er1 8579 (eval "$ac_link") 2>conftest.er1
8978 ac_status=$? 8580 ac_status=$?
8979 grep -v '^ *+' conftest.er1 >conftest.err 8581 grep -v '^ *+' conftest.er1 >conftest.err
8980 rm -f conftest.er1 8582 rm -f conftest.er1
8981 cat conftest.err >&5 8583 cat conftest.err >&5
8982 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 8584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8983 (exit $ac_status); } && { 8585 (exit $ac_status); } && {
8984 test -z "$ac_c_werror_flag" || 8586 test -z "$ac_c_werror_flag" ||
8985 test ! -s conftest.err 8587 test ! -s conftest.err
8986 } && test -s conftest$ac_exeext && { 8588 } && test -s conftest$ac_exeext &&
8987 test "$cross_compiling" = yes || 8589 $as_test_x conftest$ac_exeext; then
8988 $as_test_x conftest$ac_exeext
8989 }; then
8990 eval "$as_ac_var=yes" 8590 eval "$as_ac_var=yes"
8991else 8591else
8992 $as_echo "$as_me: failed program was:" >&5 8592 echo "$as_me: failed program was:" >&5
8993sed 's/^/| /' conftest.$ac_ext >&5 8593sed 's/^/| /' conftest.$ac_ext >&5
8994 8594
8995 eval "$as_ac_var=no" 8595 eval "$as_ac_var=no"
8996fi 8596fi
8997 8597
8998rm -rf conftest.dSYM
8999rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 8598rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9000 conftest$ac_exeext conftest.$ac_ext 8599 conftest$ac_exeext conftest.$ac_ext
9001fi 8600fi
9002ac_res=`eval 'as_val=${'$as_ac_var'} 8601ac_res=`eval echo '${'$as_ac_var'}'`
9003 $as_echo "$as_val"'` 8602 { echo "$as_me:$LINENO: result: $ac_res" >&5
9004 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 8603echo "${ECHO_T}$ac_res" >&6; }
9005$as_echo "$ac_res" >&6; } 8604if test `eval echo '${'$as_ac_var'}'` = yes; then
9006if test `eval 'as_val=${'$as_ac_var'}
9007 $as_echo "$as_val"'` = yes; then
9008 cat >>confdefs.h <<_ACEOF 8605 cat >>confdefs.h <<_ACEOF
9009#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 8606#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9010_ACEOF 8607_ACEOF
9011 8608
9012fi 8609fi
@@ -9050,10 +8647,10 @@ _ACEOF
9050*-sni-sysv*) 8647*-sni-sysv*)
9051 # /usr/ucblib MUST NOT be searched on ReliantUNIX 8648 # /usr/ucblib MUST NOT be searched on ReliantUNIX
9052 8649
9053{ $as_echo "$as_me:$LINENO: checking for dlsym in -ldl" >&5 8650{ echo "$as_me:$LINENO: checking for dlsym in -ldl" >&5
9054$as_echo_n "checking for dlsym in -ldl... " >&6; } 8651echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6; }
9055if test "${ac_cv_lib_dl_dlsym+set}" = set; then 8652if test "${ac_cv_lib_dl_dlsym+set}" = set; then
9056 $as_echo_n "(cached) " >&6 8653 echo $ECHO_N "(cached) $ECHO_C" >&6
9057else 8654else
9058 ac_check_lib_save_LIBS=$LIBS 8655 ac_check_lib_save_LIBS=$LIBS
9059LIBS="-ldl $LIBS" 8656LIBS="-ldl $LIBS"
@@ -9085,36 +8682,32 @@ case "(($ac_try" in
9085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 8682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9086 *) ac_try_echo=$ac_try;; 8683 *) ac_try_echo=$ac_try;;
9087esac 8684esac
9088eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 8685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9089$as_echo "$ac_try_echo") >&5
9090 (eval "$ac_link") 2>conftest.er1 8686 (eval "$ac_link") 2>conftest.er1
9091 ac_status=$? 8687 ac_status=$?
9092 grep -v '^ *+' conftest.er1 >conftest.err 8688 grep -v '^ *+' conftest.er1 >conftest.err
9093 rm -f conftest.er1 8689 rm -f conftest.er1
9094 cat conftest.err >&5 8690 cat conftest.err >&5
9095 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 8691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9096 (exit $ac_status); } && { 8692 (exit $ac_status); } && {
9097 test -z "$ac_c_werror_flag" || 8693 test -z "$ac_c_werror_flag" ||
9098 test ! -s conftest.err 8694 test ! -s conftest.err
9099 } && test -s conftest$ac_exeext && { 8695 } && test -s conftest$ac_exeext &&
9100 test "$cross_compiling" = yes || 8696 $as_test_x conftest$ac_exeext; then
9101 $as_test_x conftest$ac_exeext
9102 }; then
9103 ac_cv_lib_dl_dlsym=yes 8697 ac_cv_lib_dl_dlsym=yes
9104else 8698else
9105 $as_echo "$as_me: failed program was:" >&5 8699 echo "$as_me: failed program was:" >&5
9106sed 's/^/| /' conftest.$ac_ext >&5 8700sed 's/^/| /' conftest.$ac_ext >&5
9107 8701
9108 ac_cv_lib_dl_dlsym=no 8702 ac_cv_lib_dl_dlsym=no
9109fi 8703fi
9110 8704
9111rm -rf conftest.dSYM
9112rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 8705rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9113 conftest$ac_exeext conftest.$ac_ext 8706 conftest$ac_exeext conftest.$ac_ext
9114LIBS=$ac_check_lib_save_LIBS 8707LIBS=$ac_check_lib_save_LIBS
9115fi 8708fi
9116{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlsym" >&5 8709{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlsym" >&5
9117$as_echo "$ac_cv_lib_dl_dlsym" >&6; } 8710echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6; }
9118if test $ac_cv_lib_dl_dlsym = yes; then 8711if test $ac_cv_lib_dl_dlsym = yes; then
9119 cat >>confdefs.h <<_ACEOF 8712 cat >>confdefs.h <<_ACEOF
9120#define HAVE_LIBDL 1 8713#define HAVE_LIBDL 1
@@ -9125,10 +8718,10 @@ _ACEOF
9125fi 8718fi
9126 8719
9127 # -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
9128 { $as_echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5 8721 { echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5
9129$as_echo_n "checking for res_query in -lresolv... " >&6; } 8722echo $ECHO_N "checking for res_query in -lresolv... $ECHO_C" >&6; }
9130if test "${ac_cv_lib_resolv_res_query+set}" = set; then 8723if test "${ac_cv_lib_resolv_res_query+set}" = set; then
9131 $as_echo_n "(cached) " >&6 8724 echo $ECHO_N "(cached) $ECHO_C" >&6
9132else 8725else
9133 ac_check_lib_save_LIBS=$LIBS 8726 ac_check_lib_save_LIBS=$LIBS
9134LIBS="-lresolv $LIBS" 8727LIBS="-lresolv $LIBS"
@@ -9160,36 +8753,32 @@ case "(($ac_try" in
9160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 8753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9161 *) ac_try_echo=$ac_try;; 8754 *) ac_try_echo=$ac_try;;
9162esac 8755esac
9163eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 8756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9164$as_echo "$ac_try_echo") >&5
9165 (eval "$ac_link") 2>conftest.er1 8757 (eval "$ac_link") 2>conftest.er1
9166 ac_status=$? 8758 ac_status=$?
9167 grep -v '^ *+' conftest.er1 >conftest.err 8759 grep -v '^ *+' conftest.er1 >conftest.err
9168 rm -f conftest.er1 8760 rm -f conftest.er1
9169 cat conftest.err >&5 8761 cat conftest.err >&5
9170 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 8762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9171 (exit $ac_status); } && { 8763 (exit $ac_status); } && {
9172 test -z "$ac_c_werror_flag" || 8764 test -z "$ac_c_werror_flag" ||
9173 test ! -s conftest.err 8765 test ! -s conftest.err
9174 } && test -s conftest$ac_exeext && { 8766 } && test -s conftest$ac_exeext &&
9175 test "$cross_compiling" = yes || 8767 $as_test_x conftest$ac_exeext; then
9176 $as_test_x conftest$ac_exeext
9177 }; then
9178 ac_cv_lib_resolv_res_query=yes 8768 ac_cv_lib_resolv_res_query=yes
9179else 8769else
9180 $as_echo "$as_me: failed program was:" >&5 8770 echo "$as_me: failed program was:" >&5
9181sed 's/^/| /' conftest.$ac_ext >&5 8771sed 's/^/| /' conftest.$ac_ext >&5
9182 8772
9183 ac_cv_lib_resolv_res_query=no 8773 ac_cv_lib_resolv_res_query=no
9184fi 8774fi
9185 8775
9186rm -rf conftest.dSYM
9187rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 8776rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9188 conftest$ac_exeext conftest.$ac_ext 8777 conftest$ac_exeext conftest.$ac_ext
9189LIBS=$ac_check_lib_save_LIBS 8778LIBS=$ac_check_lib_save_LIBS
9190fi 8779fi
9191{ $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
9192$as_echo "$ac_cv_lib_resolv_res_query" >&6; } 8781echo "${ECHO_T}$ac_cv_lib_resolv_res_query" >&6; }
9193if test $ac_cv_lib_resolv_res_query = yes; then 8782if test $ac_cv_lib_resolv_res_query = yes; then
9194 LIBS="$LIBS -lresolv" 8783 LIBS="$LIBS -lresolv"
9195fi 8784fi
@@ -9254,6 +8843,7 @@ _ACEOF
9254 ;; 8843 ;;
9255# UnixWare 7.x, OpenUNIX 8 8844# UnixWare 7.x, OpenUNIX 8
9256*-*-sysv5*) 8845*-*-sysv5*)
8846 CPPFLAGS="$CPPFLAGS -Dvsnprintf=_xvsnprintf -Dsnprintf=_xsnprintf"
9257 8847
9258cat >>confdefs.h <<\_ACEOF 8848cat >>confdefs.h <<\_ACEOF
9259#define UNIXWARE_LONG_PASSWORDS 1 8849#define UNIXWARE_LONG_PASSWORDS 1
@@ -9268,6 +8858,10 @@ _ACEOF
9268_ACEOF 8858_ACEOF
9269 8859
9270 cat >>confdefs.h <<\_ACEOF 8860 cat >>confdefs.h <<\_ACEOF
8861#define BROKEN_GETADDRINFO 1
8862_ACEOF
8863
8864 cat >>confdefs.h <<\_ACEOF
9271#define BROKEN_SETREUID 1 8865#define BROKEN_SETREUID 1
9272_ACEOF 8866_ACEOF
9273 8867
@@ -9291,10 +8885,10 @@ _ACEOF
9291#define BROKEN_UPDWTMPX 1 8885#define BROKEN_UPDWTMPX 1
9292_ACEOF 8886_ACEOF
9293 8887
9294 { $as_echo "$as_me:$LINENO: checking for getluid in -lprot" >&5 8888 { echo "$as_me:$LINENO: checking for getluid in -lprot" >&5
9295$as_echo_n "checking for getluid in -lprot... " >&6; } 8889echo $ECHO_N "checking for getluid in -lprot... $ECHO_C" >&6; }
9296if test "${ac_cv_lib_prot_getluid+set}" = set; then 8890if test "${ac_cv_lib_prot_getluid+set}" = set; then
9297 $as_echo_n "(cached) " >&6 8891 echo $ECHO_N "(cached) $ECHO_C" >&6
9298else 8892else
9299 ac_check_lib_save_LIBS=$LIBS 8893 ac_check_lib_save_LIBS=$LIBS
9300LIBS="-lprot $LIBS" 8894LIBS="-lprot $LIBS"
@@ -9326,47 +8920,43 @@ case "(($ac_try" in
9326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 8920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9327 *) ac_try_echo=$ac_try;; 8921 *) ac_try_echo=$ac_try;;
9328esac 8922esac
9329eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 8923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9330$as_echo "$ac_try_echo") >&5
9331 (eval "$ac_link") 2>conftest.er1 8924 (eval "$ac_link") 2>conftest.er1
9332 ac_status=$? 8925 ac_status=$?
9333 grep -v '^ *+' conftest.er1 >conftest.err 8926 grep -v '^ *+' conftest.er1 >conftest.err
9334 rm -f conftest.er1 8927 rm -f conftest.er1
9335 cat conftest.err >&5 8928 cat conftest.err >&5
9336 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 8929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9337 (exit $ac_status); } && { 8930 (exit $ac_status); } && {
9338 test -z "$ac_c_werror_flag" || 8931 test -z "$ac_c_werror_flag" ||
9339 test ! -s conftest.err 8932 test ! -s conftest.err
9340 } && test -s conftest$ac_exeext && { 8933 } && test -s conftest$ac_exeext &&
9341 test "$cross_compiling" = yes || 8934 $as_test_x conftest$ac_exeext; then
9342 $as_test_x conftest$ac_exeext
9343 }; then
9344 ac_cv_lib_prot_getluid=yes 8935 ac_cv_lib_prot_getluid=yes
9345else 8936else
9346 $as_echo "$as_me: failed program was:" >&5 8937 echo "$as_me: failed program was:" >&5
9347sed 's/^/| /' conftest.$ac_ext >&5 8938sed 's/^/| /' conftest.$ac_ext >&5
9348 8939
9349 ac_cv_lib_prot_getluid=no 8940 ac_cv_lib_prot_getluid=no
9350fi 8941fi
9351 8942
9352rm -rf conftest.dSYM
9353rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 8943rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9354 conftest$ac_exeext conftest.$ac_ext 8944 conftest$ac_exeext conftest.$ac_ext
9355LIBS=$ac_check_lib_save_LIBS 8945LIBS=$ac_check_lib_save_LIBS
9356fi 8946fi
9357{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getluid" >&5 8947{ echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getluid" >&5
9358$as_echo "$ac_cv_lib_prot_getluid" >&6; } 8948echo "${ECHO_T}$ac_cv_lib_prot_getluid" >&6; }
9359if test $ac_cv_lib_prot_getluid = yes; then 8949if test $ac_cv_lib_prot_getluid = yes; then
9360 LIBS="$LIBS -lprot" 8950 LIBS="$LIBS -lprot"
9361 8951
9362 8952
9363for ac_func in getluid setluid 8953for ac_func in getluid setluid
9364do 8954do
9365as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 8955as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9366{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 8956{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9367$as_echo_n "checking for $ac_func... " >&6; } 8957echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9368if { 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
9369 $as_echo_n "(cached) " >&6 8959 echo $ECHO_N "(cached) $ECHO_C" >&6
9370else 8960else
9371 cat >conftest.$ac_ext <<_ACEOF 8961 cat >conftest.$ac_ext <<_ACEOF
9372/* confdefs.h. */ 8962/* confdefs.h. */
@@ -9419,41 +9009,35 @@ case "(($ac_try" in
9419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9420 *) ac_try_echo=$ac_try;; 9010 *) ac_try_echo=$ac_try;;
9421esac 9011esac
9422eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 9012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9423$as_echo "$ac_try_echo") >&5
9424 (eval "$ac_link") 2>conftest.er1 9013 (eval "$ac_link") 2>conftest.er1
9425 ac_status=$? 9014 ac_status=$?
9426 grep -v '^ *+' conftest.er1 >conftest.err 9015 grep -v '^ *+' conftest.er1 >conftest.err
9427 rm -f conftest.er1 9016 rm -f conftest.er1
9428 cat conftest.err >&5 9017 cat conftest.err >&5
9429 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 9018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9430 (exit $ac_status); } && { 9019 (exit $ac_status); } && {
9431 test -z "$ac_c_werror_flag" || 9020 test -z "$ac_c_werror_flag" ||
9432 test ! -s conftest.err 9021 test ! -s conftest.err
9433 } && test -s conftest$ac_exeext && { 9022 } && test -s conftest$ac_exeext &&
9434 test "$cross_compiling" = yes || 9023 $as_test_x conftest$ac_exeext; then
9435 $as_test_x conftest$ac_exeext
9436 }; then
9437 eval "$as_ac_var=yes" 9024 eval "$as_ac_var=yes"
9438else 9025else
9439 $as_echo "$as_me: failed program was:" >&5 9026 echo "$as_me: failed program was:" >&5
9440sed 's/^/| /' conftest.$ac_ext >&5 9027sed 's/^/| /' conftest.$ac_ext >&5
9441 9028
9442 eval "$as_ac_var=no" 9029 eval "$as_ac_var=no"
9443fi 9030fi
9444 9031
9445rm -rf conftest.dSYM
9446rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 9032rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9447 conftest$ac_exeext conftest.$ac_ext 9033 conftest$ac_exeext conftest.$ac_ext
9448fi 9034fi
9449ac_res=`eval 'as_val=${'$as_ac_var'} 9035ac_res=`eval echo '${'$as_ac_var'}'`
9450 $as_echo "$as_val"'` 9036 { echo "$as_me:$LINENO: result: $ac_res" >&5
9451 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 9037echo "${ECHO_T}$ac_res" >&6; }
9452$as_echo "$ac_res" >&6; } 9038if test `eval echo '${'$as_ac_var'}'` = yes; then
9453if test `eval 'as_val=${'$as_ac_var'}
9454 $as_echo "$as_val"'` = yes; then
9455 cat >>confdefs.h <<_ACEOF 9039 cat >>confdefs.h <<_ACEOF
9456#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 9040#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9457_ACEOF 9041_ACEOF
9458 9042
9459fi 9043fi
@@ -9483,8 +9067,8 @@ _ACEOF
9483 ;; 9067 ;;
9484# SCO UNIX and OEM versions of SCO UNIX 9068# SCO UNIX and OEM versions of SCO UNIX
9485*-*-sco3.2v4*) 9069*-*-sco3.2v4*)
9486 { { $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
9487$as_echo "$as_me: error: \"This Platform is no longer supported.\"" >&2;} 9071echo "$as_me: error: \"This Platform is no longer supported.\"" >&2;}
9488 { (exit 1); exit 1; }; } 9072 { (exit 1); exit 1; }; }
9489 ;; 9073 ;;
9490# SCO OpenServer 5.x 9074# SCO OpenServer 5.x
@@ -9515,6 +9099,10 @@ _ACEOF
9515_ACEOF 9099_ACEOF
9516 9100
9517 cat >>confdefs.h <<\_ACEOF 9101 cat >>confdefs.h <<\_ACEOF
9102#define BROKEN_GETADDRINFO 1
9103_ACEOF
9104
9105 cat >>confdefs.h <<\_ACEOF
9518#define BROKEN_SETREUID 1 9106#define BROKEN_SETREUID 1
9519_ACEOF 9107_ACEOF
9520 9108
@@ -9538,11 +9126,11 @@ _ACEOF
9538 9126
9539for ac_func in getluid setluid 9127for ac_func in getluid setluid
9540do 9128do
9541as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 9129as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9542{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 9130{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9543$as_echo_n "checking for $ac_func... " >&6; } 9131echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9544if { 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
9545 $as_echo_n "(cached) " >&6 9133 echo $ECHO_N "(cached) $ECHO_C" >&6
9546else 9134else
9547 cat >conftest.$ac_ext <<_ACEOF 9135 cat >conftest.$ac_ext <<_ACEOF
9548/* confdefs.h. */ 9136/* confdefs.h. */
@@ -9595,41 +9183,35 @@ case "(($ac_try" in
9595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9596 *) ac_try_echo=$ac_try;; 9184 *) ac_try_echo=$ac_try;;
9597esac 9185esac
9598eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 9186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9599$as_echo "$ac_try_echo") >&5
9600 (eval "$ac_link") 2>conftest.er1 9187 (eval "$ac_link") 2>conftest.er1
9601 ac_status=$? 9188 ac_status=$?
9602 grep -v '^ *+' conftest.er1 >conftest.err 9189 grep -v '^ *+' conftest.er1 >conftest.err
9603 rm -f conftest.er1 9190 rm -f conftest.er1
9604 cat conftest.err >&5 9191 cat conftest.err >&5
9605 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 9192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9606 (exit $ac_status); } && { 9193 (exit $ac_status); } && {
9607 test -z "$ac_c_werror_flag" || 9194 test -z "$ac_c_werror_flag" ||
9608 test ! -s conftest.err 9195 test ! -s conftest.err
9609 } && test -s conftest$ac_exeext && { 9196 } && test -s conftest$ac_exeext &&
9610 test "$cross_compiling" = yes || 9197 $as_test_x conftest$ac_exeext; then
9611 $as_test_x conftest$ac_exeext
9612 }; then
9613 eval "$as_ac_var=yes" 9198 eval "$as_ac_var=yes"
9614else 9199else
9615 $as_echo "$as_me: failed program was:" >&5 9200 echo "$as_me: failed program was:" >&5
9616sed 's/^/| /' conftest.$ac_ext >&5 9201sed 's/^/| /' conftest.$ac_ext >&5
9617 9202
9618 eval "$as_ac_var=no" 9203 eval "$as_ac_var=no"
9619fi 9204fi
9620 9205
9621rm -rf conftest.dSYM
9622rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 9206rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9623 conftest$ac_exeext conftest.$ac_ext 9207 conftest$ac_exeext conftest.$ac_ext
9624fi 9208fi
9625ac_res=`eval 'as_val=${'$as_ac_var'} 9209ac_res=`eval echo '${'$as_ac_var'}'`
9626 $as_echo "$as_val"'` 9210 { echo "$as_me:$LINENO: result: $ac_res" >&5
9627 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 9211echo "${ECHO_T}$ac_res" >&6; }
9628$as_echo "$ac_res" >&6; } 9212if test `eval echo '${'$as_ac_var'}'` = yes; then
9629if test `eval 'as_val=${'$as_ac_var'}
9630 $as_echo "$as_val"'` = yes; then
9631 cat >>confdefs.h <<_ACEOF 9213 cat >>confdefs.h <<_ACEOF
9632#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 9214#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9633_ACEOF 9215_ACEOF
9634 9216
9635fi 9217fi
@@ -9727,16 +9309,16 @@ _ACEOF
9727 MANTYPE=cat 9309 MANTYPE=cat
9728 ;; 9310 ;;
9729*-dec-osf*) 9311*-dec-osf*)
9730 { $as_echo "$as_me:$LINENO: checking for Digital Unix SIA" >&5 9312 { echo "$as_me:$LINENO: checking for Digital Unix SIA" >&5
9731$as_echo_n "checking for Digital Unix SIA... " >&6; } 9313echo $ECHO_N "checking for Digital Unix SIA... $ECHO_C" >&6; }
9732 no_osfsia="" 9314 no_osfsia=""
9733 9315
9734# Check whether --with-osfsia was given. 9316# Check whether --with-osfsia was given.
9735if test "${with_osfsia+set}" = set; then 9317if test "${with_osfsia+set}" = set; then
9736 withval=$with_osfsia; 9318 withval=$with_osfsia;
9737 if test "x$withval" = "xno" ; then 9319 if test "x$withval" = "xno" ; then
9738 { $as_echo "$as_me:$LINENO: result: disabled" >&5 9320 { echo "$as_me:$LINENO: result: disabled" >&5
9739$as_echo "disabled" >&6; } 9321echo "${ECHO_T}disabled" >&6; }
9740 no_osfsia=1 9322 no_osfsia=1
9741 fi 9323 fi
9742 9324
@@ -9744,8 +9326,8 @@ fi
9744 9326
9745 if test -z "$no_osfsia" ; then 9327 if test -z "$no_osfsia" ; then
9746 if test -f /etc/sia/matrix.conf; then 9328 if test -f /etc/sia/matrix.conf; then
9747 { $as_echo "$as_me:$LINENO: result: yes" >&5 9329 { echo "$as_me:$LINENO: result: yes" >&5
9748$as_echo "yes" >&6; } 9330echo "${ECHO_T}yes" >&6; }
9749 9331
9750cat >>confdefs.h <<\_ACEOF 9332cat >>confdefs.h <<\_ACEOF
9751#define HAVE_OSF_SIA 1 9333#define HAVE_OSF_SIA 1
@@ -9763,8 +9345,8 @@ _ACEOF
9763 LIBS="$LIBS -lsecurity -ldb -lm -laud" 9345 LIBS="$LIBS -lsecurity -ldb -lm -laud"
9764 SIA_MSG="yes" 9346 SIA_MSG="yes"
9765 else 9347 else
9766 { $as_echo "$as_me:$LINENO: result: no" >&5 9348 { echo "$as_me:$LINENO: result: no" >&5
9767$as_echo "no" >&6; } 9349echo "${ECHO_T}no" >&6; }
9768 9350
9769cat >>confdefs.h <<\_ACEOF 9351cat >>confdefs.h <<\_ACEOF
9770#define LOCKED_PASSWD_SUBSTR "Nologin" 9352#define LOCKED_PASSWD_SUBSTR "Nologin"
@@ -9879,11 +9461,11 @@ _ACEOF
9879 ;; 9461 ;;
9880esac 9462esac
9881 9463
9882{ $as_echo "$as_me:$LINENO: checking compiler and flags for sanity" >&5 9464{ echo "$as_me:$LINENO: checking compiler and flags for sanity" >&5
9883$as_echo_n "checking compiler and flags for sanity... " >&6; } 9465echo $ECHO_N "checking compiler and flags for sanity... $ECHO_C" >&6; }
9884if test "$cross_compiling" = yes; then 9466if test "$cross_compiling" = yes; then
9885 { $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
9886$as_echo "$as_me: WARNING: cross compiling: not checking compiler sanity" >&2;} 9468echo "$as_me: WARNING: cross compiling: not checking compiler sanity" >&2;}
9887 9469
9888else 9470else
9889 cat >conftest.$ac_ext <<_ACEOF 9471 cat >conftest.$ac_ext <<_ACEOF
@@ -9903,49 +9485,46 @@ case "(($ac_try" in
9903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9904 *) ac_try_echo=$ac_try;; 9486 *) ac_try_echo=$ac_try;;
9905esac 9487esac
9906eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 9488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9907$as_echo "$ac_try_echo") >&5
9908 (eval "$ac_link") 2>&5 9489 (eval "$ac_link") 2>&5
9909 ac_status=$? 9490 ac_status=$?
9910 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 9491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9911 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 9492 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9912 { (case "(($ac_try" in 9493 { (case "(($ac_try" in
9913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9914 *) ac_try_echo=$ac_try;; 9495 *) ac_try_echo=$ac_try;;
9915esac 9496esac
9916eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 9497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9917$as_echo "$ac_try_echo") >&5
9918 (eval "$ac_try") 2>&5 9498 (eval "$ac_try") 2>&5
9919 ac_status=$? 9499 ac_status=$?
9920 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 9500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9921 (exit $ac_status); }; }; then 9501 (exit $ac_status); }; }; then
9922 { $as_echo "$as_me:$LINENO: result: yes" >&5 9502 { echo "$as_me:$LINENO: result: yes" >&5
9923$as_echo "yes" >&6; } 9503echo "${ECHO_T}yes" >&6; }
9924else 9504else
9925 $as_echo "$as_me: program exited with status $ac_status" >&5 9505 echo "$as_me: program exited with status $ac_status" >&5
9926$as_echo "$as_me: failed program was:" >&5 9506echo "$as_me: failed program was:" >&5
9927sed 's/^/| /' conftest.$ac_ext >&5 9507sed 's/^/| /' conftest.$ac_ext >&5
9928 9508
9929( exit $ac_status ) 9509( exit $ac_status )
9930 9510
9931 { $as_echo "$as_me:$LINENO: result: no" >&5 9511 { echo "$as_me:$LINENO: result: no" >&5
9932$as_echo "no" >&6; } 9512echo "${ECHO_T}no" >&6; }
9933 { { $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
9934$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;}
9935 { (exit 1); exit 1; }; } 9515 { (exit 1); exit 1; }; }
9936 9516
9937fi 9517fi
9938rm -rf conftest.dSYM
9939rm -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
9940fi 9519fi
9941 9520
9942 9521
9943 9522
9944# Checks for libraries. 9523# Checks for libraries.
9945{ $as_echo "$as_me:$LINENO: checking for yp_match" >&5 9524{ echo "$as_me:$LINENO: checking for yp_match" >&5
9946$as_echo_n "checking for yp_match... " >&6; } 9525echo $ECHO_N "checking for yp_match... $ECHO_C" >&6; }
9947if test "${ac_cv_func_yp_match+set}" = set; then 9526if test "${ac_cv_func_yp_match+set}" = set; then
9948 $as_echo_n "(cached) " >&6 9527 echo $ECHO_N "(cached) $ECHO_C" >&6
9949else 9528else
9950 cat >conftest.$ac_ext <<_ACEOF 9529 cat >conftest.$ac_ext <<_ACEOF
9951/* confdefs.h. */ 9530/* confdefs.h. */
@@ -9998,43 +9577,39 @@ case "(($ac_try" in
9998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9999 *) ac_try_echo=$ac_try;; 9578 *) ac_try_echo=$ac_try;;
10000esac 9579esac
10001eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 9580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10002$as_echo "$ac_try_echo") >&5
10003 (eval "$ac_link") 2>conftest.er1 9581 (eval "$ac_link") 2>conftest.er1
10004 ac_status=$? 9582 ac_status=$?
10005 grep -v '^ *+' conftest.er1 >conftest.err 9583 grep -v '^ *+' conftest.er1 >conftest.err
10006 rm -f conftest.er1 9584 rm -f conftest.er1
10007 cat conftest.err >&5 9585 cat conftest.err >&5
10008 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 9586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10009 (exit $ac_status); } && { 9587 (exit $ac_status); } && {
10010 test -z "$ac_c_werror_flag" || 9588 test -z "$ac_c_werror_flag" ||
10011 test ! -s conftest.err 9589 test ! -s conftest.err
10012 } && test -s conftest$ac_exeext && { 9590 } && test -s conftest$ac_exeext &&
10013 test "$cross_compiling" = yes || 9591 $as_test_x conftest$ac_exeext; then
10014 $as_test_x conftest$ac_exeext
10015 }; then
10016 ac_cv_func_yp_match=yes 9592 ac_cv_func_yp_match=yes
10017else 9593else
10018 $as_echo "$as_me: failed program was:" >&5 9594 echo "$as_me: failed program was:" >&5
10019sed 's/^/| /' conftest.$ac_ext >&5 9595sed 's/^/| /' conftest.$ac_ext >&5
10020 9596
10021 ac_cv_func_yp_match=no 9597 ac_cv_func_yp_match=no
10022fi 9598fi
10023 9599
10024rm -rf conftest.dSYM
10025rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 9600rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10026 conftest$ac_exeext conftest.$ac_ext 9601 conftest$ac_exeext conftest.$ac_ext
10027fi 9602fi
10028{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_yp_match" >&5 9603{ echo "$as_me:$LINENO: result: $ac_cv_func_yp_match" >&5
10029$as_echo "$ac_cv_func_yp_match" >&6; } 9604echo "${ECHO_T}$ac_cv_func_yp_match" >&6; }
10030if test $ac_cv_func_yp_match = yes; then 9605if test $ac_cv_func_yp_match = yes; then
10031 : 9606 :
10032else 9607else
10033 9608
10034{ $as_echo "$as_me:$LINENO: checking for yp_match in -lnsl" >&5 9609{ echo "$as_me:$LINENO: checking for yp_match in -lnsl" >&5
10035$as_echo_n "checking for yp_match in -lnsl... " >&6; } 9610echo $ECHO_N "checking for yp_match in -lnsl... $ECHO_C" >&6; }
10036if test "${ac_cv_lib_nsl_yp_match+set}" = set; then 9611if test "${ac_cv_lib_nsl_yp_match+set}" = set; then
10037 $as_echo_n "(cached) " >&6 9612 echo $ECHO_N "(cached) $ECHO_C" >&6
10038else 9613else
10039 ac_check_lib_save_LIBS=$LIBS 9614 ac_check_lib_save_LIBS=$LIBS
10040LIBS="-lnsl $LIBS" 9615LIBS="-lnsl $LIBS"
@@ -10066,36 +9641,32 @@ case "(($ac_try" in
10066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10067 *) ac_try_echo=$ac_try;; 9642 *) ac_try_echo=$ac_try;;
10068esac 9643esac
10069eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 9644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10070$as_echo "$ac_try_echo") >&5
10071 (eval "$ac_link") 2>conftest.er1 9645 (eval "$ac_link") 2>conftest.er1
10072 ac_status=$? 9646 ac_status=$?
10073 grep -v '^ *+' conftest.er1 >conftest.err 9647 grep -v '^ *+' conftest.er1 >conftest.err
10074 rm -f conftest.er1 9648 rm -f conftest.er1
10075 cat conftest.err >&5 9649 cat conftest.err >&5
10076 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 9650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10077 (exit $ac_status); } && { 9651 (exit $ac_status); } && {
10078 test -z "$ac_c_werror_flag" || 9652 test -z "$ac_c_werror_flag" ||
10079 test ! -s conftest.err 9653 test ! -s conftest.err
10080 } && test -s conftest$ac_exeext && { 9654 } && test -s conftest$ac_exeext &&
10081 test "$cross_compiling" = yes || 9655 $as_test_x conftest$ac_exeext; then
10082 $as_test_x conftest$ac_exeext
10083 }; then
10084 ac_cv_lib_nsl_yp_match=yes 9656 ac_cv_lib_nsl_yp_match=yes
10085else 9657else
10086 $as_echo "$as_me: failed program was:" >&5 9658 echo "$as_me: failed program was:" >&5
10087sed 's/^/| /' conftest.$ac_ext >&5 9659sed 's/^/| /' conftest.$ac_ext >&5
10088 9660
10089 ac_cv_lib_nsl_yp_match=no 9661 ac_cv_lib_nsl_yp_match=no
10090fi 9662fi
10091 9663
10092rm -rf conftest.dSYM
10093rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 9664rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10094 conftest$ac_exeext conftest.$ac_ext 9665 conftest$ac_exeext conftest.$ac_ext
10095LIBS=$ac_check_lib_save_LIBS 9666LIBS=$ac_check_lib_save_LIBS
10096fi 9667fi
10097{ $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
10098$as_echo "$ac_cv_lib_nsl_yp_match" >&6; } 9669echo "${ECHO_T}$ac_cv_lib_nsl_yp_match" >&6; }
10099if test $ac_cv_lib_nsl_yp_match = yes; then 9670if test $ac_cv_lib_nsl_yp_match = yes; then
10100 cat >>confdefs.h <<_ACEOF 9671 cat >>confdefs.h <<_ACEOF
10101#define HAVE_LIBNSL 1 9672#define HAVE_LIBNSL 1
@@ -10107,10 +9678,10 @@ fi
10107 9678
10108fi 9679fi
10109 9680
10110{ $as_echo "$as_me:$LINENO: checking for setsockopt" >&5 9681{ echo "$as_me:$LINENO: checking for setsockopt" >&5
10111$as_echo_n "checking for setsockopt... " >&6; } 9682echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; }
10112if test "${ac_cv_func_setsockopt+set}" = set; then 9683if test "${ac_cv_func_setsockopt+set}" = set; then
10113 $as_echo_n "(cached) " >&6 9684 echo $ECHO_N "(cached) $ECHO_C" >&6
10114else 9685else
10115 cat >conftest.$ac_ext <<_ACEOF 9686 cat >conftest.$ac_ext <<_ACEOF
10116/* confdefs.h. */ 9687/* confdefs.h. */
@@ -10163,43 +9734,39 @@ case "(($ac_try" in
10163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10164 *) ac_try_echo=$ac_try;; 9735 *) ac_try_echo=$ac_try;;
10165esac 9736esac
10166eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 9737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10167$as_echo "$ac_try_echo") >&5
10168 (eval "$ac_link") 2>conftest.er1 9738 (eval "$ac_link") 2>conftest.er1
10169 ac_status=$? 9739 ac_status=$?
10170 grep -v '^ *+' conftest.er1 >conftest.err 9740 grep -v '^ *+' conftest.er1 >conftest.err
10171 rm -f conftest.er1 9741 rm -f conftest.er1
10172 cat conftest.err >&5 9742 cat conftest.err >&5
10173 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 9743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10174 (exit $ac_status); } && { 9744 (exit $ac_status); } && {
10175 test -z "$ac_c_werror_flag" || 9745 test -z "$ac_c_werror_flag" ||
10176 test ! -s conftest.err 9746 test ! -s conftest.err
10177 } && test -s conftest$ac_exeext && { 9747 } && test -s conftest$ac_exeext &&
10178 test "$cross_compiling" = yes || 9748 $as_test_x conftest$ac_exeext; then
10179 $as_test_x conftest$ac_exeext
10180 }; then
10181 ac_cv_func_setsockopt=yes 9749 ac_cv_func_setsockopt=yes
10182else 9750else
10183 $as_echo "$as_me: failed program was:" >&5 9751 echo "$as_me: failed program was:" >&5
10184sed 's/^/| /' conftest.$ac_ext >&5 9752sed 's/^/| /' conftest.$ac_ext >&5
10185 9753
10186 ac_cv_func_setsockopt=no 9754 ac_cv_func_setsockopt=no
10187fi 9755fi
10188 9756
10189rm -rf conftest.dSYM
10190rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 9757rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10191 conftest$ac_exeext conftest.$ac_ext 9758 conftest$ac_exeext conftest.$ac_ext
10192fi 9759fi
10193{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5 9760{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
10194$as_echo "$ac_cv_func_setsockopt" >&6; } 9761echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; }
10195if test $ac_cv_func_setsockopt = yes; then 9762if test $ac_cv_func_setsockopt = yes; then
10196 : 9763 :
10197else 9764else
10198 9765
10199{ $as_echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 9766{ echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
10200$as_echo_n "checking for setsockopt in -lsocket... " >&6; } 9767echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; }
10201if test "${ac_cv_lib_socket_setsockopt+set}" = set; then 9768if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
10202 $as_echo_n "(cached) " >&6 9769 echo $ECHO_N "(cached) $ECHO_C" >&6
10203else 9770else
10204 ac_check_lib_save_LIBS=$LIBS 9771 ac_check_lib_save_LIBS=$LIBS
10205LIBS="-lsocket $LIBS" 9772LIBS="-lsocket $LIBS"
@@ -10231,36 +9798,32 @@ case "(($ac_try" in
10231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10232 *) ac_try_echo=$ac_try;; 9799 *) ac_try_echo=$ac_try;;
10233esac 9800esac
10234eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 9801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10235$as_echo "$ac_try_echo") >&5
10236 (eval "$ac_link") 2>conftest.er1 9802 (eval "$ac_link") 2>conftest.er1
10237 ac_status=$? 9803 ac_status=$?
10238 grep -v '^ *+' conftest.er1 >conftest.err 9804 grep -v '^ *+' conftest.er1 >conftest.err
10239 rm -f conftest.er1 9805 rm -f conftest.er1
10240 cat conftest.err >&5 9806 cat conftest.err >&5
10241 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 9807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10242 (exit $ac_status); } && { 9808 (exit $ac_status); } && {
10243 test -z "$ac_c_werror_flag" || 9809 test -z "$ac_c_werror_flag" ||
10244 test ! -s conftest.err 9810 test ! -s conftest.err
10245 } && test -s conftest$ac_exeext && { 9811 } && test -s conftest$ac_exeext &&
10246 test "$cross_compiling" = yes || 9812 $as_test_x conftest$ac_exeext; then
10247 $as_test_x conftest$ac_exeext
10248 }; then
10249 ac_cv_lib_socket_setsockopt=yes 9813 ac_cv_lib_socket_setsockopt=yes
10250else 9814else
10251 $as_echo "$as_me: failed program was:" >&5 9815 echo "$as_me: failed program was:" >&5
10252sed 's/^/| /' conftest.$ac_ext >&5 9816sed 's/^/| /' conftest.$ac_ext >&5
10253 9817
10254 ac_cv_lib_socket_setsockopt=no 9818 ac_cv_lib_socket_setsockopt=no
10255fi 9819fi
10256 9820
10257rm -rf conftest.dSYM
10258rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 9821rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10259 conftest$ac_exeext conftest.$ac_ext 9822 conftest$ac_exeext conftest.$ac_ext
10260LIBS=$ac_check_lib_save_LIBS 9823LIBS=$ac_check_lib_save_LIBS
10261fi 9824fi
10262{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 9825{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
10263$as_echo "$ac_cv_lib_socket_setsockopt" >&6; } 9826echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; }
10264if test $ac_cv_lib_socket_setsockopt = yes; then 9827if test $ac_cv_lib_socket_setsockopt = yes; then
10265 cat >>confdefs.h <<_ACEOF 9828 cat >>confdefs.h <<_ACEOF
10266#define HAVE_LIBSOCKET 1 9829#define HAVE_LIBSOCKET 1
@@ -10276,11 +9839,11 @@ fi
10276 9839
10277for ac_func in dirname 9840for ac_func in dirname
10278do 9841do
10279as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 9842as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10280{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 9843{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10281$as_echo_n "checking for $ac_func... " >&6; } 9844echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10282if { 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
10283 $as_echo_n "(cached) " >&6 9846 echo $ECHO_N "(cached) $ECHO_C" >&6
10284else 9847else
10285 cat >conftest.$ac_ext <<_ACEOF 9848 cat >conftest.$ac_ext <<_ACEOF
10286/* confdefs.h. */ 9849/* confdefs.h. */
@@ -10333,60 +9896,53 @@ case "(($ac_try" in
10333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10334 *) ac_try_echo=$ac_try;; 9897 *) ac_try_echo=$ac_try;;
10335esac 9898esac
10336eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 9899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10337$as_echo "$ac_try_echo") >&5
10338 (eval "$ac_link") 2>conftest.er1 9900 (eval "$ac_link") 2>conftest.er1
10339 ac_status=$? 9901 ac_status=$?
10340 grep -v '^ *+' conftest.er1 >conftest.err 9902 grep -v '^ *+' conftest.er1 >conftest.err
10341 rm -f conftest.er1 9903 rm -f conftest.er1
10342 cat conftest.err >&5 9904 cat conftest.err >&5
10343 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 9905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10344 (exit $ac_status); } && { 9906 (exit $ac_status); } && {
10345 test -z "$ac_c_werror_flag" || 9907 test -z "$ac_c_werror_flag" ||
10346 test ! -s conftest.err 9908 test ! -s conftest.err
10347 } && test -s conftest$ac_exeext && { 9909 } && test -s conftest$ac_exeext &&
10348 test "$cross_compiling" = yes || 9910 $as_test_x conftest$ac_exeext; then
10349 $as_test_x conftest$ac_exeext
10350 }; then
10351 eval "$as_ac_var=yes" 9911 eval "$as_ac_var=yes"
10352else 9912else
10353 $as_echo "$as_me: failed program was:" >&5 9913 echo "$as_me: failed program was:" >&5
10354sed 's/^/| /' conftest.$ac_ext >&5 9914sed 's/^/| /' conftest.$ac_ext >&5
10355 9915
10356 eval "$as_ac_var=no" 9916 eval "$as_ac_var=no"
10357fi 9917fi
10358 9918
10359rm -rf conftest.dSYM
10360rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 9919rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10361 conftest$ac_exeext conftest.$ac_ext 9920 conftest$ac_exeext conftest.$ac_ext
10362fi 9921fi
10363ac_res=`eval 'as_val=${'$as_ac_var'} 9922ac_res=`eval echo '${'$as_ac_var'}'`
10364 $as_echo "$as_val"'` 9923 { echo "$as_me:$LINENO: result: $ac_res" >&5
10365 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 9924echo "${ECHO_T}$ac_res" >&6; }
10366$as_echo "$ac_res" >&6; } 9925if test `eval echo '${'$as_ac_var'}'` = yes; then
10367if test `eval 'as_val=${'$as_ac_var'}
10368 $as_echo "$as_val"'` = yes; then
10369 cat >>confdefs.h <<_ACEOF 9926 cat >>confdefs.h <<_ACEOF
10370#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 9927#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10371_ACEOF 9928_ACEOF
10372 9929
10373for ac_header in libgen.h 9930for ac_header in libgen.h
10374do 9931do
10375as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 9932as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10376if { 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
10377 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 9934 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10378$as_echo_n "checking for $ac_header... " >&6; } 9935echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10379if { 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
10380 $as_echo_n "(cached) " >&6 9937 echo $ECHO_N "(cached) $ECHO_C" >&6
10381fi 9938fi
10382ac_res=`eval 'as_val=${'$as_ac_Header'} 9939ac_res=`eval echo '${'$as_ac_Header'}'`
10383 $as_echo "$as_val"'` 9940 { echo "$as_me:$LINENO: result: $ac_res" >&5
10384 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 9941echo "${ECHO_T}$ac_res" >&6; }
10385$as_echo "$ac_res" >&6; }
10386else 9942else
10387 # Is the header compilable? 9943 # Is the header compilable?
10388{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 9944{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
10389$as_echo_n "checking $ac_header usability... " >&6; } 9945echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10390cat >conftest.$ac_ext <<_ACEOF 9946cat >conftest.$ac_ext <<_ACEOF
10391/* confdefs.h. */ 9947/* confdefs.h. */
10392_ACEOF 9948_ACEOF
@@ -10402,33 +9958,32 @@ case "(($ac_try" in
10402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10403 *) ac_try_echo=$ac_try;; 9959 *) ac_try_echo=$ac_try;;
10404esac 9960esac
10405eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 9961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10406$as_echo "$ac_try_echo") >&5
10407 (eval "$ac_compile") 2>conftest.er1 9962 (eval "$ac_compile") 2>conftest.er1
10408 ac_status=$? 9963 ac_status=$?
10409 grep -v '^ *+' conftest.er1 >conftest.err 9964 grep -v '^ *+' conftest.er1 >conftest.err
10410 rm -f conftest.er1 9965 rm -f conftest.er1
10411 cat conftest.err >&5 9966 cat conftest.err >&5
10412 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 9967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10413 (exit $ac_status); } && { 9968 (exit $ac_status); } && {
10414 test -z "$ac_c_werror_flag" || 9969 test -z "$ac_c_werror_flag" ||
10415 test ! -s conftest.err 9970 test ! -s conftest.err
10416 } && test -s conftest.$ac_objext; then 9971 } && test -s conftest.$ac_objext; then
10417 ac_header_compiler=yes 9972 ac_header_compiler=yes
10418else 9973else
10419 $as_echo "$as_me: failed program was:" >&5 9974 echo "$as_me: failed program was:" >&5
10420sed 's/^/| /' conftest.$ac_ext >&5 9975sed 's/^/| /' conftest.$ac_ext >&5
10421 9976
10422 ac_header_compiler=no 9977 ac_header_compiler=no
10423fi 9978fi
10424 9979
10425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10426{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 9981{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10427$as_echo "$ac_header_compiler" >&6; } 9982echo "${ECHO_T}$ac_header_compiler" >&6; }
10428 9983
10429# Is the header present? 9984# Is the header present?
10430{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 9985{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
10431$as_echo_n "checking $ac_header presence... " >&6; } 9986echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10432cat >conftest.$ac_ext <<_ACEOF 9987cat >conftest.$ac_ext <<_ACEOF
10433/* confdefs.h. */ 9988/* confdefs.h. */
10434_ACEOF 9989_ACEOF
@@ -10442,52 +9997,51 @@ case "(($ac_try" in
10442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10443 *) ac_try_echo=$ac_try;; 9998 *) ac_try_echo=$ac_try;;
10444esac 9999esac
10445eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10446$as_echo "$ac_try_echo") >&5
10447 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 10001 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10448 ac_status=$? 10002 ac_status=$?
10449 grep -v '^ *+' conftest.er1 >conftest.err 10003 grep -v '^ *+' conftest.er1 >conftest.err
10450 rm -f conftest.er1 10004 rm -f conftest.er1
10451 cat conftest.err >&5 10005 cat conftest.err >&5
10452 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10453 (exit $ac_status); } >/dev/null && { 10007 (exit $ac_status); } >/dev/null && {
10454 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 10008 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10455 test ! -s conftest.err 10009 test ! -s conftest.err
10456 }; then 10010 }; then
10457 ac_header_preproc=yes 10011 ac_header_preproc=yes
10458else 10012else
10459 $as_echo "$as_me: failed program was:" >&5 10013 echo "$as_me: failed program was:" >&5
10460sed 's/^/| /' conftest.$ac_ext >&5 10014sed 's/^/| /' conftest.$ac_ext >&5
10461 10015
10462 ac_header_preproc=no 10016 ac_header_preproc=no
10463fi 10017fi
10464 10018
10465rm -f conftest.err conftest.$ac_ext 10019rm -f conftest.err conftest.$ac_ext
10466{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 10020{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10467$as_echo "$ac_header_preproc" >&6; } 10021echo "${ECHO_T}$ac_header_preproc" >&6; }
10468 10022
10469# So? What about this header? 10023# So? What about this header?
10470case $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
10471 yes:no: ) 10025 yes:no: )
10472 { $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
10473$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;}
10474 { $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
10475$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;}
10476 ac_header_preproc=yes 10030 ac_header_preproc=yes
10477 ;; 10031 ;;
10478 no:yes:* ) 10032 no:yes:* )
10479 { $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
10480$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;}
10481 { $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
10482$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;}
10483 { $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
10484$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 10038echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10485 { $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
10486$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;}
10487 { $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
10488$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;}
10489 { $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
10490$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;}
10491 ( cat <<\_ASBOX 10045 ( cat <<\_ASBOX
10492## ------------------------------------------- ## 10046## ------------------------------------------- ##
10493## Report this to openssh-unix-dev@mindrot.org ## 10047## Report this to openssh-unix-dev@mindrot.org ##
@@ -10496,23 +10050,21 @@ _ASBOX
10496 ) | sed "s/^/$as_me: WARNING: /" >&2 10050 ) | sed "s/^/$as_me: WARNING: /" >&2
10497 ;; 10051 ;;
10498esac 10052esac
10499{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 10053{ echo "$as_me:$LINENO: checking for $ac_header" >&5
10500$as_echo_n "checking for $ac_header... " >&6; } 10054echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10501if { 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
10502 $as_echo_n "(cached) " >&6 10056 echo $ECHO_N "(cached) $ECHO_C" >&6
10503else 10057else
10504 eval "$as_ac_Header=\$ac_header_preproc" 10058 eval "$as_ac_Header=\$ac_header_preproc"
10505fi 10059fi
10506ac_res=`eval 'as_val=${'$as_ac_Header'} 10060ac_res=`eval echo '${'$as_ac_Header'}'`
10507 $as_echo "$as_val"'` 10061 { echo "$as_me:$LINENO: result: $ac_res" >&5
10508 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 10062echo "${ECHO_T}$ac_res" >&6; }
10509$as_echo "$ac_res" >&6; }
10510 10063
10511fi 10064fi
10512if test `eval 'as_val=${'$as_ac_Header'} 10065if test `eval echo '${'$as_ac_Header'}'` = yes; then
10513 $as_echo "$as_val"'` = yes; then
10514 cat >>confdefs.h <<_ACEOF 10066 cat >>confdefs.h <<_ACEOF
10515#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 10067#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10516_ACEOF 10068_ACEOF
10517 10069
10518fi 10070fi
@@ -10521,10 +10073,10 @@ done
10521 10073
10522else 10074else
10523 10075
10524 { $as_echo "$as_me:$LINENO: checking for dirname in -lgen" >&5 10076 { echo "$as_me:$LINENO: checking for dirname in -lgen" >&5
10525$as_echo_n "checking for dirname in -lgen... " >&6; } 10077echo $ECHO_N "checking for dirname in -lgen... $ECHO_C" >&6; }
10526if test "${ac_cv_lib_gen_dirname+set}" = set; then 10078if test "${ac_cv_lib_gen_dirname+set}" = set; then
10527 $as_echo_n "(cached) " >&6 10079 echo $ECHO_N "(cached) $ECHO_C" >&6
10528else 10080else
10529 ac_check_lib_save_LIBS=$LIBS 10081 ac_check_lib_save_LIBS=$LIBS
10530LIBS="-lgen $LIBS" 10082LIBS="-lgen $LIBS"
@@ -10556,42 +10108,38 @@ case "(($ac_try" in
10556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10557 *) ac_try_echo=$ac_try;; 10109 *) ac_try_echo=$ac_try;;
10558esac 10110esac
10559eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10560$as_echo "$ac_try_echo") >&5
10561 (eval "$ac_link") 2>conftest.er1 10112 (eval "$ac_link") 2>conftest.er1
10562 ac_status=$? 10113 ac_status=$?
10563 grep -v '^ *+' conftest.er1 >conftest.err 10114 grep -v '^ *+' conftest.er1 >conftest.err
10564 rm -f conftest.er1 10115 rm -f conftest.er1
10565 cat conftest.err >&5 10116 cat conftest.err >&5
10566 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10567 (exit $ac_status); } && { 10118 (exit $ac_status); } && {
10568 test -z "$ac_c_werror_flag" || 10119 test -z "$ac_c_werror_flag" ||
10569 test ! -s conftest.err 10120 test ! -s conftest.err
10570 } && test -s conftest$ac_exeext && { 10121 } && test -s conftest$ac_exeext &&
10571 test "$cross_compiling" = yes || 10122 $as_test_x conftest$ac_exeext; then
10572 $as_test_x conftest$ac_exeext
10573 }; then
10574 ac_cv_lib_gen_dirname=yes 10123 ac_cv_lib_gen_dirname=yes
10575else 10124else
10576 $as_echo "$as_me: failed program was:" >&5 10125 echo "$as_me: failed program was:" >&5
10577sed 's/^/| /' conftest.$ac_ext >&5 10126sed 's/^/| /' conftest.$ac_ext >&5
10578 10127
10579 ac_cv_lib_gen_dirname=no 10128 ac_cv_lib_gen_dirname=no
10580fi 10129fi
10581 10130
10582rm -rf conftest.dSYM
10583rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10131rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10584 conftest$ac_exeext conftest.$ac_ext 10132 conftest$ac_exeext conftest.$ac_ext
10585LIBS=$ac_check_lib_save_LIBS 10133LIBS=$ac_check_lib_save_LIBS
10586fi 10134fi
10587{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gen_dirname" >&5 10135{ echo "$as_me:$LINENO: result: $ac_cv_lib_gen_dirname" >&5
10588$as_echo "$ac_cv_lib_gen_dirname" >&6; } 10136echo "${ECHO_T}$ac_cv_lib_gen_dirname" >&6; }
10589if test $ac_cv_lib_gen_dirname = yes; then 10137if test $ac_cv_lib_gen_dirname = yes; then
10590 10138
10591 { $as_echo "$as_me:$LINENO: checking for broken dirname" >&5 10139 { echo "$as_me:$LINENO: checking for broken dirname" >&5
10592$as_echo_n "checking for broken dirname... " >&6; } 10140echo $ECHO_N "checking for broken dirname... $ECHO_C" >&6; }
10593if test "${ac_cv_have_broken_dirname+set}" = set; then 10141if test "${ac_cv_have_broken_dirname+set}" = set; then
10594 $as_echo_n "(cached) " >&6 10142 echo $ECHO_N "(cached) $ECHO_C" >&6
10595else 10143else
10596 10144
10597 save_LIBS="$LIBS" 10145 save_LIBS="$LIBS"
@@ -10628,32 +10176,29 @@ case "(($ac_try" in
10628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10629 *) ac_try_echo=$ac_try;; 10177 *) ac_try_echo=$ac_try;;
10630esac 10178esac
10631eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10632$as_echo "$ac_try_echo") >&5
10633 (eval "$ac_link") 2>&5 10180 (eval "$ac_link") 2>&5
10634 ac_status=$? 10181 ac_status=$?
10635 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10636 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 10183 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10637 { (case "(($ac_try" in 10184 { (case "(($ac_try" in
10638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10639 *) ac_try_echo=$ac_try;; 10186 *) ac_try_echo=$ac_try;;
10640esac 10187esac
10641eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10642$as_echo "$ac_try_echo") >&5
10643 (eval "$ac_try") 2>&5 10189 (eval "$ac_try") 2>&5
10644 ac_status=$? 10190 ac_status=$?
10645 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10646 (exit $ac_status); }; }; then 10192 (exit $ac_status); }; }; then
10647 ac_cv_have_broken_dirname="no" 10193 ac_cv_have_broken_dirname="no"
10648else 10194else
10649 $as_echo "$as_me: program exited with status $ac_status" >&5 10195 echo "$as_me: program exited with status $ac_status" >&5
10650$as_echo "$as_me: failed program was:" >&5 10196echo "$as_me: failed program was:" >&5
10651sed 's/^/| /' conftest.$ac_ext >&5 10197sed 's/^/| /' conftest.$ac_ext >&5
10652 10198
10653( exit $ac_status ) 10199( exit $ac_status )
10654 ac_cv_have_broken_dirname="yes" 10200 ac_cv_have_broken_dirname="yes"
10655fi 10201fi
10656rm -rf conftest.dSYM
10657rm -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
10658fi 10203fi
10659 10204
@@ -10661,8 +10206,8 @@ fi
10661 LIBS="$save_LIBS" 10206 LIBS="$save_LIBS"
10662 10207
10663fi 10208fi
10664{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_broken_dirname" >&5 10209{ echo "$as_me:$LINENO: result: $ac_cv_have_broken_dirname" >&5
10665$as_echo "$ac_cv_have_broken_dirname" >&6; } 10210echo "${ECHO_T}$ac_cv_have_broken_dirname" >&6; }
10666 if test "x$ac_cv_have_broken_dirname" = "xno" ; then 10211 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
10667 LIBS="$LIBS -lgen" 10212 LIBS="$LIBS -lgen"
10668 cat >>confdefs.h <<\_ACEOF 10213 cat >>confdefs.h <<\_ACEOF
@@ -10672,21 +10217,20 @@ _ACEOF
10672 10217
10673for ac_header in libgen.h 10218for ac_header in libgen.h
10674do 10219do
10675as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 10220as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10676if { 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
10677 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 10222 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10678$as_echo_n "checking for $ac_header... " >&6; } 10223echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10679if { 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
10680 $as_echo_n "(cached) " >&6 10225 echo $ECHO_N "(cached) $ECHO_C" >&6
10681fi 10226fi
10682ac_res=`eval 'as_val=${'$as_ac_Header'} 10227ac_res=`eval echo '${'$as_ac_Header'}'`
10683 $as_echo "$as_val"'` 10228 { echo "$as_me:$LINENO: result: $ac_res" >&5
10684 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 10229echo "${ECHO_T}$ac_res" >&6; }
10685$as_echo "$ac_res" >&6; }
10686else 10230else
10687 # Is the header compilable? 10231 # Is the header compilable?
10688{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 10232{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
10689$as_echo_n "checking $ac_header usability... " >&6; } 10233echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10690cat >conftest.$ac_ext <<_ACEOF 10234cat >conftest.$ac_ext <<_ACEOF
10691/* confdefs.h. */ 10235/* confdefs.h. */
10692_ACEOF 10236_ACEOF
@@ -10702,33 +10246,32 @@ case "(($ac_try" in
10702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10703 *) ac_try_echo=$ac_try;; 10247 *) ac_try_echo=$ac_try;;
10704esac 10248esac
10705eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10706$as_echo "$ac_try_echo") >&5
10707 (eval "$ac_compile") 2>conftest.er1 10250 (eval "$ac_compile") 2>conftest.er1
10708 ac_status=$? 10251 ac_status=$?
10709 grep -v '^ *+' conftest.er1 >conftest.err 10252 grep -v '^ *+' conftest.er1 >conftest.err
10710 rm -f conftest.er1 10253 rm -f conftest.er1
10711 cat conftest.err >&5 10254 cat conftest.err >&5
10712 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10713 (exit $ac_status); } && { 10256 (exit $ac_status); } && {
10714 test -z "$ac_c_werror_flag" || 10257 test -z "$ac_c_werror_flag" ||
10715 test ! -s conftest.err 10258 test ! -s conftest.err
10716 } && test -s conftest.$ac_objext; then 10259 } && test -s conftest.$ac_objext; then
10717 ac_header_compiler=yes 10260 ac_header_compiler=yes
10718else 10261else
10719 $as_echo "$as_me: failed program was:" >&5 10262 echo "$as_me: failed program was:" >&5
10720sed 's/^/| /' conftest.$ac_ext >&5 10263sed 's/^/| /' conftest.$ac_ext >&5
10721 10264
10722 ac_header_compiler=no 10265 ac_header_compiler=no
10723fi 10266fi
10724 10267
10725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10726{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 10269{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10727$as_echo "$ac_header_compiler" >&6; } 10270echo "${ECHO_T}$ac_header_compiler" >&6; }
10728 10271
10729# Is the header present? 10272# Is the header present?
10730{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 10273{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
10731$as_echo_n "checking $ac_header presence... " >&6; } 10274echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10732cat >conftest.$ac_ext <<_ACEOF 10275cat >conftest.$ac_ext <<_ACEOF
10733/* confdefs.h. */ 10276/* confdefs.h. */
10734_ACEOF 10277_ACEOF
@@ -10742,52 +10285,51 @@ case "(($ac_try" in
10742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10743 *) ac_try_echo=$ac_try;; 10286 *) ac_try_echo=$ac_try;;
10744esac 10287esac
10745eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10746$as_echo "$ac_try_echo") >&5
10747 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 10289 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10748 ac_status=$? 10290 ac_status=$?
10749 grep -v '^ *+' conftest.er1 >conftest.err 10291 grep -v '^ *+' conftest.er1 >conftest.err
10750 rm -f conftest.er1 10292 rm -f conftest.er1
10751 cat conftest.err >&5 10293 cat conftest.err >&5
10752 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10753 (exit $ac_status); } >/dev/null && { 10295 (exit $ac_status); } >/dev/null && {
10754 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 10296 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10755 test ! -s conftest.err 10297 test ! -s conftest.err
10756 }; then 10298 }; then
10757 ac_header_preproc=yes 10299 ac_header_preproc=yes
10758else 10300else
10759 $as_echo "$as_me: failed program was:" >&5 10301 echo "$as_me: failed program was:" >&5
10760sed 's/^/| /' conftest.$ac_ext >&5 10302sed 's/^/| /' conftest.$ac_ext >&5
10761 10303
10762 ac_header_preproc=no 10304 ac_header_preproc=no
10763fi 10305fi
10764 10306
10765rm -f conftest.err conftest.$ac_ext 10307rm -f conftest.err conftest.$ac_ext
10766{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 10308{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10767$as_echo "$ac_header_preproc" >&6; } 10309echo "${ECHO_T}$ac_header_preproc" >&6; }
10768 10310
10769# So? What about this header? 10311# So? What about this header?
10770case $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
10771 yes:no: ) 10313 yes:no: )
10772 { $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
10773$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;}
10774 { $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
10775$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;}
10776 ac_header_preproc=yes 10318 ac_header_preproc=yes
10777 ;; 10319 ;;
10778 no:yes:* ) 10320 no:yes:* )
10779 { $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
10780$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;}
10781 { $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
10782$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;}
10783 { $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
10784$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 10326echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10785 { $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
10786$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;}
10787 { $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
10788$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;}
10789 { $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
10790$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;}
10791 ( cat <<\_ASBOX 10333 ( cat <<\_ASBOX
10792## ------------------------------------------- ## 10334## ------------------------------------------- ##
10793## Report this to openssh-unix-dev@mindrot.org ## 10335## Report this to openssh-unix-dev@mindrot.org ##
@@ -10796,23 +10338,21 @@ _ASBOX
10796 ) | sed "s/^/$as_me: WARNING: /" >&2 10338 ) | sed "s/^/$as_me: WARNING: /" >&2
10797 ;; 10339 ;;
10798esac 10340esac
10799{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 10341{ echo "$as_me:$LINENO: checking for $ac_header" >&5
10800$as_echo_n "checking for $ac_header... " >&6; } 10342echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10801if { 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
10802 $as_echo_n "(cached) " >&6 10344 echo $ECHO_N "(cached) $ECHO_C" >&6
10803else 10345else
10804 eval "$as_ac_Header=\$ac_header_preproc" 10346 eval "$as_ac_Header=\$ac_header_preproc"
10805fi 10347fi
10806ac_res=`eval 'as_val=${'$as_ac_Header'} 10348ac_res=`eval echo '${'$as_ac_Header'}'`
10807 $as_echo "$as_val"'` 10349 { echo "$as_me:$LINENO: result: $ac_res" >&5
10808 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 10350echo "${ECHO_T}$ac_res" >&6; }
10809$as_echo "$ac_res" >&6; }
10810 10351
10811fi 10352fi
10812if test `eval 'as_val=${'$as_ac_Header'} 10353if test `eval echo '${'$as_ac_Header'}'` = yes; then
10813 $as_echo "$as_val"'` = yes; then
10814 cat >>confdefs.h <<_ACEOF 10354 cat >>confdefs.h <<_ACEOF
10815#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 10355#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10816_ACEOF 10356_ACEOF
10817 10357
10818fi 10358fi
@@ -10828,10 +10368,10 @@ fi
10828done 10368done
10829 10369
10830 10370
10831{ $as_echo "$as_me:$LINENO: checking for getspnam" >&5 10371{ echo "$as_me:$LINENO: checking for getspnam" >&5
10832$as_echo_n "checking for getspnam... " >&6; } 10372echo $ECHO_N "checking for getspnam... $ECHO_C" >&6; }
10833if test "${ac_cv_func_getspnam+set}" = set; then 10373if test "${ac_cv_func_getspnam+set}" = set; then
10834 $as_echo_n "(cached) " >&6 10374 echo $ECHO_N "(cached) $ECHO_C" >&6
10835else 10375else
10836 cat >conftest.$ac_ext <<_ACEOF 10376 cat >conftest.$ac_ext <<_ACEOF
10837/* confdefs.h. */ 10377/* confdefs.h. */
@@ -10884,42 +10424,38 @@ case "(($ac_try" in
10884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10885 *) ac_try_echo=$ac_try;; 10425 *) ac_try_echo=$ac_try;;
10886esac 10426esac
10887eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10888$as_echo "$ac_try_echo") >&5
10889 (eval "$ac_link") 2>conftest.er1 10428 (eval "$ac_link") 2>conftest.er1
10890 ac_status=$? 10429 ac_status=$?
10891 grep -v '^ *+' conftest.er1 >conftest.err 10430 grep -v '^ *+' conftest.er1 >conftest.err
10892 rm -f conftest.er1 10431 rm -f conftest.er1
10893 cat conftest.err >&5 10432 cat conftest.err >&5
10894 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10895 (exit $ac_status); } && { 10434 (exit $ac_status); } && {
10896 test -z "$ac_c_werror_flag" || 10435 test -z "$ac_c_werror_flag" ||
10897 test ! -s conftest.err 10436 test ! -s conftest.err
10898 } && test -s conftest$ac_exeext && { 10437 } && test -s conftest$ac_exeext &&
10899 test "$cross_compiling" = yes || 10438 $as_test_x conftest$ac_exeext; then
10900 $as_test_x conftest$ac_exeext
10901 }; then
10902 ac_cv_func_getspnam=yes 10439 ac_cv_func_getspnam=yes
10903else 10440else
10904 $as_echo "$as_me: failed program was:" >&5 10441 echo "$as_me: failed program was:" >&5
10905sed 's/^/| /' conftest.$ac_ext >&5 10442sed 's/^/| /' conftest.$ac_ext >&5
10906 10443
10907 ac_cv_func_getspnam=no 10444 ac_cv_func_getspnam=no
10908fi 10445fi
10909 10446
10910rm -rf conftest.dSYM
10911rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10447rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10912 conftest$ac_exeext conftest.$ac_ext 10448 conftest$ac_exeext conftest.$ac_ext
10913fi 10449fi
10914{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getspnam" >&5 10450{ echo "$as_me:$LINENO: result: $ac_cv_func_getspnam" >&5
10915$as_echo "$ac_cv_func_getspnam" >&6; } 10451echo "${ECHO_T}$ac_cv_func_getspnam" >&6; }
10916if test $ac_cv_func_getspnam = yes; then 10452if test $ac_cv_func_getspnam = yes; then
10917 : 10453 :
10918else 10454else
10919 { $as_echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5 10455 { echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
10920$as_echo_n "checking for getspnam in -lgen... " >&6; } 10456echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6; }
10921if test "${ac_cv_lib_gen_getspnam+set}" = set; then 10457if test "${ac_cv_lib_gen_getspnam+set}" = set; then
10922 $as_echo_n "(cached) " >&6 10458 echo $ECHO_N "(cached) $ECHO_C" >&6
10923else 10459else
10924 ac_check_lib_save_LIBS=$LIBS 10460 ac_check_lib_save_LIBS=$LIBS
10925LIBS="-lgen $LIBS" 10461LIBS="-lgen $LIBS"
@@ -10951,46 +10487,42 @@ case "(($ac_try" in
10951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10952 *) ac_try_echo=$ac_try;; 10488 *) ac_try_echo=$ac_try;;
10953esac 10489esac
10954eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10955$as_echo "$ac_try_echo") >&5
10956 (eval "$ac_link") 2>conftest.er1 10491 (eval "$ac_link") 2>conftest.er1
10957 ac_status=$? 10492 ac_status=$?
10958 grep -v '^ *+' conftest.er1 >conftest.err 10493 grep -v '^ *+' conftest.er1 >conftest.err
10959 rm -f conftest.er1 10494 rm -f conftest.er1
10960 cat conftest.err >&5 10495 cat conftest.err >&5
10961 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10962 (exit $ac_status); } && { 10497 (exit $ac_status); } && {
10963 test -z "$ac_c_werror_flag" || 10498 test -z "$ac_c_werror_flag" ||
10964 test ! -s conftest.err 10499 test ! -s conftest.err
10965 } && test -s conftest$ac_exeext && { 10500 } && test -s conftest$ac_exeext &&
10966 test "$cross_compiling" = yes || 10501 $as_test_x conftest$ac_exeext; then
10967 $as_test_x conftest$ac_exeext
10968 }; then
10969 ac_cv_lib_gen_getspnam=yes 10502 ac_cv_lib_gen_getspnam=yes
10970else 10503else
10971 $as_echo "$as_me: failed program was:" >&5 10504 echo "$as_me: failed program was:" >&5
10972sed 's/^/| /' conftest.$ac_ext >&5 10505sed 's/^/| /' conftest.$ac_ext >&5
10973 10506
10974 ac_cv_lib_gen_getspnam=no 10507 ac_cv_lib_gen_getspnam=no
10975fi 10508fi
10976 10509
10977rm -rf conftest.dSYM
10978rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10510rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10979 conftest$ac_exeext conftest.$ac_ext 10511 conftest$ac_exeext conftest.$ac_ext
10980LIBS=$ac_check_lib_save_LIBS 10512LIBS=$ac_check_lib_save_LIBS
10981fi 10513fi
10982{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5 10514{ echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
10983$as_echo "$ac_cv_lib_gen_getspnam" >&6; } 10515echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6; }
10984if test $ac_cv_lib_gen_getspnam = yes; then 10516if test $ac_cv_lib_gen_getspnam = yes; then
10985 LIBS="$LIBS -lgen" 10517 LIBS="$LIBS -lgen"
10986fi 10518fi
10987 10519
10988fi 10520fi
10989 10521
10990{ $as_echo "$as_me:$LINENO: checking for library containing basename" >&5 10522{ echo "$as_me:$LINENO: checking for library containing basename" >&5
10991$as_echo_n "checking for library containing basename... " >&6; } 10523echo $ECHO_N "checking for library containing basename... $ECHO_C" >&6; }
10992if test "${ac_cv_search_basename+set}" = set; then 10524if test "${ac_cv_search_basename+set}" = set; then
10993 $as_echo_n "(cached) " >&6 10525 echo $ECHO_N "(cached) $ECHO_C" >&6
10994else 10526else
10995 ac_func_search_save_LIBS=$LIBS 10527 ac_func_search_save_LIBS=$LIBS
10996cat >conftest.$ac_ext <<_ACEOF 10528cat >conftest.$ac_ext <<_ACEOF
@@ -11028,30 +10560,26 @@ case "(($ac_try" in
11028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11029 *) ac_try_echo=$ac_try;; 10561 *) ac_try_echo=$ac_try;;
11030esac 10562esac
11031eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11032$as_echo "$ac_try_echo") >&5
11033 (eval "$ac_link") 2>conftest.er1 10564 (eval "$ac_link") 2>conftest.er1
11034 ac_status=$? 10565 ac_status=$?
11035 grep -v '^ *+' conftest.er1 >conftest.err 10566 grep -v '^ *+' conftest.er1 >conftest.err
11036 rm -f conftest.er1 10567 rm -f conftest.er1
11037 cat conftest.err >&5 10568 cat conftest.err >&5
11038 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11039 (exit $ac_status); } && { 10570 (exit $ac_status); } && {
11040 test -z "$ac_c_werror_flag" || 10571 test -z "$ac_c_werror_flag" ||
11041 test ! -s conftest.err 10572 test ! -s conftest.err
11042 } && test -s conftest$ac_exeext && { 10573 } && test -s conftest$ac_exeext &&
11043 test "$cross_compiling" = yes || 10574 $as_test_x conftest$ac_exeext; then
11044 $as_test_x conftest$ac_exeext
11045 }; then
11046 ac_cv_search_basename=$ac_res 10575 ac_cv_search_basename=$ac_res
11047else 10576else
11048 $as_echo "$as_me: failed program was:" >&5 10577 echo "$as_me: failed program was:" >&5
11049sed 's/^/| /' conftest.$ac_ext >&5 10578sed 's/^/| /' conftest.$ac_ext >&5
11050 10579
11051 10580
11052fi 10581fi
11053 10582
11054rm -rf conftest.dSYM
11055rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10583rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11056 conftest$ac_exeext 10584 conftest$ac_exeext
11057 if test "${ac_cv_search_basename+set}" = set; then 10585 if test "${ac_cv_search_basename+set}" = set; then
@@ -11066,8 +10594,8 @@ fi
11066rm conftest.$ac_ext 10594rm conftest.$ac_ext
11067LIBS=$ac_func_search_save_LIBS 10595LIBS=$ac_func_search_save_LIBS
11068fi 10596fi
11069{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_basename" >&5 10597{ echo "$as_me:$LINENO: result: $ac_cv_search_basename" >&5
11070$as_echo "$ac_cv_search_basename" >&6; } 10598echo "${ECHO_T}$ac_cv_search_basename" >&6; }
11071ac_res=$ac_cv_search_basename 10599ac_res=$ac_cv_search_basename
11072if test "$ac_res" != no; then 10600if test "$ac_res" != no; then
11073 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 10601 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
@@ -11083,8 +10611,8 @@ fi
11083# Check whether --with-zlib was given. 10611# Check whether --with-zlib was given.
11084if test "${with_zlib+set}" = set; then 10612if test "${with_zlib+set}" = set; then
11085 withval=$with_zlib; if test "x$withval" = "xno" ; then 10613 withval=$with_zlib; if test "x$withval" = "xno" ; then
11086 { { $as_echo "$as_me:$LINENO: error: *** zlib is required ***" >&5 10614 { { echo "$as_me:$LINENO: error: *** zlib is required ***" >&5
11087$as_echo "$as_me: error: *** zlib is required ***" >&2;} 10615echo "$as_me: error: *** zlib is required ***" >&2;}
11088 { (exit 1); exit 1; }; } 10616 { (exit 1); exit 1; }; }
11089 elif test "x$withval" != "xyes"; then 10617 elif test "x$withval" != "xyes"; then
11090 if test -d "$withval/lib"; then 10618 if test -d "$withval/lib"; then
@@ -11111,17 +10639,17 @@ fi
11111 10639
11112 10640
11113if test "${ac_cv_header_zlib_h+set}" = set; then 10641if test "${ac_cv_header_zlib_h+set}" = set; then
11114 { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5 10642 { echo "$as_me:$LINENO: checking for zlib.h" >&5
11115$as_echo_n "checking for zlib.h... " >&6; } 10643echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
11116if test "${ac_cv_header_zlib_h+set}" = set; then 10644if test "${ac_cv_header_zlib_h+set}" = set; then
11117 $as_echo_n "(cached) " >&6 10645 echo $ECHO_N "(cached) $ECHO_C" >&6
11118fi 10646fi
11119{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 10647{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
11120$as_echo "$ac_cv_header_zlib_h" >&6; } 10648echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
11121else 10649else
11122 # Is the header compilable? 10650 # Is the header compilable?
11123{ $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5 10651{ echo "$as_me:$LINENO: checking zlib.h usability" >&5
11124$as_echo_n "checking zlib.h usability... " >&6; } 10652echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; }
11125cat >conftest.$ac_ext <<_ACEOF 10653cat >conftest.$ac_ext <<_ACEOF
11126/* confdefs.h. */ 10654/* confdefs.h. */
11127_ACEOF 10655_ACEOF
@@ -11137,33 +10665,32 @@ case "(($ac_try" in
11137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11138 *) ac_try_echo=$ac_try;; 10666 *) ac_try_echo=$ac_try;;
11139esac 10667esac
11140eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11141$as_echo "$ac_try_echo") >&5
11142 (eval "$ac_compile") 2>conftest.er1 10669 (eval "$ac_compile") 2>conftest.er1
11143 ac_status=$? 10670 ac_status=$?
11144 grep -v '^ *+' conftest.er1 >conftest.err 10671 grep -v '^ *+' conftest.er1 >conftest.err
11145 rm -f conftest.er1 10672 rm -f conftest.er1
11146 cat conftest.err >&5 10673 cat conftest.err >&5
11147 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11148 (exit $ac_status); } && { 10675 (exit $ac_status); } && {
11149 test -z "$ac_c_werror_flag" || 10676 test -z "$ac_c_werror_flag" ||
11150 test ! -s conftest.err 10677 test ! -s conftest.err
11151 } && test -s conftest.$ac_objext; then 10678 } && test -s conftest.$ac_objext; then
11152 ac_header_compiler=yes 10679 ac_header_compiler=yes
11153else 10680else
11154 $as_echo "$as_me: failed program was:" >&5 10681 echo "$as_me: failed program was:" >&5
11155sed 's/^/| /' conftest.$ac_ext >&5 10682sed 's/^/| /' conftest.$ac_ext >&5
11156 10683
11157 ac_header_compiler=no 10684 ac_header_compiler=no
11158fi 10685fi
11159 10686
11160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11161{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 10688{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11162$as_echo "$ac_header_compiler" >&6; } 10689echo "${ECHO_T}$ac_header_compiler" >&6; }
11163 10690
11164# Is the header present? 10691# Is the header present?
11165{ $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5 10692{ echo "$as_me:$LINENO: checking zlib.h presence" >&5
11166$as_echo_n "checking zlib.h presence... " >&6; } 10693echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; }
11167cat >conftest.$ac_ext <<_ACEOF 10694cat >conftest.$ac_ext <<_ACEOF
11168/* confdefs.h. */ 10695/* confdefs.h. */
11169_ACEOF 10696_ACEOF
@@ -11177,52 +10704,51 @@ case "(($ac_try" in
11177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11178 *) ac_try_echo=$ac_try;; 10705 *) ac_try_echo=$ac_try;;
11179esac 10706esac
11180eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11181$as_echo "$ac_try_echo") >&5
11182 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 10708 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11183 ac_status=$? 10709 ac_status=$?
11184 grep -v '^ *+' conftest.er1 >conftest.err 10710 grep -v '^ *+' conftest.er1 >conftest.err
11185 rm -f conftest.er1 10711 rm -f conftest.er1
11186 cat conftest.err >&5 10712 cat conftest.err >&5
11187 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11188 (exit $ac_status); } >/dev/null && { 10714 (exit $ac_status); } >/dev/null && {
11189 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 10715 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11190 test ! -s conftest.err 10716 test ! -s conftest.err
11191 }; then 10717 }; then
11192 ac_header_preproc=yes 10718 ac_header_preproc=yes
11193else 10719else
11194 $as_echo "$as_me: failed program was:" >&5 10720 echo "$as_me: failed program was:" >&5
11195sed 's/^/| /' conftest.$ac_ext >&5 10721sed 's/^/| /' conftest.$ac_ext >&5
11196 10722
11197 ac_header_preproc=no 10723 ac_header_preproc=no
11198fi 10724fi
11199 10725
11200rm -f conftest.err conftest.$ac_ext 10726rm -f conftest.err conftest.$ac_ext
11201{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 10727{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11202$as_echo "$ac_header_preproc" >&6; } 10728echo "${ECHO_T}$ac_header_preproc" >&6; }
11203 10729
11204# So? What about this header? 10730# So? What about this header?
11205case $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
11206 yes:no: ) 10732 yes:no: )
11207 { $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
11208$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;}
11209 { $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
11210$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;}
11211 ac_header_preproc=yes 10737 ac_header_preproc=yes
11212 ;; 10738 ;;
11213 no:yes:* ) 10739 no:yes:* )
11214 { $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
11215$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;}
11216 { $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
11217$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;}
11218 { $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
11219$as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} 10745echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
11220 { $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
11221$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;}
11222 { $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
11223$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;}
11224 { $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
11225$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;}
11226 ( cat <<\_ASBOX 10752 ( cat <<\_ASBOX
11227## ------------------------------------------- ## 10753## ------------------------------------------- ##
11228## Report this to openssh-unix-dev@mindrot.org ## 10754## Report this to openssh-unix-dev@mindrot.org ##
@@ -11231,31 +10757,31 @@ _ASBOX
11231 ) | sed "s/^/$as_me: WARNING: /" >&2 10757 ) | sed "s/^/$as_me: WARNING: /" >&2
11232 ;; 10758 ;;
11233esac 10759esac
11234{ $as_echo "$as_me:$LINENO: checking for zlib.h" >&5 10760{ echo "$as_me:$LINENO: checking for zlib.h" >&5
11235$as_echo_n "checking for zlib.h... " >&6; } 10761echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
11236if test "${ac_cv_header_zlib_h+set}" = set; then 10762if test "${ac_cv_header_zlib_h+set}" = set; then
11237 $as_echo_n "(cached) " >&6 10763 echo $ECHO_N "(cached) $ECHO_C" >&6
11238else 10764else
11239 ac_cv_header_zlib_h=$ac_header_preproc 10765 ac_cv_header_zlib_h=$ac_header_preproc
11240fi 10766fi
11241{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 10767{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
11242$as_echo "$ac_cv_header_zlib_h" >&6; } 10768echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
11243 10769
11244fi 10770fi
11245if test $ac_cv_header_zlib_h = yes; then 10771if test $ac_cv_header_zlib_h = yes; then
11246 : 10772 :
11247else 10773else
11248 { { $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
11249$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;}
11250 { (exit 1); exit 1; }; } 10776 { (exit 1); exit 1; }; }
11251fi 10777fi
11252 10778
11253 10779
11254 10780
11255{ $as_echo "$as_me:$LINENO: checking for deflate in -lz" >&5 10781{ echo "$as_me:$LINENO: checking for deflate in -lz" >&5
11256$as_echo_n "checking for deflate in -lz... " >&6; } 10782echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6; }
11257if test "${ac_cv_lib_z_deflate+set}" = set; then 10783if test "${ac_cv_lib_z_deflate+set}" = set; then
11258 $as_echo_n "(cached) " >&6 10784 echo $ECHO_N "(cached) $ECHO_C" >&6
11259else 10785else
11260 ac_check_lib_save_LIBS=$LIBS 10786 ac_check_lib_save_LIBS=$LIBS
11261LIBS="-lz $LIBS" 10787LIBS="-lz $LIBS"
@@ -11287,36 +10813,32 @@ case "(($ac_try" in
11287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11288 *) ac_try_echo=$ac_try;; 10814 *) ac_try_echo=$ac_try;;
11289esac 10815esac
11290eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11291$as_echo "$ac_try_echo") >&5
11292 (eval "$ac_link") 2>conftest.er1 10817 (eval "$ac_link") 2>conftest.er1
11293 ac_status=$? 10818 ac_status=$?
11294 grep -v '^ *+' conftest.er1 >conftest.err 10819 grep -v '^ *+' conftest.er1 >conftest.err
11295 rm -f conftest.er1 10820 rm -f conftest.er1
11296 cat conftest.err >&5 10821 cat conftest.err >&5
11297 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11298 (exit $ac_status); } && { 10823 (exit $ac_status); } && {
11299 test -z "$ac_c_werror_flag" || 10824 test -z "$ac_c_werror_flag" ||
11300 test ! -s conftest.err 10825 test ! -s conftest.err
11301 } && test -s conftest$ac_exeext && { 10826 } && test -s conftest$ac_exeext &&
11302 test "$cross_compiling" = yes || 10827 $as_test_x conftest$ac_exeext; then
11303 $as_test_x conftest$ac_exeext
11304 }; then
11305 ac_cv_lib_z_deflate=yes 10828 ac_cv_lib_z_deflate=yes
11306else 10829else
11307 $as_echo "$as_me: failed program was:" >&5 10830 echo "$as_me: failed program was:" >&5
11308sed 's/^/| /' conftest.$ac_ext >&5 10831sed 's/^/| /' conftest.$ac_ext >&5
11309 10832
11310 ac_cv_lib_z_deflate=no 10833 ac_cv_lib_z_deflate=no
11311fi 10834fi
11312 10835
11313rm -rf conftest.dSYM
11314rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10836rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11315 conftest$ac_exeext conftest.$ac_ext 10837 conftest$ac_exeext conftest.$ac_ext
11316LIBS=$ac_check_lib_save_LIBS 10838LIBS=$ac_check_lib_save_LIBS
11317fi 10839fi
11318{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5 10840{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5
11319$as_echo "$ac_cv_lib_z_deflate" >&6; } 10841echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6; }
11320if test $ac_cv_lib_z_deflate = yes; then 10842if test $ac_cv_lib_z_deflate = yes; then
11321 cat >>confdefs.h <<_ACEOF 10843 cat >>confdefs.h <<_ACEOF
11322#define HAVE_LIBZ 1 10844#define HAVE_LIBZ 1
@@ -11364,38 +10886,34 @@ case "(($ac_try" in
11364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11365 *) ac_try_echo=$ac_try;; 10887 *) ac_try_echo=$ac_try;;
11366esac 10888esac
11367eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11368$as_echo "$ac_try_echo") >&5
11369 (eval "$ac_link") 2>conftest.er1 10890 (eval "$ac_link") 2>conftest.er1
11370 ac_status=$? 10891 ac_status=$?
11371 grep -v '^ *+' conftest.er1 >conftest.err 10892 grep -v '^ *+' conftest.er1 >conftest.err
11372 rm -f conftest.er1 10893 rm -f conftest.er1
11373 cat conftest.err >&5 10894 cat conftest.err >&5
11374 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11375 (exit $ac_status); } && { 10896 (exit $ac_status); } && {
11376 test -z "$ac_c_werror_flag" || 10897 test -z "$ac_c_werror_flag" ||
11377 test ! -s conftest.err 10898 test ! -s conftest.err
11378 } && test -s conftest$ac_exeext && { 10899 } && test -s conftest$ac_exeext &&
11379 test "$cross_compiling" = yes || 10900 $as_test_x conftest$ac_exeext; then
11380 $as_test_x conftest$ac_exeext
11381 }; then
11382 cat >>confdefs.h <<\_ACEOF 10901 cat >>confdefs.h <<\_ACEOF
11383#define HAVE_LIBZ 1 10902#define HAVE_LIBZ 1
11384_ACEOF 10903_ACEOF
11385 10904
11386else 10905else
11387 $as_echo "$as_me: failed program was:" >&5 10906 echo "$as_me: failed program was:" >&5
11388sed 's/^/| /' conftest.$ac_ext >&5 10907sed 's/^/| /' conftest.$ac_ext >&5
11389 10908
11390 10909
11391 { { $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
11392$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;}
11393 { (exit 1); exit 1; }; } 10912 { (exit 1); exit 1; }; }
11394 10913
11395 10914
11396fi 10915fi
11397 10916
11398rm -rf conftest.dSYM
11399rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10917rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11400 conftest$ac_exeext conftest.$ac_ext 10918 conftest$ac_exeext conftest.$ac_ext
11401 10919
@@ -11414,11 +10932,11 @@ if test "${with_zlib_version_check+set}" = set; then
11414fi 10932fi
11415 10933
11416 10934
11417{ $as_echo "$as_me:$LINENO: checking for possibly buggy zlib" >&5 10935{ echo "$as_me:$LINENO: checking for possibly buggy zlib" >&5
11418$as_echo_n "checking for possibly buggy zlib... " >&6; } 10936echo $ECHO_N "checking for possibly buggy zlib... $ECHO_C" >&6; }
11419if test "$cross_compiling" = yes; then 10937if test "$cross_compiling" = yes; then
11420 { $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
11421$as_echo "$as_me: WARNING: cross compiling: not checking zlib version" >&2;} 10939echo "$as_me: WARNING: cross compiling: not checking zlib version" >&2;}
11422 10940
11423else 10941else
11424 cat >conftest.$ac_ext <<_ACEOF 10942 cat >conftest.$ac_ext <<_ACEOF
@@ -11457,41 +10975,39 @@ case "(($ac_try" in
11457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11458 *) ac_try_echo=$ac_try;; 10976 *) ac_try_echo=$ac_try;;
11459esac 10977esac
11460eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11461$as_echo "$ac_try_echo") >&5
11462 (eval "$ac_link") 2>&5 10979 (eval "$ac_link") 2>&5
11463 ac_status=$? 10980 ac_status=$?
11464 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11465 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 10982 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11466 { (case "(($ac_try" in 10983 { (case "(($ac_try" in
11467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 10984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11468 *) ac_try_echo=$ac_try;; 10985 *) ac_try_echo=$ac_try;;
11469esac 10986esac
11470eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 10987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11471$as_echo "$ac_try_echo") >&5
11472 (eval "$ac_try") 2>&5 10988 (eval "$ac_try") 2>&5
11473 ac_status=$? 10989 ac_status=$?
11474 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 10990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11475 (exit $ac_status); }; }; then 10991 (exit $ac_status); }; }; then
11476 { $as_echo "$as_me:$LINENO: result: no" >&5 10992 { echo "$as_me:$LINENO: result: no" >&5
11477$as_echo "no" >&6; } 10993echo "${ECHO_T}no" >&6; }
11478else 10994else
11479 $as_echo "$as_me: program exited with status $ac_status" >&5 10995 echo "$as_me: program exited with status $ac_status" >&5
11480$as_echo "$as_me: failed program was:" >&5 10996echo "$as_me: failed program was:" >&5
11481sed 's/^/| /' conftest.$ac_ext >&5 10997sed 's/^/| /' conftest.$ac_ext >&5
11482 10998
11483( exit $ac_status ) 10999( exit $ac_status )
11484 { $as_echo "$as_me:$LINENO: result: yes" >&5 11000 { echo "$as_me:$LINENO: result: yes" >&5
11485$as_echo "yes" >&6; } 11001echo "${ECHO_T}yes" >&6; }
11486 if test -z "$zlib_check_nonfatal" ; then 11002 if test -z "$zlib_check_nonfatal" ; then
11487 { { $as_echo "$as_me:$LINENO: error: *** zlib too old - check config.log *** 11003 { { echo "$as_me:$LINENO: error: *** zlib too old - check config.log ***
11488Your reported zlib version has known security problems. It's possible your 11004Your reported zlib version has known security problems. It's possible your
11489vendor has fixed these problems without changing the version number. If you 11005vendor has fixed these problems without changing the version number. If you
11490are 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
11491\"./configure --without-zlib-version-check\". 11007\"./configure --without-zlib-version-check\".
11492If 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.
11493See http://www.gzip.org/zlib/ for details." >&5 11009See http://www.gzip.org/zlib/ for details." >&5
11494$as_echo "$as_me: error: *** zlib too old - check config.log *** 11010echo "$as_me: error: *** zlib too old - check config.log ***
11495Your reported zlib version has known security problems. It's possible your 11011Your reported zlib version has known security problems. It's possible your
11496vendor has fixed these problems without changing the version number. If you 11012vendor has fixed these problems without changing the version number. If you
11497are 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
@@ -11500,21 +11016,20 @@ If you are in doubt, upgrade zlib to version 1.2.3 or greater.
11500See http://www.gzip.org/zlib/ for details." >&2;} 11016See http://www.gzip.org/zlib/ for details." >&2;}
11501 { (exit 1); exit 1; }; } 11017 { (exit 1); exit 1; }; }
11502 else 11018 else
11503 { $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
11504$as_echo "$as_me: WARNING: zlib version may have security problems" >&2;} 11020echo "$as_me: WARNING: zlib version may have security problems" >&2;}
11505 fi 11021 fi
11506 11022
11507fi 11023fi
11508rm -rf conftest.dSYM
11509rm -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
11510fi 11025fi
11511 11026
11512 11027
11513 11028
11514{ $as_echo "$as_me:$LINENO: checking for strcasecmp" >&5 11029{ echo "$as_me:$LINENO: checking for strcasecmp" >&5
11515$as_echo_n "checking for strcasecmp... " >&6; } 11030echo $ECHO_N "checking for strcasecmp... $ECHO_C" >&6; }
11516if test "${ac_cv_func_strcasecmp+set}" = set; then 11031if test "${ac_cv_func_strcasecmp+set}" = set; then
11517 $as_echo_n "(cached) " >&6 11032 echo $ECHO_N "(cached) $ECHO_C" >&6
11518else 11033else
11519 cat >conftest.$ac_ext <<_ACEOF 11034 cat >conftest.$ac_ext <<_ACEOF
11520/* confdefs.h. */ 11035/* confdefs.h. */
@@ -11567,42 +11082,38 @@ case "(($ac_try" in
11567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11568 *) ac_try_echo=$ac_try;; 11083 *) ac_try_echo=$ac_try;;
11569esac 11084esac
11570eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11571$as_echo "$ac_try_echo") >&5
11572 (eval "$ac_link") 2>conftest.er1 11086 (eval "$ac_link") 2>conftest.er1
11573 ac_status=$? 11087 ac_status=$?
11574 grep -v '^ *+' conftest.er1 >conftest.err 11088 grep -v '^ *+' conftest.er1 >conftest.err
11575 rm -f conftest.er1 11089 rm -f conftest.er1
11576 cat conftest.err >&5 11090 cat conftest.err >&5
11577 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11578 (exit $ac_status); } && { 11092 (exit $ac_status); } && {
11579 test -z "$ac_c_werror_flag" || 11093 test -z "$ac_c_werror_flag" ||
11580 test ! -s conftest.err 11094 test ! -s conftest.err
11581 } && test -s conftest$ac_exeext && { 11095 } && test -s conftest$ac_exeext &&
11582 test "$cross_compiling" = yes || 11096 $as_test_x conftest$ac_exeext; then
11583 $as_test_x conftest$ac_exeext
11584 }; then
11585 ac_cv_func_strcasecmp=yes 11097 ac_cv_func_strcasecmp=yes
11586else 11098else
11587 $as_echo "$as_me: failed program was:" >&5 11099 echo "$as_me: failed program was:" >&5
11588sed 's/^/| /' conftest.$ac_ext >&5 11100sed 's/^/| /' conftest.$ac_ext >&5
11589 11101
11590 ac_cv_func_strcasecmp=no 11102 ac_cv_func_strcasecmp=no
11591fi 11103fi
11592 11104
11593rm -rf conftest.dSYM
11594rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 11105rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11595 conftest$ac_exeext conftest.$ac_ext 11106 conftest$ac_exeext conftest.$ac_ext
11596fi 11107fi
11597{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_strcasecmp" >&5 11108{ echo "$as_me:$LINENO: result: $ac_cv_func_strcasecmp" >&5
11598$as_echo "$ac_cv_func_strcasecmp" >&6; } 11109echo "${ECHO_T}$ac_cv_func_strcasecmp" >&6; }
11599if test $ac_cv_func_strcasecmp = yes; then 11110if test $ac_cv_func_strcasecmp = yes; then
11600 : 11111 :
11601else 11112else
11602 { $as_echo "$as_me:$LINENO: checking for strcasecmp in -lresolv" >&5 11113 { echo "$as_me:$LINENO: checking for strcasecmp in -lresolv" >&5
11603$as_echo_n "checking for strcasecmp in -lresolv... " >&6; } 11114echo $ECHO_N "checking for strcasecmp in -lresolv... $ECHO_C" >&6; }
11604if test "${ac_cv_lib_resolv_strcasecmp+set}" = set; then 11115if test "${ac_cv_lib_resolv_strcasecmp+set}" = set; then
11605 $as_echo_n "(cached) " >&6 11116 echo $ECHO_N "(cached) $ECHO_C" >&6
11606else 11117else
11607 ac_check_lib_save_LIBS=$LIBS 11118 ac_check_lib_save_LIBS=$LIBS
11608LIBS="-lresolv $LIBS" 11119LIBS="-lresolv $LIBS"
@@ -11634,36 +11145,32 @@ case "(($ac_try" in
11634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11635 *) ac_try_echo=$ac_try;; 11146 *) ac_try_echo=$ac_try;;
11636esac 11147esac
11637eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11638$as_echo "$ac_try_echo") >&5
11639 (eval "$ac_link") 2>conftest.er1 11149 (eval "$ac_link") 2>conftest.er1
11640 ac_status=$? 11150 ac_status=$?
11641 grep -v '^ *+' conftest.er1 >conftest.err 11151 grep -v '^ *+' conftest.er1 >conftest.err
11642 rm -f conftest.er1 11152 rm -f conftest.er1
11643 cat conftest.err >&5 11153 cat conftest.err >&5
11644 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11645 (exit $ac_status); } && { 11155 (exit $ac_status); } && {
11646 test -z "$ac_c_werror_flag" || 11156 test -z "$ac_c_werror_flag" ||
11647 test ! -s conftest.err 11157 test ! -s conftest.err
11648 } && test -s conftest$ac_exeext && { 11158 } && test -s conftest$ac_exeext &&
11649 test "$cross_compiling" = yes || 11159 $as_test_x conftest$ac_exeext; then
11650 $as_test_x conftest$ac_exeext
11651 }; then
11652 ac_cv_lib_resolv_strcasecmp=yes 11160 ac_cv_lib_resolv_strcasecmp=yes
11653else 11161else
11654 $as_echo "$as_me: failed program was:" >&5 11162 echo "$as_me: failed program was:" >&5
11655sed 's/^/| /' conftest.$ac_ext >&5 11163sed 's/^/| /' conftest.$ac_ext >&5
11656 11164
11657 ac_cv_lib_resolv_strcasecmp=no 11165 ac_cv_lib_resolv_strcasecmp=no
11658fi 11166fi
11659 11167
11660rm -rf conftest.dSYM
11661rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 11168rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11662 conftest$ac_exeext conftest.$ac_ext 11169 conftest$ac_exeext conftest.$ac_ext
11663LIBS=$ac_check_lib_save_LIBS 11170LIBS=$ac_check_lib_save_LIBS
11664fi 11171fi
11665{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_strcasecmp" >&5 11172{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_strcasecmp" >&5
11666$as_echo "$ac_cv_lib_resolv_strcasecmp" >&6; } 11173echo "${ECHO_T}$ac_cv_lib_resolv_strcasecmp" >&6; }
11667if test $ac_cv_lib_resolv_strcasecmp = yes; then 11174if test $ac_cv_lib_resolv_strcasecmp = yes; then
11668 LIBS="$LIBS -lresolv" 11175 LIBS="$LIBS -lresolv"
11669fi 11176fi
@@ -11674,11 +11181,11 @@ fi
11674 11181
11675for ac_func in utimes 11182for ac_func in utimes
11676do 11183do
11677as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 11184as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11678{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 11185{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11679$as_echo_n "checking for $ac_func... " >&6; } 11186echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11680if { 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
11681 $as_echo_n "(cached) " >&6 11188 echo $ECHO_N "(cached) $ECHO_C" >&6
11682else 11189else
11683 cat >conftest.$ac_ext <<_ACEOF 11190 cat >conftest.$ac_ext <<_ACEOF
11684/* confdefs.h. */ 11191/* confdefs.h. */
@@ -11731,48 +11238,42 @@ case "(($ac_try" in
11731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11732 *) ac_try_echo=$ac_try;; 11239 *) ac_try_echo=$ac_try;;
11733esac 11240esac
11734eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11735$as_echo "$ac_try_echo") >&5
11736 (eval "$ac_link") 2>conftest.er1 11242 (eval "$ac_link") 2>conftest.er1
11737 ac_status=$? 11243 ac_status=$?
11738 grep -v '^ *+' conftest.er1 >conftest.err 11244 grep -v '^ *+' conftest.er1 >conftest.err
11739 rm -f conftest.er1 11245 rm -f conftest.er1
11740 cat conftest.err >&5 11246 cat conftest.err >&5
11741 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11742 (exit $ac_status); } && { 11248 (exit $ac_status); } && {
11743 test -z "$ac_c_werror_flag" || 11249 test -z "$ac_c_werror_flag" ||
11744 test ! -s conftest.err 11250 test ! -s conftest.err
11745 } && test -s conftest$ac_exeext && { 11251 } && test -s conftest$ac_exeext &&
11746 test "$cross_compiling" = yes || 11252 $as_test_x conftest$ac_exeext; then
11747 $as_test_x conftest$ac_exeext
11748 }; then
11749 eval "$as_ac_var=yes" 11253 eval "$as_ac_var=yes"
11750else 11254else
11751 $as_echo "$as_me: failed program was:" >&5 11255 echo "$as_me: failed program was:" >&5
11752sed 's/^/| /' conftest.$ac_ext >&5 11256sed 's/^/| /' conftest.$ac_ext >&5
11753 11257
11754 eval "$as_ac_var=no" 11258 eval "$as_ac_var=no"
11755fi 11259fi
11756 11260
11757rm -rf conftest.dSYM
11758rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 11261rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11759 conftest$ac_exeext conftest.$ac_ext 11262 conftest$ac_exeext conftest.$ac_ext
11760fi 11263fi
11761ac_res=`eval 'as_val=${'$as_ac_var'} 11264ac_res=`eval echo '${'$as_ac_var'}'`
11762 $as_echo "$as_val"'` 11265 { echo "$as_me:$LINENO: result: $ac_res" >&5
11763 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 11266echo "${ECHO_T}$ac_res" >&6; }
11764$as_echo "$ac_res" >&6; } 11267if test `eval echo '${'$as_ac_var'}'` = yes; then
11765if test `eval 'as_val=${'$as_ac_var'}
11766 $as_echo "$as_val"'` = yes; then
11767 cat >>confdefs.h <<_ACEOF 11268 cat >>confdefs.h <<_ACEOF
11768#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 11269#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11769_ACEOF 11270_ACEOF
11770 11271
11771else 11272else
11772 { $as_echo "$as_me:$LINENO: checking for utimes in -lc89" >&5 11273 { echo "$as_me:$LINENO: checking for utimes in -lc89" >&5
11773$as_echo_n "checking for utimes in -lc89... " >&6; } 11274echo $ECHO_N "checking for utimes in -lc89... $ECHO_C" >&6; }
11774if test "${ac_cv_lib_c89_utimes+set}" = set; then 11275if test "${ac_cv_lib_c89_utimes+set}" = set; then
11775 $as_echo_n "(cached) " >&6 11276 echo $ECHO_N "(cached) $ECHO_C" >&6
11776else 11277else
11777 ac_check_lib_save_LIBS=$LIBS 11278 ac_check_lib_save_LIBS=$LIBS
11778LIBS="-lc89 $LIBS" 11279LIBS="-lc89 $LIBS"
@@ -11804,36 +11305,32 @@ case "(($ac_try" in
11804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11805 *) ac_try_echo=$ac_try;; 11306 *) ac_try_echo=$ac_try;;
11806esac 11307esac
11807eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11808$as_echo "$ac_try_echo") >&5
11809 (eval "$ac_link") 2>conftest.er1 11309 (eval "$ac_link") 2>conftest.er1
11810 ac_status=$? 11310 ac_status=$?
11811 grep -v '^ *+' conftest.er1 >conftest.err 11311 grep -v '^ *+' conftest.er1 >conftest.err
11812 rm -f conftest.er1 11312 rm -f conftest.er1
11813 cat conftest.err >&5 11313 cat conftest.err >&5
11814 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11815 (exit $ac_status); } && { 11315 (exit $ac_status); } && {
11816 test -z "$ac_c_werror_flag" || 11316 test -z "$ac_c_werror_flag" ||
11817 test ! -s conftest.err 11317 test ! -s conftest.err
11818 } && test -s conftest$ac_exeext && { 11318 } && test -s conftest$ac_exeext &&
11819 test "$cross_compiling" = yes || 11319 $as_test_x conftest$ac_exeext; then
11820 $as_test_x conftest$ac_exeext
11821 }; then
11822 ac_cv_lib_c89_utimes=yes 11320 ac_cv_lib_c89_utimes=yes
11823else 11321else
11824 $as_echo "$as_me: failed program was:" >&5 11322 echo "$as_me: failed program was:" >&5
11825sed 's/^/| /' conftest.$ac_ext >&5 11323sed 's/^/| /' conftest.$ac_ext >&5
11826 11324
11827 ac_cv_lib_c89_utimes=no 11325 ac_cv_lib_c89_utimes=no
11828fi 11326fi
11829 11327
11830rm -rf conftest.dSYM
11831rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 11328rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11832 conftest$ac_exeext conftest.$ac_ext 11329 conftest$ac_exeext conftest.$ac_ext
11833LIBS=$ac_check_lib_save_LIBS 11330LIBS=$ac_check_lib_save_LIBS
11834fi 11331fi
11835{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c89_utimes" >&5 11332{ echo "$as_me:$LINENO: result: $ac_cv_lib_c89_utimes" >&5
11836$as_echo "$ac_cv_lib_c89_utimes" >&6; } 11333echo "${ECHO_T}$ac_cv_lib_c89_utimes" >&6; }
11837if test $ac_cv_lib_c89_utimes = yes; then 11334if test $ac_cv_lib_c89_utimes = yes; then
11838 cat >>confdefs.h <<\_ACEOF 11335 cat >>confdefs.h <<\_ACEOF
11839#define HAVE_UTIMES 1 11336#define HAVE_UTIMES 1
@@ -11850,21 +11347,20 @@ done
11850 11347
11851for ac_header in libutil.h 11348for ac_header in libutil.h
11852do 11349do
11853as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 11350as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11854if { 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
11855 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 11352 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11856$as_echo_n "checking for $ac_header... " >&6; } 11353echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11857if { 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
11858 $as_echo_n "(cached) " >&6 11355 echo $ECHO_N "(cached) $ECHO_C" >&6
11859fi 11356fi
11860ac_res=`eval 'as_val=${'$as_ac_Header'} 11357ac_res=`eval echo '${'$as_ac_Header'}'`
11861 $as_echo "$as_val"'` 11358 { echo "$as_me:$LINENO: result: $ac_res" >&5
11862 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 11359echo "${ECHO_T}$ac_res" >&6; }
11863$as_echo "$ac_res" >&6; }
11864else 11360else
11865 # Is the header compilable? 11361 # Is the header compilable?
11866{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 11362{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11867$as_echo_n "checking $ac_header usability... " >&6; } 11363echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
11868cat >conftest.$ac_ext <<_ACEOF 11364cat >conftest.$ac_ext <<_ACEOF
11869/* confdefs.h. */ 11365/* confdefs.h. */
11870_ACEOF 11366_ACEOF
@@ -11880,33 +11376,32 @@ case "(($ac_try" in
11880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11881 *) ac_try_echo=$ac_try;; 11377 *) ac_try_echo=$ac_try;;
11882esac 11378esac
11883eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11884$as_echo "$ac_try_echo") >&5
11885 (eval "$ac_compile") 2>conftest.er1 11380 (eval "$ac_compile") 2>conftest.er1
11886 ac_status=$? 11381 ac_status=$?
11887 grep -v '^ *+' conftest.er1 >conftest.err 11382 grep -v '^ *+' conftest.er1 >conftest.err
11888 rm -f conftest.er1 11383 rm -f conftest.er1
11889 cat conftest.err >&5 11384 cat conftest.err >&5
11890 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11891 (exit $ac_status); } && { 11386 (exit $ac_status); } && {
11892 test -z "$ac_c_werror_flag" || 11387 test -z "$ac_c_werror_flag" ||
11893 test ! -s conftest.err 11388 test ! -s conftest.err
11894 } && test -s conftest.$ac_objext; then 11389 } && test -s conftest.$ac_objext; then
11895 ac_header_compiler=yes 11390 ac_header_compiler=yes
11896else 11391else
11897 $as_echo "$as_me: failed program was:" >&5 11392 echo "$as_me: failed program was:" >&5
11898sed 's/^/| /' conftest.$ac_ext >&5 11393sed 's/^/| /' conftest.$ac_ext >&5
11899 11394
11900 ac_header_compiler=no 11395 ac_header_compiler=no
11901fi 11396fi
11902 11397
11903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11904{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 11399{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11905$as_echo "$ac_header_compiler" >&6; } 11400echo "${ECHO_T}$ac_header_compiler" >&6; }
11906 11401
11907# Is the header present? 11402# Is the header present?
11908{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 11403{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11909$as_echo_n "checking $ac_header presence... " >&6; } 11404echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
11910cat >conftest.$ac_ext <<_ACEOF 11405cat >conftest.$ac_ext <<_ACEOF
11911/* confdefs.h. */ 11406/* confdefs.h. */
11912_ACEOF 11407_ACEOF
@@ -11920,52 +11415,51 @@ case "(($ac_try" in
11920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11921 *) ac_try_echo=$ac_try;; 11416 *) ac_try_echo=$ac_try;;
11922esac 11417esac
11923eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11924$as_echo "$ac_try_echo") >&5
11925 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 11419 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11926 ac_status=$? 11420 ac_status=$?
11927 grep -v '^ *+' conftest.er1 >conftest.err 11421 grep -v '^ *+' conftest.er1 >conftest.err
11928 rm -f conftest.er1 11422 rm -f conftest.er1
11929 cat conftest.err >&5 11423 cat conftest.err >&5
11930 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11931 (exit $ac_status); } >/dev/null && { 11425 (exit $ac_status); } >/dev/null && {
11932 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 11426 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11933 test ! -s conftest.err 11427 test ! -s conftest.err
11934 }; then 11428 }; then
11935 ac_header_preproc=yes 11429 ac_header_preproc=yes
11936else 11430else
11937 $as_echo "$as_me: failed program was:" >&5 11431 echo "$as_me: failed program was:" >&5
11938sed 's/^/| /' conftest.$ac_ext >&5 11432sed 's/^/| /' conftest.$ac_ext >&5
11939 11433
11940 ac_header_preproc=no 11434 ac_header_preproc=no
11941fi 11435fi
11942 11436
11943rm -f conftest.err conftest.$ac_ext 11437rm -f conftest.err conftest.$ac_ext
11944{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 11438{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11945$as_echo "$ac_header_preproc" >&6; } 11439echo "${ECHO_T}$ac_header_preproc" >&6; }
11946 11440
11947# So? What about this header? 11441# So? What about this header?
11948case $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
11949 yes:no: ) 11443 yes:no: )
11950 { $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
11951$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;}
11952 { $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
11953$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;}
11954 ac_header_preproc=yes 11448 ac_header_preproc=yes
11955 ;; 11449 ;;
11956 no:yes:* ) 11450 no:yes:* )
11957 { $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
11958$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;}
11959 { $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
11960$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;}
11961 { $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
11962$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 11456echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11963 { $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
11964$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;}
11965 { $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
11966$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;}
11967 { $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
11968$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;}
11969 ( cat <<\_ASBOX 11463 ( cat <<\_ASBOX
11970## ------------------------------------------- ## 11464## ------------------------------------------- ##
11971## Report this to openssh-unix-dev@mindrot.org ## 11465## Report this to openssh-unix-dev@mindrot.org ##
@@ -11974,33 +11468,31 @@ _ASBOX
11974 ) | sed "s/^/$as_me: WARNING: /" >&2 11468 ) | sed "s/^/$as_me: WARNING: /" >&2
11975 ;; 11469 ;;
11976esac 11470esac
11977{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 11471{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11978$as_echo_n "checking for $ac_header... " >&6; } 11472echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11979if { 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
11980 $as_echo_n "(cached) " >&6 11474 echo $ECHO_N "(cached) $ECHO_C" >&6
11981else 11475else
11982 eval "$as_ac_Header=\$ac_header_preproc" 11476 eval "$as_ac_Header=\$ac_header_preproc"
11983fi 11477fi
11984ac_res=`eval 'as_val=${'$as_ac_Header'} 11478ac_res=`eval echo '${'$as_ac_Header'}'`
11985 $as_echo "$as_val"'` 11479 { echo "$as_me:$LINENO: result: $ac_res" >&5
11986 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 11480echo "${ECHO_T}$ac_res" >&6; }
11987$as_echo "$ac_res" >&6; }
11988 11481
11989fi 11482fi
11990if test `eval 'as_val=${'$as_ac_Header'} 11483if test `eval echo '${'$as_ac_Header'}'` = yes; then
11991 $as_echo "$as_val"'` = yes; then
11992 cat >>confdefs.h <<_ACEOF 11484 cat >>confdefs.h <<_ACEOF
11993#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 11485#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11994_ACEOF 11486_ACEOF
11995 11487
11996fi 11488fi
11997 11489
11998done 11490done
11999 11491
12000{ $as_echo "$as_me:$LINENO: checking for library containing login" >&5 11492{ echo "$as_me:$LINENO: checking for library containing login" >&5
12001$as_echo_n "checking for library containing login... " >&6; } 11493echo $ECHO_N "checking for library containing login... $ECHO_C" >&6; }
12002if test "${ac_cv_search_login+set}" = set; then 11494if test "${ac_cv_search_login+set}" = set; then
12003 $as_echo_n "(cached) " >&6 11495 echo $ECHO_N "(cached) $ECHO_C" >&6
12004else 11496else
12005 ac_func_search_save_LIBS=$LIBS 11497 ac_func_search_save_LIBS=$LIBS
12006cat >conftest.$ac_ext <<_ACEOF 11498cat >conftest.$ac_ext <<_ACEOF
@@ -12038,30 +11530,26 @@ case "(($ac_try" in
12038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12039 *) ac_try_echo=$ac_try;; 11531 *) ac_try_echo=$ac_try;;
12040esac 11532esac
12041eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12042$as_echo "$ac_try_echo") >&5
12043 (eval "$ac_link") 2>conftest.er1 11534 (eval "$ac_link") 2>conftest.er1
12044 ac_status=$? 11535 ac_status=$?
12045 grep -v '^ *+' conftest.er1 >conftest.err 11536 grep -v '^ *+' conftest.er1 >conftest.err
12046 rm -f conftest.er1 11537 rm -f conftest.er1
12047 cat conftest.err >&5 11538 cat conftest.err >&5
12048 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12049 (exit $ac_status); } && { 11540 (exit $ac_status); } && {
12050 test -z "$ac_c_werror_flag" || 11541 test -z "$ac_c_werror_flag" ||
12051 test ! -s conftest.err 11542 test ! -s conftest.err
12052 } && test -s conftest$ac_exeext && { 11543 } && test -s conftest$ac_exeext &&
12053 test "$cross_compiling" = yes || 11544 $as_test_x conftest$ac_exeext; then
12054 $as_test_x conftest$ac_exeext
12055 }; then
12056 ac_cv_search_login=$ac_res 11545 ac_cv_search_login=$ac_res
12057else 11546else
12058 $as_echo "$as_me: failed program was:" >&5 11547 echo "$as_me: failed program was:" >&5
12059sed 's/^/| /' conftest.$ac_ext >&5 11548sed 's/^/| /' conftest.$ac_ext >&5
12060 11549
12061 11550
12062fi 11551fi
12063 11552
12064rm -rf conftest.dSYM
12065rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 11553rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12066 conftest$ac_exeext 11554 conftest$ac_exeext
12067 if test "${ac_cv_search_login+set}" = set; then 11555 if test "${ac_cv_search_login+set}" = set; then
@@ -12076,8 +11564,8 @@ fi
12076rm conftest.$ac_ext 11564rm conftest.$ac_ext
12077LIBS=$ac_func_search_save_LIBS 11565LIBS=$ac_func_search_save_LIBS
12078fi 11566fi
12079{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_login" >&5 11567{ echo "$as_me:$LINENO: result: $ac_cv_search_login" >&5
12080$as_echo "$ac_cv_search_login" >&6; } 11568echo "${ECHO_T}$ac_cv_search_login" >&6; }
12081ac_res=$ac_cv_search_login 11569ac_res=$ac_cv_search_login
12082if test "$ac_res" != no; then 11570if test "$ac_res" != no; then
12083 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 11571 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
@@ -12094,11 +11582,11 @@ fi
12094 11582
12095for ac_func in fmt_scaled logout updwtmp logwtmp 11583for ac_func in fmt_scaled logout updwtmp logwtmp
12096do 11584do
12097as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 11585as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12098{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 11586{ echo "$as_me:$LINENO: checking for $ac_func" >&5
12099$as_echo_n "checking for $ac_func... " >&6; } 11587echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
12100if { 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
12101 $as_echo_n "(cached) " >&6 11589 echo $ECHO_N "(cached) $ECHO_C" >&6
12102else 11590else
12103 cat >conftest.$ac_ext <<_ACEOF 11591 cat >conftest.$ac_ext <<_ACEOF
12104/* confdefs.h. */ 11592/* confdefs.h. */
@@ -12151,41 +11639,35 @@ case "(($ac_try" in
12151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12152 *) ac_try_echo=$ac_try;; 11640 *) ac_try_echo=$ac_try;;
12153esac 11641esac
12154eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12155$as_echo "$ac_try_echo") >&5
12156 (eval "$ac_link") 2>conftest.er1 11643 (eval "$ac_link") 2>conftest.er1
12157 ac_status=$? 11644 ac_status=$?
12158 grep -v '^ *+' conftest.er1 >conftest.err 11645 grep -v '^ *+' conftest.er1 >conftest.err
12159 rm -f conftest.er1 11646 rm -f conftest.er1
12160 cat conftest.err >&5 11647 cat conftest.err >&5
12161 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12162 (exit $ac_status); } && { 11649 (exit $ac_status); } && {
12163 test -z "$ac_c_werror_flag" || 11650 test -z "$ac_c_werror_flag" ||
12164 test ! -s conftest.err 11651 test ! -s conftest.err
12165 } && test -s conftest$ac_exeext && { 11652 } && test -s conftest$ac_exeext &&
12166 test "$cross_compiling" = yes || 11653 $as_test_x conftest$ac_exeext; then
12167 $as_test_x conftest$ac_exeext
12168 }; then
12169 eval "$as_ac_var=yes" 11654 eval "$as_ac_var=yes"
12170else 11655else
12171 $as_echo "$as_me: failed program was:" >&5 11656 echo "$as_me: failed program was:" >&5
12172sed 's/^/| /' conftest.$ac_ext >&5 11657sed 's/^/| /' conftest.$ac_ext >&5
12173 11658
12174 eval "$as_ac_var=no" 11659 eval "$as_ac_var=no"
12175fi 11660fi
12176 11661
12177rm -rf conftest.dSYM
12178rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 11662rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12179 conftest$ac_exeext conftest.$ac_ext 11663 conftest$ac_exeext conftest.$ac_ext
12180fi 11664fi
12181ac_res=`eval 'as_val=${'$as_ac_var'} 11665ac_res=`eval echo '${'$as_ac_var'}'`
12182 $as_echo "$as_val"'` 11666 { echo "$as_me:$LINENO: result: $ac_res" >&5
12183 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 11667echo "${ECHO_T}$ac_res" >&6; }
12184$as_echo "$ac_res" >&6; } 11668if test `eval echo '${'$as_ac_var'}'` = yes; then
12185if test `eval 'as_val=${'$as_ac_var'}
12186 $as_echo "$as_val"'` = yes; then
12187 cat >>confdefs.h <<_ACEOF 11669 cat >>confdefs.h <<_ACEOF
12188#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 11670#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12189_ACEOF 11671_ACEOF
12190 11672
12191fi 11673fi
@@ -12195,11 +11677,11 @@ done
12195 11677
12196for ac_func in strftime 11678for ac_func in strftime
12197do 11679do
12198as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 11680as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12199{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 11681{ echo "$as_me:$LINENO: checking for $ac_func" >&5
12200$as_echo_n "checking for $ac_func... " >&6; } 11682echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
12201if { 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
12202 $as_echo_n "(cached) " >&6 11684 echo $ECHO_N "(cached) $ECHO_C" >&6
12203else 11685else
12204 cat >conftest.$ac_ext <<_ACEOF 11686 cat >conftest.$ac_ext <<_ACEOF
12205/* confdefs.h. */ 11687/* confdefs.h. */
@@ -12252,49 +11734,43 @@ case "(($ac_try" in
12252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12253 *) ac_try_echo=$ac_try;; 11735 *) ac_try_echo=$ac_try;;
12254esac 11736esac
12255eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12256$as_echo "$ac_try_echo") >&5
12257 (eval "$ac_link") 2>conftest.er1 11738 (eval "$ac_link") 2>conftest.er1
12258 ac_status=$? 11739 ac_status=$?
12259 grep -v '^ *+' conftest.er1 >conftest.err 11740 grep -v '^ *+' conftest.er1 >conftest.err
12260 rm -f conftest.er1 11741 rm -f conftest.er1
12261 cat conftest.err >&5 11742 cat conftest.err >&5
12262 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12263 (exit $ac_status); } && { 11744 (exit $ac_status); } && {
12264 test -z "$ac_c_werror_flag" || 11745 test -z "$ac_c_werror_flag" ||
12265 test ! -s conftest.err 11746 test ! -s conftest.err
12266 } && test -s conftest$ac_exeext && { 11747 } && test -s conftest$ac_exeext &&
12267 test "$cross_compiling" = yes || 11748 $as_test_x conftest$ac_exeext; then
12268 $as_test_x conftest$ac_exeext
12269 }; then
12270 eval "$as_ac_var=yes" 11749 eval "$as_ac_var=yes"
12271else 11750else
12272 $as_echo "$as_me: failed program was:" >&5 11751 echo "$as_me: failed program was:" >&5
12273sed 's/^/| /' conftest.$ac_ext >&5 11752sed 's/^/| /' conftest.$ac_ext >&5
12274 11753
12275 eval "$as_ac_var=no" 11754 eval "$as_ac_var=no"
12276fi 11755fi
12277 11756
12278rm -rf conftest.dSYM
12279rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 11757rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12280 conftest$ac_exeext conftest.$ac_ext 11758 conftest$ac_exeext conftest.$ac_ext
12281fi 11759fi
12282ac_res=`eval 'as_val=${'$as_ac_var'} 11760ac_res=`eval echo '${'$as_ac_var'}'`
12283 $as_echo "$as_val"'` 11761 { echo "$as_me:$LINENO: result: $ac_res" >&5
12284 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 11762echo "${ECHO_T}$ac_res" >&6; }
12285$as_echo "$ac_res" >&6; } 11763if test `eval echo '${'$as_ac_var'}'` = yes; then
12286if test `eval 'as_val=${'$as_ac_var'}
12287 $as_echo "$as_val"'` = yes; then
12288 cat >>confdefs.h <<_ACEOF 11764 cat >>confdefs.h <<_ACEOF
12289#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 11765#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12290_ACEOF 11766_ACEOF
12291 11767
12292else 11768else
12293 # strftime is in -lintl on SCO UNIX. 11769 # strftime is in -lintl on SCO UNIX.
12294{ $as_echo "$as_me:$LINENO: checking for strftime in -lintl" >&5 11770{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
12295$as_echo_n "checking for strftime in -lintl... " >&6; } 11771echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
12296if test "${ac_cv_lib_intl_strftime+set}" = set; then 11772if test "${ac_cv_lib_intl_strftime+set}" = set; then
12297 $as_echo_n "(cached) " >&6 11773 echo $ECHO_N "(cached) $ECHO_C" >&6
12298else 11774else
12299 ac_check_lib_save_LIBS=$LIBS 11775 ac_check_lib_save_LIBS=$LIBS
12300LIBS="-lintl $LIBS" 11776LIBS="-lintl $LIBS"
@@ -12326,36 +11802,32 @@ case "(($ac_try" in
12326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12327 *) ac_try_echo=$ac_try;; 11803 *) ac_try_echo=$ac_try;;
12328esac 11804esac
12329eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12330$as_echo "$ac_try_echo") >&5
12331 (eval "$ac_link") 2>conftest.er1 11806 (eval "$ac_link") 2>conftest.er1
12332 ac_status=$? 11807 ac_status=$?
12333 grep -v '^ *+' conftest.er1 >conftest.err 11808 grep -v '^ *+' conftest.er1 >conftest.err
12334 rm -f conftest.er1 11809 rm -f conftest.er1
12335 cat conftest.err >&5 11810 cat conftest.err >&5
12336 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12337 (exit $ac_status); } && { 11812 (exit $ac_status); } && {
12338 test -z "$ac_c_werror_flag" || 11813 test -z "$ac_c_werror_flag" ||
12339 test ! -s conftest.err 11814 test ! -s conftest.err
12340 } && test -s conftest$ac_exeext && { 11815 } && test -s conftest$ac_exeext &&
12341 test "$cross_compiling" = yes || 11816 $as_test_x conftest$ac_exeext; then
12342 $as_test_x conftest$ac_exeext
12343 }; then
12344 ac_cv_lib_intl_strftime=yes 11817 ac_cv_lib_intl_strftime=yes
12345else 11818else
12346 $as_echo "$as_me: failed program was:" >&5 11819 echo "$as_me: failed program was:" >&5
12347sed 's/^/| /' conftest.$ac_ext >&5 11820sed 's/^/| /' conftest.$ac_ext >&5
12348 11821
12349 ac_cv_lib_intl_strftime=no 11822 ac_cv_lib_intl_strftime=no
12350fi 11823fi
12351 11824
12352rm -rf conftest.dSYM
12353rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 11825rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12354 conftest$ac_exeext conftest.$ac_ext 11826 conftest$ac_exeext conftest.$ac_ext
12355LIBS=$ac_check_lib_save_LIBS 11827LIBS=$ac_check_lib_save_LIBS
12356fi 11828fi
12357{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5 11829{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
12358$as_echo "$ac_cv_lib_intl_strftime" >&6; } 11830echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
12359if test $ac_cv_lib_intl_strftime = yes; then 11831if test $ac_cv_lib_intl_strftime = yes; then
12360 cat >>confdefs.h <<\_ACEOF 11832 cat >>confdefs.h <<\_ACEOF
12361#define HAVE_STRFTIME 1 11833#define HAVE_STRFTIME 1
@@ -12369,8 +11841,8 @@ done
12369 11841
12370 11842
12371# Check for ALTDIRFUNC glob() extension 11843# Check for ALTDIRFUNC glob() extension
12372{ $as_echo "$as_me:$LINENO: checking for GLOB_ALTDIRFUNC support" >&5 11844{ echo "$as_me:$LINENO: checking for GLOB_ALTDIRFUNC support" >&5
12373$as_echo_n "checking for GLOB_ALTDIRFUNC support... " >&6; } 11845echo $ECHO_N "checking for GLOB_ALTDIRFUNC support... $ECHO_C" >&6; }
12374cat >conftest.$ac_ext <<_ACEOF 11846cat >conftest.$ac_ext <<_ACEOF
12375/* confdefs.h. */ 11847/* confdefs.h. */
12376_ACEOF 11848_ACEOF
@@ -12392,13 +11864,13 @@ cat >>confdefs.h <<\_ACEOF
12392#define GLOB_HAS_ALTDIRFUNC 1 11864#define GLOB_HAS_ALTDIRFUNC 1
12393_ACEOF 11865_ACEOF
12394 11866
12395 { $as_echo "$as_me:$LINENO: result: yes" >&5 11867 { echo "$as_me:$LINENO: result: yes" >&5
12396$as_echo "yes" >&6; } 11868echo "${ECHO_T}yes" >&6; }
12397 11869
12398else 11870else
12399 11871
12400 { $as_echo "$as_me:$LINENO: result: no" >&5 11872 { echo "$as_me:$LINENO: result: no" >&5
12401$as_echo "no" >&6; } 11873echo "${ECHO_T}no" >&6; }
12402 11874
12403 11875
12404fi 11876fi
@@ -12406,8 +11878,8 @@ rm -f conftest*
12406 11878
12407 11879
12408# Check for g.gl_matchc glob() extension 11880# Check for g.gl_matchc glob() extension
12409{ $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
12410$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; }
12411cat >conftest.$ac_ext <<_ACEOF 11883cat >conftest.$ac_ext <<_ACEOF
12412/* confdefs.h. */ 11884/* confdefs.h. */
12413_ACEOF 11885_ACEOF
@@ -12429,14 +11901,13 @@ case "(($ac_try" in
12429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12430 *) ac_try_echo=$ac_try;; 11902 *) ac_try_echo=$ac_try;;
12431esac 11903esac
12432eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12433$as_echo "$ac_try_echo") >&5
12434 (eval "$ac_compile") 2>conftest.er1 11905 (eval "$ac_compile") 2>conftest.er1
12435 ac_status=$? 11906 ac_status=$?
12436 grep -v '^ *+' conftest.er1 >conftest.err 11907 grep -v '^ *+' conftest.er1 >conftest.err
12437 rm -f conftest.er1 11908 rm -f conftest.er1
12438 cat conftest.err >&5 11909 cat conftest.err >&5
12439 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12440 (exit $ac_status); } && { 11911 (exit $ac_status); } && {
12441 test -z "$ac_c_werror_flag" || 11912 test -z "$ac_c_werror_flag" ||
12442 test ! -s conftest.err 11913 test ! -s conftest.err
@@ -12447,26 +11918,26 @@ cat >>confdefs.h <<\_ACEOF
12447#define GLOB_HAS_GL_MATCHC 1 11918#define GLOB_HAS_GL_MATCHC 1
12448_ACEOF 11919_ACEOF
12449 11920
12450 { $as_echo "$as_me:$LINENO: result: yes" >&5 11921 { echo "$as_me:$LINENO: result: yes" >&5
12451$as_echo "yes" >&6; } 11922echo "${ECHO_T}yes" >&6; }
12452 11923
12453else 11924else
12454 $as_echo "$as_me: failed program was:" >&5 11925 echo "$as_me: failed program was:" >&5
12455sed 's/^/| /' conftest.$ac_ext >&5 11926sed 's/^/| /' conftest.$ac_ext >&5
12456 11927
12457 11928
12458 { $as_echo "$as_me:$LINENO: result: no" >&5 11929 { echo "$as_me:$LINENO: result: no" >&5
12459$as_echo "no" >&6; } 11930echo "${ECHO_T}no" >&6; }
12460 11931
12461 11932
12462fi 11933fi
12463 11934
12464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12465 11936
12466{ $as_echo "$as_me:$LINENO: checking whether GLOB_NOMATCH is declared" >&5 11937{ echo "$as_me:$LINENO: checking whether GLOB_NOMATCH is declared" >&5
12467$as_echo_n "checking whether GLOB_NOMATCH is declared... " >&6; } 11938echo $ECHO_N "checking whether GLOB_NOMATCH is declared... $ECHO_C" >&6; }
12468if test "${ac_cv_have_decl_GLOB_NOMATCH+set}" = set; then 11939if test "${ac_cv_have_decl_GLOB_NOMATCH+set}" = set; then
12469 $as_echo_n "(cached) " >&6 11940 echo $ECHO_N "(cached) $ECHO_C" >&6
12470else 11941else
12471 cat >conftest.$ac_ext <<_ACEOF 11942 cat >conftest.$ac_ext <<_ACEOF
12472/* confdefs.h. */ 11943/* confdefs.h. */
@@ -12493,21 +11964,20 @@ case "(($ac_try" in
12493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12494 *) ac_try_echo=$ac_try;; 11965 *) ac_try_echo=$ac_try;;
12495esac 11966esac
12496eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 11967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12497$as_echo "$ac_try_echo") >&5
12498 (eval "$ac_compile") 2>conftest.er1 11968 (eval "$ac_compile") 2>conftest.er1
12499 ac_status=$? 11969 ac_status=$?
12500 grep -v '^ *+' conftest.er1 >conftest.err 11970 grep -v '^ *+' conftest.er1 >conftest.err
12501 rm -f conftest.er1 11971 rm -f conftest.er1
12502 cat conftest.err >&5 11972 cat conftest.err >&5
12503 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 11973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12504 (exit $ac_status); } && { 11974 (exit $ac_status); } && {
12505 test -z "$ac_c_werror_flag" || 11975 test -z "$ac_c_werror_flag" ||
12506 test ! -s conftest.err 11976 test ! -s conftest.err
12507 } && test -s conftest.$ac_objext; then 11977 } && test -s conftest.$ac_objext; then
12508 ac_cv_have_decl_GLOB_NOMATCH=yes 11978 ac_cv_have_decl_GLOB_NOMATCH=yes
12509else 11979else
12510 $as_echo "$as_me: failed program was:" >&5 11980 echo "$as_me: failed program was:" >&5
12511sed 's/^/| /' conftest.$ac_ext >&5 11981sed 's/^/| /' conftest.$ac_ext >&5
12512 11982
12513 ac_cv_have_decl_GLOB_NOMATCH=no 11983 ac_cv_have_decl_GLOB_NOMATCH=no
@@ -12515,8 +11985,8 @@ fi
12515 11985
12516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12517fi 11987fi
12518{ $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
12519$as_echo "$ac_cv_have_decl_GLOB_NOMATCH" >&6; } 11989echo "${ECHO_T}$ac_cv_have_decl_GLOB_NOMATCH" >&6; }
12520if test $ac_cv_have_decl_GLOB_NOMATCH = yes; then 11990if test $ac_cv_have_decl_GLOB_NOMATCH = yes; then
12521 11991
12522cat >>confdefs.h <<_ACEOF 11992cat >>confdefs.h <<_ACEOF
@@ -12534,12 +12004,12 @@ fi
12534 12004
12535 12005
12536 12006
12537{ $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
12538$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; }
12539if test "$cross_compiling" = yes; then 12009if test "$cross_compiling" = yes; then
12540 12010
12541 { $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
12542$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;}
12543 cat >>confdefs.h <<\_ACEOF 12013 cat >>confdefs.h <<\_ACEOF
12544#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1 12014#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1
12545_ACEOF 12015_ACEOF
@@ -12565,33 +12035,31 @@ case "(($ac_try" in
12565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12566 *) ac_try_echo=$ac_try;; 12036 *) ac_try_echo=$ac_try;;
12567esac 12037esac
12568eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12569$as_echo "$ac_try_echo") >&5
12570 (eval "$ac_link") 2>&5 12039 (eval "$ac_link") 2>&5
12571 ac_status=$? 12040 ac_status=$?
12572 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12573 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 12042 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12574 { (case "(($ac_try" in 12043 { (case "(($ac_try" in
12575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12576 *) ac_try_echo=$ac_try;; 12045 *) ac_try_echo=$ac_try;;
12577esac 12046esac
12578eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12579$as_echo "$ac_try_echo") >&5
12580 (eval "$ac_try") 2>&5 12048 (eval "$ac_try") 2>&5
12581 ac_status=$? 12049 ac_status=$?
12582 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12583 (exit $ac_status); }; }; then 12051 (exit $ac_status); }; }; then
12584 { $as_echo "$as_me:$LINENO: result: yes" >&5 12052 { echo "$as_me:$LINENO: result: yes" >&5
12585$as_echo "yes" >&6; } 12053echo "${ECHO_T}yes" >&6; }
12586else 12054else
12587 $as_echo "$as_me: program exited with status $ac_status" >&5 12055 echo "$as_me: program exited with status $ac_status" >&5
12588$as_echo "$as_me: failed program was:" >&5 12056echo "$as_me: failed program was:" >&5
12589sed 's/^/| /' conftest.$ac_ext >&5 12057sed 's/^/| /' conftest.$ac_ext >&5
12590 12058
12591( exit $ac_status ) 12059( exit $ac_status )
12592 12060
12593 { $as_echo "$as_me:$LINENO: result: no" >&5 12061 { echo "$as_me:$LINENO: result: no" >&5
12594$as_echo "no" >&6; } 12062echo "${ECHO_T}no" >&6; }
12595 12063
12596cat >>confdefs.h <<\_ACEOF 12064cat >>confdefs.h <<\_ACEOF
12597#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1 12065#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1
@@ -12599,25 +12067,24 @@ _ACEOF
12599 12067
12600 12068
12601fi 12069fi
12602rm -rf conftest.dSYM
12603rm -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
12604fi 12071fi
12605 12072
12606 12073
12607 12074
12608{ $as_echo "$as_me:$LINENO: checking for /proc/pid/fd directory" >&5 12075{ echo "$as_me:$LINENO: checking for /proc/pid/fd directory" >&5
12609$as_echo_n "checking for /proc/pid/fd directory... " >&6; } 12076echo $ECHO_N "checking for /proc/pid/fd directory... $ECHO_C" >&6; }
12610if test -d "/proc/$$/fd" ; then 12077if test -d "/proc/$$/fd" ; then
12611 12078
12612cat >>confdefs.h <<\_ACEOF 12079cat >>confdefs.h <<\_ACEOF
12613#define HAVE_PROC_PID 1 12080#define HAVE_PROC_PID 1
12614_ACEOF 12081_ACEOF
12615 12082
12616 { $as_echo "$as_me:$LINENO: result: yes" >&5 12083 { echo "$as_me:$LINENO: result: yes" >&5
12617$as_echo "yes" >&6; } 12084echo "${ECHO_T}yes" >&6; }
12618else 12085else
12619 { $as_echo "$as_me:$LINENO: result: no" >&5 12086 { echo "$as_me:$LINENO: result: no" >&5
12620$as_echo "no" >&6; } 12087echo "${ECHO_T}no" >&6; }
12621fi 12088fi
12622 12089
12623# Check whether user wants S/Key support 12090# Check whether user wants S/Key support
@@ -12641,8 +12108,8 @@ _ACEOF
12641 LIBS="-lskey $LIBS" 12108 LIBS="-lskey $LIBS"
12642 SKEY_MSG="yes" 12109 SKEY_MSG="yes"
12643 12110
12644 { $as_echo "$as_me:$LINENO: checking for s/key support" >&5 12111 { echo "$as_me:$LINENO: checking for s/key support" >&5
12645$as_echo_n "checking for s/key support... " >&6; } 12112echo $ECHO_N "checking for s/key support... $ECHO_C" >&6; }
12646 cat >conftest.$ac_ext <<_ACEOF 12113 cat >conftest.$ac_ext <<_ACEOF
12647/* confdefs.h. */ 12114/* confdefs.h. */
12648_ACEOF 12115_ACEOF
@@ -12661,41 +12128,37 @@ case "(($ac_try" in
12661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12662 *) ac_try_echo=$ac_try;; 12129 *) ac_try_echo=$ac_try;;
12663esac 12130esac
12664eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12665$as_echo "$ac_try_echo") >&5
12666 (eval "$ac_link") 2>conftest.er1 12132 (eval "$ac_link") 2>conftest.er1
12667 ac_status=$? 12133 ac_status=$?
12668 grep -v '^ *+' conftest.er1 >conftest.err 12134 grep -v '^ *+' conftest.er1 >conftest.err
12669 rm -f conftest.er1 12135 rm -f conftest.er1
12670 cat conftest.err >&5 12136 cat conftest.err >&5
12671 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12672 (exit $ac_status); } && { 12138 (exit $ac_status); } && {
12673 test -z "$ac_c_werror_flag" || 12139 test -z "$ac_c_werror_flag" ||
12674 test ! -s conftest.err 12140 test ! -s conftest.err
12675 } && test -s conftest$ac_exeext && { 12141 } && test -s conftest$ac_exeext &&
12676 test "$cross_compiling" = yes || 12142 $as_test_x conftest$ac_exeext; then
12677 $as_test_x conftest$ac_exeext 12143 { echo "$as_me:$LINENO: result: yes" >&5
12678 }; then 12144echo "${ECHO_T}yes" >&6; }
12679 { $as_echo "$as_me:$LINENO: result: yes" >&5
12680$as_echo "yes" >&6; }
12681else 12145else
12682 $as_echo "$as_me: failed program was:" >&5 12146 echo "$as_me: failed program was:" >&5
12683sed 's/^/| /' conftest.$ac_ext >&5 12147sed 's/^/| /' conftest.$ac_ext >&5
12684 12148
12685 12149
12686 { $as_echo "$as_me:$LINENO: result: no" >&5 12150 { echo "$as_me:$LINENO: result: no" >&5
12687$as_echo "no" >&6; } 12151echo "${ECHO_T}no" >&6; }
12688 { { $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
12689$as_echo "$as_me: error: ** Incomplete or missing s/key libraries." >&2;} 12153echo "$as_me: error: ** Incomplete or missing s/key libraries." >&2;}
12690 { (exit 1); exit 1; }; } 12154 { (exit 1); exit 1; }; }
12691 12155
12692fi 12156fi
12693 12157
12694rm -rf conftest.dSYM
12695rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 12158rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12696 conftest$ac_exeext conftest.$ac_ext 12159 conftest$ac_exeext conftest.$ac_ext
12697 { $as_echo "$as_me:$LINENO: checking if skeychallenge takes 4 arguments" >&5 12160 { echo "$as_me:$LINENO: checking if skeychallenge takes 4 arguments" >&5
12698$as_echo_n "checking if skeychallenge takes 4 arguments... " >&6; } 12161echo $ECHO_N "checking if skeychallenge takes 4 arguments... $ECHO_C" >&6; }
12699 cat >conftest.$ac_ext <<_ACEOF 12162 cat >conftest.$ac_ext <<_ACEOF
12700/* confdefs.h. */ 12163/* confdefs.h. */
12701_ACEOF 12164_ACEOF
@@ -12718,31 +12181,30 @@ case "(($ac_try" in
12718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12719 *) ac_try_echo=$ac_try;; 12182 *) ac_try_echo=$ac_try;;
12720esac 12183esac
12721eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12722$as_echo "$ac_try_echo") >&5
12723 (eval "$ac_compile") 2>conftest.er1 12185 (eval "$ac_compile") 2>conftest.er1
12724 ac_status=$? 12186 ac_status=$?
12725 grep -v '^ *+' conftest.er1 >conftest.err 12187 grep -v '^ *+' conftest.er1 >conftest.err
12726 rm -f conftest.er1 12188 rm -f conftest.er1
12727 cat conftest.err >&5 12189 cat conftest.err >&5
12728 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12729 (exit $ac_status); } && { 12191 (exit $ac_status); } && {
12730 test -z "$ac_c_werror_flag" || 12192 test -z "$ac_c_werror_flag" ||
12731 test ! -s conftest.err 12193 test ! -s conftest.err
12732 } && test -s conftest.$ac_objext; then 12194 } && test -s conftest.$ac_objext; then
12733 { $as_echo "$as_me:$LINENO: result: yes" >&5 12195 { echo "$as_me:$LINENO: result: yes" >&5
12734$as_echo "yes" >&6; } 12196echo "${ECHO_T}yes" >&6; }
12735 12197
12736cat >>confdefs.h <<\_ACEOF 12198cat >>confdefs.h <<\_ACEOF
12737#define SKEYCHALLENGE_4ARG 1 12199#define SKEYCHALLENGE_4ARG 1
12738_ACEOF 12200_ACEOF
12739 12201
12740else 12202else
12741 $as_echo "$as_me: failed program was:" >&5 12203 echo "$as_me: failed program was:" >&5
12742sed 's/^/| /' conftest.$ac_ext >&5 12204sed 's/^/| /' conftest.$ac_ext >&5
12743 12205
12744 { $as_echo "$as_me:$LINENO: result: no" >&5 12206 { echo "$as_me:$LINENO: result: no" >&5
12745$as_echo "no" >&6; } 12207echo "${ECHO_T}no" >&6; }
12746 12208
12747fi 12209fi
12748 12210
@@ -12785,8 +12247,8 @@ if test "${with_tcp_wrappers+set}" = set; then
12785 fi 12247 fi
12786 fi 12248 fi
12787 LIBS="-lwrap $LIBS" 12249 LIBS="-lwrap $LIBS"
12788 { $as_echo "$as_me:$LINENO: checking for libwrap" >&5 12250 { echo "$as_me:$LINENO: checking for libwrap" >&5
12789$as_echo_n "checking for libwrap... " >&6; } 12251echo $ECHO_N "checking for libwrap... $ECHO_C" >&6; }
12790 cat >conftest.$ac_ext <<_ACEOF 12252 cat >conftest.$ac_ext <<_ACEOF
12791/* confdefs.h. */ 12253/* confdefs.h. */
12792_ACEOF 12254_ACEOF
@@ -12814,24 +12276,21 @@ case "(($ac_try" in
12814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12815 *) ac_try_echo=$ac_try;; 12277 *) ac_try_echo=$ac_try;;
12816esac 12278esac
12817eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12818$as_echo "$ac_try_echo") >&5
12819 (eval "$ac_link") 2>conftest.er1 12280 (eval "$ac_link") 2>conftest.er1
12820 ac_status=$? 12281 ac_status=$?
12821 grep -v '^ *+' conftest.er1 >conftest.err 12282 grep -v '^ *+' conftest.er1 >conftest.err
12822 rm -f conftest.er1 12283 rm -f conftest.er1
12823 cat conftest.err >&5 12284 cat conftest.err >&5
12824 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12825 (exit $ac_status); } && { 12286 (exit $ac_status); } && {
12826 test -z "$ac_c_werror_flag" || 12287 test -z "$ac_c_werror_flag" ||
12827 test ! -s conftest.err 12288 test ! -s conftest.err
12828 } && test -s conftest$ac_exeext && { 12289 } && test -s conftest$ac_exeext &&
12829 test "$cross_compiling" = yes || 12290 $as_test_x conftest$ac_exeext; then
12830 $as_test_x conftest$ac_exeext
12831 }; then
12832 12291
12833 { $as_echo "$as_me:$LINENO: result: yes" >&5 12292 { echo "$as_me:$LINENO: result: yes" >&5
12834$as_echo "yes" >&6; } 12293echo "${ECHO_T}yes" >&6; }
12835 12294
12836cat >>confdefs.h <<\_ACEOF 12295cat >>confdefs.h <<\_ACEOF
12837#define LIBWRAP 1 12296#define LIBWRAP 1
@@ -12841,18 +12300,17 @@ _ACEOF
12841 TCPW_MSG="yes" 12300 TCPW_MSG="yes"
12842 12301
12843else 12302else
12844 $as_echo "$as_me: failed program was:" >&5 12303 echo "$as_me: failed program was:" >&5
12845sed 's/^/| /' conftest.$ac_ext >&5 12304sed 's/^/| /' conftest.$ac_ext >&5
12846 12305
12847 12306
12848 { { $as_echo "$as_me:$LINENO: error: *** libwrap missing" >&5 12307 { { echo "$as_me:$LINENO: error: *** libwrap missing" >&5
12849$as_echo "$as_me: error: *** libwrap missing" >&2;} 12308echo "$as_me: error: *** libwrap missing" >&2;}
12850 { (exit 1); exit 1; }; } 12309 { (exit 1); exit 1; }; }
12851 12310
12852 12311
12853fi 12312fi
12854 12313
12855rm -rf conftest.dSYM
12856rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 12314rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12857 conftest$ac_exeext conftest.$ac_ext 12315 conftest$ac_exeext conftest.$ac_ext
12858 LIBS="$saved_LIBS" 12316 LIBS="$saved_LIBS"
@@ -12876,10 +12334,10 @@ if test "${with_libedit+set}" = set; then
12876 LDFLAGS="-L${withval}/lib ${LDFLAGS}" 12334 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
12877 fi 12335 fi
12878 fi 12336 fi
12879 { $as_echo "$as_me:$LINENO: checking for el_init in -ledit" >&5 12337 { echo "$as_me:$LINENO: checking for el_init in -ledit" >&5
12880$as_echo_n "checking for el_init in -ledit... " >&6; } 12338echo $ECHO_N "checking for el_init in -ledit... $ECHO_C" >&6; }
12881if test "${ac_cv_lib_edit_el_init+set}" = set; then 12339if test "${ac_cv_lib_edit_el_init+set}" = set; then
12882 $as_echo_n "(cached) " >&6 12340 echo $ECHO_N "(cached) $ECHO_C" >&6
12883else 12341else
12884 ac_check_lib_save_LIBS=$LIBS 12342 ac_check_lib_save_LIBS=$LIBS
12885LIBS="-ledit -lcurses 12343LIBS="-ledit -lcurses
@@ -12912,36 +12370,32 @@ case "(($ac_try" in
12912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12913 *) ac_try_echo=$ac_try;; 12371 *) ac_try_echo=$ac_try;;
12914esac 12372esac
12915eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12916$as_echo "$ac_try_echo") >&5
12917 (eval "$ac_link") 2>conftest.er1 12374 (eval "$ac_link") 2>conftest.er1
12918 ac_status=$? 12375 ac_status=$?
12919 grep -v '^ *+' conftest.er1 >conftest.err 12376 grep -v '^ *+' conftest.er1 >conftest.err
12920 rm -f conftest.er1 12377 rm -f conftest.er1
12921 cat conftest.err >&5 12378 cat conftest.err >&5
12922 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12923 (exit $ac_status); } && { 12380 (exit $ac_status); } && {
12924 test -z "$ac_c_werror_flag" || 12381 test -z "$ac_c_werror_flag" ||
12925 test ! -s conftest.err 12382 test ! -s conftest.err
12926 } && test -s conftest$ac_exeext && { 12383 } && test -s conftest$ac_exeext &&
12927 test "$cross_compiling" = yes || 12384 $as_test_x conftest$ac_exeext; then
12928 $as_test_x conftest$ac_exeext
12929 }; then
12930 ac_cv_lib_edit_el_init=yes 12385 ac_cv_lib_edit_el_init=yes
12931else 12386else
12932 $as_echo "$as_me: failed program was:" >&5 12387 echo "$as_me: failed program was:" >&5
12933sed 's/^/| /' conftest.$ac_ext >&5 12388sed 's/^/| /' conftest.$ac_ext >&5
12934 12389
12935 ac_cv_lib_edit_el_init=no 12390 ac_cv_lib_edit_el_init=no
12936fi 12391fi
12937 12392
12938rm -rf conftest.dSYM
12939rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 12393rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12940 conftest$ac_exeext conftest.$ac_ext 12394 conftest$ac_exeext conftest.$ac_ext
12941LIBS=$ac_check_lib_save_LIBS 12395LIBS=$ac_check_lib_save_LIBS
12942fi 12396fi
12943{ $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
12944$as_echo "$ac_cv_lib_edit_el_init" >&6; } 12398echo "${ECHO_T}$ac_cv_lib_edit_el_init" >&6; }
12945if test $ac_cv_lib_edit_el_init = yes; then 12399if test $ac_cv_lib_edit_el_init = yes; then
12946 12400
12947cat >>confdefs.h <<\_ACEOF 12401cat >>confdefs.h <<\_ACEOF
@@ -12953,13 +12407,13 @@ _ACEOF
12953 12407
12954 12408
12955else 12409else
12956 { { $as_echo "$as_me:$LINENO: error: libedit not found" >&5 12410 { { echo "$as_me:$LINENO: error: libedit not found" >&5
12957$as_echo "$as_me: error: libedit not found" >&2;} 12411echo "$as_me: error: libedit not found" >&2;}
12958 { (exit 1); exit 1; }; } 12412 { (exit 1); exit 1; }; }
12959fi 12413fi
12960 12414
12961 { $as_echo "$as_me:$LINENO: checking if libedit version is compatible" >&5 12415 { echo "$as_me:$LINENO: checking if libedit version is compatible" >&5
12962$as_echo_n "checking if libedit version is compatible... " >&6; } 12416echo $ECHO_N "checking if libedit version is compatible... $ECHO_C" >&6; }
12963 cat >conftest.$ac_ext <<_ACEOF 12417 cat >conftest.$ac_ext <<_ACEOF
12964/* confdefs.h. */ 12418/* confdefs.h. */
12965_ACEOF 12419_ACEOF
@@ -12982,28 +12436,27 @@ case "(($ac_try" in
12982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12983 *) ac_try_echo=$ac_try;; 12437 *) ac_try_echo=$ac_try;;
12984esac 12438esac
12985eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12986$as_echo "$ac_try_echo") >&5
12987 (eval "$ac_compile") 2>conftest.er1 12440 (eval "$ac_compile") 2>conftest.er1
12988 ac_status=$? 12441 ac_status=$?
12989 grep -v '^ *+' conftest.er1 >conftest.err 12442 grep -v '^ *+' conftest.er1 >conftest.err
12990 rm -f conftest.er1 12443 rm -f conftest.er1
12991 cat conftest.err >&5 12444 cat conftest.err >&5
12992 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12993 (exit $ac_status); } && { 12446 (exit $ac_status); } && {
12994 test -z "$ac_c_werror_flag" || 12447 test -z "$ac_c_werror_flag" ||
12995 test ! -s conftest.err 12448 test ! -s conftest.err
12996 } && test -s conftest.$ac_objext; then 12449 } && test -s conftest.$ac_objext; then
12997 { $as_echo "$as_me:$LINENO: result: yes" >&5 12450 { echo "$as_me:$LINENO: result: yes" >&5
12998$as_echo "yes" >&6; } 12451echo "${ECHO_T}yes" >&6; }
12999else 12452else
13000 $as_echo "$as_me: failed program was:" >&5 12453 echo "$as_me: failed program was:" >&5
13001sed 's/^/| /' conftest.$ac_ext >&5 12454sed 's/^/| /' conftest.$ac_ext >&5
13002 12455
13003 { $as_echo "$as_me:$LINENO: result: no" >&5 12456 { echo "$as_me:$LINENO: result: no" >&5
13004$as_echo "no" >&6; } 12457echo "${ECHO_T}no" >&6; }
13005 { { $as_echo "$as_me:$LINENO: error: libedit version is not compatible" >&5 12458 { { echo "$as_me:$LINENO: error: libedit version is not compatible" >&5
13006$as_echo "$as_me: error: libedit version is not compatible" >&2;} 12459echo "$as_me: error: libedit version is not compatible" >&2;}
13007 { (exit 1); exit 1; }; } 12460 { (exit 1); exit 1; }; }
13008 12461
13009fi 12462fi
@@ -13019,21 +12472,21 @@ AUDIT_MODULE=none
13019# Check whether --with-audit was given. 12472# Check whether --with-audit was given.
13020if test "${with_audit+set}" = set; then 12473if test "${with_audit+set}" = set; then
13021 withval=$with_audit; 12474 withval=$with_audit;
13022 { $as_echo "$as_me:$LINENO: checking for supported audit module" >&5 12475 { echo "$as_me:$LINENO: checking for supported audit module" >&5
13023$as_echo_n "checking for supported audit module... " >&6; } 12476echo $ECHO_N "checking for supported audit module... $ECHO_C" >&6; }
13024 case "$withval" in 12477 case "$withval" in
13025 bsm) 12478 bsm)
13026 { $as_echo "$as_me:$LINENO: result: bsm" >&5 12479 { echo "$as_me:$LINENO: result: bsm" >&5
13027$as_echo "bsm" >&6; } 12480echo "${ECHO_T}bsm" >&6; }
13028 AUDIT_MODULE=bsm 12481 AUDIT_MODULE=bsm
13029 12482
13030for ac_header in bsm/audit.h 12483for ac_header in bsm/audit.h
13031do 12484do
13032as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 12485as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13033{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 12486{ echo "$as_me:$LINENO: checking for $ac_header" >&5
13034$as_echo_n "checking for $ac_header... " >&6; } 12487echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13035if { 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
13036 $as_echo_n "(cached) " >&6 12489 echo $ECHO_N "(cached) $ECHO_C" >&6
13037else 12490else
13038 cat >conftest.$ac_ext <<_ACEOF 12491 cat >conftest.$ac_ext <<_ACEOF
13039/* confdefs.h. */ 12492/* confdefs.h. */
@@ -13056,21 +12509,20 @@ case "(($ac_try" in
13056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13057 *) ac_try_echo=$ac_try;; 12510 *) ac_try_echo=$ac_try;;
13058esac 12511esac
13059eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13060$as_echo "$ac_try_echo") >&5
13061 (eval "$ac_compile") 2>conftest.er1 12513 (eval "$ac_compile") 2>conftest.er1
13062 ac_status=$? 12514 ac_status=$?
13063 grep -v '^ *+' conftest.er1 >conftest.err 12515 grep -v '^ *+' conftest.er1 >conftest.err
13064 rm -f conftest.er1 12516 rm -f conftest.er1
13065 cat conftest.err >&5 12517 cat conftest.err >&5
13066 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13067 (exit $ac_status); } && { 12519 (exit $ac_status); } && {
13068 test -z "$ac_c_werror_flag" || 12520 test -z "$ac_c_werror_flag" ||
13069 test ! -s conftest.err 12521 test ! -s conftest.err
13070 } && test -s conftest.$ac_objext; then 12522 } && test -s conftest.$ac_objext; then
13071 eval "$as_ac_Header=yes" 12523 eval "$as_ac_Header=yes"
13072else 12524else
13073 $as_echo "$as_me: failed program was:" >&5 12525 echo "$as_me: failed program was:" >&5
13074sed 's/^/| /' conftest.$ac_ext >&5 12526sed 's/^/| /' conftest.$ac_ext >&5
13075 12527
13076 eval "$as_ac_Header=no" 12528 eval "$as_ac_Header=no"
@@ -13078,29 +12530,27 @@ fi
13078 12530
13079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13080fi 12532fi
13081ac_res=`eval 'as_val=${'$as_ac_Header'} 12533ac_res=`eval echo '${'$as_ac_Header'}'`
13082 $as_echo "$as_val"'` 12534 { echo "$as_me:$LINENO: result: $ac_res" >&5
13083 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 12535echo "${ECHO_T}$ac_res" >&6; }
13084$as_echo "$ac_res" >&6; } 12536if test `eval echo '${'$as_ac_Header'}'` = yes; then
13085if test `eval 'as_val=${'$as_ac_Header'}
13086 $as_echo "$as_val"'` = yes; then
13087 cat >>confdefs.h <<_ACEOF 12537 cat >>confdefs.h <<_ACEOF
13088#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 12538#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13089_ACEOF 12539_ACEOF
13090 12540
13091else 12541else
13092 { { $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
13093$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;}
13094 { (exit 1); exit 1; }; } 12544 { (exit 1); exit 1; }; }
13095fi 12545fi
13096 12546
13097done 12547done
13098 12548
13099 12549
13100{ $as_echo "$as_me:$LINENO: checking for getaudit in -lbsm" >&5 12550{ echo "$as_me:$LINENO: checking for getaudit in -lbsm" >&5
13101$as_echo_n "checking for getaudit in -lbsm... " >&6; } 12551echo $ECHO_N "checking for getaudit in -lbsm... $ECHO_C" >&6; }
13102if test "${ac_cv_lib_bsm_getaudit+set}" = set; then 12552if test "${ac_cv_lib_bsm_getaudit+set}" = set; then
13103 $as_echo_n "(cached) " >&6 12553 echo $ECHO_N "(cached) $ECHO_C" >&6
13104else 12554else
13105 ac_check_lib_save_LIBS=$LIBS 12555 ac_check_lib_save_LIBS=$LIBS
13106LIBS="-lbsm $LIBS" 12556LIBS="-lbsm $LIBS"
@@ -13132,36 +12582,32 @@ case "(($ac_try" in
13132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13133 *) ac_try_echo=$ac_try;; 12583 *) ac_try_echo=$ac_try;;
13134esac 12584esac
13135eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13136$as_echo "$ac_try_echo") >&5
13137 (eval "$ac_link") 2>conftest.er1 12586 (eval "$ac_link") 2>conftest.er1
13138 ac_status=$? 12587 ac_status=$?
13139 grep -v '^ *+' conftest.er1 >conftest.err 12588 grep -v '^ *+' conftest.er1 >conftest.err
13140 rm -f conftest.er1 12589 rm -f conftest.er1
13141 cat conftest.err >&5 12590 cat conftest.err >&5
13142 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13143 (exit $ac_status); } && { 12592 (exit $ac_status); } && {
13144 test -z "$ac_c_werror_flag" || 12593 test -z "$ac_c_werror_flag" ||
13145 test ! -s conftest.err 12594 test ! -s conftest.err
13146 } && test -s conftest$ac_exeext && { 12595 } && test -s conftest$ac_exeext &&
13147 test "$cross_compiling" = yes || 12596 $as_test_x conftest$ac_exeext; then
13148 $as_test_x conftest$ac_exeext
13149 }; then
13150 ac_cv_lib_bsm_getaudit=yes 12597 ac_cv_lib_bsm_getaudit=yes
13151else 12598else
13152 $as_echo "$as_me: failed program was:" >&5 12599 echo "$as_me: failed program was:" >&5
13153sed 's/^/| /' conftest.$ac_ext >&5 12600sed 's/^/| /' conftest.$ac_ext >&5
13154 12601
13155 ac_cv_lib_bsm_getaudit=no 12602 ac_cv_lib_bsm_getaudit=no
13156fi 12603fi
13157 12604
13158rm -rf conftest.dSYM
13159rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 12605rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13160 conftest$ac_exeext conftest.$ac_ext 12606 conftest$ac_exeext conftest.$ac_ext
13161LIBS=$ac_check_lib_save_LIBS 12607LIBS=$ac_check_lib_save_LIBS
13162fi 12608fi
13163{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsm_getaudit" >&5 12609{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsm_getaudit" >&5
13164$as_echo "$ac_cv_lib_bsm_getaudit" >&6; } 12610echo "${ECHO_T}$ac_cv_lib_bsm_getaudit" >&6; }
13165if test $ac_cv_lib_bsm_getaudit = yes; then 12611if test $ac_cv_lib_bsm_getaudit = yes; then
13166 cat >>confdefs.h <<_ACEOF 12612 cat >>confdefs.h <<_ACEOF
13167#define HAVE_LIBBSM 1 12613#define HAVE_LIBBSM 1
@@ -13170,19 +12616,19 @@ _ACEOF
13170 LIBS="-lbsm $LIBS" 12616 LIBS="-lbsm $LIBS"
13171 12617
13172else 12618else
13173 { { $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
13174$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;}
13175 { (exit 1); exit 1; }; } 12621 { (exit 1); exit 1; }; }
13176fi 12622fi
13177 12623
13178 12624
13179for ac_func in getaudit 12625for ac_func in getaudit
13180do 12626do
13181as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 12627as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13182{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 12628{ echo "$as_me:$LINENO: checking for $ac_func" >&5
13183$as_echo_n "checking for $ac_func... " >&6; } 12629echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
13184if { 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
13185 $as_echo_n "(cached) " >&6 12631 echo $ECHO_N "(cached) $ECHO_C" >&6
13186else 12632else
13187 cat >conftest.$ac_ext <<_ACEOF 12633 cat >conftest.$ac_ext <<_ACEOF
13188/* confdefs.h. */ 12634/* confdefs.h. */
@@ -13235,46 +12681,40 @@ case "(($ac_try" in
13235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13236 *) ac_try_echo=$ac_try;; 12682 *) ac_try_echo=$ac_try;;
13237esac 12683esac
13238eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13239$as_echo "$ac_try_echo") >&5
13240 (eval "$ac_link") 2>conftest.er1 12685 (eval "$ac_link") 2>conftest.er1
13241 ac_status=$? 12686 ac_status=$?
13242 grep -v '^ *+' conftest.er1 >conftest.err 12687 grep -v '^ *+' conftest.er1 >conftest.err
13243 rm -f conftest.er1 12688 rm -f conftest.er1
13244 cat conftest.err >&5 12689 cat conftest.err >&5
13245 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13246 (exit $ac_status); } && { 12691 (exit $ac_status); } && {
13247 test -z "$ac_c_werror_flag" || 12692 test -z "$ac_c_werror_flag" ||
13248 test ! -s conftest.err 12693 test ! -s conftest.err
13249 } && test -s conftest$ac_exeext && { 12694 } && test -s conftest$ac_exeext &&
13250 test "$cross_compiling" = yes || 12695 $as_test_x conftest$ac_exeext; then
13251 $as_test_x conftest$ac_exeext
13252 }; then
13253 eval "$as_ac_var=yes" 12696 eval "$as_ac_var=yes"
13254else 12697else
13255 $as_echo "$as_me: failed program was:" >&5 12698 echo "$as_me: failed program was:" >&5
13256sed 's/^/| /' conftest.$ac_ext >&5 12699sed 's/^/| /' conftest.$ac_ext >&5
13257 12700
13258 eval "$as_ac_var=no" 12701 eval "$as_ac_var=no"
13259fi 12702fi
13260 12703
13261rm -rf conftest.dSYM
13262rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 12704rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13263 conftest$ac_exeext conftest.$ac_ext 12705 conftest$ac_exeext conftest.$ac_ext
13264fi 12706fi
13265ac_res=`eval 'as_val=${'$as_ac_var'} 12707ac_res=`eval echo '${'$as_ac_var'}'`
13266 $as_echo "$as_val"'` 12708 { echo "$as_me:$LINENO: result: $ac_res" >&5
13267 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 12709echo "${ECHO_T}$ac_res" >&6; }
13268$as_echo "$ac_res" >&6; } 12710if test `eval echo '${'$as_ac_var'}'` = yes; then
13269if test `eval 'as_val=${'$as_ac_var'}
13270 $as_echo "$as_val"'` = yes; then
13271 cat >>confdefs.h <<_ACEOF 12711 cat >>confdefs.h <<_ACEOF
13272#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 12712#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13273_ACEOF 12713_ACEOF
13274 12714
13275else 12715else
13276 { { $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
13277$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;}
13278 { (exit 1); exit 1; }; } 12718 { (exit 1); exit 1; }; }
13279fi 12719fi
13280done 12720done
@@ -13284,11 +12724,11 @@ done
13284 12724
13285for ac_func in getaudit_addr aug_get_machine 12725for ac_func in getaudit_addr aug_get_machine
13286do 12726do
13287as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 12727as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13288{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 12728{ echo "$as_me:$LINENO: checking for $ac_func" >&5
13289$as_echo_n "checking for $ac_func... " >&6; } 12729echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
13290if { 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
13291 $as_echo_n "(cached) " >&6 12731 echo $ECHO_N "(cached) $ECHO_C" >&6
13292else 12732else
13293 cat >conftest.$ac_ext <<_ACEOF 12733 cat >conftest.$ac_ext <<_ACEOF
13294/* confdefs.h. */ 12734/* confdefs.h. */
@@ -13341,41 +12781,35 @@ case "(($ac_try" in
13341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 12781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13342 *) ac_try_echo=$ac_try;; 12782 *) ac_try_echo=$ac_try;;
13343esac 12783esac
13344eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 12784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13345$as_echo "$ac_try_echo") >&5
13346 (eval "$ac_link") 2>conftest.er1 12785 (eval "$ac_link") 2>conftest.er1
13347 ac_status=$? 12786 ac_status=$?
13348 grep -v '^ *+' conftest.er1 >conftest.err 12787 grep -v '^ *+' conftest.er1 >conftest.err
13349 rm -f conftest.er1 12788 rm -f conftest.er1
13350 cat conftest.err >&5 12789 cat conftest.err >&5
13351 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 12790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13352 (exit $ac_status); } && { 12791 (exit $ac_status); } && {
13353 test -z "$ac_c_werror_flag" || 12792 test -z "$ac_c_werror_flag" ||
13354 test ! -s conftest.err 12793 test ! -s conftest.err
13355 } && test -s conftest$ac_exeext && { 12794 } && test -s conftest$ac_exeext &&
13356 test "$cross_compiling" = yes || 12795 $as_test_x conftest$ac_exeext; then
13357 $as_test_x conftest$ac_exeext
13358 }; then
13359 eval "$as_ac_var=yes" 12796 eval "$as_ac_var=yes"
13360else 12797else
13361 $as_echo "$as_me: failed program was:" >&5 12798 echo "$as_me: failed program was:" >&5
13362sed 's/^/| /' conftest.$ac_ext >&5 12799sed 's/^/| /' conftest.$ac_ext >&5
13363 12800
13364 eval "$as_ac_var=no" 12801 eval "$as_ac_var=no"
13365fi 12802fi
13366 12803
13367rm -rf conftest.dSYM
13368rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 12804rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13369 conftest$ac_exeext conftest.$ac_ext 12805 conftest$ac_exeext conftest.$ac_ext
13370fi 12806fi
13371ac_res=`eval 'as_val=${'$as_ac_var'} 12807ac_res=`eval echo '${'$as_ac_var'}'`
13372 $as_echo "$as_val"'` 12808 { echo "$as_me:$LINENO: result: $ac_res" >&5
13373 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 12809echo "${ECHO_T}$ac_res" >&6; }
13374$as_echo "$ac_res" >&6; } 12810if test `eval echo '${'$as_ac_var'}'` = yes; then
13375if test `eval 'as_val=${'$as_ac_var'}
13376 $as_echo "$as_val"'` = yes; then
13377 cat >>confdefs.h <<_ACEOF 12811 cat >>confdefs.h <<_ACEOF
13378#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 12812#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13379_ACEOF 12813_ACEOF
13380 12814
13381fi 12815fi
@@ -13389,8 +12823,8 @@ _ACEOF
13389 ;; 12823 ;;
13390 debug) 12824 debug)
13391 AUDIT_MODULE=debug 12825 AUDIT_MODULE=debug
13392 { $as_echo "$as_me:$LINENO: result: debug" >&5 12826 { echo "$as_me:$LINENO: result: debug" >&5
13393$as_echo "debug" >&6; } 12827echo "${ECHO_T}debug" >&6; }
13394 12828
13395cat >>confdefs.h <<\_ACEOF 12829cat >>confdefs.h <<\_ACEOF
13396#define SSH_AUDIT_EVENTS 1 12830#define SSH_AUDIT_EVENTS 1
@@ -13398,12 +12832,12 @@ _ACEOF
13398 12832
13399 ;; 12833 ;;
13400 no) 12834 no)
13401 { $as_echo "$as_me:$LINENO: result: no" >&5 12835 { echo "$as_me:$LINENO: result: no" >&5
13402$as_echo "no" >&6; } 12836echo "${ECHO_T}no" >&6; }
13403 ;; 12837 ;;
13404 *) 12838 *)
13405 { { $as_echo "$as_me:$LINENO: error: Unknown audit module $withval" >&5 12839 { { echo "$as_me:$LINENO: error: Unknown audit module $withval" >&5
13406$as_echo "$as_me: error: Unknown audit module $withval" >&2;} 12840echo "$as_me: error: Unknown audit module $withval" >&2;}
13407 { (exit 1); exit 1; }; } 12841 { (exit 1); exit 1; }; }
13408 ;; 12842 ;;
13409 esac 12843 esac
@@ -13500,6 +12934,10 @@ fi
13500 12934
13501 12935
13502 12936
12937
12938
12939
12940
13503for ac_func in \ 12941for ac_func in \
13504 arc4random \ 12942 arc4random \
13505 arc4random_buf \ 12943 arc4random_buf \
@@ -13530,6 +12968,7 @@ for ac_func in \
13530 getrlimit \ 12968 getrlimit \
13531 getttyent \ 12969 getttyent \
13532 glob \ 12970 glob \
12971 group_from_gid \
13533 inet_aton \ 12972 inet_aton \
13534 inet_ntoa \ 12973 inet_ntoa \
13535 inet_ntop \ 12974 inet_ntop \
@@ -13556,8 +12995,10 @@ for ac_func in \
13556 setegid \ 12995 setegid \
13557 setenv \ 12996 setenv \
13558 seteuid \ 12997 seteuid \
12998 setgroupent \
13559 setgroups \ 12999 setgroups \
13560 setlogin \ 13000 setlogin \
13001 setpassent\
13561 setpcred \ 13002 setpcred \
13562 setproctitle \ 13003 setproctitle \
13563 setregid \ 13004 setregid \
@@ -13586,17 +13027,18 @@ for ac_func in \
13586 truncate \ 13027 truncate \
13587 unsetenv \ 13028 unsetenv \
13588 updwtmpx \ 13029 updwtmpx \
13030 user_from_uid \
13589 vasprintf \ 13031 vasprintf \
13590 vhangup \ 13032 vhangup \
13591 vsnprintf \ 13033 vsnprintf \
13592 waitpid \ 13034 waitpid \
13593 13035
13594do 13036do
13595as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 13037as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13596{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 13038{ echo "$as_me:$LINENO: checking for $ac_func" >&5
13597$as_echo_n "checking for $ac_func... " >&6; } 13039echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
13598if { 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
13599 $as_echo_n "(cached) " >&6 13041 echo $ECHO_N "(cached) $ECHO_C" >&6
13600else 13042else
13601 cat >conftest.$ac_ext <<_ACEOF 13043 cat >conftest.$ac_ext <<_ACEOF
13602/* confdefs.h. */ 13044/* confdefs.h. */
@@ -13649,56 +13091,140 @@ case "(($ac_try" in
13649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13650 *) ac_try_echo=$ac_try;; 13092 *) ac_try_echo=$ac_try;;
13651esac 13093esac
13652eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13653$as_echo "$ac_try_echo") >&5
13654 (eval "$ac_link") 2>conftest.er1 13095 (eval "$ac_link") 2>conftest.er1
13655 ac_status=$? 13096 ac_status=$?
13656 grep -v '^ *+' conftest.er1 >conftest.err 13097 grep -v '^ *+' conftest.er1 >conftest.err
13657 rm -f conftest.er1 13098 rm -f conftest.er1
13658 cat conftest.err >&5 13099 cat conftest.err >&5
13659 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13660 (exit $ac_status); } && { 13101 (exit $ac_status); } && {
13661 test -z "$ac_c_werror_flag" || 13102 test -z "$ac_c_werror_flag" ||
13662 test ! -s conftest.err 13103 test ! -s conftest.err
13663 } && test -s conftest$ac_exeext && { 13104 } && test -s conftest$ac_exeext &&
13664 test "$cross_compiling" = yes || 13105 $as_test_x conftest$ac_exeext; then
13665 $as_test_x conftest$ac_exeext
13666 }; then
13667 eval "$as_ac_var=yes" 13106 eval "$as_ac_var=yes"
13668else 13107else
13669 $as_echo "$as_me: failed program was:" >&5 13108 echo "$as_me: failed program was:" >&5
13670sed 's/^/| /' conftest.$ac_ext >&5 13109sed 's/^/| /' conftest.$ac_ext >&5
13671 13110
13672 eval "$as_ac_var=no" 13111 eval "$as_ac_var=no"
13673fi 13112fi
13674 13113
13675rm -rf conftest.dSYM
13676rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 13114rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13677 conftest$ac_exeext conftest.$ac_ext 13115 conftest$ac_exeext conftest.$ac_ext
13678fi 13116fi
13679ac_res=`eval 'as_val=${'$as_ac_var'} 13117ac_res=`eval echo '${'$as_ac_var'}'`
13680 $as_echo "$as_val"'` 13118 { echo "$as_me:$LINENO: result: $ac_res" >&5
13681 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 13119echo "${ECHO_T}$ac_res" >&6; }
13682$as_echo "$ac_res" >&6; } 13120if test `eval echo '${'$as_ac_var'}'` = yes; then
13683if test `eval 'as_val=${'$as_ac_var'}
13684 $as_echo "$as_val"'` = yes; then
13685 cat >>confdefs.h <<_ACEOF 13121 cat >>confdefs.h <<_ACEOF
13686#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 13122#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13687_ACEOF 13123_ACEOF
13688 13124
13689fi 13125fi
13690done 13126done
13691 13127
13692 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}
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
13188
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
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
13217
13218
13693# IRIX has a const char return value for gai_strerror() 13219# IRIX has a const char return value for gai_strerror()
13694 13220
13695for ac_func in gai_strerror 13221for ac_func in gai_strerror
13696do 13222do
13697as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 13223as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13698{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 13224{ echo "$as_me:$LINENO: checking for $ac_func" >&5
13699$as_echo_n "checking for $ac_func... " >&6; } 13225echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
13700if { 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
13701 $as_echo_n "(cached) " >&6 13227 echo $ECHO_N "(cached) $ECHO_C" >&6
13702else 13228else
13703 cat >conftest.$ac_ext <<_ACEOF 13229 cat >conftest.$ac_ext <<_ACEOF
13704/* confdefs.h. */ 13230/* confdefs.h. */
@@ -13751,41 +13277,35 @@ case "(($ac_try" in
13751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13752 *) ac_try_echo=$ac_try;; 13278 *) ac_try_echo=$ac_try;;
13753esac 13279esac
13754eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13755$as_echo "$ac_try_echo") >&5
13756 (eval "$ac_link") 2>conftest.er1 13281 (eval "$ac_link") 2>conftest.er1
13757 ac_status=$? 13282 ac_status=$?
13758 grep -v '^ *+' conftest.er1 >conftest.err 13283 grep -v '^ *+' conftest.er1 >conftest.err
13759 rm -f conftest.er1 13284 rm -f conftest.er1
13760 cat conftest.err >&5 13285 cat conftest.err >&5
13761 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13762 (exit $ac_status); } && { 13287 (exit $ac_status); } && {
13763 test -z "$ac_c_werror_flag" || 13288 test -z "$ac_c_werror_flag" ||
13764 test ! -s conftest.err 13289 test ! -s conftest.err
13765 } && test -s conftest$ac_exeext && { 13290 } && test -s conftest$ac_exeext &&
13766 test "$cross_compiling" = yes || 13291 $as_test_x conftest$ac_exeext; then
13767 $as_test_x conftest$ac_exeext
13768 }; then
13769 eval "$as_ac_var=yes" 13292 eval "$as_ac_var=yes"
13770else 13293else
13771 $as_echo "$as_me: failed program was:" >&5 13294 echo "$as_me: failed program was:" >&5
13772sed 's/^/| /' conftest.$ac_ext >&5 13295sed 's/^/| /' conftest.$ac_ext >&5
13773 13296
13774 eval "$as_ac_var=no" 13297 eval "$as_ac_var=no"
13775fi 13298fi
13776 13299
13777rm -rf conftest.dSYM
13778rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 13300rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13779 conftest$ac_exeext conftest.$ac_ext 13301 conftest$ac_exeext conftest.$ac_ext
13780fi 13302fi
13781ac_res=`eval 'as_val=${'$as_ac_var'} 13303ac_res=`eval echo '${'$as_ac_var'}'`
13782 $as_echo "$as_val"'` 13304 { echo "$as_me:$LINENO: result: $ac_res" >&5
13783 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 13305echo "${ECHO_T}$ac_res" >&6; }
13784$as_echo "$ac_res" >&6; } 13306if test `eval echo '${'$as_ac_var'}'` = yes; then
13785if test `eval 'as_val=${'$as_ac_var'}
13786 $as_echo "$as_val"'` = yes; then
13787 cat >>confdefs.h <<_ACEOF 13307 cat >>confdefs.h <<_ACEOF
13788#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 13308#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13789_ACEOF 13309_ACEOF
13790 13310
13791 cat >>confdefs.h <<\_ACEOF 13311 cat >>confdefs.h <<\_ACEOF
@@ -13821,14 +13341,13 @@ case "(($ac_try" in
13821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13822 *) ac_try_echo=$ac_try;; 13342 *) ac_try_echo=$ac_try;;
13823esac 13343esac
13824eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13825$as_echo "$ac_try_echo") >&5
13826 (eval "$ac_compile") 2>conftest.er1 13345 (eval "$ac_compile") 2>conftest.er1
13827 ac_status=$? 13346 ac_status=$?
13828 grep -v '^ *+' conftest.er1 >conftest.err 13347 grep -v '^ *+' conftest.er1 >conftest.err
13829 rm -f conftest.er1 13348 rm -f conftest.er1
13830 cat conftest.err >&5 13349 cat conftest.err >&5
13831 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13832 (exit $ac_status); } && { 13351 (exit $ac_status); } && {
13833 test -z "$ac_c_werror_flag" || 13352 test -z "$ac_c_werror_flag" ||
13834 test ! -s conftest.err 13353 test ! -s conftest.err
@@ -13840,7 +13359,7 @@ cat >>confdefs.h <<\_ACEOF
13840_ACEOF 13359_ACEOF
13841 13360
13842else 13361else
13843 $as_echo "$as_me: failed program was:" >&5 13362 echo "$as_me: failed program was:" >&5
13844sed 's/^/| /' conftest.$ac_ext >&5 13363sed 's/^/| /' conftest.$ac_ext >&5
13845 13364
13846 13365
@@ -13851,10 +13370,10 @@ fi
13851done 13370done
13852 13371
13853 13372
13854{ $as_echo "$as_me:$LINENO: checking for library containing nanosleep" >&5 13373{ echo "$as_me:$LINENO: checking for library containing nanosleep" >&5
13855$as_echo_n "checking for library containing nanosleep... " >&6; } 13374echo $ECHO_N "checking for library containing nanosleep... $ECHO_C" >&6; }
13856if test "${ac_cv_search_nanosleep+set}" = set; then 13375if test "${ac_cv_search_nanosleep+set}" = set; then
13857 $as_echo_n "(cached) " >&6 13376 echo $ECHO_N "(cached) $ECHO_C" >&6
13858else 13377else
13859 ac_func_search_save_LIBS=$LIBS 13378 ac_func_search_save_LIBS=$LIBS
13860cat >conftest.$ac_ext <<_ACEOF 13379cat >conftest.$ac_ext <<_ACEOF
@@ -13892,30 +13411,26 @@ case "(($ac_try" in
13892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13893 *) ac_try_echo=$ac_try;; 13412 *) ac_try_echo=$ac_try;;
13894esac 13413esac
13895eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13896$as_echo "$ac_try_echo") >&5
13897 (eval "$ac_link") 2>conftest.er1 13415 (eval "$ac_link") 2>conftest.er1
13898 ac_status=$? 13416 ac_status=$?
13899 grep -v '^ *+' conftest.er1 >conftest.err 13417 grep -v '^ *+' conftest.er1 >conftest.err
13900 rm -f conftest.er1 13418 rm -f conftest.er1
13901 cat conftest.err >&5 13419 cat conftest.err >&5
13902 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13903 (exit $ac_status); } && { 13421 (exit $ac_status); } && {
13904 test -z "$ac_c_werror_flag" || 13422 test -z "$ac_c_werror_flag" ||
13905 test ! -s conftest.err 13423 test ! -s conftest.err
13906 } && test -s conftest$ac_exeext && { 13424 } && test -s conftest$ac_exeext &&
13907 test "$cross_compiling" = yes || 13425 $as_test_x conftest$ac_exeext; then
13908 $as_test_x conftest$ac_exeext
13909 }; then
13910 ac_cv_search_nanosleep=$ac_res 13426 ac_cv_search_nanosleep=$ac_res
13911else 13427else
13912 $as_echo "$as_me: failed program was:" >&5 13428 echo "$as_me: failed program was:" >&5
13913sed 's/^/| /' conftest.$ac_ext >&5 13429sed 's/^/| /' conftest.$ac_ext >&5
13914 13430
13915 13431
13916fi 13432fi
13917 13433
13918rm -rf conftest.dSYM
13919rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 13434rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13920 conftest$ac_exeext 13435 conftest$ac_exeext
13921 if test "${ac_cv_search_nanosleep+set}" = set; then 13436 if test "${ac_cv_search_nanosleep+set}" = set; then
@@ -13930,8 +13445,8 @@ fi
13930rm conftest.$ac_ext 13445rm conftest.$ac_ext
13931LIBS=$ac_func_search_save_LIBS 13446LIBS=$ac_func_search_save_LIBS
13932fi 13447fi
13933{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_nanosleep" >&5 13448{ echo "$as_me:$LINENO: result: $ac_cv_search_nanosleep" >&5
13934$as_echo "$ac_cv_search_nanosleep" >&6; } 13449echo "${ECHO_T}$ac_cv_search_nanosleep" >&6; }
13935ac_res=$ac_cv_search_nanosleep 13450ac_res=$ac_cv_search_nanosleep
13936if test "$ac_res" != no; then 13451if test "$ac_res" != no; then
13937 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 13452 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
@@ -13943,10 +13458,10 @@ _ACEOF
13943fi 13458fi
13944 13459
13945 13460
13946{ $as_echo "$as_me:$LINENO: checking whether getrusage is declared" >&5 13461{ echo "$as_me:$LINENO: checking whether getrusage is declared" >&5
13947$as_echo_n "checking whether getrusage is declared... " >&6; } 13462echo $ECHO_N "checking whether getrusage is declared... $ECHO_C" >&6; }
13948if test "${ac_cv_have_decl_getrusage+set}" = set; then 13463if test "${ac_cv_have_decl_getrusage+set}" = set; then
13949 $as_echo_n "(cached) " >&6 13464 echo $ECHO_N "(cached) $ECHO_C" >&6
13950else 13465else
13951 cat >conftest.$ac_ext <<_ACEOF 13466 cat >conftest.$ac_ext <<_ACEOF
13952/* confdefs.h. */ 13467/* confdefs.h. */
@@ -13972,21 +13487,20 @@ case "(($ac_try" in
13972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13973 *) ac_try_echo=$ac_try;; 13488 *) ac_try_echo=$ac_try;;
13974esac 13489esac
13975eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13976$as_echo "$ac_try_echo") >&5
13977 (eval "$ac_compile") 2>conftest.er1 13491 (eval "$ac_compile") 2>conftest.er1
13978 ac_status=$? 13492 ac_status=$?
13979 grep -v '^ *+' conftest.er1 >conftest.err 13493 grep -v '^ *+' conftest.er1 >conftest.err
13980 rm -f conftest.er1 13494 rm -f conftest.er1
13981 cat conftest.err >&5 13495 cat conftest.err >&5
13982 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13983 (exit $ac_status); } && { 13497 (exit $ac_status); } && {
13984 test -z "$ac_c_werror_flag" || 13498 test -z "$ac_c_werror_flag" ||
13985 test ! -s conftest.err 13499 test ! -s conftest.err
13986 } && test -s conftest.$ac_objext; then 13500 } && test -s conftest.$ac_objext; then
13987 ac_cv_have_decl_getrusage=yes 13501 ac_cv_have_decl_getrusage=yes
13988else 13502else
13989 $as_echo "$as_me: failed program was:" >&5 13503 echo "$as_me: failed program was:" >&5
13990sed 's/^/| /' conftest.$ac_ext >&5 13504sed 's/^/| /' conftest.$ac_ext >&5
13991 13505
13992 ac_cv_have_decl_getrusage=no 13506 ac_cv_have_decl_getrusage=no
@@ -13994,17 +13508,17 @@ fi
13994 13508
13995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13996fi 13510fi
13997{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getrusage" >&5 13511{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getrusage" >&5
13998$as_echo "$ac_cv_have_decl_getrusage" >&6; } 13512echo "${ECHO_T}$ac_cv_have_decl_getrusage" >&6; }
13999if test $ac_cv_have_decl_getrusage = yes; then 13513if test $ac_cv_have_decl_getrusage = yes; then
14000 13514
14001for ac_func in getrusage 13515for ac_func in getrusage
14002do 13516do
14003as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 13517as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14004{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 13518{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14005$as_echo_n "checking for $ac_func... " >&6; } 13519echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14006if { 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
14007 $as_echo_n "(cached) " >&6 13521 echo $ECHO_N "(cached) $ECHO_C" >&6
14008else 13522else
14009 cat >conftest.$ac_ext <<_ACEOF 13523 cat >conftest.$ac_ext <<_ACEOF
14010/* confdefs.h. */ 13524/* confdefs.h. */
@@ -14057,41 +13571,35 @@ case "(($ac_try" in
14057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14058 *) ac_try_echo=$ac_try;; 13572 *) ac_try_echo=$ac_try;;
14059esac 13573esac
14060eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14061$as_echo "$ac_try_echo") >&5
14062 (eval "$ac_link") 2>conftest.er1 13575 (eval "$ac_link") 2>conftest.er1
14063 ac_status=$? 13576 ac_status=$?
14064 grep -v '^ *+' conftest.er1 >conftest.err 13577 grep -v '^ *+' conftest.er1 >conftest.err
14065 rm -f conftest.er1 13578 rm -f conftest.er1
14066 cat conftest.err >&5 13579 cat conftest.err >&5
14067 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14068 (exit $ac_status); } && { 13581 (exit $ac_status); } && {
14069 test -z "$ac_c_werror_flag" || 13582 test -z "$ac_c_werror_flag" ||
14070 test ! -s conftest.err 13583 test ! -s conftest.err
14071 } && test -s conftest$ac_exeext && { 13584 } && test -s conftest$ac_exeext &&
14072 test "$cross_compiling" = yes || 13585 $as_test_x conftest$ac_exeext; then
14073 $as_test_x conftest$ac_exeext
14074 }; then
14075 eval "$as_ac_var=yes" 13586 eval "$as_ac_var=yes"
14076else 13587else
14077 $as_echo "$as_me: failed program was:" >&5 13588 echo "$as_me: failed program was:" >&5
14078sed 's/^/| /' conftest.$ac_ext >&5 13589sed 's/^/| /' conftest.$ac_ext >&5
14079 13590
14080 eval "$as_ac_var=no" 13591 eval "$as_ac_var=no"
14081fi 13592fi
14082 13593
14083rm -rf conftest.dSYM
14084rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 13594rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14085 conftest$ac_exeext conftest.$ac_ext 13595 conftest$ac_exeext conftest.$ac_ext
14086fi 13596fi
14087ac_res=`eval 'as_val=${'$as_ac_var'} 13597ac_res=`eval echo '${'$as_ac_var'}'`
14088 $as_echo "$as_val"'` 13598 { echo "$as_me:$LINENO: result: $ac_res" >&5
14089 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 13599echo "${ECHO_T}$ac_res" >&6; }
14090$as_echo "$ac_res" >&6; } 13600if test `eval echo '${'$as_ac_var'}'` = yes; then
14091if test `eval 'as_val=${'$as_ac_var'}
14092 $as_echo "$as_val"'` = yes; then
14093 cat >>confdefs.h <<_ACEOF 13601 cat >>confdefs.h <<_ACEOF
14094#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 13602#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14095_ACEOF 13603_ACEOF
14096 13604
14097fi 13605fi
@@ -14099,10 +13607,10 @@ done
14099 13607
14100fi 13608fi
14101 13609
14102{ $as_echo "$as_me:$LINENO: checking whether strsep is declared" >&5 13610{ echo "$as_me:$LINENO: checking whether strsep is declared" >&5
14103$as_echo_n "checking whether strsep is declared... " >&6; } 13611echo $ECHO_N "checking whether strsep is declared... $ECHO_C" >&6; }
14104if test "${ac_cv_have_decl_strsep+set}" = set; then 13612if test "${ac_cv_have_decl_strsep+set}" = set; then
14105 $as_echo_n "(cached) " >&6 13613 echo $ECHO_N "(cached) $ECHO_C" >&6
14106else 13614else
14107 cat >conftest.$ac_ext <<_ACEOF 13615 cat >conftest.$ac_ext <<_ACEOF
14108/* confdefs.h. */ 13616/* confdefs.h. */
@@ -14133,21 +13641,20 @@ case "(($ac_try" in
14133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14134 *) ac_try_echo=$ac_try;; 13642 *) ac_try_echo=$ac_try;;
14135esac 13643esac
14136eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14137$as_echo "$ac_try_echo") >&5
14138 (eval "$ac_compile") 2>conftest.er1 13645 (eval "$ac_compile") 2>conftest.er1
14139 ac_status=$? 13646 ac_status=$?
14140 grep -v '^ *+' conftest.er1 >conftest.err 13647 grep -v '^ *+' conftest.er1 >conftest.err
14141 rm -f conftest.er1 13648 rm -f conftest.er1
14142 cat conftest.err >&5 13649 cat conftest.err >&5
14143 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14144 (exit $ac_status); } && { 13651 (exit $ac_status); } && {
14145 test -z "$ac_c_werror_flag" || 13652 test -z "$ac_c_werror_flag" ||
14146 test ! -s conftest.err 13653 test ! -s conftest.err
14147 } && test -s conftest.$ac_objext; then 13654 } && test -s conftest.$ac_objext; then
14148 ac_cv_have_decl_strsep=yes 13655 ac_cv_have_decl_strsep=yes
14149else 13656else
14150 $as_echo "$as_me: failed program was:" >&5 13657 echo "$as_me: failed program was:" >&5
14151sed 's/^/| /' conftest.$ac_ext >&5 13658sed 's/^/| /' conftest.$ac_ext >&5
14152 13659
14153 ac_cv_have_decl_strsep=no 13660 ac_cv_have_decl_strsep=no
@@ -14155,17 +13662,17 @@ fi
14155 13662
14156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14157fi 13664fi
14158{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strsep" >&5 13665{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_strsep" >&5
14159$as_echo "$ac_cv_have_decl_strsep" >&6; } 13666echo "${ECHO_T}$ac_cv_have_decl_strsep" >&6; }
14160if test $ac_cv_have_decl_strsep = yes; then 13667if test $ac_cv_have_decl_strsep = yes; then
14161 13668
14162for ac_func in strsep 13669for ac_func in strsep
14163do 13670do
14164as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 13671as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14165{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 13672{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14166$as_echo_n "checking for $ac_func... " >&6; } 13673echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14167if { 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
14168 $as_echo_n "(cached) " >&6 13675 echo $ECHO_N "(cached) $ECHO_C" >&6
14169else 13676else
14170 cat >conftest.$ac_ext <<_ACEOF 13677 cat >conftest.$ac_ext <<_ACEOF
14171/* confdefs.h. */ 13678/* confdefs.h. */
@@ -14218,41 +13725,35 @@ case "(($ac_try" in
14218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14219 *) ac_try_echo=$ac_try;; 13726 *) ac_try_echo=$ac_try;;
14220esac 13727esac
14221eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14222$as_echo "$ac_try_echo") >&5
14223 (eval "$ac_link") 2>conftest.er1 13729 (eval "$ac_link") 2>conftest.er1
14224 ac_status=$? 13730 ac_status=$?
14225 grep -v '^ *+' conftest.er1 >conftest.err 13731 grep -v '^ *+' conftest.er1 >conftest.err
14226 rm -f conftest.er1 13732 rm -f conftest.er1
14227 cat conftest.err >&5 13733 cat conftest.err >&5
14228 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14229 (exit $ac_status); } && { 13735 (exit $ac_status); } && {
14230 test -z "$ac_c_werror_flag" || 13736 test -z "$ac_c_werror_flag" ||
14231 test ! -s conftest.err 13737 test ! -s conftest.err
14232 } && test -s conftest$ac_exeext && { 13738 } && test -s conftest$ac_exeext &&
14233 test "$cross_compiling" = yes || 13739 $as_test_x conftest$ac_exeext; then
14234 $as_test_x conftest$ac_exeext
14235 }; then
14236 eval "$as_ac_var=yes" 13740 eval "$as_ac_var=yes"
14237else 13741else
14238 $as_echo "$as_me: failed program was:" >&5 13742 echo "$as_me: failed program was:" >&5
14239sed 's/^/| /' conftest.$ac_ext >&5 13743sed 's/^/| /' conftest.$ac_ext >&5
14240 13744
14241 eval "$as_ac_var=no" 13745 eval "$as_ac_var=no"
14242fi 13746fi
14243 13747
14244rm -rf conftest.dSYM
14245rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 13748rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14246 conftest$ac_exeext conftest.$ac_ext 13749 conftest$ac_exeext conftest.$ac_ext
14247fi 13750fi
14248ac_res=`eval 'as_val=${'$as_ac_var'} 13751ac_res=`eval echo '${'$as_ac_var'}'`
14249 $as_echo "$as_val"'` 13752 { echo "$as_me:$LINENO: result: $ac_res" >&5
14250 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 13753echo "${ECHO_T}$ac_res" >&6; }
14251$as_echo "$ac_res" >&6; } 13754if test `eval echo '${'$as_ac_var'}'` = yes; then
14252if test `eval 'as_val=${'$as_ac_var'}
14253 $as_echo "$as_val"'` = yes; then
14254 cat >>confdefs.h <<_ACEOF 13755 cat >>confdefs.h <<_ACEOF
14255#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 13756#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14256_ACEOF 13757_ACEOF
14257 13758
14258fi 13759fi
@@ -14261,10 +13762,10 @@ done
14261fi 13762fi
14262 13763
14263 13764
14264{ $as_echo "$as_me:$LINENO: checking whether tcsendbreak is declared" >&5 13765{ echo "$as_me:$LINENO: checking whether tcsendbreak is declared" >&5
14265$as_echo_n "checking whether tcsendbreak is declared... " >&6; } 13766echo $ECHO_N "checking whether tcsendbreak is declared... $ECHO_C" >&6; }
14266if test "${ac_cv_have_decl_tcsendbreak+set}" = set; then 13767if test "${ac_cv_have_decl_tcsendbreak+set}" = set; then
14267 $as_echo_n "(cached) " >&6 13768 echo $ECHO_N "(cached) $ECHO_C" >&6
14268else 13769else
14269 cat >conftest.$ac_ext <<_ACEOF 13770 cat >conftest.$ac_ext <<_ACEOF
14270/* confdefs.h. */ 13771/* confdefs.h. */
@@ -14292,21 +13793,20 @@ case "(($ac_try" in
14292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14293 *) ac_try_echo=$ac_try;; 13794 *) ac_try_echo=$ac_try;;
14294esac 13795esac
14295eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14296$as_echo "$ac_try_echo") >&5
14297 (eval "$ac_compile") 2>conftest.er1 13797 (eval "$ac_compile") 2>conftest.er1
14298 ac_status=$? 13798 ac_status=$?
14299 grep -v '^ *+' conftest.er1 >conftest.err 13799 grep -v '^ *+' conftest.er1 >conftest.err
14300 rm -f conftest.er1 13800 rm -f conftest.er1
14301 cat conftest.err >&5 13801 cat conftest.err >&5
14302 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14303 (exit $ac_status); } && { 13803 (exit $ac_status); } && {
14304 test -z "$ac_c_werror_flag" || 13804 test -z "$ac_c_werror_flag" ||
14305 test ! -s conftest.err 13805 test ! -s conftest.err
14306 } && test -s conftest.$ac_objext; then 13806 } && test -s conftest.$ac_objext; then
14307 ac_cv_have_decl_tcsendbreak=yes 13807 ac_cv_have_decl_tcsendbreak=yes
14308else 13808else
14309 $as_echo "$as_me: failed program was:" >&5 13809 echo "$as_me: failed program was:" >&5
14310sed 's/^/| /' conftest.$ac_ext >&5 13810sed 's/^/| /' conftest.$ac_ext >&5
14311 13811
14312 ac_cv_have_decl_tcsendbreak=no 13812 ac_cv_have_decl_tcsendbreak=no
@@ -14314,8 +13814,8 @@ fi
14314 13814
14315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14316fi 13816fi
14317{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tcsendbreak" >&5 13817{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tcsendbreak" >&5
14318$as_echo "$ac_cv_have_decl_tcsendbreak" >&6; } 13818echo "${ECHO_T}$ac_cv_have_decl_tcsendbreak" >&6; }
14319if test $ac_cv_have_decl_tcsendbreak = yes; then 13819if test $ac_cv_have_decl_tcsendbreak = yes; then
14320 cat >>confdefs.h <<\_ACEOF 13820 cat >>confdefs.h <<\_ACEOF
14321#define HAVE_TCSENDBREAK 1 13821#define HAVE_TCSENDBREAK 1
@@ -14325,11 +13825,11 @@ else
14325 13825
14326for ac_func in tcsendbreak 13826for ac_func in tcsendbreak
14327do 13827do
14328as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 13828as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14329{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 13829{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14330$as_echo_n "checking for $ac_func... " >&6; } 13830echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14331if { 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
14332 $as_echo_n "(cached) " >&6 13832 echo $ECHO_N "(cached) $ECHO_C" >&6
14333else 13833else
14334 cat >conftest.$ac_ext <<_ACEOF 13834 cat >conftest.$ac_ext <<_ACEOF
14335/* confdefs.h. */ 13835/* confdefs.h. */
@@ -14382,41 +13882,35 @@ case "(($ac_try" in
14382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14383 *) ac_try_echo=$ac_try;; 13883 *) ac_try_echo=$ac_try;;
14384esac 13884esac
14385eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14386$as_echo "$ac_try_echo") >&5
14387 (eval "$ac_link") 2>conftest.er1 13886 (eval "$ac_link") 2>conftest.er1
14388 ac_status=$? 13887 ac_status=$?
14389 grep -v '^ *+' conftest.er1 >conftest.err 13888 grep -v '^ *+' conftest.er1 >conftest.err
14390 rm -f conftest.er1 13889 rm -f conftest.er1
14391 cat conftest.err >&5 13890 cat conftest.err >&5
14392 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14393 (exit $ac_status); } && { 13892 (exit $ac_status); } && {
14394 test -z "$ac_c_werror_flag" || 13893 test -z "$ac_c_werror_flag" ||
14395 test ! -s conftest.err 13894 test ! -s conftest.err
14396 } && test -s conftest$ac_exeext && { 13895 } && test -s conftest$ac_exeext &&
14397 test "$cross_compiling" = yes || 13896 $as_test_x conftest$ac_exeext; then
14398 $as_test_x conftest$ac_exeext
14399 }; then
14400 eval "$as_ac_var=yes" 13897 eval "$as_ac_var=yes"
14401else 13898else
14402 $as_echo "$as_me: failed program was:" >&5 13899 echo "$as_me: failed program was:" >&5
14403sed 's/^/| /' conftest.$ac_ext >&5 13900sed 's/^/| /' conftest.$ac_ext >&5
14404 13901
14405 eval "$as_ac_var=no" 13902 eval "$as_ac_var=no"
14406fi 13903fi
14407 13904
14408rm -rf conftest.dSYM
14409rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 13905rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14410 conftest$ac_exeext conftest.$ac_ext 13906 conftest$ac_exeext conftest.$ac_ext
14411fi 13907fi
14412ac_res=`eval 'as_val=${'$as_ac_var'} 13908ac_res=`eval echo '${'$as_ac_var'}'`
14413 $as_echo "$as_val"'` 13909 { echo "$as_me:$LINENO: result: $ac_res" >&5
14414 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 13910echo "${ECHO_T}$ac_res" >&6; }
14415$as_echo "$ac_res" >&6; } 13911if test `eval echo '${'$as_ac_var'}'` = yes; then
14416if test `eval 'as_val=${'$as_ac_var'}
14417 $as_echo "$as_val"'` = yes; then
14418 cat >>confdefs.h <<_ACEOF 13912 cat >>confdefs.h <<_ACEOF
14419#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 13913#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14420_ACEOF 13914_ACEOF
14421 13915
14422fi 13916fi
@@ -14425,10 +13919,10 @@ done
14425fi 13919fi
14426 13920
14427 13921
14428{ $as_echo "$as_me:$LINENO: checking whether h_errno is declared" >&5 13922{ echo "$as_me:$LINENO: checking whether h_errno is declared" >&5
14429$as_echo_n "checking whether h_errno is declared... " >&6; } 13923echo $ECHO_N "checking whether h_errno is declared... $ECHO_C" >&6; }
14430if test "${ac_cv_have_decl_h_errno+set}" = set; then 13924if test "${ac_cv_have_decl_h_errno+set}" = set; then
14431 $as_echo_n "(cached) " >&6 13925 echo $ECHO_N "(cached) $ECHO_C" >&6
14432else 13926else
14433 cat >conftest.$ac_ext <<_ACEOF 13927 cat >conftest.$ac_ext <<_ACEOF
14434/* confdefs.h. */ 13928/* confdefs.h. */
@@ -14455,21 +13949,20 @@ case "(($ac_try" in
14455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 13949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14456 *) ac_try_echo=$ac_try;; 13950 *) ac_try_echo=$ac_try;;
14457esac 13951esac
14458eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 13952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14459$as_echo "$ac_try_echo") >&5
14460 (eval "$ac_compile") 2>conftest.er1 13953 (eval "$ac_compile") 2>conftest.er1
14461 ac_status=$? 13954 ac_status=$?
14462 grep -v '^ *+' conftest.er1 >conftest.err 13955 grep -v '^ *+' conftest.er1 >conftest.err
14463 rm -f conftest.er1 13956 rm -f conftest.er1
14464 cat conftest.err >&5 13957 cat conftest.err >&5
14465 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 13958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14466 (exit $ac_status); } && { 13959 (exit $ac_status); } && {
14467 test -z "$ac_c_werror_flag" || 13960 test -z "$ac_c_werror_flag" ||
14468 test ! -s conftest.err 13961 test ! -s conftest.err
14469 } && test -s conftest.$ac_objext; then 13962 } && test -s conftest.$ac_objext; then
14470 ac_cv_have_decl_h_errno=yes 13963 ac_cv_have_decl_h_errno=yes
14471else 13964else
14472 $as_echo "$as_me: failed program was:" >&5 13965 echo "$as_me: failed program was:" >&5
14473sed 's/^/| /' conftest.$ac_ext >&5 13966sed 's/^/| /' conftest.$ac_ext >&5
14474 13967
14475 ac_cv_have_decl_h_errno=no 13968 ac_cv_have_decl_h_errno=no
@@ -14477,8 +13970,8 @@ fi
14477 13970
14478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14479fi 13972fi
14480{ $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
14481$as_echo "$ac_cv_have_decl_h_errno" >&6; } 13974echo "${ECHO_T}$ac_cv_have_decl_h_errno" >&6; }
14482if test $ac_cv_have_decl_h_errno = yes; then 13975if test $ac_cv_have_decl_h_errno = yes; then
14483 13976
14484cat >>confdefs.h <<_ACEOF 13977cat >>confdefs.h <<_ACEOF
@@ -14496,10 +13989,10 @@ fi
14496 13989
14497 13990
14498 13991
14499{ $as_echo "$as_me:$LINENO: checking whether SHUT_RD is declared" >&5 13992{ echo "$as_me:$LINENO: checking whether SHUT_RD is declared" >&5
14500$as_echo_n "checking whether SHUT_RD is declared... " >&6; } 13993echo $ECHO_N "checking whether SHUT_RD is declared... $ECHO_C" >&6; }
14501if test "${ac_cv_have_decl_SHUT_RD+set}" = set; then 13994if test "${ac_cv_have_decl_SHUT_RD+set}" = set; then
14502 $as_echo_n "(cached) " >&6 13995 echo $ECHO_N "(cached) $ECHO_C" >&6
14503else 13996else
14504 cat >conftest.$ac_ext <<_ACEOF 13997 cat >conftest.$ac_ext <<_ACEOF
14505/* confdefs.h. */ 13998/* confdefs.h. */
@@ -14529,21 +14022,20 @@ case "(($ac_try" in
14529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14530 *) ac_try_echo=$ac_try;; 14023 *) ac_try_echo=$ac_try;;
14531esac 14024esac
14532eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14533$as_echo "$ac_try_echo") >&5
14534 (eval "$ac_compile") 2>conftest.er1 14026 (eval "$ac_compile") 2>conftest.er1
14535 ac_status=$? 14027 ac_status=$?
14536 grep -v '^ *+' conftest.er1 >conftest.err 14028 grep -v '^ *+' conftest.er1 >conftest.err
14537 rm -f conftest.er1 14029 rm -f conftest.er1
14538 cat conftest.err >&5 14030 cat conftest.err >&5
14539 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14540 (exit $ac_status); } && { 14032 (exit $ac_status); } && {
14541 test -z "$ac_c_werror_flag" || 14033 test -z "$ac_c_werror_flag" ||
14542 test ! -s conftest.err 14034 test ! -s conftest.err
14543 } && test -s conftest.$ac_objext; then 14035 } && test -s conftest.$ac_objext; then
14544 ac_cv_have_decl_SHUT_RD=yes 14036 ac_cv_have_decl_SHUT_RD=yes
14545else 14037else
14546 $as_echo "$as_me: failed program was:" >&5 14038 echo "$as_me: failed program was:" >&5
14547sed 's/^/| /' conftest.$ac_ext >&5 14039sed 's/^/| /' conftest.$ac_ext >&5
14548 14040
14549 ac_cv_have_decl_SHUT_RD=no 14041 ac_cv_have_decl_SHUT_RD=no
@@ -14551,8 +14043,8 @@ fi
14551 14043
14552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14553fi 14045fi
14554{ $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
14555$as_echo "$ac_cv_have_decl_SHUT_RD" >&6; } 14047echo "${ECHO_T}$ac_cv_have_decl_SHUT_RD" >&6; }
14556if test $ac_cv_have_decl_SHUT_RD = yes; then 14048if test $ac_cv_have_decl_SHUT_RD = yes; then
14557 14049
14558cat >>confdefs.h <<_ACEOF 14050cat >>confdefs.h <<_ACEOF
@@ -14570,10 +14062,10 @@ fi
14570 14062
14571 14063
14572 14064
14573{ $as_echo "$as_me:$LINENO: checking whether O_NONBLOCK is declared" >&5 14065{ echo "$as_me:$LINENO: checking whether O_NONBLOCK is declared" >&5
14574$as_echo_n "checking whether O_NONBLOCK is declared... " >&6; } 14066echo $ECHO_N "checking whether O_NONBLOCK is declared... $ECHO_C" >&6; }
14575if test "${ac_cv_have_decl_O_NONBLOCK+set}" = set; then 14067if test "${ac_cv_have_decl_O_NONBLOCK+set}" = set; then
14576 $as_echo_n "(cached) " >&6 14068 echo $ECHO_N "(cached) $ECHO_C" >&6
14577else 14069else
14578 cat >conftest.$ac_ext <<_ACEOF 14070 cat >conftest.$ac_ext <<_ACEOF
14579/* confdefs.h. */ 14071/* confdefs.h. */
@@ -14608,21 +14100,20 @@ case "(($ac_try" in
14608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14609 *) ac_try_echo=$ac_try;; 14101 *) ac_try_echo=$ac_try;;
14610esac 14102esac
14611eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14612$as_echo "$ac_try_echo") >&5
14613 (eval "$ac_compile") 2>conftest.er1 14104 (eval "$ac_compile") 2>conftest.er1
14614 ac_status=$? 14105 ac_status=$?
14615 grep -v '^ *+' conftest.er1 >conftest.err 14106 grep -v '^ *+' conftest.er1 >conftest.err
14616 rm -f conftest.er1 14107 rm -f conftest.er1
14617 cat conftest.err >&5 14108 cat conftest.err >&5
14618 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14619 (exit $ac_status); } && { 14110 (exit $ac_status); } && {
14620 test -z "$ac_c_werror_flag" || 14111 test -z "$ac_c_werror_flag" ||
14621 test ! -s conftest.err 14112 test ! -s conftest.err
14622 } && test -s conftest.$ac_objext; then 14113 } && test -s conftest.$ac_objext; then
14623 ac_cv_have_decl_O_NONBLOCK=yes 14114 ac_cv_have_decl_O_NONBLOCK=yes
14624else 14115else
14625 $as_echo "$as_me: failed program was:" >&5 14116 echo "$as_me: failed program was:" >&5
14626sed 's/^/| /' conftest.$ac_ext >&5 14117sed 's/^/| /' conftest.$ac_ext >&5
14627 14118
14628 ac_cv_have_decl_O_NONBLOCK=no 14119 ac_cv_have_decl_O_NONBLOCK=no
@@ -14630,8 +14121,8 @@ fi
14630 14121
14631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14632fi 14123fi
14633{ $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
14634$as_echo "$ac_cv_have_decl_O_NONBLOCK" >&6; } 14125echo "${ECHO_T}$ac_cv_have_decl_O_NONBLOCK" >&6; }
14635if test $ac_cv_have_decl_O_NONBLOCK = yes; then 14126if test $ac_cv_have_decl_O_NONBLOCK = yes; then
14636 14127
14637cat >>confdefs.h <<_ACEOF 14128cat >>confdefs.h <<_ACEOF
@@ -14649,10 +14140,10 @@ fi
14649 14140
14650 14141
14651 14142
14652{ $as_echo "$as_me:$LINENO: checking whether writev is declared" >&5 14143{ echo "$as_me:$LINENO: checking whether writev is declared" >&5
14653$as_echo_n "checking whether writev is declared... " >&6; } 14144echo $ECHO_N "checking whether writev is declared... $ECHO_C" >&6; }
14654if test "${ac_cv_have_decl_writev+set}" = set; then 14145if test "${ac_cv_have_decl_writev+set}" = set; then
14655 $as_echo_n "(cached) " >&6 14146 echo $ECHO_N "(cached) $ECHO_C" >&6
14656else 14147else
14657 cat >conftest.$ac_ext <<_ACEOF 14148 cat >conftest.$ac_ext <<_ACEOF
14658/* confdefs.h. */ 14149/* confdefs.h. */
@@ -14683,21 +14174,20 @@ case "(($ac_try" in
14683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14684 *) ac_try_echo=$ac_try;; 14175 *) ac_try_echo=$ac_try;;
14685esac 14176esac
14686eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14687$as_echo "$ac_try_echo") >&5
14688 (eval "$ac_compile") 2>conftest.er1 14178 (eval "$ac_compile") 2>conftest.er1
14689 ac_status=$? 14179 ac_status=$?
14690 grep -v '^ *+' conftest.er1 >conftest.err 14180 grep -v '^ *+' conftest.er1 >conftest.err
14691 rm -f conftest.er1 14181 rm -f conftest.er1
14692 cat conftest.err >&5 14182 cat conftest.err >&5
14693 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14694 (exit $ac_status); } && { 14184 (exit $ac_status); } && {
14695 test -z "$ac_c_werror_flag" || 14185 test -z "$ac_c_werror_flag" ||
14696 test ! -s conftest.err 14186 test ! -s conftest.err
14697 } && test -s conftest.$ac_objext; then 14187 } && test -s conftest.$ac_objext; then
14698 ac_cv_have_decl_writev=yes 14188 ac_cv_have_decl_writev=yes
14699else 14189else
14700 $as_echo "$as_me: failed program was:" >&5 14190 echo "$as_me: failed program was:" >&5
14701sed 's/^/| /' conftest.$ac_ext >&5 14191sed 's/^/| /' conftest.$ac_ext >&5
14702 14192
14703 ac_cv_have_decl_writev=no 14193 ac_cv_have_decl_writev=no
@@ -14705,8 +14195,8 @@ fi
14705 14195
14706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14707fi 14197fi
14708{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_writev" >&5 14198{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_writev" >&5
14709$as_echo "$ac_cv_have_decl_writev" >&6; } 14199echo "${ECHO_T}$ac_cv_have_decl_writev" >&6; }
14710if test $ac_cv_have_decl_writev = yes; then 14200if test $ac_cv_have_decl_writev = yes; then
14711 14201
14712cat >>confdefs.h <<_ACEOF 14202cat >>confdefs.h <<_ACEOF
@@ -14724,10 +14214,10 @@ fi
14724 14214
14725 14215
14726 14216
14727{ $as_echo "$as_me:$LINENO: checking whether MAXSYMLINKS is declared" >&5 14217{ echo "$as_me:$LINENO: checking whether MAXSYMLINKS is declared" >&5
14728$as_echo_n "checking whether MAXSYMLINKS is declared... " >&6; } 14218echo $ECHO_N "checking whether MAXSYMLINKS is declared... $ECHO_C" >&6; }
14729if test "${ac_cv_have_decl_MAXSYMLINKS+set}" = set; then 14219if test "${ac_cv_have_decl_MAXSYMLINKS+set}" = set; then
14730 $as_echo_n "(cached) " >&6 14220 echo $ECHO_N "(cached) $ECHO_C" >&6
14731else 14221else
14732 cat >conftest.$ac_ext <<_ACEOF 14222 cat >conftest.$ac_ext <<_ACEOF
14733/* confdefs.h. */ 14223/* confdefs.h. */
@@ -14756,21 +14246,20 @@ case "(($ac_try" in
14756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14757 *) ac_try_echo=$ac_try;; 14247 *) ac_try_echo=$ac_try;;
14758esac 14248esac
14759eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14760$as_echo "$ac_try_echo") >&5
14761 (eval "$ac_compile") 2>conftest.er1 14250 (eval "$ac_compile") 2>conftest.er1
14762 ac_status=$? 14251 ac_status=$?
14763 grep -v '^ *+' conftest.er1 >conftest.err 14252 grep -v '^ *+' conftest.er1 >conftest.err
14764 rm -f conftest.er1 14253 rm -f conftest.er1
14765 cat conftest.err >&5 14254 cat conftest.err >&5
14766 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14767 (exit $ac_status); } && { 14256 (exit $ac_status); } && {
14768 test -z "$ac_c_werror_flag" || 14257 test -z "$ac_c_werror_flag" ||
14769 test ! -s conftest.err 14258 test ! -s conftest.err
14770 } && test -s conftest.$ac_objext; then 14259 } && test -s conftest.$ac_objext; then
14771 ac_cv_have_decl_MAXSYMLINKS=yes 14260 ac_cv_have_decl_MAXSYMLINKS=yes
14772else 14261else
14773 $as_echo "$as_me: failed program was:" >&5 14262 echo "$as_me: failed program was:" >&5
14774sed 's/^/| /' conftest.$ac_ext >&5 14263sed 's/^/| /' conftest.$ac_ext >&5
14775 14264
14776 ac_cv_have_decl_MAXSYMLINKS=no 14265 ac_cv_have_decl_MAXSYMLINKS=no
@@ -14778,8 +14267,8 @@ fi
14778 14267
14779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14780fi 14269fi
14781{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_MAXSYMLINKS" >&5 14270{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_MAXSYMLINKS" >&5
14782$as_echo "$ac_cv_have_decl_MAXSYMLINKS" >&6; } 14271echo "${ECHO_T}$ac_cv_have_decl_MAXSYMLINKS" >&6; }
14783if test $ac_cv_have_decl_MAXSYMLINKS = yes; then 14272if test $ac_cv_have_decl_MAXSYMLINKS = yes; then
14784 14273
14785cat >>confdefs.h <<_ACEOF 14274cat >>confdefs.h <<_ACEOF
@@ -14797,10 +14286,10 @@ fi
14797 14286
14798 14287
14799 14288
14800{ $as_echo "$as_me:$LINENO: checking whether offsetof is declared" >&5 14289{ echo "$as_me:$LINENO: checking whether offsetof is declared" >&5
14801$as_echo_n "checking whether offsetof is declared... " >&6; } 14290echo $ECHO_N "checking whether offsetof is declared... $ECHO_C" >&6; }
14802if test "${ac_cv_have_decl_offsetof+set}" = set; then 14291if test "${ac_cv_have_decl_offsetof+set}" = set; then
14803 $as_echo_n "(cached) " >&6 14292 echo $ECHO_N "(cached) $ECHO_C" >&6
14804else 14293else
14805 cat >conftest.$ac_ext <<_ACEOF 14294 cat >conftest.$ac_ext <<_ACEOF
14806/* confdefs.h. */ 14295/* confdefs.h. */
@@ -14829,21 +14318,20 @@ case "(($ac_try" in
14829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14830 *) ac_try_echo=$ac_try;; 14319 *) ac_try_echo=$ac_try;;
14831esac 14320esac
14832eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14833$as_echo "$ac_try_echo") >&5
14834 (eval "$ac_compile") 2>conftest.er1 14322 (eval "$ac_compile") 2>conftest.er1
14835 ac_status=$? 14323 ac_status=$?
14836 grep -v '^ *+' conftest.er1 >conftest.err 14324 grep -v '^ *+' conftest.er1 >conftest.err
14837 rm -f conftest.er1 14325 rm -f conftest.er1
14838 cat conftest.err >&5 14326 cat conftest.err >&5
14839 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14840 (exit $ac_status); } && { 14328 (exit $ac_status); } && {
14841 test -z "$ac_c_werror_flag" || 14329 test -z "$ac_c_werror_flag" ||
14842 test ! -s conftest.err 14330 test ! -s conftest.err
14843 } && test -s conftest.$ac_objext; then 14331 } && test -s conftest.$ac_objext; then
14844 ac_cv_have_decl_offsetof=yes 14332 ac_cv_have_decl_offsetof=yes
14845else 14333else
14846 $as_echo "$as_me: failed program was:" >&5 14334 echo "$as_me: failed program was:" >&5
14847sed 's/^/| /' conftest.$ac_ext >&5 14335sed 's/^/| /' conftest.$ac_ext >&5
14848 14336
14849 ac_cv_have_decl_offsetof=no 14337 ac_cv_have_decl_offsetof=no
@@ -14851,8 +14339,8 @@ fi
14851 14339
14852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14853fi 14341fi
14854{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_offsetof" >&5 14342{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_offsetof" >&5
14855$as_echo "$ac_cv_have_decl_offsetof" >&6; } 14343echo "${ECHO_T}$ac_cv_have_decl_offsetof" >&6; }
14856if test $ac_cv_have_decl_offsetof = yes; then 14344if test $ac_cv_have_decl_offsetof = yes; then
14857 14345
14858cat >>confdefs.h <<_ACEOF 14346cat >>confdefs.h <<_ACEOF
@@ -14873,11 +14361,11 @@ fi
14873 14361
14874for ac_func in setresuid 14362for ac_func in setresuid
14875do 14363do
14876as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 14364as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14877{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 14365{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14878$as_echo_n "checking for $ac_func... " >&6; } 14366echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14879if { 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
14880 $as_echo_n "(cached) " >&6 14368 echo $ECHO_N "(cached) $ECHO_C" >&6
14881else 14369else
14882 cat >conftest.$ac_ext <<_ACEOF 14370 cat >conftest.$ac_ext <<_ACEOF
14883/* confdefs.h. */ 14371/* confdefs.h. */
@@ -14930,48 +14418,42 @@ case "(($ac_try" in
14930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14931 *) ac_try_echo=$ac_try;; 14419 *) ac_try_echo=$ac_try;;
14932esac 14420esac
14933eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14934$as_echo "$ac_try_echo") >&5
14935 (eval "$ac_link") 2>conftest.er1 14422 (eval "$ac_link") 2>conftest.er1
14936 ac_status=$? 14423 ac_status=$?
14937 grep -v '^ *+' conftest.er1 >conftest.err 14424 grep -v '^ *+' conftest.er1 >conftest.err
14938 rm -f conftest.er1 14425 rm -f conftest.er1
14939 cat conftest.err >&5 14426 cat conftest.err >&5
14940 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14941 (exit $ac_status); } && { 14428 (exit $ac_status); } && {
14942 test -z "$ac_c_werror_flag" || 14429 test -z "$ac_c_werror_flag" ||
14943 test ! -s conftest.err 14430 test ! -s conftest.err
14944 } && test -s conftest$ac_exeext && { 14431 } && test -s conftest$ac_exeext &&
14945 test "$cross_compiling" = yes || 14432 $as_test_x conftest$ac_exeext; then
14946 $as_test_x conftest$ac_exeext
14947 }; then
14948 eval "$as_ac_var=yes" 14433 eval "$as_ac_var=yes"
14949else 14434else
14950 $as_echo "$as_me: failed program was:" >&5 14435 echo "$as_me: failed program was:" >&5
14951sed 's/^/| /' conftest.$ac_ext >&5 14436sed 's/^/| /' conftest.$ac_ext >&5
14952 14437
14953 eval "$as_ac_var=no" 14438 eval "$as_ac_var=no"
14954fi 14439fi
14955 14440
14956rm -rf conftest.dSYM
14957rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14441rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14958 conftest$ac_exeext conftest.$ac_ext 14442 conftest$ac_exeext conftest.$ac_ext
14959fi 14443fi
14960ac_res=`eval 'as_val=${'$as_ac_var'} 14444ac_res=`eval echo '${'$as_ac_var'}'`
14961 $as_echo "$as_val"'` 14445 { echo "$as_me:$LINENO: result: $ac_res" >&5
14962 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 14446echo "${ECHO_T}$ac_res" >&6; }
14963$as_echo "$ac_res" >&6; } 14447if test `eval echo '${'$as_ac_var'}'` = yes; then
14964if test `eval 'as_val=${'$as_ac_var'}
14965 $as_echo "$as_val"'` = yes; then
14966 cat >>confdefs.h <<_ACEOF 14448 cat >>confdefs.h <<_ACEOF
14967#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 14449#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14968_ACEOF 14450_ACEOF
14969 14451
14970 { $as_echo "$as_me:$LINENO: checking if setresuid seems to work" >&5 14452 { echo "$as_me:$LINENO: checking if setresuid seems to work" >&5
14971$as_echo_n "checking if setresuid seems to work... " >&6; } 14453echo $ECHO_N "checking if setresuid seems to work... $ECHO_C" >&6; }
14972 if test "$cross_compiling" = yes; then 14454 if test "$cross_compiling" = yes; then
14973 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: not checking setresuid" >&5 14455 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking setresuid" >&5
14974$as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;} 14456echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
14975 14457
14976else 14458else
14977 cat >conftest.$ac_ext <<_ACEOF 14459 cat >conftest.$ac_ext <<_ACEOF
@@ -14992,27 +14474,25 @@ case "(($ac_try" in
14992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14993 *) ac_try_echo=$ac_try;; 14475 *) ac_try_echo=$ac_try;;
14994esac 14476esac
14995eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14996$as_echo "$ac_try_echo") >&5
14997 (eval "$ac_link") 2>&5 14478 (eval "$ac_link") 2>&5
14998 ac_status=$? 14479 ac_status=$?
14999 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15000 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 14481 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15001 { (case "(($ac_try" in 14482 { (case "(($ac_try" in
15002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15003 *) ac_try_echo=$ac_try;; 14484 *) ac_try_echo=$ac_try;;
15004esac 14485esac
15005eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15006$as_echo "$ac_try_echo") >&5
15007 (eval "$ac_try") 2>&5 14487 (eval "$ac_try") 2>&5
15008 ac_status=$? 14488 ac_status=$?
15009 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15010 (exit $ac_status); }; }; then 14490 (exit $ac_status); }; }; then
15011 { $as_echo "$as_me:$LINENO: result: yes" >&5 14491 { echo "$as_me:$LINENO: result: yes" >&5
15012$as_echo "yes" >&6; } 14492echo "${ECHO_T}yes" >&6; }
15013else 14493else
15014 $as_echo "$as_me: program exited with status $ac_status" >&5 14494 echo "$as_me: program exited with status $ac_status" >&5
15015$as_echo "$as_me: failed program was:" >&5 14495echo "$as_me: failed program was:" >&5
15016sed 's/^/| /' conftest.$ac_ext >&5 14496sed 's/^/| /' conftest.$ac_ext >&5
15017 14497
15018( exit $ac_status ) 14498( exit $ac_status )
@@ -15021,10 +14501,9 @@ cat >>confdefs.h <<\_ACEOF
15021#define BROKEN_SETRESUID 1 14501#define BROKEN_SETRESUID 1
15022_ACEOF 14502_ACEOF
15023 14503
15024 { $as_echo "$as_me:$LINENO: result: not implemented" >&5 14504 { echo "$as_me:$LINENO: result: not implemented" >&5
15025$as_echo "not implemented" >&6; } 14505echo "${ECHO_T}not implemented" >&6; }
15026fi 14506fi
15027rm -rf conftest.dSYM
15028rm -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
15029fi 14508fi
15030 14509
@@ -15037,11 +14516,11 @@ done
15037 14516
15038for ac_func in setresgid 14517for ac_func in setresgid
15039do 14518do
15040as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 14519as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15041{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 14520{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15042$as_echo_n "checking for $ac_func... " >&6; } 14521echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15043if { 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
15044 $as_echo_n "(cached) " >&6 14523 echo $ECHO_N "(cached) $ECHO_C" >&6
15045else 14524else
15046 cat >conftest.$ac_ext <<_ACEOF 14525 cat >conftest.$ac_ext <<_ACEOF
15047/* confdefs.h. */ 14526/* confdefs.h. */
@@ -15094,48 +14573,42 @@ case "(($ac_try" in
15094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15095 *) ac_try_echo=$ac_try;; 14574 *) ac_try_echo=$ac_try;;
15096esac 14575esac
15097eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15098$as_echo "$ac_try_echo") >&5
15099 (eval "$ac_link") 2>conftest.er1 14577 (eval "$ac_link") 2>conftest.er1
15100 ac_status=$? 14578 ac_status=$?
15101 grep -v '^ *+' conftest.er1 >conftest.err 14579 grep -v '^ *+' conftest.er1 >conftest.err
15102 rm -f conftest.er1 14580 rm -f conftest.er1
15103 cat conftest.err >&5 14581 cat conftest.err >&5
15104 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15105 (exit $ac_status); } && { 14583 (exit $ac_status); } && {
15106 test -z "$ac_c_werror_flag" || 14584 test -z "$ac_c_werror_flag" ||
15107 test ! -s conftest.err 14585 test ! -s conftest.err
15108 } && test -s conftest$ac_exeext && { 14586 } && test -s conftest$ac_exeext &&
15109 test "$cross_compiling" = yes || 14587 $as_test_x conftest$ac_exeext; then
15110 $as_test_x conftest$ac_exeext
15111 }; then
15112 eval "$as_ac_var=yes" 14588 eval "$as_ac_var=yes"
15113else 14589else
15114 $as_echo "$as_me: failed program was:" >&5 14590 echo "$as_me: failed program was:" >&5
15115sed 's/^/| /' conftest.$ac_ext >&5 14591sed 's/^/| /' conftest.$ac_ext >&5
15116 14592
15117 eval "$as_ac_var=no" 14593 eval "$as_ac_var=no"
15118fi 14594fi
15119 14595
15120rm -rf conftest.dSYM
15121rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14596rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15122 conftest$ac_exeext conftest.$ac_ext 14597 conftest$ac_exeext conftest.$ac_ext
15123fi 14598fi
15124ac_res=`eval 'as_val=${'$as_ac_var'} 14599ac_res=`eval echo '${'$as_ac_var'}'`
15125 $as_echo "$as_val"'` 14600 { echo "$as_me:$LINENO: result: $ac_res" >&5
15126 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 14601echo "${ECHO_T}$ac_res" >&6; }
15127$as_echo "$ac_res" >&6; } 14602if test `eval echo '${'$as_ac_var'}'` = yes; then
15128if test `eval 'as_val=${'$as_ac_var'}
15129 $as_echo "$as_val"'` = yes; then
15130 cat >>confdefs.h <<_ACEOF 14603 cat >>confdefs.h <<_ACEOF
15131#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 14604#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15132_ACEOF 14605_ACEOF
15133 14606
15134 { $as_echo "$as_me:$LINENO: checking if setresgid seems to work" >&5 14607 { echo "$as_me:$LINENO: checking if setresgid seems to work" >&5
15135$as_echo_n "checking if setresgid seems to work... " >&6; } 14608echo $ECHO_N "checking if setresgid seems to work... $ECHO_C" >&6; }
15136 if test "$cross_compiling" = yes; then 14609 if test "$cross_compiling" = yes; then
15137 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: not checking setresuid" >&5 14610 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking setresuid" >&5
15138$as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;} 14611echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
15139 14612
15140else 14613else
15141 cat >conftest.$ac_ext <<_ACEOF 14614 cat >conftest.$ac_ext <<_ACEOF
@@ -15156,27 +14629,25 @@ case "(($ac_try" in
15156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15157 *) ac_try_echo=$ac_try;; 14630 *) ac_try_echo=$ac_try;;
15158esac 14631esac
15159eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15160$as_echo "$ac_try_echo") >&5
15161 (eval "$ac_link") 2>&5 14633 (eval "$ac_link") 2>&5
15162 ac_status=$? 14634 ac_status=$?
15163 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15164 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 14636 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15165 { (case "(($ac_try" in 14637 { (case "(($ac_try" in
15166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15167 *) ac_try_echo=$ac_try;; 14639 *) ac_try_echo=$ac_try;;
15168esac 14640esac
15169eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15170$as_echo "$ac_try_echo") >&5
15171 (eval "$ac_try") 2>&5 14642 (eval "$ac_try") 2>&5
15172 ac_status=$? 14643 ac_status=$?
15173 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15174 (exit $ac_status); }; }; then 14645 (exit $ac_status); }; }; then
15175 { $as_echo "$as_me:$LINENO: result: yes" >&5 14646 { echo "$as_me:$LINENO: result: yes" >&5
15176$as_echo "yes" >&6; } 14647echo "${ECHO_T}yes" >&6; }
15177else 14648else
15178 $as_echo "$as_me: program exited with status $ac_status" >&5 14649 echo "$as_me: program exited with status $ac_status" >&5
15179$as_echo "$as_me: failed program was:" >&5 14650echo "$as_me: failed program was:" >&5
15180sed 's/^/| /' conftest.$ac_ext >&5 14651sed 's/^/| /' conftest.$ac_ext >&5
15181 14652
15182( exit $ac_status ) 14653( exit $ac_status )
@@ -15185,10 +14656,9 @@ cat >>confdefs.h <<\_ACEOF
15185#define BROKEN_SETRESGID 1 14656#define BROKEN_SETRESGID 1
15186_ACEOF 14657_ACEOF
15187 14658
15188 { $as_echo "$as_me:$LINENO: result: not implemented" >&5 14659 { echo "$as_me:$LINENO: result: not implemented" >&5
15189$as_echo "not implemented" >&6; } 14660echo "${ECHO_T}not implemented" >&6; }
15190fi 14661fi
15191rm -rf conftest.dSYM
15192rm -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
15193fi 14663fi
15194 14664
@@ -15202,11 +14672,11 @@ done
15202 14672
15203for ac_func in gettimeofday time 14673for ac_func in gettimeofday time
15204do 14674do
15205as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 14675as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15206{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 14676{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15207$as_echo_n "checking for $ac_func... " >&6; } 14677echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15208if { 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
15209 $as_echo_n "(cached) " >&6 14679 echo $ECHO_N "(cached) $ECHO_C" >&6
15210else 14680else
15211 cat >conftest.$ac_ext <<_ACEOF 14681 cat >conftest.$ac_ext <<_ACEOF
15212/* confdefs.h. */ 14682/* confdefs.h. */
@@ -15259,41 +14729,35 @@ case "(($ac_try" in
15259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15260 *) ac_try_echo=$ac_try;; 14730 *) ac_try_echo=$ac_try;;
15261esac 14731esac
15262eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15263$as_echo "$ac_try_echo") >&5
15264 (eval "$ac_link") 2>conftest.er1 14733 (eval "$ac_link") 2>conftest.er1
15265 ac_status=$? 14734 ac_status=$?
15266 grep -v '^ *+' conftest.er1 >conftest.err 14735 grep -v '^ *+' conftest.er1 >conftest.err
15267 rm -f conftest.er1 14736 rm -f conftest.er1
15268 cat conftest.err >&5 14737 cat conftest.err >&5
15269 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15270 (exit $ac_status); } && { 14739 (exit $ac_status); } && {
15271 test -z "$ac_c_werror_flag" || 14740 test -z "$ac_c_werror_flag" ||
15272 test ! -s conftest.err 14741 test ! -s conftest.err
15273 } && test -s conftest$ac_exeext && { 14742 } && test -s conftest$ac_exeext &&
15274 test "$cross_compiling" = yes || 14743 $as_test_x conftest$ac_exeext; then
15275 $as_test_x conftest$ac_exeext
15276 }; then
15277 eval "$as_ac_var=yes" 14744 eval "$as_ac_var=yes"
15278else 14745else
15279 $as_echo "$as_me: failed program was:" >&5 14746 echo "$as_me: failed program was:" >&5
15280sed 's/^/| /' conftest.$ac_ext >&5 14747sed 's/^/| /' conftest.$ac_ext >&5
15281 14748
15282 eval "$as_ac_var=no" 14749 eval "$as_ac_var=no"
15283fi 14750fi
15284 14751
15285rm -rf conftest.dSYM
15286rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14752rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15287 conftest$ac_exeext conftest.$ac_ext 14753 conftest$ac_exeext conftest.$ac_ext
15288fi 14754fi
15289ac_res=`eval 'as_val=${'$as_ac_var'} 14755ac_res=`eval echo '${'$as_ac_var'}'`
15290 $as_echo "$as_val"'` 14756 { echo "$as_me:$LINENO: result: $ac_res" >&5
15291 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 14757echo "${ECHO_T}$ac_res" >&6; }
15292$as_echo "$ac_res" >&6; } 14758if test `eval echo '${'$as_ac_var'}'` = yes; then
15293if test `eval 'as_val=${'$as_ac_var'}
15294 $as_echo "$as_val"'` = yes; then
15295 cat >>confdefs.h <<_ACEOF 14759 cat >>confdefs.h <<_ACEOF
15296#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 14760#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15297_ACEOF 14761_ACEOF
15298 14762
15299fi 14763fi
@@ -15307,11 +14771,11 @@ done
15307 14771
15308for ac_func in endutent getutent getutid getutline pututline setutent 14772for ac_func in endutent getutent getutid getutline pututline setutent
15309do 14773do
15310as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 14774as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15311{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 14775{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15312$as_echo_n "checking for $ac_func... " >&6; } 14776echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15313if { 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
15314 $as_echo_n "(cached) " >&6 14778 echo $ECHO_N "(cached) $ECHO_C" >&6
15315else 14779else
15316 cat >conftest.$ac_ext <<_ACEOF 14780 cat >conftest.$ac_ext <<_ACEOF
15317/* confdefs.h. */ 14781/* confdefs.h. */
@@ -15364,41 +14828,35 @@ case "(($ac_try" in
15364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15365 *) ac_try_echo=$ac_try;; 14829 *) ac_try_echo=$ac_try;;
15366esac 14830esac
15367eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15368$as_echo "$ac_try_echo") >&5
15369 (eval "$ac_link") 2>conftest.er1 14832 (eval "$ac_link") 2>conftest.er1
15370 ac_status=$? 14833 ac_status=$?
15371 grep -v '^ *+' conftest.er1 >conftest.err 14834 grep -v '^ *+' conftest.er1 >conftest.err
15372 rm -f conftest.er1 14835 rm -f conftest.er1
15373 cat conftest.err >&5 14836 cat conftest.err >&5
15374 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15375 (exit $ac_status); } && { 14838 (exit $ac_status); } && {
15376 test -z "$ac_c_werror_flag" || 14839 test -z "$ac_c_werror_flag" ||
15377 test ! -s conftest.err 14840 test ! -s conftest.err
15378 } && test -s conftest$ac_exeext && { 14841 } && test -s conftest$ac_exeext &&
15379 test "$cross_compiling" = yes || 14842 $as_test_x conftest$ac_exeext; then
15380 $as_test_x conftest$ac_exeext
15381 }; then
15382 eval "$as_ac_var=yes" 14843 eval "$as_ac_var=yes"
15383else 14844else
15384 $as_echo "$as_me: failed program was:" >&5 14845 echo "$as_me: failed program was:" >&5
15385sed 's/^/| /' conftest.$ac_ext >&5 14846sed 's/^/| /' conftest.$ac_ext >&5
15386 14847
15387 eval "$as_ac_var=no" 14848 eval "$as_ac_var=no"
15388fi 14849fi
15389 14850
15390rm -rf conftest.dSYM
15391rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14851rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15392 conftest$ac_exeext conftest.$ac_ext 14852 conftest$ac_exeext conftest.$ac_ext
15393fi 14853fi
15394ac_res=`eval 'as_val=${'$as_ac_var'} 14854ac_res=`eval echo '${'$as_ac_var'}'`
15395 $as_echo "$as_val"'` 14855 { echo "$as_me:$LINENO: result: $ac_res" >&5
15396 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 14856echo "${ECHO_T}$ac_res" >&6; }
15397$as_echo "$ac_res" >&6; } 14857if test `eval echo '${'$as_ac_var'}'` = yes; then
15398if test `eval 'as_val=${'$as_ac_var'}
15399 $as_echo "$as_val"'` = yes; then
15400 cat >>confdefs.h <<_ACEOF 14858 cat >>confdefs.h <<_ACEOF
15401#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 14859#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15402_ACEOF 14860_ACEOF
15403 14861
15404fi 14862fi
@@ -15407,11 +14865,11 @@ done
15407 14865
15408for ac_func in utmpname 14866for ac_func in utmpname
15409do 14867do
15410as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 14868as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15411{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 14869{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15412$as_echo_n "checking for $ac_func... " >&6; } 14870echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15413if { 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
15414 $as_echo_n "(cached) " >&6 14872 echo $ECHO_N "(cached) $ECHO_C" >&6
15415else 14873else
15416 cat >conftest.$ac_ext <<_ACEOF 14874 cat >conftest.$ac_ext <<_ACEOF
15417/* confdefs.h. */ 14875/* confdefs.h. */
@@ -15464,41 +14922,35 @@ case "(($ac_try" in
15464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15465 *) ac_try_echo=$ac_try;; 14923 *) ac_try_echo=$ac_try;;
15466esac 14924esac
15467eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 14925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15468$as_echo "$ac_try_echo") >&5
15469 (eval "$ac_link") 2>conftest.er1 14926 (eval "$ac_link") 2>conftest.er1
15470 ac_status=$? 14927 ac_status=$?
15471 grep -v '^ *+' conftest.er1 >conftest.err 14928 grep -v '^ *+' conftest.er1 >conftest.err
15472 rm -f conftest.er1 14929 rm -f conftest.er1
15473 cat conftest.err >&5 14930 cat conftest.err >&5
15474 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 14931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15475 (exit $ac_status); } && { 14932 (exit $ac_status); } && {
15476 test -z "$ac_c_werror_flag" || 14933 test -z "$ac_c_werror_flag" ||
15477 test ! -s conftest.err 14934 test ! -s conftest.err
15478 } && test -s conftest$ac_exeext && { 14935 } && test -s conftest$ac_exeext &&
15479 test "$cross_compiling" = yes || 14936 $as_test_x conftest$ac_exeext; then
15480 $as_test_x conftest$ac_exeext
15481 }; then
15482 eval "$as_ac_var=yes" 14937 eval "$as_ac_var=yes"
15483else 14938else
15484 $as_echo "$as_me: failed program was:" >&5 14939 echo "$as_me: failed program was:" >&5
15485sed 's/^/| /' conftest.$ac_ext >&5 14940sed 's/^/| /' conftest.$ac_ext >&5
15486 14941
15487 eval "$as_ac_var=no" 14942 eval "$as_ac_var=no"
15488fi 14943fi
15489 14944
15490rm -rf conftest.dSYM
15491rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14945rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15492 conftest$ac_exeext conftest.$ac_ext 14946 conftest$ac_exeext conftest.$ac_ext
15493fi 14947fi
15494ac_res=`eval 'as_val=${'$as_ac_var'} 14948ac_res=`eval echo '${'$as_ac_var'}'`
15495 $as_echo "$as_val"'` 14949 { echo "$as_me:$LINENO: result: $ac_res" >&5
15496 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 14950echo "${ECHO_T}$ac_res" >&6; }
15497$as_echo "$ac_res" >&6; } 14951if test `eval echo '${'$as_ac_var'}'` = yes; then
15498if test `eval 'as_val=${'$as_ac_var'}
15499 $as_echo "$as_val"'` = yes; then
15500 cat >>confdefs.h <<_ACEOF 14952 cat >>confdefs.h <<_ACEOF
15501#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 14953#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15502_ACEOF 14954_ACEOF
15503 14955
15504fi 14956fi
@@ -15511,11 +14963,11 @@ done
15511 14963
15512for ac_func in endutxent getutxent getutxid getutxline pututxline 14964for ac_func in endutxent getutxent getutxid getutxline pututxline
15513do 14965do
15514as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 14966as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15515{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 14967{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15516$as_echo_n "checking for $ac_func... " >&6; } 14968echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15517if { 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
15518 $as_echo_n "(cached) " >&6 14970 echo $ECHO_N "(cached) $ECHO_C" >&6
15519else 14971else
15520 cat >conftest.$ac_ext <<_ACEOF 14972 cat >conftest.$ac_ext <<_ACEOF
15521/* confdefs.h. */ 14973/* confdefs.h. */
@@ -15568,41 +15020,35 @@ case "(($ac_try" in
15568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15569 *) ac_try_echo=$ac_try;; 15021 *) ac_try_echo=$ac_try;;
15570esac 15022esac
15571eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15572$as_echo "$ac_try_echo") >&5
15573 (eval "$ac_link") 2>conftest.er1 15024 (eval "$ac_link") 2>conftest.er1
15574 ac_status=$? 15025 ac_status=$?
15575 grep -v '^ *+' conftest.er1 >conftest.err 15026 grep -v '^ *+' conftest.er1 >conftest.err
15576 rm -f conftest.er1 15027 rm -f conftest.er1
15577 cat conftest.err >&5 15028 cat conftest.err >&5
15578 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15579 (exit $ac_status); } && { 15030 (exit $ac_status); } && {
15580 test -z "$ac_c_werror_flag" || 15031 test -z "$ac_c_werror_flag" ||
15581 test ! -s conftest.err 15032 test ! -s conftest.err
15582 } && test -s conftest$ac_exeext && { 15033 } && test -s conftest$ac_exeext &&
15583 test "$cross_compiling" = yes || 15034 $as_test_x conftest$ac_exeext; then
15584 $as_test_x conftest$ac_exeext
15585 }; then
15586 eval "$as_ac_var=yes" 15035 eval "$as_ac_var=yes"
15587else 15036else
15588 $as_echo "$as_me: failed program was:" >&5 15037 echo "$as_me: failed program was:" >&5
15589sed 's/^/| /' conftest.$ac_ext >&5 15038sed 's/^/| /' conftest.$ac_ext >&5
15590 15039
15591 eval "$as_ac_var=no" 15040 eval "$as_ac_var=no"
15592fi 15041fi
15593 15042
15594rm -rf conftest.dSYM
15595rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 15043rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15596 conftest$ac_exeext conftest.$ac_ext 15044 conftest$ac_exeext conftest.$ac_ext
15597fi 15045fi
15598ac_res=`eval 'as_val=${'$as_ac_var'} 15046ac_res=`eval echo '${'$as_ac_var'}'`
15599 $as_echo "$as_val"'` 15047 { echo "$as_me:$LINENO: result: $ac_res" >&5
15600 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 15048echo "${ECHO_T}$ac_res" >&6; }
15601$as_echo "$ac_res" >&6; } 15049if test `eval echo '${'$as_ac_var'}'` = yes; then
15602if test `eval 'as_val=${'$as_ac_var'}
15603 $as_echo "$as_val"'` = yes; then
15604 cat >>confdefs.h <<_ACEOF 15050 cat >>confdefs.h <<_ACEOF
15605#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 15051#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15606_ACEOF 15052_ACEOF
15607 15053
15608fi 15054fi
@@ -15612,11 +15058,11 @@ done
15612 15058
15613for ac_func in setutxent utmpxname 15059for ac_func in setutxent utmpxname
15614do 15060do
15615as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 15061as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15616{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 15062{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15617$as_echo_n "checking for $ac_func... " >&6; } 15063echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15618if { 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
15619 $as_echo_n "(cached) " >&6 15065 echo $ECHO_N "(cached) $ECHO_C" >&6
15620else 15066else
15621 cat >conftest.$ac_ext <<_ACEOF 15067 cat >conftest.$ac_ext <<_ACEOF
15622/* confdefs.h. */ 15068/* confdefs.h. */
@@ -15669,41 +15115,35 @@ case "(($ac_try" in
15669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15670 *) ac_try_echo=$ac_try;; 15116 *) ac_try_echo=$ac_try;;
15671esac 15117esac
15672eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15673$as_echo "$ac_try_echo") >&5
15674 (eval "$ac_link") 2>conftest.er1 15119 (eval "$ac_link") 2>conftest.er1
15675 ac_status=$? 15120 ac_status=$?
15676 grep -v '^ *+' conftest.er1 >conftest.err 15121 grep -v '^ *+' conftest.er1 >conftest.err
15677 rm -f conftest.er1 15122 rm -f conftest.er1
15678 cat conftest.err >&5 15123 cat conftest.err >&5
15679 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15680 (exit $ac_status); } && { 15125 (exit $ac_status); } && {
15681 test -z "$ac_c_werror_flag" || 15126 test -z "$ac_c_werror_flag" ||
15682 test ! -s conftest.err 15127 test ! -s conftest.err
15683 } && test -s conftest$ac_exeext && { 15128 } && test -s conftest$ac_exeext &&
15684 test "$cross_compiling" = yes || 15129 $as_test_x conftest$ac_exeext; then
15685 $as_test_x conftest$ac_exeext
15686 }; then
15687 eval "$as_ac_var=yes" 15130 eval "$as_ac_var=yes"
15688else 15131else
15689 $as_echo "$as_me: failed program was:" >&5 15132 echo "$as_me: failed program was:" >&5
15690sed 's/^/| /' conftest.$ac_ext >&5 15133sed 's/^/| /' conftest.$ac_ext >&5
15691 15134
15692 eval "$as_ac_var=no" 15135 eval "$as_ac_var=no"
15693fi 15136fi
15694 15137
15695rm -rf conftest.dSYM
15696rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 15138rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15697 conftest$ac_exeext conftest.$ac_ext 15139 conftest$ac_exeext conftest.$ac_ext
15698fi 15140fi
15699ac_res=`eval 'as_val=${'$as_ac_var'} 15141ac_res=`eval echo '${'$as_ac_var'}'`
15700 $as_echo "$as_val"'` 15142 { echo "$as_me:$LINENO: result: $ac_res" >&5
15701 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 15143echo "${ECHO_T}$ac_res" >&6; }
15702$as_echo "$ac_res" >&6; } 15144if test `eval echo '${'$as_ac_var'}'` = yes; then
15703if test `eval 'as_val=${'$as_ac_var'}
15704 $as_echo "$as_val"'` = yes; then
15705 cat >>confdefs.h <<_ACEOF 15145 cat >>confdefs.h <<_ACEOF
15706#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 15146#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15707_ACEOF 15147_ACEOF
15708 15148
15709fi 15149fi
@@ -15712,11 +15152,11 @@ done
15712 15152
15713for ac_func in getlastlogxbyname 15153for ac_func in getlastlogxbyname
15714do 15154do
15715as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 15155as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15716{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 15156{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15717$as_echo_n "checking for $ac_func... " >&6; } 15157echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15718if { 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
15719 $as_echo_n "(cached) " >&6 15159 echo $ECHO_N "(cached) $ECHO_C" >&6
15720else 15160else
15721 cat >conftest.$ac_ext <<_ACEOF 15161 cat >conftest.$ac_ext <<_ACEOF
15722/* confdefs.h. */ 15162/* confdefs.h. */
@@ -15769,51 +15209,45 @@ case "(($ac_try" in
15769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15770 *) ac_try_echo=$ac_try;; 15210 *) ac_try_echo=$ac_try;;
15771esac 15211esac
15772eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15773$as_echo "$ac_try_echo") >&5
15774 (eval "$ac_link") 2>conftest.er1 15213 (eval "$ac_link") 2>conftest.er1
15775 ac_status=$? 15214 ac_status=$?
15776 grep -v '^ *+' conftest.er1 >conftest.err 15215 grep -v '^ *+' conftest.er1 >conftest.err
15777 rm -f conftest.er1 15216 rm -f conftest.er1
15778 cat conftest.err >&5 15217 cat conftest.err >&5
15779 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15780 (exit $ac_status); } && { 15219 (exit $ac_status); } && {
15781 test -z "$ac_c_werror_flag" || 15220 test -z "$ac_c_werror_flag" ||
15782 test ! -s conftest.err 15221 test ! -s conftest.err
15783 } && test -s conftest$ac_exeext && { 15222 } && test -s conftest$ac_exeext &&
15784 test "$cross_compiling" = yes || 15223 $as_test_x conftest$ac_exeext; then
15785 $as_test_x conftest$ac_exeext
15786 }; then
15787 eval "$as_ac_var=yes" 15224 eval "$as_ac_var=yes"
15788else 15225else
15789 $as_echo "$as_me: failed program was:" >&5 15226 echo "$as_me: failed program was:" >&5
15790sed 's/^/| /' conftest.$ac_ext >&5 15227sed 's/^/| /' conftest.$ac_ext >&5
15791 15228
15792 eval "$as_ac_var=no" 15229 eval "$as_ac_var=no"
15793fi 15230fi
15794 15231
15795rm -rf conftest.dSYM
15796rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 15232rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15797 conftest$ac_exeext conftest.$ac_ext 15233 conftest$ac_exeext conftest.$ac_ext
15798fi 15234fi
15799ac_res=`eval 'as_val=${'$as_ac_var'} 15235ac_res=`eval echo '${'$as_ac_var'}'`
15800 $as_echo "$as_val"'` 15236 { echo "$as_me:$LINENO: result: $ac_res" >&5
15801 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 15237echo "${ECHO_T}$ac_res" >&6; }
15802$as_echo "$ac_res" >&6; } 15238if test `eval echo '${'$as_ac_var'}'` = yes; then
15803if test `eval 'as_val=${'$as_ac_var'}
15804 $as_echo "$as_val"'` = yes; then
15805 cat >>confdefs.h <<_ACEOF 15239 cat >>confdefs.h <<_ACEOF
15806#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 15240#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15807_ACEOF 15241_ACEOF
15808 15242
15809fi 15243fi
15810done 15244done
15811 15245
15812 15246
15813{ $as_echo "$as_me:$LINENO: checking for daemon" >&5 15247{ echo "$as_me:$LINENO: checking for daemon" >&5
15814$as_echo_n "checking for daemon... " >&6; } 15248echo $ECHO_N "checking for daemon... $ECHO_C" >&6; }
15815if test "${ac_cv_func_daemon+set}" = set; then 15249if test "${ac_cv_func_daemon+set}" = set; then
15816 $as_echo_n "(cached) " >&6 15250 echo $ECHO_N "(cached) $ECHO_C" >&6
15817else 15251else
15818 cat >conftest.$ac_ext <<_ACEOF 15252 cat >conftest.$ac_ext <<_ACEOF
15819/* confdefs.h. */ 15253/* confdefs.h. */
@@ -15866,35 +15300,31 @@ case "(($ac_try" in
15866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15867 *) ac_try_echo=$ac_try;; 15301 *) ac_try_echo=$ac_try;;
15868esac 15302esac
15869eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15870$as_echo "$ac_try_echo") >&5
15871 (eval "$ac_link") 2>conftest.er1 15304 (eval "$ac_link") 2>conftest.er1
15872 ac_status=$? 15305 ac_status=$?
15873 grep -v '^ *+' conftest.er1 >conftest.err 15306 grep -v '^ *+' conftest.er1 >conftest.err
15874 rm -f conftest.er1 15307 rm -f conftest.er1
15875 cat conftest.err >&5 15308 cat conftest.err >&5
15876 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15877 (exit $ac_status); } && { 15310 (exit $ac_status); } && {
15878 test -z "$ac_c_werror_flag" || 15311 test -z "$ac_c_werror_flag" ||
15879 test ! -s conftest.err 15312 test ! -s conftest.err
15880 } && test -s conftest$ac_exeext && { 15313 } && test -s conftest$ac_exeext &&
15881 test "$cross_compiling" = yes || 15314 $as_test_x conftest$ac_exeext; then
15882 $as_test_x conftest$ac_exeext
15883 }; then
15884 ac_cv_func_daemon=yes 15315 ac_cv_func_daemon=yes
15885else 15316else
15886 $as_echo "$as_me: failed program was:" >&5 15317 echo "$as_me: failed program was:" >&5
15887sed 's/^/| /' conftest.$ac_ext >&5 15318sed 's/^/| /' conftest.$ac_ext >&5
15888 15319
15889 ac_cv_func_daemon=no 15320 ac_cv_func_daemon=no
15890fi 15321fi
15891 15322
15892rm -rf conftest.dSYM
15893rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 15323rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15894 conftest$ac_exeext conftest.$ac_ext 15324 conftest$ac_exeext conftest.$ac_ext
15895fi 15325fi
15896{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_daemon" >&5 15326{ echo "$as_me:$LINENO: result: $ac_cv_func_daemon" >&5
15897$as_echo "$ac_cv_func_daemon" >&6; } 15327echo "${ECHO_T}$ac_cv_func_daemon" >&6; }
15898if test $ac_cv_func_daemon = yes; then 15328if test $ac_cv_func_daemon = yes; then
15899 15329
15900cat >>confdefs.h <<\_ACEOF 15330cat >>confdefs.h <<\_ACEOF
@@ -15902,10 +15332,10 @@ cat >>confdefs.h <<\_ACEOF
15902_ACEOF 15332_ACEOF
15903 15333
15904else 15334else
15905 { $as_echo "$as_me:$LINENO: checking for daemon in -lbsd" >&5 15335 { echo "$as_me:$LINENO: checking for daemon in -lbsd" >&5
15906$as_echo_n "checking for daemon in -lbsd... " >&6; } 15336echo $ECHO_N "checking for daemon in -lbsd... $ECHO_C" >&6; }
15907if test "${ac_cv_lib_bsd_daemon+set}" = set; then 15337if test "${ac_cv_lib_bsd_daemon+set}" = set; then
15908 $as_echo_n "(cached) " >&6 15338 echo $ECHO_N "(cached) $ECHO_C" >&6
15909else 15339else
15910 ac_check_lib_save_LIBS=$LIBS 15340 ac_check_lib_save_LIBS=$LIBS
15911LIBS="-lbsd $LIBS" 15341LIBS="-lbsd $LIBS"
@@ -15937,36 +15367,32 @@ case "(($ac_try" in
15937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15938 *) ac_try_echo=$ac_try;; 15368 *) ac_try_echo=$ac_try;;
15939esac 15369esac
15940eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15941$as_echo "$ac_try_echo") >&5
15942 (eval "$ac_link") 2>conftest.er1 15371 (eval "$ac_link") 2>conftest.er1
15943 ac_status=$? 15372 ac_status=$?
15944 grep -v '^ *+' conftest.er1 >conftest.err 15373 grep -v '^ *+' conftest.er1 >conftest.err
15945 rm -f conftest.er1 15374 rm -f conftest.er1
15946 cat conftest.err >&5 15375 cat conftest.err >&5
15947 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15948 (exit $ac_status); } && { 15377 (exit $ac_status); } && {
15949 test -z "$ac_c_werror_flag" || 15378 test -z "$ac_c_werror_flag" ||
15950 test ! -s conftest.err 15379 test ! -s conftest.err
15951 } && test -s conftest$ac_exeext && { 15380 } && test -s conftest$ac_exeext &&
15952 test "$cross_compiling" = yes || 15381 $as_test_x conftest$ac_exeext; then
15953 $as_test_x conftest$ac_exeext
15954 }; then
15955 ac_cv_lib_bsd_daemon=yes 15382 ac_cv_lib_bsd_daemon=yes
15956else 15383else
15957 $as_echo "$as_me: failed program was:" >&5 15384 echo "$as_me: failed program was:" >&5
15958sed 's/^/| /' conftest.$ac_ext >&5 15385sed 's/^/| /' conftest.$ac_ext >&5
15959 15386
15960 ac_cv_lib_bsd_daemon=no 15387 ac_cv_lib_bsd_daemon=no
15961fi 15388fi
15962 15389
15963rm -rf conftest.dSYM
15964rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 15390rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15965 conftest$ac_exeext conftest.$ac_ext 15391 conftest$ac_exeext conftest.$ac_ext
15966LIBS=$ac_check_lib_save_LIBS 15392LIBS=$ac_check_lib_save_LIBS
15967fi 15393fi
15968{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_daemon" >&5 15394{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_daemon" >&5
15969$as_echo "$ac_cv_lib_bsd_daemon" >&6; } 15395echo "${ECHO_T}$ac_cv_lib_bsd_daemon" >&6; }
15970if test $ac_cv_lib_bsd_daemon = yes; then 15396if test $ac_cv_lib_bsd_daemon = yes; then
15971 LIBS="$LIBS -lbsd"; cat >>confdefs.h <<\_ACEOF 15397 LIBS="$LIBS -lbsd"; cat >>confdefs.h <<\_ACEOF
15972#define HAVE_DAEMON 1 15398#define HAVE_DAEMON 1
@@ -15978,10 +15404,10 @@ fi
15978fi 15404fi
15979 15405
15980 15406
15981{ $as_echo "$as_me:$LINENO: checking for getpagesize" >&5 15407{ echo "$as_me:$LINENO: checking for getpagesize" >&5
15982$as_echo_n "checking for getpagesize... " >&6; } 15408echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
15983if test "${ac_cv_func_getpagesize+set}" = set; then 15409if test "${ac_cv_func_getpagesize+set}" = set; then
15984 $as_echo_n "(cached) " >&6 15410 echo $ECHO_N "(cached) $ECHO_C" >&6
15985else 15411else
15986 cat >conftest.$ac_ext <<_ACEOF 15412 cat >conftest.$ac_ext <<_ACEOF
15987/* confdefs.h. */ 15413/* confdefs.h. */
@@ -16034,35 +15460,31 @@ case "(($ac_try" in
16034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16035 *) ac_try_echo=$ac_try;; 15461 *) ac_try_echo=$ac_try;;
16036esac 15462esac
16037eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16038$as_echo "$ac_try_echo") >&5
16039 (eval "$ac_link") 2>conftest.er1 15464 (eval "$ac_link") 2>conftest.er1
16040 ac_status=$? 15465 ac_status=$?
16041 grep -v '^ *+' conftest.er1 >conftest.err 15466 grep -v '^ *+' conftest.er1 >conftest.err
16042 rm -f conftest.er1 15467 rm -f conftest.er1
16043 cat conftest.err >&5 15468 cat conftest.err >&5
16044 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16045 (exit $ac_status); } && { 15470 (exit $ac_status); } && {
16046 test -z "$ac_c_werror_flag" || 15471 test -z "$ac_c_werror_flag" ||
16047 test ! -s conftest.err 15472 test ! -s conftest.err
16048 } && test -s conftest$ac_exeext && { 15473 } && test -s conftest$ac_exeext &&
16049 test "$cross_compiling" = yes || 15474 $as_test_x conftest$ac_exeext; then
16050 $as_test_x conftest$ac_exeext
16051 }; then
16052 ac_cv_func_getpagesize=yes 15475 ac_cv_func_getpagesize=yes
16053else 15476else
16054 $as_echo "$as_me: failed program was:" >&5 15477 echo "$as_me: failed program was:" >&5
16055sed 's/^/| /' conftest.$ac_ext >&5 15478sed 's/^/| /' conftest.$ac_ext >&5
16056 15479
16057 ac_cv_func_getpagesize=no 15480 ac_cv_func_getpagesize=no
16058fi 15481fi
16059 15482
16060rm -rf conftest.dSYM
16061rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 15483rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16062 conftest$ac_exeext conftest.$ac_ext 15484 conftest$ac_exeext conftest.$ac_ext
16063fi 15485fi
16064{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getpagesize" >&5 15486{ echo "$as_me:$LINENO: result: $ac_cv_func_getpagesize" >&5
16065$as_echo "$ac_cv_func_getpagesize" >&6; } 15487echo "${ECHO_T}$ac_cv_func_getpagesize" >&6; }
16066if test $ac_cv_func_getpagesize = yes; then 15488if test $ac_cv_func_getpagesize = yes; then
16067 15489
16068cat >>confdefs.h <<\_ACEOF 15490cat >>confdefs.h <<\_ACEOF
@@ -16070,10 +15492,10 @@ cat >>confdefs.h <<\_ACEOF
16070_ACEOF 15492_ACEOF
16071 15493
16072else 15494else
16073 { $as_echo "$as_me:$LINENO: checking for getpagesize in -lucb" >&5 15495 { echo "$as_me:$LINENO: checking for getpagesize in -lucb" >&5
16074$as_echo_n "checking for getpagesize in -lucb... " >&6; } 15496echo $ECHO_N "checking for getpagesize in -lucb... $ECHO_C" >&6; }
16075if test "${ac_cv_lib_ucb_getpagesize+set}" = set; then 15497if test "${ac_cv_lib_ucb_getpagesize+set}" = set; then
16076 $as_echo_n "(cached) " >&6 15498 echo $ECHO_N "(cached) $ECHO_C" >&6
16077else 15499else
16078 ac_check_lib_save_LIBS=$LIBS 15500 ac_check_lib_save_LIBS=$LIBS
16079LIBS="-lucb $LIBS" 15501LIBS="-lucb $LIBS"
@@ -16105,36 +15527,32 @@ case "(($ac_try" in
16105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16106 *) ac_try_echo=$ac_try;; 15528 *) ac_try_echo=$ac_try;;
16107esac 15529esac
16108eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16109$as_echo "$ac_try_echo") >&5
16110 (eval "$ac_link") 2>conftest.er1 15531 (eval "$ac_link") 2>conftest.er1
16111 ac_status=$? 15532 ac_status=$?
16112 grep -v '^ *+' conftest.er1 >conftest.err 15533 grep -v '^ *+' conftest.er1 >conftest.err
16113 rm -f conftest.er1 15534 rm -f conftest.er1
16114 cat conftest.err >&5 15535 cat conftest.err >&5
16115 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16116 (exit $ac_status); } && { 15537 (exit $ac_status); } && {
16117 test -z "$ac_c_werror_flag" || 15538 test -z "$ac_c_werror_flag" ||
16118 test ! -s conftest.err 15539 test ! -s conftest.err
16119 } && test -s conftest$ac_exeext && { 15540 } && test -s conftest$ac_exeext &&
16120 test "$cross_compiling" = yes || 15541 $as_test_x conftest$ac_exeext; then
16121 $as_test_x conftest$ac_exeext
16122 }; then
16123 ac_cv_lib_ucb_getpagesize=yes 15542 ac_cv_lib_ucb_getpagesize=yes
16124else 15543else
16125 $as_echo "$as_me: failed program was:" >&5 15544 echo "$as_me: failed program was:" >&5
16126sed 's/^/| /' conftest.$ac_ext >&5 15545sed 's/^/| /' conftest.$ac_ext >&5
16127 15546
16128 ac_cv_lib_ucb_getpagesize=no 15547 ac_cv_lib_ucb_getpagesize=no
16129fi 15548fi
16130 15549
16131rm -rf conftest.dSYM
16132rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 15550rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16133 conftest$ac_exeext conftest.$ac_ext 15551 conftest$ac_exeext conftest.$ac_ext
16134LIBS=$ac_check_lib_save_LIBS 15552LIBS=$ac_check_lib_save_LIBS
16135fi 15553fi
16136{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ucb_getpagesize" >&5 15554{ echo "$as_me:$LINENO: result: $ac_cv_lib_ucb_getpagesize" >&5
16137$as_echo "$ac_cv_lib_ucb_getpagesize" >&6; } 15555echo "${ECHO_T}$ac_cv_lib_ucb_getpagesize" >&6; }
16138if test $ac_cv_lib_ucb_getpagesize = yes; then 15556if test $ac_cv_lib_ucb_getpagesize = yes; then
16139 LIBS="$LIBS -lucb"; cat >>confdefs.h <<\_ACEOF 15557 LIBS="$LIBS -lucb"; cat >>confdefs.h <<\_ACEOF
16140#define HAVE_GETPAGESIZE 1 15558#define HAVE_GETPAGESIZE 1
@@ -16148,11 +15566,11 @@ fi
16148 15566
16149# Check for broken snprintf 15567# Check for broken snprintf
16150if test "x$ac_cv_func_snprintf" = "xyes" ; then 15568if test "x$ac_cv_func_snprintf" = "xyes" ; then
16151 { $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
16152$as_echo_n "checking whether snprintf correctly terminates long strings... " >&6; } 15570echo $ECHO_N "checking whether snprintf correctly terminates long strings... $ECHO_C" >&6; }
16153 if test "$cross_compiling" = yes; then 15571 if test "$cross_compiling" = yes; then
16154 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working snprintf()" >&5 15572 { echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working snprintf()" >&5
16155$as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;} 15573echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
16156 15574
16157else 15575else
16158 cat >conftest.$ac_ext <<_ACEOF 15576 cat >conftest.$ac_ext <<_ACEOF
@@ -16172,43 +15590,40 @@ case "(($ac_try" in
16172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16173 *) ac_try_echo=$ac_try;; 15591 *) ac_try_echo=$ac_try;;
16174esac 15592esac
16175eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16176$as_echo "$ac_try_echo") >&5
16177 (eval "$ac_link") 2>&5 15594 (eval "$ac_link") 2>&5
16178 ac_status=$? 15595 ac_status=$?
16179 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16180 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 15597 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16181 { (case "(($ac_try" in 15598 { (case "(($ac_try" in
16182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16183 *) ac_try_echo=$ac_try;; 15600 *) ac_try_echo=$ac_try;;
16184esac 15601esac
16185eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16186$as_echo "$ac_try_echo") >&5
16187 (eval "$ac_try") 2>&5 15603 (eval "$ac_try") 2>&5
16188 ac_status=$? 15604 ac_status=$?
16189 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16190 (exit $ac_status); }; }; then 15606 (exit $ac_status); }; }; then
16191 { $as_echo "$as_me:$LINENO: result: yes" >&5 15607 { echo "$as_me:$LINENO: result: yes" >&5
16192$as_echo "yes" >&6; } 15608echo "${ECHO_T}yes" >&6; }
16193else 15609else
16194 $as_echo "$as_me: program exited with status $ac_status" >&5 15610 echo "$as_me: program exited with status $ac_status" >&5
16195$as_echo "$as_me: failed program was:" >&5 15611echo "$as_me: failed program was:" >&5
16196sed 's/^/| /' conftest.$ac_ext >&5 15612sed 's/^/| /' conftest.$ac_ext >&5
16197 15613
16198( exit $ac_status ) 15614( exit $ac_status )
16199 15615
16200 { $as_echo "$as_me:$LINENO: result: no" >&5 15616 { echo "$as_me:$LINENO: result: no" >&5
16201$as_echo "no" >&6; } 15617echo "${ECHO_T}no" >&6; }
16202 15618
16203cat >>confdefs.h <<\_ACEOF 15619cat >>confdefs.h <<\_ACEOF
16204#define BROKEN_SNPRINTF 1 15620#define BROKEN_SNPRINTF 1
16205_ACEOF 15621_ACEOF
16206 15622
16207 { $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
16208$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;}
16209 15625
16210fi 15626fi
16211rm -rf conftest.dSYM
16212rm -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
16213fi 15628fi
16214 15629
@@ -16220,11 +15635,11 @@ fi
16220# create (as per SUSv3) 15635# create (as per SUSv3)
16221if test "x$ac_cv_func_asprintf" != "xyes" && \ 15636if test "x$ac_cv_func_asprintf" != "xyes" && \
16222 test "x$ac_cv_func_vsnprintf" = "xyes" ; then 15637 test "x$ac_cv_func_vsnprintf" = "xyes" ; then
16223 { $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
16224$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; }
16225 if test "$cross_compiling" = yes; then 15640 if test "$cross_compiling" = yes; then
16226 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working vsnprintf()" >&5 15641 { echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working vsnprintf()" >&5
16227$as_echo "$as_me: WARNING: cross compiling: Assuming working vsnprintf()" >&2;} 15642echo "$as_me: WARNING: cross compiling: Assuming working vsnprintf()" >&2;}
16228 15643
16229else 15644else
16230 cat >conftest.$ac_ext <<_ACEOF 15645 cat >conftest.$ac_ext <<_ACEOF
@@ -16256,43 +15671,40 @@ case "(($ac_try" in
16256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16257 *) ac_try_echo=$ac_try;; 15672 *) ac_try_echo=$ac_try;;
16258esac 15673esac
16259eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16260$as_echo "$ac_try_echo") >&5
16261 (eval "$ac_link") 2>&5 15675 (eval "$ac_link") 2>&5
16262 ac_status=$? 15676 ac_status=$?
16263 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16264 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 15678 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16265 { (case "(($ac_try" in 15679 { (case "(($ac_try" in
16266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16267 *) ac_try_echo=$ac_try;; 15681 *) ac_try_echo=$ac_try;;
16268esac 15682esac
16269eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16270$as_echo "$ac_try_echo") >&5
16271 (eval "$ac_try") 2>&5 15684 (eval "$ac_try") 2>&5
16272 ac_status=$? 15685 ac_status=$?
16273 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16274 (exit $ac_status); }; }; then 15687 (exit $ac_status); }; }; then
16275 { $as_echo "$as_me:$LINENO: result: yes" >&5 15688 { echo "$as_me:$LINENO: result: yes" >&5
16276$as_echo "yes" >&6; } 15689echo "${ECHO_T}yes" >&6; }
16277else 15690else
16278 $as_echo "$as_me: program exited with status $ac_status" >&5 15691 echo "$as_me: program exited with status $ac_status" >&5
16279$as_echo "$as_me: failed program was:" >&5 15692echo "$as_me: failed program was:" >&5
16280sed 's/^/| /' conftest.$ac_ext >&5 15693sed 's/^/| /' conftest.$ac_ext >&5
16281 15694
16282( exit $ac_status ) 15695( exit $ac_status )
16283 15696
16284 { $as_echo "$as_me:$LINENO: result: no" >&5 15697 { echo "$as_me:$LINENO: result: no" >&5
16285$as_echo "no" >&6; } 15698echo "${ECHO_T}no" >&6; }
16286 15699
16287cat >>confdefs.h <<\_ACEOF 15700cat >>confdefs.h <<\_ACEOF
16288#define BROKEN_SNPRINTF 1 15701#define BROKEN_SNPRINTF 1
16289_ACEOF 15702_ACEOF
16290 15703
16291 { $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
16292$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;}
16293 15706
16294fi 15707fi
16295rm -rf conftest.dSYM
16296rm -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
16297fi 15709fi
16298 15710
@@ -16302,8 +15714,8 @@ fi
16302# 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,
16303# check that the fmt argument is const char * or just char *. 15715# check that the fmt argument is const char * or just char *.
16304# This is only useful for when BROKEN_SNPRINTF 15716# This is only useful for when BROKEN_SNPRINTF
16305{ $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
16306$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; }
16307cat >conftest.$ac_ext <<_ACEOF 15719cat >conftest.$ac_ext <<_ACEOF
16308/* confdefs.h. */ 15720/* confdefs.h. */
16309_ACEOF 15721_ACEOF
@@ -16321,31 +15733,30 @@ case "(($ac_try" in
16321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16322 *) ac_try_echo=$ac_try;; 15734 *) ac_try_echo=$ac_try;;
16323esac 15735esac
16324eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16325$as_echo "$ac_try_echo") >&5
16326 (eval "$ac_compile") 2>conftest.er1 15737 (eval "$ac_compile") 2>conftest.er1
16327 ac_status=$? 15738 ac_status=$?
16328 grep -v '^ *+' conftest.er1 >conftest.err 15739 grep -v '^ *+' conftest.er1 >conftest.err
16329 rm -f conftest.er1 15740 rm -f conftest.er1
16330 cat conftest.err >&5 15741 cat conftest.err >&5
16331 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16332 (exit $ac_status); } && { 15743 (exit $ac_status); } && {
16333 test -z "$ac_c_werror_flag" || 15744 test -z "$ac_c_werror_flag" ||
16334 test ! -s conftest.err 15745 test ! -s conftest.err
16335 } && test -s conftest.$ac_objext; then 15746 } && test -s conftest.$ac_objext; then
16336 { $as_echo "$as_me:$LINENO: result: yes" >&5 15747 { echo "$as_me:$LINENO: result: yes" >&5
16337$as_echo "yes" >&6; } 15748echo "${ECHO_T}yes" >&6; }
16338 15749
16339cat >>confdefs.h <<\_ACEOF 15750cat >>confdefs.h <<\_ACEOF
16340#define SNPRINTF_CONST const 15751#define SNPRINTF_CONST const
16341_ACEOF 15752_ACEOF
16342 15753
16343else 15754else
16344 $as_echo "$as_me: failed program was:" >&5 15755 echo "$as_me: failed program was:" >&5
16345sed 's/^/| /' conftest.$ac_ext >&5 15756sed 's/^/| /' conftest.$ac_ext >&5
16346 15757
16347 { $as_echo "$as_me:$LINENO: result: no" >&5 15758 { echo "$as_me:$LINENO: result: no" >&5
16348$as_echo "no" >&6; } 15759echo "${ECHO_T}no" >&6; }
16349 cat >>confdefs.h <<\_ACEOF 15760 cat >>confdefs.h <<\_ACEOF
16350#define SNPRINTF_CONST /* not const */ 15761#define SNPRINTF_CONST /* not const */
16351_ACEOF 15762_ACEOF
@@ -16357,8 +15768,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16357# Check for missing getpeereid (or equiv) support 15768# Check for missing getpeereid (or equiv) support
16358NO_PEERCHECK="" 15769NO_PEERCHECK=""
16359if 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
16360 { $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
16361$as_echo_n "checking whether system supports SO_PEERCRED getsockopt... " >&6; } 15772echo $ECHO_N "checking whether system supports SO_PEERCRED getsockopt... $ECHO_C" >&6; }
16362 cat >conftest.$ac_ext <<_ACEOF 15773 cat >conftest.$ac_ext <<_ACEOF
16363/* confdefs.h. */ 15774/* confdefs.h. */
16364_ACEOF 15775_ACEOF
@@ -16381,20 +15792,19 @@ case "(($ac_try" in
16381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16382 *) ac_try_echo=$ac_try;; 15793 *) ac_try_echo=$ac_try;;
16383esac 15794esac
16384eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16385$as_echo "$ac_try_echo") >&5
16386 (eval "$ac_compile") 2>conftest.er1 15796 (eval "$ac_compile") 2>conftest.er1
16387 ac_status=$? 15797 ac_status=$?
16388 grep -v '^ *+' conftest.er1 >conftest.err 15798 grep -v '^ *+' conftest.er1 >conftest.err
16389 rm -f conftest.er1 15799 rm -f conftest.er1
16390 cat conftest.err >&5 15800 cat conftest.err >&5
16391 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16392 (exit $ac_status); } && { 15802 (exit $ac_status); } && {
16393 test -z "$ac_c_werror_flag" || 15803 test -z "$ac_c_werror_flag" ||
16394 test ! -s conftest.err 15804 test ! -s conftest.err
16395 } && test -s conftest.$ac_objext; then 15805 } && test -s conftest.$ac_objext; then
16396 { $as_echo "$as_me:$LINENO: result: yes" >&5 15806 { echo "$as_me:$LINENO: result: yes" >&5
16397$as_echo "yes" >&6; } 15807echo "${ECHO_T}yes" >&6; }
16398 15808
16399cat >>confdefs.h <<\_ACEOF 15809cat >>confdefs.h <<\_ACEOF
16400#define HAVE_SO_PEERCRED 1 15810#define HAVE_SO_PEERCRED 1
@@ -16402,11 +15812,11 @@ _ACEOF
16402 15812
16403 15813
16404else 15814else
16405 $as_echo "$as_me: failed program was:" >&5 15815 echo "$as_me: failed program was:" >&5
16406sed 's/^/| /' conftest.$ac_ext >&5 15816sed 's/^/| /' conftest.$ac_ext >&5
16407 15817
16408 { $as_echo "$as_me:$LINENO: result: no" >&5 15818 { echo "$as_me:$LINENO: result: no" >&5
16409$as_echo "no" >&6; } 15819echo "${ECHO_T}no" >&6; }
16410 NO_PEERCHECK=1 15820 NO_PEERCHECK=1
16411 15821
16412fi 15822fi
@@ -16415,12 +15825,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16415fi 15825fi
16416 15826
16417if test "x$ac_cv_func_mkdtemp" = "xyes" ; then 15827if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
16418{ $as_echo "$as_me:$LINENO: checking for (overly) strict mkstemp" >&5 15828{ echo "$as_me:$LINENO: checking for (overly) strict mkstemp" >&5
16419$as_echo_n "checking for (overly) strict mkstemp... " >&6; } 15829echo $ECHO_N "checking for (overly) strict mkstemp... $ECHO_C" >&6; }
16420if test "$cross_compiling" = yes; then 15830if test "$cross_compiling" = yes; then
16421 15831
16422 { $as_echo "$as_me:$LINENO: result: yes" >&5 15832 { echo "$as_me:$LINENO: result: yes" >&5
16423$as_echo "yes" >&6; } 15833echo "${ECHO_T}yes" >&6; }
16424 cat >>confdefs.h <<\_ACEOF 15834 cat >>confdefs.h <<\_ACEOF
16425#define HAVE_STRICT_MKSTEMP 1 15835#define HAVE_STRICT_MKSTEMP 1
16426_ACEOF 15836_ACEOF
@@ -16449,35 +15859,33 @@ case "(($ac_try" in
16449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16450 *) ac_try_echo=$ac_try;; 15860 *) ac_try_echo=$ac_try;;
16451esac 15861esac
16452eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16453$as_echo "$ac_try_echo") >&5
16454 (eval "$ac_link") 2>&5 15863 (eval "$ac_link") 2>&5
16455 ac_status=$? 15864 ac_status=$?
16456 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16457 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 15866 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16458 { (case "(($ac_try" in 15867 { (case "(($ac_try" in
16459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16460 *) ac_try_echo=$ac_try;; 15869 *) ac_try_echo=$ac_try;;
16461esac 15870esac
16462eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16463$as_echo "$ac_try_echo") >&5
16464 (eval "$ac_try") 2>&5 15872 (eval "$ac_try") 2>&5
16465 ac_status=$? 15873 ac_status=$?
16466 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16467 (exit $ac_status); }; }; then 15875 (exit $ac_status); }; }; then
16468 15876
16469 { $as_echo "$as_me:$LINENO: result: no" >&5 15877 { echo "$as_me:$LINENO: result: no" >&5
16470$as_echo "no" >&6; } 15878echo "${ECHO_T}no" >&6; }
16471 15879
16472else 15880else
16473 $as_echo "$as_me: program exited with status $ac_status" >&5 15881 echo "$as_me: program exited with status $ac_status" >&5
16474$as_echo "$as_me: failed program was:" >&5 15882echo "$as_me: failed program was:" >&5
16475sed 's/^/| /' conftest.$ac_ext >&5 15883sed 's/^/| /' conftest.$ac_ext >&5
16476 15884
16477( exit $ac_status ) 15885( exit $ac_status )
16478 15886
16479 { $as_echo "$as_me:$LINENO: result: yes" >&5 15887 { echo "$as_me:$LINENO: result: yes" >&5
16480$as_echo "yes" >&6; } 15888echo "${ECHO_T}yes" >&6; }
16481 15889
16482cat >>confdefs.h <<\_ACEOF 15890cat >>confdefs.h <<\_ACEOF
16483#define HAVE_STRICT_MKSTEMP 1 15891#define HAVE_STRICT_MKSTEMP 1
@@ -16485,7 +15893,6 @@ _ACEOF
16485 15893
16486 15894
16487fi 15895fi
16488rm -rf conftest.dSYM
16489rm -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
16490fi 15897fi
16491 15898
@@ -16493,12 +15900,12 @@ fi
16493fi 15900fi
16494 15901
16495if test ! -z "$check_for_openpty_ctty_bug"; then 15902if test ! -z "$check_for_openpty_ctty_bug"; then
16496 { $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
16497$as_echo_n "checking if openpty correctly handles controlling tty... " >&6; } 15904echo $ECHO_N "checking if openpty correctly handles controlling tty... $ECHO_C" >&6; }
16498 if test "$cross_compiling" = yes; then 15905 if test "$cross_compiling" = yes; then
16499 15906
16500 { $as_echo "$as_me:$LINENO: result: cross-compiling" >&5 15907 { echo "$as_me:$LINENO: result: cross-compiling" >&5
16501$as_echo "cross-compiling" >&6; } 15908echo "${ECHO_T}cross-compiling" >&6; }
16502 15909
16503 15910
16504else 15911else
@@ -16548,42 +15955,39 @@ case "(($ac_try" in
16548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16549 *) ac_try_echo=$ac_try;; 15956 *) ac_try_echo=$ac_try;;
16550esac 15957esac
16551eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16552$as_echo "$ac_try_echo") >&5
16553 (eval "$ac_link") 2>&5 15959 (eval "$ac_link") 2>&5
16554 ac_status=$? 15960 ac_status=$?
16555 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16556 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 15962 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16557 { (case "(($ac_try" in 15963 { (case "(($ac_try" in
16558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 15964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16559 *) ac_try_echo=$ac_try;; 15965 *) ac_try_echo=$ac_try;;
16560esac 15966esac
16561eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 15967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16562$as_echo "$ac_try_echo") >&5
16563 (eval "$ac_try") 2>&5 15968 (eval "$ac_try") 2>&5
16564 ac_status=$? 15969 ac_status=$?
16565 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 15970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16566 (exit $ac_status); }; }; then 15971 (exit $ac_status); }; }; then
16567 15972
16568 { $as_echo "$as_me:$LINENO: result: yes" >&5 15973 { echo "$as_me:$LINENO: result: yes" >&5
16569$as_echo "yes" >&6; } 15974echo "${ECHO_T}yes" >&6; }
16570 15975
16571else 15976else
16572 $as_echo "$as_me: program exited with status $ac_status" >&5 15977 echo "$as_me: program exited with status $ac_status" >&5
16573$as_echo "$as_me: failed program was:" >&5 15978echo "$as_me: failed program was:" >&5
16574sed 's/^/| /' conftest.$ac_ext >&5 15979sed 's/^/| /' conftest.$ac_ext >&5
16575 15980
16576( exit $ac_status ) 15981( exit $ac_status )
16577 15982
16578 { $as_echo "$as_me:$LINENO: result: no" >&5 15983 { echo "$as_me:$LINENO: result: no" >&5
16579$as_echo "no" >&6; } 15984echo "${ECHO_T}no" >&6; }
16580 cat >>confdefs.h <<\_ACEOF 15985 cat >>confdefs.h <<\_ACEOF
16581#define SSHD_ACQUIRES_CTTY 1 15986#define SSHD_ACQUIRES_CTTY 1
16582_ACEOF 15987_ACEOF
16583 15988
16584 15989
16585fi 15990fi
16586rm -rf conftest.dSYM
16587rm -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
16588fi 15992fi
16589 15993
@@ -16592,12 +15996,12 @@ fi
16592 15996
16593if test "x$ac_cv_func_getaddrinfo" = "xyes" && \ 15997if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
16594 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then 15998 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
16595 { $as_echo "$as_me:$LINENO: checking if getaddrinfo seems to work" >&5 15999 { echo "$as_me:$LINENO: checking if getaddrinfo seems to work" >&5
16596$as_echo_n "checking if getaddrinfo seems to work... " >&6; } 16000echo $ECHO_N "checking if getaddrinfo seems to work... $ECHO_C" >&6; }
16597 if test "$cross_compiling" = yes; then 16001 if test "$cross_compiling" = yes; then
16598 16002
16599 { $as_echo "$as_me:$LINENO: result: cross-compiling" >&5 16003 { echo "$as_me:$LINENO: result: cross-compiling" >&5
16600$as_echo "cross-compiling" >&6; } 16004echo "${ECHO_T}cross-compiling" >&6; }
16601 16005
16602 16006
16603else 16007else
@@ -16669,42 +16073,39 @@ case "(($ac_try" in
16669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16670 *) ac_try_echo=$ac_try;; 16074 *) ac_try_echo=$ac_try;;
16671esac 16075esac
16672eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16673$as_echo "$ac_try_echo") >&5
16674 (eval "$ac_link") 2>&5 16077 (eval "$ac_link") 2>&5
16675 ac_status=$? 16078 ac_status=$?
16676 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16677 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 16080 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16678 { (case "(($ac_try" in 16081 { (case "(($ac_try" in
16679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16680 *) ac_try_echo=$ac_try;; 16083 *) ac_try_echo=$ac_try;;
16681esac 16084esac
16682eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16683$as_echo "$ac_try_echo") >&5
16684 (eval "$ac_try") 2>&5 16086 (eval "$ac_try") 2>&5
16685 ac_status=$? 16087 ac_status=$?
16686 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16687 (exit $ac_status); }; }; then 16089 (exit $ac_status); }; }; then
16688 16090
16689 { $as_echo "$as_me:$LINENO: result: yes" >&5 16091 { echo "$as_me:$LINENO: result: yes" >&5
16690$as_echo "yes" >&6; } 16092echo "${ECHO_T}yes" >&6; }
16691 16093
16692else 16094else
16693 $as_echo "$as_me: program exited with status $ac_status" >&5 16095 echo "$as_me: program exited with status $ac_status" >&5
16694$as_echo "$as_me: failed program was:" >&5 16096echo "$as_me: failed program was:" >&5
16695sed 's/^/| /' conftest.$ac_ext >&5 16097sed 's/^/| /' conftest.$ac_ext >&5
16696 16098
16697( exit $ac_status ) 16099( exit $ac_status )
16698 16100
16699 { $as_echo "$as_me:$LINENO: result: no" >&5 16101 { echo "$as_me:$LINENO: result: no" >&5
16700$as_echo "no" >&6; } 16102echo "${ECHO_T}no" >&6; }
16701 cat >>confdefs.h <<\_ACEOF 16103 cat >>confdefs.h <<\_ACEOF
16702#define BROKEN_GETADDRINFO 1 16104#define BROKEN_GETADDRINFO 1
16703_ACEOF 16105_ACEOF
16704 16106
16705 16107
16706fi 16108fi
16707rm -rf conftest.dSYM
16708rm -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
16709fi 16110fi
16710 16111
@@ -16713,12 +16114,12 @@ fi
16713 16114
16714if test "x$ac_cv_func_getaddrinfo" = "xyes" && \ 16115if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
16715 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then 16116 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then
16716 { $as_echo "$as_me:$LINENO: checking if getaddrinfo seems to work" >&5 16117 { echo "$as_me:$LINENO: checking if getaddrinfo seems to work" >&5
16717$as_echo_n "checking if getaddrinfo seems to work... " >&6; } 16118echo $ECHO_N "checking if getaddrinfo seems to work... $ECHO_C" >&6; }
16718 if test "$cross_compiling" = yes; then 16119 if test "$cross_compiling" = yes; then
16719 16120
16720 { $as_echo "$as_me:$LINENO: result: cross-compiling" >&5 16121 { echo "$as_me:$LINENO: result: cross-compiling" >&5
16721$as_echo "cross-compiling" >&6; } 16122echo "${ECHO_T}cross-compiling" >&6; }
16722 16123
16723 16124
16724else 16125else
@@ -16778,25 +16179,23 @@ case "(($ac_try" in
16778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16779 *) ac_try_echo=$ac_try;; 16180 *) ac_try_echo=$ac_try;;
16780esac 16181esac
16781eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16782$as_echo "$ac_try_echo") >&5
16783 (eval "$ac_link") 2>&5 16183 (eval "$ac_link") 2>&5
16784 ac_status=$? 16184 ac_status=$?
16785 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16786 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 16186 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16787 { (case "(($ac_try" in 16187 { (case "(($ac_try" in
16788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16789 *) ac_try_echo=$ac_try;; 16189 *) ac_try_echo=$ac_try;;
16790esac 16190esac
16791eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16792$as_echo "$ac_try_echo") >&5
16793 (eval "$ac_try") 2>&5 16192 (eval "$ac_try") 2>&5
16794 ac_status=$? 16193 ac_status=$?
16795 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16796 (exit $ac_status); }; }; then 16195 (exit $ac_status); }; }; then
16797 16196
16798 { $as_echo "$as_me:$LINENO: result: yes" >&5 16197 { echo "$as_me:$LINENO: result: yes" >&5
16799$as_echo "yes" >&6; } 16198echo "${ECHO_T}yes" >&6; }
16800 16199
16801cat >>confdefs.h <<\_ACEOF 16200cat >>confdefs.h <<\_ACEOF
16802#define AIX_GETNAMEINFO_HACK 1 16201#define AIX_GETNAMEINFO_HACK 1
@@ -16804,21 +16203,20 @@ _ACEOF
16804 16203
16805 16204
16806else 16205else
16807 $as_echo "$as_me: program exited with status $ac_status" >&5 16206 echo "$as_me: program exited with status $ac_status" >&5
16808$as_echo "$as_me: failed program was:" >&5 16207echo "$as_me: failed program was:" >&5
16809sed 's/^/| /' conftest.$ac_ext >&5 16208sed 's/^/| /' conftest.$ac_ext >&5
16810 16209
16811( exit $ac_status ) 16210( exit $ac_status )
16812 16211
16813 { $as_echo "$as_me:$LINENO: result: no" >&5 16212 { echo "$as_me:$LINENO: result: no" >&5
16814$as_echo "no" >&6; } 16213echo "${ECHO_T}no" >&6; }
16815 cat >>confdefs.h <<\_ACEOF 16214 cat >>confdefs.h <<\_ACEOF
16816#define BROKEN_GETADDRINFO 1 16215#define BROKEN_GETADDRINFO 1
16817_ACEOF 16216_ACEOF
16818 16217
16819 16218
16820fi 16219fi
16821rm -rf conftest.dSYM
16822rm -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
16823fi 16221fi
16824 16222
@@ -16826,8 +16224,8 @@ fi
16826fi 16224fi
16827 16225
16828if test "x$check_for_conflicting_getspnam" = "x1"; then 16226if test "x$check_for_conflicting_getspnam" = "x1"; then
16829 { $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
16830$as_echo_n "checking for conflicting getspnam in shadow.h... " >&6; } 16228echo $ECHO_N "checking for conflicting getspnam in shadow.h... $ECHO_C" >&6; }
16831 cat >conftest.$ac_ext <<_ACEOF 16229 cat >conftest.$ac_ext <<_ACEOF
16832 16230
16833#include <shadow.h> 16231#include <shadow.h>
@@ -16840,29 +16238,28 @@ case "(($ac_try" in
16840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16841 *) ac_try_echo=$ac_try;; 16239 *) ac_try_echo=$ac_try;;
16842esac 16240esac
16843eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16844$as_echo "$ac_try_echo") >&5
16845 (eval "$ac_compile") 2>conftest.er1 16242 (eval "$ac_compile") 2>conftest.er1
16846 ac_status=$? 16243 ac_status=$?
16847 grep -v '^ *+' conftest.er1 >conftest.err 16244 grep -v '^ *+' conftest.er1 >conftest.err
16848 rm -f conftest.er1 16245 rm -f conftest.er1
16849 cat conftest.err >&5 16246 cat conftest.err >&5
16850 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16851 (exit $ac_status); } && { 16248 (exit $ac_status); } && {
16852 test -z "$ac_c_werror_flag" || 16249 test -z "$ac_c_werror_flag" ||
16853 test ! -s conftest.err 16250 test ! -s conftest.err
16854 } && test -s conftest.$ac_objext; then 16251 } && test -s conftest.$ac_objext; then
16855 16252
16856 { $as_echo "$as_me:$LINENO: result: no" >&5 16253 { echo "$as_me:$LINENO: result: no" >&5
16857$as_echo "no" >&6; } 16254echo "${ECHO_T}no" >&6; }
16858 16255
16859else 16256else
16860 $as_echo "$as_me: failed program was:" >&5 16257 echo "$as_me: failed program was:" >&5
16861sed 's/^/| /' conftest.$ac_ext >&5 16258sed 's/^/| /' conftest.$ac_ext >&5
16862 16259
16863 16260
16864 { $as_echo "$as_me:$LINENO: result: yes" >&5 16261 { echo "$as_me:$LINENO: result: yes" >&5
16865$as_echo "yes" >&6; } 16262echo "${ECHO_T}yes" >&6; }
16866 16263
16867cat >>confdefs.h <<\_ACEOF 16264cat >>confdefs.h <<\_ACEOF
16868#define GETSPNAM_CONFLICTING_DEFS 1 16265#define GETSPNAM_CONFLICTING_DEFS 1
@@ -16875,10 +16272,10 @@ fi
16875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16876fi 16273fi
16877 16274
16878{ $as_echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5 16275{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
16879$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } 16276echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
16880if test "${ac_cv_func_getpgrp_void+set}" = set; then 16277if test "${ac_cv_func_getpgrp_void+set}" = set; then
16881 $as_echo_n "(cached) " >&6 16278 echo $ECHO_N "(cached) $ECHO_C" >&6
16882else 16279else
16883 # Use it with a single arg. 16280 # Use it with a single arg.
16884cat >conftest.$ac_ext <<_ACEOF 16281cat >conftest.$ac_ext <<_ACEOF
@@ -16902,21 +16299,20 @@ case "(($ac_try" in
16902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16903 *) ac_try_echo=$ac_try;; 16300 *) ac_try_echo=$ac_try;;
16904esac 16301esac
16905eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16906$as_echo "$ac_try_echo") >&5
16907 (eval "$ac_compile") 2>conftest.er1 16303 (eval "$ac_compile") 2>conftest.er1
16908 ac_status=$? 16304 ac_status=$?
16909 grep -v '^ *+' conftest.er1 >conftest.err 16305 grep -v '^ *+' conftest.er1 >conftest.err
16910 rm -f conftest.er1 16306 rm -f conftest.er1
16911 cat conftest.err >&5 16307 cat conftest.err >&5
16912 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16913 (exit $ac_status); } && { 16309 (exit $ac_status); } && {
16914 test -z "$ac_c_werror_flag" || 16310 test -z "$ac_c_werror_flag" ||
16915 test ! -s conftest.err 16311 test ! -s conftest.err
16916 } && test -s conftest.$ac_objext; then 16312 } && test -s conftest.$ac_objext; then
16917 ac_cv_func_getpgrp_void=no 16313 ac_cv_func_getpgrp_void=no
16918else 16314else
16919 $as_echo "$as_me: failed program was:" >&5 16315 echo "$as_me: failed program was:" >&5
16920sed 's/^/| /' conftest.$ac_ext >&5 16316sed 's/^/| /' conftest.$ac_ext >&5
16921 16317
16922 ac_cv_func_getpgrp_void=yes 16318 ac_cv_func_getpgrp_void=yes
@@ -16925,8 +16321,8 @@ fi
16925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16926 16322
16927fi 16323fi
16928{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5 16324{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
16929$as_echo "$ac_cv_func_getpgrp_void" >&6; } 16325echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
16930if test $ac_cv_func_getpgrp_void = yes; then 16326if test $ac_cv_func_getpgrp_void = yes; then
16931 16327
16932cat >>confdefs.h <<\_ACEOF 16328cat >>confdefs.h <<\_ACEOF
@@ -17000,28 +16396,25 @@ case "(($ac_try" in
17000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17001 *) ac_try_echo=$ac_try;; 16397 *) ac_try_echo=$ac_try;;
17002esac 16398esac
17003eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17004$as_echo "$ac_try_echo") >&5
17005 (eval "$ac_link") 2>conftest.er1 16400 (eval "$ac_link") 2>conftest.er1
17006 ac_status=$? 16401 ac_status=$?
17007 grep -v '^ *+' conftest.er1 >conftest.err 16402 grep -v '^ *+' conftest.er1 >conftest.err
17008 rm -f conftest.er1 16403 rm -f conftest.er1
17009 cat conftest.err >&5 16404 cat conftest.err >&5
17010 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17011 (exit $ac_status); } && { 16406 (exit $ac_status); } && {
17012 test -z "$ac_c_werror_flag" || 16407 test -z "$ac_c_werror_flag" ||
17013 test ! -s conftest.err 16408 test ! -s conftest.err
17014 } && test -s conftest$ac_exeext && { 16409 } && test -s conftest$ac_exeext &&
17015 test "$cross_compiling" = yes || 16410 $as_test_x conftest$ac_exeext; then
17016 $as_test_x conftest$ac_exeext
17017 }; then
17018 16411
17019cat >>confdefs.h <<\_ACEOF 16412cat >>confdefs.h <<\_ACEOF
17020#define HAVE_OPENSSL 1 16413#define HAVE_OPENSSL 1
17021_ACEOF 16414_ACEOF
17022 16415
17023else 16416else
17024 $as_echo "$as_me: failed program was:" >&5 16417 echo "$as_me: failed program was:" >&5
17025sed 's/^/| /' conftest.$ac_ext >&5 16418sed 's/^/| /' conftest.$ac_ext >&5
17026 16419
17027 16420
@@ -17032,17 +16425,17 @@ sed 's/^/| /' conftest.$ac_ext >&5
17032 fi 16425 fi
17033 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}" 16426 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
17034 if test "${ac_cv_header_openssl_opensslv_h+set}" = set; then 16427 if test "${ac_cv_header_openssl_opensslv_h+set}" = set; then
17035 { $as_echo "$as_me:$LINENO: checking for openssl/opensslv.h" >&5 16428 { echo "$as_me:$LINENO: checking for openssl/opensslv.h" >&5
17036$as_echo_n "checking for openssl/opensslv.h... " >&6; } 16429echo $ECHO_N "checking for openssl/opensslv.h... $ECHO_C" >&6; }
17037if test "${ac_cv_header_openssl_opensslv_h+set}" = set; then 16430if test "${ac_cv_header_openssl_opensslv_h+set}" = set; then
17038 $as_echo_n "(cached) " >&6 16431 echo $ECHO_N "(cached) $ECHO_C" >&6
17039fi 16432fi
17040{ $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
17041$as_echo "$ac_cv_header_openssl_opensslv_h" >&6; } 16434echo "${ECHO_T}$ac_cv_header_openssl_opensslv_h" >&6; }
17042else 16435else
17043 # Is the header compilable? 16436 # Is the header compilable?
17044{ $as_echo "$as_me:$LINENO: checking openssl/opensslv.h usability" >&5 16437{ echo "$as_me:$LINENO: checking openssl/opensslv.h usability" >&5
17045$as_echo_n "checking openssl/opensslv.h usability... " >&6; } 16438echo $ECHO_N "checking openssl/opensslv.h usability... $ECHO_C" >&6; }
17046cat >conftest.$ac_ext <<_ACEOF 16439cat >conftest.$ac_ext <<_ACEOF
17047/* confdefs.h. */ 16440/* confdefs.h. */
17048_ACEOF 16441_ACEOF
@@ -17058,33 +16451,32 @@ case "(($ac_try" in
17058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17059 *) ac_try_echo=$ac_try;; 16452 *) ac_try_echo=$ac_try;;
17060esac 16453esac
17061eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17062$as_echo "$ac_try_echo") >&5
17063 (eval "$ac_compile") 2>conftest.er1 16455 (eval "$ac_compile") 2>conftest.er1
17064 ac_status=$? 16456 ac_status=$?
17065 grep -v '^ *+' conftest.er1 >conftest.err 16457 grep -v '^ *+' conftest.er1 >conftest.err
17066 rm -f conftest.er1 16458 rm -f conftest.er1
17067 cat conftest.err >&5 16459 cat conftest.err >&5
17068 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17069 (exit $ac_status); } && { 16461 (exit $ac_status); } && {
17070 test -z "$ac_c_werror_flag" || 16462 test -z "$ac_c_werror_flag" ||
17071 test ! -s conftest.err 16463 test ! -s conftest.err
17072 } && test -s conftest.$ac_objext; then 16464 } && test -s conftest.$ac_objext; then
17073 ac_header_compiler=yes 16465 ac_header_compiler=yes
17074else 16466else
17075 $as_echo "$as_me: failed program was:" >&5 16467 echo "$as_me: failed program was:" >&5
17076sed 's/^/| /' conftest.$ac_ext >&5 16468sed 's/^/| /' conftest.$ac_ext >&5
17077 16469
17078 ac_header_compiler=no 16470 ac_header_compiler=no
17079fi 16471fi
17080 16472
17081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17082{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 16474{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17083$as_echo "$ac_header_compiler" >&6; } 16475echo "${ECHO_T}$ac_header_compiler" >&6; }
17084 16476
17085# Is the header present? 16477# Is the header present?
17086{ $as_echo "$as_me:$LINENO: checking openssl/opensslv.h presence" >&5 16478{ echo "$as_me:$LINENO: checking openssl/opensslv.h presence" >&5
17087$as_echo_n "checking openssl/opensslv.h presence... " >&6; } 16479echo $ECHO_N "checking openssl/opensslv.h presence... $ECHO_C" >&6; }
17088cat >conftest.$ac_ext <<_ACEOF 16480cat >conftest.$ac_ext <<_ACEOF
17089/* confdefs.h. */ 16481/* confdefs.h. */
17090_ACEOF 16482_ACEOF
@@ -17098,52 +16490,51 @@ case "(($ac_try" in
17098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17099 *) ac_try_echo=$ac_try;; 16491 *) ac_try_echo=$ac_try;;
17100esac 16492esac
17101eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17102$as_echo "$ac_try_echo") >&5
17103 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 16494 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17104 ac_status=$? 16495 ac_status=$?
17105 grep -v '^ *+' conftest.er1 >conftest.err 16496 grep -v '^ *+' conftest.er1 >conftest.err
17106 rm -f conftest.er1 16497 rm -f conftest.er1
17107 cat conftest.err >&5 16498 cat conftest.err >&5
17108 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17109 (exit $ac_status); } >/dev/null && { 16500 (exit $ac_status); } >/dev/null && {
17110 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 16501 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17111 test ! -s conftest.err 16502 test ! -s conftest.err
17112 }; then 16503 }; then
17113 ac_header_preproc=yes 16504 ac_header_preproc=yes
17114else 16505else
17115 $as_echo "$as_me: failed program was:" >&5 16506 echo "$as_me: failed program was:" >&5
17116sed 's/^/| /' conftest.$ac_ext >&5 16507sed 's/^/| /' conftest.$ac_ext >&5
17117 16508
17118 ac_header_preproc=no 16509 ac_header_preproc=no
17119fi 16510fi
17120 16511
17121rm -f conftest.err conftest.$ac_ext 16512rm -f conftest.err conftest.$ac_ext
17122{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 16513{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17123$as_echo "$ac_header_preproc" >&6; } 16514echo "${ECHO_T}$ac_header_preproc" >&6; }
17124 16515
17125# So? What about this header? 16516# So? What about this header?
17126case $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
17127 yes:no: ) 16518 yes:no: )
17128 { $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
17129$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;}
17130 { $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
17131$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;}
17132 ac_header_preproc=yes 16523 ac_header_preproc=yes
17133 ;; 16524 ;;
17134 no:yes:* ) 16525 no:yes:* )
17135 { $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
17136$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;}
17137 { $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
17138$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;}
17139 { $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
17140$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;}
17141 { $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
17142$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;}
17143 { $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
17144$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;}
17145 { $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
17146$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;}
17147 ( cat <<\_ASBOX 16538 ( cat <<\_ASBOX
17148## ------------------------------------------- ## 16539## ------------------------------------------- ##
17149## Report this to openssh-unix-dev@mindrot.org ## 16540## Report this to openssh-unix-dev@mindrot.org ##
@@ -17152,22 +16543,22 @@ _ASBOX
17152 ) | sed "s/^/$as_me: WARNING: /" >&2 16543 ) | sed "s/^/$as_me: WARNING: /" >&2
17153 ;; 16544 ;;
17154esac 16545esac
17155{ $as_echo "$as_me:$LINENO: checking for openssl/opensslv.h" >&5 16546{ echo "$as_me:$LINENO: checking for openssl/opensslv.h" >&5
17156$as_echo_n "checking for openssl/opensslv.h... " >&6; } 16547echo $ECHO_N "checking for openssl/opensslv.h... $ECHO_C" >&6; }
17157if test "${ac_cv_header_openssl_opensslv_h+set}" = set; then 16548if test "${ac_cv_header_openssl_opensslv_h+set}" = set; then
17158 $as_echo_n "(cached) " >&6 16549 echo $ECHO_N "(cached) $ECHO_C" >&6
17159else 16550else
17160 ac_cv_header_openssl_opensslv_h=$ac_header_preproc 16551 ac_cv_header_openssl_opensslv_h=$ac_header_preproc
17161fi 16552fi
17162{ $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
17163$as_echo "$ac_cv_header_openssl_opensslv_h" >&6; } 16554echo "${ECHO_T}$ac_cv_header_openssl_opensslv_h" >&6; }
17164 16555
17165fi 16556fi
17166if test $ac_cv_header_openssl_opensslv_h = yes; then 16557if test $ac_cv_header_openssl_opensslv_h = yes; then
17167 : 16558 :
17168else 16559else
17169 { { $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
17170$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;}
17171 { (exit 1); exit 1; }; } 16562 { (exit 1); exit 1; }; }
17172fi 16563fi
17173 16564
@@ -17200,55 +16591,50 @@ case "(($ac_try" in
17200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17201 *) ac_try_echo=$ac_try;; 16592 *) ac_try_echo=$ac_try;;
17202esac 16593esac
17203eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17204$as_echo "$ac_try_echo") >&5
17205 (eval "$ac_link") 2>conftest.er1 16595 (eval "$ac_link") 2>conftest.er1
17206 ac_status=$? 16596 ac_status=$?
17207 grep -v '^ *+' conftest.er1 >conftest.err 16597 grep -v '^ *+' conftest.er1 >conftest.err
17208 rm -f conftest.er1 16598 rm -f conftest.er1
17209 cat conftest.err >&5 16599 cat conftest.err >&5
17210 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17211 (exit $ac_status); } && { 16601 (exit $ac_status); } && {
17212 test -z "$ac_c_werror_flag" || 16602 test -z "$ac_c_werror_flag" ||
17213 test ! -s conftest.err 16603 test ! -s conftest.err
17214 } && test -s conftest$ac_exeext && { 16604 } && test -s conftest$ac_exeext &&
17215 test "$cross_compiling" = yes || 16605 $as_test_x conftest$ac_exeext; then
17216 $as_test_x conftest$ac_exeext
17217 }; then
17218 cat >>confdefs.h <<\_ACEOF 16606 cat >>confdefs.h <<\_ACEOF
17219#define HAVE_OPENSSL 1 16607#define HAVE_OPENSSL 1
17220_ACEOF 16608_ACEOF
17221 16609
17222else 16610else
17223 $as_echo "$as_me: failed program was:" >&5 16611 echo "$as_me: failed program was:" >&5
17224sed 's/^/| /' conftest.$ac_ext >&5 16612sed 's/^/| /' conftest.$ac_ext >&5
17225 16613
17226 16614
17227 { { $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
17228$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;}
17229 { (exit 1); exit 1; }; } 16617 { (exit 1); exit 1; }; }
17230 16618
17231 16619
17232fi 16620fi
17233 16621
17234rm -rf conftest.dSYM
17235rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 16622rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17236 conftest$ac_exeext conftest.$ac_ext 16623 conftest$ac_exeext conftest.$ac_ext
17237 16624
17238 16625
17239fi 16626fi
17240 16627
17241rm -rf conftest.dSYM
17242rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 16628rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17243 conftest$ac_exeext conftest.$ac_ext 16629 conftest$ac_exeext conftest.$ac_ext
17244 16630
17245# Determine OpenSSL header version 16631# Determine OpenSSL header version
17246{ $as_echo "$as_me:$LINENO: checking OpenSSL header version" >&5 16632{ echo "$as_me:$LINENO: checking OpenSSL header version" >&5
17247$as_echo_n "checking OpenSSL header version... " >&6; } 16633echo $ECHO_N "checking OpenSSL header version... $ECHO_C" >&6; }
17248if test "$cross_compiling" = yes; then 16634if test "$cross_compiling" = yes; then
17249 16635
17250 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5 16636 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5
17251$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;} 16637echo "$as_me: WARNING: cross compiling: not checking" >&2;}
17252 16638
17253 16639
17254else 16640else
@@ -17284,54 +16670,51 @@ case "(($ac_try" in
17284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17285 *) ac_try_echo=$ac_try;; 16671 *) ac_try_echo=$ac_try;;
17286esac 16672esac
17287eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17288$as_echo "$ac_try_echo") >&5
17289 (eval "$ac_link") 2>&5 16674 (eval "$ac_link") 2>&5
17290 ac_status=$? 16675 ac_status=$?
17291 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17292 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 16677 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17293 { (case "(($ac_try" in 16678 { (case "(($ac_try" in
17294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17295 *) ac_try_echo=$ac_try;; 16680 *) ac_try_echo=$ac_try;;
17296esac 16681esac
17297eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17298$as_echo "$ac_try_echo") >&5
17299 (eval "$ac_try") 2>&5 16683 (eval "$ac_try") 2>&5
17300 ac_status=$? 16684 ac_status=$?
17301 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17302 (exit $ac_status); }; }; then 16686 (exit $ac_status); }; }; then
17303 16687
17304 ssl_header_ver=`cat conftest.sslincver` 16688 ssl_header_ver=`cat conftest.sslincver`
17305 { $as_echo "$as_me:$LINENO: result: $ssl_header_ver" >&5 16689 { echo "$as_me:$LINENO: result: $ssl_header_ver" >&5
17306$as_echo "$ssl_header_ver" >&6; } 16690echo "${ECHO_T}$ssl_header_ver" >&6; }
17307 16691
17308else 16692else
17309 $as_echo "$as_me: program exited with status $ac_status" >&5 16693 echo "$as_me: program exited with status $ac_status" >&5
17310$as_echo "$as_me: failed program was:" >&5 16694echo "$as_me: failed program was:" >&5
17311sed 's/^/| /' conftest.$ac_ext >&5 16695sed 's/^/| /' conftest.$ac_ext >&5
17312 16696
17313( exit $ac_status ) 16697( exit $ac_status )
17314 16698
17315 { $as_echo "$as_me:$LINENO: result: not found" >&5 16699 { echo "$as_me:$LINENO: result: not found" >&5
17316$as_echo "not found" >&6; } 16700echo "${ECHO_T}not found" >&6; }
17317 { { $as_echo "$as_me:$LINENO: error: OpenSSL version header not found." >&5 16701 { { echo "$as_me:$LINENO: error: OpenSSL version header not found." >&5
17318$as_echo "$as_me: error: OpenSSL version header not found." >&2;} 16702echo "$as_me: error: OpenSSL version header not found." >&2;}
17319 { (exit 1); exit 1; }; } 16703 { (exit 1); exit 1; }; }
17320 16704
17321fi 16705fi
17322rm -rf conftest.dSYM
17323rm -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
17324fi 16707fi
17325 16708
17326 16709
17327 16710
17328# Determine OpenSSL library version 16711# Determine OpenSSL library version
17329{ $as_echo "$as_me:$LINENO: checking OpenSSL library version" >&5 16712{ echo "$as_me:$LINENO: checking OpenSSL library version" >&5
17330$as_echo_n "checking OpenSSL library version... " >&6; } 16713echo $ECHO_N "checking OpenSSL library version... $ECHO_C" >&6; }
17331if test "$cross_compiling" = yes; then 16714if test "$cross_compiling" = yes; then
17332 16715
17333 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5 16716 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5
17334$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;} 16717echo "$as_me: WARNING: cross compiling: not checking" >&2;}
17335 16718
17336 16719
17337else 16720else
@@ -17368,42 +16751,39 @@ case "(($ac_try" in
17368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17369 *) ac_try_echo=$ac_try;; 16752 *) ac_try_echo=$ac_try;;
17370esac 16753esac
17371eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17372$as_echo "$ac_try_echo") >&5
17373 (eval "$ac_link") 2>&5 16755 (eval "$ac_link") 2>&5
17374 ac_status=$? 16756 ac_status=$?
17375 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17376 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 16758 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17377 { (case "(($ac_try" in 16759 { (case "(($ac_try" in
17378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17379 *) ac_try_echo=$ac_try;; 16761 *) ac_try_echo=$ac_try;;
17380esac 16762esac
17381eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17382$as_echo "$ac_try_echo") >&5
17383 (eval "$ac_try") 2>&5 16764 (eval "$ac_try") 2>&5
17384 ac_status=$? 16765 ac_status=$?
17385 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17386 (exit $ac_status); }; }; then 16767 (exit $ac_status); }; }; then
17387 16768
17388 ssl_library_ver=`cat conftest.ssllibver` 16769 ssl_library_ver=`cat conftest.ssllibver`
17389 { $as_echo "$as_me:$LINENO: result: $ssl_library_ver" >&5 16770 { echo "$as_me:$LINENO: result: $ssl_library_ver" >&5
17390$as_echo "$ssl_library_ver" >&6; } 16771echo "${ECHO_T}$ssl_library_ver" >&6; }
17391 16772
17392else 16773else
17393 $as_echo "$as_me: program exited with status $ac_status" >&5 16774 echo "$as_me: program exited with status $ac_status" >&5
17394$as_echo "$as_me: failed program was:" >&5 16775echo "$as_me: failed program was:" >&5
17395sed 's/^/| /' conftest.$ac_ext >&5 16776sed 's/^/| /' conftest.$ac_ext >&5
17396 16777
17397( exit $ac_status ) 16778( exit $ac_status )
17398 16779
17399 { $as_echo "$as_me:$LINENO: result: not found" >&5 16780 { echo "$as_me:$LINENO: result: not found" >&5
17400$as_echo "not found" >&6; } 16781echo "${ECHO_T}not found" >&6; }
17401 { { $as_echo "$as_me:$LINENO: error: OpenSSL library not found." >&5 16782 { { echo "$as_me:$LINENO: error: OpenSSL library not found." >&5
17402$as_echo "$as_me: error: OpenSSL library not found." >&2;} 16783echo "$as_me: error: OpenSSL library not found." >&2;}
17403 { (exit 1); exit 1; }; } 16784 { (exit 1); exit 1; }; }
17404 16785
17405fi 16786fi
17406rm -rf conftest.dSYM
17407rm -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
17408fi 16788fi
17409 16789
@@ -17421,12 +16801,12 @@ fi
17421 16801
17422 16802
17423# Sanity check OpenSSL headers 16803# Sanity check OpenSSL headers
17424{ $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
17425$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; }
17426if test "$cross_compiling" = yes; then 16806if test "$cross_compiling" = yes; then
17427 16807
17428 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5 16808 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5
17429$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;} 16809echo "$as_me: WARNING: cross compiling: not checking" >&2;}
17430 16810
17431 16811
17432else 16812else
@@ -17448,43 +16828,41 @@ case "(($ac_try" in
17448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17449 *) ac_try_echo=$ac_try;; 16829 *) ac_try_echo=$ac_try;;
17450esac 16830esac
17451eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17452$as_echo "$ac_try_echo") >&5
17453 (eval "$ac_link") 2>&5 16832 (eval "$ac_link") 2>&5
17454 ac_status=$? 16833 ac_status=$?
17455 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17456 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 16835 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17457 { (case "(($ac_try" in 16836 { (case "(($ac_try" in
17458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17459 *) ac_try_echo=$ac_try;; 16838 *) ac_try_echo=$ac_try;;
17460esac 16839esac
17461eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17462$as_echo "$ac_try_echo") >&5
17463 (eval "$ac_try") 2>&5 16841 (eval "$ac_try") 2>&5
17464 ac_status=$? 16842 ac_status=$?
17465 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17466 (exit $ac_status); }; }; then 16844 (exit $ac_status); }; }; then
17467 16845
17468 { $as_echo "$as_me:$LINENO: result: yes" >&5 16846 { echo "$as_me:$LINENO: result: yes" >&5
17469$as_echo "yes" >&6; } 16847echo "${ECHO_T}yes" >&6; }
17470 16848
17471else 16849else
17472 $as_echo "$as_me: program exited with status $ac_status" >&5 16850 echo "$as_me: program exited with status $ac_status" >&5
17473$as_echo "$as_me: failed program was:" >&5 16851echo "$as_me: failed program was:" >&5
17474sed 's/^/| /' conftest.$ac_ext >&5 16852sed 's/^/| /' conftest.$ac_ext >&5
17475 16853
17476( exit $ac_status ) 16854( exit $ac_status )
17477 16855
17478 { $as_echo "$as_me:$LINENO: result: no" >&5 16856 { echo "$as_me:$LINENO: result: no" >&5
17479$as_echo "no" >&6; } 16857echo "${ECHO_T}no" >&6; }
17480 if test "x$openssl_check_nonfatal" = "x"; then 16858 if test "x$openssl_check_nonfatal" = "x"; then
17481 { { $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
17482library. Check config.log for details. 16860library. Check config.log for details.
17483If 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
17484by running \"./configure --without-openssl-header-check\". 16862by running \"./configure --without-openssl-header-check\".
17485Also see contrib/findssl.sh for help identifying header/library mismatches. 16863Also see contrib/findssl.sh for help identifying header/library mismatches.
17486" >&5 16864" >&5
17487$as_echo "$as_me: error: Your OpenSSL headers do not match your 16865echo "$as_me: error: Your OpenSSL headers do not match your
17488library. Check config.log for details. 16866library. Check config.log for details.
17489If 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
17490by running \"./configure --without-openssl-header-check\". 16868by running \"./configure --without-openssl-header-check\".
@@ -17492,23 +16870,22 @@ Also see contrib/findssl.sh for help identifying header/library mismatches.
17492" >&2;} 16870" >&2;}
17493 { (exit 1); exit 1; }; } 16871 { (exit 1); exit 1; }; }
17494 else 16872 else
17495 { $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
17496library. Check config.log for details. 16874library. Check config.log for details.
17497Also see contrib/findssl.sh for help identifying header/library mismatches." >&5 16875Also see contrib/findssl.sh for help identifying header/library mismatches." >&5
17498$as_echo "$as_me: WARNING: Your OpenSSL headers do not match your 16876echo "$as_me: WARNING: Your OpenSSL headers do not match your
17499library. Check config.log for details. 16877library. Check config.log for details.
17500Also see contrib/findssl.sh for help identifying header/library mismatches." >&2;} 16878Also see contrib/findssl.sh for help identifying header/library mismatches." >&2;}
17501 fi 16879 fi
17502 16880
17503fi 16881fi
17504rm -rf conftest.dSYM
17505rm -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
17506fi 16883fi
17507 16884
17508 16885
17509 16886
17510{ $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
17511$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; }
17512cat >conftest.$ac_ext <<_ACEOF 16889cat >conftest.$ac_ext <<_ACEOF
17513/* confdefs.h. */ 16890/* confdefs.h. */
17514_ACEOF 16891_ACEOF
@@ -17526,36 +16903,33 @@ case "(($ac_try" in
17526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17527 *) ac_try_echo=$ac_try;; 16904 *) ac_try_echo=$ac_try;;
17528esac 16905esac
17529eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17530$as_echo "$ac_try_echo") >&5
17531 (eval "$ac_link") 2>conftest.er1 16907 (eval "$ac_link") 2>conftest.er1
17532 ac_status=$? 16908 ac_status=$?
17533 grep -v '^ *+' conftest.er1 >conftest.err 16909 grep -v '^ *+' conftest.er1 >conftest.err
17534 rm -f conftest.er1 16910 rm -f conftest.er1
17535 cat conftest.err >&5 16911 cat conftest.err >&5
17536 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17537 (exit $ac_status); } && { 16913 (exit $ac_status); } && {
17538 test -z "$ac_c_werror_flag" || 16914 test -z "$ac_c_werror_flag" ||
17539 test ! -s conftest.err 16915 test ! -s conftest.err
17540 } && test -s conftest$ac_exeext && { 16916 } && test -s conftest$ac_exeext &&
17541 test "$cross_compiling" = yes || 16917 $as_test_x conftest$ac_exeext; then
17542 $as_test_x conftest$ac_exeext
17543 }; then
17544 16918
17545 { $as_echo "$as_me:$LINENO: result: yes" >&5 16919 { echo "$as_me:$LINENO: result: yes" >&5
17546$as_echo "yes" >&6; } 16920echo "${ECHO_T}yes" >&6; }
17547 16921
17548else 16922else
17549 $as_echo "$as_me: failed program was:" >&5 16923 echo "$as_me: failed program was:" >&5
17550sed 's/^/| /' conftest.$ac_ext >&5 16924sed 's/^/| /' conftest.$ac_ext >&5
17551 16925
17552 16926
17553 { $as_echo "$as_me:$LINENO: result: no" >&5 16927 { echo "$as_me:$LINENO: result: no" >&5
17554$as_echo "no" >&6; } 16928echo "${ECHO_T}no" >&6; }
17555 saved_LIBS="$LIBS" 16929 saved_LIBS="$LIBS"
17556 LIBS="$LIBS -ldl" 16930 LIBS="$LIBS -ldl"
17557 { $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
17558$as_echo_n "checking if programs using OpenSSL need -ldl... " >&6; } 16932echo $ECHO_N "checking if programs using OpenSSL need -ldl... $ECHO_C" >&6; }
17559 cat >conftest.$ac_ext <<_ACEOF 16933 cat >conftest.$ac_ext <<_ACEOF
17560/* confdefs.h. */ 16934/* confdefs.h. */
17561_ACEOF 16935_ACEOF
@@ -17573,45 +16947,40 @@ case "(($ac_try" in
17573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 16947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17574 *) ac_try_echo=$ac_try;; 16948 *) ac_try_echo=$ac_try;;
17575esac 16949esac
17576eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 16950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17577$as_echo "$ac_try_echo") >&5
17578 (eval "$ac_link") 2>conftest.er1 16951 (eval "$ac_link") 2>conftest.er1
17579 ac_status=$? 16952 ac_status=$?
17580 grep -v '^ *+' conftest.er1 >conftest.err 16953 grep -v '^ *+' conftest.er1 >conftest.err
17581 rm -f conftest.er1 16954 rm -f conftest.er1
17582 cat conftest.err >&5 16955 cat conftest.err >&5
17583 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 16956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17584 (exit $ac_status); } && { 16957 (exit $ac_status); } && {
17585 test -z "$ac_c_werror_flag" || 16958 test -z "$ac_c_werror_flag" ||
17586 test ! -s conftest.err 16959 test ! -s conftest.err
17587 } && test -s conftest$ac_exeext && { 16960 } && test -s conftest$ac_exeext &&
17588 test "$cross_compiling" = yes || 16961 $as_test_x conftest$ac_exeext; then
17589 $as_test_x conftest$ac_exeext
17590 }; then
17591 16962
17592 { $as_echo "$as_me:$LINENO: result: yes" >&5 16963 { echo "$as_me:$LINENO: result: yes" >&5
17593$as_echo "yes" >&6; } 16964echo "${ECHO_T}yes" >&6; }
17594 16965
17595else 16966else
17596 $as_echo "$as_me: failed program was:" >&5 16967 echo "$as_me: failed program was:" >&5
17597sed 's/^/| /' conftest.$ac_ext >&5 16968sed 's/^/| /' conftest.$ac_ext >&5
17598 16969
17599 16970
17600 { $as_echo "$as_me:$LINENO: result: no" >&5 16971 { echo "$as_me:$LINENO: result: no" >&5
17601$as_echo "no" >&6; } 16972echo "${ECHO_T}no" >&6; }
17602 LIBS="$saved_LIBS" 16973 LIBS="$saved_LIBS"
17603 16974
17604 16975
17605fi 16976fi
17606 16977
17607rm -rf conftest.dSYM
17608rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 16978rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17609 conftest$ac_exeext conftest.$ac_ext 16979 conftest$ac_exeext conftest.$ac_ext
17610 16980
17611 16981
17612fi 16982fi
17613 16983
17614rm -rf conftest.dSYM
17615rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 16984rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17616 conftest$ac_exeext conftest.$ac_ext 16985 conftest$ac_exeext conftest.$ac_ext
17617 16986
@@ -17619,8 +16988,8 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17619# Check whether --with-ssl-engine was given. 16988# Check whether --with-ssl-engine was given.
17620if test "${with_ssl_engine+set}" = set; then 16989if test "${with_ssl_engine+set}" = set; then
17621 withval=$with_ssl_engine; if test "x$withval" != "xno" ; then 16990 withval=$with_ssl_engine; if test "x$withval" != "xno" ; then
17622 { $as_echo "$as_me:$LINENO: checking for OpenSSL ENGINE support" >&5 16991 { echo "$as_me:$LINENO: checking for OpenSSL ENGINE support" >&5
17623$as_echo_n "checking for OpenSSL ENGINE support... " >&6; } 16992echo $ECHO_N "checking for OpenSSL ENGINE support... $ECHO_C" >&6; }
17624 cat >conftest.$ac_ext <<_ACEOF 16993 cat >conftest.$ac_ext <<_ACEOF
17625/* confdefs.h. */ 16994/* confdefs.h. */
17626_ACEOF 16995_ACEOF
@@ -17644,20 +17013,19 @@ case "(($ac_try" in
17644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17645 *) ac_try_echo=$ac_try;; 17014 *) ac_try_echo=$ac_try;;
17646esac 17015esac
17647eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17648$as_echo "$ac_try_echo") >&5
17649 (eval "$ac_compile") 2>conftest.er1 17017 (eval "$ac_compile") 2>conftest.er1
17650 ac_status=$? 17018 ac_status=$?
17651 grep -v '^ *+' conftest.er1 >conftest.err 17019 grep -v '^ *+' conftest.er1 >conftest.err
17652 rm -f conftest.er1 17020 rm -f conftest.er1
17653 cat conftest.err >&5 17021 cat conftest.err >&5
17654 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17655 (exit $ac_status); } && { 17023 (exit $ac_status); } && {
17656 test -z "$ac_c_werror_flag" || 17024 test -z "$ac_c_werror_flag" ||
17657 test ! -s conftest.err 17025 test ! -s conftest.err
17658 } && test -s conftest.$ac_objext; then 17026 } && test -s conftest.$ac_objext; then
17659 { $as_echo "$as_me:$LINENO: result: yes" >&5 17027 { echo "$as_me:$LINENO: result: yes" >&5
17660$as_echo "yes" >&6; } 17028echo "${ECHO_T}yes" >&6; }
17661 17029
17662cat >>confdefs.h <<\_ACEOF 17030cat >>confdefs.h <<\_ACEOF
17663#define USE_OPENSSL_ENGINE 1 17031#define USE_OPENSSL_ENGINE 1
@@ -17665,11 +17033,11 @@ _ACEOF
17665 17033
17666 17034
17667else 17035else
17668 $as_echo "$as_me: failed program was:" >&5 17036 echo "$as_me: failed program was:" >&5
17669sed 's/^/| /' conftest.$ac_ext >&5 17037sed 's/^/| /' conftest.$ac_ext >&5
17670 17038
17671 { { $as_echo "$as_me:$LINENO: error: OpenSSL ENGINE support not found" >&5 17039 { { echo "$as_me:$LINENO: error: OpenSSL ENGINE support not found" >&5
17672$as_echo "$as_me: error: OpenSSL ENGINE support not found" >&2;} 17040echo "$as_me: error: OpenSSL ENGINE support not found" >&2;}
17673 { (exit 1); exit 1; }; } 17041 { (exit 1); exit 1; }; }
17674 17042
17675fi 17043fi
@@ -17681,8 +17049,8 @@ fi
17681 17049
17682 17050
17683# Check for OpenSSL without EVP_aes_{192,256}_cbc 17051# Check for OpenSSL without EVP_aes_{192,256}_cbc
17684{ $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
17685$as_echo_n "checking whether OpenSSL has crippled AES support... " >&6; } 17053echo $ECHO_N "checking whether OpenSSL has crippled AES support... $ECHO_C" >&6; }
17686cat >conftest.$ac_ext <<_ACEOF 17054cat >conftest.$ac_ext <<_ACEOF
17687/* confdefs.h. */ 17055/* confdefs.h. */
17688_ACEOF 17056_ACEOF
@@ -17701,32 +17069,29 @@ case "(($ac_try" in
17701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17702 *) ac_try_echo=$ac_try;; 17070 *) ac_try_echo=$ac_try;;
17703esac 17071esac
17704eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17705$as_echo "$ac_try_echo") >&5
17706 (eval "$ac_link") 2>conftest.er1 17073 (eval "$ac_link") 2>conftest.er1
17707 ac_status=$? 17074 ac_status=$?
17708 grep -v '^ *+' conftest.er1 >conftest.err 17075 grep -v '^ *+' conftest.er1 >conftest.err
17709 rm -f conftest.er1 17076 rm -f conftest.er1
17710 cat conftest.err >&5 17077 cat conftest.err >&5
17711 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17712 (exit $ac_status); } && { 17079 (exit $ac_status); } && {
17713 test -z "$ac_c_werror_flag" || 17080 test -z "$ac_c_werror_flag" ||
17714 test ! -s conftest.err 17081 test ! -s conftest.err
17715 } && test -s conftest$ac_exeext && { 17082 } && test -s conftest$ac_exeext &&
17716 test "$cross_compiling" = yes || 17083 $as_test_x conftest$ac_exeext; then
17717 $as_test_x conftest$ac_exeext
17718 }; then
17719 17084
17720 { $as_echo "$as_me:$LINENO: result: no" >&5 17085 { echo "$as_me:$LINENO: result: no" >&5
17721$as_echo "no" >&6; } 17086echo "${ECHO_T}no" >&6; }
17722 17087
17723else 17088else
17724 $as_echo "$as_me: failed program was:" >&5 17089 echo "$as_me: failed program was:" >&5
17725sed 's/^/| /' conftest.$ac_ext >&5 17090sed 's/^/| /' conftest.$ac_ext >&5
17726 17091
17727 17092
17728 { $as_echo "$as_me:$LINENO: result: yes" >&5 17093 { echo "$as_me:$LINENO: result: yes" >&5
17729$as_echo "yes" >&6; } 17094echo "${ECHO_T}yes" >&6; }
17730 17095
17731cat >>confdefs.h <<\_ACEOF 17096cat >>confdefs.h <<\_ACEOF
17732#define OPENSSL_LOBOTOMISED_AES 1 17097#define OPENSSL_LOBOTOMISED_AES 1
@@ -17736,12 +17101,11 @@ _ACEOF
17736 17101
17737fi 17102fi
17738 17103
17739rm -rf conftest.dSYM
17740rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17104rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17741 conftest$ac_exeext conftest.$ac_ext 17105 conftest$ac_exeext conftest.$ac_ext
17742 17106
17743{ $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
17744$as_echo_n "checking if EVP_DigestUpdate returns an int... " >&6; } 17108echo $ECHO_N "checking if EVP_DigestUpdate returns an int... $ECHO_C" >&6; }
17745cat >conftest.$ac_ext <<_ACEOF 17109cat >conftest.$ac_ext <<_ACEOF
17746/* confdefs.h. */ 17110/* confdefs.h. */
17747_ACEOF 17111_ACEOF
@@ -17760,32 +17124,29 @@ case "(($ac_try" in
17760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17761 *) ac_try_echo=$ac_try;; 17125 *) ac_try_echo=$ac_try;;
17762esac 17126esac
17763eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17764$as_echo "$ac_try_echo") >&5
17765 (eval "$ac_link") 2>conftest.er1 17128 (eval "$ac_link") 2>conftest.er1
17766 ac_status=$? 17129 ac_status=$?
17767 grep -v '^ *+' conftest.er1 >conftest.err 17130 grep -v '^ *+' conftest.er1 >conftest.err
17768 rm -f conftest.er1 17131 rm -f conftest.er1
17769 cat conftest.err >&5 17132 cat conftest.err >&5
17770 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17771 (exit $ac_status); } && { 17134 (exit $ac_status); } && {
17772 test -z "$ac_c_werror_flag" || 17135 test -z "$ac_c_werror_flag" ||
17773 test ! -s conftest.err 17136 test ! -s conftest.err
17774 } && test -s conftest$ac_exeext && { 17137 } && test -s conftest$ac_exeext &&
17775 test "$cross_compiling" = yes || 17138 $as_test_x conftest$ac_exeext; then
17776 $as_test_x conftest$ac_exeext
17777 }; then
17778 17139
17779 { $as_echo "$as_me:$LINENO: result: yes" >&5 17140 { echo "$as_me:$LINENO: result: yes" >&5
17780$as_echo "yes" >&6; } 17141echo "${ECHO_T}yes" >&6; }
17781 17142
17782else 17143else
17783 $as_echo "$as_me: failed program was:" >&5 17144 echo "$as_me: failed program was:" >&5
17784sed 's/^/| /' conftest.$ac_ext >&5 17145sed 's/^/| /' conftest.$ac_ext >&5
17785 17146
17786 17147
17787 { $as_echo "$as_me:$LINENO: result: no" >&5 17148 { echo "$as_me:$LINENO: result: no" >&5
17788$as_echo "no" >&6; } 17149echo "${ECHO_T}no" >&6; }
17789 17150
17790cat >>confdefs.h <<\_ACEOF 17151cat >>confdefs.h <<\_ACEOF
17791#define OPENSSL_EVP_DIGESTUPDATE_VOID 1 17152#define OPENSSL_EVP_DIGESTUPDATE_VOID 1
@@ -17795,7 +17156,6 @@ _ACEOF
17795 17156
17796fi 17157fi
17797 17158
17798rm -rf conftest.dSYM
17799rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17159rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17800 conftest$ac_exeext conftest.$ac_ext 17160 conftest$ac_exeext conftest.$ac_ext
17801 17161
@@ -17803,10 +17163,10 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17803# because the system crypt() is more featureful. 17163# because the system crypt() is more featureful.
17804if test "x$check_for_libcrypt_before" = "x1"; then 17164if test "x$check_for_libcrypt_before" = "x1"; then
17805 17165
17806{ $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 17166{ echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
17807$as_echo_n "checking for crypt in -lcrypt... " >&6; } 17167echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
17808if test "${ac_cv_lib_crypt_crypt+set}" = set; then 17168if test "${ac_cv_lib_crypt_crypt+set}" = set; then
17809 $as_echo_n "(cached) " >&6 17169 echo $ECHO_N "(cached) $ECHO_C" >&6
17810else 17170else
17811 ac_check_lib_save_LIBS=$LIBS 17171 ac_check_lib_save_LIBS=$LIBS
17812LIBS="-lcrypt $LIBS" 17172LIBS="-lcrypt $LIBS"
@@ -17838,36 +17198,32 @@ case "(($ac_try" in
17838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17839 *) ac_try_echo=$ac_try;; 17199 *) ac_try_echo=$ac_try;;
17840esac 17200esac
17841eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17842$as_echo "$ac_try_echo") >&5
17843 (eval "$ac_link") 2>conftest.er1 17202 (eval "$ac_link") 2>conftest.er1
17844 ac_status=$? 17203 ac_status=$?
17845 grep -v '^ *+' conftest.er1 >conftest.err 17204 grep -v '^ *+' conftest.er1 >conftest.err
17846 rm -f conftest.er1 17205 rm -f conftest.er1
17847 cat conftest.err >&5 17206 cat conftest.err >&5
17848 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17849 (exit $ac_status); } && { 17208 (exit $ac_status); } && {
17850 test -z "$ac_c_werror_flag" || 17209 test -z "$ac_c_werror_flag" ||
17851 test ! -s conftest.err 17210 test ! -s conftest.err
17852 } && test -s conftest$ac_exeext && { 17211 } && test -s conftest$ac_exeext &&
17853 test "$cross_compiling" = yes || 17212 $as_test_x conftest$ac_exeext; then
17854 $as_test_x conftest$ac_exeext
17855 }; then
17856 ac_cv_lib_crypt_crypt=yes 17213 ac_cv_lib_crypt_crypt=yes
17857else 17214else
17858 $as_echo "$as_me: failed program was:" >&5 17215 echo "$as_me: failed program was:" >&5
17859sed 's/^/| /' conftest.$ac_ext >&5 17216sed 's/^/| /' conftest.$ac_ext >&5
17860 17217
17861 ac_cv_lib_crypt_crypt=no 17218 ac_cv_lib_crypt_crypt=no
17862fi 17219fi
17863 17220
17864rm -rf conftest.dSYM
17865rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17221rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17866 conftest$ac_exeext conftest.$ac_ext 17222 conftest$ac_exeext conftest.$ac_ext
17867LIBS=$ac_check_lib_save_LIBS 17223LIBS=$ac_check_lib_save_LIBS
17868fi 17224fi
17869{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 17225{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
17870$as_echo "$ac_cv_lib_crypt_crypt" >&6; } 17226echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
17871if test $ac_cv_lib_crypt_crypt = yes; then 17227if test $ac_cv_lib_crypt_crypt = yes; then
17872 cat >>confdefs.h <<_ACEOF 17228 cat >>confdefs.h <<_ACEOF
17873#define HAVE_LIBCRYPT 1 17229#define HAVE_LIBCRYPT 1
@@ -17882,10 +17238,10 @@ fi
17882# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the 17238# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
17883# version in OpenSSL. 17239# version in OpenSSL.
17884if test "x$check_for_libcrypt_later" = "x1"; then 17240if test "x$check_for_libcrypt_later" = "x1"; then
17885 { $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 17241 { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
17886$as_echo_n "checking for crypt in -lcrypt... " >&6; } 17242echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
17887if test "${ac_cv_lib_crypt_crypt+set}" = set; then 17243if test "${ac_cv_lib_crypt_crypt+set}" = set; then
17888 $as_echo_n "(cached) " >&6 17244 echo $ECHO_N "(cached) $ECHO_C" >&6
17889else 17245else
17890 ac_check_lib_save_LIBS=$LIBS 17246 ac_check_lib_save_LIBS=$LIBS
17891LIBS="-lcrypt $LIBS" 17247LIBS="-lcrypt $LIBS"
@@ -17917,36 +17273,32 @@ case "(($ac_try" in
17917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17918 *) ac_try_echo=$ac_try;; 17274 *) ac_try_echo=$ac_try;;
17919esac 17275esac
17920eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17921$as_echo "$ac_try_echo") >&5
17922 (eval "$ac_link") 2>conftest.er1 17277 (eval "$ac_link") 2>conftest.er1
17923 ac_status=$? 17278 ac_status=$?
17924 grep -v '^ *+' conftest.er1 >conftest.err 17279 grep -v '^ *+' conftest.er1 >conftest.err
17925 rm -f conftest.er1 17280 rm -f conftest.er1
17926 cat conftest.err >&5 17281 cat conftest.err >&5
17927 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17928 (exit $ac_status); } && { 17283 (exit $ac_status); } && {
17929 test -z "$ac_c_werror_flag" || 17284 test -z "$ac_c_werror_flag" ||
17930 test ! -s conftest.err 17285 test ! -s conftest.err
17931 } && test -s conftest$ac_exeext && { 17286 } && test -s conftest$ac_exeext &&
17932 test "$cross_compiling" = yes || 17287 $as_test_x conftest$ac_exeext; then
17933 $as_test_x conftest$ac_exeext
17934 }; then
17935 ac_cv_lib_crypt_crypt=yes 17288 ac_cv_lib_crypt_crypt=yes
17936else 17289else
17937 $as_echo "$as_me: failed program was:" >&5 17290 echo "$as_me: failed program was:" >&5
17938sed 's/^/| /' conftest.$ac_ext >&5 17291sed 's/^/| /' conftest.$ac_ext >&5
17939 17292
17940 ac_cv_lib_crypt_crypt=no 17293 ac_cv_lib_crypt_crypt=no
17941fi 17294fi
17942 17295
17943rm -rf conftest.dSYM
17944rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17296rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17945 conftest$ac_exeext conftest.$ac_ext 17297 conftest$ac_exeext conftest.$ac_ext
17946LIBS=$ac_check_lib_save_LIBS 17298LIBS=$ac_check_lib_save_LIBS
17947fi 17299fi
17948{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 17300{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
17949$as_echo "$ac_cv_lib_crypt_crypt" >&6; } 17301echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
17950if test $ac_cv_lib_crypt_crypt = yes; then 17302if test $ac_cv_lib_crypt_crypt = yes; then
17951 LIBS="$LIBS -lcrypt" 17303 LIBS="$LIBS -lcrypt"
17952fi 17304fi
@@ -17958,11 +17310,11 @@ fi
17958 17310
17959for ac_func in SHA256_Update EVP_sha256 17311for ac_func in SHA256_Update EVP_sha256
17960do 17312do
17961as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 17313as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17962{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 17314{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17963$as_echo_n "checking for $ac_func... " >&6; } 17315echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17964if { 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
17965 $as_echo_n "(cached) " >&6 17317 echo $ECHO_N "(cached) $ECHO_C" >&6
17966else 17318else
17967 cat >conftest.$ac_ext <<_ACEOF 17319 cat >conftest.$ac_ext <<_ACEOF
17968/* confdefs.h. */ 17320/* confdefs.h. */
@@ -18015,41 +17367,35 @@ case "(($ac_try" in
18015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18016 *) ac_try_echo=$ac_try;; 17368 *) ac_try_echo=$ac_try;;
18017esac 17369esac
18018eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18019$as_echo "$ac_try_echo") >&5
18020 (eval "$ac_link") 2>conftest.er1 17371 (eval "$ac_link") 2>conftest.er1
18021 ac_status=$? 17372 ac_status=$?
18022 grep -v '^ *+' conftest.er1 >conftest.err 17373 grep -v '^ *+' conftest.er1 >conftest.err
18023 rm -f conftest.er1 17374 rm -f conftest.er1
18024 cat conftest.err >&5 17375 cat conftest.err >&5
18025 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18026 (exit $ac_status); } && { 17377 (exit $ac_status); } && {
18027 test -z "$ac_c_werror_flag" || 17378 test -z "$ac_c_werror_flag" ||
18028 test ! -s conftest.err 17379 test ! -s conftest.err
18029 } && test -s conftest$ac_exeext && { 17380 } && test -s conftest$ac_exeext &&
18030 test "$cross_compiling" = yes || 17381 $as_test_x conftest$ac_exeext; then
18031 $as_test_x conftest$ac_exeext
18032 }; then
18033 eval "$as_ac_var=yes" 17382 eval "$as_ac_var=yes"
18034else 17383else
18035 $as_echo "$as_me: failed program was:" >&5 17384 echo "$as_me: failed program was:" >&5
18036sed 's/^/| /' conftest.$ac_ext >&5 17385sed 's/^/| /' conftest.$ac_ext >&5
18037 17386
18038 eval "$as_ac_var=no" 17387 eval "$as_ac_var=no"
18039fi 17388fi
18040 17389
18041rm -rf conftest.dSYM
18042rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17390rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18043 conftest$ac_exeext conftest.$ac_ext 17391 conftest$ac_exeext conftest.$ac_ext
18044fi 17392fi
18045ac_res=`eval 'as_val=${'$as_ac_var'} 17393ac_res=`eval echo '${'$as_ac_var'}'`
18046 $as_echo "$as_val"'` 17394 { echo "$as_me:$LINENO: result: $ac_res" >&5
18047 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 17395echo "${ECHO_T}$ac_res" >&6; }
18048$as_echo "$ac_res" >&6; } 17396if test `eval echo '${'$as_ac_var'}'` = yes; then
18049if test `eval 'as_val=${'$as_ac_var'}
18050 $as_echo "$as_val"'` = yes; then
18051 cat >>confdefs.h <<_ACEOF 17397 cat >>confdefs.h <<_ACEOF
18052#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 17398#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18053_ACEOF 17399_ACEOF
18054 17400
18055fi 17401fi
@@ -18057,10 +17403,10 @@ done
18057 17403
18058 17404
18059saved_LIBS="$LIBS" 17405saved_LIBS="$LIBS"
18060{ $as_echo "$as_me:$LINENO: checking for ia_openinfo in -liaf" >&5 17406{ echo "$as_me:$LINENO: checking for ia_openinfo in -liaf" >&5
18061$as_echo_n "checking for ia_openinfo in -liaf... " >&6; } 17407echo $ECHO_N "checking for ia_openinfo in -liaf... $ECHO_C" >&6; }
18062if test "${ac_cv_lib_iaf_ia_openinfo+set}" = set; then 17408if test "${ac_cv_lib_iaf_ia_openinfo+set}" = set; then
18063 $as_echo_n "(cached) " >&6 17409 echo $ECHO_N "(cached) $ECHO_C" >&6
18064else 17410else
18065 ac_check_lib_save_LIBS=$LIBS 17411 ac_check_lib_save_LIBS=$LIBS
18066LIBS="-liaf $LIBS" 17412LIBS="-liaf $LIBS"
@@ -18092,47 +17438,43 @@ case "(($ac_try" in
18092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18093 *) ac_try_echo=$ac_try;; 17439 *) ac_try_echo=$ac_try;;
18094esac 17440esac
18095eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18096$as_echo "$ac_try_echo") >&5
18097 (eval "$ac_link") 2>conftest.er1 17442 (eval "$ac_link") 2>conftest.er1
18098 ac_status=$? 17443 ac_status=$?
18099 grep -v '^ *+' conftest.er1 >conftest.err 17444 grep -v '^ *+' conftest.er1 >conftest.err
18100 rm -f conftest.er1 17445 rm -f conftest.er1
18101 cat conftest.err >&5 17446 cat conftest.err >&5
18102 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18103 (exit $ac_status); } && { 17448 (exit $ac_status); } && {
18104 test -z "$ac_c_werror_flag" || 17449 test -z "$ac_c_werror_flag" ||
18105 test ! -s conftest.err 17450 test ! -s conftest.err
18106 } && test -s conftest$ac_exeext && { 17451 } && test -s conftest$ac_exeext &&
18107 test "$cross_compiling" = yes || 17452 $as_test_x conftest$ac_exeext; then
18108 $as_test_x conftest$ac_exeext
18109 }; then
18110 ac_cv_lib_iaf_ia_openinfo=yes 17453 ac_cv_lib_iaf_ia_openinfo=yes
18111else 17454else
18112 $as_echo "$as_me: failed program was:" >&5 17455 echo "$as_me: failed program was:" >&5
18113sed 's/^/| /' conftest.$ac_ext >&5 17456sed 's/^/| /' conftest.$ac_ext >&5
18114 17457
18115 ac_cv_lib_iaf_ia_openinfo=no 17458 ac_cv_lib_iaf_ia_openinfo=no
18116fi 17459fi
18117 17460
18118rm -rf conftest.dSYM
18119rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17461rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18120 conftest$ac_exeext conftest.$ac_ext 17462 conftest$ac_exeext conftest.$ac_ext
18121LIBS=$ac_check_lib_save_LIBS 17463LIBS=$ac_check_lib_save_LIBS
18122fi 17464fi
18123{ $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
18124$as_echo "$ac_cv_lib_iaf_ia_openinfo" >&6; } 17466echo "${ECHO_T}$ac_cv_lib_iaf_ia_openinfo" >&6; }
18125if test $ac_cv_lib_iaf_ia_openinfo = yes; then 17467if test $ac_cv_lib_iaf_ia_openinfo = yes; then
18126 17468
18127 LIBS="$LIBS -liaf" 17469 LIBS="$LIBS -liaf"
18128 17470
18129for ac_func in set_id 17471for ac_func in set_id
18130do 17472do
18131as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 17473as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18132{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 17474{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18133$as_echo_n "checking for $ac_func... " >&6; } 17475echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18134if { 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
18135 $as_echo_n "(cached) " >&6 17477 echo $ECHO_N "(cached) $ECHO_C" >&6
18136else 17478else
18137 cat >conftest.$ac_ext <<_ACEOF 17479 cat >conftest.$ac_ext <<_ACEOF
18138/* confdefs.h. */ 17480/* confdefs.h. */
@@ -18185,41 +17527,35 @@ case "(($ac_try" in
18185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18186 *) ac_try_echo=$ac_try;; 17528 *) ac_try_echo=$ac_try;;
18187esac 17529esac
18188eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18189$as_echo "$ac_try_echo") >&5
18190 (eval "$ac_link") 2>conftest.er1 17531 (eval "$ac_link") 2>conftest.er1
18191 ac_status=$? 17532 ac_status=$?
18192 grep -v '^ *+' conftest.er1 >conftest.err 17533 grep -v '^ *+' conftest.er1 >conftest.err
18193 rm -f conftest.er1 17534 rm -f conftest.er1
18194 cat conftest.err >&5 17535 cat conftest.err >&5
18195 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18196 (exit $ac_status); } && { 17537 (exit $ac_status); } && {
18197 test -z "$ac_c_werror_flag" || 17538 test -z "$ac_c_werror_flag" ||
18198 test ! -s conftest.err 17539 test ! -s conftest.err
18199 } && test -s conftest$ac_exeext && { 17540 } && test -s conftest$ac_exeext &&
18200 test "$cross_compiling" = yes || 17541 $as_test_x conftest$ac_exeext; then
18201 $as_test_x conftest$ac_exeext
18202 }; then
18203 eval "$as_ac_var=yes" 17542 eval "$as_ac_var=yes"
18204else 17543else
18205 $as_echo "$as_me: failed program was:" >&5 17544 echo "$as_me: failed program was:" >&5
18206sed 's/^/| /' conftest.$ac_ext >&5 17545sed 's/^/| /' conftest.$ac_ext >&5
18207 17546
18208 eval "$as_ac_var=no" 17547 eval "$as_ac_var=no"
18209fi 17548fi
18210 17549
18211rm -rf conftest.dSYM
18212rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17550rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18213 conftest$ac_exeext conftest.$ac_ext 17551 conftest$ac_exeext conftest.$ac_ext
18214fi 17552fi
18215ac_res=`eval 'as_val=${'$as_ac_var'} 17553ac_res=`eval echo '${'$as_ac_var'}'`
18216 $as_echo "$as_val"'` 17554 { echo "$as_me:$LINENO: result: $ac_res" >&5
18217 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 17555echo "${ECHO_T}$ac_res" >&6; }
18218$as_echo "$ac_res" >&6; } 17556if test `eval echo '${'$as_ac_var'}'` = yes; then
18219if test `eval 'as_val=${'$as_ac_var'}
18220 $as_echo "$as_val"'` = yes; then
18221 cat >>confdefs.h <<_ACEOF 17557 cat >>confdefs.h <<_ACEOF
18222#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 17558#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18223_ACEOF 17559_ACEOF
18224 SSHDLIBS="$SSHDLIBS -liaf" 17560 SSHDLIBS="$SSHDLIBS -liaf"
18225 17561
@@ -18239,12 +17575,12 @@ LIBS="$saved_LIBS"
18239### Configure cryptographic random number support 17575### Configure cryptographic random number support
18240 17576
18241# Check wheter OpenSSL seeds itself 17577# Check wheter OpenSSL seeds itself
18242{ $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
18243$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; }
18244if test "$cross_compiling" = yes; then 17580if test "$cross_compiling" = yes; then
18245 17581
18246 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: assuming yes" >&5 17582 { echo "$as_me:$LINENO: WARNING: cross compiling: assuming yes" >&5
18247$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;} 17583echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
18248 # This is safe, since all recent OpenSSL versions will 17584 # This is safe, since all recent OpenSSL versions will
18249 # complain at runtime if not seeded correctly. 17585 # complain at runtime if not seeded correctly.
18250 OPENSSL_SEEDS_ITSELF=yes 17586 OPENSSL_SEEDS_ITSELF=yes
@@ -18269,42 +17605,39 @@ case "(($ac_try" in
18269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18270 *) ac_try_echo=$ac_try;; 17606 *) ac_try_echo=$ac_try;;
18271esac 17607esac
18272eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18273$as_echo "$ac_try_echo") >&5
18274 (eval "$ac_link") 2>&5 17609 (eval "$ac_link") 2>&5
18275 ac_status=$? 17610 ac_status=$?
18276 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18277 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 17612 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18278 { (case "(($ac_try" in 17613 { (case "(($ac_try" in
18279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18280 *) ac_try_echo=$ac_try;; 17615 *) ac_try_echo=$ac_try;;
18281esac 17616esac
18282eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18283$as_echo "$ac_try_echo") >&5
18284 (eval "$ac_try") 2>&5 17618 (eval "$ac_try") 2>&5
18285 ac_status=$? 17619 ac_status=$?
18286 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18287 (exit $ac_status); }; }; then 17621 (exit $ac_status); }; }; then
18288 17622
18289 OPENSSL_SEEDS_ITSELF=yes 17623 OPENSSL_SEEDS_ITSELF=yes
18290 { $as_echo "$as_me:$LINENO: result: yes" >&5 17624 { echo "$as_me:$LINENO: result: yes" >&5
18291$as_echo "yes" >&6; } 17625echo "${ECHO_T}yes" >&6; }
18292 17626
18293else 17627else
18294 $as_echo "$as_me: program exited with status $ac_status" >&5 17628 echo "$as_me: program exited with status $ac_status" >&5
18295$as_echo "$as_me: failed program was:" >&5 17629echo "$as_me: failed program was:" >&5
18296sed 's/^/| /' conftest.$ac_ext >&5 17630sed 's/^/| /' conftest.$ac_ext >&5
18297 17631
18298( exit $ac_status ) 17632( exit $ac_status )
18299 17633
18300 { $as_echo "$as_me:$LINENO: result: no" >&5 17634 { echo "$as_me:$LINENO: result: no" >&5
18301$as_echo "no" >&6; } 17635echo "${ECHO_T}no" >&6; }
18302 # Default to use of the rand helper if OpenSSL doesn't 17636 # Default to use of the rand helper if OpenSSL doesn't
18303 # seed itself 17637 # seed itself
18304 USE_RAND_HELPER=yes 17638 USE_RAND_HELPER=yes
18305 17639
18306fi 17640fi
18307rm -rf conftest.dSYM
18308rm -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
18309fi 17642fi
18310 17643
@@ -18319,17 +17652,17 @@ if test "${with_pam+set}" = set; then
18319 if test "x$withval" != "xno" ; then 17652 if test "x$withval" != "xno" ; then
18320 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \ 17653 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
18321 test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then 17654 test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
18322 { { $as_echo "$as_me:$LINENO: error: PAM headers not found" >&5 17655 { { echo "$as_me:$LINENO: error: PAM headers not found" >&5
18323$as_echo "$as_me: error: PAM headers not found" >&2;} 17656echo "$as_me: error: PAM headers not found" >&2;}
18324 { (exit 1); exit 1; }; } 17657 { (exit 1); exit 1; }; }
18325 fi 17658 fi
18326 17659
18327 saved_LIBS="$LIBS" 17660 saved_LIBS="$LIBS"
18328 17661
18329{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 17662{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
18330$as_echo_n "checking for dlopen in -ldl... " >&6; } 17663echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
18331if test "${ac_cv_lib_dl_dlopen+set}" = set; then 17664if test "${ac_cv_lib_dl_dlopen+set}" = set; then
18332 $as_echo_n "(cached) " >&6 17665 echo $ECHO_N "(cached) $ECHO_C" >&6
18333else 17666else
18334 ac_check_lib_save_LIBS=$LIBS 17667 ac_check_lib_save_LIBS=$LIBS
18335LIBS="-ldl $LIBS" 17668LIBS="-ldl $LIBS"
@@ -18361,36 +17694,32 @@ case "(($ac_try" in
18361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18362 *) ac_try_echo=$ac_try;; 17695 *) ac_try_echo=$ac_try;;
18363esac 17696esac
18364eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18365$as_echo "$ac_try_echo") >&5
18366 (eval "$ac_link") 2>conftest.er1 17698 (eval "$ac_link") 2>conftest.er1
18367 ac_status=$? 17699 ac_status=$?
18368 grep -v '^ *+' conftest.er1 >conftest.err 17700 grep -v '^ *+' conftest.er1 >conftest.err
18369 rm -f conftest.er1 17701 rm -f conftest.er1
18370 cat conftest.err >&5 17702 cat conftest.err >&5
18371 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18372 (exit $ac_status); } && { 17704 (exit $ac_status); } && {
18373 test -z "$ac_c_werror_flag" || 17705 test -z "$ac_c_werror_flag" ||
18374 test ! -s conftest.err 17706 test ! -s conftest.err
18375 } && test -s conftest$ac_exeext && { 17707 } && test -s conftest$ac_exeext &&
18376 test "$cross_compiling" = yes || 17708 $as_test_x conftest$ac_exeext; then
18377 $as_test_x conftest$ac_exeext
18378 }; then
18379 ac_cv_lib_dl_dlopen=yes 17709 ac_cv_lib_dl_dlopen=yes
18380else 17710else
18381 $as_echo "$as_me: failed program was:" >&5 17711 echo "$as_me: failed program was:" >&5
18382sed 's/^/| /' conftest.$ac_ext >&5 17712sed 's/^/| /' conftest.$ac_ext >&5
18383 17713
18384 ac_cv_lib_dl_dlopen=no 17714 ac_cv_lib_dl_dlopen=no
18385fi 17715fi
18386 17716
18387rm -rf conftest.dSYM
18388rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17717rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18389 conftest$ac_exeext conftest.$ac_ext 17718 conftest$ac_exeext conftest.$ac_ext
18390LIBS=$ac_check_lib_save_LIBS 17719LIBS=$ac_check_lib_save_LIBS
18391fi 17720fi
18392{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 17721{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
18393$as_echo "$ac_cv_lib_dl_dlopen" >&6; } 17722echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
18394if test $ac_cv_lib_dl_dlopen = yes; then 17723if test $ac_cv_lib_dl_dlopen = yes; then
18395 cat >>confdefs.h <<_ACEOF 17724 cat >>confdefs.h <<_ACEOF
18396#define HAVE_LIBDL 1 17725#define HAVE_LIBDL 1
@@ -18401,10 +17730,10 @@ _ACEOF
18401fi 17730fi
18402 17731
18403 17732
18404{ $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
18405$as_echo_n "checking for pam_set_item in -lpam... " >&6; } 17734echo $ECHO_N "checking for pam_set_item in -lpam... $ECHO_C" >&6; }
18406if test "${ac_cv_lib_pam_pam_set_item+set}" = set; then 17735if test "${ac_cv_lib_pam_pam_set_item+set}" = set; then
18407 $as_echo_n "(cached) " >&6 17736 echo $ECHO_N "(cached) $ECHO_C" >&6
18408else 17737else
18409 ac_check_lib_save_LIBS=$LIBS 17738 ac_check_lib_save_LIBS=$LIBS
18410LIBS="-lpam $LIBS" 17739LIBS="-lpam $LIBS"
@@ -18436,36 +17765,32 @@ case "(($ac_try" in
18436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18437 *) ac_try_echo=$ac_try;; 17766 *) ac_try_echo=$ac_try;;
18438esac 17767esac
18439eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18440$as_echo "$ac_try_echo") >&5
18441 (eval "$ac_link") 2>conftest.er1 17769 (eval "$ac_link") 2>conftest.er1
18442 ac_status=$? 17770 ac_status=$?
18443 grep -v '^ *+' conftest.er1 >conftest.err 17771 grep -v '^ *+' conftest.er1 >conftest.err
18444 rm -f conftest.er1 17772 rm -f conftest.er1
18445 cat conftest.err >&5 17773 cat conftest.err >&5
18446 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18447 (exit $ac_status); } && { 17775 (exit $ac_status); } && {
18448 test -z "$ac_c_werror_flag" || 17776 test -z "$ac_c_werror_flag" ||
18449 test ! -s conftest.err 17777 test ! -s conftest.err
18450 } && test -s conftest$ac_exeext && { 17778 } && test -s conftest$ac_exeext &&
18451 test "$cross_compiling" = yes || 17779 $as_test_x conftest$ac_exeext; then
18452 $as_test_x conftest$ac_exeext
18453 }; then
18454 ac_cv_lib_pam_pam_set_item=yes 17780 ac_cv_lib_pam_pam_set_item=yes
18455else 17781else
18456 $as_echo "$as_me: failed program was:" >&5 17782 echo "$as_me: failed program was:" >&5
18457sed 's/^/| /' conftest.$ac_ext >&5 17783sed 's/^/| /' conftest.$ac_ext >&5
18458 17784
18459 ac_cv_lib_pam_pam_set_item=no 17785 ac_cv_lib_pam_pam_set_item=no
18460fi 17786fi
18461 17787
18462rm -rf conftest.dSYM
18463rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17788rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18464 conftest$ac_exeext conftest.$ac_ext 17789 conftest$ac_exeext conftest.$ac_ext
18465LIBS=$ac_check_lib_save_LIBS 17790LIBS=$ac_check_lib_save_LIBS
18466fi 17791fi
18467{ $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
18468$as_echo "$ac_cv_lib_pam_pam_set_item" >&6; } 17793echo "${ECHO_T}$ac_cv_lib_pam_pam_set_item" >&6; }
18469if test $ac_cv_lib_pam_pam_set_item = yes; then 17794if test $ac_cv_lib_pam_pam_set_item = yes; then
18470 cat >>confdefs.h <<_ACEOF 17795 cat >>confdefs.h <<_ACEOF
18471#define HAVE_LIBPAM 1 17796#define HAVE_LIBPAM 1
@@ -18474,19 +17799,19 @@ _ACEOF
18474 LIBS="-lpam $LIBS" 17799 LIBS="-lpam $LIBS"
18475 17800
18476else 17801else
18477 { { $as_echo "$as_me:$LINENO: error: *** libpam missing" >&5 17802 { { echo "$as_me:$LINENO: error: *** libpam missing" >&5
18478$as_echo "$as_me: error: *** libpam missing" >&2;} 17803echo "$as_me: error: *** libpam missing" >&2;}
18479 { (exit 1); exit 1; }; } 17804 { (exit 1); exit 1; }; }
18480fi 17805fi
18481 17806
18482 17807
18483for ac_func in pam_getenvlist 17808for ac_func in pam_getenvlist
18484do 17809do
18485as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 17810as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18486{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 17811{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18487$as_echo_n "checking for $ac_func... " >&6; } 17812echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18488if { 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
18489 $as_echo_n "(cached) " >&6 17814 echo $ECHO_N "(cached) $ECHO_C" >&6
18490else 17815else
18491 cat >conftest.$ac_ext <<_ACEOF 17816 cat >conftest.$ac_ext <<_ACEOF
18492/* confdefs.h. */ 17817/* confdefs.h. */
@@ -18539,41 +17864,35 @@ case "(($ac_try" in
18539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18540 *) ac_try_echo=$ac_try;; 17865 *) ac_try_echo=$ac_try;;
18541esac 17866esac
18542eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18543$as_echo "$ac_try_echo") >&5
18544 (eval "$ac_link") 2>conftest.er1 17868 (eval "$ac_link") 2>conftest.er1
18545 ac_status=$? 17869 ac_status=$?
18546 grep -v '^ *+' conftest.er1 >conftest.err 17870 grep -v '^ *+' conftest.er1 >conftest.err
18547 rm -f conftest.er1 17871 rm -f conftest.er1
18548 cat conftest.err >&5 17872 cat conftest.err >&5
18549 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18550 (exit $ac_status); } && { 17874 (exit $ac_status); } && {
18551 test -z "$ac_c_werror_flag" || 17875 test -z "$ac_c_werror_flag" ||
18552 test ! -s conftest.err 17876 test ! -s conftest.err
18553 } && test -s conftest$ac_exeext && { 17877 } && test -s conftest$ac_exeext &&
18554 test "$cross_compiling" = yes || 17878 $as_test_x conftest$ac_exeext; then
18555 $as_test_x conftest$ac_exeext
18556 }; then
18557 eval "$as_ac_var=yes" 17879 eval "$as_ac_var=yes"
18558else 17880else
18559 $as_echo "$as_me: failed program was:" >&5 17881 echo "$as_me: failed program was:" >&5
18560sed 's/^/| /' conftest.$ac_ext >&5 17882sed 's/^/| /' conftest.$ac_ext >&5
18561 17883
18562 eval "$as_ac_var=no" 17884 eval "$as_ac_var=no"
18563fi 17885fi
18564 17886
18565rm -rf conftest.dSYM
18566rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17887rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18567 conftest$ac_exeext conftest.$ac_ext 17888 conftest$ac_exeext conftest.$ac_ext
18568fi 17889fi
18569ac_res=`eval 'as_val=${'$as_ac_var'} 17890ac_res=`eval echo '${'$as_ac_var'}'`
18570 $as_echo "$as_val"'` 17891 { echo "$as_me:$LINENO: result: $ac_res" >&5
18571 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 17892echo "${ECHO_T}$ac_res" >&6; }
18572$as_echo "$ac_res" >&6; } 17893if test `eval echo '${'$as_ac_var'}'` = yes; then
18573if test `eval 'as_val=${'$as_ac_var'}
18574 $as_echo "$as_val"'` = yes; then
18575 cat >>confdefs.h <<_ACEOF 17894 cat >>confdefs.h <<_ACEOF
18576#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 17895#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18577_ACEOF 17896_ACEOF
18578 17897
18579fi 17898fi
@@ -18582,11 +17901,11 @@ done
18582 17901
18583for ac_func in pam_putenv 17902for ac_func in pam_putenv
18584do 17903do
18585as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 17904as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18586{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 17905{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18587$as_echo_n "checking for $ac_func... " >&6; } 17906echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18588if { 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
18589 $as_echo_n "(cached) " >&6 17908 echo $ECHO_N "(cached) $ECHO_C" >&6
18590else 17909else
18591 cat >conftest.$ac_ext <<_ACEOF 17910 cat >conftest.$ac_ext <<_ACEOF
18592/* confdefs.h. */ 17911/* confdefs.h. */
@@ -18639,41 +17958,35 @@ case "(($ac_try" in
18639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 17958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18640 *) ac_try_echo=$ac_try;; 17959 *) ac_try_echo=$ac_try;;
18641esac 17960esac
18642eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 17961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18643$as_echo "$ac_try_echo") >&5
18644 (eval "$ac_link") 2>conftest.er1 17962 (eval "$ac_link") 2>conftest.er1
18645 ac_status=$? 17963 ac_status=$?
18646 grep -v '^ *+' conftest.er1 >conftest.err 17964 grep -v '^ *+' conftest.er1 >conftest.err
18647 rm -f conftest.er1 17965 rm -f conftest.er1
18648 cat conftest.err >&5 17966 cat conftest.err >&5
18649 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 17967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18650 (exit $ac_status); } && { 17968 (exit $ac_status); } && {
18651 test -z "$ac_c_werror_flag" || 17969 test -z "$ac_c_werror_flag" ||
18652 test ! -s conftest.err 17970 test ! -s conftest.err
18653 } && test -s conftest$ac_exeext && { 17971 } && test -s conftest$ac_exeext &&
18654 test "$cross_compiling" = yes || 17972 $as_test_x conftest$ac_exeext; then
18655 $as_test_x conftest$ac_exeext
18656 }; then
18657 eval "$as_ac_var=yes" 17973 eval "$as_ac_var=yes"
18658else 17974else
18659 $as_echo "$as_me: failed program was:" >&5 17975 echo "$as_me: failed program was:" >&5
18660sed 's/^/| /' conftest.$ac_ext >&5 17976sed 's/^/| /' conftest.$ac_ext >&5
18661 17977
18662 eval "$as_ac_var=no" 17978 eval "$as_ac_var=no"
18663fi 17979fi
18664 17980
18665rm -rf conftest.dSYM
18666rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 17981rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18667 conftest$ac_exeext conftest.$ac_ext 17982 conftest$ac_exeext conftest.$ac_ext
18668fi 17983fi
18669ac_res=`eval 'as_val=${'$as_ac_var'} 17984ac_res=`eval echo '${'$as_ac_var'}'`
18670 $as_echo "$as_val"'` 17985 { echo "$as_me:$LINENO: result: $ac_res" >&5
18671 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 17986echo "${ECHO_T}$ac_res" >&6; }
18672$as_echo "$ac_res" >&6; } 17987if test `eval echo '${'$as_ac_var'}'` = yes; then
18673if test `eval 'as_val=${'$as_ac_var'}
18674 $as_echo "$as_val"'` = yes; then
18675 cat >>confdefs.h <<_ACEOF 17988 cat >>confdefs.h <<_ACEOF
18676#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 17989#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18677_ACEOF 17990_ACEOF
18678 17991
18679fi 17992fi
@@ -18709,8 +18022,8 @@ fi
18709# Check for older PAM 18022# Check for older PAM
18710if test "x$PAM_MSG" = "xyes" ; then 18023if test "x$PAM_MSG" = "xyes" ; then
18711 # Check PAM strerror arguments (old PAM) 18024 # Check PAM strerror arguments (old PAM)
18712 { $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
18713$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; }
18714 cat >conftest.$ac_ext <<_ACEOF 18027 cat >conftest.$ac_ext <<_ACEOF
18715/* confdefs.h. */ 18028/* confdefs.h. */
18716_ACEOF 18029_ACEOF
@@ -18739,22 +18052,21 @@ case "(($ac_try" in
18739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 18052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18740 *) ac_try_echo=$ac_try;; 18053 *) ac_try_echo=$ac_try;;
18741esac 18054esac
18742eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 18055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18743$as_echo "$ac_try_echo") >&5
18744 (eval "$ac_compile") 2>conftest.er1 18056 (eval "$ac_compile") 2>conftest.er1
18745 ac_status=$? 18057 ac_status=$?
18746 grep -v '^ *+' conftest.er1 >conftest.err 18058 grep -v '^ *+' conftest.er1 >conftest.err
18747 rm -f conftest.er1 18059 rm -f conftest.er1
18748 cat conftest.err >&5 18060 cat conftest.err >&5
18749 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 18061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18750 (exit $ac_status); } && { 18062 (exit $ac_status); } && {
18751 test -z "$ac_c_werror_flag" || 18063 test -z "$ac_c_werror_flag" ||
18752 test ! -s conftest.err 18064 test ! -s conftest.err
18753 } && test -s conftest.$ac_objext; then 18065 } && test -s conftest.$ac_objext; then
18754 { $as_echo "$as_me:$LINENO: result: no" >&5 18066 { echo "$as_me:$LINENO: result: no" >&5
18755$as_echo "no" >&6; } 18067echo "${ECHO_T}no" >&6; }
18756else 18068else
18757 $as_echo "$as_me: failed program was:" >&5 18069 echo "$as_me: failed program was:" >&5
18758sed 's/^/| /' conftest.$ac_ext >&5 18070sed 's/^/| /' conftest.$ac_ext >&5
18759 18071
18760 18072
@@ -18763,8 +18075,8 @@ cat >>confdefs.h <<\_ACEOF
18763#define HAVE_OLD_PAM 1 18075#define HAVE_OLD_PAM 1
18764_ACEOF 18076_ACEOF
18765 18077
18766 { $as_echo "$as_me:$LINENO: result: yes" >&5 18078 { echo "$as_me:$LINENO: result: yes" >&5
18767$as_echo "yes" >&6; } 18079echo "${ECHO_T}yes" >&6; }
18768 PAM_MSG="yes (old library)" 18080 PAM_MSG="yes (old library)"
18769 18081
18770 18082
@@ -18782,8 +18094,8 @@ if test "${with_rand_helper+set}" = set; then
18782 # Force use of OpenSSL's internal RNG, even if 18094 # Force use of OpenSSL's internal RNG, even if
18783 # the previous test showed it to be unseeded. 18095 # the previous test showed it to be unseeded.
18784 if test -z "$OPENSSL_SEEDS_ITSELF" ; then 18096 if test -z "$OPENSSL_SEEDS_ITSELF" ; then
18785 { $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
18786$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;}
18787 OPENSSL_SEEDS_ITSELF=yes 18099 OPENSSL_SEEDS_ITSELF=yes
18788 USE_RAND_HELPER="" 18100 USE_RAND_HELPER=""
18789 fi 18101 fi
@@ -18825,8 +18137,8 @@ if test "${with_prngd_port+set}" = set; then
18825 [0-9]*) 18137 [0-9]*)
18826 ;; 18138 ;;
18827 *) 18139 *)
18828 { { $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
18829$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;}
18830 { (exit 1); exit 1; }; } 18142 { (exit 1); exit 1; }; }
18831 ;; 18143 ;;
18832 esac 18144 esac
@@ -18858,21 +18170,21 @@ if test "${with_prngd_socket+set}" = set; then
18858 /*) 18170 /*)
18859 ;; 18171 ;;
18860 *) 18172 *)
18861 { { $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
18862$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;}
18863 { (exit 1); exit 1; }; } 18175 { (exit 1); exit 1; }; }
18864 ;; 18176 ;;
18865 esac 18177 esac
18866 18178
18867 if test ! -z "$withval" ; then 18179 if test ! -z "$withval" ; then
18868 if test ! -z "$PRNGD_PORT" ; then 18180 if test ! -z "$PRNGD_PORT" ; then
18869 { { $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
18870$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;}
18871 { (exit 1); exit 1; }; } 18183 { (exit 1); exit 1; }; }
18872 fi 18184 fi
18873 if test ! -r "$withval" ; then 18185 if test ! -r "$withval" ; then
18874 { $as_echo "$as_me:$LINENO: WARNING: Entropy socket is not readable" >&5 18186 { echo "$as_me:$LINENO: WARNING: Entropy socket is not readable" >&5
18875$as_echo "$as_me: WARNING: Entropy socket is not readable" >&2;} 18187echo "$as_me: WARNING: Entropy socket is not readable" >&2;}
18876 fi 18188 fi
18877 PRNGD_SOCKET="$withval" 18189 PRNGD_SOCKET="$withval"
18878 18190
@@ -18886,8 +18198,8 @@ else
18886 18198
18887 # 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
18888 if test "$USE_RAND_HELPER" = yes ; then 18200 if test "$USE_RAND_HELPER" = yes ; then
18889 { $as_echo "$as_me:$LINENO: checking for PRNGD/EGD socket" >&5 18201 { echo "$as_me:$LINENO: checking for PRNGD/EGD socket" >&5
18890$as_echo_n "checking for PRNGD/EGD socket... " >&6; } 18202echo $ECHO_N "checking for PRNGD/EGD socket... $ECHO_C" >&6; }
18891 # Insert other locations here 18203 # Insert other locations here
18892 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
18893 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
@@ -18900,11 +18212,11 @@ _ACEOF
18900 fi 18212 fi
18901 done 18213 done
18902 if test ! -z "$PRNGD_SOCKET" ; then 18214 if test ! -z "$PRNGD_SOCKET" ; then
18903 { $as_echo "$as_me:$LINENO: result: $PRNGD_SOCKET" >&5 18215 { echo "$as_me:$LINENO: result: $PRNGD_SOCKET" >&5
18904$as_echo "$PRNGD_SOCKET" >&6; } 18216echo "${ECHO_T}$PRNGD_SOCKET" >&6; }
18905 else 18217 else
18906 { $as_echo "$as_me:$LINENO: result: not found" >&5 18218 { echo "$as_me:$LINENO: result: not found" >&5
18907$as_echo "not found" >&6; } 18219echo "${ECHO_T}not found" >&6; }
18908 fi 18220 fi
18909 fi 18221 fi
18910 18222
@@ -18970,10 +18282,10 @@ PATH=$PATH:/etc:$OPATH
18970 18282
18971 # 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.
18972set dummy ls; ac_word=$2 18284set dummy ls; ac_word=$2
18973{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18285{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18974$as_echo_n "checking for $ac_word... " >&6; } 18286echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
18975if test "${ac_cv_path_PROG_LS+set}" = set; then 18287if test "${ac_cv_path_PROG_LS+set}" = set; then
18976 $as_echo_n "(cached) " >&6 18288 echo $ECHO_N "(cached) $ECHO_C" >&6
18977else 18289else
18978 case $PROG_LS in 18290 case $PROG_LS in
18979 [\\/]* | ?:[\\/]*) 18291 [\\/]* | ?:[\\/]*)
@@ -18988,7 +18300,7 @@ do
18988 for ac_exec_ext in '' $ac_executable_extensions; do 18300 for ac_exec_ext in '' $ac_executable_extensions; do
18989 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
18990 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"
18991 $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
18992 break 2 18304 break 2
18993 fi 18305 fi
18994done 18306done
@@ -19000,11 +18312,11 @@ esac
19000fi 18312fi
19001PROG_LS=$ac_cv_path_PROG_LS 18313PROG_LS=$ac_cv_path_PROG_LS
19002if test -n "$PROG_LS"; then 18314if test -n "$PROG_LS"; then
19003 { $as_echo "$as_me:$LINENO: result: $PROG_LS" >&5 18315 { echo "$as_me:$LINENO: result: $PROG_LS" >&5
19004$as_echo "$PROG_LS" >&6; } 18316echo "${ECHO_T}$PROG_LS" >&6; }
19005else 18317else
19006 { $as_echo "$as_me:$LINENO: result: no" >&5 18318 { echo "$as_me:$LINENO: result: no" >&5
19007$as_echo "no" >&6; } 18319echo "${ECHO_T}no" >&6; }
19008fi 18320fi
19009 18321
19010 18322
@@ -19016,10 +18328,10 @@ fi
19016 18328
19017 # 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.
19018set dummy netstat; ac_word=$2 18330set dummy netstat; ac_word=$2
19019{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18331{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19020$as_echo_n "checking for $ac_word... " >&6; } 18332echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19021if test "${ac_cv_path_PROG_NETSTAT+set}" = set; then 18333if test "${ac_cv_path_PROG_NETSTAT+set}" = set; then
19022 $as_echo_n "(cached) " >&6 18334 echo $ECHO_N "(cached) $ECHO_C" >&6
19023else 18335else
19024 case $PROG_NETSTAT in 18336 case $PROG_NETSTAT in
19025 [\\/]* | ?:[\\/]*) 18337 [\\/]* | ?:[\\/]*)
@@ -19034,7 +18346,7 @@ do
19034 for ac_exec_ext in '' $ac_executable_extensions; do 18346 for ac_exec_ext in '' $ac_executable_extensions; do
19035 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
19036 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"
19037 $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
19038 break 2 18350 break 2
19039 fi 18351 fi
19040done 18352done
@@ -19046,11 +18358,11 @@ esac
19046fi 18358fi
19047PROG_NETSTAT=$ac_cv_path_PROG_NETSTAT 18359PROG_NETSTAT=$ac_cv_path_PROG_NETSTAT
19048if test -n "$PROG_NETSTAT"; then 18360if test -n "$PROG_NETSTAT"; then
19049 { $as_echo "$as_me:$LINENO: result: $PROG_NETSTAT" >&5 18361 { echo "$as_me:$LINENO: result: $PROG_NETSTAT" >&5
19050$as_echo "$PROG_NETSTAT" >&6; } 18362echo "${ECHO_T}$PROG_NETSTAT" >&6; }
19051else 18363else
19052 { $as_echo "$as_me:$LINENO: result: no" >&5 18364 { echo "$as_me:$LINENO: result: no" >&5
19053$as_echo "no" >&6; } 18365echo "${ECHO_T}no" >&6; }
19054fi 18366fi
19055 18367
19056 18368
@@ -19062,10 +18374,10 @@ fi
19062 18374
19063 # 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.
19064set dummy arp; ac_word=$2 18376set dummy arp; ac_word=$2
19065{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18377{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19066$as_echo_n "checking for $ac_word... " >&6; } 18378echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19067if test "${ac_cv_path_PROG_ARP+set}" = set; then 18379if test "${ac_cv_path_PROG_ARP+set}" = set; then
19068 $as_echo_n "(cached) " >&6 18380 echo $ECHO_N "(cached) $ECHO_C" >&6
19069else 18381else
19070 case $PROG_ARP in 18382 case $PROG_ARP in
19071 [\\/]* | ?:[\\/]*) 18383 [\\/]* | ?:[\\/]*)
@@ -19080,7 +18392,7 @@ do
19080 for ac_exec_ext in '' $ac_executable_extensions; do 18392 for ac_exec_ext in '' $ac_executable_extensions; do
19081 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
19082 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"
19083 $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
19084 break 2 18396 break 2
19085 fi 18397 fi
19086done 18398done
@@ -19092,11 +18404,11 @@ esac
19092fi 18404fi
19093PROG_ARP=$ac_cv_path_PROG_ARP 18405PROG_ARP=$ac_cv_path_PROG_ARP
19094if test -n "$PROG_ARP"; then 18406if test -n "$PROG_ARP"; then
19095 { $as_echo "$as_me:$LINENO: result: $PROG_ARP" >&5 18407 { echo "$as_me:$LINENO: result: $PROG_ARP" >&5
19096$as_echo "$PROG_ARP" >&6; } 18408echo "${ECHO_T}$PROG_ARP" >&6; }
19097else 18409else
19098 { $as_echo "$as_me:$LINENO: result: no" >&5 18410 { echo "$as_me:$LINENO: result: no" >&5
19099$as_echo "no" >&6; } 18411echo "${ECHO_T}no" >&6; }
19100fi 18412fi
19101 18413
19102 18414
@@ -19108,10 +18420,10 @@ fi
19108 18420
19109 # 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.
19110set dummy ifconfig; ac_word=$2 18422set dummy ifconfig; ac_word=$2
19111{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18423{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19112$as_echo_n "checking for $ac_word... " >&6; } 18424echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19113if test "${ac_cv_path_PROG_IFCONFIG+set}" = set; then 18425if test "${ac_cv_path_PROG_IFCONFIG+set}" = set; then
19114 $as_echo_n "(cached) " >&6 18426 echo $ECHO_N "(cached) $ECHO_C" >&6
19115else 18427else
19116 case $PROG_IFCONFIG in 18428 case $PROG_IFCONFIG in
19117 [\\/]* | ?:[\\/]*) 18429 [\\/]* | ?:[\\/]*)
@@ -19126,7 +18438,7 @@ do
19126 for ac_exec_ext in '' $ac_executable_extensions; do 18438 for ac_exec_ext in '' $ac_executable_extensions; do
19127 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
19128 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"
19129 $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
19130 break 2 18442 break 2
19131 fi 18443 fi
19132done 18444done
@@ -19138,11 +18450,11 @@ esac
19138fi 18450fi
19139PROG_IFCONFIG=$ac_cv_path_PROG_IFCONFIG 18451PROG_IFCONFIG=$ac_cv_path_PROG_IFCONFIG
19140if test -n "$PROG_IFCONFIG"; then 18452if test -n "$PROG_IFCONFIG"; then
19141 { $as_echo "$as_me:$LINENO: result: $PROG_IFCONFIG" >&5 18453 { echo "$as_me:$LINENO: result: $PROG_IFCONFIG" >&5
19142$as_echo "$PROG_IFCONFIG" >&6; } 18454echo "${ECHO_T}$PROG_IFCONFIG" >&6; }
19143else 18455else
19144 { $as_echo "$as_me:$LINENO: result: no" >&5 18456 { echo "$as_me:$LINENO: result: no" >&5
19145$as_echo "no" >&6; } 18457echo "${ECHO_T}no" >&6; }
19146fi 18458fi
19147 18459
19148 18460
@@ -19154,10 +18466,10 @@ fi
19154 18466
19155 # 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.
19156set dummy jstat; ac_word=$2 18468set dummy jstat; ac_word=$2
19157{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18469{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19158$as_echo_n "checking for $ac_word... " >&6; } 18470echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19159if test "${ac_cv_path_PROG_JSTAT+set}" = set; then 18471if test "${ac_cv_path_PROG_JSTAT+set}" = set; then
19160 $as_echo_n "(cached) " >&6 18472 echo $ECHO_N "(cached) $ECHO_C" >&6
19161else 18473else
19162 case $PROG_JSTAT in 18474 case $PROG_JSTAT in
19163 [\\/]* | ?:[\\/]*) 18475 [\\/]* | ?:[\\/]*)
@@ -19172,7 +18484,7 @@ do
19172 for ac_exec_ext in '' $ac_executable_extensions; do 18484 for ac_exec_ext in '' $ac_executable_extensions; do
19173 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
19174 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"
19175 $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
19176 break 2 18488 break 2
19177 fi 18489 fi
19178done 18490done
@@ -19184,11 +18496,11 @@ esac
19184fi 18496fi
19185PROG_JSTAT=$ac_cv_path_PROG_JSTAT 18497PROG_JSTAT=$ac_cv_path_PROG_JSTAT
19186if test -n "$PROG_JSTAT"; then 18498if test -n "$PROG_JSTAT"; then
19187 { $as_echo "$as_me:$LINENO: result: $PROG_JSTAT" >&5 18499 { echo "$as_me:$LINENO: result: $PROG_JSTAT" >&5
19188$as_echo "$PROG_JSTAT" >&6; } 18500echo "${ECHO_T}$PROG_JSTAT" >&6; }
19189else 18501else
19190 { $as_echo "$as_me:$LINENO: result: no" >&5 18502 { echo "$as_me:$LINENO: result: no" >&5
19191$as_echo "no" >&6; } 18503echo "${ECHO_T}no" >&6; }
19192fi 18504fi
19193 18505
19194 18506
@@ -19200,10 +18512,10 @@ fi
19200 18512
19201 # 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.
19202set dummy ps; ac_word=$2 18514set dummy ps; ac_word=$2
19203{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18515{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19204$as_echo_n "checking for $ac_word... " >&6; } 18516echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19205if test "${ac_cv_path_PROG_PS+set}" = set; then 18517if test "${ac_cv_path_PROG_PS+set}" = set; then
19206 $as_echo_n "(cached) " >&6 18518 echo $ECHO_N "(cached) $ECHO_C" >&6
19207else 18519else
19208 case $PROG_PS in 18520 case $PROG_PS in
19209 [\\/]* | ?:[\\/]*) 18521 [\\/]* | ?:[\\/]*)
@@ -19218,7 +18530,7 @@ do
19218 for ac_exec_ext in '' $ac_executable_extensions; do 18530 for ac_exec_ext in '' $ac_executable_extensions; do
19219 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
19220 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"
19221 $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
19222 break 2 18534 break 2
19223 fi 18535 fi
19224done 18536done
@@ -19230,11 +18542,11 @@ esac
19230fi 18542fi
19231PROG_PS=$ac_cv_path_PROG_PS 18543PROG_PS=$ac_cv_path_PROG_PS
19232if test -n "$PROG_PS"; then 18544if test -n "$PROG_PS"; then
19233 { $as_echo "$as_me:$LINENO: result: $PROG_PS" >&5 18545 { echo "$as_me:$LINENO: result: $PROG_PS" >&5
19234$as_echo "$PROG_PS" >&6; } 18546echo "${ECHO_T}$PROG_PS" >&6; }
19235else 18547else
19236 { $as_echo "$as_me:$LINENO: result: no" >&5 18548 { echo "$as_me:$LINENO: result: no" >&5
19237$as_echo "no" >&6; } 18549echo "${ECHO_T}no" >&6; }
19238fi 18550fi
19239 18551
19240 18552
@@ -19246,10 +18558,10 @@ fi
19246 18558
19247 # 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.
19248set dummy sar; ac_word=$2 18560set dummy sar; ac_word=$2
19249{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18561{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19250$as_echo_n "checking for $ac_word... " >&6; } 18562echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19251if test "${ac_cv_path_PROG_SAR+set}" = set; then 18563if test "${ac_cv_path_PROG_SAR+set}" = set; then
19252 $as_echo_n "(cached) " >&6 18564 echo $ECHO_N "(cached) $ECHO_C" >&6
19253else 18565else
19254 case $PROG_SAR in 18566 case $PROG_SAR in
19255 [\\/]* | ?:[\\/]*) 18567 [\\/]* | ?:[\\/]*)
@@ -19264,7 +18576,7 @@ do
19264 for ac_exec_ext in '' $ac_executable_extensions; do 18576 for ac_exec_ext in '' $ac_executable_extensions; do
19265 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
19266 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"
19267 $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
19268 break 2 18580 break 2
19269 fi 18581 fi
19270done 18582done
@@ -19276,11 +18588,11 @@ esac
19276fi 18588fi
19277PROG_SAR=$ac_cv_path_PROG_SAR 18589PROG_SAR=$ac_cv_path_PROG_SAR
19278if test -n "$PROG_SAR"; then 18590if test -n "$PROG_SAR"; then
19279 { $as_echo "$as_me:$LINENO: result: $PROG_SAR" >&5 18591 { echo "$as_me:$LINENO: result: $PROG_SAR" >&5
19280$as_echo "$PROG_SAR" >&6; } 18592echo "${ECHO_T}$PROG_SAR" >&6; }
19281else 18593else
19282 { $as_echo "$as_me:$LINENO: result: no" >&5 18594 { echo "$as_me:$LINENO: result: no" >&5
19283$as_echo "no" >&6; } 18595echo "${ECHO_T}no" >&6; }
19284fi 18596fi
19285 18597
19286 18598
@@ -19292,10 +18604,10 @@ fi
19292 18604
19293 # 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.
19294set dummy w; ac_word=$2 18606set dummy w; ac_word=$2
19295{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18607{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19296$as_echo_n "checking for $ac_word... " >&6; } 18608echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19297if test "${ac_cv_path_PROG_W+set}" = set; then 18609if test "${ac_cv_path_PROG_W+set}" = set; then
19298 $as_echo_n "(cached) " >&6 18610 echo $ECHO_N "(cached) $ECHO_C" >&6
19299else 18611else
19300 case $PROG_W in 18612 case $PROG_W in
19301 [\\/]* | ?:[\\/]*) 18613 [\\/]* | ?:[\\/]*)
@@ -19310,7 +18622,7 @@ do
19310 for ac_exec_ext in '' $ac_executable_extensions; do 18622 for ac_exec_ext in '' $ac_executable_extensions; do
19311 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
19312 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"
19313 $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
19314 break 2 18626 break 2
19315 fi 18627 fi
19316done 18628done
@@ -19322,11 +18634,11 @@ esac
19322fi 18634fi
19323PROG_W=$ac_cv_path_PROG_W 18635PROG_W=$ac_cv_path_PROG_W
19324if test -n "$PROG_W"; then 18636if test -n "$PROG_W"; then
19325 { $as_echo "$as_me:$LINENO: result: $PROG_W" >&5 18637 { echo "$as_me:$LINENO: result: $PROG_W" >&5
19326$as_echo "$PROG_W" >&6; } 18638echo "${ECHO_T}$PROG_W" >&6; }
19327else 18639else
19328 { $as_echo "$as_me:$LINENO: result: no" >&5 18640 { echo "$as_me:$LINENO: result: no" >&5
19329$as_echo "no" >&6; } 18641echo "${ECHO_T}no" >&6; }
19330fi 18642fi
19331 18643
19332 18644
@@ -19338,10 +18650,10 @@ fi
19338 18650
19339 # 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.
19340set dummy who; ac_word=$2 18652set dummy who; ac_word=$2
19341{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18653{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19342$as_echo_n "checking for $ac_word... " >&6; } 18654echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19343if test "${ac_cv_path_PROG_WHO+set}" = set; then 18655if test "${ac_cv_path_PROG_WHO+set}" = set; then
19344 $as_echo_n "(cached) " >&6 18656 echo $ECHO_N "(cached) $ECHO_C" >&6
19345else 18657else
19346 case $PROG_WHO in 18658 case $PROG_WHO in
19347 [\\/]* | ?:[\\/]*) 18659 [\\/]* | ?:[\\/]*)
@@ -19356,7 +18668,7 @@ do
19356 for ac_exec_ext in '' $ac_executable_extensions; do 18668 for ac_exec_ext in '' $ac_executable_extensions; do
19357 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
19358 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"
19359 $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
19360 break 2 18672 break 2
19361 fi 18673 fi
19362done 18674done
@@ -19368,11 +18680,11 @@ esac
19368fi 18680fi
19369PROG_WHO=$ac_cv_path_PROG_WHO 18681PROG_WHO=$ac_cv_path_PROG_WHO
19370if test -n "$PROG_WHO"; then 18682if test -n "$PROG_WHO"; then
19371 { $as_echo "$as_me:$LINENO: result: $PROG_WHO" >&5 18683 { echo "$as_me:$LINENO: result: $PROG_WHO" >&5
19372$as_echo "$PROG_WHO" >&6; } 18684echo "${ECHO_T}$PROG_WHO" >&6; }
19373else 18685else
19374 { $as_echo "$as_me:$LINENO: result: no" >&5 18686 { echo "$as_me:$LINENO: result: no" >&5
19375$as_echo "no" >&6; } 18687echo "${ECHO_T}no" >&6; }
19376fi 18688fi
19377 18689
19378 18690
@@ -19384,10 +18696,10 @@ fi
19384 18696
19385 # 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.
19386set dummy last; ac_word=$2 18698set dummy last; ac_word=$2
19387{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18699{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19388$as_echo_n "checking for $ac_word... " >&6; } 18700echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19389if test "${ac_cv_path_PROG_LAST+set}" = set; then 18701if test "${ac_cv_path_PROG_LAST+set}" = set; then
19390 $as_echo_n "(cached) " >&6 18702 echo $ECHO_N "(cached) $ECHO_C" >&6
19391else 18703else
19392 case $PROG_LAST in 18704 case $PROG_LAST in
19393 [\\/]* | ?:[\\/]*) 18705 [\\/]* | ?:[\\/]*)
@@ -19402,7 +18714,7 @@ do
19402 for ac_exec_ext in '' $ac_executable_extensions; do 18714 for ac_exec_ext in '' $ac_executable_extensions; do
19403 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
19404 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"
19405 $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
19406 break 2 18718 break 2
19407 fi 18719 fi
19408done 18720done
@@ -19414,11 +18726,11 @@ esac
19414fi 18726fi
19415PROG_LAST=$ac_cv_path_PROG_LAST 18727PROG_LAST=$ac_cv_path_PROG_LAST
19416if test -n "$PROG_LAST"; then 18728if test -n "$PROG_LAST"; then
19417 { $as_echo "$as_me:$LINENO: result: $PROG_LAST" >&5 18729 { echo "$as_me:$LINENO: result: $PROG_LAST" >&5
19418$as_echo "$PROG_LAST" >&6; } 18730echo "${ECHO_T}$PROG_LAST" >&6; }
19419else 18731else
19420 { $as_echo "$as_me:$LINENO: result: no" >&5 18732 { echo "$as_me:$LINENO: result: no" >&5
19421$as_echo "no" >&6; } 18733echo "${ECHO_T}no" >&6; }
19422fi 18734fi
19423 18735
19424 18736
@@ -19430,10 +18742,10 @@ fi
19430 18742
19431 # 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.
19432set dummy lastlog; ac_word=$2 18744set dummy lastlog; ac_word=$2
19433{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18745{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19434$as_echo_n "checking for $ac_word... " >&6; } 18746echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19435if test "${ac_cv_path_PROG_LASTLOG+set}" = set; then 18747if test "${ac_cv_path_PROG_LASTLOG+set}" = set; then
19436 $as_echo_n "(cached) " >&6 18748 echo $ECHO_N "(cached) $ECHO_C" >&6
19437else 18749else
19438 case $PROG_LASTLOG in 18750 case $PROG_LASTLOG in
19439 [\\/]* | ?:[\\/]*) 18751 [\\/]* | ?:[\\/]*)
@@ -19448,7 +18760,7 @@ do
19448 for ac_exec_ext in '' $ac_executable_extensions; do 18760 for ac_exec_ext in '' $ac_executable_extensions; do
19449 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
19450 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"
19451 $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
19452 break 2 18764 break 2
19453 fi 18765 fi
19454done 18766done
@@ -19460,11 +18772,11 @@ esac
19460fi 18772fi
19461PROG_LASTLOG=$ac_cv_path_PROG_LASTLOG 18773PROG_LASTLOG=$ac_cv_path_PROG_LASTLOG
19462if test -n "$PROG_LASTLOG"; then 18774if test -n "$PROG_LASTLOG"; then
19463 { $as_echo "$as_me:$LINENO: result: $PROG_LASTLOG" >&5 18775 { echo "$as_me:$LINENO: result: $PROG_LASTLOG" >&5
19464$as_echo "$PROG_LASTLOG" >&6; } 18776echo "${ECHO_T}$PROG_LASTLOG" >&6; }
19465else 18777else
19466 { $as_echo "$as_me:$LINENO: result: no" >&5 18778 { echo "$as_me:$LINENO: result: no" >&5
19467$as_echo "no" >&6; } 18779echo "${ECHO_T}no" >&6; }
19468fi 18780fi
19469 18781
19470 18782
@@ -19476,10 +18788,10 @@ fi
19476 18788
19477 # 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.
19478set dummy df; ac_word=$2 18790set dummy df; ac_word=$2
19479{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18791{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19480$as_echo_n "checking for $ac_word... " >&6; } 18792echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19481if test "${ac_cv_path_PROG_DF+set}" = set; then 18793if test "${ac_cv_path_PROG_DF+set}" = set; then
19482 $as_echo_n "(cached) " >&6 18794 echo $ECHO_N "(cached) $ECHO_C" >&6
19483else 18795else
19484 case $PROG_DF in 18796 case $PROG_DF in
19485 [\\/]* | ?:[\\/]*) 18797 [\\/]* | ?:[\\/]*)
@@ -19494,7 +18806,7 @@ do
19494 for ac_exec_ext in '' $ac_executable_extensions; do 18806 for ac_exec_ext in '' $ac_executable_extensions; do
19495 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
19496 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"
19497 $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
19498 break 2 18810 break 2
19499 fi 18811 fi
19500done 18812done
@@ -19506,11 +18818,11 @@ esac
19506fi 18818fi
19507PROG_DF=$ac_cv_path_PROG_DF 18819PROG_DF=$ac_cv_path_PROG_DF
19508if test -n "$PROG_DF"; then 18820if test -n "$PROG_DF"; then
19509 { $as_echo "$as_me:$LINENO: result: $PROG_DF" >&5 18821 { echo "$as_me:$LINENO: result: $PROG_DF" >&5
19510$as_echo "$PROG_DF" >&6; } 18822echo "${ECHO_T}$PROG_DF" >&6; }
19511else 18823else
19512 { $as_echo "$as_me:$LINENO: result: no" >&5 18824 { echo "$as_me:$LINENO: result: no" >&5
19513$as_echo "no" >&6; } 18825echo "${ECHO_T}no" >&6; }
19514fi 18826fi
19515 18827
19516 18828
@@ -19522,10 +18834,10 @@ fi
19522 18834
19523 # 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.
19524set dummy vmstat; ac_word=$2 18836set dummy vmstat; ac_word=$2
19525{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18837{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19526$as_echo_n "checking for $ac_word... " >&6; } 18838echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19527if test "${ac_cv_path_PROG_VMSTAT+set}" = set; then 18839if test "${ac_cv_path_PROG_VMSTAT+set}" = set; then
19528 $as_echo_n "(cached) " >&6 18840 echo $ECHO_N "(cached) $ECHO_C" >&6
19529else 18841else
19530 case $PROG_VMSTAT in 18842 case $PROG_VMSTAT in
19531 [\\/]* | ?:[\\/]*) 18843 [\\/]* | ?:[\\/]*)
@@ -19540,7 +18852,7 @@ do
19540 for ac_exec_ext in '' $ac_executable_extensions; do 18852 for ac_exec_ext in '' $ac_executable_extensions; do
19541 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
19542 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"
19543 $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
19544 break 2 18856 break 2
19545 fi 18857 fi
19546done 18858done
@@ -19552,11 +18864,11 @@ esac
19552fi 18864fi
19553PROG_VMSTAT=$ac_cv_path_PROG_VMSTAT 18865PROG_VMSTAT=$ac_cv_path_PROG_VMSTAT
19554if test -n "$PROG_VMSTAT"; then 18866if test -n "$PROG_VMSTAT"; then
19555 { $as_echo "$as_me:$LINENO: result: $PROG_VMSTAT" >&5 18867 { echo "$as_me:$LINENO: result: $PROG_VMSTAT" >&5
19556$as_echo "$PROG_VMSTAT" >&6; } 18868echo "${ECHO_T}$PROG_VMSTAT" >&6; }
19557else 18869else
19558 { $as_echo "$as_me:$LINENO: result: no" >&5 18870 { echo "$as_me:$LINENO: result: no" >&5
19559$as_echo "no" >&6; } 18871echo "${ECHO_T}no" >&6; }
19560fi 18872fi
19561 18873
19562 18874
@@ -19568,10 +18880,10 @@ fi
19568 18880
19569 # 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.
19570set dummy uptime; ac_word=$2 18882set dummy uptime; ac_word=$2
19571{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18883{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19572$as_echo_n "checking for $ac_word... " >&6; } 18884echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19573if test "${ac_cv_path_PROG_UPTIME+set}" = set; then 18885if test "${ac_cv_path_PROG_UPTIME+set}" = set; then
19574 $as_echo_n "(cached) " >&6 18886 echo $ECHO_N "(cached) $ECHO_C" >&6
19575else 18887else
19576 case $PROG_UPTIME in 18888 case $PROG_UPTIME in
19577 [\\/]* | ?:[\\/]*) 18889 [\\/]* | ?:[\\/]*)
@@ -19586,7 +18898,7 @@ do
19586 for ac_exec_ext in '' $ac_executable_extensions; do 18898 for ac_exec_ext in '' $ac_executable_extensions; do
19587 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
19588 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"
19589 $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
19590 break 2 18902 break 2
19591 fi 18903 fi
19592done 18904done
@@ -19598,11 +18910,11 @@ esac
19598fi 18910fi
19599PROG_UPTIME=$ac_cv_path_PROG_UPTIME 18911PROG_UPTIME=$ac_cv_path_PROG_UPTIME
19600if test -n "$PROG_UPTIME"; then 18912if test -n "$PROG_UPTIME"; then
19601 { $as_echo "$as_me:$LINENO: result: $PROG_UPTIME" >&5 18913 { echo "$as_me:$LINENO: result: $PROG_UPTIME" >&5
19602$as_echo "$PROG_UPTIME" >&6; } 18914echo "${ECHO_T}$PROG_UPTIME" >&6; }
19603else 18915else
19604 { $as_echo "$as_me:$LINENO: result: no" >&5 18916 { echo "$as_me:$LINENO: result: no" >&5
19605$as_echo "no" >&6; } 18917echo "${ECHO_T}no" >&6; }
19606fi 18918fi
19607 18919
19608 18920
@@ -19614,10 +18926,10 @@ fi
19614 18926
19615 # 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.
19616set dummy ipcs; ac_word=$2 18928set dummy ipcs; ac_word=$2
19617{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18929{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19618$as_echo_n "checking for $ac_word... " >&6; } 18930echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19619if test "${ac_cv_path_PROG_IPCS+set}" = set; then 18931if test "${ac_cv_path_PROG_IPCS+set}" = set; then
19620 $as_echo_n "(cached) " >&6 18932 echo $ECHO_N "(cached) $ECHO_C" >&6
19621else 18933else
19622 case $PROG_IPCS in 18934 case $PROG_IPCS in
19623 [\\/]* | ?:[\\/]*) 18935 [\\/]* | ?:[\\/]*)
@@ -19632,7 +18944,7 @@ do
19632 for ac_exec_ext in '' $ac_executable_extensions; do 18944 for ac_exec_ext in '' $ac_executable_extensions; do
19633 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
19634 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"
19635 $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
19636 break 2 18948 break 2
19637 fi 18949 fi
19638done 18950done
@@ -19644,11 +18956,11 @@ esac
19644fi 18956fi
19645PROG_IPCS=$ac_cv_path_PROG_IPCS 18957PROG_IPCS=$ac_cv_path_PROG_IPCS
19646if test -n "$PROG_IPCS"; then 18958if test -n "$PROG_IPCS"; then
19647 { $as_echo "$as_me:$LINENO: result: $PROG_IPCS" >&5 18959 { echo "$as_me:$LINENO: result: $PROG_IPCS" >&5
19648$as_echo "$PROG_IPCS" >&6; } 18960echo "${ECHO_T}$PROG_IPCS" >&6; }
19649else 18961else
19650 { $as_echo "$as_me:$LINENO: result: no" >&5 18962 { echo "$as_me:$LINENO: result: no" >&5
19651$as_echo "no" >&6; } 18963echo "${ECHO_T}no" >&6; }
19652fi 18964fi
19653 18965
19654 18966
@@ -19660,10 +18972,10 @@ fi
19660 18972
19661 # 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.
19662set dummy tail; ac_word=$2 18974set dummy tail; ac_word=$2
19663{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 18975{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19664$as_echo_n "checking for $ac_word... " >&6; } 18976echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19665if test "${ac_cv_path_PROG_TAIL+set}" = set; then 18977if test "${ac_cv_path_PROG_TAIL+set}" = set; then
19666 $as_echo_n "(cached) " >&6 18978 echo $ECHO_N "(cached) $ECHO_C" >&6
19667else 18979else
19668 case $PROG_TAIL in 18980 case $PROG_TAIL in
19669 [\\/]* | ?:[\\/]*) 18981 [\\/]* | ?:[\\/]*)
@@ -19678,7 +18990,7 @@ do
19678 for ac_exec_ext in '' $ac_executable_extensions; do 18990 for ac_exec_ext in '' $ac_executable_extensions; do
19679 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
19680 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"
19681 $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
19682 break 2 18994 break 2
19683 fi 18995 fi
19684done 18996done
@@ -19690,11 +19002,11 @@ esac
19690fi 19002fi
19691PROG_TAIL=$ac_cv_path_PROG_TAIL 19003PROG_TAIL=$ac_cv_path_PROG_TAIL
19692if test -n "$PROG_TAIL"; then 19004if test -n "$PROG_TAIL"; then
19693 { $as_echo "$as_me:$LINENO: result: $PROG_TAIL" >&5 19005 { echo "$as_me:$LINENO: result: $PROG_TAIL" >&5
19694$as_echo "$PROG_TAIL" >&6; } 19006echo "${ECHO_T}$PROG_TAIL" >&6; }
19695else 19007else
19696 { $as_echo "$as_me:$LINENO: result: no" >&5 19008 { echo "$as_me:$LINENO: result: no" >&5
19697$as_echo "no" >&6; } 19009echo "${ECHO_T}no" >&6; }
19698fi 19010fi
19699 19011
19700 19012
@@ -19728,46 +19040,11 @@ if test ! -z "$SONY" ; then
19728fi 19040fi
19729 19041
19730# Check for long long datatypes 19042# Check for long long datatypes
19731{ $as_echo "$as_me:$LINENO: checking for long long" >&5 19043{ echo "$as_me:$LINENO: checking for long long" >&5
19732$as_echo_n "checking for long long... " >&6; } 19044echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
19733if test "${ac_cv_type_long_long+set}" = set; then 19045if test "${ac_cv_type_long_long+set}" = set; then
19734 $as_echo_n "(cached) " >&6 19046 echo $ECHO_N "(cached) $ECHO_C" >&6
19735else 19047else
19736 ac_cv_type_long_long=no
19737cat >conftest.$ac_ext <<_ACEOF
19738/* confdefs.h. */
19739_ACEOF
19740cat confdefs.h >>conftest.$ac_ext
19741cat >>conftest.$ac_ext <<_ACEOF
19742/* end confdefs.h. */
19743$ac_includes_default
19744int
19745main ()
19746{
19747if (sizeof (long long))
19748 return 0;
19749 ;
19750 return 0;
19751}
19752_ACEOF
19753rm -f conftest.$ac_objext
19754if { (ac_try="$ac_compile"
19755case "(($ac_try" in
19756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19757 *) ac_try_echo=$ac_try;;
19758esac
19759eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19760$as_echo "$ac_try_echo") >&5
19761 (eval "$ac_compile") 2>conftest.er1
19762 ac_status=$?
19763 grep -v '^ *+' conftest.er1 >conftest.err
19764 rm -f conftest.er1
19765 cat conftest.err >&5
19766 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19767 (exit $ac_status); } && {
19768 test -z "$ac_c_werror_flag" ||
19769 test ! -s conftest.err
19770 } && test -s conftest.$ac_objext; then
19771 cat >conftest.$ac_ext <<_ACEOF 19048 cat >conftest.$ac_ext <<_ACEOF
19772/* confdefs.h. */ 19049/* confdefs.h. */
19773_ACEOF 19050_ACEOF
@@ -19775,11 +19052,14 @@ cat confdefs.h >>conftest.$ac_ext
19775cat >>conftest.$ac_ext <<_ACEOF 19052cat >>conftest.$ac_ext <<_ACEOF
19776/* end confdefs.h. */ 19053/* end confdefs.h. */
19777$ac_includes_default 19054$ac_includes_default
19055typedef long long ac__type_new_;
19778int 19056int
19779main () 19057main ()
19780{ 19058{
19781if (sizeof ((long long))) 19059if ((ac__type_new_ *) 0)
19782 return 0; 19060 return 0;
19061if (sizeof (ac__type_new_))
19062 return 0;
19783 ; 19063 ;
19784 return 0; 19064 return 0;
19785} 19065}
@@ -19790,38 +19070,29 @@ case "(($ac_try" in
19790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19791 *) ac_try_echo=$ac_try;; 19071 *) ac_try_echo=$ac_try;;
19792esac 19072esac
19793eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19794$as_echo "$ac_try_echo") >&5
19795 (eval "$ac_compile") 2>conftest.er1 19074 (eval "$ac_compile") 2>conftest.er1
19796 ac_status=$? 19075 ac_status=$?
19797 grep -v '^ *+' conftest.er1 >conftest.err 19076 grep -v '^ *+' conftest.er1 >conftest.err
19798 rm -f conftest.er1 19077 rm -f conftest.er1
19799 cat conftest.err >&5 19078 cat conftest.err >&5
19800 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19801 (exit $ac_status); } && { 19080 (exit $ac_status); } && {
19802 test -z "$ac_c_werror_flag" || 19081 test -z "$ac_c_werror_flag" ||
19803 test ! -s conftest.err 19082 test ! -s conftest.err
19804 } && test -s conftest.$ac_objext; then 19083 } && test -s conftest.$ac_objext; then
19805 : 19084 ac_cv_type_long_long=yes
19806else 19085else
19807 $as_echo "$as_me: failed program was:" >&5 19086 echo "$as_me: failed program was:" >&5
19808sed 's/^/| /' conftest.$ac_ext >&5 19087sed 's/^/| /' conftest.$ac_ext >&5
19809 19088
19810 ac_cv_type_long_long=yes 19089 ac_cv_type_long_long=no
19811fi
19812
19813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19814else
19815 $as_echo "$as_me: failed program was:" >&5
19816sed 's/^/| /' conftest.$ac_ext >&5
19817
19818
19819fi 19090fi
19820 19091
19821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19822fi 19093fi
19823{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 19094{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
19824$as_echo "$ac_cv_type_long_long" >&6; } 19095echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
19825if test $ac_cv_type_long_long = yes; then 19096if test $ac_cv_type_long_long = yes; then
19826 19097
19827cat >>confdefs.h <<_ACEOF 19098cat >>confdefs.h <<_ACEOF
@@ -19830,46 +19101,11 @@ _ACEOF
19830 19101
19831 19102
19832fi 19103fi
19833{ $as_echo "$as_me:$LINENO: checking for unsigned long long" >&5 19104{ echo "$as_me:$LINENO: checking for unsigned long long" >&5
19834$as_echo_n "checking for unsigned long long... " >&6; } 19105echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6; }
19835if test "${ac_cv_type_unsigned_long_long+set}" = set; then 19106if test "${ac_cv_type_unsigned_long_long+set}" = set; then
19836 $as_echo_n "(cached) " >&6 19107 echo $ECHO_N "(cached) $ECHO_C" >&6
19837else 19108else
19838 ac_cv_type_unsigned_long_long=no
19839cat >conftest.$ac_ext <<_ACEOF
19840/* confdefs.h. */
19841_ACEOF
19842cat confdefs.h >>conftest.$ac_ext
19843cat >>conftest.$ac_ext <<_ACEOF
19844/* end confdefs.h. */
19845$ac_includes_default
19846int
19847main ()
19848{
19849if (sizeof (unsigned long long))
19850 return 0;
19851 ;
19852 return 0;
19853}
19854_ACEOF
19855rm -f conftest.$ac_objext
19856if { (ac_try="$ac_compile"
19857case "(($ac_try" in
19858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19859 *) ac_try_echo=$ac_try;;
19860esac
19861eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19862$as_echo "$ac_try_echo") >&5
19863 (eval "$ac_compile") 2>conftest.er1
19864 ac_status=$?
19865 grep -v '^ *+' conftest.er1 >conftest.err
19866 rm -f conftest.er1
19867 cat conftest.err >&5
19868 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19869 (exit $ac_status); } && {
19870 test -z "$ac_c_werror_flag" ||
19871 test ! -s conftest.err
19872 } && test -s conftest.$ac_objext; then
19873 cat >conftest.$ac_ext <<_ACEOF 19109 cat >conftest.$ac_ext <<_ACEOF
19874/* confdefs.h. */ 19110/* confdefs.h. */
19875_ACEOF 19111_ACEOF
@@ -19877,11 +19113,14 @@ cat confdefs.h >>conftest.$ac_ext
19877cat >>conftest.$ac_ext <<_ACEOF 19113cat >>conftest.$ac_ext <<_ACEOF
19878/* end confdefs.h. */ 19114/* end confdefs.h. */
19879$ac_includes_default 19115$ac_includes_default
19116typedef unsigned long long ac__type_new_;
19880int 19117int
19881main () 19118main ()
19882{ 19119{
19883if (sizeof ((unsigned long long))) 19120if ((ac__type_new_ *) 0)
19884 return 0; 19121 return 0;
19122if (sizeof (ac__type_new_))
19123 return 0;
19885 ; 19124 ;
19886 return 0; 19125 return 0;
19887} 19126}
@@ -19892,38 +19131,29 @@ case "(($ac_try" in
19892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19893 *) ac_try_echo=$ac_try;; 19132 *) ac_try_echo=$ac_try;;
19894esac 19133esac
19895eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19896$as_echo "$ac_try_echo") >&5
19897 (eval "$ac_compile") 2>conftest.er1 19135 (eval "$ac_compile") 2>conftest.er1
19898 ac_status=$? 19136 ac_status=$?
19899 grep -v '^ *+' conftest.er1 >conftest.err 19137 grep -v '^ *+' conftest.er1 >conftest.err
19900 rm -f conftest.er1 19138 rm -f conftest.er1
19901 cat conftest.err >&5 19139 cat conftest.err >&5
19902 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19903 (exit $ac_status); } && { 19141 (exit $ac_status); } && {
19904 test -z "$ac_c_werror_flag" || 19142 test -z "$ac_c_werror_flag" ||
19905 test ! -s conftest.err 19143 test ! -s conftest.err
19906 } && test -s conftest.$ac_objext; then 19144 } && test -s conftest.$ac_objext; then
19907 : 19145 ac_cv_type_unsigned_long_long=yes
19908else 19146else
19909 $as_echo "$as_me: failed program was:" >&5 19147 echo "$as_me: failed program was:" >&5
19910sed 's/^/| /' conftest.$ac_ext >&5 19148sed 's/^/| /' conftest.$ac_ext >&5
19911 19149
19912 ac_cv_type_unsigned_long_long=yes 19150 ac_cv_type_unsigned_long_long=no
19913fi 19151fi
19914 19152
19915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19916else
19917 $as_echo "$as_me: failed program was:" >&5
19918sed 's/^/| /' conftest.$ac_ext >&5
19919
19920
19921fi 19154fi
19922 19155{ echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5
19923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19156echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6; }
19924fi
19925{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5
19926$as_echo "$ac_cv_type_unsigned_long_long" >&6; }
19927if test $ac_cv_type_unsigned_long_long = yes; then 19157if test $ac_cv_type_unsigned_long_long = yes; then
19928 19158
19929cat >>confdefs.h <<_ACEOF 19159cat >>confdefs.h <<_ACEOF
@@ -19932,24 +19162,26 @@ _ACEOF
19932 19162
19933 19163
19934fi 19164fi
19935{ $as_echo "$as_me:$LINENO: checking for long double" >&5 19165{ echo "$as_me:$LINENO: checking for long double" >&5
19936$as_echo_n "checking for long double... " >&6; } 19166echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
19937if test "${ac_cv_type_long_double+set}" = set; then 19167if test "${ac_cv_type_long_double+set}" = set; then
19938 $as_echo_n "(cached) " >&6 19168 echo $ECHO_N "(cached) $ECHO_C" >&6
19939else 19169else
19940 ac_cv_type_long_double=no 19170 cat >conftest.$ac_ext <<_ACEOF
19941cat >conftest.$ac_ext <<_ACEOF
19942/* confdefs.h. */ 19171/* confdefs.h. */
19943_ACEOF 19172_ACEOF
19944cat confdefs.h >>conftest.$ac_ext 19173cat confdefs.h >>conftest.$ac_ext
19945cat >>conftest.$ac_ext <<_ACEOF 19174cat >>conftest.$ac_ext <<_ACEOF
19946/* end confdefs.h. */ 19175/* end confdefs.h. */
19947$ac_includes_default 19176$ac_includes_default
19177typedef long double ac__type_new_;
19948int 19178int
19949main () 19179main ()
19950{ 19180{
19951if (sizeof (long double)) 19181if ((ac__type_new_ *) 0)
19952 return 0; 19182 return 0;
19183if (sizeof (ac__type_new_))
19184 return 0;
19953 ; 19185 ;
19954 return 0; 19186 return 0;
19955} 19187}
@@ -19960,18 +19192,45 @@ case "(($ac_try" in
19960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19961 *) ac_try_echo=$ac_try;; 19193 *) ac_try_echo=$ac_try;;
19962esac 19194esac
19963eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19964$as_echo "$ac_try_echo") >&5
19965 (eval "$ac_compile") 2>conftest.er1 19196 (eval "$ac_compile") 2>conftest.er1
19966 ac_status=$? 19197 ac_status=$?
19967 grep -v '^ *+' conftest.er1 >conftest.err 19198 grep -v '^ *+' conftest.er1 >conftest.err
19968 rm -f conftest.er1 19199 rm -f conftest.er1
19969 cat conftest.err >&5 19200 cat conftest.err >&5
19970 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19971 (exit $ac_status); } && { 19202 (exit $ac_status); } && {
19972 test -z "$ac_c_werror_flag" || 19203 test -z "$ac_c_werror_flag" ||
19973 test ! -s conftest.err 19204 test ! -s conftest.err
19974 } && 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
19975 cat >conftest.$ac_ext <<_ACEOF 19234 cat >conftest.$ac_ext <<_ACEOF
19976/* confdefs.h. */ 19235/* confdefs.h. */
19977_ACEOF 19236_ACEOF
@@ -19979,11 +19238,14 @@ cat confdefs.h >>conftest.$ac_ext
19979cat >>conftest.$ac_ext <<_ACEOF 19238cat >>conftest.$ac_ext <<_ACEOF
19980/* end confdefs.h. */ 19239/* end confdefs.h. */
19981$ac_includes_default 19240$ac_includes_default
19241typedef char ac__type_new_;
19982int 19242int
19983main () 19243main ()
19984{ 19244{
19985if (sizeof ((long double))) 19245if ((ac__type_new_ *) 0)
19986 return 0; 19246 return 0;
19247if (sizeof (ac__type_new_))
19248 return 0;
19987 ; 19249 ;
19988 return 0; 19250 return 0;
19989} 19251}
@@ -19994,57 +19256,38 @@ case "(($ac_try" in
19994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19995 *) ac_try_echo=$ac_try;; 19257 *) ac_try_echo=$ac_try;;
19996esac 19258esac
19997eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19998$as_echo "$ac_try_echo") >&5
19999 (eval "$ac_compile") 2>conftest.er1 19260 (eval "$ac_compile") 2>conftest.er1
20000 ac_status=$? 19261 ac_status=$?
20001 grep -v '^ *+' conftest.er1 >conftest.err 19262 grep -v '^ *+' conftest.er1 >conftest.err
20002 rm -f conftest.er1 19263 rm -f conftest.er1
20003 cat conftest.err >&5 19264 cat conftest.err >&5
20004 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20005 (exit $ac_status); } && { 19266 (exit $ac_status); } && {
20006 test -z "$ac_c_werror_flag" || 19267 test -z "$ac_c_werror_flag" ||
20007 test ! -s conftest.err 19268 test ! -s conftest.err
20008 } && test -s conftest.$ac_objext; then 19269 } && test -s conftest.$ac_objext; then
20009 : 19270 ac_cv_type_char=yes
20010else 19271else
20011 $as_echo "$as_me: failed program was:" >&5 19272 echo "$as_me: failed program was:" >&5
20012sed 's/^/| /' conftest.$ac_ext >&5 19273sed 's/^/| /' conftest.$ac_ext >&5
20013 19274
20014 ac_cv_type_long_double=yes 19275 ac_cv_type_char=no
20015fi 19276fi
20016 19277
20017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20018else
20019 $as_echo "$as_me: failed program was:" >&5
20020sed 's/^/| /' conftest.$ac_ext >&5
20021
20022
20023fi
20024
20025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20026fi
20027{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
20028$as_echo "$ac_cv_type_long_double" >&6; }
20029if test $ac_cv_type_long_double = yes; then
20030
20031cat >>confdefs.h <<_ACEOF
20032#define HAVE_LONG_DOUBLE 1
20033_ACEOF
20034
20035
20036fi 19279fi
19280{ echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
19281echo "${ECHO_T}$ac_cv_type_char" >&6; }
20037 19282
20038
20039# Check datatype sizes
20040# 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
20041# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 19284# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
20042# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 19285# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20043# This bug is HP SR number 8606223364. 19286# This bug is HP SR number 8606223364.
20044{ $as_echo "$as_me:$LINENO: checking size of char" >&5 19287{ echo "$as_me:$LINENO: checking size of char" >&5
20045$as_echo_n "checking size of char... " >&6; } 19288echo $ECHO_N "checking size of char... $ECHO_C" >&6; }
20046if test "${ac_cv_sizeof_char+set}" = set; then 19289if test "${ac_cv_sizeof_char+set}" = set; then
20047 $as_echo_n "(cached) " >&6 19290 echo $ECHO_N "(cached) $ECHO_C" >&6
20048else 19291else
20049 if test "$cross_compiling" = yes; then 19292 if test "$cross_compiling" = yes; then
20050 # Depending upon the size, compute the lo and hi bounds. 19293 # Depending upon the size, compute the lo and hi bounds.
@@ -20055,10 +19298,11 @@ cat confdefs.h >>conftest.$ac_ext
20055cat >>conftest.$ac_ext <<_ACEOF 19298cat >>conftest.$ac_ext <<_ACEOF
20056/* end confdefs.h. */ 19299/* end confdefs.h. */
20057$ac_includes_default 19300$ac_includes_default
19301 typedef char ac__type_sizeof_;
20058int 19302int
20059main () 19303main ()
20060{ 19304{
20061static int test_array [1 - 2 * !(((long int) (sizeof (char))) >= 0)]; 19305static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
20062test_array [0] = 0 19306test_array [0] = 0
20063 19307
20064 ; 19308 ;
@@ -20071,14 +19315,13 @@ case "(($ac_try" in
20071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20072 *) ac_try_echo=$ac_try;; 19316 *) ac_try_echo=$ac_try;;
20073esac 19317esac
20074eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20075$as_echo "$ac_try_echo") >&5
20076 (eval "$ac_compile") 2>conftest.er1 19319 (eval "$ac_compile") 2>conftest.er1
20077 ac_status=$? 19320 ac_status=$?
20078 grep -v '^ *+' conftest.er1 >conftest.err 19321 grep -v '^ *+' conftest.er1 >conftest.err
20079 rm -f conftest.er1 19322 rm -f conftest.er1
20080 cat conftest.err >&5 19323 cat conftest.err >&5
20081 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20082 (exit $ac_status); } && { 19325 (exit $ac_status); } && {
20083 test -z "$ac_c_werror_flag" || 19326 test -z "$ac_c_werror_flag" ||
20084 test ! -s conftest.err 19327 test ! -s conftest.err
@@ -20092,10 +19335,11 @@ cat confdefs.h >>conftest.$ac_ext
20092cat >>conftest.$ac_ext <<_ACEOF 19335cat >>conftest.$ac_ext <<_ACEOF
20093/* end confdefs.h. */ 19336/* end confdefs.h. */
20094$ac_includes_default 19337$ac_includes_default
19338 typedef char ac__type_sizeof_;
20095int 19339int
20096main () 19340main ()
20097{ 19341{
20098static 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)];
20099test_array [0] = 0 19343test_array [0] = 0
20100 19344
20101 ; 19345 ;
@@ -20108,21 +19352,20 @@ case "(($ac_try" in
20108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20109 *) ac_try_echo=$ac_try;; 19353 *) ac_try_echo=$ac_try;;
20110esac 19354esac
20111eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20112$as_echo "$ac_try_echo") >&5
20113 (eval "$ac_compile") 2>conftest.er1 19356 (eval "$ac_compile") 2>conftest.er1
20114 ac_status=$? 19357 ac_status=$?
20115 grep -v '^ *+' conftest.er1 >conftest.err 19358 grep -v '^ *+' conftest.er1 >conftest.err
20116 rm -f conftest.er1 19359 rm -f conftest.er1
20117 cat conftest.err >&5 19360 cat conftest.err >&5
20118 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20119 (exit $ac_status); } && { 19362 (exit $ac_status); } && {
20120 test -z "$ac_c_werror_flag" || 19363 test -z "$ac_c_werror_flag" ||
20121 test ! -s conftest.err 19364 test ! -s conftest.err
20122 } && test -s conftest.$ac_objext; then 19365 } && test -s conftest.$ac_objext; then
20123 ac_hi=$ac_mid; break 19366 ac_hi=$ac_mid; break
20124else 19367else
20125 $as_echo "$as_me: failed program was:" >&5 19368 echo "$as_me: failed program was:" >&5
20126sed 's/^/| /' conftest.$ac_ext >&5 19369sed 's/^/| /' conftest.$ac_ext >&5
20127 19370
20128 ac_lo=`expr $ac_mid + 1` 19371 ac_lo=`expr $ac_mid + 1`
@@ -20136,7 +19379,7 @@ fi
20136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20137 done 19380 done
20138else 19381else
20139 $as_echo "$as_me: failed program was:" >&5 19382 echo "$as_me: failed program was:" >&5
20140sed 's/^/| /' conftest.$ac_ext >&5 19383sed 's/^/| /' conftest.$ac_ext >&5
20141 19384
20142 cat >conftest.$ac_ext <<_ACEOF 19385 cat >conftest.$ac_ext <<_ACEOF
@@ -20146,10 +19389,11 @@ cat confdefs.h >>conftest.$ac_ext
20146cat >>conftest.$ac_ext <<_ACEOF 19389cat >>conftest.$ac_ext <<_ACEOF
20147/* end confdefs.h. */ 19390/* end confdefs.h. */
20148$ac_includes_default 19391$ac_includes_default
19392 typedef char ac__type_sizeof_;
20149int 19393int
20150main () 19394main ()
20151{ 19395{
20152static int test_array [1 - 2 * !(((long int) (sizeof (char))) < 0)]; 19396static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
20153test_array [0] = 0 19397test_array [0] = 0
20154 19398
20155 ; 19399 ;
@@ -20162,14 +19406,13 @@ case "(($ac_try" in
20162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20163 *) ac_try_echo=$ac_try;; 19407 *) ac_try_echo=$ac_try;;
20164esac 19408esac
20165eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20166$as_echo "$ac_try_echo") >&5
20167 (eval "$ac_compile") 2>conftest.er1 19410 (eval "$ac_compile") 2>conftest.er1
20168 ac_status=$? 19411 ac_status=$?
20169 grep -v '^ *+' conftest.er1 >conftest.err 19412 grep -v '^ *+' conftest.er1 >conftest.err
20170 rm -f conftest.er1 19413 rm -f conftest.er1
20171 cat conftest.err >&5 19414 cat conftest.err >&5
20172 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20173 (exit $ac_status); } && { 19416 (exit $ac_status); } && {
20174 test -z "$ac_c_werror_flag" || 19417 test -z "$ac_c_werror_flag" ||
20175 test ! -s conftest.err 19418 test ! -s conftest.err
@@ -20183,10 +19426,11 @@ cat confdefs.h >>conftest.$ac_ext
20183cat >>conftest.$ac_ext <<_ACEOF 19426cat >>conftest.$ac_ext <<_ACEOF
20184/* end confdefs.h. */ 19427/* end confdefs.h. */
20185$ac_includes_default 19428$ac_includes_default
19429 typedef char ac__type_sizeof_;
20186int 19430int
20187main () 19431main ()
20188{ 19432{
20189static 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)];
20190test_array [0] = 0 19434test_array [0] = 0
20191 19435
20192 ; 19436 ;
@@ -20199,21 +19443,20 @@ case "(($ac_try" in
20199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20200 *) ac_try_echo=$ac_try;; 19444 *) ac_try_echo=$ac_try;;
20201esac 19445esac
20202eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20203$as_echo "$ac_try_echo") >&5
20204 (eval "$ac_compile") 2>conftest.er1 19447 (eval "$ac_compile") 2>conftest.er1
20205 ac_status=$? 19448 ac_status=$?
20206 grep -v '^ *+' conftest.er1 >conftest.err 19449 grep -v '^ *+' conftest.er1 >conftest.err
20207 rm -f conftest.er1 19450 rm -f conftest.er1
20208 cat conftest.err >&5 19451 cat conftest.err >&5
20209 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20210 (exit $ac_status); } && { 19453 (exit $ac_status); } && {
20211 test -z "$ac_c_werror_flag" || 19454 test -z "$ac_c_werror_flag" ||
20212 test ! -s conftest.err 19455 test ! -s conftest.err
20213 } && test -s conftest.$ac_objext; then 19456 } && test -s conftest.$ac_objext; then
20214 ac_lo=$ac_mid; break 19457 ac_lo=$ac_mid; break
20215else 19458else
20216 $as_echo "$as_me: failed program was:" >&5 19459 echo "$as_me: failed program was:" >&5
20217sed 's/^/| /' conftest.$ac_ext >&5 19460sed 's/^/| /' conftest.$ac_ext >&5
20218 19461
20219 ac_hi=`expr '(' $ac_mid ')' - 1` 19462 ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -20227,7 +19470,7 @@ fi
20227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20228 done 19471 done
20229else 19472else
20230 $as_echo "$as_me: failed program was:" >&5 19473 echo "$as_me: failed program was:" >&5
20231sed 's/^/| /' conftest.$ac_ext >&5 19474sed 's/^/| /' conftest.$ac_ext >&5
20232 19475
20233 ac_lo= ac_hi= 19476 ac_lo= ac_hi=
@@ -20247,10 +19490,11 @@ cat confdefs.h >>conftest.$ac_ext
20247cat >>conftest.$ac_ext <<_ACEOF 19490cat >>conftest.$ac_ext <<_ACEOF
20248/* end confdefs.h. */ 19491/* end confdefs.h. */
20249$ac_includes_default 19492$ac_includes_default
19493 typedef char ac__type_sizeof_;
20250int 19494int
20251main () 19495main ()
20252{ 19496{
20253static 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)];
20254test_array [0] = 0 19498test_array [0] = 0
20255 19499
20256 ; 19500 ;
@@ -20263,21 +19507,20 @@ case "(($ac_try" in
20263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20264 *) ac_try_echo=$ac_try;; 19508 *) ac_try_echo=$ac_try;;
20265esac 19509esac
20266eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20267$as_echo "$ac_try_echo") >&5
20268 (eval "$ac_compile") 2>conftest.er1 19511 (eval "$ac_compile") 2>conftest.er1
20269 ac_status=$? 19512 ac_status=$?
20270 grep -v '^ *+' conftest.er1 >conftest.err 19513 grep -v '^ *+' conftest.er1 >conftest.err
20271 rm -f conftest.er1 19514 rm -f conftest.er1
20272 cat conftest.err >&5 19515 cat conftest.err >&5
20273 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20274 (exit $ac_status); } && { 19517 (exit $ac_status); } && {
20275 test -z "$ac_c_werror_flag" || 19518 test -z "$ac_c_werror_flag" ||
20276 test ! -s conftest.err 19519 test ! -s conftest.err
20277 } && test -s conftest.$ac_objext; then 19520 } && test -s conftest.$ac_objext; then
20278 ac_hi=$ac_mid 19521 ac_hi=$ac_mid
20279else 19522else
20280 $as_echo "$as_me: failed program was:" >&5 19523 echo "$as_me: failed program was:" >&5
20281sed 's/^/| /' conftest.$ac_ext >&5 19524sed 's/^/| /' conftest.$ac_ext >&5
20282 19525
20283 ac_lo=`expr '(' $ac_mid ')' + 1` 19526 ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -20288,9 +19531,9 @@ done
20288case $ac_lo in 19531case $ac_lo in
20289?*) ac_cv_sizeof_char=$ac_lo;; 19532?*) ac_cv_sizeof_char=$ac_lo;;
20290'') if test "$ac_cv_type_char" = yes; then 19533'') if test "$ac_cv_type_char" = yes; then
20291 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (char) 19534 { { echo "$as_me:$LINENO: error: cannot compute sizeof (char)
20292See \`config.log' for more details." >&5 19535See \`config.log' for more details." >&5
20293$as_echo "$as_me: error: cannot compute sizeof (char) 19536echo "$as_me: error: cannot compute sizeof (char)
20294See \`config.log' for more details." >&2;} 19537See \`config.log' for more details." >&2;}
20295 { (exit 77); exit 77; }; } 19538 { (exit 77); exit 77; }; }
20296 else 19539 else
@@ -20305,8 +19548,9 @@ cat confdefs.h >>conftest.$ac_ext
20305cat >>conftest.$ac_ext <<_ACEOF 19548cat >>conftest.$ac_ext <<_ACEOF
20306/* end confdefs.h. */ 19549/* end confdefs.h. */
20307$ac_includes_default 19550$ac_includes_default
20308static long int longval () { return (long int) (sizeof (char)); } 19551 typedef char ac__type_sizeof_;
20309static 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_)); }
20310#include <stdio.h> 19554#include <stdio.h>
20311#include <stdlib.h> 19555#include <stdlib.h>
20312int 19556int
@@ -20316,22 +19560,20 @@ main ()
20316 FILE *f = fopen ("conftest.val", "w"); 19560 FILE *f = fopen ("conftest.val", "w");
20317 if (! f) 19561 if (! f)
20318 return 1; 19562 return 1;
20319 if (((long int) (sizeof (char))) < 0) 19563 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
20320 { 19564 {
20321 long int i = longval (); 19565 long int i = longval ();
20322 if (i != ((long int) (sizeof (char)))) 19566 if (i != ((long int) (sizeof (ac__type_sizeof_))))
20323 return 1; 19567 return 1;
20324 fprintf (f, "%ld", i); 19568 fprintf (f, "%ld\n", i);
20325 } 19569 }
20326 else 19570 else
20327 { 19571 {
20328 unsigned long int i = ulongval (); 19572 unsigned long int i = ulongval ();
20329 if (i != ((long int) (sizeof (char)))) 19573 if (i != ((long int) (sizeof (ac__type_sizeof_))))
20330 return 1; 19574 return 1;
20331 fprintf (f, "%lu", i); 19575 fprintf (f, "%lu\n", i);
20332 } 19576 }
20333 /* Do not output a trailing newline, as this causes \r\n confusion
20334 on some platforms. */
20335 return ferror (f) || fclose (f) != 0; 19577 return ferror (f) || fclose (f) != 0;
20336 19578
20337 ; 19579 ;
@@ -20344,46 +19586,43 @@ case "(($ac_try" in
20344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20345 *) ac_try_echo=$ac_try;; 19587 *) ac_try_echo=$ac_try;;
20346esac 19588esac
20347eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20348$as_echo "$ac_try_echo") >&5
20349 (eval "$ac_link") 2>&5 19590 (eval "$ac_link") 2>&5
20350 ac_status=$? 19591 ac_status=$?
20351 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20352 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 19593 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20353 { (case "(($ac_try" in 19594 { (case "(($ac_try" in
20354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20355 *) ac_try_echo=$ac_try;; 19596 *) ac_try_echo=$ac_try;;
20356esac 19597esac
20357eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20358$as_echo "$ac_try_echo") >&5
20359 (eval "$ac_try") 2>&5 19599 (eval "$ac_try") 2>&5
20360 ac_status=$? 19600 ac_status=$?
20361 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20362 (exit $ac_status); }; }; then 19602 (exit $ac_status); }; }; then
20363 ac_cv_sizeof_char=`cat conftest.val` 19603 ac_cv_sizeof_char=`cat conftest.val`
20364else 19604else
20365 $as_echo "$as_me: program exited with status $ac_status" >&5 19605 echo "$as_me: program exited with status $ac_status" >&5
20366$as_echo "$as_me: failed program was:" >&5 19606echo "$as_me: failed program was:" >&5
20367sed 's/^/| /' conftest.$ac_ext >&5 19607sed 's/^/| /' conftest.$ac_ext >&5
20368 19608
20369( exit $ac_status ) 19609( exit $ac_status )
20370if test "$ac_cv_type_char" = yes; then 19610if test "$ac_cv_type_char" = yes; then
20371 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (char) 19611 { { echo "$as_me:$LINENO: error: cannot compute sizeof (char)
20372See \`config.log' for more details." >&5 19612See \`config.log' for more details." >&5
20373$as_echo "$as_me: error: cannot compute sizeof (char) 19613echo "$as_me: error: cannot compute sizeof (char)
20374See \`config.log' for more details." >&2;} 19614See \`config.log' for more details." >&2;}
20375 { (exit 77); exit 77; }; } 19615 { (exit 77); exit 77; }; }
20376 else 19616 else
20377 ac_cv_sizeof_char=0 19617 ac_cv_sizeof_char=0
20378 fi 19618 fi
20379fi 19619fi
20380rm -rf conftest.dSYM
20381rm -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
20382fi 19621fi
20383rm -f conftest.val 19622rm -f conftest.val
20384fi 19623fi
20385{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5 19624{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
20386$as_echo "$ac_cv_sizeof_char" >&6; } 19625echo "${ECHO_T}$ac_cv_sizeof_char" >&6; }
20387 19626
20388 19627
20389 19628
@@ -20392,14 +19631,68 @@ cat >>confdefs.h <<_ACEOF
20392_ACEOF 19631_ACEOF
20393 19632
20394 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
20395# 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
20396# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 19689# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
20397# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 19690# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20398# This bug is HP SR number 8606223364. 19691# This bug is HP SR number 8606223364.
20399{ $as_echo "$as_me:$LINENO: checking size of short int" >&5 19692{ echo "$as_me:$LINENO: checking size of short int" >&5
20400$as_echo_n "checking size of short int... " >&6; } 19693echo $ECHO_N "checking size of short int... $ECHO_C" >&6; }
20401if test "${ac_cv_sizeof_short_int+set}" = set; then 19694if test "${ac_cv_sizeof_short_int+set}" = set; then
20402 $as_echo_n "(cached) " >&6 19695 echo $ECHO_N "(cached) $ECHO_C" >&6
20403else 19696else
20404 if test "$cross_compiling" = yes; then 19697 if test "$cross_compiling" = yes; then
20405 # Depending upon the size, compute the lo and hi bounds. 19698 # Depending upon the size, compute the lo and hi bounds.
@@ -20410,10 +19703,11 @@ cat confdefs.h >>conftest.$ac_ext
20410cat >>conftest.$ac_ext <<_ACEOF 19703cat >>conftest.$ac_ext <<_ACEOF
20411/* end confdefs.h. */ 19704/* end confdefs.h. */
20412$ac_includes_default 19705$ac_includes_default
19706 typedef short int ac__type_sizeof_;
20413int 19707int
20414main () 19708main ()
20415{ 19709{
20416static int test_array [1 - 2 * !(((long int) (sizeof (short int))) >= 0)]; 19710static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
20417test_array [0] = 0 19711test_array [0] = 0
20418 19712
20419 ; 19713 ;
@@ -20426,14 +19720,13 @@ case "(($ac_try" in
20426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20427 *) ac_try_echo=$ac_try;; 19721 *) ac_try_echo=$ac_try;;
20428esac 19722esac
20429eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20430$as_echo "$ac_try_echo") >&5
20431 (eval "$ac_compile") 2>conftest.er1 19724 (eval "$ac_compile") 2>conftest.er1
20432 ac_status=$? 19725 ac_status=$?
20433 grep -v '^ *+' conftest.er1 >conftest.err 19726 grep -v '^ *+' conftest.er1 >conftest.err
20434 rm -f conftest.er1 19727 rm -f conftest.er1
20435 cat conftest.err >&5 19728 cat conftest.err >&5
20436 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20437 (exit $ac_status); } && { 19730 (exit $ac_status); } && {
20438 test -z "$ac_c_werror_flag" || 19731 test -z "$ac_c_werror_flag" ||
20439 test ! -s conftest.err 19732 test ! -s conftest.err
@@ -20447,10 +19740,11 @@ cat confdefs.h >>conftest.$ac_ext
20447cat >>conftest.$ac_ext <<_ACEOF 19740cat >>conftest.$ac_ext <<_ACEOF
20448/* end confdefs.h. */ 19741/* end confdefs.h. */
20449$ac_includes_default 19742$ac_includes_default
19743 typedef short int ac__type_sizeof_;
20450int 19744int
20451main () 19745main ()
20452{ 19746{
20453static 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)];
20454test_array [0] = 0 19748test_array [0] = 0
20455 19749
20456 ; 19750 ;
@@ -20463,21 +19757,20 @@ case "(($ac_try" in
20463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20464 *) ac_try_echo=$ac_try;; 19758 *) ac_try_echo=$ac_try;;
20465esac 19759esac
20466eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20467$as_echo "$ac_try_echo") >&5
20468 (eval "$ac_compile") 2>conftest.er1 19761 (eval "$ac_compile") 2>conftest.er1
20469 ac_status=$? 19762 ac_status=$?
20470 grep -v '^ *+' conftest.er1 >conftest.err 19763 grep -v '^ *+' conftest.er1 >conftest.err
20471 rm -f conftest.er1 19764 rm -f conftest.er1
20472 cat conftest.err >&5 19765 cat conftest.err >&5
20473 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20474 (exit $ac_status); } && { 19767 (exit $ac_status); } && {
20475 test -z "$ac_c_werror_flag" || 19768 test -z "$ac_c_werror_flag" ||
20476 test ! -s conftest.err 19769 test ! -s conftest.err
20477 } && test -s conftest.$ac_objext; then 19770 } && test -s conftest.$ac_objext; then
20478 ac_hi=$ac_mid; break 19771 ac_hi=$ac_mid; break
20479else 19772else
20480 $as_echo "$as_me: failed program was:" >&5 19773 echo "$as_me: failed program was:" >&5
20481sed 's/^/| /' conftest.$ac_ext >&5 19774sed 's/^/| /' conftest.$ac_ext >&5
20482 19775
20483 ac_lo=`expr $ac_mid + 1` 19776 ac_lo=`expr $ac_mid + 1`
@@ -20491,7 +19784,7 @@ fi
20491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20492 done 19785 done
20493else 19786else
20494 $as_echo "$as_me: failed program was:" >&5 19787 echo "$as_me: failed program was:" >&5
20495sed 's/^/| /' conftest.$ac_ext >&5 19788sed 's/^/| /' conftest.$ac_ext >&5
20496 19789
20497 cat >conftest.$ac_ext <<_ACEOF 19790 cat >conftest.$ac_ext <<_ACEOF
@@ -20501,10 +19794,11 @@ cat confdefs.h >>conftest.$ac_ext
20501cat >>conftest.$ac_ext <<_ACEOF 19794cat >>conftest.$ac_ext <<_ACEOF
20502/* end confdefs.h. */ 19795/* end confdefs.h. */
20503$ac_includes_default 19796$ac_includes_default
19797 typedef short int ac__type_sizeof_;
20504int 19798int
20505main () 19799main ()
20506{ 19800{
20507static int test_array [1 - 2 * !(((long int) (sizeof (short int))) < 0)]; 19801static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
20508test_array [0] = 0 19802test_array [0] = 0
20509 19803
20510 ; 19804 ;
@@ -20517,14 +19811,13 @@ case "(($ac_try" in
20517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20518 *) ac_try_echo=$ac_try;; 19812 *) ac_try_echo=$ac_try;;
20519esac 19813esac
20520eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20521$as_echo "$ac_try_echo") >&5
20522 (eval "$ac_compile") 2>conftest.er1 19815 (eval "$ac_compile") 2>conftest.er1
20523 ac_status=$? 19816 ac_status=$?
20524 grep -v '^ *+' conftest.er1 >conftest.err 19817 grep -v '^ *+' conftest.er1 >conftest.err
20525 rm -f conftest.er1 19818 rm -f conftest.er1
20526 cat conftest.err >&5 19819 cat conftest.err >&5
20527 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20528 (exit $ac_status); } && { 19821 (exit $ac_status); } && {
20529 test -z "$ac_c_werror_flag" || 19822 test -z "$ac_c_werror_flag" ||
20530 test ! -s conftest.err 19823 test ! -s conftest.err
@@ -20538,10 +19831,11 @@ cat confdefs.h >>conftest.$ac_ext
20538cat >>conftest.$ac_ext <<_ACEOF 19831cat >>conftest.$ac_ext <<_ACEOF
20539/* end confdefs.h. */ 19832/* end confdefs.h. */
20540$ac_includes_default 19833$ac_includes_default
19834 typedef short int ac__type_sizeof_;
20541int 19835int
20542main () 19836main ()
20543{ 19837{
20544static 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)];
20545test_array [0] = 0 19839test_array [0] = 0
20546 19840
20547 ; 19841 ;
@@ -20554,21 +19848,20 @@ case "(($ac_try" in
20554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20555 *) ac_try_echo=$ac_try;; 19849 *) ac_try_echo=$ac_try;;
20556esac 19850esac
20557eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20558$as_echo "$ac_try_echo") >&5
20559 (eval "$ac_compile") 2>conftest.er1 19852 (eval "$ac_compile") 2>conftest.er1
20560 ac_status=$? 19853 ac_status=$?
20561 grep -v '^ *+' conftest.er1 >conftest.err 19854 grep -v '^ *+' conftest.er1 >conftest.err
20562 rm -f conftest.er1 19855 rm -f conftest.er1
20563 cat conftest.err >&5 19856 cat conftest.err >&5
20564 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20565 (exit $ac_status); } && { 19858 (exit $ac_status); } && {
20566 test -z "$ac_c_werror_flag" || 19859 test -z "$ac_c_werror_flag" ||
20567 test ! -s conftest.err 19860 test ! -s conftest.err
20568 } && test -s conftest.$ac_objext; then 19861 } && test -s conftest.$ac_objext; then
20569 ac_lo=$ac_mid; break 19862 ac_lo=$ac_mid; break
20570else 19863else
20571 $as_echo "$as_me: failed program was:" >&5 19864 echo "$as_me: failed program was:" >&5
20572sed 's/^/| /' conftest.$ac_ext >&5 19865sed 's/^/| /' conftest.$ac_ext >&5
20573 19866
20574 ac_hi=`expr '(' $ac_mid ')' - 1` 19867 ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -20582,7 +19875,7 @@ fi
20582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20583 done 19876 done
20584else 19877else
20585 $as_echo "$as_me: failed program was:" >&5 19878 echo "$as_me: failed program was:" >&5
20586sed 's/^/| /' conftest.$ac_ext >&5 19879sed 's/^/| /' conftest.$ac_ext >&5
20587 19880
20588 ac_lo= ac_hi= 19881 ac_lo= ac_hi=
@@ -20602,10 +19895,11 @@ cat confdefs.h >>conftest.$ac_ext
20602cat >>conftest.$ac_ext <<_ACEOF 19895cat >>conftest.$ac_ext <<_ACEOF
20603/* end confdefs.h. */ 19896/* end confdefs.h. */
20604$ac_includes_default 19897$ac_includes_default
19898 typedef short int ac__type_sizeof_;
20605int 19899int
20606main () 19900main ()
20607{ 19901{
20608static 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)];
20609test_array [0] = 0 19903test_array [0] = 0
20610 19904
20611 ; 19905 ;
@@ -20618,21 +19912,20 @@ case "(($ac_try" in
20618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20619 *) ac_try_echo=$ac_try;; 19913 *) ac_try_echo=$ac_try;;
20620esac 19914esac
20621eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20622$as_echo "$ac_try_echo") >&5
20623 (eval "$ac_compile") 2>conftest.er1 19916 (eval "$ac_compile") 2>conftest.er1
20624 ac_status=$? 19917 ac_status=$?
20625 grep -v '^ *+' conftest.er1 >conftest.err 19918 grep -v '^ *+' conftest.er1 >conftest.err
20626 rm -f conftest.er1 19919 rm -f conftest.er1
20627 cat conftest.err >&5 19920 cat conftest.err >&5
20628 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20629 (exit $ac_status); } && { 19922 (exit $ac_status); } && {
20630 test -z "$ac_c_werror_flag" || 19923 test -z "$ac_c_werror_flag" ||
20631 test ! -s conftest.err 19924 test ! -s conftest.err
20632 } && test -s conftest.$ac_objext; then 19925 } && test -s conftest.$ac_objext; then
20633 ac_hi=$ac_mid 19926 ac_hi=$ac_mid
20634else 19927else
20635 $as_echo "$as_me: failed program was:" >&5 19928 echo "$as_me: failed program was:" >&5
20636sed 's/^/| /' conftest.$ac_ext >&5 19929sed 's/^/| /' conftest.$ac_ext >&5
20637 19930
20638 ac_lo=`expr '(' $ac_mid ')' + 1` 19931 ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -20643,9 +19936,9 @@ done
20643case $ac_lo in 19936case $ac_lo in
20644?*) ac_cv_sizeof_short_int=$ac_lo;; 19937?*) ac_cv_sizeof_short_int=$ac_lo;;
20645'') if test "$ac_cv_type_short_int" = yes; then 19938'') if test "$ac_cv_type_short_int" = yes; then
20646 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short int) 19939 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short int)
20647See \`config.log' for more details." >&5 19940See \`config.log' for more details." >&5
20648$as_echo "$as_me: error: cannot compute sizeof (short int) 19941echo "$as_me: error: cannot compute sizeof (short int)
20649See \`config.log' for more details." >&2;} 19942See \`config.log' for more details." >&2;}
20650 { (exit 77); exit 77; }; } 19943 { (exit 77); exit 77; }; }
20651 else 19944 else
@@ -20660,8 +19953,9 @@ cat confdefs.h >>conftest.$ac_ext
20660cat >>conftest.$ac_ext <<_ACEOF 19953cat >>conftest.$ac_ext <<_ACEOF
20661/* end confdefs.h. */ 19954/* end confdefs.h. */
20662$ac_includes_default 19955$ac_includes_default
20663static long int longval () { return (long int) (sizeof (short int)); } 19956 typedef short int ac__type_sizeof_;
20664static 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_)); }
20665#include <stdio.h> 19959#include <stdio.h>
20666#include <stdlib.h> 19960#include <stdlib.h>
20667int 19961int
@@ -20671,22 +19965,20 @@ main ()
20671 FILE *f = fopen ("conftest.val", "w"); 19965 FILE *f = fopen ("conftest.val", "w");
20672 if (! f) 19966 if (! f)
20673 return 1; 19967 return 1;
20674 if (((long int) (sizeof (short int))) < 0) 19968 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
20675 { 19969 {
20676 long int i = longval (); 19970 long int i = longval ();
20677 if (i != ((long int) (sizeof (short int)))) 19971 if (i != ((long int) (sizeof (ac__type_sizeof_))))
20678 return 1; 19972 return 1;
20679 fprintf (f, "%ld", i); 19973 fprintf (f, "%ld\n", i);
20680 } 19974 }
20681 else 19975 else
20682 { 19976 {
20683 unsigned long int i = ulongval (); 19977 unsigned long int i = ulongval ();
20684 if (i != ((long int) (sizeof (short int)))) 19978 if (i != ((long int) (sizeof (ac__type_sizeof_))))
20685 return 1; 19979 return 1;
20686 fprintf (f, "%lu", i); 19980 fprintf (f, "%lu\n", i);
20687 } 19981 }
20688 /* Do not output a trailing newline, as this causes \r\n confusion
20689 on some platforms. */
20690 return ferror (f) || fclose (f) != 0; 19982 return ferror (f) || fclose (f) != 0;
20691 19983
20692 ; 19984 ;
@@ -20699,46 +19991,43 @@ case "(($ac_try" in
20699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 19991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20700 *) ac_try_echo=$ac_try;; 19992 *) ac_try_echo=$ac_try;;
20701esac 19993esac
20702eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 19994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20703$as_echo "$ac_try_echo") >&5
20704 (eval "$ac_link") 2>&5 19995 (eval "$ac_link") 2>&5
20705 ac_status=$? 19996 ac_status=$?
20706 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 19997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20707 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 19998 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20708 { (case "(($ac_try" in 19999 { (case "(($ac_try" in
20709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20710 *) ac_try_echo=$ac_try;; 20001 *) ac_try_echo=$ac_try;;
20711esac 20002esac
20712eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20713$as_echo "$ac_try_echo") >&5
20714 (eval "$ac_try") 2>&5 20004 (eval "$ac_try") 2>&5
20715 ac_status=$? 20005 ac_status=$?
20716 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20717 (exit $ac_status); }; }; then 20007 (exit $ac_status); }; }; then
20718 ac_cv_sizeof_short_int=`cat conftest.val` 20008 ac_cv_sizeof_short_int=`cat conftest.val`
20719else 20009else
20720 $as_echo "$as_me: program exited with status $ac_status" >&5 20010 echo "$as_me: program exited with status $ac_status" >&5
20721$as_echo "$as_me: failed program was:" >&5 20011echo "$as_me: failed program was:" >&5
20722sed 's/^/| /' conftest.$ac_ext >&5 20012sed 's/^/| /' conftest.$ac_ext >&5
20723 20013
20724( exit $ac_status ) 20014( exit $ac_status )
20725if test "$ac_cv_type_short_int" = yes; then 20015if test "$ac_cv_type_short_int" = yes; then
20726 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short int) 20016 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short int)
20727See \`config.log' for more details." >&5 20017See \`config.log' for more details." >&5
20728$as_echo "$as_me: error: cannot compute sizeof (short int) 20018echo "$as_me: error: cannot compute sizeof (short int)
20729See \`config.log' for more details." >&2;} 20019See \`config.log' for more details." >&2;}
20730 { (exit 77); exit 77; }; } 20020 { (exit 77); exit 77; }; }
20731 else 20021 else
20732 ac_cv_sizeof_short_int=0 20022 ac_cv_sizeof_short_int=0
20733 fi 20023 fi
20734fi 20024fi
20735rm -rf conftest.dSYM
20736rm -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
20737fi 20026fi
20738rm -f conftest.val 20027rm -f conftest.val
20739fi 20028fi
20740{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short_int" >&5 20029{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short_int" >&5
20741$as_echo "$ac_cv_sizeof_short_int" >&6; } 20030echo "${ECHO_T}$ac_cv_sizeof_short_int" >&6; }
20742 20031
20743 20032
20744 20033
@@ -20747,14 +20036,68 @@ cat >>confdefs.h <<_ACEOF
20747_ACEOF 20036_ACEOF
20748 20037
20749 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
20750# 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
20751# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 20094# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
20752# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 20095# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20753# This bug is HP SR number 8606223364. 20096# This bug is HP SR number 8606223364.
20754{ $as_echo "$as_me:$LINENO: checking size of int" >&5 20097{ echo "$as_me:$LINENO: checking size of int" >&5
20755$as_echo_n "checking size of int... " >&6; } 20098echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
20756if test "${ac_cv_sizeof_int+set}" = set; then 20099if test "${ac_cv_sizeof_int+set}" = set; then
20757 $as_echo_n "(cached) " >&6 20100 echo $ECHO_N "(cached) $ECHO_C" >&6
20758else 20101else
20759 if test "$cross_compiling" = yes; then 20102 if test "$cross_compiling" = yes; then
20760 # Depending upon the size, compute the lo and hi bounds. 20103 # Depending upon the size, compute the lo and hi bounds.
@@ -20765,10 +20108,11 @@ cat confdefs.h >>conftest.$ac_ext
20765cat >>conftest.$ac_ext <<_ACEOF 20108cat >>conftest.$ac_ext <<_ACEOF
20766/* end confdefs.h. */ 20109/* end confdefs.h. */
20767$ac_includes_default 20110$ac_includes_default
20111 typedef int ac__type_sizeof_;
20768int 20112int
20769main () 20113main ()
20770{ 20114{
20771static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)]; 20115static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
20772test_array [0] = 0 20116test_array [0] = 0
20773 20117
20774 ; 20118 ;
@@ -20781,14 +20125,13 @@ case "(($ac_try" in
20781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20782 *) ac_try_echo=$ac_try;; 20126 *) ac_try_echo=$ac_try;;
20783esac 20127esac
20784eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20785$as_echo "$ac_try_echo") >&5
20786 (eval "$ac_compile") 2>conftest.er1 20129 (eval "$ac_compile") 2>conftest.er1
20787 ac_status=$? 20130 ac_status=$?
20788 grep -v '^ *+' conftest.er1 >conftest.err 20131 grep -v '^ *+' conftest.er1 >conftest.err
20789 rm -f conftest.er1 20132 rm -f conftest.er1
20790 cat conftest.err >&5 20133 cat conftest.err >&5
20791 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20792 (exit $ac_status); } && { 20135 (exit $ac_status); } && {
20793 test -z "$ac_c_werror_flag" || 20136 test -z "$ac_c_werror_flag" ||
20794 test ! -s conftest.err 20137 test ! -s conftest.err
@@ -20802,10 +20145,11 @@ cat confdefs.h >>conftest.$ac_ext
20802cat >>conftest.$ac_ext <<_ACEOF 20145cat >>conftest.$ac_ext <<_ACEOF
20803/* end confdefs.h. */ 20146/* end confdefs.h. */
20804$ac_includes_default 20147$ac_includes_default
20148 typedef int ac__type_sizeof_;
20805int 20149int
20806main () 20150main ()
20807{ 20151{
20808static 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)];
20809test_array [0] = 0 20153test_array [0] = 0
20810 20154
20811 ; 20155 ;
@@ -20818,21 +20162,20 @@ case "(($ac_try" in
20818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20819 *) ac_try_echo=$ac_try;; 20163 *) ac_try_echo=$ac_try;;
20820esac 20164esac
20821eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20822$as_echo "$ac_try_echo") >&5
20823 (eval "$ac_compile") 2>conftest.er1 20166 (eval "$ac_compile") 2>conftest.er1
20824 ac_status=$? 20167 ac_status=$?
20825 grep -v '^ *+' conftest.er1 >conftest.err 20168 grep -v '^ *+' conftest.er1 >conftest.err
20826 rm -f conftest.er1 20169 rm -f conftest.er1
20827 cat conftest.err >&5 20170 cat conftest.err >&5
20828 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20829 (exit $ac_status); } && { 20172 (exit $ac_status); } && {
20830 test -z "$ac_c_werror_flag" || 20173 test -z "$ac_c_werror_flag" ||
20831 test ! -s conftest.err 20174 test ! -s conftest.err
20832 } && test -s conftest.$ac_objext; then 20175 } && test -s conftest.$ac_objext; then
20833 ac_hi=$ac_mid; break 20176 ac_hi=$ac_mid; break
20834else 20177else
20835 $as_echo "$as_me: failed program was:" >&5 20178 echo "$as_me: failed program was:" >&5
20836sed 's/^/| /' conftest.$ac_ext >&5 20179sed 's/^/| /' conftest.$ac_ext >&5
20837 20180
20838 ac_lo=`expr $ac_mid + 1` 20181 ac_lo=`expr $ac_mid + 1`
@@ -20846,7 +20189,7 @@ fi
20846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20847 done 20190 done
20848else 20191else
20849 $as_echo "$as_me: failed program was:" >&5 20192 echo "$as_me: failed program was:" >&5
20850sed 's/^/| /' conftest.$ac_ext >&5 20193sed 's/^/| /' conftest.$ac_ext >&5
20851 20194
20852 cat >conftest.$ac_ext <<_ACEOF 20195 cat >conftest.$ac_ext <<_ACEOF
@@ -20856,10 +20199,11 @@ cat confdefs.h >>conftest.$ac_ext
20856cat >>conftest.$ac_ext <<_ACEOF 20199cat >>conftest.$ac_ext <<_ACEOF
20857/* end confdefs.h. */ 20200/* end confdefs.h. */
20858$ac_includes_default 20201$ac_includes_default
20202 typedef int ac__type_sizeof_;
20859int 20203int
20860main () 20204main ()
20861{ 20205{
20862static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)]; 20206static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
20863test_array [0] = 0 20207test_array [0] = 0
20864 20208
20865 ; 20209 ;
@@ -20872,14 +20216,13 @@ case "(($ac_try" in
20872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20873 *) ac_try_echo=$ac_try;; 20217 *) ac_try_echo=$ac_try;;
20874esac 20218esac
20875eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20876$as_echo "$ac_try_echo") >&5
20877 (eval "$ac_compile") 2>conftest.er1 20220 (eval "$ac_compile") 2>conftest.er1
20878 ac_status=$? 20221 ac_status=$?
20879 grep -v '^ *+' conftest.er1 >conftest.err 20222 grep -v '^ *+' conftest.er1 >conftest.err
20880 rm -f conftest.er1 20223 rm -f conftest.er1
20881 cat conftest.err >&5 20224 cat conftest.err >&5
20882 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20883 (exit $ac_status); } && { 20226 (exit $ac_status); } && {
20884 test -z "$ac_c_werror_flag" || 20227 test -z "$ac_c_werror_flag" ||
20885 test ! -s conftest.err 20228 test ! -s conftest.err
@@ -20893,10 +20236,11 @@ cat confdefs.h >>conftest.$ac_ext
20893cat >>conftest.$ac_ext <<_ACEOF 20236cat >>conftest.$ac_ext <<_ACEOF
20894/* end confdefs.h. */ 20237/* end confdefs.h. */
20895$ac_includes_default 20238$ac_includes_default
20239 typedef int ac__type_sizeof_;
20896int 20240int
20897main () 20241main ()
20898{ 20242{
20899static 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)];
20900test_array [0] = 0 20244test_array [0] = 0
20901 20245
20902 ; 20246 ;
@@ -20909,21 +20253,20 @@ case "(($ac_try" in
20909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20910 *) ac_try_echo=$ac_try;; 20254 *) ac_try_echo=$ac_try;;
20911esac 20255esac
20912eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20913$as_echo "$ac_try_echo") >&5
20914 (eval "$ac_compile") 2>conftest.er1 20257 (eval "$ac_compile") 2>conftest.er1
20915 ac_status=$? 20258 ac_status=$?
20916 grep -v '^ *+' conftest.er1 >conftest.err 20259 grep -v '^ *+' conftest.er1 >conftest.err
20917 rm -f conftest.er1 20260 rm -f conftest.er1
20918 cat conftest.err >&5 20261 cat conftest.err >&5
20919 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20920 (exit $ac_status); } && { 20263 (exit $ac_status); } && {
20921 test -z "$ac_c_werror_flag" || 20264 test -z "$ac_c_werror_flag" ||
20922 test ! -s conftest.err 20265 test ! -s conftest.err
20923 } && test -s conftest.$ac_objext; then 20266 } && test -s conftest.$ac_objext; then
20924 ac_lo=$ac_mid; break 20267 ac_lo=$ac_mid; break
20925else 20268else
20926 $as_echo "$as_me: failed program was:" >&5 20269 echo "$as_me: failed program was:" >&5
20927sed 's/^/| /' conftest.$ac_ext >&5 20270sed 's/^/| /' conftest.$ac_ext >&5
20928 20271
20929 ac_hi=`expr '(' $ac_mid ')' - 1` 20272 ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -20937,7 +20280,7 @@ fi
20937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20938 done 20281 done
20939else 20282else
20940 $as_echo "$as_me: failed program was:" >&5 20283 echo "$as_me: failed program was:" >&5
20941sed 's/^/| /' conftest.$ac_ext >&5 20284sed 's/^/| /' conftest.$ac_ext >&5
20942 20285
20943 ac_lo= ac_hi= 20286 ac_lo= ac_hi=
@@ -20957,10 +20300,11 @@ cat confdefs.h >>conftest.$ac_ext
20957cat >>conftest.$ac_ext <<_ACEOF 20300cat >>conftest.$ac_ext <<_ACEOF
20958/* end confdefs.h. */ 20301/* end confdefs.h. */
20959$ac_includes_default 20302$ac_includes_default
20303 typedef int ac__type_sizeof_;
20960int 20304int
20961main () 20305main ()
20962{ 20306{
20963static 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)];
20964test_array [0] = 0 20308test_array [0] = 0
20965 20309
20966 ; 20310 ;
@@ -20973,21 +20317,20 @@ case "(($ac_try" in
20973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20974 *) ac_try_echo=$ac_try;; 20318 *) ac_try_echo=$ac_try;;
20975esac 20319esac
20976eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20977$as_echo "$ac_try_echo") >&5
20978 (eval "$ac_compile") 2>conftest.er1 20321 (eval "$ac_compile") 2>conftest.er1
20979 ac_status=$? 20322 ac_status=$?
20980 grep -v '^ *+' conftest.er1 >conftest.err 20323 grep -v '^ *+' conftest.er1 >conftest.err
20981 rm -f conftest.er1 20324 rm -f conftest.er1
20982 cat conftest.err >&5 20325 cat conftest.err >&5
20983 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20984 (exit $ac_status); } && { 20327 (exit $ac_status); } && {
20985 test -z "$ac_c_werror_flag" || 20328 test -z "$ac_c_werror_flag" ||
20986 test ! -s conftest.err 20329 test ! -s conftest.err
20987 } && test -s conftest.$ac_objext; then 20330 } && test -s conftest.$ac_objext; then
20988 ac_hi=$ac_mid 20331 ac_hi=$ac_mid
20989else 20332else
20990 $as_echo "$as_me: failed program was:" >&5 20333 echo "$as_me: failed program was:" >&5
20991sed 's/^/| /' conftest.$ac_ext >&5 20334sed 's/^/| /' conftest.$ac_ext >&5
20992 20335
20993 ac_lo=`expr '(' $ac_mid ')' + 1` 20336 ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -20998,9 +20341,9 @@ done
20998case $ac_lo in 20341case $ac_lo in
20999?*) ac_cv_sizeof_int=$ac_lo;; 20342?*) ac_cv_sizeof_int=$ac_lo;;
21000'') if test "$ac_cv_type_int" = yes; then 20343'') if test "$ac_cv_type_int" = yes; then
21001 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) 20344 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
21002See \`config.log' for more details." >&5 20345See \`config.log' for more details." >&5
21003$as_echo "$as_me: error: cannot compute sizeof (int) 20346echo "$as_me: error: cannot compute sizeof (int)
21004See \`config.log' for more details." >&2;} 20347See \`config.log' for more details." >&2;}
21005 { (exit 77); exit 77; }; } 20348 { (exit 77); exit 77; }; }
21006 else 20349 else
@@ -21015,8 +20358,9 @@ cat confdefs.h >>conftest.$ac_ext
21015cat >>conftest.$ac_ext <<_ACEOF 20358cat >>conftest.$ac_ext <<_ACEOF
21016/* end confdefs.h. */ 20359/* end confdefs.h. */
21017$ac_includes_default 20360$ac_includes_default
21018static long int longval () { return (long int) (sizeof (int)); } 20361 typedef int ac__type_sizeof_;
21019static 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_)); }
21020#include <stdio.h> 20364#include <stdio.h>
21021#include <stdlib.h> 20365#include <stdlib.h>
21022int 20366int
@@ -21026,22 +20370,20 @@ main ()
21026 FILE *f = fopen ("conftest.val", "w"); 20370 FILE *f = fopen ("conftest.val", "w");
21027 if (! f) 20371 if (! f)
21028 return 1; 20372 return 1;
21029 if (((long int) (sizeof (int))) < 0) 20373 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
21030 { 20374 {
21031 long int i = longval (); 20375 long int i = longval ();
21032 if (i != ((long int) (sizeof (int)))) 20376 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21033 return 1; 20377 return 1;
21034 fprintf (f, "%ld", i); 20378 fprintf (f, "%ld\n", i);
21035 } 20379 }
21036 else 20380 else
21037 { 20381 {
21038 unsigned long int i = ulongval (); 20382 unsigned long int i = ulongval ();
21039 if (i != ((long int) (sizeof (int)))) 20383 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21040 return 1; 20384 return 1;
21041 fprintf (f, "%lu", i); 20385 fprintf (f, "%lu\n", i);
21042 } 20386 }
21043 /* Do not output a trailing newline, as this causes \r\n confusion
21044 on some platforms. */
21045 return ferror (f) || fclose (f) != 0; 20387 return ferror (f) || fclose (f) != 0;
21046 20388
21047 ; 20389 ;
@@ -21054,46 +20396,43 @@ case "(($ac_try" in
21054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21055 *) ac_try_echo=$ac_try;; 20397 *) ac_try_echo=$ac_try;;
21056esac 20398esac
21057eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21058$as_echo "$ac_try_echo") >&5
21059 (eval "$ac_link") 2>&5 20400 (eval "$ac_link") 2>&5
21060 ac_status=$? 20401 ac_status=$?
21061 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21062 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 20403 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21063 { (case "(($ac_try" in 20404 { (case "(($ac_try" in
21064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21065 *) ac_try_echo=$ac_try;; 20406 *) ac_try_echo=$ac_try;;
21066esac 20407esac
21067eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21068$as_echo "$ac_try_echo") >&5
21069 (eval "$ac_try") 2>&5 20409 (eval "$ac_try") 2>&5
21070 ac_status=$? 20410 ac_status=$?
21071 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21072 (exit $ac_status); }; }; then 20412 (exit $ac_status); }; }; then
21073 ac_cv_sizeof_int=`cat conftest.val` 20413 ac_cv_sizeof_int=`cat conftest.val`
21074else 20414else
21075 $as_echo "$as_me: program exited with status $ac_status" >&5 20415 echo "$as_me: program exited with status $ac_status" >&5
21076$as_echo "$as_me: failed program was:" >&5 20416echo "$as_me: failed program was:" >&5
21077sed 's/^/| /' conftest.$ac_ext >&5 20417sed 's/^/| /' conftest.$ac_ext >&5
21078 20418
21079( exit $ac_status ) 20419( exit $ac_status )
21080if test "$ac_cv_type_int" = yes; then 20420if test "$ac_cv_type_int" = yes; then
21081 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) 20421 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
21082See \`config.log' for more details." >&5 20422See \`config.log' for more details." >&5
21083$as_echo "$as_me: error: cannot compute sizeof (int) 20423echo "$as_me: error: cannot compute sizeof (int)
21084See \`config.log' for more details." >&2;} 20424See \`config.log' for more details." >&2;}
21085 { (exit 77); exit 77; }; } 20425 { (exit 77); exit 77; }; }
21086 else 20426 else
21087 ac_cv_sizeof_int=0 20427 ac_cv_sizeof_int=0
21088 fi 20428 fi
21089fi 20429fi
21090rm -rf conftest.dSYM
21091rm -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
21092fi 20431fi
21093rm -f conftest.val 20432rm -f conftest.val
21094fi 20433fi
21095{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 20434{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
21096$as_echo "$ac_cv_sizeof_int" >&6; } 20435echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
21097 20436
21098 20437
21099 20438
@@ -21102,14 +20441,68 @@ cat >>confdefs.h <<_ACEOF
21102_ACEOF 20441_ACEOF
21103 20442
21104 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
21105# 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
21106# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 20499# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21107# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 20500# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21108# This bug is HP SR number 8606223364. 20501# This bug is HP SR number 8606223364.
21109{ $as_echo "$as_me:$LINENO: checking size of long int" >&5 20502{ echo "$as_me:$LINENO: checking size of long int" >&5
21110$as_echo_n "checking size of long int... " >&6; } 20503echo $ECHO_N "checking size of long int... $ECHO_C" >&6; }
21111if test "${ac_cv_sizeof_long_int+set}" = set; then 20504if test "${ac_cv_sizeof_long_int+set}" = set; then
21112 $as_echo_n "(cached) " >&6 20505 echo $ECHO_N "(cached) $ECHO_C" >&6
21113else 20506else
21114 if test "$cross_compiling" = yes; then 20507 if test "$cross_compiling" = yes; then
21115 # Depending upon the size, compute the lo and hi bounds. 20508 # Depending upon the size, compute the lo and hi bounds.
@@ -21120,10 +20513,11 @@ cat confdefs.h >>conftest.$ac_ext
21120cat >>conftest.$ac_ext <<_ACEOF 20513cat >>conftest.$ac_ext <<_ACEOF
21121/* end confdefs.h. */ 20514/* end confdefs.h. */
21122$ac_includes_default 20515$ac_includes_default
20516 typedef long int ac__type_sizeof_;
21123int 20517int
21124main () 20518main ()
21125{ 20519{
21126static int test_array [1 - 2 * !(((long int) (sizeof (long int))) >= 0)]; 20520static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
21127test_array [0] = 0 20521test_array [0] = 0
21128 20522
21129 ; 20523 ;
@@ -21136,14 +20530,13 @@ case "(($ac_try" in
21136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21137 *) ac_try_echo=$ac_try;; 20531 *) ac_try_echo=$ac_try;;
21138esac 20532esac
21139eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21140$as_echo "$ac_try_echo") >&5
21141 (eval "$ac_compile") 2>conftest.er1 20534 (eval "$ac_compile") 2>conftest.er1
21142 ac_status=$? 20535 ac_status=$?
21143 grep -v '^ *+' conftest.er1 >conftest.err 20536 grep -v '^ *+' conftest.er1 >conftest.err
21144 rm -f conftest.er1 20537 rm -f conftest.er1
21145 cat conftest.err >&5 20538 cat conftest.err >&5
21146 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21147 (exit $ac_status); } && { 20540 (exit $ac_status); } && {
21148 test -z "$ac_c_werror_flag" || 20541 test -z "$ac_c_werror_flag" ||
21149 test ! -s conftest.err 20542 test ! -s conftest.err
@@ -21157,10 +20550,11 @@ cat confdefs.h >>conftest.$ac_ext
21157cat >>conftest.$ac_ext <<_ACEOF 20550cat >>conftest.$ac_ext <<_ACEOF
21158/* end confdefs.h. */ 20551/* end confdefs.h. */
21159$ac_includes_default 20552$ac_includes_default
20553 typedef long int ac__type_sizeof_;
21160int 20554int
21161main () 20555main ()
21162{ 20556{
21163static 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)];
21164test_array [0] = 0 20558test_array [0] = 0
21165 20559
21166 ; 20560 ;
@@ -21173,21 +20567,20 @@ case "(($ac_try" in
21173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21174 *) ac_try_echo=$ac_try;; 20568 *) ac_try_echo=$ac_try;;
21175esac 20569esac
21176eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21177$as_echo "$ac_try_echo") >&5
21178 (eval "$ac_compile") 2>conftest.er1 20571 (eval "$ac_compile") 2>conftest.er1
21179 ac_status=$? 20572 ac_status=$?
21180 grep -v '^ *+' conftest.er1 >conftest.err 20573 grep -v '^ *+' conftest.er1 >conftest.err
21181 rm -f conftest.er1 20574 rm -f conftest.er1
21182 cat conftest.err >&5 20575 cat conftest.err >&5
21183 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21184 (exit $ac_status); } && { 20577 (exit $ac_status); } && {
21185 test -z "$ac_c_werror_flag" || 20578 test -z "$ac_c_werror_flag" ||
21186 test ! -s conftest.err 20579 test ! -s conftest.err
21187 } && test -s conftest.$ac_objext; then 20580 } && test -s conftest.$ac_objext; then
21188 ac_hi=$ac_mid; break 20581 ac_hi=$ac_mid; break
21189else 20582else
21190 $as_echo "$as_me: failed program was:" >&5 20583 echo "$as_me: failed program was:" >&5
21191sed 's/^/| /' conftest.$ac_ext >&5 20584sed 's/^/| /' conftest.$ac_ext >&5
21192 20585
21193 ac_lo=`expr $ac_mid + 1` 20586 ac_lo=`expr $ac_mid + 1`
@@ -21201,7 +20594,7 @@ fi
21201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21202 done 20595 done
21203else 20596else
21204 $as_echo "$as_me: failed program was:" >&5 20597 echo "$as_me: failed program was:" >&5
21205sed 's/^/| /' conftest.$ac_ext >&5 20598sed 's/^/| /' conftest.$ac_ext >&5
21206 20599
21207 cat >conftest.$ac_ext <<_ACEOF 20600 cat >conftest.$ac_ext <<_ACEOF
@@ -21211,10 +20604,11 @@ cat confdefs.h >>conftest.$ac_ext
21211cat >>conftest.$ac_ext <<_ACEOF 20604cat >>conftest.$ac_ext <<_ACEOF
21212/* end confdefs.h. */ 20605/* end confdefs.h. */
21213$ac_includes_default 20606$ac_includes_default
20607 typedef long int ac__type_sizeof_;
21214int 20608int
21215main () 20609main ()
21216{ 20610{
21217static int test_array [1 - 2 * !(((long int) (sizeof (long int))) < 0)]; 20611static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
21218test_array [0] = 0 20612test_array [0] = 0
21219 20613
21220 ; 20614 ;
@@ -21227,14 +20621,13 @@ case "(($ac_try" in
21227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21228 *) ac_try_echo=$ac_try;; 20622 *) ac_try_echo=$ac_try;;
21229esac 20623esac
21230eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21231$as_echo "$ac_try_echo") >&5
21232 (eval "$ac_compile") 2>conftest.er1 20625 (eval "$ac_compile") 2>conftest.er1
21233 ac_status=$? 20626 ac_status=$?
21234 grep -v '^ *+' conftest.er1 >conftest.err 20627 grep -v '^ *+' conftest.er1 >conftest.err
21235 rm -f conftest.er1 20628 rm -f conftest.er1
21236 cat conftest.err >&5 20629 cat conftest.err >&5
21237 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21238 (exit $ac_status); } && { 20631 (exit $ac_status); } && {
21239 test -z "$ac_c_werror_flag" || 20632 test -z "$ac_c_werror_flag" ||
21240 test ! -s conftest.err 20633 test ! -s conftest.err
@@ -21248,10 +20641,11 @@ cat confdefs.h >>conftest.$ac_ext
21248cat >>conftest.$ac_ext <<_ACEOF 20641cat >>conftest.$ac_ext <<_ACEOF
21249/* end confdefs.h. */ 20642/* end confdefs.h. */
21250$ac_includes_default 20643$ac_includes_default
20644 typedef long int ac__type_sizeof_;
21251int 20645int
21252main () 20646main ()
21253{ 20647{
21254static 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)];
21255test_array [0] = 0 20649test_array [0] = 0
21256 20650
21257 ; 20651 ;
@@ -21264,21 +20658,20 @@ case "(($ac_try" in
21264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21265 *) ac_try_echo=$ac_try;; 20659 *) ac_try_echo=$ac_try;;
21266esac 20660esac
21267eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21268$as_echo "$ac_try_echo") >&5
21269 (eval "$ac_compile") 2>conftest.er1 20662 (eval "$ac_compile") 2>conftest.er1
21270 ac_status=$? 20663 ac_status=$?
21271 grep -v '^ *+' conftest.er1 >conftest.err 20664 grep -v '^ *+' conftest.er1 >conftest.err
21272 rm -f conftest.er1 20665 rm -f conftest.er1
21273 cat conftest.err >&5 20666 cat conftest.err >&5
21274 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21275 (exit $ac_status); } && { 20668 (exit $ac_status); } && {
21276 test -z "$ac_c_werror_flag" || 20669 test -z "$ac_c_werror_flag" ||
21277 test ! -s conftest.err 20670 test ! -s conftest.err
21278 } && test -s conftest.$ac_objext; then 20671 } && test -s conftest.$ac_objext; then
21279 ac_lo=$ac_mid; break 20672 ac_lo=$ac_mid; break
21280else 20673else
21281 $as_echo "$as_me: failed program was:" >&5 20674 echo "$as_me: failed program was:" >&5
21282sed 's/^/| /' conftest.$ac_ext >&5 20675sed 's/^/| /' conftest.$ac_ext >&5
21283 20676
21284 ac_hi=`expr '(' $ac_mid ')' - 1` 20677 ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -21292,7 +20685,7 @@ fi
21292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21293 done 20686 done
21294else 20687else
21295 $as_echo "$as_me: failed program was:" >&5 20688 echo "$as_me: failed program was:" >&5
21296sed 's/^/| /' conftest.$ac_ext >&5 20689sed 's/^/| /' conftest.$ac_ext >&5
21297 20690
21298 ac_lo= ac_hi= 20691 ac_lo= ac_hi=
@@ -21312,10 +20705,11 @@ cat confdefs.h >>conftest.$ac_ext
21312cat >>conftest.$ac_ext <<_ACEOF 20705cat >>conftest.$ac_ext <<_ACEOF
21313/* end confdefs.h. */ 20706/* end confdefs.h. */
21314$ac_includes_default 20707$ac_includes_default
20708 typedef long int ac__type_sizeof_;
21315int 20709int
21316main () 20710main ()
21317{ 20711{
21318static 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)];
21319test_array [0] = 0 20713test_array [0] = 0
21320 20714
21321 ; 20715 ;
@@ -21328,21 +20722,20 @@ case "(($ac_try" in
21328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21329 *) ac_try_echo=$ac_try;; 20723 *) ac_try_echo=$ac_try;;
21330esac 20724esac
21331eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21332$as_echo "$ac_try_echo") >&5
21333 (eval "$ac_compile") 2>conftest.er1 20726 (eval "$ac_compile") 2>conftest.er1
21334 ac_status=$? 20727 ac_status=$?
21335 grep -v '^ *+' conftest.er1 >conftest.err 20728 grep -v '^ *+' conftest.er1 >conftest.err
21336 rm -f conftest.er1 20729 rm -f conftest.er1
21337 cat conftest.err >&5 20730 cat conftest.err >&5
21338 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21339 (exit $ac_status); } && { 20732 (exit $ac_status); } && {
21340 test -z "$ac_c_werror_flag" || 20733 test -z "$ac_c_werror_flag" ||
21341 test ! -s conftest.err 20734 test ! -s conftest.err
21342 } && test -s conftest.$ac_objext; then 20735 } && test -s conftest.$ac_objext; then
21343 ac_hi=$ac_mid 20736 ac_hi=$ac_mid
21344else 20737else
21345 $as_echo "$as_me: failed program was:" >&5 20738 echo "$as_me: failed program was:" >&5
21346sed 's/^/| /' conftest.$ac_ext >&5 20739sed 's/^/| /' conftest.$ac_ext >&5
21347 20740
21348 ac_lo=`expr '(' $ac_mid ')' + 1` 20741 ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -21353,9 +20746,9 @@ done
21353case $ac_lo in 20746case $ac_lo in
21354?*) ac_cv_sizeof_long_int=$ac_lo;; 20747?*) ac_cv_sizeof_long_int=$ac_lo;;
21355'') if test "$ac_cv_type_long_int" = yes; then 20748'') if test "$ac_cv_type_long_int" = yes; then
21356 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long int) 20749 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int)
21357See \`config.log' for more details." >&5 20750See \`config.log' for more details." >&5
21358$as_echo "$as_me: error: cannot compute sizeof (long int) 20751echo "$as_me: error: cannot compute sizeof (long int)
21359See \`config.log' for more details." >&2;} 20752See \`config.log' for more details." >&2;}
21360 { (exit 77); exit 77; }; } 20753 { (exit 77); exit 77; }; }
21361 else 20754 else
@@ -21370,8 +20763,9 @@ cat confdefs.h >>conftest.$ac_ext
21370cat >>conftest.$ac_ext <<_ACEOF 20763cat >>conftest.$ac_ext <<_ACEOF
21371/* end confdefs.h. */ 20764/* end confdefs.h. */
21372$ac_includes_default 20765$ac_includes_default
21373static long int longval () { return (long int) (sizeof (long int)); } 20766 typedef long int ac__type_sizeof_;
21374static 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_)); }
21375#include <stdio.h> 20769#include <stdio.h>
21376#include <stdlib.h> 20770#include <stdlib.h>
21377int 20771int
@@ -21381,22 +20775,20 @@ main ()
21381 FILE *f = fopen ("conftest.val", "w"); 20775 FILE *f = fopen ("conftest.val", "w");
21382 if (! f) 20776 if (! f)
21383 return 1; 20777 return 1;
21384 if (((long int) (sizeof (long int))) < 0) 20778 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
21385 { 20779 {
21386 long int i = longval (); 20780 long int i = longval ();
21387 if (i != ((long int) (sizeof (long int)))) 20781 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21388 return 1; 20782 return 1;
21389 fprintf (f, "%ld", i); 20783 fprintf (f, "%ld\n", i);
21390 } 20784 }
21391 else 20785 else
21392 { 20786 {
21393 unsigned long int i = ulongval (); 20787 unsigned long int i = ulongval ();
21394 if (i != ((long int) (sizeof (long int)))) 20788 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21395 return 1; 20789 return 1;
21396 fprintf (f, "%lu", i); 20790 fprintf (f, "%lu\n", i);
21397 } 20791 }
21398 /* Do not output a trailing newline, as this causes \r\n confusion
21399 on some platforms. */
21400 return ferror (f) || fclose (f) != 0; 20792 return ferror (f) || fclose (f) != 0;
21401 20793
21402 ; 20794 ;
@@ -21409,46 +20801,43 @@ case "(($ac_try" in
21409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21410 *) ac_try_echo=$ac_try;; 20802 *) ac_try_echo=$ac_try;;
21411esac 20803esac
21412eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21413$as_echo "$ac_try_echo") >&5
21414 (eval "$ac_link") 2>&5 20805 (eval "$ac_link") 2>&5
21415 ac_status=$? 20806 ac_status=$?
21416 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21417 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 20808 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21418 { (case "(($ac_try" in 20809 { (case "(($ac_try" in
21419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21420 *) ac_try_echo=$ac_try;; 20811 *) ac_try_echo=$ac_try;;
21421esac 20812esac
21422eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21423$as_echo "$ac_try_echo") >&5
21424 (eval "$ac_try") 2>&5 20814 (eval "$ac_try") 2>&5
21425 ac_status=$? 20815 ac_status=$?
21426 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21427 (exit $ac_status); }; }; then 20817 (exit $ac_status); }; }; then
21428 ac_cv_sizeof_long_int=`cat conftest.val` 20818 ac_cv_sizeof_long_int=`cat conftest.val`
21429else 20819else
21430 $as_echo "$as_me: program exited with status $ac_status" >&5 20820 echo "$as_me: program exited with status $ac_status" >&5
21431$as_echo "$as_me: failed program was:" >&5 20821echo "$as_me: failed program was:" >&5
21432sed 's/^/| /' conftest.$ac_ext >&5 20822sed 's/^/| /' conftest.$ac_ext >&5
21433 20823
21434( exit $ac_status ) 20824( exit $ac_status )
21435if test "$ac_cv_type_long_int" = yes; then 20825if test "$ac_cv_type_long_int" = yes; then
21436 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long int) 20826 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int)
21437See \`config.log' for more details." >&5 20827See \`config.log' for more details." >&5
21438$as_echo "$as_me: error: cannot compute sizeof (long int) 20828echo "$as_me: error: cannot compute sizeof (long int)
21439See \`config.log' for more details." >&2;} 20829See \`config.log' for more details." >&2;}
21440 { (exit 77); exit 77; }; } 20830 { (exit 77); exit 77; }; }
21441 else 20831 else
21442 ac_cv_sizeof_long_int=0 20832 ac_cv_sizeof_long_int=0
21443 fi 20833 fi
21444fi 20834fi
21445rm -rf conftest.dSYM
21446rm -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
21447fi 20836fi
21448rm -f conftest.val 20837rm -f conftest.val
21449fi 20838fi
21450{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5 20839{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5
21451$as_echo "$ac_cv_sizeof_long_int" >&6; } 20840echo "${ECHO_T}$ac_cv_sizeof_long_int" >&6; }
21452 20841
21453 20842
21454 20843
@@ -21457,14 +20846,68 @@ cat >>confdefs.h <<_ACEOF
21457_ACEOF 20846_ACEOF
21458 20847
21459 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
21460# 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
21461# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 20904# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21462# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 20905# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21463# This bug is HP SR number 8606223364. 20906# This bug is HP SR number 8606223364.
21464{ $as_echo "$as_me:$LINENO: checking size of long long int" >&5 20907{ echo "$as_me:$LINENO: checking size of long long int" >&5
21465$as_echo_n "checking size of long long int... " >&6; } 20908echo $ECHO_N "checking size of long long int... $ECHO_C" >&6; }
21466if test "${ac_cv_sizeof_long_long_int+set}" = set; then 20909if test "${ac_cv_sizeof_long_long_int+set}" = set; then
21467 $as_echo_n "(cached) " >&6 20910 echo $ECHO_N "(cached) $ECHO_C" >&6
21468else 20911else
21469 if test "$cross_compiling" = yes; then 20912 if test "$cross_compiling" = yes; then
21470 # Depending upon the size, compute the lo and hi bounds. 20913 # Depending upon the size, compute the lo and hi bounds.
@@ -21475,10 +20918,11 @@ cat confdefs.h >>conftest.$ac_ext
21475cat >>conftest.$ac_ext <<_ACEOF 20918cat >>conftest.$ac_ext <<_ACEOF
21476/* end confdefs.h. */ 20919/* end confdefs.h. */
21477$ac_includes_default 20920$ac_includes_default
20921 typedef long long int ac__type_sizeof_;
21478int 20922int
21479main () 20923main ()
21480{ 20924{
21481static 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)];
21482test_array [0] = 0 20926test_array [0] = 0
21483 20927
21484 ; 20928 ;
@@ -21491,14 +20935,13 @@ case "(($ac_try" in
21491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21492 *) ac_try_echo=$ac_try;; 20936 *) ac_try_echo=$ac_try;;
21493esac 20937esac
21494eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21495$as_echo "$ac_try_echo") >&5
21496 (eval "$ac_compile") 2>conftest.er1 20939 (eval "$ac_compile") 2>conftest.er1
21497 ac_status=$? 20940 ac_status=$?
21498 grep -v '^ *+' conftest.er1 >conftest.err 20941 grep -v '^ *+' conftest.er1 >conftest.err
21499 rm -f conftest.er1 20942 rm -f conftest.er1
21500 cat conftest.err >&5 20943 cat conftest.err >&5
21501 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21502 (exit $ac_status); } && { 20945 (exit $ac_status); } && {
21503 test -z "$ac_c_werror_flag" || 20946 test -z "$ac_c_werror_flag" ||
21504 test ! -s conftest.err 20947 test ! -s conftest.err
@@ -21512,10 +20955,11 @@ cat confdefs.h >>conftest.$ac_ext
21512cat >>conftest.$ac_ext <<_ACEOF 20955cat >>conftest.$ac_ext <<_ACEOF
21513/* end confdefs.h. */ 20956/* end confdefs.h. */
21514$ac_includes_default 20957$ac_includes_default
20958 typedef long long int ac__type_sizeof_;
21515int 20959int
21516main () 20960main ()
21517{ 20961{
21518static 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)];
21519test_array [0] = 0 20963test_array [0] = 0
21520 20964
21521 ; 20965 ;
@@ -21528,21 +20972,20 @@ case "(($ac_try" in
21528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 20972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21529 *) ac_try_echo=$ac_try;; 20973 *) ac_try_echo=$ac_try;;
21530esac 20974esac
21531eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 20975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21532$as_echo "$ac_try_echo") >&5
21533 (eval "$ac_compile") 2>conftest.er1 20976 (eval "$ac_compile") 2>conftest.er1
21534 ac_status=$? 20977 ac_status=$?
21535 grep -v '^ *+' conftest.er1 >conftest.err 20978 grep -v '^ *+' conftest.er1 >conftest.err
21536 rm -f conftest.er1 20979 rm -f conftest.er1
21537 cat conftest.err >&5 20980 cat conftest.err >&5
21538 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 20981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21539 (exit $ac_status); } && { 20982 (exit $ac_status); } && {
21540 test -z "$ac_c_werror_flag" || 20983 test -z "$ac_c_werror_flag" ||
21541 test ! -s conftest.err 20984 test ! -s conftest.err
21542 } && test -s conftest.$ac_objext; then 20985 } && test -s conftest.$ac_objext; then
21543 ac_hi=$ac_mid; break 20986 ac_hi=$ac_mid; break
21544else 20987else
21545 $as_echo "$as_me: failed program was:" >&5 20988 echo "$as_me: failed program was:" >&5
21546sed 's/^/| /' conftest.$ac_ext >&5 20989sed 's/^/| /' conftest.$ac_ext >&5
21547 20990
21548 ac_lo=`expr $ac_mid + 1` 20991 ac_lo=`expr $ac_mid + 1`
@@ -21556,7 +20999,7 @@ fi
21556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21557 done 21000 done
21558else 21001else
21559 $as_echo "$as_me: failed program was:" >&5 21002 echo "$as_me: failed program was:" >&5
21560sed 's/^/| /' conftest.$ac_ext >&5 21003sed 's/^/| /' conftest.$ac_ext >&5
21561 21004
21562 cat >conftest.$ac_ext <<_ACEOF 21005 cat >conftest.$ac_ext <<_ACEOF
@@ -21566,10 +21009,11 @@ cat confdefs.h >>conftest.$ac_ext
21566cat >>conftest.$ac_ext <<_ACEOF 21009cat >>conftest.$ac_ext <<_ACEOF
21567/* end confdefs.h. */ 21010/* end confdefs.h. */
21568$ac_includes_default 21011$ac_includes_default
21012 typedef long long int ac__type_sizeof_;
21569int 21013int
21570main () 21014main ()
21571{ 21015{
21572static 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)];
21573test_array [0] = 0 21017test_array [0] = 0
21574 21018
21575 ; 21019 ;
@@ -21582,14 +21026,13 @@ case "(($ac_try" in
21582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21583 *) ac_try_echo=$ac_try;; 21027 *) ac_try_echo=$ac_try;;
21584esac 21028esac
21585eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21586$as_echo "$ac_try_echo") >&5
21587 (eval "$ac_compile") 2>conftest.er1 21030 (eval "$ac_compile") 2>conftest.er1
21588 ac_status=$? 21031 ac_status=$?
21589 grep -v '^ *+' conftest.er1 >conftest.err 21032 grep -v '^ *+' conftest.er1 >conftest.err
21590 rm -f conftest.er1 21033 rm -f conftest.er1
21591 cat conftest.err >&5 21034 cat conftest.err >&5
21592 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21593 (exit $ac_status); } && { 21036 (exit $ac_status); } && {
21594 test -z "$ac_c_werror_flag" || 21037 test -z "$ac_c_werror_flag" ||
21595 test ! -s conftest.err 21038 test ! -s conftest.err
@@ -21603,10 +21046,11 @@ cat confdefs.h >>conftest.$ac_ext
21603cat >>conftest.$ac_ext <<_ACEOF 21046cat >>conftest.$ac_ext <<_ACEOF
21604/* end confdefs.h. */ 21047/* end confdefs.h. */
21605$ac_includes_default 21048$ac_includes_default
21049 typedef long long int ac__type_sizeof_;
21606int 21050int
21607main () 21051main ()
21608{ 21052{
21609static 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)];
21610test_array [0] = 0 21054test_array [0] = 0
21611 21055
21612 ; 21056 ;
@@ -21619,21 +21063,20 @@ case "(($ac_try" in
21619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21620 *) ac_try_echo=$ac_try;; 21064 *) ac_try_echo=$ac_try;;
21621esac 21065esac
21622eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21623$as_echo "$ac_try_echo") >&5
21624 (eval "$ac_compile") 2>conftest.er1 21067 (eval "$ac_compile") 2>conftest.er1
21625 ac_status=$? 21068 ac_status=$?
21626 grep -v '^ *+' conftest.er1 >conftest.err 21069 grep -v '^ *+' conftest.er1 >conftest.err
21627 rm -f conftest.er1 21070 rm -f conftest.er1
21628 cat conftest.err >&5 21071 cat conftest.err >&5
21629 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21630 (exit $ac_status); } && { 21073 (exit $ac_status); } && {
21631 test -z "$ac_c_werror_flag" || 21074 test -z "$ac_c_werror_flag" ||
21632 test ! -s conftest.err 21075 test ! -s conftest.err
21633 } && test -s conftest.$ac_objext; then 21076 } && test -s conftest.$ac_objext; then
21634 ac_lo=$ac_mid; break 21077 ac_lo=$ac_mid; break
21635else 21078else
21636 $as_echo "$as_me: failed program was:" >&5 21079 echo "$as_me: failed program was:" >&5
21637sed 's/^/| /' conftest.$ac_ext >&5 21080sed 's/^/| /' conftest.$ac_ext >&5
21638 21081
21639 ac_hi=`expr '(' $ac_mid ')' - 1` 21082 ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -21647,7 +21090,7 @@ fi
21647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21648 done 21091 done
21649else 21092else
21650 $as_echo "$as_me: failed program was:" >&5 21093 echo "$as_me: failed program was:" >&5
21651sed 's/^/| /' conftest.$ac_ext >&5 21094sed 's/^/| /' conftest.$ac_ext >&5
21652 21095
21653 ac_lo= ac_hi= 21096 ac_lo= ac_hi=
@@ -21667,10 +21110,11 @@ cat confdefs.h >>conftest.$ac_ext
21667cat >>conftest.$ac_ext <<_ACEOF 21110cat >>conftest.$ac_ext <<_ACEOF
21668/* end confdefs.h. */ 21111/* end confdefs.h. */
21669$ac_includes_default 21112$ac_includes_default
21113 typedef long long int ac__type_sizeof_;
21670int 21114int
21671main () 21115main ()
21672{ 21116{
21673static 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)];
21674test_array [0] = 0 21118test_array [0] = 0
21675 21119
21676 ; 21120 ;
@@ -21683,21 +21127,20 @@ case "(($ac_try" in
21683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21684 *) ac_try_echo=$ac_try;; 21128 *) ac_try_echo=$ac_try;;
21685esac 21129esac
21686eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21687$as_echo "$ac_try_echo") >&5
21688 (eval "$ac_compile") 2>conftest.er1 21131 (eval "$ac_compile") 2>conftest.er1
21689 ac_status=$? 21132 ac_status=$?
21690 grep -v '^ *+' conftest.er1 >conftest.err 21133 grep -v '^ *+' conftest.er1 >conftest.err
21691 rm -f conftest.er1 21134 rm -f conftest.er1
21692 cat conftest.err >&5 21135 cat conftest.err >&5
21693 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21694 (exit $ac_status); } && { 21137 (exit $ac_status); } && {
21695 test -z "$ac_c_werror_flag" || 21138 test -z "$ac_c_werror_flag" ||
21696 test ! -s conftest.err 21139 test ! -s conftest.err
21697 } && test -s conftest.$ac_objext; then 21140 } && test -s conftest.$ac_objext; then
21698 ac_hi=$ac_mid 21141 ac_hi=$ac_mid
21699else 21142else
21700 $as_echo "$as_me: failed program was:" >&5 21143 echo "$as_me: failed program was:" >&5
21701sed 's/^/| /' conftest.$ac_ext >&5 21144sed 's/^/| /' conftest.$ac_ext >&5
21702 21145
21703 ac_lo=`expr '(' $ac_mid ')' + 1` 21146 ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -21708,9 +21151,9 @@ done
21708case $ac_lo in 21151case $ac_lo in
21709?*) ac_cv_sizeof_long_long_int=$ac_lo;; 21152?*) ac_cv_sizeof_long_long_int=$ac_lo;;
21710'') if test "$ac_cv_type_long_long_int" = yes; then 21153'') if test "$ac_cv_type_long_long_int" = yes; then
21711 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long int) 21154 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int)
21712See \`config.log' for more details." >&5 21155See \`config.log' for more details." >&5
21713$as_echo "$as_me: error: cannot compute sizeof (long long int) 21156echo "$as_me: error: cannot compute sizeof (long long int)
21714See \`config.log' for more details." >&2;} 21157See \`config.log' for more details." >&2;}
21715 { (exit 77); exit 77; }; } 21158 { (exit 77); exit 77; }; }
21716 else 21159 else
@@ -21725,8 +21168,9 @@ cat confdefs.h >>conftest.$ac_ext
21725cat >>conftest.$ac_ext <<_ACEOF 21168cat >>conftest.$ac_ext <<_ACEOF
21726/* end confdefs.h. */ 21169/* end confdefs.h. */
21727$ac_includes_default 21170$ac_includes_default
21728static long int longval () { return (long int) (sizeof (long long int)); } 21171 typedef long long int ac__type_sizeof_;
21729static 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_)); }
21730#include <stdio.h> 21174#include <stdio.h>
21731#include <stdlib.h> 21175#include <stdlib.h>
21732int 21176int
@@ -21736,22 +21180,20 @@ main ()
21736 FILE *f = fopen ("conftest.val", "w"); 21180 FILE *f = fopen ("conftest.val", "w");
21737 if (! f) 21181 if (! f)
21738 return 1; 21182 return 1;
21739 if (((long int) (sizeof (long long int))) < 0) 21183 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
21740 { 21184 {
21741 long int i = longval (); 21185 long int i = longval ();
21742 if (i != ((long int) (sizeof (long long int)))) 21186 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21743 return 1; 21187 return 1;
21744 fprintf (f, "%ld", i); 21188 fprintf (f, "%ld\n", i);
21745 } 21189 }
21746 else 21190 else
21747 { 21191 {
21748 unsigned long int i = ulongval (); 21192 unsigned long int i = ulongval ();
21749 if (i != ((long int) (sizeof (long long int)))) 21193 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21750 return 1; 21194 return 1;
21751 fprintf (f, "%lu", i); 21195 fprintf (f, "%lu\n", i);
21752 } 21196 }
21753 /* Do not output a trailing newline, as this causes \r\n confusion
21754 on some platforms. */
21755 return ferror (f) || fclose (f) != 0; 21197 return ferror (f) || fclose (f) != 0;
21756 21198
21757 ; 21199 ;
@@ -21764,46 +21206,43 @@ case "(($ac_try" in
21764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21765 *) ac_try_echo=$ac_try;; 21207 *) ac_try_echo=$ac_try;;
21766esac 21208esac
21767eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21768$as_echo "$ac_try_echo") >&5
21769 (eval "$ac_link") 2>&5 21210 (eval "$ac_link") 2>&5
21770 ac_status=$? 21211 ac_status=$?
21771 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21772 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 21213 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21773 { (case "(($ac_try" in 21214 { (case "(($ac_try" in
21774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21775 *) ac_try_echo=$ac_try;; 21216 *) ac_try_echo=$ac_try;;
21776esac 21217esac
21777eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21778$as_echo "$ac_try_echo") >&5
21779 (eval "$ac_try") 2>&5 21219 (eval "$ac_try") 2>&5
21780 ac_status=$? 21220 ac_status=$?
21781 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21782 (exit $ac_status); }; }; then 21222 (exit $ac_status); }; }; then
21783 ac_cv_sizeof_long_long_int=`cat conftest.val` 21223 ac_cv_sizeof_long_long_int=`cat conftest.val`
21784else 21224else
21785 $as_echo "$as_me: program exited with status $ac_status" >&5 21225 echo "$as_me: program exited with status $ac_status" >&5
21786$as_echo "$as_me: failed program was:" >&5 21226echo "$as_me: failed program was:" >&5
21787sed 's/^/| /' conftest.$ac_ext >&5 21227sed 's/^/| /' conftest.$ac_ext >&5
21788 21228
21789( exit $ac_status ) 21229( exit $ac_status )
21790if test "$ac_cv_type_long_long_int" = yes; then 21230if test "$ac_cv_type_long_long_int" = yes; then
21791 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long int) 21231 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int)
21792See \`config.log' for more details." >&5 21232See \`config.log' for more details." >&5
21793$as_echo "$as_me: error: cannot compute sizeof (long long int) 21233echo "$as_me: error: cannot compute sizeof (long long int)
21794See \`config.log' for more details." >&2;} 21234See \`config.log' for more details." >&2;}
21795 { (exit 77); exit 77; }; } 21235 { (exit 77); exit 77; }; }
21796 else 21236 else
21797 ac_cv_sizeof_long_long_int=0 21237 ac_cv_sizeof_long_long_int=0
21798 fi 21238 fi
21799fi 21239fi
21800rm -rf conftest.dSYM
21801rm -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
21802fi 21241fi
21803rm -f conftest.val 21242rm -f conftest.val
21804fi 21243fi
21805{ $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
21806$as_echo "$ac_cv_sizeof_long_long_int" >&6; } 21245echo "${ECHO_T}$ac_cv_sizeof_long_long_int" >&6; }
21807 21246
21808 21247
21809 21248
@@ -21820,12 +21259,12 @@ fi
21820 21259
21821# 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.
21822if test -z "$have_llong_max"; then 21261if test -z "$have_llong_max"; then
21823 { $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
21824$as_echo_n "checking for max value of long long... " >&6; } 21263echo $ECHO_N "checking for max value of long long... $ECHO_C" >&6; }
21825 if test "$cross_compiling" = yes; then 21264 if test "$cross_compiling" = yes; then
21826 21265
21827 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5 21266 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5
21828$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;} 21267echo "$as_me: WARNING: cross compiling: not checking" >&2;}
21829 21268
21830 21269
21831else 21270else
@@ -21915,37 +21354,35 @@ case "(($ac_try" in
21915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21916 *) ac_try_echo=$ac_try;; 21355 *) ac_try_echo=$ac_try;;
21917esac 21356esac
21918eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21919$as_echo "$ac_try_echo") >&5
21920 (eval "$ac_link") 2>&5 21358 (eval "$ac_link") 2>&5
21921 ac_status=$? 21359 ac_status=$?
21922 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21923 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 21361 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21924 { (case "(($ac_try" in 21362 { (case "(($ac_try" in
21925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21926 *) ac_try_echo=$ac_try;; 21364 *) ac_try_echo=$ac_try;;
21927esac 21365esac
21928eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21929$as_echo "$ac_try_echo") >&5
21930 (eval "$ac_try") 2>&5 21367 (eval "$ac_try") 2>&5
21931 ac_status=$? 21368 ac_status=$?
21932 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21933 (exit $ac_status); }; }; then 21370 (exit $ac_status); }; }; then
21934 21371
21935 llong_min=`$AWK '{print $1}' conftest.llminmax` 21372 llong_min=`$AWK '{print $1}' conftest.llminmax`
21936 llong_max=`$AWK '{print $2}' conftest.llminmax` 21373 llong_max=`$AWK '{print $2}' conftest.llminmax`
21937 21374
21938 { $as_echo "$as_me:$LINENO: result: $llong_max" >&5 21375 { echo "$as_me:$LINENO: result: $llong_max" >&5
21939$as_echo "$llong_max" >&6; } 21376echo "${ECHO_T}$llong_max" >&6; }
21940 21377
21941cat >>confdefs.h <<_ACEOF 21378cat >>confdefs.h <<_ACEOF
21942#define LLONG_MAX ${llong_max}LL 21379#define LLONG_MAX ${llong_max}LL
21943_ACEOF 21380_ACEOF
21944 21381
21945 { $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
21946$as_echo_n "checking for min value of long long... " >&6; } 21383echo $ECHO_N "checking for min value of long long... $ECHO_C" >&6; }
21947 { $as_echo "$as_me:$LINENO: result: $llong_min" >&5 21384 { echo "$as_me:$LINENO: result: $llong_min" >&5
21948$as_echo "$llong_min" >&6; } 21385echo "${ECHO_T}$llong_min" >&6; }
21949 21386
21950cat >>confdefs.h <<_ACEOF 21387cat >>confdefs.h <<_ACEOF
21951#define LLONG_MIN ${llong_min}LL 21388#define LLONG_MIN ${llong_min}LL
@@ -21953,17 +21390,16 @@ _ACEOF
21953 21390
21954 21391
21955else 21392else
21956 $as_echo "$as_me: program exited with status $ac_status" >&5 21393 echo "$as_me: program exited with status $ac_status" >&5
21957$as_echo "$as_me: failed program was:" >&5 21394echo "$as_me: failed program was:" >&5
21958sed 's/^/| /' conftest.$ac_ext >&5 21395sed 's/^/| /' conftest.$ac_ext >&5
21959 21396
21960( exit $ac_status ) 21397( exit $ac_status )
21961 21398
21962 { $as_echo "$as_me:$LINENO: result: not found" >&5 21399 { echo "$as_me:$LINENO: result: not found" >&5
21963$as_echo "not found" >&6; } 21400echo "${ECHO_T}not found" >&6; }
21964 21401
21965fi 21402fi
21966rm -rf conftest.dSYM
21967rm -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
21968fi 21404fi
21969 21405
@@ -21972,10 +21408,10 @@ fi
21972 21408
21973 21409
21974# More checks for data types 21410# More checks for data types
21975{ $as_echo "$as_me:$LINENO: checking for u_int type" >&5 21411{ echo "$as_me:$LINENO: checking for u_int type" >&5
21976$as_echo_n "checking for u_int type... " >&6; } 21412echo $ECHO_N "checking for u_int type... $ECHO_C" >&6; }
21977if test "${ac_cv_have_u_int+set}" = set; then 21413if test "${ac_cv_have_u_int+set}" = set; then
21978 $as_echo_n "(cached) " >&6 21414 echo $ECHO_N "(cached) $ECHO_C" >&6
21979else 21415else
21980 21416
21981 cat >conftest.$ac_ext <<_ACEOF 21417 cat >conftest.$ac_ext <<_ACEOF
@@ -21999,21 +21435,20 @@ case "(($ac_try" in
21999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22000 *) ac_try_echo=$ac_try;; 21436 *) ac_try_echo=$ac_try;;
22001esac 21437esac
22002eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22003$as_echo "$ac_try_echo") >&5
22004 (eval "$ac_compile") 2>conftest.er1 21439 (eval "$ac_compile") 2>conftest.er1
22005 ac_status=$? 21440 ac_status=$?
22006 grep -v '^ *+' conftest.er1 >conftest.err 21441 grep -v '^ *+' conftest.er1 >conftest.err
22007 rm -f conftest.er1 21442 rm -f conftest.er1
22008 cat conftest.err >&5 21443 cat conftest.err >&5
22009 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22010 (exit $ac_status); } && { 21445 (exit $ac_status); } && {
22011 test -z "$ac_c_werror_flag" || 21446 test -z "$ac_c_werror_flag" ||
22012 test ! -s conftest.err 21447 test ! -s conftest.err
22013 } && test -s conftest.$ac_objext; then 21448 } && test -s conftest.$ac_objext; then
22014 ac_cv_have_u_int="yes" 21449 ac_cv_have_u_int="yes"
22015else 21450else
22016 $as_echo "$as_me: failed program was:" >&5 21451 echo "$as_me: failed program was:" >&5
22017sed 's/^/| /' conftest.$ac_ext >&5 21452sed 's/^/| /' conftest.$ac_ext >&5
22018 21453
22019 ac_cv_have_u_int="no" 21454 ac_cv_have_u_int="no"
@@ -22023,8 +21458,8 @@ fi
22023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22024 21459
22025fi 21460fi
22026{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_u_int" >&5 21461{ echo "$as_me:$LINENO: result: $ac_cv_have_u_int" >&5
22027$as_echo "$ac_cv_have_u_int" >&6; } 21462echo "${ECHO_T}$ac_cv_have_u_int" >&6; }
22028if test "x$ac_cv_have_u_int" = "xyes" ; then 21463if test "x$ac_cv_have_u_int" = "xyes" ; then
22029 21464
22030cat >>confdefs.h <<\_ACEOF 21465cat >>confdefs.h <<\_ACEOF
@@ -22034,10 +21469,10 @@ _ACEOF
22034 have_u_int=1 21469 have_u_int=1
22035fi 21470fi
22036 21471
22037{ $as_echo "$as_me:$LINENO: checking for intXX_t types" >&5 21472{ echo "$as_me:$LINENO: checking for intXX_t types" >&5
22038$as_echo_n "checking for intXX_t types... " >&6; } 21473echo $ECHO_N "checking for intXX_t types... $ECHO_C" >&6; }
22039if test "${ac_cv_have_intxx_t+set}" = set; then 21474if test "${ac_cv_have_intxx_t+set}" = set; then
22040 $as_echo_n "(cached) " >&6 21475 echo $ECHO_N "(cached) $ECHO_C" >&6
22041else 21476else
22042 21477
22043 cat >conftest.$ac_ext <<_ACEOF 21478 cat >conftest.$ac_ext <<_ACEOF
@@ -22061,21 +21496,20 @@ case "(($ac_try" in
22061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22062 *) ac_try_echo=$ac_try;; 21497 *) ac_try_echo=$ac_try;;
22063esac 21498esac
22064eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22065$as_echo "$ac_try_echo") >&5
22066 (eval "$ac_compile") 2>conftest.er1 21500 (eval "$ac_compile") 2>conftest.er1
22067 ac_status=$? 21501 ac_status=$?
22068 grep -v '^ *+' conftest.er1 >conftest.err 21502 grep -v '^ *+' conftest.er1 >conftest.err
22069 rm -f conftest.er1 21503 rm -f conftest.er1
22070 cat conftest.err >&5 21504 cat conftest.err >&5
22071 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22072 (exit $ac_status); } && { 21506 (exit $ac_status); } && {
22073 test -z "$ac_c_werror_flag" || 21507 test -z "$ac_c_werror_flag" ||
22074 test ! -s conftest.err 21508 test ! -s conftest.err
22075 } && test -s conftest.$ac_objext; then 21509 } && test -s conftest.$ac_objext; then
22076 ac_cv_have_intxx_t="yes" 21510 ac_cv_have_intxx_t="yes"
22077else 21511else
22078 $as_echo "$as_me: failed program was:" >&5 21512 echo "$as_me: failed program was:" >&5
22079sed 's/^/| /' conftest.$ac_ext >&5 21513sed 's/^/| /' conftest.$ac_ext >&5
22080 21514
22081 ac_cv_have_intxx_t="no" 21515 ac_cv_have_intxx_t="no"
@@ -22085,8 +21519,8 @@ fi
22085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22086 21520
22087fi 21521fi
22088{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_intxx_t" >&5 21522{ echo "$as_me:$LINENO: result: $ac_cv_have_intxx_t" >&5
22089$as_echo "$ac_cv_have_intxx_t" >&6; } 21523echo "${ECHO_T}$ac_cv_have_intxx_t" >&6; }
22090if test "x$ac_cv_have_intxx_t" = "xyes" ; then 21524if test "x$ac_cv_have_intxx_t" = "xyes" ; then
22091 21525
22092cat >>confdefs.h <<\_ACEOF 21526cat >>confdefs.h <<\_ACEOF
@@ -22099,8 +21533,8 @@ fi
22099if (test -z "$have_intxx_t" && \ 21533if (test -z "$have_intxx_t" && \
22100 test "x$ac_cv_header_stdint_h" = "xyes") 21534 test "x$ac_cv_header_stdint_h" = "xyes")
22101then 21535then
22102 { $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
22103$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; }
22104 cat >conftest.$ac_ext <<_ACEOF 21538 cat >conftest.$ac_ext <<_ACEOF
22105/* confdefs.h. */ 21539/* confdefs.h. */
22106_ACEOF 21540_ACEOF
@@ -22122,14 +21556,13 @@ case "(($ac_try" in
22122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22123 *) ac_try_echo=$ac_try;; 21557 *) ac_try_echo=$ac_try;;
22124esac 21558esac
22125eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22126$as_echo "$ac_try_echo") >&5
22127 (eval "$ac_compile") 2>conftest.er1 21560 (eval "$ac_compile") 2>conftest.er1
22128 ac_status=$? 21561 ac_status=$?
22129 grep -v '^ *+' conftest.er1 >conftest.err 21562 grep -v '^ *+' conftest.er1 >conftest.err
22130 rm -f conftest.er1 21563 rm -f conftest.er1
22131 cat conftest.err >&5 21564 cat conftest.err >&5
22132 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22133 (exit $ac_status); } && { 21566 (exit $ac_status); } && {
22134 test -z "$ac_c_werror_flag" || 21567 test -z "$ac_c_werror_flag" ||
22135 test ! -s conftest.err 21568 test ! -s conftest.err
@@ -22139,25 +21572,25 @@ $as_echo "$ac_try_echo") >&5
22139#define HAVE_INTXX_T 1 21572#define HAVE_INTXX_T 1
22140_ACEOF 21573_ACEOF
22141 21574
22142 { $as_echo "$as_me:$LINENO: result: yes" >&5 21575 { echo "$as_me:$LINENO: result: yes" >&5
22143$as_echo "yes" >&6; } 21576echo "${ECHO_T}yes" >&6; }
22144 21577
22145else 21578else
22146 $as_echo "$as_me: failed program was:" >&5 21579 echo "$as_me: failed program was:" >&5
22147sed 's/^/| /' conftest.$ac_ext >&5 21580sed 's/^/| /' conftest.$ac_ext >&5
22148 21581
22149 { $as_echo "$as_me:$LINENO: result: no" >&5 21582 { echo "$as_me:$LINENO: result: no" >&5
22150$as_echo "no" >&6; } 21583echo "${ECHO_T}no" >&6; }
22151 21584
22152fi 21585fi
22153 21586
22154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22155fi 21588fi
22156 21589
22157{ $as_echo "$as_me:$LINENO: checking for int64_t type" >&5 21590{ echo "$as_me:$LINENO: checking for int64_t type" >&5
22158$as_echo_n "checking for int64_t type... " >&6; } 21591echo $ECHO_N "checking for int64_t type... $ECHO_C" >&6; }
22159if test "${ac_cv_have_int64_t+set}" = set; then 21592if test "${ac_cv_have_int64_t+set}" = set; then
22160 $as_echo_n "(cached) " >&6 21593 echo $ECHO_N "(cached) $ECHO_C" >&6
22161else 21594else
22162 21595
22163 cat >conftest.$ac_ext <<_ACEOF 21596 cat >conftest.$ac_ext <<_ACEOF
@@ -22190,21 +21623,20 @@ case "(($ac_try" in
22190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22191 *) ac_try_echo=$ac_try;; 21624 *) ac_try_echo=$ac_try;;
22192esac 21625esac
22193eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22194$as_echo "$ac_try_echo") >&5
22195 (eval "$ac_compile") 2>conftest.er1 21627 (eval "$ac_compile") 2>conftest.er1
22196 ac_status=$? 21628 ac_status=$?
22197 grep -v '^ *+' conftest.er1 >conftest.err 21629 grep -v '^ *+' conftest.er1 >conftest.err
22198 rm -f conftest.er1 21630 rm -f conftest.er1
22199 cat conftest.err >&5 21631 cat conftest.err >&5
22200 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22201 (exit $ac_status); } && { 21633 (exit $ac_status); } && {
22202 test -z "$ac_c_werror_flag" || 21634 test -z "$ac_c_werror_flag" ||
22203 test ! -s conftest.err 21635 test ! -s conftest.err
22204 } && test -s conftest.$ac_objext; then 21636 } && test -s conftest.$ac_objext; then
22205 ac_cv_have_int64_t="yes" 21637 ac_cv_have_int64_t="yes"
22206else 21638else
22207 $as_echo "$as_me: failed program was:" >&5 21639 echo "$as_me: failed program was:" >&5
22208sed 's/^/| /' conftest.$ac_ext >&5 21640sed 's/^/| /' conftest.$ac_ext >&5
22209 21641
22210 ac_cv_have_int64_t="no" 21642 ac_cv_have_int64_t="no"
@@ -22214,8 +21646,8 @@ fi
22214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22215 21647
22216fi 21648fi
22217{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_int64_t" >&5 21649{ echo "$as_me:$LINENO: result: $ac_cv_have_int64_t" >&5
22218$as_echo "$ac_cv_have_int64_t" >&6; } 21650echo "${ECHO_T}$ac_cv_have_int64_t" >&6; }
22219if test "x$ac_cv_have_int64_t" = "xyes" ; then 21651if test "x$ac_cv_have_int64_t" = "xyes" ; then
22220 21652
22221cat >>confdefs.h <<\_ACEOF 21653cat >>confdefs.h <<\_ACEOF
@@ -22224,10 +21656,10 @@ _ACEOF
22224 21656
22225fi 21657fi
22226 21658
22227{ $as_echo "$as_me:$LINENO: checking for u_intXX_t types" >&5 21659{ echo "$as_me:$LINENO: checking for u_intXX_t types" >&5
22228$as_echo_n "checking for u_intXX_t types... " >&6; } 21660echo $ECHO_N "checking for u_intXX_t types... $ECHO_C" >&6; }
22229if test "${ac_cv_have_u_intxx_t+set}" = set; then 21661if test "${ac_cv_have_u_intxx_t+set}" = set; then
22230 $as_echo_n "(cached) " >&6 21662 echo $ECHO_N "(cached) $ECHO_C" >&6
22231else 21663else
22232 21664
22233 cat >conftest.$ac_ext <<_ACEOF 21665 cat >conftest.$ac_ext <<_ACEOF
@@ -22251,21 +21683,20 @@ case "(($ac_try" in
22251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22252 *) ac_try_echo=$ac_try;; 21684 *) ac_try_echo=$ac_try;;
22253esac 21685esac
22254eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22255$as_echo "$ac_try_echo") >&5
22256 (eval "$ac_compile") 2>conftest.er1 21687 (eval "$ac_compile") 2>conftest.er1
22257 ac_status=$? 21688 ac_status=$?
22258 grep -v '^ *+' conftest.er1 >conftest.err 21689 grep -v '^ *+' conftest.er1 >conftest.err
22259 rm -f conftest.er1 21690 rm -f conftest.er1
22260 cat conftest.err >&5 21691 cat conftest.err >&5
22261 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22262 (exit $ac_status); } && { 21693 (exit $ac_status); } && {
22263 test -z "$ac_c_werror_flag" || 21694 test -z "$ac_c_werror_flag" ||
22264 test ! -s conftest.err 21695 test ! -s conftest.err
22265 } && test -s conftest.$ac_objext; then 21696 } && test -s conftest.$ac_objext; then
22266 ac_cv_have_u_intxx_t="yes" 21697 ac_cv_have_u_intxx_t="yes"
22267else 21698else
22268 $as_echo "$as_me: failed program was:" >&5 21699 echo "$as_me: failed program was:" >&5
22269sed 's/^/| /' conftest.$ac_ext >&5 21700sed 's/^/| /' conftest.$ac_ext >&5
22270 21701
22271 ac_cv_have_u_intxx_t="no" 21702 ac_cv_have_u_intxx_t="no"
@@ -22275,8 +21706,8 @@ fi
22275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22276 21707
22277fi 21708fi
22278{ $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
22279$as_echo "$ac_cv_have_u_intxx_t" >&6; } 21710echo "${ECHO_T}$ac_cv_have_u_intxx_t" >&6; }
22280if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then 21711if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
22281 21712
22282cat >>confdefs.h <<\_ACEOF 21713cat >>confdefs.h <<\_ACEOF
@@ -22287,8 +21718,8 @@ _ACEOF
22287fi 21718fi
22288 21719
22289if test -z "$have_u_intxx_t" ; then 21720if test -z "$have_u_intxx_t" ; then
22290 { $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
22291$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; }
22292 cat >conftest.$ac_ext <<_ACEOF 21723 cat >conftest.$ac_ext <<_ACEOF
22293/* confdefs.h. */ 21724/* confdefs.h. */
22294_ACEOF 21725_ACEOF
@@ -22310,14 +21741,13 @@ case "(($ac_try" in
22310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22311 *) ac_try_echo=$ac_try;; 21742 *) ac_try_echo=$ac_try;;
22312esac 21743esac
22313eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22314$as_echo "$ac_try_echo") >&5
22315 (eval "$ac_compile") 2>conftest.er1 21745 (eval "$ac_compile") 2>conftest.er1
22316 ac_status=$? 21746 ac_status=$?
22317 grep -v '^ *+' conftest.er1 >conftest.err 21747 grep -v '^ *+' conftest.er1 >conftest.err
22318 rm -f conftest.er1 21748 rm -f conftest.er1
22319 cat conftest.err >&5 21749 cat conftest.err >&5
22320 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22321 (exit $ac_status); } && { 21751 (exit $ac_status); } && {
22322 test -z "$ac_c_werror_flag" || 21752 test -z "$ac_c_werror_flag" ||
22323 test ! -s conftest.err 21753 test ! -s conftest.err
@@ -22327,25 +21757,25 @@ $as_echo "$ac_try_echo") >&5
22327#define HAVE_U_INTXX_T 1 21757#define HAVE_U_INTXX_T 1
22328_ACEOF 21758_ACEOF
22329 21759
22330 { $as_echo "$as_me:$LINENO: result: yes" >&5 21760 { echo "$as_me:$LINENO: result: yes" >&5
22331$as_echo "yes" >&6; } 21761echo "${ECHO_T}yes" >&6; }
22332 21762
22333else 21763else
22334 $as_echo "$as_me: failed program was:" >&5 21764 echo "$as_me: failed program was:" >&5
22335sed 's/^/| /' conftest.$ac_ext >&5 21765sed 's/^/| /' conftest.$ac_ext >&5
22336 21766
22337 { $as_echo "$as_me:$LINENO: result: no" >&5 21767 { echo "$as_me:$LINENO: result: no" >&5
22338$as_echo "no" >&6; } 21768echo "${ECHO_T}no" >&6; }
22339 21769
22340fi 21770fi
22341 21771
22342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22343fi 21773fi
22344 21774
22345{ $as_echo "$as_me:$LINENO: checking for u_int64_t types" >&5 21775{ echo "$as_me:$LINENO: checking for u_int64_t types" >&5
22346$as_echo_n "checking for u_int64_t types... " >&6; } 21776echo $ECHO_N "checking for u_int64_t types... $ECHO_C" >&6; }
22347if test "${ac_cv_have_u_int64_t+set}" = set; then 21777if test "${ac_cv_have_u_int64_t+set}" = set; then
22348 $as_echo_n "(cached) " >&6 21778 echo $ECHO_N "(cached) $ECHO_C" >&6
22349else 21779else
22350 21780
22351 cat >conftest.$ac_ext <<_ACEOF 21781 cat >conftest.$ac_ext <<_ACEOF
@@ -22369,21 +21799,20 @@ case "(($ac_try" in
22369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22370 *) ac_try_echo=$ac_try;; 21800 *) ac_try_echo=$ac_try;;
22371esac 21801esac
22372eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22373$as_echo "$ac_try_echo") >&5
22374 (eval "$ac_compile") 2>conftest.er1 21803 (eval "$ac_compile") 2>conftest.er1
22375 ac_status=$? 21804 ac_status=$?
22376 grep -v '^ *+' conftest.er1 >conftest.err 21805 grep -v '^ *+' conftest.er1 >conftest.err
22377 rm -f conftest.er1 21806 rm -f conftest.er1
22378 cat conftest.err >&5 21807 cat conftest.err >&5
22379 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22380 (exit $ac_status); } && { 21809 (exit $ac_status); } && {
22381 test -z "$ac_c_werror_flag" || 21810 test -z "$ac_c_werror_flag" ||
22382 test ! -s conftest.err 21811 test ! -s conftest.err
22383 } && test -s conftest.$ac_objext; then 21812 } && test -s conftest.$ac_objext; then
22384 ac_cv_have_u_int64_t="yes" 21813 ac_cv_have_u_int64_t="yes"
22385else 21814else
22386 $as_echo "$as_me: failed program was:" >&5 21815 echo "$as_me: failed program was:" >&5
22387sed 's/^/| /' conftest.$ac_ext >&5 21816sed 's/^/| /' conftest.$ac_ext >&5
22388 21817
22389 ac_cv_have_u_int64_t="no" 21818 ac_cv_have_u_int64_t="no"
@@ -22393,8 +21822,8 @@ fi
22393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22394 21823
22395fi 21824fi
22396{ $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
22397$as_echo "$ac_cv_have_u_int64_t" >&6; } 21826echo "${ECHO_T}$ac_cv_have_u_int64_t" >&6; }
22398if test "x$ac_cv_have_u_int64_t" = "xyes" ; then 21827if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
22399 21828
22400cat >>confdefs.h <<\_ACEOF 21829cat >>confdefs.h <<\_ACEOF
@@ -22405,8 +21834,8 @@ _ACEOF
22405fi 21834fi
22406 21835
22407if test -z "$have_u_int64_t" ; then 21836if test -z "$have_u_int64_t" ; then
22408 { $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
22409$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; }
22410 cat >conftest.$ac_ext <<_ACEOF 21839 cat >conftest.$ac_ext <<_ACEOF
22411/* confdefs.h. */ 21840/* confdefs.h. */
22412_ACEOF 21841_ACEOF
@@ -22428,14 +21857,13 @@ case "(($ac_try" in
22428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22429 *) ac_try_echo=$ac_try;; 21858 *) ac_try_echo=$ac_try;;
22430esac 21859esac
22431eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22432$as_echo "$ac_try_echo") >&5
22433 (eval "$ac_compile") 2>conftest.er1 21861 (eval "$ac_compile") 2>conftest.er1
22434 ac_status=$? 21862 ac_status=$?
22435 grep -v '^ *+' conftest.er1 >conftest.err 21863 grep -v '^ *+' conftest.er1 >conftest.err
22436 rm -f conftest.er1 21864 rm -f conftest.er1
22437 cat conftest.err >&5 21865 cat conftest.err >&5
22438 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22439 (exit $ac_status); } && { 21867 (exit $ac_status); } && {
22440 test -z "$ac_c_werror_flag" || 21868 test -z "$ac_c_werror_flag" ||
22441 test ! -s conftest.err 21869 test ! -s conftest.err
@@ -22445,15 +21873,15 @@ $as_echo "$ac_try_echo") >&5
22445#define HAVE_U_INT64_T 1 21873#define HAVE_U_INT64_T 1
22446_ACEOF 21874_ACEOF
22447 21875
22448 { $as_echo "$as_me:$LINENO: result: yes" >&5 21876 { echo "$as_me:$LINENO: result: yes" >&5
22449$as_echo "yes" >&6; } 21877echo "${ECHO_T}yes" >&6; }
22450 21878
22451else 21879else
22452 $as_echo "$as_me: failed program was:" >&5 21880 echo "$as_me: failed program was:" >&5
22453sed 's/^/| /' conftest.$ac_ext >&5 21881sed 's/^/| /' conftest.$ac_ext >&5
22454 21882
22455 { $as_echo "$as_me:$LINENO: result: no" >&5 21883 { echo "$as_me:$LINENO: result: no" >&5
22456$as_echo "no" >&6; } 21884echo "${ECHO_T}no" >&6; }
22457 21885
22458fi 21886fi
22459 21887
@@ -22461,10 +21889,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22461fi 21889fi
22462 21890
22463if test -z "$have_u_intxx_t" ; then 21891if test -z "$have_u_intxx_t" ; then
22464 { $as_echo "$as_me:$LINENO: checking for uintXX_t types" >&5 21892 { echo "$as_me:$LINENO: checking for uintXX_t types" >&5
22465$as_echo_n "checking for uintXX_t types... " >&6; } 21893echo $ECHO_N "checking for uintXX_t types... $ECHO_C" >&6; }
22466if test "${ac_cv_have_uintxx_t+set}" = set; then 21894if test "${ac_cv_have_uintxx_t+set}" = set; then
22467 $as_echo_n "(cached) " >&6 21895 echo $ECHO_N "(cached) $ECHO_C" >&6
22468else 21896else
22469 21897
22470 cat >conftest.$ac_ext <<_ACEOF 21898 cat >conftest.$ac_ext <<_ACEOF
@@ -22490,21 +21918,20 @@ case "(($ac_try" in
22490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22491 *) ac_try_echo=$ac_try;; 21919 *) ac_try_echo=$ac_try;;
22492esac 21920esac
22493eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22494$as_echo "$ac_try_echo") >&5
22495 (eval "$ac_compile") 2>conftest.er1 21922 (eval "$ac_compile") 2>conftest.er1
22496 ac_status=$? 21923 ac_status=$?
22497 grep -v '^ *+' conftest.er1 >conftest.err 21924 grep -v '^ *+' conftest.er1 >conftest.err
22498 rm -f conftest.er1 21925 rm -f conftest.er1
22499 cat conftest.err >&5 21926 cat conftest.err >&5
22500 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22501 (exit $ac_status); } && { 21928 (exit $ac_status); } && {
22502 test -z "$ac_c_werror_flag" || 21929 test -z "$ac_c_werror_flag" ||
22503 test ! -s conftest.err 21930 test ! -s conftest.err
22504 } && test -s conftest.$ac_objext; then 21931 } && test -s conftest.$ac_objext; then
22505 ac_cv_have_uintxx_t="yes" 21932 ac_cv_have_uintxx_t="yes"
22506else 21933else
22507 $as_echo "$as_me: failed program was:" >&5 21934 echo "$as_me: failed program was:" >&5
22508sed 's/^/| /' conftest.$ac_ext >&5 21935sed 's/^/| /' conftest.$ac_ext >&5
22509 21936
22510 ac_cv_have_uintxx_t="no" 21937 ac_cv_have_uintxx_t="no"
@@ -22514,8 +21941,8 @@ fi
22514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22515 21942
22516fi 21943fi
22517{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_uintxx_t" >&5 21944{ echo "$as_me:$LINENO: result: $ac_cv_have_uintxx_t" >&5
22518$as_echo "$ac_cv_have_uintxx_t" >&6; } 21945echo "${ECHO_T}$ac_cv_have_uintxx_t" >&6; }
22519 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then 21946 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
22520 21947
22521cat >>confdefs.h <<\_ACEOF 21948cat >>confdefs.h <<\_ACEOF
@@ -22526,8 +21953,8 @@ _ACEOF
22526fi 21953fi
22527 21954
22528if test -z "$have_uintxx_t" ; then 21955if test -z "$have_uintxx_t" ; then
22529 { $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
22530$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; }
22531 cat >conftest.$ac_ext <<_ACEOF 21958 cat >conftest.$ac_ext <<_ACEOF
22532/* confdefs.h. */ 21959/* confdefs.h. */
22533_ACEOF 21960_ACEOF
@@ -22549,14 +21976,13 @@ case "(($ac_try" in
22549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22550 *) ac_try_echo=$ac_try;; 21977 *) ac_try_echo=$ac_try;;
22551esac 21978esac
22552eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 21979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22553$as_echo "$ac_try_echo") >&5
22554 (eval "$ac_compile") 2>conftest.er1 21980 (eval "$ac_compile") 2>conftest.er1
22555 ac_status=$? 21981 ac_status=$?
22556 grep -v '^ *+' conftest.er1 >conftest.err 21982 grep -v '^ *+' conftest.er1 >conftest.err
22557 rm -f conftest.er1 21983 rm -f conftest.er1
22558 cat conftest.err >&5 21984 cat conftest.err >&5
22559 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 21985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22560 (exit $ac_status); } && { 21986 (exit $ac_status); } && {
22561 test -z "$ac_c_werror_flag" || 21987 test -z "$ac_c_werror_flag" ||
22562 test ! -s conftest.err 21988 test ! -s conftest.err
@@ -22566,15 +21992,15 @@ $as_echo "$ac_try_echo") >&5
22566#define HAVE_UINTXX_T 1 21992#define HAVE_UINTXX_T 1
22567_ACEOF 21993_ACEOF
22568 21994
22569 { $as_echo "$as_me:$LINENO: result: yes" >&5 21995 { echo "$as_me:$LINENO: result: yes" >&5
22570$as_echo "yes" >&6; } 21996echo "${ECHO_T}yes" >&6; }
22571 21997
22572else 21998else
22573 $as_echo "$as_me: failed program was:" >&5 21999 echo "$as_me: failed program was:" >&5
22574sed 's/^/| /' conftest.$ac_ext >&5 22000sed 's/^/| /' conftest.$ac_ext >&5
22575 22001
22576 { $as_echo "$as_me:$LINENO: result: no" >&5 22002 { echo "$as_me:$LINENO: result: no" >&5
22577$as_echo "no" >&6; } 22003echo "${ECHO_T}no" >&6; }
22578 22004
22579fi 22005fi
22580 22006
@@ -22584,8 +22010,8 @@ fi
22584if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \ 22010if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
22585 test "x$ac_cv_header_sys_bitypes_h" = "xyes") 22011 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
22586then 22012then
22587 { $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
22588$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; }
22589 cat >conftest.$ac_ext <<_ACEOF 22015 cat >conftest.$ac_ext <<_ACEOF
22590/* confdefs.h. */ 22016/* confdefs.h. */
22591_ACEOF 22017_ACEOF
@@ -22613,14 +22039,13 @@ case "(($ac_try" in
22613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22614 *) ac_try_echo=$ac_try;; 22040 *) ac_try_echo=$ac_try;;
22615esac 22041esac
22616eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22617$as_echo "$ac_try_echo") >&5
22618 (eval "$ac_compile") 2>conftest.er1 22043 (eval "$ac_compile") 2>conftest.er1
22619 ac_status=$? 22044 ac_status=$?
22620 grep -v '^ *+' conftest.er1 >conftest.err 22045 grep -v '^ *+' conftest.er1 >conftest.err
22621 rm -f conftest.er1 22046 rm -f conftest.er1
22622 cat conftest.err >&5 22047 cat conftest.err >&5
22623 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22624 (exit $ac_status); } && { 22049 (exit $ac_status); } && {
22625 test -z "$ac_c_werror_flag" || 22050 test -z "$ac_c_werror_flag" ||
22626 test ! -s conftest.err 22051 test ! -s conftest.err
@@ -22634,15 +22059,15 @@ _ACEOF
22634#define HAVE_INTXX_T 1 22059#define HAVE_INTXX_T 1
22635_ACEOF 22060_ACEOF
22636 22061
22637 { $as_echo "$as_me:$LINENO: result: yes" >&5 22062 { echo "$as_me:$LINENO: result: yes" >&5
22638$as_echo "yes" >&6; } 22063echo "${ECHO_T}yes" >&6; }
22639 22064
22640else 22065else
22641 $as_echo "$as_me: failed program was:" >&5 22066 echo "$as_me: failed program was:" >&5
22642sed 's/^/| /' conftest.$ac_ext >&5 22067sed 's/^/| /' conftest.$ac_ext >&5
22643 22068
22644 { $as_echo "$as_me:$LINENO: result: no" >&5 22069 { echo "$as_me:$LINENO: result: no" >&5
22645$as_echo "no" >&6; } 22070echo "${ECHO_T}no" >&6; }
22646 22071
22647fi 22072fi
22648 22073
@@ -22650,10 +22075,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22650fi 22075fi
22651 22076
22652 22077
22653{ $as_echo "$as_me:$LINENO: checking for u_char" >&5 22078{ echo "$as_me:$LINENO: checking for u_char" >&5
22654$as_echo_n "checking for u_char... " >&6; } 22079echo $ECHO_N "checking for u_char... $ECHO_C" >&6; }
22655if test "${ac_cv_have_u_char+set}" = set; then 22080if test "${ac_cv_have_u_char+set}" = set; then
22656 $as_echo_n "(cached) " >&6 22081 echo $ECHO_N "(cached) $ECHO_C" >&6
22657else 22082else
22658 22083
22659 cat >conftest.$ac_ext <<_ACEOF 22084 cat >conftest.$ac_ext <<_ACEOF
@@ -22679,21 +22104,20 @@ case "(($ac_try" in
22679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22680 *) ac_try_echo=$ac_try;; 22105 *) ac_try_echo=$ac_try;;
22681esac 22106esac
22682eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22683$as_echo "$ac_try_echo") >&5
22684 (eval "$ac_compile") 2>conftest.er1 22108 (eval "$ac_compile") 2>conftest.er1
22685 ac_status=$? 22109 ac_status=$?
22686 grep -v '^ *+' conftest.er1 >conftest.err 22110 grep -v '^ *+' conftest.er1 >conftest.err
22687 rm -f conftest.er1 22111 rm -f conftest.er1
22688 cat conftest.err >&5 22112 cat conftest.err >&5
22689 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22690 (exit $ac_status); } && { 22114 (exit $ac_status); } && {
22691 test -z "$ac_c_werror_flag" || 22115 test -z "$ac_c_werror_flag" ||
22692 test ! -s conftest.err 22116 test ! -s conftest.err
22693 } && test -s conftest.$ac_objext; then 22117 } && test -s conftest.$ac_objext; then
22694 ac_cv_have_u_char="yes" 22118 ac_cv_have_u_char="yes"
22695else 22119else
22696 $as_echo "$as_me: failed program was:" >&5 22120 echo "$as_me: failed program was:" >&5
22697sed 's/^/| /' conftest.$ac_ext >&5 22121sed 's/^/| /' conftest.$ac_ext >&5
22698 22122
22699 ac_cv_have_u_char="no" 22123 ac_cv_have_u_char="no"
@@ -22703,8 +22127,8 @@ fi
22703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22704 22128
22705fi 22129fi
22706{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_u_char" >&5 22130{ echo "$as_me:$LINENO: result: $ac_cv_have_u_char" >&5
22707$as_echo "$ac_cv_have_u_char" >&6; } 22131echo "${ECHO_T}$ac_cv_have_u_char" >&6; }
22708if test "x$ac_cv_have_u_char" = "xyes" ; then 22132if test "x$ac_cv_have_u_char" = "xyes" ; then
22709 22133
22710cat >>confdefs.h <<\_ACEOF 22134cat >>confdefs.h <<\_ACEOF
@@ -22714,48 +22138,11 @@ _ACEOF
22714fi 22138fi
22715 22139
22716 22140
22717 { $as_echo "$as_me:$LINENO: checking for socklen_t" >&5 22141 { echo "$as_me:$LINENO: checking for socklen_t" >&5
22718$as_echo_n "checking for socklen_t... " >&6; } 22142echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
22719if test "${ac_cv_type_socklen_t+set}" = set; then 22143if test "${ac_cv_type_socklen_t+set}" = set; then
22720 $as_echo_n "(cached) " >&6 22144 echo $ECHO_N "(cached) $ECHO_C" >&6
22721else 22145else
22722 ac_cv_type_socklen_t=no
22723cat >conftest.$ac_ext <<_ACEOF
22724/* confdefs.h. */
22725_ACEOF
22726cat confdefs.h >>conftest.$ac_ext
22727cat >>conftest.$ac_ext <<_ACEOF
22728/* end confdefs.h. */
22729#include <sys/types.h>
22730#include <sys/socket.h>
22731
22732int
22733main ()
22734{
22735if (sizeof (socklen_t))
22736 return 0;
22737 ;
22738 return 0;
22739}
22740_ACEOF
22741rm -f conftest.$ac_objext
22742if { (ac_try="$ac_compile"
22743case "(($ac_try" in
22744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22745 *) ac_try_echo=$ac_try;;
22746esac
22747eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22748$as_echo "$ac_try_echo") >&5
22749 (eval "$ac_compile") 2>conftest.er1
22750 ac_status=$?
22751 grep -v '^ *+' conftest.er1 >conftest.err
22752 rm -f conftest.er1
22753 cat conftest.err >&5
22754 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22755 (exit $ac_status); } && {
22756 test -z "$ac_c_werror_flag" ||
22757 test ! -s conftest.err
22758 } && test -s conftest.$ac_objext; then
22759 cat >conftest.$ac_ext <<_ACEOF 22146 cat >conftest.$ac_ext <<_ACEOF
22760/* confdefs.h. */ 22147/* confdefs.h. */
22761_ACEOF 22148_ACEOF
@@ -22765,11 +22152,14 @@ cat >>conftest.$ac_ext <<_ACEOF
22765#include <sys/types.h> 22152#include <sys/types.h>
22766#include <sys/socket.h> 22153#include <sys/socket.h>
22767 22154
22155typedef socklen_t ac__type_new_;
22768int 22156int
22769main () 22157main ()
22770{ 22158{
22771if (sizeof ((socklen_t))) 22159if ((ac__type_new_ *) 0)
22772 return 0; 22160 return 0;
22161if (sizeof (ac__type_new_))
22162 return 0;
22773 ; 22163 ;
22774 return 0; 22164 return 0;
22775} 22165}
@@ -22780,46 +22170,37 @@ case "(($ac_try" in
22780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22781 *) ac_try_echo=$ac_try;; 22171 *) ac_try_echo=$ac_try;;
22782esac 22172esac
22783eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22784$as_echo "$ac_try_echo") >&5
22785 (eval "$ac_compile") 2>conftest.er1 22174 (eval "$ac_compile") 2>conftest.er1
22786 ac_status=$? 22175 ac_status=$?
22787 grep -v '^ *+' conftest.er1 >conftest.err 22176 grep -v '^ *+' conftest.er1 >conftest.err
22788 rm -f conftest.er1 22177 rm -f conftest.er1
22789 cat conftest.err >&5 22178 cat conftest.err >&5
22790 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22791 (exit $ac_status); } && { 22180 (exit $ac_status); } && {
22792 test -z "$ac_c_werror_flag" || 22181 test -z "$ac_c_werror_flag" ||
22793 test ! -s conftest.err 22182 test ! -s conftest.err
22794 } && test -s conftest.$ac_objext; then 22183 } && test -s conftest.$ac_objext; then
22795 : 22184 ac_cv_type_socklen_t=yes
22796else
22797 $as_echo "$as_me: failed program was:" >&5
22798sed 's/^/| /' conftest.$ac_ext >&5
22799
22800 ac_cv_type_socklen_t=yes
22801fi
22802
22803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22804else 22185else
22805 $as_echo "$as_me: failed program was:" >&5 22186 echo "$as_me: failed program was:" >&5
22806sed 's/^/| /' conftest.$ac_ext >&5 22187sed 's/^/| /' conftest.$ac_ext >&5
22807 22188
22808 22189 ac_cv_type_socklen_t=no
22809fi 22190fi
22810 22191
22811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22812fi 22193fi
22813{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 22194{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
22814$as_echo "$ac_cv_type_socklen_t" >&6; } 22195echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
22815if test $ac_cv_type_socklen_t = yes; then 22196if test $ac_cv_type_socklen_t = yes; then
22816 : 22197 :
22817else 22198else
22818 22199
22819 { $as_echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5 22200 { echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5
22820$as_echo_n "checking for socklen_t equivalent... " >&6; } 22201echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6; }
22821 if test "${curl_cv_socklen_t_equiv+set}" = set; then 22202 if test "${curl_cv_socklen_t_equiv+set}" = set; then
22822 $as_echo_n "(cached) " >&6 22203 echo $ECHO_N "(cached) $ECHO_C" >&6
22823else 22204else
22824 22205
22825 # Systems have either "struct sockaddr *" or 22206 # Systems have either "struct sockaddr *" or
@@ -22856,14 +22237,13 @@ case "(($ac_try" in
22856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22857 *) ac_try_echo=$ac_try;; 22238 *) ac_try_echo=$ac_try;;
22858esac 22239esac
22859eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22860$as_echo "$ac_try_echo") >&5
22861 (eval "$ac_compile") 2>conftest.er1 22241 (eval "$ac_compile") 2>conftest.er1
22862 ac_status=$? 22242 ac_status=$?
22863 grep -v '^ *+' conftest.er1 >conftest.err 22243 grep -v '^ *+' conftest.er1 >conftest.err
22864 rm -f conftest.er1 22244 rm -f conftest.er1
22865 cat conftest.err >&5 22245 cat conftest.err >&5
22866 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22867 (exit $ac_status); } && { 22247 (exit $ac_status); } && {
22868 test -z "$ac_c_werror_flag" || 22248 test -z "$ac_c_werror_flag" ||
22869 test ! -s conftest.err 22249 test ! -s conftest.err
@@ -22873,7 +22253,7 @@ $as_echo "$ac_try_echo") >&5
22873 break 22253 break
22874 22254
22875else 22255else
22876 $as_echo "$as_me: failed program was:" >&5 22256 echo "$as_me: failed program was:" >&5
22877sed 's/^/| /' conftest.$ac_ext >&5 22257sed 's/^/| /' conftest.$ac_ext >&5
22878 22258
22879 22259
@@ -22884,15 +22264,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22884 done 22264 done
22885 22265
22886 if test "x$curl_cv_socklen_t_equiv" = x; then 22266 if test "x$curl_cv_socklen_t_equiv" = x; then
22887 { { $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
22888$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;}
22889 { (exit 1); exit 1; }; } 22269 { (exit 1); exit 1; }; }
22890 fi 22270 fi
22891 22271
22892fi 22272fi
22893 22273
22894 { $as_echo "$as_me:$LINENO: result: $curl_cv_socklen_t_equiv" >&5 22274 { echo "$as_me:$LINENO: result: $curl_cv_socklen_t_equiv" >&5
22895$as_echo "$curl_cv_socklen_t_equiv" >&6; } 22275echo "${ECHO_T}$curl_cv_socklen_t_equiv" >&6; }
22896 22276
22897cat >>confdefs.h <<_ACEOF 22277cat >>confdefs.h <<_ACEOF
22898#define socklen_t $curl_cv_socklen_t_equiv 22278#define socklen_t $curl_cv_socklen_t_equiv
@@ -22902,47 +22282,11 @@ fi
22902 22282
22903 22283
22904 22284
22905{ $as_echo "$as_me:$LINENO: checking for sig_atomic_t" >&5 22285{ echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
22906$as_echo_n "checking for sig_atomic_t... " >&6; } 22286echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6; }
22907if test "${ac_cv_type_sig_atomic_t+set}" = set; then 22287if test "${ac_cv_type_sig_atomic_t+set}" = set; then
22908 $as_echo_n "(cached) " >&6 22288 echo $ECHO_N "(cached) $ECHO_C" >&6
22909else 22289else
22910 ac_cv_type_sig_atomic_t=no
22911cat >conftest.$ac_ext <<_ACEOF
22912/* confdefs.h. */
22913_ACEOF
22914cat confdefs.h >>conftest.$ac_ext
22915cat >>conftest.$ac_ext <<_ACEOF
22916/* end confdefs.h. */
22917#include <signal.h>
22918
22919int
22920main ()
22921{
22922if (sizeof (sig_atomic_t))
22923 return 0;
22924 ;
22925 return 0;
22926}
22927_ACEOF
22928rm -f conftest.$ac_objext
22929if { (ac_try="$ac_compile"
22930case "(($ac_try" in
22931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22932 *) ac_try_echo=$ac_try;;
22933esac
22934eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22935$as_echo "$ac_try_echo") >&5
22936 (eval "$ac_compile") 2>conftest.er1
22937 ac_status=$?
22938 grep -v '^ *+' conftest.er1 >conftest.err
22939 rm -f conftest.er1
22940 cat conftest.err >&5
22941 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22942 (exit $ac_status); } && {
22943 test -z "$ac_c_werror_flag" ||
22944 test ! -s conftest.err
22945 } && test -s conftest.$ac_objext; then
22946 cat >conftest.$ac_ext <<_ACEOF 22290 cat >conftest.$ac_ext <<_ACEOF
22947/* confdefs.h. */ 22291/* confdefs.h. */
22948_ACEOF 22292_ACEOF
@@ -22951,11 +22295,14 @@ cat >>conftest.$ac_ext <<_ACEOF
22951/* end confdefs.h. */ 22295/* end confdefs.h. */
22952#include <signal.h> 22296#include <signal.h>
22953 22297
22298typedef sig_atomic_t ac__type_new_;
22954int 22299int
22955main () 22300main ()
22956{ 22301{
22957if (sizeof ((sig_atomic_t))) 22302if ((ac__type_new_ *) 0)
22958 return 0; 22303 return 0;
22304if (sizeof (ac__type_new_))
22305 return 0;
22959 ; 22306 ;
22960 return 0; 22307 return 0;
22961} 22308}
@@ -22966,38 +22313,29 @@ case "(($ac_try" in
22966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22967 *) ac_try_echo=$ac_try;; 22314 *) ac_try_echo=$ac_try;;
22968esac 22315esac
22969eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22970$as_echo "$ac_try_echo") >&5
22971 (eval "$ac_compile") 2>conftest.er1 22317 (eval "$ac_compile") 2>conftest.er1
22972 ac_status=$? 22318 ac_status=$?
22973 grep -v '^ *+' conftest.er1 >conftest.err 22319 grep -v '^ *+' conftest.er1 >conftest.err
22974 rm -f conftest.er1 22320 rm -f conftest.er1
22975 cat conftest.err >&5 22321 cat conftest.err >&5
22976 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22977 (exit $ac_status); } && { 22323 (exit $ac_status); } && {
22978 test -z "$ac_c_werror_flag" || 22324 test -z "$ac_c_werror_flag" ||
22979 test ! -s conftest.err 22325 test ! -s conftest.err
22980 } && test -s conftest.$ac_objext; then 22326 } && test -s conftest.$ac_objext; then
22981 : 22327 ac_cv_type_sig_atomic_t=yes
22982else
22983 $as_echo "$as_me: failed program was:" >&5
22984sed 's/^/| /' conftest.$ac_ext >&5
22985
22986 ac_cv_type_sig_atomic_t=yes
22987fi
22988
22989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22990else 22328else
22991 $as_echo "$as_me: failed program was:" >&5 22329 echo "$as_me: failed program was:" >&5
22992sed 's/^/| /' conftest.$ac_ext >&5 22330sed 's/^/| /' conftest.$ac_ext >&5
22993 22331
22994 22332 ac_cv_type_sig_atomic_t=no
22995fi 22333fi
22996 22334
22997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22998fi 22336fi
22999{ $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
23000$as_echo "$ac_cv_type_sig_atomic_t" >&6; } 22338echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6; }
23001if test $ac_cv_type_sig_atomic_t = yes; then 22339if test $ac_cv_type_sig_atomic_t = yes; then
23002 22340
23003cat >>confdefs.h <<_ACEOF 22341cat >>confdefs.h <<_ACEOF
@@ -23007,58 +22345,11 @@ _ACEOF
23007 22345
23008fi 22346fi
23009 22347
23010{ $as_echo "$as_me:$LINENO: checking for fsblkcnt_t" >&5 22348{ echo "$as_me:$LINENO: checking for fsblkcnt_t" >&5
23011$as_echo_n "checking for fsblkcnt_t... " >&6; } 22349echo $ECHO_N "checking for fsblkcnt_t... $ECHO_C" >&6; }
23012if test "${ac_cv_type_fsblkcnt_t+set}" = set; then 22350if test "${ac_cv_type_fsblkcnt_t+set}" = set; then
23013 $as_echo_n "(cached) " >&6 22351 echo $ECHO_N "(cached) $ECHO_C" >&6
23014else 22352else
23015 ac_cv_type_fsblkcnt_t=no
23016cat >conftest.$ac_ext <<_ACEOF
23017/* confdefs.h. */
23018_ACEOF
23019cat confdefs.h >>conftest.$ac_ext
23020cat >>conftest.$ac_ext <<_ACEOF
23021/* end confdefs.h. */
23022
23023#include <sys/types.h>
23024#ifdef HAVE_SYS_BITYPES_H
23025#include <sys/bitypes.h>
23026#endif
23027#ifdef HAVE_SYS_STATFS_H
23028#include <sys/statfs.h>
23029#endif
23030#ifdef HAVE_SYS_STATVFS_H
23031#include <sys/statvfs.h>
23032#endif
23033
23034
23035int
23036main ()
23037{
23038if (sizeof (fsblkcnt_t))
23039 return 0;
23040 ;
23041 return 0;
23042}
23043_ACEOF
23044rm -f conftest.$ac_objext
23045if { (ac_try="$ac_compile"
23046case "(($ac_try" in
23047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23048 *) ac_try_echo=$ac_try;;
23049esac
23050eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23051$as_echo "$ac_try_echo") >&5
23052 (eval "$ac_compile") 2>conftest.er1
23053 ac_status=$?
23054 grep -v '^ *+' conftest.er1 >conftest.err
23055 rm -f conftest.er1
23056 cat conftest.err >&5
23057 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23058 (exit $ac_status); } && {
23059 test -z "$ac_c_werror_flag" ||
23060 test ! -s conftest.err
23061 } && test -s conftest.$ac_objext; then
23062 cat >conftest.$ac_ext <<_ACEOF 22353 cat >conftest.$ac_ext <<_ACEOF
23063/* confdefs.h. */ 22354/* confdefs.h. */
23064_ACEOF 22355_ACEOF
@@ -23078,11 +22369,14 @@ cat >>conftest.$ac_ext <<_ACEOF
23078#endif 22369#endif
23079 22370
23080 22371
22372typedef fsblkcnt_t ac__type_new_;
23081int 22373int
23082main () 22374main ()
23083{ 22375{
23084if (sizeof ((fsblkcnt_t))) 22376if ((ac__type_new_ *) 0)
23085 return 0; 22377 return 0;
22378if (sizeof (ac__type_new_))
22379 return 0;
23086 ; 22380 ;
23087 return 0; 22381 return 0;
23088} 22382}
@@ -23093,38 +22387,29 @@ case "(($ac_try" in
23093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23094 *) ac_try_echo=$ac_try;; 22388 *) ac_try_echo=$ac_try;;
23095esac 22389esac
23096eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23097$as_echo "$ac_try_echo") >&5
23098 (eval "$ac_compile") 2>conftest.er1 22391 (eval "$ac_compile") 2>conftest.er1
23099 ac_status=$? 22392 ac_status=$?
23100 grep -v '^ *+' conftest.er1 >conftest.err 22393 grep -v '^ *+' conftest.er1 >conftest.err
23101 rm -f conftest.er1 22394 rm -f conftest.er1
23102 cat conftest.err >&5 22395 cat conftest.err >&5
23103 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23104 (exit $ac_status); } && { 22397 (exit $ac_status); } && {
23105 test -z "$ac_c_werror_flag" || 22398 test -z "$ac_c_werror_flag" ||
23106 test ! -s conftest.err 22399 test ! -s conftest.err
23107 } && test -s conftest.$ac_objext; then 22400 } && test -s conftest.$ac_objext; then
23108 : 22401 ac_cv_type_fsblkcnt_t=yes
23109else
23110 $as_echo "$as_me: failed program was:" >&5
23111sed 's/^/| /' conftest.$ac_ext >&5
23112
23113 ac_cv_type_fsblkcnt_t=yes
23114fi
23115
23116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23117else 22402else
23118 $as_echo "$as_me: failed program was:" >&5 22403 echo "$as_me: failed program was:" >&5
23119sed 's/^/| /' conftest.$ac_ext >&5 22404sed 's/^/| /' conftest.$ac_ext >&5
23120 22405
23121 22406 ac_cv_type_fsblkcnt_t=no
23122fi 22407fi
23123 22408
23124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23125fi 22410fi
23126{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_fsblkcnt_t" >&5 22411{ echo "$as_me:$LINENO: result: $ac_cv_type_fsblkcnt_t" >&5
23127$as_echo "$ac_cv_type_fsblkcnt_t" >&6; } 22412echo "${ECHO_T}$ac_cv_type_fsblkcnt_t" >&6; }
23128if test $ac_cv_type_fsblkcnt_t = yes; then 22413if test $ac_cv_type_fsblkcnt_t = yes; then
23129 22414
23130cat >>confdefs.h <<_ACEOF 22415cat >>confdefs.h <<_ACEOF
@@ -23133,58 +22418,11 @@ _ACEOF
23133 22418
23134 22419
23135fi 22420fi
23136{ $as_echo "$as_me:$LINENO: checking for fsfilcnt_t" >&5 22421{ echo "$as_me:$LINENO: checking for fsfilcnt_t" >&5
23137$as_echo_n "checking for fsfilcnt_t... " >&6; } 22422echo $ECHO_N "checking for fsfilcnt_t... $ECHO_C" >&6; }
23138if test "${ac_cv_type_fsfilcnt_t+set}" = set; then 22423if test "${ac_cv_type_fsfilcnt_t+set}" = set; then
23139 $as_echo_n "(cached) " >&6 22424 echo $ECHO_N "(cached) $ECHO_C" >&6
23140else 22425else
23141 ac_cv_type_fsfilcnt_t=no
23142cat >conftest.$ac_ext <<_ACEOF
23143/* confdefs.h. */
23144_ACEOF
23145cat confdefs.h >>conftest.$ac_ext
23146cat >>conftest.$ac_ext <<_ACEOF
23147/* end confdefs.h. */
23148
23149#include <sys/types.h>
23150#ifdef HAVE_SYS_BITYPES_H
23151#include <sys/bitypes.h>
23152#endif
23153#ifdef HAVE_SYS_STATFS_H
23154#include <sys/statfs.h>
23155#endif
23156#ifdef HAVE_SYS_STATVFS_H
23157#include <sys/statvfs.h>
23158#endif
23159
23160
23161int
23162main ()
23163{
23164if (sizeof (fsfilcnt_t))
23165 return 0;
23166 ;
23167 return 0;
23168}
23169_ACEOF
23170rm -f conftest.$ac_objext
23171if { (ac_try="$ac_compile"
23172case "(($ac_try" in
23173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23174 *) ac_try_echo=$ac_try;;
23175esac
23176eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23177$as_echo "$ac_try_echo") >&5
23178 (eval "$ac_compile") 2>conftest.er1
23179 ac_status=$?
23180 grep -v '^ *+' conftest.er1 >conftest.err
23181 rm -f conftest.er1
23182 cat conftest.err >&5
23183 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23184 (exit $ac_status); } && {
23185 test -z "$ac_c_werror_flag" ||
23186 test ! -s conftest.err
23187 } && test -s conftest.$ac_objext; then
23188 cat >conftest.$ac_ext <<_ACEOF 22426 cat >conftest.$ac_ext <<_ACEOF
23189/* confdefs.h. */ 22427/* confdefs.h. */
23190_ACEOF 22428_ACEOF
@@ -23204,11 +22442,14 @@ cat >>conftest.$ac_ext <<_ACEOF
23204#endif 22442#endif
23205 22443
23206 22444
22445typedef fsfilcnt_t ac__type_new_;
23207int 22446int
23208main () 22447main ()
23209{ 22448{
23210if (sizeof ((fsfilcnt_t))) 22449if ((ac__type_new_ *) 0)
23211 return 0; 22450 return 0;
22451if (sizeof (ac__type_new_))
22452 return 0;
23212 ; 22453 ;
23213 return 0; 22454 return 0;
23214} 22455}
@@ -23219,38 +22460,29 @@ case "(($ac_try" in
23219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23220 *) ac_try_echo=$ac_try;; 22461 *) ac_try_echo=$ac_try;;
23221esac 22462esac
23222eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23223$as_echo "$ac_try_echo") >&5
23224 (eval "$ac_compile") 2>conftest.er1 22464 (eval "$ac_compile") 2>conftest.er1
23225 ac_status=$? 22465 ac_status=$?
23226 grep -v '^ *+' conftest.er1 >conftest.err 22466 grep -v '^ *+' conftest.er1 >conftest.err
23227 rm -f conftest.er1 22467 rm -f conftest.er1
23228 cat conftest.err >&5 22468 cat conftest.err >&5
23229 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23230 (exit $ac_status); } && { 22470 (exit $ac_status); } && {
23231 test -z "$ac_c_werror_flag" || 22471 test -z "$ac_c_werror_flag" ||
23232 test ! -s conftest.err 22472 test ! -s conftest.err
23233 } && test -s conftest.$ac_objext; then 22473 } && test -s conftest.$ac_objext; then
23234 : 22474 ac_cv_type_fsfilcnt_t=yes
23235else 22475else
23236 $as_echo "$as_me: failed program was:" >&5 22476 echo "$as_me: failed program was:" >&5
23237sed 's/^/| /' conftest.$ac_ext >&5 22477sed 's/^/| /' conftest.$ac_ext >&5
23238 22478
23239 ac_cv_type_fsfilcnt_t=yes 22479 ac_cv_type_fsfilcnt_t=no
23240fi
23241
23242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23243else
23244 $as_echo "$as_me: failed program was:" >&5
23245sed 's/^/| /' conftest.$ac_ext >&5
23246
23247
23248fi 22480fi
23249 22481
23250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23251fi 22483fi
23252{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_fsfilcnt_t" >&5 22484{ echo "$as_me:$LINENO: result: $ac_cv_type_fsfilcnt_t" >&5
23253$as_echo "$ac_cv_type_fsfilcnt_t" >&6; } 22485echo "${ECHO_T}$ac_cv_type_fsfilcnt_t" >&6; }
23254if test $ac_cv_type_fsfilcnt_t = yes; then 22486if test $ac_cv_type_fsfilcnt_t = yes; then
23255 22487
23256cat >>confdefs.h <<_ACEOF 22488cat >>confdefs.h <<_ACEOF
@@ -23261,48 +22493,11 @@ _ACEOF
23261fi 22493fi
23262 22494
23263 22495
23264{ $as_echo "$as_me:$LINENO: checking for in_addr_t" >&5 22496{ echo "$as_me:$LINENO: checking for in_addr_t" >&5
23265$as_echo_n "checking for in_addr_t... " >&6; } 22497echo $ECHO_N "checking for in_addr_t... $ECHO_C" >&6; }
23266if test "${ac_cv_type_in_addr_t+set}" = set; then 22498if test "${ac_cv_type_in_addr_t+set}" = set; then
23267 $as_echo_n "(cached) " >&6 22499 echo $ECHO_N "(cached) $ECHO_C" >&6
23268else 22500else
23269 ac_cv_type_in_addr_t=no
23270cat >conftest.$ac_ext <<_ACEOF
23271/* confdefs.h. */
23272_ACEOF
23273cat confdefs.h >>conftest.$ac_ext
23274cat >>conftest.$ac_ext <<_ACEOF
23275/* end confdefs.h. */
23276#include <sys/types.h>
23277#include <netinet/in.h>
23278
23279int
23280main ()
23281{
23282if (sizeof (in_addr_t))
23283 return 0;
23284 ;
23285 return 0;
23286}
23287_ACEOF
23288rm -f conftest.$ac_objext
23289if { (ac_try="$ac_compile"
23290case "(($ac_try" in
23291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23292 *) ac_try_echo=$ac_try;;
23293esac
23294eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23295$as_echo "$ac_try_echo") >&5
23296 (eval "$ac_compile") 2>conftest.er1
23297 ac_status=$?
23298 grep -v '^ *+' conftest.er1 >conftest.err
23299 rm -f conftest.er1
23300 cat conftest.err >&5
23301 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23302 (exit $ac_status); } && {
23303 test -z "$ac_c_werror_flag" ||
23304 test ! -s conftest.err
23305 } && test -s conftest.$ac_objext; then
23306 cat >conftest.$ac_ext <<_ACEOF 22501 cat >conftest.$ac_ext <<_ACEOF
23307/* confdefs.h. */ 22502/* confdefs.h. */
23308_ACEOF 22503_ACEOF
@@ -23312,11 +22507,14 @@ cat >>conftest.$ac_ext <<_ACEOF
23312#include <sys/types.h> 22507#include <sys/types.h>
23313#include <netinet/in.h> 22508#include <netinet/in.h>
23314 22509
22510typedef in_addr_t ac__type_new_;
23315int 22511int
23316main () 22512main ()
23317{ 22513{
23318if (sizeof ((in_addr_t))) 22514if ((ac__type_new_ *) 0)
23319 return 0; 22515 return 0;
22516if (sizeof (ac__type_new_))
22517 return 0;
23320 ; 22518 ;
23321 return 0; 22519 return 0;
23322} 22520}
@@ -23327,38 +22525,29 @@ case "(($ac_try" in
23327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23328 *) ac_try_echo=$ac_try;; 22526 *) ac_try_echo=$ac_try;;
23329esac 22527esac
23330eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23331$as_echo "$ac_try_echo") >&5
23332 (eval "$ac_compile") 2>conftest.er1 22529 (eval "$ac_compile") 2>conftest.er1
23333 ac_status=$? 22530 ac_status=$?
23334 grep -v '^ *+' conftest.er1 >conftest.err 22531 grep -v '^ *+' conftest.er1 >conftest.err
23335 rm -f conftest.er1 22532 rm -f conftest.er1
23336 cat conftest.err >&5 22533 cat conftest.err >&5
23337 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23338 (exit $ac_status); } && { 22535 (exit $ac_status); } && {
23339 test -z "$ac_c_werror_flag" || 22536 test -z "$ac_c_werror_flag" ||
23340 test ! -s conftest.err 22537 test ! -s conftest.err
23341 } && test -s conftest.$ac_objext; then 22538 } && test -s conftest.$ac_objext; then
23342 : 22539 ac_cv_type_in_addr_t=yes
23343else 22540else
23344 $as_echo "$as_me: failed program was:" >&5 22541 echo "$as_me: failed program was:" >&5
23345sed 's/^/| /' conftest.$ac_ext >&5 22542sed 's/^/| /' conftest.$ac_ext >&5
23346 22543
23347 ac_cv_type_in_addr_t=yes 22544 ac_cv_type_in_addr_t=no
23348fi
23349
23350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23351else
23352 $as_echo "$as_me: failed program was:" >&5
23353sed 's/^/| /' conftest.$ac_ext >&5
23354
23355
23356fi 22545fi
23357 22546
23358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23359fi 22548fi
23360{ $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
23361$as_echo "$ac_cv_type_in_addr_t" >&6; } 22550echo "${ECHO_T}$ac_cv_type_in_addr_t" >&6; }
23362if test $ac_cv_type_in_addr_t = yes; then 22551if test $ac_cv_type_in_addr_t = yes; then
23363 22552
23364cat >>confdefs.h <<_ACEOF 22553cat >>confdefs.h <<_ACEOF
@@ -23367,48 +22556,11 @@ _ACEOF
23367 22556
23368 22557
23369fi 22558fi
23370{ $as_echo "$as_me:$LINENO: checking for in_port_t" >&5 22559{ echo "$as_me:$LINENO: checking for in_port_t" >&5
23371$as_echo_n "checking for in_port_t... " >&6; } 22560echo $ECHO_N "checking for in_port_t... $ECHO_C" >&6; }
23372if test "${ac_cv_type_in_port_t+set}" = set; then 22561if test "${ac_cv_type_in_port_t+set}" = set; then
23373 $as_echo_n "(cached) " >&6 22562 echo $ECHO_N "(cached) $ECHO_C" >&6
23374else 22563else
23375 ac_cv_type_in_port_t=no
23376cat >conftest.$ac_ext <<_ACEOF
23377/* confdefs.h. */
23378_ACEOF
23379cat confdefs.h >>conftest.$ac_ext
23380cat >>conftest.$ac_ext <<_ACEOF
23381/* end confdefs.h. */
23382#include <sys/types.h>
23383#include <netinet/in.h>
23384
23385int
23386main ()
23387{
23388if (sizeof (in_port_t))
23389 return 0;
23390 ;
23391 return 0;
23392}
23393_ACEOF
23394rm -f conftest.$ac_objext
23395if { (ac_try="$ac_compile"
23396case "(($ac_try" in
23397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23398 *) ac_try_echo=$ac_try;;
23399esac
23400eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23401$as_echo "$ac_try_echo") >&5
23402 (eval "$ac_compile") 2>conftest.er1
23403 ac_status=$?
23404 grep -v '^ *+' conftest.er1 >conftest.err
23405 rm -f conftest.er1
23406 cat conftest.err >&5
23407 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23408 (exit $ac_status); } && {
23409 test -z "$ac_c_werror_flag" ||
23410 test ! -s conftest.err
23411 } && test -s conftest.$ac_objext; then
23412 cat >conftest.$ac_ext <<_ACEOF 22564 cat >conftest.$ac_ext <<_ACEOF
23413/* confdefs.h. */ 22565/* confdefs.h. */
23414_ACEOF 22566_ACEOF
@@ -23418,11 +22570,14 @@ cat >>conftest.$ac_ext <<_ACEOF
23418#include <sys/types.h> 22570#include <sys/types.h>
23419#include <netinet/in.h> 22571#include <netinet/in.h>
23420 22572
22573typedef in_port_t ac__type_new_;
23421int 22574int
23422main () 22575main ()
23423{ 22576{
23424if (sizeof ((in_port_t))) 22577if ((ac__type_new_ *) 0)
23425 return 0; 22578 return 0;
22579if (sizeof (ac__type_new_))
22580 return 0;
23426 ; 22581 ;
23427 return 0; 22582 return 0;
23428} 22583}
@@ -23433,38 +22588,29 @@ case "(($ac_try" in
23433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23434 *) ac_try_echo=$ac_try;; 22589 *) ac_try_echo=$ac_try;;
23435esac 22590esac
23436eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23437$as_echo "$ac_try_echo") >&5
23438 (eval "$ac_compile") 2>conftest.er1 22592 (eval "$ac_compile") 2>conftest.er1
23439 ac_status=$? 22593 ac_status=$?
23440 grep -v '^ *+' conftest.er1 >conftest.err 22594 grep -v '^ *+' conftest.er1 >conftest.err
23441 rm -f conftest.er1 22595 rm -f conftest.er1
23442 cat conftest.err >&5 22596 cat conftest.err >&5
23443 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23444 (exit $ac_status); } && { 22598 (exit $ac_status); } && {
23445 test -z "$ac_c_werror_flag" || 22599 test -z "$ac_c_werror_flag" ||
23446 test ! -s conftest.err 22600 test ! -s conftest.err
23447 } && test -s conftest.$ac_objext; then 22601 } && test -s conftest.$ac_objext; then
23448 : 22602 ac_cv_type_in_port_t=yes
23449else 22603else
23450 $as_echo "$as_me: failed program was:" >&5 22604 echo "$as_me: failed program was:" >&5
23451sed 's/^/| /' conftest.$ac_ext >&5 22605sed 's/^/| /' conftest.$ac_ext >&5
23452 22606
23453 ac_cv_type_in_port_t=yes 22607 ac_cv_type_in_port_t=no
23454fi
23455
23456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23457else
23458 $as_echo "$as_me: failed program was:" >&5
23459sed 's/^/| /' conftest.$ac_ext >&5
23460
23461
23462fi 22608fi
23463 22609
23464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23465fi 22611fi
23466{ $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
23467$as_echo "$ac_cv_type_in_port_t" >&6; } 22613echo "${ECHO_T}$ac_cv_type_in_port_t" >&6; }
23468if test $ac_cv_type_in_port_t = yes; then 22614if test $ac_cv_type_in_port_t = yes; then
23469 22615
23470cat >>confdefs.h <<_ACEOF 22616cat >>confdefs.h <<_ACEOF
@@ -23475,10 +22621,10 @@ _ACEOF
23475fi 22621fi
23476 22622
23477 22623
23478{ $as_echo "$as_me:$LINENO: checking for size_t" >&5 22624{ echo "$as_me:$LINENO: checking for size_t" >&5
23479$as_echo_n "checking for size_t... " >&6; } 22625echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
23480if test "${ac_cv_have_size_t+set}" = set; then 22626if test "${ac_cv_have_size_t+set}" = set; then
23481 $as_echo_n "(cached) " >&6 22627 echo $ECHO_N "(cached) $ECHO_C" >&6
23482else 22628else
23483 22629
23484 cat >conftest.$ac_ext <<_ACEOF 22630 cat >conftest.$ac_ext <<_ACEOF
@@ -23504,21 +22650,20 @@ case "(($ac_try" in
23504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23505 *) ac_try_echo=$ac_try;; 22651 *) ac_try_echo=$ac_try;;
23506esac 22652esac
23507eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23508$as_echo "$ac_try_echo") >&5
23509 (eval "$ac_compile") 2>conftest.er1 22654 (eval "$ac_compile") 2>conftest.er1
23510 ac_status=$? 22655 ac_status=$?
23511 grep -v '^ *+' conftest.er1 >conftest.err 22656 grep -v '^ *+' conftest.er1 >conftest.err
23512 rm -f conftest.er1 22657 rm -f conftest.er1
23513 cat conftest.err >&5 22658 cat conftest.err >&5
23514 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23515 (exit $ac_status); } && { 22660 (exit $ac_status); } && {
23516 test -z "$ac_c_werror_flag" || 22661 test -z "$ac_c_werror_flag" ||
23517 test ! -s conftest.err 22662 test ! -s conftest.err
23518 } && test -s conftest.$ac_objext; then 22663 } && test -s conftest.$ac_objext; then
23519 ac_cv_have_size_t="yes" 22664 ac_cv_have_size_t="yes"
23520else 22665else
23521 $as_echo "$as_me: failed program was:" >&5 22666 echo "$as_me: failed program was:" >&5
23522sed 's/^/| /' conftest.$ac_ext >&5 22667sed 's/^/| /' conftest.$ac_ext >&5
23523 22668
23524 ac_cv_have_size_t="no" 22669 ac_cv_have_size_t="no"
@@ -23528,8 +22673,8 @@ fi
23528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23529 22674
23530fi 22675fi
23531{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_size_t" >&5 22676{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t" >&5
23532$as_echo "$ac_cv_have_size_t" >&6; } 22677echo "${ECHO_T}$ac_cv_have_size_t" >&6; }
23533if test "x$ac_cv_have_size_t" = "xyes" ; then 22678if test "x$ac_cv_have_size_t" = "xyes" ; then
23534 22679
23535cat >>confdefs.h <<\_ACEOF 22680cat >>confdefs.h <<\_ACEOF
@@ -23538,10 +22683,10 @@ _ACEOF
23538 22683
23539fi 22684fi
23540 22685
23541{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5 22686{ echo "$as_me:$LINENO: checking for ssize_t" >&5
23542$as_echo_n "checking for ssize_t... " >&6; } 22687echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
23543if test "${ac_cv_have_ssize_t+set}" = set; then 22688if test "${ac_cv_have_ssize_t+set}" = set; then
23544 $as_echo_n "(cached) " >&6 22689 echo $ECHO_N "(cached) $ECHO_C" >&6
23545else 22690else
23546 22691
23547 cat >conftest.$ac_ext <<_ACEOF 22692 cat >conftest.$ac_ext <<_ACEOF
@@ -23567,21 +22712,20 @@ case "(($ac_try" in
23567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23568 *) ac_try_echo=$ac_try;; 22713 *) ac_try_echo=$ac_try;;
23569esac 22714esac
23570eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23571$as_echo "$ac_try_echo") >&5
23572 (eval "$ac_compile") 2>conftest.er1 22716 (eval "$ac_compile") 2>conftest.er1
23573 ac_status=$? 22717 ac_status=$?
23574 grep -v '^ *+' conftest.er1 >conftest.err 22718 grep -v '^ *+' conftest.er1 >conftest.err
23575 rm -f conftest.er1 22719 rm -f conftest.er1
23576 cat conftest.err >&5 22720 cat conftest.err >&5
23577 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23578 (exit $ac_status); } && { 22722 (exit $ac_status); } && {
23579 test -z "$ac_c_werror_flag" || 22723 test -z "$ac_c_werror_flag" ||
23580 test ! -s conftest.err 22724 test ! -s conftest.err
23581 } && test -s conftest.$ac_objext; then 22725 } && test -s conftest.$ac_objext; then
23582 ac_cv_have_ssize_t="yes" 22726 ac_cv_have_ssize_t="yes"
23583else 22727else
23584 $as_echo "$as_me: failed program was:" >&5 22728 echo "$as_me: failed program was:" >&5
23585sed 's/^/| /' conftest.$ac_ext >&5 22729sed 's/^/| /' conftest.$ac_ext >&5
23586 22730
23587 ac_cv_have_ssize_t="no" 22731 ac_cv_have_ssize_t="no"
@@ -23591,8 +22735,8 @@ fi
23591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23592 22736
23593fi 22737fi
23594{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_ssize_t" >&5 22738{ echo "$as_me:$LINENO: result: $ac_cv_have_ssize_t" >&5
23595$as_echo "$ac_cv_have_ssize_t" >&6; } 22739echo "${ECHO_T}$ac_cv_have_ssize_t" >&6; }
23596if test "x$ac_cv_have_ssize_t" = "xyes" ; then 22740if test "x$ac_cv_have_ssize_t" = "xyes" ; then
23597 22741
23598cat >>confdefs.h <<\_ACEOF 22742cat >>confdefs.h <<\_ACEOF
@@ -23601,10 +22745,10 @@ _ACEOF
23601 22745
23602fi 22746fi
23603 22747
23604{ $as_echo "$as_me:$LINENO: checking for clock_t" >&5 22748{ echo "$as_me:$LINENO: checking for clock_t" >&5
23605$as_echo_n "checking for clock_t... " >&6; } 22749echo $ECHO_N "checking for clock_t... $ECHO_C" >&6; }
23606if test "${ac_cv_have_clock_t+set}" = set; then 22750if test "${ac_cv_have_clock_t+set}" = set; then
23607 $as_echo_n "(cached) " >&6 22751 echo $ECHO_N "(cached) $ECHO_C" >&6
23608else 22752else
23609 22753
23610 cat >conftest.$ac_ext <<_ACEOF 22754 cat >conftest.$ac_ext <<_ACEOF
@@ -23630,21 +22774,20 @@ case "(($ac_try" in
23630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23631 *) ac_try_echo=$ac_try;; 22775 *) ac_try_echo=$ac_try;;
23632esac 22776esac
23633eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23634$as_echo "$ac_try_echo") >&5
23635 (eval "$ac_compile") 2>conftest.er1 22778 (eval "$ac_compile") 2>conftest.er1
23636 ac_status=$? 22779 ac_status=$?
23637 grep -v '^ *+' conftest.er1 >conftest.err 22780 grep -v '^ *+' conftest.er1 >conftest.err
23638 rm -f conftest.er1 22781 rm -f conftest.er1
23639 cat conftest.err >&5 22782 cat conftest.err >&5
23640 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23641 (exit $ac_status); } && { 22784 (exit $ac_status); } && {
23642 test -z "$ac_c_werror_flag" || 22785 test -z "$ac_c_werror_flag" ||
23643 test ! -s conftest.err 22786 test ! -s conftest.err
23644 } && test -s conftest.$ac_objext; then 22787 } && test -s conftest.$ac_objext; then
23645 ac_cv_have_clock_t="yes" 22788 ac_cv_have_clock_t="yes"
23646else 22789else
23647 $as_echo "$as_me: failed program was:" >&5 22790 echo "$as_me: failed program was:" >&5
23648sed 's/^/| /' conftest.$ac_ext >&5 22791sed 's/^/| /' conftest.$ac_ext >&5
23649 22792
23650 ac_cv_have_clock_t="no" 22793 ac_cv_have_clock_t="no"
@@ -23654,8 +22797,8 @@ fi
23654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23655 22798
23656fi 22799fi
23657{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_clock_t" >&5 22800{ echo "$as_me:$LINENO: result: $ac_cv_have_clock_t" >&5
23658$as_echo "$ac_cv_have_clock_t" >&6; } 22801echo "${ECHO_T}$ac_cv_have_clock_t" >&6; }
23659if test "x$ac_cv_have_clock_t" = "xyes" ; then 22802if test "x$ac_cv_have_clock_t" = "xyes" ; then
23660 22803
23661cat >>confdefs.h <<\_ACEOF 22804cat >>confdefs.h <<\_ACEOF
@@ -23664,10 +22807,10 @@ _ACEOF
23664 22807
23665fi 22808fi
23666 22809
23667{ $as_echo "$as_me:$LINENO: checking for sa_family_t" >&5 22810{ echo "$as_me:$LINENO: checking for sa_family_t" >&5
23668$as_echo_n "checking for sa_family_t... " >&6; } 22811echo $ECHO_N "checking for sa_family_t... $ECHO_C" >&6; }
23669if test "${ac_cv_have_sa_family_t+set}" = set; then 22812if test "${ac_cv_have_sa_family_t+set}" = set; then
23670 $as_echo_n "(cached) " >&6 22813 echo $ECHO_N "(cached) $ECHO_C" >&6
23671else 22814else
23672 22815
23673 cat >conftest.$ac_ext <<_ACEOF 22816 cat >conftest.$ac_ext <<_ACEOF
@@ -23694,21 +22837,20 @@ case "(($ac_try" in
23694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23695 *) ac_try_echo=$ac_try;; 22838 *) ac_try_echo=$ac_try;;
23696esac 22839esac
23697eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23698$as_echo "$ac_try_echo") >&5
23699 (eval "$ac_compile") 2>conftest.er1 22841 (eval "$ac_compile") 2>conftest.er1
23700 ac_status=$? 22842 ac_status=$?
23701 grep -v '^ *+' conftest.er1 >conftest.err 22843 grep -v '^ *+' conftest.er1 >conftest.err
23702 rm -f conftest.er1 22844 rm -f conftest.er1
23703 cat conftest.err >&5 22845 cat conftest.err >&5
23704 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23705 (exit $ac_status); } && { 22847 (exit $ac_status); } && {
23706 test -z "$ac_c_werror_flag" || 22848 test -z "$ac_c_werror_flag" ||
23707 test ! -s conftest.err 22849 test ! -s conftest.err
23708 } && test -s conftest.$ac_objext; then 22850 } && test -s conftest.$ac_objext; then
23709 ac_cv_have_sa_family_t="yes" 22851 ac_cv_have_sa_family_t="yes"
23710else 22852else
23711 $as_echo "$as_me: failed program was:" >&5 22853 echo "$as_me: failed program was:" >&5
23712sed 's/^/| /' conftest.$ac_ext >&5 22854sed 's/^/| /' conftest.$ac_ext >&5
23713 22855
23714 cat >conftest.$ac_ext <<_ACEOF 22856 cat >conftest.$ac_ext <<_ACEOF
@@ -23736,21 +22878,20 @@ case "(($ac_try" in
23736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23737 *) ac_try_echo=$ac_try;; 22879 *) ac_try_echo=$ac_try;;
23738esac 22880esac
23739eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23740$as_echo "$ac_try_echo") >&5
23741 (eval "$ac_compile") 2>conftest.er1 22882 (eval "$ac_compile") 2>conftest.er1
23742 ac_status=$? 22883 ac_status=$?
23743 grep -v '^ *+' conftest.er1 >conftest.err 22884 grep -v '^ *+' conftest.er1 >conftest.err
23744 rm -f conftest.er1 22885 rm -f conftest.er1
23745 cat conftest.err >&5 22886 cat conftest.err >&5
23746 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23747 (exit $ac_status); } && { 22888 (exit $ac_status); } && {
23748 test -z "$ac_c_werror_flag" || 22889 test -z "$ac_c_werror_flag" ||
23749 test ! -s conftest.err 22890 test ! -s conftest.err
23750 } && test -s conftest.$ac_objext; then 22891 } && test -s conftest.$ac_objext; then
23751 ac_cv_have_sa_family_t="yes" 22892 ac_cv_have_sa_family_t="yes"
23752else 22893else
23753 $as_echo "$as_me: failed program was:" >&5 22894 echo "$as_me: failed program was:" >&5
23754sed 's/^/| /' conftest.$ac_ext >&5 22895sed 's/^/| /' conftest.$ac_ext >&5
23755 22896
23756 ac_cv_have_sa_family_t="no" 22897 ac_cv_have_sa_family_t="no"
@@ -23764,8 +22905,8 @@ fi
23764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23765 22906
23766fi 22907fi
23767{ $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
23768$as_echo "$ac_cv_have_sa_family_t" >&6; } 22909echo "${ECHO_T}$ac_cv_have_sa_family_t" >&6; }
23769if test "x$ac_cv_have_sa_family_t" = "xyes" ; then 22910if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
23770 22911
23771cat >>confdefs.h <<\_ACEOF 22912cat >>confdefs.h <<\_ACEOF
@@ -23774,10 +22915,10 @@ _ACEOF
23774 22915
23775fi 22916fi
23776 22917
23777{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5 22918{ echo "$as_me:$LINENO: checking for pid_t" >&5
23778$as_echo_n "checking for pid_t... " >&6; } 22919echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
23779if test "${ac_cv_have_pid_t+set}" = set; then 22920if test "${ac_cv_have_pid_t+set}" = set; then
23780 $as_echo_n "(cached) " >&6 22921 echo $ECHO_N "(cached) $ECHO_C" >&6
23781else 22922else
23782 22923
23783 cat >conftest.$ac_ext <<_ACEOF 22924 cat >conftest.$ac_ext <<_ACEOF
@@ -23803,21 +22944,20 @@ case "(($ac_try" in
23803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 22944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23804 *) ac_try_echo=$ac_try;; 22945 *) ac_try_echo=$ac_try;;
23805esac 22946esac
23806eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 22947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23807$as_echo "$ac_try_echo") >&5
23808 (eval "$ac_compile") 2>conftest.er1 22948 (eval "$ac_compile") 2>conftest.er1
23809 ac_status=$? 22949 ac_status=$?
23810 grep -v '^ *+' conftest.er1 >conftest.err 22950 grep -v '^ *+' conftest.er1 >conftest.err
23811 rm -f conftest.er1 22951 rm -f conftest.er1
23812 cat conftest.err >&5 22952 cat conftest.err >&5
23813 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 22953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23814 (exit $ac_status); } && { 22954 (exit $ac_status); } && {
23815 test -z "$ac_c_werror_flag" || 22955 test -z "$ac_c_werror_flag" ||
23816 test ! -s conftest.err 22956 test ! -s conftest.err
23817 } && test -s conftest.$ac_objext; then 22957 } && test -s conftest.$ac_objext; then
23818 ac_cv_have_pid_t="yes" 22958 ac_cv_have_pid_t="yes"
23819else 22959else
23820 $as_echo "$as_me: failed program was:" >&5 22960 echo "$as_me: failed program was:" >&5
23821sed 's/^/| /' conftest.$ac_ext >&5 22961sed 's/^/| /' conftest.$ac_ext >&5
23822 22962
23823 ac_cv_have_pid_t="no" 22963 ac_cv_have_pid_t="no"
@@ -23827,8 +22967,8 @@ fi
23827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23828 22968
23829fi 22969fi
23830{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_pid_t" >&5 22970{ echo "$as_me:$LINENO: result: $ac_cv_have_pid_t" >&5
23831$as_echo "$ac_cv_have_pid_t" >&6; } 22971echo "${ECHO_T}$ac_cv_have_pid_t" >&6; }
23832if test "x$ac_cv_have_pid_t" = "xyes" ; then 22972if test "x$ac_cv_have_pid_t" = "xyes" ; then
23833 22973
23834cat >>confdefs.h <<\_ACEOF 22974cat >>confdefs.h <<\_ACEOF
@@ -23837,10 +22977,10 @@ _ACEOF
23837 22977
23838fi 22978fi
23839 22979
23840{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5 22980{ echo "$as_me:$LINENO: checking for mode_t" >&5
23841$as_echo_n "checking for mode_t... " >&6; } 22981echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
23842if test "${ac_cv_have_mode_t+set}" = set; then 22982if test "${ac_cv_have_mode_t+set}" = set; then
23843 $as_echo_n "(cached) " >&6 22983 echo $ECHO_N "(cached) $ECHO_C" >&6
23844else 22984else
23845 22985
23846 cat >conftest.$ac_ext <<_ACEOF 22986 cat >conftest.$ac_ext <<_ACEOF
@@ -23866,21 +23006,20 @@ case "(($ac_try" in
23866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23867 *) ac_try_echo=$ac_try;; 23007 *) ac_try_echo=$ac_try;;
23868esac 23008esac
23869eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23870$as_echo "$ac_try_echo") >&5
23871 (eval "$ac_compile") 2>conftest.er1 23010 (eval "$ac_compile") 2>conftest.er1
23872 ac_status=$? 23011 ac_status=$?
23873 grep -v '^ *+' conftest.er1 >conftest.err 23012 grep -v '^ *+' conftest.er1 >conftest.err
23874 rm -f conftest.er1 23013 rm -f conftest.er1
23875 cat conftest.err >&5 23014 cat conftest.err >&5
23876 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23877 (exit $ac_status); } && { 23016 (exit $ac_status); } && {
23878 test -z "$ac_c_werror_flag" || 23017 test -z "$ac_c_werror_flag" ||
23879 test ! -s conftest.err 23018 test ! -s conftest.err
23880 } && test -s conftest.$ac_objext; then 23019 } && test -s conftest.$ac_objext; then
23881 ac_cv_have_mode_t="yes" 23020 ac_cv_have_mode_t="yes"
23882else 23021else
23883 $as_echo "$as_me: failed program was:" >&5 23022 echo "$as_me: failed program was:" >&5
23884sed 's/^/| /' conftest.$ac_ext >&5 23023sed 's/^/| /' conftest.$ac_ext >&5
23885 23024
23886 ac_cv_have_mode_t="no" 23025 ac_cv_have_mode_t="no"
@@ -23890,8 +23029,8 @@ fi
23890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 23029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23891 23030
23892fi 23031fi
23893{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_mode_t" >&5 23032{ echo "$as_me:$LINENO: result: $ac_cv_have_mode_t" >&5
23894$as_echo "$ac_cv_have_mode_t" >&6; } 23033echo "${ECHO_T}$ac_cv_have_mode_t" >&6; }
23895if test "x$ac_cv_have_mode_t" = "xyes" ; then 23034if test "x$ac_cv_have_mode_t" = "xyes" ; then
23896 23035
23897cat >>confdefs.h <<\_ACEOF 23036cat >>confdefs.h <<\_ACEOF
@@ -23901,10 +23040,10 @@ _ACEOF
23901fi 23040fi
23902 23041
23903 23042
23904{ $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5 23043{ echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
23905$as_echo_n "checking for struct sockaddr_storage... " >&6; } 23044echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6; }
23906if test "${ac_cv_have_struct_sockaddr_storage+set}" = set; then 23045if test "${ac_cv_have_struct_sockaddr_storage+set}" = set; then
23907 $as_echo_n "(cached) " >&6 23046 echo $ECHO_N "(cached) $ECHO_C" >&6
23908else 23047else
23909 23048
23910 cat >conftest.$ac_ext <<_ACEOF 23049 cat >conftest.$ac_ext <<_ACEOF
@@ -23931,21 +23070,20 @@ case "(($ac_try" in
23931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23932 *) ac_try_echo=$ac_try;; 23071 *) ac_try_echo=$ac_try;;
23933esac 23072esac
23934eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23935$as_echo "$ac_try_echo") >&5
23936 (eval "$ac_compile") 2>conftest.er1 23074 (eval "$ac_compile") 2>conftest.er1
23937 ac_status=$? 23075 ac_status=$?
23938 grep -v '^ *+' conftest.er1 >conftest.err 23076 grep -v '^ *+' conftest.er1 >conftest.err
23939 rm -f conftest.er1 23077 rm -f conftest.er1
23940 cat conftest.err >&5 23078 cat conftest.err >&5
23941 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23942 (exit $ac_status); } && { 23080 (exit $ac_status); } && {
23943 test -z "$ac_c_werror_flag" || 23081 test -z "$ac_c_werror_flag" ||
23944 test ! -s conftest.err 23082 test ! -s conftest.err
23945 } && test -s conftest.$ac_objext; then 23083 } && test -s conftest.$ac_objext; then
23946 ac_cv_have_struct_sockaddr_storage="yes" 23084 ac_cv_have_struct_sockaddr_storage="yes"
23947else 23085else
23948 $as_echo "$as_me: failed program was:" >&5 23086 echo "$as_me: failed program was:" >&5
23949sed 's/^/| /' conftest.$ac_ext >&5 23087sed 's/^/| /' conftest.$ac_ext >&5
23950 23088
23951 ac_cv_have_struct_sockaddr_storage="no" 23089 ac_cv_have_struct_sockaddr_storage="no"
@@ -23955,8 +23093,8 @@ fi
23955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 23093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23956 23094
23957fi 23095fi
23958{ $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
23959$as_echo "$ac_cv_have_struct_sockaddr_storage" >&6; } 23097echo "${ECHO_T}$ac_cv_have_struct_sockaddr_storage" >&6; }
23960if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then 23098if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
23961 23099
23962cat >>confdefs.h <<\_ACEOF 23100cat >>confdefs.h <<\_ACEOF
@@ -23965,10 +23103,10 @@ _ACEOF
23965 23103
23966fi 23104fi
23967 23105
23968{ $as_echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5 23106{ echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
23969$as_echo_n "checking for struct sockaddr_in6... " >&6; } 23107echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6; }
23970if test "${ac_cv_have_struct_sockaddr_in6+set}" = set; then 23108if test "${ac_cv_have_struct_sockaddr_in6+set}" = set; then
23971 $as_echo_n "(cached) " >&6 23109 echo $ECHO_N "(cached) $ECHO_C" >&6
23972else 23110else
23973 23111
23974 cat >conftest.$ac_ext <<_ACEOF 23112 cat >conftest.$ac_ext <<_ACEOF
@@ -23995,21 +23133,20 @@ case "(($ac_try" in
23995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23996 *) ac_try_echo=$ac_try;; 23134 *) ac_try_echo=$ac_try;;
23997esac 23135esac
23998eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23999$as_echo "$ac_try_echo") >&5
24000 (eval "$ac_compile") 2>conftest.er1 23137 (eval "$ac_compile") 2>conftest.er1
24001 ac_status=$? 23138 ac_status=$?
24002 grep -v '^ *+' conftest.er1 >conftest.err 23139 grep -v '^ *+' conftest.er1 >conftest.err
24003 rm -f conftest.er1 23140 rm -f conftest.er1
24004 cat conftest.err >&5 23141 cat conftest.err >&5
24005 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24006 (exit $ac_status); } && { 23143 (exit $ac_status); } && {
24007 test -z "$ac_c_werror_flag" || 23144 test -z "$ac_c_werror_flag" ||
24008 test ! -s conftest.err 23145 test ! -s conftest.err
24009 } && test -s conftest.$ac_objext; then 23146 } && test -s conftest.$ac_objext; then
24010 ac_cv_have_struct_sockaddr_in6="yes" 23147 ac_cv_have_struct_sockaddr_in6="yes"
24011else 23148else
24012 $as_echo "$as_me: failed program was:" >&5 23149 echo "$as_me: failed program was:" >&5
24013sed 's/^/| /' conftest.$ac_ext >&5 23150sed 's/^/| /' conftest.$ac_ext >&5
24014 23151
24015 ac_cv_have_struct_sockaddr_in6="no" 23152 ac_cv_have_struct_sockaddr_in6="no"
@@ -24019,8 +23156,8 @@ fi
24019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 23156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24020 23157
24021fi 23158fi
24022{ $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
24023$as_echo "$ac_cv_have_struct_sockaddr_in6" >&6; } 23160echo "${ECHO_T}$ac_cv_have_struct_sockaddr_in6" >&6; }
24024if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then 23161if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
24025 23162
24026cat >>confdefs.h <<\_ACEOF 23163cat >>confdefs.h <<\_ACEOF
@@ -24029,10 +23166,10 @@ _ACEOF
24029 23166
24030fi 23167fi
24031 23168
24032{ $as_echo "$as_me:$LINENO: checking for struct in6_addr" >&5 23169{ echo "$as_me:$LINENO: checking for struct in6_addr" >&5
24033$as_echo_n "checking for struct in6_addr... " >&6; } 23170echo $ECHO_N "checking for struct in6_addr... $ECHO_C" >&6; }
24034if test "${ac_cv_have_struct_in6_addr+set}" = set; then 23171if test "${ac_cv_have_struct_in6_addr+set}" = set; then
24035 $as_echo_n "(cached) " >&6 23172 echo $ECHO_N "(cached) $ECHO_C" >&6
24036else 23173else
24037 23174
24038 cat >conftest.$ac_ext <<_ACEOF 23175 cat >conftest.$ac_ext <<_ACEOF
@@ -24059,21 +23196,20 @@ case "(($ac_try" in
24059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24060 *) ac_try_echo=$ac_try;; 23197 *) ac_try_echo=$ac_try;;
24061esac 23198esac
24062eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24063$as_echo "$ac_try_echo") >&5
24064 (eval "$ac_compile") 2>conftest.er1 23200 (eval "$ac_compile") 2>conftest.er1
24065 ac_status=$? 23201 ac_status=$?
24066 grep -v '^ *+' conftest.er1 >conftest.err 23202 grep -v '^ *+' conftest.er1 >conftest.err
24067 rm -f conftest.er1 23203 rm -f conftest.er1
24068 cat conftest.err >&5 23204 cat conftest.err >&5
24069 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24070 (exit $ac_status); } && { 23206 (exit $ac_status); } && {
24071 test -z "$ac_c_werror_flag" || 23207 test -z "$ac_c_werror_flag" ||
24072 test ! -s conftest.err 23208 test ! -s conftest.err
24073 } && test -s conftest.$ac_objext; then 23209 } && test -s conftest.$ac_objext; then
24074 ac_cv_have_struct_in6_addr="yes" 23210 ac_cv_have_struct_in6_addr="yes"
24075else 23211else
24076 $as_echo "$as_me: failed program was:" >&5 23212 echo "$as_me: failed program was:" >&5
24077sed 's/^/| /' conftest.$ac_ext >&5 23213sed 's/^/| /' conftest.$ac_ext >&5
24078 23214
24079 ac_cv_have_struct_in6_addr="no" 23215 ac_cv_have_struct_in6_addr="no"
@@ -24083,8 +23219,8 @@ fi
24083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 23219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24084 23220
24085fi 23221fi
24086{ $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
24087$as_echo "$ac_cv_have_struct_in6_addr" >&6; } 23223echo "${ECHO_T}$ac_cv_have_struct_in6_addr" >&6; }
24088if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then 23224if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
24089 23225
24090cat >>confdefs.h <<\_ACEOF 23226cat >>confdefs.h <<\_ACEOF
@@ -24092,10 +23228,10 @@ cat >>confdefs.h <<\_ACEOF
24092_ACEOF 23228_ACEOF
24093 23229
24094 23230
24095 { $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
24096$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; }
24097if 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
24098 $as_echo_n "(cached) " >&6 23234 echo $ECHO_N "(cached) $ECHO_C" >&6
24099else 23235else
24100 cat >conftest.$ac_ext <<_ACEOF 23236 cat >conftest.$ac_ext <<_ACEOF
24101/* confdefs.h. */ 23237/* confdefs.h. */
@@ -24126,21 +23262,20 @@ case "(($ac_try" in
24126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24127 *) ac_try_echo=$ac_try;; 23263 *) ac_try_echo=$ac_try;;
24128esac 23264esac
24129eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24130$as_echo "$ac_try_echo") >&5
24131 (eval "$ac_compile") 2>conftest.er1 23266 (eval "$ac_compile") 2>conftest.er1
24132 ac_status=$? 23267 ac_status=$?
24133 grep -v '^ *+' conftest.er1 >conftest.err 23268 grep -v '^ *+' conftest.er1 >conftest.err
24134 rm -f conftest.er1 23269 rm -f conftest.er1
24135 cat conftest.err >&5 23270 cat conftest.err >&5
24136 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24137 (exit $ac_status); } && { 23272 (exit $ac_status); } && {
24138 test -z "$ac_c_werror_flag" || 23273 test -z "$ac_c_werror_flag" ||
24139 test ! -s conftest.err 23274 test ! -s conftest.err
24140 } && test -s conftest.$ac_objext; then 23275 } && test -s conftest.$ac_objext; then
24141 ac_cv_member_struct_sockaddr_in6_sin6_scope_id=yes 23276 ac_cv_member_struct_sockaddr_in6_sin6_scope_id=yes
24142else 23277else
24143 $as_echo "$as_me: failed program was:" >&5 23278 echo "$as_me: failed program was:" >&5
24144sed 's/^/| /' conftest.$ac_ext >&5 23279sed 's/^/| /' conftest.$ac_ext >&5
24145 23280
24146 cat >conftest.$ac_ext <<_ACEOF 23281 cat >conftest.$ac_ext <<_ACEOF
@@ -24172,21 +23307,20 @@ case "(($ac_try" in
24172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24173 *) ac_try_echo=$ac_try;; 23308 *) ac_try_echo=$ac_try;;
24174esac 23309esac
24175eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24176$as_echo "$ac_try_echo") >&5
24177 (eval "$ac_compile") 2>conftest.er1 23311 (eval "$ac_compile") 2>conftest.er1
24178 ac_status=$? 23312 ac_status=$?
24179 grep -v '^ *+' conftest.er1 >conftest.err 23313 grep -v '^ *+' conftest.er1 >conftest.err
24180 rm -f conftest.er1 23314 rm -f conftest.er1
24181 cat conftest.err >&5 23315 cat conftest.err >&5
24182 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24183 (exit $ac_status); } && { 23317 (exit $ac_status); } && {
24184 test -z "$ac_c_werror_flag" || 23318 test -z "$ac_c_werror_flag" ||
24185 test ! -s conftest.err 23319 test ! -s conftest.err
24186 } && test -s conftest.$ac_objext; then 23320 } && test -s conftest.$ac_objext; then
24187 ac_cv_member_struct_sockaddr_in6_sin6_scope_id=yes 23321 ac_cv_member_struct_sockaddr_in6_sin6_scope_id=yes
24188else 23322else
24189 $as_echo "$as_me: failed program was:" >&5 23323 echo "$as_me: failed program was:" >&5
24190sed 's/^/| /' conftest.$ac_ext >&5 23324sed 's/^/| /' conftest.$ac_ext >&5
24191 23325
24192 ac_cv_member_struct_sockaddr_in6_sin6_scope_id=no 23326 ac_cv_member_struct_sockaddr_in6_sin6_scope_id=no
@@ -24197,8 +23331,8 @@ fi
24197 23331
24198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 23332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24199fi 23333fi
24200{ $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
24201$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; }
24202if 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
24203 23337
24204cat >>confdefs.h <<_ACEOF 23338cat >>confdefs.h <<_ACEOF
@@ -24210,10 +23344,10 @@ fi
24210 23344
24211fi 23345fi
24212 23346
24213{ $as_echo "$as_me:$LINENO: checking for struct addrinfo" >&5 23347{ echo "$as_me:$LINENO: checking for struct addrinfo" >&5
24214$as_echo_n "checking for struct addrinfo... " >&6; } 23348echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6; }
24215if test "${ac_cv_have_struct_addrinfo+set}" = set; then 23349if test "${ac_cv_have_struct_addrinfo+set}" = set; then
24216 $as_echo_n "(cached) " >&6 23350 echo $ECHO_N "(cached) $ECHO_C" >&6
24217else 23351else
24218 23352
24219 cat >conftest.$ac_ext <<_ACEOF 23353 cat >conftest.$ac_ext <<_ACEOF
@@ -24241,21 +23375,20 @@ case "(($ac_try" in
24241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24242 *) ac_try_echo=$ac_try;; 23376 *) ac_try_echo=$ac_try;;
24243esac 23377esac
24244eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24245$as_echo "$ac_try_echo") >&5
24246 (eval "$ac_compile") 2>conftest.er1 23379 (eval "$ac_compile") 2>conftest.er1
24247 ac_status=$? 23380 ac_status=$?
24248 grep -v '^ *+' conftest.er1 >conftest.err 23381 grep -v '^ *+' conftest.er1 >conftest.err
24249 rm -f conftest.er1 23382 rm -f conftest.er1
24250 cat conftest.err >&5 23383 cat conftest.err >&5
24251 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24252 (exit $ac_status); } && { 23385 (exit $ac_status); } && {
24253 test -z "$ac_c_werror_flag" || 23386 test -z "$ac_c_werror_flag" ||
24254 test ! -s conftest.err 23387 test ! -s conftest.err
24255 } && test -s conftest.$ac_objext; then 23388 } && test -s conftest.$ac_objext; then
24256 ac_cv_have_struct_addrinfo="yes" 23389 ac_cv_have_struct_addrinfo="yes"
24257else 23390else
24258 $as_echo "$as_me: failed program was:" >&5 23391 echo "$as_me: failed program was:" >&5
24259sed 's/^/| /' conftest.$ac_ext >&5 23392sed 's/^/| /' conftest.$ac_ext >&5
24260 23393
24261 ac_cv_have_struct_addrinfo="no" 23394 ac_cv_have_struct_addrinfo="no"
@@ -24265,8 +23398,8 @@ fi
24265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 23398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24266 23399
24267fi 23400fi
24268{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_struct_addrinfo" >&5 23401{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_addrinfo" >&5
24269$as_echo "$ac_cv_have_struct_addrinfo" >&6; } 23402echo "${ECHO_T}$ac_cv_have_struct_addrinfo" >&6; }
24270if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then 23403if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
24271 23404
24272cat >>confdefs.h <<\_ACEOF 23405cat >>confdefs.h <<\_ACEOF
@@ -24275,10 +23408,10 @@ _ACEOF
24275 23408
24276fi 23409fi
24277 23410
24278{ $as_echo "$as_me:$LINENO: checking for struct timeval" >&5 23411{ echo "$as_me:$LINENO: checking for struct timeval" >&5
24279$as_echo_n "checking for struct timeval... " >&6; } 23412echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
24280if test "${ac_cv_have_struct_timeval+set}" = set; then 23413if test "${ac_cv_have_struct_timeval+set}" = set; then
24281 $as_echo_n "(cached) " >&6 23414 echo $ECHO_N "(cached) $ECHO_C" >&6
24282else 23415else
24283 23416
24284 cat >conftest.$ac_ext <<_ACEOF 23417 cat >conftest.$ac_ext <<_ACEOF
@@ -24302,21 +23435,20 @@ case "(($ac_try" in
24302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24303 *) ac_try_echo=$ac_try;; 23436 *) ac_try_echo=$ac_try;;
24304esac 23437esac
24305eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24306$as_echo "$ac_try_echo") >&5
24307 (eval "$ac_compile") 2>conftest.er1 23439 (eval "$ac_compile") 2>conftest.er1
24308 ac_status=$? 23440 ac_status=$?
24309 grep -v '^ *+' conftest.er1 >conftest.err 23441 grep -v '^ *+' conftest.er1 >conftest.err
24310 rm -f conftest.er1 23442 rm -f conftest.er1
24311 cat conftest.err >&5 23443 cat conftest.err >&5
24312 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24313 (exit $ac_status); } && { 23445 (exit $ac_status); } && {
24314 test -z "$ac_c_werror_flag" || 23446 test -z "$ac_c_werror_flag" ||
24315 test ! -s conftest.err 23447 test ! -s conftest.err
24316 } && test -s conftest.$ac_objext; then 23448 } && test -s conftest.$ac_objext; then
24317 ac_cv_have_struct_timeval="yes" 23449 ac_cv_have_struct_timeval="yes"
24318else 23450else
24319 $as_echo "$as_me: failed program was:" >&5 23451 echo "$as_me: failed program was:" >&5
24320sed 's/^/| /' conftest.$ac_ext >&5 23452sed 's/^/| /' conftest.$ac_ext >&5
24321 23453
24322 ac_cv_have_struct_timeval="no" 23454 ac_cv_have_struct_timeval="no"
@@ -24326,8 +23458,8 @@ fi
24326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 23458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24327 23459
24328fi 23460fi
24329{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_struct_timeval" >&5 23461{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_timeval" >&5
24330$as_echo "$ac_cv_have_struct_timeval" >&6; } 23462echo "${ECHO_T}$ac_cv_have_struct_timeval" >&6; }
24331if test "x$ac_cv_have_struct_timeval" = "xyes" ; then 23463if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
24332 23464
24333cat >>confdefs.h <<\_ACEOF 23465cat >>confdefs.h <<\_ACEOF
@@ -24337,46 +23469,11 @@ _ACEOF
24337 have_struct_timeval=1 23469 have_struct_timeval=1
24338fi 23470fi
24339 23471
24340{ $as_echo "$as_me:$LINENO: checking for struct timespec" >&5 23472{ echo "$as_me:$LINENO: checking for struct timespec" >&5
24341$as_echo_n "checking for struct timespec... " >&6; } 23473echo $ECHO_N "checking for struct timespec... $ECHO_C" >&6; }
24342if test "${ac_cv_type_struct_timespec+set}" = set; then 23474if test "${ac_cv_type_struct_timespec+set}" = set; then
24343 $as_echo_n "(cached) " >&6 23475 echo $ECHO_N "(cached) $ECHO_C" >&6
24344else 23476else
24345 ac_cv_type_struct_timespec=no
24346cat >conftest.$ac_ext <<_ACEOF
24347/* confdefs.h. */
24348_ACEOF
24349cat confdefs.h >>conftest.$ac_ext
24350cat >>conftest.$ac_ext <<_ACEOF
24351/* end confdefs.h. */
24352$ac_includes_default
24353int
24354main ()
24355{
24356if (sizeof (struct timespec))
24357 return 0;
24358 ;
24359 return 0;
24360}
24361_ACEOF
24362rm -f conftest.$ac_objext
24363if { (ac_try="$ac_compile"
24364case "(($ac_try" in
24365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24366 *) ac_try_echo=$ac_try;;
24367esac
24368eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24369$as_echo "$ac_try_echo") >&5
24370 (eval "$ac_compile") 2>conftest.er1
24371 ac_status=$?
24372 grep -v '^ *+' conftest.er1 >conftest.err
24373 rm -f conftest.er1
24374 cat conftest.err >&5
24375 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24376 (exit $ac_status); } && {
24377 test -z "$ac_c_werror_flag" ||
24378 test ! -s conftest.err
24379 } && test -s conftest.$ac_objext; then
24380 cat >conftest.$ac_ext <<_ACEOF 23477 cat >conftest.$ac_ext <<_ACEOF
24381/* confdefs.h. */ 23478/* confdefs.h. */
24382_ACEOF 23479_ACEOF
@@ -24384,11 +23481,14 @@ cat confdefs.h >>conftest.$ac_ext
24384cat >>conftest.$ac_ext <<_ACEOF 23481cat >>conftest.$ac_ext <<_ACEOF
24385/* end confdefs.h. */ 23482/* end confdefs.h. */
24386$ac_includes_default 23483$ac_includes_default
23484typedef struct timespec ac__type_new_;
24387int 23485int
24388main () 23486main ()
24389{ 23487{
24390if (sizeof ((struct timespec))) 23488if ((ac__type_new_ *) 0)
24391 return 0; 23489 return 0;
23490if (sizeof (ac__type_new_))
23491 return 0;
24392 ; 23492 ;
24393 return 0; 23493 return 0;
24394} 23494}
@@ -24399,38 +23499,29 @@ case "(($ac_try" in
24399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24400 *) ac_try_echo=$ac_try;; 23500 *) ac_try_echo=$ac_try;;
24401esac 23501esac
24402eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24403$as_echo "$ac_try_echo") >&5
24404 (eval "$ac_compile") 2>conftest.er1 23503 (eval "$ac_compile") 2>conftest.er1
24405 ac_status=$? 23504 ac_status=$?
24406 grep -v '^ *+' conftest.er1 >conftest.err 23505 grep -v '^ *+' conftest.er1 >conftest.err
24407 rm -f conftest.er1 23506 rm -f conftest.er1
24408 cat conftest.err >&5 23507 cat conftest.err >&5
24409 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24410 (exit $ac_status); } && { 23509 (exit $ac_status); } && {
24411 test -z "$ac_c_werror_flag" || 23510 test -z "$ac_c_werror_flag" ||
24412 test ! -s conftest.err 23511 test ! -s conftest.err
24413 } && test -s conftest.$ac_objext; then 23512 } && test -s conftest.$ac_objext; then
24414 : 23513 ac_cv_type_struct_timespec=yes
24415else
24416 $as_echo "$as_me: failed program was:" >&5
24417sed 's/^/| /' conftest.$ac_ext >&5
24418
24419 ac_cv_type_struct_timespec=yes
24420fi
24421
24422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24423else 23514else
24424 $as_echo "$as_me: failed program was:" >&5 23515 echo "$as_me: failed program was:" >&5
24425sed 's/^/| /' conftest.$ac_ext >&5 23516sed 's/^/| /' conftest.$ac_ext >&5
24426 23517
24427 23518 ac_cv_type_struct_timespec=no
24428fi 23519fi
24429 23520
24430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 23521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24431fi 23522fi
24432{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_timespec" >&5 23523{ echo "$as_me:$LINENO: result: $ac_cv_type_struct_timespec" >&5
24433$as_echo "$ac_cv_type_struct_timespec" >&6; } 23524echo "${ECHO_T}$ac_cv_type_struct_timespec" >&6; }
24434if test $ac_cv_type_struct_timespec = yes; then 23525if test $ac_cv_type_struct_timespec = yes; then
24435 23526
24436cat >>confdefs.h <<_ACEOF 23527cat >>confdefs.h <<_ACEOF
@@ -24451,8 +23542,8 @@ if test "x$ac_cv_have_int64_t" = "xno" && \
24451 exit 1; 23542 exit 1;
24452else 23543else
24453 if test "$cross_compiling" = yes; then 23544 if test "$cross_compiling" = yes; then
24454 { $as_echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working snprintf()" >&5 23545 { echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working snprintf()" >&5
24455$as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;} 23546echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
24456 23547
24457else 23548else
24458 cat >conftest.$ac_ext <<_ACEOF 23549 cat >conftest.$ac_ext <<_ACEOF
@@ -24492,26 +23583,24 @@ case "(($ac_try" in
24492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24493 *) ac_try_echo=$ac_try;; 23584 *) ac_try_echo=$ac_try;;
24494esac 23585esac
24495eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24496$as_echo "$ac_try_echo") >&5
24497 (eval "$ac_link") 2>&5 23587 (eval "$ac_link") 2>&5
24498 ac_status=$? 23588 ac_status=$?
24499 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24500 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 23590 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24501 { (case "(($ac_try" in 23591 { (case "(($ac_try" in
24502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 23592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24503 *) ac_try_echo=$ac_try;; 23593 *) ac_try_echo=$ac_try;;
24504esac 23594esac
24505eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 23595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24506$as_echo "$ac_try_echo") >&5
24507 (eval "$ac_try") 2>&5 23596 (eval "$ac_try") 2>&5
24508 ac_status=$? 23597 ac_status=$?
24509 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 23598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24510 (exit $ac_status); }; }; then 23599 (exit $ac_status); }; }; then
24511 true 23600 true
24512else 23601else
24513 $as_echo "$as_me: program exited with status $ac_status" >&5 23602 echo "$as_me: program exited with status $ac_status" >&5
24514$as_echo "$as_me: failed program was:" >&5 23603echo "$as_me: failed program was:" >&5
24515sed 's/^/| /' conftest.$ac_ext >&5 23604sed 's/^/| /' conftest.$ac_ext >&5
24516 23605
24517( exit $ac_status ) 23606( exit $ac_status )
@@ -24520,7 +23609,6 @@ sed 's/^/| /' conftest.$ac_ext >&5
24520_ACEOF 23609_ACEOF
24521 23610
24522fi 23611fi
24523rm -rf conftest.dSYM
24524rm -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
24525fi 23613fi
24526 23614
@@ -24531,10 +23619,10 @@ fi
24531# look for field 'ut_host' in header 'utmp.h' 23619# look for field 'ut_host' in header 'utmp.h'
24532 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 23620 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
24533 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host 23621 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
24534 { $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
24535$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; }
24536 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
24537 $as_echo_n "(cached) " >&6 23625 echo $ECHO_N "(cached) $ECHO_C" >&6
24538else 23626else
24539 23627
24540 cat >conftest.$ac_ext <<_ACEOF 23628 cat >conftest.$ac_ext <<_ACEOF
@@ -24558,8 +23646,8 @@ fi
24558 23646
24559 ossh_result=`eval 'echo $'"$ossh_varname"` 23647 ossh_result=`eval 'echo $'"$ossh_varname"`
24560 if test -n "`echo $ossh_varname`"; then 23648 if test -n "`echo $ossh_varname`"; then
24561 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 23649 { echo "$as_me:$LINENO: result: $ossh_result" >&5
24562$as_echo "$ossh_result" >&6; } 23650echo "${ECHO_T}$ossh_result" >&6; }
24563 if test "x$ossh_result" = "xyes"; then 23651 if test "x$ossh_result" = "xyes"; then
24564 23652
24565cat >>confdefs.h <<\_ACEOF 23653cat >>confdefs.h <<\_ACEOF
@@ -24568,18 +23656,18 @@ _ACEOF
24568 23656
24569 fi 23657 fi
24570 else 23658 else
24571 { $as_echo "$as_me:$LINENO: result: no" >&5 23659 { echo "$as_me:$LINENO: result: no" >&5
24572$as_echo "no" >&6; } 23660echo "${ECHO_T}no" >&6; }
24573 fi 23661 fi
24574 23662
24575 23663
24576# look for field 'ut_host' in header 'utmpx.h' 23664# look for field 'ut_host' in header 'utmpx.h'
24577 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 23665 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
24578 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host 23666 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
24579 { $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
24580$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; }
24581 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
24582 $as_echo_n "(cached) " >&6 23670 echo $ECHO_N "(cached) $ECHO_C" >&6
24583else 23671else
24584 23672
24585 cat >conftest.$ac_ext <<_ACEOF 23673 cat >conftest.$ac_ext <<_ACEOF
@@ -24603,8 +23691,8 @@ fi
24603 23691
24604 ossh_result=`eval 'echo $'"$ossh_varname"` 23692 ossh_result=`eval 'echo $'"$ossh_varname"`
24605 if test -n "`echo $ossh_varname`"; then 23693 if test -n "`echo $ossh_varname`"; then
24606 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 23694 { echo "$as_me:$LINENO: result: $ossh_result" >&5
24607$as_echo "$ossh_result" >&6; } 23695echo "${ECHO_T}$ossh_result" >&6; }
24608 if test "x$ossh_result" = "xyes"; then 23696 if test "x$ossh_result" = "xyes"; then
24609 23697
24610cat >>confdefs.h <<\_ACEOF 23698cat >>confdefs.h <<\_ACEOF
@@ -24613,18 +23701,18 @@ _ACEOF
24613 23701
24614 fi 23702 fi
24615 else 23703 else
24616 { $as_echo "$as_me:$LINENO: result: no" >&5 23704 { echo "$as_me:$LINENO: result: no" >&5
24617$as_echo "no" >&6; } 23705echo "${ECHO_T}no" >&6; }
24618 fi 23706 fi
24619 23707
24620 23708
24621# look for field 'syslen' in header 'utmpx.h' 23709# look for field 'syslen' in header 'utmpx.h'
24622 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 23710 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
24623 ossh_varname="ossh_cv_$ossh_safe""_has_"syslen 23711 ossh_varname="ossh_cv_$ossh_safe""_has_"syslen
24624 { $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
24625$as_echo_n "checking for syslen field in utmpx.h... " >&6; } 23713echo $ECHO_N "checking for syslen field in utmpx.h... $ECHO_C" >&6; }
24626 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
24627 $as_echo_n "(cached) " >&6 23715 echo $ECHO_N "(cached) $ECHO_C" >&6
24628else 23716else
24629 23717
24630 cat >conftest.$ac_ext <<_ACEOF 23718 cat >conftest.$ac_ext <<_ACEOF
@@ -24648,8 +23736,8 @@ fi
24648 23736
24649 ossh_result=`eval 'echo $'"$ossh_varname"` 23737 ossh_result=`eval 'echo $'"$ossh_varname"`
24650 if test -n "`echo $ossh_varname`"; then 23738 if test -n "`echo $ossh_varname`"; then
24651 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 23739 { echo "$as_me:$LINENO: result: $ossh_result" >&5
24652$as_echo "$ossh_result" >&6; } 23740echo "${ECHO_T}$ossh_result" >&6; }
24653 if test "x$ossh_result" = "xyes"; then 23741 if test "x$ossh_result" = "xyes"; then
24654 23742
24655cat >>confdefs.h <<\_ACEOF 23743cat >>confdefs.h <<\_ACEOF
@@ -24658,18 +23746,18 @@ _ACEOF
24658 23746
24659 fi 23747 fi
24660 else 23748 else
24661 { $as_echo "$as_me:$LINENO: result: no" >&5 23749 { echo "$as_me:$LINENO: result: no" >&5
24662$as_echo "no" >&6; } 23750echo "${ECHO_T}no" >&6; }
24663 fi 23751 fi
24664 23752
24665 23753
24666# look for field 'ut_pid' in header 'utmp.h' 23754# look for field 'ut_pid' in header 'utmp.h'
24667 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 23755 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
24668 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid 23756 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid
24669 { $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
24670$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; }
24671 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
24672 $as_echo_n "(cached) " >&6 23760 echo $ECHO_N "(cached) $ECHO_C" >&6
24673else 23761else
24674 23762
24675 cat >conftest.$ac_ext <<_ACEOF 23763 cat >conftest.$ac_ext <<_ACEOF
@@ -24693,8 +23781,8 @@ fi
24693 23781
24694 ossh_result=`eval 'echo $'"$ossh_varname"` 23782 ossh_result=`eval 'echo $'"$ossh_varname"`
24695 if test -n "`echo $ossh_varname`"; then 23783 if test -n "`echo $ossh_varname`"; then
24696 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 23784 { echo "$as_me:$LINENO: result: $ossh_result" >&5
24697$as_echo "$ossh_result" >&6; } 23785echo "${ECHO_T}$ossh_result" >&6; }
24698 if test "x$ossh_result" = "xyes"; then 23786 if test "x$ossh_result" = "xyes"; then
24699 23787
24700cat >>confdefs.h <<\_ACEOF 23788cat >>confdefs.h <<\_ACEOF
@@ -24703,18 +23791,18 @@ _ACEOF
24703 23791
24704 fi 23792 fi
24705 else 23793 else
24706 { $as_echo "$as_me:$LINENO: result: no" >&5 23794 { echo "$as_me:$LINENO: result: no" >&5
24707$as_echo "no" >&6; } 23795echo "${ECHO_T}no" >&6; }
24708 fi 23796 fi
24709 23797
24710 23798
24711# look for field 'ut_type' in header 'utmp.h' 23799# look for field 'ut_type' in header 'utmp.h'
24712 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 23800 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
24713 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type 23801 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
24714 { $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
24715$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; }
24716 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
24717 $as_echo_n "(cached) " >&6 23805 echo $ECHO_N "(cached) $ECHO_C" >&6
24718else 23806else
24719 23807
24720 cat >conftest.$ac_ext <<_ACEOF 23808 cat >conftest.$ac_ext <<_ACEOF
@@ -24738,8 +23826,8 @@ fi
24738 23826
24739 ossh_result=`eval 'echo $'"$ossh_varname"` 23827 ossh_result=`eval 'echo $'"$ossh_varname"`
24740 if test -n "`echo $ossh_varname`"; then 23828 if test -n "`echo $ossh_varname`"; then
24741 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 23829 { echo "$as_me:$LINENO: result: $ossh_result" >&5
24742$as_echo "$ossh_result" >&6; } 23830echo "${ECHO_T}$ossh_result" >&6; }
24743 if test "x$ossh_result" = "xyes"; then 23831 if test "x$ossh_result" = "xyes"; then
24744 23832
24745cat >>confdefs.h <<\_ACEOF 23833cat >>confdefs.h <<\_ACEOF
@@ -24748,18 +23836,18 @@ _ACEOF
24748 23836
24749 fi 23837 fi
24750 else 23838 else
24751 { $as_echo "$as_me:$LINENO: result: no" >&5 23839 { echo "$as_me:$LINENO: result: no" >&5
24752$as_echo "no" >&6; } 23840echo "${ECHO_T}no" >&6; }
24753 fi 23841 fi
24754 23842
24755 23843
24756# look for field 'ut_type' in header 'utmpx.h' 23844# look for field 'ut_type' in header 'utmpx.h'
24757 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 23845 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
24758 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type 23846 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
24759 { $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
24760$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; }
24761 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
24762 $as_echo_n "(cached) " >&6 23850 echo $ECHO_N "(cached) $ECHO_C" >&6
24763else 23851else
24764 23852
24765 cat >conftest.$ac_ext <<_ACEOF 23853 cat >conftest.$ac_ext <<_ACEOF
@@ -24783,8 +23871,8 @@ fi
24783 23871
24784 ossh_result=`eval 'echo $'"$ossh_varname"` 23872 ossh_result=`eval 'echo $'"$ossh_varname"`
24785 if test -n "`echo $ossh_varname`"; then 23873 if test -n "`echo $ossh_varname`"; then
24786 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 23874 { echo "$as_me:$LINENO: result: $ossh_result" >&5
24787$as_echo "$ossh_result" >&6; } 23875echo "${ECHO_T}$ossh_result" >&6; }
24788 if test "x$ossh_result" = "xyes"; then 23876 if test "x$ossh_result" = "xyes"; then
24789 23877
24790cat >>confdefs.h <<\_ACEOF 23878cat >>confdefs.h <<\_ACEOF
@@ -24793,18 +23881,18 @@ _ACEOF
24793 23881
24794 fi 23882 fi
24795 else 23883 else
24796 { $as_echo "$as_me:$LINENO: result: no" >&5 23884 { echo "$as_me:$LINENO: result: no" >&5
24797$as_echo "no" >&6; } 23885echo "${ECHO_T}no" >&6; }
24798 fi 23886 fi
24799 23887
24800 23888
24801# look for field 'ut_tv' in header 'utmp.h' 23889# look for field 'ut_tv' in header 'utmp.h'
24802 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 23890 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
24803 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv 23891 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
24804 { $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
24805$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; }
24806 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
24807 $as_echo_n "(cached) " >&6 23895 echo $ECHO_N "(cached) $ECHO_C" >&6
24808else 23896else
24809 23897
24810 cat >conftest.$ac_ext <<_ACEOF 23898 cat >conftest.$ac_ext <<_ACEOF
@@ -24828,8 +23916,8 @@ fi
24828 23916
24829 ossh_result=`eval 'echo $'"$ossh_varname"` 23917 ossh_result=`eval 'echo $'"$ossh_varname"`
24830 if test -n "`echo $ossh_varname`"; then 23918 if test -n "`echo $ossh_varname`"; then
24831 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 23919 { echo "$as_me:$LINENO: result: $ossh_result" >&5
24832$as_echo "$ossh_result" >&6; } 23920echo "${ECHO_T}$ossh_result" >&6; }
24833 if test "x$ossh_result" = "xyes"; then 23921 if test "x$ossh_result" = "xyes"; then
24834 23922
24835cat >>confdefs.h <<\_ACEOF 23923cat >>confdefs.h <<\_ACEOF
@@ -24838,18 +23926,18 @@ _ACEOF
24838 23926
24839 fi 23927 fi
24840 else 23928 else
24841 { $as_echo "$as_me:$LINENO: result: no" >&5 23929 { echo "$as_me:$LINENO: result: no" >&5
24842$as_echo "no" >&6; } 23930echo "${ECHO_T}no" >&6; }
24843 fi 23931 fi
24844 23932
24845 23933
24846# look for field 'ut_id' in header 'utmp.h' 23934# look for field 'ut_id' in header 'utmp.h'
24847 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 23935 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
24848 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id 23936 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
24849 { $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
24850$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; }
24851 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
24852 $as_echo_n "(cached) " >&6 23940 echo $ECHO_N "(cached) $ECHO_C" >&6
24853else 23941else
24854 23942
24855 cat >conftest.$ac_ext <<_ACEOF 23943 cat >conftest.$ac_ext <<_ACEOF
@@ -24873,8 +23961,8 @@ fi
24873 23961
24874 ossh_result=`eval 'echo $'"$ossh_varname"` 23962 ossh_result=`eval 'echo $'"$ossh_varname"`
24875 if test -n "`echo $ossh_varname`"; then 23963 if test -n "`echo $ossh_varname`"; then
24876 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 23964 { echo "$as_me:$LINENO: result: $ossh_result" >&5
24877$as_echo "$ossh_result" >&6; } 23965echo "${ECHO_T}$ossh_result" >&6; }
24878 if test "x$ossh_result" = "xyes"; then 23966 if test "x$ossh_result" = "xyes"; then
24879 23967
24880cat >>confdefs.h <<\_ACEOF 23968cat >>confdefs.h <<\_ACEOF
@@ -24883,18 +23971,18 @@ _ACEOF
24883 23971
24884 fi 23972 fi
24885 else 23973 else
24886 { $as_echo "$as_me:$LINENO: result: no" >&5 23974 { echo "$as_me:$LINENO: result: no" >&5
24887$as_echo "no" >&6; } 23975echo "${ECHO_T}no" >&6; }
24888 fi 23976 fi
24889 23977
24890 23978
24891# look for field 'ut_id' in header 'utmpx.h' 23979# look for field 'ut_id' in header 'utmpx.h'
24892 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 23980 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
24893 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id 23981 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
24894 { $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
24895$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; }
24896 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
24897 $as_echo_n "(cached) " >&6 23985 echo $ECHO_N "(cached) $ECHO_C" >&6
24898else 23986else
24899 23987
24900 cat >conftest.$ac_ext <<_ACEOF 23988 cat >conftest.$ac_ext <<_ACEOF
@@ -24918,8 +24006,8 @@ fi
24918 24006
24919 ossh_result=`eval 'echo $'"$ossh_varname"` 24007 ossh_result=`eval 'echo $'"$ossh_varname"`
24920 if test -n "`echo $ossh_varname`"; then 24008 if test -n "`echo $ossh_varname`"; then
24921 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 24009 { echo "$as_me:$LINENO: result: $ossh_result" >&5
24922$as_echo "$ossh_result" >&6; } 24010echo "${ECHO_T}$ossh_result" >&6; }
24923 if test "x$ossh_result" = "xyes"; then 24011 if test "x$ossh_result" = "xyes"; then
24924 24012
24925cat >>confdefs.h <<\_ACEOF 24013cat >>confdefs.h <<\_ACEOF
@@ -24928,18 +24016,18 @@ _ACEOF
24928 24016
24929 fi 24017 fi
24930 else 24018 else
24931 { $as_echo "$as_me:$LINENO: result: no" >&5 24019 { echo "$as_me:$LINENO: result: no" >&5
24932$as_echo "no" >&6; } 24020echo "${ECHO_T}no" >&6; }
24933 fi 24021 fi
24934 24022
24935 24023
24936# look for field 'ut_addr' in header 'utmp.h' 24024# look for field 'ut_addr' in header 'utmp.h'
24937 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 24025 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
24938 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr 24026 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
24939 { $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
24940$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; }
24941 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
24942 $as_echo_n "(cached) " >&6 24030 echo $ECHO_N "(cached) $ECHO_C" >&6
24943else 24031else
24944 24032
24945 cat >conftest.$ac_ext <<_ACEOF 24033 cat >conftest.$ac_ext <<_ACEOF
@@ -24963,8 +24051,8 @@ fi
24963 24051
24964 ossh_result=`eval 'echo $'"$ossh_varname"` 24052 ossh_result=`eval 'echo $'"$ossh_varname"`
24965 if test -n "`echo $ossh_varname`"; then 24053 if test -n "`echo $ossh_varname`"; then
24966 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 24054 { echo "$as_me:$LINENO: result: $ossh_result" >&5
24967$as_echo "$ossh_result" >&6; } 24055echo "${ECHO_T}$ossh_result" >&6; }
24968 if test "x$ossh_result" = "xyes"; then 24056 if test "x$ossh_result" = "xyes"; then
24969 24057
24970cat >>confdefs.h <<\_ACEOF 24058cat >>confdefs.h <<\_ACEOF
@@ -24973,18 +24061,18 @@ _ACEOF
24973 24061
24974 fi 24062 fi
24975 else 24063 else
24976 { $as_echo "$as_me:$LINENO: result: no" >&5 24064 { echo "$as_me:$LINENO: result: no" >&5
24977$as_echo "no" >&6; } 24065echo "${ECHO_T}no" >&6; }
24978 fi 24066 fi
24979 24067
24980 24068
24981# look for field 'ut_addr' in header 'utmpx.h' 24069# look for field 'ut_addr' in header 'utmpx.h'
24982 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 24070 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
24983 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr 24071 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
24984 { $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
24985$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; }
24986 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
24987 $as_echo_n "(cached) " >&6 24075 echo $ECHO_N "(cached) $ECHO_C" >&6
24988else 24076else
24989 24077
24990 cat >conftest.$ac_ext <<_ACEOF 24078 cat >conftest.$ac_ext <<_ACEOF
@@ -25008,8 +24096,8 @@ fi
25008 24096
25009 ossh_result=`eval 'echo $'"$ossh_varname"` 24097 ossh_result=`eval 'echo $'"$ossh_varname"`
25010 if test -n "`echo $ossh_varname`"; then 24098 if test -n "`echo $ossh_varname`"; then
25011 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 24099 { echo "$as_me:$LINENO: result: $ossh_result" >&5
25012$as_echo "$ossh_result" >&6; } 24100echo "${ECHO_T}$ossh_result" >&6; }
25013 if test "x$ossh_result" = "xyes"; then 24101 if test "x$ossh_result" = "xyes"; then
25014 24102
25015cat >>confdefs.h <<\_ACEOF 24103cat >>confdefs.h <<\_ACEOF
@@ -25018,18 +24106,18 @@ _ACEOF
25018 24106
25019 fi 24107 fi
25020 else 24108 else
25021 { $as_echo "$as_me:$LINENO: result: no" >&5 24109 { echo "$as_me:$LINENO: result: no" >&5
25022$as_echo "no" >&6; } 24110echo "${ECHO_T}no" >&6; }
25023 fi 24111 fi
25024 24112
25025 24113
25026# look for field 'ut_addr_v6' in header 'utmp.h' 24114# look for field 'ut_addr_v6' in header 'utmp.h'
25027 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 24115 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
25028 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6 24116 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
25029 { $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
25030$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; }
25031 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
25032 $as_echo_n "(cached) " >&6 24120 echo $ECHO_N "(cached) $ECHO_C" >&6
25033else 24121else
25034 24122
25035 cat >conftest.$ac_ext <<_ACEOF 24123 cat >conftest.$ac_ext <<_ACEOF
@@ -25053,8 +24141,8 @@ fi
25053 24141
25054 ossh_result=`eval 'echo $'"$ossh_varname"` 24142 ossh_result=`eval 'echo $'"$ossh_varname"`
25055 if test -n "`echo $ossh_varname`"; then 24143 if test -n "`echo $ossh_varname`"; then
25056 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 24144 { echo "$as_me:$LINENO: result: $ossh_result" >&5
25057$as_echo "$ossh_result" >&6; } 24145echo "${ECHO_T}$ossh_result" >&6; }
25058 if test "x$ossh_result" = "xyes"; then 24146 if test "x$ossh_result" = "xyes"; then
25059 24147
25060cat >>confdefs.h <<\_ACEOF 24148cat >>confdefs.h <<\_ACEOF
@@ -25063,18 +24151,18 @@ _ACEOF
25063 24151
25064 fi 24152 fi
25065 else 24153 else
25066 { $as_echo "$as_me:$LINENO: result: no" >&5 24154 { echo "$as_me:$LINENO: result: no" >&5
25067$as_echo "no" >&6; } 24155echo "${ECHO_T}no" >&6; }
25068 fi 24156 fi
25069 24157
25070 24158
25071# look for field 'ut_addr_v6' in header 'utmpx.h' 24159# look for field 'ut_addr_v6' in header 'utmpx.h'
25072 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 24160 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
25073 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6 24161 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
25074 { $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
25075$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; }
25076 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
25077 $as_echo_n "(cached) " >&6 24165 echo $ECHO_N "(cached) $ECHO_C" >&6
25078else 24166else
25079 24167
25080 cat >conftest.$ac_ext <<_ACEOF 24168 cat >conftest.$ac_ext <<_ACEOF
@@ -25098,8 +24186,8 @@ fi
25098 24186
25099 ossh_result=`eval 'echo $'"$ossh_varname"` 24187 ossh_result=`eval 'echo $'"$ossh_varname"`
25100 if test -n "`echo $ossh_varname`"; then 24188 if test -n "`echo $ossh_varname`"; then
25101 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 24189 { echo "$as_me:$LINENO: result: $ossh_result" >&5
25102$as_echo "$ossh_result" >&6; } 24190echo "${ECHO_T}$ossh_result" >&6; }
25103 if test "x$ossh_result" = "xyes"; then 24191 if test "x$ossh_result" = "xyes"; then
25104 24192
25105cat >>confdefs.h <<\_ACEOF 24193cat >>confdefs.h <<\_ACEOF
@@ -25108,18 +24196,18 @@ _ACEOF
25108 24196
25109 fi 24197 fi
25110 else 24198 else
25111 { $as_echo "$as_me:$LINENO: result: no" >&5 24199 { echo "$as_me:$LINENO: result: no" >&5
25112$as_echo "no" >&6; } 24200echo "${ECHO_T}no" >&6; }
25113 fi 24201 fi
25114 24202
25115 24203
25116# look for field 'ut_exit' in header 'utmp.h' 24204# look for field 'ut_exit' in header 'utmp.h'
25117 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 24205 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
25118 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit 24206 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit
25119 { $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
25120$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; }
25121 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
25122 $as_echo_n "(cached) " >&6 24210 echo $ECHO_N "(cached) $ECHO_C" >&6
25123else 24211else
25124 24212
25125 cat >conftest.$ac_ext <<_ACEOF 24213 cat >conftest.$ac_ext <<_ACEOF
@@ -25143,8 +24231,8 @@ fi
25143 24231
25144 ossh_result=`eval 'echo $'"$ossh_varname"` 24232 ossh_result=`eval 'echo $'"$ossh_varname"`
25145 if test -n "`echo $ossh_varname`"; then 24233 if test -n "`echo $ossh_varname`"; then
25146 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 24234 { echo "$as_me:$LINENO: result: $ossh_result" >&5
25147$as_echo "$ossh_result" >&6; } 24235echo "${ECHO_T}$ossh_result" >&6; }
25148 if test "x$ossh_result" = "xyes"; then 24236 if test "x$ossh_result" = "xyes"; then
25149 24237
25150cat >>confdefs.h <<\_ACEOF 24238cat >>confdefs.h <<\_ACEOF
@@ -25153,18 +24241,18 @@ _ACEOF
25153 24241
25154 fi 24242 fi
25155 else 24243 else
25156 { $as_echo "$as_me:$LINENO: result: no" >&5 24244 { echo "$as_me:$LINENO: result: no" >&5
25157$as_echo "no" >&6; } 24245echo "${ECHO_T}no" >&6; }
25158 fi 24246 fi
25159 24247
25160 24248
25161# look for field 'ut_time' in header 'utmp.h' 24249# look for field 'ut_time' in header 'utmp.h'
25162 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 24250 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
25163 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time 24251 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
25164 { $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
25165$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; }
25166 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
25167 $as_echo_n "(cached) " >&6 24255 echo $ECHO_N "(cached) $ECHO_C" >&6
25168else 24256else
25169 24257
25170 cat >conftest.$ac_ext <<_ACEOF 24258 cat >conftest.$ac_ext <<_ACEOF
@@ -25188,8 +24276,8 @@ fi
25188 24276
25189 ossh_result=`eval 'echo $'"$ossh_varname"` 24277 ossh_result=`eval 'echo $'"$ossh_varname"`
25190 if test -n "`echo $ossh_varname`"; then 24278 if test -n "`echo $ossh_varname`"; then
25191 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 24279 { echo "$as_me:$LINENO: result: $ossh_result" >&5
25192$as_echo "$ossh_result" >&6; } 24280echo "${ECHO_T}$ossh_result" >&6; }
25193 if test "x$ossh_result" = "xyes"; then 24281 if test "x$ossh_result" = "xyes"; then
25194 24282
25195cat >>confdefs.h <<\_ACEOF 24283cat >>confdefs.h <<\_ACEOF
@@ -25198,18 +24286,18 @@ _ACEOF
25198 24286
25199 fi 24287 fi
25200 else 24288 else
25201 { $as_echo "$as_me:$LINENO: result: no" >&5 24289 { echo "$as_me:$LINENO: result: no" >&5
25202$as_echo "no" >&6; } 24290echo "${ECHO_T}no" >&6; }
25203 fi 24291 fi
25204 24292
25205 24293
25206# look for field 'ut_time' in header 'utmpx.h' 24294# look for field 'ut_time' in header 'utmpx.h'
25207 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 24295 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
25208 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time 24296 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
25209 { $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
25210$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; }
25211 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
25212 $as_echo_n "(cached) " >&6 24300 echo $ECHO_N "(cached) $ECHO_C" >&6
25213else 24301else
25214 24302
25215 cat >conftest.$ac_ext <<_ACEOF 24303 cat >conftest.$ac_ext <<_ACEOF
@@ -25233,8 +24321,8 @@ fi
25233 24321
25234 ossh_result=`eval 'echo $'"$ossh_varname"` 24322 ossh_result=`eval 'echo $'"$ossh_varname"`
25235 if test -n "`echo $ossh_varname`"; then 24323 if test -n "`echo $ossh_varname`"; then
25236 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 24324 { echo "$as_me:$LINENO: result: $ossh_result" >&5
25237$as_echo "$ossh_result" >&6; } 24325echo "${ECHO_T}$ossh_result" >&6; }
25238 if test "x$ossh_result" = "xyes"; then 24326 if test "x$ossh_result" = "xyes"; then
25239 24327
25240cat >>confdefs.h <<\_ACEOF 24328cat >>confdefs.h <<\_ACEOF
@@ -25243,18 +24331,18 @@ _ACEOF
25243 24331
25244 fi 24332 fi
25245 else 24333 else
25246 { $as_echo "$as_me:$LINENO: result: no" >&5 24334 { echo "$as_me:$LINENO: result: no" >&5
25247$as_echo "no" >&6; } 24335echo "${ECHO_T}no" >&6; }
25248 fi 24336 fi
25249 24337
25250 24338
25251# look for field 'ut_tv' in header 'utmpx.h' 24339# look for field 'ut_tv' in header 'utmpx.h'
25252 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 24340 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
25253 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv 24341 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
25254 { $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
25255$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; }
25256 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
25257 $as_echo_n "(cached) " >&6 24345 echo $ECHO_N "(cached) $ECHO_C" >&6
25258else 24346else
25259 24347
25260 cat >conftest.$ac_ext <<_ACEOF 24348 cat >conftest.$ac_ext <<_ACEOF
@@ -25278,8 +24366,8 @@ fi
25278 24366
25279 ossh_result=`eval 'echo $'"$ossh_varname"` 24367 ossh_result=`eval 'echo $'"$ossh_varname"`
25280 if test -n "`echo $ossh_varname`"; then 24368 if test -n "`echo $ossh_varname`"; then
25281 { $as_echo "$as_me:$LINENO: result: $ossh_result" >&5 24369 { echo "$as_me:$LINENO: result: $ossh_result" >&5
25282$as_echo "$ossh_result" >&6; } 24370echo "${ECHO_T}$ossh_result" >&6; }
25283 if test "x$ossh_result" = "xyes"; then 24371 if test "x$ossh_result" = "xyes"; then
25284 24372
25285cat >>confdefs.h <<\_ACEOF 24373cat >>confdefs.h <<\_ACEOF
@@ -25288,15 +24376,15 @@ _ACEOF
25288 24376
25289 fi 24377 fi
25290 else 24378 else
25291 { $as_echo "$as_me:$LINENO: result: no" >&5 24379 { echo "$as_me:$LINENO: result: no" >&5
25292$as_echo "no" >&6; } 24380echo "${ECHO_T}no" >&6; }
25293 fi 24381 fi
25294 24382
25295 24383
25296{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 24384{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
25297$as_echo_n "checking for struct stat.st_blksize... " >&6; } 24385echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
25298if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then 24386if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
25299 $as_echo_n "(cached) " >&6 24387 echo $ECHO_N "(cached) $ECHO_C" >&6
25300else 24388else
25301 cat >conftest.$ac_ext <<_ACEOF 24389 cat >conftest.$ac_ext <<_ACEOF
25302/* confdefs.h. */ 24390/* confdefs.h. */
@@ -25321,21 +24409,20 @@ case "(($ac_try" in
25321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 24409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25322 *) ac_try_echo=$ac_try;; 24410 *) ac_try_echo=$ac_try;;
25323esac 24411esac
25324eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 24412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25325$as_echo "$ac_try_echo") >&5
25326 (eval "$ac_compile") 2>conftest.er1 24413 (eval "$ac_compile") 2>conftest.er1
25327 ac_status=$? 24414 ac_status=$?
25328 grep -v '^ *+' conftest.er1 >conftest.err 24415 grep -v '^ *+' conftest.er1 >conftest.err
25329 rm -f conftest.er1 24416 rm -f conftest.er1
25330 cat conftest.err >&5 24417 cat conftest.err >&5
25331 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 24418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25332 (exit $ac_status); } && { 24419 (exit $ac_status); } && {
25333 test -z "$ac_c_werror_flag" || 24420 test -z "$ac_c_werror_flag" ||
25334 test ! -s conftest.err 24421 test ! -s conftest.err
25335 } && test -s conftest.$ac_objext; then 24422 } && test -s conftest.$ac_objext; then
25336 ac_cv_member_struct_stat_st_blksize=yes 24423 ac_cv_member_struct_stat_st_blksize=yes
25337else 24424else
25338 $as_echo "$as_me: failed program was:" >&5 24425 echo "$as_me: failed program was:" >&5
25339sed 's/^/| /' conftest.$ac_ext >&5 24426sed 's/^/| /' conftest.$ac_ext >&5
25340 24427
25341 cat >conftest.$ac_ext <<_ACEOF 24428 cat >conftest.$ac_ext <<_ACEOF
@@ -25361,21 +24448,20 @@ case "(($ac_try" in
25361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 24448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25362 *) ac_try_echo=$ac_try;; 24449 *) ac_try_echo=$ac_try;;
25363esac 24450esac
25364eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 24451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25365$as_echo "$ac_try_echo") >&5
25366 (eval "$ac_compile") 2>conftest.er1 24452 (eval "$ac_compile") 2>conftest.er1
25367 ac_status=$? 24453 ac_status=$?
25368 grep -v '^ *+' conftest.er1 >conftest.err 24454 grep -v '^ *+' conftest.er1 >conftest.err
25369 rm -f conftest.er1 24455 rm -f conftest.er1
25370 cat conftest.err >&5 24456 cat conftest.err >&5
25371 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 24457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25372 (exit $ac_status); } && { 24458 (exit $ac_status); } && {
25373 test -z "$ac_c_werror_flag" || 24459 test -z "$ac_c_werror_flag" ||
25374 test ! -s conftest.err 24460 test ! -s conftest.err
25375 } && test -s conftest.$ac_objext; then 24461 } && test -s conftest.$ac_objext; then
25376 ac_cv_member_struct_stat_st_blksize=yes 24462 ac_cv_member_struct_stat_st_blksize=yes
25377else 24463else
25378 $as_echo "$as_me: failed program was:" >&5 24464 echo "$as_me: failed program was:" >&5
25379sed 's/^/| /' conftest.$ac_ext >&5 24465sed 's/^/| /' conftest.$ac_ext >&5
25380 24466
25381 ac_cv_member_struct_stat_st_blksize=no 24467 ac_cv_member_struct_stat_st_blksize=no
@@ -25386,8 +24472,8 @@ fi
25386 24472
25387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 24473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25388fi 24474fi
25389{ $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
25390$as_echo "$ac_cv_member_struct_stat_st_blksize" >&6; } 24476echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
25391if test $ac_cv_member_struct_stat_st_blksize = yes; then 24477if test $ac_cv_member_struct_stat_st_blksize = yes; then
25392 24478
25393cat >>confdefs.h <<_ACEOF 24479cat >>confdefs.h <<_ACEOF
@@ -25397,10 +24483,10 @@ _ACEOF
25397 24483
25398fi 24484fi
25399 24485
25400{ $as_echo "$as_me:$LINENO: checking for struct __res_state.retrans" >&5 24486{ echo "$as_me:$LINENO: checking for struct __res_state.retrans" >&5
25401$as_echo_n "checking for struct __res_state.retrans... " >&6; } 24487echo $ECHO_N "checking for struct __res_state.retrans... $ECHO_C" >&6; }
25402if test "${ac_cv_member_struct___res_state_retrans+set}" = set; then 24488if test "${ac_cv_member_struct___res_state_retrans+set}" = set; then
25403 $as_echo_n "(cached) " >&6 24489 echo $ECHO_N "(cached) $ECHO_C" >&6
25404else 24490else
25405 cat >conftest.$ac_ext <<_ACEOF 24491 cat >conftest.$ac_ext <<_ACEOF
25406/* confdefs.h. */ 24492/* confdefs.h. */
@@ -25434,21 +24520,20 @@ case "(($ac_try" in
25434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 24520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25435 *) ac_try_echo=$ac_try;; 24521 *) ac_try_echo=$ac_try;;
25436esac 24522esac
25437eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 24523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25438$as_echo "$ac_try_echo") >&5
25439 (eval "$ac_compile") 2>conftest.er1 24524 (eval "$ac_compile") 2>conftest.er1
25440 ac_status=$? 24525 ac_status=$?
25441 grep -v '^ *+' conftest.er1 >conftest.err 24526 grep -v '^ *+' conftest.er1 >conftest.err
25442 rm -f conftest.er1 24527 rm -f conftest.er1
25443 cat conftest.err >&5 24528 cat conftest.err >&5
25444 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 24529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25445 (exit $ac_status); } && { 24530 (exit $ac_status); } && {
25446 test -z "$ac_c_werror_flag" || 24531 test -z "$ac_c_werror_flag" ||
25447 test ! -s conftest.err 24532 test ! -s conftest.err
25448 } && test -s conftest.$ac_objext; then 24533 } && test -s conftest.$ac_objext; then
25449 ac_cv_member_struct___res_state_retrans=yes 24534 ac_cv_member_struct___res_state_retrans=yes
25450else 24535else
25451 $as_echo "$as_me: failed program was:" >&5 24536 echo "$as_me: failed program was:" >&5
25452sed 's/^/| /' conftest.$ac_ext >&5 24537sed 's/^/| /' conftest.$ac_ext >&5
25453 24538
25454 cat >conftest.$ac_ext <<_ACEOF 24539 cat >conftest.$ac_ext <<_ACEOF
@@ -25483,21 +24568,20 @@ case "(($ac_try" in
25483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 24568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25484 *) ac_try_echo=$ac_try;; 24569 *) ac_try_echo=$ac_try;;
25485esac 24570esac
25486eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 24571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25487$as_echo "$ac_try_echo") >&5
25488 (eval "$ac_compile") 2>conftest.er1 24572 (eval "$ac_compile") 2>conftest.er1
25489 ac_status=$? 24573 ac_status=$?
25490 grep -v '^ *+' conftest.er1 >conftest.err 24574 grep -v '^ *+' conftest.er1 >conftest.err
25491 rm -f conftest.er1 24575 rm -f conftest.er1
25492 cat conftest.err >&5 24576 cat conftest.err >&5
25493 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 24577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25494 (exit $ac_status); } && { 24578 (exit $ac_status); } && {
25495 test -z "$ac_c_werror_flag" || 24579 test -z "$ac_c_werror_flag" ||
25496 test ! -s conftest.err 24580 test ! -s conftest.err
25497 } && test -s conftest.$ac_objext; then 24581 } && test -s conftest.$ac_objext; then
25498 ac_cv_member_struct___res_state_retrans=yes 24582 ac_cv_member_struct___res_state_retrans=yes
25499else 24583else
25500 $as_echo "$as_me: failed program was:" >&5 24584 echo "$as_me: failed program was:" >&5
25501sed 's/^/| /' conftest.$ac_ext >&5 24585sed 's/^/| /' conftest.$ac_ext >&5
25502 24586
25503 ac_cv_member_struct___res_state_retrans=no 24587 ac_cv_member_struct___res_state_retrans=no
@@ -25508,8 +24592,8 @@ fi
25508 24592
25509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 24593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25510fi 24594fi
25511{ $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
25512$as_echo "$ac_cv_member_struct___res_state_retrans" >&6; } 24596echo "${ECHO_T}$ac_cv_member_struct___res_state_retrans" >&6; }
25513if test $ac_cv_member_struct___res_state_retrans = yes; then 24597if test $ac_cv_member_struct___res_state_retrans = yes; then
25514 : 24598 :
25515else 24599else
@@ -25521,10 +24605,10 @@ _ACEOF
25521fi 24605fi
25522 24606
25523 24607
25524{ $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
25525$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; }
25526if 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
25527 $as_echo_n "(cached) " >&6 24611 echo $ECHO_N "(cached) $ECHO_C" >&6
25528else 24612else
25529 24613
25530 cat >conftest.$ac_ext <<_ACEOF 24614 cat >conftest.$ac_ext <<_ACEOF
@@ -25551,21 +24635,20 @@ case "(($ac_try" in
25551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 24635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25552 *) ac_try_echo=$ac_try;; 24636 *) ac_try_echo=$ac_try;;
25553esac 24637esac
25554eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 24638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25555$as_echo "$ac_try_echo") >&5
25556 (eval "$ac_compile") 2>conftest.er1 24639 (eval "$ac_compile") 2>conftest.er1
25557 ac_status=$? 24640 ac_status=$?
25558 grep -v '^ *+' conftest.er1 >conftest.err 24641 grep -v '^ *+' conftest.er1 >conftest.err
25559 rm -f conftest.er1 24642 rm -f conftest.er1
25560 cat conftest.err >&5 24643 cat conftest.err >&5
25561 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 24644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25562 (exit $ac_status); } && { 24645 (exit $ac_status); } && {
25563 test -z "$ac_c_werror_flag" || 24646 test -z "$ac_c_werror_flag" ||
25564 test ! -s conftest.err 24647 test ! -s conftest.err
25565 } && test -s conftest.$ac_objext; then 24648 } && test -s conftest.$ac_objext; then
25566 ac_cv_have_ss_family_in_struct_ss="yes" 24649 ac_cv_have_ss_family_in_struct_ss="yes"
25567else 24650else
25568 $as_echo "$as_me: failed program was:" >&5 24651 echo "$as_me: failed program was:" >&5
25569sed 's/^/| /' conftest.$ac_ext >&5 24652sed 's/^/| /' conftest.$ac_ext >&5
25570 24653
25571 ac_cv_have_ss_family_in_struct_ss="no" 24654 ac_cv_have_ss_family_in_struct_ss="no"
@@ -25574,8 +24657,8 @@ fi
25574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 24657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25575 24658
25576fi 24659fi
25577{ $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
25578$as_echo "$ac_cv_have_ss_family_in_struct_ss" >&6; } 24661echo "${ECHO_T}$ac_cv_have_ss_family_in_struct_ss" >&6; }
25579if 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
25580 24663
25581cat >>confdefs.h <<\_ACEOF 24664cat >>confdefs.h <<\_ACEOF
@@ -25584,10 +24667,10 @@ _ACEOF
25584 24667
25585fi 24668fi
25586 24669
25587{ $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
25588$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; }
25589if 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
25590 $as_echo_n "(cached) " >&6 24673 echo $ECHO_N "(cached) $ECHO_C" >&6
25591else 24674else
25592 24675
25593 cat >conftest.$ac_ext <<_ACEOF 24676 cat >conftest.$ac_ext <<_ACEOF
@@ -25614,21 +24697,20 @@ case "(($ac_try" in
25614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 24697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25615 *) ac_try_echo=$ac_try;; 24698 *) ac_try_echo=$ac_try;;
25616esac 24699esac
25617eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 24700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25618$as_echo "$ac_try_echo") >&5
25619 (eval "$ac_compile") 2>conftest.er1 24701 (eval "$ac_compile") 2>conftest.er1
25620 ac_status=$? 24702 ac_status=$?
25621 grep -v '^ *+' conftest.er1 >conftest.err 24703 grep -v '^ *+' conftest.er1 >conftest.err
25622 rm -f conftest.er1 24704 rm -f conftest.er1
25623 cat conftest.err >&5 24705 cat conftest.err >&5
25624 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 24706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25625 (exit $ac_status); } && { 24707 (exit $ac_status); } && {
25626 test -z "$ac_c_werror_flag" || 24708 test -z "$ac_c_werror_flag" ||
25627 test ! -s conftest.err 24709 test ! -s conftest.err
25628 } && test -s conftest.$ac_objext; then 24710 } && test -s conftest.$ac_objext; then
25629 ac_cv_have___ss_family_in_struct_ss="yes" 24711 ac_cv_have___ss_family_in_struct_ss="yes"
25630else 24712else
25631 $as_echo "$as_me: failed program was:" >&5 24713 echo "$as_me: failed program was:" >&5
25632sed 's/^/| /' conftest.$ac_ext >&5 24714sed 's/^/| /' conftest.$ac_ext >&5
25633 24715
25634 ac_cv_have___ss_family_in_struct_ss="no" 24716 ac_cv_have___ss_family_in_struct_ss="no"
@@ -25638,8 +24720,8 @@ fi
25638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 24720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25639 24721
25640fi 24722fi
25641{ $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
25642$as_echo "$ac_cv_have___ss_family_in_struct_ss" >&6; } 24724echo "${ECHO_T}$ac_cv_have___ss_family_in_struct_ss" >&6; }
25643if 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
25644 24726
25645cat >>confdefs.h <<\_ACEOF 24727cat >>confdefs.h <<\_ACEOF
@@ -25648,10 +24730,10 @@ _ACEOF
25648 24730
25649fi 24731fi
25650 24732
25651{ $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
25652$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; }
25653if 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
25654 $as_echo_n "(cached) " >&6 24736 echo $ECHO_N "(cached) $ECHO_C" >&6
25655else 24737else
25656 24738
25657 cat >conftest.$ac_ext <<_ACEOF 24739 cat >conftest.$ac_ext <<_ACEOF
@@ -25677,21 +24759,20 @@ case "(($ac_try" in
25677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 24759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25678 *) ac_try_echo=$ac_try;; 24760 *) ac_try_echo=$ac_try;;
25679esac 24761esac
25680eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 24762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25681$as_echo "$ac_try_echo") >&5
25682 (eval "$ac_compile") 2>conftest.er1 24763 (eval "$ac_compile") 2>conftest.er1
25683 ac_status=$? 24764 ac_status=$?
25684 grep -v '^ *+' conftest.er1 >conftest.err 24765 grep -v '^ *+' conftest.er1 >conftest.err
25685 rm -f conftest.er1 24766 rm -f conftest.er1
25686 cat conftest.err >&5 24767 cat conftest.err >&5
25687 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 24768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25688 (exit $ac_status); } && { 24769 (exit $ac_status); } && {
25689 test -z "$ac_c_werror_flag" || 24770 test -z "$ac_c_werror_flag" ||
25690 test ! -s conftest.err 24771 test ! -s conftest.err
25691 } && test -s conftest.$ac_objext; then 24772 } && test -s conftest.$ac_objext; then
25692 ac_cv_have_pw_class_in_struct_passwd="yes" 24773 ac_cv_have_pw_class_in_struct_passwd="yes"
25693else 24774else
25694 $as_echo "$as_me: failed program was:" >&5 24775 echo "$as_me: failed program was:" >&5
25695sed 's/^/| /' conftest.$ac_ext >&5 24776sed 's/^/| /' conftest.$ac_ext >&5
25696 24777
25697 ac_cv_have_pw_class_in_struct_passwd="no" 24778 ac_cv_have_pw_class_in_struct_passwd="no"
@@ -25701,8 +24782,8 @@ fi
25701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 24782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25702 24783
25703fi 24784fi
25704{ $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
25705$as_echo "$ac_cv_have_pw_class_in_struct_passwd" >&6; } 24786echo "${ECHO_T}$ac_cv_have_pw_class_in_struct_passwd" >&6; }
25706if 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
25707 24788
25708cat >>confdefs.h <<\_ACEOF 24789cat >>confdefs.h <<\_ACEOF
@@ -25711,10 +24792,10 @@ _ACEOF
25711 24792
25712fi 24793fi
25713 24794
25714{ $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
25715$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; }
25716if 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
25717 $as_echo_n "(cached) " >&6 24798 echo $ECHO_N "(cached) $ECHO_C" >&6
25718else 24799else
25719 24800
25720 cat >conftest.$ac_ext <<_ACEOF 24801 cat >conftest.$ac_ext <<_ACEOF
@@ -25740,21 +24821,20 @@ case "(($ac_try" in
25740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 24821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25741 *) ac_try_echo=$ac_try;; 24822 *) ac_try_echo=$ac_try;;
25742esac 24823esac
25743eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 24824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25744$as_echo "$ac_try_echo") >&5
25745 (eval "$ac_compile") 2>conftest.er1 24825 (eval "$ac_compile") 2>conftest.er1
25746 ac_status=$? 24826 ac_status=$?
25747 grep -v '^ *+' conftest.er1 >conftest.err 24827 grep -v '^ *+' conftest.er1 >conftest.err
25748 rm -f conftest.er1 24828 rm -f conftest.er1
25749 cat conftest.err >&5 24829 cat conftest.err >&5
25750 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 24830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25751 (exit $ac_status); } && { 24831 (exit $ac_status); } && {
25752 test -z "$ac_c_werror_flag" || 24832 test -z "$ac_c_werror_flag" ||
25753 test ! -s conftest.err 24833 test ! -s conftest.err
25754 } && test -s conftest.$ac_objext; then 24834 } && test -s conftest.$ac_objext; then
25755 ac_cv_have_pw_expire_in_struct_passwd="yes" 24835 ac_cv_have_pw_expire_in_struct_passwd="yes"
25756else 24836else
25757 $as_echo "$as_me: failed program was:" >&5 24837 echo "$as_me: failed program was:" >&5
25758sed 's/^/| /' conftest.$ac_ext >&5 24838sed 's/^/| /' conftest.$ac_ext >&5
25759 24839
25760 ac_cv_have_pw_expire_in_struct_passwd="no" 24840 ac_cv_have_pw_expire_in_struct_passwd="no"
@@ -25764,8 +24844,8 @@ fi
25764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 24844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25765 24845
25766fi 24846fi
25767{ $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
25768$as_echo "$ac_cv_have_pw_expire_in_struct_passwd" >&6; } 24848echo "${ECHO_T}$ac_cv_have_pw_expire_in_struct_passwd" >&6; }
25769if 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
25770 24850
25771cat >>confdefs.h <<\_ACEOF 24851cat >>confdefs.h <<\_ACEOF
@@ -25774,10 +24854,10 @@ _ACEOF
25774 24854
25775fi 24855fi
25776 24856
25777{ $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
25778$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; }
25779if 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
25780 $as_echo_n "(cached) " >&6 24860 echo $ECHO_N "(cached) $ECHO_C" >&6
25781else 24861else
25782 24862
25783 cat >conftest.$ac_ext <<_ACEOF 24863 cat >conftest.$ac_ext <<_ACEOF
@@ -25803,21 +24883,20 @@ case "(($ac_try" in
25803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 24883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25804 *) ac_try_echo=$ac_try;; 24884 *) ac_try_echo=$ac_try;;
25805esac 24885esac
25806eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 24886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25807$as_echo "$ac_try_echo") >&5
25808 (eval "$ac_compile") 2>conftest.er1 24887 (eval "$ac_compile") 2>conftest.er1
25809 ac_status=$? 24888 ac_status=$?
25810 grep -v '^ *+' conftest.er1 >conftest.err 24889 grep -v '^ *+' conftest.er1 >conftest.err
25811 rm -f conftest.er1 24890 rm -f conftest.er1
25812 cat conftest.err >&5 24891 cat conftest.err >&5
25813 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 24892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25814 (exit $ac_status); } && { 24893 (exit $ac_status); } && {
25815 test -z "$ac_c_werror_flag" || 24894 test -z "$ac_c_werror_flag" ||
25816 test ! -s conftest.err 24895 test ! -s conftest.err
25817 } && test -s conftest.$ac_objext; then 24896 } && test -s conftest.$ac_objext; then
25818 ac_cv_have_pw_change_in_struct_passwd="yes" 24897 ac_cv_have_pw_change_in_struct_passwd="yes"
25819else 24898else
25820 $as_echo "$as_me: failed program was:" >&5 24899 echo "$as_me: failed program was:" >&5
25821sed 's/^/| /' conftest.$ac_ext >&5 24900sed 's/^/| /' conftest.$ac_ext >&5
25822 24901
25823 ac_cv_have_pw_change_in_struct_passwd="no" 24902 ac_cv_have_pw_change_in_struct_passwd="no"
@@ -25827,8 +24906,8 @@ fi
25827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 24906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25828 24907
25829fi 24908fi
25830{ $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
25831$as_echo "$ac_cv_have_pw_change_in_struct_passwd" >&6; } 24910echo "${ECHO_T}$ac_cv_have_pw_change_in_struct_passwd" >&6; }
25832if 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
25833 24912
25834cat >>confdefs.h <<\_ACEOF 24913cat >>confdefs.h <<\_ACEOF
@@ -25837,10 +24916,10 @@ _ACEOF
25837 24916
25838fi 24917fi
25839 24918
25840{ $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
25841$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; }
25842if test "${ac_cv_have_accrights_in_msghdr+set}" = set; then 24921if test "${ac_cv_have_accrights_in_msghdr+set}" = set; then
25843 $as_echo_n "(cached) " >&6 24922 echo $ECHO_N "(cached) $ECHO_C" >&6
25844else 24923else
25845 24924
25846 cat >conftest.$ac_ext <<_ACEOF 24925 cat >conftest.$ac_ext <<_ACEOF
@@ -25865,21 +24944,20 @@ case "(($ac_try" in
25865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 24944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25866 *) ac_try_echo=$ac_try;; 24945 *) ac_try_echo=$ac_try;;
25867esac 24946esac
25868eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 24947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25869$as_echo "$ac_try_echo") >&5
25870 (eval "$ac_compile") 2>conftest.er1 24948 (eval "$ac_compile") 2>conftest.er1
25871 ac_status=$? 24949 ac_status=$?
25872 grep -v '^ *+' conftest.er1 >conftest.err 24950 grep -v '^ *+' conftest.er1 >conftest.err
25873 rm -f conftest.er1 24951 rm -f conftest.er1
25874 cat conftest.err >&5 24952 cat conftest.err >&5
25875 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 24953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25876 (exit $ac_status); } && { 24954 (exit $ac_status); } && {
25877 test -z "$ac_c_werror_flag" || 24955 test -z "$ac_c_werror_flag" ||
25878 test ! -s conftest.err 24956 test ! -s conftest.err
25879 } && test -s conftest.$ac_objext; then 24957 } && test -s conftest.$ac_objext; then
25880 ac_cv_have_accrights_in_msghdr="yes" 24958 ac_cv_have_accrights_in_msghdr="yes"
25881else 24959else
25882 $as_echo "$as_me: failed program was:" >&5 24960 echo "$as_me: failed program was:" >&5
25883sed 's/^/| /' conftest.$ac_ext >&5 24961sed 's/^/| /' conftest.$ac_ext >&5
25884 24962
25885 ac_cv_have_accrights_in_msghdr="no" 24963 ac_cv_have_accrights_in_msghdr="no"
@@ -25889,8 +24967,8 @@ fi
25889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 24967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25890 24968
25891fi 24969fi
25892{ $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
25893$as_echo "$ac_cv_have_accrights_in_msghdr" >&6; } 24971echo "${ECHO_T}$ac_cv_have_accrights_in_msghdr" >&6; }
25894if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then 24972if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
25895 24973
25896cat >>confdefs.h <<\_ACEOF 24974cat >>confdefs.h <<\_ACEOF
@@ -25899,8 +24977,8 @@ _ACEOF
25899 24977
25900fi 24978fi
25901 24979
25902{ $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
25903$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; }
25904cat >conftest.$ac_ext <<_ACEOF 24982cat >conftest.$ac_ext <<_ACEOF
25905/* confdefs.h. */ 24983/* confdefs.h. */
25906_ACEOF 24984_ACEOF
@@ -25934,29 +25012,28 @@ case "(($ac_try" in
25934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25935 *) ac_try_echo=$ac_try;; 25013 *) ac_try_echo=$ac_try;;
25936esac 25014esac
25937eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25938$as_echo "$ac_try_echo") >&5
25939 (eval "$ac_compile") 2>conftest.er1 25016 (eval "$ac_compile") 2>conftest.er1
25940 ac_status=$? 25017 ac_status=$?
25941 grep -v '^ *+' conftest.er1 >conftest.err 25018 grep -v '^ *+' conftest.er1 >conftest.err
25942 rm -f conftest.er1 25019 rm -f conftest.er1
25943 cat conftest.err >&5 25020 cat conftest.err >&5
25944 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25945 (exit $ac_status); } && { 25022 (exit $ac_status); } && {
25946 test -z "$ac_c_werror_flag" || 25023 test -z "$ac_c_werror_flag" ||
25947 test ! -s conftest.err 25024 test ! -s conftest.err
25948 } && test -s conftest.$ac_objext; then 25025 } && test -s conftest.$ac_objext; then
25949 { $as_echo "$as_me:$LINENO: result: yes" >&5 25026 { echo "$as_me:$LINENO: result: yes" >&5
25950$as_echo "yes" >&6; } 25027echo "${ECHO_T}yes" >&6; }
25951else 25028else
25952 $as_echo "$as_me: failed program was:" >&5 25029 echo "$as_me: failed program was:" >&5
25953sed 's/^/| /' conftest.$ac_ext >&5 25030sed 's/^/| /' conftest.$ac_ext >&5
25954 25031
25955 { $as_echo "$as_me:$LINENO: result: no" >&5 25032 { echo "$as_me:$LINENO: result: no" >&5
25956$as_echo "no" >&6; } 25033echo "${ECHO_T}no" >&6; }
25957 25034
25958 { $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
25959$as_echo_n "checking if fsid_t has member val... " >&6; } 25036echo $ECHO_N "checking if fsid_t has member val... $ECHO_C" >&6; }
25960 cat >conftest.$ac_ext <<_ACEOF 25037 cat >conftest.$ac_ext <<_ACEOF
25961/* confdefs.h. */ 25038/* confdefs.h. */
25962_ACEOF 25039_ACEOF
@@ -25980,37 +25057,36 @@ case "(($ac_try" in
25980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25981 *) ac_try_echo=$ac_try;; 25058 *) ac_try_echo=$ac_try;;
25982esac 25059esac
25983eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25984$as_echo "$ac_try_echo") >&5
25985 (eval "$ac_compile") 2>conftest.er1 25061 (eval "$ac_compile") 2>conftest.er1
25986 ac_status=$? 25062 ac_status=$?
25987 grep -v '^ *+' conftest.er1 >conftest.err 25063 grep -v '^ *+' conftest.er1 >conftest.err
25988 rm -f conftest.er1 25064 rm -f conftest.er1
25989 cat conftest.err >&5 25065 cat conftest.err >&5
25990 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25991 (exit $ac_status); } && { 25067 (exit $ac_status); } && {
25992 test -z "$ac_c_werror_flag" || 25068 test -z "$ac_c_werror_flag" ||
25993 test ! -s conftest.err 25069 test ! -s conftest.err
25994 } && test -s conftest.$ac_objext; then 25070 } && test -s conftest.$ac_objext; then
25995 { $as_echo "$as_me:$LINENO: result: yes" >&5 25071 { echo "$as_me:$LINENO: result: yes" >&5
25996$as_echo "yes" >&6; } 25072echo "${ECHO_T}yes" >&6; }
25997 25073
25998cat >>confdefs.h <<\_ACEOF 25074cat >>confdefs.h <<\_ACEOF
25999#define FSID_HAS_VAL 1 25075#define FSID_HAS_VAL 1
26000_ACEOF 25076_ACEOF
26001 25077
26002else 25078else
26003 $as_echo "$as_me: failed program was:" >&5 25079 echo "$as_me: failed program was:" >&5
26004sed 's/^/| /' conftest.$ac_ext >&5 25080sed 's/^/| /' conftest.$ac_ext >&5
26005 25081
26006 { $as_echo "$as_me:$LINENO: result: no" >&5 25082 { echo "$as_me:$LINENO: result: no" >&5
26007$as_echo "no" >&6; } 25083echo "${ECHO_T}no" >&6; }
26008fi 25084fi
26009 25085
26010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 25086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26011 25087
26012 { $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
26013$as_echo_n "checking if f_fsid has member __val... " >&6; } 25089echo $ECHO_N "checking if f_fsid has member __val... $ECHO_C" >&6; }
26014 cat >conftest.$ac_ext <<_ACEOF 25090 cat >conftest.$ac_ext <<_ACEOF
26015/* confdefs.h. */ 25091/* confdefs.h. */
26016_ACEOF 25092_ACEOF
@@ -26034,31 +25110,30 @@ case "(($ac_try" in
26034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26035 *) ac_try_echo=$ac_try;; 25111 *) ac_try_echo=$ac_try;;
26036esac 25112esac
26037eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26038$as_echo "$ac_try_echo") >&5
26039 (eval "$ac_compile") 2>conftest.er1 25114 (eval "$ac_compile") 2>conftest.er1
26040 ac_status=$? 25115 ac_status=$?
26041 grep -v '^ *+' conftest.er1 >conftest.err 25116 grep -v '^ *+' conftest.er1 >conftest.err
26042 rm -f conftest.er1 25117 rm -f conftest.er1
26043 cat conftest.err >&5 25118 cat conftest.err >&5
26044 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26045 (exit $ac_status); } && { 25120 (exit $ac_status); } && {
26046 test -z "$ac_c_werror_flag" || 25121 test -z "$ac_c_werror_flag" ||
26047 test ! -s conftest.err 25122 test ! -s conftest.err
26048 } && test -s conftest.$ac_objext; then 25123 } && test -s conftest.$ac_objext; then
26049 { $as_echo "$as_me:$LINENO: result: yes" >&5 25124 { echo "$as_me:$LINENO: result: yes" >&5
26050$as_echo "yes" >&6; } 25125echo "${ECHO_T}yes" >&6; }
26051 25126
26052cat >>confdefs.h <<\_ACEOF 25127cat >>confdefs.h <<\_ACEOF
26053#define FSID_HAS___VAL 1 25128#define FSID_HAS___VAL 1
26054_ACEOF 25129_ACEOF
26055 25130
26056else 25131else
26057 $as_echo "$as_me: failed program was:" >&5 25132 echo "$as_me: failed program was:" >&5
26058sed 's/^/| /' conftest.$ac_ext >&5 25133sed 's/^/| /' conftest.$ac_ext >&5
26059 25134
26060 { $as_echo "$as_me:$LINENO: result: no" >&5 25135 { echo "$as_me:$LINENO: result: no" >&5
26061$as_echo "no" >&6; } 25136echo "${ECHO_T}no" >&6; }
26062fi 25137fi
26063 25138
26064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 25139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -26067,10 +25142,10 @@ fi
26067 25142
26068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 25143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26069 25144
26070{ $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
26071$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; }
26072if test "${ac_cv_have_control_in_msghdr+set}" = set; then 25147if test "${ac_cv_have_control_in_msghdr+set}" = set; then
26073 $as_echo_n "(cached) " >&6 25148 echo $ECHO_N "(cached) $ECHO_C" >&6
26074else 25149else
26075 25150
26076 cat >conftest.$ac_ext <<_ACEOF 25151 cat >conftest.$ac_ext <<_ACEOF
@@ -26095,21 +25170,20 @@ case "(($ac_try" in
26095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26096 *) ac_try_echo=$ac_try;; 25171 *) ac_try_echo=$ac_try;;
26097esac 25172esac
26098eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26099$as_echo "$ac_try_echo") >&5
26100 (eval "$ac_compile") 2>conftest.er1 25174 (eval "$ac_compile") 2>conftest.er1
26101 ac_status=$? 25175 ac_status=$?
26102 grep -v '^ *+' conftest.er1 >conftest.err 25176 grep -v '^ *+' conftest.er1 >conftest.err
26103 rm -f conftest.er1 25177 rm -f conftest.er1
26104 cat conftest.err >&5 25178 cat conftest.err >&5
26105 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26106 (exit $ac_status); } && { 25180 (exit $ac_status); } && {
26107 test -z "$ac_c_werror_flag" || 25181 test -z "$ac_c_werror_flag" ||
26108 test ! -s conftest.err 25182 test ! -s conftest.err
26109 } && test -s conftest.$ac_objext; then 25183 } && test -s conftest.$ac_objext; then
26110 ac_cv_have_control_in_msghdr="yes" 25184 ac_cv_have_control_in_msghdr="yes"
26111else 25185else
26112 $as_echo "$as_me: failed program was:" >&5 25186 echo "$as_me: failed program was:" >&5
26113sed 's/^/| /' conftest.$ac_ext >&5 25187sed 's/^/| /' conftest.$ac_ext >&5
26114 25188
26115 ac_cv_have_control_in_msghdr="no" 25189 ac_cv_have_control_in_msghdr="no"
@@ -26119,8 +25193,8 @@ fi
26119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 25193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26120 25194
26121fi 25195fi
26122{ $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
26123$as_echo "$ac_cv_have_control_in_msghdr" >&6; } 25197echo "${ECHO_T}$ac_cv_have_control_in_msghdr" >&6; }
26124if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then 25198if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
26125 25199
26126cat >>confdefs.h <<\_ACEOF 25200cat >>confdefs.h <<\_ACEOF
@@ -26129,10 +25203,10 @@ _ACEOF
26129 25203
26130fi 25204fi
26131 25205
26132{ $as_echo "$as_me:$LINENO: checking if libc defines __progname" >&5 25206{ echo "$as_me:$LINENO: checking if libc defines __progname" >&5
26133$as_echo_n "checking if libc defines __progname... " >&6; } 25207echo $ECHO_N "checking if libc defines __progname... $ECHO_C" >&6; }
26134if test "${ac_cv_libc_defines___progname+set}" = set; then 25208if test "${ac_cv_libc_defines___progname+set}" = set; then
26135 $as_echo_n "(cached) " >&6 25209 echo $ECHO_N "(cached) $ECHO_C" >&6
26136else 25210else
26137 25211
26138 cat >conftest.$ac_ext <<_ACEOF 25212 cat >conftest.$ac_ext <<_ACEOF
@@ -26156,37 +25230,33 @@ case "(($ac_try" in
26156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26157 *) ac_try_echo=$ac_try;; 25231 *) ac_try_echo=$ac_try;;
26158esac 25232esac
26159eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26160$as_echo "$ac_try_echo") >&5
26161 (eval "$ac_link") 2>conftest.er1 25234 (eval "$ac_link") 2>conftest.er1
26162 ac_status=$? 25235 ac_status=$?
26163 grep -v '^ *+' conftest.er1 >conftest.err 25236 grep -v '^ *+' conftest.er1 >conftest.err
26164 rm -f conftest.er1 25237 rm -f conftest.er1
26165 cat conftest.err >&5 25238 cat conftest.err >&5
26166 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26167 (exit $ac_status); } && { 25240 (exit $ac_status); } && {
26168 test -z "$ac_c_werror_flag" || 25241 test -z "$ac_c_werror_flag" ||
26169 test ! -s conftest.err 25242 test ! -s conftest.err
26170 } && test -s conftest$ac_exeext && { 25243 } && test -s conftest$ac_exeext &&
26171 test "$cross_compiling" = yes || 25244 $as_test_x conftest$ac_exeext; then
26172 $as_test_x conftest$ac_exeext
26173 }; then
26174 ac_cv_libc_defines___progname="yes" 25245 ac_cv_libc_defines___progname="yes"
26175else 25246else
26176 $as_echo "$as_me: failed program was:" >&5 25247 echo "$as_me: failed program was:" >&5
26177sed 's/^/| /' conftest.$ac_ext >&5 25248sed 's/^/| /' conftest.$ac_ext >&5
26178 25249
26179 ac_cv_libc_defines___progname="no" 25250 ac_cv_libc_defines___progname="no"
26180 25251
26181fi 25252fi
26182 25253
26183rm -rf conftest.dSYM
26184rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25254rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26185 conftest$ac_exeext conftest.$ac_ext 25255 conftest$ac_exeext conftest.$ac_ext
26186 25256
26187fi 25257fi
26188{ $as_echo "$as_me:$LINENO: result: $ac_cv_libc_defines___progname" >&5 25258{ echo "$as_me:$LINENO: result: $ac_cv_libc_defines___progname" >&5
26189$as_echo "$ac_cv_libc_defines___progname" >&6; } 25259echo "${ECHO_T}$ac_cv_libc_defines___progname" >&6; }
26190if test "x$ac_cv_libc_defines___progname" = "xyes" ; then 25260if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
26191 25261
26192cat >>confdefs.h <<\_ACEOF 25262cat >>confdefs.h <<\_ACEOF
@@ -26195,10 +25265,10 @@ _ACEOF
26195 25265
26196fi 25266fi
26197 25267
26198{ $as_echo "$as_me:$LINENO: checking whether $CC implements __FUNCTION__" >&5 25268{ echo "$as_me:$LINENO: checking whether $CC implements __FUNCTION__" >&5
26199$as_echo_n "checking whether $CC implements __FUNCTION__... " >&6; } 25269echo $ECHO_N "checking whether $CC implements __FUNCTION__... $ECHO_C" >&6; }
26200if test "${ac_cv_cc_implements___FUNCTION__+set}" = set; then 25270if test "${ac_cv_cc_implements___FUNCTION__+set}" = set; then
26201 $as_echo_n "(cached) " >&6 25271 echo $ECHO_N "(cached) $ECHO_C" >&6
26202else 25272else
26203 25273
26204 cat >conftest.$ac_ext <<_ACEOF 25274 cat >conftest.$ac_ext <<_ACEOF
@@ -26224,37 +25294,33 @@ case "(($ac_try" in
26224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26225 *) ac_try_echo=$ac_try;; 25295 *) ac_try_echo=$ac_try;;
26226esac 25296esac
26227eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26228$as_echo "$ac_try_echo") >&5
26229 (eval "$ac_link") 2>conftest.er1 25298 (eval "$ac_link") 2>conftest.er1
26230 ac_status=$? 25299 ac_status=$?
26231 grep -v '^ *+' conftest.er1 >conftest.err 25300 grep -v '^ *+' conftest.er1 >conftest.err
26232 rm -f conftest.er1 25301 rm -f conftest.er1
26233 cat conftest.err >&5 25302 cat conftest.err >&5
26234 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26235 (exit $ac_status); } && { 25304 (exit $ac_status); } && {
26236 test -z "$ac_c_werror_flag" || 25305 test -z "$ac_c_werror_flag" ||
26237 test ! -s conftest.err 25306 test ! -s conftest.err
26238 } && test -s conftest$ac_exeext && { 25307 } && test -s conftest$ac_exeext &&
26239 test "$cross_compiling" = yes || 25308 $as_test_x conftest$ac_exeext; then
26240 $as_test_x conftest$ac_exeext
26241 }; then
26242 ac_cv_cc_implements___FUNCTION__="yes" 25309 ac_cv_cc_implements___FUNCTION__="yes"
26243else 25310else
26244 $as_echo "$as_me: failed program was:" >&5 25311 echo "$as_me: failed program was:" >&5
26245sed 's/^/| /' conftest.$ac_ext >&5 25312sed 's/^/| /' conftest.$ac_ext >&5
26246 25313
26247 ac_cv_cc_implements___FUNCTION__="no" 25314 ac_cv_cc_implements___FUNCTION__="no"
26248 25315
26249fi 25316fi
26250 25317
26251rm -rf conftest.dSYM
26252rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25318rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26253 conftest$ac_exeext conftest.$ac_ext 25319 conftest$ac_exeext conftest.$ac_ext
26254 25320
26255fi 25321fi
26256{ $as_echo "$as_me:$LINENO: result: $ac_cv_cc_implements___FUNCTION__" >&5 25322{ echo "$as_me:$LINENO: result: $ac_cv_cc_implements___FUNCTION__" >&5
26257$as_echo "$ac_cv_cc_implements___FUNCTION__" >&6; } 25323echo "${ECHO_T}$ac_cv_cc_implements___FUNCTION__" >&6; }
26258if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then 25324if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
26259 25325
26260cat >>confdefs.h <<\_ACEOF 25326cat >>confdefs.h <<\_ACEOF
@@ -26263,10 +25329,10 @@ _ACEOF
26263 25329
26264fi 25330fi
26265 25331
26266{ $as_echo "$as_me:$LINENO: checking whether $CC implements __func__" >&5 25332{ echo "$as_me:$LINENO: checking whether $CC implements __func__" >&5
26267$as_echo_n "checking whether $CC implements __func__... " >&6; } 25333echo $ECHO_N "checking whether $CC implements __func__... $ECHO_C" >&6; }
26268if test "${ac_cv_cc_implements___func__+set}" = set; then 25334if test "${ac_cv_cc_implements___func__+set}" = set; then
26269 $as_echo_n "(cached) " >&6 25335 echo $ECHO_N "(cached) $ECHO_C" >&6
26270else 25336else
26271 25337
26272 cat >conftest.$ac_ext <<_ACEOF 25338 cat >conftest.$ac_ext <<_ACEOF
@@ -26292,37 +25358,33 @@ case "(($ac_try" in
26292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26293 *) ac_try_echo=$ac_try;; 25359 *) ac_try_echo=$ac_try;;
26294esac 25360esac
26295eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26296$as_echo "$ac_try_echo") >&5
26297 (eval "$ac_link") 2>conftest.er1 25362 (eval "$ac_link") 2>conftest.er1
26298 ac_status=$? 25363 ac_status=$?
26299 grep -v '^ *+' conftest.er1 >conftest.err 25364 grep -v '^ *+' conftest.er1 >conftest.err
26300 rm -f conftest.er1 25365 rm -f conftest.er1
26301 cat conftest.err >&5 25366 cat conftest.err >&5
26302 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26303 (exit $ac_status); } && { 25368 (exit $ac_status); } && {
26304 test -z "$ac_c_werror_flag" || 25369 test -z "$ac_c_werror_flag" ||
26305 test ! -s conftest.err 25370 test ! -s conftest.err
26306 } && test -s conftest$ac_exeext && { 25371 } && test -s conftest$ac_exeext &&
26307 test "$cross_compiling" = yes || 25372 $as_test_x conftest$ac_exeext; then
26308 $as_test_x conftest$ac_exeext
26309 }; then
26310 ac_cv_cc_implements___func__="yes" 25373 ac_cv_cc_implements___func__="yes"
26311else 25374else
26312 $as_echo "$as_me: failed program was:" >&5 25375 echo "$as_me: failed program was:" >&5
26313sed 's/^/| /' conftest.$ac_ext >&5 25376sed 's/^/| /' conftest.$ac_ext >&5
26314 25377
26315 ac_cv_cc_implements___func__="no" 25378 ac_cv_cc_implements___func__="no"
26316 25379
26317fi 25380fi
26318 25381
26319rm -rf conftest.dSYM
26320rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25382rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26321 conftest$ac_exeext conftest.$ac_ext 25383 conftest$ac_exeext conftest.$ac_ext
26322 25384
26323fi 25385fi
26324{ $as_echo "$as_me:$LINENO: result: $ac_cv_cc_implements___func__" >&5 25386{ echo "$as_me:$LINENO: result: $ac_cv_cc_implements___func__" >&5
26325$as_echo "$ac_cv_cc_implements___func__" >&6; } 25387echo "${ECHO_T}$ac_cv_cc_implements___func__" >&6; }
26326if test "x$ac_cv_cc_implements___func__" = "xyes" ; then 25388if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
26327 25389
26328cat >>confdefs.h <<\_ACEOF 25390cat >>confdefs.h <<\_ACEOF
@@ -26331,10 +25393,10 @@ _ACEOF
26331 25393
26332fi 25394fi
26333 25395
26334{ $as_echo "$as_me:$LINENO: checking whether va_copy exists" >&5 25396{ echo "$as_me:$LINENO: checking whether va_copy exists" >&5
26335$as_echo_n "checking whether va_copy exists... " >&6; } 25397echo $ECHO_N "checking whether va_copy exists... $ECHO_C" >&6; }
26336if test "${ac_cv_have_va_copy+set}" = set; then 25398if test "${ac_cv_have_va_copy+set}" = set; then
26337 $as_echo_n "(cached) " >&6 25399 echo $ECHO_N "(cached) $ECHO_C" >&6
26338else 25400else
26339 25401
26340 cat >conftest.$ac_ext <<_ACEOF 25402 cat >conftest.$ac_ext <<_ACEOF
@@ -26359,37 +25421,33 @@ case "(($ac_try" in
26359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26360 *) ac_try_echo=$ac_try;; 25422 *) ac_try_echo=$ac_try;;
26361esac 25423esac
26362eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26363$as_echo "$ac_try_echo") >&5
26364 (eval "$ac_link") 2>conftest.er1 25425 (eval "$ac_link") 2>conftest.er1
26365 ac_status=$? 25426 ac_status=$?
26366 grep -v '^ *+' conftest.er1 >conftest.err 25427 grep -v '^ *+' conftest.er1 >conftest.err
26367 rm -f conftest.er1 25428 rm -f conftest.er1
26368 cat conftest.err >&5 25429 cat conftest.err >&5
26369 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26370 (exit $ac_status); } && { 25431 (exit $ac_status); } && {
26371 test -z "$ac_c_werror_flag" || 25432 test -z "$ac_c_werror_flag" ||
26372 test ! -s conftest.err 25433 test ! -s conftest.err
26373 } && test -s conftest$ac_exeext && { 25434 } && test -s conftest$ac_exeext &&
26374 test "$cross_compiling" = yes || 25435 $as_test_x conftest$ac_exeext; then
26375 $as_test_x conftest$ac_exeext
26376 }; then
26377 ac_cv_have_va_copy="yes" 25436 ac_cv_have_va_copy="yes"
26378else 25437else
26379 $as_echo "$as_me: failed program was:" >&5 25438 echo "$as_me: failed program was:" >&5
26380sed 's/^/| /' conftest.$ac_ext >&5 25439sed 's/^/| /' conftest.$ac_ext >&5
26381 25440
26382 ac_cv_have_va_copy="no" 25441 ac_cv_have_va_copy="no"
26383 25442
26384fi 25443fi
26385 25444
26386rm -rf conftest.dSYM
26387rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25445rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26388 conftest$ac_exeext conftest.$ac_ext 25446 conftest$ac_exeext conftest.$ac_ext
26389 25447
26390fi 25448fi
26391{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_va_copy" >&5 25449{ echo "$as_me:$LINENO: result: $ac_cv_have_va_copy" >&5
26392$as_echo "$ac_cv_have_va_copy" >&6; } 25450echo "${ECHO_T}$ac_cv_have_va_copy" >&6; }
26393if test "x$ac_cv_have_va_copy" = "xyes" ; then 25451if test "x$ac_cv_have_va_copy" = "xyes" ; then
26394 25452
26395cat >>confdefs.h <<\_ACEOF 25453cat >>confdefs.h <<\_ACEOF
@@ -26398,10 +25456,10 @@ _ACEOF
26398 25456
26399fi 25457fi
26400 25458
26401{ $as_echo "$as_me:$LINENO: checking whether __va_copy exists" >&5 25459{ echo "$as_me:$LINENO: checking whether __va_copy exists" >&5
26402$as_echo_n "checking whether __va_copy exists... " >&6; } 25460echo $ECHO_N "checking whether __va_copy exists... $ECHO_C" >&6; }
26403if test "${ac_cv_have___va_copy+set}" = set; then 25461if test "${ac_cv_have___va_copy+set}" = set; then
26404 $as_echo_n "(cached) " >&6 25462 echo $ECHO_N "(cached) $ECHO_C" >&6
26405else 25463else
26406 25464
26407 cat >conftest.$ac_ext <<_ACEOF 25465 cat >conftest.$ac_ext <<_ACEOF
@@ -26426,37 +25484,33 @@ case "(($ac_try" in
26426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26427 *) ac_try_echo=$ac_try;; 25485 *) ac_try_echo=$ac_try;;
26428esac 25486esac
26429eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26430$as_echo "$ac_try_echo") >&5
26431 (eval "$ac_link") 2>conftest.er1 25488 (eval "$ac_link") 2>conftest.er1
26432 ac_status=$? 25489 ac_status=$?
26433 grep -v '^ *+' conftest.er1 >conftest.err 25490 grep -v '^ *+' conftest.er1 >conftest.err
26434 rm -f conftest.er1 25491 rm -f conftest.er1
26435 cat conftest.err >&5 25492 cat conftest.err >&5
26436 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26437 (exit $ac_status); } && { 25494 (exit $ac_status); } && {
26438 test -z "$ac_c_werror_flag" || 25495 test -z "$ac_c_werror_flag" ||
26439 test ! -s conftest.err 25496 test ! -s conftest.err
26440 } && test -s conftest$ac_exeext && { 25497 } && test -s conftest$ac_exeext &&
26441 test "$cross_compiling" = yes || 25498 $as_test_x conftest$ac_exeext; then
26442 $as_test_x conftest$ac_exeext
26443 }; then
26444 ac_cv_have___va_copy="yes" 25499 ac_cv_have___va_copy="yes"
26445else 25500else
26446 $as_echo "$as_me: failed program was:" >&5 25501 echo "$as_me: failed program was:" >&5
26447sed 's/^/| /' conftest.$ac_ext >&5 25502sed 's/^/| /' conftest.$ac_ext >&5
26448 25503
26449 ac_cv_have___va_copy="no" 25504 ac_cv_have___va_copy="no"
26450 25505
26451fi 25506fi
26452 25507
26453rm -rf conftest.dSYM
26454rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25508rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26455 conftest$ac_exeext conftest.$ac_ext 25509 conftest$ac_exeext conftest.$ac_ext
26456 25510
26457fi 25511fi
26458{ $as_echo "$as_me:$LINENO: result: $ac_cv_have___va_copy" >&5 25512{ echo "$as_me:$LINENO: result: $ac_cv_have___va_copy" >&5
26459$as_echo "$ac_cv_have___va_copy" >&6; } 25513echo "${ECHO_T}$ac_cv_have___va_copy" >&6; }
26460if test "x$ac_cv_have___va_copy" = "xyes" ; then 25514if test "x$ac_cv_have___va_copy" = "xyes" ; then
26461 25515
26462cat >>confdefs.h <<\_ACEOF 25516cat >>confdefs.h <<\_ACEOF
@@ -26465,10 +25519,10 @@ _ACEOF
26465 25519
26466fi 25520fi
26467 25521
26468{ $as_echo "$as_me:$LINENO: checking whether getopt has optreset support" >&5 25522{ echo "$as_me:$LINENO: checking whether getopt has optreset support" >&5
26469$as_echo_n "checking whether getopt has optreset support... " >&6; } 25523echo $ECHO_N "checking whether getopt has optreset support... $ECHO_C" >&6; }
26470if test "${ac_cv_have_getopt_optreset+set}" = set; then 25524if test "${ac_cv_have_getopt_optreset+set}" = set; then
26471 $as_echo_n "(cached) " >&6 25525 echo $ECHO_N "(cached) $ECHO_C" >&6
26472else 25526else
26473 25527
26474 cat >conftest.$ac_ext <<_ACEOF 25528 cat >conftest.$ac_ext <<_ACEOF
@@ -26494,37 +25548,33 @@ case "(($ac_try" in
26494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26495 *) ac_try_echo=$ac_try;; 25549 *) ac_try_echo=$ac_try;;
26496esac 25550esac
26497eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26498$as_echo "$ac_try_echo") >&5
26499 (eval "$ac_link") 2>conftest.er1 25552 (eval "$ac_link") 2>conftest.er1
26500 ac_status=$? 25553 ac_status=$?
26501 grep -v '^ *+' conftest.er1 >conftest.err 25554 grep -v '^ *+' conftest.er1 >conftest.err
26502 rm -f conftest.er1 25555 rm -f conftest.er1
26503 cat conftest.err >&5 25556 cat conftest.err >&5
26504 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26505 (exit $ac_status); } && { 25558 (exit $ac_status); } && {
26506 test -z "$ac_c_werror_flag" || 25559 test -z "$ac_c_werror_flag" ||
26507 test ! -s conftest.err 25560 test ! -s conftest.err
26508 } && test -s conftest$ac_exeext && { 25561 } && test -s conftest$ac_exeext &&
26509 test "$cross_compiling" = yes || 25562 $as_test_x conftest$ac_exeext; then
26510 $as_test_x conftest$ac_exeext
26511 }; then
26512 ac_cv_have_getopt_optreset="yes" 25563 ac_cv_have_getopt_optreset="yes"
26513else 25564else
26514 $as_echo "$as_me: failed program was:" >&5 25565 echo "$as_me: failed program was:" >&5
26515sed 's/^/| /' conftest.$ac_ext >&5 25566sed 's/^/| /' conftest.$ac_ext >&5
26516 25567
26517 ac_cv_have_getopt_optreset="no" 25568 ac_cv_have_getopt_optreset="no"
26518 25569
26519fi 25570fi
26520 25571
26521rm -rf conftest.dSYM
26522rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25572rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26523 conftest$ac_exeext conftest.$ac_ext 25573 conftest$ac_exeext conftest.$ac_ext
26524 25574
26525fi 25575fi
26526{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_getopt_optreset" >&5 25576{ echo "$as_me:$LINENO: result: $ac_cv_have_getopt_optreset" >&5
26527$as_echo "$ac_cv_have_getopt_optreset" >&6; } 25577echo "${ECHO_T}$ac_cv_have_getopt_optreset" >&6; }
26528if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then 25578if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
26529 25579
26530cat >>confdefs.h <<\_ACEOF 25580cat >>confdefs.h <<\_ACEOF
@@ -26533,10 +25583,10 @@ _ACEOF
26533 25583
26534fi 25584fi
26535 25585
26536{ $as_echo "$as_me:$LINENO: checking if libc defines sys_errlist" >&5 25586{ echo "$as_me:$LINENO: checking if libc defines sys_errlist" >&5
26537$as_echo_n "checking if libc defines sys_errlist... " >&6; } 25587echo $ECHO_N "checking if libc defines sys_errlist... $ECHO_C" >&6; }
26538if test "${ac_cv_libc_defines_sys_errlist+set}" = set; then 25588if test "${ac_cv_libc_defines_sys_errlist+set}" = set; then
26539 $as_echo_n "(cached) " >&6 25589 echo $ECHO_N "(cached) $ECHO_C" >&6
26540else 25590else
26541 25591
26542 cat >conftest.$ac_ext <<_ACEOF 25592 cat >conftest.$ac_ext <<_ACEOF
@@ -26560,37 +25610,33 @@ case "(($ac_try" in
26560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26561 *) ac_try_echo=$ac_try;; 25611 *) ac_try_echo=$ac_try;;
26562esac 25612esac
26563eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26564$as_echo "$ac_try_echo") >&5
26565 (eval "$ac_link") 2>conftest.er1 25614 (eval "$ac_link") 2>conftest.er1
26566 ac_status=$? 25615 ac_status=$?
26567 grep -v '^ *+' conftest.er1 >conftest.err 25616 grep -v '^ *+' conftest.er1 >conftest.err
26568 rm -f conftest.er1 25617 rm -f conftest.er1
26569 cat conftest.err >&5 25618 cat conftest.err >&5
26570 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26571 (exit $ac_status); } && { 25620 (exit $ac_status); } && {
26572 test -z "$ac_c_werror_flag" || 25621 test -z "$ac_c_werror_flag" ||
26573 test ! -s conftest.err 25622 test ! -s conftest.err
26574 } && test -s conftest$ac_exeext && { 25623 } && test -s conftest$ac_exeext &&
26575 test "$cross_compiling" = yes || 25624 $as_test_x conftest$ac_exeext; then
26576 $as_test_x conftest$ac_exeext
26577 }; then
26578 ac_cv_libc_defines_sys_errlist="yes" 25625 ac_cv_libc_defines_sys_errlist="yes"
26579else 25626else
26580 $as_echo "$as_me: failed program was:" >&5 25627 echo "$as_me: failed program was:" >&5
26581sed 's/^/| /' conftest.$ac_ext >&5 25628sed 's/^/| /' conftest.$ac_ext >&5
26582 25629
26583 ac_cv_libc_defines_sys_errlist="no" 25630 ac_cv_libc_defines_sys_errlist="no"
26584 25631
26585fi 25632fi
26586 25633
26587rm -rf conftest.dSYM
26588rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25634rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26589 conftest$ac_exeext conftest.$ac_ext 25635 conftest$ac_exeext conftest.$ac_ext
26590 25636
26591fi 25637fi
26592{ $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
26593$as_echo "$ac_cv_libc_defines_sys_errlist" >&6; } 25639echo "${ECHO_T}$ac_cv_libc_defines_sys_errlist" >&6; }
26594if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then 25640if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
26595 25641
26596cat >>confdefs.h <<\_ACEOF 25642cat >>confdefs.h <<\_ACEOF
@@ -26600,10 +25646,10 @@ _ACEOF
26600fi 25646fi
26601 25647
26602 25648
26603{ $as_echo "$as_me:$LINENO: checking if libc defines sys_nerr" >&5 25649{ echo "$as_me:$LINENO: checking if libc defines sys_nerr" >&5
26604$as_echo_n "checking if libc defines sys_nerr... " >&6; } 25650echo $ECHO_N "checking if libc defines sys_nerr... $ECHO_C" >&6; }
26605if test "${ac_cv_libc_defines_sys_nerr+set}" = set; then 25651if test "${ac_cv_libc_defines_sys_nerr+set}" = set; then
26606 $as_echo_n "(cached) " >&6 25652 echo $ECHO_N "(cached) $ECHO_C" >&6
26607else 25653else
26608 25654
26609 cat >conftest.$ac_ext <<_ACEOF 25655 cat >conftest.$ac_ext <<_ACEOF
@@ -26627,37 +25673,33 @@ case "(($ac_try" in
26627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26628 *) ac_try_echo=$ac_try;; 25674 *) ac_try_echo=$ac_try;;
26629esac 25675esac
26630eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26631$as_echo "$ac_try_echo") >&5
26632 (eval "$ac_link") 2>conftest.er1 25677 (eval "$ac_link") 2>conftest.er1
26633 ac_status=$? 25678 ac_status=$?
26634 grep -v '^ *+' conftest.er1 >conftest.err 25679 grep -v '^ *+' conftest.er1 >conftest.err
26635 rm -f conftest.er1 25680 rm -f conftest.er1
26636 cat conftest.err >&5 25681 cat conftest.err >&5
26637 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26638 (exit $ac_status); } && { 25683 (exit $ac_status); } && {
26639 test -z "$ac_c_werror_flag" || 25684 test -z "$ac_c_werror_flag" ||
26640 test ! -s conftest.err 25685 test ! -s conftest.err
26641 } && test -s conftest$ac_exeext && { 25686 } && test -s conftest$ac_exeext &&
26642 test "$cross_compiling" = yes || 25687 $as_test_x conftest$ac_exeext; then
26643 $as_test_x conftest$ac_exeext
26644 }; then
26645 ac_cv_libc_defines_sys_nerr="yes" 25688 ac_cv_libc_defines_sys_nerr="yes"
26646else 25689else
26647 $as_echo "$as_me: failed program was:" >&5 25690 echo "$as_me: failed program was:" >&5
26648sed 's/^/| /' conftest.$ac_ext >&5 25691sed 's/^/| /' conftest.$ac_ext >&5
26649 25692
26650 ac_cv_libc_defines_sys_nerr="no" 25693 ac_cv_libc_defines_sys_nerr="no"
26651 25694
26652fi 25695fi
26653 25696
26654rm -rf conftest.dSYM
26655rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25697rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26656 conftest$ac_exeext conftest.$ac_ext 25698 conftest$ac_exeext conftest.$ac_ext
26657 25699
26658fi 25700fi
26659{ $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
26660$as_echo "$ac_cv_libc_defines_sys_nerr" >&6; } 25702echo "${ECHO_T}$ac_cv_libc_defines_sys_nerr" >&6; }
26661if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then 25703if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
26662 25704
26663cat >>confdefs.h <<\_ACEOF 25705cat >>confdefs.h <<\_ACEOF
@@ -26666,354 +25708,11 @@ _ACEOF
26666 25708
26667fi 25709fi
26668 25710
26669SCARD_MSG="no"
26670# Check whether user wants sectok support
26671
26672# Check whether --with-sectok was given.
26673if test "${with_sectok+set}" = set; then
26674 withval=$with_sectok;
26675 if test "x$withval" != "xno" ; then
26676 if test "x$withval" != "xyes" ; then
26677 CPPFLAGS="$CPPFLAGS -I${withval}"
26678 LDFLAGS="$LDFLAGS -L${withval}"
26679 if test ! -z "$need_dash_r" ; then
26680 LDFLAGS="$LDFLAGS -R${withval}"
26681 fi
26682 if test ! -z "$blibpath" ; then
26683 blibpath="$blibpath:${withval}"
26684 fi
26685 fi
26686
26687for ac_header in sectok.h
26688do
26689as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
26690if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
26691 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
26692$as_echo_n "checking for $ac_header... " >&6; }
26693if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
26694 $as_echo_n "(cached) " >&6
26695fi
26696ac_res=`eval 'as_val=${'$as_ac_Header'}
26697 $as_echo "$as_val"'`
26698 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
26699$as_echo "$ac_res" >&6; }
26700else
26701 # Is the header compilable?
26702{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
26703$as_echo_n "checking $ac_header usability... " >&6; }
26704cat >conftest.$ac_ext <<_ACEOF
26705/* confdefs.h. */
26706_ACEOF
26707cat confdefs.h >>conftest.$ac_ext
26708cat >>conftest.$ac_ext <<_ACEOF
26709/* end confdefs.h. */
26710$ac_includes_default
26711#include <$ac_header>
26712_ACEOF
26713rm -f conftest.$ac_objext
26714if { (ac_try="$ac_compile"
26715case "(($ac_try" in
26716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26717 *) ac_try_echo=$ac_try;;
26718esac
26719eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26720$as_echo "$ac_try_echo") >&5
26721 (eval "$ac_compile") 2>conftest.er1
26722 ac_status=$?
26723 grep -v '^ *+' conftest.er1 >conftest.err
26724 rm -f conftest.er1
26725 cat conftest.err >&5
26726 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26727 (exit $ac_status); } && {
26728 test -z "$ac_c_werror_flag" ||
26729 test ! -s conftest.err
26730 } && test -s conftest.$ac_objext; then
26731 ac_header_compiler=yes
26732else
26733 $as_echo "$as_me: failed program was:" >&5
26734sed 's/^/| /' conftest.$ac_ext >&5
26735
26736 ac_header_compiler=no
26737fi
26738
26739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26740{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26741$as_echo "$ac_header_compiler" >&6; }
26742
26743# Is the header present?
26744{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
26745$as_echo_n "checking $ac_header presence... " >&6; }
26746cat >conftest.$ac_ext <<_ACEOF
26747/* confdefs.h. */
26748_ACEOF
26749cat confdefs.h >>conftest.$ac_ext
26750cat >>conftest.$ac_ext <<_ACEOF
26751/* end confdefs.h. */
26752#include <$ac_header>
26753_ACEOF
26754if { (ac_try="$ac_cpp conftest.$ac_ext"
26755case "(($ac_try" in
26756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26757 *) ac_try_echo=$ac_try;;
26758esac
26759eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26760$as_echo "$ac_try_echo") >&5
26761 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
26762 ac_status=$?
26763 grep -v '^ *+' conftest.er1 >conftest.err
26764 rm -f conftest.er1
26765 cat conftest.err >&5
26766 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26767 (exit $ac_status); } >/dev/null && {
26768 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26769 test ! -s conftest.err
26770 }; then
26771 ac_header_preproc=yes
26772else
26773 $as_echo "$as_me: failed program was:" >&5
26774sed 's/^/| /' conftest.$ac_ext >&5
26775
26776 ac_header_preproc=no
26777fi
26778
26779rm -f conftest.err conftest.$ac_ext
26780{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26781$as_echo "$ac_header_preproc" >&6; }
26782
26783# So? What about this header?
26784case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26785 yes:no: )
26786 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26787$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26788 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26789$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26790 ac_header_preproc=yes
26791 ;;
26792 no:yes:* )
26793 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26794$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26795 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
26796$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
26797 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26798$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26799 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
26800$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
26801 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26802$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26803 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26804$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26805 ( cat <<\_ASBOX
26806## ------------------------------------------- ##
26807## Report this to openssh-unix-dev@mindrot.org ##
26808## ------------------------------------------- ##
26809_ASBOX
26810 ) | sed "s/^/$as_me: WARNING: /" >&2
26811 ;;
26812esac
26813{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
26814$as_echo_n "checking for $ac_header... " >&6; }
26815if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
26816 $as_echo_n "(cached) " >&6
26817else
26818 eval "$as_ac_Header=\$ac_header_preproc"
26819fi
26820ac_res=`eval 'as_val=${'$as_ac_Header'}
26821 $as_echo "$as_val"'`
26822 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
26823$as_echo "$ac_res" >&6; }
26824
26825fi
26826if test `eval 'as_val=${'$as_ac_Header'}
26827 $as_echo "$as_val"'` = yes; then
26828 cat >>confdefs.h <<_ACEOF
26829#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
26830_ACEOF
26831
26832fi
26833
26834done
26835
26836 if test "$ac_cv_header_sectok_h" != yes; then
26837 { { $as_echo "$as_me:$LINENO: error: Can't find sectok.h" >&5
26838$as_echo "$as_me: error: Can't find sectok.h" >&2;}
26839 { (exit 1); exit 1; }; }
26840 fi
26841
26842{ $as_echo "$as_me:$LINENO: checking for sectok_open in -lsectok" >&5
26843$as_echo_n "checking for sectok_open in -lsectok... " >&6; }
26844if test "${ac_cv_lib_sectok_sectok_open+set}" = set; then
26845 $as_echo_n "(cached) " >&6
26846else
26847 ac_check_lib_save_LIBS=$LIBS
26848LIBS="-lsectok $LIBS"
26849cat >conftest.$ac_ext <<_ACEOF
26850/* confdefs.h. */
26851_ACEOF
26852cat confdefs.h >>conftest.$ac_ext
26853cat >>conftest.$ac_ext <<_ACEOF
26854/* end confdefs.h. */
26855
26856/* Override any GCC internal prototype to avoid an error.
26857 Use char because int might match the return type of a GCC
26858 builtin and then its argument prototype would still apply. */
26859#ifdef __cplusplus
26860extern "C"
26861#endif
26862char sectok_open ();
26863int
26864main ()
26865{
26866return sectok_open ();
26867 ;
26868 return 0;
26869}
26870_ACEOF
26871rm -f conftest.$ac_objext conftest$ac_exeext
26872if { (ac_try="$ac_link"
26873case "(($ac_try" in
26874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26875 *) ac_try_echo=$ac_try;;
26876esac
26877eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26878$as_echo "$ac_try_echo") >&5
26879 (eval "$ac_link") 2>conftest.er1
26880 ac_status=$?
26881 grep -v '^ *+' conftest.er1 >conftest.err
26882 rm -f conftest.er1
26883 cat conftest.err >&5
26884 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26885 (exit $ac_status); } && {
26886 test -z "$ac_c_werror_flag" ||
26887 test ! -s conftest.err
26888 } && test -s conftest$ac_exeext && {
26889 test "$cross_compiling" = yes ||
26890 $as_test_x conftest$ac_exeext
26891 }; then
26892 ac_cv_lib_sectok_sectok_open=yes
26893else
26894 $as_echo "$as_me: failed program was:" >&5
26895sed 's/^/| /' conftest.$ac_ext >&5
26896
26897 ac_cv_lib_sectok_sectok_open=no
26898fi
26899
26900rm -rf conftest.dSYM
26901rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26902 conftest$ac_exeext conftest.$ac_ext
26903LIBS=$ac_check_lib_save_LIBS
26904fi
26905{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sectok_sectok_open" >&5
26906$as_echo "$ac_cv_lib_sectok_sectok_open" >&6; }
26907if test $ac_cv_lib_sectok_sectok_open = yes; then
26908 cat >>confdefs.h <<_ACEOF
26909#define HAVE_LIBSECTOK 1
26910_ACEOF
26911
26912 LIBS="-lsectok $LIBS"
26913
26914fi
26915
26916 if test "$ac_cv_lib_sectok_sectok_open" != yes; then
26917 { { $as_echo "$as_me:$LINENO: error: Can't find libsectok" >&5
26918$as_echo "$as_me: error: Can't find libsectok" >&2;}
26919 { (exit 1); exit 1; }; }
26920 fi
26921
26922cat >>confdefs.h <<\_ACEOF
26923#define SMARTCARD 1
26924_ACEOF
26925
26926
26927cat >>confdefs.h <<\_ACEOF
26928#define USE_SECTOK 1
26929_ACEOF
26930
26931 SCARD_MSG="yes, using sectok"
26932 fi
26933
26934
26935fi
26936
26937
26938# Check whether user wants OpenSC support
26939OPENSC_CONFIG="no"
26940
26941# Check whether --with-opensc was given.
26942if test "${with_opensc+set}" = set; then
26943 withval=$with_opensc;
26944 if test "x$withval" != "xno" ; then
26945 if test "x$withval" != "xyes" ; then
26946 OPENSC_CONFIG=$withval/bin/opensc-config
26947 else
26948 # Extract the first word of "opensc-config", so it can be a program name with args.
26949set dummy opensc-config; ac_word=$2
26950{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
26951$as_echo_n "checking for $ac_word... " >&6; }
26952if test "${ac_cv_path_OPENSC_CONFIG+set}" = set; then
26953 $as_echo_n "(cached) " >&6
26954else
26955 case $OPENSC_CONFIG in
26956 [\\/]* | ?:[\\/]*)
26957 ac_cv_path_OPENSC_CONFIG="$OPENSC_CONFIG" # Let the user override the test with a path.
26958 ;;
26959 *)
26960 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26961for as_dir in $PATH
26962do
26963 IFS=$as_save_IFS
26964 test -z "$as_dir" && as_dir=.
26965 for ac_exec_ext in '' $ac_executable_extensions; do
26966 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26967 ac_cv_path_OPENSC_CONFIG="$as_dir/$ac_word$ac_exec_ext"
26968 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
26969 break 2
26970 fi
26971done
26972done
26973IFS=$as_save_IFS
26974
26975 test -z "$ac_cv_path_OPENSC_CONFIG" && ac_cv_path_OPENSC_CONFIG="no"
26976 ;;
26977esac
26978fi
26979OPENSC_CONFIG=$ac_cv_path_OPENSC_CONFIG
26980if test -n "$OPENSC_CONFIG"; then
26981 { $as_echo "$as_me:$LINENO: result: $OPENSC_CONFIG" >&5
26982$as_echo "$OPENSC_CONFIG" >&6; }
26983else
26984 { $as_echo "$as_me:$LINENO: result: no" >&5
26985$as_echo "no" >&6; }
26986fi
26987
26988
26989 fi
26990 if test "$OPENSC_CONFIG" != "no"; then
26991 LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags`
26992 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs`
26993 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
26994 LIBS="$LIBS $LIBOPENSC_LIBS"
26995 cat >>confdefs.h <<\_ACEOF
26996#define SMARTCARD 1
26997_ACEOF
26998
26999
27000cat >>confdefs.h <<\_ACEOF
27001#define USE_OPENSC 1
27002_ACEOF
27003
27004 SCARD_MSG="yes, using OpenSC"
27005 fi
27006 fi
27007
27008
27009fi
27010
27011
27012# Check libraries needed by DNS fingerprint support 25711# Check libraries needed by DNS fingerprint support
27013{ $as_echo "$as_me:$LINENO: checking for library containing getrrsetbyname" >&5 25712{ echo "$as_me:$LINENO: checking for library containing getrrsetbyname" >&5
27014$as_echo_n "checking for library containing getrrsetbyname... " >&6; } 25713echo $ECHO_N "checking for library containing getrrsetbyname... $ECHO_C" >&6; }
27015if test "${ac_cv_search_getrrsetbyname+set}" = set; then 25714if test "${ac_cv_search_getrrsetbyname+set}" = set; then
27016 $as_echo_n "(cached) " >&6 25715 echo $ECHO_N "(cached) $ECHO_C" >&6
27017else 25716else
27018 ac_func_search_save_LIBS=$LIBS 25717 ac_func_search_save_LIBS=$LIBS
27019cat >conftest.$ac_ext <<_ACEOF 25718cat >conftest.$ac_ext <<_ACEOF
@@ -27051,30 +25750,26 @@ case "(($ac_try" in
27051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27052 *) ac_try_echo=$ac_try;; 25751 *) ac_try_echo=$ac_try;;
27053esac 25752esac
27054eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27055$as_echo "$ac_try_echo") >&5
27056 (eval "$ac_link") 2>conftest.er1 25754 (eval "$ac_link") 2>conftest.er1
27057 ac_status=$? 25755 ac_status=$?
27058 grep -v '^ *+' conftest.er1 >conftest.err 25756 grep -v '^ *+' conftest.er1 >conftest.err
27059 rm -f conftest.er1 25757 rm -f conftest.er1
27060 cat conftest.err >&5 25758 cat conftest.err >&5
27061 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27062 (exit $ac_status); } && { 25760 (exit $ac_status); } && {
27063 test -z "$ac_c_werror_flag" || 25761 test -z "$ac_c_werror_flag" ||
27064 test ! -s conftest.err 25762 test ! -s conftest.err
27065 } && test -s conftest$ac_exeext && { 25763 } && test -s conftest$ac_exeext &&
27066 test "$cross_compiling" = yes || 25764 $as_test_x conftest$ac_exeext; then
27067 $as_test_x conftest$ac_exeext
27068 }; then
27069 ac_cv_search_getrrsetbyname=$ac_res 25765 ac_cv_search_getrrsetbyname=$ac_res
27070else 25766else
27071 $as_echo "$as_me: failed program was:" >&5 25767 echo "$as_me: failed program was:" >&5
27072sed 's/^/| /' conftest.$ac_ext >&5 25768sed 's/^/| /' conftest.$ac_ext >&5
27073 25769
27074 25770
27075fi 25771fi
27076 25772
27077rm -rf conftest.dSYM
27078rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25773rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27079 conftest$ac_exeext 25774 conftest$ac_exeext
27080 if test "${ac_cv_search_getrrsetbyname+set}" = set; then 25775 if test "${ac_cv_search_getrrsetbyname+set}" = set; then
@@ -27089,8 +25784,8 @@ fi
27089rm conftest.$ac_ext 25784rm conftest.$ac_ext
27090LIBS=$ac_func_search_save_LIBS 25785LIBS=$ac_func_search_save_LIBS
27091fi 25786fi
27092{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_getrrsetbyname" >&5 25787{ echo "$as_me:$LINENO: result: $ac_cv_search_getrrsetbyname" >&5
27093$as_echo "$ac_cv_search_getrrsetbyname" >&6; } 25788echo "${ECHO_T}$ac_cv_search_getrrsetbyname" >&6; }
27094ac_res=$ac_cv_search_getrrsetbyname 25789ac_res=$ac_cv_search_getrrsetbyname
27095if test "$ac_res" != no; then 25790if test "$ac_res" != no; then
27096 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 25791 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
@@ -27102,10 +25797,10 @@ _ACEOF
27102else 25797else
27103 25798
27104 # Needed by our getrrsetbyname() 25799 # Needed by our getrrsetbyname()
27105 { $as_echo "$as_me:$LINENO: checking for library containing res_query" >&5 25800 { echo "$as_me:$LINENO: checking for library containing res_query" >&5
27106$as_echo_n "checking for library containing res_query... " >&6; } 25801echo $ECHO_N "checking for library containing res_query... $ECHO_C" >&6; }
27107if test "${ac_cv_search_res_query+set}" = set; then 25802if test "${ac_cv_search_res_query+set}" = set; then
27108 $as_echo_n "(cached) " >&6 25803 echo $ECHO_N "(cached) $ECHO_C" >&6
27109else 25804else
27110 ac_func_search_save_LIBS=$LIBS 25805 ac_func_search_save_LIBS=$LIBS
27111cat >conftest.$ac_ext <<_ACEOF 25806cat >conftest.$ac_ext <<_ACEOF
@@ -27143,30 +25838,26 @@ case "(($ac_try" in
27143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27144 *) ac_try_echo=$ac_try;; 25839 *) ac_try_echo=$ac_try;;
27145esac 25840esac
27146eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27147$as_echo "$ac_try_echo") >&5
27148 (eval "$ac_link") 2>conftest.er1 25842 (eval "$ac_link") 2>conftest.er1
27149 ac_status=$? 25843 ac_status=$?
27150 grep -v '^ *+' conftest.er1 >conftest.err 25844 grep -v '^ *+' conftest.er1 >conftest.err
27151 rm -f conftest.er1 25845 rm -f conftest.er1
27152 cat conftest.err >&5 25846 cat conftest.err >&5
27153 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27154 (exit $ac_status); } && { 25848 (exit $ac_status); } && {
27155 test -z "$ac_c_werror_flag" || 25849 test -z "$ac_c_werror_flag" ||
27156 test ! -s conftest.err 25850 test ! -s conftest.err
27157 } && test -s conftest$ac_exeext && { 25851 } && test -s conftest$ac_exeext &&
27158 test "$cross_compiling" = yes || 25852 $as_test_x conftest$ac_exeext; then
27159 $as_test_x conftest$ac_exeext
27160 }; then
27161 ac_cv_search_res_query=$ac_res 25853 ac_cv_search_res_query=$ac_res
27162else 25854else
27163 $as_echo "$as_me: failed program was:" >&5 25855 echo "$as_me: failed program was:" >&5
27164sed 's/^/| /' conftest.$ac_ext >&5 25856sed 's/^/| /' conftest.$ac_ext >&5
27165 25857
27166 25858
27167fi 25859fi
27168 25860
27169rm -rf conftest.dSYM
27170rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25861rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27171 conftest$ac_exeext 25862 conftest$ac_exeext
27172 if test "${ac_cv_search_res_query+set}" = set; then 25863 if test "${ac_cv_search_res_query+set}" = set; then
@@ -27181,18 +25872,18 @@ fi
27181rm conftest.$ac_ext 25872rm conftest.$ac_ext
27182LIBS=$ac_func_search_save_LIBS 25873LIBS=$ac_func_search_save_LIBS
27183fi 25874fi
27184{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_res_query" >&5 25875{ echo "$as_me:$LINENO: result: $ac_cv_search_res_query" >&5
27185$as_echo "$ac_cv_search_res_query" >&6; } 25876echo "${ECHO_T}$ac_cv_search_res_query" >&6; }
27186ac_res=$ac_cv_search_res_query 25877ac_res=$ac_cv_search_res_query
27187if test "$ac_res" != no; then 25878if test "$ac_res" != no; then
27188 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 25879 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27189 25880
27190fi 25881fi
27191 25882
27192 { $as_echo "$as_me:$LINENO: checking for library containing dn_expand" >&5 25883 { echo "$as_me:$LINENO: checking for library containing dn_expand" >&5
27193$as_echo_n "checking for library containing dn_expand... " >&6; } 25884echo $ECHO_N "checking for library containing dn_expand... $ECHO_C" >&6; }
27194if test "${ac_cv_search_dn_expand+set}" = set; then 25885if test "${ac_cv_search_dn_expand+set}" = set; then
27195 $as_echo_n "(cached) " >&6 25886 echo $ECHO_N "(cached) $ECHO_C" >&6
27196else 25887else
27197 ac_func_search_save_LIBS=$LIBS 25888 ac_func_search_save_LIBS=$LIBS
27198cat >conftest.$ac_ext <<_ACEOF 25889cat >conftest.$ac_ext <<_ACEOF
@@ -27230,30 +25921,26 @@ case "(($ac_try" in
27230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27231 *) ac_try_echo=$ac_try;; 25922 *) ac_try_echo=$ac_try;;
27232esac 25923esac
27233eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27234$as_echo "$ac_try_echo") >&5
27235 (eval "$ac_link") 2>conftest.er1 25925 (eval "$ac_link") 2>conftest.er1
27236 ac_status=$? 25926 ac_status=$?
27237 grep -v '^ *+' conftest.er1 >conftest.err 25927 grep -v '^ *+' conftest.er1 >conftest.err
27238 rm -f conftest.er1 25928 rm -f conftest.er1
27239 cat conftest.err >&5 25929 cat conftest.err >&5
27240 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27241 (exit $ac_status); } && { 25931 (exit $ac_status); } && {
27242 test -z "$ac_c_werror_flag" || 25932 test -z "$ac_c_werror_flag" ||
27243 test ! -s conftest.err 25933 test ! -s conftest.err
27244 } && test -s conftest$ac_exeext && { 25934 } && test -s conftest$ac_exeext &&
27245 test "$cross_compiling" = yes || 25935 $as_test_x conftest$ac_exeext; then
27246 $as_test_x conftest$ac_exeext
27247 }; then
27248 ac_cv_search_dn_expand=$ac_res 25936 ac_cv_search_dn_expand=$ac_res
27249else 25937else
27250 $as_echo "$as_me: failed program was:" >&5 25938 echo "$as_me: failed program was:" >&5
27251sed 's/^/| /' conftest.$ac_ext >&5 25939sed 's/^/| /' conftest.$ac_ext >&5
27252 25940
27253 25941
27254fi 25942fi
27255 25943
27256rm -rf conftest.dSYM
27257rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 25944rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27258 conftest$ac_exeext 25945 conftest$ac_exeext
27259 if test "${ac_cv_search_dn_expand+set}" = set; then 25946 if test "${ac_cv_search_dn_expand+set}" = set; then
@@ -27268,16 +25955,16 @@ fi
27268rm conftest.$ac_ext 25955rm conftest.$ac_ext
27269LIBS=$ac_func_search_save_LIBS 25956LIBS=$ac_func_search_save_LIBS
27270fi 25957fi
27271{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_dn_expand" >&5 25958{ echo "$as_me:$LINENO: result: $ac_cv_search_dn_expand" >&5
27272$as_echo "$ac_cv_search_dn_expand" >&6; } 25959echo "${ECHO_T}$ac_cv_search_dn_expand" >&6; }
27273ac_res=$ac_cv_search_dn_expand 25960ac_res=$ac_cv_search_dn_expand
27274if test "$ac_res" != no; then 25961if test "$ac_res" != no; then
27275 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 25962 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27276 25963
27277fi 25964fi
27278 25965
27279 { $as_echo "$as_me:$LINENO: checking if res_query will link" >&5 25966 { echo "$as_me:$LINENO: checking if res_query will link" >&5
27280$as_echo_n "checking if res_query will link... " >&6; } 25967echo $ECHO_N "checking if res_query will link... $ECHO_C" >&6; }
27281 cat >conftest.$ac_ext <<_ACEOF 25968 cat >conftest.$ac_ext <<_ACEOF
27282 25969
27283#include "confdefs.h" 25970#include "confdefs.h"
@@ -27299,33 +25986,30 @@ case "(($ac_try" in
27299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 25986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27300 *) ac_try_echo=$ac_try;; 25987 *) ac_try_echo=$ac_try;;
27301esac 25988esac
27302eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 25989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27303$as_echo "$ac_try_echo") >&5
27304 (eval "$ac_link") 2>conftest.er1 25990 (eval "$ac_link") 2>conftest.er1
27305 ac_status=$? 25991 ac_status=$?
27306 grep -v '^ *+' conftest.er1 >conftest.err 25992 grep -v '^ *+' conftest.er1 >conftest.err
27307 rm -f conftest.er1 25993 rm -f conftest.er1
27308 cat conftest.err >&5 25994 cat conftest.err >&5
27309 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 25995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27310 (exit $ac_status); } && { 25996 (exit $ac_status); } && {
27311 test -z "$ac_c_werror_flag" || 25997 test -z "$ac_c_werror_flag" ||
27312 test ! -s conftest.err 25998 test ! -s conftest.err
27313 } && test -s conftest$ac_exeext && { 25999 } && test -s conftest$ac_exeext &&
27314 test "$cross_compiling" = yes || 26000 $as_test_x conftest$ac_exeext; then
27315 $as_test_x conftest$ac_exeext 26001 { echo "$as_me:$LINENO: result: yes" >&5
27316 }; then 26002echo "${ECHO_T}yes" >&6; }
27317 { $as_echo "$as_me:$LINENO: result: yes" >&5
27318$as_echo "yes" >&6; }
27319else 26003else
27320 $as_echo "$as_me: failed program was:" >&5 26004 echo "$as_me: failed program was:" >&5
27321sed 's/^/| /' conftest.$ac_ext >&5 26005sed 's/^/| /' conftest.$ac_ext >&5
27322 26006
27323 { $as_echo "$as_me:$LINENO: result: no" >&5 26007 { echo "$as_me:$LINENO: result: no" >&5
27324$as_echo "no" >&6; } 26008echo "${ECHO_T}no" >&6; }
27325 saved_LIBS="$LIBS" 26009 saved_LIBS="$LIBS"
27326 LIBS="$LIBS -lresolv" 26010 LIBS="$LIBS -lresolv"
27327 { $as_echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5 26011 { echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5
27328$as_echo_n "checking for res_query in -lresolv... " >&6; } 26012echo $ECHO_N "checking for res_query in -lresolv... $ECHO_C" >&6; }
27329 cat >conftest.$ac_ext <<_ACEOF 26013 cat >conftest.$ac_ext <<_ACEOF
27330 26014
27331#include "confdefs.h" 26015#include "confdefs.h"
@@ -27347,50 +26031,45 @@ case "(($ac_try" in
27347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27348 *) ac_try_echo=$ac_try;; 26032 *) ac_try_echo=$ac_try;;
27349esac 26033esac
27350eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27351$as_echo "$ac_try_echo") >&5
27352 (eval "$ac_link") 2>conftest.er1 26035 (eval "$ac_link") 2>conftest.er1
27353 ac_status=$? 26036 ac_status=$?
27354 grep -v '^ *+' conftest.er1 >conftest.err 26037 grep -v '^ *+' conftest.er1 >conftest.err
27355 rm -f conftest.er1 26038 rm -f conftest.er1
27356 cat conftest.err >&5 26039 cat conftest.err >&5
27357 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27358 (exit $ac_status); } && { 26041 (exit $ac_status); } && {
27359 test -z "$ac_c_werror_flag" || 26042 test -z "$ac_c_werror_flag" ||
27360 test ! -s conftest.err 26043 test ! -s conftest.err
27361 } && test -s conftest$ac_exeext && { 26044 } && test -s conftest$ac_exeext &&
27362 test "$cross_compiling" = yes || 26045 $as_test_x conftest$ac_exeext; then
27363 $as_test_x conftest$ac_exeext 26046 { echo "$as_me:$LINENO: result: yes" >&5
27364 }; then 26047echo "${ECHO_T}yes" >&6; }
27365 { $as_echo "$as_me:$LINENO: result: yes" >&5
27366$as_echo "yes" >&6; }
27367else 26048else
27368 $as_echo "$as_me: failed program was:" >&5 26049 echo "$as_me: failed program was:" >&5
27369sed 's/^/| /' conftest.$ac_ext >&5 26050sed 's/^/| /' conftest.$ac_ext >&5
27370 26051
27371 LIBS="$saved_LIBS" 26052 LIBS="$saved_LIBS"
27372 { $as_echo "$as_me:$LINENO: result: no" >&5 26053 { echo "$as_me:$LINENO: result: no" >&5
27373$as_echo "no" >&6; } 26054echo "${ECHO_T}no" >&6; }
27374fi 26055fi
27375 26056
27376rm -rf conftest.dSYM
27377rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 26057rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27378 conftest$ac_exeext conftest.$ac_ext 26058 conftest$ac_exeext conftest.$ac_ext
27379 26059
27380fi 26060fi
27381 26061
27382rm -rf conftest.dSYM
27383rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 26062rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27384 conftest$ac_exeext conftest.$ac_ext 26063 conftest$ac_exeext conftest.$ac_ext
27385 26064
27386 26065
27387for ac_func in _getshort _getlong 26066for ac_func in _getshort _getlong
27388do 26067do
27389as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 26068as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
27390{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 26069{ echo "$as_me:$LINENO: checking for $ac_func" >&5
27391$as_echo_n "checking for $ac_func... " >&6; } 26070echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
27392if { 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
27393 $as_echo_n "(cached) " >&6 26072 echo $ECHO_N "(cached) $ECHO_C" >&6
27394else 26073else
27395 cat >conftest.$ac_ext <<_ACEOF 26074 cat >conftest.$ac_ext <<_ACEOF
27396/* confdefs.h. */ 26075/* confdefs.h. */
@@ -27443,50 +26122,44 @@ case "(($ac_try" in
27443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27444 *) ac_try_echo=$ac_try;; 26123 *) ac_try_echo=$ac_try;;
27445esac 26124esac
27446eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27447$as_echo "$ac_try_echo") >&5
27448 (eval "$ac_link") 2>conftest.er1 26126 (eval "$ac_link") 2>conftest.er1
27449 ac_status=$? 26127 ac_status=$?
27450 grep -v '^ *+' conftest.er1 >conftest.err 26128 grep -v '^ *+' conftest.er1 >conftest.err
27451 rm -f conftest.er1 26129 rm -f conftest.er1
27452 cat conftest.err >&5 26130 cat conftest.err >&5
27453 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27454 (exit $ac_status); } && { 26132 (exit $ac_status); } && {
27455 test -z "$ac_c_werror_flag" || 26133 test -z "$ac_c_werror_flag" ||
27456 test ! -s conftest.err 26134 test ! -s conftest.err
27457 } && test -s conftest$ac_exeext && { 26135 } && test -s conftest$ac_exeext &&
27458 test "$cross_compiling" = yes || 26136 $as_test_x conftest$ac_exeext; then
27459 $as_test_x conftest$ac_exeext
27460 }; then
27461 eval "$as_ac_var=yes" 26137 eval "$as_ac_var=yes"
27462else 26138else
27463 $as_echo "$as_me: failed program was:" >&5 26139 echo "$as_me: failed program was:" >&5
27464sed 's/^/| /' conftest.$ac_ext >&5 26140sed 's/^/| /' conftest.$ac_ext >&5
27465 26141
27466 eval "$as_ac_var=no" 26142 eval "$as_ac_var=no"
27467fi 26143fi
27468 26144
27469rm -rf conftest.dSYM
27470rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 26145rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27471 conftest$ac_exeext conftest.$ac_ext 26146 conftest$ac_exeext conftest.$ac_ext
27472fi 26147fi
27473ac_res=`eval 'as_val=${'$as_ac_var'} 26148ac_res=`eval echo '${'$as_ac_var'}'`
27474 $as_echo "$as_val"'` 26149 { echo "$as_me:$LINENO: result: $ac_res" >&5
27475 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 26150echo "${ECHO_T}$ac_res" >&6; }
27476$as_echo "$ac_res" >&6; } 26151if test `eval echo '${'$as_ac_var'}'` = yes; then
27477if test `eval 'as_val=${'$as_ac_var'}
27478 $as_echo "$as_val"'` = yes; then
27479 cat >>confdefs.h <<_ACEOF 26152 cat >>confdefs.h <<_ACEOF
27480#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 26153#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
27481_ACEOF 26154_ACEOF
27482 26155
27483fi 26156fi
27484done 26157done
27485 26158
27486 { $as_echo "$as_me:$LINENO: checking whether _getshort is declared" >&5 26159 { echo "$as_me:$LINENO: checking whether _getshort is declared" >&5
27487$as_echo_n "checking whether _getshort is declared... " >&6; } 26160echo $ECHO_N "checking whether _getshort is declared... $ECHO_C" >&6; }
27488if test "${ac_cv_have_decl__getshort+set}" = set; then 26161if test "${ac_cv_have_decl__getshort+set}" = set; then
27489 $as_echo_n "(cached) " >&6 26162 echo $ECHO_N "(cached) $ECHO_C" >&6
27490else 26163else
27491 cat >conftest.$ac_ext <<_ACEOF 26164 cat >conftest.$ac_ext <<_ACEOF
27492/* confdefs.h. */ 26165/* confdefs.h. */
@@ -27514,21 +26187,20 @@ case "(($ac_try" in
27514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27515 *) ac_try_echo=$ac_try;; 26188 *) ac_try_echo=$ac_try;;
27516esac 26189esac
27517eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27518$as_echo "$ac_try_echo") >&5
27519 (eval "$ac_compile") 2>conftest.er1 26191 (eval "$ac_compile") 2>conftest.er1
27520 ac_status=$? 26192 ac_status=$?
27521 grep -v '^ *+' conftest.er1 >conftest.err 26193 grep -v '^ *+' conftest.er1 >conftest.err
27522 rm -f conftest.er1 26194 rm -f conftest.er1
27523 cat conftest.err >&5 26195 cat conftest.err >&5
27524 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27525 (exit $ac_status); } && { 26197 (exit $ac_status); } && {
27526 test -z "$ac_c_werror_flag" || 26198 test -z "$ac_c_werror_flag" ||
27527 test ! -s conftest.err 26199 test ! -s conftest.err
27528 } && test -s conftest.$ac_objext; then 26200 } && test -s conftest.$ac_objext; then
27529 ac_cv_have_decl__getshort=yes 26201 ac_cv_have_decl__getshort=yes
27530else 26202else
27531 $as_echo "$as_me: failed program was:" >&5 26203 echo "$as_me: failed program was:" >&5
27532sed 's/^/| /' conftest.$ac_ext >&5 26204sed 's/^/| /' conftest.$ac_ext >&5
27533 26205
27534 ac_cv_have_decl__getshort=no 26206 ac_cv_have_decl__getshort=no
@@ -27536,8 +26208,8 @@ fi
27536 26208
27537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 26209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27538fi 26210fi
27539{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl__getshort" >&5 26211{ echo "$as_me:$LINENO: result: $ac_cv_have_decl__getshort" >&5
27540$as_echo "$ac_cv_have_decl__getshort" >&6; } 26212echo "${ECHO_T}$ac_cv_have_decl__getshort" >&6; }
27541if test $ac_cv_have_decl__getshort = yes; then 26213if test $ac_cv_have_decl__getshort = yes; then
27542 26214
27543cat >>confdefs.h <<_ACEOF 26215cat >>confdefs.h <<_ACEOF
@@ -27552,10 +26224,10 @@ _ACEOF
27552 26224
27553 26225
27554fi 26226fi
27555{ $as_echo "$as_me:$LINENO: checking whether _getlong is declared" >&5 26227{ echo "$as_me:$LINENO: checking whether _getlong is declared" >&5
27556$as_echo_n "checking whether _getlong is declared... " >&6; } 26228echo $ECHO_N "checking whether _getlong is declared... $ECHO_C" >&6; }
27557if test "${ac_cv_have_decl__getlong+set}" = set; then 26229if test "${ac_cv_have_decl__getlong+set}" = set; then
27558 $as_echo_n "(cached) " >&6 26230 echo $ECHO_N "(cached) $ECHO_C" >&6
27559else 26231else
27560 cat >conftest.$ac_ext <<_ACEOF 26232 cat >conftest.$ac_ext <<_ACEOF
27561/* confdefs.h. */ 26233/* confdefs.h. */
@@ -27583,21 +26255,20 @@ case "(($ac_try" in
27583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27584 *) ac_try_echo=$ac_try;; 26256 *) ac_try_echo=$ac_try;;
27585esac 26257esac
27586eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27587$as_echo "$ac_try_echo") >&5
27588 (eval "$ac_compile") 2>conftest.er1 26259 (eval "$ac_compile") 2>conftest.er1
27589 ac_status=$? 26260 ac_status=$?
27590 grep -v '^ *+' conftest.er1 >conftest.err 26261 grep -v '^ *+' conftest.er1 >conftest.err
27591 rm -f conftest.er1 26262 rm -f conftest.er1
27592 cat conftest.err >&5 26263 cat conftest.err >&5
27593 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27594 (exit $ac_status); } && { 26265 (exit $ac_status); } && {
27595 test -z "$ac_c_werror_flag" || 26266 test -z "$ac_c_werror_flag" ||
27596 test ! -s conftest.err 26267 test ! -s conftest.err
27597 } && test -s conftest.$ac_objext; then 26268 } && test -s conftest.$ac_objext; then
27598 ac_cv_have_decl__getlong=yes 26269 ac_cv_have_decl__getlong=yes
27599else 26270else
27600 $as_echo "$as_me: failed program was:" >&5 26271 echo "$as_me: failed program was:" >&5
27601sed 's/^/| /' conftest.$ac_ext >&5 26272sed 's/^/| /' conftest.$ac_ext >&5
27602 26273
27603 ac_cv_have_decl__getlong=no 26274 ac_cv_have_decl__getlong=no
@@ -27605,8 +26276,8 @@ fi
27605 26276
27606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 26277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27607fi 26278fi
27608{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl__getlong" >&5 26279{ echo "$as_me:$LINENO: result: $ac_cv_have_decl__getlong" >&5
27609$as_echo "$ac_cv_have_decl__getlong" >&6; } 26280echo "${ECHO_T}$ac_cv_have_decl__getlong" >&6; }
27610if test $ac_cv_have_decl__getlong = yes; then 26281if test $ac_cv_have_decl__getlong = yes; then
27611 26282
27612cat >>confdefs.h <<_ACEOF 26283cat >>confdefs.h <<_ACEOF
@@ -27623,10 +26294,10 @@ _ACEOF
27623fi 26294fi
27624 26295
27625 26296
27626 { $as_echo "$as_me:$LINENO: checking for HEADER.ad" >&5 26297 { echo "$as_me:$LINENO: checking for HEADER.ad" >&5
27627$as_echo_n "checking for HEADER.ad... " >&6; } 26298echo $ECHO_N "checking for HEADER.ad... $ECHO_C" >&6; }
27628if test "${ac_cv_member_HEADER_ad+set}" = set; then 26299if test "${ac_cv_member_HEADER_ad+set}" = set; then
27629 $as_echo_n "(cached) " >&6 26300 echo $ECHO_N "(cached) $ECHO_C" >&6
27630else 26301else
27631 cat >conftest.$ac_ext <<_ACEOF 26302 cat >conftest.$ac_ext <<_ACEOF
27632/* confdefs.h. */ 26303/* confdefs.h. */
@@ -27652,21 +26323,20 @@ case "(($ac_try" in
27652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27653 *) ac_try_echo=$ac_try;; 26324 *) ac_try_echo=$ac_try;;
27654esac 26325esac
27655eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27656$as_echo "$ac_try_echo") >&5
27657 (eval "$ac_compile") 2>conftest.er1 26327 (eval "$ac_compile") 2>conftest.er1
27658 ac_status=$? 26328 ac_status=$?
27659 grep -v '^ *+' conftest.er1 >conftest.err 26329 grep -v '^ *+' conftest.er1 >conftest.err
27660 rm -f conftest.er1 26330 rm -f conftest.er1
27661 cat conftest.err >&5 26331 cat conftest.err >&5
27662 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27663 (exit $ac_status); } && { 26333 (exit $ac_status); } && {
27664 test -z "$ac_c_werror_flag" || 26334 test -z "$ac_c_werror_flag" ||
27665 test ! -s conftest.err 26335 test ! -s conftest.err
27666 } && test -s conftest.$ac_objext; then 26336 } && test -s conftest.$ac_objext; then
27667 ac_cv_member_HEADER_ad=yes 26337 ac_cv_member_HEADER_ad=yes
27668else 26338else
27669 $as_echo "$as_me: failed program was:" >&5 26339 echo "$as_me: failed program was:" >&5
27670sed 's/^/| /' conftest.$ac_ext >&5 26340sed 's/^/| /' conftest.$ac_ext >&5
27671 26341
27672 cat >conftest.$ac_ext <<_ACEOF 26342 cat >conftest.$ac_ext <<_ACEOF
@@ -27693,21 +26363,20 @@ case "(($ac_try" in
27693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27694 *) ac_try_echo=$ac_try;; 26364 *) ac_try_echo=$ac_try;;
27695esac 26365esac
27696eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27697$as_echo "$ac_try_echo") >&5
27698 (eval "$ac_compile") 2>conftest.er1 26367 (eval "$ac_compile") 2>conftest.er1
27699 ac_status=$? 26368 ac_status=$?
27700 grep -v '^ *+' conftest.er1 >conftest.err 26369 grep -v '^ *+' conftest.er1 >conftest.err
27701 rm -f conftest.er1 26370 rm -f conftest.er1
27702 cat conftest.err >&5 26371 cat conftest.err >&5
27703 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27704 (exit $ac_status); } && { 26373 (exit $ac_status); } && {
27705 test -z "$ac_c_werror_flag" || 26374 test -z "$ac_c_werror_flag" ||
27706 test ! -s conftest.err 26375 test ! -s conftest.err
27707 } && test -s conftest.$ac_objext; then 26376 } && test -s conftest.$ac_objext; then
27708 ac_cv_member_HEADER_ad=yes 26377 ac_cv_member_HEADER_ad=yes
27709else 26378else
27710 $as_echo "$as_me: failed program was:" >&5 26379 echo "$as_me: failed program was:" >&5
27711sed 's/^/| /' conftest.$ac_ext >&5 26380sed 's/^/| /' conftest.$ac_ext >&5
27712 26381
27713 ac_cv_member_HEADER_ad=no 26382 ac_cv_member_HEADER_ad=no
@@ -27718,8 +26387,8 @@ fi
27718 26387
27719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 26388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27720fi 26389fi
27721{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_HEADER_ad" >&5 26390{ echo "$as_me:$LINENO: result: $ac_cv_member_HEADER_ad" >&5
27722$as_echo "$ac_cv_member_HEADER_ad" >&6; } 26391echo "${ECHO_T}$ac_cv_member_HEADER_ad" >&6; }
27723if test $ac_cv_member_HEADER_ad = yes; then 26392if test $ac_cv_member_HEADER_ad = yes; then
27724 26393
27725cat >>confdefs.h <<\_ACEOF 26394cat >>confdefs.h <<\_ACEOF
@@ -27732,8 +26401,8 @@ fi
27732fi 26401fi
27733 26402
27734 26403
27735{ $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
27736$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; }
27737cat >conftest.$ac_ext <<_ACEOF 26406cat >conftest.$ac_ext <<_ACEOF
27738 26407
27739#include <stdio.h> 26408#include <stdio.h>
@@ -27753,23 +26422,20 @@ case "(($ac_try" in
27753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27754 *) ac_try_echo=$ac_try;; 26423 *) ac_try_echo=$ac_try;;
27755esac 26424esac
27756eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27757$as_echo "$ac_try_echo") >&5
27758 (eval "$ac_link") 2>conftest.er1 26426 (eval "$ac_link") 2>conftest.er1
27759 ac_status=$? 26427 ac_status=$?
27760 grep -v '^ *+' conftest.er1 >conftest.err 26428 grep -v '^ *+' conftest.er1 >conftest.err
27761 rm -f conftest.er1 26429 rm -f conftest.er1
27762 cat conftest.err >&5 26430 cat conftest.err >&5
27763 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27764 (exit $ac_status); } && { 26432 (exit $ac_status); } && {
27765 test -z "$ac_c_werror_flag" || 26433 test -z "$ac_c_werror_flag" ||
27766 test ! -s conftest.err 26434 test ! -s conftest.err
27767 } && test -s conftest$ac_exeext && { 26435 } && test -s conftest$ac_exeext &&
27768 test "$cross_compiling" = yes || 26436 $as_test_x conftest$ac_exeext; then
27769 $as_test_x conftest$ac_exeext 26437 { echo "$as_me:$LINENO: result: yes" >&5
27770 }; then 26438echo "${ECHO_T}yes" >&6; }
27771 { $as_echo "$as_me:$LINENO: result: yes" >&5
27772$as_echo "yes" >&6; }
27773 26439
27774cat >>confdefs.h <<\_ACEOF 26440cat >>confdefs.h <<\_ACEOF
27775#define HAVE__RES_EXTERN 1 26441#define HAVE__RES_EXTERN 1
@@ -27777,15 +26443,14 @@ _ACEOF
27777 26443
27778 26444
27779else 26445else
27780 $as_echo "$as_me: failed program was:" >&5 26446 echo "$as_me: failed program was:" >&5
27781sed 's/^/| /' conftest.$ac_ext >&5 26447sed 's/^/| /' conftest.$ac_ext >&5
27782 26448
27783 { $as_echo "$as_me:$LINENO: result: no" >&5 26449 { echo "$as_me:$LINENO: result: no" >&5
27784$as_echo "no" >&6; } 26450echo "${ECHO_T}no" >&6; }
27785 26451
27786fi 26452fi
27787 26453
27788rm -rf conftest.dSYM
27789rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 26454rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27790 conftest$ac_exeext conftest.$ac_ext 26455 conftest$ac_exeext conftest.$ac_ext
27791 26456
@@ -27804,17 +26469,17 @@ _ACEOF
27804 26469
27805 SELINUX_MSG="yes" 26470 SELINUX_MSG="yes"
27806 if test "${ac_cv_header_selinux_selinux_h+set}" = set; then 26471 if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
27807 { $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5 26472 { echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5
27808$as_echo_n "checking for selinux/selinux.h... " >&6; } 26473echo $ECHO_N "checking for selinux/selinux.h... $ECHO_C" >&6; }
27809if test "${ac_cv_header_selinux_selinux_h+set}" = set; then 26474if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
27810 $as_echo_n "(cached) " >&6 26475 echo $ECHO_N "(cached) $ECHO_C" >&6
27811fi 26476fi
27812{ $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
27813$as_echo "$ac_cv_header_selinux_selinux_h" >&6; } 26478echo "${ECHO_T}$ac_cv_header_selinux_selinux_h" >&6; }
27814else 26479else
27815 # Is the header compilable? 26480 # Is the header compilable?
27816{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h usability" >&5 26481{ echo "$as_me:$LINENO: checking selinux/selinux.h usability" >&5
27817$as_echo_n "checking selinux/selinux.h usability... " >&6; } 26482echo $ECHO_N "checking selinux/selinux.h usability... $ECHO_C" >&6; }
27818cat >conftest.$ac_ext <<_ACEOF 26483cat >conftest.$ac_ext <<_ACEOF
27819/* confdefs.h. */ 26484/* confdefs.h. */
27820_ACEOF 26485_ACEOF
@@ -27830,33 +26495,32 @@ case "(($ac_try" in
27830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27831 *) ac_try_echo=$ac_try;; 26496 *) ac_try_echo=$ac_try;;
27832esac 26497esac
27833eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27834$as_echo "$ac_try_echo") >&5
27835 (eval "$ac_compile") 2>conftest.er1 26499 (eval "$ac_compile") 2>conftest.er1
27836 ac_status=$? 26500 ac_status=$?
27837 grep -v '^ *+' conftest.er1 >conftest.err 26501 grep -v '^ *+' conftest.er1 >conftest.err
27838 rm -f conftest.er1 26502 rm -f conftest.er1
27839 cat conftest.err >&5 26503 cat conftest.err >&5
27840 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27841 (exit $ac_status); } && { 26505 (exit $ac_status); } && {
27842 test -z "$ac_c_werror_flag" || 26506 test -z "$ac_c_werror_flag" ||
27843 test ! -s conftest.err 26507 test ! -s conftest.err
27844 } && test -s conftest.$ac_objext; then 26508 } && test -s conftest.$ac_objext; then
27845 ac_header_compiler=yes 26509 ac_header_compiler=yes
27846else 26510else
27847 $as_echo "$as_me: failed program was:" >&5 26511 echo "$as_me: failed program was:" >&5
27848sed 's/^/| /' conftest.$ac_ext >&5 26512sed 's/^/| /' conftest.$ac_ext >&5
27849 26513
27850 ac_header_compiler=no 26514 ac_header_compiler=no
27851fi 26515fi
27852 26516
27853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 26517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27854{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 26518{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27855$as_echo "$ac_header_compiler" >&6; } 26519echo "${ECHO_T}$ac_header_compiler" >&6; }
27856 26520
27857# Is the header present? 26521# Is the header present?
27858{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h presence" >&5 26522{ echo "$as_me:$LINENO: checking selinux/selinux.h presence" >&5
27859$as_echo_n "checking selinux/selinux.h presence... " >&6; } 26523echo $ECHO_N "checking selinux/selinux.h presence... $ECHO_C" >&6; }
27860cat >conftest.$ac_ext <<_ACEOF 26524cat >conftest.$ac_ext <<_ACEOF
27861/* confdefs.h. */ 26525/* confdefs.h. */
27862_ACEOF 26526_ACEOF
@@ -27870,52 +26534,51 @@ case "(($ac_try" in
27870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27871 *) ac_try_echo=$ac_try;; 26535 *) ac_try_echo=$ac_try;;
27872esac 26536esac
27873eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27874$as_echo "$ac_try_echo") >&5
27875 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 26538 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
27876 ac_status=$? 26539 ac_status=$?
27877 grep -v '^ *+' conftest.er1 >conftest.err 26540 grep -v '^ *+' conftest.er1 >conftest.err
27878 rm -f conftest.er1 26541 rm -f conftest.er1
27879 cat conftest.err >&5 26542 cat conftest.err >&5
27880 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27881 (exit $ac_status); } >/dev/null && { 26544 (exit $ac_status); } >/dev/null && {
27882 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 26545 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
27883 test ! -s conftest.err 26546 test ! -s conftest.err
27884 }; then 26547 }; then
27885 ac_header_preproc=yes 26548 ac_header_preproc=yes
27886else 26549else
27887 $as_echo "$as_me: failed program was:" >&5 26550 echo "$as_me: failed program was:" >&5
27888sed 's/^/| /' conftest.$ac_ext >&5 26551sed 's/^/| /' conftest.$ac_ext >&5
27889 26552
27890 ac_header_preproc=no 26553 ac_header_preproc=no
27891fi 26554fi
27892 26555
27893rm -f conftest.err conftest.$ac_ext 26556rm -f conftest.err conftest.$ac_ext
27894{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 26557{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27895$as_echo "$ac_header_preproc" >&6; } 26558echo "${ECHO_T}$ac_header_preproc" >&6; }
27896 26559
27897# So? What about this header? 26560# So? What about this header?
27898case $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
27899 yes:no: ) 26562 yes:no: )
27900 { $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
27901$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;}
27902 { $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
27903$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;}
27904 ac_header_preproc=yes 26567 ac_header_preproc=yes
27905 ;; 26568 ;;
27906 no:yes:* ) 26569 no:yes:* )
27907 { $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
27908$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;}
27909 { $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
27910$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;}
27911 { $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
27912$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;}
27913 { $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
27914$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;}
27915 { $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
27916$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;}
27917 { $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
27918$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;}
27919 ( cat <<\_ASBOX 26582 ( cat <<\_ASBOX
27920## ------------------------------------------- ## 26583## ------------------------------------------- ##
27921## Report this to openssh-unix-dev@mindrot.org ## 26584## Report this to openssh-unix-dev@mindrot.org ##
@@ -27924,30 +26587,30 @@ _ASBOX
27924 ) | sed "s/^/$as_me: WARNING: /" >&2 26587 ) | sed "s/^/$as_me: WARNING: /" >&2
27925 ;; 26588 ;;
27926esac 26589esac
27927{ $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5 26590{ echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5
27928$as_echo_n "checking for selinux/selinux.h... " >&6; } 26591echo $ECHO_N "checking for selinux/selinux.h... $ECHO_C" >&6; }
27929if test "${ac_cv_header_selinux_selinux_h+set}" = set; then 26592if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
27930 $as_echo_n "(cached) " >&6 26593 echo $ECHO_N "(cached) $ECHO_C" >&6
27931else 26594else
27932 ac_cv_header_selinux_selinux_h=$ac_header_preproc 26595 ac_cv_header_selinux_selinux_h=$ac_header_preproc
27933fi 26596fi
27934{ $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
27935$as_echo "$ac_cv_header_selinux_selinux_h" >&6; } 26598echo "${ECHO_T}$ac_cv_header_selinux_selinux_h" >&6; }
27936 26599
27937fi 26600fi
27938if test $ac_cv_header_selinux_selinux_h = yes; then 26601if test $ac_cv_header_selinux_selinux_h = yes; then
27939 : 26602 :
27940else 26603else
27941 { { $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
27942$as_echo "$as_me: error: SELinux support requires selinux.h header" >&2;} 26605echo "$as_me: error: SELinux support requires selinux.h header" >&2;}
27943 { (exit 1); exit 1; }; } 26606 { (exit 1); exit 1; }; }
27944fi 26607fi
27945 26608
27946 26609
27947 { $as_echo "$as_me:$LINENO: checking for setexeccon in -lselinux" >&5 26610 { echo "$as_me:$LINENO: checking for setexeccon in -lselinux" >&5
27948$as_echo_n "checking for setexeccon in -lselinux... " >&6; } 26611echo $ECHO_N "checking for setexeccon in -lselinux... $ECHO_C" >&6; }
27949if test "${ac_cv_lib_selinux_setexeccon+set}" = set; then 26612if test "${ac_cv_lib_selinux_setexeccon+set}" = set; then
27950 $as_echo_n "(cached) " >&6 26613 echo $ECHO_N "(cached) $ECHO_C" >&6
27951else 26614else
27952 ac_check_lib_save_LIBS=$LIBS 26615 ac_check_lib_save_LIBS=$LIBS
27953LIBS="-lselinux $LIBS" 26616LIBS="-lselinux $LIBS"
@@ -27979,41 +26642,39 @@ case "(($ac_try" in
27979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27980 *) ac_try_echo=$ac_try;; 26643 *) ac_try_echo=$ac_try;;
27981esac 26644esac
27982eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27983$as_echo "$ac_try_echo") >&5
27984 (eval "$ac_link") 2>conftest.er1 26646 (eval "$ac_link") 2>conftest.er1
27985 ac_status=$? 26647 ac_status=$?
27986 grep -v '^ *+' conftest.er1 >conftest.err 26648 grep -v '^ *+' conftest.er1 >conftest.err
27987 rm -f conftest.er1 26649 rm -f conftest.er1
27988 cat conftest.err >&5 26650 cat conftest.err >&5
27989 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27990 (exit $ac_status); } && { 26652 (exit $ac_status); } && {
27991 test -z "$ac_c_werror_flag" || 26653 test -z "$ac_c_werror_flag" ||
27992 test ! -s conftest.err 26654 test ! -s conftest.err
27993 } && test -s conftest$ac_exeext && { 26655 } && test -s conftest$ac_exeext &&
27994 test "$cross_compiling" = yes || 26656 $as_test_x conftest$ac_exeext; then
27995 $as_test_x conftest$ac_exeext
27996 }; then
27997 ac_cv_lib_selinux_setexeccon=yes 26657 ac_cv_lib_selinux_setexeccon=yes
27998else 26658else
27999 $as_echo "$as_me: failed program was:" >&5 26659 echo "$as_me: failed program was:" >&5
28000sed 's/^/| /' conftest.$ac_ext >&5 26660sed 's/^/| /' conftest.$ac_ext >&5
28001 26661
28002 ac_cv_lib_selinux_setexeccon=no 26662 ac_cv_lib_selinux_setexeccon=no
28003fi 26663fi
28004 26664
28005rm -rf conftest.dSYM
28006rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 26665rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28007 conftest$ac_exeext conftest.$ac_ext 26666 conftest$ac_exeext conftest.$ac_ext
28008LIBS=$ac_check_lib_save_LIBS 26667LIBS=$ac_check_lib_save_LIBS
28009fi 26668fi
28010{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_setexeccon" >&5 26669{ echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_setexeccon" >&5
28011$as_echo "$ac_cv_lib_selinux_setexeccon" >&6; } 26670echo "${ECHO_T}$ac_cv_lib_selinux_setexeccon" >&6; }
28012if test $ac_cv_lib_selinux_setexeccon = yes; then 26671if test $ac_cv_lib_selinux_setexeccon = yes; then
28013 LIBSELINUX="-lselinux" 26672 LIBSELINUX="-lselinux"
26673 LIBS="$LIBS -lselinux"
26674
28014else 26675else
28015 { { $as_echo "$as_me:$LINENO: error: SELinux support requires libselinux library" >&5 26676 { { echo "$as_me:$LINENO: error: SELinux support requires libselinux library" >&5
28016$as_echo "$as_me: error: SELinux support requires libselinux library" >&2;} 26677echo "$as_me: error: SELinux support requires libselinux library" >&2;}
28017 { (exit 1); exit 1; }; } 26678 { (exit 1); exit 1; }; }
28018fi 26679fi
28019 26680
@@ -28022,11 +26683,11 @@ fi
28022 26683
28023for ac_func in getseuserbyname get_default_context_with_level 26684for ac_func in getseuserbyname get_default_context_with_level
28024do 26685do
28025as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 26686as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
28026{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 26687{ echo "$as_me:$LINENO: checking for $ac_func" >&5
28027$as_echo_n "checking for $ac_func... " >&6; } 26688echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
28028if { 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
28029 $as_echo_n "(cached) " >&6 26690 echo $ECHO_N "(cached) $ECHO_C" >&6
28030else 26691else
28031 cat >conftest.$ac_ext <<_ACEOF 26692 cat >conftest.$ac_ext <<_ACEOF
28032/* confdefs.h. */ 26693/* confdefs.h. */
@@ -28079,41 +26740,35 @@ case "(($ac_try" in
28079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28080 *) ac_try_echo=$ac_try;; 26741 *) ac_try_echo=$ac_try;;
28081esac 26742esac
28082eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28083$as_echo "$ac_try_echo") >&5
28084 (eval "$ac_link") 2>conftest.er1 26744 (eval "$ac_link") 2>conftest.er1
28085 ac_status=$? 26745 ac_status=$?
28086 grep -v '^ *+' conftest.er1 >conftest.err 26746 grep -v '^ *+' conftest.er1 >conftest.err
28087 rm -f conftest.er1 26747 rm -f conftest.er1
28088 cat conftest.err >&5 26748 cat conftest.err >&5
28089 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28090 (exit $ac_status); } && { 26750 (exit $ac_status); } && {
28091 test -z "$ac_c_werror_flag" || 26751 test -z "$ac_c_werror_flag" ||
28092 test ! -s conftest.err 26752 test ! -s conftest.err
28093 } && test -s conftest$ac_exeext && { 26753 } && test -s conftest$ac_exeext &&
28094 test "$cross_compiling" = yes || 26754 $as_test_x conftest$ac_exeext; then
28095 $as_test_x conftest$ac_exeext
28096 }; then
28097 eval "$as_ac_var=yes" 26755 eval "$as_ac_var=yes"
28098else 26756else
28099 $as_echo "$as_me: failed program was:" >&5 26757 echo "$as_me: failed program was:" >&5
28100sed 's/^/| /' conftest.$ac_ext >&5 26758sed 's/^/| /' conftest.$ac_ext >&5
28101 26759
28102 eval "$as_ac_var=no" 26760 eval "$as_ac_var=no"
28103fi 26761fi
28104 26762
28105rm -rf conftest.dSYM
28106rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 26763rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28107 conftest$ac_exeext conftest.$ac_ext 26764 conftest$ac_exeext conftest.$ac_ext
28108fi 26765fi
28109ac_res=`eval 'as_val=${'$as_ac_var'} 26766ac_res=`eval echo '${'$as_ac_var'}'`
28110 $as_echo "$as_val"'` 26767 { echo "$as_me:$LINENO: result: $ac_res" >&5
28111 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 26768echo "${ECHO_T}$ac_res" >&6; }
28112$as_echo "$ac_res" >&6; } 26769if test `eval echo '${'$as_ac_var'}'` = yes; then
28113if test `eval 'as_val=${'$as_ac_var'}
28114 $as_echo "$as_val"'` = yes; then
28115 cat >>confdefs.h <<_ACEOF 26770 cat >>confdefs.h <<_ACEOF
28116#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 26771#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
28117_ACEOF 26772_ACEOF
28118 26773
28119fi 26774fi
@@ -28146,10 +26801,10 @@ _ACEOF
28146 26801
28147 # 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.
28148set dummy krb5-config; ac_word=$2 26803set dummy krb5-config; ac_word=$2
28149{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 26804{ echo "$as_me:$LINENO: checking for $ac_word" >&5
28150$as_echo_n "checking for $ac_word... " >&6; } 26805echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
28151if test "${ac_cv_path_KRB5CONF+set}" = set; then 26806if test "${ac_cv_path_KRB5CONF+set}" = set; then
28152 $as_echo_n "(cached) " >&6 26807 echo $ECHO_N "(cached) $ECHO_C" >&6
28153else 26808else
28154 case $KRB5CONF in 26809 case $KRB5CONF in
28155 [\\/]* | ?:[\\/]*) 26810 [\\/]* | ?:[\\/]*)
@@ -28165,7 +26820,7 @@ do
28165 for ac_exec_ext in '' $ac_executable_extensions; do 26820 for ac_exec_ext in '' $ac_executable_extensions; do
28166 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
28167 ac_cv_path_KRB5CONF="$as_dir/$ac_word$ac_exec_ext" 26822 ac_cv_path_KRB5CONF="$as_dir/$ac_word$ac_exec_ext"
28168 $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
28169 break 2 26824 break 2
28170 fi 26825 fi
28171done 26826done
@@ -28178,21 +26833,21 @@ esac
28178fi 26833fi
28179KRB5CONF=$ac_cv_path_KRB5CONF 26834KRB5CONF=$ac_cv_path_KRB5CONF
28180if test -n "$KRB5CONF"; then 26835if test -n "$KRB5CONF"; then
28181 { $as_echo "$as_me:$LINENO: result: $KRB5CONF" >&5 26836 { echo "$as_me:$LINENO: result: $KRB5CONF" >&5
28182$as_echo "$KRB5CONF" >&6; } 26837echo "${ECHO_T}$KRB5CONF" >&6; }
28183else 26838else
28184 { $as_echo "$as_me:$LINENO: result: no" >&5 26839 { echo "$as_me:$LINENO: result: no" >&5
28185$as_echo "no" >&6; } 26840echo "${ECHO_T}no" >&6; }
28186fi 26841fi
28187 26842
28188 26843
28189 if test -x $KRB5CONF ; then 26844 if test -x $KRB5CONF ; then
28190 26845
28191 { $as_echo "$as_me:$LINENO: checking for gssapi support" >&5 26846 { echo "$as_me:$LINENO: checking for gssapi support" >&5
28192$as_echo_n "checking for gssapi support... " >&6; } 26847echo $ECHO_N "checking for gssapi support... $ECHO_C" >&6; }
28193 if $KRB5CONF | grep gssapi >/dev/null ; then 26848 if $KRB5CONF | grep gssapi >/dev/null ; then
28194 { $as_echo "$as_me:$LINENO: result: yes" >&5 26849 { echo "$as_me:$LINENO: result: yes" >&5
28195$as_echo "yes" >&6; } 26850echo "${ECHO_T}yes" >&6; }
28196 26851
28197cat >>confdefs.h <<\_ACEOF 26852cat >>confdefs.h <<\_ACEOF
28198#define GSSAPI 1 26853#define GSSAPI 1
@@ -28200,15 +26855,15 @@ _ACEOF
28200 26855
28201 k5confopts=gssapi 26856 k5confopts=gssapi
28202 else 26857 else
28203 { $as_echo "$as_me:$LINENO: result: no" >&5 26858 { echo "$as_me:$LINENO: result: no" >&5
28204$as_echo "no" >&6; } 26859echo "${ECHO_T}no" >&6; }
28205 k5confopts="" 26860 k5confopts=""
28206 fi 26861 fi
28207 K5CFLAGS="`$KRB5CONF --cflags $k5confopts`" 26862 K5CFLAGS="`$KRB5CONF --cflags $k5confopts`"
28208 K5LIBS="`$KRB5CONF --libs $k5confopts`" 26863 K5LIBS="`$KRB5CONF --libs $k5confopts`"
28209 CPPFLAGS="$CPPFLAGS $K5CFLAGS" 26864 CPPFLAGS="$CPPFLAGS $K5CFLAGS"
28210 { $as_echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5 26865 { echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5
28211$as_echo_n "checking whether we are using Heimdal... " >&6; } 26866echo $ECHO_N "checking whether we are using Heimdal... $ECHO_C" >&6; }
28212 cat >conftest.$ac_ext <<_ACEOF 26867 cat >conftest.$ac_ext <<_ACEOF
28213/* confdefs.h. */ 26868/* confdefs.h. */
28214_ACEOF 26869_ACEOF
@@ -28230,31 +26885,30 @@ case "(($ac_try" in
28230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28231 *) ac_try_echo=$ac_try;; 26886 *) ac_try_echo=$ac_try;;
28232esac 26887esac
28233eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28234$as_echo "$ac_try_echo") >&5
28235 (eval "$ac_compile") 2>conftest.er1 26889 (eval "$ac_compile") 2>conftest.er1
28236 ac_status=$? 26890 ac_status=$?
28237 grep -v '^ *+' conftest.er1 >conftest.err 26891 grep -v '^ *+' conftest.er1 >conftest.err
28238 rm -f conftest.er1 26892 rm -f conftest.er1
28239 cat conftest.err >&5 26893 cat conftest.err >&5
28240 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28241 (exit $ac_status); } && { 26895 (exit $ac_status); } && {
28242 test -z "$ac_c_werror_flag" || 26896 test -z "$ac_c_werror_flag" ||
28243 test ! -s conftest.err 26897 test ! -s conftest.err
28244 } && test -s conftest.$ac_objext; then 26898 } && test -s conftest.$ac_objext; then
28245 { $as_echo "$as_me:$LINENO: result: yes" >&5 26899 { echo "$as_me:$LINENO: result: yes" >&5
28246$as_echo "yes" >&6; } 26900echo "${ECHO_T}yes" >&6; }
28247 26901
28248cat >>confdefs.h <<\_ACEOF 26902cat >>confdefs.h <<\_ACEOF
28249#define HEIMDAL 1 26903#define HEIMDAL 1
28250_ACEOF 26904_ACEOF
28251 26905
28252else 26906else
28253 $as_echo "$as_me: failed program was:" >&5 26907 echo "$as_me: failed program was:" >&5
28254sed 's/^/| /' conftest.$ac_ext >&5 26908sed 's/^/| /' conftest.$ac_ext >&5
28255 26909
28256 { $as_echo "$as_me:$LINENO: result: no" >&5 26910 { echo "$as_me:$LINENO: result: no" >&5
28257$as_echo "no" >&6; } 26911echo "${ECHO_T}no" >&6; }
28258 26912
28259fi 26913fi
28260 26914
@@ -28262,8 +26916,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28262 else 26916 else
28263 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include" 26917 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
28264 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib" 26918 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
28265 { $as_echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5 26919 { echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5
28266$as_echo_n "checking whether we are using Heimdal... " >&6; } 26920echo $ECHO_N "checking whether we are using Heimdal... $ECHO_C" >&6; }
28267 cat >conftest.$ac_ext <<_ACEOF 26921 cat >conftest.$ac_ext <<_ACEOF
28268/* confdefs.h. */ 26922/* confdefs.h. */
28269_ACEOF 26923_ACEOF
@@ -28285,30 +26939,29 @@ case "(($ac_try" in
28285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28286 *) ac_try_echo=$ac_try;; 26940 *) ac_try_echo=$ac_try;;
28287esac 26941esac
28288eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28289$as_echo "$ac_try_echo") >&5
28290 (eval "$ac_compile") 2>conftest.er1 26943 (eval "$ac_compile") 2>conftest.er1
28291 ac_status=$? 26944 ac_status=$?
28292 grep -v '^ *+' conftest.er1 >conftest.err 26945 grep -v '^ *+' conftest.er1 >conftest.err
28293 rm -f conftest.er1 26946 rm -f conftest.er1
28294 cat conftest.err >&5 26947 cat conftest.err >&5
28295 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 26948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28296 (exit $ac_status); } && { 26949 (exit $ac_status); } && {
28297 test -z "$ac_c_werror_flag" || 26950 test -z "$ac_c_werror_flag" ||
28298 test ! -s conftest.err 26951 test ! -s conftest.err
28299 } && test -s conftest.$ac_objext; then 26952 } && test -s conftest.$ac_objext; then
28300 { $as_echo "$as_me:$LINENO: result: yes" >&5 26953 { echo "$as_me:$LINENO: result: yes" >&5
28301$as_echo "yes" >&6; } 26954echo "${ECHO_T}yes" >&6; }
28302 cat >>confdefs.h <<\_ACEOF 26955 cat >>confdefs.h <<\_ACEOF
28303#define HEIMDAL 1 26956#define HEIMDAL 1
28304_ACEOF 26957_ACEOF
28305 26958
28306 K5LIBS="-lkrb5 -ldes" 26959 K5LIBS="-lkrb5 -ldes"
28307 K5LIBS="$K5LIBS -lcom_err -lasn1" 26960 K5LIBS="$K5LIBS -lcom_err -lasn1"
28308 { $as_echo "$as_me:$LINENO: checking for net_write in -lroken" >&5 26961 { echo "$as_me:$LINENO: checking for net_write in -lroken" >&5
28309$as_echo_n "checking for net_write in -lroken... " >&6; } 26962echo $ECHO_N "checking for net_write in -lroken... $ECHO_C" >&6; }
28310if test "${ac_cv_lib_roken_net_write+set}" = set; then 26963if test "${ac_cv_lib_roken_net_write+set}" = set; then
28311 $as_echo_n "(cached) " >&6 26964 echo $ECHO_N "(cached) $ECHO_C" >&6
28312else 26965else
28313 ac_check_lib_save_LIBS=$LIBS 26966 ac_check_lib_save_LIBS=$LIBS
28314LIBS="-lroken $LIBS" 26967LIBS="-lroken $LIBS"
@@ -28340,57 +26993,53 @@ case "(($ac_try" in
28340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 26993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28341 *) ac_try_echo=$ac_try;; 26994 *) ac_try_echo=$ac_try;;
28342esac 26995esac
28343eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 26996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28344$as_echo "$ac_try_echo") >&5
28345 (eval "$ac_link") 2>conftest.er1 26997 (eval "$ac_link") 2>conftest.er1
28346 ac_status=$? 26998 ac_status=$?
28347 grep -v '^ *+' conftest.er1 >conftest.err 26999 grep -v '^ *+' conftest.er1 >conftest.err
28348 rm -f conftest.er1 27000 rm -f conftest.er1
28349 cat conftest.err >&5 27001 cat conftest.err >&5
28350 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28351 (exit $ac_status); } && { 27003 (exit $ac_status); } && {
28352 test -z "$ac_c_werror_flag" || 27004 test -z "$ac_c_werror_flag" ||
28353 test ! -s conftest.err 27005 test ! -s conftest.err
28354 } && test -s conftest$ac_exeext && { 27006 } && test -s conftest$ac_exeext &&
28355 test "$cross_compiling" = yes || 27007 $as_test_x conftest$ac_exeext; then
28356 $as_test_x conftest$ac_exeext
28357 }; then
28358 ac_cv_lib_roken_net_write=yes 27008 ac_cv_lib_roken_net_write=yes
28359else 27009else
28360 $as_echo "$as_me: failed program was:" >&5 27010 echo "$as_me: failed program was:" >&5
28361sed 's/^/| /' conftest.$ac_ext >&5 27011sed 's/^/| /' conftest.$ac_ext >&5
28362 27012
28363 ac_cv_lib_roken_net_write=no 27013 ac_cv_lib_roken_net_write=no
28364fi 27014fi
28365 27015
28366rm -rf conftest.dSYM
28367rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 27016rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28368 conftest$ac_exeext conftest.$ac_ext 27017 conftest$ac_exeext conftest.$ac_ext
28369LIBS=$ac_check_lib_save_LIBS 27018LIBS=$ac_check_lib_save_LIBS
28370fi 27019fi
28371{ $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
28372$as_echo "$ac_cv_lib_roken_net_write" >&6; } 27021echo "${ECHO_T}$ac_cv_lib_roken_net_write" >&6; }
28373if test $ac_cv_lib_roken_net_write = yes; then 27022if test $ac_cv_lib_roken_net_write = yes; then
28374 K5LIBS="$K5LIBS -lroken" 27023 K5LIBS="$K5LIBS -lroken"
28375fi 27024fi
28376 27025
28377 27026
28378else 27027else
28379 $as_echo "$as_me: failed program was:" >&5 27028 echo "$as_me: failed program was:" >&5
28380sed 's/^/| /' conftest.$ac_ext >&5 27029sed 's/^/| /' conftest.$ac_ext >&5
28381 27030
28382 { $as_echo "$as_me:$LINENO: result: no" >&5 27031 { echo "$as_me:$LINENO: result: no" >&5
28383$as_echo "no" >&6; } 27032echo "${ECHO_T}no" >&6; }
28384 K5LIBS="-lkrb5 -lk5crypto -lcom_err" 27033 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
28385 27034
28386 27035
28387fi 27036fi
28388 27037
28389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 27038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28390 { $as_echo "$as_me:$LINENO: checking for library containing dn_expand" >&5 27039 { echo "$as_me:$LINENO: checking for library containing dn_expand" >&5
28391$as_echo_n "checking for library containing dn_expand... " >&6; } 27040echo $ECHO_N "checking for library containing dn_expand... $ECHO_C" >&6; }
28392if test "${ac_cv_search_dn_expand+set}" = set; then 27041if test "${ac_cv_search_dn_expand+set}" = set; then
28393 $as_echo_n "(cached) " >&6 27042 echo $ECHO_N "(cached) $ECHO_C" >&6
28394else 27043else
28395 ac_func_search_save_LIBS=$LIBS 27044 ac_func_search_save_LIBS=$LIBS
28396cat >conftest.$ac_ext <<_ACEOF 27045cat >conftest.$ac_ext <<_ACEOF
@@ -28428,30 +27077,26 @@ case "(($ac_try" in
28428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28429 *) ac_try_echo=$ac_try;; 27078 *) ac_try_echo=$ac_try;;
28430esac 27079esac
28431eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28432$as_echo "$ac_try_echo") >&5
28433 (eval "$ac_link") 2>conftest.er1 27081 (eval "$ac_link") 2>conftest.er1
28434 ac_status=$? 27082 ac_status=$?
28435 grep -v '^ *+' conftest.er1 >conftest.err 27083 grep -v '^ *+' conftest.er1 >conftest.err
28436 rm -f conftest.er1 27084 rm -f conftest.er1
28437 cat conftest.err >&5 27085 cat conftest.err >&5
28438 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28439 (exit $ac_status); } && { 27087 (exit $ac_status); } && {
28440 test -z "$ac_c_werror_flag" || 27088 test -z "$ac_c_werror_flag" ||
28441 test ! -s conftest.err 27089 test ! -s conftest.err
28442 } && test -s conftest$ac_exeext && { 27090 } && test -s conftest$ac_exeext &&
28443 test "$cross_compiling" = yes || 27091 $as_test_x conftest$ac_exeext; then
28444 $as_test_x conftest$ac_exeext
28445 }; then
28446 ac_cv_search_dn_expand=$ac_res 27092 ac_cv_search_dn_expand=$ac_res
28447else 27093else
28448 $as_echo "$as_me: failed program was:" >&5 27094 echo "$as_me: failed program was:" >&5
28449sed 's/^/| /' conftest.$ac_ext >&5 27095sed 's/^/| /' conftest.$ac_ext >&5
28450 27096
28451 27097
28452fi 27098fi
28453 27099
28454rm -rf conftest.dSYM
28455rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 27100rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28456 conftest$ac_exeext 27101 conftest$ac_exeext
28457 if test "${ac_cv_search_dn_expand+set}" = set; then 27102 if test "${ac_cv_search_dn_expand+set}" = set; then
@@ -28466,8 +27111,8 @@ fi
28466rm conftest.$ac_ext 27111rm conftest.$ac_ext
28467LIBS=$ac_func_search_save_LIBS 27112LIBS=$ac_func_search_save_LIBS
28468fi 27113fi
28469{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_dn_expand" >&5 27114{ echo "$as_me:$LINENO: result: $ac_cv_search_dn_expand" >&5
28470$as_echo "$ac_cv_search_dn_expand" >&6; } 27115echo "${ECHO_T}$ac_cv_search_dn_expand" >&6; }
28471ac_res=$ac_cv_search_dn_expand 27116ac_res=$ac_cv_search_dn_expand
28472if test "$ac_res" != no; then 27117if test "$ac_res" != no; then
28473 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 27118 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
@@ -28475,10 +27120,10 @@ if test "$ac_res" != no; then
28475fi 27120fi
28476 27121
28477 27122
28478 { $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
28479$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; }
28480if 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
28481 $as_echo_n "(cached) " >&6 27126 echo $ECHO_N "(cached) $ECHO_C" >&6
28482else 27127else
28483 ac_check_lib_save_LIBS=$LIBS 27128 ac_check_lib_save_LIBS=$LIBS
28484LIBS="-lgssapi_krb5 $K5LIBS $LIBS" 27129LIBS="-lgssapi_krb5 $K5LIBS $LIBS"
@@ -28510,36 +27155,32 @@ case "(($ac_try" in
28510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28511 *) ac_try_echo=$ac_try;; 27156 *) ac_try_echo=$ac_try;;
28512esac 27157esac
28513eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28514$as_echo "$ac_try_echo") >&5
28515 (eval "$ac_link") 2>conftest.er1 27159 (eval "$ac_link") 2>conftest.er1
28516 ac_status=$? 27160 ac_status=$?
28517 grep -v '^ *+' conftest.er1 >conftest.err 27161 grep -v '^ *+' conftest.er1 >conftest.err
28518 rm -f conftest.er1 27162 rm -f conftest.er1
28519 cat conftest.err >&5 27163 cat conftest.err >&5
28520 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28521 (exit $ac_status); } && { 27165 (exit $ac_status); } && {
28522 test -z "$ac_c_werror_flag" || 27166 test -z "$ac_c_werror_flag" ||
28523 test ! -s conftest.err 27167 test ! -s conftest.err
28524 } && test -s conftest$ac_exeext && { 27168 } && test -s conftest$ac_exeext &&
28525 test "$cross_compiling" = yes || 27169 $as_test_x conftest$ac_exeext; then
28526 $as_test_x conftest$ac_exeext
28527 }; then
28528 ac_cv_lib_gssapi_krb5_gss_init_sec_context=yes 27170 ac_cv_lib_gssapi_krb5_gss_init_sec_context=yes
28529else 27171else
28530 $as_echo "$as_me: failed program was:" >&5 27172 echo "$as_me: failed program was:" >&5
28531sed 's/^/| /' conftest.$ac_ext >&5 27173sed 's/^/| /' conftest.$ac_ext >&5
28532 27174
28533 ac_cv_lib_gssapi_krb5_gss_init_sec_context=no 27175 ac_cv_lib_gssapi_krb5_gss_init_sec_context=no
28534fi 27176fi
28535 27177
28536rm -rf conftest.dSYM
28537rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 27178rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28538 conftest$ac_exeext conftest.$ac_ext 27179 conftest$ac_exeext conftest.$ac_ext
28539LIBS=$ac_check_lib_save_LIBS 27180LIBS=$ac_check_lib_save_LIBS
28540fi 27181fi
28541{ $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
28542$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; }
28543if 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
28544 cat >>confdefs.h <<\_ACEOF 27185 cat >>confdefs.h <<\_ACEOF
28545#define GSSAPI 1 27186#define GSSAPI 1
@@ -28547,10 +27188,10 @@ _ACEOF
28547 27188
28548 K5LIBS="-lgssapi_krb5 $K5LIBS" 27189 K5LIBS="-lgssapi_krb5 $K5LIBS"
28549else 27190else
28550 { $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
28551$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; }
28552if 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
28553 $as_echo_n "(cached) " >&6 27194 echo $ECHO_N "(cached) $ECHO_C" >&6
28554else 27195else
28555 ac_check_lib_save_LIBS=$LIBS 27196 ac_check_lib_save_LIBS=$LIBS
28556LIBS="-lgssapi $K5LIBS $LIBS" 27197LIBS="-lgssapi $K5LIBS $LIBS"
@@ -28582,36 +27223,32 @@ case "(($ac_try" in
28582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28583 *) ac_try_echo=$ac_try;; 27224 *) ac_try_echo=$ac_try;;
28584esac 27225esac
28585eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28586$as_echo "$ac_try_echo") >&5
28587 (eval "$ac_link") 2>conftest.er1 27227 (eval "$ac_link") 2>conftest.er1
28588 ac_status=$? 27228 ac_status=$?
28589 grep -v '^ *+' conftest.er1 >conftest.err 27229 grep -v '^ *+' conftest.er1 >conftest.err
28590 rm -f conftest.er1 27230 rm -f conftest.er1
28591 cat conftest.err >&5 27231 cat conftest.err >&5
28592 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28593 (exit $ac_status); } && { 27233 (exit $ac_status); } && {
28594 test -z "$ac_c_werror_flag" || 27234 test -z "$ac_c_werror_flag" ||
28595 test ! -s conftest.err 27235 test ! -s conftest.err
28596 } && test -s conftest$ac_exeext && { 27236 } && test -s conftest$ac_exeext &&
28597 test "$cross_compiling" = yes || 27237 $as_test_x conftest$ac_exeext; then
28598 $as_test_x conftest$ac_exeext
28599 }; then
28600 ac_cv_lib_gssapi_gss_init_sec_context=yes 27238 ac_cv_lib_gssapi_gss_init_sec_context=yes
28601else 27239else
28602 $as_echo "$as_me: failed program was:" >&5 27240 echo "$as_me: failed program was:" >&5
28603sed 's/^/| /' conftest.$ac_ext >&5 27241sed 's/^/| /' conftest.$ac_ext >&5
28604 27242
28605 ac_cv_lib_gssapi_gss_init_sec_context=no 27243 ac_cv_lib_gssapi_gss_init_sec_context=no
28606fi 27244fi
28607 27245
28608rm -rf conftest.dSYM
28609rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 27246rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28610 conftest$ac_exeext conftest.$ac_ext 27247 conftest$ac_exeext conftest.$ac_ext
28611LIBS=$ac_check_lib_save_LIBS 27248LIBS=$ac_check_lib_save_LIBS
28612fi 27249fi
28613{ $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
28614$as_echo "$ac_cv_lib_gssapi_gss_init_sec_context" >&6; } 27251echo "${ECHO_T}$ac_cv_lib_gssapi_gss_init_sec_context" >&6; }
28615if test $ac_cv_lib_gssapi_gss_init_sec_context = yes; then 27252if test $ac_cv_lib_gssapi_gss_init_sec_context = yes; then
28616 cat >>confdefs.h <<\_ACEOF 27253 cat >>confdefs.h <<\_ACEOF
28617#define GSSAPI 1 27254#define GSSAPI 1
@@ -28619,8 +27256,8 @@ _ACEOF
28619 27256
28620 K5LIBS="-lgssapi $K5LIBS" 27257 K5LIBS="-lgssapi $K5LIBS"
28621else 27258else
28622 { $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
28623$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;}
28624fi 27261fi
28625 27262
28626 27263
@@ -28628,17 +27265,17 @@ fi
28628 27265
28629 27266
28630 if test "${ac_cv_header_gssapi_h+set}" = set; then 27267 if test "${ac_cv_header_gssapi_h+set}" = set; then
28631 { $as_echo "$as_me:$LINENO: checking for gssapi.h" >&5 27268 { echo "$as_me:$LINENO: checking for gssapi.h" >&5
28632$as_echo_n "checking for gssapi.h... " >&6; } 27269echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6; }
28633if test "${ac_cv_header_gssapi_h+set}" = set; then 27270if test "${ac_cv_header_gssapi_h+set}" = set; then
28634 $as_echo_n "(cached) " >&6 27271 echo $ECHO_N "(cached) $ECHO_C" >&6
28635fi 27272fi
28636{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5 27273{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
28637$as_echo "$ac_cv_header_gssapi_h" >&6; } 27274echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6; }
28638else 27275else
28639 # Is the header compilable? 27276 # Is the header compilable?
28640{ $as_echo "$as_me:$LINENO: checking gssapi.h usability" >&5 27277{ echo "$as_me:$LINENO: checking gssapi.h usability" >&5
28641$as_echo_n "checking gssapi.h usability... " >&6; } 27278echo $ECHO_N "checking gssapi.h usability... $ECHO_C" >&6; }
28642cat >conftest.$ac_ext <<_ACEOF 27279cat >conftest.$ac_ext <<_ACEOF
28643/* confdefs.h. */ 27280/* confdefs.h. */
28644_ACEOF 27281_ACEOF
@@ -28654,33 +27291,32 @@ case "(($ac_try" in
28654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28655 *) ac_try_echo=$ac_try;; 27292 *) ac_try_echo=$ac_try;;
28656esac 27293esac
28657eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28658$as_echo "$ac_try_echo") >&5
28659 (eval "$ac_compile") 2>conftest.er1 27295 (eval "$ac_compile") 2>conftest.er1
28660 ac_status=$? 27296 ac_status=$?
28661 grep -v '^ *+' conftest.er1 >conftest.err 27297 grep -v '^ *+' conftest.er1 >conftest.err
28662 rm -f conftest.er1 27298 rm -f conftest.er1
28663 cat conftest.err >&5 27299 cat conftest.err >&5
28664 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28665 (exit $ac_status); } && { 27301 (exit $ac_status); } && {
28666 test -z "$ac_c_werror_flag" || 27302 test -z "$ac_c_werror_flag" ||
28667 test ! -s conftest.err 27303 test ! -s conftest.err
28668 } && test -s conftest.$ac_objext; then 27304 } && test -s conftest.$ac_objext; then
28669 ac_header_compiler=yes 27305 ac_header_compiler=yes
28670else 27306else
28671 $as_echo "$as_me: failed program was:" >&5 27307 echo "$as_me: failed program was:" >&5
28672sed 's/^/| /' conftest.$ac_ext >&5 27308sed 's/^/| /' conftest.$ac_ext >&5
28673 27309
28674 ac_header_compiler=no 27310 ac_header_compiler=no
28675fi 27311fi
28676 27312
28677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 27313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28678{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 27314{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
28679$as_echo "$ac_header_compiler" >&6; } 27315echo "${ECHO_T}$ac_header_compiler" >&6; }
28680 27316
28681# Is the header present? 27317# Is the header present?
28682{ $as_echo "$as_me:$LINENO: checking gssapi.h presence" >&5 27318{ echo "$as_me:$LINENO: checking gssapi.h presence" >&5
28683$as_echo_n "checking gssapi.h presence... " >&6; } 27319echo $ECHO_N "checking gssapi.h presence... $ECHO_C" >&6; }
28684cat >conftest.$ac_ext <<_ACEOF 27320cat >conftest.$ac_ext <<_ACEOF
28685/* confdefs.h. */ 27321/* confdefs.h. */
28686_ACEOF 27322_ACEOF
@@ -28694,52 +27330,51 @@ case "(($ac_try" in
28694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28695 *) ac_try_echo=$ac_try;; 27331 *) ac_try_echo=$ac_try;;
28696esac 27332esac
28697eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28698$as_echo "$ac_try_echo") >&5
28699 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 27334 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
28700 ac_status=$? 27335 ac_status=$?
28701 grep -v '^ *+' conftest.er1 >conftest.err 27336 grep -v '^ *+' conftest.er1 >conftest.err
28702 rm -f conftest.er1 27337 rm -f conftest.er1
28703 cat conftest.err >&5 27338 cat conftest.err >&5
28704 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28705 (exit $ac_status); } >/dev/null && { 27340 (exit $ac_status); } >/dev/null && {
28706 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 27341 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
28707 test ! -s conftest.err 27342 test ! -s conftest.err
28708 }; then 27343 }; then
28709 ac_header_preproc=yes 27344 ac_header_preproc=yes
28710else 27345else
28711 $as_echo "$as_me: failed program was:" >&5 27346 echo "$as_me: failed program was:" >&5
28712sed 's/^/| /' conftest.$ac_ext >&5 27347sed 's/^/| /' conftest.$ac_ext >&5
28713 27348
28714 ac_header_preproc=no 27349 ac_header_preproc=no
28715fi 27350fi
28716 27351
28717rm -f conftest.err conftest.$ac_ext 27352rm -f conftest.err conftest.$ac_ext
28718{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 27353{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
28719$as_echo "$ac_header_preproc" >&6; } 27354echo "${ECHO_T}$ac_header_preproc" >&6; }
28720 27355
28721# So? What about this header? 27356# So? What about this header?
28722case $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
28723 yes:no: ) 27358 yes:no: )
28724 { $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
28725$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;}
28726 { $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
28727$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;}
28728 ac_header_preproc=yes 27363 ac_header_preproc=yes
28729 ;; 27364 ;;
28730 no:yes:* ) 27365 no:yes:* )
28731 { $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
28732$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;}
28733 { $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
28734$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;}
28735 { $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
28736$as_echo "$as_me: WARNING: gssapi.h: see the Autoconf documentation" >&2;} 27371echo "$as_me: WARNING: gssapi.h: see the Autoconf documentation" >&2;}
28737 { $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
28738$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;}
28739 { $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
28740$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;}
28741 { $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
28742$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;}
28743 ( cat <<\_ASBOX 27378 ( cat <<\_ASBOX
28744## ------------------------------------------- ## 27379## ------------------------------------------- ##
28745## Report this to openssh-unix-dev@mindrot.org ## 27380## Report this to openssh-unix-dev@mindrot.org ##
@@ -28748,15 +27383,15 @@ _ASBOX
28748 ) | sed "s/^/$as_me: WARNING: /" >&2 27383 ) | sed "s/^/$as_me: WARNING: /" >&2
28749 ;; 27384 ;;
28750esac 27385esac
28751{ $as_echo "$as_me:$LINENO: checking for gssapi.h" >&5 27386{ echo "$as_me:$LINENO: checking for gssapi.h" >&5
28752$as_echo_n "checking for gssapi.h... " >&6; } 27387echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6; }
28753if test "${ac_cv_header_gssapi_h+set}" = set; then 27388if test "${ac_cv_header_gssapi_h+set}" = set; then
28754 $as_echo_n "(cached) " >&6 27389 echo $ECHO_N "(cached) $ECHO_C" >&6
28755else 27390else
28756 ac_cv_header_gssapi_h=$ac_header_preproc 27391 ac_cv_header_gssapi_h=$ac_header_preproc
28757fi 27392fi
28758{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5 27393{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
28759$as_echo "$ac_cv_header_gssapi_h" >&6; } 27394echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6; }
28760 27395
28761fi 27396fi
28762if test $ac_cv_header_gssapi_h = yes; then 27397if test $ac_cv_header_gssapi_h = yes; then
@@ -28767,21 +27402,20 @@ else
28767 27402
28768for ac_header in gssapi.h 27403for ac_header in gssapi.h
28769do 27404do
28770as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 27405as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
28771if { 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
28772 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 27407 { echo "$as_me:$LINENO: checking for $ac_header" >&5
28773$as_echo_n "checking for $ac_header... " >&6; } 27408echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
28774if { 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
28775 $as_echo_n "(cached) " >&6 27410 echo $ECHO_N "(cached) $ECHO_C" >&6
28776fi 27411fi
28777ac_res=`eval 'as_val=${'$as_ac_Header'} 27412ac_res=`eval echo '${'$as_ac_Header'}'`
28778 $as_echo "$as_val"'` 27413 { echo "$as_me:$LINENO: result: $ac_res" >&5
28779 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 27414echo "${ECHO_T}$ac_res" >&6; }
28780$as_echo "$ac_res" >&6; }
28781else 27415else
28782 # Is the header compilable? 27416 # Is the header compilable?
28783{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 27417{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
28784$as_echo_n "checking $ac_header usability... " >&6; } 27418echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
28785cat >conftest.$ac_ext <<_ACEOF 27419cat >conftest.$ac_ext <<_ACEOF
28786/* confdefs.h. */ 27420/* confdefs.h. */
28787_ACEOF 27421_ACEOF
@@ -28797,33 +27431,32 @@ case "(($ac_try" in
28797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28798 *) ac_try_echo=$ac_try;; 27432 *) ac_try_echo=$ac_try;;
28799esac 27433esac
28800eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28801$as_echo "$ac_try_echo") >&5
28802 (eval "$ac_compile") 2>conftest.er1 27435 (eval "$ac_compile") 2>conftest.er1
28803 ac_status=$? 27436 ac_status=$?
28804 grep -v '^ *+' conftest.er1 >conftest.err 27437 grep -v '^ *+' conftest.er1 >conftest.err
28805 rm -f conftest.er1 27438 rm -f conftest.er1
28806 cat conftest.err >&5 27439 cat conftest.err >&5
28807 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28808 (exit $ac_status); } && { 27441 (exit $ac_status); } && {
28809 test -z "$ac_c_werror_flag" || 27442 test -z "$ac_c_werror_flag" ||
28810 test ! -s conftest.err 27443 test ! -s conftest.err
28811 } && test -s conftest.$ac_objext; then 27444 } && test -s conftest.$ac_objext; then
28812 ac_header_compiler=yes 27445 ac_header_compiler=yes
28813else 27446else
28814 $as_echo "$as_me: failed program was:" >&5 27447 echo "$as_me: failed program was:" >&5
28815sed 's/^/| /' conftest.$ac_ext >&5 27448sed 's/^/| /' conftest.$ac_ext >&5
28816 27449
28817 ac_header_compiler=no 27450 ac_header_compiler=no
28818fi 27451fi
28819 27452
28820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 27453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28821{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 27454{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
28822$as_echo "$ac_header_compiler" >&6; } 27455echo "${ECHO_T}$ac_header_compiler" >&6; }
28823 27456
28824# Is the header present? 27457# Is the header present?
28825{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 27458{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
28826$as_echo_n "checking $ac_header presence... " >&6; } 27459echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
28827cat >conftest.$ac_ext <<_ACEOF 27460cat >conftest.$ac_ext <<_ACEOF
28828/* confdefs.h. */ 27461/* confdefs.h. */
28829_ACEOF 27462_ACEOF
@@ -28837,52 +27470,51 @@ case "(($ac_try" in
28837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28838 *) ac_try_echo=$ac_try;; 27471 *) ac_try_echo=$ac_try;;
28839esac 27472esac
28840eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28841$as_echo "$ac_try_echo") >&5
28842 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 27474 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
28843 ac_status=$? 27475 ac_status=$?
28844 grep -v '^ *+' conftest.er1 >conftest.err 27476 grep -v '^ *+' conftest.er1 >conftest.err
28845 rm -f conftest.er1 27477 rm -f conftest.er1
28846 cat conftest.err >&5 27478 cat conftest.err >&5
28847 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28848 (exit $ac_status); } >/dev/null && { 27480 (exit $ac_status); } >/dev/null && {
28849 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 27481 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
28850 test ! -s conftest.err 27482 test ! -s conftest.err
28851 }; then 27483 }; then
28852 ac_header_preproc=yes 27484 ac_header_preproc=yes
28853else 27485else
28854 $as_echo "$as_me: failed program was:" >&5 27486 echo "$as_me: failed program was:" >&5
28855sed 's/^/| /' conftest.$ac_ext >&5 27487sed 's/^/| /' conftest.$ac_ext >&5
28856 27488
28857 ac_header_preproc=no 27489 ac_header_preproc=no
28858fi 27490fi
28859 27491
28860rm -f conftest.err conftest.$ac_ext 27492rm -f conftest.err conftest.$ac_ext
28861{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 27493{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
28862$as_echo "$ac_header_preproc" >&6; } 27494echo "${ECHO_T}$ac_header_preproc" >&6; }
28863 27495
28864# So? What about this header? 27496# So? What about this header?
28865case $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
28866 yes:no: ) 27498 yes:no: )
28867 { $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
28868$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;}
28869 { $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
28870$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;}
28871 ac_header_preproc=yes 27503 ac_header_preproc=yes
28872 ;; 27504 ;;
28873 no:yes:* ) 27505 no:yes:* )
28874 { $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
28875$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;}
28876 { $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
28877$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;}
28878 { $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
28879$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 27511echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
28880 { $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
28881$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;}
28882 { $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
28883$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;}
28884 { $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
28885$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;}
28886 ( cat <<\_ASBOX 27518 ( cat <<\_ASBOX
28887## ------------------------------------------- ## 27519## ------------------------------------------- ##
28888## Report this to openssh-unix-dev@mindrot.org ## 27520## Report this to openssh-unix-dev@mindrot.org ##
@@ -28891,28 +27523,26 @@ _ASBOX
28891 ) | sed "s/^/$as_me: WARNING: /" >&2 27523 ) | sed "s/^/$as_me: WARNING: /" >&2
28892 ;; 27524 ;;
28893esac 27525esac
28894{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 27526{ echo "$as_me:$LINENO: checking for $ac_header" >&5
28895$as_echo_n "checking for $ac_header... " >&6; } 27527echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
28896if { 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
28897 $as_echo_n "(cached) " >&6 27529 echo $ECHO_N "(cached) $ECHO_C" >&6
28898else 27530else
28899 eval "$as_ac_Header=\$ac_header_preproc" 27531 eval "$as_ac_Header=\$ac_header_preproc"
28900fi 27532fi
28901ac_res=`eval 'as_val=${'$as_ac_Header'} 27533ac_res=`eval echo '${'$as_ac_Header'}'`
28902 $as_echo "$as_val"'` 27534 { echo "$as_me:$LINENO: result: $ac_res" >&5
28903 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 27535echo "${ECHO_T}$ac_res" >&6; }
28904$as_echo "$ac_res" >&6; }
28905 27536
28906fi 27537fi
28907if test `eval 'as_val=${'$as_ac_Header'} 27538if test `eval echo '${'$as_ac_Header'}'` = yes; then
28908 $as_echo "$as_val"'` = yes; then
28909 cat >>confdefs.h <<_ACEOF 27539 cat >>confdefs.h <<_ACEOF
28910#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 27540#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
28911_ACEOF 27541_ACEOF
28912 27542
28913else 27543else
28914 { $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
28915$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;}
28916 27546
28917fi 27547fi
28918 27548
@@ -28927,17 +27557,17 @@ fi
28927 oldCPP="$CPPFLAGS" 27557 oldCPP="$CPPFLAGS"
28928 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi" 27558 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
28929 if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then 27559 if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then
28930 { $as_echo "$as_me:$LINENO: checking for gssapi_krb5.h" >&5 27560 { echo "$as_me:$LINENO: checking for gssapi_krb5.h" >&5
28931$as_echo_n "checking for gssapi_krb5.h... " >&6; } 27561echo $ECHO_N "checking for gssapi_krb5.h... $ECHO_C" >&6; }
28932if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then 27562if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then
28933 $as_echo_n "(cached) " >&6 27563 echo $ECHO_N "(cached) $ECHO_C" >&6
28934fi 27564fi
28935{ $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
28936$as_echo "$ac_cv_header_gssapi_krb5_h" >&6; } 27566echo "${ECHO_T}$ac_cv_header_gssapi_krb5_h" >&6; }
28937else 27567else
28938 # Is the header compilable? 27568 # Is the header compilable?
28939{ $as_echo "$as_me:$LINENO: checking gssapi_krb5.h usability" >&5 27569{ echo "$as_me:$LINENO: checking gssapi_krb5.h usability" >&5
28940$as_echo_n "checking gssapi_krb5.h usability... " >&6; } 27570echo $ECHO_N "checking gssapi_krb5.h usability... $ECHO_C" >&6; }
28941cat >conftest.$ac_ext <<_ACEOF 27571cat >conftest.$ac_ext <<_ACEOF
28942/* confdefs.h. */ 27572/* confdefs.h. */
28943_ACEOF 27573_ACEOF
@@ -28953,33 +27583,32 @@ case "(($ac_try" in
28953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28954 *) ac_try_echo=$ac_try;; 27584 *) ac_try_echo=$ac_try;;
28955esac 27585esac
28956eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28957$as_echo "$ac_try_echo") >&5
28958 (eval "$ac_compile") 2>conftest.er1 27587 (eval "$ac_compile") 2>conftest.er1
28959 ac_status=$? 27588 ac_status=$?
28960 grep -v '^ *+' conftest.er1 >conftest.err 27589 grep -v '^ *+' conftest.er1 >conftest.err
28961 rm -f conftest.er1 27590 rm -f conftest.er1
28962 cat conftest.err >&5 27591 cat conftest.err >&5
28963 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28964 (exit $ac_status); } && { 27593 (exit $ac_status); } && {
28965 test -z "$ac_c_werror_flag" || 27594 test -z "$ac_c_werror_flag" ||
28966 test ! -s conftest.err 27595 test ! -s conftest.err
28967 } && test -s conftest.$ac_objext; then 27596 } && test -s conftest.$ac_objext; then
28968 ac_header_compiler=yes 27597 ac_header_compiler=yes
28969else 27598else
28970 $as_echo "$as_me: failed program was:" >&5 27599 echo "$as_me: failed program was:" >&5
28971sed 's/^/| /' conftest.$ac_ext >&5 27600sed 's/^/| /' conftest.$ac_ext >&5
28972 27601
28973 ac_header_compiler=no 27602 ac_header_compiler=no
28974fi 27603fi
28975 27604
28976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 27605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28977{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 27606{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
28978$as_echo "$ac_header_compiler" >&6; } 27607echo "${ECHO_T}$ac_header_compiler" >&6; }
28979 27608
28980# Is the header present? 27609# Is the header present?
28981{ $as_echo "$as_me:$LINENO: checking gssapi_krb5.h presence" >&5 27610{ echo "$as_me:$LINENO: checking gssapi_krb5.h presence" >&5
28982$as_echo_n "checking gssapi_krb5.h presence... " >&6; } 27611echo $ECHO_N "checking gssapi_krb5.h presence... $ECHO_C" >&6; }
28983cat >conftest.$ac_ext <<_ACEOF 27612cat >conftest.$ac_ext <<_ACEOF
28984/* confdefs.h. */ 27613/* confdefs.h. */
28985_ACEOF 27614_ACEOF
@@ -28993,52 +27622,51 @@ case "(($ac_try" in
28993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28994 *) ac_try_echo=$ac_try;; 27623 *) ac_try_echo=$ac_try;;
28995esac 27624esac
28996eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28997$as_echo "$ac_try_echo") >&5
28998 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 27626 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
28999 ac_status=$? 27627 ac_status=$?
29000 grep -v '^ *+' conftest.er1 >conftest.err 27628 grep -v '^ *+' conftest.er1 >conftest.err
29001 rm -f conftest.er1 27629 rm -f conftest.er1
29002 cat conftest.err >&5 27630 cat conftest.err >&5
29003 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29004 (exit $ac_status); } >/dev/null && { 27632 (exit $ac_status); } >/dev/null && {
29005 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 27633 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
29006 test ! -s conftest.err 27634 test ! -s conftest.err
29007 }; then 27635 }; then
29008 ac_header_preproc=yes 27636 ac_header_preproc=yes
29009else 27637else
29010 $as_echo "$as_me: failed program was:" >&5 27638 echo "$as_me: failed program was:" >&5
29011sed 's/^/| /' conftest.$ac_ext >&5 27639sed 's/^/| /' conftest.$ac_ext >&5
29012 27640
29013 ac_header_preproc=no 27641 ac_header_preproc=no
29014fi 27642fi
29015 27643
29016rm -f conftest.err conftest.$ac_ext 27644rm -f conftest.err conftest.$ac_ext
29017{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 27645{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
29018$as_echo "$ac_header_preproc" >&6; } 27646echo "${ECHO_T}$ac_header_preproc" >&6; }
29019 27647
29020# So? What about this header? 27648# So? What about this header?
29021case $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
29022 yes:no: ) 27650 yes:no: )
29023 { $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
29024$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;}
29025 { $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
29026$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;}
29027 ac_header_preproc=yes 27655 ac_header_preproc=yes
29028 ;; 27656 ;;
29029 no:yes:* ) 27657 no:yes:* )
29030 { $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
29031$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;}
29032 { $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
29033$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;}
29034 { $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
29035$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;}
29036 { $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
29037$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;}
29038 { $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
29039$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;}
29040 { $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
29041$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;}
29042 ( cat <<\_ASBOX 27670 ( cat <<\_ASBOX
29043## ------------------------------------------- ## 27671## ------------------------------------------- ##
29044## Report this to openssh-unix-dev@mindrot.org ## 27672## Report this to openssh-unix-dev@mindrot.org ##
@@ -29047,15 +27675,15 @@ _ASBOX
29047 ) | sed "s/^/$as_me: WARNING: /" >&2 27675 ) | sed "s/^/$as_me: WARNING: /" >&2
29048 ;; 27676 ;;
29049esac 27677esac
29050{ $as_echo "$as_me:$LINENO: checking for gssapi_krb5.h" >&5 27678{ echo "$as_me:$LINENO: checking for gssapi_krb5.h" >&5
29051$as_echo_n "checking for gssapi_krb5.h... " >&6; } 27679echo $ECHO_N "checking for gssapi_krb5.h... $ECHO_C" >&6; }
29052if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then 27680if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then
29053 $as_echo_n "(cached) " >&6 27681 echo $ECHO_N "(cached) $ECHO_C" >&6
29054else 27682else
29055 ac_cv_header_gssapi_krb5_h=$ac_header_preproc 27683 ac_cv_header_gssapi_krb5_h=$ac_header_preproc
29056fi 27684fi
29057{ $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
29058$as_echo "$ac_cv_header_gssapi_krb5_h" >&6; } 27686echo "${ECHO_T}$ac_cv_header_gssapi_krb5_h" >&6; }
29059 27687
29060fi 27688fi
29061if test $ac_cv_header_gssapi_krb5_h = yes; then 27689if test $ac_cv_header_gssapi_krb5_h = yes; then
@@ -29078,21 +27706,20 @@ fi
29078 27706
29079for ac_header in gssapi.h gssapi/gssapi.h 27707for ac_header in gssapi.h gssapi/gssapi.h
29080do 27708do
29081as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 27709as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
29082if { 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
29083 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 27711 { echo "$as_me:$LINENO: checking for $ac_header" >&5
29084$as_echo_n "checking for $ac_header... " >&6; } 27712echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
29085if { 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
29086 $as_echo_n "(cached) " >&6 27714 echo $ECHO_N "(cached) $ECHO_C" >&6
29087fi 27715fi
29088ac_res=`eval 'as_val=${'$as_ac_Header'} 27716ac_res=`eval echo '${'$as_ac_Header'}'`
29089 $as_echo "$as_val"'` 27717 { echo "$as_me:$LINENO: result: $ac_res" >&5
29090 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 27718echo "${ECHO_T}$ac_res" >&6; }
29091$as_echo "$ac_res" >&6; }
29092else 27719else
29093 # Is the header compilable? 27720 # Is the header compilable?
29094{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 27721{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
29095$as_echo_n "checking $ac_header usability... " >&6; } 27722echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
29096cat >conftest.$ac_ext <<_ACEOF 27723cat >conftest.$ac_ext <<_ACEOF
29097/* confdefs.h. */ 27724/* confdefs.h. */
29098_ACEOF 27725_ACEOF
@@ -29108,33 +27735,32 @@ case "(($ac_try" in
29108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29109 *) ac_try_echo=$ac_try;; 27736 *) ac_try_echo=$ac_try;;
29110esac 27737esac
29111eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29112$as_echo "$ac_try_echo") >&5
29113 (eval "$ac_compile") 2>conftest.er1 27739 (eval "$ac_compile") 2>conftest.er1
29114 ac_status=$? 27740 ac_status=$?
29115 grep -v '^ *+' conftest.er1 >conftest.err 27741 grep -v '^ *+' conftest.er1 >conftest.err
29116 rm -f conftest.er1 27742 rm -f conftest.er1
29117 cat conftest.err >&5 27743 cat conftest.err >&5
29118 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29119 (exit $ac_status); } && { 27745 (exit $ac_status); } && {
29120 test -z "$ac_c_werror_flag" || 27746 test -z "$ac_c_werror_flag" ||
29121 test ! -s conftest.err 27747 test ! -s conftest.err
29122 } && test -s conftest.$ac_objext; then 27748 } && test -s conftest.$ac_objext; then
29123 ac_header_compiler=yes 27749 ac_header_compiler=yes
29124else 27750else
29125 $as_echo "$as_me: failed program was:" >&5 27751 echo "$as_me: failed program was:" >&5
29126sed 's/^/| /' conftest.$ac_ext >&5 27752sed 's/^/| /' conftest.$ac_ext >&5
29127 27753
29128 ac_header_compiler=no 27754 ac_header_compiler=no
29129fi 27755fi
29130 27756
29131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 27757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29132{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 27758{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
29133$as_echo "$ac_header_compiler" >&6; } 27759echo "${ECHO_T}$ac_header_compiler" >&6; }
29134 27760
29135# Is the header present? 27761# Is the header present?
29136{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 27762{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
29137$as_echo_n "checking $ac_header presence... " >&6; } 27763echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
29138cat >conftest.$ac_ext <<_ACEOF 27764cat >conftest.$ac_ext <<_ACEOF
29139/* confdefs.h. */ 27765/* confdefs.h. */
29140_ACEOF 27766_ACEOF
@@ -29148,52 +27774,51 @@ case "(($ac_try" in
29148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29149 *) ac_try_echo=$ac_try;; 27775 *) ac_try_echo=$ac_try;;
29150esac 27776esac
29151eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29152$as_echo "$ac_try_echo") >&5
29153 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 27778 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
29154 ac_status=$? 27779 ac_status=$?
29155 grep -v '^ *+' conftest.er1 >conftest.err 27780 grep -v '^ *+' conftest.er1 >conftest.err
29156 rm -f conftest.er1 27781 rm -f conftest.er1
29157 cat conftest.err >&5 27782 cat conftest.err >&5
29158 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29159 (exit $ac_status); } >/dev/null && { 27784 (exit $ac_status); } >/dev/null && {
29160 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 27785 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
29161 test ! -s conftest.err 27786 test ! -s conftest.err
29162 }; then 27787 }; then
29163 ac_header_preproc=yes 27788 ac_header_preproc=yes
29164else 27789else
29165 $as_echo "$as_me: failed program was:" >&5 27790 echo "$as_me: failed program was:" >&5
29166sed 's/^/| /' conftest.$ac_ext >&5 27791sed 's/^/| /' conftest.$ac_ext >&5
29167 27792
29168 ac_header_preproc=no 27793 ac_header_preproc=no
29169fi 27794fi
29170 27795
29171rm -f conftest.err conftest.$ac_ext 27796rm -f conftest.err conftest.$ac_ext
29172{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 27797{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
29173$as_echo "$ac_header_preproc" >&6; } 27798echo "${ECHO_T}$ac_header_preproc" >&6; }
29174 27799
29175# So? What about this header? 27800# So? What about this header?
29176case $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
29177 yes:no: ) 27802 yes:no: )
29178 { $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
29179$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;}
29180 { $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
29181$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;}
29182 ac_header_preproc=yes 27807 ac_header_preproc=yes
29183 ;; 27808 ;;
29184 no:yes:* ) 27809 no:yes:* )
29185 { $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
29186$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;}
29187 { $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
29188$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;}
29189 { $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
29190$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 27815echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
29191 { $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
29192$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;}
29193 { $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
29194$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;}
29195 { $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
29196$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;}
29197 ( cat <<\_ASBOX 27822 ( cat <<\_ASBOX
29198## ------------------------------------------- ## 27823## ------------------------------------------- ##
29199## Report this to openssh-unix-dev@mindrot.org ## 27824## Report this to openssh-unix-dev@mindrot.org ##
@@ -29202,23 +27827,21 @@ _ASBOX
29202 ) | sed "s/^/$as_me: WARNING: /" >&2 27827 ) | sed "s/^/$as_me: WARNING: /" >&2
29203 ;; 27828 ;;
29204esac 27829esac
29205{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 27830{ echo "$as_me:$LINENO: checking for $ac_header" >&5
29206$as_echo_n "checking for $ac_header... " >&6; } 27831echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
29207if { 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
29208 $as_echo_n "(cached) " >&6 27833 echo $ECHO_N "(cached) $ECHO_C" >&6
29209else 27834else
29210 eval "$as_ac_Header=\$ac_header_preproc" 27835 eval "$as_ac_Header=\$ac_header_preproc"
29211fi 27836fi
29212ac_res=`eval 'as_val=${'$as_ac_Header'} 27837ac_res=`eval echo '${'$as_ac_Header'}'`
29213 $as_echo "$as_val"'` 27838 { echo "$as_me:$LINENO: result: $ac_res" >&5
29214 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 27839echo "${ECHO_T}$ac_res" >&6; }
29215$as_echo "$ac_res" >&6; }
29216 27840
29217fi 27841fi
29218if test `eval 'as_val=${'$as_ac_Header'} 27842if test `eval echo '${'$as_ac_Header'}'` = yes; then
29219 $as_echo "$as_val"'` = yes; then
29220 cat >>confdefs.h <<_ACEOF 27843 cat >>confdefs.h <<_ACEOF
29221#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 27844#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
29222_ACEOF 27845_ACEOF
29223 27846
29224fi 27847fi
@@ -29229,21 +27852,20 @@ done
29229 27852
29230for ac_header in gssapi_krb5.h gssapi/gssapi_krb5.h 27853for ac_header in gssapi_krb5.h gssapi/gssapi_krb5.h
29231do 27854do
29232as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 27855as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
29233if { 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
29234 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 27857 { echo "$as_me:$LINENO: checking for $ac_header" >&5
29235$as_echo_n "checking for $ac_header... " >&6; } 27858echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
29236if { 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
29237 $as_echo_n "(cached) " >&6 27860 echo $ECHO_N "(cached) $ECHO_C" >&6
29238fi 27861fi
29239ac_res=`eval 'as_val=${'$as_ac_Header'} 27862ac_res=`eval echo '${'$as_ac_Header'}'`
29240 $as_echo "$as_val"'` 27863 { echo "$as_me:$LINENO: result: $ac_res" >&5
29241 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 27864echo "${ECHO_T}$ac_res" >&6; }
29242$as_echo "$ac_res" >&6; }
29243else 27865else
29244 # Is the header compilable? 27866 # Is the header compilable?
29245{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 27867{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
29246$as_echo_n "checking $ac_header usability... " >&6; } 27868echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
29247cat >conftest.$ac_ext <<_ACEOF 27869cat >conftest.$ac_ext <<_ACEOF
29248/* confdefs.h. */ 27870/* confdefs.h. */
29249_ACEOF 27871_ACEOF
@@ -29259,33 +27881,32 @@ case "(($ac_try" in
29259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29260 *) ac_try_echo=$ac_try;; 27882 *) ac_try_echo=$ac_try;;
29261esac 27883esac
29262eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29263$as_echo "$ac_try_echo") >&5
29264 (eval "$ac_compile") 2>conftest.er1 27885 (eval "$ac_compile") 2>conftest.er1
29265 ac_status=$? 27886 ac_status=$?
29266 grep -v '^ *+' conftest.er1 >conftest.err 27887 grep -v '^ *+' conftest.er1 >conftest.err
29267 rm -f conftest.er1 27888 rm -f conftest.er1
29268 cat conftest.err >&5 27889 cat conftest.err >&5
29269 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29270 (exit $ac_status); } && { 27891 (exit $ac_status); } && {
29271 test -z "$ac_c_werror_flag" || 27892 test -z "$ac_c_werror_flag" ||
29272 test ! -s conftest.err 27893 test ! -s conftest.err
29273 } && test -s conftest.$ac_objext; then 27894 } && test -s conftest.$ac_objext; then
29274 ac_header_compiler=yes 27895 ac_header_compiler=yes
29275else 27896else
29276 $as_echo "$as_me: failed program was:" >&5 27897 echo "$as_me: failed program was:" >&5
29277sed 's/^/| /' conftest.$ac_ext >&5 27898sed 's/^/| /' conftest.$ac_ext >&5
29278 27899
29279 ac_header_compiler=no 27900 ac_header_compiler=no
29280fi 27901fi
29281 27902
29282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 27903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29283{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 27904{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
29284$as_echo "$ac_header_compiler" >&6; } 27905echo "${ECHO_T}$ac_header_compiler" >&6; }
29285 27906
29286# Is the header present? 27907# Is the header present?
29287{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 27908{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
29288$as_echo_n "checking $ac_header presence... " >&6; } 27909echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
29289cat >conftest.$ac_ext <<_ACEOF 27910cat >conftest.$ac_ext <<_ACEOF
29290/* confdefs.h. */ 27911/* confdefs.h. */
29291_ACEOF 27912_ACEOF
@@ -29299,52 +27920,51 @@ case "(($ac_try" in
29299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 27920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29300 *) ac_try_echo=$ac_try;; 27921 *) ac_try_echo=$ac_try;;
29301esac 27922esac
29302eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 27923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29303$as_echo "$ac_try_echo") >&5
29304 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 27924 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
29305 ac_status=$? 27925 ac_status=$?
29306 grep -v '^ *+' conftest.er1 >conftest.err 27926 grep -v '^ *+' conftest.er1 >conftest.err
29307 rm -f conftest.er1 27927 rm -f conftest.er1
29308 cat conftest.err >&5 27928 cat conftest.err >&5
29309 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 27929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29310 (exit $ac_status); } >/dev/null && { 27930 (exit $ac_status); } >/dev/null && {
29311 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 27931 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
29312 test ! -s conftest.err 27932 test ! -s conftest.err
29313 }; then 27933 }; then
29314 ac_header_preproc=yes 27934 ac_header_preproc=yes
29315else 27935else
29316 $as_echo "$as_me: failed program was:" >&5 27936 echo "$as_me: failed program was:" >&5
29317sed 's/^/| /' conftest.$ac_ext >&5 27937sed 's/^/| /' conftest.$ac_ext >&5
29318 27938
29319 ac_header_preproc=no 27939 ac_header_preproc=no
29320fi 27940fi
29321 27941
29322rm -f conftest.err conftest.$ac_ext 27942rm -f conftest.err conftest.$ac_ext
29323{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 27943{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
29324$as_echo "$ac_header_preproc" >&6; } 27944echo "${ECHO_T}$ac_header_preproc" >&6; }
29325 27945
29326# So? What about this header? 27946# So? What about this header?
29327case $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
29328 yes:no: ) 27948 yes:no: )
29329 { $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
29330$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;}
29331 { $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
29332$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;}
29333 ac_header_preproc=yes 27953 ac_header_preproc=yes
29334 ;; 27954 ;;
29335 no:yes:* ) 27955 no:yes:* )
29336 { $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
29337$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;}
29338 { $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
29339$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;}
29340 { $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
29341$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 27961echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
29342 { $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
29343$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;}
29344 { $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
29345$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;}
29346 { $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
29347$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;}
29348 ( cat <<\_ASBOX 27968 ( cat <<\_ASBOX
29349## ------------------------------------------- ## 27969## ------------------------------------------- ##
29350## Report this to openssh-unix-dev@mindrot.org ## 27970## Report this to openssh-unix-dev@mindrot.org ##
@@ -29353,23 +27973,21 @@ _ASBOX
29353 ) | sed "s/^/$as_me: WARNING: /" >&2 27973 ) | sed "s/^/$as_me: WARNING: /" >&2
29354 ;; 27974 ;;
29355esac 27975esac
29356{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 27976{ echo "$as_me:$LINENO: checking for $ac_header" >&5
29357$as_echo_n "checking for $ac_header... " >&6; } 27977echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
29358if { 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
29359 $as_echo_n "(cached) " >&6 27979 echo $ECHO_N "(cached) $ECHO_C" >&6
29360else 27980else
29361 eval "$as_ac_Header=\$ac_header_preproc" 27981 eval "$as_ac_Header=\$ac_header_preproc"
29362fi 27982fi
29363ac_res=`eval 'as_val=${'$as_ac_Header'} 27983ac_res=`eval echo '${'$as_ac_Header'}'`
29364 $as_echo "$as_val"'` 27984 { echo "$as_me:$LINENO: result: $ac_res" >&5
29365 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 27985echo "${ECHO_T}$ac_res" >&6; }
29366$as_echo "$ac_res" >&6; }
29367 27986
29368fi 27987fi
29369if test `eval 'as_val=${'$as_ac_Header'} 27988if test `eval echo '${'$as_ac_Header'}'` = yes; then
29370 $as_echo "$as_val"'` = yes; then
29371 cat >>confdefs.h <<_ACEOF 27989 cat >>confdefs.h <<_ACEOF
29372#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 27990#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
29373_ACEOF 27991_ACEOF
29374 27992
29375fi 27993fi
@@ -29380,21 +27998,20 @@ done
29380 27998
29381for ac_header in gssapi_generic.h gssapi/gssapi_generic.h 27999for ac_header in gssapi_generic.h gssapi/gssapi_generic.h
29382do 28000do
29383as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 28001as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
29384if { 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
29385 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 28003 { echo "$as_me:$LINENO: checking for $ac_header" >&5
29386$as_echo_n "checking for $ac_header... " >&6; } 28004echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
29387if { 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
29388 $as_echo_n "(cached) " >&6 28006 echo $ECHO_N "(cached) $ECHO_C" >&6
29389fi 28007fi
29390ac_res=`eval 'as_val=${'$as_ac_Header'} 28008ac_res=`eval echo '${'$as_ac_Header'}'`
29391 $as_echo "$as_val"'` 28009 { echo "$as_me:$LINENO: result: $ac_res" >&5
29392 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 28010echo "${ECHO_T}$ac_res" >&6; }
29393$as_echo "$ac_res" >&6; }
29394else 28011else
29395 # Is the header compilable? 28012 # Is the header compilable?
29396{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 28013{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
29397$as_echo_n "checking $ac_header usability... " >&6; } 28014echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
29398cat >conftest.$ac_ext <<_ACEOF 28015cat >conftest.$ac_ext <<_ACEOF
29399/* confdefs.h. */ 28016/* confdefs.h. */
29400_ACEOF 28017_ACEOF
@@ -29410,33 +28027,32 @@ case "(($ac_try" in
29410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 28027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29411 *) ac_try_echo=$ac_try;; 28028 *) ac_try_echo=$ac_try;;
29412esac 28029esac
29413eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 28030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29414$as_echo "$ac_try_echo") >&5
29415 (eval "$ac_compile") 2>conftest.er1 28031 (eval "$ac_compile") 2>conftest.er1
29416 ac_status=$? 28032 ac_status=$?
29417 grep -v '^ *+' conftest.er1 >conftest.err 28033 grep -v '^ *+' conftest.er1 >conftest.err
29418 rm -f conftest.er1 28034 rm -f conftest.er1
29419 cat conftest.err >&5 28035 cat conftest.err >&5
29420 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 28036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29421 (exit $ac_status); } && { 28037 (exit $ac_status); } && {
29422 test -z "$ac_c_werror_flag" || 28038 test -z "$ac_c_werror_flag" ||
29423 test ! -s conftest.err 28039 test ! -s conftest.err
29424 } && test -s conftest.$ac_objext; then 28040 } && test -s conftest.$ac_objext; then
29425 ac_header_compiler=yes 28041 ac_header_compiler=yes
29426else 28042else
29427 $as_echo "$as_me: failed program was:" >&5 28043 echo "$as_me: failed program was:" >&5
29428sed 's/^/| /' conftest.$ac_ext >&5 28044sed 's/^/| /' conftest.$ac_ext >&5
29429 28045
29430 ac_header_compiler=no 28046 ac_header_compiler=no
29431fi 28047fi
29432 28048
29433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29434{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 28050{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
29435$as_echo "$ac_header_compiler" >&6; } 28051echo "${ECHO_T}$ac_header_compiler" >&6; }
29436 28052
29437# Is the header present? 28053# Is the header present?
29438{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 28054{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
29439$as_echo_n "checking $ac_header presence... " >&6; } 28055echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
29440cat >conftest.$ac_ext <<_ACEOF 28056cat >conftest.$ac_ext <<_ACEOF
29441/* confdefs.h. */ 28057/* confdefs.h. */
29442_ACEOF 28058_ACEOF
@@ -29450,52 +28066,51 @@ case "(($ac_try" in
29450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 28066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29451 *) ac_try_echo=$ac_try;; 28067 *) ac_try_echo=$ac_try;;
29452esac 28068esac
29453eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 28069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29454$as_echo "$ac_try_echo") >&5
29455 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 28070 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
29456 ac_status=$? 28071 ac_status=$?
29457 grep -v '^ *+' conftest.er1 >conftest.err 28072 grep -v '^ *+' conftest.er1 >conftest.err
29458 rm -f conftest.er1 28073 rm -f conftest.er1
29459 cat conftest.err >&5 28074 cat conftest.err >&5
29460 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 28075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29461 (exit $ac_status); } >/dev/null && { 28076 (exit $ac_status); } >/dev/null && {
29462 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 28077 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
29463 test ! -s conftest.err 28078 test ! -s conftest.err
29464 }; then 28079 }; then
29465 ac_header_preproc=yes 28080 ac_header_preproc=yes
29466else 28081else
29467 $as_echo "$as_me: failed program was:" >&5 28082 echo "$as_me: failed program was:" >&5
29468sed 's/^/| /' conftest.$ac_ext >&5 28083sed 's/^/| /' conftest.$ac_ext >&5
29469 28084
29470 ac_header_preproc=no 28085 ac_header_preproc=no
29471fi 28086fi
29472 28087
29473rm -f conftest.err conftest.$ac_ext 28088rm -f conftest.err conftest.$ac_ext
29474{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 28089{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
29475$as_echo "$ac_header_preproc" >&6; } 28090echo "${ECHO_T}$ac_header_preproc" >&6; }
29476 28091
29477# So? What about this header? 28092# So? What about this header?
29478case $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
29479 yes:no: ) 28094 yes:no: )
29480 { $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
29481$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;}
29482 { $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
29483$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;}
29484 ac_header_preproc=yes 28099 ac_header_preproc=yes
29485 ;; 28100 ;;
29486 no:yes:* ) 28101 no:yes:* )
29487 { $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
29488$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;}
29489 { $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
29490$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;}
29491 { $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
29492$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} 28107echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
29493 { $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
29494$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;}
29495 { $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
29496$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;}
29497 { $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
29498$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;}
29499 ( cat <<\_ASBOX 28114 ( cat <<\_ASBOX
29500## ------------------------------------------- ## 28115## ------------------------------------------- ##
29501## Report this to openssh-unix-dev@mindrot.org ## 28116## Report this to openssh-unix-dev@mindrot.org ##
@@ -29504,23 +28119,21 @@ _ASBOX
29504 ) | sed "s/^/$as_me: WARNING: /" >&2 28119 ) | sed "s/^/$as_me: WARNING: /" >&2
29505 ;; 28120 ;;
29506esac 28121esac
29507{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 28122{ echo "$as_me:$LINENO: checking for $ac_header" >&5
29508$as_echo_n "checking for $ac_header... " >&6; } 28123echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
29509if { 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
29510 $as_echo_n "(cached) " >&6 28125 echo $ECHO_N "(cached) $ECHO_C" >&6
29511else 28126else
29512 eval "$as_ac_Header=\$ac_header_preproc" 28127 eval "$as_ac_Header=\$ac_header_preproc"
29513fi 28128fi
29514ac_res=`eval 'as_val=${'$as_ac_Header'} 28129ac_res=`eval echo '${'$as_ac_Header'}'`
29515 $as_echo "$as_val"'` 28130 { echo "$as_me:$LINENO: result: $ac_res" >&5
29516 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 28131echo "${ECHO_T}$ac_res" >&6; }
29517$as_echo "$ac_res" >&6; }
29518 28132
29519fi 28133fi
29520if test `eval 'as_val=${'$as_ac_Header'} 28134if test `eval echo '${'$as_ac_Header'}'` = yes; then
29521 $as_echo "$as_val"'` = yes; then
29522 cat >>confdefs.h <<_ACEOF 28135 cat >>confdefs.h <<_ACEOF
29523#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 28136#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
29524_ACEOF 28137_ACEOF
29525 28138
29526fi 28139fi
@@ -29529,10 +28142,10 @@ done
29529 28142
29530 28143
29531 LIBS="$LIBS $K5LIBS" 28144 LIBS="$LIBS $K5LIBS"
29532 { $as_echo "$as_me:$LINENO: checking for library containing k_hasafs" >&5 28145 { echo "$as_me:$LINENO: checking for library containing k_hasafs" >&5
29533$as_echo_n "checking for library containing k_hasafs... " >&6; } 28146echo $ECHO_N "checking for library containing k_hasafs... $ECHO_C" >&6; }
29534if test "${ac_cv_search_k_hasafs+set}" = set; then 28147if test "${ac_cv_search_k_hasafs+set}" = set; then
29535 $as_echo_n "(cached) " >&6 28148 echo $ECHO_N "(cached) $ECHO_C" >&6
29536else 28149else
29537 ac_func_search_save_LIBS=$LIBS 28150 ac_func_search_save_LIBS=$LIBS
29538cat >conftest.$ac_ext <<_ACEOF 28151cat >conftest.$ac_ext <<_ACEOF
@@ -29570,30 +28183,26 @@ case "(($ac_try" in
29570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 28183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29571 *) ac_try_echo=$ac_try;; 28184 *) ac_try_echo=$ac_try;;
29572esac 28185esac
29573eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 28186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29574$as_echo "$ac_try_echo") >&5
29575 (eval "$ac_link") 2>conftest.er1 28187 (eval "$ac_link") 2>conftest.er1
29576 ac_status=$? 28188 ac_status=$?
29577 grep -v '^ *+' conftest.er1 >conftest.err 28189 grep -v '^ *+' conftest.er1 >conftest.err
29578 rm -f conftest.er1 28190 rm -f conftest.er1
29579 cat conftest.err >&5 28191 cat conftest.err >&5
29580 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 28192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29581 (exit $ac_status); } && { 28193 (exit $ac_status); } && {
29582 test -z "$ac_c_werror_flag" || 28194 test -z "$ac_c_werror_flag" ||
29583 test ! -s conftest.err 28195 test ! -s conftest.err
29584 } && test -s conftest$ac_exeext && { 28196 } && test -s conftest$ac_exeext &&
29585 test "$cross_compiling" = yes || 28197 $as_test_x conftest$ac_exeext; then
29586 $as_test_x conftest$ac_exeext
29587 }; then
29588 ac_cv_search_k_hasafs=$ac_res 28198 ac_cv_search_k_hasafs=$ac_res
29589else 28199else
29590 $as_echo "$as_me: failed program was:" >&5 28200 echo "$as_me: failed program was:" >&5
29591sed 's/^/| /' conftest.$ac_ext >&5 28201sed 's/^/| /' conftest.$ac_ext >&5
29592 28202
29593 28203
29594fi 28204fi
29595 28205
29596rm -rf conftest.dSYM
29597rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 28206rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29598 conftest$ac_exeext 28207 conftest$ac_exeext
29599 if test "${ac_cv_search_k_hasafs+set}" = set; then 28208 if test "${ac_cv_search_k_hasafs+set}" = set; then
@@ -29608,8 +28217,8 @@ fi
29608rm conftest.$ac_ext 28217rm conftest.$ac_ext
29609LIBS=$ac_func_search_save_LIBS 28218LIBS=$ac_func_search_save_LIBS
29610fi 28219fi
29611{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_k_hasafs" >&5 28220{ echo "$as_me:$LINENO: result: $ac_cv_search_k_hasafs" >&5
29612$as_echo "$ac_cv_search_k_hasafs" >&6; } 28221echo "${ECHO_T}$ac_cv_search_k_hasafs" >&6; }
29613ac_res=$ac_cv_search_k_hasafs 28222ac_res=$ac_cv_search_k_hasafs
29614if test "$ac_res" != no; then 28223if test "$ac_res" != no; then
29615 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 28224 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
@@ -29661,10 +28270,10 @@ else
29661 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin" 28270 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin"
29662 # 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.
29663set dummy xauth; ac_word=$2 28272set dummy xauth; ac_word=$2
29664{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 28273{ echo "$as_me:$LINENO: checking for $ac_word" >&5
29665$as_echo_n "checking for $ac_word... " >&6; } 28274echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
29666if test "${ac_cv_path_xauth_path+set}" = set; then 28275if test "${ac_cv_path_xauth_path+set}" = set; then
29667 $as_echo_n "(cached) " >&6 28276 echo $ECHO_N "(cached) $ECHO_C" >&6
29668else 28277else
29669 case $xauth_path in 28278 case $xauth_path in
29670 [\\/]* | ?:[\\/]*) 28279 [\\/]* | ?:[\\/]*)
@@ -29679,7 +28288,7 @@ do
29679 for ac_exec_ext in '' $ac_executable_extensions; do 28288 for ac_exec_ext in '' $ac_executable_extensions; do
29680 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
29681 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"
29682 $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
29683 break 2 28292 break 2
29684 fi 28293 fi
29685done 28294done
@@ -29691,11 +28300,11 @@ esac
29691fi 28300fi
29692xauth_path=$ac_cv_path_xauth_path 28301xauth_path=$ac_cv_path_xauth_path
29693if test -n "$xauth_path"; then 28302if test -n "$xauth_path"; then
29694 { $as_echo "$as_me:$LINENO: result: $xauth_path" >&5 28303 { echo "$as_me:$LINENO: result: $xauth_path" >&5
29695$as_echo "$xauth_path" >&6; } 28304echo "${ECHO_T}$xauth_path" >&6; }
29696else 28305else
29697 { $as_echo "$as_me:$LINENO: result: no" >&5 28306 { echo "$as_me:$LINENO: result: no" >&5
29698$as_echo "no" >&6; } 28307echo "${ECHO_T}no" >&6; }
29699fi 28308fi
29700 28309
29701 28310
@@ -29744,20 +28353,20 @@ _ACEOF
29744fi 28353fi
29745 28354
29746if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then 28355if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then
29747 { $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
29748$as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptmx test" >&2;} 28357echo "$as_me: WARNING: cross compiling: Disabling /dev/ptmx test" >&2;}
29749 disable_ptmx_check=yes 28358 disable_ptmx_check=yes
29750fi 28359fi
29751if test -z "$no_dev_ptmx" ; then 28360if test -z "$no_dev_ptmx" ; then
29752 if test "x$disable_ptmx_check" != "xyes" ; then 28361 if test "x$disable_ptmx_check" != "xyes" ; then
29753 { $as_echo "$as_me:$LINENO: checking for \"/dev/ptmx\"" >&5 28362 { echo "$as_me:$LINENO: checking for \"/dev/ptmx\"" >&5
29754$as_echo_n "checking for \"/dev/ptmx\"... " >&6; } 28363echo $ECHO_N "checking for \"/dev/ptmx\"... $ECHO_C" >&6; }
29755if test "${ac_cv_file___dev_ptmx_+set}" = set; then 28364if test "${ac_cv_file___dev_ptmx_+set}" = set; then
29756 $as_echo_n "(cached) " >&6 28365 echo $ECHO_N "(cached) $ECHO_C" >&6
29757else 28366else
29758 test "$cross_compiling" = yes && 28367 test "$cross_compiling" = yes &&
29759 { { $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
29760$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;}
29761 { (exit 1); exit 1; }; } 28370 { (exit 1); exit 1; }; }
29762if test -r ""/dev/ptmx""; then 28371if test -r ""/dev/ptmx""; then
29763 ac_cv_file___dev_ptmx_=yes 28372 ac_cv_file___dev_ptmx_=yes
@@ -29765,8 +28374,8 @@ else
29765 ac_cv_file___dev_ptmx_=no 28374 ac_cv_file___dev_ptmx_=no
29766fi 28375fi
29767fi 28376fi
29768{ $as_echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptmx_" >&5 28377{ echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptmx_" >&5
29769$as_echo "$ac_cv_file___dev_ptmx_" >&6; } 28378echo "${ECHO_T}$ac_cv_file___dev_ptmx_" >&6; }
29770if test $ac_cv_file___dev_ptmx_ = yes; then 28379if test $ac_cv_file___dev_ptmx_ = yes; then
29771 28380
29772 28381
@@ -29783,14 +28392,14 @@ fi
29783fi 28392fi
29784 28393
29785if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then 28394if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then
29786 { $as_echo "$as_me:$LINENO: checking for \"/dev/ptc\"" >&5 28395 { echo "$as_me:$LINENO: checking for \"/dev/ptc\"" >&5
29787$as_echo_n "checking for \"/dev/ptc\"... " >&6; } 28396echo $ECHO_N "checking for \"/dev/ptc\"... $ECHO_C" >&6; }
29788if test "${ac_cv_file___dev_ptc_+set}" = set; then 28397if test "${ac_cv_file___dev_ptc_+set}" = set; then
29789 $as_echo_n "(cached) " >&6 28398 echo $ECHO_N "(cached) $ECHO_C" >&6
29790else 28399else
29791 test "$cross_compiling" = yes && 28400 test "$cross_compiling" = yes &&
29792 { { $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
29793$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;}
29794 { (exit 1); exit 1; }; } 28403 { (exit 1); exit 1; }; }
29795if test -r ""/dev/ptc""; then 28404if test -r ""/dev/ptc""; then
29796 ac_cv_file___dev_ptc_=yes 28405 ac_cv_file___dev_ptc_=yes
@@ -29798,8 +28407,8 @@ else
29798 ac_cv_file___dev_ptc_=no 28407 ac_cv_file___dev_ptc_=no
29799fi 28408fi
29800fi 28409fi
29801{ $as_echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptc_" >&5 28410{ echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptc_" >&5
29802$as_echo "$ac_cv_file___dev_ptc_" >&6; } 28411echo "${ECHO_T}$ac_cv_file___dev_ptc_" >&6; }
29803if test $ac_cv_file___dev_ptc_ = yes; then 28412if test $ac_cv_file___dev_ptc_ = yes; then
29804 28413
29805 28414
@@ -29813,8 +28422,8 @@ _ACEOF
29813fi 28422fi
29814 28423
29815else 28424else
29816 { $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
29817$as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptc test" >&2;} 28426echo "$as_me: WARNING: cross compiling: Disabling /dev/ptc test" >&2;}
29818fi 28427fi
29819 28428
29820# 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
@@ -29827,8 +28436,8 @@ if test "${with_mantype+set}" = set; then
29827 MANTYPE=$withval 28436 MANTYPE=$withval
29828 ;; 28437 ;;
29829 *) 28438 *)
29830 { { $as_echo "$as_me:$LINENO: error: invalid man type: $withval" >&5 28439 { { echo "$as_me:$LINENO: error: invalid man type: $withval" >&5
29831$as_echo "$as_me: error: invalid man type: $withval" >&2;} 28440echo "$as_me: error: invalid man type: $withval" >&2;}
29832 { (exit 1); exit 1; }; } 28441 { (exit 1); exit 1; }; }
29833 ;; 28442 ;;
29834 esac 28443 esac
@@ -29842,10 +28451,10 @@ if test -z "$MANTYPE"; then
29842do 28451do
29843 # 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.
29844set dummy $ac_prog; ac_word=$2 28453set dummy $ac_prog; ac_word=$2
29845{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 28454{ echo "$as_me:$LINENO: checking for $ac_word" >&5
29846$as_echo_n "checking for $ac_word... " >&6; } 28455echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
29847if test "${ac_cv_path_NROFF+set}" = set; then 28456if test "${ac_cv_path_NROFF+set}" = set; then
29848 $as_echo_n "(cached) " >&6 28457 echo $ECHO_N "(cached) $ECHO_C" >&6
29849else 28458else
29850 case $NROFF in 28459 case $NROFF in
29851 [\\/]* | ?:[\\/]*) 28460 [\\/]* | ?:[\\/]*)
@@ -29860,7 +28469,7 @@ do
29860 for ac_exec_ext in '' $ac_executable_extensions; do 28469 for ac_exec_ext in '' $ac_executable_extensions; do
29861 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
29862 ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext" 28471 ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
29863 $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
29864 break 2 28473 break 2
29865 fi 28474 fi
29866done 28475done
@@ -29872,11 +28481,11 @@ esac
29872fi 28481fi
29873NROFF=$ac_cv_path_NROFF 28482NROFF=$ac_cv_path_NROFF
29874if test -n "$NROFF"; then 28483if test -n "$NROFF"; then
29875 { $as_echo "$as_me:$LINENO: result: $NROFF" >&5 28484 { echo "$as_me:$LINENO: result: $NROFF" >&5
29876$as_echo "$NROFF" >&6; } 28485echo "${ECHO_T}$NROFF" >&6; }
29877else 28486else
29878 { $as_echo "$as_me:$LINENO: result: no" >&5 28487 { echo "$as_me:$LINENO: result: no" >&5
29879$as_echo "no" >&6; } 28488echo "${ECHO_T}no" >&6; }
29880fi 28489fi
29881 28490
29882 28491
@@ -29937,8 +28546,8 @@ fi
29937 28546
29938 28547
29939if test -z "$disable_shadow" ; then 28548if test -z "$disable_shadow" ; then
29940 { $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
29941$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; }
29942 cat >conftest.$ac_ext <<_ACEOF 28551 cat >conftest.$ac_ext <<_ACEOF
29943/* confdefs.h. */ 28552/* confdefs.h. */
29944_ACEOF 28553_ACEOF
@@ -29964,21 +28573,20 @@ case "(($ac_try" in
29964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 28573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29965 *) ac_try_echo=$ac_try;; 28574 *) ac_try_echo=$ac_try;;
29966esac 28575esac
29967eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 28576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29968$as_echo "$ac_try_echo") >&5
29969 (eval "$ac_compile") 2>conftest.er1 28577 (eval "$ac_compile") 2>conftest.er1
29970 ac_status=$? 28578 ac_status=$?
29971 grep -v '^ *+' conftest.er1 >conftest.err 28579 grep -v '^ *+' conftest.er1 >conftest.err
29972 rm -f conftest.er1 28580 rm -f conftest.er1
29973 cat conftest.err >&5 28581 cat conftest.err >&5
29974 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 28582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29975 (exit $ac_status); } && { 28583 (exit $ac_status); } && {
29976 test -z "$ac_c_werror_flag" || 28584 test -z "$ac_c_werror_flag" ||
29977 test ! -s conftest.err 28585 test ! -s conftest.err
29978 } && test -s conftest.$ac_objext; then 28586 } && test -s conftest.$ac_objext; then
29979 sp_expire_available=yes 28587 sp_expire_available=yes
29980else 28588else
29981 $as_echo "$as_me: failed program was:" >&5 28589 echo "$as_me: failed program was:" >&5
29982sed 's/^/| /' conftest.$ac_ext >&5 28590sed 's/^/| /' conftest.$ac_ext >&5
29983 28591
29984 28592
@@ -29988,16 +28596,16 @@ fi
29988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29989 28597
29990 if test "x$sp_expire_available" = "xyes" ; then 28598 if test "x$sp_expire_available" = "xyes" ; then
29991 { $as_echo "$as_me:$LINENO: result: yes" >&5 28599 { echo "$as_me:$LINENO: result: yes" >&5
29992$as_echo "yes" >&6; } 28600echo "${ECHO_T}yes" >&6; }
29993 28601
29994cat >>confdefs.h <<\_ACEOF 28602cat >>confdefs.h <<\_ACEOF
29995#define HAS_SHADOW_EXPIRE 1 28603#define HAS_SHADOW_EXPIRE 1
29996_ACEOF 28604_ACEOF
29997 28605
29998 else 28606 else
29999 { $as_echo "$as_me:$LINENO: result: no" >&5 28607 { echo "$as_me:$LINENO: result: no" >&5
30000$as_echo "no" >&6; } 28608echo "${ECHO_T}no" >&6; }
30001 fi 28609 fi
30002fi 28610fi
30003 28611
@@ -30032,8 +28640,8 @@ fi
30032# Check whether --enable-etc-default-login was given. 28640# Check whether --enable-etc-default-login was given.
30033if test "${enable_etc_default_login+set}" = set; then 28641if test "${enable_etc_default_login+set}" = set; then
30034 enableval=$enable_etc_default_login; if test "x$enableval" = "xno"; then 28642 enableval=$enable_etc_default_login; if test "x$enableval" = "xno"; then
30035 { $as_echo "$as_me:$LINENO: /etc/default/login handling disabled" >&5 28643 { echo "$as_me:$LINENO: /etc/default/login handling disabled" >&5
30036$as_echo "$as_me: /etc/default/login handling disabled" >&6;} 28644echo "$as_me: /etc/default/login handling disabled" >&6;}
30037 etc_default_login=no 28645 etc_default_login=no
30038 else 28646 else
30039 etc_default_login=yes 28647 etc_default_login=yes
@@ -30041,8 +28649,8 @@ $as_echo "$as_me: /etc/default/login handling disabled" >&6;}
30041else 28649else
30042 if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; 28650 if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes";
30043 then 28651 then
30044 { $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
30045$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;}
30046 etc_default_login=no 28654 etc_default_login=no
30047 else 28655 else
30048 etc_default_login=yes 28656 etc_default_login=yes
@@ -30052,14 +28660,14 @@ fi
30052 28660
30053 28661
30054if test "x$etc_default_login" != "xno"; then 28662if test "x$etc_default_login" != "xno"; then
30055 { $as_echo "$as_me:$LINENO: checking for \"/etc/default/login\"" >&5 28663 { echo "$as_me:$LINENO: checking for \"/etc/default/login\"" >&5
30056$as_echo_n "checking for \"/etc/default/login\"... " >&6; } 28664echo $ECHO_N "checking for \"/etc/default/login\"... $ECHO_C" >&6; }
30057if test "${ac_cv_file___etc_default_login_+set}" = set; then 28665if test "${ac_cv_file___etc_default_login_+set}" = set; then
30058 $as_echo_n "(cached) " >&6 28666 echo $ECHO_N "(cached) $ECHO_C" >&6
30059else 28667else
30060 test "$cross_compiling" = yes && 28668 test "$cross_compiling" = yes &&
30061 { { $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
30062$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;}
30063 { (exit 1); exit 1; }; } 28671 { (exit 1); exit 1; }; }
30064if test -r ""/etc/default/login""; then 28672if test -r ""/etc/default/login""; then
30065 ac_cv_file___etc_default_login_=yes 28673 ac_cv_file___etc_default_login_=yes
@@ -30067,8 +28675,8 @@ else
30067 ac_cv_file___etc_default_login_=no 28675 ac_cv_file___etc_default_login_=no
30068fi 28676fi
30069fi 28677fi
30070{ $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
30071$as_echo "$ac_cv_file___etc_default_login_" >&6; } 28679echo "${ECHO_T}$ac_cv_file___etc_default_login_" >&6; }
30072if test $ac_cv_file___etc_default_login_ = yes; then 28680if test $ac_cv_file___etc_default_login_ = yes; then
30073 external_path_file=/etc/default/login 28681 external_path_file=/etc/default/login
30074fi 28682fi
@@ -30094,18 +28702,18 @@ SERVER_PATH_MSG="(default)"
30094if test "${with_default_path+set}" = set; then 28702if test "${with_default_path+set}" = set; then
30095 withval=$with_default_path; 28703 withval=$with_default_path;
30096 if test "x$external_path_file" = "x/etc/login.conf" ; then 28704 if test "x$external_path_file" = "x/etc/login.conf" ; then
30097 { $as_echo "$as_me:$LINENO: WARNING: 28705 { echo "$as_me:$LINENO: WARNING:
30098--with-default-path=PATH has no effect on this system. 28706--with-default-path=PATH has no effect on this system.
30099Edit /etc/login.conf instead." >&5 28707Edit /etc/login.conf instead." >&5
30100$as_echo "$as_me: WARNING: 28708echo "$as_me: WARNING:
30101--with-default-path=PATH has no effect on this system. 28709--with-default-path=PATH has no effect on this system.
30102Edit /etc/login.conf instead." >&2;} 28710Edit /etc/login.conf instead." >&2;}
30103 elif test "x$withval" != "xno" ; then 28711 elif test "x$withval" != "xno" ; then
30104 if test ! -z "$external_path_file" ; then 28712 if test ! -z "$external_path_file" ; then
30105 { $as_echo "$as_me:$LINENO: WARNING: 28713 { echo "$as_me:$LINENO: WARNING:
30106--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
30107$external_path_file ." >&5 28715$external_path_file ." >&5
30108$as_echo "$as_me: WARNING: 28716echo "$as_me: WARNING:
30109--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
30110$external_path_file ." >&2;} 28718$external_path_file ." >&2;}
30111 fi 28719 fi
@@ -30115,14 +28723,14 @@ $external_path_file ." >&2;}
30115 28723
30116else 28724else
30117 if test "x$external_path_file" = "x/etc/login.conf" ; then 28725 if test "x$external_path_file" = "x/etc/login.conf" ; then
30118 { $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
30119$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;}
30120 else 28728 else
30121 if test ! -z "$external_path_file" ; then 28729 if test ! -z "$external_path_file" ; then
30122 { $as_echo "$as_me:$LINENO: WARNING: 28730 { echo "$as_me:$LINENO: WARNING:
30123If 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,
30124otherwise scp will not work." >&5 28732otherwise scp will not work." >&5
30125$as_echo "$as_me: WARNING: 28733echo "$as_me: WARNING:
30126If 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,
30127otherwise scp will not work." >&2;} 28735otherwise scp will not work." >&2;}
30128 fi 28736 fi
@@ -30176,32 +28784,29 @@ case "(($ac_try" in
30176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 28784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30177 *) ac_try_echo=$ac_try;; 28785 *) ac_try_echo=$ac_try;;
30178esac 28786esac
30179eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 28787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30180$as_echo "$ac_try_echo") >&5
30181 (eval "$ac_link") 2>&5 28788 (eval "$ac_link") 2>&5
30182 ac_status=$? 28789 ac_status=$?
30183 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 28790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30184 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 28791 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
30185 { (case "(($ac_try" in 28792 { (case "(($ac_try" in
30186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 28793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30187 *) ac_try_echo=$ac_try;; 28794 *) ac_try_echo=$ac_try;;
30188esac 28795esac
30189eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 28796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30190$as_echo "$ac_try_echo") >&5
30191 (eval "$ac_try") 2>&5 28797 (eval "$ac_try") 2>&5
30192 ac_status=$? 28798 ac_status=$?
30193 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 28799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30194 (exit $ac_status); }; }; then 28800 (exit $ac_status); }; }; then
30195 user_path=`cat conftest.stdpath` 28801 user_path=`cat conftest.stdpath`
30196else 28802else
30197 $as_echo "$as_me: program exited with status $ac_status" >&5 28803 echo "$as_me: program exited with status $ac_status" >&5
30198$as_echo "$as_me: failed program was:" >&5 28804echo "$as_me: failed program was:" >&5
30199sed 's/^/| /' conftest.$ac_ext >&5 28805sed 's/^/| /' conftest.$ac_ext >&5
30200 28806
30201( exit $ac_status ) 28807( exit $ac_status )
30202 user_path="/usr/bin:/bin:/usr/sbin:/sbin" 28808 user_path="/usr/bin:/bin:/usr/sbin:/sbin"
30203fi 28809fi
30204rm -rf conftest.dSYM
30205rm -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
30206fi 28811fi
30207 28812
@@ -30219,8 +28824,8 @@ fi
30219 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1 28824 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1
30220 if test $? -ne 0 ; then 28825 if test $? -ne 0 ; then
30221 user_path=$user_path:$t_bindir 28826 user_path=$user_path:$t_bindir
30222 { $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
30223$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; }
30224 fi 28829 fi
30225 fi 28830 fi
30226 fi 28831 fi
@@ -30256,16 +28861,16 @@ fi
30256 28861
30257 28862
30258 28863
30259{ $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
30260$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; }
30261IPV4_IN6_HACK_MSG="no" 28866IPV4_IN6_HACK_MSG="no"
30262 28867
30263# Check whether --with-4in6 was given. 28868# Check whether --with-4in6 was given.
30264if test "${with_4in6+set}" = set; then 28869if test "${with_4in6+set}" = set; then
30265 withval=$with_4in6; 28870 withval=$with_4in6;
30266 if test "x$withval" != "xno" ; then 28871 if test "x$withval" != "xno" ; then
30267 { $as_echo "$as_me:$LINENO: result: yes" >&5 28872 { echo "$as_me:$LINENO: result: yes" >&5
30268$as_echo "yes" >&6; } 28873echo "${ECHO_T}yes" >&6; }
30269 28874
30270cat >>confdefs.h <<\_ACEOF 28875cat >>confdefs.h <<\_ACEOF
30271#define IPV4_IN_IPV6 1 28876#define IPV4_IN_IPV6 1
@@ -30273,23 +28878,23 @@ _ACEOF
30273 28878
30274 IPV4_IN6_HACK_MSG="yes" 28879 IPV4_IN6_HACK_MSG="yes"
30275 else 28880 else
30276 { $as_echo "$as_me:$LINENO: result: no" >&5 28881 { echo "$as_me:$LINENO: result: no" >&5
30277$as_echo "no" >&6; } 28882echo "${ECHO_T}no" >&6; }
30278 fi 28883 fi
30279 28884
30280else 28885else
30281 28886
30282 if test "x$inet6_default_4in6" = "xyes"; then 28887 if test "x$inet6_default_4in6" = "xyes"; then
30283 { $as_echo "$as_me:$LINENO: result: yes (default)" >&5 28888 { echo "$as_me:$LINENO: result: yes (default)" >&5
30284$as_echo "yes (default)" >&6; } 28889echo "${ECHO_T}yes (default)" >&6; }
30285 cat >>confdefs.h <<\_ACEOF 28890 cat >>confdefs.h <<\_ACEOF
30286#define IPV4_IN_IPV6 1 28891#define IPV4_IN_IPV6 1
30287_ACEOF 28892_ACEOF
30288 28893
30289 IPV4_IN6_HACK_MSG="yes" 28894 IPV4_IN6_HACK_MSG="yes"
30290 else 28895 else
30291 { $as_echo "$as_me:$LINENO: result: no (default)" >&5 28896 { echo "$as_me:$LINENO: result: no (default)" >&5
30292$as_echo "no (default)" >&6; } 28897echo "${ECHO_T}no (default)" >&6; }
30293 fi 28898 fi
30294 28899
30295 28900
@@ -30333,8 +28938,8 @@ if test "${with_pid_dir+set}" = set; then
30333 test "x${withval}" != "xyes"; then 28938 test "x${withval}" != "xyes"; then
30334 piddir=$withval 28939 piddir=$withval
30335 if test ! -d $piddir ; then 28940 if test ! -d $piddir ; then
30336 { $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
30337$as_echo "$as_me: WARNING: ** no $piddir directory on this system **" >&2;} 28942echo "$as_me: WARNING: ** no $piddir directory on this system **" >&2;}
30338 fi 28943 fi
30339 fi 28944 fi
30340 28945
@@ -30475,8 +29080,8 @@ fi
30475 29080
30476 29081
30477 29082
30478{ $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
30479$as_echo_n "checking if your system defines LASTLOG_FILE... " >&6; } 29084echo $ECHO_N "checking if your system defines LASTLOG_FILE... $ECHO_C" >&6; }
30480cat >conftest.$ac_ext <<_ACEOF 29085cat >conftest.$ac_ext <<_ACEOF
30481/* confdefs.h. */ 29086/* confdefs.h. */
30482_ACEOF 29087_ACEOF
@@ -30510,29 +29115,28 @@ case "(($ac_try" in
30510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 29115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30511 *) ac_try_echo=$ac_try;; 29116 *) ac_try_echo=$ac_try;;
30512esac 29117esac
30513eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 29118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30514$as_echo "$ac_try_echo") >&5
30515 (eval "$ac_compile") 2>conftest.er1 29119 (eval "$ac_compile") 2>conftest.er1
30516 ac_status=$? 29120 ac_status=$?
30517 grep -v '^ *+' conftest.er1 >conftest.err 29121 grep -v '^ *+' conftest.er1 >conftest.err
30518 rm -f conftest.er1 29122 rm -f conftest.er1
30519 cat conftest.err >&5 29123 cat conftest.err >&5
30520 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 29124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30521 (exit $ac_status); } && { 29125 (exit $ac_status); } && {
30522 test -z "$ac_c_werror_flag" || 29126 test -z "$ac_c_werror_flag" ||
30523 test ! -s conftest.err 29127 test ! -s conftest.err
30524 } && test -s conftest.$ac_objext; then 29128 } && test -s conftest.$ac_objext; then
30525 { $as_echo "$as_me:$LINENO: result: yes" >&5 29129 { echo "$as_me:$LINENO: result: yes" >&5
30526$as_echo "yes" >&6; } 29130echo "${ECHO_T}yes" >&6; }
30527else 29131else
30528 $as_echo "$as_me: failed program was:" >&5 29132 echo "$as_me: failed program was:" >&5
30529sed 's/^/| /' conftest.$ac_ext >&5 29133sed 's/^/| /' conftest.$ac_ext >&5
30530 29134
30531 29135
30532 { $as_echo "$as_me:$LINENO: result: no" >&5 29136 { echo "$as_me:$LINENO: result: no" >&5
30533$as_echo "no" >&6; } 29137echo "${ECHO_T}no" >&6; }
30534 { $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
30535$as_echo_n "checking if your system defines _PATH_LASTLOG... " >&6; } 29139echo $ECHO_N "checking if your system defines _PATH_LASTLOG... $ECHO_C" >&6; }
30536 cat >conftest.$ac_ext <<_ACEOF 29140 cat >conftest.$ac_ext <<_ACEOF
30537/* confdefs.h. */ 29141/* confdefs.h. */
30538_ACEOF 29142_ACEOF
@@ -30563,27 +29167,26 @@ case "(($ac_try" in
30563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 29167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30564 *) ac_try_echo=$ac_try;; 29168 *) ac_try_echo=$ac_try;;
30565esac 29169esac
30566eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 29170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30567$as_echo "$ac_try_echo") >&5
30568 (eval "$ac_compile") 2>conftest.er1 29171 (eval "$ac_compile") 2>conftest.er1
30569 ac_status=$? 29172 ac_status=$?
30570 grep -v '^ *+' conftest.er1 >conftest.err 29173 grep -v '^ *+' conftest.er1 >conftest.err
30571 rm -f conftest.er1 29174 rm -f conftest.er1
30572 cat conftest.err >&5 29175 cat conftest.err >&5
30573 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 29176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30574 (exit $ac_status); } && { 29177 (exit $ac_status); } && {
30575 test -z "$ac_c_werror_flag" || 29178 test -z "$ac_c_werror_flag" ||
30576 test ! -s conftest.err 29179 test ! -s conftest.err
30577 } && test -s conftest.$ac_objext; then 29180 } && test -s conftest.$ac_objext; then
30578 { $as_echo "$as_me:$LINENO: result: yes" >&5 29181 { echo "$as_me:$LINENO: result: yes" >&5
30579$as_echo "yes" >&6; } 29182echo "${ECHO_T}yes" >&6; }
30580else 29183else
30581 $as_echo "$as_me: failed program was:" >&5 29184 echo "$as_me: failed program was:" >&5
30582sed 's/^/| /' conftest.$ac_ext >&5 29185sed 's/^/| /' conftest.$ac_ext >&5
30583 29186
30584 29187
30585 { $as_echo "$as_me:$LINENO: result: no" >&5 29188 { echo "$as_me:$LINENO: result: no" >&5
30586$as_echo "no" >&6; } 29189echo "${ECHO_T}no" >&6; }
30587 system_lastlog_path=no 29190 system_lastlog_path=no
30588 29191
30589fi 29192fi
@@ -30603,8 +29206,8 @@ if test -z "$conf_lastlog_location"; then
30603 fi 29206 fi
30604 done 29207 done
30605 if test -z "$conf_lastlog_location"; then 29208 if test -z "$conf_lastlog_location"; then
30606 { $as_echo "$as_me:$LINENO: WARNING: ** Cannot find lastlog **" >&5 29209 { echo "$as_me:$LINENO: WARNING: ** Cannot find lastlog **" >&5
30607$as_echo "$as_me: WARNING: ** Cannot find lastlog **" >&2;} 29210echo "$as_me: WARNING: ** Cannot find lastlog **" >&2;}
30608 fi 29211 fi
30609 fi 29212 fi
30610fi 29213fi
@@ -30617,8 +29220,8 @@ _ACEOF
30617 29220
30618fi 29221fi
30619 29222
30620{ $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
30621$as_echo_n "checking if your system defines UTMP_FILE... " >&6; } 29224echo $ECHO_N "checking if your system defines UTMP_FILE... $ECHO_C" >&6; }
30622cat >conftest.$ac_ext <<_ACEOF 29225cat >conftest.$ac_ext <<_ACEOF
30623/* confdefs.h. */ 29226/* confdefs.h. */
30624_ACEOF 29227_ACEOF
@@ -30646,26 +29249,25 @@ case "(($ac_try" in
30646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 29249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30647 *) ac_try_echo=$ac_try;; 29250 *) ac_try_echo=$ac_try;;
30648esac 29251esac
30649eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 29252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30650$as_echo "$ac_try_echo") >&5
30651 (eval "$ac_compile") 2>conftest.er1 29253 (eval "$ac_compile") 2>conftest.er1
30652 ac_status=$? 29254 ac_status=$?
30653 grep -v '^ *+' conftest.er1 >conftest.err 29255 grep -v '^ *+' conftest.er1 >conftest.err
30654 rm -f conftest.er1 29256 rm -f conftest.er1
30655 cat conftest.err >&5 29257 cat conftest.err >&5
30656 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 29258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30657 (exit $ac_status); } && { 29259 (exit $ac_status); } && {
30658 test -z "$ac_c_werror_flag" || 29260 test -z "$ac_c_werror_flag" ||
30659 test ! -s conftest.err 29261 test ! -s conftest.err
30660 } && test -s conftest.$ac_objext; then 29262 } && test -s conftest.$ac_objext; then
30661 { $as_echo "$as_me:$LINENO: result: yes" >&5 29263 { echo "$as_me:$LINENO: result: yes" >&5
30662$as_echo "yes" >&6; } 29264echo "${ECHO_T}yes" >&6; }
30663else 29265else
30664 $as_echo "$as_me: failed program was:" >&5 29266 echo "$as_me: failed program was:" >&5
30665sed 's/^/| /' conftest.$ac_ext >&5 29267sed 's/^/| /' conftest.$ac_ext >&5
30666 29268
30667 { $as_echo "$as_me:$LINENO: result: no" >&5 29269 { echo "$as_me:$LINENO: result: no" >&5
30668$as_echo "no" >&6; } 29270echo "${ECHO_T}no" >&6; }
30669 system_utmp_path=no 29271 system_utmp_path=no
30670 29272
30671fi 29273fi
@@ -30694,8 +29296,8 @@ _ACEOF
30694 29296
30695fi 29297fi
30696 29298
30697{ $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
30698$as_echo_n "checking if your system defines WTMP_FILE... " >&6; } 29300echo $ECHO_N "checking if your system defines WTMP_FILE... $ECHO_C" >&6; }
30699cat >conftest.$ac_ext <<_ACEOF 29301cat >conftest.$ac_ext <<_ACEOF
30700/* confdefs.h. */ 29302/* confdefs.h. */
30701_ACEOF 29303_ACEOF
@@ -30723,26 +29325,25 @@ case "(($ac_try" in
30723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 29325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30724 *) ac_try_echo=$ac_try;; 29326 *) ac_try_echo=$ac_try;;
30725esac 29327esac
30726eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 29328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30727$as_echo "$ac_try_echo") >&5
30728 (eval "$ac_compile") 2>conftest.er1 29329 (eval "$ac_compile") 2>conftest.er1
30729 ac_status=$? 29330 ac_status=$?
30730 grep -v '^ *+' conftest.er1 >conftest.err 29331 grep -v '^ *+' conftest.er1 >conftest.err
30731 rm -f conftest.er1 29332 rm -f conftest.er1
30732 cat conftest.err >&5 29333 cat conftest.err >&5
30733 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 29334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30734 (exit $ac_status); } && { 29335 (exit $ac_status); } && {
30735 test -z "$ac_c_werror_flag" || 29336 test -z "$ac_c_werror_flag" ||
30736 test ! -s conftest.err 29337 test ! -s conftest.err
30737 } && test -s conftest.$ac_objext; then 29338 } && test -s conftest.$ac_objext; then
30738 { $as_echo "$as_me:$LINENO: result: yes" >&5 29339 { echo "$as_me:$LINENO: result: yes" >&5
30739$as_echo "yes" >&6; } 29340echo "${ECHO_T}yes" >&6; }
30740else 29341else
30741 $as_echo "$as_me: failed program was:" >&5 29342 echo "$as_me: failed program was:" >&5
30742sed 's/^/| /' conftest.$ac_ext >&5 29343sed 's/^/| /' conftest.$ac_ext >&5
30743 29344
30744 { $as_echo "$as_me:$LINENO: result: no" >&5 29345 { echo "$as_me:$LINENO: result: no" >&5
30745$as_echo "no" >&6; } 29346echo "${ECHO_T}no" >&6; }
30746 system_wtmp_path=no 29347 system_wtmp_path=no
30747 29348
30748fi 29349fi
@@ -30772,8 +29373,8 @@ _ACEOF
30772fi 29373fi
30773 29374
30774 29375
30775{ $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
30776$as_echo_n "checking if your system defines UTMPX_FILE... " >&6; } 29377echo $ECHO_N "checking if your system defines UTMPX_FILE... $ECHO_C" >&6; }
30777cat >conftest.$ac_ext <<_ACEOF 29378cat >conftest.$ac_ext <<_ACEOF
30778/* confdefs.h. */ 29379/* confdefs.h. */
30779_ACEOF 29380_ACEOF
@@ -30804,26 +29405,25 @@ case "(($ac_try" in
30804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 29405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30805 *) ac_try_echo=$ac_try;; 29406 *) ac_try_echo=$ac_try;;
30806esac 29407esac
30807eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 29408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30808$as_echo "$ac_try_echo") >&5
30809 (eval "$ac_compile") 2>conftest.er1 29409 (eval "$ac_compile") 2>conftest.er1
30810 ac_status=$? 29410 ac_status=$?
30811 grep -v '^ *+' conftest.er1 >conftest.err 29411 grep -v '^ *+' conftest.er1 >conftest.err
30812 rm -f conftest.er1 29412 rm -f conftest.er1
30813 cat conftest.err >&5 29413 cat conftest.err >&5
30814 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 29414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30815 (exit $ac_status); } && { 29415 (exit $ac_status); } && {
30816 test -z "$ac_c_werror_flag" || 29416 test -z "$ac_c_werror_flag" ||
30817 test ! -s conftest.err 29417 test ! -s conftest.err
30818 } && test -s conftest.$ac_objext; then 29418 } && test -s conftest.$ac_objext; then
30819 { $as_echo "$as_me:$LINENO: result: yes" >&5 29419 { echo "$as_me:$LINENO: result: yes" >&5
30820$as_echo "yes" >&6; } 29420echo "${ECHO_T}yes" >&6; }
30821else 29421else
30822 $as_echo "$as_me: failed program was:" >&5 29422 echo "$as_me: failed program was:" >&5
30823sed 's/^/| /' conftest.$ac_ext >&5 29423sed 's/^/| /' conftest.$ac_ext >&5
30824 29424
30825 { $as_echo "$as_me:$LINENO: result: no" >&5 29425 { echo "$as_me:$LINENO: result: no" >&5
30826$as_echo "no" >&6; } 29426echo "${ECHO_T}no" >&6; }
30827 system_utmpx_path=no 29427 system_utmpx_path=no
30828 29428
30829fi 29429fi
@@ -30844,8 +29444,8 @@ _ACEOF
30844 29444
30845fi 29445fi
30846 29446
30847{ $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
30848$as_echo_n "checking if your system defines WTMPX_FILE... " >&6; } 29448echo $ECHO_N "checking if your system defines WTMPX_FILE... $ECHO_C" >&6; }
30849cat >conftest.$ac_ext <<_ACEOF 29449cat >conftest.$ac_ext <<_ACEOF
30850/* confdefs.h. */ 29450/* confdefs.h. */
30851_ACEOF 29451_ACEOF
@@ -30876,26 +29476,25 @@ case "(($ac_try" in
30876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 29476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30877 *) ac_try_echo=$ac_try;; 29477 *) ac_try_echo=$ac_try;;
30878esac 29478esac
30879eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 29479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30880$as_echo "$ac_try_echo") >&5
30881 (eval "$ac_compile") 2>conftest.er1 29480 (eval "$ac_compile") 2>conftest.er1
30882 ac_status=$? 29481 ac_status=$?
30883 grep -v '^ *+' conftest.er1 >conftest.err 29482 grep -v '^ *+' conftest.er1 >conftest.err
30884 rm -f conftest.er1 29483 rm -f conftest.er1
30885 cat conftest.err >&5 29484 cat conftest.err >&5
30886 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 29485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30887 (exit $ac_status); } && { 29486 (exit $ac_status); } && {
30888 test -z "$ac_c_werror_flag" || 29487 test -z "$ac_c_werror_flag" ||
30889 test ! -s conftest.err 29488 test ! -s conftest.err
30890 } && test -s conftest.$ac_objext; then 29489 } && test -s conftest.$ac_objext; then
30891 { $as_echo "$as_me:$LINENO: result: yes" >&5 29490 { echo "$as_me:$LINENO: result: yes" >&5
30892$as_echo "yes" >&6; } 29491echo "${ECHO_T}yes" >&6; }
30893else 29492else
30894 $as_echo "$as_me: failed program was:" >&5 29493 echo "$as_me: failed program was:" >&5
30895sed 's/^/| /' conftest.$ac_ext >&5 29494sed 's/^/| /' conftest.$ac_ext >&5
30896 29495
30897 { $as_echo "$as_me:$LINENO: result: no" >&5 29496 { echo "$as_me:$LINENO: result: no" >&5
30898$as_echo "no" >&6; } 29497echo "${ECHO_T}no" >&6; }
30899 system_wtmpx_path=no 29498 system_wtmpx_path=no
30900 29499
30901fi 29500fi
@@ -30919,8 +29518,8 @@ fi
30919 29518
30920if test ! -z "$blibpath" ; then 29519if test ! -z "$blibpath" ; then
30921 LDFLAGS="$LDFLAGS $blibflags$blibpath" 29520 LDFLAGS="$LDFLAGS $blibflags$blibpath"
30922 { $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
30923$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;}
30924fi 29523fi
30925 29524
30926CFLAGS="$CFLAGS $werror_flags" 29525CFLAGS="$CFLAGS $werror_flags"
@@ -30935,7 +29534,7 @@ else
30935fi 29534fi
30936 29535
30937 29536
30938ac_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"
30939 29538
30940cat >confcache <<\_ACEOF 29539cat >confcache <<\_ACEOF
30941# 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
@@ -30964,12 +29563,11 @@ _ACEOF
30964 case $ac_val in #( 29563 case $ac_val in #(
30965 *${as_nl}*) 29564 *${as_nl}*)
30966 case $ac_var in #( 29565 case $ac_var in #(
30967 *_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
30968$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;} ;;
30969 esac 29568 esac
30970 case $ac_var in #( 29569 case $ac_var in #(
30971 _ | IFS | as_nl) ;; #( 29570 _ | IFS | as_nl) ;; #(
30972 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
30973 *) $as_unset $ac_var ;; 29571 *) $as_unset $ac_var ;;
30974 esac ;; 29572 esac ;;
30975 esac 29573 esac
@@ -31002,12 +29600,12 @@ $as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
31002if diff "$cache_file" confcache >/dev/null 2>&1; then :; else 29600if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31003 if test -w "$cache_file"; then 29601 if test -w "$cache_file"; then
31004 test "x$cache_file" != "x/dev/null" && 29602 test "x$cache_file" != "x/dev/null" &&
31005 { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 29603 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
31006$as_echo "$as_me: updating cache $cache_file" >&6;} 29604echo "$as_me: updating cache $cache_file" >&6;}
31007 cat confcache >$cache_file 29605 cat confcache >$cache_file
31008 else 29606 else
31009 { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 29607 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
31010$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} 29608echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31011 fi 29609 fi
31012fi 29610fi
31013rm -f confcache 29611rm -f confcache
@@ -31023,7 +29621,7 @@ ac_ltlibobjs=
31023for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 29621for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31024 # 1. Remove the extension, and $U if already installed. 29622 # 1. Remove the extension, and $U if already installed.
31025 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' 29623 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31026 ac_i=`$as_echo "$ac_i" | sed "$ac_script"` 29624 ac_i=`echo "$ac_i" | sed "$ac_script"`
31027 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR 29625 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
31028 # will be set to the directory where LIBOBJS objects are built. 29626 # will be set to the directory where LIBOBJS objects are built.
31029 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" 29627 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
@@ -31035,14 +29633,12 @@ LTLIBOBJS=$ac_ltlibobjs
31035 29633
31036 29634
31037 29635
31038
31039: ${CONFIG_STATUS=./config.status} 29636: ${CONFIG_STATUS=./config.status}
31040ac_write_fail=0
31041ac_clean_files_save=$ac_clean_files 29637ac_clean_files_save=$ac_clean_files
31042ac_clean_files="$ac_clean_files $CONFIG_STATUS" 29638ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31043{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 29639{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
31044$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} 29640echo "$as_me: creating $CONFIG_STATUS" >&6;}
31045cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 29641cat >$CONFIG_STATUS <<_ACEOF
31046#! $SHELL 29642#! $SHELL
31047# Generated by $as_me. 29643# Generated by $as_me.
31048# Run this file to recreate the current configuration. 29644# Run this file to recreate the current configuration.
@@ -31055,7 +29651,7 @@ ac_cs_silent=false
31055SHELL=\${CONFIG_SHELL-$SHELL} 29651SHELL=\${CONFIG_SHELL-$SHELL}
31056_ACEOF 29652_ACEOF
31057 29653
31058cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 29654cat >>$CONFIG_STATUS <<\_ACEOF
31059## --------------------- ## 29655## --------------------- ##
31060## M4sh Initialization. ## 29656## M4sh Initialization. ##
31061## --------------------- ## 29657## --------------------- ##
@@ -31065,7 +29661,7 @@ DUALCASE=1; export DUALCASE # for MKS sh
31065if 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
31066 emulate sh 29662 emulate sh
31067 NULLCMD=: 29663 NULLCMD=:
31068 # 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
31069 # is contrary to our usage. Disable this feature. 29665 # is contrary to our usage. Disable this feature.
31070 alias -g '${1+"$@"}'='"$@"' 29666 alias -g '${1+"$@"}'='"$@"'
31071 setopt NO_GLOB_SUBST 29667 setopt NO_GLOB_SUBST
@@ -31087,45 +29683,17 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
31087as_cr_digits='0123456789' 29683as_cr_digits='0123456789'
31088as_cr_alnum=$as_cr_Letters$as_cr_digits 29684as_cr_alnum=$as_cr_Letters$as_cr_digits
31089 29685
31090as_nl='
31091'
31092export as_nl
31093# Printing a long string crashes Solaris 7 /usr/bin/printf.
31094as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31095as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31096as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31097if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31098 as_echo='printf %s\n'
31099 as_echo_n='printf %s'
31100else
31101 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31102 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31103 as_echo_n='/usr/ucb/echo -n'
31104 else
31105 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31106 as_echo_n_body='eval
31107 arg=$1;
31108 case $arg in
31109 *"$as_nl"*)
31110 expr "X$arg" : "X\\(.*\\)$as_nl";
31111 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31112 esac;
31113 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31114 '
31115 export as_echo_n_body
31116 as_echo_n='sh -c $as_echo_n_body as_echo'
31117 fi
31118 export as_echo_body
31119 as_echo='sh -c $as_echo_body as_echo'
31120fi
31121
31122# The user is always right. 29686# The user is always right.
31123if test "${PATH_SEPARATOR+set}" != set; then 29687if test "${PATH_SEPARATOR+set}" != set; then
31124 PATH_SEPARATOR=: 29688 echo "#! /bin/sh" >conf$$.sh
31125 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 29689 echo "exit 0" >>conf$$.sh
31126 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 29690 chmod +x conf$$.sh
31127 PATH_SEPARATOR=';' 29691 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
31128 } 29692 PATH_SEPARATOR=';'
29693 else
29694 PATH_SEPARATOR=:
29695 fi
29696 rm -f conf$$.sh
31129fi 29697fi
31130 29698
31131# Support unset when possible. 29699# Support unset when possible.
@@ -31141,6 +29709,8 @@ fi
31141# there to prevent editors from complaining about space-tab. 29709# there to prevent editors from complaining about space-tab.
31142# (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
31143# splitting by setting IFS to empty value.) 29711# splitting by setting IFS to empty value.)
29712as_nl='
29713'
31144IFS=" "" $as_nl" 29714IFS=" "" $as_nl"
31145 29715
31146# 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.
@@ -31163,7 +29733,7 @@ if test "x$as_myself" = x; then
31163 as_myself=$0 29733 as_myself=$0
31164fi 29734fi
31165if test ! -f "$as_myself"; then 29735if test ! -f "$as_myself"; then
31166 $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
31167 { (exit 1); exit 1; } 29737 { (exit 1); exit 1; }
31168fi 29738fi
31169 29739
@@ -31176,10 +29746,17 @@ PS2='> '
31176PS4='+ ' 29746PS4='+ '
31177 29747
31178# NLS nuisances. 29748# NLS nuisances.
31179LC_ALL=C 29749for as_var in \
31180export LC_ALL 29750 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
31181LANGUAGE=C 29751 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
31182export 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
31183 29760
31184# Required to use basename. 29761# Required to use basename.
31185if expr a : '\(a\)' >/dev/null 2>&1 && 29762if expr a : '\(a\)' >/dev/null 2>&1 &&
@@ -31201,7 +29778,7 @@ as_me=`$as_basename -- "$0" ||
31201$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 29778$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
31202 X"$0" : 'X\(//\)$' \| \ 29779 X"$0" : 'X\(//\)$' \| \
31203 X"$0" : 'X\(/\)' \| . 2>/dev/null || 29780 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
31204$as_echo X/"$0" | 29781echo X/"$0" |
31205 sed '/^.*\/\([^/][^/]*\)\/*$/{ 29782 sed '/^.*\/\([^/][^/]*\)\/*$/{
31206 s//\1/ 29783 s//\1/
31207 q 29784 q
@@ -31252,7 +29829,7 @@ $as_unset CDPATH
31252 s/-\n.*// 29829 s/-\n.*//
31253 ' >$as_me.lineno && 29830 ' >$as_me.lineno &&
31254 chmod +x "$as_me.lineno" || 29831 chmod +x "$as_me.lineno" ||
31255 { $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
31256 { (exit 1); exit 1; }; } 29833 { (exit 1); exit 1; }; }
31257 29834
31258 # 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
@@ -31280,6 +29857,7 @@ case `echo -n x` in
31280*) 29857*)
31281 ECHO_N='-n';; 29858 ECHO_N='-n';;
31282esac 29859esac
29860
31283if expr a : '\(a\)' >/dev/null 2>&1 && 29861if expr a : '\(a\)' >/dev/null 2>&1 &&
31284 test "X`expr 00001 : '.*\(...\)'`" = X001; then 29862 test "X`expr 00001 : '.*\(...\)'`" = X001; then
31285 as_expr=expr 29863 as_expr=expr
@@ -31292,22 +29870,19 @@ if test -d conf$$.dir; then
31292 rm -f conf$$.dir/conf$$.file 29870 rm -f conf$$.dir/conf$$.file
31293else 29871else
31294 rm -f conf$$.dir 29872 rm -f conf$$.dir
31295 mkdir conf$$.dir 2>/dev/null 29873 mkdir conf$$.dir
31296fi 29874fi
31297if (echo >conf$$.file) 2>/dev/null; then 29875echo >conf$$.file
31298 if ln -s conf$$.file conf$$ 2>/dev/null; then 29876if ln -s conf$$.file conf$$ 2>/dev/null; then
31299 as_ln_s='ln -s' 29877 as_ln_s='ln -s'
31300 # ... but there are two gotchas: 29878 # ... but there are two gotchas:
31301 # 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.
31302 # 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.
31303 # In both cases, we have to default to `cp -p'. 29881 # In both cases, we have to default to `cp -p'.
31304 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 ||
31305 as_ln_s='cp -p'
31306 elif ln conf$$.file conf$$ 2>/dev/null; then
31307 as_ln_s=ln
31308 else
31309 as_ln_s='cp -p' 29883 as_ln_s='cp -p'
31310 fi 29884elif ln conf$$.file conf$$ 2>/dev/null; then
29885 as_ln_s=ln
31311else 29886else
31312 as_ln_s='cp -p' 29887 as_ln_s='cp -p'
31313fi 29888fi
@@ -31332,10 +29907,10 @@ else
31332 as_test_x=' 29907 as_test_x='
31333 eval sh -c '\'' 29908 eval sh -c '\''
31334 if test -d "$1"; then 29909 if test -d "$1"; then
31335 test -d "$1/."; 29910 test -d "$1/.";
31336 else 29911 else
31337 case $1 in 29912 case $1 in
31338 -*)set "./$1";; 29913 -*)set "./$1";;
31339 esac; 29914 esac;
31340 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
31341 ???[sx]*):;;*)false;;esac;fi 29916 ???[sx]*):;;*)false;;esac;fi
@@ -31358,7 +29933,7 @@ exec 6>&1
31358# values after options handling. 29933# values after options handling.
31359ac_log=" 29934ac_log="
31360This file was extended by OpenSSH $as_me Portable, which was 29935This file was extended by OpenSSH $as_me Portable, which was
31361generated by GNU Autoconf 2.62. Invocation command line was 29936generated by GNU Autoconf 2.61. Invocation command line was
31362 29937
31363 CONFIG_FILES = $CONFIG_FILES 29938 CONFIG_FILES = $CONFIG_FILES
31364 CONFIG_HEADERS = $CONFIG_HEADERS 29939 CONFIG_HEADERS = $CONFIG_HEADERS
@@ -31371,14 +29946,14 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q`
31371 29946
31372_ACEOF 29947_ACEOF
31373 29948
31374cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 29949cat >>$CONFIG_STATUS <<_ACEOF
31375# Files that config.status was made for. 29950# Files that config.status was made for.
31376config_files="$ac_config_files" 29951config_files="$ac_config_files"
31377config_headers="$ac_config_headers" 29952config_headers="$ac_config_headers"
31378 29953
31379_ACEOF 29954_ACEOF
31380 29955
31381cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 29956cat >>$CONFIG_STATUS <<\_ACEOF
31382ac_cs_usage="\ 29957ac_cs_usage="\
31383\`$as_me' instantiates files from templates according to the 29958\`$as_me' instantiates files from templates according to the
31384current configuration. 29959current configuration.
@@ -31391,9 +29966,9 @@ Usage: $0 [OPTIONS] [FILE]...
31391 -d, --debug don't remove temporary files 29966 -d, --debug don't remove temporary files
31392 --recheck update $as_me by reconfiguring in the same conditions 29967 --recheck update $as_me by reconfiguring in the same conditions
31393 --file=FILE[:TEMPLATE] 29968 --file=FILE[:TEMPLATE]
31394 instantiate the configuration file FILE 29969 instantiate the configuration file FILE
31395 --header=FILE[:TEMPLATE] 29970 --header=FILE[:TEMPLATE]
31396 instantiate the configuration header FILE 29971 instantiate the configuration header FILE
31397 29972
31398Configuration files: 29973Configuration files:
31399$config_files 29974$config_files
@@ -31404,25 +29979,24 @@ $config_headers
31404Report bugs to <bug-autoconf@gnu.org>." 29979Report bugs to <bug-autoconf@gnu.org>."
31405 29980
31406_ACEOF 29981_ACEOF
31407cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 29982cat >>$CONFIG_STATUS <<_ACEOF
31408ac_cs_version="\\ 29983ac_cs_version="\\
31409OpenSSH config.status Portable 29984OpenSSH config.status Portable
31410configured by $0, generated by GNU Autoconf 2.62, 29985configured by $0, generated by GNU Autoconf 2.61,
31411 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" 29986 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
31412 29987
31413Copyright (C) 2008 Free Software Foundation, Inc. 29988Copyright (C) 2006 Free Software Foundation, Inc.
31414This config.status script is free software; the Free Software Foundation 29989This config.status script is free software; the Free Software Foundation
31415gives unlimited permission to copy, distribute and modify it." 29990gives unlimited permission to copy, distribute and modify it."
31416 29991
31417ac_pwd='$ac_pwd' 29992ac_pwd='$ac_pwd'
31418srcdir='$srcdir' 29993srcdir='$srcdir'
31419INSTALL='$INSTALL' 29994INSTALL='$INSTALL'
31420AWK='$AWK'
31421test -n "\$AWK" || AWK=awk
31422_ACEOF 29995_ACEOF
31423 29996
31424cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 29997cat >>$CONFIG_STATUS <<\_ACEOF
31425# 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.
31426ac_need_defaults=: 30000ac_need_defaults=:
31427while test $# != 0 30001while test $# != 0
31428do 30002do
@@ -31444,36 +30018,30 @@ do
31444 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 30018 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
31445 ac_cs_recheck=: ;; 30019 ac_cs_recheck=: ;;
31446 --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) 30020 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
31447 $as_echo "$ac_cs_version"; exit ;; 30021 echo "$ac_cs_version"; exit ;;
31448 --debug | --debu | --deb | --de | --d | -d ) 30022 --debug | --debu | --deb | --de | --d | -d )
31449 debug=: ;; 30023 debug=: ;;
31450 --file | --fil | --fi | --f ) 30024 --file | --fil | --fi | --f )
31451 $ac_shift 30025 $ac_shift
31452 case $ac_optarg in 30026 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
31453 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31454 esac
31455 CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
31456 ac_need_defaults=false;; 30027 ac_need_defaults=false;;
31457 --header | --heade | --head | --hea ) 30028 --header | --heade | --head | --hea )
31458 $ac_shift 30029 $ac_shift
31459 case $ac_optarg in 30030 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
31460 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31461 esac
31462 CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
31463 ac_need_defaults=false;; 30031 ac_need_defaults=false;;
31464 --he | --h) 30032 --he | --h)
31465 # Conflict between --help and --header 30033 # Conflict between --help and --header
31466 { $as_echo "$as_me: error: ambiguous option: $1 30034 { echo "$as_me: error: ambiguous option: $1
31467Try \`$0 --help' for more information." >&2 30035Try \`$0 --help' for more information." >&2
31468 { (exit 1); exit 1; }; };; 30036 { (exit 1); exit 1; }; };;
31469 --help | --hel | -h ) 30037 --help | --hel | -h )
31470 $as_echo "$ac_cs_usage"; exit ;; 30038 echo "$ac_cs_usage"; exit ;;
31471 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 30039 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
31472 | -silent | --silent | --silen | --sile | --sil | --si | --s) 30040 | -silent | --silent | --silen | --sile | --sil | --si | --s)
31473 ac_cs_silent=: ;; 30041 ac_cs_silent=: ;;
31474 30042
31475 # This is an error. 30043 # This is an error.
31476 -*) { $as_echo "$as_me: error: unrecognized option: $1 30044 -*) { echo "$as_me: error: unrecognized option: $1
31477Try \`$0 --help' for more information." >&2 30045Try \`$0 --help' for more information." >&2
31478 { (exit 1); exit 1; }; } ;; 30046 { (exit 1); exit 1; }; } ;;
31479 30047
@@ -31492,32 +30060,30 @@ if $ac_cs_silent; then
31492fi 30060fi
31493 30061
31494_ACEOF 30062_ACEOF
31495cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 30063cat >>$CONFIG_STATUS <<_ACEOF
31496if \$ac_cs_recheck; then 30064if \$ac_cs_recheck; then
31497 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
31498 shift 30066 CONFIG_SHELL=$SHELL
31499 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
31500 CONFIG_SHELL='$SHELL'
31501 export CONFIG_SHELL 30067 export CONFIG_SHELL
31502 exec "\$@" 30068 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
31503fi 30069fi
31504 30070
31505_ACEOF 30071_ACEOF
31506cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 30072cat >>$CONFIG_STATUS <<\_ACEOF
31507exec 5>>config.log 30073exec 5>>config.log
31508{ 30074{
31509 echo 30075 echo
31510 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 30076 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
31511## Running $as_me. ## 30077## Running $as_me. ##
31512_ASBOX 30078_ASBOX
31513 $as_echo "$ac_log" 30079 echo "$ac_log"
31514} >&5 30080} >&5
31515 30081
31516_ACEOF 30082_ACEOF
31517cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 30083cat >>$CONFIG_STATUS <<_ACEOF
31518_ACEOF 30084_ACEOF
31519 30085
31520cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 30086cat >>$CONFIG_STATUS <<\_ACEOF
31521 30087
31522# Handling of arguments. 30088# Handling of arguments.
31523for ac_config_target in $ac_config_targets 30089for ac_config_target in $ac_config_targets
@@ -31530,12 +30096,11 @@ do
31530 "openssh.xml") CONFIG_FILES="$CONFIG_FILES openssh.xml" ;; 30096 "openssh.xml") CONFIG_FILES="$CONFIG_FILES openssh.xml" ;;
31531 "openbsd-compat/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/Makefile" ;; 30097 "openbsd-compat/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/Makefile" ;;
31532 "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" ;;
31533 "scard/Makefile") CONFIG_FILES="$CONFIG_FILES scard/Makefile" ;;
31534 "ssh_prng_cmds") CONFIG_FILES="$CONFIG_FILES ssh_prng_cmds" ;; 30099 "ssh_prng_cmds") CONFIG_FILES="$CONFIG_FILES ssh_prng_cmds" ;;
31535 "survey.sh") CONFIG_FILES="$CONFIG_FILES survey.sh" ;; 30100 "survey.sh") CONFIG_FILES="$CONFIG_FILES survey.sh" ;;
31536 30101
31537 *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 30102 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
31538$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} 30103echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
31539 { (exit 1); exit 1; }; };; 30104 { (exit 1); exit 1; }; };;
31540 esac 30105 esac
31541done 30106done
@@ -31575,143 +30140,216 @@ $debug ||
31575 (umask 077 && mkdir "$tmp") 30140 (umask 077 && mkdir "$tmp")
31576} || 30141} ||
31577{ 30142{
31578 $as_echo "$as_me: cannot create a temporary directory in ." >&2 30143 echo "$me: cannot create a temporary directory in ." >&2
31579 { (exit 1); exit 1; } 30144 { (exit 1); exit 1; }
31580} 30145}
31581 30146
31582# Set up the scripts for CONFIG_FILES section. 30147#
31583# No need to generate them if there are no CONFIG_FILES. 30148# Set up the sed scripts for CONFIG_FILES section.
31584# 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
31585if test -n "$CONFIG_FILES"; then 30153if test -n "$CONFIG_FILES"; then
31586 30154
30155_ACEOF
31587 30156
31588ac_cr=' ' 30157
31589ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` 30158
31590if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then 30159ac_delim='%!_!# '
31591 ac_cs_awk_cr='\\r' 30160for ac_last_try in false false false false false :; do
31592else 30161 cat >conf$$subs.sed <<_ACEOF
31593 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`
31594fi 30276fi
31595 30277
31596echo '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
31597_ACEOF 30294_ACEOF
31598 30295
31599 30296
31600{
31601 echo "cat >conf$$subs.awk <<_ACEOF" &&
31602 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
31603 echo "_ACEOF"
31604} >conf$$subs.sh ||
31605 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
31606$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
31607 { (exit 1); exit 1; }; }
31608ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
31609ac_delim='%!_!# ' 30297ac_delim='%!_!# '
31610for ac_last_try in false false false false false :; do 30298for ac_last_try in false false false false false :; do
31611 . ./conf$$subs.sh || 30299 cat >conf$$subs.sed <<_ACEOF
31612 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 30300KRB5CONF!$KRB5CONF$ac_delim
31613$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} 30301PRIVSEP_PATH!$PRIVSEP_PATH$ac_delim
31614 { (exit 1); exit 1; }; } 30302xauth_path!$xauth_path$ac_delim
31615 30303STRIP_OPT!$STRIP_OPT$ac_delim
31616 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
31617 break 30316 break
31618 elif $ac_last_try; then 30317 elif $ac_last_try; then
31619 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 30318 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
31620$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} 30319echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
31621 { (exit 1); exit 1; }; } 30320 { (exit 1); exit 1; }; }
31622 else 30321 else
31623 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 30322 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31624 fi 30323 fi
31625done 30324done
31626rm -f conf$$subs.sh
31627
31628cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31629cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
31630_ACEOF
31631sed -n '
31632h
31633s/^/S["/; s/!.*/"]=/
31634p
31635g
31636s/^[^!]*!//
31637:repl
31638t repl
31639s/'"$ac_delim"'$//
31640t delim
31641:nl
31642h
31643s/\(.\{148\}\).*/\1/
31644t more1
31645s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
31646p
31647n
31648b repl
31649:more1
31650s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31651p
31652g
31653s/.\{148\}//
31654t nl
31655:delim
31656h
31657s/\(.\{148\}\).*/\1/
31658t more2
31659s/["\\]/\\&/g; s/^/"/; s/$/"/
31660p
31661b
31662:more2
31663s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31664p
31665g
31666s/.\{148\}//
31667t delim
31668' <conf$$subs.awk | sed '
31669/^[^""]/{
31670 N
31671 s/\n//
31672}
31673' >>$CONFIG_STATUS || ac_write_fail=1
31674rm -f conf$$subs.awk
31675cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31676_ACAWK
31677cat >>"\$tmp/subs1.awk" <<_ACAWK &&
31678 for (key in S) S_is_set[key] = 1
31679 FS = ""
31680 30325
31681} 30326ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
31682{ 30327if test -n "$ac_eof"; then
31683 line = $ 0 30328 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
31684 nfields = split(line, field, "@") 30329 ac_eof=`expr $ac_eof + 1`
31685 substed = 0 30330fi
31686 len = length(field[1]) 30331
31687 for (i = 2; i < nfields; i++) { 30332cat >>$CONFIG_STATUS <<_ACEOF
31688 key = field[i] 30333cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
31689 keylen = length(key) 30334/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
31690 if (S_is_set[key]) { 30335_ACEOF
31691 value = S[key] 30336sed '
31692 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) 30337s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
31693 len += length(value) + length(field[++i]) 30338s/^/s,@/; s/!/@,|#_!!_#|/
31694 substed = 1 30339:n
31695 } else 30340t n
31696 len += 1 + keylen 30341s/'"$ac_delim"'$/,g/; t
31697 } 30342s/$/\\/; p
31698 30343N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
31699 print line 30344' >>$CONFIG_STATUS <conf$$subs.sed
31700} 30345rm -f conf$$subs.sed
31701 30346cat >>$CONFIG_STATUS <<_ACEOF
31702_ACAWK 30347:end
31703_ACEOF 30348s/|#_!!_#|//g
31704cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 30349CEOF$ac_eof
31705if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
31706 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
31707else
31708 cat
31709fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
31710 || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
31711$as_echo "$as_me: error: could not setup config files machinery" >&2;}
31712 { (exit 1); exit 1; }; }
31713_ACEOF 30350_ACEOF
31714 30351
30352
31715# VPATH may cause trouble with some makes, so we remove $(srcdir), 30353# VPATH may cause trouble with some makes, so we remove $(srcdir),
31716# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and 30354# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
31717# 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
@@ -31727,133 +30365,19 @@ s/^[^=]*=[ ]*$//
31727}' 30365}'
31728fi 30366fi
31729 30367
31730cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 30368cat >>$CONFIG_STATUS <<\_ACEOF
31731fi # test -n "$CONFIG_FILES" 30369fi # test -n "$CONFIG_FILES"
31732 30370
31733# Set up the scripts for CONFIG_HEADERS section.
31734# No need to generate them if there are no CONFIG_HEADERS.
31735# This happens for instance with `./config.status Makefile'.
31736if test -n "$CONFIG_HEADERS"; then
31737cat >"$tmp/defines.awk" <<\_ACAWK ||
31738BEGIN {
31739_ACEOF
31740
31741# Transform confdefs.h into an awk script `defines.awk', embedded as
31742# here-document in config.status, that substitutes the proper values into
31743# config.h.in to produce config.h.
31744
31745# Create a delimiter string that does not exist in confdefs.h, to ease
31746# handling of long lines.
31747ac_delim='%!_!# '
31748for ac_last_try in false false :; do
31749 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
31750 if test -z "$ac_t"; then
31751 break
31752 elif $ac_last_try; then
31753 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
31754$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
31755 { (exit 1); exit 1; }; }
31756 else
31757 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31758 fi
31759done
31760
31761# For the awk script, D is an array of macro values keyed by name,
31762# likewise P contains macro parameters if any. Preserve backslash
31763# newline sequences.
31764 30371
31765ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* 30372for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
31766sed -n '
31767s/.\{148\}/&'"$ac_delim"'/g
31768t rset
31769:rset
31770s/^[ ]*#[ ]*define[ ][ ]*/ /
31771t def
31772d
31773:def
31774s/\\$//
31775t bsnl
31776s/["\\]/\\&/g
31777s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
31778D["\1"]=" \3"/p
31779s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
31780d
31781:bsnl
31782s/["\\]/\\&/g
31783s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
31784D["\1"]=" \3\\\\\\n"\\/p
31785t cont
31786s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
31787t cont
31788d
31789:cont
31790n
31791s/.\{148\}/&'"$ac_delim"'/g
31792t clear
31793:clear
31794s/\\$//
31795t bsnlc
31796s/["\\]/\\&/g; s/^/"/; s/$/"/p
31797d
31798:bsnlc
31799s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
31800b cont
31801' <confdefs.h | sed '
31802s/'"$ac_delim"'/"\\\
31803"/g' >>$CONFIG_STATUS || ac_write_fail=1
31804
31805cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31806 for (key in D) D_is_set[key] = 1
31807 FS = ""
31808}
31809/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
31810 line = \$ 0
31811 split(line, arg, " ")
31812 if (arg[1] == "#") {
31813 defundef = arg[2]
31814 mac1 = arg[3]
31815 } else {
31816 defundef = substr(arg[1], 2)
31817 mac1 = arg[2]
31818 }
31819 split(mac1, mac2, "(") #)
31820 macro = mac2[1]
31821 if (D_is_set[macro]) {
31822 # Preserve the white space surrounding the "#".
31823 prefix = substr(line, 1, index(line, defundef) - 1)
31824 print prefix "define", macro P[macro] D[macro]
31825 next
31826 } else {
31827 # Replace #undef with comments. This is necessary, for example,
31828 # in the case of _POSIX_SOURCE, which is predefined and required
31829 # on some systems where configure will not decide to define it.
31830 if (defundef == "undef") {
31831 print "/*", line, "*/"
31832 next
31833 }
31834 }
31835}
31836{ print }
31837_ACAWK
31838_ACEOF
31839cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31840 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
31841$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
31842 { (exit 1); exit 1; }; }
31843fi # test -n "$CONFIG_HEADERS"
31844
31845
31846eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
31847shift
31848for ac_tag
31849do 30373do
31850 case $ac_tag in 30374 case $ac_tag in
31851 :[FHLC]) ac_mode=$ac_tag; continue;; 30375 :[FHLC]) ac_mode=$ac_tag; continue;;
31852 esac 30376 esac
31853 case $ac_mode$ac_tag in 30377 case $ac_mode$ac_tag in
31854 :[FHL]*:*);; 30378 :[FHL]*:*);;
31855 :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
31856$as_echo "$as_me: error: Invalid tag $ac_tag." >&2;} 30380echo "$as_me: error: Invalid tag $ac_tag." >&2;}
31857 { (exit 1); exit 1; }; };; 30381 { (exit 1); exit 1; }; };;
31858 :[FH]-) ac_tag=-:-;; 30382 :[FH]-) ac_tag=-:-;;
31859 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 30383 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
@@ -31882,38 +30406,26 @@ $as_echo "$as_me: error: Invalid tag $ac_tag." >&2;}
31882 [\\/$]*) false;; 30406 [\\/$]*) false;;
31883 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 30407 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
31884 esac || 30408 esac ||
31885 { { $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
31886$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} 30410echo "$as_me: error: cannot find input file: $ac_f" >&2;}
31887 { (exit 1); exit 1; }; };; 30411 { (exit 1); exit 1; }; };;
31888 esac 30412 esac
31889 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac 30413 ac_file_inputs="$ac_file_inputs $ac_f"
31890 ac_file_inputs="$ac_file_inputs '$ac_f'"
31891 done 30414 done
31892 30415
31893 # 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
31894 # use $as_me), people would be surprised to read: 30417 # use $as_me), people would be surprised to read:
31895 # /* config.h. Generated by config.status. */ 30418 # /* config.h. Generated by config.status. */
31896 configure_input='Generated from '` 30419 configure_input="Generated from "`IFS=:
31897 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' 30420 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
31898 `' by configure.'
31899 if test x"$ac_file" != x-; then 30421 if test x"$ac_file" != x-; then
31900 configure_input="$ac_file. $configure_input" 30422 configure_input="$ac_file. $configure_input"
31901 { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 30423 { echo "$as_me:$LINENO: creating $ac_file" >&5
31902$as_echo "$as_me: creating $ac_file" >&6;} 30424echo "$as_me: creating $ac_file" >&6;}
31903 fi 30425 fi
31904 # Neutralize special characters interpreted by sed in replacement strings.
31905 case $configure_input in #(
31906 *\&* | *\|* | *\\* )
31907 ac_sed_conf_input=`$as_echo "$configure_input" |
31908 sed 's/[\\\\&|]/\\\\&/g'`;; #(
31909 *) ac_sed_conf_input=$configure_input;;
31910 esac
31911 30426
31912 case $ac_tag in 30427 case $ac_tag in
31913 *:-:* | *:-) cat >"$tmp/stdin" \ 30428 *:-:* | *:-) cat >"$tmp/stdin";;
31914 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
31915$as_echo "$as_me: error: could not create $ac_file" >&2;}
31916 { (exit 1); exit 1; }; } ;;
31917 esac 30429 esac
31918 ;; 30430 ;;
31919 esac 30431 esac
@@ -31923,7 +30435,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31923 X"$ac_file" : 'X\(//\)[^/]' \| \ 30435 X"$ac_file" : 'X\(//\)[^/]' \| \
31924 X"$ac_file" : 'X\(//\)$' \| \ 30436 X"$ac_file" : 'X\(//\)$' \| \
31925 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || 30437 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
31926$as_echo X"$ac_file" | 30438echo X"$ac_file" |
31927 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 30439 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31928 s//\1/ 30440 s//\1/
31929 q 30441 q
@@ -31949,7 +30461,7 @@ $as_echo X"$ac_file" |
31949 as_dirs= 30461 as_dirs=
31950 while :; do 30462 while :; do
31951 case $as_dir in #( 30463 case $as_dir in #(
31952 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 30464 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
31953 *) as_qdir=$as_dir;; 30465 *) as_qdir=$as_dir;;
31954 esac 30466 esac
31955 as_dirs="'$as_qdir' $as_dirs" 30467 as_dirs="'$as_qdir' $as_dirs"
@@ -31958,7 +30470,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31958 X"$as_dir" : 'X\(//\)[^/]' \| \ 30470 X"$as_dir" : 'X\(//\)[^/]' \| \
31959 X"$as_dir" : 'X\(//\)$' \| \ 30471 X"$as_dir" : 'X\(//\)$' \| \
31960 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 30472 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
31961$as_echo X"$as_dir" | 30473echo X"$as_dir" |
31962 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 30474 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31963 s//\1/ 30475 s//\1/
31964 q 30476 q
@@ -31979,17 +30491,17 @@ $as_echo X"$as_dir" |
31979 test -d "$as_dir" && break 30491 test -d "$as_dir" && break
31980 done 30492 done
31981 test -z "$as_dirs" || eval "mkdir $as_dirs" 30493 test -z "$as_dirs" || eval "mkdir $as_dirs"
31982 } || 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
31983$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} 30495echo "$as_me: error: cannot create directory $as_dir" >&2;}
31984 { (exit 1); exit 1; }; }; } 30496 { (exit 1); exit 1; }; }; }
31985 ac_builddir=. 30497 ac_builddir=.
31986 30498
31987case "$ac_dir" in 30499case "$ac_dir" in
31988.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 30500.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
31989*) 30501*)
31990 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 30502 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
31991 # A ".." for each directory in $ac_dir_suffix. 30503 # A ".." for each directory in $ac_dir_suffix.
31992 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,/,,'`
31993 case $ac_top_builddir_sub in 30505 case $ac_top_builddir_sub in
31994 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 30506 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
31995 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 30507 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -32029,13 +30541,12 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32029 esac 30541 esac
32030_ACEOF 30542_ACEOF
32031 30543
32032cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 30544cat >>$CONFIG_STATUS <<\_ACEOF
32033# If the template does not know about datarootdir, expand it. 30545# If the template does not know about datarootdir, expand it.
32034# 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.
32035ac_datarootdir_hack=; ac_datarootdir_seen= 30547ac_datarootdir_hack=; ac_datarootdir_seen=
32036 30548
32037ac_sed_dataroot=' 30549case `sed -n '/datarootdir/ {
32038/datarootdir/ {
32039 p 30550 p
32040 q 30551 q
32041} 30552}
@@ -32044,14 +30555,13 @@ ac_sed_dataroot='
32044/@infodir@/p 30555/@infodir@/p
32045/@localedir@/p 30556/@localedir@/p
32046/@mandir@/p 30557/@mandir@/p
32047' 30558' $ac_file_inputs` in
32048case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32049*datarootdir*) ac_datarootdir_seen=yes;; 30559*datarootdir*) ac_datarootdir_seen=yes;;
32050*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) 30560*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32051 { $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
32052$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;}
32053_ACEOF 30563_ACEOF
32054cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 30564cat >>$CONFIG_STATUS <<_ACEOF
32055 ac_datarootdir_hack=' 30565 ac_datarootdir_hack='
32056 s&@datadir@&$datadir&g 30566 s&@datadir@&$datadir&g
32057 s&@docdir@&$docdir&g 30567 s&@docdir@&$docdir&g
@@ -32065,16 +30575,15 @@ _ACEOF
32065# Neutralize VPATH when `$srcdir' = `.'. 30575# Neutralize VPATH when `$srcdir' = `.'.
32066# Shell code in configure.ac might set extrasub. 30576# Shell code in configure.ac might set extrasub.
32067# FIXME: do we really want to maintain this feature? 30577# FIXME: do we really want to maintain this feature?
32068cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 30578cat >>$CONFIG_STATUS <<_ACEOF
32069ac_sed_extra="$ac_vpsub 30579 sed "$ac_vpsub
32070$extrasub 30580$extrasub
32071_ACEOF 30581_ACEOF
32072cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 30582cat >>$CONFIG_STATUS <<\_ACEOF
32073:t 30583:t
32074/@[a-zA-Z_][a-zA-Z_0-9]*@/!b 30584/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32075s|@configure_input@|$ac_sed_conf_input|;t t 30585s&@configure_input@&$configure_input&;t t
32076s&@top_builddir@&$ac_top_builddir_sub&;t t 30586s&@top_builddir@&$ac_top_builddir_sub&;t t
32077s&@top_build_prefix@&$ac_top_build_prefix&;t t
32078s&@srcdir@&$ac_srcdir&;t t 30587s&@srcdir@&$ac_srcdir&;t t
32079s&@abs_srcdir@&$ac_abs_srcdir&;t t 30588s&@abs_srcdir@&$ac_abs_srcdir&;t t
32080s&@top_srcdir@&$ac_top_srcdir&;t t 30589s&@top_srcdir@&$ac_top_srcdir&;t t
@@ -32084,58 +30593,119 @@ s&@abs_builddir@&$ac_abs_builddir&;t t
32084s&@abs_top_builddir@&$ac_abs_top_builddir&;t t 30593s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32085s&@INSTALL@&$ac_INSTALL&;t t 30594s&@INSTALL@&$ac_INSTALL&;t t
32086$ac_datarootdir_hack 30595$ac_datarootdir_hack
32087" 30596" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
32088eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
32089 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
32090$as_echo "$as_me: error: could not create $ac_file" >&2;}
32091 { (exit 1); exit 1; }; }
32092 30597
32093test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && 30598test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32094 { 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"; } &&
32095 { 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"; } &&
32096 { $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'
32097which seems to be undefined. Please make sure it is defined." >&5 30602which seems to be undefined. Please make sure it is defined." >&5
32098$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'
32099which seems to be undefined. Please make sure it is defined." >&2;} 30604which seems to be undefined. Please make sure it is defined." >&2;}
32100 30605
32101 rm -f "$tmp/stdin" 30606 rm -f "$tmp/stdin"
32102 case $ac_file in 30607 case $ac_file in
32103 -) cat "$tmp/out" && rm -f "$tmp/out";; 30608 -) cat "$tmp/out"; rm -f "$tmp/out";;
32104 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; 30609 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
32105 esac \ 30610 esac
32106 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
32107$as_echo "$as_me: error: could not create $ac_file" >&2;}
32108 { (exit 1); exit 1; }; }
32109 ;; 30611 ;;
32110 :H) 30612 :H)
32111 # 30613 #
32112 # CONFIG_HEADER 30614 # CONFIG_HEADER
32113 # 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
32114 if test x"$ac_file" != x-; then 30694 if test x"$ac_file" != x-; then
32115 { 30695 echo "/* $configure_input */" >"$tmp/config.h"
32116 $as_echo "/* $configure_input */" \ 30696 cat "$ac_result" >>"$tmp/config.h"
32117 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" 30697 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
32118 } >"$tmp/config.h" \ 30698 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
32119 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 30699echo "$as_me: $ac_file is unchanged" >&6;}
32120$as_echo "$as_me: error: could not create $ac_file" >&2;}
32121 { (exit 1); exit 1; }; }
32122 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
32123 { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
32124$as_echo "$as_me: $ac_file is unchanged" >&6;}
32125 else 30700 else
32126 rm -f "$ac_file" 30701 rm -f $ac_file
32127 mv "$tmp/config.h" "$ac_file" \ 30702 mv "$tmp/config.h" $ac_file
32128 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
32129$as_echo "$as_me: error: could not create $ac_file" >&2;}
32130 { (exit 1); exit 1; }; }
32131 fi 30703 fi
32132 else 30704 else
32133 $as_echo "/* $configure_input */" \ 30705 echo "/* $configure_input */"
32134 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ 30706 cat "$ac_result"
32135 || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
32136$as_echo "$as_me: error: could not create -" >&2;}
32137 { (exit 1); exit 1; }; }
32138 fi 30707 fi
30708 rm -f "$tmp/out12"
32139 ;; 30709 ;;
32140 30710
32141 30711
@@ -32149,11 +30719,6 @@ _ACEOF
32149chmod +x $CONFIG_STATUS 30719chmod +x $CONFIG_STATUS
32150ac_clean_files=$ac_clean_files_save 30720ac_clean_files=$ac_clean_files_save
32151 30721
32152test $ac_write_fail = 0 ||
32153 { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
32154$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
32155 { (exit 1); exit 1; }; }
32156
32157 30722
32158# configure is writing to config.log, and then calls config.status. 30723# configure is writing to config.log, and then calls config.status.
32159# config.status does its own redirection, appending to config.log. 30724# config.status does its own redirection, appending to config.log.
@@ -32175,10 +30740,6 @@ if test "$no_create" != yes; then
32175 # would make configure fail if this is the last instruction. 30740 # would make configure fail if this is the last instruction.
32176 $ac_cs_success || { (exit 1); exit 1; } 30741 $ac_cs_success || { (exit 1); exit 1; }
32177fi 30742fi
32178if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
32179 { $as_echo "$as_me:$LINENO: WARNING: Unrecognized options: $ac_unrecognized_opts" >&5
32180$as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2;}
32181fi
32182 30743
32183 30744
32184# Print summary of options 30745# Print summary of options
diff --git a/configure.ac b/configure.ac
index 2f1dfbaff..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.*)
@@ -767,9 +768,11 @@ mips-sony-bsd|mips-sony-newsos4)
767 ;; 768 ;;
768# UnixWare 7.x, OpenUNIX 8 769# UnixWare 7.x, OpenUNIX 8
769*-*-sysv5*) 770*-*-sysv5*)
771 CPPFLAGS="$CPPFLAGS -Dvsnprintf=_xvsnprintf -Dsnprintf=_xsnprintf"
770 AC_DEFINE(UNIXWARE_LONG_PASSWORDS, 1, [Support passwords > 8 chars]) 772 AC_DEFINE(UNIXWARE_LONG_PASSWORDS, 1, [Support passwords > 8 chars])
771 AC_DEFINE(USE_PIPES) 773 AC_DEFINE(USE_PIPES)
772 AC_DEFINE(SETEUID_BREAKS_SETUID) 774 AC_DEFINE(SETEUID_BREAKS_SETUID)
775 AC_DEFINE(BROKEN_GETADDRINFO)
773 AC_DEFINE(BROKEN_SETREUID) 776 AC_DEFINE(BROKEN_SETREUID)
774 AC_DEFINE(BROKEN_SETREGID) 777 AC_DEFINE(BROKEN_SETREGID)
775 AC_DEFINE(PASSWD_NEEDS_USERNAME) 778 AC_DEFINE(PASSWD_NEEDS_USERNAME)
@@ -808,6 +811,7 @@ mips-sony-bsd|mips-sony-newsos4)
808 AC_DEFINE(DISABLE_SHADOW) 811 AC_DEFINE(DISABLE_SHADOW)
809 AC_DEFINE(DISABLE_FD_PASSING) 812 AC_DEFINE(DISABLE_FD_PASSING)
810 AC_DEFINE(SETEUID_BREAKS_SETUID) 813 AC_DEFINE(SETEUID_BREAKS_SETUID)
814 AC_DEFINE(BROKEN_GETADDRINFO)
811 AC_DEFINE(BROKEN_SETREUID) 815 AC_DEFINE(BROKEN_SETREUID)
812 AC_DEFINE(BROKEN_SETREGID) 816 AC_DEFINE(BROKEN_SETREGID)
813 AC_DEFINE(WITH_ABBREV_NO_TTY) 817 AC_DEFINE(WITH_ABBREV_NO_TTY)
@@ -1374,6 +1378,7 @@ AC_CHECK_FUNCS( \
1374 getrlimit \ 1378 getrlimit \
1375 getttyent \ 1379 getttyent \
1376 glob \ 1380 glob \
1381 group_from_gid \
1377 inet_aton \ 1382 inet_aton \
1378 inet_ntoa \ 1383 inet_ntoa \
1379 inet_ntop \ 1384 inet_ntop \
@@ -1400,8 +1405,10 @@ AC_CHECK_FUNCS( \
1400 setegid \ 1405 setegid \
1401 setenv \ 1406 setenv \
1402 seteuid \ 1407 seteuid \
1408 setgroupent \
1403 setgroups \ 1409 setgroups \
1404 setlogin \ 1410 setlogin \
1411 setpassent\
1405 setpcred \ 1412 setpcred \
1406 setproctitle \ 1413 setproctitle \
1407 setregid \ 1414 setregid \
@@ -1430,12 +1437,18 @@ AC_CHECK_FUNCS( \
1430 truncate \ 1437 truncate \
1431 unsetenv \ 1438 unsetenv \
1432 updwtmpx \ 1439 updwtmpx \
1440 user_from_uid \
1433 vasprintf \ 1441 vasprintf \
1434 vhangup \ 1442 vhangup \
1435 vsnprintf \ 1443 vsnprintf \
1436 waitpid \ 1444 waitpid \
1437) 1445)
1438 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
1439# IRIX has a const char return value for gai_strerror() 1452# IRIX has a const char return value for gai_strerror()
1440AC_CHECK_FUNCS(gai_strerror,[ 1453AC_CHECK_FUNCS(gai_strerror,[
1441 AC_DEFINE(HAVE_GAI_STRERROR) 1454 AC_DEFINE(HAVE_GAI_STRERROR)
@@ -3279,66 +3292,6 @@ if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
3279 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])
3280fi 3293fi
3281 3294
3282SCARD_MSG="no"
3283# Check whether user wants sectok support
3284AC_ARG_WITH(sectok,
3285 [ --with-sectok Enable smartcard support using libsectok],
3286 [
3287 if test "x$withval" != "xno" ; then
3288 if test "x$withval" != "xyes" ; then
3289 CPPFLAGS="$CPPFLAGS -I${withval}"
3290 LDFLAGS="$LDFLAGS -L${withval}"
3291 if test ! -z "$need_dash_r" ; then
3292 LDFLAGS="$LDFLAGS -R${withval}"
3293 fi
3294 if test ! -z "$blibpath" ; then
3295 blibpath="$blibpath:${withval}"
3296 fi
3297 fi
3298 AC_CHECK_HEADERS(sectok.h)
3299 if test "$ac_cv_header_sectok_h" != yes; then
3300 AC_MSG_ERROR(Can't find sectok.h)
3301 fi
3302 AC_CHECK_LIB(sectok, sectok_open)
3303 if test "$ac_cv_lib_sectok_sectok_open" != yes; then
3304 AC_MSG_ERROR(Can't find libsectok)
3305 fi
3306 AC_DEFINE(SMARTCARD, 1,
3307 [Define if you want smartcard support])
3308 AC_DEFINE(USE_SECTOK, 1,
3309 [Define if you want smartcard support
3310 using sectok])
3311 SCARD_MSG="yes, using sectok"
3312 fi
3313 ]
3314)
3315
3316# Check whether user wants OpenSC support
3317OPENSC_CONFIG="no"
3318AC_ARG_WITH(opensc,
3319 [ --with-opensc[[=PFX]] Enable smartcard support using OpenSC (optionally in PATH)],
3320 [
3321 if test "x$withval" != "xno" ; then
3322 if test "x$withval" != "xyes" ; then
3323 OPENSC_CONFIG=$withval/bin/opensc-config
3324 else
3325 AC_PATH_PROG(OPENSC_CONFIG, opensc-config, no)
3326 fi
3327 if test "$OPENSC_CONFIG" != "no"; then
3328 LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags`
3329 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs`
3330 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
3331 LIBS="$LIBS $LIBOPENSC_LIBS"
3332 AC_DEFINE(SMARTCARD)
3333 AC_DEFINE(USE_OPENSC, 1,
3334 [Define if you want smartcard support
3335 using OpenSC])
3336 SCARD_MSG="yes, using OpenSC"
3337 fi
3338 fi
3339 ]
3340)
3341
3342# Check libraries needed by DNS fingerprint support 3295# Check libraries needed by DNS fingerprint support
3343AC_SEARCH_LIBS(getrrsetbyname, resolv, 3296AC_SEARCH_LIBS(getrrsetbyname, resolv,
3344 [AC_DEFINE(HAVE_GETRRSETBYNAME, 1, 3297 [AC_DEFINE(HAVE_GETRRSETBYNAME, 1,
@@ -3422,9 +3375,12 @@ AC_ARG_WITH(selinux,
3422 AC_DEFINE(WITH_SELINUX,1,[Define if you want SELinux support.]) 3375 AC_DEFINE(WITH_SELINUX,1,[Define if you want SELinux support.])
3423 SELINUX_MSG="yes" 3376 SELINUX_MSG="yes"
3424 AC_CHECK_HEADER([selinux/selinux.h], , 3377 AC_CHECK_HEADER([selinux/selinux.h], ,
3425 AC_MSG_ERROR(SELinux support requires selinux.h header)) 3378 AC_MSG_ERROR(SELinux support requires selinux.h header))
3426 AC_CHECK_LIB(selinux, setexeccon, [ LIBSELINUX="-lselinux" ], 3379 AC_CHECK_LIB(selinux, setexeccon,
3427 AC_MSG_ERROR(SELinux support requires libselinux library)) 3380 [ LIBSELINUX="-lselinux"
3381 LIBS="$LIBS -lselinux"
3382 ],
3383 AC_MSG_ERROR(SELinux support requires libselinux library))
3428 SSHDLIBS="$SSHDLIBS $LIBSELINUX" 3384 SSHDLIBS="$SSHDLIBS $LIBSELINUX"
3429 AC_CHECK_FUNCS(getseuserbyname get_default_context_with_level) 3385 AC_CHECK_FUNCS(getseuserbyname get_default_context_with_level)
3430 LIBS="$save_LIBS" 3386 LIBS="$save_LIBS"
@@ -4206,7 +4162,7 @@ fi
4206AC_EXEEXT 4162AC_EXEEXT
4207AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openssh.xml \ 4163AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openssh.xml \
4208 openbsd-compat/Makefile openbsd-compat/regress/Makefile \ 4164 openbsd-compat/Makefile openbsd-compat/regress/Makefile \
4209 scard/Makefile ssh_prng_cmds survey.sh]) 4165 ssh_prng_cmds survey.sh])
4210AC_OUTPUT 4166AC_OUTPUT
4211 4167
4212# 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 901176dbb..9d97c30c0 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/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 fd287d8c0..454767587 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>
@@ -1014,17 +1014,6 @@ mm_answer_pam_free_ctx(int sock, Buffer *m)
1014} 1014}
1015#endif 1015#endif
1016 1016
1017static void
1018mm_append_debug(Buffer *m)
1019{
1020 if (auth_debug_init && buffer_len(&auth_debug)) {
1021 debug3("%s: Appending debug messages for child", __func__);
1022 buffer_append(m, buffer_ptr(&auth_debug),
1023 buffer_len(&auth_debug));
1024 buffer_clear(&auth_debug);
1025 }
1026}
1027
1028int 1017int
1029mm_answer_keyallowed(int sock, Buffer *m) 1018mm_answer_keyallowed(int sock, Buffer *m)
1030{ 1019{
@@ -1107,8 +1096,6 @@ mm_answer_keyallowed(int sock, Buffer *m)
1107 buffer_put_int(m, allowed); 1096 buffer_put_int(m, allowed);
1108 buffer_put_int(m, forced_command != NULL); 1097 buffer_put_int(m, forced_command != NULL);
1109 1098
1110 mm_append_debug(m);
1111
1112 mm_request_send(sock, MONITOR_ANS_KEYALLOWED, m); 1099 mm_request_send(sock, MONITOR_ANS_KEYALLOWED, m);
1113 1100
1114 if (type == MM_RSAHOSTKEY) 1101 if (type == MM_RSAHOSTKEY)
@@ -1492,8 +1479,6 @@ mm_answer_rsa_keyallowed(int sock, Buffer *m)
1492 if (key != NULL) 1479 if (key != NULL)
1493 key_free(key); 1480 key_free(key);
1494 1481
1495 mm_append_debug(m);
1496
1497 mm_request_send(sock, MONITOR_ANS_RSAKEYALLOWED, m); 1482 mm_request_send(sock, MONITOR_ANS_RSAKEYALLOWED, m);
1498 1483
1499 monitor_permit(mon_dispatch, MONITOR_REQ_RSACHALLENGE, allowed); 1484 monitor_permit(mon_dispatch, MONITOR_REQ_RSACHALLENGE, allowed);
@@ -1745,7 +1730,8 @@ mm_get_kex(Buffer *m)
1745 kex->flags = buffer_get_int(m); 1730 kex->flags = buffer_get_int(m);
1746 kex->client_version_string = buffer_get_string(m, NULL); 1731 kex->client_version_string = buffer_get_string(m, NULL);
1747 kex->server_version_string = buffer_get_string(m, NULL); 1732 kex->server_version_string = buffer_get_string(m, NULL);
1748 kex->load_host_key=&get_hostkey_by_type; 1733 kex->load_host_public_key=&get_hostkey_public_by_type;
1734 kex->load_host_private_key=&get_hostkey_private_by_type;
1749 kex->host_key_index=&get_hostkey_index; 1735 kex->host_key_index=&get_hostkey_index;
1750 1736
1751 return (kex); 1737 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 a737fce7a..a01500c81 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>
@@ -347,19 +347,6 @@ mm_auth_rhosts_rsa_key_allowed(struct passwd *pw, char *user,
347 return (ret); 347 return (ret);
348} 348}
349 349
350static void
351mm_send_debug(Buffer *m)
352{
353 char *msg;
354
355 while (buffer_len(m)) {
356 msg = buffer_get_string(m, NULL);
357 debug3("%s: Sending debug: %s", __func__, msg);
358 packet_send_debug("%s", msg);
359 xfree(msg);
360 }
361}
362
363int 350int
364mm_key_allowed(enum mm_keytype type, char *user, char *host, Key *key) 351mm_key_allowed(enum mm_keytype type, char *user, char *host, Key *key)
365{ 352{
@@ -393,9 +380,6 @@ mm_key_allowed(enum mm_keytype type, char *user, char *host, Key *key)
393 have_forced = buffer_get_int(&m); 380 have_forced = buffer_get_int(&m);
394 forced_command = have_forced ? xstrdup("true") : NULL; 381 forced_command = have_forced ? xstrdup("true") : NULL;
395 382
396 /* Send potential debug messages */
397 mm_send_debug(&m);
398
399 buffer_free(&m); 383 buffer_free(&m);
400 384
401 return (allowed); 385 return (allowed);
@@ -1085,7 +1069,6 @@ mm_auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
1085 *rkey = key; 1069 *rkey = key;
1086 xfree(blob); 1070 xfree(blob);
1087 } 1071 }
1088 mm_send_debug(&m);
1089 buffer_free(&m); 1072 buffer_free(&m);
1090 1073
1091 return (allowed); 1074 return (allowed);
diff --git a/mux.c b/mux.c
index 79f83768b..825fb7a9a 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 ad262758e..89b9a7340 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>
@@ -23,14 +23,17 @@
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>
30#include <stdio.h>
29 31
30#ifdef WITH_SELINUX
31#include "log.h" 32#include "log.h"
33#include "xmalloc.h"
32#include "port-linux.h" 34#include "port-linux.h"
33 35
36#ifdef WITH_SELINUX
34#include <selinux/selinux.h> 37#include <selinux/selinux.h>
35#include <selinux/flask.h> 38#include <selinux/flask.h>
36#include <selinux/get_context_list.h> 39#include <selinux/get_context_list.h>
@@ -168,4 +171,95 @@ ssh_selinux_setup_pty(char *pwname, const char *tty)
168 freecon(user_ctx); 171 freecon(user_ctx);
169 debug3("%s: done", __func__); 172 debug3("%s: done", __func__);
170} 173}
174
175void
176ssh_selinux_change_context(const char *newname)
177{
178 int len, newlen;
179 char *oldctx, *newctx, *cx;
180
181 if (!ssh_selinux_enabled())
182 return;
183
184 if (getcon((security_context_t *)&oldctx) < 0) {
185 logit("%s: getcon failed with %s", __func__, strerror (errno));
186 return;
187 }
188 if ((cx = index(oldctx, ':')) == NULL || (cx = index(cx + 1, ':')) ==
189 NULL) {
190 logit ("%s: unparseable context %s", __func__, oldctx);
191 return;
192 }
193
194 newlen = strlen(oldctx) + strlen(newname) + 1;
195 newctx = xmalloc(newlen);
196 len = cx - oldctx + 1;
197 memcpy(newctx, oldctx, len);
198 strlcpy(newctx + len, newname, newlen - len);
199 if ((cx = index(cx + 1, ':')))
200 strlcat(newctx, cx, newlen);
201 debug3("%s: setting context from '%s' to '%s'", __func__, oldctx,
202 newctx);
203 if (setcon(newctx) < 0)
204 logit("%s: setcon failed with %s", __func__, strerror (errno));
205 xfree(oldctx);
206 xfree(newctx);
207}
171#endif /* WITH_SELINUX */ 208#endif /* WITH_SELINUX */
209
210#ifdef LINUX_OOM_ADJUST
211#define OOM_ADJ_PATH "/proc/self/oom_adj"
212/*
213 * The magic "don't kill me", as documented in eg:
214 * http://lxr.linux.no/#linux+v2.6.32/Documentation/filesystems/proc.txt
215 */
216#define OOM_ADJ_NOKILL -17
217
218static int oom_adj_save = INT_MIN;
219
220/*
221 * Tell the kernel's out-of-memory killer to avoid sshd.
222 * Returns the previous oom_adj value or zero.
223 */
224void
225oom_adjust_setup(void)
226{
227 FILE *fp;
228
229 debug3("%s", __func__);
230 if ((fp = fopen(OOM_ADJ_PATH, "r+")) != NULL) {
231 if (fscanf(fp, "%d", &oom_adj_save) != 1)
232 verbose("error reading %s: %s", OOM_ADJ_PATH, strerror(errno));
233 else {
234 rewind(fp);
235 if (fprintf(fp, "%d\n", OOM_ADJ_NOKILL) <= 0)
236 verbose("error writing %s: %s",
237 OOM_ADJ_PATH, strerror(errno));
238 else
239 verbose("Set %s from %d to %d",
240 OOM_ADJ_PATH, oom_adj_save, OOM_ADJ_NOKILL);
241 }
242 fclose(fp);
243 }
244}
245
246/* Restore the saved OOM adjustment */
247void
248oom_adjust_restore(void)
249{
250 FILE *fp;
251
252 debug3("%s", __func__);
253 if (oom_adj_save == INT_MIN || (fp = fopen(OOM_ADJ_PATH, "w")) == NULL)
254 return;
255
256 if (fprintf(fp, "%d\n", oom_adj_save) <= 0)
257 verbose("error writing %s: %s", OOM_ADJ_PATH, strerror(errno));
258 else
259 verbose("Set %s to %d", OOM_ADJ_PATH, oom_adj_save);
260
261 fclose(fp);
262 return;
263}
264#endif /* LINUX_OOM_ADJUST */
265#endif /* WITH_SELINUX || LINUX_OOM_ADJUST */
diff --git a/openbsd-compat/port-linux.h b/openbsd-compat/port-linux.h
index 5cd39bf83..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,6 +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 *);
27#endif
28
29#ifdef LINUX_OOM_ADJUST
30void oom_adjust_restore(void);
31void oom_adjust_setup(void);
26#endif 32#endif
27 33
28#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 80c5d9cbb..9e50950fe 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>
@@ -125,6 +125,11 @@
125#define _PATH_SSH_KEY_SIGN "/usr/libexec/ssh-keysign" 125#define _PATH_SSH_KEY_SIGN "/usr/libexec/ssh-keysign"
126#endif 126#endif
127 127
128/* Location of ssh-pkcs11-helper to support keys in tokens */
129#ifndef _PATH_SSH_PKCS11_HELPER
130#define _PATH_SSH_PKCS11_HELPER "/usr/libexec/ssh-pkcs11-helper"
131#endif
132
128/* xauth for X11 forwarding */ 133/* xauth for X11 forwarding */
129#ifndef _PATH_XAUTH 134#ifndef _PATH_XAUTH
130#define _PATH_XAUTH "/usr/X11R6/bin/xauth" 135#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 b6abeed06..9d1ee55fa 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
@@ -123,7 +123,7 @@ typedef enum {
123 oGlobalKnownHostsFile2, oUserKnownHostsFile2, oPubkeyAuthentication, 123 oGlobalKnownHostsFile2, oUserKnownHostsFile2, oPubkeyAuthentication,
124 oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias, 124 oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias,
125 oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication, 125 oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication,
126 oHostKeyAlgorithms, oBindAddress, oSmartcardDevice, 126 oHostKeyAlgorithms, oBindAddress, oPKCS11Provider,
127 oClearAllForwardings, oNoHostAuthenticationForLocalhost, 127 oClearAllForwardings, oNoHostAuthenticationForLocalhost,
128 oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout, 128 oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,
129 oAddressFamily, oGssAuthentication, oGssDelegateCreds, 129 oAddressFamily, oGssAuthentication, oGssDelegateCreds,
@@ -214,10 +214,12 @@ static struct {
214 { "preferredauthentications", oPreferredAuthentications }, 214 { "preferredauthentications", oPreferredAuthentications },
215 { "hostkeyalgorithms", oHostKeyAlgorithms }, 215 { "hostkeyalgorithms", oHostKeyAlgorithms },
216 { "bindaddress", oBindAddress }, 216 { "bindaddress", oBindAddress },
217#ifdef SMARTCARD 217#ifdef ENABLE_PKCS11
218 { "smartcarddevice", oSmartcardDevice }, 218 { "smartcarddevice", oPKCS11Provider },
219 { "pkcs11provider", oPKCS11Provider },
219#else 220#else
220 { "smartcarddevice", oUnsupported }, 221 { "smartcarddevice", oUnsupported },
222 { "pkcs11provider", oUnsupported },
221#endif 223#endif
222 { "clearallforwardings", oClearAllForwardings }, 224 { "clearallforwardings", oClearAllForwardings },
223 { "enablesshkeysign", oEnableSSHKeysign }, 225 { "enablesshkeysign", oEnableSSHKeysign },
@@ -634,8 +636,8 @@ parse_string:
634 charptr = &options->bind_address; 636 charptr = &options->bind_address;
635 goto parse_string; 637 goto parse_string;
636 638
637 case oSmartcardDevice: 639 case oPKCS11Provider:
638 charptr = &options->smartcard_device; 640 charptr = &options->pkcs11_provider;
639 goto parse_string; 641 goto parse_string;
640 642
641 case oProxyCommand: 643 case oProxyCommand:
@@ -1080,7 +1082,7 @@ initialize_options(Options * options)
1080 options->log_level = SYSLOG_LEVEL_NOT_SET; 1082 options->log_level = SYSLOG_LEVEL_NOT_SET;
1081 options->preferred_authentications = NULL; 1083 options->preferred_authentications = NULL;
1082 options->bind_address = NULL; 1084 options->bind_address = NULL;
1083 options->smartcard_device = NULL; 1085 options->pkcs11_provider = NULL;
1084 options->enable_ssh_keysign = - 1; 1086 options->enable_ssh_keysign = - 1;
1085 options->no_host_authentication_for_localhost = - 1; 1087 options->no_host_authentication_for_localhost = - 1;
1086 options->identities_only = - 1; 1088 options->identities_only = - 1;
@@ -1177,7 +1179,7 @@ fill_default_options(Options * options)
1177 /* options->macs, default set in myproposals.h */ 1179 /* options->macs, default set in myproposals.h */
1178 /* options->hostkeyalgorithms, default set in myproposals.h */ 1180 /* options->hostkeyalgorithms, default set in myproposals.h */
1179 if (options->protocol == SSH_PROTO_UNKNOWN) 1181 if (options->protocol == SSH_PROTO_UNKNOWN)
1180 options->protocol = SSH_PROTO_1|SSH_PROTO_2; 1182 options->protocol = SSH_PROTO_2;
1181 if (options->num_identity_files == 0) { 1183 if (options->num_identity_files == 0) {
1182 if (options->protocol & SSH_PROTO_1) { 1184 if (options->protocol & SSH_PROTO_1) {
1183 len = 2 + strlen(_PATH_SSH_CLIENT_IDENTITY) + 1; 1185 len = 2 + strlen(_PATH_SSH_CLIENT_IDENTITY) + 1;
diff --git a/readconf.h b/readconf.h
index c3de71f3e..fd31bd40f 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>
@@ -88,7 +88,7 @@ typedef struct {
88 char *user_hostfile2; 88 char *user_hostfile2;
89 char *preferred_authentications; 89 char *preferred_authentications;
90 char *bind_address; /* local socket address for connection to sshd */ 90 char *bind_address; /* local socket address for connection to sshd */
91 char *smartcard_device; /* Smartcard reader device */ 91 char *pkcs11_provider; /* PKCS#11 provider */
92 int verify_host_key_dns; /* Verify host key using DNS */ 92 int verify_host_key_dns; /* Verify host key using DNS */
93 93
94 int num_identity_files; /* Number of files for RSA/DSA identities. */ 94 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 323747806..09efb82ac 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).
@@ -244,8 +244,11 @@ do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout)
244 close(pout[1]); 244 close(pout[1]);
245 245
246 replacearg(&args, 0, "%s", ssh_program); 246 replacearg(&args, 0, "%s", ssh_program);
247 if (remuser != NULL) 247 if (remuser != NULL) {
248 addargs(&args, "-l%s", remuser); 248 addargs(&args, "-l");
249 addargs(&args, "%s", remuser);
250 }
251 addargs(&args, "--");
249 addargs(&args, "%s", host); 252 addargs(&args, "%s", host);
250 addargs(&args, "%s", cmd); 253 addargs(&args, "%s", cmd);
251 254
@@ -337,10 +340,12 @@ main(int argc, char **argv)
337 case 'c': 340 case 'c':
338 case 'i': 341 case 'i':
339 case 'F': 342 case 'F':
340 addargs(&args, "-%c%s", ch, optarg); 343 addargs(&args, "-%c", ch);
344 addargs(&args, "%s", optarg);
341 break; 345 break;
342 case 'P': 346 case 'P':
343 addargs(&args, "-p%s", optarg); 347 addargs(&args, "-p");
348 addargs(&args, "%s", optarg);
344 break; 349 break;
345 case 'B': 350 case 'B':
346 addargs(&args, "-oBatchmode yes"); 351 addargs(&args, "-oBatchmode yes");
@@ -548,6 +553,7 @@ toremote(char *targ, int argc, char **argv)
548 } else { 553 } else {
549 host = cleanhostname(argv[i]); 554 host = cleanhostname(argv[i]);
550 } 555 }
556 addargs(&alist, "--");
551 addargs(&alist, "%s", host); 557 addargs(&alist, "%s", host);
552 addargs(&alist, "%s", cmd); 558 addargs(&alist, "%s", cmd);
553 addargs(&alist, "%s", src); 559 addargs(&alist, "%s", src);
@@ -558,7 +564,7 @@ toremote(char *targ, int argc, char **argv)
558 errs = 1; 564 errs = 1;
559 } else { /* local to remote */ 565 } else { /* local to remote */
560 if (remin == -1) { 566 if (remin == -1) {
561 xasprintf(&bp, "%s -t %s", cmd, targ); 567 xasprintf(&bp, "%s -t -- %s", cmd, targ);
562 host = cleanhostname(thost); 568 host = cleanhostname(thost);
563 if (do_cmd(host, tuser, bp, &remin, 569 if (do_cmd(host, tuser, bp, &remin,
564 &remout) < 0) 570 &remout) < 0)
@@ -591,6 +597,7 @@ tolocal(int argc, char **argv)
591 addargs(&alist, "-r"); 597 addargs(&alist, "-r");
592 if (pflag) 598 if (pflag)
593 addargs(&alist, "-p"); 599 addargs(&alist, "-p");
600 addargs(&alist, "--");
594 addargs(&alist, "%s", argv[i]); 601 addargs(&alist, "%s", argv[i]);
595 addargs(&alist, "%s", argv[argc-1]); 602 addargs(&alist, "%s", argv[argc-1]);
596 if (do_local_cmd(&alist)) 603 if (do_local_cmd(&alist))
@@ -610,7 +617,7 @@ tolocal(int argc, char **argv)
610 suser = pwd->pw_name; 617 suser = pwd->pw_name;
611 } 618 }
612 host = cleanhostname(host); 619 host = cleanhostname(host);
613 xasprintf(&bp, "%s -f %s", cmd, src); 620 xasprintf(&bp, "%s -f -- %s", cmd, src);
614 if (do_cmd(host, suser, bp, &remin, &remout) < 0) { 621 if (do_cmd(host, suser, bp, &remin, &remout) < 0) {
615 (void) xfree(bp); 622 (void) xfree(bp);
616 ++errs; 623 ++errs;
diff --git a/servconf.c b/servconf.c
index d9726c435..cbbb20052 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;
@@ -131,6 +132,8 @@ initialize_server_options(ServerOptions *options)
131 options->adm_forced_command = NULL; 132 options->adm_forced_command = NULL;
132 options->chroot_directory = NULL; 133 options->chroot_directory = NULL;
133 options->zero_knowledge_password_authentication = -1; 134 options->zero_knowledge_password_authentication = -1;
135 options->revoked_keys_file = NULL;
136 options->trusted_user_ca_keys = NULL;
134} 137}
135 138
136void 139void
@@ -142,7 +145,7 @@ fill_default_server_options(ServerOptions *options)
142 145
143 /* Standard Options */ 146 /* Standard Options */
144 if (options->protocol == SSH_PROTO_UNKNOWN) 147 if (options->protocol == SSH_PROTO_UNKNOWN)
145 options->protocol = SSH_PROTO_1|SSH_PROTO_2; 148 options->protocol = SSH_PROTO_2;
146 if (options->num_host_key_files == 0) { 149 if (options->num_host_key_files == 0) {
147 /* fill default hostkeys for protocols */ 150 /* fill default hostkeys for protocols */
148 if (options->protocol & SSH_PROTO_1) 151 if (options->protocol & SSH_PROTO_1)
@@ -155,6 +158,7 @@ fill_default_server_options(ServerOptions *options)
155 _PATH_HOST_DSA_KEY_FILE; 158 _PATH_HOST_DSA_KEY_FILE;
156 } 159 }
157 } 160 }
161 /* No certificates by default */
158 if (options->num_ports == 0) 162 if (options->num_ports == 0)
159 options->ports[options->num_ports++] = SSH_DEFAULT_PORT; 163 options->ports[options->num_ports++] = SSH_DEFAULT_PORT;
160 if (options->listen_addrs == NULL) 164 if (options->listen_addrs == NULL)
@@ -316,7 +320,8 @@ typedef enum {
316 sAcceptEnv, sPermitTunnel, 320 sAcceptEnv, sPermitTunnel,
317 sMatch, sPermitOpen, sForceCommand, sChrootDirectory, 321 sMatch, sPermitOpen, sForceCommand, sChrootDirectory,
318 sUsePrivilegeSeparation, sAllowAgentForwarding, 322 sUsePrivilegeSeparation, sAllowAgentForwarding,
319 sZeroKnowledgePasswordAuthentication, 323 sZeroKnowledgePasswordAuthentication, sHostCertificate,
324 sRevokedKeys, sTrustedUserCAKeys,
320 sDeprecated, sUnsupported 325 sDeprecated, sUnsupported
321} ServerOpCodes; 326} ServerOpCodes;
322 327
@@ -441,6 +446,9 @@ static struct {
441 { "permitopen", sPermitOpen, SSHCFG_ALL }, 446 { "permitopen", sPermitOpen, SSHCFG_ALL },
442 { "forcecommand", sForceCommand, SSHCFG_ALL }, 447 { "forcecommand", sForceCommand, SSHCFG_ALL },
443 { "chrootdirectory", sChrootDirectory, SSHCFG_ALL }, 448 { "chrootdirectory", sChrootDirectory, SSHCFG_ALL },
449 { "hostcertificate", sHostCertificate, SSHCFG_GLOBAL },
450 { "revokedkeys", sRevokedKeys, SSHCFG_ALL },
451 { "trustedusercakeys", sTrustedUserCAKeys, SSHCFG_ALL },
444 { NULL, sBadOption, 0 } 452 { NULL, sBadOption, 0 }
445}; 453};
446 454
@@ -476,6 +484,22 @@ parse_token(const char *cp, const char *filename,
476 return sBadOption; 484 return sBadOption;
477} 485}
478 486
487char *
488derelativise_path(const char *path)
489{
490 char *expanded, *ret, *cwd;
491
492 expanded = tilde_expand_filename(path, getuid());
493 if (*expanded == '/')
494 return expanded;
495 if ((cwd = getcwd(NULL, 0)) == NULL)
496 fatal("%s: getcwd: %s", __func__, strerror(errno));
497 xasprintf(&ret, "%s/%s", cwd, expanded);
498 xfree(cwd);
499 xfree(expanded);
500 return ret;
501}
502
479static void 503static void
480add_listen_addr(ServerOptions *options, char *addr, int port) 504add_listen_addr(ServerOptions *options, char *addr, int port)
481{ 505{
@@ -810,13 +834,23 @@ process_server_config_line(ServerOptions *options, char *line,
810 fatal("%s line %d: missing file name.", 834 fatal("%s line %d: missing file name.",
811 filename, linenum); 835 filename, linenum);
812 if (*activep && *charptr == NULL) { 836 if (*activep && *charptr == NULL) {
813 *charptr = tilde_expand_filename(arg, getuid()); 837 *charptr = derelativise_path(arg);
814 /* increase optional counter */ 838 /* increase optional counter */
815 if (intptr != NULL) 839 if (intptr != NULL)
816 *intptr = *intptr + 1; 840 *intptr = *intptr + 1;
817 } 841 }
818 break; 842 break;
819 843
844 case sHostCertificate:
845 intptr = &options->num_host_cert_files;
846 if (*intptr >= MAX_HOSTKEYS)
847 fatal("%s line %d: too many host certificates "
848 "specified (max %d).", filename, linenum,
849 MAX_HOSTCERTS);
850 charptr = &options->host_cert_files[*intptr];
851 goto parse_filename;
852 break;
853
820 case sPidFile: 854 case sPidFile:
821 charptr = &options->pid_file; 855 charptr = &options->pid_file;
822 goto parse_filename; 856 goto parse_filename;
@@ -1323,6 +1357,14 @@ process_server_config_line(ServerOptions *options, char *line,
1323 *charptr = xstrdup(arg); 1357 *charptr = xstrdup(arg);
1324 break; 1358 break;
1325 1359
1360 case sTrustedUserCAKeys:
1361 charptr = &options->trusted_user_ca_keys;
1362 goto parse_filename;
1363
1364 case sRevokedKeys:
1365 charptr = &options->revoked_keys_file;
1366 goto parse_filename;
1367
1326 case sDeprecated: 1368 case sDeprecated:
1327 logit("%s line %d: Deprecated option %s", 1369 logit("%s line %d: Deprecated option %s",
1328 filename, linenum, arg); 1370 filename, linenum, arg);
@@ -1437,6 +1479,8 @@ copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth)
1437 return; 1479 return;
1438 M_CP_STROPT(adm_forced_command); 1480 M_CP_STROPT(adm_forced_command);
1439 M_CP_STROPT(chroot_directory); 1481 M_CP_STROPT(chroot_directory);
1482 M_CP_STROPT(trusted_user_ca_keys);
1483 M_CP_STROPT(revoked_keys_file);
1440} 1484}
1441 1485
1442#undef M_CP_INTOPT 1486#undef M_CP_INTOPT
@@ -1655,6 +1699,9 @@ dump_config(ServerOptions *o)
1655 dump_cfg_string(sAuthorizedKeysFile, o->authorized_keys_file); 1699 dump_cfg_string(sAuthorizedKeysFile, o->authorized_keys_file);
1656 dump_cfg_string(sAuthorizedKeysFile2, o->authorized_keys_file2); 1700 dump_cfg_string(sAuthorizedKeysFile2, o->authorized_keys_file2);
1657 dump_cfg_string(sForceCommand, o->adm_forced_command); 1701 dump_cfg_string(sForceCommand, o->adm_forced_command);
1702 dump_cfg_string(sChrootDirectory, o->chroot_directory);
1703 dump_cfg_string(sTrustedUserCAKeys, o->trusted_user_ca_keys);
1704 dump_cfg_string(sRevokedKeys, o->revoked_keys_file);
1658 1705
1659 /* string arguments requiring a lookup */ 1706 /* string arguments requiring a lookup */
1660 dump_cfg_string(sLogLevel, log_level_name(o->log_level)); 1707 dump_cfg_string(sLogLevel, log_level_name(o->log_level));
@@ -1663,6 +1710,8 @@ dump_config(ServerOptions *o)
1663 /* string array arguments */ 1710 /* string array arguments */
1664 dump_cfg_strarray(sHostKeyFile, o->num_host_key_files, 1711 dump_cfg_strarray(sHostKeyFile, o->num_host_key_files,
1665 o->host_key_files); 1712 o->host_key_files);
1713 dump_cfg_strarray(sHostKeyFile, o->num_host_cert_files,
1714 o->host_cert_files);
1666 dump_cfg_strarray(sAllowUsers, o->num_allow_users, o->allow_users); 1715 dump_cfg_strarray(sAllowUsers, o->num_allow_users, o->allow_users);
1667 dump_cfg_strarray(sDenyUsers, o->num_deny_users, o->deny_users); 1716 dump_cfg_strarray(sDenyUsers, o->num_deny_users, o->deny_users);
1668 dump_cfg_strarray(sAllowGroups, o->num_allow_groups, o->allow_groups); 1717 dump_cfg_strarray(sAllowGroups, o->num_allow_groups, o->allow_groups);
diff --git a/servconf.h b/servconf.h
index 8a9fae9cf..083789334 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
@@ -154,6 +157,8 @@ typedef struct {
154 int num_permitted_opens; 157 int num_permitted_opens;
155 158
156 char *chroot_directory; 159 char *chroot_directory;
160 char *revoked_keys_file;
161 char *trusted_user_ca_keys;
157} ServerOptions; 162} ServerOptions;
158 163
159void initialize_server_options(ServerOptions *); 164void initialize_server_options(ServerOptions *);
@@ -167,5 +172,6 @@ void parse_server_match_config(ServerOptions *, const char *, const char *,
167 const char *); 172 const char *);
168void copy_set_server_options(ServerOptions *, ServerOptions *, int); 173void copy_set_server_options(ServerOptions *, ServerOptions *, int);
169void dump_config(ServerOptions *); 174void dump_config(ServerOptions *);
175char *derelativise_path(const char *);
170 176
171#endif /* SERVCONF_H */ 177#endif /* SERVCONF_H */
diff --git a/session.c b/session.c
index f4a363543..639405fec 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 if (options.chroot_directory != NULL && 1554 if (options.chroot_directory != NULL &&
1526 strcasecmp(options.chroot_directory, "none") != 0) { 1555 strcasecmp(options.chroot_directory, "none") != 0) {
@@ -1533,10 +1562,6 @@ do_setusercontext(struct passwd *pw)
1533 free(chroot_path); 1562 free(chroot_path);
1534 } 1563 }
1535 1564
1536#ifdef HAVE_SETPCRED
1537 if (setpcred(pw->pw_name, (char **)NULL) == -1)
1538 fatal("Failed to set process credentials");
1539#endif /* HAVE_SETPCRED */
1540#ifdef HAVE_LOGIN_CAP 1565#ifdef HAVE_LOGIN_CAP
1541 if (setusercontext(lc, pw, pw->pw_uid, LOGIN_SETUSER) < 0) { 1566 if (setusercontext(lc, pw, pw->pw_uid, LOGIN_SETUSER) < 0) {
1542 perror("unable to set user context (setuser)"); 1567 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 372b0770e..bb19c15e1 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 005041b68..d7cc53101 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.
@@ -101,17 +108,17 @@ If no public key is found at a given path,
101will append 108will append
102.Pa .pub 109.Pa .pub
103and retry. 110and retry.
104.It Fl e Ar reader 111.It Fl e Ar pkcs11
105Remove key in smartcard 112Remove keys provided by the PKCS#11 shared library
106.Ar reader . 113.Ar pkcs11 .
107.It Fl L 114.It Fl L
108Lists public key parameters of all identities currently represented 115Lists public key parameters of all identities currently represented
109by the agent. 116by the agent.
110.It Fl l 117.It Fl l
111Lists fingerprints of all identities currently represented by the agent. 118Lists fingerprints of all identities currently represented by the agent.
112.It Fl s Ar reader 119.It Fl s Ar pkcs11
113Add key in smartcard 120Add keys provided by the PKCS#11 shared library
114.Ar reader . 121.Ar pkcs11 .
115.It Fl t Ar life 122.It Fl t Ar life
116Set a maximum lifetime when adding identities to an agent. 123Set a maximum lifetime when adding identities to an agent.
117The lifetime may be specified in seconds or in a time format 124The lifetime may be specified in seconds or in a time format
@@ -148,8 +155,9 @@ may be necessary to redirect the input from
148.Pa /dev/null 155.Pa /dev/null
149to make this work.) 156to make this work.)
150.It Ev SSH_AUTH_SOCK 157.It Ev SSH_AUTH_SOCK
151Identifies the path of a unix-domain socket used to communicate with the 158Identifies the path of a
152agent. 159.Ux Ns -domain
160socket used to communicate with the agent.
153.El 161.El
154.Sh FILES 162.Sh FILES
155.Bl -tag -width Ds 163.Bl -tag -width Ds
diff --git a/ssh-add.c b/ssh-add.c
index 7a43282f2..ad9f7a83e 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; 142 char *comment = NULL;
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) {
@@ -195,13 +195,37 @@ add_file(AuthenticationConnection *ac, const char *filename)
195 if (confirm != 0) 195 if (confirm != 0)
196 fprintf(stderr, 196 fprintf(stderr,
197 "The user has to confirm each use of the key\n"); 197 "The user has to confirm each use of the key\n");
198 } else if (ssh_add_identity(ac, private, comment)) {
199 fprintf(stderr, "Identity added: %s (%s)\n", filename, comment);
200 ret = 0;
201 } else { 198 } else {
202 fprintf(stderr, "Could not add identity: %s\n", filename); 199 fprintf(stderr, "Could not add identity: %s\n", filename);
203 } 200 }
204 201
202
203 /* Now try to add the certificate flavour too */
204 xasprintf(&certpath, "%s-cert.pub", filename);
205 if ((cert = key_load_public(certpath, NULL)) != NULL) {
206 /* Graft with private bits */
207 if (key_to_certified(private) != 0)
208 fatal("%s: key_to_certified failed", __func__);
209 key_cert_copy(cert, private);
210 key_free(cert);
211
212 if (ssh_add_identity_constrained(ac, private, comment,
213 lifetime, confirm)) {
214 fprintf(stderr, "Certificate added: %s (%s)\n",
215 certpath, private->cert->key_id);
216 if (lifetime != 0)
217 fprintf(stderr, "Lifetime set to %d seconds\n",
218 lifetime);
219 if (confirm != 0)
220 fprintf(stderr, "The user has to confirm each "
221 "use of the key\n");
222 } else {
223 error("Certificate %s (%s) add failed", certpath,
224 private->cert->key_id);
225 }
226 }
227
228 xfree(certpath);
205 xfree(comment); 229 xfree(comment);
206 key_free(private); 230 key_free(private);
207 231
@@ -214,7 +238,7 @@ update_card(AuthenticationConnection *ac, int add, const char *id)
214 char *pin; 238 char *pin;
215 int ret = -1; 239 int ret = -1;
216 240
217 pin = read_passphrase("Enter passphrase for smartcard: ", RP_ALLOW_STDIN); 241 pin = read_passphrase("Enter passphrase for PKCS#11: ", RP_ALLOW_STDIN);
218 if (pin == NULL) 242 if (pin == NULL)
219 return -1; 243 return -1;
220 244
@@ -320,10 +344,8 @@ usage(void)
320 fprintf(stderr, " -X Unlock agent.\n"); 344 fprintf(stderr, " -X Unlock agent.\n");
321 fprintf(stderr, " -t life Set lifetime (in seconds) when adding identities.\n"); 345 fprintf(stderr, " -t life Set lifetime (in seconds) when adding identities.\n");
322 fprintf(stderr, " -c Require confirmation to sign using identities\n"); 346 fprintf(stderr, " -c Require confirmation to sign using identities\n");
323#ifdef SMARTCARD 347 fprintf(stderr, " -s pkcs11 Add keys from PKCS#11 provider.\n");
324 fprintf(stderr, " -s reader Add key in smartcard reader.\n"); 348 fprintf(stderr, " -e pkcs11 Remove keys provided by PKCS#11 provider.\n");
325 fprintf(stderr, " -e reader Remove key in smartcard reader.\n");
326#endif
327} 349}
328 350
329int 351int
@@ -332,7 +354,7 @@ main(int argc, char **argv)
332 extern char *optarg; 354 extern char *optarg;
333 extern int optind; 355 extern int optind;
334 AuthenticationConnection *ac = NULL; 356 AuthenticationConnection *ac = NULL;
335 char *sc_reader_id = NULL; 357 char *pkcs11provider = NULL;
336 int i, ch, deleting = 0, ret = 0; 358 int i, ch, deleting = 0, ret = 0;
337 359
338 /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ 360 /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
@@ -374,11 +396,11 @@ main(int argc, char **argv)
374 ret = 1; 396 ret = 1;
375 goto done; 397 goto done;
376 case 's': 398 case 's':
377 sc_reader_id = optarg; 399 pkcs11provider = optarg;
378 break; 400 break;
379 case 'e': 401 case 'e':
380 deleting = 1; 402 deleting = 1;
381 sc_reader_id = optarg; 403 pkcs11provider = optarg;
382 break; 404 break;
383 case 't': 405 case 't':
384 if ((lifetime = convtime(optarg)) == -1) { 406 if ((lifetime = convtime(optarg)) == -1) {
@@ -395,8 +417,8 @@ main(int argc, char **argv)
395 } 417 }
396 argc -= optind; 418 argc -= optind;
397 argv += optind; 419 argv += optind;
398 if (sc_reader_id != NULL) { 420 if (pkcs11provider != NULL) {
399 if (update_card(ac, !deleting, sc_reader_id) == -1) 421 if (update_card(ac, !deleting, pkcs11provider) == -1)
400 ret = 1; 422 ret = 1;
401 goto done; 423 goto done;
402 } 424 }
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 3596cc174..6557f9336 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
@@ -201,9 +209,9 @@ Requests changing the comment in the private and public key files.
201This operation is only supported for RSA1 keys. 209This operation is only supported for RSA1 keys.
202The program will prompt for the file containing the private keys, for 210The program will prompt for the file containing the private keys, for
203the passphrase if the key has one, and for the new comment. 211the passphrase if the key has one, and for the new comment.
204.It Fl D Ar reader 212.It Fl D Ar pkcs11
205Download the RSA public key stored in the smartcard in 213Download the RSA public keys provided by the PKCS#11 shared library
206.Ar reader . 214.Ar pkcs11 .
207.It Fl e 215.It Fl e
208This option will read a private or public OpenSSH key file and 216This option will read a private or public OpenSSH key file and
209print the key in 217print the key in
@@ -248,6 +256,17 @@ but they do not reveal identifying information should the file's contents
248be disclosed. 256be disclosed.
249This option will not modify existing hashed hostnames and is therefore safe 257This option will not modify existing hashed hostnames and is therefore safe
250to use on files that mix hashed and non-hashed names. 258to use on files that mix hashed and non-hashed names.
259.It Fl h
260When signing a key, create a host certificate instead of a user
261certificate.
262Please see the
263.Sx CERTIFICATES
264section for details.
265.It Fl I Ar certificate_identity
266Specify the key identity when signing a public key.
267Please see the
268.Sx CERTIFICATES
269section for details.
251.It Fl i 270.It Fl i
252This option will read an unencrypted private (or public) key file 271This option will read an unencrypted private (or public) key file
253in SSH2-compatible format and print an OpenSSH compatible private 272in SSH2-compatible format and print an OpenSSH compatible private
@@ -257,6 +276,8 @@ also reads the
257RFC 4716 SSH Public Key File Format. 276RFC 4716 SSH Public Key File Format.
258This option allows importing keys from several commercial 277This option allows importing keys from several commercial
259SSH implementations. 278SSH implementations.
279.It Fl L
280Prints the contents of a certificate.
260.It Fl l 281.It Fl l
261Show fingerprint of specified public key file. 282Show fingerprint of specified public key file.
262Private RSA1 keys are also supported. 283Private RSA1 keys are also supported.
@@ -271,6 +292,71 @@ Specify the amount of memory to use (in megabytes) when generating
271candidate moduli for DH-GEX. 292candidate moduli for DH-GEX.
272.It Fl N Ar new_passphrase 293.It Fl N Ar new_passphrase
273Provides the new passphrase. 294Provides the new passphrase.
295.It Fl n Ar principals
296Specify one or more principals (user or host names) to be included in
297a certificate when signing a key.
298Multiple principals may be specified, separated by commas.
299Please see the
300.Sx CERTIFICATES
301section for details.
302.It Fl O Ar constraint
303Specify a certificate constraint when signing a key.
304This option may be specified multiple times.
305Please see the
306.Sx CERTIFICATES
307section for details.
308The constraints that are valid for user certificates are:
309.Bl -tag -width Ds
310.It Ic no-x11-forwarding
311Disable X11 forwarding (permitted by default).
312.It Ic no-agent-forwarding
313Disable
314.Xr ssh-agent 1
315forwarding (permitted by default).
316.It Ic no-port-forwarding
317Disable port forwarding (permitted by default).
318.It Ic no-pty
319Disable PTY allocation (permitted by default).
320.It Ic no-user-rc
321Disable execution of
322.Pa ~/.ssh/rc
323by
324.Xr sshd 8
325(permitted by default).
326.It Ic clear
327Clear all enabled permissions.
328This is useful for clearing the default set of permissions so permissions may
329be added individually.
330.It Ic permit-x11-forwarding
331Allows X11 forwarding.
332.It Ic permit-agent-forwarding
333Allows
334.Xr ssh-agent 1
335forwarding.
336.It Ic permit-port-forwarding
337Allows port forwarding.
338.It Ic permit-pty
339Allows PTY allocation.
340.It Ic permit-user-rc
341Allows execution of
342.Pa ~/.ssh/rc
343by
344.Xr sshd 8 .
345.It Ic force-command=command
346Forces the execution of
347.Ar command
348instead of any shell or command specified by the user when
349the certificate is used for authentication.
350.It Ic source-address=address_list
351Restrict the source addresses from which the certificate is considered valid
352from.
353The
354.Ar address_list
355is a comma-separated list of one or more address/netmask pairs in CIDR
356format.
357.El
358.Pp
359At present, no constraints are valid for host keys.
274.It Fl P Ar passphrase 360.It Fl P Ar passphrase
275Provides the (old) passphrase. 361Provides the (old) passphrase.
276.It Fl p 362.It Fl p
@@ -300,6 +386,11 @@ Print the SSHFP fingerprint resource record named
300for the specified public key file. 386for the specified public key file.
301.It Fl S Ar start 387.It Fl S Ar start
302Specify start point (in hex) when generating candidate moduli for DH-GEX. 388Specify start point (in hex) when generating candidate moduli for DH-GEX.
389.It Fl s Ar ca_key
390Certify (sign) a public key using the specified CA key.
391Please see the
392.Sx CERTIFICATES
393section for details.
303.It Fl T Ar output_file 394.It Fl T Ar output_file
304Test DH group exchange candidate primes (generated using the 395Test DH group exchange candidate primes (generated using the
305.Fl G 396.Fl G
@@ -313,9 +404,29 @@ for protocol version 1 and
313or 404or
314.Dq dsa 405.Dq dsa
315for protocol version 2. 406for protocol version 2.
316.It Fl U Ar reader 407.It Fl V Ar validity_interval
317Upload an existing RSA private key into the smartcard in 408Specify a validity interval when signing a certificate.
318.Ar reader . 409A validity interval may consist of a single time, indicating that the
410certificate is valid beginning now and expiring at that time, or may consist
411of two times separated by a colon to indicate an explicit time interval.
412The start time may be specified as a date in YYYYMMDD format, a time
413in YYYYMMDDHHMMSS format or a relative time (to the current time) consisting
414of a minus sign followed by a relative time in the format described in the
415.Sx TIME FORMATS
416section of
417.Xr ssh_config 5 .
418The end time may be specified as a YYYYMMDD date, a YYYYMMDDHHMMSS time or
419a relative time starting with a plus character.
420.Pp
421For example:
422.Dq +52w1d
423(valid from now to 52 weeks and one day from now),
424.Dq -4w:+4w
425(valid from four weeks ago to four weeks from now),
426.Dq 20100101123000:20110101123000
427(valid from 12:30 PM, January 1st, 2010 to 12:30 PM, January 1st, 2011),
428.Dq -1d:20110101
429(valid from yesterday to midnight, January 1st, 2011).
319.It Fl v 430.It Fl v
320Verbose mode. 431Verbose mode.
321Causes 432Causes
@@ -386,6 +497,73 @@ Screened DH groups may be installed in
386.Pa /etc/moduli . 497.Pa /etc/moduli .
387It is important that this file contains moduli of a range of bit lengths and 498It is important that this file contains moduli of a range of bit lengths and
388that both ends of a connection share common moduli. 499that both ends of a connection share common moduli.
500.Sh CERTIFICATES
501.Nm
502supports signing of keys to produce certificates that may be used for
503user or host authentication.
504Certificates consist of a public key, some identity information, zero or
505more principal (user or host) names and an optional set of constraints that
506are signed by a Certification Authority (CA) key.
507Clients or servers may then trust only the CA key and verify its signature
508on a certificate rather than trusting many user/host keys.
509Note that OpenSSH certificates are a different, and much simpler, format to
510the X.509 certificates used in
511.Xr ssl 8 .
512.Pp
513.Nm
514supports two types of certificates: user and host.
515User certificates authenticate users to servers, whereas host certificates
516authenticate server hosts to users.
517To generate a user certificate:
518.Pp
519.Dl $ ssh-keygen -s /path/to/ca_key -I key_id /path/to/user_key.pub
520.Pp
521The resultant certificate will be placed in
522.Pa /path/to/user_key_cert.pub .
523A host certificate requires the
524.Fl h
525option:
526.Pp
527.Dl $ ssh-keygen -s /path/to/ca_key -I key_id -h /path/to/host_key.pub
528.Pp
529The host certificate will be output to
530.Pa /path/to/host_key_cert.pub .
531In both cases,
532.Ar key_id
533is a "key identifier" that is logged by the server when the certificate
534is used for authentication.
535.Pp
536Certificates may be limited to be valid for a set of principal (user/host)
537names.
538By default, generated certificates are valid for all users or hosts.
539To generate a certificate for a specified set of principals:
540.Pp
541.Dl $ ssh-keygen -s ca_key -I key_id -n user1,user2 user_key.pub
542.Dl $ ssh-keygen -s ca_key -I key_id -h -n host.domain user_key.pub
543.Pp
544Additional limitations on the validity and use of user certificates may
545be specified through certificate constraints.
546A constrained certificate may disable features of the SSH session, may be
547valid only when presented from particular source addresses or may
548force the use of a specific command.
549For a list of valid certificate constraints, see the documentation for the
550.Fl O
551option above.
552.Pp
553Finally, certificates may be defined with a validity lifetime.
554The
555.Fl V
556option allows specification of certificate start and end times.
557A certificate that is presented at a time outside this range will not be
558considered valid.
559By default, certificates have a maximum validity interval.
560.Pp
561For certificates to be used for user or host authentication, the CA
562public key must be trusted by
563.Xr sshd 8
564or
565.Xr ssh 1 .
566Please refer to those manual pages for details.
389.Sh FILES 567.Sh FILES
390.Bl -tag -width Ds 568.Bl -tag -width Ds
391.It Pa ~/.ssh/identity 569.It Pa ~/.ssh/identity
@@ -393,7 +571,7 @@ Contains the protocol version 1 RSA authentication identity of the user.
393This file should not be readable by anyone but the user. 571This file should not be readable by anyone but the user.
394It is possible to 572It is possible to
395specify a passphrase when generating the key; that passphrase will be 573specify a passphrase when generating the key; that passphrase will be
396used to encrypt the private part of this file using 3DES. 574used to encrypt the private part of this file using 128-bit AES.
397This file is not automatically accessed by 575This file is not automatically accessed by
398.Nm 576.Nm
399but it is offered as the default file for the private key. 577but it is offered as the default file for the private key.
@@ -411,7 +589,7 @@ Contains the protocol version 2 DSA authentication identity of the user.
411This file should not be readable by anyone but the user. 589This file should not be readable by anyone but the user.
412It is possible to 590It is possible to
413specify a passphrase when generating the key; that passphrase will be 591specify a passphrase when generating the key; that passphrase will be
414used to encrypt the private part of this file using 3DES. 592used to encrypt the private part of this file using 128-bit AES.
415This file is not automatically accessed by 593This file is not automatically accessed by
416.Nm 594.Nm
417but it is offered as the default file for the private key. 595but it is offered as the default file for the private key.
@@ -429,7 +607,7 @@ Contains the protocol version 2 RSA authentication identity of the user.
429This file should not be readable by anyone but the user. 607This file should not be readable by anyone but the user.
430It is possible to 608It is possible to
431specify a passphrase when generating the key; that passphrase will be 609specify a passphrase when generating the key; that passphrase will be
432used to encrypt the private part of this file using 3DES. 610used to encrypt the private part of this file using 128-bit AES.
433This file is not automatically accessed by 611This file is not automatically accessed by
434.Nm 612.Nm
435but it is offered as the default file for the private key. 613but 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 6c6271ee4..3f815b8e7 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
@@ -593,6 +597,19 @@ Multiple
593.Fl v 597.Fl v
594options increase the verbosity. 598options increase the verbosity.
595The maximum is 3. 599The maximum is 3.
600.It Fl W Ar host : Ns Ar port
601Requests that standard input and output on the client be forwarded to
602.Ar host
603on
604.Ar port
605over the secure channel.
606Implies
607.Fl N ,
608.Fl T ,
609.Cm ExitOnForwardFailure
610and
611.Cm ClearAllForwardings
612and works with Protocol version 2 only.
596.It Fl w Xo 613.It Fl w Xo
597.Ar local_tun Ns Op : Ns Ar remote_tun 614.Ar local_tun Ns Op : Ns Ar remote_tun
598.Xc 615.Xc
@@ -666,20 +683,18 @@ exits with the exit status of the remote command or with 255
666if an error occurred. 683if an error occurred.
667.Sh AUTHENTICATION 684.Sh AUTHENTICATION
668The OpenSSH SSH client supports SSH protocols 1 and 2. 685The OpenSSH SSH client supports SSH protocols 1 and 2.
669Protocol 2 is the default, with 686The default is to use protocol 2 only,
670.Nm 687though this can be changed via the
671falling back to protocol 1 if it detects protocol 2 is unsupported.
672These settings may be altered using the
673.Cm Protocol 688.Cm Protocol
674option in 689option in
675.Xr ssh_config 5 , 690.Xr ssh_config 5
676or enforced using the 691or the
677.Fl 1 692.Fl 1
678and 693and
679.Fl 2 694.Fl 2
680options (see above). 695options (see above).
681Both protocols support similar authentication methods, 696Both protocols support similar authentication methods,
682but protocol 2 is preferred since 697but protocol 2 is the default since
683it provides additional mechanisms for confidentiality 698it provides additional mechanisms for confidentiality
684(the traffic is encrypted using AES, 3DES, Blowfish, CAST128, or Arcfour) 699(the traffic is encrypted using AES, 3DES, Blowfish, CAST128, or Arcfour)
685and integrity (hmac-md5, hmac-sha1, umac-64, hmac-ripemd160). 700and integrity (hmac-md5, hmac-sha1, umac-64, hmac-ripemd160).
@@ -788,8 +803,20 @@ file, and has one key
788per line, though the lines can be very long. 803per line, though the lines can be very long.
789After this, the user can log in without giving the password. 804After this, the user can log in without giving the password.
790.Pp 805.Pp
791The most convenient way to use public key authentication may be with an 806A variation on public key authentication
792authentication agent. 807is available in the form of certificate authentication:
808instead of a set of public/private keys,
809signed certificates are used.
810This has the advantage that a single trusted certification authority
811can be used in place of many public/private keys.
812See the
813.Sx CERTIFICATES
814section of
815.Xr ssh-keygen 1
816for more information.
817.Pp
818The most convenient way to use public key or certificate authentication
819may be with an authentication agent.
793See 820See
794.Xr ssh-agent 1 821.Xr ssh-agent 1
795for more information. 822for more information.
diff --git a/ssh.c b/ssh.c
index adfe60e4b..b9553d3e1 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 options.log_level = SYSLOG_LEVEL_QUIET; 424 options.log_level = SYSLOG_LEVEL_QUIET;
393 break; 425 break;
@@ -527,7 +559,7 @@ main(int ac, char **av)
527 ac -= optind; 559 ac -= optind;
528 av += optind; 560 av += optind;
529 561
530 if (ac > 0 && !host && **av != '-') { 562 if (ac > 0 && !host) {
531 if (strrchr(*av, '@')) { 563 if (strrchr(*av, '@')) {
532 p = xstrdup(*av); 564 p = xstrdup(*av);
533 cp = strrchr(p, '@'); 565 cp = strrchr(p, '@');
@@ -870,11 +902,48 @@ ssh_confirm_remote_forward(int type, u_int32_t seq, void *ctxt)
870} 902}
871 903
872static void 904static void
905client_cleanup_stdio_fwd(int id, void *arg)
906{
907 debug("stdio forwarding: done");
908 cleanup_exit(0);
909}
910
911static int
912client_setup_stdio_fwd(const char *host_to_connect, u_short port_to_connect)
913{
914 Channel *c;
915 int in, out;
916
917 debug3("client_setup_stdio_fwd %s:%d", host_to_connect,
918 port_to_connect);
919
920 in = dup(STDIN_FILENO);
921 out = dup(STDOUT_FILENO);
922 if (in < 0 || out < 0)
923 fatal("channel_connect_stdio_fwd: dup() in/out failed");
924
925 if ((c = channel_connect_stdio_fwd(host_to_connect, port_to_connect,
926 in, out)) == NULL)
927 return 0;
928 channel_register_cleanup(c->self, client_cleanup_stdio_fwd, 0);
929 return 1;
930}
931
932static void
873ssh_init_forwarding(void) 933ssh_init_forwarding(void)
874{ 934{
875 int success = 0; 935 int success = 0;
876 int i; 936 int i;
877 937
938 if (stdio_forward_host != NULL) {
939 if (!compat20) {
940 fatal("stdio forwarding require Protocol 2");
941 }
942 if (!client_setup_stdio_fwd(stdio_forward_host,
943 stdio_forward_port))
944 fatal("Failed to connect in stdio forward mode.");
945 }
946
878 /* Initiate local TCP/IP port forwardings. */ 947 /* Initiate local TCP/IP port forwardings. */
879 for (i = 0; i < options.num_local_forwards; i++) { 948 for (i = 0; i < options.num_local_forwards; i++) {
880 debug("Local connections to %.200s:%d forwarded to remote " 949 debug("Local connections to %.200s:%d forwarded to remote "
@@ -1222,6 +1291,9 @@ ssh_session2(void)
1222 fatal("daemon() failed: %.200s", strerror(errno)); 1291 fatal("daemon() failed: %.200s", strerror(errno));
1223 } 1292 }
1224 1293
1294 if (options.use_roaming)
1295 request_roaming();
1296
1225 return client_loop(tty_flag, tty_flag ? 1297 return client_loop(tty_flag, tty_flag ?
1226 options.escape_char : SSH_ESCAPECHAR_NONE, id); 1298 options.escape_char : SSH_ESCAPECHAR_NONE, id);
1227} 1299}
@@ -1234,31 +1306,37 @@ load_public_identity_files(void)
1234 int i = 0; 1306 int i = 0;
1235 Key *public; 1307 Key *public;
1236 struct passwd *pw; 1308 struct passwd *pw;
1237#ifdef SMARTCARD 1309 u_int n_ids;
1310 char *identity_files[SSH_MAX_IDENTITY_FILES];
1311 Key *identity_keys[SSH_MAX_IDENTITY_FILES];
1312#ifdef ENABLE_PKCS11
1238 Key **keys; 1313 Key **keys;
1314 int nkeys;
1315#endif /* PKCS11 */
1239 1316
1240 if (options.smartcard_device != NULL && 1317 n_ids = 0;
1318 bzero(identity_files, sizeof(identity_files));
1319 bzero(identity_keys, sizeof(identity_keys));
1320
1321#ifdef ENABLE_PKCS11
1322 if (options.pkcs11_provider != NULL &&
1241 options.num_identity_files < SSH_MAX_IDENTITY_FILES && 1323 options.num_identity_files < SSH_MAX_IDENTITY_FILES &&
1242 (keys = sc_get_keys(options.smartcard_device, NULL)) != NULL) { 1324 (pkcs11_init(!options.batch_mode) == 0) &&
1243 int count = 0; 1325 (nkeys = pkcs11_add_provider(options.pkcs11_provider, NULL,
1244 for (i = 0; keys[i] != NULL; i++) { 1326 &keys)) > 0) {
1245 count++; 1327 for (i = 0; i < nkeys; i++) {
1246 memmove(&options.identity_files[1], 1328 if (n_ids >= SSH_MAX_IDENTITY_FILES) {
1247 &options.identity_files[0], 1329 key_free(keys[i]);
1248 sizeof(char *) * (SSH_MAX_IDENTITY_FILES - 1)); 1330 continue;
1249 memmove(&options.identity_keys[1], 1331 }
1250 &options.identity_keys[0], 1332 identity_keys[n_ids] = keys[i];
1251 sizeof(Key *) * (SSH_MAX_IDENTITY_FILES - 1)); 1333 identity_files[n_ids] =
1252 options.num_identity_files++; 1334 xstrdup(options.pkcs11_provider); /* XXX */
1253 options.identity_keys[0] = keys[i]; 1335 n_ids++;
1254 options.identity_files[0] = sc_get_key_label(keys[i]);
1255 } 1336 }
1256 if (options.num_identity_files > SSH_MAX_IDENTITY_FILES)
1257 options.num_identity_files = SSH_MAX_IDENTITY_FILES;
1258 i = count;
1259 xfree(keys); 1337 xfree(keys);
1260 } 1338 }
1261#endif /* SMARTCARD */ 1339#endif /* ENABLE_PKCS11 */
1262 if ((pw = getpwuid(original_real_uid)) == NULL) 1340 if ((pw = getpwuid(original_real_uid)) == NULL)
1263 fatal("load_public_identity_files: getpwuid failed"); 1341 fatal("load_public_identity_files: getpwuid failed");
1264 pwname = xstrdup(pw->pw_name); 1342 pwname = xstrdup(pw->pw_name);
@@ -1266,7 +1344,11 @@ load_public_identity_files(void)
1266 if (gethostname(thishost, sizeof(thishost)) == -1) 1344 if (gethostname(thishost, sizeof(thishost)) == -1)
1267 fatal("load_public_identity_files: gethostname: %s", 1345 fatal("load_public_identity_files: gethostname: %s",
1268 strerror(errno)); 1346 strerror(errno));
1269 for (; i < options.num_identity_files; i++) { 1347 for (i = 0; i < options.num_identity_files; i++) {
1348 if (n_ids >= SSH_MAX_IDENTITY_FILES) {
1349 xfree(options.identity_files[i]);
1350 continue;
1351 }
1270 cp = tilde_expand_filename(options.identity_files[i], 1352 cp = tilde_expand_filename(options.identity_files[i],
1271 original_real_uid); 1353 original_real_uid);
1272 filename = percent_expand(cp, "d", pwdir, 1354 filename = percent_expand(cp, "d", pwdir,
@@ -1277,9 +1359,37 @@ load_public_identity_files(void)
1277 debug("identity file %s type %d", filename, 1359 debug("identity file %s type %d", filename,
1278 public ? public->type : -1); 1360 public ? public->type : -1);
1279 xfree(options.identity_files[i]); 1361 xfree(options.identity_files[i]);
1280 options.identity_files[i] = filename; 1362 identity_files[n_ids] = filename;
1281 options.identity_keys[i] = public; 1363 identity_keys[n_ids] = public;
1364
1365 if (++n_ids >= SSH_MAX_IDENTITY_FILES)
1366 continue;
1367
1368 /* Try to add the certificate variant too */
1369 xasprintf(&cp, "%s-cert", filename);
1370 public = key_load_public(cp, NULL);
1371 debug("identity file %s type %d", cp,
1372 public ? public->type : -1);
1373 if (public == NULL) {
1374 xfree(cp);
1375 continue;
1376 }
1377 if (!key_is_cert(public)) {
1378 debug("%s: key %s type %s is not a certificate",
1379 __func__, cp, key_type(public));
1380 key_free(public);
1381 xfree(cp);
1382 continue;
1383 }
1384 identity_keys[n_ids] = public;
1385 /* point to the original path, most likely the private key */
1386 identity_files[n_ids] = xstrdup(filename);
1387 n_ids++;
1282 } 1388 }
1389 options.num_identity_files = n_ids;
1390 memcpy(options.identity_files, identity_files, sizeof(identity_files));
1391 memcpy(options.identity_keys, identity_keys, sizeof(identity_keys));
1392
1283 bzero(pwname, strlen(pwname)); 1393 bzero(pwname, strlen(pwname));
1284 xfree(pwname); 1394 xfree(pwname);
1285 bzero(pwdir, strlen(pwdir)); 1395 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 93a28014b..2c06ba707 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
@@ -46,3 +46,4 @@
46# TunnelDevice any:any 46# TunnelDevice any:any
47# PermitLocalCommand no 47# PermitLocalCommand no
48# VisualHostKey no 48# VisualHostKey no
49# ProxyCommand ssh -q -W %h:%p gateway.example.com
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 024491b90..de1c71765 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
@@ -586,6 +586,12 @@ and
586for protocol version 2. 586for protocol version 2.
587Additionally, any identities represented by the authentication agent 587Additionally, any identities represented by the authentication agent
588will be used for authentication. 588will be used for authentication.
589.Xr ssh 1
590will try to load certificate information from the filename obtained by
591appending
592.Pa -cert.pub
593to the path of a specified
594.Cm IdentityFile .
589.Pp 595.Pp
590The file name may use the tilde 596The file name may use the tilde
591syntax to refer to a user's home directory or one of the following 597syntax to refer to a user's home directory or one of the following
@@ -643,6 +649,13 @@ The following escape character substitutions will be performed:
643(remote user name) or 649(remote user name) or
644.Ql %u 650.Ql %u
645(local user name). 651(local user name).
652.Pp
653The command is run synchronously and does not have access to the
654session of the
655.Xr ssh 1
656that spawned it.
657It should not be used for interactive commands.
658.Pp
646This directive is ignored unless 659This directive is ignored unless
647.Cm PermitLocalCommand 660.Cm PermitLocalCommand
648has been enabled. 661has been enabled.
@@ -731,6 +744,12 @@ or
731.Dq no . 744.Dq no .
732The default is 745The default is
733.Dq no . 746.Dq no .
747.It Cm PKCS11Provider
748Specifies which PKCS#11 provider to use.
749The argument to this keyword is the PKCS#11 shared libary
750.Xr ssh 1
751should use to communicate with a PKCS#11 token providing the user's
752private RSA key.
734.It Cm Port 753.It Cm Port
735Specifies the port number to connect on the remote host. 754Specifies the port number to connect on the remote host.
736The default is 22. 755The default is 22.
@@ -757,11 +776,13 @@ The possible values are
757and 776and
758.Sq 2 . 777.Sq 2 .
759Multiple versions must be comma-separated. 778Multiple versions must be comma-separated.
760The default is 779When this option is set to
761.Dq 2,1 . 780.Dq 2,1
762This means that ssh 781.Nm ssh
763tries version 2 and falls back to version 1 782will try version 2 and fall back to version 1
764if version 2 is not available. 783if version 2 is not available.
784The default is
785.Sq 2 .
765.It Cm ProxyCommand 786.It Cm ProxyCommand
766Specifies the command to use to connect to the server. 787Specifies the command to use to connect to the server.
767The command 788The command
@@ -945,13 +966,6 @@ channel to request a response from the server.
945The default 966The default
946is 0, indicating that these messages will not be sent to the server. 967is 0, indicating that these messages will not be sent to the server.
947This option applies to protocol version 2 only. 968This option applies to protocol version 2 only.
948.It Cm SmartcardDevice
949Specifies which smartcard device to use.
950The argument to this keyword is the device
951.Xr ssh 1
952should use to communicate with a smartcard used for storing the user's
953private RSA key.
954By default, no device is specified and smartcard support is not activated.
955.It Cm StrictHostKeyChecking 969.It Cm StrictHostKeyChecking
956If this flag is set to 970If this flag is set to
957.Dq yes , 971.Dq yes ,
diff --git a/sshconnect.c b/sshconnect.c
index 3e57e859d..9de52224d 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 77806595c..5bf11c085 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 *);
@@ -472,7 +479,7 @@ input_userauth_banner(int type, u_int32_t seq, void *ctxt)
472 if (len > 65536) 479 if (len > 65536)
473 len = 65536; 480 len = 65536;
474 msg = xmalloc(len * 4 + 1); /* max expansion from strnvis() */ 481 msg = xmalloc(len * 4 + 1); /* max expansion from strnvis() */
475 strnvis(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL); 482 strnvis(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL|VIS_NOSLASH);
476 fprintf(stderr, "%s", msg); 483 fprintf(stderr, "%s", msg);
477 xfree(msg); 484 xfree(msg);
478 } 485 }
@@ -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) {
@@ -1395,6 +1421,8 @@ pubkey_prepare(Authctxt *authctxt)
1395 key = options.identity_keys[i]; 1421 key = options.identity_keys[i];
1396 if (key && key->type == KEY_RSA1) 1422 if (key && key->type == KEY_RSA1)
1397 continue; 1423 continue;
1424 if (key && key->cert && key->cert->type != SSH2_CERT_TYPE_USER)
1425 continue;
1398 options.identity_keys[i] = NULL; 1426 options.identity_keys[i] = NULL;
1399 id = xcalloc(1, sizeof(*id)); 1427 id = xcalloc(1, sizeof(*id));
1400 id->key = key; 1428 id->key = key;
@@ -1598,7 +1626,7 @@ ssh_keysign(Key *key, u_char **sigp, u_int *lenp,
1598 debug2("ssh_keysign called"); 1626 debug2("ssh_keysign called");
1599 1627
1600 if (stat(_PATH_SSH_KEY_SIGN, &st) < 0) { 1628 if (stat(_PATH_SSH_KEY_SIGN, &st) < 0) {
1601 error("ssh_keysign: no installed: %s", strerror(errno)); 1629 error("ssh_keysign: not installed: %s", strerror(errno));
1602 return -1; 1630 return -1;
1603 } 1631 }
1604 if (fflush(stdout) != 0) 1632 if (fflush(stdout) != 0)
@@ -1616,6 +1644,8 @@ ssh_keysign(Key *key, u_char **sigp, u_int *lenp,
1616 return -1; 1644 return -1;
1617 } 1645 }
1618 if (pid == 0) { 1646 if (pid == 0) {
1647 /* keep the socket on exec */
1648 fcntl(packet_get_connection_in(), F_SETFD, 0);
1619 permanently_drop_suid(getuid()); 1649 permanently_drop_suid(getuid());
1620 close(from[0]); 1650 close(from[0]);
1621 if (dup2(from[1], STDOUT_FILENO) < 0) 1651 if (dup2(from[1], STDOUT_FILENO) < 0)
@@ -1668,10 +1698,10 @@ userauth_hostbased(Authctxt *authctxt)
1668 Sensitive *sensitive = authctxt->sensitive; 1698 Sensitive *sensitive = authctxt->sensitive;
1669 Buffer b; 1699 Buffer b;
1670 u_char *signature, *blob; 1700 u_char *signature, *blob;
1671 char *chost, *pkalg, *p, myname[NI_MAXHOST]; 1701 char *chost, *pkalg, *p;
1672 const char *service; 1702 const char *service;
1673 u_int blen, slen; 1703 u_int blen, slen;
1674 int ok, i, len, found = 0; 1704 int ok, i, found = 0;
1675 1705
1676 /* check for a useful key */ 1706 /* check for a useful key */
1677 for (i = 0; i < sensitive->nkeys; i++) { 1707 for (i = 0; i < sensitive->nkeys; i++) {
@@ -1692,23 +1722,13 @@ userauth_hostbased(Authctxt *authctxt)
1692 return 0; 1722 return 0;
1693 } 1723 }
1694 /* figure out a name for the client host */ 1724 /* figure out a name for the client host */
1695 p = NULL; 1725 p = get_local_name(packet_get_connection_in());
1696 if (packet_connection_is_on_socket())
1697 p = get_local_name(packet_get_connection_in());
1698 if (p == NULL) {
1699 if (gethostname(myname, sizeof(myname)) == -1) {
1700 verbose("userauth_hostbased: gethostname: %s",
1701 strerror(errno));
1702 } else
1703 p = xstrdup(myname);
1704 }
1705 if (p == NULL) { 1726 if (p == NULL) {
1706 error("userauth_hostbased: cannot get local ipaddr/name"); 1727 error("userauth_hostbased: cannot get local ipaddr/name");
1707 key_free(private); 1728 key_free(private);
1708 xfree(blob); 1729 xfree(blob);
1709 return 0; 1730 return 0;
1710 } 1731 }
1711 len = strlen(p) + 2;
1712 xasprintf(&chost, "%s.", p); 1732 xasprintf(&chost, "%s.", p);
1713 debug2("userauth_hostbased: chost %s", chost); 1733 debug2("userauth_hostbased: chost %s", chost);
1714 xfree(p); 1734 xfree(p);
@@ -1819,6 +1839,8 @@ userauth_jpake(Authctxt *authctxt)
1819 /* Expect step 1 packet from peer */ 1839 /* Expect step 1 packet from peer */
1820 dispatch_set(SSH2_MSG_USERAUTH_JPAKE_SERVER_STEP1, 1840 dispatch_set(SSH2_MSG_USERAUTH_JPAKE_SERVER_STEP1,
1821 input_userauth_jpake_server_step1); 1841 input_userauth_jpake_server_step1);
1842 dispatch_set(SSH2_MSG_USERAUTH_SUCCESS,
1843 &input_userauth_success_unexpected);
1822 1844
1823 return 1; 1845 return 1;
1824} 1846}
@@ -1831,6 +1853,7 @@ userauth_jpake_cleanup(Authctxt *authctxt)
1831 jpake_free(authctxt->methoddata); 1853 jpake_free(authctxt->methoddata);
1832 authctxt->methoddata = NULL; 1854 authctxt->methoddata = NULL;
1833 } 1855 }
1856 dispatch_set(SSH2_MSG_USERAUTH_SUCCESS, &input_userauth_success);
1834} 1857}
1835#endif /* JPAKE */ 1858#endif /* JPAKE */
1836 1859
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 111d491d9..5f1966005 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
@@ -260,7 +270,7 @@ or
260.El 270.El
261.Sh AUTHENTICATION 271.Sh AUTHENTICATION
262The OpenSSH SSH daemon supports SSH protocols 1 and 2. 272The OpenSSH SSH daemon supports SSH protocols 1 and 2.
263Both protocols are supported by default, 273The default is to use protocol 2 only,
264though this can be changed via the 274though this can be changed via the
265.Cm Protocol 275.Cm Protocol
266option in 276option in
@@ -498,6 +508,13 @@ No spaces are permitted, except within double quotes.
498The following option specifications are supported (note 508The following option specifications are supported (note
499that option keywords are case-insensitive): 509that option keywords are case-insensitive):
500.Bl -tag -width Ds 510.Bl -tag -width Ds
511.It Cm cert-authority
512Specifies that the listed key is a certification authority (CA) that is
513trusted to validate signed certificates for user authentication.
514.Pp
515Certificates may encode access restrictions similar to these key options.
516If both certificate restrictions and key options are present, the most
517restrictive union of the two is applied.
501.It Cm command="command" 518.It Cm command="command"
502Specifies that the command is executed whenever this key is used for 519Specifies that the command is executed whenever this key is used for
503authentication. 520authentication.
@@ -517,6 +534,10 @@ The command originally supplied by the client is available in the
517.Ev SSH_ORIGINAL_COMMAND 534.Ev SSH_ORIGINAL_COMMAND
518environment variable. 535environment variable.
519Note that this option applies to shell, command or subsystem execution. 536Note that this option applies to shell, command or subsystem execution.
537Also note that this command may be superseded by either a
538.Xr sshd_config 5
539.Cm ForceCommand
540directive or a command embedded in a certificate.
520.It Cm environment="NAME=value" 541.It Cm environment="NAME=value"
521Specifies that the string is to be added to the environment when 542Specifies that the string is to be added to the environment when
522logging in using this key. 543logging in using this key.
@@ -613,10 +634,19 @@ be prepared by the administrator (optional), and the per-user file is
613maintained automatically: whenever the user connects from an unknown host, 634maintained automatically: whenever the user connects from an unknown host,
614its key is added to the per-user file. 635its key is added to the per-user file.
615.Pp 636.Pp
616Each line in these files contains the following fields: hostnames, 637Each line in these files contains the following fields: markers (optional),
617bits, exponent, modulus, comment. 638hostnames, bits, exponent, modulus, comment.
618The fields are separated by spaces. 639The fields are separated by spaces.
619.Pp 640.Pp
641The marker is optional, but if it is present then it must be one of
642.Dq @cert-authority ,
643to indicate that the line contains a certification authority (CA) key,
644or
645.Dq @revoked ,
646to indicate that the key contained on the line is revoked and must not ever
647be accepted.
648Only one marker should be used on a key line.
649.Pp
620Hostnames is a comma-separated list of patterns 650Hostnames is a comma-separated list of patterns
621.Pf ( Ql * 651.Pf ( Ql *
622and 652and
@@ -656,8 +686,25 @@ Lines starting with
656and empty lines are ignored as comments. 686and empty lines are ignored as comments.
657.Pp 687.Pp
658When performing host authentication, authentication is accepted if any 688When performing host authentication, authentication is accepted if any
659matching line has the proper key. 689matching line has the proper key; either one that matches exactly or,
660It is thus permissible (but not 690if the server has presented a certificate for authentication, the key
691of the certification authority that signed the certificate.
692For a key to be trusted as a certification authority, it must use the
693.Dq @cert-authority
694marker described above.
695.Pp
696The known hosts file also provides a facility to mark keys as revoked,
697for example when it is known that the associated private key has been
698stolen.
699Revoked keys are specified by including the
700.Dq @revoked
701marker at the beginning of the key line, and are never accepted for
702authentication or as certification authorities, but instead will
703produce a warning from
704.Xr ssh 1
705when they are encountered.
706.Pp
707It is permissible (but not
661recommended) to have several lines or different host keys for the same 708recommended) to have several lines or different host keys for the same
662names. 709names.
663This will inevitably happen when short forms of host names 710This will inevitably happen when short forms of host names
@@ -668,10 +715,16 @@ accepted if valid information can be found from either file.
668.Pp 715.Pp
669Note that the lines in these files are typically hundreds of characters 716Note that the lines in these files are typically hundreds of characters
670long, and you definitely don't want to type in the host keys by hand. 717long, and you definitely don't want to type in the host keys by hand.
671Rather, generate them by a script 718Rather, generate them by a script,
719.Xr ssh-keyscan 1
672or by taking 720or by taking
673.Pa /etc/ssh/ssh_host_key.pub 721.Pa /etc/ssh/ssh_host_key.pub
674and adding the host names at the front. 722and adding the host names at the front.
723.Xr ssh-keygen 1
724also offers some basic automated editing for
725.Pa ~/.ssh/known_hosts
726including removing hosts matching a host name and converting all host
727names to their hashed representations.
675.Pp 728.Pp
676An example ssh_known_hosts file: 729An example ssh_known_hosts file:
677.Bd -literal -offset 3n 730.Bd -literal -offset 3n
@@ -681,6 +734,10 @@ cvs.example.net,192.0.2.10 ssh-rsa AAAA1234.....=
681# A hashed hostname 734# A hashed hostname
682|1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa 735|1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa
683AAAA1234.....= 736AAAA1234.....=
737# A revoked key
738@revoked * ssh-rsa AAAAB5W...
739# A CA key, accepted for any host in *.mydomain.com or *.mydomain.org
740@cert-authority *.mydomain.org,*.mydomain.com ssh-rsa AAAAB5W...
684.Ed 741.Ed
685.Sh FILES 742.Sh FILES
686.Bl -tag -width Ds -compact 743.Bl -tag -width Ds -compact
diff --git a/sshd.c b/sshd.c
index 2b2cc81a5..eb48e791d 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];
@@ -313,6 +314,7 @@ sighup_restart(void)
313 close_listen_socks(); 314 close_listen_socks();
314 close_startup_pipes(); 315 close_startup_pipes();
315 alarm(0); /* alarm timer persists across exec */ 316 alarm(0); /* alarm timer persists across exec */
317 signal(SIGHUP, SIG_IGN); /* will be restored after exec */
316 execv(saved_argv[0], saved_argv); 318 execv(saved_argv[0], saved_argv);
317 logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0], 319 logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0],
318 strerror(errno)); 320 strerror(errno));
@@ -548,6 +550,10 @@ destroy_sensitive_data(void)
548 key_free(sensitive_data.host_keys[i]); 550 key_free(sensitive_data.host_keys[i]);
549 sensitive_data.host_keys[i] = NULL; 551 sensitive_data.host_keys[i] = NULL;
550 } 552 }
553 if (sensitive_data.host_certificates[i]) {
554 key_free(sensitive_data.host_certificates[i]);
555 sensitive_data.host_certificates[i] = NULL;
556 }
551 } 557 }
552 sensitive_data.ssh1_host_key = NULL; 558 sensitive_data.ssh1_host_key = NULL;
553 memset(sensitive_data.ssh1_cookie, 0, SSH_SESSION_KEY_LENGTH); 559 memset(sensitive_data.ssh1_cookie, 0, SSH_SESSION_KEY_LENGTH);
@@ -574,6 +580,7 @@ demote_sensitive_data(void)
574 if (tmp->type == KEY_RSA1) 580 if (tmp->type == KEY_RSA1)
575 sensitive_data.ssh1_host_key = tmp; 581 sensitive_data.ssh1_host_key = tmp;
576 } 582 }
583 /* Certs do not need demotion */
577 } 584 }
578 585
579 /* We do not clear ssh1_host key and cookie. XXX - Okay Niels? */ 586 /* We do not clear ssh1_host key and cookie. XXX - Okay Niels? */
@@ -720,10 +727,11 @@ list_hostkey_types(void)
720 const char *p; 727 const char *p;
721 char *ret; 728 char *ret;
722 int i; 729 int i;
730 Key *key;
723 731
724 buffer_init(&b); 732 buffer_init(&b);
725 for (i = 0; i < options.num_host_key_files; i++) { 733 for (i = 0; i < options.num_host_key_files; i++) {
726 Key *key = sensitive_data.host_keys[i]; 734 key = sensitive_data.host_keys[i];
727 if (key == NULL) 735 if (key == NULL)
728 continue; 736 continue;
729 switch (key->type) { 737 switch (key->type) {
@@ -735,6 +743,19 @@ list_hostkey_types(void)
735 buffer_append(&b, p, strlen(p)); 743 buffer_append(&b, p, strlen(p));
736 break; 744 break;
737 } 745 }
746 /* If the private key has a cert peer, then list that too */
747 key = sensitive_data.host_certificates[i];
748 if (key == NULL)
749 continue;
750 switch (key->type) {
751 case KEY_RSA_CERT:
752 case KEY_DSA_CERT:
753 if (buffer_len(&b) > 0)
754 buffer_append(&b, ",", 1);
755 p = key_ssh_name(key);
756 buffer_append(&b, p, strlen(p));
757 break;
758 }
738 } 759 }
739 buffer_append(&b, "\0", 1); 760 buffer_append(&b, "\0", 1);
740 ret = xstrdup(buffer_ptr(&b)); 761 ret = xstrdup(buffer_ptr(&b));
@@ -743,20 +764,37 @@ list_hostkey_types(void)
743 return ret; 764 return ret;
744} 765}
745 766
746Key * 767static Key *
747get_hostkey_by_type(int type) 768get_hostkey_by_type(int type, int need_private)
748{ 769{
749 int i; 770 int i;
771 Key *key;
750 772
751 for (i = 0; i < options.num_host_key_files; i++) { 773 for (i = 0; i < options.num_host_key_files; i++) {
752 Key *key = sensitive_data.host_keys[i]; 774 if (type == KEY_RSA_CERT || type == KEY_DSA_CERT)
775 key = sensitive_data.host_certificates[i];
776 else
777 key = sensitive_data.host_keys[i];
753 if (key != NULL && key->type == type) 778 if (key != NULL && key->type == type)
754 return key; 779 return need_private ?
780 sensitive_data.host_keys[i] : key;
755 } 781 }
756 return NULL; 782 return NULL;
757} 783}
758 784
759Key * 785Key *
786get_hostkey_public_by_type(int type)
787{
788 return get_hostkey_by_type(type, 0);
789}
790
791Key *
792get_hostkey_private_by_type(int type)
793{
794 return get_hostkey_by_type(type, 1);
795}
796
797Key *
760get_hostkey_by_index(int ind) 798get_hostkey_by_index(int ind)
761{ 799{
762 if (ind < 0 || ind >= options.num_host_key_files) 800 if (ind < 0 || ind >= options.num_host_key_files)
@@ -770,8 +808,13 @@ get_hostkey_index(Key *key)
770 int i; 808 int i;
771 809
772 for (i = 0; i < options.num_host_key_files; i++) { 810 for (i = 0; i < options.num_host_key_files; i++) {
773 if (key == sensitive_data.host_keys[i]) 811 if (key_is_cert(key)) {
774 return (i); 812 if (key == sensitive_data.host_certificates[i])
813 return (i);
814 } else {
815 if (key == sensitive_data.host_keys[i])
816 return (i);
817 }
775 } 818 }
776 return (-1); 819 return (-1);
777} 820}
@@ -810,9 +853,9 @@ usage(void)
810 fprintf(stderr, "%s, %s\n", 853 fprintf(stderr, "%s, %s\n",
811 SSH_RELEASE, SSLeay_version(SSLEAY_VERSION)); 854 SSH_RELEASE, SSLeay_version(SSLEAY_VERSION));
812 fprintf(stderr, 855 fprintf(stderr,
813"usage: sshd [-46DdeiqTt] [-b bits] [-C connection_spec] [-f config_file]\n" 856"usage: sshd [-46DdeiqTt] [-b bits] [-C connection_spec] [-c host_cert_file]\n"
814" [-g login_grace_time] [-h host_key_file] [-k key_gen_time]\n" 857" [-f config_file] [-g login_grace_time] [-h host_key_file]\n"
815" [-o option] [-p port] [-u len]\n" 858" [-k key_gen_time] [-o option] [-p port] [-u len]\n"
816 ); 859 );
817 exit(1); 860 exit(1);
818} 861}
@@ -983,15 +1026,9 @@ server_listen(void)
983 &on, sizeof(on)) == -1) 1026 &on, sizeof(on)) == -1)
984 error("setsockopt SO_REUSEADDR: %s", strerror(errno)); 1027 error("setsockopt SO_REUSEADDR: %s", strerror(errno));
985 1028
986#ifdef IPV6_V6ONLY
987 /* Only communicate in IPv6 over AF_INET6 sockets. */ 1029 /* Only communicate in IPv6 over AF_INET6 sockets. */
988 if (ai->ai_family == AF_INET6) { 1030 if (ai->ai_family == AF_INET6)
989 if (setsockopt(listen_sock, IPPROTO_IPV6, IPV6_V6ONLY, 1031 sock_set_v6only(listen_sock);
990 &on, sizeof(on)) == -1)
991 error("setsockopt IPV6_V6ONLY: %s",
992 strerror(errno));
993 }
994#endif
995 1032
996 debug("Bind to port %s on %s.", strport, ntop); 1033 debug("Bind to port %s on %s.", strport, ntop);
997 1034
@@ -1245,7 +1282,7 @@ main(int ac, char **av)
1245{ 1282{
1246 extern char *optarg; 1283 extern char *optarg;
1247 extern int optind; 1284 extern int optind;
1248 int opt, i, on = 1; 1285 int opt, i, j, on = 1;
1249 int sock_in = -1, sock_out = -1, newsock = -1; 1286 int sock_in = -1, sock_out = -1, newsock = -1;
1250 const char *remote_ip; 1287 const char *remote_ip;
1251 char *test_user = NULL, *test_host = NULL, *test_addr = NULL; 1288 char *test_user = NULL, *test_host = NULL, *test_addr = NULL;
@@ -1298,6 +1335,14 @@ main(int ac, char **av)
1298 case 'f': 1335 case 'f':
1299 config_file_name = optarg; 1336 config_file_name = optarg;
1300 break; 1337 break;
1338 case 'c':
1339 if (options.num_host_cert_files >= MAX_HOSTCERTS) {
1340 fprintf(stderr, "too many host certificates.\n");
1341 exit(1);
1342 }
1343 options.host_cert_files[options.num_host_cert_files++] =
1344 derelativise_path(optarg);
1345 break;
1301 case 'd': 1346 case 'd':
1302 if (debug_flag == 0) { 1347 if (debug_flag == 0) {
1303 debug_flag = 1; 1348 debug_flag = 1;
@@ -1360,7 +1405,8 @@ main(int ac, char **av)
1360 fprintf(stderr, "too many host keys.\n"); 1405 fprintf(stderr, "too many host keys.\n");
1361 exit(1); 1406 exit(1);
1362 } 1407 }
1363 options.host_key_files[options.num_host_key_files++] = optarg; 1408 options.host_key_files[options.num_host_key_files++] =
1409 derelativise_path(optarg);
1364 break; 1410 break;
1365 case 't': 1411 case 't':
1366 test_flag = 1; 1412 test_flag = 1;
@@ -1547,6 +1593,46 @@ main(int ac, char **av)
1547 exit(1); 1593 exit(1);
1548 } 1594 }
1549 1595
1596 /*
1597 * Load certificates. They are stored in an array at identical
1598 * indices to the public keys that they relate to.
1599 */
1600 sensitive_data.host_certificates = xcalloc(options.num_host_key_files,
1601 sizeof(Key *));
1602 for (i = 0; i < options.num_host_key_files; i++)
1603 sensitive_data.host_certificates[i] = NULL;
1604
1605 for (i = 0; i < options.num_host_cert_files; i++) {
1606 key = key_load_public(options.host_cert_files[i], NULL);
1607 if (key == NULL) {
1608 error("Could not load host certificate: %s",
1609 options.host_cert_files[i]);
1610 continue;
1611 }
1612 if (!key_is_cert(key)) {
1613 error("Certificate file is not a certificate: %s",
1614 options.host_cert_files[i]);
1615 key_free(key);
1616 continue;
1617 }
1618 /* Find matching private key */
1619 for (j = 0; j < options.num_host_key_files; j++) {
1620 if (key_equal_public(key,
1621 sensitive_data.host_keys[j])) {
1622 sensitive_data.host_certificates[j] = key;
1623 break;
1624 }
1625 }
1626 if (j >= options.num_host_key_files) {
1627 error("No matching private key for certificate: %s",
1628 options.host_cert_files[i]);
1629 key_free(key);
1630 continue;
1631 }
1632 sensitive_data.host_certificates[j] = key;
1633 debug("host certificate: #%d type %d %s", j, key->type,
1634 key_type(key));
1635 }
1550 /* Check certain values for sanity. */ 1636 /* Check certain values for sanity. */
1551 if (options.protocol & SSH_PROTO_1) { 1637 if (options.protocol & SSH_PROTO_1) {
1552 if (options.server_key_bits < 512 || 1638 if (options.server_key_bits < 512 ||
@@ -1669,6 +1755,7 @@ main(int ac, char **av)
1669 if (inetd_flag) { 1755 if (inetd_flag) {
1670 server_accept_inetd(&sock_in, &sock_out); 1756 server_accept_inetd(&sock_in, &sock_out);
1671 } else { 1757 } else {
1758 platform_pre_listen();
1672 server_listen(); 1759 server_listen();
1673 1760
1674 if (options.protocol & SSH_PROTO_1) 1761 if (options.protocol & SSH_PROTO_1)
@@ -1758,6 +1845,10 @@ main(int ac, char **av)
1758 sock_in, sock_out, newsock, startup_pipe, config_s[0]); 1845 sock_in, sock_out, newsock, startup_pipe, config_s[0]);
1759 } 1846 }
1760 1847
1848 /* Executed child processes don't need these. */
1849 fcntl(sock_out, F_SETFD, FD_CLOEXEC);
1850 fcntl(sock_in, F_SETFD, FD_CLOEXEC);
1851
1761 /* 1852 /*
1762 * Disable the key regeneration alarm. We will not regenerate the 1853 * Disable the key regeneration alarm. We will not regenerate the
1763 * key since we are no longer in a position to give it to anyone. We 1854 * key since we are no longer in a position to give it to anyone. We
@@ -1909,6 +2000,7 @@ main(int ac, char **av)
1909 2000
1910 /* prepare buffer to collect messages to display to user after login */ 2001 /* prepare buffer to collect messages to display to user after login */
1911 buffer_init(&loginmsg); 2002 buffer_init(&loginmsg);
2003 auth_debug_reset();
1912 2004
1913 if (use_privsep) 2005 if (use_privsep)
1914 if (privsep_preauth(authctxt) == 1) 2006 if (privsep_preauth(authctxt) == 1)
@@ -2314,7 +2406,8 @@ do_ssh2_kex(void)
2314 kex->server = 1; 2406 kex->server = 1;
2315 kex->client_version_string=client_version_string; 2407 kex->client_version_string=client_version_string;
2316 kex->server_version_string=server_version_string; 2408 kex->server_version_string=server_version_string;
2317 kex->load_host_key=&get_hostkey_by_type; 2409 kex->load_host_public_key=&get_hostkey_public_by_type;
2410 kex->load_host_private_key=&get_hostkey_private_by_type;
2318 kex->host_key_index=&get_hostkey_index; 2411 kex->host_key_index=&get_hostkey_index;
2319 2412
2320 xxx_kex = kex; 2413 xxx_kex = kex;
diff --git a/sshd_config b/sshd_config
index e03b3b15f..69ff6b600 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 6c3ef6947..6e3c69d05 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
@@ -182,16 +182,16 @@ PAM or though authentication styles supported in
182The default is 182The default is
183.Dq yes . 183.Dq yes .
184.It Cm ChrootDirectory 184.It Cm ChrootDirectory
185Specifies a path to 185Specifies the pathname of a directory to
186.Xr chroot 2 186.Xr chroot 2
187to after authentication. 187to after authentication.
188This path, and all its components, must be root-owned directories that are 188All components of the pathname must be root-owned directories that are
189not writable by any other user or group. 189not writable by any other user or group.
190After the chroot, 190After the chroot,
191.Xr sshd 8 191.Xr sshd 8
192changes the working directory to the user's home directory. 192changes the working directory to the user's home directory.
193.Pp 193.Pp
194The path may contain the following tokens that are expanded at runtime once 194The pathname may contain the following tokens that are expanded at runtime once
195the connecting user has been authenticated: %% is replaced by a literal '%', 195the connecting user has been authenticated: %% is replaced by a literal '%',
196%h is replaced by the home directory of the user being authenticated, and 196%h is replaced by the home directory of the user being authenticated, and
197%u is replaced by the username of that user. 197%u is replaced by the username of that user.
@@ -439,6 +439,14 @@ uses the name supplied by the client rather than
439attempting to resolve the name from the TCP connection itself. 439attempting to resolve the name from the TCP connection itself.
440The default is 440The default is
441.Dq no . 441.Dq no .
442.It Cm HostCertificate
443Specifies a file containing a public host certificate.
444The certificate's public key must match a private host key already specified
445by
446.Cm HostKey .
447The default behaviour of
448.Xr sshd 8
449is not to load any certificates.
442.It Cm HostKey 450.It Cm HostKey
443Specifies a file containing a private host key 451Specifies a file containing a private host key
444used by SSH. 452used by SSH.
@@ -642,6 +650,7 @@ Available keywords are
642.Cm PermitEmptyPasswords , 650.Cm PermitEmptyPasswords ,
643.Cm PermitOpen , 651.Cm PermitOpen ,
644.Cm PermitRootLogin , 652.Cm PermitRootLogin ,
653.Cm PubkeyAuthentication ,
645.Cm RhostsRSAAuthentication , 654.Cm RhostsRSAAuthentication ,
646.Cm RSAAuthentication , 655.Cm RSAAuthentication ,
647.Cm X11DisplayOffset , 656.Cm X11DisplayOffset ,
@@ -820,7 +829,7 @@ and
820.Sq 2 . 829.Sq 2 .
821Multiple versions must be comma-separated. 830Multiple versions must be comma-separated.
822The default is 831The default is
823.Dq 2,1 . 832.Sq 2 .
824Note that the order of the protocol list does not indicate preference, 833Note that the order of the protocol list does not indicate preference,
825because the client selects among multiple protocol versions offered 834because the client selects among multiple protocol versions offered
826by the server. 835by the server.
@@ -833,6 +842,11 @@ Specifies whether public key authentication is allowed.
833The default is 842The default is
834.Dq yes . 843.Dq yes .
835Note that this option applies to protocol version 2 only. 844Note that this option applies to protocol version 2 only.
845.It Cm RevokedKeys
846Specifies a list of revoked public keys.
847Keys listed in this file will be refused for public key authentication.
848Note that if this file is not readable, then public key authentication will
849be refused for all users.
836.It Cm RhostsRSAAuthentication 850.It Cm RhostsRSAAuthentication
837Specifies whether rhosts or /etc/hosts.equiv authentication together 851Specifies whether rhosts or /etc/hosts.equiv authentication together
838with successful RSA host authentication is allowed. 852with successful RSA host authentication is allowed.
@@ -856,6 +870,9 @@ This is normally desirable because novices sometimes accidentally leave their
856directory or files world-writable. 870directory or files world-writable.
857The default is 871The default is
858.Dq yes . 872.Dq yes .
873Note that this does not apply to
874.Cm ChrootDirectory ,
875whose permissions and ownership are checked unconditionally.
859.It Cm Subsystem 876.It Cm Subsystem
860Configures an external subsystem (e.g. file transfer daemon). 877Configures an external subsystem (e.g. file transfer daemon).
861Arguments should be a subsystem name and a command (with optional arguments) 878Arguments should be a subsystem name and a command (with optional arguments)
@@ -905,6 +922,22 @@ This avoids infinitely hanging sessions.
905.Pp 922.Pp
906To disable TCP keepalive messages, the value should be set to 923To disable TCP keepalive messages, the value should be set to
907.Dq no . 924.Dq no .
925.It Cm TrustedUserCAKeys
926Specifies a file containing public keys of certificate authorities that are
927trusted to sign user certificates for authentication.
928Keys are listed one per line; empty lines and comments starting with
929.Ql #
930are allowed.
931If a certificate is presented for authentication and has its signing CA key
932listed in this file, then it may be used for authentication for any user
933listed in the certificate's principals list.
934Note that certificates that lack a list of principals will not be permitted
935for authentication using
936.Cm TrustedUserCAKeys .
937For more details on certificates, see the
938.Sx CERTIFICATES
939section in
940.Xr ssh-keygen 1 .
908.It Cm UseDNS 941.It Cm UseDNS
909Specifies whether 942Specifies whether
910.Xr sshd 8 943.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 721ebdea0..c604c753c 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 SSH_VERSION SSH_PORTABLE 6#define SSH_RELEASE SSH_VERSION SSH_PORTABLE