]> git.proxmox.com Git - mirror_lxc.git/log
mirror_lxc.git
4 years agoautotools: don't install run-coccinelle.sh
Christian Brauner [Wed, 1 Apr 2020 20:25:53 +0000 (22:25 +0200)]
autotools: don't install run-coccinelle.sh

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agostart: remove unnecessary check for valid cgroup_ops
Christian Brauner [Mon, 30 Mar 2020 20:26:10 +0000 (22:26 +0200)]
start: remove unnecessary check for valid cgroup_ops

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3340 from brauner/2020-03-30/fixes
Stéphane Graber [Mon, 30 Mar 2020 18:12:59 +0000 (14:12 -0400)]
Merge pull request #3340 from brauner/2020-03-30/fixes

cgroups: handle older kernels (e.g. v4.9)

4 years agocgroups: send two fds to attach to unified cgroup
Christian Brauner [Mon, 30 Mar 2020 17:00:23 +0000 (19:00 +0200)]
cgroups: send two fds to attach to unified cgroup

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agocgroups: send two attach fds
Christian Brauner [Mon, 30 Mar 2020 16:42:59 +0000 (18:42 +0200)]
cgroups: send two attach fds

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agostart: log error when failing to create cgroup
Christian Brauner [Mon, 30 Mar 2020 16:16:16 +0000 (18:16 +0200)]
start: log error when failing to create cgroup

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agocgroups: handle older kernels (e.g. v4.9)
Christian Brauner [Mon, 30 Mar 2020 15:40:16 +0000 (17:40 +0200)]
cgroups: handle older kernels (e.g. v4.9)

On olders kernels the restrictions to move processes between cgroups are
different than they are on newer kernels. Specifically, we're running into the
following check:

if (!uid_eq(cred->euid, GLOBAL_ROOT_UID) &&
    !uid_eq(cred->euid, tcred->uid) &&
    !uid_eq(cred->euid, tcred->suid))
        ret = -EACCES;

which dictates that in order to move a process into a cgroup one either needs
to be global root (no restrictions apply) or the effective uid of the process
trying to move the process and the {saved}uid of the process that is supposed
to be moved need to be identical. The new attaching logic we did didn't
fulfill this criterion for because it's not present on new kernels.

Closes https://github.com/lxc/lxd/issues/7104.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3339 from Blub/cmd-get-cgroup-string-termination
Christian Brauner [Mon, 30 Mar 2020 14:40:36 +0000 (16:40 +0200)]
Merge pull request #3339 from Blub/cmd-get-cgroup-string-termination

verify cgroup controller name

4 years agoverify cgroup controller name
Wolfgang Bumiller [Mon, 30 Mar 2020 14:01:07 +0000 (16:01 +0200)]
verify cgroup controller name

validate that a cgroup controller name is a valid
zero-terminated string before passing it to
`cgroup_ops->get_cgroup()`.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoMerge pull request #3338 from brauner/2020-03-28/fixes
Stéphane Graber [Sat, 28 Mar 2020 14:54:25 +0000 (10:54 -0400)]
Merge pull request #3338 from brauner/2020-03-28/fixes

tree-wide: fixes

4 years agotree-wide: s/recursive_destroy/lxc_rm_rf/g
Christian Brauner [Sat, 28 Mar 2020 14:03:51 +0000 (15:03 +0100)]
tree-wide: s/recursive_destroy/lxc_rm_rf/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agocgroups: better helper naming
Christian Brauner [Sat, 28 Mar 2020 14:01:58 +0000 (15:01 +0100)]
cgroups: better helper naming

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agocgroups: move check for valid monitor process up
Christian Brauner [Sat, 28 Mar 2020 13:56:51 +0000 (14:56 +0100)]
cgroups: move check for valid monitor process up

Cc: cenxianlong <cenxianlong@huawei.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3337 from bale-cen/master
Christian Brauner [Sat, 28 Mar 2020 09:56:49 +0000 (10:56 +0100)]
Merge pull request #3337 from bale-cen/master

monitor process exited by signal SIGKILL, clean cgroup resource by th…

4 years agoMerge pull request #3336 from brauner/2020-03-28/fixes
Stéphane Graber [Sat, 28 Mar 2020 01:48:18 +0000 (21:48 -0400)]
Merge pull request #3336 from brauner/2020-03-28/fixes

cgroups: please compilers

4 years agomonitor process exited by signal SIGKILL, clean cgroup resource by third party
cenxianlong [Sat, 28 Mar 2020 00:52:26 +0000 (02:52 +0200)]
monitor process exited by signal SIGKILL, clean cgroup resource by third party

Writing the value 0 to a cgroup.procs file causes the
writing process to be moved to the corresponding cgroup

Signed-off-by: cenxianlong <cenxianlong@huawei.com>
4 years agocgroups: please compilers
Christian Brauner [Fri, 27 Mar 2020 23:27:00 +0000 (00:27 +0100)]
cgroups: please compilers

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3335 from brauner/2020-03-27/fixes
Stéphane Graber [Fri, 27 Mar 2020 21:33:59 +0000 (17:33 -0400)]
Merge pull request #3335 from brauner/2020-03-27/fixes

cgroups: use hidden directory for attaching cgroup

4 years agocgroups: use hidden directory for attaching cgroup
Christian Brauner [Fri, 27 Mar 2020 21:22:05 +0000 (22:22 +0100)]
cgroups: use hidden directory for attaching cgroup

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3333 from brauner/2020-03-27/fixes
Stéphane Graber [Fri, 27 Mar 2020 21:01:17 +0000 (17:01 -0400)]
Merge pull request #3333 from brauner/2020-03-27/fixes

conf: simplify userns_exec_minimal()

4 years agoconf: simplify userns_exec_minimal()
Christian Brauner [Fri, 27 Mar 2020 20:25:59 +0000 (21:25 +0100)]
conf: simplify userns_exec_minimal()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3332 from brauner/2020-03-27/fixes
Stéphane Graber [Fri, 27 Mar 2020 19:37:00 +0000 (15:37 -0400)]
Merge pull request #3332 from brauner/2020-03-27/fixes

attach: fixes

4 years agoconf: introduce and use userns_exec_minimal()
Christian Brauner [Fri, 27 Mar 2020 19:11:41 +0000 (20:11 +0100)]
conf: introduce and use userns_exec_minimal()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoRevert "cgroups: fix unified cgroup attach"
Christian Brauner [Fri, 27 Mar 2020 18:46:10 +0000 (19:46 +0100)]
Revert "cgroups: fix unified cgroup attach"

This reverts commit ba7ca43b0be417275db7865336191681d915e97c.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3331 from brauner/2020-03-27/fixes
Stéphane Graber [Fri, 27 Mar 2020 15:02:27 +0000 (11:02 -0400)]
Merge pull request #3331 from brauner/2020-03-27/fixes

tree-wide: fixes

4 years agofixup i/o handler return values
Wolfgang Bumiller [Fri, 27 Mar 2020 13:15:12 +0000 (14:15 +0100)]
fixup i/o handler return values

Particularly important for lxc_cmd_handler() handles client
input and should not be capable of canceling the main loop,
some syscall return values leaked through overlapping with
LXC_MAINLOOP_ERROR, causing unauthorized clients connecting
to the command socket to shutdown the main loop.

