[lxc-devel] [lxc/lxc] dd7ebe: utils: add lxc_safe_long_long()

GitHub noreply at github.com
Thu Nov 9 00:00:44 UTC 2017


  Branch: refs/heads/stable-2.1
  Home:   https://github.com/lxc/lxc
  Commit: dd7ebed5509ec1630eeff7bcf7fe4e6a6b37231d
      https://github.com/lxc/lxc/commit/dd7ebed5509ec1630eeff7bcf7fe4e6a6b37231d
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/utils.c
    M src/lxc/utils.h

  Log Message:
  -----------
  utils: add lxc_safe_long_long()

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


  Commit: d123380428c5efbb334e0e3957aa2ebc2de86c20
      https://github.com/lxc/lxc/commit/d123380428c5efbb334e0e3957aa2ebc2de86c20
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/utils.c
    M src/lxc/utils.h
    M src/tests/lxc-test-utils.c

  Log Message:
  -----------
  utils: parse_byte_size_string()

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


  Commit: ce3f04bc6f40c62d48d44c67ab9845b7dc6f5add
      https://github.com/lxc/lxc/commit/ce3f04bc6f40c62d48d44c67ab9845b7dc6f5add
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/utils.c
    M src/lxc/utils.h

  Log Message:
  -----------
  utils: add lxc_find_next_power2()

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


  Commit: be201e8f3616dc780e468c9e640501ddf3c5b897
      https://github.com/lxc/lxc/commit/be201e8f3616dc780e468c9e640501ddf3c5b897
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/confile_utils.c
    M src/lxc/confile_utils.h

  Log Message:
  -----------
  confile_utils: add lxc_get_conf_uint64()

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


  Commit: b73e4ad45b606e003cbd0b7991d0d9c9d4d1adca
      https://github.com/lxc/lxc/commit/b73e4ad45b606e003cbd0b7991d0d9c9d4d1adca
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/conf.c
    M src/lxc/conf.h
    M src/lxc/start.c

  Log Message:
  -----------
  conf: lxc_setup() -> lxc_setup_child()

Closes #1857.

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


  Commit: dfeff55f3e03eb8dd283bd1d550d7810f4c777d1
      https://github.com/lxc/lxc/commit/dfeff55f3e03eb8dd283bd1d550d7810f4c777d1
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/namespace.c

  Log Message:
  -----------
  namespace: use lxc_getpagesize()

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


  Commit: 02909ddba0d69349d92695b7a37047bd3161535a
      https://github.com/lxc/lxc/commit/02909ddba0d69349d92695b7a37047bd3161535a
  Author: Jordan Webb <jordemort at github.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

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

  Log Message:
  -----------
  Call lxc_config_define_load from lxc_execute again

Signed-off-by: Jordan Webb <jordemort at github.com>


  Commit: 6aa1d6bbeb4710b229c9472081648ce70075e430
      https://github.com/lxc/lxc/commit/6aa1d6bbeb4710b229c9472081648ce70075e430
  Author: Jordan Webb <jordemort at github.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

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

  Log Message:
  -----------
  Add missing lxc_container_put

Signed-off-by: Jordan Webb <jordemort at github.com>


  Commit: fe729c7e769dae8d9cb107aaf7a135a9df332b60
      https://github.com/lxc/lxc/commit/fe729c7e769dae8d9cb107aaf7a135a9df332b60
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/attach.c

  Log Message:
  -----------
  attach: correctly handle namespace inheritance

When attaching to a container's namespaces we did not handle the case where we
inherited namespaces correctly. In essence, liblxc on start records the
namespaces the container was created with in the handler. But it only records
the clone flags that were passed to clone() and doesn't record the namespaces
we e.g. inherited from other containers. This means that attach only ever
attached to the clone flags. But this is only correct if all other namespaces
not recorded in the handler refer to the namespaces of the caller. However,
this need not be the case if the container has inherited namespaces from
another container. To handle this case we need to check whether caller and
container are in the same namespace. If they are, we know that things are all
good. If they aren't then we need to attach to these namespaces as well.

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


  Commit: 7b0f0329ff4afabe7415671497a9a6dd89d6a675
      https://github.com/lxc/lxc/commit/7b0f0329ff4afabe7415671497a9a6dd89d6a675
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c

  Log Message:
  -----------
  cgfsng: fix cgroup2 detection

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


  Commit: 0e6f5802709389a726fcf6e2b9ea9505d1f683e4
      https://github.com/lxc/lxc/commit/0e6f5802709389a726fcf6e2b9ea9505d1f683e4
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/cgroups/cgfs.c
    M src/lxc/cgroups/cgfsng.c
    M src/lxc/cgroups/cgroup.c
    M src/lxc/conf.c
    M src/lxc/conf.h

  Log Message:
  -----------
  cgroups: enable container without CAP_SYS_ADMIN

