diff options
author | Damien Miller <djm@mindrot.org> | 1999-12-26 10:21:48 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-12-26 10:21:48 +1100 |
commit | 32b3cf2c96fd8cee6cb082821a43d3375c850d58 (patch) | |
tree | 103872b5f4423e17000a6221fd07fd6234924a26 /login.c | |
parent | 2e1b082dfbc5dcdae80957a3d889abe9fa480d77 (diff) |
19991226
- 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.c | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -18,7 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include "includes.h" | 20 | #include "includes.h" |
21 | RCSID("$Id: login.c,v 1.11 1999/12/24 23:11:29 damien Exp $"); | 21 | RCSID("$Id: login.c,v 1.12 1999/12/25 23:21:48 damien Exp $"); |
22 | 22 | ||
23 | #if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) | 23 | #if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) |
24 | # include <utmpx.h> | 24 | # include <utmpx.h> |
@@ -155,18 +155,19 @@ record_login(int pid, const char *ttyname, const char *user, uid_t uid, | |||
155 | strncpy(utx.ut_line, ttyname + 5, sizeof(utx.ut_line)); | 155 | strncpy(utx.ut_line, ttyname + 5, sizeof(utx.ut_line)); |
156 | utx.ut_pid = (pid_t)pid; | 156 | utx.ut_pid = (pid_t)pid; |
157 | utx.ut_tv.tv_sec = time(NULL); | 157 | utx.ut_tv.tv_sec = time(NULL); |
158 | u.ut_type = (uid == -1)?DEAD_PROCESS:USER_PROCESS; | 158 | utx.ut_type = (uid == -1)?DEAD_PROCESS:USER_PROCESS; |
159 | #ifdef HAVE_HOST_IN_UTMPX | 159 | # ifdef HAVE_HOST_IN_UTMPX |
160 | #ifdef HAVE_SYSLEN_IN_UTMPX | 160 | # ifdef HAVE_SYSLEN_IN_UTMPX |
161 | utx.ut_syslen = strlen(host); | 161 | utx.ut_syslen = strlen(host); |
162 | strncpy(utx.ut_host, host, utx.ut_syslen ); | 162 | strncpy(utx.ut_host, host, utx.ut_syslen); |
163 | #else | 163 | # else |
164 | strncpy(utx.ut_host, host, sizeof(utx.ut_host)); | 164 | strncpy(utx.ut_host, host, sizeof(utx.ut_host)); |
165 | #endif /* HAVE_SYSLEN_IN_UTMPX */ | 165 | # endif /* HAVE_SYSLEN_IN_UTMPX */ |
166 | #endif | 166 | # endif |
167 | #endif /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */ | 167 | #endif /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */ |
168 | 168 | ||
169 | #if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) && !defined(HAVE_LOGIN) | 169 | /*#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) && !defined(HAVE_LOGIN)*/ |
170 | #if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) | ||
170 | login(&u, &utx); | 171 | login(&u, &utx); |
171 | #else /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */ | 172 | #else /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */ |
172 | login(&u); | 173 | login(&u); |