]> andersk Git - openssh.git/blobdiff - auth-pam.c
- (dtucker) [Makefile.in acconfig.h auth-krb5.c auth-pam.c auth-pam.h
[openssh.git] / auth-pam.c
index b9c1898c1d5a212d31bcda8d10d71846cfd58ea3..db3d857e2cc617aa8e7cc5853df95ba77b0f1b0b 100644 (file)
@@ -650,6 +650,29 @@ do_pam_chauthtok(void)
                    pam_strerror(sshpam_handle, sshpam_err));
 }
 
+/* 
+ * 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(sshpam_handle,compound);
+               xfree(compound);
+       }
+#endif
+       return (ret);
+}
+
 void
 print_pam_messages(void)
 {
This page took 0.08555 seconds and 4 git commands to generate.