From owner-freebsd-bugs Thu Jul 11 22:50: 8 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D8B2337B400 for ; Thu, 11 Jul 2002 22:50:02 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 039E643E09 for ; Thu, 11 Jul 2002 22:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g6C5o1JU019570 for ; Thu, 11 Jul 2002 22:50:01 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g6C5o1VO019569; Thu, 11 Jul 2002 22:50:01 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB00D37B400 for ; Thu, 11 Jul 2002 22:45:25 -0700 (PDT) Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9507943E6A for ; Thu, 11 Jul 2002 22:45:25 -0700 (PDT) (envelope-from cjc@attbi.com) Received: from blossom.cjclark.org ([12.234.91.48]) by rwcrmhc51.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020712054525.MNKM24728.rwcrmhc51.attbi.com@blossom.cjclark.org> for ; Fri, 12 Jul 2002 05:45:25 +0000 Received: from blossom.cjclark.org (localhost. [127.0.0.1]) by blossom.cjclark.org (8.12.3/8.12.3) with ESMTP id g6C5jOJK044050 for ; Thu, 11 Jul 2002 22:45:25 -0700 (PDT) (envelope-from cjc@blossom.cjclark.org) Received: (from cjc@localhost) by blossom.cjclark.org (8.12.3/8.12.3/Submit) id g6C5jOx1044049; Thu, 11 Jul 2002 22:45:24 -0700 (PDT) Message-Id: <200207120545.g6C5jOx1044049@blossom.cjclark.org> Date: Thu, 11 Jul 2002 22:45:24 -0700 (PDT) From: "Crist J. Clark" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/40471: chpass(1) -a option broken in CURRENT Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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