ws: Don't use getpwnam() directly, not thread-safe

Fixes #479
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>