Commit graph

880 commits

Author SHA1 Message Date
Dan Cashman
0785a72cda Record hal_wifi_offload_hwservice type for compatibility.
Commit: 632bc494f1 added hwservice labeling
and was cherry-picked to oc-dev, but the hal_wifi_offload_hwservice type
was not part of the cherry-pick because the service was not in oc-dev.
Record the type for compatibility purposes.

Bug: 62573845
Test: None. Prebuilt change only.
Change-Id: Ib2c0fe862eddb566fbe6b0287238fa93dddae7b8
2017-07-31 14:14:59 -07:00
Michael Butler
e9d07b9e5f Default sepolicy rules for initial upload of Neural Network API.
Bug: 63905942
Test: mm -j40
Change-Id: I354ee863475aedd2dc9d2b436a00bcd82931456f
(cherry picked from commit 4fc5fb5e521347d65dc921f8c1fb751c66f9a92c)
2017-07-25 20:42:26 +00:00
Dan Cashman
9d0737a5e3 rm memcg type from ignore list.
This type was removed in commit: 93166cefce
and no longer needs to be included in compatibility infrastructure.

Bug: 62573845
Test: None, prebuilt change.
Change-Id: I9dc05512c7fcb3ef4445c4c6b040809a1d595282
2017-07-18 10:19:53 -07:00
Lorenzo Colitti
e5e17b5a95 Merge changes I356c39a5,I20b52f1d
* changes:
  Revert "Temporarily revert the SELinux policy for persist.netd.stable_secret."
  Revert "Temporarily remove netd_stable_secret_prop from compat infra."
2017-07-13 12:24:20 +00:00
Jeff Vander Stoep
ece21859fc create separate usermodehelper type for sysfs
Prevent files in /proc from incorrectly having sysfs_type attribute.

Rework neverallows so that ueventd has write access to all of
/sys which it needs to handle uevents.

Bug: 63147833
Test: Build. Flash angler, verify files are correctly labeled and no
    new denials are in the logs.

Change-Id: Ib94d44e78cee0e83e2ac924f1c72e611e8e73558
2017-07-12 12:26:12 -07:00
Lorenzo Colitti
98e96fac72 Revert "Temporarily remove netd_stable_secret_prop from compat infra."
This reinstates the exception for netd_stable_secret_prop, which
was added after O sepolicy freeze. This exception, along with the
corresponding core sepolicy change, was reverted in order to
allow these policies to be added to per-device sepolicy.

DO NOT SUBMIT until http://ag/2528214 has automerged to master.

This reverts commit 777c8ee0c2.

Bug: 17613910
Bug: 62573845
Test: make -j64 bootimage
Change-Id: I20b52f1d8e1c0cbb18a339bf45586dacbc7405ad
2017-07-13 01:41:08 +09:00
Lorenzo Colitti
777c8ee0c2 Temporarily remove netd_stable_secret_prop from compat infra.
This will allow removing the netd_stable_secret_prop from common
policy in master. It will be re-added after the wahoo-specific
sepolicy for netd_stable_secret_prop lands in oc-dr1-dev, is
automerged to master, and then is reverted in master.

This reverts commit ebea2b459c.

Bug: 17613910
Bug: 62573845
Test: None, prebuilt change only.
Change-Id: I1234326d2fe6446e7e09ba9e97187518fa9bce33
2017-07-11 23:45:23 +09:00
Dan Cashman
b04df6e309 Make sure platform policy builds with compatible versions.
Platform SELinux policy may be updated without a corresponding
update to non-platform policy.  This is meant to be accomplished by
maintaining a compatibility mapping file which will be built along
with the current platform policy to link older non-platform policy.

Introduce an example vendor policy built from 26.0 public policy and
make sure that the current platform policy and mapping file, for that
version, build with it.  Add this as a dependency for the
selinux_treble_tests, which are meant to ensure treble properties,
ultimately to provide this compatibility guarantee.

Bug: 36899958
Test: Current platform policy builds with oc-dev vendor policy and
oc-dev mapping file.  Removed private type with no effect.  Removed
public type without corresponding mapping entry causes build to fail.

Change-Id: I7994ed651352e2da632fc91e598f819b64c05753
2017-07-10 14:49:03 -07:00
TreeHugger Robot
e3aab4c8bd Merge "Update 26.0 prebuilts." 2017-07-10 21:28:34 +00:00
Dan Cashman
4d9f41d758 Record hal_tetheroffload_service for compatibility.
Commit: e58a8de5e7 added a new type
which has no analogue in 26.0.  Record it as such.

