Index: ccvs/config.h.in diff -u ccvs/config.h.in:1.1.1.1 ccvs/config.h.in:1.2 --- ccvs/config.h.in:1.1.1.1 Mon Apr 24 08:32:03 2000 +++ ccvs/config.h.in Mon Apr 24 13:40:30 2000 @@ -240,6 +240,9 @@ /* Define if you have the header file. */ #undef HAVE_SYS_RESOURCE_H +/* Define if you have the header file. */ +#undef HAVE_SECURITY_PAM_APPL_H + /* Define if you have the header file. */ #undef HAVE_SYS_SELECT_H @@ -275,3 +278,23 @@ /* Define if you have the socket library (-lsocket). */ #undef HAVE_LIBSOCKET + + + + + + + + + + + + + + + + + + + + Index: ccvs/configure diff -u ccvs/configure:1.1.1.1 ccvs/configure:1.2 --- ccvs/configure:1.1.1.1 Mon Apr 24 08:32:03 2000 +++ ccvs/configure Mon Apr 24 18:21:00 2000 @@ -578,7 +578,7 @@ -for ac_prog in mawk gawk nawk awk +for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -1565,21 +1565,22 @@ for ac_hdr in errno.h unistd.h string.h memory.h utime.h fcntl.h ndbm.h \ limits.h sys/file.h \ sys/param.h sys/select.h sys/time.h sys/timeb.h \ - io.h direct.h sys/bsdtypes.h sys/resource.h + io.h direct.h sys/bsdtypes.h sys/resource.h \ + security/pam_appl.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1573: checking for $ac_hdr" >&5 +echo "configure:1574: 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:1583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1606,12 +1607,12 @@ done echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 -echo "configure:1610: checking whether stat file-mode macros are broken" >&5 +echo "configure:1611: checking whether stat file-mode macros are broken" >&5 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1662,12 +1663,12 @@ fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1666: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1667: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1676,7 +1677,7 @@ struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1698,12 +1699,12 @@ echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1702: checking for working const" >&5 +echo "configure:1703: 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:1757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1773,12 +1774,12 @@ fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:1777: checking for uid_t in sys/types.h" >&5 +echo "configure:1778: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -1807,12 +1808,12 @@ fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:1811: checking for mode_t" >&5 +echo "configure:1812: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1840,12 +1841,12 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:1844: checking for pid_t" >&5 +echo "configure:1845: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1873,12 +1874,12 @@ fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1877: checking for size_t" >&5 +echo "configure:1878: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1906,12 +1907,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:1910: checking return type of signal handlers" >&5 +echo "configure:1911: 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 @@ -1928,7 +1929,7 @@ int i; ; return 0; } EOF -if { (eval echo configure:1932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -1948,12 +1949,12 @@ echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:1952: checking for st_blksize in struct stat" >&5 +echo "configure:1953: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1961,7 +1962,7 @@ struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:1965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -1984,12 +1985,12 @@ for ac_func in mkdir rename strstr dup2 strerror valloc waitpid memmove strtoul do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1988: checking for $ac_func" >&5 +echo "configure:1989: 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${ac_exeext}; then +if { (eval echo configure:2017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2041,12 +2042,12 @@ for ac_func in fchmod fsync ftime mktemp putenv vprintf ftruncate timezone getpagesize initgroups fchdir sigaction sigprocmask sigvec sigsetmask sigblock tempnam tzset readlink wait3 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2045: checking for $ac_func" >&5 +echo "configure:2046: 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${ac_exeext}; then +if { (eval echo configure:2074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2105,17 +2106,17 @@ ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:2109: checking for vfork.h" >&5 +echo "configure:2110: checking for vfork.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:2119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2140,18 +2141,18 @@ fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:2144: checking for working vfork" >&5 +echo "configure:2145: checking for working vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then echo $ac_n "checking for vfork""... $ac_c" 1>&6 -echo "configure:2150: checking for vfork" >&5 +echo "configure:2151: checking for vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork'+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${ac_exeext}; then +if { (eval echo configure:2179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else @@ -2196,7 +2197,7 @@ ac_cv_func_vfork_works=$ac_cv_func_vfork else cat > conftest.$ac_ext < @@ -2291,7 +2292,7 @@ } } EOF -if { (eval echo configure:2295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_vfork_works=yes else @@ -2314,7 +2315,7 @@ fi echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6 -echo "configure:2318: checking whether closedir returns void" >&5 +echo "configure:2319: checking whether closedir returns void" >&5 if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2322,13 +2323,13 @@ ac_cv_func_closedir_void=yes else cat > conftest.$ac_ext < #include <$ac_header_dirent> int closedir(); main() { exit(closedir(opendir(".")) != 0); } EOF -if { (eval echo configure:2332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_closedir_void=no else @@ -2353,14 +2354,14 @@ echo $ac_n "checking for library containing getspnam""... $ac_c" 1>&6 -echo "configure:2357: checking for library containing getspnam" >&5 +echo "configure:2358: checking for library containing getspnam" >&5 if eval "test \"`echo '$''{'ac_cv_search_getspnam'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_getspnam="no" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_getspnam="none required" else @@ -2382,7 +2383,7 @@ test "$ac_cv_search_getspnam" = "no" && for i in sec gen; do LIBS="-l$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_getspnam="-l$i" break @@ -2417,8 +2418,14 @@ fi +echo "checking for PAM password authentication support" 1>&6 +echo "configure:2423: checking for PAM password authentication support" >&5 +if test "$ac_cv_header_security_pam_appl_h" = "yes"; then + LIBS="$LIBS -lpam -lpam_misc -ldl" +fi + echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6 -echo "configure:2422: checking whether utime accepts a null argument" >&5 +echo "configure:2429: checking whether utime accepts a null argument" >&5 if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2428,7 +2435,7 @@ ac_cv_func_utime_null=no else cat > conftest.$ac_ext < #include @@ -2439,7 +2446,7 @@ && t.st_mtime - s.st_mtime < 120)); } EOF -if { (eval echo configure:2443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_utime_null=yes else @@ -2463,7 +2470,7 @@ fi echo $ac_n "checking for long file names""... $ac_c" 1>&6 -echo "configure:2467: checking for long file names" >&5 +echo "configure:2474: checking for long file names" >&5 if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2508,7 +2515,7 @@ echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6 -echo "configure:2512: checking for working fnmatch" >&5 +echo "configure:2519: checking for working fnmatch" >&5 if eval "test \"`echo '$''{'ac_cv_func_fnmatch_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2519,11 +2526,11 @@ ac_cv_func_fnmatch_works=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_fnmatch_works=yes else @@ -2552,14 +2559,14 @@ # Try to find connect and gethostbyname. echo $ac_n "checking for library containing connect""... $ac_c" 1>&6 -echo "configure:2556: checking for library containing connect" >&5 +echo "configure:2563: checking for library containing connect" >&5 if eval "test \"`echo '$''{'ac_cv_search_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_connect="no" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_connect="none required" else @@ -2581,7 +2588,7 @@ test "$ac_cv_search_connect" = "no" && for i in xnet socket inet; do LIBS="-l$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_connect="-l$i" break @@ -2617,14 +2624,14 @@ fi echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6 -echo "configure:2621: checking for library containing gethostbyname" >&5 +echo "configure:2628: checking for library containing gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_gethostbyname="no" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_gethostbyname="none required" else @@ -2646,7 +2653,7 @@ test "$ac_cv_search_gethostbyname" = "no" && for i in netinet nsl; do LIBS="-l$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_gethostbyname="-l$i" break @@ -2690,19 +2697,19 @@ krb_h= echo $ac_n "checking for krb.h""... $ac_c" 1>&6 -echo "configure:2694: checking for krb.h" >&5 +echo "configure:2701: checking for krb.h" >&5 if test "$cross_compiling" != yes && test -r $KRB4/include/krb.h; then hold_cflags=$CFLAGS CFLAGS="$CFLAGS -I$KRB4/include" cat > conftest.$ac_ext < int main() { int i; ; return 0; } EOF -if { (eval echo configure:2706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* krb_h=yes krb_incdir=$KRB4/include else @@ -2711,14 +2718,14 @@ rm -rf conftest* CFLAGS=$hold_cflags cat > conftest.$ac_ext < int main() { int i; ; return 0; } EOF -if { (eval echo configure:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* krb_h=yes krb_incdir= else @@ -2731,14 +2738,14 @@ CFLAGS=$hold_cflags else cat > conftest.$ac_ext < int main() { int i; ; return 0; } EOF -if { (eval echo configure:2742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* krb_h=yes krb_incdir= else @@ -2749,14 +2756,14 @@ fi if test -z "$krb_h"; then cat > conftest.$ac_ext < int main() { int i; ; return 0; } EOF -if { (eval echo configure:2760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* krb_h=yes krb_incdir= else @@ -2767,14 +2774,14 @@ hold_cflags=$CFLAGS CFLAGS="$CFLAGS -I$KRB4/include/kerberosIV" cat > conftest.$ac_ext < int main() { int i; ; return 0; } EOF -if { (eval echo configure:2778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* krb_h=yes krb_incdir=$KRB4/include/kerberosIV else @@ -2797,7 +2804,7 @@ hold_ldflags=$LDFLAGS LDFLAGS="-L${KRB4}/lib $LDFLAGS" echo $ac_n "checking for printf in -lkrb""... $ac_c" 1>&6 -echo "configure:2801: checking for printf in -lkrb" >&5 +echo "configure:2808: checking for printf in -lkrb" >&5 ac_lib_var=`echo krb'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2805,7 +2812,7 @@ ac_save_LIBS="$LIBS" LIBS="-lkrb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2838,7 +2845,7 @@ # Using open here instead of printf so we don't # get confused by the cached value for printf from above. echo $ac_n "checking for open in -lkrb""... $ac_c" 1>&6 -echo "configure:2842: checking for open in -lkrb" >&5 +echo "configure:2849: checking for open in -lkrb" >&5 ac_lib_var=`echo krb'_'open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2846,7 +2853,7 @@ ac_save_LIBS="$LIBS" LIBS="-lkrb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2882,7 +2889,7 @@ LDFLAGS=$hold_ldflags else echo $ac_n "checking for printf in -lkrb""... $ac_c" 1>&6 -echo "configure:2886: checking for printf in -lkrb" >&5 +echo "configure:2893: checking for printf in -lkrb" >&5 ac_lib_var=`echo krb'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2890,7 +2897,7 @@ ac_save_LIBS="$LIBS" LIBS="-lkrb $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2935,7 +2942,7 @@ hold_ldflags=$LDFLAGS test -n "${krb_libdir}" && LDFLAGS="$LDFLAGS -L${krb_libdir}" echo $ac_n "checking for printf in -ldes""... $ac_c" 1>&6 -echo "configure:2939: checking for printf in -ldes" >&5 +echo "configure:2946: checking for printf in -ldes" >&5 ac_lib_var=`echo des'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2943,7 +2950,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldes $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2983,12 +2990,12 @@ for ac_func in krb_get_err_text do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2987: checking for $ac_func" >&5 +echo "configure:2994: 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${ac_exeext}; then +if { (eval echo configure:3022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3052,17 +3059,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3056: checking for $ac_hdr" >&5 +echo "configure:3063: 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:3066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3108,7 +3115,7 @@ CPPFLAGS="-I$GSSAPI/include $CPPFLAGS" if test "$ac_cv_header_gssapi_h" = "yes"; then cat > conftest.$ac_ext < EOF @@ -3124,7 +3131,7 @@ else cat > conftest.$ac_ext < EOF @@ -3143,7 +3150,7 @@ # This is necessary on Irix 5.3, in order to link against libkrb5 -- # there, an_to_ln.o refers to things defined only in -lgen. echo $ac_n "checking for compile in -lgen""... $ac_c" 1>&6 -echo "configure:3147: checking for compile in -lgen" >&5 +echo "configure:3154: checking for compile in -lgen" >&5 ac_lib_var=`echo gen'_'compile | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3151,7 +3158,7 @@ ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3211,12 +3218,12 @@ fi echo $ac_n "checking for gethostname""... $ac_c" 1>&6 -echo "configure:3215: checking for gethostname" >&5 +echo "configure:3222: checking for gethostname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostname'+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${ac_exeext}; then +if { (eval echo configure:3250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostname=yes" else @@ -3304,14 +3311,14 @@ if test "$enable_server" = yes; then echo $ac_n "checking for library containing crypt""... $ac_c" 1>&6 -echo "configure:3308: checking for library containing crypt" >&5 +echo "configure:3315: checking for library containing crypt" >&5 if eval "test \"`echo '$''{'ac_cv_search_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_crypt="no" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_crypt="none required" else @@ -3333,7 +3340,7 @@ test "$ac_cv_search_crypt" = "no" && for i in crypt; do LIBS="-l$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_crypt="-l$i" break @@ -3378,19 +3385,19 @@ echo $ac_n "checking for cygwin32""... $ac_c" 1>&6 -echo "configure:3382: checking for cygwin32" >&5 +echo "configure:3389: checking for cygwin32" >&5 if eval "test \"`echo '$''{'ccvs_cv_sys_cygwin32'+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:3401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ccvs_cv_sys_cygwin32=yes else Index: ccvs/configure.in diff -u ccvs/configure.in:1.1.1.1 ccvs/configure.in:1.2 --- ccvs/configure.in:1.1.1.1 Mon Apr 24 08:32:03 2000 +++ ccvs/configure.in Mon Apr 24 10:40:53 2000 @@ -35,7 +35,8 @@ AC_CHECK_HEADERS(errno.h unistd.h string.h memory.h utime.h fcntl.h ndbm.h \ limits.h sys/file.h \ sys/param.h sys/select.h sys/time.h sys/timeb.h \ - io.h direct.h sys/bsdtypes.h sys/resource.h) + io.h direct.h sys/bsdtypes.h sys/resource.h \ + security/pam_appl.h) AC_HEADER_STAT AC_HEADER_TIME @@ -81,6 +82,15 @@ dnl use or not, but the code has been changed to work right reguardless, dnl so we can go back to a simple check. AC_SEARCH_LIBS(getspnam, sec gen, AC_DEFINE(HAVE_GETSPNAM)) + +dnl +dnl Check for PAM password support. +dnl +dnl +AC_CHECKING(for PAM password authentication support) +if test "$ac_cv_header_security_pam_appl_h" = "yes"; then + LIBS="$LIBS -lpam -lpam_misc -ldl" +fi AC_FUNC_UTIME_NULL AC_SYS_LONG_FILE_NAMES Index: ccvs/src/server.c diff -u ccvs/src/server.c:1.1.1.1 ccvs/src/server.c:1.3 --- ccvs/src/server.c:1.1.1.1 Mon Apr 24 08:32:06 2000 +++ ccvs/src/server.c Mon Apr 24 18:21:12 2000 @@ -113,6 +113,68 @@ #endif #ifdef AUTH_SERVER_SUPPORT + +#ifdef HAVE_SECURITY_PAM_APPL_H + +#include +#include + +static char *PAM_username; /*Internal variables used by Conv*/ +static char *PAM_password; + + +static int +PAM_conv (num_msg, msg, resp, appdata_ptr) + int num_msg; + const struct pam_message **msg; + struct pam_response **resp; + void *appdata_ptr; +{ + int replies = 0; + struct pam_response *reply = NULL; + +#define COPY_STRING(s) (s) ? strdup(s) : NULL + + reply = malloc(sizeof(struct pam_response) * num_msg); + if (!reply) return PAM_CONV_ERR; + + for (replies = 0; replies < num_msg; replies++) { + switch (msg[replies]->msg_style) { + case PAM_PROMPT_ECHO_ON: + reply[replies].resp_retcode = PAM_SUCCESS; + reply[replies].resp = COPY_STRING(PAM_username); + /* PAM frees resp */ + break; + case PAM_PROMPT_ECHO_OFF: + reply[replies].resp_retcode = PAM_SUCCESS; + reply[replies].resp = COPY_STRING(PAM_password); + /* PAM frees resp */ + break; + case PAM_TEXT_INFO: + /* fall through */ + case PAM_ERROR_MSG: + /* ignore it... */ + reply[replies].resp_retcode = PAM_SUCCESS; + reply[replies].resp = NULL; + break; + default: + /* Must be an error of some sort... */ + free (reply); + return PAM_CONV_ERR; + } + } + if (reply) *resp = reply; + return PAM_SUCCESS; +} + + +static struct pam_conv PAM_conversation = { + &PAM_conv, + NULL +}; + +#endif HAVE_SECURITY_PAM_APPL_H + #ifdef HAVE_GETSPNAM #include #endif @@ -5349,6 +5411,39 @@ else if (rc == 0 && system_auth) { /* No cvs password found, so try /etc/passwd. */ +#ifdef HAVE_SECURITY_PAM_APPL_H + + pam_handle_t *pamh; + int pam_error; + + PAM_password = password; + PAM_username = username; + + pam_error = pam_start("cvspserver", username, &PAM_conversation, &pamh); + + if (pam_error == PAM_SUCCESS) + { + pam_error = pam_authenticate(pamh, PAM_SILENT); + } + + if (pam_error == PAM_SUCCESS) + { + host_user=username; + } + else + { + host_user=NULL; + } + + if(pam_end(pamh,pam_error) != PAM_SUCCESS) + { + pamh=NULL; + printf("%s\n",pam_strerror(pamh,pam_error)); + } + + /*Return 0 or string in host_user and copy CVS_Username to username */ + goto handle_return; +#else /*HAVE_SECURITY_PAM_APPL_H*/ const char *found_passwd = NULL; struct passwd *pw; @@ -5426,6 +5521,8 @@ NT and OS2 or dealing with windows and arguments on Mac. */ SYSTEM_CLEANUP (); #endif +#endif /* HAVE_SECURITY_PAM_APPL_H */ + exit (EXIT_FAILURE); } else