mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-07-26 07:25:25 +02:00
Merge branch 'L1' of https://github.com/PowerShell/Win32-OpenSSH into L1
This commit is contained in:
commit
52a5a6ac92
15
session.c
15
session.c
@ -117,6 +117,9 @@ FIXME: GFPZR: Function stat() may be undeclared.
|
|||||||
#include <Userenv.h>
|
#include <Userenv.h>
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
|
|
||||||
|
#ifdef WIN32_PRAGMA_REMCON
|
||||||
|
#include <shlwapi.h>
|
||||||
|
#endif
|
||||||
extern char HomeDirLsaW[MAX_PATH];
|
extern char HomeDirLsaW[MAX_PATH];
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -599,9 +602,17 @@ do_exec_no_pty(Session *s, const char *command)
|
|||||||
#ifndef WIN32_PRAGMA_REMCON
|
#ifndef WIN32_PRAGMA_REMCON
|
||||||
exec_command = s->pw->pw_shell;
|
exec_command = s->pw->pw_shell;
|
||||||
#else
|
#else
|
||||||
|
if ( PathFileExists("\\program files\\pragma\\shared files\\cmdserver.exe") )
|
||||||
snprintf(exec_command_str, sizeof(exec_command_str),
|
snprintf(exec_command_str, sizeof(exec_command_str),
|
||||||
"\\program files\\pragma\\shared files\\cmdserver.exe SSHD %d %d",
|
"\\program files\\pragma\\shared files\\cmdserver.exe SSHD %d %d", s->row, s->col );
|
||||||
s->row, s->col );
|
else {
|
||||||
|
// find base path of our executable
|
||||||
|
char basepath[MAX_PATH];
|
||||||
|
strcpy_s(basepath, MAX_PATH, __progname);
|
||||||
|
PathRemoveFileSpec(basepath); // get the full dir part of the name
|
||||||
|
snprintf(exec_command_str, sizeof(exec_command_str),
|
||||||
|
"%s\\cmdserver.exe SSHD %d %d", basepath,s->row, s->col);
|
||||||
|
}
|
||||||
exec_command = exec_command_str;
|
exec_command = exec_command_str;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user