]> git.ipfire.org Git - thirdparty/util-linux.git/commit
mount: make NAME=value tags usable for non-root
authorKarel Zak <kzak@redhat.com>
Tue, 19 Nov 2013 16:44:21 +0000 (17:44 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 19 Nov 2013 16:44:21 +0000 (17:44 +0100)
commit6751f0627d9e2fddc63a50b003982ec4bbf0b197
tree53789a1b766db6f5eea3443973d7e3a10811c341
parenta53cc4e0cb30eb55e5ccbd376d1ea803aefa060d
mount: make NAME=value tags usable for non-root

The libmount does not care if we set source or target, it's able to
swap it, but the mount.c function sanitize_paths() does not work as
expected if we set NAME=value as target. It means that

 $ mount LABEL=foo

does not work for non-root users (since 51e3530cdcb1d4f3ab91ae953ebc5adcdc5f9239, v2.24).

This patch also checks if source or target is specified more
than once.

Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/mount.c