mirror of
https://github.com/ovh/the-bastion.git
synced 2026-05-09 08:25:27 +02:00
[PR #609] [MERGED] fix: add accountGidMin to avoid stealing an account's GID #610
Labels
No labels
answered
bug
documentation
enhancement
enhancement
feature
feature
kept-open-for-info
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/the-bastion#610
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ovh/the-bastion/pull/609
Author: @speed47
Created: 1/26/2026
Status: ✅ Merged
Merged: 1/28/2026
Merged by: @speed47
Base:
master← Head:gidshift📝 Commits (1)
8a73639fix: add accountGidMin to avoid stealing an account's GID📊 Changes
7 files changed (+114 additions, -42 deletions)
View changed files
📝
bin/admin/check-consistency.pl(+6 -3)📝
bin/admin/fix-group-gid.sh(+19 -13)📝
bin/helper/osh-groupCreate(+12 -4)📝
doc/sphinx/administration/configuration/bastion_conf.rst(+12 -0)📝
etc/bastion/bastion.conf.dist(+5 -0)📝
lib/perl/OVH/Bastion/allowkeeper.inc(+24 -0)📝
lib/perl/OVH/Bastion/configuration.inc(+36 -22)📄 Description
Between account system groups (bearing the same GID number than the UID they pertain to) and bastion groups, there might be collisions on bastions with a very high amount of both accounts and groups.
This is only of importance if you're using fixed UIDs to create accounts, and can't let the system pick the UIDs itself (for example because these UIDs are referenced in some other system of your company).
This fix applies a GID shifting to all the bastion groups to ensure they can never take a GID that would pertain to a later-to-be-created account with a fixed GID.
This shift amount is configurable in bastion.conf as
accountGidMin, 500000 by default.Use the updated bin/admin/fix-group-gid.sh script to shift any preexisting group GID that would be out of the new groupGidMin range.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.