56 lines
1.7 KiB
C
56 lines
1.7 KiB
C
![]() |
#ifndef KSU_SUSFS_DEF_H
|
||
|
#define KSU_SUSFS_DEF_H
|
||
|
|
||
|
#include <linux/bits.h>
|
||
|
|
||
|
/********/
|
||
|
/* ENUM */
|
||
|
/********/
|
||
|
/* shared with userspace ksu_susfs tool */
|
||
|
#define CMD_SUSFS_ADD_SUS_PATH 0x55550
|
||
|
#define CMD_SUSFS_ADD_SUS_MOUNT 0x55560
|
||
|
#define CMD_SUSFS_ADD_SUS_KSTAT 0x55570
|
||
|
#define CMD_SUSFS_UPDATE_SUS_KSTAT 0x55571
|
||
|
#define CMD_SUSFS_ADD_SUS_KSTAT_STATICALLY 0x55572
|
||
|
#define CMD_SUSFS_ADD_TRY_UMOUNT 0x55580
|
||
|
#define CMD_SUSFS_SET_UNAME 0x55590
|
||
|
#define CMD_SUSFS_ENABLE_LOG 0x555a0
|
||
|
#define CMD_SUSFS_SET_CMDLINE_OR_BOOTCONFIG 0x555b0
|
||
|
#define CMD_SUSFS_ADD_OPEN_REDIRECT 0x555c0
|
||
|
#define CMD_SUSFS_RUN_UMOUNT_FOR_CURRENT_MNT_NS 0x555d0
|
||
|
#define CMD_SUSFS_SHOW_VERSION 0x555e1
|
||
|
#define CMD_SUSFS_SHOW_ENABLED_FEATURES 0x555e2
|
||
|
#define CMD_SUSFS_SHOW_VARIANT 0x555e3
|
||
|
#define CMD_SUSFS_SHOW_SUS_SU_WORKING_MODE 0x555e4
|
||
|
#define CMD_SUSFS_IS_SUS_SU_READY 0x555f0
|
||
|
#define CMD_SUSFS_SUS_SU 0x60000
|
||
|
|
||
|
#define SUSFS_MAX_LEN_PATHNAME 256 // 256 should address many paths already unless you are doing some strange experimental stuff, then set your own desired length
|
||
|
#define SUSFS_FAKE_CMDLINE_OR_BOOTCONFIG_SIZE 4096
|
||
|
|
||
|
#define TRY_UMOUNT_DEFAULT 0
|
||
|
#define TRY_UMOUNT_DETACH 1
|
||
|
|
||
|
#define SUS_SU_DISABLED 0
|
||
|
#define SUS_SU_WITH_OVERLAY 1 /* deprecated */
|
||
|
#define SUS_SU_WITH_HOOKS 2
|
||
|
|
||
|
/*
|
||
|
* inode->i_state => storing flag 'INODE_STATE_'
|
||
|
* mount->mnt.susfs_orig_mnt_id => storing original mnt_id
|
||
|
* task_struct->susfs_last_fake_mnt_id => storing last valid fake mnt_id
|
||
|
* task_struct->susfs_task_state => storing flag 'TASK_STRUCT_KABI'
|
||
|
*/
|
||
|
|
||
|
#define INODE_STATE_SUS_PATH BIT(24)
|
||
|
#define INODE_STATE_SUS_MOUNT BIT(25)
|
||
|
#define INODE_STATE_SUS_KSTAT BIT(26)
|
||
|
#define INODE_STATE_OPEN_REDIRECT BIT(27)
|
||
|
|
||
|
#define TASK_STRUCT_NON_ROOT_USER_APP_PROC BIT(24)
|
||
|
|
||
|
#define MAGIC_MOUNT_WORKDIR "/debug_ramdisk/workdir"
|
||
|
|
||
|
|
||
|
#endif
|