Bug 169187

Summary: su - should preserve $WINDOWID
Product: [Fedora] Fedora Reporter: Vlado Potisk <reg.bugs>
Component: coreutilsAssignee: Tim Waugh <twaugh>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-30 05:54:01 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Vlado Potisk 2005-09-24 06:44:37 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050909 Fedora/1.0.6-1.2.fc3 Firefox/1.0.6

Description of problem:
Terminal emulators for X set the $WINDOWID environment variable. According to the documentation su - (or su -l or su --login) unsets all environment variables except few variables like TERM, HOME or SHELL. The WINDOWID is similar to the TERM, it is a property of the window the terminal emulator is running in and does not change when su switches to another user ID. That's why it should be added to the list of preserved variables.

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

How reproducible:
Always

Steps to Reproduce:
1. start xterm, konsole or similar program
2. echo $WINDOWID
3. su - some_user_name
(you can use your own login name and password)
4. echo $WINDOWID
  

Actual Results:  before su - : WINDOWID is displayed (numeric string)
after su- : WINDOWID does not exist, nothing is displayed

Expected Results:  WINDOWID should exist also after su -

Additional info:
Comment 1 Tim Waugh 2005-09-30 05:54:01 EDT
The same can be said of VNCDESKTOP, SESSION_MANAGER, GNOME_DESKTOP_SESSION_ID,
and so on and so on, but su is deliberately restrictive so as to avoid any
potential security issues.