Changeset 740 for vendor/current/libds
- Timestamp:
- Nov 14, 2012, 12:59:34 PM (13 years ago)
- Location:
- vendor/current/libds/common
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/libds/common/flag_mapping.c
r414 r740 5 5 Copyright (C) Stefan (metze) Metzmacher 2002 6 6 Copyright (C) Andrew Tridgell 2004 7 Copyright (C) Matthias Dieter Wallnöfer 2010 7 8 8 9 This program is free software; you can redistribute it and/or modify … … 23 24 #include "librpc/gen_ndr/samr.h" 24 25 #include "../libds/common/flags.h" 26 #include "flag_mapping.h" 25 27 26 28 /* … … 50 52 { UF_DONT_REQUIRE_PREAUTH, ACB_DONT_REQUIRE_PREAUTH }, 51 53 { UF_PASSWORD_EXPIRED, ACB_PW_EXPIRED }, 52 { UF_NO_AUTH_DATA_REQUIRED, ACB_NO_AUTH_DATA_REQD } 54 { UF_NO_AUTH_DATA_REQUIRED, ACB_NO_AUTH_DATA_REQD }, 55 { UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION, ACB_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION }, 56 { UF_PARTIAL_SECRETS_ACCOUNT, ACB_PARTIAL_SECRETS_ACCOUNT }, 57 { UF_USE_AES_KEYS, ACB_USE_AES_KEYS } 53 58 }; 54 59 55 60 uint32_t ds_acb2uf(uint32_t acb) 56 61 { 57 uint32_t i, ret = 0; 62 unsigned int i; 63 uint32_t ret = 0; 58 64 for (i=0;i<ARRAY_SIZE(acct_flags_map);i++) { 59 65 if (acct_flags_map[i].acb & acb) { … … 69 75 uint32_t ds_uf2acb(uint32_t uf) 70 76 { 71 u int32_t i;77 unsigned int i; 72 78 uint32_t ret = 0; 73 79 for (i=0;i<ARRAY_SIZE(acct_flags_map);i++) { … … 145 151 return SID_NAME_UNKNOWN; 146 152 } 153 154 /* get the default primary group RID for a given userAccountControl 155 * (information according to MS-SAMR 3.1.1.8.1) */ 156 uint32_t ds_uf2prim_group_rid(uint32_t uf) 157 { 158 uint32_t prim_group_rid = DOMAIN_RID_USERS; 159 160 if ((uf & UF_PARTIAL_SECRETS_ACCOUNT) 161 && (uf & UF_WORKSTATION_TRUST_ACCOUNT)) prim_group_rid = DOMAIN_RID_READONLY_DCS; 162 else if (uf & UF_SERVER_TRUST_ACCOUNT) prim_group_rid = DOMAIN_RID_DCS; 163 else if (uf & UF_WORKSTATION_TRUST_ACCOUNT) prim_group_rid = DOMAIN_RID_DOMAIN_MEMBERS; 164 165 return prim_group_rid; 166 } -
vendor/current/libds/common/flags.h
r414 r740 49 49 #define UF_DONT_REQUIRE_PREAUTH 0x00400000 50 50 #define UF_PASSWORD_EXPIRED 0x00800000 51 52 51 #define UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION 0x01000000 53 52 #define UF_NO_AUTH_DATA_REQUIRED 0x02000000 53 #define UF_PARTIAL_SECRETS_ACCOUNT 0x04000000 54 #define UF_USE_AES_KEYS 0x08000000 54 55 55 56 #define UF_MACHINE_ACCOUNT_MASK (\ … … 111 112 ) 112 113 #define GTYPE_SECURITY_UNIVERSAL_GROUP ( \ 113 /* 0x80000008 -21474836 56*/ \114 /* 0x80000008 -2147483640 */ \ 114 115 GROUP_TYPE_UNIVERSAL_GROUP| \ 115 116 GROUP_TYPE_SECURITY_ENABLED \ … … 156 157 #define SYSTEM_FLAG_DISALLOW_DELETE 0x80000000 157 158 159 /* schemaFlags_Ex */ 160 #define SCHEMA_FLAG_ATTR_IS_CRITICAL 0x0000001 161 158 162 /* "searchFlags" */ 159 163 #define SEARCH_FLAG_ATTINDEX 0x0000001 … … 168 172 #define SEARCH_FLAG_RODC_ATTRIBUTE 0x0000200 169 173 170 /* "domainFunctionality", "forestFunctionality" in the rootDSE */174 /* "domainFunctionality", "forestFunctionality" and "domainControllerFunctionality" in the rootDSE */ 171 175 #define DS_DOMAIN_FUNCTION_2000 0 172 #define DS_DOMAIN_FUNCTION_2003_MIXED 1 176 #define DS_DOMAIN_FUNCTION_2003_MIXED 1 /* Not a valid/meaningful 177 * domainControllerFunctionality 178 * Level */ 173 179 #define DS_DOMAIN_FUNCTION_2003 2 174 180 #define DS_DOMAIN_FUNCTION_2008 3 175 181 #define DS_DOMAIN_FUNCTION_2008_R2 4 176 182 177 /* "domainControllerFunctionality" in the rootDSE */178 #define DS_DC_FUNCTION_2000 0179 #define DS_DC_FUNCTION_2003 2180 #define DS_DC_FUNCTION_2008 3181 #define DS_DC_FUNCTION_2008_R2 4182 183 183 /* sa->systemFlags on attributes */ 184 184 #define DS_FLAG_ATTR_NOT_REPLICATED 0x00000001 185 #define DS_FLAG_ATTR_REQ_PARTIAL_SET_MEMBER 0x00000002 185 186 #define DS_FLAG_ATTR_IS_CONSTRUCTED 0x00000004 187 188 /* 7.1.1.2.2.1.2.1.1 nTDSDSA Object options flags */ 189 #define DS_NTDSDSA_OPT_IS_GC 0x00000001 190 #define DS_NTDSDSA_OPT_DISABLE_INBOUND_REPL 0x00000002 191 #define DS_NTDSDSA_OPT_DISABLE_OUTBOUND_REPL 0x00000004 192 #define DS_NTDSDSA_OPT_DISABLE_NTDSCONN_XLATE 0x00000008 193 #define DS_NTDSDSA_OPT_DISABLE_SPN_REGISTRATION 0x00000010 194 195 /* wellknown GUID strings for AD objects. See MS-ADTS 7.1.1.4 */ 196 #define DS_GUID_COMPUTERS_CONTAINER "AA312825768811D1ADED00C04FD8D5CD" 197 #define DS_GUID_DELETED_OBJECTS_CONTAINER "18E2EA80684F11D2B9AA00C04F79F805" 198 #define DS_GUID_DOMAIN_CONTROLLERS_CONTAINER "A361B2FFFFD211D1AA4B00C04FD7D83A" 199 #define DS_GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER "22B70C67D56E4EFB91E9300FCA3DC1AA" 200 #define DS_GUID_INFRASTRUCTURE_CONTAINER "2FBAC1870ADE11D297C400C04FD8D5CD" 201 #define DS_GUID_LOSTANDFOUND_CONTAINER "AB8153B7768811D1ADED00C04FD8D5CD" 202 #define DS_GUID_MICROSOFT_PROGRAM_DATA_CONTAINER "F4BE92A4C777485E878E9421D53087DB" 203 #define DS_GUID_NTDS_QUOTAS_CONTAINER "6227F0AF1FC2410D8E3BB10615BB5B0F" 204 #define DS_GUID_PROGRAM_DATA_CONTAINER "09460C08AE1E4A4EA0F64AEE7DAA1E5A" 205 #define DS_GUID_SYSTEMS_CONTAINER "AB1D30F3768811D1ADED00C04FD8D5CD" 206 #define DS_GUID_USERS_CONTAINER "A9D1CA15768811D1ADED00C04FD8D5CD" 207 208 /* wellknown GUIDs for optional directory features */ 209 #define DS_GUID_FEATURE_RECYCLE_BIN "766ddcd8-acd0-445e-f3b9-a7f9b6744f2a" 210 211 /* dsHeuristics character indexes see MS-ADTS 7.1.1.2.4.1.2 */ 212 213 #define DS_HR_SUPFIRSTLASTANR 0x00000001 214 #define DS_HR_SUPLASTFIRSTANR 0x00000002 215 #define DS_HR_DOLISTOBJECT 0x00000003 216 #define DS_HR_DONICKRES 0x00000004 217 #define DS_HR_LDAP_USEPERMMOD 0x00000005 218 #define DS_HR_HIDEDSID 0x00000006 219 #define DS_HR_BLOCK_ANONYMOUS_OPS 0x00000007 220 #define DS_HR_ALLOW_ANON_NSPI 0x00000008 221 #define DS_HR_USER_PASSWORD_SUPPORT 0x00000009 222 #define DS_HR_TENTH_CHAR 0x0000000A 223 #define DS_HR_SPECIFY_GUID_ON_ADD 0x0000000B 224 #define DS_HR_NO_STANDARD_SD 0x0000000C 225 #define DS_HR_ALLOW_NONSECURE_PWD_OPS 0x0000000D 226 #define DS_HR_NO_PROPAGATE_ON_NOCHANGE 0x0000000E 227 #define DS_HR_COMPUTE_ANR_STATS 0x0000000F 228 #define DS_HR_ADMINSDEXMASK 0x00000010 229 #define DS_HR_KVNOEMUW2K 0x00000011 230 #define DS_HR_LDAP_BYPASS_UPPER_LIMIT_BOUNDS 0x00000012 231 232 /* mS-DS-ReplicatesNCReason */ 233 #define NTDSCONN_KCC_GC_TOPOLOGY 0x00000001 234 #define NTDSCONN_KCC_RING_TOPOLOGY 0x00000002 235 #define NTDSCONN_KCC_MINIMIZE_HOPS_TOPOLOGY 0x00000004 236 #define NTDSCONN_KCC_STALE_SERVERS_TOPOLOGY 0x00000008 237 #define NTDSCONN_KCC_OSCILLATING_CONNECTION_TOPOLOGY 0x00000010 238 #define NTDSCONN_KCC_INTERSITE_GC_TOPOLOGY 0x00000020 239 #define NTDSCONN_KCC_INTERSITE_TOPOLOGY 0x00000040 240 #define NTDSCONN_KCC_SERVER_FAILOVER_TOPOLOGY 0x00000080 241 #define NTDSCONN_KCC_SITE_FAILOVER_TOPOLOGY 0x00000100 242 #define NTDSCONN_KCC_REDUNDANT_SERVER_TOPOLOGY 0x00000200
Note:
See TracChangeset
for help on using the changeset viewer.