Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 315779 - games.eclass: relies on superuser being named 'root'
Summary: games.eclass: relies on superuser being named 'root'
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-17 20:00 UTC by Michał Górny
Modified: 2016-10-02 13:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch making games.eclass superuser name-aware (games.eclass.diff,1.47 KB, patch)
2010-04-17 21:28 UTC, Michał Górny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-04-17 20:00:24 UTC
There are various references to 'root' user in games.eclass, which of course fail when superused is named differently. The ebuild should not rely on a specific naming of superuser (it is perfectly legit to supply numeric UID/GID to chown).
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-04-17 21:28:07 UTC
Created attachment 228215 [details, diff]
Patch making games.eclass superuser name-aware

First of all, to make things simpler and avoid unnecessarily calling egetent, I've made GAMES_USER numeric by default. This shouldn't create any issues. Moreover, I've replaced all other direct 'root' username occurrences with UID 0 (in fowners).

I've also enhanced the games_pkg_setup() superuser checking to check for both UID 0 and real superuser name (gathered using egetent as eutils.eclass is already being inherited).
Comment 2 SpanKY gentoo-dev 2010-04-30 13:15:10 UTC
i'm not interested in screwing with root user.  there is plenty of code in packages and in the tree that fall flat when root != 0.  games is not special in this regard.

since the portage tree has seen changes wrt root group due to the BSD guys, i dont have a problem making a change along those lines (either "wheel" or "0", i forget which BSD prefers).  talk to them to figure it out.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-04-30 14:03:59 UTC
(In reply to comment #2)
> i'm not interested in screwing with root user.  there is plenty of code in
> packages and in the tree that fall flat when root != 0.  games is not special
> in this regard.

It's the opposite. 0 != root.

And yes, there's a lot of broken packages and eclasses which need to be _fixed_.

> since the portage tree has seen changes wrt root group due to the BSD guys, i
> dont have a problem making a change along those lines (either "wheel" or "0", i
> forget which BSD prefers).  talk to them to figure it out.

Using 'wheel' would break Linux instead, that's why '0' is being used. Do I have to wait till BSD starts to name their superuser differently to see the issue fixed?
Comment 4 SpanKY gentoo-dev 2010-04-30 19:48:13 UTC
'0 === root' on linux systems.  if you have some stupid broken system where this isnt true and you arent going to fix it, then this is a discussion to bring on up gentoo-dev lists.  throwing random patches at bugzilla isnt going to change a thing.