Bug 82324 - mozilla-xremote-client ran as root targets non-root mozillas
mozilla-xremote-client ran as root targets non-root mozillas
Product: Red Hat Raw Hide
Classification: Retired
Component: mozilla (Show other bugs)
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Christopher Blizzard
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2003-01-21 04:58 EST by Luca Barbieri
Modified: 2007-04-18 12:50 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-01-24 10:20:31 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Luca Barbieri 2003-01-21 04:58:05 EST
Description of problem:
When mozilla-xremote-client is ran as root and a mozilla process owned by a
non-root user exists, it will be incorrectly targeted

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

How reproducible:

Steps to Reproduce:
1. Run `mozilla` as a normal user
2. Run `mozilla` as root

Actual Results:
The opened window belongs to a process belonging to the normal user

Expected Results:
The opened window should belong to a process owned by root
Comment 1 Christopher Blizzard 2003-01-21 13:39:16 EST
Mozilla should figure out the name of the profile being used using the LOGNAME
env variable.  Is LOGNAME different for root and your username?  Also, is the
user set on the window?  Run this command and click on the mozilla window:

_MOZILLA_USER(STRING) = "blizzard"
Comment 2 Luca Barbieri 2003-01-24 03:36:28 EST
LOGNAME is the same because I used `su` to become root and it does not change

Why is the login name being used rather than the euid?
This causes the execution of `mozilla` to differently depending on whether there
is already another instance: in there is, it will be run with the login user
privilege, and otherwise with the euid ones (root in this case).

Imho this should be changed.
Comment 3 Christopher Blizzard 2003-01-24 10:18:01 EST
Because two people on two seperate systems can have the same logical name but
two different UIDs.  There are UID mapping daemons that do this.  LOGNAME is
actually more reliable.
Comment 4 Christopher Blizzard 2003-01-24 10:20:31 EST

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