Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AndroidSystemSEPolicy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Werner Sembach
AndroidSystemSEPolicy
Commits
3107b532
Commit
3107b532
authored
7 years ago
by
Tri Vo
Committed by
android-build-merger
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Remove access to 'sysfs' files from healtd and charger." am:
1fc08a29
am:
b10d2964
Change-Id: I07d6bdf0cf606b2ec56196e129a8340207d5d08b
parents
049bf53a
b10d2964
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
private/domain.te
+0
-2
0 additions, 2 deletions
private/domain.te
public/charger.te
+2
-2
2 additions, 2 deletions
public/charger.te
public/healthd.te
+4
-7
4 additions, 7 deletions
public/healthd.te
with
6 additions
and
11 deletions
private/domain.te
+
0
−
2
View file @
3107b532
...
...
@@ -35,9 +35,7 @@ full_treble_only(`
# /sys
neverallow {
coredomain
-charger
-dumpstate
-healthd
-init
-priv_app
-storaged
...
...
This diff is collapsed.
Click to expand it.
public/charger.te
+
2
−
2
View file @
3107b532
...
...
@@ -6,7 +6,7 @@ type charger, domain;
allow charger kmsg_device:chr_file rw_file_perms;
# Read access to pseudo filesystems.
r_dir_file(
charger
,
sysfs_type
)
allow
charger sysfs_type
:dir search;
r_dir_file(charger, rootfs)
r_dir_file(charger, cgroup)
...
...
@@ -20,7 +20,7 @@ allow charger self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
# Read/write to /sys/power/state
allow charger sysfs_power:file rw_file_perms;
allow
charger sysfs_batteryinfo
:file r_file_perms;
r_dir_file(
charger
,
sysfs_batteryinfo
)
# Read /sys/fs/pstore/console-ramoops
# Don't worry about overly broad permissions for now, as there's
...
...
This diff is collapsed.
Click to expand it.
public/healthd.te
+
4
−
7
View file @
3107b532
...
...
@@ -6,7 +6,7 @@ type healthd_exec, exec_type, file_type;
allow healthd kmsg_device:chr_file rw_file_perms;
# Read access to pseudo filesystems.
r_dir_file(
healthd
,
sysfs_type
)
allow
healthd sysfs_type
:dir search;
r_dir_file(healthd, rootfs)
r_dir_file(healthd, cgroup)
...
...
@@ -26,16 +26,13 @@ binder_service(healthd)
binder_call(healthd, system_server)
hal_client_domain(healthd, hal_health)
# Write to state file.
# TODO: Split into a separate type?
allow healthd sysfs:file write;
# Read/write to /sys/power/state
allow healthd sysfs_power:file rw_file_perms;
# TODO: added to match above sysfs rule. Remove me?
allow healthd sysfs_usb:file write;
allow healthd sysfs_batteryinfo:file r_file_perms;
r_dir_file(healthd, sysfs_type)
r_dir_file(healthd, sysfs_batteryinfo)
###
### healthd: charger mode
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment