]> git.ipfire.org Git - thirdparty/lxc.git/log
thirdparty/lxc.git
7 years agoconfile: add lxc.console.size
Christian Brauner [Thu, 15 Feb 2018 10:27:56 +0000 (11:27 +0100)] 
confile: add lxc.console.size

lxc.console.size regulates the size of the console log file. This is intended
to replace lxc.console.buffer.logfile. The current semantics are:

- if lxc.console.size is not set:
  - no limit is placed on the size of the log file
- if lxc.console.size is set:
  - if lxc.console.rotate is set and the next write would exceed the limit:
    - write as much as possible into the old log file
    - rotate the log file
    - write as much as posible into the new log file
    - discard remaining bytes (scenario shouldn't be possible in normal
      circumstances)
  - if lxc.console.rotate is not set and the next write would exceed the limit:
    - keep overwriting the current log file

To make the log file a mirror of the in-memory ringbuffer simply set:
lxc.console.buffer.size == lxc.console.size.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agolibpam: Drop mention to non-existing macro.h
Stéphane Graber [Mon, 26 Feb 2018 18:22:02 +0000 (13:22 -0500)] 
libpam: Drop mention to non-existing macro.h

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
7 years agoMerge pull request #2192 from brauner/2018-02-26/enable_pam_flag
Stéphane Graber [Mon, 26 Feb 2018 17:11:13 +0000 (12:11 -0500)] 
Merge pull request #2192 from brauner/2018-02-26/enable_pam_flag

configure: add --enable-pam

7 years agoMerge pull request #2190 from brauner/2018-02-16/lxc_local_template
Stéphane Graber [Mon, 26 Feb 2018 16:38:13 +0000 (11:38 -0500)] 
Merge pull request #2190 from brauner/2018-02-16/lxc_local_template

templates: add lxc-local template

7 years agoconfigure: add --enable-pam 2192/head
Christian Brauner [Mon, 26 Feb 2018 15:57:03 +0000 (16:57 +0100)] 
configure: add --enable-pam

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agotemplates: add lxc-local template 2190/head
Christian Brauner [Mon, 26 Feb 2018 11:49:10 +0000 (12:49 +0100)] 
templates: add lxc-local template

Closes #2184.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agolxc-oci: remove executable bit
Christian Brauner [Mon, 26 Feb 2018 11:48:08 +0000 (12:48 +0100)] 
lxc-oci: remove executable bit

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoRevert "Revert "pam: create writable cgroups for unpriv users""
Christian Brauner [Mon, 26 Feb 2018 15:54:57 +0000 (16:54 +0100)] 
Revert "Revert "pam: create writable cgroups for unpriv users""

This reverts commit 79cf25e826509e61cdda4c47d5aeb0e222439970.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #2191 from brauner/2018-02-16/fix_snapshot_segfault
Stéphane Graber [Mon, 26 Feb 2018 15:35:22 +0000 (10:35 -0500)] 
Merge pull request #2191 from brauner/2018-02-16/fix_snapshot_segfault

lxc-snapshot: fix segfault

7 years agoMerge pull request #2189 from brauner/2018-02-16/remove_needless_locking
Stéphane Graber [Mon, 26 Feb 2018 15:34:56 +0000 (10:34 -0500)] 
Merge pull request #2189 from brauner/2018-02-16/remove_needless_locking

commands: remove mutex from state client list

7 years agoMerge pull request #2188 from brauner/2018-02-16/coding_style
Stéphane Graber [Mon, 26 Feb 2018 15:33:28 +0000 (10:33 -0500)] 
Merge pull request #2188 from brauner/2018-02-16/coding_style

CODING_STYLE: add section about _exit()

