- 22 Feb, 2016 11 commits
-
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
Stéphane Graber authored
lxc-attach: add comment, & implement login_tty()
-
Christian Brauner authored
- The code required to prepare an fd to act as a login tty is shared among pty_on_host_callback() and fork_pty(). This implements login_pty(), a minimalistic login_tty() clone, to avoid code redundancy. - Give pty_in_container() a slightly extended comment. Signed-off-by:Christian Brauner <christian.brauner@mailbox.org>
-
Stéphane Graber authored
doc: Add Japanese description of cgns apparmor profile in lxc.container.conf(5)
-
KATOH Yasufumi authored
Update for commit 7a126ae1Signed-off-by:
KATOH Yasufumi <karma@jazz.email.ne.jp>
-
Stéphane Graber authored
2016 02 21/cgns.aa
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Also document 'unchanged' which we had never documented before. Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Because containers need to - and safely can - mount cgroufs in that case. Note that if cgns is enabled but the unshare fails, we fail the container start, so checking whether they are enabled is enough. Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
This isn't safe for privileged containers which do not use cgroup namespaces, but is required for systemd containers with cgroup namespaces. So create a new profile for it which lxc will use as the default when it knows it can. Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 21 Feb, 2016 11 commits
-
-
Stéphane Graber authored
fix android build
-
Christian Brauner authored
bionic libc doesn't know _Exit(). Replace it with _exit(). Signed-off-by:Christian Brauner <christian.brauner@mailbox.org>
-
Serge Hallyn authored
make lxc-attach use a pty
-
Christian Brauner authored
So far lxc-attach did not use a pty when attaching to a container. This made it vulnerable to tty input faking via TIOCSTI when switching to a different user. This patch makes lxc-attach use a pty in most cases. The only current exemption is when stdin, stdout, and stderr are not referring to a pty. There are two ways how lxc-attach can receive a pty: 1. get a pty in the container 2. get a pty on the host This patch makes 1. the default and only opts for 2. when 1. fails before giving up. The rationale behind this is as follows: If we create a pty on the host (2.) and pass the fds to the container the container may report "no tty" when the "tty" command is used. This could be irritating for users when they expect that lxc-attach now always tries to use a pty. Hence, option 1. is the default. Signed-off-by:Christian Brauner <christian.brauner@mailbox.org>
-
Christian Brauner authored
lxc_console_cb_tty_masterfd() unnecessarily reported a read/write error when the fd was closed. This happens e.g. when we have allocated a tty in the container with lxc-console and we shut the container down. lxc-console will then exit with an error message. This patch introduces a test whether the EPOLLHUP bit is set in the events mask. If so, we report no error. Signed-off-by:Christian Brauner <christian.brauner@mailbox.org>
-
Christian Brauner authored
Make lxc_console_set_stdfds useable by other callers that do not have access to lxc_handler. Signed-off-by:Christian Brauner <christian.brauner@mailbox.org>
-
Christian Brauner authored
- lxc_console_cb_tty_stdin() - lxc_console_cb_tty_master() - lxc_setup_tios(int fd, struct termios *oldtios); - lxc_console_winsz(int srcfd, int dstfd); - lxc_console_cb_sigwinch_fd(int fd, uint32_t events, void *cbdata, struct lxc_epoll_descr *descr); - lxc_tty_state *lxc_console_sigwinch_init(int srcfd, int dstfd); - lxc_console_sigwinch_fini(struct lxc_tty_state *ts); We can make use these functions in other modules. Signed-off-by:Christian Brauner <christian.brauner@mailbox.org>
-
Christian Brauner authored
We want to reuse lxc_console_cb_tty_stdin() in lxc_attach.c. Signed-off-by:Christian Brauner <christian.brauner@mailbox.org>
-
Stéphane Graber authored
Fix sshd template on systems with systemd
-
Nikolay Martynov authored
Systems with systemd have /sbin/init as a symlink pointing to real init. Sshd template tries to bind-mount special init implementation. The problem is that one cannot bind-mount to a location that is a symlink. Fix this by deferencing /sbin/init symling and using that as bind-mount location. Signed-off-by:Nikolay Martynov <mar.kolya@gmail.com>
-
KATOH Yasufumi authored
Update for commit c4cafa08Signed-off-by:
KATOH Yasufumi <karma@jazz.email.ne.jp> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
- 20 Feb, 2016 5 commits
-
-
Serge Hallyn authored
Fix typo in lxc manpage
-
Stéphane Graber authored
Reported-by: lintian Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
Stéphane Graber authored
2016 02 19/cgfs
-
Ubuntu authored
When containers have lxcfs mounted instead of cgroupfs, we have to process /proc/self/mountinfo a bit differently. In particular, we should look for fuse.lxcfs fstype, we need to look elsewhere for the list of comounted controllers, and the mount_prefix is not a cgroup path which was bind mounted, so we should ignore it, and named subsystems show up without the 'name=' prefix. With this patchset I can start containers inside a privileged lxd container with lxcfs mounted (i.e. without cgroup namespaces). Closes #830 Signed-off-by:Ubuntu <ubuntu@localhost.localdomain>
-
Serge Hallyn authored
Because that's what lxcfs gives us. Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 19 Feb, 2016 4 commits
-
-
Stéphane Graber authored
cgroups: do not fail if setting devices cgroup fails due to EPERM
-
Serge Hallyn authored
If we're trying to allow a device which was denied to our parent container, just continue. Cgmanager does not help us to distinguish between eperm and other errors, so just always continue. We may want to consider actually computing the range of devices to which the container monitor has access, but OTOH that introduces a whole new set of complexity to compute access sets. Closes #827 Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
cast NULL pointers passed to execl*()
-
Christian Brauner authored
NULL pointers passed to execl*() functions must be cast to (char *)NULL since they are variadic functions. Signed-off-by:Christian Brauner <christian.brauner@mailbox.org>
-
- 18 Feb, 2016 1 commit
-
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
- 16 Feb, 2016 5 commits
-
-
Christian Brauner authored
Fix doc build warnings
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
Serge Hallyn authored
Couple of apparmor tweaks
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
- 15 Feb, 2016 3 commits
-
-
Christian Brauner authored
2016 02 15/lognull
-
Serge Hallyn authored
Otherwise after a shortcut on error we could end up trying to write to the closed log fd. Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
fname cannot be passed in as NULL by any of its current callers. If it could, then build_dir() would crash as it doesn't check for it. So make sure we are warned if in the future we pass in NULL. Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-