Skip to content

Bug | superhosts.deny overwrites hosts.deny #703

Open
@mooleshacat

Description

What is the problem you are experiencing?

Looking at the installer scripts,

linux-hosts.deny-installer.sh:

# First Backup Existing hosts file
sudo mv /etc/hosts.deny /etc/hosts.deny.bak

# Now download the new hosts file and put it into place
sudo wget https://hosts.ubuntu101.co.za/hosts.deny -O /etc/hosts.deny

linux-superhosts.deny-installer.sh:

# Now download the new hosts.deny file and put it into place
sudo wget https://hosts.ubuntu101.co.za/superhosts.deny -O /etc/hosts.deny

As you can see both hosts.deny installer and superhosts.deny are writing to the same file hosts.deny

The end result is the first hosts.deny does not work because it is overwritten by superhosts.deny

Is this intended? I would have thought you'd want to merge the lists somehow?

How can we reproduce the problem?

  1. Install hosts.deny
  2. Install superhosts.deny
  3. cat /etc/hosts.deny and see that only one list is there

What did you expect to happen?

I expected I could install both hosts.deny and superhosts.deny and the lists would be merged?

Is there a workaround?

Manual merge the two lists together

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

Type

No type

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions