On 6/17/21 2:45 PM, Howard Chu wrote:
Michael Ströder wrote:
HI!
Some automated tests of my Python module check SASL bind with various mechs. For this to work I normally have to add those SASL mechs to /etc/sasl2/slapd.conf.
But this fails in the openSUSE build system with "permission denied".
Is there a possibility to override SASL mechs used by slapd with an env var or similar?
That depends on what the Cyrus SASL API supports. This is not an OpenLDAP question.
Yes, but I hoped that you might have solved this for automated tests in restricted build systems before.
A grep thru the SASL source shows there is a SASL_CONF_PATH env var.
Thanks. This was really helpful! I could not find this in the Cyrus-SASL-Docs.
Problem solved and now I can run all checks:
%check mkdir -p %{buildroot}%{_sysconfdir}/sasl2 echo "mech_list: PLAIN DIGEST-MD5 CRAM-MD5 SCRAM-SHA-1 EXTERNAL GSSAPI"
%{buildroot}%{_sysconfdir}/sasl2/slapd.conf
export SASL_CONF_PATH="%{buildroot}%{_sysconfdir}/sasl2/slapd.conf" %pytest_arch rm -r %{buildroot}%{_sysconfdir}/sasl2
https://build.opensuse.org/package/view_file/home:stroeder:iam/python-ldap0/...
Ciao, Michael.