diff options
author | deraadt <deraadt@openbsd.org> | 2008-02-23 22:21:17 +0000 |
---|---|---|
committer | deraadt <deraadt@openbsd.org> | 2008-02-23 22:21:17 +0000 |
commit | dbc5aed90e683723abaca31d133e8052f281a81e (patch) | |
tree | d1ce56c7aca6f95985008c3704945570e06168d5 /usr.sbin/ypserv | |
parent | SiSPM devices are like belkin ups; do not attach as uhid, pr#5719 (diff) | |
download | wireguard-openbsd-dbc5aed90e683723abaca31d133e8052f281a81e.tar.xz wireguard-openbsd-dbc5aed90e683723abaca31d133e8052f281a81e.zip |
correct pathnames reported; pr#5742
Diffstat (limited to 'usr.sbin/ypserv')
-rw-r--r-- | usr.sbin/ypserv/mknetid/mknetid.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/usr.sbin/ypserv/mknetid/mknetid.c b/usr.sbin/ypserv/mknetid/mknetid.c index f05c1df1913..82c0df08351 100644 --- a/usr.sbin/ypserv/mknetid/mknetid.c +++ b/usr.sbin/ypserv/mknetid/mknetid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mknetid.c,v 1.14 2006/04/03 05:01:23 deraadt Exp $ */ +/* $OpenBSD: mknetid.c,v 1.15 2008/02/23 22:21:17 deraadt Exp $ */ /* * Copyright (c) 1996 Mats O Jansson <moj@stacken.kth.se> @@ -27,7 +27,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: mknetid.c,v 1.14 2006/04/03 05:01:23 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: mknetid.c,v 1.15 2008/02/23 22:21:17 deraadt Exp $"; #endif #include <sys/param.h> @@ -541,21 +541,21 @@ main(int argc, char *argv[]) if (pfile == NULL) { fprintf(stderr,"mknetid: can't open file \"%s\"\n", PasswdFile); - exit(1); + goto bad; } gfile = fopen(GroupFile, "r"); if (gfile == NULL) { fprintf(stderr,"mknetid: can't open file \"%s\"\n", - PasswdFile); - exit(1); + GroupFile); + goto bad; } hfile = fopen(HostFile, "r"); if (hfile == NULL) { fprintf(stderr,"mknetid: can't open file \"%s\"\n", - PasswdFile); - exit(1); + HostFile); + goto bad; } printf("NetidFile: %s\n", NetidFile); @@ -570,4 +570,8 @@ main(int argc, char *argv[]) if (mfile != NULL) print_netid(mfile, NetidFile); return (0); + +bad: + fprintf(stderr, "mknetid: passwd, group, host and netid maps not updated!\n"); + exit(1); } |