]> git.ipfire.org Git - thirdparty/lxc.git/log
thirdparty/lxc.git
6 years agostorage_utils: move duplicated function from tools 2546/head
2xsec [Sat, 18 Aug 2018 09:05:32 +0000 (18:05 +0900)] 
storage_utils: move duplicated function from tools

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agotools: lxc-unfreeze: add default log priority & cleanups 2544/head
2xsec [Fri, 17 Aug 2018 16:42:15 +0000 (01:42 +0900)] 
tools: lxc-unfreeze: add default log priority & cleanups

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agotools: lxc-freeze: add default log priority & cleanups
2xsec [Fri, 17 Aug 2018 16:41:51 +0000 (01:41 +0900)] 
tools: lxc-freeze: add default log priority & cleanups

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agotools: lxc-stop: add default log priority & cleanups
2xsec [Fri, 17 Aug 2018 16:41:06 +0000 (01:41 +0900)] 
tools: lxc-stop: add default log priority & cleanups

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agotools: lxc-start: add default log priority & cleanups
2xsec [Fri, 17 Aug 2018 16:40:29 +0000 (01:40 +0900)] 
tools: lxc-start: add default log priority & cleanups

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agotools: lxc-execute: add default log priority & cleanups
2xsec [Fri, 17 Aug 2018 16:39:20 +0000 (01:39 +0900)] 
tools: lxc-execute: add default log priority & cleanups

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agotools: lxc-device: add default log priority & cleanups
2xsec [Fri, 17 Aug 2018 16:38:13 +0000 (01:38 +0900)] 
tools: lxc-device: add default log priority & cleanups

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agotools: lxc-destroy: add default log priority & cleanups
2xsec [Fri, 17 Aug 2018 16:36:58 +0000 (01:36 +0900)] 
tools: lxc-destroy: add default log priority & cleanups

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agotools: lxc-create: add default log priority & cleanups
2xsec [Fri, 17 Aug 2018 16:35:57 +0000 (01:35 +0900)] 
tools: lxc-create: add default log priority & cleanups

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agotools: lxc-console: add default log priority & cleanups
2xsec [Fri, 17 Aug 2018 16:34:28 +0000 (01:34 +0900)] 
tools: lxc-console: add default log priority & cleanups

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agotools: lxc-checkpoint: add default log priority & cleanups
2xsec [Fri, 17 Aug 2018 16:33:37 +0000 (01:33 +0900)] 
tools: lxc-checkpoint: add default log priority & cleanups

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agotools: lxc-cgroup: add default log priority & cleanups
2xsec [Fri, 17 Aug 2018 16:31:54 +0000 (01:31 +0900)] 
tools: lxc-cgroup: add default log priority & cleanups

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agotools: lxc-attach: add default log priority & cleanups
2xsec [Fri, 17 Aug 2018 16:30:52 +0000 (01:30 +0900)] 
tools: lxc-attach: add default log priority & cleanups

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agoMerge pull request #2540 from tcharding/checkatch-cmd
Christian Brauner [Fri, 17 Aug 2018 09:41:27 +0000 (11:41 +0200)] 
Merge pull request #2540 from tcharding/checkatch-cmd

cmd: Fix up checkpatch warnings

6 years agoMerge pull request #2539 from tcharding/contributing
Christian Brauner [Fri, 17 Aug 2018 09:27:22 +0000 (11:27 +0200)] 
Merge pull request #2539 from tcharding/contributing

Clean up contributing and coding stlye docs

6 years agocmd: Do not use comparison to NULL 2540/head
Tobin C. Harding [Fri, 17 Aug 2018 06:18:27 +0000 (16:18 +1000)] 
cmd: Do not use comparison to NULL

checkpatch emits two warnings of type:

    CHECK: Comparison to NULL could be written "!foo"

Prefer `(!foo)` instead of `(foo == NULL)`.

Do not use comparison to NULL, use !foo

