Skip to content

Commit

Permalink
libcli/dns: ignore NS entries in dns_hosts_file.c at a higher log lev…
Browse files Browse the repository at this point in the history
…el for now

Signed-off-by: Stefan Metzmacher <[email protected]>
Reviewed-by: Andrew Bartlett <[email protected]>
  • Loading branch information
metze-samba committed Aug 26, 2014
1 parent 7f18a3b commit 3fcc4a5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions libcli/dns/dns_hosts_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ static bool getdns_hosts_fileent(TALLOC_CTX *ctx, XFILE *fp, char **pp_name, cha
} else if (name_type && strcasecmp(name_type, "CNAME") == 0) {
if (next_token_talloc(ctx, &ptr, &next_name, NULL))
++count;
} else if (name_type && strcasecmp(name_type, "NS") == 0) {
if (next_token_talloc(ctx, &ptr, &next_name, NULL))
++count;
}
if (count <= 0)
continue;
Expand Down Expand Up @@ -155,6 +158,15 @@ static bool getdns_hosts_fileent(TALLOC_CTX *ctx, XFILE *fp, char **pp_name, cha
if (!*pp_next_name) {
return false;
}
} else if (strcasecmp(name_type, "NS") == 0) {
if (count != 3) {
DEBUG(0,("getdns_hosts_fileent: Ill formed hosts NS record [%s]\n",
line));
continue;
}
DEBUG(4, ("getdns_hosts_fileent: NS entry: %s %s %s\n",
name_type, name, next_name));
continue;
} else {
DEBUG(0,("getdns_hosts_fileent: unknown type %s\n", name_type));
continue;
Expand Down

0 comments on commit 3fcc4a5

Please sign in to comment.