~ubuntu-branches/ubuntu/saucy/apparmor/saucy-proposed

« back to all changes in this revision

Viewing changes to debian/patches/0065-lp1220861.patch

  • Committer: Package Import Robot
  • Author(s): Jamie Strandboge, Tyler Hicks, Jamie Strandboge
  • Date: 2013-09-10 12:06:06 UTC
  • Revision ID: package-import@ubuntu.com-20130910120606-cli33sg3o4tgayou
Tags: 2.8.0-0ubuntu28
[ Tyler Hicks ]
* Move the aa-exec man page out of apparmor-utils into apparmor, since
  aa-exec is now in apparmor
  - debian/control: adjust Breaks/Replaces to use apparmor-utils
    (<< 2.8.0-0ubuntu28)
  - debian/apparmor.manpages: install the aa-exec man page
  - debian/apparmor-utils.manpages: don't install the aa-exec man page
* debian/patches/0065-lp1220861.patch: Always NUL-terminate confinement
  context strings returned from libapparmor (LP: #1220861)
* debian/patches/0066-lp1196880.patch: Don't assign mode pointer in
  aa_getprocattr() if caller passed in NULL (LP: #1196880)
* debian/patches/0067-libapparmor-mode-strings-are-not-to-be-freed.patch:
  Update man page and code comments to make it clear that freeing the *con
  string returned from libapparmor's getcon functions also frees the *mode
  string
* debian/patches/0068-libapparmor-mention-dbus-method-in-getcon-man.patch:
  Document the D-Bus method, in the aa_getcon man page, that returns the
  AppArmor task confinement string of a D-Bus connection

[ Jamie Strandboge ]
* debian/patches/0069-p11kit-abstraction.patch: p11-kit needs access to
  /usr/share/p11-kit/modules

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: libappamor: Fix mode string NUL-termination of aa_getcon() functions
 
2
 .
 
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
 
7
 mode was non-NULL.
 
8
 .
 
9
 This resulted in the con string incorrectly containing the label and the
 
10
 mode.
 
11
 .
 
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
 
19
 
 
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
 
23
@@ -194,6 +194,7 @@
 
24
        int rc = -1;
 
25
        int fd, ret;
 
26
        char *tmp = NULL;
 
27
+       char *mode_str;
 
28
        int size = 0;
 
29
 
 
30
        if (!buf || len <= 0) {
 
31
@@ -246,8 +247,9 @@
 
32
                        size++;
 
33
                }
 
34
 
 
35
+               mode_str = parse_confinement_mode(buf, size);
 
36
                if (mode)
 
37
-                       *mode = parse_confinement_mode(buf, size);
 
38
+                       *mode = mode_str;
 
39
        }
 
40
        rc = size;
 
41
 
 
42