7 years agolxc-snapshot: fix segfault 2191/head
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>
7 years agoparse: error out on invalid config key 2188/head
Christian Brauner [Mon, 26 Feb 2018 13:03:00 +0000 (14:03 +0100)] 
parse: error out on invalid config key

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocommands: remove mutex from state client list 2189/head
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>
7 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>
7 years agoMerge pull request #2187 from itoffshore/alpine
Stéphane Graber [Sun, 25 Feb 2018 22:17:19 +0000 (17:17 -0500)] 
Merge pull request #2187 from itoffshore/alpine

fix download template for /tmp as tmpfs or noexec

7 years agofix download template for /tmp as tmpfs or noexec 2187/head
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>
7 years agoMerge pull request #2186 from brauner/2018-02-22/make_confile_reading_thread_safe
Stéphane Graber [Sun, 25 Feb 2018 16:40:57 +0000 (11:40 -0500)] 
Merge pull request #2186 from brauner/2018-02-22/make_confile_reading_thread_safe

tree-wide: thread-safety improvements

7 years agocgfsng: fix get_hierarchy() for unified hierarchy 2186/head
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>
7 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>
7 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>
7 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>
7 years agocriu: __criu_check_feature()
Christian Brauner [Sat, 24 Feb 2018 19:11:04 +0000 (20:11 +0100)] 
criu: __criu_check_feature()

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

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 years agolxccontainer: move macros to utils.h
Christian Brauner [Sat, 24 Feb 2018 14:04:40 +0000 (15:04 +0100)] 
lxccontainer: move macros to utils.h

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agolxccontainer: do_lxcapi_save_config()
Christian Brauner [Fri, 23 Feb 2018 14:43:50 +0000 (15:43 +0100)] 
lxccontainer: do_lxcapi_save_config()

If liblxc is used multi-threaded do_lxcapi_save_config() could be called from
threads that fork() which to not risk ending up with invalid locking states we
should avoid using functions like fopen() that internally allocate memory and
use locking. Let's replace it with the async-signal safe combination of
open() + write().

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 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>
7 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>
7 years agonetwork: lxc_netdev_move_wlan()
Christian Brauner [Fri, 23 Feb 2018 13:35:25 +0000 (14:35 +0100)] 
network: lxc_netdev_move_wlan()

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

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

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

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 years agolxccontainer: non-functional changes
Christian Brauner [Fri, 23 Feb 2018 13:12:47 +0000 (14:12 +0100)] 
lxccontainer: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agolxccontainer: non-functional changes
Christian Brauner [Fri, 23 Feb 2018 12:59:16 +0000 (13:59 +0100)] 
lxccontainer: non-functional changes

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

thread_safety: s/exit()/_exit()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 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>
7 years agoconfile: use mmap() to parse config file
Christian Brauner [Fri, 23 Feb 2018 12:24:35 +0000 (13:24 +0100)] 
confile: use mmap() to parse config file

Sigh, this is going to be fun. Essentially, dynamic memory allocation through
malloc() and friends is unsafe when fork()ing in threads. The locking state
that glibc maintains internally might get messed up when the process that
fork()ed calls malloc or calls functions that malloc() internally. Functions
that internally malloc() include fopen(). One solution here is to use open() +
mmap() instead of fopen() + getline().

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #2182 from tenforward/japanese
Christian Brauner [Thu, 22 Feb 2018 10:06:34 +0000 (11:06 +0100)] 
Merge pull request #2182 from tenforward/japanese

doc: Add cgroup-full:*:force to Japanese lxc.container.conf(5)

7 years agodoc: Add cgroup-full:*:force to Japanese lxc.container.conf(5) 2182/head
KATOH Yasufumi [Thu, 22 Feb 2018 04:54:03 +0000 (13:54 +0900)] 
doc: Add cgroup-full:*:force to Japanese lxc.container.conf(5)

Update for commit e7806b2

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
7 years agoMerge pull request #2181 from brauner/2018-02-22/fix_root_owned_unprivileged_containers
Stéphane Graber [Thu, 22 Feb 2018 00:38:25 +0000 (19:38 -0500)] 
Merge pull request #2181 from brauner/2018-02-22/fix_root_owned_unprivileged_containers

