]> git.sur5r.net Git - openldap/commitdiff
ITS#6283
authorQuanah Gibson-Mount <quanah@openldap.org>
Tue, 17 Nov 2009 18:25:21 +0000 (18:25 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 17 Nov 2009 18:25:21 +0000 (18:25 +0000)
CHANGES
libraries/libldap/init.c

diff --git a/CHANGES b/CHANGES
index 740a28e28605ed05fc17feba11faf41bedb5edd3..d0477aeade9bcd97b991a457cd0764cf36d400b9 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
 OpenLDAP 2.4 Change Log
 
 OpenLDAP 2.4.20 Engineering
+       Fixed client tools with LDAP options (ITS#6283)
        Fixed liblber embedded NUL values in BerValues (ITS#6353)
        Fixed liblber inverted LBER_USE_DER test (ITS#6348)
        Fixed liblber to return failure on certain failures (ITS#6344)
index d21f44bb795cac84edff8368d70897e7dc74ac67..a4a51ab7ff8b203b6eb6224fe35d672ee7f06891 100644 (file)
@@ -427,11 +427,34 @@ static void openldap_ldap_init_w_env(
                        ldap_int_sasl_config( gopts, attrs[i].offset, value );
 #endif                         
                        break;
+               case ATTR_GSSAPI:
+#ifdef HAVE_GSSAPI
+                       ldap_int_gssapi_config( gopts, attrs[i].offset, value );
+#endif
+                       break;
                case ATTR_TLS:
 #ifdef HAVE_TLS
                        ldap_int_tls_config( NULL, attrs[i].offset, value );
 #endif                         
                        break;
+               case ATTR_OPT_TV: {
+                       struct timeval tv;
+                       char *next;
+                       tv.tv_usec = 0;
+                       tv.tv_sec = strtol( value, &next, 10 );
+                       if ( next != value && next[ 0 ] == '\0' && tv.tv_sec > 0 ) {
+                               (void)ldap_set_option( NULL, attrs[i].offset, (const void *)&tv );
+                       }
+                       } break;
+               case ATTR_OPT_INT: {
+                       long l;
+                       char *next;
+                       l = strtol( value, &next, 10 );
+                       if ( next != value && next[ 0 ] == '\0' && l > 0 && (long)((int)l) == l ) {
+                               int v = (int)l;
+                               (void)ldap_set_option( NULL, attrs[i].offset, (const void *)&v );
+                       }
+                       } break;
                }
        }
 }