]> git.proxmox.com Git - mirror_lxc.git/commit
Fix bug in preserve_ns
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Sat, 11 Jan 2014 03:48:30 +0000 (21:48 -0600)
committerStéphane Graber <stgraber@ubuntu.com>
Sat, 11 Jan 2014 04:24:59 +0000 (23:24 -0500)
commitcd43d2d1b989f8ef292151d795c51e96df1cf903
tree37aa87f2b9fe06cf774aaf1bbe218e4e65b89df5
parentdad87e3bd14e9bfb0ae415db192856c7b6095980
Fix bug in preserve_ns

If /proc/self/ns does not exist, then preserve_ns was failing to
initialize the saved_ns[i] to -1.  This caused attach_ns() to try
and attach, and of course fail.

Initialize the saved ns values before returning an error.

The return values of preserve_ns and attach_ns were also being
ignored.  Honor them.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/start.c