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
79eb5b2e
Commit
79eb5b2e
authored
Jun 13, 2018
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename entry
parent
f0533fca
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
activity.c
activity.c
+3
-3
su_daemon.c
su_daemon.c
+2
-2
No files found.
activity.c
View file @
79eb5b2e
...
@@ -74,7 +74,7 @@ void app_send_result(struct su_context *ctx, policy_t policy) {
...
@@ -74,7 +74,7 @@ void app_send_result(struct su_context *ctx, policy_t policy) {
int
notify
=
setup_user
(
ctx
,
user
);
int
notify
=
setup_user
(
ctx
,
user
);
char
activity
[
128
];
char
activity
[
128
];
sprintf
(
activity
,
ACTION_RESULT
,
ctx
->
info
->
str
.
s
[
SU_
REQUEST
ER
]);
sprintf
(
activity
,
ACTION_RESULT
,
ctx
->
info
->
str
.
s
[
SU_
MANAG
ER
]);
// Send notice to manager, enable logging
// Send notice to manager, enable logging
char
*
result_command
[]
=
{
char
*
result_command
[]
=
{
...
@@ -113,7 +113,7 @@ void app_send_request(struct su_context *ctx) {
...
@@ -113,7 +113,7 @@ void app_send_request(struct su_context *ctx) {
int
notify
=
setup_user
(
ctx
,
user
);
int
notify
=
setup_user
(
ctx
,
user
);
char
activity
[
128
];
char
activity
[
128
];
sprintf
(
activity
,
ACTION_REQUEST
,
ctx
->
info
->
str
.
s
[
SU_
REQUEST
ER
]);
sprintf
(
activity
,
ACTION_REQUEST
,
ctx
->
info
->
str
.
s
[
SU_
MANAG
ER
]);
char
*
request_command
[]
=
{
char
*
request_command
[]
=
{
AM_PATH
,
"start"
,
"-n"
,
AM_PATH
,
"start"
,
"-n"
,
...
@@ -128,7 +128,7 @@ void app_send_request(struct su_context *ctx) {
...
@@ -128,7 +128,7 @@ void app_send_request(struct su_context *ctx) {
// Send notice to user to tell them root is managed by owner
// Send notice to user to tell them root is managed by owner
if
(
notify
)
{
if
(
notify
)
{
sprintf
(
user
,
"%d"
,
notify
);
sprintf
(
user
,
"%d"
,
notify
);
sprintf
(
activity
,
ACTION_RESULT
,
ctx
->
info
->
str
.
s
[
SU_
REQUEST
ER
]);
sprintf
(
activity
,
ACTION_RESULT
,
ctx
->
info
->
str
.
s
[
SU_
MANAG
ER
]);
char
*
notify_command
[]
=
{
char
*
notify_command
[]
=
{
AM_PATH
,
"broadcast"
,
"-n"
,
AM_PATH
,
"broadcast"
,
"-n"
,
activity
,
activity
,
...
...
su_daemon.c
View file @
79eb5b2e
...
@@ -106,7 +106,7 @@ static void database_check(struct su_info *info) {
...
@@ -106,7 +106,7 @@ static void database_check(struct su_info *info) {
// We need to check our manager
// We need to check our manager
if
(
info
->
access
.
log
||
info
->
access
.
notify
)
if
(
info
->
access
.
log
||
info
->
access
.
notify
)
validate_manager
(
info
->
str
.
s
[
SU_
REQUEST
ER
],
uid
/
100000
,
&
info
->
manager_stat
);
validate_manager
(
info
->
str
.
s
[
SU_
MANAG
ER
],
uid
/
100000
,
&
info
->
manager_stat
);
}
}
static
struct
su_info
*
get_su_info
(
unsigned
uid
)
{
static
struct
su_info
*
get_su_info
(
unsigned
uid
)
{
...
@@ -191,7 +191,7 @@ static struct su_info *get_su_info(unsigned uid) {
...
@@ -191,7 +191,7 @@ static struct su_info *get_su_info(unsigned uid) {
info
->
access
=
SILENT_SU_ACCESS
;
info
->
access
=
SILENT_SU_ACCESS
;
// If still not determined, check if manager exists
// If still not determined, check if manager exists
if
(
info
->
access
.
policy
==
QUERY
&&
info
->
str
.
s
[
SU_
REQUEST
ER
][
0
]
==
'\0'
)
if
(
info
->
access
.
policy
==
QUERY
&&
info
->
str
.
s
[
SU_
MANAG
ER
][
0
]
==
'\0'
)
info
->
access
=
NO_SU_ACCESS
;
info
->
access
=
NO_SU_ACCESS
;
}
}
return
info
;
return
info
;
...
...
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