Commit bb2c744e authored by topjohnwu's avatar topjohnwu

Change the default file secontext

parent 873f14bb
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "magisk.h" #include "magisk.h"
#include "utils.h" #include "utils.h"
#include "su.h" #include "su.h"
#include "magiskpolicy.h"
int socket_create_temp(char *path, size_t len) { int socket_create_temp(char *path, size_t len) {
int fd; int fd;
...@@ -42,7 +43,7 @@ int socket_create_temp(char *path, size_t len) { ...@@ -42,7 +43,7 @@ int socket_create_temp(char *path, size_t len) {
xlisten(fd, 1); xlisten(fd, 1);
// Set attributes so requester can access it // Set attributes so requester can access it
setfilecon(path, "u:object_r:su_file:s0"); setfilecon(path, "u:object_r:"SEPOL_FILE_DOMAIN":s0");
chown(path, su_ctx->info->st.st_uid, su_ctx->info->st.st_gid); chown(path, su_ctx->info->st.st_uid, su_ctx->info->st.st_gid);
return fd; return fd;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment