VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Setup/Setup.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2018-04-23 12:56:02 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2018-04-23 16:59:40 +0200
commit4f0d1c02bdf4adf56caf48de967c41d2d4d9ff2d (patch)
tree360d2be90e73133d06037922c6267617ab77d9ff /src/Setup/Setup.c
parent42e7da2e8aa86eff54667fa1e76a64b1787d68e5 (diff)
downloadVeraCrypt-4f0d1c02bdf4adf56caf48de967c41d2d4d9ff2d.tar.gz
VeraCrypt-4f0d1c02bdf4adf56caf48de967c41d2d4d9ff2d.zip
Windows: Don't start EFI system encryption process if SecureBoot is enabled and VeraCrypt-DCS custom keys were not loaded in the machine firmware.
Diffstat (limited to 'src/Setup/Setup.c')
-rw-r--r--src/Setup/Setup.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/Setup/Setup.c b/src/Setup/Setup.c
index 46583c46..485d333c 100644
--- a/src/Setup/Setup.c
+++ b/src/Setup/Setup.c
@@ -387,44 +387,6 @@ void SearchAndDeleteRegistrySubString (HKEY hKey, const wchar_t *subKey, const w
}
}
-/* Set the given privilege of the current process */
-BOOL SetPrivilege(LPTSTR szPrivilegeName, BOOL bEnable)
-{
- TOKEN_PRIVILEGES tp;
- LUID luid;
- HANDLE hProcessToken;
- BOOL bStatus = FALSE;
-
- if ( OpenProcessToken(GetCurrentProcess(),
- TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY,
- &hProcessToken) )
- {
- if ( LookupPrivilegeValue(
- NULL,
- szPrivilegeName,
- &luid ) )
- {
-
- tp.PrivilegeCount = 1;
- tp.Privileges[0].Luid = luid;
- tp.Privileges[0].Attributes = bEnable? SE_PRIVILEGE_ENABLED : SE_PRIVILEGE_REMOVED;
-
- // Enable the privilege
- bStatus = AdjustTokenPrivileges(
- hProcessToken,
- FALSE,
- &tp,
- sizeof(TOKEN_PRIVILEGES),
- (PTOKEN_PRIVILEGES) NULL,
- (PDWORD) NULL);
- }
-
- CloseHandle(hProcessToken);
- }
-
- return bStatus;
-}
-
/*
* Creates a VT_LPWSTR propvariant.
* we use our own implementation to use SHStrDupW function pointer