]> git.proxmox.com Git - mirror_lxc.git/commit
config: Fix parsing of mount options
authorMaximilian Blenk <Maximilian.Blenk@bmw.de>
Thu, 5 Dec 2019 15:44:41 +0000 (16:44 +0100)
committerMaximilian Blenk <Maximilian.Blenk@bmw.de>
Fri, 6 Dec 2019 13:17:37 +0000 (14:17 +0100)
commit85c2de3902df6ccad2c9e0585fb76cd7916a3443
tree76c2afd21bfb156d11507612ea0eef79566c53a0
parent750012991fb1964678bb6de2c86bc1f4dc62b242
config: Fix parsing of mount options

When parsing mount options e.g. from lxc.mount.entry the specified
options are mapped to the flags constants. To do so, the strings
are compared to the options contained in mount_opt. However,
when comparing the strings, the length of the string is not
checked. That entails that the option "rootcontext=selinux-context"
is mapped to the mount option read-only (ro). This commit fixes
this issue by checking if a '=' is contained in the specified option
and additionally comparing the length of the strings.

Signed-off-by: Maximilian Blenk <Maximilian.Blenk@bmw.de>
src/lxc/conf.c