-
-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
context: Added fallback devices #5708
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Not a thorough implementation review, I've only had a quick glance at this for now.)
I still think it's not going to be obvious to users what --device=input,all
means, and a lot of people will think it's a synonym for --device=input --device=all
. It's definitely not obvious what --device=all,input
means.
input|all
would be a bit clearer, but would have to be quoted by shell users: --device='input|all'
. So that's probably not great either.
Maybe --device=input:or-fallback
or --device=input:fallback
? Or --device=fallback:input,all
as I suggested before? Or something along those lines?
I don't think we necessarily want the syntax for this to come with an implicit assumption that the fallback will always be to exactly all
- that seems like a choice that we're likely to be regretting in 5 years' time. But perhaps I'm overthinking that part.
On an unrelated point, we have logic elsewhere in Flatpak that decides whether a permissions change is making the app more privileged (which requires prompting the user) or less privileged (which does not). At the moment, that logic has a special case that says --socket=fallback-x11
or --socket=fallback-x11 --socket=x11
is less privileged than --socket=x11
, despite what the syntax would normally indicate. Does it need a similar special case that says --device=(anything) --device=all
is less privileged than --device=all
, or is all
already handled specially there?
eb529fe
to
36f612b
Compare
doc/devices.md
Outdated
events. This is not necessary for mouse a keyboard input, but it is | ||
for direct device access or game controllers. | ||
|
||
`all` exposes everyting. Accept `shm`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Except"
I went for |
Draft of the documentation flatpak/flatpak-docs#478 |
This provide compatibility to disable all devices when there is new device option. A fallback device is specified like `fallback:input,all`. This mean that if it knows about `input` this indicate that `all` as a separate device will be removed to narrow down the permissions. Fixes flatpak#5681 Signed-off-by: Hubert Figuière <hub@figuiere.net>
Signed-off-by: Hubert Figuière <hub@figuiere.net>
This provide compatibility to disable all devices when there is new device option
Fixes #5681