diff options
author | bapt <bapt@FreeBSD.org> | 2015-07-28 20:52:10 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2015-07-28 20:52:10 +0000 |
commit | 39f3813b41e9677f563696f0ce3f25d9f82adc71 (patch) | |
tree | 00a9866b1342d79345201c656c460b79aa94dbe4 /usr.sbin | |
parent | 3f841d419a747b164a574e45fe2c0a4e845a3eb7 (diff) | |
download | FreeBSD-src-39f3813b41e9677f563696f0ce3f25d9f82adc71.zip FreeBSD-src-39f3813b41e9677f563696f0ce3f25d9f82adc71.tar.gz |
Fix wrong warning printed after changing or updating NIS users
PR: 37672
Submitted by: chris+freebsd@chrullrich.de
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pw/pw_user.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c index d6dad3f..aecc90a 100644 --- a/usr.sbin/pw/pw_user.c +++ b/usr.sbin/pw/pw_user.c @@ -206,7 +206,7 @@ perform_chgpwent(const char *name, struct passwd *pwd) rc = chgnispwent(conf.userconf->nispasswd, name, pwd); if (rc == -1) warn("User '%s' not found in NIS passwd", pwd->pw_name); - else + else if (rc != 0) warn("NIS passwd update"); /* NOTE: NIS-only update errors are not fatal */ } @@ -678,7 +678,7 @@ pw_user(int mode, char *name, long id, struct cargs * args) rc = addnispwent(cnf->nispasswd, pwd); if (rc == -1) warnx("User '%s' already exists in NIS passwd", pwd->pw_name); - else + else if (rc != 0) warn("NIS passwd update"); /* NOTE: we treat NIS-only update errors as non-fatal */ } |