]> andersk Git - gssapi-openssh.git/blobdiff - openssh/auth-pam.c
patched 3.4p1 with openssh-3.4p1-gssapi-20020627.diff from Simon
[gssapi-openssh.git] / openssh / auth-pam.c
index 4b4c2f9d795372a3ebd1de46cdcfe58d22f7f754..eb4c61683059629de9ccbdc8267135266faebd1a 100644 (file)
@@ -402,6 +402,26 @@ char **fetch_pam_environment(void)
 #endif /* HAVE_PAM_GETENVLIST */
 }
 
+/* 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.135713 seconds and 4 git commands to generate.