Hello, I got an error message like the following: Jan 7 12:13:52 myhost nsd[92737]: corrupted database: /var/db/nsd.db Jan 7 12:13:52 myhost nsd[92737]: unable to load /var/db/nsd.db: No such file or directory The reason is the inconsistency between NAMEDB_MAGIC embeded in nsd.db and one nsd can treat. For example, nsd.db geterated by zonec in has "NSDdbV5" as NAMEDB_MAGIC and feed it to nsd 2.1.2 makes the matter described above because nsd 2.1.2 only accept "NSDdbV6". The erroe message "corrupted database" is easy to understand, but "No such file or directory" makes me be confused, yes, the file IS. This message is came from strerror() called by server_init() in server.c. But in this case, system call isn't involved with the error, so to call strerror() sounds inapropriate, I think. How? Koh-ichi Ito
[On 07 Jan, @ 07:36, Koh-ichi wrote in "error message on NAMEDB_MAGIC ..."]> Hello, > > I got an error message like the following: > > Jan 7 12:13:52 myhost nsd[92737]: corrupted database: /var/db/nsd.db > Jan 7 12:13:52 myhost nsd[92737]: unable to load /var/db/nsd.db: No such file or directory ><SNIP>> with the error, so to call strerror() sounds inapropriate, I > think. > > How?yes, you're right, but I don't see a quick fix. namedb_open() returns NULL on error, so there is currently no difference between a database error or a 'file not found' error. Maybe dropping the whole log_msg() from server.c would be an idea, and leave the error reporting in namedb_open(). grtz Miek