diff options
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); |