2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-01 06:45:17 +00:00

socket-util: Remove 'passcred' parameter from make_unix_socket().

Nothing in the tree ever tries to send or receive credentials over a Unix
domain socket so there's no point in configuring them to be received.

Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Ben Pfaff
2012-05-14 14:32:14 -07:00
parent c50c79431e
commit 5ca92d1d5d
4 changed files with 9 additions and 20 deletions

View File

@@ -384,12 +384,11 @@ bind_unix_socket(int fd, struct sockaddr *sun, socklen_t sun_len)
/* Creates a Unix domain socket in the given 'style' (either SOCK_DGRAM or
* SOCK_STREAM) that is bound to '*bind_path' (if 'bind_path' is non-null) and
* connected to '*connect_path' (if 'connect_path' is non-null). If 'nonblock'
* is true, the socket is made non-blocking. If 'passcred' is true, the socket
* is configured to receive SCM_CREDENTIALS control messages.
* is true, the socket is made non-blocking.
*
* Returns the socket's fd if successful, otherwise a negative errno value. */
int
make_unix_socket(int style, bool nonblock, bool passcred OVS_UNUSED,
make_unix_socket(int style, bool nonblock,
const char *bind_path, const char *connect_path)
{
int error;
@@ -457,16 +456,6 @@ make_unix_socket(int style, bool nonblock, bool passcred OVS_UNUSED,
}
}
#ifdef SCM_CREDENTIALS
if (passcred) {
int enable = 1;
if (setsockopt(fd, SOL_SOCKET, SO_PASSCRED, &enable, sizeof(enable))) {
error = errno;
goto error;
}
}
#endif
return fd;
error: