Otherwise we fail to recognize if we are already unconfined.  Then,
if we want to *start* unconfined, and /proc is readonly, start fails
even though it should be able to proceed.

With this patch, that situation works.

Signed-off-by: Serge Hallyn <serge.hal...@ubuntu.com>
Reported-by: Andre nathan <an...@digirati.com.br>
---
 src/lxc/apparmor.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lxc/apparmor.c b/src/lxc/apparmor.c
index 3941d3f..4dad801 100644
--- a/src/lxc/apparmor.c
+++ b/src/lxc/apparmor.c
@@ -77,6 +77,9 @@ again:
                free(buf);
                return NULL;
        }
+       space = index(buf, '\n');
+       if (space)
+               *space = '\0';
        space = index(buf, ' ');
        if (space)
                *space = '\0';
-- 
1.8.1.2


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to