Util-Linux package development
 help / color / mirror / Atom feed
* unshare -m should not be a privileged option
@ 2015-11-16  2:26 U.Mutlu
  2015-11-16  4:19 ` Mike Frysinger
  0 siblings, 1 reply; 8+ messages in thread
From: U.Mutlu @ 2015-11-16  2:26 UTC (permalink / raw)
  To: util-linux

I'm proposing that "unshare -m" should not be a privileged option,
because in practice it is IMO used like this:

unshare -m /bin/bash
now user can do his mounts (mostly via sudo)

The user should need the root permission (or CAP_ADMIN or whatever
caps it needs) only for the mount and unmount cmds, but not for "unshare -m".

Therefore the -m option (and maybe even most of the other options) of unshare
should be made to work for users, without needing root permission.

Maybe even better would be to define the users in a new conf file 
/etc/unshare.conf or so.

The other solution via user namespace is IMHO overkill and in my case 
impractical and irritating because user gets a root-prompt (#)
eventhough it is only inside the user namespace.

I like "unshare -m", but it should work also for unprivileged users without 
needing sudo.

As said in previous postings of mine: "chmod u+s unshare" does what I need,
but I don't know if that solution will continue working in newer versions.

...just my .02 cents from the field as admin and user


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

end of thread, other threads:[~2015-11-17 20:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-16  2:26 unshare -m should not be a privileged option U.Mutlu
2015-11-16  4:19 ` Mike Frysinger
2015-11-16 15:43   ` user namespaces: user mapping U.Mutlu
2015-11-16 23:41     ` U.Mutlu
2015-11-17  4:32       ` Mike Frysinger
2015-11-17  5:25         ` U.Mutlu
2015-11-17 20:58           ` Mike Frysinger
2015-11-17  6:54   ` unshare -m should not be a privileged option U.Mutlu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox