+/* $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.
#include <lber.h>
#include <ldap.h>
-#include <ldapconfig.h>
+#include "ldap_defaults.h"
#include "ud.h"
void
{
if (errno != 0)
perror(s);
-#ifdef HAVE_KERBEROS
+#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
destroy_tickets();
#endif
- exit(-1);
+ exit( EXIT_FAILURE );
}
int
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 */
void_ptr = (void *) malloc(size);
if (void_ptr == NULL) {
perror("malloc");
- exit(-1);
+ exit( EXIT_FAILURE );
/*NOTREACHED*/
}
return(void_ptr);