https://git.reactos.org/?p=reactos.git;a=commitdiff;h=eb1fd0c090386dc1288a5…
commit eb1fd0c090386dc1288a51c837b245ba7f0f8e1b
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Fri Apr 10 19:34:38 2020 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Fri Apr 10 19:39:47 2020 +0200
[NETSHELL] Disable the 'Delete' menu item for physical network interfaces
CORE-16821
---
dll/shellext/netshell/connectmanager.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dll/shellext/netshell/connectmanager.cpp
b/dll/shellext/netshell/connectmanager.cpp
index 2cb697ce450..78e2059df51 100644
--- a/dll/shellext/netshell/connectmanager.cpp
+++ b/dll/shellext/netshell/connectmanager.cpp
@@ -293,7 +293,13 @@ CNetConnection::GetProperties(NETCON_PROPERTIES **ppProps)
/* Enable 'Rename' and 'Delete' for Adminstrators only */
if (IsUserAdmin())
{
- pProperties->dwCharacter |= (NCCF_ALLOW_RENAME | NCCF_ALLOW_REMOVAL);
+ pProperties->dwCharacter |= NCCF_ALLOW_RENAME;
+
+ /* Virtual network interfaces can be deleted */
+ if (IfEntry.dwType == IF_TYPE_TUNNEL)
+ {
+ pProperties->dwCharacter |= NCCF_ALLOW_REMOVAL;
+ }
}
else
{