socket-util: add new connect_unix_path() helper
This is a short helper for connecting to AF_UNIX sockets in the file system. It works around the 108ch limit of sockaddr_un, and supports "at" style fds. This doesn't come with a test of its own, but the next patch will add that.
This commit is contained in:
committed by
Yu Watanabe
parent
bf7a24e50f
commit
2679aee440
@@ -332,3 +332,5 @@ int socket_get_mtu(int fd, int af, size_t *ret);
|
||||
|
||||
/* an initializer for struct ucred that initialized all fields to the invalid value appropriate for each */
|
||||
#define UCRED_INVALID { .pid = 0, .uid = UID_INVALID, .gid = GID_INVALID }
|
||||
|
||||
int connect_unix_path(int fd, int dir_fd, const char *path);
|
||||
|
||||
Reference in New Issue
Block a user