From owner-freebsd-hackers Fri Nov 1 20:47:49 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id UAA22299 for hackers-outgoing; Fri, 1 Nov 1996 20:47:49 -0800 (PST) Received: from sequent.kiae.su (sequent.kiae.su [193.125.152.6]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id UAA22275 for ; Fri, 1 Nov 1996 20:47:42 -0800 (PST) Received: by sequent.kiae.su id AA06611 (5.65.kiae-2 ); Sat, 2 Nov 1996 08:35:33 +0400 Received: by sequent.KIAE.su (UUMAIL/2.0); Sat, 2 Nov 96 08:35:29 +0400 Received: (from ache@localhost) by nagual.ru (8.8.2/8.8.2) id HAA03899; Sat, 2 Nov 1996 07:35:08 +0300 (MSK) Message-Id: <199611020435.HAA03899@nagual.ru> Subject: Re: Effect of UF_APPEND/SF_APPEND on file modes In-Reply-To: <199611020317.OAA11890@godzilla.zeta.org.au> from "Bruce Evans" at "Nov 2, 96 02:17:46 pm" To: bde@zeta.org.au (Bruce Evans) Date: Sat, 2 Nov 1996 07:35:07 +0300 (MSK) Cc: freebsd-hackers@freebsd.org, taob@io.org From: "=?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?=" (Andrey A. Chernov) Organization: self X-Class: Fast X-Mailer: ELM [version 2.4ME+ PL28 (25)] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > >I can > >delete the file just fine. > > This seems to be a bugfeature in /bin/rm. unlink(2) fails correctly. > /bin/rm seems to attempt to handle the UF_APPEND and UF_IMMUTABLE > flags in the the same way for root (by silently blowing them away), > but it actually handles them diferrently because access(2) fails for > the uchg case so the special handling of UF_IMMUTABLE doesn't get used. Maybe this functionality should be extended to chown/chmod too, because any user now can effectively stop chmoding of his files (f.e. from root crontab) just making them immutable... Basically I dislike whole idea that user things (UF_APPEND/UF_IMMUTABLE) can affect root somehow. We need to think once again, maybe it need to be fixed at syscall level instead... -- Andrey A. Chernov http://www.nagual.ru/~ache/