~~~~~~~~~
The [logging] section indicates how :ref:`krb5kdc(8)` and
-:ref:`kadmind(8)` perform logging. The keys in this section are
-daemon names, which may be one of:
+:ref:`kadmind(8)` perform logging. It may contain the following
+relations:
**admin_server**
Specifies how :ref:`kadmind(8)` performs logging.
Specifies how either daemon performs logging in the absence of
relations specific to the daemon.
-Values are of the following forms:
+**debug**
+ (Boolean value.) Specifies whether debugging messages are
+ included in log outputs other than SYSLOG. Debugging messages are
+ always included in the system log output because syslog performs
+ its own priority filtering. The default value is false. New in
+ release 1.15.
+
+Logging specifications may have the following forms:
**FILE=**\ *filename* or **FILE:**\ *filename*
This value causes the daemon's logging messages to go to the
#define KRB5_CONF_CLOCKSKEW "clockskew"
#define KRB5_CONF_DATABASE_NAME "database_name"
#define KRB5_CONF_DB_MODULE_DIR "db_module_dir"
+#define KRB5_CONF_DEBUG "debug"
#define KRB5_CONF_DEFAULT "default"
#define KRB5_CONF_DEFAULT_CCACHE_NAME "default_ccache_name"
#define KRB5_CONF_DEFAULT_CLIENT_KEYTAB_NAME "default_client_keytab_name"
char *log_whoami;
char *log_hostname;
krb5_boolean log_opened;
+ krb5_boolean log_debug;
};
static struct log_control log_control = {
* logging specification.
*/
for (lindex = 0; lindex < log_control.log_nentries; lindex++) {
+ /* Omit messages marked as LOG_DEBUG for non-syslog outputs unless we
+ * are configured to include them. */
+ if (log_pri == LOG_DEBUG && !log_control.log_debug &&
+ log_control.log_entries[lindex].log_type != K_LOG_SYSLOG)
+ continue;
+
switch (log_control.log_entries[lindex].log_type) {
case K_LOG_FILE:
case K_LOG_STDERR:
int i, ngood, fd, append;
char *cp, *cp2;
char savec = '\0';
- int error;
+ int error, debug;
int do_openlog, log_facility;
FILE *f = NULL;
err_context = kcontext;
+ /* Look up [logging]->debug in the profile to see if we should include
+ * debug messages for types other than syslog. Default to false. */
+ if (!profile_get_boolean(kcontext->profile, KRB5_CONF_LOGGING,
+ KRB5_CONF_DEBUG, NULL, 0, &debug))
+ log_control.log_debug = debug;
+
/*
* Look up [logging]-><ename> in the profile. If that doesn't
* succeed, then look for [logging]->default.
* logging specification.
*/
for (lindex = 0; lindex < log_control.log_nentries; lindex++) {
+ /* Omit LOG_DEBUG messages for non-syslog outputs unless we are
+ * configured to include them. */
+ if (priority == LOG_DEBUG && !log_control.log_debug &&
+ log_control.log_entries[lindex].log_type != K_LOG_SYSLOG)
+ continue;
+
switch (log_control.log_entries[lindex].log_type) {
case K_LOG_FILE:
case K_LOG_STDERR: