]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Export KRB5CCNAME from the ldap backend
authorGrégory Oestreicher <greg@kamago.net>
Wed, 14 Sep 2016 20:55:16 +0000 (22:55 +0200)
committerGrégory Oestreicher <greg@kamago.net>
Tue, 28 Feb 2017 21:35:04 +0000 (22:35 +0100)
modules/ldapbackend/ldapbackend.cc

index f529d901159aa7de88cf9b08ad69c1014761e265..905193767c89d4e4c335d737fc9314d8905e6b4c 100644 (file)
@@ -26,6 +26,7 @@
 #include "exceptions.hh"
 #include "ldapauthenticator_p.hh"
 #include "ldapbackend.hh"
+#include <cstdlib>
 
 unsigned int ldap_host_index = 0;
 
@@ -85,6 +86,7 @@ LdapBackend::LdapBackend( const string &suffix )
 
                string bindmethod = getArg( "bindmethod" );
                if ( bindmethod == "gssapi" ) {
+                        setenv( "KRB5CCNAME", getArg( "krb5-ccache" ).c_str(), 1 );
                        m_authenticator = new LdapGssapiAuthenticator( getArg( "krb5-keytab" ), getArg( "krb5-ccache" ), getArgAsNum( "timeout" ) );
                }
                else {