[lxc-devel] capset fails with userns
Stephan Sachse
ste.sachse at gmail.com
Wed Feb 26 09:33:18 UTC 2014
w/ userns:
[root at fedora2 ~]# setcap 'cap_net_admin,cap_net_raw+ep' /usr/bin/ping
Failed to set capabilities on file `/usr/bin/ping' (Operation not permitted)
[root at fedora2 ~]# id
uid=0(root) gid=0(root) groups=0(root)
w/o userns:
[root at fedora2 ~]# setcap 'cap_net_admin,cap_net_raw+ep' /usr/bin/ping
[root at fedora2 ~]# getcap /usr/bin/ping
/usr/bin/ping = cap_net_admin,cap_net_raw+ep
[root at fedora2 ~]# id
uid=0(root) gid=0(root) groups=0(root)
every yum install <pkg> where the pkg has file capabilities fails with
Error unpacking rpm package <PKG>
error: unpacking of archive failed on file <FILE>: cpio: cap_set_file
is there a way to get this working?
i have searched through
https://git.kernel.org/cgit/linux/kernel/git/ebiederm/user-namespace.git/
but found nothing useful for my problem
kernel: 3.13.2-3.el6.x86_64
inside the container:
[root at fedora2 ~]# cat /proc/self/status | grep ^Cap
CapInh: 0000000000000000
CapPrm: 0000001db5feffff
CapEff: 0000001db5feffff
CapBnd: 0000001db5feffff
[root at fedora2 ~]# capsh --print
Current: =ep cap_sys_module,cap_sys_time,cap_mknod,cap_audit_control,cap_mac_admin-ep
Bounding set =cap_chown,cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_linux_immutable,cap_net_bind_service,cap_net_broadcast,cap_net_admin,cap_net_raw,cap_ipc_lock,cap_ipc_owner,cap_sys_rawio,cap_sys_chroot,cap_sys_ptrace,cap_sys_pacct,cap_sys_admin,cap_sys_boot,cap_sys_nice,cap_sys_resource,cap_sys_tty_config,cap_lease,cap_audit_write,cap_setfcap,cap_mac_override,cap_syslog,35,36
Securebits: 00/0x0/1'b0
secure-noroot: no (unlocked)
secure-no-suid-fixup: no (unlocked)
secure-keep-caps: no (unlocked)
uid=0(root)
gid=0(root)
groups=
--
Software is like sex, it's better when it's free!
More information about the lxc-devel
mailing list