1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-23 09:57:40 +03:00

s4:objectclass_attrs LDB module - simplify the invoke of the "dSHeuristics" checker

It's always invoked on add and modify operations.
This commit is contained in:
Matthias Dieter Wallnöfer 2010-11-03 16:21:37 +01:00
parent 3f4380993e
commit b841d12a13

View File

@ -200,14 +200,15 @@ static int attr_handler(struct oc_context *ac)
talloc_free(res);
}
}
/* dSHeuristics syntax check */
if ((ac->req->operation == LDB_ADD || ac->req->operation == LDB_MODIFY) &&
(ldb_attr_cmp(attr->lDAPDisplayName, "dSHeuristics") == 0)) {
/* "dSHeuristics" syntax check */
if (ldb_attr_cmp(attr->lDAPDisplayName, "dSHeuristics") == 0) {
ret = oc_validate_dsheuristics(&(msg->elements[i]));
if (ret != LDB_SUCCESS) {
return ret;
}
}
/* Substitute the attribute name to match in case */
msg->elements[i].name = attr->lDAPDisplayName;
}