summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAriel Barria <arielb@fedoraproject.org>2012-09-02 23:27:20 -0500
committerJakub Hrozek <jhrozek@redhat.com>2012-09-05 15:37:21 +0200
commit7ca43ed5bf77bec749c9f0948471ac1fa36a1b7c (patch)
tree2b07463a3c915ba341ff05ff0262ae05500328b8 /src
parent52828e4cc7f980f9e41fb604270a90b5e197c806 (diff)
downloadsssd-7ca43ed5bf77bec749c9f0948471ac1fa36a1b7c.tar.gz
sssd-7ca43ed5bf77bec749c9f0948471ac1fa36a1b7c.tar.bz2
sssd-7ca43ed5bf77bec749c9f0948471ac1fa36a1b7c.zip
SIGUSR2 should force SSSD to reread resolv.conf as well
Diffstat (limited to 'src')
-rw-r--r--src/monitor/monitor.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
index 5751cd01..d9e84c44 100644
--- a/src/monitor/monitor.c
+++ b/src/monitor/monitor.c
@@ -1307,6 +1307,20 @@ static void monitor_quit(struct tevent_context *ev,
exit(0);
}
+static void signal_res_init(struct mt_ctx *monitor)
+{
+ struct mt_svc *cur_svc;
+ int ret;
+ DEBUG(SSSDBG_OP_FAILURE, ("Reloading Resolv.conf.\n"));
+
+ ret = res_init();
+ if (ret == 0) {
+ for(cur_svc = monitor->svc_list; cur_svc; cur_svc = cur_svc->next) {
+ service_signal_dns_reload(cur_svc);
+ }
+ }
+}
+
static void signal_offline(struct tevent_context *ev,
struct tevent_signal *se,
int signum,
@@ -1319,7 +1333,8 @@ static void signal_offline(struct tevent_context *ev,
monitor = talloc_get_type(private_data, struct mt_ctx);
- DEBUG(8, ("Signaling providers to go offline immediately.\n"));
+ DEBUG(SSSDBG_TRACE_INTERNAL,
+ ("Signaling providers to go offline immediately.\n"));
/* Signal all providers to immediately go offline */
for(cur_svc = monitor->svc_list; cur_svc; cur_svc = cur_svc->next) {
@@ -1342,13 +1357,15 @@ static void signal_offline_reset(struct tevent_context *ev,
monitor = talloc_get_type(private_data, struct mt_ctx);
- DEBUG(8, ("Signaling providers to reset offline immediately.\n"));
+ DEBUG(SSSDBG_TRACE_INTERNAL,
+ ("Signaling providers to reset offline immediately.\n"));
for(cur_svc = monitor->svc_list; cur_svc; cur_svc = cur_svc->next) {
if (cur_svc->provider) {
service_signal_reset_offline(cur_svc);
}
}
+ signal_res_init(monitor);
}
static int monitor_ctx_destructor(void *mem)