From owner-freebsd-hackers Mon Sep 23 1:31:52 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A4EE37B401 for ; Mon, 23 Sep 2002 01:31:51 -0700 (PDT) Received: from insomnia.spc.org (insomnia.spc.org [195.224.94.183]) by mx1.FreeBSD.org (Postfix) with SMTP id 4A4BA43E6A for ; Mon, 23 Sep 2002 01:31:50 -0700 (PDT) (envelope-from bms@insomnia.spc.org) Received: (qmail 25018 invoked by uid 1031); 23 Sep 2002 08:28:24 -0000 Date: Mon, 23 Sep 2002 09:28:23 +0100 From: Bruce M Simpson To: John Hay Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Just a wild idea Message-ID: <20020923082823.GH23343@spc.org> Mail-Followup-To: Bruce M Simpson , John Hay , freebsd-hackers@FreeBSD.ORG References: <200209230629.g8N6TFb8054614@zibbi.icomtek.csir.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200209230629.g8N6TFb8054614@zibbi.icomtek.csir.co.za> User-Agent: Mutt/1.3.28i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Sep 23, 2002 at 08:29:15AM +0200, John Hay wrote: > > better to have a definition of what are restricted ports for each jail > > than to redefine what root is.... > > > > (1024 numbers is only 32 words of bitmask) > > Sometimes I think the below 1024 check is outdated. What about a flag to > switch the below 1024 check totally off? How much do we really loose? The I remember around 6 years ago, when I still ran Linux, that the solution to this problem came in the form of a diff which delegated bind() on a reserved port credentials to a certain GID, BIND_GID. From that point on, the boot process had to be changed such that daemons which only needed to bind to a privileged port were run under their own non-root uid, with this BIND_GID in the additional groups list, using a wrapper such as sudo. This still amounts to a local mod - it can be done, has been done before, I think Tom Ptacek did some diffs for this for vanilla 4.4BSD a good while back, rewriting it for your current tree can't be too difficult. See here: http://www.sockpuppet.org/tqbf/sysctlpriv.html BMS To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message