Commit graph

8 commits

Author SHA1 Message Date
Daeho Jeong
6ac8e4cf00 compress logcat files
Change selinux policy to compress logcat files.

Test: check whether logcat files are compressed
Bug: 295175795
Change-Id: Ib120700c6dab4b1d0e29f0e19e55793bfb7a1675
Signed-off-by: Daeho Jeong <daehojeong@google.com>
2023-08-25 15:02:34 -07:00
Steven Moreland
f3722d5a71 strengthen app_data_file neverallows
There are more types of apps now.

Bug: 281877578
Test: boot
Change-Id: I1918de8610070f6fac0e933d75c656e4ee0cfbdd
2023-05-23 00:01:27 +00:00
Tom Cherry
bf2f37325b logpersist is now a shell script, so give it the appropriate permissions
Test: logcatd / logpersist work
Change-Id: Id283e24b0b48ddfa056ff842eecb51ee52b44c5e
2019-10-30 13:54:35 -07:00
Nick Kralevich
23c9d91b46 Start partitioning off privapp_data_file from app_data_file
Currently, both untrusted apps and priv-apps use the SELinux file label
"app_data_file" for files in their /data/data directory. This is
problematic, as we really want different rules for such files. For
example, we may want to allow untrusted apps to load executable code
from priv-app directories, but disallow untrusted apps from loading
executable code from their own home directories.

This change adds a new file type "privapp_data_file". For compatibility,
we adjust the policy to support access privapp_data_files almost
everywhere we were previously granting access to app_data_files
(adbd and run-as being exceptions). Additional future tightening is
possible here by removing some of these newly added rules.

This label will start getting used in a followup change to
system/sepolicy/private/seapp_contexts, similar to:

  -user=_app isPrivApp=true domain=priv_app type=app_data_file levelFrom=user
  +user=_app isPrivApp=true domain=priv_app type=privapp_data_file levelFrom=user

For now, this newly introduced label has no usage, so this change
is essentially a no-op.

Test: Factory reset and boot - no problems on fresh install.
Test: Upgrade to new version and test. No compatibility problems on
      filesystem upgrade.

Change-Id: I9618b7d91d1c2bcb5837cdabc949f0cf741a2837
2018-08-02 16:29:02 -07:00
Mark Salyzyn
928cf933aa logpersist: do not permit dynamic transition to domain
We allow domains to manually transition to logpersist for userdebug
or eng debug logging permissions that would be counter to monitoring
limits on a released user build.

Test: compile
Bug: 30566487
Change-Id: I03a81c75cbd2b44617e4b27c4c083a26a0e0fa87
2016-12-29 09:29:36 -08:00
Mark Salyzyn
5f25239c2c init: permit logpersist transition for the time being (STOPSHIP)
mmi-based products insists on running persistent logcat directly.

Test: build
Bug: 30566487
Change-Id: I6397f5faedb2a4a5e2f4cfc5387977ae9c54b2d4
2016-12-21 14:37:24 -08:00
Mark Salyzyn
df125b90b4 init: only allowed to transition to logpersist or logd
Generate a compile time error if someone unexpectedly tries to
transition into logpersist or logd domain.

Test: compile
Bug: 30566487
Change-Id: Ib55f301f104ad63de5ac513cdc9dc9937e3ba48d
2016-12-21 07:40:30 -08:00
Mark Salyzyn
da62cb4dda logcat: introduce split to logd and logpersist domains
- transition to logpersist from init
- sort some overlapping negative references
- intention is to allow logpersist to be used by vendor
  userdebug logging

Test: gTest liblog-unit-tests, logd-unit-tests & logcat-unit-tests
Bug: 30566487
Change-Id: I7806f5a2548cbe0c1f257a0ba2855f2eb69d8e7c
2016-12-20 20:31:03 +00:00