From nobody@FreeBSD.org  Wed Sep 19 13:26:56 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EA70A1065672
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 19 Sep 2012 13:26:56 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id D5E358FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 19 Sep 2012 13:26:56 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q8JDQupF036631
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 19 Sep 2012 13:26:56 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id q8JDQuAR036603;
	Wed, 19 Sep 2012 13:26:56 GMT
	(envelope-from nobody)
Message-Id: <201209191326.q8JDQuAR036603@red.freebsd.org>
Date: Wed, 19 Sep 2012 13:26:56 GMT
From: Gareth de Vaux <freebsd@lordcow.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: make option NO_FSCHG incomplete
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         171779
>Category:       bin
>Synopsis:       [patch] passwd(1): make option NO_FSCHG incomplete
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          patched
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 19 13:30:21 UTC 2012
>Closed-Date:    
>Last-Modified:  Tue Nov 27 16:47:16 UTC 2012
>Originator:     Gareth de Vaux
>Release:        8.3-STABLE
>Organization:
iThemba LABS
>Environment:
FreeBSD XXX 8.3-STABLE FreeBSD 8.3-STABLE #0: Wed Sep 12 22:15:43 SAST 2012     root@XXX:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
Outlined in http://lists.freebsd.org/pipermail/freebsd-stable/2012-September/069610.html

Running a make installworld with NO_FSCHG defined fails to prevent /usr/bin/passwd being installed with the schg flag.

>How-To-Repeat:
chflags -R noschg /
NO_FSCHG=true
make installworld
ls -lo /usr/bin/passwd

>Fix:
add conditional to 'afterinstall' in /usr/src/usr.bin/passwd/Makefile:

.if !defined(NO_FSCHG)
afterinstall:
        -chflags schg ${DESTDIR}${BINDIR}/passwd
.endif


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: jh 
State-Changed-When: Tue Nov 27 16:46:42 UTC 2012 
State-Changed-Why:  
Fixed in head (r243617). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=171779 
>Unformatted:
