Stubs for LsaFreeMemory, LsaQueryInformationPolicy, LsaClose.
Small fixes.

diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec
index f17e687..c6ff58e 100644
--- a/dlls/advapi32/advapi32.spec
+++ b/dlls/advapi32/advapi32.spec
@@ -242,9 +242,9 @@
 0238 stub UnlockServiceDatabase
 0239 stdcall LsaOpenPolicy(long long long long) LsaOpenPolicy
 0240 stub LsaLookupSids
-0241 stub LsaFreeMemory
-0242 stub LsaQueryInformationPolicy
-0243 stub LsaClose
+0241 stdcall LsaFreeMemory(ptr)LsaFreeMemory
+0242 stdcall LsaQueryInformationPolicy(ptr long ptr)LsaQueryInformationPolicy
+0243 stdcall LsaClose(ptr)LsaClose
 0244 stub LsaSetInformationPolicy
 0245 stub LsaLookupNames
 0246 stub SystemFunction001
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
index 7f8779a..1e61f1b 100644
--- a/dlls/advapi32/security.c
+++ b/dlls/advapi32/security.c
@@ -714,6 +714,37 @@
 }
 
 /******************************************************************************
+ * LsaQueryInformationPolicy [ADVAPI32.242]
+ */
+NTSTATUS WINAPI
+LsaQueryInformationPolicy( IN LSA_HANDLE PolicyHandle,
+                           IN POLICY_INFORMATION_CLASS InformationClass,
+                           OUT PVOID *Buffer)
+{
+	FIXME("(%p,0x%08x,%p):stub\n",
+              PolicyHandle, InformationClass, Buffer);
+	return 0xc0000000; /* generic error */
+}			  
+
+/******************************************************************************
+ * LsaFreeMemory [ADVAPI32.241]
+ */
+NTSTATUS WINAPI
+LsaFreeMemory(IN PVOID Buffer)
+{
+	FIXME("(%p):stub\n",Buffer);
+	return 0xc0000000;
+}
+/******************************************************************************
+ * LsaClose [ADVAPI32.243]
+ */
+NTSTATUS WINAPI
+LsaClose(IN LSA_HANDLE ObjectHandle)
+{
+	FIXME("(%p):stub\n",ObjectHandle);
+	return 0xc0000000;
+}
+/******************************************************************************
  * NotifyBootConfigStatus [ADVAPI32.97]
  *
  * PARAMS
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index f296150..6f278a5 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -261,14 +261,29 @@
 	switch (tokeninfoclass)
 	{ case TokenGroups:	/* 2 */
 		*retlen = sizeof (TOKEN_GROUPS);
-#if 0	
+		break;
 	  case TokenUser:	/* 1 */
+		*retlen = sizeof (TOKEN_USER);
+		break;
 	  case TokenPrivileges:
+		*retlen = sizeof (TOKEN_PRIVILEGES);
+		break;
 	  case TokenOwner:
+		*retlen = sizeof (TOKEN_OWNER);
+		break;
 	  case TokenPrimaryGroup:
+		*retlen = sizeof (TOKEN_PRIMARY_GROUP);
+		break;
 	  case TokenDefaultDacl:
+		*retlen = sizeof (TOKEN_DEFAULT_DACL);
+		break;
 	  case TokenSource:
+		*retlen = sizeof (TOKEN_SOURCE);
+		break;
 	  case TokenType:
+		*retlen = sizeof (TOKEN_TYPE);
+		break;
+#if 0
 	  case TokenImpersonationLevel:
 	  case TokenStatistics:
 #endif /* 0 */
diff --git a/include/ntsecapi.h b/include/ntsecapi.h
index 662c101..44fa0b5 100644
--- a/include/ntsecapi.h
+++ b/include/ntsecapi.h
@@ -16,6 +16,27 @@
 
 NTSTATUS WINAPI LsaOpenPolicy(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,ACCESS_MASK,PLSA_HANDLE);
 
+typedef enum 
+{
+	PolicyAuditLogInformation = 1,
+	PolicyAuditEventsInformation,
+	PolicyPrimaryDomainInformation,
+	PolicyPdAccountInformation,
+	PolicyAccountDomainInformation,
+	PolicyLsaServerRoleInformation,
+	PolicyReplicaSourceInformation,
+	PolicyDefaultQuotaInformation,
+	PolicyModificationInformation,
+	PolicyAuditFullSetInformation,
+	PolicyAuditFullQueryInformation,
+	PolicyDnsDomainInformation
+} POLICY_INFORMATION_CLASS, *PPOLICY_INFORMATION_CLASS;
+
+NTSTATUS WINAPI LsaQueryInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID*);
+
+NTSTATUS WINAPI LsaFreeMemory(PVOID);
+NTSTATUS WINAPI LsaClose(IN LSA_HANDLE ObjectHandle);
+
 #ifdef __cplusplus
 } /* extern "C" */
 #endif /* defined(__cplusplus) */
diff --git a/include/winnt.h b/include/winnt.h
index 691bd3d..4fed1dc 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -1033,6 +1033,52 @@
   DWORD Attributes; 
 } SID_AND_ATTRIBUTES ; 
  
+/* security entities */
+#define SECURITY_NULL_RID			(0x00000000L)
+#define SECURITY_WORLD_RID			(0x00000000L)
+#define SECURITY_LOCAL_RID			(0X00000000L)
+
+#define SECURITY_NULL_SID_AUTHORITY		{0,0,0,0,0,0}
+
+/* S-1-1 */
+#define SECURITY_WORLD_SID_AUTHORITY		{0,0,0,0,0,1}
+
+/* S-1-2 */
+#define SECURITY_LOCAL_SID_AUTHORITY		{0,0,0,0,0,2}
+
+/* S-1-3 */
+#define SECURITY_CREATOR_SID_AUTHORITY		{0,0,0,0,0,3}
+#define SECURITY_CREATOR_OWNER_RID		(0x00000000L) 
+#define SECURITY_CREATOR_GROUP_RID		(0x00000001L)
+#define SECURITY_CREATOR_OWNER_SERVER_RID	(0x00000002L)
+#define SECURITY_CREATOR_GROUP_SERVER_RID	(0x00000003L)
+
+/* S-1-4 */
+#define SECURITY_NON_UNIQUE_AUTHORITY		{0,0,0,0,0,4}
+
+/* S-1-5 */
+#define SECURITY_NT_AUTHORITY			{0,0,0,0,0,5} 
+#define SECURITY_DIALUP_RID			(0x00000001L)
+#define SECURITY_NETWORK_RID			(0x00000002L)
+#define SECURITY_BATCH_RID			(0x00000003L)
+#define SECURITY_INTERACTIVE_RID		(0x00000004L)
+#define SECURITY_LOGON_IDS_RID			(0x00000005L)
+#define SECURITY_SERVICE_RID			(0x00000006L)
+#define SECURITY_ANONYMOUS_LOGON_RID		(0x00000007L)
+#define SECURITY_PROXY_RID			(0x00000008L)
+#define SECURITY_ENTERPRISE_CONTROLLERS_RID	(0x00000009L)
+#define SECURITY_PRINCIPAL_SELF_RID		(0x0000000AL)
+#define SECURITY_AUTHENTICATED_USER_RID		(0x0000000BL)
+#define SECURITY_RESTRICTED_CODE_RID		(0x0000000CL)
+#define SECURITY_TERMINAL_SERVER_RID		(0x0000000DL)
+#define SECURITY_LOCAL_SYSTEM_RID		(0x00000012L)
+#define SECURITY_NT_NON_UNIQUE			(0x00000015L)
+#define SECURITY_BUILTIN_DOMAIN_RID		(0x00000020L)
+
+#define SECURITY_SERVER_LOGON_RID		SECURITY_ENTERPRISE_CONTROLLERS_RID
+
+#define SECURITY_LOGON_IDS_RID_COUNT		(3L)
+
 /*
  * TOKEN_USER
  */