]> git.proxmox.com Git - mirror_lxc.git/log
mirror_lxc.git
5 years agoMerge pull request #2500 from akosiaris/patch-1
Christian Brauner [Mon, 30 Jul 2018 13:32:19 +0000 (15:32 +0200)]
Merge pull request #2500 from akosiaris/patch-1

Unprivileged's incompatibility with type=none docs

5 years agoUnprivileged's incompatibility with type=none docs
Alexandros Kosiaris [Mon, 30 Jul 2018 12:01:15 +0000 (15:01 +0300)]
Unprivileged's incompatibility with type=none docs

Unprivileged containers are not compatible with sharing the
host namespace due to an inability to mount sysfs. Add docs
in lxc.container.conf to document that out.

Refs #2463

Signed-off-by: Alexandros Kosiaris <akosiaris@gmail.com>
5 years agoMerge pull request #2497 from brauner/2018-07-29/nl_fix
Christian Brauner [Sun, 29 Jul 2018 16:46:42 +0000 (18:46 +0200)]
Merge pull request #2497 from brauner/2018-07-29/nl_fix

nl: avoid NULL pointer dereference

5 years agonl: avoid NULL pointer dereference
Rafał Miłecki [Sun, 29 Jul 2018 15:44:06 +0000 (17:44 +0200)]
nl: avoid NULL pointer dereference

It's a valid case to call nla_put() with NULL data and 0 len. It's done e.g. in
the nla_put_attr().

There has to be a check for data in nla_put() as passing NULL to the memcpy()
is not allowed. Even if length is 0, both pointers have to be valid.

For a reference see C99 standard (7.21.1/2), it says: "pointer arguments on
such a call shall still have valid values".

Reported-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
[christian.brauner@ubuntu.com: adapted commit message]
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2496 from flx42/nvidia-hook-lgpl
Stéphane Graber [Sun, 29 Jul 2018 01:08:38 +0000 (21:08 -0400)]
Merge pull request #2496 from flx42/nvidia-hook-lgpl

Fix license of the nvidia hook

5 years agoFix license of the nvidia hook
Felix Abecassis [Sun, 29 Jul 2018 01:06:58 +0000 (18:06 -0700)]
Fix license of the nvidia hook

Fixes: #2494
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
5 years agoMerge pull request #2493 from brauner/2018-07-26/bugfixes
Stéphane Graber [Thu, 26 Jul 2018 14:56:46 +0000 (10:56 -0400)]
Merge pull request #2493 from brauner/2018-07-26/bugfixes

utils: add lxc_iterate_parts(), compile with -Wvla and -std=gnu11

5 years agoautotools: default to -Wvla -std=gnu11
Christian Brauner [Thu, 26 Jul 2018 11:38:21 +0000 (13:38 +0200)]
autotools: default to -Wvla -std=gnu11

