diff --git a/parser/apparmor.d.pod b/parser/apparmor.d.pod index 853cd5cea..ff7887d83 100644 --- a/parser/apparmor.d.pod +++ b/parser/apparmor.d.pod @@ -3,7 +3,7 @@ # 2008, 2009 # NOVELL (All rights reserved) # -# Copyright (c) 2010 - 2013 +# Copyright (c) 2010 - 2014 # Canonical Ltd. (All rights reserved) # # This program is free software; you can redistribute it and/or @@ -54,7 +54,7 @@ B = '#' I B = any characters -B = [ I ... ] [ I ... ] ( '"' I '"' | I ) [ 'flags=(complain)' ]'{' [ ( I | I | I | I | 'capability ' I | I | I | I | I | 'change_profile -> ' I ) ... ] '}' +B = [ I ... ] [ I ... ] ( '"' I '"' | I ) [ 'flags=(complain)' ]'{' [ ( I | I | I | I | 'capability ' I | I | I | I | I | I | 'change_profile -> ' I ) ... ] '}' B = [ I ... ] ( I | 'profile ' I ) '{' [ ( I | I | I ) ... ] '}' @@ -75,7 +75,7 @@ B = '^' (non-whitespace characters; see aa_change_hat(2) for a desc B = I name -B = ( I | I | I | I ) +B = ( I | I | I ) B = [ 'audit' ] [ 'deny' ] 'mount' [ I ] [ I ] [ -> [ I ] @@ -83,8 +83,6 @@ B = [ 'audit' ] [ 'deny' ] 'remount' [ I ] I = [ 'audit' ] [ 'deny' ] 'umount' [ I ] I -B = [ 'audit' ] [ 'deny' ] pivot_root [ I ] [ I ] [ -> I ] - B = [ ( 'fstype' | 'vfstype' ) ( '=' | 'in' ) I ] [ 'options' ( '=' | 'in' ) I ] B = ( I | I ) @@ -99,6 +97,8 @@ B = ( 'ro' | 'rw' | 'nosuid' | 'suid' | 'nodev' | 'dev' | 'noexec' B = ( I | I ) ... +B = [ 'audit' ] [ 'deny' ] pivot_root [ oldroot=I ] [ I ] [ -> I ] + B = ( I | I | I | I ) B = [ 'audit' ] [ 'deny' ] 'dbus' [ I ] [ I ] [ I ] [ I ] [ I ] [ I ] @@ -384,12 +384,12 @@ eg. AppArmor supports mount mediation and allows specifying filesystem types and mount flags. The syntax of mount rules in AppArmor is based on the mount(8) -command syntax. Mount rules must contain one of the mount, remount, umount or -pivot_root keywords, but all mount conditions are optional. Unspecified -optional conditionals are assumed to match all entries (eg, not specifying -fstype means all fstypes are matched). Due to the complexity of the mount -command and how options may be specified, AppArmor allows specifying -conditionals three different ways: +command syntax. Mount rules must contain one of the mount, remount or umount +keywords, but all mount conditions are optional. Unspecified optional +conditionals are assumed to match all entries (eg, not specifying fstype means +all fstypes are matched). Due to the complexity of the mount command and how +options may be specified, AppArmor allows specifying conditionals three +different ways: =over 4 @@ -655,6 +655,39 @@ $ mount -o nodev,user /dev/foo /mnt =back +=head2 Pivot Root Rules + +AppArmor mediates changing of the root filesystem through the pivot_root(2) +system call. The syntax of 'pivot_root' rules in AppArmor is based on the +pivot_root(2) system call parameters with the notable exception that the +ordering is reversed. The path corresponding to the put_old parameter of +pivot_root(2) is optionally specified in the 'pivot_root' rule using the +'oldroot=' prefix. + +AppArmor 'pivot_root' rules can specify a profile transition to occur during +the pivot_root(2) system call. Note that AppArmor will only transition the +process calling pivot_root(2) to the new profile. + +Here are some example 'pivot_root' rules: + + # Allow any pivot + pivot_root, + + # Allow pivoting to any new root directory and putting the old root + # directory at /mnt/root/old/ + pivot_root oldroot=/mnt/root/old/, + + # Allow pivoting the root directory to /mnt/root/ + pivot_root /mnt/root/, + + # Allow pivoting to /mnt/root/ and putting the old root directory at + # /mnt/root/old/ + pivot_root oldroot=/mnt/root/old/ /mnt/root/, + + # Allow pivoting to /mnt/root/, putting the old root directory at + # /mnt/root/old/ and transition to the /mnt/root/sbin/init profile + pivot_root oldroot=/mnt/root/old/ /mnt/root/ -> /mnt/root/sbin/init, + =head2 DBus rules AppArmor supports DBus mediation. The mediation is performed in conjunction