Reapply "kernel: expose umount list to ioctl interface #2950"

This reverts commit 088996da9b.
This commit is contained in:
ShirkNeko
2025-11-20 20:07:59 +08:00
parent cc78812f50
commit 8250c0ecc2
48 changed files with 257 additions and 271 deletions

View File

@@ -2,13 +2,24 @@
#define __KSU_H_KERNEL_UMOUNT
#include <linux/types.h>
#include <linux/list.h>
#include <linux/rwsem.h>
void ksu_kernel_umount_init(void);
void ksu_kernel_umount_exit(void);
void try_umount(const char *mnt, bool check_mnt, int flags);
void try_umount(const char *mnt, int flags);
// Handler function to be called from setresuid hook
int ksu_handle_umount(uid_t old_uid, uid_t new_uid);
#endif
// for the umount list
struct mount_entry {
char *umountable;
unsigned int flags;
struct list_head list;
};
extern struct list_head mount_list;
extern struct rw_semaphore mount_list_lock;
#endif