diff options
author | Simo Sorce <ssorce@redhat.com> | 2009-03-20 11:10:56 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-03-20 11:14:57 -0400 |
commit | de69927053fcc56a337af4ab0c93d24444eb6c24 (patch) | |
tree | db4ee2b6d5aac4e217c2deb94d45cb0f09c08ade /server/providers | |
parent | 7d5bf9a11d60e5330e12d5d94ebba8d6a4606eb0 (diff) | |
download | sssd-de69927053fcc56a337af4ab0c93d24444eb6c24.tar.gz sssd-de69927053fcc56a337af4ab0c93d24444eb6c24.tar.bz2 sssd-de69927053fcc56a337af4ab0c93d24444eb6c24.zip |
Enhance server_setup
Now it can load from scratch default configuration that is valid for all
daemons.
First thing, make it possible for each daemon/provider to set its own debug
level in its configuration entry.
Diffstat (limited to 'server/providers')
-rw-r--r-- | server/providers/data_provider.c | 6 | ||||
-rw-r--r-- | server/providers/data_provider_be.c | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/server/providers/data_provider.c b/server/providers/data_provider.c index cc437c9a..183fdc4e 100644 --- a/server/providers/data_provider.c +++ b/server/providers/data_provider.c @@ -43,6 +43,8 @@ #include "monitor/monitor_interfaces.h" #include "responder/pam/pamsrv.h" +#define DP_CONF_ENTRY "config/services/dp" + struct dp_backend; struct dp_frontend; @@ -1004,7 +1006,7 @@ static int dp_srv_init(struct dp_ctx *dpctx) } ret = confdb_get_string(dpctx->cdb, tmp_ctx, - "config/services/dataprovider", "dpbusAddress", + DP_CONF_ENTRY, "dpbusAddress", default_dp_address, &dpbus_address); if (ret != EOK) goto done; @@ -1100,7 +1102,7 @@ int main(int argc, const char *argv[]) poptFreeContext(pc); /* set up things like debug , signals, daemonization, etc... */ - ret = server_setup("sssd[dp]", 0, &main_ctx); + ret = server_setup("sssd[dp]", 0, DP_CONF_ENTRY, &main_ctx); if (ret != EOK) return 2; ret = dp_process_init(main_ctx, diff --git a/server/providers/data_provider_be.c b/server/providers/data_provider_be.c index 8796ec14..675fb634 100644 --- a/server/providers/data_provider_be.c +++ b/server/providers/data_provider_be.c @@ -47,6 +47,8 @@ #include "monitor/monitor_interfaces.h" #include "../sss_client/sss_cli.h" +#define BE_CONF_ENTRY "config/domains/%s" + typedef int (*be_init_fn_t)(TALLOC_CTX *, struct be_mod_ops **, void **); static int service_identity(DBusMessage *message, struct sbus_conn_ctx *sconn); @@ -881,6 +883,7 @@ int main(int argc, const char *argv[]) char *be_name; char *be_domain; char *srv_name; + char *conf_entry; struct main_context *main_ctx; int ret; @@ -911,7 +914,10 @@ int main(int argc, const char *argv[]) srv_name = talloc_asprintf(NULL, "sssd[be[%s]]", be_name); if (!srv_name) return 2; - ret = server_setup(srv_name, 0, &main_ctx); + conf_entry = talloc_asprintf(NULL, BE_CONF_ENTRY, be_domain); + if (!conf_entry) return 2; + + ret = server_setup(srv_name, 0, conf_entry, &main_ctx); if (ret != EOK) { DEBUG(0, ("Could not set up mainloop [%d]\n", ret)); return 2; |