Displaying 1 result from an estimated 1 matches for "key_spec_user_session_keyr".
2005 Jul 26
1
Linux in-kernel keys support
...rnel = 0;
+
/* we keep a cache of one passphrases */
static char *pass = NULL;
static void
@@ -85,6 +91,26 @@
char *comment = NULL;
int ret = -1;
+#ifdef HAVE_LIBKEYUTIL
+ if (inkernel) {
+ char buf[MAXPATHLEN + 5];
+
+ sprintf(buf, "ssh:%s", filename);
+ ret = keyctl_search(KEY_SPEC_USER_SESSION_KEYRING, "user", buf, 0);
+ if (ret < 0) {
+ printf("In-kernel key %s not found\n", filename);
+ return -1;
+ }
+
+ if (keyctl_unlink((key_serial_t) ret, KEY_SPEC_USER_SESSION_KEYRING) < 0) {
+ printf("Error when removing in-kernel key %d\n", ret);
+ return...