]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/sysusers/sysusers.c
sysusers: do not append entries after the NIS ones
authorFranck Bui <fbui@suse.com>
Thu, 15 Mar 2018 17:46:28 +0000 (18:46 +0100)
committerFranck Bui <fbui@suse.com>
Fri, 16 Mar 2018 09:01:33 +0000 (10:01 +0100)
commit563dc6f8e2cda4114dd20f32655890ed378c3740
tree2661a235f40fe4b7c6dd86500184fd99298f891d
parent848e863acc51ecfb0f3955c498874588201d9130
sysusers: do not append entries after the NIS ones

The NIS-catchall entry switches from files to NIS lookup and never goes back,
so it must be the last entry in /etc/passwd (the other +/-{user,@netgroup}
entries don't have to be).

That's how the nss_compat mode for /etc/passwd (and /etc/group) traditionally
works.

It's age-old historic behaviour that the NIS entry must be the last one.  It
doesn't seem to be specified somewhere, but it worked like this since very
early SunOS when NIS was first included.

Fixes: #8467
src/sysusers/sysusers.c