]> git.proxmox.com Git - mirror_lxc.git/log
mirror_lxc.git
6 years agocmd: Use 'void' instead of empty parameter list
Tobin C. Harding [Fri, 17 Aug 2018 05:44:25 +0000 (15:44 +1000)]
cmd: Use 'void' instead of empty parameter list

checkpatch warns because of function definitions using empty parameter
list.  We should define these functions with 'void' as the parameter.

Use 'void' instead of empty parameter list for function definitions.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
6 years agocmd: Use parenthesis around complex macro
Tobin C. Harding [Fri, 17 Aug 2018 05:42:32 +0000 (15:42 +1000)]
cmd: Use parenthesis around complex macro

checkpatch emits error:

    ERROR: Macros with complex values should be enclosed in parentheses

Safeguard macro by use of parenthesis.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
6 years agoMerge pull request #2535 from brauner/2018-08-16/cmd_fixes
Stéphane Graber [Thu, 16 Aug 2018 15:44:27 +0000 (11:44 -0400)]
Merge pull request #2535 from brauner/2018-08-16/cmd_fixes

log: add logging tools for commands; lxc-usernsexec: cleanup and bugfixes

6 years agolxc-usernsexec: cleanup and bugfixes
Christian Brauner [Thu, 16 Aug 2018 11:03:36 +0000 (13:03 +0200)]
lxc-usernsexec: cleanup and bugfixes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolog: add CMD_SYSINFO()
Christian Brauner [Thu, 16 Aug 2018 11:03:21 +0000 (13:03 +0200)]
log: add  CMD_SYSINFO()

Add a thread-safe and uniform way to retrieve errno values in programs that are
shipped as part of LXC but are not expected to have access to the logging
system.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolog: add CMD_SYSERROR()
Christian Brauner [Thu, 16 Aug 2018 11:01:54 +0000 (13:01 +0200)]
log: add  CMD_SYSERROR()

Add a thread-safe and uniform way to retrieve errno values in programs that are
shipped as part of LXC but are not expected to have access to the logging
system.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2534 from tcharding/checkpatch
Christian Brauner [Thu, 16 Aug 2018 08:40:10 +0000 (10:40 +0200)]
Merge pull request #2534 from tcharding/checkpatch

Checkpatch

6 years agoMerge pull request #2532 from tcharding/unshare-err
Christian Brauner [Thu, 16 Aug 2018 07:16:10 +0000 (09:16 +0200)]
Merge pull request #2532 from tcharding/unshare-err

usernsexec: Make err out vebose for unshare error

6 years agocmd: Move assignment out of if statement
Tobin C. Harding [Thu, 16 Aug 2018 07:04:58 +0000 (17:04 +1000)]
cmd: Move assignment out of if statement

checkpatch.pl emits error

    ERROR: do not use assignment in if condition

Move assignment out of if statement.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
6 years agocmd: Fix whitespace ERRORS
Tobin C. Harding [Thu, 16 Aug 2018 07:01:30 +0000 (17:01 +1000)]
cmd: Fix whitespace ERRORS

checkpatch.pl emits a bunch of warnings about various whitespace
issues.  Fix all these as a single patch since they are all whitespace
only changes.

Fix whitespace issues found by checkpatch.pl

Signed-off-by: Tobin C. Harding <me@tobin.cc>
6 years agocmd: Do not initialise statics to 0
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>
6 years agocmd: Correctly indent switch statement
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>
6 years agousernsexec: Make err out vebose for unshare error
Tobin C. Harding [Wed, 15 Aug 2018 23:43:02 +0000 (09:43 +1000)]
usernsexec: Make err out vebose for unshare error

Currently if lxc-usernsexec is run on a kernel without user namespaces
enabled the error message is

unshare: Invalid argument
read pipe: Success

This error message 'Invalid argument' does not point at the root cause
of the error.  We can help the user out by giving a more detailed error
message and also not using perror() if errno==0.

Improve error message by
 - Printing unshare flags
 - Printing suggested cause of failure (user namespace not enabled)
 - Print error message with fprintf() if errno==0 (EOF)

