diff options
Diffstat (limited to 'login.c')
-rw-r--r-- | login.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -18,7 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include "includes.h" | 20 | #include "includes.h" |
21 | RCSID("$Id: login.c,v 1.15 1999/12/28 15:32:22 damien Exp $"); | 21 | RCSID("$Id: login.c,v 1.16 1999/12/30 22:42:24 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> |
@@ -159,6 +159,9 @@ record_login(int pid, const char *ttyname, const char *user, uid_t uid, | |||
159 | #if defined(HAVE_HOST_IN_UTMP) | 159 | #if defined(HAVE_HOST_IN_UTMP) |
160 | strncpy(u.ut_host, host, sizeof(u.ut_host)); | 160 | strncpy(u.ut_host, host, sizeof(u.ut_host)); |
161 | #endif | 161 | #endif |
162 | #if defined(HAVE_ADDR_IN_UTMP) | ||
163 | u.ut_addr = addr->sin_addr.s_addr; | ||
164 | #endif | ||
162 | 165 | ||
163 | #if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) | 166 | #if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) |
164 | memset(&utx, 0, sizeof(utx)); | 167 | memset(&utx, 0, sizeof(utx)); |
@@ -176,6 +179,9 @@ record_login(int pid, const char *ttyname, const char *user, uid_t uid, | |||
176 | strncpy(utx.ut_host, host, sizeof(utx.ut_host)); | 179 | strncpy(utx.ut_host, host, sizeof(utx.ut_host)); |
177 | # endif /* HAVE_SYSLEN_IN_UTMPX */ | 180 | # endif /* HAVE_SYSLEN_IN_UTMPX */ |
178 | # endif | 181 | # endif |
182 | # if defined(HAVE_ADDR_IN_UTMPX) | ||
183 | utx.ut_addr = addr->sin_addr.s_addr; | ||
184 | # endif | ||
179 | #endif /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */ | 185 | #endif /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */ |
180 | 186 | ||
181 | /*#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) && !defined(HAVE_LOGIN)*/ | 187 | /*#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) && !defined(HAVE_LOGIN)*/ |