-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
kwallet-pam: just provide plugin path for qtbase #84689
Conversation
Let's also add |
The build fails for me:
|
But please add a comment why we're doing this. Someone could easily look at this and be like "well this needs to be updated for wrapQtApp` and break it again because we have no testing. |
Updated with a fix for this - I was just passing in wrong args to wrapProgram. |
33ba091
to
8021f0a
Compare
This doesn't build for me. The build error
However, putting back the FYI: I guess that's also why the grahamcofborg builds fail. |
kwallet sets a limit of 1000 for a single characters for environment variables read from the socket[1]. wrapQtApps gives us a huge value for QT_PLUGIN_PATH (up to 13000 bytes on my system!) Since this was overflowing, the Qt plugin loading mechanism was hitting a segfault when it was trying to parse the truncated QT_PLUGIN_PATH. So for now, we can just unset QT_PLUGIN_PATH in the pam_kwallet_init script. kwalletd5 has its own QT_PLUGIN_PATH which it can use. This problem occured on 20.03, but not 19.09. It’s unclear what changes were made in that time, but likely that previously we weren’t getting a QT_PLUGIN_PATH set in the plasma5 startup at all. This means that in 19.09 our QT_PLUGIN_PATH value must have been small enough to fit into the 1000 char limit. Fixes NixOS#77290 [1]: https://github.com/KDE/kwallet/blob/bc9713e2725ab1c4311866f751c674a38584bd92/src/runtime/kwalletd/main.cpp#L44 /cc @ttuegel
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/declarative-wrappers-another-idea/6661/1 |
kwallet sets a limit of 1000 for a single characters for environment
variables read from the socket[1]. wrapQtApps gives us a huge value
for QT_PLUGIN_PATH (up to 13000 bytes on my system!) Since this was
overflowing, the Qt plugin loading mechanism was hitting a segfault
when it was trying to parse the truncated QT_PLUGIN_PATH.
So for now, we can just unset QT_PLUGIN_PATH in the pam_kwallet_init
script. kwalletd5 has its own QT_PLUGIN_PATH which it can use.
This problem occured on 20.03, but not 19.09. It’s unclear what
changes were made in that time, but likely that previously we weren’t
getting a QT_PLUGIN_PATH set in the plasma5 startup at all. This means
that in 19.09 our QT_PLUGIN_PATH value must have been small enough to
fit into the 1000 char limit.
Fixes #77290
/cc @ttuegel