Commit graph

2 commits

Author SHA1 Message Date
Mike Ma
a7fb095207 Relax permissions on /data/misc/logd
Incidentd needs to access /data/misc/logd to get persisted logs for
debugging purposes. Relax permissions on /data/misc/logd to allow
group (log) to access the dir and read its files. Effectively change
to:
drwxr-x--- logd log /data/misc/logd
-rw-r----- logd log /data/misc/logd/logcat*

Since this dir stores the past output of logcat, anyone that can run
logcat can be granted access to this dir. Access to this dir is further
guarded by SELinux. So it is safe.

Bug: 147924172
Test: Build, flash, reboot. Verify that the files have the right
      permissions.

Change-Id: I4d2aa9d5883d1ef14411b2b3902f0ca7c641dd7e
2020-01-21 18:39:19 -08:00
Tom Cherry
98c6c3304a logcat: fix logcatd / logpersist
Removing the rest of liblogcat broke logcatd since LogcatPanic() now
actually calls exit(), whereas logcatd relied on it to return
normally.

We can achieve the expected behavior with a small shell script, so
this change does that as well.

Test: logcatd / logpersist work
Change-Id: Icde36a4811a0db987a801978485e1af1dfc3d38c
2019-10-31 06:43:47 -07:00