Index: head/security/softether/Makefile =================================================================== --- head/security/softether/Makefile (revision 512257) +++ head/security/softether/Makefile (revision 512258) @@ -1,134 +1,99 @@ # $FreeBSD$ PORTNAME= softether DISTVERSION= 4.29-9680 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= security net-vpn MASTER_SITES= https://www.softether-download.com/files/softether/v${DISTVERSION}-rtm-2019.02.28-tree/Source_Code/ DISTNAME= ${PORTNAME}-src-v${DISTVERSION}-rtm MAINTAINER= meta@FreeBSD.org COMMENT= SoftEther VPN 4 (RTM version) LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE ONLY_FOR_ARCHS= amd64 i386 ONLY_FOR_ARCHS_REASON= Upstream only supports amd64 and i386: https://www.softether.org/3-spec USES= dos2unix gmake iconv:wchar_t localbase:ldflags ncurses \ readline ssl USE_RC_SUBR= softether_bridge softether_client softether_server DOS2UNIX_FILES= ChangeLog LICENSE README *.TXT \ src/Cedar/*.* src/Mayaqua/*.* OPTIONS_DEFINE= DOCS UNLOCK # Use of some functions in Japan and China is restricted. # This option Unlocks regional lockout following functions: # - RADIUS / NT Domain user authentication function # - RSA certificate user authentication function # - Deep-inspect packet logging function # - Source IP address control list function # - syslog transfer function UNLOCK_DESC= Unlock regional lockout (JP and CN) UNLOCK_EXTRA_PATCHES= ${FILESDIR}/extra-patch-unrestrict-enterprise-functions CONFLICTS_INSTALL= softether-devel-4.* softether5 PORTDOCS= AUTHORS.TXT ChangeLog LICENSE README THIRD_PARTY.TXT WARNING.TXT SE_DBDIR?= /var/db/${PORTNAME} SE_LOGDIR?= /var/log/${PORTNAME} -PLIST_SUB= SE_DBDIR="${SE_DBDIR}" SE_LOGDIR="${SE_LOGDIR}" -SUB_LIST= SE_DBDIR="${SE_DBDIR}" SE_LOGDIR="${SE_LOGDIR}" +SE_PIDDIR?= /var/run/${PORTNAME} +PLIST_SUB= SE_DBDIR="${SE_DBDIR}" SE_LOGDIR="${SE_LOGDIR}" SE_PIDDIR="${SE_PIDDIR}" +SUB_LIST= SE_DBDIR="${SE_DBDIR}" SE_LOGDIR="${SE_LOGDIR}" SE_PIDDIR="${SE_PIDDIR}" SUB_FILES= pkg-message vpncmd CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib # a pity the source directory has such a naming scheme, but well WRKSRC= ${WRKDIR}/v${DISTVERSION} ALL_TARGET= build .include post-patch: # SoftEther scatters logs, config files and PID files in PREFIX/libexec # directory. To write them in the right place, replace it. ${REINPLACE_CMD} \ - -e "s|@vpn_server_template|${SE_DBDIR}/vpn_server_template|" \ - -e "s|@vpn_server|${SE_DBDIR}/vpn_server|" \ - -e "s|@vpn_bridge|${SE_DBDIR}/vpn_bridge|" \ - -e "s|@vpn_gate_svc|${SE_DBDIR}/vpn_gate_svc|" \ - -e "s|@vpn_gate_relay|${SE_DBDIR}/vpn_gate_relay|" \ - ${WRKSRC}/src/Cedar/Server.c - - ${REINPLACE_CMD} \ - -e "s|@adminip|${SE_DBDIR}/adminip|" \ - -e "s|@etherlogger|${SE_DBDIR}/etherlogger|" \ - -e "s|@vpn_client|${SE_DBDIR}/vpn_client|" \ - -e "s|@vpn_router|${SE_DBDIR}/vpn_router|" \ - -e "s|@custom|${SE_DBDIR}/custom|" \ - -e "s|@backup|${SE_DBDIR}/backup|" \ - -e "s|@save_binary|${SE_DBDIR}/save_binary|" \ - -e "s|@lang|${SE_DBDIR}/lang|" \ - -e "s|@azureserver|${SE_DBDIR}/azureserver|" \ - -e "s|@server_log|${SE_LOGDIR}/server|" \ - -e "s|@security_log|${SE_LOGDIR}/security|" \ - -e "s|@packet_log|${SE_LOGDIR}/packet|" \ - -e "s|@secure_nat_log|${SE_LOGDIR}/secure_nat|" \ - -e "s|@client_log|${SE_LOGDIR}/client|" \ - -e "s|@tiny_log|${SE_LOGDIR}/tiny|" \ - -e "s|@carrier_log|${SE_LOGDIR}/carrier|" \ - -e "s|@etherlogger_log|${SE_LOGDIR}/etherlogger|" \ - ${WRKSRC}/src/Cedar/Cedar.h \ - ${WRKSRC}/src/Cedar/Client.h \ - ${WRKSRC}/src/Cedar/Nat.h \ - ${WRKSRC}/src/Cedar/Server.c \ - ${WRKSRC}/src/Mayaqua/Cfg.c \ - ${WRKSRC}/src/Mayaqua/Cfg.h \ - ${WRKSRC}/src/Mayaqua/Table.h - - ${REINPLACE_CMD} \ - -e "s|abort_error_log\.txt|${SE_LOGDIR}/abort_error_log.txt|" \ - ${WRKSRC}/src/Mayaqua/Kernel.c - - ${REINPLACE_CMD} \ -e "s|%%SE_DBDIR%%|${SE_DBDIR}|g" \ - ${WRKSRC}/src/Cedar/Protocol.c \ - ${WRKSRC}/src/Mayaqua/Unix.c \ - ${WRKSRC}/src/Mayaqua/Network.c + -e "s|%%SE_LOGDIR%%|${SE_LOGDIR}|g" \ + -e "s|%%SE_PIDDIR%%|${SE_PIDDIR}|g" \ + ${WRKSRC}/src/Mayaqua/FileIO.c # skip configure at all and copy the corresponding Makefile in place .if ${ARCH} != "amd64" @${CP} ${WRKSRC}/src/makefiles/freebsd_32bit.mak ${WRKSRC}/Makefile .else @${CP} ${WRKSRC}/src/makefiles/freebsd_64bit.mak ${WRKSRC}/Makefile .endif # pull in user specific CFLAGS and LDFLAGS @${REINPLACE_CMD} -e "s|OPTIONS_COMPILE_RELEASE=|OPTIONS_COMPILE_RELEASE=${CFLAGS} |g" ${WRKSRC}/Makefile @${REINPLACE_CMD} -e "s|OPTIONS_LINK_RELEASE=|OPTIONS_LINK_RELEASE=${LDFLAGS} |g" ${WRKSRC}/Makefile # manually install to ${PREFIX}/libexec/softether, then the final install will copy scripts # into ${PREFIX}/sbin do-install: ${MKDIR} ${STAGEDIR}/${PREFIX}/libexec/softether ${INSTALL_SCRIPT} ${WRKSRC}/bin/vpnbridge/vpnbridge ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/vpnbridge ${INSTALL_SCRIPT} ${WRKSRC}/bin/vpnclient/vpnclient ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/vpnclient ${INSTALL_SCRIPT} ${WRKSRC}/bin/vpncmd/vpncmd ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/vpncmd ${INSTALL_SCRIPT} ${WRKSRC}/bin/vpnserver/vpnserver ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/vpnserver ${INSTALL_DATA} ${WRKSRC}/bin/vpnserver/hamcore.se2 ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/hamcore.se2 ${INSTALL_SCRIPT} ${WRKDIR}/vpncmd ${STAGEDIR}/${PREFIX}/sbin/vpncmd .for i in vpnbridge vpnclient vpncmd vpnserver @${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}/${i} .endfor - @${MKDIR} ${STAGEDIR}${DOCSDIR} - @${MKDIR} ${STAGEDIR}${SE_DBDIR} - @${MKDIR} ${STAGEDIR}${SE_LOGDIR} + @${MKDIR} \ + ${STAGEDIR}${DOCSDIR} \ + ${STAGEDIR}${SE_DBDIR} \ + ${STAGEDIR}${SE_LOGDIR} \ + ${STAGEDIR}${SE_PIDDIR} .for doc in ${PORTDOCS} ${INSTALL_DATA} ${WRKSRC}/${doc} ${STAGEDIR}${DOCSDIR} .endfor .include Index: head/security/softether/files/patch-piddir =================================================================== --- head/security/softether/files/patch-piddir (revision 512257) +++ head/security/softether/files/patch-piddir (nonexistent) @@ -1,29 +0,0 @@ ---- src/Mayaqua/Unix.c.orig 2019-02-28 08:10:54 UTC -+++ src/Mayaqua/Unix.c -@@ -927,7 +927,7 @@ void *UnixNewSingleInstance(char *instance_name) - GetExeDir(dir, sizeof(dir)); - - // File name generation -- Format(name, sizeof(name), "%s/.%s", dir, tmp); -+ Format(name, sizeof(name), "%%SE_DBDIR%%/.%s", tmp); - - fd = open(name, O_WRONLY); - if (fd == -1) -@@ -2385,7 +2385,7 @@ void UnixGenPidFileName(char *name, UINT size) - Hash(hash, exe_name, StrLen(exe_name), false); - BinToStr(tmp1, sizeof(tmp1), hash, sizeof(hash)); - -- Format(name, size, "%s/.pid_%s", dir, tmp1); -+ Format(name, size, "%%SE_DBDIR%%/.pid_%s", tmp1); - } - - // Delete the PID file -@@ -2430,7 +2430,7 @@ void UnixGenCtlFileName(char *name, UINT size) - Hash(hash, exe_name, StrLen(exe_name), false); - BinToStr(tmp1, sizeof(tmp1), hash, sizeof(hash)); - -- Format(name, size, "%s/.ctl_%s", dir, tmp1); -+ Format(name, size, "%%SE_DBDIR%%/.ctl_%s", tmp1); - } - - // Write the CTL file Property changes on: head/security/softether/files/patch-piddir ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/security/softether/files/patch-chain-certs-dir =================================================================== --- head/security/softether/files/patch-chain-certs-dir (revision 512257) +++ head/security/softether/files/patch-chain-certs-dir (nonexistent) @@ -1,31 +0,0 @@ ---- src/Cedar/Protocol.c.orig 2019-02-28 08:10:54 UTC -+++ src/Cedar/Protocol.c -@@ -164,7 +164,7 @@ bool TryGetRootCertChain(LIST *o, X *x, bool auto_save - wchar_t exedir[MAX_SIZE]; - - GetExeDirW(exedir, sizeof(exedir)); -- CombinePathW(dirname, sizeof(dirname), exedir, L"chain_certs"); -+ CombinePathW(dirname, sizeof(dirname), L"%%SE_DBDIR%%", L"chain_certs"); - MakeDirExW(dirname); - - if (auto_save) -@@ -471,7 +471,7 @@ void AddAllChainCertsToCertList(LIST *o) - - GetExeDirW(exedir, sizeof(exedir)); - -- CombinePathW(dirname, sizeof(dirname), exedir, L"chain_certs"); -+ CombinePathW(dirname, sizeof(dirname), L"%%SE_DBDIR%%", L"chain_certs"); - - MakeDirExW(dirname); - ---- src/Mayaqua/Network.c.orig 2019-02-28 08:10:54 UTC -+++ src/Mayaqua/Network.c -@@ -12821,7 +12821,7 @@ void AddChainSslCertOnDirectory(struct ssl_ctx_st *ctx - - GetExeDirW(exedir, sizeof(exedir)); - -- CombinePathW(dirname, sizeof(dirname), exedir, L"chain_certs"); -+ CombinePathW(dirname, sizeof(dirname), L"%%SE_DBDIR%%", L"chain_certs"); - - MakeDirExW(dirname); - Property changes on: head/security/softether/files/patch-chain-certs-dir ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/security/softether/files/patch-log-db-pid-dir =================================================================== --- head/security/softether/files/patch-log-db-pid-dir (nonexistent) +++ head/security/softether/files/patch-log-db-pid-dir (revision 512258) @@ -0,0 +1,413 @@ +--- src/Cedar/Admin.c.orig 2019-09-18 07:28:47 UTC ++++ src/Cedar/Admin.c +@@ -10329,7 +10329,7 @@ void SiReadLocalLogFile(SERVER *s, char *filepath, UIN + + Zero(t, sizeof(RPC_READ_LOG_FILE)); + +- GetExeDir(exe_dir, sizeof(exe_dir)); ++ GetLogDir(exe_dir, sizeof(exe_dir)); + Format(full_path, sizeof(full_path), "%s/%s", exe_dir, filepath); + + // Read file +--- src/Cedar/Cedar.h.orig 2019-09-18 07:28:47 UTC ++++ src/Cedar/Cedar.h +@@ -501,22 +501,26 @@ + #define LOG_ENGINE_BUFFER_CACHE_SIZE_MAX (10 * 1024 * 1024) // Write cache size + + // Constant such as a file name +-#define SERVER_LOG_DIR_NAME "@server_log" ++#define SERVER_LOG_DIR "server" ++#define SERVER_LOG_DIR_NAME "@"SERVER_LOG_DIR + #define BRIDGE_LOG_DIR_NAME SERVER_LOG_DIR_NAME + #define SERVER_LOG_PERFIX "vpn" + +-#define HUB_SECURITY_LOG_DIR_NAME "@security_log" +-#define HUB_SECURITY_LOG_FILE_NAME "@security_log/%s" ++#define HUB_SECURITY_LOG_DIR "security" ++#define HUB_SECURITY_LOG_DIR_NAME "@"HUB_SECURITY_LOG_DIR ++#define HUB_SECURITY_LOG_FILE_NAME HUB_SECURITY_LOG_DIR_NAME"/%s" + #define HUB_SECURITY_LOG_PREFIX "sec" +-#define HUB_PACKET_LOG_DIR_NAME "@packet_log" +-#define HUB_PACKET_LOG_FILE_NAME "@packet_log/%s" ++#define HUB_PACKET_LOG_DIR "packet" ++#define HUB_PACKET_LOG_DIR_NAME "@"HUB_PACKET_LOG_DIR ++#define HUB_PACKET_LOG_FILE_NAME HUB_PACKET_LOG_DIR_NAME"/%s" + #define HUB_PACKET_LOG_PREFIX "pkt" + +-#define NAT_LOG_DIR_NAME "@secure_nat_log" +-#define NAT_LOG_FILE_NAME "@secure_nat_log/%s" ++#define NAT_LOG_DIR "secure_nat" ++#define NAT_LOG_DIR_NAME "@"NAT_LOG_DIR ++#define NAT_LOG_FILE_NAME NAT_LOG_DIR_NAME"/%s" + #define NAT_LOG_PREFIX "snat" + +-#define CLIENT_LOG_DIR_NAME "@client_log" ++#define CLIENT_LOG_DIR_NAME "@client" + #define CLIENT_LOG_PREFIX "client" + + // Packet log settings +@@ -582,7 +586,7 @@ + // Expiration date of random size cache + #define RAND_SIZE_CACHE_EXPIRE (24 * 60 * 60 * 1000) + // Management allowed IP address list file name +-#define ADMINIP_TXT "@adminip.txt" ++#define ADMINIP_TXT "$adminip.txt" + + #define NON_SSL_MIN_COUNT 60 + #define NON_SSL_ENTRY_EXPIRES (10 * 60 * 1000) +@@ -633,9 +637,10 @@ + ////////////////////////////////////////////////////////////////////// + + #define EL_ADMIN_PORT 22888 +-#define EL_CONFIG_FILENAME "@etherlogger.config" +-#define EL_PACKET_LOG_DIR_NAME "@etherlogger_log" +-#define EL_PACKET_LOG_FILE_NAME "@etherlogger_log/%s" ++#define EL_CONFIG_FILENAME "$etherlogger.config" ++#define EL_PACKET_LOG_DIR "etherlogger" ++#define EL_PACKET_LOG_DIR_NAME "@"EL_PACKET_LOG_DIR ++#define EL_PACKET_LOG_FILE_NAME EL_PACKET_LOG_DIR_NAME"/%s" + #define EL_PACKET_LOG_PREFIX "pkt" + #define EL_LICENSE_CHECK_SPAN (10 * 1000) + +--- src/Cedar/Client.h.orig 2019-09-18 07:28:47 UTC ++++ src/Cedar/Client.h +@@ -116,7 +116,7 @@ + + + // Constants +-#define CLIENT_CONFIG_FILE_NAME "@vpn_client.config" ++#define CLIENT_CONFIG_FILE_NAME "$vpn_client.config" + #define CLIENT_DEFAULT_KEEPALIVE_HOST "keepalive.softether.org" + #define CLIENT_DEFAULT_KEEPALIVE_PORT 80 + #define CLIENT_DEFAULT_KEEPALIVE_INTERVAL KEEP_INTERVAL_DEFAULT +@@ -136,7 +136,7 @@ + #define CLIENT_WIN32_EXE_FILENAME_X64 "vpnclient_x64.exe" + #define CLIENT_WIN32_EXE_FILENAME_IA64 "vpnclient_ia64.exe" + +-#define CLIENT_CUSTOM_INI_FILENAME "@custom.ini" ++#define CLIENT_CUSTOM_INI_FILENAME "$custom.ini" + + #define CLIENT_GLOBAL_PULSE_NAME "clientglobalpulse" + +--- src/Cedar/Logging.c.orig 2019-09-18 07:28:47 UTC ++++ src/Cedar/Logging.c +@@ -111,11 +111,11 @@ static char *delete_targets[] = + "backup.vpn_server.config", + "backup.vpn_gate_svc.config", + "backup.etherlogger.config", +- "packet_log", +- "etherlogger_log", ++ HUB_PACKET_LOG_DIR, ++ EL_PACKET_LOG_DIR, + "secure_nat_log", +- "security_log", +- "server_log", ++ HUB_SECURITY_LOG_DIR, ++ SERVER_LOG_DIR, + "bridge_log", + "packet_log_archive", + "azure_log", +@@ -529,7 +529,7 @@ ERASER *NewEraser(LOG *log, UINT64 min_size) + + e = ZeroMalloc(sizeof(ERASER)); + +- GetExeDir(dir, sizeof(dir)); ++ GetLogDir(dir, sizeof(dir)); + + e->Log = log; + e->MinFreeSpace = min_size; +--- src/Cedar/Nat.h.orig 2019-09-18 07:28:47 UTC ++++ src/Cedar/Nat.h +@@ -106,7 +106,7 @@ + #define NAT_H + + // Constants +-#define NAT_CONFIG_FILE_NAME "@vpn_router.config" // NAT configuration file ++#define NAT_CONFIG_FILE_NAME "$vpn_router.config" // NAT configuration file + #define DEFAULT_NAT_ADMIN_PORT 2828 // Default port number for management + #define NAT_ADMIN_PORT_LISTEN_INTERVAL 1000 // Interval for trying to open a port for management + #define NAT_FILE_SAVE_INTERVAL (30 * 1000) // Interval to save +--- src/Cedar/Protocol.c.orig 2019-09-18 07:28:47 UTC ++++ src/Cedar/Protocol.c +@@ -154,7 +154,7 @@ bool TryGetRootCertChain(LIST *o, X *x, bool auto_save + wchar_t dirname[MAX_SIZE]; + wchar_t exedir[MAX_SIZE]; + +- GetExeDirW(exedir, sizeof(exedir)); ++ GetDbDirW(exedir, sizeof(exedir)); + CombinePathW(dirname, sizeof(dirname), exedir, L"chain_certs"); + MakeDirExW(dirname); + +@@ -460,7 +460,7 @@ void AddAllChainCertsToCertList(LIST *o) + return; + } + +- GetExeDirW(exedir, sizeof(exedir)); ++ GetDbDirW(exedir, sizeof(exedir)); + + CombinePathW(dirname, sizeof(dirname), exedir, L"chain_certs"); + +--- src/Cedar/Server.c.orig 2019-09-18 07:28:47 UTC ++++ src/Cedar/Server.c +@@ -106,12 +106,12 @@ + + static SERVER *server = NULL; + static LOCK *server_lock = NULL; +-char *SERVER_CONFIG_FILE_NAME = "@vpn_server.config"; +-char *SERVER_CONFIG_FILE_NAME_IN_CLIENT = "@vpn_gate_svc.config"; +-char *SERVER_CONFIG_FILE_NAME_IN_CLIENT_RELAY = "@vpn_gate_relay.config"; +-char *BRIDGE_CONFIG_FILE_NAME = "@vpn_bridge.config"; +-char *SERVER_CONFIG_TEMPLATE_NAME = "@vpn_server_template.config"; +-char *BRIDGE_CONFIG_TEMPLATE_NAME = "@vpn_server_template.config"; ++char *SERVER_CONFIG_FILE_NAME = "$vpn_server.config"; ++char *SERVER_CONFIG_FILE_NAME_IN_CLIENT = "$vpn_gate_svc.config"; ++char *SERVER_CONFIG_FILE_NAME_IN_CLIENT_RELAY = "$vpn_gate_relay.config"; ++char *BRIDGE_CONFIG_FILE_NAME = "$vpn_bridge.config"; ++char *SERVER_CONFIG_TEMPLATE_NAME = "$vpn_server_template.config"; ++char *BRIDGE_CONFIG_TEMPLATE_NAME = "$vpn_server_template.config"; + + static bool server_reset_setting = false; + +@@ -1105,16 +1105,16 @@ LIST *EnumLogFile(char *hubname) + hubname = NULL; + } + +- GetExeDir(exe_dir, sizeof(exe_dir)); ++ GetLogDir(exe_dir, sizeof(exe_dir)); + + // Enumerate in the server_log + if (hubname == NULL) + { +- EnumLogFileDir(o, "server_log"); ++ EnumLogFileDir(o, SERVER_LOG_DIR); + } + + // Enumerate in the packet_log +- Format(tmp, sizeof(tmp), "%s/packet_log", exe_dir); ++ Format(tmp, sizeof(tmp), "%s/"HUB_PACKET_LOG_DIR, exe_dir); + dir = EnumDir(tmp); + if (dir != NULL) + { +@@ -1129,7 +1129,7 @@ LIST *EnumLogFile(char *hubname) + + if (hubname == NULL || StrCmpi(hubname, e->FileName) == 0) + { +- Format(dir_name, sizeof(dir_name), "packet_log/%s", e->FileName); ++ Format(dir_name, sizeof(dir_name), HUB_PACKET_LOG_DIR"/%s", e->FileName); + EnumLogFileDir(o, dir_name); + } + } +@@ -1139,7 +1139,7 @@ LIST *EnumLogFile(char *hubname) + } + + // Enumerate in the security_log +- Format(tmp, sizeof(tmp), "%s/security_log", exe_dir); ++ Format(tmp, sizeof(tmp), "%s/"HUB_SECURITY_LOG_DIR, exe_dir); + dir = EnumDir(tmp); + if (dir != NULL) + { +@@ -1154,7 +1154,7 @@ LIST *EnumLogFile(char *hubname) + + if (hubname == NULL || StrCmpi(hubname, e->FileName) == 0) + { +- Format(dir_name, sizeof(dir_name), "security_log/%s", e->FileName); ++ Format(dir_name, sizeof(dir_name), HUB_SECURITY_LOG_DIR"/%s", e->FileName); + EnumLogFileDir(o, dir_name); + } + } +@@ -1179,7 +1179,7 @@ void EnumLogFileDir(LIST *o, char *dirname) + return; + } + +- GetExeDir(exe_dir, sizeof(exe_dir)); ++ GetLogDir(exe_dir, sizeof(exe_dir)); + Format(dir_full_path, sizeof(dir_full_path), "%s/%s", exe_dir, dirname); + + dir = EnumDir(dir_full_path); +--- src/Cedar/Server.h.orig 2019-09-18 07:28:47 UTC ++++ src/Cedar/Server.h +@@ -143,7 +143,7 @@ extern char *SERVER_CONFIG_FILE_NAME; + + #define MAX_PUBLIC_PORT_NUM 128 + +-#define MEMBER_SELECTOR_TXT_FILENAME "@member_selector.config" ++#define MEMBER_SELECTOR_TXT_FILENAME "$member_selector.config" + #define MEMBER_SELECTOR_CONNECT_TIMEOUT 2000 + #define MEMBER_SELECTOR_DATA_TIMEOUT 5000 + +--- src/Mayaqua/Cfg.c.orig 2019-09-18 07:28:47 UTC ++++ src/Mayaqua/Cfg.c +@@ -130,12 +130,12 @@ void BackupCfgWEx(CFG_RW *rw, FOLDER *f, wchar_t *orig + } + + // Determine the directory name +- UniFormat(dirname, sizeof(dirname), L"@backup.%s", original[0] == L'@' ? original + 1 : original); ++ UniFormat(dirname, sizeof(dirname), L"$backup.%s", original[0] == L'$' ? original + 1 : original); + + // Determine the file name + LocalTime(&st); + UniFormat(datestr, sizeof(datestr), L"%04u%02u%02u%02u_%s", +- st.wYear, st.wMonth, st.wDay, st.wHour, original[0] == L'@' ? original + 1 : original); ++ st.wYear, st.wMonth, st.wDay, st.wHour, original[0] == L'$' ? original + 1 : original); + + if (revision_number == INFINITE) + { +@@ -144,7 +144,7 @@ void BackupCfgWEx(CFG_RW *rw, FOLDER *f, wchar_t *orig + else + { + UniFormat(filename, sizeof(filename), L"%08u_%s", +- revision_number, original[0] == L'@' ? original + 1 : original); ++ revision_number, original[0] == L'$' ? original + 1 : original); + } + + // Don't save if the date and time has not been changed +--- src/Mayaqua/Cfg.h.orig 2019-09-18 07:28:47 UTC ++++ src/Mayaqua/Cfg.h +@@ -108,7 +108,7 @@ + // Macro + //#define CHECK_CFG_NAME_EXISTS // Check duplication of the existing name + +-#define SAVE_BINARY_FILE_NAME_SWITCH L"@save_binary" ++#define SAVE_BINARY_FILE_NAME_SWITCH L"$save_binary" + + // Constants + #define TAG_DECLARE "declare" +--- src/Mayaqua/FileIO.c.orig 2019-09-18 07:28:47 UTC ++++ src/Mayaqua/FileIO.c +@@ -1454,6 +1454,36 @@ void GetExeNameW(wchar_t *name, UINT size) + UniStrCpy(name, size, exe_file_name_w); + } + ++void GetLogDir(char *name, UINT size) ++{ ++ Format(name, size, "%%SE_LOGDIR%%"); ++} ++ ++void GetLogDirW(wchar_t *name, UINT size) ++{ ++ UniFormat(name, size, L"%%SE_LOGDIR%%"); ++} ++ ++void GetDbDir(char *name, UINT size) ++{ ++ Format(name, size, "%%SE_DBDIR%%"); ++} ++ ++void GetDbDirW(wchar_t *name, UINT size) ++{ ++ UniFormat(name, size, L"%%SE_DBDIR%%"); ++} ++ ++void GetPidDir(char *name, UINT size) ++{ ++ Format(name, size, "%%SE_PIDDIR%%"); ++} ++ ++void GetPidDirW(wchar_t *name, UINT size) ++{ ++ UniFormat(name, size, L"%%SE_PIDDIR%%"); ++} ++ + // Initialization of the aquisition of the EXE file name + void InitGetExeName(char *arg) + { +@@ -2376,14 +2406,20 @@ void InnerFilePathW(wchar_t *dst, UINT size, wchar_t * + return; + } + +- if (src[0] != L'@') ++ if (src[0] != L'@' && src[0] != L'$') + { + NormalizePathW(dst, size, src); + } ++ else if (src[0] == L'$') ++ { ++ wchar_t dir[MAX_SIZE]; ++ GetDbDirW(dir, sizeof(dir)); ++ ConbinePathW(dst, size, dir, &src[1]); ++ } + else + { + wchar_t dir[MAX_SIZE]; +- GetExeDirW(dir, sizeof(dir)); ++ GetLogDirW(dir, sizeof(dir)); + ConbinePathW(dst, size, dir, &src[1]); + } + } +--- src/Mayaqua/FileIO.h.orig 2019-09-18 07:28:47 UTC ++++ src/Mayaqua/FileIO.h +@@ -340,6 +340,12 @@ void GetExeName(char *name, UINT size); + void GetExeNameW(wchar_t *name, UINT size); + void GetExeDir(char *name, UINT size); + void GetExeDirW(wchar_t *name, UINT size); ++void GetLogDir(char *name, UINT size); ++void GetLogDirW(wchar_t *name, UINT size); ++void GetDbDir(char *name, UINT size); ++void GetDbDirW(wchar_t *name, UINT size); ++void GetPidDir(char *name, UINT size); ++void GetPidDirW(wchar_t *name, UINT size); + void BuildHamcore(char *dst_filename, char *src_dir, bool unix_only); + int CompareHamcore(void *p1, void *p2); + void InitHamcore(); +--- src/Mayaqua/Network.c.orig 2019-09-18 07:28:47 UTC ++++ src/Mayaqua/Network.c +@@ -12810,7 +12810,7 @@ void AddChainSslCertOnDirectory(struct ssl_ctx_st *ctx + + o = NewListFast(NULL); + +- GetExeDirW(exedir, sizeof(exedir)); ++ GetDbDirW(exedir, sizeof(exedir)); + + CombinePathW(dirname, sizeof(dirname), exedir, L"chain_certs"); + +--- src/Mayaqua/Network.h.orig 2019-09-18 07:28:47 UTC ++++ src/Mayaqua/Network.h +@@ -150,7 +150,7 @@ struct DYN_VALUE + #define SSL_LOGGING_DIRNAME "@ssl_log" + + // Private IP list file +-#define PRIVATE_IP_TXT_FILENAME "@private_ip.txt" ++#define PRIVATE_IP_TXT_FILENAME "$private_ip.txt" + + // Start range of the random UDP port + #define RAND_UDP_PORT_START 5000 +--- src/Mayaqua/Table.h.orig 2019-09-18 07:28:47 UTC ++++ src/Mayaqua/Table.h +@@ -110,7 +110,7 @@ + #define LANGLIST_FILENAME "|languages.txt" + #define LANGLIST_FILENAME_WINE "|languages_wine.txt" + +-#define LANG_CONFIG_FILENAME L"@lang.config" ++#define LANG_CONFIG_FILENAME L"$lang.config" + #define LANG_CONFIG_TEMPLETE "|lang.config" + + // Language constant +--- src/Mayaqua/Unix.c.orig 2019-09-18 07:28:47 UTC ++++ src/Mayaqua/Unix.c +@@ -915,7 +915,7 @@ void *UnixNewSingleInstance(char *instance_name) + StrCpy(tmp, sizeof(tmp), instance_name); + } + +- GetExeDir(dir, sizeof(dir)); ++ GetPidDir(dir, sizeof(dir)); + + // File name generation + Format(name, sizeof(name), "%s/.%s", dir, tmp); +@@ -2367,7 +2367,7 @@ void UnixGenPidFileName(char *name, UINT size) + return; + } + +- GetExeDir(dir, sizeof(dir)); ++ GetPidDir(dir, sizeof(dir)); + + GetExeName(exe_name, sizeof(exe_name)); + StrCat(exe_name, sizeof(exe_name), ":pid_hash"); +@@ -2412,7 +2412,7 @@ void UnixGenCtlFileName(char *name, UINT size) + return; + } + +- GetExeDir(dir, sizeof(dir)); ++ GetPidDir(dir, sizeof(dir)); + + GetExeName(exe_name, sizeof(exe_name)); + StrCat(exe_name, sizeof(exe_name), ":pid_hash"); Property changes on: head/security/softether/files/patch-log-db-pid-dir ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/security/softether/files/pkg-message.in =================================================================== --- head/security/softether/files/pkg-message.in (revision 512257) +++ head/security/softether/files/pkg-message.in (revision 512258) @@ -1,25 +1,26 @@ [ { type: install message: <