| 810 | } |
| 811 | |
| 812 | static int local_socket_new(void) { |
| 813 | int fd = socket(AF_UNIX, SOCK_STREAM, 0); |
| 814 | if (fd < 0) { |
| 815 | return -1; |
| 816 | } |
| 817 | if (!fd_set_cloexec(fd) || !fd_set_nonblocking(fd) || !socket_disable_sigpipe(fd)) { |
| 818 | (void)close(fd); |
| 819 | return -1; |
| 820 | } |
| 821 | return fd; |
| 822 | } |
| 823 | |
| 824 | /* Keep the only raw connect call at a sockaddr_un-typed boundary so the |
| 825 | * security audit can count and review the complete local IPC surface. */ |
no test coverage detected