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.

144 lines
4.6 KiB

  1. //>-------------------------------------------------------------------------------<
  2. //
  3. // File: Acsctl.h
  4. //
  5. // Synopsis: The common headers for actlcach.dll and actldb.dll
  6. //
  7. // History: DanielLI Created 06/19/95
  8. //
  9. // Copyright (C) 1994-1996 Microsoft Corporation
  10. // All rights reserved
  11. //
  12. //>-------------------------------------------------------------------------------<
  13. #if !defined(__ACSCTL_H__)
  14. #define __ACSCTL_H__
  15. #if !defined(DllExport)
  16. #define DllExport __declspec(dllexport)
  17. #endif
  18. #if !defined(DllImport)
  19. #define DllImport __declspec(dllimport)
  20. #endif
  21. #include <dbsqltyp.h>
  22. #include <dbsqldef.h>
  23. //
  24. // "rights" bits attached to security tokens
  25. //
  26. #define AR_VIEWER 0x01
  27. #define AR_OBSERVER 0x02
  28. #define AR_USER 0x04
  29. #define AR_HOST 0x08
  30. #define AR_SYSOP 0x10
  31. #define AR_SYSOPMGR 0x20
  32. #define AR_SUPERSYSOP 0x40
  33. #define AR_FAIL_ON_TOLL_FREE 0x80
  34. #define AR_DIAGNOSTIC 0x100
  35. #define AC_MAX_SQL_SYSNAME_LENGTH 30
  36. #define AC_MAX_SERVER_NAME_LENGTH AC_MAX_SQL_SYSNAME_LENGTH
  37. #define AC_MAX_DBNAME_LENGTH AC_MAX_SQL_SYSNAME_LENGTH
  38. #define AC_MAX_DBLOGIN_LENGTH AC_MAX_SQL_SYSNAME_LENGTH
  39. #define AC_MAX_DBPASSWORD_LENGTH AC_MAX_SQL_SYSNAME_LENGTH
  40. #define AC_MIN_SQL_SYSNAME_LENGTH 1
  41. #define AC_MIN_SERVER_NAME_LENGTH AC_MIN_SQL_SYSNAME_LENGTH
  42. #define AC_MIN_DBNAME_LENGTH AC_MIN_SQL_SYSNAME_LENGTH
  43. #define AC_MIN_DBLOGIN_LENGTH AC_MIN_SQL_SYSNAME_LENGTH
  44. #define AC_MIN_DBPASSWORD_LENGTH AC_MIN_SQL_SYSNAME_LENGTH
  45. //
  46. // rights_adding_flags for AddAcctToTokenExpire and AddGroupToTokenExpire
  47. //
  48. typedef enum _RIGHTS_ADDING_FLAG
  49. {
  50. RIGHTS_UNION = 0,
  51. RIGHTS_REPLACE = 1,
  52. RIGHTS_UNCHANGE = 2
  53. } RIGHTS_ADDING_FLAG;
  54. //
  55. // The current MSN 1.3 has a physical limitation on number of query servers: 256,
  56. // since a tinyint is used. Per ParikRao, MOSWEST is going to use two Account query
  57. // servers eventually. Given 1M users in MSN, and Normandy is targetting 10M users,
  58. // the limit of 256 is very very unlikely to be reached. Let's maintain the same
  59. // limit here.
  60. //
  61. #define AC_MAX_QUERY_SERVERS 256
  62. //
  63. // The following error codes defined in dbsqldef.h
  64. //
  65. /*
  66. #define AC_SUCCESS 0
  67. #define AC_VALID_ACCOUNT 0
  68. #define AC_DB_FAILED 1
  69. #define AC_ACCOUNT_NOT_FOUND 2
  70. #define AC_INVALID_PASSWORD 3
  71. #define AC_BAD_PARAM 4
  72. #define AC_SEM_FAILED 5
  73. #define AC_CONNECT_FAILED 6
  74. #define AC_MUTEX_FAILED 7
  75. #define AC_MISSING_DATA 8
  76. #define AC_ILLEGAL_PASSWORD 9
  77. #define AC_INVALID_ACCOUNT 10
  78. #define AC_NOMORE_CONNECTIONS 11
  79. #define AC_NEW_ACCOUNT 12
  80. #define AC_LOCKED_ACCOUNT 13
  81. #define AC_ILLEGAL_NAME 14
  82. #define AC_OUT_OF_MEMORY 15
  83. #define AC_TOO_MANY_ROWS 16
  84. #define AC_BANNED_PERSON 17
  85. #define AC_GROUP_NOT_FOUND 18
  86. #define AC_UPDATE_FAILED 19
  87. #define AC_DELETE_FAILED 20
  88. #define AC_TOKEN_NOT_FOUND 21
  89. #define AC_ALREADY_CONNECTED 22
  90. #define AC_ACCESS_DENIED 23
  91. #define AC_OWNER_NOT_FOUND 24
  92. #define AC_OWNER_UPDATE_FAILED 25
  93. #define AC_ILLEGAL_LOGIN_NAME 26
  94. #define AC_ILLEGAL_PASSWORD_SIMILAR 27
  95. #define AC_ILLEGAL_PASSWORD_CHARS 28
  96. #define AC_DUPLICATE_LOGIN_NAME 29
  97. #define AC_INVALID_SUB_PLAN 30
  98. #define AC_INVALID_PAYMENT_METHOD 31
  99. #define AC_DUPLICATE_ENTRY 32
  100. #define AC_TIMED_OUT 33
  101. #define AC_THROTTLED 34
  102. #define AC_OLDSYSTEM 35
  103. #define AC_SBS 36
  104. #define AC_NO_FREE_TRIAL_PERIOD 37
  105. #define AC_CANCELLED 38
  106. #define AC_RESUBMIT 39
  107. #define AC_NOT_FOUND 40
  108. #define AC_CYCLIC_DISTLIST 41
  109. #define AC_BP_DEFEND_ERROR 42
  110. #define AC_NO_MORE_RESULTS 43
  111. #define AC_NO_MORE_ROWS 44
  112. #define AC_INVALID_DOMAIN_NAME 45
  113. #define AC_NAME_NOT_UNIQUE 46
  114. #define AC_BAD_HANDLE 0xFFFFFFFF
  115. */
  116. //
  117. // Additional error codes needed for A&A security DB
  118. //
  119. #define AC_INVALID_ACCT_STATUS 20001
  120. #define AC_INVALID_ACCT_TYPE 20002
  121. #endif // #if !defined(__ACSCTL_H__)