From owner-cvs-usrbin Fri Oct 4 09:25:58 1996 Return-Path: owner-cvs-usrbin Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA27163 for cvs-usrbin-outgoing; Fri, 4 Oct 1996 09:25:58 -0700 (PDT) Received: from spinner.DIALix.COM (root@spinner.DIALix.COM [192.203.228.67]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id JAA27139; Fri, 4 Oct 1996 09:25:25 -0700 (PDT) Received: from spinner.DIALix.COM (peter@localhost.DIALix.oz.au [127.0.0.1]) by spinner.DIALix.COM (8.8.0/8.8.0) with ESMTP id AAA16884; Sat, 5 Oct 1996 00:25:07 +0800 (WST) Message-Id: <199610041625.AAA16884@spinner.DIALix.COM> X-Mailer: exmh version 1.6.7 5/3/96 To: =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= (Andrey A. Chernov) cc: CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-usrbin@freefall.freebsd.org Subject: Re: cvs commit: src/usr.bin/find extern.h find.1 find.h function.c option.c In-reply-to: Your message of "Fri, 04 Oct 1996 20:03:25 +0400." <199610041603.UAA00513@nagual.ru> Date: Sat, 05 Oct 1996 00:25:06 +0800 From: Peter Wemm Sender: owner-cvs-usrbin@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= wrote: > > It removes both files and directories. It does not attempt to remove > > immutable files (an earlier version I showed to a few people did a chflag s > > and tried to blow away even immutable files. Too risky..) > > It should do the same thing for immutable files as 'rm -f' does. > > > Reviewed by: pst (some time ago, but I've removed the immutable file > > deletion code that he complained about since he last saw it) > > Is it the same code as in 'rm -f'? This two things must be > equivalent, i.e. either 'rm -f' must be -delete compatible > or vice versa. It works exactly the same as rm -f for the system immutable bit.. ie: both fail. peter@spinner[12:19am]/tmp-117# id uid=0(root) gid=0(wheel) groups=0(wheel) peter@spinner[12:19am]/tmp-118# ls -lo bar -rw-r--r-- 1 peter bin schg 0 Oct 5 00:18 bar peter@spinner[12:19am]/tmp-119# rm -f bar rm: bar: Operation not permitted peter@spinner[12:19am]/tmp-120# find bar -delete find: -delete: unlink(bar): Operation not permitted peter@spinner[12:19am]/tmp-121# ls -l bar -rw-r--r-- 1 peter bin 0 Oct 5 00:18 bar However, rm -f will turn off the user immutable bit if run by root. Perhaps I should recover the code, but only let it turn off the *USER* immutable bit, just like rm -f does? At least that'll stop users creating user-immutable files in /tmp to annoy the sysadmin... > -- > Andrey A. Chernov > > http://www.nagual.ru/~ache/ Cheers, -Peter