unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Thompson, David" <dthompson2@worcester.edu>
To: "Claes Wallin (韋嘉誠)" <gnu@clacke.user.lysator.liu.se>
Cc: guix-devel <guix-devel@gnu.org>, David Thompson <davet@gnu.org>
Subject: Re: Running guix-daemon as an unprivileged user (Was: [PATCH] syscalls: setns: Skip binding if there is no such C function.)
Date: Mon, 17 Aug 2015 11:25:07 -0400	[thread overview]
Message-ID: <CAJ=RwfaEkueY_te4z0e+8wzGMx_T_dZ1fDH0RRo44LLT6hFX3Q@mail.gmail.com> (raw)
In-Reply-To: <CAGv_=Bryr2CpW5QZVkzjnEZkyyncmtgK7GXmr_v0OgEycuy-1w@mail.gmail.com>

On Mon, Aug 17, 2015 at 11:16 AM, Claes Wallin (韋嘉誠)
<gnu@clacke.user.lysator.liu.se> wrote:
> On Mon, Aug 17, 2015 at 4:34 PM, Thompson, David
> <dthompson2@worcester.edu> wrote:
>> On Mon, Aug 17, 2015 at 4:33 AM, Eric Bavier <ericbavier@openmailbox.org> wrote:
>>> On Mon, 17 Aug 2015 14:45:28 +0200
>>> Claes Wallin (韋嘉誠) <gnu@clacke.user.lysator.liu.se> wrote:
>
>>>> https://www.gnu.org/software/guix/manual/guix.html#Build-Environment-Setup
>>>>
>>>> "If you are installing Guix as an unprivileged user, it is still
>>>> possible to run guix-daemon provided you pass --disable-chroot."
>>>>
>>>
>>> I have experimented with this a bit lately.  It works to some extent,
>>> but I have had to apply a few patches to some package recipes.  Some
>>> packages have failing tests (where presumably they would pass or be
>>> skipped in the chroot), which I have disabled for the time being just
>>> to move along.
>>
>> I think that to really make unprivileged use of Guix work acceptably,
>> we need to use the user namespaces feature first introduced in Linux
>> 3.8.  This would allow unprivileged users to build software in the
>> same type of isolated environments that are used when running the
>> daemon as root.
>
>
> Working at all is acceptable to me.
>
> Do namespaces really work for non-root? That's more awesome than I
> expected. But without being able to point out how, it sounds to me
> like it could easily be a privilege escalation waiting to happen,
> unless you do it as compartmentalized as the Hurd does it ... which
> Linux won't.

Yes, user namespaces can be created by unprivileged users. The user
that created the namespace then has root in the context of the new
namespace, which allows for creating all of the other types of
namespaces.  There's been some bumps along the way, such as a security
bug with groups that prompted the addition of the
/proc/<pid>/setgroups file in Linux 3.19 (I think) that has since been
backported to earlier kernel releases, the oldest I know of being
3.13.  But overall, this feature is very good and using it for Guix
would allow for the unprivileged daemon to take advantage of almost
all of the isolation techniques used by the privileged daemon.

- Dave

  reply	other threads:[~2015-08-17 15:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAGv_=BpttjfOoLxnox7UsU+gDoZo8+vKDhiXuCyxZLhat0Jcjw@mail.gmail.com>
2015-08-16 13:57 ` Running guix-daemon as an unprivileged user (Was: [PATCH] syscalls: setns: Skip binding if there is no such C function.) Claes Wallin (韋嘉誠)
2015-08-16 14:01   ` Claes Wallin (韋嘉誠)
2015-08-17 12:45     ` Claes Wallin (韋嘉誠)
2015-08-17  8:33       ` Eric Bavier
2015-08-17 13:42         ` Claes Wallin (韋嘉誠)
2015-08-17 14:27           ` Claes Wallin (韋嘉誠)
2015-08-17 14:31             ` Claes Wallin (韋嘉誠)
2015-08-17 15:23               ` Claes Wallin (韋嘉誠)
2015-08-17 14:34         ` Thompson, David
2015-08-17 15:16           ` Claes Wallin (韋嘉誠)
2015-08-17 15:25             ` Thompson, David [this message]
2015-08-17 15:35               ` Claes Wallin (韋嘉誠)
2015-08-23 17:28               ` Running guix-daemon as an unprivileged user Ludovic Courtès
2015-08-17 20:46         ` Running guix-daemon as an unprivileged user (Was: [PATCH] syscalls: setns: Skip binding if there is no such C function.) Claes Wallin (韋嘉誠)
2015-08-17 20:57           ` Eric Bavier
2015-08-17 23:07             ` Claes Wallin (韋嘉誠)
2015-08-18 11:14             ` Claes Wallin (韋嘉誠)
2015-08-23 17:31             ` Running guix-daemon as an unprivileged user Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ=RwfaEkueY_te4z0e+8wzGMx_T_dZ1fDH0RRo44LLT6hFX3Q@mail.gmail.com' \
    --to=dthompson2@worcester.edu \
    --cc=davet@gnu.org \
    --cc=gnu@clacke.user.lysator.liu.se \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).