| 631 | } |
| 632 | |
| 633 | static int local_socket_new(void) { |
| 634 | int fd = socket(AF_UNIX, SOCK_STREAM, 0); |
| 635 | if (fd < 0) { |
| 636 | return -1; |
| 637 | } |
| 638 | if (!fd_set_cloexec(fd) || !fd_set_nonblocking(fd) || !socket_disable_sigpipe(fd)) { |
| 639 | (void)close(fd); |
| 640 | return -1; |
| 641 | } |
| 642 | return fd; |
| 643 | } |
| 644 | |
| 645 | /* Keep the only raw connect call at a sockaddr_un-typed boundary so the |
| 646 | * security audit can count and review the complete local IPC surface. */ |
no test coverage detected