Lines Matching defs:bufs
336 char *bufs[PRIVSEP_NBUF_MAX];
352 bufs[i] = (char *)data;
353 data += combuf->bufs.buflen[i];
354 totallen += combuf->bufs.buflen[i];
359 "corrupted privsep message (bufs too big)\n");
389 bufs[0][combuf->bufs.buflen[0] - 1] = '\0';
391 if (unsafe_path(bufs[0], LC_PATHTYPE_CERT) != 0) {
394 "unsafe cert \"%s\"\n", bufs[0]);
398 "eay_get_pkcs1privkey(\"%s\")\n", bufs[0]);
400 if ((privkey = eay_get_pkcs1privkey(bufs[0])) == NULL){
405 reply->bufs.buflen[0] = privkey->l;
429 * First count the bufs, and make sure strings
436 bufs[0][combuf->bufs.buflen[0] - 1] = '\0';
442 if (combuf->bufs.buflen[count] == 0)
444 bufs[count]
445 [combuf->bufs.buflen[count] - 1] = '\0';
475 script = bufs[count++];
477 if (combuf->bufs.buflen[count] != sizeof(name)) {
482 memcpy((char *)&name, bufs[count++], sizeof(name));
484 for (i = 0; combuf->bufs.buflen[count]; count++)
485 envp[i++] = bufs[count];
518 bufs[0][combuf->bufs.buflen[0] - 1] = '\0';
520 if (combuf->bufs.buflen[1] != sizeof(keylen)) {
525 memcpy(&keylen, bufs[1], sizeof(keylen));
528 "getpsk(\"%s\", %d)\n", bufs[0], keylen);
530 if ((psk = getpsk(bufs[0], keylen)) == NULL) {
535 reply->bufs.buflen[0] = psk->l;
558 if (combuf->bufs.buflen[0] !=
564 memcpy(&socket_args, bufs[0],
601 if (combuf->bufs.buflen[0] !=
607 memcpy(&bind_args, bufs[0], sizeof(struct bind_args));
609 if (combuf->bufs.buflen[1] != bind_args.addrlen) {
614 bind_args.addr = (const struct sockaddr *)bufs[1];
652 if (combuf->bufs.buflen[0] !=
659 memcpy(&sockopt_args, bufs[0],
662 if (combuf->bufs.buflen[1] != sockopt_args.optlen) {
667 sockopt_args.optval = bufs[1];
713 memcpy(&port, bufs[0], sizeof(port));
714 raddr = (struct sockaddr *)bufs[1];
716 bufs[2][combuf->bufs.buflen[2] - 1] = '\0';
717 memcpy(&inout, bufs[3], sizeof(port));
724 port, saddr2str(raddr), bufs[2]);
728 raddr, bufs[2], inout) != 0) {
739 bufs[0][combuf->bufs.buflen[0] - 1] = '\0';
743 bufs[1][combuf->bufs.buflen[1] - 1] = '\0';
747 bufs[0]);
750 if (xauth_login_system(bufs[0], bufs[1]) != 0) {
771 memcpy(&port, bufs[0], sizeof(port));
772 memcpy(&inout, bufs[1], sizeof(inout));
773 memcpy(&pool_size, bufs[2], sizeof(pool_size));
812 memcpy(&port, bufs[0], sizeof(port));
813 memcpy(&pool_size, bufs[1], sizeof(pool_size));
814 raddr = (struct sockaddr *)bufs[2];
816 bufs[3][combuf->bufs.buflen[3] - 1] = '\0';
817 bufs[4][combuf->bufs.buflen[4] - 1] = '\0';
828 port, saddr2str(raddr), bufs[3]);
832 raddr, bufs[3], bufs[4]) != 0) {
850 memcpy(&port, bufs[0], sizeof(port));
851 memcpy(&pool_size, bufs[1], sizeof(pool_size));
916 msg->bufs.buflen[0] = len - sizeof(*msg);
917 memcpy(msg + 1, path, msg->bufs.buflen[0]);
994 msg->bufs.buflen[count] = strlen(script) + 1; /* script */
995 msg->hdr.ac_len += msg->bufs.buflen[count++];
997 msg->bufs.buflen[count] = sizeof(name); /* name */
998 msg->hdr.ac_len += msg->bufs.buflen[count++];
1001 msg->bufs.buflen[count] = strlen(*c) + 1;
1002 msg->hdr.ac_len += msg->bufs.buflen[count++];
1005 msg->bufs.buflen[count] = 0; /* void */
1006 msg->hdr.ac_len += msg->bufs.buflen[count++];
1020 memcpy(data, (char *)script, msg->bufs.buflen[count]); /* script */
1021 data += msg->bufs.buflen[count++];
1023 memcpy(data, (char *)&name, msg->bufs.buflen[count]); /* name */
1024 data += msg->bufs.buflen[count++];
1027 memcpy(data, *c, msg->bufs.buflen[count]);
1028 data += msg->bufs.buflen[count++];
1077 msg->bufs.buflen[0] = strlen(str) + 1;
1078 memcpy(data, str, msg->bufs.buflen[0]);
1080 data += msg->bufs.buflen[0];
1081 msg->bufs.buflen[1] = sizeof(keylen);
1143 msg->bufs.buflen[0] = sizeof(socket_args);
1144 memcpy(data, &socket_args, msg->bufs.buflen[0]);
1212 msg->bufs.buflen[0] = sizeof(bind_args);
1213 memcpy(data, &bind_args, msg->bufs.buflen[0]);
1215 data += msg->bufs.buflen[0];
1216 msg->bufs.buflen[1] = addrlen;
1292 msg->bufs.buflen[0] = sizeof(sockopt_args);
1293 memcpy(data, &sockopt_args, msg->bufs.buflen[0]);
1295 data += msg->bufs.buflen[0];
1296 msg->bufs.buflen[1] = optlen;
1349 msg->bufs.buflen[0] = strlen(usr) + 1;
1350 memcpy(data, usr, msg->bufs.buflen[0]);
1351 data += msg->bufs.buflen[0];
1353 msg->bufs.buflen[1] = strlen(pwd) + 1;
1354 memcpy(data, pwd, msg->bufs.buflen[1]);
1402 msg->bufs.buflen[0] = sizeof(port);
1403 msg->bufs.buflen[1] = sysdep_sa_len(raddr);
1404 msg->bufs.buflen[2] = strlen(usr) + 1;
1405 msg->bufs.buflen[3] = sizeof(inout);
1408 memcpy(data, &port, msg->bufs.buflen[0]);
1410 data += msg->bufs.buflen[0];
1411 memcpy(data, raddr, msg->bufs.buflen[1]);
1413 data += msg->bufs.buflen[1];
1414 memcpy(data, usr, msg->bufs.buflen[2]);
1416 data += msg->bufs.buflen[2];
1417 memcpy(data, &inout, msg->bufs.buflen[3]);
1465 if (msg->bufs.buflen[index] == 0) {
1655 msg->bufs.buflen[0] = sizeof(port);
1656 msg->bufs.buflen[1] = sizeof(inout);
1657 msg->bufs.buflen[2] = sizeof(isakmp_cfg_config.pool_size);
1716 msg->bufs.buflen[0] = sizeof(port);
1717 msg->bufs.buflen[1] = sizeof(isakmp_cfg_config.pool_size);
1718 msg->bufs.buflen[2] = sysdep_sa_len(raddr);
1719 msg->bufs.buflen[3] = strlen(usr) + 1;
1720 msg->bufs.buflen[4] = strlen(pwd) + 1;
1723 memcpy(data, &port, msg->bufs.buflen[0]);
1725 data += msg->bufs.buflen[0];
1726 memcpy(data, &isakmp_cfg_config.pool_size, msg->bufs.buflen[1]);
1728 data += msg->bufs.buflen[1];
1729 memcpy(data, raddr, msg->bufs.buflen[2]);
1731 data += msg->bufs.buflen[2];
1732 memcpy(data, usr, msg->bufs.buflen[3]);
1734 data += msg->bufs.buflen[3];
1735 memcpy(data, pwd, msg->bufs.buflen[4]);
1782 msg->bufs.buflen[0] = sizeof(port);
1783 msg->bufs.buflen[1] = sizeof(isakmp_cfg_config.pool_size);
1786 memcpy(data, &port, msg->bufs.buflen[0]);
1788 data += msg->bufs.buflen[0];
1789 memcpy(data, &isakmp_cfg_config.pool_size, msg->bufs.buflen[1]);