cgfsng: fix off-by-one error

7 years agocgfsng: fix off-by-one error 2181/head
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>
7 years agoRevert "pam: create writable cgroups for unpriv users"
Stéphane Graber [Wed, 21 Feb 2018 22:25:58 +0000 (17:25 -0500)] 
Revert "pam: create writable cgroups for unpriv users"

This reverts commit 799566212468620fd0de3796c82447f002844419.

Before we can merge something like this we need to have it be behind a
configure flag and quite probably be an opt-in feature (--enable-pam).

This should fix Jenkins, PPA builds and the current binary conflicts
between the lxcfs and lxc package builds (snap and archive).

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
7 years agoMerge pull request #2148 from brauner/2018-02-09/move_pam_module_to_liblxc
Serge Hallyn [Wed, 21 Feb 2018 19:27:59 +0000 (13:27 -0600)] 
Merge pull request #2148 from brauner/2018-02-09/move_pam_module_to_liblxc

pam: create writable cgroups for unpriv users

7 years agoMerge pull request #2179 from brauner/2018-02-21/docs_add_cgroup_full_force
Stéphane Graber [Wed, 21 Feb 2018 17:23:14 +0000 (12:23 -0500)] 
Merge pull request #2179 from brauner/2018-02-21/docs_add_cgroup_full_force

doc: document cgroup-full:{mixed,ro,rw}:force

7 years agoMerge pull request #2180 from tenforward/japanese
Christian Brauner [Wed, 21 Feb 2018 11:22:58 +0000 (12:22 +0100)] 
Merge pull request #2180 from tenforward/japanese

Update Japanese lxc.container.conf(5)

7 years agodoc: Improve Japanese translation in lxc.container.conf(5) 2180/head
KATOH Yasufumi [Wed, 21 Feb 2018 11:17:15 +0000 (20:17 +0900)] 
doc: Improve Japanese translation in lxc.container.conf(5)

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
7 years agodoc: add "force" option of lxc.mount.auto to Japanese lxc.container.conf(5)
KATOH Yasufumi [Wed, 21 Feb 2018 11:12:59 +0000 (20:12 +0900)] 
doc: add "force" option of lxc.mount.auto to Japanese lxc.container.conf(5)

Update for commit 3f69fb1, and and reduce commentnized English line.

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
7 years agodoc: Add the describe of mount propagation to Japanese lxc.container.conf(5)
KATOH Yasufumi [Wed, 21 Feb 2018 10:36:03 +0000 (19:36 +0900)] 
doc: Add the describe of mount propagation to Japanese lxc.container.conf(5)

Update for commit d840039

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
7 years agodoc: Add lxc.namespace.{clone,keep} to Japanese lxc.container.conf(5)
KATOH Yasufumi [Wed, 21 Feb 2018 10:27:28 +0000 (19:27 +0900)] 
doc: Add lxc.namespace.{clone,keep} to Japanese lxc.container.conf(5)

Update for commit 46186ac

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
7 years agodoc: Update to lxc.namespace.share.* in Japanese lxc.container.conf(5)
KATOH Yasufumi [Wed, 21 Feb 2018 09:37:33 +0000 (18:37 +0900)] 
doc: Update to lxc.namespace.share.* in Japanese lxc.container.conf(5)

change from lxc.namespace.* to lxc.namespace.share.*.
Update for commit b074bbf

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
7 years agodoc: add lxc.cgroup2.* to Japanese lxc.container.conf(5)
KATOH Yasufumi [Wed, 21 Feb 2018 09:34:23 +0000 (18:34 +0900)] 
doc: add lxc.cgroup2.* to Japanese lxc.container.conf(5)

