mirror of
https://github.com/reactos/reactos.git
synced 2025-01-02 12:32:47 +00:00
[ADVAPI32]
Move the Encrypted File System (EFS) functions into their own file. svn path=/trunk/; revision=49184
This commit is contained in:
parent
3114284398
commit
b6bcbf0886
3 changed files with 86 additions and 71 deletions
|
@ -28,6 +28,7 @@
|
|||
</directory>
|
||||
<directory name="misc">
|
||||
<file>dllmain.c</file>
|
||||
<file>efs.c</file>
|
||||
<file>hwprofiles.c</file>
|
||||
<file>logon.c</file>
|
||||
<file>msi.c</file>
|
||||
|
|
85
reactos/dll/win32/advapi32/misc/efs.c
Normal file
85
reactos/dll/win32/advapi32/misc/efs.c
Normal file
|
@ -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 <advapi32.h>
|
||||
#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 */
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue