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