Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
c69dc0f0
Commit
c69dc0f0
authored
May 13, 2018
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update rules
parent
c6947761
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
rules.c
rules.c
+13
-11
No files found.
rules.c
View file @
c69dc0f0
...
...
@@ -16,6 +16,17 @@ void allowSuClient(char *target) {
sepol_allow
(
target
,
SEPOL_FILE_DOMAIN
,
"sock_file"
,
"write"
);
sepol_allow
(
target
,
SEPOL_FILE_DOMAIN
,
"file"
,
ALL
);
sepol_allow
(
target
,
SEPOL_FILE_DOMAIN
,
"dir"
,
ALL
);
// Fix several terminal apps running root shell
if
(
policydb
->
policyvers
>=
POLICYDB_VERSION_XPERMS_IOCTL
)
{
sepol_allowxperm
(
target
,
"devpts"
,
"chr_file"
,
"0x5400-0x54FF"
);
if
(
sepol_exists
(
"untrusted_app_devpts"
))
sepol_allowxperm
(
target
,
"untrusted_app_devpts"
,
"chr_file"
,
"0x5400-0x54FF"
);
if
(
sepol_exists
(
"untrusted_app_25_devpts"
))
sepol_allowxperm
(
target
,
"untrusted_app_25_devpts"
,
"chr_file"
,
"0x5400-0x54FF"
);
if
(
sepol_exists
(
"untrusted_app_all_devpts"
))
sepol_allowxperm
(
target
,
"untrusted_app_all_devpts"
,
"chr_file"
,
"0x5400-0x54FF"
);
}
}
void
suRights
()
{
...
...
@@ -110,10 +121,10 @@ void sepol_magisk_rules() {
// Allow these client to access su
allowSuClient
(
"init"
);
allowSuClient
(
"shell"
);
allowSuClient
(
"untrusted_app"
);
allowSuClient
(
"system_app"
);
allowSuClient
(
"platform_app"
);
allowSuClient
(
"priv_app"
);
allowSuClient
(
"platform_app"
);
allowSuClient
(
"untrusted_app"
);
allowSuClient
(
"untrusted_app_25"
);
allowSuClient
(
"untrusted_app_27"
);
...
...
@@ -146,13 +157,4 @@ void sepol_magisk_rules() {
// Xposed
sepol_allow
(
"untrusted_app"
,
"untrusted_app"
,
"capability"
,
"setgid"
);
sepol_allow
(
"system_server"
,
"dex2oat_exec"
,
"file"
,
ALL
);
// xperms
if
(
policydb
->
policyvers
>=
POLICYDB_VERSION_XPERMS_IOCTL
)
{
sepol_allowxperm
(
"domain"
,
"devpts"
,
"chr_file"
,
"0x5400-0x54FF"
);
if
(
sepol_exists
(
"untrusted_app_25_devpts"
))
sepol_allowxperm
(
"domain"
,
"untrusted_app_25_devpts"
,
"chr_file"
,
"0x5400-0x54FF"
);
if
(
sepol_exists
(
"untrusted_app_devpts"
))
sepol_allowxperm
(
"domain"
,
"untrusted_app_devpts"
,
"chr_file"
,
"0x5400-0x54FF"
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment