Skip to content

fix(udev) Resolve permission errors when unhiding devices (#582)#586

Open
dripsnek wants to merge 1 commit into
ShadowBlip:mainfrom
dripsnek:bug/582
Open

fix(udev) Resolve permission errors when unhiding devices (#582)#586
dripsnek wants to merge 1 commit into
ShadowBlip:mainfrom
dripsnek:bug/582

Conversation

@dripsnek
Copy link
Copy Markdown

@dripsnek dripsnek commented May 12, 2026

For devices which use FACLs as part of their udev rules e.g. TAG+="uaccess":
When hiding devices their permissions are modified using chmod, setting a ceiling as to what the FACL permissions can be on that node. Where present, these prohibit the 'pre-hidden' permissions from being reapplied by udev when the device is restored. By clearing any FACLs when hiding, this allows them to be reapplied cleanly when udevadm is reloaded. Devices which do not use FACLs should be unaffected by the additional commands.

For everything else:
An additional check is made for the /dev/inputplumber/sources folder during unhide_all() to prevent a file not found error from propagating which can in some circumstances prevent udevadm from firing leading to incomplete device restoration.

Resolves #582

Comment thread src/udev/mod.rs Outdated
Copy link
Copy Markdown
Contributor

@pastaq pastaq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor nit that I see.

Copy link
Copy Markdown
Contributor

@pastaq pastaq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still need to test this, but the code looks good.

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.

[Bug] Device nodes not being unhidden correctly

2 participants