LDFL
LD_PRELOAD library rerule files & directories.
|
Structures of interest in ldfl.c. More...
Data Structures | |
struct | ldfl_rule_t |
Represents matching + operation rule. More... | |
struct | ldfl_setting_t |
Represents the general settings. More... | |
Macros | |
#define | ldfl_op_index(op) __builtin_ctzll(op) |
Typedefs | |
typedef void(* | ldfl_logger_t) (uint64_t mask, int priority, const char *fmt,...) |
Variadic logger function type. | |
Enumerations | |
enum | ldfl_path_type_t { LDFL_PATH_ORIG = 0 , LDFL_PATH_ABS = 1 } |
flag More... | |
enum | ldfl_log_category_t { LDFL_LOG_FN_CALL = 1ULL << 0 , LDFL_LOG_FN_CALL_ERR = 1ULL << 1 , LDFL_LOG_RULE_SEARCH = 1ULL << 2 , LDFL_LOG_RULE_FOUND = 1ULL << 3 , LDFL_LOG_RULE_APPLY = 1ULL << 4 , LDFL_LOG_INIT = 1ULL << 5 , LDFL_LOG_ALL = ~0ULL } |
Bitmask flags for specifying logging categories. More... | |
enum | ldfl_operation_t { LDFL_OP_NOOP = 1ULL << 0 , LDFL_OP_PATH_REDIR = 1ULL << 1 , LDFL_OP_EXEC_REDIR = 1ULL << 2 , LDFL_OP_MEM_OPEN = 1ULL << 3 , LDFL_OP_MEM_DATA = 1ULL << 4 , LDFL_OP_PERM , LDFL_OP_DENY = 1ULL << 6 , LDFL_OP_RO = 1ULL << 7 , LDFL_OP_END = 0ULL , LDFL_OP_ALL = ~0ULL } |
enum for the type of operations More... | |
Variables | |
const uint64_t | LDFL_OP_COMPAT_TABLE [] |
Compatibility mask table for LDFL operations. | |
Structures of interest in ldfl.c.
Defines the structure for a single rule entry.
#define ldfl_op_index | ( | op | ) | __builtin_ctzll(op) |
typedef void(* ldfl_logger_t) (uint64_t mask, int priority, const char *fmt,...) |
Variadic logger function type.
This function type is used for logging messages in ldfl. Implement this signature if you want your own logger
mask | Logging category bitmask (see ldfl_log_category_t). |
priority | Priority level of the log message. |
fmt | Format string for the log message (like sprintf). |
... | Variadic arguments for the format string. |
ldfl_dummy_logger
: A no-op logger that discards all messages.ldfl_stderr_logger
: Logs messages to standard error (stderr).ldfl_syslog_logger
: Logs messages to the system log (syslog). enum ldfl_log_category_t |
Bitmask flags for specifying logging categories.
This enumeration defines flags used to control the logging behavior of the ldfl. Each flag represents a specific category of operations to be logged, and they can be combined using bitwise OR operations.
enum ldfl_operation_t |
enum for the type of operations
enum ldfl_path_type_t |
const uint64_t LDFL_OP_COMPAT_TABLE[] |
Compatibility mask table for LDFL operations.
Indexed by ldfl_op_index(op), this table defines which operations are valid to combine with each LDFL operation.