mirror of
https://github.com/samba-team/samba.git
synced 2025-08-29 13:49:30 +03:00
s4-idl: give a enum for attribute cn and a 'NONE' attribute
The 'NONE' attribute has value 0xFFFFFFFF. Adding this ensures the compiler will complain if it is set to use 16 bit enums. We rely on being able to store 32 bits in an attid enum.
This commit is contained in:
@ -326,6 +326,7 @@ enum drsuapi_DsAttributeId
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
DRSUAPI_ATTRIBUTE_objectClass=(int)(0x00000000),
|
||||
DRSUAPI_ATTRIBUTE_cn=(int)(0x00000003),
|
||||
DRSUAPI_ATTRIBUTE_description=(int)(0x0000000d),
|
||||
DRSUAPI_ATTRIBUTE_member=(int)(0x0000001f),
|
||||
DRSUAPI_ATTRIBUTE_instanceType=(int)(0x00020001),
|
||||
@ -396,11 +397,13 @@ enum drsuapi_DsAttributeId
|
||||
DRSUAPI_ATTRIBUTE_msDS_Behavior_Version=(int)(0x000905b3),
|
||||
DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber=(int)(0x000906f6),
|
||||
DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs=(int)(0x0009071c),
|
||||
DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs=(int)(0x0009072c)
|
||||
DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs=(int)(0x0009072c),
|
||||
DRSUAPI_ATTRIBUTE_NONE=(int)(0xFFFFFFFF)
|
||||
}
|
||||
#else
|
||||
{ __donnot_use_enum_drsuapi_DsAttributeId=0x7FFFFFFF}
|
||||
#define DRSUAPI_ATTRIBUTE_objectClass ( 0x00000000 )
|
||||
#define DRSUAPI_ATTRIBUTE_cn ( 0x00000003 )
|
||||
#define DRSUAPI_ATTRIBUTE_description ( 0x0000000d )
|
||||
#define DRSUAPI_ATTRIBUTE_member ( 0x0000001f )
|
||||
#define DRSUAPI_ATTRIBUTE_instanceType ( 0x00020001 )
|
||||
@ -472,6 +475,7 @@ enum drsuapi_DsAttributeId
|
||||
#define DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber ( 0x000906f6 )
|
||||
#define DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs ( 0x0009071c )
|
||||
#define DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs ( 0x0009072c )
|
||||
#define DRSUAPI_ATTRIBUTE_NONE ( 0xFFFFFFFF )
|
||||
#endif
|
||||
;
|
||||
|
||||
|
@ -1379,6 +1379,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsAttributeId(struct ndr_print *ndr, const char
|
||||
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
|
||||
switch (r) {
|
||||
case DRSUAPI_ATTRIBUTE_objectClass: val = "DRSUAPI_ATTRIBUTE_objectClass"; break;
|
||||
case DRSUAPI_ATTRIBUTE_cn: val = "DRSUAPI_ATTRIBUTE_cn"; break;
|
||||
case DRSUAPI_ATTRIBUTE_description: val = "DRSUAPI_ATTRIBUTE_description"; break;
|
||||
case DRSUAPI_ATTRIBUTE_member: val = "DRSUAPI_ATTRIBUTE_member"; break;
|
||||
case DRSUAPI_ATTRIBUTE_instanceType: val = "DRSUAPI_ATTRIBUTE_instanceType"; break;
|
||||
@ -1450,6 +1451,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsAttributeId(struct ndr_print *ndr, const char
|
||||
case DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber: val = "DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber"; break;
|
||||
case DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs: val = "DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs"; break;
|
||||
case DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs: val = "DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs"; break;
|
||||
case DRSUAPI_ATTRIBUTE_NONE: val = "DRSUAPI_ATTRIBUTE_NONE"; break;
|
||||
}
|
||||
ndr_print_enum(ndr, name, "ENUM", val, r);
|
||||
ndr->flags = _flags_save_ENUM;
|
||||
|
@ -437,6 +437,7 @@ interface drsuapi
|
||||
|
||||
typedef [flag(NDR_PAHEX),v1_enum,public] enum {
|
||||
DRSUAPI_ATTRIBUTE_objectClass = 0x00000000,
|
||||
DRSUAPI_ATTRIBUTE_cn = 0x00000003,
|
||||
DRSUAPI_ATTRIBUTE_description = 0x0000000d,
|
||||
DRSUAPI_ATTRIBUTE_member = 0x0000001f,
|
||||
DRSUAPI_ATTRIBUTE_instanceType = 0x00020001,
|
||||
@ -507,7 +508,8 @@ interface drsuapi
|
||||
DRSUAPI_ATTRIBUTE_msDS_Behavior_Version = 0x000905b3,
|
||||
DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber = 0x000906f6,
|
||||
DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs = 0x0009071c,
|
||||
DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs = 0x0009072c
|
||||
DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs = 0x0009072c,
|
||||
DRSUAPI_ATTRIBUTE_NONE = 0xFFFFFFFF
|
||||
} drsuapi_DsAttributeId;
|
||||
|
||||
typedef struct {
|
||||
|
Reference in New Issue
Block a user