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
797ba4fb
Commit
797ba4fb
authored
Dec 02, 2020
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure all logging ends with newline
parent
a848f10b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
8 deletions
+8
-8
bootstages.cpp
native/jni/core/bootstages.cpp
+1
-1
db.cpp
native/jni/core/db.cpp
+1
-1
socket.cpp
native/jni/core/socket.cpp
+1
-1
su_daemon.cpp
native/jni/su/su_daemon.cpp
+2
-2
stream.cpp
native/jni/utils/stream.cpp
+3
-3
No files found.
native/jni/core/bootstages.cpp
View file @
797ba4fb
...
@@ -61,7 +61,7 @@ static void mount_mirrors() {
...
@@ -61,7 +61,7 @@ static void mount_mirrors() {
char
buf1
[
4096
];
char
buf1
[
4096
];
char
buf2
[
4096
];
char
buf2
[
4096
];
LOGI
(
"* Mounting mirrors"
);
LOGI
(
"* Mounting mirrors
\n
"
);
parse_mnt
(
"/proc/mounts"
,
[
&
](
mntent
*
me
)
{
parse_mnt
(
"/proc/mounts"
,
[
&
](
mntent
*
me
)
{
struct
stat
st
;
struct
stat
st
;
...
...
native/jni/core/db.cpp
View file @
797ba4fb
...
@@ -359,7 +359,7 @@ bool validate_manager(string &pkg, int userid, struct stat *st) {
...
@@ -359,7 +359,7 @@ bool validate_manager(string &pkg, int userid, struct stat *st) {
// Check the official package name
// Check the official package name
sprintf
(
app_path
,
"%s/%d/"
JAVA_PACKAGE_NAME
,
APP_DATA_DIR
,
userid
);
sprintf
(
app_path
,
"%s/%d/"
JAVA_PACKAGE_NAME
,
APP_DATA_DIR
,
userid
);
if
(
stat
(
app_path
,
st
))
{
if
(
stat
(
app_path
,
st
))
{
LOGE
(
"su: cannot find manager"
);
LOGE
(
"su: cannot find manager
\n
"
);
memset
(
st
,
0
,
sizeof
(
*
st
));
memset
(
st
,
0
,
sizeof
(
*
st
));
pkg
.
clear
();
pkg
.
clear
();
return
false
;
return
false
;
...
...
native/jni/core/socket.cpp
View file @
797ba4fb
...
@@ -82,7 +82,7 @@ int recv_fd(int sockfd) {
...
@@ -82,7 +82,7 @@ int recv_fd(int sockfd) {
cmsg
->
cmsg_level
!=
SOL_SOCKET
||
cmsg
->
cmsg_level
!=
SOL_SOCKET
||
cmsg
->
cmsg_type
!=
SCM_RIGHTS
)
{
cmsg
->
cmsg_type
!=
SCM_RIGHTS
)
{
error:
error:
LOGE
(
"unable to read fd"
);
LOGE
(
"unable to read fd
\n
"
);
exit
(
-
1
);
exit
(
-
1
);
}
}
...
...
native/jni/su/su_daemon.cpp
View file @
797ba4fb
...
@@ -185,7 +185,7 @@ void su_daemon_handler(int client, struct ucred *credential) {
...
@@ -185,7 +185,7 @@ void su_daemon_handler(int client, struct ucred *credential) {
// Fail fast
// Fail fast
if
(
ctx
.
info
->
access
.
policy
==
DENY
)
{
if
(
ctx
.
info
->
access
.
policy
==
DENY
)
{
LOGW
(
"su: request rejected (%u)"
,
ctx
.
info
->
uid
);
LOGW
(
"su: request rejected (%u)
\n
"
,
ctx
.
info
->
uid
);
ctx
.
info
.
reset
();
ctx
.
info
.
reset
();
write_int
(
client
,
DENY
);
write_int
(
client
,
DENY
);
close
(
client
);
close
(
client
);
...
@@ -244,7 +244,7 @@ void su_daemon_handler(int client, struct ucred *credential) {
...
@@ -244,7 +244,7 @@ void su_daemon_handler(int client, struct ucred *credential) {
// If caller is not root, ensure the owner of pts_slave is the caller
// If caller is not root, ensure the owner of pts_slave is the caller
if
(
st
.
st_uid
!=
ctx
.
info
->
uid
&&
ctx
.
info
->
uid
!=
0
)
if
(
st
.
st_uid
!=
ctx
.
info
->
uid
&&
ctx
.
info
->
uid
!=
0
)
LOGE
(
"su: Wrong permission of pts_slave"
);
LOGE
(
"su: Wrong permission of pts_slave
\n
"
);
// Opening the TTY has to occur after the
// Opening the TTY has to occur after the
// fork() and setsid() so that it becomes
// fork() and setsid() so that it becomes
...
...
native/jni/utils/stream.cpp
View file @
797ba4fb
...
@@ -29,17 +29,17 @@ sFILE make_stream_fp(stream_ptr &&strm) {
...
@@ -29,17 +29,17 @@ sFILE make_stream_fp(stream_ptr &&strm) {
}
}
int
stream
::
read
(
void
*
buf
,
size_t
len
)
{
int
stream
::
read
(
void
*
buf
,
size_t
len
)
{
LOGE
(
"This stream does not support read"
);
LOGE
(
"This stream does not support read
\n
"
);
return
-
1
;
return
-
1
;
}
}
int
stream
::
write
(
const
void
*
buf
,
size_t
len
)
{
int
stream
::
write
(
const
void
*
buf
,
size_t
len
)
{
LOGE
(
"This stream does not support write"
);
LOGE
(
"This stream does not support write
\n
"
);
return
-
1
;
return
-
1
;
}
}
off_t
stream
::
seek
(
off_t
off
,
int
whence
)
{
off_t
stream
::
seek
(
off_t
off
,
int
whence
)
{
LOGE
(
"This stream does not support seek"
);
LOGE
(
"This stream does not support seek
\n
"
);
return
-
1
;
return
-
1
;
}
}
...
...
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