Commit bfcbdc8a bfcbdc8ad5020430991c18d44d897e7d29c19366 by Sergey Poznyakoff

Add configuration keywords.

1 parent 99d9ad1a
......@@ -160,6 +160,10 @@ struct argp mu_pam_argp = {
mu_pam_argp_parser,
};
static struct mu_cfg_param pam_cfg_param[] = {
{ "service", mu_cfg_string, &pam_service },
{ NULL }
};
#else
......@@ -179,7 +183,7 @@ struct mu_auth_module mu_auth_pam_module = {
"pam",
#ifdef USE_LIBPAM
&mu_pam_argp,
NULL,
pam_cfg_param,
#else
NULL,
NULL,
......
......@@ -320,6 +320,21 @@ _expand_query (const char *query, const char *ustr, const char *passwd)
return res;
}
static int
cb_directory (mu_cfg_locus_t *locus, void *data, char *arg)
{
grad_config_dir = grad_estrdup (arg);
return 0;
}
static struct mu_cfg_param mu_radius_cfg_param[] = {
{ "auth-request", mu_cfg_string, &auth_request_str },
{ "getpwnam-request", mu_cfg_string, &getpwnam_request_str },
{ "getpwuid-request", mu_cfg_string, &getpwuid_request_str },
{ "directory", mu_cfg_callback, NULL, cb_directory },
{ NULL }
};
static grad_avp_t *
create_request (grad_avp_t *template, const char *ustr, const char *passwd)
......@@ -598,7 +613,7 @@ struct mu_auth_module mu_auth_radius_module = {
"radius",
#ifdef ENABLE_RADIUS
&mu_radius_argp,
NULL,
mu_radius_cfg_param,
#else
NULL,
NULL,
......