Commit Graph

7805 Commits

Author SHA1 Message Date
2xsec
737f5220a2 doc: Add -u and -g args to Korean lxc-attach(1) and lxc-execute(1)
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-10-07 17:37:43 +09:00
2xsec
ec4f666f23 doc: fix indent
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-10-07 17:00:50 +09:00
Christian Brauner
8b013632c6
Merge pull request #2672 from 2xsec/bugfix
remove unused argument
2018-10-06 15:30:12 +02:00
Christian Brauner
13c45a4a9d
Merge pull request #2673 from Blub/2018-10-06/cgfsng-alloc-cleanup
cgfsng: use realloc instead of malloc+copy+free
2018-10-06 12:58:43 +02:00
Wolfgang Bumiller
5407d095e6 cgfsng: use realloc instead of malloc+copy+free
Signed-off-by: Wolfgang Bumiller <w.bumiller@errno.eu>
2018-10-06 11:12:08 +02:00
2xsec
70e72c5627
tools: lxc-unshare: remove unnecessary initialization
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-10-05 11:08:41 +09:00
2xsec
720132e13e
tools: lxc-start: remove unused argument
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-10-05 11:07:02 +09:00
Wolfgang Bumiller
0a886c56a7
Merge pull request #2671 from brauner/2018-10-03/syscall_wrappers
syscalls: move wrappers and raw syscalls to appropriate files
2018-10-03 14:13:57 +02:00
Wolfgang Bumiller
15418afe93
Merge pull request #2670 from brauner/2018-10-03/cgfsng_fix_race
cgfsng: close tiny race window
2018-10-03 14:11:57 +02:00
Christian Brauner
07a50156ed
raw_syscalls: move lxc_raw_gettid()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-03 13:10:55 +02:00
Christian Brauner
303037d2f6
syscall_wrappers: move signalfd()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-03 13:08:51 +02:00
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