implemented some stubs needed by ClamWin
authorChristoph von Wittich <christoph_vw@reactos.org>
Mon, 14 Nov 2005 22:44:36 +0000 (22:44 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Mon, 14 Nov 2005 22:44:36 +0000 (22:44 +0000)
svn path=/trunk/; revision=19231

reactos/lib/advapi32/advapi32.def
reactos/lib/advapi32/crypt/crypt.c
reactos/lib/advapi32/sec/sec.c
reactos/lib/advapi32/sec/sid.c
reactos/lib/advapi32/token/token.c

index 6de413f..01fc498 100644 (file)
@@ -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
index 35918ec..a2b4e89 100644 (file)
@@ -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;
+}
+
+
index f1928f1..20d664e 100644 (file)
@@ -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 */
index c6f5338..048b766 100644 (file)
@@ -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 */
index df55c4d..fba94fb 100644 (file)
@@ -11,6 +11,7 @@
 #include <advapi32.h>
 
 #define NDEBUG
+#include <wine/debug.h>
 #include <debug.h>
 
 /*
@@ -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 */