You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Craig Comstock <co...@eecs.ukans.edu> on 1999/07/07 19:01:42 UTC

suexec/4709: SuExec doesn't allow LD_LIBRARY_PATH to be a part of "safe_env_lst"

>Number:         4709
>Category:       suexec
>Synopsis:       SuExec doesn't allow LD_LIBRARY_PATH to be a part of "safe_env_lst"
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Wed Jul  7 10:10:01 PDT 1999
>Last-Modified:
>Originator:     comstock@eecs.ukans.edu
>Organization:
apache
>Release:        1.3.6
>Environment:
OSF1 tesla.eecs.ukans.edu V4.0 878 alpha
DEC C V5.6-071
>Description:
I wanted my users to be able to use two environment variables so that they could use
DBD::Oracle. LD_LIBRARY_PATH and ORACLE_HOME. Also want to use SuExec. The two environment
variables are set in httpd.conf as SetEnv directives. These environment variables
work fine on the share/cgi-bin scripts but don't get passed to user cgi-bin scripts.
>How-To-Repeat:
Modify src/support/suexec.c as follows:

char *safe_env_lst[] =
{
/* add in the following two entries
    "LD_LIBRARY_PATH",
    "ORACLE_HOME",

Recompile with suexec support.
Edit httpd.conf and add:

SetEnv ORACLE_HOME foo
SetEnv LD_LIBRARY_PATH bar

and see what environment variables you get from a simple env.cgi script in both 
the share/cgi-bin dir and a user dir.

#!/bin/sh
echo content-type:text/html
echo
echo "<pre>"
env

The share/cgi-bin/env.cgi script should show both LD_LIBRARY_PATH and ORACLE_HOME.

The userdir env.cgi seems to show ORACLE_HOME but not LD_LIBRARY_PATH.

>Fix:
I tried modifying the c source for suexec, and found that I could get ORACLE_HOME
throught to user CGI scripts, but not LD_LIBRARY_PATH. Is there something else
somewhere that is blocking LD_LIBRARY_PATH?
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <ap...@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or      ]
["Re: general/1098:").  If the subject doesn't match this       ]
[pattern, your message will be misfiled and ignored.  The       ]
["apbugs" address is not added to the Cc line of messages from  ]
[the database automatically because of the potential for mail   ]
[loops.  If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request from a  ]
[developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]