On Wed, 2011-12-14 at 13:03 -0500, Stephen Gallagher wrote: > On Wed, 2011-12-14 at 09:15 -0500, Stephen Gallagher wrote: > > > > On Dec 14, 2011, at 9:09 AM, Jakub Hrozek <jhro...@redhat.com> wrote: > > > > > > Are you going to fix the two comments you had originally in the later > > > patch? Those were don't consider it fatal if the PID isn't found > > > in the hash in sss_child_handler() and reordering sss_child_invoke_cb() > > > > > > If so, then ack > > > > > > The first part of that I already described above as being an incorrect > > reading of the source. I missed the second part and I'll fix that > > shortly. > > > New patch attached fixes the missing reordering of the > sssd_child_invoke_cb() and adds more explicit handling of unknown PIDs > (with a new DEBUG log message).
I discovered two more issues with this patch, one serious, one cosmetic but annoying. 1) sss_child_register() wasn't assigning child->sigchld_ctx, so if the child was freed, the destructor would segfault trying to remove this child from the hash table. 2) sss_child_handler() needed to ignore a return of pid=0 (which would happen every time as the last pass through) or else it would print an error trying to find pid 0 in the hash table (which it had better not be. I don't want SSSD monitoring init!) New patches attached.
From 2a4efa28661fd7d5004042d253b3cc490768a92a Mon Sep 17 00:00:00 2001 From: Pavel Zuna <pz...@redhat.com> Date: Thu, 20 Oct 2011 13:26:18 -0400 Subject: [PATCH 1/3] Add common SIGCHLD handling for providers. --- Makefile.am | 11 ++- src/providers/child_common.c | 230 +++++++++++++++++++++++++++++++++++++- src/providers/child_common.h | 25 ++++ src/providers/data_provider_be.c | 9 ++ src/providers/dp_backend.h | 2 + 5 files changed, 269 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8d75b8767bd30532f9a241ca1518545d602beffb..fe62a3eba6caff340e92b521a930406e603b593a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -436,6 +436,7 @@ sssd_pam_LDADD = \ libsss_util.la sssd_be_SOURCES = \ + src/providers/child_common.c \ src/providers/data_provider_be.c \ src/providers/data_provider_fo.c \ src/providers/data_provider_opts.c \ @@ -984,7 +985,9 @@ krb5_child_SOURCES = \ src/providers/child_common.c \ src/providers/dp_pam_data_util.c \ src/util/user_info_msg.c \ - src/util/sss_krb5.c + src/util/sss_krb5.c \ + src/util/util.c \ + src/util/signal.c krb5_child_CFLAGS = \ $(AM_CFLAGS) \ $(POPT_CFLAGS) \ @@ -994,12 +997,15 @@ krb5_child_LDADD = \ $(TALLOC_LIBS) \ $(TEVENT_LIBS) \ $(POPT_LIBS) \ + $(DHASH_LIBS) \ $(KRB5_LIBS) ldap_child_SOURCES = \ src/providers/ldap/ldap_child.c \ src/providers/child_common.c \ - src/util/sss_krb5.c + src/util/sss_krb5.c \ + src/util/util.c \ + src/util/signal.c ldap_child_CFLAGS = \ $(AM_CFLAGS) \ $(POPT_CFLAGS) \ @@ -1010,6 +1016,7 @@ ldap_child_LDADD = \ $(TEVENT_LIBS) \ $(POPT_LIBS) \ $(OPENLDAP_LIBS) \ + $(DHASH_LIBS) \ $(KRB5_LIBS) proxy_child_SOURCES = \ diff --git a/src/providers/child_common.c b/src/providers/child_common.c index 5920ebc7423ddce81dbf4d8f2767cab201852236..34602a41ffdec7947100dbcfe2511508ddc46633 100644 --- a/src/providers/child_common.c +++ b/src/providers/child_common.c @@ -33,7 +33,225 @@ #include "db/sysdb.h" #include "providers/child_common.h" +struct sss_sigchild_ctx { + struct tevent_context *ev; + hash_table_t *children; + int options; +}; + struct sss_child_ctx { + pid_t pid; + sss_child_fn_t cb; + void *pvt; + struct sss_sigchild_ctx *sigchld_ctx; +}; + +errno_t sss_sigchld_init(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct sss_sigchild_ctx **child_ctx) +{ + errno_t ret; + struct sss_sigchild_ctx *sigchld_ctx; + struct tevent_signal *tes; + + sigchld_ctx = talloc_zero(mem_ctx, struct sss_sigchild_ctx); + if (!sigchld_ctx) { + DEBUG(0, ("fatal error initializing sss_sigchild_ctx\n")); + return ENOMEM; + } + sigchld_ctx->ev = ev; + + ret = sss_hash_create(sigchld_ctx, 10, &sigchld_ctx->children); + if (ret != EOK) { + DEBUG(SSSDBG_FATAL_FAILURE, + ("fatal error initializing children hash table: [%s]\n", + strerror(ret))); + talloc_free(sigchld_ctx); + return ret; + } + + BlockSignals(false, SIGCHLD); + tes = tevent_add_signal(ev, sigchld_ctx, SIGCHLD, SA_SIGINFO, + sss_child_handler, sigchld_ctx); + if (tes == NULL) { + talloc_free(sigchld_ctx); + return EIO; + } + + *child_ctx = sigchld_ctx; + return EOK; +} + +static int sss_child_destructor(void *ptr) +{ + struct sss_child_ctx *child_ctx; + hash_key_t key; + int error; + + child_ctx = talloc_get_type(ptr, struct sss_child_ctx); + key.type = HASH_KEY_ULONG; + key.ul = child_ctx->pid; + + error = hash_delete(child_ctx->sigchld_ctx->children, &key); + if (error != HASH_SUCCESS && error != HASH_ERROR_KEY_NOT_FOUND) { + DEBUG(SSSDBG_TRACE_INTERNAL, + ("failed to delete child_ctx from hash table [%d]: %s\n", + error, hash_error_string(error))); + } + + return 0; +} + +errno_t sss_child_register(TALLOC_CTX *mem_ctx, + struct sss_sigchild_ctx *sigchld_ctx, + pid_t pid, + sss_child_fn_t cb, + void *pvt, + struct sss_child_ctx **child_ctx) +{ + struct sss_child_ctx *child; + hash_key_t key; + hash_value_t value; + int error; + + child = talloc_zero(mem_ctx, struct sss_child_ctx); + if (child == NULL) { + return ENOMEM; + } + + child->pid = pid; + child->cb = cb; + child->pvt = pvt; + child->sigchld_ctx = sigchld_ctx; + + key.type = HASH_KEY_ULONG; + key.ul = pid; + + value.type = HASH_VALUE_PTR; + value.ptr = child; + + error = hash_enter(sigchld_ctx->children, &key, &value); + if (error != HASH_SUCCESS) { + talloc_free(child); + return ENOMEM; + } + + talloc_set_destructor((TALLOC_CTX *) child, sss_child_destructor); + + *child_ctx = child; + return EOK; +} + +struct sss_child_cb_pvt { + struct sss_child_ctx *child_ctx; + int wait_status; +}; + +static void sss_child_invoke_cb(struct tevent_context *ev, + struct tevent_immediate *imm, + void *pvt) +{ + struct sss_child_cb_pvt *cb_pvt; + struct sss_child_ctx *child_ctx; + hash_key_t key; + int error; + + cb_pvt = talloc_get_type(pvt, struct sss_child_cb_pvt); + child_ctx = cb_pvt->child_ctx; + + key.type = HASH_KEY_ULONG; + key.ul = child_ctx->pid; + + error = hash_delete(child_ctx->sigchld_ctx->children, &key); + if (error != HASH_SUCCESS && error != HASH_ERROR_KEY_NOT_FOUND) { + DEBUG(SSSDBG_OP_FAILURE, + ("failed to delete child_ctx from hash table [%d]: %s\n", + error, hash_error_string(error))); + } + + if (child_ctx->cb) { + child_ctx->cb(child_ctx->pid, cb_pvt->wait_status, child_ctx->pvt); + } +} + +void sss_child_handler(struct tevent_context *ev, + struct tevent_signal *se, + int signum, + int count, + void *siginfo, + void *private_data) +{ + struct sss_sigchild_ctx *sigchld_ctx; + struct tevent_immediate *imm; + struct sss_child_cb_pvt *invoke_pvt; + struct sss_child_ctx *child_ctx; + hash_key_t key; + hash_value_t value; + int error; + int wait_status; + pid_t pid; + + sigchld_ctx = talloc_get_type(private_data, struct sss_sigchild_ctx); + key.type = HASH_KEY_ULONG; + + do { + do { + errno = 0; + pid = waitpid(-1, &wait_status, WNOHANG | sigchld_ctx->options); + } while (pid == -1 && errno == EINTR); + + if (pid == -1) { + DEBUG(SSSDBG_TRACE_INTERNAL, + ("waitpid failed [%d]: %s\n", errno, strerror(errno))); + return; + } else if (pid == 0) continue; + + key.ul = pid; + error = hash_lookup(sigchld_ctx->children, &key, &value); + if (error == HASH_SUCCESS) { + child_ctx = talloc_get_type(value.ptr, struct sss_child_ctx); + + imm = tevent_create_immediate(sigchld_ctx->ev); + if (imm == NULL) { + DEBUG(SSSDBG_CRIT_FAILURE, + ("Out of memory invoking SIGCHLD callback\n")); + return; + } + + invoke_pvt = talloc_zero(child_ctx, struct sss_child_cb_pvt); + if (invoke_pvt == NULL) { + DEBUG(SSSDBG_CRIT_FAILURE, + ("out of memory invoking SIGCHLD callback\n")); + return; + } + invoke_pvt->child_ctx = child_ctx; + invoke_pvt->wait_status = wait_status; + + tevent_schedule_immediate(imm, sigchld_ctx->ev, + sss_child_invoke_cb, invoke_pvt); + } else if (error == HASH_ERROR_KEY_NOT_FOUND) { + DEBUG(SSSDBG_TRACE_LIBS, + ("BUG: waitpid() returned [%d] but it was not in the table. " + "This could be due to a linked library creating processes " + "without registering them with the sigchld handler\n", + pid)); + /* We will simply ignore this and return to the loop + * This will prevent a zombie, but may cause unexpected + * behavior in the code that was trying to handle this + * pid. + */ + } else { + DEBUG(SSSDBG_OP_FAILURE, + ("SIGCHLD hash table error [%d]: %s\n", + error, hash_error_string(error))); + /* This is bad, but we should try to check for other + * children anyway, to avoid potential zombies. + */ + } + } while (pid != 0); +} + +struct sss_child_ctx_old { struct tevent_signal *sige; pid_t pid; int child_status; @@ -44,11 +262,11 @@ struct sss_child_ctx { int child_handler_setup(struct tevent_context *ev, int pid, sss_child_callback_t cb, void *pvt) { - struct sss_child_ctx *child_ctx; + struct sss_child_ctx_old *child_ctx; DEBUG(8, ("Setting up signal handler up for pid [%d]\n", pid)); - child_ctx = talloc_zero(ev, struct sss_child_ctx); + child_ctx = talloc_zero(ev, struct sss_child_ctx_old); if (child_ctx == NULL) { return ENOMEM; } @@ -300,7 +518,7 @@ void child_sig_handler(struct tevent_context *ev, int count, void *__siginfo, void *pvt) { int ret, err; - struct sss_child_ctx *child_ctx; + struct sss_child_ctx_old *child_ctx; struct tevent_immediate *imm; if (count <= 0) { @@ -308,7 +526,7 @@ void child_sig_handler(struct tevent_context *ev, return; } - child_ctx = talloc_get_type(pvt, struct sss_child_ctx); + child_ctx = talloc_get_type(pvt, struct sss_child_ctx_old); DEBUG(7, ("Waiting for child [%d].\n", child_ctx->pid)); errno = 0; @@ -363,8 +581,8 @@ static void child_invoke_callback(struct tevent_context *ev, struct tevent_immediate *imm, void *pvt) { - struct sss_child_ctx *child_ctx = - talloc_get_type(pvt, struct sss_child_ctx); + struct sss_child_ctx_old *child_ctx = + talloc_get_type(pvt, struct sss_child_ctx_old); if (child_ctx->cb) { child_ctx->cb(child_ctx->child_status, child_ctx->sige, child_ctx->pvt); } diff --git a/src/providers/child_common.h b/src/providers/child_common.h index 22a77dbbe28c385c7c0e49ce8a339a68028b3658..1e9f1b6c152686ba75d5207ba48f0f131a4a2fff 100644 --- a/src/providers/child_common.h +++ b/src/providers/child_common.h @@ -45,6 +45,31 @@ struct io_buffer { size_t size; }; +/* COMMON SIGCHLD HANDLING */ +typedef void (*sss_child_fn_t)(int pid, int wait_status, void *pvt); + +struct sss_sigchild_ctx; +struct sss_child_ctx; + +/* Create a new child context to manage callbacks */ +errno_t sss_sigchld_init(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct sss_sigchild_ctx **child_ctx); + +errno_t sss_child_register(TALLOC_CTX *mem_ctx, + struct sss_sigchild_ctx *sigchld_ctx, + pid_t pid, + sss_child_fn_t cb, + void *pvt, + struct sss_child_ctx **child_ctx); + +void sss_child_handler(struct tevent_context *ev, + struct tevent_signal *se, + int signum, + int count, + void *siginfo, + void *private_data); + /* Callback to be invoked when a sigchld handler is called. * The tevent_signal * associated with the handler will be * freed automatically when this function returns. diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c index 6557f9bca25865e34afea5aebc71954587f50977..4910aa6fc50429bf2a6367ce9ffa90e5689d5c91 100644 --- a/src/providers/data_provider_be.c +++ b/src/providers/data_provider_be.c @@ -42,6 +42,7 @@ #include "sbus/sssd_dbus.h" #include "providers/dp_backend.h" #include "providers/fail_over.h" +#include "providers/child_common.h" #include "resolv/async_resolv.h" #include "monitor/monitor_interfaces.h" @@ -1176,6 +1177,14 @@ int be_process_init(TALLOC_CTX *mem_ctx, return EIO; } + ret = sss_sigchld_init(ctx, ctx->ev, &ctx->sigchld_ctx); + if (ret != EOK) { + DEBUG(SSSDBG_FATAL_FAILURE, + ("Could not initialize sigchld context: [%s]\n", + strerror(ret))); + return ret; + } + return EOK; } diff --git a/src/providers/dp_backend.h b/src/providers/dp_backend.h index 3d5e40bae43b326c00ce9464abfca1e5918ced01..0c24b82c9687b75a69f1559a16647fb0fb86c00d 100644 --- a/src/providers/dp_backend.h +++ b/src/providers/dp_backend.h @@ -24,6 +24,7 @@ #include "providers/data_provider.h" #include "providers/fail_over.h" +#include "providers/child_common.h" #include "db/sysdb.h" /* a special token, if used in place of the hostname, denotes that real @@ -93,6 +94,7 @@ struct be_ctx { const char *identity; const char *conf_path; struct be_failover_ctx *be_fo; + struct sss_sigchild_ctx *sigchld_ctx; /* Functions to be invoked when the * backend goes online or offline -- 1.7.7.4
From edbbdae3a437daff812d9b3406626b860dd06f2d Mon Sep 17 00:00:00 2001 From: Stephen Gallagher <sgall...@redhat.com> Date: Wed, 14 Dec 2011 14:32:05 -0500 Subject: [PATCH 2/3] Move child_common routines to util --- Makefile.am | 14 +++++++------- src/providers/data_provider_be.c | 2 +- src/providers/dp_backend.h | 2 +- src/providers/ipa/ipa_dyndns.c | 2 +- src/providers/ipa/ipa_init.c | 2 +- src/providers/krb5/krb5_auth.c | 2 +- src/providers/krb5/krb5_auth.h | 2 +- src/providers/krb5/krb5_child.c | 2 +- src/providers/krb5/krb5_child_handler.c | 2 +- src/providers/krb5/krb5_init.c | 2 +- src/providers/ldap/ldap_child.c | 2 +- src/providers/ldap/ldap_init.c | 2 +- src/providers/ldap/sdap_child_helpers.c | 2 +- src/{providers => util}/child_common.c | 2 +- src/{providers => util}/child_common.h | 0 15 files changed, 20 insertions(+), 20 deletions(-) rename src/{providers => util}/child_common.c (99%) rename src/{providers => util}/child_common.h (100%) diff --git a/Makefile.am b/Makefile.am index fe62a3eba6caff340e92b521a930406e603b593a..6a63a5320d0ecea8c47d07f7f1cd7788f9e0d10d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -321,7 +321,7 @@ dist_noinst_HEADERS = \ src/providers/dp_backend.h \ src/providers/fail_over.h \ src/providers/providers.h \ - src/providers/child_common.h \ + src/util/child_common.h \ src/providers/simple/simple_access.h \ src/providers/krb5/krb5_auth.h \ src/providers/krb5/krb5_common.h \ @@ -358,6 +358,9 @@ libsss_debug_la_SOURCES = \ src/util/debug.c \ src/util/sss_log.c +noinst_LTLIBRARIES += libsss_child.la +libsss_child_la_SOURCES = src/util/child_common.c + noinst_LTLIBRARIES += libsss_util.la libsss_util_la_SOURCES = \ src/confdb/confdb.c \ @@ -386,6 +389,7 @@ libsss_util_la_SOURCES = \ libsss_util_la_LIBADD = \ $(SSSD_LIBS) \ $(UNICODE_LIBS) \ + libsss_child.la \ libsss_crypt.la \ libsss_debug.la @@ -436,7 +440,6 @@ sssd_pam_LDADD = \ libsss_util.la sssd_be_SOURCES = \ - src/providers/child_common.c \ src/providers/data_provider_be.c \ src/providers/data_provider_fo.c \ src/providers/data_provider_opts.c \ @@ -830,7 +833,6 @@ dist_noinst_DATA += \ #################### libsss_ldap_la_SOURCES = \ src/util/find_uid.c \ - src/providers/child_common.c \ src/providers/ldap/ldap_id.c \ src/providers/ldap/ldap_id_enum.c \ src/providers/ldap/ldap_id_cleanup.c \ @@ -894,7 +896,6 @@ libsss_simple_la_LDFLAGS = \ libsss_krb5_la_SOURCES = \ src/util/find_uid.c \ - src/providers/child_common.c \ src/providers/krb5/krb5_utils.c \ src/providers/krb5/krb5_become_user.c \ src/providers/krb5/krb5_delayed_online_authentication.c \ @@ -919,7 +920,6 @@ libsss_krb5_la_LDFLAGS = \ -module libsss_ipa_la_SOURCES = \ - src/providers/child_common.c \ src/providers/ipa/ipa_init.c \ src/providers/ipa/ipa_common.c \ src/providers/ipa/ipa_utils.c \ @@ -982,7 +982,6 @@ libsss_ipa_la_LDFLAGS = \ krb5_child_SOURCES = \ src/providers/krb5/krb5_become_user.c \ src/providers/krb5/krb5_child.c \ - src/providers/child_common.c \ src/providers/dp_pam_data_util.c \ src/util/user_info_msg.c \ src/util/sss_krb5.c \ @@ -994,6 +993,7 @@ krb5_child_CFLAGS = \ $(KRB5_CFLAGS) krb5_child_LDADD = \ libsss_debug.la \ + libsss_child.la \ $(TALLOC_LIBS) \ $(TEVENT_LIBS) \ $(POPT_LIBS) \ @@ -1002,7 +1002,6 @@ krb5_child_LDADD = \ ldap_child_SOURCES = \ src/providers/ldap/ldap_child.c \ - src/providers/child_common.c \ src/util/sss_krb5.c \ src/util/util.c \ src/util/signal.c @@ -1012,6 +1011,7 @@ ldap_child_CFLAGS = \ $(KRB5_CFLAGS) ldap_child_LDADD = \ libsss_debug.la \ + libsss_child.la \ $(TALLOC_LIBS) \ $(TEVENT_LIBS) \ $(POPT_LIBS) \ diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c index 4910aa6fc50429bf2a6367ce9ffa90e5689d5c91..883b1ab4f7feb003243ccc57d893f35817ed88ad 100644 --- a/src/providers/data_provider_be.c +++ b/src/providers/data_provider_be.c @@ -42,7 +42,7 @@ #include "sbus/sssd_dbus.h" #include "providers/dp_backend.h" #include "providers/fail_over.h" -#include "providers/child_common.h" +#include "util/child_common.h" #include "resolv/async_resolv.h" #include "monitor/monitor_interfaces.h" diff --git a/src/providers/dp_backend.h b/src/providers/dp_backend.h index 0c24b82c9687b75a69f1559a16647fb0fb86c00d..89f86c9e693010b0f1a975be07c9eafe6ec50337 100644 --- a/src/providers/dp_backend.h +++ b/src/providers/dp_backend.h @@ -24,7 +24,7 @@ #include "providers/data_provider.h" #include "providers/fail_over.h" -#include "providers/child_common.h" +#include "util/child_common.h" #include "db/sysdb.h" /* a special token, if used in place of the hostname, denotes that real diff --git a/src/providers/ipa/ipa_dyndns.c b/src/providers/ipa/ipa_dyndns.c index e579e1d9ca28b6e48523b7dad316e46075753159..60bc6ec0c6704c45e516fdbf3b33abe85d94a2fa 100644 --- a/src/providers/ipa/ipa_dyndns.c +++ b/src/providers/ipa/ipa_dyndns.c @@ -33,7 +33,7 @@ #include "confdb/confdb.h" #include "providers/ipa/ipa_common.h" #include "providers/ipa/ipa_dyndns.h" -#include "providers/child_common.h" +#include "util/child_common.h" #include "providers/data_provider.h" #include "providers/ldap/ldap_common.h" #include "providers/ldap/sdap_async_private.h" diff --git a/src/providers/ipa/ipa_init.c b/src/providers/ipa/ipa_init.c index 57b4180cc25ad044b3c7dd2c61afc8c34f0eb4b8..9acee7bf241ba6dd7fea1b45aa589899945ea6c6 100644 --- a/src/providers/ipa/ipa_init.c +++ b/src/providers/ipa/ipa_init.c @@ -27,7 +27,7 @@ #include <sys/stat.h> #include <fcntl.h> -#include "providers/child_common.h" +#include "util/child_common.h" #include "providers/ipa/ipa_common.h" #include "providers/krb5/krb5_auth.h" #include "providers/ipa/ipa_id.h" diff --git a/src/providers/krb5/krb5_auth.c b/src/providers/krb5/krb5_auth.c index f177be5131261defe119f24247dfc6ccc02c633c..6aaf7fbefd47609c926f6b5d8ea492295d4f090f 100644 --- a/src/providers/krb5/krb5_auth.c +++ b/src/providers/krb5/krb5_auth.c @@ -35,7 +35,7 @@ #include "util/util.h" #include "util/find_uid.h" #include "db/sysdb.h" -#include "providers/child_common.h" +#include "util/child_common.h" #include "providers/krb5/krb5_auth.h" #include "providers/krb5/krb5_utils.h" diff --git a/src/providers/krb5/krb5_auth.h b/src/providers/krb5/krb5_auth.h index 0d6318d1231bbb7f8379a86bb908728d32566785..89b77d3663d2aec8dbf73178ca6827213f94d89d 100644 --- a/src/providers/krb5/krb5_auth.h +++ b/src/providers/krb5/krb5_auth.h @@ -30,7 +30,7 @@ #include "util/sss_krb5.h" #include "providers/dp_backend.h" -#include "providers/child_common.h" +#include "util/child_common.h" #include "providers/krb5/krb5_common.h" #define CCACHE_ENV_NAME "KRB5CCNAME" diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c index fe87210947cb7b826d3c9b18beb9fbf96ef5a734..01690cf4a1887b7e821853fd5b1983652d6ba6ef 100644 --- a/src/providers/krb5/krb5_child.c +++ b/src/providers/krb5/krb5_child.c @@ -32,7 +32,7 @@ #include "util/util.h" #include "util/sss_krb5.h" #include "util/user_info_msg.h" -#include "providers/child_common.h" +#include "util/child_common.h" #include "providers/dp_backend.h" #include "providers/krb5/krb5_auth.h" #include "providers/krb5/krb5_utils.h" diff --git a/src/providers/krb5/krb5_child_handler.c b/src/providers/krb5/krb5_child_handler.c index bafa0bbf27cfc04fb59941d855d078819845c36d..990a9eccbb433147bebb324c65ce5c441aeb7f73 100644 --- a/src/providers/krb5/krb5_child_handler.c +++ b/src/providers/krb5/krb5_child_handler.c @@ -23,7 +23,7 @@ */ #include "util/util.h" -#include "providers/child_common.h" +#include "util/child_common.h" #include "providers/krb5/krb5_common.h" #include "providers/krb5/krb5_auth.h" #include "src/providers/krb5/krb5_utils.h" diff --git a/src/providers/krb5/krb5_init.c b/src/providers/krb5/krb5_init.c index 6176dd187e90e7e3aa72d8fe70ba77c02438c55c..3c39d847e0b22a03ca95182e64c1b7b46a17bd90 100644 --- a/src/providers/krb5/krb5_init.c +++ b/src/providers/krb5/krb5_init.c @@ -26,7 +26,7 @@ #include <unistd.h> #include <fcntl.h> #include <sys/stat.h> -#include "providers/child_common.h" +#include "util/child_common.h" #include "providers/krb5/krb5_auth.h" #include "providers/krb5/krb5_common.h" diff --git a/src/providers/ldap/ldap_child.c b/src/providers/ldap/ldap_child.c index 02c7e55737ad743ba05e7138cf1e5554939dfdc0..160cc1ce464f4ff7ec1cfd9fc4eb31e2ddf4c5fe 100644 --- a/src/providers/ldap/ldap_child.c +++ b/src/providers/ldap/ldap_child.c @@ -31,7 +31,7 @@ #include "util/util.h" #include "util/sss_krb5.h" -#include "providers/child_common.h" +#include "util/child_common.h" #include "providers/dp_backend.h" static krb5_context krb5_error_ctx; diff --git a/src/providers/ldap/ldap_init.c b/src/providers/ldap/ldap_init.c index b4d844decce040c92f1102b474ce2a03fa092c85..e668e313d0e83bce7e5c656a553998ede03fb4c6 100644 --- a/src/providers/ldap/ldap_init.c +++ b/src/providers/ldap/ldap_init.c @@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "providers/child_common.h" +#include "util/child_common.h" #include "providers/ldap/ldap_common.h" #include "providers/ldap/sdap_async_private.h" #include "providers/ldap/sdap_access.h" diff --git a/src/providers/ldap/sdap_child_helpers.c b/src/providers/ldap/sdap_child_helpers.c index 5990fc3ac729b46cbc8ca96290b9827039a11968..704c89ec3043a43b71ef47a900c5220a7aa22149 100644 --- a/src/providers/ldap/sdap_child_helpers.c +++ b/src/providers/ldap/sdap_child_helpers.c @@ -32,7 +32,7 @@ #include "util/sss_krb5.h" #include "providers/ldap/ldap_common.h" #include "providers/ldap/sdap_async_private.h" -#include "providers/child_common.h" +#include "util/child_common.h" #ifndef SSSD_LIBEXEC_PATH #error "SSSD_LIBEXEC_PATH not defined" diff --git a/src/providers/child_common.c b/src/util/child_common.c similarity index 99% rename from src/providers/child_common.c rename to src/util/child_common.c index 34602a41ffdec7947100dbcfe2511508ddc46633..6214c7cc39539d2dd9573ea9719bf9b48284c35f 100644 --- a/src/providers/child_common.c +++ b/src/util/child_common.c @@ -31,7 +31,7 @@ #include "util/util.h" #include "util/find_uid.h" #include "db/sysdb.h" -#include "providers/child_common.h" +#include "util/child_common.h" struct sss_sigchild_ctx { struct tevent_context *ev; diff --git a/src/providers/child_common.h b/src/util/child_common.h similarity index 100% rename from src/providers/child_common.h rename to src/util/child_common.h -- 1.7.7.4
signature.asc
Description: This is a digitally signed message part
_______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/sssd-devel