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.

379 lines
11 KiB

  1. /*++
  2. Copyright (c) 1998-1999 Microsoft Corporation
  3. Module Name:
  4. ntldap.h
  5. Abstract:
  6. This is the header that defines NT specific server LDAP extensions.
  7. Environments :
  8. Win32 user mode
  9. --*/
  10. #ifndef NT_LDAP_H
  11. #define NT_LDAP_H
  12. #if _MSC_VER > 1000
  13. #pragma once
  14. #endif
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. //
  19. //
  20. // Server controls section
  21. //
  22. //
  23. // Permissive Modify Control. No Data.
  24. //
  25. #define LDAP_SERVER_PERMISSIVE_MODIFY_OID "1.2.840.113556.1.4.1413"
  26. #define LDAP_SERVER_PERMISSIVE_MODIFY_OID_W L"1.2.840.113556.1.4.1413"
  27. //
  28. // Show Deleted Control. No Data.
  29. //
  30. #define LDAP_SERVER_SHOW_DELETED_OID "1.2.840.113556.1.4.417"
  31. #define LDAP_SERVER_SHOW_DELETED_OID_W L"1.2.840.113556.1.4.417"
  32. //
  33. // Cross Domain Move Control. Data as follows
  34. // SEQUENCE {
  35. // Name OCTET STRING
  36. // }
  37. //
  38. #define LDAP_SERVER_CROSSDOM_MOVE_TARGET_OID "1.2.840.113556.1.4.521"
  39. #define LDAP_SERVER_CROSSDOM_MOVE_TARGET_OID_W L"1.2.840.113556.1.4.521"
  40. //
  41. // Notification. No Data.
  42. //
  43. #define LDAP_SERVER_NOTIFICATION_OID "1.2.840.113556.1.4.528"
  44. #define LDAP_SERVER_NOTIFICATION_OID_W L"1.2.840.113556.1.4.528"
  45. //
  46. // Lazy Commit. No Data.
  47. //
  48. #define LDAP_SERVER_LAZY_COMMIT_OID "1.2.840.113556.1.4.619"
  49. #define LDAP_SERVER_LAZY_COMMIT_OID_W L"1.2.840.113556.1.4.619"
  50. //
  51. // Security Descriptor Flag. Data as follows
  52. // SEQUENCE {
  53. // Flags INTEGER
  54. // }
  55. //
  56. #define LDAP_SERVER_SD_FLAGS_OID "1.2.840.113556.1.4.801"
  57. #define LDAP_SERVER_SD_FLAGS_OID_W L"1.2.840.113556.1.4.801"
  58. //
  59. // Tree Delete. No Data.
  60. //
  61. #define LDAP_SERVER_TREE_DELETE_OID "1.2.840.113556.1.4.805"
  62. #define LDAP_SERVER_TREE_DELETE_OID_W L"1.2.840.113556.1.4.805"
  63. //
  64. // Attribute Scoped Query Request:
  65. // SEQUENCE {
  66. // controlType 1.2.840.113556.1.4.1504
  67. // controlValue string
  68. // criticality TRUE
  69. // }
  70. //
  71. // Attribute Scoped Query Response:
  72. // SEQUENCE {
  73. // result ENUMERATED {
  74. // success (0),
  75. // invalidAttributeSyntax (21),
  76. // unwillingToPerform (53),
  77. // affectsMultipleDSAs (71),
  78. // }
  79. // }
  80. //
  81. #define LDAP_SERVER_ASQ_OID "1.2.840.113556.1.4.1504"
  82. #define LDAP_SERVER_ASQ_OID_W L"1.2.840.113556.1.4.1504"
  83. //
  84. // DirSync operation. Data as follows
  85. // SEQUENCE {
  86. // Flags INTEGER
  87. // Size INTEGER
  88. // Cookie OCTET STRING
  89. // }
  90. //
  91. // Flags are listed below.
  92. //
  93. #define LDAP_SERVER_DIRSYNC_OID "1.2.840.113556.1.4.841"
  94. #define LDAP_SERVER_DIRSYNC_OID_W L"1.2.840.113556.1.4.841"
  95. //
  96. // Return extended DNs according to the requested format. Optional data as
  97. // follows
  98. // SEQUENCE {
  99. // Option INTEGER
  100. // }
  101. //
  102. // Option values:
  103. // 0: DN preceded by GUID and SID (if any) in hex string format
  104. // 1: DN preceded by GUID and SID (if any) in standard string format
  105. //
  106. // If no data is provided then option 0 is selected for backwards compat.
  107. //
  108. #define LDAP_SERVER_EXTENDED_DN_OID "1.2.840.113556.1.4.529"
  109. #define LDAP_SERVER_EXTENDED_DN_OID_W L"1.2.840.113556.1.4.529"
  110. //
  111. // Tell DC which server to verify with that a DN exist. Data as follows
  112. // SEQUENCE {
  113. // Flags INTEGER,
  114. // ServerName OCTET STRING // unicode server string
  115. // }
  116. //
  117. #define LDAP_SERVER_VERIFY_NAME_OID "1.2.840.113556.1.4.1338"
  118. #define LDAP_SERVER_VERIFY_NAME_OID_W L"1.2.840.113556.1.4.1338"
  119. //
  120. // Tells server not to generate referrals
  121. //
  122. #define LDAP_SERVER_DOMAIN_SCOPE_OID "1.2.840.113556.1.4.1339"
  123. #define LDAP_SERVER_DOMAIN_SCOPE_OID_W L"1.2.840.113556.1.4.1339"
  124. //
  125. // Server Search Options. Allows the client to pass in flags to control
  126. // various search behaviours. Data as follows
  127. // SEQUENCE {
  128. // Flags INTEGER
  129. // }
  130. //
  131. #define LDAP_SERVER_SEARCH_OPTIONS_OID "1.2.840.113556.1.4.1340"
  132. #define LDAP_SERVER_SEARCH_OPTIONS_OID_W L"1.2.840.113556.1.4.1340"
  133. //
  134. // search option flags
  135. //
  136. #define SERVER_SEARCH_FLAG_DOMAIN_SCOPE 0x1 // no referrals generated
  137. #define SERVER_SEARCH_FLAG_PHANTOM_ROOT 0x2 // search all NCs subordinate
  138. // to search base
  139. //
  140. // This control is used to pass the sid of a security principle
  141. // who's quota is being queried
  142. // SEQUENCE {
  143. // QuerySid OCTET STRING // sid of security principle
  144. // }
  145. //
  146. #define LDAP_SERVER_QUOTA_CONTROL_OID "1.2.840.113556.1.4.1852"
  147. #define LDAP_SERVER_QUOTA_CONTROL_OID_W L"1.2.840.113556.1.4.1852"
  148. //
  149. // End of Server controls
  150. //
  151. //
  152. //
  153. // Operational Attributes
  154. //
  155. #define LDAP_OPATT_BECOME_DOM_MASTER "becomeDomainMaster"
  156. #define LDAP_OPATT_BECOME_DOM_MASTER_W L"becomeDomainMaster"
  157. #define LDAP_OPATT_BECOME_RID_MASTER "becomeRidMaster"
  158. #define LDAP_OPATT_BECOME_RID_MASTER_W L"becomeRidMaster"
  159. #define LDAP_OPATT_BECOME_SCHEMA_MASTER "becomeSchemaMaster"
  160. #define LDAP_OPATT_BECOME_SCHEMA_MASTER_W L"becomeSchemaMaster"
  161. #define LDAP_OPATT_RECALC_HIERARCHY "recalcHierarchy"
  162. #define LDAP_OPATT_RECALC_HIERARCHY_W L"recalcHierarchy"
  163. #define LDAP_OPATT_SCHEMA_UPDATE_NOW "schemaUpdateNow"
  164. #define LDAP_OPATT_SCHEMA_UPDATE_NOW_W L"schemaUpdateNow"
  165. #define LDAP_OPATT_BECOME_PDC "becomePdc"
  166. #define LDAP_OPATT_BECOME_PDC_W L"becomePdc"
  167. #define LDAP_OPATT_FIXUP_INHERITANCE "fixupInheritance"
  168. #define LDAP_OPATT_FIXUP_INHERITANCE_W L"fixupInheritance"
  169. #define LDAP_OPATT_INVALIDATE_RID_POOL "invalidateRidPool"
  170. #define LDAP_OPATT_INVALIDATE_RID_POOL_W L"invalidateRidPool"
  171. #define LDAP_OPATT_ABANDON_REPL "abandonReplication"
  172. #define LDAP_OPATT_ABANDON_REPL_W L"abandonReplication"
  173. #define LDAP_OPATT_DO_GARBAGE_COLLECTION "doGarbageCollection"
  174. #define LDAP_OPATT_DO_GARBAGE_COLLECTION_W L"doGarbageCollection"
  175. //
  176. // Root DSE Attributes
  177. //
  178. #define LDAP_OPATT_SUBSCHEMA_SUBENTRY "subschemaSubentry"
  179. #define LDAP_OPATT_SUBSCHEMA_SUBENTRY_W L"subschemaSubentry"
  180. #define LDAP_OPATT_CURRENT_TIME "currentTime"
  181. #define LDAP_OPATT_CURRENT_TIME_W L"currentTime"
  182. #define LDAP_OPATT_SERVER_NAME "serverName"
  183. #define LDAP_OPATT_SERVER_NAME_W L"serverName"
  184. #define LDAP_OPATT_NAMING_CONTEXTS "namingContexts"
  185. #define LDAP_OPATT_NAMING_CONTEXTS_W L"namingContexts"
  186. #define LDAP_OPATT_DEFAULT_NAMING_CONTEXT "defaultNamingContext"
  187. #define LDAP_OPATT_DEFAULT_NAMING_CONTEXT_W L"defaultNamingContext"
  188. #define LDAP_OPATT_SUPPORTED_CONTROL "supportedControl"
  189. #define LDAP_OPATT_SUPPORTED_CONTROL_W L"supportedControl"
  190. #define LDAP_OPATT_HIGHEST_COMMITTED_USN "highestCommitedUSN"
  191. #define LDAP_OPATT_HIGHEST_COMMITTED_USN_W L"highestCommitedUSN"
  192. #define LDAP_OPATT_SUPPORTED_LDAP_VERSION "supportedLDAPVersion"
  193. #define LDAP_OPATT_SUPPORTED_LDAP_VERSION_W L"supportedLDAPVersion"
  194. #define LDAP_OPATT_SUPPORTED_LDAP_POLICIES "supportedLDAPPolicies"
  195. #define LDAP_OPATT_SUPPORTED_LDAP_POLICIES_W L"supportedLDAPPolicies"
  196. #define LDAP_OPATT_SCHEMA_NAMING_CONTEXT "schemaNamingContext"
  197. #define LDAP_OPATT_SCHEMA_NAMING_CONTEXT_W L"schemaNamingContext"
  198. #define LDAP_OPATT_CONFIG_NAMING_CONTEXT "configurationNamingContext"
  199. #define LDAP_OPATT_CONFIG_NAMING_CONTEXT_W L"configurationNamingContext"
  200. #define LDAP_OPATT_ROOT_DOMAIN_NAMING_CONTEXT "rootDomainNamingContext"
  201. #define LDAP_OPATT_ROOT_DOMAIN_NAMING_CONTEXT_W L"rootDomainNamingContext"
  202. #define LDAP_OPATT_SUPPORTED_SASL_MECHANISM "supportedSASLMechanisms"
  203. #define LDAP_OPATT_SUPPORTED_SASL_MECHANISM_W L"supportedSASLMechanisms"
  204. #define LDAP_OPATT_DNS_HOST_NAME "dnsHostName"
  205. #define LDAP_OPATT_DNS_HOST_NAME_W L"dnsHostName"
  206. #define LDAP_OPATT_LDAP_SERVICE_NAME "ldapServiceName"
  207. #define LDAP_OPATT_LDAP_SERVICE_NAME_W L"ldapServiceName"
  208. #define LDAP_OPATT_DS_SERVICE_NAME "dsServiceName"
  209. #define LDAP_OPATT_DS_SERVICE_NAME_W L"dsServiceName"
  210. #define LDAP_OPATT_SUPPORTED_CAPABILITIES "supportedCapabilities"
  211. #define LDAP_OPATT_SUPPORTED_CAPABILITIES_W L"supportedCapabilities"
  212. //
  213. // End of Operational attributes
  214. //
  215. //
  216. //
  217. // Server Capabilities
  218. //
  219. //
  220. // NT5 Active Directory
  221. //
  222. #define LDAP_CAP_ACTIVE_DIRECTORY_OID "1.2.840.113556.1.4.800"
  223. #define LDAP_CAP_ACTIVE_DIRECTORY_OID_W L"1.2.840.113556.1.4.800"
  224. #define LDAP_CAP_ACTIVE_DIRECTORY_V51_OID "1.2.840.113556.1.4.1670"
  225. #define LDAP_CAP_ACTIVE_DIRECTORY_V51_OID_W L"1.2.840.113556.1.4.1670"
  226. #define LDAP_CAP_ACTIVE_DIRECTORY_LDAP_INTEG_OID "1.2.840.113556.1.4.1791"
  227. #define LDAP_CAP_ACTIVE_DIRECTORY_LDAP_INTEG_OID_W L"1.2.840.113556.1.4.1791"
  228. #define LDAP_CAP_ACTIVE_DIRECTORY_ADAM_OID "1.2.840.113556.1.4.1851"
  229. #define LDAP_CAP_ACTIVE_DIRECTORY_ADAM_OID_W L"1.2.840.113556.1.4.1851"
  230. //
  231. // End of capabilities
  232. //
  233. //
  234. //
  235. // Matching Rules
  236. //
  237. //
  238. // BIT AND
  239. //
  240. #define LDAP_MATCHING_RULE_BIT_AND "1.2.840.113556.1.4.803"
  241. #define LDAP_MATCHING_RULE_BIT_AND_W L"1.2.840.113556.1.4.803"
  242. //
  243. // BIT OR
  244. //
  245. #define LDAP_MATCHING_RULE_BIT_OR "1.2.840.113556.1.4.804"
  246. #define LDAP_MATCHING_RULE_BIT_OR_W L"1.2.840.113556.1.4.804"
  247. //
  248. //
  249. // Extended Requests
  250. //
  251. //
  252. // Fast bind mode.
  253. //
  254. #define LDAP_SERVER_FAST_BIND_OID "1.2.840.113556.1.4.1781"
  255. #define LDAP_SERVER_FAST_BIND_OID_W L"1.2.840.113556.1.4.1781"
  256. //
  257. // DirSync flags
  258. //
  259. // Without this flag, the caller must have the replicate changes right. With this flag,
  260. // the caller needs no rights, but is only allowed to see objects and attributes
  261. // which are accessible to them.
  262. #define LDAP_DIRSYNC_OBJECT_SECURITY (0x1)
  263. // Return parents before children, when parents would otherwise appear later
  264. // in the replication stream.
  265. #define LDAP_DIRSYNC_ANCESTORS_FIRST_ORDER (0x0800)
  266. // Do not return secret data. Always on by default.
  267. #define LDAP_DIRSYNC_PUBLIC_DATA_ONLY (0x2000)
  268. // Without this flag, all the values (up to a limit) in a multi-valued attribute are
  269. // returned when any value changes. With this flag, only the changed values are returned.
  270. #define LDAP_DIRSYNC_INCREMENTAL_VALUES (0x80000000)
  271. #ifdef __cplusplus
  272. }
  273. #endif
  274. #endif // NT_LDAP_H