Commit Graph

7308 Commits

Author SHA1 Message Date
Liza Tretyakova
29df56cda5
lxccontainer: add container API function and structs for injecting a mount
Signed-off-by: Liza Tretyakova <elizabet.tretyakova@gmail.com>
2018-07-22 15:25:16 +02:00
Liza Tretyakova
4d6cc24cbe
start: add shmount setup on container start
Signed-off-by: Liza Tretyakova <elizabet.tretyakova@gmail.com>
2018-07-22 15:25:16 +02:00
Liza Tretyakova
f6310f1844
utils: add shared mount point detection
Signed-off-by: Liza Tretyakova <elizabet.tretyakova@gmail.com>
2018-07-22 15:25:15 +02:00
Liza Tretyakova
0d190408c2
conf, confile: add parsing of a shmounts config parameter
Signed-off-by: Liza Tretyakova <elizabet.tretyakova@gmail.com>
2018-07-22 15:25:15 +02:00
Liza Tretyakova
adf0ba1fc7
conf, confile: introduce basic structs for shared mount point
Signed-off-by: Liza Tretyakova <elizabet.tretyakova@gmail.com>
2018-07-22 15:25:13 +02:00
Christian Brauner
a633a1edf1
Merge pull request #2488 from 2xsec/bugfix
docs: tools: -d/--daemonize for lxc-execute
2018-07-22 07:59:56 +02:00
2xsec
b571ff38da docs: tools: -d/--daemonize for lxc-execute
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-22 13:26:52 +09:00
Christian Brauner
97e567989f
Merge pull request #2486 from 2xsec/bugfix
thread safe: rand() => rand_r()
2018-07-21 16:46:40 +02:00
2xsec
18d4ffded4 coverity: #1438067
Explicit null dereferenced

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-21 22:47:08 +09:00
2xsec
280cc35f08 thread safe: rand() => rand_r()
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-21 22:27:30 +09:00
Christian Brauner
9005b20d02
Merge pull request #2484 from 2xsec/bugfix
attach: fix return value & cleanups
2018-07-21 12:09:37 +02:00
2xsec
21d0acc2a5 attach: move errno handling
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-21 18:17:18 +09:00
Christian Brauner
8e12a6913b
Merge pull request #2485 from 2xsec/docs
docs: add long options of lxc-unshare
2018-07-21 10:43:18 +02:00
2xsec
ca5a12bb4d docs: add long options of lxc-unshare
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-21 16:48:29 +09:00
2xsec
ea918412a7 attach: fix return value & cleanups
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-21 16:04:01 +09:00
Christian Brauner
010a85d171
Merge pull request #2482 from 2xsec/bugfix
error handling cleanups #2471
2018-07-21 06:50:39 +02:00
2xsec
9044b79e19 af_unix: fix return value & cleanups
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-21 02:41:53 +09:00
2xsec
a73846d893 lxccontainer: coding rules
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-20 23:41:10 +09:00
2xsec
29c98ddd9b confile_utils: fix return value & cleanups
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-20 22:05:15 +09:00
Stéphane Graber
8fd3e219c2
Merge pull request #2480 from brauner/2018-07-18/add_required_mount_flags
conf: the atime flags are locked in userns
2018-07-19 16:18:21 -04:00
Christian Brauner
ce08b042f9
Merge pull request #2481 from hwoarang/fix-apparmor-paths
apparmor: Allow /usr/lib* paths for mount and pivot_root
2018-07-19 14:02:44 +02:00
Markos Chandras
733e375760 apparmor: Allow /usr/lib* paths for mount and pivot_root
openSUSE Leap 15 is using --libdir=/usr/lib64 when building for
x86_64 so we need to allow this path in the apparmor profiles.

Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1099239
Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-07-19 12:17:24 +01:00
Christian Brauner
69eadddb37
conf: the atime flags are locked in userns
This means they need to be added for remount and for fresh mounts.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-18 18:09:21 +02:00
Stéphane Graber
c77abb2006
Merge pull request #2473 from tenforward/japanese
doc: Translate lxc.monitor.signal.pdeath into Japanese in lxc.contain…
2018-07-16 12:32:17 -04:00
KATOH Yasufumi
fd5de02921 doc: Translate lxc.monitor.signal.pdeath into Japanese in lxc.container.conf(5)
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2018-07-17 01:14:06 +09:00
Stéphane Graber
d08e384c4c
Merge pull request #2472 from brauner/2018-07-16/monitor_signal_pdeath
tests: add lxc.monitor.signal.pdeath
2018-07-16 12:13:46 -04:00
Christian Brauner
e53cd6d899
tests: add lxc.monitor.signal.pdeath
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-16 15:23:31 +02:00
Stéphane Graber
112a579825
Merge pull request #2470 from brauner/2018-07-16/monitor_signal_pdeath
confile: add lxc.monitor.signal.pdeath
2018-07-16 08:05:15 -04:00
Christian Brauner
258f80519f
confile: add lxc.monitor.signal.pdeath
Set the signal to be sent to the container's init when the lxc monitor exits.
By default it is set to SIGKILL which will cause all container processes to be
killed when the lxc monitor process dies.
To ensure that containers stay alive even if lxc monitor dies set this to 0.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-16 12:50:57 +02:00
Christian Brauner
f6e32eb05b
confile: move signal helpers to confile utils
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-16 11:30:23 +02:00
Christian Brauner
63f9c9e607
Merge pull request #2469 from 2xsec/bugfix
tools: lxc-unshare: use lxc list for interface names
2018-07-14 17:50:47 +02:00
2xsec
0240eb9dc5 coverity: #1437949
Argument cannot be negative

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-15 00:19:16 +09:00
2xsec
59e1663ad0 tools: lxc-unshare: use lxc list for interface names
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-14 23:56:34 +09:00
Christian Brauner
623cfa35c1
Merge pull request #2468 from 2xsec/bugfix
tools: lxc-unshare: apply argument parser of lxc and log system of lxc
2018-07-14 16:47:20 +02:00
2xsec
35bfea7ac7 tools: lxc-unshare: fix wrong coding rules
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-14 22:07:59 +09:00
2xsec
727b9b1659 tools: lxc-unshare: apply argument parser of lxc and log system of lxc
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-14 20:00:38 +09:00
Christian Brauner
94fd0bd685
Merge pull request #2466 from flx42/fix-define-argument
confile: fix incorrect strncmp
2018-07-14 02:09:46 +02:00
Felix Abecassis
85d49873a6 confile: fix incorrect strncmp
Passing additional configuration options with "--define" was broken.

