diff --git a/java/jni/ZT_jniutils.cpp b/java/jni/ZT_jniutils.cpp index b66249577..bcbd31916 100644 --- a/java/jni/ZT_jniutils.cpp +++ b/java/jni/ZT_jniutils.cpp @@ -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; diff --git a/java/src/com/zerotier/sdk/VirtualNetworkStatus.java b/java/src/com/zerotier/sdk/VirtualNetworkStatus.java index 2d00561a1..68e01bd61 100644 --- a/java/src/com/zerotier/sdk/VirtualNetworkStatus.java +++ b/java/src/com/zerotier/sdk/VirtualNetworkStatus.java @@ -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' */ diff --git a/osdep/LinuxNetLink.cpp b/osdep/LinuxNetLink.cpp index 6f07963eb..348aa96e3 100644 --- a/osdep/LinuxNetLink.cpp +++ b/osdep/LinuxNetLink.cpp @@ -13,6 +13,8 @@ #include "../node/Constants.hpp" +#include + //#define ZT_NETLINK_TRACE #ifdef __LINUX__ diff --git a/windows/ZeroTierOne/ServiceInstaller.cpp b/windows/ZeroTierOne/ServiceInstaller.cpp index d302d9f62..05a78002e 100644 --- a/windows/ZeroTierOne/ServiceInstaller.cpp +++ b/windows/ZeroTierOne/ServiceInstaller.cpp @@ -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)