... rewrite parts to use libc functions (supported by musl and glibc).
Avoids leaking the shadow db.
No shadow support yet.