mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-22 23:26:42 -08:00
Some code adjustments
This commit is contained in:
@@ -24,22 +24,6 @@ unsigned get_shell_uid() {
|
||||
return ppwd->pw_uid;
|
||||
}
|
||||
|
||||
unsigned get_system_uid() {
|
||||
struct passwd* ppwd = getpwnam("system");
|
||||
if (nullptr == ppwd)
|
||||
return 1000;
|
||||
|
||||
return ppwd->pw_uid;
|
||||
}
|
||||
|
||||
unsigned get_radio_uid() {
|
||||
struct passwd* ppwd = getpwnam("radio");
|
||||
if (nullptr == ppwd)
|
||||
return 1001;
|
||||
|
||||
return ppwd->pw_uid;
|
||||
}
|
||||
|
||||
int fork_dont_care() {
|
||||
int pid = xfork();
|
||||
if (pid) {
|
||||
@@ -163,10 +147,6 @@ ssize_t __getline(char **lineptr, size_t *n, FILE *stream) {
|
||||
return __getdelim(lineptr, n, '\n', stream);
|
||||
}
|
||||
|
||||
int __fsetxattr(int fd, const char *name, const void *value, size_t size, int flags) {
|
||||
return (int) syscall(__NR_fsetxattr, fd, name, value, size, flags);
|
||||
}
|
||||
|
||||
int exec_command(exec_t &exec) {
|
||||
int pipefd[2] = {-1, -1}, outfd = -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user