mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-29 16:54:51 +02:00
Fix off by one error in PAM env patch
Tidy changelog
This commit is contained in:
parent
65b3c13132
commit
d0562b3cdc
@ -9,6 +9,8 @@
|
|||||||
- Removed redundant subdirectories
|
- Removed redundant subdirectories
|
||||||
- Integrated part of a patch from Dan Brosemer <odin@linuxfreak.com> for
|
- Integrated part of a patch from Dan Brosemer <odin@linuxfreak.com> for
|
||||||
building on Debian.
|
building on Debian.
|
||||||
|
- Fixed off-by-one error in PAM env patch
|
||||||
|
- Released 1.2pre6
|
||||||
|
|
||||||
19991028
|
19991028
|
||||||
- Further PAM enhancements.
|
- Further PAM enhancements.
|
||||||
|
4
sshd.c
4
sshd.c
@ -18,7 +18,7 @@ agent connections.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$Id: sshd.c,v 1.8 1999/10/29 01:49:20 damien Exp $");
|
RCSID("$Id: sshd.c,v 1.9 1999/10/29 03:09:40 damien Exp $");
|
||||||
|
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
#include "rsa.h"
|
#include "rsa.h"
|
||||||
@ -2365,7 +2365,7 @@ void do_child(const char *command, struct passwd *pw, const char *term,
|
|||||||
char **pam_env = pam_getenvlist((pam_handle_t *)pamh);
|
char **pam_env = pam_getenvlist((pam_handle_t *)pamh);
|
||||||
for(this_var = 0; pam_env && pam_env[this_var]; this_var++)
|
for(this_var = 0; pam_env && pam_env[this_var]; this_var++)
|
||||||
{
|
{
|
||||||
if(strlen(pam_env[this_var]) < sizeof(var_name))
|
if(strlen(pam_env[this_var]) < (sizeof(var_name) - 1))
|
||||||
if((equal_sign = strstr(pam_env[this_var], "=")) != NULL)
|
if((equal_sign = strstr(pam_env[this_var], "=")) != NULL)
|
||||||
{
|
{
|
||||||
memset(var_name, 0, sizeof(var_name));
|
memset(var_name, 0, sizeof(var_name));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user