Commit c3cb8580 by Serge Hallyn

apparmor.c: drop newline when reading current profile

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: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com> Reported-by: 's avatarAndre nathan <andre@digirati.com.br>
parent dd97408a
...@@ -77,6 +77,9 @@ again: ...@@ -77,6 +77,9 @@ again:
free(buf); free(buf);
return NULL; return NULL;
} }
space = index(buf, '\n');
if (space)
*space = '\0';
space = index(buf, ' '); space = index(buf, ' ');
if (space) if (space)
*space = '\0'; *space = '\0';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment