Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

207 lines
4.2 KiB

  1. DWORD
  2. CrackDomainName(
  3. IN WCHAR* pszDomain,
  4. OUT BOOL* pbCracked,
  5. OUT WCHAR** ppszDomain);
  6. DWORD
  7. OpenDirectoryServerHandle(
  8. LPWSTR pszDomainName,
  9. DWORD dwPortNumber,
  10. HLDAP * phLdapBindHandle
  11. );
  12. DWORD
  13. CloseDirectoryServerHandle(
  14. HLDAP hLdapBindHandle
  15. );
  16. DWORD
  17. ShallowReadPolicyObjectFromDirectory(
  18. HLDAP hLdapBindHandle,
  19. LPWSTR pszPolicyDN,
  20. PIPSEC_POLICY_OBJECT * ppIpsecPolicyObject
  21. );
  22. DWORD
  23. ReadPolicyObjectFromDirectory(
  24. HLDAP hLdapBindHandle,
  25. LPWSTR pszPolicyDN,
  26. PIPSEC_POLICY_OBJECT * ppIpsecPolicyObject
  27. );
  28. DWORD
  29. ReadNFAObjectsFromDirectory(
  30. HLDAP hLdapBindHandle,
  31. LPWSTR pszIpsecRootContainer,
  32. LPWSTR pszIpsecOwnerReference,
  33. LPWSTR * ppszNFADNs,
  34. DWORD dwNumNfaObjects,
  35. PIPSEC_NFA_OBJECT ** pppIpsecNFAObjects,
  36. PDWORD pdwNumNfaObjects,
  37. LPWSTR ** pppszFilterReferences,
  38. PDWORD pdwNumFilterReferences,
  39. LPWSTR ** pppszNegPolReferences,
  40. PDWORD pdwNumNegPolReferences
  41. );
  42. DWORD
  43. GenerateNFAQuery(
  44. LPWSTR * ppszNFADNs,
  45. DWORD dwNumNFAObjects,
  46. LPWSTR * ppszQueryBuffer
  47. );
  48. DWORD
  49. AppendCommonNameToQuery(
  50. LPWSTR szQueryBuffer,
  51. LPWSTR szCommonName
  52. );
  53. DWORD
  54. ComputePrelimCN(
  55. LPWSTR szNFADN,
  56. LPWSTR szCommonName
  57. );
  58. DWORD
  59. UnMarshallPolicyObject(
  60. HLDAP hLdapBindHandle,
  61. LPWSTR pszPolicyDN,
  62. PIPSEC_POLICY_OBJECT * ppIpsecPolicyObject,
  63. LDAPMessage *res
  64. );
  65. DWORD
  66. UnMarshallNFAObject(
  67. HLDAP hLdapBindHandle,
  68. LDAPMessage *e,
  69. PIPSEC_NFA_OBJECT * ppIpsecNFAObject,
  70. LPWSTR * ppszFilterReference,
  71. LPWSTR * ppszNegPolReference
  72. );
  73. DWORD
  74. GenerateISAKMPQuery(
  75. LPWSTR * ppszISAKMPDNs,
  76. DWORD dwNumISAKMPObjects,
  77. LPWSTR * ppszQueryBuffer
  78. );
  79. DWORD
  80. UnMarshallISAKMPObject(
  81. HLDAP hLdapBindHandle,
  82. LDAPMessage *e,
  83. PIPSEC_ISAKMP_OBJECT * ppIpsecISAKMPObject
  84. );
  85. DWORD
  86. ReadISAKMPObjectsFromDirectory(
  87. HLDAP hLdapBindHandle,
  88. LPWSTR pszIpsecRootContainer,
  89. LPWSTR * ppszISAKMPDNs,
  90. DWORD dwNumISAKMPObjects,
  91. PIPSEC_ISAKMP_OBJECT ** pppIpsecISAKMPObjects,
  92. PDWORD pdwNumISAKMPObjects
  93. );
  94. typedef struct _ldapobject
  95. {
  96. union {
  97. WCHAR *strVals;
  98. struct berval *bVals;
  99. } val;
  100. } LDAPOBJECT, *PLDAPOBJECT;
  101. #define LDAPOBJECT_STRING(pldapobject) ((pldapobject)->val.strVals)
  102. #define LDAPOBJECT_BERVAL(pldapobject) ((pldapobject)->val.bVals)
  103. #define LDAPOBJECT_BERVAL_VAL(pldapobject) ((pldapobject)->val.bVals->bv_val)
  104. #define LDAPOBJECT_BERVAL_LEN(pldapobject) ((pldapobject)->val.bVals->bv_len)
  105. void
  106. FreeIpsecNFAObject(
  107. PIPSEC_NFA_OBJECT pIpsecNFAObject
  108. );
  109. void
  110. FreeIpsecPolicyObject(
  111. PIPSEC_POLICY_OBJECT pIpsecPolicyObject
  112. );
  113. DWORD
  114. UnMarshallFilterObject(
  115. HLDAP hLdapBindHandle,
  116. LDAPMessage *e,
  117. PIPSEC_FILTER_OBJECT * ppIpsecFilterObject
  118. );
  119. void
  120. FreeIpsecFilterObject(
  121. PIPSEC_FILTER_OBJECT pIpsecFilterObject
  122. );
  123. DWORD
  124. UnMarshallNegPolObject(
  125. HLDAP hLdapBindHandle,
  126. LDAPMessage *e,
  127. PIPSEC_NEGPOL_OBJECT * ppIpsecPolicyObject
  128. );
  129. void
  130. FreeIpsecNegPolObject(
  131. PIPSEC_NEGPOL_OBJECT pIpsecNegPolObject
  132. );
  133. DWORD
  134. ReadFilterObjectsFromDirectory(
  135. HLDAP hLdapBindHandle,
  136. LPWSTR pszIpsecRootContainer,
  137. LPWSTR * ppszFilterDNs,
  138. DWORD dwNumFilterObjects,
  139. PIPSEC_FILTER_OBJECT ** pppIpsecFilterObjects,
  140. PDWORD pdwNumFilterObjects
  141. );
  142. DWORD
  143. GenerateFilterQuery(
  144. LPWSTR * ppszFilterDNs,
  145. DWORD dwNumFilterObjects,
  146. LPWSTR * ppszQueryBuffer
  147. );
  148. DWORD
  149. ReadNegPolObjectsFromDirectory(
  150. HLDAP hLdapBindHandle,
  151. LPWSTR pszIpsecRootContainer,
  152. LPWSTR * ppszNegPolDNs,
  153. DWORD dwNumNegPolObjects,
  154. PIPSEC_NEGPOL_OBJECT ** pppIpsecNegPolObjects,
  155. PDWORD pdwNumNegPolObjects
  156. );
  157. DWORD
  158. GenerateNegPolQuery(
  159. LPWSTR * ppszNegPolDNs,
  160. DWORD dwNumNegPolObjects,
  161. LPWSTR * ppszQueryBuffer
  162. );
  163. DWORD
  164. ComputePolicyContainerDN(
  165. LPWSTR pszPolicyDN,
  166. LPWSTR * ppszPolicyContainerDN
  167. );
  168. DWORD
  169. ComputeDefaultDirectory(
  170. LPWSTR * ppszDefaultDirectory
  171. );