name++; /* skip ^ */ if (!*name)
name = NULL; return name;
}
/** *aa_setprocattr_changehat-handleprocattrinterfacetochange_hat *@args:argsreceivedfromwritingto/proc/<pid>/attr/current(NOTNULL) *@size:sizeoftheargs *@flags:setofflagsgoverningbehavior * *Returns:%0orerrorcodeifchange_hatfails
*/ int aa_setprocattr_changehat(char *args, size_t size, int flags)
{ char *hat;
u64 token; constchar *hats[16]; /* current hard limit on # of names */ int count = 0;
hat = split_token_from_name(OP_CHANGE_HAT, args, &token); if (IS_ERR(hat)) return PTR_ERR(hat);
if (!hat && !token) {
AA_ERROR("change_hat: Invalid input, NULL hat and NULL magic"); return -EINVAL;
}
if (hat) { /* set up hat name vector, args guaranteed null terminated *atargs[size]bysetprocattr. * *Iftherearemultiplehatnamesinthebuffereachis *separatedbya\0.Ie.userspacewritesthempretokenized
*/ char *end = args + size; for (count = 0; (hat < end) && count < 16; ++count) { char *next = hat + strlen(hat) + 1;
hats[count] = hat;
AA_DEBUG(DEBUG_DOMAIN, "%s: (pid %d) Magic 0x%llx count %d hat '%s'\n"
, __func__, current->pid, token, count, hat);
hat = next;
}
} else
AA_DEBUG(DEBUG_DOMAIN, "%s: (pid %d) Magic 0x%llx count %d Hat '%s'\n",
__func__, current->pid, token, count, "<NULL>");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.