]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: fix uid= and gid= translation
authorKarel Zak <kzak@redhat.com>
Mon, 12 Oct 2015 09:42:13 +0000 (11:42 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 12 Oct 2015 09:42:13 +0000 (11:42 +0200)
commit440a355a3d3934d99f7ef82adf02342e6f2f7983
tree8203b4c5b88619b2771ff18bdcfff44476e98f70
parent3ebfa6882adaf55b41fb541776f5136a913d2b26
libmount: fix uid= and gid= translation

The current libmount version returns error when no able to convert
username/groupname to uid/git.

 # mount mount /dev/sda1 /mnt/test -o uid=ignore
 # mount: failed to parse mount options

This is regression, the original mount(8) has ignored possible unknown
user/group names and the option has been used unconverted (with the
original value). For example UDF kernel driver depends on this behavior
and "uid=ignore" (or "forgot") is a valid mount option.

Fixed version (unit test):

./test_mount_optstr  --fix uid=kzak,gid=forgot,aaa,bbb
optstr: uid=kzak,gid=forgot,aaa,bbb
fixed:  uid=1000,gid=forgot,aaa,bbb

Reported-By: Anthony DeRobertis <anthony@derobert.net>
Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=801527
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/optstr.c