"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "source4/rpc_server/dnsserver/dnsdb.c" between
samba-4.12.3.tar.gz and samba-4.12.5.tar.gz

About: Samba is the standard Windows interoperability suite of programs for Linux and Unix providing secure, stable and fast file and print services for all clients using the SMB/CIFS protocol. 4.12 series.

dnsdb.c  (samba-4.12.3):dnsdb.c  (samba-4.12.5)
skipping to change at line 158 skipping to change at line 158
struct dnsp_DnsProperty, struct dnsp_DnsProperty,
element->num_values); element->num_values);
for (j = 0; j < element->num_values; j++ ) { for (j = 0; j < element->num_values; j++ ) {
err = ndr_pull_struct_blob( err = ndr_pull_struct_blob(
&(element->values[j]), &(element->values[j]),
mem_ctx, mem_ctx,
&props[j], &props[j],
(ndr_pull_flags_fn_t) (ndr_pull_flags_fn_t)
ndr_pull_dnsp_DnsProperty); ndr_pull_dnsp_DnsProperty);
if (!NDR_ERR_CODE_IS_SUCCESS(err)){ if (!NDR_ERR_CODE_IS_SUCCESS(err)){
goto failed; /*
* Per Microsoft we must
* ignore invalid data here
* and continue as a Windows
* server can put in a
* structure with an invalid
* length.
*
* We can safely fill in an
* extra empty property here
* because
* dns_zoneinfo_load_zone_property()
* just ignores
* DSPROPERTY_ZONE_EMPTY
*/
ZERO_STRUCT(props[j]);
props[j].id = DSPROPERTY_ZONE_EMPTY;
continue;
} }
} }
z->tmp_props = props; z->tmp_props = props;
z->num_props = element->num_values; z->num_props = element->num_values;
} }
} }
return zones; return zones;
failed: failed:
talloc_free(tmp_ctx); talloc_free(tmp_ctx);
skipping to change at line 805 skipping to change at line 822
if (prop == NULL) { if (prop == NULL) {
TALLOC_FREE(tmp_ctx); TALLOC_FREE(tmp_ctx);
return WERR_NOT_ENOUGH_MEMORY; return WERR_NOT_ENOUGH_MEMORY;
} }
err = ndr_pull_struct_blob( err = ndr_pull_struct_blob(
&(element->values[i]), &(element->values[i]),
tmp_ctx, tmp_ctx,
prop, prop,
(ndr_pull_flags_fn_t)ndr_pull_dnsp_DnsProperty); (ndr_pull_flags_fn_t)ndr_pull_dnsp_DnsProperty);
if (!NDR_ERR_CODE_IS_SUCCESS(err)){ if (!NDR_ERR_CODE_IS_SUCCESS(err)){
DBG_ERR("dnsserver: couldn't PULL dns property id " /*
"%d in zone %s\n", * If we can't pull it then try again parsing
prop->id, * it again. A Windows server in the domain
ldb_dn_get_linearized(z->zone_dn)); * will permit the addition of an invalidly
TALLOC_FREE(tmp_ctx); * formed property with a 0 length and cause a
return WERR_INTERNAL_DB_ERROR; * failure here
*/
struct dnsp_DnsProperty_short
*short_property
= talloc_zero(element,
struct dnsp_DnsProperty_short);
if (short_property == NULL) {
TALLOC_FREE(tmp_ctx);
return WERR_NOT_ENOUGH_MEMORY;
}
err = ndr_pull_struct_blob_all(
&(element->values[i]),
tmp_ctx,
short_property,
(ndr_pull_flags_fn_t)ndr_pull_dnsp_DnsProperty_sh
ort);
if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
/*
* Unknown invalid data should be
* ignored and logged to match Windows
* behaviour
*/
DBG_NOTICE("dnsserver: couldn't PULL "
"dnsProperty value#%d in "
"zone %s while trying to "
"reset id %d\n",
i,
ldb_dn_get_linearized(z->zone_dn),
prop_id);
continue;
}
/*
* Initialise the parts of the property not
* overwritten by value() in the IDL for
* re-push
*/
*prop = (struct dnsp_DnsProperty){
.namelength = short_property->namelength,
.id = short_property->id,
.name = short_property->name
/* .data will be filled in below */
};
} }
if (prop->id == prop_id) { if (prop->id == prop_id) {
switch (prop_id) { switch (prop_id) {
case DSPROPERTY_ZONE_AGING_STATE: case DSPROPERTY_ZONE_AGING_STATE:
prop->data.aging_enabled = n_p->dwParam; prop->data.aging_enabled = n_p->dwParam;
break; break;
case DSPROPERTY_ZONE_NOREFRESH_INTERVAL: case DSPROPERTY_ZONE_NOREFRESH_INTERVAL:
prop->data.norefresh_hours = n_p->dwParam; prop->data.norefresh_hours = n_p->dwParam;
break; break;
 End of changes. 2 change blocks. 
7 lines changed or deleted 66 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)