[lxc-devel] [lxc/lxc] 74cd29: Use strerror(errno) instead of %m

GitHub noreply at github.com
Tue Aug 15 22:57:55 UTC 2017


  Branch: refs/heads/stable-1.0
  Home:   https://github.com/lxc/lxc
  Commit: 74cd294908e8c6428479328e793de0defb5b3e02
      https://github.com/lxc/lxc/commit/74cd294908e8c6428479328e793de0defb5b3e02
  Author: 0x0916 <w at laoqinren.net>
  Date:   2017-08-15 (Tue, 15 Aug 2017)

  Changed paths:
    M src/lxc/arguments.c
    M src/lxc/caps.c
    M src/lxc/conf.c
    M src/lxc/lxc_init.c
    M src/lxc/start.c
    M src/lxc/sync.c
    M src/tests/reboot.c

  Log Message:
  -----------
  Use strerror(errno) instead of %m

Signed-off-by: 0x0916 <w at laoqinren.net>


  Commit: 6bdd51011407365cfbf284a5eebe01c202c3ad98
      https://github.com/lxc/lxc/commit/6bdd51011407365cfbf284a5eebe01c202c3ad98
  Author: Evgeni Golov <evgeni at debian.org>
  Date:   2017-08-15 (Tue, 15 Aug 2017)

  Changed paths:
    M templates/lxc-debian.in

  Log Message:
  -----------
  templates/debian: add aarch64 → arm64 mapping

uname -m reports aarch64, but Debian calls the arch arm64

Signed-off-by: Evgeni Golov <evgeni at debian.org>


  Commit: 6810f3face837a5380edfa4dc684f7ced1891e7b
      https://github.com/lxc/lxc/commit/6810f3face837a5380edfa4dc684f7ced1891e7b
  Author: Evgeni Golov <evgeni at debian.org>
  Date:   2017-08-15 (Tue, 15 Aug 2017)

  Changed paths:
    M templates/lxc-centos.in

  Log Message:
  -----------
  use altarch mirror for CentOS on arches other than i386 and x86_64

CentOS only has i386 and x86_64 listed in mirrorlist.centos.org,
use http://mirror.centos.org/altarch/ for all other arches instead

See: https://bugs.centos.org/view.php?id=11250

Signed-off-by: Evgeni Golov <evgeni at debian.org>


  Commit: 24ff59afa71a905f7256aafc490f97bc391bc579
      https://github.com/lxc/lxc/commit/24ff59afa71a905f7256aafc490f97bc391bc579
  Author: 0x0916 <w at laoqinren.net>
  Date:   2017-08-15 (Tue, 15 Aug 2017)

  Changed paths:
    M src/lxc/lxccontainer.h

  Log Message:
  -----------
  API doc: update note for get_config_item

Fix issue: https://github.com/lxc/lxc/issues/505

Signed-off-by: 0x0916 <w at laoqinren.net>


  Commit: 854ef04b0cb9810efe0a6972a2028d8dc3debc1f
      https://github.com/lxc/lxc/commit/854ef04b0cb9810efe0a6972a2028d8dc3debc1f
  Author: 0x0916 <w at laoqinren.net>
  Date:   2017-08-15 (Tue, 15 Aug 2017)

  Changed paths:
    M src/lxc/cgfs.c
    M src/lxc/cgmanager.c
    M src/lxc/conf.c
    M src/lxc/utils.c

  Log Message:
  -----------
  remove the `__func__` macro

Our logging function will always spew out the function name.

Signed-off-by: 0x0916 <w at laoqinren.net>


  Commit: e6426fd3b02ee317bb463d29f5e74fba6f63b23c
      https://github.com/lxc/lxc/commit/e6426fd3b02ee317bb463d29f5e74fba6f63b23c
  Author: 0x0916 <w at laoqinren.net>
  Date:   2017-08-15 (Tue, 15 Aug 2017)

  Changed paths:
    M src/lxc/conf.c

  Log Message:
  -----------
  confile: free netdev->downscript

