Bug 108964 - chroot-operation broken since 4.2.0
Summary: chroot-operation broken since 4.2.0
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: ntp
Version: 1.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Harald Hoyer
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-11-03 20:44 UTC by Enrico Scholz
Modified: 2007-04-18 16:59 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-08-03 16:02:39 UTC
Embargoed:


Attachments (Terms of Use)

Description Enrico Scholz 2003-11-03 20:44:27 UTC
Description of problem:

Since upgrade to 4.2.0 the chroot-mode does not work anymore; the
logfile says

| Nov  3 19:37:34 gkar ntpd[1398]: getaddrinfo: "127.0.0.1" invalid
host address, line ignored 

and connections with 'ntpq' are not possible.


A quick hack is to LD_PRELOAD some libnss* libraries, but because I
use numeric IPs only, DNS lookups should be not needed and before
upgrade to 4.2.0 things were fine. E.g.

| LD_PRELOAD=/lib/libnss_nis.so.2:/lib/libnss_files.so.2
/etc/init.d/ntpd start

makes it working.

---------

My chroot is

/var/chroot/ntp/
|-- dev
|   `-- log
|-- etc
|   |-- localtime
|   |-- ntp
|   |   |-- keys
|   |   `-- step-tickers
|   `-- ntp.conf
`-- var
    `-- lib
        `-- ntp
            `-- drift


ntpd is called as 'ntpd -T /var/chroot/ntp -U ntp -g'; and the cfg
file is 

restrict default ignore
restrict 127.0.0.1
driftfile /var/lib/ntp/drift
broadcastdelay 0.008
authenticate yes
keys /etc/ntp/keys
restrict 192.168.5.3 nomodify notrap noquery
server 192.168.5.3


Version-Release number of selected component (if applicable):

ntp-4.2.0-2


How reproducible:

100%

Comment 1 Harald Hoyer 2003-11-04 10:52:43 UTC
FYI, I downgraded to 4.1.2 for FC1

Comment 2 Enrico Scholz 2004-07-12 14:29:29 UTC
again/still in ntp-4.2.0-7 from FC2 and rawhide

Comment 3 Harald Hoyer 2004-07-29 15:46:07 UTC
why not copy the needed libraries in the chroot?

Comment 4 Enrico Scholz 2004-08-03 16:02:39 UTC
Does not seem to be needed with ntp-4.2.0.a.20040616-2 anymore; it is
working with chroot's out-of-the-box (after adjusting the options
which has been changed completly ('-U' -> '-u', '-T' -> '-i')).

But copying libs into the chroot would have some management-implications:
on glibc updates I would have to keep the libs up-to-date and 'strace'
orgies would be needed to determine the list of needed libs and files.


For the ntp, I solved it by setting LD_PRELOAD in a way like

| LD_PRELOAD=/lib/libnss_nis.so.2:/lib/libnss_files.so.2 /etc/init.d/ntpd restart

but (as said), this is not needed anymore.



Note You need to log in before you can comment on or make changes to this bug.