]>
git.proxmox.com Git - mirror_lxc.git/log
Tobin C. Harding [Thu, 16 Aug 2018 06:57:36 +0000 (16:57 +1000)]
cmd: Do not initialise statics to 0
checkpatch.pl emits error
ERROR: do not initialise statics to 0
Do not initialise statics to 0.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Tobin C. Harding [Thu, 16 Aug 2018 06:55:09 +0000 (16:55 +1000)]
cmd: Correctly indent switch statement
checkpatch.pl emits error
ERROR: do not use assignment in if condition
Correctly indent switch statement.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Stéphane Graber [Wed, 15 Aug 2018 22:35:17 +0000 (18:35 -0400)]
Merge pull request #2530 from brauner/2018-08-16/minor_fixes
lxccontainer: minor fixes
Christian Brauner [Wed, 15 Aug 2018 22:20:46 +0000 (00:20 +0200)]
lxccontainer: minor fixes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Stéphane Graber [Wed, 15 Aug 2018 03:23:24 +0000 (23:23 -0400)]
Merge pull request #2527 from brauner/2018-08-15/file_lock_fixes
lxccontainer: improve file locking
Christian Brauner [Tue, 14 Aug 2018 22:58:59 +0000 (00:58 +0200)]
lxclock: improve file locking
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 14 Aug 2018 22:37:05 +0000 (00:37 +0200)]
lxccontainer: improve file locking
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Stéphane Graber [Tue, 14 Aug 2018 13:49:23 +0000 (09:49 -0400)]
Merge pull request #2526 from brauner/2018-08-14/fix_ongoing_create_check
lxccontainer: fix F_OFD_GETLK checks
Christian Brauner [Tue, 14 Aug 2018 11:00:29 +0000 (13:00 +0200)]
lxccontainer: fix F_OFD_GETLK checks
When we check whether an open file description lock has been taken on a file we
need to set the l_pid field to 0 otherwise the kernel will send back EINVAL.
Additionally, the kernel will not do pid translation and simply set the l_pid
value to -1.
Fixes https://discuss.linuxcontainers.org/t/container-deleted-or-stopped-when-lxc-ls-executed-concurrently/2439
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 14 Aug 2018 07:33:14 +0000 (09:33 +0200)]
Merge pull request #2525 from 2xsec/bugfix
coverity: #
1438392
2xsec [Tue, 14 Aug 2018 04:29:50 +0000 (13:29 +0900)]
coverity: #
1438392
Dereference before null check
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
Christian Brauner [Mon, 13 Aug 2018 11:07:37 +0000 (13:07 +0200)]
Merge pull request #2524 from 2xsec/bugfix
fix thread-safe issue (localtime => localtime_r)
2xsec [Mon, 13 Aug 2018 07:53:30 +0000 (16:53 +0900)]
fix thread safe issue(localtime => localtime_r)
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Mon, 13 Aug 2018 07:52:24 +0000 (16:52 +0900)]
macro: remove duplicated define
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
Stéphane Graber [Sun, 12 Aug 2018 00:17:29 +0000 (20:17 -0400)]
Merge pull request #2521 from brauner/2018-08-11/fix_netnsid_allocation
netlink: add __netlink_{send,recv,transaction}
Christian Brauner [Sat, 11 Aug 2018 14:25:14 +0000 (16:25 +0200)]
netlink: add __netlink_{send,recv,transaction}
These allow to pass a struct nlmsghdr directly and are used in the higher level
netlink_{send,rcv,transaction}.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Stéphane Graber [Sat, 11 Aug 2018 00:40:51 +0000 (20:40 -0400)]
Merge pull request #2520 from brauner/2018-08-11/fix_netnsid_allocation
netns: improve netnsid allocation
Christian Brauner [Sat, 11 Aug 2018 00:23:16 +0000 (02:23 +0200)]
start: make netnsid allocation failures non-fatal
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 11 Aug 2018 00:21:34 +0000 (02:21 +0200)]
netns: improve netnsid allocation
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 11 Aug 2018 00:21:14 +0000 (02:21 +0200)]
macro: add NLMSG_ERROR
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Fri, 10 Aug 2018 12:58:51 +0000 (14:58 +0200)]
Merge pull request #2519 from 2xsec/bugfix
fix assignment of signed to bigger unsigned issue
2xsec [Fri, 10 Aug 2018 11:37:27 +0000 (20:37 +0900)]
fix assignment of signed to bigger unsigned issue
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
Christian Brauner [Fri, 10 Aug 2018 10:53:36 +0000 (12:53 +0200)]
Merge pull request #2516 from 2xsec/bugfix
tests: containertests: fix dereference pointer c
2xsec [Fri, 10 Aug 2018 04:01:51 +0000 (13:01 +0900)]
fix tainted int loop bound issue
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Thu, 9 Aug 2018 04:37:22 +0000 (13:37 +0900)]
tests: containertests: fix dereference pointer c
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
Stéphane Graber [Thu, 9 Aug 2018 18:11:42 +0000 (14:11 -0400)]
Merge pull request #2518 from brauner/2018-08-09/network_netns_id
network: type fixes lxc_netns_set_nsid()
Christian Brauner [Thu, 9 Aug 2018 17:53:03 +0000 (19:53 +0200)]
network: type fixes lxc_netns_set_nsid()
The kernel expects a __s32 for NETNSA_NSID and a __u32 for NETNSA_FD.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Stéphane Graber [Wed, 8 Aug 2018 16:04:19 +0000 (12:04 -0400)]
Merge pull request #2515 from brauner/2018-02-06/network_netns_id
netns: allocate network namespace id
Christian Brauner [Wed, 8 Aug 2018 11:51:40 +0000 (13:51 +0200)]
netns: vendor NETNSA_*
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 8 Aug 2018 11:40:24 +0000 (13:40 +0200)]
travis: add linux-libc-dev
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Wed, 8 Aug 2018 11:05:45 +0000 (13:05 +0200)]
macro: move network macros from utils.h
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 6 Feb 2018 19:16:40 +0000 (20:16 +0100)]
netns: allocate network namespace id
Start to allocate a new network namespace id for each container.
Relates to https://github.com/lxc/lxd/issues/4831.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 7 Aug 2018 13:01:19 +0000 (15:01 +0200)]
MAINTAINERS: add Wolfgang Bumiller
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Stéphane Graber [Mon, 6 Aug 2018 16:34:44 +0000 (12:34 -0400)]
Merge pull request #2513 from brauner/2018-08-06/fix_busybox
templates: avoid endless loop
Christian Brauner [Wed, 25 Jul 2018 17:56:54 +0000 (19:56 +0200)]
CVE 2018-6556: verify netns fd in lxc-user-nic
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Mon, 6 Aug 2018 14:43:35 +0000 (16:43 +0200)]
templates: avoid endless loop
Closes #2512.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Mon, 6 Aug 2018 09:35:35 +0000 (11:35 +0200)]
Merge pull request #2495 from 2xsec/bugfix
add default log priority & cleanups
Christian Brauner [Mon, 6 Aug 2018 09:32:33 +0000 (11:32 +0200)]
Merge pull request #2511 from 2xsec/coverity
fix coverity issues
2xsec [Mon, 6 Aug 2018 07:57:53 +0000 (16:57 +0900)]
coverity: #
1438232
Failure to restore non-local value
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Mon, 6 Aug 2018 05:36:05 +0000 (14:36 +0900)]
pam_cgfs: cleanups
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Mon, 6 Aug 2018 05:11:46 +0000 (14:11 +0900)]
coverity: #
1438231
Dereference after null check
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Mon, 6 Aug 2018 05:03:22 +0000 (14:03 +0900)]
coverity: #
1438230
Logically dead code
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Mon, 6 Aug 2018 05:01:33 +0000 (14:01 +0900)]
coverity: #
1438229
Resource leak
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Mon, 6 Aug 2018 04:54:34 +0000 (13:54 +0900)]
coverity: #
1438233
Resource leak
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Mon, 6 Aug 2018 04:44:46 +0000 (13:44 +0900)]
coverity: #
1438234
Resource leak
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Mon, 6 Aug 2018 04:19:53 +0000 (13:19 +0900)]
coverity: #
1438235
Resource leak
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Mon, 6 Aug 2018 04:12:00 +0000 (13:12 +0900)]
coverity: #
1438236
Resource leak
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Mon, 6 Aug 2018 03:58:01 +0000 (12:58 +0900)]
tools: lxc-unshare: apply default log priority
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Mon, 6 Aug 2018 03:50:31 +0000 (12:50 +0900)]
log: add default log priority
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2xsec [Mon, 6 Aug 2018 02:23:41 +0000 (11:23 +0900)]
log: function cleanups
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
Stéphane Graber [Sun, 5 Aug 2018 14:18:55 +0000 (10:18 -0400)]
Merge pull request #2510 from brauner/2018-08-05/cap_fixes
tree-wide: pass unsigned long to prctl()
Christian Brauner [Sun, 5 Aug 2018 12:04:03 +0000 (14:04 +0200)]
tree-wide: pass unsigned long to prctl()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Stéphane Graber [Sat, 4 Aug 2018 19:55:32 +0000 (15:55 -0400)]
Merge pull request #2508 from brauner/2018-08-04/cap_fixes
macro: add new macro header, caps: bugfixes, log: bugfixes
Christian Brauner [Sat, 4 Aug 2018 18:41:59 +0000 (20:41 +0200)]
log: bugfixes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 4 Aug 2018 18:12:56 +0000 (20:12 +0200)]
caps: bugfixes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 4 Aug 2018 18:11:58 +0000 (20:11 +0200)]
macro: add new macro header
This allows us to use a bunch of macros in our static build for init.lxc.static
without having to link against all of utils.{c,h}.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 4 Aug 2018 16:06:11 +0000 (18:06 +0200)]
travis: export CFLAGS=-O0 for coverity
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sat, 4 Aug 2018 15:50:33 +0000 (17:50 +0200)]
travis: build with -O0 for coverity
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Stéphane Graber [Tue, 31 Jul 2018 14:55:16 +0000 (10:55 -0400)]
Merge pull request #2505 from brauner/2018-07-31/bugfixes
coverity: #438136
Christian Brauner [Tue, 31 Jul 2018 11:52:12 +0000 (13:52 +0200)]
READEM: update Serge's mail address
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Serge Hallyn <serge@hallyn.com>
Christian Brauner [Tue, 31 Jul 2018 08:55:52 +0000 (10:55 +0200)]
coverity: #438136
String not null terminated
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Tue, 31 Jul 2018 07:17:47 +0000 (09:17 +0200)]
Merge pull request #2503 from tenforward/japanese
doc: Add incompatibility with network type=none into Japanese man
KATOH Yasufumi [Tue, 31 Jul 2018 07:03:31 +0000 (16:03 +0900)]
doc: Add incompatibility with network type=none into Japanese man
Update for commit
e4b3e36
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Stéphane Graber [Mon, 30 Jul 2018 18:57:23 +0000 (14:57 -0400)]
Merge pull request #2499 from brauner/lxc/master
bugfixes
Stéphane Graber [Mon, 30 Jul 2018 18:56:54 +0000 (14:56 -0400)]
Merge pull request #2475 from brauner/2018-07-16/monitor_signal_pdeath
conf: improve rootfs setup
Stéphane Graber [Mon, 30 Jul 2018 18:56:19 +0000 (14:56 -0400)]
Merge pull request #2502 from brauner/2018-07-27/fix_max_devpts_option
conf: mount devpts without "max" on EINVAL
Wolfgang Bumiller [Mon, 30 Jul 2018 18:30:50 +0000 (20:30 +0200)]
conf: don't return a clobbered errno value
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Christian Brauner [Mon, 30 Jul 2018 13:55:09 +0000 (15:55 +0200)]
conf: mount devpts without "max" on EINVAL
The "max" option to devpts got introduced in kernel 3.4.
Closes #2490.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
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
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>
Christian Brauner [Sun, 29 Jul 2018 21:57:30 +0000 (23:57 +0200)]
caps: handle EINTR in read()
We don't want to link caps.{c,h} against utils.{c,h} for the sake of our static
builds init.lxc.static. This means lxc_write_nointr() will not be available. So
handle it EINTR.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 21:54:32 +0000 (23:54 +0200)]
log: handle EINTR in read()
We don't want to link log.{c,h} against utils.{c,h} for the sake of our static
builds init.lxc.static. This means lxc_write_nointr() will not be available. So
handle it EINTR.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 22:03:03 +0000 (00:03 +0200)]
utils: s/read()/lxc_read_nointr()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 22:02:10 +0000 (00:02 +0200)]
terminal: s/read()/lxc_read_nointr()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 22:00:19 +0000 (00:00 +0200)]
monitor: s/write()/lxc_write_nointr()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 22:00:00 +0000 (00:00 +0200)]
monitor: s/read()/lxc_read_nointr()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 21:59:22 +0000 (23:59 +0200)]
apparmor: s/read()/lxc_read_nointr()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 21:55:28 +0000 (23:55 +0200)]
tools: s/write()/lxc_write_nointr()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 21:56:33 +0000 (23:56 +0200)]
tools: s/read()/lxc_read_nointr()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 21:51:02 +0000 (23:51 +0200)]
sync: s/write()/lxc_write_nointr()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 21:50:51 +0000 (23:50 +0200)]
sync: s/read()/lxc_read_nointr()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 21:49:32 +0000 (23:49 +0200)]
network: s/write()/lxc_write_nointr()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 21:49:05 +0000 (23:49 +0200)]
network: s/read()/lxc_read_nointr()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 21:48:28 +0000 (23:48 +0200)]
lxccontainer: s/read()/lxc_read_nointr()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 21:47:57 +0000 (23:47 +0200)]
lxccontainer: s/write()/lxc_write_nointr()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 21:47:15 +0000 (23:47 +0200)]
criu: s/write()/lxc_write_nointr()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 21:46:54 +0000 (23:46 +0200)]
criu: s/read()/lxc_read_nointr()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 21:45:51 +0000 (23:45 +0200)]
cmd: s/read()/lxc_read_nointr()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 21:45:18 +0000 (23:45 +0200)]
cmd: s/write()/lxc_write_nointr()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 20:59:37 +0000 (22:59 +0200)]
cmd: s/pipe()/pipe2()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 21:09:45 +0000 (23:09 +0200)]
lxccontainer: s/pipe()/pipe2()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 21:09:13 +0000 (23:09 +0200)]
lxccontainer: cleanup do_lxcapi_get_interfaces()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 21:07:33 +0000 (23:07 +0200)]
criu: s/pipe()/pipe2()/
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 21:03:32 +0000 (23:03 +0200)]
conf: always close pipe in run_userns_fn()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 21:02:14 +0000 (23:02 +0200)]
conf: s/pipe()/pipe2()/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
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
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>
Christian Brauner [Sun, 29 Jul 2018 12:35:09 +0000 (14:35 +0200)]
confile: split mount options into flags and data
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian Brauner [Sun, 29 Jul 2018 12:31:31 +0000 (14:31 +0200)]
conf: improve rootfs setup
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
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