X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/8e7b16f857459580c36335ee5c22636825609ecf..fa649821f19dfa37f4d1aa355cd39047de65fd23:/session.c?ds=sidebyside 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) {