Bug 228980

Summary: XAUTHORITY env var not reset on 'su -'
Product: Red Hat Enterprise Linux 4 Reporter: masanari iida <masanari_iida>
Component: pamAssignee: Tomas Mraz <tmraz>
Status: CLOSED ERRATA QA Contact: Jay Turner <jturner>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: srevivo, yves.begrand
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHSA-2007-0737 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-15 15:03:21 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:

Description masanari iida 2007-02-16 10:59:40 UTC
Description of problem:
XAUTHORITY env var not reset on 'su -'

Version-Release number of selected component (if applicable):
OS RHEL4
pam-0.77-66.17

How reproducible:
Always, if you follow the step.

Steps to Reproduce:
(1) Login to X Window as root user
(2) Open a terminal.
(3) # su - non_root_user
(4) $ su - root

Actual results:
su to non_root_user in step 3 takes 0 sec.
su to root user in step 4 takes 10-20 sec.

Expected results:
su in step 3 and 4 take 0 sec.


Additional info:
This problem has been fixed in #87598 on Fedora Core.
But both RHEL3 (pam-0.75-69) and RHEL4(pam-0.77-66.17), 
this symptom still exist.

Workaround:
# unset XAUTHORITY; su - non_root_user
$ su - root

Comment 1 Yves Begrand 2007-02-19 08:09:44 UTC
- complete workaround text:

This problem has been reported in Bugzilla bug #87598 and is due to the 
pam_xauth(8) PAM module that incorrectly keeps the current XAUTHORITY variable 
of root account in the shell user's environment. Two temporary solutions exist 
to avoid the delay:

1) remove XAUTHORITY variable before executing su:
   # unset $XAUTHORITY ; su - user_name
   $ su - root 

2) Create .xauth/export in the root's home directory as described 
   in pam_xauth(8) and add in the export file the list of authorized users.

Note: The second method can be better in a graphics environment as it creates 
temporary cookie needed for running X clients. The bugzilla bug mentionned 
upper is however still a good candidate as method 2 can be seen as a security 
risk depending on the context.


Comment 2 RHEL Program Management 2007-05-09 07:28:58 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 7 errata-xmlrpc 2007-11-15 15:03:21 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2007-0737.html