--- servers/slapd/back-sock/compare.c 2007/09/07 10:04:55 1.1 +++ servers/slapd/back-sock/compare.c 2009/12/11 23:12:24 1.5.2.1 @@ -1,8 +1,8 @@ /* compare.c - sock backend compare function */ -/* $OpenLDAP$ */ +/* $OpenLDAP: pkg/ldap/servers/slapd/back-sock/compare.c,v 1.5 2009/01/21 23:40:37 kurt Exp $ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2009 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -13,6 +13,10 @@ * top-level directory of the distribution or, alternatively, at * . */ +/* ACKNOWLEDGEMENTS: + * This work was initially developed by Brian Candler for inclusion + * in OpenLDAP Software. + */ #include "portable.h" @@ -30,9 +34,9 @@ sock_back_compare( 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; @@ -43,8 +47,7 @@ sock_back_compare( 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;