manpage:
"If no matching record was found, these functions return 0 and
store NULL in *result. In case of error, an error number is returned,
and NULL is stored in *result."
So we can distinguish function error from "no found" cases based on
the return value.
---
src/util/virutil.c | 46 ++++++++++++++++++++++++----------------------
1 file changed, 24 insertions(+), 22 deletions(-)

NACK, we already tried that, but getpwnam_r sucks and there's no
reasonable replacement.