fix(udev): restore device node permissions on unhide and re-trigger udev add - #710
Open
nileshchakraborty wants to merge 2 commits into
Open
fix(udev): restore device node permissions on unhide and re-trigger udev add#710nileshchakraborty wants to merge 2 commits into
nileshchakraborty wants to merge 2 commits into
Conversation
nileshchakraborty
force-pushed
the
fix/unhide-restore-permissions
branch
from
September 12, 2026 04:49
efe8661 to
786b14f
Compare
When unhiding devices or stopping inputplumber, character device nodes that were grabbed previously had mode 000 applied directly to the node. Udev change events do not reset filesystem permissions on existing nodes, leaving the system without functioning pointer devices on service exit. Explicitly restore 0660 mode permissions on unhidden nodes and trigger udev with both remove and add actions in reload_all. Fixes: ShadowBlip#686
nileshchakraborty
force-pushed
the
fix/unhide-restore-permissions
branch
from
September 12, 2026 04:53
786b14f to
1063309
Compare
pastaq
reviewed
Sep 12, 2026
pastaq
requested changes
Sep 12, 2026
Author
Testing & Validation
|
pastaq
requested changes
Sep 12, 2026
| if Path::new(&hidden_symlink).exists() { | ||
| let _ = fs::remove_file(&hidden_symlink); | ||
| } | ||
|
|
| } | ||
| } | ||
|
|
||
| // Reload udev |
|
|
||
| /// Unhide all devices hidden by InputPlumber | ||
| pub async fn unhide_all() -> Result<(), Box<dyn Error>> { | ||
| // Remove all created udev rules |
| let _ = fs::remove_dir("/dev/inputplumber/by-hidden"); | ||
| } | ||
|
|
||
| // Move all devices back |
| saved.clear(); | ||
| } | ||
|
|
||
| // Reload udev rules |
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.
When
hide_device()hides an input device, dynamic udev rules modify permissions on the source devnode.On service stop or
unhide_all(), permissions on existing device nodes were not restored, leaving them inaccessible (#686).Changes
unhide_device()/unhide_all()./dev/inputplumber/by-hiddensymlinks on restore.reload_all(), triggerremoveandaddactions scoped to-s inputand-s hidrawto reapply default udev tags and ownership.Fixes #686