summaryrefslogtreecommitdiffstats
path: root/server/responder/nss/nsssrv.c
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-09-22 13:11:29 -0400
committerSimo Sorce <ssorce@redhat.com>2009-09-23 07:33:31 -0400
commit87b8670b2749d02ffdc6c06506ac692b09db5be2 (patch)
treeead3f62f72c3522d3dc7703cd9f009aabc86a023 /server/responder/nss/nsssrv.c
parent091df02f920b5f5a658962d3add6f965d84375ac (diff)
downloadsssd-87b8670b2749d02ffdc6c06506ac692b09db5be2.tar.gz
sssd-87b8670b2749d02ffdc6c06506ac692b09db5be2.tar.xz
sssd-87b8670b2749d02ffdc6c06506ac692b09db5be2.zip
Revert "Use syslog for logging error conditions in SSSD"
This reverts commit 8c50bd085c0efe5fde354deee2c8118887aae29d. Amended: commit 1016af2b1b97ad4290ccce8fa462cc7e3c191b2e also made use of the SYSLOG_ERROR() macro, so those portions of that code also needed to be reverted.
Diffstat (limited to 'server/responder/nss/nsssrv.c')
-rw-r--r--server/responder/nss/nsssrv.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/server/responder/nss/nsssrv.c b/server/responder/nss/nsssrv.c
index e0bdcdd32..3920189af 100644
--- a/server/responder/nss/nsssrv.c
+++ b/server/responder/nss/nsssrv.c
@@ -46,8 +46,6 @@
#define SSS_NSS_PIPE_NAME "nss"
-#define PRG_NAME "sssd[nss]"
-
static int service_reload(DBusMessage *message, struct sbus_connection *conn);
struct sbus_method monitor_nss_methods[] = {
@@ -115,13 +113,13 @@ static int nss_get_config(struct nss_ctx *nctx,
&nctx->cache_refresh_timeout);
if (ret != EOK) goto done;
if (nctx->cache_refresh_timeout >= nctx->cache_timeout) {
- SYSLOG_ERROR("Configuration error: EntryCacheNoWaitRefreshTimeout exceeds"
- "EntryCacheTimeout. Disabling feature.\n");
+ DEBUG(0,("Configuration error: EntryCacheNoWaitRefreshTimeout exceeds"
+ "EntryCacheTimeout. Disabling feature.\n"));
nctx->cache_refresh_timeout = 0;
}
if (nctx->cache_refresh_timeout < 0) {
- SYSLOG_ERROR("Configuration error: EntryCacheNoWaitRefreshTimeout is"
- "invalid. Disabling feature.\n");
+ DEBUG(0,("Configuration error: EntryCacheNoWaitRefreshTimeout is"
+ "invalid. Disabling feature.\n"));
nctx->cache_refresh_timeout = 0;
}
@@ -241,7 +239,7 @@ static void nss_dp_reconnect_init(struct sbus_connection *conn,
}
/* Failed to reconnect */
- SYSLOG_ERROR("Could not reconnect to data provider.\n");
+ DEBUG(0, ("Could not reconnect to data provider.\n"));
/* Kill the backend and let the monitor restart it */
nss_shutdown(rctx);
}
@@ -256,13 +254,13 @@ int nss_process_init(TALLOC_CTX *mem_ctx,
nctx = talloc_zero(mem_ctx, struct nss_ctx);
if (!nctx) {
- SYSLOG_ERROR("fatal error initializing nss_ctx\n");
+ DEBUG(0, ("fatal error initializing nss_ctx\n"));
return ENOMEM;
}
ret = nss_ncache_init(nctx, &nctx->ncache);
if (ret != EOK) {
- SYSLOG_ERROR("fatal error initializing negative cache\n");
+ DEBUG(0, ("fatal error initializing negative cache\n"));
return ret;
}
@@ -287,7 +285,7 @@ int nss_process_init(TALLOC_CTX *mem_ctx,
ret = nss_get_config(nctx, nctx->rctx, cdb);
if (ret != EOK) {
- SYSLOG_ERROR("fatal error getting nss config\n");
+ DEBUG(0, ("fatal error getting nss config\n"));
return ret;
}
@@ -296,7 +294,7 @@ int nss_process_init(TALLOC_CTX *mem_ctx,
SERVICE_CONF_ENTRY,
"reconnection_retries", 3, &max_retries);
if (ret != EOK) {
- SYSLOG_ERROR("Failed to set up automatic reconnection\n");
+ DEBUG(0, ("Failed to set up automatic reconnection\n"));
return ret;
}
@@ -335,11 +333,8 @@ int main(int argc, const char *argv[])
poptFreeContext(pc);
- /* enable syslog logging */
- openlog(PRG_NAME, LOG_PID, LOG_DAEMON);
-
/* set up things like debug , signals, daemonization, etc... */
- ret = server_setup(PRG_NAME, 0, NSS_SRV_CONFIG, &main_ctx);
+ ret = server_setup("sssd[nss]", 0, NSS_SRV_CONFIG, &main_ctx);
if (ret != EOK) return 2;
ret = die_if_parent_died();
@@ -356,9 +351,6 @@ int main(int argc, const char *argv[])
/* loop on main */
server_loop(main_ctx);
- /* close syslog */
- closelog();
-
return 0;
}