util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* muont(1) does not support cap_sys_admin
@ 2017-08-22  8:20 Renzo Davoli
  2017-08-22  8:40 ` mount(8) " Renzo Davoli
  0 siblings, 1 reply; 6+ messages in thread
From: Renzo Davoli @ 2017-08-22  8:20 UTC (permalink / raw)
  To: util-linux

mount command does not seem to support the cap_sys_admin capability.

In fact the command fails when the mount system call would succeeds
for operation permitted to users (e.g. bind mounts in user-namespaces)

For example using userbindmount
https://github.com/rd235/userbindmount

$ userbindmount -s --
$ mount --bind /tmp/resolv.conf /etc/resolv.conf 
mount: only root can use "--bind" option
$ busybox mount --bind /tmp/resolv.conf /etc/resolv.conf 
$

As it can be seen from the example above, busybox mount
succeeds on the same command where mount(1) fails.

"Mount" erroneously checks that the effective user is root
and returns an error prior to invoke the system call mount(2),
forbidding in this way permitted operations.

thank you

	renzo

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-11-30 14:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-22  8:20 muont(1) does not support cap_sys_admin Renzo Davoli
2017-08-22  8:40 ` mount(8) " Renzo Davoli
2017-08-22  9:15   ` Karel Zak
2017-08-22 10:31     ` Alexey Gladkov
2017-11-30 14:22       ` Karel Zak
2017-08-23  7:31     ` Renzo Davoli

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 NNTP newsgroup(s).