From owner-cvs-libexec Wed Jan 10 09:44:15 1996 Return-Path: owner-cvs-libexec Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id JAA19293 for cvs-libexec-outgoing; Wed, 10 Jan 1996 09:44:15 -0800 (PST) Received: (from wpaul@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id JAA19284 Wed, 10 Jan 1996 09:44:13 -0800 (PST) Date: Wed, 10 Jan 1996 09:44:13 -0800 (PST) From: Bill Paul Message-Id: <199601101744.JAA19284@freefall.freebsd.org> To: CVS-committers, cvs-libexec Subject: cvs commit: src/libexec/ypxfr ypxfr_main.c Sender: owner-cvs-libexec@FreeBSD.ORG Precedence: bulk wpaul 96/01/10 09:44:12 Modified: libexec/ypxfr ypxfr_main.c Log: - Fix error reporting when checking order number via NIS: we return zero on a failure, but if we're checking a corrupt map we could also get back a zero from ypserv without really encountering any actual error. Flag this condition and generate an meaningful error message. - Fix transmission of ypxfr_clear to ypserv: error checking was wrong and we sending YPXFR_YPERR as an error status instead of YPXFR_CLEAR. - To help avoid a race condition (or at least reduce the likelyhood of it occuring), use rename() to move a newly transfered map into place instead of unlink()ing the old one first and then renaming. Da man page sez that rename should do the unlink() for us. This prevents ypserv from returning 'no such map in domain' when asked to query a map which ypxfr has just unlink()ed but not yet replaced. Revision Changes Path 1.3 +22 -14 src/libexec/ypxfr/ypxfr_main.c