Commit Graph

7844 Commits

Author SHA1 Message Date
Christian Brauner
e8f764b6bc
syscall_wrappers: move unshare()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-03 13:03:30 +02:00
Christian Brauner
364932cfae
syscall_wrappers: move sethostname()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-03 13:00:21 +02:00
Christian Brauner
59524108dd
syscall_wrappers: move setns()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-03 12:57:32 +02:00
Christian Brauner
6a886ddf19
syscall_wrappers: move memfd_create()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-03 12:49:46 +02:00
Christian Brauner
ef18536050
cgfsng: handle v1 cpuset hierarchy first
If the value of cgroup.clone_children in our immediate ancestor cgroup
is 0 then the cpuset of any cgroups we create in subtrees will be empty
and hence we'll copy an empty cpuset at which point we cannot enter the
cpuset cgroup.
Avoid this problem by initializing cgroup.clone_children to 1 an copying
the initialized cpuset of our immediate ancestor. Note, that the cpuset
of our immediate ancestor must be initialized and ours as well otherwise
we couldn't be located in this cgroup.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-03 12:29:20 +02:00
Christian Brauner
6099dd5a13
Revert "Revert "cgfsng: avoid tiny race window""
This reverts commit c5e7a7acbf.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-03 12:29:20 +02:00
Stéphane Graber
c5e7a7acbf
Revert "cgfsng: avoid tiny race window"
This reverts commit 17e5599174.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-10-02 18:02:41 -04:00
Stéphane Graber
a153a470b3
Merge pull request #2669 from brauner/2018-10-02/bugfixes
utils: fix lxc_set_death_signal()
2018-10-02 15:28:24 -04:00
Christian Brauner
c7f493aee0
utils: fix lxc_set_death_signal()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-02 21:00:59 +02:00
Stéphane Graber
54b38b25b1
Merge pull request #2668 from brauner/2018-10-02/cgroups_monitor_fixes
cgfsng: do not reuse another monitor's cgroup
2018-10-02 14:40:55 -04:00
Christian Brauner
17e5599174
cgfsng: avoid tiny race window
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-02 20:24:37 +02:00
Christian Brauner
ee455be41c
cgfsng: do not reuse another monitor's cgroup
Otherwise we will create a race.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-02 17:28:30 +02:00
Stéphane Graber
7040a77e8f
Merge pull request #2667 from brauner/2018-10-02/prefault_mmaped_config_file
parse: prefault config file with MAP_POPULATE
2018-10-02 11:28:28 -04:00
Christian Brauner
2291ea4a1a
parse: prefault config file with MAP_POPULATE
When we call lxc_file_for_each_line_mmap() we will always parse the
whole config file. Prefault it in case it is really long to optimize
performance.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-02 16:40:13 +02:00
Christian Brauner
907e133201
Merge pull request #2666 from 2xsec/bugfix
cgroups: remove unnecessary line
2018-10-02 12:50:51 +02:00
2xsec
c3d9796f1f
netns_iaddrs: remove unused functions
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-10-02 18:55:33 +09:00
2xsec
99bb3fa8e8
cgroups: remove unnecessary line
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-10-02 18:49:16 +09:00
Stéphane Graber
74d9689329
Merge pull request #2664 from brauner/2018-09-30/syscall_wrappers
syscalls: add wrappers and explicit raw syscalls
2018-09-30 17:02:55 -04:00
Stéphane Graber
6810d9018d
Merge pull request #2665 from brauner/2018-09-30/netns_ifaddrs
netns_ifaddrs: only use struct rtnl_link_stats64
2018-09-30 17:01:08 -04:00
Christian Brauner
3ccf815f79
netns_ifaddrs: only use struct rtnl_link_stats64
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-30 20:58:06 +02:00
Christian Brauner
1f797c3a64
tests: add missing build dependencies
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-30 20:30:08 +02:00
Christian Brauner
49182c3280
autotools: fix lxc-usernsexec build
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-30 20:20:16 +02:00
Christian Brauner
47d720d13e
autotools: fix lxc-user-nic build
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-30 20:20:16 +02:00
Christian Brauner
253c403df5
autotools: fix lxc-monitord build
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-30 20:20:16 +02:00
Christian Brauner
2fe8b2a063
autotools: fix lxc init build
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-30 20:20:16 +02:00
Christian Brauner
d7b58715b6
raw_syscalls: add lxc_raw_getpid()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-30 20:20:16 +02:00
Christian Brauner
38e5c2dbba
raw_syscalls: add lxc_raw_clone{_cb}()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-30 20:20:14 +02:00
Stéphane Graber
97358bb2bf
Merge pull request #2663 from brauner/2018-09-30/netns_ifaddrs
netns_ifaddrs: handle IFLA_STATS{64} correctly
2018-09-30 14:01:06 -04:00
Christian Brauner
13be27338c
raw_syscalls: add lxc_raw_execveat()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-30 19:40:51 +02:00
Christian Brauner
6b3d24d716
syscall_wrappers: add pivot_root()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-30 12:50:23 +02:00
Christian Brauner
da5efb6f76
netns_ifaddrs: handle IFLA_STATS{64} correctly
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-30 12:29:19 +02:00
Stéphane Graber
2a2d77c356
Merge pull request #2661 from brauner/2018-09-28/relro_bind_now
autotools: support -z relro and -z now
2018-09-29 01:15:11 +02:00
Christian Brauner
e6fe24e134
autotools: support -z relro and -z now
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-28 22:58:20 +02:00
Stéphane Graber
14c31772d0
Merge pull request #2658 from brauner/2018-09-28/keyctl
utils: add lxc_setup_keyring()
2018-09-28 14:13:47 +02:00
Christian Brauner
b25291da14
utils: add lxc_setup_keyring()
Allocate a new keyring if we can to prevent information leak.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-28 13:41:14 +02:00
Christian Brauner
c73fbad129
configure: fix -Wimplicit-fallthrough check
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-28 13:41:14 +02:00
Stéphane Graber
af2c0fa7b1
Merge pull request #2657 from ssup2/master
oci-template: Add logic for no /etc/passwd, group
2018-09-28 12:32:02 +02:00
Jungsub Shin
a2ade420c0 oci-template: Add logic for no /etc/passwd, group
OCI image spec dosen't specify action when there is
no /etc/passwd or /etc/group. So if there is no
/etc/passwd with string user info, set uid to 0. If there
is no /etc/group with string group info, set gid to 0.

