Cryptological Coding Notes 2
Cryptological Coding Notes 2
Cryptological Coding Notes 2
3uhr3nf98
\laser {b3@m}
-loophole(24.389.123.399034)
{shell} case environment
soodp dii-verge .jlm
int nblocks;
int i;
nblocks = nblocks ? : 1;
if (!group_info)
return NULL;
group_info->ngroups = gidsetsize;
group_info->nblocks = nblocks;
atomic_set(&group_info->usage, 1);
group_info->blocks[0] = group_info->small_block;
else {
gid_t *b;
b = (void *)__get_free_page(GFP_USER);
if (!b)
goto out_undo_partial_alloc;
group_info->blocks[i] = b;
}
return group_info;
out_undo_partial_alloc:
free_page((unsigned long)group_info->blocks[i]);
kfree(group_info);
}
EXPORT_SYMBOL(groups_alloc);
if (group_info->blocks[0] != group_info->small_block) {
int i;
free_page((unsigned long)group_info->blocks[i]);
kfree(group_info);
EXPORT_SYMBOL(groups_free);
int i;
return -EFAULT;
grouplist += NGROUPS_PER_BLOCK;
count -= cp_count;
return 0;
int i;
return -EFAULT;
grouplist += NGROUPS_PER_BLOCK;
count -= cp_count;
return 0;
; /* nothing */
stride /= 3;
while (stride) {
GROUP_AT(group_info, right) =
GROUP_AT(group_info, left);
right = left;
left -= stride;
}
stride /= 3;
/* a simple bsearch */
if (!group_info)
return 0;
left = 0;
right = group_info->ngroups;
left = mid + 1;
right = mid;
else
return 1;
return 0;
/**
* of credentials.
*/
put_group_info(new->group_info);
groups_sort(group_info);
get_group_info(group_info);
new->group_info = group_info;
return 0;
EXPORT_SYMBOL(set_groups);
/**
* security record.
*/
int ret;
new = prepare_creds();
if (!new)
return -ENOMEM;
if (ret < 0) {
abort_creds(new);
return ret;
return commit_creds(new);
EXPORT_SYMBOL(set_current_groups);
int i;
if (gidsetsize < 0)
return -EINVAL;
i = cred->group_info->ngroups;
if (gidsetsize) {
if (i > gidsetsize) {
i = -EINVAL;
goto out;
if (groups_to_user(grouplist, cred->group_info)) {
i = -EFAULT;
goto out;
out:
return i;
/*
*/
int retval;
if (!nsown_capable(CAP_SETGID))
return -EPERM;
return -EINVAL;
group_info = groups_alloc(gidsetsize);
if (!group_info)
return -ENOMEM;
if (retval) {
put_group_info(group_info);
return retval;
}
retval = set_current_groups(group_info);
put_group_info(group_info);
return retval;
/*
*/
int retval = 1;
if (grp != cred->fsgid)
return retval;
EXPORT_SYMBOL(in_group_p);
int retval = 1;
if (grp != cred->egid)
retval = groups_search(cred->group_info, grp);
return retval;