~ubuntu-branches/ubuntu/precise/apparmor/precise-security

« back to all changes in this revision

Viewing changes to utils/Immunix/AppArmor.pm

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2014-08-11 10:16:11 UTC
  • mfrom: (29.1.4 precise-proposed)
  • Revision ID: package-import@ubuntu.com-20140811101611-guv2zyeaxawvw3oh
Tags: 2.7.102-0ubuntu3.10
No change rebuild in the security pocket to ensure compatibility
with the linux-lts-trusty kernel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4804
4804
    $str .= "a" if ($mode & $AA_MAY_APPEND);
4805
4805
    $str .= "l" if ($mode & $AA_MAY_LINK);
4806
4806
    $str .= "k" if ($mode & $AA_MAY_LOCK);
4807
 
    if ($mode & $AA_EXEC_UNCONFINED) {
4808
 
        if ($mode & $AA_EXEC_UNSAFE) {
4809
 
            $str .= "u";
4810
 
        } else {
4811
 
            $str .= "U";
4812
 
        }
4813
 
    }
 
4807
 
 
4808
    # modes P and C *must* come before I and U; otherwise syntactically
 
4809
    # invalid profiles result
4814
4810
    if ($mode & ($AA_EXEC_PROFILE | $AA_EXEC_NT)) {
4815
4811
        if ($mode & $AA_EXEC_UNSAFE) {
4816
4812
            $str .= "p";
4825
4821
            $str .= "C";
4826
4822
        }
4827
4823
    }
 
4824
 
 
4825
    # modes P and C *must* come before I and U; otherwise syntactically
 
4826
    # invalid profiles result
 
4827
    if ($mode & $AA_EXEC_UNCONFINED) {
 
4828
        if ($mode & $AA_EXEC_UNSAFE) {
 
4829
            $str .= "u";
 
4830
        } else {
 
4831
            $str .= "U";
 
4832
        }
 
4833
    }
4828
4834
    $str .= "i" if ($mode & $AA_EXEC_INHERIT);
 
4835
 
4829
4836
    $str .= "x" if ($mode & $AA_MAY_EXEC);
4830
4837
 
4831
4838
    return $str;