mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
s4-drs: ignore zero value elements in DRS add operations
w2k8 sometimes sends us a new object via DRS with an attribute with no values
This commit is contained in:
parent
87b6f2e863
commit
523fb6d72b
@ -1135,6 +1135,19 @@ static int replmd_replicated_apply_add(struct replmd_replicated_request *ar)
|
||||
return replmd_replicated_request_error(ar, ret);
|
||||
}
|
||||
|
||||
/* remove any message elements that have zero values */
|
||||
for (i=0; i<msg->num_elements; i++) {
|
||||
if (msg->elements[i].num_values == 0) {
|
||||
DEBUG(4,(__location__ ": Removing attribute %s with num_values==0\n",
|
||||
msg->elements[i].name));
|
||||
memmove(&msg->elements[i],
|
||||
&msg->elements[i+1],
|
||||
sizeof(msg->elements[i])*(msg->num_elements - (i+1)));
|
||||
msg->num_elements--;
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* the meta data array is already sorted by the caller
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user