In turn, signal_handler() receiving unexpected
`signalfd_siginfo` struct sizes seems like a reason to bail
(since it's a kernel interface).

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agocgroups: fix unified cgroup attach
Christian Brauner [Fri, 27 Mar 2020 14:38:27 +0000 (15:38 +0100)]
cgroups: fix unified cgroup attach

There's a fundamental problem with futexes and setid calls and the go runtime.
POSIX requires that when one thread setids all threas must setids and it uses
futexes and signals to synchronize the state across threads. This causes
deadlocks which means we can't use the pretty solution I first implemented.
Instead we need to chown after we create the directory. I might come up with
something smarter later but for now this will do.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3330 from brauner/2020-03-27/fixes
Stéphane Graber [Fri, 27 Mar 2020 12:52:30 +0000 (08:52 -0400)]
Merge pull request #3330 from brauner/2020-03-27/fixes

conf: rework and fix leak in userns_exec_1()

4 years agocgroups: remove unused variable
Christian Brauner [Fri, 27 Mar 2020 11:00:22 +0000 (12:00 +0100)]
cgroups: remove unused variable

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoattach: use close_prot_errno_disarm()
Christian Brauner [Fri, 27 Mar 2020 10:52:44 +0000 (11:52 +0100)]
attach: use close_prot_errno_disarm()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agocgroups: rework __cg_unified_attach()
Christian Brauner [Fri, 27 Mar 2020 10:05:50 +0000 (11:05 +0100)]
cgroups: rework __cg_unified_attach()

We didn't account for cgroup_attach() succeeding and just tried to attach to
the same cgroup again which doesn't make sense.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agocgroups: move pointer dereference after check
Christian Brauner [Fri, 27 Mar 2020 10:05:11 +0000 (11:05 +0100)]
cgroups: move pointer dereference after check

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agocommands: log actual errno when lxc_cmd_get_cgroup2_fd() fails
Christian Brauner [Fri, 27 Mar 2020 10:04:34 +0000 (11:04 +0100)]
commands: log actual errno when lxc_cmd_get_cgroup2_fd() fails

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoconf: rework and fix leak in userns_exec_1()
Christian Brauner [Fri, 27 Mar 2020 08:37:48 +0000 (09:37 +0100)]
conf: rework and fix leak in userns_exec_1()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3329 from brauner/2020-03-25/fixes
Stéphane Graber [Thu, 26 Mar 2020 19:11:50 +0000 (15:11 -0400)]
Merge pull request #3329 from brauner/2020-03-25/fixes

cgroups: fix attaching to the unified cgroup

4 years agocgroups: fix attaching to the unified cgroup
Christian Brauner [Thu, 26 Mar 2020 18:27:07 +0000 (19:27 +0100)]
cgroups: fix attaching to the unified cgroup

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3328 from brauner/2020-03-25/fixes
Stéphane Graber [Thu, 26 Mar 2020 15:22:34 +0000 (11:22 -0400)]
Merge pull request #3328 from brauner/2020-03-25/fixes

tree-wide: fixes

4 years agodir: improve dir backend
Christian Brauner [Thu, 26 Mar 2020 14:47:11 +0000 (15:47 +0100)]
dir: improve dir backend

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agodir: use cleanup macro in dir_mount()
Christian Brauner [Thu, 26 Mar 2020 14:32:29 +0000 (15:32 +0100)]
dir: use cleanup macro in dir_mount()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agotree-wide: harden mount option parsing
Christian Brauner [Thu, 26 Mar 2020 11:51:31 +0000 (12:51 +0100)]
tree-wide: harden mount option parsing

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3327 from P-EB/master
Stéphane Graber [Wed, 25 Mar 2020 17:31:45 +0000 (13:31 -0400)]
Merge pull request #3327 from P-EB/master

lxc.service: Starts after remote-fs.target

4 years ago[lxc.service] Starts after remote-fs.target to allow containers relying on remote...
Pierre-Elliott Bécue [Wed, 25 Mar 2020 16:50:27 +0000 (17:50 +0100)]
[lxc.service] Starts after remote-fs.target to allow containers relying on remote FS to work

Signed-off-by: Pierre-Elliott Bécue <becue@crans.org>
4 years agolxc_init: add missing O_CLOEXEC
Christian Brauner [Wed, 25 Mar 2020 11:53:13 +0000 (12:53 +0100)]
lxc_init: add missing O_CLOEXEC

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agolxc_init: move main() down
Christian Brauner [Wed, 25 Mar 2020 11:46:02 +0000 (12:46 +0100)]
lxc_init: move main() down

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoconfigure.ac: Reset devel flag post-release
Stéphane Graber [Tue, 24 Mar 2020 20:36:14 +0000 (16:36 -0400)]
configure.ac: Reset devel flag post-release

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
4 years agoRelease LXC 4.0.0 lxc-4.0.0
Stéphane Graber [Tue, 24 Mar 2020 20:35:48 +0000 (16:35 -0400)]
Release LXC 4.0.0

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
4 years agoMerge pull request #3325 from brauner/2020-03-24/fixes
Stéphane Graber [Tue, 24 Mar 2020 19:56:34 +0000 (15:56 -0400)]
Merge pull request #3325 from brauner/2020-03-24/fixes

make dist: add missing files

4 years agoMerge pull request #3324 from stgraber/master
Christian Brauner [Tue, 24 Mar 2020 19:38:41 +0000 (20:38 +0100)]
Merge pull request #3324 from stgraber/master

lxc-download: Pre-release bump of compat

4 years agomake dist: add missing files
Christian Brauner [Tue, 24 Mar 2020 19:37:00 +0000 (20:37 +0100)]
make dist: add missing files

deleted:    CODING_STYLE.md
deleted:    LICENSE.GPL2
deleted:    LICENSE.LGPL2.1
deleted:    README.md
deleted:    coccinelle/exit.cocci
deleted:    coccinelle/run-coccinelle.sh
deleted:    coccinelle/while-true.cocci
deleted:    doc/api-extensions.md
deleted:    src/tests/lxc-test-exit-code
deleted:    src/tests/travis.sh

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agolxc-download: Pre-release bump of compat
Stéphane Graber [Tue, 24 Mar 2020 18:44:08 +0000 (14:44 -0400)]
lxc-download: Pre-release bump of compat

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
4 years agoMerge pull request #3323 from tych0/fix-readonly-bind-mounts
Christian Brauner [Tue, 24 Mar 2020 17:59:10 +0000 (18:59 +0100)]
Merge pull request #3323 from tych0/fix-readonly-bind-mounts

conf: fix read-only bind mounts

4 years agoconf: fix read-only bind mounts
Tycho Andersen [Tue, 24 Mar 2020 16:16:50 +0000 (10:16 -0600)]
conf: fix read-only bind mounts

Here we would always set MS_RDONLY in required_flags if it was set in
mountflags, so the expression:

!(required_flags & ~mountflags)

would always be true, and we would always skip the remount.

Instead, let's treat readonly as special: always do the remount if
MS_RDONLY is present. Unfortunately it doesn't seem to show up in
sb.f_flag, so we can't use the same path as everything else.

This only inadvertently worked before because of a bug fixed in
f75917858023 ("conf: don't accidently double-mount").

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
4 years agoMerge pull request #3322 from brauner/2020-03-24/fixes
Stéphane Graber [Mon, 23 Mar 2020 15:32:09 +0000 (11:32 -0400)]
Merge pull request #3322 from brauner/2020-03-24/fixes

utils: allow removal of immutable files

4 years agoutils: allow removal of immutable files
Christian Brauner [Mon, 23 Mar 2020 15:06:40 +0000 (16:06 +0100)]
utils: allow removal of immutable files

Closes #3185.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3321 from brauner/2020-03-24/fixes
Stéphane Graber [Mon, 23 Mar 2020 13:02:49 +0000 (09:02 -0400)]
Merge pull request #3321 from brauner/2020-03-24/fixes

lxc-update-config: handle lxc.rootfs.backend correctly

4 years agolxc-local: remove -l/--list from help
Christian Brauner [Mon, 23 Mar 2020 12:23:19 +0000 (13:23 +0100)]
lxc-local: remove -l/--list from help

Closes #2877.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agolvm: don't generate uuid for ext4 snapshots
Christian Brauner [Mon, 23 Mar 2020 12:15:29 +0000 (13:15 +0100)]
lvm: don't generate uuid for ext4 snapshots

only btrfs and xfs need it.

Closes #2375.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agolxc-update-config: handle lxc.rootfs.backend correctly
Christian Brauner [Mon, 23 Mar 2020 11:29:38 +0000 (12:29 +0100)]
lxc-update-config: handle lxc.rootfs.backend correctly

Closes #2424.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3320 from brauner/2020-03-22/fixes
Stéphane Graber [Sun, 22 Mar 2020 19:22:37 +0000 (15:22 -0400)]
Merge pull request #3320 from brauner/2020-03-22/fixes

overlay: rewrite

4 years agolxc_copy: only overmount overlay subdirectory with tmpfs
Christian Brauner [Sun, 22 Mar 2020 17:28:06 +0000 (18:28 +0100)]
lxc_copy: only overmount overlay subdirectory with tmpfs

Closes #2959.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agooverlay: rewrite and simplify
Christian Brauner [Sun, 22 Mar 2020 13:03:03 +0000 (14:03 +0100)]
overlay: rewrite and simplify

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3319 from brauner/2020-03-21/fixes
Stéphane Graber [Sat, 21 Mar 2020 11:22:51 +0000 (07:22 -0400)]
Merge pull request #3319 from brauner/2020-03-21/fixes

network: fixes

4 years agolxc-user-nic: enable uid-marked veth devices for uids with 5 digits
Christian Brauner [Sat, 21 Mar 2020 10:52:15 +0000 (11:52 +0100)]
lxc-user-nic: enable uid-marked veth devices for uids with 5 digits

With the newly extended lxc_ifname_alnum_case_sensitive() we'll have 62^4
unique network device names per user.

Closes #3176.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agonetwork: introduce lxc_ifname_alnum_case_sensitive()
Christian Brauner [Sat, 21 Mar 2020 10:50:59 +0000 (11:50 +0100)]
network: introduce lxc_ifname_alnum_case_sensitive()

Right now we have 36^n unique network device names. Let's make it 62^n.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3318 from brauner/2020-03-20/fixes
Stéphane Graber [Fri, 20 Mar 2020 21:32:10 +0000 (17:32 -0400)]
Merge pull request #3318 from brauner/2020-03-20/fixes

log: fix cmd logging

4 years agolog: fix cmd logging
Christian Brauner [Fri, 20 Mar 2020 21:02:12 +0000 (22:02 +0100)]
log: fix cmd logging

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3317 from brauner/2020-03-20/fixes
Stéphane Graber [Fri, 20 Mar 2020 17:45:06 +0000 (13:45 -0400)]
Merge pull request #3317 from brauner/2020-03-20/fixes

mainloop, ringbuf: cleanup

4 years agocgroups: simplify
Christian Brauner [Fri, 20 Mar 2020 17:30:53 +0000 (18:30 +0100)]
cgroups: simplify

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3316 from brauner/2020-03-20/fixes
Stéphane Graber [Fri, 20 Mar 2020 17:24:42 +0000 (13:24 -0400)]
Merge pull request #3316 from brauner/2020-03-20/fixes

log: fixes

4 years agoringbuf: fix cleanup operations
Christian Brauner [Fri, 20 Mar 2020 17:18:37 +0000 (18:18 +0100)]
ringbuf: fix cleanup operations

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agomainloop: cleanup
Christian Brauner [Fri, 20 Mar 2020 17:02:42 +0000 (18:02 +0100)]
mainloop: cleanup

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agolog: add missing variable and fix CMD_SYSINFO()
Christian Brauner [Fri, 20 Mar 2020 16:53:05 +0000 (17:53 +0100)]
log: add missing variable and fix CMD_SYSINFO()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agolog: cleanup
Christian Brauner [Fri, 20 Mar 2020 16:49:48 +0000 (17:49 +0100)]
log: cleanup

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3315 from brauner/2020-03-20/fixes
Stéphane Graber [Fri, 20 Mar 2020 15:16:02 +0000 (11:16 -0400)]
Merge pull request #3315 from brauner/2020-03-20/fixes

log: add missing \

4 years agolog: add missing \
Christian Brauner [Fri, 20 Mar 2020 15:00:36 +0000 (16:00 +0100)]
log: add missing \

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3314 from brauner/2020-03-20/fixes
Stéphane Graber [Fri, 20 Mar 2020 14:39:15 +0000 (10:39 -0400)]
Merge pull request #3314 from brauner/2020-03-20/fixes

start: move reading seccomp profile after pre-start hook

4 years agostart: move reading seccomp profile after pre-start hook
Christian Brauner [Fri, 20 Mar 2020 14:25:41 +0000 (15:25 +0100)]
start: move reading seccomp profile after pre-start hook

This allows users to generate custom profiles at startup.

Closes #1848.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3313 from brauner/2020-03-20/fixes
Stéphane Graber [Fri, 20 Mar 2020 13:20:09 +0000 (09:20 -0400)]
Merge pull request #3313 from brauner/2020-03-20/fixes

network: fixes

4 years agolxc_user_nic: rework device creation
Christian Brauner [Fri, 20 Mar 2020 13:04:17 +0000 (14:04 +0100)]
lxc_user_nic: rework device creation

Closes #3058.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agonl: improve how we surface errors
Christian Brauner [Fri, 20 Mar 2020 12:04:23 +0000 (13:04 +0100)]
nl: improve how we surface errors

Closes #3057.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3312 from brauner/2020-03-20/fixes
Stéphane Graber [Fri, 20 Mar 2020 11:50:29 +0000 (07:50 -0400)]
Merge pull request #3312 from brauner/2020-03-20/fixes

network: use cleanup macros

4 years agonetwork: use cleanup macros
Christian Brauner [Fri, 20 Mar 2020 11:16:17 +0000 (12:16 +0100)]
network: use cleanup macros

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3310 from brauner/2020-03-19/fixes
Stéphane Graber [Fri, 20 Mar 2020 02:57:12 +0000 (22:57 -0400)]
Merge pull request #3310 from brauner/2020-03-19/fixes

network: fix ovs removal

4 years agonetwork: use cleanup attributes
Christian Brauner [Thu, 19 Mar 2020 16:34:18 +0000 (17:34 +0100)]
network: use cleanup attributes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agonetwork: cleanup galore
Christian Brauner [Thu, 19 Mar 2020 16:09:13 +0000 (17:09 +0100)]
network: cleanup galore

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agonetwork: use is_empty_string() everywhere
Christian Brauner [Thu, 19 Mar 2020 15:32:48 +0000 (16:32 +0100)]
network: use is_empty_string() everywhere

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agonetwork: fix ovs removal
Christian Brauner [Thu, 19 Mar 2020 15:08:44 +0000 (16:08 +0100)]
network: fix ovs removal

Closes #3137.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3309 from brauner/2020-03-19/fixes
Stéphane Graber [Thu, 19 Mar 2020 13:53:48 +0000 (09:53 -0400)]
Merge pull request #3309 from brauner/2020-03-19/fixes

tree-wide: logging fixes and hardening

4 years agolog: use global variable to catch statements in loggers
Christian Brauner [Thu, 19 Mar 2020 13:28:02 +0000 (14:28 +0100)]
log: use global variable to catch statements in loggers

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3308 from brauner/2020-03-19/fixes
Stéphane Graber [Thu, 19 Mar 2020 13:30:47 +0000 (09:30 -0400)]
Merge pull request #3308 from brauner/2020-03-19/fixes

conf: flatten logic in mount_entry()

4 years agocgroups: don't call statements from loggers
Christian Brauner [Thu, 19 Mar 2020 13:27:29 +0000 (14:27 +0100)]
cgroups: don't call statements from loggers

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoconf: flatten logic in mount_entry()
Christian Brauner [Thu, 19 Mar 2020 12:27:51 +0000 (13:27 +0100)]
conf: flatten logic in mount_entry()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3307 from brauner/2020-03-19/fixes
Stéphane Graber [Thu, 19 Mar 2020 12:38:37 +0000 (08:38 -0400)]
Merge pull request #3307 from brauner/2020-03-19/fixes

network: fixes

4 years agoconf: don't accidently double-mount
Christian Brauner [Thu, 19 Mar 2020 12:11:03 +0000 (13:11 +0100)]
conf: don't accidently double-mount

Closes #3073.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agonetwork: fix moving network devices with custom name
Christian Brauner [Thu, 19 Mar 2020 11:46:00 +0000 (12:46 +0100)]
network: fix moving network devices with custom name

Closes #1271.
Closes #3131.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agonetwork: introduce and use is_empty_string()
Christian Brauner [Thu, 19 Mar 2020 11:45:23 +0000 (12:45 +0100)]
network: introduce and use is_empty_string()

since some members of struct lxc_netdev are arrays, not pointers.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3306 from brauner/2020-03-18/fixes
Stéphane Graber [Wed, 18 Mar 2020 17:44:14 +0000 (13:44 -0400)]
Merge pull request #3306 from brauner/2020-03-18/fixes

Makefile: fix typo

4 years agoMakefile: fix typo
Christian Brauner [Wed, 18 Mar 2020 17:24:16 +0000 (18:24 +0100)]
Makefile: fix typo

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoMerge pull request #3305 from brauner/2020-03-18/fixes
Stéphane Graber [Wed, 18 Mar 2020 16:48:54 +0000 (12:48 -0400)]
Merge pull request #3305 from brauner/2020-03-18/fixes

lxc-unshare: add syscall_wrappers.h to build requirements

4 years agolxc-unshare: add syscall_wrappers.h to build requirements
Christian Brauner [Wed, 18 Mar 2020 15:07:15 +0000 (16:07 +0100)]
lxc-unshare: add syscall_wrappers.h to build requirements

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