]> git.ipfire.org Git - thirdparty/lxc.git/log
thirdparty/lxc.git
6 years agoCODING_STYLE: Update section header format
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 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 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 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 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>
6 years agocriu: s/write()/lxc_write_nointr()/g
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>
6 years agocriu: s/read()/lxc_read_nointr()/g
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>
6 years agocmd: s/read()/lxc_read_nointr()/g
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>
6 years agocmd: s/write()/lxc_write_nointr()/g
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>
6 years agocmd: s/pipe()/pipe2()/g
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>
6 years agolxccontainer: s/pipe()/pipe2()/g
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>
6 years agolxccontainer: cleanup do_lxcapi_get_interfaces()
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>
6 years agocriu: s/pipe()/pipe2()/
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>
6 years agoconf: always close pipe in run_userns_fn()
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>
6 years agoconf: s/pipe()/pipe2()/g
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>
6 years agonl: avoid NULL pointer dereference
Rafał Miłecki [Sun, 29 Jul 2018 15:44:06 +0000 (17:44 +0200)] 
nl: avoid NULL pointer dereference

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

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

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

Reported-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
[christian.brauner@ubuntu.com: adapted commit message]
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agochange log macro of error case from lxc_ambient_caps_up/down
2xsec [Sun, 22 Jul 2018 12:03:46 +0000 (21:03 +0900)] 
change log macro of error case from lxc_ambient_caps_up/down

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agocoverity: #1438067
2xsec [Sat, 21 Jul 2018 13:47:08 +0000 (22:47 +0900)] 
coverity: #1438067

Explicit null dereferenced

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agoconf: the atime flags are locked in userns
Christian Brauner [Wed, 18 Jul 2018 16:09:21 +0000 (18:09 +0200)] 
conf: the atime flags are locked in userns

This means they need to be added for remount and for fresh mounts.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolxclock: change error log using strerror to SYSERROR
2xsec [Fri, 13 Jul 2018 12:33:09 +0000 (21:33 +0900)] 
lxclock: change error log using strerror to SYSERROR

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agocoverity: #1437935
Christian Brauner [Thu, 12 Jul 2018 15:52:09 +0000 (17:52 +0200)] 
coverity: #1437935

Unchecked return value

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

Unchecked return value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoattach: simplify lxc_attach_getpwshell()
Christian Brauner [Wed, 11 Jul 2018 21:12:04 +0000 (23:12 +0200)] 
attach: simplify lxc_attach_getpwshell()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolog: thread-safety backports
Christian Brauner [Mon, 10 Dec 2018 14:14:07 +0000 (15:14 +0100)] 
log: thread-safety backports

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agostart: don't unconditionally open("/dev/null")
Christian Brauner [Mon, 9 Jul 2018 12:28:57 +0000 (14:28 +0200)] 
start: don't unconditionally open("/dev/null")

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425816
2xsec [Mon, 2 Jul 2018 11:37:36 +0000 (20:37 +0900)] 
coverity: #1425816

Explicit null dereferenced

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agoCODING_STYLE: add section about using strlcat()
Christian Brauner [Sat, 30 Jun 2018 09:41:23 +0000 (11:41 +0200)] 
CODING_STYLE: add section about using strlcat()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolog: account for Android's Bionic's strerror_r()
Christian Brauner [Tue, 26 Jun 2018 09:25:37 +0000 (11:25 +0200)] 
log: account for Android's Bionic's strerror_r()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agolog: add lxc_log_strerror_r macro
2xsec [Mon, 25 Jun 2018 13:00:43 +0000 (22:00 +0900)] 
log: add lxc_log_strerror_r macro

Let's ensure that we always use the thread-safe strerror_r() function and add
an approriate macro.
Additionally, define SYS*() macros for all log levels. They will use the new
macro and ensure thread-safe retrieval of errno values.

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
[christian.brauner@ubuntu.com: simplify lxc_log_strerror_r macro]
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agomove some comments in lxc.spec.in
2xsec [Mon, 25 Jun 2018 04:26:39 +0000 (13:26 +0900)] 
move some comments in lxc.spec.in

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agomonitor: change exit() => _exit() system call in child process
2xsec [Fri, 22 Jun 2018 13:42:32 +0000 (22:42 +0900)] 
monitor: change exit() => _exit() system call in child process

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agocommands: simplify lxc_cmd()
Christian Brauner [Fri, 22 Jun 2018 12:13:06 +0000 (14:13 +0200)] 
commands: simplify lxc_cmd()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agofix pointer c is dereferenced after checking null
Donghwa Jeong [Tue, 19 Jun 2018 01:37:47 +0000 (10:37 +0900)] 
fix pointer c is dereferenced after checking null

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
6 years agofix fd handle leak
Donghwa Jeong [Tue, 19 Jun 2018 01:27:33 +0000 (10:27 +0900)] 
fix fd handle leak

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
6 years agosecure coding: #2 strcpy => strlcpy
Donghwa Jeong [Mon, 18 Jun 2018 08:18:14 +0000 (17:18 +0900)] 
secure coding: #2 strcpy => strlcpy

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
6 years agobtrfs: fix get_btrfs_subvol_path()
Christian Brauner [Mon, 10 Dec 2018 13:22:04 +0000 (14:22 +0100)] 
btrfs: fix get_btrfs_subvol_path()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoinclude: add strlcat() implementation
Christian Brauner [Wed, 20 Jun 2018 11:44:02 +0000 (13:44 +0200)] 
include: add strlcat() implementation

