diff --git security/softether-devel/Makefile security/softether-devel/Makefile index 77dddef..523f5d9 100644 --- security/softether-devel/Makefile +++ security/softether-devel/Makefile @@ -13,7 +13,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE CONFLICTS_INSTALL= softether -USES= dos2unix gmake iconv localbase readline ssl +USES= dos2unix gmake iconv localbase ncurses readline ssl DOS2UNIX_FILES= src/Mayaqua/Network.c USE_GITHUB= yes GH_ACCOUNT= SoftEtherVPN @@ -25,7 +25,17 @@ USE_RC_SUBR= vpnserver vpnclient vpnbridge PORTDOCS= AUTHORS.TXT BUILD_UNIX.TXT ChangeLog README THIRD_PARTY.TXT \ WARNING.TXT -OPTIONS_DEFINE= DOCS +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 post-patch: ${INSTALL_DATA} ${WRKSRC}/src/makefiles/freebsd_32bit.mak \ diff --git security/softether-devel/files/extra-patch-unrestrict-enterprise-functions security/softether-devel/files/extra-patch-unrestrict-enterprise-functions new file mode 100644 index 0000000..8986d63 --- /dev/null +++ security/softether-devel/files/extra-patch-unrestrict-enterprise-functions @@ -0,0 +1,29 @@ +diff --git src/Cedar/Server.c src/Cedar/Server.c +index c87ceba6..efe161ca 100644 +--- src/Cedar/Server.c ++++ src/Cedar/Server.c +@@ -10854,23 +10854,7 @@ bool SiCheckCurrentRegion(CEDAR *c, char *r) + // + bool SiIsEnterpriseFunctionsRestrictedOnOpenSource(CEDAR *c) + { +- char region[128]; +- bool ret = false; +- // Validate arguments +- if (c == NULL) +- { +- return false; +- } +- +- +- SiGetCurrentRegion(c, region, sizeof(region)); +- +- if (StrCmpi(region, "JP") == 0 || StrCmpi(region, "CN") == 0) +- { +- ret = true; +- } +- +- return ret; ++ return false; + } + + // Update the current region