- 03 Jan, 2018 3 commits
-
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
Stéphane Graber authored
lxccontainer: revert set_running_config_item()
-
Serge Hallyn authored
Support configurations without root mapping
-
- 02 Jan, 2018 5 commits
-
-
Christian Brauner authored
Closes #2033. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
If no id mapping for the container's root id is defined try to us the id mappings specified via lxc.init.{g,u}id. Closes #2033. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Closes #2033. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Closes #2033. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
- mapped_hostid_entry() - idmap_add() Closes #2033. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
- 01 Jan, 2018 1 commit
-
-
Christian Brauner authored
- As discussed we will have a proper API extension that will allow updating various parts of a running container. The prior approach wasn't a good idea. - Revert this is not a problem since we haven't released any version with the set_running_config_item() API extension. - I'm not simply reverting so that master users can still call into new liblxc's without crashing the container. This is achieved by keeping the commands callback struct member number identical. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
- 30 Dec, 2017 6 commits
-
-
Serge Hallyn authored
mainloop: capture output of short-lived init procs
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
We don't allow non-pty devices anyway so don't let open() create unneeded files. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
lxc_config: Add -h and --help flags handler
-
Marcos Paulo de Souza authored
As the other tools already handle, show usage message when -h or --help are used. Signed-off-by:Marcos Paulo de Souza <marcos.souza.org@gmail.com>
-
- 26 Dec, 2017 2 commits
-
-
Christian Brauner authored
The handler for the signal fd will detect when the init process of a container has exited and cause the mainloop to close. However, this can happen before the console handlers - or any other events for that matter - are handled. So in the case of init exiting we still need to allow for all buffered input to the console to be handled before exiting. This allows us to capture output from short-lived init processes. This is conceptually equivalent to my implementation of ExecReaderToChannel() https://github.com/lxc/lxd/blob/master/shared/util_linux.go#L527 Closes #1694. Signed-off-by:
Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
This makes it clearer why handlers return what value. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
- 22 Dec, 2017 6 commits
-
-
Serge Hallyn authored
start: fix death signal
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
On set{g,u}id() the kernel does: /* dumpability changes */ if (!uid_eq(old->euid, new->euid) || !gid_eq(old->egid, new->egid) || !uid_eq(old->fsuid, new->fsuid) || !gid_eq(old->fsgid, new->fsgid) || !cred_cap_issubset(old, new)) { if (task->mm) set_dumpable(task->mm, suid_dumpable); task->pdeath_signal = 0; smp_wmb(); } which means we need to re-enable the deat signal after the set{g,u}id(). Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Serge Hallyn authored
start: simplify cgroup namespace preservation
-
Christian Brauner authored
Since we are now dumpable we can open /proc/<child-pid>/ns/cgroup so let's avoid the overhead of sending around fds. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
When set set{u,g}id() the kernel will make us undumpable. This is unnecessary since we can guarantee that whatever is running inside the child process at this point this is fully trusted by the parent. Making us dumpable let's users use debuggers on the child process before the exec as well and also allows us to open /proc/<child-pid> files in lieu of the child. Note, that we only need to perform the prctl(PR_SET_DUMPABLE, ...) if our effective uid on the host is not 0. If our effective uid on the host is 0 then we will keep all capabilities in the child user namespace across set{g,u}id(). Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
- 21 Dec, 2017 11 commits
-
-
Serge Hallyn authored
start: tweaks + bugfixes
-
Serge Hallyn authored
btrfs: fix unprivileged snapshot creation
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
This way we can rely on the kernel's copy-on-write support similar to fork(). Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
This is a copy-on-write (no stack passed) variant of lxc_clone(). Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
This is to avoid bad surprises caused by older glibc's pid cache (up to 2.25) when using clone(). Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Because of older glibc's pid cache (up to 2.25) whenever clone() is called the child must must retrieve it's own pid via lxc_raw_getpid(). Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
- test CLONE_VFORK - test CLONE_FILES Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Serge Hallyn authored
attach: simplify significantly
-
Christian Brauner authored
Receive fd for LSM security module before we set{g,u}id(). The reason is that on set{g,u}id() the kernel will a) make us undumpable and b) we will change our effective uid. This means our effective uid will be different from the effective uid of the process that created us which means that this processs no longer has capabilities in our namespace including CAP_SYS_PTRACE. This means we will not be able to read and /proc/<pid> files for the process anymore when /proc is mounted with hidepid={1,2}. So let's get the lsm label fd before the set{g,u}id(). Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
- 20 Dec, 2017 5 commits
-
-
Christian Brauner authored
This let's us simplify the whole file a lot and makes things way clearer. It also let's us avoid the infamous pid cache. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
cgfsng: Add new macro to print errors
-
Christian Brauner authored
Improve the dhclient hook for OCI compat
-
Marcos Paulo de Souza authored
At this point, macros such DEBUG or ERROR does not take effect because this code is called from cgroup_ops_init(cgroup.c), which runs with __attribute__((constructor)), before any log level is set form any tool like lxc-start, so these messages are lost. For now on, use the same LXC_DEBUG_CGFSNG environment variable to control these messages. Signed-off-by:Marcos Paulo de Souza <marcos.souza.org@gmail.com>
-
- 19 Dec, 2017 1 commit
-
-
Jonathan Calmels authored
Signed-off-by:Jonathan Calmels <jcalmels@nvidia.com>
-