kernel: Remove prctl; use netlink communication to control manual_su

This commit is contained in:
ShirkNeko
2025-11-05 03:53:54 +08:00
parent ab3ff2699c
commit 766b6d2c76
6 changed files with 152 additions and 48 deletions

23
kernel/ksu_netlink.h Normal file
View File

@@ -0,0 +1,23 @@
#ifndef __KSU_NETLINK_H
#define __KSU_NETLINK_H
#include <linux/netlink.h>
#include <linux/skbuff.h>
#include <net/sock.h>
#define KSU_NETLINK_PROTOCOL 2
#define KSU_NETLINK_CMD_MANUAL_SU 50
struct ksu_netlink_msg {
int cmd;
int option;
uid_t target_uid;
pid_t target_pid;
char token_buffer[33];
int result;
};
int ksu_netlink_init(void);
void ksu_netlink_exit(void);
#endif