Package: libpam-ldap
Version: 178-1sarge1
Severity: wishlist

Based on bug report #312284, I've constructed a patch for libpam-ldap to
provide a similar change.  The patch switches the debconf from
configuring a host directive to a uri. I've tested the provided patch
and it appears to work without error.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (400, 'testing'), (300, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.11-k7-ar
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages libpam-ldap depends on:
ii  debconf                       1.4.30.13  Debian configuration management sy
ii  libc6                         2.3.5-6    GNU C Library: Shared libraries an
ii  libldap2                      2.1.30-8   OpenLDAP libraries
ii  libpam0g                      0.76-22    Pluggable Authentication Modules l

-- debconf information excluded
diff -Naur libpam-ldap-178.orig/debian/config libpam-ldap-178/debian/config
--- libpam-ldap-178.orig/debian/config  2005-09-06 17:37:46.000000000 -0600
+++ libpam-ldap-178/debian/config       2005-09-06 17:39:10.000000000 -0600
@@ -41,7 +41,7 @@
 
 if(get("libnss-ldap/override") eq "true") {
        # These are the same as with libnss-ldap, lets not touch those..
-       read_and_input('shared/ldapns/ldap-server', 'host', 'critical');
+       read_and_input('shared/ldapns/ldap-server', 'uri', 'critical');
        read_and_input('shared/ldapns/base-dn', 'base', 'critical');
        read_and_input('shared/ldapns/ldap_version', 'ldap_version', 
'critical');
        $ret = go();  # yeah, we don't need that.. but in case we sometime do
diff -Naur libpam-ldap-178.orig/debian/libpam-ldap.postinst 
libpam-ldap-178/debian/libpam-ldap.postinst
--- libpam-ldap-178.orig/debian/libpam-ldap.postinst    2005-09-06 
17:37:46.000000000 -0600
+++ libpam-ldap-178/debian/libpam-ldap.postinst 2005-09-06 17:40:38.000000000 
-0600
@@ -38,7 +38,7 @@
                # i really need a better way to do this...
                # currently we replace only the first match, we need a better
                # way of dealing with multiple hits.
-               perl -i -p -e "s/$replacestring/$parameter $value/i 
+               perl -i -p -e "s-$replacestring-$parameter $value-i 
                        and \$match=1 if (\$match != 1)" $CONFFILE
        fi
 }
@@ -87,7 +87,8 @@
        fi
 
        db_get shared/ldapns/ldap-server
-       change_value host "$RET"
+   disable_param host
+       change_value uri "$RET"
 
        db_get shared/ldapns/base-dn
        change_value base "$RET"
diff -Naur libpam-ldap-178.orig/debian/templates 
libpam-ldap-178/debian/templates
--- libpam-ldap-178.orig/debian/templates       2005-09-06 17:37:46.000000000 
-0600
+++ libpam-ldap-178/debian/templates    2005-09-06 17:42:40.000000000 -0600
@@ -89,12 +89,14 @@
 
 Template: shared/ldapns/ldap-server
 Type: string
-Default: 127.0.0.1
-_Description: LDAP Server host.
- The address of the LDAP server used.
+Default: ldap://127.0.0.1/
+_Description: LDAP Server Uniform Resource Identifier.
+ Please enter the URI of the LDAP server used. This is a string in the
+ form ldap://<hostname or IP>:<port>/ . ldaps:// or ldapi:// can also
+ be used. The port number is optional.
  .
- Note: It is always a good idea to use an IP address, it reduces risks of
- failure.
+ Note: It is usually a good idea to use an IP address; this reduces
+ risks of failure in the event name service is unavailable.
 
 Template: libpam-ldap/bindpw
 Type: password

Reply via email to