From 417f30d3eb680e645f3fdaef264dcdcbbb71aa13 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 3 Jul 2017 22:24:07 +0200 Subject: undo the changes with session keyring The keyring handling has been fixed with systemd v234, so revert using the session keyring. --- bin/worker.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'bin') diff --git a/bin/worker.c b/bin/worker.c index ef0cefc..470acb2 100644 --- a/bin/worker.c +++ b/bin/worker.c @@ -243,7 +243,7 @@ static int add_keyring(const char * passphrase) { * Put it into session keyring first, set permissions and * move it to user keyring. */ if ((key = add_key("user", "cryptsetup", passphrase, - PASSPHRASELEN, KEY_SPEC_SESSION_KEYRING)) < 0) { + PASSPHRASELEN, KEY_SPEC_USER_KEYRING)) < 0) { perror("add_key() failed"); return -1; } @@ -253,21 +253,6 @@ static int add_keyring(const char * passphrase) { return -1; } - if (keyctl_setperm(key, KEY_POS_ALL|KEY_USR_ALL) < 0) { - perror("keyctl_setperm() failed"); - return -1; - } - - if (keyctl_link(key, KEY_SPEC_USER_KEYRING) < 0) { - perror("keyctl_link() failed"); - return -1; - } - - if (keyctl_unlink(key, KEY_SPEC_SESSION_KEYRING) < 0) { - perror("keyctl_unlink() failed"); - return -1; - } - return EXIT_SUCCESS; } -- cgit v1.2.3-70-g09d2