diff --git security/softether/Makefile security/softether/Makefile index 1fb8255..1af1cca 100644 --- security/softether/Makefile +++ security/softether/Makefile @@ -35,7 +35,17 @@ DOS2UNIX_FILES= AUTHORS.TXT ChangeLog LICENSE README THIRD_PARTY.TXT \ src/Mayaqua/Table.h \ src/Mayaqua/Unix.c -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 ONLY_FOR_ARCHS= i386 amd64 diff --git security/softether/files/extra-patch-unrestrict-enterprise-functions security/softether/files/extra-patch-unrestrict-enterprise-functions new file mode 100644 index 0000000..90043e5 --- /dev/null +++ security/softether/files/extra-patch-unrestrict-enterprise-functions @@ -0,0 +1,29 @@ +diff --git src/Cedar/Server.c src/Cedar/Server.c +index 2a100ec..ee58f37 100644 +--- src/Cedar/Server.c ++++ src/Cedar/Server.c +@@ -10859,23 +10859,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