1
Description: libappamor: Fix mode string NUL-termination of aa_getcon() functions
3
r2125 caused a regression in aa_getpeercon_raw() when a NULL pointer was
4
passed into the mode parameter. Instead of unconditionally
5
NUL-terminating the con string before the mode portion of the security
6
context, it made it to where the NUL byte was only put into place when
9
This resulted in the con string incorrectly containing the label and the
12
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
13
Acked-by: Seth Arnold <seth.arnold@canonical.com>
14
Origin: commit, revision id: tyhicks@canonical.com-20130904215055-vp7qo9sgxhvgzvf4
15
Author: Tyler Hicks <tyhicks@canonical.com>
16
Bug: https://launchpad.net/bugs/1220861
17
Last-Update: 2013-09-04
18
X-Bzr-Revision-Id: tyhicks@canonical.com-20130904215055-vp7qo9sgxhvgzvf4
20
=== modified file 'libraries/libapparmor/src/kernel_interface.c'
21
--- old/libraries/libapparmor/src/kernel_interface.c 2013-08-26 23:54:26 +0000
22
+++ new/libraries/libapparmor/src/kernel_interface.c 2013-09-04 21:50:55 +0000
30
if (!buf || len <= 0) {
35
+ mode_str = parse_confinement_mode(buf, size);
37
- *mode = parse_confinement_mode(buf, size);