From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 12 06:03:57 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F204106564A for ; Thu, 12 Jan 2012 06:03:57 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id A3E968FC19 for ; Thu, 12 Jan 2012 06:03:56 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so1811999vcb.13 for ; Wed, 11 Jan 2012 22:03:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=KFuxV+SJxUVBw5szVuy5d+3a0TvHOoh/8unXTYo+p9E=; b=XdX0S/VxrE2/G37E5P/IbdEL8Ikv7KAmpZRp9f0eWB55g58Yn+WoSyB7iD66tUmJNf uZOTZzfmTPgNJmk7KeqigZswyLX8tP2dWfG9A5o/fRj23DO6rZF955OqnaJJeQXpcB9T cYfoQTnEqGkz6zykdIZGu98656guxcsnDN/fo= MIME-Version: 1.0 Received: by 10.220.156.134 with SMTP id x6mr1359284vcw.17.1326348236027; Wed, 11 Jan 2012 22:03:56 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.36.5 with HTTP; Wed, 11 Jan 2012 22:03:56 -0800 (PST) In-Reply-To: References: Date: Wed, 11 Jan 2012 22:03:56 -0800 X-Google-Sender-Auth: KD9l1Yja08gGmi3JBvXyaVjX-hQ Message-ID: From: Adrian Chadd To: Gerald McNulty Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: Assigning the PRIV_NETINET_BINDANY privilege required for setsockopt(IP_BINDANY) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2012 06:03:57 -0000 On 11 January 2012 15:26, Gerald McNulty wrote: > Hello, > > Using IP_BINDANY to facilitate transparent proxying works as specified. > According the ip(4) man page and sys/netinet/ip_output.c, the > PRIV_NETINET_BINDANY privilege is required in order to make a setsockopt() > call with IP_BINDANY. > > I would like to use this in an app that does not run as uid 0. Is it > possible to assign the PRIV_NETINET_BINDANY privilege to a specific uid or > process or can this mechanism only be used in jails to reduce root > privileges further? I'm not sure if the relevant bits of MAC have been committed. Robert? Adrian