Salesforce

LD_LIBRARY_PATH and TMPDIR environment variables are not available in ABL client or AppServer sessions.

« Go Back

Information

 
TitleLD_LIBRARY_PATH and TMPDIR environment variables are not available in ABL client or AppServer sessions.
URL NameLD-LIBRARY-PATH-and-TMPDIR-environment-variable-are-not-available-in-ABL-client-or-AppServer-sessions
Article Number000126855
EnvironmentProduct: OpenEdge
Version: 11 and later
OS: Linux
Question/Problem Description
LD_LIBRARY_PATH environment variable is not available in ABL client or AppServer sessions.
TMPDIR environment variable is not available in ABL client or AppServer sessions.
 
The following statements in an ABL client or AppServer session display the unknown value '?':
 
DISPLAY OS-GETENV("LD_LIBRARY_PATH").
DISPLAY OS-GETENV("TMPDIR").
 
 
Steps to ReproduceSee attached steps_to_reproduce.txt
Clarifying Information
Running the ls command in proenv for the OpenEdge executables (eg _progres):
proenv>ls -l $DLC/bin/_progres

returns: 
  • On OpenEdge 10.2B08 :
proenv>-rwxr-xr-x 1 root root 10537164 Nov 12  2013 /usr/dlc/bin/_progres
Octal value: 755
  • On OE 11.7.4:
proenv>-rwsr-xr-x 1 root root 13811949 Oct 10  2018 /usr/dlc/bin/_progres
Octal value: 4755
The setuid bit is on for the 11.7.x OE executables. 
 
The setuid bit is a permission bit, that allows the users to execute a program with the permissions of its owner.

The setgid is a permission is a bit that allows the user to execute a program with the permissions of the group owner.

Error Message
Defect Number
Enhancement Number
Cause
The OS prevents access to certain environment variables when running setuid or setgid executables.

This is a security feature to prevent setuid or setgid programs from having their environment altered to allow for malicious reading/writing of file data.

There are several environment variables ignored for setuid or setgid programs, including:
  • GCONV_PATH
  • HOSTALIASES
  • LD_DEBUG_OUTPUT
  • LD_LIBRARY_PATH
  • LD_ORIGIN_PATH
  • LD_PRELOAD
  • LD_PROFILE
  • LD_USE_LOAD_BIAS
  • LOCALDOMAIN
  • LOCPATH
  • MALLOC_TRACE
  • NLSPATH
  • RESOLV_HOST_CONF
  • RES_OPTIONS
  • TMPDIR
  • TZDIR
The _progres executable has its setuid bit set to 1 with root as the owner.
This means that the _progres executable is run in secure-execution mode where the above-mentioned environment variables are ignored, if the process owner ID or group ID doesn't match that of the non-root user ID.

From the ld.so(8) documentation:
What is secure-execution mode 

Secure-execution mode
       For security reasons, the effects of some environment variables are
       voided or modified if the dynamic linker determines that the binary
       should be run in secure-execution mode.  (For details, see the
       discussion of individual environment variables below.)  A binary is
       executed in secure-execution mode if the AT_SECURE entry in the
       auxiliary vector (see getauxval(3)) has a nonzero value.  This entry
       may have a nonzero value for various reasons, including:

       *  The process's real and effective user IDs differ, or the real and
          effective group IDs differ.  This typically occurs as a result of
          executing a set-user-ID or set-group-ID program.

       *  A process with a non-root user ID executed a binary that conferred
          capabilities to the process.

       *  A nonzero value may have been set by a Linux Security Module.


       
Resolution
As a solution you may:

- Run the client (_progres, mpro, pro) owned by root and copy it to another directory as yourself making the executable not owned by root anymore but by the user running it. For the AppServer (_proapsv) executable change the owner to the user starting the AppServer broker.
- Remove the setuid bit by running the chmod command (eg _progres):
 
proenv>chmod 755 $DLC/bin/_progres


 
Workaround
Notes
Progress Article(s):
 How should I set permissions for Progress executables and database files on UNIX ?
 Progress and UNIX Permissions
 TMPDIR environment variable disappears when using the pro command.

References to Other Documentation:
“Ld.so(8).” Linux Manual Page, 11 May 2019, man7.org/linux/man-pages/man8/ld.so.8.html.
“File Permission 4755.” File Permission 4755 for Mac Linux and Unix | File Permissions, www.filepermissions.com/file-permission/4755.
“File Permission 755.” File Permission 755 for Mac Linux and Unix | File Permissions, www.filepermissions.com/file-permission/755.
 
Keyword Phrase
Last Modified Date11/20/2020 7:01 AM

Powered by