View Issue Details

IDProjectCategoryView StatusLast Update
0002166IndiStarterGeneralpublic23-12-06 09:55
Reporterjbash Assigned ToPatrick Chevalley  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
PlatformPCOSLinuxOS Version64bit
Summary0002166: SSH is invoked without the full path
DescriptionThe version of indistarter packaged for fedora invokes ssh as just plain "ssh", without the directory part of the path. This fails if the ssh binary isn't in the working directory, which it essentially never will be. I have not tried the "official" released indistarter binaries, but I did look at the source code. It's been 30 years since I've looked at a Pascal program, and the quoting in pu_main.pas is pretty opaque to me, but I don't see anything in the code that would provide a directory name in the code no matter how you compiled or used it.

https://wiki.freepascal.org/Executing_External_Programs#SysUtils.ExecuteProcess says that you're supposed to provide the full path name.

The resulting error dialog box gives the command that failed, but doesn't give any explanation of why it failed. I figured it out by running indistarter under strace.
Steps To Reproduce1. Start the program in any directory other than /usr/bin or maybe /bin.
2. Try to run the server on a remote system.
Additional InformationYou can work around this by creating a symbolic link in the current directory, or I guess by running the program with /usr/bin as the working directory.

On essentially all Linux or Mac systems, ssh will be /usr/bin/ssh. That's common enough that you could probably safely hardcode it. I don't know how you'd find the path on Windows. I suppose you could make the pathname a preference item.
TagsNo tags attached.

Activities

Patrick Chevalley

19-08-14 09:07

administrator   ~0005847

The error you get is probably not because of the ssh path. For me it work fine on Debian, Fedora and Mac. I frequently not run from /usr/bin when I debug the program.

The wiki page you link is obsolete, TProcess documentation say the command is searched within PATH:
https://www.freepascal.org/docs-html/current/fcl/process/tprocess.executable.html
This is confirmed by a look in TProcess source code:
        if not FileExists(PName) then begin
          FoundName := ExeSearch(Pname,fpgetenv('PATH'));

I don't know the version packaged in Fedora, but with my version 2.0.0-140 it show detail why the command failed.
For example if I rename /usr/bin/ssh I get: Executable not found: "ssh"
If I not have the right ssh key I get: Host key verification failed.

Maybe the Fedora version do not include this messages?
Can you try by installing my rpm from Sourceforge?

jbash

19-08-15 04:07

reporter   ~0005855

OK, now I am utterly lost. Yes, your binary works just fine. And Fedora's binary NOW ALSO WORKS JUST FINE, with no workarounds, finding ssh all by itself.

I have changed nothing. Yet it didn't work yesterday, on repeated tries in different invocations of the program, I definitely saw it in strace doing an execve of just plain "ssh", and making a link to ssh in my working directory made it work. If /usr/bin had somehow not been in my shell's path, then indistarter wouldn't have been in the path either. I did deinstall Fedora's package to install yours, and then reinstall it... but there's nothing in any log indicating that there's been any update to the Fedora version.

I have to assume I did something really, really weird. I apologize. I should have known better than to report it without trying the official binary.

Thank you.

Issue History

Date Modified Username Field Change
19-08-14 01:10 jbash New Issue
19-08-14 09:07 Patrick Chevalley Assigned To => Patrick Chevalley
19-08-14 09:07 Patrick Chevalley Status new => feedback
19-08-14 09:07 Patrick Chevalley Note Added: 0005847
19-08-15 04:07 jbash Note Added: 0005855
19-08-15 04:07 jbash Status feedback => assigned
23-12-06 09:55 Patrick Chevalley Status assigned => resolved
23-12-06 09:55 Patrick Chevalley Resolution open => no change required