]> git.ipfire.org Git - thirdparty/lxc.git/log
thirdparty/lxc.git
6 years agogenl: remove
Christian Brauner [Tue, 1 May 2018 14:59:19 +0000 (16:59 +0200)] 
genl: remove

These files have never been used and as such have no dependencies in the
codebase whatsoever. So remove them. If we need them we can simply pull them
out of the git history.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoexecute: account for -o path option count
Tycho Andersen [Wed, 9 May 2018 01:29:06 +0000 (01:29 +0000)] 
execute: account for -o path option count

This always works fine... until your exec() fails and you try to go and
free it, you've overwritten the allocator's metadata (and potentially other
stuff) and it fails.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
6 years agolxc-unshare: add missing declaration
Christian Brauner [Thu, 23 Aug 2018 21:11:13 +0000 (23:11 +0200)] 
lxc-unshare: add missing declaration

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoexecute: do not check inherited fds again
Christian Brauner [Tue, 8 May 2018 15:58:36 +0000 (17:58 +0200)] 
execute: do not check inherited fds again

This is already done in do_lxcapi_start{l}() so a) no need to do it again here
and b) this would close the state socket pair sockets, corrup the fd, and lead
to EBADF.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoexecute: use static buffer
Christian Brauner [Fri, 4 May 2018 09:59:27 +0000 (11:59 +0200)] 
execute: use static buffer

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agofix logic for execute log file
Tycho Andersen [Thu, 3 May 2018 18:32:19 +0000 (18:32 +0000)] 
fix logic for execute log file

The problem here is that lxc-init runs *inside* the container. So if a
person has the log file set to /home/$USER/foo, lxc-init ends up making a
directory /home/$USER/foo inside the container to put the log file in. What
we really want are the logs to be propagated from inside the container to
the outside. We accomplish this by passing an fd without O_CLOEXEC, and
telling lxc-init to log to that file.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
6 years agocoverity: #1435263
Christian Brauner [Mon, 30 Apr 2018 10:18:23 +0000 (12:18 +0200)] 
coverity: #1435263

Use after free

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: non-functional changes
Christian Brauner [Sun, 29 Apr 2018 14:58:06 +0000 (16:58 +0200)] 
lxccontainer: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: non-functional changes
Christian Brauner [Sun, 29 Apr 2018 14:56:58 +0000 (16:56 +0200)] 
lxccontainer: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: non-functional changes
Christian Brauner [Sun, 29 Apr 2018 13:08:46 +0000 (15:08 +0200)] 
lxccontainer: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: do_lxcapi_unfreeze()
Christian Brauner [Sun, 29 Apr 2018 12:53:12 +0000 (14:53 +0200)] 
lxccontainer: do_lxcapi_unfreeze()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: do_lxcapi_freeze()
Christian Brauner [Sun, 29 Apr 2018 12:52:40 +0000 (14:52 +0200)] 
lxccontainer: do_lxcapi_freeze()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: do_lxcapi_is_running()
Christian Brauner [Sun, 29 Apr 2018 12:49:36 +0000 (14:49 +0200)] 
lxccontainer: do_lxcapi_is_running()

There's no need to do string comparisons.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: non-functional changes
Christian Brauner [Sun, 29 Apr 2018 12:48:08 +0000 (14:48 +0200)] 
lxccontainer: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: use thread-safe *_OFD_* locks
Christian Brauner [Sun, 29 Apr 2018 11:39:28 +0000 (13:39 +0200)] 
lxccontainer: use thread-safe *_OFD_* locks

If they aren't available fallback to BSD flock()s.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1435198
Christian Brauner [Sat, 28 Apr 2018 22:50:50 +0000 (00:50 +0200)] 
coverity: #1435198

Unchecked return value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1435205
Christian Brauner [Sat, 28 Apr 2018 22:38:29 +0000 (00:38 +0200)] 
coverity: #1435205

Unchecked return value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1435207
Christian Brauner [Sat, 28 Apr 2018 22:22:54 +0000 (00:22 +0200)] 
coverity: #1435207

Unchecked return value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1435208
Christian Brauner [Sat, 28 Apr 2018 22:21:33 +0000 (00:21 +0200)] 
coverity: #1435208

Unused value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoFix memory leak in list_active_containers
LiFeng [Tue, 24 Apr 2018 19:10:15 +0000 (15:10 -0400)] 
Fix memory leak in list_active_containers

Signed-off-by: LiFeng <lifeng68@huawei.com>
6 years agoFix the memory leak in cgfsng_attach
LiFeng [Tue, 24 Apr 2018 16:53:57 +0000 (12:53 -0400)] 
Fix the memory leak in cgfsng_attach

Signed-off-by: LiFeng <lifeng68@huawei.com>
6 years agodo_lxcapi_create: set umask
Kaarle Ritvanen [Sun, 15 Apr 2018 11:50:28 +0000 (14:50 +0300)] 
do_lxcapi_create: set umask

Always use 022 as the umask when creating the rootfs directory and
executing the template. A too loose umask may cause security issues.
A too strict umask may cause programs to fail inside the container.

Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
6 years agoconf: ret-try devpts mount without gid=5 on error
Christian Brauner [Thu, 12 Apr 2018 09:12:06 +0000 (11:12 +0200)] 
conf: ret-try devpts mount without gid=5 on error

We should always default to mounting devpts with gid=5 but we should fallback
to mounting without gid=5. This let's us cover use-cases such as container
started with only a single mapping e.g.:

lxc.idmap = u 1000 1000 1
lxc.idmap = g 1000 1000 1

Closes #2257.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoutils: define __NR_setns if missing on old glibcs
Christian Brauner [Tue, 10 Apr 2018 10:27:39 +0000 (12:27 +0200)] 
utils: define __NR_setns if missing on old glibcs

Closes #2248.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxc init: coding style
Christian Brauner [Mon, 9 Apr 2018 18:44:14 +0000 (20:44 +0200)] 
lxc init: coding style

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxc init: remove dead code
C0deAi [Fri, 6 Apr 2018 15:30:06 +0000 (11:30 -0400)] 
lxc init: remove dead code

Value stored is never read.

Closes #2262.

Signed-off-by: C0deAi <techsupport@mycode.ai>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agofix signal sending in lxc.init
Tycho Andersen [Wed, 4 Apr 2018 23:45:29 +0000 (17:45 -0600)] 
fix signal sending in lxc.init

The problem here is that these two clauses were ordered backwards: we first
check if the signal came from not the init pid, and if it did, then we give
a notice and return. The comment notes that this is intended to protect
against SIGCHLD, but we don't in fact know if the signal is a SIGCHLD yet,
because that's tested in the next hunk.

The symptom is that if I e.g. send SIGTERM from the outside world to the
container init, it ignores it and gives this notice. If we re-order these
clauses, it forwards non SIGCHLD signals, and ignores SIGCHLD signals from
things that aren't the real container process.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
6 years agolocktests: fix test suite
Christian Brauner [Fri, 30 Mar 2018 05:53:02 +0000 (07:53 +0200)] 
locktests: fix test suite

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxclock: use thread-safe *_OFD_* fcntl() locks
Christian Brauner [Fri, 30 Mar 2018 04:54:40 +0000 (06:54 +0200)] 
lxclock: use thread-safe *_OFD_* fcntl() locks

If they aren't available fallback to BSD flock()s.

Closes #2245.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agostart: always make us dumpable
Christian Brauner [Mon, 26 Mar 2018 21:03:28 +0000 (23:03 +0200)] 
start: always make us dumpable

