| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Fix the issue of missing security compilation options | 16 天前 | |
Fix partial send/recv/write in socket communication On stream sockets (AF_UNIX, SOCK_STREAM), send(), recv() and write() may return fewer bytes than requested in a single call. The existing code assumed these calls always complete in one invocation, which can cause incomplete message transmission and lead to service anomalies. Add helper functions that loop until all data is fully transferred: - Python: recv_all() in syssentry/utils.py — loops recv() until exactly the requested number of bytes is received - C: SendAll(),RecvAll() and WriteAll() in src/libsentry/c/io/io_utils.c — loops send/write/recv with EINTR/EAGAIN handling until all data is transferred Update all stream socket communication points to use these helpers: - sentryctl: send() → sendall(), recv() → recv_all() - syssentry.py: server_recv() and server_result_recv() recv() → recv_all(), send() → sendall() - heartbeat.py: recv() → recv_all() - result.py: recv() → recv_all() (sendall was already used) - libxalarm C: alarm_recv(), cpu_alarm_Report(), send_data_to_socket(), send_event_message(), xalarm_get_event() all updated to use the new _all helpers DGRAM socket operations (sendto in xalarm_Report and xalarm_report_event) are not changed since DGRAM sends messages atomically — partial sends do not occur. Co-Authored-By: Claude <noreply@anthropic.com> | 8 小时前 | |
verify event switch state by reading proc file before skipping re-open Previously, register_client_events only checked the in-memory enabled_events set to decide whether to skip opening an event switch. This could lead to stale state where the event appears enabled in memory but the actual proc file switch is not 'on' (e.g. after the sentry driver was unloaded/reloaded due to sysSentry restart). This commit adds: - read_proc_file() and get_sentry_reporter_proc()/get_remote_reporter_proc() in sentry_proc.py to read proc file values, mirroring the existing write functions - check_event_switch_is_on() in xalarm_events.py that reads the actual proc file to verify the event switch is truly 'on', rather than relying solely on the in-memory enabled_events set - Updated register_client_events to verify the real proc state: even when event_id is in enabled_events, if the proc switch is not actually 'on', it will re-open the event Co-Authored-By: Claude <noreply@anthropic.com> | 27 天前 | |
refactor the makefile file to adapt new directory Signed-off-by: zhuofeng <1107893276@qq.com> | 1 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 16 天前 | ||
| 8 小时前 | ||
| 27 天前 | ||
| 1 年前 |