Date: Sat, 20 Oct 2001 14:47:20 +0100 (BST) From: freebsd-security@rikrose.net To: Tomek <tomek@mpionline.com> Cc: freebsd-security@FreeBSD.ORG Subject: Re: Making almost everything non-root Message-ID: <Pine.LNX.4.21.0110201436230.21640-100000@pkl.net> In-Reply-To: <0e3a01c15964$fd88fee0$f6f073d1@mpionline.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 20 Oct 2001, Tomek wrote: > 1. Is there a way to make ports <1024 accessable to non-root programs > (preferably on a per-user basis)? Some programs are set to root JUST to > access a port, which is a lame reason in my opinion to give such access. In your opinion, it is a lame reason. In my opinion, the best way of doing this, is to run the service as a non-root user, bound to a high port on the loopback interface, and use NAT to forward connections from the "usual" port on the external interface(s) to the real listening connection. One problem you'll encounter with that is that with sucky protocols like FTP, you'll need to inspect all the packets as they go, which involves a higher overhead that just rewriting the headers. For WWW, finger, ssh, etc, this is not a problem. > 2. I am planning on recompiling several "login" style programs to use > .. > login info and actually running shells. Is there a way to on-the-fly > make a running PID a different user given the proper login information? Yes, you need to have privildges that will allow you to switch to another user. This means you must be running as root. Only root can switch to another user. > NOTE: I do not understand why programs have not been designed this way. They have not been designed this way, because one program can not affect what user, priviledge level or the data and code, another program is running under. This is a basic premise of multitasking Operating Systems. > I know it may be a slight inconvenience for login programs, but until > the user enters root login information, I do not see a strong argument > for giving the program root privileges in the first place. The argument is that it would be unable to switch to the correct user and priviledges otherwise. rik -- PGP Key: D2729A3F - Keyserver: wwwkeys.uk.pgp.net - rich at rdrose dot org Key fingerprint = 5EB1 4C63 9FAD D87B 854C 3DED 1408 ED77 D272 9A3F Public key also encoded with outguess on http://rikrose.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.21.0110201436230.21640-100000>