Skip to content

Convert 0.0.0.0 entries from /etc/hosts to unbound zone

Notifications You must be signed in to change notification settings

artsi0m/hosts2zone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

9* hosts2zone

Description

Convert entries from /etc/hosts to unbound local zone hat is my old code and therefore it smells

Roadmap

Short roadmap on improving situation with smelling code:

Use fgets(3) instead of getline(3)

hosts(5) says that lines in file are already limited to BUFSIZ characters (currently 1024).

Rewrite makefile

Use includes and BSD make.

Rewrite parsing

I need to rewrite hosts parsing. he best way is found out how system does it already. /etc/hosts is parsed by gethostbyname() by default, some code can be borrowed from here. Maybe use some lex.

Delete portability.

It was not tested and is done messy by ifdef macros.

About

Convert 0.0.0.0 entries from /etc/hosts to unbound zone

Resources

Stars

Watchers

Forks