From 46aea673470dfbcd3d2c26cb03476bc2dcc04e51 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Wed, 28 Aug 1996 00:01:32 +0000 Subject: [PATCH] shadow password patch from John Saunders --- CONTRIBUTORS | 1 + ChangeLog | 4 ++ configure | 98 ++++++++++++++++++++++++++++++------------- configure.in | 8 +++- include/autoconf.h.in | 6 +++ src/squid.h | 7 +++- 6 files changed, 93 insertions(+), 31 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 8c34a4d645..bc95c0ea80 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -30,6 +30,7 @@ Special thanks go to people who have volunteered their time, effort, and ideas t Cord Beermann Stephen R. van den Berg Jon Thackray + John Saunders Development of this caching software is funded by the National Science diff --git a/ChangeLog b/ChangeLog index c490318995..acbbcdcb40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ + - Fixed 'quick_abort' parsing bug + - NULL terminate too-long URL strings in urlParse(). + - Added shadow password patch from John Saunders + Changes to squid-1.1.alpha12: - Rewrote storeGetMemSpace(). diff --git a/configure b/configure index 3309da5d3b..fb2d5f00b1 100755 --- a/configure +++ b/configure @@ -517,7 +517,7 @@ fi -# From configure.in Revision: 1.26 +# From configure.in Revision: 1.27 ac_aux_dir= for ac_dir in aux $srcdir/aux; do if test -f $ac_dir/install-sh; then @@ -1295,6 +1295,7 @@ for ac_hdr in \ pwd.h \ regex.h \ resolv.h \ + shadow.h \ signal.h \ stdarg.h \ stddef.h \ @@ -1325,7 +1326,7 @@ 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 @@ -1356,7 +1357,7 @@ done echo $ac_n "checking for tm->tm_gmtoff""... $ac_c" 1>&6 cat > conftest.$ac_ext < #include @@ -1382,7 +1383,7 @@ rm -f conftest* echo $ac_n "checking for extended mallinfo""... $ac_c" 1>&6 cat > conftest.$ac_ext < #include @@ -1414,7 +1415,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1448,7 +1449,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1482,7 +1483,7 @@ 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() { return 0; } @@ -1514,7 +1515,7 @@ if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext <&6 else cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&6 +ac_lib_var=`echo shadow | tr '.-/+' '___p'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lshadow $LIBS" +cat > conftest.$ac_ext <&6 + ac_tr_lib=HAVE_LIB`echo shadow | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi + + AIO_LIBS="" echo $ac_n "checking for -labi""... $ac_c" 1>&6 ac_lib_var=`echo abi | tr '.-/+' '___p'` @@ -2002,7 +2044,7 @@ else ac_save_LIBS="$LIBS" LIBS="-labi $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&6 else cat > conftest.$ac_ext < conftest.$ac_ext < @@ -2263,7 +2305,7 @@ if test "$cross_compiling" = yes; then SQUID_UDP_SO_SNDBUF=8192 else cat > conftest.$ac_ext < @@ -2299,7 +2341,7 @@ if test "$cross_compiling" = yes; then SQUID_UDP_SO_RCVBUF=8192 else cat > conftest.$ac_ext < @@ -2335,7 +2377,7 @@ if test "$cross_compiling" = yes; then SQUID_TCP_SO_SNDBUF=8192 else cat > conftest.$ac_ext < @@ -2371,7 +2413,7 @@ if test "$cross_compiling" = yes; then SQUID_TCP_SO_RCVBUF=8192 else cat > conftest.$ac_ext < @@ -2404,7 +2446,7 @@ EOF echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6 cat > conftest.$ac_ext < int main() { return 0; } diff --git a/configure.in b/configure.in index 1c7ffbc238..cf2dd64cae 100644 --- a/configure.in +++ b/configure.in @@ -3,13 +3,13 @@ dnl Configuration input file for Squid dnl dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9) dnl -dnl $Id: configure.in,v 1.27 1996/08/19 23:09:43 wessels Exp $ +dnl $Id: configure.in,v 1.28 1996/08/27 18:01:34 wessels Exp $ dnl dnl dnl AC_INIT(src/main.c) AC_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.27 $)dnl +AC_REVISION($Revision: 1.28 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AC_CONFIG_AUX_DIR(aux) @@ -140,6 +140,7 @@ AC_CHECK_HEADERS( \ pwd.h \ regex.h \ resolv.h \ + shadow.h \ signal.h \ stdarg.h \ stddef.h \ @@ -207,6 +208,9 @@ dnl We use crypt(3) which may be in libc, or in libcrypt (eg FreeBSD) AC_CHECK_LIB(crypt, crypt, [CRYPT_LIB="-lcrypt"]) AC_SUBST(CRYPT_LIB) +dnl Check for libshadow which is needed by the shadow password suite +AC_CHECK_LIB(shadow, main) + dnl Check for libs needed for aio_read()/aio_write() AIO_LIBS="" AC_CHECK_LIB(abi, main, [HAVE_LIBABI="yes"]) diff --git a/include/autoconf.h.in b/include/autoconf.h.in index be80730523..d29838a581 100644 --- a/include/autoconf.h.in +++ b/include/autoconf.h.in @@ -205,6 +205,9 @@ /* Define if you have the header file. */ #undef HAVE_RESOLV_H +/* Define if you have the header file. */ +#undef HAVE_SHADOW_H + /* Define if you have the header file. */ #undef HAVE_SIGNAL_H @@ -286,5 +289,8 @@ /* Define if you have the resolv library (-lresolv). */ #undef HAVE_LIBRESOLV +/* Define if you have the shadow library (-lshadow). */ +#undef HAVE_LIBSHADOW + /* Define if you have the socket library (-lsocket). */ #undef HAVE_LIBSOCKET diff --git a/src/squid.h b/src/squid.h index af6c0ada97..8ca2ddb68e 100644 --- a/src/squid.h +++ b/src/squid.h @@ -1,6 +1,6 @@ /* - * $Id: squid.h,v 1.41 1996/08/26 22:47:56 wessels Exp $ + * $Id: squid.h,v 1.42 1996/08/27 18:01:37 wessels Exp $ * * AUTHOR: Duane Wessels * @@ -140,6 +140,11 @@ #include #endif +/* Only enable shadow password suite if both header and library exist */ +#if HAVE_SHADOW_H && HAVE_LIBSHADOW +#include +#endif + #if !defined(MAXHOSTNAMELEN) || (MAXHOSTNAMELEN < 128) #define SQUIDHOSTNAMELEN 128 #else -- 2.47.3