summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2012-02-09 00:37:37 -0500
committerSimo Sorce <simo@redhat.com>2012-02-09 01:36:07 -0500
commitdfc61df4a83232c74018429080ad61a96a918df6 (patch)
treea8240dc62bbab487badba9acc846d442c6c4da94
parentf451a848968aed49267813a59269fe50a0bb8437 (diff)
downloadgss-proxy-dfc61df4a83232c74018429080ad61a96a918df6.tar.gz
gss-proxy-dfc61df4a83232c74018429080ad61a96a918df6.tar.xz
gss-proxy-dfc61df4a83232c74018429080ad61a96a918df6.zip
Remove useless connection to the proxy
Connecting to the proxy is handled internally by the client mechglue library.
-rw-r--r--proxy/tests/cli_srv_comm.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/proxy/tests/cli_srv_comm.c b/proxy/tests/cli_srv_comm.c
index 84b321a..baff865 100644
--- a/proxy/tests/cli_srv_comm.c
+++ b/proxy/tests/cli_srv_comm.c
@@ -43,36 +43,6 @@
#include "src/mechglue/gssapi_gpm.h"
#include "popt.h"
-int connect_unix_socket(const char *file_name)
-{
- struct sockaddr_un addr = {0};
- int ret = 0;
- int fd = -1;
-
- addr.sun_family = AF_UNIX;
- strncpy(addr.sun_path, file_name, sizeof(addr.sun_path)-1);
- addr.sun_path[sizeof(addr.sun_path)-1] = '\0';
-
- fd = socket(AF_UNIX, SOCK_STREAM, 0);
- if (fd == -1) {
- ret = errno;
- goto done;
- }
-
- ret = connect(fd, (struct sockaddr *)&addr, sizeof(addr));
-
-done:
- if (ret) {
- fprintf(stderr, "Failed to create Unix Socket! (%d:%s)",
- ret, strerror(ret));
- if (fd != -1) {
- close(fd);
- fd = -1;
- }
- }
- return fd;
-}
-
int gp_send_buffer(int fd, char *buf, uint32_t len)
{
uint32_t size;
@@ -335,19 +305,12 @@ void *server_thread(void *pvt)
gss_buffer_desc out_name_buf = GSS_C_EMPTY_BUFFER;
gss_OID out_name_type = GSS_C_NO_OID;
int ret;
- int fd;
data = (struct athread *)pvt;
target_buf.value = (void *)data->target;
target_buf.length = strlen(data->target) + 1;
- /* connect to the socket first to make sure the proxy is available */
- fd = connect_unix_socket(data->cfg->socket_name);
- if (fd == -1) {
- goto done;
- }
-
ret = gp_recv_buffer(data->srv_pipe[0], buffer, &buflen);
if (ret) {
fprintf(stdout, "Failed to get data from client!\n");