Commit Graph

10 Commits

Author SHA1 Message Date
Alexey 6fa8da3c43 Daemon stdio ownership and cover runtime path policies fixed
Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
2026-09-30 07:40:01 +03:00
Alexey 53f131e34d Runtime Paths Checks as opt-in #935
Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
2026-09-29 19:24:29 +03:00
Alexey 844e41ea34 Races in admission + accounting + publication,+ PID fixed 2026-09-09 22:45:02 +03:00
Alexey 44485a545e Fixes for unused imports 2026-04-17 11:06:42 +03:00
Alexey 17a966b822 Rustfmt 2026-04-17 10:48:01 +03:00
astronaut808 f5b5ea3bbf Improve FakeTLS server-flight fidelity and macOS portability 2026-04-15 19:35:09 +05:00
Alexey d848e4a729 Fixes for test + Rustfmt 2026-04-06 16:12:46 +03:00
Alexey fa4e2000a8 Privileges fix
Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
2026-04-06 11:10:41 +03:00
Alexey b8cf596e7d Admission-timeouts + Global Each TCP Connections
Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
2026-03-31 11:14:55 +03:00
Vladimir Krivopalov 2ea7813ed4 Add Unix daemon mode with PID file and privilege dropping
Implement core daemon infrastructure for running telemt as a background
  service on Unix platforms (Linux, FreeBSD, etc.):

  - Add src/daemon module with classic double-fork daemonization
  - Implement flock-based PID file management to prevent duplicate instances
  - Add privilege dropping (setuid/setgid) after socket binding
  - New CLI flags: --daemon, --foreground, --pid-file, --run-as-user,
    --run-as-group, --working-dir

  Daemonization occurs before tokio runtime starts to ensure clean fork.
  PID file uses exclusive locking to detect already-running instances.
  Privilege dropping happens after bind_listeners() to allow binding
  to privileged ports (< 1024) before switching to unprivileged user.

Signed-off-by: Vladimir Krivopalov <argenet@yandex.ru>
2026-03-21 21:09:29 +02:00