The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
SHLIB_PATH or LD_LIBRARY_PATH vasanthan HP-UX 3 05-21-2008 07:49 AM
Difference between LIB_PATH and LD_LIBRARY_PATH shafi2all UNIX for Advanced & Expert Users 1 05-09-2008 08:14 AM
Difference between LIB_PATH and LD_LIBRARY_PATH shafi2all UNIX for Advanced & Expert Users 0 05-09-2008 07:30 AM
Ld_library_path ccp UNIX for Dummies Questions & Answers 1 03-18-2008 03:11 PM
Bash LD_LIBRARY_PATH? bysonary UNIX for Dummies Questions & Answers 1 04-18-2007 03:08 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-19-2006
WolfBoy WolfBoy is offline
Registered User
  
 

Join Date: Jan 2006
Location: Ontario, Canada
Posts: 3
Question cc, setuid, and LD_LIBRARY_PATH

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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:09 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0