summaryrefslogtreecommitdiffstats
path: root/login.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-12-26 10:21:48 +1100
committerDamien Miller <djm@mindrot.org>1999-12-26 10:21:48 +1100
commit32b3cf2c96fd8cee6cb082821a43d3375c850d58 (patch)
tree103872b5f4423e17000a6221fd07fd6234924a26 /login.c
parent2e1b082dfbc5dcdae80957a3d889abe9fa480d77 (diff)
- Enabled utmpx support by default for Solaris - Cleanup sshd.c PAM a little more 19991225 - Merged fixes from Ben Taylor <bent@clark.net> - Fixed configure support for PAM. Reported by Naz <96na@eng.cam.ac.uk> - Disabled logging of PAM password authentication failures when password is empty. (e.g start of authentication loop). Reported by Naz <96na@eng.cam.ac.uk>)
Diffstat (limited to 'login.c')
-rw-r--r--login.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/login.c b/login.c
index c551da89..f4e6ddfa 100644
--- a/login.c
+++ b/login.c
@@ -18,7 +18,7 @@
*/
#include "includes.h"
-RCSID("$Id: login.c,v 1.11 1999/12/24 23:11:29 damien Exp $");
+RCSID("$Id: login.c,v 1.12 1999/12/25 23:21:48 damien Exp $");
#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
# include <utmpx.h>
@@ -155,18 +155,19 @@ record_login(int pid, const char *ttyname, const char *user, uid_t uid,
strncpy(utx.ut_line, ttyname + 5, sizeof(utx.ut_line));
utx.ut_pid = (pid_t)pid;
utx.ut_tv.tv_sec = time(NULL);
- u.ut_type = (uid == -1)?DEAD_PROCESS:USER_PROCESS;
-#ifdef HAVE_HOST_IN_UTMPX
-#ifdef HAVE_SYSLEN_IN_UTMPX
+ utx.ut_type = (uid == -1)?DEAD_PROCESS:USER_PROCESS;
+# ifdef HAVE_HOST_IN_UTMPX
+# ifdef HAVE_SYSLEN_IN_UTMPX
utx.ut_syslen = strlen(host);
- strncpy(utx.ut_host, host, utx.ut_syslen );
-#else
+ strncpy(utx.ut_host, host, utx.ut_syslen);
+# else
strncpy(utx.ut_host, host, sizeof(utx.ut_host));
-#endif /* HAVE_SYSLEN_IN_UTMPX */
-#endif
+# endif /* HAVE_SYSLEN_IN_UTMPX */
+# endif
#endif /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */
-#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) && !defined(HAVE_LOGIN)
+/*#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) && !defined(HAVE_LOGIN)*/
+#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
login(&u, &utx);
#else /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */
login(&u);