summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-03-11 10:42:18 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-03-11 11:27:47 +1100
commit5ed18fad0037146bb321eb7e73c82be403a45917 (patch)
treec24b5a215595f7386d995beb46147c94ea35438c
parentc1fb657afc1184d192e0fbca05a8145e2383ffe7 (diff)
downloadsamba-5ed18fad0037146bb321eb7e73c82be403a45917.tar.gz
samba-5ed18fad0037146bb321eb7e73c82be403a45917.tar.bz2
samba-5ed18fad0037146bb321eb7e73c82be403a45917.zip
s4/rpc_server Don't segfault over replPropertyMetaData contents
The replPropertyMetaData may contain attrid values that we don't yet have in the local schema. We need to deal with this - it is a serious error, but we should not segfault. Andrew Bartlett
-rw-r--r--source4/rpc_server/drsuapi/getncchanges.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c
index 1e407501a5..c7c69de730 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -175,6 +175,13 @@ static WERROR get_nc_changes_build_object(struct drsuapi_DsReplicaObjectListItem
if (md.ctr.ctr1.array[i].attid == rdn_sa->attributeID_id) continue;
sa = dsdb_attribute_by_attributeID_id(schema, md.ctr.ctr1.array[i].attid);
+ if (!sa) {
+ DEBUG(0,(__location__ ": Failed to find attribute in schema for attrid %u mentioned in replPropertyMetaData of %s\n",
+ (unsigned int)md.ctr.ctr1.array[i].attid,
+ ldb_dn_get_linearized(msg->dn)));
+ return WERR_DS_DRA_INTERNAL_ERROR;
+ }
+
if (sa->linkID) {
struct ldb_message_element *el;
el = ldb_msg_find_element(msg, sa->lDAPDisplayName);