nixos/mailman: strip trailing \n when reading the secret

This commit is contained in:
Maximilian Bosch 2022-07-04 20:26:26 +02:00
parent 6c7fbcd21e
commit 6a5b1bc0a3
No known key found for this signature in database
GPG key ID: 091DBF4D1FC46B8E

View file

@ -389,7 +389,7 @@ in {
AUTH_LDAP_SERVER_URI = "${cfg.ldap.serverUri}"
AUTH_LDAP_BIND_DN = "${cfg.ldap.bindDn}"
with open("${cfg.ldap.bindPasswordFile}") as f:
AUTH_LDAP_BIND_PASSWORD = f.read()
AUTH_LDAP_BIND_PASSWORD = f.read().rstrip('\n')
AUTH_LDAP_USER_SEARCH = LDAPSearch("${cfg.ldap.userSearch.ou}",
ldap.SCOPE_SUBTREE, "${cfg.ldap.userSearch.query}")
AUTH_LDAP_GROUP_TYPE = ${cfg.ldap.groupSearch.type}()