]> 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, 2 Nov 2015 09:23:39 +0000 (10:23 +0100)
commit858836b976ce1a31a01be76ab1300df16dd385d6
tree80349486a060b48e13054d28c310c15cdb74e54c
parent76546bc5298e22680c9510279db82b920d892334
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