Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jul 2002 22:45:24 -0700 (PDT)
From:      "Crist J. Clark" <cjc@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/40471: chpass(1) -a option broken in CURRENT
Message-ID:  <200207120545.g6C5jOx1044049@blossom.cjclark.org>

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

>Number:         40471
>Category:       bin
>Synopsis:       chpass(1) -a option broken in CURRENT
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 11 22:50:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Crist J. Clark
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
	FreeBSD 5.0-CURRENT.

>Description:
	The -a option for chpass(1) is broken. chpass(1) will SIGSEGV
and die when a NULL pointer is referenced. This is due to the fact
that when YP is #defined, the following,

#ifdef YP
	if ((pw->pw_fields & _PWF_SOURCE) == _PWF_NIS) {

Code is run unconditionally. But in the '-a' case, we have not looked
up a struct passwd pw yet, and pw == NULL.

>How-To-Repeat:

  # chpass -a 'test1:*:666:666::0:0: & User:/nonexistent:/nonexistent'
  Segmentation fault
  #

>Fix:
	We need a way to figure out the 'master_mode' when we have not
yet loaded pw.
>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?200207120545.g6C5jOx1044049>