From owner-svn-src-all@FreeBSD.ORG Fri Dec 16 21:57:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11CAA106564A; Fri, 16 Dec 2011 21:57:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAC918FC0A; Fri, 16 Dec 2011 21:57:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBGLvi6t028563; Fri, 16 Dec 2011 21:57:44 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBGLviCL028558; Fri, 16 Dec 2011 21:57:44 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112162157.pBGLviCL028558@svn.freebsd.org> From: Dimitry Andric Date: Fri, 16 Dec 2011 21:57:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228599 - head/libexec/ypxfr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2011 21:57:45 -0000 Author: dim Date: Fri Dec 16 21:57:44 2011 New Revision: 228599 URL: http://svn.freebsd.org/changeset/base/228599 Log: Revert r228592, as the non-messy way of fixing ypxfr breaks other yp programs (e.g. usr.sbin/rpc.yppasswdd). Spotted by: np MFC after: 1 week Modified: head/libexec/ypxfr/yp_dbwrite.c head/libexec/ypxfr/ypxfr_extern.h head/libexec/ypxfr/ypxfr_getmap.c head/libexec/ypxfr/ypxfr_main.c Modified: head/libexec/ypxfr/yp_dbwrite.c ============================================================================== --- head/libexec/ypxfr/yp_dbwrite.c Fri Dec 16 21:48:09 2011 (r228598) +++ head/libexec/ypxfr/yp_dbwrite.c Fri Dec 16 21:57:44 2011 (r228599) @@ -58,10 +58,10 @@ yp_open_db_rw(const char *domain, const char buf[1025]; - yp_errno = YPXFR_SUCC; + yp_errno = YP_TRUE; if (map[0] == '.' || strchr(map, '/')) { - yp_errno = YPXFR_BADARGS; + yp_errno = YP_BADARGS; return (NULL); } @@ -73,13 +73,13 @@ yp_open_db_rw(const char *domain, const if (dbp == NULL) { switch (errno) { case ENOENT: - yp_errno = YPXFR_NOMAP; + yp_errno = YP_NOMAP; break; case EFTYPE: - yp_errno = YPXFR_MADDR; + yp_errno = YP_BADDB; break; default: - yp_errno = YPXFR_YPERR; + yp_errno = YP_YPERR; break; } } Modified: head/libexec/ypxfr/ypxfr_extern.h ============================================================================== --- head/libexec/ypxfr/ypxfr_extern.h Fri Dec 16 21:48:09 2011 (r228598) +++ head/libexec/ypxfr/ypxfr_extern.h Fri Dec 16 21:57:44 2011 (r228599) @@ -46,7 +46,7 @@ extern BTREEINFO openinfo_b; extern char *yp_dir; extern int debug; -extern ypxfrstat yp_errno; +extern enum ypstat yp_errno; extern void yp_error(const char *, ...); extern int _yp_check(char **); extern const char *ypxfrerr_string(ypxfrstat); Modified: head/libexec/ypxfr/ypxfr_getmap.c ============================================================================== --- head/libexec/ypxfr/ypxfr_getmap.c Fri Dec 16 21:48:09 2011 (r228598) +++ head/libexec/ypxfr/ypxfr_getmap.c Fri Dec 16 21:57:44 2011 (r228599) @@ -46,6 +46,7 @@ extern bool_t xdr_ypresp_all_seq(XDR *, int (*ypresp_allfn)(); void *ypresp_data; extern DB *specdbp; +extern enum ypstat yp_errno; /* * This is largely the same as yp_all() except we do the transfer Modified: head/libexec/ypxfr/ypxfr_main.c ============================================================================== --- head/libexec/ypxfr/ypxfr_main.c Fri Dec 16 21:48:09 2011 (r228598) +++ head/libexec/ypxfr/ypxfr_main.c Fri Dec 16 21:57:44 2011 (r228599) @@ -88,7 +88,7 @@ ypxfr_exit(ypxfrstat retval, char *temp) exit(1); } - ypxfr_resp.status = (yppush_status)retval; + ypxfr_resp.status = retval; if (yppushproc_xfrresp_1(&ypxfr_resp, clnt) == NULL) { yp_error("%s", clnt_sperror(clnt, "callback failed"));