diff -urN ../pam-0.77-r6/work/Linux-PAM-0.77/modules/pam_access/Makefile modules/pam_access/Makefile --- ../pam-0.77-r6/work/Linux-PAM-0.77/modules/pam_access/Makefile 2005-03-03 19:35:23 +0100 +++ modules/pam_access/Makefile 2005-03-03 18:28:56 +0100 @@ -12,7 +12,7 @@ INSTALLED_CONFILE=$(SCONFIGD)/access.conf DEFS=-DDEFAULT_CONF_FILE=\"$(INSTALLED_CONFILE)\" -CFLAGS += $(DEFS) -DNIS +CFLAGS += $(DEFS) -DNIS MODULE_SIMPLE_INSTALL=bash -f ../install_conf "$(FAKEROOT)" "$(SCONFIGD)" "$(INSTALLED_CONFILE)" "$(TITLE)" "$(LOCAL_CONFILE)" MODULE_SIMPLE_REMOVE=rm -f $(FAKEROOT)$(INSTALLED_CONFILE) diff -urN ../pam-0.77-r6/work/Linux-PAM-0.77/modules/pam_radius/Makefile modules/pam_radius/Makefile --- ../pam-0.77-r6/work/Linux-PAM-0.77/modules/pam_radius/Makefile 2005-03-03 19:35:28 +0100 +++ modules/pam_radius/Makefile 2005-03-03 19:34:19 +0100 @@ -10,6 +10,7 @@ include ../../Make.Rules +CFLAGS+= -DNIS TITLE=pam_radius CONFD=$(CONFIGED)/security export CONFD diff -urN ../pam-0.77-r6/work/Linux-PAM-0.77/modules/pam_radius/pam_radius.h modules/pam_radius/pam_radius.h --- ../pam-0.77-r6/work/Linux-PAM-0.77/modules/pam_radius/pam_radius.h 2000-11-20 00:54:05 +0100 +++ modules/pam_radius/pam_radius.h 2005-03-03 19:33:25 +0100 @@ -29,7 +29,9 @@ #include #include +#ifdef NIS #include +#endif #include #include diff -urN ../pam-0.77-r6/work/Linux-PAM-0.77/modules/pam_unix/Makefile modules/pam_unix/Makefile --- ../pam-0.77-r6/work/Linux-PAM-0.77/modules/pam_unix/Makefile 2005-03-03 19:35:27 +0100 +++ modules/pam_unix/Makefile 2005-03-03 19:28:14 +0100 @@ -59,6 +59,6 @@ ######################################################################## -CFLAGS += $(USE_CRACKLIB) $(USE_LCKPWDF) $(NEED_LCKPWDF) $(EXTRAS) $(INCLUDE_PAMMODUTILS) +CFLAGS += $(USE_CRACKLIB) $(USE_LCKPWDF) $(NEED_LCKPWDF) $(EXTRAS) $(INCLUDE_PAMMODUTILS) -DNIS LDLIBS = $(EXTRALS) $(LINK_PAMMODUTILS) @@ -75,7 +75,10 @@ LIBOBJS = $(addprefix static/,$(LIBOBJ)) PLUS = md5_good.o md5_broken.o md5_crypt_good.o md5_crypt_broken.o \ - yppasswd_xdr.o bigcrypt.o + bigcrypt.o +ifdef NIS +PLUS += yppasswd_xdr.o +endif ifdef DYNAMIC LIBSHARED = pam_unix.so diff -urN ../pam-0.77-r6/work/Linux-PAM-0.77/modules/pam_unix/pam_unix_acct.c modules/pam_unix/pam_unix_acct.c --- ../pam-0.77-r6/work/Linux-PAM-0.77/modules/pam_unix/pam_unix_acct.c 2005-03-03 19:35:27 +0100 +++ modules/pam_unix/pam_unix_acct.c 2005-03-03 19:01:55 +0100 @@ -98,6 +98,7 @@ return PAM_USER_UNKNOWN; } +#ifdef NIS if (!strcmp( pwent->pw_passwd, "*NP*" )) { /* NIS+ */ uid_t save_euid, save_uid; @@ -124,6 +125,9 @@ } } else if (_unix_shadowed( pwent )) { +#else + if (_unix_shadowed( pwent )) { +#endif spent = _pammodutil_getspnam(pamh, uname); } else { return PAM_SUCCESS; diff -urN ../pam-0.77-r6/work/Linux-PAM-0.77/modules/pam_unix/pam_unix_passwd.c modules/pam_unix/pam_unix_passwd.c --- ../pam-0.77-r6/work/Linux-PAM-0.77/modules/pam_unix/pam_unix_passwd.c 2005-03-03 19:35:27 +0100 +++ modules/pam_unix/pam_unix_passwd.c 2005-03-03 19:27:41 +0100 @@ -54,8 +54,10 @@ #include #include #include +#ifdef NIS #include #include +#endif #ifdef USE_CRACKLIB #include @@ -75,7 +77,9 @@ #include +#ifdef NIS #include "yppasswd.h" +#endif #include "md5.h" #include "support.h" @@ -180,6 +184,7 @@ return x; } +#ifdef NIS static char *getNISserver(pam_handle_t *pamh) { char *master; @@ -209,6 +214,7 @@ } return master; } +#endif static int check_old_password(const char *forwho, const char *newpass) { @@ -529,7 +535,7 @@ if (pwd == NULL) return PAM_AUTHTOK_ERR; - +#ifdef NIS if (on(UNIX_NIS, ctrl) && _unix_comesfromsource(pamh, forwho, 0, 1)) { struct timeval timeout; struct yppasswd yppwd; @@ -592,6 +598,7 @@ #endif return retval; } +#endif /* first, save old password */ if (save_old_password(pamh, forwho, fromwhat, remember)) { return PAM_AUTHTOK_ERR; @@ -634,6 +641,7 @@ if (spwdent == NULL) return PAM_AUTHINFO_UNAVAIL; } else { +#ifdef NIS if (strcmp(pwd->pw_passwd,"*NP*") == 0) { /* NIS+ */ uid_t save_uid; @@ -645,6 +653,7 @@ if (spwdent == NULL) return PAM_AUTHINFO_UNAVAIL; } else +#endif spwdent = NULL; } @@ -810,7 +819,11 @@ */ if (_unix_comesfromsource(pamh, user, 1, 1) == 0) { _log_err(LOG_DEBUG, pamh, +#ifdef NIS "user \"%s\" does not exist in /etc/passwd or NIS", +#else + "user \"%s\" does not exist in /etc/passwd", +#endif user); return PAM_USER_UNKNOWN; } else { diff -urN ../pam-0.77-r6/work/Linux-PAM-0.77/modules/pam_unix/support.c modules/pam_unix/support.c --- ../pam-0.77-r6/work/Linux-PAM-0.77/modules/pam_unix/support.c 2005-03-03 19:35:27 +0100 +++ modules/pam_unix/support.c 2005-03-03 19:23:32 +0100 @@ -19,7 +19,9 @@ #include #include #include +#ifdef NIS #include +#endif #include #include @@ -349,6 +351,7 @@ } } +#ifdef NIS if (!matched && nis) { char *userinfo = NULL, *domain = NULL; int len = 0, i; @@ -367,6 +370,7 @@ } } } +#endif if (matched && (ret != NULL)) { *ret = NULL; @@ -502,6 +506,7 @@ pwd = _pammodutil_getpwnam(pamh, name); if (pwd != NULL) { +#ifdef NIS if (strcmp( pwd->pw_passwd, "*NP*" ) == 0) { /* NIS+ */ uid_t save_euid, save_uid; @@ -534,6 +539,9 @@ setreuid( -1, save_euid ); } } else if (_unix_shadowed(pwd)) { +#else + if (_unix_shadowed(pwd)) { +#endif /* * ...and shadow password file entry for this user, * if shadowing is enabled @@ -560,10 +568,12 @@ if (salt) _pam_delete(salt); +#ifdef NIS #if HAVE_GETPWNAM_R if (buf) free(buf); #endif +#endif return retval; } @@ -694,6 +704,7 @@ pwd = _pammodutil_getpwnam(pamh, name); /* Get password file entry... */ if (pwd != NULL) { +#ifdef NIS if (strcmp( pwd->pw_passwd, "*NP*" ) == 0) { /* NIS+ */ uid_t save_euid, save_uid; @@ -721,6 +732,9 @@ setreuid( -1, save_euid ); } } else if (_unix_shadowed(pwd)) { +#else + if (_unix_shadowed(pwd)) { +#endif /* * ...and shadow password file entry for this user, * if shadowing is enabled diff -urN ../pam-0.77-r6/work/Linux-PAM-0.77/modules/pam_unix/unix_chkpwd.c modules/pam_unix/unix_chkpwd.c --- ../pam-0.77-r6/work/Linux-PAM-0.77/modules/pam_unix/unix_chkpwd.c 2005-03-03 19:35:26 +0100 +++ modules/pam_unix/unix_chkpwd.c 2005-03-03 19:26:49 +0100 @@ -147,6 +147,7 @@ else pwd = NULL; } else { +#ifdef NIS if (strcmp(pwd->pw_passwd, "*NP*") == 0) { /* NIS+ */ uid_t save_uid; @@ -157,8 +158,11 @@ salt = x_strdup(spwdent->sp_pwdp); } else { +#endif salt = x_strdup(pwd->pw_passwd); +#ifdef NIS } +#endif } } if (pwd == NULL || salt == NULL) {