shell bypass 403

Cubjrnet7 Shell


name : lsm_common.h
/**
@file     lsm_common.h
@brief    LSM based hooks
@details  Copyright (c) 2024 Acronis International GmbH
@author   Bruce Wang ([email protected])
@since    $Id: $
*/

#pragma once

#include "debug.h"

// #define APL_LSM_DEBUG

#ifdef APL_LSM_DEBUG
#define print_address_symbol(addr) IPRINTF("[%s]: %p->%pS", #addr, (void *)addr, (void *)addr);
#define print_hooks(security_hook_heads_addr, hook_name)                            \
    {                                                                               \
        struct security_hook_list *hook_node;                                       \
        rcu_read_lock();                                                            \
        hlist_for_each_entry(hook_node, &security_hook_heads_addr->hook_name, list) \
        {                                                                           \
            print_address_symbol(hook_node->hook.hook_name);                        \
        }                                                                           \
        rcu_read_unlock();                                                          \
    }
#else
#define print_address_symbol(addr)
#define print_hooks(hook_list, hook_name)
#endif

bool syscall_replaced_by_lsm(int syscall_nr, bool ia32);
int lsm_hooks_init(void);
void lsm_hooks_exit(void);
uint64_t wanted_fsnotify_events(void);
bool lsm_registered(void);
bool lsm_has_open(void);
bool lsm_has_security_path(void);
bool lsm_has_complex_post(void);

int register_lsm_pre_events(void);
void unregister_lsm_pre_events(void);

© 2025 Cubjrnet7