Add configuration keywords.
Showing
2 changed files
with
21 additions
and
2 deletions
... | @@ -160,6 +160,10 @@ struct argp mu_pam_argp = { | ... | @@ -160,6 +160,10 @@ struct argp mu_pam_argp = { |
160 | mu_pam_argp_parser, | 160 | mu_pam_argp_parser, |
161 | }; | 161 | }; |
162 | 162 | ||
163 | static struct mu_cfg_param pam_cfg_param[] = { | ||
164 | { "service", mu_cfg_string, &pam_service }, | ||
165 | { NULL } | ||
166 | }; | ||
163 | 167 | ||
164 | #else | 168 | #else |
165 | 169 | ||
... | @@ -179,7 +183,7 @@ struct mu_auth_module mu_auth_pam_module = { | ... | @@ -179,7 +183,7 @@ struct mu_auth_module mu_auth_pam_module = { |
179 | "pam", | 183 | "pam", |
180 | #ifdef USE_LIBPAM | 184 | #ifdef USE_LIBPAM |
181 | &mu_pam_argp, | 185 | &mu_pam_argp, |
182 | NULL, | 186 | pam_cfg_param, |
183 | #else | 187 | #else |
184 | NULL, | 188 | NULL, |
185 | NULL, | 189 | NULL, | ... | ... |
... | @@ -320,6 +320,21 @@ _expand_query (const char *query, const char *ustr, const char *passwd) | ... | @@ -320,6 +320,21 @@ _expand_query (const char *query, const char *ustr, const char *passwd) |
320 | return res; | 320 | return res; |
321 | } | 321 | } |
322 | 322 | ||
323 | static int | ||
324 | cb_directory (mu_cfg_locus_t *locus, void *data, char *arg) | ||
325 | { | ||
326 | grad_config_dir = grad_estrdup (arg); | ||
327 | return 0; | ||
328 | } | ||
329 | |||
330 | static struct mu_cfg_param mu_radius_cfg_param[] = { | ||
331 | { "auth-request", mu_cfg_string, &auth_request_str }, | ||
332 | { "getpwnam-request", mu_cfg_string, &getpwnam_request_str }, | ||
333 | { "getpwuid-request", mu_cfg_string, &getpwuid_request_str }, | ||
334 | { "directory", mu_cfg_callback, NULL, cb_directory }, | ||
335 | { NULL } | ||
336 | }; | ||
337 | |||
323 | 338 | ||
324 | static grad_avp_t * | 339 | static grad_avp_t * |
325 | create_request (grad_avp_t *template, const char *ustr, const char *passwd) | 340 | create_request (grad_avp_t *template, const char *ustr, const char *passwd) |
... | @@ -598,7 +613,7 @@ struct mu_auth_module mu_auth_radius_module = { | ... | @@ -598,7 +613,7 @@ struct mu_auth_module mu_auth_radius_module = { |
598 | "radius", | 613 | "radius", |
599 | #ifdef ENABLE_RADIUS | 614 | #ifdef ENABLE_RADIUS |
600 | &mu_radius_argp, | 615 | &mu_radius_argp, |
601 | NULL, | 616 | mu_radius_cfg_param, |
602 | #else | 617 | #else |
603 | NULL, | 618 | NULL, |
604 | NULL, | 619 | NULL, | ... | ... |
-
Please register or sign in to post a comment