nixpkgs/nixos/modules/config
aszlig 99ba1cb424
Increase max group name length to 32 characters
With #36556, a check was introduced to make sure the user and group
names do not exceed their respective maximum length. This is in part
because systemd also enforces that length, but only at runtime.

So in general it's a good idea to catch as much as we can during
evaluation time, however the maximum length of the group name was set to
16 characters according groupadd(8).

The maximum length of the group names however is a compile-time option
and even systemd allows more than 16 characters. In the mentioned pull
request (#36556) there was already a report that this has broken
evaluation for people out there.

I have also checked what other distributions are doing and they set the
length to either 31 characters or 32 characters, the latter being more
common.

Unfortunately there is a difference between the maximum length enforced
by the shadow package and systemd, both for user name lengths and group
name lengths. However, systemd enforces both length to have a maximum of
31 characters and I'm not sure if this is intended or just a off-by-one
error in systemd.

Nevertheless, I choose 32 characters simply to bring it in par with the
maximum user name length.

For the NixOS assertion however, I use a maximum length of 31 to make
sure that nobody accidentally creates services that contain group names
that systemd considers invalid because of a length of 32 characters.

Signed-off-by: aszlig <aszlig@nix.build>
Closes: #38548
Cc: @vcunat, @fpletz, @qknight
2018-04-08 12:51:33 +02:00
..
fonts fonts: fix fontconfig.localConf when used with penultimate 2017-11-10 16:57:45 -05:00
krb5 krb5: add deprecation date for old configuration 2017-10-03 11:01:05 +01:00
debug-info.nix Set $NIX_DEBUG_INFO_DIRS when environment.enableDebugInfo is enabled 2017-10-10 12:04:57 +02:00
gnu.nix fix indentation in several nixos option descriptions 2016-12-16 18:29:25 +01:00
i18n.nix nixos: Take glibcLocales from buildPackages. 2018-02-28 15:01:32 -05:00
ldap.nix nixos/ldap: remove tls_checkpeer no when using TLS 2017-07-19 19:23:40 -04:00
networking.nix nixos/networking: support static resolv.conf 2017-12-04 13:58:54 +00:00
no-x-libs.nix networkmanager-pptp: remove package 2018-03-23 22:24:50 +01:00
nsswitch.nix nixos: replace optionals -> optional in nsswitch 2018-03-30 06:44:18 +00:00
power-management.nix nixos/powerManagement: remove duplicate definition 2018-01-28 21:53:07 +01:00
pulseaudio.nix nixos/pulseaudio: document audio group for system wide access 2017-11-30 06:37:01 +00:00
shells-environment.nix environment.variables: give an example 2018-01-22 10:40:23 +09:00
swap.nix change swap.randomEncryption config option to "coercedTo" for backwards compatibility 2017-07-26 20:57:10 +03:00
sysctl.nix tree-wide: remove uses of features.grsecurity 2017-05-14 15:08:51 +02:00
system-environment.nix types: loeOf -> listOf 2016-11-05 21:46:42 +01:00
system-path.nix nixos: doc: introduce documentation config subtree 2018-03-30 06:52:26 +00:00
terminfo.nix terminfo: symlink terminfo to /etc for ncurses 2017-06-30 11:17:11 +02:00
timezone.nix nixos/config/timezone: Disallow spaces 2017-10-09 20:52:25 +02:00
unix-odbc-drivers.nix unix-odbc-drivers module: update for new unixODBCDrivers 2016-04-26 23:58:11 +03:00
update-users-groups.pl update-users-groups.pl: Keep track of deallocated UIDs/GIDs 2017-03-29 18:13:18 +02:00
users-groups.nix Increase max group name length to 32 characters 2018-04-08 12:51:33 +02:00
vpnc.nix nixos/vpnc: fix formatting of example 2016-02-27 22:25:39 +13:00
zram.nix nixos: Move uses of stdenv.shell to runtimeShell. 2018-03-01 14:38:53 -05:00