Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1882485: Prevent dig errors from corrupting host's /etc/hosts #223

Merged
merged 2 commits into from Dec 15, 2020

Commits on Dec 11, 2020

  1. Prevent dig errors from corrupting host's /etc/hosts

    It's possible for `dig` to print error messages and still succeed, such as
    if retries are attempted. If that happens, each word of the error
    message is treated as a separate IP for the service that's being
    resolved, causing /etc/hosts to be updated with garbage data.
    
    This PR does 2 things:
    - filters out error messages from `dig`, which always begin the line
      with ';' (usually with ';;', but some messages only have one
      semicolon)
    - sets maximum retries to 0 when using tcp for dns, so that the behavior
      matches that of udp
    rfredette committed Dec 11, 2020
    Copy the full SHA
    610189c View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    9cc3d3c View commit details
    Browse the repository at this point in the history