]> git.sur5r.net Git - openldap/blobdiff - clients/ud/util.c
Initial implementation of Kerberos password verification for
[openldap] / clients / ud / util.c
index 2efd2895d666f7ca457662f9d2eb638d78b14ef3..575df353140f97dcc9ae5a8b1713673eebdd88d3 100644 (file)
@@ -1,3 +1,8 @@
+/* $OpenLDAP$ */
+/*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
 /*
  * Copyright (c) 1992, 1993  Regents of the University of Michigan.
  * All rights reserved.
@@ -99,7 +104,7 @@ fatal( char *s )
 {
        if (errno != 0)
                perror(s);
-#ifdef HAVE_KERBEROS
+#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
        destroy_tickets();
 #endif
        exit( EXIT_FAILURE );
@@ -404,15 +409,19 @@ isadn( char *s )
 char *
 my_ldap_dn2ufn( char *s )
 {
+#ifdef UD_BASE
        register char **cpp;
        static char short_DN[BUFSIZ];
 
-       if (strstr(s, NULL) == NULL)
+       if (strstr(s, UD_BASE) == NULL)
                return(ldap_dn2ufn(s));
        cpp = ldap_explode_dn(s, TRUE);
        sprintf(short_DN, "%s, %s", *cpp, *(cpp + 1));
        ldap_value_free(cpp);
        return(short_DN);
+#else
+       return(ldap_dn2ufn(s));
+#endif
 }
 
 /* return TRUE if this attribute should be printed as a URL */