systeme:apparmor
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| systeme:apparmor [2015/08/10 18:14] – [aa-logprof] root | systeme:apparmor [2016/10/08 16:34] (Version actuelle) – [Liens] root | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| ====== Apparmor ====== | ====== Apparmor ====== | ||
| - | Voir : https:// | + | ===== Liens ===== |
| + | * [[http:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| ===== Description ===== | ===== Description ===== | ||
| AppArmor permet à l' | AppArmor permet à l' | ||
| - | ===== Activer apparmor ===== | + | |
| + | ====== Type de permission ====== | ||
| + | * [[http:// | ||
| + | |||
| + | * **r** : Read mode | ||
| + | * **w** : Write mode (mutually exclusive to a) | ||
| + | * **a** : Append mode (mutually exclusive to w) | ||
| + | * **k** : File locking mode | ||
| + | * **x** : Execute | ||
| + | * **ux** : Execute unconfined (preserve environment) -- WARNING: should only be used in very special cases | ||
| + | * **Ux** : Execute unconfined (scrub the environment) | ||
| + | * **px** : Execute under a specific profile (preserve the environment) -- WARNING: should only be used in special cases | ||
| + | * **Px** : Execute under a specific profile (scrub the environment) | ||
| + | * **pix** : as px but fallback to inheriting the current profile if the target profile is not found | ||
| + | * **Pix** : as Px but fallback to inheriting the current profile if the target profile is not found | ||
| + | * **pux** : as px but fallback to executing unconfined if the target profile is not found | ||
| + | * **Pux** : as Px but fallback to executing unconfined if the target profile is not found | ||
| + | * **ix** : Execute and inherit the current profile | ||
| + | * **cx** : Execute and transition to a child profile (preserve the environment) | ||
| + | * **Cx** : Execute and transition to a child profile (scrub the environment) | ||
| + | * **cix** : as cx but fallback to inheriting the current profile if the target profile is not found | ||
| + | * **Cix** : as Cx but fallback to inheriting the current profile if the target profile is not found | ||
| + | * **cux** : as cx but fallback to executing unconfined if the target profile is not found | ||
| + | * **Cux** : as Cx but fallback to executing unconfined if the target profile is not found | ||
| + | * **m** : Allow PROT_EXEC with mmap(2) calls | ||
| + | * **l** : Link mode | ||
| + | |||
| + | * **audit** : force logging | ||
| + | * **deny** : explicitly deny, without logging | ||
| + | * **audit deny** : combination to explicitly deny, but log | ||
| + | * **quiet** : clears audit qualifier off of rules. Does it take precedence over audit like deny over allow | ||
| + | |||
| + | < | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | deny / | ||
| + | audit / | ||
| + | audit deny / | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | * **alias** : crée un mapping | ||
| + | < | ||
| + | alias /home/ -> / | ||
| + | </ | ||
| + | |||
| + | * **owner** : autorise seulement si le propriétaire de la tache est le même que celui du fichier : | ||
| + | < | ||
| + | owner /foo r, | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | owner=fred | ||
| + | owner=1001 | ||
| + | owner=(fred) | ||
| + | owner=(fred george) | ||
| + | owner=(fred 1001) | ||
| + | </ | ||
| + | |||
| + | * **Child profile (cx)** : | ||
| + | < | ||
| + | / | ||
| + | |||
| + | / | ||
| + | / | ||
| + | / | ||
| + | # child4, child5, ... will transition to / | ||
| + | # if matching child profile does not exist will fail | ||
| + | / | ||
| + | |||
| + | | ||
| + | |||
| + | } | ||
| + | |||
| + | | ||
| + | |||
| + | } | ||
| + | |||
| + | | ||
| + | |||
| + | } | ||
| + | |||
| + | # generic fall back profile | ||
| + | | ||
| + | |||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | ====== Activer apparmor | ||
| < | < | ||
| $ chkconfig boot.apparmor on | $ chkconfig boot.apparmor on | ||
| Ligne 81: | Ligne 173: | ||
| $ grep firefox / | $ grep firefox / | ||
| $ aa-logprof -f gigix | $ aa-logprof -f gigix | ||
| + | </ | ||
| + | |||
| + | ===== apparmor_parser ===== | ||
| + | * Voir ce qu'il y a de charger dans le profil apache2 : | ||
| + | < | ||
| + | $ apparmor_parser -Q --debug / | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | $ apparmor_parser -p / | ||
| + | </ | ||
| + | |||
| + | * Recharger le profile ping : | ||
| + | < | ||
| + | $ apparmor_parser -r / | ||
| </ | </ | ||
systeme/apparmor.1439230475.txt.gz · Dernière modification : de root
