Lines Matching refs:keyring
83 /* special process keyring shortcut IDs */
157 key_serial_t keyring)
160 plen, keyring);
562 static int get_keyring_id(const char *keyring)
568 * If no keyring is specified, by default use either the user
569 * session key ring or the session keyring. Fetching the
570 * session keyring will return the user session keyring if no
571 * session keyring has been set.
575 * session keyring that does not yet exist will cause the
576 * kernel to create a session keyring --- which wil then get
581 * session keyring does not exist is very unfortunate and
584 if (keyring == NULL)
588 if (strcmp(keyring, keyrings[x].name) == 0) {
592 x = strtoul(keyring, &end, 10);
617 static void insert_key_into_keyring(const char *keyring, struct salt *salt)
619 int keyring_id = get_keyring_id(keyring);
626 printf("Invalid keyring [%s].\n", keyring);
641 printf("Keyring [%s] is not available.\n", keyring);
651 printf("Error adding key to keyring; quota exceeded\n");
692 #define add_key_desc "adds a key to the user's keyring"
694 "f2fscrypt add_key -S salt [ -k keyring ] [-v] [-q] [ path ... ]\n\n" \
696 "keyring. If no keyring is specified, f2fscrypt will use the session\n" \
697 "keyring if it exists or the user session keyring if it does not.\n\n" \
705 char *keyring = NULL;
712 /* Specify a keyring. */
713 keyring = optarg;
752 insert_key_into_keyring(keyring, salt);
849 #define new_session_desc "give the invoking process a new session keyring"
852 "Give the invoking process (typically a shell) a new session keyring,\n" \
853 "discarding its old session keyring.\n"
875 printf("Switched invoking process to new session keyring %ld\n", keyid);