Discussion:
[lxc-devel] [lxc/lxc] b789a3: attach: simplify lxc_attach_getpwshell()
GitHub
2018-12-10 18:11:08 UTC
Permalink
Branch: refs/heads/stable-2.0
Home: https://github.com/lxc/lxc
Commit: b789a324dd26c8e42e6aa43be76f666711efcaf0
https://github.com/lxc/lxc/commit/b789a324dd26c8e42e6aa43be76f666711efcaf0
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/attach.c

Log Message:
-----------
attach: simplify lxc_attach_getpwshell()

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


Commit: dd4ad068bc4ab09f7797d75ae6b9f75ee63e5fab
https://github.com/lxc/lxc/commit/dd4ad068bc4ab09f7797d75ae6b9f75ee63e5fab
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/attach.c

Log Message:
-----------
coverity: #1437936

Unchecked return value

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


Commit: f0127c98a2d2daacb713ec8d1238790724caeb34
https://github.com/lxc/lxc/commit/f0127c98a2d2daacb713ec8d1238790724caeb34
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/tools/lxc_usernsexec.c

Log Message:
-----------
coverity: #1437935

Unchecked return value

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


Commit: 2e264c8572f4b71eaef1c999c8b7c292f9e7ace3
https://github.com/lxc/lxc/commit/2e264c8572f4b71eaef1c999c8b7c292f9e7ace3
Author: 2xsec <***@samsung.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/lxclock.c

Log Message:
-----------
lxclock: change error log using strerror to SYSERROR

Signed-off-by: 2xsec <***@samsung.com>


Commit: cacde1a9bc8e0175b16688d4e2a30edd211d735a
https://github.com/lxc/lxc/commit/cacde1a9bc8e0175b16688d4e2a30edd211d735a
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/conf.c

Log Message:
-----------
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 <***@ubuntu.com>


Commit: a16d90b5e22aba2b6dc5cd00f08d6ff3f386ed5b
https://github.com/lxc/lxc/commit/a16d90b5e22aba2b6dc5cd00f08d6ff3f386ed5b
Author: 2xsec <***@samsung.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/attach.c

Log Message:
-----------
coverity: #1438067

Explicit null dereferenced

Signed-off-by: 2xsec <***@samsung.com>


Commit: a1b60d342a9c134151f9a40c32de807b40dd1176
https://github.com/lxc/lxc/commit/a1b60d342a9c134151f9a40c32de807b40dd1176
Author: 2xsec <***@samsung.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/caps.c
M src/lxc/start.c

Log Message:
-----------
change log macro of error case from lxc_ambient_caps_up/down

Signed-off-by: 2xsec <***@samsung.com>


Commit: cba71d5205111e945ed16b3d25766b7833d64371
https://github.com/lxc/lxc/commit/cba71d5205111e945ed16b3d25766b7833d64371
Author: Rafał Miłecki <***@milecki.pl>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/nl.c

Log Message:
-----------
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 <***@gimpelevich.san-francisco.ca.us>
Signed-off-by: Rafał Miłecki <***@milecki.pl>
[***@ubuntu.com: adapted commit message]
Signed-off-by: Christian Brauner <***@ubuntu.com>


Commit: 3c887fcb70c8f0293037e2ee2820dce42af3a863
https://github.com/lxc/lxc/commit/3c887fcb70c8f0293037e2ee2820dce42af3a863
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/conf.c

Log Message:
-----------
conf: s/pipe()/pipe2()/g

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


Commit: 7a12b86c8ed5b97244563b49078cd3d850466a56
https://github.com/lxc/lxc/commit/7a12b86c8ed5b97244563b49078cd3d850466a56
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/conf.c

Log Message:
-----------
conf: always close pipe in run_userns_fn()

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


Commit: 705f5735284bb16de76d91946ebce5bff846ace7
https://github.com/lxc/lxc/commit/705f5735284bb16de76d91946ebce5bff846ace7
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/criu.c

Log Message:
-----------
criu: s/pipe()/pipe2()/

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


Commit: 988c11f7309a3df5b742d3e94a9ccf41d1925338
https://github.com/lxc/lxc/commit/988c11f7309a3df5b742d3e94a9ccf41d1925338
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/lxccontainer.c

Log Message:
-----------
lxccontainer: cleanup do_lxcapi_get_interfaces()

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


Commit: 0e8afcc0d72c02a40630fdf6938699474462fa43
https://github.com/lxc/lxc/commit/0e8afcc0d72c02a40630fdf6938699474462fa43
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/lxccontainer.c

Log Message:
-----------
lxccontainer: s/pipe()/pipe2()/g

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


Commit: c14d9ffe338c4174e5aa1c463038df34069df579
https://github.com/lxc/lxc/commit/c14d9ffe338c4174e5aa1c463038df34069df579
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/tools/lxc_usernsexec.c

