Apparmor Profile: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(Die Seite wurde neu angelegt: „=Kurzanleitung zur AppArmor-Profilsprache= *Die AppArmor-Richtlinien werden mit einer speziellen "Profilsprache" erstellt. *Diese Sprache wird dann zum Laden i…“) |
|||
| Zeile 26: | Zeile 26: | ||
} | } | ||
| + | </pre> | ||
| + | |||
| + | ==Comments== | ||
| + | *Kommentare sind zeilenorientiert und beginnen mit einem #. | ||
| + | ; Ausnahmem sind #include-Regel | ||
| + | <pre> | ||
| + | # Comment 1 | ||
| + | # Comment 2 | ||
| + | |||
| + | profile example { # comment 3 | ||
| + | # comment 4 | ||
| + | /home/foo rw, # comment at the end of a file rule | ||
| + | } | ||
</pre> | </pre> | ||
Version vom 9. November 2022, 12:00 Uhr
Kurzanleitung zur AppArmor-Profilsprache
- Die AppArmor-Richtlinien werden mit einer speziellen "Profilsprache" erstellt.
- Diese Sprache wird dann zum Laden in den Kernel in Binärecode kompiliert.
- Die AppArmor-Richtlinien werden in einer Reihe von Dateien im Verzeichniss /etc/apparmor.d/ gespeichert.
- Die AppArmor-Richtlinie sind in Profile aufgeteilt, die in der Regel so konzipiert sind, dass sie eine bestimmte Anwendung einschränken.
- In den Profilen werden Zugriffsregeln deklarieren, um den Zugriff auf Ressourcen zu einzuschränken.
Profiles
- Profile beginnen mit dem Namen des Profils gefolgt von einem optionalen Flaggenfeld, dann ein öffnendes {, gefolgt von den Regeln für das Profil und wird durch ein abschließendes } abgeschlossen.
/usr/bin/firefox {
# profile contents
}
/usr/bin/firefox flags=(complain) {
# profile contents
}
profile /usr/bin/ {
# profile contents
}
profile user1 {
# profile contents
}
Comments
- Kommentare sind zeilenorientiert und beginnen mit einem #.
- Ausnahmem sind #include-Regel
# Comment 1
# Comment 2
profile example { # comment 3
# comment 4
/home/foo rw, # comment at the end of a file rule
}