diff -ru openssh-2.9p2/ChangeLog openssh-2.9.9p1/ChangeLog --- openssh-2.9p2/ChangeLog 2001-06-17 13:40:50.000000000 +1000 +++ openssh-2.9.9p1/ChangeLog 2001-09-25 22:22:54.000000000 +1000 @@ -1,24 +1,1208 @@ -20010617 - - (djm) Pull in small fix from -CURRENT for session.c: - typo, use pid not s->pid, mstone@cs.loyola.edu +20010925 + - (djm) Pull in auth-krb5.c from OpenBSD CVS. NB. it is not currently used. + - (djm) Sync $sysconfdir/moduli + - (djm) Add AC_SYS_LARGEFILE configure test + - (djm) Avoid bad and unportable sprintf usage in compat code + +20010923 + - (bal) updated ssh.c to mirror minor getopts 'extern int' formating done + by stevesk@ + - (bal) Removed 'extern int optopt;' since it is dead wood. + - (bal) Updated all *.specs for 2.9.9p1 and updated version.h + +20010923 + - (bal) OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/09/23 11:09:13 + [authfile.c] + relax permission check for private key files. + - markus@cvs.openbsd.org 2001/09/23 09:58:13 + [LICENCE] + new rijndael implementation + +20010920 + - (tim) [scard/Makefile.in] Don't strip the Java binary + - (stevesk) sun_len, SUN_LEN() configure stuff no longer required + - (bal) OpenBSD CVS Sync + - stevesk@cvs.openbsd.org 2001/09/20 00:15:54 + [sshd.8] + fix ClientAliveCountMax + - markus@cvs.openbsd.org 2001/09/20 13:46:48 + [auth2.c] + key_read returns now -1 or 1 + - markus@cvs.openbsd.org 2001/09/20 13:50:40 + [compat.c compat.h ssh.c] + bug compat: request a dummy channel for -N (no shell) sessions + + cleanup; vinschen@redhat.com + - mouring@cvs.openbsd.org 2001/09/20 20:57:51 + [sshd_config] + CheckMail removed. OKed stevesk@ + +20010919 + - (bal) OpenBSD Sync + - markus@cvs.openbsd.org 2001/09/19 10:08:51 + [sshd.8] + command=xxx applies to subsystem now, too + - markus@cvs.openbsd.org 2001/09/19 13:23:29 + [key.c] + key_read() now returns -1 on type mismatch, too + - stevesk@cvs.openbsd.org 2001/09/19 19:24:19 + [readconf.c readconf.h scp.c sftp.c ssh.1] + add ClearAllForwardings ssh option and set it in scp and sftp; ok + markus@ + - stevesk@cvs.openbsd.org 2001/09/19 19:35:30 + [authfd.c] + use sizeof addr vs. SUN_LEN(addr) for sockaddr_un. Stevens + blesses this and we do it this way elsewhere. this helps in + portable because not all systems have SUN_LEN() and + sockaddr_un.sun_len. ok markus@ + - stevesk@cvs.openbsd.org 2001/09/19 21:04:53 + [sshd.8] + missing -t in usage + - stevesk@cvs.openbsd.org 2001/09/19 21:41:57 + [sshd.8] + don't advertise -V in usage; ok markus@ + - (bal) openbsd-compat/vis.[ch] is dead wood. Removed. + +20010918 + - (djm) Configure support for smartcards. Based on Ben's work. + - (djm) Revert setgroups call, it causes problems on OS-X + - (djm) Avoid warning on BSDgetopt + - (djm) More makefile infrastructre for smartcard support, also based + on Ben's work + - (djm) Specify --datadir in RPM spec files so smartcard applet gets + put somewhere sane. Add Ssh.bin to manifest. + - (djm) Make smartcard support conditional in Redhat RPM spec + - (bal) LICENCE update. Has not been done in a while. + - (stevesk) nchan.c: we use X/Open Sockets on HP-UX now so shutdown(2) + returns ENOTCONN vs. EINVAL for socket not connected; remove EINVAL + check. ok Lutz Jaenicke + - (bal) OpenBSD CVS Sync + - stevesk@cvs.openbsd.org 2001/09/17 17:57:57 + [scp.1 scp.c sftp.1 sftp.c] + add -Fssh_config option; ok markus@ + - stevesk@cvs.openbsd.org 2001/09/17 19:27:15 + [kexdh.c kexgex.c key.c key.h ssh-dss.c ssh-keygen.c ssh-rsa.c] + u_char*/char* cleanup; ok markus + - markus@cvs.openbsd.org 2001/09/17 20:22:14 + [scard.c] + never keep a connection to the smartcard open. + allows ssh-keygen -D U while the agent is running; report from + jakob@ + - stevesk@cvs.openbsd.org 2001/09/17 20:38:09 + [sftp.1 sftp.c] + cleanup and document -1, -s and -S; ok markus@ + - markus@cvs.openbsd.org 2001/09/17 20:50:22 + [key.c ssh-keygen.c] + better error handling if you try to export a bad key to ssh.com + - markus@cvs.openbsd.org 2001/09/17 20:52:47 + [channels.c channels.h clientloop.c] + try to fix agent-forwarding-backconnection-bug, as seen on HPUX, + for example; with Lutz.Jaenicke@aet.TU-Cottbus.DE, + - markus@cvs.openbsd.org 2001/09/17 21:04:02 + [channels.c serverloop.c] + don't send fake dummy packets on CR (\r) + bugreport from yyua@cs.sfu.ca via solar@@openwall.com + - markus@cvs.openbsd.org 2001/09/17 21:09:47 + [compat.c] + more versions suffering the SSH_BUG_DEBUG bug; + 3.0.x reported by dbutts@maddog.storability.com + - stevesk@cvs.openbsd.org 2001/09/17 23:56:07 + [scp.1] + missing -B in usage string + +20010917 + - (djm) x11-ssh-askpass-1.2.4 in RPM spec, revert workarounds + - (tim) [includes.h openbsd-compat/getopt.c openbsd-compat/getopt.h] + rename getopt() to BSDgetopt() to keep form conflicting with + system getopt(). + [Makefile.in configure.in] disable filepriv until I can add + missing procpriv calls. + +20010916 + - (djm) Workaround XFree breakage in RPM spec file + - (bal) OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/09/16 14:46:54 + [session.c] + calls krb_afslog() after setting $HOME; mattiasa@e.kth.se; fixes + pr 1943b + +20010915 + - (djm) Make do_pre_login static to avoid prototype #ifdef hell + - (djm) Sync scard/ stuff + - (djm) Redhat spec file cleanups from Pekka Savola and + Redhat + - (djm) Redhat initscript config sanity checking from Pekka Savola + + - (djm) Clear supplemental groups at sshd start to prevent them from + being propogated to random PAM modules. Based on patch from Redhat via + Pekka Savola + - (djm) Make sure rijndael.c picks config.h + - (djm) Ensure that u_char gets defined + +20010914 + - (bal) OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/09/13 + [rijndael.c rijndael.h] + missing $OpenBSD + - markus@cvs.openbsd.org 2001/09/14 + [session.c] + command=xxx overwrites subsystems, too + - markus@cvs.openbsd.org 2001/09/14 + [sshd.c] + typo + +20010913 + - (bal) OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/08/23 11:31:59 + [cipher.c cipher.h] + switch to the optimised AES reference code from + http://www.esat.kuleuven.ac.be/~rijmen/rijndael/rijndael-fst-3.0.zip + +20010912 + - (bal) OpenBSD CVS Sync + - jakob@cvs.openbsd.org 2001/08/16 19:18:34 + [servconf.c servconf.h session.c sshd.8] + deprecate CheckMail. ok markus@ + - stevesk@cvs.openbsd.org 2001/08/16 20:14:57 + [ssh.1 sshd.8] + document case sensitivity for ssh, sshd and key file + options and arguments; ok markus@ + - stevesk@cvs.openbsd.org 2001/08/17 18:59:47 + [servconf.h] + typo in comment + - stevesk@cvs.openbsd.org 2001/08/21 21:47:42 + [ssh.1 sshd.8] + minor typos and cleanup + - stevesk@cvs.openbsd.org 2001/08/22 16:21:21 + [ssh.1] + hostname not optional; ok markus@ + - stevesk@cvs.openbsd.org 2001/08/22 16:30:02 + [sshd.8] + no rexd; ok markus@ + - stevesk@cvs.openbsd.org 2001/08/22 17:45:16 + [ssh.1] + document cipher des for protocol 1; ok deraadt@ + - camield@cvs.openbsd.org 2001/08/23 17:59:31 + [sshd.c] + end request with 0, not NULL + ok markus@ + - stevesk@cvs.openbsd.org 2001/08/23 18:02:48 + [ssh-agent.1] + fix usage; ok markus@ + - stevesk@cvs.openbsd.org 2001/08/23 18:08:59 + [ssh-add.1 ssh-keyscan.1] + minor cleanup + - danh@cvs.openbsd.org 2001/08/27 22:02:13 + [ssh-keyscan.c] + fix memory fault if non-existent filename is given to the -f option + ok markus@ + - markus@cvs.openbsd.org 2001/08/28 09:51:26 + [readconf.c] + don't set DynamicForward unless Host matches + - markus@cvs.openbsd.org 2001/08/28 15:39:48 + [ssh.1 ssh.c] + allow: ssh -F configfile host + - markus@cvs.openbsd.org 2001/08/29 20:44:03 + [scp.c] + clear the malloc'd buffer, otherwise source() will leak malloc'd + memory; ok theo@ + - stevesk@cvs.openbsd.org 2001/08/29 23:02:21 + [sshd.8] + add text about -u0 preventing DNS requests; ok markus@ + - stevesk@cvs.openbsd.org 2001/08/29 23:13:10 + [ssh.1 ssh.c] + document -D and DynamicForward; ok markus@ + - stevesk@cvs.openbsd.org 2001/08/29 23:27:23 + [ssh.c] + validate ports for -L/-R; ok markus@ + - stevesk@cvs.openbsd.org 2001/08/29 23:39:40 + [ssh.1 sshd.8] + additional documentation for GatewayPorts; ok markus@ + - naddy@cvs.openbsd.org 2001/08/30 15:42:36 + [ssh.1] + add -D to synopsis line; ok markus@ + - stevesk@cvs.openbsd.org 2001/08/30 16:04:35 + [readconf.c ssh.1] + validate ports for LocalForward/RemoteForward. + add host/port alternative syntax for IPv6 (like -L/-R). + ok markus@ + - stevesk@cvs.openbsd.org 2001/08/30 20:36:34 + [auth-options.c sshd.8] + validate ports for permitopen key file option. add host/port + alternative syntax for IPv6. ok markus@ + - markus@cvs.openbsd.org 2001/08/30 22:22:32 + [ssh-keyscan.c] + do not pass pointers to longjmp; fix from wayne@blorf.net + - markus@cvs.openbsd.org 2001/08/31 11:46:39 + [sshconnect2.c] + disable kbd-interactive if we don't get SSH2_MSG_USERAUTH_INFO_REQUEST + messages + - stevesk@cvs.openbsd.org 2001/09/03 20:58:33 + [readconf.c readconf.h ssh.c] + fatal() for nonexistent -Fssh_config. ok markus@ + - deraadt@cvs.openbsd.org 2001/09/05 06:23:07 + [scp.1 sftp.1 ssh.1 ssh-agent.1 sshd.8 ssh-keygen.1 ssh-keyscan.1] + avoid first person in manual pages + - stevesk@cvs.openbsd.org 2001/09/12 18:18:25 + [scp.c] + don't forward agent for non third-party copies; ok markus@ + +20010815 + - (bal) Fixed stray code in readconf.c that went in by mistake. + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/08/07 10:37:46 + [authfd.c authfd.h] + extended failure messages from galb@vandyke.com + - deraadt@cvs.openbsd.org 2001/08/08 07:16:58 + [scp.1] + when describing the -o option, give -o Protocol=1 as the specific example + since we are SICK AND TIRED of clueless people who cannot have difficulty + thinking on their own. + - markus@cvs.openbsd.org 2001/08/08 18:20:15 + [uidswap.c] + permanently_set_uid is a noop if user is not privilegued; + fixes bug on solaris; from sbi@uchicago.edu + - markus@cvs.openbsd.org 2001/08/08 21:34:19 + [uidswap.c] + undo last change; does not work for sshd + - jakob@cvs.openbsd.org 2001/08/11 22:51:27 + [ssh.c tildexpand.c] + fix more paths beginning with "//"; . + ok markus@ + - stevesk@cvs.openbsd.org 2001/08/13 23:38:54 + [scp.c] + don't need main prototype (also sync with rcp); ok markus@ + - markus@cvs.openbsd.org 2001/08/14 09:23:02 + [sftp.1 sftp-int.c] + "bye"; hk63a@netscape.net + - stevesk@cvs.openbsd.org 2001/08/14 17:54:29 + [scp.1 sftp.1 ssh.1] + consistent documentation and example of ``-o ssh_option'' for sftp and + scp; document keyword=argument for ssh. + - (bal) QNX resync. OK tim@ + +20010814 + - (stevesk) sshpty.c, cray.[ch]: whitespace, formatting and cleanup + for some #ifdef _CRAY code; ok wendyp@cray.com + - (stevesk) sshpty.c: return 0 on error in cray pty code; + ok wendyp@cray.com + - (stevesk) bsd-cray.c: utmp strings are not C strings + - (stevesk) bsd-cray.c: more cleanup; ok wendyp@cray.com + +20010812 + - (djm) Fix detection of long long int support. Based on patch from + Michael Stone . ok stevesk, tim + +20010808 + - (bal) Minor correction to inet_ntop.h. _BSD_RRESVPORT_H should be + _BSD_INET_NTOP_H. Pointed out by Mark Miller + +20010807 + - (tim) [configure.in sshconnect.c openbsd-compat/Makefile.in + openbsd-compat/openbsd-compat.h ] Add inet_ntop.c inet_ntop.h back + in. Needed for sshconnect.c + [sshconnect.c] fix INET6_ADDRSTRLEN for non IPv6 machines + [configure.in] make tests with missing libraries fail + patch by Wendy Palm + Added openbsd-compat/bsd-cray.h. Selective patches from + William L. Jones + +20010806 + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/07/22 21:32:27 + [sshpty.c] + update comment + - pvalchev@cvs.openbsd.org 2001/07/22 21:32:42 + [ssh.1] + There is no option "Compress", point to "Compression" instead; ok + markus + - markus@cvs.openbsd.org 2001/07/22 22:04:19 + [readconf.c ssh.1] + enable challenge-response auth by default; ok millert@ + - markus@cvs.openbsd.org 2001/07/22 22:24:16 + [sshd.8] + Xr login.conf + - markus@cvs.openbsd.org 2001/07/23 09:06:28 + [sshconnect2.c] + reorder default sequence of userauth methods to match ssh behaviour: + hostbased,publickey,keyboard-interactive,password + - markus@cvs.openbsd.org 2001/07/23 12:47:05 + [ssh.1] + sync PreferredAuthentications + - aaron@cvs.openbsd.org 2001/07/23 14:14:18 + [ssh-keygen.1] + Fix typo. + - stevesk@cvs.openbsd.org 2001/07/23 18:14:58 + [auth2.c auth-rsa.c] + use %lu; ok markus@ + - stevesk@cvs.openbsd.org 2001/07/23 18:21:46 + [xmalloc.c] + no zero size xstrdup() error; ok markus@ + - markus@cvs.openbsd.org 2001/07/25 11:59:35 + [scard.c] + typo in comment + - markus@cvs.openbsd.org 2001/07/25 14:35:18 + [readconf.c ssh.1 ssh.c sshconnect.c] + cleanup connect(); connection_attempts 4 -> 1; from + eivind@freebsd.org + - stevesk@cvs.openbsd.org 2001/07/26 17:18:22 + [sshd.8 sshd.c] + add -t option to test configuration file and keys; pekkas@netcore.fi + ok markus@ + - rees@cvs.openbsd.org 2001/07/26 20:04:27 + [scard.c ssh-keygen.c] + Inquire Cyberflex class for 0xf0 cards + change aid to conform to 7816-5 + remove gratuitous fid selects + - millert@cvs.openbsd.org 2001/07/27 14:50:45 + [ssh.c] + If smart card support is compiled in and a smart card is being used + for authentication, make it the first method used. markus@ OK + - deraadt@cvs.openbsd.org 2001/07/27 17:26:16 + [scp.c] + shorten lines + - markus@cvs.openbsd.org 2001/07/28 09:21:15 + [sshd.8] + cleanup some RSA vs DSA vs SSH1 vs SSH2 notes + - mouring@cvs.openbsd.org 2001/07/29 17:02:46 + [scp.1] + Clarified -o option in scp.1 OKed by Markus@ + - jakob@cvs.openbsd.org 2001/07/30 16:06:07 + [scard.c scard.h] + better errorcodes from sc_*; ok markus@ + - stevesk@cvs.openbsd.org 2001/07/30 16:23:30 + [rijndael.c rijndael.h] + new BSD-style license: + Brian Gladman : + >I have updated my code at: + >http://fp.gladman.plus.com/cryptography_technology/rijndael/index.htm + >with a copyright notice as follows: + >[...] + >I am not sure which version of my old code you are using but I am + >happy for the notice above to be substituted for my existing copyright + >intent if this meets your purpose. + - jakob@cvs.openbsd.org 2001/07/31 08:41:10 + [scard.c] + do not complain about missing smartcards. ok markus@ + - jakob@cvs.openbsd.org 2001/07/31 09:28:44 + [readconf.c readconf.h ssh.1 ssh.c] + add 'SmartcardDevice' client option to specify which smartcard device + is used to access a smartcard used for storing the user's private RSA + key. ok markus@. + - jakob@cvs.openbsd.org 2001/07/31 12:42:50 + [sftp-int.c sftp-server.c] + avoid paths beginning with "//"; + ok markus@ + - jakob@cvs.openbsd.org 2001/07/31 12:53:34 + [scard.c] + close smartcard connection if card is missing + - markus@cvs.openbsd.org 2001/08/01 22:03:33 + [authfd.c authfd.h readconf.c readconf.h scard.c scard.h ssh-add.c + ssh-agent.c ssh.c] + use strings instead of ints for smartcard reader ids + - markus@cvs.openbsd.org 2001/08/01 22:16:45 + [ssh.1 sshd.8] + refer to current ietf drafts for protocol v2 + - markus@cvs.openbsd.org 2001/08/01 23:33:09 + [ssh-keygen.c] + allow uploading RSA keys for non-default AUT0 (sha1 over passphrase + like sectok). + - markus@cvs.openbsd.org 2001/08/01 23:38:45 + [scard.c ssh.c] + support finish rsa keys. + free public keys after login -> call finish -> close smartcard. + - markus@cvs.openbsd.org 2001/08/02 00:10:17 + [ssh-keygen.c] + add -D readerid option (download, i.e. print public RSA key to stdout). + check for card present when uploading keys. + use strings instead of ints for smartcard reader ids, too. + - jakob@cvs.openbsd.org 2001/08/02 08:58:35 + [ssh-keygen.c] + change -u (upload smartcard key) to -U. ok markus@ + - jakob@cvs.openbsd.org 2001/08/02 15:06:52 + [ssh-keygen.c] + more verbose usage(). ok markus@ + - jakob@cvs.openbsd.org 2001/08/02 15:07:23 + [ssh-keygen.1] + document smartcard upload/download. ok markus@ + - jakob@cvs.openbsd.org 2001/08/02 15:32:10 + [ssh.c] + add smartcard to usage(). ok markus@ + - jakob@cvs.openbsd.org 2001/08/02 15:43:57 + [ssh-agent.c ssh.c ssh-keygen.c] + add /* SMARTCARD */ to #else/#endif. ok markus@ + - jakob@cvs.openbsd.org 2001/08/02 16:14:05 + [scard.c ssh-agent.c ssh.c ssh-keygen.c] + clean up some /* SMARTCARD */. ok markus@ + - mpech@cvs.openbsd.org 2001/08/02 18:37:35 + [ssh-keyscan.1] + o) .Sh AUTHOR -> .Sh AUTHORS; + o) .Sh EXAMPLE -> .Sh EXAMPLES; + o) Delete .Sh OPTIONS. Text moved to .Sh DESCRIPTION; + + millert@ ok + - jakob@cvs.openbsd.org 2001/08/03 10:31:19 + [ssh-add.1] + document smartcard options. ok markus@ + - jakob@cvs.openbsd.org 2001/08/03 10:31:30 + [ssh-add.c ssh-agent.c ssh-keyscan.c] + improve usage(). ok markus@ + - markus@cvs.openbsd.org 2001/08/05 23:18:20 + [ssh-keyscan.1 ssh-keyscan.c] + ssh 2 support; from wayned@users.sourceforge.net + - markus@cvs.openbsd.org 2001/08/05 23:29:58 + [ssh-keyscan.c] + make -t dsa work with commercial servers, too + - stevesk@cvs.openbsd.org 2001/08/06 19:47:05 + [scp.c] + use alarm vs. setitimer for portable; ok markus@ + - (bal) ssh-keyscan double -lssh hack due to seed_rng(). + - (bal) Second around of UNICOS patches. A few other things left. + Patches by William L. Jones + +20010803 + - (djm) Fix interrupted read in entropy gatherer. Spotted by markus@ on + a fast UltraSPARC. + +20010726 + - (stevesk) use mysignal() in protocol 1 loop now that the SIGCHLD + handler has converged. + +20010725 + - (bal) Added 'install-nokeys' to Makefile to assist package builders. + +20010724 + - (bal) 4711 not 04711 for ssh binary. + +20010722 + - (bal) Starting the Unicossmk merger. File merged TODO, configure.in, + myproposal.h, ssh_prng_cmds.in, and openbsd-compat/Makefile.in. + Added openbsd-compat/bsd-cray.c. Rest will be merged after + approval. Selective patches from William L. Jones + + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/07/18 21:10:43 + [sshpty.c] + pr #1946, allow sshd if /dev is readonly + - stevesk@cvs.openbsd.org 2001/07/18 21:40:40 + [ssh-agent.c] + chdir("/") from bbraun@synack.net; ok markus@ + - stevesk@cvs.openbsd.org 2001/07/19 00:41:44 + [ssh.1] + escape chars are below now + - markus@cvs.openbsd.org 2001/07/20 14:46:11 + [ssh-agent.c] + do not exit() from signal handlers; ok deraadt@ + - stevesk@cvs.openbsd.org 2001/07/20 18:41:51 + [ssh.1] + "the" command line + +20010719 + - (tim) [configure.in] put inet_aton back in AC_CHECK_FUNCS. + report from Mark Miller + +20010718 + - OpenBSD CVS Sync + - stevesk@cvs.openbsd.org 2001/07/14 15:10:17 + [readpass.c sftp-client.c sftp-common.c sftp-glob.c] + delete spurious #includes; ok deraadt@ markus@ + - markus@cvs.openbsd.org 2001/07/15 16:17:08 + [serverloop.c] + schedule client alive for ssh2 only, greg@cheers.bungi.com + - stevesk@cvs.openbsd.org 2001/07/15 16:57:21 + [ssh-agent.1] + -d will not fork; ok markus@ + - stevesk@cvs.openbsd.org 2001/07/15 16:58:29 + [ssh-agent.c] + typo in usage; ok markus@ + - markus@cvs.openbsd.org 2001/07/17 20:48:42 + [ssh-agent.c] + update maxfd if maxfd is closed; report from jmcelroy@dtgnet.com + - markus@cvs.openbsd.org 2001/07/17 21:04:58 + [channels.c channels.h clientloop.c nchan.c serverloop.c] + keep track of both maxfd and the size of the malloc'ed fdsets. + update maxfd if maxfd gets closed. + - mouring@cvs.openbsd.org 2001/07/18 16:45:52 + [scp.c] + Missing -o in scp usage() + - (bal) Cleaned up trailing spaces in ChangeLog. + - (bal) Allow sshd to switch user context without password for Cygwin. + Patch by Corinna Vinschen + - (bal) Updated cygwin README and ssh-host-config. Patch by + Corinna Vinschen + +20010715 + - (bal) Set "BROKEN_GETADDRINFO" for darwin platform. Reported by + Josh Larios + - (tim) put openssh/openbsd-compat/inet_aton.[ch] back in. + needed by openbsd-compat/fake-getaddrinfo.c + +20010714 + - (stevesk) change getopt() declaration + - (stevesk) configure.in: use ll suffix for long long constant + in snprintf() test + +20010713 + - (djm) Enable /etc/nologin check on PAM systems, as some lack the + pam_nologin module. Report from William Yodlowsky + + - (djm) Revert dirname fix, a better one is on its way. + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/07/04 22:47:19 + [ssh-agent.c] + ignore SIGPIPE when debugging, too + - markus@cvs.openbsd.org 2001/07/04 23:13:10 + [scard.c scard.h ssh-agent.c] + handle card removal more gracefully, add sc_close() to scard.h + - markus@cvs.openbsd.org 2001/07/04 23:39:07 + [ssh-agent.c] + for smartcards remove both RSA1/2 keys + - markus@cvs.openbsd.org 2001/07/04 23:49:27 + [ssh-agent.c] + handle mutiple adds of the same smartcard key + - espie@cvs.openbsd.org 2001/07/05 11:43:33 + [sftp-glob.c] + Directly cast to the right type. Ok markus@ + - stevesk@cvs.openbsd.org 2001/07/05 20:32:47 + [sshconnect1.c] + statement after label; ok dugsong@ + - stevesk@cvs.openbsd.org 2001/07/08 15:23:38 + [servconf.c] + fix ``MaxStartups max''; ok markus@ + - fgsch@cvs.openbsd.org 2001/07/09 05:58:47 + [ssh.c] + Use getopt(3); markus@ ok. + - deraadt@cvs.openbsd.org 2001/07/09 07:04:53 + [session.c sftp-int.c] + correct type on last arg to execl(); nordin@cse.ogi.edu + - markus@cvs.openbsd.org 2001/07/10 21:49:12 + [readpass.c] + don't panic if fork or pipe fail (just return an empty passwd). + - itojun@cvs.openbsd.org 2001/07/11 00:24:53 + [servconf.c] + make it compilable in all 4 combination of KRB4/KRB5 settings. + dugsong ok + XXX isn't it sensitive to the order of -I/usr/include/kerberosIV and + -I/usr/include/kerberosV? + - markus@cvs.openbsd.org 2001/07/11 16:29:59 + [ssh.c] + sort options string, fix -p, add -k + - markus@cvs.openbsd.org 2001/07/11 18:26:15 + [auth.c] + no need to call dirname(pw->pw_dir). + note that dirname(3) modifies its argument on some systems. + - (djm) Reorder Makefile.in so clean targets work a little better when + run directly from Makefile.in + - (djm) Pull in getopt(3) from OpenBSD libc for the optreset extension. + +20010711 + - (djm) dirname(3) may modify its argument on glibc and other systems. + Patch from markus@, spotted by Tom Holroyd + +20010704 + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/06/25 08:25:41 + [channels.c channels.h cipher.c clientloop.c compat.c compat.h + hostfile.c kex.c kex.h key.c key.h nchan.c packet.c serverloop.c + session.c session.h sftp-server.c ssh-add.c ssh-agent.c uuencode.h] + update copyright for 2001 + - markus@cvs.openbsd.org 2001/06/25 17:18:27 + [ssh-keygen.1] + sshd(8) will never read the private keys, but ssh(1) does; + hugh@mimosa.com + - provos@cvs.openbsd.org 2001/06/25 17:54:47 + [auth.c auth.h auth-rsa.c] + terminate secure_filename checking after checking homedir. that way + it works on AFS. okay markus@ + - stevesk@cvs.openbsd.org 2001/06/25 20:26:37 + [auth2.c sshconnect2.c] + prototype cleanup; ok markus@ + - markus@cvs.openbsd.org 2001/06/26 02:47:07 + [ssh-keygen.c] + allow loading a private RSA key to a cyberflex card. + - markus@cvs.openbsd.org 2001/06/26 04:07:06 + [ssh-agent.1 ssh-agent.c] + add debug flag + - markus@cvs.openbsd.org 2001/06/26 04:59:59 + [authfd.c authfd.h ssh-add.c] + initial support for smartcards in the agent + - markus@cvs.openbsd.org 2001/06/26 05:07:43 + [ssh-agent.c] + update usage + - markus@cvs.openbsd.org 2001/06/26 05:33:34 + [ssh-agent.c] + more smartcard support. + - mpech@cvs.openbsd.org 2001/06/26 05:48:07 + [sshd.8] + remove unnecessary .Pp between .It; + millert@ ok + - markus@cvs.openbsd.org 2001/06/26 05:50:11 + [auth2.c] + new interface for secure_filename() + - itojun@cvs.openbsd.org 2001/06/26 06:32:58 + [atomicio.h authfd.h authfile.h auth.h auth-options.h bufaux.h + buffer.h canohost.h channels.h cipher.h clientloop.h compat.h + compress.h crc32.h deattack.h dh.h dispatch.h groupaccess.h + hostfile.h kex.h key.h log.h mac.h match.h misc.h mpaux.h packet.h + radix.h readconf.h readpass.h rsa.h] + prototype pedant. not very creative... + - () -> (void) + - no variable names + - itojun@cvs.openbsd.org 2001/06/26 06:33:07 + [servconf.h serverloop.h session.h sftp-client.h sftp-common.h + sftp-glob.h sftp-int.h sshconnect.h ssh-dss.h sshlogin.h sshpty.h + ssh-rsa.h tildexpand.h uidswap.h uuencode.h xmalloc.h] + prototype pedant. not very creative... + - () -> (void) + - no variable names + - dugsong@cvs.openbsd.org 2001/06/26 16:15:25 + [auth1.c auth.h auth-krb4.c auth-passwd.c readconf.c readconf.h + servconf.c servconf.h session.c sshconnect1.c sshd.c] + Kerberos v5 support for SSH1, mostly from Assar Westerlund + and Bjorn Gronvall . markus@ ok + - markus@cvs.openbsd.org 2001/06/26 17:25:34 + [ssh.1] + document SSH_ASKPASS; fubob@MIT.EDU + - markus@cvs.openbsd.org 2001/06/26 17:27:25 + [authfd.h authfile.h auth.h auth-options.h bufaux.h buffer.h + canohost.h channels.h cipher.h clientloop.h compat.h compress.h + crc32.h deattack.h dh.h dispatch.h groupaccess.c groupaccess.h + hostfile.h kex.h key.h log.c log.h mac.h misc.c misc.h mpaux.h + packet.h radix.h readconf.h readpass.h rsa.h servconf.h serverloop.h + session.h sftp-common.c sftp-common.h sftp-glob.h sftp-int.h + sshconnect.h ssh-dss.h sshlogin.h sshpty.h ssh-rsa.h sshtty.h + tildexpand.h uidswap.h uuencode.h xmalloc.h] + remove comments from .h, since they are cut&paste from the .c files + and out of sync + - dugsong@cvs.openbsd.org 2001/06/26 17:41:49 + [servconf.c] + #include + - markus@cvs.openbsd.org 2001/06/26 20:14:11 + [key.c key.h ssh.c sshconnect1.c sshconnect2.c] + add smartcard support to the client, too (now you can use both + the agent and the client). + - markus@cvs.openbsd.org 2001/06/27 02:12:54 + [serverloop.c serverloop.h session.c session.h] + quick hack to make ssh2 work again. + - markus@cvs.openbsd.org 2001/06/27 04:48:53 + [auth.c match.c sshd.8] + tridge@samba.org + - markus@cvs.openbsd.org 2001/06/27 05:35:42 + [ssh-keygen.c] + use cyberflex_inq_class to inquire class. + - markus@cvs.openbsd.org 2001/06/27 05:42:25 + [rsa.c rsa.h ssh-agent.c ssh-keygen.c] + s/generate_additional_parameters/rsa_generate_additional_parameters/ + http://www.humppa.com/ + - markus@cvs.openbsd.org 2001/06/27 06:26:36 + [ssh-add.c] + convert to getopt(3) + - stevesk@cvs.openbsd.org 2001/06/28 19:57:35 + [ssh-keygen.c] + '\0' terminated data[] is ok; ok markus@ + - markus@cvs.openbsd.org 2001/06/29 07:06:34 + [ssh-keygen.c] + new error handling for cyberflex_* + - markus@cvs.openbsd.org 2001/06/29 07:11:01 + [ssh-keygen.c] + initialize early + - stevesk@cvs.openbsd.org 2001/06/29 18:38:44 + [clientloop.c] + sync function definition with declaration; ok markus@ + - stevesk@cvs.openbsd.org 2001/06/29 18:40:28 + [channels.c] + use socklen_t for getsockopt arg #5; ok markus@ + - stevesk@cvs.openbsd.org 2001/06/30 18:08:40 + [channels.c channels.h clientloop.c] + adress -> address; ok markus@ + - markus@cvs.openbsd.org 2001/07/02 13:59:15 + [serverloop.c session.c session.h] + wait until !session_have_children(); bugreport from + Lutz.Jaenicke@aet.TU-Cottbus.DE + - markus@cvs.openbsd.org 2001/07/02 22:29:20 + [readpass.c] + do not return NULL, use "" instead. + - markus@cvs.openbsd.org 2001/07/02 22:40:18 + [ssh-keygen.c] + update for sectok.h interface changes. + - markus@cvs.openbsd.org 2001/07/02 22:52:57 + [channels.c channels.h serverloop.c] + improve cleanup/exit logic in ssh2: + stop listening to channels, detach channel users (e.g. sessions). + wait for children (i.e. dying sessions), send exit messages, + cleanup all channels. + - (bal) forget a few new files in sync up. + - (bal) Makefile fix up requires scard.c + - (stevesk) sync misc.h + - (stevesk) more sync for session.c + - (stevesk) sync servconf.h (comments) + - (tim) [contrib/caldera/openssh.spec] sync with Caldera + - (tim) [openbsd-compat/dirname.h] Remove ^M causing some compilers to + issue warning (line 1: tokens ignored at end of directive line) + - (tim) [sshconnect1.c] give the compiler something to do for success: + if KRB5 and AFS are not defined + (ERROR: "sshconnect1.c", line 1274: Syntax error before or at: }) + +20010629 + - (bal) Removed net_aton() since we don't use it any more + - (bal) Fixed _DISABLE_VPOSIX in readpassphrase.c. + - (bal) Updated zlib's home. Thanks to David Howe . + - (stevesk) remove _REENTRANT #define + - (stevesk) session.c: use u_int for envsize + - (stevesk) remove cli.[ch] + +20010628 + - (djm) Sync openbsd-compat with -current libc + - (djm) Fix from Lutz Jaenicke for my + broken makefile + - (bal) Removed strtok_r() and inet_ntop() since they are no longer used. + - (bal) Remove getusershell() since it's no longer used. + +20010627 + - (djm) Reintroduce pam_session call for non-pty sessions. + - (djm) Remove redundant and incorrect test for max auth attempts in + PAM kbdint code. Based on fix from Matthew Melvin + + - (djm) Rename sysconfdir/primes => sysconfdir/moduli + - (djm) Oops, forgot make logic for primes=>moduli. Also try to rename + existing primes->moduli if it exists. + - (djm) Sync with -current openbsd-compat/readpassphrase.c: + - djm@cvs.openbsd.org 2001/06/27 13:23:30 + typo, spotted by Tom Holroyd ; ok deraadt@ + - (djm) Turn up warnings if gcc or egcs detected + - (stevesk) for HP-UX 11.X use X/Open socket interface; + pulls in modern socket prototypes and eliminates a number of compiler + warnings. see xopen_networking(7). + - (stevesk) fix x11 forwarding from _PATH_XAUTH change + - (stevesk) use X/Open socket interface for HP-UX 10.X also + +20010625 + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/06/21 21:08:25 + [session.c] + don't reset forced_command (we allow multiple login shells in + ssh2); dwd@bell-labs.com + - mpech@cvs.openbsd.org 2001/06/22 10:17:51 + [ssh.1 sshd.8 ssh-keyscan.1] + o) .Sh AUTHOR -> .Sh AUTHORS; + o) remove unnecessary .Pp; + o) better -mdoc style; + o) typo; + o) sort SEE ALSO; + aaron@ ok + - provos@cvs.openbsd.org 2001/06/22 21:27:08 + [dh.c pathnames.h] + use /etc/moduli instead of /etc/primes, okay markus@ + - provos@cvs.openbsd.org 2001/06/22 21:28:53 + [sshd.8] + document /etc/moduli + - markus@cvs.openbsd.org 2001/06/22 21:55:49 + [auth2.c auth-rsa.c pathnames.h ssh.1 sshd.8 sshd_config + ssh-keygen.1] + merge authorized_keys2 into authorized_keys. + authorized_keys2 is used for backward compat. + (just append authorized_keys2 to authorized_keys). + - provos@cvs.openbsd.org 2001/06/22 21:57:59 + [dh.c] + increase linebuffer to deal with larger moduli; use rewind instead of + close/open + - markus@cvs.openbsd.org 2001/06/22 22:21:20 + [sftp-server.c] + allow long usernames/groups in readdir + - markus@cvs.openbsd.org 2001/06/22 23:35:21 + [ssh.c] + don't overwrite argv (fixes ssh user@host in 'ps'), report by ericj@ + - deraadt@cvs.openbsd.org 2001/06/23 00:16:16 + [scp.c] + slightly better care + - markus@cvs.openbsd.org 2001/06/23 00:20:57 + [auth2.c auth.c auth.h auth-rh-rsa.c] + *known_hosts2 is obsolete for hostbased authentication and + only used for backward compat. merge ssh1/2 hostkey check + and move it to auth.c + - deraadt@cvs.openbsd.org 2001/06/23 02:33:05 + [sftp.1 sftp-server.8 ssh-keygen.1] + join .%A entries; most by bk@rt.fm + - markus@cvs.openbsd.org 2001/06/23 02:34:33 + [kexdh.c kexgex.c kex.h pathnames.h readconf.c servconf.h ssh.1 + sshconnect1.c sshconnect2.c sshconnect.c sshconnect.h sshd.8] + get rid of known_hosts2, use it for hostkey lookup, but do not + modify. + - markus@cvs.openbsd.org 2001/06/23 03:03:59 + [sshd.8] + draft-ietf-secsh-dh-group-exchange-01.txt + - markus@cvs.openbsd.org 2001/06/23 03:04:42 + [auth2.c auth-rh-rsa.c] + restore correct ignore_user_known_hosts logic. + - markus@cvs.openbsd.org 2001/06/23 05:26:02 + [key.c] + handle sigature of size 0 (some broken clients send this). + - deraadt@cvs.openbsd.org 2001/06/23 05:57:09 + [sftp.1 sftp-server.8 ssh-keygen.1] + ok, tmac is now fixed + - markus@cvs.openbsd.org 2001/06/23 06:41:10 + [ssh-keygen.c] + try to decode ssh-3.0.0 private rsa keys + (allow migration to openssh, not vice versa), #910 + - itojun@cvs.openbsd.org 2001/06/23 15:12:20 + [auth1.c auth2.c auth2-chall.c authfd.c authfile.c auth-rhosts.c + canohost.c channels.c cipher.c clientloop.c deattack.c dh.c + hostfile.c kex.c kexdh.c kexgex.c key.c nchan.c packet.c radix.c + readpass.c scp.c servconf.c serverloop.c session.c sftp.c + sftp-client.c sftp-glob.c sftp-int.c sftp-server.c ssh-add.c + ssh-agent.c ssh.c sshconnect1.c sshconnect2.c sshconnect.c sshd.c + ssh-keygen.c ssh-keyscan.c] + more strict prototypes. raise warning level in Makefile.inc. + markus ok'ed + TODO; cleanup headers + - markus@cvs.openbsd.org 2001/06/23 17:05:22 + [ssh-keygen.c] + fix import for (broken?) ssh.com/f-secure private keys + (i tested > 1000 RSA keys) + - itojun@cvs.openbsd.org 2001/06/23 17:48:18 + [sftp.1 ssh.1 sshd.8 ssh-keyscan.1] + kill whitespace at EOL. + - markus@cvs.openbsd.org 2001/06/23 19:12:43 + [sshd.c] + pidfile/sigterm race; bbraun@synack.net + - markus@cvs.openbsd.org 2001/06/23 22:37:46 + [sshconnect1.c] + consistent with ssh2: skip key if empty passphrase is entered, + retry num_of_passwd_prompt times if passphrase is wrong. ok fgsch@ + - markus@cvs.openbsd.org 2001/06/24 05:25:10 + [auth-options.c match.c match.h] + move ip+hostname check to match.c + - markus@cvs.openbsd.org 2001/06/24 05:35:33 + [readpass.c readpass.h ssh-add.c sshconnect2.c ssh-keygen.c] + switch to readpassphrase(3) + 2.7/8-stable needs readpassphrase.[ch] from libc + - markus@cvs.openbsd.org 2001/06/24 05:47:13 + [sshconnect2.c] + oops, missing format string + - markus@cvs.openbsd.org 2001/06/24 17:18:31 + [ttymodes.c] + passing modes works fine: debug2->3 + - (djm) -Wall fix for session.c + - (djm) Bring in readpassphrase() from OpenBSD libc. Compiles OK on Linux and + Solaris + +20010622 + - (stevesk) handle systems without pw_expire and pw_change. + +20010621 + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/06/16 08:49:38 + [misc.c] + typo; dunlap@apl.washington.edu + - markus@cvs.openbsd.org 2001/06/16 08:50:39 + [channels.h] + bad //-style comment; thx to stevev@darkwing.uoregon.edu + - markus@cvs.openbsd.org 2001/06/16 08:57:35 + [scp.c] + no stdio or exit() in signal handlers. + - markus@cvs.openbsd.org 2001/06/16 08:58:34 + [misc.c] + copy pw_expire and pw_change, too. + - markus@cvs.openbsd.org 2001/06/19 12:34:09 + [session.c] + cleanup forced command handling, from dwd@bell-labs.com + - markus@cvs.openbsd.org 2001/06/19 14:09:45 + [session.c sshd.8] + disable x11-fwd if use_login is enabled; from lukem@wasabisystems.com + - markus@cvs.openbsd.org 2001/06/19 15:40:45 + [session.c] + allocate and free at the same level. + - markus@cvs.openbsd.org 2001/06/20 13:56:39 + [channels.c channels.h clientloop.c packet.c serverloop.c] + move from channel_stop_listening to channel_free_all, + call channel_free_all before calling waitpid() in serverloop. + fixes the utmp handling; report from Lutz.Jaenicke@aet.TU-Cottbus.DE 20010615 - (stevesk) don't set SA_RESTART and set SIGCHLD to SIG_DFL around grantpt(). + - (stevesk) update TODO: STREAMS pty systems don't call vhangup() now 20010614 - - (bal) Applied X11 Cookie Patch. X11 Cookie behavior has changed to - no longer use /tmp/ssh-XXXXX/ + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/06/13 09:10:31 + [session.c] + typo, use pid not s->pid, mstone@cs.loyola.edu + +20010613 + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/06/12 10:58:29 + [session.c] + merge session_free into session_close() + merge pty_cleanup_proc into session_pty_cleanup() + - markus@cvs.openbsd.org 2001/06/12 16:10:38 + [session.c] + merge ssh1/ssh2 tty msg parse and alloc code + - markus@cvs.openbsd.org 2001/06/12 16:11:26 + [packet.c] + do not log() packet_set_maxsize + - markus@cvs.openbsd.org 2001/06/12 21:21:29 + [session.c] + remove xauth-cookie-in-tmp handling. use default $XAUTHORITY, since + we do already trust $HOME/.ssh + you can use .ssh/sshrc and .ssh/environment if you want to customize + the location of the xauth cookies + - markus@cvs.openbsd.org 2001/06/12 21:30:57 + [session.c] + unused + +20010612 + - scp.c ID update (upstream synced vfsprintf() from us) + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/06/10 11:29:20 + [dispatch.c] + we support rekeying + protocol errors are fatal. + - markus@cvs.openbsd.org 2001/06/11 10:18:24 + [session.c] + reset pointer to NULL after xfree(); report from solar@openwall.com + - markus@cvs.openbsd.org 2001/06/11 16:04:38 + [sshd.8] + typo; bdubreuil@crrel.usace.army.mil + +20010611 + - (bal) NeXT/MacOS X lack libgen.h and dirname(). Patch by Mark Miller + + - (bal) Handle broken krb4 issues on Solaris with multiple defined u_*_t + types. Patch by Jan IVEN + - (bal) Fixed Makefile.in so that 'configure; make install' works. + +20010610 + - (bal) Missed two files in major resync. auth-bsdauth.c and auth-skey.c + +20010609 + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/05/30 12:55:13 + [auth-options.c auth2.c channels.c channels.h clientloop.c nchan.c + packet.c serverloop.c session.c ssh.c ssh1.h] + channel layer cleanup: merge header files and split .c files + - markus@cvs.openbsd.org 2001/05/30 15:20:10 + [ssh.c] + merge functions, simplify. + - markus@cvs.openbsd.org 2001/05/31 10:30:17 + [auth-options.c auth2.c channels.c channels.h clientloop.c nchan.c + packet.c serverloop.c session.c ssh.c] + undo the .c file split, just merge the header and keep the cvs + history + - (bal) Channels.c and Channels.h -- "Merge Functions, simplify" (draged + out of ssh Attic) + - (bal) Ooops.. nchan.c (and remove nchan.h) resync from OpenBSD ssh + Attic. + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/05/31 13:08:04 + [sshd_config] + group options and add some more comments + - markus@cvs.openbsd.org 2001/06/03 14:55:39 + [channels.c channels.h session.c] + use fatal_register_cleanup instead of atexit, sync with x11 authdir + handling + - markus@cvs.openbsd.org 2001/06/03 19:36:44 + [ssh-keygen.1] + 1-2 bits of entrophy per character (not per word), ok stevesk@ + - markus@cvs.openbsd.org 2001/06/03 19:38:42 + [scp.c] + pass -v to ssh; from slade@shore.net + - markus@cvs.openbsd.org 2001/06/03 20:06:11 + [auth2-chall.c] + the challenge response device decides how to handle non-existing + users. + -> fake challenges for skey and cryptocard + - markus@cvs.openbsd.org 2001/06/04 21:59:43 + [channels.c channels.h session.c] + switch uid when cleaning up tmp files and sockets; reported by + zen-parse@gmx.net on bugtraq + - markus@cvs.openbsd.org 2001/06/04 23:07:21 + [clientloop.c serverloop.c sshd.c] + set flags in the signal handlers, do real work in the main loop, + ok provos@ + - markus@cvs.openbsd.org 2001/06/04 23:16:16 + [session.c] + merge ssh1/2 x11-fwd setup, create listener after tmp-dir + - pvalchev@cvs.openbsd.org 2001/06/05 05:05:39 + [ssh-keyscan.1 ssh-keyscan.c] + License clarification from David Mazieres, ok deraadt@ + - markus@cvs.openbsd.org 2001/06/05 10:24:32 + [channels.c] + don't delete the auth socket in channel_stop_listening() + auth_sock_cleanup_proc() will take care of this. + - markus@cvs.openbsd.org 2001/06/05 16:46:19 + [session.c] + let session_close() delete the pty. deny x11fwd if xauthfile is set. + - markus@cvs.openbsd.org 2001/06/06 23:13:54 + [ssh-dss.c ssh-rsa.c] + cleanup, remove old code + - markus@cvs.openbsd.org 2001/06/06 23:19:35 + [ssh-add.c] + remove debug message; Darren.Moffat@eng.sun.com + - markus@cvs.openbsd.org 2001/06/07 19:57:53 + [auth2.c] + style is used for bsdauth. + disconnect on user/service change (ietf-drafts) + - markus@cvs.openbsd.org 2001/06/07 20:23:05 + [authfd.c authfile.c channels.c kexdh.c kexgex.c packet.c ssh.c + sshconnect.c sshconnect1.c] + use xxx_put_cstring() + - markus@cvs.openbsd.org 2001/06/07 22:25:02 + [session.c] + don't overwrite errno + delay deletion of the xauth cookie + - markus@cvs.openbsd.org 2001/06/08 15:25:40 + [includes.h pathnames.h readconf.c servconf.c] + move the path for xauth to pathnames.h + - (bal) configure.in fix for Tru64 (forgeting to reset $LIB) + - (bal) ANSIify strmode() + - (bal) --with-catman should be --with-mantype patch by Dave + Dykstra + +20010606 + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/05/17 21:34:15 + [ssh.1] + no spaces in PreferredAuthentications; + meixner@rbg.informatik.tu-darmstadt.de + - markus@cvs.openbsd.org 2001/05/18 14:13:29 + [auth-chall.c auth.h auth1.c auth2-chall.c auth2.c readconf.c + readconf.h servconf.c servconf.h sshconnect1.c sshconnect2.c sshd.c] + improved kbd-interactive support. work by per@appgate.com and me + - djm@cvs.openbsd.org 2001/05/19 00:36:40 + [session.c] + Disable X11 forwarding if xauth binary is not found. Patch from Nalin + Dahyabhai ; ok markus@ + - markus@cvs.openbsd.org 2001/05/19 16:05:41 + [scp.c] + ftruncate() instead of open()+O_TRUNC like rcp.c does + allows scp /path/to/file localhost:/path/to/file + - markus@cvs.openbsd.org 2001/05/19 16:08:43 + [sshd.8] + sort options; Matthew.Stier@fnc.fujitsu.com + - markus@cvs.openbsd.org 2001/05/19 16:32:16 + [ssh.1 sshconnect2.c] + change preferredauthentication order to + publickey,hostbased,password,keyboard-interactive + document that hostbased defaults to no, document order + - markus@cvs.openbsd.org 2001/05/19 16:46:19 + [ssh.1 sshd.8] + document MACs defaults with .Dq + - stevesk@cvs.openbsd.org 2001/05/19 19:43:57 + [misc.c misc.h servconf.c sshd.8 sshd.c] + sshd command-line arguments and configuration file options that + specify time may be expressed using a sequence of the form: + time[qualifier], where time is a positive integer value and qualifier + is one of the following: + ,s,m,h,d,w + Examples: + 600 600 seconds (10 minutes) + 10m 10 minutes + 1h30m 1 hour 30 minutes (90 minutes) + ok markus@ + - stevesk@cvs.openbsd.org 2001/05/19 19:57:09 + [channels.c] + typo in error message + - markus@cvs.openbsd.org 2001/05/20 17:20:36 + [auth-rsa.c auth.c auth.h auth2.c servconf.c servconf.h sshd.8 + sshd_config] + configurable authorized_keys{,2} location; originally from peter@; + ok djm@ + - markus@cvs.openbsd.org 2001/05/24 11:12:42 + [auth.c] + fix comment; from jakob@ + - stevesk@cvs.openbsd.org 2001/05/24 18:57:53 + [clientloop.c readconf.c ssh.c ssh.h] + don't perform escape processing when ``EscapeChar none''; ok markus@ + - markus@cvs.openbsd.org 2001/05/25 14:37:32 + [ssh-keygen.c] + use -P for -e and -y, too. + - markus@cvs.openbsd.org 2001/05/28 08:04:39 + [ssh.c] + fix usage() + - markus@cvs.openbsd.org 2001/05/28 10:08:55 + [authfile.c] + key_load_private: set comment to filename for PEM keys + - markus@cvs.openbsd.org 2001/05/28 22:51:11 + [cipher.c cipher.h] + simpler 3des for ssh1 + - markus@cvs.openbsd.org 2001/05/28 23:14:49 + [channels.c channels.h nchan.c] + undo broken channel fix and try a different one. there + should be still some select errors... + - markus@cvs.openbsd.org 2001/05/28 23:25:24 + [channels.c] + cleanup, typo + - markus@cvs.openbsd.org 2001/05/28 23:58:35 + [packet.c packet.h sshconnect.c sshd.c] + remove some lines, simplify. + - markus@cvs.openbsd.org 2001/05/29 12:31:27 + [authfile.c] + typo 20010528 - (tim) [conifgure.in] add setvbuf test needed for sftp-int.c Patch by Corinna Vinschen +20010517 + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/05/12 19:53:13 + [sftp-server.c] + readlink does not NULL-terminate; mhe@home.se + - deraadt@cvs.openbsd.org 2001/05/15 22:04:01 + [ssh.1] + X11 forwarding details improved + - markus@cvs.openbsd.org 2001/05/16 20:51:57 + [authfile.c] + return comments for private pem files, too; report from nolan@naic.edu + - markus@cvs.openbsd.org 2001/05/16 21:53:53 + [clientloop.c] + check for open sessions before we call select(); fixes the x11 client + bug reported by bowman@math.ualberta.ca + - markus@cvs.openbsd.org 2001/05/16 22:09:21 + [channels.c nchan.c] + more select() error fixes (don't set rfd/wfd to -1). + - (bal) Enabled USE_PIPES for Cygwin on Corinna Vinschen + - (bal) Corrected on_exit() emulation via atexit(). + 20010512 + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/05/11 14:59:56 + [clientloop.c misc.c misc.h] + add unset_nonblock for stdout/err flushing in client_loop(). - (bal) Patch to partial sync up contrib/solaris/ packaging software. Patch by pete +20010511 + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/05/09 22:51:57 + [channels.c] + fix -R for protocol 2, noticed by greg@nest.cx. + bug was introduced with experimental dynamic forwarding. + - markus@cvs.openbsd.org 2001/05/09 23:01:31 + [rijndael.h] + fix prototype; J.S.Peatfield@damtp.cam.ac.uk + 20010509 + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/05/06 21:23:31 + [cli.c] + cli_read() fails to catch SIGINT + overflow; from obdb@zzlevo.net + - markus@cvs.openbsd.org 2001/05/08 19:17:31 + [channels.c serverloop.c clientloop.c] + adds correct error reporting to async connect()s + fixes the server-discards-data-before-connected-bug found by + onoe@sm.sony.co.jp + - mouring@cvs.openbsd.org 2001/05/08 19:45:25 + [misc.c misc.h scp.c sftp.c] + Use addargs() in sftp plus some clean up of addargs(). OK Markus + - markus@cvs.openbsd.org 2001/05/06 21:45:14 + [clientloop.c] + use atomicio for flushing stdout/stderr bufs. thanks to + jbw@izanami.cee.hw.ac.uk + - markus@cvs.openbsd.org 2001/05/08 22:48:07 + [atomicio.c] + no need for xmalloc.h, thanks to espie@ - (bal) UseLogin patch for Solaris/UNICOS. Patch by Wayne Davison - (bal) ./configure support to disable SIA on OSF1. Patch by @@ -33,32 +1217,99 @@ - (djm) Update config.guess and config.sub with latest versions (from ftp://ftp.gnu.org/gnu/config/) to allow configure on ia64-hpux. Suggested by Jason Mader + - (bal) White Space and #ifdef sync with OpenBSD + - (bal) Add 'seed_rng()' to ssh-add.c + - (bal) CVS ID updates for readpass.c, readpass.h, cli.c, and cli.h + - OpenBSD CVS Sync + - stevesk@cvs.openbsd.org 2001/05/05 13:42:52 + [sftp.1 ssh-add.1 ssh-keygen.1] + typos, grammar + +20010505 + - OpenBSD CVS Sync + - stevesk@cvs.openbsd.org 2001/05/04 14:21:56 + [ssh.1 sshd.8] + typos + - markus@cvs.openbsd.org 2001/05/04 14:34:34 + [channels.c] + channel_new() reallocs channels[], we cannot use Channel *c after + calling channel_new(), XXX fix this in the future... + - markus@cvs.openbsd.org 2001/05/04 23:47:34 + [channels.c channels.h clientloop.c nchan.c nchan.h serverloop.c ssh.c] + move to Channel **channels (instead of Channel *channels), fixes realloc + problems. channel_new now returns a Channel *, favour Channel * over + channel id. remove old channel_allocate interface. 20010504 + - OpenBSD CVS Sync + - stevesk@cvs.openbsd.org 2001/05/03 15:07:39 + [channels.c] + typo in debug() string + - markus@cvs.openbsd.org 2001/05/03 15:45:15 + [session.c] + exec shell -c /bin/sh .ssh/sshrc, from abartlet@pcug.org.au + - stevesk@cvs.openbsd.org 2001/05/03 21:43:01 + [servconf.c] + remove "\n" from fatal() + - mouring@cvs.openbsd.org 2001/05/03 23:09:53 + [misc.c misc.h scp.c sftp.c] + Move colon() and cleanhost() to misc.c where I should I have put it in + the first place - (bal) Updated Cygwin README by Corinna Vinschen - (bal) Avoid socket file security issues in ssh-agent for Cygwin. Patch by Egor Duda +20010503 + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/05/02 16:41:20 + [ssh-add.c] + fix prompt for ssh-add. + +20010502 + - OpenBSD CVS Sync + - mouring@cvs.openbsd.org 2001/05/02 01:25:39 + [readpass.c] + Put the 'const' back into ssh_askpass() function. Pointed out + by Mark Miller . OK Markus + +20010501 + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/04/30 11:18:52 + [readconf.c readconf.h ssh.1 ssh.c sshconnect.c] + implement 'ssh -b bind_address' like 'telnet -b' + - markus@cvs.openbsd.org 2001/04/30 15:50:46 + [compat.c compat.h kex.c] + allow interop with weaker key generation used by ssh-2.0.x, x < 10 + - markus@cvs.openbsd.org 2001/04/30 16:02:49 + [compat.c] + ssh-2.0.10 has the weak-key-bug, too. + - (tim) [contrib/caldera/openssh.spec] add Requires line for Caldera 3.1 + 20010430 + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/04/29 18:32:52 + [serverloop.c] + fix whitespace + - markus@cvs.openbsd.org 2001/04/29 19:16:52 + [channels.c clientloop.c compat.c compat.h serverloop.c] + more ssh.com-2.0.x bug-compat; from per@appgate.com + - (tim) New version of mdoc2man.pl from Mark D. Roth - (djm) Add .cvsignore files, suggested by Wayne Davison - - (tim) [contrib/caldera/openssh.spec] add Requires line for Caldera 3.1 20010429 - (bal) Updated INSTALL. PCRE moved to a new place. - - (djm) Add Theo Schlossnagle's SecurID patch to contrib/ - - (djm) Release 2.9p1 - - (tim) New version of mdoc2man.pl from Mark D. Roth + - (djm) Release OpenSSH-2.9p1 20010427 - (bal) Fixed uidswap.c so it should work on non-posix complient systems. patch based on 2.5.2 version by djm. - (bal) Build manpages and config files once unless changed. Patch by Carson Gaspar - - (bal) arpa/nameser.h does not exist on Cygwin. Patch by Corinna + - (bal) arpa/nameser.h does not exist on Cygwin. Patch by Corinna Vinschen - (bal) Add /etc/sysconfig/sshd support to redhat's sshd.init. Patch by Pekka Savola - - (bal) Cygwin lacks setgroups() API. Patch by Corinna Vinschen + - (bal) Cygwin lacks setgroups() API. Patch by Corinna Vinschen - (bal) version.h synced, RPM specs updated for 2.9 - (tim) update contrib/caldera files with what Caldera is using. @@ -74,7 +1325,7 @@ remove debug - (bal) Whitespace resync w/ OpenBSD for uidswap.c - (djm) Add new server configuration directive 'PAMAuthenticationViaKbdInt' - (default: off), implies KbdInteractiveAuthentication. Suggestion from + (default: off), implies KbdInteractiveAuthentication. Suggestion from markus@ - (djm) Include crypt.h if available in auth-passwd.c - tim@mindrot.org 2001/04/25 21:38:01 [configure.in] @@ -87,7 +1338,7 @@ document hostbased and other cleanup - (stevesk) start_pam() doesn't use DNS now for sshd -u0. - (stevesk) auth-pam.c: use PERMIT_NO_PASSWD - - (bal) sys/queue.h is bogus for NCR platform. Patch by Daniel Carroll + - (bal) sys/queue.h is bogus for NCR platform. Patch by Daniel Carroll - (bal) Fixed contrib/postinstall.in. Patch by wsanders@wsanders.net @@ -132,33 +1383,33 @@ 20010420 - OpenBSD CVS Sync - ian@cvs.openbsd.org 2001/04/18 16:21:05 - [ssh-keyscan.1] - Fix typo reported in PR/1779 - - markus@cvs.openbsd.org 2001/04/18 21:57:42 - [readpass.c ssh-add.c] + [ssh-keyscan.1] + Fix typo reported in PR/1779 + - markus@cvs.openbsd.org 2001/04/18 21:57:42 + [readpass.c ssh-add.c] call askpass from ssh, too, based on work by roth@feep.net, ok deraadt - - markus@cvs.openbsd.org 2001/04/18 22:03:45 - [auth2.c sshconnect2.c] + - markus@cvs.openbsd.org 2001/04/18 22:03:45 + [auth2.c sshconnect2.c] use FDQN with trailing dot in the hostbased auth packets, ok deraadt@ - markus@cvs.openbsd.org 2001/04/18 22:48:26 - [auth2.c] - no longer const - - markus@cvs.openbsd.org 2001/04/18 23:43:26 - [auth2.c compat.c sshconnect2.c] - more ssh v2 hostbased-auth interop: ssh.com >= 2.1.0 works now + [auth2.c] + no longer const + - markus@cvs.openbsd.org 2001/04/18 23:43:26 + [auth2.c compat.c sshconnect2.c] + more ssh v2 hostbased-auth interop: ssh.com >= 2.1.0 works now (however the 2.1.0 server seems to work only if debug is enabled...) - markus@cvs.openbsd.org 2001/04/18 23:44:51 - [authfile.c] - error->debug; noted by fries@ - - markus@cvs.openbsd.org 2001/04/19 00:05:11 - [auth2.c] - use local variable, no function call needed. + [authfile.c] + error->debug; noted by fries@ + - markus@cvs.openbsd.org 2001/04/19 00:05:11 + [auth2.c] + use local variable, no function call needed. (btw, hostbased works now with ssh.com >= 2.0.13) - (bal) Put scp-common.h back into scp.c (it exists in the upstream tree) pointed out by Tom Holroyd 20010418 - - OpenBSD CVS Sync + - OpenBSD CVS Sync - markus@cvs.openbsd.org 2001/04/17 19:34:25 [session.c] move auth_approval to do_authenticated(). @@ -228,10 +1479,10 @@ xrealloc dealing with ptr == nULL; mouring - djm@cvs.openbsd.org 2001/04/16 08:19:31 [session.c] - Split motd and hushlogin checks into seperate functions, helps for + Split motd and hushlogin checks into seperate functions, helps for portable. From Chris Adams ; ok markus@ - - Fix OSF SIA support displaying too much information for quiet - logins and logins where access was denied by SIA. Patch from Chris Adams + - Fix OSF SIA support displaying too much information for quiet + logins and logins where access was denied by SIA. Patch from Chris Adams 20010415 @@ -255,7 +1506,7 @@ 20010414 - Sync with OpenBSD glob.c, strlcat.c and vis.c changes - - Cygwin sftp/sftp-server binary mode patch from Corinna Vinschen + - Cygwin sftp/sftp-server binary mode patch from Corinna Vinschen - OpenBSD CVS Sync - beck@cvs.openbsd.org 2001/04/13 22:46:54 @@ -268,15 +1519,15 @@ by default (of course). ok markus@ 20010413 - - OpenBSD CVS Sync - - markus@cvs.openbsd.org 2001/04/12 14:29:09 - [ssh.c] - show debug output during option processing, report from + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/04/12 14:29:09 + [ssh.c] + show debug output during option processing, report from pekkas@netcore.fi - markus@cvs.openbsd.org 2001/04/12 19:15:26 - [auth-rhosts.c auth.h auth2.c buffer.c canohost.c canohost.h - compat.c compat.h hostfile.c pathnames.h readconf.c readconf.h - servconf.c servconf.h ssh.c sshconnect.c sshconnect.h sshconnect1.c + [auth-rhosts.c auth.h auth2.c buffer.c canohost.c canohost.h + compat.c compat.h hostfile.c pathnames.h readconf.c readconf.h + servconf.c servconf.h ssh.c sshconnect.c sshconnect.h sshconnect1.c sshconnect2.c sshd_config] implement HostbasedAuthentication (= RhostRSAAuthentication for ssh v2) similar to RhostRSAAuthentication unless you enable (the experimental) @@ -300,16 +1551,16 @@ lack it. 20010412 - - OpenBSD CVS Sync + - OpenBSD CVS Sync - markus@cvs.openbsd.org 2001/04/10 07:46:58 - [channels.c] - cleanup socks4 handling - - itojun@cvs.openbsd.org 2001/04/10 09:13:22 + [channels.c] + cleanup socks4 handling + - itojun@cvs.openbsd.org 2001/04/10 09:13:22 [ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh.1 sshd.8] - document id_rsa{.pub,}. markus ok + document id_rsa{.pub,}. markus ok - markus@cvs.openbsd.org 2001/04/10 12:15:23 - [channels.c] - debug cleanup + [channels.c] + debug cleanup - djm@cvs.openbsd.org 2001/04/11 07:06:22 [sftp-int.c] 'mget' and 'mput' aliases; ok markus@ @@ -371,9 +1622,9 @@ to olar@openwall.com is comments. we had many requests for this. - markus@cvs.openbsd.org 2001/04/07 08:55:18 [buffer.c channels.c channels.h readconf.c ssh.c] - allow the ssh client act as a SOCKS4 proxy (dynamic local - portforwarding). work by Dan Kaminsky and me. - thanks to Dan for this great patch: use 'ssh -D 1080 host' and make + allow the ssh client act as a SOCKS4 proxy (dynamic local + portforwarding). work by Dan Kaminsky and me. + thanks to Dan for this great patch: use 'ssh -D 1080 host' and make netscape use localhost:1080 as a socks proxy. - markus@cvs.openbsd.org 2001/04/08 11:24:33 [uidswap.c] @@ -407,7 +1658,7 @@ - deraadt@cvs.openbsd.org 2001/04/06 16:46:59 [scp.c] remove trailing / from source paths; fixes pr#1756 - + 20010406 - (stevesk) logintest.c: fix for systems without __progname - (stevesk) Makefile.in: log.o is in libssh.a @@ -423,9 +1674,9 @@ temporary version 2.5.4 (supports rekeying). this is not an official release. - markus@cvs.openbsd.org 2001/04/05 10:42:57 - [auth-chall.c authfd.c channels.c clientloop.c kex.c kexgex.c key.c - mac.c packet.c serverloop.c sftp-client.c sftp-client.h sftp-glob.c - sftp-glob.h sftp-int.c sftp-server.c sftp.c ssh-keygen.c sshconnect.c + [auth-chall.c authfd.c channels.c clientloop.c kex.c kexgex.c key.c + mac.c packet.c serverloop.c sftp-client.c sftp-client.h sftp-glob.c + sftp-glob.h sftp-int.c sftp-server.c sftp.c ssh-keygen.c sshconnect.c sshconnect2.c sshd.c] fix whitespace: unexpand + trailing spaces. - markus@cvs.openbsd.org 2001/04/05 11:09:17 @@ -448,21 +1699,21 @@ don't request a session for 'ssh -N', pointed out slade@shore.net 20010405 - - OpenBSD CVS Sync - - markus@cvs.openbsd.org 2001/04/04 09:48:35 + - OpenBSD CVS Sync + - markus@cvs.openbsd.org 2001/04/04 09:48:35 [kex.c kex.h kexdh.c kexgex.c packet.c sshconnect2.c sshd.c] - don't sent multiple kexinit-requests. - send newkeys, block while waiting for newkeys. - fix comments. - - markus@cvs.openbsd.org 2001/04/04 14:34:58 - [clientloop.c kex.c kex.h serverloop.c sshconnect2.c sshd.c] - enable server side rekeying + some rekey related clientup. + don't sent multiple kexinit-requests. + send newkeys, block while waiting for newkeys. + fix comments. + - markus@cvs.openbsd.org 2001/04/04 14:34:58 + [clientloop.c kex.c kex.h serverloop.c sshconnect2.c sshd.c] + enable server side rekeying + some rekey related clientup. todo: we should not send any non-KEX messages after we send KEXINIT - markus@cvs.openbsd.org 2001/04/04 15:50:55 [compat.c] f-secure 1.3.2 does not handle IGNORE; from milliondl@ornl.gov - markus@cvs.openbsd.org 2001/04/04 20:25:38 - [channels.c channels.h clientloop.c kex.c kex.h serverloop.c + [channels.c channels.h clientloop.c kex.c kex.h serverloop.c sshconnect2.c sshd.c] more robust rekeying don't send channel data after rekeying is started. @@ -582,8 +1833,8 @@ call refuse() before close(); from olemx@ans.pl 20010328 - - (djm) Reorder tests and library inclusion for Krb4/AFS to try to - resolve linking conflicts with libcrypto. Report and suggested fix + - (djm) Reorder tests and library inclusion for Krb4/AFS to try to + resolve linking conflicts with libcrypto. Report and suggested fix from Holger Trapp - (djm) Work around Solaris' broken struct dirent. Diagnosis and suggested fix from Philippe Levan @@ -593,7 +1844,7 @@ 20010327 - Attempt sync with sshlogin.c w/ OpenBSD (mainly CVS ID) - - Fix pointer issues in waitpid() and wait() replaces. Patch by Lutz + - Fix pointer issues in waitpid() and wait() replaces. Patch by Lutz Jaenicke - OpenBSD CVS Sync - djm@cvs.openbsd.org 2001/03/25 00:01:34 @@ -604,10 +1855,10 @@ PrintLastLog option; from chip@valinux.com with some minor changes by me. ok markus@ - markus@cvs.openbsd.org 2001/03/26 08:07:09 - [authfile.c authfile.h ssh-add.c ssh-keygen.c ssh.c sshconnect.c + [authfile.c authfile.h ssh-add.c ssh-keygen.c ssh.c sshconnect.c sshconnect.h sshconnect1.c sshconnect2.c sshd.c] simpler key load/save interface, see authfile.h - - (djm) Reestablish PAM credentials (which can be supplemental group + - (djm) Reestablish PAM credentials (which can be supplemental group memberships) after initgroups() blows them away. Report and suggested fix from Nalin Dahyabhai @@ -629,10 +1880,10 @@ - (djm) Pull out our own SIGPIPE hacks 20010323 - - OpenBSD CVS Sync + - OpenBSD CVS Sync - deraadt@cvs.openbsd.org 2001/03/22 20:22:55 - [sshd.c] - do not place linefeeds in buffer + [sshd.c] + do not place linefeeds in buffer 20010322 - (djm) Better AIX no tty fix, spotted by Gert Doering @@ -661,7 +1912,7 @@ missing init; from mib@unimelb.edu.au 20010321 - - (djm) Fix ttyname breakage for AIX and Tru64. Patch from Steve + - (djm) Fix ttyname breakage for AIX and Tru64. Patch from Steve VanDevender - (djm) Make sure pam_retval is initialised on call to pam_end. Patch from Solar Designer @@ -690,7 +1941,7 @@ add get_arg_max(). Use sysconf() if ARG_MAX is not defined 20010319 - - (djm) Seed PRNG at startup, rather than waiting for arc4random calls to + - (djm) Seed PRNG at startup, rather than waiting for arc4random calls to do it implicitly. - (djm) Add getusershell() functions from OpenBSD CVS - OpenBSD CVS Sync @@ -703,14 +1954,14 @@ - (bal) Use 'NGROUPS' for NeXT Since 'MAX_NGROUPS' is wrapped up in -lposix stuff. Change suggested by Mark Miller - (bal) Small fix to scp. %lu vs %ld - - (bal) NeXTStep lacks S_ISLNK. Plus split up S_IS* + - (bal) NeXTStep lacks S_ISLNK. Plus split up S_IS* - (djm) OpenBSD CVS Sync - djm@cvs.openbsd.org 2001/03/19 03:52:51 [sftp-client.c] Report ssh connection closing correctly; ok deraadt@ - deraadt@cvs.openbsd.org 2001/03/18 23:30:55 [compat.c compat.h sshd.c] - specifically version match on ssh scanners. do not log scan + specifically version match on ssh scanners. do not log scan information to the console - djm@cvs.openbsd.org 2001/03/19 12:10:17 [sshd.8] @@ -721,7 +1972,7 @@ - (bal) Minor NeXT fixed. Forgot to #undef NGROUPS_MAX 20010318 - - (bal) Fixed scp type casing issue which causes "scp: protocol error: + - (bal) Fixed scp type casing issue which causes "scp: protocol error: size not delimited" fatal errors when tranfering. - OpenBSD CVS Sync - markus@cvs.openbsd.org 2001/03/17 17:27:59 @@ -731,7 +1982,7 @@ openbsd-compat/fake-regex.h 20010317 - - Support usrinfo() on AIX. Based on patch from Gert Doering + - Support usrinfo() on AIX. Based on patch from Gert Doering - OpenBSD CVS Sync - markus@cvs.openbsd.org 2001/03/15 15:05:59 @@ -754,7 +2005,7 @@ [auth-options.c channels.c channels.h serverloop.c session.c] implement "permitopen" key option, restricts -L style forwarding to to specified host:port pairs. based on work by harlan@genua.de - - Check for gl_matchc support in glob_t and fall back to the + - Check for gl_matchc support in glob_t and fall back to the openbsd-compat/glob.[ch] support if it does not exist. 20010315 @@ -769,7 +2020,7 @@ [sftp-server.c] note no getopt() - (stevesk) ssh-keyscan.c: specify "openbsd-compat/fake-queue.h" - - (bal) Cygwin README change by Corinna Vinschen + - (bal) Cygwin README change by Corinna Vinschen 20010314 - OpenBSD CVS Sync @@ -782,7 +2033,7 @@ - (bal) Fix strerror() in bsd-misc.c - (djm) Add replacement glob() from OpenBSD libc if the system glob is missing or lacks the GLOB_ALTDIRFUNC extension - - (djm) Remove -I$(srcdir)/openbsd-compat from CFLAGS, refer to headers + - (djm) Remove -I$(srcdir)/openbsd-compat from CFLAGS, refer to headers relatively. Avoids conflict between glob.h and /usr/include/glob.h 20010313 @@ -824,7 +2075,7 @@ with -l and make -B work with /path/to/known_hosts. ok deraadt@ - (djm) Bump portable version number for generating test RPMs - (djm) Add "static_openssl" RPM build option, remove rsh build dependency - - (bal) Reorder includes in Makefile. + - (bal) Reorder includes in Makefile. 20010311 - OpenBSD CVS Sync @@ -852,7 +2103,7 @@ - OpenBSD CVS Sync - deraadt@cvs.openbsd.org 2001/03/09 03:14:39 [ssh-keygen.c] - create *.pub files with umask 0644, so that you can mv them to + create *.pub files with umask 0644, so that you can mv them to authorized_keys - deraadt@cvs.openbsd.org 2001/03/09 12:30:29 [sshd.c] @@ -950,7 +2201,7 @@ 20010305 - (bal) CVS ID touch up on sshpty.[ch] and sshlogin.[ch] - - (bal) CVS ID touch up on sftp-int.c + - (bal) CVS ID touch up on sftp-int.c - (bal) CVS ID touch up on uuencode.c - (bal) CVS ID touch up on auth2.c, serverloop.c, session.c & sshd.c - (bal) OpenBSD CVS Sync @@ -1137,37 +2388,37 @@ - (djm) Document PAM ChallengeResponseAuthentication in sshd.8 - (djm) Disable and comment ChallengeResponseAuthentication in sshd_config - (djm) Allow PRNGd entropy collection from localhost TCP socket. Replace - "--with-egd-pool" configure option with "--with-prngd-socket" and + "--with-egd-pool" configure option with "--with-prngd-socket" and "--with-prngd-port" options. Debugged and improved by Lutz Jaenicke 20010301 - - (djm) Properly add -lcrypt if needed. + - (djm) Properly add -lcrypt if needed. - (djm) Force standard PAM conversation function in a few more places. - Patch from Redhat 2.5.1p1-2 RPM, probably Nalin Dahyabhai + Patch from Redhat 2.5.1p1-2 RPM, probably Nalin Dahyabhai - - (djm) Cygwin needs pw->pw_gecos copied too. Patch from Corinna Vinschen + - (djm) Cygwin needs pw->pw_gecos copied too. Patch from Corinna Vinschen - (djm) Released 2.5.1p2 20010228 - (djm) Detect endianness in configure and use it in rijndael.c. Fixes "Bad packet length" bugs. - - (djm) Fully revert PAM session patch (again). All PAM session init is + - (djm) Fully revert PAM session patch (again). All PAM session init is now done before the final fork(). - (djm) EGD detection patch from Tim Rice - (djm) Remove /tmp from EGD socket search list 20010227 - - (bal) Applied shutdown() patch for sftp.c by Corinna Vinschen + - (bal) Applied shutdown() patch for sftp.c by Corinna Vinschen - (bal) OpenBSD Sync - markus@cvs.openbsd.org 2001/02/23 15:37:45 [session.c] handle SSH_PROTOFLAG_SCREEN_NUMBER for buggy clients - - (bal) sshd.init support for all Redhat release. Patch by Jim Knoble + - (bal) sshd.init support for all Redhat release. Patch by Jim Knoble - - (djm) Fix up POSIX saved uid support. Report from Mark Miller + - (djm) Fix up POSIX saved uid support. Report from Mark Miller - (djm) Search for -lcrypt on FreeBSD too - (djm) fatal() on OpenSSL version mismatch @@ -1180,14 +2431,14 @@ 2.3.x. - (djm) Avoid warnings for missing broken IP_TOS. Patch from Mark Miller - - (djm) Open Server 5 doesn't need BROKEN_SAVED_UIDS. Patch from Tim Rice + - (djm) Open Server 5 doesn't need BROKEN_SAVED_UIDS. Patch from Tim Rice - - (djm) Avoid multiple definition of _PATH_LS. Patch from Tim Rice + - (djm) Avoid multiple definition of _PATH_LS. Patch from Tim Rice 20010226 - (bal) Fixed bsd-snprinf.c so it now honors 'BROKEN_SNPRINTF' again. - - (djm) Some systems (SCO3, NeXT) have weird saved uid semantics. + - (djm) Some systems (SCO3, NeXT) have weird saved uid semantics. Based on patch from Tim Rice 20010225 @@ -1197,7 +2448,7 @@ platform defines u_int64_t as being that. 20010224 - - (bal) Missed part of the UNIX sockets patch. Patch by Corinna + - (bal) Missed part of the UNIX sockets patch. Patch by Corinna Vinschen - (bal) Reorder where 'strftime' is detected to resolve linking issues on SCO. Patch by Tim Rice @@ -1215,10 +2466,10 @@ - (bal) Patch to force OpenSSH rpm to require the same version of OpenSSL that it was compiled against. Patch by Pekka Savola - - (bal) Double -I for OpenSSL on SCO. Patch by Tim Rice + - (bal) Double -I for OpenSSL on SCO. Patch by Tim Rice -20010222 +20010222 - (bal) Corrected SCO luid patch by svaughan - (bal) Added mdoc2man.pl from Mark Roth - (bal) Removed reference to liblogin from contrib/README. It was @@ -1228,14 +2479,14 @@ 20010221 - (bal) Removed -L/usr/ucblib -R/usr/ucblib for Solaris platform. - - (bal) Fixed OpenSSL rework to use $saved_*. Patch by Tim Rice + - (bal) Fixed OpenSSL rework to use $saved_*. Patch by Tim Rice - (bal) Reverted out of 2001/02/15 patch by djm below because it breaks Solaris. - (djm) Move PAM session setup back to before setuid to user. fixes problems on Solaris-drived PAMs. - (stevesk) session.c: back out to where we were before: - - (djm) Move PAM session initialisation until after fork in sshd. Patch + - (djm) Move PAM session initialisation until after fork in sshd. Patch from Nalin Dahyabhai 20010220 @@ -1279,33 +2530,33 @@ - Release 2.5.1p1 20010218 - - (bal) Patch for fix FCHMOD reference in ftp-client.c by Tim Rice - + - (bal) Patch for fix FCHMOD reference in ftp-client.c by Tim Rice + - (Bal) Patch for lack of RA_RESTART in misc.c for mysignal by stevesk - - (djm) Fix my breaking of cygwin builds, Patch from Corinna Vinschen + - (djm) Fix my breaking of cygwin builds, Patch from Corinna Vinschen and myself. - (djm) Close listen_sock on bind() failures. Patch from Arkadiusz Miskiewicz - (djm) Robustify EGD/PRNGd code in face of socket closures. Patch from Todd C. Miller - - (djm) Use ttyname() to determine name of tty returned by openpty() - rather then risking overflow. Patch from Marek Michalkiewicz + - (djm) Use ttyname() to determine name of tty returned by openpty() + rather then risking overflow. Patch from Marek Michalkiewicz - - (djm) Swapped tests for no_libsocket and no_libnsl in configure.in. + - (djm) Swapped tests for no_libsocket and no_libnsl in configure.in. Patch from Marek Michalkiewicz - (djm) Doc fixes from Pekka Savola - - (djm) Use SA_INTERRUPT along SA_RESTART if present (equivalent for + - (djm) Use SA_INTERRUPT along SA_RESTART if present (equivalent for SunOS) - - (djm) SCO needs librpc for libwrap. Patch from Tim Rice + - (djm) SCO needs librpc for libwrap. Patch from Tim Rice - (stevesk) misc.c: cpp rework of SA_(INTERRUPT|RESTART) handling. - (stevesk) scp.c: use mysignal() for updateprogressmeter() handler. - - (djm) SA_INTERRUPT is the converse of SA_RESTART, apply it only for + - (djm) SA_INTERRUPT is the converse of SA_RESTART, apply it only for SIGALRM. - (djm) Move entropy.c over to mysignal() - - (djm) SunOS 4.x also needs to define HAVE_BOGUS_SYS_QUEUE_H as it has - a that lacks the TAILQ_* macros. Patch from Todd C. + - (djm) SunOS 4.x also needs to define HAVE_BOGUS_SYS_QUEUE_H as it has + a that lacks the TAILQ_* macros. Patch from Todd C. Miller - (djm) Update RPM spec files for 2.5.0p1 - (djm) Merge BSD_AUTH support from Markus Friedl and David J. MacKenzie @@ -1315,8 +2566,8 @@ 20010217 - (bal) OpenBSD Sync: - markus@cvs.openbsd.org 2001/02/16 13:38:18 - [channel.c] - remove debug + [channel.c] + remove debug - markus@cvs.openbsd.org 2001/02/16 14:03:43 [session.c] proper payload-length check for x11 w/o screen-number @@ -1327,7 +2578,7 @@ - (bal) Added DG/UX case and set that they have a broken IPTOS. - (djm) Mini-configure reorder patch from Tim Rice Fixes linking on SCO. - - (djm) Make gnome-ssh-askpass handle multi-line prompts. Patch from + - (djm) Make gnome-ssh-askpass handle multi-line prompts. Patch from Nalin Dahyabhai - (djm) BSD license for gnome-ssh-askpass (was X11) - (djm) KNF on gnome-ssh-askpass @@ -1347,7 +2598,7 @@ needed on Unixware 2.x. 20010215 - - (djm) Move PAM session setup back to before setuid to user. Fixes + - (djm) Move PAM session setup back to before setuid to user. Fixes problems on Solaris-derived PAMs. - (djm) Clean up PAM namespace. Suggested by Darren Moffat @@ -1393,9 +2644,9 @@ 20010214 - (djm) Don't try to close PAM session or delete credentials if the - session has not been open or credentials not set. Based on patch from + session has not been open or credentials not set. Based on patch from Andrew Bartlett - - (djm) Move PAM session initialisation until after fork in sshd. Patch + - (djm) Move PAM session initialisation until after fork in sshd. Patch from Nalin Dahyabhai - (bal) Missing function prototype in bsd-snprintf.c patch by Mark Miller @@ -1413,12 +2664,12 @@ - (stevesk) auth1.c: fix PAM passwordless check. 20010212 - - (djm) Update Redhat specfile to allow --define "skip_x11_askpass 1", - --define "skip_gnome_askpass 1", --define "rh7 1" and make the - implicit rpm-3.0.5 dependancy explicit. Patch and suggestions from + - (djm) Update Redhat specfile to allow --define "skip_x11_askpass 1", + --define "skip_gnome_askpass 1", --define "rh7 1" and make the + implicit rpm-3.0.5 dependancy explicit. Patch and suggestions from Pekka Savola - (djm) Clean up PCRE text in INSTALL - - (djm) Fix OSF SIA auth NULL pointer deref. Report from Mike Battersby + - (djm) Fix OSF SIA auth NULL pointer deref. Report from Mike Battersby - (bal) NCR SVR4 compatiblity provide by Don Bragg - (stevesk) session.c: remove debugging code. @@ -1457,7 +2708,7 @@ do not ask for passphrase in batch mode; report from ejb@ql.org - itojun@cvs.opebsd.org 2001/02/08 10:47:05 [sshconnect.c sshconnect1.c sshconnect2.c] - %.30s is too short for IPv6 numeric address. use %.128s for now. + %.30s is too short for IPv6 numeric address. use %.128s for now. markus ok - markus@cvs.openbsd.org 2001/02/09 12:28:35 [sshconnect2.c] @@ -1496,11 +2747,11 @@ s/getline/Linebuf_getline/; from roumen.petrov@skalasoft.com - itojun@cvs.openbsd.org 2001/02/09 9:04:59 [ssh-keyscan.c] - do not assume malloc() returns zero-filled region. found by + do not assume malloc() returns zero-filled region. found by malloc.conf=AJ. - markus@cvs.openbsd.org 2001/02/08 22:35:30 [sshconnect.c] - don't connect if batch_mode is true and stricthostkeychecking set to + don't connect if batch_mode is true and stricthostkeychecking set to 'ask' - djm@cvs.openbsd.org 2001/02/04 21:26:07 [sshd_config] @@ -1519,15 +2770,15 @@ fix size_t -> int cast (use u_long). markus ok - 1.47 Thu Feb 8 23:11:42 GMT 2001 by dugsong [serverloop.c sshconnect1.c] - mitigate SSH1 traffic analysis - from Solar Designer + mitigate SSH1 traffic analysis - from Solar Designer , ok provos@ - - (bal) fixed sftp-client.c. Return 'status' instead of '0' + - (bal) fixed sftp-client.c. Return 'status' instead of '0' (from the OpenBSD tree) - (bal) Synced ssh.1, ssh-add.1 and sshd.8 w/ OpenBSD - (bal) sftp-sever.c '%8lld' to '%8llu' (OpenBSD Sync) - (bal) uuencode.c resync w/ OpenBSD tree, plus whitespace. - (bal) A bit more whitespace cleanup - - (djm) Set PAM_RHOST earlier, patch from Andrew Bartlett + - (djm) Set PAM_RHOST earlier, patch from Andrew Bartlett - (stevesk) misc.c: ssh.h not needed. - (stevesk) compat.c: more friendly cpp error @@ -1614,10 +2865,10 @@ - (bal) sftp-client.c replace NULL w/ 0 in do_ls() (pending in OpenBSD tree) 20010209 - - (bal) patch to vis.c to deal with HAVE_VIS right by Robert Mooney + - (bal) patch to vis.c to deal with HAVE_VIS right by Robert Mooney - (bal) .c.o rule in openbsd-compat/Makefile.in did not make it to the - main tree while porting forward. Pointed out by Lutz Jaenicke + main tree while porting forward. Pointed out by Lutz Jaenicke - (bal) double entry in configure.in. Pointed out by Lutz Jaenicke @@ -1663,7 +2914,7 @@ - djm@cvs.openbsd.org 2001/02/06 23:30:28 [sftp-client.c] replace arc4random with counter for request ids; ok markus@ - - (djm) Define _PATH_TTY for systems that don't. Report from Lutz + - (djm) Define _PATH_TTY for systems that don't. Report from Lutz Jaenicke 20010208 @@ -1728,14 +2979,14 @@ make the alpha happy - markus@cvs.openbsd.org 2001/01/31 13:37:24 [channels.c channels.h serverloop.c ssh.c] - do not disconnect if local port forwarding fails, e.g. if port is + do not disconnect if local port forwarding fails, e.g. if port is already in use - markus@cvs.openbsd.org 2001/02/01 14:58:09 [channels.c] use ipaddr in channel messages, ietf-secsh wants this - markus@cvs.openbsd.org 2001/01/31 12:26:20 [channels.c] - ssh.com-2.0.1x does not send additional info in CHANNEL_OPEN_FAILURE + ssh.com-2.0.1x does not send additional info in CHANNEL_OPEN_FAILURE messages; bug report from edmundo@rano.org - markus@cvs.openbsd.org 2001/01/31 13:48:09 [sshconnect2.c] @@ -1772,7 +3023,7 @@ [sftp-common.c sftp-common.h sftp-int.c sftp-int.h sftp.1 sftp.c] Basic interactive sftp client; ok theo@ - (djm) Update RPM specs for new sftp binary - - (djm) Update several bits for new optional reverse lookup stuff. I + - (djm) Update several bits for new optional reverse lookup stuff. I think I got them all. - (djm) Makefile.in fixes - (stevesk) add mysignal() wrapper and use it for the protocol 2 @@ -5318,4 +6569,4 @@ - Wrote replacements for strlcpy and mkdtemp - Released 1.0pre1 -$Id: ChangeLog,v 1.1179.2.18 2001/06/17 03:40:50 djm Exp $ +$Id: ChangeLog,v 1.1559.2.2 2001/09/25 12:22:54 djm Exp $ diff -ru openssh-2.9p2/INSTALL openssh-2.9.9p1/INSTALL --- openssh-2.9p2/INSTALL 2001-05-09 06:43:01.000000000 +1000 +++ openssh-2.9.9p1/INSTALL 2001-06-29 22:39:24.000000000 +1000 @@ -4,7 +4,7 @@ You will need working installations of Zlib and OpenSSL. Zlib: -http://www.freesoftware.com/pub/infozip/zlib/ +http://www.gzip.org/zlib/ OpenSSL 0.9.5a or greater: http://www.openssl.org/ @@ -230,4 +230,4 @@ http://www.openssh.com/ -$Id: INSTALL,v 1.44.2.1 2001/05/08 20:43:01 mouring Exp $ +$Id: INSTALL,v 1.46 2001/06/29 12:39:24 mouring Exp $ diff -ru openssh-2.9p2/LICENCE openssh-2.9.9p1/LICENCE --- openssh-2.9p2/LICENCE 2001-02-12 03:43:05.000000000 +1100 +++ openssh-2.9.9p1/LICENCE 2001-09-23 23:58:38.000000000 +1000 @@ -26,7 +26,7 @@ [However, none of that term is relevant at this point in time. All of these restrictively licenced software components which he talks about - have been removed from OpenSSH, ie. + have been removed from OpenSSH, i.e., - RSA is no longer included, found in the OpenSSL library - IDEA is no longer included, its use is deprecated @@ -85,8 +85,7 @@ 3) The 32-bit CRC compensation attack detector in deattack.c was - contributed by CORE SDI S.A. under a BSD-style license. See - http://www.core-sdi.com/english/ssh/ for details. + contributed by CORE SDI S.A. under a BSD-style license. * Cryptographic attack detector for ssh - source code * @@ -104,8 +103,45 @@ * * Ariel Futoransky * - + 4) + ssh-keygen was contributed by David Mazieres under a BSD-style + license. + + * Copyright 1995, 1996 by David Mazieres . + * + * Modification and redistribution in source and binary forms is + * permitted provided that due credit is given to the author and the + * OpenBSD project by leaving this copyright notice intact. + +5) + The Rijndael implementation by Vincent Rijmen, Antoon Bosselaers + and Paulo Barreto is in the public domain and distributed + with the following license: + + * @version 3.0 (December 2000) + * + * Optimised ANSI C code for the Rijndael cipher (now AES) + * + * @author Vincent Rijmen + * @author Antoon Bosselaers + * @author Paulo Barreto + * + * This code is hereby placed in the public domain. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +6) Remaining components of the software are provided under a standard 2-term BSD licence with the following names as copyright holders: @@ -114,6 +150,8 @@ Niels Provos Dug Song Aaron Campbell + Damien Miller + Kevin Steves * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff -ru openssh-2.9p2/Makefile.in openssh-2.9.9p1/Makefile.in --- openssh-2.9p2/Makefile.in 2001-04-27 10:31:08.000000000 +1000 +++ openssh-2.9.9p1/Makefile.in 2001-09-18 15:06:22.000000000 +1000 @@ -1,10 +1,11 @@ -# $Id: Makefile.in,v 1.174 2001/04/27 00:31:08 mouring Exp $ +# $Id: Makefile.in,v 1.186 2001/09/18 05:06:22 djm Exp $ prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ sbindir=@sbindir@ libexecdir=@libexecdir@ +datadir=@datadir@ mandir=@mandir@ mansubdir=@mansubdir@ sysconfdir=@sysconfdir@ @@ -45,18 +46,18 @@ TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-agent$(EXEEXT) scp$(EXEEXT) $(SFTP_PROGS) -LIBSSH_OBJS=atomicio.o authfd.o authfile.o bufaux.o buffer.o canohost.o channels.o cipher.o cli.o compat.o compress.o crc32.o deattack.o dh.o dispatch.o mac.o hostfile.o key.o kex.o kexdh.o kexgex.o log.o match.o misc.o mpaux.o nchan.o packet.o radix.o rijndael.o entropy.o readpass.o rsa.o ssh-dss.o ssh-rsa.o tildexpand.o ttymodes.o uidswap.o uuencode.o xmalloc.o +LIBSSH_OBJS=atomicio.o authfd.o authfile.o bufaux.o buffer.o canohost.o channels.o cipher.o compat.o compress.o crc32.o deattack.o dh.o dispatch.o mac.o hostfile.o key.o kex.o kexdh.o kexgex.o log.o match.o misc.o mpaux.o nchan.o packet.o radix.o rijndael.o entropy.o readpass.o rsa.o scard.o ssh-dss.o ssh-rsa.o tildexpand.o ttymodes.o uidswap.o uuencode.o xmalloc.o SSHOBJS= ssh.o sshconnect.o sshconnect1.o sshconnect2.o sshtty.o readconf.o clientloop.o -SSHDOBJS= sshd.o auth.o auth1.o auth2.o auth-chall.o auth2-chall.o auth-rhosts.o auth-options.o auth-krb4.o auth-pam.o auth2-pam.o auth-passwd.o auth-rsa.o auth-rh-rsa.o auth-sia.o sshpty.o sshlogin.o loginrec.o servconf.o serverloop.o md5crypt.o session.o groupaccess.o +SSHDOBJS= sshd.o auth.o auth1.o auth2.o auth-chall.o auth2-chall.o auth-rhosts.o auth-options.o auth-krb4.o auth-pam.o auth2-pam.o auth-passwd.o auth-rsa.o auth-rh-rsa.o auth-sia.o sshpty.o sshlogin.o loginrec.o servconf.o serverloop.o md5crypt.o session.o groupaccess.o auth-skey.o auth-bsdauth.o MANPAGES = scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out MANPAGES_IN = scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 MANTYPE = @MANTYPE@ -CONFIGFILES=sshd_config.out ssh_config.out primes.out -CONFIGFILES_IN=sshd_config ssh_config primes +CONFIGFILES=sshd_config.out ssh_config.out moduli.out +CONFIGFILES_IN=sshd_config ssh_config moduli PATHSUBS = \ -D/etc/ssh_config=$(sysconfdir)/ssh_config \ @@ -68,7 +69,7 @@ -D/etc/ssh_host_dsa_key=$(sysconfdir)/ssh_host_dsa_key \ -D/etc/ssh_host_rsa_key=$(sysconfdir)/ssh_host_rsa_key \ -D/var/run/sshd.pid=$(piddir)/sshd.pid \ - -D/etc/primes=$(sysconfdir)/primes \ + -D/etc/moduli=$(sysconfdir)/moduli \ -D/etc/sshrc=$(sysconfdir)/sshrc \ -D/usr/X11R6/bin/xauth=$(XAUTH_PATH) \ -D/usr/bin:/bin:/usr/sbin:/sbin=@user_path@ @@ -98,8 +99,8 @@ sshd$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHDOBJS) $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) -scp$(EXEEXT): $(LIBCOMPAT) libssh.a scp.o scp-common.o - $(LD) -o $@ scp.o scp-common.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) +scp$(EXEEXT): $(LIBCOMPAT) libssh.a scp.o + $(LD) -o $@ scp.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) ssh-add$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-add.o $(LD) -o $@ ssh-add.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) @@ -111,13 +112,13 @@ $(LD) -o $@ ssh-keygen.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) ssh-keyscan$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keyscan.o - $(LD) -o $@ ssh-keyscan.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) + $(LD) -o $@ ssh-keyscan.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh $(LIBS) sftp-server$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-common.o sftp-server.o $(LD) -o $@ sftp-server.o sftp-common.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) -sftp$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-client.o sftp-int.o sftp-common.o sftp-glob.o scp-common.o - $(LD) -o $@ sftp.o sftp-client.o sftp-common.o sftp-int.o sftp-glob.o scp-common.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) +sftp$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-client.o sftp-int.o sftp-common.o sftp-glob.o + $(LD) -o $@ sftp.o sftp-client.o sftp-common.o sftp-int.o sftp-glob.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) # test driver for the loginrec code - not built by default logintest: logintest.o $(LIBCOMPAT) libssh.a loginrec.o @@ -140,19 +141,26 @@ $(FIXPATHSCMD) $(srcdir)/$${conffile} > $@ clean: - (cd openbsd-compat; $(MAKE) clean) rm -f *.o *.a $(TARGETS) logintest config.cache config.log rm -f *.out core + (cd openbsd-compat; $(MAKE) clean) -distclean: clean +distclean: + rm -f *.o *.a $(TARGETS) logintest config.cache config.log + rm -f *.out core + rm -f Makefile config.h config.status ssh_prng_cmds *~ (cd openbsd-compat; $(MAKE) distclean) + (cd scard; $(MAKE) distclean) + +veryclean: + rm -f configure config.h.in *.0 + rm -f *.o *.a $(TARGETS) logintest config.cache config.log + rm -f *.out core rm -f Makefile config.h config.status ssh_prng_cmds *~ + (cd openbsd-compat; $(MAKE) distclean) mrproper: distclean -veryclean: distclean - rm -f configure config.h.in *.0 - catman-do: @for f in $(MANPAGES_IN) ; do \ base=`echo $$f | sed 's/\..*$$//'` ; \ @@ -163,13 +171,19 @@ distprep: catman-do autoreconf + (cd scard ; $(MAKE) -f Makefile.in distprep) -install: $(TARGETS) install-files host-key +install: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files host-key +install-nokeys: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files -install-files: +scard-install: + (cd scard; $(MAKE) DESTDIR=$(DESTDIR) install) + +install-files: scard-install $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) $(srcdir)/mkinstalldirs $(DESTDIR)$(sbindir) $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir) + $(srcdir)/mkinstalldirs $(DESTDIR)$(datadir) $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)1 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)8 $(srcdir)/mkinstalldirs $(DESTDIR)$(libexecdir) @@ -195,7 +209,7 @@ ln -s ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 ln -s ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 - @FILEPRIV@ -f dev,filesys,driver $(DESTDIR)$(bindir)/ssh $(DESTDIR)$(bindir)/slogin + #@FILEPRIV@ -f dev,filesys,driver $(DESTDIR)$(bindir)/ssh $(DESTDIR)$(bindir)/slogin if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \ $(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir); \ fi @@ -217,10 +231,15 @@ echo "$(DESTDIR)$(sysconfdir)/ssh_prng_cmds already exists, install will not overwrite"; \ fi ; \ fi - if [ ! -f $(DESTDIR)$(sysconfdir)/primes ]; then \ - $(INSTALL) -m 644 primes.out $(DESTDIR)$(sysconfdir)/primes; \ + if [ ! -f $(DESTDIR)$(sysconfdir)/moduli ]; then \ + if [ -f $(DESTDIR)$(sysconfdir)/primes ]; then \ + echo "moving $(DESTDIR)$(sysconfdir)/primes to $(DESTDIR)$(sysconfdir)/moduli"; \ + mv "$(DESTDIR)$(sysconfdir)/primes" "$(DESTDIR)$(sysconfdir)/moduli"; \ + else \ + $(INSTALL) -m 644 moduli.out $(DESTDIR)$(sysconfdir)/moduli; \ + fi ; \ else \ - echo "$(DESTDIR)$(sysconfdir)/primes already exists, install will not overwrite"; \ + echo "$(DESTDIR)$(sysconfdir)/moduli already exists, install will not overwrite"; \ fi host-key: ssh-keygen$(EXEEXT) diff -ru openssh-2.9p2/OVERVIEW openssh-2.9.9p1/OVERVIEW --- openssh-2.9p2/OVERVIEW 1999-11-21 18:31:57.000000000 +1100 +++ openssh-2.9.9p1/OVERVIEW 2001-09-25 16:46:11.000000000 +1000 @@ -1,9 +1,15 @@ +[Note: This file has not been updated for OpenSSH versions after +OpenSSH-1.2 and should be considered OBSOLETE. It has been left in +the distribution because some of its information may still be useful +to developers.] + This document is intended for those who wish to read the ssh source code. This tries to give an overview of the structure of the code. Copyright (c) 1995 Tatu Ylonen Updated 17 Nov 1995. Updated 19 Oct 1999 for OpenSSH-1.2 +Updated 20 May 2001 note obsolete for > OpenSSH-1.2 The software consists of ssh (client), sshd (server), scp, sdist, and the auxiliary programs ssh-keygen, ssh-agent, ssh-add, and Only in openssh-2.9.9p1: README.smartcard diff -ru openssh-2.9p2/TODO openssh-2.9.9p1/TODO --- openssh-2.9p2/TODO 2001-03-27 16:10:22.000000000 +1000 +++ openssh-2.9.9p1/TODO 2001-09-25 16:46:11.000000000 +1000 @@ -32,6 +32,8 @@ and order to try them in e.g. "ChallengeResponseAuthentication skey, pam" - Complete Tru64 SIA support + - It looks like we could merge it into the password auth code to cut down + on diff size. Maybe PAM password auth too? - Finish integrating kernel-level auditing code for IRIX and SOLARIS (Gilbert.r.loomis@saic.com) @@ -53,9 +55,10 @@ - 64-bit builds on HP-UX 11.X (stevesk@pobox.com): - utmp/wtmp get corrupted (something in loginrec?) - - no 64-bit vhangup(); ptmx systems shouldn't need this - can't build with PAM (no 64-bit libpam yet) +- Modify rijndael to support Cray 64bit machines. + Documentation: - More and better @@ -88,4 +91,4 @@ - HP-UX: Provide DEPOT package scripts. (gilbert.r.loomis@saic.com) -$Id: TODO,v 1.40 2001/03/27 06:10:22 djm Exp $ +$Id: TODO,v 1.42.2.1 2001/09/25 06:46:11 djm Exp $ diff -ru openssh-2.9p2/acconfig.h openssh-2.9.9p1/acconfig.h --- openssh-2.9p2/acconfig.h 2001-05-09 06:34:32.000000000 +1000 +++ openssh-2.9.9p1/acconfig.h 2001-09-21 05:43:41.000000000 +1000 @@ -1,4 +1,4 @@ -/* $Id: acconfig.h,v 1.110.2.1 2001/05/08 20:34:32 mouring Exp $ */ +/* $Id: acconfig.h,v 1.117 2001/09/20 19:43:41 stevesk Exp $ */ #ifndef _CONFIG_H #define _CONFIG_H @@ -26,8 +26,11 @@ /* Define if your password has a pw_class field */ #undef HAVE_PW_CLASS_IN_PASSWD -/* Define if your system's struct sockaddr_un has a sun_len member */ -#undef HAVE_SUN_LEN_IN_SOCKADDR_UN +/* Define if your password has a pw_expire field */ +#undef HAVE_PW_EXPIRE_IN_PASSWD + +/* Define if your password has a pw_change field */ +#undef HAVE_PW_CHANGE_IN_PASSWD /* Define if you system's inet_ntoa is busted (e.g. Irix gcc issue) */ #undef BROKEN_INET_NTOA @@ -247,6 +250,7 @@ #undef HAVE_UINTXX_T #undef HAVE_INT64_T #undef HAVE_U_INT64_T +#undef HAVE_U_CHAR #undef HAVE_SOCKLEN_T #undef HAVE_SIZE_T #undef HAVE_SSIZE_T @@ -314,6 +318,21 @@ /* Define in your struct dirent expects you to allocate extra space for d_name */ #undef BROKEN_ONE_BYTE_DIRENT_D_NAME +/* Define if your getopt(3) defines and uses optreset */ +#undef HAVE_GETOPT_OPTRESET + +/* Define on *nto-qnx systems */ +#undef MISSING_NFDBITS + +/* Define on *nto-qnx systems */ +#undef MISSING_HOWMANY + +/* Define on *nto-qnx systems */ +#undef MISSING_FD_MASK + +/* Define if you want smartcard support */ +#undef SMARTCARD + @BOTTOM@ /* ******************* Shouldn't need to edit below this line ************** */ diff -ru openssh-2.9p2/atomicio.c openssh-2.9.9p1/atomicio.c --- openssh-2.9p2/atomicio.c 2001-03-05 17:59:27.000000000 +1100 +++ openssh-2.9.9p1/atomicio.c 2001-05-09 10:02:52.000000000 +1000 @@ -24,9 +24,8 @@ */ #include "includes.h" -RCSID("$OpenBSD: atomicio.c,v 1.9 2001/03/02 18:54:30 deraadt Exp $"); +RCSID("$OpenBSD: atomicio.c,v 1.10 2001/05/08 22:48:07 markus Exp $"); -#include "xmalloc.h" #include "atomicio.h" /* diff -ru openssh-2.9p2/atomicio.h openssh-2.9.9p1/atomicio.h --- openssh-2.9p2/atomicio.h 2001-03-05 17:59:27.000000000 +1100 +++ openssh-2.9.9p1/atomicio.h 2001-07-04 14:02:37.000000000 +1000 @@ -1,4 +1,4 @@ -/* $OpenBSD: atomicio.h,v 1.3 2001/03/02 18:54:30 deraadt Exp $ */ +/* $OpenBSD: atomicio.h,v 1.4 2001/06/26 06:32:46 itojun Exp $ */ /* * Copyright (c) 1995,1999 Theo de Raadt. All rights reserved. @@ -28,4 +28,4 @@ /* * Ensure all of data on socket comes through. f==read || f==write */ -ssize_t atomicio(ssize_t (*f)(), int fd, void *s, size_t n); +ssize_t atomicio(ssize_t (*)(), int, void *, size_t); Only in openssh-2.9.9p1: auth-bsdauth.c diff -ru openssh-2.9p2/auth-chall.c openssh-2.9.9p1/auth-chall.c --- openssh-2.9p2/auth-chall.c 2001-04-06 09:26:32.000000000 +1000 +++ openssh-2.9.9p1/auth-chall.c 2001-06-06 04:56:17.000000000 +1000 @@ -23,82 +23,60 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth-chall.c,v 1.7 2001/04/05 10:42:47 markus Exp $"); +RCSID("$OpenBSD: auth-chall.c,v 1.8 2001/05/18 14:13:28 markus Exp $"); #include "auth.h" #include "log.h" +#include "xmalloc.h" -#ifdef BSD_AUTH -char * -get_challenge(Authctxt *authctxt, char *devs) -{ - char *challenge; +/* limited protocol v1 interface to kbd-interactive authentication */ - if (authctxt->as != NULL) { - debug2("try reuse session"); - challenge = auth_getitem(authctxt->as, AUTHV_CHALLENGE); - if (challenge != NULL) { - debug2("reuse bsd auth session"); - return challenge; - } - auth_close(authctxt->as); - authctxt->as = NULL; - } - debug2("new bsd auth session"); - if (devs == NULL || strlen(devs) == 0) - devs = authctxt->style; - debug3("bsd auth: devs %s", devs ? devs : ""); - authctxt->as = auth_userchallenge(authctxt->user, devs, "auth-ssh", - &challenge); - if (authctxt->as == NULL) - return NULL; - debug2("get_challenge: <%s>", challenge ? challenge : "EMPTY"); - return challenge; -} -int -verify_response(Authctxt *authctxt, char *response) -{ - int authok; - - if (authctxt->as == 0) - error("verify_response: no bsd auth session"); - authok = auth_userresponse(authctxt->as, response, 0); - authctxt->as = NULL; - debug("verify_response: <%s> = <%d>", response, authok); - return authok != 0; -} -#else -#ifdef SKEY -#include +extern KbdintDevice *devices[]; +static KbdintDevice *device; char * -get_challenge(Authctxt *authctxt, char *devs) +get_challenge(Authctxt *authctxt) { - static char challenge[1024]; - struct skey skey; - if (skeychallenge(&skey, authctxt->user, challenge) == -1) + char *challenge, *name, *info, **prompts; + u_int i, numprompts; + u_int *echo_on; + + device = devices[0]; /* we always use the 1st device for protocol 1 */ + if (device == NULL) return NULL; - strlcat(challenge, "\nS/Key Password: ", sizeof challenge); - return challenge; -} -int -verify_response(Authctxt *authctxt, char *response) -{ - return (authctxt->valid && - skey_haskey(authctxt->pw->pw_name) == 0 && - skey_passcheck(authctxt->pw->pw_name, response) != -1); -} -#else -/* not available */ -char * -get_challenge(Authctxt *authctxt, char *devs) -{ - return NULL; + if ((authctxt->kbdintctxt = device->init_ctx(authctxt)) == NULL) + return NULL; + if (device->query(authctxt->kbdintctxt, &name, &info, + &numprompts, &prompts, &echo_on)) { + device->free_ctx(authctxt->kbdintctxt); + authctxt->kbdintctxt = NULL; + return NULL; + } + if (numprompts < 1) + fatal("get_challenge: numprompts < 1"); + challenge = xstrdup(prompts[0]); + for (i = 0; i < numprompts; i++) + xfree(prompts[i]); + xfree(prompts); + xfree(name); + xfree(echo_on); + xfree(info); + + return (challenge); } int -verify_response(Authctxt *authctxt, char *response) +verify_response(Authctxt *authctxt, const char *response) { - return 0; + char *resp[1]; + int res; + + if (device == NULL) + return 0; + if (authctxt->kbdintctxt == NULL) + return 0; + resp[0] = (char *)response; + res = device->respond(authctxt->kbdintctxt, 1, resp); + device->free_ctx(authctxt->kbdintctxt); + authctxt->kbdintctxt = NULL; + return res ? 0 : 1; } -#endif -#endif diff -ru openssh-2.9p2/auth-krb4.c openssh-2.9.9p1/auth-krb4.c --- openssh-2.9p2/auth-krb4.c 2001-01-23 11:19:16.000000000 +1100 +++ openssh-2.9.9p1/auth-krb4.c 2001-07-04 14:21:15.000000000 +1000 @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth-krb4.c,v 1.23 2001/01/22 08:15:00 markus Exp $"); +RCSID("$OpenBSD: auth-krb4.c,v 1.24 2001/06/26 16:15:22 dugsong Exp $"); #include "ssh.h" #include "ssh1.h" @@ -31,6 +31,7 @@ #include "xmalloc.h" #include "log.h" #include "servconf.h" +#include "uidswap.h" #include "auth.h" #ifdef AFS @@ -38,70 +39,114 @@ #endif #ifdef KRB4 -char *ticket = NULL; - extern ServerOptions options; +static int +krb4_init(void *context) +{ + static int cleanup_registered = 0; + Authctxt *authctxt = (Authctxt *)context; + const char *tkt_root = TKT_ROOT; + struct stat st; + int fd; + + if (!authctxt->krb4_ticket_file) { + /* Set unique ticket string manually since we're still root. */ + authctxt->krb4_ticket_file = xmalloc(MAXPATHLEN); +#ifdef AFS + if (lstat("/ticket", &st) != -1) + tkt_root = "/ticket/"; +#endif /* AFS */ + snprintf(authctxt->krb4_ticket_file, MAXPATHLEN, "%s%u_%d", + tkt_root, authctxt->pw->pw_uid, getpid()); + krb_set_tkt_string(authctxt->krb4_ticket_file); + } + /* Register ticket cleanup in case of fatal error. */ + if (!cleanup_registered) { + fatal_add_cleanup(krb4_cleanup_proc, authctxt); + cleanup_registered = 1; + } + /* Try to create our ticket file. */ + if ((fd = mkstemp(authctxt->krb4_ticket_file)) != -1) { + close(fd); + return (1); + } + /* Ticket file exists - make sure user owns it (just passed ticket). */ + if (lstat(authctxt->krb4_ticket_file, &st) != -1) { + if (st.st_mode == (S_IFREG | S_IRUSR | S_IWUSR) && + st.st_uid == authctxt->pw->pw_uid) + return (1); + } + /* Failure - cancel cleanup function, leaving ticket for inspection. */ + log("WARNING: bad ticket file %s", authctxt->krb4_ticket_file); + + fatal_remove_cleanup(krb4_cleanup_proc, authctxt); + cleanup_registered = 0; + + xfree(authctxt->krb4_ticket_file); + authctxt->krb4_ticket_file = NULL; + + return (0); +} + /* * try krb4 authentication, * return 1 on success, 0 on failure, -1 if krb4 is not available */ - int -auth_krb4_password(struct passwd * pw, const char *password) +auth_krb4_password(Authctxt *authctxt, const char *password) { AUTH_DAT adata; KTEXT_ST tkt; struct hostent *hp; - u_long faddr; - char localhost[MAXHOSTNAMELEN]; - char phost[INST_SZ]; - char realm[REALM_SZ]; + struct passwd *pw; + char localhost[MAXHOSTNAMELEN], phost[INST_SZ], realm[REALM_SZ]; + u_int32_t faddr; int r; - + + if ((pw = authctxt->pw) == NULL) + return (0); + /* * Try Kerberos password authentication only for non-root * users and only if Kerberos is installed. */ if (pw->pw_uid != 0 && krb_get_lrealm(realm, 1) == KSUCCESS) { - /* Set up our ticket file. */ - if (!krb4_init(pw->pw_uid)) { + if (!krb4_init(authctxt)) { log("Couldn't initialize Kerberos ticket file for %s!", pw->pw_name); - goto kerberos_auth_failure; + goto failure; } /* Try to get TGT using our password. */ - r = krb_get_pw_in_tkt((char *) pw->pw_name, "", - realm, "krbtgt", realm, - DEFAULT_TKT_LIFE, (char *) password); + r = krb_get_pw_in_tkt((char *) pw->pw_name, "", realm, + "krbtgt", realm, DEFAULT_TKT_LIFE, (char *)password); if (r != INTK_OK) { - packet_send_debug("Kerberos V4 password " - "authentication for %s failed: %s", - pw->pw_name, krb_err_txt[r]); - goto kerberos_auth_failure; + debug("Kerberos v4 password authentication for %s " + "failed: %s", pw->pw_name, krb_err_txt[r]); + goto failure; } /* Successful authentication. */ chown(tkt_string(), pw->pw_uid, pw->pw_gid); - + /* * Now that we have a TGT, try to get a local * "rcmd" ticket to ensure that we are not talking * to a bogus Kerberos server. */ - (void) gethostname(localhost, sizeof(localhost)); - (void) strlcpy(phost, (char *) krb_get_phost(localhost), - INST_SZ); + gethostname(localhost, sizeof(localhost)); + strlcpy(phost, (char *)krb_get_phost(localhost), + sizeof(phost)); r = krb_mk_req(&tkt, KRB4_SERVICE_NAME, phost, realm, 33); - + if (r == KSUCCESS) { - if (!(hp = gethostbyname(localhost))) { + if ((hp = gethostbyname(localhost)) == NULL) { log("Couldn't get local host address!"); - goto kerberos_auth_failure; + goto failure; } - memmove((void *) &faddr, (void *) hp->h_addr, + memmove((void *)&faddr, (void *)hp->h_addr, sizeof(faddr)); - + /* Verify our "rcmd" ticket. */ r = krb_rd_req(&tkt, KRB4_SERVICE_NAME, phost, faddr, &adata, ""); @@ -110,119 +155,74 @@ * Probably didn't have a srvtab on * localhost. Disallow login. */ - log("Kerberos V4 TGT for %s unverifiable, " + log("Kerberos v4 TGT for %s unverifiable, " "no srvtab installed? krb_rd_req: %s", pw->pw_name, krb_err_txt[r]); - goto kerberos_auth_failure; + goto failure; } else if (r != KSUCCESS) { - log("Kerberos V4 %s ticket unverifiable: %s", + log("Kerberos v4 %s ticket unverifiable: %s", KRB4_SERVICE_NAME, krb_err_txt[r]); - goto kerberos_auth_failure; + goto failure; } } else if (r == KDC_PR_UNKNOWN) { /* * Disallow login if no rcmd service exists, and * log the error. */ - log("Kerberos V4 TGT for %s unverifiable: %s; %s.%s " + log("Kerberos v4 TGT for %s unverifiable: %s; %s.%s " "not registered, or srvtab is wrong?", pw->pw_name, - krb_err_txt[r], KRB4_SERVICE_NAME, phost); - goto kerberos_auth_failure; + krb_err_txt[r], KRB4_SERVICE_NAME, phost); + goto failure; } else { /* * TGT is bad, forget it. Possibly spoofed! */ - packet_send_debug("WARNING: Kerberos V4 TGT " - "possibly spoofed for %s: %s", - pw->pw_name, krb_err_txt[r]); - goto kerberos_auth_failure; + debug("WARNING: Kerberos v4 TGT possibly spoofed " + "for %s: %s", pw->pw_name, krb_err_txt[r]); + goto failure; } - /* Authentication succeeded. */ - return 1; - -kerberos_auth_failure: - krb4_cleanup_proc(NULL); - - if (!options.kerberos_or_local_passwd) - return 0; - } else { + return (1); + } else /* Logging in as root or no local Kerberos realm. */ - packet_send_debug("Unable to authenticate to Kerberos."); - } + debug("Unable to authenticate to Kerberos."); + + failure: + krb4_cleanup_proc(authctxt); + + if (!options.kerberos_or_local_passwd) + return (0); + /* Fall back to ordinary passwd authentication. */ - return -1; + return (-1); } void -krb4_cleanup_proc(void *ignore) +krb4_cleanup_proc(void *context) { + Authctxt *authctxt = (Authctxt *)context; debug("krb4_cleanup_proc called"); - if (ticket) { + if (authctxt->krb4_ticket_file) { (void) dest_tkt(); - xfree(ticket); - ticket = NULL; - } -} - -int -krb4_init(uid_t uid) -{ - static int cleanup_registered = 0; - const char *tkt_root = TKT_ROOT; - struct stat st; - int fd; - - if (!ticket) { - /* Set unique ticket string manually since we're still root. */ - ticket = xmalloc(MAXPATHLEN); -#ifdef AFS - if (lstat("/ticket", &st) != -1) - tkt_root = "/ticket/"; -#endif /* AFS */ - snprintf(ticket, MAXPATHLEN, "%s%u_%d", tkt_root, uid, getpid()); - (void) krb_set_tkt_string(ticket); - } - /* Register ticket cleanup in case of fatal error. */ - if (!cleanup_registered) { - fatal_add_cleanup(krb4_cleanup_proc, NULL); - cleanup_registered = 1; - } - /* Try to create our ticket file. */ - if ((fd = mkstemp(ticket)) != -1) { - close(fd); - return 1; - } - /* Ticket file exists - make sure user owns it (just passed ticket). */ - if (lstat(ticket, &st) != -1) { - if (st.st_mode == (S_IFREG | S_IRUSR | S_IWUSR) && - st.st_uid == uid) - return 1; + xfree(authctxt->krb4_ticket_file); + authctxt->krb4_ticket_file = NULL; } - /* Failure - cancel cleanup function, leaving bad ticket for inspection. */ - log("WARNING: bad ticket file %s", ticket); - fatal_remove_cleanup(krb4_cleanup_proc, NULL); - cleanup_registered = 0; - xfree(ticket); - ticket = NULL; - - return 0; } int -auth_krb4(const char *server_user, KTEXT auth, char **client) +auth_krb4(Authctxt *authctxt, KTEXT auth, char **client) { AUTH_DAT adat = {0}; KTEXT_ST reply; + Key_schedule schedule; + struct sockaddr_in local, foreign; char instance[INST_SZ]; - int r, s; socklen_t slen; u_int cksum; - Key_schedule schedule; - struct sockaddr_in local, foreign; - + int r, s; + s = packet_get_connection_in(); - + slen = sizeof(local); memset(&local, 0, sizeof(local)); if (getsockname(s, (struct sockaddr *) & local, &slen) < 0) @@ -235,157 +235,139 @@ } instance[0] = '*'; instance[1] = 0; - + /* Get the encrypted request, challenge, and session key. */ - if ((r = krb_rd_req(auth, KRB4_SERVICE_NAME, instance, 0, &adat, ""))) { - packet_send_debug("Kerberos V4 krb_rd_req: %.100s", krb_err_txt[r]); - return 0; + if ((r = krb_rd_req(auth, KRB4_SERVICE_NAME, instance, + 0, &adat, ""))) { + debug("Kerberos v4 krb_rd_req: %.100s", krb_err_txt[r]); + return (0); } des_key_sched((des_cblock *) adat.session, schedule); - + *client = xmalloc(MAX_K_NAME_SZ); (void) snprintf(*client, MAX_K_NAME_SZ, "%s%s%s@%s", adat.pname, *adat.pinst ? "." : "", adat.pinst, adat.prealm); - + /* Check ~/.klogin authorization now. */ - if (kuserok(&adat, (char *) server_user) != KSUCCESS) { - packet_send_debug("Kerberos V4 .klogin authorization failed!"); - log("Kerberos V4 .klogin authorization failed for %s to account %s", - *client, server_user); + if (kuserok(&adat, authctxt->user) != KSUCCESS) { + log("Kerberos v4 .klogin authorization failed for %s to " + "account %s", *client, authctxt->user); xfree(*client); - return 0; + return (0); } /* Increment the checksum, and return it encrypted with the session key. */ cksum = adat.checksum + 1; cksum = htonl(cksum); - + /* If we can't successfully encrypt the checksum, we send back an empty message, admitting our failure. */ if ((r = krb_mk_priv((u_char *) & cksum, reply.dat, sizeof(cksum) + 1, schedule, &adat.session, &local, &foreign)) < 0) { - packet_send_debug("Kerberos V4 mk_priv: (%d) %s", r, krb_err_txt[r]); + debug("Kerberos v4 mk_priv: (%d) %s", r, krb_err_txt[r]); reply.dat[0] = 0; reply.length = 0; } else reply.length = r; - + /* Clear session key. */ memset(&adat.session, 0, sizeof(&adat.session)); - + packet_start(SSH_SMSG_AUTH_KERBEROS_RESPONSE); packet_put_string((char *) reply.dat, reply.length); packet_send(); packet_write_wait(); - return 1; + return (1); } #endif /* KRB4 */ #ifdef AFS int -auth_kerberos_tgt(struct passwd *pw, const char *string) +auth_krb4_tgt(Authctxt *authctxt, const char *string) { CREDENTIALS creds; - - if (pw == NULL) - goto auth_kerberos_tgt_failure; + struct passwd *pw; + + if ((pw = authctxt->pw) == NULL) + goto failure; + + temporarily_use_uid(pw); + if (!radix_to_creds(string, &creds)) { - log("Protocol error decoding Kerberos V4 tgt"); - packet_send_debug("Protocol error decoding Kerberos V4 tgt"); - goto auth_kerberos_tgt_failure; + log("Protocol error decoding Kerberos v4 TGT"); + goto failure; } if (strncmp(creds.service, "", 1) == 0) /* backward compatibility */ strlcpy(creds.service, "krbtgt", sizeof creds.service); - + if (strcmp(creds.service, "krbtgt")) { - log("Kerberos V4 tgt (%s%s%s@%s) rejected for %s", creds.pname, - creds.pinst[0] ? "." : "", creds.pinst, creds.realm, - pw->pw_name); - packet_send_debug("Kerberos V4 tgt (%s%s%s@%s) rejected for %s", + log("Kerberos v4 TGT (%s%s%s@%s) rejected for %s", creds.pname, creds.pinst[0] ? "." : "", creds.pinst, creds.realm, pw->pw_name); - goto auth_kerberos_tgt_failure; + goto failure; } - if (!krb4_init(pw->pw_uid)) - goto auth_kerberos_tgt_failure; - + if (!krb4_init(authctxt)) + goto failure; + if (in_tkt(creds.pname, creds.pinst) != KSUCCESS) - goto auth_kerberos_tgt_failure; - + goto failure; + if (save_credentials(creds.service, creds.instance, creds.realm, - creds.session, creds.lifetime, creds.kvno, - &creds.ticket_st, creds.issue_date) != KSUCCESS) { - packet_send_debug("Kerberos V4 tgt refused: couldn't save credentials"); - goto auth_kerberos_tgt_failure; + creds.session, creds.lifetime, creds.kvno, &creds.ticket_st, + creds.issue_date) != KSUCCESS) { + debug("Kerberos v4 TGT refused: couldn't save credentials"); + goto failure; } /* Successful authentication, passed all checks. */ chown(tkt_string(), pw->pw_uid, pw->pw_gid); - - packet_send_debug("Kerberos V4 tgt accepted (%s.%s@%s, %s%s%s@%s)", - creds.service, creds.instance, creds.realm, creds.pname, - creds.pinst[0] ? "." : "", creds.pinst, creds.realm); + + debug("Kerberos v4 TGT accepted (%s%s%s@%s)", + creds.pname, creds.pinst[0] ? "." : "", creds.pinst, creds.realm); memset(&creds, 0, sizeof(creds)); - packet_start(SSH_SMSG_SUCCESS); - packet_send(); - packet_write_wait(); - return 1; - -auth_kerberos_tgt_failure: - krb4_cleanup_proc(NULL); + + restore_uid(); + + return (1); + + failure: + krb4_cleanup_proc(authctxt); memset(&creds, 0, sizeof(creds)); - packet_start(SSH_SMSG_FAILURE); - packet_send(); - packet_write_wait(); - return 0; + restore_uid(); + + return (0); } int -auth_afs_token(struct passwd *pw, const char *token_string) +auth_afs_token(Authctxt *authctxt, const char *token_string) { CREDENTIALS creds; + struct passwd *pw; uid_t uid; - - if (pw == NULL) { - /* XXX fake protocol error */ - packet_send_debug("Protocol error decoding AFS token"); - packet_start(SSH_SMSG_FAILURE); - packet_send(); - packet_write_wait(); - return 0; - } + + if ((pw = authctxt->pw) == NULL) + return (0); + if (!radix_to_creds(token_string, &creds)) { log("Protocol error decoding AFS token"); - packet_send_debug("Protocol error decoding AFS token"); - packet_start(SSH_SMSG_FAILURE); - packet_send(); - packet_write_wait(); - return 0; + return (0); } if (strncmp(creds.service, "", 1) == 0) /* backward compatibility */ strlcpy(creds.service, "afs", sizeof creds.service); - + if (strncmp(creds.pname, "AFS ID ", 7) == 0) uid = atoi(creds.pname + 7); else uid = pw->pw_uid; - + if (kafs_settoken(creds.realm, uid, &creds)) { - log("AFS token (%s@%s) rejected for %s", creds.pname, creds.realm, - pw->pw_name); - packet_send_debug("AFS token (%s@%s) rejected for %s", creds.pname, - creds.realm, pw->pw_name); + log("AFS token (%s@%s) rejected for %s", + creds.pname, creds.realm, pw->pw_name); memset(&creds, 0, sizeof(creds)); - packet_start(SSH_SMSG_FAILURE); - packet_send(); - packet_write_wait(); - return 0; + return (0); } - packet_send_debug("AFS token accepted (%s@%s, %s@%s)", creds.service, - creds.realm, creds.pname, creds.realm); + debug("AFS token accepted (%s@%s)", creds.pname, creds.realm); memset(&creds, 0, sizeof(creds)); - packet_start(SSH_SMSG_SUCCESS); - packet_send(); - packet_write_wait(); - return 1; + + return (1); } #endif /* AFS */ Only in openssh-2.9.9p1: auth-krb5.c diff -ru openssh-2.9p2/auth-options.c openssh-2.9.9p1/auth-options.c --- openssh-2.9p2/auth-options.c 2001-03-19 11:13:47.000000000 +1100 +++ openssh-2.9.9p1/auth-options.c 2001-09-13 04:03:31.000000000 +1000 @@ -10,7 +10,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth-options.c,v 1.16 2001/03/18 12:07:52 markus Exp $"); +RCSID("$OpenBSD: auth-options.c,v 1.20 2001/08/30 20:36:34 stevesk Exp $"); #include "packet.h" #include "xmalloc.h" @@ -20,6 +20,7 @@ #include "channels.h" #include "auth-options.h" #include "servconf.h" +#include "misc.h" /* Flags set authorized_keys flags */ int no_port_forwarding_flag = 0; @@ -167,7 +168,6 @@ } cp = "from=\""; if (strncasecmp(opts, cp, strlen(cp)) == 0) { - int mname, mip; const char *remote_ip = get_remote_ipaddr(); const char *remote_host = get_canonical_hostname( options.reverse_mapping_check); @@ -195,18 +195,9 @@ } patterns[i] = 0; opts++; - /* - * Deny access if we get a negative - * match for the hostname or the ip - * or if we get not match at all - */ - mname = match_hostname(remote_host, patterns, - strlen(patterns)); - mip = match_hostname(remote_ip, patterns, - strlen(patterns)); - xfree(patterns); - if (mname == -1 || mip == -1 || - (mname != 1 && mip != 1)) { + if (match_host_and_ip(remote_host, remote_ip, + patterns) != 1) { + xfree(patterns); log("Authentication tried for %.100s with " "correct key but not from a permitted " "host (host=%.200s, ip=%.200s).", @@ -217,13 +208,14 @@ /* deny access */ return 0; } + xfree(patterns); /* Host name matches. */ goto next_option; } cp = "permitopen=\""; if (strncasecmp(opts, cp, strlen(cp)) == 0) { + char host[256], sport[6]; u_short port; - char *c, *ep; char *patterns = xmalloc(strlen(opts) + 1); opts += strlen(cp); @@ -248,28 +240,25 @@ } patterns[i] = 0; opts++; - c = strchr(patterns, ':'); - if (c == NULL) { - debug("%.100s, line %lu: permitopen: missing colon <%.100s>", - file, linenum, patterns); - packet_send_debug("%.100s, line %lu: missing colon", - file, linenum); + if (sscanf(patterns, "%255[^:]:%5[0-9]", host, sport) != 2 && + sscanf(patterns, "%255[^/]/%5[0-9]", host, sport) != 2) { + debug("%.100s, line %lu: Bad permitopen specification " + "<%.100s>", file, linenum, patterns); + packet_send_debug("%.100s, line %lu: " + "Bad permitopen specification", file, linenum); xfree(patterns); goto bad_option; } - *c = 0; - c++; - port = strtol(c, &ep, 0); - if (c == ep) { - debug("%.100s, line %lu: permitopen: missing port <%.100s>", - file, linenum, patterns); - packet_send_debug("%.100s, line %lu: missing port", - file, linenum); + if ((port = a2port(sport)) == 0) { + debug("%.100s, line %lu: Bad permitopen port <%.100s>", + file, linenum, sport); + packet_send_debug("%.100s, line %lu: " + "Bad permitopen port", file, linenum); xfree(patterns); goto bad_option; } if (options.allow_tcp_forwarding) - channel_add_permitted_opens(patterns, port); + channel_add_permitted_opens(host, port); xfree(patterns); goto next_option; } diff -ru openssh-2.9p2/auth-options.h openssh-2.9.9p1/auth-options.h --- openssh-2.9p2/auth-options.h 2001-01-22 16:34:40.000000000 +1100 +++ openssh-2.9.9p1/auth-options.h 2001-07-04 14:46:57.000000000 +1000 @@ -11,7 +11,7 @@ * called by a name other than "ssh" or "Secure Shell". */ -/* $OpenBSD: auth-options.h,v 1.8 2001/01/21 19:05:42 markus Exp $ */ +/* $OpenBSD: auth-options.h,v 1.10 2001/06/26 17:27:22 markus Exp $ */ #ifndef AUTH_OPTIONS_H #define AUTH_OPTIONS_H @@ -30,15 +30,7 @@ extern char *forced_command; extern struct envstring *custom_environment; -/* - * return 1 if access is granted, 0 if not. - * side effect: sets key option flags - */ -int -auth_parse_options(struct passwd *pw, char *options, char *file, - u_long linenum); - -/* reset options flags */ +int auth_parse_options(struct passwd *, char *, char *, u_long); void auth_clear_options(void); #endif diff -ru openssh-2.9p2/auth-passwd.c openssh-2.9.9p1/auth-passwd.c --- openssh-2.9p2/auth-passwd.c 2001-04-25 22:50:19.000000000 +1000 +++ openssh-2.9.9p1/auth-passwd.c 2001-07-04 14:21:15.000000000 +1000 @@ -36,7 +36,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth-passwd.c,v 1.22 2001/03/20 18:57:04 markus Exp $"); +RCSID("$OpenBSD: auth-passwd.c,v 1.23 2001/06/26 16:15:23 dugsong Exp $"); #if !defined(USE_PAM) && !defined(HAVE_OSF_SIA) @@ -128,14 +128,14 @@ #endif if (*password == '\0' && options.permit_empty_passwd == 0) return 0; -#ifdef BSD_AUTH - if (auth_userokay(pw->pw_name, authctxt->style, "auth-ssh", - (char *)password) == 0) - return 0; - else - return 1; +#ifdef KRB5 + if (options.kerberos_authentication == 1) { + int ret = auth_krb5_password(authctxt, password); + if (ret == 1 || ret == 0) + return ret; + /* Fall back to ordinary passwd authentication. */ + } #endif - #ifdef HAVE_CYGWIN if (is_winnt) { HANDLE hToken = cygwin_logon_user(pw, password); @@ -146,21 +146,24 @@ return 1; } #endif - #ifdef WITH_AIXAUTHENTICATE return (authenticate(pw->pw_name,password,&reenter,&authmsg) == 0); #endif - #ifdef KRB4 if (options.kerberos_authentication == 1) { - int ret = auth_krb4_password(pw, password); + int ret = auth_krb4_password(authctxt, password); if (ret == 1 || ret == 0) return ret; /* Fall back to ordinary passwd authentication. */ } #endif - - +#ifdef BSD_AUTH + if (auth_userokay(pw->pw_name, authctxt->style, "auth-ssh", + (char *)password) == 0) + return 0; + else + return 1; +#endif pw_password = pw->pw_passwd; /* diff -ru openssh-2.9p2/auth-rh-rsa.c openssh-2.9.9p1/auth-rh-rsa.c --- openssh-2.9p2/auth-rh-rsa.c 2001-04-09 04:27:01.000000000 +1000 +++ openssh-2.9.9p1/auth-rh-rsa.c 2001-06-25 14:40:49.000000000 +1000 @@ -13,7 +13,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth-rh-rsa.c,v 1.23 2001/04/06 21:00:04 markus Exp $"); +RCSID("$OpenBSD: auth-rh-rsa.c,v 1.25 2001/06/23 03:04:42 markus Exp $"); #include "packet.h" #include "xmalloc.h" @@ -38,7 +38,7 @@ extern ServerOptions options; const char *canonical_hostname; HostStatus host_status; - Key *client_key, *found; + Key *client_key; debug("Trying rhosts with RSA host authentication for client user %.100s", client_user); @@ -58,37 +58,12 @@ client_key = key_new(KEY_RSA1); BN_copy(client_key->rsa->e, client_host_key->e); BN_copy(client_key->rsa->n, client_host_key->n); - found = key_new(KEY_RSA1); - /* Check if we know the host and its host key. */ - host_status = check_host_in_hostfile(_PATH_SSH_SYSTEM_HOSTFILE, canonical_hostname, - client_key, found, NULL); - - /* Check user host file unless ignored. */ - if (host_status != HOST_OK && !options.ignore_user_known_hosts) { - struct stat st; - char *user_hostfile = tilde_expand_filename(_PATH_SSH_USER_HOSTFILE, pw->pw_uid); - /* - * Check file permissions of _PATH_SSH_USER_HOSTFILE, auth_rsa() - * did already check pw->pw_dir, but there is a race XXX - */ - if (options.strict_modes && - (stat(user_hostfile, &st) == 0) && - ((st.st_uid != 0 && st.st_uid != pw->pw_uid) || - (st.st_mode & 022) != 0)) { - log("Rhosts RSA authentication refused for %.100s: bad owner or modes for %.200s", - pw->pw_name, user_hostfile); - } else { - /* XXX race between stat and the following open() */ - temporarily_use_uid(pw); - host_status = check_host_in_hostfile(user_hostfile, canonical_hostname, - client_key, found, NULL); - restore_uid(); - } - xfree(user_hostfile); - } + host_status = check_key_in_hostfiles(pw, client_key, canonical_hostname, + _PATH_SSH_SYSTEM_HOSTFILE, + options.ignore_user_known_hosts ? NULL : _PATH_SSH_USER_HOSTFILE); + key_free(client_key); - key_free(found); if (host_status != HOST_OK) { debug("Rhosts with RSA host authentication denied: unknown or invalid host key"); diff -ru openssh-2.9p2/auth-rhosts.c openssh-2.9.9p1/auth-rhosts.c --- openssh-2.9p2/auth-rhosts.c 2001-04-13 09:34:35.000000000 +1000 +++ openssh-2.9.9p1/auth-rhosts.c 2001-06-25 15:01:24.000000000 +1000 @@ -14,7 +14,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth-rhosts.c,v 1.23 2001/04/12 19:15:24 markus Exp $"); +RCSID("$OpenBSD: auth-rhosts.c,v 1.24 2001/06/23 15:12:17 itojun Exp $"); #include "packet.h" #include "xmalloc.h" @@ -34,7 +34,7 @@ * based on the file, and returns zero otherwise. */ -int +static int check_rhosts_file(const char *filename, const char *hostname, const char *ipaddr, const char *client_user, const char *server_user) diff -ru openssh-2.9p2/auth-rsa.c openssh-2.9.9p1/auth-rsa.c --- openssh-2.9p2/auth-rsa.c 2001-04-09 04:27:01.000000000 +1000 +++ openssh-2.9.9p1/auth-rsa.c 2001-08-07 07:01:49.000000000 +1000 @@ -14,7 +14,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth-rsa.c,v 1.40 2001/04/06 21:00:07 markus Exp $"); +RCSID("$OpenBSD: auth-rsa.c,v 1.44 2001/07/23 18:14:58 stevesk Exp $"); #include #include @@ -122,7 +122,7 @@ int auth_rsa(struct passwd *pw, BIGNUM *client_n) { - char line[8192], file[MAXPATHLEN]; + char line[8192], *file; int authenticated; u_int bits; FILE *f; @@ -138,13 +138,14 @@ temporarily_use_uid(pw); /* The authorized keys. */ - snprintf(file, sizeof file, "%.500s/%.100s", pw->pw_dir, - _PATH_SSH_USER_PERMITTED_KEYS); + file = authorized_keys_file(pw); + debug("trying public RSA key file %s", file); /* Fail quietly if file does not exist */ if (stat(file, &st) < 0) { /* Restore the privileged uid. */ restore_uid(); + xfree(file); return 0; } /* Open the file containing the authorized keys. */ @@ -154,43 +155,17 @@ restore_uid(); packet_send_debug("Could not open %.900s for reading.", file); packet_send_debug("If your home is on an NFS volume, it may need to be world-readable."); + xfree(file); return 0; } - if (options.strict_modes) { - int fail = 0; - char buf[1024]; - /* Check open file in order to avoid open/stat races */ - if (fstat(fileno(f), &st) < 0 || - (st.st_uid != 0 && st.st_uid != pw->pw_uid) || - (st.st_mode & 022) != 0) { - snprintf(buf, sizeof buf, "RSA authentication refused for %.100s: " - "bad ownership or modes for '%s'.", pw->pw_name, file); - fail = 1; - } else { - /* Check path to _PATH_SSH_USER_PERMITTED_KEYS */ - int i; - static const char *check[] = { - "", _PATH_SSH_USER_DIR, NULL - }; - for (i = 0; check[i]; i++) { - snprintf(line, sizeof line, "%.500s/%.100s", pw->pw_dir, check[i]); - if (stat(line, &st) < 0 || - (st.st_uid != 0 && st.st_uid != pw->pw_uid) || - (st.st_mode & 022) != 0) { - snprintf(buf, sizeof buf, "RSA authentication refused for %.100s: " - "bad ownership or modes for '%s'.", pw->pw_name, line); - fail = 1; - break; - } - } - } - if (fail) { - fclose(f); - log("%s", buf); - packet_send_debug("%s", buf); - restore_uid(); - return 0; - } + if (options.strict_modes && + secure_filename(f, file, pw, line, sizeof(line)) != 0) { + xfree(file); + fclose(f); + log("Authentication refused: %s", line); + packet_send_debug("Authentication refused: %s", line); + restore_uid(); + return 0; } /* Flag indicating whether authentication has succeeded. */ authenticated = 0; @@ -236,9 +211,7 @@ /* Parse the key from the line. */ if (!auth_rsa_read_key(&cp, &bits, pk->e, pk->n)) { - debug("%.100s, line %lu: bad key syntax", - file, linenum); - packet_send_debug("%.100s, line %lu: bad key syntax", + debug("%.100s, line %lu: non ssh1 key syntax", file, linenum); continue; } @@ -250,7 +223,7 @@ /* check the real bits */ if (bits != BN_num_bits(pk->n)) - log("Warning: %s, line %ld: keysize mismatch: " + log("Warning: %s, line %lu: keysize mismatch: " "actual %d vs. announced %d.", file, linenum, BN_num_bits(pk->n), bits); @@ -285,6 +258,7 @@ restore_uid(); /* Close the file. */ + xfree(file); fclose(f); RSA_free(pk); Only in openssh-2.9.9p1: auth-skey.c diff -ru openssh-2.9p2/auth.c openssh-2.9.9p1/auth.c --- openssh-2.9p2/auth.c 2001-03-20 09:15:57.000000000 +1100 +++ openssh-2.9.9p1/auth.c 2001-07-14 12:21:34.000000000 +1000 @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth.c,v 1.21 2001/03/19 17:07:23 markus Exp $"); +RCSID("$OpenBSD: auth.c,v 1.27 2001/07/11 18:26:15 markus Exp $"); #ifdef HAVE_LOGIN_H #include @@ -32,6 +32,10 @@ #include #endif /* defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) */ +#ifdef HAVE_LIBGEN_H +#include +#endif + #include "xmalloc.h" #include "match.h" #include "groupaccess.h" @@ -40,6 +44,10 @@ #include "auth.h" #include "auth-options.h" #include "canohost.h" +#include "buffer.h" +#include "bufaux.h" +#include "uidswap.h" +#include "tildexpand.h" /* import */ extern ServerOptions options; @@ -57,6 +65,7 @@ allowed_user(struct passwd * pw) { struct stat st; + const char *hostname = NULL, *ipaddr = NULL; char *shell; int i; #ifdef WITH_AIXAUTHENTICATE @@ -101,16 +110,23 @@ if (!((st.st_mode & S_IFREG) && (st.st_mode & (S_IXOTH|S_IXUSR|S_IXGRP)))) return 0; + if (options.num_deny_users > 0 || options.num_allow_users > 0) { + hostname = get_canonical_hostname(options.reverse_mapping_check); + ipaddr = get_remote_ipaddr(); + } + /* Return false if user is listed in DenyUsers */ if (options.num_deny_users > 0) { for (i = 0; i < options.num_deny_users; i++) - if (match_pattern(pw->pw_name, options.deny_users[i])) + if (match_user(pw->pw_name, hostname, ipaddr, + options.deny_users[i])) return 0; } /* Return false if AllowUsers isn't empty and user isn't listed there */ if (options.num_allow_users > 0) { for (i = 0; i < options.num_allow_users; i++) - if (match_pattern(pw->pw_name, options.allow_users[i])) + if (match_user(pw->pw_name, hostname, ipaddr, + options.allow_users[i])) break; /* i < options.num_allow_users iff we break for loop */ if (i >= options.num_allow_users) @@ -222,3 +238,179 @@ log("ROOT LOGIN REFUSED FROM %.200s", get_remote_ipaddr()); return 0; } + + +/* + * Given a template and a passwd structure, build a filename + * by substituting % tokenised options. Currently, %% becomes '%', + * %h becomes the home directory and %u the username. + * + * This returns a buffer allocated by xmalloc. + */ +char * +expand_filename(const char *filename, struct passwd *pw) +{ + Buffer buffer; + char *file; + const char *cp; + + /* + * Build the filename string in the buffer by making the appropriate + * substitutions to the given file name. + */ + buffer_init(&buffer); + for (cp = filename; *cp; cp++) { + if (cp[0] == '%' && cp[1] == '%') { + buffer_append(&buffer, "%", 1); + cp++; + continue; + } + if (cp[0] == '%' && cp[1] == 'h') { + buffer_append(&buffer, pw->pw_dir, strlen(pw->pw_dir)); + cp++; + continue; + } + if (cp[0] == '%' && cp[1] == 'u') { + buffer_append(&buffer, pw->pw_name, + strlen(pw->pw_name)); + cp++; + continue; + } + buffer_append(&buffer, cp, 1); + } + buffer_append(&buffer, "\0", 1); + + /* + * Ensure that filename starts anchored. If not, be backward + * compatible and prepend the '%h/' + */ + file = xmalloc(MAXPATHLEN); + cp = buffer_ptr(&buffer); + if (*cp != '/') + snprintf(file, MAXPATHLEN, "%s/%s", pw->pw_dir, cp); + else + strlcpy(file, cp, MAXPATHLEN); + + buffer_free(&buffer); + return file; +} + +char * +authorized_keys_file(struct passwd *pw) +{ + return expand_filename(options.authorized_keys_file, pw); +} + +char * +authorized_keys_file2(struct passwd *pw) +{ + return expand_filename(options.authorized_keys_file2, pw); +} + +/* return ok if key exists in sysfile or userfile */ +HostStatus +check_key_in_hostfiles(struct passwd *pw, Key *key, const char *host, + const char *sysfile, const char *userfile) +{ + Key *found; + char *user_hostfile; + struct stat st; + int host_status; + + /* Check if we know the host and its host key. */ + found = key_new(key->type); + host_status = check_host_in_hostfile(sysfile, host, key, found, NULL); + + if (host_status != HOST_OK && userfile != NULL) { + user_hostfile = tilde_expand_filename(userfile, pw->pw_uid); + if (options.strict_modes && + (stat(user_hostfile, &st) == 0) && + ((st.st_uid != 0 && st.st_uid != pw->pw_uid) || + (st.st_mode & 022) != 0)) { + log("Authentication refused for %.100s: " + "bad owner or modes for %.200s", + pw->pw_name, user_hostfile); + } else { + temporarily_use_uid(pw); + host_status = check_host_in_hostfile(user_hostfile, + host, key, found, NULL); + restore_uid(); + } + xfree(user_hostfile); + } + key_free(found); + + debug2("check_key_in_hostfiles: key %s for %s", host_status == HOST_OK ? + "ok" : "not found", host); + return host_status; +} + + +/* + * Check a given file for security. This is defined as all components + * of the path to the file must either be owned by either the owner of + * of the file or root and no directories must be group or world writable. + * + * XXX Should any specific check be done for sym links ? + * + * Takes an open file descriptor, the file name, a uid and and + * error buffer plus max size as arguments. + * + * Returns 0 on success and -1 on failure + */ +int +secure_filename(FILE *f, const char *file, struct passwd *pw, + char *err, size_t errlen) +{ + uid_t uid = pw->pw_uid; + char buf[MAXPATHLEN]; + char *cp; + struct stat st; + + if (realpath(file, buf) == NULL) { + snprintf(err, errlen, "realpath %s failed: %s", file, + strerror(errno)); + return -1; + } + + /* check the open file to avoid races */ + if (fstat(fileno(f), &st) < 0 || + (st.st_uid != 0 && st.st_uid != uid) || + (st.st_mode & 022) != 0) { + snprintf(err, errlen, "bad ownership or modes for file %s", + buf); + return -1; + } + + /* for each component of the canonical path, walking upwards */ + for (;;) { + if ((cp = dirname(buf)) == NULL) { + snprintf(err, errlen, "dirname() failed"); + return -1; + } + strlcpy(buf, cp, sizeof(buf)); + + debug3("secure_filename: checking '%s'", buf); + if (stat(buf, &st) < 0 || + (st.st_uid != 0 && st.st_uid != uid) || + (st.st_mode & 022) != 0) { + snprintf(err, errlen, + "bad ownership or modes for directory %s", buf); + return -1; + } + + /* If are passed the homedir then we can stop */ + if (strcmp(pw->pw_dir, buf) == 0) { + debug3("secure_filename: terminating check at '%s'", + buf); + break; + } + /* + * dirname should always complete with a "/" path, + * but we can be paranoid and check for "." too + */ + if ((strcmp("/", buf) == 0) || (strcmp(".", buf) == 0)) + break; + } + return 0; +} diff -ru openssh-2.9p2/auth.h openssh-2.9.9p1/auth.h --- openssh-2.9p2/auth.h 2001-04-13 09:34:35.000000000 +1000 +++ openssh-2.9.9p1/auth.h 2001-07-04 14:46:57.000000000 +1000 @@ -21,11 +21,13 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $OpenBSD: auth.h,v 1.15 2001/04/12 19:15:24 markus Exp $ + * $OpenBSD: auth.h,v 1.22 2001/06/26 17:27:22 markus Exp $ */ #ifndef AUTH_H #define AUTH_H +#include "key.h" +#include "hostfile.h" #include #ifdef HAVE_LOGIN_CAP @@ -34,89 +36,87 @@ #ifdef BSD_AUTH #include #endif +#ifdef KRB5 +#include +#endif typedef struct Authctxt Authctxt; +typedef struct KbdintDevice KbdintDevice; + struct Authctxt { - int success; - int postponed; - int valid; - int attempt; - int failures; - char *user; - char *service; - struct passwd *pw; - char *style; + int success; + int postponed; + int valid; + int attempt; + int failures; + char *user; + char *service; + struct passwd *pw; + char *style; + void *kbdintctxt; #ifdef BSD_AUTH - auth_session_t *as; + auth_session_t *as; +#endif +#ifdef KRB4 + char *krb4_ticket_file; +#endif +#ifdef KRB5 + krb5_context krb5_ctx; + krb5_auth_context krb5_auth_ctx; + krb5_ccache krb5_fwd_ccache; + krb5_principal krb5_user; + char *krb5_ticket_file; #endif }; /* - * Tries to authenticate the user using the .rhosts file. Returns true if - * authentication succeeds. If ignore_rhosts is non-zero, this will not - * consider .rhosts and .shosts (/etc/hosts.equiv will still be used). - */ -int auth_rhosts(struct passwd * pw, const char *client_user); - -/* extended interface similar to auth_rhosts() */ -int -auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname, - const char *ipaddr); + * Keyboard interactive device: + * init_ctx returns: non NULL upon success + * query returns: 0 - success, otherwise failure + * respond returns: 0 - success, 1 - need further interaction, + * otherwise - failure + */ +struct KbdintDevice +{ + const char *name; + void* (*init_ctx) __P((Authctxt*)); + int (*query) __P((void *ctx, char **name, char **infotxt, + u_int *numprompts, char ***prompts, + u_int **echo_on)); + int (*respond) __P((void *ctx, u_int numresp, char **responses)); + void (*free_ctx) __P((void *ctx)); +}; -/* - * Tries to authenticate the user using the .rhosts file and the host using - * its host key. Returns true if authentication succeeds. - */ +int auth_rhosts(struct passwd *, const char *); int -auth_rhosts_rsa(struct passwd * pw, const char *client_user, RSA* client_host_key); - -/* - * Tries to authenticate the user using password. Returns true if - * authentication succeeds. - */ -int auth_password(Authctxt *authctxt, const char *password); - -/* - * Performs the RSA authentication dialog with the client. This returns 0 if - * the client could not be authenticated, and 1 if authentication was - * successful. This may exit if there is a serious protocol violation. - */ -int auth_rsa(struct passwd * pw, BIGNUM * client_n); - -/* - * Parses an RSA key (number of bits, e, n) from a string. Moves the pointer - * over the key. Skips any whitespace at the beginning and at end. - */ -int auth_rsa_read_key(char **cpp, u_int *bitsp, BIGNUM * e, BIGNUM * n); +auth_rhosts2(struct passwd *, const char *, const char *, const char *); -/* - * Performs the RSA authentication challenge-response dialog with the client, - * and returns true (non-zero) if the client gave the correct answer to our - * challenge; returns zero if the client gives a wrong answer. - */ -int auth_rsa_challenge_dialog(RSA *pk); +int auth_rhosts_rsa(struct passwd *, const char *, RSA *); +int auth_password(Authctxt *, const char *); +int auth_rsa(struct passwd *, BIGNUM *); +int auth_rsa_read_key(char **, u_int *, BIGNUM *, BIGNUM *); +int auth_rsa_challenge_dialog(RSA *); #ifdef KRB4 #include -/* - * Performs Kerberos v4 mutual authentication with the client. This returns 0 - * if the client could not be authenticated, and 1 if authentication was - * successful. This may exit if there is a serious protocol violation. - */ -int auth_krb4(const char *server_user, KTEXT auth, char **client); -int krb4_init(uid_t uid); -void krb4_cleanup_proc(void *ignore); -int auth_krb4_password(struct passwd * pw, const char *password); +int auth_krb4(Authctxt *, KTEXT, char **); +int auth_krb4_password(Authctxt *, const char *); +void krb4_cleanup_proc(void *); #ifdef AFS #include - -/* Accept passed Kerberos v4 ticket-granting ticket and AFS tokens. */ -int auth_kerberos_tgt(struct passwd * pw, const char *string); -int auth_afs_token(struct passwd * pw, const char *token_string); -#endif /* AFS */ - -#endif /* KRB4 */ +int auth_krb4_tgt(Authctxt *, const char *); +int auth_afs_token(Authctxt *, const char *); +#endif /* AFS */ + +#endif /* KRB4 */ + +#ifdef KRB5 +int auth_krb5(Authctxt *authctxt, krb5_data *auth, char **client); +int auth_krb5_tgt(Authctxt *authctxt, krb5_data *tgt); +int auth_krb5_password(Authctxt *authctxt, const char *password); +void krb5_cleanup_proc(void *authctxt); +#endif /* KRB5 */ #include "auth-pam.h" #include "auth2-pam.h" @@ -125,19 +125,30 @@ void do_authentication2(void); Authctxt *authctxt_new(void); -void auth_log(Authctxt *authctxt, int authenticated, char *method, char *info); -void userauth_finish(Authctxt *authctxt, int authenticated, char *method); -int auth_root_allowed(char *method); +void auth_log(Authctxt *, int, char *, char *); +void userauth_finish(Authctxt *, int, char *); +int auth_root_allowed(char *); -int auth2_challenge(Authctxt *authctxt, char *devs); +int auth2_challenge(Authctxt *, char *); -int allowed_user(struct passwd * pw); +int allowed_user(struct passwd *); -char *get_challenge(Authctxt *authctxt, char *devs); -int verify_response(Authctxt *authctxt, char *response); +char *get_challenge(Authctxt *); +int verify_response(Authctxt *, const char *); struct passwd * auth_get_user(void); +char *expand_filename(const char *, struct passwd *); +char *authorized_keys_file(struct passwd *); +char *authorized_keys_file2(struct passwd *); + +int +secure_filename(FILE *, const char *, struct passwd *, char *, size_t); + +HostStatus +check_key_in_hostfiles(struct passwd *, Key *, const char *, + const char *, const char *); + #define AUTH_FAIL_MAX 6 #define AUTH_FAIL_LOG (AUTH_FAIL_MAX/2) #define AUTH_FAIL_MSG "Too many authentication failures for %.100s" diff -ru openssh-2.9p2/auth1.c openssh-2.9.9p1/auth1.c --- openssh-2.9p2/auth1.c 2001-03-24 11:37:59.000000000 +1100 +++ openssh-2.9.9p1/auth1.c 2001-07-04 14:21:16.000000000 +1000 @@ -10,7 +10,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth1.c,v 1.22 2001/03/23 12:02:49 markus Exp $"); +RCSID("$OpenBSD: auth1.c,v 1.25 2001/06/26 16:15:23 dugsong Exp $"); #include "xmalloc.h" #include "rsa.h" @@ -24,6 +24,7 @@ #include "auth.h" #include "session.h" #include "misc.h" +#include "uidswap.h" /* import */ extern ServerOptions options; @@ -35,7 +36,7 @@ /* * convert ssh auth msg type into description */ -char * +static char * get_authname(int type) { static char buf[1024]; @@ -51,7 +52,7 @@ case SSH_CMSG_AUTH_TIS: case SSH_CMSG_AUTH_TIS_RESPONSE: return "challenge-response"; -#ifdef KRB4 +#if defined(KRB4) || defined(KRB5) case SSH_CMSG_AUTH_KERBEROS: return "kerberos"; #endif @@ -64,7 +65,7 @@ * read packets, try to authenticate the user and * return only if authentication is successful */ -void +static void do_authloop(Authctxt *authctxt) { int authenticated = 0; @@ -84,7 +85,7 @@ /* If the user has no password, accept authentication immediately. */ if (options.password_authentication && -#ifdef KRB4 +#if defined(KRB4) || defined(KRB5) (!options.kerberos_authentication || options.kerberos_or_local_passwd) && #endif #ifdef USE_PAM @@ -116,62 +117,64 @@ /* Process the packet. */ switch (type) { -#ifdef AFS - case SSH_CMSG_HAVE_KERBEROS_TGT: - if (!options.kerberos_tgt_passing) { - verbose("Kerberos tgt passing disabled."); - break; - } else { - /* Accept Kerberos tgt. */ - char *tgt = packet_get_string(&dlen); - packet_integrity_check(plen, 4 + dlen, type); - if (!auth_kerberos_tgt(pw, tgt)) - verbose("Kerberos tgt REFUSED for %.100s", authctxt->user); - xfree(tgt); - } - continue; - case SSH_CMSG_HAVE_AFS_TOKEN: - if (!options.afs_token_passing || !k_hasafs()) { - verbose("AFS token passing disabled."); - break; - } else { - /* Accept AFS token. */ - char *token_string = packet_get_string(&dlen); - packet_integrity_check(plen, 4 + dlen, type); - if (!auth_afs_token(pw, token_string)) - verbose("AFS token REFUSED for %.100s", authctxt->user); - xfree(token_string); - } - continue; -#endif /* AFS */ -#ifdef KRB4 +#if defined(KRB4) || defined(KRB5) case SSH_CMSG_AUTH_KERBEROS: if (!options.kerberos_authentication) { verbose("Kerberos authentication disabled."); - break; } else { - /* Try Kerberos v4 authentication. */ - KTEXT_ST auth; - char *tkt_user = NULL; - char *kdata = packet_get_string((u_int *) &auth.length); - packet_integrity_check(plen, 4 + auth.length, type); - - if (authctxt->valid) { - if (auth.length < MAX_KTXT_LEN) - memcpy(auth.dat, kdata, auth.length); - authenticated = auth_krb4(pw->pw_name, &auth, &tkt_user); - if (authenticated) { - snprintf(info, sizeof info, - " tktuser %.100s", tkt_user); - xfree(tkt_user); + char *kdata = packet_get_string(&dlen); + + packet_integrity_check(plen, 4 + dlen, type); + + if (kdata[0] == 4) { /* KRB_PROT_VERSION */ +#ifdef KRB4 + KTEXT_ST tkt; + + tkt.length = dlen; + if (tkt.length < MAX_KTXT_LEN) + memcpy(tkt.dat, kdata, tkt.length); + + if (auth_krb4(authctxt, &tkt, &client_user)) { + authenticated = 1; + snprintf(info, sizeof(info), + " tktuser %.100s", + client_user); + xfree(client_user); } +#endif /* KRB4 */ + } else { +#ifdef KRB5 + krb5_data tkt; + tkt.length = dlen; + tkt.data = kdata; + + if (auth_krb5(authctxt, &tkt, &client_user)) { + authenticated = 1; + snprintf(info, sizeof(info), + " tktuser %.100s", + client_user); + xfree(client_user); + } +#endif /* KRB5 */ } xfree(kdata); } break; -#endif /* KRB4 */ - +#endif /* KRB4 || KRB5 */ + +#if defined(AFS) || defined(KRB5) + /* XXX - punt on backward compatibility here. */ + case SSH_CMSG_HAVE_KERBEROS_TGT: + packet_send_debug("Kerberos TGT passing disabled before authentication."); + break; +#ifdef AFS + case SSH_CMSG_HAVE_AFS_TOKEN: + packet_send_debug("AFS token passing disabled before authentication."); + break; +#endif /* AFS */ +#endif /* AFS || KRB5 */ + case SSH_CMSG_AUTH_RHOSTS: if (!options.rhosts_authentication) { verbose("Rhosts authentication disabled."); @@ -271,12 +274,13 @@ case SSH_CMSG_AUTH_TIS: debug("rcvd SSH_CMSG_AUTH_TIS"); - if (options.challenge_reponse_authentication == 1) { - char *challenge = get_challenge(authctxt, authctxt->style); + if (options.challenge_response_authentication == 1) { + char *challenge = get_challenge(authctxt); if (challenge != NULL) { debug("sending challenge '%s'", challenge); packet_start(SSH_SMSG_AUTH_TIS_CHALLENGE); packet_put_cstring(challenge); + xfree(challenge); packet_send(); packet_write_wait(); continue; @@ -285,7 +289,7 @@ break; case SSH_CMSG_AUTH_TIS_RESPONSE: debug("rcvd SSH_CMSG_AUTH_TIS_RESPONSE"); - if (options.challenge_reponse_authentication == 1) { + if (options.challenge_response_authentication == 1) { char *response = packet_get_string(&dlen); debug("got response '%s'", response); packet_integrity_check(plen, 4 + dlen, type); @@ -368,7 +372,7 @@ struct passwd *pw; int plen; u_int ulen; - char *user, *style = NULL; + char *p, *user, *style = NULL; /* Get the name of the user that we wish to log in as. */ packet_read_expect(&plen, SSH_CMSG_USER); @@ -378,8 +382,12 @@ packet_integrity_check(plen, (4 + ulen), SSH_CMSG_USER); if ((style = strchr(user, ':')) != NULL) - *style++ = 0; + *style++ = '\0'; + /* XXX - SSH.com Kerberos v5 braindeath. */ + if ((p = strchr(user, '@')) != NULL) + *p = '\0'; + authctxt = authctxt_new(); authctxt->user = user; authctxt->style = style; diff -ru openssh-2.9p2/auth2-chall.c openssh-2.9.9p1/auth2-chall.c --- openssh-2.9p2/auth2-chall.c 2001-03-30 10:48:31.000000000 +1000 +++ openssh-2.9.9p1/auth2-chall.c 2001-06-25 15:01:24.000000000 +1000 @@ -1,5 +1,6 @@ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. + * Copyright (c) 2001 Per Allansson. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -22,91 +23,285 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: auth2-chall.c,v 1.4 2001/03/28 22:43:31 markus Exp $"); +RCSID("$OpenBSD: auth2-chall.c,v 1.7 2001/06/23 15:12:17 itojun Exp $"); #include "ssh2.h" #include "auth.h" #include "packet.h" #include "xmalloc.h" #include "dispatch.h" +#include "auth.h" #include "log.h" -void send_userauth_into_request(Authctxt *authctxt, char *challenge, int echo); -void input_userauth_info_response(int type, int plen, void *ctxt); +static int auth2_challenge_start(Authctxt *); +static int send_userauth_info_request(Authctxt *); +static void input_userauth_info_response(int, int, void *); + +#ifdef BSD_AUTH +extern KbdintDevice bsdauth_device; +#else +#ifdef SKEY +extern KbdintDevice skey_device; +#endif +#endif + +KbdintDevice *devices[] = { +#ifdef BSD_AUTH + &bsdauth_device, +#else +#ifdef SKEY + &skey_device, +#endif +#endif + NULL +}; + +typedef struct KbdintAuthctxt KbdintAuthctxt; +struct KbdintAuthctxt +{ + char *devices; + void *ctxt; + KbdintDevice *device; +}; + +static KbdintAuthctxt * +kbdint_alloc(const char *devs) +{ + KbdintAuthctxt *kbdintctxt; + int i; + char buf[1024]; + + kbdintctxt = xmalloc(sizeof(KbdintAuthctxt)); + if (strcmp(devs, "") == 0) { + buf[0] = '\0'; + for (i = 0; devices[i]; i++) { + if (i != 0) + strlcat(buf, ",", sizeof(buf)); + strlcat(buf, devices[i]->name, sizeof(buf)); + } + debug("kbdint_alloc: devices '%s'", buf); + kbdintctxt->devices = xstrdup(buf); + } else { + kbdintctxt->devices = xstrdup(devs); + } + kbdintctxt->ctxt = NULL; + kbdintctxt->device = NULL; + + return kbdintctxt; +} +static void +kbdint_reset_device(KbdintAuthctxt *kbdintctxt) +{ + if (kbdintctxt->ctxt) { + kbdintctxt->device->free_ctx(kbdintctxt->ctxt); + kbdintctxt->ctxt = NULL; + } + kbdintctxt->device = NULL; +} +static void +kbdint_free(KbdintAuthctxt *kbdintctxt) +{ + if (kbdintctxt->device) + kbdint_reset_device(kbdintctxt); + if (kbdintctxt->devices) { + xfree(kbdintctxt->devices); + kbdintctxt->devices = NULL; + } + xfree(kbdintctxt); +} +/* get next device */ +static int +kbdint_next_device(KbdintAuthctxt *kbdintctxt) +{ + size_t len; + char *t; + int i; + + if (kbdintctxt->device) + kbdint_reset_device(kbdintctxt); + do { + len = kbdintctxt->devices ? + strcspn(kbdintctxt->devices, ",") : 0; + + if (len == 0) + break; + for (i = 0; devices[i]; i++) + if (strncmp(kbdintctxt->devices, devices[i]->name, len) == 0) + kbdintctxt->device = devices[i]; + t = kbdintctxt->devices; + kbdintctxt->devices = t[len] ? xstrdup(t+len+1) : NULL; + xfree(t); + debug2("kbdint_next_device: devices %s", kbdintctxt->devices ? + kbdintctxt->devices : ""); + } while (kbdintctxt->devices && !kbdintctxt->device); + + return kbdintctxt->device ? 1 : 0; +} /* - * try challenge-reponse, return -1 (= postponed) if we have to + * try challenge-reponse, set authctxt->postponed if we have to * wait for the response. */ int auth2_challenge(Authctxt *authctxt, char *devs) { - char *challenge; + debug("auth2_challenge: user=%s devs=%s", + authctxt->user ? authctxt->user : "", + devs ? devs : ""); - if (!authctxt->valid || authctxt->user == NULL) + if (authctxt->user == NULL || !devs) return 0; - if ((challenge = get_challenge(authctxt, devs)) == NULL) + if (authctxt->kbdintctxt == NULL) + authctxt->kbdintctxt = kbdint_alloc(devs); + return auth2_challenge_start(authctxt); +} + +/* side effect: sets authctxt->postponed if a reply was sent*/ +static int +auth2_challenge_start(Authctxt *authctxt) +{ + KbdintAuthctxt *kbdintctxt = authctxt->kbdintctxt; + + debug2("auth2_challenge_start: devices %s", + kbdintctxt->devices ? kbdintctxt->devices : ""); + + if (kbdint_next_device(kbdintctxt) == 0) { + kbdint_free(kbdintctxt); + authctxt->kbdintctxt = NULL; + return 0; + } + debug("auth2_challenge_start: trying authentication method '%s'", + kbdintctxt->device->name); + + if ((kbdintctxt->ctxt = kbdintctxt->device->init_ctx(authctxt)) == NULL) { + kbdint_free(kbdintctxt); + authctxt->kbdintctxt = NULL; + return 0; + } + if (send_userauth_info_request(authctxt) == 0) { + kbdint_free(kbdintctxt); + authctxt->kbdintctxt = NULL; return 0; - send_userauth_into_request(authctxt, challenge, 0); + } dispatch_set(SSH2_MSG_USERAUTH_INFO_RESPONSE, &input_userauth_info_response); + authctxt->postponed = 1; return 0; } -void -send_userauth_into_request(Authctxt *authctxt, char *challenge, int echo) +static int +send_userauth_info_request(Authctxt *authctxt) { - int nprompts = 1; + KbdintAuthctxt *kbdintctxt; + char *name, *instr, **prompts; + int i; + u_int numprompts, *echo_on; + + kbdintctxt = authctxt->kbdintctxt; + if (kbdintctxt->device->query(kbdintctxt->ctxt, + &name, &instr, &numprompts, &prompts, &echo_on)) + return 0; packet_start(SSH2_MSG_USERAUTH_INFO_REQUEST); - /* name, instruction and language are unused */ - packet_put_cstring(""); - packet_put_cstring(""); - packet_put_cstring(""); - packet_put_int(nprompts); - packet_put_cstring(challenge); - packet_put_char(echo); + packet_put_cstring(name); + packet_put_cstring(instr); + packet_put_cstring(""); /* language not used */ + packet_put_int(numprompts); + for (i = 0; i < numprompts; i++) { + packet_put_cstring(prompts[i]); + packet_put_char(echo_on[i]); + } packet_send(); packet_write_wait(); + + for (i = 0; i < numprompts; i++) + xfree(prompts[i]); + xfree(prompts); + xfree(echo_on); + xfree(name); + xfree(instr); + return 1; } -void +static void input_userauth_info_response(int type, int plen, void *ctxt) { Authctxt *authctxt = ctxt; - int authenticated = 0; - u_int nresp, rlen; - char *response, *method = "challenge-reponse"; + KbdintAuthctxt *kbdintctxt; + int i, authenticated = 0, res, len; + u_int nresp; + char **response = NULL, *method; if (authctxt == NULL) fatal("input_userauth_info_response: no authctxt"); + kbdintctxt = authctxt->kbdintctxt; + if (kbdintctxt == NULL || kbdintctxt->ctxt == NULL) + fatal("input_userauth_info_response: no kbdintctxt"); + if (kbdintctxt->device == NULL) + fatal("input_userauth_info_response: no device"); authctxt->postponed = 0; /* reset */ nresp = packet_get_int(); - if (nresp == 1) { - response = packet_get_string(&rlen); - packet_done(); - if (strlen(response) == 0) { - /* - * if we received an empty response, resend challenge - * with echo enabled - */ - char *challenge = get_challenge(authctxt, NULL); - if (challenge != NULL) { - send_userauth_into_request(authctxt, - challenge, 1); - authctxt->postponed = 1; - } - } else if (authctxt->valid) { - authenticated = verify_response(authctxt, response); - memset(response, 'r', rlen); - } + if (nresp > 0) { + response = xmalloc(nresp * sizeof(char*)); + for (i = 0; i < nresp; i++) + response[i] = packet_get_string(NULL); + } + packet_done(); + + if (authctxt->valid) { + res = kbdintctxt->device->respond(kbdintctxt->ctxt, + nresp, response); + } else { + res = -1; + } + + for (i = 0; i < nresp; i++) { + memset(response[i], 'r', strlen(response[i])); + xfree(response[i]); + } + if (response) xfree(response); + + switch (res) { + case 0: + /* Success! */ + authenticated = 1; + break; + case 1: + /* Authentication needs further interaction */ + authctxt->postponed = 1; + if (send_userauth_info_request(authctxt) == 0) { + authctxt->postponed = 0; + } + break; + default: + /* Failure! */ + break; } - /* unregister callback */ - if (!authctxt->postponed) + + len = strlen("keyboard-interactive") + 2 + + strlen(kbdintctxt->device->name); + method = xmalloc(len); + method[0] = '\0'; + strlcat(method, "keyboard-interactive", len); + strlcat(method, "/", len); + strlcat(method, kbdintctxt->device->name, len); + + if (!authctxt->postponed) { + /* unregister callback */ dispatch_set(SSH2_MSG_USERAUTH_INFO_RESPONSE, NULL); + if (authenticated) { + kbdint_free(kbdintctxt); + authctxt->kbdintctxt = NULL; + } else { + /* start next device */ + /* may set authctxt->postponed */ + auth2_challenge_start(authctxt); + } + } userauth_finish(authctxt, authenticated, method); + xfree(method); } diff -ru openssh-2.9p2/auth2-pam.c openssh-2.9.9p1/auth2-pam.c --- openssh-2.9p2/auth2-pam.c 2001-02-16 13:03:04.000000000 +1100 +++ openssh-2.9.9p1/auth2-pam.c 2001-06-27 15:36:44.000000000 +1000 @@ -1,5 +1,5 @@ #include "includes.h" -RCSID("$Id: auth2-pam.c,v 1.10 2001/02/16 02:03:04 djm Exp $"); +RCSID("$Id: auth2-pam.c,v 1.11 2001/06/27 05:36:44 djm Exp $"); #ifdef USE_PAM #include @@ -137,9 +137,6 @@ if (authctxt == NULL) fatal("input_userauth_info_response_pam: no authentication context"); - if (authctxt->attempt++ >= AUTH_FAIL_MAX) - packet_disconnect("too many failed userauth_requests"); - nresp = packet_get_int(); /* Number of responses. */ debug("got %d responses", nresp); diff -ru openssh-2.9p2/auth2.c openssh-2.9.9p1/auth2.c --- openssh-2.9p2/auth2.c 2001-04-25 22:44:15.000000000 +1000 +++ openssh-2.9.9p1/auth2.c 2001-09-21 09:11:26.000000000 +1000 @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth2.c,v 1.56 2001/04/19 00:05:11 markus Exp $"); +RCSID("$OpenBSD: auth2.c,v 1.70 2001/09/20 13:46:48 markus Exp $"); #include @@ -51,6 +51,7 @@ #include "hostfile.h" #include "canohost.h" #include "tildexpand.h" +#include "match.h" /* import */ extern ServerOptions options; @@ -73,26 +74,23 @@ /* protocol */ -void input_service_request(int type, int plen, void *ctxt); -void input_userauth_request(int type, int plen, void *ctxt); -void protocol_error(int type, int plen, void *ctxt); +static void input_service_request(int, int, void *); +static void input_userauth_request(int, int, void *); +static void protocol_error(int, int, void *); /* helper */ -Authmethod *authmethod_lookup(const char *name); -char *authmethods_get(void); -int user_key_allowed(struct passwd *pw, Key *key); -int -hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost, - Key *key); +static Authmethod *authmethod_lookup(const char *); +static char *authmethods_get(void); +static int user_key_allowed(struct passwd *, Key *); +static int hostbased_key_allowed(struct passwd *, const char *, char *, Key *); /* auth */ -void userauth_banner(void); -void userauth_reply(Authctxt *authctxt, int authenticated); -int userauth_none(Authctxt *authctxt); -int userauth_passwd(Authctxt *authctxt); -int userauth_pubkey(Authctxt *authctxt); -int userauth_hostbased(Authctxt *authctxt); -int userauth_kbdint(Authctxt *authctxt); +static void userauth_banner(void); +static int userauth_none(Authctxt *); +static int userauth_passwd(Authctxt *); +static int userauth_pubkey(Authctxt *); +static int userauth_hostbased(Authctxt *); +static int userauth_kbdint(Authctxt *); Authmethod authmethods[] = { {"none", @@ -125,7 +123,7 @@ x_authctxt = authctxt; /*XXX*/ /* challenge-reponse is implemented via keyboard interactive */ - if (options.challenge_reponse_authentication) + if (options.challenge_response_authentication) options.kbd_interactive_authentication = 1; if (options.pam_authentication_via_kbd_int) options.kbd_interactive_authentication = 1; @@ -136,7 +134,7 @@ do_authenticated(authctxt); } -void +static void protocol_error(int type, int plen, void *ctxt) { log("auth: protocol error: type %d plen %d", type, plen); @@ -146,7 +144,7 @@ packet_write_wait(); } -void +static void input_service_request(int type, int plen, void *ctxt) { Authctxt *authctxt = ctxt; @@ -179,7 +177,7 @@ xfree(service); } -void +static void input_userauth_request(int type, int plen, void *ctxt) { Authctxt *authctxt = ctxt; @@ -219,14 +217,12 @@ setproctitle("%s", pw ? user : "unknown"); authctxt->user = xstrdup(user); authctxt->service = xstrdup(service); - authctxt->style = style ? xstrdup(style) : NULL; /* currently unused */ - } else if (authctxt->valid) { - if (strcmp(user, authctxt->user) != 0 || - strcmp(service, authctxt->service) != 0) { - log("input_userauth_request: mismatch: (%s,%s)!=(%s,%s)", - user, service, authctxt->user, authctxt->service); - authctxt->valid = 0; - } + authctxt->style = style ? xstrdup(style) : NULL; + } else if (strcmp(user, authctxt->user) != 0 || + strcmp(service, authctxt->service) != 0) { + packet_disconnect("Change of username or service not allowed: " + "(%s,%s) -> (%s,%s)", + authctxt->user, authctxt->service, user, service); } /* reset state */ dispatch_set(SSH2_MSG_USERAUTH_INFO_RESPONSE, &protocol_error); @@ -254,6 +250,8 @@ void userauth_finish(Authctxt *authctxt, int authenticated, char *method) { + char *methods; + if (!authctxt->valid && authenticated) fatal("INTERNAL ERROR: authenticated invalid user %s", authctxt->user); @@ -272,11 +270,32 @@ /* Log before sending the reply */ auth_log(authctxt, authenticated, method, " ssh2"); - if (!authctxt->postponed) - userauth_reply(authctxt, authenticated); + if (authctxt->postponed) + return; + + /* XXX todo: check if multiple auth methods are needed */ + if (authenticated == 1) { + /* turn off userauth */ + dispatch_set(SSH2_MSG_USERAUTH_REQUEST, &protocol_error); + packet_start(SSH2_MSG_USERAUTH_SUCCESS); + packet_send(); + packet_write_wait(); + /* now we can break out */ + authctxt->success = 1; + } else { + if (authctxt->failures++ > AUTH_FAIL_MAX) + packet_disconnect(AUTH_FAIL_MSG, authctxt->user); + methods = authmethods_get(); + packet_start(SSH2_MSG_USERAUTH_FAILURE); + packet_put_cstring(methods); + packet_put_char(0); /* XXX partial success, unused */ + packet_send(); + packet_write_wait(); + xfree(methods); + } } -void +static void userauth_banner(void) { struct stat st; @@ -307,41 +326,7 @@ return; } -void -userauth_reply(Authctxt *authctxt, int authenticated) -{ - char *methods; - - /* XXX todo: check if multiple auth methods are needed */ - if (authenticated == 1) { -#ifdef WITH_AIXAUTHENTICATE - /* We don't have a pty yet, so just label the line as "ssh" */ - if (loginsuccess(authctxt->user?authctxt->user:"NOUSER", - get_canonical_hostname(options.reverse_mapping_check), - "ssh", &aixloginmsg) < 0) - aixloginmsg = NULL; -#endif /* WITH_AIXAUTHENTICATE */ - /* turn off userauth */ - dispatch_set(SSH2_MSG_USERAUTH_REQUEST, &protocol_error); - packet_start(SSH2_MSG_USERAUTH_SUCCESS); - packet_send(); - packet_write_wait(); - /* now we can break out */ - authctxt->success = 1; - } else { - if (authctxt->failures++ > AUTH_FAIL_MAX) - packet_disconnect(AUTH_FAIL_MSG, authctxt->user); - methods = authmethods_get(); - packet_start(SSH2_MSG_USERAUTH_FAILURE); - packet_put_cstring(methods); - packet_put_char(0); /* XXX partial success, unused */ - packet_send(); - packet_write_wait(); - xfree(methods); - } -} - -int +static int userauth_none(Authctxt *authctxt) { /* disable method "none", only allowed one time */ @@ -367,7 +352,7 @@ #endif /* USE_PAM */ } -int +static int userauth_passwd(Authctxt *authctxt) { char *password; @@ -396,28 +381,27 @@ return authenticated; } -int +static int userauth_kbdint(Authctxt *authctxt) { int authenticated = 0; - char *lang = NULL; - char *devs = NULL; + char *lang, *devs; lang = packet_get_string(NULL); devs = packet_get_string(NULL); packet_done(); - debug("keyboard-interactive language %s devs %s", lang, devs); + debug("keyboard-interactive devs %s", devs); - if (options.challenge_reponse_authentication) + if (options.challenge_response_authentication) authenticated = auth2_challenge(authctxt, devs); #ifdef USE_PAM if (authenticated == 0 && options.pam_authentication_via_kbd_int) authenticated = auth2_pam(authctxt); #endif - xfree(lang); xfree(devs); + xfree(lang); #ifdef HAVE_CYGWIN if (check_nt_auth(0, authctxt->pw->pw_uid) == 0) return(0); @@ -425,7 +409,7 @@ return authenticated; } -int +static int userauth_pubkey(Authctxt *authctxt) { Buffer b; @@ -531,7 +515,7 @@ return authenticated; } -int +static int userauth_hostbased(Authctxt *authctxt) { Buffer b; @@ -616,7 +600,7 @@ #define DELIM "," -char * +static char * authmethods_get(void) { Authmethod *method = NULL; @@ -648,7 +632,7 @@ return list; } -Authmethod * +static Authmethod * authmethod_lookup(const char *name) { Authmethod *method = NULL; @@ -663,10 +647,10 @@ } /* return 1 if user allows given key */ -int -user_key_allowed(struct passwd *pw, Key *key) +static int +user_key_allowed2(struct passwd *pw, Key *key, char *file) { - char line[8192], file[MAXPATHLEN]; + char line[8192]; int found_key = 0; FILE *f; u_long linenum = 0; @@ -679,9 +663,7 @@ /* Temporarily use the user's uid. */ temporarily_use_uid(pw); - /* The authorized keys. */ - snprintf(file, sizeof file, "%.500s/%.100s", pw->pw_dir, - _PATH_SSH_USER_PERMITTED_KEYS2); + debug("trying public key file %s", file); /* Fail quietly if file does not exist */ if (stat(file, &st) < 0) { @@ -696,46 +678,14 @@ restore_uid(); return 0; } - if (options.strict_modes) { - int fail = 0; - char buf[1024]; - /* Check open file in order to avoid open/stat races */ - if (fstat(fileno(f), &st) < 0 || - (st.st_uid != 0 && st.st_uid != pw->pw_uid) || - (st.st_mode & 022) != 0) { - snprintf(buf, sizeof buf, - "%s authentication refused for %.100s: " - "bad ownership or modes for '%s'.", - key_type(key), pw->pw_name, file); - fail = 1; - } else { - /* Check path to _PATH_SSH_USER_PERMITTED_KEYS */ - int i; - static const char *check[] = { - "", _PATH_SSH_USER_DIR, NULL - }; - for (i = 0; check[i]; i++) { - snprintf(line, sizeof line, "%.500s/%.100s", - pw->pw_dir, check[i]); - if (stat(line, &st) < 0 || - (st.st_uid != 0 && st.st_uid != pw->pw_uid) || - (st.st_mode & 022) != 0) { - snprintf(buf, sizeof buf, - "%s authentication refused for %.100s: " - "bad ownership or modes for '%s'.", - key_type(key), pw->pw_name, line); - fail = 1; - break; - } - } - } - if (fail) { - fclose(f); - log("%s", buf); - restore_uid(); - return 0; - } + if (options.strict_modes && + secure_filename(f, file, pw, line, sizeof(line)) != 0) { + fclose(f); + log("Authentication refused: %s", line); + restore_uid(); + return 0; } + found_key = 0; found = key_new(key->type); @@ -748,7 +698,7 @@ if (!*cp || *cp == '\n' || *cp == '#') continue; - if (key_read(found, &cp) == -1) { + if (key_read(found, &cp) != 1) { /* no key? check if there are options for this key */ int quoted = 0; debug2("user_key_allowed: check options: '%s'", cp); @@ -762,7 +712,7 @@ /* Skip remaining whitespace. */ for (; *cp == ' ' || *cp == '\t'; cp++) ; - if (key_read(found, &cp) == -1) { + if (key_read(found, &cp) != 1) { debug2("user_key_allowed: advance: '%s'", cp); /* still no key? advance to next line*/ continue; @@ -771,7 +721,7 @@ if (key_equal(found, key) && auth_parse_options(pw, options, file, linenum) == 1) { found_key = 1; - debug("matching key found: file %s, line %ld", + debug("matching key found: file %s, line %lu", file, linenum); break; } @@ -784,15 +734,32 @@ return found_key; } +/* check whether given key is in .ssh/authorized_keys* */ +static int +user_key_allowed(struct passwd *pw, Key *key) +{ + int success; + char *file; + + file = authorized_keys_file(pw); + success = user_key_allowed2(pw, key, file); + xfree(file); + if (success) + return success; + + /* try suffix "2" for backward compat, too */ + file = authorized_keys_file2(pw); + success = user_key_allowed2(pw, key, file); + xfree(file); + return success; +} + /* return 1 if given hostkey is allowed */ -int +static int hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost, Key *key) { - Key *found; const char *resolvedname, *ipaddr, *lookup; - struct stat st; - char *user_hostfile; int host_status, len; resolvedname = get_canonical_hostname(options.reverse_mapping_check); @@ -820,32 +787,17 @@ } debug2("userauth_hostbased: access allowed by auth_rhosts2"); - /* XXX this is copied from auth-rh-rsa.c and should be shared */ - found = key_new(key->type); - host_status = check_host_in_hostfile(_PATH_SSH_SYSTEM_HOSTFILE2, lookup, - key, found, NULL); - - if (host_status != HOST_OK && !options.ignore_user_known_hosts) { - user_hostfile = tilde_expand_filename(_PATH_SSH_USER_HOSTFILE2, - pw->pw_uid); - if (options.strict_modes && - (stat(user_hostfile, &st) == 0) && - ((st.st_uid != 0 && st.st_uid != pw->pw_uid) || - (st.st_mode & 022) != 0)) { - log("Hostbased authentication refused for %.100s: " - "bad owner or modes for %.200s", - pw->pw_name, user_hostfile); - } else { - temporarily_use_uid(pw); - host_status = check_host_in_hostfile(user_hostfile, - lookup, key, found, NULL); - restore_uid(); - } - xfree(user_hostfile); - } - key_free(found); + host_status = check_key_in_hostfiles(pw, key, lookup, + _PATH_SSH_SYSTEM_HOSTFILE, + options.ignore_user_known_hosts ? NULL : _PATH_SSH_USER_HOSTFILE); + + /* backward compat if no key has been found. */ + if (host_status == HOST_NEW) + host_status = check_key_in_hostfiles(pw, key, lookup, + _PATH_SSH_SYSTEM_HOSTFILE2, + options.ignore_user_known_hosts ? NULL : + _PATH_SSH_USER_HOSTFILE2); - debug2("userauth_hostbased: key %s for %s", host_status == HOST_OK ? - "ok" : "not found", lookup); return (host_status == HOST_OK); } + diff -ru openssh-2.9p2/authfd.c openssh-2.9.9p1/authfd.c --- openssh-2.9p2/authfd.c 2001-04-06 09:26:32.000000000 +1000 +++ openssh-2.9.9p1/authfd.c 2001-09-20 11:03:32.000000000 +1000 @@ -35,7 +35,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: authfd.c,v 1.39 2001/04/05 10:42:48 markus Exp $"); +RCSID("$OpenBSD: authfd.c,v 1.45 2001/09/19 19:35:30 stevesk Exp $"); #include @@ -58,7 +58,8 @@ /* macro to check for "agent failure" message */ #define agent_failed(x) \ - ((x == SSH_AGENT_FAILURE) || (x == SSH_COM_AGENT2_FAILURE)) + ((x == SSH_AGENT_FAILURE) || (x == SSH_COM_AGENT2_FAILURE) || \ + (x == SSH2_AGENT_FAILURE)) /* Returns the number of the authentication fd, or -1 if there is none. */ @@ -66,7 +67,7 @@ ssh_get_authentication_socket(void) { const char *authsocket; - int sock, len; + int sock; struct sockaddr_un sunaddr; authsocket = getenv(SSH_AUTHSOCKET_ENV_NAME); @@ -75,10 +76,6 @@ sunaddr.sun_family = AF_UNIX; strlcpy(sunaddr.sun_path, authsocket, sizeof(sunaddr.sun_path)); - len = SUN_LEN(&sunaddr)+1; -#ifdef HAVE_SUN_LEN_IN_SOCKADDR_UN - sunaddr.sun_len = len; -#endif /* HAVE_SUN_LEN_IN_SOCKADDR_UN */ sock = socket(AF_UNIX, SOCK_STREAM, 0); if (sock < 0) @@ -89,14 +86,14 @@ close(sock); return -1; } - if (connect(sock, (struct sockaddr *) & sunaddr, len) < 0) { + if (connect(sock, (struct sockaddr *) &sunaddr, sizeof sunaddr) < 0) { close(sock); return -1; } return sock; } -int +static int ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply) { int l, len; @@ -419,7 +416,7 @@ /* Encode key for a message to the agent. */ -void +static void ssh_encode_identity_rsa1(Buffer *b, RSA *key, const char *comment) { buffer_clear(b); @@ -432,10 +429,10 @@ buffer_put_bignum(b, key->iqmp); /* ssh key->u */ buffer_put_bignum(b, key->q); /* ssh key->p, SSL key->q */ buffer_put_bignum(b, key->p); /* ssh key->q, SSL key->p */ - buffer_put_string(b, comment, strlen(comment)); + buffer_put_cstring(b, comment); } -void +static void ssh_encode_identity_ssh2(Buffer *b, Key *key, const char *comment) { buffer_clear(b); @@ -534,6 +531,25 @@ return decode_reply(type); } +int +ssh_update_card(AuthenticationConnection *auth, int add, const char *reader_id) +{ + Buffer msg; + int type; + + buffer_init(&msg); + buffer_put_char(&msg, add ? SSH_AGENTC_ADD_SMARTCARD_KEY : + SSH_AGENTC_REMOVE_SMARTCARD_KEY); + buffer_put_cstring(&msg, reader_id); + if (ssh_request_reply(auth, &msg, &msg) == 0) { + buffer_free(&msg); + return 0; + } + type = buffer_get_char(&msg); + buffer_free(&msg); + return decode_reply(type); +} + /* * Removes all identities from the agent. This call is not meant to be used * by normal applications. @@ -566,6 +582,7 @@ switch (type) { case SSH_AGENT_FAILURE: case SSH_COM_AGENT2_FAILURE: + case SSH2_AGENT_FAILURE: log("SSH_AGENT_FAILURE"); return 0; case SSH_AGENT_SUCCESS: diff -ru openssh-2.9p2/authfd.h openssh-2.9.9p1/authfd.h --- openssh-2.9p2/authfd.h 2000-12-22 12:43:59.000000000 +1100 +++ openssh-2.9.9p1/authfd.h 2001-08-16 09:04:50.000000000 +1000 @@ -11,7 +11,7 @@ * called by a name other than "ssh" or "Secure Shell". */ -/* RCSID("$OpenBSD: authfd.h,v 1.16 2000/12/20 19:37:21 markus Exp $"); */ +/* RCSID("$OpenBSD: authfd.h,v 1.21 2001/08/07 10:37:46 markus Exp $"); */ #ifndef AUTHFD_H #define AUTHFD_H @@ -38,101 +38,43 @@ #define SSH2_AGENTC_REMOVE_IDENTITY 18 #define SSH2_AGENTC_REMOVE_ALL_IDENTITIES 19 +/* smartcard */ +#define SSH_AGENTC_ADD_SMARTCARD_KEY 20 +#define SSH_AGENTC_REMOVE_SMARTCARD_KEY 21 + +/* extended failure messages */ +#define SSH2_AGENT_FAILURE 30 + /* additional error code for ssh.com's ssh-agent2 */ -#define SSH_COM_AGENT2_FAILURE 102 +#define SSH_COM_AGENT2_FAILURE 102 #define SSH_AGENT_OLD_SIGNATURE 0x01 - typedef struct { int fd; Buffer identities; int howmany; } AuthenticationConnection; -/* Returns the number of the authentication fd, or -1 if there is none. */ -int ssh_get_authentication_socket(void); +int ssh_get_authentication_socket(void); +void ssh_close_authentication_socket(int); -/* - * This should be called for any descriptor returned by - * ssh_get_authentication_socket(). Depending on the way the descriptor was - * obtained, this may close the descriptor. - */ -void ssh_close_authentication_socket(int authfd); - -/* - * Opens and connects a private socket for communication with the - * authentication agent. Returns NULL if an error occurred and the - * connection could not be opened. The connection should be closed by the - * caller by calling ssh_close_authentication_connection(). - */ AuthenticationConnection *ssh_get_authentication_connection(void); +void ssh_close_authentication_connection(AuthenticationConnection *); +int ssh_get_num_identities(AuthenticationConnection *, int); +Key *ssh_get_first_identity(AuthenticationConnection *, char **, int); +Key *ssh_get_next_identity(AuthenticationConnection *, char **, int); +int ssh_add_identity(AuthenticationConnection *, Key *, const char *); +int ssh_remove_identity(AuthenticationConnection *, Key *); +int ssh_remove_all_identities(AuthenticationConnection *, int); +int ssh_update_card(AuthenticationConnection *, int, const char *); -/* - * Closes the connection to the authentication agent and frees any associated - * memory. - */ -void ssh_close_authentication_connection(AuthenticationConnection *auth); - -/* - * Returns the number authentication identity held by the agent. - */ -int ssh_get_num_identities(AuthenticationConnection *auth, int version); - -/* - * Returns the first authentication identity held by the agent or NULL if - * no identies are available. Caller must free comment and key. - * Note that you cannot mix calls with different versions. - */ -Key *ssh_get_first_identity(AuthenticationConnection *auth, char **comment, int version); - -/* - * Returns the next authentication identity for the agent. Other functions - * can be called between this and ssh_get_first_identity or two calls of this - * function. This returns NULL if there are no more identities. The caller - * must free key and comment after a successful return. - */ -Key *ssh_get_next_identity(AuthenticationConnection *auth, char **comment, int version); - -/* - * Requests the agent to decrypt the given challenge. Returns true if the - * agent claims it was able to decrypt it. - */ int -ssh_decrypt_challenge(AuthenticationConnection *auth, - Key *key, BIGNUM * challenge, - u_char session_id[16], - u_int response_type, - u_char response[16]); +ssh_decrypt_challenge(AuthenticationConnection *, Key *, BIGNUM *, u_char[16], + u_int, u_char[16]); -/* Requests the agent to sign data using key */ -int -ssh_agent_sign(AuthenticationConnection *auth, - Key *key, - u_char **sigp, int *lenp, - u_char *data, int datalen); - -/* - * Adds an identity to the authentication server. This call is not meant to - * be used by normal applications. This returns true if the identity was - * successfully added. - */ int -ssh_add_identity(AuthenticationConnection *auth, Key *key, - const char *comment); - -/* - * Removes the identity from the authentication server. This call is not - * meant to be used by normal applications. This returns true if the - * identity was successfully added. - */ -int ssh_remove_identity(AuthenticationConnection *auth, Key *key); - -/* - * Removes all identities from the authentication agent. This call is not - * meant to be used by normal applications. This returns true if the - * operation was successful. - */ -int ssh_remove_all_identities(AuthenticationConnection *auth, int version); +ssh_agent_sign(AuthenticationConnection *, Key *, u_char **, int *, u_char *, + int); #endif /* AUTHFD_H */ diff -ru openssh-2.9p2/authfile.c openssh-2.9.9p1/authfile.c --- openssh-2.9p2/authfile.c 2001-04-20 06:47:11.000000000 +1000 +++ openssh-2.9.9p1/authfile.c 2001-09-23 23:53:22.000000000 +1000 @@ -36,7 +36,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: authfile.c,v 1.32 2001/04/18 23:44:51 markus Exp $"); +RCSID("$OpenBSD: authfile.c,v 1.38 2001/09/23 11:09:13 markus Exp $"); #include #include @@ -62,7 +62,7 @@ * passphrase. */ -int +static int key_save_private_rsa1(Key *key, const char *filename, const char *passphrase, const char *comment) { @@ -125,7 +125,7 @@ buffer_put_int(&encrypted, BN_num_bits(key->rsa->n)); buffer_put_bignum(&encrypted, key->rsa->n); buffer_put_bignum(&encrypted, key->rsa->e); - buffer_put_string(&encrypted, comment, strlen(comment)); + buffer_put_cstring(&encrypted, comment); /* Allocate space for the private part of the key in the buffer. */ buffer_append_space(&encrypted, &cp, buffer_len(&buffer)); @@ -159,7 +159,7 @@ } /* save SSH v2 key in OpenSSL PEM format */ -int +static int key_save_private_pem(Key *key, const char *filename, const char *_passphrase, const char *comment) { @@ -226,7 +226,7 @@ * otherwise. */ -Key * +static Key * key_load_public_rsa1(int fd, const char *filename, char **commentp) { Buffer buffer; @@ -306,7 +306,7 @@ * Assumes we are called under uid of the owner of the file. */ -Key * +static Key * key_load_private_rsa1(int fd, const char *filename, const char *passphrase, char **commentp) { @@ -430,7 +430,7 @@ return NULL; } -Key * +static Key * key_load_private_pem(int fd, int type, const char *passphrase, char **commentp) { @@ -481,23 +481,26 @@ return prv; } -int +static int key_perm_ok(int fd, const char *filename) { struct stat st; - /* check owner and modes */ + if (fstat(fd, &st) < 0) + return 0; + /* + * if a key owned by the user is accessed, then we check the + * permissions of the file. if the key owned by a different user, + * then we don't care. + */ #ifdef HAVE_CYGWIN if (check_ntsec(filename)) #endif - if (fstat(fd, &st) < 0 || - (st.st_uid != 0 && getuid() != 0 && st.st_uid != getuid()) || - (st.st_mode & 077) != 0) { - close(fd); + if ((st.st_uid == getuid()) && (st.st_mode & 077) != 0) { error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); error("@ WARNING: UNPROTECTED PRIVATE KEY FILE! @"); error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); - error("Bad ownership or mode(0%3.3o) for '%s'.", + error("Permissions 0%3.3o for '%s' are too open.", st.st_mode & 0777, filename); error("It is recommended that your private key files are NOT accessible by others."); error("This private key will be ignored."); @@ -543,7 +546,7 @@ key_load_private(const char *filename, const char *passphrase, char **commentp) { - Key *pub; + Key *pub, *prv; int fd; fd = open(filename, O_RDONLY); @@ -558,16 +561,20 @@ lseek(fd, (off_t) 0, SEEK_SET); /* rewind */ if (pub == NULL) { /* closes fd */ - return key_load_private_pem(fd, KEY_UNSPEC, passphrase, NULL); + prv = key_load_private_pem(fd, KEY_UNSPEC, passphrase, NULL); + /* use the filename as a comment for PEM */ + if (commentp && prv) + *commentp = xstrdup(filename); } else { /* it's a SSH v1 key if the public key part is readable */ key_free(pub); /* closes fd */ - return key_load_private_rsa1(fd, filename, passphrase, NULL); + prv = key_load_private_rsa1(fd, filename, passphrase, NULL); } + return prv; } -int +static int key_try_load_public(Key *k, const char *filename, char **commentp) { FILE *f; diff -ru openssh-2.9p2/authfile.h openssh-2.9.9p1/authfile.h --- openssh-2.9p2/authfile.h 2001-03-26 23:44:07.000000000 +1000 +++ openssh-2.9.9p1/authfile.h 2001-07-04 14:46:57.000000000 +1000 @@ -10,27 +10,15 @@ * called by a name other than "ssh" or "Secure Shell". */ -/* $OpenBSD: authfile.h,v 1.6 2001/03/26 08:07:08 markus Exp $ */ +/* $OpenBSD: authfile.h,v 1.8 2001/06/26 17:27:22 markus Exp $ */ #ifndef AUTHFILE_H #define AUTHFILE_H -int -key_save_private(Key *key, const char *filename, const char *passphrase, - const char *comment); - -Key * -key_load_public(const char *filename, char **commentp); - -Key * -key_load_public_type(int type, const char *filename, char **commentp); - -Key * -key_load_private(const char *filename, const char *passphrase, - char **commentp); - -Key * -key_load_private_type(int type, const char *filename, const char *passphrase, - char **commentp); +int key_save_private(Key *, const char *, const char *, const char *); +Key *key_load_public(const char *, char **); +Key *key_load_public_type(int, const char *, char **); +Key *key_load_private(const char *, const char *, char **); +Key *key_load_private_type(int, const char *, const char *, char **); #endif Only in openssh-2.9.9p1: autom4te.cache diff -ru openssh-2.9p2/bufaux.h openssh-2.9.9p1/bufaux.h --- openssh-2.9p2/bufaux.h 2001-01-24 03:26:52.000000000 +1100 +++ openssh-2.9.9p1/bufaux.h 2001-07-04 14:46:57.000000000 +1000 @@ -10,7 +10,7 @@ * called by a name other than "ssh" or "Secure Shell". */ -/* RCSID("$OpenBSD: bufaux.h,v 1.11 2001/01/21 19:05:45 markus Exp $"); */ +/* RCSID("$OpenBSD: bufaux.h,v 1.13 2001/06/26 17:27:22 markus Exp $"); */ #ifndef BUFAUX_H #define BUFAUX_H @@ -18,47 +18,27 @@ #include "buffer.h" #include -/* - * Stores an BIGNUM in the buffer with a 2-byte msb first bit count, followed - * by (bits+7)/8 bytes of binary data, msb first. - */ -void buffer_put_bignum(Buffer * buffer, BIGNUM * value); -void buffer_put_bignum2(Buffer * buffer, BIGNUM * value); +void buffer_put_bignum(Buffer *, BIGNUM *); +void buffer_put_bignum2(Buffer *, BIGNUM *); -/* Retrieves an BIGNUM from the buffer. */ -int buffer_get_bignum(Buffer * buffer, BIGNUM * value); -int buffer_get_bignum2(Buffer *buffer, BIGNUM * value); +int buffer_get_bignum(Buffer *, BIGNUM *); +int buffer_get_bignum2(Buffer *, BIGNUM *); -/* Returns an integer from the buffer (4 bytes, msb first). */ -u_int buffer_get_int(Buffer * buffer); -#ifdef HAVE_U_INT64_T -u_int64_t buffer_get_int64(Buffer *buffer); -#endif +u_int buffer_get_int(Buffer *); +void buffer_put_int(Buffer *, u_int); -/* Stores an integer in the buffer in 4 bytes, msb first. */ -void buffer_put_int(Buffer * buffer, u_int value); #ifdef HAVE_U_INT64_T -void buffer_put_int64(Buffer *buffer, u_int64_t value); +u_int64_t buffer_get_int64(Buffer *); +void buffer_put_int64(Buffer *, u_int64_t); #endif -/* Returns a character from the buffer (0 - 255). */ -int buffer_get_char(Buffer * buffer); +int buffer_get_char(Buffer *); -/* Stores a character in the buffer. */ -void buffer_put_char(Buffer * buffer, int value); +void buffer_put_char(Buffer *, int); -/* - * Returns an arbitrary binary string from the buffer. The string cannot be - * longer than 256k. The returned value points to memory allocated with - * xmalloc; it is the responsibility of the calling function to free the - * data. If length_ptr is non-NULL, the length of the returned data will be - * stored there. A null character will be automatically appended to the - * returned string, and is not counted in length. - */ -char *buffer_get_string(Buffer * buffer, u_int *length_ptr); +char *buffer_get_string(Buffer *, u_int *); -/* Stores and arbitrary binary string in the buffer. */ -void buffer_put_string(Buffer * buffer, const void *buf, u_int len); -void buffer_put_cstring(Buffer *buffer, const char *s); +void buffer_put_string(Buffer *, const void *, u_int); +void buffer_put_cstring(Buffer *, const char *); #endif /* BUFAUX_H */ diff -ru openssh-2.9p2/buffer.h openssh-2.9.9p1/buffer.h --- openssh-2.9p2/buffer.h 2000-12-22 12:43:59.000000000 +1100 +++ openssh-2.9.9p1/buffer.h 2001-07-04 14:46:57.000000000 +1000 @@ -11,56 +11,33 @@ * called by a name other than "ssh" or "Secure Shell". */ -/* RCSID("$OpenBSD: buffer.h,v 1.7 2000/12/19 23:17:55 markus Exp $"); */ +/* RCSID("$OpenBSD: buffer.h,v 1.9 2001/06/26 17:27:23 markus Exp $"); */ #ifndef BUFFER_H #define BUFFER_H typedef struct { - char *buf; /* Buffer for data. */ - u_int alloc; /* Number of bytes allocated for data. */ - u_int offset; /* Offset of first byte containing data. */ - u_int end; /* Offset of last byte containing data. */ + char *buf; /* Buffer for data. */ + u_int alloc; /* Number of bytes allocated for data. */ + u_int offset; /* Offset of first byte containing data. */ + u_int end; /* Offset of last byte containing data. */ } Buffer; -/* Initializes the buffer structure. */ -void buffer_init(Buffer * buffer); -/* Frees any memory used for the buffer. */ -void buffer_free(Buffer * buffer); +void buffer_init(Buffer *); +void buffer_clear(Buffer *); +void buffer_free(Buffer *); -/* Clears any data from the buffer, making it empty. This does not actually - zero the memory. */ -void buffer_clear(Buffer * buffer); - -/* Appends data to the buffer, expanding it if necessary. */ -void buffer_append(Buffer * buffer, const char *data, u_int len); - -/* - * Appends space to the buffer, expanding the buffer if necessary. This does - * not actually copy the data into the buffer, but instead returns a pointer - * to the allocated region. - */ -void buffer_append_space(Buffer * buffer, char **datap, u_int len); - -/* Returns the number of bytes of data in the buffer. */ -u_int buffer_len(Buffer * buffer); +u_int buffer_len(Buffer *); +char *buffer_ptr(Buffer *); -/* Gets data from the beginning of the buffer. */ -void buffer_get(Buffer * buffer, char *buf, u_int len); +void buffer_append(Buffer *, const char *, u_int); +void buffer_append_space(Buffer *, char **, u_int); -/* Consumes the given number of bytes from the beginning of the buffer. */ -void buffer_consume(Buffer * buffer, u_int bytes); +void buffer_get(Buffer *, char *, u_int); -/* Consumes the given number of bytes from the end of the buffer. */ -void buffer_consume_end(Buffer * buffer, u_int bytes); +void buffer_consume(Buffer *, u_int); +void buffer_consume_end(Buffer *, u_int); -/* Returns a pointer to the first used byte in the buffer. */ -char *buffer_ptr(Buffer * buffer); - -/* - * Dumps the contents of the buffer to stderr in hex. This intended for - * debugging purposes only. - */ -void buffer_dump(Buffer * buffer); +void buffer_dump(Buffer *); #endif /* BUFFER_H */ diff -ru openssh-2.9p2/canohost.c openssh-2.9.9p1/canohost.c --- openssh-2.9p2/canohost.c 2001-04-19 01:32:46.000000000 +1000 +++ openssh-2.9.9p1/canohost.c 2001-06-25 15:01:24.000000000 +1000 @@ -12,21 +12,21 @@ */ #include "includes.h" -RCSID("$OpenBSD: canohost.c,v 1.26 2001/04/18 14:15:00 markus Exp $"); +RCSID("$OpenBSD: canohost.c,v 1.27 2001/06/23 15:12:17 itojun Exp $"); #include "packet.h" #include "xmalloc.h" #include "log.h" #include "canohost.h" -void check_ip_options(int socket, char *ipaddr); +static void check_ip_options(int, char *); /* * Return the canonical name of the host at the other end of the socket. The * caller should free the returned string with xfree. */ -char * +static char * get_remote_hostname(int socket, int reverse_mapping_check) { struct sockaddr_storage from; @@ -140,7 +140,7 @@ * exit here if we detect any IP options. */ /* IPv4 only */ -void +static void check_ip_options(int socket, char *ipaddr) { u_char options[200]; @@ -202,7 +202,7 @@ * Returns the remote IP-address of socket as a string. The returned * string must be freed. */ -char * +static char * get_socket_address(int socket, int remote, int flags) { struct sockaddr_storage addr; @@ -293,7 +293,7 @@ /* Returns the local/remote port for the socket. */ -int +static int get_sock_port(int sock, int local) { struct sockaddr_storage from; @@ -323,7 +323,7 @@ /* Returns remote/local port number for the current connection. */ -int +static int get_port(int local) { /* diff -ru openssh-2.9p2/canohost.h openssh-2.9.9p1/canohost.h --- openssh-2.9p2/canohost.h 2001-04-13 09:34:35.000000000 +1000 +++ openssh-2.9.9p1/canohost.h 2001-07-04 14:46:57.000000000 +1000 @@ -1,4 +1,4 @@ -/* $OpenBSD: canohost.h,v 1.6 2001/04/12 19:15:24 markus Exp $ */ +/* $OpenBSD: canohost.h,v 1.8 2001/06/26 17:27:23 markus Exp $ */ /* * Author: Tatu Ylonen @@ -12,27 +12,14 @@ * called by a name other than "ssh" or "Secure Shell". */ -/* - * Return the canonical name of the host in the other side of the current - * connection (as returned by packet_get_connection). The host name is - * cached, so it is efficient to call this several times. - */ -const char *get_canonical_hostname(int reverse_mapping_check); - -/* - * Returns the IP-address of the remote host as a string. The returned - * string is cached and must not be freed. - */ -const char *get_remote_ipaddr(void); - -const char *get_remote_name_or_ip(u_int utmp_len, int reverse_mapping_check); - -/* Returns the ipaddr/port number of the peer of the socket. */ -char * get_peer_ipaddr(int socket); -int get_peer_port(int sock); -char * get_local_ipaddr(int socket); -char * get_local_name(int socket); +const char *get_canonical_hostname(int); +const char *get_remote_ipaddr(void); +const char *get_remote_name_or_ip(u_int, int); + +char *get_peer_ipaddr(int); +int get_peer_port(int); +char *get_local_ipaddr(int); +char *get_local_name(int); -/* Returns the port number of the remote/local host. */ -int get_remote_port(void); -int get_local_port(void); +int get_remote_port(void); +int get_local_port(void); diff -ru openssh-2.9p2/channels.c openssh-2.9.9p1/channels.c --- openssh-2.9p2/channels.c 2001-06-14 05:18:05.000000000 +1000 +++ openssh-2.9.9p1/channels.c 2001-09-18 15:53:12.000000000 +1000 @@ -12,9 +12,8 @@ * incompatible with the protocol description in the RFC file, it must be * called by a name other than "ssh" or "Secure Shell". * - * * SSH2 support added by Markus Friedl. - * Copyright (c) 1999,2000 Markus Friedl. All rights reserved. + * Copyright (c) 1999, 2000, 2001 Markus Friedl. All rights reserved. * Copyright (c) 1999 Dug Song. All rights reserved. * Copyright (c) 1999 Theo de Raadt. All rights reserved. * @@ -40,70 +39,45 @@ */ #include "includes.h" -RCSID("$OpenBSD: channels.c,v 1.109 2001/04/17 12:55:03 markus Exp $"); - -#include -#include +RCSID("$OpenBSD: channels.c,v 1.134 2001/09/17 21:04:01 markus Exp $"); #include "ssh.h" #include "ssh1.h" #include "ssh2.h" #include "packet.h" #include "xmalloc.h" -#include "buffer.h" -#include "bufaux.h" #include "uidswap.h" #include "log.h" #include "misc.h" #include "channels.h" -#include "nchan.h" #include "compat.h" #include "canohost.h" #include "key.h" #include "authfd.h" -/* Maximum number of fake X11 displays to try. */ -#define MAX_DISPLAYS 1000 -/* Max len of agent socket */ -#define MAX_SOCKET_NAME 100 +/* -- channel core */ /* * Pointer to an array containing all allocated channels. The array is * dynamically extended as needed. */ -static Channel *channels = NULL; +static Channel **channels = NULL; /* * Size of the channel array. All slots of the array must always be - * initialized (at least the type field); unused slots are marked with type - * SSH_CHANNEL_FREE. + * initialized (at least the type field); unused slots set to NULL */ static int channels_alloc = 0; /* * Maximum file descriptor value used in any of the channels. This is - * updated in channel_allocate. + * updated in channel_new. */ static int channel_max_fd = 0; -/* Name and directory of socket for authentication agent forwarding. */ -static char *channel_forwarded_auth_socket_name = NULL; -static char *channel_forwarded_auth_socket_dir = NULL; -/* Saved X11 authentication protocol name. */ -char *x11_saved_proto = NULL; - -/* Saved X11 authentication data. This is the real data. */ -char *x11_saved_data = NULL; -u_int x11_saved_data_len = 0; - -/* - * Fake X11 authentication data. This is what the server will be sending us; - * we should replace any occurrences of this by the real data. - */ -char *x11_fake_data = NULL; -u_int x11_fake_data_len; +/* -- tcp forwarding */ /* * Data structure for storing which hosts are permitted for forward requests. @@ -119,6 +93,7 @@ /* List of all permitted host/port pairs to connect. */ static ForwardPermission permitted_opens[SSH_MAX_FORWARDS_PER_DIRECTION]; + /* Number of permitted host/port pairs in the array. */ static int num_permitted_opens = 0; /* @@ -128,34 +103,54 @@ */ static int all_opens_permitted = 0; -/* This is set to true if both sides support SSH_PROTOFLAG_HOST_IN_FWD_OPEN. */ -static int have_hostname_in_open = 0; -/* AF_UNSPEC or AF_INET or AF_INET6 */ -extern int IPv4or6; +/* -- X11 forwarding */ -void port_open_helper(Channel *c, char *rtype); +/* Maximum number of fake X11 displays to try. */ +#define MAX_DISPLAYS 1000 -/* Sets specific protocol options. */ +/* Saved X11 authentication protocol name. */ +static char *x11_saved_proto = NULL; -void -channel_set_options(int hostname_in_open) -{ - have_hostname_in_open = hostname_in_open; -} +/* Saved X11 authentication data. This is the real data. */ +static char *x11_saved_data = NULL; +static u_int x11_saved_data_len = 0; + +/* + * Fake X11 authentication data. This is what the server will be sending us; + * we should replace any occurrences of this by the real data. + */ +static char *x11_fake_data = NULL; +static u_int x11_fake_data_len; + + +/* -- agent forwarding */ + +#define NUM_SOCKS 10 + +/* Name and directory of socket for authentication agent forwarding. */ +static char *auth_sock_name = NULL; +static char *auth_sock_dir = NULL; + +/* AF_UNSPEC or AF_INET or AF_INET6 */ +extern int IPv4or6; + +/* helper */ +static void port_open_helper(Channel *c, char *rtype); -/* lookup channel by id */ +/* -- channel core */ Channel * channel_lookup(int id) { Channel *c; + if (id < 0 || id > channels_alloc) { log("channel_lookup: %d: bad id", id); return NULL; } - c = &channels[id]; - if (c->type == SSH_CHANNEL_FREE) { + c = channels[id]; + if (c == NULL) { log("channel_lookup: %d: bad id: channel free", id); return NULL; } @@ -167,7 +162,7 @@ * when the channel consumer/producer is ready, e.g. shell exec'd */ -void +static void channel_register_fds(Channel *c, int rfd, int wfd, int efd, int extusage, int nonblock) { @@ -212,7 +207,7 @@ * remote_name to be freed. */ -int +Channel * channel_new(char *ctype, int type, int rfd, int wfd, int efd, int window, int maxpack, int extusage, char *remote_name, int nonblock) { @@ -223,18 +218,14 @@ if (channels_alloc == 0) { chan_init(); channels_alloc = 10; - channels = xmalloc(channels_alloc * sizeof(Channel)); + channels = xmalloc(channels_alloc * sizeof(Channel *)); for (i = 0; i < channels_alloc; i++) - channels[i].type = SSH_CHANNEL_FREE; - /* - * Kludge: arrange a call to channel_stop_listening if we - * terminate with fatal(). - */ - fatal_add_cleanup((void (*) (void *)) channel_stop_listening, NULL); + channels[i] = NULL; + fatal_add_cleanup((void (*) (void *)) channel_free_all, NULL); } /* Try to find a free slot where to put the new channel. */ for (found = -1, i = 0; i < channels_alloc; i++) - if (channels[i].type == SSH_CHANNEL_FREE) { + if (channels[i] == NULL) { /* Found a free slot. */ found = i; break; @@ -244,12 +235,12 @@ found = channels_alloc; channels_alloc += 10; debug2("channel: expanding %d", channels_alloc); - channels = xrealloc(channels, channels_alloc * sizeof(Channel)); + channels = xrealloc(channels, channels_alloc * sizeof(Channel *)); for (i = found; i < channels_alloc; i++) - channels[i].type = SSH_CHANNEL_FREE; + channels[i] = NULL; } - /* Initialize and return new channel number. */ - c = &channels[found]; + /* Initialize and return new channel. */ + c = channels[found] = xmalloc(sizeof(Channel)); buffer_init(&c->input); buffer_init(&c->output); buffer_init(&c->extended); @@ -269,70 +260,425 @@ c->cb_fn = NULL; c->cb_arg = NULL; c->cb_event = 0; - c->dettach_user = NULL; + c->force_drain = 0; + c->detach_user = NULL; c->input_filter = NULL; debug("channel %d: new [%s]", found, remote_name); - return found; + return c; +} + +static int +channel_find_maxfd(void) +{ + int i, max = 0; + Channel *c; + + for (i = 0; i < channels_alloc; i++) { + c = channels[i]; + if (c != NULL) { + max = MAX(max, c->rfd); + max = MAX(max, c->wfd); + max = MAX(max, c->efd); + } + } + return max; +} + +int +channel_close_fd(int *fdp) +{ + int ret = 0, fd = *fdp; + + if (fd != -1) { + ret = close(fd); + *fdp = -1; + if (fd == channel_max_fd) + channel_max_fd = channel_find_maxfd(); + } + return ret; +} + +/* Close all channel fd/socket. */ + +static void +channel_close_fds(Channel *c) +{ + debug3("channel_close_fds: channel %d: r %d w %d e %d", + c->self, c->rfd, c->wfd, c->efd); + + channel_close_fd(&c->sock); + channel_close_fd(&c->rfd); + channel_close_fd(&c->wfd); + channel_close_fd(&c->efd); +} + +/* Free the channel and close its fd/socket. */ + +void +channel_free(Channel *c) +{ + char *s; + int i, n; + + for (n = 0, i = 0; i < channels_alloc; i++) + if (channels[i]) + n++; + debug("channel_free: channel %d: %s, nchannels %d", c->self, + c->remote_name ? c->remote_name : "???", n); + + s = channel_open_message(); + debug3("channel_free: status: %s", s); + xfree(s); + + if (c->detach_user != NULL) { + debug("channel_free: channel %d: detaching channel user", c->self); + c->detach_user(c->self, NULL); + } + if (c->sock != -1) + shutdown(c->sock, SHUT_RDWR); + channel_close_fds(c); + buffer_free(&c->input); + buffer_free(&c->output); + buffer_free(&c->extended); + if (c->remote_name) { + xfree(c->remote_name); + c->remote_name = NULL; + } + channels[c->self] = NULL; + xfree(c); +} + +void +channel_free_all(void) +{ + int i; + + for (i = 0; i < channels_alloc; i++) + if (channels[i] != NULL) + channel_free(channels[i]); +} + +void +channel_detach_all(void) +{ + int i; + Channel *c; + + for (i = 0; i < channels_alloc; i++) { + c = channels[i]; + if (c != NULL && c->detach_user != NULL) { + debug("channel_detach_all: channel %d", c->self); + c->detach_user(c->self, NULL); + c->detach_user = NULL; + } + } +} + +/* + * Closes the sockets/fds of all channels. This is used to close extra file + * descriptors after a fork. + */ + +void +channel_close_all() +{ + int i; + + for (i = 0; i < channels_alloc; i++) + if (channels[i] != NULL) + channel_close_fds(channels[i]); +} + +/* + * Stop listening to channels. + */ + +void +channel_stop_listening(void) +{ + int i; + Channel *c; + + for (i = 0; i < channels_alloc; i++) { + c = channels[i]; + if (c != NULL) { + switch (c->type) { + case SSH_CHANNEL_AUTH_SOCKET: + case SSH_CHANNEL_PORT_LISTENER: + case SSH_CHANNEL_RPORT_LISTENER: + case SSH_CHANNEL_X11_LISTENER: + channel_close_fd(&c->sock); + channel_free(c); + break; + } + } + } +} + +/* + * Returns true if no channel has too much buffered data, and false if one or + * more channel is overfull. + */ + +int +channel_not_very_much_buffered_data() +{ + u_int i; + Channel *c; + + for (i = 0; i < channels_alloc; i++) { + c = channels[i]; + if (c != NULL && c->type == SSH_CHANNEL_OPEN) { + if (!compat20 && buffer_len(&c->input) > packet_get_maxsize()) { + debug("channel %d: big input buffer %d", + c->self, buffer_len(&c->input)); + return 0; + } + if (buffer_len(&c->output) > packet_get_maxsize()) { + debug("channel %d: big output buffer %d", + c->self, buffer_len(&c->output)); + return 0; + } + } + } + return 1; +} + +/* Returns true if any channel is still open. */ + +int +channel_still_open() +{ + int i; + Channel *c; + + for (i = 0; i < channels_alloc; i++) { + c = channels[i]; + if (c == NULL) + continue; + switch (c->type) { + case SSH_CHANNEL_X11_LISTENER: + case SSH_CHANNEL_PORT_LISTENER: + case SSH_CHANNEL_RPORT_LISTENER: + case SSH_CHANNEL_CLOSED: + case SSH_CHANNEL_AUTH_SOCKET: + case SSH_CHANNEL_DYNAMIC: + case SSH_CHANNEL_CONNECTING: + case SSH_CHANNEL_ZOMBIE: + continue; + case SSH_CHANNEL_LARVAL: + if (!compat20) + fatal("cannot happen: SSH_CHANNEL_LARVAL"); + continue; + case SSH_CHANNEL_OPENING: + case SSH_CHANNEL_OPEN: + case SSH_CHANNEL_X11_OPEN: + return 1; + case SSH_CHANNEL_INPUT_DRAINING: + case SSH_CHANNEL_OUTPUT_DRAINING: + if (!compat13) + fatal("cannot happen: OUT_DRAIN"); + return 1; + default: + fatal("channel_still_open: bad channel type %d", c->type); + /* NOTREACHED */ + } + } + return 0; } -/* old interface XXX */ + +/* Returns the id of an open channel suitable for keepaliving */ + int -channel_allocate(int type, int sock, char *remote_name) +channel_find_open() +{ + int i; + Channel *c; + + for (i = 0; i < channels_alloc; i++) { + c = channels[i]; + if (c == NULL) + continue; + switch (c->type) { + case SSH_CHANNEL_CLOSED: + case SSH_CHANNEL_DYNAMIC: + case SSH_CHANNEL_X11_LISTENER: + case SSH_CHANNEL_PORT_LISTENER: + case SSH_CHANNEL_RPORT_LISTENER: + case SSH_CHANNEL_OPENING: + case SSH_CHANNEL_CONNECTING: + case SSH_CHANNEL_ZOMBIE: + continue; + case SSH_CHANNEL_LARVAL: + case SSH_CHANNEL_AUTH_SOCKET: + case SSH_CHANNEL_OPEN: + case SSH_CHANNEL_X11_OPEN: + return i; + case SSH_CHANNEL_INPUT_DRAINING: + case SSH_CHANNEL_OUTPUT_DRAINING: + if (!compat13) + fatal("cannot happen: OUT_DRAIN"); + return i; + default: + fatal("channel_find_open: bad channel type %d", c->type); + /* NOTREACHED */ + } + } + return -1; +} + + +/* + * Returns a message describing the currently open forwarded connections, + * suitable for sending to the client. The message contains crlf pairs for + * newlines. + */ + +char * +channel_open_message() { - return channel_new("", type, sock, sock, -1, 0, 0, 0, remote_name, 1); + Buffer buffer; + Channel *c; + char buf[1024], *cp; + int i; + + buffer_init(&buffer); + snprintf(buf, sizeof buf, "The following connections are open:\r\n"); + buffer_append(&buffer, buf, strlen(buf)); + for (i = 0; i < channels_alloc; i++) { + c = channels[i]; + if (c == NULL) + continue; + switch (c->type) { + case SSH_CHANNEL_X11_LISTENER: + case SSH_CHANNEL_PORT_LISTENER: + case SSH_CHANNEL_RPORT_LISTENER: + case SSH_CHANNEL_CLOSED: + case SSH_CHANNEL_AUTH_SOCKET: + case SSH_CHANNEL_ZOMBIE: + continue; + case SSH_CHANNEL_LARVAL: + case SSH_CHANNEL_OPENING: + case SSH_CHANNEL_CONNECTING: + case SSH_CHANNEL_DYNAMIC: + case SSH_CHANNEL_OPEN: + case SSH_CHANNEL_X11_OPEN: + case SSH_CHANNEL_INPUT_DRAINING: + case SSH_CHANNEL_OUTPUT_DRAINING: + snprintf(buf, sizeof buf, " #%d %.300s (t%d r%d i%d/%d o%d/%d fd %d/%d)\r\n", + c->self, c->remote_name, + c->type, c->remote_id, + c->istate, buffer_len(&c->input), + c->ostate, buffer_len(&c->output), + c->rfd, c->wfd); + buffer_append(&buffer, buf, strlen(buf)); + continue; + default: + fatal("channel_open_message: bad channel type %d", c->type); + /* NOTREACHED */ + } + } + buffer_append(&buffer, "\0", 1); + cp = xstrdup(buffer_ptr(&buffer)); + buffer_free(&buffer); + return cp; +} + +void +channel_send_open(int id) +{ + Channel *c = channel_lookup(id); + if (c == NULL) { + log("channel_send_open: %d: bad id", id); + return; + } + debug("send channel open %d", id); + packet_start(SSH2_MSG_CHANNEL_OPEN); + packet_put_cstring(c->ctype); + packet_put_int(c->self); + packet_put_int(c->local_window); + packet_put_int(c->local_maxpacket); + packet_send(); +} + +void +channel_request(int id, char *service, int wantconfirm) +{ + channel_request_start(id, service, wantconfirm); + packet_send(); + debug("channel request %d: %s", id, service) ; +} +void +channel_request_start(int id, char *service, int wantconfirm) +{ + Channel *c = channel_lookup(id); + if (c == NULL) { + log("channel_request: %d: bad id", id); + return; + } + packet_start(SSH2_MSG_CHANNEL_REQUEST); + packet_put_int(c->remote_id); + packet_put_cstring(service); + packet_put_char(wantconfirm); +} +void +channel_register_callback(int id, int mtype, channel_callback_fn *fn, void *arg) +{ + Channel *c = channel_lookup(id); + if (c == NULL) { + log("channel_register_callback: %d: bad id", id); + return; + } + c->cb_event = mtype; + c->cb_fn = fn; + c->cb_arg = arg; +} +void +channel_register_cleanup(int id, channel_callback_fn *fn) +{ + Channel *c = channel_lookup(id); + if (c == NULL) { + log("channel_register_cleanup: %d: bad id", id); + return; + } + c->detach_user = fn; +} +void +channel_cancel_cleanup(int id) +{ + Channel *c = channel_lookup(id); + if (c == NULL) { + log("channel_cancel_cleanup: %d: bad id", id); + return; + } + c->detach_user = NULL; } - - -/* Close all channel fd/socket. */ - void -channel_close_fds(Channel *c) +channel_register_filter(int id, channel_filter_fn *fn) { - if (c->sock != -1) { - close(c->sock); - c->sock = -1; - } - if (c->rfd != -1) { - close(c->rfd); - c->rfd = -1; - } - if (c->wfd != -1) { - close(c->wfd); - c->wfd = -1; - } - if (c->efd != -1) { - close(c->efd); - c->efd = -1; + Channel *c = channel_lookup(id); + if (c == NULL) { + log("channel_register_filter: %d: bad id", id); + return; } + c->input_filter = fn; } -/* Free the channel and close its fd/socket. */ - void -channel_free(int id) +channel_set_fds(int id, int rfd, int wfd, int efd, + int extusage, int nonblock) { Channel *c = channel_lookup(id); - char *s = channel_open_message(); - - if (c == NULL) - packet_disconnect("channel free: bad local channel %d", id); - debug("channel_free: channel %d: status: %s", id, s); - xfree(s); - - if (c->dettach_user != NULL) { - debug("channel_free: channel %d: dettaching channel user", id); - c->dettach_user(c->self, NULL); - } - if (c->sock != -1) - shutdown(c->sock, SHUT_RDWR); - channel_close_fds(c); - buffer_free(&c->input); - buffer_free(&c->output); - buffer_free(&c->extended); - c->type = SSH_CHANNEL_FREE; - if (c->remote_name) { - xfree(c->remote_name); - c->remote_name = NULL; - } + if (c == NULL || c->type != SSH_CHANNEL_LARVAL) + fatal("channel_activate for non-larval channel %d.", id); + channel_register_fds(c, rfd, wfd, efd, extusage, nonblock); + c->type = SSH_CHANNEL_OPEN; + /* XXX window size? */ + c->local_window = c->local_window_max = c->local_maxpacket * 2; + packet_start(SSH2_MSG_CHANNEL_WINDOW_ADJUST); + packet_put_int(c->remote_id); + packet_put_int(c->local_window); + packet_send(); } /* @@ -347,20 +693,20 @@ chan_fn *channel_pre[SSH_CHANNEL_MAX_TYPE]; chan_fn *channel_post[SSH_CHANNEL_MAX_TYPE]; -void +static void channel_pre_listener(Channel *c, fd_set * readset, fd_set * writeset) { FD_SET(c->sock, readset); } -void +static void channel_pre_connecting(Channel *c, fd_set * readset, fd_set * writeset) { debug3("channel %d: waiting for connection", c->self); FD_SET(c->sock, writeset); } -void +static void channel_pre_open_13(Channel *c, fd_set * readset, fd_set * writeset) { if (buffer_len(&c->input) < packet_get_maxsize()) @@ -369,7 +715,7 @@ FD_SET(c->sock, writeset); } -void +static void channel_pre_open_15(Channel *c, fd_set * readset, fd_set * writeset) { /* test whether sockets are 'alive' for read/write */ @@ -386,7 +732,7 @@ } } -void +static void channel_pre_open_20(Channel *c, fd_set * readset, fd_set * writeset) { if (c->istate == CHAN_INPUT_OPEN && @@ -412,7 +758,7 @@ } } -void +static void channel_pre_input_draining(Channel *c, fd_set * readset, fd_set * writeset) { if (buffer_len(&c->input) == 0) { @@ -424,11 +770,11 @@ } } -void +static void channel_pre_output_draining(Channel *c, fd_set * readset, fd_set * writeset) { if (buffer_len(&c->output) == 0) - channel_free(c->self); + chan_mark_dead(c); else FD_SET(c->sock, writeset); } @@ -440,19 +786,20 @@ * data in that packet is then substituted by the real data if it matches the * fake data, and the channel is put into normal mode. * XXX All this happens at the client side. + * Returns: 0 = need more data, -1 = wrong cookie, 1 = ok */ -int -x11_open_helper(Channel *c) +static int +x11_open_helper(Buffer *b) { u_char *ucp; u_int proto_len, data_len; /* Check if the fixed size part of the packet is in buffer. */ - if (buffer_len(&c->output) < 12) + if (buffer_len(b) < 12) return 0; /* Parse the lengths of variable-length fields. */ - ucp = (u_char *) buffer_ptr(&c->output); + ucp = (u_char *) buffer_ptr(b); if (ucp[0] == 0x42) { /* Byte order MSB first. */ proto_len = 256 * ucp[6] + ucp[7]; data_len = 256 * ucp[8] + ucp[9]; @@ -466,7 +813,7 @@ } /* Check if the whole packet is in buffer. */ - if (buffer_len(&c->output) < + if (buffer_len(b) < 12 + ((proto_len + 3) & ~3) + ((data_len + 3) & ~3)) return 0; @@ -499,10 +846,10 @@ return 1; } -void +static void channel_pre_x11_open_13(Channel *c, fd_set * readset, fd_set * writeset) { - int ret = x11_open_helper(c); + int ret = x11_open_helper(&c->output); if (ret == 1) { /* Start normal processing for the channel. */ c->type = SSH_CHANNEL_OPEN; @@ -515,7 +862,7 @@ log("X11 connection rejected because of wrong authentication."); buffer_clear(&c->input); buffer_clear(&c->output); - close(c->sock); + channel_close_fd(&c->sock); c->sock = -1; c->type = SSH_CHANNEL_CLOSED; packet_start(SSH_MSG_CHANNEL_CLOSE); @@ -524,10 +871,13 @@ } } -void +static void channel_pre_x11_open(Channel *c, fd_set * readset, fd_set * writeset) { - int ret = x11_open_helper(c); + int ret = x11_open_helper(&c->output); + + /* c->force_drain = 1; */ + if (ret == 1) { c->type = SSH_CHANNEL_OPEN; if (compat20) @@ -543,7 +893,7 @@ } /* try to decode a socks4 header */ -int +static int channel_decode_socks4(Channel *c, fd_set * readset, fd_set * writeset) { u_char *p, *host; @@ -613,7 +963,7 @@ } /* dynamic port forwarding */ -void +static void channel_pre_dynamic(Channel *c, fd_set * readset, fd_set * writeset) { u_char *p; @@ -640,7 +990,7 @@ break; } if (ret < 0) { - channel_free(c->self); + chan_mark_dead(c); } else if (ret == 0) { debug2("channel %d: pre_dynamic: need more", c->self); /* need more */ @@ -653,11 +1003,12 @@ } /* This is our fake X11 server socket. */ -void +static void channel_post_x11_listener(Channel *c, fd_set * readset, fd_set * writeset) { + Channel *nc; struct sockaddr addr; - int newsock, newch; + int newsock; socklen_t addrlen; char buf[16384], *remote_ipaddr; int remote_port; @@ -675,14 +1026,19 @@ snprintf(buf, sizeof buf, "X11 connection from %.200s port %d", remote_ipaddr, remote_port); - newch = channel_new("x11", + nc = channel_new("accepted x11 socket", SSH_CHANNEL_OPENING, newsock, newsock, -1, c->local_window_max, c->local_maxpacket, 0, xstrdup(buf), 1); + if (nc == NULL) { + close(newsock); + xfree(remote_ipaddr); + return; + } if (compat20) { packet_start(SSH2_MSG_CHANNEL_OPEN); packet_put_cstring("x11"); - packet_put_int(newch); + packet_put_int(nc->self); packet_put_int(c->local_window_max); packet_put_int(c->local_maxpacket); /* originator ipaddr and port */ @@ -695,16 +1051,17 @@ packet_send(); } else { packet_start(SSH_SMSG_X11_OPEN); - packet_put_int(newch); - if (have_hostname_in_open) - packet_put_string(buf, strlen(buf)); + packet_put_int(nc->self); + if (packet_get_protocol_flags() & + SSH_PROTOFLAG_HOST_IN_FWD_OPEN) + packet_put_cstring(buf); packet_send(); } xfree(remote_ipaddr); } } -void +static void port_open_helper(Channel *c, char *rtype) { int direct; @@ -747,7 +1104,8 @@ packet_put_int(c->self); packet_put_cstring(c->path); packet_put_int(c->host_port); - if (have_hostname_in_open) + if (packet_get_protocol_flags() & + SSH_PROTOFLAG_HOST_IN_FWD_OPEN) packet_put_cstring(c->remote_name); packet_send(); } @@ -757,12 +1115,12 @@ /* * This socket is listening for connections to a forwarded TCP/IP port. */ -void +static void channel_post_port_listener(Channel *c, fd_set * readset, fd_set * writeset) { Channel *nc; struct sockaddr addr; - int newsock, newch, nextstate; + int newsock, nextstate; socklen_t addrlen; char *rtype; @@ -773,8 +1131,9 @@ rtype = (c->type == SSH_CHANNEL_RPORT_LISTENER) ? "forwarded-tcpip" : "direct-tcpip"; - nextstate = (c->host_port == 0) ? SSH_CHANNEL_DYNAMIC : - SSH_CHANNEL_OPENING; + nextstate = (c->host_port == 0 && + c->type != SSH_CHANNEL_RPORT_LISTENER) ? + SSH_CHANNEL_DYNAMIC : SSH_CHANNEL_OPENING; addrlen = sizeof(addr); newsock = accept(c->sock, &addr, &addrlen); @@ -782,14 +1141,13 @@ error("accept: %.100s", strerror(errno)); return; } - newch = channel_new(rtype, + nc = channel_new(rtype, nextstate, newsock, newsock, -1, c->local_window_max, c->local_maxpacket, 0, xstrdup(rtype), 1); - - nc = channel_lookup(newch); if (nc == NULL) { - error("xxx: no new channel:"); + error("channel_post_port_listener: no new channel:"); + close(newsock); return; } nc->listening_port = c->listening_port; @@ -805,11 +1163,13 @@ * This is the authentication agent socket listening for connections from * clients. */ -void +static void channel_post_auth_listener(Channel *c, fd_set * readset, fd_set * writeset) { + Channel *nc; + char *name; + int newsock; struct sockaddr addr; - int newsock, newch; socklen_t addrlen; if (FD_ISSET(c->sock, readset)) { @@ -819,47 +1179,78 @@ error("accept from auth socket: %.100s", strerror(errno)); return; } - newch = channel_new("accepted auth socket", + name = xstrdup("accepted auth socket"); + nc = channel_new("accepted auth socket", SSH_CHANNEL_OPENING, newsock, newsock, -1, c->local_window_max, c->local_maxpacket, - 0, xstrdup("accepted auth socket"), 1); + 0, name, 1); + if (nc == NULL) { + error("channel_post_auth_listener: channel_new failed"); + xfree(name); + close(newsock); + } if (compat20) { packet_start(SSH2_MSG_CHANNEL_OPEN); packet_put_cstring("auth-agent@openssh.com"); - packet_put_int(newch); + packet_put_int(nc->self); packet_put_int(c->local_window_max); packet_put_int(c->local_maxpacket); } else { packet_start(SSH_SMSG_AGENT_OPEN); - packet_put_int(newch); + packet_put_int(nc->self); } packet_send(); } } -void +static void channel_post_connecting(Channel *c, fd_set * readset, fd_set * writeset) { + int err = 0; + socklen_t sz = sizeof(err); + if (FD_ISSET(c->sock, writeset)) { - int err = 0; - int sz = sizeof(err); - c->type = SSH_CHANNEL_OPEN; - if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, (char *)&err, &sz) < 0) { - debug("getsockopt SO_ERROR failed"); + if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, (char *)&err, + &sz) < 0) { + err = errno; + error("getsockopt SO_ERROR failed"); + } + if (err == 0) { + debug("channel %d: connected", c->self); + c->type = SSH_CHANNEL_OPEN; + if (compat20) { + packet_start(SSH2_MSG_CHANNEL_OPEN_CONFIRMATION); + packet_put_int(c->remote_id); + packet_put_int(c->self); + packet_put_int(c->local_window); + packet_put_int(c->local_maxpacket); + } else { + packet_start(SSH_MSG_CHANNEL_OPEN_CONFIRMATION); + packet_put_int(c->remote_id); + packet_put_int(c->self); + } } else { - if (err == 0) { - debug("channel %d: connected)", c->self); + debug("channel %d: not connected: %s", + c->self, strerror(err)); + if (compat20) { + packet_start(SSH2_MSG_CHANNEL_OPEN_FAILURE); + packet_put_int(c->remote_id); + packet_put_int(SSH2_OPEN_CONNECT_FAILED); + if (!(datafellows & SSH_BUG_OPENFAILURE)) { + packet_put_cstring(strerror(err)); + packet_put_cstring(""); + } } else { - debug("channel %d: not connected: %s", - c->self, strerror(err)); - chan_read_failed(c); - chan_write_failed(c); + packet_start(SSH_MSG_CHANNEL_OPEN_FAILURE); + packet_put_int(c->remote_id); } + chan_mark_dead(c); } + packet_send(); } } -int +static int channel_handle_rfd(Channel *c, fd_set * readset, fd_set * writeset) { char buf[16*1024]; @@ -875,12 +1266,12 @@ c->self, c->rfd, len); if (c->type != SSH_CHANNEL_OPEN) { debug("channel %d: not open", c->self); - channel_free(c->self); + chan_mark_dead(c); return -1; } else if (compat13) { buffer_consume(&c->output, buffer_len(&c->output)); c->type = SSH_CHANNEL_INPUT_DRAINING; - debug("channel %d: status set to input draining.", c->self); + debug("channel %d: input draining.", c->self); } else { chan_read_failed(c); } @@ -897,35 +1288,38 @@ } return 1; } -int +static int channel_handle_wfd(Channel *c, fd_set * readset, fd_set * writeset) { struct termios tio; + u_char *data; + u_int dlen; int len; /* Send buffered output data to the socket. */ if (c->wfd != -1 && FD_ISSET(c->wfd, writeset) && buffer_len(&c->output) > 0) { - len = write(c->wfd, buffer_ptr(&c->output), - buffer_len(&c->output)); + data = buffer_ptr(&c->output); + dlen = buffer_len(&c->output); + len = write(c->wfd, data, dlen); if (len < 0 && (errno == EINTR || errno == EAGAIN)) return 1; if (len <= 0) { if (c->type != SSH_CHANNEL_OPEN) { debug("channel %d: not open", c->self); - channel_free(c->self); + chan_mark_dead(c); return -1; } else if (compat13) { buffer_consume(&c->output, buffer_len(&c->output)); - debug("channel %d: status set to input draining.", c->self); + debug("channel %d: input draining.", c->self); c->type = SSH_CHANNEL_INPUT_DRAINING; } else { chan_write_failed(c); } return -1; } - if (compat20 && c->isatty) { + if (compat20 && c->isatty && dlen >= 1 && data[0] != '\r') { if (tcgetattr(c->wfd, &tio) == 0 && !(tio.c_lflag & ECHO) && (tio.c_lflag & ICANON)) { /* @@ -945,7 +1339,7 @@ } return 1; } -int +static int channel_handle_efd(Channel *c, fd_set * readset, fd_set * writeset) { char buf[16*1024]; @@ -965,8 +1359,7 @@ if (len <= 0) { debug2("channel %d: closing write-efd %d", c->self, c->efd); - close(c->efd); - c->efd = -1; + channel_close_fd(&c->efd); } else { buffer_consume(&c->extended, len); c->local_consumed += len; @@ -981,8 +1374,7 @@ if (len <= 0) { debug2("channel %d: closing read-efd %d", c->self, c->efd); - close(c->efd); - c->efd = -1; + channel_close_fd(&c->efd); } else { buffer_append(&c->extended, buf, len); } @@ -990,7 +1382,7 @@ } return 1; } -int +static int channel_check_window(Channel *c) { if (c->type == SSH_CHANNEL_OPEN && @@ -1010,14 +1402,14 @@ return 1; } -void +static void channel_post_open_1(Channel *c, fd_set * readset, fd_set * writeset) { channel_handle_rfd(c, readset, writeset); channel_handle_wfd(c, readset, writeset); } -void +static void channel_post_open_2(Channel *c, fd_set * readset, fd_set * writeset) { channel_handle_rfd(c, readset, writeset); @@ -1027,7 +1419,7 @@ channel_check_window(c); } -void +static void channel_post_output_drain_13(Channel *c, fd_set * readset, fd_set * writeset) { int len; @@ -1042,7 +1434,7 @@ } } -void +static void channel_handler_init_20(void) { channel_pre[SSH_CHANNEL_OPEN] = &channel_pre_open_20; @@ -1063,7 +1455,7 @@ channel_post[SSH_CHANNEL_DYNAMIC] = &channel_post_open_2; } -void +static void channel_handler_init_13(void) { channel_pre[SSH_CHANNEL_OPEN] = &channel_pre_open_13; @@ -1085,7 +1477,7 @@ channel_post[SSH_CHANNEL_DYNAMIC] = &channel_post_open_1; } -void +static void channel_handler_init_15(void) { channel_pre[SSH_CHANNEL_OPEN] = &channel_pre_open_15; @@ -1104,7 +1496,7 @@ channel_post[SSH_CHANNEL_DYNAMIC] = &channel_post_open_1; } -void +static void channel_handler_init(void) { int i; @@ -1120,7 +1512,7 @@ channel_handler_init_15(); } -void +static void channel_handler(chan_fn *ftab[], fd_set * readset, fd_set * writeset) { static int did_init = 0; @@ -1132,12 +1524,11 @@ did_init = 1; } for (i = 0; i < channels_alloc; i++) { - c = &channels[i]; - if (c->type == SSH_CHANNEL_FREE) - continue; - if (ftab[c->type] == NULL) + c = channels[i]; + if (c == NULL) continue; - (*ftab[c->type])(c, readset, writeset); + if (ftab[c->type] != NULL) + (*ftab[c->type])(c, readset, writeset); if (chan_is_dead(c)) { /* * we have to remove the fd's from the select mask @@ -1154,14 +1545,18 @@ if (c->extended_usage == CHAN_EXTENDED_WRITE) FD_CLR(c->efd, writeset); } - channel_free(c->self); + channel_free(c); } } } +/* + * Allocate/update select bitmasks and add any bits relevant to channels in + * select bitmasks. + */ void channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp, - int rekeying) + int *nallocp, int rekeying) { int n; u_int sz; @@ -1169,15 +1564,13 @@ n = MAX(*maxfdp, channel_max_fd); sz = howmany(n+1, NFDBITS) * sizeof(fd_mask); - if (*readsetp == NULL || n > *maxfdp) { - if (*readsetp) - xfree(*readsetp); - if (*writesetp) - xfree(*writesetp); - *readsetp = xmalloc(sz); - *writesetp = xmalloc(sz); - *maxfdp = n; + /* perhaps check sz < nalloc/2 and shrink? */ + if (*readsetp == NULL || sz > *nallocp) { + *readsetp = xrealloc(*readsetp, sz); + *writesetp = xrealloc(*writesetp, sz); + *nallocp = sz; } + *maxfdp = n; memset(*readsetp, 0, sz); memset(*writesetp, 0, sz); @@ -1185,12 +1578,17 @@ channel_handler(channel_pre, *readsetp, *writesetp); } +/* + * After select, perform any appropriate operations for channels which have + * events pending. + */ void channel_after_select(fd_set * readset, fd_set * writeset) { channel_handler(channel_post, readset, writeset); } + /* If there is data to send to the connection, enqueue some of it now. */ void @@ -1200,9 +1598,14 @@ Channel *c; for (i = 0; i < channels_alloc; i++) { - c = &channels[i]; + c = channels[i]; + if (c == NULL) + continue; - /* We are only interested in channels that can have buffered incoming data. */ + /* + * We are only interested in channels that can have buffered + * incoming data. + */ if (compat13) { if (c->type != SSH_CHANNEL_OPEN && c->type != SSH_CHANNEL_INPUT_DRAINING) @@ -1222,7 +1625,10 @@ if ((c->istate == CHAN_INPUT_OPEN || c->istate == CHAN_INPUT_WAIT_DRAIN) && (len = buffer_len(&c->input)) > 0) { - /* Send some data for the other side over the secure connection. */ + /* + * Send some data for the other side over the secure + * connection. + */ if (compat20) { if (len > c->remote_window) len = c->remote_window; @@ -1280,11 +1686,8 @@ } } -/* - * This is called when a packet of type CHANNEL_DATA has just been received. - * The message type has already been consumed, but channel number and data is - * still there. - */ + +/* -- protocol input */ void channel_input_data(int type, int plen, void *ctxt) @@ -1331,6 +1734,7 @@ buffer_append(&c->output, data, data_len); xfree(data); } + void channel_input_extended_data(int type, int plen, void *ctxt) { @@ -1371,36 +1775,6 @@ xfree(data); } - -/* - * Returns true if no channel has too much buffered data, and false if one or - * more channel is overfull. - */ - -int -channel_not_very_much_buffered_data() -{ - u_int i; - Channel *c; - - for (i = 0; i < channels_alloc; i++) { - c = &channels[i]; - if (c->type == SSH_CHANNEL_OPEN) { - if (!compat20 && buffer_len(&c->input) > packet_get_maxsize()) { - debug("channel %d: big input buffer %d", - c->self, buffer_len(&c->input)); - return 0; - } - if (buffer_len(&c->output) > packet_get_maxsize()) { - debug("channel %d: big output buffer %d", - c->self, buffer_len(&c->output)); - return 0; - } - } - } - return 1; -} - void channel_input_ieof(int type, int plen, void *ctxt) { @@ -1414,6 +1788,13 @@ if (c == NULL) packet_disconnect("Received ieof for nonexistent channel %d.", id); chan_rcvd_ieof(c); + + /* XXX force input close */ + if (c->force_drain) { + debug("channel %d: FORCE input drain", c->self); + c->istate = CHAN_INPUT_WAIT_DRAIN; + } + } void @@ -1479,7 +1860,7 @@ if (c->type != SSH_CHANNEL_CLOSED) packet_disconnect("Received close confirmation for " "non-closed channel %d (type %d).", id, c->type); - channel_free(c->self); + channel_free(c); } void @@ -1516,6 +1897,22 @@ } } +static char * +reason2txt(int reason) +{ + switch(reason) { + case SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED: + return "administratively prohibited"; + case SSH2_OPEN_CONNECT_FAILED: + return "connect failed"; + case SSH2_OPEN_UNKNOWN_CHANNEL_TYPE: + return "unknown channel type"; + case SSH2_OPEN_RESOURCE_SHORTAGE: + return "resource shortage"; + } + return "unknown reason"; +} + void channel_input_open_failure(int type, int plen, void *ctxt) { @@ -1534,20 +1931,20 @@ "non-opening channel %d.", id); if (compat20) { reason = packet_get_int(); - if (packet_remaining() > 0) { + if (!(datafellows & SSH_BUG_OPENFAILURE)) { msg = packet_get_string(NULL); lang = packet_get_string(NULL); } packet_done(); - log("channel_open_failure: %d: reason %d %s", id, - reason, msg ? msg : ""); + log("channel %d: open failed: %s%s%s", id, + reason2txt(reason), msg ? ": ": "", msg ? msg : ""); if (msg != NULL) xfree(msg); if (lang != NULL) xfree(lang); } /* Free the channel. This will also close the socket. */ - channel_free(id); + channel_free(c); } void @@ -1586,186 +1983,60 @@ /* Get the channel number and verify it. */ id = packet_get_int(); - c = channel_lookup(id); - - if (c == NULL || c->type != SSH_CHANNEL_OPEN) { - log("Received window adjust for " - "non-open channel %d.", id); - return; - } - adjust = packet_get_int(); - packet_done(); - debug2("channel %d: rcvd adjust %d", id, adjust); - c->remote_window += adjust; -} - -/* - * Stops listening for channels, and removes any unix domain sockets that we - * might have. - */ - -void -channel_stop_listening() -{ - int i; - for (i = 0; i < channels_alloc; i++) { - switch (channels[i].type) { - case SSH_CHANNEL_AUTH_SOCKET: - close(channels[i].sock); - unlink(channels[i].path); - channel_free(i); - break; - case SSH_CHANNEL_PORT_LISTENER: - case SSH_CHANNEL_RPORT_LISTENER: - case SSH_CHANNEL_X11_LISTENER: - close(channels[i].sock); - channel_free(i); - break; - default: - break; - } - } -} - -/* - * Closes the sockets/fds of all channels. This is used to close extra file - * descriptors after a fork. - */ - -void -channel_close_all() -{ - int i; - for (i = 0; i < channels_alloc; i++) - if (channels[i].type != SSH_CHANNEL_FREE) - channel_close_fds(&channels[i]); -} - -/* Returns true if any channel is still open. */ - -int -channel_still_open() -{ - u_int i; - for (i = 0; i < channels_alloc; i++) - switch (channels[i].type) { - case SSH_CHANNEL_FREE: - case SSH_CHANNEL_X11_LISTENER: - case SSH_CHANNEL_PORT_LISTENER: - case SSH_CHANNEL_RPORT_LISTENER: - case SSH_CHANNEL_CLOSED: - case SSH_CHANNEL_AUTH_SOCKET: - case SSH_CHANNEL_DYNAMIC: - case SSH_CHANNEL_CONNECTING: /* XXX ??? */ - continue; - case SSH_CHANNEL_LARVAL: - if (!compat20) - fatal("cannot happen: SSH_CHANNEL_LARVAL"); - continue; - case SSH_CHANNEL_OPENING: - case SSH_CHANNEL_OPEN: - case SSH_CHANNEL_X11_OPEN: - return 1; - case SSH_CHANNEL_INPUT_DRAINING: - case SSH_CHANNEL_OUTPUT_DRAINING: - if (!compat13) - fatal("cannot happen: OUT_DRAIN"); - return 1; - default: - fatal("channel_still_open: bad channel type %d", channels[i].type); - /* NOTREACHED */ - } - return 0; -} - -/* Returns the id of an open channel suitable for keepaliving */ - -int -channel_find_open() -{ - u_int i; - for (i = 0; i < channels_alloc; i++) - switch (channels[i].type) { - case SSH_CHANNEL_CLOSED: - case SSH_CHANNEL_DYNAMIC: - case SSH_CHANNEL_FREE: - case SSH_CHANNEL_X11_LISTENER: - case SSH_CHANNEL_PORT_LISTENER: - case SSH_CHANNEL_RPORT_LISTENER: - case SSH_CHANNEL_OPENING: - continue; - case SSH_CHANNEL_LARVAL: - case SSH_CHANNEL_AUTH_SOCKET: - case SSH_CHANNEL_CONNECTING: /* XXX ??? */ - case SSH_CHANNEL_OPEN: - case SSH_CHANNEL_X11_OPEN: - return i; - case SSH_CHANNEL_INPUT_DRAINING: - case SSH_CHANNEL_OUTPUT_DRAINING: - if (!compat13) - fatal("cannot happen: OUT_DRAIN"); - return i; - default: - fatal("channel_find_open: bad channel type %d", channels[i].type); - /* NOTREACHED */ - } - return -1; -} - + c = channel_lookup(id); -/* - * Returns a message describing the currently open forwarded connections, - * suitable for sending to the client. The message contains crlf pairs for - * newlines. - */ + if (c == NULL || c->type != SSH_CHANNEL_OPEN) { + log("Received window adjust for " + "non-open channel %d.", id); + return; + } + adjust = packet_get_int(); + packet_done(); + debug2("channel %d: rcvd adjust %d", id, adjust); + c->remote_window += adjust; +} -char * -channel_open_message() +void +channel_input_port_open(int type, int plen, void *ctxt) { - Buffer buffer; - int i; - char buf[512], *cp; + Channel *c = NULL; + u_short host_port; + char *host, *originator_string; + int remote_id, sock = -1; - buffer_init(&buffer); - snprintf(buf, sizeof buf, "The following connections are open:\r\n"); - buffer_append(&buffer, buf, strlen(buf)); - for (i = 0; i < channels_alloc; i++) { - Channel *c = &channels[i]; - switch (c->type) { - case SSH_CHANNEL_FREE: - case SSH_CHANNEL_X11_LISTENER: - case SSH_CHANNEL_PORT_LISTENER: - case SSH_CHANNEL_RPORT_LISTENER: - case SSH_CHANNEL_CLOSED: - case SSH_CHANNEL_AUTH_SOCKET: - continue; - case SSH_CHANNEL_LARVAL: - case SSH_CHANNEL_OPENING: - case SSH_CHANNEL_CONNECTING: - case SSH_CHANNEL_DYNAMIC: - case SSH_CHANNEL_OPEN: - case SSH_CHANNEL_X11_OPEN: - case SSH_CHANNEL_INPUT_DRAINING: - case SSH_CHANNEL_OUTPUT_DRAINING: - snprintf(buf, sizeof buf, " #%d %.300s (t%d r%d i%d/%d o%d/%d fd %d/%d)\r\n", - c->self, c->remote_name, - c->type, c->remote_id, - c->istate, buffer_len(&c->input), - c->ostate, buffer_len(&c->output), - c->rfd, c->wfd); - buffer_append(&buffer, buf, strlen(buf)); - continue; - default: - fatal("channel_open_message: bad channel type %d", c->type); - /* NOTREACHED */ + remote_id = packet_get_int(); + host = packet_get_string(NULL); + host_port = packet_get_int(); + + if (packet_get_protocol_flags() & SSH_PROTOFLAG_HOST_IN_FWD_OPEN) { + originator_string = packet_get_string(NULL); + } else { + originator_string = xstrdup("unknown (remote did not supply name)"); + } + packet_done(); + sock = channel_connect_to(host, host_port); + if (sock != -1) { + c = channel_new("connected socket", + SSH_CHANNEL_CONNECTING, sock, sock, -1, 0, 0, 0, + originator_string, 1); + if (c == NULL) { + error("channel_input_port_open: channel_new failed"); + close(sock); + } else { + c->remote_id = remote_id; } } - buffer_append(&buffer, "\0", 1); - cp = xstrdup(buffer_ptr(&buffer)); - buffer_free(&buffer); - return cp; + if (c == NULL) { + packet_start(SSH_MSG_CHANNEL_OPEN_FAILURE); + packet_put_int(remote_id); + packet_send(); + } + xfree(host); } + +/* -- tcp forwarding */ + /* * Initiate forwarding of connections to local port "port" through the secure * channel to host:port from remote side. @@ -1790,7 +2061,8 @@ const char *host_to_connect, u_short port_to_connect, int gateway_ports, int remote_fwd) { - int success, ch, sock, on = 1, ctype; + Channel *c; + int success, sock, on = 1, type; struct addrinfo hints, *ai, *aitop; char ntop[NI_MAXHOST], strport[NI_MAXSERV]; const char *host; @@ -1800,13 +2072,13 @@ if (remote_fwd) { host = listen_address; - ctype = SSH_CHANNEL_RPORT_LISTENER; + type = SSH_CHANNEL_RPORT_LISTENER; } else { host = host_to_connect; - ctype =SSH_CHANNEL_PORT_LISTENER; + type = SSH_CHANNEL_PORT_LISTENER; } - if (strlen(host) > sizeof(channels[0].path) - 1) { + if (strlen(host) > SSH_CHANNEL_PATH_LEN - 1) { error("Forward host name too long."); return success; } @@ -1867,12 +2139,17 @@ continue; } /* Allocate a channel number for the socket. */ - ch = channel_new("port listener", ctype, sock, sock, -1, + c = channel_new("port listener", type, sock, sock, -1, CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0, xstrdup("port listener"), 1); - strlcpy(channels[ch].path, host, sizeof(channels[ch].path)); - channels[ch].host_port = port_to_connect; - channels[ch].listening_port = listen_port; + if (c == NULL) { + error("channel_request_forwarding: channel_new failed"); + close(sock); + continue; + } + strlcpy(c->path, host, sizeof(c->path)); + c->host_port = port_to_connect; + c->listening_port = listen_port; success = 1; } if (success == 0) @@ -2012,7 +2289,7 @@ /* return socket to remote host, port */ -int +static int connect_to(const char *host, u_short port) { struct addrinfo hints, *ai, *aitop; @@ -2064,7 +2341,7 @@ } int -channel_connect_by_listen_adress(u_short listen_port) +channel_connect_by_listen_address(u_short listen_port) { int i; @@ -2100,56 +2377,13 @@ return connect_to(host, port); } -/* - * This is called after receiving PORT_OPEN message. This attempts to - * connect to the given host:port, and sends back CHANNEL_OPEN_CONFIRMATION - * or CHANNEL_OPEN_FAILURE. - */ - -void -channel_input_port_open(int type, int plen, void *ctxt) -{ - u_short host_port; - char *host, *originator_string; - int remote_channel, sock = -1, newch; - - remote_channel = packet_get_int(); - host = packet_get_string(NULL); - host_port = packet_get_int(); - - if (have_hostname_in_open) { - originator_string = packet_get_string(NULL); - } else { - originator_string = xstrdup("unknown (remote did not supply name)"); - } - packet_done(); - sock = channel_connect_to(host, host_port); - if (sock != -1) { - newch = channel_allocate(SSH_CHANNEL_CONNECTING, - sock, originator_string); - channels[newch].remote_id = remote_channel; - - /*XXX delay answer? */ - packet_start(SSH_MSG_CHANNEL_OPEN_CONFIRMATION); - packet_put_int(remote_channel); - packet_put_int(newch); - packet_send(); - } else { - packet_start(SSH_MSG_CHANNEL_OPEN_FAILURE); - packet_put_int(remote_channel); - packet_send(); - } - xfree(host); -} +/* -- X11 forwarding */ /* * Creates an internet domain socket for listening for X11 connections. * Returns a suitable value for the DISPLAY variable, or NULL if an error * occurs. */ - -#define NUM_SOCKS 10 - char * x11_create_display_inet(int screen_number, int x11_display_offset) { @@ -2290,8 +2524,7 @@ #define X_UNIX_PATH "/tmp/.X11-unix/X" #endif -static -int +static int connect_local_xsocket(u_int dnr) { static const char *const x_sockets[] = { @@ -2423,46 +2656,47 @@ void x11_input_open(int type, int plen, void *ctxt) { - int remote_channel, sock = 0, newch; + Channel *c = NULL; + int remote_id, sock = 0; char *remote_host; - u_int remote_len; - /* Get remote channel number. */ - remote_channel = packet_get_int(); + debug("Received X11 open request."); + + remote_id = packet_get_int(); - /* Get remote originator name. */ - if (have_hostname_in_open) { - remote_host = packet_get_string(&remote_len); - remote_len += 4; + if (packet_get_protocol_flags() & SSH_PROTOFLAG_HOST_IN_FWD_OPEN) { + remote_host = packet_get_string(NULL); } else { remote_host = xstrdup("unknown (remote did not supply name)"); - remote_len = 0; } - - debug("Received X11 open request."); - packet_integrity_check(plen, 4 + remote_len, SSH_SMSG_X11_OPEN); + packet_done(); /* Obtain a connection to the real X display. */ sock = x11_connect_display(); - if (sock == -1) { + if (sock != -1) { + /* Allocate a channel for this connection. */ + c = channel_new("connected x11 socket", + SSH_CHANNEL_X11_OPEN, sock, sock, -1, 0, 0, 0, + remote_host, 1); + if (c == NULL) { + error("x11_input_open: channel_new failed"); + close(sock); + } else { + c->remote_id = remote_id; + c->force_drain = 1; + } + } + if (c == NULL) { /* Send refusal to the remote host. */ packet_start(SSH_MSG_CHANNEL_OPEN_FAILURE); - packet_put_int(remote_channel); - packet_send(); + packet_put_int(remote_id); } else { - /* Allocate a channel for this connection. */ - newch = channel_allocate( - (x11_saved_proto == NULL) ? - SSH_CHANNEL_OPEN : SSH_CHANNEL_X11_OPEN, - sock, remote_host); - channels[newch].remote_id = remote_channel; - /* Send a confirmation to the remote host. */ packet_start(SSH_MSG_CHANNEL_OPEN_CONFIRMATION); - packet_put_int(remote_channel); - packet_put_int(newch); - packet_send(); + packet_put_int(remote_id); + packet_put_int(c->self); } + packet_send(); } /* dummy protocol handler that denies SSH-1 requests (agent/x11) */ @@ -2490,8 +2724,8 @@ /* * Requests forwarding of X11 connections, generates fake authentication * data, and enables authentication spoofing. + * This should be called in the client only. */ - void x11_request_forwarding_with_spoofing(int client_session_id, const char *proto, const char *data) @@ -2556,6 +2790,9 @@ xfree(new_data); } + +/* -- agent forwarding */ + /* Sends a message to the server to request authentication fd forwarding. */ void @@ -2575,7 +2812,7 @@ char * auth_get_socket_name() { - return channel_forwarded_auth_socket_name; + return auth_sock_name; } /* removes the agent forwarding socket */ @@ -2585,11 +2822,11 @@ { struct passwd *pw = _pw; - if (channel_forwarded_auth_socket_name) { + if (auth_sock_name) { temporarily_use_uid(pw); - unlink(channel_forwarded_auth_socket_name); - rmdir(channel_forwarded_auth_socket_dir); - channel_forwarded_auth_socket_name = NULL; + unlink(auth_sock_name); + rmdir(auth_sock_dir); + auth_sock_name = NULL; restore_uid(); } } @@ -2602,33 +2839,36 @@ int auth_input_request_forwarding(struct passwd * pw) { - int sock, newch; + Channel *nc; + int sock; struct sockaddr_un sunaddr; - if (auth_get_socket_name() != NULL) - fatal("Protocol error: authentication forwarding requested twice."); + if (auth_get_socket_name() != NULL) { + error("authentication forwarding requested twice."); + return 0; + } /* Temporarily drop privileged uid for mkdir/bind. */ temporarily_use_uid(pw); /* Allocate a buffer for the socket name, and format the name. */ - channel_forwarded_auth_socket_name = xmalloc(MAX_SOCKET_NAME); - channel_forwarded_auth_socket_dir = xmalloc(MAX_SOCKET_NAME); - strlcpy(channel_forwarded_auth_socket_dir, "/tmp/ssh-XXXXXXXX", MAX_SOCKET_NAME); + auth_sock_name = xmalloc(MAXPATHLEN); + auth_sock_dir = xmalloc(MAXPATHLEN); + strlcpy(auth_sock_dir, "/tmp/ssh-XXXXXXXX", MAXPATHLEN); /* Create private directory for socket */ - if (mkdtemp(channel_forwarded_auth_socket_dir) == NULL) { - packet_send_debug("Agent forwarding disabled: mkdtemp() failed: %.100s", - strerror(errno)); + if (mkdtemp(auth_sock_dir) == NULL) { + packet_send_debug("Agent forwarding disabled: " + "mkdtemp() failed: %.100s", strerror(errno)); restore_uid(); - xfree(channel_forwarded_auth_socket_name); - xfree(channel_forwarded_auth_socket_dir); - channel_forwarded_auth_socket_name = NULL; - channel_forwarded_auth_socket_dir = NULL; + xfree(auth_sock_name); + xfree(auth_sock_dir); + auth_sock_name = NULL; + auth_sock_dir = NULL; return 0; } - snprintf(channel_forwarded_auth_socket_name, MAX_SOCKET_NAME, "%s/agent.%d", - channel_forwarded_auth_socket_dir, (int) getpid()); + snprintf(auth_sock_name, MAXPATHLEN, "%s/agent.%d", + auth_sock_dir, (int) getpid()); /* delete agent socket on fatal() */ fatal_add_cleanup(auth_sock_cleanup_proc, pw); @@ -2641,7 +2881,7 @@ /* Bind it to the name. */ memset(&sunaddr, 0, sizeof(sunaddr)); sunaddr.sun_family = AF_UNIX; - strncpy(sunaddr.sun_path, channel_forwarded_auth_socket_name, + strncpy(sunaddr.sun_path, auth_sock_name, sizeof(sunaddr.sun_path)); if (bind(sock, (struct sockaddr *) & sunaddr, sizeof(sunaddr)) < 0) @@ -2655,13 +2895,18 @@ packet_disconnect("listen: %.100s", strerror(errno)); /* Allocate a channel for the authentication agent socket. */ - newch = channel_new("auth socket", + nc = channel_new("auth socket", SSH_CHANNEL_AUTH_SOCKET, sock, sock, -1, CHAN_X11_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT, 0, xstrdup("auth socket"), 1); - - strlcpy(channels[newch].path, channel_forwarded_auth_socket_name, - sizeof(channels[newch].path)); + if (nc == NULL) { + error("auth_input_request_forwarding: channel_new failed"); + auth_sock_cleanup_proc(pw); + fatal_remove_cleanup(auth_sock_cleanup_proc, pw); + close(sock); + return 0; + } + strlcpy(nc->path, auth_sock_name, sizeof(nc->path)); return 1; } @@ -2670,13 +2915,14 @@ void auth_input_open_request(int type, int plen, void *ctxt) { - int remch, sock, newch; - char *dummyname; + Channel *c = NULL; + int remote_id, sock; + char *name; packet_integrity_check(plen, 4, type); /* Read the remote channel number from the message. */ - remch = packet_get_int(); + remote_id = packet_get_int(); /* * Get a connection to the local authentication agent (this may again @@ -2690,129 +2936,28 @@ * because authentication forwarding is only enabled if we have an * agent. */ - if (sock < 0) { - packet_start(SSH_MSG_CHANNEL_OPEN_FAILURE); - packet_put_int(remch); - packet_send(); - return; - } - debug("Forwarding authentication connection."); - - /* - * Dummy host name. This will be freed when the channel is freed; it - * will still be valid in the packet_put_string below since the - * channel cannot yet be freed at that point. - */ - dummyname = xstrdup("authentication agent connection"); - - newch = channel_allocate(SSH_CHANNEL_OPEN, sock, dummyname); - channels[newch].remote_id = remch; - - /* Send a confirmation to the remote host. */ - packet_start(SSH_MSG_CHANNEL_OPEN_CONFIRMATION); - packet_put_int(remch); - packet_put_int(newch); - packet_send(); -} - -void -channel_start_open(int id) -{ - Channel *c = channel_lookup(id); - if (c == NULL) { - log("channel_open: %d: bad id", id); - return; - } - debug("send channel open %d", id); - packet_start(SSH2_MSG_CHANNEL_OPEN); - packet_put_cstring(c->ctype); - packet_put_int(c->self); - packet_put_int(c->local_window); - packet_put_int(c->local_maxpacket); -} -void -channel_open(int id) -{ - /* XXX REMOVE ME */ - channel_start_open(id); - packet_send(); -} -void -channel_request(int id, char *service, int wantconfirm) -{ - channel_request_start(id, service, wantconfirm); - packet_send(); - debug("channel request %d: %s", id, service) ; -} -void -channel_request_start(int id, char *service, int wantconfirm) -{ - Channel *c = channel_lookup(id); - if (c == NULL) { - log("channel_request: %d: bad id", id); - return; - } - packet_start(SSH2_MSG_CHANNEL_REQUEST); - packet_put_int(c->remote_id); - packet_put_cstring(service); - packet_put_char(wantconfirm); -} -void -channel_register_callback(int id, int mtype, channel_callback_fn *fn, void *arg) -{ - Channel *c = channel_lookup(id); - if (c == NULL) { - log("channel_register_callback: %d: bad id", id); - return; - } - c->cb_event = mtype; - c->cb_fn = fn; - c->cb_arg = arg; -} -void -channel_register_cleanup(int id, channel_callback_fn *fn) -{ - Channel *c = channel_lookup(id); - if (c == NULL) { - log("channel_register_cleanup: %d: bad id", id); - return; - } - c->dettach_user = fn; -} -void -channel_cancel_cleanup(int id) -{ - Channel *c = channel_lookup(id); - if (c == NULL) { - log("channel_cancel_cleanup: %d: bad id", id); - return; + if (sock >= 0) { + name = xstrdup("authentication agent connection"); + c = channel_new("", SSH_CHANNEL_OPEN, sock, sock, + -1, 0, 0, 0, name, 1); + if (c == NULL) { + error("auth_input_open_request: channel_new failed"); + xfree(name); + close(sock); + } else { + c->remote_id = remote_id; + c->force_drain = 1; + } } - c->dettach_user = NULL; -} -void -channel_register_filter(int id, channel_filter_fn *fn) -{ - Channel *c = channel_lookup(id); if (c == NULL) { - log("channel_register_filter: %d: bad id", id); - return; + packet_start(SSH_MSG_CHANNEL_OPEN_FAILURE); + packet_put_int(remote_id); + } else { + /* Send a confirmation to the remote host. */ + debug("Forwarding authentication connection."); + packet_start(SSH_MSG_CHANNEL_OPEN_CONFIRMATION); + packet_put_int(remote_id); + packet_put_int(c->self); } - c->input_filter = fn; -} - -void -channel_set_fds(int id, int rfd, int wfd, int efd, - int extusage, int nonblock) -{ - Channel *c = channel_lookup(id); - if (c == NULL || c->type != SSH_CHANNEL_LARVAL) - fatal("channel_activate for non-larval channel %d.", id); - channel_register_fds(c, rfd, wfd, efd, extusage, nonblock); - c->type = SSH_CHANNEL_OPEN; - /* XXX window size? */ - c->local_window = c->local_window_max = c->local_maxpacket * 2; - packet_start(SSH2_MSG_CHANNEL_WINDOW_ADJUST); - packet_put_int(c->remote_id); - packet_put_int(c->local_window); packet_send(); } diff -ru openssh-2.9p2/channels.h openssh-2.9.9p1/channels.h --- openssh-2.9p2/channels.h 2001-06-14 05:18:05.000000000 +1000 +++ openssh-2.9.9p1/channels.h 2001-09-18 15:51:14.000000000 +1000 @@ -10,7 +10,7 @@ * called by a name other than "ssh" or "Secure Shell". */ /* - * Copyright (c) 2000 Markus Friedl. All rights reserved. + * Copyright (c) 1999, 2000, 2001 Markus Friedl. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -32,15 +32,14 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* RCSID("$OpenBSD: channels.h,v 1.31 2001/04/13 22:46:53 beck Exp $"); */ +/* RCSID("$OpenBSD: channels.h,v 1.46 2001/09/17 20:52:47 markus Exp $"); */ -#ifndef CHANNELS_H -#define CHANNELS_H +#ifndef CHANNEL_H +#define CHANNEL_H #include "buffer.h" /* Definitions for channel types. */ -#define SSH_CHANNEL_FREE 0 /* This channel is free (unused). */ #define SSH_CHANNEL_X11_LISTENER 1 /* Listening for inet X11 conn. */ #define SSH_CHANNEL_PORT_LISTENER 2 /* Listening on a port. */ #define SSH_CHANNEL_OPENING 3 /* waiting for confirmation */ @@ -54,17 +53,16 @@ #define SSH_CHANNEL_RPORT_LISTENER 11 /* Listening to a R-style port */ #define SSH_CHANNEL_CONNECTING 12 #define SSH_CHANNEL_DYNAMIC 13 -#define SSH_CHANNEL_MAX_TYPE 14 +#define SSH_CHANNEL_ZOMBIE 14 /* Almost dead. */ +#define SSH_CHANNEL_MAX_TYPE 15 + +#define SSH_CHANNEL_PATH_LEN 30 -/* - * Data structure for channel data. This is iniailized in channel_allocate - * and cleared in channel_free. - */ struct Channel; typedef struct Channel Channel; -typedef void channel_callback_fn(int id, void *arg); -typedef int channel_filter_fn(struct Channel *c, char *buf, int len); +typedef void channel_callback_fn(int, void *); +typedef int channel_filter_fn(struct Channel *, char *, int); struct Channel { int type; /* channel type/state */ @@ -79,13 +77,14 @@ int efd; /* extended fd */ int sock; /* sock fd */ int isatty; /* rfd is a tty */ + int force_drain; /* force close on iEOF */ Buffer input; /* data read from socket, to be sent over * encrypted connection */ Buffer output; /* data received over encrypted connection for * send on socket */ Buffer extended; - char path[200]; /* path for unix domain sockets, or host name - * for forwards */ + char path[SSH_CHANNEL_PATH_LEN]; + /* path for unix domain sockets, or host name for forwards */ int listening_port; /* port being listened for forwards */ int host_port; /* remote port to connect for forwards */ char *remote_name; /* remote hostname */ @@ -104,7 +103,7 @@ channel_callback_fn *cb_fn; void *cb_arg; int cb_event; - channel_callback_fn *dettach_user; + channel_callback_fn *detach_user; /* filter */ channel_filter_fn *input_filter; @@ -122,193 +121,115 @@ #define CHAN_X11_WINDOW_DEFAULT (4*1024) #define CHAN_X11_PACKET_DEFAULT (CHAN_X11_WINDOW_DEFAULT/2) - -void channel_open(int id); -void channel_request(int id, char *service, int wantconfirm); -void channel_request_start(int id, char *service, int wantconfirm); -void channel_register_callback(int id, int mtype, channel_callback_fn *fn, void *arg); -void channel_register_cleanup(int id, channel_callback_fn *fn); -void channel_register_filter(int id, channel_filter_fn *fn); -void channel_cancel_cleanup(int id); -Channel *channel_lookup(int id); - +/* possible input states */ +#define CHAN_INPUT_OPEN 0x01 +#define CHAN_INPUT_WAIT_DRAIN 0x02 +#define CHAN_INPUT_WAIT_OCLOSE 0x04 +#define CHAN_INPUT_CLOSED 0x08 + +/* possible output states */ +#define CHAN_OUTPUT_OPEN 0x10 +#define CHAN_OUTPUT_WAIT_DRAIN 0x20 +#define CHAN_OUTPUT_WAIT_IEOF 0x40 +#define CHAN_OUTPUT_CLOSED 0x80 + +#define CHAN_CLOSE_SENT 0x01 +#define CHAN_CLOSE_RCVD 0x02 + +/* channel management */ + +Channel *channel_lookup(int); +Channel *channel_new(char *, int, int, int, int, int, int, int, char *, int); +void channel_set_fds(int, int, int, int, int, int); +void channel_free(Channel *); +void channel_free_all(void); +void channel_detach_all(void); +void channel_stop_listening(void); + +void channel_send_open(int); +void channel_request(int, char *, int); +void channel_request_start(int, char *, int); +void channel_register_callback(int, int mtype, channel_callback_fn *, void *); +void channel_register_cleanup(int, channel_callback_fn *); +void channel_register_filter(int, channel_filter_fn *); +void channel_cancel_cleanup(int); +int channel_close_fd(int *); + +/* protocol handler */ + +void channel_input_channel_request(int, int, void *); +void channel_input_close(int, int, void *); +void channel_input_close_confirmation(int, int, void *); +void channel_input_data(int, int, void *); +void channel_input_extended_data(int, int, void *); +void channel_input_ieof(int, int, void *); +void channel_input_oclose(int, int, void *); +void channel_input_open_confirmation(int, int, void *); +void channel_input_open_failure(int, int, void *); +void channel_input_port_open(int, int, void *); +void channel_input_window_adjust(int, int, void *); + +/* file descriptor handling (read/write) */ + +void channel_prepare_select(fd_set **, fd_set **, int *, int*, int); +void channel_after_select(fd_set *, fd_set *); +void channel_output_poll(void); + +int channel_not_very_much_buffered_data(void); +void channel_close_all(void); +void channel_free_all(void); +int channel_still_open(void); +char *channel_open_message(void); +int channel_find_open(void); + +/* channel_tcpfwd.c */ +void channel_permit_all_opens(void); +void channel_add_permitted_opens(char *, int); +void channel_clear_permitted_opens(void); +void channel_input_port_forward_request(int, int); +int channel_connect_to(const char *, u_short); +int channel_connect_by_listen_address(u_short); +void channel_request_remote_forwarding(u_short, const char *, u_short); +int channel_request_local_forwarding(u_short, const char *, u_short, int); int -channel_new(char *ctype, int type, int rfd, int wfd, int efd, - int window, int maxpack, int extended_usage, char *remote_name, - int nonblock); -void -channel_set_fds(int id, int rfd, int wfd, int efd, - int extusage, int nonblock); - -void deny_input_open(int type, int plen, void *ctxt); - -void channel_input_channel_request(int type, int plen, void *ctxt); -void channel_input_close(int type, int plen, void *ctxt); -void channel_input_close_confirmation(int type, int plen, void *ctxt); -void channel_input_data(int type, int plen, void *ctxt); -void channel_input_extended_data(int type, int plen, void *ctxt); -void channel_input_ieof(int type, int plen, void *ctxt); -void channel_input_oclose(int type, int plen, void *ctxt); -void channel_input_open_confirmation(int type, int plen, void *ctxt); -void channel_input_open_failure(int type, int plen, void *ctxt); -void channel_input_port_open(int type, int plen, void *ctxt); -void channel_input_window_adjust(int type, int plen, void *ctxt); - -/* Sets specific protocol options. */ -void channel_set_options(int hostname_in_open); - -/* - * Allocate a new channel object and set its type and socket. Remote_name - * must have been allocated with xmalloc; this will free it when the channel - * is freed. - */ -int channel_allocate(int type, int sock, char *remote_name); - -/* Free the channel and close its socket. */ -void channel_free(int channel); - -/* - * Allocate/update select bitmasks and add any bits relevant to channels in - * select bitmasks. - */ -void -channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp, - int rekeying); - -/* - * After select, perform any appropriate operations for channels which have - * events pending. - */ -void channel_after_select(fd_set * readset, fd_set * writeset); - -/* If there is data to send to the connection, send some of it now. */ -void channel_output_poll(void); - -/* Returns true if no channel has too much buffered data. */ -int channel_not_very_much_buffered_data(void); - -/* This closes any sockets that are listening for connections; this removes - any unix domain sockets. */ -void channel_stop_listening(void); - -/* - * Closes the sockets of all channels. This is used to close extra file - * descriptors after a fork. - */ -void channel_close_all(void); - -/* Returns true if there is still an open channel over the connection. */ -int channel_still_open(void); - -/* - * Returns a string containing a list of all open channels. The list is - * suitable for displaying to the user. It uses crlf instead of newlines. - * The caller should free the string with xfree. - */ -char *channel_open_message(void); - -/* - * Initiate forwarding of connections to local port "port" through the secure - * channel to host:port from remote side. - */ -int -channel_request_local_forwarding(u_short listen_port, - const char *host_to_connect, u_short port_to_connect, int gateway_ports); -int -channel_request_forwarding(const char *listen_address, u_short listen_port, - const char *host_to_connect, u_short port_to_connect, int gateway_ports, - int remote_fwd); - -/* - * Initiate forwarding of connections to port "port" on remote host through - * the secure channel to host:port from local side. This never returns if - * there was an error. This registers that open requests for that port are - * permitted. - */ -void -channel_request_remote_forwarding(u_short port, const char *host, - u_short remote_port); - -/* - * Permits opening to any host/port if permitted_opens[] is empty. This is - * usually called by the server, because the user could connect to any port - * anyway, and the server has no way to know but to trust the client anyway. - */ -void channel_permit_all_opens(void); - -/* Add host/port to list of allowed targets for port forwarding */ -void channel_add_permitted_opens(char *host, int port); - -/* Flush list */ -void channel_clear_permitted_opens(void); - -/* - * This is called after receiving CHANNEL_FORWARDING_REQUEST. This initates - * listening for the port, and sends back a success reply (or disconnect - * message if there was an error). This never returns if there was an error. - */ -void channel_input_port_forward_request(int is_root, int gateway_ports); - -/* - * Creates a port for X11 connections, and starts listening for it. Returns - * the display name, or NULL if an error was encountered. - */ -char *x11_create_display(int screen); - -/* - * Creates an internet domain socket for listening for X11 connections. - * Returns a suitable value for the DISPLAY variable, or NULL if an error - * occurs. - */ -char *x11_create_display_inet(int screen, int x11_display_offset); - -/* - * This is called when SSH_SMSG_X11_OPEN is received. The packet contains - * the remote channel number. We should do whatever we want, and respond - * with either SSH_MSG_OPEN_CONFIRMATION or SSH_MSG_OPEN_FAILURE. - */ -void x11_input_open(int type, int plen, void *ctxt); - -/* - * Requests forwarding of X11 connections. This should be called on the - * client only. - */ -void x11_request_forwarding(void); - -/* - * Requests forwarding for X11 connections, with authentication spoofing. - * This should be called in the client only. - */ -void -x11_request_forwarding_with_spoofing(int client_session_id, - const char *proto, const char *data); - -/* Sends a message to the server to request authentication fd forwarding. */ -void auth_request_forwarding(void); - -/* - * Returns the name of the forwarded authentication socket. Returns NULL if - * there is no forwarded authentication socket. The returned value points to - * a static buffer. - */ -char *auth_get_socket_name(void); - -void auth_sock_cleanup_proc(void *_pw); - -/* - * This is called to process SSH_CMSG_AGENT_REQUEST_FORWARDING on the server. - * This starts forwarding authentication requests. - */ -int auth_input_request_forwarding(struct passwd * pw); - -/* This is called to process an SSH_SMSG_AGENT_OPEN message. */ -void auth_input_open_request(int type, int plen, void *ctxt); +channel_request_forwarding(const char *, u_short, const char *, u_short, int, + int); -/* XXX */ -int channel_connect_to(const char *host, u_short host_port); -int channel_connect_by_listen_adress(u_short listen_port); -int x11_connect_display(void); +/* x11 forwarding */ -int channel_find_open(void); +int x11_connect_display(void); +char *x11_create_display(int); +char *x11_create_display_inet(int, int); +void x11_input_open(int, int, void *); +void x11_request_forwarding(void); +void x11_request_forwarding_with_spoofing(int, const char *, const char *); +void deny_input_open(int, int, void *); + +/* agent forwarding */ + +void auth_request_forwarding(void); +char *auth_get_socket_name(void); +void auth_sock_cleanup_proc(void *); +int auth_input_request_forwarding(struct passwd *); +void auth_input_open_request(int, int, void *); + +/* channel close */ + +int chan_is_dead(Channel *); +void chan_mark_dead(Channel *); +void chan_init_iostates(Channel *); +void chan_init(void); + +typedef void chan_event_fn(Channel *); + +/* for the input state */ +extern chan_event_fn *chan_rcvd_oclose; +extern chan_event_fn *chan_read_failed; +extern chan_event_fn *chan_ibuf_empty; + +/* for the output state */ +extern chan_event_fn *chan_rcvd_ieof; +extern chan_event_fn *chan_write_failed; +extern chan_event_fn *chan_obuf_empty; #endif diff -ru openssh-2.9p2/cipher.c openssh-2.9.9p1/cipher.c --- openssh-2.9p2/cipher.c 2001-02-06 05:16:28.000000000 +1100 +++ openssh-2.9.9p1/cipher.c 2001-09-14 12:47:34.000000000 +1000 @@ -11,7 +11,7 @@ * * * Copyright (c) 1999 Niels Provos. All rights reserved. - * Copyright (c) 1999,2000 Markus Friedl. All rights reserved. + * Copyright (c) 1999, 2000 Markus Friedl. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -35,7 +35,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: cipher.c,v 1.43 2001/02/04 15:32:23 stevesk Exp $"); +RCSID("$OpenBSD: cipher.c,v 1.47 2001/08/23 11:31:59 markus Exp $"); #include "xmalloc.h" #include "log.h" @@ -43,24 +43,23 @@ #include - /* no encryption */ -void +static void none_setkey(CipherContext *cc, const u_char *key, u_int keylen) { } -void +static void none_setiv(CipherContext *cc, const u_char *iv, u_int ivlen) { } -void +static void none_crypt(CipherContext *cc, u_char *dest, const u_char *src, u_int len) { memcpy(dest, src, len); } /* DES */ -void +static void des_ssh1_setkey(CipherContext *cc, const u_char *key, u_int keylen) { static int dowarn = 1; @@ -71,18 +70,18 @@ } des_set_key((void *)key, cc->u.des.key); } -void +static void des_ssh1_setiv(CipherContext *cc, const u_char *iv, u_int ivlen) { memset(cc->u.des.iv, 0, sizeof(cc->u.des.iv)); } -void +static void des_ssh1_encrypt(CipherContext *cc, u_char *dest, const u_char *src, u_int len) { des_ncbc_encrypt(src, dest, len, cc->u.des.key, &cc->u.des.iv, DES_ENCRYPT); } -void +static void des_ssh1_decrypt(CipherContext *cc, u_char *dest, const u_char *src, u_int len) { des_ncbc_encrypt(src, dest, len, cc->u.des.key, &cc->u.des.iv, @@ -90,30 +89,31 @@ } /* 3DES */ -void +static void des3_setkey(CipherContext *cc, const u_char *key, u_int keylen) { des_set_key((void *) key, cc->u.des3.key1); des_set_key((void *) (key+8), cc->u.des3.key2); des_set_key((void *) (key+16), cc->u.des3.key3); } -void +static void des3_setiv(CipherContext *cc, const u_char *iv, u_int ivlen) { + memset(cc->u.des3.iv1, 0, sizeof(cc->u.des3.iv1)); memset(cc->u.des3.iv2, 0, sizeof(cc->u.des3.iv2)); memset(cc->u.des3.iv3, 0, sizeof(cc->u.des3.iv3)); if (iv == NULL) return; memcpy(cc->u.des3.iv3, (char *)iv, 8); } -void +static void des3_cbc_encrypt(CipherContext *cc, u_char *dest, const u_char *src, u_int len) { des_ede3_cbc_encrypt(src, dest, len, cc->u.des3.key1, cc->u.des3.key2, cc->u.des3.key3, &cc->u.des3.iv3, DES_ENCRYPT); } -void +static void des3_cbc_decrypt(CipherContext *cc, u_char *dest, const u_char *src, u_int len) { des_ede3_cbc_encrypt(src, dest, len, @@ -135,7 +135,7 @@ * result of that there is no longer any known iv1 to use when * choosing the X block. */ -void +static void des3_ssh1_setkey(CipherContext *cc, const u_char *key, u_int keylen) { des_set_key((void *) key, cc->u.des3.key1); @@ -145,42 +145,36 @@ else des_set_key((void *) (key+16), cc->u.des3.key3); } -void +static void des3_ssh1_encrypt(CipherContext *cc, u_char *dest, const u_char *src, u_int len) { - des_cblock iv1; - des_cblock *iv2 = &cc->u.des3.iv2; - des_cblock *iv3 = &cc->u.des3.iv3; - - memcpy(&iv1, iv2, 8); - - des_ncbc_encrypt(src, dest, len, cc->u.des3.key1, &iv1, DES_ENCRYPT); - des_ncbc_encrypt(dest, dest, len, cc->u.des3.key2, iv2, DES_DECRYPT); - des_ncbc_encrypt(dest, dest, len, cc->u.des3.key3, iv3, DES_ENCRYPT); + des_ncbc_encrypt(src, dest, len, cc->u.des3.key1, &cc->u.des3.iv1, + DES_ENCRYPT); + des_ncbc_encrypt(dest, dest, len, cc->u.des3.key2, &cc->u.des3.iv2, + DES_DECRYPT); + des_ncbc_encrypt(dest, dest, len, cc->u.des3.key3, &cc->u.des3.iv3, + DES_ENCRYPT); } -void +static void des3_ssh1_decrypt(CipherContext *cc, u_char *dest, const u_char *src, u_int len) { - des_cblock iv1; - des_cblock *iv2 = &cc->u.des3.iv2; - des_cblock *iv3 = &cc->u.des3.iv3; - - memcpy(&iv1, iv2, 8); - - des_ncbc_encrypt(src, dest, len, cc->u.des3.key3, iv3, DES_DECRYPT); - des_ncbc_encrypt(dest, dest, len, cc->u.des3.key2, iv2, DES_ENCRYPT); - des_ncbc_encrypt(dest, dest, len, cc->u.des3.key1, &iv1, DES_DECRYPT); + des_ncbc_encrypt(src, dest, len, cc->u.des3.key3, &cc->u.des3.iv3, + DES_DECRYPT); + des_ncbc_encrypt(dest, dest, len, cc->u.des3.key2, &cc->u.des3.iv2, + DES_ENCRYPT); + des_ncbc_encrypt(dest, dest, len, cc->u.des3.key1, &cc->u.des3.iv1, + DES_DECRYPT); } /* Blowfish */ -void +static void blowfish_setkey(CipherContext *cc, const u_char *key, u_int keylen) { BF_set_key(&cc->u.bf.key, keylen, (u_char *)key); } -void +static void blowfish_setiv(CipherContext *cc, const u_char *iv, u_int ivlen) { if (iv == NULL) @@ -188,14 +182,14 @@ else memcpy(cc->u.bf.iv, (char *)iv, 8); } -void +static void blowfish_cbc_encrypt(CipherContext *cc, u_char *dest, const u_char *src, u_int len) { BF_cbc_encrypt((void *)src, dest, len, &cc->u.bf.key, cc->u.bf.iv, BF_ENCRYPT); } -void +static void blowfish_cbc_decrypt(CipherContext *cc, u_char *dest, const u_char *src, u_int len) { @@ -226,7 +220,7 @@ } } -void +static void blowfish_ssh1_encrypt(CipherContext *cc, u_char *dest, const u_char *src, u_int len) { @@ -235,7 +229,7 @@ BF_ENCRYPT); swap_bytes(dest, dest, len); } -void +static void blowfish_ssh1_decrypt(CipherContext *cc, u_char *dest, const u_char *src, u_int len) { @@ -246,37 +240,37 @@ } /* alleged rc4 */ -void +static void arcfour_setkey(CipherContext *cc, const u_char *key, u_int keylen) { RC4_set_key(&cc->u.rc4, keylen, (u_char *)key); } -void +static void arcfour_crypt(CipherContext *cc, u_char *dest, const u_char *src, u_int len) { RC4(&cc->u.rc4, len, (u_char *)src, dest); } /* CAST */ -void +static void cast_setkey(CipherContext *cc, const u_char *key, u_int keylen) { CAST_set_key(&cc->u.cast.key, keylen, (u_char *) key); } -void +static void cast_setiv(CipherContext *cc, const u_char *iv, u_int ivlen) { if (iv == NULL) fatal("no IV for %s.", cc->cipher->name); memcpy(cc->u.cast.iv, (char *)iv, 8); } -void +static void cast_cbc_encrypt(CipherContext *cc, u_char *dest, const u_char *src, u_int len) { CAST_cbc_encrypt(src, dest, len, &cc->u.cast.key, cc->u.cast.iv, CAST_ENCRYPT); } -void +static void cast_cbc_decrypt(CipherContext *cc, u_char *dest, const u_char *src, u_int len) { CAST_cbc_encrypt(src, dest, len, &cc->u.cast.key, cc->u.cast.iv, @@ -286,69 +280,68 @@ /* RIJNDAEL */ #define RIJNDAEL_BLOCKSIZE 16 -void +static void rijndael_setkey(CipherContext *cc, const u_char *key, u_int keylen) { - rijndael_set_key(&cc->u.rijndael.enc, (u4byte *)key, 8*keylen, 1); - rijndael_set_key(&cc->u.rijndael.dec, (u4byte *)key, 8*keylen, 0); + rijndael_set_key(&cc->u.rijndael.enc, (char *)key, 8*keylen, 1); + rijndael_set_key(&cc->u.rijndael.dec, (char *)key, 8*keylen, 0); } -void +static void rijndael_setiv(CipherContext *cc, const u_char *iv, u_int ivlen) { - if (iv == NULL) - fatal("no IV for %s.", cc->cipher->name); - memcpy((u_char *)cc->u.rijndael.iv, iv, RIJNDAEL_BLOCKSIZE); + if (iv == NULL || ivlen != RIJNDAEL_BLOCKSIZE) + fatal("bad/no IV for %s.", cc->cipher->name); + memcpy(cc->u.rijndael.iv, iv, RIJNDAEL_BLOCKSIZE); } -void +static void rijndael_cbc_encrypt(CipherContext *cc, u_char *dest, const u_char *src, u_int len) { rijndael_ctx *ctx = &cc->u.rijndael.enc; - u4byte *iv = cc->u.rijndael.iv; - u4byte in[4]; - u4byte *cprev, *cnow, *plain; - int i, blocks = len / RIJNDAEL_BLOCKSIZE; + u_char *iv = cc->u.rijndael.iv; + u_char in[RIJNDAEL_BLOCKSIZE]; + u_char *cprev, *cnow, *plain; + int i, j, blocks = len / RIJNDAEL_BLOCKSIZE; + if (len == 0) return; if (len % RIJNDAEL_BLOCKSIZE) fatal("rijndael_cbc_encrypt: bad len %d", len); - cnow = (u4byte*) dest; - plain = (u4byte*) src; + cnow = dest; + plain = (u_char *) src; cprev = iv; - for(i = 0; i < blocks; i++, plain+=4, cnow+=4) { - in[0] = plain[0] ^ cprev[0]; - in[1] = plain[1] ^ cprev[1]; - in[2] = plain[2] ^ cprev[2]; - in[3] = plain[3] ^ cprev[3]; + for (i = 0; i < blocks; i++, plain+=RIJNDAEL_BLOCKSIZE, + cnow+=RIJNDAEL_BLOCKSIZE) { + for (j = 0; j < RIJNDAEL_BLOCKSIZE; j++) + in[j] = plain[j] ^ cprev[j]; rijndael_encrypt(ctx, in, cnow); cprev = cnow; } memcpy(iv, cprev, RIJNDAEL_BLOCKSIZE); } - -void +static void rijndael_cbc_decrypt(CipherContext *cc, u_char *dest, const u_char *src, u_int len) { rijndael_ctx *ctx = &cc->u.rijndael.dec; - u4byte *iv = cc->u.rijndael.iv; - u4byte ivsaved[4]; - u4byte *cnow = (u4byte*) (src+len-RIJNDAEL_BLOCKSIZE); - u4byte *plain = (u4byte*) (dest+len-RIJNDAEL_BLOCKSIZE); - u4byte *ivp; - int i, blocks = len / RIJNDAEL_BLOCKSIZE; + u_char *iv = cc->u.rijndael.iv; + u_char ivsaved[RIJNDAEL_BLOCKSIZE]; + u_char *cnow = (u_char *) (src+len-RIJNDAEL_BLOCKSIZE); + u_char *plain = dest+len-RIJNDAEL_BLOCKSIZE; + u_char *ivp; + int i, j, blocks = len / RIJNDAEL_BLOCKSIZE; + if (len == 0) return; if (len % RIJNDAEL_BLOCKSIZE) fatal("rijndael_cbc_decrypt: bad len %d", len); memcpy(ivsaved, cnow, RIJNDAEL_BLOCKSIZE); - for(i = blocks; i > 0; i--, cnow-=4, plain-=4) { + for (i = blocks; i > 0; i--, cnow-=RIJNDAEL_BLOCKSIZE, + plain-=RIJNDAEL_BLOCKSIZE) { rijndael_decrypt(ctx, cnow, plain); - ivp = (i == 1) ? iv : cnow-4; - plain[0] ^= ivp[0]; - plain[1] ^= ivp[1]; - plain[2] ^= ivp[2]; - plain[3] ^= ivp[3]; + ivp = (i == 1) ? iv : cnow-RIJNDAEL_BLOCKSIZE; + for (j = 0; j < RIJNDAEL_BLOCKSIZE; j++) + plain[j] ^= ivp[j]; } memcpy(iv, ivsaved, RIJNDAEL_BLOCKSIZE); } diff -ru openssh-2.9p2/cipher.h openssh-2.9.9p1/cipher.h --- openssh-2.9p2/cipher.h 2000-12-22 12:43:59.000000000 +1100 +++ openssh-2.9.9p1/cipher.h 2001-09-14 12:47:34.000000000 +1000 @@ -32,7 +32,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* RCSID("$OpenBSD: cipher.h,v 1.25 2000/12/19 23:17:56 markus Exp $"); */ +/* RCSID("$OpenBSD: cipher.h,v 1.29 2001/08/23 11:31:59 markus Exp $"); */ #ifndef CIPHER_H #define CIPHER_H @@ -71,8 +71,9 @@ struct { des_key_schedule key1; des_key_schedule key2; - des_cblock iv2; des_key_schedule key3; + des_cblock iv1; + des_cblock iv2; des_cblock iv3; } des3; struct { @@ -84,7 +85,7 @@ u_char iv[8]; } cast; struct { - u4byte iv[4]; + u_char iv[16]; rijndael_ctx enc; rijndael_ctx dec; } rijndael; @@ -103,15 +104,16 @@ void (*decrypt)(CipherContext *, u_char *, const u_char *, u_int); }; -u_int cipher_mask_ssh1(int client); -Cipher *cipher_by_name(const char *name); -Cipher *cipher_by_number(int id); -int cipher_number(const char *name); -char *cipher_name(int id); -int ciphers_valid(const char *names); -void cipher_init(CipherContext *, Cipher *, const u_char *, u_int, const u_char *, u_int); -void cipher_encrypt(CipherContext *context, u_char *dest, const u_char *src, u_int len); -void cipher_decrypt(CipherContext *context, u_char *dest, const u_char *src, u_int len); -void cipher_set_key_string(CipherContext *context, Cipher *cipher, const char *passphrase); +u_int cipher_mask_ssh1(int); +Cipher *cipher_by_name(const char *); +Cipher *cipher_by_number(int); +int cipher_number(const char *); +char *cipher_name(int); +int ciphers_valid(const char *); +void cipher_init(CipherContext *, Cipher *, const u_char *, u_int, + const u_char *, u_int); +void cipher_encrypt(CipherContext *, u_char *, const u_char *, u_int); +void cipher_decrypt(CipherContext *, u_char *, const u_char *, u_int); +void cipher_set_key_string(CipherContext *, Cipher *, const char *); #endif /* CIPHER_H */ Only in openssh-2.9p2: cli.c Only in openssh-2.9p2: cli.h diff -ru openssh-2.9p2/clientloop.c openssh-2.9.9p1/clientloop.c --- openssh-2.9p2/clientloop.c 2001-04-20 22:50:51.000000000 +1000 +++ openssh-2.9.9p1/clientloop.c 2001-09-18 15:51:14.000000000 +1000 @@ -35,7 +35,7 @@ * * * SSH2 support added by Markus Friedl. - * Copyright (c) 1999,2000 Markus Friedl. All rights reserved. + * Copyright (c) 1999, 2000, 2001 Markus Friedl. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -59,7 +59,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: clientloop.c,v 1.65 2001/04/20 07:17:51 djm Exp $"); +RCSID("$OpenBSD: clientloop.c,v 1.82 2001/09/17 20:52:47 markus Exp $"); #include "ssh.h" #include "ssh1.h" @@ -102,6 +102,7 @@ * because this is updated in a signal handler. */ static volatile int received_window_change_signal = 0; +static volatile int received_signal = 0; /* Flag indicating whether the user\'s terminal is in non-blocking mode. */ static int in_non_blocking_mode = 0; @@ -123,7 +124,7 @@ static int need_rekeying; /* Set to non-zero if rekeying is requested. */ static int session_closed = 0; /* In SSH2: login session closed. */ -void client_init_dispatch(void); +static void client_init_dispatch(void); int session_ident = -1; /*XXX*/ @@ -131,7 +132,7 @@ /* Restores stdin to blocking mode. */ -void +static void leave_non_blocking(void) { if (in_non_blocking_mode) { @@ -143,7 +144,7 @@ /* Puts stdin terminal in non-blocking mode. */ -void +static void enter_non_blocking(void) { in_non_blocking_mode = 1; @@ -156,7 +157,7 @@ * flag indicating that the window has changed. */ -void +static void window_change_handler(int sig) { received_window_change_signal = 1; @@ -168,16 +169,11 @@ * signals must be trapped to restore terminal modes. */ -void +static void signal_handler(int sig) { - if (in_raw_mode()) - leave_raw_mode(); - if (in_non_blocking_mode) - leave_non_blocking(); - channel_stop_listening(); - packet_close(); - fatal("Killed by signal %d.", sig); + received_signal = sig; + quit_pending = 1; } /* @@ -185,7 +181,7 @@ * available resolution. */ -double +static double get_current_time(void) { struct timeval tv; @@ -199,7 +195,7 @@ * not appear to wake up when redirecting from /dev/null. */ -void +static void client_check_initial_eof_on_stdin(void) { int len; @@ -251,7 +247,7 @@ * connection. */ -void +static void client_make_packets_from_stdin_data(void) { u_int len; @@ -283,7 +279,7 @@ * appropriate. */ -void +static void client_check_window_change(void) { struct winsize ws; @@ -320,12 +316,12 @@ * one of the file descriptors). */ -void +static void client_wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, - int *maxfdp, int rekeying) + int *maxfdp, int *nallocp, int rekeying) { /* Add any selections by the channel mechanism. */ - channel_prepare_select(readsetp, writesetp, maxfdp, rekeying); + channel_prepare_select(readsetp, writesetp, maxfdp, nallocp, rekeying); if (!compat20) { /* Read from the connection, unless our buffers are full. */ @@ -346,7 +342,13 @@ if (buffer_len(&stderr_buffer) > 0) FD_SET(fileno(stderr), *writesetp); } else { - FD_SET(connection_in, *readsetp); + /* channel_prepare_select could have closed the last channel */ + if (session_closed && !channel_still_open()) { + if (!packet_have_data_to_write()) + return; + } else { + FD_SET(connection_in, *readsetp); + } } /* Select server connection if have data to write to the server. */ @@ -382,7 +384,7 @@ } } -void +static void client_suspend_self(Buffer *bin, Buffer *bout, Buffer *berr) { struct winsize oldws, newws; @@ -425,7 +427,7 @@ enter_raw_mode(); } -void +static void client_process_net_input(fd_set * readset) { int len; @@ -466,7 +468,7 @@ } /* process the characters one by one */ -int +static int process_escapes(Buffer *bin, Buffer *bout, Buffer *berr, char *buf, int len) { char string[1024]; @@ -544,7 +546,7 @@ leave_raw_mode(); /* Stop listening for new connections. */ - channel_stop_listening(); + channel_close_all(); /* proto1 only XXXX */ printf("%c& [backgrounded]\n", escape_char); @@ -566,7 +568,7 @@ "%c?\r\n\ Supported escape sequences:\r\n\ ~. - terminate connection\r\n\ -~R - Request rekey (SSH protocol 2 only)\r\n\ +~R - Request rekey (SSH protocol 2 only)\r\n\ ~^Z - suspend ssh\r\n\ ~# - list forwarded connections\r\n\ ~& - background ssh (when waiting for connections to terminate)\r\n\ @@ -616,7 +618,7 @@ return bytes; } -void +static void client_process_input(fd_set * readset) { int len; @@ -651,7 +653,7 @@ packet_start(SSH_CMSG_EOF); packet_send(); } - } else if (escape_char == -1) { + } else if (escape_char == SSH_ESCAPECHAR_NONE) { /* * Normal successful read, and no escape character. * Just append the data to buffer. @@ -669,7 +671,7 @@ } } -void +static void client_process_output(fd_set * writeset) { int len; @@ -730,7 +732,7 @@ * preparatory phase. */ -void +static void client_process_buffered_input_packets(void) { dispatch_run(DISPATCH_NONBLOCK, &quit_pending, compat20 ? xxx_kex : NULL); @@ -738,14 +740,14 @@ /* scan buf[] for '~' before sending data to the peer */ -int +static int simple_escape_filter(Channel *c, char *buf, int len) { /* XXX we assume c->extended is writeable */ return process_escapes(&c->input, &c->output, &c->extended, buf, len); } -void +static void client_channel_closed(int id, void *arg) { if (id != session_ident) @@ -759,8 +761,8 @@ /* * Implements the interactive session with the server. This is called after * the user has been authenticated, and a command has been started on the - * remote host. If escape_char != -1, it is the character used as an escape - * character for terminating or suspending the session. + * remote host. If escape_char != SSH_ESCAPECHAR_NONE, it is the character + * used as an escape character for terminating or suspending the session. */ int @@ -768,7 +770,7 @@ { fd_set *readset = NULL, *writeset = NULL; double start_time, total_time; - int max_fd = 0, len, rekeying = 0; + int max_fd = 0, max_fd2 = 0, len, rekeying = 0, nalloc = 0; char buf[100]; debug("Entering interactive session."); @@ -823,7 +825,7 @@ if (compat20) { session_ident = ssh2_chan_id; - if (escape_char != -1) + if (escape_char != SSH_ESCAPECHAR_NONE) channel_register_filter(session_ident, simple_escape_filter); if (session_ident != -1) @@ -875,8 +877,9 @@ * Wait until we have something to do (something becomes * available on one of the descriptors). */ + max_fd2 = max_fd; client_wait_until_can_do_something(&readset, &writeset, - &max_fd, rekeying); + &max_fd2, &nalloc, rekeying); if (quit_pending) break; @@ -924,8 +927,24 @@ if (have_pty) signal(SIGWINCH, SIG_DFL); - /* Stop listening for connections. */ - channel_stop_listening(); + channel_free_all(); + + if (have_pty) + leave_raw_mode(); + + /* restore blocking io */ + if (!isatty(fileno(stdin))) + unset_nonblock(fileno(stdin)); + if (!isatty(fileno(stdout))) + unset_nonblock(fileno(stdout)); + if (!isatty(fileno(stderr))) + unset_nonblock(fileno(stderr)); + + if (received_signal) { + if (in_non_blocking_mode) /* XXX */ + leave_non_blocking(); + fatal("Killed by signal %d.", received_signal); + } /* * In interactive mode (with pseudo tty) display a message indicating @@ -935,6 +954,7 @@ snprintf(buf, sizeof buf, "Connection to %.64s closed.\r\n", host); buffer_append(&stderr_buffer, buf, strlen(buf)); } + /* Output any buffered data for stdout. */ while (buffer_len(&stdout_buffer) > 0) { len = write(fileno(stdout), buffer_ptr(&stdout_buffer), @@ -959,9 +979,6 @@ stderr_bytes += len; } - if (have_pty) - leave_raw_mode(); - /* Clear and free any buffers. */ memset(buf, 0, sizeof(buf)); buffer_free(&stdin_buffer); @@ -984,7 +1001,7 @@ /*********/ -void +static void client_input_stdout_data(int type, int plen, void *ctxt) { u_int data_len; @@ -994,7 +1011,7 @@ memset(data, 0, data_len); xfree(data); } -void +static void client_input_stderr_data(int type, int plen, void *ctxt) { u_int data_len; @@ -1004,7 +1021,7 @@ memset(data, 0, data_len); xfree(data); } -void +static void client_input_exit_status(int type, int plen, void *ctxt) { packet_integrity_check(plen, 4, type); @@ -1021,13 +1038,13 @@ quit_pending = 1; } -Channel * +static Channel * client_request_forwarded_tcpip(const char *request_type, int rchan) { Channel* c = NULL; char *listen_address, *originator_address; int listen_port, originator_port; - int sock, newch; + int sock; /* Get rest of the packet */ listen_address = packet_get_string(NULL); @@ -1039,26 +1056,32 @@ debug("client_request_forwarded_tcpip: listen %s port %d, originator %s port %d", listen_address, listen_port, originator_address, originator_port); - sock = channel_connect_by_listen_adress(listen_port); - if (sock >= 0) { - newch = channel_new("forwarded-tcpip", - SSH_CHANNEL_CONNECTING, sock, sock, -1, - CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_WINDOW_DEFAULT, 0, - xstrdup(originator_address), 1); - c = channel_lookup(newch); + sock = channel_connect_by_listen_address(listen_port); + if (sock < 0) { + xfree(originator_address); + xfree(listen_address); + return NULL; + } + c = channel_new("forwarded-tcpip", + SSH_CHANNEL_CONNECTING, sock, sock, -1, + CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_WINDOW_DEFAULT, 0, + xstrdup(originator_address), 1); + if (c == NULL) { + error("client_request_forwarded_tcpip: channel_new failed"); + close(sock); } xfree(originator_address); xfree(listen_address); return c; } -Channel* +static Channel* client_request_x11(const char *request_type, int rchan) { Channel *c = NULL; char *originator; int originator_port; - int sock, newch; + int sock; if (!options.forward_x11) { error("Warning: ssh server tried X11 forwarding."); @@ -1076,23 +1099,27 @@ /* XXX check permission */ debug("client_request_x11: request from %s %d", originator, originator_port); + xfree(originator); sock = x11_connect_display(); - if (sock >= 0) { - newch = channel_new("x11", - SSH_CHANNEL_X11_OPEN, sock, sock, -1, - CHAN_TCP_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT, 0, - xstrdup("x11"), 1); - c = channel_lookup(newch); + if (sock < 0) + return NULL; + c = channel_new("x11", + SSH_CHANNEL_X11_OPEN, sock, sock, -1, + CHAN_TCP_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT, 0, + xstrdup("x11"), 1); + if (c == NULL) { + error("client_request_x11: channel_new failed"); + close(sock); } - xfree(originator); + c->force_drain = 1; return c; } -Channel* +static Channel* client_request_agent(const char *request_type, int rchan) { Channel *c = NULL; - int sock, newch; + int sock; if (!options.forward_agent) { error("Warning: ssh server tried agent forwarding."); @@ -1100,18 +1127,22 @@ return NULL; } sock = ssh_get_authentication_socket(); - if (sock >= 0) { - newch = channel_new("authentication agent connection", - SSH_CHANNEL_OPEN, sock, sock, -1, - CHAN_X11_WINDOW_DEFAULT, CHAN_TCP_WINDOW_DEFAULT, 0, - xstrdup("authentication agent connection"), 1); - c = channel_lookup(newch); + if (sock < 0) + return NULL; + c = channel_new("authentication agent connection", + SSH_CHANNEL_OPEN, sock, sock, -1, + CHAN_X11_WINDOW_DEFAULT, CHAN_TCP_WINDOW_DEFAULT, 0, + xstrdup("authentication agent connection"), 1); + if (c == NULL) { + error("client_request_agent: channel_new failed"); + close(sock); } + c->force_drain = 1; return c; } /* XXXX move to generic input handler */ -void +static void client_input_channel_open(int type, int plen, void *ctxt) { Channel *c = NULL; @@ -1142,25 +1173,28 @@ c->remote_id = rchan; c->remote_window = rwindow; c->remote_maxpacket = rmaxpack; - - packet_start(SSH2_MSG_CHANNEL_OPEN_CONFIRMATION); - packet_put_int(c->remote_id); - packet_put_int(c->self); - packet_put_int(c->local_window); - packet_put_int(c->local_maxpacket); - packet_send(); + if (c->type != SSH_CHANNEL_CONNECTING) { + packet_start(SSH2_MSG_CHANNEL_OPEN_CONFIRMATION); + packet_put_int(c->remote_id); + packet_put_int(c->self); + packet_put_int(c->local_window); + packet_put_int(c->local_maxpacket); + packet_send(); + } } else { debug("failure %s", ctype); packet_start(SSH2_MSG_CHANNEL_OPEN_FAILURE); packet_put_int(rchan); packet_put_int(SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED); - packet_put_cstring("bla bla"); - packet_put_cstring(""); + if (!(datafellows & SSH_BUG_OPENFAILURE)) { + packet_put_cstring("open failed"); + packet_put_cstring(""); + } packet_send(); } xfree(ctype); } -void +static void client_input_channel_req(int type, int plen, void *ctxt) { Channel *c = NULL; @@ -1197,7 +1231,7 @@ xfree(rtype); } -void +static void client_init_dispatch_20(void) { dispatch_init(&dispatch_protocol_error); @@ -1214,7 +1248,7 @@ /* rekeying */ dispatch_set(SSH2_MSG_KEXINIT, &kex_input_kexinit); } -void +static void client_init_dispatch_13(void) { dispatch_init(NULL); @@ -1233,14 +1267,14 @@ dispatch_set(SSH_SMSG_X11_OPEN, options.forward_x11 ? &x11_input_open : &deny_input_open); } -void +static void client_init_dispatch_15(void) { client_init_dispatch_13(); dispatch_set(SSH_MSG_CHANNEL_CLOSE, &channel_input_ieof); dispatch_set(SSH_MSG_CHANNEL_CLOSE_CONFIRMATION, & channel_input_oclose); } -void +static void client_init_dispatch(void) { if (compat20) diff -ru openssh-2.9p2/clientloop.h openssh-2.9.9p1/clientloop.h --- openssh-2.9p2/clientloop.h 2001-02-11 09:44:12.000000000 +1100 +++ openssh-2.9.9p1/clientloop.h 2001-07-04 14:46:57.000000000 +1000 @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.h,v 1.4 2001/02/06 22:43:02 markus Exp $ */ +/* $OpenBSD: clientloop.h,v 1.6 2001/06/26 17:27:23 markus Exp $ */ /* * Author: Tatu Ylonen @@ -36,4 +36,4 @@ */ /* Client side main loop for the interactive session. */ -int client_loop(int have_pty, int escape_char, int id); +int client_loop(int, int, int); diff -ru openssh-2.9p2/compat.c openssh-2.9.9p1/compat.c --- openssh-2.9p2/compat.c 2001-04-20 06:40:46.000000000 +1000 +++ openssh-2.9.9p1/compat.c 2001-09-21 09:13:50.000000000 +1000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999,2000 Markus Friedl. All rights reserved. + * Copyright (c) 1999, 2000, 2001 Markus Friedl. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: compat.c,v 1.47 2001/04/18 23:43:25 markus Exp $"); +RCSID("$OpenBSD: compat.c,v 1.53 2001/09/20 13:50:40 markus Exp $"); #ifdef HAVE_LIBPCRE # include @@ -93,15 +93,25 @@ SSH_OLD_SESSIONID|SSH_BUG_DEBUG| SSH_BUG_PKSERVICE|SSH_BUG_X11FWD| SSH_BUG_PKOK|SSH_BUG_RSASIGMD5| - SSH_BUG_HBSERVICE }, + SSH_BUG_HBSERVICE|SSH_BUG_OPENFAILURE| + SSH_BUG_DUMMYCHAN }, + { "^2\\.0\\.1[1-2]", SSH_BUG_SIGBLOB|SSH_BUG_HMAC| + SSH_OLD_SESSIONID|SSH_BUG_DEBUG| + SSH_BUG_PKSERVICE|SSH_BUG_X11FWD| + SSH_BUG_PKAUTH|SSH_BUG_PKOK| + SSH_BUG_RSASIGMD5|SSH_BUG_OPENFAILURE| + SSH_BUG_DUMMYCHAN }, { "^2\\.0\\.", SSH_BUG_SIGBLOB|SSH_BUG_HMAC| SSH_OLD_SESSIONID|SSH_BUG_DEBUG| SSH_BUG_PKSERVICE|SSH_BUG_X11FWD| SSH_BUG_PKAUTH|SSH_BUG_PKOK| + SSH_BUG_RSASIGMD5|SSH_BUG_OPENFAILURE| + SSH_BUG_DERIVEKEY|SSH_BUG_DUMMYCHAN }, + { "^2\\.[23]\\.0", SSH_BUG_HMAC|SSH_BUG_DEBUG| SSH_BUG_RSASIGMD5 }, - { "^2\\.[23]\\.0", SSH_BUG_HMAC|SSH_BUG_RSASIGMD5 }, - { "^2\\.3\\.", SSH_BUG_RSASIGMD5 }, - { "^2\\.[2-9]\\.", 0 }, + { "^2\\.3\\.", SSH_BUG_DEBUG|SSH_BUG_RSASIGMD5 }, + { "^2\\.[2-9]\\.", SSH_BUG_DEBUG }, + { "^3\\.0\\.", SSH_BUG_DEBUG }, { "^2\\.4$", SSH_OLD_SESSIONID }, /* Van Dyke */ { "^3\\.0 SecureCRT", SSH_OLD_SESSIONID }, { "^1\\.7 SecureFX", SSH_OLD_SESSIONID }, diff -ru openssh-2.9p2/compat.h openssh-2.9.9p1/compat.h --- openssh-2.9p2/compat.h 2001-04-13 09:34:35.000000000 +1000 +++ openssh-2.9.9p1/compat.h 2001-09-21 09:13:50.000000000 +1000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999 Markus Friedl. All rights reserved. + * Copyright (c) 1999, 2000, 2001 Markus Friedl. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* RCSID("$OpenBSD: compat.h,v 1.23 2001/04/12 19:15:24 markus Exp $"); */ +/* RCSID("$OpenBSD: compat.h,v 1.29 2001/09/20 13:50:40 markus Exp $"); */ #ifndef COMPAT_H #define COMPAT_H @@ -31,29 +31,33 @@ #define SSH_PROTO_1_PREFERRED 0x02 #define SSH_PROTO_2 0x04 -#define SSH_BUG_SIGBLOB 0x0001 -#define SSH_BUG_PKSERVICE 0x0002 -#define SSH_BUG_HMAC 0x0004 -#define SSH_BUG_X11FWD 0x0008 -#define SSH_OLD_SESSIONID 0x0010 -#define SSH_BUG_PKAUTH 0x0020 -#define SSH_BUG_DEBUG 0x0040 -#define SSH_BUG_BANNER 0x0080 -#define SSH_BUG_IGNOREMSG 0x0100 -#define SSH_BUG_PKOK 0x0200 -#define SSH_BUG_PASSWORDPAD 0x0400 -#define SSH_BUG_SCANNER 0x0800 -#define SSH_BUG_BIGENDIANAES 0x1000 -#define SSH_BUG_RSASIGMD5 0x2000 -#define SSH_OLD_DHGEX 0x4000 -#define SSH_BUG_NOREKEY 0x8000 -#define SSH_BUG_HBSERVICE 0x10000 +#define SSH_BUG_SIGBLOB 0x00000001 +#define SSH_BUG_PKSERVICE 0x00000002 +#define SSH_BUG_HMAC 0x00000004 +#define SSH_BUG_X11FWD 0x00000008 +#define SSH_OLD_SESSIONID 0x00000010 +#define SSH_BUG_PKAUTH 0x00000020 +#define SSH_BUG_DEBUG 0x00000040 +#define SSH_BUG_BANNER 0x00000080 +#define SSH_BUG_IGNOREMSG 0x00000100 +#define SSH_BUG_PKOK 0x00000200 +#define SSH_BUG_PASSWORDPAD 0x00000400 +#define SSH_BUG_SCANNER 0x00000800 +#define SSH_BUG_BIGENDIANAES 0x00001000 +#define SSH_BUG_RSASIGMD5 0x00002000 +#define SSH_OLD_DHGEX 0x00004000 +#define SSH_BUG_NOREKEY 0x00008000 +#define SSH_BUG_HBSERVICE 0x00010000 +#define SSH_BUG_OPENFAILURE 0x00020000 +#define SSH_BUG_DERIVEKEY 0x00040000 +#define SSH_BUG_DUMMYCHAN 0x00100000 + +void enable_compat13(void); +void enable_compat20(void); +void compat_datafellows(const char *); +int proto_spec(const char *); +char *compat_cipher_proposal(char *); -void enable_compat13(void); -void enable_compat20(void); -void compat_datafellows(const char *s); -int proto_spec(const char *spec); -char *compat_cipher_proposal(char *cipher_prop); extern int compat13; extern int compat20; extern int datafellows; diff -ru openssh-2.9p2/compress.h openssh-2.9.9p1/compress.h --- openssh-2.9p2/compress.h 2001-04-06 09:20:47.000000000 +1000 +++ openssh-2.9.9p1/compress.h 2001-07-04 14:46:57.000000000 +1000 @@ -11,39 +11,15 @@ * called by a name other than "ssh" or "Secure Shell". */ -/* RCSID("$OpenBSD: compress.h,v 1.8 2001/04/05 10:39:02 markus Exp $"); */ +/* RCSID("$OpenBSD: compress.h,v 1.10 2001/06/26 17:27:23 markus Exp $"); */ #ifndef COMPRESS_H #define COMPRESS_H -/* - * Initializes compression; level is compression level from 1 to 9 (as in - * gzip). - */ -void buffer_compress_init_send(int level); -void buffer_compress_init_recv(void); - -/* Frees any data structures allocated by buffer_compress_init. */ -void buffer_compress_uninit(void); - -/* - * Compresses the contents of input_buffer into output_buffer. All packets - * compressed using this function will form a single compressed data stream; - * however, data will be flushed at the end of every call so that each - * output_buffer can be decompressed independently (but in the appropriate - * order since they together form a single compression stream) by the - * receiver. This appends the compressed data to the output buffer. - */ -void buffer_compress(Buffer * input_buffer, Buffer * output_buffer); - -/* - * Uncompresses the contents of input_buffer into output_buffer. All packets - * uncompressed using this function will form a single compressed data - * stream; however, data will be flushed at the end of every call so that - * each output_buffer. This must be called for the same size units that the - * buffer_compress was called, and in the same order that buffers compressed - * with that. This appends the uncompressed data to the output buffer. - */ -void buffer_uncompress(Buffer * input_buffer, Buffer * output_buffer); +void buffer_compress_init_send(int); +void buffer_compress_init_recv(void); +void buffer_compress_uninit(void); +void buffer_compress(Buffer *, Buffer *); +void buffer_uncompress(Buffer *, Buffer *); #endif /* COMPRESS_H */ diff -ru openssh-2.9p2/config.h.in openssh-2.9.9p1/config.h.in --- openssh-2.9p2/config.h.in 2001-06-17 14:09:47.000000000 +1000 +++ openssh-2.9.9p1/config.h.in 2001-09-25 22:32:01.000000000 +1000 @@ -1,5 +1,5 @@ -/* config.h.in. Generated automatically from configure.in by autoheader. */ -/* $Id: acconfig.h,v 1.110.2.1 2001/05/08 20:34:32 mouring Exp $ */ +/* config.h.in. Generated from configure.in by autoheader. */ +/* $Id: acconfig.h,v 1.117 2001/09/20 19:43:41 stevesk Exp $ */ #ifndef _CONFIG_H #define _CONFIG_H @@ -8,22 +8,6 @@ /* Please make your changes there */ -/* Define if the `getpgrp' function takes no argument. */ -#undef GETPGRP_VOID - -/* Define if your struct stat has st_blksize. */ -#undef HAVE_ST_BLKSIZE - -/* Define if you have the strftime function. */ -#undef HAVE_STRFTIME - -/* Define as __inline if that's what the C compiler calls it. */ -#undef inline - -/* Define if your processor stores words with the most significant - byte first (like Motorola and SPARC, unlike Intel and VAX). */ -#undef WORDS_BIGENDIAN - /* Define to a Set Process Title type if your system is */ /* supported by bsd-setproctitle.c */ #undef SPT_TYPE @@ -42,8 +26,11 @@ /* Define if your password has a pw_class field */ #undef HAVE_PW_CLASS_IN_PASSWD -/* Define if your system's struct sockaddr_un has a sun_len member */ -#undef HAVE_SUN_LEN_IN_SOCKADDR_UN +/* Define if your password has a pw_expire field */ +#undef HAVE_PW_EXPIRE_IN_PASSWD + +/* Define if your password has a pw_change field */ +#undef HAVE_PW_CHANGE_IN_PASSWD /* Define if you system's inet_ntoa is busted (e.g. Irix gcc issue) */ #undef BROKEN_INET_NTOA @@ -114,9 +101,16 @@ /* Builtin PRNG command timeout */ #undef ENTROPY_TIMEOUT_MSEC +/* Define if you want to install preformatted manpages.*/ +#undef MANTYPE + /* Define if your ssl headers are included with #include */ #undef HAVE_OPENSSL +/* Define if you are linking against RSAref. Used only to print the right + * message at run-time. */ +#undef RSAREF + /* struct timeval */ #undef HAVE_STRUCT_TIMEVAL @@ -187,6 +181,9 @@ /* Define is libutil has login() function */ #undef HAVE_LIBUTIL_LOGIN +/* Define if you want external askpass support */ +#undef USE_EXTERNAL_ASKPASS + /* Define if libc defines __progname */ #undef HAVE___PROGNAME @@ -229,6 +226,12 @@ /* Define if you have Digital Unix Security Integration Architecture */ #undef HAVE_OSF_SIA +/* Define if you have getpwanam(3) [SunOS 4.x] */ +#undef HAVE_GETPWANAM + +/* Defined if in_systm.h needs to be included with netinet/ip.h (HPUX - ) */ +#undef NEED_IN_SYSTM_H + /* Define if you have an old version of PAM which takes only one argument */ /* to pam_strerror */ #undef HAVE_OLD_PAM @@ -247,6 +250,7 @@ #undef HAVE_UINTXX_T #undef HAVE_INT64_T #undef HAVE_U_INT64_T +#undef HAVE_U_CHAR #undef HAVE_SOCKLEN_T #undef HAVE_SIZE_T #undef HAVE_SSIZE_T @@ -314,434 +318,510 @@ /* Define in your struct dirent expects you to allocate extra space for d_name */ #undef BROKEN_ONE_BYTE_DIRENT_D_NAME -/* The number of bytes in a char. */ -#undef SIZEOF_CHAR +/* Define if your getopt(3) defines and uses optreset */ +#undef HAVE_GETOPT_OPTRESET -/* The number of bytes in a int. */ -#undef SIZEOF_INT +/* Define on *nto-qnx systems */ +#undef MISSING_NFDBITS -/* The number of bytes in a long int. */ -#undef SIZEOF_LONG_INT +/* Define on *nto-qnx systems */ +#undef MISSING_HOWMANY -/* The number of bytes in a long long int. */ -#undef SIZEOF_LONG_LONG_INT +/* Define on *nto-qnx systems */ +#undef MISSING_FD_MASK -/* The number of bytes in a short int. */ -#undef SIZEOF_SHORT_INT +/* Define if you want smartcard support */ +#undef SMARTCARD -/* Define if you have the __b64_ntop function. */ -#undef HAVE___B64_NTOP -/* Define if you have the _getpty function. */ -#undef HAVE__GETPTY +/* Define if the `getpgrp' function takes no argument. */ +#undef GETPGRP_VOID -/* Define if you have the arc4random function. */ +/* Define if you have the `arc4random' function. */ #undef HAVE_ARC4RANDOM -/* Define if you have the atexit function. */ +/* Define if you have the `atexit' function. */ #undef HAVE_ATEXIT -/* Define if you have the b64_ntop function. */ +/* Define if you have the `b64_ntop' function. */ #undef HAVE_B64_NTOP -/* Define if you have the bcopy function. */ +/* Define if you have the `bcopy' function. */ #undef HAVE_BCOPY -/* Define if you have the bindresvport_sa function. */ +/* Define if you have the `bindresvport_sa' function. */ #undef HAVE_BINDRESVPORT_SA -/* Define if you have the clock function. */ +/* Define if you have the header file. */ +#undef HAVE_BSTRING_H + +/* Define if you have the `clock' function. */ #undef HAVE_CLOCK -/* Define if you have the endutent function. */ +/* Define if you have the header file. */ +#undef HAVE_CRYPT_H + +/* Define if you have the `dirname' function. */ +#undef HAVE_DIRNAME + +/* Define if you have the header file. */ +#undef HAVE_ENDIAN_H + +/* Define if you have the `endutent' function. */ #undef HAVE_ENDUTENT -/* Define if you have the endutxent function. */ +/* Define if you have the `endutxent' function. */ #undef HAVE_ENDUTXENT -/* Define if you have the fchmod function. */ +/* Define if you have the `fchmod' function. */ #undef HAVE_FCHMOD -/* Define if you have the fchown function. */ +/* Define if you have the `fchown' function. */ #undef HAVE_FCHOWN -/* Define if you have the freeaddrinfo function. */ +/* Define if you have the header file. */ +#undef HAVE_FLOATINGPOINT_H + +/* Define if you have the `freeaddrinfo' function. */ #undef HAVE_FREEADDRINFO -/* Define if you have the futimes function. */ +/* Define if you have the `futimes' function. */ #undef HAVE_FUTIMES -/* Define if you have the gai_strerror function. */ +/* Define if you have the `gai_strerror' function. */ #undef HAVE_GAI_STRERROR -/* Define if you have the getaddrinfo function. */ +/* Define if you have the `getaddrinfo' function. */ #undef HAVE_GETADDRINFO -/* Define if you have the getcwd function. */ +/* Define if you have the `getcwd' function. */ #undef HAVE_GETCWD -/* Define if you have the getgrouplist function. */ +/* Define if you have the `getgrouplist' function. */ #undef HAVE_GETGROUPLIST -/* Define if you have the getluid function. */ +/* Define if you have the `getluid' function. */ #undef HAVE_GETLUID -/* Define if you have the getnameinfo function. */ +/* Define if you have the `getnameinfo' function. */ #undef HAVE_GETNAMEINFO -/* Define if you have the getpwanam function. */ +/* Define if you have the `getopt' function. */ +#undef HAVE_GETOPT + +/* Define if you have the header file. */ +#undef HAVE_GETOPT_H + +/* Define if you have the `getpwanam' function. */ #undef HAVE_GETPWANAM -/* Define if you have the getrlimit function. */ +/* Define if you have the `getrlimit' function. */ #undef HAVE_GETRLIMIT -/* Define if you have the getrusage function. */ +/* Define if you have the `getrusage' function. */ #undef HAVE_GETRUSAGE -/* Define if you have the gettimeofday function. */ +/* Define if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY -/* Define if you have the getttyent function. */ +/* Define if you have the `getttyent' function. */ #undef HAVE_GETTTYENT -/* Define if you have the getusershell function. */ -#undef HAVE_GETUSERSHELL - -/* Define if you have the getutent function. */ +/* Define if you have the `getutent' function. */ #undef HAVE_GETUTENT -/* Define if you have the getutid function. */ +/* Define if you have the `getutid' function. */ #undef HAVE_GETUTID -/* Define if you have the getutline function. */ +/* Define if you have the `getutline' function. */ #undef HAVE_GETUTLINE -/* Define if you have the getutxent function. */ +/* Define if you have the `getutxent' function. */ #undef HAVE_GETUTXENT -/* Define if you have the getutxid function. */ +/* Define if you have the `getutxid' function. */ #undef HAVE_GETUTXID -/* Define if you have the getutxline function. */ +/* Define if you have the `getutxline' function. */ #undef HAVE_GETUTXLINE -/* Define if you have the glob function. */ +/* Define if you have the `glob' function. */ #undef HAVE_GLOB -/* Define if you have the inet_aton function. */ +/* Define if you have the header file. */ +#undef HAVE_GLOB_H + +/* Define if you have the `inet_aton' function. */ #undef HAVE_INET_ATON -/* Define if you have the inet_ntoa function. */ +/* Define if you have the `inet_ntoa' function. */ #undef HAVE_INET_NTOA -/* Define if you have the inet_ntop function. */ +/* Define if you have the `inet_ntop' function. */ #undef HAVE_INET_NTOP -/* Define if you have the innetgr function. */ +/* Define if you have the `innetgr' function. */ #undef HAVE_INNETGR -/* Define if you have the login function. */ +/* Define if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define if you have the header file. */ +#undef HAVE_KRB_H + +/* Define if you have the header file. */ +#undef HAVE_LASTLOG_H + +/* Define if you have the `des' library (-ldes). */ +#undef HAVE_LIBDES + +/* Define if you have the `des425' library (-ldes425). */ +#undef HAVE_LIBDES425 + +/* Define if you have the `dl' library (-ldl). */ +#undef HAVE_LIBDL + +/* Define if you have the header file. */ +#undef HAVE_LIBGEN_H + +/* Define if you have the `krb' library (-lkrb). */ +#undef HAVE_LIBKRB + +/* Define if you have the `krb4' library (-lkrb4). */ +#undef HAVE_LIBKRB4 + +/* Define if you have the `nsl' library (-lnsl). */ +#undef HAVE_LIBNSL + +/* Define if you have the `pam' library (-lpam). */ +#undef HAVE_LIBPAM + +/* Define if you have the `resolv' library (-lresolv). */ +#undef HAVE_LIBRESOLV + +/* Define if you have the `sectok' library (-lsectok). */ +#undef HAVE_LIBSECTOK + +/* Define if you have the `socket' library (-lsocket). */ +#undef HAVE_LIBSOCKET + +/* Define if you have the header file. */ +#undef HAVE_LIBUTIL_H + +/* Define if you have the `z' library (-lz). */ +#undef HAVE_LIBZ + +/* Define if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define if you have the `login' function. */ #undef HAVE_LOGIN -/* Define if you have the login_getcapbool function. */ +/* Define if you have the header file. */ +#undef HAVE_LOGIN_CAP_H + +/* Define if you have the `login_getcapbool' function. */ #undef HAVE_LOGIN_GETCAPBOOL -/* Define if you have the logout function. */ +/* Define if you have the header file. */ +#undef HAVE_LOGIN_H + +/* Define if you have the `logout' function. */ #undef HAVE_LOGOUT -/* Define if you have the logwtmp function. */ +/* Define if you have the `logwtmp' function. */ #undef HAVE_LOGWTMP -/* Define if you have the md5_crypt function. */ +/* Define if you have the header file. */ +#undef HAVE_MAILLOCK_H + +/* Define if you have the `md5_crypt' function. */ #undef HAVE_MD5_CRYPT -/* Define if you have the memmove function. */ +/* Define if you have the `memmove' function. */ #undef HAVE_MEMMOVE -/* Define if you have the mkdtemp function. */ +/* Define if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define if you have the `mkdtemp' function. */ #undef HAVE_MKDTEMP -/* Define if you have the on_exit function. */ +/* Define if you have the header file. */ +#undef HAVE_NETDB_H + +/* Define if you have the header file. */ +#undef HAVE_NETGROUP_H + +/* Define if you have the header file. */ +#undef HAVE_NETINET_IN_SYSTM_H + +/* Define if you have the `on_exit' function. */ #undef HAVE_ON_EXIT -/* Define if you have the openpty function. */ +/* Define if you have the `openpty' function. */ #undef HAVE_OPENPTY -/* Define if you have the pam_getenvlist function. */ +/* Define if you have the `pam_getenvlist' function. */ #undef HAVE_PAM_GETENVLIST -/* Define if you have the pututline function. */ +/* Define if you have the header file. */ +#undef HAVE_PATHS_H + +/* Define if you have the header file. */ +#undef HAVE_POLL_H + +/* Define if you have the header file. */ +#undef HAVE_PTY_H + +/* Define if you have the `pututline' function. */ #undef HAVE_PUTUTLINE -/* Define if you have the pututxline function. */ +/* Define if you have the `pututxline' function. */ #undef HAVE_PUTUTXLINE -/* Define if you have the realpath function. */ +/* Define if you have the `readpassphrase' function. */ +#undef HAVE_READPASSPHRASE + +/* Define if you have the `realpath' function. */ #undef HAVE_REALPATH -/* Define if you have the rresvport_af function. */ +/* Define if you have the header file. */ +#undef HAVE_REGEX_H + +/* Define if you have the `rresvport_af' function. */ #undef HAVE_RRESVPORT_AF -/* Define if you have the setdtablesize function. */ +/* Define if you have the header file. */ +#undef HAVE_SECTOK_H + +/* Define if you have the header file. */ +#undef HAVE_SECURITY_PAM_APPL_H + +/* Define if you have the `setdtablesize' function. */ #undef HAVE_SETDTABLESIZE -/* Define if you have the setegid function. */ +/* Define if you have the `setegid' function. */ #undef HAVE_SETEGID -/* Define if you have the setenv function. */ +/* Define if you have the `setenv' function. */ #undef HAVE_SETENV -/* Define if you have the seteuid function. */ +/* Define if you have the `seteuid' function. */ #undef HAVE_SETEUID -/* Define if you have the setlogin function. */ +/* Define if you have the `setlogin' function. */ #undef HAVE_SETLOGIN -/* Define if you have the setluid function. */ +/* Define if you have the `setluid' function. */ #undef HAVE_SETLUID -/* Define if you have the setproctitle function. */ +/* Define if you have the `setproctitle' function. */ #undef HAVE_SETPROCTITLE -/* Define if you have the setresgid function. */ +/* Define if you have the `setresgid' function. */ #undef HAVE_SETRESGID -/* Define if you have the setreuid function. */ +/* Define if you have the `setreuid' function. */ #undef HAVE_SETREUID -/* Define if you have the setrlimit function. */ +/* Define if you have the `setrlimit' function. */ #undef HAVE_SETRLIMIT -/* Define if you have the setsid function. */ +/* Define if you have the `setsid' function. */ #undef HAVE_SETSID -/* Define if you have the setutent function. */ +/* Define if you have the `setutent' function. */ #undef HAVE_SETUTENT -/* Define if you have the setutxent function. */ +/* Define if you have the `setutxent' function. */ #undef HAVE_SETUTXENT -/* Define if you have the setvbuf function. */ +/* Define if you have the `setvbuf' function. */ #undef HAVE_SETVBUF -/* Define if you have the sigaction function. */ +/* Define if you have the header file. */ +#undef HAVE_SHADOW_H + +/* Define if you have the `sigaction' function. */ #undef HAVE_SIGACTION -/* Define if you have the sigvec function. */ +/* Define if you have the `sigvec' function. */ #undef HAVE_SIGVEC -/* Define if you have the snprintf function. */ +/* Define if you have the `snprintf' function. */ #undef HAVE_SNPRINTF -/* Define if you have the strerror function. */ -#undef HAVE_STRERROR - -/* Define if you have the strlcat function. */ -#undef HAVE_STRLCAT - -/* Define if you have the strlcpy function. */ -#undef HAVE_STRLCPY - -/* Define if you have the strmode function. */ -#undef HAVE_STRMODE - -/* Define if you have the strsep function. */ -#undef HAVE_STRSEP - -/* Define if you have the strtok_r function. */ -#undef HAVE_STRTOK_R - -/* Define if you have the sysconf function. */ -#undef HAVE_SYSCONF - -/* Define if you have the tcgetpgrp function. */ -#undef HAVE_TCGETPGRP - -/* Define if you have the time function. */ -#undef HAVE_TIME - -/* Define if you have the updwtmp function. */ -#undef HAVE_UPDWTMP - -/* Define if you have the utimes function. */ -#undef HAVE_UTIMES - -/* Define if you have the utmpname function. */ -#undef HAVE_UTMPNAME - -/* Define if you have the utmpxname function. */ -#undef HAVE_UTMPXNAME - -/* Define if you have the vhangup function. */ -#undef HAVE_VHANGUP - -/* Define if you have the vis function. */ -#undef HAVE_VIS - -/* Define if you have the vsnprintf function. */ -#undef HAVE_VSNPRINTF - -/* Define if you have the waitpid function. */ -#undef HAVE_WAITPID - -/* Define if you have the header file. */ -#undef HAVE_BSTRING_H - -/* Define if you have the header file. */ -#undef HAVE_CRYPT_H - -/* Define if you have the header file. */ -#undef HAVE_ENDIAN_H - -/* Define if you have the header file. */ -#undef HAVE_FLOATINGPOINT_H - -/* Define if you have the header file. */ -#undef HAVE_GETOPT_H - -/* Define if you have the header file. */ -#undef HAVE_GLOB_H - -/* Define if you have the header file. */ -#undef HAVE_KRB_H - -/* Define if you have the header file. */ -#undef HAVE_LASTLOG_H - -/* Define if you have the header file. */ -#undef HAVE_LIBUTIL_H +/* Define if you have the header file. */ +#undef HAVE_STDDEF_H -/* Define if you have the header file. */ -#undef HAVE_LIMITS_H +/* Define if you have the header file. */ +#undef HAVE_STDINT_H -/* Define if you have the header file. */ -#undef HAVE_LOGIN_H +/* Define if you have the header file. */ +#undef HAVE_STDLIB_H -/* Define if you have the header file. */ -#undef HAVE_LOGIN_CAP_H - -/* Define if you have the header file. */ -#undef HAVE_MAILLOCK_H +/* Define if you have the `strerror' function. */ +#undef HAVE_STRERROR -/* Define if you have the header file. */ -#undef HAVE_NETDB_H +/* Define if you have the `strftime' function. */ +#undef HAVE_STRFTIME -/* Define if you have the header file. */ -#undef HAVE_NETGROUP_H +/* Define if you have the header file. */ +#undef HAVE_STRINGS_H -/* Define if you have the header file. */ -#undef HAVE_NETINET_IN_SYSTM_H +/* Define if you have the header file. */ +#undef HAVE_STRING_H -/* Define if you have the header file. */ -#undef HAVE_PATHS_H +/* Define if you have the `strlcat' function. */ +#undef HAVE_STRLCAT -/* Define if you have the header file. */ -#undef HAVE_POLL_H +/* Define if you have the `strlcpy' function. */ +#undef HAVE_STRLCPY -/* Define if you have the header file. */ -#undef HAVE_PTY_H +/* Define if you have the `strmode' function. */ +#undef HAVE_STRMODE -/* Define if you have the header file. */ -#undef HAVE_REGEX_H +/* Define if you have the `strsep' function. */ +#undef HAVE_STRSEP -/* Define if you have the header file. */ -#undef HAVE_SECURITY_PAM_APPL_H +/* Define if `st_blksize' is member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_BLKSIZE -/* Define if you have the header file. */ -#undef HAVE_SHADOW_H +/* Define if your `struct stat' has `st_blksize'. Deprecated, use + `HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */ +#undef HAVE_ST_BLKSIZE -/* Define if you have the header file. */ -#undef HAVE_STDDEF_H +/* Define if you have the `sysconf' function. */ +#undef HAVE_SYSCONF -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_BITYPES_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_BSDTTY_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_CDEFS_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_POLL_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_QUEUE_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_SELECT_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_STAT_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_STROPTS_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_SYSMACROS_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_TIME_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_SYS_TTCOMPAT_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define if you have the header file. */ #undef HAVE_SYS_UN_H -/* Define if you have the header file. */ +/* Define if you have the `tcgetpgrp' function. */ +#undef HAVE_TCGETPGRP + +/* Define if you have the `time' function. */ +#undef HAVE_TIME + +/* Define if you have the header file. */ #undef HAVE_TIME_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_TTYENT_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define if you have the `updwtmp' function. */ +#undef HAVE_UPDWTMP + +/* Define if you have the header file. */ #undef HAVE_USERSEC_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_UTIL_H -/* Define if you have the header file. */ +/* Define if you have the `utimes' function. */ +#undef HAVE_UTIMES + +/* Define if you have the header file. */ #undef HAVE_UTIME_H -/* Define if you have the header file. */ -#undef HAVE_UTMP_H +/* Define if you have the `utmpname' function. */ +#undef HAVE_UTMPNAME + +/* Define if you have the `utmpxname' function. */ +#undef HAVE_UTMPXNAME -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_UTMPX_H -/* Define if you have the header file. */ -#undef HAVE_VIS_H +/* Define if you have the header file. */ +#undef HAVE_UTMP_H -/* Define if you have the des library (-ldes). */ -#undef HAVE_LIBDES +/* Define if you have the `vhangup' function. */ +#undef HAVE_VHANGUP -/* Define if you have the des425 library (-ldes425). */ -#undef HAVE_LIBDES425 +/* Define if you have the `vsnprintf' function. */ +#undef HAVE_VSNPRINTF -/* Define if you have the dl library (-ldl). */ -#undef HAVE_LIBDL +/* Define if you have the `waitpid' function. */ +#undef HAVE_WAITPID -/* Define if you have the krb library (-lkrb). */ -#undef HAVE_LIBKRB +/* Define if you have the `_getpty' function. */ +#undef HAVE__GETPTY -/* Define if you have the krb4 library (-lkrb4). */ -#undef HAVE_LIBKRB4 +/* Define if you have the `__b64_ntop' function. */ +#undef HAVE___B64_NTOP -/* Define if you have the nsl library (-lnsl). */ -#undef HAVE_LIBNSL +/* The size of a `char', as computed by sizeof. */ +#undef SIZEOF_CHAR -/* Define if you have the pam library (-lpam). */ -#undef HAVE_LIBPAM +/* The size of a `int', as computed by sizeof. */ +#undef SIZEOF_INT -/* Define if you have the resolv library (-lresolv). */ -#undef HAVE_LIBRESOLV +/* The size of a `long int', as computed by sizeof. */ +#undef SIZEOF_LONG_INT -/* Define if you have the socket library (-lsocket). */ -#undef HAVE_LIBSOCKET +/* The size of a `long long int', as computed by sizeof. */ +#undef SIZEOF_LONG_LONG_INT -/* Define if you have the z library (-lz). */ -#undef HAVE_LIBZ +/* The size of a `short int', as computed by sizeof. */ +#undef SIZEOF_SHORT_INT + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define if your processor stores words with the most significant byte first + (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Define for large files, on AIX-style hosts. */ +#undef _LARGE_FILES + +/* Define as `__inline' if that's what the C compiler calls it, or to nothing + if it is not supported. */ +#undef inline /* ******************* Shouldn't need to edit below this line ************** */ diff -ru openssh-2.9p2/configure openssh-2.9.9p1/configure --- openssh-2.9p2/configure 2001-06-17 14:09:50.000000000 +1000 +++ openssh-2.9.9p1/configure 2001-09-25 22:32:00.000000000 +1000 @@ -1,101 +1,159 @@ #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Generated by Autoconf 2.52d. # +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -# Defaults: -ac_help= +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Name of the executable. +as_me=`echo "$0" |sed 's,.*[\\/],,'` + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +as_executable_p="test -f" + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +# NLS nuisances. +$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } +$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } +$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } +$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } +$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } +$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } +$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } +$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_help="$ac_help - --with-osfsia Enable Digital Unix SIA" -ac_help="$ac_help - --with-cflags Specify additional flags to pass to compiler" -ac_help="$ac_help - --with-cppflags Specify additional flags to pass to preprocessor " -ac_help="$ac_help - --with-ldflags Specify additional flags to pass to linker" -ac_help="$ac_help - --with-libs Specify additional libraries to link with" -ac_help="$ac_help - --with-pcre Override built in regex library with pcre" -ac_help="$ac_help - --with-skey=PATH Enable S/Key support" -ac_help="$ac_help - --with-tcp-wrappers Enable tcpwrappers support" -ac_help="$ac_help - --with-pam Enable PAM support " -ac_help="$ac_help - --with-ssl-dir=PATH Specify path to OpenSSL installation " -ac_help="$ac_help - --with-kerberos4=PATH Enable Kerberos 4 support" -ac_help="$ac_help - --with-afs=PATH Enable AFS support" -ac_help="$ac_help - --with-rsh=PATH Specify path to remote shell program " -ac_help="$ac_help - --with-xauth=PATH Specify path to xauth program " -ac_help="$ac_help - --with-random=FILE read entropy from FILE (default=/dev/urandom)" -ac_help="$ac_help - --with-prngd-port=PORT read entropy from PRNGD/EGD localhost:PORT" -ac_help="$ac_help - --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)" -ac_help="$ac_help - --with-mantype=man|cat|doc Set man page type" -ac_help="$ac_help - --with-md5-passwords Enable use of MD5 passwords" -ac_help="$ac_help - --without-shadow Disable shadow password support" -ac_help="$ac_help - --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY" -ac_help="$ac_help - --with-default-path=PATH Specify default \$PATH environment for server" -ac_help="$ac_help - --with-ipv4-default Use IPv4 by connections unless '-6' specified" -ac_help="$ac_help - --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses" -ac_help="$ac_help - --with-bsd-auth Enable BSD auth support" -ac_help="$ac_help - --enable-suid-ssh Install ssh as suid root (default) - --disable-suid-ssh Install ssh without suid bit" -ac_help="$ac_help - --with-pid-dir=PATH Specify location of ssh.pid file" -ac_help="$ac_help - --disable-lastlog disable use of lastlog even if detected [no]" -ac_help="$ac_help - --disable-utmp disable use of utmp even if detected [no]" -ac_help="$ac_help - --disable-utmpx disable use of utmpx even if detected [no]" -ac_help="$ac_help - --disable-wtmp disable use of wtmp even if detected [no]" -ac_help="$ac_help - --disable-wtmpx disable use of wtmpx even if detected [no]" -ac_help="$ac_help - --disable-libutil disable use of libutil (login() etc.) [no]" -ac_help="$ac_help - --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]" -ac_help="$ac_help - --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]" -ac_help="$ac_help - --with-lastlog=FILE|DIR specify lastlog location [common locations]" -ac_help="$ac_help - --with-entropy-timeout Specify entropy gathering command timeout (msec)" +cross_compiling=no +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +ac_unique_file="ssh.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" # Initialize some variables set by options. +ac_init_help= +ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. -build=NONE -cache_file=./config.cache +cache_file=/dev/null exec_prefix=NONE -host=NONE no_create= -nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE @@ -104,10 +162,15 @@ silent= site= srcdir= -target=NONE verbose= x_includes=NONE x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' @@ -121,17 +184,16 @@ infodir='${prefix}/info' mandir='${prefix}/man' -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= ac_prev= for ac_option do - # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" @@ -139,59 +201,59 @@ continue fi - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case "$ac_option" in + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; + bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) - ac_prev=build ;; + ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; + build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) - datadir="$ac_optarg" ;; + datadir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "enable_${ac_feature}='$ac_optarg'" ;; + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -200,95 +262,47 @@ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; + exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; -host | --host | --hos | --ho) - ac_prev=host ;; + ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; + host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; + includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; + infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; + libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; + libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ @@ -297,12 +311,12 @@ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; + localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; + mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. @@ -323,26 +337,26 @@ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; + oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; + prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; + program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; + program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ @@ -359,7 +373,7 @@ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; + program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) @@ -369,7 +383,7 @@ ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; + sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ @@ -380,58 +394,57 @@ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; + sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; + site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; + srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; + sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; + ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; + target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "with_${ac_package}='$ac_optarg'" ;; + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -442,98 +455,98 @@ ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; + x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; + x_libraries=$ac_optarg ;; - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } fi -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac done -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: should be removed in autoconf 3.0. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=ssh.c +test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then @@ -544,13 +557,365 @@ fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } fi fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-largefile omit support for large files + --enable-suid-ssh Install ssh as suid root (default) + --disable-suid-ssh Install ssh without suid bit + --disable-lastlog disable use of lastlog even if detected no + --disable-utmp disable use of utmp even if detected no + --disable-utmpx disable use of utmpx even if detected no + --disable-wtmp disable use of wtmp even if detected no + --disable-wtmpx disable use of wtmpx even if detected no + --disable-libutil disable use of libutil (login() etc.) no + --disable-pututline disable use of pututline() etc. (uwtmp) no + --disable-pututxline disable use of pututxline() etc. (uwtmpx) no + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-osfsia Enable Digital Unix SIA + --with-cflags Specify additional flags to pass to compiler + --with-cppflags Specify additional flags to pass to preprocessor + --with-ldflags Specify additional flags to pass to linker + --with-libs Specify additional libraries to link with + --with-pcre Override built in regex library with pcre + --with-skey=PATH Enable S/Key support + --with-tcp-wrappers Enable tcpwrappers support + --with-pam Enable PAM support + --with-ssl-dir=PATH Specify path to OpenSSL installation + --with-smartcard Enable smartcard support + --with-kerberos4=PATH Enable Kerberos 4 support + --with-afs=PATH Enable AFS support + --with-rsh=PATH Specify path to remote shell program + --with-xauth=PATH Specify path to xauth program + --with-random=FILE read entropy from FILE (default=/dev/urandom) + --with-prngd-port=PORT read entropy from PRNGD/EGD localhost:PORT + --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool) + --with-mantype=man|cat|doc Set man page type + --with-md5-passwords Enable use of MD5 passwords + --without-shadow Disable shadow password support + --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY + --with-default-path=PATH Specify default \$PATH environment for server + --with-ipv4-default Use IPv4 by connections unless '-6' specified + --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses + --with-bsd-auth Enable BSD auth support + --with-pid-dir=PATH Specify location of ssh.pid file + --with-lastlog=FILE|DIR specify lastlog location common locations + --with-entropy-timeout Specify entropy gathering command timeout (msec) + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + cd $ac_dir + if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\./,,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.52d. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +PATH = $PATH + +_ASUNAME +} >&5 + +cat >&5 <<_ACEOF +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell meta-characters. +ac_configure_args= +ac_sep= +for ac_arg +do + case $ac_arg in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + ac_sep=" " ;; + *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg" + ac_sep=" " ;; + esac + # Get rid of the leading space. +done + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h +# Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then @@ -561,264 +926,841 @@ fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" + { echo "$as_me:929: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:940: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi else - echo "creating cache $cache_file" - > $cache_file + { echo "$as_me:948: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:964: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:968: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:974: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:976: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:978: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. It doesn't matter if + # we pass some twice (in addition to the command line arguments). + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val" + ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:997: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:999: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } fi ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac +echo "#! $SHELL" >conftest.sh +echo "exit 0" >>conftest.sh +chmod +x conftest.sh +if { (echo "$as_me:1019: PATH=\".;.\"; conftest.sh") >&5 + (PATH=".;."; conftest.sh) 2>&5 + ac_status=$? + echo "$as_me:1022: \$? = $ac_status" >&5 + (exit $ac_status); }; then + ac_path_separator=';' else - ac_n= ac_c='\c' ac_t= + ac_path_separator=: fi +PATH_SEPARATOR="$ac_path_separator" +rm -f conftest.sh +ac_config_headers="$ac_config_headers config.h" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:1041: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_CC="${ac_tool_prefix}gcc" +echo "$as_me:1056: found $ac_dir/$ac_word" >&5 +break +done +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:1064: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:1067: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -# Extract the first word of "gcc", so it can be a program name with args. +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:605: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:1076: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_CC="gcc" +echo "$as_me:1091: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:1099: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:1102: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:1115: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_CC="${ac_tool_prefix}cc" +echo "$as_me:1130: found $ac_dir/$ac_word" >&5 +break +done + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:1138: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:1141: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:1150: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_CC="cc" +echo "$as_me:1165: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:1173: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:1176: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC else - echo "$ac_t""no" 1>&6 + CC="$ac_cv_prog_CC" fi +fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:635: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:1189: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue +fi +ac_cv_prog_CC="cc" +echo "$as_me:1209: found $ac_dir/$ac_word" >&5 +break +done + if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift - if test $# -gt 0; then + if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - set dummy "$ac_dir/$ac_word" "$@" + set dummy "$ac_dir/$ac_word" ${1+"$@"} shift ac_cv_prog_CC="$@" fi fi fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:1231: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:1234: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:686: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:1245: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_CC="$ac_tool_prefix$ac_prog" +echo "$as_me:1260: found $ac_dir/$ac_word" >&5 +break +done + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:1268: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 -fi - ;; - esac - fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + echo "$as_me:1271: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:718: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext << EOF - -#line 729 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no + test -n "$CC" && break + done fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:1284: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_CC="$ac_prog" +echo "$as_me:1299: found $ac_dir/$ac_word" >&5 +break +done -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:760: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:765: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:1307: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:1310: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + test -n "$ac_ct_CC" && break +done -if test $ac_cv_prog_gcc = yes; then - GCC=yes -else - GCC= + CC=$ac_ct_CC fi -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:793: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no fi -rm -f conftest* -fi +test -z "$CC" && { { echo "$as_me:1322: error: no acceptable cc found in \$PATH" >&5 +echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:1327:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:1330: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:1333: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:1335: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:1338: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:1340: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:1343: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +#line 1347 "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:1369: checking for C compiler default output" >&5 +echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:1372: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:1375: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. +for ac_file in `ls a.exe conftest.exe 2>/dev/null; + ls a.out conftest 2>/dev/null; + ls a.* conftest.* 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;; + a.out ) # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool --akim. + export ac_cv_exeext + break;; + * ) break;; + esac +done else - if test "$GCC" = yes; then - CFLAGS="-O2" + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +{ { echo "$as_me:1398: error: C compiler cannot create executables" >&5 +echo "$as_me: error: C compiler cannot create executables" >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:1404: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:1409: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:1415: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1418: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no else - CFLAGS= + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:1425: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'." >&2;} + { (exit 1); exit 1; }; } + fi fi fi +echo "$as_me:1433: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:1440: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:1442: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:1445: checking for executable suffix" >&5 +echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 +if { (eval echo "$as_me:1447: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:1450: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:1466: error: cannot compute EXEEXT: cannot compile and link" >&5 +echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:1472: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:1478: checking for object suffix" >&5 +echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 1484 "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:1502: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1505: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +{ { echo "$as_me:1517: error: cannot compute OBJEXT: cannot compile" >&5 +echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:1524: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:1528: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 1534 "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1555: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1558: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1561: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1564: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_compiler_gnu=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:1576: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:1582: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 1588 "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1606: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1609: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1612: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1615: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_prog_cc_g=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:1625: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1652: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1655: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1658: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1661: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line 1673 "configure" +#include "confdefs.h" +#include +$ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1692: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1695: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1698: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1701: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line 1711 "configure" +#include "confdefs.h" +$ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1729: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1732: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1735: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1738: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do @@ -830,99 +1772,222 @@ ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break fi done if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - + { { echo "$as_me:1782: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { (exit 1); exit 1; }; } +fi +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:850: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - -echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:871: checking whether byte ordering is bigendian" >&5 -if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_c_bigendian=unknown -# See if sys/param.h defines the BYTE_ORDER macro. -cat > conftest.$ac_ext </dev/null 2>&1 || + { { echo "$as_me:1792: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:1796: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:1805: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:1809: error: $ac_config_sub $ac_cv_build_alias failed." >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:1814: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +echo "$as_me:1821: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:1830: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:1835: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +echo "$as_me:1842: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF +#line 1849 "configure" #include "confdefs.h" #include #include -int main() { +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif -; return 0; } -EOF -if { (eval echo configure:889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1872: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1875: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1878: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1881: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then # It does; now see whether it defined to BIG_ENDIAN or not. -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 1885 "configure" #include "confdefs.h" #include #include -int main() { +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ #if BYTE_ORDER != BIG_ENDIAN not big endian #endif -; return 0; } -EOF -if { (eval echo configure:904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1908: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1911: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1914: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1917: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_bigendian=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_bigendian=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_c_bigendian=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +# It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianess by grep'ing values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF +#line 1934 "configure" +#include "confdefs.h" +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + _ascii (); _ebcdic (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1957: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1960: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1963: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1966: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi fi -rm -f conftest* else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi -rm -f conftest* -if test $ac_cv_c_bigendian = unknown; then -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +rm -f conftest.$ac_objext conftest.$ac_ext else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 1986 "configure" #include "confdefs.h" -main () { +int +main () +{ /* Are we little or big endian? From Harbison&Steele. */ union { @@ -932,140 +1997,322 @@ u.l = 1; exit (u.c[sizeof (long) - 1] == 1); } -EOF -if { (eval echo configure:937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:2002: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:2005: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:2007: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2010: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_bigendian=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_bigendian=yes + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_c_bigendian=yes fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi +rm -f conftest.$ac_objext conftest.$ac_ext fi +echo "$as_me:2024: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +case $ac_cv_c_bigendian in + yes) -echo "$ac_t""$ac_cv_c_bigendian" 1>&6 -if test $ac_cv_c_bigendian = yes; then - cat >> confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define WORDS_BIGENDIAN 1 -EOF - -fi - +_ACEOF + ;; + no) + ;; + *) + { { echo "$as_me:2036: error: unknown endianess +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianess +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; +esac # Checks for programs. -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:963: checking how to run the C preprocessor" >&5 +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:2049: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 2070 "configure" #include "confdefs.h" #include -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then + Syntax error +_ACEOF +if { (eval echo "$as_me:2075: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2081: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line 2104 "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:2108: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2114: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext <&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line 2161 "configure" #include "confdefs.h" #include -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then + Syntax error +_ACEOF +if { (eval echo "$as_me:2166: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2172: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* + # Broken: fails on valid input. +continue fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line 2195 "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:2199: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2205: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + # Passes both tests. +ac_preproc_ok=: +break fi - CPP="$ac_cv_prog_CPP" +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : else - ac_cv_prog_CPP="$CPP" + { { echo "$as_me:2233: error: C preprocessor \"$CPP\" fails sanity check" >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} + { (exit 1); exit 1; }; } fi -echo "$ac_t""$CPP" 1>&6 -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1045: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +echo "$as_me:2247: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" +echo "$as_me:2262: found $ac_dir/$ac_word" >&5 +break +done + fi fi -RANLIB="$ac_cv_prog_RANLIB" +RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 + echo "$as_me:2270: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:2273: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo "$as_me:2282: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_RANLIB="ranlib" +echo "$as_me:2297: found $ac_dir/$ac_word" >&5 +break +done + + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:2306: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 +else + echo "$as_me:2309: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + RANLIB=$ac_ct_RANLIB else - echo "$ac_t""no" 1>&6 + RANLIB="$ac_cv_prog_RANLIB" fi # Find a good install program. We prefer a C program (faster), @@ -1075,31 +2322,39 @@ # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1084: checking for a BSD compatible install" >&5 +echo "$as_me:2330: checking for a BSD compatible install" >&5 +echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + ac_save_IFS=$IFS; IFS=$ac_path_separator for ac_dir in $PATH; do + IFS=$ac_save_IFS # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + case $ac_dir/ in + / | ./ | .// | /cC/* \ + | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \ + | /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then + if $as_executable_p "$ac_dir/$ac_prog"; then if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : + elif test $ac_prog = install && + grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 @@ -1109,339 +2364,668 @@ ;; esac done - IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" + INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. - INSTALL="$ac_install_sh" + INSTALL=$ac_install_sh fi fi -echo "$ac_t""$INSTALL" 1>&6 +echo "$as_me:2379: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1139: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:2392: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$AR" in - /*) + case $AR in + [\\/]* | ?:[\\/]*) ac_cv_path_AR="$AR" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_AR="$AR" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_AR="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_AR="$ac_dir/$ac_word" + echo "$as_me:2409: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -AR="$ac_cv_path_AR" +AR=$ac_cv_path_AR + if test -n "$AR"; then - echo "$ac_t""$AR" 1>&6 + echo "$as_me:2420: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:2423: result: no" >&5 +echo "${ECHO_T}no" >&6 fi for ac_prog in perl5 perl do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1176: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:2431: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PERL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$PERL" in - /*) + case $PERL in + [\\/]* | ?:[\\/]*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PERL="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_PERL="$ac_dir/$ac_word" + echo "$as_me:2448: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -PERL="$ac_cv_path_PERL" +PERL=$ac_cv_path_PERL + if test -n "$PERL"; then - echo "$ac_t""$PERL" 1>&6 + echo "$as_me:2459: result: $PERL" >&5 +echo "${ECHO_T}$PERL" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:2462: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -test -n "$PERL" && break + test -n "$PERL" && break done - # Extract the first word of "ent", so it can be a program name with args. set dummy ent; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1215: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_ENT'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:2471: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_ENT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$ENT" in - /*) + case $ENT in + [\\/]* | ?:[\\/]*) ac_cv_path_ENT="$ENT" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_ENT="$ENT" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_ENT="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_ENT="$ac_dir/$ac_word" + echo "$as_me:2488: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -ENT="$ac_cv_path_ENT" +ENT=$ac_cv_path_ENT + if test -n "$ENT"; then - echo "$ac_t""$ENT" 1>&6 + echo "$as_me:2499: result: $ENT" >&5 +echo "${ECHO_T}$ENT" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:2502: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - for ac_prog in filepriv do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1253: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_FILEPRIV'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:2510: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_FILEPRIV+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$FILEPRIV" in - /*) + case $FILEPRIV in + [\\/]* | ?:[\\/]*) ac_cv_path_FILEPRIV="$FILEPRIV" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_FILEPRIV="$FILEPRIV" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="/sbin:/usr/sbin" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_FILEPRIV="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="/sbin:/usr/sbin" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_FILEPRIV="$ac_dir/$ac_word" + echo "$as_me:2527: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -FILEPRIV="$ac_cv_path_FILEPRIV" +FILEPRIV=$ac_cv_path_FILEPRIV + if test -n "$FILEPRIV"; then - echo "$ac_t""$FILEPRIV" 1>&6 + echo "$as_me:2538: result: $FILEPRIV" >&5 +echo "${ECHO_T}$FILEPRIV" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:2541: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -test -n "$FILEPRIV" && break + test -n "$FILEPRIV" && break done test -n "$FILEPRIV" || FILEPRIV="true" # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1292: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_TEST_MINUS_S_SH'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:2551: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$TEST_MINUS_S_SH" in - /*) + case $TEST_MINUS_S_SH in + [\\/]* | ?:[\\/]*) ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_TEST_MINUS_S_SH="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_TEST_MINUS_S_SH="$ac_dir/$ac_word" + echo "$as_me:2568: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -TEST_MINUS_S_SH="$ac_cv_path_TEST_MINUS_S_SH" +TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH + if test -n "$TEST_MINUS_S_SH"; then - echo "$ac_t""$TEST_MINUS_S_SH" 1>&6 + echo "$as_me:2579: result: $TEST_MINUS_S_SH" >&5 +echo "${ECHO_T}$TEST_MINUS_S_SH" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:2582: result: no" >&5 +echo "${ECHO_T}no" >&6 fi # Extract the first word of "ksh", so it can be a program name with args. set dummy ksh; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1327: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_TEST_MINUS_S_SH'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:2588: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$TEST_MINUS_S_SH" in - /*) + case $TEST_MINUS_S_SH in + [\\/]* | ?:[\\/]*) ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_TEST_MINUS_S_SH="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_TEST_MINUS_S_SH="$ac_dir/$ac_word" + echo "$as_me:2605: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -TEST_MINUS_S_SH="$ac_cv_path_TEST_MINUS_S_SH" +TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH + if test -n "$TEST_MINUS_S_SH"; then - echo "$ac_t""$TEST_MINUS_S_SH" 1>&6 + echo "$as_me:2616: result: $TEST_MINUS_S_SH" >&5 +echo "${ECHO_T}$TEST_MINUS_S_SH" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:2619: result: no" >&5 +echo "${ECHO_T}no" >&6 fi # Extract the first word of "sh", so it can be a program name with args. set dummy sh; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1362: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_TEST_MINUS_S_SH'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:2625: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$TEST_MINUS_S_SH" in - /*) + case $TEST_MINUS_S_SH in + [\\/]* | ?:[\\/]*) ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_TEST_MINUS_S_SH="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_TEST_MINUS_S_SH="$ac_dir/$ac_word" + echo "$as_me:2642: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -TEST_MINUS_S_SH="$ac_cv_path_TEST_MINUS_S_SH" +TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH + if test -n "$TEST_MINUS_S_SH"; then - echo "$ac_t""$TEST_MINUS_S_SH" 1>&6 + echo "$as_me:2653: result: $TEST_MINUS_S_SH" >&5 +echo "${ECHO_T}$TEST_MINUS_S_SH" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:2656: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +# System features +# Check whether --enable-largefile or --disable-largefile was given. +if test "${enable_largefile+set}" = set; then + enableval="$enable_largefile" + +fi; +if test "$enable_largefile" != no; then + + echo "$as_me:2668: checking for special C compiler options needed for large files" >&5 +echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6 +if test "${ac_cv_sys_largefile_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat >conftest.$ac_ext <<_ACEOF +#line 2680 "configure" +#include "confdefs.h" +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ -if test -z "$AR" ; then - { echo "configure: error: *** 'ar' missing, please install or fix your \$PATH ***" 1>&2; exit 1; } + ; + return 0; +} +_ACEOF + rm -f conftest.$ac_objext +if { (eval echo "$as_me:2706: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2709: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2712: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2715: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext + CC="$CC -n32" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:2725: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2728: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2731: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2734: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sys_largefile_CC=' -n32'; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi fi +echo "$as_me:2748: result: $ac_cv_sys_largefile_CC" >&5 +echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi -# Use LOGIN_PROGRAM from environment if possible -if test ! -z "$LOGIN_PROGRAM" ; then - cat >> confdefs.h <&5 +echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 +if test "${ac_cv_sys_file_offset_bits+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + ac_cv_sys_file_offset_bits=no + cat >conftest.$ac_ext <<_ACEOF +#line 2762 "configure" +#include "confdefs.h" +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2788: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2791: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2794: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2797: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line 2806 "configure" +#include "confdefs.h" +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2833: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2836: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2839: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2842: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sys_file_offset_bits=64; break else - # Search for login - # Extract the first word of "login", so it can be a program name with args. -set dummy login; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1410: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_LOGIN_PROGRAM_FALLBACK'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$LOGIN_PROGRAM_FALLBACK" in - /*) + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext + break +done +fi +echo "$as_me:2853: result: $ac_cv_sys_file_offset_bits" >&5 +echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 +if test "$ac_cv_sys_file_offset_bits" != no; then + +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF + +fi +rm -f conftest* + echo "$as_me:2863: checking for _LARGE_FILES value needed for large files" >&5 +echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6 +if test "${ac_cv_sys_large_files+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + ac_cv_sys_large_files=no + cat >conftest.$ac_ext <<_ACEOF +#line 2871 "configure" +#include "confdefs.h" +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2897: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2900: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2903: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2906: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line 2915 "configure" +#include "confdefs.h" +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2942: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2945: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2948: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2951: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sys_large_files=1; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext + break +done +fi +echo "$as_me:2962: result: $ac_cv_sys_large_files" >&5 +echo "${ECHO_T}$ac_cv_sys_large_files" >&6 +if test "$ac_cv_sys_large_files" != no; then + +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF + +fi +rm -f conftest* +fi + +if test -z "$AR" ; then + { { echo "$as_me:2975: error: *** 'ar' missing, please install or fix your \$PATH ***" >&5 +echo "$as_me: error: *** 'ar' missing, please install or fix your \$PATH ***" >&2;} + { (exit 1); exit 1; }; } +fi + +# Use LOGIN_PROGRAM from environment if possible +if test ! -z "$LOGIN_PROGRAM" ; then + cat >>confdefs.h <<_ACEOF +#define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM" +_ACEOF + +else + # Search for login + # Extract the first word of "login", so it can be a program name with args. +set dummy login; ac_word=$2 +echo "$as_me:2990: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_LOGIN_PROGRAM_FALLBACK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $LOGIN_PROGRAM_FALLBACK in + [\\/]* | ?:[\\/]*) ac_cv_path_LOGIN_PROGRAM_FALLBACK="$LOGIN_PROGRAM_FALLBACK" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_LOGIN_PROGRAM_FALLBACK="$LOGIN_PROGRAM_FALLBACK" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_LOGIN_PROGRAM_FALLBACK="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_LOGIN_PROGRAM_FALLBACK="$ac_dir/$ac_word" + echo "$as_me:3007: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -LOGIN_PROGRAM_FALLBACK="$ac_cv_path_LOGIN_PROGRAM_FALLBACK" +LOGIN_PROGRAM_FALLBACK=$ac_cv_path_LOGIN_PROGRAM_FALLBACK + if test -n "$LOGIN_PROGRAM_FALLBACK"; then - echo "$ac_t""$LOGIN_PROGRAM_FALLBACK" 1>&6 + echo "$as_me:3018: result: $LOGIN_PROGRAM_FALLBACK" >&5 +echo "${ECHO_T}$LOGIN_PROGRAM_FALLBACK" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:3021: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then - cat >> confdefs.h <>confdefs.h <<_ACEOF #define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM_FALLBACK" -EOF +_ACEOF fi fi @@ -1450,50 +3034,157 @@ LD=$CC fi - -# C Compiler features -echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1457: checking for inline" >&5 -if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:3037: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +#line 3045 "configure" +#include "confdefs.h" +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:3100: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3103: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3106: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3109: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:3126: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:3129: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +echo "$as_me:3134: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3142 "configure" #include "confdefs.h" +#ifndef __cplusplus +static $ac_kw int static_foo () {return 0; } +$ac_kw int foo () {return 0; } +#endif -int main() { -} $ac_kw foo() { -; return 0; } -EOF -if { (eval echo configure:1471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3151: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3154: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3157: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3160: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_inline=$ac_kw; break else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext done fi - -echo "$ac_t""$ac_cv_c_inline" 1>&6 -case "$ac_cv_c_inline" in +echo "$as_me:3171: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 +case $ac_cv_c_inline in inline | yes) ;; - no) cat >> confdefs.h <<\EOF -#define inline -EOF + no) +cat >>confdefs.h <<\_ACEOF +#define inline +_ACEOF ;; - *) cat >> confdefs.h <>confdefs.h <<_ACEOF #define inline $ac_cv_c_inline -EOF +_ACEOF ;; esac -if test "$GCC" = "yes"; then - CFLAGS="$CFLAGS -Wall" +if test "$GCC" = "yes" || test "$GCC" = "egcs"; then + CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wno-uninitialized" fi # Check for some target-specific stuff @@ -1505,145 +3196,175 @@ if (test "$LD" != "gcc" && test -z "$blibpath"); then blibpath="/usr/lib:/lib:/usr/local/lib" fi - echo $ac_n "checking for authenticate""... $ac_c" 1>&6 -echo "configure:1510: checking for authenticate" >&5 -if eval "test \"`echo '$''{'ac_cv_func_authenticate'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:3199: checking for authenticate" >&5 +echo $ECHO_N "checking for authenticate... $ECHO_C" >&6 +if test "${ac_cv_func_authenticate+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3205 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char authenticate(); below. */ + which can conflict with char authenticate (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char authenticate(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char authenticate (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_authenticate) || defined (__stub___authenticate) choke me #else -authenticate(); +f = authenticate; #endif -; return 0; } -EOF -if { (eval echo configure:1538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_authenticate=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_authenticate=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'authenticate`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3242: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3245: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3248: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3251: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_authenticate=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_authenticate=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:3261: result: $ac_cv_func_authenticate" >&5 +echo "${ECHO_T}$ac_cv_func_authenticate" >&6 +if test $ac_cv_func_authenticate = yes; then + cat >>confdefs.h <<\_ACEOF #define WITH_AIXAUTHENTICATE 1 -EOF +_ACEOF -else - echo "$ac_t""no" 1>&6 fi - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BROKEN_GETADDRINFO 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_LASTLOG 1 -EOF +_ACEOF ;; *-*-cygwin*) LIBS="$LIBS -lregex /usr/lib/textmode.o" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_CYGWIN 1 -EOF +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define USE_PIPES 1 +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_SHADOW 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define IPV4_DEFAULT 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define IP_TOS_IS_BROKEN 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define NO_X11_UNIX_SOCKETS 1 -EOF +_ACEOF no_libsocket=1 no_libnsl=1 ;; *-*-dgux*) - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define IP_TOS_IS_BROKEN 1 -EOF +_ACEOF + + ;; +*-*-darwin*) + cat >>confdefs.h <<\_ACEOF +#define BROKEN_GETADDRINFO 1 +_ACEOF ;; *-*-hpux10*) if test -z "$GCC"; then CFLAGS="$CFLAGS -Ae" fi - CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE" + CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" IPADDR_IN_DISPLAY=yes - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define USE_PIPES 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_SHADOW 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_UTMP 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define SPT_TYPE SPT_PSTAT -EOF +_ACEOF - LIBS="$LIBS -lsec" + LIBS="$LIBS -lxnet -lsec" ;; *-*-hpux11*) - CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE" + CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" IPADDR_IN_DISPLAY=yes - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define PAM_SUN_CODEBASE 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define USE_PIPES 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_SHADOW 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_UTMP 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define SPT_TYPE SPT_PSTAT -EOF +_ACEOF - LIBS="$LIBS -lsec" + LIBS="$LIBS -lxnet -lsec" ;; *-*-irix5*) CPPFLAGS="$CPPFLAGS -I/usr/local/include" @@ -1651,147 +3372,189 @@ PATH="$PATH:/usr/etc" no_libsocket=1 no_libnsl=1 - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BROKEN_INET_NTOA 1 -EOF +_ACEOF ;; *-*-irix6*) CPPFLAGS="$CPPFLAGS -I/usr/local/include" LDFLAGS="$LDFLAGS" PATH="$PATH:/usr/etc" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define WITH_IRIX_ARRAY 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define WITH_IRIX_PROJECT 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define WITH_IRIX_AUDIT 1 -EOF +_ACEOF - echo $ac_n "checking for jlimit_startjob""... $ac_c" 1>&6 -echo "configure:1677: checking for jlimit_startjob" >&5 -if eval "test \"`echo '$''{'ac_cv_func_jlimit_startjob'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:3396: checking for jlimit_startjob" >&5 +echo $ECHO_N "checking for jlimit_startjob... $ECHO_C" >&6 +if test "${ac_cv_func_jlimit_startjob+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3402 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char jlimit_startjob(); below. */ + which can conflict with char jlimit_startjob (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char jlimit_startjob(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char jlimit_startjob (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_jlimit_startjob) || defined (__stub___jlimit_startjob) choke me #else -jlimit_startjob(); +f = jlimit_startjob; #endif -; return 0; } -EOF -if { (eval echo configure:1705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_jlimit_startjob=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_jlimit_startjob=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'jlimit_startjob`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3439: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3442: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3445: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3448: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_jlimit_startjob=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_jlimit_startjob=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:3458: result: $ac_cv_func_jlimit_startjob" >&5 +echo "${ECHO_T}$ac_cv_func_jlimit_startjob" >&6 +if test $ac_cv_func_jlimit_startjob = yes; then + cat >>confdefs.h <<\_ACEOF #define WITH_IRIX_JOBS 1 -EOF +_ACEOF -else - echo "$ac_t""no" 1>&6 fi no_libsocket=1 no_libnsl=1 - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BROKEN_INET_NTOA 1 -EOF +_ACEOF ;; *-*-linux*) no_dev_ptmx=1 check_for_libcrypt_later=1 - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DONT_TRY_OTHER_AF 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define PAM_TTY_KLUDGE 1 -EOF +_ACEOF inet6_default_4in6=yes ;; mips-sony-bsd|mips-sony-newsos4) - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_NEWS4 1 -EOF +_ACEOF SONY=1 - echo $ac_n "checking for xatexit in -liberty""... $ac_c" 1>&6 -echo "configure:1754: checking for xatexit in -liberty" >&5 -ac_lib_var=`echo iberty'_'xatexit | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:3493: checking for xatexit in -liberty" >&5 +echo $ECHO_N "checking for xatexit in -liberty... $ECHO_C" >&6 +if test "${ac_cv_lib_iberty_xatexit+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-liberty $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3501 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char xatexit(); - -int main() { -xatexit() -; return 0; } -EOF -if { (eval echo configure:1773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + builtin and then its argument prototype would still apply. */ +char xatexit (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +xatexit (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3526: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3529: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3532: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3535: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_iberty_xatexit=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_iberty_xatexit=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:3546: result: $ac_cv_lib_iberty_xatexit" >&5 +echo "${ECHO_T}$ac_cv_lib_iberty_xatexit" >&6 +if test $ac_cv_lib_iberty_xatexit = yes; then + cat >>confdefs.h <<\_ACEOF #define HAVE_XATEXIT 1 -EOF +_ACEOF else - echo "$ac_t""no" 1>&6 -{ echo "configure: error: *** libiberty missing - please install first or check config.log ***" 1>&2; exit 1; } - + { { echo "$as_me:3554: error: *** libiberty missing - please install first or check config.log ***" >&5 +echo "$as_me: error: *** libiberty missing - please install first or check config.log ***" >&2;} + { (exit 1); exit 1; }; } + fi ;; @@ -1806,176 +3569,199 @@ conf_utmp_location=/etc/utmp conf_wtmp_location=/usr/adm/wtmp MAIL=/usr/spool/mail - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_NEXT 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BROKEN_REALPATH 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define USE_PIPES 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BROKEN_SAVED_UIDS 1 -EOF +_ACEOF CPPFLAGS="$CPPFLAGS -I/usr/local/include" CFLAGS="$CFLAGS" ;; *-*-solaris*) CPPFLAGS="$CPPFLAGS -I/usr/local/include" - LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib" + LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib" need_dash_r=1 - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define PAM_SUN_CODEBASE 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define LOGIN_NEEDS_UTMPX 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define LOGIN_NEEDS_TERM 1 -EOF +_ACEOF # hardwire lastlog location (can't detect it on some versions) conf_lastlog_location="/var/adm/lastlog" - echo $ac_n "checking for obsolete utmp and wtmp in solaris2.x""... $ac_c" 1>&6 -echo "configure:1848: checking for obsolete utmp and wtmp in solaris2.x" >&5 + echo "$as_me:3609: checking for obsolete utmp and wtmp in solaris2.x" >&5 +echo $ECHO_N "checking for obsolete utmp and wtmp in solaris2.x... $ECHO_C" >&6 sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'` if test "$sol2ver" -ge 8; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:3613: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define DISABLE_UTMP 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_WTMP 1 -EOF +_ACEOF else - echo "$ac_t""no" 1>&6 + echo "$as_me:3624: result: no" >&5 +echo "${ECHO_T}no" >&6 fi ;; *-*-sunos4*) CPPFLAGS="$CPPFLAGS -DSUNOS4" - for ac_func in getpwanam + +for ac_func in getpwanam do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1869: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:3634: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3640 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:1897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3677: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3680: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3683: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3686: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:3696: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define PAM_SUN_CODEBASE 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_BOGUS_SYS_QUEUE_H 1 -EOF +_ACEOF conf_utmp_location=/etc/utmp conf_wtmp_location=/var/adm/wtmp conf_lastlog_location=/var/adm/lastlog - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define USE_PIPES 1 -EOF +_ACEOF ;; *-ncr-sysv*) CPPFLAGS="$CPPFLAGS -I/usr/local/include" LDFLAGS="$LDFLAGS -L/usr/local/lib" LIBS="$LIBS -lc89 -lnsl -lgen -lsocket" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_BOGUS_SYS_QUEUE_H 1 -EOF +_ACEOF ;; *-sni-sysv*) CPPFLAGS="$CPPFLAGS -I/usr/local/include" LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/ucblib" IPADDR_IN_DISPLAY=yes - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define USE_PIPES 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define IP_TOS_IS_BROKEN 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_BOGUS_SYS_QUEUE_H 1 -EOF +_ACEOF LIBS="$LIBS -lgen -lnsl -lucb" ;; *-*-sysv4.2*) CPPFLAGS="$CPPFLAGS -I/usr/local/include" LDFLAGS="$LDFLAGS -L/usr/local/lib" - enable_suid_ssh=no - cat >> confdefs.h <<\EOF +# enable_suid_ssh=no + cat >>confdefs.h <<\_ACEOF #define USE_PIPES 1 -EOF +_ACEOF ;; *-*-sysv5*) CPPFLAGS="$CPPFLAGS -I/usr/local/include" LDFLAGS="$LDFLAGS -L/usr/local/lib" - enable_suid_ssh=no - cat >> confdefs.h <<\EOF +# enable_suid_ssh=no + cat >>confdefs.h <<\_ACEOF #define USE_PIPES 1 -EOF +_ACEOF ;; *-*-sysv*) @@ -1990,82 +3776,102 @@ rsh_path="/usr/bin/rcmd" RANLIB=true no_dev_ptmx=1 - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BROKEN_SYS_TERMIO_H 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define USE_PIPES 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SCO_PROTECTED_PW 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_SHADOW 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_BOGUS_SYS_QUEUE_H 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BROKEN_SAVED_UIDS 1 -EOF +_ACEOF - for ac_func in getluid setluid +for ac_func in getluid setluid do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2021: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:3806: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3812 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:2049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3849: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3852: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3855: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3858: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:3868: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done @@ -2077,1016 +3883,1622 @@ LIBS="$LIBS -lprot -lx -ltinfo -lm" no_dev_ptmx=1 rsh_path="/usr/bin/rcmd" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define USE_PIPES 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SCO_PROTECTED_PW 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_SHADOW 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_BOGUS_SYS_QUEUE_H 1 -EOF +_ACEOF - for ac_func in getluid setluid +for ac_func in getluid setluid do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2100: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:3905: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3911 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:2128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3948: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3951: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3954: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3957: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:3967: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done MANTYPE=man ;; +*-*-unicos*) + no_libsocket=1 + no_libnsl=1 + cat >>confdefs.h <<\_ACEOF +#define USE_PIPES 1 +_ACEOF + + LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal,-L/usr/local/lib" + LIBS="$LIBS -lgen -lrsc" + ;; *-dec-osf*) - echo $ac_n "checking for Digital Unix SIA""... $ac_c" 1>&6 -echo "configure:2156: checking for Digital Unix SIA" >&5 + echo "$as_me:3990: checking for Digital Unix SIA" >&5 +echo $ECHO_N "checking for Digital Unix SIA... $ECHO_C" >&6 no_osfsia="" - # Check whether --with-osfsia or --without-osfsia was given. + +# Check whether --with-osfsia or --without-osfsia was given. if test "${with_osfsia+set}" = set; then withval="$with_osfsia" - + if test "x$withval" = "xno" ; then - echo "$ac_t""disabled" 1>&6 + echo "$as_me:3999: result: disabled" >&5 +echo "${ECHO_T}disabled" >&6 no_osfsia=1 fi - -fi +fi; if test -z "$no_osfsia" ; then if test -f /etc/sia/matrix.conf; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:4007: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define HAVE_OSF_SIA 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_LOGIN 1 -EOF +_ACEOF LIBS="$LIBS -lsecurity -ldb -lm -laud" else - echo "$ac_t""no" 1>&6 + echo "$as_me:4019: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi ;; + +*-*-nto-qnx) + cat >>confdefs.h <<\_ACEOF +#define USE_PIPES 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define NO_X11_UNIX_SOCKETS 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define MISSING_NFDBITS 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define MISSING_HOWMANY 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define MISSING_FD_MASK 1 +_ACEOF + + ;; esac # Allow user to specify flags + # Check whether --with-cflags or --without-cflags was given. if test "${with_cflags+set}" = set; then withval="$with_cflags" - + if test "x$withval" != "xno" ; then CFLAGS="$CFLAGS $withval" fi - -fi +fi; # Check whether --with-cppflags or --without-cppflags was given. if test "${with_cppflags+set}" = set; then withval="$with_cppflags" - + if test "x$withval" != "xno"; then CPPFLAGS="$CPPFLAGS $withval" fi - -fi +fi; # Check whether --with-ldflags or --without-ldflags was given. if test "${with_ldflags+set}" = set; then withval="$with_ldflags" - + if test "x$withval" != "xno" ; then LDFLAGS="$LDFLAGS $withval" fi - -fi +fi; # Check whether --with-libs or --without-libs was given. if test "${with_libs+set}" = set; then withval="$with_libs" - + if test "x$withval" != "xno" ; then LIBS="$LIBS $withval" fi - - -fi +fi; # Check whether --with-pcre or --without-pcre was given. if test "${with_pcre+set}" = set; then withval="$with_pcre" - - echo $ac_n "checking for pcre_info in -lpcre""... $ac_c" 1>&6 -echo "configure:2240: checking for pcre_info in -lpcre" >&5 -ac_lib_var=`echo pcre'_'pcre_info | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:4095: checking for pcre_info in -lpcre" >&5 +echo $ECHO_N "checking for pcre_info in -lpcre... $ECHO_C" >&6 +if test "${ac_cv_lib_pcre_pcre_info+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lpcre $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4103 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char pcre_info(); - -int main() { -pcre_info() -; return 0; } -EOF -if { (eval echo configure:2259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + builtin and then its argument prototype would still apply. */ +char pcre_info (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +pcre_info (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:4128: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4131: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4134: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4137: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_pcre_pcre_info=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_pcre_pcre_info=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:4148: result: $ac_cv_lib_pcre_pcre_info" >&5 +echo "${ECHO_T}$ac_cv_lib_pcre_pcre_info" >&6 +if test $ac_cv_lib_pcre_pcre_info = yes; then -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_LIBPCRE 1 -EOF - - LIBS="$LIBS -lpcreposix -lpcre" +_ACEOF + + LIBS="$LIBS -lpcreposix -lpcre" no_comp_check="yes" - -else - echo "$ac_t""no" 1>&6 - { echo "configure: error: *** Can not locate pcre libraries." 1>&2; exit 1; } - -fi - +else + { { echo "$as_me:4160: error: *** Can not locate pcre libraries." >&5 +echo "$as_me: error: *** Can not locate pcre libraries." >&2;} + { (exit 1); exit 1; }; } fi +fi; # Checks for libraries. if test -z "$no_libnsl" ; then - echo $ac_n "checking for yp_match in -lnsl""... $ac_c" 1>&6 -echo "configure:2296: checking for yp_match in -lnsl" >&5 -ac_lib_var=`echo nsl'_'yp_match | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:4171: checking for yp_match in -lnsl" >&5 +echo $ECHO_N "checking for yp_match in -lnsl... $ECHO_C" >&6 +if test "${ac_cv_lib_nsl_yp_match+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4179 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char yp_match(); - -int main() { -yp_match() -; return 0; } -EOF -if { (eval echo configure:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4207: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4210: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4213: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nsl_yp_match=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_nsl_yp_match=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:4224: result: $ac_cv_lib_nsl_yp_match" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_yp_match" >&6 +if test $ac_cv_lib_nsl_yp_match = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBNSL 1 +_ACEOF LIBS="-lnsl $LIBS" -else - echo "$ac_t""no" 1>&6 fi fi if test -z "$no_libsocket" ; then - echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:2345: checking for main in -lsocket" >&5 -ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:4238: checking for main in -lsocket" >&5 +echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4246 "configure" #include "confdefs.h" -int main() { -main() -; return 0; } -EOF -if { (eval echo configure:2360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4267: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4270: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4273: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_main=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_socket_main=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:4284: result: $ac_cv_lib_socket_main" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_main" >&6 +if test $ac_cv_lib_socket_main = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSOCKET 1 +_ACEOF LIBS="-lsocket $LIBS" -else - echo "$ac_t""no" 1>&6 fi fi -echo $ac_n "checking for innetgr in -lrpc""... $ac_c" 1>&6 -echo "configure:2390: checking for innetgr in -lrpc" >&5 -ac_lib_var=`echo rpc'_'innetgr | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:4297: checking for innetgr in -lrpc" >&5 +echo $ECHO_N "checking for innetgr in -lrpc... $ECHO_C" >&6 +if test "${ac_cv_lib_rpc_innetgr+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lrpc -lyp -lrpc $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4305 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char innetgr(); - -int main() { -innetgr() -; return 0; } -EOF -if { (eval echo configure:2409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="-lrpc -lyp -lrpc $LIBS" -else - echo "$ac_t""no" 1>&6 -fi - - -echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 -echo "configure:2431: checking for getspnam in -lgen" >&5 -ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + builtin and then its argument prototype would still apply. */ +char innetgr (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +innetgr (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:4330: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4333: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4336: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4339: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_rpc_innetgr=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_rpc_innetgr=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:4350: result: $ac_cv_lib_rpc_innetgr" >&5 +echo "${ECHO_T}$ac_cv_lib_rpc_innetgr" >&6 +if test $ac_cv_lib_rpc_innetgr = yes; then + LIBS="-lrpc -lyp -lrpc $LIBS" +fi + +echo "$as_me:4356: checking for getspnam in -lgen" >&5 +echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6 +if test "${ac_cv_lib_gen_getspnam+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lgen $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4364 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char getspnam(); - -int main() { -getspnam() -; return 0; } -EOF -if { (eval echo configure:2450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char getspnam (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +getspnam (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:4389: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4392: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4395: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4398: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gen_getspnam=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_gen_getspnam=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:4409: result: $ac_cv_lib_gen_getspnam" >&5 +echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6 +if test $ac_cv_lib_gen_getspnam = yes; then LIBS="$LIBS -lgen" -else - echo "$ac_t""no" 1>&6 fi -echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6 -echo "configure:2471: checking for deflate in -lz" >&5 -ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:4415: checking for deflate in -lz" >&5 +echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6 +if test "${ac_cv_lib_z_deflate+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4423 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char deflate(); - -int main() { -deflate() -; return 0; } -EOF -if { (eval echo configure:2490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo z | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4451: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4454: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4457: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_z_deflate=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_z_deflate=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:4468: result: $ac_cv_lib_z_deflate" >&5 +echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6 +if test $ac_cv_lib_z_deflate = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 +_ACEOF LIBS="-lz $LIBS" else - echo "$ac_t""no" 1>&6 -{ echo "configure: error: *** zlib missing - please install first or check config.log ***" 1>&2; exit 1; } + { { echo "$as_me:4478: error: *** zlib missing - please install first or check config.log ***" >&5 +echo "$as_me: error: *** zlib missing - please install first or check config.log ***" >&2;} + { (exit 1); exit 1; }; } fi -echo $ac_n "checking for login in -lutil""... $ac_c" 1>&6 -echo "configure:2519: checking for login in -lutil" >&5 -ac_lib_var=`echo util'_'login | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:4483: checking for login in -lutil" >&5 +echo $ECHO_N "checking for login in -lutil... $ECHO_C" >&6 +if test "${ac_cv_lib_util_login+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4491 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char login(); - -int main() { -login() -; return 0; } -EOF -if { (eval echo configure:2538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + builtin and then its argument prototype would still apply. */ +char login (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +login (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:4516: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4519: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4522: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4525: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_util_login=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_util_login=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:4536: result: $ac_cv_lib_util_login" >&5 +echo "${ECHO_T}$ac_cv_lib_util_login" >&6 +if test $ac_cv_lib_util_login = yes; then + cat >>confdefs.h <<\_ACEOF #define HAVE_LIBUTIL_LOGIN 1 -EOF +_ACEOF LIBS="$LIBS -lutil" -else - echo "$ac_t""no" 1>&6 fi - # We don't want to check if we did an pcre override. if test -z "$no_comp_check" ; then - echo $ac_n "checking for regcomp""... $ac_c" 1>&6 -echo "configure:2565: checking for regcomp" >&5 -if eval "test \"`echo '$''{'ac_cv_func_regcomp'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:4547: checking for regcomp" >&5 +echo $ECHO_N "checking for regcomp... $ECHO_C" >&6 +if test "${ac_cv_func_regcomp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4553 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char regcomp(); below. */ + which can conflict with char regcomp (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char regcomp(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char regcomp (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_regcomp) || defined (__stub___regcomp) choke me #else -regcomp(); +f = regcomp; #endif -; return 0; } -EOF -if { (eval echo configure:2593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_regcomp=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_regcomp=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'regcomp`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:4590: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4593: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4596: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4599: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_regcomp=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_regcomp=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:4609: result: $ac_cv_func_regcomp" >&5 +echo "${ECHO_T}$ac_cv_func_regcomp" >&6 +if test $ac_cv_func_regcomp = yes; then + cat >>confdefs.h <<\_ACEOF #define HAVE_REGCOMP 1 -EOF +_ACEOF else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for pcre_info in -lpcre""... $ac_c" 1>&6 -echo "configure:2615: checking for pcre_info in -lpcre" >&5 -ac_lib_var=`echo pcre'_'pcre_info | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:4618: checking for pcre_info in -lpcre" >&5 +echo $ECHO_N "checking for pcre_info in -lpcre... $ECHO_C" >&6 +if test "${ac_cv_lib_pcre_pcre_info+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lpcre $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4626 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char pcre_info(); - -int main() { -pcre_info() -; return 0; } -EOF -if { (eval echo configure:2634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + builtin and then its argument prototype would still apply. */ +char pcre_info (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +pcre_info (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:4651: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4654: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4657: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4660: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_pcre_pcre_info=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_pcre_pcre_info=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:4671: result: $ac_cv_lib_pcre_pcre_info" >&5 +echo "${ECHO_T}$ac_cv_lib_pcre_pcre_info" >&6 +if test $ac_cv_lib_pcre_pcre_info = yes; then -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_LIBPCRE 1 -EOF +_ACEOF LIBS="$LIBS -lpcreposix -lpcre" - + else - echo "$ac_t""no" 1>&6 - { echo "configure: error: *** No regex library found." 1>&2; exit 1; } - + { { echo "$as_me:4683: error: *** No regex library found." >&5 +echo "$as_me: error: *** No regex library found." >&2;} + { (exit 1); exit 1; }; } + fi - - fi fi -echo $ac_n "checking for strcasecmp""... $ac_c" 1>&6 -echo "configure:2670: checking for strcasecmp" >&5 -if eval "test \"`echo '$''{'ac_cv_func_strcasecmp'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:4693: checking for strcasecmp" >&5 +echo $ECHO_N "checking for strcasecmp... $ECHO_C" >&6 +if test "${ac_cv_func_strcasecmp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4699 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char strcasecmp(); below. */ + which can conflict with char strcasecmp (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char strcasecmp(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char strcasecmp (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_strcasecmp) || defined (__stub___strcasecmp) choke me #else -strcasecmp(); +f = strcasecmp; #endif -; return 0; } -EOF -if { (eval echo configure:2698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_strcasecmp=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_strcasecmp=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'strcasecmp`\" = yes"; then - echo "$ac_t""yes" 1>&6 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:4736: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4739: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4742: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4745: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_strcasecmp=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_strcasecmp=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:4755: result: $ac_cv_func_strcasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strcasecmp" >&6 +if test $ac_cv_func_strcasecmp = yes; then : else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6 -echo "configure:2716: checking for strcasecmp in -lresolv" >&5 -ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:4760: checking for strcasecmp in -lresolv" >&5 +echo $ECHO_N "checking for strcasecmp in -lresolv... $ECHO_C" >&6 +if test "${ac_cv_lib_resolv_strcasecmp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4768 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char strcasecmp(); - -int main() { -strcasecmp() -; return 0; } -EOF -if { (eval echo configure:2735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char strcasecmp (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +strcasecmp (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:4793: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4796: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4799: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4802: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_resolv_strcasecmp=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_resolv_strcasecmp=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:4813: result: $ac_cv_lib_resolv_strcasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_resolv_strcasecmp" >&6 +if test $ac_cv_lib_resolv_strcasecmp = yes; then LIBS="$LIBS -lresolv" -else - echo "$ac_t""no" 1>&6 fi - fi -echo $ac_n "checking for utimes""... $ac_c" 1>&6 -echo "configure:2759: checking for utimes" >&5 -if eval "test \"`echo '$''{'ac_cv_func_utimes'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:4821: checking for utimes" >&5 +echo $ECHO_N "checking for utimes... $ECHO_C" >&6 +if test "${ac_cv_func_utimes+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4827 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char utimes(); below. */ + which can conflict with char utimes (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char utimes(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char utimes (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_utimes) || defined (__stub___utimes) choke me #else -utimes(); +f = utimes; #endif -; return 0; } -EOF -if { (eval echo configure:2787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_utimes=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_utimes=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'utimes`\" = yes"; then - echo "$ac_t""yes" 1>&6 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:4864: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4867: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4870: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4873: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_utimes=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_utimes=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:4883: result: $ac_cv_func_utimes" >&5 +echo "${ECHO_T}$ac_cv_func_utimes" >&6 +if test $ac_cv_func_utimes = yes; then : else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for utimes in -lc89""... $ac_c" 1>&6 -echo "configure:2805: checking for utimes in -lc89" >&5 -ac_lib_var=`echo c89'_'utimes | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:4888: checking for utimes in -lc89" >&5 +echo $ECHO_N "checking for utimes in -lc89... $ECHO_C" >&6 +if test "${ac_cv_lib_c89_utimes+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lc89 $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4896 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char utimes(); - -int main() { -utimes() -; return 0; } -EOF -if { (eval echo configure:2824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char utimes (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +utimes (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:4921: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4924: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4927: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4930: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_c89_utimes=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_c89_utimes=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:4941: result: $ac_cv_lib_c89_utimes" >&5 +echo "${ECHO_T}$ac_cv_lib_c89_utimes" >&6 +if test $ac_cv_lib_c89_utimes = yes; then LIBS="$LIBS -lc89" -else - echo "$ac_t""no" 1>&6 fi - fi - -echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:2849: checking for strftime" >&5 -if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +for ac_func in strftime +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:4952: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4958 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char strftime(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char strftime(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_strftime) || defined (__stub___strftime) +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -strftime(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:2877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_strftime=yes" + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:4995: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4998: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:5001: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5004: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:5014: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + # strftime is in -lintl on SCO UNIX. +echo "$as_me:5023: checking for strftime in -lintl" >&5 +echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6 +if test "${ac_cv_lib_intl_strftime+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_strftime=no" + ac_check_lib_save_LIBS=$LIBS +LIBS="-lintl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line 5031 "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strftime (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +strftime (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:5056: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5059: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:5062: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5065: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_intl_strftime=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_intl_strftime=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:5076: result: $ac_cv_lib_intl_strftime" >&5 +echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6 +if test $ac_cv_lib_intl_strftime = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_STRFTIME 1 +_ACEOF + +LIBS="-lintl $LIBS" fi -rm -f conftest* + fi +done -if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_STRFTIME 1 -EOF +# Checks for header files. +echo "$as_me:5091: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$ac_t""no" 1>&6 -# strftime is in -lintl on SCO UNIX. -echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6 -echo "configure:2899: checking for strftime in -lintl" >&5 -ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lintl $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 5097 "configure" #include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char strftime(); +#include +#include +#include +#include -int main() { -strftime() -; return 0; } -EOF -if { (eval echo configure:2918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" +_ACEOF +if { (eval echo "$as_me:5105: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:5111: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + ac_cv_header_stdc=no +fi +rm -f conftest.err conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +#line 5133 "configure" +#include "confdefs.h" +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no fi rm -f conftest* -LIBS="$ac_save_LIBS" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_STRFTIME 1 -EOF -LIBS="-lintl $LIBS" +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +#line 5151 "configure" +#include "confdefs.h" +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : else - echo "$ac_t""no" 1>&6 + ac_cv_header_stdc=no fi +rm -f conftest* fi +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +#line 5172 "configure" +#include "confdefs.h" +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif -# Checks for header files. -for ac_hdr in bstring.h crypt.h endian.h floatingpoint.h getopt.h glob.h lastlog.h limits.h login.h login_cap.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h regex.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/queue.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h sys/un.h stddef.h time.h ttyent.h usersec.h util.h utime.h utmp.h utmpx.h vis.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2950: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:5198: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5201: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:5203: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5206: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_header_stdc=no fi -rm -f conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:5219: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$ac_t""no" 1>&6 + cat >conftest.$ac_ext <<_ACEOF +#line 5241 "configure" +#include "confdefs.h" +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:5248: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:5251: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:5254: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5257: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_Header=no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:5267: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done +for ac_header in bstring.h crypt.h endian.h floatingpoint.h getopt.h glob.h lastlog.h libgen.h limits.h login.h login_cap.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h regex.h shadow.h security/pam_appl.h stdint.h strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/queue.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h sys/un.h stddef.h time.h ttyent.h usersec.h util.h utime.h utmp.h utmpx.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:5282: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:5287: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:5291: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 5294 "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:5300: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:5303: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:5306: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5309: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:5318: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:5322: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 5325 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:5329: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:5335: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:5353: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:5359: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:5361: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:5364: WARNING: $ac_header: present but cannot be compiled." >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled." >&2;} + { echo "$as_me:5366: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:5368: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:5371: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:5378: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done # Check for ALTDIRFUNC glob() extension -echo $ac_n "checking for GLOB_ALTDIRFUNC support""... $ac_c" 1>&6 -echo "configure:2989: checking for GLOB_ALTDIRFUNC support" >&5 -cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for GLOB_ALTDIRFUNC support... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 5395 "configure" #include "confdefs.h" #include #ifdef GLOB_ALTDIRFUNC FOUNDIT #endif - -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "FOUNDIT" >/dev/null 2>&1; then - rm -rf conftest* - - cat >> confdefs.h <<\EOF + + cat >>confdefs.h <<\_ACEOF #define GLOB_HAS_ALTDIRFUNC 1 -EOF +_ACEOF + + echo "$as_me:5411: result: yes" >&5 +echo "${ECHO_T}yes" >&6 - echo "$ac_t""yes" 1>&6 - else - rm -rf conftest* - - echo "$ac_t""no" 1>&6 - + + echo "$as_me:5416: result: no" >&5 +echo "${ECHO_T}no" >&6 fi rm -f conftest* - # Check for g.gl_matchc glob() extension -echo $ac_n "checking for gl_matchc field in glob_t""... $ac_c" 1>&6 -echo "configure:3022: checking for gl_matchc field in glob_t" >&5 -cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for gl_matchc field in glob_t... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 5426 "configure" #include "confdefs.h" #include int main(void){glob_t g; g.gl_matchc = 1;} - -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "FOUNDIT" >/dev/null 2>&1; then - rm -rf conftest* - - cat >> confdefs.h <<\EOF + + cat >>confdefs.h <<\_ACEOF #define GLOB_HAS_GL_MATCHC 1 -EOF +_ACEOF + + echo "$as_me:5440: result: yes" >&5 +echo "${ECHO_T}yes" >&6 - echo "$ac_t""yes" 1>&6 - else - rm -rf conftest* - - echo "$ac_t""no" 1>&6 - + + echo "$as_me:5445: result: no" >&5 +echo "${ECHO_T}no" >&6 fi rm -f conftest* - -echo $ac_n "checking whether struct dirent allocates space for d_name""... $ac_c" 1>&6 -echo "configure:3052: checking whether struct dirent allocates space for d_name" >&5 +echo "$as_me:5451: checking whether struct dirent allocates space for d_name" >&5 +echo $ECHO_N "checking whether struct dirent allocates space for d_name... $ECHO_C" >&6 if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + { { echo "$as_me:5454: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 5459 "configure" #include "confdefs.h" #include #include int main(void){struct dirent d;return(sizeof(d.d_name)<=sizeof(char));} - -EOF -if { (eval echo configure:3065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - - echo "$ac_t""no" 1>&6 - cat >> confdefs.h <<\EOF -#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1 -EOF - +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:5468: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5471: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:5473: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5476: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:5478: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + + echo "$as_me:5485: result: no" >&5 +echo "${ECHO_T}no" >&6 + cat >>confdefs.h <<\_ACEOF +#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1 +_ACEOF fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - # Check whether user wants S/Key support -SKEY_MSG="no" +SKEY_MSG="no" + # Check whether --with-skey or --without-skey was given. if test "${with_skey+set}" = set; then withval="$with_skey" - + if test "x$withval" != "xno" ; then if test "x$withval" != "xyes" ; then @@ -3094,976 +5506,1476 @@ LDFLAGS="$LDFLAGS -L${withval}/lib" fi - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define SKEY 1 -EOF +_ACEOF LIBS="-lskey $LIBS" - SKEY_MSG="yes" - - echo $ac_n "checking for skey_keyinfo""... $ac_c" 1>&6 -echo "configure:3106: checking for skey_keyinfo" >&5 -if eval "test \"`echo '$''{'ac_cv_func_skey_keyinfo'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + SKEY_MSG="yes" + + echo "$as_me:5516: checking for skey_keyinfo" >&5 +echo $ECHO_N "checking for skey_keyinfo... $ECHO_C" >&6 +if test "${ac_cv_func_skey_keyinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 5522 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char skey_keyinfo(); below. */ + which can conflict with char skey_keyinfo (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char skey_keyinfo(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char skey_keyinfo (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_skey_keyinfo) || defined (__stub___skey_keyinfo) choke me #else -skey_keyinfo(); +f = skey_keyinfo; #endif -; return 0; } -EOF -if { (eval echo configure:3134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_skey_keyinfo=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_skey_keyinfo=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'skey_keyinfo`\" = yes"; then - echo "$ac_t""yes" 1>&6 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:5559: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5562: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:5565: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5568: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_skey_keyinfo=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_skey_keyinfo=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:5578: result: $ac_cv_func_skey_keyinfo" >&5 +echo "${ECHO_T}$ac_cv_func_skey_keyinfo" >&6 +if test $ac_cv_func_skey_keyinfo = yes; then : else - echo "$ac_t""no" 1>&6 - { echo "configure: error: ** Incomplete or missing s/key libraries." 1>&2; exit 1; } - + { { echo "$as_me:5584: error: ** Incomplete or missing s/key libraries." >&5 +echo "$as_me: error: ** Incomplete or missing s/key libraries." >&2;} + { (exit 1); exit 1; }; } + fi fi - - -fi +fi; # Check whether user wants TCP wrappers support -TCPW_MSG="no" +TCPW_MSG="no" + # Check whether --with-tcp-wrappers or --without-tcp-wrappers was given. if test "${with_tcp_wrappers+set}" = set; then withval="$with_tcp_wrappers" - + if test "x$withval" != "xno" ; then saved_LIBS="$LIBS" LIBS="-lwrap $LIBS" - echo $ac_n "checking for libwrap""... $ac_c" 1>&6 -echo "configure:3172: checking for libwrap" >&5 - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for libwrap... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +#line 5607 "configure" #include "confdefs.h" #include int deny_severity = 0, allow_severity = 0; - -int main() { + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ hosts_access(0); -; return 0; } -EOF -if { (eval echo configure:3184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:5628: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5631: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:5634: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5637: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:5640: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define LIBWRAP 1 -EOF +_ACEOF + + TCPW_MSG="yes" - TCPW_MSG="yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - { echo "configure: error: *** libwrap missing" 1>&2; exit 1; } - - -fi -rm -f conftest* - fi - + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + + { { echo "$as_me:5652: error: *** libwrap missing" >&5 +echo "$as_me: error: *** libwrap missing" >&2;} + { (exit 1); exit 1; }; } fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + fi +fi; -for ac_func in arc4random atexit b64_ntop bcopy bindresvport_sa clock fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getnameinfo getrlimit getrusage getttyent getusershell glob inet_aton inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty realpath rresvport_af setdtablesize setenv setegid seteuid setlogin setproctitle setresgid setreuid setrlimit setsid setvbuf sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep strtok_r sysconf tcgetpgrp utimes vsnprintf vhangup vis waitpid _getpty __b64_ntop +for ac_func in arc4random atexit b64_ntop bcopy bindresvport_sa clock dirname fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getopt getnameinfo getrlimit getrusage getttyent glob inet_aton inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty readpassphrase realpath rresvport_af setdtablesize setenv setegid seteuid setlogin setproctitle setresgid setreuid setrlimit setsid setvbuf sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep sysconf tcgetpgrp utimes vsnprintf vhangup waitpid _getpty __b64_ntop do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3213: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:5665: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 5671 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:3241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:5708: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5711: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:5714: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5717: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:5727: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done for ac_func in gettimeofday time do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3268: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:5740: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 5746 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:3296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:5783: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5786: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:5789: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5792: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:5802: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done -for ac_hdr in libutil.h +for ac_header in libutil.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3324: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:5816: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:5821: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:5825: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 5828 "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:5834: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:5837: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:5840: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5843: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:5852: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:5856: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 5859 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:5863: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:5869: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_cpp_err=yes fi -rm -f conftest* +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:5893: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:5895: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:5898: WARNING: $ac_header: present but cannot be compiled." >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled." >&2;} + { echo "$as_me:5900: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:5902: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:5905: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$ac_t""no" 1>&6 + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:5912: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi + done for ac_func in login logout updwtmp logwtmp do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3363: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:5928: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 5934 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:5971: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:5974: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:5977: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:5980: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:5990: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done for ac_func in endutent getutent getutid getutline pututline setutent do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3418: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:6003: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6009 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:3446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:6046: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6049: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:6052: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6055: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:6065: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done for ac_func in utmpname do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3473: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:6078: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6084 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:3501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:6121: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6124: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:6127: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6130: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:6140: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done -for ac_func in endutxent getutxent getutxid getutxline pututxline +for ac_func in endutxent getutxent getutxid getutxline pututxline do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3528: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:6153: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6159 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:3556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:6196: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6199: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:6202: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6205: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:6215: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done for ac_func in setutxent utmpxname do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3583: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:6228: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6234 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:3611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:6271: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6274: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:6277: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6280: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:6290: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done - -echo $ac_n "checking for getuserattr""... $ac_c" 1>&6 -echo "configure:3637: checking for getuserattr" >&5 -if eval "test \"`echo '$''{'ac_cv_func_getuserattr'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:6300: checking for getuserattr" >&5 +echo $ECHO_N "checking for getuserattr... $ECHO_C" >&6 +if test "${ac_cv_func_getuserattr+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6306 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char getuserattr(); below. */ + which can conflict with char getuserattr (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char getuserattr(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char getuserattr (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_getuserattr) || defined (__stub___getuserattr) choke me #else -getuserattr(); +f = getuserattr; #endif -; return 0; } -EOF -if { (eval echo configure:3665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_getuserattr=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_getuserattr=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'getuserattr`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:6343: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6346: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:6349: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6352: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_getuserattr=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_getuserattr=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:6362: result: $ac_cv_func_getuserattr" >&5 +echo "${ECHO_T}$ac_cv_func_getuserattr" >&6 +if test $ac_cv_func_getuserattr = yes; then + cat >>confdefs.h <<\_ACEOF #define HAVE_GETUSERATTR 1 -EOF +_ACEOF else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for getuserattr in -ls""... $ac_c" 1>&6 -echo "configure:3686: checking for getuserattr in -ls" >&5 -ac_lib_var=`echo s'_'getuserattr | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:6370: checking for getuserattr in -ls" >&5 +echo $ECHO_N "checking for getuserattr in -ls... $ECHO_C" >&6 +if test "${ac_cv_lib_s_getuserattr+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-ls $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6378 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char getuserattr(); - -int main() { -getuserattr() -; return 0; } -EOF -if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -ls"; cat >> confdefs.h <<\EOF + builtin and then its argument prototype would still apply. */ +char getuserattr (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +getuserattr (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:6403: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6406: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:6409: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6412: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_s_getuserattr=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_s_getuserattr=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:6423: result: $ac_cv_lib_s_getuserattr" >&5 +echo "${ECHO_T}$ac_cv_lib_s_getuserattr" >&6 +if test $ac_cv_lib_s_getuserattr = yes; then + LIBS="$LIBS -ls"; cat >>confdefs.h <<\_ACEOF #define HAVE_GETUSERATTR 1 -EOF +_ACEOF -else - echo "$ac_t""no" 1>&6 fi - fi - -echo $ac_n "checking for login""... $ac_c" 1>&6 -echo "configure:3733: checking for login" >&5 -if eval "test \"`echo '$''{'ac_cv_func_login'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:6434: checking for login" >&5 +echo $ECHO_N "checking for login... $ECHO_C" >&6 +if test "${ac_cv_func_login+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6440 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char login(); below. */ + which can conflict with char login (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char login(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char login (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_login) || defined (__stub___login) choke me #else -login(); +f = login; #endif -; return 0; } -EOF -if { (eval echo configure:3761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_login=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_login=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'login`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:6477: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6480: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:6483: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6486: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_login=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_login=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:6496: result: $ac_cv_func_login" >&5 +echo "${ECHO_T}$ac_cv_func_login" >&6 +if test $ac_cv_func_login = yes; then + cat >>confdefs.h <<\_ACEOF #define HAVE_LOGIN 1 -EOF +_ACEOF else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for login in -lbsd""... $ac_c" 1>&6 -echo "configure:3782: checking for login in -lbsd" >&5 -ac_lib_var=`echo bsd'_'login | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:6504: checking for login in -lbsd" >&5 +echo $ECHO_N "checking for login in -lbsd... $ECHO_C" >&6 +if test "${ac_cv_lib_bsd_login+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6512 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char login(); - -int main() { -login() -; return 0; } -EOF -if { (eval echo configure:3801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lbsd"; cat >> confdefs.h <<\EOF + builtin and then its argument prototype would still apply. */ +char login (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +login (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:6537: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6540: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:6543: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6546: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_bsd_login=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_bsd_login=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:6557: result: $ac_cv_lib_bsd_login" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_login" >&6 +if test $ac_cv_lib_bsd_login = yes; then + LIBS="$LIBS -lbsd"; cat >>confdefs.h <<\_ACEOF #define HAVE_LOGIN 1 -EOF +_ACEOF -else - echo "$ac_t""no" 1>&6 fi - fi - -echo $ac_n "checking for daemon""... $ac_c" 1>&6 -echo "configure:3829: checking for daemon" >&5 -if eval "test \"`echo '$''{'ac_cv_func_daemon'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:6568: checking for daemon" >&5 +echo $ECHO_N "checking for daemon... $ECHO_C" >&6 +if test "${ac_cv_func_daemon+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6574 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char daemon(); below. */ + which can conflict with char daemon (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char daemon(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char daemon (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_daemon) || defined (__stub___daemon) choke me #else -daemon(); +f = daemon; #endif -; return 0; } -EOF -if { (eval echo configure:3857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_daemon=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_daemon=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'daemon`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:6611: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6614: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:6617: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6620: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_daemon=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_daemon=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:6630: result: $ac_cv_func_daemon" >&5 +echo "${ECHO_T}$ac_cv_func_daemon" >&6 +if test $ac_cv_func_daemon = yes; then + cat >>confdefs.h <<\_ACEOF #define HAVE_DAEMON 1 -EOF +_ACEOF else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for daemon in -lbsd""... $ac_c" 1>&6 -echo "configure:3878: checking for daemon in -lbsd" >&5 -ac_lib_var=`echo bsd'_'daemon | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:6638: checking for daemon in -lbsd" >&5 +echo $ECHO_N "checking for daemon in -lbsd... $ECHO_C" >&6 +if test "${ac_cv_lib_bsd_daemon+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6646 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char daemon(); - -int main() { -daemon() -; return 0; } -EOF -if { (eval echo configure:3897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lbsd"; cat >> confdefs.h <<\EOF + builtin and then its argument prototype would still apply. */ +char daemon (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +daemon (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:6671: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6674: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:6677: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6680: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_bsd_daemon=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_bsd_daemon=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:6691: result: $ac_cv_lib_bsd_daemon" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_daemon" >&6 +if test $ac_cv_lib_bsd_daemon = yes; then + LIBS="$LIBS -lbsd"; cat >>confdefs.h <<\_ACEOF #define HAVE_DAEMON 1 -EOF +_ACEOF -else - echo "$ac_t""no" 1>&6 fi - fi - -echo $ac_n "checking for getpagesize""... $ac_c" 1>&6 -echo "configure:3925: checking for getpagesize" >&5 -if eval "test \"`echo '$''{'ac_cv_func_getpagesize'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:6702: checking for getpagesize" >&5 +echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6 +if test "${ac_cv_func_getpagesize+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6708 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char getpagesize(); below. */ + which can conflict with char getpagesize (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char getpagesize(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char getpagesize (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_getpagesize) || defined (__stub___getpagesize) choke me #else -getpagesize(); +f = getpagesize; #endif -; return 0; } -EOF -if { (eval echo configure:3953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_getpagesize=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_getpagesize=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'getpagesize`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:6745: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6748: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:6751: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6754: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_getpagesize=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_getpagesize=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:6764: result: $ac_cv_func_getpagesize" >&5 +echo "${ECHO_T}$ac_cv_func_getpagesize" >&6 +if test $ac_cv_func_getpagesize = yes; then + cat >>confdefs.h <<\_ACEOF #define HAVE_GETPAGESIZE 1 -EOF +_ACEOF else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for getpagesize in -lucb""... $ac_c" 1>&6 -echo "configure:3974: checking for getpagesize in -lucb" >&5 -ac_lib_var=`echo ucb'_'getpagesize | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:6772: checking for getpagesize in -lucb" >&5 +echo $ECHO_N "checking for getpagesize in -lucb... $ECHO_C" >&6 +if test "${ac_cv_lib_ucb_getpagesize+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lucb $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6780 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char getpagesize(); - -int main() { -getpagesize() -; return 0; } -EOF -if { (eval echo configure:3993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lucb"; cat >> confdefs.h <<\EOF + builtin and then its argument prototype would still apply. */ +char getpagesize (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +getpagesize (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:6805: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6808: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:6811: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6814: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_ucb_getpagesize=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_ucb_getpagesize=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:6825: result: $ac_cv_lib_ucb_getpagesize" >&5 +echo "${ECHO_T}$ac_cv_lib_ucb_getpagesize" >&6 +if test $ac_cv_lib_ucb_getpagesize = yes; then + LIBS="$LIBS -lucb"; cat >>confdefs.h <<\_ACEOF #define HAVE_GETPAGESIZE 1 -EOF +_ACEOF -else - echo "$ac_t""no" 1>&6 fi - fi - # Check for broken snprintf if test "x$ac_cv_func_snprintf" = "xyes" ; then - echo $ac_n "checking whether snprintf correctly terminates long strings""... $ac_c" 1>&6 -echo "configure:4023: checking whether snprintf correctly terminates long strings" >&5 + echo "$as_me:6838: checking whether snprintf correctly terminates long strings" >&5 +echo $ECHO_N "checking whether snprintf correctly terminates long strings... $ECHO_C" >&6 if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + { { echo "$as_me:6841: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6846 "configure" #include "confdefs.h" #include int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');} - -EOF -if { (eval echo configure:4035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - - echo "$ac_t""no" 1>&6 - cat >> confdefs.h <<\EOF + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:6854: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:6857: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:6859: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6862: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:6864: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + + echo "$as_me:6871: result: no" >&5 +echo "${ECHO_T}no" >&6 + cat >>confdefs.h <<\_ACEOF #define BROKEN_SNPRINTF 1 -EOF +_ACEOF + + { echo "$as_me:6877: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5 +echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;} - echo "configure: warning: ****** Your snprintf() function is broken, complain to your vendor" 1>&2 - - fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi -echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 -echo "configure:4058: checking whether getpgrp takes no argument" >&5 -if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:6885: checking whether getpgrp takes no argument" >&5 +echo $ECHO_N "checking whether getpgrp takes no argument... $ECHO_C" >&6 +if test "${ac_cv_func_getpgrp_void+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then - { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; } + # Use it with a single arg. +cat >conftest.$ac_ext <<_ACEOF +#line 6892 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +getpgrp (0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:6910: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:6913: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:6916: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6919: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_func_getpgrp_1=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_func_getpgrp_1=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Use it with no arg. +cat >conftest.$ac_ext <<_ACEOF +#line 6930 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +getpgrp (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:6948: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:6951: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:6954: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:6957: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_func_getpgrp_0=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_func_getpgrp_0=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +# If both static checks agree, we are done. +case $ac_func_getpgrp_0:$ac_func_getpgrp_1 in + yes:no) ac_cv_func_getpgrp_void=yes;; + no:yes) ac_cv_func_getpgrp_void=false;; + *) if test "$cross_compiling" = yes; then + { { echo "$as_me:6971: error: cannot check getpgrp if cross compiling" >&5 +echo "$as_me: error: cannot check getpgrp if cross compiling" >&2;} + { (exit 1); exit 1; }; } else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 6976 "configure" #include "confdefs.h" +$ac_includes_default /* * If this system has a BSD-style getpgrp(), @@ -4071,299 +6983,381 @@ * * Snarfed from Chet Ramey's bash pgrp.c test program */ -#include -#include int pid; int pg1, pg2, pg3, pg4; int ng, np, s, child; -main() +int +main () { - pid = getpid(); - pg1 = getpgrp(0); - pg2 = getpgrp(); - pg3 = getpgrp(pid); - pg4 = getpgrp(1); - - /* - * If all of these values are the same, it's pretty sure that - * we're on a system that ignores getpgrp's first argument. - */ - if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3) - exit(0); - - child = fork(); - if (child < 0) - exit(1); - else if (child == 0) { - np = getpid(); - /* - * If this is Sys V, this will not work; pgrp will be - * set to np because setpgrp just changes a pgrp to be - * the same as the pid. - */ - setpgrp(np, pg1); - ng = getpgrp(0); /* Same result for Sys V and BSD */ - if (ng == pg1) { - exit(1); - } else { - exit(0); - } - } else { - wait(&s); - exit(s>>8); - } + pid = getpid (); + pg1 = getpgrp (0); + pg2 = getpgrp (); + pg3 = getpgrp (pid); + pg4 = getpgrp (1); + + /* If all of these values are the same, it's pretty sure that we're + on a system that ignores getpgrp's first argument. */ + if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3) + exit (0); + + child = fork (); + if (child < 0) + exit(1); + else if (child == 0) + { + np = getpid (); + /* If this is Sys V, this will not work; pgrp will be set to np + because setpgrp just changes a pgrp to be the same as the + pid. */ + setpgrp (np, pg1); + ng = getpgrp (0); /* Same result for Sys V and BSD */ + if (ng == pg1) + exit (1); + else + exit (0); + } + else + { + wait (&s); + exit (s>>8); + } } -EOF -if { (eval echo configure:4121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:7030: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:7033: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:7035: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:7038: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_getpgrp_void=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_getpgrp_void=no -fi -rm -fr conftest* -fi - + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_getpgrp_void=no +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi;; +esac # $ac_func_getpgrp_0:$ac_func_getpgrp_1 fi - -echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6 +echo "$as_me:7052: result: $ac_cv_func_getpgrp_void" >&5 +echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6 if test $ac_cv_func_getpgrp_void = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define GETPGRP_VOID 1 -EOF +_ACEOF fi - # Check for PAM libs PAM_MSG="no" + # Check whether --with-pam or --without-pam was given. if test "${with_pam+set}" = set; then withval="$with_pam" - + if test "x$withval" != "xno" ; then if test "x$ac_cv_header_security_pam_appl_h" != "xyes" ; then - { echo "configure: error: PAM headers not found" 1>&2; exit 1; } + { { echo "$as_me:7071: error: PAM headers not found" >&5 +echo "$as_me: error: PAM headers not found" >&2;} + { (exit 1); exit 1; }; } fi - echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:4157: checking for dlopen in -ldl" >&5 -ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:7076: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 7084 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen(); - -int main() { -dlopen() -; return 0; } -EOF -if { (eval echo configure:4176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:7112: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:7115: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:7118: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:7129: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDL 1 +_ACEOF LIBS="-ldl $LIBS" -else - echo "$ac_t""no" 1>&6 fi - echo $ac_n "checking for pam_set_item in -lpam""... $ac_c" 1>&6 -echo "configure:4204: checking for pam_set_item in -lpam" >&5 -ac_lib_var=`echo pam'_'pam_set_item | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:7140: checking for pam_set_item in -lpam" >&5 +echo $ECHO_N "checking for pam_set_item in -lpam... $ECHO_C" >&6 +if test "${ac_cv_lib_pam_pam_set_item+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lpam $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 7148 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char pam_set_item(); - -int main() { -pam_set_item() -; return 0; } -EOF -if { (eval echo configure:4223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo pam | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:7176: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:7179: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:7182: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_pam_pam_set_item=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_pam_pam_set_item=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:7193: result: $ac_cv_lib_pam_pam_set_item" >&5 +echo "${ECHO_T}$ac_cv_lib_pam_pam_set_item" >&6 +if test $ac_cv_lib_pam_pam_set_item = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPAM 1 +_ACEOF LIBS="-lpam $LIBS" else - echo "$ac_t""no" 1>&6 -{ echo "configure: error: *** libpam missing" 1>&2; exit 1; } + { { echo "$as_me:7203: error: *** libpam missing" >&5 +echo "$as_me: error: *** libpam missing" >&2;} + { (exit 1); exit 1; }; } fi - for ac_func in pam_getenvlist +for ac_func in pam_getenvlist do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4254: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:7211: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 7217 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:4282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:7254: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:7257: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:7260: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:7263: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:7273: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done - disable_shadow=yes PAM_MSG="yes" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define USE_PAM 1 -EOF +_ACEOF fi - - -fi +fi; # Check for older PAM if test "x$PAM_MSG" = "xyes" ; then # Check PAM strerror arguments (old PAM) - echo $ac_n "checking whether pam_strerror takes only one argument""... $ac_c" 1>&6 -echo "configure:4324: checking whether pam_strerror takes only one argument" >&5 - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking whether pam_strerror takes only one argument... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +#line 7300 "configure" #include "confdefs.h" #include #include - -int main() { + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ (void)pam_strerror((pam_handle_t *)NULL, -1); -; return 0; } -EOF -if { (eval echo configure:4336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""no" 1>&6 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:7321: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:7324: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:7327: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:7330: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:7332: result: no" >&5 +echo "${ECHO_T}no" >&6 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - cat >> confdefs.h <<\EOF + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + + cat >>confdefs.h <<\_ACEOF #define HAVE_OLD_PAM 1 -EOF +_ACEOF - echo "$ac_t""yes" 1>&6 + echo "$as_me:7342: result: yes" >&5 +echo "${ECHO_T}yes" >&6 PAM_MSG="yes (old library)" - - + fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi # The big search for OpenSSL + # Check whether --with-ssl-dir or --without-ssl-dir was given. if test "${with_ssl_dir+set}" = set; then withval="$with_ssl_dir" - + if test "x$withval" != "xno" ; then tryssldir=$withval fi - - -fi +fi; saved_LIBS="$LIBS" saved_LDFLAGS="$LDFLAGS" @@ -4371,23 +7365,23 @@ if test "x$prefix" != "xNONE" ; then tryssldir="$tryssldir $prefix" fi -echo $ac_n "checking for OpenSSL directory""... $ac_c" 1>&6 -echo "configure:4376: checking for OpenSSL directory" >&5 -if eval "test \"`echo '$''{'ac_cv_openssldir'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:7368: checking for OpenSSL directory" >&5 +echo $ECHO_N "checking for OpenSSL directory... $ECHO_C" >&6 +if test "${ac_cv_openssldir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - + for ssldir in $tryssldir "" /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do CPPFLAGS="$saved_CPPFLAGS" LDFLAGS="$saved_LDFLAGS" LIBS="$saved_LIBS -lcrypto" - + # Skip directories if they don't exist if test ! -z "$ssldir" -a ! -d "$ssldir" ; then continue; fi if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then - # Try to use $ssldir/lib if it exists, otherwise + # Try to use $ssldir/lib if it exists, otherwise # $ssldir if test -d "$ssldir/lib" ; then LDFLAGS="-L$ssldir/lib $saved_LDFLAGS" @@ -4400,7 +7394,7 @@ LDFLAGS="-R$ssldir $LDFLAGS" fi fi - # Try to use $ssldir/include if it exists, otherwise + # Try to use $ssldir/include if it exists, otherwise # $ssldir if test -d "$ssldir/include" ; then CPPFLAGS="-I$ssldir/include $saved_CPPFLAGS" @@ -4412,47 +7406,58 @@ # Basic test to check for compatible version and correct linking # *does not* test for RSA - that comes later. if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + { { echo "$as_me:7409: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 7414 "configure" #include "confdefs.h" #include #include -int main(void) +int main(void) { char a[2048]; memset(a, 0, sizeof(a)); RAND_add(a, sizeof(a), sizeof(a)); return(RAND_status() <= 0); } - -EOF -if { (eval echo configure:4433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:7429: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:7432: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:7434: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:7437: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + found_crypto=1 break; - + else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - - + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - if test ! -z "$found_crypto" ; then break; fi done if test -z "$found_crypto" ; then - { echo "configure: error: Could not find working OpenSSL library, please install or check config.log" 1>&2; exit 1; } + { { echo "$as_me:7458: error: Could not find working OpenSSL library, please install or check config.log" >&5 +echo "$as_me: error: Could not find working OpenSSL library, please install or check config.log" >&2;} + { (exit 1); exit 1; }; } fi if test -z "$ssldir" ; then ssldir="(system)" @@ -4461,17 +7466,17 @@ ac_cv_openssldir=$ssldir fi - -echo "$ac_t""$ac_cv_openssldir" 1>&6 +echo "$as_me:7469: result: $ac_cv_openssldir" >&5 +echo "${ECHO_T}$ac_cv_openssldir" >&6 if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_OPENSSL 1 -EOF +_ACEOF ssldir=$ac_cv_openssldir if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then - # Try to use $ssldir/lib if it exists, otherwise + # Try to use $ssldir/lib if it exists, otherwise # $ssldir if test -d "$ssldir/lib" ; then LDFLAGS="-L$ssldir/lib $saved_LDFLAGS" @@ -4484,7 +7489,7 @@ LDFLAGS="-R$ssldir $LDFLAGS" fi fi - # Try to use $ssldir/include if it exists, otherwise + # Try to use $ssldir/include if it exists, otherwise # $ssldir if test -d "$ssldir/include" ; then CPPFLAGS="-I$ssldir/include $saved_CPPFLAGS" @@ -4497,8 +7502,8 @@ # Now test RSA support saved_LIBS="$LIBS" -echo $ac_n "checking for RSA support""... $ac_c" 1>&6 -echo "configure:4502: checking for RSA support" >&5 +echo "$as_me:7505: checking for RSA support" >&5 +echo $ECHO_N "checking for RSA support... $ECHO_C" >&6 for WANTS_RSAREF in "" 1 ; do if test -z "$WANTS_RSAREF" ; then LIBS="$saved_LIBS" @@ -4506,10 +7511,12 @@ LIBS="$saved_LIBS -lRSAglue -lrsaref" fi if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + { { echo "$as_me:7514: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 7519 "configure" #include "confdefs.h" #include @@ -4517,7 +7524,7 @@ #include #include #include -int main(void) +int main(void) { int num; RSA *key; static unsigned char p_in[] = "blahblah"; unsigned char c[256], p[256]; @@ -4526,83 +7533,116 @@ num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING); return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING)); } - -EOF -if { (eval echo configure:4532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:7539: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:7542: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:7544: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:7547: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rsa_works=1 break; - + else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - done +LIBS="$saved_LIBS" if test ! -z "$no_rsa" ; then - echo "$ac_t""disabled" 1>&6 + echo "$as_me:7564: result: disabled" >&5 +echo "${ECHO_T}disabled" >&6 RSA_MSG="disabled" else if test -z "$rsa_works" ; then - echo "configure: warning: *** No RSA support found *** " 1>&2 + { echo "$as_me:7569: WARNING: *** No RSA support found *** " >&5 +echo "$as_me: WARNING: *** No RSA support found *** " >&2;} RSA_MSG="no" else if test -z "$WANTS_RSAREF" ; then - echo "$ac_t""yes" 1>&6 + echo "$as_me:7574: result: yes" >&5 +echo "${ECHO_T}yes" >&6 RSA_MSG="yes" else RSA_MSG="yes (using RSAref)" - echo "$ac_t""using RSAref" 1>&6 - LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref" + echo "$as_me:7579: result: using RSAref" >&5 +echo "${ECHO_T}using RSAref" >&6 + LIBS="$LIBS -lcrypto -lRSAglue -lrsaref" fi fi fi -# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the +# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the # version in OpenSSL. Skip this for PAM if test "x$PAM_MSG" = "xno" -a "x$check_for_libcrypt_later" = "x1"; then - echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:4570: checking for crypt in -lcrypt" >&5 -ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:7589: checking for crypt in -lcrypt" >&5 +echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6 +if test "${ac_cv_lib_crypt_crypt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypt $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 7597 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char crypt(); - -int main() { -crypt() -; return 0; } -EOF -if { (eval echo configure:4589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char crypt (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +crypt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:7622: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:7625: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:7628: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:7631: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_crypt_crypt=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_crypt_crypt=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:7642: result: $ac_cv_lib_crypt_crypt" >&5 +echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6 +if test $ac_cv_lib_crypt_crypt = yes; then LIBS="$LIBS -lcrypt" -else - echo "$ac_t""no" 1>&6 fi fi @@ -4613,967 +7653,2782 @@ fi # Checks for data types -echo $ac_n "checking size of char""... $ac_c" 1>&6 -echo "configure:4618: checking size of char" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:7656: checking for char" >&5 +echo $ECHO_N "checking for char... $ECHO_C" >&6 +if test "${ac_cv_type_char+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 7662 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +if ((char *) 0) + return 0; +if (sizeof (char)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:7683: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:7686: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:7689: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:7692: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_char=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_char=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:7702: result: $ac_cv_type_char" >&5 +echo "${ECHO_T}$ac_cv_type_char" >&6 + +echo "$as_me:7705: checking size of char" >&5 +echo $ECHO_N "checking size of char... $ECHO_C" >&6 +if test "${ac_cv_sizeof_char+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + if test "$ac_cv_type_char" = yes; then if test "$cross_compiling" = yes; then - ac_cv_sizeof_char=1 + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line 7714 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +int _array_ [1 - 2 * !((sizeof (char)) >= 0)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:7732: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:7735: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:7738: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:7741: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 7746 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +int _array_ [1 - 2 * !((sizeof (char)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:7764: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:7767: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:7770: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:7773: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done else - cat > conftest.$ac_ext < -main() + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 7789 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(char)); - exit(0); +int _array_ [1 - 2 * !((sizeof (char)) >= $ac_mid)] + ; + return 0; } -EOF -if { (eval echo configure:4637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_char=`cat conftestval` +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:7807: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:7810: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:7813: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:7816: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line 7832 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +int _array_ [1 - 2 * !((sizeof (char)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:7850: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:7853: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:7856: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:7859: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +ac_cv_sizeof_char=$ac_lo else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_char=0 + if test "$cross_compiling" = yes; then + { { echo "$as_me:7872: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line 7877 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +FILE *f = fopen ("conftest.val", "w"); +if (!f) + exit (1); +fprintf (f, "%d", (sizeof (char))); +fclose (f); + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:7899: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:7902: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:7904: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:7907: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_char=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi -echo "$ac_t""$ac_cv_sizeof_char" 1>&6 -cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_sizeof_char" >&6 +cat >>confdefs.h <<_ACEOF #define SIZEOF_CHAR $ac_cv_sizeof_char -EOF - +_ACEOF -echo $ac_n "checking size of short int""... $ac_c" 1>&6 -echo "configure:4657: checking size of short int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_short_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:7929: checking for short int" >&5 +echo $ECHO_N "checking for short int... $ECHO_C" >&6 +if test "${ac_cv_type_short_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 7935 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +if ((short int *) 0) + return 0; +if (sizeof (short int)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:7956: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:7959: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:7962: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:7965: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_short_int=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_short_int=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:7975: result: $ac_cv_type_short_int" >&5 +echo "${ECHO_T}$ac_cv_type_short_int" >&6 + +echo "$as_me:7978: checking size of short int" >&5 +echo $ECHO_N "checking size of short int... $ECHO_C" >&6 +if test "${ac_cv_sizeof_short_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + if test "$ac_cv_type_short_int" = yes; then if test "$cross_compiling" = yes; then - ac_cv_sizeof_short_int=2 + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line 7987 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +int _array_ [1 - 2 * !((sizeof (short int)) >= 0)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:8005: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:8008: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:8011: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8014: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 8019 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +int _array_ [1 - 2 * !((sizeof (short int)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:8037: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:8040: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:8043: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8046: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done else - cat > conftest.$ac_ext < -main() + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 8062 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(short int)); - exit(0); +int _array_ [1 - 2 * !((sizeof (short int)) >= $ac_mid)] + ; + return 0; } -EOF -if { (eval echo configure:4676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_short_int=`cat conftestval` +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:8080: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:8083: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:8086: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8089: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line 8105 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +int _array_ [1 - 2 * !((sizeof (short int)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:8123: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:8126: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:8129: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8132: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +ac_cv_sizeof_short_int=$ac_lo else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_short_int=0 + if test "$cross_compiling" = yes; then + { { echo "$as_me:8145: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line 8150 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +FILE *f = fopen ("conftest.val", "w"); +if (!f) + exit (1); +fprintf (f, "%d", (sizeof (short int))); +fclose (f); + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:8172: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:8175: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:8177: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8180: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_short_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi -echo "$ac_t""$ac_cv_sizeof_short_int" 1>&6 -cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_sizeof_short_int" >&6 +cat >>confdefs.h <<_ACEOF #define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int -EOF - +_ACEOF -echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:4696: checking size of int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:8202: checking for int" >&5 +echo $ECHO_N "checking for int... $ECHO_C" >&6 +if test "${ac_cv_type_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 8208 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +if ((int *) 0) + return 0; +if (sizeof (int)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:8229: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:8232: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:8235: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8238: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_int=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_int=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:8248: result: $ac_cv_type_int" >&5 +echo "${ECHO_T}$ac_cv_type_int" >&6 + +echo "$as_me:8251: checking size of int" >&5 +echo $ECHO_N "checking size of int... $ECHO_C" >&6 +if test "${ac_cv_sizeof_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + if test "$ac_cv_type_int" = yes; then if test "$cross_compiling" = yes; then - ac_cv_sizeof_int=4 + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line 8260 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +int _array_ [1 - 2 * !((sizeof (int)) >= 0)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:8278: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:8281: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:8284: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8287: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 8292 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:8310: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:8313: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:8316: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8319: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done else - cat > conftest.$ac_ext < -main() + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 8335 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(int)); - exit(0); +int _array_ [1 - 2 * !((sizeof (int)) >= $ac_mid)] + ; + return 0; } -EOF -if { (eval echo configure:4715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_int=`cat conftestval` +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:8353: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:8356: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:8359: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8362: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line 8378 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:8396: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:8399: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:8402: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8405: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +ac_cv_sizeof_int=$ac_lo else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_int=0 + if test "$cross_compiling" = yes; then + { { echo "$as_me:8418: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line 8423 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +FILE *f = fopen ("conftest.val", "w"); +if (!f) + exit (1); +fprintf (f, "%d", (sizeof (int))); +fclose (f); + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:8445: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:8448: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:8450: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8453: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi -echo "$ac_t""$ac_cv_sizeof_int" 1>&6 -cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_sizeof_int" >&6 +cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int -EOF - +_ACEOF -echo $ac_n "checking size of long int""... $ac_c" 1>&6 -echo "configure:4735: checking size of long int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:8475: checking for long int" >&5 +echo $ECHO_N "checking for long int... $ECHO_C" >&6 +if test "${ac_cv_type_long_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 8481 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +if ((long int *) 0) + return 0; +if (sizeof (long int)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:8502: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:8505: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:8508: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8511: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_long_int=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_long_int=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:8521: result: $ac_cv_type_long_int" >&5 +echo "${ECHO_T}$ac_cv_type_long_int" >&6 + +echo "$as_me:8524: checking size of long int" >&5 +echo $ECHO_N "checking size of long int... $ECHO_C" >&6 +if test "${ac_cv_sizeof_long_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + if test "$ac_cv_type_long_int" = yes; then if test "$cross_compiling" = yes; then - ac_cv_sizeof_long_int=4 + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line 8533 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +int _array_ [1 - 2 * !((sizeof (long int)) >= 0)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:8551: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:8554: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:8557: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8560: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 8565 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +int _array_ [1 - 2 * !((sizeof (long int)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:8583: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:8586: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:8589: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8592: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done else - cat > conftest.$ac_ext < -main() + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 8608 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long int)); - exit(0); +int _array_ [1 - 2 * !((sizeof (long int)) >= $ac_mid)] + ; + return 0; } -EOF -if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_long_int=`cat conftestval` +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:8626: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:8629: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:8632: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8635: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line 8651 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +int _array_ [1 - 2 * !((sizeof (long int)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:8669: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:8672: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:8675: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8678: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +ac_cv_sizeof_long_int=$ac_lo else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long_int=0 + if test "$cross_compiling" = yes; then + { { echo "$as_me:8691: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line 8696 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +FILE *f = fopen ("conftest.val", "w"); +if (!f) + exit (1); +fprintf (f, "%d", (sizeof (long int))); +fclose (f); + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:8718: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:8721: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:8723: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8726: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi -echo "$ac_t""$ac_cv_sizeof_long_int" 1>&6 -cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_sizeof_long_int" >&6 +cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_INT $ac_cv_sizeof_long_int -EOF - +_ACEOF -echo $ac_n "checking size of long long int""... $ac_c" 1>&6 -echo "configure:4774: checking size of long long int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_long_long_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:8748: checking for long long int" >&5 +echo $ECHO_N "checking for long long int... $ECHO_C" >&6 +if test "${ac_cv_type_long_long_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 8754 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +if ((long long int *) 0) + return 0; +if (sizeof (long long int)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:8775: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:8778: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:8781: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8784: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_long_long_int=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_long_long_int=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:8794: result: $ac_cv_type_long_long_int" >&5 +echo "${ECHO_T}$ac_cv_type_long_long_int" >&6 + +echo "$as_me:8797: checking size of long long int" >&5 +echo $ECHO_N "checking size of long long int... $ECHO_C" >&6 +if test "${ac_cv_sizeof_long_long_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + if test "$ac_cv_type_long_long_int" = yes; then if test "$cross_compiling" = yes; then - ac_cv_sizeof_long_long_int=8 + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line 8806 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +int _array_ [1 - 2 * !((sizeof (long long int)) >= 0)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:8824: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:8827: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:8830: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8833: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 8838 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +int _array_ [1 - 2 * !((sizeof (long long int)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:8856: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:8859: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:8862: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8865: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done else - cat > conftest.$ac_ext < -main() + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 8881 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () { - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long long int)); - exit(0); +int _array_ [1 - 2 * !((sizeof (long long int)) >= $ac_mid)] + ; + return 0; } -EOF -if { (eval echo configure:4793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_long_long_int=`cat conftestval` +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:8899: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:8902: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:8905: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8908: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line 8924 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +int _array_ [1 - 2 * !((sizeof (long long int)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:8942: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:8945: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:8948: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8951: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +ac_cv_sizeof_long_long_int=$ac_lo else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long_long_int=0 + if test "$cross_compiling" = yes; then + { { echo "$as_me:8964: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line 8969 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +FILE *f = fopen ("conftest.val", "w"); +if (!f) + exit (1); +fprintf (f, "%d", (sizeof (long long int))); +fclose (f); + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:8991: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:8994: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:8996: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:8999: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long_long_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi -echo "$ac_t""$ac_cv_sizeof_long_long_int" 1>&6 -cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_cv_sizeof_long_long_int" >&6 +cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int -EOF - - +_ACEOF # More checks for data types -echo $ac_n "checking for u_int type""... $ac_c" 1>&6 -echo "configure:4815: checking for u_int type" >&5 -if eval "test \"`echo '$''{'ac_cv_have_u_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext < -int main() { - u_int a; a = 1; -; return 0; } -EOF -if { (eval echo configure:4828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_u_int="yes" +echo "$as_me:9022: checking for u_int type" >&5 +echo $ECHO_N "checking for u_int type... $ECHO_C" >&6 +if test "${ac_cv_have_u_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_u_int="no" - -fi -rm -f conftest* + + cat >conftest.$ac_ext <<_ACEOF +#line 9029 "configure" +#include "confdefs.h" + #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + u_int a; a = 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:9047: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:9050: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:9053: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:9056: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_u_int="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_u_int="no" fi +rm -f conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_have_u_int" 1>&6 +fi +echo "$as_me:9068: result: $ac_cv_have_u_int" >&5 +echo "${ECHO_T}$ac_cv_have_u_int" >&6 if test "x$ac_cv_have_u_int" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_U_INT 1 -EOF +_ACEOF have_u_int=1 fi -echo $ac_n "checking for intXX_t types""... $ac_c" 1>&6 -echo "configure:4852: checking for intXX_t types" >&5 -if eval "test \"`echo '$''{'ac_cv_have_intxx_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext < -int main() { - int8_t a; int16_t b; int32_t c; a = b = c = 1; -; return 0; } -EOF -if { (eval echo configure:4865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_intxx_t="yes" +echo "$as_me:9078: checking for intXX_t types" >&5 +echo $ECHO_N "checking for intXX_t types... $ECHO_C" >&6 +if test "${ac_cv_have_intxx_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_intxx_t="no" - -fi -rm -f conftest* + + cat >conftest.$ac_ext <<_ACEOF +#line 9085 "configure" +#include "confdefs.h" + #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + int8_t a; int16_t b; int32_t c; a = b = c = 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:9103: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:9106: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:9109: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:9112: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_intxx_t="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_intxx_t="no" fi +rm -f conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_have_intxx_t" 1>&6 +fi +echo "$as_me:9124: result: $ac_cv_have_intxx_t" >&5 +echo "${ECHO_T}$ac_cv_have_intxx_t" >&6 if test "x$ac_cv_have_intxx_t" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_INTXX_T 1 -EOF +_ACEOF have_intxx_t=1 fi - -echo $ac_n "checking for int64_t type""... $ac_c" 1>&6 -echo "configure:4889: checking for int64_t type" >&5 -if eval "test \"`echo '$''{'ac_cv_have_int64_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext < -int main() { - int64_t a; a = 1; -; return 0; } -EOF -if { (eval echo configure:4902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_int64_t="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_int64_t="no" - -fi -rm -f conftest* -fi +if (test -z "$have_intxx_t" && \ + test "x$ac_cv_header_stdint_h" = "xyes") +then + echo "$as_me:9137: checking for intXX_t types in stdint.h" >&5 +echo $ECHO_N "checking for intXX_t types in stdint.h... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +#line 9140 "configure" +#include "confdefs.h" + #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + int8_t a; int16_t b; int32_t c; a = b = c = 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:9158: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:9161: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:9164: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:9167: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + cat >>confdefs.h <<\_ACEOF +#define HAVE_INTXX_T 1 +_ACEOF + + echo "$as_me:9174: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + echo "$as_me:9180: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi + +echo "$as_me:9187: checking for int64_t type" >&5 +echo $ECHO_N "checking for int64_t type... $ECHO_C" >&6 +if test "${ac_cv_have_int64_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 9194 "configure" +#include "confdefs.h" + #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + int64_t a; a = 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:9212: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:9215: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:9218: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:9221: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_int64_t="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_int64_t="no" + +fi +rm -f conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_have_int64_t" 1>&6 +fi +echo "$as_me:9233: result: $ac_cv_have_int64_t" >&5 +echo "${ECHO_T}$ac_cv_have_int64_t" >&6 if test "x$ac_cv_have_int64_t" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_INT64_T 1 -EOF +_ACEOF have_int64_t=1 fi - -echo $ac_n "checking for u_intXX_t types""... $ac_c" 1>&6 -echo "configure:4926: checking for u_intXX_t types" >&5 -if eval "test \"`echo '$''{'ac_cv_have_u_intxx_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext < -int main() { - u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1; -; return 0; } -EOF -if { (eval echo configure:4939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_u_intxx_t="yes" + +if test -z "$have_int64_t" ; then + echo "$as_me:9244: checking for int64_t type in sys/socket.h" >&5 +echo $ECHO_N "checking for int64_t type in sys/socket.h... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +#line 9247 "configure" +#include "confdefs.h" + #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + int64_t a; a = 1 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:9265: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:9268: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:9271: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:9274: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + cat >>confdefs.h <<\_ACEOF +#define HAVE_INT64_T 1 +_ACEOF + + echo "$as_me:9281: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_u_intxx_t="no" - + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + echo "$as_me:9287: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext +fi + +echo "$as_me:9294: checking for u_intXX_t types" >&5 +echo $ECHO_N "checking for u_intXX_t types... $ECHO_C" >&6 +if test "${ac_cv_have_u_intxx_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 9301 "configure" +#include "confdefs.h" + #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:9319: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:9322: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:9325: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:9328: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_u_intxx_t="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_u_intxx_t="no" fi +rm -f conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_have_u_intxx_t" 1>&6 +fi +echo "$as_me:9340: result: $ac_cv_have_u_intxx_t" >&5 +echo "${ECHO_T}$ac_cv_have_u_intxx_t" >&6 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_U_INTXX_T 1 -EOF +_ACEOF have_u_intxx_t=1 fi -echo $ac_n "checking for u_int64_t types""... $ac_c" 1>&6 -echo "configure:4963: checking for u_int64_t types" >&5 -if eval "test \"`echo '$''{'ac_cv_have_u_int64_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext < -int main() { - u_int64_t a; a = 1; -; return 0; } -EOF -if { (eval echo configure:4976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_u_int64_t="yes" +if test -z "$have_u_intxx_t" ; then + echo "$as_me:9351: checking for u_intXX_t types in sys/socket.h" >&5 +echo $ECHO_N "checking for u_intXX_t types in sys/socket.h... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +#line 9354 "configure" +#include "confdefs.h" + #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:9372: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:9375: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:9378: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:9381: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + cat >>confdefs.h <<\_ACEOF +#define HAVE_U_INTXX_T 1 +_ACEOF + + echo "$as_me:9388: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_u_int64_t="no" - + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + echo "$as_me:9394: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext +fi + +echo "$as_me:9401: checking for u_int64_t types" >&5 +echo $ECHO_N "checking for u_int64_t types... $ECHO_C" >&6 +if test "${ac_cv_have_u_int64_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 9408 "configure" +#include "confdefs.h" + #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + u_int64_t a; a = 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:9426: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:9429: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:9432: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:9435: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_u_int64_t="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_u_int64_t="no" fi +rm -f conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_have_u_int64_t" 1>&6 +fi +echo "$as_me:9447: result: $ac_cv_have_u_int64_t" >&5 +echo "${ECHO_T}$ac_cv_have_u_int64_t" >&6 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_U_INT64_T 1 -EOF +_ACEOF have_u_int64_t=1 fi +if test -z "$have_u_intxx_t" ; then + echo "$as_me:9458: checking for uintXX_t types" >&5 +echo $ECHO_N "checking for uintXX_t types... $ECHO_C" >&6 +if test "${ac_cv_have_uintxx_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 9465 "configure" +#include "confdefs.h" + +#include + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:9485: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:9488: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:9491: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:9494: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_uintxx_t="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_uintxx_t="no" + +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:9506: result: $ac_cv_have_uintxx_t" >&5 +echo "${ECHO_T}$ac_cv_have_uintxx_t" >&6 + if test "x$ac_cv_have_uintxx_t" = "xyes" ; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_UINTXX_T 1 +_ACEOF + + fi +fi + +if test -z "$have_uintxx_t" ; then + echo "$as_me:9517: checking for uintXX_t types in stdint.h" >&5 +echo $ECHO_N "checking for uintXX_t types in stdint.h... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +#line 9520 "configure" +#include "confdefs.h" + #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:9538: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:9541: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:9544: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:9547: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + cat >>confdefs.h <<\_ACEOF +#define HAVE_UINTXX_T 1 +_ACEOF + + echo "$as_me:9554: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + echo "$as_me:9560: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi + if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \ test "x$ac_cv_header_sys_bitypes_h" = "xyes") then - echo $ac_n "checking for intXX_t and u_intXX_t types in sys/bitypes.h""... $ac_c" 1>&6 -echo "configure:5003: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5 - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for intXX_t and u_intXX_t types in sys/bitypes.h... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +#line 9573 "configure" #include "confdefs.h" #include - -int main() { + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ int8_t a; int16_t b; int32_t c; u_int8_t e; u_int16_t f; u_int32_t g; a = b = c = e = f = g = 1; - -; return 0; } -EOF -if { (eval echo configure:5018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - - cat >> confdefs.h <<\EOF + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:9597: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:9600: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:9603: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:9606: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + cat >>confdefs.h <<\_ACEOF #define HAVE_U_INTXX_T 1 -EOF +_ACEOF - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_INTXX_T 1 -EOF +_ACEOF + + echo "$as_me:9617: result: yes" >&5 +echo "${ECHO_T}yes" >&6 - echo "$ac_t""yes" 1>&6 - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 - + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:9623: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi -if test -z "$have_u_intxx_t" ; then - echo $ac_n "checking for uintXX_t types""... $ac_c" 1>&6 -echo "configure:5043: checking for uintXX_t types" >&5 -if eval "test \"`echo '$''{'ac_cv_have_uintxx_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for u_char... $ECHO_C" >&6 +if test "${ac_cv_have_u_char+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 9637 "configure" #include "confdefs.h" #include - -int main() { - uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; -; return 0; } -EOF -if { (eval echo configure:5058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_uintxx_t="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_uintxx_t="no" - -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_have_uintxx_t" 1>&6 - if test "x$ac_cv_have_uintxx_t" = "xyes" ; then - cat >> confdefs.h <<\EOF -#define HAVE_UINTXX_T 1 -EOF +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + u_char foo; foo = 125; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:9657: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:9660: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:9663: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:9666: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_u_char="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_u_char="no" + +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:9678: result: $ac_cv_have_u_char" >&5 +echo "${ECHO_T}$ac_cv_have_u_char" >&6 +if test "x$ac_cv_have_u_char" = "xyes" ; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_U_CHAR 1 +_ACEOF - fi fi -echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 -echo "configure:5082: checking for socklen_t" >&5 -if eval "test \"`echo '$''{'ac_cv_have_socklen_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:9687: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 +if test "${ac_cv_have_socklen_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 9694 "configure" #include "confdefs.h" #include #include - -int main() { + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ socklen_t foo; foo = 1235; -; return 0; } -EOF -if { (eval echo configure:5098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_socklen_t="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_socklen_t="no" - -fi -rm -f conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:9715: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:9718: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:9721: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:9724: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_socklen_t="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_socklen_t="no" fi +rm -f conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_have_socklen_t" 1>&6 +fi +echo "$as_me:9736: result: $ac_cv_have_socklen_t" >&5 +echo "${ECHO_T}$ac_cv_have_socklen_t" >&6 if test "x$ac_cv_have_socklen_t" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKLEN_T 1 -EOF +_ACEOF fi -echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5121: checking for size_t" >&5 -if eval "test \"`echo '$''{'ac_cv_have_size_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:9745: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +if test "${ac_cv_have_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 9752 "configure" #include "confdefs.h" #include - -int main() { - size_t foo; foo = 1235; -; return 0; } -EOF -if { (eval echo configure:5136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_size_t="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_size_t="no" - -fi -rm -f conftest* + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + size_t foo; foo = 1235; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:9772: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:9775: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:9778: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:9781: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_size_t="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_size_t="no" fi +rm -f conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_have_size_t" 1>&6 +fi +echo "$as_me:9793: result: $ac_cv_have_size_t" >&5 +echo "${ECHO_T}$ac_cv_have_size_t" >&6 if test "x$ac_cv_have_size_t" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SIZE_T 1 -EOF +_ACEOF fi -echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:5159: checking for ssize_t" >&5 -if eval "test \"`echo '$''{'ac_cv_have_ssize_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:9802: checking for ssize_t" >&5 +echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 +if test "${ac_cv_have_ssize_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 9809 "configure" #include "confdefs.h" #include - -int main() { - ssize_t foo; foo = 1235; -; return 0; } -EOF -if { (eval echo configure:5174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_ssize_t="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_ssize_t="no" - -fi -rm -f conftest* + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + ssize_t foo; foo = 1235; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:9829: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:9832: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:9835: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:9838: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_ssize_t="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_ssize_t="no" fi +rm -f conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_have_ssize_t" 1>&6 +fi +echo "$as_me:9850: result: $ac_cv_have_ssize_t" >&5 +echo "${ECHO_T}$ac_cv_have_ssize_t" >&6 if test "x$ac_cv_have_ssize_t" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SSIZE_T 1 -EOF +_ACEOF fi -echo $ac_n "checking for clock_t""... $ac_c" 1>&6 -echo "configure:5197: checking for clock_t" >&5 -if eval "test \"`echo '$''{'ac_cv_have_clock_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:9859: checking for clock_t" >&5 +echo $ECHO_N "checking for clock_t... $ECHO_C" >&6 +if test "${ac_cv_have_clock_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 9866 "configure" #include "confdefs.h" #include - -int main() { - clock_t foo; foo = 1235; -; return 0; } -EOF -if { (eval echo configure:5212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_clock_t="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_clock_t="no" - -fi -rm -f conftest* + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + clock_t foo; foo = 1235; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:9886: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:9889: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:9892: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:9895: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_clock_t="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_clock_t="no" fi +rm -f conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_have_clock_t" 1>&6 +fi +echo "$as_me:9907: result: $ac_cv_have_clock_t" >&5 +echo "${ECHO_T}$ac_cv_have_clock_t" >&6 if test "x$ac_cv_have_clock_t" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_CLOCK_T 1 -EOF +_ACEOF fi -echo $ac_n "checking for sa_family_t""... $ac_c" 1>&6 -echo "configure:5235: checking for sa_family_t" >&5 -if eval "test \"`echo '$''{'ac_cv_have_sa_family_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:9916: checking for sa_family_t" >&5 +echo $ECHO_N "checking for sa_family_t... $ECHO_C" >&6 +if test "${ac_cv_have_sa_family_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 9923 "configure" #include "confdefs.h" #include #include - -int main() { - sa_family_t foo; foo = 1235; -; return 0; } -EOF -if { (eval echo configure:5251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_sa_family_t="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:9947: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:9950: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:9953: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_sa_family_t="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + cat >conftest.$ac_ext <<_ACEOF +#line 9960 "configure" #include "confdefs.h" #include #include #include - -int main() { - sa_family_t foo; foo = 1235; -; return 0; } -EOF -if { (eval echo configure:5270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_sa_family_t="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_sa_family_t="no" - -fi -rm -f conftest* - + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + sa_family_t foo; foo = 1235; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:9982: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:9985: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:9988: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:9991: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_sa_family_t="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_sa_family_t="no" + fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi +rm -f conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_have_sa_family_t" 1>&6 +fi +echo "$as_me:10006: result: $ac_cv_have_sa_family_t" >&5 +echo "${ECHO_T}$ac_cv_have_sa_family_t" >&6 if test "x$ac_cv_have_sa_family_t" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SA_FAMILY_T 1 -EOF +_ACEOF fi -echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:5296: checking for pid_t" >&5 -if eval "test \"`echo '$''{'ac_cv_have_pid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:10015: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +if test "${ac_cv_have_pid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 10022 "configure" #include "confdefs.h" #include - -int main() { - pid_t foo; foo = 1235; -; return 0; } -EOF -if { (eval echo configure:5311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_pid_t="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_pid_t="no" - -fi -rm -f conftest* + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + pid_t foo; foo = 1235; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:10042: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:10045: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:10048: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:10051: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_pid_t="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_pid_t="no" fi +rm -f conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_have_pid_t" 1>&6 +fi +echo "$as_me:10063: result: $ac_cv_have_pid_t" >&5 +echo "${ECHO_T}$ac_cv_have_pid_t" >&6 if test "x$ac_cv_have_pid_t" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_PID_T 1 -EOF +_ACEOF fi -echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:5334: checking for mode_t" >&5 -if eval "test \"`echo '$''{'ac_cv_have_mode_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:10072: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 +if test "${ac_cv_have_mode_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 10079 "configure" #include "confdefs.h" #include - -int main() { - mode_t foo; foo = 1235; -; return 0; } -EOF -if { (eval echo configure:5349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_mode_t="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_mode_t="no" - -fi -rm -f conftest* + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + mode_t foo; foo = 1235; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:10099: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:10102: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:10105: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:10108: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_mode_t="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_mode_t="no" fi +rm -f conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_have_mode_t" 1>&6 +fi +echo "$as_me:10120: result: $ac_cv_have_mode_t" >&5 +echo "${ECHO_T}$ac_cv_have_mode_t" >&6 if test "x$ac_cv_have_mode_t" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_MODE_T 1 -EOF +_ACEOF fi - -echo $ac_n "checking for struct sockaddr_storage""... $ac_c" 1>&6 -echo "configure:5373: checking for struct sockaddr_storage" >&5 -if eval "test \"`echo '$''{'ac_cv_have_struct_sockaddr_storage'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:10129: checking for struct sockaddr_storage" >&5 +echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6 +if test "${ac_cv_have_struct_sockaddr_storage+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 10136 "configure" #include "confdefs.h" #include #include - -int main() { - struct sockaddr_storage s; -; return 0; } -EOF -if { (eval echo configure:5389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_struct_sockaddr_storage="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_struct_sockaddr_storage="no" - -fi -rm -f conftest* + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + struct sockaddr_storage s; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:10157: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:10160: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:10163: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:10166: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_struct_sockaddr_storage="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_struct_sockaddr_storage="no" fi +rm -f conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_have_struct_sockaddr_storage" 1>&6 +fi +echo "$as_me:10178: result: $ac_cv_have_struct_sockaddr_storage" >&5 +echo "${ECHO_T}$ac_cv_have_struct_sockaddr_storage" >&6 if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_STRUCT_SOCKADDR_STORAGE 1 -EOF +_ACEOF fi -echo $ac_n "checking for struct sockaddr_in6""... $ac_c" 1>&6 -echo "configure:5412: checking for struct sockaddr_in6" >&5 -if eval "test \"`echo '$''{'ac_cv_have_struct_sockaddr_in6'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:10187: checking for struct sockaddr_in6" >&5 +echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6 +if test "${ac_cv_have_struct_sockaddr_in6+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 10194 "configure" #include "confdefs.h" #include #include - -int main() { - struct sockaddr_in6 s; s.sin6_family = 0; -; return 0; } -EOF -if { (eval echo configure:5428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_struct_sockaddr_in6="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_struct_sockaddr_in6="no" - -fi -rm -f conftest* + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + struct sockaddr_in6 s; s.sin6_family = 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:10215: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:10218: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:10221: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:10224: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_struct_sockaddr_in6="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_struct_sockaddr_in6="no" fi +rm -f conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_have_struct_sockaddr_in6" 1>&6 +fi +echo "$as_me:10236: result: $ac_cv_have_struct_sockaddr_in6" >&5 +echo "${ECHO_T}$ac_cv_have_struct_sockaddr_in6" >&6 if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_STRUCT_SOCKADDR_IN6 1 -EOF +_ACEOF fi -echo $ac_n "checking for struct in6_addr""... $ac_c" 1>&6 -echo "configure:5451: checking for struct in6_addr" >&5 -if eval "test \"`echo '$''{'ac_cv_have_struct_in6_addr'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:10245: checking for struct in6_addr" >&5 +echo $ECHO_N "checking for struct in6_addr... $ECHO_C" >&6 +if test "${ac_cv_have_struct_in6_addr+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 10252 "configure" #include "confdefs.h" #include #include - -int main() { - struct in6_addr s; s.s6_addr[0] = 0; -; return 0; } -EOF -if { (eval echo configure:5467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_struct_in6_addr="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_struct_in6_addr="no" - -fi -rm -f conftest* + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + struct in6_addr s; s.s6_addr[0] = 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:10273: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:10276: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:10279: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:10282: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_struct_in6_addr="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_struct_in6_addr="no" fi +rm -f conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_have_struct_in6_addr" 1>&6 +fi +echo "$as_me:10294: result: $ac_cv_have_struct_in6_addr" >&5 +echo "${ECHO_T}$ac_cv_have_struct_in6_addr" >&6 if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_STRUCT_IN6_ADDR 1 -EOF +_ACEOF fi -echo $ac_n "checking for struct addrinfo""... $ac_c" 1>&6 -echo "configure:5490: checking for struct addrinfo" >&5 -if eval "test \"`echo '$''{'ac_cv_have_struct_addrinfo'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:10303: checking for struct addrinfo" >&5 +echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6 +if test "${ac_cv_have_struct_addrinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 10310 "configure" #include "confdefs.h" #include #include #include - -int main() { - struct addrinfo s; s.ai_flags = AI_PASSIVE; -; return 0; } -EOF -if { (eval echo configure:5507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_struct_addrinfo="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_struct_addrinfo="no" - -fi -rm -f conftest* + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + struct addrinfo s; s.ai_flags = AI_PASSIVE; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:10332: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:10335: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:10338: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:10341: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_struct_addrinfo="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_struct_addrinfo="no" fi +rm -f conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_have_struct_addrinfo" 1>&6 +fi +echo "$as_me:10353: result: $ac_cv_have_struct_addrinfo" >&5 +echo "${ECHO_T}$ac_cv_have_struct_addrinfo" >&6 if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_STRUCT_ADDRINFO 1 -EOF +_ACEOF fi -echo $ac_n "checking for struct timeval""... $ac_c" 1>&6 -echo "configure:5530: checking for struct timeval" >&5 -if eval "test \"`echo '$''{'ac_cv_have_struct_timeval'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:10362: checking for struct timeval" >&5 +echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6 +if test "${ac_cv_have_struct_timeval+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 10369 "configure" #include "confdefs.h" - #include -int main() { + #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ struct timeval tv; tv.tv_sec = 1; -; return 0; } -EOF -if { (eval echo configure:5543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_struct_timeval="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_struct_timeval="no" - -fi -rm -f conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:10387: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:10390: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:10393: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:10396: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_struct_timeval="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_struct_timeval="no" fi +rm -f conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_have_struct_timeval" 1>&6 +fi +echo "$as_me:10408: result: $ac_cv_have_struct_timeval" >&5 +echo "${ECHO_T}$ac_cv_have_struct_timeval" >&6 if test "x$ac_cv_have_struct_timeval" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_STRUCT_TIMEVAL 1 -EOF +_ACEOF have_struct_timeval=1 fi # If we don't have int64_t then we can't compile sftp-server. So don't -# even attempt to do it. +# even attempt to do it. if test "x$ac_cv_have_int64_t" = "xno" -a \ "x$ac_cv_sizeof_long_int" != "x8" -a \ "x$ac_cv_sizeof_long_long_int" = "x0" ; then NO_SFTP='#' else if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + { { echo "$as_me:10426: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 10431 "configure" #include "confdefs.h" #include @@ -5587,7 +10442,7 @@ #if (SIZEOF_LONG_INT == 8) long int num = 0x7fffffffffffffff; #else - long long num = 0x7fffffffffffffff; + long long num = 0x7fffffffffffffffll; #endif strcpy(expected_out, "9223372036854775807"); snprintf(buf, mazsize, "%lld", num); @@ -5598,1015 +10453,1504 @@ #else main() { exit(0); } #endif - -EOF -if { (eval echo configure:5604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - true -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - cat >> confdefs.h <<\EOF + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:10459: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:10462: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:10464: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:10467: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + true +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + cat >>confdefs.h <<\_ACEOF #define BROKEN_SNPRINTF 1 -EOF - - +_ACEOF + fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - - # look for field 'ut_host' in header 'utmp.h' ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host - echo $ac_n "checking for ut_host field in utmp.h""... $ac_c" 1>&6 -echo "configure:5628: checking for ut_host field in utmp.h" >&5 - if eval "test \"`echo '$''{'$ossh_varname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for ut_host field in utmp.h... $ECHO_C" >&6 + if eval "test \"\${$ossh_varname+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 10493 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "ut_host" >/dev/null 2>&1; then - rm -rf conftest* - eval "$ossh_varname=yes" + eval "$ossh_varname=yes" else - rm -rf conftest* - eval "$ossh_varname=no" + eval "$ossh_varname=no" fi rm -f conftest* - + fi ossh_result=`eval 'echo $'"$ossh_varname"` if test -n "`echo $ossh_varname`"; then - echo "$ac_t""$ossh_result" 1>&6 + echo "$as_me:10510: result: $ossh_result" >&5 +echo "${ECHO_T}$ossh_result" >&6 if test "x$ossh_result" = "xyes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_HOST_IN_UTMP 1 -EOF +_ACEOF fi else - echo "$ac_t""no" 1>&6 + echo "$as_me:10519: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # look for field 'ut_host' in header 'utmpx.h' ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host - echo $ac_n "checking for ut_host field in utmpx.h""... $ac_c" 1>&6 -echo "configure:5668: checking for ut_host field in utmpx.h" >&5 - if eval "test \"`echo '$''{'$ossh_varname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for ut_host field in utmpx.h... $ECHO_C" >&6 + if eval "test \"\${$ossh_varname+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 10533 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "ut_host" >/dev/null 2>&1; then - rm -rf conftest* - eval "$ossh_varname=yes" + eval "$ossh_varname=yes" else - rm -rf conftest* - eval "$ossh_varname=no" + eval "$ossh_varname=no" fi rm -f conftest* - + fi ossh_result=`eval 'echo $'"$ossh_varname"` if test -n "`echo $ossh_varname`"; then - echo "$ac_t""$ossh_result" 1>&6 + echo "$as_me:10550: result: $ossh_result" >&5 +echo "${ECHO_T}$ossh_result" >&6 if test "x$ossh_result" = "xyes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_HOST_IN_UTMPX 1 -EOF +_ACEOF fi else - echo "$ac_t""no" 1>&6 + echo "$as_me:10559: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # look for field 'syslen' in header 'utmpx.h' ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` ossh_varname="ossh_cv_$ossh_safe""_has_"syslen - echo $ac_n "checking for syslen field in utmpx.h""... $ac_c" 1>&6 -echo "configure:5708: checking for syslen field in utmpx.h" >&5 - if eval "test \"`echo '$''{'$ossh_varname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for syslen field in utmpx.h... $ECHO_C" >&6 + if eval "test \"\${$ossh_varname+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 10573 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "syslen" >/dev/null 2>&1; then - rm -rf conftest* - eval "$ossh_varname=yes" + eval "$ossh_varname=yes" else - rm -rf conftest* - eval "$ossh_varname=no" + eval "$ossh_varname=no" fi rm -f conftest* - + fi ossh_result=`eval 'echo $'"$ossh_varname"` if test -n "`echo $ossh_varname`"; then - echo "$ac_t""$ossh_result" 1>&6 + echo "$as_me:10590: result: $ossh_result" >&5 +echo "${ECHO_T}$ossh_result" >&6 if test "x$ossh_result" = "xyes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SYSLEN_IN_UTMPX 1 -EOF +_ACEOF fi else - echo "$ac_t""no" 1>&6 + echo "$as_me:10599: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # look for field 'ut_pid' in header 'utmp.h' ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid - echo $ac_n "checking for ut_pid field in utmp.h""... $ac_c" 1>&6 -echo "configure:5748: checking for ut_pid field in utmp.h" >&5 - if eval "test \"`echo '$''{'$ossh_varname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for ut_pid field in utmp.h... $ECHO_C" >&6 + if eval "test \"\${$ossh_varname+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 10613 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "ut_pid" >/dev/null 2>&1; then - rm -rf conftest* - eval "$ossh_varname=yes" + eval "$ossh_varname=yes" else - rm -rf conftest* - eval "$ossh_varname=no" + eval "$ossh_varname=no" fi rm -f conftest* - + fi ossh_result=`eval 'echo $'"$ossh_varname"` if test -n "`echo $ossh_varname`"; then - echo "$ac_t""$ossh_result" 1>&6 + echo "$as_me:10630: result: $ossh_result" >&5 +echo "${ECHO_T}$ossh_result" >&6 if test "x$ossh_result" = "xyes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_PID_IN_UTMP 1 -EOF +_ACEOF fi else - echo "$ac_t""no" 1>&6 + echo "$as_me:10639: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # look for field 'ut_type' in header 'utmp.h' ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type - echo $ac_n "checking for ut_type field in utmp.h""... $ac_c" 1>&6 -echo "configure:5788: checking for ut_type field in utmp.h" >&5 - if eval "test \"`echo '$''{'$ossh_varname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for ut_type field in utmp.h... $ECHO_C" >&6 + if eval "test \"\${$ossh_varname+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 10653 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "ut_type" >/dev/null 2>&1; then - rm -rf conftest* - eval "$ossh_varname=yes" + eval "$ossh_varname=yes" else - rm -rf conftest* - eval "$ossh_varname=no" + eval "$ossh_varname=no" fi rm -f conftest* - + fi ossh_result=`eval 'echo $'"$ossh_varname"` if test -n "`echo $ossh_varname`"; then - echo "$ac_t""$ossh_result" 1>&6 + echo "$as_me:10670: result: $ossh_result" >&5 +echo "${ECHO_T}$ossh_result" >&6 if test "x$ossh_result" = "xyes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_IN_UTMP 1 -EOF +_ACEOF fi else - echo "$ac_t""no" 1>&6 + echo "$as_me:10679: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # look for field 'ut_type' in header 'utmpx.h' ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type - echo $ac_n "checking for ut_type field in utmpx.h""... $ac_c" 1>&6 -echo "configure:5828: checking for ut_type field in utmpx.h" >&5 - if eval "test \"`echo '$''{'$ossh_varname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for ut_type field in utmpx.h... $ECHO_C" >&6 + if eval "test \"\${$ossh_varname+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 10693 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "ut_type" >/dev/null 2>&1; then - rm -rf conftest* - eval "$ossh_varname=yes" + eval "$ossh_varname=yes" else - rm -rf conftest* - eval "$ossh_varname=no" + eval "$ossh_varname=no" fi rm -f conftest* - + fi ossh_result=`eval 'echo $'"$ossh_varname"` if test -n "`echo $ossh_varname`"; then - echo "$ac_t""$ossh_result" 1>&6 + echo "$as_me:10710: result: $ossh_result" >&5 +echo "${ECHO_T}$ossh_result" >&6 if test "x$ossh_result" = "xyes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_IN_UTMPX 1 -EOF +_ACEOF fi else - echo "$ac_t""no" 1>&6 + echo "$as_me:10719: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # look for field 'ut_tv' in header 'utmp.h' ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv - echo $ac_n "checking for ut_tv field in utmp.h""... $ac_c" 1>&6 -echo "configure:5868: checking for ut_tv field in utmp.h" >&5 - if eval "test \"`echo '$''{'$ossh_varname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for ut_tv field in utmp.h... $ECHO_C" >&6 + if eval "test \"\${$ossh_varname+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 10733 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "ut_tv" >/dev/null 2>&1; then - rm -rf conftest* - eval "$ossh_varname=yes" + eval "$ossh_varname=yes" else - rm -rf conftest* - eval "$ossh_varname=no" + eval "$ossh_varname=no" fi rm -f conftest* - + fi ossh_result=`eval 'echo $'"$ossh_varname"` if test -n "`echo $ossh_varname`"; then - echo "$ac_t""$ossh_result" 1>&6 + echo "$as_me:10750: result: $ossh_result" >&5 +echo "${ECHO_T}$ossh_result" >&6 if test "x$ossh_result" = "xyes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_TV_IN_UTMP 1 -EOF +_ACEOF fi else - echo "$ac_t""no" 1>&6 + echo "$as_me:10759: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # look for field 'ut_id' in header 'utmp.h' ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id - echo $ac_n "checking for ut_id field in utmp.h""... $ac_c" 1>&6 -echo "configure:5908: checking for ut_id field in utmp.h" >&5 - if eval "test \"`echo '$''{'$ossh_varname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for ut_id field in utmp.h... $ECHO_C" >&6 + if eval "test \"\${$ossh_varname+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 10773 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "ut_id" >/dev/null 2>&1; then - rm -rf conftest* - eval "$ossh_varname=yes" + eval "$ossh_varname=yes" else - rm -rf conftest* - eval "$ossh_varname=no" + eval "$ossh_varname=no" fi rm -f conftest* - + fi ossh_result=`eval 'echo $'"$ossh_varname"` if test -n "`echo $ossh_varname`"; then - echo "$ac_t""$ossh_result" 1>&6 + echo "$as_me:10790: result: $ossh_result" >&5 +echo "${ECHO_T}$ossh_result" >&6 if test "x$ossh_result" = "xyes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_ID_IN_UTMP 1 -EOF +_ACEOF fi else - echo "$ac_t""no" 1>&6 + echo "$as_me:10799: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # look for field 'ut_id' in header 'utmpx.h' ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id - echo $ac_n "checking for ut_id field in utmpx.h""... $ac_c" 1>&6 -echo "configure:5948: checking for ut_id field in utmpx.h" >&5 - if eval "test \"`echo '$''{'$ossh_varname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for ut_id field in utmpx.h... $ECHO_C" >&6 + if eval "test \"\${$ossh_varname+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 10813 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "ut_id" >/dev/null 2>&1; then - rm -rf conftest* - eval "$ossh_varname=yes" + eval "$ossh_varname=yes" else - rm -rf conftest* - eval "$ossh_varname=no" + eval "$ossh_varname=no" fi rm -f conftest* - + fi ossh_result=`eval 'echo $'"$ossh_varname"` if test -n "`echo $ossh_varname`"; then - echo "$ac_t""$ossh_result" 1>&6 + echo "$as_me:10830: result: $ossh_result" >&5 +echo "${ECHO_T}$ossh_result" >&6 if test "x$ossh_result" = "xyes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_ID_IN_UTMPX 1 -EOF +_ACEOF fi else - echo "$ac_t""no" 1>&6 + echo "$as_me:10839: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # look for field 'ut_addr' in header 'utmp.h' ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr - echo $ac_n "checking for ut_addr field in utmp.h""... $ac_c" 1>&6 -echo "configure:5988: checking for ut_addr field in utmp.h" >&5 - if eval "test \"`echo '$''{'$ossh_varname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for ut_addr field in utmp.h... $ECHO_C" >&6 + if eval "test \"\${$ossh_varname+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 10853 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "ut_addr" >/dev/null 2>&1; then - rm -rf conftest* - eval "$ossh_varname=yes" + eval "$ossh_varname=yes" else - rm -rf conftest* - eval "$ossh_varname=no" + eval "$ossh_varname=no" fi rm -f conftest* - + fi ossh_result=`eval 'echo $'"$ossh_varname"` if test -n "`echo $ossh_varname`"; then - echo "$ac_t""$ossh_result" 1>&6 + echo "$as_me:10870: result: $ossh_result" >&5 +echo "${ECHO_T}$ossh_result" >&6 if test "x$ossh_result" = "xyes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_ADDR_IN_UTMP 1 -EOF +_ACEOF fi else - echo "$ac_t""no" 1>&6 + echo "$as_me:10879: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # look for field 'ut_addr' in header 'utmpx.h' ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr - echo $ac_n "checking for ut_addr field in utmpx.h""... $ac_c" 1>&6 -echo "configure:6028: checking for ut_addr field in utmpx.h" >&5 - if eval "test \"`echo '$''{'$ossh_varname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for ut_addr field in utmpx.h... $ECHO_C" >&6 + if eval "test \"\${$ossh_varname+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 10893 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "ut_addr" >/dev/null 2>&1; then - rm -rf conftest* - eval "$ossh_varname=yes" + eval "$ossh_varname=yes" else - rm -rf conftest* - eval "$ossh_varname=no" + eval "$ossh_varname=no" fi rm -f conftest* - + fi ossh_result=`eval 'echo $'"$ossh_varname"` if test -n "`echo $ossh_varname`"; then - echo "$ac_t""$ossh_result" 1>&6 + echo "$as_me:10910: result: $ossh_result" >&5 +echo "${ECHO_T}$ossh_result" >&6 if test "x$ossh_result" = "xyes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_ADDR_IN_UTMPX 1 -EOF +_ACEOF fi else - echo "$ac_t""no" 1>&6 + echo "$as_me:10919: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # look for field 'ut_addr_v6' in header 'utmp.h' ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6 - echo $ac_n "checking for ut_addr_v6 field in utmp.h""... $ac_c" 1>&6 -echo "configure:6068: checking for ut_addr_v6 field in utmp.h" >&5 - if eval "test \"`echo '$''{'$ossh_varname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for ut_addr_v6 field in utmp.h... $ECHO_C" >&6 + if eval "test \"\${$ossh_varname+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 10933 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "ut_addr_v6" >/dev/null 2>&1; then - rm -rf conftest* - eval "$ossh_varname=yes" + eval "$ossh_varname=yes" else - rm -rf conftest* - eval "$ossh_varname=no" + eval "$ossh_varname=no" fi rm -f conftest* - + fi ossh_result=`eval 'echo $'"$ossh_varname"` if test -n "`echo $ossh_varname`"; then - echo "$ac_t""$ossh_result" 1>&6 + echo "$as_me:10950: result: $ossh_result" >&5 +echo "${ECHO_T}$ossh_result" >&6 if test "x$ossh_result" = "xyes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_ADDR_V6_IN_UTMP 1 -EOF +_ACEOF fi else - echo "$ac_t""no" 1>&6 + echo "$as_me:10959: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # look for field 'ut_addr_v6' in header 'utmpx.h' ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6 - echo $ac_n "checking for ut_addr_v6 field in utmpx.h""... $ac_c" 1>&6 -echo "configure:6108: checking for ut_addr_v6 field in utmpx.h" >&5 - if eval "test \"`echo '$''{'$ossh_varname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for ut_addr_v6 field in utmpx.h... $ECHO_C" >&6 + if eval "test \"\${$ossh_varname+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 10973 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "ut_addr_v6" >/dev/null 2>&1; then - rm -rf conftest* - eval "$ossh_varname=yes" + eval "$ossh_varname=yes" else - rm -rf conftest* - eval "$ossh_varname=no" + eval "$ossh_varname=no" fi rm -f conftest* - + fi ossh_result=`eval 'echo $'"$ossh_varname"` if test -n "`echo $ossh_varname`"; then - echo "$ac_t""$ossh_result" 1>&6 + echo "$as_me:10990: result: $ossh_result" >&5 +echo "${ECHO_T}$ossh_result" >&6 if test "x$ossh_result" = "xyes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_ADDR_V6_IN_UTMPX 1 -EOF +_ACEOF fi else - echo "$ac_t""no" 1>&6 + echo "$as_me:10999: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # look for field 'ut_exit' in header 'utmp.h' ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit - echo $ac_n "checking for ut_exit field in utmp.h""... $ac_c" 1>&6 -echo "configure:6148: checking for ut_exit field in utmp.h" >&5 - if eval "test \"`echo '$''{'$ossh_varname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for ut_exit field in utmp.h... $ECHO_C" >&6 + if eval "test \"\${$ossh_varname+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 11013 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "ut_exit" >/dev/null 2>&1; then - rm -rf conftest* - eval "$ossh_varname=yes" + eval "$ossh_varname=yes" else - rm -rf conftest* - eval "$ossh_varname=no" + eval "$ossh_varname=no" fi rm -f conftest* - + fi ossh_result=`eval 'echo $'"$ossh_varname"` if test -n "`echo $ossh_varname`"; then - echo "$ac_t""$ossh_result" 1>&6 + echo "$as_me:11030: result: $ossh_result" >&5 +echo "${ECHO_T}$ossh_result" >&6 if test "x$ossh_result" = "xyes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_EXIT_IN_UTMP 1 -EOF +_ACEOF fi else - echo "$ac_t""no" 1>&6 + echo "$as_me:11039: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # look for field 'ut_time' in header 'utmp.h' ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time - echo $ac_n "checking for ut_time field in utmp.h""... $ac_c" 1>&6 -echo "configure:6188: checking for ut_time field in utmp.h" >&5 - if eval "test \"`echo '$''{'$ossh_varname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for ut_time field in utmp.h... $ECHO_C" >&6 + if eval "test \"\${$ossh_varname+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 11053 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "ut_time" >/dev/null 2>&1; then - rm -rf conftest* - eval "$ossh_varname=yes" + eval "$ossh_varname=yes" else - rm -rf conftest* - eval "$ossh_varname=no" + eval "$ossh_varname=no" fi rm -f conftest* - + fi ossh_result=`eval 'echo $'"$ossh_varname"` if test -n "`echo $ossh_varname`"; then - echo "$ac_t""$ossh_result" 1>&6 + echo "$as_me:11070: result: $ossh_result" >&5 +echo "${ECHO_T}$ossh_result" >&6 if test "x$ossh_result" = "xyes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_TIME_IN_UTMP 1 -EOF +_ACEOF fi else - echo "$ac_t""no" 1>&6 + echo "$as_me:11079: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # look for field 'ut_time' in header 'utmpx.h' ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time - echo $ac_n "checking for ut_time field in utmpx.h""... $ac_c" 1>&6 -echo "configure:6228: checking for ut_time field in utmpx.h" >&5 - if eval "test \"`echo '$''{'$ossh_varname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:11086: checking for ut_time field in utmpx.h" >&5 +echo $ECHO_N "checking for ut_time field in utmpx.h... $ECHO_C" >&6 + if eval "test \"\${$ossh_varname+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 11093 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "ut_time" >/dev/null 2>&1; then - rm -rf conftest* - eval "$ossh_varname=yes" + eval "$ossh_varname=yes" else - rm -rf conftest* - eval "$ossh_varname=no" + eval "$ossh_varname=no" fi rm -f conftest* - + fi ossh_result=`eval 'echo $'"$ossh_varname"` if test -n "`echo $ossh_varname`"; then - echo "$ac_t""$ossh_result" 1>&6 + echo "$as_me:11110: result: $ossh_result" >&5 +echo "${ECHO_T}$ossh_result" >&6 if test "x$ossh_result" = "xyes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_TIME_IN_UTMPX 1 -EOF +_ACEOF fi else - echo "$ac_t""no" 1>&6 + echo "$as_me:11119: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - # look for field 'ut_tv' in header 'utmpx.h' ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv - echo $ac_n "checking for ut_tv field in utmpx.h""... $ac_c" 1>&6 -echo "configure:6268: checking for ut_tv field in utmpx.h" >&5 - if eval "test \"`echo '$''{'$ossh_varname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for ut_tv field in utmpx.h... $ECHO_C" >&6 + if eval "test \"\${$ossh_varname+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 11133 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "ut_tv" >/dev/null 2>&1; then - rm -rf conftest* - eval "$ossh_varname=yes" + eval "$ossh_varname=yes" else - rm -rf conftest* - eval "$ossh_varname=no" + eval "$ossh_varname=no" fi rm -f conftest* - + fi ossh_result=`eval 'echo $'"$ossh_varname"` if test -n "`echo $ossh_varname`"; then - echo "$ac_t""$ossh_result" 1>&6 + echo "$as_me:11150: result: $ossh_result" >&5 +echo "${ECHO_T}$ossh_result" >&6 if test "x$ossh_result" = "xyes"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_TV_IN_UTMPX 1 -EOF +_ACEOF fi else - echo "$ac_t""no" 1>&6 + echo "$as_me:11159: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:6304: checking for st_blksize in struct stat" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct stat s; s.st_blksize; -; return 0; } -EOF -if { (eval echo configure:6317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_blksize=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_st_blksize=no -fi -rm -f conftest* -fi +echo "$as_me:11163: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 +if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 11169 "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +static struct stat ac_aggr; +if (ac_aggr.st_blksize) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:11189: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:11192: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:11195: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:11198: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_stat_st_blksize=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_member_struct_stat_st_blksize=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:11208: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 +if test $ac_cv_member_struct_stat_st_blksize = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 +_ACEOF -echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 -if test $ac_cv_struct_st_blksize = yes; then - cat >> confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_ST_BLKSIZE 1 -EOF +_ACEOF fi - -echo $ac_n "checking for sun_len field in struct sockaddr_un""... $ac_c" 1>&6 -echo "configure:6339: checking for sun_len field in struct sockaddr_un" >&5 -if eval "test \"`echo '$''{'ac_cv_have_sun_len_in_struct_sockaddr_un'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext < -#include - -int main() { - struct sockaddr_un s; s.sun_len = 1; -; return 0; } -EOF -if { (eval echo configure:6355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_sun_len_in_struct_sockaddr_un="yes" +echo "$as_me:11222: checking for ss_family field in struct sockaddr_storage" >&5 +echo $ECHO_N "checking for ss_family field in struct sockaddr_storage... $ECHO_C" >&6 +if test "${ac_cv_have_ss_family_in_struct_ss+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_sun_len_in_struct_sockaddr_un="no" -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_have_sun_len_in_struct_sockaddr_un" 1>&6 -if test "x$ac_cv_have_sun_len_in_struct_sockaddr_un" = "xyes" ; then - cat >> confdefs.h <<\EOF -#define HAVE_SUN_LEN_IN_SOCKADDR_UN 1 -EOF -fi - -echo $ac_n "checking for ss_family field in struct sockaddr_storage""... $ac_c" 1>&6 -echo "configure:6377: checking for ss_family field in struct sockaddr_storage" >&5 -if eval "test \"`echo '$''{'ac_cv_have_ss_family_in_struct_ss'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 11229 "configure" #include "confdefs.h" #include #include - -int main() { - struct sockaddr_storage s; s.ss_family = 1; -; return 0; } -EOF -if { (eval echo configure:6393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_ss_family_in_struct_ss="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_ss_family_in_struct_ss="no" -fi -rm -f conftest* +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + struct sockaddr_storage s; s.ss_family = 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:11250: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:11253: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:11256: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:11259: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_ss_family_in_struct_ss="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_ss_family_in_struct_ss="no" fi +rm -f conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_have_ss_family_in_struct_ss" 1>&6 +fi +echo "$as_me:11270: result: $ac_cv_have_ss_family_in_struct_ss" >&5 +echo "${ECHO_T}$ac_cv_have_ss_family_in_struct_ss" >&6 if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SS_FAMILY_IN_SS 1 -EOF +_ACEOF fi -echo $ac_n "checking for __ss_family field in struct sockaddr_storage""... $ac_c" 1>&6 -echo "configure:6415: checking for __ss_family field in struct sockaddr_storage" >&5 -if eval "test \"`echo '$''{'ac_cv_have___ss_family_in_struct_ss'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:11279: checking for __ss_family field in struct sockaddr_storage" >&5 +echo $ECHO_N "checking for __ss_family field in struct sockaddr_storage... $ECHO_C" >&6 +if test "${ac_cv_have___ss_family_in_struct_ss+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 11286 "configure" #include "confdefs.h" #include #include - -int main() { - struct sockaddr_storage s; s.__ss_family = 1; -; return 0; } -EOF -if { (eval echo configure:6431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have___ss_family_in_struct_ss="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have___ss_family_in_struct_ss="no" - -fi -rm -f conftest* + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + struct sockaddr_storage s; s.__ss_family = 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:11307: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:11310: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:11313: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:11316: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have___ss_family_in_struct_ss="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have___ss_family_in_struct_ss="no" fi +rm -f conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_have___ss_family_in_struct_ss" 1>&6 +fi +echo "$as_me:11328: result: $ac_cv_have___ss_family_in_struct_ss" >&5 +echo "${ECHO_T}$ac_cv_have___ss_family_in_struct_ss" >&6 if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE___SS_FAMILY_IN_SS 1 -EOF +_ACEOF fi -echo $ac_n "checking for pw_class field in struct passwd""... $ac_c" 1>&6 -echo "configure:6454: checking for pw_class field in struct passwd" >&5 -if eval "test \"`echo '$''{'ac_cv_have_pw_class_in_struct_passwd'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:11337: checking for pw_class field in struct passwd" >&5 +echo $ECHO_N "checking for pw_class field in struct passwd... $ECHO_C" >&6 +if test "${ac_cv_have_pw_class_in_struct_passwd+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 11344 "configure" #include "confdefs.h" #include - -int main() { - struct passwd p; p.pw_class = 0; -; return 0; } -EOF -if { (eval echo configure:6469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_pw_class_in_struct_passwd="yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_pw_class_in_struct_passwd="no" - -fi -rm -f conftest* + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + struct passwd p; p.pw_class = 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:11364: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:11367: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:11370: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:11373: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_pw_class_in_struct_passwd="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_pw_class_in_struct_passwd="no" fi +rm -f conftest.$ac_objext conftest.$ac_ext -echo "$ac_t""$ac_cv_have_pw_class_in_struct_passwd" 1>&6 +fi +echo "$as_me:11385: result: $ac_cv_have_pw_class_in_struct_passwd" >&5 +echo "${ECHO_T}$ac_cv_have_pw_class_in_struct_passwd" >&6 if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_PW_CLASS_IN_PASSWD 1 -EOF +_ACEOF fi +echo "$as_me:11394: checking for pw_expire field in struct passwd" >&5 +echo $ECHO_N "checking for pw_expire field in struct passwd... $ECHO_C" >&6 +if test "${ac_cv_have_pw_expire_in_struct_passwd+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 11401 "configure" +#include "confdefs.h" + +#include + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + struct passwd p; p.pw_expire = 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:11421: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:11424: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:11427: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:11430: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_pw_expire_in_struct_passwd="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_pw_expire_in_struct_passwd="no" + +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:11442: result: $ac_cv_have_pw_expire_in_struct_passwd" >&5 +echo "${ECHO_T}$ac_cv_have_pw_expire_in_struct_passwd" >&6 +if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_PW_EXPIRE_IN_PASSWD 1 +_ACEOF + +fi -echo $ac_n "checking if libc defines __progname""... $ac_c" 1>&6 -echo "configure:6493: checking if libc defines __progname" >&5 -if eval "test \"`echo '$''{'ac_cv_libc_defines___progname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:11451: checking for pw_change field in struct passwd" >&5 +echo $ECHO_N "checking for pw_change field in struct passwd... $ECHO_C" >&6 +if test "${ac_cv_have_pw_change_in_struct_passwd+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 11458 "configure" #include "confdefs.h" -int main() { - extern char *__progname; printf("%s", __progname); -; return 0; } -EOF -if { (eval echo configure:6506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_libc_defines___progname="yes" +#include + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + struct passwd p; p.pw_change = 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:11478: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:11481: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:11484: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:11487: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_pw_change_in_struct_passwd="yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_libc_defines___progname="no" - + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_pw_change_in_struct_passwd="no" + fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:11499: result: $ac_cv_have_pw_change_in_struct_passwd" >&5 +echo "${ECHO_T}$ac_cv_have_pw_change_in_struct_passwd" >&6 +if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_PW_CHANGE_IN_PASSWD 1 +_ACEOF + +fi + +echo "$as_me:11508: checking if libc defines __progname" >&5 +echo $ECHO_N "checking if libc defines __progname... $ECHO_C" >&6 +if test "${ac_cv_libc_defines___progname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 11515 "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + extern char *__progname; printf("%s", __progname); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:11533: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:11536: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:11539: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:11542: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_libc_defines___progname="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_libc_defines___progname="no" fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -echo "$ac_t""$ac_cv_libc_defines___progname" 1>&6 +fi +echo "$as_me:11554: result: $ac_cv_libc_defines___progname" >&5 +echo "${ECHO_T}$ac_cv_libc_defines___progname" >&6 if test "x$ac_cv_libc_defines___progname" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE___PROGNAME 1 -EOF +_ACEOF fi - -echo $ac_n "checking if libc defines sys_errlist""... $ac_c" 1>&6 -echo "configure:6530: checking if libc defines sys_errlist" >&5 -if eval "test \"`echo '$''{'ac_cv_libc_defines_sys_errlist'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:11563: checking whether getopt has optreset support" >&5 +echo $ECHO_N "checking whether getopt has optreset support... $ECHO_C" >&6 +if test "${ac_cv_have_getopt_optreset+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 11570 "configure" #include "confdefs.h" -int main() { - extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]); -; return 0; } -EOF -if { (eval echo configure:6543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_libc_defines_sys_errlist="yes" +#include + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + extern int optreset; optreset = 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:11590: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:11593: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:11596: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:11599: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_getopt_optreset="yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_libc_defines_sys_errlist="no" - + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_have_getopt_optreset="no" + fi -rm -f conftest* +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + +fi +echo "$as_me:11611: result: $ac_cv_have_getopt_optreset" >&5 +echo "${ECHO_T}$ac_cv_have_getopt_optreset" >&6 +if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_GETOPT_OPTRESET 1 +_ACEOF + +fi + +echo "$as_me:11620: checking if libc defines sys_errlist" >&5 +echo $ECHO_N "checking if libc defines sys_errlist... $ECHO_C" >&6 +if test "${ac_cv_libc_defines_sys_errlist+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line 11627 "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:11645: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:11648: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:11651: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:11654: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_libc_defines_sys_errlist="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_libc_defines_sys_errlist="no" fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -echo "$ac_t""$ac_cv_libc_defines_sys_errlist" 1>&6 +fi +echo "$as_me:11666: result: $ac_cv_libc_defines_sys_errlist" >&5 +echo "${ECHO_T}$ac_cv_libc_defines_sys_errlist" >&6 if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_ERRLIST 1 -EOF +_ACEOF fi - -echo $ac_n "checking if libc defines sys_nerr""... $ac_c" 1>&6 -echo "configure:6567: checking if libc defines sys_nerr" >&5 -if eval "test \"`echo '$''{'ac_cv_libc_defines_sys_nerr'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:11675: checking if libc defines sys_nerr" >&5 +echo $ECHO_N "checking if libc defines sys_nerr... $ECHO_C" >&6 +if test "${ac_cv_libc_defines_sys_nerr+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 11682 "configure" #include "confdefs.h" -int main() { +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ extern int sys_nerr; printf("%i", sys_nerr); -; return 0; } -EOF -if { (eval echo configure:6580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_libc_defines_sys_nerr="yes" + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:11700: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:11703: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:11706: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:11709: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_libc_defines_sys_nerr="yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + ac_cv_libc_defines_sys_nerr="no" + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + +fi +echo "$as_me:11721: result: $ac_cv_libc_defines_sys_nerr" >&5 +echo "${ECHO_T}$ac_cv_libc_defines_sys_nerr" >&6 +if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_NERR 1 +_ACEOF + +fi + +# Check whether user wants Kerberos support +SCARD_MSG="no" + +# Check whether --with-smartcard or --without-smartcard was given. +if test "${with_smartcard+set}" = set; then + withval="$with_smartcard" + + if test "x$withval" != "xno" ; then + if test "x$withval" != "xyes" ; then + CPPFLAGS="$CPPFLAGS -I${withval}" + LDFLAGS="$LDFLAGS -L${withval}" + if test ! -z "$need_dash_r" ; then + LDFLAGS="$LDFLAGS -R${withval}" + fi + if test ! -z "$blibpath" ; then + blibpath="$blibpath:${withval}" + fi + fi + +for ac_header in sectok.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:11753: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:11758: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:11762: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 11765 "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:11771: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:11774: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:11777: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:11780: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:11789: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:11793: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 11796 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:11800: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:11806: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_libc_defines_sys_nerr="no" - + ac_header_preproc=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext +echo "$as_me:11824: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:11830: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:11832: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:11835: WARNING: $ac_header: present but cannot be compiled." >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled." >&2;} + { echo "$as_me:11837: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:11839: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:11842: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:11849: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF -echo "$ac_t""$ac_cv_libc_defines_sys_nerr" 1>&6 -if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then - cat >> confdefs.h <<\EOF -#define HAVE_SYS_NERR 1 -EOF +fi + +done + + if test "$ac_cv_header_sectok_h" != yes; then + { { echo "$as_me:11863: error: Can't find sectok.h" >&5 +echo "$as_me: error: Can't find sectok.h" >&2;} + { (exit 1); exit 1; }; } + fi + +echo "$as_me:11868: checking for sectok_open in -lsectok" >&5 +echo $ECHO_N "checking for sectok_open in -lsectok... $ECHO_C" >&6 +if test "${ac_cv_lib_sectok_sectok_open+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsectok $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line 11876 "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char sectok_open (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +sectok_open (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:11901: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:11904: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:11907: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:11910: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_sectok_sectok_open=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_sectok_sectok_open=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:11921: result: $ac_cv_lib_sectok_sectok_open" >&5 +echo "${ECHO_T}$ac_cv_lib_sectok_sectok_open" >&6 +if test $ac_cv_lib_sectok_sectok_open = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSECTOK 1 +_ACEOF + + LIBS="-lsectok $LIBS" fi + if test "$ac_cv_lib_sectok_sectok_open" != yes; then + { { echo "$as_me:11933: error: Can't find libsectok" >&5 +echo "$as_me: error: Can't find libsectok" >&2;} + { (exit 1); exit 1; }; } + fi + cat >>confdefs.h <<\_ACEOF +#define SMARTCARD 1 +_ACEOF + + SCARD_MSG="yes" + fi + +fi; # Check whether user wants Kerberos support -KRB4_MSG="no" +KRB4_MSG="no" + # Check whether --with-kerberos4 or --without-kerberos4 was given. if test "${with_kerberos4+set}" = set; then withval="$with_kerberos4" - + if test "x$withval" != "xno" ; then - if test "x$withval" != "xyes" ; then CPPFLAGS="$CPPFLAGS -I${withval}/include" LDFLAGS="$LDFLAGS -L${withval}/lib" @@ -6622,312 +11966,471 @@ fi fi - for ac_hdr in krb.h +for ac_header in krb.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6630: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:11973: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:11978: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:11982: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 11985 "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:11991: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:11994: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:11997: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:12000: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:12009: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:12013: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 12016 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:12020: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:12026: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_cpp_err=yes fi -rm -f conftest* +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:12050: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:12052: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:12055: WARNING: $ac_header: present but cannot be compiled." >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled." >&2;} + { echo "$as_me:12057: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:12059: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:12062: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$ac_t""no" 1>&6 + eval "$as_ac_Header=$ac_header_preproc" fi +echo "$as_me:12069: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + done if test "$ac_cv_header_krb_h" != yes; then - echo "configure: warning: Cannot find krb.h, build may fail" 1>&2 + { echo "$as_me:12083: WARNING: Cannot find krb.h, build may fail" >&5 +echo "$as_me: WARNING: Cannot find krb.h, build may fail" >&2;} fi - echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6 -echo "configure:6670: checking for main in -lkrb" >&5 -ac_lib_var=`echo krb'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:12087: checking for main in -lkrb" >&5 +echo $ECHO_N "checking for main in -lkrb... $ECHO_C" >&6 +if test "${ac_cv_lib_krb_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lkrb $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 12095 "configure" #include "confdefs.h" -int main() { -main() -; return 0; } -EOF -if { (eval echo configure:6685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo krb | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:12116: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:12119: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:12122: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_krb_main=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_krb_main=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:12133: result: $ac_cv_lib_krb_main" >&5 +echo "${ECHO_T}$ac_cv_lib_krb_main" >&6 +if test $ac_cv_lib_krb_main = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBKRB 1 +_ACEOF LIBS="-lkrb $LIBS" -else - echo "$ac_t""no" 1>&6 fi if test "$ac_cv_lib_krb_main" != yes; then - echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6 -echo "configure:6714: checking for main in -lkrb4" >&5 -ac_lib_var=`echo krb4'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:12146: checking for main in -lkrb4" >&5 +echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6 +if test "${ac_cv_lib_krb4_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lkrb4 $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 12154 "configure" #include "confdefs.h" -int main() { -main() -; return 0; } -EOF -if { (eval echo configure:6729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo krb4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:12175: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:12178: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:12181: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_krb4_main=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_krb4_main=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:12192: result: $ac_cv_lib_krb4_main" >&5 +echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6 +if test $ac_cv_lib_krb4_main = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBKRB4 1 +_ACEOF LIBS="-lkrb4 $LIBS" -else - echo "$ac_t""no" 1>&6 fi if test "$ac_cv_lib_krb4_main" != yes; then - echo "configure: warning: Cannot find libkrb nor libkrb4, build may fail" 1>&2 + { echo "$as_me:12204: WARNING: Cannot find libkrb nor libkrb4, build may fail" >&5 +echo "$as_me: WARNING: Cannot find libkrb nor libkrb4, build may fail" >&2;} else KLIBS="-lkrb4" fi else KLIBS="-lkrb" fi - echo $ac_n "checking for des_cbc_encrypt in -ldes""... $ac_c" 1>&6 -echo "configure:6765: checking for des_cbc_encrypt in -ldes" >&5 -ac_lib_var=`echo des'_'des_cbc_encrypt | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:12213: checking for des_cbc_encrypt in -ldes" >&5 +echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6 +if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-ldes $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 12221 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char des_cbc_encrypt(); - -int main() { -des_cbc_encrypt() -; return 0; } -EOF -if { (eval echo configure:6784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo des | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:12249: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:12252: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:12255: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_des_des_cbc_encrypt=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_des_des_cbc_encrypt=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:12266: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 +echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6 +if test $ac_cv_lib_des_des_cbc_encrypt = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDES 1 +_ACEOF LIBS="-ldes $LIBS" -else - echo "$ac_t""no" 1>&6 fi if test "$ac_cv_lib_des_des_cbc_encrypt" != yes; then - echo $ac_n "checking for des_cbc_encrypt in -ldes425""... $ac_c" 1>&6 -echo "configure:6813: checking for des_cbc_encrypt in -ldes425" >&5 -ac_lib_var=`echo des425'_'des_cbc_encrypt | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:12279: checking for des_cbc_encrypt in -ldes425" >&5 +echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6 +if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-ldes425 $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 12287 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char des_cbc_encrypt(); - -int main() { -des_cbc_encrypt() -; return 0; } -EOF -if { (eval echo configure:6832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo des425 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:12315: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:12318: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:12321: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_des425_des_cbc_encrypt=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_des425_des_cbc_encrypt=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:12332: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 +echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6 +if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDES425 1 +_ACEOF LIBS="-ldes425 $LIBS" -else - echo "$ac_t""no" 1>&6 fi if test "$ac_cv_lib_des425_des_cbc_encrypt" != yes; then - echo "configure: warning: Cannot find libdes nor libdes425, build may fail" 1>&2 + { echo "$as_me:12344: WARNING: Cannot find libdes nor libdes425, build may fail" >&5 +echo "$as_me: WARNING: Cannot find libdes nor libdes425, build may fail" >&2;} else KLIBS="-ldes425" fi else KLIBS="-ldes" fi - echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 -echo "configure:6868: checking for dn_expand in -lresolv" >&5 -ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:12353: checking for dn_expand in -lresolv" >&5 +echo $ECHO_N "checking for dn_expand in -lresolv... $ECHO_C" >&6 +if test "${ac_cv_lib_resolv_dn_expand+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 12361 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dn_expand(); - -int main() { -dn_expand() -; return 0; } -EOF -if { (eval echo configure:6887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:12389: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:12392: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:12395: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_resolv_dn_expand=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_resolv_dn_expand=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:12406: result: $ac_cv_lib_resolv_dn_expand" >&5 +echo "${ECHO_T}$ac_cv_lib_resolv_dn_expand" >&6 +if test $ac_cv_lib_resolv_dn_expand = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBRESOLV 1 +_ACEOF LIBS="-lresolv $LIBS" -else - echo "$ac_t""no" 1>&6 fi KRB4=yes - KRB4_MSG="yes" - cat >> confdefs.h <<\EOF + KRB4_MSG="yes" + cat >>confdefs.h <<\_ACEOF #define KRB4 1 -EOF +_ACEOF fi - - -fi +fi; # Check whether user wants AFS support -AFS_MSG="no" +AFS_MSG="no" + # Check whether --with-afs or --without-afs was given. if test "${with_afs+set}" = set; then withval="$with_afs" - + if test "x$withval" != "xno" ; then if test "x$withval" != "xyes" ; then @@ -6936,978 +12439,1039 @@ fi if test -z "$KRB4" ; then - echo "configure: warning: AFS requires Kerberos IV support, build may fail" 1>&2 + { echo "$as_me:12442: WARNING: AFS requires Kerberos IV support, build may fail" >&5 +echo "$as_me: WARNING: AFS requires Kerberos IV support, build may fail" >&2;} fi LIBS="-lkafs $LIBS" if test ! -z "$AFS_LIBS" ; then LIBS="$LIBS $AFS_LIBS" fi - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define AFS 1 -EOF +_ACEOF - AFS_MSG="yes" + AFS_MSG="yes" fi - - -fi +fi; LIBS="$LIBS $KLIBS" # Looking for programs, paths and files + # Check whether --with-rsh or --without-rsh was given. if test "${with_rsh+set}" = set; then withval="$with_rsh" - + if test "x$withval" != "$no" ; then rsh_path=$withval fi - + else - + # Extract the first word of "rsh", so it can be a program name with args. set dummy rsh; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6973: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_rsh_path'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:12474: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_rsh_path+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$rsh_path" in - /*) + case $rsh_path in + [\\/]* | ?:[\\/]*) ac_cv_path_rsh_path="$rsh_path" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_rsh_path="$rsh_path" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_rsh_path="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_rsh_path="$ac_dir/$ac_word" + echo "$as_me:12491: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -rsh_path="$ac_cv_path_rsh_path" +rsh_path=$ac_cv_path_rsh_path + if test -n "$rsh_path"; then - echo "$ac_t""$rsh_path" 1>&6 + echo "$as_me:12502: result: $rsh_path" >&5 +echo "${ECHO_T}$rsh_path" >&6 else - echo "$ac_t""no" 1>&6 -fi - - - + echo "$as_me:12505: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +fi; # Check whether --with-xauth or --without-xauth was given. if test "${with_xauth+set}" = set; then withval="$with_xauth" - + if test "x$withval" != "xno" ; then xauth_path=$withval fi - + else - + # Extract the first word of "xauth", so it can be a program name with args. set dummy xauth; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7023: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_xauth_path'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:12523: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_xauth_path+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$xauth_path" in - /*) + case $xauth_path in + [\\/]* | ?:[\\/]*) ac_cv_path_xauth_path="$xauth_path" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_xauth_path="$xauth_path" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH:/usr/X/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/openwin/bin" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_xauth_path="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH:/usr/X/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/openwin/bin" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_xauth_path="$ac_dir/$ac_word" + echo "$as_me:12540: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -xauth_path="$ac_cv_path_xauth_path" +xauth_path=$ac_cv_path_xauth_path + if test -n "$xauth_path"; then - echo "$ac_t""$xauth_path" 1>&6 + echo "$as_me:12551: result: $xauth_path" >&5 +echo "${ECHO_T}$xauth_path" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:12554: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then xauth_path="/usr/openwin/bin/xauth" fi - - -fi +fi; if test -z "$xauth_path" ; then XAUTH_PATH="undefined" - + else - cat >> confdefs.h <>confdefs.h <<_ACEOF #define XAUTH_PATH "$xauth_path" -EOF +_ACEOF XAUTH_PATH=$xauth_path - + fi if test ! -z "$rsh_path" ; then - cat >> confdefs.h <>confdefs.h <<_ACEOF #define RSH_PATH "$rsh_path" -EOF +_ACEOF fi # Check for mail directory (last resort if we cannot get it from headers) if test ! -z "$MAIL" ; then maildir=`dirname $MAIL` - cat >> confdefs.h <>confdefs.h <<_ACEOF #define MAIL_DIRECTORY "$maildir" -EOF +_ACEOF fi if test -z "$no_dev_ptmx" ; then - -ac_safe=`echo ""/dev/ptmx"" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for "/dev/ptmx"""... $ac_c" 1>&6 -echo "configure:7094: checking for "/dev/ptmx"" >&5 -if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; } -else - if test -r "/dev/ptmx"; then - eval "ac_cv_file_$ac_safe=yes" - else - eval "ac_cv_file_$ac_safe=no" - fi -fi -fi -if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - cat >> confdefs.h <&5 +echo $ECHO_N "checking for \"/dev/ptmx\"... $ECHO_C" >&6 +if test "${ac_cv_file___dev_ptmx_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:12598: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r ""/dev/ptmx""; then + ac_cv_file___dev_ptmx_=yes +else + ac_cv_file___dev_ptmx_=no +fi +fi +echo "$as_me:12607: result: $ac_cv_file___dev_ptmx_" >&5 +echo "${ECHO_T}$ac_cv_file___dev_ptmx_" >&6 +if test $ac_cv_file___dev_ptmx_ = yes; then + + cat >>confdefs.h <<_ACEOF #define HAVE_DEV_PTMX 1 -EOF +_ACEOF have_dev_ptmx=1 - - -else - echo "$ac_t""no" 1>&6 fi fi +echo "$as_me:12620: checking for \"/dev/ptc\"" >&5 +echo $ECHO_N "checking for \"/dev/ptc\"... $ECHO_C" >&6 +if test "${ac_cv_file___dev_ptc_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:12626: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r ""/dev/ptc""; then + ac_cv_file___dev_ptc_=yes +else + ac_cv_file___dev_ptc_=no +fi +fi +echo "$as_me:12635: result: $ac_cv_file___dev_ptc_" >&5 +echo "${ECHO_T}$ac_cv_file___dev_ptc_" >&6 +if test $ac_cv_file___dev_ptc_ = yes; then -ac_safe=`echo ""/dev/ptc"" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for "/dev/ptc"""... $ac_c" 1>&6 -echo "configure:7127: checking for "/dev/ptc"" >&5 -if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; } -else - if test -r "/dev/ptc"; then - eval "ac_cv_file_$ac_safe=yes" - else - eval "ac_cv_file_$ac_safe=no" - fi -fi -fi -if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - cat >> confdefs.h <>confdefs.h <<_ACEOF #define HAVE_DEV_PTS_AND_PTC 1 -EOF +_ACEOF have_dev_ptc=1 - - -else - echo "$ac_t""no" 1>&6 fi - # Options from here on. Some of these are preset by platform above # Check for user-specified random device, otherwise check /dev/urandom + # Check whether --with-random or --without-random was given. if test "${with_random+set}" = set; then withval="$with_random" - + if test "x$withval" != "xno" ; then RANDOM_POOL="$withval"; - cat >> confdefs.h <>confdefs.h <<_ACEOF #define RANDOM_POOL "$RANDOM_POOL" -EOF +_ACEOF fi - + else - + # Check for random device - -ac_safe=`echo ""/dev/urandom"" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for "/dev/urandom"""... $ac_c" 1>&6 -echo "configure:7178: checking for "/dev/urandom"" >&5 -if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:12666: checking for \"/dev/urandom\"" >&5 +echo $ECHO_N "checking for \"/dev/urandom\"... $ECHO_C" >&6 +if test "${ac_cv_file___dev_urandom_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then - { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; } + test "$cross_compiling" = yes && + { { echo "$as_me:12672: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r ""/dev/urandom""; then + ac_cv_file___dev_urandom_=yes else - if test -r "/dev/urandom"; then - eval "ac_cv_file_$ac_safe=yes" - else - eval "ac_cv_file_$ac_safe=no" - fi + ac_cv_file___dev_urandom_=no fi fi -if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - - RANDOM_POOL="/dev/urandom"; - - cat >> confdefs.h <&6 +echo "$as_me:12681: result: $ac_cv_file___dev_urandom_" >&5 +echo "${ECHO_T}$ac_cv_file___dev_urandom_" >&6 +if test $ac_cv_file___dev_urandom_ = yes; then -fi + RANDOM_POOL="/dev/urandom"; - + cat >>confdefs.h <<_ACEOF +#define RANDOM_POOL "$RANDOM_POOL" +_ACEOF fi +fi; # Check for PRNGD/EGD pool file + # Check whether --with-prngd-port or --without-prngd-port was given. if test "${with_prngd_port+set}" = set; then withval="$with_prngd_port" - + if test ! -z "$withval" -a "x$withval" != "xno" ; then PRNGD_PORT="$withval" - cat >> confdefs.h <>confdefs.h <<_ACEOF #define PRNGD_PORT $PRNGD_PORT -EOF +_ACEOF fi - - -fi +fi; # Check for PRNGD/EGD pool file + # Check whether --with-prngd-socket or --without-prngd-socket was given. if test "${with_prngd_socket+set}" = set; then withval="$with_prngd_socket" - + if test "x$withval" != "xno" ; then PRNGD_SOCKET="$withval" - cat >> confdefs.h <>confdefs.h <<_ACEOF #define PRNGD_SOCKET "$PRNGD_SOCKET" -EOF +_ACEOF fi - + else - + # Check for existing socket only if we don't have a random device already if test -z "$RANDOM_POOL" ; then - echo $ac_n "checking for PRNGD/EGD socket""... $ac_c" 1>&6 -echo "configure:7248: checking for PRNGD/EGD socket" >&5 + echo "$as_me:12729: checking for PRNGD/EGD socket" >&5 +echo $ECHO_N "checking for PRNGD/EGD socket... $ECHO_C" >&6 # Insert other locations here for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then PRNGD_SOCKET="$sock" - cat >> confdefs.h <>confdefs.h <<_ACEOF #define PRNGD_SOCKET "$PRNGD_SOCKET" -EOF +_ACEOF break; fi done if test ! -z "$PRNGD_SOCKET" ; then - echo "$ac_t""$PRNGD_SOCKET" 1>&6 + echo "$as_me:12743: result: $PRNGD_SOCKET" >&5 +echo "${ECHO_T}$PRNGD_SOCKET" >&6 else - echo "$ac_t""not found" 1>&6 + echo "$as_me:12746: result: not found" >&5 +echo "${ECHO_T}not found" >&6 fi fi - - -fi - +fi; # detect pathnames for entropy gathering commands, if we need them INSTALL_SSH_PRNG_CMDS="" rm -f prng_commands if (test -z "$RANDOM_POOL" && test -z "$PRNGD") ; then # Use these commands to collect entropy - + # Extract the first word of "ls", so it can be a program name with args. set dummy ls; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7281: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PROG_LS'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:12761: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PROG_LS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$PROG_LS" in - /*) + case $PROG_LS in + [\\/]* | ?:[\\/]*) ac_cv_path_PROG_LS="$PROG_LS" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_PROG_LS="$PROG_LS" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PROG_LS="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_PROG_LS="$ac_dir/$ac_word" + echo "$as_me:12778: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -PROG_LS="$ac_cv_path_PROG_LS" +PROG_LS=$ac_cv_path_PROG_LS + if test -n "$PROG_LS"; then - echo "$ac_t""$PROG_LS" 1>&6 + echo "$as_me:12789: result: $PROG_LS" >&5 +echo "${ECHO_T}$PROG_LS" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:12792: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if test -z "$PROG_LS" ; then PROG_LS="undef" fi - - # Extract the first word of "netstat", so it can be a program name with args. set dummy netstat; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7322: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PROG_NETSTAT'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:12802: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PROG_NETSTAT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$PROG_NETSTAT" in - /*) + case $PROG_NETSTAT in + [\\/]* | ?:[\\/]*) ac_cv_path_PROG_NETSTAT="$PROG_NETSTAT" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_PROG_NETSTAT="$PROG_NETSTAT" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PROG_NETSTAT="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_PROG_NETSTAT="$ac_dir/$ac_word" + echo "$as_me:12819: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -PROG_NETSTAT="$ac_cv_path_PROG_NETSTAT" +PROG_NETSTAT=$ac_cv_path_PROG_NETSTAT + if test -n "$PROG_NETSTAT"; then - echo "$ac_t""$PROG_NETSTAT" 1>&6 + echo "$as_me:12830: result: $PROG_NETSTAT" >&5 +echo "${ECHO_T}$PROG_NETSTAT" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:12833: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if test -z "$PROG_NETSTAT" ; then PROG_NETSTAT="undef" fi - - # Extract the first word of "arp", so it can be a program name with args. set dummy arp; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7363: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PROG_ARP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:12843: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PROG_ARP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$PROG_ARP" in - /*) + case $PROG_ARP in + [\\/]* | ?:[\\/]*) ac_cv_path_PROG_ARP="$PROG_ARP" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_PROG_ARP="$PROG_ARP" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PROG_ARP="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_PROG_ARP="$ac_dir/$ac_word" + echo "$as_me:12860: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -PROG_ARP="$ac_cv_path_PROG_ARP" +PROG_ARP=$ac_cv_path_PROG_ARP + if test -n "$PROG_ARP"; then - echo "$ac_t""$PROG_ARP" 1>&6 + echo "$as_me:12871: result: $PROG_ARP" >&5 +echo "${ECHO_T}$PROG_ARP" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:12874: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if test -z "$PROG_ARP" ; then PROG_ARP="undef" fi - - # Extract the first word of "ifconfig", so it can be a program name with args. set dummy ifconfig; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7404: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PROG_IFCONFIG'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:12884: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PROG_IFCONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$PROG_IFCONFIG" in - /*) + case $PROG_IFCONFIG in + [\\/]* | ?:[\\/]*) ac_cv_path_PROG_IFCONFIG="$PROG_IFCONFIG" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_PROG_IFCONFIG="$PROG_IFCONFIG" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PROG_IFCONFIG="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_PROG_IFCONFIG="$ac_dir/$ac_word" + echo "$as_me:12901: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -PROG_IFCONFIG="$ac_cv_path_PROG_IFCONFIG" +PROG_IFCONFIG=$ac_cv_path_PROG_IFCONFIG + if test -n "$PROG_IFCONFIG"; then - echo "$ac_t""$PROG_IFCONFIG" 1>&6 + echo "$as_me:12912: result: $PROG_IFCONFIG" >&5 +echo "${ECHO_T}$PROG_IFCONFIG" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:12915: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if test -z "$PROG_IFCONFIG" ; then PROG_IFCONFIG="undef" fi - - + # Extract the first word of "jstat", so it can be a program name with args. +set dummy jstat; ac_word=$2 +echo "$as_me:12925: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PROG_JSTAT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PROG_JSTAT in + [\\/]* | ?:[\\/]*) + ac_cv_path_PROG_JSTAT="$PROG_JSTAT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_PROG_JSTAT="$ac_dir/$ac_word" + echo "$as_me:12942: found $ac_dir/$ac_word" >&5 + break +fi +done + + ;; +esac +fi +PROG_JSTAT=$ac_cv_path_PROG_JSTAT + +if test -n "$PROG_JSTAT"; then + echo "$as_me:12953: result: $PROG_JSTAT" >&5 +echo "${ECHO_T}$PROG_JSTAT" >&6 +else + echo "$as_me:12956: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + if test -z "$PROG_JSTAT" ; then + PROG_JSTAT="undef" + fi + # Extract the first word of "ps", so it can be a program name with args. set dummy ps; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7445: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PROG_PS'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:12966: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PROG_PS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$PROG_PS" in - /*) + case $PROG_PS in + [\\/]* | ?:[\\/]*) ac_cv_path_PROG_PS="$PROG_PS" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_PROG_PS="$PROG_PS" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PROG_PS="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_PROG_PS="$ac_dir/$ac_word" + echo "$as_me:12983: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -PROG_PS="$ac_cv_path_PROG_PS" +PROG_PS=$ac_cv_path_PROG_PS + if test -n "$PROG_PS"; then - echo "$ac_t""$PROG_PS" 1>&6 + echo "$as_me:12994: result: $PROG_PS" >&5 +echo "${ECHO_T}$PROG_PS" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:12997: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if test -z "$PROG_PS" ; then PROG_PS="undef" fi - - + # Extract the first word of "sar", so it can be a program name with args. +set dummy sar; ac_word=$2 +echo "$as_me:13007: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PROG_SAR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PROG_SAR in + [\\/]* | ?:[\\/]*) + ac_cv_path_PROG_SAR="$PROG_SAR" # Let the user override the test with a path. + ;; + *) + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_PROG_SAR="$ac_dir/$ac_word" + echo "$as_me:13024: found $ac_dir/$ac_word" >&5 + break +fi +done + + ;; +esac +fi +PROG_SAR=$ac_cv_path_PROG_SAR + +if test -n "$PROG_SAR"; then + echo "$as_me:13035: result: $PROG_SAR" >&5 +echo "${ECHO_T}$PROG_SAR" >&6 +else + echo "$as_me:13038: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + if test -z "$PROG_SAR" ; then + PROG_SAR="undef" + fi + # Extract the first word of "w", so it can be a program name with args. set dummy w; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7486: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PROG_W'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:13048: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PROG_W+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$PROG_W" in - /*) + case $PROG_W in + [\\/]* | ?:[\\/]*) ac_cv_path_PROG_W="$PROG_W" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_PROG_W="$PROG_W" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PROG_W="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_PROG_W="$ac_dir/$ac_word" + echo "$as_me:13065: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -PROG_W="$ac_cv_path_PROG_W" +PROG_W=$ac_cv_path_PROG_W + if test -n "$PROG_W"; then - echo "$ac_t""$PROG_W" 1>&6 + echo "$as_me:13076: result: $PROG_W" >&5 +echo "${ECHO_T}$PROG_W" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:13079: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if test -z "$PROG_W" ; then PROG_W="undef" fi - - # Extract the first word of "who", so it can be a program name with args. set dummy who; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7527: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PROG_WHO'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:13089: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PROG_WHO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$PROG_WHO" in - /*) + case $PROG_WHO in + [\\/]* | ?:[\\/]*) ac_cv_path_PROG_WHO="$PROG_WHO" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_PROG_WHO="$PROG_WHO" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PROG_WHO="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_PROG_WHO="$ac_dir/$ac_word" + echo "$as_me:13106: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -PROG_WHO="$ac_cv_path_PROG_WHO" +PROG_WHO=$ac_cv_path_PROG_WHO + if test -n "$PROG_WHO"; then - echo "$ac_t""$PROG_WHO" 1>&6 + echo "$as_me:13117: result: $PROG_WHO" >&5 +echo "${ECHO_T}$PROG_WHO" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:13120: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if test -z "$PROG_WHO" ; then PROG_WHO="undef" fi - - # Extract the first word of "last", so it can be a program name with args. set dummy last; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7568: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PROG_LAST'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:13130: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PROG_LAST+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$PROG_LAST" in - /*) + case $PROG_LAST in + [\\/]* | ?:[\\/]*) ac_cv_path_PROG_LAST="$PROG_LAST" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_PROG_LAST="$PROG_LAST" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PROG_LAST="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_PROG_LAST="$ac_dir/$ac_word" + echo "$as_me:13147: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -PROG_LAST="$ac_cv_path_PROG_LAST" +PROG_LAST=$ac_cv_path_PROG_LAST + if test -n "$PROG_LAST"; then - echo "$ac_t""$PROG_LAST" 1>&6 + echo "$as_me:13158: result: $PROG_LAST" >&5 +echo "${ECHO_T}$PROG_LAST" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:13161: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if test -z "$PROG_LAST" ; then PROG_LAST="undef" fi - - # Extract the first word of "lastlog", so it can be a program name with args. set dummy lastlog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7609: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PROG_LASTLOG'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:13171: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PROG_LASTLOG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$PROG_LASTLOG" in - /*) + case $PROG_LASTLOG in + [\\/]* | ?:[\\/]*) ac_cv_path_PROG_LASTLOG="$PROG_LASTLOG" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_PROG_LASTLOG="$PROG_LASTLOG" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PROG_LASTLOG="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_PROG_LASTLOG="$ac_dir/$ac_word" + echo "$as_me:13188: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -PROG_LASTLOG="$ac_cv_path_PROG_LASTLOG" +PROG_LASTLOG=$ac_cv_path_PROG_LASTLOG + if test -n "$PROG_LASTLOG"; then - echo "$ac_t""$PROG_LASTLOG" 1>&6 + echo "$as_me:13199: result: $PROG_LASTLOG" >&5 +echo "${ECHO_T}$PROG_LASTLOG" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:13202: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if test -z "$PROG_LASTLOG" ; then PROG_LASTLOG="undef" fi - - # Extract the first word of "df", so it can be a program name with args. set dummy df; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7650: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PROG_DF'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:13212: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PROG_DF+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$PROG_DF" in - /*) + case $PROG_DF in + [\\/]* | ?:[\\/]*) ac_cv_path_PROG_DF="$PROG_DF" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_PROG_DF="$PROG_DF" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PROG_DF="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_PROG_DF="$ac_dir/$ac_word" + echo "$as_me:13229: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -PROG_DF="$ac_cv_path_PROG_DF" +PROG_DF=$ac_cv_path_PROG_DF + if test -n "$PROG_DF"; then - echo "$ac_t""$PROG_DF" 1>&6 + echo "$as_me:13240: result: $PROG_DF" >&5 +echo "${ECHO_T}$PROG_DF" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:13243: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if test -z "$PROG_DF" ; then PROG_DF="undef" fi - - # Extract the first word of "vmstat", so it can be a program name with args. set dummy vmstat; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7691: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PROG_VMSTAT'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:13253: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PROG_VMSTAT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$PROG_VMSTAT" in - /*) + case $PROG_VMSTAT in + [\\/]* | ?:[\\/]*) ac_cv_path_PROG_VMSTAT="$PROG_VMSTAT" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_PROG_VMSTAT="$PROG_VMSTAT" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PROG_VMSTAT="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_PROG_VMSTAT="$ac_dir/$ac_word" + echo "$as_me:13270: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -PROG_VMSTAT="$ac_cv_path_PROG_VMSTAT" +PROG_VMSTAT=$ac_cv_path_PROG_VMSTAT + if test -n "$PROG_VMSTAT"; then - echo "$ac_t""$PROG_VMSTAT" 1>&6 + echo "$as_me:13281: result: $PROG_VMSTAT" >&5 +echo "${ECHO_T}$PROG_VMSTAT" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:13284: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if test -z "$PROG_VMSTAT" ; then PROG_VMSTAT="undef" fi - - # Extract the first word of "uptime", so it can be a program name with args. set dummy uptime; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7732: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PROG_UPTIME'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:13294: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PROG_UPTIME+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$PROG_UPTIME" in - /*) + case $PROG_UPTIME in + [\\/]* | ?:[\\/]*) ac_cv_path_PROG_UPTIME="$PROG_UPTIME" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_PROG_UPTIME="$PROG_UPTIME" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PROG_UPTIME="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_PROG_UPTIME="$ac_dir/$ac_word" + echo "$as_me:13311: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -PROG_UPTIME="$ac_cv_path_PROG_UPTIME" +PROG_UPTIME=$ac_cv_path_PROG_UPTIME + if test -n "$PROG_UPTIME"; then - echo "$ac_t""$PROG_UPTIME" 1>&6 + echo "$as_me:13322: result: $PROG_UPTIME" >&5 +echo "${ECHO_T}$PROG_UPTIME" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:13325: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if test -z "$PROG_UPTIME" ; then PROG_UPTIME="undef" fi - - # Extract the first word of "ipcs", so it can be a program name with args. set dummy ipcs; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7773: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PROG_IPCS'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:13335: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PROG_IPCS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$PROG_IPCS" in - /*) + case $PROG_IPCS in + [\\/]* | ?:[\\/]*) ac_cv_path_PROG_IPCS="$PROG_IPCS" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_PROG_IPCS="$PROG_IPCS" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PROG_IPCS="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_PROG_IPCS="$ac_dir/$ac_word" + echo "$as_me:13352: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -PROG_IPCS="$ac_cv_path_PROG_IPCS" +PROG_IPCS=$ac_cv_path_PROG_IPCS + if test -n "$PROG_IPCS"; then - echo "$ac_t""$PROG_IPCS" 1>&6 + echo "$as_me:13363: result: $PROG_IPCS" >&5 +echo "${ECHO_T}$PROG_IPCS" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:13366: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if test -z "$PROG_IPCS" ; then PROG_IPCS="undef" fi - - # Extract the first word of "tail", so it can be a program name with args. set dummy tail; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7814: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PROG_TAIL'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:13376: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PROG_TAIL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$PROG_TAIL" in - /*) + case $PROG_TAIL in + [\\/]* | ?:[\\/]*) ac_cv_path_PROG_TAIL="$PROG_TAIL" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_PROG_TAIL="$PROG_TAIL" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PROG_TAIL="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_PROG_TAIL="$ac_dir/$ac_word" + echo "$as_me:13393: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -PROG_TAIL="$ac_cv_path_PROG_TAIL" +PROG_TAIL=$ac_cv_path_PROG_TAIL + if test -n "$PROG_TAIL"; then - echo "$ac_t""$PROG_TAIL" 1>&6 + echo "$as_me:13404: result: $PROG_TAIL" >&5 +echo "${ECHO_T}$PROG_TAIL" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:13407: result: no" >&5 +echo "${ECHO_T}no" >&6 fi if test -z "$PROG_TAIL" ; then PROG_TAIL="undef" fi - - INSTALL_SSH_PRNG_CMDS="yes" fi +# Check whether --with-mantype or --without-mantype was given. +if test "${with_mantype+set}" = set; then + withval="$with_mantype" - -# Check whether --with-catman or --without-catman was given. -if test "${with_catman+set}" = set; then - withval="$with_catman" - case "$withval" in man|cat|doc) MANTYPE=$withval ;; *) - { echo "configure: error: invalid man type: $withval" 1>&2; exit 1; } + { { echo "$as_me:13427: error: invalid man type: $withval" >&5 +echo "$as_me: error: invalid man type: $withval" >&2;} + { (exit 1); exit 1; }; } ;; esac - - -fi +fi; if test -z "$MANTYPE"; then for ac_prog in nroff awf do -# Extract the first word of "$ac_prog", so it can be a program name with args. + # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7879: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_NROFF'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:13439: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_NROFF+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$NROFF" in - /*) + case $NROFF in + [\\/]* | ?:[\\/]*) ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path. ;; - ?:/*) - ac_cv_path_NROFF="$NROFF" # Let the user override the test with a dos path. - ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="/usr/bin:/usr/ucb" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_NROFF="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="/usr/bin:/usr/ucb" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + if $as_executable_p "$ac_dir/$ac_word"; then + ac_cv_path_NROFF="$ac_dir/$ac_word" + echo "$as_me:13456: found $ac_dir/$ac_word" >&5 + break +fi +done + ;; esac fi -NROFF="$ac_cv_path_NROFF" +NROFF=$ac_cv_path_NROFF + if test -n "$NROFF"; then - echo "$ac_t""$NROFF" 1>&6 + echo "$as_me:13467: result: $NROFF" >&5 +echo "${ECHO_T}$NROFF" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:13470: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -test -n "$NROFF" && break + test -n "$NROFF" && break done test -n "$NROFF" || NROFF="/bin/false" @@ -7926,125 +13490,142 @@ mansubdir=$MANTYPE; fi - # Check whether to enable MD5 passwords -MD5_MSG="no" +MD5_MSG="no" + # Check whether --with-md5-passwords or --without-md5-passwords was given. if test "${with_md5_passwords+set}" = set; then withval="$with_md5_passwords" - + if test "x$withval" != "xno" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_MD5_PASSWORDS 1 -EOF +_ACEOF - MD5_MSG="yes" + MD5_MSG="yes" fi - - -fi +fi; # Whether to disable shadow password support + # Check whether --with-shadow or --without-shadow was given. if test "${with_shadow+set}" = set; then withval="$with_shadow" - - if test "x$withval" = "xno" ; then - cat >> confdefs.h <<\EOF + + if test "x$withval" = "xno" ; then + cat >>confdefs.h <<\_ACEOF #define DISABLE_SHADOW 1 -EOF +_ACEOF disable_shadow=yes fi - - -fi +fi; if test -z "$disable_shadow" ; then - echo $ac_n "checking if the systems has expire shadow information""... $ac_c" 1>&6 -echo "configure:7968: checking if the systems has expire shadow information" >&5 - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking if the systems has expire shadow information... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +#line 13530 "configure" #include "confdefs.h" #include #include struct spwd sp; - -int main() { - sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; -; return 0; } -EOF -if { (eval echo configure:7981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - sp_expire_available=yes + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:13552: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:13555: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:13558: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:13561: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + sp_expire_available=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext if test "x$sp_expire_available" = "xyes" ; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:13572: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define HAS_SHADOW_EXPIRE 1 -EOF +_ACEOF else - echo "$ac_t""no" 1>&6 + echo "$as_me:13579: result: no" >&5 +echo "${ECHO_T}no" >&6 fi fi # Use ip address instead of hostname in $DISPLAY if test ! -z "$IPADDR_IN_DISPLAY" ; then DISPLAY_HACK_MSG="yes" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define IPADDR_IN_DISPLAY 1 -EOF +_ACEOF else - DISPLAY_HACK_MSG="no" - # Check whether --with-ipaddr-display or --without-ipaddr-display was given. + DISPLAY_HACK_MSG="no" + +# Check whether --with-ipaddr-display or --without-ipaddr-display was given. if test "${with_ipaddr_display+set}" = set; then withval="$with_ipaddr_display" - - if test "x$withval" != "xno" ; then - cat >> confdefs.h <<\EOF + + if test "x$withval" != "xno" ; then + cat >>confdefs.h <<\_ACEOF #define IPADDR_IN_DISPLAY 1 -EOF +_ACEOF - DISPLAY_HACK_MSG="yes" + DISPLAY_HACK_MSG="yes" fi - - -fi +fi; fi # Whether to mess with the default path -SERVER_PATH_MSG="(default)" +SERVER_PATH_MSG="(default)" + # Check whether --with-default-path or --without-default-path was given. if test "${with_default_path+set}" = set; then withval="$with_default_path" - - if test "x$withval" != "xno" ; then + + if test "x$withval" != "xno" ; then user_path="$withval" - SERVER_PATH_MSG="$withval" + SERVER_PATH_MSG="$withval" fi - + else - + if test "$cross_compiling" = yes; then - user_path="/usr/bin:/bin:/usr/sbin:/sbin" - + user_path="/usr/bin:/bin:/usr/sbin:/sbin" + else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 13628 "configure" #include "confdefs.h" /* find out what STDPATH is */ @@ -8064,30 +13645,38 @@ { FILE *fd; int rc; - + fd = fopen(DATA,"w"); if(fd == NULL) exit(1); - + if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0) exit(1); exit(0); } - -EOF -if { (eval echo configure:8080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - user_path=`cat conftest.stdpath` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - user_path="/usr/bin:/bin:/usr/sbin:/sbin" + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:13661: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:13664: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:13666: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:13669: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + user_path=`cat conftest.stdpath` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + user_path="/usr/bin:/bin:/usr/sbin:/sbin" fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - # make sure $bindir is in USER_PATH so scp will work t_bindir=`eval echo ${bindir}` case $t_bindir in @@ -8101,242 +13690,219 @@ echo $user_path | grep "^$t_bindir" > /dev/null 2>&1 if test $? -ne 0 ; then user_path=$user_path:$t_bindir - echo "$ac_t""Adding $t_bindir to USER_PATH so scp will work" 1>&6 + echo "$as_me:13693: result: Adding $t_bindir to USER_PATH so scp will work" >&5 +echo "${ECHO_T}Adding $t_bindir to USER_PATH so scp will work" >&6 fi fi - -fi - -cat >> confdefs.h <>confdefs.h <<_ACEOF #define USER_PATH "$user_path" -EOF - - +_ACEOF # Whether to force IPv4 by default (needed on broken glibc Linux) -IPV4_HACK_MSG="no" +IPV4_HACK_MSG="no" + # Check whether --with-ipv4-default or --without-ipv4-default was given. if test "${with_ipv4_default+set}" = set; then withval="$with_ipv4_default" - - if test "x$withval" != "xno" ; then - cat >> confdefs.h <<\EOF + + if test "x$withval" != "xno" ; then + cat >>confdefs.h <<\_ACEOF #define IPV4_DEFAULT 1 -EOF +_ACEOF - IPV4_HACK_MSG="yes" + IPV4_HACK_MSG="yes" fi - -fi +fi; +echo "$as_me:13720: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5 +echo $ECHO_N "checking if we need to convert IPv4 in IPv6-mapped addresses... $ECHO_C" >&6 +IPV4_IN6_HACK_MSG="no" -echo $ac_n "checking if we need to convert IPv4 in IPv6-mapped addresses""... $ac_c" 1>&6 -echo "configure:8137: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5 -IPV4_IN6_HACK_MSG="no" # Check whether --with-4in6 or --without-4in6 was given. if test "${with_4in6+set}" = set; then withval="$with_4in6" - + if test "x$withval" != "xno" ; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:13729: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define IPV4_IN_IPV6 1 -EOF +_ACEOF - IPV4_IN6_HACK_MSG="yes" + IPV4_IN6_HACK_MSG="yes" else - echo "$ac_t""no" 1>&6 + echo "$as_me:13737: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - + else - + if test "x$inet6_default_4in6" = "xyes"; then - echo "$ac_t""yes (default)" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:13744: result: yes (default)" >&5 +echo "${ECHO_T}yes (default)" >&6 + cat >>confdefs.h <<\_ACEOF #define IPV4_IN_IPV6 1 -EOF +_ACEOF - IPV4_IN6_HACK_MSG="yes" + IPV4_IN6_HACK_MSG="yes" else - echo "$ac_t""no (default)" 1>&6 + echo "$as_me:13752: result: no (default)" >&5 +echo "${ECHO_T}no (default)" >&6 fi - - -fi +fi; # Whether to enable BSD auth support + # Check whether --with-bsd-auth or --without-bsd-auth was given. if test "${with_bsd_auth+set}" = set; then withval="$with_bsd_auth" - - if test "x$withval" != "xno" ; then - cat >> confdefs.h <<\EOF + + if test "x$withval" != "xno" ; then + cat >>confdefs.h <<\_ACEOF #define BSD_AUTH 1 -EOF +_ACEOF bsd_auth=yes fi - - -fi +fi; -echo $ac_n "checking whether to install ssh as suid root""... $ac_c" 1>&6 -echo "configure:8189: checking whether to install ssh as suid root" >&5 +echo "$as_me:13774: checking whether to install ssh as suid root" >&5 +echo $ECHO_N "checking whether to install ssh as suid root... $ECHO_C" >&6 # Check whether --enable-suid-ssh or --disable-suid-ssh was given. if test "${enable_suid_ssh+set}" = set; then enableval="$enable_suid_ssh" case "$enableval" in no) - echo "$ac_t""no" 1>&6 + echo "$as_me:13781: result: no" >&5 +echo "${ECHO_T}no" >&6 SSHMODE=0711 ;; - *) echo "$ac_t""yes" 1>&6 - SSHMODE=04711 + *) echo "$as_me:13785: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SSHMODE=4711 ;; - esac + esac else - echo "$ac_t""yes" 1>&6 - SSHMODE=04711 - -fi - - + echo "$as_me:13791: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SSHMODE=4711 +fi; # Where to place sshd.pid piddir=/var/run + # Check whether --with-pid-dir or --without-pid-dir was given. if test "${with_pid_dir+set}" = set; then withval="$with_pid_dir" - - if test "x$withval" != "xno" ; then + + if test "x$withval" != "xno" ; then piddir=$withval fi - - -fi +fi; # make sure the directory exists -if test ! -d $piddir ; then +if test ! -d $piddir ; then piddir=`eval echo ${sysconfdir}` case $piddir in NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;; esac fi -cat >> confdefs.h <>confdefs.h <<_ACEOF #define _PATH_SSH_PIDDIR "$piddir" -EOF - - +_ACEOF # Check whether --enable-lastlog or --disable-lastlog was given. if test "${enable_lastlog+set}" = set; then enableval="$enable_lastlog" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_LASTLOG 1 -EOF - - -fi +_ACEOF +fi; # Check whether --enable-utmp or --disable-utmp was given. if test "${enable_utmp+set}" = set; then enableval="$enable_utmp" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_UTMP 1 -EOF - - -fi +_ACEOF +fi; # Check whether --enable-utmpx or --disable-utmpx was given. if test "${enable_utmpx+set}" = set; then enableval="$enable_utmpx" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_UTMPX 1 -EOF - - -fi +_ACEOF +fi; # Check whether --enable-wtmp or --disable-wtmp was given. if test "${enable_wtmp+set}" = set; then enableval="$enable_wtmp" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_WTMP 1 -EOF - - -fi +_ACEOF +fi; # Check whether --enable-wtmpx or --disable-wtmpx was given. if test "${enable_wtmpx+set}" = set; then enableval="$enable_wtmpx" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_WTMPX 1 -EOF - - -fi +_ACEOF +fi; # Check whether --enable-libutil or --disable-libutil was given. if test "${enable_libutil+set}" = set; then enableval="$enable_libutil" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_LOGIN 1 -EOF - - -fi +_ACEOF +fi; # Check whether --enable-pututline or --disable-pututline was given. if test "${enable_pututline+set}" = set; then enableval="$enable_pututline" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_PUTUTLINE 1 -EOF - - -fi +_ACEOF +fi; # Check whether --enable-pututxline or --disable-pututxline was given. if test "${enable_pututxline+set}" = set; then enableval="$enable_pututxline" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_PUTUTXLINE 1 -EOF - +_ACEOF -fi +fi; # Check whether --with-lastlog or --without-lastlog was given. if test "${with_lastlog+set}" = set; then withval="$with_lastlog" - - if test "x$withval" = "xno" ; then - cat >> confdefs.h <<\EOF + + if test "x$withval" = "xno" ; then + cat >>confdefs.h <<\_ACEOF #define DISABLE_LASTLOG 1 -EOF +_ACEOF else conf_lastlog_location=$withval fi - - -fi +fi; - -echo $ac_n "checking if your system defines LASTLOG_FILE""... $ac_c" 1>&6 -echo "configure:8338: checking if your system defines LASTLOG_FILE" >&5 -cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking if your system defines LASTLOG_FILE... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 13905 "configure" #include "confdefs.h" #include @@ -8347,24 +13913,48 @@ #ifdef HAVE_PATHS_H # include #endif - -int main() { - char *lastlog = LASTLOG_FILE; -; return 0; } -EOF -if { (eval echo configure:8356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - echo "$ac_t""no" 1>&6 - echo $ac_n "checking if your system defines _PATH_LASTLOG""... $ac_c" 1>&6 -echo "configure:8366: checking if your system defines _PATH_LASTLOG" >&5 - cat > conftest.$ac_ext < +#endif + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + char *lastlog = LASTLOG_FILE; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:13935: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:13938: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:13941: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:13944: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:13946: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + + echo "$as_me:13952: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "$as_me:13954: checking if your system defines _PATH_LASTLOG" >&5 +echo $ECHO_N "checking if your system defines _PATH_LASTLOG... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +#line 13957 "configure" #include "confdefs.h" #include @@ -8375,28 +13965,48 @@ #ifdef HAVE_PATHS_H # include #endif - -int main() { - char *lastlog = _PATH_LASTLOG; -; return 0; } -EOF -if { (eval echo configure:8384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + char *lastlog = _PATH_LASTLOG; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:13984: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:13987: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:13990: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:13993: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:13995: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - echo "$ac_t""no" 1>&6 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + + echo "$as_me:14001: result: no" >&5 +echo "${ECHO_T}no" >&6 system_lastlog_path=no - + fi -rm -f conftest* - +rm -f conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext if test -z "$conf_lastlog_location"; then if test x"$system_lastlog_path" = x"no" ; then @@ -8406,22 +14016,23 @@ fi done if test -z "$conf_lastlog_location"; then - echo "configure: warning: ** Cannot find lastlog **" 1>&2 + { echo "$as_me:14019: WARNING: ** Cannot find lastlog **" >&5 +echo "$as_me: WARNING: ** Cannot find lastlog **" >&2;} fi fi fi if test -n "$conf_lastlog_location"; then - cat >> confdefs.h <>confdefs.h <<_ACEOF #define CONF_LASTLOG_FILE "$conf_lastlog_location" -EOF +_ACEOF -fi +fi -echo $ac_n "checking if your system defines UTMP_FILE""... $ac_c" 1>&6 -echo "configure:8423: checking if your system defines UTMP_FILE" >&5 -cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking if your system defines UTMP_FILE... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 14035 "configure" #include "confdefs.h" #include @@ -8429,23 +14040,44 @@ #ifdef HAVE_PATHS_H # include #endif - -int main() { - char *utmp = UTMP_FILE; -; return 0; } -EOF -if { (eval echo configure:8438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 - system_utmp_path=no + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + char *utmp = UTMP_FILE; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:14059: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:14062: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:14065: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:14068: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:14070: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + echo "$as_me:14075: result: no" >&5 +echo "${ECHO_T}no" >&6 + system_utmp_path=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext if test -z "$conf_utmp_location"; then if test x"$system_utmp_path" = x"no" ; then for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do @@ -8454,24 +14086,24 @@ fi done if test -z "$conf_utmp_location"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_UTMP 1 -EOF +_ACEOF fi fi fi if test -n "$conf_utmp_location"; then - cat >> confdefs.h <>confdefs.h <<_ACEOF #define CONF_UTMP_FILE "$conf_utmp_location" -EOF +_ACEOF -fi +fi -echo $ac_n "checking if your system defines WTMP_FILE""... $ac_c" 1>&6 -echo "configure:8473: checking if your system defines WTMP_FILE" >&5 -cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking if your system defines WTMP_FILE... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 14106 "configure" #include "confdefs.h" #include @@ -8479,23 +14111,44 @@ #ifdef HAVE_PATHS_H # include #endif - -int main() { - char *wtmp = WTMP_FILE; -; return 0; } -EOF -if { (eval echo configure:8488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 - system_wtmp_path=no + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + char *wtmp = WTMP_FILE; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:14130: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:14133: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:14136: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:14139: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:14141: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + echo "$as_me:14146: result: no" >&5 +echo "${ECHO_T}no" >&6 + system_wtmp_path=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext if test -z "$conf_wtmp_location"; then if test x"$system_wtmp_path" = x"no" ; then for f in /usr/adm/wtmp /var/log/wtmp; do @@ -8504,25 +14157,24 @@ fi done if test -z "$conf_wtmp_location"; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_WTMP 1 -EOF +_ACEOF fi fi fi if test -n "$conf_wtmp_location"; then - cat >> confdefs.h <>confdefs.h <<_ACEOF #define CONF_WTMP_FILE "$conf_wtmp_location" -EOF - -fi +_ACEOF +fi -echo $ac_n "checking if your system defines UTMPX_FILE""... $ac_c" 1>&6 -echo "configure:8524: checking if your system defines UTMPX_FILE" >&5 -cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking if your system defines UTMPX_FILE... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 14177 "configure" #include "confdefs.h" #include @@ -8533,41 +14185,62 @@ #ifdef HAVE_PATHS_H # include #endif - -int main() { - char *utmpx = UTMPX_FILE; -; return 0; } -EOF -if { (eval echo configure:8542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 - system_utmpx_path=no + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + char *utmpx = UTMPX_FILE; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:14204: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:14207: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:14210: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:14213: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:14215: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + echo "$as_me:14220: result: no" >&5 +echo "${ECHO_T}no" >&6 + system_utmpx_path=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext if test -z "$conf_utmpx_location"; then if test x"$system_utmpx_path" = x"no" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_UTMPX 1 -EOF +_ACEOF fi else - cat >> confdefs.h <>confdefs.h <<_ACEOF #define CONF_UTMPX_FILE "$conf_utmpx_location" -EOF +_ACEOF -fi +fi -echo $ac_n "checking if your system defines WTMPX_FILE""... $ac_c" 1>&6 -echo "configure:8569: checking if your system defines WTMPX_FILE" >&5 -cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking if your system defines WTMPX_FILE... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line 14243 "configure" #include "confdefs.h" #include @@ -8578,555 +14251,960 @@ #ifdef HAVE_PATHS_H # include #endif - -int main() { - char *wtmpx = WTMPX_FILE; -; return 0; } -EOF -if { (eval echo configure:8587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 - system_wtmpx_path=no + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + char *wtmpx = WTMPX_FILE; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:14270: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:14273: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:14276: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:14279: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:14281: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + echo "$as_me:14286: result: no" >&5 +echo "${ECHO_T}no" >&6 + system_wtmpx_path=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext if test -z "$conf_wtmpx_location"; then if test x"$system_wtmpx_path" = x"no" ; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_WTMPX 1 -EOF +_ACEOF fi else - cat >> confdefs.h <>confdefs.h <<_ACEOF #define CONF_WTMPX_FILE "$conf_wtmpx_location" -EOF - -fi +_ACEOF +fi # Change default command timeout for builtin PRNG entropy_timeout=200 + # Check whether --with-entropy-timeout or --without-entropy-timeout was given. if test "${with_entropy_timeout+set}" = set; then withval="$with_entropy_timeout" - + if test "x$withval" != "xno" ; then entropy_timeout=$withval fi - - -fi -cat >> confdefs.h <>confdefs.h <<_ACEOF #define ENTROPY_TIMEOUT_MSEC $entropy_timeout -EOF - - +_ACEOF if test ! -z "$blibpath" ; then LDFLAGS="$LDFLAGS -blibpath:$blibpath" - echo "configure: warning: Please check and edit -blibpath in LDFLAGS in Makefile" 1>&2 -fi - -echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:8639: checking for Cygwin environment" >&5 -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cygwin=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cygwin=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cygwin" 1>&6 -CYGWIN= -test "$ac_cv_cygwin" = yes && CYGWIN=yes -echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:8672: checking for mingw32 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_mingw32=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_mingw32=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_mingw32" 1>&6 -MINGW32= -test "$ac_cv_mingw32" = yes && MINGW32=yes - - -echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:8703: checking for executable suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$CYGWIN" = yes || test "$MINGW32" = yes; then - ac_cv_exeext=.exe -else - rm -f conftest* - echo 'int main () { return 0; }' > conftest.$ac_ext - ac_cv_exeext= - if { (eval echo configure:8713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then - for file in conftest.*; do - case $file in - *.c | *.o | *.obj) ;; - *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; - esac - done - else - { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } - fi - rm -f conftest* - test x"${ac_cv_exeext}" = x && ac_cv_exeext=no -fi + { echo "$as_me:14324: WARNING: Please check and edit -blibpath in LDFLAGS in Makefile" >&5 +echo "$as_me: WARNING: Please check and edit -blibpath in LDFLAGS in Makefile" >&2;} fi -EXEEXT="" -test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} -echo "$ac_t""${ac_cv_exeext}" 1>&6 -ac_exeext=$EXEEXT - - -trap '' 1 2 15 -cat > confcache <<\EOF +ac_config_files="$ac_config_files Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds" +cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. # -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. # -EOF +# `ac_cv_env_foo' variables (set or unset) will be overriden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if cmp -s $cache_file confcache; then :; else if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' fi -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - DEFS=-DHAVE_CONFIG_H -# Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated automatically by $as_me. # Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# # Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. +# configure, is in config.log if it exists. -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option +debug=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Name of the executable. +as_me=`echo "$0" |sed 's,.*[\\/],,'` + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +as_executable_p="test -f" + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +# NLS nuisances. +$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } +$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } +$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } +$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } +$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } +$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } +$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } +$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running \$as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.52d. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.52d, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +INSTALL="$INSTALL" +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 do - case "\$ac_option" in + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + shift + set dummy "$ac_option" "$ac_optarg" ${1+"$@"} + shift + ;; + -*);; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_need_defaults=false;; + esac + + case $1 in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; + echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion" + exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;; +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:14608: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + shift + CONFIG_FILES="$CONFIG_FILES $1" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + shift + CONFIG_HEADERS="$CONFIG_HEADERS $1" + ac_need_defaults=false;; + + # This is an error. + -*) { { echo "$as_me:14627: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + esac + shift done -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" +_ACEOF -trap 'rm -fr `echo "Makefile openbsd-compat/Makefile ssh_prng_cmds config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@CC@%$CC%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@CPP@%$CPP%g -s%@RANLIB@%$RANLIB%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@AR@%$AR%g -s%@PERL@%$PERL%g -s%@ENT@%$ENT%g -s%@FILEPRIV@%$FILEPRIV%g -s%@TEST_MINUS_S_SH@%$TEST_MINUS_S_SH%g -s%@LOGIN_PROGRAM_FALLBACK@%$LOGIN_PROGRAM_FALLBACK%g -s%@LD@%$LD%g -s%@NO_SFTP@%$NO_SFTP%g -s%@rsh_path@%$rsh_path%g -s%@xauth_path@%$xauth_path%g -s%@XAUTH_PATH@%$XAUTH_PATH%g -s%@RANDOM_POOL@%$RANDOM_POOL%g -s%@PROG_LS@%$PROG_LS%g -s%@PROG_NETSTAT@%$PROG_NETSTAT%g -s%@PROG_ARP@%$PROG_ARP%g -s%@PROG_IFCONFIG@%$PROG_IFCONFIG%g -s%@PROG_PS@%$PROG_PS%g -s%@PROG_W@%$PROG_W%g -s%@PROG_WHO@%$PROG_WHO%g -s%@PROG_LAST@%$PROG_LAST%g -s%@PROG_LASTLOG@%$PROG_LASTLOG%g -s%@PROG_DF@%$PROG_DF%g -s%@PROG_VMSTAT@%$PROG_VMSTAT%g -s%@PROG_UPTIME@%$PROG_UPTIME%g -s%@PROG_IPCS@%$PROG_IPCS%g -s%@PROG_TAIL@%$PROG_TAIL%g -s%@INSTALL_SSH_PRNG_CMDS@%$INSTALL_SSH_PRNG_CMDS%g -s%@NROFF@%$NROFF%g -s%@MANTYPE@%$MANTYPE%g -s%@mansubdir@%$mansubdir%g -s%@user_path@%$user_path%g -s%@SSHMODE@%$SSHMODE%g -s%@piddir@%$piddir%g -s%@EXEEXT@%$EXEEXT%g +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "openbsd-compat/Makefile" ) CONFIG_FILES="$CONFIG_FILES openbsd-compat/Makefile" ;; + "scard/Makefile" ) CONFIG_FILES="$CONFIG_FILES scard/Makefile" ;; + "ssh_prng_cmds" ) CONFIG_FILES="$CONFIG_FILES ssh_prng_cmds" ;; + "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + *) { { echo "$as_me:14651: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers +fi + +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. +: ${TMPDIR=/tmp} +{ + tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=$TMPDIR/cs$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in $TMPDIR" >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@DEFS@,$DEFS,;t t +s,@LIBS@,$LIBS,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@CPP@,$CPP,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@AR@,$AR,;t t +s,@PERL@,$PERL,;t t +s,@ENT@,$ENT,;t t +s,@FILEPRIV@,$FILEPRIV,;t t +s,@TEST_MINUS_S_SH@,$TEST_MINUS_S_SH,;t t +s,@LOGIN_PROGRAM_FALLBACK@,$LOGIN_PROGRAM_FALLBACK,;t t +s,@LD@,$LD,;t t +s,@NO_SFTP@,$NO_SFTP,;t t +s,@rsh_path@,$rsh_path,;t t +s,@xauth_path@,$xauth_path,;t t +s,@XAUTH_PATH@,$XAUTH_PATH,;t t +s,@RANDOM_POOL@,$RANDOM_POOL,;t t +s,@PROG_LS@,$PROG_LS,;t t +s,@PROG_NETSTAT@,$PROG_NETSTAT,;t t +s,@PROG_ARP@,$PROG_ARP,;t t +s,@PROG_IFCONFIG@,$PROG_IFCONFIG,;t t +s,@PROG_JSTAT@,$PROG_JSTAT,;t t +s,@PROG_PS@,$PROG_PS,;t t +s,@PROG_SAR@,$PROG_SAR,;t t +s,@PROG_W@,$PROG_W,;t t +s,@PROG_WHO@,$PROG_WHO,;t t +s,@PROG_LAST@,$PROG_LAST,;t t +s,@PROG_LASTLOG@,$PROG_LASTLOG,;t t +s,@PROG_DF@,$PROG_DF,;t t +s,@PROG_VMSTAT@,$PROG_VMSTAT,;t t +s,@PROG_UPTIME@,$PROG_UPTIME,;t t +s,@PROG_IPCS@,$PROG_IPCS,;t t +s,@PROG_TAIL@,$PROG_TAIL,;t t +s,@INSTALL_SSH_PRNG_CMDS@,$INSTALL_SSH_PRNG_CMDS,;t t +s,@NROFF@,$NROFF,;t t +s,@MANTYPE@,$MANTYPE,;t t +s,@mansubdir@,$mansubdir,;t t +s,@user_path@,$user_path,;t t +s,@SSHMODE@,$SSHMODE,;t t +s,@piddir@,$piddir,;t t CEOF -EOF -cat >> $CONFIG_STATUS <<\EOF +_ACEOF -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { case "$ac_dir" in + [\\/]* | ?:[\\/]* ) as_incr_dir=;; + *) as_incr_dir=.;; +esac +as_dummy="$ac_dir" +for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do + case $as_mkdir_dir in + # Skip DOS drivespec + ?:) as_incr_dir=$as_mkdir_dir ;; + *) + as_incr_dir=$as_incr_dir/$as_mkdir_dir + test -d "$as_incr_dir" || + mkdir "$as_incr_dir" || + { { echo "$as_me:14870: error: cannot create \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; } + ;; + esac +done; } - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi + if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\./,,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac + if test x"$ac_file" != x-; then + { echo "$as_me:14907: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated automatically by config.status. */ + configure_input="Generated automatically from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:14925: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:14938: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' - -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - echo creating $ac_file + test x"$ac_file" != x- && { echo "$as_me:14999: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in - -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:15010: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:15023: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. - +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # egrep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail -while : +while grep . conftest.undefs >/dev/null do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated automatically by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated automatically by configure. */" >$tmp/config.h else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file + echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h fi -fi; done + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if cmp -s $ac_file $tmp/config.h 2>/dev/null; then + { echo "$as_me:15140: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { case "$ac_dir" in + [\\/]* | ?:[\\/]* ) as_incr_dir=;; + *) as_incr_dir=.;; +esac +as_dummy="$ac_dir" +for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do + case $as_mkdir_dir in + # Skip DOS drivespec + ?:) as_incr_dir=$as_mkdir_dir ;; + *) + as_incr_dir=$as_incr_dir/$as_mkdir_dir + test -d "$as_incr_dir" || + mkdir "$as_incr_dir" || + { { echo "$as_me:15167: error: cannot create \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; } + ;; + esac +done; } -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF -exit 0 -EOF +{ (exit 0); exit 0; } +_ACEOF chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +ac_clean_files=$ac_clean_files_save +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + exec 5>/dev/null + $SHELL $CONFIG_STATUS || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi # Print summary of options @@ -9166,6 +15244,7 @@ echo " Manpage format: $MANTYPE" echo " PAM support: ${PAM_MSG}" echo " KerberosIV support: $KRB4_MSG" +echo " Smartcard support: $SCARD_MSG" echo " AFS support: $AFS_MSG" echo " S/KEY support: $SKEY_MSG" echo " TCP Wrappers support: $TCPW_MSG" @@ -9208,4 +15287,3 @@ echo "64bit integers." echo "" fi - diff -ru openssh-2.9p2/configure.in openssh-2.9.9p1/configure.in --- openssh-2.9p2/configure.in 2001-05-29 03:21:44.000000000 +1000 +++ openssh-2.9.9p1/configure.in 2001-09-25 16:46:12.000000000 +1000 @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.282.2.4 2001/05/28 17:21:44 tim Exp $ +# $Id: configure.in,v 1.313.2.1 2001/09/25 06:46:12 djm Exp $ AC_INIT(ssh.c) @@ -21,6 +21,9 @@ AC_PATH_PROG(TEST_MINUS_S_SH, ksh) AC_PATH_PROG(TEST_MINUS_S_SH, sh) +# System features +AC_SYS_LARGEFILE + if test -z "$AR" ; then AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***]) fi @@ -41,10 +44,9 @@ fi AC_SUBST(LD) -# C Compiler features AC_C_INLINE -if test "$GCC" = "yes"; then - CFLAGS="$CFLAGS -Wall" +if test "$GCC" = "yes" || test "$GCC" = "egcs"; then + CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wno-uninitialized" fi # Check for some target-specific stuff @@ -64,6 +66,7 @@ *-*-cygwin*) LIBS="$LIBS -lregex /usr/lib/textmode.o" AC_DEFINE(HAVE_CYGWIN) + AC_DEFINE(USE_PIPES) AC_DEFINE(DISABLE_SHADOW) AC_DEFINE(IPV4_DEFAULT) AC_DEFINE(IP_TOS_IS_BROKEN) @@ -74,27 +77,30 @@ *-*-dgux*) AC_DEFINE(IP_TOS_IS_BROKEN) ;; +*-*-darwin*) + AC_DEFINE(BROKEN_GETADDRINFO) + ;; *-*-hpux10*) if test -z "$GCC"; then CFLAGS="$CFLAGS -Ae" fi - CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE" + CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" IPADDR_IN_DISPLAY=yes AC_DEFINE(USE_PIPES) AC_DEFINE(DISABLE_SHADOW) AC_DEFINE(DISABLE_UTMP) AC_DEFINE(SPT_TYPE,SPT_PSTAT) - LIBS="$LIBS -lsec" + LIBS="$LIBS -lxnet -lsec" ;; *-*-hpux11*) - CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE" + CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" IPADDR_IN_DISPLAY=yes AC_DEFINE(PAM_SUN_CODEBASE) AC_DEFINE(USE_PIPES) AC_DEFINE(DISABLE_SHADOW) AC_DEFINE(DISABLE_UTMP) AC_DEFINE(SPT_TYPE,SPT_PSTAT) - LIBS="$LIBS -lsec" + LIBS="$LIBS -lxnet -lsec" ;; *-*-irix5*) CPPFLAGS="$CPPFLAGS -I/usr/local/include" @@ -195,13 +201,13 @@ *-*-sysv4.2*) CPPFLAGS="$CPPFLAGS -I/usr/local/include" LDFLAGS="$LDFLAGS -L/usr/local/lib" - enable_suid_ssh=no +# enable_suid_ssh=no AC_DEFINE(USE_PIPES) ;; *-*-sysv5*) CPPFLAGS="$CPPFLAGS -I/usr/local/include" LDFLAGS="$LDFLAGS -L/usr/local/lib" - enable_suid_ssh=no +# enable_suid_ssh=no AC_DEFINE(USE_PIPES) ;; *-*-sysv*) @@ -238,6 +244,13 @@ AC_CHECK_FUNCS(getluid setluid) MANTYPE=man ;; +*-*-unicos*) + no_libsocket=1 + no_libnsl=1 + AC_DEFINE(USE_PIPES) + LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal,-L/usr/local/lib" + LIBS="$LIBS -lgen -lrsc" + ;; *-dec-osf*) AC_MSG_CHECKING(for Digital Unix SIA) no_osfsia="" @@ -261,6 +274,14 @@ fi fi ;; + +*-*-nto-qnx) + AC_DEFINE(USE_PIPES) + AC_DEFINE(NO_X11_UNIX_SOCKETS) + AC_DEFINE(MISSING_NFDBITS) + AC_DEFINE(MISSING_HOWMANY) + AC_DEFINE(MISSING_FD_MASK) + ;; esac # Allow user to specify flags @@ -355,7 +376,7 @@ AC_FUNC_STRFTIME # Checks for header files. -AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h getopt.h glob.h lastlog.h limits.h login.h login_cap.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h regex.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/queue.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h sys/un.h stddef.h time.h ttyent.h usersec.h util.h utime.h utmp.h utmpx.h vis.h) +AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h getopt.h glob.h lastlog.h libgen.h limits.h login.h login_cap.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h regex.h shadow.h security/pam_appl.h stdint.h strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/queue.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h sys/un.h stddef.h time.h ttyent.h usersec.h util.h utime.h utmp.h utmpx.h) # Check for ALTDIRFUNC glob() extension AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support) @@ -459,7 +480,7 @@ ) dnl Checks for library functions. -AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getnameinfo getrlimit getrusage getttyent getusershell glob inet_aton inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty realpath rresvport_af setdtablesize setenv setegid seteuid setlogin setproctitle setresgid setreuid setrlimit setsid setvbuf sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep strtok_r sysconf tcgetpgrp utimes vsnprintf vhangup vis waitpid _getpty __b64_ntop) +AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock dirname fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getopt getnameinfo getrlimit getrusage getttyent glob inet_aton inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty readpassphrase realpath rresvport_af setdtablesize setenv setegid seteuid setlogin setproctitle setresgid setreuid setrlimit setsid setvbuf sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep sysconf tcgetpgrp utimes vsnprintf vhangup waitpid _getpty __b64_ntop) dnl Checks for time functions AC_CHECK_FUNCS(gettimeofday time) dnl Checks for libutil functions @@ -695,6 +716,7 @@ break; ], []) done +LIBS="$saved_LIBS" if test ! -z "$no_rsa" ; then AC_MSG_RESULT(disabled) @@ -710,7 +732,7 @@ else RSA_MSG="yes (using RSAref)" AC_MSG_RESULT(using RSAref) - LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref" + LIBS="$LIBS -lcrypto -lRSAglue -lrsaref" fi fi fi @@ -759,7 +781,22 @@ AC_DEFINE(HAVE_INTXX_T) have_intxx_t=1 fi - + +if (test -z "$have_intxx_t" && \ + test "x$ac_cv_header_stdint_h" = "xyes") +then + AC_MSG_CHECKING([for intXX_t types in stdint.h]) + AC_TRY_COMPILE( + [ #include ], + [ int8_t a; int16_t b; int32_t c; a = b = c = 1;], + [ + AC_DEFINE(HAVE_INTXX_T) + AC_MSG_RESULT(yes) + ], + [ AC_MSG_RESULT(no) ] + ) +fi + AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [ AC_TRY_COMPILE( [ #include ], @@ -773,6 +810,19 @@ have_int64_t=1 fi +if test -z "$have_int64_t" ; then + AC_MSG_CHECKING([for int64_t type in sys/socket.h]) + AC_TRY_COMPILE( + [ #include ], + [ int64_t a; a = 1], + [ + AC_DEFINE(HAVE_INT64_T) + AC_MSG_RESULT(yes) + ], + [ AC_MSG_RESULT(no) ] + ) +fi + AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [ AC_TRY_COMPILE( [ #include ], @@ -786,6 +836,19 @@ have_u_intxx_t=1 fi +if test -z "$have_u_intxx_t" ; then + AC_MSG_CHECKING([for u_intXX_t types in sys/socket.h]) + AC_TRY_COMPILE( + [ #include ], + [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;], + [ + AC_DEFINE(HAVE_U_INTXX_T) + AC_MSG_RESULT(yes) + ], + [ AC_MSG_RESULT(no) ] + ) +fi + AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [ AC_TRY_COMPILE( [ #include ], @@ -799,6 +862,35 @@ have_u_int64_t=1 fi +if test -z "$have_u_intxx_t" ; then + AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [ + AC_TRY_COMPILE( + [ +#include + ], + [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ], + [ ac_cv_have_uintxx_t="yes" ], + [ ac_cv_have_uintxx_t="no" ] + ) + ]) + if test "x$ac_cv_have_uintxx_t" = "xyes" ; then + AC_DEFINE(HAVE_UINTXX_T) + fi +fi + +if test -z "$have_uintxx_t" ; then + AC_MSG_CHECKING([for uintXX_t types in stdint.h]) + AC_TRY_COMPILE( + [ #include ], + [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;], + [ + AC_DEFINE(HAVE_UINTXX_T) + AC_MSG_RESULT(yes) + ], + [ AC_MSG_RESULT(no) ] + ) +fi + if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \ test "x$ac_cv_header_sys_bitypes_h" = "xyes") then @@ -821,20 +913,19 @@ ) fi -if test -z "$have_u_intxx_t" ; then - AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [ - AC_TRY_COMPILE( - [ + +AC_CACHE_CHECK([for u_char], ac_cv_have_u_char, [ + AC_TRY_COMPILE( + [ #include - ], - [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ], - [ ac_cv_have_uintxx_t="yes" ], - [ ac_cv_have_uintxx_t="no" ] - ) - ]) - if test "x$ac_cv_have_uintxx_t" = "xyes" ; then - AC_DEFINE(HAVE_UINTXX_T) - fi + ], + [ u_char foo; foo = 125; ], + [ ac_cv_have_u_char="yes" ], + [ ac_cv_have_u_char="no" ] + ) +]) +if test "x$ac_cv_have_u_char" = "xyes" ; then + AC_DEFINE(HAVE_U_CHAR) fi AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [ @@ -1043,7 +1134,7 @@ #if (SIZEOF_LONG_INT == 8) long int num = 0x7fffffffffffffff; #else - long long num = 0x7fffffffffffffff; + long long num = 0x7fffffffffffffffll; #endif strcpy(expected_out, "9223372036854775807"); snprintf(buf, mazsize, "%lld", num); @@ -1079,22 +1170,6 @@ OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX) AC_STRUCT_ST_BLKSIZE -AC_CACHE_CHECK([for sun_len field in struct sockaddr_un], - ac_cv_have_sun_len_in_struct_sockaddr_un, [ - AC_TRY_COMPILE( - [ -#include -#include - ], - [ struct sockaddr_un s; s.sun_len = 1; ], - [ ac_cv_have_sun_len_in_struct_sockaddr_un="yes" ], - [ ac_cv_have_sun_len_in_struct_sockaddr_un="no" ], - ) -]) -if test "x$ac_cv_have_sun_len_in_struct_sockaddr_un" = "xyes" ; then - AC_DEFINE(HAVE_SUN_LEN_IN_SOCKADDR_UN) -fi - AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage], ac_cv_have_ss_family_in_struct_ss, [ AC_TRY_COMPILE( @@ -1142,6 +1217,35 @@ AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD) fi +AC_CACHE_CHECK([for pw_expire field in struct passwd], + ac_cv_have_pw_expire_in_struct_passwd, [ + AC_TRY_COMPILE( + [ +#include + ], + [ struct passwd p; p.pw_expire = 0; ], + [ ac_cv_have_pw_expire_in_struct_passwd="yes" ], + [ ac_cv_have_pw_expire_in_struct_passwd="no" ] + ) +]) +if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then + AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD) +fi + +AC_CACHE_CHECK([for pw_change field in struct passwd], + ac_cv_have_pw_change_in_struct_passwd, [ + AC_TRY_COMPILE( + [ +#include + ], + [ struct passwd p; p.pw_change = 0; ], + [ ac_cv_have_pw_change_in_struct_passwd="yes" ], + [ ac_cv_have_pw_change_in_struct_passwd="no" ] + ) +]) +if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then + AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD) +fi AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [ AC_TRY_LINK([], @@ -1154,6 +1258,20 @@ AC_DEFINE(HAVE___PROGNAME) fi +AC_CACHE_CHECK([whether getopt has optreset support], + ac_cv_have_getopt_optreset, [ + AC_TRY_LINK( + [ +#include + ], + [ extern int optreset; optreset = 0; ], + [ ac_cv_have_getopt_optreset="yes" ], + [ ac_cv_have_getopt_optreset="no" ] + ) +]) +if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then + AC_DEFINE(HAVE_GETOPT_OPTRESET) +fi AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [ AC_TRY_LINK([], @@ -1180,12 +1298,41 @@ # Check whether user wants Kerberos support +SCARD_MSG="no" +AC_ARG_WITH(smartcard, + [ --with-smartcard Enable smartcard support], + [ + if test "x$withval" != "xno" ; then + if test "x$withval" != "xyes" ; then + CPPFLAGS="$CPPFLAGS -I${withval}" + LDFLAGS="$LDFLAGS -L${withval}" + if test ! -z "$need_dash_r" ; then + LDFLAGS="$LDFLAGS -R${withval}" + fi + if test ! -z "$blibpath" ; then + blibpath="$blibpath:${withval}" + fi + fi + AC_CHECK_HEADERS(sectok.h) + if test "$ac_cv_header_sectok_h" != yes; then + AC_MSG_ERROR(Can't find sectok.h) + fi + AC_CHECK_LIB(sectok, sectok_open) + if test "$ac_cv_lib_sectok_sectok_open" != yes; then + AC_MSG_ERROR(Can't find libsectok) + fi + AC_DEFINE(SMARTCARD) + SCARD_MSG="yes" + fi + ] +) + +# Check whether user wants Kerberos support KRB4_MSG="no" AC_ARG_WITH(kerberos4, [ --with-kerberos4=PATH Enable Kerberos 4 support], [ if test "x$withval" != "xno" ; then - if test "x$withval" != "xyes" ; then CPPFLAGS="$CPPFLAGS -I${withval}/include" LDFLAGS="$LDFLAGS -L${withval}/lib" @@ -1397,7 +1544,9 @@ OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat) OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp) OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig) + OSSH_PATH_ENTROPY_PROG(PROG_JSTAT, jstat) OSSH_PATH_ENTROPY_PROG(PROG_PS, ps) + OSSH_PATH_ENTROPY_PROG(PROG_SAR, sar) OSSH_PATH_ENTROPY_PROG(PROG_W, w) OSSH_PATH_ENTROPY_PROG(PROG_WHO, who) OSSH_PATH_ENTROPY_PROG(PROG_LAST, last) @@ -1413,7 +1562,7 @@ AC_SUBST(INSTALL_SSH_PRNG_CMDS) -AC_ARG_WITH(catman, +AC_ARG_WITH(mantype, [ --with-mantype=man|cat|doc Set man page type], [ case "$withval" in @@ -1624,11 +1773,11 @@ SSHMODE=0711 ;; *) AC_MSG_RESULT(yes) - SSHMODE=04711 + SSHMODE=4711 ;; esac ], AC_MSG_RESULT(yes) - SSHMODE=04711 + SSHMODE=4711 ) AC_SUBST(SSHMODE) @@ -1716,6 +1865,9 @@ #ifdef HAVE_PATHS_H # include #endif +#ifdef HAVE_LOGIN_H +# include +#endif ], [ char *lastlog = LASTLOG_FILE; ], [ AC_MSG_RESULT(yes) ], @@ -1893,7 +2045,7 @@ AC_EXEEXT -AC_OUTPUT(Makefile openbsd-compat/Makefile ssh_prng_cmds) +AC_OUTPUT(Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds) # Print summary of options @@ -1933,6 +2085,7 @@ echo " Manpage format: $MANTYPE" echo " PAM support: ${PAM_MSG}" echo " KerberosIV support: $KRB4_MSG" +echo " Smartcard support: $SCARD_MSG" echo " AFS support: $AFS_MSG" echo " S/KEY support: $SKEY_MSG" echo " TCP Wrappers support: $TCPW_MSG" diff -ru openssh-2.9p2/contrib/README openssh-2.9.9p1/contrib/README --- openssh-2.9p2/contrib/README 2001-04-29 22:27:05.000000000 +1000 +++ openssh-2.9.9p1/contrib/README 2001-03-04 08:43:19.000000000 +1100 @@ -11,16 +11,9 @@ In this directory ----------------- -SecurID.diff - -This patch from Theo Schlossnagle adds SecurID support -to portable OpenSSH. Please refer to the text at the start of the patch -and to the author's homepage at http://www.omniti.com/~jesus/projects/ for -more details. - chroot.diff: -Ricardo Cerqueira patch to enable chrooting using the +Ricardo Cerqueira's patch to enable chrooting using the wu-ftpd style magic home directories (containing '/./'). More details in the head of the patch itself. @@ -31,8 +24,8 @@ gnome-ssh-askpass: -A GNOME passphrase requester from Damien Miller with help -from several others. Compilation instructions are in the top of the file. +A GNOME passphrase requester of my own creation. Compilation instructions +are in the top of the file. sshd.pam.generic: @@ -49,11 +42,9 @@ on Solaris machines to provide manpages that are not preformated. Contributed by Mark D. Roth -redhat/ +redhat: -Files useful for operation on Redhat Linux systems. NB. it is recommended -that you use the prepackaged RPM versions on Redhat, as they have been -better tested. +RPM spec file an scripts for building Redhat packages suse: @@ -68,5 +59,4 @@ Jim Knoble has written an excellent X11 passphrase requester. This is highly recommended: -http://www.ntrnet.net/~jmknoble/software/x11-ssh-askpass/ - +http://www.ntrnet.net/~jmknoble/software/x11-ssh-askpass/index.html Only in openssh-2.9p2/contrib: SecurID.diff diff -ru openssh-2.9p2/contrib/caldera/openssh.spec openssh-2.9.9p1/contrib/caldera/openssh.spec --- openssh-2.9p2/contrib/caldera/openssh.spec 2001-06-17 14:06:19.000000000 +1000 +++ openssh-2.9.9p1/contrib/caldera/openssh.spec 2001-09-25 09:15:15.000000000 +1000 @@ -1,8 +1,8 @@ -%define askpass 1.2.0 +%define askpass 1.2.2 Name : openssh -Version : 2.9p2 -Release : 1 +Version : 2.9.9p1 +Release : 3 Group : System/Network Summary : OpenSSH free Secure Shell (SSH) implementation. @@ -11,6 +11,7 @@ Summary(fr) : Implémentation libre du shell sécurisé OpenSSH (SSH). Summary(it) : Implementazione gratuita OpenSSH della Secure Shell. Summary(pt) : Implementação livre OpenSSH do protocolo 'Secure Shell' (SSH). +Summary(pt_BR) : Implementação livre OpenSSH do protocolo Secure Shell (SSH). Copyright : BSD Packager : Stephan Seyboth @@ -18,14 +19,12 @@ URL : http://www.openssh.com/ Obsoletes : ssh, ssh-clients, openssh-clients - -# uncomment for >= Caldera 3.1 -#Requires : SysVinit-scripts >= 1.07 BuildRoot : /tmp/%{Name}-%{Version} Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{Version}.tar.gz Source1: http://www.ntrnet.net/~jmknoble/software/x11-ssh-askpass/x11-ssh-askpass-%{askpass}.tar.gz +Source2: http://www.openssh.com/openssh-faq.html %Package server @@ -34,11 +33,12 @@ Obsoletes : ssh-server Summary : OpenSSH Secure Shell protocol server (sshd). -Summary(de) : OpenSSH Secure Shell Protocol Server (sshd). +Summary(de) : OpenSSH Secure Shell Protocol-Server (sshd). Summary(es) : Servidor del protocolo OpenSSH Secure Shell (sshd). Summary(fr) : Serveur de protocole du shell sécurisé OpenSSH (sshd). Summary(it) : Server OpenSSH per il protocollo Secure Shell (sshd). Summary(pt) : Servidor do protocolo 'Secure Shell' OpenSSH (sshd). +Summary(pt_BR) : Servidor do protocolo Secure Shell OpenSSH (sshd). %Package askpass @@ -52,6 +52,7 @@ Summary(fr) : Dialogue pass-phrase X11 d'OpenSSH. Summary(it) : Finestra di dialogo X11 per la frase segreta di OpenSSH. Summary(pt) : Diálogo de pedido de senha para X11 do OpenSSH. +Summary(pt_BR) : Diálogo de pedido de senha para X11 do OpenSSH. %Description @@ -94,7 +95,14 @@ telnet, rlogin, rexec, e o rsh e fornece comunicações seguras e cifradas entre duas máquinas sem confiança mútua sobre uma rede insegura. Ligações X11 e portos TCP/IP arbitrários também poder ser reenviados -pelos porto seguro. +pelo canal seguro. + +%Description -l pt_BR +O OpenSSH (Secure Shell) fornece acesso a um sistema remoto. Substitui o +telnet, rlogin, rexec, e o rsh e fornece comunicações seguras e criptografadas +entre duas máquinas sem confiança mútua sobre uma rede insegura. +Ligações X11 e portas TCP/IP arbitrárias também podem ser reenviadas +pelo canal seguro. %Description server This package installs the sshd, the server portion of OpenSSH. @@ -114,6 +122,9 @@ %Description -l pt server Este pacote intala o sshd, o servidor do OpenSSH. +%Description -l pt_BR server +Este pacote intala o sshd, o servidor do OpenSSH. + %Description askpass This package contains an X11-based passphrase dialog. @@ -133,6 +144,9 @@ %Description -l pt askpass Este pacote contém um diálogo de senha para o X11. +%Description -l pt_BR askpass +Este pacote contem um diálogo de frase-senha para o X11. + %Prep %setup %setup -D -T -a1 @@ -144,6 +158,7 @@ --prefix=/usr \ --sysconfdir=/etc/ssh \ --libexecdir=/usr/lib/ssh \ + --datadir=/usr/share/openssh \ --with-pam \ --with-tcp-wrappers \ --with-ipv4-default \ @@ -151,7 +166,9 @@ make cd x11-ssh-askpass-%{askpass} -xmkmf -a +./configure +xmkmf +make includes make @@ -169,8 +186,9 @@ NV="$DESTDIR%{_defaultdocdir}/%{Name}-%{Version}" mkdir -p $NV cp -a CREDITS ChangeLog LICENCE OVERVIEW README* TODO $NV +cp %{SOURCE2} $NV/faq.html mkdir -p $NV/x11-ssh-askpass-%{askpass} -cp -a x11-ssh-askpass-%{askpass}/{README,ChangeLog,SshAskpass*.ad} \ +cp -a x11-ssh-askpass-%{askpass}/{README,ChangeLog,TODO,SshAskpass*.ad} \ $NV/x11-ssh-askpass-%{askpass} @@ -182,6 +200,17 @@ %{fixUP} -vg $DESTDIR/etc/ssh/sshd_config 'X11Forwarding no' \ 'X11Forwarding yes' +cat <<-EOF >> $DESTDIR/etc/ssh/ssh_config + + # This retains the old behaviour of trying the SSH1 protocol + # before the more secure SSH2 one. Note that the SSH2 keys are + # stored in a different format so you will have to generate and + # distribute a new public/private key pair to migrate. See the + # ssh(1) man-page for details + Host * + Protocol 1,2 +EOF + install -m644 contrib/caldera/sshd.pam $DESTDIR/etc/pam.d/sshd # FIXME: disabled, find out why this doesn't work with nis %{fixUP} -vg $DESTDIR/etc/pam.d/sshd '(.*pam_limits.*)' '#$1' @@ -281,4 +310,4 @@ * Mon Jan 01 1998 ... Template Version: 1.31 -$Id: openssh.spec,v 1.15.2.2 2001/06/17 04:06:19 djm Exp $ +$Id: openssh.spec,v 1.19 2001/09/24 23:15:15 mouring Exp $ diff -ru openssh-2.9p2/contrib/chroot.diff openssh-2.9.9p1/contrib/chroot.diff --- openssh-2.9p2/contrib/chroot.diff 2001-04-29 22:26:54.000000000 +1000 +++ openssh-2.9.9p1/contrib/chroot.diff 2000-04-16 12:50:52.000000000 +1000 @@ -1,63 +1,61 @@ -From: Ricardo Cerqueira +From: Ricardo Cerqueira A patch to cause sshd to chroot when it encounters the magic token '/./' in a users home directory. The directory portion before the token is the directory to chroot() to, the portion after the token is the user's home directory relative to the new root. -To apply, execute the following command from the OpenSSH source directory: - -patch -p0 < contrib/chroot.diff - - ---- session.c Thu Mar 22 01:58:27 2001 -+++ session.c.chroot Thu Apr 5 12:33:23 2001 -@@ -93,6 +93,8 @@ - # include - #endif +Index: session.c +=================================================================== +RCS file: /var/cvs/openssh/session.c,v +retrieving revision 1.4 +diff -u -r1.4 session.c +--- session.c 2000/04/16 02:31:51 1.4 ++++ session.c 2000/04/16 02:47:55 +@@ -27,6 +27,8 @@ + #include "ssh2.h" + #include "auth.h" +#define CHROOT + /* types */ #define TTYSZ 64 -@@ -1012,6 +1014,11 @@ +@@ -783,6 +785,10 @@ extern char **environ; struct stat st; char *argv[10]; +#ifdef CHROOT -+ char *user_dir; -+ char *new_root; ++ char *user_dir; ++ char *new_root; +#endif /* CHROOT */ -+ - int do_xauth = s->auth_proto != NULL && s->auth_data != NULL; - #ifdef WITH_IRIX_PROJECT - prid_t projid; -@@ -1095,6 +1102,27 @@ - exit(1); - } - endgrent(); + + #ifndef USE_PAM /* pam_nologin handles this */ + f = fopen("/etc/nologin", "r"); +@@ -799,6 +805,26 @@ + /* Set login name in the kernel. */ + if (setlogin(pw->pw_name) < 0) + error("setlogin failed: %s", strerror(errno)); + +#ifdef CHROOT -+ user_dir = xstrdup(pw->pw_dir); -+ new_root = user_dir + 1; ++ user_dir = xstrdup(pw->pw_dir); ++ new_root = user_dir + 1; + -+ while((new_root = strchr(new_root, '.')) != NULL) { -+ new_root--; -+ if(strncmp(new_root, "/./", 3) == 0) { -+ *new_root = '\0'; -+ new_root += 2; -+ -+ if(chroot(user_dir) != 0) -+ fatal("Couldn't chroot to user directory %s", user_dir); -+ -+ pw->pw_dir = new_root; -+ break; -+ } -+ new_root += 2; -+ } ++ while((new_root = strchr(new_root, '.')) != NULL) { ++ new_root--; ++ if(strncmp(new_root, "/./", 3) == 0) { ++ *new_root = '\0'; ++ new_root += 2; ++ ++ if(chroot(user_dir) != 0) ++ fatal("Couldn't chroot to user directory %s", user_dir); ++ ++ pw->pw_dir = new_root; ++ break; ++ } ++ new_root += 2; ++ } +#endif /* CHROOT */ -+ - # ifdef WITH_IRIX_JOBS - jid = jlimit_startjob(pw->pw_name, pw->pw_uid, "interactive"); - if (jid == -1) { + + /* Set uid, gid, and groups. */ + /* Login(1) does this as well, and it needs uid 0 for the "-h" diff -ru openssh-2.9p2/contrib/cygwin/README openssh-2.9.9p1/contrib/cygwin/README --- openssh-2.9p2/contrib/cygwin/README 2001-05-04 08:48:04.000000000 +1000 +++ openssh-2.9.9p1/contrib/cygwin/README 2001-07-19 02:25:42.000000000 +1000 @@ -1,4 +1,13 @@ -This package is the actual port of OpenSSH to Cygwin 1.1. +This package is the actual port of OpenSSH to Cygwin 1.3. + +=========================================================================== +Important change since 2.9p2: + +Since Cygwin is able to switch user context without password beginning +with version 1.3.2, OpenSSH now allows to do so when it's running under +a version >= 1.3.2. Keep in mind that `ntsec' has to be activated to +allow that feature. +=========================================================================== =========================================================================== Important change since 2.3.0p1: @@ -37,6 +46,9 @@ --no -n Answer all questions with "no" automatically. --port -p sshd listens on port n. +Additionally ssh-host-config now asks if it should install sshd as a +service when running under NT/W2K. This requires cygrunsrv installed. + You can create the private and public keys for a user now by running /usr/bin/ssh-user-config @@ -53,16 +65,12 @@ --no -n Answer all questions with "no" automatically. --passphrase -p word Use "word" as passphrase automatically. -Install sshd as daemon via SRVANY.EXE (recommended on NT/W2K), via inetd +Install sshd as daemon via cygrunsrv.exe (recommended on NT/W2K), via inetd (results in very slow deamon startup!) or from the command line (recommended on 9X/ME). -If you start sshd as deamon via SRVANY.EXE you will see two -sshd processes in the process list unless you give the "-D" -option to sshd. That will avoid that sshd detaches from the -controlling terminal and it will remain under process control -of SRVANY.EXE. That allows easy killing of the service by -using the `net stop ' command. +If you start sshd as deamon via cygrunsrv.exe you MUST give the +"-D" option to sshd. Otherwise the service can't get started at all. If starting via inetd, copy sshd to eg. /usr/sbin/in.sshd and add the following line to your inetd.conf file: @@ -74,6 +82,10 @@ sshd 22/tcp #SSH daemon +=========================================================================== +The following restrictions only apply to Cygwin versions up to 1.3.1 +=========================================================================== + Authentication to sshd is possible in one of two ways. You'll have to decide before starting sshd! @@ -145,26 +157,22 @@ SSH2 server and user keys are generated by the `ssh-*-config' scripts as well. -SSH2 authentication similar to SSH1: - Add keys to ~/.ssh/authorized_keys2 -Interop. w/ ssh.com dsa-keys: - ssh-keygen -f /key/from/ssh.com -X >> ~/.ssh/authorized_keys2 -and vice versa: - ssh-keygen -f /privatekey/from/openssh -x > ~/.ssh2/mykey.pub - echo Key mykey.pub >> ~/.ssh2/authorization - If you want to build from source, the following options to configure are used for the Cygwin binary distribution: ---prefix=/usr --sysconfdir=/etc --libexecdir='${exec_prefix}/sbin + --prefix=/usr \ + --sysconfdir=/etc \ + --libexecdir='${exec_prefix}/sbin \ + --with-pcre You must have installed the zlib, openssl and regex packages to -be able to build OpenSSH! +be able to build OpenSSH! The `--with-pcre' option requires +the installation of the pcre package. -Please send requests, error reports etc. to cygwin@sources.redhat.com. +Please send requests, error reports etc. to cygwin@cygwin.com. Have fun, -Corinna Vinschen +Corinna Vinschen Cygwin Developer Red Hat Inc. diff -ru openssh-2.9p2/contrib/cygwin/ssh-host-config openssh-2.9.9p1/contrib/cygwin/ssh-host-config --- openssh-2.9p2/contrib/cygwin/ssh-host-config 2001-03-07 21:38:19.000000000 +1100 +++ openssh-2.9.9p1/contrib/cygwin/ssh-host-config 2001-07-19 02:25:42.000000000 +1000 @@ -309,7 +309,13 @@ IgnoreRhosts yes # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication #IgnoreUserKnownHosts yes -StrictModes yes + +# +# The following setting overrides permission checks on host key files +# and directories. For security reasons set this to "yes" when running +# NT/W2K, NTFS and CYGWIN=ntsec. +StrictModes no + X11Forwarding no X11DisplayOffset 10 PrintMotd yes @@ -325,12 +331,9 @@ # For this to work you will also need host keys in /etc/ssh_known_hosts RhostsRSAAuthentication no -# To install for logon to different user accounts change to "no" here RSAAuthentication yes -# To install for logon to different user accounts change to "yes" here -PasswordAuthentication no - +PasswordAuthentication yes PermitEmptyPasswords no CheckMail no @@ -438,6 +441,48 @@ fi fi +# Create /var/log and /var/log/lastlog if not already existing + +if [ -f /var/log ] +then + echo "Creating /var/log failed\!" +else + if [ ! -d /var/log ] + then + mkdir /var/log + fi + if [ -d /var/log/lastlog ] + then + echo "Creating /var/log/lastlog failed\!" + elif [ ! -f /var/log/lastlog ] + then + cat /dev/null > /var/log/lastlog + fi +fi + +# On NT ask if sshd should be installed as service +if [ $_nt -gt 0 ] +then + echo + echo "Do you want to install sshd as service?" + if request "(Say \"no\" if it's already installed as service)" + then + echo + echo "Which value should the environment variable CYGWIN have when" + echo "sshd starts? It's recommended to set at least \"ntsec\" to be" + echo "able to change user context without password." + echo -n "Default is \"binmode ntsec tty\". CYGWIN=" + read _cygwin + [ -z "${_cygwin}" ] && _cygwin="binmode ntsec tty" + if cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd -a -D -e "CYGWIN=${_cygwin}" + then + chown system /etc/ssh* + echo + echo "The service has been installed under LocalSystem account." + fi + fi +fi + if [ "${old_install}" = "1" ] then echo diff -ru openssh-2.9p2/contrib/redhat/openssh.spec openssh-2.9.9p1/contrib/redhat/openssh.spec --- openssh-2.9p2/contrib/redhat/openssh.spec 2001-06-17 14:06:19.000000000 +1000 +++ openssh-2.9.9p1/contrib/redhat/openssh.spec 2001-09-25 09:15:15.000000000 +1000 @@ -1,8 +1,8 @@ # Version of OpenSSH -%define oversion 2.9p2 +%define oversion 2.9.9p1 # Version of ssh-askpass -%define aversion 1.2.0 +%define aversion 1.2.4 # Do we want to disable building of x11-askpass? (1=yes 0=no) %define no_x11_askpass 0 @@ -13,6 +13,9 @@ # Do we want to link against a static libcrypto? (1=yes 0=no) %define static_libcrypto 0 +# Do we want smartcard support (1=yes 0=no) +%define scard 0 + # Use Redhat 7.0 pam control file %define redhat7 0 @@ -29,25 +32,32 @@ # rpm -ba|--rebuild --define "static_openssl 1" %{?static_openssl:%define static_libcrypto 1} +# Options for Smartcard support: (needs libsectok and openssl-engine) +# rpm -ba|--rebuild --define "smartcard 1" +%{?smartcard:%define scard 1} + %define exact_openssl_version %(rpm -q openssl | cut -d - -f 2) -Summary: OpenSSH free Secure Shell (SSH) implementation +Summary: The OpenSSH implementation of SSH. Name: openssh Version: %{oversion} Release: 1 Packager: Damien Miller -URL: http://www.openssh.com/ +URL: http://www.openssh.com/portable.html Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{oversion}.tar.gz %if ! %{no_x11_askpass} -Source1: http://www.jmknoble.cx/software/x11-ssh-askpass/x11-ssh-askpass-%{aversion}.tar.gz +Source1: http://www.pobox.com/~jmknoble/software/x11-ssh-askpass/x11-ssh-askpass-%{aversion}.tar.gz %endif -Copyright: BSD +License: BSD Group: Applications/Internet BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot Obsoletes: ssh BuildPreReq: perl, openssl-devel, tcp_wrappers BuildPreReq: /bin/login, /usr/include/security/pam_appl.h BuildPreReq: rpm >= 3.0.5 +%if ! %{no_x11_askpass} +BuildPreReq: XFree86-devel +%endif %if ! %{no_gnome_askpass} BuildPreReq: gnome-libs-devel %endif @@ -59,13 +69,13 @@ Requires: rpm >= 3.0.5 %package clients -Summary: OpenSSH Secure Shell protocol clients +Summary: OpenSSH clients. Requires: openssh = %{version}-%{release} Group: Applications/Internet Obsoletes: ssh-clients %package server -Summary: OpenSSH Secure Shell protocol server (sshd) +Summary: The OpenSSH server daemon. Group: System Environment/Daemons Obsoletes: ssh-server PreReq: openssh = %{version}-%{release}, chkconfig >= 0.9 @@ -74,87 +84,53 @@ %endif %package askpass -Summary: OpenSSH X11 passphrase dialog +Summary: A passphrase dialog for OpenSSH and X. Group: Applications/Internet Requires: openssh = %{version}-%{release} Obsoletes: ssh-extras %package askpass-gnome -Summary: OpenSSH GNOME passphrase dialog +Summary: A passphrase dialog for OpenSSH, X, and GNOME. Group: Applications/Internet Requires: openssh = %{version}-%{release} Obsoletes: ssh-extras %description -Ssh (Secure Shell) a program for logging into a remote machine and for -executing commands in a remote machine. It is intended to replace -rlogin and rsh, and provide secure encrypted communications between -two untrusted hosts over an insecure network. X11 connections and -arbitrary TCP/IP ports can also be forwarded over the secure channel. - -OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it -up to date in terms of security and features, as well as removing all -patented algorithms to separate libraries (OpenSSL). +OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation. SSH +replaces rlogin and rsh, to provide secure encrypted communications +between two untrusted hosts over an insecure network. X11 connections +and arbitrary TCP/IP ports can also be forwarded over the secure +channel. Public key authentication may be used for "passwordless" +access to servers. This package includes the core files necessary for both the OpenSSH -client and server. To make this package useful, you should also +client and server. To make this package useful, you should also install openssh-clients, openssh-server, or both. %description clients -Ssh (Secure Shell) a program for logging into a remote machine and for -executing commands in a remote machine. It is intended to replace -rlogin and rsh, and provide secure encrypted communications between -two untrusted hosts over an insecure network. X11 connections and -arbitrary TCP/IP ports can also be forwarded over the secure channel. - -OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it -up to date in terms of security and features, as well as removing all -patented algorithms to separate libraries (OpenSSL). +OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation. -This package includes the clients necessary to make encrypted connections -to SSH servers. +This package includes the clients necessary to make encrypted +connections to SSH protocol servers. You'll also need to install the +openssh package on OpenSSH clients. %description server -Ssh (Secure Shell) a program for logging into a remote machine and for -executing commands in a remote machine. It is intended to replace -rlogin and rsh, and provide secure encrypted communications between -two untrusted hosts over an insecure network. X11 connections and -arbitrary TCP/IP ports can also be forwarded over the secure channel. - -OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it -up to date in terms of security and features, as well as removing all -patented algorithms to separate libraries (OpenSSL). - -This package contains the secure shell daemon. The sshd is the server -part of the secure shell protocol and allows ssh clients to connect to -your host. +OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation. + +This package contains the secure shell daemon (sshd). The sshd daemon +allows SSH clients to securely connect to your SSH server. You also +need to have the openssh package installed. %description askpass -Ssh (Secure Shell) a program for logging into a remote machine and for -executing commands in a remote machine. It is intended to replace -rlogin and rsh, and provide secure encrypted communications between -two untrusted hosts over an insecure network. X11 connections and -arbitrary TCP/IP ports can also be forwarded over the secure channel. - -OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it -up to date in terms of security and features, as well as removing all -patented algorithms to separate libraries (OpenSSL). +OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation. -This package contains Jim Knoble's X11 passphrase -dialog. +This package contains an X11 passphrase dialog for OpenSSH. %description askpass-gnome -Ssh (Secure Shell) a program for logging into a remote machine and for -executing commands in a remote machine. It is intended to replace -rlogin and rsh, and provide secure encrypted communications between -two untrusted hosts over an insecure network. X11 connections and -arbitrary TCP/IP ports can also be forwarded over the secure channel. - -OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it -up to date in terms of security and features, as well as removing all -patented algorithms to separate libraries (OpenSSL). +OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation. -This package contains the GNOME passphrase dialog. +This package contains an X11 passphrase dialog for OpenSSH and the +GNOME GUI desktop environment. %prep @@ -168,13 +144,21 @@ %define _sysconfdir /etc/ssh +EXTRA_OPTS="" + +%if %{scard} + EXTRA_OPTS="$EXTRA_OPTS --with-smartcard" +%endif + %configure \ --libexecdir=%{_libexecdir}/openssh \ + --datadir=%{_datadir}/openssh \ --with-pam \ --with-tcp-wrappers \ --with-ipv4-default \ --with-rsh=/usr/bin/rsh \ - --with-default-path=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin + --with-default-path=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin \ + $EXTRA_OPTS %if %{static_libcrypto} perl -pi -e "s|-lcrypto|/usr/lib/libcrypto.a|g" Makefile @@ -184,6 +168,8 @@ %if ! %{no_x11_askpass} pushd x11-ssh-askpass-%{aversion} +%configure \ + --libexecdir=%{_libexecdir}/openssh xmkmf -a make popd @@ -201,6 +187,7 @@ rm -rf $RPM_BUILD_ROOT %{makeinstall} \ libexecdir=$RPM_BUILD_ROOT%{_libexecdir}/openssh \ + datadir=$RPM_BUILD_ROOT%{_datadir}/openssh \ DESTDIR=/ # Hack to disable key generation @@ -242,17 +229,18 @@ %files %defattr(-,root,root) -%doc ChangeLog OVERVIEW README* INSTALL -%doc CREDITS LICENCE +%doc CREDITS ChangeLog INSTALL LICENCE OVERVIEW README* RFC* TODO WARNING* %attr(0755,root,root) %{_bindir}/ssh-keygen %attr(0755,root,root) %{_bindir}/scp -%attr(0755,root,root) %{_bindir}/ssh-keyscan %attr(0644,root,root) %{_mandir}/man1/ssh-keygen.1* -%attr(0644,root,root) %{_mandir}/man1/ssh-keyscan.1* %attr(0644,root,root) %{_mandir}/man1/scp.1* %attr(0755,root,root) %dir %{_sysconfdir} -%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/primes +%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/moduli %attr(0755,root,root) %dir %{_libexecdir}/openssh +%if %{scard} +%attr(0755,root,root) %dir %{_datadir}/openssh +%attr(0644,root,root) %{_datadir}/openssh/Ssh.bin +%endif %files clients %defattr(-,root,root) diff -ru openssh-2.9p2/contrib/redhat/sshd.init openssh-2.9.9p1/contrib/redhat/sshd.init --- openssh-2.9p2/contrib/redhat/sshd.init 2001-04-27 10:46:18.000000000 +1000 +++ openssh-2.9.9p1/contrib/redhat/sshd.init 2001-09-15 21:03:11.000000000 +1000 @@ -96,6 +96,16 @@ fi fi } +do_restart_sanity_check() { + sshd -t + RETVAL=$? + if [ ! "$RETVAL" = 0 ]; then + my_failure "Configuration file or keys" + echo + exit $RETVAL + fi +} + case "$1" in start) @@ -127,12 +137,14 @@ echo ;; restart) + do_restart_sanity_check $0 stop $0 start RETVAL=$? ;; condrestart) if [ -f /var/lock/subsys/sshd ] ; then + do_restart_sanity_check $0 stop $0 start RETVAL=$? diff -ru openssh-2.9p2/contrib/suse/openssh.spec openssh-2.9.9p1/contrib/suse/openssh.spec --- openssh-2.9p2/contrib/suse/openssh.spec 2001-06-17 14:06:19.000000000 +1000 +++ openssh-2.9.9p1/contrib/suse/openssh.spec 2001-09-25 09:15:16.000000000 +1000 @@ -1,6 +1,6 @@ Summary: OpenSSH, a free Secure Shell (SSH) implementation Name: openssh -Version: 2.9p2 +Version: 2.9.9p1 URL: http://www.openssh.com/ Release: 1 Source0: openssh-%{version}.tar.gz @@ -89,12 +89,13 @@ %build CFLAGS="$RPM_OPT_FLAGS" \ ./configure --prefix=/usr \ - --sysconfdir=/etc/ssh \ - --with-pam \ - --with-gnome-askpass \ - --with-tcp-wrappers \ - --with-ipv4-default \ - --libexecdir=/usr/lib/ssh + --sysconfdir=/etc/ssh \ + --datadir=/usr/share/openssh \ + --with-pam \ + --with-gnome-askpass \ + --with-tcp-wrappers \ + --with-ipv4-default \ + --libexecdir=/usr/lib/ssh make cd contrib @@ -171,7 +172,7 @@ %attr(0755,root,root) %dir /etc/ssh %attr(0644,root,root) %config /etc/ssh/ssh_config %attr(0600,root,root) %config /etc/ssh/sshd_config -%attr(0600,root,root) %config /etc/ssh/primes +%attr(0600,root,root) %config /etc/ssh/moduli %attr(0644,root,root) %config /etc/pam.d/sshd %attr(0755,root,root) %config /sbin/init.d/sshd %attr(0755,root,root) /usr/bin/ssh-keygen diff -ru openssh-2.9p2/crc32.h openssh-2.9.9p1/crc32.h --- openssh-2.9p2/crc32.h 2001-03-05 17:59:27.000000000 +1100 +++ openssh-2.9.9p1/crc32.h 2001-07-04 14:46:57.000000000 +1000 @@ -11,15 +11,11 @@ * called by a name other than "ssh" or "Secure Shell". */ -/* RCSID("$OpenBSD: crc32.h,v 1.10 2001/03/02 18:54:31 deraadt Exp $"); */ +/* RCSID("$OpenBSD: crc32.h,v 1.12 2001/06/26 17:27:23 markus Exp $"); */ #ifndef CRC32_H #define CRC32_H -/* - * This computes a 32 bit CRC of the data in the buffer, and returns the CRC. - * The polynomial used is 0xedb88320. - */ -u_int ssh_crc32(const u_char *buf, u_int len); +u_int ssh_crc32(const u_char *, u_int); #endif /* CRC32_H */ diff -ru openssh-2.9p2/deattack.c openssh-2.9.9p1/deattack.c --- openssh-2.9p2/deattack.c 2001-03-05 17:47:00.000000000 +1100 +++ openssh-2.9.9p1/deattack.c 2001-06-25 15:01:25.000000000 +1000 @@ -1,4 +1,4 @@ -/* $OpenBSD: deattack.c,v 1.13 2001/03/01 02:45:10 deraadt Exp $ */ +/* $OpenBSD: deattack.c,v 1.14 2001/06/23 15:12:18 itojun Exp $ */ /* * Cryptographic attack detector for ssh - source code @@ -46,8 +46,7 @@ #define CMP(a, b) (memcmp(a, b, SSH_BLOCKSIZE)) - -void +static void crc_update(u_int32_t *a, u_int32_t b) { b ^= *a; @@ -55,7 +54,7 @@ } /* detect if a block is used in a particular pattern */ -int +static int check_crc(u_char *S, u_char *buf, u_int32_t len, u_char *IV) { diff -ru openssh-2.9p2/deattack.h openssh-2.9.9p1/deattack.h --- openssh-2.9p2/deattack.h 2001-01-29 18:39:26.000000000 +1100 +++ openssh-2.9.9p1/deattack.h 2001-07-04 14:46:57.000000000 +1000 @@ -1,4 +1,4 @@ -/* $OpenBSD: deattack.h,v 1.5 2001/01/29 01:58:15 niklas Exp $ */ +/* $OpenBSD: deattack.h,v 1.7 2001/06/26 17:27:23 markus Exp $ */ /* * Cryptographic attack detector for ssh - Header file @@ -26,5 +26,5 @@ #define DEATTACK_OK 0 #define DEATTACK_DETECTED 1 -int detect_attack(u_char *buf, u_int32_t len, u_char IV[8]); +int detect_attack(u_char *, u_int32_t, u_char[8]); #endif diff -ru openssh-2.9p2/defines.h openssh-2.9.9p1/defines.h --- openssh-2.9p2/defines.h 2001-05-09 10:39:19.000000000 +1000 +++ openssh-2.9.9p1/defines.h 2001-09-21 05:43:41.000000000 +1000 @@ -1,12 +1,7 @@ #ifndef _DEFINES_H #define _DEFINES_H -/* $Id: defines.h,v 1.62.2.1 2001/05/09 00:39:19 mouring Exp $ */ - -/* Some platforms need this for the _r() functions */ -#if !defined(_REENTRANT) && !defined(SNI) -# define _REENTRANT 1 -#endif +/* $Id: defines.h,v 1.72 2001/09/20 19:43:41 stevesk Exp $ */ /* Necessary headers */ @@ -17,7 +12,7 @@ #include /* For IPv6 macros */ #include /* For IPTOS macros */ #ifdef HAVE_SYS_UN_H -# include /* For SUN_LEN */ +# include /* For sockaddr_un */ #endif #ifdef HAVE_SYS_BITYPES_H # include /* For u_intXX_t */ @@ -51,6 +46,15 @@ #include /* Struct winsize */ #include /* For O_NONBLOCK */ +/* *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively */ +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_LOGIN_H +# include +#endif + + /* Constants */ #ifndef SHUT_RDWR @@ -131,6 +135,11 @@ # define S_IRWXO 0000007 /* read, write, execute */ #endif /* S_IXUSR */ +/* *-*-nto-qnx doesn't define this constant in the system headers */ +#ifdef MISSING_NFDBITS +# define NFDBITS (8 * sizeof(unsigned long)) +#endif + /* Types */ /* If sys/types.h does not supply intXX_t, supply them ourselves */ @@ -199,6 +208,7 @@ # endif # endif # endif +#define __BIT_TYPES_DEFINED__ #endif /* 64-bit types */ @@ -210,7 +220,6 @@ # if (SIZEOF_LONG_LONG_INT == 8) typedef long long int int64_t; # define HAVE_INT64_T 1 -# define HAVE_LONG_LONG_INT # endif # endif #endif @@ -225,6 +234,14 @@ # endif # endif #endif +#if !defined(HAVE_LONG_LONG_INT) && (SIZEOF_LONG_LONG_INT == 8) +# define HAVE_LONG_LONG_INT 1 +#endif + +#ifndef HAVE_U_CHAR +typedef unsigned char u_char; +# define HAVE_U_CHAR +#endif /* HAVE_U_CHAR */ #ifndef HAVE_SOCKLEN_T typedef unsigned int socklen_t; @@ -282,6 +299,11 @@ }; #endif +/* *-*-nto-qnx does not define this type in the system headers */ +#ifdef MISSING_FD_MASK + typedef unsigned long int fd_mask; +#endif + /* Paths */ #ifndef _PATH_BSHELL @@ -334,8 +356,8 @@ #endif /* Define this to be the path of the xauth program. */ -#ifndef XAUTH_PATH -#define XAUTH_PATH "/usr/X11R6/bin/xauth" +#ifdef XAUTH_PATH +#define _PATH_XAUTH XAUTH_PATH #endif /* XAUTH_PATH */ #ifndef _PATH_TTY @@ -383,10 +405,10 @@ # define __attribute__(x) #endif /* !defined(__GNUC__) || (__GNUC__ < 2) */ -#ifndef SUN_LEN -#define SUN_LEN(su) \ - (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path)) -#endif /* SUN_LEN */ +/* *-*-nto-qnx doesn't define this macro in the system headers */ +#ifdef MISSING_HOWMANY +# define howmany(x,y) (((x)+((y)-1))/(y)) +#endif /* Function replacement / compatibility hacks */ @@ -418,7 +440,7 @@ #endif /* !defined(HAVE_MEMMOVE) && defined(HAVE_BCOPY) */ #if !defined(HAVE_ATEXIT) && defined(HAVE_ON_EXIT) -# define atexit(a) on_exit(a) +# define atexit(a, NULL) on_exit(a, NULL) #else # if defined(HAVE_XATEXIT) # define atexit(a) xatexit(a) diff -ru openssh-2.9p2/dh.c openssh-2.9.9p1/dh.c --- openssh-2.9p2/dh.c 2001-04-16 00:27:16.000000000 +1000 +++ openssh-2.9.9p1/dh.c 2001-06-25 15:01:25.000000000 +1000 @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: dh.c,v 1.14 2001/04/15 08:43:45 markus Exp $"); +RCSID("$OpenBSD: dh.c,v 1.17 2001/06/23 15:12:18 itojun Exp $"); #include "xmalloc.h" @@ -39,7 +39,7 @@ #include "log.h" #include "misc.h" -int +static int parse_prime(int linenum, char *line, struct dhgroup *dhg) { char *cp, *arg; @@ -103,14 +103,14 @@ choose_dh(int min, int wantbits, int max) { FILE *f; - char line[1024]; + char line[2048]; int best, bestcount, which; int linenum; struct dhgroup dhg; - f = fopen(_PATH_DH_PRIMES, "r"); - if (!f) { - log("WARNING: %s does not exist, using old prime", _PATH_DH_PRIMES); + if ((f = fopen(_PATH_DH_MODULI, "r")) == NULL && + (f = fopen(_PATH_DH_PRIMES, "r")) == NULL) { + log("WARNING: %s does not exist, using old modulus", _PATH_DH_MODULI); return (dh_new_group1()); } @@ -134,18 +134,14 @@ if (dhg.size == best) bestcount++; } - fclose (f); + rewind(f); if (bestcount == 0) { + fclose(f); log("WARNING: no suitable primes in %s", _PATH_DH_PRIMES); return (NULL); } - f = fopen(_PATH_DH_PRIMES, "r"); - if (!f) { - fatal("WARNING: %s disappeared, giving up", _PATH_DH_PRIMES); - } - linenum = 0; which = arc4random() % bestcount; while (fgets(line, sizeof(line), f)) { diff -ru openssh-2.9p2/dh.h openssh-2.9.9p1/dh.h --- openssh-2.9p2/dh.h 2001-04-04 11:56:17.000000000 +1000 +++ openssh-2.9.9p1/dh.h 2001-07-04 14:46:57.000000000 +1000 @@ -1,4 +1,4 @@ -/* $OpenBSD: dh.h,v 1.5 2001/04/03 19:53:29 markus Exp $ */ +/* $OpenBSD: dh.h,v 1.7 2001/06/26 17:27:23 markus Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. @@ -32,15 +32,15 @@ BIGNUM *p; }; -DH *choose_dh(int min, int nbits, int max); +DH *choose_dh(int, int, int); DH *dh_new_group_asc(const char *, const char *); DH *dh_new_group(BIGNUM *, BIGNUM *); DH *dh_new_group1(void); -void dh_gen_key(DH *, int); -int dh_pub_is_valid(DH *dh, BIGNUM *dh_pub); +void dh_gen_key(DH *, int); +int dh_pub_is_valid(DH *, BIGNUM *); -int dh_estimate(int bits); +int dh_estimate(int); #define DH_GRP_MIN 1024 #define DH_GRP_MAX 8192 diff -ru openssh-2.9p2/dispatch.c openssh-2.9.9p1/dispatch.c --- openssh-2.9p2/dispatch.c 2001-02-19 21:51:08.000000000 +1100 +++ openssh-2.9.9p1/dispatch.c 2001-06-12 10:12:57.000000000 +1000 @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: dispatch.c,v 1.10 2001/02/18 18:33:53 markus Exp $"); +RCSID("$OpenBSD: dispatch.c,v 1.11 2001/06/10 11:29:20 markus Exp $"); #include "ssh1.h" #include "ssh2.h" @@ -39,9 +39,7 @@ void dispatch_protocol_error(int type, int plen, void *ctxt) { - error("Hm, dispatch protocol error: type %d plen %d", type, plen); - if (compat20 && type == SSH2_MSG_KEXINIT) - fatal("dispatch_protocol_error: rekeying is not supported"); + fatal("dispatch_protocol_error: type %d plen %d", type, plen); } void dispatch_init(dispatch_fn *dflt) diff -ru openssh-2.9p2/dispatch.h openssh-2.9.9p1/dispatch.h --- openssh-2.9p2/dispatch.h 2001-01-29 18:39:26.000000000 +1100 +++ openssh-2.9.9p1/dispatch.h 2001-07-04 14:46:57.000000000 +1000 @@ -1,4 +1,4 @@ -/* $OpenBSD: dispatch.h,v 1.4 2001/01/29 01:58:15 niklas Exp $ */ +/* $OpenBSD: dispatch.h,v 1.6 2001/06/26 17:27:23 markus Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -28,9 +28,9 @@ DISPATCH_NONBLOCK }; -typedef void dispatch_fn(int type, int plen, void *ctxt); +typedef void dispatch_fn(int, int, void *); -void dispatch_init(dispatch_fn *dflt); -void dispatch_set(int type, dispatch_fn *fn); -void dispatch_run(int mode, int *done, void *ctxt); -void dispatch_protocol_error(int type, int plen, void *ctxt); +void dispatch_init(dispatch_fn *); +void dispatch_set(int, dispatch_fn *); +void dispatch_run(int, int *, void *); +void dispatch_protocol_error(int, int, void *); diff -ru openssh-2.9p2/entropy.c openssh-2.9.9p1/entropy.c --- openssh-2.9p2/entropy.c 2001-03-19 09:38:16.000000000 +1100 +++ openssh-2.9.9p1/entropy.c 2001-08-06 16:51:49.000000000 +1000 @@ -40,7 +40,7 @@ #include "pathnames.h" #include "log.h" -RCSID("$Id: entropy.c,v 1.36 2001/03/18 22:38:16 djm Exp $"); +RCSID("$Id: entropy.c,v 1.38 2001/08/06 06:51:49 djm Exp $"); #ifndef offsetof # define offsetof(type, member) ((size_t) &((type *)0)->member) @@ -68,7 +68,7 @@ # define SAVED_IDS_WORK_WITH_SETEUID #endif -void +static void check_openssl_version(void) { if (SSLeay() != OPENSSL_VERSION_NUMBER) @@ -182,7 +182,7 @@ #else /* !USE_PRNGD */ #ifdef RANDOM_POOL /* Collect entropy from /dev/urandom or pipe */ -int +static int get_random_bytes(unsigned char *buf, int len) { int random_pool; @@ -505,7 +505,9 @@ break; case 1: /* command input */ - bytes_read = read(p[0], buf, sizeof(buf)); + do { + bytes_read = read(p[0], buf, sizeof(buf)); + } while (bytes_read == -1 && errno == EINTR); RAND_add(&bytes_read, sizeof(&bytes_read), 0.0); if (bytes_read == -1) { error_abort = 1; diff -ru openssh-2.9p2/groupaccess.c openssh-2.9.9p1/groupaccess.c --- openssh-2.9p2/groupaccess.c 2001-01-29 18:39:26.000000000 +1100 +++ openssh-2.9.9p1/groupaccess.c 2001-07-04 14:46:57.000000000 +1000 @@ -1,4 +1,4 @@ -/* $OpenBSD: groupaccess.c,v 1.3 2001/01/29 01:58:15 niklas Exp $ */ +/* $OpenBSD: groupaccess.c,v 1.4 2001/06/26 17:27:23 markus Exp $ */ /* * Copyright (c) 2001 Kevin Steves. All rights reserved. @@ -34,6 +34,10 @@ static int ngroups; static char *groups_byname[NGROUPS_MAX + 1]; /* +1 for base/primary group */ +/* + * Initialize group access list for user with primary (base) and + * supplementary groups. Return the number of groups in the list. + */ int ga_init(const char *user, gid_t base) { @@ -53,6 +57,10 @@ return (ngroups = j); } +/* + * Return 1 if one of user's groups is contained in groups. + * Return 0 otherwise. Use match_pattern() for string comparison. + */ int ga_match(char * const *groups, int n) { @@ -65,6 +73,9 @@ return 0; } +/* + * Free memory allocated for group access list. + */ void ga_free(void) { diff -ru openssh-2.9p2/groupaccess.h openssh-2.9.9p1/groupaccess.h --- openssh-2.9p2/groupaccess.h 2001-01-29 18:39:26.000000000 +1100 +++ openssh-2.9.9p1/groupaccess.h 2001-07-04 14:46:57.000000000 +1000 @@ -1,4 +1,4 @@ -/* $OpenBSD: groupaccess.h,v 1.2 2001/01/29 01:58:15 niklas Exp $ */ +/* $OpenBSD: groupaccess.h,v 1.4 2001/06/26 17:27:23 markus Exp $ */ /* * Copyright (c) 2001 Kevin Steves. All rights reserved. @@ -29,21 +29,8 @@ #include -/* - * Initialize group access list for user with primary (base) and - * supplementary groups. Return the number of groups in the list. - */ -int ga_init(const char *user, gid_t base); - -/* - * Return 1 if one of user's groups is contained in groups. - * Return 0 otherwise. Use match_pattern() for string comparison. - */ -int ga_match(char * const *groups, int ngroups); - -/* - * Free memory allocated for group access list. - */ -void ga_free(void); +int ga_init(const char *, gid_t); +int ga_match(char * const *, int); +void ga_free(void); #endif diff -ru openssh-2.9p2/hostfile.c openssh-2.9.9p1/hostfile.c --- openssh-2.9p2/hostfile.c 2001-04-13 09:34:35.000000000 +1000 +++ openssh-2.9.9p1/hostfile.c 2001-07-04 13:32:32.000000000 +1000 @@ -11,7 +11,7 @@ * called by a name other than "ssh" or "Secure Shell". * * - * Copyright (c) 1999,2000 Markus Friedl. All rights reserved. + * Copyright (c) 1999, 2000 Markus Friedl. All rights reserved. * Copyright (c) 1999 Niels Provos. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,7 +36,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: hostfile.c,v 1.26 2001/04/12 19:15:24 markus Exp $"); +RCSID("$OpenBSD: hostfile.c,v 1.28 2001/06/25 08:25:37 markus Exp $"); #include "packet.h" #include "match.h" @@ -49,7 +49,7 @@ * pointer over the key. Skips any whitespace at the beginning and at end. */ -int +static int hostfile_read_key(char **cpp, u_int *bitsp, Key *ret) { char *cp; @@ -82,7 +82,7 @@ return ret; } -int +static int hostfile_check_key(int bits, Key *key, const char *host, const char *filename, int linenum) { if (key == NULL || key->type != KEY_RSA1 || key->rsa == NULL) diff -ru openssh-2.9p2/hostfile.h openssh-2.9.9p1/hostfile.h --- openssh-2.9p2/hostfile.h 2001-02-09 13:11:24.000000000 +1100 +++ openssh-2.9.9p1/hostfile.h 2001-07-04 14:46:57.000000000 +1000 @@ -1,4 +1,4 @@ -/* $OpenBSD: hostfile.h,v 1.7 2001/02/08 19:30:51 itojun Exp $ */ +/* $OpenBSD: hostfile.h,v 1.9 2001/06/26 17:27:23 markus Exp $ */ /* * Author: Tatu Ylonen @@ -14,27 +14,13 @@ #ifndef HOSTFILE_H #define HOSTFILE_H -int -auth_rsa_read_key(char **cpp, u_int *bitsp, BIGNUM * e, BIGNUM * n); - -/* - * Checks whether the given host is already in the list of our known hosts. - * Returns HOST_OK if the host is known and has the specified key, HOST_NEW - * if the host is not known, and HOST_CHANGED if the host is known but used - * to have a different host key. The host must be in all lowercase. - */ typedef enum { HOST_OK, HOST_NEW, HOST_CHANGED } HostStatus; HostStatus -check_host_in_hostfile(const char *filename, const char *host, Key *key, - Key *found, int *line); - -/* - * Appends an entry to the host file. Returns false if the entry could not - * be appended. - */ -int add_host_to_hostfile(const char *filename, const char *host, Key *key); +check_host_in_hostfile(const char *, const char *, Key *, Key *, int *); +int add_host_to_hostfile(const char *, const char *, Key *); +int auth_rsa_read_key(char **, u_int *, BIGNUM *, BIGNUM *); #endif diff -ru openssh-2.9p2/includes.h openssh-2.9.9p1/includes.h --- openssh-2.9p2/includes.h 2001-03-17 12:15:39.000000000 +1100 +++ openssh-2.9.9p1/includes.h 2001-09-20 12:07:51.000000000 +1000 @@ -1,4 +1,4 @@ -/* $OpenBSD: includes.h,v 1.14 2001/01/29 01:58:16 niklas Exp $ */ +/* $OpenBSD: includes.h,v 1.15 2001/06/08 15:25:40 markus Exp $ */ /* * Author: Tatu Ylonen @@ -51,6 +51,9 @@ #ifdef HAVE_GETOPT_H # include #endif +#ifndef HAVE_GETOPT_OPTRESET +#define getopt(ac, av, o) BSDgetopt(ac, av, o) +#endif #ifdef HAVE_BSTRING_H # include #endif @@ -95,9 +98,6 @@ #ifdef HAVE_UTIME_H # include #endif -#ifdef HAVE_VIS_H -# include -#endif #include "version.h" #include "openbsd-compat/openbsd-compat.h" #include "openbsd-compat/bsd-cygwin_util.h" diff -ru openssh-2.9p2/kex.c openssh-2.9.9p1/kex.c --- openssh-2.9p2/kex.c 2001-04-06 09:26:33.000000000 +1000 +++ openssh-2.9.9p1/kex.c 2001-07-04 13:32:32.000000000 +1000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000 Markus Friedl. All rights reserved. + * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: kex.c,v 1.33 2001/04/05 10:42:50 markus Exp $"); +RCSID("$OpenBSD: kex.c,v 1.36 2001/06/25 08:25:37 markus Exp $"); #include @@ -43,11 +43,12 @@ #define KEX_COOKIE_LEN 16 -void kex_kexinit_finish(Kex *kex); -void kex_choose_conf(Kex *k); +/* prototype */ +static void kex_kexinit_finish(Kex *); +static void kex_choose_conf(Kex *); /* put algorithm proposal into buffer */ -void +static void kex_prop2buf(Buffer *b, char *proposal[PROPOSAL_MAX]) { u_int32_t rand = 0; @@ -67,7 +68,7 @@ } /* parse buffer and return algorithm proposal */ -char ** +static char ** kex_buf2prop(Buffer *raw) { Buffer b; @@ -95,7 +96,7 @@ return proposal; } -void +static void kex_prop_free(char **proposal) { int i; @@ -105,13 +106,13 @@ xfree(proposal); } -void +static void kex_protocol_error(int type, int plen, void *ctxt) { error("Hm, kex protocol error: type %d plen %d", type, plen); } -void +static void kex_clear_dispatch(void) { int i; @@ -210,7 +211,7 @@ return kex; } -void +static void kex_kexinit_finish(Kex *kex) { if (!(kex->flags & KEX_INIT_SENT)) @@ -230,7 +231,7 @@ } } -void +static void choose_enc(Enc *enc, char *client, char *server) { char *name = match_list(client, server, NULL); @@ -244,7 +245,7 @@ enc->iv = NULL; enc->key = NULL; } -void +static void choose_mac(Mac *mac, char *client, char *server) { char *name = match_list(client, server, NULL); @@ -259,7 +260,7 @@ mac->key = NULL; mac->enabled = 0; } -void +static void choose_comp(Comp *comp, char *client, char *server) { char *name = match_list(client, server, NULL); @@ -274,7 +275,7 @@ } comp->name = name; } -void +static void choose_kex(Kex *k, char *client, char *server) { k->name = match_list(client, server, NULL); @@ -287,7 +288,7 @@ } else fatal("bad kex alg %s", k->name); } -void +static void choose_hostkeyalg(Kex *k, char *client, char *server) { char *hostkeyalg = match_list(client, server, NULL); @@ -299,7 +300,7 @@ xfree(hostkeyalg); } -void +static void kex_choose_conf(Kex *kex) { Newkeys *newkeys; @@ -359,7 +360,7 @@ kex_prop_free(peer); } -u_char * +static u_char * derive_key(Kex *kex, int id, int need, u_char *hash, BIGNUM *shared_secret) { Buffer b; @@ -375,7 +376,8 @@ /* K1 = HASH(K || H || "A" || session_id) */ EVP_DigestInit(&md, evp_md); - EVP_DigestUpdate(&md, buffer_ptr(&b), buffer_len(&b)); + if (!(datafellows & SSH_BUG_DERIVEKEY)) + EVP_DigestUpdate(&md, buffer_ptr(&b), buffer_len(&b)); EVP_DigestUpdate(&md, hash, mdsz); EVP_DigestUpdate(&md, &c, 1); EVP_DigestUpdate(&md, kex->session_id, kex->session_id_len); @@ -388,7 +390,8 @@ */ for (have = mdsz; need > have; have += mdsz) { EVP_DigestInit(&md, evp_md); - EVP_DigestUpdate(&md, buffer_ptr(&b), buffer_len(&b)); + if (!(datafellows & SSH_BUG_DERIVEKEY)) + EVP_DigestUpdate(&md, buffer_ptr(&b), buffer_len(&b)); EVP_DigestUpdate(&md, hash, mdsz); EVP_DigestUpdate(&md, digest, have); EVP_DigestFinal(&md, digest + have, NULL); diff -ru openssh-2.9p2/kex.h openssh-2.9.9p1/kex.h --- openssh-2.9p2/kex.h 2001-04-05 09:46:09.000000000 +1000 +++ openssh-2.9.9p1/kex.h 2001-07-04 14:46:57.000000000 +1000 @@ -1,7 +1,7 @@ -/* $OpenBSD: kex.h,v 1.22 2001/04/04 20:25:37 markus Exp $ */ +/* $OpenBSD: kex.h,v 1.26 2001/06/26 17:27:23 markus Exp $ */ /* - * Copyright (c) 2000 Markus Friedl. All rights reserved. + * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -107,24 +107,24 @@ int flags; char *client_version_string; char *server_version_string; - int (*check_host_key)(Key *hostkey); - Key *(*load_host_key)(int type); + int (*verify_host_key)(Key *); + Key *(*load_host_key)(int); }; -Kex *kex_setup(char *proposal[PROPOSAL_MAX]); -void kex_finish(Kex *kex); +Kex *kex_setup(char *[PROPOSAL_MAX]); +void kex_finish(Kex *); -void kex_send_kexinit(Kex *kex); -void kex_input_kexinit(int type, int plen, void *ctxt); -void kex_derive_keys(Kex *k, u_char *hash, BIGNUM *shared_secret); +void kex_send_kexinit(Kex *); +void kex_input_kexinit(int, int, void *); +void kex_derive_keys(Kex *, u_char *, BIGNUM *); -void kexdh(Kex *); -void kexgex(Kex *); +void kexdh(Kex *); +void kexgex(Kex *); -Newkeys *kex_get_newkeys(int mode); +Newkeys *kex_get_newkeys(int); #if defined(DEBUG_KEX) || defined(DEBUG_KEXDH) -void dump_digest(char *msg, u_char *digest, int len); +void dump_digest(char *, u_char *, int); #endif #endif diff -ru openssh-2.9p2/kexdh.c openssh-2.9.9p1/kexdh.c --- openssh-2.9p2/kexdh.c 2001-04-05 03:52:53.000000000 +1000 +++ openssh-2.9.9p1/kexdh.c 2001-09-18 15:41:20.000000000 +1000 @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: kexdh.c,v 1.3 2001/04/04 09:48:34 markus Exp $"); +RCSID("$OpenBSD: kexdh.c,v 1.7 2001/09/17 19:27:15 stevesk Exp $"); #include #include @@ -38,13 +38,13 @@ #include "dh.h" #include "ssh2.h" -u_char * +static u_char * kex_dh_hash( char *client_version_string, char *server_version_string, char *ckexinit, int ckexinitlen, char *skexinit, int skexinitlen, - char *serverhostkeyblob, int sbloblen, + u_char *serverhostkeyblob, int sbloblen, BIGNUM *client_dh_pub, BIGNUM *server_dh_pub, BIGNUM *shared_secret) @@ -55,8 +55,8 @@ EVP_MD_CTX md; buffer_init(&b); - buffer_put_string(&b, client_version_string, strlen(client_version_string)); - buffer_put_string(&b, server_version_string, strlen(server_version_string)); + buffer_put_cstring(&b, client_version_string); + buffer_put_cstring(&b, server_version_string); /* kexinit messages: fake header: len+SSH2_MSG_KEXINIT */ buffer_put_int(&b, ckexinitlen+1); @@ -88,13 +88,13 @@ /* client */ -void +static void kexdh_client(Kex *kex) { BIGNUM *dh_server_pub = NULL, *shared_secret = NULL; DH *dh; Key *server_host_key; - char *server_host_key_blob = NULL, *signature = NULL; + u_char *server_host_key_blob = NULL, *signature = NULL; u_char *kbuf, *hash; u_int klen, kout, slen, sbloblen; int dlen, plen; @@ -123,9 +123,10 @@ if (server_host_key == NULL) fatal("cannot decode server_host_key_blob"); - if (kex->check_host_key == NULL) - fatal("cannot check server_host_key"); - kex->check_host_key(server_host_key); + if (kex->verify_host_key == NULL) + fatal("cannot verify server_host_key"); + if (kex->verify_host_key(server_host_key) == -1) + fatal("server_host_key verification failed"); /* DH paramter f, server public DH key */ dh_server_pub = BN_new(); @@ -173,7 +174,7 @@ BN_free(dh_server_pub); DH_free(dh); - if (key_verify(server_host_key, (u_char *)signature, slen, hash, 20) != 1) + if (key_verify(server_host_key, signature, slen, hash, 20) != 1) fatal("key_verify failed for server_host_key"); key_free(server_host_key); xfree(signature); @@ -192,7 +193,7 @@ /* server */ -void +static void kexdh_server(Kex *kex) { BIGNUM *shared_secret = NULL, *dh_client_pub = NULL; @@ -256,7 +257,7 @@ kex->server_version_string, buffer_ptr(&kex->peer), buffer_len(&kex->peer), buffer_ptr(&kex->my), buffer_len(&kex->my), - (char *)server_host_key_blob, sbloblen, + server_host_key_blob, sbloblen, dh_client_pub, dh->pub_key, shared_secret @@ -279,9 +280,9 @@ /* send server hostkey, DH pubkey 'f' and singed H */ packet_start(SSH2_MSG_KEXDH_REPLY); - packet_put_string((char *)server_host_key_blob, sbloblen); + packet_put_string(server_host_key_blob, sbloblen); packet_put_bignum2(dh->pub_key); /* f */ - packet_put_string((char *)signature, slen); + packet_put_string(signature, slen); packet_send(); xfree(signature); diff -ru openssh-2.9p2/kexgex.c openssh-2.9.9p1/kexgex.c --- openssh-2.9p2/kexgex.c 2001-04-06 09:26:33.000000000 +1000 +++ openssh-2.9.9p1/kexgex.c 2001-09-18 15:41:20.000000000 +1000 @@ -24,7 +24,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: kexgex.c,v 1.5 2001/04/05 10:42:50 markus Exp $"); +RCSID("$OpenBSD: kexgex.c,v 1.9 2001/09/17 19:27:15 stevesk Exp $"); #include @@ -39,13 +39,13 @@ #include "ssh2.h" #include "compat.h" -u_char * +static u_char * kexgex_hash( char *client_version_string, char *server_version_string, char *ckexinit, int ckexinitlen, char *skexinit, int skexinitlen, - char *serverhostkeyblob, int sbloblen, + u_char *serverhostkeyblob, int sbloblen, int min, int wantbits, int max, BIGNUM *prime, BIGNUM *gen, BIGNUM *client_dh_pub, BIGNUM *server_dh_pub, @@ -57,8 +57,8 @@ EVP_MD_CTX md; buffer_init(&b); - buffer_put_string(&b, client_version_string, strlen(client_version_string)); - buffer_put_string(&b, server_version_string, strlen(server_version_string)); + buffer_put_cstring(&b, client_version_string); + buffer_put_cstring(&b, server_version_string); /* kexinit messages: fake header: len+SSH2_MSG_KEXINIT */ buffer_put_int(&b, ckexinitlen+1); @@ -99,7 +99,7 @@ /* client */ -void +static void kexgex_client(Kex *kex) { BIGNUM *dh_server_pub = NULL, *shared_secret = NULL; @@ -177,9 +177,10 @@ if (server_host_key == NULL) fatal("cannot decode server_host_key_blob"); - if (kex->check_host_key == NULL) - fatal("cannot check server_host_key"); - kex->check_host_key(server_host_key); + if (kex->verify_host_key == NULL) + fatal("cannot verify server_host_key"); + if (kex->verify_host_key(server_host_key) == -1) + fatal("server_host_key verification failed"); /* DH paramter f, server public DH key */ dh_server_pub = BN_new(); @@ -233,7 +234,7 @@ xfree(server_host_key_blob); BN_free(dh_server_pub); - if (key_verify(server_host_key, (u_char *)signature, slen, hash, 20) != 1) + if (key_verify(server_host_key, signature, slen, hash, 20) != 1) fatal("key_verify failed for server_host_key"); key_free(server_host_key); xfree(signature); @@ -252,7 +253,7 @@ /* server */ -void +static void kexgex_server(Kex *kex) { BIGNUM *shared_secret = NULL, *dh_client_pub = NULL; @@ -357,7 +358,7 @@ kex->server_version_string, buffer_ptr(&kex->peer), buffer_len(&kex->peer), buffer_ptr(&kex->my), buffer_len(&kex->my), - (char *)server_host_key_blob, sbloblen, + server_host_key_blob, sbloblen, min, nbits, max, dh->p, dh->g, dh_client_pub, @@ -383,9 +384,9 @@ /* send server hostkey, DH pubkey 'f' and singed H */ debug("SSH2_MSG_KEX_DH_GEX_REPLY sent"); packet_start(SSH2_MSG_KEX_DH_GEX_REPLY); - packet_put_string((char *)server_host_key_blob, sbloblen); + packet_put_string(server_host_key_blob, sbloblen); packet_put_bignum2(dh->pub_key); /* f */ - packet_put_string((char *)signature, slen); + packet_put_string(signature, slen); packet_send(); xfree(signature); xfree(server_host_key_blob); diff -ru openssh-2.9p2/key.c openssh-2.9.9p1/key.c --- openssh-2.9p2/key.c 2001-04-18 04:11:37.000000000 +1000 +++ openssh-2.9.9p1/key.c 2001-09-20 10:55:53.000000000 +1000 @@ -9,7 +9,7 @@ * called by a name other than "ssh" or "Secure Shell". * * - * Copyright (c) 2000 Markus Friedl. All rights reserved. + * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -32,7 +32,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: key.c,v 1.25 2001/04/17 10:53:24 markus Exp $"); +RCSID("$OpenBSD: key.c,v 1.32 2001/09/19 13:23:29 markus Exp $"); #include @@ -54,6 +54,7 @@ DSA *dsa; k = xmalloc(sizeof(*k)); k->type = type; + k->flags = 0; k->dsa = NULL; k->rsa = NULL; switch (k->type) { @@ -153,7 +154,7 @@ return 0; } -u_char* +static u_char* key_fingerprint_raw(Key *k, enum fp_type dgst_type, size_t *dgst_raw_length) { EVP_MD *md = NULL; @@ -210,7 +211,7 @@ return retval; } -char* +static char* key_fingerprint_hex(u_char* dgst_raw, size_t dgst_raw_len) { char *retval; @@ -227,7 +228,7 @@ return retval; } -char* +static char* key_fingerprint_bubblebabble(u_char* dgst_raw, size_t dgst_raw_len) { char vowels[] = { 'a', 'e', 'i', 'o', 'u', 'y' }; @@ -308,7 +309,7 @@ * last processed (and maybe modified) character. Note that this may modify * the buffer containing the number. */ -int +static int read_bignum(char **cpp, BIGNUM * value) { char *cp = *cpp; @@ -344,7 +345,7 @@ *cpp = cp; return 1; } -int +static int write_bignum(FILE *f, BIGNUM *num) { char *buf = BN_bn2dec(num); @@ -357,7 +358,7 @@ return 1; } -/* returns 1 ok, -1 error, 0 type mismatch */ +/* returns 1 ok, -1 error */ int key_read(Key *ret, char **cpp) { @@ -412,7 +413,7 @@ } else if (ret->type != type) { /* is a key, but different type */ debug3("key_read: type mismatch"); - return 0; + return -1; } len = 2*strlen(cp); blob = xmalloc(len); @@ -544,7 +545,7 @@ return 0; } -RSA * +static RSA * rsa_generate_private_key(u_int bits) { RSA *private; @@ -554,7 +555,7 @@ return private; } -DSA* +static DSA* dsa_generate_private_key(u_int bits) { DSA *private = DSA_generate_parameters(bits, NULL, 0, NULL, NULL, NULL, NULL); @@ -652,7 +653,7 @@ } Key * -key_from_blob(char *blob, int blen) +key_from_blob(u_char *blob, int blen) { Buffer b; char *ktype; @@ -727,8 +728,9 @@ buffer_put_bignum2(&b, key->rsa->n); break; default: - error("key_to_blob: illegal key type %d", key->type); - break; + error("key_to_blob: unsupported key type %d", key->type); + buffer_free(&b); + return 0; } len = buffer_len(&b); buf = xmalloc(len); @@ -768,6 +770,9 @@ u_char *signature, int signaturelen, u_char *data, int datalen) { + if (signaturelen == 0) + return -1; + switch(key->type){ case KEY_DSA: return ssh_dss_verify(key, signature, signaturelen, data, datalen); diff -ru openssh-2.9p2/key.h openssh-2.9.9p1/key.h --- openssh-2.9p2/key.h 2001-04-18 04:11:37.000000000 +1000 +++ openssh-2.9.9p1/key.h 2001-09-18 15:41:20.000000000 +1000 @@ -1,7 +1,7 @@ -/* $OpenBSD: key.h,v 1.12 2001/04/17 10:53:24 markus Exp $ */ +/* $OpenBSD: key.h,v 1.17 2001/09/17 19:27:15 stevesk Exp $ */ /* - * Copyright (c) 2000 Markus Friedl. All rights reserved. + * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -44,41 +44,37 @@ SSH_FP_HEX, SSH_FP_BUBBLEBABBLE }; + +/* key is stored in external hardware */ +#define KEY_FLAG_EXT 0x0001 + struct Key { - int type; + int type; + int flags; RSA *rsa; DSA *dsa; }; -Key *key_new(int type); -Key *key_new_private(int type); -void key_free(Key *k); -int key_equal(Key *a, Key *b); -char *key_fingerprint(Key *k, enum fp_type dgst_type, enum fp_rep dgst_rep); -char *key_type(Key *k); -int key_write(Key *key, FILE *f); -int key_read(Key *key, char **cpp); -u_int key_size(Key *k); - -Key *key_generate(int type, u_int bits); -Key *key_from_private(Key *k); -int key_type_from_name(char *name); - -Key *key_from_blob(char *blob, int blen); -int key_to_blob(Key *key, u_char **blobp, u_int *lenp); -char *key_ssh_name(Key *k); -int key_names_valid2(const char *names); - -int -key_sign( - Key *key, - u_char **sigp, int *lenp, - u_char *data, int datalen); - -int -key_verify( - Key *key, - u_char *signature, int signaturelen, - u_char *data, int datalen); +Key *key_new(int); +Key *key_new_private(int); +void key_free(Key *); +int key_equal(Key *, Key *); +char *key_fingerprint(Key *, enum fp_type, enum fp_rep); +char *key_type(Key *); +int key_write(Key *, FILE *); +int key_read(Key *, char **); +u_int key_size(Key *); + +Key *key_generate(int, u_int); +Key *key_from_private(Key *); +int key_type_from_name(char *); + +Key *key_from_blob(u_char *, int); +int key_to_blob(Key *, u_char **, u_int *); +char *key_ssh_name(Key *); +int key_names_valid2(const char *); + +int key_sign(Key *, u_char **, int *, u_char *, int); +int key_verify(Key *, u_char *, int, u_char *, int); #endif diff -ru openssh-2.9p2/log.c openssh-2.9.9p1/log.c --- openssh-2.9p2/log.c 2001-04-02 23:45:00.000000000 +1000 +++ openssh-2.9.9p1/log.c 2001-07-04 14:46:58.000000000 +1000 @@ -34,7 +34,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: log.c,v 1.17 2001/03/04 17:42:28 millert Exp $"); +RCSID("$OpenBSD: log.c,v 1.18 2001/06/26 17:27:23 markus Exp $"); #include "log.h" #include "xmalloc.h" @@ -88,6 +88,8 @@ { NULL, 0 } }; +static void do_log(LogLevel level, const char *fmt, va_list args); + SyslogFacility log_facility_number(char *name) { @@ -326,7 +328,7 @@ #define MSGBUFSIZ 1024 -void +static void do_log(LogLevel level, const char *fmt, va_list args) { char msgbuf[MSGBUFSIZ]; diff -ru openssh-2.9p2/log.h openssh-2.9.9p1/log.h --- openssh-2.9p2/log.h 2001-03-05 21:23:31.000000000 +1100 +++ openssh-2.9.9p1/log.h 2001-07-04 14:46:58.000000000 +1000 @@ -1,4 +1,4 @@ -/* $OpenBSD: log.h,v 1.2 2001/01/29 01:58:16 niklas Exp $ */ +/* $OpenBSD: log.h,v 1.4 2001/06/26 17:27:24 markus Exp $ */ /* * Author: Tatu Ylonen @@ -45,36 +45,22 @@ SYSLOG_LEVEL_DEBUG2, SYSLOG_LEVEL_DEBUG3 } LogLevel; -/* Initializes logging. */ -void log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr); -/* Logging implementation, depending on server or client */ -void do_log(LogLevel level, const char *fmt, va_list args); +void log_init(char *, LogLevel, SyslogFacility, int); -/* name to facility/level */ -SyslogFacility log_facility_number(char *name); -LogLevel log_level_number(char *name); - -/* Output a message to syslog or stderr */ -void fatal(const char *fmt,...) __attribute__((format(printf, 1, 2))); -void error(const char *fmt,...) __attribute__((format(printf, 1, 2))); -void log(const char *fmt,...) __attribute__((format(printf, 1, 2))); -void verbose(const char *fmt,...) __attribute__((format(printf, 1, 2))); -void debug(const char *fmt,...) __attribute__((format(printf, 1, 2))); -void debug2(const char *fmt,...) __attribute__((format(printf, 1, 2))); -void debug3(const char *fmt,...) __attribute__((format(printf, 1, 2))); +SyslogFacility log_facility_number(char *); +LogLevel log_level_number(char *); -/* same as fatal() but w/o logging */ -void fatal_cleanup(void); - -/* - * Registers a cleanup function to be called by fatal()/fatal_cleanup() - * before exiting. It is permissible to call fatal_remove_cleanup for the - * function itself from the function. - */ -void fatal_add_cleanup(void (*proc) (void *context), void *context); - -/* Removes a cleanup function to be called at fatal(). */ -void fatal_remove_cleanup(void (*proc) (void *context), void *context); +void fatal(const char *, ...) __attribute__((format(printf, 1, 2))); +void error(const char *, ...) __attribute__((format(printf, 1, 2))); +void log(const char *, ...) __attribute__((format(printf, 1, 2))); +void verbose(const char *, ...) __attribute__((format(printf, 1, 2))); +void debug(const char *, ...) __attribute__((format(printf, 1, 2))); +void debug2(const char *, ...) __attribute__((format(printf, 1, 2))); +void debug3(const char *, ...) __attribute__((format(printf, 1, 2))); + +void fatal_cleanup(void); +void fatal_add_cleanup(void (*) (void *), void *); +void fatal_remove_cleanup(void (*) (void *), void *); #endif diff -ru openssh-2.9p2/loginrec.c openssh-2.9.9p1/loginrec.c --- openssh-2.9p2/loginrec.c 2001-05-09 06:34:33.000000000 +1000 +++ openssh-2.9.9p1/loginrec.c 2001-08-07 09:29:17.000000000 +1000 @@ -163,7 +163,7 @@ #include "log.h" #include "atomicio.h" -RCSID("$Id: loginrec.c,v 1.32.4.1 2001/05/08 20:34:33 mouring Exp $"); +RCSID("$Id: loginrec.c,v 1.34 2001/08/06 23:29:17 mouring Exp $"); #ifdef HAVE_UTIL_H # include @@ -616,9 +616,15 @@ switch (li->type) { case LTYPE_LOGIN: ut->ut_type = USER_PROCESS; +#ifdef _CRAY + cray_set_tmpdir(ut); +#endif break; case LTYPE_LOGOUT: ut->ut_type = DEAD_PROCESS; +#ifdef _CRAY + cray_retain_utmp(ut, li->pid); +#endif break; } # endif diff -ru openssh-2.9p2/loginrec.h openssh-2.9.9p1/loginrec.h --- openssh-2.9p2/loginrec.h 2001-05-09 06:34:33.000000000 +1000 +++ openssh-2.9.9p1/loginrec.h 2001-05-09 06:33:06.000000000 +1000 @@ -40,7 +40,7 @@ #include #include -/* RCSID("$Id: loginrec.h,v 1.5.8.1 2001/05/08 20:34:33 mouring Exp $"); */ +/* RCSID("$Id: loginrec.h,v 1.6 2001/05/08 20:33:06 mouring Exp $"); */ /** ** you should use the login_* calls to work around platform dependencies diff -ru openssh-2.9p2/mac.h openssh-2.9.9p1/mac.h --- openssh-2.9p2/mac.h 2001-02-15 14:01:59.000000000 +1100 +++ openssh-2.9.9p1/mac.h 2001-07-04 14:46:58.000000000 +1000 @@ -1,4 +1,4 @@ -/* $OpenBSD: mac.h,v 1.1 2001/02/11 12:59:24 markus Exp $ */ +/* $OpenBSD: mac.h,v 1.3 2001/06/26 17:27:24 markus Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -23,6 +23,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -int mac_valid(const char *names); -int mac_init(Mac *mac, char *name); -u_char *mac_compute(Mac *mac, u_int32_t seqno, u_char *data, int datalen); +int mac_valid(const char *); +int mac_init(Mac *, char *); +u_char *mac_compute(Mac *, u_int32_t, u_char *, int); diff -ru openssh-2.9p2/match.c openssh-2.9.9p1/match.c --- openssh-2.9p2/match.c 2001-03-11 12:49:20.000000000 +1100 +++ openssh-2.9.9p1/match.c 2001-07-04 14:56:46.000000000 +1000 @@ -35,7 +35,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: match.c,v 1.12 2001/03/10 17:51:04 markus Exp $"); +RCSID("$OpenBSD: match.c,v 1.14 2001/06/27 04:48:53 markus Exp $"); #include "match.h" #include "xmalloc.h" @@ -162,7 +162,56 @@ return got_positive; } +/* + * returns 0 if we get a negative match for the hostname or the ip + * or if we get no match at all. returns 1 otherwise. + */ +int +match_host_and_ip(const char *host, const char *ipaddr, + const char *patterns) +{ + int mhost, mip; + + /* negative ipaddr match */ + if ((mip = match_hostname(ipaddr, patterns, strlen(patterns))) == -1) + return 0; + /* negative hostname match */ + if ((mhost = match_hostname(host, patterns, strlen(patterns))) == -1) + return 0; + /* no match at all */ + if (mhost == 0 && mip == 0) + return 0; + return 1; +} + +/* + * match user, user@host_or_ip, user@host_or_ip_list against pattern + */ +int +match_user(const char *user, const char *host, const char *ipaddr, + const char *pattern) +{ + char *p, *pat; + int ret; + + if ((p = strchr(pattern,'@')) == NULL) + return match_pattern(user, pattern); + + pat = xstrdup(pattern); + p = strchr(pat, '@'); + *p++ = '\0'; + + if ((ret = match_pattern(user, pat)) == 1) + ret = match_host_and_ip(host, ipaddr, p); + xfree(pat); + return ret; +} + +/* + * Returns first item from client-list that is also supported by server-list, + * caller must xfree() returned string. + */ #define MAX_PROP 20 #define SEP "," char * diff -ru openssh-2.9p2/match.h openssh-2.9.9p1/match.h --- openssh-2.9p2/match.h 2001-03-11 12:49:20.000000000 +1100 +++ openssh-2.9.9p1/match.h 2001-07-04 14:02:38.000000000 +1000 @@ -1,11 +1,9 @@ -/* $OpenBSD: match.h,v 1.7 2001/03/10 17:51:04 markus Exp $ */ +/* $OpenBSD: match.h,v 1.9 2001/06/26 06:32:56 itojun Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved - * This file contains various auxiliary functions related to multiple - * precision integers. * * As far as I am concerned, the code I have written for this software * can be used freely for any purpose. Any derived versions of this @@ -16,24 +14,10 @@ #ifndef MATCH_H #define MATCH_H -/* - * Returns true if the given string matches the pattern (which may contain ? - * and * as wildcards), and zero if it does not match. - */ -int match_pattern(const char *s, const char *pattern); - -/* - * Tries to match the host name (which must be in all lowercase) against the - * comma-separated sequence of subpatterns (each possibly preceded by ! to - * indicate negation). Returns -1 if negation matches, 1 if there is - * a positive match, 0 if there is no match at all. - */ -int match_hostname(const char *host, const char *pattern, u_int len); - -/* - * Returns first item from client-list that is also supported by server-list, - * caller must xfree() returned string. - */ -char *match_list(const char *client, const char *server, u_int *next); +int match_pattern(const char *, const char *); +int match_hostname(const char *, const char *, u_int); +int match_host_and_ip(const char *, const char *, const char *); +int match_user(const char *, const char *, const char *, const char *); +char *match_list(const char *, const char *, u_int *); #endif diff -ru openssh-2.9p2/misc.c openssh-2.9.9p1/misc.c --- openssh-2.9p2/misc.c 2001-06-15 12:10:43.000000000 +1000 +++ openssh-2.9.9p1/misc.c 2001-07-04 14:46:58.000000000 +1000 @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.5 2001/04/12 20:09:37 stevesk Exp $ */ +/* $OpenBSD: misc.c,v 1.12 2001/06/26 17:27:24 markus Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -25,12 +25,13 @@ */ #include "includes.h" -RCSID("$OpenBSD: misc.c,v 1.5 2001/04/12 20:09:37 stevesk Exp $"); +RCSID("$OpenBSD: misc.c,v 1.12 2001/06/26 17:27:24 markus Exp $"); #include "misc.h" #include "log.h" #include "xmalloc.h" +/* remove newline at end of string */ char * chop(char *s) { @@ -46,17 +47,19 @@ } +/* set/unset filedescriptor to non-blocking */ void set_nonblock(int fd) { int val; + val = fcntl(fd, F_GETFL, 0); if (val < 0) { error("fcntl(%d, F_GETFL, 0): %s", fd, strerror(errno)); return; } if (val & O_NONBLOCK) { - debug("fd %d IS O_NONBLOCK", fd); + debug2("fd %d is O_NONBLOCK", fd); return; } debug("fd %d setting O_NONBLOCK", fd); @@ -67,9 +70,32 @@ fd, strerror(errno)); } +void +unset_nonblock(int fd) +{ + int val; + + val = fcntl(fd, F_GETFL, 0); + if (val < 0) { + error("fcntl(%d, F_GETFL, 0): %s", fd, strerror(errno)); + return; + } + if (!(val & O_NONBLOCK)) { + debug2("fd %d is not O_NONBLOCK", fd); + return; + } + debug("fd %d clearing O_NONBLOCK", fd); + val &= ~O_NONBLOCK; + if (fcntl(fd, F_SETFL, val) == -1) + if (errno != ENODEV) + error("fcntl(%d, F_SETFL, O_NONBLOCK): %s", + fd, strerror(errno)); +} + /* Characters considered whitespace in strsep calls. */ #define WHITESPACE " \t\r\n" +/* return next token in configuration line */ char * strdelim(char **s) { @@ -108,6 +134,12 @@ copy->pw_gecos = xstrdup(pw->pw_gecos); copy->pw_uid = pw->pw_uid; copy->pw_gid = pw->pw_gid; +#ifdef HAVE_PW_EXPIRE_IN_PASSWD + copy->pw_expire = pw->pw_expire; +#endif +#ifdef HAVE_PW_CHANGE_IN_PASSWD + copy->pw_change = pw->pw_change; +#endif #ifdef HAVE_PW_CLASS_IN_PASSWD copy->pw_class = xstrdup(pw->pw_class); #endif @@ -116,7 +148,13 @@ return copy; } -int a2port(const char *s) +/* + * Convert ASCII string to TCP/IP port number. + * Port must be >0 and <=65535. + * Return 0 if invalid. + */ +int +a2port(const char *s) { long port; char *endp; @@ -131,6 +169,143 @@ return port; } +#define SECONDS 1 +#define MINUTES (SECONDS * 60) +#define HOURS (MINUTES * 60) +#define DAYS (HOURS * 24) +#define WEEKS (DAYS * 7) + +/* + * Convert a time string into seconds; format is + * a sequence of: + * time[qualifier] + * + * Valid time qualifiers are: + * seconds + * s|S seconds + * m|M minutes + * h|H hours + * d|D days + * w|W weeks + * + * Examples: + * 90m 90 minutes + * 1h30m 90 minutes + * 2d 2 days + * 1w 1 week + * + * Return -1 if time string is invalid. + */ +long +convtime(const char *s) +{ + long total, secs; + const char *p; + char *endp; + + errno = 0; + total = 0; + p = s; + + if (p == NULL || *p == '\0') + return -1; + + while (*p) { + secs = strtol(p, &endp, 10); + if (p == endp || + (errno == ERANGE && (secs == LONG_MIN || secs == LONG_MAX)) || + secs < 0) + return -1; + + switch (*endp++) { + case '\0': + endp--; + case 's': + case 'S': + break; + case 'm': + case 'M': + secs *= MINUTES; + break; + case 'h': + case 'H': + secs *= HOURS; + break; + case 'd': + case 'D': + secs *= DAYS; + break; + case 'w': + case 'W': + secs *= WEEKS; + break; + default: + return -1; + } + total += secs; + if (total < 0) + return -1; + p = endp; + } + + return total; +} + +char * +cleanhostname(char *host) +{ + if (*host == '[' && host[strlen(host) - 1] == ']') { + host[strlen(host) - 1] = '\0'; + return (host + 1); + } else + return host; +} + +char * +colon(char *cp) +{ + int flag = 0; + + if (*cp == ':') /* Leading colon is part of file name. */ + return (0); + if (*cp == '[') + flag = 1; + + for (; *cp; ++cp) { + if (*cp == '@' && *(cp+1) == '[') + flag = 1; + if (*cp == ']' && *(cp+1) == ':' && flag) + return (cp+1); + if (*cp == ':' && !flag) + return (cp); + if (*cp == '/') + return (0); + } + return (0); +} + +/* function to assist building execv() arguments */ +void +addargs(arglist *args, char *fmt, ...) +{ + va_list ap; + char buf[1024]; + + va_start(ap, fmt); + vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + + if (args->list == NULL) { + args->nalloc = 32; + args->num = 0; + } else if (args->num+2 >= args->nalloc) + args->nalloc *= 2; + + args->list = xrealloc(args->list, args->nalloc * sizeof(char *)); + args->list[args->num++] = xstrdup(buf); + args->list[args->num] = NULL; +} + mysig_t mysignal(int sig, mysig_t act) { diff -ru openssh-2.9p2/misc.h openssh-2.9.9p1/misc.h --- openssh-2.9p2/misc.h 2001-04-13 09:39:27.000000000 +1000 +++ openssh-2.9.9p1/misc.h 2001-07-05 03:25:55.000000000 +1000 @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.h,v 1.4 2001/04/12 20:09:36 stevesk Exp $ */ +/* $OpenBSD: misc.h,v 1.10 2001/06/26 17:27:24 markus Exp $ */ /* * Author: Tatu Ylonen @@ -11,23 +11,25 @@ * incompatible with the protocol description in the RFC file, it must be * called by a name other than "ssh" or "Secure Shell". */ -/* remove newline at end of string */ -char *chop(char *s); -/* return next token in configuration line */ -char *strdelim(char **s); - -/* set filedescriptor to non-blocking */ -void set_nonblock(int fd); - -struct passwd * pwcopy(struct passwd *pw); - -/* - * Convert ASCII string to TCP/IP port number. - * Port must be >0 and <=65535. - * Return 0 if invalid. - */ -int a2port(const char *s); +char *chop(char *); +char *strdelim(char **); +void set_nonblock(int); +void unset_nonblock(int); +int a2port(const char *); +char *cleanhostname(char *); +char *colon(char *); +long convtime(const char *); + +struct passwd *pwcopy(struct passwd *); + +typedef struct arglist arglist; +struct arglist { + char **list; + int num; + int nalloc; +}; +void addargs(arglist *, char *, ...) __attribute__((format(printf, 2, 3))); /* wrapper for signal interface */ typedef void (*mysig_t)(int); Only in openssh-2.9.9p1: moduli diff -ru openssh-2.9p2/mpaux.h openssh-2.9.9p1/mpaux.h --- openssh-2.9p2/mpaux.h 2000-12-22 12:44:00.000000000 +1100 +++ openssh-2.9.9p1/mpaux.h 2001-07-04 14:46:58.000000000 +1000 @@ -12,20 +12,11 @@ * called by a name other than "ssh" or "Secure Shell". */ -/* RCSID("$OpenBSD: mpaux.h,v 1.9 2000/12/19 23:17:57 markus Exp $"); */ +/* RCSID("$OpenBSD: mpaux.h,v 1.11 2001/06/26 17:27:24 markus Exp $"); */ #ifndef MPAUX_H #define MPAUX_H -/* - * Computes a 16-byte session id in the global variable session_id. The - * session id is computed by concatenating the linearized, msb first - * representations of host_key_n, session_key_n, and the cookie. - */ -void -compute_session_id(u_char session_id[16], - u_char cookie[8], - BIGNUM * host_key_n, - BIGNUM * session_key_n); +void compute_session_id(u_char[16], u_char[8], BIGNUM *, BIGNUM *); #endif /* MPAUX_H */ diff -ru openssh-2.9p2/myproposal.h openssh-2.9.9p1/myproposal.h --- openssh-2.9p2/myproposal.h 2001-03-06 12:05:23.000000000 +1100 +++ openssh-2.9.9p1/myproposal.h 2001-07-23 05:32:01.000000000 +1000 @@ -25,11 +25,17 @@ */ #define KEX_DEFAULT_KEX "diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1" #define KEX_DEFAULT_PK_ALG "ssh-rsa,ssh-dss" +#ifdef _CRAY +/*Temporary hack until rijndael is ported to CRAY word addressable machines */ +#define KEX_DEFAULT_ENCRYPT \ + "3des-cbc,blowfish-cbc,cast128-cbc,arcfour" +#else #define KEX_DEFAULT_ENCRYPT \ "aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour," \ "aes192-cbc,aes256-cbc," \ "rijndael128-cbc,rijndael192-cbc,rijndael256-cbc," \ "rijndael-cbc@lysator.liu.se" +#endif #define KEX_DEFAULT_MAC \ "hmac-md5,hmac-sha1,hmac-ripemd160," \ "hmac-ripemd160@openssh.com," \ diff -ru openssh-2.9p2/nchan.c openssh-2.9.9p1/nchan.c --- openssh-2.9p2/nchan.c 2001-04-03 23:02:48.000000000 +1000 +++ openssh-2.9.9p1/nchan.c 2001-09-21 05:33:33.000000000 +1000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999 Markus Friedl. All rights reserved. + * Copyright (c) 1999, 2000, 2001 Markus Friedl. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,17 +23,42 @@ */ #include "includes.h" -RCSID("$OpenBSD: nchan.c,v 1.23 2001/02/28 08:54:55 markus Exp $"); +RCSID("$OpenBSD: nchan.c,v 1.31 2001/07/17 21:04:57 markus Exp $"); #include "ssh1.h" #include "ssh2.h" #include "buffer.h" #include "packet.h" #include "channels.h" -#include "nchan.h" #include "compat.h" #include "log.h" +/* + * SSH Protocol 1.5 aka New Channel Protocol + * Thanks to Martina, Axel and everyone who left Erlangen, leaving me bored. + * Written by Markus Friedl in October 1999 + * + * Protocol versions 1.3 and 1.5 differ in the handshake protocol used for the + * tear down of channels: + * + * 1.3: strict request-ack-protocol: + * CLOSE -> + * <- CLOSE_CONFIRM + * + * 1.5: uses variations of: + * IEOF -> + * <- OCLOSE + * <- IEOF + * OCLOSE -> + * i.e. both sides have to close the channel + * + * 2.0: the EOF messages are optional + * + * See the debugging output from 'ssh -v' and 'sshd -d' of + * ssh-1.2.27 as an example. + * + */ + /* functions manipulating channel states */ /* * EVENTS update channel input/output states execute ACTIONS @@ -49,14 +74,14 @@ /* * ACTIONS: should never update the channel states */ -static void chan_send_ieof1(Channel *c); -static void chan_send_oclose1(Channel *c); -static void chan_send_close2(Channel *c); -static void chan_send_eof2(Channel *c); +static void chan_send_ieof1(Channel *); +static void chan_send_oclose1(Channel *); +static void chan_send_close2(Channel *); +static void chan_send_eof2(Channel *); /* helper */ -static void chan_shutdown_write(Channel *c); -static void chan_shutdown_read(Channel *c); +static void chan_shutdown_write(Channel *); +static void chan_shutdown_read(Channel *); /* * SSH1 specific implementation of event functions @@ -84,7 +109,7 @@ c->istate = CHAN_INPUT_CLOSED; break; default: - error("channel %d: protocol error: chan_rcvd_oclose for istate %d", + error("channel %d: protocol error: rcvd_oclose for istate %d", c->self, c->istate); return; } @@ -98,13 +123,15 @@ debug("channel %d: input open -> drain", c->self); chan_shutdown_read(c); c->istate = CHAN_INPUT_WAIT_DRAIN; +#if 0 if (buffer_len(&c->input) == 0) { debug("channel %d: input: no drain shortcut", c->self); chan_ibuf_empty(c); } +#endif break; default: - error("channel %d: internal error: we do not read, but chan_read_failed for istate %d", + error("channel %d: chan_read_failed for istate %d", c->self, c->istate); break; } @@ -114,7 +141,7 @@ { debug("channel %d: ibuf empty", c->self); if (buffer_len(&c->input)) { - error("channel %d: internal error: chan_ibuf_empty for non empty buffer", + error("channel %d: chan_ibuf_empty for non empty buffer", c->self); return; } @@ -125,7 +152,7 @@ c->istate = CHAN_INPUT_WAIT_OCLOSE; break; default: - error("channel %d: internal error: chan_ibuf_empty for istate %d", + error("channel %d: chan_ibuf_empty for istate %d", c->self, c->istate); break; } @@ -137,19 +164,23 @@ if (c->type != SSH_CHANNEL_OPEN) { debug("channel %d: non-open", c->self); if (c->istate == CHAN_INPUT_OPEN) { - debug("channel %d: non-open: input open -> wait_oclose", c->self); + debug("channel %d: non-open: input open -> wait_oclose", + c->self); chan_shutdown_read(c); chan_send_ieof1(c); c->istate = CHAN_INPUT_WAIT_OCLOSE; } else { - error("channel %d: istate %d != open", c->self, c->istate); + error("channel %d: non-open: istate %d != open", + c->self, c->istate); } if (c->ostate == CHAN_OUTPUT_OPEN) { - debug("channel %d: non-open: output open -> closed", c->self); + debug("channel %d: non-open: output open -> closed", + c->self); chan_send_oclose1(c); c->ostate = CHAN_OUTPUT_CLOSED; } else { - error("channel %d: ostate %d != open", c->self, c->ostate); + error("channel %d: non-open: ostate %d != open", + c->self, c->ostate); } return; } @@ -163,7 +194,7 @@ c->ostate = CHAN_OUTPUT_CLOSED; break; default: - error("channel %d: protocol error: chan_rcvd_ieof for ostate %d", + error("channel %d: protocol error: rcvd_ieof for ostate %d", c->self, c->ostate); break; } @@ -184,7 +215,7 @@ c->ostate = CHAN_OUTPUT_CLOSED; break; default: - error("channel %d: internal error: chan_write_failed for ostate %d", + error("channel %d: chan_write_failed for ostate %d", c->self, c->ostate); break; } @@ -194,7 +225,7 @@ { debug("channel %d: obuf empty", c->self); if (buffer_len(&c->output)) { - error("channel %d: internal error: chan_obuf_empty for non empty buffer", + error("channel %d: chan_obuf_empty for non empty buffer", c->self); return; } @@ -205,7 +236,7 @@ c->ostate = CHAN_OUTPUT_CLOSED; break; default: - error("channel %d: internal error: chan_obuf_empty for ostate %d", + error("channel %d: internal error: obuf_empty for ostate %d", c->self, c->ostate); break; } @@ -222,7 +253,7 @@ packet_send(); break; default: - error("channel %d: internal error: cannot send ieof for istate %d", + error("channel %d: cannot send ieof for istate %d", c->self, c->istate); break; } @@ -241,7 +272,7 @@ packet_send(); break; default: - error("channel %d: internal error: cannot send oclose for ostate %d", + error("channel %d: cannot send oclose for ostate %d", c->self, c->ostate); break; } @@ -265,7 +296,10 @@ } switch (c->ostate) { case CHAN_OUTPUT_OPEN: - /* wait until a data from the channel is consumed if a CLOSE is received */ + /* + * wait until a data from the channel is consumed if a CLOSE + * is received + */ debug("channel %d: output open -> drain", c->self); c->ostate = CHAN_OUTPUT_WAIT_DRAIN; break; @@ -287,7 +321,7 @@ { debug("channel %d: ibuf empty", c->self); if (buffer_len(&c->input)) { - error("channel %d: internal error: chan_ibuf_empty for non empty buffer", + error("channel %d: chan_ibuf_empty for non empty buffer", c->self); return; } @@ -299,7 +333,7 @@ c->istate = CHAN_INPUT_CLOSED; break; default: - error("channel %d: internal error: chan_ibuf_empty for istate %d", + error("channel %d: chan_ibuf_empty for istate %d", c->self, c->istate); break; } @@ -329,7 +363,7 @@ c->ostate = CHAN_OUTPUT_CLOSED; break; default: - error("channel %d: internal error: chan_write_failed for ostate %d", + error("channel %d: chan_write_failed for ostate %d", c->self, c->ostate); break; } @@ -339,7 +373,7 @@ { debug("channel %d: obuf empty", c->self); if (buffer_len(&c->output)) { - error("internal error: chan_obuf_empty %d for non empty buffer", + error("channel %d: chan_obuf_empty for non empty buffer", c->self); return; } @@ -350,7 +384,7 @@ c->ostate = CHAN_OUTPUT_CLOSED; break; default: - error("channel %d: internal error: chan_obuf_empty for ostate %d", + error("channel %d: chan_obuf_empty for ostate %d", c->self, c->ostate); break; } @@ -366,7 +400,7 @@ packet_send(); break; default: - error("channel %d: internal error: cannot send eof for istate %d", + error("channel %d: cannot send eof for istate %d", c->self, c->istate); break; } @@ -377,10 +411,10 @@ debug("channel %d: send close", c->self); if (c->ostate != CHAN_OUTPUT_CLOSED || c->istate != CHAN_INPUT_CLOSED) { - error("channel %d: internal error: cannot send close for istate/ostate %d/%d", + error("channel %d: cannot send close for istate/ostate %d/%d", c->self, c->istate, c->ostate); } else if (c->flags & CHAN_CLOSE_SENT) { - error("channel %d: internal error: already sent close", c->self); + error("channel %d: already sent close", c->self); } else { packet_start(SSH2_MSG_CHANNEL_CLOSE); packet_put_int(c->remote_id); @@ -391,9 +425,19 @@ /* shared */ +void +chan_mark_dead(Channel *c) +{ + c->type = SSH_CHANNEL_ZOMBIE; +} + int chan_is_dead(Channel *c) { + if (c->type == SSH_CHANNEL_ZOMBIE) { + debug("channel %d: zombie", c->self); + return 1; + } if (c->istate != CHAN_INPUT_CLOSED || c->ostate != CHAN_OUTPUT_CLOSED) return 0; if (!compat20) { @@ -470,13 +514,14 @@ debug("channel %d: close_write", c->self); if (c->sock != -1) { if (shutdown(c->sock, SHUT_WR) < 0) - debug("channel %d: chan_shutdown_write: shutdown() failed for fd%d: %.100s", + debug("channel %d: chan_shutdown_write: " + "shutdown() failed for fd%d: %.100s", c->self, c->sock, strerror(errno)); } else { - if (close(c->wfd) < 0) - log("channel %d: chan_shutdown_write: close() failed for fd%d: %.100s", + if (channel_close_fd(&c->wfd) < 0) + log("channel %d: chan_shutdown_write: " + "close() failed for fd%d: %.100s", c->self, c->wfd, strerror(errno)); - c->wfd = -1; } } static void @@ -489,16 +534,18 @@ /* * shutdown(sock, SHUT_READ) may return ENOTCONN if the * write side has been closed already. (bug on Linux) - * HP-UX will return EINVAL. + * HP-UX may return ENOTCONN also. */ if (shutdown(c->sock, SHUT_RD) < 0 - && (errno != ENOTCONN && errno != EINVAL)) - error("channel %d: chan_shutdown_read: shutdown() failed for fd%d [i%d o%d]: %.100s", - c->self, c->sock, c->istate, c->ostate, strerror(errno)); + && errno != ENOTCONN) + error("channel %d: chan_shutdown_read: " + "shutdown() failed for fd%d [i%d o%d]: %.100s", + c->self, c->sock, c->istate, c->ostate, + strerror(errno)); } else { - if (close(c->rfd) < 0) - log("channel %d: chan_shutdown_read: close() failed for fd%d: %.100s", + if (channel_close_fd(&c->rfd) < 0) + log("channel %d: chan_shutdown_read: " + "close() failed for fd%d: %.100s", c->self, c->rfd, strerror(errno)); - c->rfd = -1; } } Only in openssh-2.9p2: nchan.h diff -ru openssh-2.9p2/openbsd-compat/Makefile.in openssh-2.9.9p1/openbsd-compat/Makefile.in --- openssh-2.9p2/openbsd-compat/Makefile.in 2001-04-13 07:35:53.000000000 +1000 +++ openssh-2.9.9p1/openbsd-compat/Makefile.in 2001-09-20 12:07:51.000000000 +1000 @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.10 2001/04/12 21:35:53 mouring Exp $ +# $Id: Makefile.in,v 1.19 2001/09/20 02:07:51 mouring Exp $ sysconfdir=@sysconfdir@ piddir=@piddir@ @@ -16,9 +16,9 @@ INSTALL=@INSTALL@ LDFLAGS=-L. @LDFLAGS@ -OPENBSD=base64.o bindresvport.o daemon.o getcwd.o getgrouplist.o getusershell.o glob.o inet_aton.o inet_ntoa.o inet_ntop.o mktemp.o realpath.o rresvport.o setenv.o setproctitle.o sigact.o strlcat.o strlcpy.o strmode.o strsep.o strtok.o vis.o +OPENBSD=base64.o bindresvport.o daemon.o dirname.o getcwd.o getgrouplist.o getopt.o glob.o inet_aton.o inet_ntoa.o inet_ntop.o mktemp.o readpassphrase.o realpath.o rresvport.o setenv.o setproctitle.o sigact.o strlcat.o strlcpy.o strmode.o strsep.o -COMPAT=bsd-arc4random.o bsd-cygwin_util.o bsd-misc.o bsd-nextstep.o bsd-snprintf.o bsd-waitpid.o fake-getaddrinfo.o fake-getnameinfo.o +COMPAT=bsd-arc4random.o bsd-cray.o bsd-cygwin_util.o bsd-misc.o bsd-nextstep.o bsd-snprintf.o bsd-waitpid.o fake-getaddrinfo.o fake-getnameinfo.o .c.o: $(CC) $(CFLAGS) $(CPPFLAGS) -c $< Only in openssh-2.9.9p1/openbsd-compat: bsd-cray.c Only in openssh-2.9.9p1/openbsd-compat: bsd-cray.h diff -ru openssh-2.9p2/openbsd-compat/bsd-cygwin_util.c openssh-2.9.9p1/openbsd-compat/bsd-cygwin_util.c --- openssh-2.9p2/openbsd-compat/bsd-cygwin_util.c 2001-04-14 00:28:42.000000000 +1000 +++ openssh-2.9.9p1/openbsd-compat/bsd-cygwin_util.c 2001-07-19 02:19:49.000000000 +1000 @@ -15,16 +15,20 @@ #include "includes.h" -RCSID("$Id: bsd-cygwin_util.c,v 1.4 2001/04/13 14:28:42 djm Exp $"); +RCSID("$Id: bsd-cygwin_util.c,v 1.5 2001/07/18 16:19:49 mouring Exp $"); #ifdef HAVE_CYGWIN #include #include +#include #include #include #define is_winnt (GetVersion() < 0x80000000) +#define ntsec_on(c) ((c) && strstr((c),"ntsec") && !strstr((c),"nontsec")) +#define ntea_on(c) ((c) && strstr((c),"ntea") && !strstr((c),"nontea")) + #if defined(open) && open == binary_open # undef open #endif @@ -61,12 +65,34 @@ * context on NT systems is the password authentication. So * we deny all requsts for changing the user context if another * authentication method is used. - * This may change in future when a special openssh - * subauthentication package is available. + * + * This doesn't apply to Cygwin versions >= 1.3.2 anymore which + * uses the undocumented NtCreateToken() call to create a user + * token if the process has the appropriate privileges and if + * CYGWIN ntsec setting is on. */ - if (is_winnt && !pwd_authenticated && geteuid() != uid) - return 0; - + static int has_create_token = -1; + + if (is_winnt) { + if (has_create_token < 0) { + struct utsname uts; + int major_high = 0, major_low = 0, minor = 0; + char *cygwin = getenv("CYGWIN"); + + has_create_token = 0; + if (ntsec_on(cygwin) && !uname(&uts)) { + sscanf(uts.release, "%d.%d.%d", + &major_high, &major_low, &minor); + if (major_high > 1 || + (major_high == 1 && (major_low > 3 || + (major_low == 3 && minor >= 2)))) + has_create_token = 1; + } + } + if (has_create_token < 1 && + !pwd_authenticated && geteuid() != uid) + return 0; + } return 1; } @@ -82,12 +108,9 @@ return 0; /* Evaluate current CYGWIN settings. */ - if ((cygwin = getenv("CYGWIN")) != NULL) { - if (strstr(cygwin, "ntea") && !strstr(cygwin, "nontea")) - allow_ntea = 1; - if (strstr(cygwin, "ntsec") && !strstr(cygwin, "nontsec")) - allow_ntsec = 1; - } + cygwin = getenv("CYGWIN"); + allow_ntea = ntea_on(cygwin); + allow_ntsec = ntsec_on(cygwin); /* * `ntea' is an emulation of POSIX attributes. It doesn't support Only in openssh-2.9.9p1/openbsd-compat: dirname.c Only in openssh-2.9.9p1/openbsd-compat: dirname.h Only in openssh-2.9.9p1/openbsd-compat: getopt.c Only in openssh-2.9.9p1/openbsd-compat: getopt.h Only in openssh-2.9p2/openbsd-compat: getusershell.c Only in openssh-2.9p2/openbsd-compat: getusershell.h diff -ru openssh-2.9p2/openbsd-compat/glob.c openssh-2.9.9p1/openbsd-compat/glob.c --- openssh-2.9p2/openbsd-compat/glob.c 2001-04-14 00:22:33.000000000 +1000 +++ openssh-2.9.9p1/openbsd-compat/glob.c 2001-06-27 23:36:09.000000000 +1000 @@ -37,8 +37,8 @@ #include "includes.h" #include -long -get_arg_max() +static long +get_arg_max(void) { #ifdef ARG_MAX return(ARG_MAX); diff -ru openssh-2.9p2/openbsd-compat/inet_aton.h openssh-2.9.9p1/openbsd-compat/inet_aton.h --- openssh-2.9p2/openbsd-compat/inet_aton.h 2001-02-09 12:55:36.000000000 +1100 +++ openssh-2.9.9p1/openbsd-compat/inet_aton.h 2001-07-16 12:07:51.000000000 +1000 @@ -1,4 +1,4 @@ -/* $Id: inet_aton.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */ +/* $Id: inet_aton.h,v 1.4 2001/07/16 02:07:51 tim Exp $ */ #ifndef _BSD_INET_ATON_H #define _BSD_INET_ATON_H diff -ru openssh-2.9p2/openbsd-compat/inet_ntop.c openssh-2.9.9p1/openbsd-compat/inet_ntop.c --- openssh-2.9p2/openbsd-compat/inet_ntop.c 2001-04-27 10:34:45.000000000 +1000 +++ openssh-2.9.9p1/openbsd-compat/inet_ntop.c 2001-09-25 22:22:56.000000000 +1000 @@ -104,7 +104,8 @@ static const char fmt[] = "%u.%u.%u.%u"; char tmp[sizeof "255.255.255.255"]; - if (sprintf(tmp, fmt, src[0], src[1], src[2], src[3]) > size) { + if (snprintf(tmp, sizeof(tmp), fmt, src[0], src[1], src[2], + src[3]) > size) { errno = ENOSPC; return (NULL); } @@ -190,7 +191,8 @@ tp += strlen(tp); break; } - tp += sprintf(tp, "%x", words[i]); + snprintf(tp, sizeof(tmp - (tp - tmp)), "%x", words[i]); + tp += strlen(tp); } /* Was it a trailing run of 0x00's? */ if (best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ)) diff -ru openssh-2.9p2/openbsd-compat/inet_ntop.h openssh-2.9.9p1/openbsd-compat/inet_ntop.h --- openssh-2.9p2/openbsd-compat/inet_ntop.h 2001-04-13 07:35:53.000000000 +1000 +++ openssh-2.9.9p1/openbsd-compat/inet_ntop.h 2001-08-09 10:56:53.000000000 +1000 @@ -1,7 +1,7 @@ -/* $Id: inet_ntop.h,v 1.1 2001/04/12 21:35:53 mouring Exp $ */ +/* $Id: inet_ntop.h,v 1.4 2001/08/09 00:56:53 mouring Exp $ */ -#ifndef _BSD_RRESVPORT_H -#define _BSD_RRESVPORT_H +#ifndef _BSD_INET_NTOP_H +#define _BSD_INET_NTOP_H #include "config.h" @@ -10,4 +10,4 @@ inet_ntop(int af, const void *src, char *dst, size_t size); #endif /* !HAVE_INET_NTOP */ -#endif /* _BSD_RRESVPORT_H */ +#endif /* _BSD_INET_NTOP_H */ diff -ru openssh-2.9p2/openbsd-compat/openbsd-compat.h openssh-2.9.9p1/openbsd-compat/openbsd-compat.h --- openssh-2.9p2/openbsd-compat/openbsd-compat.h 2001-04-13 07:35:54.000000000 +1000 +++ openssh-2.9.9p1/openbsd-compat/openbsd-compat.h 2001-09-20 12:07:51.000000000 +1000 @@ -1,4 +1,4 @@ -/* $Id: openbsd-compat.h,v 1.6 2001/04/12 21:35:54 mouring Exp $ */ +/* $Id: openbsd-compat.h,v 1.14 2001/09/20 02:07:51 mouring Exp $ */ #ifndef _OPENBSD_H #define _OPENBSD_H @@ -15,18 +15,17 @@ #include "strmode.h" #include "mktemp.h" #include "daemon.h" +#include "dirname.h" #include "base64.h" #include "sigact.h" -#include "inet_aton.h" #include "inet_ntoa.h" #include "inet_ntop.h" #include "strsep.h" -#include "strtok.h" -#include "vis.h" #include "setproctitle.h" #include "getgrouplist.h" #include "glob.h" -#include "getusershell.h" +#include "readpassphrase.h" +#include "getopt.h" /* Home grown routines */ #include "bsd-arc4random.h" @@ -39,4 +38,7 @@ #include "fake-getnameinfo.h" #include "fake-socket.h" +/* Routines for a single OS platform */ +#include "bsd-cray.h" + #endif /* _OPENBSD_H */ Only in openssh-2.9.9p1/openbsd-compat: readpassphrase.c Only in openssh-2.9.9p1/openbsd-compat: readpassphrase.h diff -ru openssh-2.9p2/openbsd-compat/realpath.c openssh-2.9.9p1/openbsd-compat/realpath.c --- openssh-2.9p2/openbsd-compat/realpath.c 2001-03-19 14:12:26.000000000 +1100 +++ openssh-2.9.9p1/openbsd-compat/realpath.c 2001-06-28 14:48:29.000000000 +1000 @@ -32,7 +32,7 @@ #if !defined(HAVE_REALPATH) || defined(BROKEN_REALPATH) #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: realpath..c,v 1.4 1998/05/18 09:55:19 deraadt Exp $"; +static char *rcsid = "$OpenBSD: realpath.c,v 1.5 2001/06/27 00:58:56 lebel Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -82,8 +82,7 @@ * if it is a directory, then change to that directory. * get the current directory name and append the basename. */ - (void)strncpy(resolved, path, MAXPATHLEN - 1); - resolved[MAXPATHLEN - 1] = '\0'; + strlcpy(resolved, path, MAXPATHLEN); loop: q = strrchr(resolved, '/'); if (q != NULL) { diff -ru openssh-2.9p2/openbsd-compat/strlcat.c openssh-2.9.9p1/openbsd-compat/strlcat.c --- openssh-2.9p2/openbsd-compat/strlcat.c 2001-04-14 00:22:33.000000000 +1000 +++ openssh-2.9.9p1/openbsd-compat/strlcat.c 2001-06-28 14:48:29.000000000 +1000 @@ -1,4 +1,4 @@ -/* $OpenBSD: strlcat.c,v 1.5 2001/01/13 16:17:24 millert Exp $ */ +/* $OpenBSD: strlcat.c,v 1.8 2001/05/13 15:40:15 deraadt Exp $ */ /* * Copyright (c) 1998 Todd C. Miller @@ -31,20 +31,22 @@ #ifndef HAVE_STRLCAT #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: strlcat.c,v 1.5 2001/01/13 16:17:24 millert Exp $"; +static char *rcsid = "$OpenBSD: strlcat.c,v 1.8 2001/05/13 15:40:15 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include #include +#include "strlcat.h" /* * Appends src to string dst of size siz (unlike strncat, siz is the * full size of dst, not space left). At most siz-1 characters * will be copied. Always NUL terminates (unless siz <= strlen(dst)). - * Returns strlen(initial dst) + strlen(src); if retval >= siz, - * truncation occurred. + * Returns strlen(src) + MIN(siz, strlen(initial dst)). + * If retval >= siz, truncation occurred. */ -size_t strlcat(dst, src, siz) +size_t +strlcat(dst, src, siz) char *dst; const char *src; size_t siz; diff -ru openssh-2.9p2/openbsd-compat/strlcpy.c openssh-2.9.9p1/openbsd-compat/strlcpy.c --- openssh-2.9p2/openbsd-compat/strlcpy.c 2001-02-01 08:52:04.000000000 +1100 +++ openssh-2.9.9p1/openbsd-compat/strlcpy.c 2001-06-28 14:48:29.000000000 +1000 @@ -1,4 +1,4 @@ -/* $OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp $ */ +/* $OpenBSD: strlcpy.c,v 1.5 2001/05/13 15:40:16 deraadt Exp $ */ /* * Copyright (c) 1998 Todd C. Miller @@ -31,18 +31,20 @@ #ifndef HAVE_STRLCPY #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp $"; +static char *rcsid = "$OpenBSD: strlcpy.c,v 1.5 2001/05/13 15:40:16 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include #include +#include "strlcpy.h" /* * Copy src to string dst of size siz. At most siz-1 characters * will be copied. Always NUL terminates (unless siz == 0). * Returns strlen(src); if retval >= siz, truncation occurred. */ -size_t strlcpy(dst, src, siz) +size_t +strlcpy(dst, src, siz) char *dst; const char *src; size_t siz; diff -ru openssh-2.9p2/openbsd-compat/strmode.c openssh-2.9.9p1/openbsd-compat/strmode.c --- openssh-2.9p2/openbsd-compat/strmode.c 2001-02-01 08:52:04.000000000 +1100 +++ openssh-2.9.9p1/openbsd-compat/strmode.c 2001-06-09 12:22:17.000000000 +1000 @@ -43,9 +43,7 @@ #include void -strmode(mode, p) - register mode_t mode; - register char *p; +strmode(register mode_t mode, register char *p) { /* print type */ switch (mode & S_IFMT) { diff -ru openssh-2.9p2/openbsd-compat/strmode.h openssh-2.9.9p1/openbsd-compat/strmode.h --- openssh-2.9p2/openbsd-compat/strmode.h 2001-02-09 12:55:36.000000000 +1100 +++ openssh-2.9.9p1/openbsd-compat/strmode.h 2001-06-09 12:22:17.000000000 +1000 @@ -1,7 +1,7 @@ -/* $Id: strmode.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */ +/* $Id: strmode.h,v 1.3 2001/06/09 02:22:17 mouring Exp $ */ #ifndef HAVE_STRMODE -void strmode( register mode_t mode, register char *p); +void strmode(register mode_t mode, register char *p); #endif Only in openssh-2.9p2/openbsd-compat: strtok.c Only in openssh-2.9p2/openbsd-compat: strtok.h Only in openssh-2.9p2/openbsd-compat: vis.c Only in openssh-2.9p2/openbsd-compat: vis.h diff -ru openssh-2.9p2/packet.c openssh-2.9.9p1/packet.c --- openssh-2.9p2/packet.c 2001-04-06 09:26:33.000000000 +1000 +++ openssh-2.9.9p1/packet.c 2001-07-04 13:32:32.000000000 +1000 @@ -13,7 +13,7 @@ * * * SSH2 packet format added by Markus Friedl. - * Copyright (c) 2000 Markus Friedl. All rights reserved. + * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -37,7 +37,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: packet.c,v 1.61 2001/04/05 10:42:51 markus Exp $"); +RCSID("$OpenBSD: packet.c,v 1.69 2001/06/25 08:25:38 markus Exp $"); #include "xmalloc.h" #include "buffer.h" @@ -75,12 +75,6 @@ static int connection_in = -1; static int connection_out = -1; -/* - * Cipher type. This value is only used to determine whether to pad the - * packets with zeroes or random data. - */ -static int cipher_type = SSH_CIPHER_NONE; - /* Protocol flags for the remote side. */ static u_int remote_protocol_flags = 0; @@ -118,20 +112,9 @@ /* Set to true if the connection is interactive. */ static int interactive_mode = 0; -/* True if SSH2 packet format is used */ -int use_ssh2_packet_format = 0; - /* Session key information for Encryption and MAC */ Newkeys *newkeys[MODE_MAX]; -void -packet_set_ssh2_format(void) -{ - DBG(debug("use_ssh2_packet_format")); - use_ssh2_packet_format = 1; - newkeys[MODE_IN] = newkeys[MODE_OUT] = NULL; -} - /* * Sets the descriptors used for communication. Disables encryption until * packet_set_encryption_key is called. @@ -144,9 +127,9 @@ fatal("packet_set_connection: cannot load cipher 'none'"); connection_in = fd_in; connection_out = fd_out; - cipher_type = SSH_CIPHER_NONE; cipher_init(&send_context, none, (u_char *) "", 0, NULL, 0); cipher_init(&receive_context, none, (u_char *) "", 0, NULL, 0); + newkeys[MODE_IN] = newkeys[MODE_OUT] = NULL; if (!initialized) { initialized = 1; buffer_init(&input); @@ -262,7 +245,6 @@ packet_set_protocol_flags(u_int protocol_flags) { remote_protocol_flags = protocol_flags; - channel_set_options((protocol_flags & SSH_PROTOFLAG_HOST_IN_FWD_OPEN) != 0); } /* Returns the remote protocol flags set earlier by the above function. */ @@ -278,8 +260,8 @@ * Level is compression level 1 (fastest) - 9 (slow, best) as in gzip. */ -void -packet_init_compression() +static void +packet_init_compression(void) { if (compression_buffer_ready == 1) return; @@ -290,7 +272,7 @@ void packet_start_compression(int level) { - if (packet_compression && !use_ssh2_packet_format) + if (packet_compression && !compat20) fatal("Compression already enabled."); packet_compression = 1; packet_init_compression(); @@ -299,43 +281,10 @@ } /* - * Encrypts the given number of bytes, copying from src to dest. bytes is - * known to be a multiple of 8. - */ - -void -packet_encrypt(CipherContext * cc, void *dest, void *src, - u_int bytes) -{ - cipher_encrypt(cc, dest, src, bytes); -} - -/* - * Decrypts the given number of bytes, copying from src to dest. bytes is - * known to be a multiple of 8. - */ - -void -packet_decrypt(CipherContext *context, void *dest, void *src, u_int bytes) -{ - /* - * Cryptographic attack detector for ssh - Modifications for packet.c - * (C)1998 CORE-SDI, Buenos Aires Argentina Ariel Futoransky(futo@core-sdi.com) - */ - if (!compat20 && - context->cipher->number != SSH_CIPHER_NONE && - detect_attack(src, bytes, NULL) == DEATTACK_DETECTED) - packet_disconnect("crc32 compensation attack: network attack detected"); - - cipher_decrypt(context, dest, src, bytes); -} - -/* * Causes any further packets to be encrypted using the given key. The same * key is used for both sending and reception. However, both directions are * encrypted independently of each other. */ - void packet_set_encryption_key(const u_char *key, u_int keylen, int number) @@ -349,61 +298,33 @@ cipher_init(&send_context, cipher, key, keylen, NULL, 0); } -/* Starts constructing a packet to send. */ - +/* Start constructing a packet to send. */ void -packet_start1(int type) +packet_start(u_char type) { - char buf[9]; + u_char buf[9]; + int len; - buffer_clear(&outgoing_packet); - memset(buf, 0, 8); - buf[8] = type; - buffer_append(&outgoing_packet, buf, 9); -} - -void -packet_start2(int type) -{ - char buf[4+1+1]; - - buffer_clear(&outgoing_packet); - memset(buf, 0, sizeof buf); - /* buf[0..3] = payload_len; */ - /* buf[4] = pad_len; */ - buf[5] = type & 0xff; - buffer_append(&outgoing_packet, buf, sizeof buf); -} - -void -packet_start(int type) -{ DBG(debug("packet_start[%d]", type)); - if (use_ssh2_packet_format) - packet_start2(type); - else - packet_start1(type); + len = compat20 ? 6 : 9; + memset(buf, 0, len - 1); + buf[len - 1] = type; + buffer_clear(&outgoing_packet); + buffer_append(&outgoing_packet, buf, len); } -/* Appends a character to the packet data. */ - +/* Append payload. */ void packet_put_char(int value) { char ch = value; buffer_append(&outgoing_packet, &ch, 1); } - -/* Appends an integer to the packet data. */ - void packet_put_int(u_int value) { buffer_put_int(&outgoing_packet, value); } - -/* Appends a string to packet data. */ - void packet_put_string(const char *buf, u_int len) { @@ -412,18 +333,13 @@ void packet_put_cstring(const char *str) { - buffer_put_string(&outgoing_packet, str, strlen(str)); + buffer_put_cstring(&outgoing_packet, str); } - void packet_put_raw(const char *buf, u_int len) { buffer_append(&outgoing_packet, buf, len); } - - -/* Appends an arbitrary precision integer to packet data. */ - void packet_put_bignum(BIGNUM * value) { @@ -440,7 +356,7 @@ * encrypts the packet before sending. */ -void +static void packet_send1(void) { char buf[8], *cp; @@ -468,7 +384,7 @@ /* Insert padding. Initialized to zero in packet_start1() */ padding = 8 - len % 8; - if (cipher_type != SSH_CIPHER_NONE) { + if (send_context.cipher->number != SSH_CIPHER_NONE) { cp = buffer_ptr(&outgoing_packet); for (i = 0; i < padding; i++) { if (i % 4 == 0) @@ -494,7 +410,7 @@ PUT_32BIT(buf, len); buffer_append(&output, buf, 4); buffer_append_space(&output, &cp, buffer_len(&outgoing_packet)); - packet_encrypt(&send_context, cp, buffer_ptr(&outgoing_packet), + cipher_encrypt(&send_context, cp, buffer_ptr(&outgoing_packet), buffer_len(&outgoing_packet)); #ifdef PACKET_DEBUG @@ -511,7 +427,7 @@ */ } -void +static void set_newkeys(int mode) { Enc *enc; @@ -564,16 +480,15 @@ /* * Finalize packet in SSH2 format (compress, mac, encrypt, enqueue) */ -void +static void packet_send2(void) { static u_int32_t seqnr = 0; - u_char *macbuf = NULL; + u_char type, *ucp, *macbuf = NULL; char *cp; u_int packet_length = 0; u_int i, padlen, len; u_int32_t rand = 0; - int type; Enc *enc = NULL; Mac *mac = NULL; Comp *comp = NULL; @@ -586,8 +501,8 @@ } block_size = enc ? enc->cipher->block_size : 8; - cp = buffer_ptr(&outgoing_packet); - type = cp[5] & 0xff; + ucp = (u_char *) buffer_ptr(&outgoing_packet); + type = ucp[5]; #ifdef PACKET_DEBUG fprintf(stderr, "plain: "); @@ -633,9 +548,9 @@ } /* packet_length includes payload, padding and padding length field */ packet_length = buffer_len(&outgoing_packet) - 4; - cp = buffer_ptr(&outgoing_packet); - PUT_32BIT(cp, packet_length); - cp[4] = padlen & 0xff; + ucp = (u_char *)buffer_ptr(&outgoing_packet); + PUT_32BIT(ucp, packet_length); + ucp[4] = padlen; DBG(debug("send: len %d (includes padlen %d)", packet_length+4, padlen)); /* compute MAC over seqnr and packet(length fields, payload, padding) */ @@ -647,7 +562,7 @@ } /* encrypt packet and append to output buffer. */ buffer_append_space(&output, &cp, buffer_len(&outgoing_packet)); - packet_encrypt(&send_context, cp, buffer_ptr(&outgoing_packet), + cipher_encrypt(&send_context, cp, buffer_ptr(&outgoing_packet), buffer_len(&outgoing_packet)); /* append unencrypted MAC */ if (mac && mac->enabled) @@ -668,7 +583,7 @@ void packet_send() { - if (use_ssh2_packet_format) + if (compat20) packet_send2(); else packet_send1(); @@ -699,7 +614,7 @@ for (;;) { /* Try to read a packet from the buffer. */ type = packet_read_poll(payload_len_ptr); - if (!use_ssh2_packet_format && ( + if (!compat20 && ( type == SSH_SMSG_SUCCESS || type == SSH_SMSG_FAILURE || type == SSH_CMSG_EOF @@ -768,12 +683,12 @@ * Check bytes */ -int +static int packet_read_poll1(int *payload_len_ptr) { u_int len, padded_len; - u_char *ucp; - char buf[8], *cp; + u_char *ucp, type; + char *cp; u_int checksum, stored_checksum; /* Check if input size is less than minimum packet size. */ @@ -795,10 +710,20 @@ /* Consume packet length. */ buffer_consume(&input, 4); - /* Copy data to incoming_packet. */ + /* + * Cryptographic attack detector for ssh + * (C)1998 CORE-SDI, Buenos Aires Argentina + * Ariel Futoransky(futo@core-sdi.com) + */ + if (receive_context.cipher->number != SSH_CIPHER_NONE && + detect_attack(buffer_ptr(&input), padded_len, NULL) == DEATTACK_DETECTED) + packet_disconnect("crc32 compensation attack: network attack detected"); + + /* Decrypt data to incoming_packet. */ buffer_clear(&incoming_packet); buffer_append_space(&incoming_packet, &cp, padded_len); - packet_decrypt(&receive_context, cp, buffer_ptr(&input), padded_len); + cipher_decrypt(&receive_context, cp, buffer_ptr(&input), padded_len); + buffer_consume(&input, padded_len); #ifdef PACKET_DEBUG @@ -814,7 +739,6 @@ buffer_consume(&incoming_packet, 8 - len % 8); /* Test check bytes. */ - if (len != buffer_len(&incoming_packet)) packet_disconnect("packet_read_poll: len %d != buffer_len %d.", len, buffer_len(&incoming_packet)); @@ -825,7 +749,6 @@ packet_disconnect("Corrupted check bytes on input."); buffer_consume_end(&incoming_packet, 4); - /* If using packet compression, decompress the packet. */ if (packet_compression) { buffer_clear(&compression_buffer); buffer_uncompress(&incoming_packet, &compression_buffer); @@ -833,26 +756,19 @@ buffer_append(&incoming_packet, buffer_ptr(&compression_buffer), buffer_len(&compression_buffer)); } - /* Get packet type. */ - buffer_get(&incoming_packet, &buf[0], 1); - - /* Return length of payload (without type field). */ + type = buffer_get_char(&incoming_packet); *payload_len_ptr = buffer_len(&incoming_packet); - - /* Return type. */ - return (u_char) buf[0]; + return type; } -int +static int packet_read_poll2(int *payload_len_ptr) { static u_int32_t seqnr = 0; static u_int packet_length = 0; u_int padlen, need; - u_char buf[8], *macbuf; - u_char *ucp; + u_char *macbuf, *ucp, type; char *cp; - int type; int maclen, block_size; Enc *enc = NULL; Mac *mac = NULL; @@ -875,7 +791,7 @@ return SSH_MSG_NONE; buffer_clear(&incoming_packet); buffer_append_space(&incoming_packet, &cp, block_size); - packet_decrypt(&receive_context, cp, buffer_ptr(&input), + cipher_decrypt(&receive_context, cp, buffer_ptr(&input), block_size); ucp = (u_char *) buffer_ptr(&incoming_packet); packet_length = GET_32BIT(ucp); @@ -904,7 +820,7 @@ buffer_dump(&input); #endif buffer_append_space(&incoming_packet, &cp, need); - packet_decrypt(&receive_context, cp, buffer_ptr(&input), need); + cipher_decrypt(&receive_context, cp, buffer_ptr(&input), need); buffer_consume(&input, need); /* * compute MAC over seqnr and packet, @@ -924,7 +840,7 @@ /* get padlen */ cp = buffer_ptr(&incoming_packet) + 4; - padlen = *cp & 0xff; + padlen = (u_char) *cp; DBG(debug("input: padlen %d", padlen)); if (padlen < 4) packet_disconnect("Corrupted padlen %d on input.", padlen); @@ -946,37 +862,30 @@ * get packet type, implies consume. * return length of payload (without type field) */ - buffer_get(&incoming_packet, (char *)&buf[0], 1); - *payload_len_ptr = buffer_len(&incoming_packet); - - /* reset for next packet */ - packet_length = 0; - - /* extract packet type */ - type = (u_char)buf[0]; - + type = buffer_get_char(&incoming_packet); if (type == SSH2_MSG_NEWKEYS) set_newkeys(MODE_IN); - + *payload_len_ptr = buffer_len(&incoming_packet); #ifdef PACKET_DEBUG fprintf(stderr, "read/plain[%d]:\r\n", type); buffer_dump(&incoming_packet); #endif - return (u_char)type; + /* reset for next packet */ + packet_length = 0; + return type; } int packet_read_poll(int *payload_len_ptr) { + int reason; + u_char type; char *msg; + for (;;) { - int type = use_ssh2_packet_format ? - packet_read_poll2(payload_len_ptr): - packet_read_poll1(payload_len_ptr); - - if(compat20) { - int reason; - if (type != 0) + if (compat20) { + type = packet_read_poll2(payload_len_ptr); + if (type) DBG(debug("received packet type %d", type)); switch(type) { case SSH2_MSG_IGNORE: @@ -1002,6 +911,7 @@ break; } } else { + type = packet_read_poll1(payload_len_ptr); switch(type) { case SSH_MSG_IGNORE: break; @@ -1018,7 +928,7 @@ xfree(msg); break; default: - if (type != 0) + if (type) DBG(debug("received packet type %d", type)); return type; break; @@ -1169,13 +1079,13 @@ packet_put_cstring(""); } else { packet_start(SSH_MSG_DISCONNECT); - packet_put_string(buf, strlen(buf)); + packet_put_cstring(buf); } packet_send(); packet_write_wait(); /* Stop listening for connections. */ - channel_stop_listening(); + channel_close_all(); /* Close the connection. */ packet_close(); @@ -1322,7 +1232,7 @@ log("packet_set_maxsize: bad size %d", s); return -1; } - log("packet_set_maxsize: setting to %d", s); + debug("packet_set_maxsize: setting to %d", s); max_packet_size = s; return s; } @@ -1345,7 +1255,7 @@ int blocksize, padlen, have, need, nb, mini, nbytes; Enc *enc = NULL; - if (use_ssh2_packet_format == 0) + if (compat20 == 0) return; have = buffer_len(&outgoing_packet); diff -ru openssh-2.9p2/packet.h openssh-2.9.9p1/packet.h --- openssh-2.9p2/packet.h 2001-04-15 09:13:03.000000000 +1000 +++ openssh-2.9.9p1/packet.h 2001-07-04 14:46:58.000000000 +1000 @@ -11,187 +11,75 @@ * called by a name other than "ssh" or "Secure Shell". */ -/* RCSID("$OpenBSD: packet.h,v 1.22 2001/04/14 16:33:20 stevesk Exp $"); */ +/* RCSID("$OpenBSD: packet.h,v 1.25 2001/06/26 17:27:24 markus Exp $"); */ #ifndef PACKET_H #define PACKET_H #include -/* - * Sets the socket used for communication. Disables encryption until - * packet_set_encryption_key is called. It is permissible that fd_in and - * fd_out are the same descriptor; in that case it is assumed to be a socket. - */ -void packet_set_connection(int fd_in, int fd_out); - -/* Puts the connection file descriptors into non-blocking mode. */ -void packet_set_nonblocking(void); - -/* Returns the file descriptor used for input. */ -int packet_get_connection_in(void); - -/* Returns the file descriptor used for output. */ -int packet_get_connection_out(void); - -/* - * Closes the connection (both descriptors) and clears and frees internal - * data structures. - */ -void packet_close(void); - -/* - * Causes any further packets to be encrypted using the given key. The same - * key is used for both sending and reception. However, both directions are - * encrypted independently of each other. Cipher types are defined in ssh.h. - */ -void -packet_set_encryption_key(const u_char *key, u_int keylen, - int cipher_type); - -/* - * Sets remote side protocol flags for the current connection. This can be - * called at any time. - */ -void packet_set_protocol_flags(u_int flags); - -/* Returns the remote protocol flags set earlier by the above function. */ -u_int packet_get_protocol_flags(void); - -/* Enables compression in both directions starting from the next packet. */ -void packet_start_compression(int level); - -/* - * Informs that the current session is interactive. Sets IP flags for - * optimal performance in interactive use. - */ -void packet_set_interactive(int interactive); - -/* Returns true if the current connection is interactive. */ -int packet_is_interactive(void); - -/* Starts constructing a packet to send. */ -void packet_start(int type); - -/* Appends a character to the packet data. */ -void packet_put_char(int ch); - -/* Appends an integer to the packet data. */ -void packet_put_int(u_int value); - -/* Appends an arbitrary precision integer to packet data. */ -void packet_put_bignum(BIGNUM * value); -void packet_put_bignum2(BIGNUM * value); - -/* Appends a string to packet data. */ -void packet_put_string(const char *buf, u_int len); -void packet_put_cstring(const char *str); -void packet_put_raw(const char *buf, u_int len); - -/* - * Finalizes and sends the packet. If the encryption key has been set, - * encrypts the packet before sending. - */ -void packet_send(void); - -/* Waits until a packet has been received, and returns its type. */ -int packet_read(int *payload_len_ptr); - -/* - * Waits until a packet has been received, verifies that its type matches - * that given, and gives a fatal error and exits if there is a mismatch. - */ -void packet_read_expect(int *payload_len_ptr, int type); - -/* - * Checks if a full packet is available in the data received so far via - * packet_process_incoming. If so, reads the packet; otherwise returns - * SSH_MSG_NONE. This does not wait for data from the connection. - * SSH_MSG_DISCONNECT is handled specially here. Also, SSH_MSG_IGNORE - * messages are skipped by this function and are never returned to higher - * levels. - */ -int packet_read_poll(int *packet_len_ptr); - -/* - * Buffers the given amount of input characters. This is intended to be used - * together with packet_read_poll. - */ -void packet_process_incoming(const char *buf, u_int len); - -/* Returns a character (0-255) from the packet data. */ -u_int packet_get_char(void); - -/* Returns an integer from the packet data. */ -u_int packet_get_int(void); - -/* - * Returns an arbitrary precision integer from the packet data. The integer - * must have been initialized before this call. - */ -void packet_get_bignum(BIGNUM * value, int *length_ptr); -void packet_get_bignum2(BIGNUM * value, int *length_ptr); +void packet_set_connection(int, int); +void packet_set_nonblocking(void); +int packet_get_connection_in(void); +int packet_get_connection_out(void); +void packet_close(void); +void packet_set_encryption_key(const u_char *, u_int, int); +void packet_set_protocol_flags(u_int); +u_int packet_get_protocol_flags(void); +void packet_start_compression(int); +void packet_set_interactive(int); +int packet_is_interactive(void); + +void packet_start(u_char); +void packet_put_char(int ch); +void packet_put_int(u_int value); +void packet_put_bignum(BIGNUM * value); +void packet_put_bignum2(BIGNUM * value); +void packet_put_string(const char *buf, u_int len); +void packet_put_cstring(const char *str); +void packet_put_raw(const char *buf, u_int len); +void packet_send(void); + +int packet_read(int *payload_len_ptr); +void packet_read_expect(int *payload_len_ptr, int type); +int packet_read_poll(int *packet_len_ptr); +void packet_process_incoming(const char *buf, u_int len); + +u_int packet_get_char(void); +u_int packet_get_int(void); +void packet_get_bignum(BIGNUM * value, int *length_ptr); +void packet_get_bignum2(BIGNUM * value, int *length_ptr); char *packet_get_raw(int *length_ptr); +char *packet_get_string(u_int *length_ptr); +void packet_disconnect(const char *fmt,...) __attribute__((format(printf, 1, 2))); +void packet_send_debug(const char *fmt,...) __attribute__((format(printf, 1, 2))); + +void packet_write_poll(void); +void packet_write_wait(void); +int packet_have_data_to_write(void); +int packet_not_very_much_data_to_write(void); + +int packet_connection_is_on_socket(void); +int packet_connection_is_ipv4(void); +int packet_remaining(void); +void packet_send_ignore(int); +void packet_inject_ignore(int); -/* - * Returns a string from the packet data. The string is allocated using - * xmalloc; it is the responsibility of the calling program to free it when - * no longer needed. The length_ptr argument may be NULL, or point to an - * integer into which the length of the string is stored. - */ -char *packet_get_string(u_int *length_ptr); - -/* - * Logs the error in syslog using LOG_INFO, constructs and sends a disconnect - * packet, closes the connection, and exits. This function never returns. - * The error message should not contain a newline. The total length of the - * message must not exceed 1024 bytes. - */ -void packet_disconnect(const char *fmt,...) __attribute__((format(printf, 1, 2))); - -/* - * Sends a diagnostic message to the other side. This message can be sent at - * any time (but not while constructing another message). The message is - * printed immediately, but only if the client is being executed in verbose - * mode. These messages are primarily intended to ease debugging - * authentication problems. The total length of the message must not exceed - * 1024 bytes. This will automatically call packet_write_wait. If the - * remote side protocol flags do not indicate that it supports SSH_MSG_DEBUG, - * this will do nothing. - */ -void packet_send_debug(const char *fmt,...) __attribute__((format(printf, 1, 2))); - -/* Checks if there is any buffered output, and tries to write some of the output. */ -void packet_write_poll(void); - -/* Waits until all pending output data has been written. */ -void packet_write_wait(void); - -/* Returns true if there is buffered data to write to the connection. */ -int packet_have_data_to_write(void); +void tty_make_modes(int, struct termios *); +void tty_parse_modes(int, int *); -/* Returns true if there is not too much data to write to the connection. */ -int packet_not_very_much_data_to_write(void); - -/* maximum packet size, requested by client with SSH_CMSG_MAX_PACKET_SIZE */ extern int max_packet_size; -int packet_set_maxsize(int s); -#define packet_get_maxsize() max_packet_size - -/* Stores tty modes from the fd or tiop into current packet. */ -void tty_make_modes(int fd, struct termios *tiop); - -/* Parses tty modes for the fd from the current packet. */ -void tty_parse_modes(int fd, int *n_bytes_ptr); +int packet_set_maxsize(int); +#define packet_get_maxsize() max_packet_size #define packet_integrity_check(payload_len, expected_len, type) \ do { \ - int _p = (payload_len), _e = (expected_len); \ - if (_p != _e) { \ - log("Packet integrity error (%d != %d) at %s:%d", \ - _p, _e, __FILE__, __LINE__); \ - packet_disconnect("Packet integrity error. (%d)", (type)); \ - } \ + int _p = (payload_len), _e = (expected_len); \ + if (_p != _e) { \ + log("Packet integrity error (%d != %d) at %s:%d", \ + _p, _e, __FILE__, __LINE__); \ + packet_disconnect("Packet integrity error. (%d)", (type)); \ + } \ } while (0) #define packet_done() \ @@ -204,20 +92,4 @@ } \ } while (0) -/* remote host is connected via a socket/ipv4 */ -int packet_connection_is_on_socket(void); -int packet_connection_is_ipv4(void); - -/* enable SSH2 packet format */ -void packet_set_ssh2_format(void); - -/* returns remaining payload bytes */ -int packet_remaining(void); - -/* append an ignore message */ -void packet_send_ignore(int nbytes); - -/* add an ignore message and make sure size (current+ignore) = n*sumlen */ -void packet_inject_ignore(int sumlen); - #endif /* PACKET_H */ diff -ru openssh-2.9p2/pathnames.h openssh-2.9.9p1/pathnames.h --- openssh-2.9p2/pathnames.h 2001-04-13 09:34:35.000000000 +1000 +++ openssh-2.9.9p1/pathnames.h 2001-06-28 10:13:48.000000000 +1000 @@ -1,4 +1,4 @@ -/* $OpenBSD: pathnames.h,v 1.5 2001/04/12 19:15:24 markus Exp $ */ +/* $OpenBSD: pathnames.h,v 1.9 2001/06/23 02:34:30 markus Exp $ */ /* * Author: Tatu Ylonen @@ -25,6 +25,7 @@ * world-readable. */ #define _PATH_SSH_SYSTEM_HOSTFILE ETCDIR "/ssh_known_hosts" +/* backward compat for protocol 2 */ #define _PATH_SSH_SYSTEM_HOSTFILE2 ETCDIR "/ssh_known_hosts2" /* @@ -36,6 +37,8 @@ #define _PATH_HOST_KEY_FILE ETCDIR "/ssh_host_key" #define _PATH_HOST_DSA_KEY_FILE ETCDIR "/ssh_host_dsa_key" #define _PATH_HOST_RSA_KEY_FILE ETCDIR "/ssh_host_rsa_key" +#define _PATH_DH_MODULI ETCDIR "/moduli" +/* Backwards compatibility */ #define _PATH_DH_PRIMES ETCDIR "/primes" #ifndef _PATH_SSH_PROGRAM @@ -60,6 +63,7 @@ * contain anything particularly secret. */ #define _PATH_SSH_USER_HOSTFILE "~/.ssh/known_hosts" +/* backward compat for protocol 2 */ #define _PATH_SSH_USER_HOSTFILE2 "~/.ssh/known_hosts2" /* @@ -87,6 +91,8 @@ * running as root.) */ #define _PATH_SSH_USER_PERMITTED_KEYS ".ssh/authorized_keys" + +/* backward compat for protocol v2 */ #define _PATH_SSH_USER_PERMITTED_KEYS2 ".ssh/authorized_keys2" /* @@ -112,6 +118,11 @@ #define _PATH_SSH_ASKPASS_DEFAULT "/usr/X11R6/bin/ssh-askpass" #endif +/* xauth for X11 forwarding */ +#ifndef _PATH_XAUTH +#define _PATH_XAUTH "/usr/X11R6/bin/xauth" +#endif + /* for scp */ #ifndef _PATH_CP #define _PATH_CP "cp" @@ -148,4 +159,3 @@ #ifndef SSH_PRNG_COMMAND_FILE # define SSH_PRNG_COMMAND_FILE ETCDIR "/ssh_prng_cmds" #endif /* SSH_PRNG_COMMAND_FILE */ - Only in openssh-2.9p2: primes diff -ru openssh-2.9p2/radix.c openssh-2.9.9p1/radix.c --- openssh-2.9p2/radix.c 2001-01-18 13:04:35.000000000 +1100 +++ openssh-2.9.9p1/radix.c 2001-06-25 15:01:25.000000000 +1000 @@ -25,11 +25,13 @@ #include "includes.h" #include "uuencode.h" -RCSID("$OpenBSD: radix.c,v 1.15 2001/01/16 23:58:09 deraadt Exp $"); +RCSID("$OpenBSD: radix.c,v 1.16 2001/06/23 15:12:19 itojun Exp $"); #ifdef AFS #include +#include + typedef u_char my_u_char; typedef u_int my_u_int32_t; typedef u_short my_u_short; diff -ru openssh-2.9p2/radix.h openssh-2.9.9p1/radix.h --- openssh-2.9p2/radix.h 2001-01-29 18:39:26.000000000 +1100 +++ openssh-2.9.9p1/radix.h 2001-07-04 14:46:58.000000000 +1000 @@ -1,4 +1,4 @@ -/* $OpenBSD: radix.h,v 1.2 2001/01/29 01:58:17 niklas Exp $ */ +/* $OpenBSD: radix.h,v 1.4 2001/06/26 17:27:24 markus Exp $ */ /* * Copyright (c) 1999 Dug Song. All rights reserved. @@ -24,5 +24,5 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -int creds_to_radix(CREDENTIALS * creds, u_char *buf, size_t buflen); -int radix_to_creds(const char *buf, CREDENTIALS * creds); +int creds_to_radix(CREDENTIALS *, u_char *, size_t); +int radix_to_creds(const char *, CREDENTIALS *); diff -ru openssh-2.9p2/readconf.c openssh-2.9.9p1/readconf.c --- openssh-2.9p2/readconf.c 2001-04-18 04:11:37.000000000 +1000 +++ openssh-2.9.9p1/readconf.c 2001-09-20 10:57:56.000000000 +1000 @@ -12,7 +12,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: readconf.c,v 1.76 2001/04/17 10:53:25 markus Exp $"); +RCSID("$OpenBSD: readconf.c,v 1.90 2001/09/19 19:24:18 stevesk Exp $"); #include "ssh.h" #include "xmalloc.h" @@ -96,11 +96,14 @@ oForwardAgent, oForwardX11, oGatewayPorts, oRhostsAuthentication, oPasswordAuthentication, oRSAAuthentication, oFallBackToRsh, oUseRsh, oChallengeResponseAuthentication, oXAuthLocation, -#ifdef KRB4 +#if defined(KRB4) || defined(KRB5) oKerberosAuthentication, -#endif /* KRB4 */ +#endif +#if defined(AFS) || defined(KRB5) + oKerberosTgtPassing, +#endif #ifdef AFS - oKerberosTgtPassing, oAFSTokenPassing, + oAFSTokenPassing, #endif oIdentityFile, oHostName, oPort, oCipher, oRemoteForward, oLocalForward, oUser, oHost, oEscapeChar, oRhostsRSAAuthentication, oProxyCommand, @@ -111,7 +114,8 @@ oGlobalKnownHostsFile2, oUserKnownHostsFile2, oPubkeyAuthentication, oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias, oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication, - oHostKeyAlgorithms + oHostKeyAlgorithms, oBindAddress, oSmartcardDevice, + oClearAllForwardings } OpCodes; /* Textual representations of the tokens. */ @@ -137,11 +141,13 @@ { "challengeresponseauthentication", oChallengeResponseAuthentication }, { "skeyauthentication", oChallengeResponseAuthentication }, /* alias */ { "tisauthentication", oChallengeResponseAuthentication }, /* alias */ -#ifdef KRB4 +#if defined(KRB4) || defined(KRB5) { "kerberosauthentication", oKerberosAuthentication }, -#endif /* KRB4 */ -#ifdef AFS +#endif +#if defined(AFS) || defined(KRB5) { "kerberostgtpassing", oKerberosTgtPassing }, +#endif +#ifdef AFS { "afstokenpassing", oAFSTokenPassing }, #endif { "fallbacktorsh", oFallBackToRsh }, @@ -162,9 +168,9 @@ { "host", oHost }, { "escapechar", oEscapeChar }, { "globalknownhostsfile", oGlobalKnownHostsFile }, - { "userknownhostsfile", oUserKnownHostsFile }, + { "userknownhostsfile", oUserKnownHostsFile }, /* obsolete */ { "globalknownhostsfile2", oGlobalKnownHostsFile2 }, - { "userknownhostsfile2", oUserKnownHostsFile2 }, + { "userknownhostsfile2", oUserKnownHostsFile2 }, /* obsolete */ { "connectionattempts", oConnectionAttempts }, { "batchmode", oBatchMode }, { "checkhostip", oCheckHostIP }, @@ -177,6 +183,9 @@ { "dynamicforward", oDynamicForward }, { "preferredauthentications", oPreferredAuthentications }, { "hostkeyalgorithms", oHostKeyAlgorithms }, + { "bindaddress", oBindAddress }, + { "smartcarddevice", oSmartcardDevice }, + { "clearallforwardings", oClearAllForwardings }, { NULL, 0 } }; @@ -222,6 +231,19 @@ fwd->host_port = host_port; } +static void +clear_forwardings(Options *options) +{ + int i; + + for (i = 0; i < options->num_local_forwards; i++) + xfree(options->local_forwards[i].host); + options->num_local_forwards = 0; + for (i = 0; i < options->num_remote_forwards; i++) + xfree(options->remote_forwards[i].host); + options->num_remote_forw