summaryrefslogtreecommitdiff
path: root/auth-pam.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-08-26 11:58:16 +1000
committerDarren Tucker <dtucker@zip.com.au>2003-08-26 11:58:16 +1000
commit49aaf4ad522c6b599ec13f75f8a6b7eab6942143 (patch)
treeccf3984a52b32d59e3900ae8518a796df2860b58 /auth-pam.c
parent0efd155c3c184f0eaa2e1eb244eaaf066e6906e0 (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.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/auth-pam.c b/auth-pam.c
index c0b6ded12..08b88f0dd 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -31,7 +31,7 @@
31 31
32/* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */ 32/* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */
33#include "includes.h" 33#include "includes.h"
34RCSID("$Id: auth-pam.c,v 1.67 2003/08/25 03:08:49 djm Exp $"); 34RCSID("$Id: auth-pam.c,v 1.68 2003/08/26 01:58:16 dtucker Exp $");
35 35
36#ifdef USE_PAM 36#ifdef USE_PAM
37#include <security/pam_appl.h> 37#include <security/pam_appl.h>
@@ -650,6 +650,29 @@ do_pam_chauthtok(void)
650 pam_strerror(sshpam_handle, sshpam_err)); 650 pam_strerror(sshpam_handle, sshpam_err));
651} 651}
652 652
653/*
654 * Set a PAM environment string. We need to do this so that the session
655 * modules can handle things like Kerberos/GSI credentials that appear
656 * during the ssh authentication process.
657 */
658
659int
660do_pam_putenv(char *name, char *value)
661{
662 char *compound;
663 int ret = 1;
664
665#ifdef HAVE_PAM_PUTENV
666 compound = xmalloc(strlen(name)+strlen(value)+2);
667 if (compound) {
668 sprintf(compound,"%s=%s",name,value);
669 ret = pam_putenv(sshpam_handle,compound);
670 xfree(compound);
671 }
672#endif
673 return (ret);
674}
675
653void 676void
654print_pam_messages(void) 677print_pam_messages(void)
655{ 678{