@wolf480pl For some reason this made me curious so I found the docs say:
"io.systemd.NameServiceSwitch provides compatibility with classic UNIX/glibc NSS user records, i.e. converts struct passwd and struct group records as acquired with APIs such as getpwnam(1) to JSON user/group records"
Then I prompted Google Search's AI with
1. io.systemd.NameServiceSwitch
2. <your question above>
3. Can you show a C implementation of this?
And it produced... something. Maybe it works?