From 20cb29c2f8c5c87bc590896854a20b1473ceb358 Mon Sep 17 00:00:00 2001 From: "info@mode42.com" Date: Sat, 8 Aug 2026 03:54:55 +0000 Subject: #2 --- include/hybbx/security.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 include/hybbx/security.h (limited to 'include/hybbx/security.h') diff --git a/include/hybbx/security.h b/include/hybbx/security.h new file mode 100644 index 0000000..f4a9476 --- /dev/null +++ b/include/hybbx/security.h @@ -0,0 +1,31 @@ +#ifndef HYBBX_SECURITY_H +#define HYBBX_SECURITY_H + +#include "hybbx/types.h" + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct hybbx_config; + +/** Log file name under the configured logs directory. */ +#define HYBBX_SECURITY_LOG_FILE "security.log" + +void hybbx_security_log_config_apply(const struct hybbx_config *config); +void hybbx_security_log_shutdown(void); + +/** Append one line to security.log (timestamp added). Always enabled when the log directory is available. */ +void hybbx_security_log_write(const char *fmt, ...) + __attribute__((format(printf, 1, 2))); + +/** Absolute path to security.log when the security log is ready. */ +hybbx_result_t hybbx_security_log_current_path(char *out, size_t out_len); + +#ifdef __cplusplus +} +#endif + +#endif /* HYBBX_SECURITY_H */ -- cgit v1.3.1