summaryrefslogtreecommitdiffstats
path: root/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'session.c')
-rw-r--r--session.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/session.c b/session.c
index 4791857c..0fdd613a 100644
--- a/session.c
+++ b/session.c
@@ -812,6 +812,10 @@ do_child(const char *command, struct passwd * pw, const char *term,
struct stat st;
char *argv[10];
+ /* login(1) is only called if we execute the login shell */
+ if (options.use_login && command != NULL)
+ options.use_login = 0;
+
#ifndef USE_PAM /* pam_nologin handles this */
f = fopen("/etc/nologin", "r");
if (f) {