mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-10-16 16:42:13 +00:00
Dynamic load libselinux
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
#include <dirent.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/wait.h>
|
||||
#include <selinux/selinux.h>
|
||||
|
||||
#include "magisk.h"
|
||||
#include "db.h"
|
||||
@@ -21,7 +20,7 @@
|
||||
#include "img.h"
|
||||
#include "daemon.h"
|
||||
#include "resetprop.h"
|
||||
#include "magiskpolicy.h"
|
||||
#include "selinux.h"
|
||||
|
||||
static char buf[PATH_MAX], buf2[PATH_MAX];
|
||||
static struct vector module_list;
|
||||
|
@@ -13,13 +13,12 @@
|
||||
#include <sys/un.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#include <selinux/selinux.h>
|
||||
|
||||
#include "magisk.h"
|
||||
#include "utils.h"
|
||||
#include "daemon.h"
|
||||
#include "resetprop.h"
|
||||
#include "magiskpolicy.h"
|
||||
#include "selinux.h"
|
||||
|
||||
int setup_done = 0;
|
||||
int seperate_vendor = 0;
|
||||
|
@@ -9,6 +9,7 @@
|
||||
#include "utils.h"
|
||||
#include "magisk.h"
|
||||
#include "daemon.h"
|
||||
#include "selinux.h"
|
||||
|
||||
char *argv0;
|
||||
|
||||
@@ -134,6 +135,8 @@ int magisk_main(int argc, char *argv[]) {
|
||||
int main(int argc, char *argv[]) {
|
||||
umask(0);
|
||||
argv0 = argv[0];
|
||||
setup_selinux();
|
||||
|
||||
if (strcmp(basename(argv0), "magisk.bin") == 0) {
|
||||
if (argc >= 2) {
|
||||
// It's calling applets
|
||||
|
@@ -43,7 +43,6 @@
|
||||
|
||||
#include "magiskrc.h"
|
||||
#include "utils.h"
|
||||
#include "magiskpolicy.h"
|
||||
#include "daemon.h"
|
||||
#include "magisk.h"
|
||||
|
||||
|
Reference in New Issue
Block a user