~ubuntu-branches/ubuntu/wily/apparmor/wily

« back to all changes in this revision

Viewing changes to utils/logprof.conf.pod

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2011-04-27 10:38:07 UTC
  • mfrom: (5.1.118 natty)
  • Revision ID: james.westby@ubuntu.com-20110427103807-ym3rhwys6o84ith0
Tags: 2.6.1-2
debian/copyright: clarify for some full organization names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# This publication is intellectual property of Novell Inc. and Canonical
 
2
# Ltd. Its contents can be duplicated, either in part or in whole, provided
 
3
# that a copyright label is visibly located on each copy.
 
4
#
 
5
# All information found in this book has been compiled with utmost
 
6
# attention to detail. However, this does not guarantee complete accuracy.
 
7
# Neither SUSE LINUX GmbH, Canonical Ltd, the authors, nor the translators
 
8
# shall be held liable for possible errors or the consequences thereof.
 
9
#
 
10
# Many of the software and hardware descriptions cited in this book
 
11
# are registered trademarks. All trade names are subject to copyright
 
12
# restrictions and may be registered trade marks. SUSE LINUX GmbH
 
13
# and Canonical Ltd. essentially adhere to the manufacturer's spelling.
 
14
#
 
15
# Names of products and trademarks appearing in this book (with or without
 
16
# specific notation) are likewise subject to trademark and trade protection
 
17
# laws and may thus fall under copyright restrictions.
 
18
#
 
19
 
 
20
 
 
21
=pod
 
22
 
 
23
=head1 NAME
 
24
 
 
25
logprof.conf - configuration file for expert options that modify the
 
26
behavior of the AppArmor aa-logprof(1) program.
 
27
 
 
28
=head1 DESCRIPTION
 
29
 
 
30
The aa-logprof(1) program can be configured to have certain default behavior
 
31
by the contents of logprof.conf.
 
32
 
 
33
The B<[qualifiers]> section lists specific programs that should have
 
34
a subset of the full ix/px/ux list when asking what mode to execute
 
35
it using.
 
36
 
 
37
Since creating a separate profile for /bin/bash is dangerous, we can
 
38
specify that for /bin/bash, only (I)nherit, (U)nconstrained, and (D)eny
 
39
should be allowed options and only those will show up in the prompt when
 
40
we're asking about adding that to a profile.
 
41
 
 
42
Likewise, if someone currently exec's /bin/mount in ix or px mode, things
 
43
won't work, so we can provide only (U)nconstrained and (D)eny as options.
 
44
 
 
45
And certain apps like grep, awk, sed, cp, and mkdir should always
 
46
inherit the parent profile rather than having their own profile or
 
47
running unconfined, so for them we can specify that only (I)nherit and
 
48
(D)eny are the allowed options.
 
49
 
 
50
Any programs that are not listed in the qualifiers section get the full
 
51
(I)nherit / (P)rofile / (U)nconstrained / (D)eny option set.
 
52
 
 
53
If the user is doing something tricky and wants different behavior,
 
54
they can tweak or remove the corresponding line in the conf file.
 
55
 
 
56
The B<[defaulthat]> section lists changehat-aware programs and what hat
 
57
aa-logprof(1) will collapse the entries to for that program if the user
 
58
specifies that the access should be allowed, but should not have it's
 
59
own hat.
 
60
 
 
61
The B<[globs]> section allows modification of the logprof rule engine
 
62
with respect to globbing suggestions that the user will be prompted with.
 
63
 
 
64
The format of each line is-- "<perl glob> = <apparmor glob>".
 
65
 
 
66
When aa-logprof(1) asks about a specific path, if the perl glob matches the
 
67
path, it replaces the part of the path that matched with the corresponding
 
68
apparmor glob and adds it to the list of globbing suggestions.
 
69
 
 
70
Lines starting with # are comments and are ignored.
 
71
 
 
72
=head1 EXAMPLE
 
73
 
 
74
  [qualifiers]
 
75
    # things will very likely be painfully broken if bash has it's own profile
 
76
    /bin/bash  = iu
 
77
 
 
78
    # mount doesn't work if it's confined
 
79
    /bin/mount = u
 
80
 
 
81
    # these helper utilities should inherit the parent profile and
 
82
    # shouldn't have their own profiles
 
83
    /bin/awk   = i
 
84
    /bin/grep  = i
 
85
    /bin/sed   = i
 
86
 
 
87
  [defaulthat]
 
88
    /usr/sbin/sshd           = EXEC
 
89
    /usr/sbin/httpd2         = DEFAULT_URI
 
90
    /usr/sbin/httpd2-prefork = DEFAULT_URI
 
91
 
 
92
  [globs]
 
93
    # /foo/bar/lib/libbaz.so -> /foo/bar/lib/lib*
 
94
    /lib/lib[^\/]+so[^\/]*$  = /lib/lib*so*
 
95
 
 
96
    # strip kernel version numbers from kernel module accesses
 
97
    ^/lib/modules/[^\/]+\/   = /lib/modules/*/
 
98
 
 
99
    # strip pid numbers from /proc accesses
 
100
    ^/proc/\d+/              = /proc/*/
 
101
 
 
102
 
 
103
=head1 BUGS
 
104
 
 
105
If you find any bugs, please report them at
 
106
L<http://https://bugs.launchpad.net/apparmor/+filebug>.
 
107
 
 
108
=head1 SEE ALSO
 
109
 
 
110
apparmor(7), apparmor.d(5), aa-enforce(1), aa-complain(1),
 
111
aa-disable(1), aa_change_hat(2), aa-logprof(1), aa-genprof(1), and
 
112
L<http://wiki.apparmor.net>.
 
113
 
 
114
=cut