SlapReply *rs )
{
struct shellinfo *si = (struct shellinfo *) op->o_bd->be_private;
- AttributeDescription *entry = slap_schema.si_ad_entry;
FILE *rfp, *wfp;
int len;
+ AclCheck ak = { op->ora_e, slap_schema.si_ad_entry, NULL, ACL_WADD, NULL };
if ( si->si_add == NULL ) {
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
return( -1 );
}
- if ( ! access_allowed( op, op->oq_add.rs_e,
- entry, NULL, ACL_WADD, NULL ) )
+ if ( ! access_allowed( op, &ak ))
{
send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS, NULL );
return -1;
SlapReply *rs )
{
struct shellinfo *si = (struct shellinfo *) op->o_bd->be_private;
- AttributeDescription *entry = slap_schema.si_ad_entry;
Entry e;
FILE *rfp, *wfp;
int rc;
+ AclCheck ak = { &e, slap_schema.si_ad_entry, NULL, ACL_AUTH, NULL };
/* allow rootdn as a means to auth without the need to actually
* contact the proxied DSA */
e.e_bv.bv_val = NULL;
e.e_private = NULL;
- if ( ! access_allowed( op, &e,
- entry, NULL, ACL_AUTH, NULL ) )
+ if ( ! access_allowed( op, &ak ))
{
send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS, NULL );
return -1;
SlapReply *rs )
{
struct shellinfo *si = (struct shellinfo *) op->o_bd->be_private;
- AttributeDescription *entry = slap_schema.si_ad_entry;
Entry e;
FILE *rfp, *wfp;
+ AclCheck ak = { &e, slap_schema.si_ad_entry, NULL, ACL_COMPARE, NULL };
if ( si->si_compare == NULL ) {
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
e.e_bv.bv_val = NULL;
e.e_private = NULL;
- if ( ! access_allowed( op, &e,
- entry, NULL, ACL_READ, NULL ) )
+ if ( ! access_allowed( op, &ak ))
{
send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS, NULL );
return -1;
SlapReply *rs )
{
struct shellinfo *si = (struct shellinfo *) op->o_bd->be_private;
- AttributeDescription *entry = slap_schema.si_ad_entry;
Entry e;
FILE *rfp, *wfp;
+ AclCheck ak = { &e, slap_schema.si_ad_entry, NULL, ACL_WDEL, NULL };
if ( si->si_delete == NULL ) {
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
e.e_bv.bv_val = NULL;
e.e_private = NULL;
- if ( ! access_allowed( op, &e,
- entry, NULL, ACL_WDEL, NULL ) )
+ if ( ! access_allowed( op, &ak ))
{
send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS, NULL );
return -1;
{
Modification *mod;
struct shellinfo *si = (struct shellinfo *) op->o_bd->be_private;
- AttributeDescription *entry = slap_schema.si_ad_entry;
Modifications *ml = op->orm_modlist;
Entry e;
FILE *rfp, *wfp;
int i;
+ AclCheck ak = { &e, slap_schema.si_ad_entry, NULL, ACL_WRITE, NULL };
if ( si->si_modify == NULL ) {
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
e.e_bv.bv_val = NULL;
e.e_private = NULL;
- if ( ! access_allowed( op, &e,
- entry, NULL, ACL_WRITE, NULL ) )
+ if ( ! access_allowed( op, &ak ))
{
send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS, NULL );
return -1;
SlapReply *rs )
{
struct shellinfo *si = (struct shellinfo *) op->o_bd->be_private;
- AttributeDescription *entry = slap_schema.si_ad_entry;
Entry e;
FILE *rfp, *wfp;
+ AclCheck ak = { &e, slap_schema.si_ad_entry, NULL, ACL_WRITE, NULL };
if ( si->si_modrdn == NULL ) {
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
e.e_bv.bv_val = NULL;
e.e_private = NULL;
- if ( ! access_allowed( op, &e, entry, NULL,
- op->oq_modrdn.rs_newSup ? ACL_WDEL : ACL_WRITE,
- NULL ) )
+
+ if ( op->oq_modrdn.rs_newSup ) ak.ak_access = ACL_WDEL;
+ if ( ! access_allowed( op, &ak ))
{
send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS, NULL );
return -1;
SlapReply *rs )
{
struct sockinfo *si = (struct sockinfo *) op->o_bd->be_private;
- AttributeDescription *entry = slap_schema.si_ad_entry;
FILE *fp;
int len;
+ AclCheck ak = { op->ora_e, slap_schema.si_ad_entry, NULL, ACL_WADD, NULL };
- if ( ! access_allowed( op, op->oq_add.rs_e,
- entry, NULL, ACL_WADD, NULL ) )
+ if ( ! access_allowed( op, &ak ))
{
send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS, NULL );
return -1;
SlapReply *rs )
{
struct sockinfo *si = (struct sockinfo *) op->o_bd->be_private;
- AttributeDescription *entry = slap_schema.si_ad_entry;
Entry e;
FILE *fp;
int rc;
+ AclCheck ak = { &e, slap_schema.si_ad_entry, NULL, ACL_AUTH, NULL };
e.e_id = NOID;
e.e_name = op->o_req_dn;
e.e_bv.bv_val = NULL;
e.e_private = NULL;
- if ( ! access_allowed( op, &e,
- entry, NULL, ACL_AUTH, NULL ) )
+ if ( ! access_allowed( op, &ak ))
{
send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS, NULL );
return -1;
SlapReply *rs )
{
struct sockinfo *si = (struct sockinfo *) op->o_bd->be_private;
- AttributeDescription *entry = slap_schema.si_ad_entry;
Entry e;
FILE *fp;
+ AclCheck ak = { &e, slap_schema.si_ad_entry, NULL, ACL_COMPARE, NULL };
e.e_id = NOID;
e.e_name = op->o_req_dn;
e.e_bv.bv_val = NULL;
e.e_private = NULL;
- if ( ! access_allowed( op, &e,
- entry, NULL, ACL_COMPARE, NULL ) )
+ if ( ! access_allowed( op, &ak ))
{
send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS, NULL );
return -1;
SlapReply *rs )
{
struct sockinfo *si = (struct sockinfo *) op->o_bd->be_private;
- AttributeDescription *entry = slap_schema.si_ad_entry;
Entry e;
FILE *fp;
+ AclCheck ak = { &e, slap_schema.si_ad_entry, NULL, ACL_WDEL, NULL };
e.e_id = NOID;
e.e_name = op->o_req_dn;
e.e_bv.bv_val = NULL;
e.e_private = NULL;
- if ( ! access_allowed( op, &e,
- entry, NULL, ACL_WDEL, NULL ) )
+ if ( ! access_allowed( op, &ak ))
{
send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS, NULL );
return -1;
{
Modification *mod;
struct sockinfo *si = (struct sockinfo *) op->o_bd->be_private;
- AttributeDescription *entry = slap_schema.si_ad_entry;
Modifications *ml = op->orm_modlist;
Entry e;
FILE *fp;
int i;
+ AclCheck ak = { &e, slap_schema.si_ad_entry, NULL, ACL_WRITE, NULL };
e.e_id = NOID;
e.e_name = op->o_req_dn;
e.e_bv.bv_val = NULL;
e.e_private = NULL;
- if ( ! access_allowed( op, &e,
- entry, NULL, ACL_WRITE, NULL ) )
+ if ( ! access_allowed( op, &ak ))
{
send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS, NULL );
return -1;
SlapReply *rs )
{
struct sockinfo *si = (struct sockinfo *) op->o_bd->be_private;
- AttributeDescription *entry = slap_schema.si_ad_entry;
Entry e;
FILE *fp;
+ AclCheck ak = { &e, slap_schema.si_ad_entry, NULL, ACL_WRITE, NULL };
e.e_id = NOID;
e.e_name = op->o_req_dn;
e.e_bv.bv_val = NULL;
e.e_private = NULL;
- if ( ! access_allowed( op, &e, entry, NULL,
- op->oq_modrdn.rs_newSup ? ACL_WDEL : ACL_WRITE,
- NULL ) )
+ if ( op->oq_modrdn.rs_newSup ) ak.ak_access = ACL_WDEL;
+ if ( ! access_allowed( op, &ak ))
{
send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS, NULL );
return -1;