]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: don't remove user= when executed by root
authorKarel Zak <kzak@redhat.com>
Wed, 12 Sep 2012 12:27:12 +0000 (14:27 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 1 Oct 2012 09:37:48 +0000 (11:37 +0200)
commitd555b969b6fb219b041491b7fa3262682fc45acc
tree33930e485f33df6cdaa17ce59d933c3bd348b2b6
parent8c060137fc3ac4f041d3d45711ff6354cd671c38
libmount: don't remove user= when executed by root

The original mount(8) allows to store arbitrary user= option to mtab
file if called by root user. For example:

  # mount -f foo /bar -t xxx -o rw,user=kzak

the new mount removes the 'user=' and 'users' options at all for root
user. This is regression. The original functionality is necessary by
'sshfs' where fuse writes to mtab file by mount(8).

Reported-by: Juergen Daubert <jue@jue.li> (and 'horrorStruck' on IRC)
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/context_mount.c