From b6bcbf0886cdb82414d269cff997ca0a4f0dbd49 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 17 Oct 2010 15:01:46 +0000 Subject: [PATCH] [ADVAPI32] Move the Encrypted File System (EFS) functions into their own file. svn path=/trunk/; revision=49184 --- reactos/dll/win32/advapi32/advapi32.rbuild | 1 + reactos/dll/win32/advapi32/misc/efs.c | 85 ++++++++++++++++++++++ reactos/dll/win32/advapi32/sec/sec.c | 71 ------------------ 3 files changed, 86 insertions(+), 71 deletions(-) create mode 100644 reactos/dll/win32/advapi32/misc/efs.c diff --git a/reactos/dll/win32/advapi32/advapi32.rbuild b/reactos/dll/win32/advapi32/advapi32.rbuild index 17e120ba9ce..22e1a69af48 100644 --- a/reactos/dll/win32/advapi32/advapi32.rbuild +++ b/reactos/dll/win32/advapi32/advapi32.rbuild @@ -28,6 +28,7 @@ dllmain.c + efs.c hwprofiles.c logon.c msi.c diff --git a/reactos/dll/win32/advapi32/misc/efs.c b/reactos/dll/win32/advapi32/misc/efs.c new file mode 100644 index 00000000000..11fb8e588ed --- /dev/null +++ b/reactos/dll/win32/advapi32/misc/efs.c @@ -0,0 +1,85 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: dlls/win32/advapi32/misc/efs.c + * PURPOSE: Encrypted File System support + * PROGRAMMER: Christoph_vW + */ + +#include +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(advapi); + + +/* + * @implemented + */ +BOOL WINAPI +DecryptFileA(LPCSTR lpFileName, DWORD dwReserved) +{ + UNICODE_STRING FileName; + NTSTATUS Status; + BOOL ret; + + Status = RtlCreateUnicodeStringFromAsciiz(&FileName, lpFileName); + if (!NT_SUCCESS(Status)) + { + SetLastError(RtlNtStatusToDosError(Status)); + return FALSE; + } + + ret = DecryptFileW(FileName.Buffer, dwReserved); + + if (FileName.Buffer != NULL) + RtlFreeUnicodeString(&FileName); + return ret; +} + + +/* + * @unimplemented + */ +BOOL WINAPI DecryptFileW(LPCWSTR lpFileName, DWORD dwReserved) +{ + FIXME("%s(%S) not implemented!\n", __FUNCTION__, lpFileName); + return TRUE; +} + + +/* + * @implemented + */ +BOOL WINAPI +EncryptFileA(LPCSTR lpFileName) +{ + UNICODE_STRING FileName; + NTSTATUS Status; + BOOL ret; + + Status = RtlCreateUnicodeStringFromAsciiz(&FileName, lpFileName); + if (!NT_SUCCESS(Status)) + { + SetLastError(RtlNtStatusToDosError(Status)); + return FALSE; + } + + ret = EncryptFileW(FileName.Buffer); + + if (FileName.Buffer != NULL) + RtlFreeUnicodeString(&FileName); + return ret; +} + + +/* + * @unimplemented + */ +BOOL WINAPI +EncryptFileW(LPCWSTR lpFileName) +{ + FIXME("%s() not implemented!\n", __FUNCTION__); + return TRUE; +} + +/* EOF */ diff --git a/reactos/dll/win32/advapi32/sec/sec.c b/reactos/dll/win32/advapi32/sec/sec.c index 2ad2bff688c..99222f3f315 100644 --- a/reactos/dll/win32/advapi32/sec/sec.c +++ b/reactos/dll/win32/advapi32/sec/sec.c @@ -534,75 +534,4 @@ BuildSecurityDescriptorA(IN PTRUSTEE_A pOwner OPTIONAL, return FALSE; } - -/* - * @unimplemented - */ -BOOL WINAPI DecryptFileW(LPCWSTR lpFileName, DWORD dwReserved) -{ - FIXME("%s(%S) not implemented!\n", __FUNCTION__, lpFileName); - return TRUE; -} - - -/* - * @implemented - */ -BOOL WINAPI -DecryptFileA(LPCSTR lpFileName, DWORD dwReserved) -{ - UNICODE_STRING FileName; - NTSTATUS Status; - BOOL ret; - - Status = RtlCreateUnicodeStringFromAsciiz(&FileName, lpFileName); - if (!NT_SUCCESS(Status)) - { - SetLastError(RtlNtStatusToDosError(Status)); - return FALSE; - } - - ret = DecryptFileW(FileName.Buffer, dwReserved); - - if (FileName.Buffer != NULL) - RtlFreeUnicodeString(&FileName); - return ret; -} - - -/* - * @unimplemented - */ -BOOL WINAPI -EncryptFileW(LPCWSTR lpFileName) -{ - FIXME("%s() not implemented!\n", __FUNCTION__); - return TRUE; -} - - -/* - * @implemented - */ -BOOL WINAPI -EncryptFileA(LPCSTR lpFileName) -{ - UNICODE_STRING FileName; - NTSTATUS Status; - BOOL ret; - - Status = RtlCreateUnicodeStringFromAsciiz(&FileName, lpFileName); - if (!NT_SUCCESS(Status)) - { - SetLastError(RtlNtStatusToDosError(Status)); - return FALSE; - } - - ret = EncryptFileW(FileName.Buffer); - - if (FileName.Buffer != NULL) - RtlFreeUnicodeString(&FileName); - return ret; -} - /* EOF */