Signed-off-by: Jungsub Shin jungsub_shin@tmax.co.kr
2018-09-28 19:24:09 +09:00
Stéphane Graber
46706d0b67
Merge pull request #2656 from brauner/2018-09-28/fix_btrfs_regression
btrfs: fix btrfs containers
2018-09-28 12:13:39 +02:00
Christian Brauner
37aa48515b
btrfs: fix btrfs containers
Closes #2612.
Closes #2655.

Fixes: 9de31d5a13 ("tree-wide: s/strncpy()/strlcpy()/g")
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-28 11:27:28 +02:00
Stéphane Graber
56e28f9258
Merge pull request #2629 from ssup2/master
template: oci template supports for char user info
2018-09-28 10:35:51 +02:00
Jungsub Shin
b8cfbbd140 template: oci template supports for char user info
oci template changes character user info to uid, gid
according to OCI image spec.

Signed-off-by: Jungsub Shin jungsub_shin@tmax.co.kr
2018-09-28 10:14:06 +09:00
Stéphane Graber
2b35fa3003
Merge pull request #2653 from brauner/2018-09-27/minor_tweaks
cgroups: tweaks
2018-09-27 14:30:57 +02:00
Christian Brauner
4394ea17cb
cgroup: make monitor_pattern const
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-27 13:36:17 +02:00
Christian Brauner
529822a46f
cgfsng: log cgroup names for monitor and container
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-27 13:35:34 +02:00
Wolfgang Bumiller
adaeef1fcc
Merge pull request #2643 from brauner/2018-09-23/cgroup_scoping_fixes
cgroups: implement monitor cgroup deletion
2018-09-27 13:12:56 +02:00
Stéphane Graber
537eba4c30
Merge pull request #2652 from brauner/lxc/master
tree-wide: fix includes to fix bionic builds
2018-09-27 03:51:48 -04:00
Christian Brauner
d38dd64a51
tree-wide: fix includes to fix bionic builds
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-27 01:01:33 +02:00
Stéphane Graber
55ac911a51
Merge pull request #2649 from brauner/lxc/master
netns_ifaddrs: fix missing include
2018-09-26 13:17:19 -04:00
Christian Brauner
4e79fc5a73
Merge pull request #2650 from tenforward/japanese
doc: Add -u and -g args to Japanese lxc-attach(1) and lxc-execute(1)
2018-09-26 18:30:31 +02:00