diff -u -r --new-file ypserv-1.3.0/ChangeLog ypserv-1.3.1/ChangeLog --- ypserv-1.3.0/ChangeLog Fri Mar 6 21:04:15 1998 +++ ypserv-1.3.1/ChangeLog Tue Apr 7 19:43:26 1998 @@ -1,3 +1,21 @@ +1998-04-07 Thorsten Kukuk + + * release version 1.3.1 + +1998-04-06 Thorsten Kukuk + + * ypxfr.c (ypxfr_foreach): If we keylen/vallen include + the trailing 0, decrement it. + +1998-04-01 Thorsten Kukuk + + * ypinit.in (is_correct): Set NOPUSH to true, not 1. + +1998-03-29 Thorsten Kukuk + + * yp_db.c: set MAX_FOPEN to 30 to get the CPU load down. + Reported by a lot of people. + 1998-03-06 Thorsten Kukuk * release version 1.3.0 diff -u -r --new-file ypserv-1.3.0/NEWS ypserv-1.3.1/NEWS --- ypserv-1.3.0/NEWS Fri Mar 6 21:10:18 1998 +++ ypserv-1.3.1/NEWS Tue Apr 7 19:47:45 1998 @@ -6,12 +6,17 @@ . +Version 1.3.1 + +* Bugfixes + + Version 1.3.0 * Support for ndbm (SunOS 4.x/5.x) (Not complete) * Add FQDN support (configure --enable-fqdn). All hostnames will - go through gethostbyname to determine the offical hostname. + go through gethostbyname to determine the offical hostname * Add YP V1 protocol diff -u -r --new-file ypserv-1.3.0/TODO ypserv-1.3.1/TODO --- ypserv-1.3.0/TODO Fri Mar 6 21:05:03 1998 +++ ypserv-1.3.1/TODO Sun Mar 29 15:51:29 1998 @@ -9,8 +9,6 @@ o Make sure there are no memory leaks - o ypcat doesn't work with NDBM - - o test yp_first, yp_next + o yp_all doesn't work with NDBM o Remove all remaining bugs :-) diff -u -r --new-file ypserv-1.3.0/version.h ypserv-1.3.1/version.h --- ypserv-1.3.0/version.h Fri Mar 6 21:05:10 1998 +++ ypserv-1.3.1/version.h Wed Apr 1 16:50:08 1998 @@ -1,4 +1,4 @@ #ifndef __VERSION_H__ #define __VERSION_H__ -static char version[] = "1.3.0"; +static char version[] = "1.3.1"; #endif diff -u -r --new-file ypserv-1.3.0/yp_db.c ypserv-1.3.1/yp_db.c --- ypserv-1.3.0/yp_db.c Sat Mar 7 13:14:06 1998 +++ ypserv-1.3.1/yp_db.c Sun Mar 29 16:00:28 1998 @@ -22,7 +22,7 @@ */ #ifndef LINUT -static const char rcsid[] = "$Id: yp_db.c,v 1.17 1998/03/07 12:07:42 kukuk Exp $"; +static const char rcsid[] = "$Id: yp_db.c,v 1.18 1998/03/29 14:00:28 kukuk Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -405,8 +405,11 @@ /* MAX_FOPEN: big -> slow list searching, we go 3 times through the list. - little -> have to close/open very often */ -#define MAX_FOPEN 10 + little -> have to close/open very often. + We now uses 30, because searching 3 times in the list is faster + then reopening the database. +*/ +#define MAX_FOPEN 30 static int fast_open_init = -1; static Fopen fast_open_files[MAX_FOPEN]; diff -u -r --new-file ypserv-1.3.0/ypinit.in ypserv-1.3.1/ypinit.in --- ypserv-1.3.0/ypinit.in Wed Feb 4 20:45:12 1998 +++ ypserv-1.3.1/ypinit.in Wed Apr 1 16:50:19 1998 @@ -2,7 +2,7 @@ # # ypinit - set up the YP directory on a master server or a slave server. # -# $Id: ypinit.in,v 1.2 1998/02/04 19:45:12 kukuk Exp $ +# $Id: ypinit.in,v 1.3 1998/04/01 14:50:19 kukuk Exp $ # ### some variables @@ -109,7 +109,7 @@ in_pwd=`pwd` cd $YPMAPDIR echo "Running $YPMAPDIR/Makefile..." - make NOPUSH=1 + make NOPUSH=true if [ $? -ne 0 ] then diff -u -r --new-file ypserv-1.3.0/ypxfr.c ypserv-1.3.1/ypxfr.c --- ypserv-1.3.0/ypxfr.c Sat Mar 7 09:59:37 1998 +++ ypserv-1.3.1/ypxfr.c Tue Apr 7 19:43:34 1998 @@ -22,7 +22,7 @@ */ #ifndef LINT -static const char rcsid[] = "$Id: ypxfr.c,v 1.17 1998/03/07 08:59:37 kukuk Exp $"; +static const char rcsid[] = "$Id: ypxfr.c,v 1.18 1998/04/07 17:43:34 kukuk Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -188,6 +188,13 @@ if (keylen != 0) { + /* Hack for broken maps: If keylen/vallen includes the trailing 0, + decrement it. */ + if (keylen > 0 && key[keylen - 1] == '\0') + --keylen; + if (vallen > 0 && val[vallen - 1] == '\0') + --vallen; + /* Now save it */ outKey.dptr = keylen ? key : ""; outKey.dsize = keylen; outData.dptr = vallen ? val : ""; @@ -200,8 +207,8 @@ } /* - ** Collects all the answers for our query for hosts running ypserv - */ +** Collects all the answers for our query for hosts running ypserv +*/ static char *ypserver = NULL; static bool_t eachresult (bool_t * resp, struct sockaddr_in *addr) @@ -228,9 +235,9 @@ } /* - ** At first, use the yp lib routines. If we are not bound to a server, - ** do a broadcast and search one. - */ +** At first, use the yp lib routines. If we are not bound to a server, +** do a broadcast and search one. +*/ static int __yp_master (char *domain, char *map, char **master) {