General
cancel
Showing results for 
Search instead for 
Did you mean: 

SHLIB path is ignored for non-root user in HP-UX11iv3

 
SOLVED
Go to solution
Highlighted
Advisor

SHLIB path is ignored for non-root user in HP-UX11iv3

Hi,

I am facing a issue with the ld fails to load the Shared lib for my 32-bit application as 'Non-root' user.
here are some details..
#chatr smsstatus
smsstatus:
shared executable
shared library dynamic path search:
SHLIB_PATH enabled second
embedded path enabled first :/opt/OC/lib/:/opt/OCEK/lib/
shared library list:
dynamic libs/libclntsh.sl.10.1
dynamic libs/libnnz10.sl
dynamic /usr/lib/libxnet.2
dynamic /opt/OC/OCSDK_supportability_2.11.11-1/lib/libTTL.sl
dynamic /opt/OC/OCSDK_supportability_2.11.11-1/lib/libTTLBase.sl
dynamic /usr/lib/libntl.2
dynamic /usr/lib/libstd_v2.2
dynamic /usr/lib/libCsup_v2.2
dynamic /usr/lib/libpthread.1
dynamic /usr/lib/libm.2
dynamic /usr/lib/libcl.2
dynamic /usr/lib/libc.2
static /usr/lib/libdld.2
shared library binding:
immediate
global hash table disabled
plabel caching disabled
global hash array size:1103
global hash array nbuckets:3
shared vtable support disabled
explicit unloading enabled
static branch prediction disabled
executable from stack: D (default)
kernel assisted branch prediction enabled
lazy swap allocation disabled
text segment locking disabled
data segment locking disabled
third quadrant private data space disabled
fourth quadrant private data space disabled
third quadrant global data space disabled
data page size: D (default)
instruction page size: D (default)
nulptr references disabled
shared library private mapping disabled
shared library text merging disabled

-->When i run ldd as root user..

#/usr/ccs/bin/ldd smsstatus
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libcl.2 => /usr/lib/libcl.2
/usr/lib/libisamstub.1 => /usr/lib/libisamstub.1
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/libCsup_v2.2 => /usr/lib/libCsup_v2.2
/usr/lib/libstd_v2.2 => /usr/lib/libstd_v2.2
/usr/lib/libntl.2 => /usr/lib/libntl.2
/opt/OC/OCSDK_supportability_2.11.11-1/lib/libTTLBase.sl => /opt/OC/lib//libTTLBase.sl
/opt/OC/OCSDK_supportability_2.11.11-1/lib/libTTL.sl => /opt/OC/lib//libTTL.sl
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/libntl.2 => /usr/lib/libntl.2
libs/libTTLBase.sl => /opt/OC/lib//libTTLBase.sl
/usr/lib/libxnet.2 => /usr/lib/libxnet.2
/usr/lib/libxti.2 => /usr/lib/libxti.2
libs/libnnz10.sl => /uorabin/app/oracle/client/product/10/lib32/libnnz10.sl
libs/libclntsh.sl.10.1 => /uorabin/app/oracle/client/product/10/lib32/libclntsh.sl.10.1
/usr/lib/libcl.2 => /usr/lib/libcl.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/lib/libnsl.1 => /usr/lib/libnsl.1
/usr/lib/libxti.2 => /usr/lib/libxti.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libnss_dns.1 => /usr/lib/libnss_dns.1
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/librt.2 => /usr/lib/librt.2
/uorabin/app/oracle/client/product/10/lib32/libnnz11.sl => /uorabin/app/oracle/client/product/10/lib32/libnnz11.sl

---->Here is the output when i run it as Non root user.

$ /usr/ccs/bin/ldd smsstatus
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libcl.2 => /usr/lib/libcl.2
/usr/lib/libisamstub.1 => /usr/lib/libisamstub.1
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/libCsup_v2.2 => /usr/lib/libCsup_v2.2
/usr/lib/libstd_v2.2 => /usr/lib/libstd_v2.2
/usr/lib/libntl.2 => /usr/lib/libntl.2
/opt/OC/OCSDK_supportability_2.11.11-1/lib/libTTLBase.sl => /opt/OC/lib//libTTLBase.sl
/opt/OC/OCSDK_supportability_2.11.11-1/lib/libTTL.sl => /opt/OC/lib//libTTL.sl
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/libntl.2 => /usr/lib/libntl.2
libs/libTTLBase.sl => /opt/OC/lib//libTTLBase.sl
/usr/lib/libxnet.2 => /usr/lib/libxnet.2
/usr/lib/libxti.2 => /usr/lib/libxti.2
/usr/lib/dld.sl: Can't find path for shared library: libnnz10.sl
/usr/lib/dld.sl: No such file or directory

here is the LIB Path for non root user..
$ echo $SHLIB_PATH
/uorabin/app/oracle/client/product/10/lib32:/uorabin/app/oracle/client/product/10/rdbms/lib32
$ echo $LD_LIBRARY_PATH
/uorabin/app/oracle/client/product/10/lib:/lib:/usr/lib:/uorabin/app/oracle/client/product/10/rdbms/lib

the permission ofr my application are
-r-sr-xr-- 1 root ocadmin

Could somebody please help to figure out why the SHLIB path is being ignored for 'Non-root' user.

Thanks,
Best Regards
kumasudh
4 REPLIES 4
Highlighted
Honored Contributor

Re: SHLIB path is ignored for non-root user in HP-UX11iv3

Hi,

first - is the non-root user in the group 'ocadmin'?
Then - where is the setting of SHLIB_PATH defined? Have you checked for cryptic letters in the path setting?
Is the directoy and the lib readable for the user (ls ....)?

Volkmar
*** Say 'Thanks' with Kudos ***
Highlighted
Advisor

Re: SHLIB path is ignored for non-root user in HP-UX11iv3

Hi,

Yes this No-root user belongs to ocadmin group and has got oinstall as secondry group.SHLIB path is been exported in the .profile of this Non-root user . What do you mean by cryptic letters in the path ?
yes this Non-root user has permission for the $ORACLE_HOME/lib32 directory.

Thanks and Regards,
kumasudh
Highlighted
Acclaimed Contributor
Solution

Re: SHLIB path is ignored for non-root user in HP-UX11iv3

>the permission for my application are: -r-sr-xr-- 1 root ocadmin
>Could somebody please help to figure out why the SHLIB path is being ignored for 'Non-root' user.

The security police won't let SUID root applications look at SHLIB_PATH/LD_LIBRARY_PATH.

You must bribe the police by including the paths in: /etc/dld.sl.conf
See the following:
My reply at end of:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1242089

http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=929331
Highlighted
Advisor

Re: SHLIB path is ignored for non-root user in HP-UX11iv3

Hi Denis,

You answer triggred me to look once again at the /etc/dld.sl.conf file. though it was there and has got the entry which was looking like "/uorabin/app/oracle/product/10/lib32/" where on my testbed the path is "/uorabin/app/oracle/client/product/10/lib32/" . As the path was looking like same and hence i didn't bother to check it closely.

I have updated my /etc/dld.sl.conf with the correct path and now it's working fine.

Thanks a lot for the help.

Best Regards
Sudhir kumar