/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2004-2009 The OpenLDAP Foundation.
+ * Copyright 2004-2011 The OpenLDAP Foundation.
* Portions Copyright (C) 2004 Virginia Tech, David Hawes.
* All rights reserved.
*
static int addpartial_add( Operation *op, SlapReply *rs)
{
Operation nop = *op;
- SlapReply nrs = { REP_RESULT };
Entry *toAdd = NULL;
Entry *found = NULL;
slap_overinst *on = (slap_overinst *) op->o_bd->bd_info;
int rc;
- AclCheck ak = { op->ora_e. slap_schema.si_ad_entry, NULL, ACL_WRITE };
toAdd = op->oq_add.rs_e;
addpartial.on_bi.bi_type, toAdd->e_nname.bv_val,0);
/* if the user doesn't have access, fall through to the normal ADD */
- if(!access_allowed(op, &ak ))
+ if(!access_allowed(op, toAdd, slap_schema.si_ad_entry,
+ NULL, ACL_WRITE, NULL))
{
return SLAP_CB_CONTINUE;
}
Debug(LDAP_DEBUG_TRACE, "%s: mods to do...\n",
addpartial.on_bi.bi_type, 0, 0);
- memset(&nrs, 0, sizeof(nrs));
- nrs.sr_type = REP_RESULT;
- nrs.sr_err = LDAP_SUCCESS;
- nrs.sr_entry = NULL;
- nrs.sr_text = NULL;
-
nop.o_tag = LDAP_REQ_MODIFY;
nop.orm_modlist = mods;
nop.orm_no_opattrs = 0;
if(nop.o_bd->be_modify)
{
+ SlapReply nrs = { REP_RESULT };
rc = (nop.o_bd->be_modify)(&nop, &nrs);
}