From 32f8c78b55f0c8b6a0c361112ebf35e470a58432 Mon Sep 17 00:00:00 2001 From: Elizabeth Myers Date: Wed, 23 Mar 2016 19:06:33 -0500 Subject: [PATCH] stupidity fixes --- authd/provider.c | 12 ++++++------ authd/providers/ident.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/authd/provider.c b/authd/provider.c index 016dfe122..3cd489c2b 100644 --- a/authd/provider.c +++ b/authd/provider.c @@ -205,25 +205,25 @@ static void start_auth(const char *cid, const char *l_ip, const char *l_port, co rb_strlcpy(auth->l_ip, l_ip, sizeof(auth->l_ip)); auth->l_port = (uint16_t)atoi(l_port); /* should be safe */ - (void) rb_inet_pton_sock(l_ip, (struct sockaddr *)&auth->l_addr, sizeof(auth->l_addr)); + (void) rb_inet_pton_sock(l_ip, (struct sockaddr *)&auth->l_addr); rb_strlcpy(auth->c_ip, c_ip, sizeof(auth->c_ip)); auth->c_port = (uint16_t)atoi(c_port); - (void) rb_inet_pton_sock(c_ip, (struct sockaddr *)&auth->c_addr, sizeof(auth->c_addr)); + (void) rb_inet_pton_sock(c_ip, (struct sockaddr *)&auth->c_addr); #ifdef RB_IPV6 if(GET_SS_FAMILY(&auth->l_addr) == AF_INET6) - ((struct sockaddr_in6 *)&l_addr)->sin6_port = htons(auth->l_port); + ((struct sockaddr_in6 *)&auth->l_addr)->sin6_port = htons(auth->l_port); else #endif - ((struct sockaddr_in *)&l_addr)->sin_port = htons(auth->l_port); + ((struct sockaddr_in *)&auth->l_addr)->sin_port = htons(auth->l_port); #ifdef RB_IPV6 if(GET_SS_FAMILY(&auth->c_addr) == AF_INET6) - ((struct sockaddr_in6 *)&c_addr)->sin6_port = htons(auth->c_port); + ((struct sockaddr_in6 *)&auth->c_addr)->sin6_port = htons(auth->c_port); else #endif - ((struct sockaddr_in *)&c_addr)->sin_port = htons(auth->c_port); + ((struct sockaddr_in *)&auth->c_addr)->sin_port = htons(auth->c_port); rb_dictionary_add(auth_clients, RB_UINT_TO_POINTER(auth->cid), auth); diff --git a/authd/providers/ident.c b/authd/providers/ident.c index 8c586bed7..3e77025ff 100644 --- a/authd/providers/ident.c +++ b/authd/providers/ident.c @@ -97,8 +97,8 @@ bool ident_start(struct auth_client *auth) query->F = F; /* Build sockaddr_storages for rb_connect_tcp below */ - memcpy(&l_addr, auth->l_addr, sizeof(l_addr)); - memcpy(&c_addr, auth->c_addr, sizeof(c_addr)); + memcpy(&l_addr, &auth->l_addr, sizeof(l_addr)); + memcpy(&c_addr, &auth->c_addr, sizeof(c_addr)); /* Set the ports correctly */ #ifdef RB_IPV6