jabberd2
2.2.16
|
Go to the source code of this file.
Data Structures | |
struct | _authreg_error_st |
Typedefs | |
typedef struct _authreg_error_st * | authreg_error_t |
Functions | |
authreg_t | authreg_init (c2s_t c2s, char *name) |
get a handle for the named module | |
void | authreg_free (authreg_t ar) |
shutdown the authreg system | |
static void | _authreg_auth_log (c2s_t c2s, sess_t sess, char *method, char *username, char *resource, int success) |
auth logger | |
static void | _authreg_auth_get (c2s_t c2s, sess_t sess, nad_t nad) |
auth get handler | |
static void | _authreg_auth_set (c2s_t c2s, sess_t sess, nad_t nad) |
auth set handler | |
static void | _authreg_register_get (c2s_t c2s, sess_t sess, nad_t nad) |
register get handler | |
static void | _authreg_register_set (c2s_t c2s, sess_t sess, nad_t nad) |
register set handler | |
int | authreg_process (c2s_t c2s, sess_t sess, nad_t nad) |
processor for iq:auth and iq:register packets return 0 if handled, 1 if not handled |
typedef struct _authreg_error_st * authreg_error_t |
get a handle for the named module
get a handle for a single module
Definition at line 40 of file authreg.c.
References PATH_MAX, config_get_one(), c2s_st::config, log_write(), c2s_st::log, log_debug, ZONE, authreg_st::c2s, authreg_free(), and authreg_st::user_exists.
Referenced by JABBER_MAIN().
void authreg_free | ( | authreg_t | ar | ) |
shutdown the authreg system
shut down
Definition at line 115 of file authreg.c.
References authreg_st::free.
Referenced by authreg_init(), and JABBER_MAIN().
static void _authreg_auth_log | ( | c2s_t | c2s, |
sess_t | sess, | ||
char * | method, | ||
char * | username, | ||
char * | resource, | ||
int | success | ||
) | [inline, static] |
auth logger
Definition at line 123 of file authreg.c.
References log_write(), c2s_st::log, sess_st::s, _sx_st::tag, sess_st::host, host_st::realm, _sx_st::ip, _sx_st::port, _sx_st::ssf, and _sx_st::compressed.
Referenced by _authreg_auth_set().
auth get handler
Definition at line 133 of file authreg.c.
References sess_st::active, sx_nad_write, sess_st::s, stanza_tofrom(), stanza_error(), stanza_err_NOT_ALLOWED, nad_find_scoped_namespace(), uri_AUTH, nad_find_elem(), log_debug, ZONE, stanza_err_BAD_REQUEST, NAD_CDATA_L, NAD_CDATA, stanza_err_JID_MALFORMED, c2s_st::ar_mechanisms, _sx_st::ssf, c2s_st::ar_ssl_mechanisms, AR_MECH_TRAD_PLAIN, AR_MECH_TRAD_DIGEST, stanza_err_FORBIDDEN, c2s_st::ar, authreg_st::user_exists, sess_st::host, host_st::realm, stanza_err_OLD_UNAUTH, nad_find_attr(), NAD_AVAL_L, NAD_AVAL, nad_free(), nad_new(), nad_add_namespace(), uri_CLIENT, nad_append_elem(), nad_append_attr(), nad_append_cdata(), authreg_st::get_password, and authreg_st::check_password.
Referenced by authreg_process().
auth set handler
Definition at line 219 of file authreg.c.
References sess_st::active, sx_nad_write, sess_st::s, stanza_tofrom(), stanza_error(), stanza_err_NOT_ALLOWED, nad_find_scoped_namespace(), uri_AUTH, nad_find_elem(), log_debug, ZONE, stanza_err_BAD_REQUEST, NAD_CDATA_L, NAD_CDATA, stanza_err_JID_MALFORMED, c2s_st::ar_mechanisms, _sx_st::ssf, c2s_st::ar_ssl_mechanisms, AR_MECH_TRAD_PLAIN, AR_MECH_TRAD_DIGEST, stanza_err_FORBIDDEN, c2s_st::ar, authreg_st::user_exists, sess_st::host, host_st::realm, stanza_err_OLD_UNAUTH, authreg_st::get_password, _sx_st::id, shahash_r(), _authreg_auth_log(), TRUE, authreg_st::check_password, sess_st::resources, bres_st::c2s_id, _sx_st::tag, bres_st::jid, jid_new(), _sx_st::req_to, jid_reset_components(), jid_st::domain, log_write(), sess_st::c2s, c2s_st::log, jid_full(), sess_st::result, nad_new(), nad_add_namespace(), uri_CLIENT, nad_append_elem(), nad_set_attr(), nad_find_attr(), NAD_AVAL, NAD_AVAL_L, sm_start(), nad_free(), and FALSE.
Referenced by authreg_process().
register get handler
Definition at line 383 of file authreg.c.
References sess_st::active, c2s_st::ar, authreg_st::set_password, authreg_st::create_user, sess_st::host, host_st::ar_register_enable, host_st::ar_register_oob, sx_nad_write, sess_st::s, stanza_tofrom(), stanza_error(), stanza_err_NOT_ALLOWED, nad_find_attr(), NAD_AVAL_L, NAD_AVAL, nad_free(), nad_new(), nad_add_namespace(), uri_CLIENT, nad_append_elem(), nad_append_attr(), uri_REGISTER, nad_append_cdata(), host_st::ar_register_instructions, and uri_OOB.
Referenced by authreg_process().
register set handler
Definition at line 434 of file authreg.c.
References sess_st::host, host_st::ar_register_enable, host_st::ar_register_password, c2s_st::ar, authreg_st::set_password, sx_nad_write, sess_st::s, stanza_tofrom(), stanza_error(), stanza_err_NOT_ALLOWED, nad_find_scoped_namespace(), uri_REGISTER, sess_st::active, nad_find_elem(), log_debug, ZONE, authreg_st::delete_user, sess_st::resources, bres_st::jid, jid_st::node, host_st::realm, stanza_err_INTERNAL_SERVER_ERROR, log_write(), c2s_st::log, _sx_st::tag, jid_user(), sess_st::result, nad_new(), nad_add_namespace(), uri_CLIENT, nad_append_elem(), nad_set_attr(), nad_find_attr(), NAD_AVAL, NAD_AVAL_L, nad_free(), sm_delete(), stanza_err_BAD_REQUEST, NAD_CDATA_L, NAD_CDATA, stanza_err_JID_MALFORMED, jid_full(), stanza_err_OLD_UNAUTH, authreg_st::user_exists, stanza_err_CONFLICT, authreg_st::create_user, bres_st::c2s_id, jid_new(), _sx_st::req_to, jid_reset_components(), jid_st::domain, jid_st::resource, and sm_create().
Referenced by authreg_process().
processor for iq:auth and iq:register packets return 0 if handled, 1 if not handled
the main authreg processor
Definition at line 626 of file authreg.c.
References NAD_ENAME_L, NAD_ENAME, nad_find_scoped_namespace(), uri_AUTH, nad_find_elem(), uri_REGISTER, nad_find_attr(), sess_st::s, _sx_st::req_to, NAD_AVAL_L, sx_nad_write, stanza_tofrom(), stanza_error(), stanza_err_BAD_REQUEST, NAD_AVAL, sess_st::sasl_authd, stanza_err_NOT_ALLOWED, log_debug, ZONE, _authreg_auth_get(), _authreg_auth_set(), _authreg_register_get(), and _authreg_register_set().
Referenced by _c2s_client_sx_callback().