]> git.ipfire.org Git - thirdparty/systemd.git/commit
user-record-nss: check if strings from pwd/spwd/grp/sgrp are valid utf-8
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 30 Aug 2020 18:34:12 +0000 (20:34 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 1 Sep 2020 14:48:40 +0000 (16:48 +0200)
commit5c0b7380121e7d2f3556839d48626c903869b378
treed9b549063f4f6c3b82f4b91c08eeae47468ee65c
parente60775cb7b634f887cea2c1755ac2c417b804a0e
user-record-nss: check if strings from pwd/spwd/grp/sgrp are valid utf-8

strv_extend_strv_utf8_only() uses a temporary buffer to make the implementation
conscise. Otherwise we'd have to rewrite all of strv_extend_strv() which didn't
seem worth the trouble for this one use outside of a hot path.

If the data is not serializable, we just pretend it doesn't exists.
This fixes #16683 and https://bugs.gentoo.org/735072 in a second way.
src/shared/user-record-nss.c