Re: Problems with shared libraries on Solaris

From: Stefaan A Eeckels (tengo_at_DELETEMEecc.lu)
Date: 04/18/04

  • Next message: Aaron Isotton: "Big performance problems with C++ file I/O"
    Date: Sun, 18 Apr 2004 00:44:12 +0200
    
    

    On 17 Apr 2004 09:34:17 -0700
    eyal_goren@bmc.com (Eyal Goren) wrote:

    > I want to put the Oracle libs in a directory under my application home
    > directory.

    Why? When Oracle is installed on a system, its libraries
    are installed under the Oracle installation directory.
    If you need them in a place known to your application,
    use a symlink.

    > Today, since we don't know how to do it, we put it under /opt, and
    > specify hard coded in the Makefile '-R /opt/...'.

    That's the standard place to put third-party packages on
    Solaris. Sun does it, you should do so as well.

    > Now, since I don't know where would my application be installed (under
    > /home ???) I can not be dynamically in the Makefile, and have to use a
    > special location.

    OK, since you're using Oracle, you're forced to use
    shared libraries. How to access them from a set[gu]id
    program is normally a matter for local policy, but a
    symlink from your installation directory to the Oracle
    libraries isn't a bad solution. I don't think that you
    should support package installations outside the /opt
    hierarchy for a commercial product. It's what admins
    expect.

    A couple of observations:
    - you can provide several paths in the -R directive
      (or repeat it), so you can ensure that the software
      will run from a number of installation points (such
      as /opt/yourprod and /usr/local/yourprod)
    - $ORIGIN doesn't make a library path secure, so
      the moment you require set[gu]id, it's not a solution
    - -R with an absolute path name _does_ make the
      path secure:

    $ id
    uid=10001(Rtest) gid=10001(Rtest)
    $ ls -l vfsdir vfscopy
    -rwxr-sr-x 1 sae staff 204800 Apr 18 00:12 originprog
    -rwxr-sr-x 1 sae staff 212992 Apr 18 00:11 absoluteprog

    $ ldd -s originprog
       
       find object=libutil.so; required by originprog
        search path=$ORIGIN/../lib (RPATH from file originprog)
        ignore path=/home/sae/lib (insecure directory name)
    $ ldd -s absoluteprog

       find object=libutil.so; required by absoluteprog
        search path=/home/sae/lib (RPATH from file absoluteprog)
        trying path=/home/sae/lib/libutil.so
            libutil.so => /home/statel/lib/libutil.so

    Obviously, if your program requires set[gu]id privileges,
    you might want to reconsider - it's usually unnecessary.

    Take care,

    -- 
    Stefaan
    -- 
    "What is stated clearly conceives easily."  -- Inspired sales droid
    

  • Next message: Aaron Isotton: "Big performance problems with C++ file I/O"

    Relevant Pages

    • Re: The Oracle 10g on Linux Glibc Problem
      ... installation completed, but there were linking errors on ... Why does Oracle state that 10g is certified for RHEL 4 when it ... carefully about 32-bit libraries. ...
      (comp.databases.oracle.server)
    • Perl5.8 Wont Build
      ... This is a new installation under AMD64 7.1Release inside of a jail. ... Any additional ld flags (NOT including libraries)? ... Doing variable substitutions on .SH files... ... Extracting config.h ...
      (freebsd-questions)
    • Compiling and running DBD for Oracle 10g without installing Oracle
      ... I recently had to compile the DBD modules for Oracle 10g on machines, ... perl, DBI etc. of recent enough version ... Oracle 10g installation disk for your architecture (available at ...
      (perl.dbi.users)
    • Compiling and running DBD for Oracle 10g without installing Oracle
      ... I recently had to compile the DBD modules for Oracle 10g on machines, ... perl, DBI etc. of recent enough version ... Oracle 10g installation disk for your architecture (available at ...
      (perl.dbi.users)
    • Asp.net/vb and Oracle
      ... setup on other machines where I have installed the Oracle 9i client, ... Oracle 9.0 odbc drivers will connect to my oracle database when debugging. ... Oracle client and networking components were not found. ... later client software installation. ...
      (microsoft.public.dotnet.framework.aspnet)