ProxyCommand not working if $SHELL not defined

Bert Wesarg bert.wesarg at googlemail.com
Thu Sep 17 20:33:08 EST 2009


On Thu, Sep 17, 2009 at 12:16, Antonio Mignolli
<antonio.mignolli at yahoo.it> wrote:
> Maybe the mailing list cuts the attachments.
>
> patch.openssh-5.2p1.SHELLfix:
>
> 8<-----------------------------------------------------------------
> diff -NupwB openssh-5.2p1/ssh-agent.c openssh-5.2p1.new/ssh-agent.c
> --- openssh-5.2p1/ssh-agent.c   2008-07-04 15:10:49.000000000 +0200
> +++ openssh-5.2p1.new/ssh-agent.c       2009-09-15 22:57:17.000000000 +0200
> @@ -1120,9 +1120,8 @@ main(int ac, char **av)
>                usage();
>
>        if (ac == 0 && !c_flag && !s_flag) {
> -               shell = getenv("SHELL");
> -               if (shell != NULL &&
> -                   strncmp(shell + strlen(shell) - 3, "csh", 3) == 0)
> +               shell = get_shell_from_env(); /* shell can never be NULL */
> +               if (strncmp(shell + strlen(shell) - 3, "csh", 3) == 0)
This is not your fault, but someone should add a check, if shell is at
least 3 characters long!

Bert
>                        c_flag = 1;
>        }
>        if (k_flag) {


More information about the openssh-unix-dev mailing list