mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s4:dns_server: Fix code spelling
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
This commit is contained in:
parent
dbb1fbe866
commit
ed3c1fcb87
@ -1107,15 +1107,15 @@ _PUBLIC_ isc_result_t dlz_allowzonexfr(void *dbdata, const char *name, const cha
|
|||||||
denied_clients = lpcfg_dns_zone_transfer_clients_deny(state->lp);
|
denied_clients = lpcfg_dns_zone_transfer_clients_deny(state->lp);
|
||||||
|
|
||||||
/* The logic of allow_access() when both allow and deny lists are given
|
/* The logic of allow_access() when both allow and deny lists are given
|
||||||
* does not match our expectation here: it would allow clients thar are
|
* does not match our expectation here: it would allow clients that are
|
||||||
* neither allowed nor denied.
|
* neither allowed nor denied.
|
||||||
* Here, we want to deny clients by default.
|
* Here, we want to deny clients by default.
|
||||||
* Using the allow_access() function is still useful as it takes care of
|
* Using the allow_access() function is still useful as it takes care of
|
||||||
* parsing IP adresses and subnets in a consistent way with other options
|
* parsing IP addresses and subnets in a consistent way with other options
|
||||||
* from smb.conf.
|
* from smb.conf.
|
||||||
*
|
*
|
||||||
* We will then check the deny list first, then the allow list, so that
|
* We will then check the deny list first, then the allow list, so that
|
||||||
* we accept only clients that are explicitely allowed AND not explicitely
|
* we accept only clients that are explicitly allowed AND not explicitly
|
||||||
* denied.
|
* denied.
|
||||||
*/
|
*/
|
||||||
if ((authorized_clients == NULL) && (denied_clients == NULL)) {
|
if ((authorized_clients == NULL) && (denied_clients == NULL)) {
|
||||||
@ -1409,7 +1409,7 @@ static bool b9_has_soa(struct dlz_bind9_data *state, struct ldb_dn *dn, const ch
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The SOA record is alwas stored under DC=@,DC=zonename
|
* The SOA record is always stored under DC=@,DC=zonename
|
||||||
* This can probably be removed when dns_common_lookup makes a fallback
|
* This can probably be removed when dns_common_lookup makes a fallback
|
||||||
* lookup on @ pseudo record
|
* lookup on @ pseudo record
|
||||||
*/
|
*/
|
||||||
|
@ -54,7 +54,7 @@ static WERROR check_one_prerequisite(struct dns_server *dns,
|
|||||||
bool found = false;
|
bool found = false;
|
||||||
struct dnsp_DnssrvRpcRecord *rec = NULL;
|
struct dnsp_DnssrvRpcRecord *rec = NULL;
|
||||||
struct dnsp_DnssrvRpcRecord *ans;
|
struct dnsp_DnssrvRpcRecord *ans;
|
||||||
uint16_t acount;
|
uint16_t a_count;
|
||||||
|
|
||||||
size_t host_part_len = 0;
|
size_t host_part_len = 0;
|
||||||
|
|
||||||
@ -82,19 +82,19 @@ static WERROR check_one_prerequisite(struct dns_server *dns,
|
|||||||
if (pr->rr_type == DNS_QTYPE_ALL) {
|
if (pr->rr_type == DNS_QTYPE_ALL) {
|
||||||
/*
|
/*
|
||||||
*/
|
*/
|
||||||
werror = dns_lookup_records(dns, mem_ctx, dn, &ans, &acount);
|
werror = dns_lookup_records(dns, mem_ctx, dn, &ans, &a_count);
|
||||||
if (W_ERROR_EQUAL(werror, WERR_DNS_ERROR_NAME_DOES_NOT_EXIST)) {
|
if (W_ERROR_EQUAL(werror, WERR_DNS_ERROR_NAME_DOES_NOT_EXIST)) {
|
||||||
return DNS_ERR(NAME_ERROR);
|
return DNS_ERR(NAME_ERROR);
|
||||||
}
|
}
|
||||||
W_ERROR_NOT_OK_RETURN(werror);
|
W_ERROR_NOT_OK_RETURN(werror);
|
||||||
|
|
||||||
if (acount == 0) {
|
if (a_count == 0) {
|
||||||
return DNS_ERR(NAME_ERROR);
|
return DNS_ERR(NAME_ERROR);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
*/
|
*/
|
||||||
werror = dns_lookup_records(dns, mem_ctx, dn, &ans, &acount);
|
werror = dns_lookup_records(dns, mem_ctx, dn, &ans, &a_count);
|
||||||
if (W_ERROR_EQUAL(werror, WERR_DNS_ERROR_NAME_DOES_NOT_EXIST)) {
|
if (W_ERROR_EQUAL(werror, WERR_DNS_ERROR_NAME_DOES_NOT_EXIST)) {
|
||||||
return DNS_ERR(NXRRSET);
|
return DNS_ERR(NXRRSET);
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ static WERROR check_one_prerequisite(struct dns_server *dns,
|
|||||||
}
|
}
|
||||||
W_ERROR_NOT_OK_RETURN(werror);
|
W_ERROR_NOT_OK_RETURN(werror);
|
||||||
|
|
||||||
for (i = 0; i < acount; i++) {
|
for (i = 0; i < a_count; i++) {
|
||||||
if (ans[i].wType == (enum dns_record_type) pr->rr_type) {
|
if (ans[i].wType == (enum dns_record_type) pr->rr_type) {
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
@ -130,14 +130,14 @@ static WERROR check_one_prerequisite(struct dns_server *dns,
|
|||||||
if (pr->rr_type == DNS_QTYPE_ALL) {
|
if (pr->rr_type == DNS_QTYPE_ALL) {
|
||||||
/*
|
/*
|
||||||
*/
|
*/
|
||||||
werror = dns_lookup_records(dns, mem_ctx, dn, &ans, &acount);
|
werror = dns_lookup_records(dns, mem_ctx, dn, &ans, &a_count);
|
||||||
if (W_ERROR_EQUAL(werror, WERR_OK)) {
|
if (W_ERROR_EQUAL(werror, WERR_OK)) {
|
||||||
return DNS_ERR(YXDOMAIN);
|
return DNS_ERR(YXDOMAIN);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
*/
|
*/
|
||||||
werror = dns_lookup_records(dns, mem_ctx, dn, &ans, &acount);
|
werror = dns_lookup_records(dns, mem_ctx, dn, &ans, &a_count);
|
||||||
if (W_ERROR_EQUAL(werror, WERR_DNS_ERROR_NAME_DOES_NOT_EXIST)) {
|
if (W_ERROR_EQUAL(werror, WERR_DNS_ERROR_NAME_DOES_NOT_EXIST)) {
|
||||||
werror = WERR_OK;
|
werror = WERR_OK;
|
||||||
}
|
}
|
||||||
@ -145,7 +145,7 @@ static WERROR check_one_prerequisite(struct dns_server *dns,
|
|||||||
werror = WERR_OK;
|
werror = WERR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < acount; i++) {
|
for (i = 0; i < a_count; i++) {
|
||||||
if (ans[i].wType == (enum dns_record_type) pr->rr_type) {
|
if (ans[i].wType == (enum dns_record_type) pr->rr_type) {
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
@ -170,7 +170,7 @@ static WERROR check_one_prerequisite(struct dns_server *dns,
|
|||||||
|
|
||||||
*final_result = false;
|
*final_result = false;
|
||||||
|
|
||||||
werror = dns_lookup_records(dns, mem_ctx, dn, &ans, &acount);
|
werror = dns_lookup_records(dns, mem_ctx, dn, &ans, &a_count);
|
||||||
if (W_ERROR_EQUAL(werror, WERR_DNS_ERROR_NAME_DOES_NOT_EXIST)) {
|
if (W_ERROR_EQUAL(werror, WERR_DNS_ERROR_NAME_DOES_NOT_EXIST)) {
|
||||||
return DNS_ERR(NXRRSET);
|
return DNS_ERR(NXRRSET);
|
||||||
}
|
}
|
||||||
@ -182,10 +182,10 @@ static WERROR check_one_prerequisite(struct dns_server *dns,
|
|||||||
rec = talloc_zero(mem_ctx, struct dnsp_DnssrvRpcRecord);
|
rec = talloc_zero(mem_ctx, struct dnsp_DnssrvRpcRecord);
|
||||||
W_ERROR_HAVE_NO_MEMORY(rec);
|
W_ERROR_HAVE_NO_MEMORY(rec);
|
||||||
|
|
||||||
werror = dns_rr_to_dnsp(rec, pr, rec, dns_name_is_static(ans, acount));
|
werror = dns_rr_to_dnsp(rec, pr, rec, dns_name_is_static(ans, a_count));
|
||||||
W_ERROR_NOT_OK_RETURN(werror);
|
W_ERROR_NOT_OK_RETURN(werror);
|
||||||
|
|
||||||
for (i = 0; i < acount; i++) {
|
for (i = 0; i < a_count; i++) {
|
||||||
if (dns_record_match(rec, &ans[i])) {
|
if (dns_record_match(rec, &ans[i])) {
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
|
@ -912,7 +912,7 @@ WERROR dns_get_zone_properties(struct ldb_context *samdb,
|
|||||||
/*
|
/*
|
||||||
* If we can't pull it, then there is no valid
|
* If we can't pull it, then there is no valid
|
||||||
* data to load into the zone, so ignore this
|
* data to load into the zone, so ignore this
|
||||||
* as Micosoft does. Windows can load an
|
* as Microsoft does. Windows can load an
|
||||||
* invalid property with a zero length into
|
* invalid property with a zero length into
|
||||||
* the dnsProperty attribute.
|
* the dnsProperty attribute.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user