mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Profiling by hand: fix typo noticed by Lazghab Abdessamii
Signed-off-by: Steve Beattie <steve.beattie@canonical.com> Bug: https://gitlab.com/apparmor/apparmor/-/issues/151
parent
5b1633e0ea
commit
150c6389d6
1 changed files with 5 additions and 5 deletions
|
@ -23,7 +23,7 @@ Basic process
|
|||
-------------
|
||||
|
||||
1. If not using auditd, temporarily disable kernel rate limiting on logs:
|
||||
|
||||
|
||||
'''
|
||||
# sysctl -w kernel.printk_ratelimit=0
|
||||
'''
|
||||
|
@ -51,7 +51,7 @@ In this example we will confine the chat program Empathy.
|
|||
### Create a preliminary profile
|
||||
|
||||
First create a preliminary profile, including the global preamble
|
||||
(to pull in variables for HOME and use system aliases. Eg
|
||||
(to pull in variables for HOME and use system aliases. For example:
|
||||
/etc/apparmor.d/usr.bin.empathy:
|
||||
|
||||
```
|
||||
|
@ -88,7 +88,7 @@ include them.
|
|||
Run application in complain mode. Eg:
|
||||
|
||||
```
|
||||
$ sudo aa-comlain /etc/apparmor.d/usr.bin.empathy
|
||||
$ sudo aa-complain /etc/apparmor.d/usr.bin.empathy
|
||||
```
|
||||
|
||||
### Test the application
|
||||
|
@ -119,7 +119,7 @@ denial. Eg, a typical log entry might be:
|
|||
[ 7960.018062] type=1502 audit(1292885132.576:11110): operation="rename_dest" pid=5279 parent=1 profile="/usr/bin/empathy" requested_mask="wc::" denied_mask="wc::" fsuid=1000 ouid=1000 name="/home/jamie/.config/Empathy/geometry.ini"
|
||||
```
|
||||
|
||||
Examining that, we can use sed and sort to help out a bit:
|
||||
Examining that, we can use `sed` and `sort` to help out a bit:
|
||||
|
||||
```
|
||||
$ dmesg | grep 'profile="/usr/bin/empathy"' | sed 's/.* profile="[^ ]*" //' | sort -u
|
||||
|
@ -207,7 +207,7 @@ profile to fine-tune it for the access you require.
|
|||
|
||||
### Put in enforce mode
|
||||
|
||||
Put the application in enforce mode with aa-enforce. Eg:
|
||||
Put the application in enforce mode with aa-enforce. For example:
|
||||
|
||||
```
|
||||
$ sudo aa-enforce /etc/apparmor.d/usr.bin.empathy
|
||||
|
|
Loading…
Add table
Reference in a new issue