Log Message:
-----------
cmd: s/pipe()/pipe2()/g

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


Commit: 41b1a847f19fd9f0dff06f1440705ffce68abf7c
https://github.com/lxc/lxc/commit/41b1a847f19fd9f0dff06f1440705ffce68abf7c
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/lxc_monitord.c
M src/lxc/tools/lxc_usernsexec.c

Log Message:
-----------
cmd: s/write()/lxc_write_nointr()/g

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


Commit: d2bd14f02146ebe1081f2b6b711285fe69ee80fe
https://github.com/lxc/lxc/commit/d2bd14f02146ebe1081f2b6b711285fe69ee80fe
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/lxc_monitord.c
M src/lxc/tools/lxc_usernsexec.c

Log Message:
-----------
cmd: s/read()/lxc_read_nointr()/g

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


Commit: 95bc087fbe0159f27a74155b5b2f38f7fdf255fb
https://github.com/lxc/lxc/commit/95bc087fbe0159f27a74155b5b2f38f7fdf255fb
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/criu.c

Log Message:
-----------
criu: s/read()/lxc_read_nointr()/g

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


Commit: 41d8fd0f28e70d6b53f3503cdbd6233b23e4fe79
https://github.com/lxc/lxc/commit/41d8fd0f28e70d6b53f3503cdbd6233b23e4fe79
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/criu.c

Log Message:
-----------
criu: s/write()/lxc_write_nointr()/g

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


Commit: ba0ac146073f376222f87e709b3090c96783cde5
https://github.com/lxc/lxc/commit/ba0ac146073f376222f87e709b3090c96783cde5
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/lxccontainer.c

Log Message:
-----------
lxccontainer: s/write()/lxc_write_nointr()/g

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


Commit: a11cad8211bb7d5216c83999515ec50e76db261a
https://github.com/lxc/lxc/commit/a11cad8211bb7d5216c83999515ec50e76db261a
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/lxccontainer.c

Log Message:
-----------
lxccontainer: s/read()/lxc_read_nointr()/g

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


Commit: 089ad11c63ccbcc78835fb31cab1c18bdac663b5
https://github.com/lxc/lxc/commit/089ad11c63ccbcc78835fb31cab1c18bdac663b5
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/network.c

Log Message:
-----------
network: s/read()/lxc_read_nointr()/g

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


Commit: e3a9bfbfc9823b2e180e9197a166bd918be43b23
https://github.com/lxc/lxc/commit/e3a9bfbfc9823b2e180e9197a166bd918be43b23
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/network.c

Log Message:
-----------
network: s/write()/lxc_write_nointr()/g

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


Commit: d98d27e2df4c81894a0388abd335fdd9af8bae05
https://github.com/lxc/lxc/commit/d98d27e2df4c81894a0388abd335fdd9af8bae05
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/sync.c

Log Message:
-----------
sync: s/read()/lxc_read_nointr()/g

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


Commit: 9345a89879736b7bf5dcba938226f95ad001bc20
https://github.com/lxc/lxc/commit/9345a89879736b7bf5dcba938226f95ad001bc20
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/sync.c

Log Message:
-----------
sync: s/write()/lxc_write_nointr()/g

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


Commit: c66853b8bd78bff33417e2b5b96033c3a9757f8e
https://github.com/lxc/lxc/commit/c66853b8bd78bff33417e2b5b96033c3a9757f8e
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/log.c

Log Message:
-----------
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 <***@ubuntu.com>


Commit: b608a3d963003925e3e9406185a0497bf1be6fd5
https://github.com/lxc/lxc/commit/b608a3d963003925e3e9406185a0497bf1be6fd5
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/caps.c

Log Message:
-----------
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 <***@ubuntu.com>


Commit: c92a2062f441977f6166e6891a5bbc1905724ce4
https://github.com/lxc/lxc/commit/c92a2062f441977f6166e6891a5bbc1905724ce4
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/tools/lxc_destroy.c

Log Message:
-----------
coverity: #438136

String not null terminated

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


Commit: d82ddb32a56dbb263ff09a92a5c7256f892d64c9
https://github.com/lxc/lxc/commit/d82ddb32a56dbb263ff09a92a5c7256f892d64c9
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M README.md

Log Message:
-----------
READEM: update Serge's mail address

Signed-off-by: Christian Brauner <***@ubuntu.com>
Cc: Serge Hallyn <***@hallyn.com>


Commit: eedea69140c44c37a35f002a3081171a8c1cf93b
https://github.com/lxc/lxc/commit/eedea69140c44c37a35f002a3081171a8c1cf93b
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M MAINTAINERS

Log Message:
-----------
MAINTAINERS: add Wolfgang Bumiller

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


