~ubuntu-branches/ubuntu/precise/apparmor/precise-security

« back to all changes in this revision

Viewing changes to debian/patches/0007-ubuntu-manpage-updates.patch

  • Committer: Package Import Robot
  • Author(s): Steve Beattie, Jamie Strandboge, Serge Hallyn, Steve Beattie
  • Date: 2012-04-12 06:17:42 UTC
  • Revision ID: package-import@ubuntu.com-20120412061742-9v75hjko2mjtbewv
Tags: 2.7.102-0ubuntu3
[ Jamie Strandboge ]
* debian/patches/0007-ubuntu-manpage-updates.patch: update apparmor(5)
  to describe Ubuntu's two-stage policy load and how to add utilize it
  when developing policy (LP: #974089)

[ Serge Hallyn ]
* debian/apparmor.init: do nothing in a container.  This can be
  removed once stacked profiles are supported and used by lxc.
  (LP: #978297)

[ Steve Beattie ]
* debian/patches/0008-apparmor-lp963756.patch: Fix permission mapping
  for change_profile onexec (LP: #963756)
* debian/patches/0009-apparmor-lp959560-part1.patch,
  debian/patches/0010-apparmor-lp959560-part2.patch: Update the parser
  to support the 'in' keyword for value lists, and make mount
  operations aware of 'in' keyword so they can affect the flags build
  list (LP: #959560)
* debian/patches/0011-apparmor-lp872446.patch: fix logprof missing
  exec events in complain mode (LP: #872446)
* debian/patches/0012-apparmor-lp978584.patch: allow inet6 access in
  dovecot imap-login profile (LP: #978584)
* debian/patches/0013-apparmor-lp800826.patch: fix libapparmor
  log parsing library from dropping apparmor network events that
  contain ip addresses or ports in them (LP: #800826)
* debian/patches/0014-apparmor-lp979095.patch: document new mount rule
  syntax and usage in apparmor.d(5) manpage (LP: #979095)
* debian/patches/0015-apparmor-lp963756.patch: Fix change_onexec
  for profiles without attachment specification (LP: #963756,
  LP: #978038)
* debian/patches/0016-apparmor-lp968956.patch: Fix protocol error when
  loading policy to kernels without compat patches (LP: #968956)
* debian/patches/0017-apparmor-lp979135.patch: Fix change_profile to
  grant access to /proc/attr api (LP: #979135)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Author: Jamie Strandboge <jamie@canonical.com>
 
2
Description: Adjust apparmor(5) to describe policy load on Ubuntu
 
3
Bug-Ubuntu: https://launchpad.net/bugs/974089
 
4
Forward: no (Ubuntu specific)
 
5
 
 
6
Index: apparmor-ubuntu-trunk/parser/apparmor.pod
 
7
===================================================================
 
8
--- apparmor-ubuntu-trunk.orig/parser/apparmor.pod      2010-12-20 14:29:10.000000000 -0600
 
9
+++ apparmor-ubuntu-trunk/parser/apparmor.pod   2012-04-05 10:19:29.000000000 -0500
 
10
@@ -3,7 +3,7 @@
 
11
 #                  2008, 2009
 
12
 #    NOVELL (All rights reserved)
 
13
 #
 
14
-#    Copyright (c) 2010
 
15
+#    Copyright (c) 2010, 2011, 2012
 
16
 #    Canonical Ltd. (All rights reserved)
 
17
 #
 
18
 #    This program is free software; you can redistribute it and/or
 
19
@@ -16,7 +16,7 @@
 
20
 #    GNU General Public License for more details.
 
21
 #
 
22
 #    You should have received a copy of the GNU General Public License
 
23
-#    along with this program; if not, contact Novell, Inc.
 
24
+#    along with this program; if not, contact Canonical Ltd.
 
25
 # ----------------------------------------------------------------------
 
26
 
 
27
 
 
28
@@ -34,7 +34,8 @@
 
29
 
 
30
 AppArmor confinement is provided via I<profiles> loaded into the kernel
 
31
 via apparmor_parser(8), typically through the F</etc/init.d/apparmor>
 
32
-SysV initscript, which is used like this:
 
33
+SysV initscript (on Ubuntu, also see UBUNTU POLICY LOAD, below), which is used
 
34
+like this:
 
35
 
 
36
        # /etc/init.d/apparmor start
 
37
        # /etc/init.d/apparmor stop
 
38
@@ -94,6 +95,41 @@
 
39
 
 
40
 A confined process can not call mknod(2) to create character or block devices.
 
41
 
 
42
+=head1 UBUNTU POLICY LOAD
 
43
+
 
44
+Ubuntu systems use Upstart instead of a traditional SysV init system. Because
 
45
+Upstart is an event-driven init system and understanding that policy must be
 
46
+loaded before execution, Ubuntu loads policy in two stages: first via upstart
 
47
+jobs for binaries that are started in early boot, and then via a SysV
 
48
+initscript that starts in S37 for all remaining policy. When developing
 
49
+policy it is important to know how your application is started and if policy
 
50
+load should be handled specially.
 
51
+
 
52
+In general, nothing extra has to be done for applications without an initscript
 
53
+or with an initscript that starts after AppArmor's second stage initscript.
 
54
+
 
55
+If the confined application has an Upstart job, adjust the job to call
 
56
+F</lib/init/apparmor-profile-load> with the filename of the policy file
 
57
+(relative to F</etc/apparmor.d/>). For example:
 
58
+
 
59
+       pre-start script
 
60
+               /lib/init/apparmor-profile-load usr.bin.foo
 
61
+       end script
 
62
+
 
63
+If the confined application does not have an Upstart job but it starts before
 
64
+AppArmor's second stage initscript, then add a symlink from the policy file in
 
65
+F</etc/apparmor.d> to F</etc/apparmor/init/network-interface-security/>. For
 
66
+example:
 
67
+
 
68
+       # cd /etc/apparmor/init/network-interface-security/
 
69
+       # ln -s /etc/apparmor.d/usr.bin.foo .
 
70
+
 
71
+The network-interface-security Upstart job will load all the symlinked policy
 
72
+files in F</etc/apparmor/init/network-interface-security/> before any network
 
73
+interfaces come up. Because network interfaces come up very early in the boot
 
74
+process, this will help ensure that AppArmor policy is loaded before the
 
75
+confined application starts.
 
76
+
 
77
 =head1 ERRORS
 
78
 
 
79
 When a confined process tries to access a file it does not have permission
 
80
@@ -140,6 +176,8 @@
 
81
 
 
82
 =item F</etc/init.d/apparmor>
 
83
 
 
84
+=item F</etc/apparmor/init/network-interface-security/>
 
85
+
 
86
 =item F</etc/apparmor.d/>
 
87
 
 
88
 =item F</var/lib/apparmor/>