Otherwise lxc.hook.mount hooks that try to inspect /proc/<pid>/*
will fail.

Cc: Jonathan Calmels <jcalmels@nvidia.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoconf: simplify lxc_fill_autodev()
Christian Brauner [Sun, 25 Mar 2018 12:33:44 +0000 (14:33 +0200)] 
conf: simplify lxc_fill_autodev()

This function was way more syscall heavy than it needed to be.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoRename ifup/down and remove usless parameter passing
fliiiix [Thu, 22 Mar 2018 15:18:59 +0000 (16:18 +0100)] 
Rename ifup/down and remove usless parameter passing

Signed-off-by: Felix <de-ch@hotmail.de>
6 years agofix handler use-after-free
Tycho Andersen [Thu, 15 Mar 2018 15:29:27 +0000 (15:29 +0000)] 
fix handler use-after-free

The problem here is that __lxc_start frees the handler, so any use
afterwards is invalid. Since we don't have access to the actual struct
lxc_container object in __lxc_start, let's pass a pointer to error_num in
so it can be returned.

Unfortunately, I'm a little too paranoid to change the return type of
lxc_start, since it returns failure if some of the cleanup fails, which
may be useful in some cases. So let's keep this out of band.

Closes #2218
Closes #2219

Reported-by: Felix Abecassis <fabecassis@nvidia.com>
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
6 years agoconf: fix clang warning when building w/o libcap
Igor Galić [Wed, 14 Mar 2018 15:53:24 +0000 (16:53 +0100)] 
conf: fix clang warning when building w/o libcap

when compiling lxc with clang-5.0 parse_cap()'s main loop will produce a
warning about a tautological comparision (#2215).

By moving the result of computation into a variable (end) this is no
longer a constant expression. clang-5.0 does not do dataflow analysis at
this point, so it is, to quote someone from #llvm, "morally equivalent"
to casting `(int)i`.

in addition, we also clean up the #if HAVE_LIBCAP to no longer need
its #else branch!

Signed-off-by: Igor Galić <igor.galic@automatic-server.com>
6 years agoRevert "cgroups: don't escape if we're not real root"
Serge Hallyn [Tue, 13 Mar 2018 17:55:02 +0000 (12:55 -0500)] 
Revert "cgroups: don't escape if we're not real root"

This reverts commit 8d961e28f1d759669b477a659cbb694aaa2af915.

Unfortunately I don't believe the check is correct in the general case.

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
6 years agocgroups: don't escape if we're not real root
Tycho Andersen [Tue, 13 Mar 2018 15:57:10 +0000 (15:57 +0000)] 
cgroups: don't escape if we're not real root

If we're host unpriv but root in our userns, we can't really escape
cgroups. Let's switch the cgroup escape test to reflect this.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
6 years agousernsexec: init log fd
Tycho Andersen [Mon, 12 Mar 2018 15:39:37 +0000 (09:39 -0600)] 
usernsexec: init log fd

lxc-usernsexec uses some functions (e.g. lxc_map_ids()), which are part of
the lxc library and thus use the WARN etc. macros to emit log messages.
However, it doesn't initialize the log in any way, so these messages go
into the ether.

lxc-usernsexec currently has no log parameters, so let's just log these to
stderr. Someone can do something fancier later if they want.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
6 years agoAdd a workaround for a build issue with old versions of libcap
Felix Abecassis [Sat, 3 Mar 2018 06:01:56 +0000 (22:01 -0800)] 
Add a workaround for a build issue with old versions of libcap

Fixes: #2178
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
6 years agoCODING_STYLE: add languages to highlight
Christian Brauner [Fri, 2 Mar 2018 11:57:18 +0000 (12:57 +0100)] 
CODING_STYLE: add languages to highlight

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoCODING_STYLE: arrays of structs
Christian Brauner [Fri, 2 Mar 2018 11:50:55 +0000 (12:50 +0100)] 
CODING_STYLE: arrays of structs

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoCODING_STYLE: clang-format
Christian Brauner [Fri, 2 Mar 2018 11:29:30 +0000 (12:29 +0100)] 
CODING_STYLE: clang-format

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoCODING_STYLE: remove duplicate _exit() entry
Christian Brauner [Fri, 2 Mar 2018 11:18:38 +0000 (12:18 +0100)] 
CODING_STYLE: remove duplicate _exit() entry

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoconfig: start with a full capability set
Christian Brauner [Thu, 1 Mar 2018 16:09:44 +0000 (17:09 +0100)] 
config: start with a full capability set

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agomainloop: add LXC_MAINLOOP_ERROR
Christian Brauner [Wed, 28 Feb 2018 10:50:12 +0000 (11:50 +0100)] 
mainloop: add LXC_MAINLOOP_ERROR

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: non-functional changes
Christian Brauner [Tue, 27 Feb 2018 14:57:16 +0000 (15:57 +0100)] 
cgfsng: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxc_init: don't mount filesystems
Serge Hallyn [Tue, 27 Feb 2018 18:05:30 +0000 (12:05 -0600)] 
lxc_init: don't mount filesystems

We have an extensive set of container config options to do this
for us, and doing this unconditionally breaks several use cases.
For instance, if we want to bind mount a /dev/shm using the
container configuration, then lxc-execute, then lxc-init will
rudely unmount the /dev/shm and remount it as a private tmpfs.

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
6 years agolxc-snapshot: fix segfault
Christian Brauner [Mon, 26 Feb 2018 14:30:56 +0000 (15:30 +0100)] 
lxc-snapshot: fix segfault

https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1751780

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocommands: remove mutex from state client list
Christian Brauner [Mon, 26 Feb 2018 10:43:42 +0000 (11:43 +0100)] 
commands: remove mutex from state client list

I was thinking about the locking here yesterday and it dawned on me that we
actually don't need this at all:
- possible contention between traversing list to send states to state clients
  and adding new state clients to the list:
  It is the command handler that adds new state clients to the state client
  list. The command handler and the code that actually sends out the container
  states run in the same process so there's not contention and thus no locking
  needed.
- adding state clients to the list from multiple threads:
  The command handler itself is single-threaded so only one thread's request can
  be served at the same time so no locking is needed.
- sending out the state to state clients via the command handler itself:
  The state client also adds and removes state clients from the state client
  list so there's no locking needed.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoCODING_STYLE: add section about _exit()
Christian Brauner [Mon, 26 Feb 2018 10:21:51 +0000 (11:21 +0100)] 
CODING_STYLE: add section about _exit()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agofix download template for /tmp as tmpfs or noexec
Stuart Cardall [Sun, 25 Feb 2018 11:50:13 +0000 (11:50 +0000)] 
fix download template for /tmp as tmpfs or noexec

* prepend $LXC_PATH to $DOWNLOAD_TEMP on systems with /tmp mounted
  securely as a small tmpfs / noexec

* gpg_setup() creates $DOWNLOAD_TEMP so remove superflous mkdir

* fixes https://github.com/lxc/lxc/issues/516

Signed-off-by: Stuart Cardall <developer@it-offshore.co.uk>
6 years agocgfsng: fix get_hierarchy() for unified hierarchy
Christian Brauner [Sat, 24 Feb 2018 20:36:20 +0000 (21:36 +0100)] 
cgfsng: fix get_hierarchy() for unified hierarchy

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocriu: du_dump()
Christian Brauner [Sat, 24 Feb 2018 19:12:51 +0000 (20:12 +0100)] 
criu: du_dump()

thread-safety: s/exit()/_exit()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocriu: do_restore()
Christian Brauner [Sat, 24 Feb 2018 19:12:16 +0000 (20:12 +0100)] 
criu: do_restore()

thread-safety: s/exit()/_exit()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocriu: criu_version_ok()
Christian Brauner [Sat, 24 Feb 2018 19:11:45 +0000 (20:11 +0100)] 
criu: criu_version_ok()

thread-safety: s/exit()/_exit()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: create_container_dir()
Christian Brauner [Sat, 24 Feb 2018 14:30:56 +0000 (15:30 +0100)] 
lxccontainer: create_container_dir()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: do_create_container_dir()
Christian Brauner [Sat, 24 Feb 2018 14:29:33 +0000 (15:29 +0100)] 
lxccontainer: do_create_container_dir()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: lxcapi_startl()
Christian Brauner [Sat, 24 Feb 2018 14:26:35 +0000 (15:26 +0100)] 
lxccontainer: lxcapi_startl()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: lxcapi_start()
Christian Brauner [Sat, 24 Feb 2018 14:25:44 +0000 (15:25 +0100)] 
lxccontainer: lxcapi_start()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: free_init_cmd()
Christian Brauner [Sat, 24 Feb 2018 14:24:47 +0000 (15:24 +0100)] 
lxccontainer: free_init_cmd()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: split_init_cmd()
Christian Brauner [Sat, 24 Feb 2018 14:24:29 +0000 (15:24 +0100)] 
lxccontainer: split_init_cmd()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: push_arg()
Christian Brauner [Sat, 24 Feb 2018 14:23:03 +0000 (15:23 +0100)] 
lxccontainer: push_arg()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: am_single_threaded()
Christian Brauner [Sat, 24 Feb 2018 14:22:38 +0000 (15:22 +0100)] 
lxccontainer: am_single_threaded()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: do_lxcapi_wait()
Christian Brauner [Sat, 24 Feb 2018 14:22:04 +0000 (15:22 +0100)] 
lxccontainer: do_lxcapi_wait()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: do_lxcapi_want_close_all_fds()
Christian Brauner [Sat, 24 Feb 2018 14:21:38 +0000 (15:21 +0100)] 
lxccontainer: do_lxcapi_want_close_all_fds()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: do_lxcapi_want_daemonize()
Christian Brauner [Sat, 24 Feb 2018 14:21:16 +0000 (15:21 +0100)] 
lxccontainer: do_lxcapi_want_daemonize()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: do_lxcapi_load_config()
Christian Brauner [Sat, 24 Feb 2018 14:20:50 +0000 (15:20 +0100)] 
lxccontainer: do_lxcapi_load_config()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: load_config_locked()
Christian Brauner [Sat, 24 Feb 2018 14:19:59 +0000 (15:19 +0100)] 
lxccontainer: load_config_locked()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: lxcapi_console()
Christian Brauner [Sat, 24 Feb 2018 14:19:19 +0000 (15:19 +0100)] 
lxccontainer: lxcapi_console()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: do_lxcapi_console_getfd()
Christian Brauner [Sat, 24 Feb 2018 14:18:55 +0000 (15:18 +0100)] 
lxccontainer: do_lxcapi_console_getfd()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: do_lxcapi_unfreeze()
Christian Brauner [Sat, 24 Feb 2018 14:18:30 +0000 (15:18 +0100)] 
lxccontainer: do_lxcapi_unfreeze()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: do_lxcapi_freeze()
Christian Brauner [Sat, 24 Feb 2018 14:18:12 +0000 (15:18 +0100)] 
lxccontainer: do_lxcapi_freeze()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: do_lxcapi_is_running()
Christian Brauner [Sat, 24 Feb 2018 14:17:53 +0000 (15:17 +0100)] 
lxccontainer: do_lxcapi_is_running()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: is_stopped()
Christian Brauner [Sat, 24 Feb 2018 14:17:31 +0000 (15:17 +0100)] 
lxccontainer: is_stopped()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: do_lxcapi_state()
Christian Brauner [Sat, 24 Feb 2018 14:17:15 +0000 (15:17 +0100)] 
lxccontainer: do_lxcapi_state()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: do_lxcapi_is_defined()
Christian Brauner [Sat, 24 Feb 2018 14:16:40 +0000 (15:16 +0100)] 
lxccontainer: do_lxcapi_is_defined()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: lxc_container_{get,put}()
Christian Brauner [Sat, 24 Feb 2018 14:15:54 +0000 (15:15 +0100)] 
lxccontainer: lxc_container_{get,put}()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: lxc_container_free()
Christian Brauner [Sat, 24 Feb 2018 14:13:01 +0000 (15:13 +0100)] 
lxccontainer: lxc_container_free()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: create_partial()
Christian Brauner [Sat, 24 Feb 2018 14:12:16 +0000 (15:12 +0100)] 
lxccontainer: create_partial()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: create_partial()
Christian Brauner [Sat, 24 Feb 2018 14:10:33 +0000 (15:10 +0100)] 
lxccontainer: create_partial()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: ongoing_create()
Christian Brauner [Sat, 24 Feb 2018 14:08:43 +0000 (15:08 +0100)] 
lxccontainer: ongoing_create()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: config_file_exists()
Christian Brauner [Sat, 24 Feb 2018 14:06:32 +0000 (15:06 +0100)] 
lxccontainer: config_file_exists()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agonetwork: lxc_delete_network_unpriv_exec()
Christian Brauner [Fri, 23 Feb 2018 13:36:30 +0000 (14:36 +0100)] 
network: lxc_delete_network_unpriv_exec()

thread-safety: s/exit()/_exit()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agonetwork: lxc_create_network_unpriv_exec()
Christian Brauner [Fri, 23 Feb 2018 13:35:57 +0000 (14:35 +0100)] 
network: lxc_create_network_unpriv_exec()

thread-safety: s/exit()/_exit()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoutils: run_command()
Christian Brauner [Fri, 23 Feb 2018 13:31:12 +0000 (14:31 +0100)] 
utils: run_command()

thread-safety: s/exit()/_exit()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoutils: lxc_popen()
Christian Brauner [Fri, 23 Feb 2018 13:30:55 +0000 (14:30 +0100)] 
utils: lxc_popen()

thread-safety: s/exit()/_exit()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxclock: {un}lock_mutex()
Christian Brauner [Fri, 23 Feb 2018 13:28:10 +0000 (14:28 +0100)] 
lxclock: {un}lock_mutex()

thread-safety: s/exit()/_exit()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: do_lxcapi_detach_interface()
Christian Brauner [Fri, 23 Feb 2018 13:22:24 +0000 (14:22 +0100)] 
lxccontainer: do_lxcapi_detach_interface()

thread-safety: s/exit()/_exit()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: do_add_remove_node()
Christian Brauner [Fri, 23 Feb 2018 13:21:51 +0000 (14:21 +0100)] 
lxccontainer: do_add_remove_node()

thread-safety: s/exit()/_exit()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: do_lxcapi_clone()
Christian Brauner [Fri, 23 Feb 2018 13:21:14 +0000 (14:21 +0100)] 
lxccontainer: do_lxcapi_clone()

thread-safety: s/exit()/_exit()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: do_lxcapi_get_ips()
Christian Brauner [Fri, 23 Feb 2018 13:20:34 +0000 (14:20 +0100)] 
lxccontainer: do_lxcapi_get_ips()

thread-safety: s/exit/_exit()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: do_lxcapi_get_interfaces()
Christian Brauner [Fri, 23 Feb 2018 13:19:34 +0000 (14:19 +0100)] 
lxccontainer: do_lxcapi_get_interfaces()

thread-safety: s/exit()/_exit/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: do_lxcapi_create()
Christian Brauner [Fri, 23 Feb 2018 13:18:14 +0000 (14:18 +0100)] 
lxccontainer: do_lxcapi_create()

thread-safety: s/exit()/_exit()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxccontainer: do_lxcapi_start()
Christian Brauner [Fri, 23 Feb 2018 12:26:11 +0000 (13:26 +0100)] 
lxccontainer: do_lxcapi_start()

thread-safety: s/exit()/_exit()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocgfsng: fix off-by-one error
Christian Brauner [Thu, 22 Feb 2018 00:28:20 +0000 (01:28 +0100)] 
cgfsng: fix off-by-one error

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoutils: include linux/types.h
Christian Brauner [Wed, 21 Feb 2018 09:13:12 +0000 (10:13 +0100)] 
utils: include linux/types.h

Closes #2178.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoCVE 2018-6556: verify netns fd in lxc-user-nic
Christian Brauner [Wed, 25 Jul 2018 17:56:54 +0000 (19:56 +0200)] 
CVE 2018-6556: verify netns fd in lxc-user-nic

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoutils: add LXC_PROC_PID_FD_LEN
Christian Brauner [Fri, 4 May 2018 09:59:11 +0000 (11:59 +0200)] 
utils: add LXC_PROC_PID_FD_LEN

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #2359 from brauner/2018-05-28/fix_stable-2.0_network_parsing
Stéphane Graber [Tue, 29 May 2018 19:15:21 +0000 (15:15 -0400)] 
Merge pull request #2359 from brauner/2018-05-28/fix_stable-2.0_network_parsing

confile: backport parts of network parsing

7 years agoconfile: backport parts of network parsing 2359/head
Christian Brauner [Mon, 28 May 2018 16:12:07 +0000 (18:12 +0200)] 
confile: backport parts of network parsing

This backports part of our robust network parser.

Closes #2271.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: enable "force" for "cgroup-full"
Christian Brauner [Mon, 19 Feb 2018 11:30:51 +0000 (12:30 +0100)] 
cgfsng: enable "force" for "cgroup-full"

This enables cgroup-full:{mixed,ro,rw}:force and reworks the mount logic.
When cgroup-full was specified we used to bind-mount the cgroups from the host.
That is pretty weird thing to do given that you can simply mount them directly
without going through bind-mounts.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>