From 96ea25cbd9b94d48c57b6173eeda2b3fbe670a70 Mon Sep 17 00:00:00 2001 From: Pavel Březina Date: Mon, 8 Aug 2011 11:00:48 +0200 Subject: debug_timestamps fixes Fixed: could not overwrite debug_timestamps when set in sssd.conf Fixed: invalid description of debug_timestamps in sssd man page --- src/util/server.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src/util/server.c') diff --git a/src/util/server.c b/src/util/server.c index d33c5cb15..7d16d0484 100644 --- a/src/util/server.c +++ b/src/util/server.c @@ -473,17 +473,19 @@ int server_setup(const char *name, int flags, } /* same for debug timestamps */ - dt = (debug_timestamps != 0); - ret = confdb_get_bool(ctx->confdb_ctx, ctx, conf_entry, - CONFDB_SERVICE_DEBUG_TIMESTAMPS, - dt, &dt); - if (ret != EOK) { - DEBUG(0, ("Error reading from confdb (%d) [%s]\n", - ret, strerror(ret))); - return ret; + if (debug_timestamps == SSSDBG_TIMESTAMP_UNRESOLVED) { + ret = confdb_get_bool(ctx->confdb_ctx, ctx, conf_entry, + CONFDB_SERVICE_DEBUG_TIMESTAMPS, + SSSDBG_TIMESTAMP_DEFAULT, + &dt); + if (ret != EOK) { + DEBUG(0, ("Error reading from confdb (%d) [%s]\n", + ret, strerror(ret))); + return ret; + } + if (dt) debug_timestamps = 1; + else debug_timestamps = 0; } - if (dt) debug_timestamps = 1; - else debug_timestamps = 0; /* same for debug to file */ dl = (debug_to_file != 0); -- cgit