MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sys_cap_ioctls_limit

Function sys_cap_ioctls_limit

freebsd/kern/sys_capability.c:461–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

459}
460
461int
462sys_cap_ioctls_limit(struct thread *td, struct cap_ioctls_limit_args *uap)
463{
464 u_long *cmds;
465 size_t ncmds;
466 int error;
467
468 ncmds = uap->ncmds;
469
470 if (ncmds > IOCTLS_MAX_COUNT)
471 return (EINVAL);
472
473 if (ncmds == 0) {
474 cmds = NULL;
475 } else {
476 cmds = malloc(sizeof(cmds[0]) * ncmds, M_FILECAPS, M_WAITOK);
477 error = copyin(uap->cmds, cmds, sizeof(cmds[0]) * ncmds);
478 if (error != 0) {
479 free(cmds, M_FILECAPS);
480 return (error);
481 }
482 }
483
484 return (kern_cap_ioctls_limit(td, uap->fd, cmds, ncmds));
485}
486
487int
488sys_cap_ioctls_get(struct thread *td, struct cap_ioctls_get_args *uap)

Callers

nothing calls this directly

Calls 4

mallocFunction · 0.85
kern_cap_ioctls_limitFunction · 0.85
freeFunction · 0.70
copyinFunction · 0.50

Tested by

no test coverage detected