#include "stdinc.h"
#include "tools.h"
#include "list.h"
#include "s_auth.h"
#include "s_conf.h"
#include "client.h"
#include "common.h"
#include "event.h"
#include "fdlist.h"
#include "hook.h"
#include "irc_string.h"
#include "sprintf_irc.h"
#include "ircd.h"
#include "numeric.h"
#include "packet.h"
#include "irc_res.h"
#include "s_bsd.h"
#include "s_log.h"
#include "s_stats.h"
#include "send.h"
#include "memory.h"
Vai al codice sorgente di questo file.
Definizioni | |
#define | sendheader(c, i) sendto_one((c), HeaderMessages[(i)], me.name) |
#define | AUTH_BUFSIZ 128 |
Tipi enumerati (enum) | |
enum | { REPORT_DO_DNS, REPORT_FIN_DNS, REPORT_FAIL_DNS, REPORT_DO_ID, REPORT_FIN_ID, REPORT_FAIL_ID, REPORT_IP_MISMATCH, REPORT_HOST_TOOLONG } |
Funzioni | |
void | init_auth (void) |
static struct AuthRequest * | make_auth_request (struct Client *client) |
void | release_auth_client (struct Client *client) |
static void | auth_dns_callback (void *vptr, struct DNSReply *reply) |
static void | auth_error (struct AuthRequest *auth) |
static int | start_auth_query (struct AuthRequest *auth) |
static char * | GetValidIdent (char *buf) |
static void * | start_auth (va_list args) |
static void | timeout_auth_queries_event (void *notused) |
static void | auth_connect_callback (fde_t *fd, int error, void *data) |
static void | read_auth_reply (fde_t *fd, void *data) |
void | delete_auth (struct Client *target_p) |
Variabili | |
static const char * | HeaderMessages [] |
static dlink_list | auth_doing_dns_list = { NULL, NULL, 0 } |
static dlink_list | auth_doing_ident_list = { NULL, NULL, 0 } |
static EVH | timeout_auth_queries_event |
static PF | read_auth_reply |
static CNCB | auth_connect_callback |
static CBFUNC | start_auth |
struct Callback * | auth_cb = NULL |
#define AUTH_BUFSIZ 128 |
#define sendheader | ( | c, | |||
i | ) | sendto_one((c), HeaderMessages[(i)], me.name) |
Definizione alla linea 79 del file s_auth.c.
Referenziato da auth_dns_callback(), auth_error(), read_auth_reply(), start_auth(), start_auth_query(), e timeout_auth_queries_event().
anonymous enum |
static void auth_connect_callback | ( | fde_t * | fd, | |
int | error, | |||
void * | data | |||
) | [static] |
Definizione alla linea 476 del file s_auth.c.
Riferimenti auth_error(), AuthRequest::client, COMM_OK, AuthRequest::fd, _fde::fd, LocalUser::fd, get_client_name(), ilog(), ircsprintf(), L_INFO, Client::localClient, read_auth_reply, remove_ipv6_mapping(), SHOW_IP, socklen_t, e u_int16_t.
static void auth_dns_callback | ( | void * | vptr, | |
struct DNSReply * | reply | |||
) | [static] |
Definizione alla linea 165 del file s_auth.c.
Riferimenti DNSReply::addr, ClearDNSPending, AuthRequest::client, dlinkDelete(), AuthRequest::dns_node, LocalUser::dns_query, DNSReply::h_name, Client::host, HOSTLEN, LocalUser::ip, IsDoingAuth, Client::localClient, MyFree(), release_auth_client(), REPORT_FAIL_DNS, REPORT_FIN_DNS, REPORT_HOST_TOOLONG, REPORT_IP_MISMATCH, sendheader, irc_ssaddr::ss, e strlcpy().
Referenziato da start_auth().
static void auth_error | ( | struct AuthRequest * | auth | ) | [static] |
Definizione alla linea 229 del file s_auth.c.
Riferimenti ClearAuth, AuthRequest::client, dlinkDelete(), AuthRequest::fd, fd_close(), AuthRequest::ident_node, ServerStatistics::is_abad, IsCrit, IsDNSPending, MyFree(), release_auth_client(), REPORT_FAIL_ID, sendheader, e ServerStats.
Referenziato da auth_connect_callback(), e read_auth_reply().
void delete_auth | ( | struct Client * | target_p | ) |
Definizione alla linea 636 del file s_auth.c.
Riferimenti AuthRequest::client, _dlink_node::data, delete_resolver_queries(), DLINK_FOREACH_SAFE, dlinkDelete(), AuthRequest::dns_node, LocalUser::dns_query, AuthRequest::fd, fd_close(), _dlink_list::head, AuthRequest::ident_node, IsDoingAuth, IsUnknown, Client::localClient, e MyFree().
Referenziato da exit_client().
static char* GetValidIdent | ( | char * | buf | ) | [static] |
void init_auth | ( | void | ) |
Definizione alla linea 103 del file s_auth.c.
Riferimenti eventAddIsh(), register_callback(), start_auth, e timeout_auth_queries_event.
Referenziato da main().
static struct AuthRequest* make_auth_request | ( | struct Client * | client | ) | [static, read] |
Definizione alla linea 113 del file s_auth.c.
Riferimenti AuthRequest::client, CONNECTTIMEOUT, CurrentTime, MyMalloc(), e AuthRequest::timeout.
Referenziato da start_auth().
static void read_auth_reply | ( | fde_t * | fd, | |
void * | data | |||
) | [static] |
Definizione alla linea 544 del file s_auth.c.
Riferimenti AUTH_BUFSIZ, auth_error(), buf, ClearAuth, AuthRequest::client, COMM_SELECT_READ, comm_setselect(), dlinkDelete(), _fde::fd, fd_close(), GetValidIdent(), AuthRequest::ident_node, ignoreErrno(), ServerStatistics::is_abad, ServerStatistics::is_asuc, IsCrit, IsDNSPending, IsSpace, MyFree(), read_auth_reply, release_auth_client(), REPORT_FAIL_ID, REPORT_FIN_ID, sendheader, ServerStats, SetGotId, USERLEN, e Client::username.
void release_auth_client | ( | struct Client * | client | ) |
Definizione alla linea 129 del file s_auth.c.
Riferimenti LocalUser::allow_read, comm_setflush(), CurrentTime, dlinkAdd(), LocalUser::fd, Client::firsttime, Client::flags, FLAGS_FINISHED_AUTH, flood_recalc, global_client_list, ilog(), L_ERROR, L_OPER, Client::lasttime, Client::localClient, MAX_FLOOD, Client::name, _dlink_node::next, Client::node, _dlink_node::prev, read_packet, sendto_realops_flags(), Client::since, e UMODE_ALL.
Referenziato da auth_dns_callback(), auth_error(), read_auth_reply(), e timeout_auth_queries_event().
static void* start_auth | ( | va_list | args | ) | [static] |
Definizione alla linea 388 del file s_auth.c.
Riferimenti auth_dns_callback(), DNSQuery::callback, ClearCrit, ConfigFileEntry, config_file_entry::disable_auth, dlinkAdd(), AuthRequest::dns_node, LocalUser::dns_query, gethost_byaddr(), LocalUser::ip, Client::localClient, make_auth_request(), MyMalloc(), DNSQuery::ptr, REPORT_DO_DNS, sendheader, SetCrit, SetDNSPending, e start_auth_query().
static int start_auth_query | ( | struct AuthRequest * | auth | ) | [static] |
Definizione alla linea 256 del file s_auth.c.
Riferimenti auth_connect_callback, AuthRequest::client, comm_connect_tcp(), comm_open(), dlinkAdd(), _fde::fd, LocalUser::fd, AuthRequest::fd, get_client_name(), GlobalSetOptions, AuthRequest::ident_node, SetOptions::ident_timeout, ilog(), LocalUser::ip, ServerStatistics::is_abad, L_ALL, L_ERROR, Client::localClient, remove_ipv6_mapping(), REPORT_DO_ID, report_error(), sendheader, ServerStats, SetDoingAuth, SHOW_IP, Client::sockhost, socklen_t, e irc_ssaddr::ss.
Referenziato da start_auth().
static void timeout_auth_queries_event | ( | void * | notused | ) | [static] |
Definizione alla linea 423 del file s_auth.c.
Riferimenti AuthRequest::client, CurrentTime, _dlink_node::data, delete_resolver_queries(), DLINK_FOREACH_SAFE, dlinkDelete(), AuthRequest::dns_node, LocalUser::dns_query, AuthRequest::fd, fd_close(), get_client_name(), _dlink_list::head, AuthRequest::ident_node, ilog(), ServerStatistics::is_abad, IsDNSPending, L_INFO, Client::localClient, MyFree(), release_auth_client(), REPORT_FAIL_DNS, REPORT_FAIL_ID, sendheader, ServerStats, SHOW_IP, e AuthRequest::timeout.
CNCB auth_connect_callback [static] |
dlink_list auth_doing_dns_list = { NULL, NULL, 0 } [static] |
dlink_list auth_doing_ident_list = { NULL, NULL, 0 } [static] |
const char* HeaderMessages[] [static] |
Valore iniziale:
{ ":%s NOTICE AUTH :*** Looking up your hostname...", ":%s NOTICE AUTH :*** Found your hostname", ":%s NOTICE AUTH :*** Couldn't look up your hostname", ":%s NOTICE AUTH :*** Checking Ident", ":%s NOTICE AUTH :*** Got Ident response", ":%s NOTICE AUTH :*** No Ident response", ":%s NOTICE AUTH :*** Your forward and reverse DNS do not match, ignoring hostname.", ":%s NOTICE AUTH :*** Your hostname is too long, ignoring hostname" }
PF read_auth_reply [static] |
Definizione alla linea 92 del file s_auth.c.
Referenziato da auth_connect_callback(), e read_auth_reply().
CBFUNC start_auth [static] |
EVH timeout_auth_queries_event [static] |