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) |
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 |
|
{ |
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; |
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)) |
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 |
502 |
|
{ |
503 |
|
fd_close(auth->fd); |
504 |
|
auth->fd = NULL; |
505 |
+ |
|
506 |
|
ClearAuth(auth); |
507 |
|
} |
508 |
|
|
535 |
|
if (IsDoingAuth(auth)) |
536 |
|
{ |
537 |
|
++ServerStats.is_abad; |
538 |
+ |
|
539 |
|
fd_close(auth->fd); |
540 |
|
auth->fd = NULL; |
541 |
|
|