~ubuntu-branches/ubuntu/lucid/apparmor/lucid-proposed

87 by Jamie Strandboge, Jamie Strandboge, Kees Cook
[ Jamie Strandboge ]
1
# $Id$
1.1.1 by Mathias Gug
Import upstream version 2.1+961
2
# ----------------------------------------------------------------------
3
#    Copyright (c) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
4
#    NOVELL (All rights reserved)
5
#
6
#    This program is free software; you can redistribute it and/or
7
#    modify it under the terms of version 2 of the GNU General Public
8
#    License published by the Free Software Foundation.
9
#
10
#    This program is distributed in the hope that it will be useful,
11
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
#    GNU General Public License for more details.
14
#
15
#    You should have received a copy of the GNU General Public License
16
#    along with this program; if not, contact Novell, Inc.
17
# ----------------------------------------------------------------------
18
19
20
=pod
21
22
=head1 NAME
23
24
apparmor_parser - loads AppArmor profiles into the kernel
25
26
=head1 SYNOPSIS
27
28
B<apparmor_parser [-adrR] [--add] [--debug]  [--replace] [--remove]
29
                  [--preprocess] [--Include n] [--base n] [ --Complain ]>
30
31
B<apparmor_parser [-hv] [--help] [--version]>
32
33
=head1 DESCRIPTION
34
35
B<apparmor_parser> is used to import new apparmor.d(5) profiles
36
into the Linux kernel. The profiles restrict the operations available
37
to processes by executable name.
38
39
The profiles are loaded into the Linux kernel by the B<apparmor_parser>
40
program, which takes its input from standard input. The input supplied to
41
B<apparmor_parser> should be in the format described in apparmor.d(5).
42
43
=head1 OPTIONS
44
45
=over 4
46
47
=item -a, --add
48
49
Insert the AppArmor definitions given into the kernel. This is the default
50
action. This gives an error message if a AppArmor definition by the same
51
name already exists in the kernel, or if the parser doesn't understand
52
its input. It reports when an addition succeeded.
53
54
=item -r, --replace
55
56
This flag is required if an AppArmor definition by the same name already
57
exists in the kernel; used to replace the definition already
58
in the kernel with the definition given on standard input.
59
60
=item -R, --remove
61
62
This flag is used to remove an AppArmor definition already in the kernel.
63
Note that it still requires a complete AppArmor definition as described
64
in apparmor.d(5) even though the contents of the definition aren't
65
used.
66
70 by Jamie Strandboge, Kees Cook, Jamie Strandboge
[ Kees Cook ]
67
=item -C, --Complain
68
69
For the profile to load in complain mode.
70
71
=item -B, --binary
72
73
Load a binary (cached) profile, as produced with the -S option.
74
75
=item -N, --names
76
77
Produce a list of policies from a given set of profiles (implies -K).
78
79
=item -S, --stdout
80
1.1.7 by Kees Cook
Import upstream version 2.5~pre+bzr1362
81
Writes a binary (cached) profile to stdout (implies -K and -T).
70 by Jamie Strandboge, Kees Cook, Jamie Strandboge
[ Kees Cook ]
82
83
=item -b n, --base n
84
85
Set the base directory for resolving #include directives
86
defined as relative paths.
1.1.1 by Mathias Gug
Import upstream version 2.1+961
87
88
=item -I n, --Include n
89
90
Add element n to the search path when resolving #include directives
91
defined as an absolute paths.
92
70 by Jamie Strandboge, Kees Cook, Jamie Strandboge
[ Kees Cook ]
93
=item -f n, --subdomainfs n
94
95
Set the location of the apparmor security filesystem (default is
96
"/sys/kernel/security/apparmor").
97
98
=item -m n, --match-string n
99
100
Only use match features "n".
101
102
=item -n n, --namespace-string n
103
104
Force a profile to load in the namespace "n".
105
106
=item -X, --readimpliesX
107
108
In the case of profiles that are loading on systems were READ_IMPLIES_EXEC
109
is set in the kernel for a given process, load the profile so that any "r"
110
flags are processed as "mr".
111
112
=item -k, --show-cache
113
114
Report the cache processing (hit/miss details) when loading or saving
115
cached profiles.
116
117
=item -K, --skip-cache
118
119
Perform no caching at all: disables -W, implies -T.
120
121
=item -T, --skip-read-cache
122
123
By default, if a profile's cache is found in /etc/apparmor.d/cache/ and
124
the timestamp is newer than the profile, it will be loaded from the cache.
125
This option disables this cache loading behavior.
126
127
=item -W, --write-cache
128
129
Write out cached profiles to /etc/apparmor.d/cache/.  Off by default.
130
In cases where abstractions have been changed, and the parser is running
131
with "--replace", it may make sense to also use "--skip-read-cache" with
132
the "--write-cache" option.
133
1.1.7 by Kees Cook
Import upstream version 2.5~pre+bzr1362
134
=item -Q, --skip-kernel-load
135
136
Perform all actions except the actual loading of a profile into the kernel.
137
This is useful for testing profile generation, caching, etc, without making
138
changes to the running kernel profiles.
139
70 by Jamie Strandboge, Kees Cook, Jamie Strandboge
[ Kees Cook ]
140
=item -q, --quiet
141
79 by Kees Cook
* Do not run AppArmor on the LiveCD, again (LP: #131976).
142
Do not report on the profiles as they are loaded, and not show warnings.
143
144
=item -v, --verbose
145
146
Report on the profiles as they are loaded, and show warnings.
147
148
=item -V, --version
1.1.1 by Mathias Gug
Import upstream version 2.1+961
149
150
Print the version number and exit.
151
1.1.11 by Jamie Strandboge
Import upstream version 2.5.1~pre1393
152
=item -p, --preprocess
153
154
Dump the input profile to stdout out applying preprocessing flattening
155
includes into the output profile.
156
1.1.1 by Mathias Gug
Import upstream version 2.1+961
157
=item -d, --debug
158
159
Given once, only checks the profiles to ensure syntactic correctness.
160
Given twice, dumps its interpretation of the profile for checking.
161
70 by Jamie Strandboge, Kees Cook, Jamie Strandboge
[ Kees Cook ]
162
=item -h, --help
163
164
Give a quick reference guide.
165
1.1.1 by Mathias Gug
Import upstream version 2.1+961
166
=back
167
168
=head1 BUGS
169
170
None known. If you find any, please report them to bugzilla at
171
L<http://bugzilla.novell.com>.
172
173
=head1 SEE ALSO
174
175
apparmor(7), apparmor.d(5), subdomain.conf(5), change_hat(2), and
176
L<http://forge.novell.com/modules/xfmod/project/?apparmor>.
177
178
=cut