Lines Matching refs:acred
49 unx_hash_cred(struct auth_cred *acred, unsigned int hashbits) in unx_hash_cred() argument
51 return hash_64(from_kgid(&init_user_ns, acred->gid) | in unx_hash_cred()
52 ((u64)from_kuid(&init_user_ns, acred->uid) << in unx_hash_cred()
60 unx_lookup_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags) in unx_lookup_cred() argument
62 return rpcauth_lookup_credcache(auth, acred, flags, GFP_NOFS); in unx_lookup_cred()
66 unx_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags, gfp_t gfp) in unx_create_cred() argument
73 from_kuid(&init_user_ns, acred->uid), in unx_create_cred()
74 from_kgid(&init_user_ns, acred->gid)); in unx_create_cred()
79 rpcauth_init_cred(&cred->uc_base, acred, auth, &unix_credops); in unx_create_cred()
82 if (acred->group_info != NULL) in unx_create_cred()
83 groups = acred->group_info->ngroups; in unx_create_cred()
87 cred->uc_gid = acred->gid; in unx_create_cred()
89 cred->uc_gids[i] = acred->group_info->gid[i]; in unx_create_cred()
122 unx_match(struct auth_cred *acred, struct rpc_cred *rcred, int flags) in unx_match() argument
129 if (!uid_eq(cred->uc_uid, acred->uid) || !gid_eq(cred->uc_gid, acred->gid)) in unx_match()
132 if (acred->group_info != NULL) in unx_match()
133 groups = acred->group_info->ngroups; in unx_match()
137 if (!gid_eq(cred->uc_gids[i], acred->group_info->gid[i])) in unx_match()