Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checks/acct.py hardcodes range for system accounts #356

Closed
ulm opened this issue Nov 14, 2021 · 8 comments · Fixed by #489
Closed

checks/acct.py hardcodes range for system accounts #356

ulm opened this issue Nov 14, 2021 · 8 comments · Fixed by #489
Assignees

Comments

@ulm
Copy link
Contributor

ulm commented Nov 14, 2021

By decision of the Gentoo Council today, the range from 0 to 749 is allowed for static allocation. Possibly this will be extended by another range above 60001 in future.

The >= 500 check causes spurious errors, e.g. in gentoo/gentoo#22950.

This should be increased to account for the extended range, or preferably made configurable.

@mgorny
Copy link
Contributor

mgorny commented Nov 15, 2021

Configurable how? layout.conf?

@ulm
Copy link
Contributor Author

ulm commented Nov 15, 2021

Not sure, maybe qa-policy.conf is better?

@mgorny
Copy link
Contributor

mgorny commented Nov 15, 2021

Not sure about that. In the end, we aren't using this file at the moment and it's not clear if it will be used in the end.

@mgorny
Copy link
Contributor

mgorny commented Nov 15, 2021

I'll just extend the hardcoded range for now and think about putting it somewhere later.

@ulm
Copy link
Contributor Author

ulm commented Nov 18, 2021

Could you update the error message too? It still says ... outside permitted static allocation range (0..499, 60001+) in class OutsideRangeAccountIdentifier with both ranges being incorrect. It should say just (0..749) I think.

@arthurzam
Copy link
Member

@ulm @mgorny Can one of you decide how and where to hold the range?

I think qa-policy.conf was a good suggestion, and if we could select a format? What do you think about:

[glep-81]
uid-range = 1-749,65534
gid-range = 1-749,65533,65534

The format idea is to have comma separated list, of int for single value or int-int for an inclusive on both ends range. It ignore whitespaces in any position.
(I went with glep-81 section name just because I couldn't think of a better name, of course I will agree to any better naming)

@ulm
Copy link
Contributor Author

ulm commented Oct 2, 2022

I can't say that I like glep-81 as a name. Maybe something more expressive, like user-ids or user-group-ids?

@arthurzam
Copy link
Member

arthurzam commented Oct 2, 2022

No problem :)
Then what about it looking like it?

[user-group-ids]
uid-range = 0-749,65534
gid-range = 0-749,65533,65534

(Also, is this the correct range?)

@arthurzam arthurzam self-assigned this Oct 2, 2022
ulm added a commit to ulm/gentoo that referenced this issue Oct 22, 2022
See also user and group account policy:
https://projects.gentoo.org/qa/policy-guide/user-group.html#pg0901

Suggested-by: Arthur Zamarin <arthurzam@gentoo.org>
Bug: pkgcore/pkgcheck#356
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
ulm added a commit to ulm/gentoo that referenced this issue Oct 22, 2022
See also user and group account policy:
https://projects.gentoo.org/qa/policy-guide/user-group.html#pg0901

Bug: pkgcore/pkgcheck#356
Suggested-by: Arthur Zamarin <arthurzam@gentoo.org>
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue Oct 22, 2022
See also user and group account policy:
https://projects.gentoo.org/qa/policy-guide/user-group.html#pg0901

Bug: pkgcore/pkgcheck#356
Suggested-by: Arthur Zamarin <arthurzam@gentoo.org>
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
arthurzam added a commit to arthurzam/pkgcheck that referenced this issue Oct 30, 2022
Load UID and GID range from metadata/qa-policy.conf under the repo,
validate the format is as expected, and use the values to set expected
ids.

Resolves: pkgcore#356
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
arthurzam added a commit to arthurzam/pkgcheck that referenced this issue Oct 31, 2022
Load UID and GID range from metadata/qa-policy.conf under the repo,
validate the format is as expected, and use the values to set expected
ids.

Resolves: pkgcore#356
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
arthurzam added a commit to arthurzam/pkgcheck that referenced this issue Oct 31, 2022
Load UID and GID range from metadata/qa-policy.conf under the repo,
validate the format is as expected, and use the values to set expected
ids.

Resolves: pkgcore#356
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants