]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-shell/delete.c
New access_allowed()
[openldap] / servers / slapd / back-shell / delete.c
index ae292f9686e92a100cd6baed9e0ce28b0f3a4e5c..ecbb15ef80be5889bbaa316828078229728b2ff6 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2004 The OpenLDAP Foundation.
+ * Copyright 1998-2009 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -44,9 +44,9 @@ shell_back_delete(
     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,
@@ -63,8 +63,7 @@ shell_back_delete(
        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;