summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'session.c')
-rw-r--r--session.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/session.c b/session.c
index 388d96bb2..47787e778 100644
--- a/session.c
+++ b/session.c
@@ -601,8 +601,9 @@ do_exec_pty(Session *s, const char *command, struct passwd * pw)
601 } 601 }
602 } 602 }
603 /* Record that there was a login on that terminal. */ 603 /* Record that there was a login on that terminal. */
604 record_login(pid, s->tty, pw->pw_name, pw->pw_uid, hostname, 604 if (!options.use_login || command != NULL)
605 (struct sockaddr *)&from); 605 record_login(pid, s->tty, pw->pw_name, pw->pw_uid,
606 hostname, (struct sockaddr *)&from);
606 607
607 /* Check if .hushlogin exists. */ 608 /* Check if .hushlogin exists. */
608 snprintf(line, sizeof line, "%.200s/.hushlogin", pw->pw_dir); 609 snprintf(line, sizeof line, "%.200s/.hushlogin", pw->pw_dir);