]> git.ipfire.org Git - thirdparty/lxc.git/commit
fix lxc.mount.auto clearing
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 9 Oct 2014 15:54:51 +0000 (10:54 -0500)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 9 Oct 2014 17:31:46 +0000 (12:31 -0500)
commitd9192f5df74762f9d0bfff8898aa5cacb9c9fb58
tree8a2efae40f2d80ce46a278b6a82f1e20fe62d3e2
parentefdca59e498ce7a7ff0db091d7d2fec01a91b8ea
fix lxc.mount.auto clearing

the way config_mount was structured, sending 'lxc.mount.auto = '
ended up actually clearing all lxc.mount.entrys.  Fix that by
moving the check for an empty value to after the subkey checks.
Then, actually do the clearing of auto_mounts in config_mount_auto.

The 'strlen(subkey)' check being removed was bogus - the subkey
either known to be 'lxc.mount.entry', else subkey would have been
NULL (and forced a return in the block above).

This would have been clearer if the config_mount() and helper
fns were structured like the rest of confile.c.  It's tempting
to switch it over, but there are subtleties in there so it's
not something to do without a lot of thought and testing.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/confile.c