diff --git a/reactos/lib/advapi32/advapi32.def b/reactos/lib/advapi32/advapi32.def index 6de413ff134..01fc498e2de 100644 --- a/reactos/lib/advapi32/advapi32.def +++ b/reactos/lib/advapi32/advapi32.def @@ -84,8 +84,8 @@ ControlServiceEx@16 ;ConvertSecurityDescriptorToAccessNamedA=ConvertSecurityDescriptorToAccessA@28 ;ConvertSecurityDescriptorToAccessNamedW=ConvertSecurityDescriptorToAccessW@28 ;ConvertSecurityDescriptorToAccessW@28 -;ConvertSecurityDescriptorToStringSecurityDescriptorA@20 -;ConvertSecurityDescriptorToStringSecurityDescriptorW@20 +ConvertSecurityDescriptorToStringSecurityDescriptorA@20 +ConvertSecurityDescriptorToStringSecurityDescriptorW@20 ConvertSidToStringSidA@8 ConvertSidToStringSidW@8 ;ConvertStringSDToSDDomainA@24 @@ -94,8 +94,8 @@ ConvertSidToStringSidW@8 ;ConvertStringSDToSDRootDomainW@20 ConvertStringSecurityDescriptorToSecurityDescriptorA@16 ConvertStringSecurityDescriptorToSecurityDescriptorW@16 -;ConvertStringSidToSidA@8 -;ConvertStringSidToSidW@8 +ConvertStringSidToSidA@8 +ConvertStringSidToSidW@8 ConvertToAutoInheritPrivateObjectSecurity@24 CopySid@12 ;CreateCodeAuthzLevel@20 @@ -106,7 +106,7 @@ CreateProcessAsUserA@44 ;CreateProcessAsUserSecure CreateProcessAsUserW@44 ;CreateProcessWithLogonW -;CreateRestrictedToken@36 +CreateRestrictedToken@36 CreateServiceA@52 CreateServiceW@52 ;CreateTraceInstanceId@8 @@ -211,7 +211,7 @@ DuplicateTokenEx@24 EncryptFileA@4 EncryptFileW@4 ;EncryptedFileKeyInfo -;EncryptionDisable@8 +EncryptionDisable@8 EnumDependentServicesA@24 EnumDependentServicesW@24 EnumServiceGroupW@36 diff --git a/reactos/lib/advapi32/crypt/crypt.c b/reactos/lib/advapi32/crypt/crypt.c index 35918ec160f..a2b4e89312f 100644 --- a/reactos/lib/advapi32/crypt/crypt.c +++ b/reactos/lib/advapi32/crypt/crypt.c @@ -1962,14 +1962,6 @@ DWORD WINAPI RemoveUsersFromEncryptedFile ( return ERROR_CALL_NOT_IMPLEMENTED; } -/* - * @unimplemented - */ -BOOL WINAPI EncryptionDisable ( - LPCWSTR, - BOOL - ); - /* * @unimplemented */ @@ -2031,3 +2023,17 @@ DWORD WINAPI QueryRecoveryAgentsOnEncryptedFile ( DPRINT1("%s() not implemented!\n", __FUNCTION__); return ERROR_CALL_NOT_IMPLEMENTED; } + +/* + * @unimplemented + */ +BOOL WINAPI EncryptionDisable( + LPCWSTR DirPath, + BOOL Disable + ) +{ + DPRINT1("%s() not implemented!\n", __FUNCTION__); + return ERROR_CALL_NOT_IMPLEMENTED; +} + + diff --git a/reactos/lib/advapi32/sec/sec.c b/reactos/lib/advapi32/sec/sec.c index f1928f1b1d7..20d664e7e83 100644 --- a/reactos/lib/advapi32/sec/sec.c +++ b/reactos/lib/advapi32/sec/sec.c @@ -558,4 +558,26 @@ BOOL WINAPI EncryptFileA(LPCSTR lpFileName) return ERROR_CALL_NOT_IMPLEMENTED; } +BOOL WINAPI ConvertSecurityDescriptorToStringSecurityDescriptorW( + PSECURITY_DESCRIPTOR pSecurityDescriptor, + DWORD dword, + SECURITY_INFORMATION SecurityInformation, + LPWSTR* lpwstr, + PULONG pulong) +{ + DPRINT1("%s() not implemented!\n", __FUNCTION__); + return ERROR_CALL_NOT_IMPLEMENTED; +} + +BOOL WINAPI ConvertSecurityDescriptorToStringSecurityDescriptorA( + PSECURITY_DESCRIPTOR pSecurityDescriptor, + DWORD dword, + SECURITY_INFORMATION SecurityInformation, + LPSTR* lpstr, + PULONG pulong) +{ + DPRINT1("%s() not implemented!\n", __FUNCTION__); + return ERROR_CALL_NOT_IMPLEMENTED; +} + /* EOF */ diff --git a/reactos/lib/advapi32/sec/sid.c b/reactos/lib/advapi32/sec/sid.c index c6f53384e15..048b76618df 100644 --- a/reactos/lib/advapi32/sec/sid.c +++ b/reactos/lib/advapi32/sec/sid.c @@ -1039,4 +1039,40 @@ IsWellKnownSid(IN PSID pSid, } +/* + * @implemented + */ +BOOL STDCALL +ConvertStringSidToSidA( + IN LPCSTR StringSid, + OUT PSID* sid) +{ + BOOL bRetVal = FALSE; + + if (!StringSid || !sid) + SetLastError(ERROR_INVALID_PARAMETER); + else + { + UINT len = MultiByteToWideChar(CP_ACP, 0, StringSid, -1, NULL, 0); + LPWSTR wStringSid = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, StringSid, - 1, wStringSid, len); + bRetVal = ConvertStringSidToSidW(wStringSid, sid); + HeapFree(GetProcessHeap(), 0, wStringSid); + } + return bRetVal; +} + +/* + * @unimplemented + */ +BOOL STDCALL +ConvertStringSidToSidW( + IN LPCWSTR StringSid, + OUT PSID* sid) +{ + FIXME("unimplemented!\n", __FUNCTION__); + return FALSE; +} + + /* EOF */ diff --git a/reactos/lib/advapi32/token/token.c b/reactos/lib/advapi32/token/token.c index df55c4d7ae4..fba94fb17fc 100644 --- a/reactos/lib/advapi32/token/token.c +++ b/reactos/lib/advapi32/token/token.c @@ -11,6 +11,7 @@ #include #define NDEBUG +#include #include /* @@ -575,4 +576,23 @@ AllocAndReadRestrictedSids: return Ret; } +BOOL STDCALL +CreateRestrictedToken( + HANDLE TokenHandle, + DWORD Flags, + DWORD DisableSidCount, + PSID_AND_ATTRIBUTES pSidAndAttributes, + DWORD DeletePrivilegeCount, + PLUID_AND_ATTRIBUTES pLUIDAndAttributes, + DWORD RestrictedSidCount, + PSID_AND_ATTRIBUTES pSIDAndAttributes, + PHANDLE NewTokenHandle +) +{ + FIXME("unimplemented!\n", __FUNCTION__); + return FALSE; +} + + + /* EOF */