]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/dntest.c
according to sasl documentation, prompts is filled only if SASL_INTERACT is returned
[openldap] / libraries / libldap / dntest.c
index 72d3c52febb82f4e73f4c1564564ccfcef8a84eb..31342a5bae65ccc82db194efe31272117c5266a4 100644 (file)
@@ -1,6 +1,6 @@
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 /*
  */
 #include "portable.h"
 
+#include <stdio.h>
+
 #include <ac/stdlib.h>
 #include <ac/string.h>
 #include <ac/unistd.h>
 
-#include <stdio.h>
-
 #include <ldap.h>
 
 #include "ldap-int.h"
@@ -158,6 +158,15 @@ main( int argc, char *argv[] )
 
                case LDAP_DN_FORMAT_LDAPV3:
                case LDAP_DN_FORMAT_LDAPV2:
+                       n = ldap_dn2domain( strin, &tmp );
+                       if( n ) {
+                               fprintf( stdout, "\nldap_dn2domain(\"%s\") FAILED\n", strin );
+                       } else {
+                               fprintf( stdout, "\nldap_dn2domain(\"%s\")\n"
+                                       "\t= \"%s\"\n", strin, tmp );
+                       }
+                       ldap_memfree( tmp );
+
                        tmp = ldap_dn2ufn( strin );
                        fprintf( stdout, "\nldap_dn2ufn(\"%s\")\n"
                                        "\t= \"%s\"\n", strin, tmp );