Bug 27726

Summary: hw/xfree86/Makefile.am relies on superuser being named 'root'
Product: xorg Reporter: Michał Górny <mgorny>
Component: Server/DDX/XorgAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: minor    
Priority: medium    
Version: git   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
The proposed solution none

Description Michał Górny 2010-04-18 11:17:40 UTC
The Makefile of the Xorg server component during the 'install' phase tries to change the ownership of the Xorg binary being installed to the 'root' user.

But in fact, there's no requirement that superuser has to be named 'root'. This means that if the superuser is named differently, the 'make install' call is either going to fail (because of non-existent user) or, even worse, the file could be installed as non-superuser user named 'root' (use of this name is perfectly legit too).

The issue should be fixed through replacing the 'root' user specification with explicit UID 0 one.
Comment 1 Michał Górny 2010-04-18 11:20:47 UTC
Created attachment 35146 [details] [review]
The proposed solution
Comment 2 Adam Jackson 2018-06-12 17:22:23 UTC
commit 5c95be38e5af28108d8c6c08dfe08d1dfcb7ed42
Author: Michał Górny <gentoo@mgorny.alt.pl>
Date:   Mon Jun 11 17:17:31 2018 -0400

    xfree86: Makefile shouldn't rely on superuser being named 'root'
    
    Change the 'chown' statement in Makefile.am to use the numeric UID
    of superuser instead of relying on the name 'root'.
    
    Bugzilla: https://bugs.freedesktop.org/27726
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Michał Górny <gentoo@mgorny.alt.pl>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.