From 8459f389a168bc4c5109f83e755a73813f58b8bb Mon Sep 17 00:00:00 2001 From: charnier Date: Mon, 13 Oct 1997 11:22:39 +0000 Subject: Use err(3). Remove multiply defined Id string. --- usr.sbin/rpc.ypupdated/update.c | 13 +++++-------- usr.sbin/rpc.ypupdated/yp_dbdelete.c | 13 ++++++------- usr.sbin/rpc.ypupdated/yp_dbupdate.c | 11 +++++------ usr.sbin/rpc.ypupdated/ypupdated_main.c | 17 +++++++++-------- usr.sbin/rpc.ypupdated/ypupdated_server.c | 11 +++++------ 5 files changed, 30 insertions(+), 35 deletions(-) (limited to 'usr.sbin/rpc.ypupdated') diff --git a/usr.sbin/rpc.ypupdated/update.c b/usr.sbin/rpc.ypupdated/update.c index d6e142f..5b11d83 100644 --- a/usr.sbin/rpc.ypupdated/update.c +++ b/usr.sbin/rpc.ypupdated/update.c @@ -27,9 +27,14 @@ * 2550 Garcia Avenue * Mountain View, California 94043 */ + #ifndef lint +#if 0 static char sccsid[] = "@(#)update.c 1.2 91/03/11 Copyr 1986 Sun Micro"; #endif +static const char rcsid[] = + "$Id$"; +#endif /* not lint */ /* * Copyright (C) 1986, 1989, Sun Microsystems, Inc. @@ -64,15 +69,7 @@ static char sccsid[] = "@(#)update.c 1.2 91/03/11 Copyr 1986 Sun Micro"; #define YPOP_STORE 4 /* add, or change */ #endif -#ifdef notdef -extern char *getpass(); -extern char *malloc(); -#endif - #ifdef YP -#ifdef notdef -static char *basename(); -#endif static char SHELL[] = "/bin/sh"; static char YPDBPATH[]="/var/yp"; /* This is defined but not used! */ static char PKMAP[] = "publickey.byname"; diff --git a/usr.sbin/rpc.ypupdated/yp_dbdelete.c b/usr.sbin/rpc.ypupdated/yp_dbdelete.c index 622b445..304db74 100644 --- a/usr.sbin/rpc.ypupdated/yp_dbdelete.c +++ b/usr.sbin/rpc.ypupdated/yp_dbdelete.c @@ -28,10 +28,13 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $Id: yp_dbdelete.c,v 1.1 1996/12/26 05:43:03 wpaul Exp wpaul $ - * */ + +#ifndef lint +static const char rcsid[] = + "$Id$"; +#endif /* not lint */ + #include #include #include @@ -45,10 +48,6 @@ #include #include "ypxfr_extern.h" -#ifndef lint -static const char rcsid[] = "$Id: yp_dbdelete.c,v 1.1 1996/12/26 05:43:03 wpaul Exp wpaul $"; -#endif - int yp_del_record(dbp,key) DB *dbp; DBT *key; diff --git a/usr.sbin/rpc.ypupdated/yp_dbupdate.c b/usr.sbin/rpc.ypupdated/yp_dbupdate.c index 5a395bb..db84c77 100644 --- a/usr.sbin/rpc.ypupdated/yp_dbupdate.c +++ b/usr.sbin/rpc.ypupdated/yp_dbupdate.c @@ -28,10 +28,13 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $Id: yp_dbupdate.c,v 1.1 1996/12/26 06:00:13 wpaul Exp $ */ +#ifndef lint +static const char rcsid[] = + "$Id$"; +#endif /* not lint */ + #include #include @@ -46,10 +49,6 @@ struct dom_binding {}; #include "ypxfr_extern.h" #include "ypupdated_extern.h" -#ifndef lint -static const char rcsid[] = "$Id: yp_dbupdate.c,v 1.1 1996/12/26 06:00:13 wpaul Exp $"; -#endif - static int yp_domake(map, domain) char *map; char *domain; diff --git a/usr.sbin/rpc.ypupdated/ypupdated_main.c b/usr.sbin/rpc.ypupdated/ypupdated_main.c index 95bc51d..854f611 100644 --- a/usr.sbin/rpc.ypupdated/ypupdated_main.c +++ b/usr.sbin/rpc.ypupdated/ypupdated_main.c @@ -28,10 +28,13 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $Id: ypupdated_main.c,v 1.1 1996/12/25 19:31:28 wpaul Exp wpaul $ */ +#ifndef lint +static const char rcsid[] = + "$Id$"; +#endif /* not lint */ + #include "ypupdate_prot.h" #include #include /* getenv, exit */ @@ -63,9 +66,6 @@ #endif #define _RPCSVC_CLOSEDOWN 120 -#ifndef lint -static const char rcsid[] = "$Id: ypupdated_main.c,v 1.1 1996/12/25 19:31:28 wpaul Exp wpaul $"; -#endif /* not lint */ int _rpcpmstart; /* Started by a port monitor ? */ static int _rpcfdtype; /* Whether Stream or Datagram ? */ @@ -87,7 +87,7 @@ void _msgout(char* msg) if (_rpcpmstart) syslog(LOG_ERR, msg); else - (void) fprintf(stderr, "%s\n", msg); + warnx("%s", msg); #else syslog(LOG_ERR, msg); #endif @@ -146,7 +146,7 @@ ypupdated_svc_run() if (errno == EINTR) { continue; } - perror("svc_run: - select failed"); + warn("svc_run: - select failed"); return; case 0: continue; @@ -181,10 +181,11 @@ static void reaper(sig) void usage() { - fprintf(stderr, "%s [-p path]\n", progname); + fprintf(stderr, "rpc.ypupdatedd [-p path]\n"); exit(0); } +int main(argc, argv) int argc; char *argv[]; diff --git a/usr.sbin/rpc.ypupdated/ypupdated_server.c b/usr.sbin/rpc.ypupdated/ypupdated_server.c index 11b007e..4741c56 100644 --- a/usr.sbin/rpc.ypupdated/ypupdated_server.c +++ b/usr.sbin/rpc.ypupdated/ypupdated_server.c @@ -34,10 +34,13 @@ * Written by Bill Paul * Center for Telecommunications Research * Columbia University, New York City - * - * $Id: ypupdated_server.c,v 1.3 1996/12/26 06:06:05 wpaul Exp wpaul $ */ +#ifndef lint +static const char rcsid[] = + "$Id$"; +#endif /* not lint */ + #include #include #include @@ -50,10 +53,6 @@ #include "yp_extern.h" #include "ypxfr_extern.h" -#ifndef lint -static const char rcsid[] = "$Id: ypupdated_server.c,v 1.3 1996/12/26 06:06:05 wpaul Exp wpaul $"; -#endif - int children = 0; int forked = 0; -- cgit v1.1