I added abi lity to choose wich attribute will be using t o autorise
users.
Reply-To: Alexander Gerasiov <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Resent-From: Alexander Gerasiov <[EMAIL PROTECTED]>
Resent-To: debian-bugs-dist@lists.debian.org
Resent-CC: Stefan Hornburg (Racke) <[EMAIL PROTECTED]>
Resent-Date: Mon, 18 Apr 2005 13:33:02 UTC
Resent-Message-ID: <[EMAIL PROTECTED]>
Resent-Sender: [EMAIL PROTECTED]
X-Debian-PR-Message: report 305177
X-Debian-PR-Package: pure-ftpd-ldap
X-Debian-PR-Keywords: patch
Received: via spool by [EMAIL PROTECTED] id=B.111383043812634
          (code B ref -1); Mon, 18 Apr 2005 13:33:02 UTC
Received: (at submit) by bugs.debian.org; 18 Apr 2005 13:20:38 +0000
Received: from zigzag.lvk.cs.msu.su [158.250.17.23] 
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1DNWB4-0003HQ-00; Mon, 18 Apr 2005 06:20:38 -0700
Received: from gq by zigzag.lvk.cs.msu.su with local (Exim 4.50)
        id 1DNWB0-0002fV-T8
        for [EMAIL PROTECTED]; Mon, 18 Apr 2005 17:20:34 +0400
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Alexander Gerasiov <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
X-Mailer: reportbug 3.8
Date: Mon, 18 Apr 2005 17:20:34 +0400
Message-Id: <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Package: pure-ftpd-ldap
Severity: wishlist
Tags: patch

I added new configuration parameter LDAPUserPassword.
For example I'm using
LDAPUserPassword ftpPassword (where ftpPassword is an attribute from my
own scheme).

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (620, 'testing'), (600, 'unstable'), (550, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.10-1-zigzag
Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.KOI8-R (charmap=KOI8-R)

Versions of packages pure-ftpd-ldap depends on:
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an
ii  libcap1                     1:1.10-12    support for getting/setting POSIX.
ii  libldap2                    2.1.30-3     OpenLDAP libraries
ii  libpam0g                    0.76-22      Pluggable Authentication Modules l
ii  libssl0.9.7                 0.9.7e-3     SSL shared libraries
pn  pure-ftpd-common                         Not found.

*** /home/gq/pure-ftpd/userPassword.patch
diff -ruN pure-ftpd-1.0.19/src/log_ldap.c pure-ftpd-1.0.19.gq/src/log_ldap.c
--- pure-ftpd-1.0.19/src/log_ldap.c     2004-06-20 21:29:56.000000000 +0400
+++ pure-ftpd-1.0.19.gq/src/log_ldap.c  2005-04-15 02:34:36.000000000 +0400
@@ -61,6 +61,11 @@
             die_mem();
         }
     }
+       if (ldap_userpassword == NULL) {
+               if ((ldap_userpassword = strdup(LDAP_USERPASSWORD)) == NULL) {
+                       die_mem();
+               }
+       }
     if (ldap_version_s != NULL) {
         ldap_version = atoi(ldap_version_s);
         free(ldap_version_s);
@@ -101,6 +106,7 @@
     base = NULL;
     free((void *) ldap_filter);
     free((void *) ldap_homedirectory);
+     free((void *) ldap_userpassword);
     free((void *) default_uid_s);
     default_uid_s = NULL;
     free((void *) default_gid_s);
@@ -266,6 +272,7 @@
         return NULL;
     }
     attrs[0] = ldap_homedirectory;
+    attrs[5] = ldap_userpassword;
     if ((res = pw_ldap_uid_search(ld, name, attrs)) == NULL) {
         goto error;
     }
@@ -333,7 +340,7 @@
     }
 #endif
     if ((pw_passwd_ldap =
-         pw_ldap_getvalue(ld, res, LDAP_USERPASSWORD)) == NULL) {
+         pw_ldap_getvalue(ld, res, ldap_userpassword)) == NULL) {
         goto error;
     }
     pwret.pw_passwd = strdup(pw_passwd_ldap);
diff -ruN pure-ftpd-1.0.19/src/log_ldap_p.h pure-ftpd-1.0.19.gq/src/log_ldap_p.h
--- pure-ftpd-1.0.19/src/log_ldap_p.h   2004-03-01 00:49:28.000000000 +0300
+++ pure-ftpd-1.0.19.gq/src/log_ldap_p.h        2005-04-14 20:54:57.000000000 
+0400
@@ -16,6 +16,7 @@
 static char *base;
 static char *ldap_filter;
 static char *ldap_homedirectory;
+static char *ldap_userpassword;
 static char *ldap_version_s;
 static int ldap_version;
 static char *default_uid_s;
@@ -31,6 +32,7 @@
     { "LDAPBaseDN", &base },
     { "LDAPFilter", &ldap_filter},
     { "LDAPHomeDir", &ldap_homedirectory },
+       { "LDAPUserPassword", &ldap_userpassword },
     { "LDAPVersion", &ldap_version_s },
     { "LDAPDefaultUID", &default_uid_s },
     { "LDAPDefaultGID", &default_gid_s },


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to