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

entries in hosts.deny can be duplicated #2

Closed
sn3ak opened this issue Jun 12, 2013 · 1 comment
Closed

entries in hosts.deny can be duplicated #2

sn3ak opened this issue Jun 12, 2013 · 1 comment

Comments

@sn3ak
Copy link

sn3ak commented Jun 12, 2013

I haven't attempted to look in the database, but due to issue #1 and entries not being removed from hosts.deny. I can verify, manual or automatic blacklist will add another entry into hosts.deny.

I suspect it would be wise to verify if an ip is already listed in the file, or with a working cleanup, make sure all copies of the ip is removed.

@msimerson
Copy link
Owner

The database is keyed off the IP, so duplication is not possible. Because of how IPs are removed from hosts.deny, all matches in the hosts.deny are removed when delisting.

I would accept a patch that optionally checks for the existence of an IP before adding it to hosts.deny, but I won't write it. In the odd case where an IP gets listed multiple times (because of a DB/tcpd file mismatch), it doesn't hurt anything. The amount of resources needed to parse the file before every write would greatly exceed the cost of having a few duplicated IPs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants