chroot() and dlopen()

phil-news-nospam_at_ipal.net
Date: 04/29/04

  • Next message: Måns Rullgård: "Re: chroot() and dlopen()"
    Date: 29 Apr 2004 09:25:51 GMT
    
    

    Should dlopen() be able to work when chroot() into another directory,
    even if the library being loaded only has references to symbols that
    are already loaded in the process. I'm wondering if the references
    to specific libraries within the library being loaded are made using
    the given filesystem paths, which will no longer be valid under the
    chroot directory.

    The executable will be dynamically linked with libc and other libraries
    that will be needed when it starts. Then calls chroot(), then later
    calls dlopen(). The library being dlopen'd is in the chroot directory,
    and is being referenced in a way it can be found.

    -- 
    -----------------------------------------------------------------------------
    | Phil Howard KA9WGN       | http://linuxhomepage.com/      http://ham.org/ |
    | (first name) at ipal.net | http://phil.ipal.org/   http://ka9wgn.ham.org/ |
    -----------------------------------------------------------------------------
    

  • Next message: Måns Rullgård: "Re: chroot() and dlopen()"

    Relevant Pages

    • Re: Symbol weirdness with static linking
      ... references whenever it has to protect a function. ... When libssp is linked dynamically, ... while there are other calls to libc functions in libssp ... Since libraries are scanned sequentially, ...
      (freebsd-hackers)
    • Re: Can a chroot execute programs in the external environment?
      ... >> I know for certain that the GNU toolset supports a biarch system (like ... >> no need for a chroot system at all if you set things up like that. ... Just delete everything but the libraries in the one you don't ...
      (uk.comp.os.linux)
    • Re: [fbsd] Re: Symbol weirdness with static linking
      ... references from libc causes objects from _second_ instance of -lssp to ... Since libraries are scanned sequentially, ... Best regards, ...
      (freebsd-hackers)
    • Re: Running IA32 Firefox on x86_64 without chroot
      ... >> Debian sid system without entering the 32-bit chroot, ... Pango have their own library directories, so without the chroot Firefox ... Firefox, if not those libraries as well; ... directories are going to have to explicitly support it. ...
      (uk.comp.os.linux)
    • Re: cant ls in vsftpd (chroot)
      ... chroot means chroot. ... and all libraries needed by ls MUST be in that chroot jail. ... >>From a shell i chrooted to the directory and i can run ls with no problem. ... >>From a shell I can su to the ftpuser, cd to the ~ftpuser/bin directory and run ls with no problem. ...
      (comp.os.linux.security)