[lxc-devel] [PATCH] busybox template: set mode when creating device nodes

2013-12-06 Thread Dwight Engen
ensure mode 666 is set for tty1 and tty5 Signed-off-by: Dwight Engen --- templates/lxc-busybox.in | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in index 23d654e..97614c6 100644 --- a/templates/lxc

[lxc-devel] [PATCH 2/2] let lxc-monitor command ask a lxc-monitord instance to quit

2013-12-06 Thread Dwight Engen
seconds for more clients, potentially freeing up lxcpath for unmounting. Signed-off-by: Dwight Engen --- doc/lxc-monitor.sgml.in | 22 ++ src/lxc/lxc_monitor.c | 33 +++-- src/lxc/lxc_monitord.c | 18 +++--- 3 files changed, 68 insertions

[lxc-devel] [PATCH 1/2] add epoll events to mainloop callback handlers

2013-12-06 Thread Dwight Engen
Adding the epoll events allows the handler to determine what events happened on the fd. Signed-off-by: Dwight Engen --- src/lxc/commands.c | 6 -- src/lxc/console.c | 8 src/lxc/lxc_monitord.c | 6 +++--- src/lxc/lxcutmp.c | 7 --- src/lxc/mainloop.c | 4

Re: [lxc-devel] how to tell lxc-monitord to go away?

2013-12-06 Thread Dwight Engen
On Fri, 06 Dec 2013 09:16:34 +0100 Harald Dunkel wrote: > Hi folks, > > If I shut down my drbd partition to mount it on another > host, then lxc-monitord keeps the mount point busy for at > least 30 seconds. This means additional 30 seconds > unavailability of the service provided by the contain

[lxc-devel] [PATCH] oracle template: fix chcon warning when selinux disabled

2013-12-06 Thread Dwight Engen
Signed-off-by: Dwight Engen --- templates/lxc-oracle.in | 13 +++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/templates/lxc-oracle.in b/templates/lxc-oracle.in index 67e46ab..1338f34 100644 --- a/templates/lxc-oracle.in +++ b/templates/lxc-oracle.in @@ -46,6

Re: [lxc-devel] [PATCH] ubuntu: Fix regression in post-process

2013-12-04 Thread Dwight Engen
On Tue, 3 Dec 2013 23:34:43 -0500 S.Çağlar Onur wrote: > Hi, > > > On Tue, Dec 3, 2013 at 6:53 PM, Stéphane Graber > wrote: > > On Tue, Dec 03, 2013 at 05:43:47PM -0600, Serge Hallyn wrote: > >> Quoting S.Çağlar Onur (cag...@10ur.org): > >> > Hey Stéphane, > >> > > >> > On Wed, Nov 27, 2013 at

Re: [lxc-devel] LXC live migrate

2013-11-26 Thread Dwight Engen
On Mon, 25 Nov 2013 21:58:13 -0500 Stéphane Graber wrote: > On Tue, Nov 26, 2013 at 04:04:36AM +0200, Marian Marinov wrote: > > Hey guys, > > I just read on LWN about the checkpoint/restore tool: > >http://lwn.net/Articles/574917/ > > > > With this, it seams possible to freeze and restore a

[lxc-devel] [PATCH] add lxc-devsetup to EXTRA_DIST

2013-11-25 Thread Dwight Engen
fixes rpm build Signed-off-by: Dwight Engen --- src/lxc/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am index bcb644e..ce1cfa8 100644 --- a/src/lxc/Makefile.am +++ b/src/lxc/Makefile.am @@ -149,6 +149,7 @@ bin_SCRIPTS = \ EXTRA_DIST

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(+) > >

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

2013-11-18 Thread Dwight Engen
This allows the boot messages to be seen which are useful for monitoring container startup. Signed-off-by: Dwight Engen --- templates/lxc-oracle.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/lxc-oracle.in b/templates/lxc-oracle.in index d3d6ff9..e86f261

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

2013-11-18 Thread Dwight Engen
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 --- templates/lxc-oracle.in | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git

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

2013-11-18 Thread Dwight Engen
Signed-off-by: Dwight Engen --- 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..106150c 100644 --- a/templates/lxc-oracle.in +++ b/templates/lxc-oracle.in @@ -51,11

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

2013-11-18 Thread Dwight Engen
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.in +++ b/templates/lxc-oracle.in @@ -72,6 +72,10

Re: [lxc-devel] [PATCH] lxc-lua: LFS library is not being used

2013-11-18 Thread Dwight Engen
On Mon, 18 Nov 2013 11:42:01 +0100 Nikola Kotur wrote: > Signed-off-by: Nikola Kotur Acked-by: Dwight Engen > --- > src/lxc/lxc-top | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/src/lxc/lxc-top b/src/lxc/lxc-top > index a1f0250..b5b3a69 100755 > --- a/src

Re: [lxc-devel] [PATCH] lxc-info: Rework based on mailinglist thread

