user-record: deal with invalid GECOS fields gracefully
authorLennart Poettering <lennart@poettering.net>
Thu, 6 Aug 2020 15:00:07 +0000 (17:00 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 7 Aug 2020 15:36:27 +0000 (17:36 +0200)
commit5cd12abaa0c0f3a06c9ff2048941fbe6e8b3577e
treee6744770f048f9b04b30006dcebdf512d5a0a9fd
parentb10fd796f56e4f16f7430cd22f59f544766d3bef
user-record: deal with invalid GECOS fields gracefully

Let's fix up invalid GECOS fields both when we convert from NSS to JSON
and the other way round.

Kinda sucks we have to do that, but NSS does it when writing data to
/etc/passwd, so let's do the same.

Fixes: #16668
src/shared/user-record-nss.c
src/shared/user-record.c