diff -u -r --new-file ypserv-1.3.7/BUGS ypserv-1.3.8/BUGS --- ypserv-1.3.7/BUGS Thu Jul 29 14:55:00 1999 +++ ypserv-1.3.8/BUGS Tue Oct 12 11:25:56 1999 @@ -4,5 +4,4 @@ ypserv doesn't work with gdbm or db1/db2 in ndbm compat mode. Only real Solaris ndbm is supported !! -db1 and db2 support isn't finished and doesn´t work. - +yphelper doesn't compile on Slackware 4.0. diff -u -r --new-file ypserv-1.3.7/ChangeLog ypserv-1.3.8/ChangeLog --- ypserv-1.3.7/ChangeLog Thu Jul 29 18:47:09 1999 +++ ypserv-1.3.8/ChangeLog Wed Oct 13 14:00:44 1999 @@ -1,3 +1,40 @@ +1999-10-13 Thorsten Kukuk + + * release version 1.3.8 + +1999-10-13 Andreas Jaeger + + * create_printcap.in: Fix sed rules. + +1999-10-10 Thorsten Kukuk + + * update.c (yppasswdproc_pwupdate_1): Save and restore correct + uid/gid/mode of passwd and shadow file. + + * configure.in: Remove support for libdb and ndbm compat mode. + + * makedbm.c: Print error if neither gdbm nor ndbm was found. + * yp_db.h: Likewise. + * yp_db.c: Likewise. + +1999-10-09 Thorsten Kukuk + + * Makefile.in: Add create_printcap and match_printcap. + + * ypMakefile.in (printcap): New rule for NIS printcap maps. + + * create_printcap.in: New, convert /etc/printcap into a NIS map. + + * match_printcap.in: New. Needed by LPRng. + + * update.c: Fix shadow expire bugs, better error handling. + + * configure.in: Remove check for libdb1/libdb2. + + * yppush.c (yppush_foreach): Use udp, not tcp. + (get_dbm_entry): Save return value before we close the database. + Patch from H.J. Lu + 1999-07-29 Thorsten Kukuk * release version 1.3.7 diff -u -r --new-file ypserv-1.3.7/INSTALL ypserv-1.3.8/INSTALL --- ypserv-1.3.7/INSTALL Tue May 18 22:07:10 1999 +++ ypserv-1.3.8/INSTALL Tue Oct 12 11:27:10 1999 @@ -16,9 +16,8 @@ --with-gdbm-dir=/usr/local/gnu/gdbm --with-ndbm=[yes|no] : - If you doesn't have the GDBM library installed, or wishes to - use libdb in ndbm compat mode, use this option. It was primarly - for Solaris, which has ndbm support. + If you doesn't have the GDBM library installed, but has Solaris + with ndbm support, use this option. PLEASE read the README file for more information and problems with this !! diff -u -r --new-file ypserv-1.3.7/Makefile.in ypserv-1.3.8/Makefile.in --- ypserv-1.3.7/Makefile.in Thu Jul 29 17:03:11 1999 +++ ypserv-1.3.8/Makefile.in Sun Oct 10 12:31:31 1999 @@ -121,7 +121,8 @@ PGMS= ypserv yppush makedbm ypxfr revnetgroup ypinit mknetid\ ypMakefile ypxfr_1perhour ypxfr_2perday ypxfr_1perday\ - rpc.ypxfrd pwupdate rpc.yppasswdd yphelper + rpc.ypxfrd pwupdate rpc.yppasswdd yphelper create_printcap\ + match_printcap SRCS= server.c ypserv.c ypserv_xdr.c yppush.c yppush_xdr.c\ ypxfr.c ypxfr_xdr.c ypxfr_clnt.c makedbm.c hash.c\ dns_hosts.c access.c yp_msg.c revnetgroup.c getnetgrent.c\ @@ -210,6 +211,16 @@ rm -f ypMakefile ./sedscript < $(srcdir)/ypMakefile.in > ypMakefile +create_printcap: $(srcdir)/create_printcap.in sedscript + rm -f create_printcap + ./sedscript < $(srcdir)/create_printcap.in > create_printcap + chmod 755 create_printcap + +match_printcap: $(srcdir)/match_printcap.in sedscript + rm -f match_printcap + ./sedscript < $(srcdir)/match_printcap.in > match_printcap + chmod 755 match_printcap + ypserv.8: $(srcdir)/ypserv.8.in sedscript rm -f ypserv.8 ./sedscript < $(srcdir)/ypserv.8.in > ypserv.8 @@ -319,6 +330,8 @@ $(INSTALL_PROGRAM) -s yphelper $(ROOT)$(YPBINDIR) $(INSTALL_PROGRAM) pwupdate $(ROOT)$(YPBINDIR) $(INSTALL_DATA) pwupdate.8 $(ROOT)$(MAN8DIR) + $(INSTALL_PROGRAM) create_printcap $(ROOT)$(YPBINDIR) + $(INSTALL_PROGRAM) match_printcap $(ROOT)$(YPBINDIR) $(INSTALL_DATA) mknetid.8 $(ROOT)$(MAN8DIR) $(INSTALL_DATA) $(srcdir)/netgroup.5 $(ROOT)$(MAN5DIR) if [ -f $(ROOT)$(YPMAPDIR)/Makefile ]; then \ diff -u -r --new-file ypserv-1.3.7/NEWS ypserv-1.3.8/NEWS --- ypserv-1.3.7/NEWS Thu Jul 29 14:58:03 1999 +++ ypserv-1.3.8/NEWS Sun Oct 10 22:17:36 1999 @@ -5,6 +5,12 @@ Please send bug reports, questions and suggestions to . +Version 1.3.8 +* yppush fix for ndbm support +* yppush fix for Irix 6.5.x NIS slave servers +* rpc.yppasswdd shadow rule fixes +* rpc.yppasswdd fixes for saving/restoring old file modes + Version 1.3.7 * All daemons give away controlling tty. * Fix possible buffer overflow in rpc.yppasswdd. diff -u -r --new-file ypserv-1.3.7/README ypserv-1.3.8/README --- ypserv-1.3.7/README Thu Jul 29 15:01:42 1999 +++ ypserv-1.3.8/README Wed Oct 13 14:01:41 1999 @@ -1,5 +1,5 @@ -This is version 1.3.7 of an YP (NIS version 2) Server for Linux, but it +This is version 1.3.8 of an YP (NIS version 2) Server for Linux, but it also runs under other OS like SunOS 4.1.x, Solaris 2.x, AIX, HP-UX, IRIS, Ultrix and OSF1 (alpha). @@ -18,14 +18,15 @@ ftp://ftp.kernel.org/pub/linux/utils/net/NIS The old site's will not be updated any longer from me. -This version has support for the ndbm database from Sun and the -db ndbm emulation. gdbm is about 3 times faster for most YP -functions, except yp_first/yp_next. gdbm has a runtime from O(n) -for viewing all entries with this, ndbm/db has a runtime from O(n*n) ! -Very bad for big maps and initgroups, initgroups will need about 22 -minutes for a group file with 10.000 entries and ndbm/db, with gdbm, -only 20 seconds. The load of the server is the same, but gdbm -needs much more memory for caching. +This version has support for the ndbm database from Sun. gdbm is +about 3 times faster for most YP functions, except yp_first/yp_next. +gdbm has a runtime from O(n) for viewing all entries with this, ndbm +has a runtime from O(n*n) ! Very bad for big maps and initgroups, +initgroups will need about 22 minutes for a group file with 10.000 +entries and ndbm, with gdbm, only 20 seconds. The load of the server +is the same, but gdbm needs much more memory for caching. + +WARNING: NEVER use libdb1/libdb2 in ndbm compat mode, this does NOT work! I have a rpc.yppasswdd daemon included, which based on the yppasswd 0.9 from Olaf Kirch. I have rewritten the update routine for @@ -60,14 +61,14 @@ 1024 Byte limit in NIS protocoll: --------------------------------- The NIS protocoll has one important limit: keys and data are limited to 1024 -bytes. ypserv 1.3.7 and glibc 2.1 could handle keys and data, which is bigger +bytes. ypserv 1.3.8 and glibc 2.1 could handle keys and data, which is bigger 1024 bytes. This will not work with older ypserv or Linux libc versions like libc5 or glibc 2.0! If you use it with such systems, it will break NIS support! I don't know, if commercial Unix versions support it. For more NIS or NIS+ related stuff, look at -http://www.suse.de/~kukuk/linux/ +http://www.suse.de/~kukuk/nis/ or http://www.suse.de/~kukuk/nisplus/ Thanks to Terje Malmedal , who had send patches for AIX, HP-UX, IRIX, Ultrix and OSF1(alpha). diff -u -r --new-file ypserv-1.3.7/TODO ypserv-1.3.8/TODO --- ypserv-1.3.7/TODO Thu Jul 29 14:55:12 1999 +++ ypserv-1.3.8/TODO Tue Oct 12 11:27:25 1999 @@ -8,5 +8,6 @@ o IP numbers in ypserver file doesn't work - o Finish support for db1/db2 + o Use automake + o Remove ypmake diff -u -r --new-file ypserv-1.3.7/acconfig.h ypserv-1.3.8/acconfig.h --- ypserv-1.3.7/acconfig.h Wed Feb 17 22:24:04 1999 +++ ypserv-1.3.8/acconfig.h Sun Oct 10 12:58:05 1999 @@ -18,7 +18,3 @@ /* Define if you have ndbm support. */ #undef HAVE_NDBM - -/* Define if you have the db2 library (-ldb). */ -#undef HAVE_DB2 - diff -u -r --new-file ypserv-1.3.7/config.h.in ypserv-1.3.8/config.h.in --- ypserv-1.3.7/config.h.in Fri May 14 21:10:14 1999 +++ ypserv-1.3.8/config.h.in Sat Oct 9 14:22:47 1999 @@ -58,9 +58,6 @@ /* Define if you have ndbm support. */ #undef HAVE_NDBM -/* Define if you have the db2 library (-ldb). */ -#undef HAVE_DB2 - /* The number of bytes in a long. */ #undef SIZEOF_LONG @@ -112,6 +109,9 @@ /* Define if you have the socket function. */ #undef HAVE_SOCKET +/* Define if you have the stpcpy function. */ +#undef HAVE_STPCPY + /* Define if you have the strdup function. */ #undef HAVE_STRDUP @@ -126,9 +126,6 @@ /* Define if you have the strstr function. */ #undef HAVE_STRSTR - -/* Define if you have the stpcpy function. */ -#undef HAVE_STPCPY /* Define if you have the uname function. */ #undef HAVE_UNAME diff -u -r --new-file ypserv-1.3.7/configure ypserv-1.3.8/configure --- ypserv-1.3.7/configure Thu Jul 29 17:02:37 1999 +++ ypserv-1.3.8/configure Sun Oct 10 12:55:33 1999 @@ -26,8 +26,6 @@ --with-gdbm-dir=BASE-DIR Specifies the base gdbm directory" ac_help="$ac_help --with-ndbm=[yes|no] Use ndbm instead of gdbm" -ac_help="$ac_help - --with-db2=[yes|no] Use db2 instead of gdbm" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -554,9 +552,10 @@ libexecdir='${exec_prefix}/lib/yp' fi test "$CFLAGS" = "" && CFLAGS="-O3 -Wall" +test "$CFLAGS" = "" && CFLAGS="-W -Wall -Wbad-function-cast -Wcast-align -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef" echo $ac_n "checking for ULTRIX""... $ac_c" 1>&6 -echo "configure:560: checking for ULTRIX" >&5 +echo "configure:559: checking for ULTRIX" >&5 if test `uname` = ULTRIX then echo "$ac_t""yes" 1>&6 @@ -568,7 +567,7 @@ echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for OSF1""... $ac_c" 1>&6 -echo "configure:572: checking for OSF1" >&5 +echo "configure:571: checking for OSF1" >&5 if test `uname` = OSF1 then echo "$ac_t""yes" 1>&6 @@ -583,7 +582,7 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:587: checking for $ac_word" >&5 +echo "configure:586: 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 @@ -613,7 +612,7 @@ # 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:617: checking for $ac_word" >&5 +echo "configure:616: 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 @@ -664,7 +663,7 @@ # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:668: 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 @@ -696,7 +695,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:700: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:699: 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. @@ -707,12 +706,12 @@ cat > conftest.$ac_ext << EOF -#line 711 "configure" +#line 710 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 @@ -738,12 +737,12 @@ { 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:742: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:741: 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:747: checking whether we are using GNU C" >&5 +echo "configure:746: 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 @@ -752,7 +751,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:756: \"$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:755: \"$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 @@ -771,7 +770,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:775: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:774: 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 @@ -807,7 +806,7 @@ WARNFLAGS="-Wall" echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:811: checking for POSIXized ISC" >&5 +echo "configure:810: 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 @@ -828,7 +827,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:832: checking how to run the C preprocessor" >&5 +echo "configure:831: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -843,13 +842,13 @@ # 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:853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:852: \"$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 : @@ -860,13 +859,13 @@ 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:870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:869: \"$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 : @@ -877,13 +876,13 @@ rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:886: \"$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 : @@ -938,7 +937,7 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:942: checking for a BSD compatible install" >&5 +echo "configure:941: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -993,14 +992,14 @@ #AC_PROG_MAKE_SET echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:997: checking whether byte ordering is bigendian" >&5 +echo "configure:996: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -1011,11 +1010,11 @@ #endif ; return 0; } EOF -if { (eval echo configure:1015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -1026,7 +1025,7 @@ #endif ; return 0; } EOF -if { (eval echo configure:1030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -1046,7 +1045,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } 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:1062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -1083,7 +1082,7 @@ fi echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:1087: checking size of long" >&5 +echo "configure:1086: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1091,7 +1090,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1102,7 +1101,7 @@ exit(0); } EOF -if { (eval echo configure:1106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -1127,7 +1126,7 @@ # 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:1131: checking for $ac_word" >&5 +echo "configure:1130: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1177,7 +1176,7 @@ # 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:1181: checking for $ac_word" >&5 +echo "configure:1180: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1219,7 +1218,7 @@ # 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:1223: checking for $ac_word" >&5 +echo "configure:1222: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MAKE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1269,7 +1268,7 @@ # 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:1273: checking for $ac_word" >&5 +echo "configure:1272: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MAKEDBM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1310,7 +1309,7 @@ # Extract the first word of "aliases", so it can be a program name with args. set dummy aliases; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1314: checking for $ac_word" >&5 +echo "configure:1313: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MAIL_ALIASES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1392,7 +1391,7 @@ if test x$enableval = xyes then echo $ac_n "checking for main in -lwrap""... $ac_c" 1>&6 -echo "configure:1396: checking for main in -lwrap" >&5 +echo "configure:1395: checking for main in -lwrap" >&5 ac_lib_var=`echo wrap'_'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 @@ -1400,14 +1399,14 @@ ac_save_LIBS="$LIBS" LIBS="-lwrap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1410: \"$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 @@ -1474,128 +1473,84 @@ # Check whether --with-ndbm or --without-ndbm was given. if test "${with_ndbm+set}" = set; then withval="$with_ndbm" - if test x$libdb_parameter != xno + LIBDBM="" + if test x$libdb_parameter != xno then echo "configure: warning: You could specify only one database!" 1>&2 fi if test x$withval = xyes then - echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:1485: checking for dbm_open in -lndbm" >&5 -ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + for ac_func in dbm_open +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:1487: 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 - ac_save_LIBS="$LIBS" -LIBS="-lndbm $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char dbm_open(); +char $ac_func(); int main() { -dbm_open() -; return 0; } -EOF -if { (eval echo configure:1504: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBDBM="-lndbm" -else - echo "$ac_t""no" 1>&6 -LIBDBM="" -fi - cat >> confdefs.h <<\EOF -#define HAVE_NDBM 1 -EOF - - libdb_parameter=yes - fi - -fi - - -# Check whether --with-db2 or --without-db2 was given. -if test "${with_db2+set}" = set; then - withval="$with_db2" - if test x$libdb_parameter != xno - then - echo "configure: warning: You could specify only one database!" 1>&2 - fi - if test x$withval = xyes - then - echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6 -echo "configure:1545: checking for db_open in -ldb" >&5 -ac_lib_var=`echo db'_'db_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 -else - ac_save_LIBS="$LIBS" -LIBS="-ldb $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1515: \"$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" + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 - LIBDBM="-ldb" + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 -LIBDBM="" fi +done - cat >> confdefs.h <<\EOF -#define HAVE_DB2 1 + if eval "test \"`echo '$ac_cv_func_dbm_open'`\" = yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_NDBM 1 EOF + fi libdb_parameter=yes fi fi - if test x$libdb_parameter != xyes then echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:1599: checking for gdbm_open in -lgdbm" >&5 +echo "configure:1554: checking for gdbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'gdbm_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 @@ -1603,7 +1558,7 @@ ac_save_LIBS="$LIBS" LIBS="-lgdbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1573: \"$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 @@ -1643,64 +1598,15 @@ libdb_parameter=yes else - echo $ac_n "checking for db_open in -ldb""... $ac_c" 1>&6 -echo "configure:1648: checking for db_open in -ldb" >&5 -ac_lib_var=`echo db'_'db_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 -else - ac_save_LIBS="$LIBS" -LIBS="-ldb $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBDBM="-ldb" -else - echo "$ac_t""no" 1>&6 -LIBDBM="" -fi - - if test x"" != x"${LIBDBM}" - then - cat >> confdefs.h <<\EOF -#define HAVE_DB2 1 -EOF - - libdb_parameter=yes - else - for ac_func in dbm_open + for ac_func in dbm_open do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1699: checking for $ac_func" >&5 +echo "configure:1605: 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:1633: \"$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 @@ -1747,29 +1653,30 @@ fi done - if eval "test \"`echo '$ac_cv_func_dbm_open'`\" = yes"; then - cat >> confdefs.h <<\EOF + if eval "test \"`echo '$ac_cv_func_dbm_open'`\" = yes"; then + cat >> confdefs.h <<\EOF #define HAVE_NDBM 1 EOF - libdb_parameter=yes - fi + libdb_parameter=yes fi fi fi + + if test x$libdb_parameter != xyes then echo " - You need the GNU GDBM, Berkeley DB2 or NDBM library for this package !" + You need the GNU GDBM or the Solaris NDBM functions for this package !" echo "" echo "" exit fi echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:1773: checking for crypt in -lcrypt" >&5 +echo "configure:1680: 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 @@ -1777,7 +1684,7 @@ ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1699: \"$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 @@ -1811,7 +1718,7 @@ echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:1815: checking for gethostbyname in -lnsl" >&5 +echo "configure:1722: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1819,7 +1726,7 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1741: \"$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 @@ -1860,12 +1767,12 @@ for ac_func in getrpcport do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1864: checking for $ac_func" >&5 +echo "configure:1771: 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:1799: \"$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 @@ -1916,7 +1823,7 @@ LIBRPC="" else echo $ac_n "checking for getrpcport in -lrpcsvc""... $ac_c" 1>&6 -echo "configure:1920: checking for getrpcport in -lrpcsvc" >&5 +echo "configure:1827: checking for getrpcport in -lrpcsvc" >&5 ac_lib_var=`echo rpcsvc'_'getrpcport | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1924,7 +1831,7 @@ ac_save_LIBS="$LIBS" LIBS="-lrpcsvc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1846: \"$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 @@ -1961,7 +1868,7 @@ echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:1965: checking for socket in -lsocket" >&5 +echo "configure:1872: 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 @@ -1969,7 +1876,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1891: \"$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 @@ -2008,7 +1915,7 @@ fi echo $ac_n "checking for res_gethostbyname in -lresolv""... $ac_c" 1>&6 -echo "configure:2012: checking for res_gethostbyname in -lresolv" >&5 +echo "configure:1919: checking for res_gethostbyname in -lresolv" >&5 ac_lib_var=`echo resolv'_'res_gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2016,7 +1923,7 @@ ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1938: \"$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 @@ -2056,7 +1963,7 @@ else echo $ac_n "checking for gethostbyname in -lresolv+""... $ac_c" 1>&6 -echo "configure:2060: checking for gethostbyname in -lresolv+" >&5 +echo "configure:1967: checking for gethostbyname in -lresolv+" >&5 ac_lib_var=`echo resolv+'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2064,7 +1971,7 @@ ac_save_LIBS="$LIBS" LIBS="-lresolv+ $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1986: \"$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 @@ -2104,12 +2011,12 @@ 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:2108: checking for $ac_hdr that defines DIR" >&5 +echo "configure:2015: 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> @@ -2117,7 +2024,7 @@ DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:2121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2142,7 +2049,7 @@ # 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:2146: checking for opendir in -ldir" >&5 +echo "configure:2053: 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 @@ -2150,7 +2057,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2072: \"$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 @@ -2183,7 +2090,7 @@ else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2187: checking for opendir in -lx" >&5 +echo "configure:2094: 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 @@ -2191,7 +2098,7 @@ ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2113: \"$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 @@ -2225,12 +2132,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2229: checking for ANSI C header files" >&5 +echo "configure:2136: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2238,7 +2145,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2149: \"$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* @@ -2255,7 +2162,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2273,7 +2180,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2294,7 +2201,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2305,7 +2212,7 @@ exit (0); } EOF -if { (eval echo configure:2309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2329,12 +2236,12 @@ fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2333: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2240: 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 @@ -2350,7 +2257,7 @@ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2374,17 +2281,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2378: checking for $ac_hdr" >&5 +echo "configure:2285: 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:2388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2295: \"$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* @@ -2414,17 +2321,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2418: checking for $ac_hdr" >&5 +echo "configure:2325: 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:2428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2335: \"$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* @@ -2452,12 +2359,12 @@ echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2456: checking for working const" >&5 +echo "configure:2363: 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:2417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2527,21 +2434,21 @@ fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2531: checking for inline" >&5 +echo "configure:2438: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2567,12 +2474,12 @@ esac echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2571: checking for pid_t" >&5 +echo "configure:2478: 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 @@ -2600,12 +2507,12 @@ fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2604: checking for size_t" >&5 +echo "configure:2511: 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 @@ -2633,12 +2540,12 @@ fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:2637: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:2544: 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 @@ -2647,7 +2554,7 @@ struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2669,9 +2576,9 @@ echo $ac_n "checking for resultproc_t in rpc/clnt.h""... $ac_c" 1>&6 -echo "configure:2673: checking for resultproc_t in rpc/clnt.h" >&5 +echo "configure:2580: checking for resultproc_t in rpc/clnt.h" >&5 cat > conftest.$ac_ext < EOF @@ -2691,9 +2598,9 @@ rm -f conftest* echo $ac_n "checking for resultproc_t in rpc/pmap_clnt.h""... $ac_c" 1>&6 -echo "configure:2695: checking for resultproc_t in rpc/pmap_clnt.h" >&5 +echo "configure:2602: checking for resultproc_t in rpc/pmap_clnt.h" >&5 cat > conftest.$ac_ext < EOF @@ -2714,7 +2621,7 @@ echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:2718: checking for 8-bit clean memcmp" >&5 +echo "configure:2625: 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 @@ -2722,7 +2629,7 @@ ac_cv_func_memcmp_clean=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:2643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -2750,12 +2657,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:2754: checking for vprintf" >&5 +echo "configure:2661: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+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:2689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -2802,12 +2709,12 @@ if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:2806: checking for _doprnt" >&5 +echo "configure:2713: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+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:2741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -2855,7 +2762,7 @@ fi echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6 -echo "configure:2859: checking for wait3 that fills in rusage" >&5 +echo "configure:2766: checking for wait3 that fills in rusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2863,7 +2770,7 @@ ac_cv_func_wait3_rusage=no else cat > conftest.$ac_ext < #include @@ -2894,7 +2801,7 @@ } } EOF -if { (eval echo configure:2898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_wait3_rusage=yes else @@ -2919,12 +2826,12 @@ for ac_func in wait4 inet_aton vsyslog lckpwdf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2923: checking for $ac_func" >&5 +echo "configure:2830: 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:2858: \"$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 @@ -2974,12 +2881,12 @@ for ac_func in strdup strndup strerror strstr strsep stpcpy snprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2978: checking for $ac_func" >&5 +echo "configure:2885: 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:2913: \"$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 @@ -3029,12 +2936,12 @@ for ac_func in _dns_gethostbyname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3033: checking for $ac_func" >&5 +echo "configure:2940: 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:2968: \"$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 @@ -3084,12 +2991,12 @@ for ac_func in gethostname gettimeofday select socket uname getopt_long do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3088: checking for $ac_func" >&5 +echo "configure:2995: 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:3023: \"$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 @@ -3139,12 +3046,12 @@ for ac_func in _rpc_dtablesize getdtablesize getspnam getline getdelim do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3143: checking for $ac_func" >&5 +echo "configure:3050: 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:3078: \"$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 diff -u -r --new-file ypserv-1.3.7/configure.in ypserv-1.3.8/configure.in --- ypserv-1.3.7/configure.in Thu Jul 29 17:02:33 1999 +++ ypserv-1.3.8/configure.in Sun Oct 10 12:56:10 1999 @@ -22,7 +22,7 @@ libexecdir='${exec_prefix}/lib/yp' fi test "$CFLAGS" = "" && CFLAGS="-O3 -Wall" -dnl test "$CFLAGS" = "" && CFLAGS="-W -Wall -Wbad-function-cast -Wcast-align -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith-Wshadow -Wstrict-prototypes -Wundef" +test "$CFLAGS" = "" && CFLAGS="-W -Wall -Wbad-function-cast -Wcast-align -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef" dnl Ultrix is nasty. A number of functions e.g. xdr_yppushresp_xfr dnl clashes with Ultrix libc sometimes. Tried making a testcase, but @@ -152,32 +152,22 @@ AC_ARG_WITH(ndbm, [ --with-ndbm=[yes|no] Use ndbm instead of gdbm], + LIBDBM="" if test x$libdb_parameter != xno then AC_MSG_WARN(You could specify only one database!) fi if test x$withval = xyes then - AC_CHECK_LIB(ndbm, dbm_open, LIBDBM="-lndbm", LIBDBM="") - AC_DEFINE(HAVE_NDBM) - libdb_parameter=yes - fi -) - -AC_ARG_WITH(db2, - [ --with-db2=[yes|no] Use db2 instead of gdbm], - if test x$libdb_parameter != xno - then - AC_MSG_WARN(You could specify only one database!) - fi - if test x$withval = xyes - then - AC_CHECK_LIB(db, db_open, LIBDBM="-ldb", LIBDBM="") - AC_DEFINE(HAVE_DB2) + AC_CHECK_FUNCS(dbm_open) + if eval "test \"`echo '$ac_cv_func_dbm_open'`\" = yes"; then + AC_DEFINE(HAVE_NDBM) + else + AC_MSG_WARN(No Solaris NDBM functions found!) + fi libdb_parameter=yes fi ) -AC_SUBST(LIBDBM) if test x$libdb_parameter != xyes then @@ -187,26 +177,21 @@ AC_DEFINE(HAVE_LIBGDBM) libdb_parameter=yes else - AC_CHECK_LIB(db,db_open,LIBDBM="-ldb",LIBDBM="") - if test x"" != x"${LIBDBM}" - then - AC_DEFINE(HAVE_DB2) + AC_CHECK_FUNCS(dbm_open) + if eval "test \"`echo '$ac_cv_func_dbm_open'`\" = yes"; then + AC_DEFINE(HAVE_NDBM) libdb_parameter=yes - else - AC_CHECK_FUNCS(dbm_open) - if eval "test \"`echo '$ac_cv_func_dbm_open'`\" = yes"; then - AC_DEFINE(HAVE_NDBM) - libdb_parameter=yes - fi fi fi fi +AC_SUBST(LIBDBM) + if test x$libdb_parameter != xyes then echo " - You need the GNU GDBM, Berkeley DB2 or NDBM library for this package !" + You need the GNU GDBM or the Solaris NDBM functions for this package !" echo "" echo "" exit diff -u -r --new-file ypserv-1.3.7/create_printcap.in ypserv-1.3.8/create_printcap.in --- ypserv-1.3.7/create_printcap.in Thu Jan 1 01:00:00 1970 +++ ypserv-1.3.8/create_printcap.in Wed Oct 13 13:59:25 1999 @@ -0,0 +1,43 @@ +#! /usr/bin/perl + $debug = 0; + $line = ""; + $new = ""; + while (<>) { + chomp; + next if ( /^\s*\#.*/ ); + s/^\s*$//; + next if ( $_ eq '' ); + print "new: " . $_ . "\n" if $debug;; + if (/^\s/) { # continuation line + $line = $line.$_; + print "continued: $line\n" if $debug; + next; + } else { + $line =~ s/\s+:/:/g; + $line =~ s/:\s+/:/g; + $line =~ s/:\\:/:/g; + print "line: $line\n" if $debug; + push(@lines, $line) if $line; + $line = $_; + } + } + $line =~ s/\s+:/:/g; + $line =~ s/:\s+/:/g; + $line =~ s/:\\:/:/g; + push(@lines,$line) if $line; + @lines = sort(@lines); + foreach $line (@lines) { + ($printers) = split(/\:/,$line); + @printers = split(/\|/,$printers); + foreach $printer (@printers) { + $num{$printer}++; + push(@allprinters,$printer); + print "allprinters: @allprinters\n" if $debug; + print $printer."_".$num{$printer}."\t$line\n"; + } + } + @pr = keys %num; + print "printers @pr\n" if $debug; + if ($#allprinters >=0) { + print "all_1\tall:all=".join(",",@pr)."\n"; + } diff -u -r --new-file ypserv-1.3.7/makedbm.c ypserv-1.3.8/makedbm.c --- ypserv-1.3.7/makedbm.c Thu Jul 29 17:08:45 1999 +++ ypserv-1.3.8/makedbm.c Sun Oct 10 13:02:09 1999 @@ -68,6 +68,10 @@ #define ypdb_close dbm_close static DBM *dbm; +#else + +#error "No database found or selected!" + #endif static int lower = 0; diff -u -r --new-file ypserv-1.3.7/match_printcap.in ypserv-1.3.8/match_printcap.in --- ypserv-1.3.7/match_printcap.in Thu Jan 1 01:00:00 1970 +++ ypserv-1.3.8/match_printcap.in Sun Oct 10 12:30:11 1999 @@ -0,0 +1,7 @@ +#!/bin/sh +read p +n=1 +while ypmatch "${p}_${n}" printcap 2>/dev/null; do + n=`expr $n + 1` +done + diff -u -r --new-file ypserv-1.3.7/server.c ypserv-1.3.8/server.c --- ypserv-1.3.7/server.c Tue May 18 22:07:10 1999 +++ ypserv-1.3.8/server.c Sun Aug 22 12:46:53 1999 @@ -792,7 +792,7 @@ } /* If we have the map, check, if the master name is the same as in - the ypreq_xfr struct If we doesn't have the map, trust the host */ + the ypreq_xfr struct. If we doesn't have the map, trust the host. */ dbp = ypdb_open(xfr->map_parms.domain, xfr->map_parms.map); if (dbp != NULL) { diff -u -r --new-file ypserv-1.3.7/update.c ypserv-1.3.8/update.c --- ypserv-1.3.7/update.c Thu Jul 29 11:59:43 1999 +++ ypserv-1.3.8/update.c Sun Oct 10 22:16:24 1999 @@ -154,23 +154,25 @@ } #ifdef HAVE_GETSPNAM -static int -isexpired(const struct spwd *sp) +static inline int +is_allowed_to_change (const struct spwd *sp) { - long now = time ((time_t *) 0) / (24L*3600L); - - if (sp->sp_expire > 0 && now >= sp->sp_expire) - return 3; + long now; - if (sp->sp_lstchg > 0 && sp->sp_max >= 0 && sp->sp_inact >= 0 && - now >= sp->sp_lstchg + sp->sp_max + sp->sp_inact) - return 2; - if (sp->sp_lstchg == -1 || - sp->sp_max == -1 || sp->sp_max >= (10000L)) - return 0; - if (now >= sp->sp_lstchg + sp->sp_max) + if (sp->sp_lstchg == 0 || sp->sp_lstchg == -1) return 1; - return 0; + + now = time ((time_t *) 0) / (24L*3600L); + + if (sp->sp_min > sp->sp_max) + return 0; /* Minimum is bigger then maximum */ + if (sp->sp_min > 0 && now <= (sp->sp_lstchg + sp->sp_min)) + return 0; /* It is to early to change password */ + if (sp->sp_inact >= 0 && sp->sp_max >= 0 && + now >= (sp->sp_lstchg + sp->sp_max + sp->sp_inact)) + return 0; /* It is to late to change password */ + + return 1; } #endif @@ -207,7 +209,7 @@ FILE *oldpf, *newpf; static int res; char *logbuf; - + struct stat passwd_stat, shadow_stat; #if CHECKROOT char *rootpass; @@ -310,21 +312,41 @@ goto error2; } + if (fstat (fileno (oldpf), &passwd_stat) < 0) + { + yp_msg ("%s failed", logbuf); + yp_msg ("Can't stat %s: %m", path_passwd); + fclose (oldpf); + oldpf = 0; + goto error2; + } + /* Open a temp passwd file */ if ((newpf = fopen (path_passwd_tmp, "w+")) == NULL) { yp_msg ("%s failed", logbuf); yp_msg ("Can't open %s: %m", path_passwd_tmp); fclose (oldpf); - oldpf=0; + oldpf = 0; goto error2; } - chmod (path_passwd_tmp, S_IRUSR+S_IWUSR+S_IRGRP+S_IROTH); + chmod (path_passwd_tmp, passwd_stat.st_mode); + chown (path_passwd_tmp, passwd_stat.st_uid, passwd_stat.st_gid); #ifdef HAVE_GETSPNAM /* Open the shadow file for reading. */ if ((oldsf = fopen (path_shadow, "r")) != NULL) { + if (fstat (fileno (oldsf), &shadow_stat) < 0) + { + yp_msg ("%s failed", logbuf); + yp_msg ("Can't stat %s: %m", path_shadow); + fclose (oldpf); + fclose (oldsf); + oldpf = oldsf = 0; + goto error2; + } + /* We have a shadow file */ have_shadow = 1; shadow_changed = 0; @@ -339,7 +361,8 @@ oldsf=newpf=oldpf=0; goto error2; } - chmod (path_shadow_tmp, S_IRUSR); + chmod (path_shadow_tmp, shadow_stat.st_mode); + chown (path_shadow_tmp, shadow_stat.st_uid, shadow_stat.st_gid); } else { @@ -385,34 +408,33 @@ goto error; } /* test if password is expired */ - if (spw->sp_pwdp[0] != '!' && ! - isexpired (spw) && - !(spw->sp_max >= 0 && - spw->sp_min > spw->sp_max)) + if (spw->sp_pwdp[0] != '!') { - time_t now, ok; - - time(&now); - /* test if it is allowed to change - the password*/ - ok = (spw->sp_lstchg * (24L*3600L)) + - (spw->sp_min > 0 ? - spw->sp_min * (24L*3600L) : 0); - if (now < ok) - { - yp_msg ("%s rejected", logbuf); - yp_msg ("now < minimum age for `%s'", - spw->sp_namp); - goto error; - } - else + if (is_allowed_to_change (spw)) { + time_t now; + + time(&now); /* set the new passwd */ spw->sp_pwdp = newpw->pw_passwd; spw->sp_lstchg = (long int)now / (24L*3600L); shadow_changed = 1; } + else + { + yp_msg ("%s rejected", logbuf); + yp_msg ("now < minimum age for `%s'", + spw->sp_namp); + goto error; + } + } + else + { + yp_msg ("%s rejected", logbuf); + yp_msg ("password for `%s' is locked", + spw->sp_namp); + goto error; } } if (putspent (spw, newsf) < 0) diff -u -r --new-file ypserv-1.3.7/version.h ypserv-1.3.8/version.h --- ypserv-1.3.7/version.h Thu Jul 29 11:59:25 1999 +++ ypserv-1.3.8/version.h Sat Oct 9 10:39:45 1999 @@ -1,4 +1,4 @@ #ifndef __VERSION_H__ #define __VERSION_H__ -static char version[] = "1.3.7"; +static char version[] = "1.3.8"; #endif diff -u -r --new-file ypserv-1.3.7/ypMakefile.in ypserv-1.3.8/ypMakefile.in --- ypserv-1.3.7/ypMakefile.in Thu Jul 29 16:48:36 1999 +++ ypserv-1.3.8/ypMakefile.in Wed Oct 13 18:47:33 1999 @@ -72,6 +72,7 @@ BOOTPARAMS = $(YPSRCDIR)/bootparams # for booting Sun boxes (bootparamd) HOSTS = $(YPSRCDIR)/hosts NETWORKS = $(YPSRCDIR)/networks +PRINTCAP = $(YPSRCDIR)/printcap PROTOCOLS = $(YPSRCDIR)/protocols PUBLICKEYS = $(YPSRCDIR)/publickey RPC = $(YPSRCDIR)/rpc @@ -94,8 +95,8 @@ # them out from this list. all: passwd group hosts rpc services netid protocols netgrp mail \ - shadow publickey # networks ethers bootparams amd.home \ - auto.master auto.home passwd.adjunct + shadow publickey # networks ethers bootparams printcap \ + # amd.home auto.master auto.home passwd.adjunct ######################################################################## @@ -111,6 +112,7 @@ DOMAIN = `basename \`pwd\`` LOCALDOMAIN = `/bin/domainname` REVNETGROUP = $(YPBINDIR)/revnetgroup +CREATE_PRINTCAP = $(YPBINDIR)/create_printcap ethers: ethers.byname ethers.byaddr hosts: hosts.byname hosts.byaddr @@ -357,6 +359,13 @@ @$(AWK) '{ if($$1 !~ "#" && $$1 != "") { print $$1"\t"$$2 }}' \ $(PUBLICKEYS) | $(DBLOAD) -i $(PUBLICKEYS) \ -o $(YPMAPDIR)/$@ - $@ + @$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@ + + +printcap: $(PRINTCAP) $(YPDIR)/Makefile + @echo "Updating $@..." + @$(CREATE_PRINTCAP) < $(PRINTCAP) | \ + $(DBLOAD) -i $(PRINTCAP) -o $(YPMAPDIR)/$@ - $@ @$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@ diff -u -r --new-file ypserv-1.3.7/yp_db.c ypserv-1.3.8/yp_db.c --- ypserv-1.3.7/yp_db.c Thu Jul 29 17:05:22 1999 +++ ypserv-1.3.8/yp_db.c Sun Oct 10 13:01:06 1999 @@ -91,96 +91,6 @@ return 0; } -#elif defined(HAVE_DB2) - -/***************************************************** - The following stuff is for DB2 suport ! -******************************************************/ - -/* Open a DB2 database */ -static DB_FILE -_db_open (const char *domain, const char *map) -{ - DB_FILE dbp; - char buf[MAXPATHLEN + 2]; - - if (debug_flag) - yp_msg ("\tdb_open(\"%s\", \"%s\")\n", domain, map); - - if (map[0] == '.' || strchr (map, '/')) - { - if (debug_flag) - yp_msg ("\t\t->Returning 0\n"); - return 0; - } - - if (strlen (domain) + strlen (map) < MAXPATHLEN) - { - int err; - - sprintf (buf, "%s/%s", domain, map); - - err = db_open (buf, DB_BTREE, DB_RDONLY, 0, NULL, NULL, &dbp); - - if (debug_flag && dbp == NULL) - yp_msg ("db_open: %s\n", strerror (err)); - else if (debug_flag) - yp_msg ("\t\t->Returning OK!\n"); - } - else - { - dbp = NULL; - yp_msg ("Path to long: %s/%s\n", domain, map); - } - - return dbp; -} - -static inline int -_db_close (DB_FILE file) -{ - file->close (file, 0); - return 0; -} - -int -ypdb_exists (DB_FILE dbp, datum key) -{ - DBT dbtkey, tmp; - int err; - - dbtkey.flags = 0; - tmp.flags = 0; - - dbtkey.data = key.dptr; - dbtkey.size = key.dsize; - - err = dbp->get (dbp, NULL, &dbtkey, &tmp, 0); - - if (err == 0 && tmp.data != NULL) - return 1; - else - return 0; -} - -datum -ypdb_nextkey (DB_FILE file, datum key) -{ - datum tkey; - - tkey = dbm_firstkey (file); - while ((key.dsize != tkey.dsize) || - (strncmp (key.dptr, tkey.dptr, tkey.dsize) != 0)) - { - tkey = dbm_nextkey (file); - if (tkey.dptr == NULL) - return tkey; - } - tkey = dbm_nextkey (file); - - return tkey; -} - #elif defined(HAVE_NDBM) /***************************************************** @@ -262,10 +172,7 @@ #else -void -ypdb_open () -{ -} +#error "No database found or selected!" #endif diff -u -r --new-file ypserv-1.3.7/yp_db.h ypserv-1.3.8/yp_db.h --- ypserv-1.3.7/yp_db.h Thu Jul 29 17:10:43 1999 +++ ypserv-1.3.8/yp_db.h Sun Oct 10 12:59:26 1999 @@ -33,29 +33,9 @@ extern datum ypdb_nextkey (DB_FILE file, datum key); extern datum ypdb_fetch (DB_FILE file, datum key); -#elif defined(HAVE_DB2) - -#include - -#define DB_FILE DB* -/* The data and key structure. */ -typedef struct { - char *dptr; - int dsize; -} datum; - -#define ypdb_free(a) free(a) - -#define ypdb_fetch(a,b) dbm_fetch(a,b) -extern int ypdb_exists (DB_FILE file, datum key); -extern datum ypdb_firstkey (DB_FILE file); -extern datum ypdb_nextkey (DB_FILE file, datum key); -extern datum ypdb_fetch (DB_FILE file, datum key); - - #else -#define DB_FILE int +#error "No database found or selected !" #endif diff -u -r --new-file ypserv-1.3.7/yppush.c ypserv-1.3.8/yppush.c --- ypserv-1.3.7/yppush.c Sat May 29 21:28:47 1999 +++ ypserv-1.3.8/yppush.c Sat Oct 9 10:34:55 1999 @@ -1,25 +1,21 @@ -/* -** Copyright (c) 1996, 1997, 1998, 1999 Thorsten Kukuk -** -** This file is part of the NYS YP Server. -** -** The NYS YP Server is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of the -** License, or (at your option) any later version. -** -** The NYS YP Server is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** You should have received a copy of the GNU General Public -** License along with the NYS YP Server; see the file COPYING. If -** not, write to the Free Software Foundation, Inc., 675 Mass Ave, -** Cambridge, MA 02139, USA. -** -** Author: Thorsten Kukuk -*/ +/* Copyright (c) 1996, 1997, 1998, 1999 Thorsten Kukuk + This file is part of the NYS YP Server. + Author: Thorsten Kukuk + + The NYS YP Server is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The NYS YP Server is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public + License along with the NYS YP Server; see the file COPYING. If + not, write to the Free Software Foundation, Inc., 675 Mass Ave, + Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -88,7 +84,7 @@ static char *DomainName = NULL; int verbose_flag = 0; -int debug_flag = 1; +int debug_flag = 1; /* Needed for yp_msg */ static char local_hostname[MAXHOSTNAMELEN + 2]; static char *current_map; static u_int CallbackProg = 0; @@ -370,21 +366,23 @@ dkey.dsize = strlen (dkey.dptr); #if defined(HAVE_LIBGDBM) dval = gdbm_fetch (dbm, dkey); - gdbm_close (dbm); #elif defined(HAVE_NDBM) dval = dbm_fetch (dbm, dkey); - dbm_close (dbm); #endif if (dval.dptr == NULL) - return NULL; + val = NULL; else { val = malloc (dval.dsize + 1); strncpy (val, dval.dptr, dval.dsize); val[dval.dsize] = 0; - - return val; } +#if defined(HAVE_LIBGDBM) + gdbm_close (dbm); +#elif defined(HAVE_NDBM) + dbm_close (dbm); +#endif + return val; } static u_int @@ -489,6 +487,7 @@ SVCXPRT *CallbackXprt; CLIENT *PushClient = NULL; struct ypreq_xfr req; + struct ypresp_xfr resp; struct timeval tv = {10, 0}; u_int transid; char server[YPMAXPEER + 2]; @@ -522,7 +521,7 @@ exit (-1); } - PushClient = clnt_create (server, YPPROG, YPVERS, "tcp"); + PushClient = clnt_create (server, YPPROG, YPVERS, "udp"); if (PushClient == NULL) { yp_msg ("%s", host); @@ -579,12 +578,15 @@ } if (clnt_call (PushClient, YPPROC_XFR, (xdrproc_t) xdr_ypreq_xfr, - (void *) &req, (xdrproc_t) xdr_void, NULL, tv) - != RPC_SUCCESS) + (caddr_t) &req, (xdrproc_t) xdr_ypresp_xfr, + (caddr_t) &resp, tv) != RPC_SUCCESS) { clnt_perror (PushClient, "YPPUSH: Cannot call YPPROC_XFR"); kill (transid, SIGTERM); } + + /* XXX Check resp.xfrstat here ! */ + #if HAVE_WAIT4 wait4 (transid, &sock, 0, &r); #else @@ -634,16 +636,16 @@ struct ypall_callback f; enum ypstat y; - struct sigaction a; + struct sigaction sig; - a.sa_handler = sig_child; - sigemptyset (&a.sa_mask); + sig.sa_handler = sig_child; + sigemptyset (&sig.sa_mask); #if defined(linux) || (defined(sun) && defined(__srv4__)) - a.sa_flags = SA_NOMASK; + sig.sa_flags = SA_NOMASK; /* Do not prevent the signal from being received from within its own signal handler. */ #endif - sigaction (SIGCHLD, &a, NULL); + sigaction (SIGCHLD, &sig, NULL); while (1) { @@ -681,7 +683,8 @@ break; case 'h': /* we can handle multiple hosts */ - if ((tmp = (struct hostlist *) malloc (sizeof (struct hostlist))) == NULL) + tmp = (struct hostlist *) malloc (sizeof (struct hostlist)); + if (tmp == NULL) { yp_msg ("malloc() failed: %s", strerror (errno)); return 1; @@ -700,6 +703,7 @@ Usage (1); } } + argc -= optind; argv += optind; diff -u -r --new-file ypserv-1.3.7/ypserv.spec ypserv-1.3.8/ypserv.spec --- ypserv-1.3.7/ypserv.spec Fri May 14 20:58:11 1999 +++ ypserv-1.3.8/ypserv.spec Wed Oct 13 14:02:06 1999 @@ -1,5 +1,5 @@ Summary: NIS/YP Server -Url: http://www.suse.de/~kukuk/linux/nis.html +Url: http://www.suse.de/~kukuk/nis.html Name: ypserv Version: 1.3.7 Release: 1