search for: keyctl_read_alloc

Displaying 1 result from an estimated 1 matches for "keyctl_read_alloc".

2005 Jul 26
1
Linux in-kernel keys support
...if public = key_load_public(filename, &comment); if (public == NULL) { printf("Bad key file %s\n", filename); @@ -108,6 +134,65 @@ { int ret = -1; +#ifdef HAVE_LIBKEYUTIL + if (inkernel) { + int count, dlen; + char *buf; + key_serial_t key, *keylist, *pk; + + count = keyctl_read_alloc(KEY_SPEC_USER_SESSION_KEYRING, (void **) &keylist); + if (count < 0) { + printf("Error in keyctl_read_alloc\n"); + return -1; + } + + count /= sizeof(key_serial_t); + pk = keylist; + ret = 0; + while (count--) { + key = *pk++; + + if (keyctl_describe_alloc(key, &b...