bugJailkit - Bugs: bug #20071, /lib/tls removed from Debian...

 
 

bug #20071: /lib/tls removed from Debian (Testing), jailkit does not pick up on changes

Submitted by:  Eric Wages <wages>
Submitted on:  Mon 04 Jun 2007 03:04:33 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 04 Jun 2007 08:35:41 PM UTC, comment #2:

Only comment I can think of is to traverse the library directories (whether it be /lib or /lib/tls), locating the symlinks, and then searching the system's default library paths for similarly named symlinks to see what they point to.

Once the newly updated files are found, copy them to whatever directory in the jail needs them.

Future work may consider about consolidating library directories entirely within the jail.

Thoughts?

Eric Wages <wages>
Mon 04 Jun 2007 07:11:42 PM UTC, comment #1:

it is a good point, but very much out of the scope what jk_update currently does.

Currently it simply walks all files in the jail, checks if the file on the real system has changed, and if it has changed jk_update will pass that change on to the real system. jk_update does not know if a file is a library or not, so it doesn't know if a file should be searched for in a different location if it is removed from the real system.

any suggestions?

Olivier Sessink <oli4>
Project Administrator
Mon 04 Jun 2007 03:04:33 PM UTC, original submission:

After an apt-get dist-upgrade on debian testing today, I attempted to run jk_update -j /home/chrootusers:

root@<myserver>:~# jk_update -j /home/chrootusers/
/home/chrootusers/lib/libnss_dns-2.3.6.so exists, but cannot stat file /lib/libnss_dns-2.3.6.so: No such file or directory
/home/chrootusers/lib/tls exists, but cannot stat file /lib/tls: No such file or directory
/home/chrootusers/lib/ld-2.3.6.so exists, but cannot stat file /lib/ld-2.3.6.so: No such file or directory
/home/chrootusers/lib/libnsl-2.3.6.so exists, but cannot stat file /lib/libnsl-2.3.6.so: No such file or directory
/home/chrootusers/lib/libnss_compat-2.3.6.so exists, but cannot stat file /lib/libnss_compat-2.3.6.so: No such file or directory
/home/chrootusers/lib/libnss_files-2.3.6.so exists, but cannot stat file /lib/libnss_files-2.3.6.so: No such file or directory
/home/chrootusers/lib/libncurses.so.5.5 exists, but cannot stat file /lib/libncurses.so.5.5: No such file or directory

I had to manually copy over the updated libs and recreate all of the symlinks. Even after doing that, libraries were still broken, not allowing users to log in:

root@<myserver>:/home/chrootusers/lib# su <username>
/bin/bash: relocation error: /lib/tls/libc.so.6: symbol _dl_out_of_memory, version GLIBC_PRIVATE not defined in file ld-linux.so.2 with link time reference

I was able to successfully log in with a remote user's account after a copy over of the new libs from /lib to /home/chrootusers/lib or /home/chrootusers/lib/tls and recreating appropriate symlinks.

It appears that the jk_update code needs to be updated to search for the libs in either /lib or /lib/tls in order to update the jail.

root@<myserver>:/home/chrootusers/lib/tls# cat /proc/version
Linux version 2.6.18-4-amd64 (Debian 2.6.18.dfsg.1-12) (waldi@debian.org) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 SMP Mon Mar 26 19:17:44 UTC 2007

Eric Wages <wages>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by oli4 (Posted a comment)
  • -unavailable- added by wages (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup1