diff options
author | Silvan Mosberger <infinisil@icloud.com> | 2019-07-31 23:19:49 +0200 |
---|---|---|
committer | Silvan Mosberger <infinisil@icloud.com> | 2019-10-14 01:59:19 +0200 |
commit | 23d920c8f0d8d790fc69e155acbe9342853cc46a (patch) | |
tree | e9a0ac4f220c54f201ec012a553db4c695400f70 /nixos/modules/config/update-users-groups.pl | |
parent | 6c8aed6391a5e9f69cb59792aed58c5f33650275 (diff) |
nixos/users: Increase maximum system uid/gid from 499 to 999
This enlarges the system uid/gid range 6-fold, from 100 to 600 ids. This
is a preventative measure against running out of dynamically allocated
ids for NixOS services with isSystemUser, which should become the
preferred way of allocating uids for non-real users.
Diffstat (limited to 'nixos/modules/config/update-users-groups.pl')
-rw-r--r-- | nixos/modules/config/update-users-groups.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/config/update-users-groups.pl b/nixos/modules/config/update-users-groups.pl index 59cea51c611b..15e448b787aa 100644 --- a/nixos/modules/config/update-users-groups.pl +++ b/nixos/modules/config/update-users-groups.pl @@ -56,12 +56,12 @@ sub allocGid { $gidsUsed{$prevGid} = 1; return $prevGid; } - return allocId(\%gidsUsed, \%gidsPrevUsed, 400, 499, 0, sub { my ($gid) = @_; getgrgid($gid) }); + return allocId(\%gidsUsed, \%gidsPrevUsed, 400, 999, 0, sub { my ($gid) = @_; getgrgid($gid) }); } sub allocUid { my ($name, $isSystemUser) = @_; - my ($min, $max, $up) = $isSystemUser ? (400, 499, 0) : (1000, 29999, 1); + my ($min, $max, $up) = $isSystemUser ? (400, 999, 0) : (1000, 29999, 1); my $prevUid = $uidMap->{$name}; if (defined $prevUid && $prevUid >= $min && $prevUid <= $max && !defined $uidsUsed{$prevUid}) { print STDERR "reviving user '$name' with UID $prevUid\n"; |