Result of git bisect:
d899f11b7b is the first bad commit

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
2018-07-13 16:45:55 -07:00
Christian Brauner
5c784312b9
Merge pull request #2465 from 2xsec/bugfix
lxclock: change error log using strerror to SYSERROR
2018-07-13 14:50:01 +02:00
2xsec
79cda71dc9
lxclock: change error log using strerror to SYSERROR
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-13 21:33:09 +09:00
Stéphane Graber
7437036726
Merge pull request #2462 from brauner/2018-07-12/coverity
coverity
2018-07-12 12:40:34 -04:00
Christian Brauner
a0ee564f64
coverity: #1437935
Unchecked return value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-12 17:52:09 +02:00
Christian Brauner
00c72a935f
coverity: #1437936
Unchecked return value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-12 17:49:30 +02:00
Stéphane Graber
99c42eaad5
Merge pull request #2459 from brauner/2018-07-11/cleanup_makefile
autotool fixes, attach cleanups
2018-07-12 11:30:45 -04:00
Stéphane Graber
4017e68046
Merge pull request #2460 from brauner/2018-07-12/handle_new_mknod_smarter
conf: handle partially functional device nodes
2018-07-12 10:08:44 -04:00
Christian Brauner
ae026f5593
attach: cleanup log messages in lxc_attach()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-12 13:06:45 +02:00
Christian Brauner
3f62938a8a
attach: use fd_cloexec()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-12 13:06:45 +02:00
Christian Brauner
bcbef73392
attach: cleanup no_new_privs()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-12 13:06:45 +02:00
Christian Brauner
d4db3d1441
attach: cleanup fetch_seccomp()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-12 13:06:45 +02:00
Christian Brauner
3fa23ac32e
attach: simplify lxc_attach_getpwshell()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-07-12 13:06:45 +02:00