Merge branch 'master' of github.com:zerotier/ZeroTierOne

This commit is contained in:
Adam Ierymenko 2022-03-07 13:58:51 -05:00
commit b42c998095
No known key found for this signature in database
GPG Key ID: C8877CF2D7A5D7F3
4 changed files with 16 additions and 1 deletions

View File

@ -117,6 +117,9 @@ jobject createVirtualNetworkStatus(JNIEnv *env, ZT_VirtualNetworkStatus status)
case ZT_NETWORK_STATUS_OK:
fieldName = "NETWORK_STATUS_OK";
break;
case ZT_NETWORK_STATUS_AUTHENTICATION_REQUIRED:
fieldName = "NETWORK_STATUS_AUTHENTICATION_REQUIRED";
break;
case ZT_NETWORK_STATUS_ACCESS_DENIED:
fieldName = "NETWORK_STATUS_ACCESS_DENIED";
break;

View File

@ -37,6 +37,11 @@ public enum VirtualNetworkStatus {
*/
NETWORK_STATUS_OK,
/**
* Netconf master said SSO auth required.
*/
NETWORK_STATUS_AUTHENTICATION_REQUIRED,
/**
* Netconf master told us 'nope'
*/

View File

@ -13,6 +13,8 @@
#include "../node/Constants.hpp"
#include <cerrno>
//#define ZT_NETLINK_TRACE
#ifdef __LINUX__

View File

@ -53,6 +53,8 @@ std::string InstallService(PSTR pszServiceName,
char szPathTmp[MAX_PATH],szPath[MAX_PATH];
SC_HANDLE schSCManager = NULL;
SC_HANDLE schService = NULL;
SERVICE_DESCRIPTION sd;
LPTSTR szDesc = TEXT("ZeroTier network virtualization service.");
if (GetModuleFileName(NULL, szPathTmp, ARRAYSIZE(szPath)) == 0)
{
@ -77,7 +79,7 @@ std::string InstallService(PSTR pszServiceName,
schSCManager, // SCManager database
pszServiceName, // Name of service
pszDisplayName, // Name to display
SERVICE_QUERY_STATUS, // Desired access
SERVICE_ALL_ACCESS, // Desired access
SERVICE_WIN32_OWN_PROCESS, // Service type
dwStartType, // Service start type
SERVICE_ERROR_NORMAL, // Error control type
@ -94,6 +96,9 @@ std::string InstallService(PSTR pszServiceName,
goto Cleanup;
}
// Setup service description
sd.lpDescription = szDesc;
ChangeServiceConfig2(schService, SERVICE_CONFIG_DESCRIPTION, &sd);
Cleanup:
// Centralized cleanup for all allocated resources.
if (schSCManager)