[PATCH] Re: scp remote path specification

mouring at etoh.eviladmin.org mouring at etoh.eviladmin.org
Wed Dec 20 13:44:35 EST 2000


> @@ -262,8 +265,21 @@
>  	addargs("-x");
>  	addargs("-oFallBackToRsh no");
>  
> +	/* check explicit path for ssh binary, default is SSH_PROGRAM */
> +	if ((argc > 0) &&
> +	    (argv[0] != NULL)) {
> +	  pathsep = strrchr(argv[0], '/');
> +	  if (pathsep != NULL) {
> +	    pathsep++;
> +	    *pathsep = 0; 
> +	    ssh_program = xmalloc(strlen(argv[0]) + 4); /* "../path" + "ssh\0" */
> +	    strcpy(ssh_program, argv[0]);
> +	    strcat(ssh_program, "ssh");
> +	  } 
> +	}
> +

Why do we want to force ssh_program to adopt the the argv[0]'s path?  This
seems like a bad practice to me. 

- Ben






More information about the openssh-unix-dev mailing list