2013-11-15 Thread Dwight Engen
output > as it wasn't trivial to re-arrange the stats code to print a > different format (for the other options, it's just a two lines change > in the print functions). > > Signed-off-by: Stéphane Graber Acked-by: Dwight Engen > --- > doc/ja/lxc-info.sgml.in | 27 -

Re: [lxc-devel] Rethinking lxc-info a bit

2013-11-13 Thread Dwight Engen
On Wed, 13 Nov 2013 14:41:55 -0500 Stéphane Graber wrote: > Hello, > > We recently got reports of the recent changes to lxc-info breaking > existing scripts. > > While discusing those issues, I noticed a few points that I think are > worth discussing and addressing, I'm going to postpone alpha3

Re: [lxc-devel] [PATCH] add process_lock()/unlock() in save_config()

2013-11-12 Thread Dwight Engen
On Tue, 12 Nov 2013 14:42:54 -0600 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > This is likely unnecessary, but is consistent with other uses of > > fopen()/fclose() in lxc. > > > > Signed-off-by: Dwight Engen > > Do you think, r

Re: [lxc-devel] [PATCH] fix multithreaded create()

2013-11-12 Thread Dwight Engen
On Tue, 12 Nov 2013 14:35:58 -0500 S.Çağlar Onur wrote: > On Tue, Nov 12, 2013 at 2:04 PM, Dwight Engen > wrote: > > We were calling save_config() twice within the create() flow, each > > from a different process. Depending on order of scheduling, > > sometimes

[lxc-devel] [PATCH] fix multithreaded create()

2013-11-12 Thread Dwight Engen
truncated config file which would then cause lxc to segfault once it read it back in because no rootfs.path was set. This fixes it by only calling save_config() once in the create() flow. A rejected alternative was to call fsync(fileno(fout)) before the fclose in save_config. Signed-off-by: Dwight Engen

[lxc-devel] [PATCH] add process_lock()/unlock() in save_config()

2013-11-12 Thread Dwight Engen
This is likely unnecessary, but is consistent with other uses of fopen()/fclose() in lxc. Signed-off-by: Dwight Engen --- src/lxc/lxccontainer.c | 4 1 file changed, 4 insertions(+) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index ede0113..c7b2f5e 100644 --- a/src/lxc

[lxc-devel] [PATCH] add modes argument to lxc-test-concurrent

2013-11-08 Thread Dwight Engen
- This allows testing independently the modes with/without threading Signed-off-by: Dwight Engen --- src/tests/concurrent.c | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/src/tests/concurrent.c b/src/tests/concurrent.c index 16e93d6

Re: [lxc-devel] [PATCH v2 0/4] add statistics to lxc-info

2013-11-06 Thread Dwight Engen
On Wed, 6 Nov 2013 08:18:17 -0600 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > Hi Stéphane, > > > > I was able to add the ***containers output fairly in a fairly > > straightforward manner. I also split out the patch into more > >

[lxc-devel] [PATCH] coverity 1126129: don't try to print c->name when c is NULL

2013-11-06 Thread Dwight Engen
I accidentally introduced this with the change to lxc-info (commit b9d957c3). Signed-off-by: Dwight Engen --- src/lxc/lxc_info.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lxc/lxc_info.c b/src/lxc/lxc_info.c index ba43f37..6c35bbb 100644 --- a/src/lxc/lxc_info.c

Re: [lxc-devel] [PATCH v2 1/4] add list_all_containers(), returns defined and active containers

2013-11-06 Thread Dwight Engen
On Tue, 5 Nov 2013 22:17:28 -0600 Serge Hallyn wrote: > Quoting Serge Hallyn (serge.hal...@ubuntu.com): > > Quoting Dwight Engen (dwight.en...@oracle.com): > > > Signed-off-by: Dwight Engen > > > > Hi, > > > > One comment below: > > fwiw ther

[lxc-devel] [PATCH v2 1/4] add list_all_containers(), returns defined and active containers

2013-11-05 Thread Dwight Engen
Signed-off-by: Dwight Engen --- src/lxc/lxccontainer.c | 97 +++--- src/lxc/lxccontainer.h | 10 ++ 2 files changed, 103 insertions(+), 4 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 89b45ed..d7d3273 100644 --- a

[lxc-devel] [PATCH v2 3/4] fix leak in list_active_containers()

2013-11-05 Thread Dwight Engen
se we just successfully added the name above. Signed-off-by: Dwight Engen --- src/lxc/lxccontainer.c | 72 -- 1 file changed, 35 insertions(+), 37 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index d7d3273..d57b23c 100644

[lxc-devel] [PATCH v2 4/4] add statistics to lxc-info

2013-11-05 Thread Dwight Engen
- allow lxc-info to show more than one container, using regex for the name Signed-off-by: Dwight Engen --- doc/lxc-info.sgml.in | 65 - src/lxc/lxc_info.c | 257 +++ 2 files changed, 300 insertions(+), 22 deletions(-) diff --git a

[lxc-devel] [PATCH v2 2/4] tests list: refactor and add test for list_all_containers()

2013-11-05 Thread Dwight Engen
Signed-off-by: Dwight Engen --- src/tests/list.c | 97 +--- 1 file changed, 36 insertions(+), 61 deletions(-) diff --git a/src/tests/list.c b/src/tests/list.c index a061542..af41e7f 100644 --- a/src/tests/list.c +++ b/src/tests/list.c

[lxc-devel] [PATCH v2 0/4] add statistics to lxc-info

2013-11-05 Thread Dwight Engen
Hi Stéphane, I was able to add the ***containers output fairly in a fairly straightforward manner. I also split out the patch into more discrete logical changes, adding/refactoring the list.c test and fixing a leak in list_active_containers() along the way. Serge, hopefully you don't mind I rename

[lxc-devel] [PATCH v2] fix leak when a veth.pair name is specified

2013-11-05 Thread Dwight Engen
Please do not apply the previous version of this patch, it is wrong. I didn't take into account that priv is a union, so priv.veth_attr.pair is only a pointer when netdev type is VETH. The following patch works when non-veth nics are also present. -- Signed-off-by: Dwight Engen --- sr

Re: [lxc-devel] [PATCH 2/2] add statistics to lxc-info

2013-11-05 Thread Dwight Engen
On Mon, 4 Nov 2013 18:12:15 -0500 Stéphane Graber wrote: > On Mon, Nov 04, 2013 at 05:35:19PM -0500, Dwight Engen wrote: > > - added list_all_containers() which returns both defined and > > active containers. > > > > - allow lxc-info to show more than one contain

[lxc-devel] [PATCH] fix leak when a veth.pair name is specified

2013-11-04 Thread Dwight Engen
Signed-off-by: Dwight Engen --- src/lxc/conf.c| 2 ++ src/lxc/confile.c | 14 +- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 2a47e77..0d1eccd 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -3308,6 +3308,8 @@ static

[lxc-devel] [PATCH] lua: add cmd_get_config_item to API

2013-11-04 Thread Dwight Engen
Signed-off-by: Dwight Engen --- src/lua-lxc/core.c | 25 + src/lua-lxc/lxc.lua | 8 src/lua-lxc/test/apitest.lua | 7 +++ 3 files changed, 40 insertions(+) diff --git a/src/lua-lxc/core.c b/src/lua-lxc/core.c index ea19cc3..9492c07

[lxc-devel] [PATCH 2/2] add statistics to lxc-info

2013-11-04 Thread Dwight Engen
- added list_all_containers() which returns both defined and active containers. - allow lxc-info to show more than one container, using regex for the name Signed-off-by: Dwight Engen --- doc/lxc-info.sgml.in | 65 - src/lxc/lxc_info.c | 257

[lxc-devel] [PATCH 1/2] allow lxcapi_get_cgroup_item() on lxc-execute containers

2013-11-04 Thread Dwight Engen
Containers started with lxc-execute may not have a conf, but nothing in the implementation of lxcapi_get_cgroup_item() actually needs/uses it, and it can be useful to get items out of the containers' cgroup items. Signed-off-by: Dwight Engen --- src/lxc/lxccontainer.c | 2 +- 1 file chang

[lxc-devel] [PATCH 3/3] lxc-top: show kernel memory being used if available

2013-11-02 Thread Dwight Engen
- Also removed duplicate stats_clear lua function Signed-off-by: Dwight Engen --- doc/lxc-top.sgml.in | 33 ++--- src/lua-lxc/lxc.lua | 17 ++--- src/lxc/lxc-top | 25 ++--- 3 files changed, 50 insertions(+), 25 deletions(-) diff

[lxc-devel] [PATCH 1/3] add [gs]et_cgroup_item to lua api

2013-11-02 Thread Dwight Engen
fix up api test to run and add test for new [gs]et_cgroup_item Signed-off-by: Dwight Engen --- src/lua-lxc/core.c | 35 +++ src/lua-lxc/lxc.lua | 16 src/lua-lxc/test/apitest.lua | 13 + 3 files changed, 64

[lxc-devel] [PATCH 2/3] lua: fix stats collection using get_cgroup_item

2013-11-02 Thread Dwight Engen
. Signed-off-by: Dwight Engen --- src/lua-lxc/lxc.lua | 71 + 1 file changed, 17 insertions(+), 54 deletions(-) diff --git a/src/lua-lxc/lxc.lua b/src/lua-lxc/lxc.lua index 7c9580e..5a3b49e 100755 --- a/src/lua-lxc/lxc.lua +++ b/src/lua-lxc/lxc.lua

[lxc-devel] [PATCH] coverity 1026198: remove unnecessary NULL check

2013-10-30 Thread Dwight Engen
c->lxc_conf cannot be NULL in this case since the call sequence c->save_config() c->load_config() load_config_locked() which is done before this check will allocate it or fail Signed-off-by: Dwight Engen --- src/lxc/lxccontainer.c | 34 -- 1 fil

