Prune unused UIDs from su policies

This commit is contained in:
topjohnwu
2022-05-18 01:55:58 -07:00
parent e11508f84d
commit 975b1a5e36
12 changed files with 165 additions and 80 deletions

View File

@@ -205,7 +205,7 @@ int app_request(const su_context &ctx) {
strcpy(fifo, "/dev/socket/");
gen_rand_str(fifo + 12, 32, true);
mkfifo(fifo, 0600);
chown(fifo, ctx.info->mgr_st.st_uid, ctx.info->mgr_st.st_gid);
chown(fifo, ctx.info->mgr_uid, ctx.info->mgr_uid);
setfilecon(fifo, "u:object_r:" SEPOL_FILE_TYPE ":s0");
// Send request