45 lines
1.3 KiB
Diff
45 lines
1.3 KiB
Diff
--- modules/pam_lastlog/pam_lastlog.c.orig 2014-01-11 12:56:15.735248391 +0100
|
|
+++ modules/pam_lastlog/pam_lastlog.c 2014-01-11 12:57:33.142756424 +0100
|
|
@@ -26,6 +26,7 @@
|
|
#include <sys/types.h>
|
|
#include <syslog.h>
|
|
#include <unistd.h>
|
|
+#include <paths.h>
|
|
|
|
#if defined(hpux) || defined(sunos) || defined(solaris)
|
|
# ifndef _PATH_LASTLOG
|
|
@@ -403,7 +404,9 @@ last_login_write(pam_handle_t *pamh, int
|
|
|
|
if (announce & LASTLOG_WTMP) {
|
|
/* write wtmp entry for user */
|
|
+#ifdef HAVE_LOGWTMP
|
|
logwtmp(last_login.ll_line, user, remote_host);
|
|
+#endif
|
|
}
|
|
|
|
/* cleanup */
|
|
@@ -713,7 +716,9 @@ pam_sm_close_session (pam_handle_t *pamh
|
|
terminal_line = get_tty(pamh);
|
|
|
|
/* Wipe out utmp logout entry */
|
|
+#ifdef HAVE_LOGWTMP
|
|
logwtmp(terminal_line, "", "");
|
|
+#endif
|
|
|
|
return PAM_SUCCESS;
|
|
}
|
|
--- modules/pam_rhosts/pam_rhosts.c.orig 2014-01-11 12:58:40.263196779 +0100
|
|
+++ modules/pam_rhosts/pam_rhosts.c 2014-01-11 12:59:25.182491398 +0100
|
|
@@ -113,8 +113,10 @@ int pam_sm_authenticate (pam_handle_t *p
|
|
|
|
#ifdef HAVE_RUSEROK_AF
|
|
retval = ruserok_af (rhost, as_root, ruser, luser, PF_UNSPEC);
|
|
-#else
|
|
+#elif HAVE_RUSEROK
|
|
retval = ruserok (rhost, as_root, ruser, luser);
|
|
+#else
|
|
+ retval = 1;
|
|
#endif
|
|
if (retval != 0) {
|
|
if (!opt_silent || opt_debug)
|