summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2017-07-03 22:24:07 +0200
committerGravatar Christian Hesse <mail@eworm.de>2017-07-03 22:24:07 +0200
commit417f30d3eb680e645f3fdaef264dcdcbbb71aa13 (patch)
tree18b54adfa2545fef52ba2fce57a367df02f5ff5a /bin
parentdb6d4a9645da5a750165eb6b09451b9ce91fd451 (diff)
downloadmkinitcpio-ykfde-417f30d3eb680e645f3fdaef264dcdcbbb71aa13.tar.gz
mkinitcpio-ykfde-417f30d3eb680e645f3fdaef264dcdcbbb71aa13.tar.zst
undo the changes with session keyringsystemd-v234
The keyring handling has been fixed with systemd v234, so revert using the session keyring.
Diffstat (limited to 'bin')
-rw-r--r--bin/worker.c17
1 files changed, 1 insertions, 16 deletions
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;
}