From 462068f247b0073aeb7b1866529e3cbba299e612 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 20 Jun 2017 18:23:52 +0200 Subject: Rework the code, update keyring handling 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 --- bin/ykfde.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') 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"); -- cgit v1.2.3-70-g09d2