Stéphane Graber
d4feae43a6
Merge pull request #2192 from brauner/2018-02-26/enable_pam_flag
...
configure: add --enable-pam
2018-02-26 12:11:13 -05:00
Stéphane Graber
378ad0a07b
Merge pull request #2190 from brauner/2018-02-16/lxc_local_template
...
templates: add lxc-local template
2018-02-26 11:38:13 -05:00
Christian Brauner
f7a8609fab
configure: add --enable-pam
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-26 17:27:46 +01:00
Christian Brauner
35444f3827
templates: add lxc-local template
...
Closes #2184 .
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-26 17:22:48 +01:00
Christian Brauner
fbbe5ff5b2
lxc-oci: remove executable bit
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-26 17:04:55 +01:00
Christian Brauner
7ac43d3d21
Revert "Revert "pam: create writable cgroups for unpriv users""
...
This reverts commit 79cf25e826
.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-26 17:01:18 +01:00
Stéphane Graber
e72d2f5a81
Merge pull request #2191 from brauner/2018-02-16/fix_snapshot_segfault
...
lxc-snapshot: fix segfault
2018-02-26 10:35:22 -05:00
Stéphane Graber
d5bd4f0a1b
Merge pull request #2189 from brauner/2018-02-16/remove_needless_locking
...
commands: remove mutex from state client list
2018-02-26 10:34:56 -05:00
Stéphane Graber
521c807906
Merge pull request #2188 from brauner/2018-02-16/coding_style
...
CODING_STYLE: add section about _exit()
2018-02-26 10:33:28 -05:00
Christian Brauner
07d7dc9438
lxc-snapshot: fix segfault
...
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1751780
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-26 15:30:56 +01:00
Christian Brauner
44dec7efcc
parse: error out on invalid config key
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-26 14:03:00 +01:00
Christian Brauner
328a3f0f8b
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>
2018-02-26 11:43:42 +01:00
Christian Brauner
4ad78f87c7
CODING_STYLE: add section about _exit()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-26 11:21:51 +01:00
Stéphane Graber
69556eaf83
Merge pull request #2187 from itoffshore/alpine
...
fix download template for /tmp as tmpfs or noexec
2018-02-25 17:17:19 -05:00
Stuart Cardall
edb5452cec
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>
2018-02-25 21:40:16 +00:00
Stéphane Graber
c8a5adcdef
Merge pull request #2186 from brauner/2018-02-22/make_confile_reading_thread_safe
...
tree-wide: thread-safety improvements
2018-02-25 11:40:57 -05:00
Christian Brauner
106f1f38ef
cgfsng: fix get_hierarchy() for unified hierarchy
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:44 +01:00
Christian Brauner
7211378b1f
criu: du_dump()
...
thread-safety: s/exit()/_exit()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:43 +01:00
Christian Brauner
5a24adb870
criu: do_restore()
...
thread-safety: s/exit()/_exit()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:42 +01:00
Christian Brauner
665bb114c4
criu: criu_version_ok()
...
thread-safety: s/exit()/_exit()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:41 +01:00
Christian Brauner
4f43526d74
criu: __criu_check_feature()
...
thread-safety: s/exit()/_exit()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:39 +01:00
Christian Brauner
dfa7eaeb21
lxccontainer: create_container_dir()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:38 +01:00
Christian Brauner
78d44e5af5
lxccontainer: do_create_container_dir()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:37 +01:00
Christian Brauner
9f52e3317d
lxccontainer: lxcapi_startl()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:36 +01:00
Christian Brauner
0c14779f09
lxccontainer: lxcapi_start()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:35 +01:00
Christian Brauner
702bf732f8
lxccontainer: free_init_cmd()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:33 +01:00
Christian Brauner
75bd13abd3
lxccontainer: split_init_cmd()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:32 +01:00
Christian Brauner
1452d3fe06
lxccontainer: push_arg()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:31 +01:00
Christian Brauner
6b0297e327
lxccontainer: am_single_threaded()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:30 +01:00
Christian Brauner
e202dfb821
lxccontainer: do_lxcapi_wait()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:29 +01:00
Christian Brauner
871ed23baa
lxccontainer: do_lxcapi_want_close_all_fds()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:27 +01:00
Christian Brauner
fb5999f65f
lxccontainer: do_lxcapi_want_daemonize()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:26 +01:00
Christian Brauner
d03ab308a7
lxccontainer: do_lxcapi_load_config()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:25 +01:00
Christian Brauner
e3246ab9c8
lxccontainer: load_config_locked()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:24 +01:00
Christian Brauner
49cfedb329
lxccontainer: lxcapi_console()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:23 +01:00
Christian Brauner
37dce81753
lxccontainer: do_lxcapi_console_getfd()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:22 +01:00
Christian Brauner
8e59e0bab2
lxccontainer: do_lxcapi_unfreeze()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:20 +01:00
Christian Brauner
8787b387db
lxccontainer: do_lxcapi_freeze()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:19 +01:00
Christian Brauner
1b61062fa7
lxccontainer: do_lxcapi_is_running()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:18 +01:00
Christian Brauner
5bddcb62d2
lxccontainer: is_stopped()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:17 +01:00
Christian Brauner
b547d79fb9
lxccontainer: do_lxcapi_state()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:14 +01:00
Christian Brauner
428ad142f2
lxccontainer: do_lxcapi_is_defined()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:13 +01:00
Christian Brauner
045552aabe
lxccontainer: lxc_container_{get,put}()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:11 +01:00
Christian Brauner
70849dc234
lxccontainer: lxc_container_free()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:10 +01:00
Christian Brauner
a3740e805a
lxccontainer: create_partial()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:09 +01:00
Christian Brauner
f5cd0252f7
lxccontainer: create_partial()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:07 +01:00
Christian Brauner
444249ea2f
lxccontainer: ongoing_create()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:06 +01:00
Christian Brauner
ef1ab8f10d
lxccontainer: config_file_exists()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:05 +01:00
Christian Brauner
238b3e5ea4
lxccontainer: move macros to utils.h
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-02-24 21:38:03 +01:00
Christian Brauner
0e1a60b0fb
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>
2018-02-24 21:38:02 +01:00