Commit graph

11952 commits

Author SHA1 Message Date
Dan Cashman
5637587d37 Split mediaprovider from priv_app.
This CL was accidentally reverted a second time by commit:
cb5129f9de.  Submit it for the third,
and final, time.

Bug: 62102757
Test: Builds and boots.
2017-07-10 11:17:18 -07: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
TreeHugger Robot
55969ec7c2 Merge "Fix incorrect SELinux labeling." 2017-07-07 15:41:20 +00:00
TreeHugger Robot
b15273bbc6 Merge "Add compat changes for hal_wifi_keystore attribute removal." 2017-07-06 18:40:32 +00:00
TreeHugger Robot
04ebfc6a8e Merge "Add compat changes for uid_time_in_state." 2017-07-06 18:21:40 +00:00
Joel Galenson
58d6929bf1 Fix incorrect SELinux labeling.
When moving SELinux rules from file_contexts to genfs_contexts, we
added some genfs rules to label specific files.  It turns out that one
of those files was the prefix of some other files, and since genfs
does prefix-labeling, those other files had their labels changed.

To fix this, we are changing the whole tracefs /instances/wifi from
debugfs_tracing_instances to debugfs_wifi_tracing (a few of the files
already had this label).  This simplifies the rules.

Bug: 62413700
Test: Built, flashed, and booted two devices.  Verified that the files
have the correct context and that wifi, camera, and traceur work.

Change-Id: Id62db079f439ae8c531b44d1184eea26d5b760c3
2017-07-06 10:59:11 -07:00
Android Build Merger (Role)
b6145f83c0 Merge "domain_deprecated: remove tmpfs dir access am: ca5bb3371d am: 453f4a51c6 am: 407e9457b2 am: 8b0f89e45b" 2017-07-06 17:07:19 +00:00
Jeff Vander Stoep
c0c982a51a domain_deprecated: remove tmpfs dir access am: ca5bb3371d am: 453f4a51c6 am: 407e9457b2
am: 8b0f89e45b

Change-Id: I6a75dc96a8e5994f22a8776a413d8a6a01da4fdd
2017-07-06 17:07:08 +00:00
Android Build Merger (Role)
8374685d7d Merge "domain_deprecated: remove tmpfs dir access am: ca5bb3371d am: 453f4a51c6 am: 407e9457b2 am: 8b0f89e45b" 2017-07-06 17:07:03 +00:00
Android Build Merger (Role)
fed8c69446 Merge "Merge "Preserve attributes needed for CTS" into oc-dr1-dev am: 1eff641730 am: d006aea03f -s ours" 2017-07-06 17:07:01 +00:00
Jeff Vander Stoep
1167f56f1a domain_deprecated: remove tmpfs dir access am: ca5bb3371d am: 453f4a51c6 am: 407e9457b2
am: 8b0f89e45b

Change-Id: I02aefb28ad044dc7d85956156fde638c101bdbe5
2017-07-06 17:06:49 +00:00
Android Build Merger (Role)
26f3257196 Merge "Merge "Preserve attributes needed for CTS" into oc-dr1-dev am: 1eff641730 am: d006aea03f -s ours" 2017-07-06 17:06:44 +00:00
Jeff Vander Stoep
0f0d5c009f Merge "Preserve attributes needed for CTS" into oc-dr1-dev am: 1eff641730
am: d006aea03f  -s ours

Change-Id: Ie76a6c836163a8755507232b5b493a24a7b84da8
2017-07-06 17:06:34 +00:00
Jeff Vander Stoep
dc0716ba7d Merge "Preserve attributes needed for CTS" into oc-dr1-dev am: 1eff641730
am: d006aea03f  -s ours

Change-Id: Ifce7d19ce6469f5526a2e4d2b40db07c6524e368
2017-07-06 17:06:32 +00:00
Android Build Merger (Role)
f47399d681 Merge "Merge changes from topic 'am-52eed220ada34c3aba959fcbb20dfeab' into oc-dr1-dev-plus-aosp am: c436013b76 -s ours" 2017-07-06 17:06:28 +00:00
Jin Qian
269d93cca3 Merge changes from topic 'am-52eed220ada34c3aba959fcbb20dfeab' into oc-dr1-dev-plus-aosp
am: c436013b76  -s ours

Change-Id: I8af59aba167dfd27cd4773eb573978d539dec1ff
2017-07-06 17:06:12 +00:00
Jin Qian
3549fdab15 Merge changes from topic 'am-52eed220ada34c3aba959fcbb20dfeab' into oc-dr1-dev-plus-aosp
am: c436013b76  -s ours

Change-Id: I89a0c3cfab8e44218b7978c32c577717df522069
2017-07-06 17:06:08 +00: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
Jeff Vander Stoep
8b0f89e45b domain_deprecated: remove tmpfs dir access am: ca5bb3371d am: 453f4a51c6
am: 407e9457b2

Change-Id: If277928809ec2bcaf7f72ef9cba5dd5d45d333ca
2017-07-06 16:45:09 +00:00
Jeff Vander Stoep
407e9457b2 domain_deprecated: remove tmpfs dir access am: ca5bb3371d
am: 453f4a51c6

Change-Id: Iff9292a4a92fdd78eebdf2ec5fab8d571fc755f6
2017-07-06 16:43:10 +00:00
Jeff Vander Stoep
453f4a51c6 domain_deprecated: remove tmpfs dir access
am: ca5bb3371d

Change-Id: I185d127216ee72821c64daf31601fdcbe1a9c069
2017-07-06 16:41:20 +00:00
Jeff Vander Stoep
d006aea03f Merge "Preserve attributes needed for CTS" into oc-dr1-dev
am: 1eff641730

Change-Id: I095df5cbd680d495fac54186ab16e2287d454c3a
2017-07-06 16:38:13 +00: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
TreeHugger Robot
1eff641730 Merge "Preserve attributes needed for CTS" into oc-dr1-dev 2017-07-06 16:28:02 +00:00
Android Build Merger (Role)
a7e8eb981f Merge "remove mke2fs rules from global file_contexts am: 0d32323ce3 -s ours am: 7acd39d2f4 -s ours" 2017-07-06 16:15:43 +00:00
Android Build Merger (Role)
8849a294db Merge changes from topic 'am-02585df899244ddfb0b2ea27e62c017d'
* changes:
  remove mke2fs rules from global file_contexts am: 0d32323ce3  -s ours am: 9174874746  -s ours
  move e2fs tools from /sbin to /system/bin am: ae0479562c am: a8beb22e91  -s ours
2017-07-06 16:15:38 +00:00
Jin Qian
cb819c55cf remove mke2fs rules from global file_contexts am: 0d32323ce3 -s ours
am: 7acd39d2f4  -s ours

Change-Id: I16bc3700ae6e363512b647a4f4f8c9d6646e5066
2017-07-06 16:14:29 +00:00
Jin Qian
03585ef0df remove mke2fs rules from global file_contexts am: 0d32323ce3 -s ours
am: 9174874746  -s ours

Change-Id: Ic1c432a08d80a03f574676b50b1805e2e0f7bc09
2017-07-06 16:14:16 +00:00
Jin Qian
5ff9dacec9 move e2fs tools from /sbin to /system/bin am: ae0479562c
am: a8beb22e91  -s ours

Change-Id: Icb5f4e4dec18f62df41d0e89ffa4909a74a5fa63
2017-07-06 16:14:12 +00:00
Jin Qian
91d17a7370 remove mke2fs rules from global file_contexts am: 0d32323ce3 -s ours
am: 9174874746  -s ours

Change-Id: If702e73a84560aa6dd98b95113f5c2798636c5f7
2017-07-06 16:12:17 +00:00
Jin Qian
615bbdceff move e2fs tools from /sbin to /system/bin am: ae0479562c
am: a8beb22e91  -s ours

Change-Id: Id5fdb2f361a0ef1757c0db18dfacb18914b826b3
2017-07-06 16:12:14 +00:00
Android Build Merger (Role)
c436013b76 Merge changes from topic 'am-52eed220ada34c3aba959fcbb20dfeab' into oc-dr1-dev-plus-aosp
* changes:
  remove mke2fs rules from global file_contexts am: 0d32323ce3  -s ours
  move e2fs tools from /sbin to /system/bin am: ae0479562c
2017-07-06 16:07:55 +00:00
Jin Qian
7acd39d2f4 remove mke2fs rules from global file_contexts
am: 0d32323ce3  -s ours

Change-Id: I2283da4878b60860400d31eaff019faef2b2c888
2017-07-06 16:06:59 +00:00
Jin Qian
2c1d4951b4 move e2fs tools from /sbin to /system/bin
am: ae0479562c

Change-Id: I6b61f896f97bfe7ed9d2dfeb876d76e0101e093a
2017-07-06 16:06:53 +00:00
Jin Qian
9174874746 remove mke2fs rules from global file_contexts
am: 0d32323ce3  -s ours

Change-Id: I9cb9b52f452394a32c51ec2aefd502e21896c61d
2017-07-06 16:06:38 +00:00
Jin Qian
a8beb22e91 move e2fs tools from /sbin to /system/bin
am: ae0479562c

Change-Id: Id8c7b9ab97ad80332b65fd02ba9ca61e67dac218
2017-07-06 16:06:35 +00:00
Jeff Vander Stoep
ca5bb3371d domain_deprecated: remove tmpfs dir access
Address "granted" audit messages for dumpstate use of df.

avc: granted { getattr } for comm="df" path="/mnt" dev="tmpfs"
scontext=u:r:dumpstate:s0 tcontext=u:object_r:tmpfs:s0
tclass=dir
avc: granted { search } for comm="df" name="/" dev="tmpfs"
scontext=u:r:dumpstate:s0 tcontext=u:object_r:tmpfs:s0
tclass=dir

Bug: 28760354
Test: Build, check logs.
Change-Id: I920948a5f0bce1b4bd2f15779730df8b3b1fea5a
2017-07-05 22:44:21 -07:00
Jeff Vander Stoep
5f5aa96286 Preserve attributes needed for CTS
Change fb889f23d "Force expand all hal_* attributes" annotated all
hal_* attributes to be expanded to their associated types. However
some of these attributes are used in CTS for neverallow checking.
Mark these attributes to be preserved.

In addition, remove the hacky workaround introduced in oc-dev
for b/62658302 where extraneous neverallow rules were introduced
to prevent unused or negated attributes from being auto-expanded
from policy.

Bug: 62658302
Bug: 63135903
Test: cts-tradefed run cts -m CtsSecurityHostTestCases -t \
    android.cts.security.SELinuxNeverallowRulesTest

    armeabi-v7a CtsSecurityHostTestCases completed in 4s.
    501 passed, 0 failed, 0 not executed
Merged-In: I989def70a16f66e7a18bef1191510793fbe9cb8c
Change-Id: I989def70a16f66e7a18bef1191510793fbe9cb8c
2017-07-05 23:06:35 +00:00
Jeff Vander Stoep
bf8ed096e3 Preserve attributes needed for CTS
Change fb889f23d "Force expand all hal_* attributes" annotated all
hal_* attributes to be expanded to their associated types. However
some of these attributes are used in CTS for neverallow checking.
Mark these attributes to be preserved.

In addition, remove the hacky workaround introduced in oc-dev
for b/62658302 where extraneous neverallow rules were introduced
to prevent unused or negated attributes from being auto-expanded
from policy.

Bug: 62658302
Bug: 63135903
Test: cts-tradefed run cts -m CtsSecurityHostTestCases -t \
    android.cts.security.SELinuxNeverallowRulesTest

    armeabi-v7a CtsSecurityHostTestCases completed in 4s.
    501 passed, 0 failed, 0 not executed
Change-Id: I989def70a16f66e7a18bef1191510793fbe9cb8c
2017-07-05 16:04:44 -07:00
TreeHugger Robot
371a437580 Merge "Simplify genfs labeling of tracefs." 2017-07-05 21:26:12 +00:00
TreeHugger Robot
cdb2c66e4f Merge "Revert "allow recovery to run mke2fs tools"" 2017-07-05 21:07:17 +00:00
TreeHugger Robot
26dc1bcf06 Merge "Add compat changes for tracing_shell_writable removal." 2017-07-05 20:22:23 +00:00
Joel Galenson
312c3800b8 Simplify genfs labeling of tracefs.
The code used to look like this, but in commit
4cae28d43c we replaced the generic
regexes to improve performance.  Now that we've switched to genfs,
this no longer affects performance, so let's simplify the labeling.

Bug: 62413700
Test: Built, flashed, and booted two devices.  Verified that all of
the files have the correct context and that wifi, camera, and traceur
work.

Change-Id: I1a859d17075fa25543ee090cc7a7478391bc45c1
2017-07-05 12:39:27 -07:00
TreeHugger Robot
e6b6fc3f3a Merge "Move file labeling to genfs_contexts." 2017-07-05 19:29:12 +00:00
Joel Galenson
cd3c5d3524 Move file labeling to genfs_contexts.
This should slightly improve performance, as file_contexts is slower
than genfs_contexts.

Now that the kernel patch enabling genfs labeling of tracefs has
landed, we can re-enable this.

Bug: 62413700
Test: Built, flashed, and booted two devices.  Verified that all of
the files have the correct context and that wifi, camera, and traceur
work.

Change-Id: Ifc1c6ac634b94e060ed1f311049bd37f6fcc8313
2017-07-05 19:28:11 +00:00
Jin Qian
0d32323ce3 remove mke2fs rules from global file_contexts
move them to device-specific files.

Bug: 62908056
Change-Id: I299819785d5a64e6ecdde1cd7da472477fe1e295
Merged-In: If92352ea7a70780e9d81ab10963d63e16b793792
2017-07-05 12:22:14 -07:00
Jin Qian
ae0479562c move e2fs tools from /sbin to /system/bin
Test: let fs_mgr format a damaged /data partition
Bug: 35219933
Change-Id: I379567772c73e52f532a24acf640c21f2bab5c5b
Merged-In: I379567772c73e52f532a24acf640c21f2bab5c5b
2017-07-05 12:22:14 -07:00