]> andersk Git - openssh.git/blobdiff - session.c
- (dtucker) [Makefile.in acconfig.h auth-krb5.c auth-pam.c auth-pam.h
[openssh.git] / session.c
index 3593a3ff5892f26fc65e79297fa351a64b29b93b..6ba0233e594b7bb01d37bdcf94a6e204125165bc 100644 (file)
--- a/session.c
+++ b/session.c
@@ -418,6 +418,12 @@ do_exec_no_pty(Session *s, const char *command)
 
        session_proctitle(s);
 
+#ifdef GSSAPI
+       temporarily_use_uid(s->pw);
+       ssh_gssapi_storecreds();
+       restore_uid();
+#endif
+
 #if defined(USE_PAM)
        if (options.use_pam) {
                do_pam_session(s->pw->pw_name, NULL);
@@ -428,12 +434,6 @@ do_exec_no_pty(Session *s, const char *command)
        }
 #endif /* USE_PAM */
 
-#ifdef GSSAPI
-       temporarily_use_uid(s->pw);
-       ssh_gssapi_storecreds();
-       restore_uid();
-#endif
-
        /* Fork the child. */
        if ((pid = fork()) == 0) {
                fatal_remove_all_cleanups();
@@ -553,6 +553,12 @@ do_exec_pty(Session *s, const char *command)
        ptyfd = s->ptyfd;
        ttyfd = s->ttyfd;
 
+#ifdef GSSAPI
+       temporarily_use_uid(s->pw);
+       ssh_gssapi_storecreds();
+       restore_uid();
+#endif
+
 #if defined(USE_PAM)
        if (options.use_pam) {
                do_pam_session(s->pw->pw_name, s->tty);
@@ -560,12 +566,6 @@ do_exec_pty(Session *s, const char *command)
        }
 #endif
 
-#ifdef GSSAPI
-       temporarily_use_uid(s->pw);
-       ssh_gssapi_storecreds();
-       restore_uid();
-#endif
-
        /* Fork the child. */
        if ((pid = fork()) == 0) {
                fatal_remove_all_cleanups();
This page took 0.448915 seconds and 4 git commands to generate.