diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-01-24 16:14:56 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-01-24 16:14:56 +0000 |
| commit | e4536f1138599d98fa750125c15b26c430567d9b (patch) | |
| tree | 49ad396f199a9a181870e704bb14029f47e06e6a /lib/libpam/modules | |
| parent | a2fb0481d7222f2056a35f03de5e60689493e47a (diff) | |
Notes
Diffstat (limited to 'lib/libpam/modules')
| -rw-r--r-- | lib/libpam/modules/pam_lastlog/pam_lastlog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libpam/modules/pam_lastlog/pam_lastlog.c b/lib/libpam/modules/pam_lastlog/pam_lastlog.c index e6ca3ced38e5..ff7c1d388b49 100644 --- a/lib/libpam/modules/pam_lastlog/pam_lastlog.c +++ b/lib/libpam/modules/pam_lastlog/pam_lastlog.c @@ -161,7 +161,7 @@ pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv) time(&utmp.ut_time); /* note: does not need to be NUL-terminated */ strncpy(utmp.ut_name, user, sizeof(utmp.ut_name)); - if (rhost) + if (rhost != NULL) strncpy(utmp.ut_host, rhost, sizeof(utmp.ut_host)); (void)strncpy(utmp.ut_line, tty, sizeof(utmp.ut_line)); login(&utmp); @@ -201,7 +201,7 @@ pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv) /* note: does not need to be NUL-terminated */ strncpy(ll.ll_line, tty, sizeof(ll.ll_line)); - if (rhost) + if (rhost != NULL) /* note: does not need to be NUL-terminated */ strncpy(ll.ll_host, rhost, sizeof(ll.ll_host)); |
