ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/auth.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/auth.c (file contents):
Revision 8347 by michael, Sun Mar 4 00:17:43 2018 UTC vs.
Revision 8349 by michael, Sun Mar 4 13:24:03 2018 UTC

# Line 85 | Line 85 | static mp_pool_t *auth_pool;
85   static dlink_list auth_list;
86  
87  
88 < /*
89 < * auth_make_request - allocate a new auth request
88 > /*! \brief Allocate a new auth request.
89 > * \param client The client being looked up.
90 > * \return The newly allocated auth request.
91   */
92   static struct AuthRequest *
93   auth_make(struct Client *client)
# Line 324 | Line 325 | auth_check_ident_reply(char *const reply
325   /*! \brief Read the reply (if any) from the ident server we connected to. We
326   *         only give it one shot, if the reply isn't good the first time fail
327   *         the authentication entirely. --Bleep
328 < * \param fd The socket/fd to read from.
328 > * \param F The socket/fd to read from.
329   * \param data The request to read.
330   */
331   static void
332 < auth_read_reply(fde_t *fd, void *data)
332 > auth_read_reply(fde_t *F, void *data)
333   {
334    struct AuthRequest *const auth = data;
335    const char *username = NULL;
336    ssize_t len = 0;
337    char buf[RFC1413_BUFSIZ + 1];
338  
339 <  assert(fd == auth->fd);
339 >  assert(auth->fd == F);
340  
341    if ((len = recv(auth->fd->fd, buf, RFC1413_BUFSIZ, 0)) > 0)
342    {
# Line 376 | Line 377 | auth_read_reply(fde_t *fd, void *data)
377   * problems arise. -avalon
378   */
379   static void
380 < auth_connect_callback(fde_t *fd, int error, void *data)
380 > auth_connect_callback(fde_t *F, int error, void *data)
381   {
382    struct AuthRequest *const auth = data;
383    struct irc_ssaddr us;
# Line 394 | Line 395 | auth_connect_callback(fde_t *fd, int err
395      return;
396    }
397  
398 <  assert(fd == auth->fd);
398 >  assert(auth->fd == F);
399  
400    if (getsockname(auth->client->connection->fd->fd, (struct sockaddr *)&us, &ulen) ||
401        getpeername(auth->client->connection->fd->fd, (struct sockaddr *)&them, &tlen))
# Line 412 | Line 413 | auth_connect_callback(fde_t *fd, int err
413  
414    len = snprintf(authbuf, sizeof(authbuf), "%u, %u\r\n", tport, uport);
415  
416 <  if (send(fd->fd, authbuf, len, 0) != len)
416 >  if (send(F->fd, authbuf, len, 0) != len)
417    {
418      auth_error(auth);
419      return;
420    }
421  
422 <  comm_setselect(fd, COMM_SELECT_READ, auth_read_reply, auth, 0);
422 >  comm_setselect(F, COMM_SELECT_READ, auth_read_reply, auth, 0);
423   }
424  
425   /*! \brief Flag the client to show an attempt to contact the ident server on
# Line 501 | Line 502 | auth_delete(struct AuthRequest *auth)
502    {
503      fd_close(auth->fd);
504      auth->fd = NULL;
505 +
506      ClearAuth(auth);
507    }
508  
# Line 533 | Line 535 | auth_timeout_queries(void *notused)
535      if (IsDoingAuth(auth))
536      {
537        ++ServerStats.is_abad;
538 +
539        fd_close(auth->fd);
540        auth->fd = NULL;
541  

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)