Change the default file secontext
This commit is contained in:
parent
873f14bbe0
commit
bb2c744ec0
@ -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) {
|
|||||||
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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user