Repository navigation
Feature: Root actions through a privileged pkexec helper - #98
Merged
Merged
Conversation
Adds an AOT elevation helper with a strict JSON protocol, helper-side verification, a frozen confirmation plan and a polkit policy. Portable AppImage/Flatpak builds disable root actions. Co-Authored-By: GPT-6.1-sol (OpenAI Codex) <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LeKXJc3DnK3PzAqwgA72NY
- Pass a sanitized summary and the SHA-256 of the stdin request to the helper; the polkit message shows $(command_line) and the helper rejects any digest or summary mismatch (verified against polkit 0.105 and 127) - Refuse protected top-level sources and /proc, /sys, /dev targets - Wait for the real helper result when cancellation cannot kill root work - Embed the policy and install from a verified private helper snapshot - Hand verified copies in caller-owned destinations to the caller - Drop symlinkat from the helper, use invariant globalization, treat pkexec 126/127 as dismissed, fail closed on unexpected exceptions and show non-ASCII paths readably in the preview Co-Authored-By: GPT-6.1-sol (OpenAI Codex) <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Reviewed-by: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LeKXJc3DnK3PzAqwgA72NY
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LeKXJc3DnK3PzAqwgA72NY
- Mask handed-over folders by the source mode & 0755 and files by & 0644; keep group bits only for the caller's own group and limit other bits to what a foreign source group had - Clear group/other bits when the source has an access ACL or sat below a directory others could not search - Refuse multiply-linked files before handover, since a link can alias data outside the approved tree - Return name-free error text (no nested entry names or raw name bytes) - Duplicate listing descriptors with F_DUPFD_CLOEXEC - Document the handover rules and cover them with tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LeKXJc3DnK3PzAqwgA72NY
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LeKXJc3DnK3PzAqwgA72NY
- Remove the output's inherited access ACL before fchmod so the new mask cannot activate default-ACL named entries, and verify none remains - Treat a source as reachable only when every ancestor grants owner, group and other search and has no access ACL, read through a verified read-only reopen of the pinned descriptor - Pass fcntl's third argument as nint Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Reviewed-by: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LeKXJc3DnK3PzAqwgA72NY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #61. Fd-relative AOT elevation helper, strict JSON protocol, helper-side verification, frozen confirmation plan, polkit policy; disabled in AppImage/Flatpak. Do not merge without a clean security review. Written by GPT-6.1-sol (Codex) on top of the #61 draft.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LeKXJc3DnK3PzAqwgA72NY