[lxc-devel] [lxc/lxc] 3a3ead: global config: Unify parsing, add additional check...

GitHub noreply at github.com
Tue Sep 10 19:30:57 UTC 2013


  Branch: refs/heads/staging
  Home:   https://github.com/lxc/lxc
  Commit: 3a3ead949cc17aa66ab7696d18214eee9dcb5afb
      https://github.com/lxc/lxc/commit/3a3ead949cc17aa66ab7696d18214eee9dcb5afb
  Author: Christian Seiler <christian at iwakd.de>
  Date:   2013-09-10 (Tue, 10 Sep 2013)

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

  Log Message:
  -----------
  global config: Unify parsing, add additional checks

Instead of duplicating the code for parsing the global config file for
each option, write one main function, lxc_global_config_value, that
does the parsing for an arbitrary option name and just call that
function from the existing ones.

Signed-off-by: Christian Seiler <christian at iwakd.de>
Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>


  Commit: fed8903685000e2307e22a60ff528a7bcdb260b3
      https://github.com/lxc/lxc/commit/fed8903685000e2307e22a60ff528a7bcdb260b3
  Author: Christian Seiler <christian at iwakd.de>
  Date:   2013-09-10 (Tue, 10 Sep 2013)

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

  Log Message:
  -----------
  Add cgroup.pattern global configuration option

Signed-off-by: Christian Seiler <christian at iwakd.de>
Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>


  Commit: 1511808b4abe14dbfb1af8a1dde395ddb9310f57
      https://github.com/lxc/lxc/commit/1511808b4abe14dbfb1af8a1dde395ddb9310f57
  Author: Christian Seiler <christian at iwakd.de>
  Date:   2013-09-10 (Tue, 10 Sep 2013)

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

  Log Message:
  -----------
  Add fopen_cloexec function to emulate 'e' mode

Newer glibc versions (that we can't require) allow for an additional
letter 'e' in the fopen mode that will cause the file to be opened with
the O_CLOEXEC flag, so that it will be closed if the program exec()s
away. This is important because if liblxc is used in a multithreaded
program, another thread might want to run a program. This options
prevents the leakage of file descriptors from LXC. This patch adds an
emulation for that that uses the open(2) syscall and fdopen(3). At some
later point in time, it may be dropped against fopen(..., "...e").

This commit also converts all fopen() calls in utils.c (where the
function is added) to fopen_cloexec(). Subsequently, other calls to
fopen() and open() should also be adapted.

Signed-off-by: Christian Seiler <christian at iwakd.de>
Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>


  Commit: 5b9a0c795c9a1ef1febe6566e03f658af9c89772
      https://github.com/lxc/lxc/commit/5b9a0c795c9a1ef1febe6566e03f658af9c89772
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2013-09-10 (Tue, 10 Sep 2013)

  Changed paths:
    M src/lxc/utils.c

  Log Message:
  -----------
  fopen_cloexec: simplify open call

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>


  Commit: 35fface86df9564b1cf967015e8deff68b260d47
      https://github.com/lxc/lxc/commit/35fface86df9564b1cf967015e8deff68b260d47
  Author: Christian Seiler <christian at iwakd.de>
  Date:   2013-09-10 (Tue, 10 Sep 2013)

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

  Log Message:
  -----------
  utils: Add string and array utility functions

Adds a few useful string and array manipulation functions to utils.[ch]

Signed-off-by: Christian Seiler <christian at iwakd.de>
Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>


  Commit: 9e25b03e5470aa235e6ff146a6cc17f8946b983c
      https://github.com/lxc/lxc/commit/9e25b03e5470aa235e6ff146a6cc17f8946b983c
  Author: Christian Seiler <christian at iwakd.de>
  Date:   2013-09-10 (Tue, 10 Sep 2013)

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

  Log Message:
  -----------
  utils: Add utility functions that write/read to entire files

Signed-off-by: Christian Seiler <christian at iwakd.de>
Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>


  Commit: dcf2c26a4cf1cf60680e95b521ff0eac6e8c2782
      https://github.com/lxc/lxc/commit/dcf2c26a4cf1cf60680e95b521ff0eac6e8c2782
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2013-09-10 (Tue, 10 Sep 2013)

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

  Log Message:
  -----------
  remove unused lxc_read_line_from_file()

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>


Compare: https://github.com/lxc/lxc/compare/1b92e80dc74f...dcf2c26a4cf1


More information about the lxc-devel mailing list