Skip to content
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

nixos: add optional pam_kwallet5 integration #22813

Merged
merged 1 commit into from Feb 16, 2017
Merged

Conversation

benley
Copy link
Member

@benley benley commented Feb 15, 2017

Motivation for this change

https://wiki.archlinux.org/index.php/KDE_Wallet

Nice-to-have KDE wallet integration.

@mention-bot
Copy link

@benley, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @abbradar and @markus2342 to be potential reviewers.

@@ -212,6 +212,15 @@ let
'';
};

enableKwallet = mkOption {
Copy link
Member

Choose a reason for hiding this comment

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

From the name of this option, it would seem necessary to enable it to use kwallet at all, which is not true. The description does not contradict that interpretation. Please either change the name or mention this in the description.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done - I've kept the option name but made the description much more explicit.

type = types.bool;
description = ''
Enable pam_kwallet to automatically unlock user KDE Wallets
upon login (if their wallet password matches their login password)
Copy link
Member

Choose a reason for hiding this comment

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

What happens if this is enabled, but my wallet password does not match my login password?

Copy link
Member Author

@benley benley Feb 15, 2017

Choose a reason for hiding this comment

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

Your wallet just won't be auto-unlocked, and KDE will prompt you for the wallet password when it is needed. I will make sure to test things like that prior to merging this change.

auth required pam_unix.so ${optionalString cfg.allowNullPassword "nullok"} likeauth
${optionalString config.security.pam.enableEcryptfs
"auth optional ${pkgs.ecryptfs}/lib/security/pam_ecryptfs.so unwrap"}
${optionalString cfg.pamMount
"auth optional ${pkgs.pam_mount}/lib/security/pam_mount.so"}
${optionalString cfg.enableKwallet
"auth optional ${pkgs.kde5.kwallet-pam}/lib/security/pam_kwallet5.so auto_start"}
Copy link
Member

Choose a reason for hiding this comment

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

the docs say the auth optional bit doesn't need the auto_start option: https://wiki.archlinux.org/index.php/KDE_Wallet

Copy link
Member Author

Choose a reason for hiding this comment

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

Whoops, you are right. Fixing.

Copy link
Member Author

Choose a reason for hiding this comment

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

Even better, it turns out that auto_start does absolutely nothing with pam_kwallet. It appears that it was accidentally copied over from the pam_gnome_keyring config at some point, and that tidbit has been repeated in many places around the net ever since.

@benley
Copy link
Member Author

benley commented Feb 16, 2017

This should be ready for another look now.

Copy link
Member

@grahamc grahamc left a comment

Choose a reason for hiding this comment

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

LGTM, @ttuegel?

@ttuegel ttuegel merged commit 7c260ad into NixOS:master Feb 16, 2017
@benley benley deleted the pam-kwallet branch February 16, 2017 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants