]> jfr.im git - solanum.git/blobdiff - ircd/s_auth.c
authd/providers/ident: fix up trailing lf/cr at end of username
[solanum.git] / ircd / s_auth.c
index d0bde66cadc5c63c077c7607f60864ce71c85c0b..c30b9e140c5a0a47df002cb5f6fe28563a8b32ae 100644 (file)
@@ -21,7 +21,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_auth.c 3354 2007-04-03 09:21:31Z nenolod $ */
+ */
 
 /*
  * Changes:
  *     --Bleep  Thomas Helvey <tomh@inxpress.net>
  */
 #include "stdinc.h"
-#include "config.h"
+#include "defaults.h"
 #include "s_auth.h"
 #include "s_conf.h"
 #include "client.h"
-#include "common.h"
 #include "match.h"
 #include "ircd.h"
 #include "numeric.h"
@@ -269,7 +268,7 @@ start_auth_query(struct AuthRequest *auth)
        if(IsAnyDead(auth->client))
                return 0;
 
-       family = auth->client->localClient->ip.ss_family;
+       family = GET_SS_FAMILY(&auth->client->localClient->ip);
        if((F = rb_socket(family, SOCK_STREAM, 0, "ident")) == NULL)
        {
                ilog_error("creating auth stream socket");
@@ -302,7 +301,7 @@ start_auth_query(struct AuthRequest *auth)
 
        /* XXX mangle_mapped_sockaddr((struct sockaddr *)&localaddr); */
 #ifdef RB_IPV6
-       if(localaddr.ss_family == AF_INET6)
+       if(GET_SS_FAMILY(&localaddr) == AF_INET6)
        {
                auth->lport = ntohs(((struct sockaddr_in6 *)&localaddr)->sin6_port);
                ((struct sockaddr_in6 *)&localaddr)->sin6_port = 0;
@@ -316,7 +315,7 @@ start_auth_query(struct AuthRequest *auth)
 
        destaddr = auth->client->localClient->ip;
 #ifdef RB_IPV6
-       if(localaddr.ss_family == AF_INET6)
+       if(GET_SS_FAMILY(&localaddr) == AF_INET6)
        {
                auth->rport = ntohs(((struct sockaddr_in6 *)&destaddr)->sin6_port);
                ((struct sockaddr_in6 *)&destaddr)->sin6_port = htons(113);
@@ -584,7 +583,6 @@ read_auth_reply(rb_fde_t *F, void *data)
 
 /*
  * delete_auth_queries()
- *
  */
 void
 delete_auth_queries(struct Client *target_p)