-
Notifications
You must be signed in to change notification settings - Fork 137
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
finish-args-broken-kde-tray-permission is incorrect #66
Comments
Also recommending people use |
What will happen when two apps own the same address? |
it's only fixed if you consider getpid() to always return the same value. What if the implementation changes? |
It probably just fails. This has to be fixed in the libraries.
This is just a thought experiment. Flatpak is 8 years old and this has never changed. When it changes once in 25 years somebody can increment the Giving ownership permission to |
I was more thinking of PID randomisation. It's not default on Linux but it remain a known technique for hardening system. It should even just happen without flatpak knowing. |
Also if we have to pin the behaviour on the specific version of flatpak, then it fails one of the idea of flatpak: to be system setup agnostic. |
The error says "broken-kde-tray-permission" but what exactly is broken? |
the design of the KDE tray SNI |
AFAIK PID randomization functionality doesn't exist at all in linux kernel and was dropped from security oriented forks ages ago:
|
Fair enough. But then:
|
I guess if the app changes its architecture to become a multiprocess like electron then the PID may change but it's still limited. There are apps who have PID 2 or 3, did anyone saw 4? What if we give
Does |
Correct. It is broken by design inside of flatpak. This requires work in the libraries used to solve anything. |
@barthalion would be ok to degrade this to warning? For apps which use right tray permission switching over to In the future you may setup bot a'la f-e-d-c that will open issue/PR for every warning to make people aware of the problem. |
Using |
What do you mean? With current linter rule apps can chose between |
* TODO drop "--own-name=org.kde.*" workaround on flathub-infra/flatpak-builder-lint#66 resolving
The line you link to is an internal connection identifier used by Qt (i.e. ID to access the C++ global connection object from any place), it's not exposed to dbus in any way. What you wanted refer to is likely QDBusConnection::registerService API use of which was removed ages ago. It was also fixed in Qt itself, but only since 6.2. Although I believe the fix is present in KDE Patch Collection. So this linter rule is indeed correct, own name shouldn't be necessary nowadays. |
Excellent!
The linter is wrong, but in a different way then, it should recommend removing ownership permissions entirely, if the runtime is new enough to have Qt 6.2 (or the patches for this). |
As far as I understand, all non-EOLed KDE runtimes have the fix |
As of Qt 6.2 the tray works as expected without extra permissions. This version should be in all supported KDE runtimes. Using org.kde.* is not a correct permission and is a security risk. Closes #66
I tested this on one application (qbittorrent (KDE 5.15-21.08)) and it worked. So I've opened a PR to error when people use |
As of Qt 6.2 the tray works as expected without extra permissions. This version should be in all supported KDE runtimes. Using org.kde.* is not a correct permission and is a security risk. Closes #66
Given all the references to this issue, my guess is it may still be a problem for Electron applications as Chromium has to be fixed as well |
Some maybe this other issue could be closed too: flatpak/xdg-dbus-proxy#15 |
Ugh, that is frustrating, its relatively new code too. Electron historically used libappindicator which already worked fine. |
I opened an issue here: https://bugs.chromium.org/p/chromium/issues/detail?id=1408315 |
This is no longer required with any supported runtimes, the issue was fixed in Qt https://docs.flatpak.org/en/latest/desktop-integration.html#statusnotifier > Most implementations of StatusNotifer have dropped this requirement flathub-infra/flatpak-builder-lint#66 (comment)
This is no longer required with any supported runtimes, the issue was fixed in Qt https://docs.flatpak.org/en/latest/desktop-integration.html#statusnotifier > Most implementations of StatusNotifer have dropped this requirement flathub-infra/flatpak-builder-lint#66 (comment)
This is no longer required with any supported runtimes, the issue was fixed in Qt https://docs.flatpak.org/en/latest/desktop-integration.html#statusnotifier > Most implementations of StatusNotifer have dropped this requirement flathub-infra/flatpak-builder-lint#66 (comment)
This is no longer required with any supported runtimes, the issue was fixed in Qt https://docs.flatpak.org/en/latest/desktop-integration.html#statusnotifier > Most implementations of StatusNotifer have dropped this requirement flathub-infra/flatpak-builder-lint#66 (comment)
This is no longer required with any supported runtimes, the issue was fixed in Qt https://docs.flatpak.org/en/latest/desktop-integration.html#statusnotifier > Most implementations of StatusNotifer have dropped this requirement flathub-infra/flatpak-builder-lint#66 (comment)
This is no longer required with any supported runtimes, the issue was fixed in Qt https://docs.flatpak.org/en/latest/desktop-integration.html#statusnotifier > Most implementations of StatusNotifer have dropped this requirement flathub-infra/flatpak-builder-lint#66 (comment)
This is no longer required with any supported runtimes, the issue was fixed in Qt https://docs.flatpak.org/en/latest/desktop-integration.html#statusnotifier > Most implementations of StatusNotifer have dropped this requirement flathub-infra/flatpak-builder-lint#66 (comment)
This is no longer required with any supported runtimes, the issue was fixed in Qt https://docs.flatpak.org/en/latest/desktop-integration.html#statusnotifier > Most implementations of StatusNotifer have dropped this requirement flathub-infra/flatpak-builder-lint#66 (comment)
This is no longer required with any supported runtimes https://docs.flatpak.org/en/latest/desktop-integration.html#statusnotifier > Most implementations of StatusNotifer have dropped this requirement flathub-infra/flatpak-builder-lint#66
This is no longer required with any supported runtimes, the issue was fixed in Qt https://docs.flatpak.org/en/latest/desktop-integration.html#statusnotifier > Most implementations of StatusNotifer have dropped this requirement flathub-infra/flatpak-builder-lint#66 #issuecomment-1386033025
This is no longer required with any supported runtimes, the issue was fixed in Qt https://docs.flatpak.org/en/latest/desktop-integration.html#statusnotifier > Most implementations of StatusNotifer have dropped this requirement flathub-infra/flatpak-builder-lint#66
This is no longer required with any supported runtimes, the issue was fixed in Qt https://docs.flatpak.org/en/latest/desktop-integration.html#statusnotifier > Most implementations of StatusNotifer have dropped this requirement flathub-infra/flatpak-builder-lint#66 (comment)
This is no longer required with any supported runtimes https://docs.flatpak.org/en/latest/desktop-integration.html#statusnotifier > Most implementations of StatusNotifer have dropped this requirement flathub-infra/flatpak-builder-lint#66
This is no longer required with any supported runtimes, the issue was fixed in Qt https://docs.flatpak.org/en/latest/desktop-integration.html#statusnotifier > Most implementations of StatusNotifer have dropped this requirement flathub-infra/flatpak-builder-lint#66 (comment)
* Drop org.kde.* own-name This is no longer required with any supported runtimes, the issue was fixed in Qt https://docs.flatpak.org/en/latest/desktop-integration.html#statusnotifier > Most implementations of StatusNotifer have dropped this requirement flathub-infra/flatpak-builder-lint#66 * StatusNotifierWatcher should be the only permission required to provide tray functionalities on KDE
This is no longer required with any supported runtimes, the issue was fixed in Qt https://docs.flatpak.org/en/latest/desktop-integration.html#statusnotifier > Most implementations of StatusNotifer have dropped this requirement flathub-infra/flatpak-builder-lint#66 (comment)
Thanks @bbhtt, I will go ahead and drop that error. |
The
finish-args-broken-kde-tray-permission
forbids anything withorg.kde.StatusNotifierItem
at the beginning, however this isn't correct.As you can see in knotification: https://github.com/KDE/knotifications/blob/7fb8c5b3130646845efb0483fc1cf3c7769c5830/src/kstatusnotifieritemdbus_p.cpp#L134
This is a unchanging format. In flatpak it will always be the same value for the same pid for the same item number.
Now this is very broken inside of flatpak but it is the correct permission to say
--own-name=org.kde.StatusNotifierItem-2-1
because you know your values will always be the same. Fixing it means patching KDE libraries but that's a discussion for other people.The text was updated successfully, but these errors were encountered: