1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-02-12 11:01:52 +00:00

Intel AMT manager improvements.

This commit is contained in:
Ylian Saint-Hilaire 2020-10-21 23:54:56 -07:00
parent 2995ea9eec
commit e1cd7dec71

View file

@ -267,6 +267,9 @@ module.exports.CreateAmtManager = function (parent) {
// Check if the status of Intel AMT sent by the agents matched what we have in the database // Check if the status of Intel AMT sent by the agents matched what we have in the database
if ((dev.connType == 2) && (dev.mpsConnection != null) && (dev.mpsConnection.tag != null) && (dev.mpsConnection.tag.meiState != null)) { if ((dev.connType == 2) && (dev.mpsConnection != null) && (dev.mpsConnection.tag != null) && (dev.mpsConnection.tag.meiState != null)) {
dev.aquired = {}; dev.aquired = {};
if ((typeof dev.mpsConnection.tag.meiState.OsHostname == 'string') && (typeof dev.mpsConnection.tag.meiState.OsDnsSuffix == 'string')) {
dev.host = dev.aquired.host = dev.mpsConnection.tag.meiState.OsHostname + '.' + dev.mpsConnection.tag.meiState.OsDnsSuffix;
}
if (typeof dev.mpsConnection.tag.meiState['ProvisioningState'] == 'number') { if (typeof dev.mpsConnection.tag.meiState['ProvisioningState'] == 'number') {
dev.intelamt.state = dev.aquired.state = dev.mpsConnection.tag.meiState['ProvisioningState']; dev.intelamt.state = dev.aquired.state = dev.mpsConnection.tag.meiState['ProvisioningState'];
} }
@ -847,6 +850,10 @@ module.exports.CreateAmtManager = function (parent) {
}, responses.Body['KeyPair']['ReferenceParameters']['SelectorSet']['Selector']['Value']); }, responses.Body['KeyPair']['ReferenceParameters']['SelectorSet']['Selector']['Value']);
}); });
} else { } else {
// Update device in the database
dev.intelamt.tls = dev.aquired.tls = 1;
UpdateDevice(dev);
// TLS is setup // TLS is setup
devTaskCompleted(dev); devTaskCompleted(dev);
} }
@ -866,8 +873,8 @@ module.exports.CreateAmtManager = function (parent) {
dev.consoleMsg("Enabled TLS, holding 5 seconds..."); dev.consoleMsg("Enabled TLS, holding 5 seconds...");
// Update device in the database // Update device in the database
dev.aquired.tls = 1; dev.intelamt.tls = dev.aquired.tls = 1;
dev.aquired.hash = dev.aquired.xhash; dev.intelamt.hash = dev.aquired.hash = dev.aquired.xhash;
delete dev.aquired.xhash; delete dev.aquired.xhash;
UpdateDevice(dev); UpdateDevice(dev);