Update for commit 54860ed

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
7 years agoutils: include linux/types.h 2179/head
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 agodoc: document cgroup-full:{mixed,ro,rw}:force
Christian Brauner [Wed, 21 Feb 2018 09:06:56 +0000 (10:06 +0100)] 
doc: document cgroup-full:{mixed,ro,rw}:force

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoMerge pull request #2175 from brauner/2018-02-17/coding_style_fixes
Serge Hallyn [Mon, 19 Feb 2018 18:15:36 +0000 (12:15 -0600)] 
Merge pull request #2175 from brauner/2018-02-17/coding_style_fixes

tree-wide: coding style + fixes

7 years agocgroups: remove cgroup_create_legacy() 2175/head
Christian Brauner [Mon, 19 Feb 2018 11:56:40 +0000 (12:56 +0100)] 
cgroups: remove cgroup_create_legacy()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgroups: implement "driver" and "driver_version"
Christian Brauner [Mon, 19 Feb 2018 11:50:21 +0000 (12:50 +0100)] 
cgroups: implement "driver" and "driver_version"

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgroups: remove legacy cgfs cgroup driver
Christian Brauner [Mon, 19 Feb 2018 11:33:41 +0000 (12:33 +0100)] 
cgroups: remove legacy cgfs cgroup driver

The time has come to remove the cgfs cgroup driver as well. I'm doing this for
mainly two reasons:
- potential security issue:
  The cgfs cgroup driver has been unmaintained for a long time now. It did not
  receive new functionality apart from bugfixes. Now that cgroup2 is a thing
  the internal logic how to deal with cgroups has been substantially reworked
  for the cgfsng driver. Given that we won't do the same work for the cgfs
  driver I smell bugs all over the place in the near future. I don't want to
  wake up to a security issue where someone forces LXC to fallback to the cgfs
  driver to exploit bugs when e.g. running in a pure unified cgroup layout.
- code complexity:
  The cgfs cgroup driver is massively complex since it tried to figure out
  where the mountpoint for each legacy cgroup hierarchy is, i.e. it didn't make
  simplyfing assumptions like cgfsng does about where the cgroup hierarchies -
  legacy or unified - would be mounted. This was appropriate before cgroup
  mounting has been standardized. Nowadays, anyone who mounts cgroups not under
  /sys/fs/cgroup is on their own. Furthermore, with unified hierarchy cgroup
  layouts there will only be a single hierarchy mounted at /sys/fs/cgroup so
  there's even less need to drag the complex parsing in cgfs into the future.

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>
7 years agostart: cleanup namespace handling
Christian Brauner [Mon, 19 Feb 2018 10:52:00 +0000 (11:52 +0100)] 
start: cleanup namespace handling

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoutils: add lxc_set_death_signal()
Christian Brauner [Mon, 19 Feb 2018 09:58:56 +0000 (10:58 +0100)] 
utils: add lxc_set_death_signal()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostart: non-functional changes
Christian Brauner [Mon, 19 Feb 2018 09:23:08 +0000 (10:23 +0100)] 
start: non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostart: do_destroy_container()
Christian Brauner [Sun, 18 Feb 2018 23:49:47 +0000 (00:49 +0100)] 
start: do_destroy_container()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostart: lxc_destroy_container_on_signal()
Christian Brauner [Sun, 18 Feb 2018 23:49:29 +0000 (00:49 +0100)] 
start: lxc_destroy_container_on_signal()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostart: post_start()
Christian Brauner [Sun, 18 Feb 2018 23:48:03 +0000 (00:48 +0100)] 
start: post_start()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostart: start()
Christian Brauner [Sun, 18 Feb 2018 23:47:46 +0000 (00:47 +0100)] 
start: start()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostart: lxc_start()
Christian Brauner [Sun, 18 Feb 2018 23:45:56 +0000 (00:45 +0100)] 
start: lxc_start()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostart: lxc_spawn()
Christian Brauner [Sun, 18 Feb 2018 23:37:27 +0000 (00:37 +0100)] 
start: lxc_spawn()

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