1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-27 11:55:06 +00:00

In use_yp(), call _yp_check() to make ultra, super-duper sure that NIS

is available before trying to go hunting for a domain name. This fixes
the following problem: you have +::::::::: in /etc/master.passwd but
NIS isn't running (no ypbind, no domain name set) -- passwd and chpass
will still try to change an NIS password instead of the local one.
This commit is contained in:
Bill Paul 1996-05-07 21:05:12 +00:00
parent 03cee47d84
commit 5741059082
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=15670

View File

@ -35,7 +35,7 @@
* Center for Telecommunications Research
* Columbia University, New York City
*
* $Id: pw_yp.c,v 1.3 1996/02/23 16:08:58 wpaul Exp $
* $Id: pw_yp.c,v 1.4 1996/03/04 15:34:43 wpaul Exp $
*/
#ifdef YP
@ -277,7 +277,8 @@ int use_yp (user, uid, which)
bf[0] = _PW_KEYYPENABLED;
key.data = (u_char *)bf;
key.size = 1;
if (!(dbp->get)(dbp,&key,&data,0) || (yp_domain && yp_server)) {
if ((!(dbp->get)(dbp,&key,&data,0) && _yp_check(NULL)) ||
(yp_domain && yp_server)) {
server = get_yp_master(0);
/* Is the user in the NIS passwd map */