-/*
- * Copyright (c) 2003 by International Business Machines, Inc.
+/* $OpenLDAP$ */
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * International Business Machines, Inc. (hereinafter called IBM) grants
- * permission under its copyrights to use, copy, modify, and distribute this
- * Software with or without fee, provided that the above copyright notice and
- * all paragraphs of this notice appear in all copies, and that the name of IBM
- * not be used in connection with the marketing of any product incorporating
- * the Software or modifications thereof, without specific, written prior
- * permission.
+ * Copyright 1999-2003 The OpenLDAP Foundation.
+ * Portions Copyright 2003 IBM Corporation.
+ * All rights reserved.
*
- * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
- * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
- * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
*
- *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
+ */
+/* ACKNOWLEDGEMENTS:
+ * This work was initially developed by the Howard Chu for inclusion
+ * in OpenLDAP Software and subsequently enhanced by Pierangelo
+ * Masarati and Apurva Kumar.
+ */
+/* This is an altered version */
+/*
* This software is based on the backends back-ldap and back-meta, implemented
* by Howard Chu <hyc@highlandsun.com>, Mark Valence
* <kurash@sassafras.com>, Pierangelo Masarati <ando@sys-net.it> and other
#include "ldap_log.h"
#include "../../../libraries/libldap/ldap-int.h"
-#ifdef LDAP_CACHING
static Entry*
meta_create_entry(
Backend *be,
op_tmp.o_req_dn = cachebase;
op_tmp.o_req_ndn = ncachebase;
- op_tmp.o_caching_on = 0;
op_tmp.o_callback = &cb;
li->glue_be->be_search(&op_tmp, rs);
Attribute *attr, *soc_attr, **attrp;
struct berval dummy = { 0, NULL };
struct berval *bv, bdn;
- const char *text;
+ const char *text = NULL;
char* ename = NULL;
- struct berval sc;
- char* textbuf;
- size_t textlen;
+ struct berval sc = { 0, NULL };
+ char textbuf[SLAP_TEXT_BUFLEN];
+ size_t textlen = sizeof(textbuf);
if ( ber_scanf( &ber, "{m{", &bdn ) == LBER_ERROR ) {
result->type = CREATE_ENTRY_ERR;
rs->sr_entry->e_nname = ndn;
op->o_callback = cb;
- return 0;
+ return LDAP_SUCCESS;
+
} else if (rs->sr_type == REP_RESULT) {
op->o_callback = NULL;
send_ldap_result( op, rs );
- return 0;
+ return LDAP_SUCCESS;
}
+
+ return LDAP_SUCCESS;
}
-#endif