diff options
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -635,8 +635,10 @@ do_exec_pty(Session *s, const char *command) | |||
635 | close(ttyfd); | 635 | close(ttyfd); |
636 | 636 | ||
637 | /* record login, etc. similar to login(1) */ | 637 | /* record login, etc. similar to login(1) */ |
638 | #ifndef HAVE_OSF_SIA | ||
638 | if (!(options.use_login && command == NULL)) | 639 | if (!(options.use_login && command == NULL)) |
639 | do_login(s, command); | 640 | do_login(s, command); |
641 | #endif | ||
640 | 642 | ||
641 | /* Do common processing for the child, such as execing the command. */ | 643 | /* Do common processing for the child, such as execing the command. */ |
642 | do_child(s, command); | 644 | do_child(s, command); |
@@ -1052,7 +1054,7 @@ do_child(Session *s, const char *command) | |||
1052 | if (options.use_login && command != NULL) | 1054 | if (options.use_login && command != NULL) |
1053 | options.use_login = 0; | 1055 | options.use_login = 0; |
1054 | 1056 | ||
1055 | #ifndef USE_PAM /* pam_nologin handles this */ | 1057 | #if !defined(USE_PAM) && !defined(HAVE_OSF_SIA) |
1056 | if (!options.use_login) { | 1058 | if (!options.use_login) { |
1057 | # ifdef HAVE_LOGIN_CAP | 1059 | # ifdef HAVE_LOGIN_CAP |
1058 | if (!login_getcapbool(lc, "ignorenologin", 0) && pw->pw_uid) | 1060 | if (!login_getcapbool(lc, "ignorenologin", 0) && pw->pw_uid) |
@@ -1070,7 +1072,7 @@ do_child(Session *s, const char *command) | |||
1070 | exit(254); | 1072 | exit(254); |
1071 | } | 1073 | } |
1072 | } | 1074 | } |
1073 | #endif /* USE_PAM */ | 1075 | #endif /* USE_PAM || HAVE_OSF_SIA */ |
1074 | 1076 | ||
1075 | /* Set login name, uid, gid, and groups. */ | 1077 | /* Set login name, uid, gid, and groups. */ |
1076 | /* Login(1) does this as well, and it needs uid 0 for the "-h" | 1078 | /* Login(1) does this as well, and it needs uid 0 for the "-h" |
@@ -1078,6 +1080,8 @@ do_child(Session *s, const char *command) | |||
1078 | if (!options.use_login) { | 1080 | if (!options.use_login) { |
1079 | #ifdef HAVE_OSF_SIA | 1081 | #ifdef HAVE_OSF_SIA |
1080 | session_setup_sia(pw->pw_name, s->ttyfd == -1 ? NULL : s->tty); | 1082 | session_setup_sia(pw->pw_name, s->ttyfd == -1 ? NULL : s->tty); |
1083 | if (!check_quietlogin(s, command)) | ||
1084 | do_motd(); | ||
1081 | #else /* HAVE_OSF_SIA */ | 1085 | #else /* HAVE_OSF_SIA */ |
1082 | #ifdef HAVE_CYGWIN | 1086 | #ifdef HAVE_CYGWIN |
1083 | if (is_winnt) { | 1087 | if (is_winnt) { |