]> git.sur5r.net Git - openldap/commitdiff
ITS#4799 remove kbind
authorHoward Chu <hyc@openldap.org>
Wed, 10 Jan 2007 00:01:38 +0000 (00:01 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 10 Jan 2007 00:01:38 +0000 (00:01 +0000)
clients/tools/common.c
clients/tools/ldapcompare.c
clients/tools/ldapdelete.c
clients/tools/ldapmodify.c
clients/tools/ldapmodrdn.c
clients/tools/ldappasswd.c
clients/tools/ldapsearch.c

index 3801c2fd7969b6252a705825447709ec42692f02..4cf7edcd401aa8dcd99b07ad869f212a3f41ca9d 100644 (file)
 
 #include "common.h"
 
-#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
-#if !LDAP_DEPRECATED
-/* Necessary for old LDAPv2 Kerberos Bind methods */
-LDAP_F( int )
-ldap_bind LDAP_P((     /* deprecated */
-       LDAP *ld,
-       LDAP_CONST char *who,
-       LDAP_CONST char *passwd,
-       int authmethod ));
-#endif
-#endif
-
 /* input-related vars */
 
 /* misc. parameters */
@@ -219,8 +207,6 @@ N_("  -f file    read operations from `file'\n"),
 N_("  -h host    LDAP server\n"),
 N_("  -H URI     LDAP Uniform Resource Indentifier(s)\n"),
 N_("  -I         use SASL Interactive mode\n"),
-N_("  -k         use Kerberos authentication\n"),
-N_("  -K         like -k, but do only step 1 of the Kerberos bind\n"),
 N_("  -M         enable Manage DSA IT control (-MM to make critical)\n"),
 N_("  -n         show what would be done but don't actually do it\n"),
 N_("  -O props   SASL security properties\n"),
@@ -563,32 +549,6 @@ tool_args( int argc, char **argv )
                                prog );
                        exit( EXIT_FAILURE );
 #endif
-               case 'k':       /* kerberos bind */
-#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
-                       if( authmethod != -1 ) {
-                               fprintf( stderr, "%s: -k incompatible with previous "
-                                       "authentication choice\n", prog );
-                               exit( EXIT_FAILURE );
-                       }
-                       authmethod = LDAP_AUTH_KRBV4;
-#else
-                       fprintf( stderr, "%s: not compiled with Kerberos support\n", prog );
-                       exit( EXIT_FAILURE );
-#endif
-                       break;
-               case 'K':       /* kerberos bind, part one only */
-#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
-                       if( authmethod != -1 ) {
-                               fprintf( stderr, "%s: incompatible with previous "
-                                       "authentication choice\n", prog );
-                               exit( EXIT_FAILURE );
-                       }
-                       authmethod = LDAP_AUTH_KRBV41;
-#else
-                       fprintf( stderr, "%s: not compiled with Kerberos support\n", prog );
-                       exit( EXIT_FAILURE );
-#endif
-                       break;
                case 'M':
                        /* enable Manage DSA IT */
                        manageDSAit++;
@@ -937,15 +897,6 @@ tool_args( int argc, char **argv )
                        exit( EXIT_FAILURE );
                }
 #endif
-
-#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
-       } else {
-               if ( authmethod == LDAP_AUTH_KRBV4 || authmethod == LDAP_AUTH_KRBV41 ) {
-                       fprintf( stderr, "%s: -k/-K incompatible with LDAPv%d\n",
-                               prog, protocol );
-                       exit( EXIT_FAILURE );
-               }
-#endif
        }
 }
 
@@ -1124,15 +1075,6 @@ tool_bind( LDAP *ld )
 
                msgbuf[0] = 0;
 
