[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 --- 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 --- a/src/lxc/lxc_u

[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 Date: 2013-11-19 (Tue, 19 Nov 2013) Changed paths: M src/lxc/lxc_us

[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 Date: 2013-11-19 (Tue, 19 Nov 2013) Changed paths: M src/lxc/lxc_us

[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 Date: 2013-11-19 (Tue, 19 Nov 2013) Changed paths: M templates/lxc-

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" wrote: > On Mon, 2013-11-18 at 12:28 -0500, Dwight Engen wrote: > > Signed-off-by: Dwight Engen > > --- > > templates/lxc-oracle.in | 9 + > > 1 file changed, 9 insertions(+) > > > > diff --git a/templates/lxc-oracle.in b/templa

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 > --- > 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 > --- a/templates/lxc-oracle.i

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

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 > > Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber > --- > src/lxc/lxc_user_nic.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/lxc/lxc_user_nic.c b/src/lxc/lxc_user_nic.

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 > > Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber > --- > src/lxc/lxc_user_nic.c | 42 -- > 1 file changed, 32 insertions(+), 10 deletions(-) > > diff --git a/s

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 > > Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber > --- > src/lxc/lxc_user_nic.c | 42 +- > 1 file changed, 21 insertions(+), 21 deletions(-) > > diff --git a/s

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 > > 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, and print filename

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 > > Everywhere else return an error code instead. > > Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber > --- > src/lxc/lxc_user_nic.c | 21 ++--- > 1 file changed, 10 insertions(+), 11 de

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 > > Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber > --- > 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_use

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 > > Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber > --- > 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_

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 > > 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

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 > > Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber > --- > 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_use

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 a

Re: [lxc-devel] [PATCH] lxc-attach: elevate specific privileges

2013-11-19 Thread Serge Hallyn
Quoting Nikola Kotur (kotn...@gmail.com): > There are scenarios in which we want to execute process with specific > privileges elevated. > > An example for this might be executing a process inside the container > securely, with capabilities dropped, but not in container's cgroup so > that we can h

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 Thanks. Acked-by: Serge E. Hallyn > --- > src/lxc/conf.c | 28 +++--

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 Acked-by: Serge E. Hallyn > --- > 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 > --- a/t

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 Acked-by: Serge E. Hallyn > --- > templates/lxc-oracle.in | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-)

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 Acked-by: Serge E. Hallyn > --- > templat

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 Acked-by: Serge E. Hallyn > --- > templates/lxc-oracle.in | 15 +-- > 1 file changed, 13 insertions(+), 2 deletions(-) > > diff --git a/templates/lxc-oracle.in b/templates/lxc-oracle.in > index 78d99ee..

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 i

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 /d

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

2013-11-19 Thread Serge Hallyn
From: Serge Hallyn Signed-off-by: Serge Hallyn --- 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 ff5393e..caa20df 100644 --- a/src/lxc/lxc_user_nic.c +

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

2013-11-19 Thread Serge Hallyn
From: Serge Hallyn Everywhere else return an error code instead. Signed-off-by: Serge Hallyn --- src/lxc/lxc_user_nic.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/lxc/lxc_user_nic.c b/src/lxc/lxc_user_nic.c index 8c73b55..0b82a50 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 forefr

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

2013-11-19 Thread Serge Hallyn
From: Serge Hallyn 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, and print filename and errno if we failed to open conf file. Signed-off-by: Serge Hallyn ---

[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 Signed-off-by: Serge Hallyn --- 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 --- a/src/lxc/lxc_user_nic.c +++ b/src/lxc/lxc_user_nic.c @@ -105,7 +

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

2013-11-19 Thread Serge Hallyn
From: Serge Hallyn Signed-off-by: Serge Hallyn --- src/lxc/lxc_user_nic.c | 42 -- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/src/lxc/lxc_user_nic.c b/src/lxc/lxc_user_nic.c index 7d367c1..7ac3020 100644 --- a/src/lxc/lxc_user_nic.c +

[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 Signed-off-by: Serge Hallyn --- 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 --- a/src/lxc/lxc_user_nic.c +++ b/src/lxc/lxc_user_nic.c @@ -122,7 +

[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 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 --- src/lxc/lxc_user_nic.c | 64 +--

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

2013-11-19 Thread Serge Hallyn
From: Serge Hallyn Signed-off-by: Serge Hallyn --- 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 --- a/src/lxc/lxc_user_nic.c +++ b/src/lxc/lxc_user_nic.c @@ -633,7 +63

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

2013-11-19 Thread Serge Hallyn
From: Serge Hallyn Signed-off-by: Serge Hallyn --- src/lxc/lxc_user_nic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/lxc_user_nic.c b/src/lxc/lxc_user_nic.c index caa20df..7d367c1 100644 --- a/src/lxc/lxc_user_nic.c +++ b/src/lxc/lxc_user_nic.c @@ -906,7 +906,7