mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 05:32:55 +00:00
[NFSD][TELNETD][LIBTIRPC][MAN] Don't hardcode C:\ReactOS (#2334)
CORE-14747
This commit is contained in:
parent
35710b51af
commit
214a9cb660
6 changed files with 21 additions and 4 deletions
|
@ -381,7 +381,9 @@ static int config_init(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
StringCchCopyA(config_path, ARRAYSIZE(config_path), "C:\\ReactOS\\system32\\drivers\\etc\\ms-nfs41-idmap.conf");
|
status = GetLastError();
|
||||||
|
eprintf("GetSystemDirectoryA failed with %ld\n", GetLastError());
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -177,7 +177,8 @@ static bool_t check_for_files()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
StringCchCopyA(config_path, ARRAYSIZE(config_path), "C:\\ReactOS\\system32\\drivers\\etc\\netconfig");
|
eprintf("GetSystemDirectoryA failed with error %ld\n", GetLastError());
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
fd = fopen(config_path, "r");
|
fd = fopen(config_path, "r");
|
||||||
|
|
|
@ -377,7 +377,7 @@ static void RunShell(client_t *client)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
StringCchCopyA(cmd_path, ARRAYSIZE(cmd_path), "C:\\ReactOS\\system32\\cmd.exe");
|
ErrorExit("GetSystemDirectoryA failed\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
9
dll/3rdparty/libtirpc/src/wintirpc.c
vendored
9
dll/3rdparty/libtirpc/src/wintirpc.c
vendored
|
@ -93,6 +93,9 @@ BOOL winsock_fini(void)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
char NETCONFIG[MAX_PATH] = "";
|
||||||
|
#endif
|
||||||
BOOL WINAPI DllMain/*tirpc_main*/(HINSTANCE hinstDLL, // DLL module handle
|
BOOL WINAPI DllMain/*tirpc_main*/(HINSTANCE hinstDLL, // DLL module handle
|
||||||
DWORD fdwReason, // reason called
|
DWORD fdwReason, // reason called
|
||||||
LPVOID lpvReserved) // reserved
|
LPVOID lpvReserved) // reserved
|
||||||
|
@ -109,6 +112,12 @@ BOOL WINAPI DllMain/*tirpc_main*/(HINSTANCE hinstDLL, // DLL module handle
|
||||||
// The DLL is loading due to process
|
// The DLL is loading due to process
|
||||||
// initialization or a call to LoadLibrary.
|
// initialization or a call to LoadLibrary.
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
if (!GetSystemDirectoryA(NETCONFIG, ARRAYSIZE(NETCONFIG)))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
lstrcatA(NETCONFIG, "\\drivers\\etc\\netconfig");
|
||||||
|
#endif
|
||||||
|
|
||||||
// Initialize socket library
|
// Initialize socket library
|
||||||
if (winsock_init() == FALSE)
|
if (winsock_init() == FALSE)
|
||||||
|
|
5
dll/3rdparty/libtirpc/tirpc/netconfig.h
vendored
5
dll/3rdparty/libtirpc/tirpc/netconfig.h
vendored
|
@ -3,8 +3,13 @@
|
||||||
|
|
||||||
//#include <features.h>
|
//#include <features.h>
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
#undef NETCONFIG
|
||||||
|
extern char NETCONFIG[];
|
||||||
|
#else
|
||||||
// XXX Should be in, or come from, the registry!!!
|
// XXX Should be in, or come from, the registry!!!
|
||||||
#define NETCONFIG "C:\\ReactOS\\System32\\drivers\\etc\\netconfig"
|
#define NETCONFIG "C:\\ReactOS\\System32\\drivers\\etc\\netconfig"
|
||||||
|
#endif
|
||||||
#define NETPATH "NETPATH"
|
#define NETPATH "NETPATH"
|
||||||
|
|
||||||
struct netconfig {
|
struct netconfig {
|
||||||
|
|
|
@ -13,7 +13,7 @@ rem []------------------------------------[]
|
||||||
rem []==[Config area]==[]
|
rem []==[Config area]==[]
|
||||||
set MANED=edit
|
set MANED=edit
|
||||||
set MANMORE=cat
|
set MANMORE=cat
|
||||||
set MAN=c:\ReactOS\man
|
set MAN=%WINDIR%\man
|
||||||
rem []==[End of config area]==[]
|
rem []==[End of config area]==[]
|
||||||
|
|
||||||
goto chk_param
|
goto chk_param
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue