aboutsummaryrefslogtreecommitdiff
path: root/src/pies.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pies.c')
-rw-r--r--src/pies.c63
1 files changed, 47 insertions, 16 deletions
diff --git a/src/pies.c b/src/pies.c
index 696e9f0..9f5f174 100644
--- a/src/pies.c
+++ b/src/pies.c
@@ -20,2 +20,3 @@
#include "meta1lex.h"
+#include "identity.h"
@@ -1543,5 +1544,11 @@ struct grecs_keyword control_keywords[] = {
N_("name: string"),
- N_("Set ACL."),
+ N_("Set connection ACL."),
+ grecs_type_section, GRECS_DFLT,
+ &control.conn_acl, 0,
+ acl_section_parser, NULL, acl_keywords},
+ {"identity-acl",
+ N_("name: string"),
+ N_("Set identity ACL."),
grecs_type_section, GRECS_DFLT,
- &control.acl, 0,
+ &control.id_acl, 0,
acl_section_parser, NULL, acl_keywords},
@@ -1762,2 +1769,4 @@ struct grecs_keyword pies_keywords[] = {
},
+ { "identity-provider", "name: string", "Configure identity provider",
+ grecs_type_section, GRECS_INAC | GRECS_HIDDEN },
{NULL}
@@ -1777,2 +1786,35 @@ config_init ()
}
+ pies_identity_mechanism_register (&system_identity_mechanism);
+#ifdef WITH_PAM
+ pies_identity_mechanism_register (&pam_identity_mechanism);
+#endif
+}
+
+static void
+config_error ()
+{
+ if (!init_process)
+ exit (EX_CONFIG);
+}
+
+void
+config_parse (char const *name)
+{
+ struct grecs_node *node;
+ struct grecs_node *tree = grecs_parse (name);
+ if (!tree)
+ config_error ();
+
+ for (node = tree; node; node = node->next)
+ {
+ node = grecs_find_node (node, "identity-provider");
+ if (!node)
+ break;
+ pies_config_provider (node);
+ }
+
+ if (grecs_tree_process (tree, pies_keywords))
+ config_error ();
+
+ grecs_tree_free (tree);
}
@@ -1788,2 +1830,3 @@ config_help ()
grecs_print_statement_array (pies_keywords, 1, 0, stdout);
+ pies_config_identity_mechanisms_help ();
}
@@ -2243,9 +2286,2 @@ set_state_file_names (const char *base)
-static void
-config_error ()
-{
- if (!init_process)
- exit (EX_CONFIG);
-}
-
int
@@ -2369,9 +2405,4 @@ main (int argc, char **argv)
case CONF_PIES:
- {
- struct grecs_node *tree = grecs_parse (file->name);
- if (!tree || grecs_tree_process (tree, pies_keywords))
- config_error ();
- grecs_tree_free (tree);
- break;
- }
+ config_parse (file->name);
+ break;

Return to:

Send suggestions and report system problems to the System administrator.