From: Zbigniew Jędrzejewski-Szmek Date: Thu, 13 Oct 2022 12:51:28 +0000 (+0200) Subject: sysusers: fix argument confusion in error message X-Git-Tag: v254-rc1~411^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e4c61491a720d7a28186cf9e7e144049885a926;p=thirdparty%2Fsystemd.git sysusers: fix argument confusion in error message Bug introduced in 335f6ab4f13abcd8073fe84f2a3c70c67271126e. pw/sp are totally wrong in this context, most likely NULL. --- diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c index c16cff35a26..5aaaf609b2c 100644 --- a/src/sysusers/sysusers.c +++ b/src/sysusers/sysusers.c @@ -511,7 +511,7 @@ static int write_temporary_passwd(const char *passwd_path, FILE **ret_tmpfile, c r = putpwent_sane(&n, passwd); if (r < 0) return log_debug_errno(r, "Failed to add new user \"%s\" to temporary passwd file: %m", - pw->pw_name); + i->name); } /* Append the remaining NIS entries if any */ @@ -645,7 +645,7 @@ static int write_temporary_shadow(const char *shadow_path, FILE **ret_tmpfile, c r = putspent_sane(&n, shadow); if (r < 0) return log_debug_errno(r, "Failed to add new user \"%s\" to temporary shadow file: %m", - sp->sp_namp); + i->name); } /* Append the remaining NIS entries if any */