diff options
author | Bill Paul <wpaul@FreeBSD.org> | 1995-08-13 16:05:06 +0000 |
---|---|---|
committer | Bill Paul <wpaul@FreeBSD.org> | 1995-08-13 16:05:06 +0000 |
commit | 0ad8070243d57c40e41817770e963eb7b713c958 (patch) | |
tree | 5d1d1e76f04bc4bdb93ff5807ac25b4f43d55913 | |
parent | 4071e799547aef1aad5f8690453556d743f576b8 (diff) | |
download | pw-darwin-0ad8070243d57c40e41817770e963eb7b713c958.tar.gz pw-darwin-0ad8070243d57c40e41817770e963eb7b713c958.tar.zst pw-darwin-0ad8070243d57c40e41817770e963eb7b713c958.zip |
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.
-rw-r--r-- | libutil/pw_util.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libutil/pw_util.c b/libutil/pw_util.c index 8dd4e4c..60b4f77 100644 --- a/libutil/pw_util.c +++ b/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); |