diff options
-rw-r--r-- | src/confdb/confdb.h | 1 | ||||
-rw-r--r-- | src/config/SSSDConfig/__init__.py.in | 1 | ||||
-rwxr-xr-x | src/config/SSSDConfigTest.py | 3 | ||||
-rw-r--r-- | src/config/etc/sssd.api.conf | 2 | ||||
-rw-r--r-- | src/man/sssd.conf.5.xml | 13 | ||||
-rw-r--r-- | src/util/server.c | 15 |
6 files changed, 34 insertions, 1 deletions
diff --git a/src/confdb/confdb.h b/src/confdb/confdb.h index 3ed82ca0a..0a3d6a035 100644 --- a/src/confdb/confdb.h +++ b/src/confdb/confdb.h @@ -53,6 +53,7 @@ #define CONFDB_SERVICE_PATH_TMPL "config/%s" #define CONFDB_SERVICE_COMMAND "command" #define CONFDB_SERVICE_DEBUG_LEVEL "debug_level" +#define CONFDB_SERVICE_DEBUG_LEVEL_ALIAS "debug" #define CONFDB_SERVICE_DEBUG_TIMESTAMPS "debug_timestamps" #define CONFDB_SERVICE_DEBUG_MICROSECONDS "debug_microseconds" #define CONFDB_SERVICE_DEBUG_TO_FILES "debug_to_files" diff --git a/src/config/SSSDConfig/__init__.py.in b/src/config/SSSDConfig/__init__.py.in index abbf5dca8..06127584f 100644 --- a/src/config/SSSDConfig/__init__.py.in +++ b/src/config/SSSDConfig/__init__.py.in @@ -40,6 +40,7 @@ else: # TODO: This needs to be made external option_strings = { # [service] + 'debug' : _('Set the verbosity of the debug logging'), 'debug_level' : _('Set the verbosity of the debug logging'), 'debug_timestamps' : _('Include timestamps in debug logs'), 'debug_microseconds' : _('Include microseconds in timestamps in debug logs'), diff --git a/src/config/SSSDConfigTest.py b/src/config/SSSDConfigTest.py index e518c7565..6ec30234e 100755 --- a/src/config/SSSDConfigTest.py +++ b/src/config/SSSDConfigTest.py @@ -299,6 +299,7 @@ class SSSDConfigTestSSSDService(unittest.TestCase): 'krb5_rcache_dir', 'user', 'default_domain_suffix', + 'debug', 'debug_level', 'debug_timestamps', 'debug_microseconds', @@ -497,6 +498,7 @@ class SSSDConfigTestSSSDDomain(unittest.TestCase): options = domain.list_options() control_list = [ 'description', + 'debug', 'debug_level', 'debug_timestamps', 'min_id', @@ -863,6 +865,7 @@ class SSSDConfigTestSSSDDomain(unittest.TestCase): options = domain.list_options() control_list = [ 'description', + 'debug', 'debug_level', 'debug_timestamps', 'min_id', diff --git a/src/config/etc/sssd.api.conf b/src/config/etc/sssd.api.conf index fef55364d..91146593d 100644 --- a/src/config/etc/sssd.api.conf +++ b/src/config/etc/sssd.api.conf @@ -3,6 +3,7 @@ [service] # Options available to all services +debug = int, None, false debug_level = int, None, false debug_timestamps = bool, None, false debug_microseconds = bool, None, false @@ -108,6 +109,7 @@ subdomains_provider = str, None, false [domain] # Options available to all domains description = str, None, false +debug = int, None, false debug_level = int, None, false debug_timestamps = bool, None, false command = str, None, false diff --git a/src/man/sssd.conf.5.xml b/src/man/sssd.conf.5.xml index b82e94156..d5442d0cd 100644 --- a/src/man/sssd.conf.5.xml +++ b/src/man/sssd.conf.5.xml @@ -70,6 +70,19 @@ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="include/debug_levels.xml" /> </varlistentry> <varlistentry> + <term>debug (integer)</term> + <listitem> + <para> + SSSD 1.14 and later also includes the + <replaceable>debug</replaceable> alias for + <replaceable>debug_level</replaceable> as a + convenience feature. If both are specified, the + value of <replaceable>debug_level</replaceable> + will be used. + </para> + </listitem> + </varlistentry> + <varlistentry> <term>debug_timestamps (bool)</term> <listitem> <para> diff --git a/src/util/server.c b/src/util/server.c index 67a259557..074dc3484 100644 --- a/src/util/server.c +++ b/src/util/server.c @@ -567,7 +567,7 @@ int server_setup(const char *name, int flags, /* set debug level if any in conf_entry */ ret = confdb_get_int(ctx->confdb_ctx, conf_entry, CONFDB_SERVICE_DEBUG_LEVEL, - SSSDBG_DEFAULT, + SSSDBG_UNRESOLVED, &debug_level); if (ret != EOK) { DEBUG(SSSDBG_FATAL_FAILURE, "Error reading from confdb (%d) " @@ -575,6 +575,19 @@ int server_setup(const char *name, int flags, return ret; } + if (debug_level == SSSDBG_UNRESOLVED) { + /* Check for the `debug` alias */ + ret = confdb_get_int(ctx->confdb_ctx, conf_entry, + CONFDB_SERVICE_DEBUG_LEVEL_ALIAS, + SSSDBG_DEFAULT, + &debug_level); + if (ret != EOK) { + DEBUG(SSSDBG_FATAL_FAILURE, "Error reading from confdb (%d) " + "[%s]\n", ret, strerror(ret)); + return ret; + } + } + debug_level = debug_convert_old_level(debug_level); } |