[lxc-devel] [PATCH] remove left over debug getchar()

2013-10-30 Thread Dwight Engen
I goofed and left in a getchar() that I was using to pause the test program in a case that was failing for me. Remove it. Signed-off-by: Dwight Engen --- src/tests/cgpath.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tests/cgpath.c b/src/tests/cgpath.c index 13986cf..acf3c2d 100644

[lxc-devel] [PATCH 2/2] coverity 1097616: don't deref NULL when subsystem doesn't have a '.'

2013-10-29 Thread Dwight Engen
Signed-off-by: Dwight Engen --- src/lxc/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c index 6aa4495..01ed040 100644 --- a/src/lxc/cgroup.c +++ b/src/lxc/cgroup.c @@ -1242,7 +1242,7 @@ char *lxc_cgroup_path_get(const char

[lxc-devel] [PATCH 1/2] fix cgpath test

2013-10-29 Thread Dwight Engen
Commit 1ea59ad28 sets memory.use_hierarchy, which means that this test cannot use memory.swappiness as its dummy cgroup item to set/unset since writing to it with use_hierarchy set gets -EINVAL. Change test to use memory.soft_limit_in_bytes instead. Signed-off-by: Dwight Engen --- src/tests

[lxc-devel] [PATCH] coverity 1097618: check for NULL return from calloc before deref

2013-10-29 Thread Dwight Engen
Signed-off-by: Dwight Engen --- src/lxc/cgroup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c index cf1605a..6aa4495 100644 --- a/src/lxc/cgroup.c +++ b/src/lxc/cgroup.c @@ -1688,6 +1688,8 @@ char *cgroup_to_absolute_path(struct cgroup_mount_point

[lxc-devel] [PATCH] fix free() of args to startl

2013-10-29 Thread Dwight Engen
Coverity 1076328 marked this as "Use after free", which it isn't really, its actually just free()ing the wrong 2nd, 3rd, etc... pointers. Test by passing two or more args to startl, without this change you get segfault when free()ing the second pointer/arg. Signed-off-by: Dwight

[lxc-devel] [PATCH] coverity: ifr_name buffer not NULL terminated

2013-10-29 Thread Dwight Engen
UG message in case it was possibly truncated. Signed-off-by: Dwight Engen --- src/lxc/conf.c | 3 ++- src/lxc/lxc_user_nic.c | 3 ++- src/lxc/network.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index f579c17..50dc426 100644

[lxc-devel] [PATCH] rpm spec: fix version numbering when building alpha, beta, rc

2013-10-25 Thread Dwight Engen
We want to ensure smooth upgrades when doing rpm -U throughout the release cycle so this change implements the scheme documented at: http://fedoraproject.org/wiki/Packaging%3aNamingGuidelines#NonNumericRelease Signed-off-by: Dwight Engen --- configure.ac | 13 - lxc.spec.in | 18

[lxc-devel] [PATCH] rpm spec: fix "warning: bogus date in %changelog"

2013-10-25 Thread Dwight Engen
Mar 24 2009 was actually a Tuesday, maybe Daniel was still recovering from Monday ;) Stranger still that RPM actually checks this!? Signed-off-by: Dwight Engen --- lxc.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lxc.spec.in b/lxc.spec.in index f4bcd8c..0f7f22f

[lxc-devel] [PATCH] oracle template: restrict writeability in /proc and /sys

2013-10-23 Thread Dwight Engen
Note that since we don't drop CAP_SYS_ADMIN, root in the container can remount proc or sys however they want to, however this at least improves the default situation. Signed-off-by: Dwight Engen --- templates/lxc-oracle.in | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff

[lxc-devel] [PATCH] update rpm .spec file

2013-10-22 Thread Dwight Engen
lxc-lua package - change Description to match .deb - remove "Version" in changelog entries to follow http://fedoraproject.org/wiki/Packaging:Guidelines#Changelogs Signed-off-by: Dwight Engen --- lxc.spec.in | 109 +++- 1 file chan

[lxc-devel] [PATCH] install lua module 0644 instead of 0755

2013-10-22 Thread Dwight Engen
Fixes rpmlint error "script-without-shebang". Checked other lua modules and none are installed with execute permission. Signed-off-by: Dwight Engen --- src/lua-lxc/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lua-lxc/Makefile.am b/src/lua-lxc/M

[lxc-devel] [website][PATCH] Add section for Oracle Linux

2013-10-21 Thread Dwight Engen
ntu as that's the > one I know most, other maintainers, please send me a patch for your > distro. Hi Stéphane, thanks for setting this up. Here is a small Oracle Linux section with some pertinent links. -- Signed-off-by: Dwight Engen --- index.html | 13 + 1 file chan

Re: [lxc-devel] [PATCH v2 2/2] support setting lsm label at exec or immediately

2013-10-18 Thread Dwight Engen
On Fri, 18 Oct 2013 11:14:07 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > diff --git a/src/lxc/start.c b/src/lxc/start.c > > index 7538403..2bf417e 100644 > > --- a/src/lxc/start.c > > +++ b/src/lxc/start.c > > @@ -556,14 +5

Re: [lxc-devel] [PATCH v2 2/2] support setting lsm label at exec or immediately

2013-10-18 Thread Dwight Engen
On Fri, 18 Oct 2013 11:18:17 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > - Add attach test cases > > > > - Moved setting of LSM label later to avoid failure of IPC between > > parent and child during attach > > > > Sign

[lxc-devel] [PATCH] use proper config item depending on which lsm is enabled

2013-10-18 Thread Dwight Engen
enabled. Signed-off-by: Dwight Engen --- src/lxc/start.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lxc/start.c b/src/lxc/start.c index 2bf417e..e46f3a0 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -488,6 +488,7 @@ static int must_drop_cap_sys_boot

[lxc-devel] [PATCH v2 1/2] add lsm op for getting name of enabled lsm

2013-10-18 Thread Dwight Engen
Signed-off-by: Dwight Engen --- v2: return "none" when there is no lsm driver src/lxc/lsm/lsm.c | 9 - src/lxc/lsm/lsm.h | 26 ++ 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/lxc/lsm/lsm.c b/src/lxc/lsm/lsm.c index f022de9..0661

Re: [lxc-devel] [PATCH 1/2] add lsm op for getting name of enabled lsm

2013-10-18 Thread Dwight Engen
On Fri, 18 Oct 2013 11:19:20 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > Signed-off-by: Dwight Engen > > --- > > src/lxc/lsm/lsm.c | 9 - > > src/lxc/lsm/lsm.h | 26 ++ > > 2 files change

[lxc-devel] [PATCH 1/2] add lsm op for getting name of enabled lsm

2013-10-17 Thread Dwight Engen
Signed-off-by: Dwight Engen --- src/lxc/lsm/lsm.c | 9 - src/lxc/lsm/lsm.h | 26 ++ 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/lxc/lsm/lsm.c b/src/lxc/lsm/lsm.c index f022de9..508d640 100644 --- a/src/lxc/lsm/lsm.c +++ b/src/lxc/lsm

[lxc-devel] [PATCH v2 2/2] support setting lsm label at exec or immediately

2013-10-17 Thread Dwight Engen
- Add attach test cases - Moved setting of LSM label later to avoid failure of IPC between parent and child during attach Signed-off-by: Dwight Engen --- v2: detect which lsm to test at runtime vs. compile time .gitignore | 1 + src/lxc/attach.c | 20

[lxc-devel] [PATCH] oracle template: fix selinux context on symlinks in /dev

2013-10-17 Thread Dwight Engen
This fixes sshd getting an avc on traversing the /dev/ptmx symlink (was default_t) Signed-off-by: Dwight Engen --- templates/lxc-oracle.in | 4 1 file changed, 4 insertions(+) diff --git a/templates/lxc-oracle.in b/templates/lxc-oracle.in index deed9b3..ddc6d74 100644 --- a/templates/lxc

Re: [lxc-devel] [PATCH 3/3] support setting lsm label at exec or immediately

2013-10-16 Thread Dwight Engen
On Wed, 16 Oct 2013 14:43:00 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > On Wed, 16 Oct 2013 13:17:08 -0500 > > Serge Hallyn wrote: > > > > > Quoting Dwight Engen (dwight.en...@oracle.com): > > > > - Add attach test

Re: [lxc-devel] [PATCH 3/3] support setting lsm label at exec or immediately

2013-10-16 Thread Dwight Engen
On Wed, 16 Oct 2013 13:17:08 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > - Add attach test cases > > > > - Moved setting of LSM label later to avoid failure of IPC between > > parent and child during attach > > ... > &

[lxc-devel] [PATCH 3/3] support setting lsm label at exec or immediately

2013-10-15 Thread Dwight Engen
- Add attach test cases - Moved setting of LSM label later to avoid failure of IPC between parent and child during attach Signed-off-by: Dwight Engen --- .gitignore | 1 + src/lxc/attach.c | 20 ++- src/lxc/attach_options.h | 5 +- src/lxc/lsm

[lxc-devel] [PATCH 2/3] add lsm op for checking if an lsm is present/enabled

2013-10-15 Thread Dwight Engen
Signed-off-by: Dwight Engen --- src/lxc/lsm/apparmor.c | 1 + src/lxc/lsm/lsm.c | 7 +++ src/lxc/lsm/lsm.h | 3 +++ src/lxc/lsm/nop.c | 6 ++ src/lxc/lsm/selinux.c | 1 + 5 files changed, 18 insertions(+) diff --git a/src/lxc/lsm/apparmor.c b/src/lxc/lsm/apparmor.c index

[lxc-devel] [PATCH 1/3] fix busybox template for use with AppArmor

2013-10-15 Thread Dwight Engen
Ensure /proc and /sys are mounted in the container, otherwise apparmor_enabled() will fail to find /sys/module/apparmor/parameters/enabled Signed-off-by: Dwight Engen --- templates/lxc-busybox.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/lxc-busybox.in b

[lxc-devel] [PATCH 0/3] support setting lsm label at exec or immediately

2013-10-15 Thread Dwight Engen
Hi Serge, This patch set implements what you suggested WRT setting /proc/self/attr/current in order to set a profile/context now instead of only at exec(2) time. I don't know how I missed the regular setcon(3) vs setexeccon(3) call, so doing "now" is obviously possible in SELinux as well, thanks f

[lxc-devel] [PATCH] add more detail in automount error message

2013-10-15 Thread Dwight Engen
Signed-off-by: Dwight Engen --- src/lxc/conf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index ecbcf41..457fa26 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -800,10 +800,11 @@ static int lxc_mount_auto_mounts(struct lxc_conf

Re: [lxc-devel] Migration of bug tracker from sourceforge to github

2013-10-10 Thread Dwight Engen
On Wed, 2 Oct 2013 17:31:07 -0400 Stéphane Graber wrote: > Hey everyone, > > Just wanted to let you know that I just finished going through the 80 > or so bug reports we had on sourceforge, closing any that weren't > affecting master anymore, moving a few to github and fixing another > bunch. >

[lxc-devel] [PATCH] fix clone prototype

2013-10-10 Thread Dwight Engen
gcc was complaining with: reboot.c:33: error: conflicting types for ‘clone’ /usr/include/bits/sched.h:83: note: previous declaration of ‘clone’ was here Signed-off-by: Dwight Engen --- src/tests/reboot.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/tests

[lxc-devel] [PATCH] ensure gnutls is initialized before use

2013-10-08 Thread Dwight Engen
Section 7.1.2 of the gnutls info manual states that it must be initialized with a call to gnutls_global_init before use. This fixes the syslog warning I was seeing: lxc-create: Libgcrypt warning: missing initialization - please fix the application Signed-off-by: Dwight Engen

[lxc-devel] [PATCH] fix errors when using docbook2man

2013-10-04 Thread Dwight Engen
docbook2man picks up some errors that docbook2x does not, fixing them isn't harmful to docbook2x. The only real change is adding and tags. Signed-off-by: Dwight Engen --- doc/lxc.conf.sgml.in | 156 +-- 1 file changed, 88 insertions(+

[lxc-devel] [PATCH] always include the ja manpage sources in make dist

2013-10-04 Thread Dwight Engen
These need to be in the dist tarball even if the host packaging system doesn't have docbook2x, otherwise configure will fail to find them. Also, the build system may have docbook2x, even if the packaging system does not. Signed-off-by: Dwight Engen --- doc/Makefile.am | 3 +-- 1 file chang

[lxc-devel] [PATCH] oracle template: add openssh-clients to enable scp in/out of container

2013-10-04 Thread Dwight Engen
Signed-off-by: Dwight Engen --- templates/lxc-oracle.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/lxc-oracle.in b/templates/lxc-oracle.in index c0fcd30..deed9b3 100644 --- a/templates/lxc-oracle.in +++ b/templates/lxc-oracle.in @@ -516,7 +516,7

Re: [lxc-devel] [PATCH] call lxc_container_put when appropriate

2013-10-04 Thread Dwight Engen
On Fri, 4 Oct 2013 08:43:06 -0500 Serge Hallyn wrote: > Quoting S.Çağlar Onur (cag...@10ur.org): > > Signed-off-by: S.Çağlar Onur > > I'm torn on that. It's "correct", so doing so shows users what > they should do. OTOH these are programs, not libraries, and will > immediately be exiting, so

[lxc-devel] [PATCH] fix lxc-info segv on stopped container

2013-10-02 Thread Dwight Engen
Signed-off-by: Dwight Engen --- src/lxc/lxc_info.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/lxc/lxc_info.c b/src/lxc/lxc_info.c index 23cf789..a4fa3e1 100644 --- a/src/lxc/lxc_info.c +++ b/src/lxc/lxc_info.c @@ -124,12 +124,14 @@ int main(int argc

[lxc-devel] [PATCH] lxc-monitor default name to .* to monitor all containers

2013-10-01 Thread Dwight Engen
Signed-off-by: Dwight Engen --- doc/lxc-monitor.sgml.in | 13 - src/lxc/lxc_monitor.c | 3 ++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/lxc-monitor.sgml.in b/doc/lxc-monitor.sgml.in index a0aa7df..abd668a 100644 --- a/doc/lxc-monitor.sgml.in +++ b/doc

[lxc-devel] [PATCH] gitignore doc/ja/legacy/*.1

2013-10-01 Thread Dwight Engen
Signed-off-by: Dwight Engen --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 84c060f..cc43c1a 100644 --- a/.gitignore +++ b/.gitignore @@ -108,6 +108,7 @@ doc/*.7 doc/ja/*.1 doc/ja/*.5 doc/ja/*.7 +doc/ja/legacy/*.1 doc/legacy/*.1 doc

Re: [lxc-devel] [PATCH] refactor string conf items into common function

2013-09-30 Thread Dwight Engen
On Mon, 30 Sep 2013 14:41:41 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > - When doing the selinux change, I noticed that there was a lot of > > duplication of code in handing string configuration items, so I > > refactored this i

Re: [lxc-devel] [PATCH 1/1] add c->may_control

2013-09-30 Thread Dwight Engen
On Mon, 30 Sep 2013 10:29:50 -0400 Stéphane Graber wrote: > On Mon, Sep 30, 2013 at 09:53:56AM -0400, Dwight Engen wrote: > > On Fri, 27 Sep 2013 21:01:07 -0500 > > Serge Hallyn wrote: > > > > > This is an api function which will return false if the container &g

[lxc-devel] [PATCH] refactor string conf items into common function

2013-09-30 Thread Dwight Engen
: Dwight Engen --- src/lxc/confile.c | 178 -- 1 file changed, 52 insertions(+), 126 deletions(-) diff --git a/src/lxc/confile.c b/src/lxc/confile.c index ee2832c..a31479e 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -212,6 +212,41 @@ int

Re: [lxc-devel] [PATCH 1/1] add c->may_control

2013-09-30 Thread Dwight Engen
- it returns true. > > We can use this in several tools early on to prevent the segvs > etc which we currently get. > > Signed-off-by: Serge Hallyn Acked-by: Dwight Engen > --- > src/lxc/commands.c | 30 ++ > src/lxc/commands.h |

Re: [lxc-devel] memory leak

2013-09-27 Thread Dwight Engen
On Thu, 26 Sep 2013 20:58:58 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > Hi guys, > > > > So the line: > > > > r = lxc_grow_array((void ***)&h->all_mount_points, > > &h->all_mount_

[lxc-devel] [PATCH] valgrind: fix small leak in cgroup

2013-09-27 Thread Dwight Engen
Signed-off-by: Dwight Engen --- src/lxc/cgroup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c index e27bc03..077e706 100644 --- a/src/lxc/cgroup.c +++ b/src/lxc/cgroup.c @@ -1563,6 +1563,7 @@ void lxc_cgroup_hierarchy_free(struct cgroup_hierarchy *h

[lxc-devel] memory leak

2013-09-26 Thread Dwight Engen
Hi guys, So the line: r = lxc_grow_array((void ***)&h->all_mount_points, &h->all_mount_point_capacity, k + 1, 4); in cgroup.c shows up in valgrind as a leak. I thought the appropriate fix was: diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c index e27bc03..c5dc7e2 100644

Re: [lxc-devel] [minor] Changing the version naming

2013-09-26 Thread Dwight Engen
On Wed, 25 Sep 2013 17:57:02 -0400 Stéphane Graber wrote: > On Wed, Sep 25, 2013 at 05:48:26PM -0400, S.Çağlar Onur wrote: > > Hey, > > > > It's not that important but I just wanted to learn your thoughts > > about starting to use more predictable version names for releases. > > I was trying to

Re: [lxc-devel] [PATCH v2 rebased against github master 9d0cda4f] refactor AppArmor into LSM backend, add SELinux support

2013-09-26 Thread Dwight Engen
On Wed, 25 Sep 2013 17:25:13 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > Currently, a maximum of one LSM within LXC will be initialized and > > used. If in the future stacked LSMs become a reality, we can > > support it without chang

[lxc-devel] [PATCH] fix segfault on lxc-create with bad template name

2013-09-25 Thread Dwight Engen
- change get_template_path() to only return NULL or non-NULL since one of the callers was doing a free(-1) which caused the segfault. Handle the NULL template case in the lxcapi_create() caller. - make sure to free(tpath) in the sha1sum_file() failure case Signed-off-by: Dwight Engen

Re: [lxc-devel] [PATCH 2/2] fix some larger memory leaks in cgroup code

2013-09-25 Thread Dwight Engen
On Wed, 25 Sep 2013 15:08:37 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > On Wed, 25 Sep 2013 14:44:07 -0400 > > S.Çağlar Onur wrote: > > > > > Uhh something is wrong with this commit > > > > Hey Serge, I think this

Re: [lxc-devel] [PATCH 2/2] fix some larger memory leaks in cgroup code

2013-09-25 Thread Dwight Engen
t; > > On Tue, Sep 24, 2013 at 7:46 PM, Serge Hallyn > wrote: > > > From: Dwight Engen > > > > Don't worry about saved_errno since none of the *_free routines > > will set it > > > > Signed-off-by: Dwight Engen > > Signed-off-by: Serge Ha

[lxc-devel] [PATCH v2 rebased against github master 9d0cda4f] refactor AppArmor into LSM backend, add SELinux support

2013-09-24 Thread Dwight Engen
lsm_process_label_set() will take effect "now" for AppArmor, and upon exec() for SELinux. - fix Oracle template mounting of proc and sysfs, needed when using SELinux Signed-off-by: Dwight Engen --- configure.ac| 14 +++ doc/lxc.conf.sgml.in| 25 ++ src/lxc/Makefile.am

[lxc-devel] [PATCH] refactor AppArmor into LSM backend, add SELinux support

2013-09-24 Thread Dwight Engen
lsm_process_label_set() will take effect "now" for AppArmor, and upon exec() for SELinux. - fix Oracle template mounting of proc and sysfs, needed when using SELinux Signed-off-by: Dwight Engen --- configure.ac| 14 doc/lxc.conf.sgml.in| 25 ++ src/lxc/Makefile.am

Re: [lxc-devel] [PATCH RFC 0/1] refactor AppArmor into LSM backend, add SELinux support

2013-09-21 Thread Dwight Engen
On Sat, 21 Sep 2013 00:32:42 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > This change proposes to add support to LXC for additional LSMs > > (Linux Security Module), namely SELinux. It does so by turning the > > existing > > Tha

Re: [lxc-devel] [PATCH] fix console deadlocks

2013-09-20 Thread Dwight Engen
On Fri, 20 Sep 2013 14:48:40 -0500 Serge Hallyn wrote: > These might be a bit controversial. The process lock was held > for some long periods of time for tweaking consoles. These > can deadlock with some of lock holds I introduced recently. I > would argue that if two threads are fighting ov

Re: [lxc-devel] [PATCH] fix console deadlocks

2013-09-20 Thread Dwight Engen
On Fri, 20 Sep 2013 15:26:47 -0500 Serge Hallyn wrote: > Quoting Dwight Engen (dwight.en...@oracle.com): > > On Fri, 20 Sep 2013 14:48:40 -0500 > > Serge Hallyn wrote: > > > > > These might be a bit controversial. The process lock was held > > > for

[lxc-devel] [PATCH RFC 1/1] refactor AppArmor into LSM backend, add SELinux support

2013-09-19 Thread Dwight Engen
- fix Oracle template mounting of proc and sysfs, needed when using SELinux Signed-off-by: Dwight Engen --- configure.ac| 14 doc/lxc.conf.sgml.in| 29 ++- src/lxc/Makefile.am | 21 - src/lxc/apparmor.c | 219

[lxc-devel] [PATCH RFC 0/1] refactor AppArmor into LSM backend, add SELinux support

2013-09-19 Thread Dwight Engen
This change proposes to add support to LXC for additional LSMs (Linux Security Module), namely SELinux. It does so by turning the existing AppArmor calls into generic lsm_* calls, which are then handled by one of three LSM drivers: AppArmor, SELinux, or a nop driver. Adding a SMACK driver should be

[lxc-devel] [PATCH] fix some larger memory leaks in cgroup code

2013-09-16 Thread Dwight Engen
Don't worry about saved_errno since none of the *_free routines will set it Signed-off-by: Dwight Engen --- src/lxc/cgroup.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c index 101998b..bf7a2a2 100644 --- a/sr

[lxc-devel] [PATCH] cleanup fds, memory in lxc_cgroup_load_meta2()

2013-09-16 Thread Dwight Engen
There are fd leaks in lxc_cgroup_load_meta2() in particular in the success case. This change attempts to ensure resources are free'd/close'd, but it is possible there are still some error cases where leaks occur. Signed-off-by: Dwight Engen --- Hi Christian, These changes fix prob

[lxc-devel] [PATCH] .gitignore generated Japanese manpages

2013-09-16 Thread Dwight Engen
Signed-off-by: Dwight Engen --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 0061609..84c060f 100644 --- a/.gitignore +++ b/.gitignore @@ -105,6 +105,9 @@ config/lt*.m4 doc/*.1 doc/*.5 doc/*.7 +doc/ja/*.1 +doc/ja/*.5 +doc/ja/*.7 doc/legacy

Re: [lxc-devel] [PATCH] make process_lock return void

2013-09-16 Thread Dwight Engen
On Mon, 16 Sep 2013 15:59:45 -0400 Stéphane Graber wrote: > On Mon, Sep 16, 2013 at 02:58:51PM -0500, Serge Hallyn wrote: > > Quoting Serge Hallyn (serge.hal...@ubuntu.com): > > > pthread_mutex_lock() will only return an error if it was set to > > > PTHREAD_MUTEX_ERRORCHECK and we are recursively

[lxc-devel] [PATCH] add arguments with getopt to concurrent tester

2013-09-16 Thread Dwight Engen
- add ability to run for multiple iterations - can also run non-threaded for comparison to threaded case Signed-off-by: Dwight Engen --- Hi Guys, Serge I hope you don't mind I changed this to use getopt since there are a couple of things I'm using it for at the moment (ie. fixing

  1   2   3   4   5   >