/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2001-2004 The OpenLDAP Foundation.
+ * Copyright 2001-2005 The OpenLDAP Foundation.
* Portions Copyright 2001-2003 Pierangelo Masarati.
* All rights reserved.
*
#include "../back-ldbm/back-ldbm.h"
#endif /* defined(SLAPD_LDBM) */
+/* for PATH_MAX on some systems (e.g. Solaris) */
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif /* HAVE_LIMITS_H */
+#ifndef PATH_MAX
+#define PATH_MAX 4095
+#endif /* ! PATH_MAX */
+
static struct restricted_ops_t {
struct berval op;
unsigned int tag;
{
struct berval bv;
ber_len_t pathlen = 0, len = 0;
-/* FIXME: need a cleaner solution */
-#ifndef PATH_MAX
-#define PATH_MAX 4095
-#endif /* ! PATH_MAX */
char path[ PATH_MAX ] = { '\0' };
char *fname = NULL;
#if defined(SLAPD_LDAP)
if ( strcmp( bi->bi_type, "ldap" ) == 0 ) {
- struct ldapinfo *li = (struct ldapinfo *)be->be_private;
+ struct ldapinfo *li =
+ (struct ldapinfo *)be->be_private;
struct berval bv;
- bv.bv_val = li->url;
- bv.bv_len = strlen( bv.bv_val );
- attr_merge_normalize_one( e, slap_schema.si_ad_labeledURI,
+ ber_str2bv( li->url, 0, 0, &bv );
+
+ attr_merge_normalize_one( e,
+ slap_schema.si_ad_labeledURI,
&bv, NULL );
}
#endif /* defined(SLAPD_LDAP) */