summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--auth-pam.c20
2 files changed, 14 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 808c5030d..b5505da19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,8 +8,9 @@
8 [buffer.c] 8 [buffer.c]
9 do not expand buffer before attempting to reallocate it; markus ok 9 do not expand buffer before attempting to reallocate it; markus ok
10 - (djm) Crank spec versions 10 - (djm) Crank spec versions
11 - (djm) Release 3.7p1 11 - (djm) Banish (safe) sprintf from auth-pam.c. Patch from bal
12 - (tim) [configure.ac] Fix portability issues. 12 - (tim) [configure.ac] Fix portability issues.
13 - (djm) Release 3.7p1
13 14
1420030914 1520030914
15 - (dtucker) [Makefile regress/Makefile] Fix portability issues preventing 16 - (dtucker) [Makefile regress/Makefile] Fix portability issues preventing
@@ -1106,4 +1107,4 @@
1106 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. 1107 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
1107 Report from murple@murple.net, diagnosis from dtucker@zip.com.au 1108 Report from murple@murple.net, diagnosis from dtucker@zip.com.au
1108 1109
1109$Id: ChangeLog,v 1.2994.2.3 2003/09/16 05:48:15 tim Exp $ 1110$Id: ChangeLog,v 1.2994.2.4 2003/09/16 06:00:52 djm Exp $
diff --git a/auth-pam.c b/auth-pam.c
index 806c80860..754cbf6df 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.72 2003/09/13 12:12:11 dtucker Exp $"); 34RCSID("$Id: auth-pam.c,v 1.72.2.1 2003/09/16 06:00:52 djm Exp $");
35 35
36#ifdef USE_PAM 36#ifdef USE_PAM
37#include <security/pam_appl.h> 37#include <security/pam_appl.h>
@@ -672,17 +672,19 @@ do_pam_chauthtok(void)
672int 672int
673do_pam_putenv(char *name, char *value) 673do_pam_putenv(char *name, char *value)
674{ 674{
675 char *compound;
676 int ret = 1; 675 int ret = 1;
677
678#ifdef HAVE_PAM_PUTENV 676#ifdef HAVE_PAM_PUTENV
679 compound = xmalloc(strlen(name)+strlen(value)+2); 677 char *compound;
680 if (compound) { 678 size_t len;
681 sprintf(compound,"%s=%s",name,value); 679
682 ret = pam_putenv(sshpam_handle,compound); 680 len = strlen(name) + strlen(value) + 2;
683 xfree(compound); 681 compound = xmalloc(len);
684 } 682
683 snprintf(compound, len, "%s=%s", name, value);
684 ret = pam_putenv(sshpam_handle, compound);
685 xfree(compound);
685#endif 686#endif
687
686 return (ret); 688 return (ret);
687} 689}
688 690