Open willem640 opened 5 months ago
Bedrock does make some effort to resolve this concern, but I'm not fresh on this area to recall specifics. Take a look at enforce_id_ranges
in /bedrock/share/common-code
This should be called both when brl enable
and brl repair
ing a stratum.
You seem interested in not just reporting the issue but contributing here. Could you investigate why the current solution is inadequate?
Unfortunately I'm not (yet) very familiar with the project so can't create a pull request for this. When installing dbus in an Ubuntu stratum (hijacked Fedora), apt gives me the following error:
fatal: The user 'messagebus' already exists, but is not a system user. Exiting.
This is because Ubuntu uses 100-999 as the system uid/gid range by default, but Fedora uses 1-999. Bedrock correctly has /etc/login.defs as a global file, but adduser uses /etc/adduser.conf in Ubuntu.
My proposed solution: The following options should be imported from login.defs or synchronized between login.defs and adduser.conf:
Perhaps the same should be done for
FIRST_UID
,LAST_UID
,FIRST_GID
andLAST_GID
. Those values have the same name in login.defs.Maybe someone can make a PR for this (or tell me how to do it). Thanks!