diff --git a/CHANGES b/CHANGES index 407a869eec..a769298ca9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +4104. [bug] Address uninitialized elements. [RT #39252] + 4103. [port] Misc fixes for Microsoft Visual Studio 2015 CTP6. [RT #39267] diff --git a/bin/tests/system/mkeys/tests.sh b/bin/tests/system/mkeys/tests.sh index 38304414f0..b4678c5a40 100644 --- a/bin/tests/system/mkeys/tests.sh +++ b/bin/tests/system/mkeys/tests.sh @@ -289,30 +289,30 @@ $RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 loadkeys . | sed 's/^/I: ns1 / sleep 3 $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 managed-keys refresh | sed 's/^/I: ns2 /' sleep 1 -$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 managed-keys status > rndc.out.$n 2>&1 +$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 managed-keys status > rndc.out.a.$n 2>&1 # four keys listed -count=`grep -c "keyid: " rndc.out.$n` +count=`grep -c "keyid: " rndc.out.a.$n` [ "$count" -eq 4 ] || ret=1 # one revoked -count=`grep -c "trust revoked" rndc.out.$n` +count=`grep -c "trust revoked" rndc.out.a.$n` [ "$count" -eq 1 ] || ret=1 # two pending -count=`grep -c "trust pending" rndc.out.$n` +count=`grep -c "trust pending" rndc.out.a.$n` [ "$count" -eq 2 ] || ret=1 $SETTIME -R now -K ns1 $standby3 > /dev/null $RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 loadkeys . | sed 's/^/I: ns1 /' sleep 3 $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 managed-keys refresh | sed 's/^/I: ns2 /' sleep 1 -$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 managed-keys status > rndc.out.$n 2>&1 +$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 managed-keys status > rndc.out.b.$n 2>&1 # now three keys listed -count=`grep -c "keyid: " rndc.out.$n` +count=`grep -c "keyid: " rndc.out.b.$n` [ "$count" -eq 3 ] || ret=1 # one revoked -count=`grep -c "trust revoked" rndc.out.$n` +count=`grep -c "trust revoked" rndc.out.b.$n` [ "$count" -eq 1 ] || ret=1 # one pending -count=`grep -c "trust pending" rndc.out.$n` +count=`grep -c "trust pending" rndc.out.b.$n` [ "$count" -eq 1 ] || ret=1 $SETTIME -D now -K ns1 $standby3 > /dev/null $RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 loadkeys . | sed 's/^/I: ns1 /' @@ -424,18 +424,18 @@ $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 managed-keys sync | sed 's/^/I $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 managed-keys status > rndc.out.$n 2>&1 # one key listed count=`grep -c "keyid: " rndc.out.$n` -[ "$count" -eq 1 ] || ret=1 +[ "$count" -eq 1 ] || { echo "'keyid:' count != 1"; ret=1; } # it's the original key id count=`grep -c "keyid: $keyid" rndc.out.$n` -[ "$count" -eq 1 ] || ret=1 +[ "$count" -eq 1 ] || { echo "'keyid: $keyid' count != 1"; ret=1; } # not revoked count=`grep -c "REVOKE" rndc.out.$n` -[ "$count" -eq 0 ] || ret=1 +[ "$count" -eq 0 ] || { echo "'REVOKE' count != 0"; ret=1; } # trust is still current count=`grep -c "trust" rndc.out.$n` -[ "$count" -eq 1 ] || ret=1 +[ "$count" -eq 1 ] || { echo "'trust' count != 1"; ret=1; } count=`grep -c "trusted since" rndc.out.$n` -[ "$count" -eq 1 ] || ret=1 +[ "$count" -eq 1 ] || { echo "'trusted since' count != 1"; ret=1; } if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index 1b43e945c6..aadb481ba9 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -1555,6 +1555,7 @@ static inline void init_rdataset(dns_rbtdb_t *rbtdb, rdatasetheader_t *h) { ISC_LINK_INIT(h, link); h->heap_index = 0; + h->rdh_ttl = 0; h->is_mmapped = 0; h->next_is_relative = 0; h->node_is_relative = 0; diff --git a/lib/dns/zone.c b/lib/dns/zone.c index a953521c6a..07895fe0f6 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -1050,6 +1050,7 @@ dns_zone_create(dns_zone_t **zonep, isc_mem_t *mctx) { zone->rss_oldver = NULL; zone->rss_event = NULL; zone->rss_state = NULL; + zone->updatemethod = dns_updatemethod_increment; zone->magic = ZONE_MAGIC; @@ -3844,6 +3845,8 @@ update_soa_serial(dns_db_t *db, dns_dbversion_t *ver, dns_diff_t *diff, isc_uint32_t serial; isc_result_t result; + INSIST(method != dns_updatemethod_none); + CHECK(dns_db_createsoatuple(db, ver, mctx, DNS_DIFFOP_DEL, &deltuple)); CHECK(dns_difftuple_copy(deltuple, &addtuple)); addtuple->op = DNS_DIFFOP_ADD; diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index 9cd6ebe16d..646aa66ba4 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -2267,6 +2267,7 @@ allocate_socket(isc__socketmgr_t *manager, isc_sockettype_t type, sock->dscp = 0; /* TOS/TCLASS is zero until set. */ sock->dupped = 0; sock->statsindex = NULL; + sock->active = 0; ISC_LINK_INIT(sock, link); @@ -2943,7 +2944,6 @@ socket_create(isc_socketmgr_t *manager0, int pf, isc_sockettype_t type, INSIST(0); } - sock->active = 0; sock->pf = pf; result = opensocket(manager, sock, (isc__socket_t *)dup_socket); diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c index 50f49ac6d9..2f91e543a9 100644 --- a/lib/isccfg/namedconf.c +++ b/lib/isccfg/namedconf.c @@ -785,7 +785,10 @@ parse_serverid(cfg_parser_t *pctx, const cfg_type_t *type, return (cfg_create_obj(pctx, &cfg_type_none, ret)); if (pctx->token.type == isc_tokentype_string && strcasecmp(TOKEN_STRING(pctx), "hostname") == 0) { - return (cfg_create_obj(pctx, &cfg_type_hostname, ret)); + result = cfg_create_obj(pctx, &cfg_type_hostname, ret); + if (result == ISC_R_SUCCESS) + (*ret)->value.boolean = ISC_TRUE; + return (result); } cfg_ungettoken(pctx); return (cfg_parse_qstring(pctx, type, ret));