/freebsd/tools/regression/capsicum/syscalls/ |
H A D | cap_ioctls_limit.c | 48 unsigned long cmds[2]; in ioctl_tests_0() 58 cmds[0] = FIOCLEX; in ioctl_tests_0() 59 cmds[1] = FIONCLEX; in ioctl_tests_0() 60 CHECK(cap_ioctls_limit(fd, cmds, nitems(cmds)) == 0); in ioctl_tests_0() 61 cmds[0] = cmds[1] = 0; in ioctl_tests_0() 62 CHECK(cap_ioctls_get(fd, cmds, nitems(cmds)) == nitems(cmds)); in ioctl_tests_0() 49 unsigned long cmds[2]; ioctl_tests_0() local 130 unsigned long cmds[2]; ioctl_tests_1() local 176 unsigned long cmds[2]; ioctl_tests_2() local 215 unsigned long cmds[2]; ioctl_tests_send_0() local 244 unsigned long cmds[2]; ioctl_tests_recv_0() local [all...] |
/freebsd/sys/compat/freebsd32/ |
H A D | freebsd32_capability.c | 55 u_long *cmds; in freebsd32_cap_ioctls_limit() local 67 cmds = NULL; in freebsd32_cap_ioctls_limit() 70 error = copyin(uap->cmds, cmds32, sizeof(cmds32[0]) * ncmds); in freebsd32_cap_ioctls_limit() 75 cmds = malloc(sizeof(cmds[0]) * ncmds, M_FILECAPS, M_WAITOK); in freebsd32_cap_ioctls_limit() 77 cmds[i] = cmds32[i]; in freebsd32_cap_ioctls_limit() 81 return (kern_cap_ioctls_limit(td, uap->fd, cmds, ncmds)); in freebsd32_cap_ioctls_limit() 91 u_long *cmds; in freebsd32_cap_ioctls_get() local 97 cmds32 = uap->cmds; in freebsd32_cap_ioctls_get() 117 cmds = fdep->fde_ioctls; in freebsd32_cap_ioctls_get() 118 if (cmds32 != NULL && cmds != NULL) { in freebsd32_cap_ioctls_get() [all …]
|
/freebsd/crypto/openssl/crypto/conf/ |
H A D | conf_ssl.c | 26 SSL_CONF_CMD *cmds; member 51 OPENSSL_free(tname->cmds[j].cmd); in ssl_module_free() 52 OPENSSL_free(tname->cmds[j].arg); in ssl_module_free() 54 OPENSSL_free(tname->cmds); in ssl_module_free() 88 STACK_OF(CONF_VALUE) *cmds = NCONF_get_section(cnf, sect->value); in ssl_module_init() 90 if (sk_CONF_VALUE_num(cmds) <= 0) { in ssl_module_init() 92 cmds == NULL in ssl_module_init() 103 cnt = sk_CONF_VALUE_num(cmds); in ssl_module_init() 104 ssl_name->cmds = OPENSSL_zalloc(cnt * sizeof(struct ssl_conf_cmd_st)); in ssl_module_init() 105 if (ssl_name->cmds == NULL) in ssl_module_init() [all …]
|
/freebsd/crypto/heimdal/lib/sl/ |
H A D | sl.c | 40 mandoc_template(SL_cmd *cmds, in mandoc_template() argument 70 for(c = cmds; c->name; ++c) { in mandoc_template() 83 for(c = cmds; c->name; ++c) { in mandoc_template() 109 sl_match (SL_cmd *cmds, char *cmd, int exactp) in sl_match() argument 114 for (c = cmds; c->name; ++c) { in sl_match() 132 sl_help (SL_cmd *cmds, int argc, char **argv) in sl_help() argument 137 mandoc_template(cmds, NULL); in sl_help() 143 for (c = cmds; c->name; ++c) { in sl_help() 157 c = sl_match (cmds, argv[1], 0); in sl_help() 203 sl_command(SL_cmd *cmds, int argc, char **argv) in sl_command() argument [all …]
|
H A D | sl.h | 58 int sl_command_loop (SL_cmd *cmds, const char *prompt, void **data); 59 int sl_command (SL_cmd *cmds, int argc, char **argv); 62 SL_cmd *sl_match (SL_cmd *cmds, char *cmd, int exactp); 63 void sl_slc_help (SL_cmd *cmds, int argc, char **argv);
|
/freebsd/sys/kern/ |
H A D | sys_capability.c | 360 u_long *cmds; in cap_ioctl_check() local 375 cmds = fdep->fde_ioctls; in cap_ioctl_check() 377 if (cmds[i] == cmd) in cap_ioctl_check() 388 cap_ioctl_limit_check(struct filedescent *fdep, const u_long *cmds, in cap_ioctl_limit_check() argument 405 if (cmds[i] == ocmds[j]) in cap_ioctl_limit_check() 416 kern_cap_ioctls_limit(struct thread *td, int fd, u_long *cmds, size_t ncmds) in kern_cap_ioctls_limit() argument 439 error = cap_ioctl_limit_check(fdep, cmds, ncmds); in kern_cap_ioctls_limit() 445 fdep->fde_ioctls = cmds; in kern_cap_ioctls_limit() 449 cmds = ocmds; in kern_cap_ioctls_limit() 454 free(cmds, M_FILECAPS); in kern_cap_ioctls_limit() [all …]
|
/freebsd/contrib/nvi/ex/ |
H A D | ex_usage.c | 69 for (cp = cmds; cp->name != NULL && in ex_usage() 85 if (cp != &cmds[C_VISUAL_EX] && in ex_usage() 86 cp != &cmds[C_VISUAL_VI]) in ex_usage() 88 if (cp == &cmds[C_VISUAL_EX]) in ex_usage() 89 cp = &cmds[C_VISUAL_VI]; in ex_usage() 91 cp = &cmds[C_VISUAL_EX]; in ex_usage() 97 for (cp = cmds; cp->name != NULL && !INTERRUPTED(sp); ++cp) { in ex_usage() 106 if (cp == &cmds[C_SCROLL]) in ex_usage()
|
H A D | ex.c | 418 n = cmds[C_DELETE].name; *s == *n; ++s, ++n); in ex_cmd() 424 ecp->rcmd = cmds[C_DELETE]; in ex_cmd() 460 ecp->cmd = &cmds[C_K]; in ex_cmd() 472 ecp->rcmd = cmds[C_SUBSTITUTE]; in ex_cmd() 491 skip_srch: if (ecp->cmd == &cmds[C_VISUAL_EX] && F_ISSET(sp, SC_VI)) in ex_cmd() 492 ecp->cmd = &cmds[C_VISUAL_VI]; in ex_cmd() 503 (ecp->cmd == &cmds[C_PRINT] || in ex_cmd() 504 ecp->cmd == &cmds[C_PRESERVE])) in ex_cmd() 522 if ((ecp->cmd == &cmds[C_SHIFTL] && *p == '<') || in ex_cmd() 523 (ecp->cmd == &cmds[C_SHIFTR] && *p == '>')) { in ex_cmd() [all …]
|
/freebsd/sys/contrib/dev/iwlwifi/fw/ |
H A D | notif-wait.c | 47 if (w->cmds[i] == rec_id || in iwl_notification_wait() 48 (!iwl_cmd_groupid(w->cmds[i]) && in iwl_notification_wait() 49 DEF_ID(w->cmds[i]) == rec_id)) { in iwl_notification_wait() 85 const u16 *cmds, int n_cmds, in iwl_init_notification_wait() argument 96 memcpy(wait_entry->cmds, cmds, n_cmds * sizeof(u16)); in iwl_init_notification_wait()
|
/freebsd/tests/sys/cddl/zfs/bin/ |
H A D | chg_usr_exec.c | 39 char cmds[BUFSIZ] = { 0 }; in main() local 52 (void) snprintf(cmds+len, sizeof (cmds)-len, in main() 70 if (execl("/bin/sh", "sh", "-c", cmds, (char *)0) != 0) { in main()
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/ |
H A D | chg_usr_exec.c | 40 char cmds[BUFSIZ] = { 0 }; in main() local 53 (void) snprintf(cmds+len, sizeof (cmds)-len, in main() 71 if (execl(EXECSHELL, "sh", "-c", cmds, (char *)NULL) != 0) { in main()
|
H A D | user_ns_exec.c | 42 char cmds[BUFSIZ] = { 0 }; in child_main() local 76 (void) snprintf(cmds+len, sizeof (cmds)-len, in child_main() 81 if (execl(EXECSHELL, "sh", "-c", cmds, (char *)NULL) != 0) { in child_main()
|
/freebsd/usr.sbin/binmiscctl/ |
H A D | binmiscctl.c | 66 } cmds[] = { variable 152 for(i = 0; i < nitems(cmds); i++) { in usage() 153 fprintf(stderr, "%s:\n", cmds[i].desc); in usage() 154 fprintf(stderr, "\t%s %s %s\n\n", __progname, cmds[i].name, in usage() 155 cmds[i].args); in usage() 235 for(i = 0; i < nitems(cmds); i++) { in demux_cmd() 236 if (!strcasecmp(cmds[i].name, argv[0])) { in demux_cmd() 432 error = (*cmds[cmd].func)(argc, argv, &xbe_in); in main() 435 cmds[cmd].name); in main() 475 cmds[cmd].name); in main()
|
/freebsd/usr.bin/usbhidaction/ |
H A D | usbhidaction.c | 242 struct command *cmds = in main() local 244 if (cmds) { in main() 246 commands = cmds; in main() 283 struct command *cmd, *cmds; in parse_conf() local 292 cmds = NULL; in parse_conf() 311 freecommands(cmds); in parse_conf() 328 cmd->next = cmds; in parse_conf() 329 cmds = cmd; in parse_conf() 342 freecommands(cmds); in parse_conf() 358 freecommands(cmds); in parse_conf() [all …]
|
/freebsd/usr.bin/write/ |
H A D | write.c | 68 unsigned long cmds[] = { TIOCGETA, TIOCGWINSZ, FIODGNAME }; in main() local 97 caph_ioctls_limit(STDIN_FILENO, cmds, nitems(cmds)) < 0 || in main() 98 caph_ioctls_limit(STDOUT_FILENO, cmds, nitems(cmds)) < 0 || in main() 99 caph_ioctls_limit(STDERR_FILENO, cmds, nitems(cmds)) < 0 || in main()
|
/freebsd/tests/sys/cddl/zfs/tests/cli_root/zfs/ |
H A D | zfs_002_pos.ksh | 88 set -A cmds "create $fs" "list $fs" "snapshot $snap" "set snapdir=hidden $fs" \ 100 typeset -i i=${cmds[#]} 101 cmds[i]="allow everyone snapshot $fs" 102 cmds[((i+1))]="unallow everyone snapshot $fs"
|
/freebsd/sbin/etherswitchcfg/ |
H A D | etherswitchcfg.c | 77 struct cmds { struct 83 static struct cmds cmds[]; argument 803 for(i=0; cmds[i].name != NULL; i++) { in main() 805 if (cfg.mode == cmds[i].mode && in main() 806 strcmp(argv[0], cmds[i].name) == 0) { in main() 807 if ((cmds[i].args != -1) && in main() 808 (argc < (cmds[i].args + 1))) { in main() 810 cmds[i].name, cmds[i].args, in main() 811 (cmds[i].args==1)?"":","); in main() 815 r = (cmds[i].f)(&cfg, argc, argv); in main() [all …]
|
/freebsd/sys/netlink/ |
H A D | netlink_generic_kpi.c | 171 genl_register_cmds(const char *family_name, const struct genl_cmd *cmds, int count) in genl_register_cmds() argument 183 MPASS(cmds[i].cmd_cb != NULL); in genl_register_cmds() 184 if (cmds[i].cmd_num >= cmd_size) in genl_register_cmds() 185 cmd_size = cmds[i].cmd_num + 1; in genl_register_cmds() 201 const struct genl_cmd *cmd = &cmds[i]; in genl_register_cmds() 203 gf->family_cmds[cmd->cmd_num] = cmds[i]; in genl_register_cmds()
|
/freebsd/usr.sbin/bhyve/ |
H A D | uart_backend.c | 351 cap_ioctl_t cmds[] = { TIOCGETA, TIOCSETA, TIOCGWINSZ }; in uart_stdio_backend() local 370 if (caph_ioctls_limit(sc->tty.rfd, cmds, nitems(cmds)) == -1) in uart_stdio_backend() 384 cap_ioctl_t cmds[] = { TIOCGETA, TIOCSETA, TIOCGWINSZ }; in uart_tty_backend() local 404 if (caph_ioctls_limit(fd, cmds, nitems(cmds)) == -1) in uart_tty_backend() 423 cap_ioctl_t cmds[] = { TIOCGETA, TIOCSETA, TIOCGWINSZ }; in uart_tcp_backend() local 491 if (caph_ioctls_limit(bind_fd, cmds, nitems(cmds)) == -1) in uart_tcp_backend()
|
/freebsd/contrib/llvm-project/lld/MachO/ |
H A D | InputFiles.h | 335 std::vector<const CommandType *> cmds; in findCommands() 343 cmds.push_back(cmd); 344 if (cmds.size() == maxCommands) 345 return cmds; 349 return cmds; in findCommand() local 357 std::vector<const CommandType *> cmds = in findCommands() 359 return cmds.size() ? cmds[0] : nullptr; 327 std::vector<const CommandType *> cmds; findCommands() local
|
/freebsd/sys/dev/iwm/ |
H A D | if_iwm_notif_wait.c | 143 if (cmd == wait_entry->cmds[i]) { in iwm_notification_wait_notify() 175 struct iwm_notification_wait *wait_entry, const uint16_t *cmds, int n_cmds, in iwm_init_notification_wait() argument 184 memcpy(wait_entry->cmds, cmds, n_cmds * sizeof(uint16_t)); in iwm_init_notification_wait()
|
/freebsd/contrib/libedit/ |
H A D | parse.c | 66 } cmds[] = { variable 128 for (i = 0; cmds[i].name != NULL; i++) in el_wparse() 129 if (wcscmp(cmds[i].name, ptr) == 0) { in el_wparse() 130 i = (*cmds[i].func) (el, argc, argv); in el_wparse()
|
/freebsd/usr.bin/genl/ |
H A D | genl.c | 55 } cmds[] = { variable 180 for (size_t i = 0; i < nitems(cmds); i++) in usage() 181 fprintf(stderr, " %s %s\n", getprogname(), cmds[i].usage); in usage() 339 for (size_t i = 0; i < nitems(cmds); i++) { in main() 340 if (strcmp(argv[1], cmds[i].name) == 0) in main() 341 return (cmds[i].cmd(argc - 2, argv + 2)); in main()
|
/freebsd/tests/sys/capsicum/ |
H A D | ioctls_test.c | 69 u_long cmds[] = { FIONREAD }; in ATF_TC_BODY() local 96 ATF_REQUIRE(cap_ioctls_limit(s[0], cmds, nitems(cmds)) == 0); in ATF_TC_BODY()
|
/freebsd/crypto/openssl/ssl/ |
H A D | ssl_mcnf.c | 30 const SSL_CONF_CMD *cmds; in ssl_do_config() local 47 cmds = conf_ssl_get(idx, &name, &cmd_count); in ssl_do_config() 74 conf_ssl_get_cmd(cmds, i, &cmdstr, &arg); in ssl_do_config()
|