Project

General

Profile

Bug #1138

DNS errors not caught in '__get_SRV_record' in rc.freenas

Added by Anonymous almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Important
Assignee:
-
Category:
Middleware
Target version:
-
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

If I plug in a bogus nameserver (or one that doesn't know the FQDN name) for an AD server, the error is lost because of how pipes in shells work:

        dig -t srv +short "${host}" | sort -n +0 +1 > "${tmpfile}" 

The output from dig should be redirected to a variable, sanity checked, and then sorted.

It also doesn't need to be output to a temporary file... echo @"<foo>" | sort | while read -r' works as well because we're not using local variables.

History

#1 Updated by John Hixson almost 9 years ago

  • Status changed from Unscreened to Closed

If the nameserver is bogus, no names will be able to be resolved and there are bigger issues. Outputting to a temporary file is perfectly fine, acceptable and poses no problems and is nitpicking.

Also available in: Atom PDF