diff options
author | Darren Tucker <dtucker@zip.com.au> | 2003-08-26 11:58:16 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2003-08-26 11:58:16 +1000 |
commit | 49aaf4ad522c6b599ec13f75f8a6b7eab6942143 (patch) | |
tree | ccf3984a52b32d59e3900ae8518a796df2860b58 /session.c | |
parent | 0efd155c3c184f0eaa2e1eb244eaaf066e6906e0 (diff) |
- (dtucker) [Makefile.in acconfig.h auth-krb5.c auth-pam.c auth-pam.h
configure.ac defines.h gss-serv-krb5.c session.c ssh-gss.h sshconnect1.c
sshconnect2.c] Add Portable GSSAPI support, patch by Simon Wilkinson.
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -418,6 +418,12 @@ do_exec_no_pty(Session *s, const char *command) | |||
418 | 418 | ||
419 | session_proctitle(s); | 419 | session_proctitle(s); |
420 | 420 | ||
421 | #ifdef GSSAPI | ||
422 | temporarily_use_uid(s->pw); | ||
423 | ssh_gssapi_storecreds(); | ||
424 | restore_uid(); | ||
425 | #endif | ||
426 | |||
421 | #if defined(USE_PAM) | 427 | #if defined(USE_PAM) |
422 | if (options.use_pam) { | 428 | if (options.use_pam) { |
423 | do_pam_session(s->pw->pw_name, NULL); | 429 | do_pam_session(s->pw->pw_name, NULL); |
@@ -428,12 +434,6 @@ do_exec_no_pty(Session *s, const char *command) | |||
428 | } | 434 | } |
429 | #endif /* USE_PAM */ | 435 | #endif /* USE_PAM */ |
430 | 436 | ||
431 | #ifdef GSSAPI | ||
432 | temporarily_use_uid(s->pw); | ||
433 | ssh_gssapi_storecreds(); | ||
434 | restore_uid(); | ||
435 | #endif | ||
436 | |||
437 | /* Fork the child. */ | 437 | /* Fork the child. */ |
438 | if ((pid = fork()) == 0) { | 438 | if ((pid = fork()) == 0) { |
439 | fatal_remove_all_cleanups(); | 439 | fatal_remove_all_cleanups(); |
@@ -553,6 +553,12 @@ do_exec_pty(Session *s, const char *command) | |||
553 | ptyfd = s->ptyfd; | 553 | ptyfd = s->ptyfd; |
554 | ttyfd = s->ttyfd; | 554 | ttyfd = s->ttyfd; |
555 | 555 | ||
556 | #ifdef GSSAPI | ||
557 | temporarily_use_uid(s->pw); | ||
558 | ssh_gssapi_storecreds(); | ||
559 | restore_uid(); | ||
560 | #endif | ||
561 | |||
556 | #if defined(USE_PAM) | 562 | #if defined(USE_PAM) |
557 | if (options.use_pam) { | 563 | if (options.use_pam) { |
558 | do_pam_session(s->pw->pw_name, s->tty); | 564 | do_pam_session(s->pw->pw_name, s->tty); |
@@ -560,12 +566,6 @@ do_exec_pty(Session *s, const char *command) | |||
560 | } | 566 | } |
561 | #endif | 567 | #endif |
562 | 568 | ||
563 | #ifdef GSSAPI | ||
564 | temporarily_use_uid(s->pw); | ||
565 | ssh_gssapi_storecreds(); | ||
566 | restore_uid(); | ||
567 | #endif | ||
568 | |||
569 | /* Fork the child. */ | 569 | /* Fork the child. */ |
570 | if ((pid = fork()) == 0) { | 570 | if ((pid = fork()) == 0) { |
571 | fatal_remove_all_cleanups(); | 571 | fatal_remove_all_cleanups(); |