diff options
Diffstat (limited to '')
-rw-r--r-- | src/conf.c | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -115,6 +115,10 @@ static HANDLE_FUNC (handle_nop) return 0; } /* do nothing function */ +#ifdef AUTH_SUPPORT +static HANDLE_FUNC (handle_authusername); +static HANDLE_FUNC (handle_authstring); +#endif static HANDLE_FUNC (handle_allow); static HANDLE_FUNC (handle_anonymous); static HANDLE_FUNC (handle_bind); @@ -233,6 +237,10 @@ struct { STDCONF ("errorfile", INT WS STR, handle_errorfile), STDCONF ("addheader", STR WS STR, handle_addheader), +#ifdef AUTH_SUPPORT + STDCONF ("authusername", STR, handle_authusername), + STDCONF ("authstring", STR, handle_authstring), +#endif #ifdef FILTER_ENABLE /* filtering */ STDCONF ("filter", STR, handle_filter), @@ -289,6 +297,10 @@ static void free_config (struct config_s *conf) safefree (conf->user); safefree (conf->group); vector_delete(conf->listen_addrs); +#ifdef AUTH_SUPPORT + safefree (conf->auth_username); + safefree (conf->auth_string); +#endif #ifdef FILTER_ENABLE safefree (conf->filter); #endif /* FILTER_ENABLE */ @@ -479,6 +491,14 @@ static void initialize_with_defaults (struct config_s *conf, } +#ifdef AUTH_SUPPORT + if (conf->auth_username) { + conf->auth_username = safestrdup (defaults->auth_username); + } + if (conf->auth_string) { + conf->auth_string = safestrdup (defaults->auth_string); + } +#endif #ifdef FILTER_ENABLE if (defaults->filter) { conf->filter = safestrdup (defaults->filter); @@ -994,6 +1014,17 @@ static HANDLE_FUNC (handle_loglevel) return -1; } +#ifdef AUTH_SUPPORT +static HANDLE_FUNC (handle_authusername) +{ + return set_string_arg (&conf->auth_username, line, &match[2]); +} +static HANDLE_FUNC (handle_authstring) +{ + return set_string_arg (&conf->auth_string, line, &match[2]); +} +#endif + #ifdef FILTER_ENABLE static HANDLE_FUNC (handle_filter) { |