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
956aba8f
Commit
956aba8f
authored
6 years ago
by
Alan Stokes
Committed by
Android (Google) Code Review
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Installd doesn't need to create cgroup files." into pi-dev
parents
404bd982
8e8c1093
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
private/init.te
+0
-10
0 additions, 10 deletions
private/init.te
private/zygote.te
+0
-5
0 additions, 5 deletions
private/zygote.te
public/domain.te
+7
-7
7 additions, 7 deletions
public/domain.te
public/init.te
+0
-5
0 additions, 5 deletions
public/init.te
public/installd.te
+0
-1
0 additions, 1 deletion
public/installd.te
with
7 additions
and
28 deletions
private/init.te
+
0
−
10
View file @
956aba8f
...
...
@@ -20,13 +20,3 @@ domain_trans(init, { rootfs toolbox_exec }, modprobe)
userdebug_or_eng(`
domain_auto_trans(init, logcat_exec, logpersist)
')
# Creating files on sysfs is impossible so this isn't a threat
# Sometimes we have to write to non-existent files to avoid conditional
# init behavior. See b/35303861 for an example.
dontaudit init sysfs:dir write;
# Suppress false positives when using O_CREAT
# to open a file that already exists.
# There's a neverallow rule for this in domain.te
dontaudit init cgroup:file create;
This diff is collapsed.
Click to expand it.
private/zygote.te
+
0
−
5
View file @
956aba8f
...
...
@@ -134,8 +134,3 @@ neverallow zygote {
# Do not allow access to Bluetooth-related system properties and files
neverallow zygote bluetooth_prop:file create_file_perms;
# Suppress false positives when using O_CREAT
# to open a file that already exists.
# There's a neverallow rule for this in domain.te
dontaudit zygote cgroup:file create;
This diff is collapsed.
Click to expand it.
public/domain.te
+
7
−
7
View file @
956aba8f
...
...
@@ -1329,23 +1329,23 @@ neverallow {
} self:capability dac_override;
neverallow { domain -traced_probes } self:capability dac_read_search;
# If an already existing file is opened with O_CREAT
E
, the kernel might generate
# If an already existing file is opened with O_CREAT, the kernel might generate
# a false report of a create denial. Silence these denials and make sure that
# inappropriate permissions are not granted.
# These filesystems don't allow files or directories to be created, so the permission
# to do so should never be granted.
neverallow domain {
proc_type
sysfs_type
}:dir { add_name create link remove_name rename reparent rmdir write };
# cgroupfs directories can be created, but not files within them
# TODO(b/74182216): Remove the installd allow when we're sure it's not used
neverallow {
domain
-installd
} cgroup:file create;
# cgroupfs directories can be created, but not files within them.
neverallow domain cgroup:file create;
dontaudit domain proc_type:dir write;
dontaudit domain sysfs_type:dir write;
dontaudit domain cgroup:file create;
# These are only needed in permissive mode - in enforcing mode the
# directory write check fails and so these are never attempted.
...
...
This diff is collapsed.
Click to expand it.
public/init.te
+
0
−
5
View file @
956aba8f
...
...
@@ -326,11 +326,6 @@ allow init {
# Allow init to write to vibrator/trigger
allow init sysfs_vibrator:file w_file_perms;
# Creating files on sysfs is impossible so this isn't a threat.
# We may write to a non-existent file to avoid conditional
# init behavior.
dontaudit init sysfs_vibrator:dir write;
# init chmod/chown access to /sys files.
allow init {
sysfs_android_usb
...
...
This diff is collapsed.
Click to expand it.
public/installd.te
+
0
−
1
View file @
956aba8f
...
...
@@ -19,7 +19,6 @@ allow installd apk_tmp_file:dir { relabelfrom create_dir_perms };
allow installd oemfs:dir r_dir_perms;
allow installd oemfs:file r_file_perms;
allow installd cgroup:dir create_dir_perms;
allow installd cgroup:{ file lnk_file } create_file_perms;
allow installd mnt_expand_file:dir { search getattr };
# Check validity of SELinux context before use.
selinux_check_context(installd)
...
...
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