From e45fcd9e478300e6be8a49402fcea81fce623804 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Fri, 12 Mar 2010 16:52:26 +0100 Subject: Flush NSCD cache after modifying local database Fixes: #221 --- src/monitor/monitor.c | 9 +++++++++ src/monitor/monitor.h | 5 +++++ 2 files changed, 14 insertions(+) (limited to 'src/monitor') diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index 56a74fba..5dff8922 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -2257,6 +2257,15 @@ int main(int argc, const char *argv[]) } } + /* Warn if nscd seems to be running */ + ret = check_file(NSCD_SOCKET_PATH, -1, -1, -1, CHECK_SOCK, NULL); + if (ret == EOK) { + DEBUG(0, ("WARNING: nscd appears to be running\n")); + ERROR("nscd socket was detected. As nscd caching capabilities " + "may conflict with SSSD, it is recommended to not run " + "nscd in parallel with SSSD\n"); + } + /* Parse config file, fail if cannot be done */ ret = load_configuration(tmp_ctx, config_file, &monitor); if (ret != EOK) { diff --git a/src/monitor/monitor.h b/src/monitor/monitor.h index 78e10ef1..54ce3943 100644 --- a/src/monitor/monitor.h +++ b/src/monitor/monitor.h @@ -25,6 +25,11 @@ #define RESOLV_CONF_PATH "/etc/resolv.conf" #define CONFIG_FILE_POLL_INTERVAL 5 /* seconds */ +/* for detecting if NSCD is running */ +#ifndef NSCD_SOCKET_PATH +#define NSCD_SOCKET_PATH "/var/run/nscd/socket" +#endif + typedef int (*monitor_reconf_fn) (struct config_file_ctx *file_ctx, const char *filename); -- cgit