Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
1 deleted
24 edited
13 copied

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/librpc/idl/dcerpc.idl

    r596 r745  
    2020        } dcerpc_ctx_list;
    2121
    22         typedef struct {
     22        typedef [public] struct {
    2323                uint16 max_xmit_frag;
    2424                uint16 max_recv_frag;
     
    2626                uint8  num_contexts;
    2727                dcerpc_ctx_list ctx_list[num_contexts];
    28                 [flag(NDR_ALIGN4)]    DATA_BLOB _pad;
    2928                [flag(NDR_REMAINING)] DATA_BLOB auth_info;
    3029        } dcerpc_bind;
     
    9796        } dcerpc_response;
    9897
     98        typedef [v1_enum] enum {
     99                DCERPC_NCA_S_COMM_FAILURE               = 0x1C010001,
     100                DCERPC_NCA_S_OP_RNG_ERROR               = 0x1C010002,
     101                DCERPC_NCA_S_UNKNOWN_IF                 = 0x1C010003,
     102                DCERPC_NCA_S_WRONG_BOOT_TIME            = 0x1C010006,
     103                DCERPC_NCA_S_YOU_CRASHED                = 0x1C010009,
     104                DCERPC_NCA_S_PROTO_ERROR                = 0x1C01000B,
     105                DCERPC_NCA_S_OUT_ARGS_TOO_BIG           = 0x1C010013,
     106                DCERPC_NCA_S_SERVER_TOO_BUSY            = 0x1C010014,
     107                DCERPC_NCA_S_FAULT_STRING_TOO_LARGE     = 0x1C010015,
     108                DCERPC_NCA_S_UNSUPPORTED_TYPE           = 0x1C010017,
     109                DCERPC_NCA_S_FAULT_INT_DIV_BY_ZERO      = 0x1C000001,
     110                DCERPC_NCA_S_FAULT_ADDR_ERROR           = 0x1C000002,
     111                DCERPC_NCA_S_FAULT_FP_DIV_BY_ZERO       = 0x1C000003,
     112                DCERPC_NCA_S_FAULT_FP_UNDERFLOW         = 0x1C000004,
     113                DCERPC_NCA_S_FAULT_FP_OVERRFLOW         = 0x1C000005,
     114                DCERPC_NCA_S_FAULT_INVALID_TAG          = 0x1C000006,
     115                DCERPC_NCA_S_FAULT_INVALID_BOUND        = 0x1C000007,
     116                DCERPC_NCA_S_FAULT_RPC_VERSION_MISMATCH = 0x1C000008,
     117                DCERPC_NCA_S_FAULT_UNSPEC_REJECT        = 0x1C000009,
     118                DCERPC_NCA_S_FAULT_BAD_ACTID            = 0x1C00000A,
     119                DCERPC_NCA_S_FAULT_WHO_ARE_YOU_FAILED   = 0x1C00000B,
     120                DCERPC_NCA_S_FAULT_MANAGER_NOT_ENTERED  = 0x1C00000C,
     121                DCERPC_NCA_S_FAULT_CANCEL               = 0x1C00000D,
     122                DCERPC_NCA_S_FAULT_ILL_INST             = 0x1C00000E,
     123                DCERPC_NCA_S_FAULT_FP_ERROR             = 0x1C00000F,
     124                DCERPC_NCA_S_FAULT_INT_OVERFLOW         = 0x1C000010,
     125                DCERPC_NCA_S_UNUSED_1C000011            = 0x1C000011,
     126                DCERPC_NCA_S_FAULT_UNSPEC               = 0x1C000012,
     127                DCERPC_NCA_S_FAULT_REMOTE_COMM_FAILURE  = 0x1C000013,
     128                DCERPC_NCA_S_FAULT_PIPE_EMPTY           = 0x1C000014,
     129                DCERPC_NCA_S_FAULT_PIPE_CLOSED          = 0x1C000015,
     130                DCERPC_NCA_S_FAULT_PIPE_ORDER           = 0x1C000016,
     131                DCERPC_NCA_S_FAULT_PIPE_DISCIPLINE      = 0x1C000017,
     132                DCERPC_NCA_S_FAULT_PIPE_COMM_ERROR      = 0x1C000018,
     133                DCERPC_NCA_S_FAULT_PIPE_MEMORY          = 0x1C000019,
     134                DCERPC_NCA_S_FAULT_CONTEXT_MISMATCH     = 0x1C00001A,
     135                DCERPC_NCA_S_FAULT_REMOTE_NO_MEMORY     = 0x1C00001B,
     136                DCERPC_NCA_S_INVALID_PRES_CONTEXT_ID    = 0x1C00001C,
     137                DCERPC_NCA_S_UNSUPPORTED_AUTHN_LEVEL    = 0x1C00001D,
     138                DCERPC_NCA_S_UNUSED_1C00001E            = 0x1C00001E,
     139                DCERPC_NCA_S_INVALID_CHECKSUM           = 0x1C00001F,
     140                DCERPC_NCA_S_INVALID_CRC                = 0x1C000020,
     141                DCERPC_NCA_S_FAULT_USER_DEFINED         = 0x1C000021,
     142                DCERPC_NCA_S_FAULT_TX_OPEN_FAILED       = 0x1C000022,
     143                DCERPC_NCA_S_FAULT_CODESET_CONV_ERROR   = 0x1C000023,
     144                DCERPC_NCA_S_FAULT_OBJECT_NOT_FOUND     = 0x1C000024,
     145                DCERPC_NCA_S_FAULT_NO_CLIENT_STUB       = 0x1C000025
     146        } dcerpc_nca_status;
    99147
    100148        const int DCERPC_FAULT_OP_RNG_ERROR       = 0x1c010002;
     
    116164                uint16 context_id;
    117165                uint8 cancel_count;
    118                 uint32 status;
     166                dcerpc_nca_status status;
    119167                [flag(NDR_REMAINING)] DATA_BLOB _pad;
    120168        } dcerpc_fault;
     
    132180                DCERPC_AUTH_TYPE_DIGEST   = 21,
    133181                DCERPC_AUTH_TYPE_SCHANNEL = 68,
    134                 DCERPC_AUTH_TYPE_MSMQ     = 100
     182                DCERPC_AUTH_TYPE_MSMQ     = 100,
     183                DCERPC_AUTH_TYPE_NCALRPC_AS_SYSTEM = 200
    135184        } dcerpc_AuthType;
    136185
     
    158207
    159208        typedef [public] struct {
    160                 uint32 _pad;
     209                [value(0)]            uint32    _pad;
    161210                [flag(NDR_REMAINING)] DATA_BLOB auth_info;
    162211        } dcerpc_auth3;
    163212
    164213        typedef [public] struct {
    165                 uint32 _pad;
     214                [value(0)]            uint32    _pad;
    166215                [flag(NDR_REMAINING)] DATA_BLOB auth_info;
    167216        } dcerpc_orphaned;
    168217
    169218        typedef [public] struct {
    170                 uint32 _pad;
     219                [value(0)]            uint32    _pad;
    171220                [flag(NDR_REMAINING)] DATA_BLOB auth_info;
    172221        } dcerpc_co_cancel;
     
    205254        typedef [public] struct {
    206255        } dcerpc_working;
     256
     257        /* RTS data structures */
     258        typedef [public] struct {
     259                GUID            Cookie;
     260        } RTSCookie;
     261
     262        typedef [v1_enum,public] enum {
     263                RTS_IPV4        = 0,
     264                RTS_IPV6        = 1
     265        } AddressType;
     266
     267        typedef [nodiscriminant] union {
     268                [case(RTS_IPV4)] ipv4address    ClientAddressIPV4;
     269                [case(RTS_IPV6)] ipv6address    ClientAddressIPV6;
     270        } ClientAddressType;
     271
     272        typedef [public] struct {
     273                AddressType                                     AddressType;
     274                [switch_is(AddressType)] ClientAddressType      ClientAddress;
     275                uint8                                           Padding[12];
     276        } ClientAddress;
     277
     278        typedef [v1_enum, public] enum {
     279                FDClient        = 0,
     280                FDInProxy       = 1,
     281                FDServer        = 2,
     282                FDOutProxy      = 3
     283        } ForwardDestination;
     284
     285        typedef [public] struct {
     286                uint32          BytesReceived;
     287                uint32          AvailableWindow;
     288                RTSCookie       ChannelCookie;
     289        } FlowControlAcknowledgment;
     290
     291        /* RTS commands */
     292
     293        /* RTS command: 0x0 */
     294        typedef [public] struct {
     295                [range(0x2000,0x40000)] uint32  ReceiveWindowSize;
     296        } dcerpc_rts_cmd_ReceiveWindowSize;
     297
     298        /* RTS command: 0x1 */
     299        typedef [public] struct {
     300                FlowControlAcknowledgment       Ack;
     301        } dcerpc_rts_cmd_FlowControlAck;
     302
     303        /* RTS command: 0x2 */
     304        typedef [public] struct {
     305                [range(0x1D4C0,0xDBBA00)] uint32        ConnectionTimeout;
     306        } dcerpc_rts_cmd_ConnectionTimeout;
     307
     308        /* RTS command: 0x3 */
     309        typedef [public] struct {
     310                RTSCookie       Cookie;
     311        } dcerpc_rts_cmd_Cookie;
     312
     313        /* RTS command: 0x4 */
     314        typedef [public] struct {
     315                [range(0x20000,0x80000000)] uint32      ChannelLifetime;
     316        } dcerpc_rts_cmd_ChannelLifetime;
     317
     318        /* RTS command: 0x5 */
     319        typedef [public] struct {
     320                uint32          ClientKeepalive;
     321        } dcerpc_rts_cmd_ClientKeepalive;
     322
     323        /* RTS command: 0x6 */
     324        typedef [public] struct {
     325                uint32          Version;
     326        } dcerpc_rts_cmd_Version;
     327
     328        /* RTS command: 0x7 */
     329        typedef [public] struct {
     330        } dcerpc_rts_cmd_Empty;
     331
     332        /* RTS command: 0x8 */
     333        typedef [public] struct {
     334                [range(0x0,0xFFFF)] uint32      ConformanceCount;
     335                uint8                           Padding[ConformanceCount];
     336        } dcerpc_rts_cmd_Padding;
     337
     338        /* RTS command: 0x9 */
     339        typedef [public] struct {
     340        } dcerpc_rts_cmd_NegativeANCE;
     341
     342        /* RTS Command: 0xA */
     343        typedef [public] struct {
     344        } dcerpc_rts_cmd_ANCE;
     345
     346        /* RTS command: 0xB */
     347        typedef [public] struct {
     348                ClientAddress   ClientAddress;
     349        } dcerpc_rts_cmd_ClientAddress;
     350
     351        /* RTS command: 0xC */
     352        typedef [public] struct {
     353                RTSCookie       AssociationGroupId;
     354        } dcerpc_rts_cmd_AssociationGroupId;
     355
     356        /* RTS command: 0xD */
     357        typedef [public] struct {
     358                ForwardDestination      ForwardDestination;
     359        } dcerpc_rts_cmd_Destination;
     360
     361        /* RTS command: 0xE */
     362        typedef [public] struct {
     363                uint32  PingTrafficSent;
     364        } dcerpc_rts_cmd_PingTrafficSentNotify;
     365
     366        typedef [nodiscriminant] union {
     367                [case(0x0)] dcerpc_rts_cmd_ReceiveWindowSize            ReceiveWindowSize;
     368                [case(0x1)] dcerpc_rts_cmd_FlowControlAck               FlowControlAck;
     369                [case(0x2)] dcerpc_rts_cmd_ConnectionTimeout            ConnectionTimeout;
     370                [case(0x3)] dcerpc_rts_cmd_Cookie                       Cookie;
     371                [case(0x4)] dcerpc_rts_cmd_ChannelLifetime              ChannelLifetime;
     372                [case(0x5)] dcerpc_rts_cmd_ClientKeepalive              ClientKeepalive;
     373                [case(0x6)] dcerpc_rts_cmd_Version                      Version;
     374                [case(0x7)] dcerpc_rts_cmd_Empty                        Empty;
     375                [case(0x8)] dcerpc_rts_cmd_Padding                      Padding;
     376                [case(0x9)] dcerpc_rts_cmd_NegativeANCE                 NegativeANCE;
     377                [case(0xA)] dcerpc_rts_cmd_ANCE                         ANCE;
     378                [case(0xB)] dcerpc_rts_cmd_ClientAddress                ClientAddress;
     379                [case(0xC)] dcerpc_rts_cmd_AssociationGroupId           AssociationGroupId;
     380                [case(0xD)] dcerpc_rts_cmd_Destination                  Destination;
     381                [case(0xE)] dcerpc_rts_cmd_PingTrafficSentNotify        PingTrafficSentNotify;
     382        } dcerpc_rts_cmds;
     383
     384        typedef [public] struct {
     385                uint32                                          CommandType;
     386                [switch_is(CommandType)] dcerpc_rts_cmds        Command;
     387        } dcerpc_rts_cmd;
     388
     389        /* The RTS flags */
     390        typedef [public, bitmap16bit] bitmap {
     391                RTS_FLAG_NONE                   =       0x0000,
     392                RTS_FLAG_PING                   =       0x0001,
     393                RTS_FLAG_OTHER_CMD              =       0x0002,
     394                RTS_FLAG_RECYCLE_CHANNEL        =       0x0004,
     395                RTS_FLAG_IN_CHANNEL             =       0x0008,
     396                RTS_FLAG_OUT_CHANNEL            =       0x0010,
     397                RTS_FLAG_EOF                    =       0x0020,
     398                RTS_FLAG_ECHO                   =       0x0040
     399        } dcerpc_rts_flags;
     400
     401        typedef [public] struct {
     402                dcerpc_rts_flags        Flags;
     403                uint16                  NumberOfCommands;
     404                dcerpc_rts_cmd          Commands[NumberOfCommands];
     405        } dcerpc_rts;
    207406
    208407        typedef [enum8bit] enum {
     
    226425                DCERPC_PKT_SHUTDOWN    = 17,    /* Server to client request to shutdown. */
    227426                DCERPC_PKT_CO_CANCEL   = 18,    /* Connection-oriented cancel request. */
    228                 DCERPC_PKT_ORPHANED    = 19     /* Client telling server it's aborting a partially sent request or telling server to stop sending replies. */
     427                DCERPC_PKT_ORPHANED    = 19,    /* Client telling server it's aborting a partially sent request or telling server to stop sending replies. */
     428                DCERPC_PKT_RTS         = 20     /* RTS packets used in ncacn_http */
    229429        } dcerpc_pkt_type;
    230430
     
    250450                [case(DCERPC_PKT_ORPHANED)]   dcerpc_orphaned orphaned;
    251451                [case(DCERPC_PKT_AUTH3)]      dcerpc_auth3    auth3;
     452                [case(DCERPC_PKT_RTS)]        dcerpc_rts      rts;
    252453        } dcerpc_payload;
    253454
  • trunk/server/librpc/idl/drsblobs.idl

    r414 r745  
    11#include "idl_types.h"
    22
    3 import "drsuapi.idl", "misc.idl", "samr.idl", "lsa.idl";
     3import "drsuapi.idl", "misc.idl", "samr.idl", "lsa.idl", "security.idl";
    44
    55[
     
    1111]
    1212interface drsblobs {
    13         typedef bitmap drsuapi_DsReplicaSyncOptions drsuapi_DsReplicaSyncOptions;
    14         typedef bitmap drsuapi_DsReplicaNeighbourFlags drsuapi_DsReplicaNeighbourFlags;
     13        typedef bitmap drsuapi_DrsOptions drsuapi_DrsOptions;
    1514        typedef [v1_enum] enum drsuapi_DsAttributeId drsuapi_DsAttributeId;
    1615        typedef [v1_enum] enum lsa_TrustAuthType lsa_TrustAuthType;
     
    3130        typedef struct {
    3231                uint32 count;
    33                 uint32 reserved;
     32                [value(0)] uint32 reserved;
    3433                replPropertyMetaData1 array[count];
    3534        } replPropertyMetaDataCtr1;
     
    4140        typedef [public] struct {
    4241                uint32 version;
    43                 uint32 reserved;
     42                [value(0)] uint32 reserved;
    4443                [switch_is(version)] replPropertyMetaDataCtr ctr;
    4544        } replPropertyMetaDataBlob;
     
    5655        typedef struct {
    5756                uint32 count;
    58                 uint32 reserved;
     57                [value(0)] uint32 reserved;
    5958                drsuapi_DsReplicaCursor cursors[count];
    6059        } replUpToDateVectorCtr1;
     
    6261        typedef struct {
    6362                uint32 count;
    64                 uint32 reserved;
     63                [value(0)] uint32 reserved;
    6564                drsuapi_DsReplicaCursor2 cursors[count];
    6665        } replUpToDateVectorCtr2;
     
    7372        typedef [public] struct {
    7473                uint32 version;
    75                 uint32 reserved;
     74                [value(0)] uint32 reserved;
    7675                [switch_is(version)] replUpToDateVectorCtr ctr;
    7776        } replUpToDateVectorBlob;
     
    9493        typedef [public,gensize,flag(NDR_PAHEX)] struct {
    9594                /* this includes the 8 bytes of the repsFromToBlob header */
    96                 [value(ndr_size_repsFromTo1(this, ndr->iconv_convenience, ndr->flags)+8)] uint32 blobsize;
     95                [value(ndr_size_repsFromTo1(this, ndr->flags)+8)] uint32 blobsize;
    9796                uint32 consecutive_sync_failures;
    9897                NTTIME_1sec last_success;
     
    10099                WERROR result_last_attempt;
    101100                [relative] repsFromTo1OtherInfo *other_info;
    102                 [value(ndr_size_repsFromTo1OtherInfo(other_info, ndr->iconv_convenience, ndr->flags))] uint32 other_info_length;
    103                 drsuapi_DsReplicaNeighbourFlags replica_flags;
     101                [value(ndr_size_repsFromTo1OtherInfo(other_info, ndr->flags))] uint32 other_info_length;
     102                drsuapi_DrsOptions replica_flags;
    104103                uint8 schedule[84];
    105                 uint32 reserved;
     104                [value(0)] uint32 reserved;
    106105                drsuapi_DsReplicaHighWaterMark highwatermark;
    107106                GUID source_dsa_obj_guid; /* the 'objectGuid' field of the CN=NTDS Settings object */
     
    111110
    112111        typedef [public,relative_base,gensize] struct {
    113                 [value(ndr_size_repsFromTo2OtherInfo(this,ndr->iconv_convenience, ndr->flags))]
     112                [value(ndr_size_repsFromTo2OtherInfo(this,ndr->flags))]
    114113                        uint32 __ndr_size;
    115114                [relative] nstring *dns_name1;
     
    121120        typedef [public,gensize,flag(NDR_PAHEX)] struct {
    122121                /* this includes the 8 bytes of the repsFromToBlob header */
    123                 [value(ndr_size_repsFromTo2(this, ndr->iconv_convenience, ndr->flags)+8)] uint32 blobsize;
     122                [value(ndr_size_repsFromTo2(this, ndr->flags)+8)] uint32 blobsize;
    124123                uint32 consecutive_sync_failures;
    125124                NTTIME_1sec last_success;
     
    127126                WERROR result_last_attempt;
    128127                [relative] repsFromTo2OtherInfo *other_info;
    129                 [value(ndr_size_repsFromTo2OtherInfo(other_info, ndr->iconv_convenience, ndr->flags))] uint32 other_info_length;
    130                 drsuapi_DsReplicaNeighbourFlags replica_flags;
     128                [value(ndr_size_repsFromTo2OtherInfo(other_info, ndr->flags))] uint32 other_info_length;
     129                drsuapi_DrsOptions replica_flags;
    131130                uint8 schedule[84];
    132                 uint32 reserved;
     131                [value(0)] uint32 reserved;
    133132                drsuapi_DsReplicaHighWaterMark highwatermark;
    134133                GUID source_dsa_obj_guid; /* the 'objectGuid' field of the CN=NTDS Settings object */
     
    145144        typedef [public] struct {
    146145                uint32 version;
    147                 uint32 reserved;
     146                [value(0)] uint32 reserved;
    148147                [switch_is(version)] repsFromTo ctr;
    149148        } repsFromToBlob;
     
    169168        typedef [public] struct {
    170169                uint32 version;
    171                 uint32 reserved;
     170                [value(0)] uint32 reserved;
    172171                [switch_is(version)] partialAttributeSetCtr ctr;
    173172        } partialAttributeSetBlob;
     
    176175                [in] partialAttributeSetBlob blob
    177176                );
     177
     178
     179        /*
     180         * schemaInfo attribute
     181         *
     182         * Used as an attribute on Schema.
     183         * Also during replication as part of
     184         * prefixMap to identify what revision
     185         * of Schema source DC has
     186         */
     187        typedef [public,flag(NDR_NOALIGN)] struct {
     188                [value(0xFF)] uint8 marker;
     189                [flag(NDR_BIG_ENDIAN)] uint32 revision;
     190                GUID   invocation_id;
     191        } schemaInfoBlob;
     192
     193
     194        /*
     195         * MS w2k3 and w2k8 prefixMap format
     196         * There is no version number. Format is:
     197         *   uint32 - number of entries in the map
     198         *   uint32 - total bytes that structure occupies
     199         *   ENTRIES:
     200         *     uint16 - prefix ID (OID's last sub-id encoded. see prefixMap)
     201         *     uint16 - number of bytes in prefix N
     202         *     uint8[N] - BER encoded prefix
     203         */
     204        typedef [noprint,flag(NDR_NOALIGN)] struct {
     205                uint16 entryID;
     206                uint16 length;
     207                uint8 binary_oid[length];
     208        } drsuapi_MSPrefixMap_Entry;
     209
     210        typedef [public,gensize] struct {
     211                uint32 num_entries;
     212                [value(ndr_size_drsuapi_MSPrefixMap_Ctr(r, ndr->flags))] uint32 __ndr_size;
     213                drsuapi_MSPrefixMap_Entry entries[num_entries];
     214        } drsuapi_MSPrefixMap_Ctr;
    178215
    179216        /*
     
    197234        typedef [public] struct {
    198235                prefixMapVersion version;
    199                 uint32 reserved;
     236                [value(0)] uint32 reserved;
    200237                [switch_is(version)] prefixMapCtr ctr;
    201238        } prefixMapBlob;
     
    219256                uint32 u2;
    220257                uint32 u3;
    221                 [value(ndr_size_ldapControlDirSyncExtra(&extra, extra.uptodateness_vector.version, ndr->iconv_convenience, 0))]
     258                [value(ndr_size_ldapControlDirSyncExtra(&extra, extra.uptodateness_vector.version, 0))]
    222259                        uint32 extra_length;
    223260                drsuapi_DsReplicaHighWaterMark highwatermark;
     
    280317        typedef [public] struct {
    281318                [value(0)] uint32 unknown1;
    282                 [value(ndr_size_supplementalCredentialsSubBlob(&sub, ndr->iconv_convenience, ndr->flags))] uint32 __ndr_size;
     319                [value(ndr_size_supplementalCredentialsSubBlob(&sub, ndr->flags))] uint32 __ndr_size;
    283320                [value(0)] uint32 unknown2;
    284321                [subcontext(0),subcontext_size(__ndr_size)] supplementalCredentialsSubBlob sub;
     
    432469                NTTIME LastUpdateTime;
    433470                lsa_TrustAuthType AuthType;
    434                
    435471                [switch_is(AuthType)] AuthInfo AuthInfo;
    436472                [flag(NDR_ALIGN4)] DATA_BLOB _pad;
    437473        } AuthenticationInformation;
    438474
    439         typedef [nopull,nopush,noprint] struct {
    440                 /* sizeis here is bogus, but this is here just for the structure */
    441                 [size_is(1)] AuthenticationInformation array[];
     475        /* count is not on the wire */
     476        typedef [public,nopull,nopush,gensize] struct {
     477                uint32 count;
     478                AuthenticationInformation array[count];
    442479        } AuthenticationInformationArray;
    443480
    444         /* This is nopull,nopush because we pass count down to the
    445          * manual parser of AuthenticationInformationArray */
    446         typedef [public,nopull,nopush,noprint,gensize] struct {
     481        /* we cannot use [relative] pointers here because Windows expects the
     482         * previous_offset to match the total size of the struct in case
     483         * the previous array is empty, see MS-LSAD 2.2.7.16 - gd */
     484        typedef [public,gensize,nopush] struct {
    447485                uint32 count;
    448                 [relative] AuthenticationInformationArray *current;
    449                 [relative] AuthenticationInformationArray *previous;
     486                [value((count > 0) ? 12 : 0)] uint32 current_offset;
     487                [value((count > 0) ? 12 + ndr_size_AuthenticationInformationArray(&current, ndr->flags) : 0)] uint32 previous_offset;
     488                [subcontext(0),subcontext_size((previous_offset)-(current_offset))] AuthenticationInformationArray current;
     489                [subcontext(0)] [flag(NDR_REMAINING)] AuthenticationInformationArray previous;
    450490        } trustAuthInOutBlob;
    451491
    452         void decode_trustAuthInOut(
     492        [nopython] void decode_trustAuthInOut(
    453493                [in] trustAuthInOutBlob blob
    454494                );
    455 
    456         typedef [public,gensize] struct {
    457                 uint32 count;
    458                 [relative] AuthenticationInformation *current[count];
    459         } trustCurrentPasswords;
    460495
    461496        typedef [public,nopull] struct {
    462497                uint8 confounder[512];
    463                 [subcontext(0),subcontext_size(outgoing_size)] trustCurrentPasswords outgoing;
    464                 [subcontext(0),subcontext_size(incoming_size)] trustCurrentPasswords incoming;
    465                 [value(ndr_size_trustCurrentPasswords(&outgoing, ndr->iconv_convenience, ndr->flags))] uint32 outgoing_size;
    466                 [value(ndr_size_trustCurrentPasswords(&incoming, ndr->iconv_convenience, ndr->flags))] uint32 incoming_size;
     498                [subcontext(0),subcontext_size(outgoing_size)] trustAuthInOutBlob outgoing;
     499                [subcontext(0),subcontext_size(incoming_size)] trustAuthInOutBlob incoming;
     500                [value(ndr_size_trustAuthInOutBlob(&outgoing, ndr->flags))] uint32 outgoing_size;
     501                [value(ndr_size_trustAuthInOutBlob(&incoming, ndr->flags))] uint32 incoming_size;
    467502        } trustDomainPasswords;
    468503
    469         void decode_trustDomainPasswords(
     504        [nopython] void decode_trustDomainPasswords(
    470505                [in] trustDomainPasswords blob
    471506                );
     
    548583        } ExtendedErrorInfoPtr;
    549584
    550         void decode_ExtendedErrorInfo (
     585        [nopython] void decode_ExtendedErrorInfo (
    551586                [in,subcontext(0xFFFFFC01)] ExtendedErrorInfoPtr ptr
    552587                );
     588
     589        /* MS-ADTS 7.1.6.9.3 msDS-TrustForestTrustInfo Attribute */
     590
     591        typedef struct {
     592                [value(strlen_m(string))] uint32 size;
     593                [charset(UTF8)] uint8 string[size];
     594        } ForestTrustString;
     595
     596        typedef [flag(NDR_NOALIGN)] struct {
     597                [value(ndr_size_dom_sid0(&sid, ndr->flags))] uint32 sid_size;
     598                [subcontext(0),subcontext_size(sid_size)] dom_sid sid;
     599                ForestTrustString dns_name;
     600                ForestTrustString netbios_name;
     601        } ForestTrustDataDomainInfo;
     602
     603        typedef [flag(NDR_NOALIGN)] struct {
     604                uint32 size;
     605                uint8 data[size];
     606        } ForestTrustDataBinaryData;
     607
     608        typedef [nodiscriminant] union {
     609                [case(FOREST_TRUST_TOP_LEVEL_NAME)] ForestTrustString name;
     610                [case(FOREST_TRUST_TOP_LEVEL_NAME_EX)] ForestTrustString name;
     611                [case(FOREST_TRUST_DOMAIN_INFO)] ForestTrustDataDomainInfo info;
     612                [default] ForestTrustDataBinaryData data;
     613        } ForestTrustData;
     614
     615        /* same as lsa_ForestTrustRecordType */
     616        typedef [enum8bit] enum {
     617                FOREST_TRUST_TOP_LEVEL_NAME = 0,
     618                FOREST_TRUST_TOP_LEVEL_NAME_EX = 1,
     619                FOREST_TRUST_DOMAIN_INFO = 2
     620        } ForestTrustInfoRecordType;
     621
     622        /* meaning of flags depends on record type and values are
     623           the same as in lsa.idl, see collision record types */
     624        typedef [public,gensize,flag(NDR_NOALIGN)] struct {
     625                uint32 flags;
     626                NTTIME timestamp;
     627                ForestTrustInfoRecordType type;
     628                [switch_is(type)] ForestTrustData data;
     629        } ForestTrustInfoRecord;
     630
     631        typedef [flag(NDR_NOALIGN)] struct {
     632                [value(ndr_size_ForestTrustInfoRecord(&record, ndr->flags))] uint32 record_size;
     633                ForestTrustInfoRecord record;
     634        } ForestTrustInfoRecordArmor;
     635
     636        typedef [public,flag(NDR_NOALIGN)] struct {
     637                uint32 version;
     638                uint32 count;
     639                ForestTrustInfoRecordArmor records[count];
     640        } ForestTrustInfo;
     641
     642        [nopython] void decode_ForestTrustInfo(
     643                [in] ForestTrustInfo blob
     644                );
    553645}
  • trunk/server/librpc/idl/drsuapi.idl

    r414 r745  
    11#include "idl_types.h"
    22
    3 import "security.idl", "misc.idl", "samr.idl";
     3import "security.idl", "misc.idl", "lsa.idl", "samr.idl";
    44
    55[
     
    1616        typedef bitmap samr_GroupAttrs samr_GroupAttrs;
    1717
     18        /* see MS-DRSR section 5.39 */
     19        typedef [public,bitmap32bit] bitmap {
     20                DRSUAPI_DRS_ASYNC_OP                  = 0x00000001,
     21                DRSUAPI_DRS_GETCHG_CHECK              = 0x00000002,
     22                DRSUAPI_DRS_UPDATE_NOTIFICATION       = 0x00000002,
     23                DRSUAPI_DRS_ADD_REF                   = 0x00000004,
     24                DRSUAPI_DRS_SYNC_ALL                  = 0x00000008,
     25                DRSUAPI_DRS_DEL_REF                   = 0x00000008,
     26                DRSUAPI_DRS_WRIT_REP                  = 0x00000010,
     27                DRSUAPI_DRS_INIT_SYNC                 = 0x00000020,
     28                DRSUAPI_DRS_PER_SYNC                  = 0x00000040,
     29                DRSUAPI_DRS_MAIL_REP                  = 0x00000080,
     30                DRSUAPI_DRS_ASYNC_REP                 = 0x00000100,
     31                DRSUAPI_DRS_IGNORE_ERROR              = 0x00000100,
     32                DRSUAPI_DRS_TWOWAY_SYNC               = 0x00000200,
     33                DRSUAPI_DRS_CRITICAL_ONLY             = 0x00000400,
     34                DRSUAPI_DRS_GET_ANC                   = 0x00000800,
     35                DRSUAPI_DRS_GET_NC_SIZE               = 0x00001000,
     36                DRSUAPI_DRS_LOCAL_ONLY                = 0x00001000,
     37                DRSUAPI_DRS_NONGC_RO_REP              = 0x00002000,
     38                DRSUAPI_DRS_SYNC_BYNAME               = 0x00004000,
     39                DRSUAPI_DRS_REF_OK                    = 0x00004000,
     40                DRSUAPI_DRS_FULL_SYNC_NOW             = 0x00008000,
     41                DRSUAPI_DRS_NO_SOURCE                 = 0x00008000,
     42                DRSUAPI_DRS_FULL_SYNC_IN_PROGRESS     = 0x00010000,
     43                DRSUAPI_DRS_FULL_SYNC_PACKET          = 0x00020000,
     44                DRSUAPI_DRS_SYNC_REQUEUE              = 0x00040000,
     45                DRSUAPI_DRS_SYNC_URGENT               = 0x00080000,
     46                DRSUAPI_DRS_REF_GCSPN                 = 0x00100000,
     47                DRSUAPI_DRS_NO_DISCARD                = 0x00100000,
     48                DRSUAPI_DRS_NEVER_SYNCED              = 0x00200000,
     49                DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING = 0x00400000,
     50                DRSUAPI_DRS_INIT_SYNC_NOW             = 0x00800000,
     51                DRSUAPI_DRS_PREEMPTED                 = 0x01000000,
     52                DRSUAPI_DRS_SYNC_FORCED               = 0x02000000,
     53                DRSUAPI_DRS_DISABLE_AUTO_SYNC         = 0x04000000,
     54                DRSUAPI_DRS_DISABLE_PERIODIC_SYNC     = 0x08000000,
     55                DRSUAPI_DRS_USE_COMPRESSION           = 0x10000000,
     56                DRSUAPI_DRS_NEVER_NOTIFY              = 0x20000000,
     57                DRSUAPI_DRS_SYNC_PAS                  = 0x40000000,
     58                DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP  = 0x80000000
     59        } drsuapi_DrsOptions;
     60
    1861        /*****************/
    1962        /* Function 0x00 */
     
    2669                DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1                   = 0x00000020,
    2770                DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION    = 0x00000040,
    28                 DRSUAPI_SUPPORTED_EXTENSION_00000080                    = 0x00000080,
     71                DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY                    = 0x00000080,
    2972                DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE                 = 0x00000100,
    3073                DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2                 = 0x00000200,
     
    3982                DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY             = 0x00040000,
    4083                DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3                  = 0x00080000,
    41                 DRSUAPI_SUPPORTED_EXTENSION_00100000                    = 0x00100000,
     84                DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V5                = 0x00100000,
    4285                DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2            = 0x00200000,
    4386                DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6                = 0x00400000,
     
    5497                DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT               = 0x08000000,
    5598                DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS             = 0x10000000,
    56                 DRSUAPI_SUPPORTED_EXTENSION_20000000                    = 0x20000000,
    57                 DRSUAPI_SUPPORTED_EXTENSION_40000000                    = 0x40000000,
    58                 DRSUAPI_SUPPORTED_EXTENSION_80000000                    = 0x80000000
     99                DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V10               = 0x20000000,
     100                DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART2              = 0x40000000,
     101                DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART3              = 0x80000000
    59102        } drsuapi_SupportedExtensions;
    60103
    61104        typedef [bitmap32bit] bitmap {
    62105                DRSUAPI_SUPPORTED_EXTENSION_ADAM                        = 0x00000001,
    63                 DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2                    = 0x00000002
     106                DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2                    = 0x00000002,
     107                DRSUAPI_SUPPORTED_EXTENSION_RECYCLE_BIN                 = 0x00000004
    64108        } drsuapi_SupportedExtensionsExt;
    65109
     
    143187        /* Function 0x02 */
    144188        typedef [public,gensize] struct {
    145                 [value(ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->iconv_convenience, ndr->flags)-4)] uint32 __ndr_size;
     189                [value(ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->flags)-4)] uint32 __ndr_size;
    146190                [value(ndr_size_dom_sid28(&sid, ndr->flags))]  uint32 __ndr_size_sid;
    147191                GUID guid;
     
    151195        } drsuapi_DsReplicaObjectIdentifier;
    152196
    153         typedef [public] bitmap {
    154                 DRSUAPI_DS_REPLICA_SYNC_ASYNCHRONOUS_OPERATION  = 0x00000001,
    155                 DRSUAPI_DS_REPLICA_SYNC_WRITEABLE               = 0x00000002,
    156                 DRSUAPI_DS_REPLICA_SYNC_PERIODIC                = 0x00000004,
    157                 DRSUAPI_DS_REPLICA_SYNC_INTERSITE_MESSAGING     = 0x00000008,
    158                 DRSUAPI_DS_REPLICA_SYNC_ALL_SOURCES             = 0x00000010,
    159                 DRSUAPI_DS_REPLICA_SYNC_FULL                    = 0x00000020,
    160                 DRSUAPI_DS_REPLICA_SYNC_URGENT                  = 0x00000040,
    161                 DRSUAPI_DS_REPLICA_SYNC_NO_DISCARD              = 0x00000080,
    162                 DRSUAPI_DS_REPLICA_SYNC_FORCE                   = 0x00000100,
    163                 DRSUAPI_DS_REPLICA_SYNC_ADD_REFERENCE           = 0x00000200,
    164                 DRSUAPI_DS_REPLICA_SYNC_NEVER_COMPLETED         = 0x00000400,
    165                 DRSUAPI_DS_REPLICA_SYNC_TWO_WAY                 = 0x00000800,
    166                 DRSUAPI_DS_REPLICA_SYNC_NEVER_NOTIFY            = 0x00001000,
    167                 DRSUAPI_DS_REPLICA_SYNC_INITIAL                 = 0x00002000,
    168                 DRSUAPI_DS_REPLICA_SYNC_USE_COMPRESSION         = 0x00004000,
    169                 DRSUAPI_DS_REPLICA_SYNC_ABANDONED               = 0x00008000,
    170                 DRSUAPI_DS_REPLICA_SYNC_INITIAL_IN_PROGRESS     = 0x00010000,
    171                 DRSUAPI_DS_REPLICA_SYNC_PARTIAL_ATTRIBUTE_SET   = 0x00020000,
    172                 DRSUAPI_DS_REPLICA_SYNC_REQUEUE                 = 0x00040000,
    173                 DRSUAPI_DS_REPLICA_SYNC_NOTIFICATION            = 0x00080000,
    174                 DRSUAPI_DS_REPLICA_SYNC_ASYNCHRONOUS_REPLICA    = 0x00100000,
    175                 DRSUAPI_DS_REPLICA_SYNC_CRITICAL                = 0x00200000,
    176                 DRSUAPI_DS_REPLICA_SYNC_FULL_IN_PROGRESS        = 0x00400000,
    177                 DRSUAPI_DS_REPLICA_SYNC_PREEMPTED               = 0x00800000
    178         } drsuapi_DsReplicaSyncOptions;
    179 
    180         typedef struct {
    181                 drsuapi_DsReplicaObjectIdentifier *naming_context;
     197        typedef struct {
     198                [ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
    182199                GUID source_dsa_guid;
    183                 astring *other_info; /* I assume this is related to the repsFromTo1OtherInfo dns_name */
    184                 drsuapi_DsReplicaSyncOptions options;
     200                astring *source_dsa_dns; /* Source DSA dns_name in <guid>._msdcs.<domain_dns> form */
     201                drsuapi_DrsOptions options;
    185202        } drsuapi_DsReplicaSyncRequest1;
    186203
    187         typedef [switch_type(int32)] union {
     204        typedef [switch_type(uint32)] union {
    188205                [case(1)] drsuapi_DsReplicaSyncRequest1 req1;
    189206        } drsuapi_DsReplicaSyncRequest;
     
    191208        WERROR drsuapi_DsReplicaSync(
    192209                [in] policy_handle *bind_handle,
    193                 [in] int32 level,
    194                 [in,switch_is(level)] drsuapi_DsReplicaSyncRequest req
     210                [in] uint32 level,
     211                [in,switch_is(level)] drsuapi_DsReplicaSyncRequest *req
    195212                );
    196213
     
    215232                [size_is(count)] drsuapi_DsReplicaCursor cursors[];
    216233        } drsuapi_DsReplicaCursorCtrEx;
    217 
    218         typedef [public] bitmap {
    219                 /* the _WRITEABLE flag indicates a replication with all attributes
    220                  *
    221                  * --metze
    222                  */
    223                 DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE                          = 0x00000010,
    224                 DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP                    = 0x00000020,
    225                 DRSUAPI_DS_REPLICA_NEIGHBOUR_DO_SCHEDULED_SYNCS                 = 0x00000040,
    226                 DRSUAPI_DS_REPLICA_NEIGHBOUR_USE_ASYNC_INTERSIDE_TRANSPORT      = 0x00000080,
    227                 DRSUAPI_DS_REPLICA_NEIGHBOUR_ASYNC_REP                          = 0x00000100,
    228                 DRSUAPI_DS_REPLICA_NEIGHBOUR_IGNORE_ERROR                       = 0x00000100,
    229                 DRSUAPI_DS_REPLICA_NEIGHBOUR_TWO_WAY_SYNC                       = 0x00000200,
    230                 DRSUAPI_DS_REPLICA_NEIGHBOUR_CRITICAL_ONLY                      = 0x00000400,
    231                 DRSUAPI_DS_REPLICA_NEIGHBOUR_RETURN_OBJECT_PARENTS              = 0x00000800,/*Include updates to ancestor objects before updates to their descendants*/
    232                 DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_IN_PROGRESS                   = 0x00010000,
    233                 DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_SYNC_PACKET                   = 0x00020000,
    234                 DRSUAPI_DS_REPLICA_NEIGHBOUR_NEVER_SYNCED                       = 0x00200000,
    235                 DRSUAPI_DS_REPLICA_NEIGHBOUR_SPECIAL_SECRET_PROCESSING          = 0x00800000,
    236                 DRSUAPI_DS_REPLICA_NEIGHBOUR_PREEMPTED                          = 0x01000000,
    237                 DRSUAPI_DS_REPLICA_NEIGHBOUR_IGNORE_CHANGE_NOTIFICATIONS        = 0x04000000,
    238                 DRSUAPI_DS_REPLICA_NEIGHBOUR_DISABLE_SCHEDULED_SYNC             = 0x08000000,
    239                 /*
    240                  * the following NOTE applies to DsGetNCChangesRequest5:
    241                  *  - the data is only compressed when 10 or more objects are replicated
    242                  *  - but there could also be a size limit of 35 KBytes or something like that
    243                  *  - the reply is DsGetNCChangesCtr2
    244                  *  - maybe the same applies to DsGetNCChangesRequest8...
    245                  *
    246                  *  --metze
    247                  */
    248                 DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES                   = 0x10000000,
    249                 DRSUAPI_DS_REPLICA_NEIGHBOUR_NO_CHANGE_NOTIFICATIONS            = 0x20000000,
    250                 DRSUAPI_DS_REPLICA_NEIGHBOUR_PARTIAL_ATTRIBUTE_SET              = 0x40000000
    251         } drsuapi_DsReplicaNeighbourFlags;
    252234
    253235        typedef [flag(NDR_PAHEX),v1_enum] enum {
     
    288270                drsuapi_DsReplicaHighWaterMark highwatermark;
    289271                drsuapi_DsReplicaCursorCtrEx *uptodateness_vector;
    290                 drsuapi_DsReplicaNeighbourFlags replica_flags;
     272                drsuapi_DrsOptions replica_flags;
    291273                uint32 max_object_count; /* w2k3 uses min(133,max(100,max_object_count)) */
    292274                uint32 max_ndr_size; /* w2k3 seems to ignore this */
     
    379361         * 2.5.5.17     => dom_sid
    380362         */
    381         typedef [nopush,nopull] struct {
    382                 [range(0,10000),value(ndr_size_drsuapi_DsReplicaOID_oid(oid, 0))] uint32 __ndr_size;
    383                 [size_is(__ndr_size),charset(DOS)] uint8 *oid; /* it's encoded with asn1_write_OID_String() */
     363        typedef [noprint] struct {
     364                [range(0,10000)] uint32 length;
     365                [size_is(length)] uint8 *binary_oid; /* partial-binary-OID encoded with asn1_write_partial_OID_String() */
    384366        } drsuapi_DsReplicaOID;
    385367
     
    401383
    402384        typedef [flag(NDR_PAHEX),v1_enum,public] enum {
    403                 DRSUAPI_ATTRIBUTE_objectClass                   = 0x00000000,
    404                 DRSUAPI_ATTRIBUTE_description                   = 0x0000000d,
    405                 DRSUAPI_ATTRIBUTE_member                        = 0x0000001f,
    406                 DRSUAPI_ATTRIBUTE_instanceType                  = 0x00020001,
    407                 DRSUAPI_ATTRIBUTE_whenCreated                   = 0x00020002,
    408                 DRSUAPI_ATTRIBUTE_possSuperiors                 = 0x00020008,
    409                 DRSUAPI_ATTRIBUTE_hasMasterNCs                  = 0x0002000e,
    410                 DRSUAPI_ATTRIBUTE_subClassOf                    = 0x00020015,
    411                 DRSUAPI_ATTRIBUTE_governsID                     = 0x00020016,
    412                 DRSUAPI_ATTRIBUTE_mustContain                   = 0x00020018,
    413                 DRSUAPI_ATTRIBUTE_mayContain                    = 0x00020019,
    414                 DRSUAPI_ATTRIBUTE_attributeID                   = 0x0002001e,
    415                 DRSUAPI_ATTRIBUTE_attributeSyntax               = 0x00020020,
    416                 DRSUAPI_ATTRIBUTE_isSingleValued                = 0x00020021,
    417                 DRSUAPI_ATTRIBUTE_rangeLower                    = 0x00020022,
    418                 DRSUAPI_ATTRIBUTE_rangeUpper                    = 0x00020023,
    419                 DRSUAPI_ATTRIBUTE_dMDLocation                   = 0x00020024,
    420                 DRSUAPI_ATTRIBUTE_objectVersion                 = 0x0002004c,
    421                 DRSUAPI_ATTRIBUTE_invocationId                  = 0x00020073,
    422                 DRSUAPI_ATTRIBUTE_showInAdvancedViewOnly        = 0x000200a9,
    423                 DRSUAPI_ATTRIBUTE_adminDisplayName              = 0x000200c2,
    424                 DRSUAPI_ATTRIBUTE_adminDescription              = 0x000200e2,
    425                 DRSUAPI_ATTRIBUTE_oMSyntax                      = 0x000200e7,
    426                 DRSUAPI_ATTRIBUTE_ntSecurityDescriptor          = 0x00020119,
    427                 DRSUAPI_ATTRIBUTE_searchFlags                   = 0x0002014e,
    428                 DRSUAPI_ATTRIBUTE_auxiliaryClass                = 0x0002015f,
    429                 DRSUAPI_ATTRIBUTE_lDAPDisplayName               = 0x000201cc,
    430                 DRSUAPI_ATTRIBUTE_name                          = 0x00090001,
    431                 DRSUAPI_ATTRIBUTE_userAccountControl            = 0x00090008,
    432                 DRSUAPI_ATTRIBUTE_currentValue                  = 0x0009001b,
    433                 DRSUAPI_ATTRIBUTE_homeDirectory                 = 0x0009002c,
    434                 DRSUAPI_ATTRIBUTE_homeDrive                     = 0x0009002d,
    435                 DRSUAPI_ATTRIBUTE_scriptPath                    = 0x0009003e,
    436                 DRSUAPI_ATTRIBUTE_profilePath                   = 0x0009008b,
    437                 DRSUAPI_ATTRIBUTE_objectSid                     = 0x00090092,
    438                 DRSUAPI_ATTRIBUTE_schemaIDGUID                  = 0x00090094,
    439                 DRSUAPI_ATTRIBUTE_dBCSPwd                       = 0x00090037,/* lmPwdHash */
    440                 DRSUAPI_ATTRIBUTE_logonHours                    = 0x00090040,
    441                 DRSUAPI_ATTRIBUTE_userWorkstations              = 0x00090056,
    442                 DRSUAPI_ATTRIBUTE_unicodePwd                    = 0x0009005a,/* ntPwdHash */
    443                 DRSUAPI_ATTRIBUTE_ntPwdHistory                  = 0x0009005e,
    444                 DRSUAPI_ATTRIBUTE_priorValue                    = 0x00090064,
    445                 DRSUAPI_ATTRIBUTE_supplementalCredentials       = 0x0009007d,
    446                 DRSUAPI_ATTRIBUTE_trustAuthIncoming             = 0x00090081,
    447                 DRSUAPI_ATTRIBUTE_trustAuthOutgoing             = 0x00090087,
    448                 DRSUAPI_ATTRIBUTE_lmPwdHistory                  = 0x000900a0,
    449                 DRSUAPI_ATTRIBUTE_systemPossSuperiors           = 0x000900c3,
    450                 DRSUAPI_ATTRIBUTE_systemMayContain              = 0x000900c4,
    451                 DRSUAPI_ATTRIBUTE_systemMustContain             = 0x000900c5,
    452                 DRSUAPI_ATTRIBUTE_sAMAccountName                = 0x000900dd,
    453                 DRSUAPI_ATTRIBUTE_sAMAccountType                = 0x0009012e,
    454                 DRSUAPI_ATTRIBUTE_fSMORoleOwner                 = 0x00090171,
    455                 DRSUAPI_ATTRIBUTE_systemFlags                   = 0x00090177,
    456                 DRSUAPI_ATTRIBUTE_serverReference               = 0x00090203,
    457                 DRSUAPI_ATTRIBUTE_serverReferenceBL             = 0x00090204,
    458                 DRSUAPI_ATTRIBUTE_initialAuthIncoming           = 0x0009021b,
    459                 DRSUAPI_ATTRIBUTE_initialAuthOutgoing           = 0x0009021c,
    460                 DRSUAPI_ATTRIBUTE_wellKnownObjects              = 0x0009026a,
    461                 DRSUAPI_ATTRIBUTE_dNSHostName                   = 0x0009026b,
    462                 DRSUAPI_ATTRIBUTE_isMemberOfPartialAttributeSet = 0x0009027f,
    463                 DRSUAPI_ATTRIBUTE_userPrincipalName             = 0x00090290,
    464                 DRSUAPI_ATTRIBUTE_groupType                     = 0x000902ee,
    465                 DRSUAPI_ATTRIBUTE_servicePrincipalName          = 0x00090303,
    466                 DRSUAPI_ATTRIBUTE_objectCategory                = 0x0009030e,
    467                 DRSUAPI_ATTRIBUTE_gPLink                        = 0x0009037b,
    468                 DRSUAPI_ATTRIBUTE_msDS_Behavior_Version         = 0x000905b3,
    469                 DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber         = 0x000906f6,
    470                 DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs             = 0x0009071c,
    471                 DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs             = 0x0009072c
     385                DRSUAPI_ATTID_objectClass                       = 0x00000000,
     386                DRSUAPI_ATTID_cn                                = 0x00000003,
     387                DRSUAPI_ATTID_ou                                = 0x0000000b,
     388                DRSUAPI_ATTID_description                       = 0x0000000d,
     389                DRSUAPI_ATTID_member                            = 0x0000001f,
     390                DRSUAPI_ATTID_instanceType                      = 0x00020001,
     391                DRSUAPI_ATTID_whenCreated                       = 0x00020002,
     392                DRSUAPI_ATTID_possSuperiors                     = 0x00020008,
     393                DRSUAPI_ATTID_displayName                       = 0x0002000d,
     394                DRSUAPI_ATTID_hasMasterNCs                      = 0x0002000e,
     395                DRSUAPI_ATTID_subClassOf                        = 0x00020015,
     396                DRSUAPI_ATTID_governsID                         = 0x00020016,
     397                DRSUAPI_ATTID_mustContain                       = 0x00020018,
     398                DRSUAPI_ATTID_mayContain                        = 0x00020019,
     399                DRSUAPI_ATTID_rDNAttId                          = 0x0002001A,
     400                DRSUAPI_ATTID_attributeID                       = 0x0002001e,
     401                DRSUAPI_ATTID_attributeSyntax                   = 0x00020020,
     402                DRSUAPI_ATTID_isSingleValued                    = 0x00020021,
     403                DRSUAPI_ATTID_rangeLower                        = 0x00020022,
     404                DRSUAPI_ATTID_rangeUpper                        = 0x00020023,
     405                DRSUAPI_ATTID_dMDLocation                       = 0x00020024,
     406                DRSUAPI_ATTID_isDeleted                         = 0x00020030,
     407                DRSUAPI_ATTID_objectVersion                     = 0x0002004c,
     408                DRSUAPI_ATTID_invocationId                      = 0x00020073,
     409                DRSUAPI_ATTID_showInAdvancedViewOnly            = 0x000200a9,
     410                DRSUAPI_ATTID_adminDisplayName                  = 0x000200c2,
     411                DRSUAPI_ATTID_adminDescription                  = 0x000200e2,
     412                DRSUAPI_ATTID_oMSyntax                          = 0x000200e7,
     413                DRSUAPI_ATTID_ntSecurityDescriptor              = 0x00020119,
     414                DRSUAPI_ATTID_searchFlags                       = 0x0002014e,
     415                DRSUAPI_ATTID_auxiliaryClass                    = 0x0002015f,
     416                DRSUAPI_ATTID_lDAPDisplayName                   = 0x000201cc,
     417                DRSUAPI_ATTID_name                              = 0x00090001,
     418                DRSUAPI_ATTID_userAccountControl                = 0x00090008,
     419                DRSUAPI_ATTID_badPwdCount                       = 0x0009000c,
     420                DRSUAPI_ATTID_codePage                          = 0x00090010,
     421                DRSUAPI_ATTID_countryCode                       = 0x00090019,
     422                DRSUAPI_ATTID_currentValue                      = 0x0009001b,
     423                DRSUAPI_ATTID_homeDirectory                     = 0x0009002c,
     424                DRSUAPI_ATTID_homeDrive                         = 0x0009002d,
     425                DRSUAPI_ATTID_lastLogoff                        = 0x00090033,
     426                DRSUAPI_ATTID_lastLogon                         = 0x00090034,
     427                DRSUAPI_ATTID_dBCSPwd                           = 0x00090037,/* lmPwdHash */
     428                DRSUAPI_ATTID_scriptPath                        = 0x0009003e,
     429                DRSUAPI_ATTID_logonHours                        = 0x00090040,
     430                DRSUAPI_ATTID_userWorkstations                  = 0x00090056,
     431                DRSUAPI_ATTID_unicodePwd                        = 0x0009005a,/* ntPwdHash */
     432                DRSUAPI_ATTID_ntPwdHistory                      = 0x0009005e,
     433                DRSUAPI_ATTID_pwdLastSet                        = 0x00090060,
     434                DRSUAPI_ATTID_primaryGroupID                    = 0x00090062,
     435                DRSUAPI_ATTID_priorValue                        = 0x00090064,
     436                DRSUAPI_ATTID_supplementalCredentials           = 0x0009007d,
     437                DRSUAPI_ATTID_trustAuthIncoming                 = 0x00090081,
     438                DRSUAPI_ATTID_trustAuthOutgoing                 = 0x00090087,
     439                DRSUAPI_ATTID_userParameters                    = 0x0009008a,
     440                DRSUAPI_ATTID_profilePath                       = 0x0009008b,
     441                DRSUAPI_ATTID_objectSid                         = 0x00090092,
     442                DRSUAPI_ATTID_schemaIDGUID                      = 0x00090094,
     443                DRSUAPI_ATTID_comment                           = 0x0009009C,/* User-Comment */
     444                DRSUAPI_ATTID_accountExpires                    = 0x0009009f,
     445                DRSUAPI_ATTID_lmPwdHistory                      = 0x000900a0,
     446                DRSUAPI_ATTID_logonCount                        = 0x000900a9,
     447                DRSUAPI_ATTID_systemPossSuperiors               = 0x000900c3,
     448                DRSUAPI_ATTID_systemMayContain                  = 0x000900c4,
     449                DRSUAPI_ATTID_systemMustContain                 = 0x000900c5,
     450                DRSUAPI_ATTID_systemAuxiliaryClass              = 0x000900c6,
     451                DRSUAPI_ATTID_sAMAccountName                    = 0x000900dd,
     452                DRSUAPI_ATTID_sAMAccountType                    = 0x0009012e,
     453                DRSUAPI_ATTID_options                           = 0x00090133,
     454                DRSUAPI_ATTID_fSMORoleOwner                     = 0x00090171,
     455                DRSUAPI_ATTID_systemFlags                       = 0x00090177,
     456                DRSUAPI_ATTID_serverReference                   = 0x00090203,
     457                DRSUAPI_ATTID_serverReferenceBL                 = 0x00090204,
     458                DRSUAPI_ATTID_initialAuthIncoming               = 0x0009021b,
     459                DRSUAPI_ATTID_initialAuthOutgoing               = 0x0009021c,
     460                DRSUAPI_ATTID_wellKnownObjects                  = 0x0009026a,
     461                DRSUAPI_ATTID_dNSHostName                       = 0x0009026b,
     462                DRSUAPI_ATTID_isMemberOfPartialAttributeSet     = 0x0009027f,
     463                DRSUAPI_ATTID_userPrincipalName                 = 0x00090290,
     464                DRSUAPI_ATTID_groupType                         = 0x000902ee,
     465                DRSUAPI_ATTID_servicePrincipalName              = 0x00090303,
     466                DRSUAPI_ATTID_lastKnownParent                   = 0x0009030d,
     467                DRSUAPI_ATTID_objectCategory                    = 0x0009030e,
     468                DRSUAPI_ATTID_gPLink                            = 0x0009037b,
     469                DRSUAPI_ATTID_transportAddressAttribute         = 0x0009037f,
     470                DRSUAPI_ATTID_msDS_Behavior_Version             = 0x000905b3,
     471                DRSUAPI_ATTID_msDS_KeyVersionNumber             = 0x000906f6,
     472                DRSUAPI_ATTID_msDS_HasDomainNCs                 = 0x0009071c,
     473                DRSUAPI_ATTID_msDS_hasMasterNCs                 = 0x0009072c,
     474                DRSUAPI_ATTID_isRecycled                        = 0x0009080a,
     475
     476                DRSUAPI_ATTID_INVALID                           = 0xFFFFFFFF
    472477        } drsuapi_DsAttributeId;
    473478
     
    485490                drsuapi_DsReplicaHighWaterMark highwatermark;
    486491                drsuapi_DsReplicaCursorCtrEx *uptodateness_vector;
    487                 drsuapi_DsReplicaNeighbourFlags replica_flags;
     492                drsuapi_DrsOptions replica_flags;
    488493                uint32 max_object_count; /* w2k3 uses min(133,max(100,max_object_count)) */
    489494                uint32 max_ndr_size; /* w2k3 seems to ignore this */
     
    501506                drsuapi_DsReplicaHighWaterMark highwatermark;
    502507                drsuapi_DsReplicaCursorCtrEx *uptodateness_vector;
    503                 drsuapi_DsReplicaNeighbourFlags replica_flags;
     508                drsuapi_DrsOptions replica_flags;
    504509                uint32 max_object_count; /* w2k3 uses min(133,max(100,max_object_count)) */
    505510                uint32 max_ndr_size; /* w2k3 seems to ignore this */
     
    512517        } drsuapi_DsGetNCChangesRequest10;
    513518
    514         typedef [switch_type(int32)] union {
     519        typedef [switch_type(uint32)] union {
    515520                [case(5)] drsuapi_DsGetNCChangesRequest5 req5;
    516521                [case(8)] drsuapi_DsGetNCChangesRequest8 req8;
     
    545550        /* DN String values */
    546551        typedef [public,gensize] struct {
    547                 [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->iconv_convenience, ndr->flags))] uint32 __ndr_size;
     552                [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->flags))] uint32 __ndr_size;
    548553                [value(ndr_size_dom_sid28(&sid,ndr->flags))]  uint32 __ndr_size_sid;
    549554                GUID guid;
     
    554559
    555560        typedef [public] struct {
    556                 [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary_without_Binary(r, ndr->iconv_convenience, ndr->flags))] uint32 __ndr_size;
     561                [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary_without_Binary(r, ndr->flags))] uint32 __ndr_size;
    557562                [value(ndr_size_dom_sid28(&sid,ndr->flags))]  uint32 __ndr_size_sid;
    558563                GUID guid;
     
    564569        } drsuapi_DsReplicaObjectIdentifier3Binary;
    565570
    566         typedef [public] struct {
     571        typedef [public,noprint] struct {
    567572                drsuapi_DsAttributeId attid;
    568573                drsuapi_DsAttributeValueCtr value_ctr;
     
    617622                uint32 object_count;
    618623                /* this +55 is sometimes +56, so I don't know where this comes from... --metze */
    619                 [value(ndr_size_drsuapi_DsGetNCChangesCtr1(r,ndr->iconv_convenience,ndr->flags)+55)] uint32 __ndr_size;
     624                [value(ndr_size_drsuapi_DsGetNCChangesCtr1(r,ndr->flags)+55)] uint32 __ndr_size;
    620625                drsuapi_DsReplicaObjectListItemEx *first_object;
    621626                boolean32 more_data;
     
    651656                uint32 object_count;
    652657                /* this +55 is sometimes +56, so I don't know where this comes from... --metze */
    653                 [value(ndr_size_drsuapi_DsGetNCChangesCtr6(r,ndr->iconv_convenience,ndr->flags)+55)] uint32 __ndr_size;
     658                [value(ndr_size_drsuapi_DsGetNCChangesCtr6(r,ndr->flags)+55)] uint32 __ndr_size;
    654659                drsuapi_DsReplicaObjectListItemEx *first_object;
    655660                boolean32 more_data;
     
    718723
    719724        typedef struct {
    720                 [range(0,6)] int32 level;
     725                [range(0,6)] uint32 level;
    721726                [range(2,3)] drsuapi_DsGetNCChangesCompressionType type;
    722727                [switch_is(level | (type<<16))] drsuapi_DsGetNCChangesCompressedCtr ctr;
    723728        } drsuapi_DsGetNCChangesCtr7;
    724729
    725         typedef [switch_type(int32)] union {
     730        typedef [switch_type(uint32)] union {
    726731                [case(1)] drsuapi_DsGetNCChangesCtr1 ctr1;
    727732                [case(2)] drsuapi_DsGetNCChangesCtr2 ctr2;
     
    732737        WERROR drsuapi_DsGetNCChanges(
    733738                [in] policy_handle *bind_handle,
    734                 [in] int32 level,
     739                [in] uint32 level,
    735740                [in,ref,switch_is(level)] drsuapi_DsGetNCChangesRequest *req,
    736                 [out,ref] int32 *level_out,
     741                [out,ref] uint32 *level_out,
    737742                [out,ref,switch_is(*level_out)] drsuapi_DsGetNCChangesCtr *ctr
    738743                );
     
    741746        /* Function 0x04 */
    742747        /* [MS-DRSR] 4.1.26 */
    743         typedef bitmap {
    744                 DRSUAPI_DS_REPLICA_UPDATE_ASYNCHRONOUS_OPERATION        = 0x00000001,
    745                 DRSUAPI_DS_REPLICA_UPDATE_GETCHG_CHECK                  = 0x00000002,
    746                 DRSUAPI_DS_REPLICA_UPDATE_ADD_REFERENCE                 = 0x00000004,
    747                 DRSUAPI_DS_REPLICA_UPDATE_DELETE_REFERENCE              = 0x00000008,
    748                 DRSUAPI_DS_REPLICA_UPDATE_WRITEABLE                     = 0x00000010
    749         } drsuapi_DsReplicaUpdateRefsOptions;
    750748
    751749        typedef struct {
     
    753751                [ref,charset(DOS),string] uint8 *dest_dsa_dns_name;
    754752                GUID dest_dsa_guid;
    755                 drsuapi_DsReplicaUpdateRefsOptions options;
     753                drsuapi_DrsOptions options;
    756754        } drsuapi_DsReplicaUpdateRefsRequest1;
    757755
    758         typedef [switch_type(int32)] union {
     756        typedef [switch_type(uint32)] union {
    759757                [case(1)] drsuapi_DsReplicaUpdateRefsRequest1 req1;
    760758        } drsuapi_DsReplicaUpdateRefsRequest;
     
    762760        WERROR drsuapi_DsReplicaUpdateRefs(
    763761                [in] policy_handle *bind_handle,
    764                 [in] int32 level,
     762                [in] uint32 level,
    765763                [in,switch_is(level)] drsuapi_DsReplicaUpdateRefsRequest req
    766764                );
     
    768766        /*****************/
    769767        /* Function 0x05 */
    770         typedef bitmap {
    771                 DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION   = 0x00000001,
    772                 DRSUAPI_DS_REPLICA_ADD_WRITEABLE                = 0x00000002
    773                 /* TODO ... */
    774         } drsuapi_DsReplicaAddOptions;
    775 
    776768
    777769        typedef struct {
     
    779771                [charset(UTF16),string] uint16 *source_dsa_address;
    780772                uint8 schedule[84];
    781                 drsuapi_DsReplicaAddOptions options;
     773                drsuapi_DrsOptions options;
    782774        } drsuapi_DsReplicaAddRequest1;
    783775
     
    788780                [charset(UTF16),string] uint16 *source_dsa_address;
    789781                uint8 schedule[84];
    790                 drsuapi_DsReplicaAddOptions options;
     782                drsuapi_DrsOptions options;
    791783        } drsuapi_DsReplicaAddRequest2;
    792784
    793         typedef [switch_type(int32)] union {
     785        typedef [switch_type(uint32)] union {
    794786                [case(1)] drsuapi_DsReplicaAddRequest1 req1;
    795787                [case(2)] drsuapi_DsReplicaAddRequest2 req2;
     
    798790        WERROR drsuapi_DsReplicaAdd(
    799791                [in] policy_handle *bind_handle,
    800                 [in] int32 level,
     792                [in] uint32 level,
    801793                [in,switch_is(level)] drsuapi_DsReplicaAddRequest req
    802794                );
     
    805797        /*****************/
    806798        /* Function 0x06 */
    807         typedef bitmap {
    808                 DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION   = 0x00000001,
    809                 DRSUAPI_DS_REPLICA_ADD_WRITEABLE                = 0x00000002
    810                 /* TODO ... */
    811         } drsuapi_DsReplicaDeleteOptions;
    812 
    813 
    814799        typedef struct {
    815800                [ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
    816801                [charset(UTF16),string] uint16 *source_dsa_address;
    817                 drsuapi_DsReplicaDeleteOptions options;
     802                drsuapi_DrsOptions options;
    818803        } drsuapi_DsReplicaDelRequest1;
    819804
    820         typedef [switch_type(int32)] union {
     805        typedef [switch_type(uint32)] union {
    821806                [case(1)] drsuapi_DsReplicaDelRequest1 req1;
    822807        } drsuapi_DsReplicaDelRequest;
     
    824809        WERROR drsuapi_DsReplicaDel(
    825810                [in] policy_handle *bind_handle,
    826                 [in] int32 level,
     811                [in] uint32 level,
    827812                [in,switch_is(level)] drsuapi_DsReplicaDelRequest req
    828813                );
     
    830815        /*****************/
    831816        /* Function 0x07 */
    832         typedef bitmap {
    833                 DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION   = 0x00000001,
    834                 DRSUAPI_DS_REPLICA_ADD_WRITEABLE                = 0x00000002
    835                 /* TODO ... */
    836         } drsuapi_DsReplicaModifyOptions;
    837 
    838817
    839818        typedef struct {
     
    842821                [charset(UTF16),string] uint16 *source_dra_address;
    843822                uint8 schedule[84];
    844                 uint32 replica_flags;
     823                drsuapi_DrsOptions replica_flags;
    845824                uint32 modify_fields;
    846                 drsuapi_DsReplicaModifyOptions options;
     825                drsuapi_DrsOptions options;
    847826        } drsuapi_DsReplicaModRequest1;
    848827
    849         typedef [switch_type(int32)] union {
     828        typedef [switch_type(uint32)] union {
    850829                [case(1)] drsuapi_DsReplicaModRequest1 req1;
    851830        } drsuapi_DsReplicaModRequest;
     
    853832        WERROR drsuapi_DsReplicaMod(
    854833                [in] policy_handle *bind_handle,
    855                 [in] int32 level,
     834                [in] uint32 level,
    856835                [in,switch_is(level)] drsuapi_DsReplicaModRequest req
    857836                );
     
    884863        } drsuapi_DsGetMembershipsCtr1;
    885864
    886         typedef [switch_type(int32)] union {
     865        typedef [switch_type(uint32)] union {
    887866                [case(1)] drsuapi_DsGetMembershipsCtr1 ctr1;
    888867        } drsuapi_DsGetMembershipsCtr;
     
    894873                [size_is(count)] drsuapi_DsReplicaObjectIdentifier **info_array;
    895874                uint32 flags;
    896                 drsuapi_DsMembershipType type;
     875                [range(1,7)] drsuapi_DsMembershipType type;
    897876                drsuapi_DsReplicaObjectIdentifier *domain;
    898877        } drsuapi_DsGetMembershipsRequest1;
    899878
    900         typedef [switch_type(int32)] union {
     879        typedef [switch_type(uint32)] union {
    901880                [case(1)] drsuapi_DsGetMembershipsRequest1 req1;
    902881        } drsuapi_DsGetMembershipsRequest;
    903882
    904         [todo] WERROR drsuapi_DsGetMemberships(
     883        WERROR drsuapi_DsGetMemberships(
    905884                [in] policy_handle *bind_handle,
    906                 [in] int32 level,
     885                [in] uint32 level,
    907886                [in,ref] [switch_is(level)] drsuapi_DsGetMembershipsRequest *req,
    908                 [out,ref] int32 *level_out,
     887                [out,ref] uint32 *level_out,
    909888                [out,ref] [switch_is(*level_out)] drsuapi_DsGetMembershipsCtr *ctr
    910889                );
     
    916895        /*****************/
    917896        /* Function 0x0b */
    918         typedef struct {
    919                 uint32 unknown1;
    920                 uint32 unknown2;
    921                 [range(0,0x00A00000)] uint32 length;
    922                 [size_is(length)] uint8 *data;
     897        typedef [bitmap32bit] bitmap {
     898                DRSUAPI_NT4_CHANGELOG_GET_CHANGELOG             = 0x00000001,
     899                DRSUAPI_NT4_CHANGELOG_GET_SERIAL_NUMBERS        = 0x00000002
     900        } drsuapi_DsGetNT4ChangeLogFlags;
     901
     902        typedef struct {
     903                drsuapi_DsGetNT4ChangeLogFlags flags;
     904                uint32 preferred_maximum_length;
     905                [range(0,0x00A00000)] uint32 restart_length;
     906                [size_is(restart_length)] uint8 *restart_data;
    923907        } drsuapi_DsGetNT4ChangeLogRequest1;
    924908
     
    928912
    929913        typedef struct {
    930                 [range(0,0x00A00000)] uint32 length1;
    931                 [range(0,0x00A00000)] uint32 length2;
    932                 hyper unknown1;
    933                 NTTIME time2;
    934                 hyper unknown3;
    935                 NTTIME time4;
    936                 hyper unknown5;
    937                 NTTIME time6;
     914                [range(0,0x00A00000)] uint32 restart_length;
     915                [range(0,0x00A00000)] uint32 log_length;
     916                hyper sam_serial_number;
     917                NTTIME sam_creation_time;
     918                hyper builtin_serial_number;
     919                NTTIME builtin_creation_time;
     920                hyper lsa_serial_number;
     921                NTTIME lsa_creation_time;
    938922                NTSTATUS status;
    939                 [size_is(length1)] uint8 *data1;
    940                 [size_is(length2)] uint8 *data2;
     923                [size_is(restart_length)] uint8 *restart_data;
     924                [size_is(log_length)] uint8 *log_data;
    941925        } drsuapi_DsGetNT4ChangeLogInfo1;
    942926
     
    945929        } drsuapi_DsGetNT4ChangeLogInfo;
    946930
    947         [todo] WERROR drsuapi_DsGetNT4ChangeLog(
     931        WERROR drsuapi_DsGetNT4ChangeLog(
    948932                [in] policy_handle *bind_handle,
    949933                [in] uint32 level,
     
    975959
    976960        typedef [v1_enum] enum {
    977                 DRSUAPI_DS_NAME_FORMAT_UNKNOWN                  = 0,
    978                 DRSUAPI_DS_NAME_FORMAT_FQDN_1779                = 1,
    979                 DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT              = 2,
    980                 DRSUAPI_DS_NAME_FORMAT_DISPLAY                  = 3,
    981                 DRSUAPI_DS_NAME_FORMAT_GUID                     = 6,
    982                 DRSUAPI_DS_NAME_FORMAT_CANONICAL                = 7,
    983                 DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL           = 8,
    984                 DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX             = 9,
    985                 DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL        = 10,
    986                 DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY       = 11,
    987                 DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN               = 12
     961                DRSUAPI_DS_NAME_FORMAT_UNKNOWN                  = 0x00000000,
     962                DRSUAPI_DS_NAME_FORMAT_FQDN_1779                = 0x00000001,
     963                DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT              = 0x00000002,
     964                DRSUAPI_DS_NAME_FORMAT_DISPLAY                  = 0x00000003,
     965                DRSUAPI_DS_NAME_FORMAT_GUID                     = 0x00000006,
     966                DRSUAPI_DS_NAME_FORMAT_CANONICAL                = 0x00000007,
     967                DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL           = 0x00000008,
     968                DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX             = 0x00000009,
     969                DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL        = 0x0000000A,
     970                DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY       = 0x0000000B,
     971                DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN               = 0x0000000C,
     972                DRSUAPI_DS_NAME_FORMAT_UPN_AND_ALTSECID         = 0xFFFFFFEF,
     973                DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN_EX = 0xFFFFFFF0,
     974                DRSUAPI_DS_NAME_FORMAT_LIST_GLOBAL_CATALOG_SERVERS = 0xFFFFFFF1,
     975                DRSUAPI_DS_NAME_FORMAT_UPN_FOR_LOGON            = 0xFFFFFFF2,
     976                DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_WITH_DCS_IN_SITE = 0xFFFFFFF3,
     977                DRSUAPI_DS_NAME_FORMAT_STRING_SID_NAME          = 0xFFFFFFF4,
     978                DRSUAPI_DS_NAME_FORMAT_ALT_SECURITY_IDENTITIES_NAME = 0xFFFFFFF5,
     979                DRSUAPI_DS_NAME_FORMAT_LIST_NCS                 = 0xFFFFFFF6,
     980                DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS             = 0xFFFFFFF7,
     981                DRSUAPI_DS_NAME_FORMAT_MAP_SCHEMA_GUID          = 0xFFFFFFF8,
     982                DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN = 0xFFFFFFF9,
     983                DRSUAPI_DS_NAME_FORMAT_LIST_ROLES               = 0xFFFFFFFA,
     984                DRSUAPI_DS_NAME_FORMAT_LIST_INFO_FOR_SERVER     = 0xFFFFFFFB,
     985                DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_FOR_DOMAIN_IN_SITE = 0xFFFFFFFC,
     986                DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS_IN_SITE     = 0xFFFFFFFD,
     987                DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_IN_SITE     = 0xFFFFFFFE,
     988                DRSUAPI_DS_NAME_FORMAT_LIST_SITES               = 0xFFFFFFFF
    988989        } drsuapi_DsNameFormat;
    989990
     
    10021003        } drsuapi_DsNameRequest1;
    10031004
    1004         typedef [switch_type(int32)] union {
     1005        typedef [switch_type(uint32)] union {
    10051006                [case(1)] drsuapi_DsNameRequest1 req1;
    10061007        } drsuapi_DsNameRequest;
     
    10171018        } drsuapi_DsNameCtr1;
    10181019
    1019         typedef [switch_type(int32)] union {
     1020        typedef [switch_type(uint32)] union {
    10201021                [case(1)] drsuapi_DsNameCtr1 *ctr1;
    10211022        } drsuapi_DsNameCtr;
     
    10231024        WERROR drsuapi_DsCrackNames(
    10241025                [in] policy_handle *bind_handle,
    1025                 [in] int32 level,
     1026                [in] uint32 level,
    10261027                [in,ref,switch_is(level)] drsuapi_DsNameRequest *req,
    1027                 [out,ref] int32 *level_out,
     1028                [out,ref] uint32 *level_out,
    10281029                [out,ref,switch_is(*level_out)] drsuapi_DsNameCtr *ctr
    10291030                );
     
    10451046        } drsuapi_DsWriteAccountSpnRequest1;
    10461047
    1047         typedef [switch_type(int32)] union {
     1048        typedef [switch_type(uint32)] union {
    10481049                [case(1)] drsuapi_DsWriteAccountSpnRequest1 req1;
    10491050        } drsuapi_DsWriteAccountSpnRequest;
     
    10531054        } drsuapi_DsWriteAccountSpnResult1;
    10541055
    1055         typedef [switch_type(int32)] union {
     1056        typedef [switch_type(uint32)] union {
    10561057                [case(1)] drsuapi_DsWriteAccountSpnResult1 res1;
    10571058        } drsuapi_DsWriteAccountSpnResult;
     
    10591060        WERROR drsuapi_DsWriteAccountSpn(
    10601061                [in] policy_handle *bind_handle,
    1061                 [in] int32 level,
     1062                [in] uint32 level,
    10621063                [in,ref,switch_is(level)] drsuapi_DsWriteAccountSpnRequest *req,
    1063                 [out,ref] int32 *level_out,
     1064                [out,ref] uint32 *level_out,
    10641065                [out,ref,switch_is(*level_out)] drsuapi_DsWriteAccountSpnResult *res
    10651066                );
     
    10731074        } drsuapi_DsRemoveDSServerRequest1;
    10741075
    1075         typedef [switch_type(int32)] union {
     1076        typedef [switch_type(uint32)] union {
    10761077                [case(1)] drsuapi_DsRemoveDSServerRequest1 req1;
    10771078        } drsuapi_DsRemoveDSServerRequest;
     
    10811082        } drsuapi_DsRemoveDSServerResult1;
    10821083
    1083         typedef [switch_type(int32)] union {
     1084        typedef [switch_type(uint32)] union {
    10841085                [case(1)] drsuapi_DsRemoveDSServerResult1 res1;
    10851086        } drsuapi_DsRemoveDSServerResult;
     
    10871088        WERROR drsuapi_DsRemoveDSServer(
    10881089                [in] policy_handle *bind_handle,
    1089                 [in] int32 level,
     1090                [in] uint32 level,
    10901091                [in,ref,switch_is(level)] drsuapi_DsRemoveDSServerRequest *req,
    1091                 [out,ref] int32 *level_out,
     1092                [out,ref] uint32 *level_out,
    10921093                [out,ref,switch_is(*level_out)] drsuapi_DsRemoveDSServerResult *res
    10931094                );
     
    12371238        const char *DRSUAPI_NTDSDSA_KRB5_SERVICE_GUID = "E3514235-4B06-11D1-AB04-00C04FC2DCD2";
    12381239
     1240        /* Error codes to classify an error that occurs
     1241         * during a search for, or the update of,
     1242         * a directory object */
     1243        typedef [v1_enum] enum {
     1244                DRSUAPI_DIRERR_OK         = 0,
     1245                DRSUAPI_DIRERR_ATTRIBUTE  = 1,
     1246                DRSUAPI_DIRERR_NAME       = 2,
     1247                DRSUAPI_DIRERR_REFERRAL   = 3,
     1248                DRSUAPI_DIRERR_SECURITY   = 4,
     1249                DRSUAPI_DIRERR_SERVICE    = 5,
     1250                DRSUAPI_DIRERR_UPDATE     = 6,
     1251                DRSUAPI_DIRERR_SYSTEM     = 7
     1252        } drsuapi_DsAddEntry_DirErr;
     1253
    12391254        /*
    1240          * please note the the current idl
    1241          * for DsAddEntry does only parse
    1242          * what I saw between 2 w2k3 boxes
    1243          * in my dssync experiments I got some other replies
    1244          * so all I want to say is that this is very incomplete yet...
    1245          * --metze
     1255         * Ref: DRS_MSG_ADDENTRYREQ_V2, [MS-DRSR]: 4.1.1.1.3
    12461256         */
    12471257        typedef struct {
     
    12491259        } drsuapi_DsAddEntryRequest2;
    12501260
    1251         typedef [switch_type(int32)] union {
     1261        /* Buffer type is actually more
     1262         * like a semi Flags
     1263         * Ref: DRS_SecBuffer, [MS-DRSR]: 5.41 */
     1264        typedef [v1_enum,noprint] enum {
     1265                DRSUAPI_SECBUFFER_EMPTY          = 0x00000000,
     1266                DRSUAPI_SECBUFFER_DATA           = 0x00000001,
     1267                DRSUAPI_SECBUFFER_TOKEN          = 0x00000002,
     1268                DRSUAPI_SECBUFFER_PKG_PARAMS     = 0x00000003,
     1269                DRSUAPI_SECBUFFER_MISSING        = 0x00000004,
     1270                DRSUAPI_SECBUFFER_EXTRA          = 0x00000005,
     1271                DRSUAPI_SECBUFFER_STREAM_TRAILER = 0x00000006,
     1272                DRSUAPI_SECBUFFER_STREAM_HEADER  = 0x00000007,
     1273                DRSUAPI_SECBUFFER_READONLY       = 0x80000000
     1274        } drsuapi_SecBufferType;
     1275
     1276        typedef struct {
     1277                [range(0,10000)] uint32 buf_size;
     1278                drsuapi_SecBufferType buf_type;
     1279                [size_is(buf_size)] uint8 *buffer;
     1280        } drsuapi_SecBuffer;
     1281
     1282        typedef struct {
     1283                [value(0)] uint32 version;
     1284                [range(0,10000)] uint32 buff_count;
     1285                [size_is(buff_count)] drsuapi_SecBuffer *buffers;
     1286        } drsuapi_SecBufferDesc;
     1287
     1288        /*
     1289         * Ref: DRS_MSG_ADDENTRYREQ_V3, [MS-DRSR]: 4.1.1.1.4
     1290         */
     1291        typedef struct {
     1292                drsuapi_DsReplicaObjectListItem first_object;
     1293                drsuapi_SecBufferDesc *client_creds;
     1294        } drsuapi_DsAddEntryRequest3;
     1295
     1296        typedef [switch_type(uint32)] union {
    12521297                [case(2)] drsuapi_DsAddEntryRequest2 req2;
     1298                [case(3)] drsuapi_DsAddEntryRequest3 req3;
    12531299        } drsuapi_DsAddEntryRequest;
    12541300
    1255         typedef struct {
    1256                 uint32 unknown1;
     1301        /* Generic extended error info
     1302         * commonly used in most places
     1303         * where rich error info is returned */
     1304        typedef struct {
     1305                uint32  dsid;           /* implementation-specific diagnostic code */
     1306                WERROR  extended_err;   /* 0, STATUS code, or Windows error code */
     1307                uint32  extended_data;  /* implementation-specific diagnostic code */
     1308                uint16  problem;        /* 0 or PROBLEM error code */
     1309        } drsuapi_DsAddEntryErrorInfoX;
     1310
     1311        /* Attribute errors
     1312         * Ref: ATRERR_DRS_WIRE_V1, [MS-DRSR]: 4.1.1.1.11 */
     1313        typedef struct {
     1314                uint32  dsid;
     1315                WERROR  extended_err;
     1316                uint32  extended_data;
     1317                uint16  problem;
     1318                drsuapi_DsAttributeId attid;
     1319                boolean32 is_val_returned;
     1320                drsuapi_DsAttributeValue attr_val;
     1321        } drsuapi_DsAddEntry_AttrErr_V1;
     1322
     1323        typedef [noprint] struct {
     1324                drsuapi_DsAddEntry_AttrErrListItem_V1 *next;
     1325                drsuapi_DsAddEntry_AttrErr_V1 err_data;
     1326        } drsuapi_DsAddEntry_AttrErrListItem_V1;
     1327
     1328        typedef struct {
     1329                drsuapi_DsReplicaObjectIdentifier *id;
     1330                uint32 count;
     1331                drsuapi_DsAddEntry_AttrErrListItem_V1 first;
     1332        } drsuapi_DsAddEntryErrorInfo_Attr_V1;
     1333
     1334        /* Name resolution error
     1335         * Ref: NAMERR_DRS_WIRE_V1, [MS-DRSR]: 4.1.1.1.14 */
     1336        typedef struct {
     1337                uint32  dsid;
     1338                WERROR  extended_err;
     1339                uint32  extended_data;
     1340                uint16  problem;
     1341                drsuapi_DsReplicaObjectIdentifier *id_matched; /* The best match for the supplied object identity */
     1342        } drsuapi_DsAddEntryErrorInfo_Name_V1;
     1343
     1344        /* Referral error
     1345         * Ref: REFERR_DRS_WIRE_V1, [MS-DRSR]: 4.1.1.1.15 */
     1346        typedef struct {
     1347                [value(83)] uint8  name_res;    /* Must be 'S' */
     1348                [value(0)]  uint8  unused_pad;
     1349                [value(0)]  uint16 next_rdn;
     1350        } drsuapi_NameResOp_V1;
     1351
     1352        typedef [enum16bit] enum {
     1353                DRSUAPI_CH_REFTYPE_SUPERIOR     = 0x0000, /* referral to a superior DC */
     1354                DRSUAPI_CH_REFTYPE_SUBORDINATE  = 0x0001, /* referral to a subordinate DC */
     1355                DRSUAPI_CH_REFTYPE_NSSR         = 0x0002, /* Not used */
     1356                DRSUAPI_CH_REFTYPE_CROSS        = 0x0003  /* A referral to an external crossRef object */
     1357        } drsuapi_DsAddEntry_RefType;
     1358
     1359        typedef [enum8bit] enum {
     1360                DRSUAPI_SE_CHOICE_BASE_ONLY     = 0x00,
     1361                DRSUAPI_SE_CHOICE_IMMED_CHLDRN  = 0x01,
     1362                DRSUAPI_SE_CHOICE_WHOLE_SUBTREE = 0x02
     1363        } drsuapi_DsAddEntry_ChoiceType;
     1364
     1365        /* list of network names of the DCs
     1366         * to which the referral is directed */
     1367        typedef struct  {
     1368                drsuapi_DsaAddressListItem_V1 *next;
     1369                lsa_String *address;
     1370        } drsuapi_DsaAddressListItem_V1;
     1371
     1372        typedef struct {
     1373                drsuapi_DsReplicaObjectIdentifier *id_target; /* object to which the referral is directed */
     1374                drsuapi_NameResOp_V1 op_state;
     1375                [value(0)] uint16 rdn_alias;
     1376                [value(0)] uint16 rdn_internal;
     1377                drsuapi_DsAddEntry_RefType ref_type;
     1378                uint16 addr_list_count;
     1379                drsuapi_DsaAddressListItem_V1 *addr_list;
     1380                drsuapi_DsAddEntry_RefErrListItem_V1 *next;
     1381                boolean32 is_choice_set;
     1382                drsuapi_DsAddEntry_ChoiceType choice;
     1383        } drsuapi_DsAddEntry_RefErrListItem_V1;
     1384
     1385        typedef struct {
     1386                uint32  dsid;
     1387                WERROR  extended_err;
     1388                uint32  extended_data;
     1389                drsuapi_DsAddEntry_RefErrListItem_V1 refer;
     1390        } drsuapi_DsAddEntryErrorInfo_Referr_V1;
     1391
     1392        typedef [switch_type(uint32)] union {
     1393                [case(1)] drsuapi_DsAddEntryErrorInfo_Attr_V1   attr_err;
     1394                [case(2)] drsuapi_DsAddEntryErrorInfo_Name_V1   name_err;
     1395                [case(3)] drsuapi_DsAddEntryErrorInfo_Referr_V1 referral_err;
     1396                [case(4)] drsuapi_DsAddEntryErrorInfoX          security_err;
     1397                [case(5)] drsuapi_DsAddEntryErrorInfoX          service_err;
     1398                [case(6)] drsuapi_DsAddEntryErrorInfoX          update_err;
     1399                [case(7)] drsuapi_DsAddEntryErrorInfoX          system_err;
     1400        } drsuapi_DsAddEntryErrorInfo;
     1401
     1402        typedef struct {
    12571403                WERROR status;
    1258                 uint32 unknown2;
    1259                 uint16 unknown3;
    1260         } drsuapi_DsAddEntryErrorInfoX;
    1261 
    1262         typedef struct {
    1263                 [range(0,10485760)] uint32 size;
    1264                 [size_is(size)] uint8 *data;
    1265         } drsuapi_DsAddEntryExtraErrorBuffer;
    1266 
    1267         typedef struct {
    1268                 drsuapi_DsAddEntryErrorInfoX error;
    1269                 drsuapi_DsAttributeId attid;
    1270                 uint32 unknown2;
    1271                 drsuapi_DsAddEntryExtraErrorBuffer buffer;
    1272         } drsuapi_DsAddEntryExtraError1;
    1273 
    1274         typedef /*[noprint]*/ struct {
    1275                 drsuapi_DsAddEntryErrorListItem1 *next;
    1276                 drsuapi_DsAddEntryExtraError1 error;
    1277         } drsuapi_DsAddEntryErrorListItem1;
    1278 
    1279         typedef struct {
    1280                 drsuapi_DsReplicaObjectIdentifier *id;
    1281                 WERROR status;
    1282                 drsuapi_DsAddEntryErrorListItem1 first;
    1283         } drsuapi_DsAddEntryErrorInfo1;
    1284 
    1285         typedef [switch_type(uint32)] union {
    1286                 [case(1)] drsuapi_DsAddEntryErrorInfo1 error1;
    1287 /*              [case(2)] drsuapi_DsAddEntryErrorInfo2 error2;
    1288                 [case(3)] drsuapi_DsAddEntryErrorInfo3 error3;
    1289 */              [case(4)] drsuapi_DsAddEntryErrorInfoX errorX;
    1290                 [case(5)] drsuapi_DsAddEntryErrorInfoX errorX;
    1291                 [case(6)] drsuapi_DsAddEntryErrorInfoX errorX;
    1292                 [case(7)] drsuapi_DsAddEntryErrorInfoX errorX;
    1293         } drsuapi_DsAddEntryErrorInfo;
    1294 
    1295         typedef struct {
    1296                 WERROR status;
    1297                 uint32 level;
    1298                 [switch_is(level)] drsuapi_DsAddEntryErrorInfo *info;
    1299         } drsuapi_DsAddEntryError1;
    1300 
    1301         typedef [switch_type(uint32)] union {
    1302                 [case(1)] drsuapi_DsAddEntryError1 info1;
    1303         } drsuapi_DsAddEntryError;
     1404                drsuapi_DsAddEntry_DirErr dir_err;
     1405                [switch_is(dir_err)] drsuapi_DsAddEntryErrorInfo *info;
     1406        } drsuapi_DsAddEntry_ErrData_V1;
     1407
     1408        typedef [switch_type(uint32)] union {
     1409                [case(1)] drsuapi_DsAddEntry_ErrData_V1 v1;
     1410        } drsuapi_DsAddEntry_ErrData;
    13041411
    13051412        typedef struct {
     
    13101417        typedef struct {
    13111418                drsuapi_DsReplicaObjectIdentifier *id;
    1312                 uint32 unknown1;
    1313                 drsuapi_DsAddEntryErrorInfoX error;
     1419                drsuapi_DsAddEntry_DirErr dir_err;
     1420                uint32                    dsid;          /* implementation-specific diagnostic code */
     1421                WERROR                    extended_err;  /* 0, STATUS code, or Windows error code */
     1422                uint32                    extended_data; /* implementation-specific diagnostic code */
     1423                uint16                    problem;       /* 0 or PROBLEM error code */
    13141424                [range(0,10000)] uint32 count;
    13151425                [size_is(count)] drsuapi_DsReplicaObjectIdentifier2 *objects;
     
    13181428        typedef struct {
    13191429                drsuapi_DsReplicaObjectIdentifier *id;
    1320                 uint32 level;
    1321                 [switch_is(level)] drsuapi_DsAddEntryError *error;
     1430                uint32 err_ver; /* Must be 1 */
     1431                [switch_is(err_ver)] drsuapi_DsAddEntry_ErrData *err_data;
    13221432                [range(0,10000)] uint32 count;
    13231433                [size_is(count)] drsuapi_DsReplicaObjectIdentifier2 *objects;
    13241434        } drsuapi_DsAddEntryCtr3;
    13251435
    1326         typedef [switch_type(int32)] union {
     1436        typedef [switch_type(uint32)] union {
    13271437                [case(2)] drsuapi_DsAddEntryCtr2 ctr2;
    13281438                [case(3)] drsuapi_DsAddEntryCtr3 ctr3;
     
    13311441        [public] WERROR drsuapi_DsAddEntry(
    13321442                [in] policy_handle *bind_handle,
    1333                 [in] int32 level,
     1443                [in] uint32 level,
    13341444                [in,ref,switch_is(level)] drsuapi_DsAddEntryRequest *req,
    1335                 [out,ref] int32 *level_out,
     1445                [out,ref] uint32 *level_out,
    13361446                [out,ref,switch_is(*level_out)] drsuapi_DsAddEntryCtr *ctr
    13371447                );
     
    13781488                DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2                   = 9,
    13791489                DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2       = 10,
    1380                 DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02                     = -2,
    1381                 DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04                   = -4,
    1382                 DRSUAPI_DS_REPLICA_INFO_CURSORS05                       = -5,
    1383                 DRSUAPI_DS_REPLICA_INFO_06                              = -6
     1490                DRSUAPI_DS_REPLICA_INFO_REPSTO                          = -2,
     1491                DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS                 = -4,
     1492                DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1              = -5,
     1493                DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS           = -6
    13841494        } drsuapi_DsReplicaInfoType;
    13851495
     
    13871497                drsuapi_DsReplicaInfoType info_type;
    13881498                [charset(UTF16),string] uint16 *object_dn;
    1389                 GUID guid1;
     1499                GUID source_dsa_guid;
    13901500        } drsuapi_DsReplicaGetInfoRequest1;
    13911501
     
    13931503                drsuapi_DsReplicaInfoType info_type;
    13941504                [charset(UTF16),string] uint16 *object_dn;
    1395                 GUID guid1;
    1396                 uint32 unknown1;
    1397                 [charset(UTF16),string] uint16 *string1;
    1398                 [charset(UTF16),string] uint16 *string2;
    1399                 uint32 unknown2;
     1505                GUID source_dsa_guid;
     1506                uint32 flags;
     1507                [charset(UTF16),string] uint16 *attribute_name;
     1508                [charset(UTF16),string] uint16 *value_dn_str;
     1509                uint32 enumeration_context;
    14001510        } drsuapi_DsReplicaGetInfoRequest2;
    14011511
     
    14101520                [charset(UTF16),string] uint16 *source_dsa_address;
    14111521                [charset(UTF16),string] uint16 *transport_obj_dn;
    1412                 drsuapi_DsReplicaNeighbourFlags replica_flags;
     1522                drsuapi_DrsOptions replica_flags;
    14131523                uint32 reserved;
    14141524                GUID naming_context_obj_guid;
     
    14731583        } drsuapi_DsReplicaOpType;
    14741584
    1475         typedef [switch_type(drsuapi_DsReplicaOpType)] union {
    1476                 [case(DRSUAPI_DS_REPLICA_OP_TYPE_SYNC)]         drsuapi_DsReplicaSyncOptions sync;
    1477                 [case(DRSUAPI_DS_REPLICA_OP_TYPE_ADD)]          drsuapi_DsReplicaAddOptions add;
    1478                 [case(DRSUAPI_DS_REPLICA_OP_TYPE_DELETE)]       drsuapi_DsReplicaDeleteOptions op_delete;
    1479                 [case(DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY)]       drsuapi_DsReplicaModifyOptions modify;
    1480                 [case(DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS)]  drsuapi_DsReplicaUpdateRefsOptions update_refs;
    1481                 [default] uint32 unknown;
    1482         } drsuapi_DsRplicaOpOptions;
    1483 
    14841585        typedef struct {
    14851586                NTTIME operation_start;
     
    14871588                uint32 priority;
    14881589                drsuapi_DsReplicaOpType operation_type;
    1489                 [switch_is(operation_type)] drsuapi_DsRplicaOpOptions options;
     1590                drsuapi_DrsOptions options;
    14901591                [charset(UTF16),string] uint16 *nc_dn;
    14911592                [charset(UTF16),string] uint16 *remote_dsa_obj_dn;
     
    15171618        typedef struct {
    15181619                uint32 count;
    1519                 int32 enumeration_context;
     1620                uint32 enumeration_context;
    15201621                [size_is(count)] drsuapi_DsReplicaAttrValMetaData array[];
    15211622        } drsuapi_DsReplicaAttrValMetaDataCtr;
     
    15231624        typedef struct {
    15241625                uint32 count;
    1525                 int32 enumeration_context;
     1626                uint32 enumeration_context;
    15261627                [size_is(count)] drsuapi_DsReplicaCursor2 array[];
    15271628        } drsuapi_DsReplicaCursor2Ctr;
     
    15361637        typedef struct {
    15371638                uint32 count;
    1538                 int32 enumeration_context;
     1639                uint32 enumeration_context;
    15391640                [size_is(count)] drsuapi_DsReplicaCursor3 array[];
    15401641        } drsuapi_DsReplicaCursor3Ctr;
     
    15521653        typedef struct {
    15531654                uint32 count;
    1554                 int32 enumeration_context;
     1655                uint32 enumeration_context;
    15551656                [size_is(count)] drsuapi_DsReplicaObjMetaData2 array[];
    15561657        } drsuapi_DsReplicaObjMetaData2Ctr;
     
    15731674        typedef struct {
    15741675                uint32 count;
    1575                 int32 enumeration_context;
     1676                uint32 enumeration_context;
    15761677                [size_is(count)] drsuapi_DsReplicaAttrValMetaData2 array[];
    15771678        } drsuapi_DsReplicaAttrValMetaData2Ctr;
     
    16221723                [case(DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2)] drsuapi_DsReplicaObjMetaData2Ctr *objmetadata2;
    16231724                [case(DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2)] drsuapi_DsReplicaAttrValMetaData2Ctr *attrvalmetadata2;
    1624                 [case(DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02)] drsuapi_DsReplicaNeighbourCtr *neighbours02;
    1625                 [case(DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04)] drsuapi_DsReplicaConnection04Ctr *connections04;
    1626                 [case(DRSUAPI_DS_REPLICA_INFO_CURSORS05)] drsuapi_DsReplicaCursorCtrEx *cursors05;
    1627                 [case(DRSUAPI_DS_REPLICA_INFO_06)] drsuapi_DsReplica06Ctr *i06;
     1725                [case(DRSUAPI_DS_REPLICA_INFO_REPSTO)] drsuapi_DsReplicaNeighbourCtr *repsto;
     1726                [case(DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS)] drsuapi_DsReplicaConnection04Ctr *clientctx;
     1727                [case(DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1)] drsuapi_DsReplicaCursorCtrEx *udv1;
     1728                [case(DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS)] drsuapi_DsReplica06Ctr *srvoutgoingcalls;
    16281729        } drsuapi_DsReplicaInfo;
    16291730
     
    16481749        } drsuapi_DsGetMemberships2Ctr1;
    16491750
    1650         typedef [switch_type(int32)] union {
     1751        typedef [switch_type(uint32)] union {
    16511752                [case(1)] drsuapi_DsGetMembershipsCtr1 ctr1;
    16521753        } drsuapi_DsGetMemberships2Ctr;
     
    16571758        } drsuapi_DsGetMemberships2Request1;
    16581759
    1659         typedef [switch_type(int32)] union {
     1760        typedef [switch_type(uint32)] union {
    16601761                [case(1)] drsuapi_DsGetMemberships2Request1 req1;
    16611762        } drsuapi_DsGetMemberships2Request;
     
    16631764        WERROR drsuapi_DsGetMemberships2(
    16641765                [in] policy_handle *bind_handle,
    1665                 [in] int32 level,
     1766                [in] uint32 level,
    16661767                [in,ref] [switch_is(level)] drsuapi_DsGetMemberships2Request *req,
    1667                 [out,ref] int32 *level_out,
     1768                [out,ref] uint32 *level_out,
    16681769                [out,ref] [switch_is(*level_out)] drsuapi_DsGetMemberships2Ctr *ctr
    16691770                );
     
    16871788                [range(0,10000)] uint32 num_info;
    16881789                [size_is(num_info)] drsuapi_DsSiteCostInfo *info;
    1689                 uint32 unknown;
     1790                [value(0)] uint32 flags_reserved;
    16901791        } drsuapi_QuerySitesByCostCtr1;
    16911792
    1692         typedef [switch_type(int32)] union {
     1793        typedef [switch_type(uint32)] union {
    16931794                [case(1)] drsuapi_QuerySitesByCostCtr1 ctr1;
    16941795        } drsuapi_QuerySitesByCostCtr;
     
    17011802        } drsuapi_QuerySitesByCostRequest1;
    17021803
    1703         typedef [switch_type(int32)] union {
     1804        typedef [switch_type(uint32)] union {
    17041805                [case(1)] drsuapi_QuerySitesByCostRequest1 req1;
    17051806        } drsuapi_QuerySitesByCostRequest;
     
    17071808        WERROR drsuapi_QuerySitesByCost(
    17081809                [in] policy_handle *bind_handle,
    1709                 [in] int32 level,
     1810                [in] uint32 level,
    17101811                [in,ref] [switch_is(level)] drsuapi_QuerySitesByCostRequest *req,
    1711                 [out,ref] int32 *level_out,
     1812                [out,ref] uint32 *level_out,
    17121813                [out,ref] [switch_is(*level_out)] drsuapi_QuerySitesByCostCtr *ctr
    17131814        );
  • trunk/server/librpc/idl/epmapper.idl

    r414 r745  
    3131        */
    3232
     33        const int EPMAPPER_STATUS_CANT_PERFORM_OP = 0x6d8;
    3334        const int EPMAPPER_STATUS_NO_MORE_ENTRIES = 0x16c9a0d6;
    3435        const int EPMAPPER_STATUS_NO_MEMORY = 0x16C9A012;
    3536        const int EPMAPPER_STATUS_OK = 0;
    36 
    37 
    3837
    3938        typedef [enum8bit] enum {
     
    217216
    218217        typedef struct {
    219                 [value(ndr_size_epm_tower(&tower, ndr->iconv_convenience, ndr->flags))] uint32  tower_length;
     218                [value(ndr_size_epm_tower(&tower, ndr->flags))] uint32  tower_length;
    220219                [subcontext(4)] epm_tower tower;
    221220        } epm_twr_t;
     
    256255                [in, size_is(num_ents)]  epm_entry_t entries[]
    257256                );
    258    
     257
     258        typedef [v1_enum] enum {
     259                RPC_C_EP_ALL_ELTS               = 0x00000000,
     260                RPC_C_EP_MATCH_BY_IF            = 0x00000001,
     261                RPC_C_EP_MATCH_BY_OBJ           = 0x00000002,
     262                RPC_C_EP_MATCH_BY_BOTH          = 0x00000003
     263        } epm_InquiryType;
     264
     265        typedef [v1_enum] enum {
     266                RPC_C_VERS_ALL                  = 0x00000000,
     267                RPC_C_VERS_COMPATIBLE           = 0x00000001,
     268                RPC_C_VERS_EXACT                = 0x00000002,
     269                RPC_C_VERS_MAJOR_ONLY           = 0x00000003,
     270                RPC_C_VERS_UPTO                 = 0x00000004
     271        } epm_VersionOption;
     272
    259273        /**********************/
    260274        /* Function 0x02      */
    261275        error_status_t epm_Lookup(
    262                 [in]            uint32          inquiry_type,
    263                 [in,ptr]       GUID            *object,
    264                 [in,ptr]       rpc_if_id_t     *interface_id,
    265                 [in]            uint32          vers_option,
    266                 [in,out]        policy_handle   *entry_handle,
    267                 [in]            uint32          max_ents,
    268                 [out]           uint32          *num_ents,
     276                [in]            epm_InquiryType    inquiry_type,
     277                [in,ptr]        GUID               *object,
     278                [in,ptr]        rpc_if_id_t        *interface_id,
     279                [in]            epm_VersionOption  vers_option,
     280                [in,out]        policy_handle      *entry_handle,
     281                [in]            uint32             max_ents,
     282                [out]           uint32             *num_ents,
    269283                [out, length_is(*num_ents), size_is(max_ents)]  epm_entry_t entries[]
    270284                );
  • trunk/server/librpc/idl/frsrpc.idl

    r414 r745  
    339339                [value(pkt_len+12)] uint32 memory_len;
    340340                [value(ndr_size_frsrpc_CommPktChunkCtr(r->ctr,
    341                         ndr->iconv_convenience, ndr->flags))]
     341                        ndr->flags))]
    342342                [range(0, 262144)]
    343343                        uint32 pkt_len;
  • trunk/server/librpc/idl/frstrans.idl

    r414 r745  
    278278        /*****************/
    279279        /* Function 0x0f */
    280         [todo] void FRSTRANS_RAW_GET_FILE_DATA_ASYNC();
     280        typedef pipe uint8 frstrans_BytePipe;
     281
     282        WERROR frstrans_RawGetFileDataAsync(
     283                [in,ref] policy_handle *server_context,
     284                [out,ref] frstrans_BytePipe *byte_pipe
     285                );
    281286
    282287        /*****************/
    283288        /* Function 0x10 */
    284         [todo] void FRSTRANS_RDC_GET_FILE_DATA_ASYNC();
     289        WERROR frstrans_RdcGetFileDataAsync(
     290                [in,ref] policy_handle *server_context,
     291                [out,ref] frstrans_BytePipe *byte_pipe
     292                );
    285293}
  • trunk/server/librpc/idl/idl_types.h

    r596 r745  
    1414*/
    1515#define nstring         [flag(STR_NULLTERM|NDR_ALIGN2)] string
    16 
    17 /*
    18   an ascii string prefixed with [offset] [length], both 32 bits
    19   null terminated
    20 */
    21 #define ascstr2         [flag(STR_ASCII|STR_LEN4)] string
    22 
    23 /*
    24   an ascii string prefixed with [size], 32 bits
    25 */
    26 #define asclstr         [flag(STR_ASCII|STR_SIZE4)] string
    27 
    28 /*
    29   an ascii string prefixed with [size], 16 bits
    30   null terminated
    31 */
    32 #define ascstr3         [flag(STR_ASCII|STR_SIZE2)] string
    33 
    34 /*
    35   an ascii string prefixed with [size] [offset] [length], all 32 bits
    36   not null terminated
    37 */
    38 #define ascstr_noterm   [flag(STR_NOTERM|STR_ASCII|STR_SIZE4|STR_LEN4)] string
    3916
    4017/*
  • trunk/server/librpc/idl/krb5pac.idl

    r414 r745  
    123123                );
    124124
     125        void decode_login_info_ctr(
     126                [in] PAC_LOGON_INFO_CTR logon_info_ctr
     127                );
     128
    125129        void decode_pac_validate(
    126130                [in] PAC_Validate pac_validate
  • trunk/server/librpc/idl/lsa.idl

    r414 r745  
    114114        /* Function: 0x06 */
    115115        typedef struct {
    116                 uint32  len; /* ignored */
     116                uint3264  len; /* ignored */
    117117                uint16  impersonation_level;
    118118                uint8   context_mode;
     
    121121
    122122        typedef struct {
    123                 uint32 len; /* ignored */
     123                uint3264 len; /* ignored */
    124124                uint8 *root_dir;
    125125                [string,charset(UTF16)] uint16 *object_name;
     
    520520
    521521        const int LSA_REF_DOMAIN_LIST_MULTIPLIER = 32;
    522         typedef struct {
     522        typedef [public] struct {
    523523                [range(0,1000)] uint32 count;
    524524                [size_is(count)] lsa_DomainInfo *domains;
     
    534534         */
    535535
    536         typedef enum {
     536        typedef [public] enum {
    537537                LSA_LOOKUP_NAMES_ALL = 1,
    538538                LSA_LOOKUP_NAMES_DOMAINS_ONLY = 2,
     
    564564        } lsa_TranslatedName;
    565565
    566         typedef struct {
     566        typedef [public] struct {
    567567                [range(0,20480)] uint32 count;
    568568                [size_is(count)] lsa_TranslatedName *names;
     
    640640        [todo] NTSTATUS lsa_SetQuotasForAccount();
    641641
    642         typedef [bitmap32bit] bitmap {
    643                 LSA_POLICY_MODE_INTERACTIVE             = 0x00000001,
    644                 LSA_POLICY_MODE_NETWORK                 = 0x00000002,
    645                 LSA_POLICY_MODE_BATCH                   = 0x00000004,
    646                 LSA_POLICY_MODE_SERVICE                 = 0x00000010,
    647                 LSA_POLICY_MODE_PROXY                   = 0x00000020,
    648                 LSA_POLICY_MODE_DENY_INTERACTIVE        = 0x00000040,
    649                 LSA_POLICY_MODE_DENY_NETWORK            = 0x00000080,
    650                 LSA_POLICY_MODE_DENY_BATCH              = 0x00000100,
    651                 LSA_POLICY_MODE_DENY_SERVICE            = 0x00000200,
    652                 LSA_POLICY_MODE_REMOTE_INTERACTIVE      = 0x00000400,
    653                 LSA_POLICY_MODE_DENY_REMOTE_INTERACTIVE = 0x00000800,
    654                 LSA_POLICY_MODE_ALL                     = 0x00000FF7,
    655                 LSA_POLICY_MODE_ALL_NT4                 = 0x00000037
    656         } lsa_SystemAccessModeFlags;
    657 
    658642        /* Function:    0x17 */
    659643        NTSTATUS lsa_GetSystemAccessAccount(
     
    677661
    678662        typedef [flag(NDR_PAHEX)] struct {
    679                 uint32 length;
    680                 uint32 size;
     663                uint3264 length;
     664                uint3264 size;
    681665                [size_is(size),length_is(length)] uint8 *data;
    682666        } lsa_DATA_BUF;
     
    771755        } lsa_TrustDomainInfoBuffer;
    772756
    773         typedef struct {
     757        typedef [public] struct {
    774758                uint32 incoming_count;
    775759                lsa_TrustDomainInfoBuffer *incoming_current_auth_info;
     
    10411025        /**********************/
    10421026        /* Function 0x31 */
    1043         NTSTATUS lsa_SetTrustedDomainInfoByName(
     1027        [public] NTSTATUS lsa_SetTrustedDomainInfoByName(
    10441028                [in]                   policy_handle         *handle,
    1045                 [in]                   lsa_String             trusted_domain,
     1029                [in,ref]               lsa_String             *trusted_domain,
    10461030                [in]                   lsa_TrustDomInfoEnum   level,
    1047                 [in,unique,switch_is(level)] lsa_TrustedDomainInfo *info
     1031                [in,ref,switch_is(level)] lsa_TrustedDomainInfo *info
    10481032                );
    10491033
     
    10701054                [in]  lsa_TrustDomainInfoInfoEx   *info,
    10711055                [in]  lsa_TrustDomainInfoAuthInfoInternal *auth_info,
    1072                 [in]  uint32 access_mask,
     1056                [in]  lsa_TrustedAccessMask access_mask,
    10731057                [out] policy_handle               *trustdom_handle
    10741058                );
     
    10811065
    10821066        /* Function 0x35 */
     1067        typedef [bitmap32bit] bitmap {
     1068                LSA_POLICY_KERBEROS_VALIDATE_CLIENT = 0x00000080
     1069        } lsa_krbAuthenticationOptions;
    10831070
    10841071        /* w2k3 returns either 0x000bbbd000000000 or 0x000a48e800000000
    1085            for unknown6 - gd */
    1086         typedef struct {
    1087                 uint32 enforce_restrictions;
     1072           for reserved - gd */
     1073        typedef struct {
     1074                lsa_krbAuthenticationOptions authentication_options;
    10881075                hyper service_tkt_lifetime;
    10891076                hyper user_tkt_lifetime;
    10901077                hyper user_tkt_renewaltime;
    10911078                hyper clock_skew;
    1092                 hyper unknown6;
     1079                hyper reserved;
    10931080        } lsa_DomainInfoKerberos;
    10941081
     
    11261113                [in]     policy_handle *handle,
    11271114                [in]         lsa_String     name,
    1128                 [in]         uint32        access_mask,
     1115                [in]     lsa_TrustedAccessMask access_mask,
    11291116                [out]    policy_handle *trustdom_handle
    11301117                );
     
    12011188                [in]  lsa_TrustDomainInfoInfoEx   *info,
    12021189                [in]  lsa_TrustDomainInfoAuthInfoInternal *auth_info,
    1203                 [in]  uint32                      access_mask,
     1190                [in]  lsa_TrustedAccessMask access_mask,
    12041191                [out] policy_handle               *trustdom_handle
    12051192                );
     
    12691256        /* Function 0x49 */
    12701257        typedef struct {
    1271                 [range(0,131072)] uint32 length;
     1258                [range(0,131072)] uint3264 length;
    12721259                [size_is(length)] uint8 *data;
    12731260        } lsa_ForestTrustBinaryData;
     
    12801267
    12811268        typedef [switch_type(uint32)] union {
    1282                 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME)] lsa_String top_level_name;
     1269                [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME)] lsa_StringLarge top_level_name;
    12831270                [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX)] lsa_StringLarge top_level_name_ex;
    12841271                [case(LSA_FOREST_TRUST_DOMAIN_INFO)] lsa_ForestTrustDomainInfo domain_info;
     
    12951282        typedef struct {
    12961283                uint32 flags;
    1297                 lsa_ForestTrustRecordType level;
    1298                 hyper unknown;
    1299                 [switch_is(level)] lsa_ForestTrustData forest_trust_data;
     1284                lsa_ForestTrustRecordType type;
     1285                hyper time;
     1286                [switch_is(type)] lsa_ForestTrustData forest_trust_data;
    13001287        } lsa_ForestTrustRecord;
    13011288
     
    13121299                );
    13131300
    1314         /* Function 0x4a */
    1315         [todo] NTSTATUS lsa_LSARSETFORESTTRUSTINFORMATION();
     1301        /*****************
     1302         * Function 0x4a */
     1303
     1304        typedef [v1_enum] enum {
     1305                LSA_FOREST_TRUST_COLLISION_TDO = 0,
     1306                LSA_FOREST_TRUST_COLLISION_XREF = 1,
     1307                LSA_FOREST_TRUST_COLLISION_OTHER = 2
     1308        } lsa_ForestTrustCollisionRecordType;
     1309
     1310        /* if type is CollisionTdo, flags can be */
     1311        typedef [bitmap32bit] bitmap {
     1312                LSA_TLN_DISABLED_NEW            = 0x00000001,
     1313                LSA_TLN_DISABLED_ADMIN          = 0x00000002,
     1314                LSA_TLN_DISABLED_CONFLICT       = 0x00000004
     1315        } lsa_ForestTrustCollisionTDOFlags;
     1316
     1317        /* if type is CollisionXref, flags can be */
     1318        typedef [bitmap32bit] bitmap {
     1319                LSA_SID_DISABLED_ADMIN          = 0x00000001,
     1320                LSA_SID_DISABLED_CONFLICT       = 0x00000002,
     1321                LSA_NB_DISABLED_ADMIN           = 0x00000004,
     1322                LSA_NB_DISABLED_CONFLICT        = 0x00000008
     1323        } lsa_ForestTrustCollisionXrefFlags;
     1324
     1325        typedef [nodiscriminant] union {
     1326                [case(LSA_FOREST_TRUST_COLLISION_TDO)] lsa_ForestTrustCollisionTDOFlags flags;
     1327                [case(LSA_FOREST_TRUST_COLLISION_XREF)] lsa_ForestTrustCollisionXrefFlags flags;
     1328                [default] uint32 flags;
     1329        } lsa_ForestTrustCollisionFlags;
     1330
     1331        typedef struct {
     1332                uint32 index;
     1333                lsa_ForestTrustCollisionRecordType type;
     1334                [switch_is(type)] lsa_ForestTrustCollisionFlags flags;
     1335                lsa_String name;
     1336        } lsa_ForestTrustCollisionRecord;
     1337
     1338        typedef struct {
     1339                uint32 count;
     1340                [size_is(count)] lsa_ForestTrustCollisionRecord **entries;
     1341        } lsa_ForestTrustCollisionInfo;
     1342
     1343        [public] NTSTATUS lsa_lsaRSetForestTrustInformation(
     1344                [in]      policy_handle *handle,
     1345                [in,ref]  lsa_StringLarge *trusted_domain_name,
     1346                [in]      uint16 highest_record_type,
     1347                [in,ref]  lsa_ForestTrustInformation *forest_trust_info,
     1348                [in]      uint8 check_only,
     1349                [out,ref] lsa_ForestTrustCollisionInfo **collision_info
     1350                );
    13161351
    13171352        /* Function 0x4b */
  • trunk/server/librpc/idl/mgmt.idl

    r414 r745  
    7171                [in]        uint32                  authn_proto,
    7272                [in]        uint32                  princ_name_size,
    73                 [out]       [string,charset(DOS)] uint8 princ_name[]
     73                [out]       [string,size_is(princ_name_size),charset(DOS)] uint8 princ_name[]
    7474                );
    7575}
  • trunk/server/librpc/idl/misc.idl

    r414 r745  
    2222        typedef [public] struct {
    2323                GUID uuid;
     24                /* The major version is encoded in the 16 least significant bits,
     25                   the minor in the 16 most significant bits. 
     26                   http://www.opengroup.org/onlinepubs/9629399/chap12.htm */
    2427                uint32 if_version;
    2528        } ndr_syntax_id;
     
    3538        typedef [public] enum {
    3639                SEC_CHAN_NULL        = 0,
     40                SEC_CHAN_LOCAL       = 1,
    3741                SEC_CHAN_WKSTA       = 2,
    3842                SEC_CHAN_DNS_DOMAIN  = 3,
    3943                SEC_CHAN_DOMAIN      = 4,
    40                 SEC_CHAN_BDC         = 6
     44                SEC_CHAN_LANMAN      = 5,
     45                SEC_CHAN_BDC         = 6,
     46                SEC_CHAN_RODC        = 7
    4147        } netr_SchannelType;
    4248
  • trunk/server/librpc/idl/named_pipe_auth.idl

    r414 r745  
    44*/
    55
    6 import "netlogon.idl";
     6import "netlogon.idl", "security.idl", "auth.idl";
    77
    88[
     
    2020                [charset(DOS),string] uint8 *server_addr;
    2121                uint16 server_port;
    22                 netr_SamInfo3 *sam_info3;
    23                 uint32 session_key_length;
    24                 [size_is(session_key_length)] uint8 *session_key;
    25         } named_pipe_auth_req_info2;
    26 
    27         typedef struct {
    28                 [charset(UTF8),string] uint8 *client_name;
    29                 [charset(DOS),string] uint8 *client_addr;
    30                 uint16 client_port;
    31                 [charset(UTF8),string] uint8 *server_name;
    32                 [charset(DOS),string] uint8 *server_addr;
    33                 uint16 server_port;
    34                 netr_SamInfo3 *sam_info3;
    35                 uint32 session_key_length;
    36                 [size_is(session_key_length)] uint8 *session_key;
    37                 uint32 gssapi_delegated_creds_length;
    38                 [size_is(gssapi_delegated_creds_length)]
    39                         uint8 *gssapi_delegated_creds;
    40         } named_pipe_auth_req_info3;
     22                auth_session_info_transport *session_info;
     23        } named_pipe_auth_req_info4;
    4124
    4225        typedef [switch_type(uint32)] union {
    43                 [case(0)] ;/* anonymous */
    44                 [case(1)] netr_SamInfo3 info1;
    45                 [case(2)] named_pipe_auth_req_info2 info2;
    46                 [case(3)] named_pipe_auth_req_info3 info3;
     26                [case(4)] named_pipe_auth_req_info4 info4;
    4727        } named_pipe_auth_req_info;
    4828
    4929        typedef [public,gensize] struct {
    5030                [flag(NDR_BIG_ENDIAN),
    51                  value(ndr_size_named_pipe_auth_req(r,ndr->iconv_convenience,ndr->flags)-4)]
     31                 value(ndr_size_named_pipe_auth_req(r,ndr->flags)-4)]
    5232                        uint32 length;
    5333                [charset(DOS),value(NAMED_PIPE_AUTH_MAGIC)] uint8 magic[4];
     
    6040                uint16 device_state;
    6141                hyper allocation_size;
    62         } named_pipe_auth_rep_info2;
    63 
    64         typedef struct {
    65                 uint16 file_type;
    66                 uint16 device_state;
    67                 hyper allocation_size;
    68         } named_pipe_auth_rep_info3;
     42        } named_pipe_auth_rep_info4;
    6943
    7044        typedef [switch_type(uint32)] union {
    71                 [case(0)] ;
    72                 [case(1)] ;
    73                 [case(2)] named_pipe_auth_rep_info2 info2;
    74                 [case(3)] named_pipe_auth_rep_info3 info3;
     45                [case(4)] named_pipe_auth_rep_info4 info4;
    7546        } named_pipe_auth_rep_info;
    7647
    7748        typedef [public,gensize] struct {
    7849                [flag(NDR_BIG_ENDIAN),
    79                  value(ndr_size_named_pipe_auth_rep(r,ndr->iconv_convenience,ndr->flags)-4)]
     50                 value(ndr_size_named_pipe_auth_rep(r,ndr->flags)-4)]
    8051                        uint32 length;
    8152                [charset(DOS),value(NAMED_PIPE_AUTH_MAGIC)] uint8 magic[4];
  • trunk/server/librpc/idl/nbt.idl

    r414 r745  
    1111import "misc.idl", "security.idl", "svcctl.idl", "samr.idl";
    1212[
    13         helper("../libcli/netlogon.h", "../libcli/nbt/libnbt.h")
     13        helper("../libcli/netlogon/netlogon.h", "../libcli/nbt/libnbt.h"),
     14        helpstring("NBT messages"),
     15        uuid("6def41b6-86e4-4c32-997c-ed33af7bcd8e")
    1416]
    1517interface nbt
     
    2426                NBT_FLAG_RECURSION_DESIRED  = 0x0100,
    2527                NBT_FLAG_TRUNCATION         = 0x0200,
    26                 NBT_FLAG_AUTHORITIVE        = 0x0400,
     28                NBT_FLAG_AUTHORITATIVE      = 0x0400,
    2729                NBT_OPCODE                  = 0x7800,
    2830                NBT_FLAG_REPLY              = 0x8000
     
    358360                NBT_SERVER_SELECT_SECRET_DOMAIN_6       = 0x00000800,
    359361                NBT_SERVER_FULL_SECRET_DOMAIN_6         = 0x00001000,
    360                 NBT_SERVER_DNS_FOREST                   = 0x01000000
     362                NBT_SERVER_ADS_WEB_SERVICE              = 0x00002000,
     363                NBT_SERVER_HAS_DNS_NAME                 = 0x20000000,
     364                NBT_SERVER_IS_DEFAULT_NC                = 0x40000000,
     365                NBT_SERVER_FOREST_ROOT                  = 0x80000000
    361366        } nbt_server_type;
    362367
     
    367372                NETLOGON_NT_VERSION_5EX_WITH_IP         = 0x00000008,
    368373                NETLOGON_NT_VERSION_WITH_CLOSEST_SITE   = 0x00000010,
    369                 NETLOGON_NT_VERSION_AVIOD_NT4EMUL       = 0x01000000,
     374                NETLOGON_NT_VERSION_AVOID_NT4EMUL       = 0x01000000,
    370375                NETLOGON_NT_VERSION_PDC                 = 0x10000000,
    371376                NETLOGON_NT_VERSION_IP                  = 0x20000000,
     
    375380
    376381        typedef [enum16bit,public] enum {
     382                LOGON_REQUEST                     = 0,
     383                LOGON_RESPONSE2                   = 6,
    377384                LOGON_PRIMARY_QUERY               = 7,  /* Was also NETLOGON_QUERY_FOR_PDC */
    378385                NETLOGON_ANNOUNCE_UAS             = 10,
     
    411418        } NETLOGON_SAM_LOGON_REQUEST;
    412419
     420        typedef struct {
     421                astring              computer_name;
     422                astring              user_name;
     423                astring              mailslot_name;
     424                uint8                request_count;
     425                uint16               lmnt_token;
     426                uint16               lm20_token;
     427        } NETLOGON_LOGON_REQUEST;
     428
    413429        typedef [flag(NDR_NOALIGN),public] struct {
    414430                netlogon_command command;
    415                 nstring              server;
     431                nstring              pdc_name;
    416432                nstring              user_name;
    417                 nstring              domain;
     433                nstring              domain_name;
    418434                netlogon_nt_version_flags               nt_version;
    419435                uint16               lmnt_token;
     
    449465                nbt_string           dns_domain;
    450466                nbt_string           pdc_dns_name;
    451                 nbt_string           domain;
     467                nbt_string           domain_name;
    452468                nbt_string           pdc_name;
    453469                nbt_string           user_name;
     
    456472
    457473                /* Optional on NETLOGON_NT_VERSION_5EX_WITH_IP */
    458                 [value(ndr_size_nbt_sockaddr(&sockaddr, ndr->iconv_convenience, ndr->flags))] uint8 sockaddr_size;
     474                [value(ndr_size_nbt_sockaddr(&sockaddr, ndr->flags))] uint8 sockaddr_size;
    459475                [subcontext(0),subcontext_size(sockaddr_size)] nbt_sockaddr sockaddr;
    460476
     
    479495
    480496        /* response from pdc */
    481         typedef [flag(NDR_NOALIGN),public] struct {
     497        typedef [public] struct {
    482498                netlogon_command command;
    483499                astring pdc_name;
     
    489505                uint16               lm20_token;
    490506        } nbt_netlogon_response_from_pdc;
     507
     508        typedef [flag(NDR_NOALIGN),public] struct {
     509                netlogon_command command;
     510                astring pdc_name;
     511                uint16 lm20_token;
     512        } nbt_netlogon_response2;
    491513
    492514        typedef enum netr_SamDatabaseID netr_SamDatabaseID;
     
    518540
    519541        typedef [nodiscriminant] union {
     542                [case(LOGON_REQUEST)]  NETLOGON_LOGON_REQUEST logon0;
    520543                [case(LOGON_SAM_LOGON_REQUEST)]       NETLOGON_SAM_LOGON_REQUEST logon;
    521544                [case(LOGON_PRIMARY_QUERY)] nbt_netlogon_query_for_pdc pdc;
     
    539562                [switch_is(command)] nbt_netlogon_request req;
    540563        } nbt_netlogon_packet;
     564
     565        void decode_nbt_netlogon_packet(
     566                [in] nbt_netlogon_packet packet
     567                );
    541568
    542569        /********************************************************/
  • trunk/server/librpc/idl/netlogon.idl

    r414 r745  
    55*/
    66
    7 import "misc.idl", "lsa.idl", "samr.idl", "security.idl", "nbt.idl";
     7import "misc.idl", "lsa.idl", "samr.idl", "security.idl";
    88
    99#include "idl_types.h"
     
    1717  endpoint("ncacn_np:[\\pipe\\netlogon]","ncacn_ip_tcp:","ncalrpc:"),
    1818  helper("../librpc/ndr/ndr_netlogon.h"),
     19  ms_union,
    1920  pointer_default(unique)
    2021]
     
    180181                [case(NetlogonNetworkTransitiveInformation)]     netr_NetworkInfo  *network;
    181182                [case(NetlogonServiceTransitiveInformation)]     netr_PasswordInfo *password;
     183                [default];
    182184        } netr_LogonLevel;
    183185
     
    252254                uint32 sidcount;
    253255                [size_is(sidcount)] netr_SidAttr *sids;
    254                 lsa_String forest;
     256                lsa_String dns_domainname;
    255257                lsa_String principle;
    256258                uint32 unknown4[20];
     
    292294                [case(NetlogonValidationGenericInfo2)] netr_GenericInfo2  *generic;
    293295                [case(NetlogonValidationSamInfo4)] netr_SamInfo6 *sam6;
     296                [default];
    294297        } netr_Validation;
    295298
     
    303306        } netr_Authenticator;
    304307
    305         NTSTATUS netr_LogonSamLogon(
     308        [public] NTSTATUS netr_LogonSamLogon(
    306309                [in,unique] [string,charset(UTF16)] uint16 *server_name,
    307310                [in,unique] [string,charset(UTF16)] uint16 *computer_name,
     
    603606
    604607        typedef struct {
    605                 uint16 unknown;
    606         } netr_DELTA_DELETE_TRUST;
    607 
    608         typedef struct {
    609608                uint32 privilege_entries;
    610609                uint32 privilege_control;
     
    624623                uint32 unknown8;
    625624        } netr_DELTA_ACCOUNT;
    626 
    627         typedef struct {
    628                 uint16 unknown;
    629         } netr_DELTA_DELETE_ACCOUNT;
    630 
    631         typedef struct {
    632                 uint16 unknown;
    633         } netr_DELTA_DELETE_SECRET;
    634625
    635626        typedef struct {
     
    695686                [case(NETR_DELTA_ALIAS_MEMBER)]    netr_DELTA_ALIAS_MEMBER    *alias_member;
    696687                [case(NETR_DELTA_POLICY)]          netr_DELTA_POLICY          *policy;
    697                 [case(NETR_DELTA_TRUSTED_DOMAIN)]  netr_DELTA_TRUSTED_DOMAIN   *trusted_domain;
    698                 [case(NETR_DELTA_DELETE_TRUST)]    netr_DELTA_DELETE_TRUST     delete_trust;
     688                [case(NETR_DELTA_TRUSTED_DOMAIN)]  netr_DELTA_TRUSTED_DOMAIN  *trusted_domain;
     689                [case(NETR_DELTA_DELETE_TRUST)]    ; /* sid only */
    699690                [case(NETR_DELTA_ACCOUNT)]         netr_DELTA_ACCOUNT         *account;
    700                 [case(NETR_DELTA_DELETE_ACCOUNT)]  netr_DELTA_DELETE_ACCOUNT   delete_account;
     691                [case(NETR_DELTA_DELETE_ACCOUNT)]  ; /* sid only */
    701692                [case(NETR_DELTA_SECRET)]          netr_DELTA_SECRET          *secret;
    702                 [case(NETR_DELTA_DELETE_SECRET)]   netr_DELTA_DELETE_SECRET    delete_secret;
     693                [case(NETR_DELTA_DELETE_SECRET)]   ; /* name only */
    703694                [case(NETR_DELTA_DELETE_GROUP2)]   netr_DELTA_DELETE_USER     *delete_group;
    704695                [case(NETR_DELTA_DELETE_USER2)]    netr_DELTA_DELETE_USER     *delete_user;
    705696                [case(NETR_DELTA_MODIFY_COUNT)]    udlong                     *modified_count;
     697                [default];
    706698        } netr_DELTA_UNION;
    707699
     
    729721                [case(NETR_DELTA_DELETE_USER2)]    uint32 rid;
    730722                [case(NETR_DELTA_MODIFY_COUNT)]    ;
     723                [default];
    731724        } netr_DELTA_ID_UNION;
    732725
     
    10501043                [in]     netr_Authenticator *credential,
    10511044                [in,out,ref] netr_Authenticator *return_authenticator,
    1052                 [in]     [subcontext(4),subcontext_size(change_log_entry_size)] netr_ChangeLogEntry change_log_entry,
    1053                 [in]     [value(ndr_size_netr_ChangeLogEntry(&change_log_entry, ndr->iconv_convenience, ndr->flags))] uint32 change_log_entry_size,
     1045                /*
     1046                 * we cannot use subcontext_size() here, as
     1047                 * change_log_entry_size is encoded after the subcontext
     1048                 */
     1049                [in]     [subcontext(4)/*,subcontext_size(change_log_entry_size)*/]
     1050                        netr_ChangeLogEntry change_log_entry,
     1051                [in]     [value(ndr_size_netr_ChangeLogEntry(&change_log_entry,
     1052                                ndr->flags))]
     1053                        uint32 change_log_entry_size,
    10541054                [out,ref]    netr_DELTA_ENUM_ARRAY **delta_enum_array
    10551055                );
     
    10741074        } netr_Blob;
    10751075
    1076         WERROR netr_NetrEnumerateTrustedDomains(
     1076        NTSTATUS netr_NetrEnumerateTrustedDomains(
    10771077                [in,unique] [string,charset(UTF16)] uint16 *server_name,
    10781078                [out,ref] netr_Blob *trusted_domains_blob
     
    10991099                                         DS_IS_FLAT_NAME |
    11001100                                         DS_IS_DNS_NAME |
     1101                                         DS_TRY_NEXTCLOSEST_SITE |
     1102                                         DS_DIRECTORY_SERVICE_6_REQUIRED |
     1103                                         DS_WEB_SERVICE_REQUIRED |
    11011104                                         DS_RETURN_FLAT_NAME |
    11021105                                         DS_RETURN_DNS_NAME);
     
    11311134
    11321135        typedef [bitmap32bit] bitmap {
    1133                 DS_SERVER_PDC                    = NBT_SERVER_PDC,
    1134                 DS_SERVER_GC                     = NBT_SERVER_GC,
    1135                 DS_SERVER_LDAP                   = NBT_SERVER_LDAP,
    1136                 DS_SERVER_DS                     = NBT_SERVER_DS,
    1137                 DS_SERVER_KDC                    = NBT_SERVER_KDC,
    1138                 DS_SERVER_TIMESERV               = NBT_SERVER_TIMESERV,
    1139                 DS_SERVER_CLOSEST                = NBT_SERVER_CLOSEST,
    1140                 DS_SERVER_WRITABLE               = NBT_SERVER_WRITABLE,
    1141                 DS_SERVER_GOOD_TIMESERV          = NBT_SERVER_GOOD_TIMESERV,
    1142                 DS_SERVER_NDNC                   = NBT_SERVER_NDNC,
    1143                 DS_SERVER_SELECT_SECRET_DOMAIN_6 = NBT_SERVER_SELECT_SECRET_DOMAIN_6,
    1144                 DS_SERVER_FULL_SECRET_DOMAIN_6   = NBT_SERVER_FULL_SECRET_DOMAIN_6,
     1136                DS_SERVER_PDC                    = 0x00000001,
     1137                DS_SERVER_GC                     = 0x00000004,
     1138                DS_SERVER_LDAP                   = 0x00000008,
     1139                DS_SERVER_DS                     = 0x00000010,
     1140                DS_SERVER_KDC                    = 0x00000020,
     1141                DS_SERVER_TIMESERV               = 0x00000040,
     1142                DS_SERVER_CLOSEST                = 0x00000080,
     1143                DS_SERVER_WRITABLE               = 0x00000100,
     1144                DS_SERVER_GOOD_TIMESERV          = 0x00000200,
     1145                DS_SERVER_NDNC                   = 0x00000400,
     1146                DS_SERVER_SELECT_SECRET_DOMAIN_6 = 0x00000800,
     1147                DS_SERVER_FULL_SECRET_DOMAIN_6   = 0x00001000,
    11451148                DS_DNS_CONTROLLER                = 0x20000000,
    11461149                DS_DNS_DOMAIN                    = 0x40000000,
    1147                 DS_DNS_FOREST                    = 0x80000000
     1150                DS_DNS_FOREST_ROOT               = 0x80000000
    11481151        } netr_DsR_DcFlags;
    11491152
     
    16211624        /****************/
    16221625        /* Function 0x2c */
    1623         WERROR netr_GetForestTrustInformation(
    1624                 [in,unique] [string,charset(UTF16)] uint16 *server_name,
    1625                 [in,ref] [string,charset(UTF16)] uint16 *trusted_domain_name,
     1626        NTSTATUS netr_GetForestTrustInformation(
     1627                [in,unique] [string,charset(UTF16)] uint16 *server_name,
     1628                [in,ref] [string,charset(UTF16)] uint16 *computer_name,
    16261629                [in,ref] netr_Authenticator *credential,
    16271630                [out,ref] netr_Authenticator *return_authenticator,
     
    16681671                [out,ref] netr_TrustInfo **trust_info
    16691672                );
     1673
     1674        /****************/
     1675        /* Function 0x2f */
     1676
     1677        NTSTATUS netr_Unused47(void);
     1678
     1679
     1680        /****************/
     1681        /* Function 0x30 */
     1682
     1683        typedef enum {
     1684                NlDnsLdapAtSite       = 22,
     1685                NlDnsGcAtSite         = 25,
     1686                NlDnsDsaCname         = 28,
     1687                NlDnsKdcAtSite        = 30,
     1688                NlDnsDcAtSite         = 32,
     1689                NlDnsRfc1510KdcAtSite = 34,
     1690                NlDnsGenericGcAtSite  = 36
     1691        } netr_DnsType;
     1692
     1693        typedef enum {
     1694                NlDnsInfoTypeNone    = 0,
     1695                NlDnsDomainName      = 1,
     1696                NlDnsDomainNameAlias = 2,
     1697                NlDnsForestName      = 3,
     1698                NlDnsForestNameAlias = 4,
     1699                NlDnsNdncDomainName  = 5,
     1700                NlDnsRecordName      = 6
     1701        } netr_DnsDomainInfoType;
     1702
     1703        typedef struct {
     1704                netr_DnsType type;
     1705                [string,charset(UTF16)] uint16 *dns_domain_info;
     1706                netr_DnsDomainInfoType dns_domain_info_type;
     1707                uint32 priority;
     1708                uint32 weight;
     1709                uint32 port;
     1710                boolean32 dns_register;
     1711                uint32 status;
     1712        } NL_DNS_NAME_INFO;
     1713
     1714        typedef [public] struct {
     1715                uint32 count;
     1716                [size_is(count)] NL_DNS_NAME_INFO *names;
     1717        } NL_DNS_NAME_INFO_ARRAY;
     1718
     1719        NTSTATUS netr_DsrUpdateReadOnlyServerDnsRecords(
     1720                [in,unique] [string,charset(UTF16)] uint16 *server_name,
     1721                [in,ref] [string,charset(UTF16)] uint16 *computer_name,
     1722                [in, ref] netr_Authenticator *credential,
     1723                [out,ref]   netr_Authenticator *return_authenticator,
     1724                [in,unique] [string,charset(UTF16)] uint16 *site_name,
     1725                [in] uint32 dns_ttl,
     1726                [in,out,ref] NL_DNS_NAME_INFO_ARRAY *dns_names
     1727                );
    16701728}
  • trunk/server/librpc/idl/ntlmssp.idl

    r414 r745  
    8787        /* [MS-NLMP] 2.2.2.10 VERSION */
    8888
    89         typedef struct {
     89        typedef [public] struct {
    9090                ntlmssp_WindowsMajorVersion ProductMajorVersion;
    9191                ntlmssp_WindowsMinorVersion ProductMinorVersion;
     
    9393                uint8 Reserved[3];
    9494                ntlmssp_NTLMRevisionCurrent NTLMRevisionCurrent;
    95         } VERSION;
     95        } ntlmssp_VERSION;
    9696
    9797        typedef [noprint,nodiscriminant] union {
    98                 [case(NTLMSSP_NEGOTIATE_VERSION)] VERSION version;
     98                [case(NTLMSSP_NEGOTIATE_VERSION)] ntlmssp_VERSION version;
    9999                [default];
    100100        } ntlmssp_Version;
     
    106106                [value(NtLmNegotiate)] ntlmssp_MessageType MessageType;
    107107                NEGOTIATE NegotiateFlags;
    108                 [value(strlen(DomainName))] uint16 DomainNameLen;
     108                [value(DomainName ? strlen(DomainName) : 0)] uint16 DomainNameLen;
    109109                [value(DomainNameLen)] uint16 DomainNameMaxLen;
    110110                [relative] [subcontext(0),subcontext_size(DomainNameLen)] [flag(ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM))] string *DomainName;
    111                 [value(strlen(Workstation))] uint16 WorkstationLen;
     111                [value(Workstation ? strlen(Workstation) : 0)] uint16 WorkstationLen;
    112112                [value(WorkstationLen)] uint16 WorkstationMaxLen;
    113113                [relative] [subcontext(0),subcontext_size(WorkstationLen)] [flag(ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM))] string *Workstation;
     
    163163        typedef [public,flag(NDR_NOALIGN)] struct {
    164164                ntlmssp_AvId AvId;
    165                 [value(ndr_size_ntlmssp_AvValue(&r->Value, r->AvId, ndr->iconv_convenience, 0))] uint16 AvLen;
     165                [value(ndr_size_ntlmssp_AvValue(&r->Value, r->AvId, 0))] uint16 AvLen;
    166166                [subcontext(0),subcontext_size(AvLen),switch_is(AvId)] ntlmssp_AvValue Value;
    167167        } AV_PAIR;
     
    183183                uint8 ServerChallenge[8];
    184184                uint8 Reserved[8];
    185                 [value(ndr_size_AV_PAIR_LIST(TargetInfo, ndr->iconv_convenience, ndr->flags))] uint16 TargetInfoLen;
     185                [value(ndr_size_AV_PAIR_LIST(TargetInfo, ndr->flags))] uint16 TargetInfoLen;
    186186                [value(TargetInfoLen)] uint16 TargetNameInfoMaxLen;
    187187                [relative] [subcontext(0),subcontext_size(TargetInfoLen)] AV_PAIR_LIST *TargetInfo;
     
    314314                );
    315315
     316        void decode_NTLMv2_RESPONSE(
     317                [in] NTLMv2_RESPONSE response
     318                );
     319
    316320}
  • trunk/server/librpc/idl/samr.idl

    r414 r745  
    2424                SAM_DATABASE_PRIVS   = 2 /* Privileges */
    2525        } netr_SamDatabaseID;
    26 
    27         typedef [public,v1_enum] enum {
    28                 SAMR_REJECT_OTHER      = 0,
    29                 SAMR_REJECT_TOO_SHORT  = 1,
    30                 SAMR_REJECT_IN_HISTORY = 2,
    31                 SAMR_REJECT_COMPLEXITY = 5
    32         } samr_RejectReason;
    33 
    34 
    3526
    3627        /* account control (acct_flags) bits */
     
    5445                ACB_DONT_REQUIRE_PREAUTH        = 0x00010000,  /* 1 = Preauth not required */
    5546                ACB_PW_EXPIRED                  = 0x00020000,  /* 1 = Password Expired */
    56                 ACB_NO_AUTH_DATA_REQD           = 0x00080000   /* 1 = No authorization data required */
     47                ACB_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION = 0x00040000,
     48                ACB_NO_AUTH_DATA_REQD           = 0x00080000,  /* 1 = No authorization data required */
     49                ACB_PARTIAL_SECRETS_ACCOUNT     = 0x00100000,
     50                ACB_USE_AES_KEYS                = 0x00200000
    5751        } samr_AcctFlags;
    5852
     
    665659                uint32 count;
    666660                [size_is(count)] uint32 *rids;
    667                 [size_is(count)] uint32 *types;
    668         } samr_RidTypeArray;
     661                [size_is(count)] samr_GroupAttrs *attributes;
     662        } samr_RidAttrArray;
    669663
    670664        NTSTATUS samr_QueryGroupMember(
    671665                [in,ref]  policy_handle *group_handle,
    672                 [out,ref] samr_RidTypeArray **rids
     666                [out,ref] samr_RidAttrArray **rids
    673667                );
    674668
     
    816810        typedef struct {
    817811                lsa_String comment;
    818                 lsa_String unknown; /* settable, but doesn't stick. probably obsolete */
     812                lsa_String reserved; /* settable, but doesn't stick. probably obsolete */
    819813                uint16 country_code;
    820814                uint16 code_page;
     
    992986                lsa_BinaryString lm_owf_password;
    993987                lsa_BinaryString nt_owf_password;
    994                 lsa_String unknown3;
     988                lsa_String private_data;
    995989                uint32 buf_count;
    996990                [size_is(buf_count)] uint8 *buffer;
     
    10071001                uint8  nt_password_set;
    10081002                uint8  password_expired;
    1009                 uint8  unknown4;
     1003                uint8  private_data_sensitive;
    10101004        } samr_UserInfo21;
    10111005
     
    14481442        /* Function    0x3f     */
    14491443
    1450         typedef enum samr_RejectReason samr_RejectReason;
    1451 
    1452         typedef struct {
    1453                 samr_RejectReason reason;
    1454                 uint32 unknown1;
    1455                 uint32 unknown2;
    1456         } samr_ChangeReject;
    1457 
    1458         NTSTATUS samr_ChangePasswordUser3(
     1444        typedef [public,v1_enum] enum {
     1445                SAM_PWD_CHANGE_NO_ERROR             = 0,
     1446                SAM_PWD_CHANGE_PASSWORD_TOO_SHORT   = 1,
     1447                SAM_PWD_CHANGE_PWD_IN_HISTORY       = 2,
     1448                SAM_PWD_CHANGE_USERNAME_IN_PASSWORD = 3,
     1449                SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD = 4,
     1450                SAM_PWD_CHANGE_NOT_COMPLEX          = 5,
     1451                SAM_PWD_CHANGE_MACHINE_NOT_DEFAULT  = 6,
     1452                SAM_PWD_CHANGE_FAILED_BY_FILTER     = 7,
     1453                SAM_PWD_CHANGE_PASSWORD_TOO_LONG    = 8
     1454        } samPwdChangeReason;
     1455
     1456        typedef struct {
     1457                samPwdChangeReason extendedFailureReason;
     1458                [string,charset(UTF16)] uint16 *filterModuleName;
     1459        } userPwdChangeFailureInformation;
     1460
     1461        [public] NTSTATUS samr_ChangePasswordUser3(
    14591462                [in,unique]       lsa_String *server,
    14601463                [in,ref]          lsa_String *account,
     
    14661469                [in,unique]       samr_CryptPassword *password3,
    14671470                [out,ref]         samr_DomInfo1 **dominfo,
    1468                 [out,ref]         samr_ChangeReject **reject
     1471                [out,ref]         userPwdChangeFailureInformation **reject
    14691472                );
    14701473
  • trunk/server/librpc/idl/schannel.idl

    r414 r745  
    9191        } NL_AUTH_SIGNATURE;
    9292
     93        const int NL_AUTH_SIGNATURE_SIZE = 0x20;
     94
    9395        /* MS-NRPC 2.2.1.3.3 NL_AUTH_SHA2_SIGNATURE */
    9496
  • trunk/server/librpc/idl/security.idl

    r414 r745  
    3232interface security
    3333{
     34
     35        typedef bitmap lsa_SystemAccessModeFlags lsa_SystemAccessModeFlags;
    3436
    3537        typedef [public,gensize,noprint,nosize,nopull,nopush] struct {
     
    263265        const string SID_BUILTIN_REMOTE_DESKTOP_USERS   = "S-1-5-32-555";
    264266        const string SID_BUILTIN_NETWORK_CONF_OPERATORS = "S-1-5-32-556";
     267        const string SID_BUILTIN_INCOMING_FOREST_TRUST  = "S-1-5-32-557";
     268        const string SID_BUILTIN_PERFMON_USERS          = "S-1-5-32-558";
     269        const string SID_BUILTIN_PERFLOG_USERS          = "S-1-5-32-559";
     270        const string SID_BUILTIN_AUTH_ACCESS            = "S-1-5-32-560";
     271        const string SID_BUILTIN_TS_LICENSE_SERVERS     = "S-1-5-32-561";
     272
     273        /* SECURITY_NT_SERVICE */
     274        const string NAME_NT_SERVICE            = "NT SERVICE";
     275
     276        const string SID_NT_NT_SERVICE          = "S-1-5-80";
     277        const string SID_NT_TRUSTED_INSTALLER =
     278                "S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464";
    265279
    266280        /* well-known domain RIDs */
    267         const int DOMAIN_RID_LOGON                 = 9;
    268         const int DOMAIN_RID_ADMINISTRATOR         = 500;
    269         const int DOMAIN_RID_GUEST                 = 501;
    270         const int DOMAIN_RID_KRBTGT                = 502;
    271         const int DOMAIN_RID_ADMINS                = 512;
    272         const int DOMAIN_RID_USERS                 = 513;
    273         const int DOMAIN_RID_GUESTS                = 514;
    274         const int DOMAIN_RID_DOMAIN_MEMBERS        = 515;
    275         const int DOMAIN_RID_DCS                   = 516;
    276         const int DOMAIN_RID_CERT_ADMINS           = 517;
    277         const int DOMAIN_RID_SCHEMA_ADMINS         = 518;
    278         const int DOMAIN_RID_ENTERPRISE_ADMINS     = 519;
    279         const int DOMAIN_RID_POLICY_ADMINS         = 520;
    280 
    281 
    282         /*
    283           privilege IDs. Please keep the IDs below 64. If we get more
    284           than 64 then we need to change security_token
    285         */
     281        const int DOMAIN_RID_LOGON                   = 9;
     282        const int DOMAIN_RID_ENTERPRISE_READONLY_DCS = 498;
     283        const int DOMAIN_RID_ADMINISTRATOR           = 500;
     284        const int DOMAIN_RID_GUEST                   = 501;
     285        const int DOMAIN_RID_KRBTGT                  = 502;
     286        const int DOMAIN_RID_ADMINS                  = 512;
     287        const int DOMAIN_RID_USERS                   = 513;
     288        const int DOMAIN_RID_GUESTS                  = 514;
     289        const int DOMAIN_RID_DOMAIN_MEMBERS          = 515;
     290        const int DOMAIN_RID_DCS                     = 516;
     291        const int DOMAIN_RID_CERT_ADMINS             = 517;
     292        const int DOMAIN_RID_SCHEMA_ADMINS           = 518;
     293        const int DOMAIN_RID_ENTERPRISE_ADMINS       = 519;
     294        const int DOMAIN_RID_POLICY_ADMINS           = 520;
     295        const int DOMAIN_RID_READONLY_DCS            = 521;
     296        const int DOMAIN_RID_RAS_SERVERS             = 553;
     297        const int DOMAIN_RID_RODC_ALLOW              = 571;
     298        const int DOMAIN_RID_RODC_DENY               = 572;
     299
     300        /* well-known builtin RIDs */
     301        const int BUILTIN_RID_ADMINISTRATORS            = 544;
     302        const int BUILTIN_RID_USERS                     = 545;
     303        const int BUILTIN_RID_GUESTS                    = 546;
     304        const int BUILTIN_RID_POWER_USERS               = 547;
     305        const int BUILTIN_RID_ACCOUNT_OPERATORS         = 548;
     306        const int BUILTIN_RID_SERVER_OPERATORS          = 549;
     307        const int BUILTIN_RID_PRINT_OPERATORS           = 550;
     308        const int BUILTIN_RID_BACKUP_OPERATORS          = 551;
     309        const int BUILTIN_RID_REPLICATOR                = 552;
     310        const int BUILTIN_RID_RAS_SERVERS               = 553;
     311        const int BUILTIN_RID_PRE_2K_ACCESS             = 554;
     312        const int BUILTIN_RID_REMOTE_DESKTOP_USERS      = 555;
     313        const int BUILTIN_RID_NETWORK_CONF_OPERATORS    = 556;
     314        const int BUILTIN_RID_INCOMING_FOREST_TRUST     = 557;
     315        const int BUILTIN_RID_PERFMON_USERS             = 558;
     316        const int BUILTIN_RID_PERFLOG_USERS             = 559;
     317        const int BUILTIN_RID_AUTH_ACCESS               = 560;
     318        const int BUILTIN_RID_TS_LICENSE_SERVERS        = 561;
     319
     320/********************************************************************
     321 This is a list of privileges reported by a WIndows 2008 R2 DC
     322 just for reference purposes (and I know the LUID is not guaranteed
     323 across reboots):
     324
     3250x00000002          SeCreateTokenPrivilege "Create a token object"
     3260x00000003   SeAssignPrimaryTokenPrivilege "Replace a process level token"
     3270x00000004           SeLockMemoryPrivilege "Lock pages in memory"
     3280x00000005        SeIncreaseQuotaPrivilege "Adjust memory quotas for a process"
     3290x00000006       SeMachineAccountPrivilege "Add workstations to domain"
     3300x00000007                  SeTcbPrivilege "Act as part of the operating system"
     3310x00000008             SeSecurityPrivilege "Manage auditing and security log"
     3320x00000009        SeTakeOwnershipPrivilege "Take ownership of files or other objects"
     3330x0000000a           SeLoadDriverPrivilege "Load and unload device drivers"
     3340x0000000b        SeSystemProfilePrivilege "Profile system performance"
     3350x0000000c           SeSystemtimePrivilege "Change the system time"
     3360x0000000d SeProfileSingleProcessPrivilege "Profile single process"
     3370x0000000e SeIncreaseBasePriorityPrivilege "Increase scheduling priority"
     3380x0000000f       SeCreatePagefilePrivilege "Create a pagefile"
     3390x00000010      SeCreatePermanentPrivilege "Create permanent shared objects"
     3400x00000011               SeBackupPrivilege "Back up files and directories"
     3410x00000012              SeRestorePrivilege "Restore files and directories"
     3420x00000013             SeShutdownPrivilege "Shut down the system"
     3430x00000014                SeDebugPrivilege "Debug programs"
     3440x00000015                SeAuditPrivilege "Generate security audits"
     3450x00000016    SeSystemEnvironmentPrivilege "Modify firmware environment values"
     3460x00000017         SeChangeNotifyPrivilege "Bypass traverse checking"
     3470x00000018       SeRemoteShutdownPrivilege "Force shutdown from a remote system"
     3480x00000019               SeUndockPrivilege "Remove computer from docking station"
     3490x0000001a            SeSyncAgentPrivilege "Synchronize directory service data"
     3500x0000001b     SeEnableDelegationPrivilege "Enable computer and user accounts to be trusted for delegation"
     3510x0000001c         SeManageVolumePrivilege "Perform volume maintenance tasks"
     3520x0000001d          SeImpersonatePrivilege "Impersonate a client after authentication"
     3530x0000001e         SeCreateGlobalPrivilege "Create global objects"
     3540x0000001f SeTrustedCredManAccessPrivilege "Access Credential Manager as a trusted caller"
     3550x00000020              SeRelabelPrivilege "Modify an object label"
     3560x00000021   SeIncreaseWorkingSetPrivilege "Increase a process working set"
     3570x00000022             SeTimeZonePrivilege "Change the time zone"
     3580x00000023   SeCreateSymbolicLinkPrivilege "Create symbolic links"
     359
     360 ********************************************************************/
     361
     362        /* LUID values for privileges known about by Samba (bottom 32 bits of enum, top bits are 0) */
     363
     364        /* we have to define the LUID here due to a horrible check by printmig.exe
     365           that requires the SeBackupPrivilege match what is in Windows.  So match
     366           those that we implement and start Samba privileges at 0x1001 */
     367
    286368        typedef enum {
    287                 SEC_PRIV_SECURITY                  = 1,
    288                 SEC_PRIV_BACKUP                    = 2,
    289                 SEC_PRIV_RESTORE                   = 3,
    290                 SEC_PRIV_SYSTEMTIME                = 4,
    291                 SEC_PRIV_SHUTDOWN                  = 5,
    292                 SEC_PRIV_REMOTE_SHUTDOWN           = 6,
    293                 SEC_PRIV_TAKE_OWNERSHIP            = 7,
    294                 SEC_PRIV_DEBUG                     = 8,
    295                 SEC_PRIV_SYSTEM_ENVIRONMENT        = 9,
    296                 SEC_PRIV_SYSTEM_PROFILE            = 10,
    297                 SEC_PRIV_PROFILE_SINGLE_PROCESS    = 11,
    298                 SEC_PRIV_INCREASE_BASE_PRIORITY    = 12,
    299                 SEC_PRIV_LOAD_DRIVER               = 13,
    300                 SEC_PRIV_CREATE_PAGEFILE           = 14,
    301                 SEC_PRIV_INCREASE_QUOTA            = 15,
    302                 SEC_PRIV_CHANGE_NOTIFY             = 16,
    303                 SEC_PRIV_UNDOCK                    = 17,
    304                 SEC_PRIV_MANAGE_VOLUME             = 18,
    305                 SEC_PRIV_IMPERSONATE               = 19,
    306                 SEC_PRIV_CREATE_GLOBAL             = 20,
    307                 SEC_PRIV_ENABLE_DELEGATION         = 21,
    308                 SEC_PRIV_INTERACTIVE_LOGON         = 22,
    309                 SEC_PRIV_NETWORK_LOGON             = 23,
    310                 SEC_PRIV_REMOTE_INTERACTIVE_LOGON  = 24,
    311                 SEC_PRIV_MACHINE_ACCOUNT           = 25
     369                SEC_PRIV_INVALID                   = 0x0,
     370                SEC_PRIV_INCREASE_QUOTA            = 0x5,
     371                SEC_PRIV_MACHINE_ACCOUNT           = 0x6,
     372                SEC_PRIV_SECURITY                  = 0x8,
     373                SEC_PRIV_TAKE_OWNERSHIP            = 0x09,
     374                SEC_PRIV_LOAD_DRIVER               = 0x0a,
     375                SEC_PRIV_SYSTEM_PROFILE            = 0x0b,
     376                SEC_PRIV_SYSTEMTIME                = 0x0c,
     377                SEC_PRIV_PROFILE_SINGLE_PROCESS    = 0x0d,
     378                SEC_PRIV_INCREASE_BASE_PRIORITY    = 0x0e,
     379                SEC_PRIV_CREATE_PAGEFILE           = 0x0f,
     380                SEC_PRIV_BACKUP                    = 0x11,
     381                SEC_PRIV_RESTORE                   = 0x12,
     382                SEC_PRIV_SHUTDOWN                  = 0x13,
     383                SEC_PRIV_DEBUG                     = 0x14,
     384                SEC_PRIV_SYSTEM_ENVIRONMENT        = 0x16,
     385                SEC_PRIV_CHANGE_NOTIFY             = 0x17,
     386                SEC_PRIV_REMOTE_SHUTDOWN           = 0x18,
     387                SEC_PRIV_UNDOCK                    = 0x19,
     388                SEC_PRIV_ENABLE_DELEGATION         = 0x1b,
     389                SEC_PRIV_MANAGE_VOLUME             = 0x1c,
     390                SEC_PRIV_IMPERSONATE               = 0x1d,
     391                SEC_PRIV_CREATE_GLOBAL             = 0x1e,
     392                /* Samba-specific privs */
     393                SEC_PRIV_PRINT_OPERATOR            = 0x1001,
     394                SEC_PRIV_ADD_USERS                 = 0x1002,
     395                SEC_PRIV_DISK_OPERATOR             = 0x1003
    312396        } sec_privilege;
    313397
     398
     399        /* Bitmap of privilege values for internal use only.  We need
     400         * our own bitmap here as privilages.tdb records these values
     401         * as a bitmap (privilages.ldb uses the string forms).
     402         */
     403        typedef [bitmap64bit] bitmap {
     404                SEC_PRIV_MACHINE_ACCOUNT_BIT            = 0x00000010,
     405
     406                /* Samba-specific privs */
     407                SEC_PRIV_PRINT_OPERATOR_BIT             = 0x00000020,
     408                SEC_PRIV_ADD_USERS_BIT                  = 0x00000040,
     409                SEC_PRIV_DISK_OPERATOR_BIT              = 0x00000080,
     410
     411                SEC_PRIV_REMOTE_SHUTDOWN_BIT            = 0x00000100,
     412                SEC_PRIV_BACKUP_BIT                     = 0x00000200,
     413                SEC_PRIV_RESTORE_BIT                    = 0x00000400,
     414                SEC_PRIV_TAKE_OWNERSHIP_BIT             = 0x00000800,
     415                /* End of privilages implemented before merge to common code */
     416
     417                SEC_PRIV_INCREASE_QUOTA_BIT               = 0x00001000,
     418                SEC_PRIV_SECURITY_BIT                     = 0x00002000,
     419                SEC_PRIV_LOAD_DRIVER_BIT                  = 0x00004000,
     420                SEC_PRIV_SYSTEM_PROFILE_BIT               = 0x00008000,
     421                SEC_PRIV_SYSTEMTIME_BIT                   = 0x00010000,
     422                SEC_PRIV_PROFILE_SINGLE_PROCESS_BIT       = 0x00020000,
     423                SEC_PRIV_INCREASE_BASE_PRIORITY_BIT       = 0x00040000,
     424                SEC_PRIV_CREATE_PAGEFILE_BIT              = 0x00080000,
     425                SEC_PRIV_SHUTDOWN_BIT                     = 0x00100000,
     426                SEC_PRIV_DEBUG_BIT                        = 0x00200000,
     427                SEC_PRIV_SYSTEM_ENVIRONMENT_BIT           = 0x00400000,
     428                SEC_PRIV_CHANGE_NOTIFY_BIT                = 0x00800000,
     429                SEC_PRIV_UNDOCK_BIT                       = 0x01000000,
     430                SEC_PRIV_ENABLE_DELEGATION_BIT            = 0x02000000,
     431                SEC_PRIV_MANAGE_VOLUME_BIT                = 0x04000000,
     432                SEC_PRIV_IMPERSONATE_BIT                  = 0x08000000,
     433                SEC_PRIV_CREATE_GLOBAL_BIT                = 0x10000000
     434        } se_privilege;
     435
     436        typedef [bitmap32bit] bitmap {
     437                LSA_POLICY_MODE_INTERACTIVE             = 0x00000001,
     438                LSA_POLICY_MODE_NETWORK                 = 0x00000002,
     439                LSA_POLICY_MODE_BATCH                   = 0x00000004,
     440                LSA_POLICY_MODE_SERVICE                 = 0x00000010,
     441                LSA_POLICY_MODE_PROXY                   = 0x00000020,
     442                LSA_POLICY_MODE_DENY_INTERACTIVE        = 0x00000040,
     443                LSA_POLICY_MODE_DENY_NETWORK            = 0x00000080,
     444                LSA_POLICY_MODE_DENY_BATCH              = 0x00000100,
     445                LSA_POLICY_MODE_DENY_SERVICE            = 0x00000200,
     446                LSA_POLICY_MODE_REMOTE_INTERACTIVE      = 0x00000400,
     447                LSA_POLICY_MODE_DENY_REMOTE_INTERACTIVE = 0x00000800,
     448                LSA_POLICY_MODE_ALL                     = 0x00000FF7,
     449                LSA_POLICY_MODE_ALL_NT4                 = 0x00000037
     450        } lsa_SystemAccessModeFlags;
    314451
    315452        typedef [public,bitmap8bit] bitmap {
     
    372509                security_ace_type type;  /* SEC_ACE_TYPE_* */
    373510                security_ace_flags flags; /* SEC_ACE_FLAG_* */
    374                 [value(ndr_size_security_ace(r,ndr->iconv_convenience,ndr->flags))] uint16 size;
     511                [value(ndr_size_security_ace(r,ndr->flags))] uint16 size;
    375512                uint32 access_mask;
    376513                [switch_is(type)] security_ace_object_ctr object;
     
    387524        typedef [public,gensize,nosize] struct {
    388525                security_acl_revision revision;
    389                 [value(ndr_size_security_acl(r,ndr->iconv_convenience,ndr->flags))] uint16 size;
     526                [value(ndr_size_security_acl(r,ndr->flags))] uint16 size;
    390527                [range(0,1000)] uint32 num_aces;
    391528                security_ace aces[num_aces];
     
    429566
    430567        typedef [public] struct {
    431                 [range(0,0x40000),value(ndr_size_security_descriptor(sd,ndr->iconv_convenience,ndr->flags))] uint32 sd_size;
     568                [range(0,0x40000),value(ndr_size_security_descriptor(sd,ndr->flags))] uint32 sd_size;
    432569                [subcontext(4)] security_descriptor *sd;
    433570        } sec_desc_buf;
    434571
     572        /* This is not yet sent over the network, but is simply defined in IDL */
    435573        typedef [public] struct {
    436                 dom_sid *user_sid;
    437                 dom_sid *group_sid;
    438574                uint32 num_sids;
    439                 [size_is(num_sids)] dom_sid *sids[*];
    440                 udlong privilege_mask;
    441                 security_acl *default_dacl;
     575                [size_is(num_sids)] dom_sid sids[*];
     576                se_privilege privilege_mask;
     577                lsa_SystemAccessModeFlags rights_mask;
    442578        } security_token;
     579
     580        /* This is not yet sent over the network, but is simply defined in IDL */
     581        typedef [public] struct {
     582                uid_t uid;
     583                uid_t gid;
     584                uint32 ngroups;
     585                [size_is(ngroups)] gid_t groups[*];
     586        } security_unix_token;
    443587
    444588        /* bits that determine which parts of a security descriptor
     
    470614                SEC_GROUP_FROM_PARENT                = 0x00000010
    471615        } security_autoinherit;
     616
     617        /***************************************************************/
     618        /* Extended right guids */
     619
     620        const string GUID_DRS_ALLOCATE_RIDS           = "1abd7cf8-0a99-11d1-adbb-00c04fd8d5cd";
     621        const string GUID_DRS_CHANGE_DOMAIN_MASTER    = "014bf69c-7b3b-11d1-85f6-08002be74fab";
     622        const string GUID_DRS_CHANGE_INFR_MASTER      = "cc17b1fb-33d9-11d2-97d4-00c04fd8d5cd";
     623        const string GUID_DRS_CHANGE_PDC              = "bae50096-4752-11d1-9052-00c04fc2d4cf";
     624        const string GUID_DRS_CHANGE_RID_MASTER       = "d58d5f36-0a98-11d1-adbb-00c04fd8d5cd";
     625        const string GUID_DRS_CHANGE_SCHEMA_MASTER    = "e12b56b6-0a95-11d1-adbb-00c04fd8d5cd";
     626        const string GUID_DRS_GET_CHANGES             = "1131f6aa-9c07-11d1-f79f-00c04fc2dcd2";
     627        const string GUID_DRS_GET_ALL_CHANGES         = "1131f6ad-9c07-11d1-f79f-00c04fc2dcd2";
     628        const string GUID_DRS_GET_FILTERED_ATTRIBUTES = "89e95b76-444d-4c62-991a-0facbeda640c";
     629        const string GUID_DRS_MANAGE_TOPOLOGY         = "1131f6ac-9c07-11d1-f79f-00c04fc2dcd2";
     630        const string GUID_DRS_MONITOR_TOPOLOGY        = "f98340fb-7c5b-4cdb-a00b-2ebdfa115a96";
     631        const string GUID_DRS_REPL_SYNCRONIZE         = "1131f6ab-9c07-11d1-f79f-00c04fc2dcd2";
     632        const string GUID_DRS_RO_REPL_SECRET_SYNC     = "1131f6ae-9c07-11d1-f79f-00c04fc2dcd2";
     633        const string GUID_DRS_USER_CHANGE_PASSWORD    = "ab721a53-1e2f-11d0-9819-00aa0040529b";
     634        const string GUID_DRS_FORCE_CHANGE_PASSWORD   = "00299570-246d-11d0-a768-00aa006e0529";
     635
     636        /***************************************************************/
     637        /* validated writes guids */
     638        const string GUID_DRS_VALIDATE_SPN            = "f3a64788-5306-11d1-a9c5-0000f80367c1";
     639        const string GUID_DRS_SELF_MEMBERSHIP         = "bf9679c0-0de6-11d0-a285-00aa003049e2";
     640        const string GUID_DRS_DNS_HOST_NAME           = "72e39547-7b18-11d1-adef-00c04fd8d5cd";
     641        const string GUID_DRS_ADD_DNS_HOST_NAME       = "80863791-dbe9-4eb8-837e-7f0ab55d9ac7";
     642        const string GUID_DRS_BEHAVIOR_VERSION        = "d31a8757-2447-4545-8081-3bb610cacbf2";
     643
     644        /* A type to describe the mapping of generic access rights to object
     645           specific access rights. */
     646
     647        typedef struct {
     648                uint32 generic_read;
     649                uint32 generic_write;
     650                uint32 generic_execute;
     651                uint32 generic_all;
     652        } generic_mapping;
     653
     654        typedef struct {
     655                uint32 std_read;
     656                uint32 std_write;
     657                uint32 std_execute;
     658                uint32 std_all;
     659        } standard_mapping;
    472660}
  • trunk/server/librpc/idl/spoolss.idl

    r596 r745  
    3030
    3131        typedef struct {
    32                 [value(ndr_size_spoolss_Time(time, ndr->iconv_convenience, ndr->flags))] uint32 size;
     32                [value(ndr_size_spoolss_Time(time, ndr->flags))] uint32 size;
    3333                [unique] spoolss_Time *time;
    3434        } spoolss_TimeCtr;
     
    120120        } spoolss_JobStatus;
    121121
     122        typedef [v1_enum] enum {
     123                SPOOLSS_DEBUGGING_BUILD         = 0x00000000,
     124                SPOOLSS_RELEASE_BUILD           = 0x00000001
     125        } spoolss_Build;
     126
    122127        typedef [public,gensize] struct {
    123128                [relative] nstring *printername;
     
    130135                uint32 total_pages;
    131136                uint32 version;
    132                 uint32 free_build;
     137                spoolss_Build free_build;
    133138                uint32 spooling;
    134139                uint32 max_spooling;
     
    151156                uint32 reserved3;
    152157        } spoolss_PrinterInfo0;
     158
     159        /* Device Mode Extra Data */
     160
     161        typedef [v1_enum] enum {
     162                SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA        = 0x554e4944, /* 0x44494e55 */
     163                SPOOLSS_DM_SIGNATURE_JTEXP              = 0x4a544d53, /* 0x534d544a */
     164                SPOOLSS_DM_SIGNATURE_PSEXTRA            = 0x50524956 /* 0x56495250 */
     165        } spoolss_DM_Signature;
     166
     167        typedef [v1_enum] enum {
     168                SPOOLSS_DM_LAYOUT_NUP_DISABLED          = 0x00000000,
     169                SPOOLSS_DM_LAYOUT_NUP_2                 = 0x00000001,
     170                SPOOLSS_DM_LAYOUT_NUP_4                 = 0x00000002,
     171                SPOOLSS_DM_LAYOUT_NUP_6                 = 0x00000003,
     172                SPOOLSS_DM_LAYOUT_NUP_9                 = 0x00000004,
     173                SPOOLSS_DM_LAYOUT_NUP_16                = 0x00000005,
     174                SPOOLSS_DM_LAYOUT_BOOKLET               = 0x00000006
     175        } spoolss_DM_Layout;
     176
     177        typedef [v1_enum] enum {
     178                SPOOLSS_DM_NUP_DIRECTION_L2R_T2B        = 0x00000001,
     179                SPOOLSS_DM_NUP_DIRECTION_T2B_L2R        = 0x00000002,
     180                SPOOLSS_DM_NUP_DIRECTION_R2L_T2B        = 0x00000004,
     181                SPOOLSS_DM_NUP_DIRECTION_T2B_R2L        = 0x00000008
     182        } spoolss_DM_NupDirection;
     183
     184        typedef [v1_enum] enum {
     185                SPOOLSS_DM_NUP_BORDER_PRINT             = 0x00000000,
     186                SPOOLSS_DM_NUP_BORDER_NONE              = 0x00000001
     187        } spoolss_DM_NupBorderFlags;
     188
     189        typedef [v1_enum] enum {
     190                SPOOLSS_DM_BOOKLET_LEFT_FLIP            = 0x00000000,
     191                SPOOLSS_DM_BOOKLET_RIGHT_FLIP           = 0x00000001
     192        } spoolss_DM_BookletFlags;
     193
     194        /* Device Mode Extra Data: PostScript */
     195
     196        /* NT 3.51 */
     197
     198        typedef [bitmap32bit] bitmap {
     199                SPOOLSS_DM_PS_FLAGS_DRV_ERROR_HANDLER   = 0x00000002,
     200                SPOOLSS_DM_PS_FLAGS_PRINT_MIRROR        = 0x00000004,
     201                SPOOLSS_DM_PS_FLAGS_PRINT_NEGATIVE      = 0x00000010,
     202                SPOOLSS_DM_PS_FLAGS_COMPRESS_BITMAP     = 0x00000040,
     203                SPOOLSS_DM_PS_FLAGS_ROTATE_180          = 0x00000200,
     204                SPOOLSS_DM_PS_FLAGS_GDI_METAFILE_SPOOL  = 0x00002000
     205        } spoolss_DMPS_Flags;
     206
     207        typedef struct {
     208                [value(SPOOLSS_DM_SIGNATURE_PSEXTRA)] spoolss_DM_Signature dwSignature;
     209                spoolss_DMPS_Flags dwFlags;
     210                uint32 wchEPSFile[12];
     211                [value(24)] uint16 caSize;
     212                uint16 caFlags;
     213                uint16 caIlluminantIndex;
     214                uint16 caRedGamma;
     215                uint16 caGreenGamma;
     216                uint16 caBlueGamma;
     217                uint16 caReferenceBlack;
     218                uint16 caReferenceWhite;
     219                uint16 caContrast;
     220                uint16 caBrightness;
     221                uint16 caColorfulness;
     222                uint16 caRedGreenTint;
     223        } spoolss_PSDRVEXTRA351;
     224
     225        /* NT 4.0 */
     226
     227        typedef struct {
     228                [value(SPOOLSS_DM_SIGNATURE_PSEXTRA)] spoolss_DM_Signature dwSignature;
     229                spoolss_DMPS_Flags dwFlags;
     230                uint32 wchEPSFile[12];
     231                [value(24)] uint16 caSize;
     232                uint16 caFlags;
     233                uint16 caIlluminantIndex;
     234                uint16 caRedGamma;
     235                uint16 caGreenGamma;
     236                uint16 caBlueGamma;
     237                uint16 caReferenceBlack;
     238                uint16 caReferenceWhite;
     239                uint16 caContrast;
     240                uint16 caBrightness;
     241                uint16 caColorfulness;
     242                uint16 caRedGreenTint;
     243                uint16 wChecksum;
     244                uint16 wOptions;
     245                uint32 aubOptions[8];
     246        } spoolss_PSDRVEXTRA400;
     247
     248        /* 2000 & XP */
     249
     250        typedef [v1_enum] enum {
     251                SPOOLSS_DM_PS_OPTIMIZE_SPEED            = 0x00000000,
     252                SPOOLSS_DM_PS_OPTIMIZE_PORTABILITY      = 0x00000001,
     253                SPOOLSS_DM_PS_OPTIMIZE_EPS              = 0x00000002,
     254                SPOOLSS_DM_PS_OPTIMIZE_ARCHIVAL         = 0x00000003
     255        } spoolss_DMPS_Dialect;
     256
     257        typedef [v1_enum] enum {
     258                SPOOLSS_DM_PS_TTDLFMT_DEFAULT           = 0x00000000,
     259                SPOOLSS_DM_PS_TTDLFMT_TYPE_1            = 0x00000001,
     260                SPOOLSS_DM_PS_TTDLFMT_TYPE_3            = 0x00000002,
     261                SPOOLSS_DM_PS_TTDLFMT_TYPE_42           = 0x00000003
     262        } spoolss_DMPS_TTDLFmt;
     263
     264        typedef [v1_enum] enum {
     265                SPOOLSS_DM_PS_PSLEVEL_1 = 0x00000001,
     266                SPOOLSS_DM_PS_PSLEVEL_2 = 0x00000002,
     267                SPOOLSS_DM_PS_PSLEVEL_3 = 0x00000003
     268        } spoolss_DMPS_PSLevel;
     269
     270        typedef enum {
     271                SPOOLSS_DM_PS_FEED_DIRECTION_LONG_EDGE_FIRST            = 0x0000,
     272                SPOOLSS_DM_PS_FEED_DIRECTION_SHORT_EDGE_FIRST           = 0x0001,
     273                SPOOLSS_DM_PS_FEED_DIRECTION_LONG_EDGE_FIRST_UPSIDEDOWN = 0x0002,
     274                SPOOLSS_DM_PS_FEED_DIRECTION_SHORT_EDGE_FIRST_UPSIDEDOWN= 0x0003
     275        } spoolss_DMPS_FeedDirection;
     276
     277        typedef struct {
     278                [value(SPOOLSS_DM_SIGNATURE_PSEXTRA)] spoolss_DM_Signature dwSignature;
     279                spoolss_DMPS_Flags dwFlags;
     280                uint32 wchEPSFile[12];
     281                [value(24)] uint16 caSize;
     282                uint16 caFlags;
     283                uint16 caIlluminantIndex;
     284                uint16 caRedGamma;
     285                uint16 caGreenGamma;
     286                uint16 caBlueGamma;
     287                uint16 caReferenceBlack;
     288                uint16 caReferenceWhite;
     289                uint16 caContrast;
     290                uint16 caBrightness;
     291                uint16 caColorfulness;
     292                uint16 caRedGreenTint;
     293                uint16 wReserved1;
     294                uint16 wSize;
     295                uint32 fxScrFreq;
     296                uint32 fxScrAngle;
     297                spoolss_DMPS_Dialect iDialect;
     298                spoolss_DMPS_TTDLFmt iTTDLFmt;
     299                boolean32 bReversePrint;
     300                spoolss_DM_Layout iLayout;
     301                spoolss_DMPS_PSLevel iPSLevel;
     302                uint32 dwReserved2;
     303                uint16 wOEMExtra;
     304                [value(0x0010)] uint16 wVer;
     305                uint32 dwX;
     306                uint32 dwY;
     307                uint32 dwWidthOffset;
     308                uint32 dwHeightOffset;
     309                spoolss_DMPS_FeedDirection wFeedDirection;
     310                uint16 wCutSheet;
     311                uint32 dwReserved3[4];
     312                uint32 dwChecksum32;
     313                uint32 dwOptions;
     314                uint32 aOptions[128];
     315        } spoolss_PSDRVEXTRA500;
     316
     317        /* Vista, 2008, 7 */
     318
     319        typedef struct {
     320                [value(SPOOLSS_DM_SIGNATURE_PSEXTRA)] spoolss_DM_Signature dwSignature;
     321                spoolss_DMPS_Flags dwFlags;
     322                uint32 wchEPSFile[12];
     323                [value(24)] uint16 caSize;
     324                uint16 caFlags;
     325                uint16 caIlluminantIndex;
     326                uint16 caRedGamma;
     327                uint16 caGreenGamma;
     328                uint16 caBlueGamma;
     329                uint16 caReferenceBlack;
     330                uint16 caReferenceWhite;
     331                uint16 caContrast;
     332                uint16 caBrightness;
     333                uint16 caColorfulness;
     334                uint16 caRedGreenTint;
     335                uint16 wCoreJTExpSize;
     336                [value(ndr_size_spoolss_PSDRVEXTRA(r, ndr->flags) + wCoreJTExpSize)] uint16 wCoreFullSize;
     337                uint32 fxScrFreq;
     338                uint32 fxScrAngle;
     339                spoolss_DMPS_Dialect iDialect;
     340                spoolss_DMPS_TTDLFmt iTTDLFmt;
     341                boolean32 bReversePrint;
     342                spoolss_DM_Layout iLayout;
     343                spoolss_DMPS_PSLevel iPSLevel;
     344                uint32 dwReserved2;
     345                uint16 wOEMExtra;
     346                [value(0x0010)] uint16 wVer;
     347                uint32 dwX;
     348                uint32 dwY;
     349                uint32 dwWidthOffset;
     350                uint32 dwHeightOffset;
     351                spoolss_DMPS_FeedDirection wFeedDirection;
     352                uint16 wCutSheet;
     353                uint32 dwReserved3[4];
     354                uint32 dwChecksum32;
     355                uint32 dwOptions;
     356                uint32 aOptions[128];
     357                spoolss_DM_NupDirection dwNupDirection;
     358                spoolss_DM_NupBorderFlags dwNupBorderFlags;
     359                spoolss_DM_BookletFlags dwBookletFlags;
     360                uint32 dwPadding;
     361        } spoolss_PSDRVEXTRA;
     362
     363        /* Device Mode Extra Data: UniDriver */
     364
     365        /* NT 3.5, NT 4.0 */
     366
     367        typedef struct {
     368                uint16 wReserved[56];
     369        } spoolss_UNIDRVEXTRA3_4;
     370
     371        /* 2000, XP */
     372
     373        typedef [v1_enum] enum {
     374                SPOOLSS_DM_UNI_QUALITY_BEST             = 0x00000000,
     375                SPOOLSS_DM_UNI_QUALITY_MEDIUM           = 0x00000001,
     376                SPOOLSS_DM_UNI_QUALITY_DRAFT            = 0x00000002
     377        } spoolss_DMUNI_Quality;
     378
     379        typedef [bitmap32bit] bitmap {
     380                SPOOLSS_DM_UNI_FLAGS_PRINT_TEXT_AS_GRAPHICS     = 0x00000002,
     381                SPOOLSS_DM_UNI_FLAGS_AVOID_EMFSPOOL             = 0x00000010,
     382                SPOOLSS_DM_UNI_FLAGS_CUSTOM_HALFTONING          = 0x00000080
     383        } spoolss_DMUNI_Flags;
     384
     385        typedef struct {
     386                [value(SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA)] spoolss_DM_Signature dwSignature;
     387                [value(0x0022)] uint16 wVer;
     388                uint16 sPadding;
     389                uint16 wSize;
     390                uint16 wOEMExtra;
     391                uint32 dwChecksum32;
     392                spoolss_DMUNI_Flags dwFlags;
     393                boolean32 bReversePrint;
     394                spoolss_DM_Layout iLayout;
     395                spoolss_DMUNI_Quality iQuality;
     396                uint16 wReserved[6];
     397                uint32 dwOptions;
     398                uint32 aOptions[128];
     399        } spoolss_UNIDRVEXTRA500;
     400
     401        /* Vista, 2008, 7 */
     402
     403        typedef [public,gensize] struct {
     404                [value(SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA)] spoolss_DM_Signature dwSignature;
     405                [value(0x0022)] uint16 wVer;
     406                uint16 wCoreJTExpSize;
     407                [value(ndr_size_spoolss_UNIDRVEXTRA(r, ndr->flags) + wCoreJTExpSize)] uint16 wCoreFullSize;
     408                uint16 wOEMExtra;
     409                uint32 dwChecksum32;
     410                spoolss_DMUNI_Flags dwFlags;
     411                boolean32 bReversePrint;
     412                spoolss_DM_Layout iLayout;
     413                spoolss_DMUNI_Quality iQuality;
     414                uint16 wReserved[6];
     415                uint32 dwOptions;
     416                uint32 aOptions[128];
     417                spoolss_DM_NupDirection dwNupDirection;
     418                spoolss_DM_NupBorderFlags dwNupBorderFlags;
     419                spoolss_DM_BookletFlags dwBookletFlags;
     420        } spoolss_UNIDRVEXTRA;
     421
     422        /* Device Mode Extra Data: JTEXP */
     423
     424        typedef struct {
     425                uint32 dwSize;
     426                [value(SPOOLSS_DM_SIGNATURE_JTEXP)] spoolss_DM_Signature dwSignature;
     427                [value(0)] uint32 dwVersion;
     428                [value(16)] uint32 wJTHdrSize;
     429                uint32 wCoreMFOSize;
     430                [string,charset(UTF16)] uint16 *ModelName;
     431                nstring_array FeatureOptionPairs;
     432        } spoolss_JTEXP;
     433
     434        /* Device Mode Extra Data: OEM_DMEXTRA */
     435
     436        typedef struct {
     437                uint32 dwSize;
     438                spoolss_DM_Signature dwSignature;
     439                uint32 dwVersion;
     440                [flag(NDR_REMAINING)] DATA_BLOB Data;
     441        } spoolss_OEM_DMEXTRA;
     442
     443        typedef [nodiscriminant] union {
     444                [case(0x0350)] spoolss_PSDRVEXTRA351    psdrvextra351;
     445                [case(0x0400)] spoolss_PSDRVEXTRA400    psdrvextra400;
     446                [case(0x0501)] spoolss_PSDRVEXTRA500    psdrvextra500;
     447                [case(0x0600)] spoolss_PSDRVEXTRA       psdrvextra;
     448                [default] [flag(NDR_REMAINING)] DATA_BLOB psblob;
     449        } spoolss_DeviceModeExtraDataPostScript;
     450
     451        typedef [nodiscriminant] union {
     452                [case(0x0301)] spoolss_UNIDRVEXTRA3_4   unidrvextra3_4;
     453                [case(0x0500)] spoolss_UNIDRVEXTRA500   unidrvextra500;
     454                [case(0x0600)] spoolss_UNIDRVEXTRA      unidrvextra;
     455                [default] [flag(NDR_REMAINING)] DATA_BLOB uniblob;
     456        } spoolss_DeviceModeExtraDataUniDriver;
    153457
    154458        typedef [bitmap32bit] bitmap {
     
    463767
    464768        typedef [public,gensize] struct {
    465                 spoolss_PrinterAttributes flags;
     769                spoolss_EnumPrinterFlags flags;
    466770                [relative] nstring *description;
    467771                [relative] nstring *name;
     
    581885        /* Function: 0x01 */
    582886        typedef struct {
    583                 [value(_ndr_size_spoolss_DeviceMode(devmode, ndr->iconv_convenience, ndr->flags))] uint32 _ndr_size;
     887                [value(_ndr_size_spoolss_DeviceMode(devmode, ndr->flags))] uint32 _ndr_size;
    584888                [subcontext(4),subcontext_size(_ndr_size)] spoolss_DeviceMode *devmode;
    585889        } spoolss_DevmodeContainer;
     
    8581162                uint32 total_pages;
    8591163                uint32 version;
    860                 uint32 free_build;
     1164                spoolss_Build free_build;
    8611165                uint32 spooling;
    8621166                uint32 max_spooling;
     
    8641168                uint32 num_error_out_of_paper;
    8651169                uint32 num_error_not_ready;
    866                 uint32 job_error;
     1170                spoolss_JobStatus job_error;
    8671171                uint32 number_of_processors;
    8681172                spoolss_ProcessorType processor_type;
     
    8701174                uint32 change_id;
    8711175                WERROR last_error;
    872                 uint32 status;
     1176                spoolss_PrinterStatus status;
    8731177                uint32 enumerate_network_printers;
    8741178                uint32 c_setprinter;
     
    9881292
    9891293        typedef [public] struct {
    990                 [value((ndr_size_spoolss_StringArray(r, ndr->iconv_convenience, ndr->flags)-4)/2)] uint32 _ndr_size;
     1294                [value((ndr_size_spoolss_StringArray(r, ndr->flags)-4)/2)] uint32 _ndr_size;
    9911295                /*[subcontext(0),subcontext_size(_ndr_size*2)]*/ nstring_array string;
    9921296        } spoolss_StringArray;
     
    10221326                [string,charset(UTF16)] uint16 *monitor_name;
    10231327                [string,charset(UTF16)] uint16 *default_datatype;
    1024                 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
     1328                [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
    10251329                spoolss_StringArray *dependent_files;
    10261330        } spoolss_AddDriverInfo3;
     
    10361340                [string,charset(UTF16)] uint16 *monitor_name;
    10371341                [string,charset(UTF16)] uint16 *default_datatype;
    1038                 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
     1342                [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
    10391343                spoolss_StringArray *dependent_files;
    1040                 [value(((ndr_size_spoolss_StringArray(previous_names, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
     1344                [value(((ndr_size_spoolss_StringArray(previous_names, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
    10411345                spoolss_StringArray *previous_names;
    10421346        } spoolss_AddDriverInfo4;
     
    10681372                [string,charset(UTF16)] uint16 *monitor_name;
    10691373                [string,charset(UTF16)] uint16 *default_datatype;
    1070                 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
     1374                [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
    10711375                spoolss_StringArray *dependent_files;
    1072                 [value(((ndr_size_spoolss_StringArray(previous_names, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
     1376                [value(((ndr_size_spoolss_StringArray(previous_names, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
    10731377                spoolss_StringArray *previous_names;
    10741378                NTTIME driver_date;
     
    10901394                [string,charset(UTF16)] uint16 *monitor_name;
    10911395                [string,charset(UTF16)] uint16 *default_datatype;
    1092                 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
     1396                [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
    10931397                spoolss_StringArray *dependent_files;
    1094                 [value(((ndr_size_spoolss_StringArray(previous_names, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
     1398                [value(((ndr_size_spoolss_StringArray(previous_names, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
    10951399                spoolss_StringArray *previous_names;
    10961400                NTTIME driver_date;
     
    11021406                [string,charset(UTF16)] uint16 *print_processor;
    11031407                [string,charset(UTF16)] uint16 *vendor_setup;
    1104                 [value(((ndr_size_spoolss_StringArray(color_profiles, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_color_profiles;
     1408                [value(((ndr_size_spoolss_StringArray(color_profiles, ndr->flags)-4)/2))] uint32 _ndr_size_color_profiles;
    11051409                spoolss_StringArray *color_profiles;
    11061410                [string,charset(UTF16)] uint16 *inf_path;
    11071411                uint32 printer_driver_attributes;
    1108                 [value(((ndr_size_spoolss_StringArray(core_driver_dependencies, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_core_driver_dependencies;
     1412                [value(((ndr_size_spoolss_StringArray(core_driver_dependencies, ndr->flags)-4)/2))] uint32 _ndr_size_core_driver_dependencies;
    11091413                spoolss_StringArray *core_driver_dependencies;
    11101414                NTTIME min_inbox_driver_ver_date;
     
    15231827
    15241828        typedef [public,gensize] struct {
    1525                 [value(ndr_size_spoolss_OSVersion(r,ndr->iconv_convenience,ndr->flags))] uint32 _ndr_size;
     1829                [value(ndr_size_spoolss_OSVersion(r,ndr->flags))] uint32 _ndr_size;
    15261830                uint32 major;
    15271831                uint32 minor;
     
    15321836
    15331837        typedef [public,gensize] struct {
    1534                 [value(ndr_size_spoolss_OSVersionEx(r,ndr->iconv_convenience,ndr->flags))] uint32 _ndr_size;
     1838                [value(ndr_size_spoolss_OSVersionEx(r,ndr->flags))] uint32 _ndr_size;
    15351839                uint32 major;
    15361840                uint32 minor;
     
    16221926        const string SPOOL_REG_VERSIONNUMBER            = "versionNumber";
    16231927
    1624         WERROR spoolss_GetPrinterData(
     1928        [public] WERROR spoolss_GetPrinterData(
    16251929                [in,ref] policy_handle *handle,
    16261930                [in]     [string,charset(UTF16)] uint16 value_name[],
     
    19302234        /******************/
    19312235        /* Function: 0x25 */
     2236
     2237        typedef [public,gensize] struct {
     2238                [string,charset(UTF16)] uint16 *port_name;
     2239        } spoolss_SetPortInfo1;
     2240
     2241        typedef [public,gensize] struct {
     2242                [string,charset(UTF16)] uint16 *port_name;
     2243                [string,charset(UTF16)] uint16 *monitor_name;
     2244                [string,charset(UTF16)] uint16 *description;
     2245                spoolss_PortType port_type;
     2246                uint32 reserved;
     2247        } spoolss_SetPortInfo2;
     2248
     2249        typedef [public,gensize] struct {
     2250                spoolss_PortStatus status;
     2251                [string,charset(UTF16)] uint16 *status_string;
     2252                spoolss_PortSeverity severity;
     2253        } spoolss_SetPortInfo3;
     2254
     2255        typedef [public,gensize] struct {
     2256                [string,charset(UTF16)] uint16 *port_name;
     2257                DATA_BLOB monitor_data; /* relative ?? */
     2258        } spoolss_SetPortInfoFF;
     2259
     2260        typedef [switch_type(uint32)] union {
     2261                [case(1)] spoolss_SetPortInfo1 *info1;
     2262                [case(2)] spoolss_SetPortInfo2 *info2;
     2263                [case(3)] spoolss_SetPortInfo3 *info3;
     2264                [case(0xff)] spoolss_SetPortInfoFF *infoFF;
     2265        } spoolss_SetPortInfo;
     2266
     2267        typedef struct {
     2268                uint32 level;
     2269                [switch_is(level)] spoolss_SetPrinterInfo info;
     2270        } spoolss_SetPortInfoContainer;
     2271
    19322272        WERROR spoolss_AddPort(
    19332273               [in,unique] [string,charset(UTF16)] uint16 *server_name,
     
    19432283        /******************/
    19442284        /* Function: 0x27 */
    1945         [todo] WERROR spoolss_DeletePort(
     2285        WERROR spoolss_DeletePort(
     2286               [in,unique] [string,charset(UTF16)] uint16 *server_name,
     2287               [in] uint32 ptr,
     2288               [in,ref] [string,charset(UTF16)] uint16 *port_name
    19462289        );
    19472290
     
    20552398        /******************/
    20562399        /* Function: 0x35 */
    2057         WERROR spoolss_GetPrinterDriver2(
     2400        [public] WERROR spoolss_GetPrinterDriver2(
    20582401                [in,ref] policy_handle *handle,
    20592402                [in,unique] [string,charset(UTF16)] uint16 *architecture,
     
    21672510        /******************/
    21682511        /* Function: 0x3d */
    2169         [todo] WERROR spoolss_AddPortEx(
     2512
     2513        typedef struct {
     2514                uint32 monitor_data_size;
     2515                [size_is(monitor_data_size),unique] uint8 *monitor_data;
     2516        } spoolss_PortVarContainer;
     2517
     2518        WERROR spoolss_AddPortEx(
     2519                [in,unique] [string,charset(UTF16)] uint16 *servername,
     2520                [in,ref] spoolss_SetPortInfoContainer *port_ctr,
     2521                [in,ref] spoolss_PortVarContainer *port_var_ctr,
     2522                [in,unique] [string,charset(UTF16)] uint16 *monitor_name
    21702523        );
    21712524
     
    24822835        /******************/
    24832836        /* Function: 0x47 */
    2484         [todo] WERROR spoolss_47(
     2837        WERROR spoolss_SetPort(
     2838                [in,unique] [string,charset(UTF16)] uint16 *servername,
     2839                [in,unique] [string,charset(UTF16)] uint16 *port_name,
     2840                [in,ref] spoolss_SetPortInfoContainer *port_ctr
    24852841        );
    24862842
     
    26312987        /******************/
    26322988        /* Function: 0x55 */
    2633         [todo] WERROR spoolss_55(
     2989        WERROR spoolss_AddPerMachineConnection(
     2990                [in,unique] [string,charset(UTF16)] uint16 *server,
     2991                [in,ref] [string,charset(UTF16)] uint16 *printername,
     2992                [in,ref] [string,charset(UTF16)] uint16 *printserver,
     2993                [in,ref] [string,charset(UTF16)] uint16 *provider
    26342994        );
    26352995
    26362996        /******************/
    26372997        /* Function: 0x56 */
    2638         [todo] WERROR spoolss_56(
     2998        WERROR spoolss_DeletePerMachineConnection(
     2999                [in,unique] [string,charset(UTF16)] uint16 *server,
     3000                [in,ref] [string,charset(UTF16)] uint16 *printername
    26393001        );
    26403002
    26413003        /******************/
    26423004        /* Function: 0x57 */
    2643         [todo] WERROR spoolss_57(
     3005        [todo] WERROR spoolss_EnumPerMachineConnections(
    26443006        );
    26453007
  • trunk/server/librpc/idl/srvsvc.idl

    r414 r745  
    44  srvsvc interface definitions
    55*/
    6 import "security.idl", "svcctl.idl";
     6import "misc.idl", "security.idl", "svcctl.idl";
    77
    88[ uuid("4b324fc8-1670-01d3-1278-5a47bf6ee188"),
  • trunk/server/librpc/idl/winreg.idl

    r429 r745  
    113113        } winreg_SecBuf;
    114114
     115        const int REG_OPTION_NON_VOLATILE = 0x00000000;
     116
     117        typedef [bitmap32bit] bitmap {
     118                REG_OPTION_VOLATILE             = 0x00000001,
     119                REG_OPTION_CREATE_LINK          = 0x00000002,
     120                REG_OPTION_BACKUP_RESTORE       = 0x00000004,
     121                REG_OPTION_OPEN_LINK            = 0x00000008
     122        } winreg_KeyOptions;
     123
    115124        typedef [v1_enum] enum {
    116125                REG_ACTION_NONE         = 0, /* used by caller */
     
    123132                [in] winreg_String name,
    124133                [in] winreg_String keyclass,
    125                 [in] uint32 options,
     134                [in] winreg_KeyOptions options,
    126135                [in] winreg_AccessMask access_mask,
    127136                [in,unique] winreg_SecBuf *secdesc,
     
    180189                [in,out,ref]    winreg_ValNameBuf *name,
    181190                [in,out,unique] winreg_Type *type,
    182                 [in,out,unique,size_is(*size),length_is(*length)] uint8 *value,
     191                [in,out,unique,size_is(size ? *size : 0),length_is(length ? *length : 0),range(0,0x4000000)] uint8 *value,
    183192                [in,out,unique] uint32 *size,
    184193                [in,out,unique] uint32 *length
     
    231240                [in,ref] policy_handle *parent_handle,
    232241                [in] winreg_String keyname,
    233                 [in] uint32 unknown,
     242                [in] winreg_KeyOptions options,
    234243                [in] winreg_AccessMask access_mask,
    235244                [out,ref] policy_handle *handle
     
    264273        /******************/
    265274        /* Function: 0x12 */
    266         [todo] WERROR winreg_ReplaceKey(
     275        WERROR winreg_ReplaceKey(
     276                [in,ref] policy_handle *handle,
     277                [in,ref] winreg_String *subkey,
     278                [in,ref] winreg_String *new_file,
     279                [in,ref] winreg_String *old_file
    267280        );
    268281
    269282        /******************/
    270283        /* Function: 0x13 */
     284
     285        typedef [public,bitmap32bit] bitmap {
     286                REG_WHOLE_HIVE_VOLATILE         = 0x00000001,
     287                REG_REFRESH_HIVE                = 0x00000002,
     288                REG_NO_LAZY_FLUSH               = 0x00000004,
     289                REG_FORCE_RESTORE               = 0x00000008
     290        } winreg_RestoreKeyFlags;
     291
    271292        WERROR winreg_RestoreKey(
    272293                [in,ref] policy_handle *handle,
    273294                [in,ref] winreg_String *filename,
    274                 [in]     uint32 flags
     295                [in]     winreg_RestoreKeyFlags flags
    275296        );
    276297
     
    310331        /******************/
    311332        /* Function: 0x17 */
    312         [todo] WERROR winreg_UnLoadKey(
     333        WERROR winreg_UnLoadKey(
     334                [in,ref] policy_handle *handle,
     335                [in,ref] winreg_String *subkey
    313336        );
    314337
     
    357380
    358381        typedef struct {
    359                 winreg_String *name;
    360                 winreg_Type type;
    361                 uint32 offset;
    362                 uint32 length;
     382                winreg_ValNameBuf *ve_valuename;
     383                uint32 ve_valuelen;
     384                uint32 ve_valueptr;
     385                winreg_Type ve_type;
    363386        } QueryMultipleValue;
    364        
     387
    365388        /******************/
    366389        /* Function: 0x1d */
    367390        [public] WERROR winreg_QueryMultipleValues(
    368391                [in,ref] policy_handle *key_handle,
    369                 [in,out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values,
     392                [in,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values_in,
     393                [out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values_out,
    370394                [in] uint32 num_values,
    371395                [in,out,unique,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer,
     
    390414        /******************/
    391415        /* Function: 0x1f */
    392         [todo] WERROR winreg_SaveKeyEx(
     416        WERROR winreg_SaveKeyEx(
     417                [in,ref] policy_handle *handle,
     418                [in,ref] winreg_String *filename,
     419                [in,unique] KeySecurityAttribute *sec_attrib,
     420                [in] uint32 flags
    393421        );
    394422
     
    411439        /******************/
    412440        /* Function: 0x22 */
    413         [todo] WERROR winreg_QueryMultipleValues2(
     441        [public] WERROR winreg_QueryMultipleValues2(
     442                [in,ref] policy_handle *key_handle,
     443                [in,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values_in,
     444                [out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values_out,
     445                [in] uint32 num_values,
     446                [in,out,unique,size_is(*offered),length_is(*offered)] uint8 *buffer,
     447                [in,ref] uint32 *offered,
     448                [out,ref] uint32 *needed
     449        );
     450
     451        /******************/
     452        /* Function: 0x23 */
     453        WERROR winreg_DeleteKeyEx(
     454                [in,ref] policy_handle *handle,
     455                [in,ref] winreg_String *key,
     456                [in] winreg_AccessMask access_mask,
     457                [in] uint32 reserved
    414458        );
    415459}
  • trunk/server/librpc/idl/wmi.idl

    r414 r745  
    99
    1010[
    11         helper("librpc/ndr/ndr_wmi.h"),
    1211        uuid("8BC3F05E-D86B-11d0-A075-00C04FB68820")
    1312] coclass WbemLevel1Login
     
    1817
    1918[
    20         local, 
    21         object, 
     19        local,
     20        object,
    2221        uuid("dc12a681-737f-11cf-884d-00aa004b2e24")
    2322]
     
    204203    }   WBEMSTATUS;
    205204
    206     typedef [public,noprint] enum
     205    typedef [public] bitmap
    207206    {
    208207        WBEM_FLAG_RETURN_WBEM_COMPLETE          = 0,
     
    226225    } WBEM_GENERIC_FLAG_TYPE;
    227226
    228     typedef [public,noprint,v1_enum] enum tag_WBEM_TIMEOUT_TYPE
     227    typedef [public,v1_enum] enum tag_WBEM_TIMEOUT_TYPE
    229228    {
    230229        WBEM_NO_WAIT = 0,
     
    280279        WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE = 0x1,
    281280        WBEM_FLAVOR_FLAG_PROPAGATE_TO_DERIVED_CLASS = 0x2,
    282 //        WBEM_FLAVOR_MASK_PROPAGATION = 0x0F,
     281/*        WBEM_FLAVOR_MASK_PROPAGATION = 0x0F, */
    283282
    284283        WBEM_FLAVOR_NOT_OVERRIDABLE = 0x10,
    285 //        WBEM_FLAVOR_MASK_PERMISSIONS = 0x10,
     284/*        WBEM_FLAVOR_MASK_PERMISSIONS = 0x10, */
    286285
    287286        WBEM_FLAVOR_ORIGIN_PROPAGATED = 0x20,
    288287        WBEM_FLAVOR_ORIGIN_SYSTEM = 0x40,
    289 //        WBEM_FLAVOR_MASK_ORIGIN = 0x60,
     288/*        WBEM_FLAVOR_MASK_ORIGIN = 0x60, */
    290289
    291290        WBEM_FLAVOR_AMENDED = 0x80
    292 //        WBEM_FLAVOR_MASK_AMENDED = 0x80
     291/*        WBEM_FLAVOR_MASK_AMENDED = 0x80 */
    293292
    294293    } WBEM_FLAVOR_TYPE;
     
    300299                WCF_CLASS = 4,
    301300                WCF_CLASS_PART_INTERNAL = 8
    302         //      WCF_CLASS_PART_SHARED = 0x104
    303     } WCO_FLAGS;
    304 
    305     typedef [public,nopull,nopush] struct
    306     {
     301        /*      WCF_CLASS_PART_SHARED = 0x104 */
     302        } WCO_FLAGS;
     303
     304        typedef struct
     305        {
    307306                uint32 count;
    308307                [ref,charset(UTF16)] uint16 *item[count];
    309     } CIMSTRINGS;
    310 
    311     typedef [public,bitmap8bit] bitmap {
    312         DEFAULT_FLAG_EMPTY = 1,
    313         DEFAULT_FLAG_INHERITED = 2
    314     } DEFAULT_FLAGS;
     308        } CIMSTRINGS;
     309
     310        typedef [public,bitmap8bit] bitmap {
     311                DEFAULT_FLAG_EMPTY = 1,
     312                DEFAULT_FLAG_INHERITED = 2
     313        } DEFAULT_FLAGS;
    315314
    316315        WERROR OpenNamespace(
     
    421420
    422421    WERROR CreateInstanceEnum(
    423         [in] BSTR strFilter,          // allow more things than a class name
     422        [in] BSTR strFilter,          /* allow more things than a class name */
    424423        [in] long lFlags,
    425424        [in,unique]  IWbemContext* pCtx,
     
    526525
    527526    WERROR GetNames(
    528 //        [in] long lFlags,
    529 //        [out] SAFEARRAY (BSTR)* pNames
     527/*        [in] long lFlags, */
     528/*        [out] SAFEARRAY (BSTR)* pNames */
    530529        );
    531530
     
    533532
    534533    WERROR Next(
    535 //        [in]  long lFlags,
    536 //        [out] BSTR* pstrName,
    537 //        [out] VARIANT* pValue
     534/*        [in]  long lFlags, */
     535/*        [out] BSTR* pstrName, */
     536/*        [out] VARIANT* pValue */
    538537        );
    539538
     
    542541
    543542    WERROR SetValue(
    544 //        [in, string] LPCWSTR wszName,
    545 //        [in] long lFlags
    546 //        [in] VARIANT* pValue
     543/*        [in, string] LPCWSTR wszName, */
     544/*        [in] long lFlags */
     545/*        [in] VARIANT* pValue */
    547546        );
    548547
    549548    WERROR GetValue(
    550 //        [in, string] LPCWSTR wszName,
    551 //        [in] long lFlags,
    552 //        [out] VARIANT* pValue
     549/*        [in, string] LPCWSTR wszName, */
     550/*        [in] long lFlags, */
     551/*        [out] VARIANT* pValue */
    553552        );
    554553
    555554    WERROR DeleteValue(
    556 //        [in, string] LPCWSTR wszName,
    557 //        [in] long lFlags
     555/*        [in, string] LPCWSTR wszName, */
     556/*        [in] long lFlags */
    558557        );
    559558
     
    614613
    615614        typedef [relative_base] struct {
    616                 //      [relative] WBEMDATA4 *data; /* 0x9 */
     615                /*      [relative] WBEMDATA4 *data; */ /* 0x9 */
    617616                uint32 data_size;
    618617                uint8 wtype;
     
    654653                [out,ref] uint32 *puReturned,
    655654                [out,ref] uint32 *pSize,
    656                 [out,ref,noprint,size_is(,*pSize)] uint8 **pData
     655                [out,ref,size_is(,*pSize)] uint8 **pData
    657656                );
    658657}
     
    670669[
    671670        object,
    672         //      restricted,
     671        /*      restricted, */
    673672        uuid(44aca675-e8fc-11d0-a07c-00c04fb68820)
    674673] interface IWbemCallResult : IUnknown
  • trunk/server/librpc/idl/xattr.idl

    r414 r745  
    1515  version(0.0),
    1616  helper("../librpc/ndr/ndr_xattr.h"),
     17  pyhelper("librpc/ndr/py_xattr.c"),
    1718  pointer_default(unique)
    1819]
Note: See TracChangeset for help on using the changeset viewer.