summaryrefslogtreecommitdiffstats
path: root/lib/libutil/pw_util.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1995-08-13 16:05:06 +0000
committerwpaul <wpaul@FreeBSD.org>1995-08-13 16:05:06 +0000
commit0d181a55dc1c0f2d7802a9841743d9f6e9843424 (patch)
treee5a8a694a6ea93e66791bc5714b29362c457f9c8 /lib/libutil/pw_util.c
parent0cde524bf6e06f31fbad7787b5714dfd308099e3 (diff)
downloadFreeBSD-src-0d181a55dc1c0f2d7802a9841743d9f6e9843424.zip
FreeBSD-src-0d181a55dc1c0f2d7802a9841743d9f6e9843424.tar.gz
Small NIS tweak: frob pw_error() a little so that it can say either
'NIS information unchanged' or '/etc/master.passwd unchanged' depending on which was is being modified (conditional on -DYP). This is to save me the trouble of writing a whole other error routine (nis_error()?) for the upcoming changes to passwd and chpass.
Diffstat (limited to 'lib/libutil/pw_util.c')
-rw-r--r--lib/libutil/pw_util.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/libutil/pw_util.c b/lib/libutil/pw_util.c
index 8dd4e4c5..60b4f77 100644
--- a/lib/libutil/pw_util.c
+++ b/lib/libutil/pw_util.c
@@ -211,9 +211,16 @@ pw_error(name, err, eval)
char *name;
int err, eval;
{
+#ifdef YP
+ extern int _use_yp;
+#endif /* YP */
if (err)
warn(name);
-
+#ifdef YP
+ if (_use_yp)
+ warnx("NIS information unchanged");
+ else
+#endif /* YP */
warnx("%s: unchanged", _PATH_MASTERPASSWD);
(void)unlink(tempname);
exit(eval);
OpenPOWER on IntegriCloud