diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2009-06-24 08:18:15 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-07-20 10:50:56 -0400 |
commit | 9bec63f4b9cb97c1ff1cf2ff448446ab1e59734d (patch) | |
tree | 239b25bd2f7fa264126afcb5b6d7785716e05b45 /server/monitor/monitor.c | |
parent | 7ac82a61aff588daaa1c217889b3055538380e47 (diff) | |
download | sssd-9bec63f4b9cb97c1ff1cf2ff448446ab1e59734d.tar.gz sssd-9bec63f4b9cb97c1ff1cf2ff448446ab1e59734d.tar.bz2 sssd-9bec63f4b9cb97c1ff1cf2ff448446ab1e59734d.zip |
Implement resInit for monitor, NSS, PAM, DP and the backends
Diffstat (limited to 'server/monitor/monitor.c')
-rw-r--r-- | server/monitor/monitor.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/server/monitor/monitor.c b/server/monitor/monitor.c index 1247842f..11c35d0f 100644 --- a/server/monitor/monitor.c +++ b/server/monitor/monitor.c @@ -34,6 +34,12 @@ #include <sys/stat.h> #include <unistd.h> #include <fcntl.h> + +/* Needed for res_init() */ +#include <netinet/in.h> +#include <arpa/nameser.h> +#include <resolv.h> + #include "util/util.h" #include "popt.h" #include "tevent.h" @@ -534,12 +540,18 @@ static int monitor_signal_reconf(struct config_file_ctx *file_ctx, } static int service_signal_dns_reload(struct mt_svc *svc); -int monitor_update_resolv(struct config_file_ctx *file_ctx, +static int monitor_update_resolv(struct config_file_ctx *file_ctx, const char *filename) { + int ret; struct mt_svc *cur_svc; DEBUG(2, ("Resolv.conf has been updated. Reloading.\n")); + ret = res_init(); + if(ret != 0) { + return EIO; + } + /* Signal all services to reload their DNS configuration */ for(cur_svc = file_ctx->mt_ctx->svc_list; cur_svc; cur_svc = cur_svc->next) { service_signal_dns_reload(cur_svc); |