From 1597eaaefbc748702810cf0c6e3e9d05a72ec4a8 Mon Sep 17 00:00:00 2001 From: Andi Bellstedt Date: Sat, 11 Mar 2023 07:47:52 +0100 Subject: [PATCH 1/3] Bugfix: fix int32 overflow on large ChannelConfig --- .../bin/WinEventLogCustomization.dll | Bin 4608 -> 4608 bytes .../bin/WinEventLogCustomization.pdb | Bin 1588 -> 1588 bytes .../WinEventLogCustomization/WELC.cs | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) diff --git a/WinEventLogCustomization/bin/WinEventLogCustomization.dll b/WinEventLogCustomization/bin/WinEventLogCustomization.dll index 52192b9c0d2f098e467667ee97ef691cc10f5dbb..6a09cc6540aaf6946331bd4803b304aa67d21134 100644 GIT binary patch delta 110 zcmZorX;7Ka!D79s;@8F=4|V|-2M(v-%IU7naZC13{223d@)LG7My|=+92Z%poc#D? z@&k?lfe`s5CGW-G{ny_(yKhylpzCA@&NT{9!T$G9L7?gs=i6<1S~}Twx{a@wZsy_o G!VUmZ)G-SH delta 110 zcmZorX;7Ka!IB)9bYNqT2fM(W>tdZgO254(SLnZ=`$zxaIWDriXTQ69 z@&k?lfer<&0#)1d4r}kR)&1aY&z$VQxkdphxB(^zQq9w=bnv5+FW)q~FLO5YaD8D1 E00n|C1poj5 diff --git a/WinEventLogCustomization/bin/WinEventLogCustomization.pdb b/WinEventLogCustomization/bin/WinEventLogCustomization.pdb index 5ce0a45f243a88c4ec040e33a73a7391275066fb..f59c6d437036b4099cac9e0b000fc46a01c4d388 100644 GIT binary patch delta 78 zcmV-U0I~nH473c8d=yk4Vj@eU_fN0b&AzH_5k-{A@#L|PRskUPdvY0!@-2{QOeE6i kinnHXJ2iBbx7uI7=uE1At!n(U1_Gi112Ho>v#SG%0?() delta 78 zcmV-U0I~nH473c8d=!WvDsUw|&p@r-27dSrhiUHz-Mg`nRskSP1~In)=m<1X&cvX_ kdz*@zPLV=99wwoL>ZV4%8VH!P1_Gi1128i(v#SG%0t-bSbpQYW diff --git a/library/WinEventLogCustomization/WinEventLogCustomization/WELC.cs b/library/WinEventLogCustomization/WinEventLogCustomization/WELC.cs index eaf6c66..ee4eefd 100644 --- a/library/WinEventLogCustomization/WinEventLogCustomization/WELC.cs +++ b/library/WinEventLogCustomization/WinEventLogCustomization/WELC.cs @@ -53,7 +53,7 @@ public class ChannelConfig { /// /// /// - public System.Int32 MaxEventLogSize; + public System.Int64 MaxEventLogSize; } From 629240e256deabd92d2d9768e0c303b0a491c09b Mon Sep 17 00:00:00 2001 From: Andi Bellstedt Date: Sat, 11 Mar 2023 07:48:31 +0100 Subject: [PATCH 2/3] Bugfix: Session handling on copy files to remote systems --- .../functions/Register-WELCEventChannelManifest.ps1 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/WinEventLogCustomization/functions/Register-WELCEventChannelManifest.ps1 b/WinEventLogCustomization/functions/Register-WELCEventChannelManifest.ps1 index c4da262..f221204 100644 --- a/WinEventLogCustomization/functions/Register-WELCEventChannelManifest.ps1 +++ b/WinEventLogCustomization/functions/Register-WELCEventChannelManifest.ps1 @@ -256,13 +256,18 @@ } # Transfer files - Copy-Item -ToSession $Session -Destination $DestinationPath -Force -Path $file - Copy-Item -ToSession $Session -Destination $DestinationPath -Force -Path $dllFiles + foreach ($sessionItem in $Session) { + Copy-Item -ToSession $sessionItem -Destination $DestinationPath -Force -Path $file + Copy-Item -ToSession $sessionItem -Destination $DestinationPath -Force -Path $dllFiles + } } } elseif ((split-path $file) -notlike $DestinationPath) { Write-PSFMessage -Level Verbose -Message "Going to copy file into destination '$($DestinationPath)'" - Copy-Item -Destination $DestinationPath -Force -Path $file - Copy-Item -Destination $DestinationPath -Force -Path $dllFiles + + if ($pscmdlet.ShouldProcess("Manifest '$($file)' and dll to path '$($DestinationPath)'", "Copy")) { + Copy-Item -Destination $DestinationPath -Force -Path $file + Copy-Item -Destination $DestinationPath -Force -Path $dllFiles + } } # Register manifest From 976104cf8c0ba4e1beddaf2844274aa2cf9456d3 Mon Sep 17 00:00:00 2001 From: Andi Bellstedt Date: Sat, 11 Mar 2023 07:49:15 +0100 Subject: [PATCH 3/3] Prepare module version 1.0.3.0 --- WinEventLogCustomization/WinEventLogCustomization.psd1 | 2 +- WinEventLogCustomization/changelog.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/WinEventLogCustomization/WinEventLogCustomization.psd1 b/WinEventLogCustomization/WinEventLogCustomization.psd1 index 946ad81..4d4cfa7 100644 --- a/WinEventLogCustomization/WinEventLogCustomization.psd1 +++ b/WinEventLogCustomization/WinEventLogCustomization.psd1 @@ -3,7 +3,7 @@ RootModule = 'WinEventLogCustomization.psm1' # Version number of this module. - ModuleVersion = '1.0.2.2' + ModuleVersion = '1.0.3.0' # ID used to uniquely identify this module GUID = '9268705a-75d5-401c-b13d-4d1a8f380b17' diff --git a/WinEventLogCustomization/changelog.md b/WinEventLogCustomization/changelog.md index f863f23..84b6fb8 100644 --- a/WinEventLogCustomization/changelog.md +++ b/WinEventLogCustomization/changelog.md @@ -1,4 +1,11 @@ # Changelog +## 1.0.3.0 (2023-03-11) +- New: --- +- Upd: --- +- Fix: + - Register-WELCEventChannelManifest: Fix bug with session handling for registering manifests on remote systems + - General: Fix integer overflow on WELC.ChannelConfig objects to allow Excel import of eventlog channel configurations with size attribute larger than 1 GB + ## 1.0.2.2 (2023-02-11) - New: --- - Upd: ---