- Telemetry config directory: must be created under per-user config home.
- Server fifo directory: must enforce 0700, same-owner, no group/other write.
- Pid file creation: must use 0600 permissions.
- Directory creation uses
mkdir+statchecks; no symlink-follow for directory target is performed, but the directory is user-controlled ($XDG_RUNTIME_DIRor/var/run). - The code fails fast (
LOG(FATAL)) if directory has wrong owner or group/other write bits, which prevents cross-user manipulation. - For full symlink-race hardening, an
O_NOFOLLOWapproach orfstatafteropencould be added, but current behavior removes predictable shared paths.
- Low: paths are per-user, not shared /tmp.
- Remaining hardening: add
fstatverification after opening pid file; addlstatbefore connecting to fifo to reject symlinks.