[lxc-devel] [lxc/lxc] d9192f: fix lxc.mount.auto clearing

GitHub noreply at github.com
Thu Oct 9 17:38:04 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: d9192f5df74762f9d0bfff8898aa5cacb9c9fb58
      https://github.com/lxc/lxc/commit/d9192f5df74762f9d0bfff8898aa5cacb9c9fb58
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2014-10-09 (Thu, 09 Oct 2014)

  Changed paths:
    M src/lxc/confile.c

  Log Message:
  -----------
  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 at ubuntu.com>




More information about the lxc-devel mailing list