[Bug 216215] clone and unshare say CAP_SYS_ADMIN is required to create new namespaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.kernel.org/show_bug.cgi?id=216215

Alejandro Colomar (man-pages) (alx.manpages@xxxxxxxxx) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |alx.manpages@xxxxxxxxx
         Resolution|---                         |INVALID

--- Comment #1 from Alejandro Colomar (man-pages) (alx.manpages@xxxxxxxxx) ---
$ 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.



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux