autofs-5.0.7-sasl-def.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
  2. index ce1e2e5..35a2106 100644
  3. --- a/modules/lookup_ldap.c
  4. +++ b/modules/lookup_ldap.c
  5. @@ -28,9 +28,6 @@
  6. #include <arpa/nameser.h>
  7. #include <resolv.h>
  8. #include <lber.h>
  9. -#ifdef HAVE_SASL
  10. -#include <libxml/tree.h>
  11. -#endif
  12. #define MODULE_LOOKUP
  13. #include "automount.h"
  14. @@ -38,6 +35,10 @@
  15. #include "lookup_ldap.h"
  16. #include "base64.h"
  17. +#ifdef WITH_SASL
  18. +#include <libxml/tree.h>
  19. +#endif
  20. +
  21. #define MAPFMT_DEFAULT "sun"
  22. #define MODPREFIX "lookup(ldap): "
  23. @@ -587,7 +588,7 @@ static LDAP *do_connect(unsigned logopt, const char *uri, struct lookup_context
  24. {
  25. LDAP *ldap;
  26. -#ifdef HAVE_SASL
  27. +#ifdef WITH_SASL
  28. if (ctxt->extern_cert && ctxt->extern_key) {
  29. set_env(logopt, ENV_LDAPTLS_CERT, ctxt->extern_cert);
  30. set_env(logopt, ENV_LDAPTLS_KEY, ctxt->extern_key);
  31. @@ -1389,7 +1390,7 @@ static void free_context(struct lookup_context *ctxt)
  32. defaults_free_searchdns(ctxt->sdns);
  33. if (ctxt->dclist)
  34. free_dclist(ctxt->dclist);
  35. -#ifdef HAVE_SASL
  36. +#ifdef WITH_SASL
  37. if (ctxt->extern_cert)
  38. free(ctxt->extern_cert);
  39. if (ctxt->extern_key)