Skip to content
Snippets Groups Projects
  1. Sep 01, 2017
  2. Aug 11, 2017
    • Steven Moreland's avatar
      Add screencap domain. · f27bba93
      Steven Moreland authored
      Only seeing this denial in permissive:
      allow shell screencap_exec:file getattr;
      
      Bug: 37565047
      Test: adb shell screencap w/o root
      Test: cts-tradefed run cts-dev --module CtsAadbHostTestCases
      Change-Id: I9f31d2067e002e7042646ee38dbfc06687481ac7
      f27bba93
  3. Jun 14, 2017
    • Joel Galenson's avatar
      Properly give some files the debugfs_tracing context only in debug mode. · 92fdd895
      Joel Galenson authored
      One of my previous commits removed this, so I am now restoring it.
      
      This commit also contains a bit of cleanup from previous commits by
      removing some unneeded types.
      
      It also fixes traceur by porting ag/2409144 to master.
      
      Bug: 62413700, 62547086
      Test: Built, flashed, and booted Marlin.  Verified that the files have
      the correct context.  Verified that atrace and traceur work.
      
      Change-Id: I76fa0e9060aff554687d57ab3976c8704a4068f0
      92fdd895
  4. Jun 07, 2017
    • Joel Galenson's avatar
      Move file labeling to genfs_contexts. · 7fa51593
      Joel Galenson authored
      This should improve performance, as file_contexts is slower than
      genfs_contexts.
      
      Bug: 62413700
      Test: Built, flashed, and booted Marlin.  Verified that some of the
      files have the correct context.
      Change-Id: Ia28707ec565a0792bc882fbffe9e8ab9968535f5
      7fa51593
  5. May 11, 2017
    • Siarhei Vishniakou's avatar
      Allow shell access on /dev/uhid node · 2a7f5710
      Siarhei Vishniakou authored
      Node for /dev/uhid driver needs to be accessible
      by shell for the 'hid' command in frameworks/base/cmds.
      This CL is in support of another CL c/2048848, topic
      'Refactor hid command in /frameworks/base/cmds'
      in internal master.
      
      Bug: 34052337
      Test: CTS test for GamepadTestCase#testButtonA; Checked that
      cat /dev/uhid does not raise permission error.
      
      Change-Id: I861c1226b4a67272af7c2a93d7811bf87a083478
      2a7f5710
  6. May 08, 2017
    • Yifan Hong's avatar
      Allow adbd and shell to read /proc/config.gz · 19a87733
      Yifan Hong authored
      for CTS device info collection purposes.
      
      Bug: 28656227
      Test: m cts -j && cts-tradefed run cts -m Gesture --test
      android.gesture.cts.GestureTest#testGetStrokes
      
      Change-Id: I8caf3580fb05fb489dc5abb917c8cb78cb089fb7
      19a87733
    • Nick Kralevich's avatar
      Further restrict SELinux API access · 14e2e926
      Nick Kralevich authored
      Remove SELinux access from domain_deprecated. Access to SELinux APIs can
      be granted on a per-domain basis.
      
      Remove appdomain access to SELinux APIs. SELinux APIs are not public and
      are not intended for application use. In particular, some exploits poll
      on /sys/fs/selinux/enforce to determine if the attack was successful,
      and we want to ensure that the behavior isn't allowed. This access was
      only granted in the past for CTS purposes, but all the relevant CTS
      tests have been moved to the shell domain.
      
      Bug: 27756382
      Bug: 28760354
      Test: Device boots and no obvious problems. No collected denials.
      Change-Id: Ide68311bd0542671c8ebf9df0326e512a1cf325b
      14e2e926
  7. Apr 18, 2017
    • Carmen Jackson's avatar
      Add selinux rules for additional file contexts in userdebug · 25788df1
      Carmen Jackson authored
      These rules allow the additional tracepoints we need for running traceur
      in userdebug builds to be writeable.
      
      Bug: 37110010
      Test: I'm testing by running atrace -l and confirming that the
      tracepoints that I'm attempting to enable are available.
      
      Change-Id: Ia352100ed67819ae5acca2aad803fa392d8b80fd
      25788df1
  8. Mar 31, 2017
  9. Mar 30, 2017
  10. Mar 24, 2017
    • Alex Klyubin's avatar
      Vendor domains must not use Binder · f5446eb1
      Alex Klyubin authored
      On PRODUCT_FULL_TREBLE devices, non-vendor domains (except vendor
      apps) are not permitted to use Binder. This commit thus:
      * groups non-vendor domains using the new "coredomain" attribute,
      * adds neverallow rules restricting Binder use to coredomain and
        appdomain only, and
      * temporarily exempts the domains which are currently violating this
        rule from this restriction. These domains are grouped using the new
        "binder_in_vendor_violators" attribute. The attribute is needed
        because the types corresponding to violators are not exposed to the
        public policy where the neverallow rules are.
      
      Test: mmm system/sepolicy
      Test: Device boots, no new denials
      Test: In Chrome, navigate to ip6.me, play a YouTube video
      Test: YouTube: play a video
      Test: Netflix: play a movie
      Test: Google Camera: take a photo, take an HDR+ photo, record video with
            sound, record slow motion video with sound. Confirm videos play
            back fine and with sound.
      Bug: 35870313
      Change-Id: I0cd1a80b60bcbde358ce0f7a47b90f4435a45c95
      f5446eb1
  11. Feb 12, 2017
    • Nick Kralevich's avatar
      tracefs: avoid overly generic regexes · 4cae28d4
      Nick Kralevich authored
      On boot, Android runs restorecon on a number of virtual directories,
      such as /sys and /sys/kernel/debug, to ensure that the SELinux labels
      are correct. To avoid causing excessive boot time delays, the restorecon
      code aggressively prunes directories, to avoid recursing down directory
      trees which will never have a matching SELinux label.
      
      See:
      * https://android-review.googlesource.com/93401
      * https://android-review.googlesource.com/109103
      
      The key to this optimization is avoiding unnecessarily broad regular
      expressions in file_contexts. If an overly broad regex exists, the tree
      pruning code is ineffective, and the restorecon ends up visiting lots of
      unnecessary directories.
      
      The directory /sys/kernel/debug/tracing contains approximately 4500
      files normally, and on debuggable builds, this number can jump to over
      9000 files when the processing from wifi-events.rc occurs. For
      comparison, the entire /sys/kernel/debug tree (excluding
      /sys/kernel/debug/tracing) only contains approximately 8000 files. The
      regular expression "/sys/kernel(/debug)?/tracing/(.*)?" ends up matching
      a significant number of files, which impacts boot performance.
      
      Instead of using an overly broad regex, refine the regex so only the
      files needed have an entry in file_contexts. This list of files is
      essentially a duplicate of the entries in
      frameworks/native/cmds/atrace/atrace.rc .
      
      This change reduces the restorecon_recursive call for /sys/kernel/debug
      from approximately 260ms to 40ms, a boot time reduction of approximately
      220ms.
      
      Bug: 35248779
      Test: device boots, no SELinux denials, faster boot.
      Change-Id: I70f8af102762ec0180546b05fcf014c097135f3e
      4cae28d4
  12. Dec 08, 2016
    • dcashman's avatar
      Restore app_domain macro and move to private use. · 3e8dbf01
      dcashman authored
      app_domain was split up in commit: 2e00e637 to
      enable compilation by hiding type_transition rules from public policy.  These
      rules need to be hidden from public policy because they describe how objects are
      labeled, of which non-platform should be unaware.  Instead of cutting apart the
      app_domain macro, which non-platform policy may rely on for implementing new app
      types, move all app_domain calls to private policy.
      
      (cherry-pick of commit: 76035ea0)
      
      Bug: 33428593
      Test: bullhead and sailfish both boot. sediff shows no policy change.
      Change-Id: I4beead8ccc9b6e13c6348da98bb575756f539665
      3e8dbf01
    • dcashman's avatar
      Restore app_domain macro and move to private use. · 76035ea0
      dcashman authored
      app_domain was split up in commit: 2e00e637 to
      enable compilation by hiding type_transition rules from public policy.  These
      rules need to be hidden from public policy because they describe how objects are
      labeled, of which non-platform should be unaware.  Instead of cutting apart the
      app_domain macro, which non-platform policy may rely on for implementing new app
      types, move all app_domain calls to private policy.
      
      Bug: 33428593
      Test: bullhead and sailfish both boot. sediff shows no policy change.
      Change-Id: I4beead8ccc9b6e13c6348da98bb575756f539665
      76035ea0
  13. 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
Loading