diff options
| author | Bill Paul <wpaul@FreeBSD.org> | 1996-03-04 15:34:43 +0000 |
|---|---|---|
| committer | Bill Paul <wpaul@FreeBSD.org> | 1996-03-04 15:34:43 +0000 |
| commit | c3d77d30033aa840ba091fec3ef541edd317e2b8 (patch) | |
| tree | 05c19deb215ce9baccc674fc65414107a6151488 | |
| parent | 739a189a107d5d5b43337f68079b9248463c997e (diff) | |
Notes
| -rw-r--r-- | usr.bin/chpass/pw_yp.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.bin/chpass/pw_yp.c b/usr.bin/chpass/pw_yp.c index 9493db83b89c..c86e4deea5cb 100644 --- a/usr.bin/chpass/pw_yp.c +++ b/usr.bin/chpass/pw_yp.c @@ -35,7 +35,7 @@ * Center for Telecommunications Research * Columbia University, New York City * - * $Id: pw_yp.c,v 1.9 1996/02/23 04:20:19 wpaul Exp $ + * $Id: pw_yp.c,v 1.3 1996/02/23 16:08:58 wpaul Exp $ */ #ifdef YP @@ -336,6 +336,18 @@ char *get_yp_master(getserver) int rval, localport; struct stat st; + /* + * Sometimes we are called just to probe for rpc.yppasswdd and + * set the suser_override flag. Just return NULL and leave + * suser_override at 0 if _use_yp doesn't indicate that NIS is + * in use and we weren't called from use_yp() itself. + * Without this check, we might try probing and fail with an NIS + * error in non-NIS environments. + */ + if ((_use_yp == USER_UNKNOWN || _use_yp == USER_LOCAL_ONLY) && + getserver) + return(NULL); + /* Get default NIS domain. */ if (yp_domain == NULL && (rval = yp_get_default_domain(&yp_domain))) { |
