3 # Copyright (c) 1999-2004 Damien Miller
5 # Permission to use, copy, modify, and distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
18 AC_REVISION($Revision$)
19 AC_CONFIG_SRCDIR([ssh.c])
21 AC_CONFIG_HEADER(config.h)
23 # Handle Globus configuration right away, because the Globus flavor
24 # determines our compiler options.
26 # Check whether the user wants GSI (Globus) support
29 [ --with-gsi Enable Globus GSI authentication support],
36 [ --with-globus Enable Globus GSI authentication support],
42 AC_ARG_WITH(globus-static,
43 [ --with-globus-static Link statically with Globus GSI libraries],
46 if test "x$gsi_path" = "xno" ; then
52 # Check whether the user has a Globus flavor type
53 globus_flavor_type="no"
54 AC_ARG_WITH(globus-flavor,
55 [ --with-globus-flavor=TYPE Specify Globus flavor type (ex: gcc32dbg)],
57 globus_flavor_type="$withval"
58 if test "x$gsi_path" = "xno" ; then
64 if test "x$gsi_path" != "xno" ; then
65 # Globus GSSAPI configuration
66 AC_MSG_CHECKING(for Globus GSI)
67 AC_DEFINE(GSI, 1, [Define if you want GSI/Globus authentication support.])
69 if test "$GSSAPI" -a "$GSSAPI" != "mechglue"; then
70 AC_MSG_ERROR([Previously configured GSSAPI library conflicts with Globus GSI.])
72 if test -z "$GSSAPI"; then
77 if test "x$gsi_path" = "xyes" ; then
78 if test -z "$GLOBUS_LOCATION" ; then
79 AC_MSG_ERROR(GLOBUS_LOCATION environment variable must be set.)
81 gsi_path="$GLOBUS_LOCATION"
84 GLOBUS_LOCATION="$gsi_path"
85 export GLOBUS_LOCATION
86 if test ! -d "$GLOBUS_LOCATION" ; then
87 AC_MSG_ERROR(Cannot find Globus installation. Set GLOBUS_LOCATION environment variable.)
90 if test "x$globus_flavor_type" = "xno" ; then
91 AC_MSG_ERROR(--with-globus-flavor=TYPE must be specified)
93 if test "x$globus_flavor_type" = "xyes" ; then
94 AC_MSG_ERROR(--with-globus-flavor=TYPE must specify a flavor type)
97 GLOBUS_INCLUDE="${gsi_path}/include/${globus_flavor_type}"
98 if test ! -d "$GLOBUS_INCLUDE" ; then
99 AC_MSG_ERROR(Cannot find Globus flavor-specific include directory: ${GLOBUS_INCLUDE})
102 if test -x ${gsi_path}/bin/globus-makefile-header ; then
103 ${gsi_path}/bin/globus-makefile-header --flavor=${globus_flavor_type} ${gsi_static} globus_gss_assist | sed 's/ = \(.*\)/="\1"/' > ./gpt_build_tmp.sh
104 elif test -x ${gsi_path}/sbin/globus-makefile-header ; then
105 ${gsi_path}/sbin/globus-makefile-header --flavor=${globus_flavor_type} ${gsi_static} globus_gss_assist | sed 's/ = \(.*\)/="\1"/' > ./gpt_build_tmp.sh
107 AC_MSG_ERROR(Cannot find globus-makefile-header: Globus installation is incomplete)
110 if test -z "$GLOBUS_PKG_LIBS" ; then
111 AC_MSG_ERROR(globus-makefile-header failed)
114 AC_MSG_RESULT($GLOBUS_LOCATION)
115 AC_DEFINE(HAVE_GSSAPI_H)
118 CFLAGS="$GLOBUS_CFLAGS"
120 CPPFLAGS="$GLOBUS_CPPFLAGS $GLOBUS_INCLUDES"
121 LIBS="$LIBS $GLOBUS_LIBS $GLOBUS_PKG_LIBS"
123 LDFLAGS="$LDFLAGS $GLOBUS_LDFLAGS"
129 # End Globus/GSI section
135 # Checks for programs.
142 AC_PATH_PROG(CAT, cat)
143 AC_PATH_PROG(KILL, kill)
144 AC_PATH_PROGS(PERL, perl5 perl)
145 AC_PATH_PROG(SED, sed)
147 AC_PATH_PROG(ENT, ent)
149 AC_PATH_PROG(TEST_MINUS_S_SH, bash)
150 AC_PATH_PROG(TEST_MINUS_S_SH, ksh)
151 AC_PATH_PROG(TEST_MINUS_S_SH, sh)
153 AC_SUBST(TEST_SHELL,sh)
156 AC_PATH_PROG(PATH_GROUPADD_PROG, groupadd, groupadd,
157 [/usr/sbin${PATH_SEPARATOR}/etc])
158 AC_PATH_PROG(PATH_USERADD_PROG, useradd, useradd,
159 [/usr/sbin${PATH_SEPARATOR}/etc])
160 AC_CHECK_PROG(MAKE_PACKAGE_SUPPORTED, pkgmk, yes, no)
161 if test -x /sbin/sh; then
162 AC_SUBST(STARTUP_SCRIPT_SHELL,/sbin/sh)
164 AC_SUBST(STARTUP_SCRIPT_SHELL,/bin/sh)
170 if test -z "$AR" ; then
171 AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***])
174 # Use LOGIN_PROGRAM from environment if possible
175 if test ! -z "$LOGIN_PROGRAM" ; then
176 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM",
177 [If your header files don't define LOGIN_PROGRAM,
178 then use this (detected) from environment and PATH])
181 AC_PATH_PROG(LOGIN_PROGRAM_FALLBACK, login)
182 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
183 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM_FALLBACK")
187 AC_PATH_PROG(PATH_PASSWD_PROG, passwd)
188 if test ! -z "$PATH_PASSWD_PROG" ; then
189 AC_DEFINE_UNQUOTED(_PATH_PASSWD_PROG, "$PATH_PASSWD_PROG",
190 [Full path of your "passwd" program])
193 if test -z "$LD" ; then
200 AC_CHECK_DECL(LLONG_MAX, have_llong_max=1, , [#include <limits.h>])
202 use_stack_protector=1
203 AC_ARG_WITH(stackprotect,
204 [ --without-stackprotect Don't use compiler's stack protection], [
205 if test "x$withval" = "xno"; then
206 use_stack_protector=0
209 if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
210 CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wuninitialized"
211 GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'`
213 1.*) no_attrib_nonnull=1 ;;
215 CFLAGS="$CFLAGS -Wsign-compare"
218 2.*) no_attrib_nonnull=1 ;;
219 3.*) CFLAGS="$CFLAGS -Wsign-compare -Wformat-security" ;;
220 4.*) CFLAGS="$CFLAGS -Wsign-compare -Wno-pointer-sign -Wformat-security" ;;
224 AC_MSG_CHECKING(if $CC accepts -fno-builtin-memset)
225 saved_CFLAGS="$CFLAGS"
226 CFLAGS="$CFLAGS -fno-builtin-memset"
227 AC_LINK_IFELSE( [AC_LANG_SOURCE([[
229 int main(void){char b[10]; memset(b, 0, sizeof(b));}
231 [ AC_MSG_RESULT(yes) ],
233 CFLAGS="$saved_CFLAGS" ]
236 # -fstack-protector-all doesn't always work for some GCC versions
237 # and/or platforms, so we test if we can. If it's not supported
238 # on a given platform gcc will emit a warning so we use -Werror.
239 if test "x$use_stack_protector" = "x1"; then
240 for t in -fstack-protector-all -fstack-protector; do
241 AC_MSG_CHECKING(if $CC supports $t)
242 saved_CFLAGS="$CFLAGS"
243 saved_LDFLAGS="$LDFLAGS"
244 CFLAGS="$CFLAGS $t -Werror"
245 LDFLAGS="$LDFLAGS $t -Werror"
249 int main(void){char x[[256]]; snprintf(x, sizeof(x), "XXX"); return 0;}
252 CFLAGS="$saved_CFLAGS $t"
253 LDFLAGS="$saved_LDFLAGS $t"
254 AC_MSG_CHECKING(if $t works)
258 int main(void){char x[[256]]; snprintf(x, sizeof(x), "XXX"); return 0;}
262 [ AC_MSG_RESULT(no) ],
263 [ AC_MSG_WARN([cross compiling: cannot test])
267 [ AC_MSG_RESULT(no) ]
269 CFLAGS="$saved_CFLAGS"
270 LDFLAGS="$saved_LDFLAGS"
274 if test -z "$have_llong_max"; then
275 # retry LLONG_MAX with -std=gnu99, needed on some Linuxes
276 unset ac_cv_have_decl_LLONG_MAX
277 saved_CFLAGS="$CFLAGS"
278 CFLAGS="$CFLAGS -std=gnu99"
279 AC_CHECK_DECL(LLONG_MAX,
281 [CFLAGS="$saved_CFLAGS"],
282 [#include <limits.h>]
287 if test "x$no_attrib_nonnull" != "x1" ; then
288 AC_DEFINE(HAVE_ATTRIBUTE__NONNULL__, 1, [Have attribute nonnull])
292 [ --without-rpath Disable auto-added -R linker paths],
294 if test "x$withval" = "xno" ; then
297 if test "x$withval" = "xyes" ; then
303 # Allow user to specify flags
305 [ --with-cflags Specify additional flags to pass to compiler],
307 if test -n "$withval" && test "x$withval" != "xno" && \
308 test "x${withval}" != "xyes"; then
309 CFLAGS="$CFLAGS $withval"
313 AC_ARG_WITH(cppflags,
314 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
316 if test -n "$withval" && test "x$withval" != "xno" && \
317 test "x${withval}" != "xyes"; then
318 CPPFLAGS="$CPPFLAGS $withval"
323 [ --with-ldflags Specify additional flags to pass to linker],
325 if test -n "$withval" && test "x$withval" != "xno" && \
326 test "x${withval}" != "xyes"; then
327 LDFLAGS="$LDFLAGS $withval"
332 [ --with-libs Specify additional libraries to link with],
334 if test -n "$withval" && test "x$withval" != "xno" && \
335 test "x${withval}" != "xyes"; then
336 LIBS="$LIBS $withval"
341 [ --with-Werror Build main code with -Werror],
343 if test -n "$withval" && test "x$withval" != "xno"; then
344 werror_flags="-Werror"
345 if test "x${withval}" != "xyes"; then
346 werror_flags="$withval"
378 security/pam_appl.h \
418 # lastlog.h requires sys/time.h to be included first on Solaris
419 AC_CHECK_HEADERS(lastlog.h, [], [], [
420 #ifdef HAVE_SYS_TIME_H
421 # include <sys/time.h>
425 # sys/ptms.h requires sys/stream.h to be included first on Solaris
426 AC_CHECK_HEADERS(sys/ptms.h, [], [], [
427 #ifdef HAVE_SYS_STREAM_H
428 # include <sys/stream.h>
432 # login_cap.h requires sys/types.h on NetBSD
433 AC_CHECK_HEADERS(login_cap.h, [], [], [
434 #include <sys/types.h>
437 # older BSDs need sys/param.h before sys/mount.h
438 AC_CHECK_HEADERS(sys/mount.h, [], [], [
439 #include <sys/param.h>
442 # Messages for features tested for in target-specific section
446 # Check for some target-specific stuff
449 # Some versions of VAC won't allow macro redefinitions at
450 # -qlanglevel=ansi, and autoconf 2.60 sometimes insists on using that
451 # particularly with older versions of vac or xlc.
452 # It also throws errors about null macro argments, but these are
454 AC_MSG_CHECKING(if compiler allows macro redefinitions)
457 #define testmacro foo
458 #define testmacro bar
459 int main(void) { exit(0); }
461 [ AC_MSG_RESULT(yes) ],
463 CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`"
464 LD="`echo $LD | sed 's/-qlanglvl\=ansi//g'`"
465 CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`"
466 CPPFLAGS="`echo $CPPFLAGS | sed 's/-qlanglvl\=ansi//g'`"
470 AC_MSG_CHECKING([how to specify blibpath for linker ($LD)])
471 if (test -z "$blibpath"); then
472 blibpath="/usr/lib:/lib"
474 saved_LDFLAGS="$LDFLAGS"
475 if test "$GCC" = "yes"; then
476 flags="-Wl,-blibpath: -Wl,-rpath, -blibpath:"
478 flags="-blibpath: -Wl,-blibpath: -Wl,-rpath,"
480 for tryflags in $flags ;do
481 if (test -z "$blibflags"); then
482 LDFLAGS="$saved_LDFLAGS $tryflags$blibpath"
483 AC_TRY_LINK([], [], [blibflags=$tryflags])
486 if (test -z "$blibflags"); then
487 AC_MSG_RESULT(not found)
488 AC_MSG_ERROR([*** must be able to specify blibpath on AIX - check config.log])
490 AC_MSG_RESULT($blibflags)
492 LDFLAGS="$saved_LDFLAGS"
493 dnl Check for authenticate. Might be in libs.a on older AIXes
494 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE, 1,
495 [Define if you want to enable AIX4's authenticate function])],
496 [AC_CHECK_LIB(s,authenticate,
497 [ AC_DEFINE(WITH_AIXAUTHENTICATE)
501 dnl Check for various auth function declarations in headers.
502 AC_CHECK_DECLS([authenticate, loginrestrictions, loginsuccess,
503 passwdexpired, setauthdb], , , [#include <usersec.h>])
504 dnl Check if loginfailed is declared and takes 4 arguments (AIX >= 5.2)
505 AC_CHECK_DECLS(loginfailed,
506 [AC_MSG_CHECKING(if loginfailed takes 4 arguments)
508 [#include <usersec.h>],
509 [(void)loginfailed("user","host","tty",0);],
511 AC_DEFINE(AIX_LOGINFAILED_4ARG, 1,
512 [Define if your AIX loginfailed() function
513 takes 4 arguments (AIX >= 5.2)])],
517 [#include <usersec.h>]
519 AC_CHECK_FUNCS(getgrset setauthdb)
520 AC_CHECK_DECL(F_CLOSEM,
521 AC_DEFINE(HAVE_FCNTL_CLOSEM, 1, [Use F_CLOSEM fcntl for closefrom]),
523 [ #include <limits.h>
526 check_for_aix_broken_getaddrinfo=1
527 AC_DEFINE(BROKEN_REALPATH, 1, [Define if you have a broken realpath.])
528 AC_DEFINE(SETEUID_BREAKS_SETUID, 1,
529 [Define if your platform breaks doing a seteuid before a setuid])
530 AC_DEFINE(BROKEN_SETREUID, 1, [Define if your setreuid() is broken])
531 AC_DEFINE(BROKEN_SETREGID, 1, [Define if your setregid() is broken])
532 dnl AIX handles lastlog as part of its login message
533 AC_DEFINE(DISABLE_LASTLOG, 1, [Define if you don't want to use lastlog])
534 AC_DEFINE(LOGIN_NEEDS_UTMPX, 1,
535 [Some systems need a utmpx entry for /bin/login to work])
536 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV,
537 [Define to a Set Process Title type if your system is
538 supported by bsd-setproctitle.c])
539 AC_DEFINE(SSHPAM_CHAUTHTOK_NEEDS_RUID, 1,
540 [AIX 5.2 and 5.3 (and presumably newer) require this])
541 AC_DEFINE(PTY_ZEROREAD, 1, [read(1) can return 0 for a non-closed fd])
544 check_for_libcrypt_later=1
545 LIBS="$LIBS /usr/lib/textreadmode.o"
546 AC_DEFINE(HAVE_CYGWIN, 1, [Define if you are on Cygwin])
547 AC_DEFINE(USE_PIPES, 1, [Use PIPES instead of a socketpair()])
548 AC_DEFINE(DISABLE_SHADOW, 1,
549 [Define if you want to disable shadow passwords])
550 AC_DEFINE(NO_X11_UNIX_SOCKETS, 1,
551 [Define if X11 doesn't support AF_UNIX sockets on that system])
552 AC_DEFINE(NO_IPPORT_RESERVED_CONCEPT, 1,
553 [Define if the concept of ports only accessible to
554 superusers isn't known])
555 AC_DEFINE(DISABLE_FD_PASSING, 1,
556 [Define if your platform needs to skip post auth
557 file descriptor passing])
558 AC_DEFINE(SSH_IOBUFSZ, 65536, [Windows is sensitive to read buffer size])
561 AC_DEFINE(IP_TOS_IS_BROKEN, 1,
562 [Define if your system choked on IP TOS setting])
563 AC_DEFINE(SETEUID_BREAKS_SETUID)
564 AC_DEFINE(BROKEN_SETREUID)
565 AC_DEFINE(BROKEN_SETREGID)
568 AC_DEFINE(BROKEN_GETADDRINFO, 1, [Define if getaddrinfo is broken)])
569 AC_DEFINE(BROKEN_GETADDRINFO)
570 AC_DEFINE(SETEUID_BREAKS_SETUID)
571 AC_DEFINE(BROKEN_SETREUID)
572 AC_DEFINE(BROKEN_SETREGID)
573 AC_DEFINE(BROKEN_GLOB, 1, [OS X glob does not do what we expect])
574 AC_DEFINE_UNQUOTED(BIND_8_COMPAT, 1,
575 [Define if your resolver libs need this for getrrsetbyname])
576 AC_DEFINE(SSH_TUN_FREEBSD, 1, [Open tunnel devices the FreeBSD way])
577 AC_DEFINE(SSH_TUN_COMPAT_AF, 1,
578 [Use tunnel device compatibility to OpenBSD])
579 AC_DEFINE(SSH_TUN_PREPEND_AF, 1,
580 [Prepend the address family to IP tunnel traffic])
581 AC_MSG_CHECKING(if we have the Security Authorization Session API)
582 AC_TRY_COMPILE([#include <Security/AuthSession.h>],
583 [SessionCreate(0, 0);],
584 [ac_cv_use_security_session_api="yes"
585 AC_DEFINE(USE_SECURITY_SESSION_API, 1,
586 [platform has the Security Authorization Session API])
587 LIBS="$LIBS -framework Security"
589 [ac_cv_use_security_session_api="no"
591 AC_MSG_CHECKING(if we have an in-memory credentials cache)
593 [#include <Kerberos/Kerberos.h>],
595 (void) cc_initialize (&c, 0, NULL, NULL);],
596 [AC_DEFINE(USE_CCAPI, 1,
597 [platform uses an in-memory credentials cache])
598 LIBS="$LIBS -framework Security"
600 if test "x$ac_cv_use_security_session_api" = "xno"; then
601 AC_MSG_ERROR(*** Need a security framework to use the credentials cache API ***)
605 m4_pattern_allow(AU_IPv)
606 AC_CHECK_DECL(AU_IPv4, [],
607 AC_DEFINE(AU_IPv4, 0, [System only supports IPv4 audit records])
608 [#include <bsm/audit.h>]
609 AC_DEFINE(LASTLOG_WRITE_PUTUTXLINE, 1,
610 [Define if pututxline updates lastlog too])
614 SSHDLIBS="$SSHDLIBS -lcrypt"
617 # first we define all of the options common to all HP-UX releases
618 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
619 IPADDR_IN_DISPLAY=yes
621 AC_DEFINE(LOGIN_NO_ENDOPT, 1,
622 [Define if your login program cannot handle end of options ("--")])
623 AC_DEFINE(LOGIN_NEEDS_UTMPX)
624 AC_DEFINE(LOCKED_PASSWD_STRING, "*",
625 [String used in /etc/passwd to denote locked account])
626 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
627 MAIL="/var/mail/username"
629 AC_CHECK_LIB(xnet, t_error, ,
630 AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
632 # next, we define all of the options specific to major releases
635 if test -z "$GCC"; then
640 AC_DEFINE(PAM_SUN_CODEBASE, 1,
641 [Define if you are using Solaris-derived PAM which
642 passes pam_messages to the conversation function
643 with an extra level of indirection])
644 AC_DEFINE(DISABLE_UTMP, 1,
645 [Define if you don't want to use utmp])
646 AC_DEFINE(USE_BTMP, 1, [Use btmp to log bad logins])
647 check_for_hpux_broken_getaddrinfo=1
648 check_for_conflicting_getspnam=1
652 # lastly, we define options specific to minor releases
655 AC_DEFINE(HAVE_SECUREWARE, 1,
656 [Define if you have SecureWare-based
657 protected password database])
658 disable_ptmx_check=yes
664 PATH="$PATH:/usr/etc"
665 AC_DEFINE(BROKEN_INET_NTOA, 1,
666 [Define if you system's inet_ntoa is busted
667 (e.g. Irix gcc issue)])
668 AC_DEFINE(SETEUID_BREAKS_SETUID)
669 AC_DEFINE(BROKEN_SETREUID)
670 AC_DEFINE(BROKEN_SETREGID)
671 AC_DEFINE(WITH_ABBREV_NO_TTY, 1,
672 [Define if you shouldn't strip 'tty' from your
674 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
677 PATH="$PATH:/usr/etc"
678 AC_DEFINE(WITH_IRIX_ARRAY, 1,
679 [Define if you have/want arrays
680 (cluster-wide session managment, not C arrays)])
681 AC_DEFINE(WITH_IRIX_PROJECT, 1,
682 [Define if you want IRIX project management])
683 AC_DEFINE(WITH_IRIX_AUDIT, 1,
684 [Define if you want IRIX audit trails])
685 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS, 1,
686 [Define if you want IRIX kernel jobs])])
687 AC_DEFINE(BROKEN_INET_NTOA)
688 AC_DEFINE(SETEUID_BREAKS_SETUID)
689 AC_DEFINE(BROKEN_SETREUID)
690 AC_DEFINE(BROKEN_SETREGID)
691 AC_DEFINE(BROKEN_UPDWTMPX, 1, [updwtmpx is broken (if present)])
692 AC_DEFINE(WITH_ABBREV_NO_TTY)
693 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
695 *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
696 check_for_libcrypt_later=1
697 AC_DEFINE(PAM_TTY_KLUDGE)
698 AC_DEFINE(LOCKED_PASSWD_PREFIX, "!")
699 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)
700 AC_DEFINE(_PATH_BTMP, "/var/log/btmp", [log for bad login attempts])
701 AC_DEFINE(USE_BTMP, 1, [Use btmp to log bad logins])
705 check_for_libcrypt_later=1
706 check_for_openpty_ctty_bug=1
707 AC_DEFINE(PAM_TTY_KLUDGE, 1,
708 [Work around problematic Linux PAM modules handling of PAM_TTY])
709 AC_DEFINE(LOCKED_PASSWD_PREFIX, "!",
710 [String used in /etc/passwd to denote locked account])
711 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)
712 AC_DEFINE(LINK_OPNOTSUPP_ERRNO, EPERM,
713 [Define to whatever link() returns for "not supported"
714 if it doesn't return EOPNOTSUPP.])
715 AC_DEFINE(_PATH_BTMP, "/var/log/btmp", [log for bad login attempts])
717 inet6_default_4in6=yes
720 AC_DEFINE(BROKEN_CMSG_TYPE, 1,
721 [Define if cmsg_type is not passed correctly])
724 # tun(4) forwarding compat code
725 AC_CHECK_HEADERS(linux/if_tun.h)
726 if test "x$ac_cv_header_linux_if_tun_h" = "xyes" ; then
727 AC_DEFINE(SSH_TUN_LINUX, 1,
728 [Open tunnel devices the Linux tun/tap way])
729 AC_DEFINE(SSH_TUN_COMPAT_AF, 1,
730 [Use tunnel device compatibility to OpenBSD])
731 AC_DEFINE(SSH_TUN_PREPEND_AF, 1,
732 [Prepend the address family to IP tunnel traffic])
735 mips-sony-bsd|mips-sony-newsos4)
736 AC_DEFINE(NEED_SETPGRP, 1, [Need setpgrp to acquire controlling tty])
740 check_for_libcrypt_before=1
741 if test "x$withval" != "xno" ; then
744 AC_DEFINE(SSH_TUN_FREEBSD, 1, [Open tunnel devices the FreeBSD way])
745 AC_CHECK_HEADER([net/if_tap.h], ,
746 AC_DEFINE(SSH_TUN_NO_L2, 1, [No layer 2 tunnel support]))
747 AC_DEFINE(SSH_TUN_PREPEND_AF, 1,
748 [Prepend the address family to IP tunnel traffic])
751 check_for_libcrypt_later=1
752 AC_DEFINE(LOCKED_PASSWD_PREFIX, "*LOCKED*", [Account locked with pw(1)])
753 AC_DEFINE(SSH_TUN_FREEBSD, 1, [Open tunnel devices the FreeBSD way])
754 AC_CHECK_HEADER([net/if_tap.h], ,
755 AC_DEFINE(SSH_TUN_NO_L2, 1, [No layer 2 tunnel support]))
756 AC_DEFINE(BROKEN_GLOB, 1, [FreeBSD glob does not do what we need])
759 AC_DEFINE(SETEUID_BREAKS_SETUID)
760 AC_DEFINE(BROKEN_SETREUID)
761 AC_DEFINE(BROKEN_SETREGID)
764 conf_lastlog_location="/usr/adm/lastlog"
765 conf_utmp_location=/etc/utmp
766 conf_wtmp_location=/usr/adm/wtmp
768 AC_DEFINE(HAVE_NEXT, 1, [Define if you are on NeXT])
769 AC_DEFINE(BROKEN_REALPATH)
771 AC_DEFINE(BROKEN_SAVED_UIDS, 1, [Needed for NeXT])
774 AC_DEFINE(HAVE_ATTRIBUTE__SENTINEL__, 1, [OpenBSD's gcc has sentinel])
775 AC_DEFINE(HAVE_ATTRIBUTE__BOUNDED__, 1, [OpenBSD's gcc has bounded])
776 AC_DEFINE(SSH_TUN_OPENBSD, 1, [Open tunnel devices the OpenBSD way])
777 AC_DEFINE(SYSLOG_R_SAFE_IN_SIGHAND, 1,
778 [syslog_r function is safe to use in in a signal handler])
781 if test "x$withval" != "xno" ; then
784 AC_DEFINE(PAM_SUN_CODEBASE)
785 AC_DEFINE(LOGIN_NEEDS_UTMPX)
786 AC_DEFINE(LOGIN_NEEDS_TERM, 1,
787 [Some versions of /bin/login need the TERM supplied
789 AC_DEFINE(PAM_TTY_KLUDGE)
790 AC_DEFINE(SSHPAM_CHAUTHTOK_NEEDS_RUID, 1,
791 [Define if pam_chauthtok wants real uid set
792 to the unpriv'ed user])
793 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
794 # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
795 AC_DEFINE(SSHD_ACQUIRES_CTTY, 1,
796 [Define if sshd somehow reacquires a controlling TTY
798 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd
799 in case the name is longer than 8 chars])
800 AC_DEFINE(BROKEN_TCGETATTR_ICANON, 1, [tcgetattr with ICANON may hang])
801 external_path_file=/etc/default/login
802 # hardwire lastlog location (can't detect it on some versions)
803 conf_lastlog_location="/var/adm/lastlog"
804 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
805 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'`
806 if test "$sol2ver" -ge 8; then
808 AC_DEFINE(DISABLE_UTMP)
809 AC_DEFINE(DISABLE_WTMP, 1,
810 [Define if you don't want to use wtmp])
814 AC_ARG_WITH(solaris-contracts,
815 [ --with-solaris-contracts Enable Solaris process contracts (experimental)],
817 AC_CHECK_LIB(contract, ct_tmpl_activate,
818 [ AC_DEFINE(USE_SOLARIS_PROCESS_CONTRACTS, 1,
819 [Define if you have Solaris process contracts])
820 SSHDLIBS="$SSHDLIBS -lcontract"
827 CPPFLAGS="$CPPFLAGS -DSUNOS4"
828 AC_CHECK_FUNCS(getpwanam)
829 AC_DEFINE(PAM_SUN_CODEBASE)
830 conf_utmp_location=/etc/utmp
831 conf_wtmp_location=/var/adm/wtmp
832 conf_lastlog_location=/var/adm/lastlog
838 AC_DEFINE(SSHD_ACQUIRES_CTTY)
839 AC_DEFINE(SETEUID_BREAKS_SETUID)
840 AC_DEFINE(BROKEN_SETREUID)
841 AC_DEFINE(BROKEN_SETREGID)
844 # /usr/ucblib MUST NOT be searched on ReliantUNIX
845 AC_CHECK_LIB(dl, dlsym, ,)
846 # -lresolv needs to be at the end of LIBS or DNS lookups break
847 AC_CHECK_LIB(resolv, res_query, [ LIBS="$LIBS -lresolv" ])
848 IPADDR_IN_DISPLAY=yes
850 AC_DEFINE(IP_TOS_IS_BROKEN)
851 AC_DEFINE(SETEUID_BREAKS_SETUID)
852 AC_DEFINE(BROKEN_SETREUID)
853 AC_DEFINE(BROKEN_SETREGID)
854 AC_DEFINE(SSHD_ACQUIRES_CTTY)
855 external_path_file=/etc/default/login
856 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
857 # Attention: always take care to bind libsocket and libnsl before libc,
858 # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
860 # UnixWare 1.x, UnixWare 2.x, and others based on code from Univel.
863 AC_DEFINE(SETEUID_BREAKS_SETUID)
864 AC_DEFINE(BROKEN_SETREUID)
865 AC_DEFINE(BROKEN_SETREGID)
866 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd])
867 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
869 # UnixWare 7.x, OpenUNIX 8
871 AC_DEFINE(UNIXWARE_LONG_PASSWORDS, 1, [Support passwords > 8 chars])
873 AC_DEFINE(SETEUID_BREAKS_SETUID)
874 AC_DEFINE(BROKEN_SETREUID)
875 AC_DEFINE(BROKEN_SETREGID)
876 AC_DEFINE(PASSWD_NEEDS_USERNAME)
878 *-*-sysv5SCO_SV*) # SCO OpenServer 6.x
879 TEST_SHELL=/u95/bin/sh
880 AC_DEFINE(BROKEN_LIBIAF, 1,
881 [ia_uinfo routines not supported by OS yet])
882 AC_DEFINE(BROKEN_UPDWTMPX)
883 AC_CHECK_LIB(prot, getluid,[ LIBS="$LIBS -lprot"
884 AC_CHECK_FUNCS(getluid setluid,,,-lprot)
885 AC_DEFINE(HAVE_SECUREWARE)
886 AC_DEFINE(DISABLE_SHADOW)
889 *) AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
890 check_for_libcrypt_later=1
896 # SCO UNIX and OEM versions of SCO UNIX
898 AC_MSG_ERROR("This Platform is no longer supported.")
902 if test -z "$GCC"; then
903 CFLAGS="$CFLAGS -belf"
905 LIBS="$LIBS -lprot -lx -ltinfo -lm"
908 AC_DEFINE(HAVE_SECUREWARE)
909 AC_DEFINE(DISABLE_SHADOW)
910 AC_DEFINE(DISABLE_FD_PASSING)
911 AC_DEFINE(SETEUID_BREAKS_SETUID)
912 AC_DEFINE(BROKEN_SETREUID)
913 AC_DEFINE(BROKEN_SETREGID)
914 AC_DEFINE(WITH_ABBREV_NO_TTY)
915 AC_DEFINE(BROKEN_UPDWTMPX)
916 AC_DEFINE(PASSWD_NEEDS_USERNAME)
917 AC_CHECK_FUNCS(getluid setluid)
922 AC_DEFINE(NO_SSH_LASTLOG, 1,
923 [Define if you don't want to use lastlog in session.c])
924 AC_DEFINE(SETEUID_BREAKS_SETUID)
925 AC_DEFINE(BROKEN_SETREUID)
926 AC_DEFINE(BROKEN_SETREGID)
928 AC_DEFINE(DISABLE_FD_PASSING)
930 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
934 AC_DEFINE(SETEUID_BREAKS_SETUID)
935 AC_DEFINE(BROKEN_SETREUID)
936 AC_DEFINE(BROKEN_SETREGID)
937 AC_DEFINE(WITH_ABBREV_NO_TTY)
939 AC_DEFINE(DISABLE_FD_PASSING)
941 LIBS="$LIBS -lgen -lacid -ldb"
945 AC_DEFINE(SETEUID_BREAKS_SETUID)
946 AC_DEFINE(BROKEN_SETREUID)
947 AC_DEFINE(BROKEN_SETREGID)
949 AC_DEFINE(DISABLE_FD_PASSING)
950 AC_DEFINE(NO_SSH_LASTLOG)
951 LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal"
952 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
956 AC_MSG_CHECKING(for Digital Unix SIA)
959 [ --with-osfsia Enable Digital Unix SIA],
961 if test "x$withval" = "xno" ; then
962 AC_MSG_RESULT(disabled)
967 if test -z "$no_osfsia" ; then
968 if test -f /etc/sia/matrix.conf; then
970 AC_DEFINE(HAVE_OSF_SIA, 1,
971 [Define if you have Digital Unix Security
972 Integration Architecture])
973 AC_DEFINE(DISABLE_LOGIN, 1,
974 [Define if you don't want to use your
975 system's login() call])
976 AC_DEFINE(DISABLE_FD_PASSING)
977 LIBS="$LIBS -lsecurity -ldb -lm -laud"
981 AC_DEFINE(LOCKED_PASSWD_SUBSTR, "Nologin",
982 [String used in /etc/passwd to denote locked account])
985 AC_DEFINE(BROKEN_GETADDRINFO)
986 AC_DEFINE(SETEUID_BREAKS_SETUID)
987 AC_DEFINE(BROKEN_SETREUID)
988 AC_DEFINE(BROKEN_SETREGID)
989 AC_DEFINE(BROKEN_READV_COMPARISON, 1, [Can't do comparisons on readv])
994 AC_DEFINE(NO_X11_UNIX_SOCKETS)
995 AC_DEFINE(MISSING_NFDBITS, 1, [Define on *nto-qnx systems])
996 AC_DEFINE(MISSING_HOWMANY, 1, [Define on *nto-qnx systems])
997 AC_DEFINE(MISSING_FD_MASK, 1, [Define on *nto-qnx systems])
998 AC_DEFINE(DISABLE_LASTLOG)
999 AC_DEFINE(SSHD_ACQUIRES_CTTY)
1000 AC_DEFINE(BROKEN_SHADOW_EXPIRE, 1, [QNX shadow support is broken])
1001 enable_etc_default_login=no # has incompatible /etc/default/login
1004 AC_DEFINE(DISABLE_FD_PASSING)
1010 AC_DEFINE(BROKEN_GETGROUPS, 1, [getgroups(0,NULL) will return -1])
1011 AC_DEFINE(BROKEN_MMAP, 1, [Ultrix mmap can't map files])
1012 AC_DEFINE(NEED_SETPGRP)
1013 AC_DEFINE(HAVE_SYS_SYSLOG_H, 1, [Force use of sys/syslog.h on Ultrix])
1017 CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
1018 AC_DEFINE(MISSING_HOWMANY)
1019 AC_DEFINE(BROKEN_SETVBUF, 1, [LynxOS has broken setvbuf() implementation])
1023 AC_MSG_CHECKING(compiler and flags for sanity)
1027 int main(){exit(0);}
1029 [ AC_MSG_RESULT(yes) ],
1032 AC_MSG_ERROR([*** compiler cannot create working executables, check config.log ***])
1034 [ AC_MSG_WARN([cross compiling: not checking compiler sanity]) ]
1037 dnl Checks for header files.
1038 # Checks for libraries.
1039 AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match))
1040 AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
1042 dnl IRIX and Solaris 2.5.1 have dirname() in libgen
1043 AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
1044 AC_CHECK_LIB(gen, dirname,[
1045 AC_CACHE_CHECK([for broken dirname],
1046 ac_cv_have_broken_dirname, [
1054 int main(int argc, char **argv) {
1057 strncpy(buf,"/etc", 32);
1059 if (!s || strncmp(s, "/", 32) != 0) {
1066 [ ac_cv_have_broken_dirname="no" ],
1067 [ ac_cv_have_broken_dirname="yes" ],
1068 [ ac_cv_have_broken_dirname="no" ],
1072 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
1074 AC_DEFINE(HAVE_DIRNAME)
1075 AC_CHECK_HEADERS(libgen.h)
1080 AC_CHECK_FUNC(getspnam, ,
1081 AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen"))
1082 AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME, 1,
1083 [Define if you have the basename function.]))
1085 dnl zlib is required
1087 [ --with-zlib=PATH Use zlib in PATH],
1088 [ if test "x$withval" = "xno" ; then
1089 AC_MSG_ERROR([*** zlib is required ***])
1090 elif test "x$withval" != "xyes"; then
1091 if test -d "$withval/lib"; then
1092 if test -n "${need_dash_r}"; then
1093 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
1095 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
1098 if test -n "${need_dash_r}"; then
1099 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
1101 LDFLAGS="-L${withval} ${LDFLAGS}"
1104 if test -d "$withval/include"; then
1105 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
1107 CPPFLAGS="-I${withval} ${CPPFLAGS}"
1112 AC_CHECK_HEADER([zlib.h], ,AC_MSG_ERROR([*** zlib.h missing - please install first or check config.log ***]))
1113 AC_CHECK_LIB(z, deflate, ,
1115 saved_CPPFLAGS="$CPPFLAGS"
1116 saved_LDFLAGS="$LDFLAGS"
1118 dnl Check default zlib install dir
1119 if test -n "${need_dash_r}"; then
1120 LDFLAGS="-L/usr/local/lib -R/usr/local/lib ${saved_LDFLAGS}"
1122 LDFLAGS="-L/usr/local/lib ${saved_LDFLAGS}"
1124 CPPFLAGS="-I/usr/local/include ${saved_CPPFLAGS}"
1126 AC_TRY_LINK_FUNC(deflate, AC_DEFINE(HAVE_LIBZ),
1128 AC_MSG_ERROR([*** zlib missing - please install first or check config.log ***])
1134 AC_ARG_WITH(zlib-version-check,
1135 [ --without-zlib-version-check Disable zlib version check],
1136 [ if test "x$withval" = "xno" ; then
1137 zlib_check_nonfatal=1
1142 AC_MSG_CHECKING(for possibly buggy zlib)
1143 AC_RUN_IFELSE([AC_LANG_SOURCE([[
1148 int a=0, b=0, c=0, d=0, n, v;
1149 n = sscanf(ZLIB_VERSION, "%d.%d.%d.%d", &a, &b, &c, &d);
1150 if (n != 3 && n != 4)
1152 v = a*1000000 + b*10000 + c*100 + d;
1153 fprintf(stderr, "found zlib version %s (%d)\n", ZLIB_VERSION, v);
1156 if (a == 1 && b == 1 && c >= 4)
1159 /* 1.2.3 and up are OK */
1167 [ AC_MSG_RESULT(yes)
1168 if test -z "$zlib_check_nonfatal" ; then
1169 AC_MSG_ERROR([*** zlib too old - check config.log ***
1170 Your reported zlib version has known security problems. It's possible your
1171 vendor has fixed these problems without changing the version number. If you
1172 are sure this is the case, you can disable the check by running
1173 "./configure --without-zlib-version-check".
1174 If you are in doubt, upgrade zlib to version 1.2.3 or greater.
1175 See http://www.gzip.org/zlib/ for details.])
1177 AC_MSG_WARN([zlib version may have security problems])
1180 [ AC_MSG_WARN([cross compiling: not checking zlib version]) ]
1184 AC_CHECK_FUNC(strcasecmp,
1185 [], [ AC_CHECK_LIB(resolv, strcasecmp, LIBS="$LIBS -lresolv") ]
1187 AC_CHECK_FUNCS(utimes,
1188 [], [ AC_CHECK_LIB(c89, utimes, [AC_DEFINE(HAVE_UTIMES)
1189 LIBS="$LIBS -lc89"]) ]
1192 dnl Checks for libutil functions
1193 AC_CHECK_HEADERS(libutil.h)
1194 AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN, 1,
1195 [Define if your libraries define login()])])
1196 AC_CHECK_FUNCS(fmt_scaled logout updwtmp logwtmp)
1200 # Check for ALTDIRFUNC glob() extension
1201 AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support)
1202 AC_EGREP_CPP(FOUNDIT,
1205 #ifdef GLOB_ALTDIRFUNC
1210 AC_DEFINE(GLOB_HAS_ALTDIRFUNC, 1,
1211 [Define if your system glob() function has
1212 the GLOB_ALTDIRFUNC extension])
1220 # Check for g.gl_matchc glob() extension
1221 AC_MSG_CHECKING(for gl_matchc field in glob_t)
1223 [ #include <glob.h> ],
1224 [glob_t g; g.gl_matchc = 1;],
1226 AC_DEFINE(GLOB_HAS_GL_MATCHC, 1,
1227 [Define if your system glob() function has
1228 gl_matchc options in glob_t])
1236 AC_CHECK_DECLS(GLOB_NOMATCH, , , [#include <glob.h>])
1238 AC_MSG_CHECKING([whether struct dirent allocates space for d_name])
1241 #include <sys/types.h>
1243 int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));}
1245 [AC_MSG_RESULT(yes)],
1248 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME, 1,
1249 [Define if your struct dirent expects you to
1250 allocate extra space for d_name])
1253 AC_MSG_WARN([cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME])
1254 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
1258 AC_MSG_CHECKING([for /proc/pid/fd directory])
1259 if test -d "/proc/$$/fd" ; then
1260 AC_DEFINE(HAVE_PROC_PID, 1, [Define if you have /proc/$pid/fd])
1266 # Check whether user wants S/Key support
1269 [ --with-skey[[=PATH]] Enable S/Key support (optionally in PATH)],
1271 if test "x$withval" != "xno" ; then
1273 if test "x$withval" != "xyes" ; then
1274 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1275 LDFLAGS="$LDFLAGS -L${withval}/lib"
1278 AC_DEFINE(SKEY, 1, [Define if you want S/Key support])
1282 AC_MSG_CHECKING([for s/key support])
1287 int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); }
1289 [AC_MSG_RESULT(yes)],
1292 AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
1294 AC_MSG_CHECKING(if skeychallenge takes 4 arguments)
1298 [(void)skeychallenge(NULL,"name","",0);],
1300 AC_DEFINE(SKEYCHALLENGE_4ARG, 1,
1301 [Define if your skeychallenge()
1302 function takes 4 arguments (NetBSD)])],
1309 # Check whether user wants TCP wrappers support
1311 AC_ARG_WITH(tcp-wrappers,
1312 [ --with-tcp-wrappers[[=PATH]] Enable tcpwrappers support (optionally in PATH)],
1314 if test "x$withval" != "xno" ; then
1316 saved_LDFLAGS="$LDFLAGS"
1317 saved_CPPFLAGS="$CPPFLAGS"
1318 if test -n "${withval}" && \
1319 test "x${withval}" != "xyes"; then
1320 if test -d "${withval}/lib"; then
1321 if test -n "${need_dash_r}"; then
1322 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
1324 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
1327 if test -n "${need_dash_r}"; then
1328 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
1330 LDFLAGS="-L${withval} ${LDFLAGS}"
1333 if test -d "${withval}/include"; then
1334 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
1336 CPPFLAGS="-I${withval} ${CPPFLAGS}"
1340 AC_MSG_CHECKING(for libwrap)
1343 #include <sys/types.h>
1344 #include <sys/socket.h>
1345 #include <netinet/in.h>
1347 int deny_severity = 0, allow_severity = 0;
1352 AC_DEFINE(LIBWRAP, 1,
1354 TCP Wrappers support])
1355 SSHDLIBS="$SSHDLIBS -lwrap"
1359 AC_MSG_ERROR([*** libwrap missing])
1367 # Check whether user wants libedit support
1369 AC_ARG_WITH(libedit,
1370 [ --with-libedit[[=PATH]] Enable libedit support for sftp],
1371 [ if test "x$withval" != "xno" ; then
1372 if test "x$withval" != "xyes"; then
1373 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1374 if test -n "${need_dash_r}"; then
1375 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
1377 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
1380 AC_CHECK_LIB(edit, el_init,
1381 [ AC_DEFINE(USE_LIBEDIT, 1, [Use libedit for sftp])
1382 LIBEDIT="-ledit -lcurses"
1386 [ AC_MSG_ERROR(libedit not found) ],
1389 AC_MSG_CHECKING(if libedit version is compatible)
1392 #include <histedit.h>
1396 el_init("", NULL, NULL, NULL);
1400 [ AC_MSG_RESULT(yes) ],
1402 AC_MSG_ERROR(libedit version is not compatible) ]
1409 [ --with-audit=module Enable EXPERIMENTAL audit support (modules=debug,bsm)],
1411 AC_MSG_CHECKING(for supported audit module)
1416 dnl Checks for headers, libs and functions
1417 AC_CHECK_HEADERS(bsm/audit.h, [],
1418 [AC_MSG_ERROR(BSM enabled and bsm/audit.h not found)],
1425 AC_CHECK_LIB(bsm, getaudit, [],
1426 [AC_MSG_ERROR(BSM enabled and required library not found)])
1427 AC_CHECK_FUNCS(getaudit, [],
1428 [AC_MSG_ERROR(BSM enabled and required function not found)])
1429 # These are optional
1430 AC_CHECK_FUNCS(getaudit_addr aug_get_machine)
1431 AC_DEFINE(USE_BSM_AUDIT, 1, [Use BSM audit module])
1435 AC_MSG_RESULT(debug)
1436 AC_DEFINE(SSH_AUDIT_EVENTS, 1, Use audit debugging module)
1442 AC_MSG_ERROR([Unknown audit module $withval])
1447 dnl Checks for library functions. Please keep in alphabetical order
1451 arc4random_uniform \
1540 # IRIX has a const char return value for gai_strerror()
1541 AC_CHECK_FUNCS(gai_strerror,[
1542 AC_DEFINE(HAVE_GAI_STRERROR)
1544 #include <sys/types.h>
1545 #include <sys/socket.h>
1548 const char *gai_strerror(int);],[
1551 str = gai_strerror(0);],[
1552 AC_DEFINE(HAVE_CONST_GAI_STRERROR_PROTO, 1,
1553 [Define if gai_strerror() returns const char *])])])
1555 AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP, 1,
1556 [Some systems put nanosleep outside of libc]))
1558 dnl Make sure prototypes are defined for these before using them.
1559 AC_CHECK_DECL(getrusage, [AC_CHECK_FUNCS(getrusage)])
1560 AC_CHECK_DECL(strsep,
1561 [AC_CHECK_FUNCS(strsep)],
1564 #ifdef HAVE_STRING_H
1565 # include <string.h>
1569 dnl tcsendbreak might be a macro
1570 AC_CHECK_DECL(tcsendbreak,
1571 [AC_DEFINE(HAVE_TCSENDBREAK)],
1572 [AC_CHECK_FUNCS(tcsendbreak)],
1573 [#include <termios.h>]
1576 AC_CHECK_DECLS(h_errno, , ,[#include <netdb.h>])
1578 AC_CHECK_DECLS(SHUT_RD, , ,
1580 #include <sys/types.h>
1581 #include <sys/socket.h>
1584 AC_CHECK_DECLS(O_NONBLOCK, , ,
1586 #include <sys/types.h>
1587 #ifdef HAVE_SYS_STAT_H
1588 # include <sys/stat.h>
1595 AC_CHECK_DECLS(writev, , , [
1596 #include <sys/types.h>
1597 #include <sys/uio.h>
1601 AC_CHECK_DECLS(MAXSYMLINKS, , , [
1602 #include <sys/param.h>
1605 AC_CHECK_DECLS(offsetof, , , [
1609 AC_CHECK_FUNCS(setresuid, [
1610 dnl Some platorms have setresuid that isn't implemented, test for this
1611 AC_MSG_CHECKING(if setresuid seems to work)
1616 int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
1618 [AC_MSG_RESULT(yes)],
1619 [AC_DEFINE(BROKEN_SETRESUID, 1,
1620 [Define if your setresuid() is broken])
1621 AC_MSG_RESULT(not implemented)],
1622 [AC_MSG_WARN([cross compiling: not checking setresuid])]
1626 AC_CHECK_FUNCS(setresgid, [
1627 dnl Some platorms have setresgid that isn't implemented, test for this
1628 AC_MSG_CHECKING(if setresgid seems to work)
1633 int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
1635 [AC_MSG_RESULT(yes)],
1636 [AC_DEFINE(BROKEN_SETRESGID, 1,
1637 [Define if your setresgid() is broken])
1638 AC_MSG_RESULT(not implemented)],
1639 [AC_MSG_WARN([cross compiling: not checking setresuid])]
1643 dnl Checks for time functions
1644 AC_CHECK_FUNCS(gettimeofday time)
1645 dnl Checks for utmp functions
1646 AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent)
1647 AC_CHECK_FUNCS(utmpname)
1648 dnl Checks for utmpx functions
1649 AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline )
1650 AC_CHECK_FUNCS(setutxent utmpxname)
1651 dnl Checks for lastlog functions
1652 AC_CHECK_FUNCS(getlastlogxbyname)
1654 AC_CHECK_FUNC(daemon,
1655 [AC_DEFINE(HAVE_DAEMON, 1, [Define if your libraries define daemon()])],
1656 [AC_CHECK_LIB(bsd, daemon,
1657 [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
1660 AC_CHECK_FUNC(getpagesize,
1661 [AC_DEFINE(HAVE_GETPAGESIZE, 1,
1662 [Define if your libraries define getpagesize()])],
1663 [AC_CHECK_LIB(ucb, getpagesize,
1664 [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
1667 # Check for broken snprintf
1668 if test "x$ac_cv_func_snprintf" = "xyes" ; then
1669 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
1673 int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');}
1675 [AC_MSG_RESULT(yes)],
1678 AC_DEFINE(BROKEN_SNPRINTF, 1,
1679 [Define if your snprintf is busted])
1680 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
1682 [ AC_MSG_WARN([cross compiling: Assuming working snprintf()]) ]
1686 # If we don't have a working asprintf, then we strongly depend on vsnprintf
1687 # returning the right thing on overflow: the number of characters it tried to
1688 # create (as per SUSv3)
1689 if test "x$ac_cv_func_asprintf" != "xyes" && \
1690 test "x$ac_cv_func_vsnprintf" = "xyes" ; then
1691 AC_MSG_CHECKING([whether vsnprintf returns correct values on overflow])
1694 #include <sys/types.h>
1698 int x_snprintf(char *str,size_t count,const char *fmt,...)
1700 size_t ret; va_list ap;
1701 va_start(ap, fmt); ret = vsnprintf(str, count, fmt, ap); va_end(ap);
1707 exit(x_snprintf(x, 1, "%s %d", "hello", 12345) == 11 ? 0 : 1);
1709 [AC_MSG_RESULT(yes)],
1712 AC_DEFINE(BROKEN_SNPRINTF, 1,
1713 [Define if your snprintf is busted])
1714 AC_MSG_WARN([****** Your vsnprintf() function is broken, complain to your vendor])
1716 [ AC_MSG_WARN([cross compiling: Assuming working vsnprintf()]) ]
1720 # On systems where [v]snprintf is broken, but is declared in stdio,
1721 # check that the fmt argument is const char * or just char *.
1722 # This is only useful for when BROKEN_SNPRINTF
1723 AC_MSG_CHECKING([whether snprintf can declare const char *fmt])
1724 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
1725 int snprintf(char *a, size_t b, const char *c, ...) { return 0; }
1726 int main(void) { snprintf(0, 0, 0); }
1729 AC_DEFINE(SNPRINTF_CONST, [const],
1730 [Define as const if snprintf() can declare const char *fmt])],
1732 AC_DEFINE(SNPRINTF_CONST, [/* not const */])])
1734 # Check for missing getpeereid (or equiv) support
1736 if test "x$ac_cv_func_getpeereid" != "xyes" -a "x$ac_cv_func_getpeerucred" != "xyes"; then
1737 AC_MSG_CHECKING([whether system supports SO_PEERCRED getsockopt])
1739 [#include <sys/types.h>
1740 #include <sys/socket.h>],
1741 [int i = SO_PEERCRED;],
1742 [ AC_MSG_RESULT(yes)
1743 AC_DEFINE(HAVE_SO_PEERCRED, 1, [Have PEERCRED socket option])
1750 dnl see whether mkstemp() requires XXXXXX
1751 if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
1752 AC_MSG_CHECKING([for (overly) strict mkstemp])
1756 main() { char template[]="conftest.mkstemp-test";
1757 if (mkstemp(template) == -1)
1759 unlink(template); exit(0);
1767 AC_DEFINE(HAVE_STRICT_MKSTEMP, 1, [Silly mkstemp()])
1771 AC_DEFINE(HAVE_STRICT_MKSTEMP)
1776 dnl make sure that openpty does not reacquire controlling terminal
1777 if test ! -z "$check_for_openpty_ctty_bug"; then
1778 AC_MSG_CHECKING(if openpty correctly handles controlling tty)
1782 #include <sys/fcntl.h>
1783 #include <sys/types.h>
1784 #include <sys/wait.h>
1790 int fd, ptyfd, ttyfd, status;
1793 if (pid < 0) { /* failed */
1795 } else if (pid > 0) { /* parent */
1796 waitpid(pid, &status, 0);
1797 if (WIFEXITED(status))
1798 exit(WEXITSTATUS(status));
1801 } else { /* child */
1802 close(0); close(1); close(2);
1804 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
1805 fd = open("/dev/tty", O_RDWR | O_NOCTTY);
1807 exit(3); /* Acquired ctty: broken */
1809 exit(0); /* Did not acquire ctty: OK */
1818 AC_DEFINE(SSHD_ACQUIRES_CTTY)
1821 AC_MSG_RESULT(cross-compiling, assuming yes)
1826 if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
1827 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
1828 AC_MSG_CHECKING(if getaddrinfo seems to work)
1832 #include <sys/socket.h>
1835 #include <netinet/in.h>
1837 #define TEST_PORT "2222"
1843 struct addrinfo *gai_ai, *ai, hints;
1844 char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
1846 memset(&hints, 0, sizeof(hints));
1847 hints.ai_family = PF_UNSPEC;
1848 hints.ai_socktype = SOCK_STREAM;
1849 hints.ai_flags = AI_PASSIVE;
1851 err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
1853 fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
1857 for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
1858 if (ai->ai_family != AF_INET6)
1861 err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
1862 sizeof(ntop), strport, sizeof(strport),
1863 NI_NUMERICHOST|NI_NUMERICSERV);
1866 if (err == EAI_SYSTEM)
1867 perror("getnameinfo EAI_SYSTEM");
1869 fprintf(stderr, "getnameinfo failed: %s\n",
1874 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
1877 if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
1890 AC_DEFINE(BROKEN_GETADDRINFO)
1893 AC_MSG_RESULT(cross-compiling, assuming yes)
1898 if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
1899 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then
1900 AC_MSG_CHECKING(if getaddrinfo seems to work)
1904 #include <sys/socket.h>
1907 #include <netinet/in.h>
1909 #define TEST_PORT "2222"
1915 struct addrinfo *gai_ai, *ai, hints;
1916 char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
1918 memset(&hints, 0, sizeof(hints));
1919 hints.ai_family = PF_UNSPEC;
1920 hints.ai_socktype = SOCK_STREAM;
1921 hints.ai_flags = AI_PASSIVE;
1923 err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
1925 fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
1929 for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
1930 if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
1933 err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
1934 sizeof(ntop), strport, sizeof(strport),
1935 NI_NUMERICHOST|NI_NUMERICSERV);
1937 if (ai->ai_family == AF_INET && err != 0) {
1938 perror("getnameinfo");
1947 AC_DEFINE(AIX_GETNAMEINFO_HACK, 1,
1948 [Define if you have a getaddrinfo that fails
1949 for the all-zeros IPv6 address])
1953 AC_DEFINE(BROKEN_GETADDRINFO)
1956 AC_MSG_RESULT(cross-compiling, assuming no)
1961 if test "x$check_for_conflicting_getspnam" = "x1"; then
1962 AC_MSG_CHECKING(for conflicting getspnam in shadow.h)
1966 int main(void) {exit(0);}
1973 AC_DEFINE(GETSPNAM_CONFLICTING_DEFS, 1,
1974 [Conflicting defs for getspnam])
1981 # Search for OpenSSL
1982 saved_CPPFLAGS="$CPPFLAGS"
1983 saved_LDFLAGS="$LDFLAGS"
1984 AC_ARG_WITH(ssl-dir,
1985 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
1987 if test "x$withval" != "xno" ; then
1990 ./*|../*) withval="`pwd`/$withval"
1992 if test -d "$withval/lib"; then
1993 if test -n "${need_dash_r}"; then
1994 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
1996 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
1999 if test -n "${need_dash_r}"; then
2000 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
2002 LDFLAGS="-L${withval} ${LDFLAGS}"
2005 if test -d "$withval/include"; then
2006 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
2008 CPPFLAGS="-I${withval} ${CPPFLAGS}"
2013 if test -z "$GLOBUS_LDFLAGS" ; then
2014 LIBS="-lcrypto $LIBS"
2016 AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL, 1,
2017 [Define if your ssl headers are included
2018 with #include <openssl/header.h>]),
2020 dnl Check default openssl install dir
2021 if test -n "${need_dash_r}"; then
2022 LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib ${saved_LDFLAGS}"
2024 LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}"
2026 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
2027 AC_CHECK_HEADER([openssl/opensslv.h], ,
2028 AC_MSG_ERROR([*** OpenSSL headers missing - please install first or check config.log ***]))
2029 AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL),
2031 AC_MSG_ERROR([*** Can't find recent OpenSSL libcrypto (see config.log for details) ***])
2037 # Determine OpenSSL header version
2038 AC_MSG_CHECKING([OpenSSL header version])
2043 #include <openssl/opensslv.h>
2044 #define DATA "conftest.sslincver"
2049 fd = fopen(DATA,"w");
2053 if ((rc = fprintf(fd ,"%x (%s)\n", OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_TEXT)) <0)
2060 ssl_header_ver=`cat conftest.sslincver`
2061 AC_MSG_RESULT($ssl_header_ver)
2064 AC_MSG_RESULT(not found)
2065 AC_MSG_ERROR(OpenSSL version header not found.)
2068 AC_MSG_WARN([cross compiling: not checking])
2072 # Determine OpenSSL library version
2073 AC_MSG_CHECKING([OpenSSL library version])
2078 #include <openssl/opensslv.h>
2079 #include <openssl/crypto.h>
2080 #define DATA "conftest.ssllibver"
2085 fd = fopen(DATA,"w");
2089 if ((rc = fprintf(fd ,"%x (%s)\n", SSLeay(), SSLeay_version(SSLEAY_VERSION))) <0)
2096 ssl_library_ver=`cat conftest.ssllibver`
2097 AC_MSG_RESULT($ssl_library_ver)
2100 AC_MSG_RESULT(not found)
2101 AC_MSG_ERROR(OpenSSL library not found.)
2104 AC_MSG_WARN([cross compiling: not checking])
2108 AC_ARG_WITH(openssl-header-check,
2109 [ --without-openssl-header-check Disable OpenSSL version consistency check],
2110 [ if test "x$withval" = "xno" ; then
2111 openssl_check_nonfatal=1
2116 # Sanity check OpenSSL headers
2117 AC_MSG_CHECKING([whether OpenSSL's headers match the library])
2121 #include <openssl/opensslv.h>
2122 int main(void) { exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); }
2129 if test "x$openssl_check_nonfatal" = "x"; then
2130 AC_MSG_ERROR([Your OpenSSL headers do not match your
2131 library. Check config.log for details.
2132 If you are sure your installation is consistent, you can disable the check
2133 by running "./configure --without-openssl-header-check".
2134 Also see contrib/findssl.sh for help identifying header/library mismatches.
2137 AC_MSG_WARN([Your OpenSSL headers do not match your
2138 library. Check config.log for details.
2139 Also see contrib/findssl.sh for help identifying header/library mismatches.])
2143 AC_MSG_WARN([cross compiling: not checking])
2147 AC_MSG_CHECKING([if programs using OpenSSL functions will link])
2150 #include <openssl/evp.h>
2151 int main(void) { SSLeay_add_all_algorithms(); }
2160 AC_MSG_CHECKING([if programs using OpenSSL need -ldl])
2163 #include <openssl/evp.h>
2164 int main(void) { SSLeay_add_all_algorithms(); }
2177 AC_ARG_WITH(ssl-engine,
2178 [ --with-ssl-engine Enable OpenSSL (hardware) ENGINE support ],
2179 [ if test "x$withval" != "xno" ; then
2180 AC_MSG_CHECKING(for OpenSSL ENGINE support)
2182 [ #include <openssl/engine.h>],
2184 ENGINE_load_builtin_engines();ENGINE_register_all_complete();
2186 [ AC_MSG_RESULT(yes)
2187 AC_DEFINE(USE_OPENSSL_ENGINE, 1,
2188 [Enable OpenSSL engine support])
2190 [ AC_MSG_ERROR(OpenSSL ENGINE support not found)]
2195 # Check for OpenSSL without EVP_aes_{192,256}_cbc
2196 AC_MSG_CHECKING([whether OpenSSL has crippled AES support])
2200 #include <openssl/evp.h>
2201 int main(void) { exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);}
2208 AC_DEFINE(OPENSSL_LOBOTOMISED_AES, 1,
2209 [libcrypto is missing AES 192 and 256 bit functions])
2213 AC_MSG_CHECKING([if EVP_DigestUpdate returns an int])
2217 #include <openssl/evp.h>
2218 int main(void) { if(EVP_DigestUpdate(NULL, NULL,0)) exit(0); }
2225 AC_DEFINE(OPENSSL_EVP_DIGESTUPDATE_VOID, 1,
2226 [Define if EVP_DigestUpdate returns void])
2230 # Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
2231 # because the system crypt() is more featureful.
2232 if test "x$check_for_libcrypt_before" = "x1"; then
2233 AC_CHECK_LIB(crypt, crypt)
2236 # Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
2237 # version in OpenSSL.
2238 if test "x$check_for_libcrypt_later" = "x1"; then
2239 AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt")
2242 # Search for SHA256 support in libc and/or OpenSSL
2243 AC_CHECK_FUNCS(SHA256_Update EVP_sha256)
2246 AC_CHECK_LIB(iaf, ia_openinfo, [
2248 AC_CHECK_FUNCS(set_id, [SSHDLIBS="$SSHDLIBS -liaf"
2249 AC_DEFINE(HAVE_LIBIAF, 1,
2250 [Define if system has libiaf that supports set_id])
2255 ### Configure cryptographic random number support
2257 # Check wheter OpenSSL seeds itself
2258 AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded])
2262 #include <openssl/rand.h>
2263 int main(void) { exit(RAND_status() == 1 ? 0 : 1); }
2266 OPENSSL_SEEDS_ITSELF=yes
2271 # Default to use of the rand helper if OpenSSL doesn't
2276 AC_MSG_WARN([cross compiling: assuming yes])
2277 # This is safe, since all recent OpenSSL versions will
2278 # complain at runtime if not seeded correctly.
2279 OPENSSL_SEEDS_ITSELF=yes
2283 # Check for PAM libs
2286 [ --with-pam Enable PAM support ],
2288 if test "x$withval" != "xno" ; then
2289 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
2290 test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
2291 AC_MSG_ERROR([PAM headers not found])
2295 AC_CHECK_LIB(dl, dlopen, , )
2296 AC_CHECK_LIB(pam, pam_set_item, , AC_MSG_ERROR([*** libpam missing]))
2297 AC_CHECK_FUNCS(pam_getenvlist)
2298 AC_CHECK_FUNCS(pam_putenv)
2303 SSHDLIBS="$SSHDLIBS -lpam"
2304 AC_DEFINE(USE_PAM, 1,
2305 [Define if you want to enable PAM support])
2307 if test $ac_cv_lib_dl_dlopen = yes; then
2310 # libdl already in LIBS
2313 SSHDLIBS="$SSHDLIBS -ldl"
2321 # Check for older PAM
2322 if test "x$PAM_MSG" = "xyes" ; then
2323 # Check PAM strerror arguments (old PAM)
2324 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
2328 #if defined(HAVE_SECURITY_PAM_APPL_H)
2329 #include <security/pam_appl.h>
2330 #elif defined (HAVE_PAM_PAM_APPL_H)
2331 #include <pam/pam_appl.h>
2334 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
2335 [AC_MSG_RESULT(no)],
2337 AC_DEFINE(HAVE_OLD_PAM, 1,
2338 [Define if you have an old version of PAM
2339 which takes only one argument to pam_strerror])
2341 PAM_MSG="yes (old library)"
2346 # Do we want to force the use of the rand helper?
2347 AC_ARG_WITH(rand-helper,
2348 [ --with-rand-helper Use subprocess to gather strong randomness ],
2350 if test "x$withval" = "xno" ; then
2351 # Force use of OpenSSL's internal RNG, even if
2352 # the previous test showed it to be unseeded.
2353 if test -z "$OPENSSL_SEEDS_ITSELF" ; then
2354 AC_MSG_WARN([*** Forcing use of OpenSSL's non-self-seeding PRNG])
2355 OPENSSL_SEEDS_ITSELF=yes
2364 # Which randomness source do we use?
2365 if test ! -z "$OPENSSL_SEEDS_ITSELF" && test -z "$USE_RAND_HELPER" ; then
2367 AC_DEFINE(OPENSSL_PRNG_ONLY, 1,
2368 [Define if you want OpenSSL's internally seeded PRNG only])
2369 RAND_MSG="OpenSSL internal ONLY"
2370 INSTALL_SSH_RAND_HELPER=""
2371 elif test ! -z "$USE_RAND_HELPER" ; then
2372 # install rand helper
2373 RAND_MSG="ssh-rand-helper"
2374 INSTALL_SSH_RAND_HELPER="yes"
2376 AC_SUBST(INSTALL_SSH_RAND_HELPER)
2378 ### Configuration of ssh-rand-helper
2381 AC_ARG_WITH(prngd-port,
2382 [ --with-prngd-port=PORT read entropy from PRNGD/EGD TCP localhost:PORT],
2391 AC_MSG_ERROR(You must specify a numeric port number for --with-prngd-port)
2394 if test ! -z "$withval" ; then
2395 PRNGD_PORT="$withval"
2396 AC_DEFINE_UNQUOTED(PRNGD_PORT, $PRNGD_PORT,
2397 [Port number of PRNGD/EGD random number socket])
2402 # PRNGD Unix domain socket
2403 AC_ARG_WITH(prngd-socket,
2404 [ --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)],
2408 withval="/var/run/egd-pool"
2416 AC_MSG_ERROR(You must specify an absolute path to the entropy socket)
2420 if test ! -z "$withval" ; then
2421 if test ! -z "$PRNGD_PORT" ; then
2422 AC_MSG_ERROR(You may not specify both a PRNGD/EGD port and socket)
2424 if test ! -r "$withval" ; then
2425 AC_MSG_WARN(Entropy socket is not readable)
2427 PRNGD_SOCKET="$withval"
2428 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET",
2429 [Location of PRNGD/EGD random number socket])
2433 # Check for existing socket only if we don't have a random device already
2434 if test "$USE_RAND_HELPER" = yes ; then
2435 AC_MSG_CHECKING(for PRNGD/EGD socket)
2436 # Insert other locations here
2437 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
2438 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
2439 PRNGD_SOCKET="$sock"
2440 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET")
2444 if test ! -z "$PRNGD_SOCKET" ; then
2445 AC_MSG_RESULT($PRNGD_SOCKET)
2447 AC_MSG_RESULT(not found)
2453 # Change default command timeout for hashing entropy source
2455 AC_ARG_WITH(entropy-timeout,
2456 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
2458 if test -n "$withval" && test "x$withval" != "xno" && \
2459 test "x${withval}" != "xyes"; then
2460 entropy_timeout=$withval
2464 AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout,
2465 [Builtin PRNG command timeout])
2467 SSH_PRIVSEP_USER=sshd
2468 AC_ARG_WITH(privsep-user,
2469 [ --with-privsep-user=user Specify non-privileged user for privilege separation],
2471 if test -n "$withval" && test "x$withval" != "xno" && \
2472 test "x${withval}" != "xyes"; then
2473 SSH_PRIVSEP_USER=$withval
2477 AC_DEFINE_UNQUOTED(SSH_PRIVSEP_USER, "$SSH_PRIVSEP_USER",
2478 [non-privileged user for privilege separation])
2479 AC_SUBST(SSH_PRIVSEP_USER)
2481 # We do this little dance with the search path to insure
2482 # that programs that we select for use by installed programs
2483 # (which may be run by the super-user) come from trusted
2484 # locations before they come from the user's private area.
2485 # This should help avoid accidentally configuring some
2486 # random version of a program in someone's personal bin.
2490 test -h /bin 2> /dev/null && PATH=/usr/bin
2491 test -d /sbin && PATH=$PATH:/sbin
2492 test -d /usr/sbin && PATH=$PATH:/usr/sbin
2493 PATH=$PATH:/etc:$OPATH
2495 # These programs are used by the command hashing source to gather entropy
2496 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
2497 OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
2498 OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
2499 OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
2500 OSSH_PATH_ENTROPY_PROG(PROG_JSTAT, jstat)
2501 OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
2502 OSSH_PATH_ENTROPY_PROG(PROG_SAR, sar)
2503 OSSH_PATH_ENTROPY_PROG(PROG_W, w)
2504 OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
2505 OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
2506 OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
2507 OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
2508 OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
2509 OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
2510 OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
2511 OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
2515 # Where does ssh-rand-helper get its randomness from?
2516 INSTALL_SSH_PRNG_CMDS=""
2517 if test ! -z "$INSTALL_SSH_RAND_HELPER" ; then
2518 if test ! -z "$PRNGD_PORT" ; then
2519 RAND_HELPER_MSG="TCP localhost:$PRNGD_PORT"
2520 elif test ! -z "$PRNGD_SOCKET" ; then
2521 RAND_HELPER_MSG="Unix domain socket \"$PRNGD_SOCKET\""
2523 RAND_HELPER_MSG="Command hashing (timeout $entropy_timeout)"
2524 RAND_HELPER_CMDHASH=yes
2525 INSTALL_SSH_PRNG_CMDS="yes"
2528 AC_SUBST(INSTALL_SSH_PRNG_CMDS)
2531 # Cheap hack to ensure NEWS-OS libraries are arranged right.
2532 if test ! -z "$SONY" ; then
2533 LIBS="$LIBS -liberty";
2536 # Check for long long datatypes
2537 AC_CHECK_TYPES([long long, unsigned long long, long double])
2539 # Check datatype sizes
2540 AC_CHECK_SIZEOF(char, 1)
2541 AC_CHECK_SIZEOF(short int, 2)
2542 AC_CHECK_SIZEOF(int, 4)
2543 AC_CHECK_SIZEOF(long int, 4)
2544 AC_CHECK_SIZEOF(long long int, 8)
2546 # Sanity check long long for some platforms (AIX)
2547 if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
2548 ac_cv_sizeof_long_long_int=0
2551 # compute LLONG_MIN and LLONG_MAX if we don't know them.
2552 if test -z "$have_llong_max"; then
2553 AC_MSG_CHECKING([for max value of long long])
2557 /* Why is this so damn hard? */
2561 #define __USE_ISOC99
2563 #define DATA "conftest.llminmax"
2564 #define my_abs(a) ((a) < 0 ? ((a) * -1) : (a))
2567 * printf in libc on some platforms (eg old Tru64) does not understand %lld so
2568 * we do this the hard way.
2571 fprint_ll(FILE *f, long long n)
2574 int l[sizeof(long long) * 8];
2577 if (fprintf(f, "-") < 0)
2579 for (i = 0; n != 0; i++) {
2580 l[i] = my_abs(n % 10);
2584 if (fprintf(f, "%d", l[--i]) < 0)
2587 if (fprintf(f, " ") < 0)
2594 long long i, llmin, llmax = 0;
2596 if((f = fopen(DATA,"w")) == NULL)
2599 #if defined(LLONG_MIN) && defined(LLONG_MAX)
2600 fprintf(stderr, "Using system header for LLONG_MIN and LLONG_MAX\n");
2604 fprintf(stderr, "Calculating LLONG_MIN and LLONG_MAX\n");
2605 /* This will work on one's complement and two's complement */
2606 for (i = 1; i > llmax; i <<= 1, i++)
2608 llmin = llmax + 1LL; /* wrap */
2612 if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax
2613 || llmax - 1 > llmax || llmin == llmax || llmin == 0
2614 || llmax == 0 || llmax < LONG_MAX || llmin > LONG_MIN) {
2615 fprintf(f, "unknown unknown\n");
2619 if (fprint_ll(f, llmin) < 0)
2621 if (fprint_ll(f, llmax) < 0)
2629 llong_min=`$AWK '{print $1}' conftest.llminmax`
2630 llong_max=`$AWK '{print $2}' conftest.llminmax`
2632 AC_MSG_RESULT($llong_max)
2633 AC_DEFINE_UNQUOTED(LLONG_MAX, [${llong_max}LL],
2634 [max value of long long calculated by configure])
2635 AC_MSG_CHECKING([for min value of long long])
2636 AC_MSG_RESULT($llong_min)
2637 AC_DEFINE_UNQUOTED(LLONG_MIN, [${llong_min}LL],
2638 [min value of long long calculated by configure])
2641 AC_MSG_RESULT(not found)
2644 AC_MSG_WARN([cross compiling: not checking])
2650 # More checks for data types
2651 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
2653 [ #include <sys/types.h> ],
2655 [ ac_cv_have_u_int="yes" ],
2656 [ ac_cv_have_u_int="no" ]
2659 if test "x$ac_cv_have_u_int" = "xyes" ; then
2660 AC_DEFINE(HAVE_U_INT, 1, [define if you have u_int data type])
2664 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
2666 [ #include <sys/types.h> ],
2667 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
2668 [ ac_cv_have_intxx_t="yes" ],
2669 [ ac_cv_have_intxx_t="no" ]
2672 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
2673 AC_DEFINE(HAVE_INTXX_T, 1, [define if you have intxx_t data type])
2677 if (test -z "$have_intxx_t" && \
2678 test "x$ac_cv_header_stdint_h" = "xyes")
2680 AC_MSG_CHECKING([for intXX_t types in stdint.h])
2682 [ #include <stdint.h> ],
2683 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
2685 AC_DEFINE(HAVE_INTXX_T)
2688 [ AC_MSG_RESULT(no) ]
2692 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
2695 #include <sys/types.h>
2696 #ifdef HAVE_STDINT_H
2697 # include <stdint.h>
2699 #include <sys/socket.h>
2700 #ifdef HAVE_SYS_BITYPES_H
2701 # include <sys/bitypes.h>
2704 [ int64_t a; a = 1;],
2705 [ ac_cv_have_int64_t="yes" ],
2706 [ ac_cv_have_int64_t="no" ]
2709 if test "x$ac_cv_have_int64_t" = "xyes" ; then
2710 AC_DEFINE(HAVE_INT64_T, 1, [define if you have int64_t data type])
2713 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
2715 [ #include <sys/types.h> ],
2716 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
2717 [ ac_cv_have_u_intxx_t="yes" ],
2718 [ ac_cv_have_u_intxx_t="no" ]
2721 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
2722 AC_DEFINE(HAVE_U_INTXX_T, 1, [define if you have u_intxx_t data type])
2726 if test -z "$have_u_intxx_t" ; then
2727 AC_MSG_CHECKING([for u_intXX_t types in sys/socket.h])
2729 [ #include <sys/socket.h> ],
2730 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
2732 AC_DEFINE(HAVE_U_INTXX_T)
2735 [ AC_MSG_RESULT(no) ]
2739 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
2741 [ #include <sys/types.h> ],
2742 [ u_int64_t a; a = 1;],
2743 [ ac_cv_have_u_int64_t="yes" ],
2744 [ ac_cv_have_u_int64_t="no" ]
2747 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
2748 AC_DEFINE(HAVE_U_INT64_T, 1, [define if you have u_int64_t data type])
2752 if test -z "$have_u_int64_t" ; then
2753 AC_MSG_CHECKING([for u_int64_t type in sys/bitypes.h])
2755 [ #include <sys/bitypes.h> ],
2756 [ u_int64_t a; a = 1],
2758 AC_DEFINE(HAVE_U_INT64_T)
2761 [ AC_MSG_RESULT(no) ]
2765 if test -z "$have_u_intxx_t" ; then
2766 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
2769 #include <sys/types.h>
2771 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
2772 [ ac_cv_have_uintxx_t="yes" ],
2773 [ ac_cv_have_uintxx_t="no" ]
2776 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
2777 AC_DEFINE(HAVE_UINTXX_T, 1,
2778 [define if you have uintxx_t data type])
2782 if test -z "$have_uintxx_t" ; then
2783 AC_MSG_CHECKING([for uintXX_t types in stdint.h])
2785 [ #include <stdint.h> ],
2786 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;],
2788 AC_DEFINE(HAVE_UINTXX_T)
2791 [ AC_MSG_RESULT(no) ]
2795 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
2796 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
2798 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
2801 #include <sys/bitypes.h>
2804 int8_t a; int16_t b; int32_t c;
2805 u_int8_t e; u_int16_t f; u_int32_t g;
2806 a = b = c = e = f = g = 1;
2809 AC_DEFINE(HAVE_U_INTXX_T)
2810 AC_DEFINE(HAVE_INTXX_T)
2818 AC_CACHE_CHECK([for u_char], ac_cv_have_u_char, [
2821 #include <sys/types.h>
2823 [ u_char foo; foo = 125; ],
2824 [ ac_cv_have_u_char="yes" ],
2825 [ ac_cv_have_u_char="no" ]
2828 if test "x$ac_cv_have_u_char" = "xyes" ; then
2829 AC_DEFINE(HAVE_U_CHAR, 1, [define if you have u_char data type])
2834 AC_CHECK_TYPES(sig_atomic_t,,,[#include <signal.h>])
2835 AC_CHECK_TYPES([fsblkcnt_t, fsfilcnt_t],,,[
2836 #include <sys/types.h>
2837 #ifdef HAVE_SYS_BITYPES_H
2838 #include <sys/bitypes.h>
2840 #ifdef HAVE_SYS_STATFS_H
2841 #include <sys/statfs.h>
2843 #ifdef HAVE_SYS_STATVFS_H
2844 #include <sys/statvfs.h>
2848 AC_CHECK_TYPES([in_addr_t, in_port_t],,,
2849 [#include <sys/types.h>
2850 #include <netinet/in.h>])
2852 AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
2855 #include <sys/types.h>
2857 [ size_t foo; foo = 1235; ],
2858 [ ac_cv_have_size_t="yes" ],
2859 [ ac_cv_have_size_t="no" ]
2862 if test "x$ac_cv_have_size_t" = "xyes" ; then
2863 AC_DEFINE(HAVE_SIZE_T, 1, [define if you have size_t data type])
2866 AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
2869 #include <sys/types.h>
2871 [ ssize_t foo; foo = 1235; ],
2872 [ ac_cv_have_ssize_t="yes" ],
2873 [ ac_cv_have_ssize_t="no" ]
2876 if test "x$ac_cv_have_ssize_t" = "xyes" ; then
2877 AC_DEFINE(HAVE_SSIZE_T, 1, [define if you have ssize_t data type])
2880 AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
2885 [ clock_t foo; foo = 1235; ],
2886 [ ac_cv_have_clock_t="yes" ],
2887 [ ac_cv_have_clock_t="no" ]
2890 if test "x$ac_cv_have_clock_t" = "xyes" ; then
2891 AC_DEFINE(HAVE_CLOCK_T, 1, [define if you have clock_t data type])
2894 AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
2897 #include <sys/types.h>
2898 #include <sys/socket.h>
2900 [ sa_family_t foo; foo = 1235; ],
2901 [ ac_cv_have_sa_family_t="yes" ],
2904 #include <sys/types.h>
2905 #include <sys/socket.h>
2906 #include <netinet/in.h>
2908 [ sa_family_t foo; foo = 1235; ],
2909 [ ac_cv_have_sa_family_t="yes" ],
2911 [ ac_cv_have_sa_family_t="no" ]
2915 if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
2916 AC_DEFINE(HAVE_SA_FAMILY_T, 1,
2917 [define if you have sa_family_t data type])
2920 AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
2923 #include <sys/types.h>
2925 [ pid_t foo; foo = 1235; ],
2926 [ ac_cv_have_pid_t="yes" ],
2927 [ ac_cv_have_pid_t="no" ]
2930 if test "x$ac_cv_have_pid_t" = "xyes" ; then
2931 AC_DEFINE(HAVE_PID_T, 1, [define if you have pid_t data type])
2934 AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
2937 #include <sys/types.h>
2939 [ mode_t foo; foo = 1235; ],
2940 [ ac_cv_have_mode_t="yes" ],
2941 [ ac_cv_have_mode_t="no" ]
2944 if test "x$ac_cv_have_mode_t" = "xyes" ; then
2945 AC_DEFINE(HAVE_MODE_T, 1, [define if you have mode_t data type])
2949 AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
2952 #include <sys/types.h>
2953 #include <sys/socket.h>
2955 [ struct sockaddr_storage s; ],
2956 [ ac_cv_have_struct_sockaddr_storage="yes" ],
2957 [ ac_cv_have_struct_sockaddr_storage="no" ]
2960 if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
2961 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE, 1,
2962 [define if you have struct sockaddr_storage data type])
2965 AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
2968 #include <sys/types.h>
2969 #include <netinet/in.h>
2971 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
2972 [ ac_cv_have_struct_sockaddr_in6="yes" ],
2973 [ ac_cv_have_struct_sockaddr_in6="no" ]
2976 if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
2977 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6, 1,
2978 [define if you have struct sockaddr_in6 data type])
2981 AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
2984 #include <sys/types.h>
2985 #include <netinet/in.h>
2987 [ struct in6_addr s; s.s6_addr[0] = 0; ],
2988 [ ac_cv_have_struct_in6_addr="yes" ],
2989 [ ac_cv_have_struct_in6_addr="no" ]
2992 if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
2993 AC_DEFINE(HAVE_STRUCT_IN6_ADDR, 1,
2994 [define if you have struct in6_addr data type])
2996 dnl Now check for sin6_scope_id
2997 AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,,
2999 #ifdef HAVE_SYS_TYPES_H
3000 #include <sys/types.h>
3002 #include <netinet/in.h>
3006 AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
3009 #include <sys/types.h>
3010 #include <sys/socket.h>
3013 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
3014 [ ac_cv_have_struct_addrinfo="yes" ],
3015 [ ac_cv_have_struct_addrinfo="no" ]
3018 if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
3019 AC_DEFINE(HAVE_STRUCT_ADDRINFO, 1,
3020 [define if you have struct addrinfo data type])
3023 AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [
3025 [ #include <sys/time.h> ],
3026 [ struct timeval tv; tv.tv_sec = 1;],
3027 [ ac_cv_have_struct_timeval="yes" ],
3028 [ ac_cv_have_struct_timeval="no" ]
3031 if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
3032 AC_DEFINE(HAVE_STRUCT_TIMEVAL, 1, [define if you have struct timeval])
3033 have_struct_timeval=1
3036 AC_CHECK_TYPES(struct timespec)
3038 # We need int64_t or else certian parts of the compile will fail.
3039 if test "x$ac_cv_have_int64_t" = "xno" && \
3040 test "x$ac_cv_sizeof_long_int" != "x8" && \
3041 test "x$ac_cv_sizeof_long_long_int" = "x0" ; then
3042 echo "OpenSSH requires int64_t support. Contact your vendor or install"
3043 echo "an alternative compiler (I.E., GCC) before continuing."
3047 dnl test snprintf (broken on SCO w/gcc)
3052 #ifdef HAVE_SNPRINTF
3056 char expected_out[50];
3058 #if (SIZEOF_LONG_INT == 8)
3059 long int num = 0x7fffffffffffffff;
3061 long long num = 0x7fffffffffffffffll;
3063 strcpy(expected_out, "9223372036854775807");
3064 snprintf(buf, mazsize, "%lld", num);
3065 if(strcmp(buf, expected_out) != 0)
3072 ]])], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ],
3073 AC_MSG_WARN([cross compiling: Assuming working snprintf()])
3077 dnl Checks for structure members
3078 OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
3079 OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
3080 OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
3081 OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
3082 OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
3083 OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
3084 OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
3085 OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
3086 OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX)
3087 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
3088 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
3089 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
3090 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
3091 OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
3092 OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
3093 OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
3094 OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
3096 AC_CHECK_MEMBERS([struct stat.st_blksize])
3097 AC_CHECK_MEMBER([struct __res_state.retrans], [], [AC_DEFINE(__res_state, state,
3098 [Define if we don't have struct __res_state in resolv.h])],
3101 #if HAVE_SYS_TYPES_H
3102 # include <sys/types.h>
3104 #include <netinet/in.h>
3105 #include <arpa/nameser.h>
3109 AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
3110 ac_cv_have_ss_family_in_struct_ss, [
3113 #include <sys/types.h>
3114 #include <sys/socket.h>
3116 [ struct sockaddr_storage s; s.ss_family = 1; ],
3117 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
3118 [ ac_cv_have_ss_family_in_struct_ss="no" ],
3121 if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
3122 AC_DEFINE(HAVE_SS_FAMILY_IN_SS, 1, [Fields in struct sockaddr_storage])
3125 AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
3126 ac_cv_have___ss_family_in_struct_ss, [
3129 #include <sys/types.h>
3130 #include <sys/socket.h>
3132 [ struct sockaddr_storage s; s.__ss_family = 1; ],
3133 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
3134 [ ac_cv_have___ss_family_in_struct_ss="no" ]
3137 if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
3138 AC_DEFINE(HAVE___SS_FAMILY_IN_SS, 1,
3139 [Fields in struct sockaddr_storage])
3142 AC_CACHE_CHECK([for pw_class field in struct passwd],
3143 ac_cv_have_pw_class_in_struct_passwd, [
3148 [ struct passwd p; p.pw_class = 0; ],
3149 [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
3150 [ ac_cv_have_pw_class_in_struct_passwd="no" ]
3153 if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
3154 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD, 1,
3155 [Define if your password has a pw_class field])
3158 AC_CACHE_CHECK([for pw_expire field in struct passwd],
3159 ac_cv_have_pw_expire_in_struct_passwd, [
3164 [ struct passwd p; p.pw_expire = 0; ],
3165 [ ac_cv_have_pw_expire_in_struct_passwd="yes" ],
3166 [ ac_cv_have_pw_expire_in_struct_passwd="no" ]
3169 if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
3170 AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD, 1,
3171 [Define if your password has a pw_expire field])
3174 AC_CACHE_CHECK([for pw_change field in struct passwd],
3175 ac_cv_have_pw_change_in_struct_passwd, [
3180 [ struct passwd p; p.pw_change = 0; ],
3181 [ ac_cv_have_pw_change_in_struct_passwd="yes" ],
3182 [ ac_cv_have_pw_change_in_struct_passwd="no" ]
3185 if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
3186 AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD, 1,
3187 [Define if your password has a pw_change field])
3190 dnl make sure we're using the real structure members and not defines
3191 AC_CACHE_CHECK([for msg_accrights field in struct msghdr],
3192 ac_cv_have_accrights_in_msghdr, [
3195 #include <sys/types.h>
3196 #include <sys/socket.h>
3197 #include <sys/uio.h>
3199 #ifdef msg_accrights
3200 #error "msg_accrights is a macro"
3204 m.msg_accrights = 0;
3208 [ ac_cv_have_accrights_in_msghdr="yes" ],
3209 [ ac_cv_have_accrights_in_msghdr="no" ]
3212 if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
3213 AC_DEFINE(HAVE_ACCRIGHTS_IN_MSGHDR, 1,
3214 [Define if your system uses access rights style
3215 file descriptor passing])
3218 AC_MSG_CHECKING(if struct statvfs.f_fsid is integral type)
3220 #include <sys/types.h>
3221 #include <sys/stat.h>
3222 #ifdef HAVE_SYS_TIME_H
3223 # include <sys/time.h>
3225 #ifdef HAVE_SYS_MOUNT_H
3226 #include <sys/mount.h>
3228 #ifdef HAVE_SYS_STATVFS_H
3229 #include <sys/statvfs.h>
3231 ], [struct statvfs s; s.f_fsid = 0;],
3232 [ AC_MSG_RESULT(yes) ],
3235 AC_MSG_CHECKING(if fsid_t has member val)
3237 #include <sys/types.h>
3238 #include <sys/statvfs.h>],
3239 [fsid_t t; t.val[0] = 0;],
3240 [ AC_MSG_RESULT(yes)
3241 AC_DEFINE(FSID_HAS_VAL, 1, fsid_t has member val) ],
3242 [ AC_MSG_RESULT(no) ])
3244 AC_MSG_CHECKING(if f_fsid has member __val)
3246 #include <sys/types.h>
3247 #include <sys/statvfs.h>],
3248 [fsid_t t; t.__val[0] = 0;],
3249 [ AC_MSG_RESULT(yes)
3250 AC_DEFINE(FSID_HAS___VAL, 1, fsid_t has member __val) ],
3251 [ AC_MSG_RESULT(no) ])
3254 AC_CACHE_CHECK([for msg_control field in struct msghdr],
3255 ac_cv_have_control_in_msghdr, [
3258 #include <sys/types.h>
3259 #include <sys/socket.h>
3260 #include <sys/uio.h>
3263 #error "msg_control is a macro"
3271 [ ac_cv_have_control_in_msghdr="yes" ],
3272 [ ac_cv_have_control_in_msghdr="no" ]
3275 if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
3276 AC_DEFINE(HAVE_CONTROL_IN_MSGHDR, 1,
3277 [Define if your system uses ancillary data style
3278 file descriptor passing])
3281 AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
3283 [ extern char *__progname; printf("%s", __progname); ],
3284 [ ac_cv_libc_defines___progname="yes" ],
3285 [ ac_cv_libc_defines___progname="no" ]
3288 if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
3289 AC_DEFINE(HAVE___PROGNAME, 1, [Define if libc defines __progname])
3292 AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [
3296 [ printf("%s", __FUNCTION__); ],
3297 [ ac_cv_cc_implements___FUNCTION__="yes" ],
3298 [ ac_cv_cc_implements___FUNCTION__="no" ]
3301 if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
3302 AC_DEFINE(HAVE___FUNCTION__, 1,
3303 [Define if compiler implements __FUNCTION__])
3306 AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [
3310 [ printf("%s", __func__); ],
3311 [ ac_cv_cc_implements___func__="yes" ],
3312 [ ac_cv_cc_implements___func__="no" ]
3315 if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
3316 AC_DEFINE(HAVE___func__, 1, [Define if compiler implements __func__])
3319 AC_CACHE_CHECK([whether va_copy exists], ac_cv_have_va_copy, [
3321 [#include <stdarg.h>
3324 [ ac_cv_have_va_copy="yes" ],
3325 [ ac_cv_have_va_copy="no" ]
3328 if test "x$ac_cv_have_va_copy" = "xyes" ; then
3329 AC_DEFINE(HAVE_VA_COPY, 1, [Define if va_copy exists])
3332 AC_CACHE_CHECK([whether __va_copy exists], ac_cv_have___va_copy, [
3334 [#include <stdarg.h>
3337 [ ac_cv_have___va_copy="yes" ],
3338 [ ac_cv_have___va_copy="no" ]
3341 if test "x$ac_cv_have___va_copy" = "xyes" ; then
3342 AC_DEFINE(HAVE___VA_COPY, 1, [Define if __va_copy exists])
3345 AC_CACHE_CHECK([whether getopt has optreset support],
3346 ac_cv_have_getopt_optreset, [
3351 [ extern int optreset; optreset = 0; ],
3352 [ ac_cv_have_getopt_optreset="yes" ],
3353 [ ac_cv_have_getopt_optreset="no" ]
3356 if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
3357 AC_DEFINE(HAVE_GETOPT_OPTRESET, 1,
3358 [Define if your getopt(3) defines and uses optreset])
3361 AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
3363 [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);],
3364 [ ac_cv_libc_defines_sys_errlist="yes" ],
3365 [ ac_cv_libc_defines_sys_errlist="no" ]
3368 if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
3369 AC_DEFINE(HAVE_SYS_ERRLIST, 1,
3370 [Define if your system defines sys_errlist[]])
3374 AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
3376 [ extern int sys_nerr; printf("%i", sys_nerr);],
3377 [ ac_cv_libc_defines_sys_nerr="yes" ],
3378 [ ac_cv_libc_defines_sys_nerr="no" ]
3381 if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
3382 AC_DEFINE(HAVE_SYS_NERR, 1, [Define if your system defines sys_nerr])
3386 # Check whether user wants sectok support
3388 [ --with-sectok Enable smartcard support using libsectok],
3390 if test "x$withval" != "xno" ; then
3391 if test "x$withval" != "xyes" ; then
3392 CPPFLAGS="$CPPFLAGS -I${withval}"
3393 LDFLAGS="$LDFLAGS -L${withval}"
3394 if test ! -z "$need_dash_r" ; then
3395 LDFLAGS="$LDFLAGS -R${withval}"
3397 if test ! -z "$blibpath" ; then
3398 blibpath="$blibpath:${withval}"
3401 AC_CHECK_HEADERS(sectok.h)
3402 if test "$ac_cv_header_sectok_h" != yes; then
3403 AC_MSG_ERROR(Can't find sectok.h)
3405 AC_CHECK_LIB(sectok, sectok_open)
3406 if test "$ac_cv_lib_sectok_sectok_open" != yes; then
3407 AC_MSG_ERROR(Can't find libsectok)
3409 AC_DEFINE(SMARTCARD, 1,
3410 [Define if you want smartcard support])
3411 AC_DEFINE(USE_SECTOK, 1,
3412 [Define if you want smartcard support
3414 SCARD_MSG="yes, using sectok"
3419 # Check whether user wants OpenSC support
3422 [ --with-opensc[[=PFX]] Enable smartcard support using OpenSC (optionally in PATH)],
3424 if test "x$withval" != "xno" ; then
3425 if test "x$withval" != "xyes" ; then
3426 OPENSC_CONFIG=$withval/bin/opensc-config
3428 AC_PATH_PROG(OPENSC_CONFIG, opensc-config, no)
3430 if test "$OPENSC_CONFIG" != "no"; then
3431 LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags`
3432 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs`
3433 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
3434 LIBS="$LIBS $LIBOPENSC_LIBS"
3435 AC_DEFINE(SMARTCARD)
3436 AC_DEFINE(USE_OPENSC, 1,
3437 [Define if you want smartcard support
3439 SCARD_MSG="yes, using OpenSC"
3445 # Check libraries needed by DNS fingerprint support
3446 AC_SEARCH_LIBS(getrrsetbyname, resolv,
3447 [AC_DEFINE(HAVE_GETRRSETBYNAME, 1,
3448 [Define if getrrsetbyname() exists])],
3450 # Needed by our getrrsetbyname()
3451 AC_SEARCH_LIBS(res_query, resolv)
3452 AC_SEARCH_LIBS(dn_expand, resolv)
3453 AC_MSG_CHECKING(if res_query will link)
3455 #include "confdefs.h"
3456 #include <sys/types.h>
3457 #include <netinet/in.h>
3458 #include <arpa/nameser.h>
3463 res_query (0, 0, 0, 0, 0);
3470 LIBS="$LIBS -lresolv"
3471 AC_MSG_CHECKING(for res_query in -lresolv)
3473 #include "confdefs.h"
3474 #include <sys/types.h>
3475 #include <netinet/in.h>
3476 #include <arpa/nameser.h>
3481 res_query (0, 0, 0, 0, 0);
3485 [AC_MSG_RESULT(yes)],
3489 AC_CHECK_FUNCS(_getshort _getlong)
3490 AC_CHECK_DECLS([_getshort, _getlong], , ,
3491 [#include <sys/types.h>
3492 #include <arpa/nameser.h>])
3493 AC_CHECK_MEMBER(HEADER.ad,
3494 [AC_DEFINE(HAVE_HEADER_AD, 1,
3495 [Define if HEADER.ad exists in arpa/nameser.h])],,
3496 [#include <arpa/nameser.h>])
3499 AC_MSG_CHECKING(if struct __res_state _res is an extern)
3502 #if HAVE_SYS_TYPES_H
3503 # include <sys/types.h>
3505 #include <netinet/in.h>
3506 #include <arpa/nameser.h>
3508 extern struct __res_state _res;
3509 int main() { return 0; }
3512 AC_DEFINE(HAVE__RES_EXTERN, 1,
3513 [Define if you have struct __res_state _res as an extern])
3515 [ AC_MSG_RESULT(no) ]
3518 # Check whether user wants SELinux support
3521 AC_ARG_WITH(selinux,
3522 [ --with-selinux Enable SELinux support],
3523 [ if test "x$withval" != "xno" ; then
3525 AC_DEFINE(WITH_SELINUX,1,[Define if you want SELinux support.])
3527 AC_CHECK_HEADER([selinux/selinux.h], ,
3528 AC_MSG_ERROR(SELinux support requires selinux.h header))
3529 AC_CHECK_LIB(selinux, setexeccon, [ LIBSELINUX="-lselinux" ],
3530 AC_MSG_ERROR(SELinux support requires libselinux library))
3531 SSHDLIBS="$SSHDLIBS $LIBSELINUX"
3532 AC_CHECK_FUNCS(getseuserbyname get_default_context_with_level)
3537 # Finish configuring Globus GSSAPI
3538 if test "x$gsi_path" != "xno" ; then
3539 if test ! -z "$need_dash_r" ; then
3540 LDFLAGS="$LDFLAGS -R${gsi_path}/lib"
3542 if test ! -z "$blibpath" ; then
3543 blibpath="$blibpath:${gsi_path}/lib"
3545 # test that we got the libraries OK
3551 AC_MSG_ERROR(link with Globus libraries failed)
3554 AC_CHECK_FUNCS(globus_gss_assist_map_and_authorize)
3556 AC_SUBST(INSTALL_GSISSH)
3558 # Check whether the user wants GSSAPI mechglue support
3559 AC_ARG_WITH(mechglue,
3560 [ --with-mechglue=PATH Build with GSSAPI mechglue library],
3562 AC_MSG_CHECKING(for mechglue library)
3564 if test -e ${withval}/libgssapi.a ; then
3565 mechglue_lib=${withval}/libgssapi.a
3566 elif test -e ${withval}/lib/libgssapi.a ; then
3567 mechglue_lib=${withval}/lib/libgssapi.a
3569 AC_MSG_ERROR("Can't find libgssapi in ${withval}");
3571 LIBS="${mechglue_lib} $LIBS"
3572 AC_MSG_RESULT(${mechglue_lib})
3574 AC_CHECK_LIB(dl, dlopen, , )
3575 if test $ac_cv_lib_dl_dlopen = yes; then
3576 LDFLAGS="$LDFLAGS -ldl -Wl,-Bsymbolic"
3580 AC_DEFINE(MECHGLUE, 1, [Define this if you're building with GSSAPI MechGlue.])
3586 # Check whether user wants Kerberos 5 support
3588 AC_ARG_WITH(kerberos5,
3589 [ --with-kerberos5=PATH Enable Kerberos 5 support],
3590 [ if test "x$withval" != "xno" ; then
3591 if test "x$withval" = "xyes" ; then
3592 KRB5ROOT="/usr/local"
3597 AC_DEFINE(KRB5, 1, [Define if you want Kerberos 5 support])
3600 AC_PATH_PROG([KRB5CONF],[krb5-config],
3601 [$KRB5ROOT/bin/krb5-config],
3602 [$KRB5ROOT/bin:$PATH])
3603 if test -x $KRB5CONF ; then
3605 AC_MSG_CHECKING(for gssapi support)
3606 if $KRB5CONF | grep gssapi >/dev/null ; then
3608 AC_DEFINE(GSSAPI, 1,
3609 [Define this if you want GSSAPI
3610 support in the version 2 protocol])
3616 K5CFLAGS="`$KRB5CONF --cflags $k5confopts`"
3617 K5LIBS="`$KRB5CONF --libs $k5confopts`"
3618 CPPFLAGS="$CPPFLAGS $K5CFLAGS"
3619 AC_MSG_CHECKING(whether we are using Heimdal)
3620 AC_TRY_COMPILE([ #include <krb5.h> ],
3621 [ char *tmp = heimdal_version; ],
3622 [ AC_MSG_RESULT(yes)
3623 AC_DEFINE(HEIMDAL, 1,
3624 [Define this if you are using the
3625 Heimdal version of Kerberos V5]) ],
3629 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
3630 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
3631 AC_MSG_CHECKING(whether we are using Heimdal)
3632 AC_TRY_COMPILE([ #include <krb5.h> ],
3633 [ char *tmp = heimdal_version; ],
3634 [ AC_MSG_RESULT(yes)
3636 K5LIBS="-lkrb5 -ldes"
3637 K5LIBS="$K5LIBS -lcom_err -lasn1"
3638 AC_CHECK_LIB(roken, net_write,
3639 [K5LIBS="$K5LIBS -lroken"])
3642 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
3645 AC_SEARCH_LIBS(dn_expand, resolv)
3647 AC_CHECK_LIB(gssapi_krb5, gss_init_sec_context,
3649 K5LIBS="-lgssapi_krb5 $K5LIBS" ],
3650 [ AC_CHECK_LIB(gssapi, gss_init_sec_context,
3652 K5LIBS="-lgssapi $K5LIBS" ],
3653 AC_MSG_WARN([Cannot find any suitable gss-api library - build may fail]),
3658 AC_CHECK_HEADER(gssapi.h, ,
3659 [ unset ac_cv_header_gssapi_h
3660 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
3661 AC_CHECK_HEADERS(gssapi.h, ,
3662 AC_MSG_WARN([Cannot find any suitable gss-api header - build may fail])
3668 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
3669 AC_CHECK_HEADER(gssapi_krb5.h, ,
3670 [ CPPFLAGS="$oldCPP" ])
3672 # If we're using some other GSSAPI
3673 if test "$GSSAPI" -a "$GSSAPI" != "mechglue"; then
3674 AC_MSG_ERROR([$GSSAPI GSSAPI library conflicts with Kerberos support. Use mechglue instead.])
3677 if test -z "$GSSAPI"; then
3682 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
3683 AC_CHECK_HEADER(gssapi_krb5.h, ,
3684 [ CPPFLAGS="$oldCPP" ])
3687 if test ! -z "$need_dash_r" ; then
3688 LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
3690 if test ! -z "$blibpath" ; then
3691 blibpath="$blibpath:${KRB5ROOT}/lib"
3694 AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h)
3695 AC_CHECK_HEADERS(gssapi_krb5.h gssapi/gssapi_krb5.h)
3696 AC_CHECK_HEADERS(gssapi_generic.h gssapi/gssapi_generic.h)
3698 LIBS="$LIBS $K5LIBS"
3699 AC_SEARCH_LIBS(k_hasafs, kafs, AC_DEFINE(USE_AFS, 1,
3700 [Define this if you want to use libkafs' AFS support]))
3705 # Check whether user wants AFS_KRB5 support
3707 AC_ARG_WITH(afs-krb5,
3708 [ --with-afs-krb5[[=AKLOG_PATH]] Enable aklog to get token (default=/usr/bin/aklog).],
3710 if test "x$withval" != "xno" ; then
3712 if test "x$withval" != "xyes" ; then
3713 AC_DEFINE_UNQUOTED(AKLOG_PATH, "$withval",
3714 [Define this if you want to use AFS/Kerberos 5 option, which runs aklog.])
3716 AC_DEFINE_UNQUOTED(AKLOG_PATH,
3718 [Define this if you want to use AFS/Kerberos 5 option, which runs aklog.])
3721 if test -z "$KRB5ROOT" ; then
3722 AC_MSG_WARN([AFS_KRB5 requires Kerberos 5 support, build may fail])
3725 LIBS="-lkrbafs -lkrb4 $LIBS"
3726 if test ! -z "$AFS_LIBS" ; then
3727 LIBS="$LIBS $AFS_LIBS"
3729 AC_DEFINE(AFS_KRB5, 1,
3730 [Define this if you want to use AFS/Kerberos 5 option, which runs aklog.])
3736 AC_ARG_WITH(session-hooks,
3737 [ --with-session-hooks Enable hooks for executing external commands before/after a session],
3738 [ AC_DEFINE(SESSION_HOOKS, 1, [Define this if you want support for startup/shutdown hooks]) ]
3741 # Looking for programs, paths and files
3743 PRIVSEP_PATH=/var/empty
3744 AC_ARG_WITH(privsep-path,
3745 [ --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)],
3747 if test -n "$withval" && test "x$withval" != "xno" && \
3748 test "x${withval}" != "xyes"; then
3749 PRIVSEP_PATH=$withval
3753 AC_SUBST(PRIVSEP_PATH)
3756 [ --with-xauth=PATH Specify path to xauth program ],
3758 if test -n "$withval" && test "x$withval" != "xno" && \
3759 test "x${withval}" != "xyes"; then
3765 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X/bin"
3766 TestPath="${TestPath}${PATH_SEPARATOR}/usr/bin/X11"
3767 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X11R6/bin"
3768 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin"
3769 AC_PATH_PROG(xauth_path, xauth, , $TestPath)
3770 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
3771 xauth_path="/usr/openwin/bin/xauth"
3776 # strip causes problems with GSI libraries...
3777 if test -z "$GLOBUS_LDFLAGS" ; then
3780 AC_ARG_ENABLE(strip,
3781 [ --disable-strip Disable calling strip(1) on install],
3783 if test "x$enableval" = "xno" ; then
3790 if test -z "$xauth_path" ; then
3791 XAUTH_PATH="undefined"
3792 AC_SUBST(XAUTH_PATH)
3794 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path",
3795 [Define if xauth is found in your path])
3796 XAUTH_PATH=$xauth_path
3797 AC_SUBST(XAUTH_PATH)
3800 # Check for mail directory (last resort if we cannot get it from headers)
3801 if test ! -z "$MAIL" ; then
3802 maildir=`dirname $MAIL`
3803 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir",
3804 [Set this to your mail directory if you don't have maillock.h])
3807 if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then
3808 AC_MSG_WARN([cross compiling: Disabling /dev/ptmx test])
3809 disable_ptmx_check=yes
3811 if test -z "$no_dev_ptmx" ; then
3812 if test "x$disable_ptmx_check" != "xyes" ; then
3813 AC_CHECK_FILE("/dev/ptmx",
3815 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX, 1,
3816 [Define if you have /dev/ptmx])
3823 if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then
3824 AC_CHECK_FILE("/dev/ptc",
3826 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC, 1,
3827 [Define if you have /dev/ptc])
3832 AC_MSG_WARN([cross compiling: Disabling /dev/ptc test])
3835 # Options from here on. Some of these are preset by platform above
3836 AC_ARG_WITH(mantype,
3837 [ --with-mantype=man|cat|doc Set man page type],
3844 AC_MSG_ERROR(invalid man type: $withval)
3849 if test -z "$MANTYPE"; then
3850 TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb"
3851 AC_PATH_PROGS(NROFF, nroff awf, /bin/false, $TestPath)
3852 if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then
3854 elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then
3861 if test "$MANTYPE" = "doc"; then
3868 # Check whether to enable MD5 passwords
3870 AC_ARG_WITH(md5-passwords,
3871 [ --with-md5-passwords Enable use of MD5 passwords],
3873 if test "x$withval" != "xno" ; then
3874 AC_DEFINE(HAVE_MD5_PASSWORDS, 1,
3875 [Define if you want to allow MD5 passwords])
3881 # Whether to disable shadow password support
3883 [ --without-shadow Disable shadow password support],
3885 if test "x$withval" = "xno" ; then
3886 AC_DEFINE(DISABLE_SHADOW)
3892 if test -z "$disable_shadow" ; then
3893 AC_MSG_CHECKING([if the systems has expire shadow information])
3896 #include <sys/types.h>
3899 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
3900 [ sp_expire_available=yes ], []
3903 if test "x$sp_expire_available" = "xyes" ; then
3905 AC_DEFINE(HAS_SHADOW_EXPIRE, 1,
3906 [Define if you want to use shadow password expire field])
3912 # Use ip address instead of hostname in $DISPLAY
3913 if test ! -z "$IPADDR_IN_DISPLAY" ; then
3914 DISPLAY_HACK_MSG="yes"
3915 AC_DEFINE(IPADDR_IN_DISPLAY, 1,
3916 [Define if you need to use IP address
3917 instead of hostname in $DISPLAY])
3919 DISPLAY_HACK_MSG="no"
3920 AC_ARG_WITH(ipaddr-display,
3921 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
3923 if test "x$withval" != "xno" ; then
3924 AC_DEFINE(IPADDR_IN_DISPLAY)
3925 DISPLAY_HACK_MSG="yes"
3931 # check for /etc/default/login and use it if present.
3932 AC_ARG_ENABLE(etc-default-login,
3933 [ --disable-etc-default-login Disable using PATH from /etc/default/login [no]],
3934 [ if test "x$enableval" = "xno"; then
3935 AC_MSG_NOTICE([/etc/default/login handling disabled])
3936 etc_default_login=no
3938 etc_default_login=yes
3940 [ if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes";
3942 AC_MSG_WARN([cross compiling: not checking /etc/default/login])
3943 etc_default_login=no
3945 etc_default_login=yes
3949 if test "x$etc_default_login" != "xno"; then
3950 AC_CHECK_FILE("/etc/default/login",
3951 [ external_path_file=/etc/default/login ])
3952 if test "x$external_path_file" = "x/etc/default/login"; then
3953 AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN, 1,
3954 [Define if your system has /etc/default/login])
3958 dnl BSD systems use /etc/login.conf so --with-default-path= has no effect
3959 if test $ac_cv_func_login_getcapbool = "yes" && \
3960 test $ac_cv_header_login_cap_h = "yes" ; then
3961 external_path_file=/etc/login.conf
3964 # Whether to mess with the default path
3965 SERVER_PATH_MSG="(default)"
3966 AC_ARG_WITH(default-path,
3967 [ --with-default-path= Specify default \$PATH environment for server],
3969 if test "x$external_path_file" = "x/etc/login.conf" ; then
3971 --with-default-path=PATH has no effect on this system.
3972 Edit /etc/login.conf instead.])
3973 elif test "x$withval" != "xno" ; then
3974 if test ! -z "$external_path_file" ; then
3976 --with-default-path=PATH will only be used if PATH is not defined in
3977 $external_path_file .])
3979 user_path="$withval"
3980 SERVER_PATH_MSG="$withval"
3983 [ if test "x$external_path_file" = "x/etc/login.conf" ; then
3984 AC_MSG_WARN([Make sure the path to scp is in /etc/login.conf])
3986 if test ! -z "$external_path_file" ; then
3988 If PATH is defined in $external_path_file, ensure the path to scp is included,
3989 otherwise scp will not work.])
3993 /* find out what STDPATH is */
3998 #ifndef _PATH_STDPATH
3999 # ifdef _PATH_USERPATH /* Irix */
4000 # define _PATH_STDPATH _PATH_USERPATH
4002 # define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
4005 #include <sys/types.h>
4006 #include <sys/stat.h>
4008 #define DATA "conftest.stdpath"
4015 fd = fopen(DATA,"w");
4019 if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
4025 [ user_path=`cat conftest.stdpath` ],
4026 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ],
4027 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ]
4029 # make sure $bindir is in USER_PATH so scp will work
4030 t_bindir=`eval echo ${bindir}`
4032 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;;
4035 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;;
4037 echo $user_path | grep ":$t_bindir" > /dev/null 2>&1
4038 if test $? -ne 0 ; then
4039 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1
4040 if test $? -ne 0 ; then
4041 user_path=$user_path:$t_bindir
4042 AC_MSG_RESULT(Adding $t_bindir to USER_PATH so scp will work)
4047 if test "x$external_path_file" != "x/etc/login.conf" ; then
4048 AC_DEFINE_UNQUOTED(USER_PATH, "$user_path", [Specify default $PATH])
4052 # Set superuser path separately to user path
4053 AC_ARG_WITH(superuser-path,
4054 [ --with-superuser-path= Specify different path for super-user],
4056 if test -n "$withval" && test "x$withval" != "xno" && \
4057 test "x${withval}" != "xyes"; then
4058 AC_DEFINE_UNQUOTED(SUPERUSER_PATH, "$withval",
4059 [Define if you want a different $PATH
4061 superuser_path=$withval
4067 AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
4068 IPV4_IN6_HACK_MSG="no"
4070 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
4072 if test "x$withval" != "xno" ; then
4074 AC_DEFINE(IPV4_IN_IPV6, 1,
4075 [Detect IPv4 in IPv6 mapped addresses
4077 IPV4_IN6_HACK_MSG="yes"
4082 if test "x$inet6_default_4in6" = "xyes"; then
4083 AC_MSG_RESULT([yes (default)])
4084 AC_DEFINE(IPV4_IN_IPV6)
4085 IPV4_IN6_HACK_MSG="yes"
4087 AC_MSG_RESULT([no (default)])
4092 # Whether to enable BSD auth support
4094 AC_ARG_WITH(bsd-auth,
4095 [ --with-bsd-auth Enable BSD auth support],
4097 if test "x$withval" != "xno" ; then
4098 AC_DEFINE(BSD_AUTH, 1,
4099 [Define if you have BSD auth support])
4105 # Where to place sshd.pid
4107 # make sure the directory exists
4108 if test ! -d $piddir ; then
4109 piddir=`eval echo ${sysconfdir}`
4111 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
4115 AC_ARG_WITH(pid-dir,
4116 [ --with-pid-dir=PATH Specify location of ssh.pid file],
4118 if test -n "$withval" && test "x$withval" != "xno" && \
4119 test "x${withval}" != "xyes"; then
4121 if test ! -d $piddir ; then
4122 AC_MSG_WARN([** no $piddir directory on this system **])
4128 AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir", [Specify location of ssh.pid])
4131 dnl allow user to disable some login recording features
4132 AC_ARG_ENABLE(lastlog,
4133 [ --disable-lastlog disable use of lastlog even if detected [no]],
4135 if test "x$enableval" = "xno" ; then
4136 AC_DEFINE(DISABLE_LASTLOG)
4141 [ --disable-utmp disable use of utmp even if detected [no]],
4143 if test "x$enableval" = "xno" ; then
4144 AC_DEFINE(DISABLE_UTMP)
4148 AC_ARG_ENABLE(utmpx,
4149 [ --disable-utmpx disable use of utmpx even if detected [no]],
4151 if test "x$enableval" = "xno" ; then
4152 AC_DEFINE(DISABLE_UTMPX, 1,
4153 [Define if you don't want to use utmpx])
4158 [ --disable-wtmp disable use of wtmp even if detected [no]],
4160 if test "x$enableval" = "xno" ; then
4161 AC_DEFINE(DISABLE_WTMP)
4165 AC_ARG_ENABLE(wtmpx,
4166 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
4168 if test "x$enableval" = "xno" ; then
4169 AC_DEFINE(DISABLE_WTMPX, 1,
4170 [Define if you don't want to use wtmpx])
4174 AC_ARG_ENABLE(libutil,
4175 [ --disable-libutil disable use of libutil (login() etc.) [no]],
4177 if test "x$enableval" = "xno" ; then
4178 AC_DEFINE(DISABLE_LOGIN)
4182 AC_ARG_ENABLE(pututline,
4183 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
4185 if test "x$enableval" = "xno" ; then
4186 AC_DEFINE(DISABLE_PUTUTLINE, 1,
4187 [Define if you don't want to use pututline()
4188 etc. to write [uw]tmp])
4192 AC_ARG_ENABLE(pututxline,
4193 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
4195 if test "x$enableval" = "xno" ; then
4196 AC_DEFINE(DISABLE_PUTUTXLINE, 1,
4197 [Define if you don't want to use pututxline()
4198 etc. to write [uw]tmpx])
4202 AC_ARG_WITH(lastlog,
4203 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
4205 if test "x$withval" = "xno" ; then
4206 AC_DEFINE(DISABLE_LASTLOG)
4207 elif test -n "$withval" && test "x${withval}" != "xyes"; then
4208 conf_lastlog_location=$withval
4213 dnl lastlog, [uw]tmpx? detection
4214 dnl NOTE: set the paths in the platform section to avoid the
4215 dnl need for command-line parameters
4216 dnl lastlog and [uw]tmp are subject to a file search if all else fails
4218 dnl lastlog detection
4219 dnl NOTE: the code itself will detect if lastlog is a directory
4220 AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
4222 #include <sys/types.h>
4224 #ifdef HAVE_LASTLOG_H
4225 # include <lastlog.h>
4234 [ char *lastlog = LASTLOG_FILE; ],
4235 [ AC_MSG_RESULT(yes) ],
4238 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
4240 #include <sys/types.h>
4242 #ifdef HAVE_LASTLOG_H
4243 # include <lastlog.h>
4249 [ char *lastlog = _PATH_LASTLOG; ],
4250 [ AC_MSG_RESULT(yes) ],
4253 system_lastlog_path=no
4258 if test -z "$conf_lastlog_location"; then
4259 if test x"$system_lastlog_path" = x"no" ; then
4260 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
4261 if (test -d "$f" || test -f "$f") ; then
4262 conf_lastlog_location=$f
4265 if test -z "$conf_lastlog_location"; then
4266 AC_MSG_WARN([** Cannot find lastlog **])
4267 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
4272 if test -n "$conf_lastlog_location"; then
4273 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location",
4274 [Define if you want to specify the path to your lastlog file])
4278 AC_MSG_CHECKING([if your system defines UTMP_FILE])
4280 #include <sys/types.h>
4286 [ char *utmp = UTMP_FILE; ],
4287 [ AC_MSG_RESULT(yes) ],
4289 system_utmp_path=no ]
4291 if test -z "$conf_utmp_location"; then
4292 if test x"$system_utmp_path" = x"no" ; then
4293 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
4294 if test -f $f ; then
4295 conf_utmp_location=$f
4298 if test -z "$conf_utmp_location"; then
4299 AC_DEFINE(DISABLE_UTMP)
4303 if test -n "$conf_utmp_location"; then
4304 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location",
4305 [Define if you want to specify the path to your utmp file])
4309 AC_MSG_CHECKING([if your system defines WTMP_FILE])
4311 #include <sys/types.h>
4317 [ char *wtmp = WTMP_FILE; ],
4318 [ AC_MSG_RESULT(yes) ],
4320 system_wtmp_path=no ]
4322 if test -z "$conf_wtmp_location"; then
4323 if test x"$system_wtmp_path" = x"no" ; then
4324 for f in /usr/adm/wtmp /var/log/wtmp; do
4325 if test -f $f ; then
4326 conf_wtmp_location=$f
4329 if test -z "$conf_wtmp_location"; then
4330 AC_DEFINE(DISABLE_WTMP)
4334 if test -n "$conf_wtmp_location"; then
4335 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location",
4336 [Define if you want to specify the path to your wtmp file])
4340 dnl utmpx detection - I don't know any system so perverse as to require
4341 dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
4343 AC_MSG_CHECKING([if your system defines UTMPX_FILE])
4345 #include <sys/types.h>
4354 [ char *utmpx = UTMPX_FILE; ],
4355 [ AC_MSG_RESULT(yes) ],
4357 system_utmpx_path=no ]
4359 if test -z "$conf_utmpx_location"; then
4360 if test x"$system_utmpx_path" = x"no" ; then
4361 AC_DEFINE(DISABLE_UTMPX)
4364 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location",
4365 [Define if you want to specify the path to your utmpx file])
4369 AC_MSG_CHECKING([if your system defines WTMPX_FILE])
4371 #include <sys/types.h>
4380 [ char *wtmpx = WTMPX_FILE; ],
4381 [ AC_MSG_RESULT(yes) ],
4383 system_wtmpx_path=no ]
4385 if test -z "$conf_wtmpx_location"; then
4386 if test x"$system_wtmpx_path" = x"no" ; then
4387 AC_DEFINE(DISABLE_WTMPX)
4390 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location",
4391 [Define if you want to specify the path to your wtmpx file])
4395 if test ! -z "$blibpath" ; then
4396 LDFLAGS="$LDFLAGS $blibflags$blibpath"
4397 AC_MSG_WARN([Please check and edit blibpath in LDFLAGS in Makefile])
4400 dnl Adding -Werror to CFLAGS early prevents configure tests from running.
4402 CFLAGS="$CFLAGS $werror_flags"
4404 if grep "#define BROKEN_GETADDRINFO 1" confdefs.h >/dev/null || \
4405 test "x$ac_cv_func_getaddrinfo" != "xyes" ; then
4406 AC_SUBST(TEST_SSH_IPV6, no)
4408 AC_SUBST(TEST_SSH_IPV6, yes)
4412 AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openssh.xml \
4413 openbsd-compat/Makefile openbsd-compat/regress/Makefile \
4414 scard/Makefile ssh_prng_cmds survey.sh])
4417 # Print summary of options
4419 # Someone please show me a better way :)
4420 A=`eval echo ${prefix}` ; A=`eval echo ${A}`
4421 B=`eval echo ${bindir}` ; B=`eval echo ${B}`
4422 C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
4423 D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
4424 E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
4425 F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
4426 G=`eval echo ${piddir}` ; G=`eval echo ${G}`
4427 H=`eval echo ${PRIVSEP_PATH}` ; H=`eval echo ${H}`
4428 I=`eval echo ${user_path}` ; I=`eval echo ${I}`
4429 J=`eval echo ${superuser_path}` ; J=`eval echo ${J}`
4432 echo "OpenSSH has been configured with the following options:"
4433 echo " User binaries: $B"
4434 echo " System binaries: $C"
4435 echo " Configuration files: $D"
4436 echo " Askpass program: $E"
4437 echo " Manual pages: $F"
4438 echo " PID file: $G"
4439 echo " Privilege separation chroot path: $H"
4440 if test "x$external_path_file" = "x/etc/login.conf" ; then
4441 echo " At runtime, sshd will use the path defined in $external_path_file"
4442 echo " Make sure the path to scp is present, otherwise scp will not work"
4444 echo " sshd default user PATH: $I"
4445 if test ! -z "$external_path_file"; then
4446 echo " (If PATH is set in $external_path_file it will be used instead. If"
4447 echo " used, ensure the path to scp is present, otherwise scp will not work.)"
4450 if test ! -z "$superuser_path" ; then
4451 echo " sshd superuser user PATH: $J"
4453 echo " Manpage format: $MANTYPE"
4454 echo " PAM support: $PAM_MSG"
4455 echo " OSF SIA support: $SIA_MSG"
4456 echo " KerberosV support: $KRB5_MSG"
4457 echo " SELinux support: $SELINUX_MSG"
4458 echo " Smartcard support: $SCARD_MSG"
4459 echo " S/KEY support: $SKEY_MSG"
4460 echo " TCP Wrappers support: $TCPW_MSG"
4461 echo " MD5 password support: $MD5_MSG"
4462 echo " libedit support: $LIBEDIT_MSG"
4463 echo " Solaris process contract support: $SPC_MSG"
4464 echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
4465 echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
4466 echo " BSD Auth support: $BSD_AUTH_MSG"
4467 echo " Random number source: $RAND_MSG"
4468 if test ! -z "$USE_RAND_HELPER" ; then
4469 echo " ssh-rand-helper collects from: $RAND_HELPER_MSG"
4474 echo " Host: ${host}"
4475 echo " Compiler: ${CC}"
4476 echo " Compiler flags: ${CFLAGS}"
4477 echo "Preprocessor flags: ${CPPFLAGS}"
4478 echo " Linker flags: ${LDFLAGS}"
4479 echo " Libraries: ${LIBS}"
4480 if test ! -z "${SSHDLIBS}"; then
4481 echo " +for sshd: ${SSHDLIBS}"
4486 if test "x$MAKE_PACKAGE_SUPPORTED" = "xyes" ; then
4487 echo "SVR4 style packages are supported with \"make package\""
4491 if test "x$PAM_MSG" = "xyes" ; then
4492 echo "PAM is enabled. You may need to install a PAM control file "
4493 echo "for sshd, otherwise password authentication may fail. "
4494 echo "Example PAM control files can be found in the contrib/ "
4499 if test ! -z "$RAND_HELPER_CMDHASH" ; then
4500 echo "WARNING: you are using the builtin random number collection "
4501 echo "service. Please read WARNING.RNG and request that your OS "
4502 echo "vendor includes kernel-based random number collection in "
4503 echo "future versions of your OS."
4507 if test ! -z "$NO_PEERCHECK" ; then
4508 echo "WARNING: the operating system that you are using does not"
4509 echo "appear to support getpeereid(), getpeerucred() or the"
4510 echo "SO_PEERCRED getsockopt() option. These facilities are used to"
4511 echo "enforce security checks to prevent unauthorised connections to"
4512 echo "ssh-agent. Their absence increases the risk that a malicious"
4513 echo "user can connect to your agent."
4517 if test "$AUDIT_MODULE" = "bsm" ; then
4518 echo "WARNING: BSM audit support is currently considered EXPERIMENTAL."
4519 echo "See the Solaris section in README.platform for details."