mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Andy Lutomirski <luto@amacapital.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: Issue with clone() and CLONE_NEWUSER as unprivileged user
Date: Thu, 21 Aug 2014 17:26:51 -0500	[thread overview]
Message-ID: <A54DB26A-07AF-4DA8-899F-1DCE527C2389@holtmann.org> (raw)
In-Reply-To: <53F67057.4030202@amacapital.net>

Hi Andy,

>> I am trying to use clone() and CLONE_NEWUSER for creating a new user namespace as an unprivileged user. I always get an operation not permitted error. However when I used fork() + unshare() as unprivileged user, I can create the new user namespace just fine.
>> 
>> Is there something obvious that I am missing? My understand is that CLONE_NEWUSER should not require any special capabilities. I tried the sample code from the manpage and also from LWN.net, but both give me the same error.
> 
> It works for me on 3.16 and 3.15 but not on 3.15.8-200.fc20.x86_64.  I'm
> a bit confused.  What kernel are you using?

I am running 3.15.6-200.fc20.x86_64 actually. What confused me is that fork() + unshare() works fine, but clone() doesn't.

Regards

Marcel


  reply	other threads:[~2014-08-21 22:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-18  5:35 Marcel Holtmann
2014-08-21 22:19 ` Andy Lutomirski
2014-08-21 22:26   ` Marcel Holtmann [this message]
2014-08-22  0:11     ` Andy Lutomirski

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

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

  git send-email \
    --in-reply-to=A54DB26A-07AF-4DA8-899F-1DCE527C2389@holtmann.org \
    --to=marcel@holtmann.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®