Source code of Windows XP (NT5)
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.

1099 lines
40 KiB

  1. /*++
  2. Copyright (c) 1987-1996 Microsoft Corporation
  3. Module Name:
  4. iniparm.h
  5. Abstract:
  6. Initiail values of startup parameters.
  7. Author:
  8. Ported from Lan Man 2.0
  9. Revision History:
  10. 21-May-1991 (cliffv)
  11. Ported to NT. Converted to NT style.
  12. 07-May-1992 JohnRo
  13. Use net config helpers for NetLogon.
  14. --*/
  15. #ifndef _INIPARM_
  16. #define _INIPARM_
  17. //
  18. // Upon RegistryChangeNotify, all registry values take effect immediately execpt
  19. // as noted below.
  20. //
  21. //
  22. // Pulse period (in seconds):
  23. //
  24. // Defines the typical pulse frequency. All SAM/LSA changes made within this
  25. // time are collected together. After this time, a pulse is sent to each BDC
  26. // needing the changes. No pulse is sent to a BDC that is up to date.
  27. //
  28. #define DEFAULT_PULSE (5*60) // 5 mins
  29. #define MAX_PULSE (48*60*60) // 2 days
  30. #define MIN_PULSE 60 // 1 min
  31. //
  32. // Pulse concurrency (in number of concurrent mailslot messages).
  33. //
  34. // Netlogon sends pulses to individual BDCs. The BDCs respond asking for any
  35. // database changes. To control the maximum load these responses place on the
  36. // PDC, the PDC will only have this many pulses "pending" at once. The PDC
  37. // should be sufficiently powerful to support this many concurrent replication
  38. // RPC calls.
  39. //
  40. // Increasing this number increases the load on the PDC.
  41. // Decreasing this number increases the time it takes for a domain with a
  42. // large number of BDC to get a SAM/LSA change.
  43. #define DEFAULT_PULSECONCURRENCY 10
  44. #define MAX_PULSECONCURRENCY 500
  45. #define MIN_PULSECONCURRENCY 1
  46. //
  47. // Maximum pulse period (in seconds):
  48. //
  49. // Defines the maximum pulse frequency. Every BDC will be sent at least one
  50. // pulse at this frequency regardless of whether its database is up to date.
  51. //
  52. #define DEFAULT_PULSEMAXIMUM (2*60*60) // 2 hours
  53. #define MAX_PULSEMAXIMUM (48*60*60) // 2 days
  54. #define MIN_PULSEMAXIMUM 60 // 1 min
  55. //
  56. // Pulse timeout period (in seconds):
  57. //
  58. // When a BDC is sent a pulse, it must respond within this time period. If
  59. // not, the BDC is considered to be non-responsive. A non-responsive BDC is
  60. // not counted against the "Pulse Concurrency" limit allowing the PDC to
  61. // send a pulse to another BDC in the domain.
  62. //
  63. // If this number is too large, a domain with a large number of non-responsive
  64. // BDCs will take a long time to complete a partial replication.
  65. //
  66. // If this number is too small, a slow BDC may be falsely accused of being
  67. // non-responsive. When the BDC finally does respond, it will partial
  68. // replicate from the PDC unduly increasing the load on the PDC.
  69. //
  70. #define DEFAULT_PULSETIMEOUT1 10 // 10 seconds
  71. #define MAX_PULSETIMEOUT1 (2*60) // 2 min
  72. #define MIN_PULSETIMEOUT1 1 // 1 second
  73. //
  74. // Maximum Partial replication timeout (in seconds):
  75. //
  76. // Even though a BDC initially responds to a pulse (as described for
  77. // PULSETIMEOUT1), it must continue making replication progress or the
  78. // BDC will be considered non-responsive. Each time the BDC calls the PDC,
  79. // the BDC is given another PULSETIMEOUT2 seconds to be considered responsive.
  80. //
  81. // If this number is too large, a slow BDC (or one which has its replication
  82. // rate artificially governed) will consume one of the PULSECONCURRENCY slots.
  83. //
  84. // If this number is too small, the load on the PDC will be unduly increased
  85. // because of the large number of BDC doing a partial sync.
  86. //
  87. // NOTE: This parameter only affect the cases where a BDC cannot retrieve all the
  88. // changes to the SAM/LSA database in a single RPC call. This will only
  89. // happen if a large number of changes are made to the database.
  90. #define DEFAULT_PULSETIMEOUT2 (5*60) // 5 minutes
  91. #define MAX_PULSETIMEOUT2 (1*60*60) // 1 hour
  92. #define MIN_PULSETIMEOUT2 (1*60) // 1 minute
  93. //
  94. // BDC random backoff (in seconds):
  95. //
  96. // When the BDC receives a pulse, it will back off between zero and RANDOMIZE
  97. // seconds before calling the PDC. In Lanman and NT 3.1, the pulse was
  98. // broadcast to all BDCs simultaneously and the BDCs used this mechanism to
  99. // ensure they didn't overload the PDC. As of NT 3.5x, the pulse is sent
  100. // to individual BDCs so this parameter should be minimized.
  101. //
  102. // This parameter should be smaller than PULSETIMEOUT1.
  103. //
  104. // Consider that the time to replicate a SAM/LSA change to all the BDCs in a
  105. // domain will be greater than:
  106. //
  107. // ((RANDOMIZE/2) * NumberOfBdcsInDomain) / PULSECONCURRENCY
  108. //
  109. #define DEFAULT_RANDOMIZE 1 // 1 secs
  110. #define MAX_RANDOMIZE 120 // 2 mins
  111. #define MIN_RANDOMIZE 0 // 0 secs
  112. //
  113. // ChangeLogSize (in bytes) [NOTE: This parameter is NOT read from the GP section]
  114. //
  115. // This is the size of the Change Log file. Each change to the SAM/LSA database
  116. // is represented by an entry in the change log. The changelog is maintained
  117. // as a circular buffer with the oldest entry being overwritten by the newest
  118. // entry. If a BDC does a partial sync and requests an entry that has been
  119. // overwritten, the BDC is forced to do a full sync.
  120. //
  121. // The minimum (and typical) size of an entry is 32 bytes. Some entries are
  122. // larger. (e.g., a 64K changelog holds about 2000 changes)
  123. //
  124. // This parameter need only be set larger if:
  125. //
  126. // a) full syncs are prohibitively expensive, AND
  127. // b) one or more BDCs are expected to not request a partial sync within 2000
  128. // changes.
  129. //
  130. // For instance, if a BDC dials in nightly to do a partial sync and on some
  131. // days 4000 changes are made to the SAM/LSA database, this parameter should
  132. // be set to 128K.
  133. //
  134. // This parameter need only be set on the PDC. If a different PDC is promoted,
  135. // it should be set on that PDC also.
  136. //
  137. #define DEFAULT_CHANGELOGSIZE (64*1024)
  138. #define MAX_CHANGELOGSIZE (4*1024*1024)
  139. #define MIN_CHANGELOGSIZE (64*1024)
  140. //
  141. // MaximumMailslotMessages (in number of messages)
  142. //
  143. // This parameter determines the maximum number of mailslot messages that will
  144. // be queued to the netlogon service. Even though the Netlogon service is
  145. // designed to process incoming mailslot messages immediately, the netlogon
  146. // service can get backed up processing requests.
  147. //
  148. // Each mailslot message consumes about 1500 bytes of non-paged pool until it
  149. // is process. By setting this parameter low, you can govern the maximum
  150. // amount of non-paged pool that can be consumed.
  151. //
  152. // If you set this parameter too low, netlogon may miss important incoming
  153. // mailslot messages.
  154. //
  155. // Upon RegistryChangeNotify, changes to this value are ignored.
  156. #define DEFAULT_MAXIMUMMAILSLOTMESSAGES 500
  157. #define MAX_MAXIMUMMAILSLOTMESSAGES 0xFFFFFFFF
  158. #define MIN_MAXIMUMMAILSLOTMESSAGES 1
  159. //
  160. // MailslotMessageTimeout (in seconds)
  161. //
  162. // This parameter specifies the maximum acceptable age of an incoming
  163. // mailslot message. If netlogon receives a mailslot messages that arrived
  164. // longer ago than this, it will ignore the message. This allows netlogon
  165. // to process messages that are more recent. The theory is that the client
  166. // that originally sent the older mailslot message is no longer waiting for
  167. // the response so we shouldn't bother sending a response.
  168. //
  169. // If you set this parameter too low, netlogon will ignore important incoming
  170. // mailslot messages.
  171. //
  172. // Ideally, netlogon processes each mailslot message in a fraction of a second.
  173. // This parameter is only significant if the NTAS server is overloaded.
  174. //
  175. #define DEFAULT_MAILSLOTMESSAGETIMEOUT 10
  176. #define MAX_MAILSLOTMESSAGETIMEOUT 0xFFFFFFFF
  177. #define MIN_MAILSLOTMESSAGETIMEOUT 5
  178. //
  179. // MailslotDuplicateTimeout (in seconds)
  180. //
  181. // This parameter specifies the interval over which duplicate incoming
  182. // mailslot messages will be ignored. Netlogon compares each mailslot
  183. // message received with the previous mailslot message received. If the
  184. // previous message was received within this many seconds and the messages
  185. // are identical, this message will be ignored. The theory is that the
  186. // duplicate messages are caused by clients sending on multiple transports and
  187. // that netlogon needs to only reply on one of those transports saving network
  188. // bandwidth.
  189. //
  190. // Set this parameter to zero to disable this feature. You should disable this
  191. // feature if your network is configured such that this machine can see
  192. // certain incoming mailslot messages but can't respond to them. For instance,
  193. // a PDC may be separated from an NT workstation by a bridge/router.
  194. // The bridge/router might filter outgoing NBF broadcasts, but allow incoming
  195. // one. As such, netlogon might respond to an NBF mailslot message (only to
  196. // be filtered out by the bridge/router) and not respond to a subsequent NBT
  197. // mailslot message. Disabling this feature (or preferably reconfiguring the
  198. // bridge/router) solves this problem.
  199. //
  200. // If you set this parameter too high, netlogon will ignore retry attempts
  201. // from a client.
  202. //
  203. #define DEFAULT_MAILSLOTDUPLICATETIMEOUT 2
  204. #define MAX_MAILSLOTDUPLICATETIMEOUT 5
  205. #define MIN_MAILSLOTDUPLICATETIMEOUT 0
  206. //
  207. // ExpectedDialupDelay (in seconds)
  208. //
  209. // This parameter specifies the time it takes for a dialup router to dial when
  210. // sending a message from this client machine to a domain trusted by this client
  211. // machine. Typically, netlogon assumes a domain controller is reachable in a
  212. // short (e.g., 15 seconds) time period. Setting ExpectedDialupDelay informs
  213. // Netlogon to expect an ADDITIONAL delay of the time specified.
  214. //
  215. // Currently, netlogon adjusts the following two times based on the
  216. // ExpectedDialupDelay:
  217. //
  218. // 1) When discovering a DC in a trusted domain, Netlogon sends a 3 mailslot
  219. // messages to the trusted domain at ( 5 + ExpectedDialupDelay/3 ) second
  220. // intervals Synchronous discoveries will not be timed out for 3 times that
  221. // interval.
  222. // 2) An API call over a secure channel to a discovered DC will timeout only
  223. // after (45 + ExpectedDialupDelay) seconds.
  224. //
  225. // This parameter should remain zero unless a dialup router exists between this
  226. // machine and its trusted domain.
  227. //
  228. // If this parameter is set too high, legitimate cases where no DC is available in
  229. // a trusted domain will take an extraordinary amount of time to detect.
  230. //
  231. #define DEFAULT_EXPECTEDDIALUPDELAY 0
  232. #define MAX_EXPECTEDDIALUPDELAY (10*60) // 10 minutes
  233. #define MIN_EXPECTEDDIALUPDELAY 0
  234. //
  235. // ScavengeInterval (in seconds)
  236. //
  237. // This parameter adjusts the interval at which netlogon performs the following
  238. // scavenging operations:
  239. //
  240. // * Checks to see if a password on a secure channel needs to be changed.
  241. //
  242. // * Checks to see if a secure channel has been idle for a long time.
  243. //
  244. // * On DCs, sends a mailslot message to each trusted domain for a DC hasn't been
  245. // discovered.
  246. //
  247. // * On PDC, attempts to add the <DomainName>[1B] netbios name if it hasn't
  248. // already been successfully added.
  249. //
  250. // None of these operations are critical. 15 minutes is optimal in all but extreme
  251. // cases. For instance, if a DC is separated from a trusted domain by an
  252. // expensive (e.g., ISDN) line, this parameter might be adjusted upward to avoid
  253. // frequent automatic discovery of DCs in a trusted domain.
  254. //
  255. #define DEFAULT_SCAVENGEINTERVAL (15*60) // 15 minutes
  256. #define MAX_SCAVENGEINTERVAL (48*60*60) // 2 days
  257. #define MIN_SCAVENGEINTERVAL 60 // 1 minute
  258. //
  259. // LdapSrvPriority
  260. //
  261. // This parameter specifies the "priority" of this DC. A client trying to
  262. // discover a DC in this domain MUST attempt to contact the target DC with the
  263. // lowest-numbered priority. DCs with the same priority SHOULD be tried in
  264. // pseudorandom order.
  265. //
  266. // This value is published on all LDAP SRV records written by the Netlogon service.
  267. //
  268. #define DEFAULT_LDAPSRVPRIORITY 0
  269. #define MAX_LDAPSRVPRIORITY 65535
  270. #define MIN_LDAPSRVPRIORITY 0
  271. //
  272. // LdapSrvWeight
  273. //
  274. // This parameter specifies the "Weight" of this DC. When selecting a DC among
  275. // those that have the same priority, the chance of trying this one first SHOULD
  276. // be proportional to its weight. By convention, a weight of 100 should be used
  277. // if all DCs have the same weight.
  278. //
  279. // This value is published on all LDAP SRV records written by the Netlogon service.
  280. //
  281. #define DEFAULT_LDAPSRVWEIGHT 100
  282. #define MAX_LDAPSRVWEIGHT 65535
  283. #define MIN_LDAPSRVWEIGHT 0
  284. //
  285. // LdapSrvPort
  286. //
  287. // This parameter specifies the TCP and UDP port number the LDAP server listens on.
  288. //
  289. // This value is published on all LDAP SRV records written by the Netlogon service.
  290. //
  291. #define DEFAULT_LDAPSRVPORT 389
  292. #define MAX_LDAPSRVPORT 65535
  293. #define MIN_LDAPSRVPORT 0
  294. //
  295. // LdapGcSrvPort
  296. //
  297. // This parameter specifies the TCP and UDP port number the LDAP server listens
  298. // on for Global Catalog queries.
  299. //
  300. // This value is published on all LDAP SRV records written by the Netlogon service.
  301. //
  302. #define DEFAULT_LDAPGCSRVPORT 3268
  303. #define MAX_LDAPGCSRVPORT 65535
  304. #define MIN_LDAPGCSRVPORT 0
  305. //
  306. // KdcSrvPort
  307. //
  308. // This parameter specifies the TCP port number the KDC server listens on.
  309. //
  310. // This value is published on all KDC SRV records written by the Netlogon service.
  311. //
  312. #define DEFAULT_KDCSRVPORT 88
  313. #define MAX_KDCSRVPORT 65535
  314. #define MIN_KDCSRVPORT 0
  315. //
  316. // KerbIsDoneWithJoinDomainEntry (dword) [NOTE: This parameter is NOT read from the GP section]
  317. //
  318. // This is a private registry between joindomain, kerberos and netlogon.
  319. // IF set to 1, it specifies that Kerberos is done reading the join domain
  320. // entry dumped by join domain and netlogon should delete it.
  321. //
  322. // Defaults to 0
  323. #define DEFAULT_KERBISDDONEWITHJOIN 0
  324. #define MAX_KERBISDDONEWITHJOIN 1
  325. #define MIN_KERBISDDONEWITHJOIN 0
  326. //
  327. // DnsTtl (in seconds)
  328. //
  329. // This parameter specifies the "Time To Live" for all DNS records registered
  330. // by Netlogon. The "Time To Live" specifies the amount of time a client
  331. // can safely cache the DNS record.
  332. //
  333. // A value of zero indicates that the record will not be cached on the client.
  334. //
  335. // One should not pick a value that is too large. Consider a client that gets
  336. // the DNS records for the DCs in a domain. If a particular DC is down at the
  337. // time of the query, the client will not become aware of that DC even if all
  338. // the other DCs become unavailable.
  339. //
  340. #define DEFAULT_DNSTTL (10 * 60) // 10 minutes
  341. #define MAX_DNSTTL 0x7FFFFFFF
  342. #define MIN_DNSTTL 0
  343. //
  344. // DnsRefreshInterval (in seconds)
  345. //
  346. // This parameter specifies how frequently Netlogon will re-register DNS
  347. // names that have already been registered.
  348. //
  349. // DNS is a distributed service. There are certain failure conditions where a
  350. // dynamically registered name gets lost.
  351. //
  352. // The actual refresh interval starts at 5 minutes then doubles until it
  353. // reaches DnsRefreshInterval.
  354. //
  355. #define DEFAULT_DNSREFRESHINTERVAL (24 * 60 * 60) // 24 hours
  356. #define MAX_DNSREFRESHINTERVAL (0xFFFFFFFF / 1000) // 49 days
  357. #define MIN_DNSREFRESHINTERVAL (5 * 60) // 5 minutes
  358. //
  359. // DnsFailedDeregisterTimeout (in seconds)
  360. //
  361. // Netlogon tries to deregister DNS records which were registered in the past
  362. // but are no longer needed. If a failure occurs to deregister, Netlogon will
  363. // retry to deregister at the scavenging time. This parameter specifies the
  364. // timeout when Netlogon should give up deregistering a particular DNS record
  365. // after a consecutive series of failed deregistrations on a given service start.
  366. //
  367. #define DEFAULT_DNSFAILEDDEREGTIMEOUT (48 * 60 * 60) // 48 hours.
  368. #define MAX_DNSFAILEDDEREGTIMEOUT 0xFFFFFFFF // Infinite (never give up).
  369. // Any period larger than
  370. // 0xFFFFFFFF/1000 sec = 49 days
  371. // will be treated as infinity.
  372. #define MIN_DNSFAILEDDEREGTIMEOUT 0 // Give up after the first failure
  373. //
  374. // MaximumPasswordAge (in days)
  375. //
  376. // This parameter gives the maximum amount of time that can pass
  377. // before a machine account's password must be changed on the PDC.
  378. //
  379. #define DEFAULT_MAXIMUMPASSWORDAGE (30) // 30 days
  380. #define MIN_MAXIMUMPASSWORDAGE (1) // 1 day
  381. #define MAX_MAXIMUMPASSWORDAGE (1000000) // 1,000,000 days
  382. //
  383. // SiteName
  384. //
  385. // This parameter specifies the name of the site this machine is in. This
  386. // value overrides any dynamically determined value.
  387. //
  388. // This parameter is only used on Member Workstations and Member Servers.
  389. //
  390. //
  391. // DynamicSiteName [NOTE: This parameter is NOT read from the GP section]
  392. //
  393. // This parameter specifies the name of the site this machine is in. This
  394. // value is dynamically determined and should not be changed.
  395. //
  396. // This parameter is only used on Member Workstations and Member Servers.
  397. //
  398. //
  399. // SiteCoverage
  400. //
  401. // A multivalued property listing the sites that this DC registers itself for.
  402. // This DC considers itself 'close' to the sites listed.
  403. //
  404. // This list is in addition to:
  405. // the site this DC is actually in.
  406. // the list of sites determined as described by the AutoSiteCoverage parameter.
  407. //
  408. //
  409. // GcSiteCoverage
  410. //
  411. // A multivalued property listing the sites that this DC registers itself for in
  412. // its role as a GC
  413. // This DC considers itself 'close' to the sites listed.
  414. //
  415. // This list is in addition to:
  416. // the site this DC is actually in.
  417. //
  418. //
  419. // NdncSiteCoverage
  420. //
  421. // A multivalued property listing the sites that this LDAP server registers itself for in
  422. // its role as a non-domain NC (NDNC)
  423. // This LDAP server considers itself 'close' to the sites listed.
  424. //
  425. // This list is in addition to:
  426. // the site this LDAP server is actually in.
  427. //
  428. // To specify for which NDNC a given site is covered, the site name should contain
  429. // backslash so that the name preceding the backslash is the NDNC name and the name
  430. // following the backslash is the name of the site that is covered for the given NDNC.
  431. // For example:
  432. //
  433. // Ndnc1\Site1A
  434. // Ndnc1\Site1B
  435. // Ndnc2\Site2A
  436. // Ndnc2\Site2B
  437. //
  438. // In this example this LDAP server will cover Site1A and Site1B for clients from NDNC
  439. // Ndnc1. Similarly, it will cover Site2A and Site2B for clients from NDNC Ndnc2.
  440. // If the backslash is absent, it will be assumed that the given site is covered
  441. // for all NDNCs this LDAP server services.
  442. //
  443. //
  444. // AutoSiteCoverage (Boolean)
  445. //
  446. // Specifies whether the site coverage for this DC should be automatically
  447. // determined
  448. //
  449. // If TRUE, the sites this DC covers is determined by the following algorithm.
  450. // For each site that has no DCs for this domain (the target site), the site
  451. // this DC // is in might be chosen to "cover" the site. The following
  452. // criteria is used:
  453. //
  454. // * Smaller site link cost.
  455. // * For sites where the above is equal, the site having the most DCs is chosen.
  456. // * For sites where the above is equal, the site having the alphabetically least
  457. // name is chosen.
  458. //
  459. // If the site this DC is in is chosen to "cover" the target site, then this DC
  460. // will cover the target site. The above algorithm is repeated for each target site.
  461. //
  462. // The computed list augments the list of covered sites specified by the
  463. // SiteCoverage parameter.
  464. //
  465. // Defaults to TRUE.
  466. //
  467. //
  468. // AllowReplInNonMixed
  469. //
  470. // This boolean allows an NT 4.0 (or 3.x) BDC to replicate from this NT 5.0 PDC
  471. // even though this DC is in NonMixed mode.
  472. //
  473. // Upon RegistryChangeNotify, changes to this value are ignored.
  474. #define DEFAULT_ALLOWREPLINNONMIXED 0
  475. //
  476. // SignSecureChannel (Boolean)
  477. //
  478. // Specifies that all outgoing secure channel traffic should be signed.
  479. //
  480. // Defaults to TRUE. If SealSecureChannel is also TRUE, Seal overrides.
  481. //
  482. // Upon RegistryChangeNotify, changes to this value on affect secure channels that
  483. // are setup after the notification is received.
  484. //
  485. // SealSecureChannel (Boolean)
  486. //
  487. // Specifies that all outgoing secure channel traffic should be sealed (encrypted)
  488. //
  489. // Defaults to TRUE.
  490. //
  491. // Upon RegistryChangeNotify, changes to this value on affect secure channels that
  492. // are setup after the notification is received.
  493. //
  494. // RequireSignOrSeal (Boolean)
  495. //
  496. // Requires that all outgoing secure channel traffic should be signed or sealed.
  497. // Without this flag, the ability is negotiated with the DC.
  498. //
  499. // This flag should only be set if ALL of the DCs in ALL trusted domains support
  500. // signing and sealing.
  501. //
  502. // The SignSecureChannel and SealSecureChannel parameters are used to determine
  503. // whether signing or sealing are actually done. It this parameter is true,
  504. // SignSecureChannel is implied to be TRUE.
  505. //
  506. // Defaults to FALSE.
  507. //
  508. // Upon RegistryChangeNotify, changes to this value on affect secure channels that
  509. // are setup after the notification is received.
  510. //
  511. // RequireStrongKey (Boolean)
  512. //
  513. // Requires that all outgoing secure channel traffic should require a strong key.
  514. // Without this flag, the key strength is negotiate with the DC.
  515. //
  516. // This flag should only be set if ALL of the DCs in ALL trusted domains support
  517. // strong keys.
  518. //
  519. // Defaults to FALSE.
  520. //
  521. // Upon RegistryChangeNotify, changes to this value on affect secure channels that
  522. // are setup after the notification is received.
  523. //
  524. // CloseSiteTimeout (in seconds):
  525. //
  526. // If a client cannot find a DC in a site that is close to it, Netlogon will
  527. // periodically try to find a close DC. It will try to find a close DC when:
  528. //
  529. // * An interactive logon uses pass through authentication on the secure channel.
  530. // * CloseSiteTimeout has elapsed since the last attempt, and any other attempt
  531. // is made to use the secure channel (e.g., pass through authentication of
  532. // network logons)
  533. //
  534. // That means that Netlogon only attempts to find a close DC "on demand".
  535. //
  536. // If this number is too large, a client will never try to find a close DC if
  537. // one is not available on boot.
  538. //
  539. // If this number is too small, secure channel traffic will be un-necessarily
  540. // be slowed down by discovery attempts.
  541. //
  542. #define DEFAULT_CLOSESITETIMEOUT (15*60) // 15 minutes
  543. #define MAX_CLOSESITETIMEOUT (0xFFFFFFFF/1000) // 49 days
  544. #define MIN_CLOSESITETIMEOUT (1*60) // 1 minute
  545. //
  546. // SiteNameTimeout (in seconds):
  547. //
  548. // If the age of the site name is more than SiteNameTimeout on the client,
  549. // the client will attempt to synchronize the site name with the server.
  550. // This will be done only when the site name needs to be returned, i.e. on
  551. // demand.
  552. //
  553. #define DEFAULT_SITENAMETIMEOUT (5*60) // 5 minutes
  554. #define MAX_SITENAMETIMEOUT (0xFFFFFFFF/1000) // 49 days
  555. #define MIN_SITENAMETIMEOUT (0) // 0 minutes
  556. //
  557. // Sundry flags
  558. //
  559. #define DEFAULT_DISABLE_PASSWORD_CHANGE 0
  560. #define DEFAULT_REFUSE_PASSWORD_CHANGE 0
  561. #define DEFAULT_SYSVOL L"SYSVOL\\SYSVOL"
  562. #define DEFAULT_SCRIPTS L"\\SCRIPTS"
  563. //
  564. // DuplicateEventlogTimeout (in seconds):
  565. //
  566. // The Netlogon service keeps track of eventlog messages it has logged in the
  567. // past. Any duplicate eventlog message logged within DuplicateEventlogMessage
  568. // seconds will not be logged.
  569. //
  570. // Set this value to zero to have all messages be logged.
  571. //
  572. #define DEFAULT_DUPLICATEEVENTLOGTIMEOUT (4*60*60) // 4 hours
  573. #define MAX_DUPLICATEEVENTLOGTIMEOUT (0xFFFFFFFF/1000) // 49 days
  574. #define MIN_DUPLICATEEVENTLOGTIMEOUT (0) // 0 seconds
  575. //
  576. // SysVolReady (Boolean)
  577. //
  578. // This is a private registry entry that indicates whether the SYSVOL share is
  579. // ready to be shared. It is set by DcPromo, Backup, and FRS at appropriate times
  580. // to inidcate the replication state of the SYSVOL share.
  581. //
  582. // This boolean is only used on a DC.
  583. //
  584. // If 0, the SYSVOL share will not be shared and this DC will not indicate it is
  585. // a DC to DsGetDcName calls.
  586. //
  587. // If non-zero, the SYSVOL share will be shared.
  588. //
  589. //
  590. // UseDynamicDns (Boolean)
  591. //
  592. // Specifies that a DC is to dynamically register DNS names in DNS using
  593. // dynamic DNS. If FALSE, Dynamic DNS is avoided and the records specified
  594. // in %windir%\system32\config\netlogon.dns should be manually registered in DNS.
  595. //
  596. // Defaults to TRUE
  597. //
  598. // RegisterDnsARecords (Boolean)
  599. //
  600. // Specifies that the DC is to register DNS A records for the domain.
  601. // If the DC is a GC, specifies that the DC is to register DNS A records for
  602. // the GC.
  603. //
  604. // If FALSE, the records will not be registered and older LDAP implementations
  605. // (ones that do not support SRV records) will not be able to locate the LDAP
  606. // server on this DC.
  607. //
  608. // Defaults to TRUE
  609. //
  610. // AvoidPdcOnWan (Boolean)
  611. //
  612. // This parameter specifies if BDC should send any validation/synchronization
  613. // requests to PDC. The validation against PDC is normally performed if the
  614. // user does not validate on BDC. This validation will be avoided if AvoidPdcOnWan
  615. // is set to TRUE and PDC and BDC are on different sites. Likewise, if this key is
  616. // set to TRUE and a BDC and the PDC are in different sites, then the new password
  617. // info being updated on a BDC will not be immediately propagated to the PDC. (The
  618. // new password will be replicated on the PDC by DS replication, not by Netlogon.)
  619. //
  620. // Defaults to FALSE.
  621. //
  622. // MaxConcurrentApi (Number of calls)
  623. //
  624. // This parameter specifies the maximum number of concurrent API calls that can
  625. // be active over the secure channel at any one time.
  626. //
  627. // Increasing this parameter may improve throughput on the secure channel.
  628. //
  629. // This parameter currently only affect Logon APIs. They may affect other secure
  630. // channel operations in the future.
  631. //
  632. // Concurrent API calls are only possible if the secure channel is signed or sealed.
  633. //
  634. // If this parameter is set too large, this machine will place an excessive load
  635. // on the DC the secure channel is to.
  636. //
  637. // The default value is 0. Zero will use 1 concurrent API call on member workstations
  638. // and DCs. Zero implies 2 concurrent API calls on member servers
  639. //
  640. //
  641. #define DEFAULT_MAXCONCURRENTAPI 0
  642. #define MAX_MAXCONCURRENTAPI 10
  643. #define MIN_MAXCONCURRENTAPI 0
  644. //
  645. // AvoidDnsDeregOnShutdown (Boolean)
  646. //
  647. // This parameter specifies if DNS record deregistration should be avoided on shutting
  648. // down netlogon. If set to FALSE, it can be used to force such deregistrations for
  649. // debugging or some other purposes. However, setting this value to FALSE may brake the
  650. // DS replication, as the following example shows. Suppose we have two DS intergrated
  651. // DNS servers, A and B which are authoritative for a particular zone and use each other
  652. // as secondary DNS servers for that zone. Suppose Netlogon shuts down on B and deregisters
  653. // its records. That gets propagated to A. Then netlogon is started on B and the records
  654. // are re-registered on B. Now A needs to do its pull ssync from B. To do that, the DS uses
  655. // B's DsaGuid record (of the form <DsaGuid>._msdcs.<DnsForestName>). But the record is
  656. // missing on A and A is authoritative for that zone, so A is not going to find B and cannot
  657. // pull from B.
  658. //
  659. // Defaults to TRUE.
  660. //
  661. // DnsUpdateOnAllAdapters (Boolean)
  662. //
  663. // This parameter specifies whether DNS updates should be sent over all available
  664. // adapters including those where dynamic DNS updates are normally disabled.
  665. // DHCP initiated A record updates are not sent through such adapters.
  666. // An adapter that is connected to external network (e.g. Internet) is normally
  667. // marked as such through the UI.
  668. // However, there may be a need to update Netlogon SRV records through such adapters,
  669. // hence the need for this parameter. Note that not only SRV records, but Netlogon's
  670. // A records as well will be updated through all adapters if this parameter is TRUE,
  671. // but it should not cause any significantly undesired behavior since Netlogon's A
  672. // records are rarely used.
  673. //
  674. // Defaults to FALSE.
  675. //
  676. // DnsAvoidRegisterRecords
  677. //
  678. // A multivalued property listing the mnemonics for names of DNS records which
  679. // this DC should not register. The mnemonics uses the convention for descriptive
  680. // names of records used in the table of all records for this server (see
  681. // NlDcDnsNameTypeDesc[] in nlcommon.h). The descriptive name of each record is
  682. // prefixed by "NlDns". For example, "NlDnsLdapIpAddress", "NlDnsLdapAtSite", etc.
  683. // To avoid registering one of the records, one should use the suffix following
  684. // "NlDns" in the descriptive name of that record. For instance, to skip registering
  685. // the NlDnsLdapIpAddress record, one should enter "LdapIpAddress" as one of the
  686. // values for this maltivalued property.
  687. //
  688. // This is the most flexible way of avoiding DNS registrations for particular
  689. // records. It superceeds all other ways which enable DNS registrations through
  690. // the registry. For instance, if RegisterDnsARecords is expicitly set to 1
  691. // while the A record mnemonic is listed for DnsAvoidRegisterRecords, no A record
  692. // will be registered.
  693. //
  694. //
  695. // NegativeCachePeriod (in seconds):
  696. //
  697. // Specifies the amount of time that DsGetDcName will remember that a DC couldn't
  698. // be found in a domain. If a subsequent attempt is made within this time,
  699. // the DsGetDcName call will immediately fail without attempting to find a DC again.
  700. //
  701. // If this number is too large, a client will never try to find a DC again if the
  702. // DC is initially unavailable
  703. //
  704. // If this number is too small, every call to DsGetDcName will have to attempt
  705. // to find a DC even when none is available.
  706. //
  707. #define DEFAULT_NEGATIVECACHEPERIOD 45 // 45 seconds
  708. #define MIN_NEGATIVECACHEPERIOD 0 // No minimum
  709. #define MAX_NEGATIVECACHEPERIOD (7*24*60*60) // 7 days
  710. //
  711. // BackgroundRetryInitialPeriod (in seconds):
  712. //
  713. // Some applications periodically try to find a DC. If the DC isn't available, these
  714. // periodic retries can be costly in dial-on-demand scenarios. This registry value
  715. // defines the minimum amount of elapsed time before the first retry will occur.
  716. //
  717. // The value only affects callers of DsGetDcName that have specified the
  718. // DS_BACKGROUND_ONLY flag.
  719. //
  720. // If a value smaller than NegativeCachePeriod is specified, NegativeCachePeriod will
  721. // be used.
  722. //
  723. // If this number is too large, a client will never try to find a DC again if the
  724. // DC is initially unavailable
  725. //
  726. // If this number is too small, periodic DC discovery traffic may be excessive in
  727. // cases where the DC will never become available.
  728. //
  729. #define DEFAULT_BACKGROUNDRETRYINITIALPERIOD (10*60) // 10 minutes
  730. #define MIN_BACKGROUNDRETRYINITIALPERIOD 0 // NegativeCachePeriod
  731. #define MAX_BACKGROUNDRETRYINITIALPERIOD (0xFFFFFFFF/1000) // 49 days
  732. //
  733. // BackgroundRetryMaximumPeriod (in seconds):
  734. //
  735. // Some applications periodically try to find a DC. If the DC isn't available, these
  736. // periodic retries can be costly in dial-on-demand scenarios. This registry value
  737. // defines the maximum interval the retries will be backed off to. That is, if
  738. // the first retry is after 10 minutes, the second will be after 20 minutes, then after 40.
  739. // This continues until the retry interval is BackgroundRetryMaximumPeriod. That interval
  740. // will continue until BackgroundRetryQuitTime is reached.
  741. //
  742. // The value only affects callers of DsGetDcName that have specified the
  743. // DS_BACKGROUND_ONLY flag.
  744. //
  745. // If a value smaller that BackgroundRetryInitialPeriod is specified,
  746. // BackgroundRetryInitialPeriod will be used.
  747. //
  748. // If this number is too large, a client will try very infrequently after
  749. // sufficient consecutive failures resulting in a backoff to BackgroundRetryMaximumPeriod.
  750. //
  751. // If this number is too small, periodic DC discovery traffic may be excessive in
  752. // cases where the DC will never become available.
  753. //
  754. #define DEFAULT_BACKGROUNDRETRYMAXIMUMPERIOD (60*60) // 60 minutes
  755. #define MIN_BACKGROUNDRETRYMAXIMUMPERIOD 0 // BackgroundRetryInitialPeriod
  756. #define MAX_BACKGROUNDRETRYMAXIMUMPERIOD (0xFFFFFFFF/1000) // 49 days
  757. //
  758. // BackgroundRetryQuitTime (in seconds):
  759. //
  760. // Some applications periodically try to find a DC. If the DC isn't available, these
  761. // periodic retries can be costly in dial-on-demand scenarios. This registry value
  762. // defines the maximum interval the retries will be backed off to. That is, if
  763. // the first retry is after 10 minutes, the second will be after 20 minutes, then after 40.
  764. // This continues until the retry interval is BackgroundRetryMaximumPeriod. That interval
  765. // will continue until BackgroundRetryQuitTime is reached.
  766. //
  767. // The value only affects callers of DsGetDcName that have specified the
  768. // DS_BACKGROUND_ONLY flag.
  769. //
  770. // If a value smaller that BackgroundRetryMaximumPeriod is specified,
  771. // BackgroundRetryMaximumPeriod will be used.
  772. //
  773. // 0 means to never quit retrying.
  774. //
  775. // If this number is too small, a client will eventually stop trying to find a DC
  776. //
  777. #define DEFAULT_BACKGROUNDRETRYQUITTIME 0 // Infinite
  778. #define MIN_BACKGROUNDRETRYQUITTIME 0 // BackgroundRetryMaximumPeriod
  779. #define MAX_BACKGROUNDRETRYQUITTIME (0xFFFFFFFF/1000) // 49 days
  780. //
  781. // BackgroundSuccessfulRefreshPeriod (in seconds):
  782. //
  783. // When a positive cache entry is old (older than the successful refresh interval),
  784. // the DC discovery routine will ping the cached DC to refresh its info before
  785. // returning that DC to the caller. Here we distiguish between background
  786. // callers which periodically perform DC discovery and the rest of the callers
  787. // because they have different characteristics. Namely, for background callers
  788. // which call the DC locator frequently, the cache refresh shouldn't happen
  789. // frequently to avoid extensive network overhead and load on DCs. In fact,
  790. // the default for background callers is to never refresh the info. If the cached
  791. // DC no longer plays the same role, a background caller will detect this change
  792. // when it performs its operation on that DC in which case it will call us back
  793. // with forced rediscovery bit set.
  794. //
  795. #define DEFAULT_BACKGROUNDREFRESHPERIOD 0xFFFFFFFF // Infinite - never refresh
  796. #define MIN_BACKGROUNDREFRESHPERIOD 0 // Always refresh
  797. #define MAX_BACKGROUNDREFRESHPERIOD 0xFFFFFFFF // Infinite. Any period larger than
  798. // 0xFFFFFFFF/1000 sec = 49 days
  799. // will be treated as infinity
  800. //
  801. // NonBackgroundSuccessfulRefreshPeriod (in seconds):
  802. //
  803. // See the description of BackgroundSuccessfulRefreshPeriod
  804. //
  805. #define DEFAULT_NONBACKGROUNDREFRESHPERIOD 1800 // 30 minutes
  806. #define MIN_NONBACKGROUNDREFRESHPERIOD 0 // Always refresh
  807. #define MAX_NONBACKGROUNDREFRESHPERIOD 0xFFFFFFFF // Infinite. Any period larger than
  808. // 0xFFFFFFFF/1000 sec = 49 days
  809. // will be treated as infinity
  810. //
  811. // MaxLdapServersPinged (DWORD)
  812. //
  813. // This parameter specifies the maximum number of DCs that should be
  814. // pinged using LDAP during a DC discovery attempt. If this value is
  815. // too large, a greater network traffic may be imposed and the DC discovery
  816. // may take longer to return. If this number is too small, it may decrease
  817. // chances for successful DC discovery if none of the pinged DCs responds
  818. // in a timely manner.
  819. //
  820. // The default value of 55 has been chosen so that the discovery attempt
  821. // takes roughly 15 seconds max. We make up to 2 loops through DC addresses
  822. // pinging each address on the list with the following distribution for
  823. // response wait time:
  824. //
  825. // For the first 5 DCs the wait time is 0.4 seconds per ping
  826. // For the next 5 DCs the wait time is 0.2 seconds per ping
  827. // For the rest of 45 DCs the wait time is 0.1 seconds per ping
  828. //
  829. // This will take (5*0.4 + 5*0.2 + 45*0.1) = 7.5 seconds per loop assuming
  830. // that each DC has just one IP address. It will take longer if some DCs have
  831. // more than one IP address.
  832. //
  833. // The rational behind this distribution is that we want to reduce the network
  834. // traffic and reduce chances for network flooding (that is harmful for DCs)
  835. // in case all DCs are slow to respond due to high load. Thus, the first 10 DCs
  836. // have higher chances to be discovered before we impose greater network traffic
  837. // by pinging the rest of DCs. If the first 10 DCs happen to be slow we have to
  838. // reduce the wait timeout to a minimum as we want to cover a reasonable number
  839. // of DCs in the time left.
  840. //
  841. #define DEFAULT_MAXLDAPSERVERSPINGED 55
  842. #define MIN_MAXLDAPSERVERSPINGED 1
  843. #define MAX_MAXLDAPSERVERSPINGED 0xFFFFFFFF
  844. //
  845. // AllowSingleLabelDnsDomain (Boolean)
  846. //
  847. // By default, the DC locator will not attempt DNS specific discovery for single
  848. // labeled domain names. This is done to avoid spurious DNS queries since DNS
  849. // domain names are usually multi labeled. However, this parameter may be used to
  850. // allow DNS specific discoveries for single labeled domain names which may exist
  851. // in a specific customer deployment.
  852. //
  853. // Defaults to FALSE.
  854. //
  855. //
  856. // Nt4Emulator (Boolean)
  857. //
  858. // This parameter specifies whether this DC should emulate the behavior of an NT4.0 DC.
  859. // Emulation of the NT4.0 behavior is desirable when the first Windows 2000 or newer
  860. // DC is promoted to the PDC in an NT4.0 domain with a huge number of alredy existing
  861. // Windows 2000 clients. Unless we emulate the NT4.0 behavior, all the Windows 2000
  862. // clients will stick with the Windows 2000 or newer DC upon learning about the domain
  863. // upgrade thereby potentially overloading the DC.
  864. //
  865. // This parameter is ignored on non-DC. If this parameter is set to TRUE, the following
  866. // takes place on a DC:
  867. //
  868. // * Incoming LDAP locator pings are ignored unless the ping comes
  869. // from an admin machine (see NeutralizeNt4Emulator description below).
  870. //
  871. // * The flags negotiated during the incoming secure channel setup
  872. // will be set to at most what an NT4.0 DC would support unless
  873. // the channel setup comes form an admind machine (see NeutralizeNt4Emulator
  874. // description below).
  875. //
  876. // Defaults to FALSE.
  877. //
  878. //
  879. // NeutralizeNt4Emulator (Boolean)
  880. //
  881. // This parameter specifies whether this machine should indicate in the relevant
  882. // communication with a DC that the DC should avoid the NT4.0 emulation mode (see
  883. // Nt4Emulator description above). If this parameter is TRUE, the machine is said
  884. // to be an admin machine.
  885. //
  886. // Defaults to FALSE on a non-DC. Defaults to TRUE on a DC.
  887. //
  888. //
  889. // Structure to hold all of the parameters.
  890. //
  891. typedef struct _NETLOGON_PARAMETERS {
  892. ULONG DbFlag;
  893. ULONG LogFileMaxSize;
  894. ULONG Pulse;
  895. ULONG PulseMaximum;
  896. ULONG PulseConcurrency;
  897. ULONG PulseTimeout1;
  898. ULONG PulseTimeout2;
  899. BOOL DisablePasswordChange;
  900. BOOL RefusePasswordChange;
  901. ULONG Randomize;
  902. ULONG MaximumMailslotMessages;
  903. ULONG MailslotMessageTimeout;
  904. ULONG MailslotDuplicateTimeout;
  905. ULONG ExpectedDialupDelay;
  906. ULONG ScavengeInterval;
  907. ULONG LdapSrvPriority;
  908. ULONG LdapSrvWeight;
  909. ULONG LdapSrvPort;
  910. ULONG LdapGcSrvPort;
  911. ULONG KdcSrvPort;
  912. ULONG DnsTtl;
  913. ULONG DnsRefreshInterval;
  914. ULONG CloseSiteTimeout;
  915. ULONG SiteNameTimeout;
  916. ULONG DnsFailedDeregisterTimeout;
  917. ULONG DuplicateEventlogTimeout;
  918. ULONG KerbIsDoneWithJoinDomainEntry;
  919. ULONG MaxConcurrentApi;
  920. ULONG MaximumPasswordAge;
  921. ULONG NegativeCachePeriod;
  922. ULONG BackgroundRetryInitialPeriod;
  923. ULONG BackgroundRetryMaximumPeriod;
  924. ULONG BackgroundRetryQuitTime;
  925. ULONG BackgroundSuccessfulRefreshPeriod;
  926. ULONG NonBackgroundSuccessfulRefreshPeriod;
  927. ULONG MaxLdapServersPinged;
  928. LPWSTR UnicodeSysvolPath;
  929. LPWSTR UnicodeScriptPath;
  930. LPWSTR SiteName;
  931. BOOL SiteNameConfigured;
  932. LPWSTR SiteCoverage;
  933. LPWSTR GcSiteCoverage;
  934. LPWSTR NdncSiteCoverage;
  935. BOOL AutoSiteCoverage;
  936. LPWSTR DnsAvoidRegisterRecords;
  937. BOOL AvoidSamRepl;
  938. BOOL AvoidLsaRepl;
  939. BOOL AllowReplInNonMixed;
  940. BOOL SignSecureChannel;
  941. BOOL SealSecureChannel;
  942. BOOL RequireSignOrSeal;
  943. BOOL RequireStrongKey;
  944. BOOL SysVolReady;
  945. BOOL UseDynamicDns;
  946. BOOL RegisterBeta2Dns;
  947. BOOL RegisterDnsARecords;
  948. BOOL AvoidPdcOnWan;
  949. BOOL AvoidDnsDeregOnShutdown;
  950. BOOL DnsUpdateOnAllAdapters;
  951. BOOL Nt4Emulator;
  952. BOOL NeutralizeNt4Emulator;
  953. BOOL AllowSingleLabelDnsDomain;
  954. //
  955. // Parameters converted to 100ns units
  956. //
  957. LARGE_INTEGER PulseMaximum_100ns;
  958. LARGE_INTEGER PulseTimeout1_100ns;
  959. LARGE_INTEGER PulseTimeout2_100ns;
  960. LARGE_INTEGER MailslotMessageTimeout_100ns;
  961. LARGE_INTEGER MailslotDuplicateTimeout_100ns;
  962. LARGE_INTEGER MaximumPasswordAge_100ns;
  963. LARGE_INTEGER BackgroundRetryQuitTime_100ns;
  964. //
  965. // Other computed parameters
  966. //
  967. ULONG ShortApiCallPeriod;
  968. ULONG DnsRefreshIntervalPeriod;
  969. } NETLOGON_PARAMETERS, *PNETLOGON_PARAMETERS;
  970. #endif // _INIPARM_