diff options
Diffstat (limited to 'usr.bin/chpass/chpass.c')
-rw-r--r-- | usr.bin/chpass/chpass.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/chpass/chpass.c b/usr.bin/chpass/chpass.c index 22ca2ac..ba8baaa 100644 --- a/usr.bin/chpass/chpass.c +++ b/usr.bin/chpass/chpass.c @@ -166,7 +166,7 @@ main(int argc, char *argv[]) } #ifdef YP - if ((pw->pw_fields & _PWF_SOURCE) == _PWF_NIS) { + if (pw != NULL && (pw->pw_fields & _PWF_SOURCE) == _PWF_NIS) { ypclnt = ypclnt_new(yp_domain, "passwd.byname", yp_host); master_mode = (ypclnt != NULL && ypclnt_connect(ypclnt) != -1 && |