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 c0a86544d8
commit 088ce97697
6 changed files with 158 additions and 117 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