 /* use the top 8-bits of permissions for keys the caller possesses */ if (is_key_possessed(key_ref)) { kperm = key->perm >> 24; goto use_these_perms; } 
int key_task_permission(const key_ref_t key_ref,			struct task_struct *context,			key_perm_t perm){	struct key *key;	key_perm_t kperm;	int ret;	key = key_ref_to_ptr(key_ref);	/* use the top 8-bits of permissions for keys the caller possesses */	if (is_key_possessed(key_ref)) {		kperm = key->perm >> 24;		goto use_these_perms;	}	/* use the second 8-bits of permissions for keys the caller owns */	if (key->uid == context->fsuid) {		kperm = key->perm >> 16;		goto use_these_perms;	}	/* use the third 8-bits of permissions for keys the caller has a group	 * membership in common with */	if (key->gid != -1 && key->perm & KEY_GRP_ALL) {		if (key->gid == context->fsgid) {			kperm = key->perm >> 8;			goto use_these_perms;		}		task_lock(context);		ret = groups_search(context->group_info, key->gid);		task_unlock(context);		if (ret) {			kperm = key->perm >> 8;			goto use_these_perms;		}	}	/* otherwise use the least-significant 8-bits */	kperm = key->perm;use_these_perms:	kperm = kperm & perm & KEY_ALL;	return kperm == perm;} /* end key_task_permission() */
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/7ab501db8cb6659efdf04034e0de6b44c059a51b/permission.c/clean/security/keys/permission.c