Signed-off-by: Tobin C. Harding <me@tobin.cc>
6 years agocmd: Remove typo'd semicolon
Tobin C. Harding [Fri, 17 Aug 2018 06:14:30 +0000 (16:14 +1000)] 
cmd: Remove typo'd semicolon

checkpatch emits warning:

    WARNING: Statements terminations use 1 semicolon

Remove typo'd semicolon.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
6 years agocmd: Put trailing */ on a separate line
Tobin C. Harding [Fri, 17 Aug 2018 06:13:29 +0000 (16:13 +1000)] 
cmd: Put trailing */ on a separate line

checkpatch emits warning:

    WARNING: Block comments use a trailing */ on a separate line

Put trailing */ on a separate line.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
6 years agocmd: Remove unnecessary whitespace in string
Tobin C. Harding [Fri, 17 Aug 2018 06:08:01 +0000 (16:08 +1000)] 
cmd: Remove unnecessary whitespace in string

checkpatch emits warning:

    WARNING: unnecessary whitespace before a quoted newline

Remove unnecessary whitespace before a quoted newline

Signed-off-by: Tobin C. Harding <me@tobin.cc>
6 years agocmd: Use 'const' for static string constant.
Tobin C. Harding [Fri, 17 Aug 2018 06:05:14 +0000 (16:05 +1000)] 
cmd: Use 'const' for static string constant.

checkpatch emits warning:

WARNING: static char array declaration should probably be static const char

Use 'const' for static string constant (array of chars).

Signed-off-by: Tobin C. Harding <me@tobin.cc>
6 years agocmd: Fix whitespace issues
Tobin C. Harding [Fri, 17 Aug 2018 06:02:28 +0000 (16:02 +1000)] 
cmd: Fix whitespace issues

checkpatch warns about a bunch of whitespace issues.  Fix the
non-controversial ones.

Fix whitespace issues found by checkpatch.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
6 years agocmd: Do not use braces for single statement block
Tobin C. Harding [Fri, 17 Aug 2018 05:52:09 +0000 (15:52 +1000)] 
cmd: Do not use braces for single statement block

checkpatch emites warning:

    WARNING: braces {} are not necessary for single statement blocks

Do not use braces for single statement block.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
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 agoCODING_STYLE: Update section header format 2539/head
Tobin C. Harding [Fri, 17 Aug 2018 04:40:45 +0000 (14:40 +1000)] 
CODING_STYLE: Update section header format

Currently for section headings we use fourth level markdown heading
level (####).  We do not have levels two or three.

We can use standard incremental levels for heading adornments i.e

1) =========
2) ##
3) ###
ect.

Since this document is likely referenced by maintainers when guiding new
contributors it can save maintainer time to be able to quickly reference
a section in the coding stlye guide.  If we add numbers to each heading
(like the kernel stlye guide) then maintainers can say:

   Nice patch, please see section 3 of the coding style guide and ...

So, this patch makes two changes

- Use incremental level heading adornments
- Add a number to each section heading

Signed-off-by: Tobin C. Harding <me@tobin.cc>
6 years agoCODING_STYLE: Fix non-uniform heading level
Tobin C. Harding [Fri, 17 Aug 2018 04:07:48 +0000 (14:07 +1000)] 
CODING_STYLE: Fix non-uniform heading level

Heading uses only 3 level header (###) but the rest of the file uses
four (####).  We should be uniform.

Use uniform heading level in line with the rest of the file.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
6 years agoCODING_STLYE: Remove sections implied by 'kernel style'
Tobin C. Harding [Fri, 17 Aug 2018 03:55:47 +0000 (13:55 +1000)] 
CODING_STLYE: Remove sections implied by 'kernel style'

We explicitly state that LXC uses coding style based on Linux kernel
style.  It is redundant to then document obvious, and well known, kernel
style rules.  Identifier names certainly fall into this category as does
usage of braces.

Remove sections implied by 'kernel style'.  Naming conventions and brace
placement conventions.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
6 years agoCODING_STLYE: Simplify explanation for use of 'extern'
Tobin C. Harding [Thu, 16 Aug 2018 23:38:48 +0000 (09:38 +1000)] 
CODING_STLYE: Simplify explanation for use of 'extern'

Current explanation of rules around usage of 'extern' are overly
verbose.  It is not necessary to state that functions should be declared
in header files, the compiler already enforces this.  These rules are
simple, they are better described with simple statements.  An example is
not necessary for such simple rules and serves only to make the document
longer.

Use two simple statements describing the rules that govern function
declaration and the usage of the 'extern' keyword.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
6 years agoCONTRIBUTING: Add 'be' to fix grammar
Tobin C. Harding [Thu, 16 Aug 2018 23:22:40 +0000 (09:22 +1000)] 
CONTRIBUTING: Add 'be' to fix grammar

Fix minor grammatical issue.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
6 years agoCODING_STYLE: Mention kernel style in introduction
Tobin C. Harding [Fri, 17 Aug 2018 03:46:16 +0000 (13:46 +1000)] 
CODING_STYLE: Mention kernel style in introduction

Currently the coding style guide does not mention that we use kernel
coding style as a base style for LXC.  We have just linked to
CODING_STLYE.md from CONTRIBUTING (which mentions use of kernel coding
style).  We can increase documentation congruence and completeness by
mentioning kernel coding style guide in the introduction to our style
guide.

Add heading and introduction to coding style guide informing readers
that we follow kernel coding style as a base before explaining our style
additions.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
6 years agoCONTRIBUTING: Direct readers to CODING_STYLE.md
Tobin C. Harding [Thu, 16 Aug 2018 23:19:32 +0000 (09:19 +1000)] 
CONTRIBUTING: Direct readers to CODING_STYLE.md

Currently the 'Coding Style' section mentions only the kernel coding
style.  We have additions on top on this outlined in CODING_STYLE.md.
We should direct readers to this document as well as the kernel docs.

Direct readers to CODING_STLYE.md in the 'Coding Style' section.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
6 years agoCONTRIBUTING: Link to latest online kernel docs
Tobin C. Harding [Fri, 17 Aug 2018 04:29:15 +0000 (14:29 +1000)] 
CONTRIBUTING: Link to latest online kernel docs

Currently we link to a URL for v4.10 of the kernel docs.  Since we
already mention the kernel tree we should link to the _latest_ kernel
docs online instead of a fixed past version.

Link to latest online kernel docs tracking the mainline instead of past
fixed version.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
6 years agoCONTRIBUTING: Update reference to kernel coding style
Tobin C. Harding [Fri, 17 Aug 2018 04:16:47 +0000 (14:16 +1000)] 
CONTRIBUTING: Update reference to kernel coding style

Kernel coding style guide filename is stale, this file has been renamed
in the kernel tree.  While this file still exists we should use the new
filename.

Update reference to kernel coding style guide to use the new file name.

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 2535/head
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 2534/head
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 2532/head
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 2533/head
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()/ 2531/head
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 2530/head
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 2527/head
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 2526/head
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 2525/head
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) 2524/head
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} 2521/head
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 2520/head
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 2519/head
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 2516/head
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() 2518/head
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>
7 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

7 years agonetns: vendor NETNSA_* 2515/head
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>
7 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>
7 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>
7 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>
7 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>
7 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

7 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>
7 years agotemplates: avoid endless loop 2513/head
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>
7 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

7 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

7 years agocoverity: #1438232 2511/head
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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 years agotools: lxc-unshare: apply default log priority 2495/head
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>
7 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>
7 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>
7 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()

7 years agotree-wide: pass unsigned long to prctl() 2510/head
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>
7 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

7 years agolog: bugfixes 2508/head
Christian Brauner [Sat, 4 Aug 2018 18:41:59 +0000 (20:41 +0200)] 
log: bugfixes

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