diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2009-05-14 12:21:37 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-05-15 19:09:52 -0400 |
commit | d6b65c36b2b0391a37a78963fd679460b5bba60a (patch) | |
tree | d2f42080699a74ac3f146c71184077d5704eb667 | |
parent | 67ce05ee0351a4d014a726e7a2e6757e13e2a201 (diff) | |
download | sssd_unused-d6b65c36b2b0391a37a78963fd679460b5bba60a.tar.gz sssd_unused-d6b65c36b2b0391a37a78963fd679460b5bba60a.tar.xz sssd_unused-d6b65c36b2b0391a37a78963fd679460b5bba60a.zip |
Treat the local provider as a special case
The local provider needs no backend, so we'll create a special
provider entry for it called "local" that will not attempt to
retrieve provider configuration but will remain in the service
list so it can be updated when the config file changes.
-rw-r--r-- | server/examples/sssd.conf | 1 | ||||
-rw-r--r-- | server/monitor/monitor.c | 17 |
2 files changed, 17 insertions, 1 deletions
diff --git a/server/examples/sssd.conf b/server/examples/sssd.conf index a480b549..1841152a 100644 --- a/server/examples/sssd.conf +++ b/server/examples/sssd.conf @@ -60,6 +60,7 @@ description = Domains served by SSSD ; [domains/LOCAL] ; description = LOCAL Users domain +; provider = local ; enumerate = 3 ; minId = 500 ; maxId = 999 diff --git a/server/monitor/monitor.c b/server/monitor/monitor.c index 1d8f33e4..91015410 100644 --- a/server/monitor/monitor.c +++ b/server/monitor/monitor.c @@ -516,6 +516,11 @@ static int service_signal_reload(struct mt_svc *svc) DBusConnection *conn; DBusPendingCall *pending_reply; + if (svc->provider && strcasecmp(svc->provider, "local") == 0) { + /* The local provider requires no signaling */ + return EOK; + } + conn = sbus_get_connection(svc->mt_conn->conn_ctx); msg = dbus_message_new_method_call(NULL, SERVICE_PATH, @@ -954,7 +959,7 @@ static int update_monitor_config(struct mt_ctx *ctx) cur_svc = cur_svc->next; } if (cur_svc == NULL) { - DEBUG(0, ("Service entry missing data\n")); + DEBUG(0, ("Service entry missing data for [%s]\n", new_dom->name)); /* This shouldn't be possible */ talloc_free(new_config); @@ -1911,6 +1916,16 @@ static void service_startup_handler(struct tevent_context *ev, return; } + if (mt_svc->provider && strcasecmp(mt_svc->provider, "local") == 0) { + /* The LOCAL provider requires no back-end currently + * We'll add it to the service list, but we don't need + * to poll it. + */ + DLIST_ADD(mt_svc->mt_ctx->svc_list, mt_svc); + talloc_set_destructor((TALLOC_CTX *)mt_svc, delist_service); + return; + } + mt_svc->pid = fork(); if (mt_svc->pid != 0) { if (mt_svc->pid == -1) { |