diff options
author | Darren Tucker <dtucker@zip.com.au> | 2003-08-26 11:58:16 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2003-08-26 11:58:16 +1000 |
commit | 49aaf4ad522c6b599ec13f75f8a6b7eab6942143 (patch) | |
tree | ccf3984a52b32d59e3900ae8518a796df2860b58 /auth-pam.c | |
parent | 0efd155c3c184f0eaa2e1eb244eaaf066e6906e0 (diff) |
- (dtucker) [Makefile.in acconfig.h auth-krb5.c auth-pam.c auth-pam.h
configure.ac defines.h gss-serv-krb5.c session.c ssh-gss.h sshconnect1.c
sshconnect2.c] Add Portable GSSAPI support, patch by Simon Wilkinson.
Diffstat (limited to 'auth-pam.c')
-rw-r--r-- | auth-pam.c | 25 |
1 files changed, 24 insertions, 1 deletions
@@ -31,7 +31,7 @@ /* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */ #include "includes.h" -RCSID("$Id: auth-pam.c,v 1.67 2003/08/25 03:08:49 djm Exp $"); +RCSID("$Id: auth-pam.c,v 1.68 2003/08/26 01:58:16 dtucker Exp $"); #ifdef USE_PAM #include <security/pam_appl.h> @@ -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) { |