diff options
author | Christian Hesse <mail@eworm.de> | 2017-06-20 18:23:52 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2017-06-20 18:23:52 +0200 |
commit | 462068f247b0073aeb7b1866529e3cbba299e612 (patch) | |
tree | 3068fadcffe60d28912e7c2a2f7876f9b73e1d8d /bin/ykfde.c | |
parent | d0d025a737c3b8fa2a07580a138b90e408121e27 (diff) | |
download | mkinitcpio-ykfde-462068f247b0073aeb7b1866529e3cbba299e612.tar.gz mkinitcpio-ykfde-462068f247b0073aeb7b1866529e3cbba299e612.tar.zst |
Rework the code, update keyring handlingsystemd-v233
This had some historical issue... So rework the code:
* split into more functions
* drop the sleep and notify logic
* update keyring handling
Depending on setup and systemd version (233 and up) the keyring handling
fails. Try to fix this by...
* writing to session keyring first
* setting permissions
* linking to user keyring
* unlinking from session keyring
https://mjg59.dreamwidth.org/37333.html
Diffstat (limited to 'bin/ykfde.c')
-rw-r--r-- | bin/ykfde.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/ykfde.c b/bin/ykfde.c index 96b5559..e72fd0d 100644 --- a/bin/ykfde.c +++ b/bin/ykfde.c @@ -264,7 +264,7 @@ int main(int argc, char **argv) { if (second_factor == NULL) { /* get second factor from key store */ - if ((key = request_key("user", "ykfde-2f", NULL, 0)) < 0) + if ((key = keyctl_search(KEY_SPEC_USER_KEYRING, "user", "ykfde-2f", 0)) < 0) fprintf(stderr, "Failed requesting key. That's ok if you do not use\n" "second factor. Give it manually if required.\n"); |