-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
Camera: use an empty app id in access dialog in case of empty app info #1512
base: main
Are you sure you want to change the base?
Conversation
e2deb6d
to
655bfd7
Compare
655bfd7
to
28439bd
Compare
28439bd
to
4da5500
Compare
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.
The current version looks good to me
4da5500
to
be7f2f4
Compare
@jadahl any final word? If no, can you merge it? I seem to have power to do it myself, but probably shouldn't as I'm not a maintainer here :) |
Since this changes policy about how to deal with permissions (even though only for non-sandboxed apps), I think we should let it sit here for a few days. If no objections, then it can land. |
Sending an app id that doesn't resolve to valid app info (e.g. a desktop file is not found) will automatically reject camera request, because the backend is not able to verify whether the app (based on app id) runs in the background. This happens for example when you start Firefox in GNOME using Alt + F2 shortcut, where we get firefox" as app id from cgroups and since it doesn't find opened application window for "firefox", it automatically rejects the request. Using an empty id fixes this problem.
5df4a8f
to
754d413
Compare
Would it make sense to add a |
If we want to provide a way for apps to specify their app id (only when the app id cannot be inferred) then it probably makes sense to add a new interface just for that to avoid having to add it to every portal. IOW, I think this is out of scope here. |
Indeed out of scope, right now, the app id is always inferred and never explicitly set by apps. |
Would a window handle improve the situation compared to an app-id? Anyways, yeah this is out of scope. This MR looks good to me, but I missed an explanation of why the empty string fixes the issue. |
Window handles are always about window management stacking order, i.e. placing a dialog on top of another window, which isn't needed here.
It's to handle cases where one e.g. runs some app from a terminal and gets an cgroup that resolves to some bogus "app id". Detecting that and falling back to |
Sending an app id that doesn't resolve to valid app info (e.g. a desktop file is not found) will automatically reject camera request, because the backend is not able to verify whether the app (based on app id) runs in the background. This happens for example when you start Firefox in GNOME using Alt + F2 shortcut, where we get firefox" as app id from cgroups and since it doesn't find opened application window for "firefox", it automatically rejects the request. Using an empty id fixes this problem.