We can't really support anything less than gcc-4.8 anyway.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoinclude: remove VLAs
Christian Brauner [Thu, 26 Jul 2018 12:42:05 +0000 (14:42 +0200)]
include: remove VLAs

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agotests: remove VLAs
Christian Brauner [Thu, 26 Jul 2018 11:38:11 +0000 (13:38 +0200)]
tests: remove VLAs

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMakefile: add missing lxctest.h
Christian Brauner [Thu, 26 Jul 2018 11:37:58 +0000 (13:37 +0200)]
Makefile: add missing lxctest.h

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoutils: s/strtok_r()/lxc_iterate_parts()/g
Christian Brauner [Thu, 26 Jul 2018 14:16:28 +0000 (16:16 +0200)]
utils: s/strtok_r()/lxc_iterate_parts()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agotools: s/strtok_r()/lxc_iterate_parts()/g
Christian Brauner [Thu, 26 Jul 2018 14:19:42 +0000 (16:19 +0200)]
tools: s/strtok_r()/lxc_iterate_parts()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agostorage: s/strtok_r()/lxc_iterate_parts()/g
Christian Brauner [Thu, 26 Jul 2018 14:17:19 +0000 (16:17 +0200)]
storage: s/strtok_r()/lxc_iterate_parts()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agostate: s/strtok_r()/lxc_iterate_parts()/g
Christian Brauner [Thu, 26 Jul 2018 14:13:39 +0000 (16:13 +0200)]
state: s/strtok_r()/lxc_iterate_parts()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoparse: s/strtok_r()/lxc_iterate_parts()/g
Christian Brauner [Thu, 26 Jul 2018 14:11:43 +0000 (16:11 +0200)]
parse: s/strtok_r()/lxc_iterate_parts()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agonamespace: s/strtok_r()/lxc_iterate_parts()/g
Christian Brauner [Thu, 26 Jul 2018 14:10:27 +0000 (16:10 +0200)]
namespace: s/strtok_r()/lxc_iterate_parts()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agolxccontainer: s/strtok_r()/lxc_iterate_parts()/g
Christian Brauner [Thu, 26 Jul 2018 14:09:31 +0000 (16:09 +0200)]
lxccontainer: s/strtok_r()/lxc_iterate_parts()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoconfile: s/strtok_r()/lxc_iterate_parts()/g
Christian Brauner [Thu, 26 Jul 2018 14:08:29 +0000 (16:08 +0200)]
confile: s/strtok_r()/lxc_iterate_parts()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoconf: s/strtok_r()/lxc_iterate_parts()/g
Christian Brauner [Thu, 26 Jul 2018 14:00:32 +0000 (16:00 +0200)]
conf: s/strtok_r()/lxc_iterate_parts()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agocgroups: s/strtok_r()/lxc_iterate_parts()
Christian Brauner [Thu, 26 Jul 2018 10:57:47 +0000 (12:57 +0200)]
cgroups: s/strtok_r()/lxc_iterate_parts()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoutils: add lxc_iterate_parts()
Christian Brauner [Thu, 26 Jul 2018 10:43:29 +0000 (12:43 +0200)]
utils: add lxc_iterate_parts()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2479 from Blub/apparmor-profiles
Serge Hallyn [Thu, 26 Jul 2018 04:04:32 +0000 (23:04 -0500)]
Merge pull request #2479 from Blub/apparmor-profiles

RFC: Generated Apparmor profiles, namespaces, stacking

5 years agotests: add test for generated apparmor profiles
Wolfgang Bumiller [Tue, 24 Jul 2018 11:59:04 +0000 (13:59 +0200)]
tests: add test for generated apparmor profiles

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoapparmor: allow start-container to change to lxc-**
Wolfgang Bumiller [Tue, 24 Jul 2018 14:42:26 +0000 (16:42 +0200)]
apparmor: allow start-container to change to lxc-**

For generated profiles with apparmor namespaces we get
profile names with slashes in them. To match those, we need
to allow changing to lxc-**, not just lxc-*.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoapparmor: profile generation
Wolfgang Bumiller [Wed, 25 Jul 2018 10:11:31 +0000 (12:11 +0200)]
apparmor: profile generation

This copies lxd's apparmor profile generation. This tries to
detect features such as cgroup namespaces, apparmor
namespaces and stacking support, and has profile parts
conditionally for unprivileged containers.

This introduces the following changes to the configuration:
  lxc.apparmor.profile = generated
    The fixed value 'generated' will cause this
    functionality to be used, otherwise there should be no
    functional changes happening unless specifically
    requested with the next key:
  lxc.apparmor.allow_nesting
    This is a boolean which, if enabled, causes the
    following changes: When generated apparmor profiles are
    used, they will contain the necessary changes to allow
    creating a nested container. In addition to the usual
    mount points, /dev/.lxc/proc and /dev/.lxc/sys will
    contain procfs and sysfs mount points without the lxcfs
    overlays, which, if generated apparmor profiles are
    being used, will not be read/writable directly.
  lxc.apparmor.raw
    A list of raw apparmor profile lines to append to the
    profile. Only valid when using generated profiles.

