Christian Brauner
fa456191d0
coverity: #1426734
...
Argument cannot be negative
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-09 00:25:53 +01:00
Christian Brauner
bd01b7d552
coverity: #1429139
...
Resource leak
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-09 00:25:50 +01:00
Stéphane Graber
17eba7a26f
Merge pull request #2143 from brauner/2018-02-08/fix_cgroup_ns
...
start: check for cgroup namespace support
2018-02-08 18:07:51 -05:00
Christian Brauner
7bd05339e1
start: check for cgroup namespace support
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-08 23:47:10 +01:00
Christian Brauner
e3fe3512c3
Merge pull request #2142 from hallyn/2018-02-08/priv
...
2018 02 08/priv
2018-02-08 23:40:50 +01:00
Serge Hallyn
e0010464c7
Restore most cases of am_guest_unpriv
...
The only cases where we really need to be privileged with respect
to the host is when we are trying to mknod, and in some cases
to do with a physical network device. This patch leaves the
detection of the network device cases as a TODO.
This should fix the currently broken case of starting a privileged
container with at least one veth nic, nested inside an unprivileged
container.
Cc: Tycho Andersen <tycho@tycho.ws>
Signed-off-by: Serge Hallyn <shallyn@cisco.com>
2018-02-08 13:06:52 -06:00
Serge Hallyn
477aa378e9
define am_guest_unpriv
...
Sometimes we want to know whether we are privileged wrt our
namespaces, and sometimes we want to know whether we are priv
wrt init_user_ns.
Signed-off-by: Serge Hallyn <shallyn@cisco.com>
2018-02-08 12:06:39 -06:00
Stéphane Graber
5596585d3b
Merge pull request #2125 from brauner/2018-02-02/add_namespace_configs
...
confile: add lxc.namespace.share.[namespace], lxc.namespace.keep, lxc.namespace.clone
2018-02-08 10:26:57 -05:00
Stéphane Graber
dfb7073f20
Merge pull request #2137 from brauner/2018-02-07/fix_unprivileged_flag
...
tools/lxc-ls: fix logic for unpriv containers
2018-02-08 10:26:09 -05:00
Stéphane Graber
d99e66cd14
Merge pull request #2140 from brauner/2018-02-08/cgfsng_fix_ro_remount
...
cgfsng: add required remount flags
2018-02-08 10:25:50 -05:00
Christian Brauner
1323838283
tools/lxc_unshare: satisfy Android
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-08 16:14:09 +01:00
Christian Brauner
5285689c58
cgfsng: add required remount flags
...
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9566d6742852c527bf5af38af5cbb878dad75705
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-08 11:37:16 +01:00
Christian Brauner
ca20a3b350
Merge branch 'marcosps-selinux_simplification' into lxc/master
2018-02-08 10:50:10 +01:00
Marcos Paulo de Souza
08fccae2bb
lsm: fix missing @ in function documentation
...
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
2018-02-08 10:49:51 +01:00
Marcos Paulo de Souza
1be8cb0450
selinux: simplify check for default label
...
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-08 10:49:48 +01:00
Christian Brauner
5c80e9fcb4
Merge branch 'marcosps-issue_870' into lxc/master
2018-02-08 10:34:54 +01:00
Marcos Paulo de Souza
9ea09fb48b
cgroups: add check for lxc.cgroup.use
...
Closes #870 .
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
2018-02-08 10:34:28 +01:00
Christian Brauner
c66687101f
include: remove getsubopt.*
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-07 21:13:06 +01:00
Christian Brauner
f71634fcc9
tools/lxc-ls: fix logic for unpriv containers
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-07 21:06:01 +01:00
Christian Brauner
ff5976cd54
templates: CentOS fixes
...
Issues fixed:
- lxc-centos died about a missing /run directory
- lxc-centos complained about some config files it couldn't modify
- the new container got stuck at startup time for a minute
(literally), waiting for systemd-remount-fs startup script
Of course it still works for RHEL 6, CentOS 6 and 7 as well. I did not
verify earlier CentOS or RHEL releases.
Signed-off-by: Harald Dunkel <harald.dunkel@aixigo.de>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-07 11:39:19 +01:00
Christian Brauner
08fbe494cc
Merge branch 'lifeng68-remount_cgroup' into lxc/master
2018-02-07 11:30:40 +01:00
Christian Brauner
886cac862b
cgfsng: non-functional changes
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-07 11:27:57 +01:00
LiFeng
f8c40ffa39
cgfsng: do MS_REMOUNT
...
Perform MS_REMOUNT on mounts with MS_RDONLY.
Signed-off-by: LiFeng <lifeng68@huawei.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-07 11:21:57 +01:00
Christian Brauner
c112f06d29
Merge branch 'lifeng68-use_env_vars_in_container' into lxc/master
2018-02-07 11:18:42 +01:00
Christian Brauner
3d55242aa5
attach: non-functional changes
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-07 11:15:37 +01:00
l00415420
7385273fc4
attach: set the container's environment variables
...
Set the same environment variables that were used when starting the container
when attaching to the container.
Signed-off-by: LiFeng <lifeng68@huawei.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-07 11:04:42 +01:00
Christian Brauner
6ecad2c49b
tools: move lxc-monitor to API symbols only
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:10:50 +01:00
Christian Brauner
1a80fcdfc7
tools: non-functional changes
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:10:50 +01:00
Christian Brauner
1194822f0b
cmd: non-functional changes
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:10:49 +01:00
Christian Brauner
d567a9a7e9
tools: move lxc-unshare to API symbols only
...
Closes #2073 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:10:49 +01:00
Christian Brauner
b678c6d8a7
tools: move lxc-wait to API symbols only
...
Closes #2073 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:10:49 +01:00
Christian Brauner
81bba32eda
tools: move lxc-unfreeze to API symbols only
...
Closes #2073 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:10:49 +01:00
Christian Brauner
adc0914195
tools: move lxc-top to API symbols only
...
Closes #2073 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:10:48 +01:00
Christian Brauner
52d27da510
tools: move lxc-stop to API symbols only
...
Closes #2073 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:10:48 +01:00
Christian Brauner
9810df0785
tools: move lxc-start to API symbols only
...
Closes #2073 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:10:48 +01:00
Christian Brauner
6a3ec2c51e
tools: move lxc-snapshot to API symbols only
...
Closes #2073 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:10:48 +01:00
Christian Brauner
4b7c0ef8b2
tools: move lxc-ls to API symbols only
...
Closes #2073 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:10:48 +01:00
Christian Brauner
8765242a3b
tools: move lxc-info to API symbols only
...
Closes #2073 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:10:48 +01:00
Christian Brauner
49ac7514cf
tools: move lxc-freeze to API symbols only
...
Closes #2073 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:10:48 +01:00
Christian Brauner
791e7a73a9
tools: move lxc-execute to API symbols only
...
Closes #2073 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:10:45 +01:00
Christian Brauner
23500ef538
tools: move lxc-device to API symbols only
...
Closes #2073 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:03:34 +01:00
Christian Brauner
e3347eef56
tools: move lxc-destroy to API symbols only
...
Closes #2073 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:03:34 +01:00
Christian Brauner
e6294545d1
tools: move lxc-create to API symbols only
...
Closes #2073 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:03:34 +01:00
Christian Brauner
0cb3e3a6dd
tools: move lxc-copy to API symbols only
...
Closes #2073 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:03:34 +01:00
Christian Brauner
8d313ae1dd
cmd: move lxc-console to API symbols only
...
Closes #2073 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:03:33 +01:00
Christian Brauner
2e38dc377d
cmd: move lxc-config to API symbols only
...
Closes #2073 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:03:33 +01:00
Christian Brauner
2f9928f638
tools: move lxc-clone to API symbols only
...
Closes #2073 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:03:33 +01:00
Christian Brauner
78485176fd
tools: move lxc-checkpoint to API symbols only
...
Closes #2073 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:03:33 +01:00
Christian Brauner
6a342cab36
cmd: move lxc-update-config
...
Closes #2073 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:03:33 +01:00
Christian Brauner
b80939349c
cmd: move lxc-monitord
...
Closes #2073 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-06 21:03:33 +01:00