Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-04-2007, 04:37 PM
|
#1
|
Member
Registered: Aug 2004
Distribution: Fedora core 4
Posts: 55
Rep:
|
man not working within chroot
H iI was wondering if any can help, I just can seem to get man commanf to work properly within a chroot (im using jailkit), the command works but it does not pull any information.. I tried debugging using strace and i get the following result from strace on the chrooted man command and normal enviroment
Jailkit
open("/etc/ld.so.cache", O_RDONLY) = 4
open("/lib/libc.so.6", O_RDONLY) = 4
open("/etc/man.config", O_RDONLY) = 4
open("/usr/share/locale/C/man", O_RDONLY) = 5
Process 26204 detached
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
nan 0.000000 0 4 read
nan 0.000000 0 1 write
nan 0.000000 0 4 open
nan 0.000000 0 3 close
nan 0.000000 0 1 execve
nan 0.000000 0 1 1 access
nan 0.000000 0 4 brk
nan 0.000000 0 3 ioctl
nan 0.000000 0 6 old_mmap
nan 0.000000 0 1 munmap
nan 0.000000 0 2 mprotect
nan 0.000000 0 2 mmap2
nan 0.000000 0 4 fstat64
nan 0.000000 0 1 getuid32
nan 0.000000 0 1 getgid32
nan 0.000000 0 1 geteuid32
nan 0.000000 0 1 getegid32
nan 0.000000 0 1 set_thread_area
------ ----------- ----------- --------- --------- ----------------
100.00 0.000000 41 1 total
real life
open("/etc/ld.so.cache", O_RDONLY) = 3
open("/lib/libc.so.6", O_RDONLY) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
open("/etc/man.config", O_RDONLY) = 3
open("/usr/share/locale/en/man", O_RDONLY) = 4
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
nan 0.000000 0 4 read
nan 0.000000 0 1 write
nan 0.000000 0 7 2 open
nan 0.000000 0 4 close
nan 0.000000 0 1 execve
nan 0.000000 0 1 1 access
nan 0.000000 0 4 brk
nan 0.000000 0 3 ioctl
nan 0.000000 0 6 old_mmap
nan 0.000000 0 1 munmap
nan 0.000000 0 2 mprotect
nan 0.000000 0 3 mmap2
nan 0.000000 0 5 fstat64
nan 0.000000 0 1 getuid32
nan 0.000000 0 1 getgid32
nan 0.000000 0 1 geteuid32
nan 0.000000 0 1 getegid32
nan 0.000000 0 1 set_thread_area
------ ----------- ----------- --------- --------- ----------------
100.00 0.000000 47 3 total
|
|
|
10-04-2007, 06:13 PM
|
#2
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
Do you have the needed libraries and a copy of the /usr/share/man hierarchy and man.conf in the jailed environment. I think you also need to check the man.conf file. You may be missing some commands like gzip which man needs to uncompress man pages. Also check for the other programs mentioned in man.conf like groff, etc.
|
|
|
10-08-2007, 06:26 AM
|
#3
|
Member
Registered: Aug 2004
Distribution: Fedora core 4
Posts: 55
Original Poster
Rep:
|
All of them seem to be there.. that's what confusing me. I've also notice strace has gives different numbers for the output. they are mainly 3 in the non-chroot environment and 4's in the chroot.. I've search and i can't find any documentation that indicates what the output numbers are ( i know 0 indicates the file cant be found)..
|
|
|
10-09-2007, 08:42 AM
|
#4
|
Member
Registered: Aug 2004
Distribution: Fedora core 4
Posts: 55
Original Poster
Rep:
|
Does anyone know what the strace return value of 4 actually means?
|
|
|
10-09-2007, 08:57 AM
|
#5
|
Member
Registered: May 2007
Location: Chas, SC
Distribution: slackware, gentoo, fedora, LFS, sidewinder G2, solaris, FreeBSD, RHEL, SUSE, Backtrack
Posts: 430
Rep:
|
ldd /usr/bin/man might be eaiser to find out what libraries are required.
"ldd - print shared library dependencies"
|
|
|
10-10-2007, 04:53 AM
|
#6
|
Member
Registered: Aug 2004
Distribution: Fedora core 4
Posts: 55
Original Poster
Rep:
|
this was the output
linux-gate.so.1 => (0xffffe000)
libc.so.6 => /lib/libc.so.6 (0xb7dbd000)
/lib/ld-linux.so.2 (0xb7eee000)
running locate, they both seem to be there, (below)
chroot/lib/libc.so.6
chroot/lib/ld-linux.so.2
If im correct in my read linux-gate.so.1 is not actually a libary, its a it's a virtual DSO?
In fact man actually loads ok it just does no pull any info into the screen if you do ie man ls, all the programs that man seem to you use in config file are also installed
Last edited by Roosta21; 10-10-2007 at 04:55 AM.
|
|
|
10-10-2007, 06:00 AM
|
#7
|
Member
Registered: May 2007
Location: Chas, SC
Distribution: slackware, gentoo, fedora, LFS, sidewinder G2, solaris, FreeBSD, RHEL, SUSE, Backtrack
Posts: 430
Rep:
|
you also need to copy the man pages into there. i think they are in /usr/share/man
|
|
|
All times are GMT -5. The time now is 09:32 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|