zonec: unable to open xxx.yy.zone: Too many open files

Wilhelm Zenz zenz at dominic.de
Thu Jul 17 09:47:16 UTC 2003


Hello NSD folks,

i found an error, while building the nsd.db via
nsdc rebuild (Version nsd-1.2.0):

..
..
zonec: reading zone "xxx0.yy.": 0 errors
zonec: writing zone "xxx0.yy.": done.
zonec: unable to open dominic-zones/xxx1.yy.zone: Too many open files
zonec: unable to open dominic-zones/xxx2.yy.zone: Too many open files
zonec: done with total 2 errors.

The zone-list-file contains only 251 zone-entries.
This happens on a
"SunOS xxx 5.9 Generic_112233-06 sun4u sparc SUNW,Sun-Fire-280R".

I fixed this problem in the file "zonec.c" simply adding
a line (line-nr: 582) to close the stream:

struct zone *
zone_read (char *name, char *zonefile)
{
..
..
         /* Open the zone file */
         if((parser = nsd_zopen(zonefile, 3600, CLASS_IN, name)) == NULL) {
                 fprintf(stderr, "zonec: unable to open %s: %s\n", zonefile, strerror(errno));
                 zone_free(z);
                 return NULL;
         }
..
..
+        /* Close the zone file */
+        fclose(parser->file);
         return z;
}


I hope it helps everybody else.



Best regard,

Wilhelm Zenz


-- 
Wilhelm Zenz       Email: zenz at digital-security.com
Tel: +49-2222-990-0   Web: www.digital-security.com
Fax: +49-2222-990-444           Web: www.dominic.de
DSS - Gesellschaft für Digitale Sicherheit mbH
Servatiusweg 19-23                   53332 Bornheim



More information about the nsd-users mailing list