Explorar o código

query fix & controller build fix

Grant Limberg %!s(int64=3) %!d(string=hai) anos
pai
achega
d15516f0ef

+ 1 - 1
controller/PostgreSQL.cpp

@@ -392,7 +392,7 @@ AuthInfo PostgreSQL::getSSOAuthInfo(const nlohmann::json &member, const std::str
 				exit(6);
 				exit(6);
 			}
 			}
 
 
-			r = w.exec_params("SELECT org.client_id, org.authorization_endpoint, org.sso_version "
+			r = w.exec_params("SELECT org.client_id, org.authorization_endpoint, org.sso_impl_version "
 				"FROM ztc_network AS nw, ztc_org AS org "
 				"FROM ztc_network AS nw, ztc_org AS org "
 				"WHERE nw.id = $1 AND nw.sso_enabled = true AND org.owner_id = nw.owner_id", networkId);
 				"WHERE nw.id = $1 AND nw.sso_enabled = true AND org.owner_id = nw.owner_id", networkId);
 		
 		

+ 1 - 1
ext/central-controller-docker/Dockerfile.run_base

@@ -2,4 +2,4 @@ FROM centos:8
 RUN yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
 RUN yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
 RUN dnf -qy module disable postgresql 
 RUN dnf -qy module disable postgresql 
 RUN yum -y install epel-release && yum -y update && yum clean all
 RUN yum -y install epel-release && yum -y update && yum clean all
-RUN yum install -y jemalloc jemalloc-devel postgresql10 libpqxx && yum clean all
+RUN yum install -y jemalloc jemalloc-devel postgresql10 libpqxx libpqxx-devel && yum clean all

+ 3 - 1
service/OneService.cpp

@@ -251,7 +251,9 @@ public:
 		const char* nwid = Utils::hex(nwc->nwid, nwbuf);
 		const char* nwid = Utils::hex(nwc->nwid, nwbuf);
 		fprintf(stderr, "NetworkState::setConfig(%s)\n", nwid);
 		fprintf(stderr, "NetworkState::setConfig(%s)\n", nwid);
 		memcpy(&_config, nwc, sizeof(ZT_VirtualNetworkConfig));
 		memcpy(&_config, nwc, sizeof(ZT_VirtualNetworkConfig));
-
+		fprintf(stderr, "ssoEnabled: %s, ssoVersion: %d\n", 
+			_config.ssoEnabled ? "true" : "false", _config.ssoVersion);
+			
 		if (_config.ssoEnabled && _config.ssoVersion == 1) {
 		if (_config.ssoEnabled && _config.ssoVersion == 1) {
 			fprintf(stderr, "ssoEnabled for %s\n", nwid);
 			fprintf(stderr, "ssoEnabled for %s\n", nwid);
 			if (_idc == nullptr)
 			if (_idc == nullptr)