summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--session.c22
2 files changed, 14 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 79db1a5ba..262c8e3c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,10 @@
22 - markus@cvs.openbsd.org 2003/08/31 12:14:22 22 - markus@cvs.openbsd.org 2003/08/31 12:14:22
23 [progressmeter.c] 23 [progressmeter.c]
24 do write to buf[-1] 24 do write to buf[-1]
25 - markus@cvs.openbsd.org 2003/08/31 13:29:05
26 [session.c]
27 call ssh_gssapi_storecreds conditionally from do_exec();
28 with sxw@inf.ed.ac.uk
25 29
2620030829 3020030829
27 - (bal) openbsd-compat/ clean up. Considate headers, add in Id on our 31 - (bal) openbsd-compat/ clean up. Considate headers, add in Id on our
@@ -937,4 +941,4 @@
937 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. 941 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
938 Report from murple@murple.net, diagnosis from dtucker@zip.com.au 942 Report from murple@murple.net, diagnosis from dtucker@zip.com.au
939 943
940$Id: ChangeLog,v 1.2925 2003/09/02 12:53:32 djm Exp $ 944$Id: ChangeLog,v 1.2926 2003/09/02 12:55:45 djm Exp $
diff --git a/session.c b/session.c
index 351b40c13..5463eebec 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
33 */ 33 */
34 34
35#include "includes.h" 35#include "includes.h"
36RCSID("$OpenBSD: session.c,v 1.162 2003/08/28 12:54:34 markus Exp $"); 36RCSID("$OpenBSD: session.c,v 1.163 2003/08/31 13:29:05 markus Exp $");
37 37
38#include "ssh.h" 38#include "ssh.h"
39#include "ssh1.h" 39#include "ssh1.h"
@@ -394,12 +394,6 @@ do_exec_no_pty(Session *s, const char *command)
394 394
395 session_proctitle(s); 395 session_proctitle(s);
396 396
397#ifdef GSSAPI
398 temporarily_use_uid(s->pw);
399 ssh_gssapi_storecreds();
400 restore_uid();
401#endif
402
403#if defined(USE_PAM) 397#if defined(USE_PAM)
404 if (options.use_pam) { 398 if (options.use_pam) {
405 do_pam_session(s->pw->pw_name, NULL); 399 do_pam_session(s->pw->pw_name, NULL);
@@ -529,12 +523,6 @@ do_exec_pty(Session *s, const char *command)
529 ptyfd = s->ptyfd; 523 ptyfd = s->ptyfd;
530 ttyfd = s->ttyfd; 524 ttyfd = s->ttyfd;
531 525
532#ifdef GSSAPI
533 temporarily_use_uid(s->pw);
534 ssh_gssapi_storecreds();
535 restore_uid();
536#endif
537
538#if defined(USE_PAM) 526#if defined(USE_PAM)
539 if (options.use_pam) { 527 if (options.use_pam) {
540 do_pam_session(s->pw->pw_name, s->tty); 528 do_pam_session(s->pw->pw_name, s->tty);
@@ -663,6 +651,14 @@ do_exec(Session *s, const char *command)
663 debug("Forced command '%.900s'", command); 651 debug("Forced command '%.900s'", command);
664 } 652 }
665 653
654#ifdef GSSAPI
655 if (options.gss_authentication) {
656 temporarily_use_uid(s->pw);
657 ssh_gssapi_storecreds();
658 restore_uid();
659 }
660#endif
661
666 if (s->ttyfd != -1) 662 if (s->ttyfd != -1)
667 do_exec_pty(s, command); 663 do_exec_pty(s, command);
668 else 664 else