Commit Graph

7786 Commits

Author SHA1 Message Date
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
KATOH Yasufumi
a4a0bba4e2 doc: Add -u and -g args to Japanese lxc-attach(1) and lxc-execute(1)
Update for commit ddd51fd and 0840104

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2018-09-27 01:21:41 +09:00
Christian Brauner
a3aba11021
netns_ifaddrs: fix missing include
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-26 18:14:46 +02:00
Stéphane Graber
323a7f1871
Merge pull request #2648 from brauner/2018-09-26/compiler_attributes
compiler: add __hot attribute
2018-09-26 10:44:51 -04:00
Stéphane Graber
6de0734bb1
Merge pull request #2647 from brauner/2018-09-23/noreturn_android
compiler: fix __noreturn on bionic
2018-09-26 10:44:36 -04:00
Christian Brauner
afeec9b739
compiler: add __hot attribute
This instructs the compiler to better optimize the config parsing code.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-26 14:52:27 +02:00
Christian Brauner
d17947f8f3
compiler: fix __noreturn on bionic
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-26 14:38:41 +02:00
Christian Brauner
ebc10afe21
cgfsng: do not go into infinite loop
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-26 14:16:10 +02:00
Christian Brauner
a3650c0c4d
cgfsng: s/25/INTTYPE_TO_STRLEN(pid_t)/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-26 14:13:05 +02:00