Bug: 62573845
Test: None. Prebuilt change only.
Change-Id: I6b6d2aa64e0ac2c39c8d0427d333e6c7fc2b0bb1
2017-07-07 12:21:33 -07:00
Dan Cashman
d09005261c Record memcg_device type for compat.
Commit: 86cb521502 gave /dev/memcg a
new label, but also explicitly prohibited access to vendor domains.
Add the type to the 'new types' and don't map it to any other type
for backwards compatibility.

Bug: 62573845
Test: None. Prebuilt change only.
Change-Id: I8902716830b162ead69834544ace9e02a94c65b4
2017-07-07 12:21:33 -07:00
Dan Cashman
255a4a7265 Record new broadcast_service type.
Commit: 38f0928fb0 added a type for a
new system service.  This service did not exist previously, so mark
the type as not needing any compat entry.

Bug: 62573845
Test: None. Prebuilt change only.
Change-Id: I52d8e144c614b27f5c52fa99be6cfac87159bbcd
2017-07-07 12:21:33 -07:00
Dan Cashman
629c58b2d3 Record new cas hwservice type.
Commit: 78e595deab added a new hwservice,
which replaced a previous system service.  This effectively means we are
deleting one object and creating a new one, so no compatibility mapping
should be necessary since previous vendor processes trying to access the
service will not be able to find it now independent of policy.

Bug: 62573845
Test: None. Prebuilt change only.
Change-Id: I6882d968dccb55561379e940f6ecb62902bb1659
2017-07-07 12:21:33 -07:00
Dan Cashman
30a29946d0 Update 26.0 prebuilts.
Bug: 37896931
Test: none, just update prebuilt.
Change-Id: Id940d1c2bc46deab1eb49bacebbb41069e2034e4
2017-07-07 10:17:30 -07:00
Dan Cashman
23425c8ea6 Add compat changes for hal_wifi_keystore attribute removal.
Commit: b8f7a40833 removed three
attributes from public policy.  These attributes could be assigned
to vendor types, and so need to be kept in policy when combined with
vendor policy of that version.

Bug: 62573845
Test: None. Prebuilt change only.
Change-Id: I7d71ef7795f8b82c214c2ef72478c3ca84d1869c
2017-07-06 09:51:31 -07:00
Dan Cashman
c72e3db454 Add compat changes for uid_time_in_state.
Commit: 4dc88795d0 changed the label of
uid_time_in_state from proc to proc_uid_time_in_state.  This file
could have been used by vendor services.  Add a compat mapping.

Bug: 62573845
Test: None. Prebuilt change only.
Change-Id: I2e5222c4d4fe12cb0bbc4e85ba53c1f59b714d61
2017-07-06 09:37:23 -07:00
Dan Cashman
2e8cebe6e7 Add compat changes for tracing_shell_writable removal.
Commits 7fa51593c8 and
92fdd8954f removed the
tracing_shell_writable and tracing_shell_writable_debug types, and
relabeled the files with debugfs_tracing and debugfs_tracing_debug,
respectively.  Record this in the compatibility file so that vendor
policy using these types will still work.

Bug: 62573845
Test: None. Prebuilt change only.
Change-Id: Ic6573518035514a86abe2081483431427612699e
2017-07-05 09:41:49 -07:00
Dan Cashman
ebea2b459c Record netd_stable_secret_prop in compat infra.
Commit: abb1ba6532 added policy for a
new property, which was not present in O.  This policy introduced a
new type.  Record it as such.

Bug: 62573845
Test: None, prebuilt change only.
Change-Id: I7d90cd69a5e6e29677598cc109676d5b1ce5ba05
2017-07-05 09:18:14 -07:00
Dan Cashman
3eed3eacfb Map mediaprovider to priv_app in 26.0 compat mapping
Commit: bde5c8013d added a new type,
mediaprovider, which is being applied to an object (process) formerly
labeled as priv_app. Add the new type to the versioned attribute for
priv_app so that any vendor policy written for interaction with
mediaprovider continues to work.

Bug: 62573845
Test: None.  Prebuilt-only change.
Change-Id: Id98293369401a2af23c2328a1cb4a5bb2258aac8
2017-07-05 09:16:48 -07:00
Dan Cashman
e78e8dcf11 Record timezone_service in compat infra.
Commit: 50889ce0eb added policy for a
new service, which was not present in O.  This policy introduced a
new type.  Record it as such.

