version 1.4.2.1, 2009/12/11 23:12:24
|
version 1.5, 2010/04/13 20:18:22
|
Line 2
|
Line 2
|
/* $OpenLDAP: pkg/ldap/servers/slapd/back-sock/modrdn.c,v 1.4 2009/01/21 23:40:37 kurt Exp $ */ |
/* $OpenLDAP: pkg/ldap/servers/slapd/back-sock/modrdn.c,v 1.4 2009/01/21 23:40:37 kurt Exp $ */ |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
* |
* |
* Copyright 2007-2009 The OpenLDAP Foundation. |
* Copyright 2007-2010 The OpenLDAP Foundation. |
* All rights reserved. |
* All rights reserved. |
* |
* |
* Redistribution and use in source and binary forms, with or without |
* Redistribution and use in source and binary forms, with or without |
Line 34 sock_back_modrdn(
|
Line 34 sock_back_modrdn(
|
SlapReply *rs ) |
SlapReply *rs ) |
{ |
{ |
struct sockinfo *si = (struct sockinfo *) op->o_bd->be_private; |
struct sockinfo *si = (struct sockinfo *) op->o_bd->be_private; |
|
AttributeDescription *entry = slap_schema.si_ad_entry; |
Entry e; |
Entry e; |
FILE *fp; |
FILE *fp; |
AclCheck ak = { &e, slap_schema.si_ad_entry, NULL, ACL_WRITE, NULL }; |
|
|
|
e.e_id = NOID; |
e.e_id = NOID; |
e.e_name = op->o_req_dn; |
e.e_name = op->o_req_dn; |
Line 47 sock_back_modrdn(
|
Line 47 sock_back_modrdn(
|
e.e_bv.bv_val = NULL; |
e.e_bv.bv_val = NULL; |
e.e_private = NULL; |
e.e_private = NULL; |
|
|
if ( op->oq_modrdn.rs_newSup ) ak.ak_access = ACL_WDEL; |
if ( ! access_allowed( op, &e, entry, NULL, |
if ( ! access_allowed( op, &ak )) |
op->oq_modrdn.rs_newSup ? ACL_WDEL : ACL_WRITE, |
|
NULL ) ) |
{ |
{ |
send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS, NULL ); |
send_ldap_error( op, rs, LDAP_INSUFFICIENT_ACCESS, NULL ); |
return -1; |
return -1; |