8000 tests: Prevent syslog activity by slapd, take 2 · postgres/postgres@b520129 · GitHub
[go: up one dir, main page]

Skip to content

Commit b520129

Browse files
committed
tests: Prevent syslog activity by slapd, take 2
Unfortunately it turns out that the logfile-only option added in b9f8d1c is only available in openldap starting in 2.6. Luckily the option to control the log level (loglevel/-s) have been around for much longer. As it turns out loglevel/-s only control what goes into syslog, not what ends up in the file specified with 'logfile' and stderr. While we currently are specifying 'logfile', nothing ends up in it, as the option only controls debug messages, and we didn't set a debug level. The debug level can only be configured on the commandline and also prevents forking. That'd require larger changes, so this commit doesn't tackle that issue. Specify the syslog level when starting slapd using -s, as that allows to prevent all syslog messages if one uses '0' instead of 'none', while loglevel doesn't prevent the first message. Discussion: https://postgr.es/m/20230311233708.3yjdbjkly2q4gq2j@awork3.anarazel.de Backpatch: 11-
1 parent b43d8e7 commit b520129

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/ldap/t/001_auth.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
6969
pidfile $slapd_pidfile
7070
logfile $slapd_logfile
71-
logfile-only on
7271
7372
access to *
7473
by * read
@@ -104,7 +103,8 @@
104103
"-CA", "$slapd_certs/ca.crt", "-CAkey", "$slapd_certs/ca.key",
105104
"-CAcreateserial", "-out", "$slapd_certs/server.crt";
106105

107-
system_or_bail $slapd, '-f', $slapd_conf, '-h', "$ldap_url $ldaps_url";
106+
# -s0 prevents log messages ending up in syslog
107+
system_or_bail $slapd, '-f', $slapd_conf,'-s0', '-h', "$ldap_url $ldaps_url";
108108

109109
END
110110
{

0 commit comments

Comments
 (0)
0