Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 May 2002 09:12:40 -0700 (PDT)
From:      Christian Ullrich <chris+freebsd@chrullrich.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/37672: pw(8) prints warnings after successful NIS map updates
Message-ID:  <200205021612.g42GCed2060466@nwww.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         37672
>Category:       bin
>Synopsis:       pw(8) prints warnings after successful NIS map updates
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 02 09:20:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Christian Ullrich
>Release:        4.5-RELEASE
>Organization:
>Environment:
FreeBSD ser1.chrullrich.de 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Wed May  1 16:24:30 CEST 2002     toor@ser1.chrullrich.de:/usr/src/sys/compile/SER1  i386
>Description:
pw prints warnings after changing and deleting users in NIS.
This is caused by wrong conditional expressions in pw_user.c.

>How-To-Repeat:

>Fix:
--- pw_user.c.orig      Mon Oct 15 15:46:09 2001
+++ pw_user.c   Tue Apr 30 23:33:56 2002
@@ -675,7 +675,7 @@
                        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 */
                }
@@ -693,7 +693,7 @@
                                rc = chgnispwent(cnf->nispasswd, a_name->val, 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 */
                        }

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205021612.g42GCed2060466>