Bug 202460

Summary: ltrace doesn't find all getenv calls
Product: Red Hat Enterprise Linux 4 Reporter: Petr Machata <pmachata>
Component: ltraceAssignee: Petr Machata <pmachata>
Status: CLOSED NOTABUG QA Contact: Jay Turner <jturner>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4CC: mnewsome, srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-10-17 14:54:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 201910    
Bug Blocks:    

Description Petr Machata 2006-08-14 16:30:40 UTC
+++ This bug was initially created as a clone of Bug #201910 +++

Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. ltrace -fo/tmp/a psql
2. setenv PGUSER someuser
3. ltrace -fo/tmp/a psql
  
Actual results:
The 'getenv("PGUSER")' call is not recorded (amongst others), but other getenv
calls are.


Expected results:
Ltrace should have recorded all getenv calls.

Additional info:
This is a weird error.

-- Additional comment from pmachata on 2006-08-10 06:09 EST --
Can you try this, please?
$ ltrace psql --help 2>&1 | grep PGUSER
Because this works for me:
getenv("PGUSER")                                 = NULL
getenv("PGUSER")                                 = NULL


-- Additional comment from kernel on 2006-08-11 12:17 EST --
# ltrace psql --help  |& grep PGUSER
getenv("PGUSER")                                 = NULL
getenv("PGUSER")                                 = NULL
# ltrace -fo/tmp/a psql --help >& /dev/null; grep PGUSER /tmp/a
25900 getenv("PGUSER")                           = NULL
25900 getenv("PGUSER")                           = NULL
# ltrace -fo/tmp/a psql; grep PGUSER /tmp/a
Password: 
psql: FATAL:  password authentication failed for user "root"
# setenv PGUSER db
# setenv PGDATABASE process
# ltrace -fo/tmp/a psql
Password: 
Welcome to psql 8.1.4, the PostgreSQL interactive terminal.
...
process=# \q
# grep PGUSER /tmp/a
# grep PGDATABASE /tmp/a
# 

The psql process is getting the values from the environment, but ltrace isn't
seeing the corresponding getenv() calls except when the command is 'psql --help'.

Comment 2 Jay Turner 2006-08-14 16:58:21 UTC
QE ack if we determine that it is a bug.

Comment 4 RHEL Program Management 2006-08-18 14:41:54 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 5 Petr Machata 2006-10-17 14:54:06 UTC
Sorry, completely forgot about this one. It's not a bug, but missing feature of
ltrace, where ltrace doesn't trace calls done from libraries. This feature might
appear in one of future ltreace releases, but no ETA is given.