nsd 3.0.1 + chroot() = fail to write xfrdfile
Wouter Wijngaards
wouter at NLnetLabs.nl
Tue Sep 26 14:35:12 UTC 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Koh-ichi,
Thanks for the bugreport (bug #146). I have incorporated the patch into
NSD svn. Below my addition to the patch so the 'difffile:' entry also
works. Fix will be released in NSD 3.0.2.
Thanks for the fix,
Wouter
Koh-ichi Ito wrote:
> Hello,
>
> I found that nsd 3.0.1 invoked with -t option fails to write
> xfrdfile at least exit time.
>
> I guess that the reason is that the pathname of chroot()
> jail is NOT striped from pathname of xfrdfile which is done
> for dbfile and pidfile in server.c::server_init().
>
> The following quick hack seems to fixes the problem.
>
> *** nsd-3.0.1/server.c-dist Wed Aug 23 15:09:57 2006
> --- nsd-3.0.1/server.c Tue Sep 26 16:50:08 2006
> ***************
> *** 443,448 ****
> --- 443,451 ----
>
> nsd->dbfile += l;
> nsd->pidfile += l;
> + if (nsd->options->xfrdfile) {
> + nsd->options->xfrdfile += l;
> + }
/* Insert here: */
if (nsd->options->difffile)
nsd->options->difffile += l;
>
> if (chroot(nsd->chrootdir)) {
> log_msg(LOG_ERR, "unable to chroot: %s", strerror(errno));
>
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFFGTqgkDLqNwOhpPgRAtltAJ4wuoVu9jo4JwXnA5c/A7W5/XCERgCgiOiK
WpMmnots26ykNLIaiDVzLR0=
=3Jsn
-----END PGP SIGNATURE-----
More information about the nsd-users
mailing list