summaryrefslogtreecommitdiffstats
path: root/bin/worker.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/worker.c')
-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;
}