Why can't my privileged program find the shared libraries? I get an error from ld.so.1: "fatal: application-name: open failed: No such file or directory. Killed." It appears that the application doesn't read the LD_LIBRARY_PATH.
In both the Solaris and Trusted Solaris Operating Environments, the use of LD_LIBRARY_PATH is restricted for setuid and setgid programs. In the Trusted Solaris environment, the LD_LIBRARY_PATH is also restricted for privileged programs. For setuid, setgid, and privileged programs, dynamic libraries are loaded only from trusted directories.
The Trusted Solaris environment allows the Security Administrator role to extend the list of trusted directories. The method is different in the Trusted Solaris 8 environment than it was in previous releases; both methods are detailed below.
Procedure for the Trusted Solaris 8 Operating Environment:
The Security Administrator role can add a privileged program's shared library directories to the list of trusted directories in
/var/ld/ld.config. The
crle(1) command is used with both the
-u and
-s options followed by a colon-separated list of pathnames to the library directories.
To find out what libraries a program is using, anyone can use the ldd(1) command. See To Find Which Library Directories Are Used by an Application for instructions on how the Security Administrator can list the library directories used by the application. See also To Make a Library Directory Trusted for details on running crle(1).
The addition of a library directory to the list of trusted directories persists across reboots. However, if the crle(1) command is ever entered with other options, but without the -u option (perhaps by a third-party script), the entries made on the command line will be removed.
To help ensure that all library directories needed for operation of your privileged applications are configured at every reboot as trusted directories, the Security Administrator can create a boot-time script. See To Make a Library Directory Trusted for instructions on how to create such a script.
See /etc/rc2.d/S90wbem for an example of a default script that uses crle(1) to add the Java library directories needed by the Solaris Management Console software to the trusted library directories list. See /etc/init.d/README and /etc/rc2.d/README for boot script naming and numbering conventions.
Procedure for the Trusted Solaris 7 Operating Environment and Previous Releases:
The Security Administrator can create an /etc/security/tsol/rtld file, and specify in the file a colon-separated list of the library directories to be added to the list of trusted library directories.
For example, when administrators using Trusted Oracle couldn't run a privileged program that needed a library in
/usr/oracle, they were told to add the /usr/oracle/lib directory to
/etc/security /tsol/rtld, as shown here:
|
For the Trusted Solaris Operating Environment, versions 2.5.1 through 7:
The Developer's Guide, "
Making Shared Libraries Trusted" section and the
ld(1TSOL)
man page.
Trusted Solaris 2.5.1 AnswerBook listings at
docs.sun.com,
rtld
section.
For the Trusted Solaris 8 Operating Environment:
Trusted Solaris Administrator's Procedures manual, "
Adding Software" chapter.
To Find Which Library Directories Are Used by an Application
|
|
To Make a Library Directory Trusted: (using crle(1), in the Trusted Solaris 8 release and later)
NOTE: This procedure assumes you have found out which shared libraries need to be trusted for any privileged applications that have been added since installation. If necessary, see To Find Which Library Directories Are Used by an Application .
|
|
|
|
2.5, 2.5.1, 7, 8
