Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Subject: [gentoo-dev] [RFC] Moving UID/GID assignments to api.gentoo.org
Date: Tue, 06 Aug 2019 21:30:01
Message-Id: 87a7f00e6badd6e0c4247aa8853c4934bbae092e.camel@gentoo.org
Hi,

Some time ago William asked me to move UID/GID assignments from wiki [1]
to something more accessible.  I've finally gotten around to draft
something, and I'd like to hear your comments about it.  The idea is to
keep a whitespace-separated record format file in api.gentoo.org repo.

This is mostly inspired by Fedora's format, specifically the ability to
specify both UID and GID for matching user/group on the same line.
I've also decided not to attempt to specify disjoint Linux and FreeBSD
users/groups on a single line.  Instead, they are specified separately
and defined by providers (as suggested by Ulrich).

Sample, along with big comment explaining the file format, below.

[1] https://wiki.gentoo.org/wiki/Project:Quality_Assurance/UID_GID_Assignment

=== PROPOSED FORMAT ===

# vim:se ts=8 sts=8 tw=0 :
#
# This file provides a registry of active, requested and historical UID
# and GID assignments in the Gentoo repository.  Each line represents
# a single record, with the first line providing field headers.  Empty
# lines and comments are ignored.  Fields are separated by whitespace,
# with the last (note) field extending to end of line.  Note that
# additional fields may be added in the future.
#
# A single record can represent a user, a group or a combination of both
# using the same name.  Same user/group/UID/GID can be repeated
# in mutiple records to reflect reality.  If you can't express something
# with a single record, split it.
#
# NAME: user/group name
# UID: UID assigned to the user, or '-' if only group is defined
# GID: GID assigned to the group, or '-' if only user is defined
# PROVIDER: keyword identifying provider of user/group, see below
# NOTES: human-readable notes about the assignment, optional
#
# Valid values for PROVIDER are:
# - acct: acct-user/${NAME} and/or acct-group/${NAME} packages
# - baselayout: user/group defined in passwd/group files from baselayout
# - baselayout-fbsd: same as baselayout but on FreeBSD system
# - historical: historical UID/GID assignment, no longer used nowadays
# - requested: assignment requested on the ml, not yet pushed
# - reserved: special reserved range
# - user.eclass: user/group created via user.eclass directly in package
#
# Use PROVIDERs that apply best at the moment.  For example, if user
# was migrated from user.eclass to acct-user/ with the same UID, just
# list the latter.
#
# Please keep the list sorted by UID, GID, PROVIDER, NAME (in order).

NAME		UID	GID	PROVIDER	NOTES
root		0	0	baselayout
root		0	-	baselayout-fbsd
toor		0	-	baselayout-fbsd	FreeBSD lists both names in passwd
wheel		-	0	baselayout-fbsd
bin		1	1	baselayout
daemon		1	1	baselayout-fbsd
daemon		2	2	baselayout
operator	2	5	baselayout-fbsd
adm		3	4	baselayout
bin		3	7	baselayout-fbsd
sys		-	3	baselayout
sys		-	3	baselayout-fbsd
lp		4	7	baselayout
tty		4	4	baselayout-fbsd
sync		5	-	baselayout
kmem		5	2	baselayout-fbsd
tty		-	5	baselayout
shutdown	6	-	baselayout
mail		6	6	baselayout-fbsd
disk		-	6	baselayout
halt		7	-	baselayout
games		7	-	baselayout-fbsd
lp		-	7	acct
#...
ftp		21	21	acct		removed from baselayout svn in r1475
sshd		22	22	user.eclass	removed from baselayout svn in r1476
at		25	25	user.eclass	removed from baselayout svn in r1479
smtpd		25	25	user.eclass
#...
rpc		111	111	historical	used by net-nds/portmap, removed in 36e60cce
#...
portage		250	250	baselayout
#...
(reserved)	500-999		500-999		reserved
(reserved)	1000-60000	1000-60000	reserved	UID_MIN-UID_MAX/GID_MIN-GID_MAX
#...

-- 
Best regards,
Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies