Outils pour utilisateurs

Outils du site


systeme:apparmor

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
Dernière révisionLes deux révisions suivantes
systeme:apparmor [2015/08/15 09:28] – [Liens] rootsysteme:apparmor [2015/08/15 10:27] – [apparmor_parser] root
Ligne 8: Ligne 8:
  
 ====== Type de permission ====== ====== Type de permission ======
 +  * [[http://wiki.apparmor.net/index.php/AppArmor_Core_Policy_Reference|Exemple site officiel]]
 +
   * **r** : Read mode   * **r** : Read mode
   * **w** : Write mode (mutually exclusive to a)   * **w** : Write mode (mutually exclusive to a)
   * **a** : Append mode (mutually exclusive to w)   * **a** : Append mode (mutually exclusive to w)
   * **k** : File locking mode   * **k** : File locking mode
-  * **px** : Discrete profile execute mode +  * **x** : Execute 
-  * **Px** : Discrete profile execute mode—clean exec +    * **ux** : Execute unconfined (preserve environment) -- WARNING: should only be used in very special cases 
-  * **ux** : Unconstrained execute mode +    * **Ux** : Execute unconfined (scrub the environment) 
-  * **Ux** : Unconstrained execute mode—clean exec +    * **px** : Execute under a specific profile (preserve the environment) -- WARNING: should only be used in special cases 
-  * **ix** : Inherit execute mode+    * **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   * **m** : Allow PROT_EXEC with mmap(2) calls
   * **l** : Link mode   * **l** : Link mode
Ligne 23: Ligne 36:
   * **deny** : explicitly deny, without logging   * **deny** : explicitly deny, without logging
   * **audit deny** : combination to explicitly deny, but log   * **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
  
 <code> <code>
Ligne 34: Ligne 48:
 </code> </code>
  
 +  * **alias** : crée un mapping
 +<code>
 +alias /home/ -> /mnt/users/
 +</code>
 +
 +  * **owner** : autorise seulement si le propriétaire de la tache est le même que celui du fichier :
 +<code>
 +owner /foo r,
 +</code>
 +
 +<code>
 +owner=fred
 +owner=1001
 +owner=(fred)
 +owner=(fred george)
 +owner=(fred 1001)
 +</code>
 +
 +  * **Child profile (cx)** :
 +<code>
 + /parent/profile {
 +
 +     /path/to/child1 cx -> child1,
 +     /path/to/child2 cx,
 +     /path/to/* cx,           # for * matching child3 will transition to child3,
 +                              # child4, child5, ... will transition to /path/to/child*
 +                              # if matching child profile does not exist will fail
 +     /another/path/to/* cx -> child1,        # send all matching execs to child1
 +
 +     profile child1 {
 +
 +     }
 +
 +     profile /path/to/child2 {
 +
 +     }
 +
 +     profile /path/to/child3 {
 +
 +     }
 +
 +     # generic fall back profile
 +     profile /path/to/child* {
 +
 +     }
 +  }
 +</code>
 ====== Activer apparmor ====== ====== Activer apparmor ======
 <xtermrtf> <xtermrtf>
Ligne 115: Ligne 176:
  
 ===== apparmor_parser ===== ===== apparmor_parser =====
 +  * Voir ce qu'il y a de charger dans le profil apache2 :
 +<xtermrtf>
 +$ apparmor_parser -Q --debug /etc/apparmor.d/usr.sbin.apache2
 +</xtermrtf>
 +
 +<xtermrtf>
 +$ apparmor_parser -p /etc/apparmor.d/usr.sbin.apache2
 +</xtermrtf>
 +
   * Recharger le profile ping :   * Recharger le profile ping :
 <xtermrtf> <xtermrtf>
 $ apparmor_parser -r /etc/apparmor.d/bin.ping $ apparmor_parser -r /etc/apparmor.d/bin.ping
 </xtermrtf> </xtermrtf>
systeme/apparmor.txt · Dernière modification : 2016/10/08 16:34 de root