[lxc-devel] [lxc/lxc] ae22a2: make lxcapi_get_interfaces and lxcapi_get_ips unpr...

GitHub noreply at github.com
Wed Jan 22 01:11:37 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: ae22a2206489f1a4eba40e26853113772db50929
      https://github.com/lxc/lxc/commit/ae22a2206489f1a4eba40e26853113772db50929
  Author: S.Çağlar Onur <caglar at 10ur.org>
  Date:   2014-01-21 (Tue, 21 Jan 2014)

  Changed paths:
    M src/lxc/lxc-ls
    M src/lxc/lxc_info.c
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  make lxcapi_get_interfaces and lxcapi_get_ips unprivileged container aware

Based on Stéphane's suggestion, those two API methods now;

* fork a new process,
* switch to appropriate namespace(s),
* do what we want,
* return the data over a pipe to the parent which returns the result to the original caller.

For the whole thread please see;

 https://lists.linuxcontainers.org/pipermail/lxc-devel/2014-January/007362.html

This patch also makes lxc-ls and lxc-info call those functions.

I'm adding Stéphane as an author here since both the idea as well as
the initial setns code come from him.

Author: S.Çağlar Onur <caglar at 10ur.org>
Author: Stéphane Graber <stgraber at ubuntu.com>
Signed-off-by: S.Çağlar Onur <caglar at 10ur.org>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>




More information about the lxc-devel mailing list