Hi,

Patch applied, thanks!

Btw, I needed to fix your patch because some too long lines were
wrapped.

Charles

On Saturday 14 June 2014 ` 00:17, Guenther Niess wrote:
> On 06/12/14 21:46, Gilles Chehade wrote:
> > I'll merge your diff this week-end, it needs to be slightly adapted
> > because the code on OpenBSD lags slightly behind our code on github
> > and I made changes to ldap recently.
> > 
> > I'll backport the ldap bits to OpenBSD right after that so the diff
> > gets incorporated in OpenBSD.
> 
> Ok, below I adapted and tested the patch based on the github version. I
> only added reallocarray.c to get it built on the 5.5 release.
> 
> > Are you having issues with the ldap backend besides that ?
> 
> I noticed that when I try to configure an LDAP URL with an IPv6 address
> that I get an configuration parsing error and I didn't get a user
> authentication against my LDAP server for smtps running. But I didn't
> look into that, and it's not on my priority list so I don't know if it
> is a simple configuration issue.
> 
> Thanks
> Guenther
> 
> 
> diff --git a/smtpd/table_ldap.c b/smtpd/table_ldap.c
> index 42db772..3b4235e 100644
> --- a/smtpd/table_ldap.c
> +++ b/smtpd/table_ldap.c
> @@ -142,6 +142,7 @@ table_ldap_check(int service, const char *key)
>       case K_DOMAIN:
>       case K_CREDENTIALS:
>       case K_USERINFO:
> +     case K_MAILADDR:
>               return ldap_run_query(service, key, NULL, 0);
>       default:
>               return (-1);
> @@ -156,6 +157,7 @@ table_ldap_lookup(int service, const char *key, char
> *dst, size_t sz)
>       case K_DOMAIN:
>       case K_CREDENTIALS:
>       case K_USERINFO:
> +     case K_MAILADDR:
>               return ldap_run_query(service, key, dst, sz);
>       default:
>               return (-1);
> @@ -369,6 +371,13 @@ ldap_config(void)
>                       ldap_parse_attributes(&queries[LDAP_USERINFO],
>                           key, value, 3);
>               }
> +
> +             else if (!strcmp(key, "mailaddr_filter"))
> +                     read_value(&queries[LDAP_MAILADDR].filter, key, value);
> +             else if (!strcmp(key, "mailaddr_attributes")) {
> +                     ldap_parse_attributes(&queries[LDAP_MAILADDR],
> +                         key, value, 1);
> +             }
>               else
>                       log_warnx("warn: table-ldap: bogus entry \"%s\"", key);
>       }
> @@ -532,6 +541,7 @@ ldap_run_query(int type, const char *key, char *dst,
> size_t sz)
>               }
>               break;
>       case K_DOMAIN:
> +     case K_MAILADDR:
>               if (strlcpy(dst, res[0][0], sz) >= sz)
>                       ret = -1;
>               break;
> 
> -- 
> You received this mail because you are subscribed to [email protected]
> To unsubscribe, send a mail to: [email protected]
> 

-- 
You received this mail because you are subscribed to [email protected]
To unsubscribe, send a mail to: [email protected]

Reply via email to