| Summary: | accept location off ssh binary via environment variable or deduce it from /proc/ | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Stefan Tomanek <stefan.tomanek-mindrot> | ||||
| Component: | ssh | Assignee: | Assigned to nobody <unassigned-bugs> | ||||
| Status: | CLOSED WORKSFORME | ||||||
| Severity: | enhancement | CC: | Bert.Wesarg, djm, dtucker | ||||
| Priority: | P5 | ||||||
| Version: | 7.3p1 | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Attachments: |
|
||||||
|
Description
Stefan Tomanek
2016-08-23 06:06:01 AEST
Since /proc/self is not portable I don't think we should be cluttering up the code with it, and if you're going to set an environment variable to tell it where to find ssh, why not $PATH? I missed the initial discussion about -J, but why not using av[0]? (In reply to Bert Wesarg from comment #2) > I missed the initial discussion about -J, but why not using av[0]? That's a better idea. It doesn't cover all cases, but it might cover enough. The cases I can think of are: 1) full path: currently will exhibit the described behaviour, using argv[0] would fix it. 2) relative path: ditto, assuming ssh(1) doesn't chdir, which I don't think it does. 3) no path, $PATH set and exported. should work. 4) no path, $PATH set but not exported. could potentially pick up a different ssh. ssh now tries to use argv[0] and falls back to $PATH if it doesn't look like an executable closing resolved bugs as of 8.6p1 release |