SNAP 20010213 Bug: ssh-agent environment

Volker Paulsen paulsen at orbiteam.de
Tue Feb 20 06:30:55 EST 2001


On Mon, Feb 19, 2001 at 09:27:54PM +1100, Damien Miller wrote:
> > It does not inherit its environment if it is invoked as
> > 
> >     ssh-agent command
> >     > ssh-agent /bin/sh
> >     $ env
> >     SSH_AGENT_PID=19437
> 
> Can't replicate this - I get a full env.

Finally, I tracked the problem down to openbsd-compat/setenv.c in SNAP
20010213: memmove() parameters were swapped. Probably this was already
fixed in some newer SNAP?

paulsen at tarifa 20:24 [openssh] diff -u openbsd-compat/setenv.c.orig openbsd-compat/setenv.c
--- openbsd-compat/setenv.c.orig        Mon Feb 19 20:24:00 2001
+++ openbsd-compat/setenv.c     Mon Feb 19 20:24:14 2001
@@ -122,7 +122,7 @@
                            (cnt + 2)));
                        if (!P)
                                return (-1);
-                       memmove(environ, P, cnt * sizeof(char *));
+                       memmove(P, environ, cnt * sizeof(char *));
                        environ = P;
                }
                environ[cnt + 1] = NULL;

Regards,
Volker Paulsen
-- 
  OrbiTeam Software GmbH                     http://www.orbiteam.de/
  Rathausalle 10                             phone: +49 2241 14-3704
  D-53757 Sankt Augustin                     fax:   +49 2241 14-3701





More information about the openssh-unix-dev mailing list