• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/security/keys/

Lines Matching defs:keyring

24 /* session keyring create vs join semaphore */
27 /* user keyring creation semaphore */
67 /* get the UID-specific keyring
84 /* get a default session keyring (which might also exist
98 /* we install a link from the user session keyring to
99 * the user keyring */
125 * install a fresh thread keyring directly to new credentials
129 struct key *keyring;
131 keyring = keyring_alloc("_tid", new->uid, new->gid, new,
133 if (IS_ERR(keyring))
134 return PTR_ERR(keyring);
136 new->thread_keyring = keyring;
141 * install a fresh thread keyring, discarding the old one
164 * install a process keyring directly to a credentials struct
165 * - returns -EEXIST if there was already a process keyring, 0 if one installed,
170 struct key *keyring;
176 keyring = keyring_alloc("_pid", new->uid, new->gid,
178 if (IS_ERR(keyring))
179 return PTR_ERR(keyring);
183 new->tgcred->process_keyring = keyring;
184 keyring = NULL;
190 key_put(keyring);
195 * make sure a process keyring is installed
217 * install a session keyring directly to a credentials struct
219 int install_session_keyring_to_cred(struct cred *cred, struct key *keyring)
226 /* create an empty session keyring */
227 if (!keyring) {
232 keyring = keyring_alloc("_ses", cred->uid, cred->gid,
234 if (IS_ERR(keyring))
235 return PTR_ERR(keyring);
237 atomic_inc(&keyring->usage);
240 /* install the keyring */
243 rcu_assign_pointer(cred->tgcred->session_keyring, keyring);
257 * install a session keyring, discarding the old one
258 * - if a keyring is not supplied, an empty one is invented
260 static int install_session_keyring(struct key *keyring)
284 /* update the ownership of the thread keyring */
300 /* update the ownership of the thread keyring */
336 /* search the thread keyring first */
357 /* search the process keyring second */
378 /* search the session keyring */
403 /* or search the user-session keyring */
563 /* always install a session keyring upon access if one
667 * the permission checks as it is only concerned with the keyring */
709 /* if we attempted to install a keyring, then it may have caused new
719 * join the named keyring as the session keyring if possible, or attempt to
721 * - if the name is NULL, an empty anonymous keyring is installed instead
722 * - named session keyring joining is done with a semaphore held
728 struct key *keyring;
742 /* if no name is provided, install an anonymous keyring */
755 /* allow the user to join or create a named keyring */
758 /* look for an existing keyring of this name */
759 keyring = find_keyring_by_name(name, false);
760 if (PTR_ERR(keyring) == -ENOKEY) {
762 keyring = keyring_alloc(name, old->uid, old->gid, old,
764 if (IS_ERR(keyring)) {
765 ret = PTR_ERR(keyring);
768 } else if (IS_ERR(keyring)) {
769 ret = PTR_ERR(keyring);
773 /* we've got a keyring - now to install it */
774 ret = install_session_keyring_to_cred(new, keyring);
781 ret = keyring->serial;
782 key_put(keyring);
794 * Replace a process's session keyring when that process resumes userspace on