diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-01-09 13:10:28 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-01-09 13:10:28 +1100 |
commit | b0090d01e061220d9b70a14e5a88b683949fe6a5 (patch) | |
tree | 4875e5fa8b2abd6a409cfd00501e5b2cc16edd9c | |
parent | 9e6eb22f7fda88e1d2336ac4b2ec42a8d84c2138 (diff) | |
download | samba-b0090d01e061220d9b70a14e5a88b683949fe6a5.tar.gz samba-b0090d01e061220d9b70a14e5a88b683949fe6a5.tar.bz2 samba-b0090d01e061220d9b70a14e5a88b683949fe6a5.zip |
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.
-rw-r--r-- | librpc/gen_ndr/drsuapi.h | 6 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_drsuapi.c | 2 | ||||
-rw-r--r-- | librpc/idl/drsuapi.idl | 4 |
3 files changed, 10 insertions, 2 deletions
diff --git a/librpc/gen_ndr/drsuapi.h b/librpc/gen_ndr/drsuapi.h index 8596bf3952..1f5960ddc5 100644 --- a/librpc/gen_ndr/drsuapi.h +++ b/librpc/gen_ndr/drsuapi.h @@ -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 ; diff --git a/librpc/gen_ndr/ndr_drsuapi.c b/librpc/gen_ndr/ndr_drsuapi.c index 16388e7469..5b31d1e3f3 100644 --- a/librpc/gen_ndr/ndr_drsuapi.c +++ b/librpc/gen_ndr/ndr_drsuapi.c @@ -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; diff --git a/librpc/idl/drsuapi.idl b/librpc/idl/drsuapi.idl index 299495800f..dadaeeee3a 100644 --- a/librpc/idl/drsuapi.idl +++ b/librpc/idl/drsuapi.idl @@ -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 { |