1. 02 Feb, 2017 1 commit
    • conf/ile: make sure buffer is large enough · 091045f8
      Christian Brauner authored
      conf.c: In function 'lxc_assign_network':
      conf.c:3096:25: error: '%lu' directive output may be truncated writing between 1 and 20 bytes into a region of size 19 [-Werror=format-truncation=]
         snprintf(pidstr, 19, "%lu", (unsigned long) pid);
                               ^~~
      conf.c:3096:24: note: using the range [1, 18446744073709551615] for directive argument
         snprintf(pidstr, 19, "%lu", (unsigned long) pid);
                              ^~~~~
      In file included from /usr/include/stdio.h:938:0,
                       from conf.c:35:
      /usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: format output between 2 and 21 bytes into a destination of size 19
         return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              __bos (__s), __fmt, __va_arg_pack ());
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      confile.c: In function 'network_new_hwaddrs':
      confile.c:2889:38: error: '%02x' directive output may be truncated writing between 2 and 8 bytes into a region of size 6 [-Werror=format-truncation=]
        snprintf(hwaddr, 18, "00:16:3e:%02x:%02x:%02x",
                                            ^~~~
      confile.c:2889:23: note: using the range [0, 4294967295] for directive argument
        snprintf(hwaddr, 18, "00:16:3e:%02x:%02x:%02x",
                             ^~~~~~~~~~~~~~~~~~~~~~~~~
      confile.c:2889:23: note: using the range [0, 4294967295] for directive argument
      In file included from /usr/include/stdio.h:938:0,
                       from confile.c:24:
      /usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: format output between 18 and 36 bytes into a destination of size 18
         return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              __bos (__s), __fmt, __va_arg_pack ());
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Not sure whether the latter is really a problem. We might need an additional
      fix later on.
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
  2. 30 Jan, 2017 2 commits
  3. 29 Jan, 2017 2 commits
  4. 27 Jan, 2017 2 commits
  5. 26 Jan, 2017 2 commits
    • Merge pull request #1392 from cjwatson/start-ephemeral-python32 · 42dc0de4
      Stéphane Graber authored
      Make lxc-start-ephemeral Python 3.2-compatible
    • Make lxc-start-ephemeral Python 3.2-compatible · e0e34b7e
      Colin Watson authored
      On Ubuntu 12.04 LTS with Python 3.2, `lxc-start-ephemeral` breaks as
      follows:
      
          Traceback (most recent call last):
            File "/usr/bin/lxc-start-ephemeral", line 371, in attach_as_user
            File "/usr/lib/python3.2/subprocess.py", line 515, in check_output
            File "/usr/lib/python3.2/subprocess.py", line 732, in __init__
          LookupError: unknown encoding: ANSI_X3.4-1968
      
      This is because `universal_newlines=True` causes `subprocess` to use
      `io.TextIOWrapper`, and in versions of Python earlier than 3.3 that
      fetched the preferred encoding using `locale.getpreferredencoding()`
      rather than `locale.getpreferredencoding(False)`, thereby changing the
      locale and causing codecs to be reloaded.  However, `attach_as_user`
      runs inside the container and thus can't rely on having access to the
      same Python standard library on disk.
      
      The workaround is to decode by hand instead, avoiding the temporary
      change of locale.
      Signed-off-by: 's avatarColin Watson <cjwatson@ubuntu.com>
  6. 21 Jan, 2017 2 commits
  7. 12 Jan, 2017 2 commits
  8. 11 Jan, 2017 2 commits
  9. 07 Jan, 2017 5 commits
  10. 04 Jan, 2017 6 commits
  11. 03 Jan, 2017 2 commits
  12. 29 Dec, 2016 1 commit
  13. 28 Dec, 2016 1 commit
  14. 19 Dec, 2016 1 commit
  15. 18 Dec, 2016 1 commit
    • Add --enable-gnutls option · c8601571
      Fabrice Fontaine authored
      Previously HAVE_LIBGNUTLS was never set in config.h even if gnutls was
      detected as AC_CHECK_LIB default action-if-found was overriden by
      enable_gnutls=yes
      This patch adds an --enable-gnutls option and will call AC_CHECK_LIB
      with the default action to write HAVE_LIBGNUTLS in config.h
      Signed-off-by: 's avatarFabrice Fontaine <fabrice.fontaine@orange.com>
  16. 16 Dec, 2016 1 commit
  17. 15 Dec, 2016 5 commits
  18. 13 Dec, 2016 1 commit
    • confile: support the network link string pattern matching · 576400e5
      fli authored
      Enable lxc network config support the following type and link:
      
      lxc.network.type = phys
      lxc.network.link = eth+
      
      Here, the suffix '+' will trigger a string pattern matching
      and when lxc find any network interfaces name prefixed with
      "eth" such as "eth0", "eth1", "ethxxxx" and so on, it will
      try to move them into the container's namespace; If it didn't
      find any matching, it would do nothing for this configure
      line.
      Signed-off-by: 's avatarfli <fupan.li@windriver.com>
  19. 12 Dec, 2016 1 commit