Bug 39175 - bind 9 refuses to chroot when not straced
bind 9 refuses to chroot when not straced
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: bind (Show other bugs)
7.1
i386 Linux
high Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-05-04 21:30 EDT by Matthew Galgoci
Modified: 2007-03-26 23:44 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-05-07 08:44:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matthew Galgoci 2001-05-04 21:30:55 EDT
Description of Problem:

I have configured bind  9.1.0-10 as shipped with Red Hat 7.1 to run as 
a caching only name server in a chroot environment. I set up a proper
chroot in /var/named  that looks like this:

/var/named
total 24
drwxr-xr-x    2 named    named        4096 May  3 10:59 cache
drwxr-xr-x    2 root     root         4096 May  3 11:04 dev
drwxr-xr-x    2 root     root         4096 May  3 19:31 etc
drwxr-xr-x    2 root     root         4096 May  3 11:19 lib
drwxr-xr-x    2 named    named        4096 May  3 13:02 log
drwxr-xr-x    3 root     root         4096 May  3 11:00 var

./cache:
total 12
-rw-r--r--    1 named    named         195 Mar 13 18:03 localhost.zone
-rw-r--r--    1 named    named        2769 Mar 13 18:03 named.ca
-rw-r--r--    1 named    named         433 Mar 13 18:03 named.local

./dev:
total 0
crw-rw-rw-    1 root     root       1,   3 May  3 11:03 null
crw-rw-rw-    1 root     root       1,   5 May  3 11:04 zero

./etc:
total 32
-rw-r--r--    1 root     root          147 May  3 18:23 hosts
-rw-r--r--    1 root     root        18241 May  3 19:20 ld.so.cache
-rw-r--r--    1 root     root            0 May  3 19:31 ld.so.conf
-rw-r--r--    1 root     root         1267 May  3 18:22 localtime
-rw-r--r--    1 root     root         1827 May  3 13:00 named.conf

./lib:
total 9664
-rwxr-xr-x    1 root     root       471781 May  3 11:19 ld-linux.so.2
-rwxr-xr-x    1 root     root       869430 May  3 11:19 libcrypto.so.1
-rwxr-xr-x    1 root     root      5634864 May  3 11:19 libc.so.6
-rwxr-xr-x    1 root     root        79024 May  3 11:19 libdl.so.2
-rw-r--r--    1 root     root      1427155 May  3 11:19 libdns.so.4
-rw-r--r--    1 root     root       228055 May  3 11:19 libisc.so.3
-rw-r--r--    1 root     root        66108 May  3 11:19 liblwres.so.1
-rwxr-xr-x    1 root     root       445289 May  3 11:19 libnsl.so.1
-rw-r--r--    1 root     root        72666 May  3 11:19 libomapi.so.3
-rwxr-xr-x    1 root     root       528849 May  3 11:19 libpthread.so.0

./log:
total 4
-rw-r--r--    1 root     root          317 May  3 13:03 named.log

./var:
total 4
lrwxrwxrwx    1 root     root            3 May  3 11:00 named -> ../
drwxr-xr-x    2 root     root         4096 May  3 13:03 run

./var/run:
total 4
-rw-r--r--    1 root     root            6 May  3 13:03 named.pid


How Reproducible:

Every time :)


Steps to Reproduce:
1. Set up a proper chroot for named and proper config file
2. start named by hand, like this: /usr/sbin/named -u named -t /var/named
At this point, named will fail to start and exit silently.

3. If you try and strace -f named, it will work just fine:
	strace -f -o /tmp/out /usr/sbin/named -u named -t /var/named 

That is it.
Comment 1 Daniel Roesen 2001-05-07 08:44:36 EDT
are the libs needed in the chroot environment at all? They are loaded before
chroot()ing anyway I think.
Comment 2 Bernhard Rosenkraenzer 2001-07-19 06:42:06 EDT
I can't reproduce this with 9.1.3-3, assuming it was fixed in the base version 
update.
Comment 3 Matthew Galgoci 2001-07-19 11:29:08 EDT
It seems that there are threading issues in the earlier 2.4.x series that have
been fixed in the 2.4.6x series, manifesting themselves in other threaded 
applications like star office and the sun jdk. The issues with staroffice and
the sun jdk seem to have gone away, and I suspect that the same applies to 
named. 

I will verify this and report back.

--Matt

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