-#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
-               if ( authmethod == LDAP_AUTH_KRBV4 || authmethod == LDAP_AUTH_KRBV41 ) {
-                       msgid = ldap_bind( ld, binddn, passwd.bv_val, authmethod );
-                       if ( msgid == -1 ) {
-                               tool_perror( "ldap_bind", -1, NULL, NULL, NULL, NULL );
-                               exit( LDAP_LOCAL_ERROR );
-                       }
-               } else
-#endif
                {
                        /* simple bind */
                        rc = ldap_sasl_bind( ld, binddn, LDAP_SASL_SIMPLE, &passwd,
index 6e9d70c4f6c414b45f7f3133f14690077ed79592..47753525e17166b6a19f4892ec6405a541ffcf3d 100644 (file)
@@ -102,7 +102,7 @@ static int docompare LDAP_P((
 
 
 const char options[] = "z"
-       "Cd:D:e:h:H:IkKMnO:o:p:P:QR:U:vVw:WxX:y:Y:Z";
+       "Cd:D:e:h:H:IMnO:o:p:P:QR:U:vVw:WxX:y:Y:Z";
 
 #ifdef LDAP_CONTROL_DONTUSECOPY
 int dontUseCopy = 0;
index 545841ea09549a828b33d0e4242de9f8cfa3894b..8133a2d3a05d31b809b7326e3737d463f647e5b0 100644 (file)
@@ -76,7 +76,7 @@ usage( void )
 
 
 const char options[] = "r"
-       "cd:D:e:f:h:H:IkKMnO:o:p:P:QR:U:vVw:WxX:y:Y:Z";
+       "cd:D:e:f:h:H:IMnO:o:p:P:QR:U:vVw:WxX:y:Y:Z";
 
 int
 handle_private_option( int i )
index feda1b34137bd6a9e39ae53af123e4c3651af091..e53048236bf83b643058facec67e0973af89baf5 100644 (file)
@@ -154,7 +154,7 @@ usage( void )
 
 
 const char options[] = "aE:FrS:"
-       "cd:D:e:f:h:H:IkKMnO:o:p:P:QR:U:vVw:WxX:y:Y:Z";
+       "cd:D:e:f:h:H:IMnO:o:p:P:QR:U:vVw:WxX:y:Y:Z";
 
 int
 handle_private_option( int i )
index c3ea85a25f746ea6c4ed43e6bcc4b54c2bb2a900..9b03471f4776c429d3fbb0a56a5ec99b53dce358 100644 (file)
@@ -91,7 +91,7 @@ usage( void )
 
 
 const char options[] = "rs:"
-       "cd:D:e:f:h:H:IkKMnO:o:p:P:QR:U:vVw:WxX:y:Y:Z";
+       "cd:D:e:f:h:H:IMnO:o:p:P:QR:U:vVw:WxX:y:Y:Z";
 
 int
 handle_private_option( int i )
index 9e0cbbd206f92edb551ffe574f4b3421d76028d7..7645e55e0a8c97238db0a9ef802ecc79a5c0dba2 100644 (file)
@@ -411,6 +411,9 @@ main( int argc, char *argv[] )
        ber_memfree( retoid );
        ber_bvfree( retdata );
 
+       rc = ldap_search_s( ld, binddn, LDAP_SCOPE_BASE, "(objectclass=*)",
+               NULL, 0, &res );
+
        rc = ( code == LDAP_SUCCESS ) ? EXIT_SUCCESS : EXIT_FAILURE;
 
 done:
index 2e22f6ab34c977517fb2ca7eaff4d1b408e8ff16..79bee8e67843a18bc68110eacd9442353452f51f 100644 (file)
@@ -249,7 +249,7 @@ urlize(char *url)
 
 
 const char options[] = "a:Ab:cE:F:l:Ls:S:tT:uz:"
-       "Cd:D:e:f:h:H:IkKMnO:o:p:P:QR:U:vVw:WxX:y:Y:Z";
+       "Cd:D:e:f:h:H:IMnO:o:p:P:QR:U:vVw:WxX:y:Y:Z";
 
 int
 handle_private_option( int i )