From 4d0e0b7b849343069b4bd4a12232e3d0e99bdd1b Mon Sep 17 00:00:00 2001 From: Aaron Jensen Date: Mon, 2 Dec 2024 18:42:24 -0800 Subject: [PATCH 1/3] Change to the layout of internal nested dependencies. --- .gitignore | 3 +-- CHANGELOG.md | 6 ++++++ Carbon.Security/Carbon.Security.psd1 | 2 +- Carbon.Security/Carbon.Security.psm1 | 2 +- Carbon.Security/prism.lock.json | 2 +- Tests/Grant-CPermission.Tests.ps1 | 2 +- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 50853d7..377b134 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ /.output -/Carbon.Security/Carbon.* -/Carbon.Security/PureInvoke /.vscode +/Carbon.Security/Modules/ /Carbon.Security/CHANGELOG.md /Carbon.Security/LICENSE.txt /Carbon.Security/NOTICE.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 9421e43..7214e20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,13 @@ # Carbon.Security Changelog +## 1.0.3 + +Change to the layout of internal nested dependencies. + ## 1.0.2 +> Released 19 Nov 2024 + Decreasing depth of nested dependencies. Missed one. ## 1.0.1 diff --git a/Carbon.Security/Carbon.Security.psd1 b/Carbon.Security/Carbon.Security.psd1 index f35bfb9..4096965 100644 --- a/Carbon.Security/Carbon.Security.psd1 +++ b/Carbon.Security/Carbon.Security.psd1 @@ -18,7 +18,7 @@ RootModule = 'Carbon.Security.psm1' # Version number of this module. - ModuleVersion = '1.0.2' + ModuleVersion = '1.0.3' # ID used to uniquely identify this module GUID = 'd957c669-307c-409a-bb28-83fb666b5c6f' diff --git a/Carbon.Security/Carbon.Security.psm1 b/Carbon.Security/Carbon.Security.psm1 index b1cd4e1..bf677b3 100644 --- a/Carbon.Security/Carbon.Security.psm1 +++ b/Carbon.Security/Carbon.Security.psm1 @@ -25,7 +25,7 @@ Set-StrictMode -Version 'Latest' # module in development has its functions in the Functions directory. $script:moduleRoot = $PSScriptRoot -$psModulesDirPath = $script:moduleRoot +$psModulesDirPath = Join-Path -Path $script:moduleRoot -ChildPath 'Modules' -Resolve Import-Module -Name (Join-Path -Path $psModulesDirPath -ChildPath 'Carbon.Core') ` -Function @('Get-CPathProvider') ` -Verbose:$false diff --git a/Carbon.Security/prism.lock.json b/Carbon.Security/prism.lock.json index d5bd514..4d34b1f 100644 --- a/Carbon.Security/prism.lock.json +++ b/Carbon.Security/prism.lock.json @@ -2,7 +2,7 @@ "PSModules": [ { "name": "Carbon.Accounts", - "version": "2.0.1", + "version": "2.0.2", "repositorySourceLocation": "https://www.powershellgallery.com/api/v2" }, { diff --git a/Tests/Grant-CPermission.Tests.ps1 b/Tests/Grant-CPermission.Tests.ps1 index c406f20..d11771a 100644 --- a/Tests/Grant-CPermission.Tests.ps1 +++ b/Tests/Grant-CPermission.Tests.ps1 @@ -9,7 +9,7 @@ BeforeAll { & (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-Test.ps1' -Resolve) - $psModulesSharedPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.Security' -Resolve + $psModulesSharedPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon.Security\Modules' -Resolve Import-Module -Name (Join-Path -Path $psModulesSharedPath -ChildPath 'Carbon.Core' -Resolve) ` -Function ('Get-CPathProvider') ` -Global ` From 4867ee1f3e49d264becf13df54901f512438f5e1 Mon Sep 17 00:00:00 2001 From: Aaron Jensen Date: Tue, 3 Dec 2024 09:31:25 -0800 Subject: [PATCH 2/3] Improving documentation. Fixes issue #6. --- Carbon.Security/Functions/Get-CPrivilege.ps1 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Carbon.Security/Functions/Get-CPrivilege.ps1 b/Carbon.Security/Functions/Get-CPrivilege.ps1 index 6635faf..7fbe94a 100644 --- a/Carbon.Security/Functions/Get-CPrivilege.ps1 +++ b/Carbon.Security/Functions/Get-CPrivilege.ps1 @@ -7,7 +7,17 @@ function Get-CPrivilege .DESCRIPTION The `Get-CPrivilege` function gets an account's rights and privileges. These privileges are usually managed by Group - Policy and control the system operations and types of logons an account can perform. + Policy and control the system operations and types of logons an account can perform. Only privileges directly + granted to the account are returned. If an account is granted a privilege through a group, those privileges are + *not* returned. + + [Windows privileges can be in one of three states:](https://superuser.com/a/1254265/45274) + + * not granted + * granted and enabled + * granted and disabled + + The `Get-CPrivilege` function returns granted privileges, regardless if they are enabled or disabled. .OUTPUTS System.String From 69e8a9b6f0096085e732f10d03c2b308ccddc46a Mon Sep 17 00:00:00 2001 From: Aaron Jensen Date: Tue, 3 Dec 2024 10:58:53 -0800 Subject: [PATCH 3/3] Build failing. --- whiskey.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/whiskey.yml b/whiskey.yml index 638bd6b..9a2ff85 100644 --- a/whiskey.yml +++ b/whiskey.yml @@ -2,12 +2,11 @@ Build: - PowerShell: ExceptDuring: Clean - ScriptBlock: prism install | Format-Table -Auto + ScriptBlock: | + prism install | Format-Table -Auto + prism install -Path .\Carbon.Security | Format-Table -Auto -- PowerShell: - ExceptDuring: Clean - WorkingDirectory: Carbon.Security - ScriptBlock: prism install | Format-Table -Auto + Get-Module | Format-Table - Version: Path: Carbon.Security\Carbon.Security.psd1