Bug 171779 - [patch] passwd(1): make option NO_FSCHG incomplete
Summary: [patch] passwd(1): make option NO_FSCHG incomplete
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 8.3-STABLE
Hardware: Any Any
: Normal Affects Some People
Assignee: Enji Cooper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-19 14:30 UTC by Gareth de Vaux
Modified: 2015-10-25 21:49 UTC (History)
1 user (show)

See Also:
ngie: mfc-stable8-
ngie: mfc-stable9+
ngie: mfc-stable10+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gareth de Vaux 2012-09-19 14:30:21 UTC
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.

Fix: 

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

.if !defined(NO_FSCHG)
afterinstall:
        -chflags schg ${DESTDIR}${BINDIR}/passwd
.endif
How-To-Repeat: chflags -R noschg /
NO_FSCHG=true
make installworld
ls -lo /usr/bin/passwd
Comment 1 Jaakko Heinonen freebsd_committer 2012-11-27 16:46:42 UTC
State Changed
From-To: open->patched

Fixed in head (r243617).
Comment 2 Enji Cooper freebsd_committer 2015-10-25 21:38:48 UTC
- stable/8 has been EOLed.
- It hasn't been MFCed to stable/9.
- Already present in stable/10.

Taking for the MFC.
Comment 3 commit-hook freebsd_committer 2015-10-25 21:49:34 UTC
A commit references this bug:

Author: ngie
Date: Sun Oct 25 21:48:46 UTC 2015
New revision: 289944
URL: https://svnweb.freebsd.org/changeset/base/289944

Log:
  MFC r243617 (to fix a longstanding bug):

  PR: 171779

  r243617 (by pjd):

  Respect NO_FSCHG and don't set 'schg' flag on passwd/yppasswd is defined.

Changes:
_U  stable/9/
_U  stable/9/usr.bin/
_U  stable/9/usr.bin/passwd/
  stable/9/usr.bin/passwd/Makefile