Fix/repo audit corrections#4
Merged
Merged
Conversation
grep -Fqx so a MAC/serial containing '.' cannot match a different device's HID_UNIQ line as a regex wildcard. Reject '.'/'..' uniqs that pass the charset but name the marker dir itself / its parent. Also correct the stale 71- rule name in the header comment (the installed rule is 72-).
Remapper.run() opened the self-pipe (and src/uinput) but the three early error returns (source open, uinput create, grab fail) returned before the finally that closes them — leaking 2-3 fds per failed attempt. Under a pad whose grab keeps racing, the 2 s reconcile retries and exhausts the fd budget in minutes. Wrap the body in one try/finally that frees every resource on all paths. save_config now writes a temp file, fsyncs and os.replace()s it, so a crash mid-write can no longer truncate controller-modes.json (which load_config would swallow, silently dropping all modes + player numbers). Both config helpers use with-managed handles.
…ently udevadm trigger --subsystem-match=hidraw after the reload so the new rule applies to already-connected pads now, not at the next reconnect. Report the service state via is-active --quiet in an if, so a non-active service prints a journalctl hint and exits 1 instead of aborting silently under set -e before the message.
The tests import evdev/dbus/gi; without them they raise ModuleNotFoundError and sys.exit(0) — CI was green because the suite skipped, not passed. Install python3-evdev/-dbus/-gi via apt (system python, which validate-repo.sh uses) instead of setup-python+pip (which compiles C extensions). Also shellcheck controller-led.
The 2026-07-06 pivot requires PlayStation controller support = 'Enabled in Games w/o Support' (plus Xbox support off); README and the install runbook told users to DISABLE it, which is the one broken middle ground (Steam still opens the pad to identify it and latches the lightbar). Fix both, and reframe the overview/troubleshooting text that implied disabling prevents the latch — the daemon rearms via driver rebind once the last holder exits. Also in these files: clarify that a native hidraw node shows a seat ACL (not a fixed 666), and add the missing update/multi-controller runbook and player-leds decision links in the README.
SECURITY.md now lists both root helpers and the full privileged surface (chmod + marker files + driver rebind), not just chmod. per-device-identity.md updated from v1 to v2: identity chain (uniq->phys->vid:pid), player-number tray label, identity-keyed gate. ROADMAP records the liveness item as resolved and adds the deferred main-loop-blocking limitation. runbooks index and CONTRIBUTING gain the multi-controller runbook link.
The runbook claimed ~8s; _arm_player_reassert() schedules the one-shot repaint at a fixed 6.0s, matching every other timing claim already verified elsewhere in the docs.
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.
Summary
Details