In case cgroup namespaces are supported but we do not have CAP_SYS_ADMIN we
need to mount cgroups for the container. This patch enables both privileged and
unprivileged containers without CAP_SYS_ADMIN.

Closes #1737.

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


  Commit: 55d59274934e256af338a376e87dc59a9e76b566
      https://github.com/lxc/lxc/commit/55d59274934e256af338a376e87dc59a9e76b566
  Author: Fabrice Fontaine <fontaine.fabrice at gmail.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M configure.ac
    M src/lxc/Makefile.am
    M src/lxc/conf.c

  Log Message:
  -----------
  Fix compilation on toolchain without prlimit

Some toolchains which are not bionic like uclibc does not support
prlimit or prlimit64. In this case, return an error.
Moreover, if prlimit64 is available, use lxc implementation of prlimit.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>


  Commit: e8c3a07c52bce5acdd867b5d061799318164c4b1
      https://github.com/lxc/lxc/commit/e8c3a07c52bce5acdd867b5d061799318164c4b1
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

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

  Log Message:
  -----------
  lxc-start: remove unnecessary checks

The console struct is internal and liblxc takes care of creating paths.

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


  Commit: 35697b22756603dd3dbc1aea442ad91e82808c37
      https://github.com/lxc/lxc/commit/35697b22756603dd3dbc1aea442ad91e82808c37
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/start.c

  Log Message:
  -----------
  start: close non-needed file descriptors

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


  Commit: e886757763952096448d6cd5b4ff0ae7e0326a41
      https://github.com/lxc/lxc/commit/e886757763952096448d6cd5b4ff0ae7e0326a41
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/commands.c
    M src/lxc/network.c
    M src/lxc/network.h
    M src/lxc/start.c
    M src/lxc/start.h

  Log Message:
  -----------
  handler: make name argument const

There's no obvious need to strdup() the name of the container in the handler.
We can simply make this a pointer to the memory allocated in
lxc_container_new().

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


  Commit: b5c7fb7152cd8ac14c5c52252940bdc6164b91a0
      https://github.com/lxc/lxc/commit/b5c7fb7152cd8ac14c5c52252940bdc6164b91a0
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/start.c

  Log Message:
  -----------
  start: close data socket in parent

Brings the number of open fds in the monitor process for a standard container
without ttys down to 17.

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


  Commit: 0c813b89c871363af3a753a0860a43f35c8afbbd
      https://github.com/lxc/lxc/commit/0c813b89c871363af3a753a0860a43f35c8afbbd
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/monitor.c

  Log Message:
  -----------
  monitor: do not log useless warnings

lxc-monitord is deprecated so this is expected to fail.

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


  Commit: 332d95177db4a88933a6ef327be35a9b5f380ccc
      https://github.com/lxc/lxc/commit/332d95177db4a88933a6ef327be35a9b5f380ccc
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/network.c

  Log Message:
  -----------
  network: reap child in all cases

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


  Commit: 67f41c20c4af559a87fd9d67732c28f2ddffaa5b
      https://github.com/lxc/lxc/commit/67f41c20c4af559a87fd9d67732c28f2ddffaa5b
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/conf.c

  Log Message:
  -----------
  conf: reap child in all cases

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


  Commit: f4d6e68ac7bd79e6bdcb642b14e059d272767be0
      https://github.com/lxc/lxc/commit/f4d6e68ac7bd79e6bdcb642b14e059d272767be0
  Author: Peter Korsgaard <peter at korsgaard.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/start.c

  Log Message:
  -----------
  lxc/start.c: Fix legacy PR_{G,S}ET_NO_NEW_PRIVS handling

The configure checks for these use AC_CHECK_DECLS, which define the symbol
to 0 if not available - So adjust the code to match.  From the autoconf
manual:

https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/Generic-Declarations.html)

For each of the symbols (comma-separated list), define HAVE_DECL_symbol (in
all capitals) to ‘1’ if symbol is declared, otherwise to ‘0’.

Signed-off-by: Peter Korsgaard <peter at korsgaard.com>


  Commit: 2514650c760daeb486125090ccd7b09ecebd8e3c
      https://github.com/lxc/lxc/commit/2514650c760daeb486125090ccd7b09ecebd8e3c
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/storage/storage.h

  Log Message:
  -----------
  storage: switch to ext4 as default filesystem

Closes #1899.

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


  Commit: 3046bf575cf6d1885150ba9e3b294ccf2729ec7c
      https://github.com/lxc/lxc/commit/3046bf575cf6d1885150ba9e3b294ccf2729ec7c
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

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

  Log Message:
  -----------
  tools: fix help output of lxc-create

Closes #1899.

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


  Commit: 33a5f4a318324ceb74de8a59e11320a2b2dbe50b
      https://github.com/lxc/lxc/commit/33a5f4a318324ceb74de8a59e11320a2b2dbe50b
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/attach.c
    M src/lxc/attach.h

  Log Message:
  -----------
  attach: handle namespace inheritance

