mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-06-12 21:27:41 +02:00
Remove more pre SDK 21 stuffs
This commit is contained in:
@ -36,7 +36,6 @@ extern int (*fsetfilecon)(int fd, const char *con);
|
||||
void getfilecon_at(int dirfd, const char *name, char **con);
|
||||
void setfilecon_at(int dirfd, const char *name, const char *con);
|
||||
|
||||
void selinux_builtin_impl();
|
||||
void dload_selinux();
|
||||
void enable_selinux();
|
||||
void restorecon();
|
||||
void restore_tmpcon();
|
||||
|
@ -99,7 +99,7 @@ void setfilecon_at(int dirfd, const char *name, const char *con) {
|
||||
lsetfilecon(path, con);
|
||||
}
|
||||
|
||||
void selinux_builtin_impl() {
|
||||
void enable_selinux() {
|
||||
setcon = __setcon;
|
||||
getfilecon = __getfilecon;
|
||||
lgetfilecon = __lgetfilecon;
|
||||
@ -108,13 +108,3 @@ void selinux_builtin_impl() {
|
||||
lsetfilecon = __lsetfilecon;
|
||||
fsetfilecon = __fsetfilecon;
|
||||
}
|
||||
|
||||
void dload_selinux() {
|
||||
if (access("/system/lib/libselinux.so", F_OK) && access("/system/lib64/libselinux.so", F_OK))
|
||||
return;
|
||||
/* We only check whether libselinux.so exists but don't dlopen.
|
||||
* For some reason calling symbols returned from dlsym
|
||||
* will result to SEGV_ACCERR on some devices.
|
||||
* Always use builtin implementations for SELinux stuffs. */
|
||||
selinux_builtin_impl();
|
||||
}
|
||||
|
Reference in New Issue
Block a user