![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SHLIB_PATH or LD_LIBRARY_PATH | vasanthan | HP-UX | 3 | 05-21-2008 04:49 AM |
| Difference between LIB_PATH and LD_LIBRARY_PATH | shafi2all | UNIX for Advanced & Expert Users | 1 | 05-09-2008 05:14 AM |
| Difference between LIB_PATH and LD_LIBRARY_PATH | shafi2all | UNIX for Advanced & Expert Users | 0 | 05-09-2008 04:30 AM |
| Ld_library_path | ccp | UNIX for Dummies Questions & Answers | 1 | 03-18-2008 11:11 AM |
| Bash LD_LIBRARY_PATH? | bysonary | UNIX for Dummies Questions & Answers | 1 | 04-18-2007 12:08 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi,
This question deals with Solaris 2.8 and setuid programs. From research I've done so far, setuid programs ignore LD_LIBRARY_PATH; I've proven this and am OK with it. The thing I am not certain of how the C compiler is supposed to behave when it is invoked via a setuid program. Basically, we have the following design: - developers call a program which is actually a softlink - the softlink points to a setuid program (compiled C wrapper) - the wrapper calls a shell script which performs code compilation (Oracle Pro*C) We were faced with the following error (produced by the shell script): cc -xO3 -Xa -xstrconst -dalign -xF -errtags=yes -v -xarch=v9 -xchip=ultra2 -DSS_64BIT_SERVER -DBIT64 -DMACHINE64 -KPIC -errtags=yes -erroff=E_NO_IMPLICIT_DECL_ALLOWED,E_OLD_STYLE_DECL_OR_BAD_TYPE,E_FUNC_HAS_NO_RETURN_STMT -I. -I/u01/app/oracle/product/9.2.0/precomp/public -I/u01/app/oracle/product/9.2.0/rdbms/public -I/u01/app/oracle/product/9.2.0/plsql/public -I/u01/app/oracle/product/9.2.0/network/public -DSLMXMX_ENABLE -DSLTS_ENABLE -D_REENTRANT -c validate_depex_tree.c ld.so.1: acomp: fatal: lib_I_dbg_gen.so: open failed: No such file or directory cc: Fatal error in /opt/SUNWspro/bin/../prod/bin/acomp : Killed From a previous experience with HP-UX 11, I assumed that the setuid piece may be causing LD_LIBRARY_PATH (even the default used by cc) to be ignored. So I modified the shell script to include the three default library directories (one of which does contain lib_I_dbg_gen.so) using the '-L' compiler option. But same result. I had read somewhere (Google) that even though LD_LIBRARY_PATH is ignored for setuid programs, library directories explicitly added to the cc command-line would be used; but this does not appear to be the case. Does anyone have any ideas??? P.S. The reason this doesn't work now is because the entire application is being migrated from HP-UX 10.20 (where it did work) to Solaris 2.8. |
|||
| Google The UNIX and Linux Forums |
| Forum Sponsor | ||
|
|