Commit: 85a7cf828e7eec7812360d190d182bb25d5be905
https://github.com/lxc/lxc/commit/85a7cf828e7eec7812360d190d182bb25d5be905
Author: Tobin C. Harding <***@tobin.cc>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M CONTRIBUTING

Log Message:
-----------
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 <***@tobin.cc>


Commit: 33d6b9d63859a1cc0d1ca868677ffab7dc4645d6
https://github.com/lxc/lxc/commit/33d6b9d63859a1cc0d1ca868677ffab7dc4645d6
Author: Tobin C. Harding <***@tobin.cc>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M CONTRIBUTING

Log Message:
-----------
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 <***@tobin.cc>


Commit: 2dccaea3e6eb2c977b39d9f8f5e86e068c10b6fa
https://github.com/lxc/lxc/commit/2dccaea3e6eb2c977b39d9f8f5e86e068c10b6fa
Author: Tobin C. Harding <***@tobin.cc>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M CONTRIBUTING

Log Message:
-----------
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 <***@tobin.cc>


Commit: 942496001ec183baff6240d2e0a3925f2987a4e5
https://github.com/lxc/lxc/commit/942496001ec183baff6240d2e0a3925f2987a4e5
Author: Tobin C. Harding <***@tobin.cc>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M CODING_STYLE.md

Log Message:
-----------
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 <***@tobin.cc>


Commit: 5d48ee40030e6c6170be59fad48a1056ace6e1c6
https://github.com/lxc/lxc/commit/5d48ee40030e6c6170be59fad48a1056ace6e1c6
Author: Tobin C. Harding <***@tobin.cc>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M CONTRIBUTING

Log Message:
-----------
CONTRIBUTING: Add 'be' to fix grammar

Fix minor grammatical issue.

Signed-off-by: Tobin C. Harding <***@tobin.cc>


Commit: 8b9be4bd240666501ce8cabaf17b881533658e35
https://github.com/lxc/lxc/commit/8b9be4bd240666501ce8cabaf17b881533658e35
Author: Tobin C. Harding <***@tobin.cc>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M CODING_STYLE.md

Log Message:
-----------
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 <***@tobin.cc>


Commit: f6fab4d950522b9c38ad7e1a5db25718d2601585
https://github.com/lxc/lxc/commit/f6fab4d950522b9c38ad7e1a5db25718d2601585
Author: Tobin C. Harding <***@tobin.cc>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M CODING_STYLE.md

Log Message:
-----------
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 <***@tobin.cc>


Commit: f2872db03a598b05b4f213ba4461e52ac11def69
https://github.com/lxc/lxc/commit/f2872db03a598b05b4f213ba4461e52ac11def69
Author: Tobin C. Harding <***@tobin.cc>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M CODING_STYLE.md

Log Message:
-----------
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 <***@tobin.cc>


Commit: 34484cdaf528083f6d777097b93c74960ab1f48e
https://github.com/lxc/lxc/commit/34484cdaf528083f6d777097b93c74960ab1f48e
Author: Tobin C. Harding <***@tobin.cc>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M CODING_STYLE.md

Log Message:
-----------
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 <***@tobin.cc>


Commit: 0c0f00595f630770447364c7ee7802b534a8def6
https://github.com/lxc/lxc/commit/0c0f00595f630770447364c7ee7802b534a8def6
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M configure.ac

Log Message:
-----------
autotools: add --{disable,enable}-thread-safety

Fail the build if --enable-thread-safety is passed and the environment cannot
guarantee thread-safety.

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


Commit: 4523e218410946cead3fbad1de225fc14caf1e09
https://github.com/lxc/lxc/commit/4523e218410946cead3fbad1de225fc14caf1e09
Author: Stephen Barber <***@chromium.org>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/attach.c

Log Message:
-----------
attach: don't shutdown ipc socket in child

shutdown() affects sockets even across forked processes. The
attached child process doesn't have any interest in using the
IPC socket, so just close it in the child process and let the
intermediate process handle shutting it down.

This fixes a bug seen with lxc exec in crbug.com/884244

Signed-off-by: Stephen Barber <***@chromium.org>


Commit: 4941288ca598366a03ac1787c0b3b2a59984e7c8
https://github.com/lxc/lxc/commit/4941288ca598366a03ac1787c0b3b2a59984e7c8
Author: Christian Brauner <***@ubuntu.com>
Date: 2018-12-10 (Mon, 10 Dec 2018)

Changed paths:
M src/lxc/attach.c

Log Message:
-----------
attach: report standard shell exit codes

custom backport

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


Compare: https://github.com/lxc/lxc/compare/c619ba29a4f5...4941288ca598
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

Functionality will be removed from GitHub.com on January 31st, 2019.
Loading...