userns: clear and save id_map (v2)
Otherwise (a) there is a memory leak when using user namespaces and
clearing a config, and (b) saving a container configuration file doesn't
maintain the userns mapping. For instance, if container c1 has
lxc.id_map configuration entries, then
python3
import lxc
c=lxc.Container("c1")
c.save_config("/tmp/config1")
should show 'lxc.id_map =' entries in /tmp/config1.
Changelog for v2:
1. fix incorrect saving of group types (s/'c'/'g')
2. fix typo -> idmap->type should be idmap->idtype
Reported-by:
Dwight Engen <dwight.engen@oracle.com>
Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by:
Dwight Engen <dwight.engen@oracle.com>
Tested-by:
Dwight Engen <dwight.engen@oracle.com>
Showing
Please
register
or
sign in
to comment