Hi,
On Sun, 03.01.2010 at 22:54:41 +0100, Frank Denis <[email protected]>
wrote:
> Le Sun, Jan 03, 2010 at 10:21:55PM +0100, Toni Mueller ecrivait :
> > as distributed, the package has a discrepancy between the FTPStatus
> > field in the schema, where the comment says that the value should be
> > 'enabled', and the code, which says that the value should be 'TRUE'.
>
> Indeed, that was a discrepancy in 1.0.22 that has been fixed in the
> following release (the schema has been changed and in addition, both "TRUE"
> and "enabled" are accepted in the code).
>
> > I
> > just created and installed a package for 1.0.27, which has 'enabled' in
> > the code as well, and things started to work again immediately.
>
> There was a lot of improvement since 1.0.22 but the LDAP issue in 1.0.22 can
> be worked around by adding this trivial patch (from 1.0.23):
>
> --- src/log_ldap.c~ 2009-04-30 07:51:04.000000000 +0200
> +++ src/log_ldap.c 2010-01-03 22:41:39.000000000 +0100
> @@ -282,7 +282,8 @@
> pw_ldap_getpwnam_freefields(&pwret);
> pwret.pw_name = (char *) name;
> pw_enabled = pw_ldap_getvalue(ld, res, LDAP_FTPSTATUS);
> - if ((pw_enabled != NULL) && (strcasecmp(pw_enabled, "TRUE") != 0)) {
> + if (pw_enabled != NULL && strcasecmp(pw_enabled, "enabled") != 0 &&
> + strcasecmp(pw_enabled, "TRUE") != 0) {
erm... my C is a bit rusty, but shouldn't that rather be:
> + if (pw_enabled != NULL && (strcasecmp(pw_enabled, "enabled") != 0 ||
> + strcasecmp(pw_enabled, "TRUE") != 0)) {
FWIW, you can download my packages here:
http://download.oeko.net/sw/obsd/dist/4.6/packages/i386/pure-ftpd-1.0.27-ldap.tgz
http://download.oeko.net/sw/obsd/dist/4.6/packages/amd64/pure-ftpd-1.0.27-ldap.tgz
Should work from anywhere, albeit probably a bit slow. If not, drop me
an email.
Kind regards,
--Toni++