summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Steves <stevesk@pobox.com>2001-02-21 16:36:51 +0000
committerKevin Steves <stevesk@pobox.com>2001-02-21 16:36:51 +0000
commitff793a27b8615f500e59811fa1c43eda909c35e6 (patch)
tree9ac132a42de19b754321c34ea7ec2eac2edce274
parent94bce40720e91d184ae22272a1537edffb65f945 (diff)
- (stevesk) session.c: back out to where we were before:
- (djm) Move PAM session initialisation until after fork in sshd. Patch from Nalin Dahyabhai <nalin@redhat.com>
-rw-r--r--ChangeLog5
-rw-r--r--session.c14
2 files changed, 13 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index a28670feb..f1bf2250a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,9 @@
6 breaks Solaris. 6 breaks Solaris.
7 - (djm) Move PAM session setup back to before setuid to user. 7 - (djm) Move PAM session setup back to before setuid to user.
8 fixes problems on Solaris-drived PAMs. 8 fixes problems on Solaris-drived PAMs.
9 - (stevesk) session.c: back out to where we were before:
10 - (djm) Move PAM session initialisation until after fork in sshd. Patch
11 from Nalin Dahyabhai <nalin@redhat.com>
9 12
1020010220 1320010220
11 - (bal) Fix mixed up params to memmove() from Jan 5th in setenv.c and 14 - (bal) Fix mixed up params to memmove() from Jan 5th in setenv.c and
@@ -4087,4 +4090,4 @@
4087 - Wrote replacements for strlcpy and mkdtemp 4090 - Wrote replacements for strlcpy and mkdtemp
4088 - Released 1.0pre1 4091 - Released 1.0pre1
4089 4092
4090$Id: ChangeLog,v 1.808 2001/02/21 05:53:33 mouring Exp $ 4093$Id: ChangeLog,v 1.809 2001/02/21 16:36:51 stevesk Exp $
diff --git a/session.c b/session.c
index de8127f79..d771edb7a 100644
--- a/session.c
+++ b/session.c
@@ -481,6 +481,10 @@ do_exec_no_pty(Session *s, const char *command, struct passwd * pw)
481 481
482 session_proctitle(s); 482 session_proctitle(s);
483 483
484#ifdef USE_PAM
485 do_pam_setcred();
486#endif /* USE_PAM */
487
484 /* Fork the child. */ 488 /* Fork the child. */
485 if ((pid = fork()) == 0) { 489 if ((pid = fork()) == 0) {
486 /* Child. Reinitialize the log since the pid has changed. */ 490 /* Child. Reinitialize the log since the pid has changed. */
@@ -593,6 +597,11 @@ do_exec_pty(Session *s, const char *command, struct passwd * pw)
593 ptyfd = s->ptyfd; 597 ptyfd = s->ptyfd;
594 ttyfd = s->ttyfd; 598 ttyfd = s->ttyfd;
595 599
600#ifdef USE_PAM
601 do_pam_session(pw->pw_name, s->tty);
602 do_pam_setcred();
603#endif /* USE_PAM */
604
596 /* Fork the child. */ 605 /* Fork the child. */
597 if ((pid = fork()) == 0) { 606 if ((pid = fork()) == 0) {
598 /* Child. Reinitialize the log because the pid has changed. */ 607 /* Child. Reinitialize the log because the pid has changed. */
@@ -1143,11 +1152,6 @@ do_child(const char *command, struct passwd * pw, const char *term,
1143 shell = login_getcapstr(lc, "shell", (char *)shell, (char *)shell); 1152 shell = login_getcapstr(lc, "shell", (char *)shell, (char *)shell);
1144#endif 1153#endif
1145 1154
1146#ifdef USE_PAM
1147 do_pam_session(pw->pw_name, ttyname);
1148 do_pam_setcred();
1149#endif /* USE_PAM */
1150
1151#ifdef AFS 1155#ifdef AFS
1152 /* Try to get AFS tokens for the local cell. */ 1156 /* Try to get AFS tokens for the local cell. */
1153 if (k_hasafs()) { 1157 if (k_hasafs()) {