ircd/authd: respect auth_disabled config option

This commit is contained in:
Elizabeth Myers 2016-03-28 02:42:20 -05:00
parent 59d42a9fcb
commit ad04380360
2 changed files with 8 additions and 0 deletions

View file

@ -55,5 +55,6 @@ void add_blacklist(const char *host, const char *reason, uint8_t iptype, rb_dlin
void del_blacklist(const char *host); void del_blacklist(const char *host);
void del_blacklist_all(void); void del_blacklist_all(void);
void set_authd_timeout(const char *key, int timeout); void set_authd_timeout(const char *key, int timeout);
void ident_check_enable(bool enabled);
#endif #endif

View file

@ -316,6 +316,7 @@ configure_authd(void)
set_authd_timeout("ident_timeout", GlobalSetOptions.ident_timeout); set_authd_timeout("ident_timeout", GlobalSetOptions.ident_timeout);
set_authd_timeout("rdns_timeout", ConfigFileEntry.connect_timeout); set_authd_timeout("rdns_timeout", ConfigFileEntry.connect_timeout);
set_authd_timeout("blacklist_timeout", ConfigFileEntry.connect_timeout); set_authd_timeout("blacklist_timeout", ConfigFileEntry.connect_timeout);
ident_check_enable(ConfigFileEntry.disable_auth);
} }
static void static void
@ -576,3 +577,9 @@ set_authd_timeout(const char *key, int timeout)
{ {
rb_helper_write(authd_helper, "O %s %d", key, timeout); rb_helper_write(authd_helper, "O %s %d", key, timeout);
} }
void
ident_check_enable(bool enabled)
{
rb_helper_write(authd_helper, "O ident_enabled %d", enabled ? 1 : 0);
}