]> andersk Git - gssapi-openssh.git/blobdiff - openssh/auth-pam.c
openssh-3.6.1p2-gssapi-20030430.diff from Simon
[gssapi-openssh.git] / openssh / auth-pam.c
index d58e74d760da744926ae2ba50ab65f40034dd7b7..da74bc0a7f9b901ed30823f3c7dd21c57223e653 100644 (file)
@@ -423,6 +423,26 @@ void free_pam_environment(char **env)
        }
 }
 
+/* Set a PAM environment string. We need to do this so that the session
+ * modules can handle things like Kerberos/GSI credentials that appear
+ * during the ssh authentication process.
+ */
+
+int do_pam_putenv(char *name, char *value) {
+       char *compound;
+       int ret=1;
+
+#ifdef HAVE_PAM_PUTENV 
+       compound=xmalloc(strlen(name)+strlen(value)+2);
+       if (compound) {
+               sprintf(compound,"%s=%s",name,value);
+               ret=pam_putenv(__pamh,compound);
+               xfree(compound);
+       }
+#endif
+       return(ret);
+}
+
 /* Print any messages that have been generated during authentication */
 /* or account checking to stderr */
 void print_pam_messages(void)
This page took 0.030832 seconds and 4 git commands to generate.