shell bypass 403
/** @file @brief File system events messages @details Copyright (c) 2017-2021 Acronis International GmbH @author Mikhail Krivtsov ([email protected]) @since $Id: $ */ #pragma once #include <linux/fs.h> // struct file #include <linux/path.h> // struct path #include <linux/types.h> // [u]int(8|16|32|64)_t, pid_t #include "compat.h" #include "message.h" #include "transport_protocol.h" #include "file_contexts.h" #include "task_info_map.h" // Generates async FP_SI_OT_NOTIFY_FILE_CREATE void fs_event_create(task_info_t* task, const struct path *path); // Generates sync+async FP_SI_OT_*_FILE_PRE_OPEN long fs_event_pre_open(task_info_t* task, unsigned int flags, const struct path *path, const file_context_msg_info_t *info); // Generates sync+async FP_SI_OT_*_FILE_PRE_MMAP long fs_event_pre_mmap(task_info_t* task, unsigned int fflags, const struct path *path, unsigned long reqprot, unsigned long prot, unsigned long mmap_flags); // Generates sync+async FP_SI_OT_*_FILE_PRE_CLOSE void fs_event_pre_close(task_info_t* task, unsigned int flags, const struct path *path); // Generates sync FP_SI_OT_SYNC_FILE_PRE_WRITE long fs_event_pre_write(task_info_t* task, unsigned int f_flags, loff_t offset, size_t count, const struct path *path, const file_context_msg_info_t *info); // Generates async FP_SI_OT_NOTIFY_FILE_FULL_READ void fs_event_pre_full_read(task_info_t* task, const file_key_t* key, unsigned int f_flags, loff_t offset, size_t count); // Generates sync+async FP_SI_OT_*_FILE_PRE_RENAME long fs_event_pre_rename(task_info_t *task, unsigned int flags, const struct path *oldpath, const struct path *newpath, bool target_exists); // Generates sync+async FP_SI_OT_*_FILE_PRE_LINK long fs_event_pre_link(task_info_t *task, const struct path *oldpath, const struct path *newpath); // Generates sync+async FP_SI_OT_*_FILE_PRE_TRUNCATE long fs_event_pre_truncate(task_info_t *task, const struct path *path); // Generates async FP_SI_OT_NOTIFY_FILE_CHMOD void fs_event_pre_chmod(task_info_t *task, const struct path *path, umode_t mode); // Generates async FP_SI_OT_NOTIFY_FILE_CHOWN void fs_event_pre_chown(task_info_t *task, const struct path *path, uid_t uid, gid_t gid); // Used only for replaying message in post-rename from syscall hooks // Pass NULL in 'path' if target/new path existed // Generates sync FP_SI_OT_SYNC_FILE_RENAME and async FP_SI_OT_NOTIFY_FSNOTIFY_RENAME w/ extra fields for target void fs_event_rename(task_info_t *task, const struct path *path, bool is_newpath_ok); // Generates sync+async FP_SI_OT_*_FILE_PRE_UNLINK long fs_event_pre_unlink(task_info_t* task, const struct path *path); void fs_event_fsnotify(task_info_t *task, const file_key_t* key, uint64_t flags, msg_type_t type, uint64_t subtype); void fs_event_fsnotify_mkdir(task_info_t *task_info , const struct inode* inode , struct dentry* dentry , const void* dentry_name_ptr , uint64_t flags , msg_type_t type , uint64_t subtype); void fs_event_failed_lookup_nowait(task_info_t* task, const char* path); // !!! Mind that 'path' refers to the negative dentry, 'dir' refers to the parent directory and not negative void fs_event_mkdir(task_info_t* task, const struct path *path, umode_t mode); // Currently 'to' cannot be negative dentry but technically it is a good idea to assume that it can be void fs_event_pre_copyfile(task_info_t* task, const struct path *from, const struct path *to);