1. 24 Feb, 2015 1 commit
  2. 23 Feb, 2015 3 commits
  3. 20 Feb, 2015 2 commits
  4. 19 Feb, 2015 3 commits
    • Stephen Smalley's avatar
      libselinux: Only use /data/security policy if all files are present. · 1e9d2765
      Stephen Smalley authored
      Otherwise if we have a matching selinux_version but only a subset of
      the expected policy files (sepolicy, *_contexts) under /data/security,
      then we'll fail when attempting to open the missing files.
      
      This does not check that mac_permissions.xml is present as that is only
      opened and used by SELinuxMMAC, not by libselinux, but we should likely
      change SELinuxMMAC to do the same.
      
      The alternative would be to change the logic for opening each policy
      file to fall back to the / policy if the /data/security policy is missing,
      as we used to do before the /data/security support was first disabled and
      then reworked to check selinux_version.  Then it would be valid once again
      to merely push a sepolicy file or any other individual file with a
      selinux_version file to /data/security/current without needing to copy
      the rest of the files if they were unchanged.  That is how we used to
      support pushing a policy with dontaudit rules stripped,
      http://seandroid.bitbucket.org/AddressingHiddenDenials.html
      
      
      
      I have updated those instructions to specify that all files must be
      copied but it is a bit more cumbersome to do so.
      
      Change-Id: I60f7ac1f6fa714c0b827a1edd008da172ef1c991
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      1e9d2765
    • Stephen Smalley's avatar
      libselinux: drop sebool= support · 3fb0096a
      Stephen Smalley authored
      
      SELinux policy booleans are prohibited in AOSP, so we can drop the
      support for the sebool= input selector.
      
      Change-Id: I4828cdf1e5370b1dee7d1e887fd7a3d54be2d95d
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      3fb0096a
    • Stephen Smalley's avatar
      libselinux: fix policy reload logic · 818815ed
      Stephen Smalley authored
      
      I5d6d6eb7438361bbb072540c96361cef95c83a9e introduced a bug
      in the policy reload logic such that we incorrectly (but harmlessly)
      load policy twice from / on each boot and never load policy from
      /data/security/current even if it is present.
      
      Also, even prior to that change, we were failing to reload policy
      from / if we previously had loaded a policy from /data/security/current
      and that policy was removed.
      
      Fix the bugs.  Also correct the comments to drop the obsolete
      reference to safe mode and to reflect the updated code.
      
      Change-Id: I7b53c91c5681764009de453ff104a72cd26d7c2e
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      818815ed
  5. 02 Feb, 2015 15 commits
  6. 16 Dec, 2014 1 commit
  7. 10 Dec, 2014 3 commits
  8. 09 Dec, 2014 2 commits
  9. 05 Dec, 2014 1 commit
  10. 30 Sep, 2014 1 commit
  11. 29 Sep, 2014 1 commit
    • Nick Kralevich's avatar
      implement partial matching using PCRE · d0b768ab
      Nick Kralevich authored
      To speed up the boot process, Android doesn't visit every directory
      in /sys. Instead, only those directories which match a regular
      expression in /file_contexts are visited. Other directories are
      skipped. This results in 2-3 second boot time reduction.
      
      The initial version of this optimization was implemented in
      change 0e7340fb. However, because
      PCRE wasn't available, it was recognized that false positives and
      false negatives might occur.
      
      Now that PCRE is available, start using it. It will avoid the
      false positive / negatives problem.
      
      Bug: 17682157
      Change-Id: I94a109733b0c97a70f80c94fd0a980cb7cb5ca43
      d0b768ab
  12. 20 Sep, 2014 1 commit
  13. 15 Sep, 2014 1 commit
  14. 02 Sep, 2014 2 commits
  15. 07 Jul, 2014 3 commits