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.

701 lines
25 KiB

  1. /*++
  2. Copyright (c) 1997-1999 Microsoft Corporation
  3. Module Name:
  4. config.h
  5. Abstract:
  6. Config parameters for the NT File Replication Service.
  7. All configuration parameters that come from the registry are defined in a
  8. Key Context table in config.c. The struct FRS_REGISTRY_KEY, defined
  9. below, defines the data format for each table entry. An extensive list
  10. of flags defined below govern the processing of registry keys, e.g.
  11. generate and event log entry or not, range check the value or not, allow
  12. a builtin default value or not, etc.
  13. To add a new registry key to FRS do the following:
  14. 1. Add key code to the FRS_REG_KEY_CODE enum below.
  15. 2. Create a new entry in the Key Context table in config.c
  16. Look at examples for other keys that may have similar properties
  17. to your new key.
  18. 3. Add calls to CfgRegxxx functions to read or write the key.
  19. If you set the Key Context up to supply a default value the call to the
  20. CfgRegReadxxx functions will always return a usable value. In addition if
  21. the appropriate flags are set these functions will put a message in the
  22. FRS event log when the user has specified a bad value for the key or a
  23. required key was not found. The CfgRegxxx functions also put error
  24. messages in the Debug Trace Log so in many cases the caller does not need
  25. to test the return status to log an error or use a default or add code to
  26. range check a parameter.
  27. Author:
  28. David Orbits (davidor) - 4-Mar-1997
  29. Major Revision July-1999.
  30. Revision History:
  31. --*/
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35. typedef struct _FRS_REGISTRY_KEY {
  36. PWCHAR KeyName; // Registry key string.
  37. PWCHAR ValueName; // Name of registry value.
  38. DWORD Units; // UNITS_DAYS, UNITS_HOURS, etc.
  39. DWORD RegValueType; // Registry Data type for value
  40. DWORD DataValueType; // FRS data type code from FRS_DATA_TYPES for conversion.
  41. DWORD ValueMin; // Minimum data value, or string len
  42. DWORD ValueMax; // Maximum Data value, or string len
  43. DWORD ValueDefault; // Default data value if not present.
  44. DWORD EventCode; // Event log error code
  45. PWCHAR StringDefault; // Default value for string types.
  46. LONG FrsKeyCode; // Frs code name for this key.
  47. ULONG Flags; // See below.
  48. } FRS_REGISTRY_KEY, *PFRS_REGISTRY_KEY;
  49. #define EVENT_FRS_NONE 0
  50. //
  51. // Registry key flag definitions.
  52. //
  53. #define FRS_RKF_KEY_PRESENT 0x00000001 // Key is present in reg.
  54. #define FRS_RKF_VALUE_PRESENT 0x00000002 // Value is present in reg.
  55. #define FRS_RKF_DISPLAY_ERROR 0x00000004 // Put a message in the log
  56. #define FRS_RKF_LOG_EVENT 0x00000008 // put event in error log.
  57. #define FRS_RKF_READ_AT_START 0x00000010 // Read the key at startup
  58. #define FRS_RKF_READ_AT_POLL 0x00000020 // Read the key during polling
  59. #define FRS_RKF_RANGE_CHECK 0x00000040 // Range check the value read
  60. #define FRS_RKF_SYNTAX_CHECK 0x00000080 // Perform syntax check using DataValueType
  61. #define FRS_RKF_KEY_MUST_BE_PRESENT 0x00000100 // Key must be present
  62. #define FRS_RKF_VALUE_MUST_BE_PRESENT 0x00000200 // Value must be present
  63. #define FRS_RKF_OK_TO_USE_DEFAULT 0x00000400 // Use default val if not present or out of range
  64. #define FRS_RKF_FORCE_DEFAULT_VALUE 0x00000800 // Return default on read, Write default to registry on a write
  65. #define FRS_RKF_DEBUG_MODE_ONLY 0x00001000 // Use key only if in debug mode
  66. #define FRS_RKF_TEST_MODE_ONLY 0x00002000 // Use key only if running in special Test mode
  67. #define FRS_RKF_API_ACCESS_CHECK_KEY 0x00004000 // Key used to make API enable checks
  68. #define FRS_RKF_CREATE_KEY 0x00008000 // Create Key if it doesn't exist.
  69. #define FRS_RKF_KEEP_EXISTING_VALUE 0x00010000 // On a write, suppress the write if a value exists.
  70. #define FRS_RKF_KEY_ACCCHK_READ 0x00020000 // Perform only a read access check of fully formed key path. No key create.
  71. #define FRS_RKF_KEY_ACCCHK_WRITE 0x00040000 // Perform only a write access check of fully formed key path. No key create.
  72. #define FRS_RKF_RANGE_SATURATE 0x00080000 // If value is out of range then use either Min or Max. (currently only for CfgRegWriteDWord)
  73. #define FRS_RKF_DEBUG_PARAM 0x02000000 // This key is a debug paramter
  74. typedef enum _FRS_DATA_UNITS {
  75. UNITS_NONE = 0,
  76. UNITS_SECONDS,
  77. UNITS_MINUTES,
  78. UNITS_HOURS,
  79. UNITS_DAYS,
  80. UNITS_MILLISEC,
  81. UNITS_KBYTES,
  82. UNITS_BYTES,
  83. UNITS_MBYTES,
  84. FRS_DATA_UNITS_MAX
  85. } FRS_DATA_UNITS;
  86. //
  87. // The FrsReg... apis take a key code from the list below. The key table
  88. // is searched for the entry with the corresponding key code to provide the
  89. // context for the registry key operation.
  90. // PERF: at startup sort the entries in the key table by key code so the
  91. // key entry search becomes an array index calc.
  92. //
  93. typedef enum _FRS_REG_KEY_CODE {
  94. FKC_END_OF_TABLE = 0,
  95. //
  96. // Service Debug Keys
  97. //
  98. FKC_DEBUG_ASSERT_FILES,
  99. FKC_DEBUG_ASSERT_SECONDS,
  100. FKC_DEBUG_ASSERT_SHARE,
  101. FKC_DEBUG_BREAK,
  102. FKC_DEBUG_COPY_LOG_FILES,
  103. FKC_DEBUG_DBS_OUT_OF_SPACE,
  104. FKC_DEBUG_DBS_OUT_OF_SPACE_TRIGGER,
  105. FKC_DEBUG_DISABLE,
  106. FKC_DEBUG_LOG_FILE,
  107. FKC_DEBUG_LOG_FILES,
  108. FKC_DEBUG_LOG_FLUSH_INTERVAL,
  109. FKC_DEBUG_LOG_SEVERITY,
  110. FKC_DEBUG_MAX_LOG,
  111. FKC_DEBUG_MEM,
  112. FKC_DEBUG_MEM_COMPACT,
  113. FKC_DEBUG_PROFILE,
  114. FKC_DEBUG_QUEUES,
  115. FKC_DEBUG_RECIPIENTS,
  116. FKC_DEBUG_RESTART_SECONDS,
  117. FKC_DEBUG_SEVERITY,
  118. FKC_DEBUG_SUPPRESS,
  119. FKC_DEBUG_SYSTEMS,
  120. FKC_DEBUG_TEST_CODE_NAME,
  121. FKC_DEBUG_TEST_CODE_NUMBER,
  122. FKC_DEBUG_TEST_TRIGGER_COUNT,
  123. FKC_DEBUG_TEST_TRIGGER_REFRESH,
  124. FKC_DEBUG_BUILDLAB,
  125. //
  126. // Service Config keys
  127. //
  128. FKC_COMM_TIMEOUT,
  129. FKC_DIR_EXCL_FILTER_LIST,
  130. FKC_DIR_INCL_FILTER_LIST,
  131. FKC_DS_POLLING_LONG_INTERVAL,
  132. FKC_DS_POLLING_SHORT_INTERVAL,
  133. FKC_ENUMERATE_DIRECTORY_SIZE,
  134. FKC_FILE_EXCL_FILTER_LIST,
  135. FKC_FILE_INCL_FILTER_LIST,
  136. FKC_FRS_MESSAGE_FILE_PATH,
  137. FKC_FRS_MUTUAL_AUTHENTICATION_IS,
  138. FKC_MAX_JOIN_RETRY,
  139. FKC_MAX_REPLICA_THREADS,
  140. FKC_MAX_RPC_SERVER_THREADS,
  141. FKC_RPC_PORT_ASSIGNMENT,
  142. FKC_MAX_INSTALLCS_THREADS,
  143. FKC_MAX_STAGE_GENCS_THREADS,
  144. FKC_MAX_STAGE_FETCHCS_THREADS,
  145. FKC_MAX_INITSYNCCS_THREADS,
  146. FKC_MIN_JOIN_RETRY,
  147. FKC_PARTNER_CLOCK_SKEW,
  148. FKC_RECONCILE_WINDOW,
  149. FKC_INLOG_RETRY_TIME,
  150. FKC_CO_AGING_DELAY,
  151. FKC_OUTLOG_REPEAT_INTERVAL,
  152. FKC_PROMOTION_TIMEOUT,
  153. FKC_REPLICA_START_TIMEOUT,
  154. FKC_REPLICA_TOMBSTONE,
  155. FKC_MAX_CO_RETRY_TIMEOUT_MINUTES,
  156. FKC_MAX_CO_RETRY_TIMEOUT_COUNT,
  157. FKC_SHUTDOWN_TIMEOUT,
  158. FKC_SNDCS_MAXTHREADS_PAR,
  159. FKC_STAGING_LIMIT,
  160. FKC_VVJOIN_LIMIT,
  161. FKC_VVJOIN_TIMEOUT,
  162. FKC_WORKING_DIRECTORY,
  163. FKC_DBLOG_DIRECTORY,
  164. FKC_NTFS_JRNL_SIZE,
  165. FKC_MAX_NUMBER_REPLICA_SETS,
  166. FKC_MAX_NUMBER_JET_SESSIONS,
  167. FKC_OUT_LOG_CO_QUOTA,
  168. FKC_OUTLOG_CHANGE_HISTORY,
  169. FKC_SAVE_OUTLOG_CHANGE_HISTORY,
  170. FKC_SUPPRESS_IDENTICAL_UPDATES,
  171. FKC_ENABLE_INSTALL_OVERRIDE,
  172. FKC_ENABLE_RENAME_BASED_UPDATES,
  173. FKC_PRESERVE_FILE_OID,
  174. FKC_DEBUG_DISABLE_COMPRESSION,
  175. FKC_LDAP_SEARCH_TIMEOUT_IN_MINUTES,
  176. FKC_LDAP_BIND_TIMEOUT_IN_SECONDS,
  177. FKC_COMPRESS_STAGING_FILES,
  178. FKC_RECLAIM_STAGING_SPACE,
  179. FKC_ENABLE_JOURNAL_WRAP_AUTOMATIC_RESTORE,
  180. FKC_LOCKED_OUTLOG_CLEANUP,
  181. //
  182. // Per Replica Set Keys
  183. //
  184. FKC_SET_SECTION_KEY,
  185. FKC_SETS_JET_PATH,
  186. FKC_SET_N_REPLICA_SET_NAME,
  187. FKC_SET_N_REPLICA_SET_ROOT,
  188. FKC_SET_N_REPLICA_SET_STAGE,
  189. FKC_SET_N_REPLICA_SET_TYPE,
  190. FKC_SET_N_DIR_EXCL_FILTER_LIST,
  191. FKC_SET_N_DIR_INCL_FILTER_LIST,
  192. FKC_SET_N_FILE_EXCL_FILTER_LIST,
  193. FKC_SET_N_FILE_INCL_FILTER_LIST,
  194. FKC_SET_N_REPLICA_SET_TOMBSTONED,
  195. FKC_SET_N_REPLICA_SET_COMMAND,
  196. FKC_SET_N_REPLICA_SET_PRIMARY,
  197. FKC_SET_N_REPLICA_SET_STATUS,
  198. FKC_CUMSET_SECTION_KEY,
  199. FKC_CUMSET_N_NUMBER_OF_PARTNERS,
  200. FKC_CUMSET_N_BURFLAGS,
  201. //
  202. // System Volume Keys
  203. //
  204. FKC_SYSVOL_READY,
  205. FKC_SYSVOL_SECTION_KEY,
  206. FKC_SYSVOL_INFO_COMMITTED,
  207. FKC_SET_N_SYSVOL_NAME,
  208. FKC_SET_N_SYSVOL_ROOT,
  209. FKC_SET_N_SYSVOL_STAGE,
  210. FKC_SET_N_SYSVOL_TYPE,
  211. FKC_SET_N_SYSVOL_DIR_EXCL_FILTER_LIST,
  212. FKC_SET_N_SYSVOL_DIR_INCL_FILTER_LIST,
  213. FKC_SET_N_SYSVOL_FILE_EXCL_FILTER_LIST,
  214. FKC_SET_N_SYSVOL_FILE_INCL_FILTER_LIST,
  215. FKC_SET_N_SYSVOL_COMMAND,
  216. FKC_SET_N_SYSVOL_PARENT,
  217. FKC_SET_N_SYSVOL_PRIMARY,
  218. FKC_SET_N_SYSVOL_STATUS,
  219. FKC_SYSVOL_SEEDING_N_PARENT,
  220. FKC_SYSVOL_SEEDING_N_RSNAME,
  221. FKC_SYSVOL_SEEDING_SECTION_KEY,
  222. //
  223. // Event Logging Keys
  224. //
  225. FKC_EVENTLOG_FILE,
  226. FKC_EVENTLOG_DISPLAY_FILENAME,
  227. FKC_EVENTLOG_EVENT_MSG_FILE,
  228. FKC_EVENTLOG_SOURCES,
  229. FKC_EVENTLOG_RETENTION,
  230. FKC_EVENTLOG_MAXSIZE,
  231. FKC_EVENTLOG_DISPLAY_NAMEID,
  232. FKC_EVENTLOG_CUSTOM_SD,
  233. FKC_EVENTLOG_TYPES_SUPPORTED,
  234. //
  235. // API Access Check Keys
  236. //
  237. FKC_ACCCHK_PERFMON_ENABLE,
  238. FKC_ACCCHK_PERFMON_RIGHTS,
  239. FKC_ACCCHK_GETDS_POLL_ENABLE,
  240. FKC_ACCCHK_GETDS_POLL_RIGHTS,
  241. FKC_ACCCHK_GET_INFO_ENABLE,
  242. FKC_ACCCHK_GET_INFO_RIGHTS,
  243. FKC_ACCCHK_SETDS_POLL_ENABLE,
  244. FKC_ACCCHK_SETDS_POLL_RIGHTS,
  245. FKC_ACCCHK_STARTDS_POLL_ENABLE,
  246. FKC_ACCCHK_STARTDS_POLL_RIGHTS,
  247. FKC_ACCESS_CHK_DCPROMO_ENABLE,
  248. FKC_ACCESS_CHK_DCPROMO_RIGHTS,
  249. FKC_ACCESS_CHK_IS_PATH_REPLICATED_ENABLE,
  250. FKC_ACCESS_CHK_IS_PATH_REPLICATED_RIGHTS,
  251. //
  252. // Backup-restore writer related keys
  253. //
  254. FKC_ACCESS_CHK_WRITER_COMMANDS_ENABLE,
  255. FKC_ACCESS_CHK_WRITER_COMMANDS_RIGHTS,
  256. //
  257. // Backup/Restore related keys.
  258. //
  259. FKC_BKUP_SECTION_KEY,
  260. FKC_BKUP_STOP_SECTION_KEY,
  261. FKC_BKUP_MV_SETS_SECTION_KEY,
  262. FKC_BKUP_MV_CUMSETS_SECTION_KEY,
  263. FKC_BKUP_STARTUP_GLOBAL_BURFLAGS,
  264. FKC_BKUP_STARTUP_SET_N_BURFLAGS,
  265. //
  266. // Perfmon related keys.
  267. //
  268. FKC_REPLICA_SET_FIRST_CTR,
  269. FKC_REPLICA_SET_FIRST_HELP,
  270. FKC_REPLICA_SET_LINKAGE_EXPORT,
  271. FKC_REPLICA_CXTION_FIRST_CTR,
  272. FKC_REPLICA_CXTION_FIRST_HELP,
  273. FKC_REPLICA_CXTION_LINKAGE_EXPORT,
  274. //
  275. // Reparse Point keys
  276. //
  277. FKC_REPARSE_TAG_KEY,
  278. FKC_REPARSE_TAG_TYPE,
  279. FKC_REPARSE_TAG_REPLICATION_TYPE,
  280. FRS_REG_KEY_CODE_MAX
  281. } FRS_REG_KEY_CODE;
  282. DWORD
  283. CfgRegReadDWord(
  284. IN FRS_REG_KEY_CODE KeyIndex,
  285. IN PWCHAR KeyArg1,
  286. IN ULONG Flags,
  287. OUT PULONG DataRet
  288. );
  289. DWORD
  290. CfgRegReadString(
  291. IN FRS_REG_KEY_CODE KeyIndex,
  292. IN PWCHAR KeyArg1,
  293. IN ULONG Flags,
  294. OUT PWSTR *pStrRet
  295. );
  296. DWORD
  297. CfgRegWriteDWord(
  298. IN FRS_REG_KEY_CODE KeyIndex,
  299. IN PWCHAR KeyArg1,
  300. IN ULONG Flags,
  301. IN ULONG NewData
  302. );
  303. DWORD
  304. CfgRegWriteString(
  305. IN FRS_REG_KEY_CODE KeyIndex,
  306. IN PWCHAR KeyArg1,
  307. IN ULONG Flags,
  308. IN PWSTR NewStr
  309. );
  310. DWORD
  311. CfgRegOpenKey(
  312. IN FRS_REG_KEY_CODE KeyIndex,
  313. IN PWCHAR KeyArg1,
  314. IN ULONG Flags,
  315. OUT HKEY *RethKey
  316. );
  317. PWCHAR
  318. CfgRegGetValueName(
  319. IN FRS_REG_KEY_CODE KeyIndex
  320. );
  321. DWORD
  322. CfgRegCheckEnable(
  323. IN FRS_REG_KEY_CODE KeyIndex,
  324. IN PWCHAR KeyArg1,
  325. IN ULONG Flags,
  326. OUT PBOOL Enabled,
  327. OUT PBOOL EnabledAndRequired
  328. );
  329. DWORD
  330. CfgRegReadReparseTagInfo(
  331. VOID
  332. );
  333. //
  334. // Following is the list keys defined for use by the FRS
  335. //
  336. #define SERVICE_ROOT L"System\\CurrentControlSet\\Services"
  337. #define SERVICE_NAME L"NtFrs"
  338. #define SERVICE_PRINCIPAL_NAME L"NtFrs-88f5d2bd-b646-11d2-a6d3-00c04fc9b232"
  339. #define FRS_SETS_KEY L"Replica Sets"
  340. #define FRS_CUMULATIVE_SETS_KEY L"Cumulative Replica Sets"
  341. #define FRS_CONFIG_SECTION SERVICE_ROOT \
  342. L"\\" SERVICE_NAME \
  343. L"\\Parameters"
  344. #define FRS_SYSVOL_SECTION SERVICE_ROOT \
  345. L"\\" SERVICE_NAME \
  346. L"\\Parameters" \
  347. L"\\SysVol"
  348. #define FRS_SETS_SECTION SERVICE_ROOT \
  349. L"\\" SERVICE_NAME \
  350. L"\\Parameters" \
  351. L"\\" FRS_SETS_KEY
  352. #define FRS_REPARSE_TAG_SECTION SERVICE_ROOT \
  353. L"\\" SERVICE_NAME \
  354. L"\\Parameters" \
  355. L"\\Reparse Points"
  356. #define FRS_CUMULATIVE_SETS_SECTION SERVICE_ROOT \
  357. L"\\" SERVICE_NAME \
  358. L"\\Parameters" \
  359. L"\\" FRS_CUMULATIVE_SETS_KEY
  360. #define NETLOGON_SECTION SERVICE_ROOT \
  361. L"\\Netlogon" \
  362. L"\\Parameters"
  363. #define JET_PATH L"Database Directory"
  364. #define WINNT_ROOT L"software\\microsoft\\windows nt"
  365. #define FRS_CURRENT_VER_SECTION WINNT_ROOT \
  366. L"\\current version"
  367. //
  368. // Backup Restore related keys.
  369. //
  370. //
  371. // Flags from backup/restore
  372. //
  373. #define FRS_VALUE_BURFLAGS L"BurFlags"
  374. #define FRS_BACKUP_RESTORE_SECTION \
  375. SERVICE_ROOT \
  376. L"\\" SERVICE_NAME \
  377. L"\\Parameters" \
  378. L"\\" L"Backup/Restore"
  379. #define FRS_BACKUP_RESTORE_STOP_SECTION \
  380. SERVICE_ROOT \
  381. L"\\" SERVICE_NAME \
  382. L"\\Parameters" \
  383. L"\\Backup/Restore" \
  384. L"\\Stop NtFrs from Starting"
  385. #define FRS_BACKUP_RESTORE_MV_SECTION \
  386. SERVICE_ROOT \
  387. L"\\" SERVICE_NAME \
  388. L"\\Parameters" \
  389. L"\\Backup/Restore" \
  390. L"\\Process at Startup"
  391. #define FRS_BACKUP_RESTORE_MV_CUMULATIVE_SETS_SECTION \
  392. SERVICE_ROOT \
  393. L"\\" SERVICE_NAME \
  394. L"\\Parameters" \
  395. L"\\Backup/Restore" \
  396. L"\\Process at Startup" \
  397. L"\\" FRS_CUMULATIVE_SETS_KEY
  398. #define FRS_BACKUP_RESTORE_MV_SETS_SECTION \
  399. SERVICE_ROOT \
  400. L"\\" SERVICE_NAME \
  401. L"\\Parameters" \
  402. L"\\Backup/Restore" \
  403. L"\\Process at Startup" \
  404. L"\\" FRS_SETS_KEY
  405. #define FRS_OLD_FILES_NOT_TO_BACKUP L"SOFTWARE" \
  406. L"\\Microsoft" \
  407. L"\\Windows NT" \
  408. L"\\CurrentVersion" \
  409. L"\\FilesNotToBackup"
  410. #define FRS_NEW_FILES_NOT_TO_BACKUP L"SYSTEM" \
  411. L"\\CurrentControlSet" \
  412. L"\\Control" \
  413. L"\\BackupRestore" \
  414. L"\\FilesNotToBackup"
  415. #define FRS_KEYS_NOT_TO_RESTORE L"SYSTEM" \
  416. L"\\CurrentControlSet" \
  417. L"\\Control" \
  418. L"\\BackupRestore" \
  419. L"\\KeysNotToRestore"
  420. //
  421. // Used to set KeysNotToRestore
  422. //
  423. // Set the restore registry key KeysNotToRestore so that NtBackup will retain
  424. // the ntfrs restore keys by moving them into the final restored registry.
  425. //
  426. // CurrentControlSet\Services\NtFrs\Parameters\Backup/Restore\Process at Startup\
  427. //
  428. #define FRS_VALUE_FOR_KEYS_NOT_TO_RESTORE \
  429. L"CurrentControlSet" \
  430. L"\\Services" \
  431. L"\\" SERVICE_NAME \
  432. L"\\Parameters" \
  433. L"\\Backup/Restore" \
  434. L"\\Process at Startup" \
  435. L"\\"
  436. //
  437. // Some files not to backup.
  438. //
  439. #define NTFRS_DBG_LOG_FILE L"\\NtFrs"
  440. #define NTFRS_DBG_LOG_DIR L"%SystemRoot%\\debug"
  441. //
  442. // Event Log Related Keys
  443. //
  444. #define EVENTLOG_ROOT SERVICE_ROOT \
  445. L"\\EventLog"
  446. #define DEFAULT_MESSAGE_FILE_PATH L"%SystemRoot%\\system32\\ntfrsres.dll"
  447. #define FRS_EVENTLOG_SECTION SERVICE_ROOT \
  448. L"\\EventLog" \
  449. L"\\" SERVICE_LONG_NAME
  450. #define FRS_EVENT_TYPES (EVENTLOG_SUCCESS | \
  451. EVENTLOG_ERROR_TYPE | \
  452. EVENTLOG_WARNING_TYPE | \
  453. EVENTLOG_INFORMATION_TYPE | \
  454. EVENTLOG_AUDIT_SUCCESS | \
  455. EVENTLOG_AUDIT_FAILURE)
  456. //
  457. // Shutdown and Startup timeouts for Service Controller.
  458. // Service will forcefully exit if it takes more than
  459. // MAXIMUM_SHUTDOWN_TIMEOUT to shutdown cleanly.
  460. //
  461. #define DEFAULT_SHUTDOWN_TIMEOUT (90) // 90 seconds
  462. #define MAXIMUM_SHUTDOWN_TIMEOUT (300) // 300 seconds
  463. #define DEFAULT_STARTUP_TIMEOUT (30) // 30 seconds
  464. //
  465. // The delayed command server processes a timeout queue. To avoid excessive
  466. // context switches, an entry on the timeout queue times out if it is
  467. // within some delta of the head of the queue. The delta can be adjusted
  468. // by setting the following registry value.
  469. //
  470. #define FUZZY_TIMEOUT_VALUE_IN_MILLISECONDS \
  471. L"Fuzzy Timeout Value In MilliSeconds"
  472. #define DEFAULT_FUZZY_TIMEOUT_VALUE (5 * 1000)
  473. //
  474. // :SP1: Volatile connection cleanup.
  475. //
  476. // A volatile connection is used to seed sysvols after dcpromo.
  477. // If there is inactivity on a volatile outbound connection for more than
  478. // FRS_VOLATILE_CONNECTION_MAX_IDLE_TIME then this connection is unjoined. An unjoin on
  479. // a volatile outbound connection triggers a delete on that connection.
  480. // This is to prevent the case where staging files are kept for ever on
  481. // the parent for a volatile connection.
  482. //
  483. #define FRS_VOLATILE_CONNECTION_MAX_IDLE_TIME (30 * 60 * 1000) // 30 Minutes in milliseconds
  484. //
  485. // Sysvol
  486. //
  487. #define REPLICA_SET_PARENT L"Replica Set Parent"
  488. #define REPLICA_SET_COMMAND L"Replica Set Command"
  489. #define REPLICA_SET_NAME L"Replica Set Name"
  490. #define REPLICA_SET_SEEDING_NAME L"Replica Set Seeding Name"
  491. #define REPLICA_SET_TYPE L"Replica Set Type"
  492. #define REPLICA_SET_PRIMARY L"Replica Set Primary"
  493. #define REPLICA_SET_STATUS L"Replica Set Status"
  494. #define REPLICA_SET_ROOT L"Replica Set Root"
  495. #define REPLICA_SET_STAGE L"Replica Set Stage"
  496. #define REPLICA_SET_TOMBSTONED L"Replica Set Tombstoned"
  497. #define SYSVOL_INFO_IS_COMMITTED L"SysVol Information is Committed"
  498. #define SYSVOL_READY L"SysvolReady"
  499. //
  500. // Enumerate Directory
  501. //
  502. #define DEFAULT_ENUMERATE_DIRECTORY_SIZE (2048)
  503. #define MINIMUM_ENUMERATE_DIRECTORY_SIZE \
  504. (((MAX_PATH + 1) * sizeof(WCHAR)) + sizeof(FILE_DIRECTORY_INFORMATION))
  505. //
  506. // Default values for config parameters.
  507. //
  508. #define DEFAULT_FILE_FILTER_LIST TEXT("*.tmp, *.bak, ~*")
  509. #define DEFAULT_DIR_FILTER_LIST TEXT("")
  510. //
  511. // Preinstall files are put into Root\NTFRS_PREINSTALL_DIRECTORY
  512. //
  513. #define NTFRS_PREINSTALL_DIRECTORY L"DO_NOT_REMOVE_NtFrs_PreInstall_Directory"
  514. //
  515. // Files skipped during primary load are put in
  516. // Root\NTFRS_PREINSTALL_DIRECTORY\NTFRS_SKIPPED_FILES
  517. //
  518. #define NTFRS_SKIPPED_FILES L"NtFrs_Skipped_Files"
  519. //
  520. // Preexisting files are put into Root\NTFRS_PREEXISTING_DIRECTORY
  521. //
  522. #define NTFRS_PREEXISTING_DIRECTORY L"NtFrs_PreExisting___See_EventLog"
  523. //
  524. // Command file to confir that it is OK to move the root to the
  525. // new location. Command file is created at the new root location.
  526. //
  527. #define NTFRS_CMD_FILE_MOVE_ROOT L"NTFRS_CMD_FILE_MOVE_ROOT"
  528. //
  529. // Generic Enabled or Disabled
  530. //
  531. #define FRS_IS_DEFAULT_ENABLED L"Default (Enabled)"
  532. #define FRS_IS_DEFAULT_ENABLED_AND_REQUIRED L"Default (Enabled and Required)"
  533. #define FRS_IS_DEFAULT_DISABLED L"Default (Disabled)"
  534. #define FRS_IS_ENABLED L"Enabled"
  535. #define FRS_IS_ENABLED_AND_REQUIRED L"Enabled and Required"
  536. #define FRS_IS_DISABLED L"Disabled"
  537. //
  538. // Access Checks for RPC API calls (not the service <-> service RPC calls)
  539. //
  540. #define ACCESS_CHECKS_KEY L"Access Checks"
  541. #define ACCESS_CHECKS_KEY_PATH FRS_CONFIG_SECTION L"\\" ACCESS_CHECKS_KEY
  542. #define ACCESS_CHECKS_ARE L"Access checks are [Enabled or Disabled]"
  543. #define ACCESS_CHECKS_ARE_DEFAULT_ENABLED FRS_IS_DEFAULT_ENABLED
  544. #define ACCESS_CHECKS_ARE_DEFAULT_DISABLED FRS_IS_DEFAULT_DISABLED
  545. #define ACCESS_CHECKS_ARE_ENABLED FRS_IS_ENABLED
  546. #define ACCESS_CHECKS_ARE_DISABLED FRS_IS_DISABLED
  547. #define ACCESS_CHECKS_REQUIRE L"Access checks require [Full Control or Read]"
  548. #define ACCESS_CHECKS_REQUIRE_DEFAULT_READ L"Default (Read)"
  549. #define ACCESS_CHECKS_REQUIRE_DEFAULT_WRITE L"Default (Full Control)"
  550. #define ACCESS_CHECKS_REQUIRE_READ L"Read"
  551. #define ACCESS_CHECKS_REQUIRE_WRITE L"Full Control"
  552. //
  553. // The following are used as indices into the API Access Check table defined
  554. // in frsrpc.c. Entries added here must be added there too. The order of the
  555. // entries in the two tables MUST be the same.
  556. //
  557. typedef enum _FRS_API_ACCESS_CHECKS {
  558. ACX_START_DS_POLL = 0,
  559. ACX_SET_DS_POLL,
  560. ACX_GET_DS_POLL,
  561. ACX_INTERNAL_INFO,
  562. ACX_COLLECT_PERFMON_DATA,
  563. ACX_DCPROMO,
  564. ACX_IS_PATH_REPLICATED,
  565. ACK_WRITER_COMMANDS,
  566. ACX_MAX
  567. } FRS_API_ACCESS_CHECKS;
  568. //
  569. // These are the Access Check Key (ACK) names for the API Access Checks.
  570. // They all live in the registry at: "FRS_CONFIG_SECTION\Access Checks"
  571. //
  572. #define ACK_START_DS_POLL L"Start Ds Polling"
  573. #define ACK_SET_DS_POLL L"Set Ds Polling Interval"
  574. #define ACK_GET_DS_POLL L"Get Ds Polling Interval"
  575. #define ACK_INTERNAL_INFO L"Get Internal Information"
  576. #define ACK_COLLECT_PERFMON_DATA L"Get Perfmon Data"
  577. #define ACK_DCPROMO L"dcpromo"
  578. #define ACK_IS_PATH_REPLICATED L"Is Path Replicated"
  579. #define ACK_WRITER_COMMANDS L"Writer Commands"
  580. #ifdef __cplusplus
  581. }
  582. #endif