Displaying 1 result from an estimated 1 matches for "get_authentication_socket".
2015 Sep 26
5
[RFC][PATCH v2] Support a list of sockets on SSH_AUTH_SOCK
...28 insertions(+), 12 deletions(-)
diff --git a/authfd.c b/authfd.c
index 12bf125..20fcba2 100644
--- a/authfd.c
+++ b/authfd.c
@@ -83,21 +83,12 @@ decode_reply(u_char type)
return SSH_ERR_INVALID_FORMAT;
}
-/* Returns the number of the authentication fd, or -1 if there is none. */
-int
-ssh_get_authentication_socket(int *fdp)
+static int
+get_authentication_socket(const char *authsocket, int *fdp)
{
- const char *authsocket;
int sock, oerrno;
struct sockaddr_un sunaddr;
- if (fdp != NULL)
- *fdp = -1;
-
- authsocket = getenv(SSH_AUTHSOCKET_ENV_NAME);
- if (!authsocket)
- return SSH_ERR_AGENT_NOT_PRESE...