Skip to content

Preserve owned PID locks during status checks - #1184

Merged
matteius merged 3 commits into
mainfrom
ai-findings-autofix/src-core-daemon.c
Nov 26, 2026
Merged

matteius merged 3 commits into
mainfrom
ai-findings-autofix/src-core-daemon.c

Conversation

@matteius

@matteius matteius commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Finding addressed

Check the retained PID descriptor before opening a status path, including when that path has acquired a hardlink alias. If this process owns a PID lock but the queried path no longer identifies its inode, fail closed without opening and closing another descriptor that could release the process-scoped lock.

Verification

Built lightnvr and test_config; all 81 config tests passed, including an extended hardlink-alias PID-lock regression case.

matteius and others added 2 commits November 26, 2026 03:45
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@matteius matteius changed the title Potential fix for 1 code quality finding Preserve owned PID locks during status checks Nov 26, 2026
@matteius
matteius marked this pull request as ready for review November 26, 2026 08:50
@matteius
matteius merged commit e5bdd4e into main Nov 26, 2026
4 of 6 checks passed
@matteius
matteius deleted the ai-findings-autofix/src-core-daemon.c branch November 26, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant