From owner-freebsd-hackers Mon Jan 22 03:44:10 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id DAA04134 for hackers-outgoing; Mon, 22 Jan 1996 03:44:10 -0800 (PST) Received: from mpp.minn.net (root@mpp.Minn.Net [204.157.201.242]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id DAA04129 for ; Mon, 22 Jan 1996 03:44:06 -0800 (PST) Received: (from mpp@localhost) by mpp.minn.net (8.7.3/8.6.9) id FAA18087; Mon, 22 Jan 1996 05:42:51 -0600 (CST) Message-Id: <199601221142.FAA18087@mpp.minn.net> Subject: Re: Security (was: Re: Two commands: icat and ils) To: luigi@labinfo.iet.unipi.it (Luigi Rizzo) Date: Mon, 22 Jan 1996 05:42:51 -0600 (CST) From: "Mike Pritchard" Cc: davidg@Root.COM, imp@village.org, hackers@freebsd.org, dworkin@rover.village.org In-Reply-To: <199601221102.MAA04840@labinfo.iet.unipi.it> from "Luigi Rizzo" at Jan 22, 96 12:02:50 pm X-Mailer: ELM [version 2.4 PL25 ME8b] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org Precedence: bulk Luigi Rizzo wrote: > > > > That's not the reason they have read permissions removed. It's common for > > people to have /sbin in their path - to pick up useful utilities which > > probably shouldn't be in /sbin anyway (like ifconfig and ping, for example), > > and executing /sbin/init by accident is not a good thing. > > Two objections: > > 1) just make /sbin/init mode 544 then. Actually, shouldn't it work > even if it has mode 444 ? > 2) would it be that hard to fix init so as to quit if its not > appropriate for it to run (e.g. check process id, another instance > running, etc.) ? I am asking because I don't know what are the > implications, but if the consequences are so bad... Actually, init already does this. Here are the first few lines of code from init.c: /* Dispose of random users. */ if (getuid() != 0) { (void)fprintf(stderr, "init: %s\n", strerror(EPERM)); exit (1); } /* System V users like to reexec init. */ if (getpid() != 1) { (void)fprintf(stderr, "init: already running\n"); exit (1); } -- Mike Pritchard mpp@minn.net "Go that way. Really fast. If something gets in your way, turn"