aa-logprof -d
/path/to/profile/directory/
Specifies the full path to the location of the profiles if the profiles are not located
in the standard directory,
/etc/apparmor.d/
.
aa-logprof -f
/path/to/logfile/
Specifies the full path to the location of the log file if the log file is not located in
the default directory,
/var/log/audit/audit.log
or
/var/log/
messages
(if auditd is not running).
aa-logprof -m "string marker in logfile"
Marks the starting point for aa-logprof to look in the system log. aa-logprof ignores
all events in the system log before the specified mark. If the mark contains spaces,
it must be surrounded by quotes to work correctly. For example:
aa-logprof -m"17:04:21"
or
logprof -m e2ff78636296f16d0b5301209a04430d
aa-logprof scans the log, asking you how to handle each logged event. Each question
presents a numbered list of AppArmor rules that can be added by pressing the number
of the item on the list.
By default, aa-logprof looks for profiles in
/etc/apparmor.d/
and scans the log
in
/var/log/messages
. In many cases, running
aa-logprof
as
root
is enough
to create the profile.
However, there might be times when you need to search archived log files, such as if
the program exercise period exceeds the log rotation window (when the log file is
archived and a new log file is started). If this is the case, you can enter
zcat -f `ls
-1tr /var/log/messages*` | aa-logprof -f -
.
aa-logprof Example 1
The following is an example of how aa-logprof addresses httpd2-prefork accessing the
file
/etc/group
.
[]
indicates the default option.
In this example, the access to
/etc/group
is part of httpd2-prefork accessing name
services. The appropriate response is
1
, which includes a predefined set of AppArmor
rules. Selecting
1
to
#include
the name service package resolves all of the future
Building Profiles from the Command Line
307
Summary of Contents for LINUX ENTERPRISE DESKTOP 11
Page 1: ...SUSE Linux Enterprise Server www novell com 11 March 17 2009 Security Guide...
Page 9: ...32 7 Managing Audit Event Records Using Keys 433 33 Useful Resources 435...
Page 10: ......
Page 29: ...Part I Authentication...
Page 30: ......
Page 55: ...Figure 4 2 YaST LDAP Server Configuration LDAP A Directory Service 41...
Page 126: ......
Page 127: ...Part II Local Security...
Page 128: ......
Page 158: ......
Page 173: ...Part III Network Security...
Page 174: ......
Page 194: ......
Page 197: ...Figure 16 2 Scenario 2 Figure 16 3 Scenario 3 Configuring VPN Server 183...
Page 210: ......
Page 228: ......
Page 229: ...Part IV Confining Privileges with Novell AppArmor...
Page 230: ......
Page 274: ......
Page 300: ......
Page 328: ......
Page 340: ......
Page 342: ......
Page 386: ......
Page 387: ...Part V The Linux Audit Framework...
Page 388: ......