mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-04 10:44:08 +00:00
attach: allow LSM attach without new mnt namespace
Currently, the -c command (to set the selinux context) seems to be broken because lxc-attach expects that also a new mount namespace is specified via command line. This commit remove the check for the new mount namespace to fix this issue. Please note that the --elevated-privileges option is not affected by this issue. Signed-off-by: Maximilian Blenk <Maximilian.Blenk@bmw.de> Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
a0738fa00b
commit
b445fcb114
@ -165,8 +165,7 @@ static inline bool sync_wait_fd(int fd, int *fd_recv)
|
||||
|
||||
static bool attach_lsm(lxc_attach_options_t *options)
|
||||
{
|
||||
return (options->namespaces & CLONE_NEWNS) &&
|
||||
(options->attach_flags & (LXC_ATTACH_LSM | LXC_ATTACH_LSM_LABEL));
|
||||
return (options->attach_flags & (LXC_ATTACH_LSM | LXC_ATTACH_LSM_LABEL));
|
||||
}
|
||||
|
||||
static struct attach_context *alloc_attach_context(void)
|
||||
|
Loading…
Reference in New Issue
Block a user