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.
This commit is contained in:
Bill Paul 1995-08-13 16:05:06 +00:00
parent 1cf4903ecd
commit d877befa37
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=10048
2 changed files with 16 additions and 2 deletions

View file

@ -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);

View file

@ -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);