The following apparmor profile lines have not been copied
from lxd:

  mount /var/lib/lxd/shmounts/ -> /var/lib/lxd/shmounts/,
  mount none -> /var/lib/lxd/shmounts/,
  mount options=bind /var/lib/lxd/shmounts/** -> /var/lib/lxd/**,

They should be added via lxc.apparmor.raw entries by lxd.

In order for apparmor_parser's cache to be of use, this adds
a --with-apparmor-cache-dir ./configure option.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoapparmor: update current profiles
Wolfgang Bumiller [Wed, 25 Jul 2018 10:11:23 +0000 (12:11 +0200)]
apparmor: update current profiles

remove cgmanager rules and add fstype=cgroup2 variants for
the existing fstype=cgroup rules

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoutils: add must_concat helper
Wolfgang Bumiller [Wed, 18 Jul 2018 10:43:37 +0000 (12:43 +0200)]
utils: add must_concat helper

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoapparmor: use fopen_cloexec
Wolfgang Bumiller [Wed, 25 Jul 2018 10:06:16 +0000 (12:06 +0200)]
apparmor: use fopen_cloexec

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoMerge pull request #2492 from brauner/2018-07-14/fix_indendation
Stéphane Graber [Tue, 24 Jul 2018 15:17:32 +0000 (11:17 -0400)]
Merge pull request #2492 from brauner/2018-07-14/fix_indendation

lxccontainer: fix indendation

5 years agolxccontainer: fix indendation
Christian Brauner [Tue, 24 Jul 2018 13:09:13 +0000 (15:09 +0200)]
lxccontainer: fix indendation

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agolsm: fixup lsm_process_label_set_at return values
Wolfgang Bumiller [Thu, 12 Jul 2018 13:16:40 +0000 (15:16 +0200)]
lsm: fixup lsm_process_label_set_at return values

Always return -1 on error (some code paths returned -1, some
returned negative error codes), don't assume 'errno' is set
afterwards, as the function already prints errors and not
all code paths will have a usable errno value.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agotests: lxc-test-apparmor-mount: check environment early
Wolfgang Bumiller [Tue, 24 Jul 2018 09:49:14 +0000 (11:49 +0200)]
tests: lxc-test-apparmor-mount: check environment early

don't kill all my processes when running it as user...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agotests: lxc-test-apparmor-mount: show a log on error
Wolfgang Bumiller [Mon, 23 Jul 2018 15:23:08 +0000 (17:23 +0200)]
tests: lxc-test-apparmor-mount: show a log on error

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoMerge pull request #2489 from 2xsec/bugfix
Christian Brauner [Sun, 22 Jul 2018 15:42:33 +0000 (17:42 +0200)]
Merge pull request #2489 from 2xsec/bugfix

change log macro of error case from lxc_ambient_caps_up/down

5 years agoMerge pull request #2300 from LizaTretyakova/mount_injection
Christian Brauner [Sun, 22 Jul 2018 14:20:31 +0000 (16:20 +0200)]
Merge pull request #2300 from LizaTretyakova/mount_injection

Mount injection API

5 years agoconfile: add missing header
Christian Brauner [Sun, 22 Jul 2018 13:46:37 +0000 (15:46 +0200)]
confile: add missing header

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agostart: coding style fixes
Christian Brauner [Sun, 22 Jul 2018 13:44:05 +0000 (15:44 +0200)]
start: coding style fixes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoconf: coding style fixes
Christian Brauner [Sun, 22 Jul 2018 13:43:47 +0000 (15:43 +0200)]
conf: coding style fixes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoconfile: add strdup failure check
Liza Tretyakova [Sat, 19 May 2018 13:24:25 +0000 (16:24 +0300)]
confile: add strdup failure check

Signed-off-by: Liza Tretyakova <elizabet.tretyakova@gmail.com>
[christian.brauner@ubuntu.com: coding style]
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoconf, lxccontainer: fix length checks in snprintf
Liza Tretyakova [Sat, 19 May 2018 13:16:26 +0000 (16:16 +0300)]
conf, lxccontainer: fix length checks in snprintf

Signed-off-by: Liza Tretyakova <elizabet.tretyakova@gmail.com>
5 years agoconf, confile, lxccontainer, start: nonfunctional changes
Liza Tretyakova [Sat, 19 May 2018 12:59:11 +0000 (15:59 +0300)]
conf, confile, lxccontainer, start: nonfunctional changes

Signed-off-by: Liza Tretyakova <elizabet.tretyakova@gmail.com>
5 years agolxccontainer: reword create_mount_target()
Christian Brauner [Tue, 15 May 2018 10:53:30 +0000 (12:53 +0200)]
lxccontainer: reword create_mount_target()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agolxccontainer: do_lxcapi_mount() coding-style
Christian Brauner [Tue, 15 May 2018 10:51:31 +0000 (12:51 +0200)]
lxccontainer: do_lxcapi_mount() coding-style

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agotests: add filesystem and char device tests
Liza Tretyakova [Tue, 15 May 2018 09:37:36 +0000 (12:37 +0300)]
tests: add filesystem and char device tests

Signed-off-by: Liza Tretyakova <elizabet.tretyakova@gmail.com>
5 years agolxccontainer: add handling of file mounts
Liza Tretyakova [Tue, 15 May 2018 09:36:10 +0000 (12:36 +0300)]
lxccontainer: add handling of file mounts

Signed-off-by: Liza Tretyakova <elizabet.tretyakova@gmail.com>
5 years agotests: tweak mount injection tests
Christian Brauner [Sun, 13 May 2018 15:12:42 +0000 (17:12 +0200)]
tests: tweak mount injection tests

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agotests: add tests for umount
Liza Tretyakova [Sat, 12 May 2018 10:59:22 +0000 (13:59 +0300)]
tests: add tests for umount

Signed-off-by: Liza Tretyakova <elizabet.tretyakova@gmail.com>
5 years agolxccontainer: add the umount API function
Liza Tretyakova [Sat, 12 May 2018 10:07:41 +0000 (13:07 +0300)]
lxccontainer: add the umount API function

Signed-off-by: Liza Tretyakova <elizabet.tretyakova@gmail.com>
[christian@brauner.io: minor coding-style changes]
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agotests: add mount injection tests
Liza Tretyakova [Wed, 2 May 2018 08:54:06 +0000 (11:54 +0300)]
tests: add mount injection tests

Signed-off-by: Liza Tretyakova <elizabet.tretyakova@gmail.com>
5 years agolxccontainer: add container API function and structs for injecting a mount
Liza Tretyakova [Wed, 2 May 2018 08:07:58 +0000 (11:07 +0300)]
lxccontainer: add container API function and structs for injecting a mount

Signed-off-by: Liza Tretyakova <elizabet.tretyakova@gmail.com>
5 years agostart: add shmount setup on container start
Liza Tretyakova [Wed, 2 May 2018 07:58:54 +0000 (10:58 +0300)]
start: add shmount setup on container start

Signed-off-by: Liza Tretyakova <elizabet.tretyakova@gmail.com>
5 years agoutils: add shared mount point detection
Liza Tretyakova [Wed, 2 May 2018 07:47:15 +0000 (10:47 +0300)]
utils: add shared mount point detection

Signed-off-by: Liza Tretyakova <elizabet.tretyakova@gmail.com>
5 years agoconf, confile: add parsing of a shmounts config parameter
Liza Tretyakova [Wed, 2 May 2018 07:28:39 +0000 (10:28 +0300)]
conf, confile: add parsing of a shmounts config parameter

Signed-off-by: Liza Tretyakova <elizabet.tretyakova@gmail.com>
5 years agoconf, confile: introduce basic structs for shared mount point
Liza Tretyakova [Wed, 2 May 2018 07:09:34 +0000 (10:09 +0300)]
conf, confile: introduce basic structs for shared mount point

Signed-off-by: Liza Tretyakova <elizabet.tretyakova@gmail.com>
5 years agochange log macro of error case from lxc_ambient_caps_up/down
2xsec [Sun, 22 Jul 2018 12:03:46 +0000 (21:03 +0900)]
change log macro of error case from lxc_ambient_caps_up/down

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agoMerge pull request #2488 from 2xsec/bugfix
Christian Brauner [Sun, 22 Jul 2018 05:59:56 +0000 (07:59 +0200)]
Merge pull request #2488 from 2xsec/bugfix

docs: tools: -d/--daemonize for lxc-execute

5 years agodocs: tools: -d/--daemonize for lxc-execute
2xsec [Sun, 22 Jul 2018 04:26:52 +0000 (13:26 +0900)]
docs: tools: -d/--daemonize for lxc-execute

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agoMerge pull request #2486 from 2xsec/bugfix
Christian Brauner [Sat, 21 Jul 2018 14:46:40 +0000 (16:46 +0200)]
Merge pull request #2486 from 2xsec/bugfix

thread safe: rand() => rand_r()

5 years agocoverity: #1438067
2xsec [Sat, 21 Jul 2018 13:47:08 +0000 (22:47 +0900)]
coverity: #1438067

Explicit null dereferenced

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agothread safe: rand() => rand_r()
2xsec [Sat, 21 Jul 2018 13:27:30 +0000 (22:27 +0900)]
thread safe: rand() => rand_r()

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agoMerge pull request #2484 from 2xsec/bugfix
Christian Brauner [Sat, 21 Jul 2018 10:09:37 +0000 (12:09 +0200)]
Merge pull request #2484 from 2xsec/bugfix

attach: fix return value & cleanups

5 years agoattach: move errno handling
2xsec [Sat, 21 Jul 2018 09:17:18 +0000 (18:17 +0900)]
attach: move errno handling

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agoMerge pull request #2485 from 2xsec/docs
Christian Brauner [Sat, 21 Jul 2018 08:43:18 +0000 (10:43 +0200)]
Merge pull request #2485 from 2xsec/docs

docs: add long options of lxc-unshare

5 years agodocs: add long options of lxc-unshare
2xsec [Sat, 21 Jul 2018 07:48:29 +0000 (16:48 +0900)]
docs: add long options of lxc-unshare

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agoattach: fix return value & cleanups
2xsec [Sat, 21 Jul 2018 07:04:01 +0000 (16:04 +0900)]
attach: fix return value & cleanups

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agoMerge pull request #2482 from 2xsec/bugfix
Christian Brauner [Sat, 21 Jul 2018 04:50:39 +0000 (06:50 +0200)]
Merge pull request #2482 from 2xsec/bugfix

error handling cleanups #2471

5 years agoaf_unix: fix return value & cleanups
2xsec [Fri, 20 Jul 2018 17:41:53 +0000 (02:41 +0900)]
af_unix: fix return value & cleanups

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agolxccontainer: coding rules
2xsec [Fri, 20 Jul 2018 14:41:10 +0000 (23:41 +0900)]
lxccontainer: coding rules

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agoconfile_utils: fix return value & cleanups
2xsec [Fri, 20 Jul 2018 13:05:15 +0000 (22:05 +0900)]
confile_utils: fix return value & cleanups

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agoMerge pull request #2480 from brauner/2018-07-18/add_required_mount_flags
Stéphane Graber [Thu, 19 Jul 2018 20:18:21 +0000 (16:18 -0400)]
Merge pull request #2480 from brauner/2018-07-18/add_required_mount_flags

conf: the atime flags are locked in userns

5 years agoMerge pull request #2481 from hwoarang/fix-apparmor-paths
Christian Brauner [Thu, 19 Jul 2018 12:02:44 +0000 (14:02 +0200)]
Merge pull request #2481 from hwoarang/fix-apparmor-paths

apparmor: Allow /usr/lib* paths for mount and pivot_root

5 years agoapparmor: Allow /usr/lib* paths for mount and pivot_root
Markos Chandras [Thu, 19 Jul 2018 11:12:13 +0000 (12:12 +0100)]
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>
5 years agoconf: the atime flags are locked in userns
Christian Brauner [Wed, 18 Jul 2018 16:09:21 +0000 (18:09 +0200)]
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>
5 years agoMerge pull request #2473 from tenforward/japanese
Stéphane Graber [Mon, 16 Jul 2018 16:32:17 +0000 (12:32 -0400)]
Merge pull request #2473 from tenforward/japanese

doc: Translate lxc.monitor.signal.pdeath into Japanese in lxc.contain…

5 years agodoc: Translate lxc.monitor.signal.pdeath into Japanese in lxc.container.conf(5)
KATOH Yasufumi [Mon, 16 Jul 2018 16:14:06 +0000 (01:14 +0900)]
doc: Translate lxc.monitor.signal.pdeath into Japanese in lxc.container.conf(5)

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
5 years agoMerge pull request #2472 from brauner/2018-07-16/monitor_signal_pdeath
Stéphane Graber [Mon, 16 Jul 2018 16:13:46 +0000 (12:13 -0400)]
Merge pull request #2472 from brauner/2018-07-16/monitor_signal_pdeath

tests: add lxc.monitor.signal.pdeath

5 years agotests: add lxc.monitor.signal.pdeath
Christian Brauner [Mon, 16 Jul 2018 13:22:13 +0000 (15:22 +0200)]
tests: add lxc.monitor.signal.pdeath

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2470 from brauner/2018-07-16/monitor_signal_pdeath
Stéphane Graber [Mon, 16 Jul 2018 12:05:15 +0000 (08:05 -0400)]
Merge pull request #2470 from brauner/2018-07-16/monitor_signal_pdeath

confile: add lxc.monitor.signal.pdeath

5 years agoconfile: add lxc.monitor.signal.pdeath
Christian Brauner [Mon, 16 Jul 2018 09:07:58 +0000 (11:07 +0200)]
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>
5 years agoconfile: move signal helpers to confile utils
Christian Brauner [Mon, 16 Jul 2018 09:10:01 +0000 (11:10 +0200)]
confile: move signal helpers to confile utils

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2469 from 2xsec/bugfix
Christian Brauner [Sat, 14 Jul 2018 15:50:47 +0000 (17:50 +0200)]
Merge pull request #2469 from 2xsec/bugfix

tools: lxc-unshare: use lxc list for interface names

5 years agocoverity: #1437949
2xsec [Sat, 14 Jul 2018 15:19:16 +0000 (00:19 +0900)]
coverity: #1437949

Argument cannot be negative

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotools: lxc-unshare: use lxc list for interface names
2xsec [Sat, 14 Jul 2018 14:56:34 +0000 (23:56 +0900)]
tools: lxc-unshare: use lxc list for interface names

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agoMerge pull request #2468 from 2xsec/bugfix
Christian Brauner [Sat, 14 Jul 2018 14:47:20 +0000 (16:47 +0200)]
Merge pull request #2468 from 2xsec/bugfix

tools: lxc-unshare: apply argument parser of lxc and log system of lxc

5 years agotools: lxc-unshare: fix wrong coding rules
2xsec [Sat, 14 Jul 2018 13:07:59 +0000 (22:07 +0900)]
tools: lxc-unshare: fix wrong coding rules

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agotools: lxc-unshare: apply argument parser of lxc and log system of lxc
2xsec [Sat, 14 Jul 2018 11:00:38 +0000 (20:00 +0900)]
tools: lxc-unshare: apply argument parser of lxc and log system of lxc

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agoMerge pull request #2466 from flx42/fix-define-argument
Christian Brauner [Sat, 14 Jul 2018 00:09:46 +0000 (02:09 +0200)]
Merge pull request #2466 from flx42/fix-define-argument

 confile: fix incorrect strncmp

5 years agoconfile: fix incorrect strncmp
Felix Abecassis [Fri, 13 Jul 2018 23:45:55 +0000 (16:45 -0700)]
confile: fix incorrect strncmp

Passing additional configuration options with "--define" was broken.

Result of git bisect:
d899f11b7bfb14c4b532bc801de89c8fb46307d4 is the first bad commit

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
5 years agoMerge pull request #2465 from 2xsec/bugfix
Christian Brauner [Fri, 13 Jul 2018 12:50:01 +0000 (14:50 +0200)]
Merge pull request #2465 from 2xsec/bugfix

lxclock: change error log using strerror to SYSERROR

5 years agolxclock: change error log using strerror to SYSERROR
2xsec [Fri, 13 Jul 2018 12:33:09 +0000 (21:33 +0900)]
lxclock: change error log using strerror to SYSERROR

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
5 years agoMerge pull request #2462 from brauner/2018-07-12/coverity
Stéphane Graber [Thu, 12 Jul 2018 16:40:34 +0000 (12:40 -0400)]
Merge pull request #2462 from brauner/2018-07-12/coverity

coverity

5 years agocoverity: #1437935
Christian Brauner [Thu, 12 Jul 2018 15:52:09 +0000 (17:52 +0200)]
coverity: #1437935

Unchecked return value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agocoverity: #1437936
Christian Brauner [Thu, 12 Jul 2018 15:49:30 +0000 (17:49 +0200)]
coverity: #1437936

Unchecked return value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #2459 from brauner/2018-07-11/cleanup_makefile
Stéphane Graber [Thu, 12 Jul 2018 15:30:45 +0000 (11:30 -0400)]
Merge pull request #2459 from brauner/2018-07-11/cleanup_makefile

autotool fixes, attach cleanups

5 years agoMerge pull request #2460 from brauner/2018-07-12/handle_new_mknod_smarter
Stéphane Graber [Thu, 12 Jul 2018 14:08:44 +0000 (10:08 -0400)]
Merge pull request #2460 from brauner/2018-07-12/handle_new_mknod_smarter

conf: handle partially functional device nodes

5 years agoattach: cleanup log messages in lxc_attach()
Christian Brauner [Wed, 11 Jul 2018 21:45:03 +0000 (23:45 +0200)]
attach: cleanup log messages in lxc_attach()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoattach: use fd_cloexec()
Christian Brauner [Wed, 11 Jul 2018 21:43:38 +0000 (23:43 +0200)]
attach: use fd_cloexec()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoattach: cleanup no_new_privs()
Christian Brauner [Wed, 11 Jul 2018 21:40:16 +0000 (23:40 +0200)]
attach: cleanup no_new_privs()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoattach: cleanup fetch_seccomp()
Christian Brauner [Wed, 11 Jul 2018 21:38:31 +0000 (23:38 +0200)]
attach: cleanup fetch_seccomp()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>