1823143 Members
3480 Online
109647 Solutions
New Discussion юеВ

Permissions file

 
memoud
Occasional Advisor

Permissions file

Hi ALL
(Platform : RX7620, HPUX 11.23)
We have one executable file (MF Server Express),owner :(root,root) it work correctly.
When we change setid like :
-rwsr-xr-x and run by non-root user, we get :
/usr/lib/hpux64/dld.so: Unable to find library 'libcobscreen64.so.2'.
ldd -r shows:
* By non-root
libcobrts64.so.2 => /opt/microfocus/cobol/lib/libcobrts64.so.2
libcobcrtn64.so.2 => /opt/microfocus/cobol/lib/libcobcrtn64.so.2
libcobmisc64.so.2 => /opt/microfocus/cobol/lib/libcobmisc64.so.2
libunwind.so.1 => /usr/lib/hpux64/libunwind.so.1
libsin.so.1 => /usr/lib/hpux64/libsin.so.1
libc.so.1 => /usr/lib/hpux64/libc.so.1
Unable to find library 'libcobscreen64.so.2'.
BY ROOT :
libcobrts64.so.2 => /opt/microfocus/cobol/lib/libcobrts64.so.2
libcobcrtn64.so.2 => /opt/microfocus/cobol/lib/libcobcrtn64.so.2
libcobmisc64.so.2 => /opt/microfocus/cobol/lib/libcobmisc64.so.2
libunwind.so.1 => /usr/lib/hpux64/libunwind.so.1
libsin.so.1 => /usr/lib/hpux64/libsin.so.1
libc.so.1 => /usr/lib/hpux64/libc.so.1
libcobscreen64.so.2 => /opt/microfocus/cobol/lib/libcobscreen64.so.2
libm.so.1 => /usr/lib/hpux64/libm.so.1
libuca.so.1 => /usr/lib/hpux64/libuca.so.1
libdl.so.1 => /usr/lib/hpux64/libdl.so.1

$SHLIB_PATH and $LD_LIBRARY_PATH are same for root an non-root
Any friend help me
Thanks
Mem

3 REPLIES 3
Patrick Wallek
Honored Contributor

Re: Permissions file

Have you checked the permission on the library file, libcobscreen64.so.2? Even though you are running setuid, there may still be a permission issue.
memoud
Occasional Advisor

Re: Permissions file

Hi Patrick
No permissions problem for libcobscreen64.so.2
-r-xr-xr-x 2 root root 198616 19 mai 2005 /opt/microfocus/cobol/
lib/libcobscreen64.so.2

Thanks for your help
Dennis Handly
Acclaimed Contributor

Re: Permissions file

>When we change setuid like:
-rwsr-xr-x and run by non-root user, we get:
dld.so: Unable to find library libcobscreen64.so.2.

You can't do that. As soon as you use setuid, dld will refuse to look at LD_LIBRARY_PATH and treats it as a security issue.

If you still want to do this, look at dld.so(5):
Running Setuid Programs
For looking up shared libraries for setuid applications, the dynamic
loader uses only the paths listed in /etc/dld.sl.conf.
http://docs.hp.com/en/B2355-60127/dld.sl.5.html#d0e978509
http://www.itrc.hp.com/service/patch/patchDetail.do?patchid=PHSS_37947&sel={hpux:11.23,}&BC=main|search|