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
45b36259
Commit
45b36259
authored
7 years ago
by
Tri Vo
Committed by
android-build-merger
7 years ago
Browse files
Options
Downloads
Plain Diff
Revert "init: remove open, read, write access to 'sysfs' type." am:
423d14bf
am:
996487ce
am:
16462878
Change-Id: I6cf0335743030dc5f1932b5934cea72194a41cde
parents
2a9ce734
16462878
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
private/genfs_contexts
+0
-1
0 additions, 1 deletion
private/genfs_contexts
public/init.te
+5
-22
5 additions, 22 deletions
public/init.te
with
5 additions
and
23 deletions
private/genfs_contexts
+
0
−
1
View file @
45b36259
...
@@ -101,7 +101,6 @@ genfscon sysfs /devices/virtual/net u:object_r:sysfs_net:s0
...
@@ -101,7 +101,6 @@ genfscon sysfs /devices/virtual/net u:object_r:sysfs_net:s0
genfscon sysfs /devices/virtual/switch u:object_r:sysfs_switch:s0
genfscon sysfs /devices/virtual/switch u:object_r:sysfs_switch:s0
genfscon sysfs /firmware/devicetree/base/firmware/android u:object_r:sysfs_dt_firmware_android:s0
genfscon sysfs /firmware/devicetree/base/firmware/android u:object_r:sysfs_dt_firmware_android:s0
genfscon sysfs /fs/ext4/features u:object_r:sysfs_fs_ext4_features:s0
genfscon sysfs /fs/ext4/features u:object_r:sysfs_fs_ext4_features:s0
genfscon sysfs /power/autosleep u:object_r:sysfs_power:s0
genfscon sysfs /power/state u:object_r:sysfs_power:s0
genfscon sysfs /power/state u:object_r:sysfs_power:s0
genfscon sysfs /power/wakeup_count u:object_r:sysfs_power:s0
genfscon sysfs /power/wakeup_count u:object_r:sysfs_power:s0
genfscon sysfs /power/wake_lock u:object_r:sysfs_wake_lock:s0
genfscon sysfs /power/wake_lock u:object_r:sysfs_wake_lock:s0
...
...
This diff is collapsed.
Click to expand it.
public/init.te
+
5
−
22
View file @
45b36259
...
@@ -211,7 +211,6 @@ allow init {
...
@@ -211,7 +211,6 @@ allow init {
-contextmount_type
-contextmount_type
-proc
-proc
-sdcard_type
-sdcard_type
-sysfs
-rootfs
-rootfs
}:file { open read setattr };
}:file { open read setattr };
allow init { fs_type -contextmount_type -sdcard_type -rootfs }:dir { open read setattr search };
allow init { fs_type -contextmount_type -sdcard_type -rootfs }:dir { open read setattr search };
...
@@ -293,24 +292,6 @@ allow init {
...
@@ -293,24 +292,6 @@ allow init {
proc_security
proc_security
}:file rw_file_perms;
}:file rw_file_perms;
# init access to /sys files.
allow init {
sysfs_android_usb
sysfs_leds
sysfs_power
sysfs_zram
}:file w_file_perms;
# init chmod/chown access to /sys files.
allow init {
sysfs_android_usb
sysfs_devices_system_cpu
sysfs_ipv4
sysfs_leds
sysfs_lowmemorykiller
sysfs_power
}:file setattr;
# Set usermodehelpers.
# Set usermodehelpers.
allow init { usermodehelper sysfs_usermodehelper }:file rw_file_perms;
allow init { usermodehelper sysfs_usermodehelper }:file rw_file_perms;
...
@@ -319,6 +300,11 @@ allow init self:global_capability_class_set net_admin;
...
@@ -319,6 +300,11 @@ allow init self:global_capability_class_set net_admin;
# Reboot.
# Reboot.
allow init self:global_capability_class_set sys_boot;
allow init self:global_capability_class_set sys_boot;
# Write to sysfs nodes.
allow init sysfs_type:dir r_dir_perms;
allow init sysfs_type:lnk_file read;
allow init sysfs_type:file rw_file_perms;
# Init will create /data/misc/logd when the property persist.logd.logpersistd is "logcatd".
# Init will create /data/misc/logd when the property persist.logd.logpersistd is "logcatd".
# Init will also walk through the directory as part of a recursive restorecon.
# Init will also walk through the directory as part of a recursive restorecon.
allow init misc_logd_file:dir { add_name open create read getattr setattr search write };
allow init misc_logd_file:dir { add_name open create read getattr setattr search write };
...
@@ -470,6 +456,3 @@ neverallow init servicemanager:service_manager list;
...
@@ -470,6 +456,3 @@ neverallow init servicemanager:service_manager list;
# Init should not be creating subdirectories in /data/local/tmp
# Init should not be creating subdirectories in /data/local/tmp
neverallow init shell_data_file:dir { write add_name remove_name };
neverallow init shell_data_file:dir { write add_name remove_name };
# Init should not access sysfs node that are not explicitly labeled.
neverallow init sysfs:file { open read write };
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