Signed-off-by: 0x0916 <w at laoqinren.net>


  Commit: 42ba01926cfc3f41090be4a9a21c3d73741edcd6
      https://github.com/lxc/lxc/commit/42ba01926cfc3f41090be4a9a21c3d73741edcd6
  Author: 0x0916 <w at laoqinren.net>
  Date:   2017-08-15 (Tue, 15 Aug 2017)

  Changed paths:
    M src/lxc/cgfs.c
    M src/lxc/lxc_info.c
    M src/lxc/lxclock.c

  Log Message:
  -----------
  fix some cppcheck warnings

use cppcheck tools `cppcheck --enable=warning  .` on lxc source directory.

This patch fix the following warnning

```
[src/lxc/cgroups/cgfs.c:794]: (warning) %ld in format string (no. 3) requires 'long' but the argument type is 'unsigned long'.
[src/lxc/confile.c:4441]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src/lxc/confile.c:4502]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src/lxc/confile_legacy.c:921]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src/lxc/confile_legacy.c:938]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src/lxc/lxclock.c:63]: (warning) %zd in format string (no. 1) requires 'ssize_t' but the argument type is 'size_t {aka unsigned long}'.
[src/lxc/tools/lxc_info.c:118]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_info.c:118]: (warning) %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_info.c:123]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_info.c:127]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_info.c:130]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_top.c:212]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_top.c:212]: (warning) %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_top.c:217]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_top.c:221]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/lxc/tools/lxc_top.c:224]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
```

Signed-off-by: Long Wang <w at laoqinren.net>


  Commit: 730481c09830d164cdc4a709c8ddf223afa30669
      https://github.com/lxc/lxc/commit/730481c09830d164cdc4a709c8ddf223afa30669
  Author: Long Wang <w at laoqinren.net>
  Date:   2017-08-15 (Tue, 15 Aug 2017)

  Changed paths:
    M src/lxc/lxclock.c

  Log Message:
  -----------
  lxclock: return the right error when open lock file failed

Signed-off-by: Long Wang <w at laoqinren.net>


  Commit: bc65791885100e98f6559255af43ac97e73c6ca4
      https://github.com/lxc/lxc/commit/bc65791885100e98f6559255af43ac97e73c6ca4
  Author: Long Wang <w at laoqinren.net>
  Date:   2017-08-15 (Tue, 15 Aug 2017)

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

  Log Message:
  -----------
  lxclock: non-functional changes

This patch mainly updates comments based on the current code.

Signed-off-by: Long Wang <w at laoqinren.net>


  Commit: b3b6f40126d1a3aa1f63d0a81860bbea4038ee06
      https://github.com/lxc/lxc/commit/b3b6f40126d1a3aa1f63d0a81860bbea4038ee06
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-08-15 (Tue, 15 Aug 2017)

  Changed paths:
    M README.md

  Log Message:
  -----------
  README: add CII Best Practices badge to README

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


  Commit: f374f2e2fbe477b66faf44986437ea89981d1443
      https://github.com/lxc/lxc/commit/f374f2e2fbe477b66faf44986437ea89981d1443
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-08-15 (Tue, 15 Aug 2017)

  Changed paths:
    M README.md

  Log Message:
  -----------
  README: update

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


  Commit: 088505dfa4b15f64151081cb98d0eabc6182939c
      https://github.com/lxc/lxc/commit/088505dfa4b15f64151081cb98d0eabc6182939c
  Author: Long Wang <w at laoqinren.net>
  Date:   2017-08-15 (Tue, 15 Aug 2017)

  Changed paths:
    M src/lxc/lxc_init.c

  Log Message:
  -----------
  lxc-init: add comment for exclude 32 and 33 signals

