Date: Tue, 28 Jul 2015 20:52:11 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285984 - head/usr.sbin/pw Message-ID: <201507282052.t6SKqBX9027325@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Tue Jul 28 20:52:10 2015 New Revision: 285984 URL: https://svnweb.freebsd.org/changeset/base/285984 Log: Fix wrong warning printed after changing or updating NIS users PR: 37672 Submitted by: chris+freebsd@chrullrich.de Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Tue Jul 28 20:42:36 2015 (r285983) +++ head/usr.sbin/pw/pw_user.c Tue Jul 28 20:52:10 2015 (r285984) @@ -206,7 +206,7 @@ perform_chgpwent(const char *name, struc 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, s 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 */ }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507282052.t6SKqBX9027325>