]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9715 Fix loglevel regression
authorHoward Chu <hyc@openldap.org>
Tue, 26 Oct 2021 13:33:30 +0000 (14:33 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 26 Oct 2021 15:45:06 +0000 (15:45 +0000)
Only set loglevel in server mode, not tool mode

servers/slapd/logging.c

index 7b3ffe075897891333cd0cdbb8ee8ff0b4b632e9..0a21ca80850579f87d8b4a45eb9f1727889c5929 100644 (file)
@@ -656,11 +656,13 @@ config_logging(ConfigArgs *c) {
 reset:
                        slap_debug = slap_debug_orig;
                        active_syslog = config_syslog;
-                       if ( logfile_only ) {
-                               slap_debug |= config_syslog;
-                               ldap_syslog = 0;
-                       } else {
-                               ldap_syslog = config_syslog;
+                       if ( slapMode & SLAP_SERVER_MODE ) {
+                               if ( logfile_only ) {
+                                       slap_debug |= config_syslog;
+                                       ldap_syslog = 0;
+                               } else {
+                                       ldap_syslog = config_syslog;
+                               }
                        }
                        rc = 0;
                        break;