X-Git-Url: https://git.cameronkatri.com/pw-darwin.git/blobdiff_plain/427db8b9ab1ccae1a6470c8fbb5454b3c9860cfa..c290434aab0f6134ea76ada592074f66a5769791:/chpass/chpass.c diff --git a/chpass/chpass.c b/chpass/chpass.c index 2504e68..9f9be53 100644 --- a/chpass/chpass.c +++ b/chpass/chpass.c @@ -241,8 +241,11 @@ main(int argc, char *argv[]) #ifdef YP case _PWF_NIS: ypclnt = ypclnt_new(yp_domain, "passwd.byname", yp_host); - if (ypclnt == NULL || - ypclnt_connect(ypclnt) == -1 || + if (ypclnt == NULL) { + warnx("ypclnt_new failed"); + exit(1); + } + if (ypclnt_connect(ypclnt) == -1 || ypclnt_passwd(ypclnt, pw, password) == -1) { warnx("%s", ypclnt->error); ypclnt_free(ypclnt);