Signed-off-by: Long Wang <w at laoqinren.net>


  Commit: 7c41be9bde7d51ec9a54ff5d6463996e2aa1dc5d
      https://github.com/lxc/lxc/commit/7c41be9bde7d51ec9a54ff5d6463996e2aa1dc5d
  Author: Long Wang <w at laoqinren.net>
  Date:   2017-08-15 (Tue, 15 Aug 2017)

  Changed paths:
    M src/tests/attach.c

  Log Message:
  -----------
  tests: remove temp lxcpath for attach testcase

Signed-off-by: Long Wang <w at laoqinren.net>


  Commit: e0b469aa71c91417e77d1016e29d264edfb754ca
      https://github.com/lxc/lxc/commit/e0b469aa71c91417e77d1016e29d264edfb754ca
  Author: Frédéric Dalleau <frederic.dalleau at collabora.com>
  Date:   2017-08-15 (Tue, 15 Aug 2017)

  Changed paths:
    M config/apparmor/abstractions/start-container

  Log Message:
  -----------
  Allow containers to start in AppArmor namespaces

This patch allows users to start containers in AppArmor namespaces.
Users can define their own profiles for their containers, but
lxc-start must be allowed to change to a namespace.

A container configuration file can wrap a container in an AppArmor
profile using lxc.aa_profile.

A process in an AppArmor namespace is restricted to view
or manage only the profiles belonging to this namespace, as if no
other profiles existed. A namespace can be created as follow:
sudo mkdir /sys/kernel/security/apparmor/policy/namespaces/$NAMESPACE

AppArmor can stack profiles so that the contained process is bound
by the intersection of all profiles of the stack. This is achieved
using the '//&' operator as follow:

lxc.aa_profile = $PROFILE//&:$NAMESPACE://unconfined

In this case, even the guest process appears unconfined in the
namespace, it is still confined by $PROFILE.

A guest allowed to access "/sys/kernel/security/apparmor/** rwklix,"
will be able to manage its own profile set, while still being
enclosed in the topmost profile $PROFILE:

Different guests can be assigned the same namespace or different
namespaces. In the first case, they will share their profiles.
In the second case, they will have distinct sets of profiles.

This is validated on privileged containers.

Signed-off-by: Frédéric Dalleau <frederic.dalleau at collabora.com>


  Commit: a22f697eecc9712f8a2a0c7d0b063c14c239d8c1
      https://github.com/lxc/lxc/commit/a22f697eecc9712f8a2a0c7d0b063c14c239d8c1
  Author: Long Wang <w at laoqinren.net>
  Date:   2017-08-15 (Tue, 15 Aug 2017)

  Changed paths:
    M src/lxc/af_unix.c

  Log Message:
  -----------
  af_unix: remove unlink operation

It is not necessary to unlink the abstract socket pathname when
we have finished using the socket. The abstract name is automatically
removed when the socket is closed.

Signed-off-by: Long Wang <w at laoqinren.net>


  Commit: 4de8c04f4973ddf30fa30866911ae46d2a8f92da
      https://github.com/lxc/lxc/commit/4de8c04f4973ddf30fa30866911ae46d2a8f92da
  Author: Long Wang <w at laoqinren.net>
  Date:   2017-08-15 (Tue, 15 Aug 2017)

  Changed paths:
    M src/lxc/state.h

  Log Message:
  -----------
  state: remove lxc_rmstate declaration

Signed-off-by: Long Wang <w at laoqinren.net>


  Commit: dcc6437d91a52b57aa53ec9cf0acf60baac9f90e
      https://github.com/lxc/lxc/commit/dcc6437d91a52b57aa53ec9cf0acf60baac9f90e
  Author: Long Wang <w at laoqinren.net>
  Date:   2017-08-15 (Tue, 15 Aug 2017)

  Changed paths:
    M src/lxc/utils.c

  Log Message:
  -----------
  utils: close parent end in child process after fork

Signed-off-by: Long Wang <w at laoqinren.net>


Compare: https://github.com/lxc/lxc/compare/5292b43b25cb...dcc6437d91a5


More information about the lxc-devel mailing list