From nobody@FreeBSD.org  Sun Aug 19 21:58:58 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 45DD837B40B
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 19 Aug 2001 21:58:58 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id f7K4wwo44152;
	Sun, 19 Aug 2001 21:58:58 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200108200458.f7K4wwo44152@freefall.freebsd.org>
Date: Sun, 19 Aug 2001 21:58:58 -0700 (PDT)
From: Chris Fernando <chris_fernando@cybris.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: chflags can not set 'noschg' to files in multiuser mode; can't update /kernel.
X-Send-Pr-Version: www-1.0

>Number:         29887
>Category:       kern
>Synopsis:       chflags can not set 'noschg' to files in multiuser mode; can't update /kernel.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 19 22:00:00 PDT 2001
>Closed-Date:    Sun Aug 19 22:08:36 PDT 2001
>Last-Modified:  Sun Aug 19 22:09:55 PDT 2001
>Originator:     Chris Fernando
>Release:        4.4-RC
>Organization:
>Environment:
FreeBSD styx.sleem.net 4.4-RC FreeBSD 4.4-RC #2: Mon Aug 20 00:25:12 EDT 2001  haides@styx.sleem.net:/usr/src/sys/compile/STYX  i386
>Description:
after setting a file with chflags to 'schg', you can not unset ('noschg') it in multiuser mode. you must boot the system into single user mode to make changes to the file.

example in multiuser:
styx ~ #touch foo
styx ~ #chflags schg foo
styx ~ #chflags noschg foo
chflags: foo: Operation not permitted
>How-To-Repeat:
1) create a file
2) chflags schg <filename>
3) chflags noschg <filename>

step 3 should produce the error
>Fix:

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: greid 
State-Changed-When: Sun Aug 19 22:08:36 PDT 2001 
State-Changed-Why:  
You are running in securelevel >= 1, see init(8). 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=29887 
>Unformatted:
