how to generate the name of a .nzf file?

Jan-Piet Mens jpmens.dns at
Tue Mar 20 16:21:39 UTC 2012

> The question is: how to generate the name of a nzf file?
> Is there a tool or an easy way?

The code is in lib/dns/view.c

        if (allow) {
                char buffer[ISC_SHA256_DIGESTSTRINGLENGTH + sizeof(NZF)];
                isc_sha256_data((void *)view->name, strlen(view->name), buffer);
                /* Truncate the hash at 16 chars; full length is * overkill */
                isc_string_printf(buffer + 16, sizeof(NZF), "%s", NZF);
                view->new_zone_file = isc_mem_strdup(view->mctx, buffer);
                view->new_zone_config = cfgctx;
                view->cfg_destroy = cfg_destroy;

Maybe something like this? (Untested)

        echo -n internal | shasum -a 256 | awk '{printf "%16.16s\n", $1}'


More information about the bind-users mailing list