Index: NYS/ypserv/BUILD diff -u NYS/ypserv/BUILD:1.11 NYS/ypserv/BUILD:1.12 --- NYS/ypserv/BUILD:1.11 Sat Aug 28 20:10:29 1999 +++ NYS/ypserv/BUILD Sun Mar 19 19:40:14 2000 @@ -23,7 +23,7 @@ cd obj.$arch.$os-$rel -../configure --enable-fqdn --disable-yppasswd --enable-checkroot --enable-ypmake +../configure --enable-fqdn --enable-checkroot --enable-ypmake if make then Index: NYS/ypserv/ChangeLog diff -u NYS/ypserv/ChangeLog:1.105 NYS/ypserv/ChangeLog:1.106 --- NYS/ypserv/ChangeLog:1.105 Sun Mar 19 14:58:54 2000 +++ NYS/ypserv/ChangeLog Sun Mar 19 15:22:56 2000 @@ -1,3 +1,20 @@ +2000-03-19 Thorsten Kukuk + + * release version 1.3.11 + + * ypmake/Makefile.in (MANPATH): Remove unused Variable + + * ypmake/configure (MANDIR): Search for /usr/share/man, too. + + * Makefile.in (MANDIR): Correct use of MANDIR. + + * ypserv_xdr.c (xdr_ypresp_all): Fix RPC protocol error. + + * ypxfr.c (ypxfr): If lookup of order number failed, use current + time, not max. int. So the next update should work again. + + * ypserv.c (sig_child): Fix debug code. + 2000-01-20 Thorsten Kukuk * release version 1.3.10 Index: NYS/ypserv/Makefile.in diff -u NYS/ypserv/Makefile.in:1.41 NYS/ypserv/Makefile.in:1.42 --- NYS/ypserv/Makefile.in:1.41 Sun Mar 19 14:58:55 2000 +++ NYS/ypserv/Makefile.in Sun Mar 19 15:22:56 2000 @@ -36,9 +36,10 @@ SBINDIR = $(exec_prefix)/sbin UBINDIR = $(exec_prefix)/bin CONFDIR = @sysconfdir@ -MAN1DIR = $(prefix)/man/man1 -MAN5DIR = $(prefix)/man/man5 -MAN8DIR = $(prefix)/man/man8 +MANDIR = @mandir@ +MAN1DIR = $(MANDIR)/man1 +MAN5DIR = $(MANDIR)/man5 +MAN8DIR = $(MANDIR)/man8 INCDIR = $(prefix)/include ## Where to install makedbm (normal /usr/lib/yp, Solaris: /usr/sbin) Index: NYS/ypserv/NEWS diff -u NYS/ypserv/NEWS:1.26 NYS/ypserv/NEWS:1.27 --- NYS/ypserv/NEWS:1.26 Sun Mar 19 14:58:55 2000 +++ NYS/ypserv/NEWS Sun Mar 19 19:43:48 2000 @@ -1,8 +1,12 @@ NYS ypserv NEWS -- history of user-visible changes. -Copyright (C) 1998, 1999 Thorsten Kukuk +Copyright (C) 1998, 1999, 2000 Thorsten Kukuk Please send bug reports, questions and suggestions to . + +Version 1.3.11 +* Fix error in RPC protocol (seg.fault of child) +* minor bug fixes Version 1.3.10 * Fix various problems with SIGCHLD handling Index: NYS/ypserv/README diff -u NYS/ypserv/README:1.24 NYS/ypserv/README:1.25 --- NYS/ypserv/README:1.24 Fri Dec 10 19:15:33 1999 +++ NYS/ypserv/README Sun Mar 19 19:43:48 2000 @@ -1,13 +1,12 @@ -This is version 1.3.10 of an YP (NIS version 2) Server for Linux, but it +This is version 1.3.11 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). This is NOT an NIS+ (NIS version 3) Server ! See the file COPYING for copying restrictions. It is available under -the GNU General Public License. yppasswd is under the copyright from -Theo de Raadt , look at the head of yppasswd.c. +the GNU General Public License. IMPORTANT: ---------- @@ -75,4 +74,4 @@ Thanks to Terje Malmedal , who had send patches for AIX, HP-UX, IRIX, Ultrix and OSF1(alpha). -Thorsten Kukuk , 10. December 1999 +Thorsten Kukuk , 19. March 2000 Index: NYS/ypserv/version.h diff -u NYS/ypserv/version.h:1.43 NYS/ypserv/version.h:1.44 --- NYS/ypserv/version.h:1.43 Fri Dec 10 19:15:33 1999 +++ NYS/ypserv/version.h Sun Mar 19 15:22:56 2000 @@ -1,4 +1,4 @@ #ifndef __VERSION_H__ #define __VERSION_H__ -static char version[] = "1.3.10"; +static char version[] = "1.3.11"; #endif Index: NYS/ypserv/ypserv.c diff -u NYS/ypserv/ypserv.c:1.20 NYS/ypserv/ypserv.c:1.21 --- NYS/ypserv/ypserv.c:1.20 Sun Mar 19 14:58:55 2000 +++ NYS/ypserv/ypserv.c Sun Mar 19 15:22:56 2000 @@ -473,15 +473,14 @@ while ((pid = waitpid (-1, &st, WNOHANG)) > 0) { - yp_msg ("pid=%d\n", pid); + if (debug_flag) + yp_msg ("pid=%d\n", pid); --children; } if (children < 0) { yp_msg ("children is lower 0 (%i)!\n", children); - abort (); - children = 0; } else if (debug_flag) yp_msg ("children = %i\n", children); Index: NYS/ypserv/ypserv_xdr.c diff -u NYS/ypserv/ypserv_xdr.c:1.5 NYS/ypserv/ypserv_xdr.c:1.6 --- NYS/ypserv/ypserv_xdr.c:1.5 Sat Aug 28 20:10:31 1999 +++ NYS/ypserv/ypserv_xdr.c Sun Mar 19 15:22:56 2000 @@ -210,85 +210,72 @@ bool_t xdr_ypresp_all(XDR *xdrs, ypresp_all *objp) { - if (xdrs->x_op == XDR_ENCODE) + if (xdrs->x_op == XDR_ENCODE) { - while (1) + while (1) { - if (!xdr_bool(xdrs, &objp->more)) - { - if (xdr_ypall_cb.u.close != NULL) - (*(xdr_ypall_cb.u.close))(xdr_ypall_cb.data); - - xdr_ypall_cb.data = NULL; - - return FALSE; - } - - if (!xdr_ypresp_key_val(xdrs, &objp->ypresp_all_u.val)) - { - if (xdr_ypall_cb.u.close != NULL) - (*(xdr_ypall_cb.u.close))(xdr_ypall_cb.data); - - xdr_ypall_cb.data = NULL; - - return FALSE; + if (xdr_bool(xdrs, &objp->more) == FALSE || + xdr_ypresp_key_val(xdrs, &objp->ypresp_all_u.val) == FALSE) + { + if (xdr_ypall_cb.u.close != NULL) + (*(xdr_ypall_cb.u.close))(xdr_ypall_cb.data); + + xdr_ypall_cb.data = NULL; + + return FALSE; + } + + if ((objp->ypresp_all_u.val.stat != YP_TRUE) || + (*xdr_ypall_cb.u.encode)(&objp->ypresp_all_u.val, + xdr_ypall_cb.data) != YP_TRUE) + { + objp->more = FALSE; + + if (xdr_ypall_cb.u.close != NULL) + (*(xdr_ypall_cb.u.close))(xdr_ypall_cb.data); + + xdr_ypall_cb.data = NULL; + + if (!xdr_bool(xdrs, &objp->more)) + return FALSE; + + return TRUE; } - - if (objp->ypresp_all_u.val.stat != YP_TRUE) - { - objp->more = FALSE; - - if (xdr_ypall_cb.u.close != NULL) - (*(xdr_ypall_cb.u.close))(xdr_ypall_cb.data); - - xdr_ypall_cb.data = NULL; - - if (!xdr_bool(xdrs, &objp->more)) - return FALSE; - - return TRUE; - } - - if ((*xdr_ypall_cb.u.encode)(&objp->ypresp_all_u.val, - xdr_ypall_cb.data) == YP_NOKEY) - objp->more = FALSE; } - } - + } #ifdef NOTYET /* This code isn't needed in the server */ - else if (xdrs->x_op == XDR_DECODE) + else if (xdrs->x_op == XDR_DECODE) { - int more = 0; - - - while (1) + int more = 0; + + while (1) { - if (!xdr_bool(xdrs, &objp->more)) - return FALSE; - - switch (objp->more) + if (!xdr_bool(xdrs, &objp->more)) + return FALSE; + + switch (objp->more) { - case TRUE: - if (!xdr_ypresp_key_val(xdrs, &objp->ypresp_all_u.val)) - return FALSE; - - if (more == 0) - more = (*xdr_ypall_callback->foreach.decoder) - (&objp->ypresp_all_u.val, xdr_ypall_callback->data); - break; - - case FALSE: - return TRUE; - - default: + case TRUE: + if (!xdr_ypresp_key_val(xdrs, &objp->ypresp_all_u.val)) return FALSE; + + if (more == 0) + more = (*xdr_ypall_callback->foreach.decoder) + (&objp->ypresp_all_u.val, xdr_ypall_callback->data); + break; + + case FALSE: + return TRUE; + + default: + return FALSE; } } - return FALSE; + return FALSE; } #endif - - return TRUE; + + return TRUE; } bool_t Index: NYS/ypserv/ypxfr.c diff -u NYS/ypserv/ypxfr.c:1.22 NYS/ypserv/ypxfr.c:1.23 --- NYS/ypserv/ypxfr.c:1.22 Sat Aug 28 20:10:31 1999 +++ NYS/ypserv/ypxfr.c Sun Mar 19 15:22:56 2000 @@ -1,27 +1,25 @@ -/* -** 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, 2000 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 +#define _GNU_SOURCE + +#if defined(HAVE_CONFIG_H) #include #endif @@ -348,7 +346,9 @@ if ((resp_order = ypproc_order_2 (&req_nokey, clnt_udp)) == NULL) { clnt_perror (clnt_udp, "masterOrderNum"); - masterOrderNum = 0x7fffffff; + masterOrderNum = time (NULL); /* We set it to the current time. + So a new map will be always newer. */ + } else { Index: NYS/ypserv/ypmake/Makefile.in diff -u NYS/ypserv/ypmake/Makefile.in:1.4 NYS/ypserv/ypmake/Makefile.in:1.5 --- NYS/ypserv/ypmake/Makefile.in:1.4 Thu Feb 6 21:50:53 1997 +++ NYS/ypserv/ypmake/Makefile.in Sun Mar 19 15:22:56 2000 @@ -7,7 +7,6 @@ YPBINDIR = @(YPBINDIR) YPMAPDIR = @(YPMAPDIR) YPMODDIR = @(YPMODDIR) -MANPATH = /usr/man MAN5EXT = @(MAN5EXT) MAN5DIR = @(MAN5DIR) MAN8EXT = @(MAN8EXT) Index: NYS/ypserv/ypmake/configure diff -u NYS/ypserv/ypmake/configure:1.3 NYS/ypserv/ypmake/configure:1.4 --- NYS/ypserv/ypmake/configure:1.3 Thu Feb 6 21:50:54 1997 +++ NYS/ypserv/ypmake/configure Sun Mar 19 15:22:56 2000 @@ -19,7 +19,7 @@ MAPDIR="/var/yp /var/nis /etc/yp /etc/nis /usr/etc/yp /usr/etc/nis" BINDIR="/usr/sbin /usr/etc/yp /usr/etc/nis /usr/etc" LIBDIR="/usr/lib/yp /usr/lib/nis /usr/etc/yp /usr/etc/nis /etc/yp /etc/nis" -MANDIR="/usr/man /usr/local/man" +MANDIR="/usr/share/man /usr/man /usr/local/man" MODDIR="" function print {