summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-04-16 18:37:05 +1000
committerDamien Miller <djm@mindrot.org>2001-04-16 18:37:05 +1000
commit364a9bd9ce0fa0c357e55306df56e47883a591f9 (patch)
treeaa3973186d00cc3be06f9b3af3602b83e381a288 /session.c
parent3b12614396192aa0e7b62cddf593c440feb70d2f (diff)
- Fix OSF SIA support displaying too much information for quiet
logins and logins where access was denied by SIA. Patch from Chris Adams <cmadams@hiwaay.net>
Diffstat (limited to 'session.c')
-rw-r--r--session.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/session.c b/session.c
index 77e11987e..4580c3025 100644
--- a/session.c
+++ b/session.c
@@ -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) {