[lxc-devel] [PATCH 3/9] lxc_user_nic: report strerror(errno)

2013-11-19 Thread Serge Hallyn
From: Serge Hallyn serge.hal...@ubuntu.com Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com --- src/lxc/lxc_user_nic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lxc/lxc_user_nic.c b/src/lxc/lxc_user_nic.c index da3ae74..8c73b55 100644 ---

[lxc-devel] [PATCH 2/9] lxc_user_nic: don't pass unused arg to get_username()

2013-11-19 Thread Serge Hallyn
From: Serge Hallyn serge.hal...@ubuntu.com Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com --- src/lxc/lxc_user_nic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lxc/lxc_user_nic.c b/src/lxc/lxc_user_nic.c index c8513ba..da3ae74 100644 ---

[lxc-devel] [PATCH 1/9] lxc_user_nic: add a check to make sure caller owns target netns

2013-11-19 Thread Serge Hallyn
From: Serge Hallyn serge.hal...@ubuntu.com Temporarily set our euid back to the calling ruid, so that the access(2) check can succeed based on the euid being the userns creator. Also switch from atoi to strtol Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com --- src/lxc/lxc_user_nic.c | 64

[lxc-devel] [PATCH 5/9] lxc_user_nic: report failing filename in open_and_lock error cases

2013-11-19 Thread Serge Hallyn
From: Serge Hallyn serge.hal...@ubuntu.com Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com --- src/lxc/lxc_user_nic.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lxc/lxc_user_nic.c b/src/lxc/lxc_user_nic.c index 0b82a50..4154e83 100644 ---

[lxc-devel] lxc-user-nic improvements

2013-11-19 Thread Serge Hallyn
Seth (cc:d) was kind enough to provide some feedback on the ugliest bits of lxc-user-nic. This patchset aims address it. -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the

[lxc-devel] [PATCH 7/9] lxc_user_nic: make all fns static for consistency

2013-11-19 Thread Serge Hallyn
From: Serge Hallyn serge.hal...@ubuntu.com Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com --- src/lxc/lxc_user_nic.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/lxc/lxc_user_nic.c b/src/lxc/lxc_user_nic.c index

[lxc-devel] [PATCH 4/9] lxc_user_nic: only exit from main and usage

2013-11-19 Thread Serge Hallyn
From: Serge Hallyn serge.hal...@ubuntu.com Everywhere else return an error code instead. Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com --- src/lxc/lxc_user_nic.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/lxc/lxc_user_nic.c

Re: [lxc-devel] [PATCH 1/2] Setup devtmpfs and /dev for autodev bind mounts.

2013-11-19 Thread Serge Hallyn
Quoting Michael H. Warfield (m...@wittsend.com): If autodev is not specifically set to 0 or 1, attempts to determine if systemd is being utilized and forces autodev=1 to prevent host system conflicts and collisions. If autodev is enabled and the host /dev is mounted with devtmpfs or

Re: [lxc-devel] [PATCH 2/2] Support files for systemd on Fedora.

2013-11-19 Thread Serge Hallyn
Quoting Michael H. Warfield (m...@wittsend.com): Added a file lxc.service for a systemd service file. Added a file lxc-devsetup to setup /dev/ on startup to support autodev in containers. Service file references lxc-devsetup as an ExecStartPre command. The lxc-devsetup script is not

Re: [lxc-devel] [PATCH 1/4] oracle template: further disable selinux in ol5 container

2013-11-19 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): Signed-off-by: Dwight Engen dwight.en...@oracle.com Acked-by: Serge E. Hallyn serge.hal...@ubuntu.com --- templates/lxc-oracle.in | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/templates/lxc-oracle.in

Re: [lxc-devel] [PATCH 2/4] oracle template: prevent mingetty from calling vhangup(2)

2013-11-19 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): This is needed when using the user namespace since the kernel check does not allow user_ns root to successfully call vhangup(2), and mingetty will quit in this case. Signed-off-by: Dwight Engen dwight.en...@oracle.com Acked-by: Serge E. Hallyn

Re: [lxc-devel] [PATCH 3/4] oracle template: don't clear console tty

2013-11-19 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): This allows the boot messages to be seen which are useful for monitoring container startup. Signed-off-by: Dwight Engen dwight.en...@oracle.com Acked-by: Serge E. Hallyn serge.hal...@ubuntu.com --- templates/lxc-oracle.in | 4 ++-- 1 file

Re: [lxc-devel] [PATCH 4/4] oracle template: fix pam login failures under user namespace

2013-11-19 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com): Signed-off-by: Dwight Engen dwight.en...@oracle.com Acked-by: Serge E. Hallyn serge.hal...@ubuntu.com --- templates/lxc-oracle.in | 9 + 1 file changed, 9 insertions(+) diff --git a/templates/lxc-oracle.in b/templates/lxc-oracle.in

Re: [lxc-devel] [PATCH] fix memory leaks reported by cppcheck in src/lxc/conf.c (v2)

2013-11-19 Thread Serge Hallyn
Quoting S.Çağlar Onur (cag...@10ur.org): This also fixes possible crashes due to passing NULL to strlen function Changes since v1; * Fixed a typo spotted by Serge Signed-off-by: S.Çağlar Onur cag...@10ur.org Thanks. Acked-by: Serge E. Hallyn serge.hal...@ubuntu.com --- src/lxc/conf.c

Re: [lxc-devel] [PATCH 1/2] Setup devtmpfs and /dev for autodev bind mounts.

2013-11-19 Thread Michael H. Warfield
On Tue, 2013-11-19 at 14:53 -0600, Serge Hallyn wrote: Quoting Michael H. Warfield (m...@wittsend.com): If autodev is not specifically set to 0 or 1, attempts to determine if systemd is being utilized and forces autodev=1 to prevent host system conflicts and collisions. If autodev is

Re: [lxc-devel] [PATCH 2/9] lxc_user_nic: don't pass unused arg to get_username()

2013-11-19 Thread Stéphane Graber
On Tue, Nov 19, 2013 at 04:17:45PM +, Serge Hallyn wrote: From: Serge Hallyn serge.hal...@ubuntu.com Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com Acked-by: Stéphane Graber stgra...@ubuntu.com --- src/lxc/lxc_user_nic.c | 6 +++--- 1 file changed, 3 insertions(+), 3

Re: [lxc-devel] [PATCH 1/9] lxc_user_nic: add a check to make sure caller owns target netns

2013-11-19 Thread Stéphane Graber
On Tue, Nov 19, 2013 at 04:17:44PM +, Serge Hallyn wrote: From: Serge Hallyn serge.hal...@ubuntu.com Temporarily set our euid back to the calling ruid, so that the access(2) check can succeed based on the euid being the userns creator. Also switch from atoi to strtol Signed-off-by:

Re: [lxc-devel] [PATCH 3/9] lxc_user_nic: report strerror(errno)

2013-11-19 Thread Stéphane Graber
On Tue, Nov 19, 2013 at 04:17:46PM +, Serge Hallyn wrote: From: Serge Hallyn serge.hal...@ubuntu.com Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com Acked-by: Stéphane Graber stgra...@ubuntu.com --- src/lxc/lxc_user_nic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [lxc-devel] [PATCH 5/9] lxc_user_nic: report failing filename in open_and_lock error cases

2013-11-19 Thread Stéphane Graber
On Tue, Nov 19, 2013 at 04:17:48PM +, Serge Hallyn wrote: From: Serge Hallyn serge.hal...@ubuntu.com Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com Acked-by: Stéphane Graber stgra...@ubuntu.com --- src/lxc/lxc_user_nic.c | 6 -- 1 file changed, 4 insertions(+), 2

Re: [lxc-devel] [PATCH 4/9] lxc_user_nic: only exit from main and usage

2013-11-19 Thread Stéphane Graber
On Tue, Nov 19, 2013 at 04:17:47PM +, Serge Hallyn wrote: From: Serge Hallyn serge.hal...@ubuntu.com Everywhere else return an error code instead. Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com Acked-by: Stéphane Graber stgra...@ubuntu.com --- src/lxc/lxc_user_nic.c | 21

Re: [lxc-devel] [PATCH 6/9] lxc_user_nic: fix get_allotted description.

2013-11-19 Thread Stéphane Graber
On Tue, Nov 19, 2013 at 04:17:49PM +, Serge Hallyn wrote: From: Serge Hallyn serge.hal...@ubuntu.com get_allotted doesn't get the list of nic names, only the # of nics allowed to the user. We check the db_file later for existing number of nics. Also close the conf file on success,

Re: [lxc-devel] [PATCH 7/9] lxc_user_nic: make all fns static for consistency

2013-11-19 Thread Stéphane Graber
On Tue, Nov 19, 2013 at 04:17:50PM +, Serge Hallyn wrote: From: Serge Hallyn serge.hal...@ubuntu.com Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com Acked-by: Stéphane Graber stgra...@ubuntu.com --- src/lxc/lxc_user_nic.c | 42 +- 1 file

