-#ifdef YP
- pw->pw_name = strdup(pw->pw_name);
- _use_yp = use_yp(pw->pw_name);
- if (_use_yp == USER_YP_ONLY) {
- if (!force_local) {
- _use_yp = 1;
- pw = (struct passwd *)&yp_password;
- } else
- errx(1, "unknown local user: %s.", pw->pw_name);
- } else if (_use_yp == USER_LOCAL_ONLY) {
- if (!force_yp) {
- _use_yp = 0;
- pw = (struct passwd *)&local_password;
- } else
- errx(1, "unknown NIS user: %s.", pw->pw_name);
- } else if (_use_yp == USER_YP_AND_LOCAL) {
- if (!force_local) {
- _use_yp = 1;
- pw = (struct passwd *)&yp_password;
- } else {
- _use_yp = 0;
- pw = (struct passwd *)&local_password;
- }
- }
-#endif /* YP */
-