diff --git a/contrib/opie/BUG-REPORT b/contrib/opie/BUG-REPORT index 655d0b49d465..5373871015da 100644 --- a/contrib/opie/BUG-REPORT +++ b/contrib/opie/BUG-REPORT @@ -1,6 +1,9 @@ -OPIE Software Distribution, Release 2.31 Bug Reporting Form +OPIE Software Distribution, Release 2.32 Bug Reporting Form ======================================== ================== + Before submitting a bug report, please check the README file and make +sure that your "bug" is not a known problem. + Please make a copy of this file and then edit it with your favorite text editor to include the answers to the following questions: @@ -8,9 +11,9 @@ text editor to include the answers to the following questions: If you can provide multiple addresses, please do so in case we are unable to reply to the first one. -2. Your exact operating system vendor, name, and version number. - Please be more specific than "UNIX" -- most vendors have a name - for their particular flavor of UNIX. +2. Your exact operating system vendor, name, and version number. If available, + please provide the output of "uname -a" and/or the version of your C + runtime library. Please be more specific than "UNIX". 3. The exact hardware the system was installed upon. @@ -73,7 +76,7 @@ Copyright ========= %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If diff --git a/contrib/opie/INSTALL b/contrib/opie/INSTALL index 3ed3e4c3a692..71f0afb68aab 100644 --- a/contrib/opie/INSTALL +++ b/contrib/opie/INSTALL @@ -75,7 +75,7 @@ Copyright ========= %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If diff --git a/contrib/opie/Makefile.in b/contrib/opie/Makefile.in index 562a613f46a0..926ff4233fd3 100644 --- a/contrib/opie/Makefile.in +++ b/contrib/opie/Makefile.in @@ -2,7 +2,7 @@ # Makefile.source and Makefile: Directions for building and installing OPIE. # # %%% portions-copyright-cmetz-96 -# Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +# Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights # Reserved. The Inner Net License Version 2 applies to these portions of # the software. # You should have received a copy of the license with this software. If diff --git a/contrib/opie/README b/contrib/opie/README index 28ce401303b8..dcc46a9103da 100644 --- a/contrib/opie/README +++ b/contrib/opie/README @@ -1,4 +1,4 @@ -OPIE Software Distribution, Release 2.31 Important Information +OPIE Software Distribution, Release 2.32 Important Information ======================================== ===================== Introduction @@ -75,6 +75,13 @@ original Bellcore S/Key(tm) Version 1 software: A Glance at What's New ====================== + 2.32 January 1, 1998. + + Indicate support for extended responses in challenges and check for + such indication before generating any extended responses. + + Lots of portability and bug fixes. + 2.31 March 20, 1997. Removed active attack protection support due to patent problems. @@ -225,6 +232,10 @@ it easier to coordinate bug hunting. Gotchas ======= + Solaris 2.x is just a lose. It does a lot of nonstandard and downright +broken things. If you want OPIE to be reliable on your box, upgrade to NetBSD +or Linux. + While an almost universal "feature", most people remain unaware that an intruder can log into a system, then log in again by running the "login" command from a shell. Because the second login is from the local host, the @@ -324,9 +335,7 @@ and reasonable getty sources (try sunsite.unc.edu:/pub/Linux/system/Serial, at least one of agetty, mingetty, and getty_ps should work) and replacing the Solaris versions with these. OPIE should work *much* more happily with these programs than the ones that come with Solaris. However, there could be negative -side effects -- this is not a procedure recommended for the faint of heart. An -even more drastic solution more likely to make OPIE happy is to install Linux -or NetBSD on your box ;) +side effects -- this is not a procedure recommended for the faint of heart. OPIE is a lot more fussy than it used to be about lock files and where it puts them. The lock file directory must be a directory used only for OPIE @@ -387,22 +396,31 @@ community effort. These contributors include: Mowgli Assor Lawrie Brown Andrew Davis + Dennis Glatting + Ben Golding Axel Grewe "Hobbit" Kojima Hajime Darren Hosking + Matt Hucke + Charles Karney + Jeff Kletsky Martijn Koster Osamu Kurati Ayamura Kikuchi + Ronald van der Meer Hiroshi Nakano Ikuo Nakagawa Angelo Neri C. R. Oldham D. Jason Penney John Perkins + Steve Price Jim Simmons + Steve Simmons Brad Smith Werner Wiethege + Ken-ichi Yamasaki Wietse Venema OPIE development at NRL was sponsored by the Information Security @@ -427,7 +445,7 @@ trademarked by anyone. Copyrights ========== %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If diff --git a/contrib/opie/acconfig.h b/contrib/opie/acconfig.h index 4c6c61ce2db3..f22ca38310bd 100644 --- a/contrib/opie/acconfig.h +++ b/contrib/opie/acconfig.h @@ -1,7 +1,7 @@ /* acconfig.h: Extra commentary for Autoheader %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If diff --git a/contrib/opie/config.h.in b/contrib/opie/config.h.in index 2d101a5e03da..7f8fe4006d67 100644 --- a/contrib/opie/config.h.in +++ b/contrib/opie/config.h.in @@ -176,9 +176,6 @@ /* Defined if su should not switch to disabled accounts */ #undef SU_STAR_CHECK -/* Defined if user locking is to be used */ -#undef USER_LOCKING - /* Define if you have the bcopy function. */ #undef HAVE_BCOPY diff --git a/contrib/opie/configure b/contrib/opie/configure index 04bc30a536fa..d69b16d10cd2 100755 --- a/contrib/opie/configure +++ b/contrib/opie/configure @@ -569,35 +569,29 @@ EOF fi -set do_user_locking=1; # Check whether --enable-user-locking or --disable-user-locking was given. if test "${enable_user_locking+set}" = set; then enableval="$enable_user_locking" : -else - set do_user_locking=0 fi -if $do_user_locking; +if test "$enable_user_locking" != no; then - cat >> confdefs.h <<\EOF -#define USER_LOCKING 1 -EOF - if test -z "$enable_user_locking" then cat >> confdefs.h <<\EOF #define OPIE_LOCK_DIR "/etc/opielocks" EOF + LOCK_DIR="/etc/opielocks" else cat >> confdefs.h <&6 -echo "configure:673: checking for $ac_word" >&5 +echo "configure:667: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -698,7 +692,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:702: checking for $ac_word" >&5 +echo "configure:696: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -746,7 +740,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:750: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:744: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -756,11 +750,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -780,12 +774,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:784: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:778: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:789: checking whether we are using GNU C" >&5 +echo "configure:783: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -794,7 +788,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -809,7 +803,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:813: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:807: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -837,7 +831,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:841: checking how to run the C preprocessor" >&5 +echo "configure:835: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -852,13 +846,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -869,13 +863,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -898,7 +892,7 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:902: checking whether ln -s works" >&5 +echo "configure:896: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -921,7 +915,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:925: checking for $ac_word" >&5 +echo "configure:919: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -952,7 +946,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:956: checking for $ac_word" >&5 +echo "configure:950: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -983,9 +977,9 @@ test -n "$YACC" || YACC="yacc" echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:987: checking for AIX" >&5 +echo "configure:981: checking for AIX" >&5 cat > conftest.$ac_ext <&6 -echo "configure:1011: checking for POSIXized ISC" >&5 +echo "configure:1005: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -1029,17 +1023,17 @@ fi ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 -echo "configure:1033: checking for minix/config.h" >&5 +echo "configure:1027: checking for minix/config.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1081,7 +1075,7 @@ fi # Extract the first word of "chown", so it can be a program name with args. set dummy chown; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1085: checking for $ac_word" >&5 +echo "configure:1079: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CHOWN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1114,7 +1108,7 @@ fi # Extract the first word of "su", so it can be a program name with args. set dummy su; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1118: checking for $ac_word" >&5 +echo "configure:1112: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SU'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1146,7 +1140,7 @@ fi # Extract the first word of "su", so it can be a program name with args. set dummy su; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1150: checking for $ac_word" >&5 +echo "configure:1144: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ALT_SU'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1178,7 +1172,7 @@ fi # Extract the first word of "scheme", so it can be a program name with args. set dummy scheme; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1182: checking for $ac_word" >&5 +echo "configure:1176: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SCHEME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1209,7 +1203,7 @@ fi # Extract the first word of "login", so it can be a program name with args. set dummy login; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1213: checking for $ac_word" >&5 +echo "configure:1207: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LOGIN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1247,7 +1241,7 @@ fi # Extract the first word of "ftpd", so it can be a program name with args. set dummy ftpd; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1251: checking for $ac_word" >&5 +echo "configure:1245: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_FTPD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1278,7 +1272,7 @@ fi # Extract the first word of "in.ftpd", so it can be a program name with args. set dummy in.ftpd; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1282: checking for $ac_word" >&5 +echo "configure:1276: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_INFTPD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1316,7 +1310,7 @@ then fi echo $ac_n "checking for default PATH entries""... $ac_c" 1>&6 -echo "configure:1320: checking for default PATH entries" >&5 +echo "configure:1314: checking for default PATH entries" >&5 default_path="" save_IFS="$IFS" IFS=" " @@ -1347,7 +1341,7 @@ EOF echo "$ac_t""$default_path" 1>&6 echo $ac_n "checking for test -e flag""... $ac_c" 1>&6 -echo "configure:1351: checking for test -e flag" >&5 +echo "configure:1345: checking for test -e flag" >&5 if sh config.testeflag then result=yes @@ -1360,7 +1354,7 @@ fi echo "$ac_t""$result" 1>&6 echo $ac_n "checking for mkdir -p flag""... $ac_c" 1>&6 -echo "configure:1364: checking for mkdir -p flag" >&5 +echo "configure:1358: checking for mkdir -p flag" >&5 if test -d config.tmpdir then rmdir config.tmpdir/foo/bar >/dev/null 2>/dev/null @@ -1396,7 +1390,7 @@ fi echo "$ac_t""$result" 1>&6 echo $ac_n "checking for ls group field""... $ac_c" 1>&6 -echo "configure:1400: checking for ls group field" >&5 +echo "configure:1394: checking for ls group field" >&5 lsg=`/bin/ls -ldg / | wc -w | awk '{print $1}'`; ls=`/bin/ls -ld / | wc -w | awk '{print $1}'`; result="no" @@ -1416,7 +1410,7 @@ fi echo "$ac_t""$result" 1>&6 echo $ac_n "checking for /etc/default/login""... $ac_c" 1>&6 -echo "configure:1420: checking for /etc/default/login" >&5 +echo "configure:1414: checking for /etc/default/login" >&5 if test $EXISTS /etc/default/login then result=yes @@ -1430,7 +1424,7 @@ fi echo "$ac_t""$result" 1>&6 echo $ac_n "checking for /etc/securetty""... $ac_c" 1>&6 -echo "configure:1434: checking for /etc/securetty" >&5 +echo "configure:1428: checking for /etc/securetty" >&5 if test $EXISTS /etc/securetty then result=yes @@ -1444,7 +1438,7 @@ fi echo "$ac_t""$result" 1>&6 echo $ac_n "checking for /etc/logindevperm""... $ac_c" 1>&6 -echo "configure:1448: checking for /etc/logindevperm" >&5 +echo "configure:1442: checking for /etc/logindevperm" >&5 if test $EXISTS /etc/logindevperm then echo "$ac_t""yes" 1>&6 @@ -1456,7 +1450,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for /etc/fbtab""... $ac_c" 1>&6 -echo "configure:1460: checking for /etc/fbtab" >&5 +echo "configure:1454: checking for /etc/fbtab" >&5 if test $EXISTS /etc/fbtab then result=yes @@ -1471,7 +1465,7 @@ EOF fi echo $ac_n "checking for /etc/environment""... $ac_c" 1>&6 -echo "configure:1475: checking for /etc/environment" >&5 +echo "configure:1469: checking for /etc/environment" >&5 if test $EXISTS /etc/environment then echo "$ac_t""yes" 1>&6 @@ -1483,7 +1477,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for /etc/src.sh""... $ac_c" 1>&6 -echo "configure:1487: checking for /etc/src.sh" >&5 +echo "configure:1481: checking for /etc/src.sh" >&5 if test $EXISTS /etc/src.sh then result=yes @@ -1498,7 +1492,7 @@ EOF fi echo $ac_n "checking for /etc/shadow""... $ac_c" 1>&6 -echo "configure:1502: checking for /etc/shadow" >&5 +echo "configure:1496: checking for /etc/shadow" >&5 if test $EXISTS /etc/shadow then result=yes @@ -1510,7 +1504,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for /etc/security/passwd.adjunct""... $ac_c" 1>&6 -echo "configure:1514: checking for /etc/security/passwd.adjunct" >&5 +echo "configure:1508: checking for /etc/security/passwd.adjunct" >&5 if test $EXISTS /etc/security/passwd.adjunct then result=yes @@ -1526,7 +1520,7 @@ fi echo "$ac_t""$result" 1>&6 echo $ac_n "checking for /var/adm/sulog""... $ac_c" 1>&6 -echo "configure:1530: checking for /var/adm/sulog" >&5 +echo "configure:1524: checking for /var/adm/sulog" >&5 if test $EXISTS /var/adm/sulog then result=yes @@ -1540,7 +1534,7 @@ fi echo "$ac_t""$result" 1>&6 echo $ac_n "checking mail spool location""... $ac_c" 1>&6 -echo "configure:1544: checking mail spool location" >&5 +echo "configure:1538: checking mail spool location" >&5 mail_spool="" for i in /var/mail /usr/mail /var/spool/mail /usr/spool/mail do @@ -1562,7 +1556,7 @@ fi echo "$ac_t""$result" 1>&6 echo $ac_n "checking where your system puts the utmp file""... $ac_c" 1>&6 -echo "configure:1566: checking where your system puts the utmp file" >&5 +echo "configure:1560: checking where your system puts the utmp file" >&5 utmp_path="" for i in /var/run /var/adm /usr/adm /etc do @@ -1584,7 +1578,7 @@ fi echo "$ac_t""$result" 1>&6 echo $ac_n "checking where your system puts the utmpx file""... $ac_c" 1>&6 -echo "configure:1588: checking where your system puts the utmpx file" >&5 +echo "configure:1582: checking where your system puts the utmpx file" >&5 utmp_path="" for i in /var/run /var/adm /usr/adm /etc do @@ -1604,7 +1598,7 @@ fi echo "$ac_t""$result" 1>&6 echo $ac_n "checking where your system puts the wtmp file""... $ac_c" 1>&6 -echo "configure:1608: checking where your system puts the wtmp file" >&5 +echo "configure:1602: checking where your system puts the wtmp file" >&5 wtmp_path="" for i in /var/run /var/log /var/adm /usr/adm /etc do @@ -1626,7 +1620,7 @@ fi echo "$ac_t""$result" 1>&6 echo $ac_n "checking where your system puts the wtmpx file""... $ac_c" 1>&6 -echo "configure:1630: checking where your system puts the wtmpx file" >&5 +echo "configure:1624: checking where your system puts the wtmpx file" >&5 wtmpx_path="" for i in /var/run /var/log /var/adm /usr/adm /etc do @@ -1648,7 +1642,7 @@ fi echo "$ac_t""$result" 1>&6 echo $ac_n "checking whether the system profile displays the motd""... $ac_c" 1>&6 -echo "configure:1652: checking whether the system profile displays the motd" >&5 +echo "configure:1646: checking whether the system profile displays the motd" >&5 result=no if test $EXISTS /etc/profile then @@ -1667,7 +1661,7 @@ fi echo "$ac_t""$result" 1>&6 echo $ac_n "checking whether the system profile checks for mail""... $ac_c" 1>&6 -echo "configure:1671: checking whether the system profile checks for mail" >&5 +echo "configure:1665: checking whether the system profile checks for mail" >&5 result=no if test $EXISTS /etc/profile then @@ -1686,12 +1680,12 @@ fi echo "$ac_t""$result" 1>&6 echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1690: checking for working const" >&5 +echo "configure:1684: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1762,16 +1756,16 @@ fi echo $ac_n "checking to see if your compiler can handle void arguments""... $ac_c" 1>&6 -echo "configure:1766: checking to see if your compiler can handle void arguments" >&5 +echo "configure:1760: checking to see if your compiler can handle void arguments" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_VOIDARG 1 @@ -1786,16 +1780,16 @@ fi rm -f conftest* echo $ac_n "checking to see if your compiler can handle void return values""... $ac_c" 1>&6 -echo "configure:1790: checking to see if your compiler can handle void return values" >&5 +echo "configure:1784: checking to see if your compiler can handle void return values" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_VOIDRET 1 @@ -1810,16 +1804,16 @@ fi rm -f conftest* echo $ac_n "checking to see if your compiler can handle void pointers""... $ac_c" 1>&6 -echo "configure:1814: checking to see if your compiler can handle void pointers" >&5 +echo "configure:1808: checking to see if your compiler can handle void pointers" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_VOIDPTR 1 @@ -1834,16 +1828,16 @@ fi rm -f conftest* echo $ac_n "checking to see if your compiler can handle ANSI argument lists""... $ac_c" 1>&6 -echo "configure:1838: checking to see if your compiler can handle ANSI argument lists" >&5 +echo "configure:1832: checking to see if your compiler can handle ANSI argument lists" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_ANSIDECL 1 @@ -1858,16 +1852,16 @@ fi rm -f conftest* echo $ac_n "checking to see if your compiler can handle ANSI prototypes""... $ac_c" 1>&6 -echo "configure:1862: checking to see if your compiler can handle ANSI prototypes" >&5 +echo "configure:1856: checking to see if your compiler can handle ANSI prototypes" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_ANSIPROTO 1 @@ -1882,9 +1876,9 @@ fi rm -f conftest* echo $ac_n "checking to see if your compiler can handle ANSI variable arguments""... $ac_c" 1>&6 -echo "configure:1886: checking to see if your compiler can handle ANSI variable arguments" >&5 +echo "configure:1880: checking to see if your compiler can handle ANSI variable arguments" >&5 cat > conftest.$ac_ext < int foo(int arg, ...) { @@ -1897,7 +1891,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_ANSISTDARG 1 @@ -1912,12 +1906,12 @@ fi rm -f conftest* echo $ac_n "checking to see if you have an ANSI-style sprintf""... $ac_c" 1>&6 -echo "configure:1916: checking to see if you have an ANSI-style sprintf" >&5 +echo "configure:1910: checking to see if you have an ANSI-style sprintf" >&5 if test "$cross_compiling" = yes; then echo "$ac_t""no" 1>&6 else cat > conftest.$ac_ext < int main(argc, argv) @@ -1930,7 +1924,7 @@ char *argv[]; return (i == 6) ? 0 : -1; } EOF -if { (eval echo configure:1934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then cat >> confdefs.h <<\EOF #define HAVE_ANSISPRINTF 1 @@ -1947,7 +1941,7 @@ fi echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:1951: checking for crypt in -lcrypt" >&5 +echo "configure:1945: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1955,7 +1949,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1994,7 +1988,7 @@ else fi echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6 -echo "configure:1998: checking for gethostname in -lnsl" >&5 +echo "configure:1992: checking for gethostname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2002,7 +1996,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2041,7 +2035,7 @@ else fi echo $ac_n "checking for main in -lposix""... $ac_c" 1>&6 -echo "configure:2045: checking for main in -lposix" >&5 +echo "configure:2039: checking for main in -lposix" >&5 ac_lib_var=`echo posix'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2049,14 +2043,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2084,7 +2078,7 @@ else fi echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:2088: checking for socket in -lsocket" >&5 +echo "configure:2082: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2092,7 +2086,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2136,12 +2130,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:2140: checking for $ac_hdr that defines DIR" >&5 +echo "configure:2134: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -2149,7 +2143,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:2153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2174,7 +2168,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:2178: checking for opendir in -ldir" >&5 +echo "configure:2172: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2182,7 +2176,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2215,7 +2209,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2219: checking for opendir in -lx" >&5 +echo "configure:2213: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2223,7 +2217,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2257,12 +2251,12 @@ fi fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2261: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2255: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2278,7 +2272,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2302,17 +2296,17 @@ for ac_hdr in crypt.h fcntl.h limits.h termios.h sys/file.h sys/ioctl.h sys/time do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2306: checking for $ac_hdr" >&5 +echo "configure:2300: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2341,9 +2335,9 @@ done echo $ac_n "checking for ut_pid in struct utmp""... $ac_c" 1>&6 -echo "configure:2345: checking for ut_pid in struct utmp" >&5 +echo "configure:2339: checking for ut_pid in struct utmp" >&5 cat > conftest.$ac_ext < #include @@ -2351,7 +2345,7 @@ int main() { struct utmp foo; return (int)foo.ut_pid; ; return 0; } EOF -if { (eval echo configure:2355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_UT_PID 1 @@ -2365,9 +2359,9 @@ else fi rm -f conftest* echo $ac_n "checking for ut_type in struct utmp""... $ac_c" 1>&6 -echo "configure:2369: checking for ut_type in struct utmp" >&5 +echo "configure:2363: checking for ut_type in struct utmp" >&5 cat > conftest.$ac_ext < #include @@ -2375,7 +2369,7 @@ int main() { struct utmp foo; return (int)foo.ut_type; ; return 0; } EOF -if { (eval echo configure:2379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_UT_TYPE 1 @@ -2389,9 +2383,9 @@ else fi rm -f conftest* echo $ac_n "checking for ut_name in struct utmp""... $ac_c" 1>&6 -echo "configure:2393: checking for ut_name in struct utmp" >&5 +echo "configure:2387: checking for ut_name in struct utmp" >&5 cat > conftest.$ac_ext < #include @@ -2399,7 +2393,7 @@ int main() { struct utmp foo; return (int)foo.ut_name[0]; ; return 0; } EOF -if { (eval echo configure:2403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_UT_NAME 1 @@ -2412,18 +2406,38 @@ else echo "$ac_t""no" 1>&6 fi rm -f conftest* -cat >> confdefs.h <<\EOF +echo $ac_n "checking for ut_host in struct utmp""... $ac_c" 1>&6 +echo "configure:2411: checking for ut_host in struct utmp" >&5 +cat > conftest.$ac_ext < +#include +int main() { +struct utmp foo; return (int)foo.ut_host[0]; +; return 0; } +EOF +if { (eval echo configure:2421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cat >> confdefs.h <<\EOF #define HAVE_UT_HOST 1 EOF - + echo "$ac_t""yes" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2422: checking return type of signal handlers" >&5 +echo "configure:2436: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2440,7 +2454,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2461,12 +2475,12 @@ EOF for ac_func in gettimeofday socket strftime strstr setpriority getttynam setvbuf getspnam endspent setgroups getgroups fpurge setlogin lstat getutxline pututxline usleep do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2465: checking for $ac_func" >&5 +echo "configure:2479: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2515,7 +2529,7 @@ done echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:2519: checking for 8-bit clean memcmp" >&5 +echo "configure:2533: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2523,7 +2537,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -2553,19 +2567,19 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:2557: checking for working alloca.h" >&5 +echo "configure:2571: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:2569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -2586,12 +2600,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2590: checking for alloca" >&5 +echo "configure:2604: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -2646,12 +2660,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2650: checking whether alloca needs Cray hooks" >&5 +echo "configure:2664: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2680: checking for $ac_func" >&5 +echo "configure:2694: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2731,7 +2745,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2735: checking stack direction for C alloca" >&5 +echo "configure:2749: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2739,7 +2753,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -2782,12 +2796,12 @@ fi for ac_func in getusershell sigaddset sigemptyset strerror strncasecmp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2786: checking for $ac_func" >&5 +echo "configure:2800: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2838,12 +2852,12 @@ done MISSING="$LIBOBJS $ALLOCA " ; echo $ac_n "checking for atexit""... $ac_c" 1>&6 -echo "configure:2842: checking for atexit" >&5 +echo "configure:2856: checking for atexit" >&5 if eval "test \"`echo '$''{'ac_cv_func_atexit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_atexit=yes" else @@ -2886,12 +2900,12 @@ else MISSING="${MISSING}atexit.o "; for ac_func in on_exit do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2890: checking for $ac_func" >&5 +echo "configure:2904: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2941,12 +2955,12 @@ done fi echo $ac_n "checking for endutent""... $ac_c" 1>&6 -echo "configure:2945: checking for endutent" >&5 +echo "configure:2959: checking for endutent" >&5 if eval "test \"`echo '$''{'ac_cv_func_endutent'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_endutent=yes" else @@ -2990,12 +3004,12 @@ MISSING="${MISSING}endutent.o " fi echo $ac_n "checking for memcpy""... $ac_c" 1>&6 -echo "configure:2994: checking for memcpy" >&5 +echo "configure:3008: checking for memcpy" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcpy'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_memcpy=yes" else @@ -3038,12 +3052,12 @@ else MISSING="${MISSING}memcpy.o "; for ac_func in bcopy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3042: checking for $ac_func" >&5 +echo "configure:3056: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3093,12 +3107,12 @@ done fi echo $ac_n "checking for memset""... $ac_c" 1>&6 -echo "configure:3097: checking for memset" >&5 +echo "configure:3111: checking for memset" >&5 if eval "test \"`echo '$''{'ac_cv_func_memset'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_memset=yes" else @@ -3141,12 +3155,12 @@ else MISSING="${MISSING}memset.o "; for ac_func in bzero do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3145: checking for $ac_func" >&5 +echo "configure:3159: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3196,12 +3210,12 @@ done fi echo $ac_n "checking for getcwd""... $ac_c" 1>&6 -echo "configure:3200: checking for getcwd" >&5 +echo "configure:3214: checking for getcwd" >&5 if eval "test \"`echo '$''{'ac_cv_func_getcwd'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_getcwd=yes" else @@ -3244,12 +3258,12 @@ else MISSING="${MISSING}getcwd.o "; for ac_func in getwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3248: checking for $ac_func" >&5 +echo "configure:3262: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3299,12 +3313,12 @@ done fi echo $ac_n "checking for getenv""... $ac_c" 1>&6 -echo "configure:3303: checking for getenv" >&5 +echo "configure:3317: checking for getenv" >&5 if eval "test \"`echo '$''{'ac_cv_func_getenv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_getenv=yes" else @@ -3351,12 +3365,12 @@ MISSING="${MISSING}env.o " fi echo $ac_n "checking for getutline""... $ac_c" 1>&6 -echo "configure:3355: checking for getutline" >&5 +echo "configure:3369: checking for getutline" >&5 if eval "test \"`echo '$''{'ac_cv_func_getutline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_getutline=yes" else @@ -3402,12 +3416,12 @@ else MISSING="${MISSING}getutline.o "; for ac_func in ttyslot do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3406: checking for $ac_func" >&5 +echo "configure:3420: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3457,12 +3471,12 @@ done fi echo $ac_n "checking for pututline""... $ac_c" 1>&6 -echo "configure:3461: checking for pututline" >&5 +echo "configure:3475: checking for pututline" >&5 if eval "test \"`echo '$''{'ac_cv_func_pututline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_pututline=yes" else @@ -3505,12 +3519,12 @@ else MISSING="${MISSING}pututline.o "; for ac_func in ttyslot do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3509: checking for $ac_func" >&5 +echo "configure:3523: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3560,12 +3574,12 @@ done fi echo $ac_n "checking for setenv""... $ac_c" 1>&6 -echo "configure:3564: checking for setenv" >&5 +echo "configure:3578: checking for setenv" >&5 if eval "test \"`echo '$''{'ac_cv_func_setenv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_setenv=yes" else @@ -3612,12 +3626,12 @@ MISSING="${MISSING}env.o " fi echo $ac_n "checking for setegid""... $ac_c" 1>&6 -echo "configure:3616: checking for setegid" >&5 +echo "configure:3630: checking for setegid" >&5 if eval "test \"`echo '$''{'ac_cv_func_setegid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_setegid=yes" else @@ -3660,12 +3674,12 @@ else MISSING="${MISSING}setegid.o "; for ac_func in setregid setresgid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3664: checking for $ac_func" >&5 +echo "configure:3678: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3715,12 +3729,12 @@ done fi echo $ac_n "checking for seteuid""... $ac_c" 1>&6 -echo "configure:3719: checking for seteuid" >&5 +echo "configure:3733: checking for seteuid" >&5 if eval "test \"`echo '$''{'ac_cv_func_seteuid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_seteuid=yes" else @@ -3763,12 +3777,12 @@ else MISSING="${MISSING}seteuid.o "; for ac_func in setreuid setresuid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3767: checking for $ac_func" >&5 +echo "configure:3781: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3818,12 +3832,12 @@ done fi echo $ac_n "checking for setutent""... $ac_c" 1>&6 -echo "configure:3822: checking for setutent" >&5 +echo "configure:3836: checking for setutent" >&5 if eval "test \"`echo '$''{'ac_cv_func_setutent'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_setutent=yes" else @@ -3867,12 +3881,12 @@ MISSING="${MISSING}setutent.o " fi echo $ac_n "checking for sigprocmask""... $ac_c" 1>&6 -echo "configure:3871: checking for sigprocmask" >&5 +echo "configure:3885: checking for sigprocmask" >&5 if eval "test \"`echo '$''{'ac_cv_func_sigprocmask'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_sigprocmask=yes" else @@ -3915,12 +3929,12 @@ else MISSING="${MISSING}sigprocmask.o "; for ac_func in sigblock sigsetmask do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3919: checking for $ac_func" >&5 +echo "configure:3933: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3970,12 +3984,12 @@ done fi echo $ac_n "checking for strchr""... $ac_c" 1>&6 -echo "configure:3974: checking for strchr" >&5 +echo "configure:3988: checking for strchr" >&5 if eval "test \"`echo '$''{'ac_cv_func_strchr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strchr=yes" else @@ -4018,12 +4032,12 @@ else MISSING="${MISSING}strchr.o "; for ac_func in index do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4022: checking for $ac_func" >&5 +echo "configure:4036: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4073,12 +4087,12 @@ done fi echo $ac_n "checking for strrchr""... $ac_c" 1>&6 -echo "configure:4077: checking for strrchr" >&5 +echo "configure:4091: checking for strrchr" >&5 if eval "test \"`echo '$''{'ac_cv_func_strrchr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strrchr=yes" else @@ -4121,12 +4135,12 @@ else MISSING="${MISSING}strrchr.o "; for ac_func in rindex do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4125: checking for $ac_func" >&5 +echo "configure:4139: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4176,12 +4190,12 @@ done fi echo $ac_n "checking for strtoul""... $ac_c" 1>&6 -echo "configure:4180: checking for strtoul" >&5 +echo "configure:4194: checking for strtoul" >&5 if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strtoul=yes" else @@ -4225,12 +4239,12 @@ MISSING="${MISSING}strtoul.o " fi echo $ac_n "checking for sysconf""... $ac_c" 1>&6 -echo "configure:4229: checking for sysconf" >&5 +echo "configure:4243: checking for sysconf" >&5 if eval "test \"`echo '$''{'ac_cv_func_sysconf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_sysconf=yes" else @@ -4273,12 +4287,12 @@ else MISSING="${MISSING}sysconf.o "; for ac_func in getdtablesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4277: checking for $ac_func" >&5 +echo "configure:4291: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4328,12 +4342,12 @@ done fi echo $ac_n "checking for uname""... $ac_c" 1>&6 -echo "configure:4332: checking for uname" >&5 +echo "configure:4346: checking for uname" >&5 if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_uname=yes" else @@ -4376,12 +4390,12 @@ else MISSING="${MISSING}uname.o "; for ac_func in gethostname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4380: checking for $ac_func" >&5 +echo "configure:4394: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4431,12 +4445,12 @@ done fi echo $ac_n "checking for unsetenv""... $ac_c" 1>&6 -echo "configure:4435: checking for unsetenv" >&5 +echo "configure:4449: checking for unsetenv" >&5 if eval "test \"`echo '$''{'ac_cv_func_unsetenv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_unsetenv=yes" else @@ -4485,9 +4499,9 @@ fi echo $ac_n "checking for nonstandard gettimeofday""... $ac_c" 1>&6 -echo "configure:4489: checking for nonstandard gettimeofday" >&5 +echo "configure:4503: checking for nonstandard gettimeofday" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 else @@ -4510,7 +4524,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* echo "$ac_t""maybe" 1>&6 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_ONE_ARG_GETTIMEOFDAY 1 diff --git a/contrib/opie/configure.in b/contrib/opie/configure.in index 475fd57910bf..6fd7cd40bd63 100644 --- a/contrib/opie/configure.in +++ b/contrib/opie/configure.in @@ -1,7 +1,7 @@ dnl configure.in: Input for Autoconf dnl dnl %%% portions-copyright-cmetz-96 -dnl Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +dnl Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights dnl Reserved. The Inner Net License Version 2 applies to these portions of dnl the software. dnl You should have received a copy of the license with this software. If @@ -14,6 +14,9 @@ dnl License Agreement applies to this software. dnl dnl History: dnl +dnl Modified by cmetz for OPIE 2.32. Substitute default for LOCK_DIR. +dnl Fix the --disable-user-locking bug. AC_DEFINE variables to 1. +dnl Really check for ut_host. dnl Modified by cmetz for OPIE 2.31. Put back manual utmp[x]/wtmp[x] dnl checks -- too many OSs can't be trusted to tell us where they are. dnl Check for sys/select.h. Spell endutent right. Replace strtoul() @@ -48,31 +51,30 @@ ACCESS_FILE="$enable_access_file" AC_SUBST(ACCESS_FILE) AC_ARG_ENABLE(server-md4, [ --enable-server-md4 Use MD4 instead of MD5 for the server], AC_DEFINE(MDX, 4), AC_DEFINE(MDX, 5)) -set do_user_locking=1; AC_ARG_ENABLE(user-locking, [ --disable-user-locking Disable user locking --enable-user-locking[=DIR] - Put user lock files in DIR [/etc/opielocks]],, set do_user_locking=0) -if $do_user_locking; + Put user lock files in DIR [/etc/opielocks]],,) +if test "$enable_user_locking" != no; then - AC_DEFINE(USER_LOCKING) if test -z "$enable_user_locking" then AC_DEFINE(OPIE_LOCK_DIR, "/etc/opielocks") + LOCK_DIR="/etc/opielocks" else AC_DEFINE_UNQUOTED(OPIE_LOCK_DIR, "$enable_user_locking") + LOCK_DIR="$enable_user_locking" fi fi -LOCK_DIR="$enable_user_locking" AC_SUBST(LOCK_DIR) -AC_ARG_ENABLE(retype, [ --enable-retype Ask users to re-type their secret pass phrases], AC_DEFINE(RETYPE)) -AC_ARG_ENABLE(su-star-check, [ --enable-su-star-check Refuse to switch to disabled accounts], AC_DEFINE(SU_STAR_CHECK)) -AC_ARG_ENABLE(new-prompts, [ --disable-new-prompts Use more compatible (but less informative) prompts],, AC_DEFINE(NEW_PROMPTS)) +AC_ARG_ENABLE(retype, [ --enable-retype Ask users to re-type their secret pass phrases], AC_DEFINE(RETYPE, 1)) +AC_ARG_ENABLE(su-star-check, [ --enable-su-star-check Refuse to switch to disabled accounts], AC_DEFINE(SU_STAR_CHECK, 1)) +AC_ARG_ENABLE(new-prompts, [ --disable-new-prompts Use more compatible (but less informative) prompts],, AC_DEFINE(NEW_PROMPTS, 1)) AC_ARG_ENABLE(insecure-override, [ --enable-insecure-override - Allow users to override insecure checks], AC_DEFINE(INSECURE_OVERRIDE)) -AC_ARG_ENABLE(anonymous-ftp, [ --enable-anonymous-ftp Enable anonymous FTP support], AC_DEFINE(DOANONYMOUS) echo "Enabling anonymous FTP support in ftp -- don't say we didn't warn you!") -AC_ARG_ENABLE(utmp, [ --disable-utmp Disable utmp logging], AC_DEFINE(DISABLE_UTMP) echo "Disabling utmp logging") -AC_ARG_ENABLE(wtmp, [ --disable-wtmp Disable wtmp logging], AC_DEFINE(DISABLE_UTMP) echo "Disabling wtmp logging") + Allow users to override insecure checks], AC_DEFINE(INSECURE_OVERRIDE, 1)) +AC_ARG_ENABLE(anonymous-ftp, [ --enable-anonymous-ftp Enable anonymous FTP support], AC_DEFINE(DOANONYMOUS, 1) echo "Enabling anonymous FTP support in ftp -- don't say we didn't warn you!") +AC_ARG_ENABLE(utmp, [ --disable-utmp Disable utmp logging], AC_DEFINE(DISABLE_UTMP, 1) echo "Disabling utmp logging") +AC_ARG_ENABLE(wtmp, [ --disable-wtmp Disable wtmp logging], AC_DEFINE(DISABLE_UTMP, 1) echo "Disabling wtmp logging") dnl Checks for programs. AC_PROG_CC @@ -479,7 +481,9 @@ AC_TRY_COMPILE([#include dnl AC_MSG_CHECKING(for ut_user in struct utmp) dnl AC_TRY_COMPILE([#include dnl #include ], [struct utmp foo; return (int)foo.ut_user[0];], AC_DEFINE(HAVE_UT_USER) AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) -AC_DEFINE(HAVE_UT_HOST) +AC_MSG_CHECKING(for ut_host in struct utmp) +AC_TRY_COMPILE([#include +#include ], [struct utmp foo; return (int)foo.ut_host[0];], AC_DEFINE(HAVE_UT_HOST) AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) dnl Checks for library functions. dnl AC_PROG_GCC_TRADITIONAL diff --git a/contrib/opie/glob.c b/contrib/opie/glob.c index 58f58f3ee82d..8cbe7790e1a2 100644 --- a/contrib/opie/glob.c +++ b/contrib/opie/glob.c @@ -1,7 +1,7 @@ /* glob.c: The csh et al glob pattern matching routines. %%% copyright-cmetz-96 -This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved. +This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to this software. You should have received a copy of the license with this software. If you didn't get a copy, you may request one from . @@ -13,6 +13,8 @@ License Agreement applies to this software. History: + Modified by cmetz for OPIE 2.32. Remove include of dirent.h here; it's + done already (and conditionally) in opie_cfg.h. Modified by cmetz for OPIE 2.2. Use FUNCTION declaration et al. Remove useless strings. Prototype right. Modified at NRL for OPIE 2.0. @@ -62,7 +64,6 @@ License Agreement applies to this software. #endif /* HAVE_SYS_PARAM_H */ #include -#include #if HAVE_PWD_H #include #endif /* HAVE_PWD_H */ diff --git a/contrib/opie/libmissing/Makefile.in b/contrib/opie/libmissing/Makefile.in index 1e26e64fff50..3da41edad598 100644 --- a/contrib/opie/libmissing/Makefile.in +++ b/contrib/opie/libmissing/Makefile.in @@ -2,7 +2,7 @@ # Makefile.in/Makefile: Directions for building libmissing. # # %%% copyright-cmetz-96 -# This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved. +# This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved. # The Inner Net License Version 2 applies to this software. # You should have received a copy of the license with this software. If # you didn't get a copy, you may request one from . diff --git a/contrib/opie/libmissing/endutent.c b/contrib/opie/libmissing/endutent.c index 6e863218cd2d..0b4bd7a39763 100644 --- a/contrib/opie/libmissing/endutent.c +++ b/contrib/opie/libmissing/endutent.c @@ -1,7 +1,7 @@ /* endutent.c: A replacement for the endutent function %%% copyright-cmetz-96 -This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved. +This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to this software. You should have received a copy of the license with this software. If you didn't get a copy, you may request one from . diff --git a/contrib/opie/libmissing/getutline.c b/contrib/opie/libmissing/getutline.c index 0ceb76b804a8..59df92b750a1 100644 --- a/contrib/opie/libmissing/getutline.c +++ b/contrib/opie/libmissing/getutline.c @@ -1,13 +1,15 @@ /* getutline.c: A replacement for the getutline() function %%% copyright-cmetz-96 -This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved. +This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to this software. You should have received a copy of the license with this software. If you didn't get a copy, you may request one from . History: + Modified by cmetz for OPIE 2.32. Fixed check for fread() return + value. Modified by cmetz for OPIE 2.31. If the OS won't tell us where _PATH_UTMP is, play the SVID game, then use Autoconf-discovered values. @@ -41,14 +43,14 @@ struct utmp *getutline FUNCTION((utmp), struct utmp *utmp) if (i = ttyslot()) { if (fseek(f, i * sizeof(struct utmp), SEEK_SET) < 0) goto ret; - if (fread(&u, sizeof(struct utmp), 1, f) != sizeof(struct utmp)) + if (fread(&u, sizeof(struct utmp), 1, f) != 1) goto ret; fclose(f); return &u; } #endif /* HAVE_TTYSLOT */ - while(fread(&u, sizeof(struct utmp), 1, f) == sizeof(struct utmp)) { + while(fread(&u, sizeof(struct utmp), 1, f) == 1) { if (!strncmp(utmp->ut_line, u.ut_line, sizeof(u.ut_line) - 1)) { fclose(f); return &u; diff --git a/contrib/opie/libmissing/pututline.c b/contrib/opie/libmissing/pututline.c index 2b79608b9dfe..93f209bbc76c 100644 --- a/contrib/opie/libmissing/pututline.c +++ b/contrib/opie/libmissing/pututline.c @@ -1,13 +1,15 @@ /* pututline.c: A replacement for the pututline() function %%% copyright-cmetz-96 -This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved. +This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to this software. You should have received a copy of the license with this software. If you didn't get a copy, you may request one from . History: + Modified by cmetz for OPIE 2.32. Fixed check for fread() return + value. Modified by cmetz for OPIE 2.31. If the OS won't tell us where _PATH_UTMP is, use Autoconf-discovered values. Created by cmetz for OPIE 2.3. @@ -40,7 +42,7 @@ void pututline FUNCTION((utmp), struct utmp *utmp) } #endif /* HAVE_TTYSLOT */ - while(fread(&u, sizeof(struct utmp), 1, f) == sizeof(struct utmp)) { + while(fread(&u, sizeof(struct utmp), 1, f) == 1) { if (!strncmp(utmp->ut_line, u.ut_line, sizeof(u.ut_line) - 1)) { if ((i = ftell(f)) < 0) goto ret; diff --git a/contrib/opie/libmissing/setutent.c b/contrib/opie/libmissing/setutent.c index 740b8f6310f0..ebb98e0ac4ef 100644 --- a/contrib/opie/libmissing/setutent.c +++ b/contrib/opie/libmissing/setutent.c @@ -1,7 +1,7 @@ /* setutent.c: A replacement for the setutent function %%% copyright-cmetz-96 -This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved. +This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to this software. You should have received a copy of the license with this software. If you didn't get a copy, you may request one from . diff --git a/contrib/opie/libopie/Makefile.in b/contrib/opie/libopie/Makefile.in index 17ca82906961..2b3c96c0cd85 100644 --- a/contrib/opie/libopie/Makefile.in +++ b/contrib/opie/libopie/Makefile.in @@ -2,7 +2,7 @@ # Makefile.in/Makefile: Directions for building libopie. # # %%% copyright-cmetz-96 -# This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved. +# This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved. # The Inner Net License Version 2 applies to this software. # You should have received a copy of the license with this software. If # you didn't get a copy, you may request one from . diff --git a/contrib/opie/libopie/accessfile.c b/contrib/opie/libopie/accessfile.c index 39e3d827663a..0fe1d123958e 100644 --- a/contrib/opie/libopie/accessfile.c +++ b/contrib/opie/libopie/accessfile.c @@ -2,7 +2,7 @@ overrides. %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If diff --git a/contrib/opie/libopie/atob8.c b/contrib/opie/libopie/atob8.c index d548ef987b31..78a7d43831b4 100644 --- a/contrib/opie/libopie/atob8.c +++ b/contrib/opie/libopie/atob8.c @@ -1,7 +1,7 @@ /* atob8.c: The opieatob8() library function. %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If diff --git a/contrib/opie/libopie/btoa8.c b/contrib/opie/libopie/btoa8.c index 7e53d409d416..2b3e885bc1a5 100644 --- a/contrib/opie/libopie/btoa8.c +++ b/contrib/opie/libopie/btoa8.c @@ -1,7 +1,7 @@ /* btoa8.c: The opiebtoa8() library function. %%% copyright-cmetz-96 -This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved. +This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to this software. You should have received a copy of the license with this software. If you didn't get a copy, you may request one from . diff --git a/contrib/opie/libopie/btoe.c b/contrib/opie/libopie/btoe.c index 7cd7c290e59e..b7ed3cde3420 100644 --- a/contrib/opie/libopie/btoe.c +++ b/contrib/opie/libopie/btoe.c @@ -3,7 +3,7 @@ 64 bit OTP. %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If diff --git a/contrib/opie/libopie/btoh.c b/contrib/opie/libopie/btoh.c index 11e3c5d1f578..c5ed15065ac4 100644 --- a/contrib/opie/libopie/btoh.c +++ b/contrib/opie/libopie/btoh.c @@ -1,7 +1,7 @@ /* btoh.c: The opiebtoh() library function. %%% copyright-cmetz-96 -This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved. +This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to this software. You should have received a copy of the license with this software. If you didn't get a copy, you may request one from . diff --git a/contrib/opie/libopie/challenge.c b/contrib/opie/libopie/challenge.c index a52e5fafb3eb..0f3fec55cf22 100644 --- a/contrib/opie/libopie/challenge.c +++ b/contrib/opie/libopie/challenge.c @@ -1,7 +1,7 @@ /* challenge.c: The opiechallenge() library function. %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If @@ -14,6 +14,8 @@ License Agreement applies to this software. History: + Modified by cmetz for OPIE 2.32. Added extended response set + identifier to the challenge. Modified by cmetz for OPIE 2.3. Use opie_ prefix. Send debug info to syslog. Add sha plumbing. Modified by cmetz for OPIE 2.2. Use FUNCTION declaration et al. @@ -68,7 +70,7 @@ int opiechallenge FUNCTION((mp, name, ss), struct opie *mp AND char *name AND ch opierandomchallenge(ss); memset(mp, 0, sizeof(*mp)); } else - sprintf(ss, "otp-%s %d %s", algids[MDX], mp->opie_n - 1, mp->opie_seed); + sprintf(ss, "otp-%s %d %s ext", algids[MDX], mp->opie_n - 1, mp->opie_seed); return rval; } diff --git a/contrib/opie/libopie/getsequence.c b/contrib/opie/libopie/getsequence.c index 44a34cee1746..e6c96c5aca0f 100644 --- a/contrib/opie/libopie/getsequence.c +++ b/contrib/opie/libopie/getsequence.c @@ -1,7 +1,7 @@ /* getsequence.c: The opiegetsequence() library function. %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If diff --git a/contrib/opie/libopie/getutmpentry.c b/contrib/opie/libopie/getutmpentry.c index 1c9ed0ff3aae..531820eba216 100644 --- a/contrib/opie/libopie/getutmpentry.c +++ b/contrib/opie/libopie/getutmpentry.c @@ -1,7 +1,7 @@ /* getutmpentry.c: The __opiegetutmpentry() library function. %%% copyright-cmetz-96 -This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved. +This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to this software. You should have received a copy of the license with this software. If you didn't get a copy, you may request one from . diff --git a/contrib/opie/libopie/insecure.c b/contrib/opie/libopie/insecure.c index 999d6e783261..a7fda7b3cca2 100644 --- a/contrib/opie/libopie/insecure.c +++ b/contrib/opie/libopie/insecure.c @@ -1,7 +1,7 @@ /* insecure.c: The opieinsecure() library function. %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If @@ -118,34 +118,36 @@ int opieinsecure FUNCTION_NOARGS }; #if HAVE_UT_HOST - memset(&utmp, 0, sizeof(struct utmp)); - { - int i = __opiegetutmpentry(ttyname(0), &utmp); - endutent(); - if (!i && utmp.ut_host[0]) { - insecure = 1; + if (isatty(0)) { + memset(&utmp, 0, sizeof(struct utmp)); + { + int i = __opiegetutmpentry(ttyname(0), &utmp); + endutent(); + if (!i && utmp.ut_host[0]) { + insecure = 1; - if (s = strchr(utmp.ut_host, ':')) { - int n = s - utmp.ut_host; - if (!n) - insecure = 0; - else - if (display_name) { - if (!strncmp(utmp.ut_host, display_name, n)) - insecure = 0; + if (s = strchr(utmp.ut_host, ':')) { + int n = s - utmp.ut_host; + if (!n) + insecure = 0; + else + if (display_name) { + if (!strncmp(utmp.ut_host, display_name, n)) + insecure = 0; #ifdef SOLARIS - else - if (s = strchr(utmp.ut_host, ' ')) { - *s = ':'; - if (s = strchr(s + 1, ' ')) - *s = '.'; - if (!strncmp(utmp.ut_host, display_name, n)) - insecure = 0; - } + else + if (s = strchr(utmp.ut_host, ' ')) { + *s = ':'; + if (s = strchr(s + 1, ' ')) + *s = '.'; + if (!strncmp(utmp.ut_host, display_name, n)) + insecure = 0; + } #endif /* SOLARIS */ - } - } - } + } + } + } + }; }; #endif /* HAVE_UT_HOST */ if (insecure) diff --git a/contrib/opie/libopie/keycrunch.c b/contrib/opie/libopie/keycrunch.c index fccdc3c2b1cc..94a1a532deec 100644 --- a/contrib/opie/libopie/keycrunch.c +++ b/contrib/opie/libopie/keycrunch.c @@ -1,7 +1,7 @@ /* keycrunch.c: The opiekeycrunch() library function. %%% copyright-cmetz-96 -This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved. +This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to this software. You should have received a copy of the license with this software. If you didn't get a copy, you may request one from . diff --git a/contrib/opie/libopie/lock.c b/contrib/opie/libopie/lock.c index 40999dea08f5..fc449d4cada4 100644 --- a/contrib/opie/libopie/lock.c +++ b/contrib/opie/libopie/lock.c @@ -1,7 +1,7 @@ /* lock.c: The opielock() library function. %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If diff --git a/contrib/opie/libopie/login.c b/contrib/opie/libopie/login.c index f7082c900cba..ca3914321c85 100644 --- a/contrib/opie/libopie/login.c +++ b/contrib/opie/libopie/login.c @@ -1,7 +1,7 @@ /* login.c: The opielogin() library function. %%% copyright-cmetz-96 -This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved. +This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to this software. You should have received a copy of the license with this software. If you didn't get a copy, you may request one from . diff --git a/contrib/opie/libopie/logwtmp.c b/contrib/opie/libopie/logwtmp.c index efc1def3cc5c..a42fdec59a2b 100644 --- a/contrib/opie/libopie/logwtmp.c +++ b/contrib/opie/libopie/logwtmp.c @@ -1,7 +1,7 @@ /* logwtmp.c: Put an entry in the wtmp file. %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If @@ -14,11 +14,14 @@ License Agreement applies to this software. History: + Modified by cmetz for OPIE 2.32. Don't leave line=NULL, skip + past /dev/ in line. Fill in ut_host on systems with UTMPX and + ut_host. Modified by cmetz for OPIE 2.31. Move wtmp log functions here, to - improve portability. Added DISABLE_WTMP. + improve portability. Added DISABLE_WTMP. Modified by cmetz for OPIE 2.22. Call gettimeofday() properly. Modified by cmetz for OPIE 2.2. Use FUNCTION declaration et al. - Ifdef around some headers. Added file close hook. + Ifdef around some headers. Added file close hook. Modified at NRL for OPIE 2.1. Set process type for HPUX. Modified at NRL for OPIE 2.0. Originally from BSD. @@ -124,7 +127,10 @@ VOIDRET opielogwtmp FUNCTION((line, name, host), char *line AND char *name AND c #if DOUTMPX && defined(_PATH_WTMPX) close(fdx); #endif /* DOUTMPX && defined(_PATH_WTMPX) */ - } + line = ""; + } else + if (!strncmp(line, "/dev/", 5)) + line += 5; if (fd < 0 && (fd = open(_PATH_WTMP, O_WRONLY | O_APPEND, 0)) < 0) return; @@ -137,9 +143,9 @@ VOIDRET opielogwtmp FUNCTION((line, name, host), char *line AND char *name AND c #endif /* HAVE_UT_PID */ strncpy(ut.ut_line, line, sizeof(ut.ut_line)); strncpy(ut.ut_name, name, sizeof(ut.ut_name)); -#if !DOUTMPX +#if HAVE_UT_HOST strncpy(ut.ut_host, host, sizeof(ut.ut_host)); -#endif /* !DOUTMPX */ +#endif /* HAVE_UT_HOST */ time(&ut.ut_time); if (write(fd, (char *) &ut, sizeof(struct utmp)) != sizeof(struct utmp)) diff --git a/contrib/opie/libopie/lookup.c b/contrib/opie/libopie/lookup.c index 39fab48eef84..d05e1fa0ec63 100644 --- a/contrib/opie/libopie/lookup.c +++ b/contrib/opie/libopie/lookup.c @@ -1,7 +1,7 @@ /* lookup.c: The opielookup() library function. %%% copyright-cmetz-96 -This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved. +This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to this software. You should have received a copy of the license with this software. If you didn't get a copy, you may request one from . diff --git a/contrib/opie/libopie/md4c.c b/contrib/opie/libopie/md4c.c index 343cb8fb5016..acc88578b04e 100644 --- a/contrib/opie/libopie/md4c.c +++ b/contrib/opie/libopie/md4c.c @@ -1,7 +1,7 @@ /* md4c.c: "RSA Data Security, Inc. MD4 Message-Digest Algorithm" %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If diff --git a/contrib/opie/libopie/md5c.c b/contrib/opie/libopie/md5c.c index d2a939099e8e..09611a5ce825 100644 --- a/contrib/opie/libopie/md5c.c +++ b/contrib/opie/libopie/md5c.c @@ -2,7 +2,7 @@ "derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm" %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If diff --git a/contrib/opie/libopie/open.c b/contrib/opie/libopie/open.c index 3a1dcccdd3c3..dac03a8fd05b 100644 --- a/contrib/opie/libopie/open.c +++ b/contrib/opie/libopie/open.c @@ -1,7 +1,7 @@ /* open.c: The __opieopen() library function. %%% copyright-cmetz-96 -This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved. +This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to this software. You should have received a copy of the license with this software. If you didn't get a copy, you may request one from . diff --git a/contrib/opie/libopie/parsechallenge.c b/contrib/opie/libopie/parsechallenge.c index e3e314e2b1cc..2035c381b356 100644 --- a/contrib/opie/libopie/parsechallenge.c +++ b/contrib/opie/libopie/parsechallenge.c @@ -1,13 +1,15 @@ -/* parsechallenge.c: The _opieparsechallenge() library function. +/* parsechallenge.c: The __opieparsechallenge() library function. %%% copyright-cmetz-96 -This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved. +This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to this software. You should have received a copy of the license with this software. If you didn't get a copy, you may request one from . History: + Modified by cmetz for OPIE 2.32. Check for extended response sets. + Change prefix to double underscore. Created by cmetz for OPIE 2.3 using generator.c as a guide. */ @@ -29,7 +31,7 @@ static struct algorithm algorithms[] = { { NULL, 0 }, }; -int _opieparsechallenge FUNCTION((buffer, algorithm, sequence, seed), char *buffer AND int *algorithm AND int *sequence AND char **seed) +int __opieparsechallenge FUNCTION((buffer, algorithm, sequence, seed, exts), char *buffer AND int *algorithm AND int *sequence AND char **seed AND int *exts) { char *c; @@ -64,7 +66,13 @@ int _opieparsechallenge FUNCTION((buffer, algorithm, sequence, seed), char *buff } *seed = buffer; - *c = 0; + *(c++) = 0; + + while(*c && !isspace(*c)) c++; + if (*c && !strncmp(c, "ext", 3)) + *exts = 1; + else + *exts = 0; return 0; } diff --git a/contrib/opie/libopie/passcheck.c b/contrib/opie/libopie/passcheck.c index 8d60931a7102..8bfa87ddb275 100644 --- a/contrib/opie/libopie/passcheck.c +++ b/contrib/opie/libopie/passcheck.c @@ -1,7 +1,7 @@ /* passcheck.c: The opiepasscheck() library function. %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If diff --git a/contrib/opie/libopie/passwd.c b/contrib/opie/libopie/passwd.c index 17df424f4c78..6bac249d3c7c 100644 --- a/contrib/opie/libopie/passwd.c +++ b/contrib/opie/libopie/passwd.c @@ -1,13 +1,16 @@ /* passwd.c: The opiepasswd() library function. %%% copyright-cmetz-96 -This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved. +This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to this software. You should have received a copy of the license with this software. If you didn't get a copy, you may request one from . History: + Modified by cmetz for OPIE 2.32. Renamed mode to flags. Made flag + values symbolic constants. Added a flag for insecure override + support. Modified by cmetz for OPIE 2.31. Removed active attack protection support. Modified by cmetz for OPIE 2.3. Split most of the function off @@ -20,12 +23,15 @@ you didn't get a copy, you may request one from . #include "opie_cfg.h" #include "opie.h" -int opiepasswd FUNCTION((old, mode, principal, n, seed, ks), struct opie *old AND int mode AND char *principal AND int n AND char *seed AND char *ks) +int opiepasswd FUNCTION((old, flags, principal, n, seed, ks), struct opie *old AND int flags AND char *principal AND int n AND char *seed AND char *ks) { int i; struct opie opie; - if ((mode & 1) && opieinsecure()) + if ((flags & OPIEPASSWD_CONSOLE) && opieinsecure()) +#if INSECURE_OVERRIDE + if (!(flags & OPIEPASSWD_FORCE)) +#endif /* INSECURE_OVERRIDE */ return -1; memset(&opie, 0, sizeof(struct opie)); @@ -42,7 +48,7 @@ int opiepasswd FUNCTION((old, mode, principal, n, seed, ks), struct opie *old AN if (ks) { char key[8]; - if (mode & 1) { + if (flags & OPIEPASSWD_CONSOLE) { if (opiekeycrunch(MDX, key, seed, ks)) return -1; for (i = n; i; i--) diff --git a/contrib/opie/libopie/randomchallenge.c b/contrib/opie/libopie/randomchallenge.c index 021da77d1744..99b4c4897e7f 100644 --- a/contrib/opie/libopie/randomchallenge.c +++ b/contrib/opie/libopie/randomchallenge.c @@ -1,7 +1,7 @@ /* randomchallenge.c: The opierandomchallenge() library function. %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If @@ -14,6 +14,8 @@ License Agreement applies to this software. History: + Modified by cmetz for OPIE 2.32. Initialize algids[] with 0s + instead of NULL. Modified by cmetz for OPIE 2.3. Add sha support. Modified by cmetz for OPIE 2.22. Don't include stdio.h. Use opienewseed(). Don't include unneeded headers. @@ -26,7 +28,7 @@ License Agreement applies to this software. #include "opie_cfg.h" #include "opie.h" -static char *algids[] = { NULL, NULL, NULL, "sha1", "md4", "md5" }; +static char *algids[] = { 0, 0, 0, "sha1", "md4", "md5" }; /* Generate a random challenge */ /* This could grow into quite a monster, really. Random is good enough for @@ -39,5 +41,5 @@ VOIDRET opierandomchallenge FUNCTION((prompt), char *prompt) if (opienewseed(buf)) strcpy(buf, "ke4452"); - sprintf(prompt, "otp-%s %d %s", algids[MDX], (rand() % 499) + 1, buf); + sprintf(prompt, "otp-%s %d %s ext", algids[MDX], (rand() % 499) + 1, buf); } diff --git a/contrib/opie/libopie/readpass.c b/contrib/opie/libopie/readpass.c index 48b5699d19c8..5808f02357cd 100644 --- a/contrib/opie/libopie/readpass.c +++ b/contrib/opie/libopie/readpass.c @@ -1,7 +1,7 @@ /* readpass.c: The opiereadpass() library function. %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If diff --git a/contrib/opie/libopie/readrec.c b/contrib/opie/libopie/readrec.c index d26002df019d..f6361eb51aa1 100644 --- a/contrib/opie/libopie/readrec.c +++ b/contrib/opie/libopie/readrec.c @@ -1,7 +1,7 @@ /* readrec.c: The __opiereadrec() library function. %%% copyright-cmetz-96 -This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved. +This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to this software. You should have received a copy of the license with this software. If you didn't get a copy, you may request one from . @@ -52,8 +52,14 @@ static int parserec FUNCTION((opie), struct opie *opie) *(c2++) = 0; - if (!(opie->opie_n = atoi(c))) + { + char *c3; + + opie->opie_n = strtoul(c, &c3, 10); + + if (*c3) return -1; + }; if (!(c2 = strchr(opie->opie_seed = c2, ' '))) return -1; @@ -112,7 +118,7 @@ int __opiereadrec FUNCTION((opie), struct opie *opie) } if (!opie->opie_principal) - return -1; + goto ret; { char *c, principal[OPIE_PRINCIPAL_MAX]; diff --git a/contrib/opie/libopie/unlock.c b/contrib/opie/libopie/unlock.c index 4dac0c43ab02..4c01a5c121a1 100644 --- a/contrib/opie/libopie/unlock.c +++ b/contrib/opie/libopie/unlock.c @@ -1,7 +1,7 @@ /* unlock.c: The opieunlock() library function. %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If diff --git a/contrib/opie/libopie/verify.c b/contrib/opie/libopie/verify.c index 52698d4137b1..990e29340fc8 100644 --- a/contrib/opie/libopie/verify.c +++ b/contrib/opie/libopie/verify.c @@ -1,13 +1,17 @@ /* verify.c: The opieverify() library function. %%% copyright-cmetz-96 -This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved. +This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to this software. You should have received a copy of the license with this software. If you didn't get a copy, you may request one from . History: + Modified by cmetz for OPIE 2.32. Renamed _opieparsechallenge() to + __opieparsechallenge() and handle new argument. Fixed init + response parsing bug. + Modified by cmetz for OPIE 2.31. Renamed "init" to "init-hex". Modified by cmetz for OPIE 2.31. Renamed "init" and "RESPONSE_INIT" to "init-hex" and "RESPONSE_INIT_HEX". Removed active attack protection support. @@ -126,8 +130,6 @@ int opieverify FUNCTION((opie, response), struct opie *opie AND char *response) case RESPONSE_INIT_WORD: { char *c2; - char newkey[8]; - char buf[OPIE_SEED_MAX + 48 + 1]; if (!(c2 = strchr(c, ':'))) goto verret; @@ -165,22 +167,17 @@ int opieverify FUNCTION((opie, response), struct opie *opie AND char *response) *(c2++) = 0; { - int j; + int j, k; - if (_opieparsechallenge(c, &j, &(opie->opie_n), &(opie->opie_seed)) || (j != MDX)) + if (__opieparsechallenge(c, &j, &(opie->opie_n), &(opie->opie_seed), &k) || (j != MDX) || k) goto verret; } - if (!(c2 = strchr(c = c2, ':'))) - goto verret; - - *(c2++) = 0; - if (i == RESPONSE_INIT_HEX) { - if (!opieatob8(newkey, c)) + if (!opieatob8(key, c2)) goto verret; } else { - if (opieetob(newkey, c) != 1) + if (opieetob(key, c2) != 1) goto verret; } } diff --git a/contrib/opie/libopie/version.c b/contrib/opie/libopie/version.c index 11e3394ea105..ef6523d04b15 100644 --- a/contrib/opie/libopie/version.c +++ b/contrib/opie/libopie/version.c @@ -1,7 +1,7 @@ /* version.c: The opieversion() library function. %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If diff --git a/contrib/opie/libopie/writerec.c b/contrib/opie/libopie/writerec.c index 224689902278..084342327b77 100644 --- a/contrib/opie/libopie/writerec.c +++ b/contrib/opie/libopie/writerec.c @@ -1,7 +1,7 @@ /* writerec.c: The __opiewriterec() library function. %%% copyright-cmetz-96 -This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved. +This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to this software. You should have received a copy of the license with this software. If you didn't get a copy, you may request one from . diff --git a/contrib/opie/opiegen.1 b/contrib/opie/opiegen.1 index 1b205b335386..3326ad055ebe 100644 --- a/contrib/opie/opiegen.1 +++ b/contrib/opie/opiegen.1 @@ -1,7 +1,7 @@ .\" opiegen.1: Manual page for the opiegen(1) program. .\" .\" %%% portions-copyright-cmetz-96 -.\" Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +.\" Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights .\" Reserved. The Inner Net License Version 2 applies to these portions of .\" the software. .\" You should have received a copy of the license with this software. If diff --git a/contrib/opie/opiegen.c b/contrib/opie/opiegen.c index 4778f5726bdc..0cced9872e2b 100644 --- a/contrib/opie/opiegen.c +++ b/contrib/opie/opiegen.c @@ -2,7 +2,7 @@ library routine. %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If diff --git a/contrib/opie/opieinfo.c b/contrib/opie/opieinfo.c index 35692ff90250..d667a9ae6d04 100644 --- a/contrib/opie/opieinfo.c +++ b/contrib/opie/opieinfo.c @@ -2,7 +2,7 @@ opieinfo: Print a user's current OPIE sequence number and seed %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If diff --git a/contrib/opie/opiekey.c b/contrib/opie/opiekey.c index 475d48b6068c..20f982b641b6 100644 --- a/contrib/opie/opiekey.c +++ b/contrib/opie/opiekey.c @@ -5,7 +5,7 @@ and outputs a response. %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If @@ -312,7 +312,7 @@ int main FUNCTION((argc, argv), int argc AND char *argv[]) case RESPONSE_INIT_HEX: case RESPONSE_INIT_WORD: if (type == RESPONSE_INIT_HEX) { - strcpy(response, "init:"); + strcpy(response, "init-hex:"); strcat(response, opiebtoh(buf, key)); sprintf(buf, ":%s 499 %s:", algids[algorithm], newseed); strcat(response, buf); diff --git a/contrib/opie/opielogin.1 b/contrib/opie/opielogin.1 index 5cfd72a7e2f9..7fdeb642e097 100644 --- a/contrib/opie/opielogin.1 +++ b/contrib/opie/opielogin.1 @@ -1,7 +1,7 @@ .\" opielogin.1: Manual page for the opielogin(1) program. .\" .\" %%% portions-copyright-cmetz-96 -.\" Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +.\" Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights .\" Reserved. The Inner Net License Version 2 applies to these portions of .\" the software. .\" You should have received a copy of the license with this software. If diff --git a/contrib/opie/opielogin.c b/contrib/opie/opielogin.c index c2fecb94021c..eacfac9593f3 100644 --- a/contrib/opie/opielogin.c +++ b/contrib/opie/opielogin.c @@ -1,7 +1,7 @@ /* opielogin.c: The infamous /bin/login %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If @@ -14,6 +14,10 @@ License Agreement applies to this software. History: + Modified by cmetz for OPIE 2.32. Partially handle environment + variables on the command line (a better implementation is + coming soon). Handle failure to issue a challenge more + gracefully. Modified by cmetz for OPIE 2.31. Use _PATH_NOLOGIN. Move Solaris drain bamage kluge after rflag check; it breaks rlogin. Use TCSAFLUSH instead of TCSANOW (except where it flushes @@ -638,7 +642,8 @@ int main FUNCTION((argc, argv), int argc AND char *argv[]) int i; char *p; char opieprompt[OPIE_CHALLENGE_MAX + 1]; - int pwok, otpok, af_pwok; + int af_pwok; + int authsok; char *pp; char buf[256]; int uid; @@ -700,111 +705,104 @@ int main FUNCTION((argc, argv), int argc AND char *argv[]) } #endif /* DEBUG */ -/* Some OSs pass environment variables on the command line. All of them except - for TERM get eaten. */ - - i = argc; - while (--i) - if (strchr(argv[i], '=')) { -#ifdef DEBUG - syslog(LOG_DEBUG, "eating %s", argv[i]); -#endif /* DEBUG */ - argc--; - if (!strncmp(argv[i], "TERM=", 5)) { - strncpy(term, &(argv[i][5]), sizeof(term)); - term[sizeof(term) - 1] = 0; -#ifdef DEBUG - syslog(LOG_DEBUG, "passed TERM=%s, ouroptind = %d", term, i); -#endif /* DEBUG */ - } - } /* Implement our own getopt()-like functionality, but do so in a much more strict manner to prevent security problems. */ for (ouroptind = 1; ouroptind < argc; ouroptind++) { - i = 0; - if (argv[ouroptind]) - if (argv[ouroptind][0] == '-') - if (i = argv[ouroptind][1]) - if (!argv[ouroptind][2]) - switch (i) { - case 'd': - if (++ouroptind == argc) - exit(1); + if (!argv[ouroptind]) + continue; + + if (argv[ouroptind][0] == '-') { + char *c = argv[ouroptind] + 1; + + while(*c) { + switch(*(c++)) { + case 'd': + if (*c || (++ouroptind == argc)) + exit(1); + /* The '-d' option is apparently a performance hack to get around ttyname() being slow. The potential does exist for it to be used for malice, and it does not seem to be strictly necessary, so we will just eat it. */ - break; + break; - case 'r': + case 'r': + if (rflag || hflag || fflag) { + fprintf(stderr, "Other options not allowed with -r\n"); + exit(1); + } + + if (*c || (++ouroptind == argc)) + exit(1); + + if (!(ouroptarg = argv[ouroptind])) + exit(1); + + rflag = -1; + if (!doremotelogin(ouroptarg)) + rflag = 1; + + strncpy(host, ouroptarg, sizeof(host)); + break; + + case 'h': + if (!getuid()) { if (rflag || hflag || fflag) { - printf("Other options not allowed with -r\n"); + fprintf(stderr, "Other options not allowed with -h\n"); exit(1); } - if (++ouroptind == argc) + hflag = 1; + + if (*c || (++ouroptind == argc)) exit(1); - ouroptarg = argv[ouroptind]; - - if (!ouroptarg) + if (!(ouroptarg = argv[ouroptind])) exit(1); - - rflag = -1; - if (!doremotelogin(ouroptarg)) - rflag = 1; - + strncpy(host, ouroptarg, sizeof(host)); - break; + } + break; - case 'h': - if (!getuid()) { - if (rflag || hflag || fflag) { - printf("Other options not allowed with -h\n"); - exit(1); - } - hflag = 1; + case 'f': + if (rflag) { + fprintf(stderr, "Only one of -r and -f allowed\n"); + exit(1); + } + fflag = 1; - if (++ouroptind == argc) - exit(1); + if (*c || (++ouroptind == argc)) + exit(1); - ouroptarg = argv[ouroptind]; + if (!(ouroptarg = argv[ouroptind])) + exit(1); - if (!ouroptarg) - exit(1); - - strncpy(host, ouroptarg, sizeof(host)); - } - break; + strncpy(name, ouroptarg, sizeof(name)); + break; + case 'p': + pflag = 1; + break; + }; + }; + continue; + }; - case 'f': - if (rflag) { - printf("Only one of -r and -f allowed\n"); - exit(1); - } - fflag = 1; + if (strchr(argv[ouroptind], '=')) { + if (!strncmp(argv[ouroptind], "TERM=", 5)) { + strncpy(term, &(argv[ouroptind][5]), sizeof(term)); + term[sizeof(term) - 1] = 0; +#ifdef DEBUG + syslog(LOG_DEBUG, "passed TERM=%s, ouroptind = %d", term, ouroptind); +#endif /* DEBUG */ + } else { +#ifdef DEBUG + syslog(LOG_DEBUG, "eating %s, ouroptind = %d", argv[ouroptind], ouroptind); +#endif /* DEBUG */ + }; + continue; + }; - if (++ouroptind == argc) - exit(1); - - ouroptarg = argv[ouroptind]; - - if (!ouroptarg) - exit(1); - - strncpy(name, ouroptarg, sizeof(name)); - break; - - case 'p': - pflag = 1; - break; - } else - i = 0; - if (!i) { - ouroptarg = argv[ouroptind++]; - strncpy(name, ouroptarg, sizeof(name)); - break; - } - } + strncpy(name, argv[ouroptind], sizeof(name)); + }; #ifdef TIOCNXCL /* BSDism: not sure how to rewrite for POSIX. rja */ @@ -1063,6 +1061,7 @@ completeness, but these are set within appropriate defines for portability. */ if (invalid && !name[0]) { getloginname(); invalid = lookupuser(); + authsok = 0; } #ifdef DEBUG syslog(LOG_DEBUG, "login name is +%s+, of length %d, [0] = %d", name, strlen(name), name[0]); @@ -1092,11 +1091,9 @@ completeness, but these are set within appropriate defines for portability. */ if ((i < 0) || (i > 1)) { syslog(LOG_ERR, "error: opiechallenge() returned %d, errno=%d!\n", i, errno); - fprintf(stderr, "System error; can't issue challenge!\n"); - otpok = 0; } else { printf("%s\n", opieprompt); - otpok = 1; + authsok |= 1; } if (!memcmp(&thisuser, &nouser, sizeof(thisuser))) @@ -1107,28 +1104,29 @@ completeness, but these are set within appropriate defines for portability. */ syslog(LOG_WARNING, "Invalid login attempt for %s on %s.", name, tty); - pwok = af_pwok && opiealways(thisuser.pw_dir); + if (af_pwok && opiealways(thisuser.pw_dir)) + authsok |= 2; + #if DEBUG - syslog(LOG_DEBUG, "af_pwok = %d, pwok = %d", af_pwok, pwok); + syslog(LOG_DEBUG, "af_pwok = %d, authsok = %d", af_pwok, authsok); #endif /* DEBUG */ - if (!pwok && !otpok) { - fprintf(stderr, "Can't authenticate %s!\n", name); - exit(1); - } + if (!authsok) + syslog(LOG_ERR, "no authentication methods are available for %s!", name); #if NEW_PROMPTS - if (otpok) + if ((authsok & 1) || !authsok) printf("Response"); - if (otpok && pwok) + if (((authsok & 3) == 3) || !authsok) printf(" or "); - if (pwok) + if ((authsok & 2) || !authsok) printf("Password"); printf(": "); - if (!opiereadpass(buf, sizeof(buf), !pwok)) + fflush(stdout); + if (!opiereadpass(buf, sizeof(buf), !(authsok & 2))) invalid = TRUE; #else /* NEW_PROMPTS */ - if (!pwok) + if (!(authsok & 1) && authsok) printf("(OTP response required)\n"); printf("Password:"); fflush(stdout); @@ -1136,8 +1134,8 @@ completeness, but these are set within appropriate defines for portability. */ invalid = TRUE; #endif /* NEW_PROMPTS */ - if (!buf[0] && otpok) { - pwok = 0; + if (!buf[0] && (authsok & 1)) { + authsok &= ~2; /* Null line entered, so display appropriate prompt & flush current data. */ #if NEW_PROMPTS @@ -1149,7 +1147,7 @@ completeness, but these are set within appropriate defines for portability. */ invalid = TRUE; } - if (otpok) { + if (authsok & 1) { i = opiegetsequence(&opie); opiepassed = !opieverify(&opie, buf); @@ -1159,7 +1157,7 @@ completeness, but these are set within appropriate defines for portability. */ } if (!invalid) { - if (otpok && opiepassed) { + if ((authsok & 1) && opiepassed) { if (i < 10) { printf("Warning: Re-initialize your OTP information"); if (i < 5) @@ -1167,7 +1165,7 @@ completeness, but these are set within appropriate defines for portability. */ printf("\n"); } } else { - if (pwok) { + if (authsok & 2) { pp = crypt(buf, thisuser.pw_passwd); invalid = strcmp(pp, thisuser.pw_passwd); } else diff --git a/contrib/opie/opiepasswd.c b/contrib/opie/opiepasswd.c index 4077e8ad7855..9cccb997aeb9 100644 --- a/contrib/opie/opiepasswd.c +++ b/contrib/opie/opiepasswd.c @@ -1,7 +1,7 @@ /* opiepasswd.c: Add/change an OTP password in the key database. %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If @@ -14,6 +14,8 @@ License Agreement applies to this software. History: + Modified by cmetz for OPIE 2.32. Use OPIE_SEED_MAX instead of + hard coding the length. Unlock user on failed lookup. Modified by cmetz for OPIE 2.3. Got of some variables and made some local to where they're used. Split out the finishing code. Use opielookup() instead of opiechallenge() to find user. Three @@ -110,7 +112,7 @@ int main FUNCTION((argc, argv), int argc AND char *argv[]) { struct opie opie; int rval, n = 499, i, mode = MODE_DEFAULT, force = 0; - char seed[18]; + char seed[OPIE_SEED_MAX+1]; struct passwd *pp; memset(seed, 0, sizeof(seed)); @@ -126,7 +128,7 @@ int main FUNCTION((argc, argv), int argc AND char *argv[]) opieversion(); case 'f': #if INSECURE_OVERRIDE - force = 1; + force = OPIEPASSWD_FORCE; #else /* INSECURE_OVERRIDE */ fprintf(stderr, "Sorry, but the -f option is not supported by this build of OPIE.\n"); #endif /* INSECURE_OVERRIDE */ @@ -185,10 +187,10 @@ int main FUNCTION((argc, argv), int argc AND char *argv[]) break; case 2: fprintf(stderr, "Error: Can't update key database.\n"); - exit(1); + finish(NULL); default: fprintf(stderr, "Error reading key database\n"); - exit(1); + finish(NULL); } if (seed[0]) { @@ -308,7 +310,7 @@ int main FUNCTION((argc, argv), int argc AND char *argv[]) finish(NULL); } - if (!(rval = opiepasswd(&opie, 0, pp->pw_name, n, seed, tmp))) + if (!(rval = opiepasswd(&opie, force, pp->pw_name, n, seed, tmp))) finish(pp->pw_name); if (rval < 0) { @@ -326,7 +328,7 @@ int main FUNCTION((argc, argv), int argc AND char *argv[]) fprintf(stderr, "Only use this method from the console; NEVER from remote. If you are using\n"); fprintf(stderr, "telnet, xterm, or a dial-in, type ^C now or exit with no password.\n"); fprintf(stderr, "Then run opiepasswd without the -c parameter.\n"); - if (opieinsecure()) { + if (opieinsecure() && !force) { fprintf(stderr, "Sorry, but you don't seem to be on the console or a secure terminal.\n"); if (force) fprintf(stderr, "Warning: Continuing could disclose your secret pass phrase to an attacker!\n"); @@ -394,7 +396,7 @@ int main FUNCTION((argc, argv), int argc AND char *argv[]) fprintf(stderr, "Sorry, no match.\n"); } memset(passwd2, 0, sizeof(passwd2)); - if (opiepasswd(&opie, 1, pp->pw_name, n, seed, passwd)) { + if (opiepasswd(&opie, 1 | force, pp->pw_name, n, seed, passwd)) { fprintf(stderr, "Error updating key database.\n"); finish(NULL); } diff --git a/contrib/opie/opieserv.1 b/contrib/opie/opieserv.1 index c7e44da2da60..021228d67ac0 100644 --- a/contrib/opie/opieserv.1 +++ b/contrib/opie/opieserv.1 @@ -1,7 +1,7 @@ .\" opieserv.1: Manual page for the opieserv(1) program. .\" .\" %%% portions-copyright-cmetz-96 -.\" Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +.\" Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights .\" Reserved. The Inner Net License Version 2 applies to these portions of .\" the software. .\" You should have received a copy of the license with this software. If diff --git a/contrib/opie/opieserv.c b/contrib/opie/opieserv.c index 5cc7b1607589..1626a786d8fd 100644 --- a/contrib/opie/opieserv.c +++ b/contrib/opie/opieserv.c @@ -2,7 +2,7 @@ opieverify() library routines. %%% copyright-cmetz-96 -This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved. +This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to this software. You should have received a copy of the license with this software. If you didn't get a copy, you may request one from . diff --git a/contrib/opie/opiesu.1 b/contrib/opie/opiesu.1 index 2bf610fe0da6..cbb15bd37469 100644 --- a/contrib/opie/opiesu.1 +++ b/contrib/opie/opiesu.1 @@ -1,7 +1,7 @@ .\" opiesu.c: Manual page for the opiesu(1) program. .\" .\" %%% portions-copyright-cmetz-96 -.\" Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +.\" Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights .\" Reserved. The Inner Net License Version 2 applies to these portions of .\" the software. .\" You should have received a copy of the license with this software. If diff --git a/contrib/opie/opiesu.c b/contrib/opie/opiesu.c index 239e52dfcb88..e2bbdb807537 100644 --- a/contrib/opie/opiesu.c +++ b/contrib/opie/opiesu.c @@ -1,7 +1,7 @@ /* opiesu.c: main body of code for the su(1m) program %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If @@ -14,6 +14,7 @@ License Agreement applies to this software. History: + Modified by cmetz for OPIE 2.32. Set up TERM and PATH correctly. Modified by cmetz for OPIE 2.31. Fix sulog(). Replaced Getlogin() with currentuser. Fixed fencepost error in month printed by sulog(). Modified by cmetz for OPIE 2.3. Limit the length of TERM on full login. @@ -99,7 +100,7 @@ License Agreement applies to this software. static char userbuf[16] = "USER="; static char homebuf[128] = "HOME="; static char shellbuf[128] = "SHELL="; -static char pathbuf[128] = "PATH="; +static char pathbuf[sizeof("PATH") + sizeof(DEFAULT_PATH) - 1] = "PATH="; static char termbuf[32] = "TERM="; static char *cleanenv[] = {userbuf, homebuf, shellbuf, pathbuf, 0, 0}; static char *user = "root"; @@ -268,7 +269,7 @@ int main FUNCTION((argc, argv), int argc AND char *argv[]) }; }; - strcpy(pathbuf, DEFAULT_PATH); + strcat(pathbuf, DEFAULT_PATH); again: if (argc > 1 && strcmp(argv[1], "-f") == 0) { @@ -459,8 +460,8 @@ int main FUNCTION((argc, argv), int argc AND char *argv[]) if (thisuser.pw_shell && *thisuser.pw_shell) shell = thisuser.pw_shell; if (fulllogin) { - if (p = getenv("TERM")) { - strncpy(termbuf, p, sizeof(termbuf)); + if ((p = getenv("TERM")) && (strlen(termbuf) + strlen(p) - 1 < sizeof(termbuf))) { + strcat(termbuf, p); cleanenv[4] = termbuf; } environ = cleanenv; diff --git a/contrib/opie/opietest.c b/contrib/opie/opietest.c index 49f8f4d82320..91a7e9525271 100644 --- a/contrib/opie/opietest.c +++ b/contrib/opie/opietest.c @@ -9,7 +9,7 @@ on your system. The converse is not such a safe statement. %%% copyright-cmetz-96 -This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved. +This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to this software. You should have received a copy of the license with this software. If you didn't get a copy, you may request one from . diff --git a/contrib/opie/permsfile.c b/contrib/opie/permsfile.c index 0d12534f4e86..46650b1aeba4 100644 --- a/contrib/opie/permsfile.c +++ b/contrib/opie/permsfile.c @@ -2,7 +2,7 @@ functionality to set device permissions on login %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If diff --git a/contrib/opie/popen.c b/contrib/opie/popen.c index 54df00bd4b4d..3cc307883cae 100644 --- a/contrib/opie/popen.c +++ b/contrib/opie/popen.c @@ -1,7 +1,7 @@ /* popen.c: A "safe" pipe open routine. %%% portions-copyright-cmetz-96 -Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights +Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights Reserved. The Inner Net License Version 2 applies to these portions of the software. You should have received a copy of the license with this software. If