{SPAM?} Re: [Pdns-users] chroot environtment - how to fix?
bert hubert
ahu at ds9a.nl
Wed Jan 21 15:18:29 UTC 2004
Michiel, can you try this patch, it may help:
(cd your.pdns.source/pdns ; patch < this.email.message ; make etc etc)
Index: common_startup.cc
===================================================================
RCS file: /var/cvsroot/pdns/pdns/common_startup.cc,v
retrieving revision 1.19
diff -u -B -b -r1.19 common_startup.cc
--- common_startup.cc 17 Jan 2004 13:18:22 -0000 1.19
+++ common_startup.cc 21 Jan 2004 15:15:17 -0000
@@ -237,6 +237,7 @@
if(!arg()["setuid"].empty())
newuid=Utility::makeUidNumeric(arg()["setuid"]);
#ifndef WIN32
+ gethostbyname("ds9a.nl");
if(!arg()["chroot"].empty()) {
if(chroot(arg()["chroot"].c_str())<0) {
L<<Logger::Error<<"Unable to chroot to '"+arg()["chroot"]+"': "<<strerror(errno)<<", exiting"<<endl;
On Wed, Jan 21, 2004 at 04:11:23PM +0100, Michiel van Es wrote:
>
>
> Norbert Sendetzky schreef op 21-1-2004 15:45 het volgende:
>
> >-----BEGIN PGP SIGNED MESSAGE-----
> >Hash: SHA1
> >
> >On Wednesday 21 January 2004 15:41, Michiel van Es wrote:
> >
> >
> >>When I enable the chrooted environment the default is ./
> >>What is ./ for directory? Is that the /etc/powerdns folder?
> >>And I got some problems restarting Pdns..I heard that you have to
> >>copy the /etc/resolv.conf file to the chrooted directory.
> >>Does anyone have some experience with the newest pdns version
> >>running in a chrooted environment?
> >>
> >>
> >
> >Look at last years mailing list archive (4. quarter I think). There's
> >a long thread about chroot'ed environments.
> >
> >IIRC, you need /etc/resolv.conf, /lib/*nss* and possibly a few other
> >files in /var/run/
> >
> >
> >Norbert
> >
> >-----BEGIN PGP SIGNATURE-----
> >Version: GnuPG v1.0.6 (GNU/Linux)
> >Comment: For info see http://www.gnupg.org
> >
> >iEYEARECAAYFAkAOkHwACgkQxMLs5v5/7eByhQCfbxnpIZvvqLIJhd4cL4LabQkG
> >bvMAnibq+P0jv7z5TQoePPpq2HJ0ih/t
> >=tivO
> >-----END PGP SIGNATURE-----
> >
> >
> >
> >
> Norbert thanks,
> but It still does not work for me.
> The only thing I see in the mailinglist, is to have a chroot directory
> (/var/chroot) and make an /etc and /lib directory in that directory.
> Than copy the /etc/hosts,/etc/resolv.conf and /etc/nsswitch.conf to the
> /var/chroot/etc directory.
> The libnss* copied to the /var/chroot/lib directory, restarted pdns but
> still no luck:
>
> Jan 21 15:08:00 server pdns[27158]: Unable to queue notification of
> domain 'pcintelligence.nl': nameservers do not resolve!
>
> Isn't there a specif clue what to be done or to be copied?
>
> Thanks in advance.
>
> regards,
>
> Michiel
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> http://mailman.powerdns.com/mailman/listinfo/pdns-users
--
http://www.PowerDNS.com Open source, database driven DNS Software
http://lartc.org Linux Advanced Routing & Traffic Control HOWTO
More information about the Pdns-users
mailing list