CC: Donghwa Jeong <dh48.jeong@samsung.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agobtrfs: fix btrfs_snapshot()
Christian Brauner [Mon, 10 Dec 2018 13:15:01 +0000 (14:15 +0100)] 
btrfs: fix btrfs_snapshot()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agosecure coding: network: strcpy => strlcpy
Donghwa Jeong [Mon, 18 Jun 2018 04:42:48 +0000 (13:42 +0900)] 
secure coding: network: strcpy => strlcpy

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
6 years agosecure coding: strcpy => strlcpy
Donghwa Jeong [Mon, 18 Jun 2018 02:30:41 +0000 (11:30 +0900)] 
secure coding: strcpy => strlcpy

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
6 years agocoverity: #1437027
Christian Brauner [Fri, 15 Jun 2018 11:37:47 +0000 (13:37 +0200)] 
coverity: #1437027

Read from pointer after free

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425855
Christian Brauner [Fri, 15 Jun 2018 11:36:37 +0000 (13:36 +0200)] 
coverity: #1425855

String not null terminated

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425789
Christian Brauner [Fri, 15 Jun 2018 11:35:09 +0000 (13:35 +0200)] 
coverity: #1425789

Unchecked return value from library

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425846
Christian Brauner [Fri, 15 Jun 2018 10:56:19 +0000 (12:56 +0200)] 
coverity: #1425846

Unchecked return value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425840
Christian Brauner [Fri, 15 Jun 2018 10:55:06 +0000 (12:55 +0200)] 
coverity: #1425840

Unchecked return value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425837
Christian Brauner [Fri, 15 Jun 2018 10:50:47 +0000 (12:50 +0200)] 
coverity: #1425837

String not null terminated

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425825
Christian Brauner [Fri, 15 Jun 2018 10:43:48 +0000 (12:43 +0200)] 
coverity: #1425825

Unchecked return value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425824
Christian Brauner [Fri, 15 Jun 2018 10:41:09 +0000 (12:41 +0200)] 
coverity: #1425824

Missing break in switch

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425819
Christian Brauner [Fri, 15 Jun 2018 09:54:14 +0000 (11:54 +0200)] 
coverity: #1425819

Resource leak

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425818
Christian Brauner [Fri, 15 Jun 2018 09:52:04 +0000 (11:52 +0200)] 
coverity: #1425818

Dereference after null check

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425813
Christian Brauner [Fri, 15 Jun 2018 09:49:10 +0000 (11:49 +0200)] 
coverity: #1425813

Resource leak

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425810
Christian Brauner [Fri, 15 Jun 2018 09:47:31 +0000 (11:47 +0200)] 
coverity: #1425810

Explicit null dereferenced

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425799
Christian Brauner [Fri, 15 Jun 2018 09:43:15 +0000 (11:43 +0200)] 
coverity: #1425799

Logically dead code

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425793
Christian Brauner [Fri, 15 Jun 2018 09:42:18 +0000 (11:42 +0200)] 
coverity: #1425793

Unchecked return value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425792
Christian Brauner [Fri, 15 Jun 2018 09:40:53 +0000 (11:40 +0200)] 
coverity: #1425792

Insecure temporary file

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425789
Christian Brauner [Fri, 15 Jun 2018 09:37:11 +0000 (11:37 +0200)] 
coverity: #1425789

Unchecked return value from library

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425771
Christian Brauner [Fri, 15 Jun 2018 09:35:10 +0000 (11:35 +0200)] 
coverity: #1425771

Insecure temporary file

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425770
Christian Brauner [Fri, 15 Jun 2018 09:33:34 +0000 (11:33 +0200)] 
coverity: #1425770

Insecure temporary file

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agoinclude: add getgrgid_r()
Christian Brauner [Thu, 14 Jun 2018 22:17:01 +0000 (00:17 +0200)] 
include: add getgrgid_r()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agostorage: Resource leak
Donghwa Jeong [Fri, 15 Jun 2018 02:11:48 +0000 (11:11 +0900)] 
storage: Resource leak

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
6 years agocoverity: #1425768
Christian Brauner [Thu, 14 Jun 2018 20:17:08 +0000 (22:17 +0200)] 
coverity: #1425768

Untrusted array index read

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425767
Christian Brauner [Thu, 14 Jun 2018 20:10:26 +0000 (22:10 +0200)] 
coverity: #1425767

Unchecked return value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425766
Christian Brauner [Thu, 14 Jun 2018 20:09:14 +0000 (22:09 +0200)] 
coverity: #1425766

Unchecked return value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425760
Christian Brauner [Thu, 14 Jun 2018 20:05:09 +0000 (22:05 +0200)] 
coverity: #1425760

Use of untrusted scalar value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425778
2xsec [Thu, 14 Jun 2018 15:19:22 +0000 (00:19 +0900)] 
coverity: #1425778

Out-of-bounds write

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agocoverity: #1437017
2xsec [Thu, 14 Jun 2018 13:55:47 +0000 (22:55 +0900)] 
coverity: #1437017

Uninitialized pointer

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
6 years agofix getgrgid() thread safe issue
Donghwa Jeong [Thu, 14 Jun 2018 10:06:11 +0000 (19:06 +0900)] 
fix getgrgid() thread safe issue

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
6 years agofix getpwuid() thread safe issue
Donghwa Jeong [Thu, 14 Jun 2018 06:32:03 +0000 (15:32 +0900)] 
fix getpwuid() thread safe issue

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
6 years agocoverity: #1436916
Donghwa Jeong [Thu, 14 Jun 2018 01:36:46 +0000 (10:36 +0900)] 
coverity: #1436916

Resource leak

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
6 years agoattach: fix double free
Donghwa Jeong [Tue, 12 Jun 2018 09:16:35 +0000 (18:16 +0900)] 
attach: fix double free

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
6 years agofix getpwnam() thread safe issue
Donghwa Jeong [Tue, 12 Jun 2018 08:09:13 +0000 (17:09 +0900)] 
fix getpwnam() thread safe issue

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
6 years agotools: restore lxc-create log behavior
Christian Brauner [Mon, 11 Jun 2018 11:15:48 +0000 (13:15 +0200)] 
tools: restore lxc-create log behavior

Older versions of lxc-create used to set log_file to "none" when a log priority
but no log file was specified on the command line. Let's restore this behavior.

Closes #2392.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
6 years agocoverity: #1425781
Donghwa Jeong [Mon, 11 Jun 2018 05:51:16 +0000 (14:51 +0900)] 
coverity: #1425781

Resource leak

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
6 years agoarguments: improve some operations
Donghwa Jeong [Mon, 11 Jun 2018 02:10:58 +0000 (11:10 +0900)] 
arguments: improve some operations

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
6 years agoconf: only use newuidmap and newgidmap when necessary
Jonathan Calmels [Fri, 8 Jun 2018 23:58:11 +0000 (16:58 -0700)] 
conf: only use newuidmap and newgidmap when necessary

Signed-off-by: Jonathan Calmels <jcalmels@nvidia.com>
6 years agocoverity: #1425836
Donghwa Jeong [Fri, 8 Jun 2018 07:38:56 +0000 (16:38 +0900)] 
coverity: #1425836

Resource leak

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
6 years agocoverity: #1425849
Donghwa Jeong [Fri, 8 Jun 2018 02:22:18 +0000 (11:22 +0900)] 
coverity: #1425849

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
6 years agocoverity: #1425841
Donghwa Jeong [Fri, 8 Jun 2018 02:20:08 +0000 (11:20 +0900)] 
coverity: #1425841

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
6 years agocoverity: #1425795
Donghwa Jeong [Fri, 8 Jun 2018 02:16:31 +0000 (11:16 +0900)] 
coverity: #1425795

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
6 years agocoverity: #1425794
Donghwa Jeong [Fri, 8 Jun 2018 02:14:40 +0000 (11:14 +0900)] 
coverity: #1425794

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
6 years agocoverity: #1425779
Donghwa Jeong [Fri, 8 Jun 2018 02:12:52 +0000 (11:12 +0900)] 
coverity: #1425779

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
6 years agocoverity: #1425777
Donghwa Jeong [Fri, 8 Jun 2018 02:11:03 +0000 (11:11 +0900)] 
coverity: #1425777

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
6 years agoFix typo
Stéphane Graber [Tue, 5 Jun 2018 21:13:57 +0000 (17:13 -0400)] 
Fix typo

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
6 years agosupport tls in cross-compile
duguhaotian [Wed, 30 May 2018 02:25:40 +0000 (10:25 +0800)] 
support tls in cross-compile

AC_RUN_IFELSE will fail in cross-compile,
we can use AC_COMPILE_IFELSE replace.

Signed-off-by: duguhaotian <duguhaotian@gmail.com>
6 years agoconf: copy mountinfo for remount_all_slave()
Christian Brauner [Mon, 4 Jun 2018 10:49:05 +0000 (12:49 +0200)] 
conf: copy mountinfo for remount_all_slave()

While a container reads mountinfo from proc fs, the mountinfo can be changed by
the kernel anytime. This has caused critical issues on some devices.

Signed-off-by: Donghwa Jeong dh48.jeong@samsung.com
Reported-by: Donghwa Jeong dh48.jeong@samsung.com
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>