Update buildroot 2018.05
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
This commit is contained in:
@@ -47,252 +47,252 @@ Index: b/src/Cedar/Admin.c
|
||||
--- a/src/Cedar/Admin.c
|
||||
+++ b/src/Cedar/Admin.c
|
||||
@@ -10334,7 +10334,7 @@
|
||||
|
||||
Zero(t, sizeof(RPC_READ_LOG_FILE));
|
||||
|
||||
- GetExeDir(exe_dir, sizeof(exe_dir));
|
||||
+ GetStateDir(exe_dir, sizeof(exe_dir));
|
||||
Format(full_path, sizeof(full_path), "%s/%s", exe_dir, filepath);
|
||||
|
||||
// Read file
|
||||
|
||||
Zero(t, sizeof(RPC_READ_LOG_FILE));
|
||||
|
||||
- GetExeDir(exe_dir, sizeof(exe_dir));
|
||||
+ GetStateDir(exe_dir, sizeof(exe_dir));
|
||||
Format(full_path, sizeof(full_path), "%s/%s", exe_dir, filepath);
|
||||
|
||||
// Read file
|
||||
Index: b/src/Cedar/Command.c
|
||||
===================================================================
|
||||
--- a/src/Cedar/Command.c
|
||||
+++ b/src/Cedar/Command.c
|
||||
@@ -527,7 +527,7 @@
|
||||
UINT i;
|
||||
|
||||
GetExeName(exe, sizeof(exe));
|
||||
- GetExeDir(exe_dir, sizeof(exe_dir));
|
||||
+ GetStateDir(exe_dir, sizeof(exe_dir));
|
||||
|
||||
ok = false;
|
||||
dirs = EnumDir(exe_dir);
|
||||
UINT i;
|
||||
|
||||
GetExeName(exe, sizeof(exe));
|
||||
- GetExeDir(exe_dir, sizeof(exe_dir));
|
||||
+ GetStateDir(exe_dir, sizeof(exe_dir));
|
||||
|
||||
ok = false;
|
||||
dirs = EnumDir(exe_dir);
|
||||
@@ -552,7 +552,11 @@
|
||||
UCHAR *buf;
|
||||
IO *io;
|
||||
#ifndef OS_WIN32
|
||||
+#ifdef STATE_DIR
|
||||
+ wchar_t *filename = L"" STATE_DIR L"/vpn_checker_tmp";
|
||||
+#else
|
||||
wchar_t *filename = L"/tmp/vpn_checker_tmp";
|
||||
+#endif
|
||||
#else // OS_WIN32
|
||||
wchar_t filename[MAX_PATH];
|
||||
CombinePathW(filename, sizeof(filename), MsGetMyTempDirW(), L"vpn_checker_tmp");
|
||||
UCHAR *buf;
|
||||
IO *io;
|
||||
#ifndef OS_WIN32
|
||||
+#ifdef STATE_DIR
|
||||
+ wchar_t *filename = L"" STATE_DIR L"/vpn_checker_tmp";
|
||||
+#else
|
||||
wchar_t *filename = L"/tmp/vpn_checker_tmp";
|
||||
+#endif
|
||||
#else // OS_WIN32
|
||||
wchar_t filename[MAX_PATH];
|
||||
CombinePathW(filename, sizeof(filename), MsGetMyTempDirW(), L"vpn_checker_tmp");
|
||||
Index: b/src/Cedar/Logging.c
|
||||
===================================================================
|
||||
--- a/src/Cedar/Logging.c
|
||||
+++ b/src/Cedar/Logging.c
|
||||
@@ -508,7 +508,7 @@
|
||||
|
||||
e = ZeroMalloc(sizeof(ERASER));
|
||||
|
||||
- GetExeDir(dir, sizeof(dir));
|
||||
+ GetStateDir(dir, sizeof(dir));
|
||||
|
||||
e->Log = log;
|
||||
e->MinFreeSpace = min_size;
|
||||
|
||||
e = ZeroMalloc(sizeof(ERASER));
|
||||
|
||||
- GetExeDir(dir, sizeof(dir));
|
||||
+ GetStateDir(dir, sizeof(dir));
|
||||
|
||||
e->Log = log;
|
||||
e->MinFreeSpace = min_size;
|
||||
Index: b/src/Cedar/Server.c
|
||||
===================================================================
|
||||
--- a/src/Cedar/Server.c
|
||||
+++ b/src/Cedar/Server.c
|
||||
@@ -1060,7 +1060,7 @@
|
||||
hubname = NULL;
|
||||
}
|
||||
|
||||
- GetExeDir(exe_dir, sizeof(exe_dir));
|
||||
+ GetStateDir(exe_dir, sizeof(exe_dir));
|
||||
|
||||
// Enumerate in the server_log
|
||||
if (hubname == NULL)
|
||||
hubname = NULL;
|
||||
}
|
||||
|
||||
- GetExeDir(exe_dir, sizeof(exe_dir));
|
||||
+ GetStateDir(exe_dir, sizeof(exe_dir));
|
||||
|
||||
// Enumerate in the server_log
|
||||
if (hubname == NULL)
|
||||
@@ -1134,7 +1134,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- GetExeDir(exe_dir, sizeof(exe_dir));
|
||||
+ GetStateDir(exe_dir, sizeof(exe_dir));
|
||||
Format(dir_full_path, sizeof(dir_full_path), "%s/%s", exe_dir, dirname);
|
||||
|
||||
dir = EnumDir(dir_full_path);
|
||||
return;
|
||||
}
|
||||
|
||||
- GetExeDir(exe_dir, sizeof(exe_dir));
|
||||
+ GetStateDir(exe_dir, sizeof(exe_dir));
|
||||
Format(dir_full_path, sizeof(dir_full_path), "%s/%s", exe_dir, dirname);
|
||||
|
||||
dir = EnumDir(dir_full_path);
|
||||
Index: b/src/Mayaqua/Encrypt.c
|
||||
===================================================================
|
||||
--- a/src/Mayaqua/Encrypt.c
|
||||
+++ b/src/Mayaqua/Encrypt.c
|
||||
@@ -579,7 +579,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
- GetExeDir(dirname, sizeof(dirname));
|
||||
+ GetStateDir(dirname, sizeof(dirname));
|
||||
|
||||
// Search the CRL file
|
||||
t = EnumDir(dirname);
|
||||
return false;
|
||||
}
|
||||
|
||||
- GetExeDir(dirname, sizeof(dirname));
|
||||
+ GetStateDir(dirname, sizeof(dirname));
|
||||
|
||||
// Search the CRL file
|
||||
t = EnumDir(dirname);
|
||||
Index: b/src/Mayaqua/FileIO.c
|
||||
===================================================================
|
||||
--- a/src/Mayaqua/FileIO.c
|
||||
+++ b/src/Mayaqua/FileIO.c
|
||||
@@ -122,8 +122,14 @@
|
||||
#include <errno.h>
|
||||
#include <Mayaqua/Mayaqua.h>
|
||||
|
||||
+#ifdef STATE_DIR
|
||||
+static char exe_file_name[MAX_SIZE] = STATE_DIR "/a.out";
|
||||
+static wchar_t exe_file_name_w[MAX_SIZE] = L"" STATE_DIR L"/a.out";
|
||||
+#else
|
||||
static char exe_file_name[MAX_SIZE] = "/tmp/a.out";
|
||||
static wchar_t exe_file_name_w[MAX_SIZE] = L"/tmp/a.out";
|
||||
+#endif
|
||||
+
|
||||
static LIST *hamcore = NULL;
|
||||
static IO *hamcore_io = NULL;
|
||||
|
||||
#include <errno.h>
|
||||
#include <Mayaqua/Mayaqua.h>
|
||||
|
||||
+#ifdef STATE_DIR
|
||||
+static char exe_file_name[MAX_SIZE] = STATE_DIR "/a.out";
|
||||
+static wchar_t exe_file_name_w[MAX_SIZE] = L"" STATE_DIR L"/a.out";
|
||||
+#else
|
||||
static char exe_file_name[MAX_SIZE] = "/tmp/a.out";
|
||||
static wchar_t exe_file_name_w[MAX_SIZE] = L"/tmp/a.out";
|
||||
+#endif
|
||||
+
|
||||
static LIST *hamcore = NULL;
|
||||
static IO *hamcore_io = NULL;
|
||||
|
||||
@@ -1038,7 +1044,7 @@
|
||||
}
|
||||
|
||||
// If the file exist in hamcore/ directory on the local disk, read it
|
||||
- GetExeDirW(exe_dir, sizeof(exe_dir));
|
||||
+ GetStateDirW(exe_dir, sizeof(exe_dir));
|
||||
|
||||
UniFormat(tmp, sizeof(tmp), L"%s/%S/%S", exe_dir, HAMCORE_DIR_NAME, filename);
|
||||
|
||||
}
|
||||
|
||||
// If the file exist in hamcore/ directory on the local disk, read it
|
||||
- GetExeDirW(exe_dir, sizeof(exe_dir));
|
||||
+ GetStateDirW(exe_dir, sizeof(exe_dir));
|
||||
|
||||
UniFormat(tmp, sizeof(tmp), L"%s/%S/%S", exe_dir, HAMCORE_DIR_NAME, filename);
|
||||
|
||||
@@ -1154,7 +1160,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- GetExeDirW(exe_dir, sizeof(exe_dir));
|
||||
+ GetStateDirW(exe_dir, sizeof(exe_dir));
|
||||
UniFormat(tmp, sizeof(tmp), L"%s/%S", exe_dir, HAMCORE_FILE_NAME);
|
||||
|
||||
UniFormat(tmp2, sizeof(tmp2), L"%s/%S", exe_dir, HAMCORE_FILE_NAME_2);
|
||||
return;
|
||||
}
|
||||
|
||||
- GetExeDirW(exe_dir, sizeof(exe_dir));
|
||||
+ GetStateDirW(exe_dir, sizeof(exe_dir));
|
||||
UniFormat(tmp, sizeof(tmp), L"%s/%S", exe_dir, HAMCORE_FILE_NAME);
|
||||
|
||||
UniFormat(tmp2, sizeof(tmp2), L"%s/%S", exe_dir, HAMCORE_FILE_NAME_2);
|
||||
@@ -1438,6 +1444,33 @@
|
||||
GetDirNameFromFilePathW(name, size, exe_file_name_w);
|
||||
}
|
||||
|
||||
+void GetStateDir(char *name, UINT size)
|
||||
+{
|
||||
+ // Validate arguments
|
||||
+ if (name == NULL)
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
+#ifdef STATE_DIR
|
||||
+ StrCpy(name, size, STATE_DIR);
|
||||
+#else
|
||||
+ GetExeDir(name, size)
|
||||
+#endif
|
||||
+}
|
||||
+void GetStateDirW(wchar_t *name, UINT size)
|
||||
+{
|
||||
+ // Validate arguments
|
||||
+ if (name == NULL)
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
+#ifdef STATE_DIR
|
||||
+ UniStrCpy(name, size, L"" STATE_DIR L"");
|
||||
+#else
|
||||
+ GetExeDirW(name, size)
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
// Get the EXE file name
|
||||
void GetExeName(char *name, UINT size)
|
||||
{
|
||||
GetDirNameFromFilePathW(name, size, exe_file_name_w);
|
||||
}
|
||||
|
||||
+void GetStateDir(char *name, UINT size)
|
||||
+{
|
||||
+ // Validate arguments
|
||||
+ if (name == NULL)
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
+#ifdef STATE_DIR
|
||||
+ StrCpy(name, size, STATE_DIR);
|
||||
+#else
|
||||
+ GetExeDir(name, size)
|
||||
+#endif
|
||||
+}
|
||||
+void GetStateDirW(wchar_t *name, UINT size)
|
||||
+{
|
||||
+ // Validate arguments
|
||||
+ if (name == NULL)
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
+#ifdef STATE_DIR
|
||||
+ UniStrCpy(name, size, L"" STATE_DIR L"");
|
||||
+#else
|
||||
+ GetExeDirW(name, size)
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
// Get the EXE file name
|
||||
void GetExeName(char *name, UINT size)
|
||||
{
|
||||
@@ -2389,7 +2422,7 @@
|
||||
else
|
||||
{
|
||||
wchar_t dir[MAX_SIZE];
|
||||
- GetExeDirW(dir, sizeof(dir));
|
||||
+ GetStateDirW(dir, sizeof(dir));
|
||||
ConbinePathW(dst, size, dir, &src[1]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wchar_t dir[MAX_SIZE];
|
||||
- GetExeDirW(dir, sizeof(dir));
|
||||
+ GetStateDirW(dir, sizeof(dir));
|
||||
ConbinePathW(dst, size, dir, &src[1]);
|
||||
}
|
||||
}
|
||||
Index: b/src/Mayaqua/FileIO.h
|
||||
===================================================================
|
||||
--- a/src/Mayaqua/FileIO.h
|
||||
+++ b/src/Mayaqua/FileIO.h
|
||||
@@ -349,6 +349,8 @@
|
||||
void GetExeNameW(wchar_t *name, UINT size);
|
||||
void GetExeDir(char *name, UINT size);
|
||||
void GetExeDirW(wchar_t *name, UINT size);
|
||||
+void GetStateDir(char *name, UINT size);
|
||||
+void GetStateDirW(wchar_t *name, UINT size);
|
||||
void BuildHamcore(char *dst_filename, char *src_dir, bool unix_only);
|
||||
int CompareHamcore(void *p1, void *p2);
|
||||
void InitHamcore();
|
||||
void GetExeNameW(wchar_t *name, UINT size);
|
||||
void GetExeDir(char *name, UINT size);
|
||||
void GetExeDirW(wchar_t *name, UINT size);
|
||||
+void GetStateDir(char *name, UINT size);
|
||||
+void GetStateDirW(wchar_t *name, UINT size);
|
||||
void BuildHamcore(char *dst_filename, char *src_dir, bool unix_only);
|
||||
int CompareHamcore(void *p1, void *p2);
|
||||
void InitHamcore();
|
||||
Index: b/src/Mayaqua/Mayaqua.c
|
||||
===================================================================
|
||||
--- a/src/Mayaqua/Mayaqua.c
|
||||
+++ b/src/Mayaqua/Mayaqua.c
|
||||
@@ -611,7 +611,11 @@
|
||||
_exit(0);
|
||||
}
|
||||
|
||||
+#ifndef STATE_DIR
|
||||
+ // This check causes hamcorebuilder to fail in an unprivileged
|
||||
+ // environment, and is unnecessary for a managed installation.
|
||||
CheckUnixTempDir();
|
||||
+#endif
|
||||
|
||||
// Initialization of Probe
|
||||
InitProbe();
|
||||
_exit(0);
|
||||
}
|
||||
|
||||
+#ifndef STATE_DIR
|
||||
+ // This check causes hamcorebuilder to fail in an unprivileged
|
||||
+ // environment, and is unnecessary for a managed installation.
|
||||
CheckUnixTempDir();
|
||||
+#endif
|
||||
|
||||
// Initialization of Probe
|
||||
InitProbe();
|
||||
Index: b/src/Mayaqua/Table.c
|
||||
===================================================================
|
||||
--- a/src/Mayaqua/Table.c
|
||||
+++ b/src/Mayaqua/Table.c
|
||||
@@ -1191,7 +1191,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- GetExeDirW(exe, sizeof(exe));
|
||||
+ GetStateDirW(exe, sizeof(exe));
|
||||
UniStrCpy(hashtemp, sizeof(hashtemp), strfilename);
|
||||
BinToStrW(tmp, sizeof(tmp), filehash, MD5_SIZE);
|
||||
UniStrCat(hashtemp, sizeof(hashtemp), tmp);
|
||||
return;
|
||||
}
|
||||
|
||||
- GetExeDirW(exe, sizeof(exe));
|
||||
+ GetStateDirW(exe, sizeof(exe));
|
||||
UniStrCpy(hashtemp, sizeof(hashtemp), strfilename);
|
||||
BinToStrW(tmp, sizeof(tmp), filehash, MD5_SIZE);
|
||||
UniStrCat(hashtemp, sizeof(hashtemp), tmp);
|
||||
@@ -1204,7 +1204,11 @@
|
||||
UniStrLower(tmp);
|
||||
|
||||
#ifndef OS_WIN32
|
||||
+#ifdef STATE_DIR
|
||||
+ UniStrCpy(exe, sizeof(exe), L"" STATE_DIR L"");
|
||||
+#else
|
||||
UniStrCpy(exe, sizeof(exe), L"/tmp");
|
||||
+#endif
|
||||
#else // OS_WIN32
|
||||
StrToUni(exe, sizeof(exe), MsGetTempDir());
|
||||
#endif // OS_WIN32
|
||||
UniStrLower(tmp);
|
||||
|
||||
#ifndef OS_WIN32
|
||||
+#ifdef STATE_DIR
|
||||
+ UniStrCpy(exe, sizeof(exe), L"" STATE_DIR L"");
|
||||
+#else
|
||||
UniStrCpy(exe, sizeof(exe), L"/tmp");
|
||||
+#endif
|
||||
#else // OS_WIN32
|
||||
StrToUni(exe, sizeof(exe), MsGetTempDir());
|
||||
#endif // OS_WIN32
|
||||
Index: b/src/Mayaqua/Unix.c
|
||||
===================================================================
|
||||
--- a/src/Mayaqua/Unix.c
|
||||
+++ b/src/Mayaqua/Unix.c
|
||||
@@ -928,7 +928,7 @@
|
||||
StrCpy(tmp, sizeof(tmp), instance_name);
|
||||
}
|
||||
|
||||
- GetExeDir(dir, sizeof(dir));
|
||||
+ GetStateDir(dir, sizeof(dir));
|
||||
|
||||
// File name generation
|
||||
Format(name, sizeof(name), "%s/.%s", dir, tmp);
|
||||
StrCpy(tmp, sizeof(tmp), instance_name);
|
||||
}
|
||||
|
||||
- GetExeDir(dir, sizeof(dir));
|
||||
+ GetStateDir(dir, sizeof(dir));
|
||||
|
||||
// File name generation
|
||||
Format(name, sizeof(name), "%s/.%s", dir, tmp);
|
||||
@@ -2260,7 +2260,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- GetExeDir(dir, sizeof(dir));
|
||||
+ GetStateDir(dir, sizeof(dir));
|
||||
|
||||
GetExeName(exe_name, sizeof(exe_name));
|
||||
StrCat(exe_name, sizeof(exe_name), ":pid_hash");
|
||||
return;
|
||||
}
|
||||
|
||||
- GetExeDir(dir, sizeof(dir));
|
||||
+ GetStateDir(dir, sizeof(dir));
|
||||
|
||||
GetExeName(exe_name, sizeof(exe_name));
|
||||
StrCat(exe_name, sizeof(exe_name), ":pid_hash");
|
||||
@@ -2305,7 +2305,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- GetExeDir(dir, sizeof(dir));
|
||||
+ GetStateDir(dir, sizeof(dir));
|
||||
|
||||
GetExeName(exe_name, sizeof(exe_name));
|
||||
StrCat(exe_name, sizeof(exe_name), ":pid_hash");
|
||||
return;
|
||||
}
|
||||
|
||||
- GetExeDir(dir, sizeof(dir));
|
||||
+ GetStateDir(dir, sizeof(dir));
|
||||
|
||||
GetExeName(exe_name, sizeof(exe_name));
|
||||
StrCat(exe_name, sizeof(exe_name), ":pid_hash");
|
||||
Index: b/src/bin/hamcore/Makefile.am
|
||||
===================================================================
|
||||
--- a/src/bin/hamcore/Makefile.am
|
||||
|
||||
@@ -57,13 +57,13 @@ Index: b/src/bin/hamcore/strtable_en.stb
|
||||
--- a/src/bin/hamcore/strtable_en.stb
|
||||
+++ b/src/bin/hamcore/strtable_en.stb
|
||||
@@ -1062,6 +1062,7 @@
|
||||
|
||||
|
||||
# Concerning services (UNIX)
|
||||
+UNIX_DAEMON_HELP SoftEther VPN non-forking daemon for upstart and systemd.\nCommand Usage:\n %S vpnbridge - Enable bridging features.\n %S vpnclient - Enable client features.\n %S vpnserver - Enable all features.\nThe parameter can be set in the SOFTETHER_MODE environment variable.\n\n
|
||||
UNIX_SVC_HELP %S service program\nCopyright (c) SoftEther VPN Project. All Rights Reserved.\n\n%S command usage:\n %S start - Start the %S service.\n %S stop - Stop the %S service if the service has been already started.\n\n
|
||||
UNIX_SVC_STARTED The %S service has been started.\n
|
||||
UNIX_SVC_STOPPING Stopping the %S service ...\n
|
||||
|
||||
|
||||
# Concerning services (UNIX)
|
||||
+UNIX_DAEMON_HELP SoftEther VPN non-forking daemon for upstart and systemd.\nCommand Usage:\n %S vpnbridge - Enable bridging features.\n %S vpnclient - Enable client features.\n %S vpnserver - Enable all features.\nThe parameter can be set in the SOFTETHER_MODE environment variable.\n\n
|
||||
UNIX_SVC_HELP %S service program\nCopyright (c) SoftEther VPN Project. All Rights Reserved.\n\n%S command usage:\n %S start - Start the %S service.\n %S stop - Stop the %S service if the service has been already started.\n\n
|
||||
UNIX_SVC_STARTED The %S service has been started.\n
|
||||
UNIX_SVC_STOPPING Stopping the %S service ...\n
|
||||
Index: b/src/softetherd/Makefile.am
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
|
||||
@@ -29,62 +29,62 @@ Index: b/src/Cedar/Protocol.c
|
||||
--- a/src/Cedar/Protocol.c
|
||||
+++ b/src/Cedar/Protocol.c
|
||||
@@ -161,10 +161,10 @@
|
||||
UINT i;
|
||||
DIRLIST *dir;
|
||||
wchar_t dirname[MAX_SIZE];
|
||||
- wchar_t exedir[MAX_SIZE];
|
||||
+ wchar_t statedir[MAX_SIZE];
|
||||
|
||||
- GetExeDirW(exedir, sizeof(exedir));
|
||||
- CombinePathW(dirname, sizeof(dirname), exedir, L"chain_certs");
|
||||
+ GetStateDirW(statedir, sizeof(statedir));
|
||||
+ CombinePathW(dirname, sizeof(dirname), statedir, L"chain_certs");
|
||||
MakeDirExW(dirname);
|
||||
|
||||
if (auto_save)
|
||||
UINT i;
|
||||
DIRLIST *dir;
|
||||
wchar_t dirname[MAX_SIZE];
|
||||
- wchar_t exedir[MAX_SIZE];
|
||||
+ wchar_t statedir[MAX_SIZE];
|
||||
|
||||
- GetExeDirW(exedir, sizeof(exedir));
|
||||
- CombinePathW(dirname, sizeof(dirname), exedir, L"chain_certs");
|
||||
+ GetStateDirW(statedir, sizeof(statedir));
|
||||
+ CombinePathW(dirname, sizeof(dirname), statedir, L"chain_certs");
|
||||
MakeDirExW(dirname);
|
||||
|
||||
if (auto_save)
|
||||
@@ -461,7 +461,7 @@
|
||||
void AddAllChainCertsToCertList(LIST *o)
|
||||
{
|
||||
wchar_t dirname[MAX_SIZE];
|
||||
- wchar_t exedir[MAX_SIZE];
|
||||
+ wchar_t statedir[MAX_SIZE];
|
||||
DIRLIST *dir;
|
||||
// Validate arguments
|
||||
if (o == NULL)
|
||||
void AddAllChainCertsToCertList(LIST *o)
|
||||
{
|
||||
wchar_t dirname[MAX_SIZE];
|
||||
- wchar_t exedir[MAX_SIZE];
|
||||
+ wchar_t statedir[MAX_SIZE];
|
||||
DIRLIST *dir;
|
||||
// Validate arguments
|
||||
if (o == NULL)
|
||||
@@ -469,9 +469,9 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- GetExeDirW(exedir, sizeof(exedir));
|
||||
+ GetStateDirW(statedir, sizeof(statedir));
|
||||
|
||||
- CombinePathW(dirname, sizeof(dirname), exedir, L"chain_certs");
|
||||
+ CombinePathW(dirname, sizeof(dirname), statedir, L"chain_certs");
|
||||
|
||||
MakeDirExW(dirname);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
- GetExeDirW(exedir, sizeof(exedir));
|
||||
+ GetStateDirW(statedir, sizeof(statedir));
|
||||
|
||||
- CombinePathW(dirname, sizeof(dirname), exedir, L"chain_certs");
|
||||
+ CombinePathW(dirname, sizeof(dirname), statedir, L"chain_certs");
|
||||
|
||||
MakeDirExW(dirname);
|
||||
|
||||
Index: b/src/Mayaqua/Network.c
|
||||
===================================================================
|
||||
--- a/src/Mayaqua/Network.c
|
||||
+++ b/src/Mayaqua/Network.c
|
||||
@@ -12588,7 +12588,7 @@
|
||||
void AddChainSslCertOnDirectory(struct ssl_ctx_st *ctx)
|
||||
{
|
||||
wchar_t dirname[MAX_SIZE];
|
||||
- wchar_t exedir[MAX_SIZE];
|
||||
+ wchar_t statedir[MAX_SIZE];
|
||||
wchar_t txtname[MAX_SIZE];
|
||||
DIRLIST *dir;
|
||||
LIST *o;
|
||||
void AddChainSslCertOnDirectory(struct ssl_ctx_st *ctx)
|
||||
{
|
||||
wchar_t dirname[MAX_SIZE];
|
||||
- wchar_t exedir[MAX_SIZE];
|
||||
+ wchar_t statedir[MAX_SIZE];
|
||||
wchar_t txtname[MAX_SIZE];
|
||||
DIRLIST *dir;
|
||||
LIST *o;
|
||||
@@ -12602,9 +12602,9 @@
|
||||
|
||||
o = NewListFast(NULL);
|
||||
|
||||
- GetExeDirW(exedir, sizeof(exedir));
|
||||
+ GetStateDirW(statedir, sizeof(statedir));
|
||||
|
||||
- CombinePathW(dirname, sizeof(dirname), exedir, L"chain_certs");
|
||||
+ CombinePathW(dirname, sizeof(dirname), statedir, L"chain_certs");
|
||||
|
||||
MakeDirExW(dirname);
|
||||
|
||||
|
||||
o = NewListFast(NULL);
|
||||
|
||||
- GetExeDirW(exedir, sizeof(exedir));
|
||||
+ GetStateDirW(statedir, sizeof(statedir));
|
||||
|
||||
- CombinePathW(dirname, sizeof(dirname), exedir, L"chain_certs");
|
||||
+ CombinePathW(dirname, sizeof(dirname), statedir, L"chain_certs");
|
||||
|
||||
MakeDirExW(dirname);
|
||||
|
||||
|
||||
@@ -9,20 +9,20 @@ Index: b/src/Mayaqua/Mayaqua.h
|
||||
--- a/src/Mayaqua/Mayaqua.h
|
||||
+++ b/src/Mayaqua/Mayaqua.h
|
||||
@@ -282,17 +282,7 @@
|
||||
#include <ifaddrs.h>
|
||||
#endif // MAYAQUA_SUPPORTS_GETIFADDRS
|
||||
|
||||
-#ifdef UNIX_LINUX
|
||||
-typedef void *iconv_t;
|
||||
-iconv_t iconv_open (__const char *__tocode, __const char *__fromcode);
|
||||
-size_t iconv (iconv_t __cd, char **__restrict __inbuf,
|
||||
- size_t *__restrict __inbytesleft,
|
||||
- char **__restrict __outbuf,
|
||||
- size_t *__restrict __outbytesleft);
|
||||
-int iconv_close (iconv_t __cd);
|
||||
-#else // UNIX_LINUX
|
||||
#include <iconv.h>
|
||||
-#endif // UNIX_LINUX
|
||||
|
||||
|
||||
|
||||
#include <ifaddrs.h>
|
||||
#endif // MAYAQUA_SUPPORTS_GETIFADDRS
|
||||
|
||||
-#ifdef UNIX_LINUX
|
||||
-typedef void *iconv_t;
|
||||
-iconv_t iconv_open (__const char *__tocode, __const char *__fromcode);
|
||||
-size_t iconv (iconv_t __cd, char **__restrict __inbuf,
|
||||
- size_t *__restrict __inbytesleft,
|
||||
- char **__restrict __outbuf,
|
||||
- size_t *__restrict __outbytesleft);
|
||||
-int iconv_close (iconv_t __cd);
|
||||
-#else // UNIX_LINUX
|
||||
#include <iconv.h>
|
||||
-#endif // UNIX_LINUX
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -14,14 +14,14 @@ Index: b/src/Mayaqua/Mayaqua.h
|
||||
--- a/src/Mayaqua/Mayaqua.h
|
||||
+++ b/src/Mayaqua/Mayaqua.h
|
||||
@@ -235,9 +235,11 @@
|
||||
#ifdef OS_UNIX
|
||||
#ifndef UNIX_SOLARIS
|
||||
#ifndef CPU_SH4
|
||||
+#if !defined(__UCLIBC__) || defined(__UCLIBC_SUPPORT_AI_ADDRCONFIG__)
|
||||
// Getifaddrs system call is supported on UNIX other than Solaris.
|
||||
// However, it is not supported also by the Linux on SH4 CPU
|
||||
#define MAYAQUA_SUPPORTS_GETIFADDRS
|
||||
+#endif // !UCLIBC || UCLIBC_SUPPORT_AI_ADDRCONFIG
|
||||
#endif // CPU_SH4
|
||||
#endif // UNIX_SOLARIS
|
||||
#endif // OS_UNIX
|
||||
#ifdef OS_UNIX
|
||||
#ifndef UNIX_SOLARIS
|
||||
#ifndef CPU_SH4
|
||||
+#if !defined(__UCLIBC__) || defined(__UCLIBC_SUPPORT_AI_ADDRCONFIG__)
|
||||
// Getifaddrs system call is supported on UNIX other than Solaris.
|
||||
// However, it is not supported also by the Linux on SH4 CPU
|
||||
#define MAYAQUA_SUPPORTS_GETIFADDRS
|
||||
+#endif // !UCLIBC || UCLIBC_SUPPORT_AI_ADDRCONFIG
|
||||
#endif // CPU_SH4
|
||||
#endif // UNIX_SOLARIS
|
||||
#endif // OS_UNIX
|
||||
|
||||
Reference in New Issue
Block a user