Skip to content

Commit

Permalink
Remove EDP auditing completely (#16460)
Browse files Browse the repository at this point in the history
This pull request started out very differently. I was going to move all
the EDP code from the internal `conint` project into the public, because
EDP is [fully documented]!

Well, it doesn't have any headers in the SDK.

Or import libraries.

And it's got a deprecation notice:

> [!NOTE]
> Starting in July 2022, Microsoft is deprecating Windows Information
> Protection (WIP) and the APIs that support WIP. Microsoft will
continue
> to support WIP on supported versions of Windows. New versions of
Windows
> won't include new capabilities for WIP, and it won't be supported in
> future versions of Windows.

So I'm blasting it out the airlock instead.

[fully documented]:
https://learn.microsoft.com/en-us/windows/win32/devnotes/windows-information-protection-api
  • Loading branch information
DHowett authored Jan 9, 2024
1 parent 375d00d commit c4c06da
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 27 deletions.
1 change: 0 additions & 1 deletion .github/actions/spelling/expect/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,6 @@ Edgium
EDITKEYS
EDITTEXT
EDITUPDATE
edputil
Efast
efghijklmn
EHsc
Expand Down
3 changes: 0 additions & 3 deletions src/host/res.rc
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ BEGIN

ID_CONSOLE_FMT_WINDOWTITLE, "%s%s"

/* WIP Audit destination name */
ID_CONSOLE_WIP_DESTINATIONNAME, "console application"

/* Menu items that replace the standard ones. These don't have the accelerators */
SC_CLOSE, "&Close"

Expand Down
1 change: 0 additions & 1 deletion src/host/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Author(s):
#define ID_CONSOLE_MSGMARKMODE 0x100C
#define ID_CONSOLE_MSGSCROLLMODE 0x100D
#define ID_CONSOLE_FMT_WINDOWTITLE 0x100E
#define ID_CONSOLE_WIP_DESTINATIONNAME 0x100F

// Menu Item strings
#define ID_CONSOLE_COPY 0xFFF0
Expand Down
2 changes: 0 additions & 2 deletions src/host/sources.inc
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ TARGETLIBS = \
$(ONECOREUAP_EXTERNAL_SDK_LIB_PATH)\d3d11.lib \
$(MODERNCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\api-ms-win-mm-playsound-l1.lib \
$(ONECORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-dwmapi-ext-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-edputil-policy-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-gdi-dc-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-gdi-dc-create-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-gdi-draw-l1.lib \
Expand Down Expand Up @@ -206,7 +205,6 @@ DELAYLOAD = \
api-ms-win-shell-dataobject-l1.dll; \
api-ms-win-shell-namespace-l1.dll; \
ext-ms-win-dwmapi-ext-l1.dll; \
ext-ms-win-edputil-policy-l1.dll; \
ext-ms-win-usp10-l1.dll; \
ext-ms-win-gdi-dc-l1.dll; \
ext-ms-win-gdi-dc-create-l1.dll; \
Expand Down
5 changes: 0 additions & 5 deletions src/inc/conint.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ namespace Microsoft::Console::Internal

}

namespace EdpPolicy
{
void AuditClipboard(const std::wstring_view destinationName) noexcept;
}

namespace Theming
{
[[nodiscard]] HRESULT TrySetDarkMode(HWND hwnd) noexcept;
Expand Down
2 changes: 0 additions & 2 deletions src/interactivity/win32/Clipboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ void Clipboard::Paste()
StringPaste(pwstr, (ULONG)GlobalSize(ClipboardDataHandle) / sizeof(WCHAR));

// WIP auditing if user is enrolled
static auto DestinationName = _LoadString(ID_CONSOLE_WIP_DESTINATIONNAME);
Microsoft::Console::Internal::EdpPolicy::AuditClipboard(DestinationName);

GlobalUnlock(ClipboardDataHandle);

Expand Down
1 change: 0 additions & 1 deletion src/interactivity/win32/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Author(s):
#define ID_CONSOLE_MSGMARKMODE 0x100C
#define ID_CONSOLE_MSGSCROLLMODE 0x100D
#define ID_CONSOLE_FMT_WINDOWTITLE 0x100E
#define ID_CONSOLE_WIP_DESTINATIONNAME 0x100F

// Menu Item strings
#define ID_CONSOLE_COPY 0xFFF0
Expand Down
2 changes: 0 additions & 2 deletions src/interactivity/win32/ut_interactivity_win32/sources
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ TARGETLIBS = \
$(ONECOREUAP_EXTERNAL_SDK_LIB_PATH)\d3dcompiler.lib \
$(MODERNCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\api-ms-win-mm-playsound-l1.lib \
$(ONECORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-dwmapi-ext-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-edputil-policy-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-gdi-dc-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-gdi-dc-create-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-gdi-draw-l1.lib \
Expand Down Expand Up @@ -116,7 +115,6 @@ DELAYLOAD = \
api-ms-win-shell-dataobject-l1.dll; \
api-ms-win-shell-namespace-l1.dll; \
ext-ms-win-dwmapi-ext-l1.dll; \
ext-ms-win-edputil-policy-l1.dll; \
ext-ms-win-gdi-dc-l1.dll; \
ext-ms-win-gdi-dc-create-l1.dll; \
ext-ms-win-gdi-draw-l1.dll; \
Expand Down
4 changes: 0 additions & 4 deletions src/internal/stubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ using namespace Microsoft::Console::Internal;
return S_OK;
}

void EdpPolicy::AuditClipboard(const std::wstring_view /*destinationName*/) noexcept
{
}

[[nodiscard]] HRESULT Theming::TrySetDarkMode(HWND /*hwnd*/) noexcept
{
return S_FALSE;
Expand Down
2 changes: 0 additions & 2 deletions src/propsheet/sources
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ TARGETLIBS = \
$(ONECORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\onecoreuap_internal.lib \
$(ONECOREUAP_INTERNAL_SDK_LIB_PATH)\onecoreuapuuid.lib \
$(ONECORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-dwmapi-ext-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-edputil-policy-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-gdi-dc-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-gdi-dc-create-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-gdi-draw-l1.lib \
Expand All @@ -109,7 +108,6 @@ TARGETLIBS = \

DELAYLOAD = \
ext-ms-win-dwmapi-ext-l1.dll; \
ext-ms-win-edputil-policy-l1.dll; \
ext-ms-win-uxtheme-themes-l1.dll; \
ext-ms-win-shell32-shellfolders-l1.dll; \
ext-ms-win-gdi-dc-l1.dll; \
Expand Down
2 changes: 0 additions & 2 deletions src/terminal/adapter/ut_adapter/sources
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ TARGETLIBS = \
$(ONECOREUAP_EXTERNAL_SDK_LIB_PATH)\d3dcompiler.lib \
$(MODERNCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\api-ms-win-mm-playsound-l1.lib \
$(ONECORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-dwmapi-ext-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-edputil-policy-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-gdi-dc-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-gdi-dc-create-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-gdi-draw-l1.lib \
Expand Down Expand Up @@ -111,7 +110,6 @@ DELAYLOAD = \
api-ms-win-shell-dataobject-l1.dll; \
api-ms-win-shell-namespace-l1.dll; \
ext-ms-win-dwmapi-ext-l1.dll; \
ext-ms-win-edputil-policy-l1.dll; \
ext-ms-win-usp10-l1.dll; \
ext-ms-win-gdi-dc-l1.dll; \
ext-ms-win-gdi-dc-create-l1.dll; \
Expand Down
2 changes: 0 additions & 2 deletions src/terminal/parser/ut_parser/sources
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ TARGETLIBS = \
$(ONECOREUAP_EXTERNAL_SDK_LIB_PATH)\d3dcompiler.lib \
$(MODERNCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\api-ms-win-mm-playsound-l1.lib \
$(ONECORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-dwmapi-ext-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-edputil-policy-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-gdi-dc-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-gdi-dc-create-l1.lib \
$(MINCORE_INTERNAL_PRIV_SDK_LIB_VPATH_L)\ext-ms-win-gdi-draw-l1.lib \
Expand Down Expand Up @@ -102,7 +101,6 @@ DELAYLOAD = \
api-ms-win-shell-dataobject-l1.dll; \
api-ms-win-shell-namespace-l1.dll; \
ext-ms-win-dwmapi-ext-l1.dll; \
ext-ms-win-edputil-policy-l1.dll; \
ext-ms-win-gdi-dc-l1.dll; \
ext-ms-win-gdi-dc-create-l1.dll; \
ext-ms-win-gdi-draw-l1.dll; \
Expand Down

0 comments on commit c4c06da

Please sign in to comment.