]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/test.c
Apply Novell's IN_KERNEL support (ITS#576)
[openldap] / libraries / libldap / test.c
index f32fe6954bd3308f407e5a1befcc4cb54b7755af..404ffbfe29e0fb7146f63e36989d7bd431f55e19 100644 (file)
@@ -232,9 +232,11 @@ static int
 bind_prompt( LDAP *ld, LDAP_CONST char *url, int request, ber_int_t msgid)
 {
        static char     dn[256], passwd[256];
-       char *dnp;
        int     authmethod;
 
+       printf("rebind for request=%d msgid=%ld url=%s\n",
+               request, (long) msgid, url );
+
 #ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
                getline( dn, sizeof(dn), stdin,
                    "re-bind method (0->simple, 1->krbv41, 2->krbv42, 3->krbv41&2)? " );
@@ -321,12 +323,12 @@ main( int argc, char **argv )
 
                case 't':       /* copy ber's to given file */
                        copyfname = strdup( optarg );
-                       copyoptions = LBER_TO_FILE;
+/*                     copyoptions = LBER_TO_FILE; */
                        break;
 
                case 'T':       /* only output ber's to given file */
                        copyfname = strdup( optarg );
-                       copyoptions = (LBER_TO_FILE | LBER_TO_FILE_ONLY);
+/*                     copyoptions = (LBER_TO_FILE | LBER_TO_FILE_ONLY); */
                        break;
 
                default:
@@ -362,12 +364,12 @@ main( int argc, char **argv )
        }
 
        if ( copyfname != NULL ) {
-               if ( (ld->ld_sb.sb_fd = open( copyfname, O_WRONLY | O_CREAT,
+               if ( ( ld->ld_sb->sb_fd = open( copyfname, O_WRONLY | O_CREAT,
                    0600 ))  == -1 ) {
                        perror( copyfname );
                        exit ( EXIT_FAILURE );
                }
-               ld->ld_sb.sb_options = copyoptions;
+               ld->ld_sb->sb_options = copyoptions;
        }
 
        bound = 0;
@@ -761,33 +763,6 @@ main( int argc, char **argv )
 
                        LDAP_BOOL_ZERO(&ld->ld_options);
 
-#ifdef STR_TRANSLATION
-                       getline( line, sizeof(line), stdin,
-                               "Automatic translation of T.61 strings (0=no, 1=yes)?" );
-                       if ( atoi( line ) == 0 ) {
-                               ld->ld_lberoptions &= ~LBER_TRANSLATE_STRINGS;
-                       } else {
-                               ld->ld_lberoptions |= LBER_TRANSLATE_STRINGS;
-#ifdef LDAP_CHARSET_8859
-                               getline( line, sizeof(line), stdin,
-                                       "Translate to/from ISO-8859 (0=no, 1=yes?" );
-                               if ( atoi( line ) != 0 ) {
-                                       ldap_set_string_translators( ld,
-                                           ldap_8859_to_t61,
-                                           ldap_t61_to_8859 );
-                               }
-#endif /* LDAP_CHARSET_8859 */
-                       }
-#endif /* STR_TRANSLATION */
-
-#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_DNS
-                       getline( line, sizeof(line), stdin,
-                               "Use DN & DNS to determine where to send requests (0=no, 1=yes)?" );
-                       if ( atoi( line ) != 0 ) {
-                               LDAP_BOOL_SET(&ld->ld_options, LDAP_BOOL_DNS);
-                       }
-#endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_DNS */
-
                        getline( line, sizeof(line), stdin,
                                "Recognize and chase referrals (0=no, 1=yes)?" );
                        if ( atoi( line ) != 0 ) {