]> git.ipfire.org Git - thirdparty/lxc.git/log
thirdparty/lxc.git
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>
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_abort()
Christian Brauner [Sun, 18 Feb 2018 23:18:08 +0000 (00:18 +0100)] 
start: lxc_abort()

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

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

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

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

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

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

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

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

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostart: use correct prefix for includes
Christian Brauner [Sun, 18 Feb 2018 22:39:04 +0000 (23:39 +0100)] 
start: use correct prefix for includes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years ago{commands,start}: remove element from list first
Christian Brauner [Sun, 18 Feb 2018 22:20:05 +0000 (23:20 +0100)] 
{commands,start}: remove element from list first

First remove the client from the list then close the fd. Otherwise we open
ourselves to a race where another codepath might be writing to a bad file
descriptor.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agotree-wide: remove locking around openpty()
Christian Brauner [Sun, 18 Feb 2018 22:10:04 +0000 (23:10 +0100)] 
tree-wide: remove locking around openpty()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agostart: remove duplicate lxc_monitor_send_state()
Christian Brauner [Sun, 18 Feb 2018 21:19:51 +0000 (22:19 +0100)] 
start: remove duplicate lxc_monitor_send_state()

Closes #2177.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agolxccontainer: use wait_for_pid()
Christian Brauner [Sun, 18 Feb 2018 20:43:46 +0000 (21:43 +0100)] 
lxccontainer: use wait_for_pid()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: __cg_legacy_setup_limits()
Christian Brauner [Sat, 17 Feb 2018 18:48:59 +0000 (19:48 +0100)] 
cgfsng: __cg_legacy_setup_limits()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: cg_legacy_set_data()
Christian Brauner [Sat, 17 Feb 2018 18:47:23 +0000 (19:47 +0100)] 
cgfsng: cg_legacy_set_data()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: convert_devpath()
Christian Brauner [Sat, 17 Feb 2018 18:46:44 +0000 (19:46 +0100)] 
cgfsng: convert_devpath()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: cgfsng_set()
Christian Brauner [Sat, 17 Feb 2018 18:45:12 +0000 (19:45 +0100)] 
cgfsng: cgfsng_set()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: cgfsng_get()
Christian Brauner [Sat, 17 Feb 2018 18:44:52 +0000 (19:44 +0100)] 
cgfsng: cgfsng_get()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: cgfsng_attach()
Christian Brauner [Sat, 17 Feb 2018 18:44:21 +0000 (19:44 +0100)] 
cgfsng: cgfsng_attach()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: __cg_unified_attach()
Christian Brauner [Sat, 17 Feb 2018 18:43:46 +0000 (19:43 +0100)] 
cgfsng: __cg_unified_attach()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: build_full_cgpath_from_monitorpath()
Christian Brauner [Sat, 17 Feb 2018 18:42:17 +0000 (19:42 +0100)] 
cgfsng: build_full_cgpath_from_monitorpath()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: cgfsng_escape()
Christian Brauner [Sat, 17 Feb 2018 18:41:04 +0000 (19:41 +0100)] 
cgfsng: cgfsng_escape()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: recursive_count_nrtasks()
Christian Brauner [Sat, 17 Feb 2018 18:40:00 +0000 (19:40 +0100)] 
cgfsng: recursive_count_nrtasks()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: recursive_count_nrtasks()
Christian Brauner [Sat, 17 Feb 2018 18:39:33 +0000 (19:39 +0100)] 
cgfsng: recursive_count_nrtasks()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: cgfsng_mount()
Christian Brauner [Sat, 17 Feb 2018 18:38:59 +0000 (19:38 +0100)] 
cgfsng: cgfsng_mount()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: mount_cgroup_full()
Christian Brauner [Sat, 17 Feb 2018 18:35:03 +0000 (19:35 +0100)] 
cgfsng: mount_cgroup_full()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: cgfsng_chown()
Christian Brauner [Sat, 17 Feb 2018 18:31:16 +0000 (19:31 +0100)] 
cgfsng: cgfsng_chown()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: cgfsng_enter()
Christian Brauner [Sat, 17 Feb 2018 18:29:02 +0000 (19:29 +0100)] 
cgfsng: cgfsng_enter()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: cgfsng_create()
Christian Brauner [Sat, 17 Feb 2018 18:27:52 +0000 (19:27 +0100)] 
cgfsng: cgfsng_create()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: remove_path_for_hierarchy()
Christian Brauner [Sat, 17 Feb 2018 18:26:42 +0000 (19:26 +0100)] 
cgfsng: remove_path_for_hierarchy()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: create_path_for_hierarchy()
Christian Brauner [Sat, 17 Feb 2018 18:25:20 +0000 (19:25 +0100)] 
cgfsng: create_path_for_hierarchy()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: cg_unified_create_cgroup()
Christian Brauner [Sat, 17 Feb 2018 18:24:39 +0000 (19:24 +0100)] 
cgfsng: cg_unified_create_cgroup()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: recursive_destroy()
Christian Brauner [Sat, 17 Feb 2018 18:23:24 +0000 (19:23 +0100)] 
cgfsng: recursive_destroy()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: cgfsng_init()
Christian Brauner [Sat, 17 Feb 2018 18:22:31 +0000 (19:22 +0100)] 
cgfsng: cgfsng_init()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: cg_unified_get_current_cgroup()
Christian Brauner [Sat, 17 Feb 2018 18:21:30 +0000 (19:21 +0100)] 
cgfsng: cg_unified_get_current_cgroup()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: cg_is_pure_unified()
Christian Brauner [Sat, 17 Feb 2018 18:20:54 +0000 (19:20 +0100)] 
cgfsng: cg_is_pure_unified()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: cg_hybrid_init()
Christian Brauner [Sat, 17 Feb 2018 18:20:23 +0000 (19:20 +0100)] 
cgfsng: cg_hybrid_init()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: lxc_cgfsng_print_basecg_debuginfo()
Christian Brauner [Sat, 17 Feb 2018 18:18:08 +0000 (19:18 +0100)] 
cgfsng: lxc_cgfsng_print_basecg_debuginfo()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: lxc_cgfsng_print_hierarchies()
Christian Brauner [Sat, 17 Feb 2018 18:17:43 +0000 (19:17 +0100)] 
cgfsng: lxc_cgfsng_print_hierarchies()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: trim()
Christian Brauner [Sat, 17 Feb 2018 18:16:56 +0000 (19:16 +0100)] 
cgfsng: trim()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: must_append_string()
Christian Brauner [Sat, 17 Feb 2018 18:16:20 +0000 (19:16 +0100)] 
cgfsng: must_append_string()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: cg_hybrid_get_current_cgroup()
Christian Brauner [Sat, 17 Feb 2018 18:15:52 +0000 (19:15 +0100)] 
cgfsng: cg_hybrid_get_current_cgroup()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: controller_in_clist()
Christian Brauner [Sat, 17 Feb 2018 18:15:17 +0000 (19:15 +0100)] 
cgfsng: controller_in_clist()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: copy_to_eol()
Christian Brauner [Sat, 17 Feb 2018 18:14:48 +0000 (19:14 +0100)] 
cgfsng: copy_to_eol()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: cg_hybrid_get_mountpoint()
Christian Brauner [Sat, 17 Feb 2018 18:14:14 +0000 (19:14 +0100)] 
cgfsng: cg_hybrid_get_mountpoint()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: cg_hybrid_get_controllers()
Christian Brauner [Sat, 17 Feb 2018 18:12:51 +0000 (19:12 +0100)] 
cgfsng: cg_hybrid_get_controllers()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: all_controllers_found()
Christian Brauner [Sat, 17 Feb 2018 18:10:49 +0000 (19:10 +0100)] 
cgfsng: all_controllers_found()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: controller_found()
Christian Brauner [Sat, 17 Feb 2018 18:09:50 +0000 (19:09 +0100)] 
cgfsng: controller_found()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: controller_list_is_dup()
Christian Brauner [Sat, 17 Feb 2018 18:09:18 +0000 (19:09 +0100)] 
cgfsng: controller_list_is_dup()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: controller_lists_intersect()
Christian Brauner [Sat, 17 Feb 2018 18:08:38 +0000 (19:08 +0100)] 
cgfsng: controller_lists_intersect()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: cg_legacy_handle_cpuset_hierarchy()
Christian Brauner [Sat, 17 Feb 2018 18:07:56 +0000 (19:07 +0100)] 
cgfsng: cg_legacy_handle_cpuset_hierarchy()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: copy_parent_file()
Christian Brauner [Sat, 17 Feb 2018 18:04:05 +0000 (19:04 +0100)] 
cgfsng: copy_parent_file()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: cg_legacy_filter_and_set_cpus()
Christian Brauner [Sat, 17 Feb 2018 18:00:33 +0000 (19:00 +0100)] 
cgfsng: cg_legacy_filter_and_set_cpus()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: get_max_cpus()
Christian Brauner [Sat, 17 Feb 2018 17:55:15 +0000 (18:55 +0100)] 
cgfsng: get_max_cpus()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: lxc_cpumask_to_cpulist()
Christian Brauner [Sat, 17 Feb 2018 17:54:10 +0000 (18:54 +0100)] 
cgfsng: lxc_cpumask_to_cpulist()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: lxc_cpumask()
Christian Brauner [Sat, 17 Feb 2018 16:16:52 +0000 (17:16 +0100)] 
cgfsng: lxc_cpumask()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: get_hierarchy()
Christian Brauner [Sat, 17 Feb 2018 16:12:30 +0000 (17:12 +0100)] 
cgfsng: get_hierarchy()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: must_append_controller()
Christian Brauner [Sat, 17 Feb 2018 16:11:05 +0000 (17:11 +0100)] 
cgfsng: must_append_controller()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: string_in_list()
Christian Brauner [Sat, 17 Feb 2018 16:09:26 +0000 (17:09 +0100)] 
cgfsng: string_in_list()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: append_null_to_list()
Christian Brauner [Sat, 17 Feb 2018 16:08:58 +0000 (17:08 +0100)] 
cgfsng: append_null_to_list()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: add me to authors
Christian Brauner [Sat, 17 Feb 2018 16:08:06 +0000 (17:08 +0100)] 
cgfsng: add me to authors

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: move cg_legacy_must_prefix_named()
Christian Brauner [Sat, 17 Feb 2018 16:06:56 +0000 (17:06 +0100)] 
cgfsng: move cg_legacy_must_prefix_named()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: cg_legacy_must_prefix_named()
Christian Brauner [Sat, 17 Feb 2018 16:03:38 +0000 (17:03 +0100)] 
cgfsng: cg_legacy_must_prefix_named()

s/must_prefix_named/cg_legacy_must_prefix_named/

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: free_string_list()
Christian Brauner [Sat, 17 Feb 2018 15:51:03 +0000 (16:51 +0100)] 
cgfsng: free_string_list()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: fully document remaining variables
Christian Brauner [Sat, 17 Feb 2018 15:48:08 +0000 (16:48 +0100)] 
cgfsng: fully document remaining variables

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: fully document struct cgfsng_handler_data
Christian Brauner [Sat, 17 Feb 2018 15:45:01 +0000 (16:45 +0100)] 
cgfsng: fully document struct cgfsng_handler_data

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: fully document struct hierarchy
Christian Brauner [Sat, 17 Feb 2018 15:37:35 +0000 (16:37 +0100)] 
cgfsng: fully document struct hierarchy

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agocgfsng: order includes
Christian Brauner [Sat, 17 Feb 2018 15:32:16 +0000 (16:32 +0100)] 
cgfsng: order includes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoconfile: add "force" to cgroup:{mixed,ro,rw}
Shukui Yang [Fri, 16 Feb 2018 04:16:40 +0000 (23:16 -0500)] 
confile: add "force" to cgroup:{mixed,ro,rw}

This lets users specify

        lxc.mount.auto = cgroup:mixed:force
or
        lxc.mount.auto = cgroup:ro:force
or
        lxc.mount.auto = cgroup:rw:force

When cgroup namespaces are supported LXC will not mount cgroups for the
container since it assumes that the init system will mount cgroups itself if it
wants to. This assumption already broke when users wanted to run containers
without CAP_SYS_ADMIN. For example, systemd based containers wouldn't start
since systemd needs to mount cgroups (named systemd hierarchy for legacy
cgroups and the unified hierarchy for unified cgroups) to track processes. This
problem was solved by detecting whether the container had CAP_SYS_ADMIN. If it
didn't we performed the cgroup mounts for it.
However, there are more cases when we should be able to mount cgroups for the
container when cgroup namespaces are supported:
- init systems not mounting cgroups themselves:
  A init system that doesn't mount cgroups would not have cgroups available
  especially when combined with custom LSM profiles to prevent cgroup
  {u}mount()ing inside containers.
- application containers:
  Application containers will usually not mount by cgroups themselves.
- read-only cgroups:
  It is useful to be able to mount cgroups read-only to e.g. prevent
  changing cgroup limits from inside the container while at the same time
  allowing the applications to perform introspection on their own cgroups. This
  again is mostly useful for application containers. System containers running
  systemd will usually not work correctly when cgroups are mounted read-only.
To be fair, all of those use-cases could be covered by custom hooks or
lxc.mount.entry entries but exposing it through lxc.mount.auto takes care of
setting correct mount options and adding the necessary logic to e.g. mount
filesystem read-only correctly.

Currently we only extend this to cgroup:{mixed,ro,rw} but technically there's
no reason not to enable the same behavior for cgroup-full:{mixed,ro,rw} as
well. If someone requests this we can simply treat it as a bug and add "force"
for cgroup-full.

Replaces #2136.

Signed-off-by: Shukui Yang <yangshukui@huawei.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 years agoREADME: add coverity
Christian Brauner [Sat, 17 Feb 2018 12:07:14 +0000 (13:07 +0100)] 
README: add coverity

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