summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--TODO2
-rw-r--r--acconfig.h3
-rw-r--r--configure.in448
-rw-r--r--ssh.c6
-rw-r--r--sshd.c3
6 files changed, 251 insertions, 219 deletions
diff --git a/ChangeLog b/ChangeLog
index a53f4367f..e118a3364 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
120000302
2 - Big cleanup of autoconf code
3 - Rearranged to be a little more logical
4 - Added -R option for Solaris
5 - Rewrote OpenSSL detection code. Now uses AC_TRY_RUN with a test program
6 to detect library and header location _and_ ensure library has proper
7 RSA support built in (this is a problem with OpenSSL 0.9.5).
8
120000207 920000207
2 - Removed SOCKS code. Will support through a ProxyCommand. 10 - Removed SOCKS code. Will support through a ProxyCommand.
3 11
diff --git a/TODO b/TODO
index 4a92ad995..bf05334b9 100644
--- a/TODO
+++ b/TODO
@@ -10,3 +10,5 @@
10- Move all compatability cruft (bsd-*, fake-*) into subordinate library 10- Move all compatability cruft (bsd-*, fake-*) into subordinate library
11 11
12- Cleanup configure.in 12- Cleanup configure.in
13
14- A good source of strong random numbers. Waiting on a Yarrow port.
diff --git a/acconfig.h b/acconfig.h
index e96b195dc..9af1117c7 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -6,9 +6,6 @@
6 6
7@TOP@ 7@TOP@
8 8
9/* SSL directory. */
10#undef ssldir
11
12/* Define if you want to disable PAM support */ 9/* Define if you want to disable PAM support */
13#undef DISABLE_PAM 10#undef DISABLE_PAM
14 11
diff --git a/configure.in b/configure.in
index f2128d7f1..1cb46525c 100644
--- a/configure.in
+++ b/configure.in
@@ -3,7 +3,11 @@ AC_INIT(ssh.c)
3AC_CONFIG_HEADER(config.h) 3AC_CONFIG_HEADER(config.h)
4AC_CANONICAL_HOST 4AC_CANONICAL_HOST
5 5
6dnl Checks for programs. 6# C Compiler features
7if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi
8AC_C_INLINE
9
10# Checks for programs.
7AC_PROG_CC 11AC_PROG_CC
8AC_PROG_CPP 12AC_PROG_CPP
9AC_PROG_RANLIB 13AC_PROG_RANLIB
@@ -12,78 +16,7 @@ AC_CHECK_PROG(AR, ar, ar)
12AC_PATH_PROG(PERL, perl) 16AC_PATH_PROG(PERL, perl)
13AC_SUBST(PERL) 17AC_SUBST(PERL)
14 18
15AC_ARG_WITH(rsh, 19# Check for some target-specific stuff
16 [ --with-rsh=PATH Specify path to remote shell program ],
17 [
18 if test "x$withval" != "$xno" ; then
19 AC_DEFINE_UNQUOTED(RSH_PATH, "$withval")
20 fi
21 ],
22 [
23 AC_PATH_PROG(rsh_path, rsh)
24 ]
25)
26
27AC_ARG_WITH(xauth,
28 [ --with-xauth=PATH Specify path to xauth program ],
29 [
30 if test "x$withval" != "$xno" ; then
31 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$withval")
32 fi
33 ],
34 [
35 AC_PATH_PROG(xauth_path, xauth)
36 if test ! -z "$xauth_path" -a -x "/usr/openwin/bin/xauth" ; then
37 xauth_path="/usr/openwin/bin/xauth"
38 fi
39 ]
40)
41
42if test ! -z "$xauth_path" ; then
43 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
44fi
45if test ! -z "$rsh_path" ; then
46 AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path")
47fi
48
49if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi
50
51AC_C_INLINE
52
53AC_ARG_WITH(ssl-dir,
54 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
55 [
56 if test "x$withval" != "$xno" ; then
57 ssldir=$withval
58 fi
59 ]
60)
61
62AC_MSG_CHECKING([for OpenSSL/SSLeay directory])
63for ssldir in $ssldir $prefix /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local $prefix /usr/pkg ; do
64 if test -f "$ssldir/include/openssl/crypto.h"; then
65 AC_DEFINE(HAVE_OPENSSL)
66 GOT_SSL="yes"
67 break
68 fi
69 if test -f "$ssldir/include/ssl/crypto.h"; then
70 AC_DEFINE(HAVE_SSL)
71 GOT_SSL="yes"
72 break
73 fi
74done
75if test -z "$GOT_SSL" ; then
76 AC_MSG_ERROR([Could not find SSLeay / OpenSSL libraries, please install])
77fi
78AC_SUBST(ssldir)
79AC_DEFINE_UNQUOTED(ssldir, "$ssldir")
80if test "$ssldir" != "/usr"; then
81 CFLAGS="$CFLAGS -I$ssldir/include"
82 LDFLAGS="$LDFLAGS -L$ssldir/lib"
83fi
84AC_MSG_RESULT($ssldir)
85
86dnl Check for some target-specific stuff
87case "$host" in 20case "$host" in
88*-*-aix*) 21*-*-aix*)
89 AFS_LIBS="-lld" 22 AFS_LIBS="-lld"
@@ -124,11 +57,10 @@ case "$host" in
124 no_dev_ptmx=1 57 no_dev_ptmx=1
125 ;; 58 ;;
126*-*-netbsd*) 59*-*-netbsd*)
127 if test "$GOT_SSL" = "yes"; then 60 need_dash_r=1
128 LDFLAGS="$LDFLAGS -R$ssldir/lib"
129 fi
130 ;; 61 ;;
131*-*-solaris*) 62*-*-solaris*)
63 need_dash_r=1
132 AC_DEFINE(USE_UTMPX) 64 AC_DEFINE(USE_UTMPX)
133 ;; 65 ;;
134*-*-sysv*) 66*-*-sysv*)
@@ -139,17 +71,7 @@ case "$host" in
139 ;; 71 ;;
140esac 72esac
141 73
142dnl Check for RSAref library. 74# Checks for libraries.
143AC_MSG_CHECKING([for RSAref library])
144saved_LIBS="$LIBS"
145LIBS="$saved_LIBS -lRSAglue -lrsaref"
146AC_TRY_LINK([], [],
147[AC_MSG_RESULT(yes);
148 AC_DEFINE(RSAREF)],
149[AC_MSG_RESULT(no)]; LIBS="$saved_LIBS")
150
151dnl Checks for libraries.
152AC_CHECK_LIB(crypto, CRYPTO_lock, ,AC_MSG_ERROR([*** libcrypto missing - please install first ***]))
153AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***])) 75AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
154AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil") 76AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
155 77
@@ -160,10 +82,10 @@ if test -z "$no_libnsl" ; then
160 AC_CHECK_LIB(socket, main, , ) 82 AC_CHECK_LIB(socket, main, , )
161fi 83fi
162 84
163dnl Checks for header files. 85# Checks for header files.
164AC_CHECK_HEADERS(bstring.h endian.h lastlog.h login.h maillock.h netdb.h netgroup.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/select.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h stddef.h util.h utmp.h utmpx.h) 86AC_CHECK_HEADERS(bstring.h endian.h lastlog.h login.h maillock.h netdb.h netgroup.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/select.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h stddef.h util.h utmp.h utmpx.h)
165 87
166dnl Checks for library functions. 88# Checks for library functions.
167AC_CHECK_FUNCS(arc4random bindresvport_af freeaddrinfo gai_strerror getaddrinfo getpagesize getnameinfo innetgr md5_crypt mkdtemp openpty rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf _getpty) 89AC_CHECK_FUNCS(arc4random bindresvport_af freeaddrinfo gai_strerror getaddrinfo getpagesize getnameinfo innetgr md5_crypt mkdtemp openpty rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf _getpty)
168 90
169AC_CHECK_FUNC(login, 91AC_CHECK_FUNC(login,
@@ -176,14 +98,114 @@ AC_CHECK_FUNC(daemon,
176 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])] 98 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
177) 99)
178 100
179dnl Checks for data types 101AC_ARG_WITH(pam,
102 [ --without-pam Disable PAM support ],
103 [
104 if test "x$withval" = "xno" ; then
105 no_pam=1
106 AC_DEFINE(DISABLE_PAM)
107 fi
108 ]
109)
110if test -z "$no_pam" -a "x$ac_cv_header_security_pam_appl_h" = "xyes" ; then
111 AC_CHECK_LIB(dl, dlopen, , )
112 LIBS="$LIBS -lpam"
113
114 # Check PAM strerror arguments (old PAM)
115 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
116 AC_TRY_COMPILE(
117 [
118 #include <stdlib.h>
119 #include <security/pam_appl.h>
120 ],
121 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
122 [AC_MSG_RESULT(no)],
123 [
124 AC_DEFINE(HAVE_OLD_PAM)
125 AC_MSG_RESULT(yes)
126 ]
127 )
128fi
129
130# The big search for OpenSSL
131AC_ARG_WITH(ssl-dir,
132 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
133 [
134 if test "x$withval" != "$xno" ; then
135 tryssldir=$withval
136 fi
137 ]
138)
139
140saved_LIBS="$LIBS"
141saved_CFLAGS="$CFLAGS"
142if test "x$prefix" != "xNONE" ; then
143 tryssldir="$tryssldir $prefix"
144fi
145AC_MSG_CHECKING([for OpenSSL/SSLeay directory])
146for ssldir in "" $tryssldir /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
147 if test ! -z "$ssldir" ; then
148 LIBS="$saved_LIBS -L$ssldir"
149 CFLAGS="$CFLAGS -I$ssldir/include"
150 if test "x$need_dash_r" = "x1" ; then
151 LIBS="$LIBS -R$ssldir"
152 fi
153 fi
154 LIBS="$LIBS -lcrypto"
155
156 AC_TRY_RUN(
157 [
158 #include <openssl/rsa.h>
159 #include <openssl/bn.h>
160 #include <openssl/sha.h>
161 int main(void)
162 {RSA *key;key=RSA_generate_key(32,3,NULL,NULL);return(key==NULL);}
163 ],
164 [
165 AC_DEFINE(HAVE_OPENSSL)
166 found_crypto=1
167 break;
168 ], []
169 )
170 AC_TRY_RUN(
171 [
172 #include <ssl/rsa.h>
173 #include <ssl/bn.h>
174 #include <ssl/sha.h>
175 int main(void)
176 {RSA *key;key=RSA_generate_key(32,3,NULL,NULL);return(key==NULL);}
177 ],
178 [
179 AC_DEFINE(HAVE_SSL)
180 found_crypto=1
181 break;
182 ], []
183 )
184done
185
186if test -z "$found_crypto" ; then
187 AC_MSG_ERROR([Could not find working SSLeay / OpenSSL libraries, please install])
188fi
189if test -z "$ssldir" ; then
190 ssldir="(system)"
191else
192 CFLAGS="$CFLAGS -I$ssldir/include"
193 LDFLAGS="$LDFLAGS -L$ssldir/lib"
194 if test "x$need_dash_r" = "x1" ; then
195 LDFLAGS="$LDFLAGS -R$ssldir"
196 fi
197fi
198LIBS="$saved_LIBS -lcrypto"
199AC_MSG_RESULT($ssldir)
200
201# Checks for data types
180AC_CHECK_SIZEOF(char, 1) 202AC_CHECK_SIZEOF(char, 1)
181AC_CHECK_SIZEOF(short int, 2) 203AC_CHECK_SIZEOF(short int, 2)
182AC_CHECK_SIZEOF(int, 4) 204AC_CHECK_SIZEOF(int, 4)
183AC_CHECK_SIZEOF(long int, 4) 205AC_CHECK_SIZEOF(long int, 4)
184AC_CHECK_SIZEOF(long long int, 8) 206AC_CHECK_SIZEOF(long long int, 8)
185 207
186dnl More checks for data types 208# More checks for data types
187AC_MSG_CHECKING([for intXX_t types]) 209AC_MSG_CHECKING([for intXX_t types])
188AC_TRY_COMPILE( 210AC_TRY_COMPILE(
189 [#include <sys/types.h>], 211 [#include <sys/types.h>],
@@ -316,89 +338,7 @@ AC_TRY_COMPILE(
316 [AC_MSG_RESULT(no)] 338 [AC_MSG_RESULT(no)]
317) 339)
318 340
319AC_ARG_WITH(pam, 341# Checks for structure members
320 [ --without-pam Disable PAM support ],
321 [
322 if test "x$withval" = "xno" ; then
323 no_pam=1
324 AC_DEFINE(DISABLE_PAM)
325 fi
326 ]
327)
328
329if test -z "$no_pam" -a "x$ac_cv_header_security_pam_appl_h" = "xyes" ; then
330 AC_CHECK_LIB(dl, dlopen, , )
331 LIBS="$LIBS -lpam"
332 dnl Check PAM strerror arguments
333 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
334 AC_TRY_COMPILE(
335 [
336 #include <stdlib.h>
337 #include <security/pam_appl.h>
338 ],
339 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
340 [AC_MSG_RESULT(no)],
341 [
342 AC_DEFINE(HAVE_OLD_PAM)
343 AC_MSG_RESULT(yes)
344 ]
345 )
346fi
347
348AC_MSG_CHECKING([whether to build GNOME ssh-askpass])
349dnl Check whether user wants GNOME ssh-askpass
350AC_ARG_WITH(gnome-askpass,
351 [ --with-gnome-askpass Build the GNOME passphrase requester (default=no)],
352 [
353 if test x$withval = xno ; then
354 GNOME_ASKPASS="";
355 else
356 GNOME_ASKPASS="gnome-ssh-askpass";
357 fi
358 ])
359AC_SUBST(GNOME_ASKPASS)
360
361if test -z "$GNOME_ASKPASS" ; then
362 AC_MSG_RESULT(no)
363else
364 AC_MSG_RESULT(yes)
365fi
366
367dnl Check for user-specified random device
368AC_ARG_WITH(random,
369 [ --with-random=FILE read randomness from FILE (default=/dev/urandom)],
370 [
371 RANDOM_POOL="$withval";
372 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
373 ],
374 [
375 dnl Check for random device
376 AC_CHECK_FILE("/dev/urandom",
377 [
378 RANDOM_POOL="/dev/urandom";
379 AC_SUBST(RANDOM_POOL)
380 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
381 ]
382 )
383 ]
384)
385
386dnl Check for EGD pool file
387AC_ARG_WITH(egd-pool,
388 [ --with-egd-pool=FILE read randomness from EGD pool FILE (default none)],
389 [
390 RANDOM_POOL="$withval";
391 AC_DEFINE(HAVE_EGD)
392 AC_SUBST(RANDOM_POOL)
393 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
394 ]
395)
396
397dnl Make sure we have random number support
398if test -z "$RANDOM_POOL" -a -z "$EGD_POOL"; then
399 AC_MSG_ERROR([No random device found, and no EGD random pool specified])
400fi
401
402AC_MSG_CHECKING([whether utmp.h has ut_host field]) 342AC_MSG_CHECKING([whether utmp.h has ut_host field])
403AC_EGREP_HEADER(ut_host, utmp.h, 343AC_EGREP_HEADER(ut_host, utmp.h,
404 [AC_DEFINE(HAVE_HOST_IN_UTMP) AC_MSG_RESULT(yes); ], 344 [AC_DEFINE(HAVE_HOST_IN_UTMP) AC_MSG_RESULT(yes); ],
@@ -482,7 +422,60 @@ AC_TRY_COMPILE(
482 [AC_MSG_RESULT(no)] 422 [AC_MSG_RESULT(no)]
483) 423)
484 424
485dnl Look for lastlog location 425AC_MSG_CHECKING([whether libc defines __progname])
426AC_TRY_LINK([],
427 [extern char *__progname; printf("%s", __progname);],
428 [
429 AC_DEFINE(HAVE___PROGNAME)
430 AC_MSG_RESULT(yes)
431 ],
432 [
433 AC_MSG_RESULT(no)
434 ]
435)
436
437# Looking for programs, paths and files
438AC_ARG_WITH(rsh,
439 [ --with-rsh=PATH Specify path to remote shell program ],
440 [
441 if test "x$withval" != "$xno" ; then
442 AC_DEFINE_UNQUOTED(RSH_PATH, "$withval")
443 fi
444 ],
445 [
446 AC_PATH_PROG(rsh_path, rsh)
447 ]
448)
449
450AC_ARG_WITH(xauth,
451 [ --with-xauth=PATH Specify path to xauth program ],
452 [
453 if test "x$withval" != "$xno" ; then
454 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$withval")
455 fi
456 ],
457 [
458 AC_PATH_PROG(xauth_path, xauth)
459 if test ! -z "$xauth_path" -a -x "/usr/openwin/bin/xauth" ; then
460 xauth_path="/usr/openwin/bin/xauth"
461 fi
462 ]
463)
464
465if test ! -z "$xauth_path" ; then
466 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
467fi
468if test ! -z "$rsh_path" ; then
469 AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path")
470fi
471
472# Check for mail directory (last resort if we cannot get it from headers)
473if test ! -z "$MAIL" ; then
474 maildir=`dirname $MAIL`
475 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
476fi
477
478# Look for lastlog location
486AC_ARG_WITH(lastlog, 479AC_ARG_WITH(lastlog,
487 [ --with-lastlog=FILE Location of lastlog file], 480 [ --with-lastlog=FILE Location of lastlog file],
488 [ 481 [
@@ -524,6 +517,67 @@ if test ! -z "$nolastlog" ; then
524 AC_DEFINE(DISABLE_LASTLOG) 517 AC_DEFINE(DISABLE_LASTLOG)
525fi 518fi
526 519
520if test -z "$no_dev_ptmx" ; then
521 AC_CHECK_FILE("/dev/ptmx", AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX))
522fi
523AC_CHECK_FILE("/dev/ptc", AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC))
524
525# Options from here on. Some of these are preset by platform above
526
527# Check whether user wants GNOME ssh-askpass
528AC_MSG_CHECKING([whether to build GNOME ssh-askpass])
529AC_ARG_WITH(gnome-askpass,
530 [ --with-gnome-askpass Build the GNOME passphrase requester (default=no)],
531 [
532 if test x$withval = xno ; then
533 GNOME_ASKPASS="";
534 else
535 GNOME_ASKPASS="gnome-ssh-askpass";
536 fi
537 ])
538AC_SUBST(GNOME_ASKPASS)
539
540if test -z "$GNOME_ASKPASS" ; then
541 AC_MSG_RESULT(no)
542else
543 AC_MSG_RESULT(yes)
544fi
545
546# Check for user-specified random device, otherwise check /dev/urandom
547AC_ARG_WITH(random,
548 [ --with-random=FILE read randomness from FILE (default=/dev/urandom)],
549 [
550 RANDOM_POOL="$withval";
551 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
552 ],
553 [
554 # Check for random device
555 AC_CHECK_FILE("/dev/urandom",
556 [
557 RANDOM_POOL="/dev/urandom";
558 AC_SUBST(RANDOM_POOL)
559 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
560 ]
561 )
562 ]
563)
564
565# Check for EGD pool file
566AC_ARG_WITH(egd-pool,
567 [ --with-egd-pool=FILE read randomness from EGD pool FILE (default none)],
568 [
569 RANDOM_POOL="$withval";
570 AC_DEFINE(HAVE_EGD)
571 AC_SUBST(RANDOM_POOL)
572 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
573 ]
574)
575
576# Make sure we have some random number support
577if test -z "$RANDOM_POOL" -a -z "$EGD_POOL"; then
578 AC_MSG_ERROR([No random device found, and no EGD random pool specified])
579fi
580
527AC_ARG_WITH(catman, 581AC_ARG_WITH(catman,
528 [ --with-catman=man|cat Install preformatted manpages[no]], 582 [ --with-catman=man|cat Install preformatted manpages[no]],
529 [ 583 [
@@ -543,24 +597,7 @@ AC_ARG_WITH(catman,
543AC_SUBST(MANTYPE) 597AC_SUBST(MANTYPE)
544AC_SUBST(mansubdir) 598AC_SUBST(mansubdir)
545 599
546if test -z "$no_dev_ptmx" ; then 600# Check whether user wants Kerberos support
547 AC_CHECK_FILE("/dev/ptmx", AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX))
548fi
549AC_CHECK_FILE("/dev/ptc", AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC))
550
551AC_MSG_CHECKING([whether libc defines __progname])
552AC_TRY_LINK([],
553 [extern char *__progname; printf("%s", __progname);],
554 [
555 AC_DEFINE(HAVE___PROGNAME)
556 AC_MSG_RESULT(yes)
557 ],
558 [
559 AC_MSG_RESULT(no)
560 ]
561)
562
563dnl Check whether user wants Kerberos support
564AC_ARG_WITH(kerberos4, 601AC_ARG_WITH(kerberos4,
565 [ --with-kerberos4=PATH Enable Kerberos 4 support], 602 [ --with-kerberos4=PATH Enable Kerberos 4 support],
566 [ 603 [
@@ -592,7 +629,7 @@ AC_ARG_WITH(kerberos4,
592 ] 629 ]
593) 630)
594 631
595dnl Check whether user wants AFS support 632# Check whether user wants AFS support
596AC_ARG_WITH(afs, 633AC_ARG_WITH(afs,
597 [ --with-afs=PATH Enable AFS support], 634 [ --with-afs=PATH Enable AFS support],
598 [ 635 [
@@ -617,7 +654,7 @@ AC_ARG_WITH(afs,
617) 654)
618LIBS="$LIBS $KLIBS" 655LIBS="$LIBS $KLIBS"
619 656
620dnl Check whether user wants S/Key support 657# Check whether user wants S/Key support
621AC_ARG_WITH(skey, 658AC_ARG_WITH(skey,
622 [ --with-skey Enable S/Key support], 659 [ --with-skey Enable S/Key support],
623 [ 660 [
@@ -628,7 +665,7 @@ AC_ARG_WITH(skey,
628 ] 665 ]
629) 666)
630 667
631dnl Check whether user wants TCP wrappers support 668# Check whether user wants TCP wrappers support
632AC_ARG_WITH(tcp-wrappers, 669AC_ARG_WITH(tcp-wrappers,
633 [ --with-tcp-wrappers Enable tcpwrappers support], 670 [ --with-tcp-wrappers Enable tcpwrappers support],
634 [ 671 [
@@ -639,7 +676,7 @@ AC_ARG_WITH(tcp-wrappers,
639 ] 676 ]
640) 677)
641 678
642dnl Check whether to enable MD5 passwords 679# Check whether to enable MD5 passwords
643AC_ARG_WITH(md5-passwords, 680AC_ARG_WITH(md5-passwords,
644 [ --with-md5-passwords Enable use of MD5 passwords], 681 [ --with-md5-passwords Enable use of MD5 passwords],
645 [ 682 [
@@ -649,7 +686,7 @@ AC_ARG_WITH(md5-passwords,
649 ] 686 ]
650) 687)
651 688
652dnl Check whether to enable utmpx support 689# Check whether to enable utmpx support
653AC_ARG_WITH(utmpx, 690AC_ARG_WITH(utmpx,
654 [ --with-utmpx Enable utmpx support], 691 [ --with-utmpx Enable utmpx support],
655 [ 692 [
@@ -659,7 +696,7 @@ AC_ARG_WITH(utmpx,
659 ] 696 ]
660) 697)
661 698
662dnl Whether to disable shadow password support 699# Whether to disable shadow password support
663AC_ARG_WITH(shadow, 700AC_ARG_WITH(shadow,
664 [ --without-shadow Disable shadow password support], 701 [ --without-shadow Disable shadow password support],
665 [ 702 [
@@ -669,7 +706,7 @@ AC_ARG_WITH(shadow,
669 ] 706 ]
670) 707)
671 708
672dnl Use ip address instead of hostname in $DISPLAY 709# Use ip address instead of hostname in $DISPLAY
673AC_ARG_WITH(ipaddr-display, 710AC_ARG_WITH(ipaddr-display,
674 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY], 711 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
675 [ 712 [
@@ -679,6 +716,7 @@ AC_ARG_WITH(ipaddr-display,
679 ] 716 ]
680) 717)
681 718
719# Whether to mess with the default path
682AC_ARG_WITH(default-path, 720AC_ARG_WITH(default-path,
683 [ --with-default-path=PATH Specify default \$PATH environment for server], 721 [ --with-default-path=PATH Specify default \$PATH environment for server],
684 [ 722 [
@@ -688,6 +726,7 @@ AC_ARG_WITH(default-path,
688 ] 726 ]
689) 727)
690 728
729# Whether to force IPv4 by default (needed on broken glibc Linux)
691AC_ARG_WITH(ipv4-default, 730AC_ARG_WITH(ipv4-default,
692 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified], 731 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
693 [ 732 [
@@ -697,6 +736,7 @@ AC_ARG_WITH(ipv4-default,
697 ] 736 ]
698) 737)
699 738
739# Where to place sshd.pid
700piddir=/var/run 740piddir=/var/run
701AC_ARG_WITH(pid-dir, 741AC_ARG_WITH(pid-dir,
702 [ --with-pid-dir=PATH Specify location of ssh.pid file], 742 [ --with-pid-dir=PATH Specify location of ssh.pid file],
@@ -709,12 +749,4 @@ AC_ARG_WITH(pid-dir,
709AC_DEFINE_UNQUOTED(PIDDIR, "$piddir") 749AC_DEFINE_UNQUOTED(PIDDIR, "$piddir")
710AC_SUBST(piddir) 750AC_SUBST(piddir)
711 751
712dnl Check for mail directory (last resort if we cannot get it from headers)
713if test ! -z "$MAIL" ; then
714 maildir=`dirname $MAIL`
715 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
716fi
717
718AC_OUTPUT(Makefile) 752AC_OUTPUT(Makefile)
719
720
diff --git a/ssh.c b/ssh.c
index 351997aba..2d9a9d96b 100644
--- a/ssh.c
+++ b/ssh.c
@@ -11,7 +11,7 @@
11 */ 11 */
12 12
13#include "includes.h" 13#include "includes.h"
14RCSID("$Id: ssh.c,v 1.19 2000/02/07 02:20:26 damien Exp $"); 14RCSID("$Id: ssh.c,v 1.20 2000/03/02 12:09:21 damien Exp $");
15 15
16#include "xmalloc.h" 16#include "xmalloc.h"
17#include "ssh.h" 17#include "ssh.h"
@@ -325,11 +325,7 @@ main(int ac, char **av)
325 case 'V': 325 case 'V':
326 fprintf(stderr, "SSH Version %s, protocol version %d.%d.\n", 326 fprintf(stderr, "SSH Version %s, protocol version %d.%d.\n",
327 SSH_VERSION, PROTOCOL_MAJOR, PROTOCOL_MINOR); 327 SSH_VERSION, PROTOCOL_MAJOR, PROTOCOL_MINOR);
328#ifndef RSAREF
329 fprintf(stderr, "Compiled with SSL.\n"); 328 fprintf(stderr, "Compiled with SSL.\n");
330#else
331 fprintf(stderr, "Compiled with SSL (RSAref version).\n");
332#endif
333 if (opt == 'V') 329 if (opt == 'V')
334 exit(0); 330 exit(0);
335 debug_flag = 1; 331 debug_flag = 1;
diff --git a/sshd.c b/sshd.c
index bffbe59dc..0a6045e7f 100644
--- a/sshd.c
+++ b/sshd.c
@@ -379,9 +379,6 @@ main(int ac, char **av)
379 case '?': 379 case '?':
380 default: 380 default:
381 fprintf(stderr, "sshd version %s\n", SSH_VERSION); 381 fprintf(stderr, "sshd version %s\n", SSH_VERSION);
382#ifdef RSAREF
383 fprintf(stderr, "Compiled with RSAref.\n");
384#endif
385 fprintf(stderr, "Usage: %s [options]\n", av0); 382 fprintf(stderr, "Usage: %s [options]\n", av0);
386 fprintf(stderr, "Options:\n"); 383 fprintf(stderr, "Options:\n");
387 fprintf(stderr, " -f file Configuration file (default %s)\n", SERVER_CONFIG_FILE); 384 fprintf(stderr, " -f file Configuration file (default %s)\n", SERVER_CONFIG_FILE);