Skip to content

Commit

Permalink
Merge pull request #177 from Icinga:fix/allow_domain_accounts_for_wmi…
Browse files Browse the repository at this point in the history
…_permissions

Fix: Allow usage for domain accounts for wmi permissions without being locally known
  • Loading branch information
LordHepipud authored Nov 30, 2020
2 parents 0618d30 + 17e320d commit 18f5ad8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
1 change: 1 addition & 0 deletions doc/31-Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
* [#165](https://github.com/Icinga/icinga-powershell-framework/pull/165) Fixes fetching for Icinga Agent certificate for REST-Api daemon on upper/lower case hostname mismatch
* [#166](https://github.com/Icinga/icinga-powershell-framework/pull/166) Fixes fetching of Icinga Agent MSI packages by correctly comparing versions to ensure we always use the latest version and fixes `release` usage for local/network drive sources
* [#167](https://github.com/Icinga/icinga-powershell-framework/pull/167) Fixes error while writing EventLog entries with too large message size
* [#177](https://github.com/Icinga/icinga-powershell-framework/pull/177) Fixes Wmi permissions to allow domain accounts while not being locally known on the system

## 1.2.0 (2020-08-28)

Expand Down
7 changes: 0 additions & 7 deletions lib/wmi/Get-IcingaWmiSecurityData.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@ function Get-IcingaWmiSecurityData()
$UserSID = Get-IcingaUserSID -User $User;
$WmiAcl = $WmiSecurityData.Descriptor;

$WmiAccount = Get-IcingaWindowsInformation -ClassName Win32_Account -Filter ([string]::Format("Domain='{0}' and Name='{1}'", $UserData.Domain, $UserData.User));

if ($null -eq $WmiAccount) {
Write-IcingaConsoleError 'The specified user could not be found on the system: "{0}\{1}"' -Objects $UserData.Domain, $UserData.User;
return $null;
}

if ([string]::IsNullOrEmpty($UserSID)) {
Write-IcingaConsoleError 'Unable to load the SID for user "{0}"' -Objects $User;
return $null;
Expand Down

0 comments on commit 18f5ad8

Please sign in to comment.