Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Sep 1996 11:45:35 +0000 (GMT)
From:      Gabor Zahemszky <zgabor@CoDe.hu>
To:        freebsd-questions@freebsd.org
Cc:        spork@super-g.com
Subject:   Re: sliplogin won't go away...
Message-ID:  <199609261145.LAA02096@CoDe.CoDe.hu>
In-Reply-To: <Pine.LNX.3.92.960925102238.28579A-100000@super-g.inch.com> from "S" at Sep 25, 96 10:25:49 am

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 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: <<schg>>> 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 <zgabor@CoDe.hu>

-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-
Earth is the cradle of human sense, but you can't stay in the cradle forever.
						Tsiolkovsky



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609261145.LAA02096>