|
Lines 455-468
Link Here
|
| 455 |
|
455 |
|
| 456 |
session_proctitle(s); |
456 |
session_proctitle(s); |
| 457 |
|
457 |
|
| 458 |
#if defined(USE_PAM) |
|
|
| 459 |
do_pam_session(s->pw->pw_name, NULL); |
| 460 |
do_pam_setcred(1); |
| 461 |
if (is_pam_password_change_required()) |
| 462 |
packet_disconnect("Password change required but no " |
| 463 |
"TTY available"); |
| 464 |
#endif /* USE_PAM */ |
| 465 |
|
| 466 |
/* Fork the child. */ |
458 |
/* Fork the child. */ |
| 467 |
if ((pid = fork()) == 0) { |
459 |
if ((pid = fork()) == 0) { |
| 468 |
fatal_remove_all_cleanups(); |
460 |
fatal_remove_all_cleanups(); |
|
Lines 514-519
Link Here
|
| 514 |
perror("dup2 stderr"); |
506 |
perror("dup2 stderr"); |
| 515 |
#endif /* USE_PIPES */ |
507 |
#endif /* USE_PIPES */ |
| 516 |
|
508 |
|
|
|
509 |
#if defined(USE_PAM) |
| 510 |
do_pam_session(s->pw->pw_name, NULL); |
| 511 |
do_pam_setcred(1); |
| 512 |
if (is_pam_password_change_required()) |
| 513 |
packet_disconnect("Password change required but no " |
| 514 |
"TTY available"); |
| 515 |
#endif /* USE_PAM */ |
| 516 |
|
| 517 |
#ifdef _UNICOS |
517 |
#ifdef _UNICOS |
| 518 |
cray_init_job(s->pw); /* set up cray jid and tmpdir */ |
518 |
cray_init_job(s->pw); /* set up cray jid and tmpdir */ |
| 519 |
#endif |
519 |
#endif |
|
Lines 582-592
Link Here
|
| 582 |
ptyfd = s->ptyfd; |
582 |
ptyfd = s->ptyfd; |
| 583 |
ttyfd = s->ttyfd; |
583 |
ttyfd = s->ttyfd; |
| 584 |
|
584 |
|
| 585 |
#if defined(USE_PAM) |
|
|
| 586 |
do_pam_session(s->pw->pw_name, s->tty); |
| 587 |
do_pam_setcred(1); |
| 588 |
#endif |
| 589 |
|
| 590 |
/* Fork the child. */ |
585 |
/* Fork the child. */ |
| 591 |
if ((pid = fork()) == 0) { |
586 |
if ((pid = fork()) == 0) { |
| 592 |
fatal_remove_all_cleanups(); |
587 |
fatal_remove_all_cleanups(); |
|
Lines 609-614
Link Here
|
| 609 |
|
604 |
|
| 610 |
/* Close the extra descriptor for the pseudo tty. */ |
605 |
/* Close the extra descriptor for the pseudo tty. */ |
| 611 |
close(ttyfd); |
606 |
close(ttyfd); |
|
|
607 |
|
| 608 |
#if defined(USE_PAM) |
| 609 |
do_pam_session(s->pw->pw_name, s->tty); |
| 610 |
do_pam_setcred(1); |
| 611 |
#endif |
| 612 |
|
612 |
|
| 613 |
/* record login, etc. similar to login(1) */ |
613 |
/* record login, etc. similar to login(1) */ |
| 614 |
#ifndef HAVE_OSF_SIA |
614 |
#ifndef HAVE_OSF_SIA |