Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools: replace non-standard namespace identifiers
The identifiers for namespaces used with lxc-unshare and lxc-attach as given on the manpage do not align with the standard identifiers. This affects network, mount, and uts namespaces. The standard identifiers are: "mnt", "uts", and "net" whereas lxc-unshare and lxc-attach use "MOUNT", "UTSNAME", and "NETWORK". I'm weary to hack this into namespace.{c.h} by e.g. adding additional members to the ns_info struct or to special case this in lxc_fill_namespace_flags(). Internally, we should only accept standard identifiers to ensure that we are always correctly aligned with the kernel. So let's use some cheap memmove()s to replace them by their standard identifiers in lxc-unshare and lxc-attach. Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
- Loading branch information
Showing
2 changed files
with
52 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters