]> git.ipfire.org Git - thirdparty/systemd.git/commit
sysusers: log new group name on write failure
authorMikhail Nogin <joycap@altlinux.org>
Mon, 25 May 2026 13:33:43 +0000 (16:33 +0300)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 25 May 2026 17:21:50 +0000 (02:21 +0900)
commitf50c3f548b9ce41300cc8d47f0d28a91a8d78a2a
treeeb0a60a5ee533ba673d40869d087ec02797988c4
parent9e4248fbbf31e45b33f490800f3e1da5049f9347
sysusers: log new group name on write failure

When adding new groups, putgrent_with_members() is called with the newly
constructed group n, but the error path logs gr->gr_name. gr belongs to
the
earlier loop over the existing group file and may be NULL after EOF.

Log n.gr_name instead.

Found by Linux Verification Center (linuxtesting.org) with Svace.
src/sysusers/sysusers.c