• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/tools/regression/sockets/unix_cmsg/

Lines Matching refs:uc_cfg

86 		uc_output("%s: %s\n", uc_cfg.proc_name, buf);
88 uc_output("%s: %s: %s\n", uc_cfg.proc_name, buf,
101 uc_output("%s: %s\n", uc_cfg.proc_name, buf);
119 if (uc_cfg.debug) {
132 fd = socket(PF_LOCAL, uc_cfg.sock_type, 0);
134 uc_logmsg("socket_create: socket(PF_LOCAL, %s, 0)", uc_cfg.sock_type_str);
137 if (uc_cfg.server_flag)
138 uc_cfg.serv_sock_fd = fd;
148 if (uc_cfg.server_flag) {
149 if (bind(fd, (struct sockaddr *)&uc_cfg.serv_addr_sun,
150 uc_cfg.serv_addr_sun.sun_len) < 0) {
152 uc_cfg.serv_addr_sun.sun_path);
155 if (uc_cfg.sock_type == SOCK_STREAM) {
179 if (uc_cfg.server_flag)
180 if (unlink(uc_cfg.serv_addr_sun.sun_path) < 0)
182 uc_cfg.serv_addr_sun.sun_path);
196 if (uc_cfg.server_flag && fd == uc_cfg.serv_sock_fd)
197 if (unlink(uc_cfg.serv_addr_sun.sun_path) < 0) {
199 uc_cfg.serv_addr_sun.sun_path);
210 if (connect(fd, (struct sockaddr *)&uc_cfg.serv_addr_sun,
211 uc_cfg.serv_addr_sun.sun_len) < 0) {
212 uc_logmsg("socket_connect: connect(%s)", uc_cfg.serv_addr_sun.sun_path);
227 fd = uc_cfg.sync_fd[uc_cfg.server_flag ? SYNC_SERVER : SYNC_CLIENT][SYNC_RECV];
252 fd = uc_cfg.sync_fd[uc_cfg.server_flag ? SYNC_CLIENT : SYNC_SERVER][SYNC_SEND];
294 if (!uc_cfg.send_data_flag)
306 for (i = 1; i <= uc_cfg.ipc_msg.msg_num; ++i) {
321 if (!uc_cfg.send_data_flag)
345 if (memcmp(uc_cfg.ipc_msg.buf_recv, uc_cfg.ipc_msg.buf_send, size) != 0) {
454 if (uc_cfg.send_data_flag) {
455 iov->iov_base = uc_cfg.server_flag ?
456 uc_cfg.ipc_msg.buf_recv : uc_cfg.ipc_msg.buf_send;
457 iov->iov_len = uc_cfg.ipc_msg.buf_size;
488 if (uc_cfg.send_array_flag)
492 msghdr->msg_controllen = uc_cfg.send_array_flag ?
497 cmsghdr->cmsg_len = CMSG_LEN(uc_cfg.send_array_flag ? arr_size : 0);
507 if (pipe(uc_cfg.sync_fd[SYNC_SERVER]) < 0 ||
508 pipe(uc_cfg.sync_fd[SYNC_CLIENT]) < 0) {
512 uc_cfg.client_pid = fork();
513 if (uc_cfg.client_pid == (pid_t)-1) {
517 if (uc_cfg.client_pid == 0) {
518 uc_cfg.proc_name = "CLIENT";
519 uc_cfg.server_flag = false;
520 fd1 = uc_cfg.sync_fd[SYNC_SERVER][SYNC_RECV];
521 fd2 = uc_cfg.sync_fd[SYNC_CLIENT][SYNC_SEND];
523 fd1 = uc_cfg.sync_fd[SYNC_SERVER][SYNC_SEND];
524 fd2 = uc_cfg.sync_fd[SYNC_CLIENT][SYNC_RECV];
530 return (uc_cfg.client_pid != 0);
536 if (close(uc_cfg.sync_fd[SYNC_SERVER][SYNC_SEND]) < 0 ||
537 close(uc_cfg.sync_fd[SYNC_CLIENT][SYNC_RECV]) < 0) {
554 if (close(uc_cfg.sync_fd[SYNC_SERVER][SYNC_RECV]) < 0 ||
555 close(uc_cfg.sync_fd[SYNC_CLIENT][SYNC_SEND]) < 0) {
560 pid = waitpid(uc_cfg.client_pid, &status, 0);
595 if (gid_num != uc_cfg.proc_cred.gid_num) {
597 uc_cfg.proc_cred.gid_num);
601 if (gid_num > uc_cfg.proc_cred.gid_num) {
603 uc_cfg.proc_cred.gid_num);
607 if (memcmp(gid_arr, uc_cfg.proc_cred.gid_arr,
611 if (gid_arr[i] != uc_cfg.proc_cred.gid_arr[i]) {
614 (u_long)uc_cfg.proc_cred.gid_arr[i]);
641 if (cmcred->cmcred_pid != uc_cfg.client_pid) {
643 (long)cmcred->cmcred_pid, (long)uc_cfg.client_pid);
646 if (cmcred->cmcred_uid != uc_cfg.proc_cred.uid) {
648 (u_long)cmcred->cmcred_uid, (u_long)uc_cfg.proc_cred.uid);
651 if (cmcred->cmcred_euid != uc_cfg.proc_cred.euid) {
653 (u_long)cmcred->cmcred_euid, (u_long)uc_cfg.proc_cred.euid);
656 if (cmcred->cmcred_gid != uc_cfg.proc_cred.gid) {
658 (u_long)cmcred->cmcred_gid, (u_long)uc_cfg.proc_cred.gid);
675 if (cmcred->cmcred_groups[0] != uc_cfg.proc_cred.egid) {
677 (u_long)cmcred->cmcred_groups[0], (u_long)uc_cfg.proc_cred.egid);
693 SOCKCREDSIZE(uc_cfg.proc_cred.gid_num)) < 0)
706 if (sc->sc_uid != uc_cfg.proc_cred.uid) {
708 (u_long)sc->sc_uid, (u_long)uc_cfg.proc_cred.uid);
711 if (sc->sc_euid != uc_cfg.proc_cred.euid) {
713 (u_long)sc->sc_euid, (u_long)uc_cfg.proc_cred.euid);
716 if (sc->sc_gid != uc_cfg.proc_cred.gid) {
718 (u_long)sc->sc_gid, (u_long)uc_cfg.proc_cred.gid);
721 if (sc->sc_egid != uc_cfg.proc_cred.egid) {
723 (u_long)sc->sc_egid, (u_long)uc_cfg.proc_cred.egid);
735 if (sc->sc_ngroups != uc_cfg.proc_cred.gid_num) {
737 sc->sc_ngroups, uc_cfg.proc_cred.gid_num);