Signed-off-by: Tobin C. Harding <me@tobin.cc>
6 years agoMerge pull request #2533 from tcharding/docs
Christian Brauner [Thu, 16 Aug 2018 05:37:07 +0000 (07:37 +0200)]
Merge pull request #2533 from tcharding/docs

doc: Fix minor grammatical errors

6 years agodoc: Fix minor grammatical errors
Tobin C. Harding [Thu, 16 Aug 2018 05:28:31 +0000 (15:28 +1000)]
doc: Fix minor grammatical errors

Current we have a few minor grammatical errors in the documentation for
lxc container configuration.

Fix minor grammatical errors.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
6 years agoMerge pull request #2531 from brauner/2018-08-16/minor_fixes
Stéphane Graber [Thu, 16 Aug 2018 00:26:08 +0000 (20:26 -0400)]
Merge pull request #2531 from brauner/2018-08-16/minor_fixes

state: s/sleep()/nanosleep()/

6 years agostate: s/sleep()/nanosleep()/
Christian Brauner [Wed, 15 Aug 2018 22:39:50 +0000 (00:39 +0200)]
state: s/sleep()/nanosleep()/

sleep() is not thread-safe but nanosleep() is. Since no resources are allocated
in lxc_wait() it is safe to call nanosleep() without cancellation handlers.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoMerge pull request #2530 from brauner/2018-08-16/minor_fixes
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

6 years agolxccontainer: 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>
6 years agoMerge pull request #2527 from brauner/2018-08-15/file_lock_fixes
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

6 years agolxclock: 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>
6 years agolxccontainer: improve file locking
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>
6 years agoMerge pull request #2526 from brauner/2018-08-14/fix_ongoing_create_check
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

6 years agolxccontainer: 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>
6 years agoMerge pull request #2525 from 2xsec/bugfix
Christian Brauner [Tue, 14 Aug 2018 07:33:14 +0000 (09:33 +0200)]
Merge pull request #2525 from 2xsec/bugfix

coverity: #1438392

6 years agocoverity: #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>
6 years agoMerge pull request #2524 from 2xsec/bugfix
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)

6 years agofix 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>
6 years agomacro: remove duplicated define
2xsec [Mon, 13 Aug 2018 07:52:24 +0000 (16:52 +0900)]
macro: remove duplicated define

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agoMerge pull request #2521 from brauner/2018-08-11/fix_netnsid_allocation
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}

6 years agonetlink: 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>
6 years agoMerge pull request #2520 from brauner/2018-08-11/fix_netnsid_allocation
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

6 years agostart: make netnsid allocation failures non-fatal
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>
6 years agonetns: improve netnsid allocation
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>
6 years agomacro: add NLMSG_ERROR
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>
6 years agoMerge pull request #2519 from 2xsec/bugfix
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

6 years agofix 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>
6 years agoMerge pull request #2516 from 2xsec/bugfix
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

6 years agofix tainted int loop bound issue
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>
6 years agotests: containertests: fix dereference pointer c
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>
6 years agoMerge pull request #2518 from brauner/2018-08-09/network_netns_id
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()

6 years agonetwork: 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>
6 years agoMerge pull request #2515 from brauner/2018-02-06/network_netns_id
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

6 years agonetns: vendor NETNSA_*
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>
6 years agotravis: add linux-libc-dev
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>
6 years agomacro: move network macros from utils.h
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>
6 years agonetns: allocate network namespace id
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>
6 years agoMAINTAINERS: add Wolfgang Bumiller
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>
6 years agoMerge pull request #2513 from brauner/2018-08-06/fix_busybox
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

6 years agoCVE 2018-6556: verify netns fd in lxc-user-nic
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>
6 years agotemplates: avoid endless loop
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>
6 years agoMerge pull request #2495 from 2xsec/bugfix
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

6 years agoMerge pull request #2511 from 2xsec/coverity
Christian Brauner [Mon, 6 Aug 2018 09:32:33 +0000 (11:32 +0200)]
Merge pull request #2511 from 2xsec/coverity

fix coverity issues

6 years agocoverity: #1438232
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>
6 years agopam_cgfs: cleanups
2xsec [Mon, 6 Aug 2018 05:36:05 +0000 (14:36 +0900)]
pam_cgfs: cleanups

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agocoverity: #1438231
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>
6 years agocoverity: #1438230
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>
6 years agocoverity: #1438229
2xsec [Mon, 6 Aug 2018 05:01:33 +0000 (14:01 +0900)]
coverity: #1438229

Resource leak

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agocoverity: #1438233
2xsec [Mon, 6 Aug 2018 04:54:34 +0000 (13:54 +0900)]
coverity: #1438233

Resource leak

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agocoverity: #1438234
2xsec [Mon, 6 Aug 2018 04:44:46 +0000 (13:44 +0900)]
coverity: #1438234

Resource leak

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agocoverity: #1438235
2xsec [Mon, 6 Aug 2018 04:19:53 +0000 (13:19 +0900)]
coverity: #1438235

Resource leak

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agocoverity: #1438236
2xsec [Mon, 6 Aug 2018 04:12:00 +0000 (13:12 +0900)]
coverity: #1438236

Resource leak

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agotools: lxc-unshare: apply default log priority
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>
6 years agolog: add default log priority
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>
6 years agolog: function cleanups
2xsec [Mon, 6 Aug 2018 02:23:41 +0000 (11:23 +0900)]
log: function cleanups

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agoMerge pull request #2510 from brauner/2018-08-05/cap_fixes
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()

6 years agotree-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>
6 years agoMerge pull request #2508 from brauner/2018-08-04/cap_fixes
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

6 years agolog: 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>
6 years agocaps: bugfixes
Christian Brauner [Sat, 4 Aug 2018 18:12:56 +0000 (20:12 +0200)]
caps: bugfixes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agomacro: add new macro header
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>
6 years agotravis: export CFLAGS=-O0 for coverity
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>
6 years agotravis: build with -O0 for coverity
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>
6 years agoMerge pull request #2505 from brauner/2018-07-31/bugfixes
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

6 years agoREADEM: update Serge's mail address
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>
6 years agocoverity: #438136
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>
6 years agoMerge pull request #2503 from tenforward/japanese
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

6 years agodoc: 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>
6 years agoMerge pull request #2499 from brauner/lxc/master
Stéphane Graber [Mon, 30 Jul 2018 18:57:23 +0000 (14:57 -0400)]
Merge pull request #2499 from brauner/lxc/master

bugfixes

6 years agoMerge pull request #2475 from brauner/2018-07-16/monitor_signal_pdeath
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

6 years agoMerge pull request #2502 from brauner/2018-07-27/fix_max_devpts_option
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

6 years agoconf: don't return a clobbered errno value
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>
6 years agoconf: mount devpts without "max" on EINVAL
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>
6 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

6 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>
6 years agocaps: handle EINTR in read()
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>
6 years agolog: handle EINTR in read()
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>
6 years agoutils: s/read()/lxc_read_nointr()/g
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>
6 years agoterminal: s/read()/lxc_read_nointr()/g
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>
6 years agomonitor: s/write()/lxc_write_nointr()/g
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>
6 years agomonitor: s/read()/lxc_read_nointr()/g
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>
6 years agoapparmor: s/read()/lxc_read_nointr()/g
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>
6 years agotools: s/write()/lxc_write_nointr()/g
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>
6 years agotools: s/read()/lxc_read_nointr()/g
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>
6 years agosync: s/write()/lxc_write_nointr()/g
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>
6 years agosync: s/read()/lxc_read_nointr()/g
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>
6 years agonetwork: s/write()/lxc_write_nointr()/g
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>
6 years agonetwork: s/read()/lxc_read_nointr()/g
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>
6 years agolxccontainer: s/read()/lxc_read_nointr()/g
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>
6 years agolxccontainer: s/write()/lxc_write_nointr()/g
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>