summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'session.c')
-rw-r--r--session.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/session.c b/session.c
index 3eba513de..f5eaa815c 100644
--- a/session.c
+++ b/session.c
@@ -428,11 +428,6 @@ do_exec_no_pty(Session *s, const char *command)
428 428
429 session_proctitle(s); 429 session_proctitle(s);
430 430
431#if defined(USE_PAM)
432 if (options.use_pam && !use_privsep)
433 do_pam_setcred(1);
434#endif /* USE_PAM */
435
436 /* Fork the child. */ 431 /* Fork the child. */
437 if ((pid = fork()) == 0) { 432 if ((pid = fork()) == 0) {
438 is_child = 1; 433 is_child = 1;
@@ -563,14 +558,6 @@ do_exec_pty(Session *s, const char *command)
563 ptyfd = s->ptyfd; 558 ptyfd = s->ptyfd;
564 ttyfd = s->ttyfd; 559 ttyfd = s->ttyfd;
565 560
566#if defined(USE_PAM)
567 if (options.use_pam) {
568 do_pam_set_tty(s->tty);
569 if (!use_privsep)
570 do_pam_setcred(1);
571 }
572#endif
573
574 /* Fork the child. */ 561 /* Fork the child. */
575 if ((pid = fork()) == 0) { 562 if ((pid = fork()) == 0) {
576 is_child = 1; 563 is_child = 1;
@@ -1373,16 +1360,8 @@ do_setusercontext(struct passwd *pw)
1373# ifdef __bsdi__ 1360# ifdef __bsdi__
1374 setpgid(0, 0); 1361 setpgid(0, 0);
1375# endif 1362# endif
1376#ifdef GSSAPI
1377 if (options.gss_authentication) {
1378 temporarily_use_uid(pw);
1379 ssh_gssapi_storecreds();
1380 restore_uid();
1381 }
1382#endif
1383# ifdef USE_PAM 1363# ifdef USE_PAM
1384 if (options.use_pam) { 1364 if (options.use_pam) {
1385 do_pam_session();
1386 do_pam_setcred(use_privsep); 1365 do_pam_setcred(use_privsep);
1387 } 1366 }
1388# endif /* USE_PAM */ 1367# endif /* USE_PAM */
@@ -1410,13 +1389,6 @@ do_setusercontext(struct passwd *pw)
1410 exit(1); 1389 exit(1);
1411 } 1390 }
1412 endgrent(); 1391 endgrent();
1413# ifdef GSSAPI
1414 if (options.gss_authentication) {
1415 temporarily_use_uid(pw);
1416 ssh_gssapi_storecreds();
1417 restore_uid();
1418 }
1419# endif
1420# ifdef USE_PAM 1392# ifdef USE_PAM
1421 /* 1393 /*
1422 * PAM credentials may take the form of supplementary groups. 1394 * PAM credentials may take the form of supplementary groups.
@@ -1424,7 +1396,6 @@ do_setusercontext(struct passwd *pw)
1424 * Reestablish them here. 1396 * Reestablish them here.
1425 */ 1397 */
1426 if (options.use_pam) { 1398 if (options.use_pam) {
1427 do_pam_session();
1428 do_pam_setcred(use_privsep); 1399 do_pam_setcred(use_privsep);
1429 } 1400 }
1430# endif /* USE_PAM */ 1401# endif /* USE_PAM */