Skip to content
Snippets Groups Projects
  1. Dec 06, 2016
    • dcashman's avatar
      sepolicy: add version_policy tool and version non-platform policy. · 2e00e637
      dcashman authored
      In order to support platform changes without simultaneous updates from
      non-platform components, the platform and non-platform policies must be
      split.  In order to provide a guarantee that policy written for
      non-platform objects continues to provide the same access, all types
      exposed to non-platform policy are versioned by converting them and the
      policy using them into attributes.
      
      This change performs that split, the subsequent versioning and also
      generates a mapping file to glue the different policy components
      together.
      
      Test: Device boots and runs.
      Bug: 31369363
      Change-Id: Ibfd3eb077bd9b8e2ff3b2e6a0ca87e44d78b1317
      2e00e637
  2. Sep 23, 2016
    • bowgotsai's avatar
      Clean up LOCAL_C_INCLUDES · a6c215bc
      bowgotsai authored
      It should be specified by LOCAL_EXPORT_C_INCLUDE_DIRS from the imported
      libraries.
      
      Change-Id: I5b01ac24763a75984227d77671def6561325b7cc
      a6c215bc
  3. Aug 22, 2016
  4. Aug 19, 2016
    • Janis Danisevskis's avatar
      Port from pcre to pcre2 · a15ea578
      Janis Danisevskis authored
      Ports check_seapp to pcre2.
      
      Merged-In: Ib9977326cfbb19ce143b04504f41afb884f2ec17
      Bug: 24091652
      Change-Id: Ib9977326cfbb19ce143b04504f41afb884f2ec17
      a15ea578
  5. Aug 10, 2016
  6. Jun 25, 2015
    • William Roberts's avatar
      check_seapp: add support for "neverallow" checks · 81e1f90c
      William Roberts authored
      
      Introduce "neverallow" rules for seapp_contexts. A neverallow rule is
      similar to the existing key-value-pair entries but the line begins
      with "neverallow". A neverallow violation is detected when all keys,
      both inputs and outputs are matched. The neverallow rules value
      parameter (not the key) can contain regular expressions to assist in
      matching. Neverallow rules are never output to the generated
      seapp_contexts file.
      
      Also, unless -o is specified, checkseapp runs in silent mode and
      outputs nothing. Specifying - as an argument to -o outputs to stdout.
      
      Sample Output:
      Error: Rule in File "external/sepolicy/seapp_contexts" on line 87: "user=fake domain=system_app type=app_data_file" violates neverallow in File "external/sepolicy/seapp_contexts" on line 57: "user=((?!system).)* domain=system_app"
      
      Change-Id: Ia4dcbf02feb774f2e201bb0c5d4ce385274d8b8d
      Signed-off-by: default avatarWilliam Roberts <william.c.roberts@intel.com>
      81e1f90c
  7. Jun 10, 2015
  8. Jun 09, 2015
  9. May 14, 2015
    • dcashman's avatar
      Fix sepolicy-analyze libc++.so loading issue w/CTS. · ae696944
      dcashman authored
      Addresses the following error when running CTS on master:
      junit.framework.AssertionFailedError: The following errors were encountered when validating the SELinuxneverallow rule:
      neverallow { appdomain -bluetooth } self:capability *;
      /tmp/SELinuxHostTest5593810182495331783.tmp: error while loading shared libraries: libc++.so: cannot open shared object file: No such file or directory
      
      Also indicate that none of the sepolicy tools need c++ std lib.
      
      (cherry-pick of 28acbeab)
      
      Bug: 19566396
      Change-Id: Ieb380d05ae896a8146b80f94fe3b3211178705bb
      ae696944
  10. May 12, 2015
    • dcashman's avatar
      Fix sepolicy-analyze libc++.so loading issue w/CTS. · 28acbeab
      dcashman authored
      Addresses the following error when running CTS on master:
      junit.framework.AssertionFailedError: The following errors were encountered when validating the SELinuxneverallow rule:
      neverallow { appdomain -bluetooth } self:capability *;
      /tmp/SELinuxHostTest5593810182495331783.tmp: error while loading shared libraries: libc++.so: cannot open shared object file: No such file or directory
      
      Also indicate that none of the sepolicy tools need c++ std lib.
      
      (cherry-pick of 0cdb0517be696c0dc6882d289eedd45bf2da918c now made possible by
      addition of commit: 28b72eddd54cb1287dd7daae853e8e4b78fa17eb)
      
      Bug: 19617220
      Change-Id: I2c5b7ab1ddeb0e02cbaad2b7d5430a0974524a89
      28acbeab
  11. Mar 17, 2015
    • Dan Albert's avatar
      Revert "Fix sepolicy-analyze libc++.so loading issue w/CTS." · 0d3bf4be
      Dan Albert authored
      This is causing more harm than good. We'll just make these all link
      libc++ again and work out the CTS issues if they still exist.
      
      Bug: 19778891
      
      This reverts commit 3812cf58.
      
      Change-Id: Iaea8f6acb147da4275633a760ccb32951db7f8b6
      0d3bf4be
    • Dan Albert's avatar
      Revert "Don't use address sanitizer for selinux tools." · f0852340
      Dan Albert authored
      This is causing more harm than good. We'll just make these all link
      libc++ again (another revert) and work out the CTS issues if they still
      exist.
      
      Bug: 19778891
      
      This reverts commit a5113a15.
      
      Change-Id: I35a4c93dae4abb66e3525451d5ce01e33a540895
      f0852340
    • Dan Albert's avatar
      Don't use address sanitizer for selinux tools. · a5113a15
      Dan Albert authored
      Address sanitizer requires using libc++ (apparently). We removed
      libc++ from these projects since they were C and the SDK/CTS was not
      able to find libc++.
      
      If we're interested in continuing to use ASAN on these tools
      (probably), we should turn libc++ back on once we're sure CTS won't
      die.
      
      Bug: 19778891
      Change-Id: I3c1913171a15396ead73277ec1186fead730f66d
      a5113a15
  12. Mar 16, 2015
    • dcashman's avatar
      Fix sepolicy-analyze libc++.so loading issue w/CTS. · 3812cf58
      dcashman authored
      Addresses the following error when running CTS on master:
      junit.framework.AssertionFailedError: The following errors were encountered when validating the SELinuxneverallow rule:
      neverallow { appdomain -bluetooth } self:capability *;
      /tmp/SELinuxHostTest5593810182495331783.tmp: error while loading shared libraries: libc++.so: cannot open shared object file: No such file or directory
      
      Also indicate that none of the sepolicy tools need c++ std lib.
      
      Bug: 19617220
      
      Change-Id: I713b3cbd1220655413d399c7cd2b0b50459a5485
      3812cf58
  13. Feb 06, 2015
    • dcashman's avatar
      Accept command-line input for neverallow-check. · f82f5e01
      dcashman authored
      Also, divide each sepolicy-analyze function into its own component for simplified
      command-line parsing and potentially eventual modularization.
      
      Bug: 18005561
      
      Cherry-pick of commit: ef4fd306
      with commit: 47c14611
      squashed in.
      
      Bug: 19191637
      Change-Id: Id66cad549b7311a6bbd92fd64b6ec2c60d0433a4
      f82f5e01
  14. Nov 19, 2014
  15. Oct 31, 2014
    • dcashman's avatar
      Accept command-line input for neverallow-check. · ef4fd306
      dcashman authored
      Also, divide each sepolicy-analyze function into its own component for simplified
      command-line parsing and potentially eventual modularization.
      
      Bug: 18005561
      Change-Id: I45fa07d776cf1bec7d60dba0c03ee05142b86c19
      ef4fd306
  16. Nov 01, 2013
  17. Oct 31, 2013
    • Nick Kralevich's avatar
      Revert -Wall -Werror · 2d8a4237
      Nick Kralevich authored
      Temporarily revert -Wall -Werror on checkseapp.
      This is causing a compiler error on darwin SDK builds.
      
      cc1: warnings being treated as errors
      external/sepolicy/tools/check_seapp.c: In function 'rule_map_free':
      external/sepolicy/tools/check_seapp.c:439: warning: unused parameter 's'
      make: *** [out/host/darwin-x86/obj/EXECUTABLES/checkseapp_intermediates/check_seapp.o] Error 1
      
      Change-Id: I9776777a751f16d5ca0d90e731482c31dac813f9
      2d8a4237
    • Stephen Smalley's avatar
      Add sepolicy-analyze tool. · 7b2bee99
      Stephen Smalley authored
      
      And also remove the unnecessary references to libselinux for
      sepolicy-check, as it has no dependencies on libselinux.
      Also enable -Wall -Werror on building all of these tools and
      fix up all such errors.
      
      Usage:
      $ sepolicy-analyze -e -P out/target/product/<device>/root/sepolicy
      or
      $ sepolicy-analyze -d -P out/target/product/<device>/root/sepolicy
      
      The first form will display all type pairs that are "equivalent", i.e.
      they are identical with respect to allow rules, including indirect allow
      rules via attributes and default-enabled conditional rules (i.e. default
      boolean values yield a true conditional expression).
      
      Equivalent types are candidates for being coalesced into a single type.
      However, there may be legitimate reasons for them to remain separate,
      for example:
      - the types may differ in a respect not included in the current
      analysis, such as default-disabled conditional rules, audit-related
      rules (auditallow or dontaudit), default type transitions, or
      constraints (e.g. mls), or
      - the current policy may be overly permissive with respect to one or the
      other of the types and thus the correct action may be to tighten access
      to one or the other rather than coalescing them together, or
      - the domains that would in fact have different accesses to the types
      may not yet be defined or may be unconfined in the policy you are
      analyzing (e.g. in AOSP policy).
      
      The second form will display type pairs that differ and the first
      difference found between the two types.  This output can be long.
      
      We have plans to explore further enhancements to this tool, including
      support for identifying isomorphic types.  That will be required to
      identify similar domains since all domains differ in at least their
      entrypoint type and in their tmpfs type and thus will never show up as
      equivalent even if they are in all other respects identical to each other.
      
      Change-Id: If0ee00188469d2a1e165fdd52f235c705d22cd4e
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      7b2bee99
  18. Aug 23, 2013
  19. Mar 26, 2013
  20. Mar 19, 2013
  21. Dec 08, 2012
  22. Nov 01, 2012
Loading