Bug: 62573845
Test: None, prebuilt change only.
Change-Id: If9cfaff813c47d3b1c8374e8abfb4aedb902d486
2017-07-05 09:15:21 -07:00
Dan Cashman
b1c4967e8a Record tombstoned_java_trace_socket in compat record.
Commit: 11bfcc1e96 added policy for
a new socket which was not present in O.  This socket has a new
type associated with it.  Record the type as a new type so that
compatibility testing will not complain.

Bug: 62573845
Test: None, prebuilt change only.
Change-Id: I375fc9ca0bd201e277a0302d9b34c0da0eb40fbd
2017-07-05 09:13:50 -07:00
Dan Cashman
f875ee074c Add compat changes for e2fs addition.
Commit 5f573ab2aa added policy for
the additions of upstream fs tools.  Make sure the new types are
denoted as such (no object relabeling needs to be done) and that
objects which are relabeled are.

Bug: 35219933
Bug: 62573845
Test: None. Prebuilt change only.
Change-Id: I6515e05ebc60ca08e98029f471cf2861826036fc
2017-07-05 09:11:28 -07:00
Andreas Gampe
8c7514adb1 Sepolicy: Give asan_extract access to powerctl
rc-style powerctl has beem removed. Accordingly, asan_extract now
needs access to sys.powerctl directly.

(orginally commit: 8267208921)

Bug: 36458146
Bug: 38241921
Test: Builds and boots.
Change-Id: I7d6e583f5e98b671986a2071abf157c86e288a10
2017-06-27 15:38:29 -07:00
Dan Cashman
c10e0e552f Add domain_deprecated to bluetooth domains in 26.0.
domain_deprecated is a private attribute, which means that none of
its rules will be copied to vendor policy.  Unfortunately, this
means that any public type that used the attribute now loses policy
rules on which a vendor may have been relying unknowingly.  Add the
domain back in the compatiblity file so that O vendor policy remains
sufficient.

Bug: 62573845
Test: None, prebuilt change and prebuilt tests not in yet.
Change-Id: I2c4ce00ecb102f087472e183fa52d072fe6eb398
2017-06-27 11:42:40 -07:00
Tom Cherry
cfc625d14a remove /dev/log
This was marked deprecated in 2014 and removed in 2015, let's remove
the sepolicy now too.

(Originally submitted in commit: 8c60f74dcc)

Bug: 38242876
Test: Builds and boots.

Change-Id: I4caa0dbf77956fcbc61a07897242b951c275b502
2017-06-27 10:10:22 -07:00
Josh Gao
3458ec135e Add /dev/kmsg_debug.
Add /dev/kmsg_debug on userdebug devices, to allow crash_dump to log
crashes to dmesg when logd isn't up yet (or is the one crashing).

(Originally commited in a015186fab)
Bug: 36574794
Bug: 62101480
Test: Builds and boots.
Change-Id: I249e11291c58fee77098dec3fd3271ea23363ac9
2017-06-27 07:20:44 -07:00
Dan Cashman
55c7750482 Update sepolicy 26.0 prebuilts again, again.
Bug: 37896931
Test: none, just prebuilt update.
Change-Id: I55b5179f98703026699a59cce4b2e1afb166fd1d
2017-06-22 14:32:21 -07:00
Dan Cashman
148578a623 Update 26.0 SELinux prebuilts.
More changes went into oc-dev after the freeze-date.  Reflect them.

Bug: 37896931
Test: prebuilts - none.
Change-Id: I3300751ea7362d5d96b327138544be65eb9fc483
2017-06-19 11:28:09 -07:00
Dan Cashman
5e4e0d7fba Add mapping compatibility file for sepolicy api lvl 26.0
commit: 5c6a227ebb added the oc-dev
sepolicy prebuilts (api 26.0), but did not include the corresponding
base mapping file, which is to be maintained along with current
platform development in order to ensure backwards compatibility.

Bug: 37896931
Test: none, this just copies the old mapping file to prebuilts.
Change-Id: Ia5c36ddab036352845878178fa9c6a9d649d238f
2017-06-13 08:33:15 -07:00
Dan Cashman
5c6a227ebb Commit oc-dev sepolicy to prebuilts.
Copy the final system sepolicy from oc-dev to its prebuilt dir
corresponding to its version (26.0) so that we can uprev policy and
start maintaining compatibility files, as well as use it for CTS
tests targeting future platforms.

Bug: 37896931
Test: none, this just copies the old policy.
Change-Id: Ib069d505e42595c467e5d1164fb16fcb0286ab93
2017-06-06 10:27:37 -07:00