Re: [lxc-devel] [PATCH 9/9] lxc-user-nic: improve cull_entries

2013-11-19 Thread Stéphane Graber
On Tue, Nov 19, 2013 at 04:17:52PM +, Serge Hallyn wrote: From: Serge Hallyn serge.hal...@ubuntu.com Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com Acked-by: Stéphane Graber stgra...@ubuntu.com --- src/lxc/lxc_user_nic.c | 42 -- 1 file

Re: [lxc-devel] [PATCH 8/9] lxc_user_nic: initialize cnic to NULL to please compiler

2013-11-19 Thread Stéphane Graber
On Tue, Nov 19, 2013 at 04:17:51PM +, Serge Hallyn wrote: From: Serge Hallyn serge.hal...@ubuntu.com Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com Acked-by: Stéphane Graber stgra...@ubuntu.com --- src/lxc/lxc_user_nic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [lxc-devel] [PATCH 2/2] Support files for systemd on Fedora.

2013-11-19 Thread Michael H. Warfield
On Tue, 2013-11-19 at 14:57 -0600, Serge Hallyn wrote: Quoting Michael H. Warfield (m...@wittsend.com): Added a file lxc.service for a systemd service file. Added a file lxc-devsetup to setup /dev/ on startup to support autodev in containers. Service file references lxc-devsetup as

Re: [lxc-devel] [PATCH 4/4] oracle template: fix pam login failures under user namespace

2013-11-19 Thread Michael H. Warfield
On Mon, 2013-11-18 at 12:28 -0500, Dwight Engen wrote: Signed-off-by: Dwight Engen dwight.en...@oracle.com --- templates/lxc-oracle.in | 9 + 1 file changed, 9 insertions(+) diff --git a/templates/lxc-oracle.in b/templates/lxc-oracle.in index e86f261..8770e70 100644 ---

Re: [lxc-devel] [PATCH 4/4] oracle template: fix pam login failures under user namespace

2013-11-19 Thread Dwight Engen
On Tue, 19 Nov 2013 17:00:50 -0500 Michael H. Warfield m...@wittsend.com wrote: On Mon, 2013-11-18 at 12:28 -0500, Dwight Engen wrote: Signed-off-by: Dwight Engen dwight.en...@oracle.com --- templates/lxc-oracle.in | 9 + 1 file changed, 9 insertions(+) diff --git

[lxc-devel] [lxc/lxc] 31f38b: oracle template: further disable selinux in ol5 co...

2013-11-19 Thread GitHub
Branch: refs/heads/master Home: https://github.com/lxc/lxc Commit: 31f38b1721ac33c0ede3b8ad3733298e74965c83 https://github.com/lxc/lxc/commit/31f38b1721ac33c0ede3b8ad3733298e74965c83 Author: Dwight Engen dwight.en...@oracle.com Date: 2013-11-19 (Tue, 19 Nov 2013) Changed

[lxc-devel] [lxc/lxc] 8d9f63: lxc_user_nic: add a check to make sure caller owns...

2013-11-19 Thread GitHub
Branch: refs/heads/master Home: https://github.com/lxc/lxc Commit: 8d9f636daf77f1a551f0c25e1270ab32e5b21ea4 https://github.com/lxc/lxc/commit/8d9f636daf77f1a551f0c25e1270ab32e5b21ea4 Author: Serge Hallyn serge.hal...@ubuntu.com Date: 2013-11-19 (Tue, 19 Nov 2013) Changed

[lxc-devel] [lxc/lxc] 49aba4: lxc_user_nic: fix fd leak reported by coverity

2013-11-19 Thread GitHub
Branch: refs/heads/master Home: https://github.com/lxc/lxc Commit: 49aba4d3c828808953b7ef004c459707d901c360 https://github.com/lxc/lxc/commit/49aba4d3c828808953b7ef004c459707d901c360 Author: Serge Hallyn serge.hal...@ubuntu.com Date: 2013-11-19 (Tue, 19 Nov 2013) Changed

[lxc-devel] [PATCH] fix memory leaks reported by cppcheck in src/lxc/lxc_usernsexec.c

2013-11-19 Thread S . Çağlar Onur
Free previously allocated memory if realloc fails. Signed-off-by: S.Çağlar Onur cag...@10ur.org --- src/lxc/lxc_usernsexec.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/lxc/lxc_usernsexec.c b/src/lxc/lxc_usernsexec.c index 9416f27..2957dd5 100644 ---