Co-authored-by: simonpunk <simonpunk2016@gmail.com> Co-authored-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
41 lines
873 B
C
41 lines
873 B
C
#ifndef __KSU_H_KSUD
|
|
#define __KSU_H_KSUD
|
|
|
|
#include <linux/types.h>
|
|
|
|
#define KSUD_PATH "/data/adb/ksud"
|
|
|
|
void ksu_ksud_init();
|
|
void ksu_ksud_exit();
|
|
|
|
void on_post_fs_data(void);
|
|
void on_module_mounted(void);
|
|
void on_boot_completed(void);
|
|
|
|
bool ksu_is_safe_mode(void);
|
|
|
|
extern u32 ksu_file_sid;
|
|
extern bool ksu_module_mounted;
|
|
extern bool ksu_boot_completed;
|
|
|
|
#ifdef CONFIG_KSU_SUSFS
|
|
#define MAX_ARG_STRINGS 0x7FFFFFFF
|
|
struct user_arg_ptr {
|
|
#ifdef CONFIG_COMPAT
|
|
bool is_compat;
|
|
#endif
|
|
union {
|
|
const char __user *const __user *native;
|
|
#ifdef CONFIG_COMPAT
|
|
const compat_uptr_t __user *compat;
|
|
#endif
|
|
} ptr;
|
|
};
|
|
|
|
int ksu_handle_execveat_ksud(int *fd, struct filename **filename_ptr,
|
|
struct user_arg_ptr *argv,
|
|
struct user_arg_ptr *envp, int *flags);
|
|
#endif // #ifdef CONFIG_KSU_SUSFS
|
|
|
|
#endif
|