]> jfr.im git - solanum.git/blobdiff - src/s_auth.c
chmode.c: Fix bug in printing removed bans.
[solanum.git] / src / s_auth.c
index 83407b37b3af0936e433d8085573f0967dc310d4..0ff5e191863bcbb367790936143518de03555927 100644 (file)
@@ -117,7 +117,7 @@ typedef enum
 }
 ReportType;
 
-#define sendheader(c, r) sendto_one_notice(c, HeaderMessages[(r)]) 
+#define sendheader(c, r) sendto_one_notice(c, "%s", HeaderMessages[(r)]) 
 
 static rb_dlink_list auth_poll_list;
 static rb_bh *auth_heap;
@@ -185,7 +185,6 @@ release_auth_client(struct AuthRequest *auth)
         * us. This is what read_packet() does.
         *     -- adrian
         */
-       client->localClient->allow_read = MAX_FLOOD;
        rb_dlinkAddTail(client, &client->node, &global_client_list);
        read_packet(client->localClient->F, client);
 }
@@ -297,7 +296,6 @@ static int
 start_auth_query(struct AuthRequest *auth)
 {
        struct rb_sockaddr_storage localaddr, destaddr;
-       socklen_t locallen = sizeof(struct rb_sockaddr_storage);
        rb_fde_t *F;
        int family;
        
@@ -333,14 +331,7 @@ start_auth_query(struct AuthRequest *auth)
         * since the ident request must originate from that same address--
         * and machines with multiple IP addresses are common now
         */
-       memset(&localaddr, 0, locallen);
-       if(getsockname(rb_get_fd(auth->client->localClient->F),
-                   (struct sockaddr *) &localaddr, &locallen) == -1)
-       {
-               /* can happen if connection was just closed */
-               rb_close(F);
-               return 0;
-       }
+       localaddr = auth->client->preClient->lip;
        
        /* XXX mangle_mapped_sockaddr((struct sockaddr *)&localaddr); */
 #ifdef RB_IPV6