...
if (nas)
throw Exception("Couldn't get domain join info: NetGetJoinInformation: " +
GetErrorMessage(nas));
if (njs == NetSetupDomainName) {
globals::domainName = joinInfo;
NetApiBufferFree(joinInfo);
} else if (njs == NetSetupWorkgroupName)
// don't care about workgroups!
NetApiBufferFree(joinInfo);
// stop here if not joined to a domain.
if (njs != NetSetupDomainName) //LINE 203
return;
// Get domain SID
globals::domainSID = GetSIDForTrusteeNameW(globals::domainName);
if (!globals::domainSID)
// can this actually happen?
throw Exception("Couldn't find SID for domain name: " +
UnicodeToAsciiString(globals::domainName));
// disable rollback, since we finished successfully
errorRollback.success();
...
FOR LINE 203
maybe, it should be:
if (njs != NetSetupDomainName){ //LINE 203
errorRollback.success();
return;
}
Thought not joined in domain, but it should return with success, else, the "uninit" function should be called, and the compterSID should be released and set to NULL *
Fixed in r1803