/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2002-2004 The OpenLDAP Foundation.
+ * Copyright 2002-2005 The OpenLDAP Foundation.
* Portions Copyright 1997,2002-2003 IBM Corporation.
* All rights reserved.
*
#include <ac/stdarg.h>
#include <ac/ctype.h>
#include <ac/unistd.h>
-#include <ldap_pvt.h>
#include <slap.h>
#include <slapi.h>
if ( slapi_mask & SLAPI_OPERATION_ABANDON )
*slap_mask |= SLAP_CTRL_ABANDON;
- *slap_mask |= SLAP_CTRL_FRONTEND;
+ *slap_mask |= SLAP_CTRL_GLOBAL;
}
static int
slapiControlOp2SlapControlMask( controlops, &controlmask );
- register_supported_control( controloid, controlmask, NULL, slapi_int_parse_control );
+ register_supported_control( controloid, controlmask, NULL, slapi_int_parse_control, NULL );
#endif /* LDAP_SLAPI */
}
case SLAPI_ACL_DELETE:
case SLAPI_ACL_ADD:
case SLAPI_ACL_SELF:
+ /* FIXME: handle ACL_WADD/ACL_WDEL */
slap_access = ACL_WRITE;
break;
default:
Modifications *modlist = NULL, **modtail;
LDAPMod **modp;
+ if ( mods == NULL ) {
+ return NULL;
+ }
+
modtail = &modlist;
for( modp = mods; *modp != NULL; modp++ ) {
switch ( access ) {
case ACL_WRITE:
+ /* FIXME: handle ACL_WADD/ACL_WDEL */
slap_access |= SLAPI_ACL_ADD | SLAPI_ACL_DELETE | SLAPI_ACL_WRITE;
break;
case ACL_READ:
if ( slapi_pblock_get( pb, SLAPI_BACKEND, (void **)&be ) != 0 )
return -1;
- rc = entry_schema_check( be, e, NULL, &text, textbuf, textlen );
+ rc = entry_schema_check( be, e, NULL, 0,
+ &text, textbuf, textlen );
return ( rc == LDAP_SUCCESS ) ? 0 : 1;
#else
#endif /* LDAP_SLAPI */
}
+int slapi_x_backend_get_flags( const Slapi_Backend *be, unsigned long *flags )
+{
+#ifdef LDAP_SLAPI
+ if ( be == NULL )
+ return LDAP_PARAM_ERROR;
+
+ *flags = SLAP_DBFLAGS(be);
+
+ return LDAP_SUCCESS;
+#else
+ return -1;
+#endif /* LDAP_SLAPI */
+}
+