setuserenv
static int setuserenv(login_cap_t *, const struct passwd *);
if (setuserenv(lc, pwd) == -1) {