From: bugzilla-daemon@kernel.org
To: linux-man@vger.kernel.org
Subject: [Bug 216215] clone and unshare say CAP_SYS_ADMIN is required to create new namespaces
Date: Sun, 10 Jul 2022 22:19:23 +0000 [thread overview]
Message-ID: <bug-216215-11311-4TKf8Lwj15@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-216215-11311@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=216215
Alejandro Colomar (man-pages) (alx.manpages@gmail.com) changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |alx.manpages@gmail.com
Resolution|--- |INVALID
--- Comment #1 from Alejandro Colomar (man-pages) (alx.manpages@gmail.com) ---
$ cat unshare.c
#define _GNU_SOURCE
#include <err.h>
#include <sched.h>
#include <stdlib.h>
int main(void)
{
if (unshare(CLONE_NEWPID) == -1)
err(EXIT_FAILURE, "unshare(2)");
exit(EXIT_SUCCESS);
}
$ cc -Wall -Wextra unshare.c
$ sudo setcap 'cap_sys_admin=' a.out
$ ./a.out
a.out: unshare(2): Operation not permitted
$ sudo setcap 'cap_sys_admin=eip' a.out
$ ./a.out
$
CAP_SYS_ADMIN is required, as the example above demonstrates.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
next prev parent reply other threads:[~2022-07-10 22:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-07 18:50 [Bug 216215] New: clone and unshare say CAP_SYS_ADMIN is required to create new namespaces bugzilla-daemon
2022-07-10 22:19 ` bugzilla-daemon [this message]
2022-07-11 8:01 ` [Bug 216215] " bugzilla-daemon
2022-07-19 15:04 ` bugzilla-daemon
2022-09-06 12:31 ` bugzilla-daemon
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=bug-216215-11311-4TKf8Lwj15@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@kernel.org \
--cc=linux-man@vger.kernel.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox