From owner-freebsd-questions Thu Sep 26 02:51:08 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id CAA02593 for questions-outgoing; Thu, 26 Sep 1996 02:51:08 -0700 (PDT) Received: from mail.EUnet.hu (mail.eunet.hu [193.225.28.100]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id CAA02541 for ; Thu, 26 Sep 1996 02:51:03 -0700 (PDT) Received: by mail.EUnet.hu, id LAA08409; Thu, 26 Sep 1996 11:50:58 +0200 Received: by CoDe.CoDe.hu (LAA02096); Thu, 26 Sep 1996 11:45:35 GMT From: Gabor Zahemszky Message-Id: <199609261145.LAA02096@CoDe.CoDe.hu> Subject: Re: sliplogin won't go away... To: freebsd-questions@freebsd.org Date: Thu, 26 Sep 1996 11:45:35 +0000 (GMT) Cc: spork@super-g.com In-Reply-To: from "S" at Sep 25, 96 10:25:49 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > Hi, > > We won't be using any of the slip/ppp utilities on a machine, and since > I'm paranoid about setuid programs, I usually rid the machine of anything > that I don't need, but the program "sliplogin" is giving me trouble: > > bash# whoami > root > bash# pwd > /usr/sbin > bash# ls -al sliplogin > -r-sr-xr-x 1 root bin 16384 Sep 18 08:07 sliplogin > bash# rm sliplogin > override r-sr-xr-x root/bin schg for sliplogin? y > rm: sliplogin: Operation not permitted Opps! In this line you can see the problem: <>> system change only (or something like that). In FBSD, there is a system call (and a command) named: chflags. And with it, you can make it undeletable, unmodifiable, etc. so man 1 chflags, man 2 chflags. And use the BSD's ls's -o option with -l: ls -lo sliplogin. (Well, this function exists in Linux on ext2fs too, the name is chattr, and the list utility is lsattr.) -- Gabor Zahemszky -:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:- Earth is the cradle of human sense, but you can't stay in the cradle forever. Tsiolkovsky