summaryrefslogtreecommitdiff
path: root/source/n/autofs/autofs.sasl.diff
blob: 8b451031cde45d02b29362dce45926031a7eeabd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
diff -Nuar autofs-5.0.7-orig/modules/lookup_ldap.c autofs-5.0.7/modules/lookup_ldap.c
--- autofs-5.0.7-orig/modules/lookup_ldap.c     2012-10-02 11:44:21.000000000 -0400
+++ autofs-5.0.7/modules/lookup_ldap.c  2012-10-02 11:44:46.000000000 -0400
@@ -585,10 +585,12 @@
 {
        LDAP *ldap;

+#ifdef WITH_SASL
        if (ctxt->extern_cert && ctxt->extern_key) {
                set_env(logopt, ENV_LDAPTLS_CERT, ctxt->extern_cert);
                set_env(logopt, ENV_LDAPTLS_KEY, ctxt->extern_key);
        }
+#endif

        ldap = init_ldap_connection(logopt, uri, ctxt);
        if (ldap) {
@@ -1385,10 +1387,12 @@
                defaults_free_searchdns(ctxt->sdns);
        if (ctxt->dclist)
                free_dclist(ctxt->dclist);
+#ifdef WITH_SASL
        if (ctxt->extern_cert)
                free(ctxt->extern_cert);
        if (ctxt->extern_key)
                free(ctxt->extern_key);
+#endif
        free(ctxt);

        return;