mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
ITS#9552 Record reqNewDN for modRDNs
This commit is contained in:
parent
df27b2bbfd
commit
c2edf41fff
@ -201,7 +201,7 @@ static AttributeDescription *ad_reqDN, *ad_reqStart, *ad_reqEnd, *ad_reqType,
|
|||||||
*ad_reqSizeLimit, *ad_reqTimeLimit, *ad_reqAttrsOnly, *ad_reqData,
|
*ad_reqSizeLimit, *ad_reqTimeLimit, *ad_reqAttrsOnly, *ad_reqData,
|
||||||
*ad_reqId, *ad_reqMessage, *ad_reqVersion, *ad_reqDerefAliases,
|
*ad_reqId, *ad_reqMessage, *ad_reqVersion, *ad_reqDerefAliases,
|
||||||
*ad_reqReferral, *ad_reqOld, *ad_auditContext, *ad_reqEntryUUID,
|
*ad_reqReferral, *ad_reqOld, *ad_auditContext, *ad_reqEntryUUID,
|
||||||
*ad_minCSN;
|
*ad_minCSN, *ad_reqNewDN;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
logSchemaControlValidate(
|
logSchemaControlValidate(
|
||||||
@ -425,6 +425,15 @@ static struct {
|
|||||||
"SYNTAX 1.3.6.1.4.1.4203.666.11.2.1{64} "
|
"SYNTAX 1.3.6.1.4.1.4203.666.11.2.1{64} "
|
||||||
"NO-USER-MODIFICATION "
|
"NO-USER-MODIFICATION "
|
||||||
"USAGE dSAOperation )", &ad_minCSN },
|
"USAGE dSAOperation )", &ad_minCSN },
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ITS#9552
|
||||||
|
*/
|
||||||
|
{ "( " LOG_SCHEMA_AT ".33 NAME 'reqNewDN' "
|
||||||
|
"DESC 'New DN after rename' "
|
||||||
|
"EQUALITY distinguishedNameMatch "
|
||||||
|
"SYNTAX OMsDN "
|
||||||
|
"SINGLE-VALUE )", &ad_reqNewDN },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -477,7 +486,8 @@ static struct {
|
|||||||
"DESC 'ModRDN operation' "
|
"DESC 'ModRDN operation' "
|
||||||
"SUP auditWriteObject STRUCTURAL "
|
"SUP auditWriteObject STRUCTURAL "
|
||||||
"MUST ( reqNewRDN $ reqDeleteOldRDN ) "
|
"MUST ( reqNewRDN $ reqDeleteOldRDN ) "
|
||||||
"MAY ( reqNewSuperior $ reqMod $ reqOld ) )", &log_ocs[LOG_EN_MODRDN] },
|
"MAY ( reqNewSuperior $ reqMod $ reqOld $ reqNewDN ) )",
|
||||||
|
&log_ocs[LOG_EN_MODRDN] },
|
||||||
{ "( " LOG_SCHEMA_OC ".11 NAME 'auditSearch' "
|
{ "( " LOG_SCHEMA_OC ".11 NAME 'auditSearch' "
|
||||||
"DESC 'Search operation' "
|
"DESC 'Search operation' "
|
||||||
"SUP auditReadObject STRUCTURAL "
|
"SUP auditReadObject STRUCTURAL "
|
||||||
@ -1494,7 +1504,7 @@ static int accesslog_response(Operation *op, SlapReply *rs) {
|
|||||||
slap_verbmasks *lo;
|
slap_verbmasks *lo;
|
||||||
Entry *e = NULL, *old = NULL, *e_uuid = NULL;
|
Entry *e = NULL, *old = NULL, *e_uuid = NULL;
|
||||||
char timebuf[LDAP_LUTIL_GENTIME_BUFSIZE+8];
|
char timebuf[LDAP_LUTIL_GENTIME_BUFSIZE+8];
|
||||||
struct berval bv;
|
struct berval bv, bv2 = BER_BVNULL;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
BerVarray vals;
|
BerVarray vals;
|
||||||
Operation op2 = {0};
|
Operation op2 = {0};
|
||||||
@ -1774,7 +1784,13 @@ static int accesslog_response(Operation *op, SlapReply *rs) {
|
|||||||
NULL );
|
NULL );
|
||||||
if ( op->orr_newSup ) {
|
if ( op->orr_newSup ) {
|
||||||
attr_merge_one( e, ad_reqNewSuperior, op->orr_newSup, op->orr_nnewSup );
|
attr_merge_one( e, ad_reqNewSuperior, op->orr_newSup, op->orr_nnewSup );
|
||||||
|
bv2 = *op->orr_nnewSup;
|
||||||
|
} else {
|
||||||
|
dnParent( &op->o_req_ndn, &bv2 );
|
||||||
}
|
}
|
||||||
|
build_new_dn( &bv, &bv2, &op->orr_nnewrdn, op->o_tmpmemctx );
|
||||||
|
attr_merge_one( e, ad_reqNewDN, &bv, NULL );
|
||||||
|
op->o_tmpfree( bv.bv_val, op->o_tmpmemctx );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LOG_EN_COMPARE:
|
case LOG_EN_COMPARE:
|
||||||
|
Loading…
Reference in New Issue
Block a user