We need to have lxc_attach() distinguish between a caller specifying specific
namespaces to attach to and a caller not requesting specific namespaces. The
latter is taken by lxc_attach() to mean that all namespaces will be attached.
This also needs to include all inherited namespaces.

Closes #1890.
Closes #1897.

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


  Commit: 03c0483c286cb87543d652717dc17962885eb759
      https://github.com/lxc/lxc/commit/03c0483c286cb87543d652717dc17962885eb759
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c

  Log Message:
  -----------
  cgroups/cgfsng: keep mountpoint intact

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


  Commit: 82fb324e168f026e9447552936e3dd1328152de0
      https://github.com/lxc/lxc/commit/82fb324e168f026e9447552936e3dd1328152de0
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c

  Log Message:
  -----------
  cgroups/cgfsng: make sure pointer is NULL

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


  Commit: 8059e5a14b21c976cd85eb051b01a165e9fdff45
      https://github.com/lxc/lxc/commit/8059e5a14b21c976cd85eb051b01a165e9fdff45
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c

  Log Message:
  -----------
  cgroups/cgfsng: cgfsns_chown() -> cgfsng_chown()

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


  Commit: a43d3c7e49ca90f0bb4004bd6e470b0a4e960eff
      https://github.com/lxc/lxc/commit/a43d3c7e49ca90f0bb4004bd6e470b0a4e960eff
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c

  Log Message:
  -----------
  cgroups/cgfsng: support MS_READONLY with cgroup ns

If we lack CAP_SYS_ADMIN this is really useful.

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


  Commit: 8837c2593a81350d0c268b54e02dec70c2cb3ca1
      https://github.com/lxc/lxc/commit/8837c2593a81350d0c268b54e02dec70c2cb3ca1
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/log.c

  Log Message:
  -----------
  log: check for i/o error with vsnprintf()

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


  Commit: 642c509ac4697984bed8ff0defee1b126cc35d9c
      https://github.com/lxc/lxc/commit/642c509ac4697984bed8ff0defee1b126cc35d9c
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c

  Log Message:
  -----------
  cgroupfs/cgfsng: tweak logging

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


  Commit: 593bc04b7e37ea239420127c34a57220835c2696
      https://github.com/lxc/lxc/commit/593bc04b7e37ea239420127c34a57220835c2696
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c

  Log Message:
  -----------
  cgroups/cgfsng: remove is_lxcfs()

We don't need to parse fuse.lxcfs entries.

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


  Commit: 6c5a8ca8a3c6e13b5cfd67f78089684ede80b7d2
      https://github.com/lxc/lxc/commit/6c5a8ca8a3c6e13b5cfd67f78089684ede80b7d2
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c

  Log Message:
  -----------
  cgroups/cgfsng: fix get_controllers() for cgroup2

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


  Commit: 236a1501b38d3a676b75dce730dd08e7256fb635
      https://github.com/lxc/lxc/commit/236a1501b38d3a676b75dce730dd08e7256fb635
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c
    M src/lxc/cgroups/cgroup_utils.c
    M src/lxc/cgroups/cgroup_utils.h

  Log Message:
  -----------
  cgroupfs/cgfsng: improve cgroup2 handling

This fixes a bunch of bugs.

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


  Commit: cbb3ff2d0c83fbd0b828ce21c6ddc8f3301ef427
      https://github.com/lxc/lxc/commit/cbb3ff2d0c83fbd0b828ce21c6ddc8f3301ef427
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M config/templates/archlinux.common.conf.in

  Log Message:
  -----------
  config: remove SIGRTMIN+14 as lxc.signal.stop

We want to be able to SIGKILL an Archlinux container.

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


  Commit: 5be23e4832d2b7fd1134cb30369859f9d7531c2d
      https://github.com/lxc/lxc/commit/5be23e4832d2b7fd1134cb30369859f9d7531c2d
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/commands.c

  Log Message:
  -----------
  commands: non-functional changes

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


  Commit: a37f8ab2b1b171202a56ba5b4d3320cffc570a33
      https://github.com/lxc/lxc/commit/a37f8ab2b1b171202a56ba5b4d3320cffc570a33
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/console.c

  Log Message:
  -----------
  console: non-functional changes

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


  Commit: ae1aaf5a3a4565e6ce676858fce3c72f334e7c38
      https://github.com/lxc/lxc/commit/ae1aaf5a3a4565e6ce676858fce3c72f334e7c38
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-11-09 (Thu, 09 Nov 2017)

  Changed paths:
    M src/lxc/console.c

  Log Message:
  -----------
  console: non-functional changes

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


Compare: https://github.com/lxc/lxc/compare/6bf15f500dc1...ae1aaf5a3a45


More information about the lxc-devel mailing list