Bug 97390 - Interactive update mode broken
Interactive update mode broken
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: tripwire (Show other bugs)
7.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Florian La Roche
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-06-14 02:29 EDT by Tim Largy
Modified: 2007-04-18 12:54 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-04-21 20:49:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Patch for textreportviewer.cpp (2.68 KB, patch)
2003-06-14 02:33 EDT, Tim Largy
no flags Details | Diff

  None (edit)
Description Tim Largy 2003-06-14 02:29:19 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212

Description of problem:
After applying several Red Hat 7.2 updates to a previously unpatched system,
tripwire's interactive update mode was found to broken. In interactive update
mode, tripwire needs to start an editor for user interaction. This no longer
works for typical use cases due to X display permissions problems.

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

How reproducible:
Always

Steps to Reproduce:
1. Run X at the console as an ordinary user "fred"
2. Start an xterm
3. In that xterm, su to root.

Now, presuming that /home/fred/.xauth/export contains a single line with an
asterisk, any X program started in root's xterm will have permission to display
on the local X server

4) Start tripwire in interactive update mode via "triwpire -m c -I"


Actual Results:  At the point in processing when the editor process is created,
it fails with:

Xlib: connection to ":0.0" refused by server
Xlib: Client is not authorized to connect to Server
emacs: Cannot connect to X server :0.0.
Check the DISPLAY environment variable or use `-d'.
Also use the `xhost' program to verify that it is set to permit
connections from your machine.

Interactive Update failed.
### Error: Editor could not be launched.
### /usr/bin/emacs
### Exiting... 

Expected Results:  The editor should have started in a window.

Additional info:

I debugged this problem using the latest tripwire release available on
SourceForge, and deterimed that it is due to the XAUTHORITY enviroment variable,
which was introduced by one of the Red Hat updates--I don't know which one.
Prior to applying the updates, shell environments didn't have XAUTHORITY
defined; now they do.

When tripwire creates a child process for the editor, it only copies certain
portions of its environment into the child, however it does not copy XAUTHORITY.
When the tripwire source was modified to copy XAUTHORITY into the child's
process, the X display permission problem was resolved.

I will attach my patch for the file textreportviewer.cpp
Comment 1 Tim Largy 2003-06-14 02:33:48 EDT
Created attachment 92398 [details]
Patch for textreportviewer.cpp

This patch implements small code changes affecting the handling of environment
variables, and adds a small amount of diagnostic code.
Comment 2 John Thacker 2006-04-21 20:49:12 EDT
Closing bug, since tripwire hasn't been shipped for so long, only in Legacy
releases.

Note You need to log in before you can comment on or make changes to this bug.