1
0
mirror of https://github.com/samba-team/samba.git synced 2025-09-04 09:44:20 +03:00

s4-dsdb: Use data_blob_string_const and add explaination for open-coded function in samldb

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri May  4 02:34:41 CEST 2012 on sn-devel-104
This commit is contained in:
Andrew Bartlett
2012-05-04 08:47:29 +10:00
parent 62503179b5
commit c8e6d8b487

View File

@@ -2018,8 +2018,11 @@ static int samldb_service_principal_names_change(struct samldb_ctx *ac)
}
/*
* append the new "servicePrincipalName" - code derived
* from ldb_msg_add_value()
* append the new "servicePrincipalName" -
* code derived from ldb_msg_add_value().
*
* Open coded to make it clear that we must
* append to the MOD_REPLACE el created above.
*/
vals = talloc_realloc(ac->msg, el->values,
struct ldb_val,
@@ -2028,8 +2031,7 @@ static int samldb_service_principal_names_change(struct samldb_ctx *ac)
return ldb_module_oom(ac->module);
}
el->values = vals;
el->values[el->num_values].data = (uint8_t *) new_str;
el->values[el->num_values].length = strlen(new_str);
el->values[el->num_values] = data_blob_string_const(new_str);
++(el->num_values);
}
}