forked from samba-team/samba
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdrsuapi.idl
1902 lines (1683 loc) · 65.3 KB
/
drsuapi.idl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#include "idl_types.h"
import "security.idl", "misc.idl", "lsa.idl", "samr.idl";
[
uuid("e3514235-4b06-11d1-ab04-00c04fc2dcd2"),
version(4.0),
endpoint("ncacn_np:[\\pipe\\lsass]","ncacn_np:[\\pipe\\protected_storage]", "ncacn_ip_tcp:", "ncalrpc:"),
authservice("ldap"),
helpstring("Active Directory Replication"),
helper("../librpc/ndr/ndr_drsuapi.h"),
pointer_default(unique)
]
interface drsuapi
{
typedef bitmap security_GroupAttrs security_GroupAttrs;
/* see MS-DRSR section 5.39 */
typedef [public,bitmap32bit] bitmap {
DRSUAPI_DRS_ASYNC_OP = 0x00000001,
DRSUAPI_DRS_GETCHG_CHECK = 0x00000002,
DRSUAPI_DRS_UPDATE_NOTIFICATION = 0x00000002,
DRSUAPI_DRS_ADD_REF = 0x00000004,
DRSUAPI_DRS_SYNC_ALL = 0x00000008,
DRSUAPI_DRS_DEL_REF = 0x00000008,
DRSUAPI_DRS_WRIT_REP = 0x00000010,
DRSUAPI_DRS_INIT_SYNC = 0x00000020,
DRSUAPI_DRS_PER_SYNC = 0x00000040,
DRSUAPI_DRS_MAIL_REP = 0x00000080,
DRSUAPI_DRS_ASYNC_REP = 0x00000100,
DRSUAPI_DRS_IGNORE_ERROR = 0x00000100,
DRSUAPI_DRS_TWOWAY_SYNC = 0x00000200,
DRSUAPI_DRS_CRITICAL_ONLY = 0x00000400,
DRSUAPI_DRS_GET_ANC = 0x00000800,
DRSUAPI_DRS_GET_NC_SIZE = 0x00001000,
DRSUAPI_DRS_LOCAL_ONLY = 0x00001000,
DRSUAPI_DRS_NONGC_RO_REP = 0x00002000,
DRSUAPI_DRS_SYNC_BYNAME = 0x00004000,
DRSUAPI_DRS_REF_OK = 0x00004000,
DRSUAPI_DRS_FULL_SYNC_NOW = 0x00008000,
DRSUAPI_DRS_NO_SOURCE = 0x00008000,
DRSUAPI_DRS_FULL_SYNC_IN_PROGRESS = 0x00010000,
DRSUAPI_DRS_FULL_SYNC_PACKET = 0x00020000,
DRSUAPI_DRS_SYNC_REQUEUE = 0x00040000,
DRSUAPI_DRS_SYNC_URGENT = 0x00080000,
DRSUAPI_DRS_REF_GCSPN = 0x00100000,
DRSUAPI_DRS_NO_DISCARD = 0x00100000,
DRSUAPI_DRS_NEVER_SYNCED = 0x00200000,
DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING = 0x00400000,
DRSUAPI_DRS_INIT_SYNC_NOW = 0x00800000,
DRSUAPI_DRS_PREEMPTED = 0x01000000,
DRSUAPI_DRS_SYNC_FORCED = 0x02000000,
DRSUAPI_DRS_DISABLE_AUTO_SYNC = 0x04000000,
DRSUAPI_DRS_DISABLE_PERIODIC_SYNC = 0x08000000,
DRSUAPI_DRS_USE_COMPRESSION = 0x10000000,
DRSUAPI_DRS_NEVER_NOTIFY = 0x20000000,
DRSUAPI_DRS_SYNC_PAS = 0x40000000,
DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP = 0x80000000
} drsuapi_DrsOptions;
typedef [public,bitmap32bit] bitmap {
DRSUAPI_DRS_GET_TGT = 0x00000001
} drsuapi_DrsMoreOptions;
/* see DRS_MSG_REPMOD_V1 */
typedef [public,bitmap32bit] bitmap {
DRSUAPI_DRS_UPDATE_FLAGS = 0x00000001,
DRSUAPI_DRS_UPDATE_ADDRESS = 0x00000002,
DRSUAPI_DRS_UPDATE_SCHEDULE = 0x00000004
} drsuapi_DrsUpdate;
/*****************/
/* Function 0x00 drsuapi_DsBind() */
/* MS-DRSR 5.39 DRS_EXTENSIONS_INT */
typedef [bitmap32bit] bitmap {
DRSUAPI_SUPPORTED_EXTENSION_BASE = 0x00000001,
DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION = 0x00000002,
DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI = 0x00000004,
DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2 = 0x00000008,
DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS = 0x00000010,
DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1 = 0x00000020,
DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION = 0x00000040,
DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY = 0x00000080,
DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE = 0x00000100,
DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2 = 0x00000200,
DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION = 0x00000400,
DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2 = 0x00000800,
DRSUAPI_SUPPORTED_EXTENSION_INSTANCE_TYPE_NOT_REQ_ON_MOD= 0x00001000,
DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND = 0x00002000,
DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO = 0x00004000,
DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION = 0x00008000,
DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01 = 0x00010000,
DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP = 0x00020000,
DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY = 0x00040000,
DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3 = 0x00080000,
DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V5 = 0x00100000,
DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2 = 0x00200000,
DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6 = 0x00400000,
DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS = 0x00800000,
DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8 = 0x01000000,
DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5 = 0x02000000,
DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6 = 0x04000000,
/*
* the following 3 have the same value
* repadmin.exe /bind says that
*/
DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3 = 0x08000000,
DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7 = 0x08000000,
DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT = 0x08000000,
DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS = 0x10000000,
DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V10 = 0x20000000,
DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART2 = 0x40000000,
DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART3 = 0x80000000
} drsuapi_SupportedExtensions;
typedef [bitmap32bit] bitmap {
DRSUAPI_SUPPORTED_EXTENSION_ADAM = 0x00000001,
DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2 = 0x00000002,
DRSUAPI_SUPPORTED_EXTENSION_RECYCLE_BIN = 0x00000004
} drsuapi_SupportedExtensionsExt;
/* this is used by w2k */
typedef [public] struct {
drsuapi_SupportedExtensions supported_extensions;
GUID site_guid;
uint32 pid;
} drsuapi_DsBindInfo24;
/* this is used by w2k3 */
typedef [public] struct {
drsuapi_SupportedExtensions supported_extensions;
GUID site_guid;
uint32 pid;
uint32 repl_epoch;
} drsuapi_DsBindInfo28;
typedef [public] struct {
drsuapi_SupportedExtensions supported_extensions;
GUID site_guid;
uint32 pid;
uint32 repl_epoch;
drsuapi_SupportedExtensionsExt supported_extensions_ext;
} drsuapi_DsBindInfo32;
/* this is used by w2k8 */
typedef [public] struct {
drsuapi_SupportedExtensions supported_extensions;
GUID site_guid;
uint32 pid;
uint32 repl_epoch;
drsuapi_SupportedExtensionsExt supported_extensions_ext;
GUID config_dn_guid;
} drsuapi_DsBindInfo48;
/* this is used by w2k12 R2 [MS-DRSR] Section 5.39 */
typedef [public] struct {
drsuapi_SupportedExtensions supported_extensions;
GUID site_guid;
uint32 pid;
uint32 repl_epoch;
drsuapi_SupportedExtensionsExt supported_extensions_ext;
GUID config_dn_guid;
drsuapi_SupportedExtensionsExt supported_capabilities_ext;
} drsuapi_DsBindInfo52;
typedef [public] struct {
[flag(NDR_REMAINING)] DATA_BLOB info;
} drsuapi_DsBindInfoFallBack;
typedef [nopull, nopush, noprint] [nodiscriminant] union {
[case(24)][subcontext(0), subcontext_size(24)] drsuapi_DsBindInfo24 info24;
[case(28)][subcontext(0), subcontext_size(28)] drsuapi_DsBindInfo28 info28;
[case(32)][subcontext(0), subcontext_size(32)] drsuapi_DsBindInfo32 info32;
[case(48)][subcontext(0), subcontext_size(48)] drsuapi_DsBindInfo48 info48;
[case(52)][subcontext(0), subcontext_size(52)] drsuapi_DsBindInfo52 info52;
/*
* The size for the defaut case is a bit arbitrary it in fact the value
* of the switch but we can't reference it.
* As we hand(un-)marshall this structure it has 0 impact and makes
* pidl happy for wireshark too
*/
[default][subcontext(0), subcontext_size(48)] drsuapi_DsBindInfoFallBack Fallback;
} drsuapi_DsBindInfo;
/* the drsuapi_DsBindInfoCtr was this before
* typedef [flag(NDR_PAHEX)] struct {
* [range(1,10000)] uint32 length;
* [size_is(length)] uint8 data[];
* } drsuapi_DsBindInfo;
*
* but we don't want the caller to manually decode this blob,
* so we're doing it here
*/
/*
* MS-DRSR.pdf gives the following definition
typedef struct {
[range(1,10000)] DWORD cb;
[size_is(cb)] BYTE rgb[];
} DRS_EXTENSIONS;
But we use a subcontext which has a slighly different signification on how
data are laid out.
With the MS-DRSR definition we will have
size_is_cb cv rgb_array
with size_is_cb being a uint3264 and cv being a uint32
We used to have
typedef struct {
[range(1,10000)] uint32 length;
[switch_is(length)] drsuapi_DsBindInfo info;
} drsuapi_DsBindInfoCtr;
typedef [nodiscriminant] union {
[case(24)][subcontext(4)] drsuapi_DsBindInfo24 info24;
[case(28)][subcontext(4)] drsuapi_DsBindInfo28 info28;
[case(48)][subcontext(4)] drsuapi_DsBindInfo48 info48;
[default][subcontext(4)] drsuapi_DsBindInfoFallBack FallBack;
} drsuapi_DsBindInfo;
With this definition data is laid out this way:
length subcontext_size drsuapi_DsBindInfoxx
with length being a uint32 and subcontext_size being a uint3264
It has clearly an impact on the way things are aligned when using NDR64
*/
typedef [flag(NDR_NOALIGN)] struct {
[range(1,10000)] uint3264 length;
[value(length)] uint32 __ndr_length;
[switch_is(length)] drsuapi_DsBindInfo info;
} drsuapi_DsBindInfoCtr;
/* this is a magic guid you need to pass to DsBind to make drsuapi_DsWriteAccountSpn() work
*
* maybe the bind_guid could also be the invocation_id see drsuapi_DsReplicaConnection04
*/
const char *DRSUAPI_DS_BIND_GUID = "e24d201a-4fd6-11d1-a3da-0000f875ae0d";
/*
* this magic guid are needed to fetch the whole tree with drsuapi_DsGetNCChanges()
* as administrator and this values are also used in the destination_dsa_guid field
* of drsuapi_DsGetNCChangesReq5/8 and the source_dsa_guid is zero.
*/
const char *DRSUAPI_DS_BIND_GUID_W2K = "6abec3d1-3054-41c8-a362-5a0c5b7d5d71";
const char *DRSUAPI_DS_BIND_GUID_W2K3 = "6afab99c-6e26-464a-975f-f58f105218bc";
[public] WERROR drsuapi_DsBind(
[in,unique] GUID *bind_guid,
[in,out,unique] drsuapi_DsBindInfoCtr *bind_info,
[out] policy_handle *bind_handle
);
/*****************/
/* Function 0x01 */
WERROR drsuapi_DsUnbind(
[in,out] policy_handle *bind_handle
);
/*****************/
/* Function 0x02 */
typedef [public,gensize] struct {
[value(ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->flags)-4)] uint32 __ndr_size;
[value(ndr_size_dom_sid28(&sid, ndr->flags))] uint32 __ndr_size_sid;
GUID guid;
dom_sid28 sid;
[value(strlen_m(dn))] uint32 __ndr_size_dn;
[charset(UTF16),size_is(__ndr_size_dn+1)] uint16 dn[];
} drsuapi_DsReplicaObjectIdentifier;
typedef struct {
[ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
GUID source_dsa_guid;
[charset(DOS),string] char *source_dsa_dns; /* Source DSA dns_name in <guid>._msdcs.<domain_dns> form */
drsuapi_DrsOptions options;
} drsuapi_DsReplicaSyncRequest1;
typedef [switch_type(uint32)] union {
[case(1)] drsuapi_DsReplicaSyncRequest1 req1;
} drsuapi_DsReplicaSyncRequest;
WERROR drsuapi_DsReplicaSync(
[in] policy_handle *bind_handle,
[in] uint32 level,
[in,switch_is(level)] drsuapi_DsReplicaSyncRequest *req
);
/*****************/
/* Function 0x03 */
typedef [public] struct {
hyper tmp_highest_usn; /* updated after each object update */
hyper reserved_usn;
hyper highest_usn; /* updated after a full replication cycle */
} drsuapi_DsReplicaHighWaterMark;
typedef [public] struct {
GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
hyper highest_usn; /* updated after a full replication cycle */
} drsuapi_DsReplicaCursor;
typedef struct {
[value(1)] uint32 version;
[value(0)] uint32 reserved1;
[range(0,0x100000)] uint32 count;
[value(0)] uint32 reserved2;
[size_is(count)] drsuapi_DsReplicaCursor cursors[];
} drsuapi_DsReplicaCursorCtrEx;
typedef [flag(NDR_PAHEX),v1_enum] enum {
DRSUAPI_EXOP_NONE = 0x00000000,
DRSUAPI_EXOP_FSMO_REQ_ROLE = 0x00000001,
DRSUAPI_EXOP_FSMO_RID_ALLOC = 0x00000002,
DRSUAPI_EXOP_FSMO_RID_REQ_ROLE = 0x00000003,
DRSUAPI_EXOP_FSMO_REQ_PDC = 0x00000004,
DRSUAPI_EXOP_FSMO_ABANDON_ROLE = 0x00000005,
DRSUAPI_EXOP_REPL_OBJ = 0x00000006,
DRSUAPI_EXOP_REPL_SECRET = 0x00000007
} drsuapi_DsExtendedOperation;
typedef [flag(NDR_PAHEX),v1_enum] enum {
DRSUAPI_EXOP_ERR_NONE = 0x00000000,
DRSUAPI_EXOP_ERR_SUCCESS = 0x00000001,
DRSUAPI_EXOP_ERR_UNKNOWN_OP = 0x00000002,
DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER = 0x00000003,
DRSUAPI_EXOP_ERR_UPDATE_ERR = 0x00000004,
DRSUAPI_EXOP_ERR_EXCEPTION = 0x00000005,
DRSUAPI_EXOP_ERR_UNKNOWN_CALLER = 0x00000006,
DRSUAPI_EXOP_ERR_RID_ALLOC = 0x00000007,
DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED = 0x00000008,
DRSUAPI_EXOP_ERR_FMSO_PENDING_OP = 0x00000009,
DRSUAPI_EXOP_ERR_MISMATCH = 0x0000000A,
DRSUAPI_EXOP_ERR_COULDNT_CONTACT = 0x0000000B,
DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES = 0x0000000C,
DRSUAPI_EXOP_ERR_DIR_ERROR = 0x0000000D,
DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS = 0x0000000E,
DRSUAPI_EXOP_ERR_ACCESS_DENIED = 0x0000000F,
DRSUAPI_EXOP_ERR_PARAM_ERROR = 0x00000010
} drsuapi_DsExtendedError;
typedef struct {
GUID destination_dsa_guid;
GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
[ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
drsuapi_DsReplicaHighWaterMark highwatermark;
drsuapi_DsReplicaCursorCtrEx *uptodateness_vector;
drsuapi_DrsOptions replica_flags;
uint32 max_object_count; /* w2k3 uses min(133,max(100,max_object_count)) */
uint32 max_ndr_size; /* w2k3 seems to ignore this */
drsuapi_DsExtendedOperation extended_op;
hyper fsmo_info;
} drsuapi_DsGetNCChangesRequest5;
/*
* In DRSUAPI all attributes with syntax 2.5.5.2
* are identified by uint32 values
*
* the following table shows the mapping used between the two representations
* e.g. - objectClass 'nTDSDSA' has governsID: 1.2.840.113556.1.5.7000.47
* and a UINT32-ID of '0x0017002F'.
* - so the OID 1.2.840.113556.1.5.7000.47 is splitted into a
* OID-prefix: 1.2.840.113556.1.5.7000
* and a value: 47 => 0x2F
* - the mapping table gives a UINT32-prefix: 0x00170000
* - and the UINT32-ID is 0x0017002F = 0x00170000 | 0x2F
*
* This prefix mapping table is replied in the drsuapi_DsReplicaOIDMapping_Ctr
* array. The following are the default mappings of w2k3
*
* OID-prefix => UINT32-Id prefix
*
* 2.5.4.* => 0x00000000 (standard attributes RFC2256 core.schema)
* 2.5.6.* => 0x00010000 (standard object classes RFC2256 core.schema)
* 1.2.840.113556.1.2.* => 0x00020000
* 1.2.840.113556.1.3.* => 0x00030000
* 2.5.5.* => 0x00080000 (attributeSyntax OID's)
* 1.2.840.113556.1.4.* => 0x00090000
* 1.2.840.113556.1.5.* => 0x000A0000
* 2.16.840.1.113730.3.* => 0x00140000
* 0.9.2342.19200300.100.1.* => 0x00150000
* 2.16.840.1.113730.3.1.* => 0x00160000
* 1.2.840.113556.1.5.7000.* => 0x00170000
* 2.5.21.* => 0x00180000 (attrs for SubSchema)
* 2.5.18.* => 0x00190000 (createTimeStamp,modifyTimeStamp, SubSchema)
* 2.5.20.* => 0x001A0000
* 1.3.6.1.4.1.1466.101.119.* => 0x001B0000 (dynamicObject, entryTTL)
* 2.16.840.1.113730.3.2.* => 0x001C0000
* 1.3.6.1.4.1.250.1.* => 0x001D0000
* 1.2.840.113549.1.9.* => 0x001E0000 (unstructuredAddress,unstructuredName)
* 0.9.2342.19200300.100.4.* => 0x001F0000
*
* Here's a list of used 'attributeSyntax' OID's
*
* 2.5.5.1 => Object(DS-DN) string
* struct drsuapi_DsObjectIdentifier3
*
* 2.5.5.2 => OID-string
* => all values are represented as uint32 values in drsuapi
* => governsID, attributeID and attributeSyntax returned as OID-Strings in LDAP
* => mayContain, mustContain and all other attributes with 2.5.5.2 syntax
* are returned as attribute names
*
* 2.5.5.4 => String(Teletex) case-insensitive string with teletex charset
*
* 2.5.5.5 => String(IA5) case-sensitive string
*
* 2.5.5.6 => String(Numeric)
* => eg. internationalISDNNumber
*
* 2.5.5.7 => Object(DN-Binary) B:<byte count>:<bytes>:<object DN>
* => e.g. wellKnownObjects
*
* 2.5.5.8 => BOOL
*
* 2.5.5.9 => int32
*
* 2.5.5.10 => DATA_BLOB
* => struct GUID
*
* 2.5.5.11 => LDAP timestring
* => NTTIME_1sec
*
* 2.5.5.12 => String(Unicode) case-insensitive string
* => 'standard strings'
*
* 2.5.5.13 => Object(Presentation-Address) string
* => used in objectClass applicationEntity
*
* 2.5.5.14 => Object(DN-String) S:<char count>:<string>:<object DN>
* => not used
*
* 2.5.5.15 => ntSecurityDescriptor
*
* 2.5.5.16 => int64
*
* 2.5.5.17 => dom_sid
*/
typedef [noprint] struct {
[range(0,10000)] uint32 length;
[size_is(length)] uint8 *binary_oid; /* partial-binary-OID encoded with asn1_write_partial_OID_String() */
} drsuapi_DsReplicaOID;
typedef struct {
uint32 id_prefix;
drsuapi_DsReplicaOID oid;
} drsuapi_DsReplicaOIDMapping;
typedef [public] struct {
[range(0,0x100000)] uint32 num_mappings;
[size_is(num_mappings)] drsuapi_DsReplicaOIDMapping *mappings;
} drsuapi_DsReplicaOIDMapping_Ctr;
typedef [flag(NDR_PAHEX),v1_enum] enum {
DRSUAPI_OBJECTCLASS_top = 0x00010000,
DRSUAPI_OBJECTCLASS_classSchema = 0x0003000d,
DRSUAPI_OBJECTCLASS_attributeSchema = 0x0003000e
} drsuapi_DsObjectClassId;
typedef [flag(NDR_PAHEX),v1_enum,public] enum {
DRSUAPI_ATTID_objectClass = 0x00000000,
DRSUAPI_ATTID_cn = 0x00000003,
DRSUAPI_ATTID_ou = 0x0000000b,
DRSUAPI_ATTID_description = 0x0000000d,
DRSUAPI_ATTID_member = 0x0000001f,
DRSUAPI_ATTID_distinguishedName = 0x00000031,
DRSUAPI_ATTID_instanceType = 0x00020001,
DRSUAPI_ATTID_whenCreated = 0x00020002,
DRSUAPI_ATTID_possSuperiors = 0x00020008,
DRSUAPI_ATTID_displayName = 0x0002000d,
DRSUAPI_ATTID_hasMasterNCs = 0x0002000e,
DRSUAPI_ATTID_nCName = 0x00020010,
DRSUAPI_ATTID_subClassOf = 0x00020015,
DRSUAPI_ATTID_governsID = 0x00020016,
DRSUAPI_ATTID_mustContain = 0x00020018,
DRSUAPI_ATTID_mayContain = 0x00020019,
DRSUAPI_ATTID_rDNAttId = 0x0002001A,
DRSUAPI_ATTID_attributeID = 0x0002001e,
DRSUAPI_ATTID_attributeSyntax = 0x00020020,
DRSUAPI_ATTID_isSingleValued = 0x00020021,
DRSUAPI_ATTID_rangeLower = 0x00020022,
DRSUAPI_ATTID_rangeUpper = 0x00020023,
DRSUAPI_ATTID_dMDLocation = 0x00020024,
DRSUAPI_ATTID_isDeleted = 0x00020030,
DRSUAPI_ATTID_objectVersion = 0x0002004c,
DRSUAPI_ATTID_invocationId = 0x00020073,
DRSUAPI_ATTID_showInAdvancedViewOnly = 0x000200a9,
DRSUAPI_ATTID_adminDisplayName = 0x000200c2,
DRSUAPI_ATTID_adminDescription = 0x000200e2,
DRSUAPI_ATTID_oMSyntax = 0x000200e7,
DRSUAPI_ATTID_ntSecurityDescriptor = 0x00020119,
DRSUAPI_ATTID_searchFlags = 0x0002014e,
DRSUAPI_ATTID_auxiliaryClass = 0x0002015f,
DRSUAPI_ATTID_lDAPDisplayName = 0x000201cc,
DRSUAPI_ATTID_name = 0x00090001,
DRSUAPI_ATTID_objectGUID = 0x00090002,
DRSUAPI_ATTID_replPropertyMetaData = 0x00090003,
DRSUAPI_ATTID_userAccountControl = 0x00090008,
DRSUAPI_ATTID_badPwdCount = 0x0009000c,
DRSUAPI_ATTID_codePage = 0x00090010,
DRSUAPI_ATTID_countryCode = 0x00090019,
DRSUAPI_ATTID_currentValue = 0x0009001b,
DRSUAPI_ATTID_homeDirectory = 0x0009002c,
DRSUAPI_ATTID_homeDrive = 0x0009002d,
DRSUAPI_ATTID_lastLogoff = 0x00090033,
DRSUAPI_ATTID_lastLogon = 0x00090034,
DRSUAPI_ATTID_dBCSPwd = 0x00090037,/* lmPwdHash */
DRSUAPI_ATTID_scriptPath = 0x0009003e,
DRSUAPI_ATTID_logonHours = 0x00090040,
DRSUAPI_ATTID_userWorkstations = 0x00090056,
DRSUAPI_ATTID_unicodePwd = 0x0009005a,/* ntPwdHash */
DRSUAPI_ATTID_ntPwdHistory = 0x0009005e,
DRSUAPI_ATTID_pwdLastSet = 0x00090060,
DRSUAPI_ATTID_primaryGroupID = 0x00090062,
DRSUAPI_ATTID_priorValue = 0x00090064,
DRSUAPI_ATTID_supplementalCredentials = 0x0009007d,
DRSUAPI_ATTID_trustAuthIncoming = 0x00090081,
DRSUAPI_ATTID_trustAuthOutgoing = 0x00090087,
DRSUAPI_ATTID_userParameters = 0x0009008a,
DRSUAPI_ATTID_profilePath = 0x0009008b,
DRSUAPI_ATTID_operatorCount = 0x00090090,
DRSUAPI_ATTID_objectSid = 0x00090092,
DRSUAPI_ATTID_schemaIDGUID = 0x00090094,
DRSUAPI_ATTID_adminCount = 0x00090096,
DRSUAPI_ATTID_comment = 0x0009009C,/* User-Comment */
DRSUAPI_ATTID_accountExpires = 0x0009009f,
DRSUAPI_ATTID_lmPwdHistory = 0x000900a0,
DRSUAPI_ATTID_logonCount = 0x000900a9,
DRSUAPI_ATTID_systemPossSuperiors = 0x000900c3,
DRSUAPI_ATTID_systemMayContain = 0x000900c4,
DRSUAPI_ATTID_systemMustContain = 0x000900c5,
DRSUAPI_ATTID_systemAuxiliaryClass = 0x000900c6,
DRSUAPI_ATTID_sAMAccountName = 0x000900dd,
DRSUAPI_ATTID_sAMAccountType = 0x0009012e,
DRSUAPI_ATTID_options = 0x00090133,
DRSUAPI_ATTID_fSMORoleOwner = 0x00090171,
DRSUAPI_ATTID_systemFlags = 0x00090177,
DRSUAPI_ATTID_serverReference = 0x00090203,
DRSUAPI_ATTID_serverReferenceBL = 0x00090204,
DRSUAPI_ATTID_nonSecurityMember = 0x00090212,
DRSUAPI_ATTID_initialAuthIncoming = 0x0009021b,
DRSUAPI_ATTID_initialAuthOutgoing = 0x0009021c,
DRSUAPI_ATTID_wellKnownObjects = 0x0009026a,
DRSUAPI_ATTID_dNSHostName = 0x0009026b,
DRSUAPI_ATTID_isMemberOfPartialAttributeSet = 0x0009027f,
DRSUAPI_ATTID_managedBy = 0x0009028d,
DRSUAPI_ATTID_userPrincipalName = 0x00090290,
DRSUAPI_ATTID_groupType = 0x000902ee,
DRSUAPI_ATTID_servicePrincipalName = 0x00090303,
DRSUAPI_ATTID_lastKnownParent = 0x0009030d,
DRSUAPI_ATTID_objectCategory = 0x0009030e,
DRSUAPI_ATTID_gPLink = 0x0009037b,
DRSUAPI_ATTID_transportAddressAttribute = 0x0009037f,
DRSUAPI_ATTID_schemaInfo = 0x0009054e,
DRSUAPI_ATTID_msDS_Behavior_Version = 0x000905b3,
DRSUAPI_ATTID_msDS_KeyVersionNumber = 0x000906f6,
DRSUAPI_ATTID_msDS_NonMembers = 0x00090701,
DRSUAPI_ATTID_msDS_MembersForAzRole = 0x0009070e,
DRSUAPI_ATTID_msDS_HasDomainNCs = 0x0009071c,
DRSUAPI_ATTID_msDS_hasMasterNCs = 0x0009072c,
DRSUAPI_ATTID_msDS_NeverRevealGroup = 0x00090786,
DRSUAPI_ATTID_msDS_RevealOnDemandGroup = 0x00090788,
DRSUAPI_ATTID_msDS_HostServiceAccount = 0x00090808,
DRSUAPI_ATTID_isRecycled = 0x0009080a,
DRSUAPI_ATTID_INVALID = 0xFFFFFFFF
} drsuapi_DsAttributeId;
typedef struct {
[value(1)] uint32 version;
[value(0)] uint32 reserved1;
[range(1,0x100000)] uint32 num_attids;
[size_is(num_attids)] drsuapi_DsAttributeId attids[];
} drsuapi_DsPartialAttributeSet;
typedef [public] struct {
GUID destination_dsa_guid;
GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
[ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
drsuapi_DsReplicaHighWaterMark highwatermark;
drsuapi_DsReplicaCursorCtrEx *uptodateness_vector;
drsuapi_DrsOptions replica_flags;
uint32 max_object_count; /* w2k3 uses min(133,max(100,max_object_count)) */
uint32 max_ndr_size; /* w2k3 seems to ignore this */
drsuapi_DsExtendedOperation extended_op;
hyper fsmo_info;
drsuapi_DsPartialAttributeSet *partial_attribute_set;
drsuapi_DsPartialAttributeSet *partial_attribute_set_ex;
drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr;
} drsuapi_DsGetNCChangesRequest8;
typedef [public] struct {
GUID destination_dsa_guid;
GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
[ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
drsuapi_DsReplicaHighWaterMark highwatermark;
drsuapi_DsReplicaCursorCtrEx *uptodateness_vector;
drsuapi_DrsOptions replica_flags;
uint32 max_object_count; /* w2k3 uses min(133,max(100,max_object_count)) */
uint32 max_ndr_size; /* w2k3 seems to ignore this */
drsuapi_DsExtendedOperation extended_op;
hyper fsmo_info;
drsuapi_DsPartialAttributeSet *partial_attribute_set;
drsuapi_DsPartialAttributeSet *partial_attribute_set_ex;
drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr;
drsuapi_DrsMoreOptions more_flags;
} drsuapi_DsGetNCChangesRequest10;
typedef [switch_type(uint32)] union {
[case(5)] drsuapi_DsGetNCChangesRequest5 req5;
[case(8)] drsuapi_DsGetNCChangesRequest8 req8;
[case(10)] drsuapi_DsGetNCChangesRequest10 req10;
} drsuapi_DsGetNCChangesRequest;
typedef [public] struct {
GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
hyper highest_usn; /* updated after a full replication cycle */
NTTIME last_sync_success;
} drsuapi_DsReplicaCursor2;
typedef struct {
[value(2)] uint32 version;
[value(0)] uint32 reserved1;
[range(0,0x100000)] uint32 count;
[value(0)] uint32 reserved2;
[size_is(count)] drsuapi_DsReplicaCursor2 cursors[];
} drsuapi_DsReplicaCursor2CtrEx;
/* Generic DATA_BLOB values */
typedef struct {
[range(0,26214400),value(ndr_size_DATA_BLOB(0,blob,0))] uint32 __ndr_size;
DATA_BLOB *blob;
} drsuapi_DsAttributeValue;
typedef struct {
[range(0,10485760)] uint32 num_values;
[size_is(num_values)] drsuapi_DsAttributeValue *values;
} drsuapi_DsAttributeValueCtr;
/* DN String values */
typedef [public,gensize] struct {
[value(ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->flags))] uint32 __ndr_size;
[value(ndr_size_dom_sid28(&sid,ndr->flags))] uint32 __ndr_size_sid;
GUID guid;
dom_sid28 sid;
[value(strlen_m(dn))] uint32 __ndr_size_dn;
[charset(UTF16)] uint16 dn[__ndr_size_dn+1];
} drsuapi_DsReplicaObjectIdentifier3;
typedef [public] struct {
[value(ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary_without_Binary(r, ndr->flags))] uint32 __ndr_size;
[value(ndr_size_dom_sid28(&sid,ndr->flags))] uint32 __ndr_size_sid;
GUID guid;
dom_sid28 sid;
[value(strlen_m(dn))] uint32 __ndr_size_dn;
[charset(UTF16)] uint16 dn[__ndr_size_dn+1];
[value(binary.length + 4)] uint32 __ndr_size_binary;
[flag(NDR_REMAINING)] DATA_BLOB binary;
} drsuapi_DsReplicaObjectIdentifier3Binary;
typedef [public,noprint] struct {
drsuapi_DsAttributeId attid;
drsuapi_DsAttributeValueCtr value_ctr;
} drsuapi_DsReplicaAttribute;
typedef struct {
[range(0,1048576)] uint32 num_attributes;
[size_is(num_attributes)] drsuapi_DsReplicaAttribute *attributes;
} drsuapi_DsReplicaAttributeCtr;
typedef [public] bitmap {
DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER = 0x00000001,
DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC = 0x00000002,
DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY = 0x00010000
} drsuapi_DsReplicaObjectFlags;
typedef [public] struct {
drsuapi_DsReplicaObjectIdentifier *identifier;
drsuapi_DsReplicaObjectFlags flags;
drsuapi_DsReplicaAttributeCtr attribute_ctr;
} drsuapi_DsReplicaObject;
typedef struct {
uint32 version;
NTTIME_1sec originating_change_time;
GUID originating_invocation_id;
hyper originating_usn;
} drsuapi_DsReplicaMetaData;
typedef [public] struct {
[range(0,1048576)] uint32 count;
[size_is(count)] drsuapi_DsReplicaMetaData meta_data[];
} drsuapi_DsReplicaMetaDataCtr;
typedef [public,noprint] struct {
drsuapi_DsReplicaObjectListItemEx *next_object;
drsuapi_DsReplicaObject object;
boolean32 is_nc_prefix;
GUID *parent_object_guid;
drsuapi_DsReplicaMetaDataCtr *meta_data_ctr;
} drsuapi_DsReplicaObjectListItemEx;
typedef [public,gensize] struct {
GUID source_dsa_guid; /* the 'objectGUID' field of the CN=NTDS Settings object */
GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
drsuapi_DsReplicaObjectIdentifier *naming_context;
drsuapi_DsReplicaHighWaterMark old_highwatermark;
drsuapi_DsReplicaHighWaterMark new_highwatermark;
drsuapi_DsReplicaCursorCtrEx *uptodateness_vector;
drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr;
drsuapi_DsExtendedError extended_ret; /* w2k sends the nc_object_count value here */
uint32 object_count;
/* this +55 is sometimes +56, so I don't know where this comes from... --metze */
[value(ndr_size_drsuapi_DsGetNCChangesCtr1(r,ndr->flags)+55)] uint32 __ndr_size;
drsuapi_DsReplicaObjectListItemEx *first_object;
boolean32 more_data;
} drsuapi_DsGetNCChangesCtr1;
/*
* if the DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE flag
* isn't there it means the value is deleted
*/
typedef [public] bitmap {
DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE = 0x00000001
} drsuapi_DsLinkedAttributeFlags;
typedef [public] struct {
drsuapi_DsReplicaObjectIdentifier *identifier;
drsuapi_DsAttributeId attid;
drsuapi_DsAttributeValue value;
drsuapi_DsLinkedAttributeFlags flags;
NTTIME_1sec originating_add_time;
drsuapi_DsReplicaMetaData meta_data;
} drsuapi_DsReplicaLinkedAttribute;
/* [MS-DRSR] section 4.1.10.2.11 DRS_MSG_GETCHGREPLY_V6 */
typedef [public,gensize] struct {
GUID source_dsa_guid; /* the 'objectGUID' field of the CN=NTDS Settings object */
GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
drsuapi_DsReplicaObjectIdentifier *naming_context;
drsuapi_DsReplicaHighWaterMark old_highwatermark;
drsuapi_DsReplicaHighWaterMark new_highwatermark;
drsuapi_DsReplicaCursor2CtrEx *uptodateness_vector;
drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr;
drsuapi_DsExtendedError extended_ret;
uint32 object_count;
/* this +55 is sometimes +56, so I don't know where this comes from... --metze */
[value(ndr_size_drsuapi_DsGetNCChangesCtr6(r,ndr->flags)+55)] uint32 __ndr_size;
drsuapi_DsReplicaObjectListItemEx *first_object;
boolean32 more_data;
uint32 nc_object_count; /* estimated amount of objects in the whole NC */
uint32 nc_linked_attributes_count; /* estimated amount of linked values in the whole NC */
[range(0,1048576)] uint32 linked_attributes_count;
[size_is(linked_attributes_count)] drsuapi_DsReplicaLinkedAttribute *linked_attributes;
WERROR drs_error;
} drsuapi_DsGetNCChangesCtr6;
typedef [public] struct {
[subcontext(0xFFFFFC01)] drsuapi_DsGetNCChangesCtr1 ctr1;
} drsuapi_DsGetNCChangesCtr1TS;
typedef [public] struct {
[subcontext(0xFFFFFC01)] drsuapi_DsGetNCChangesCtr6 ctr6;
} drsuapi_DsGetNCChangesCtr6TS;
typedef [nopush] struct {
uint32 decompressed_length;
uint32 compressed_length;
[subcontext(4),subcontext_size(compressed_length),
compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length)]
drsuapi_DsGetNCChangesCtr1TS *ts;
} drsuapi_DsGetNCChangesMSZIPCtr1;
typedef [nopush] struct {
uint32 decompressed_length;
uint32 compressed_length;
[subcontext(4),subcontext_size(compressed_length),
compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length)]
drsuapi_DsGetNCChangesCtr6TS *ts;
} drsuapi_DsGetNCChangesMSZIPCtr6;
typedef [nopush] struct {
uint32 decompressed_length;
uint32 compressed_length;
[subcontext(4),subcontext_size(compressed_length),
compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length)]
drsuapi_DsGetNCChangesCtr1TS *ts;
} drsuapi_DsGetNCChangesXPRESSCtr1;
typedef [nopush] struct {
uint32 decompressed_length;
uint32 compressed_length;
[subcontext(4),subcontext_size(compressed_length),
compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length)]
drsuapi_DsGetNCChangesCtr6TS *ts;
} drsuapi_DsGetNCChangesXPRESSCtr6;
typedef [enum16bit] enum {
DRSUAPI_COMPRESSION_TYPE_MSZIP = 2,
DRSUAPI_COMPRESSION_TYPE_XPRESS = 3
} drsuapi_DsGetNCChangesCompressionType;
typedef [nodiscriminant,flag(NDR_PAHEX)] union {
[case(1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16))] drsuapi_DsGetNCChangesMSZIPCtr1 mszip1;
[case(6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16))] drsuapi_DsGetNCChangesMSZIPCtr6 mszip6;
[case(1|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16))] drsuapi_DsGetNCChangesXPRESSCtr1 xpress1;
[case(6|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16))] drsuapi_DsGetNCChangesXPRESSCtr6 xpress6;
} drsuapi_DsGetNCChangesCompressedCtr;
typedef struct {
drsuapi_DsGetNCChangesMSZIPCtr1 mszip1;
} drsuapi_DsGetNCChangesCtr2;
typedef struct {
[range(0,6)] uint32 level;
[range(2,3)] drsuapi_DsGetNCChangesCompressionType type;
[switch_is(level | (type<<16))] drsuapi_DsGetNCChangesCompressedCtr ctr;
} drsuapi_DsGetNCChangesCtr7;
typedef [switch_type(uint32)] union {
[case(1)] drsuapi_DsGetNCChangesCtr1 ctr1;
[case(2)] drsuapi_DsGetNCChangesCtr2 ctr2;
[case(6)] drsuapi_DsGetNCChangesCtr6 ctr6;
[case(7)] drsuapi_DsGetNCChangesCtr7 ctr7;
} drsuapi_DsGetNCChangesCtr;
WERROR drsuapi_DsGetNCChanges(
[in] policy_handle *bind_handle,
[in] uint32 level,
[in,ref,switch_is(level)] drsuapi_DsGetNCChangesRequest *req,
[out,ref] uint32 *level_out,
[out,ref,switch_is(*level_out)] drsuapi_DsGetNCChangesCtr *ctr
);
/*****************/
/* Function 0x04 */
/* [MS-DRSR] 4.1.26 */
typedef struct {
[ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
[ref,charset(DOS),string] uint8 *dest_dsa_dns_name;
GUID dest_dsa_guid;
drsuapi_DrsOptions options;
} drsuapi_DsReplicaUpdateRefsRequest1;
typedef [switch_type(uint32)] union {
[case(1)] drsuapi_DsReplicaUpdateRefsRequest1 req1;
} drsuapi_DsReplicaUpdateRefsRequest;
WERROR drsuapi_DsReplicaUpdateRefs(
[in] policy_handle *bind_handle,
[in] uint32 level,
[in,switch_is(level)] drsuapi_DsReplicaUpdateRefsRequest req
);
/*****************/
/* Function 0x05 */
typedef struct {
[ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
[charset(UTF16),string] uint16 *source_dsa_address;
uint8 schedule[84];
drsuapi_DrsOptions options;
} drsuapi_DsReplicaAddRequest1;
typedef struct {
[ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
drsuapi_DsReplicaObjectIdentifier *source_dsa_dn;
drsuapi_DsReplicaObjectIdentifier *transport_dn;
[charset(UTF16),string] uint16 *source_dsa_address;
uint8 schedule[84];
drsuapi_DrsOptions options;
} drsuapi_DsReplicaAddRequest2;
typedef [switch_type(uint32)] union {
[case(1)] drsuapi_DsReplicaAddRequest1 req1;
[case(2)] drsuapi_DsReplicaAddRequest2 req2;
} drsuapi_DsReplicaAddRequest;
WERROR drsuapi_DsReplicaAdd(
[in] policy_handle *bind_handle,
[in] uint32 level,
[in,switch_is(level)] drsuapi_DsReplicaAddRequest req
);
/*****************/
/* Function 0x06 */
typedef struct {
[ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
[charset(UTF8), string] uint8 *source_dsa_address;
drsuapi_DrsOptions options;
} drsuapi_DsReplicaDelRequest1;
typedef [switch_type(uint32)] union {
[case(1)] drsuapi_DsReplicaDelRequest1 req1;
} drsuapi_DsReplicaDelRequest;
WERROR drsuapi_DsReplicaDel(
[in] policy_handle *bind_handle,
[in] uint32 level,
[in,switch_is(level)] drsuapi_DsReplicaDelRequest req
);
/*****************/
/* Function 0x07 */
typedef struct {
[ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
GUID source_dra;
[charset(UTF16),string] uint16 *source_dra_address;
uint8 schedule[84];
drsuapi_DrsOptions replica_flags;
uint32 modify_fields;
drsuapi_DrsOptions options;
} drsuapi_DsReplicaModRequest1;
typedef [switch_type(uint32)] union {
[case(1)] drsuapi_DsReplicaModRequest1 req1;
} drsuapi_DsReplicaModRequest;
WERROR drsuapi_DsReplicaMod(
[in] policy_handle *bind_handle,
[in] uint32 level,
[in,switch_is(level)] drsuapi_DsReplicaModRequest req
);
/*****************/
/* Function 0x08 */
[todo] WERROR DRSUAPI_VERIFY_NAMES();
/*****************/
/* Function 0x09 */
/* how are type 4 and 7 different from 2 and 3 ? */
typedef [v1_enum] enum {
DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS = 1,
DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS = 2,
DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS = 3,
DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2 = 4,
DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS = 5,
DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS = 6,
DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2 = 7
} drsuapi_DsMembershipType;
typedef struct {
NTSTATUS status;
[range(0,10000)] uint32 num_memberships;
[range(0,10000)] uint32 num_sids;
[size_is(num_memberships)] drsuapi_DsReplicaObjectIdentifier **info_array;
[size_is(num_memberships)] security_GroupAttrs *group_attrs;
[size_is(num_sids)] dom_sid28 **sids;
} drsuapi_DsGetMembershipsCtr1;
typedef [switch_type(uint32)] union {
[case(1)] drsuapi_DsGetMembershipsCtr1 ctr1;
} drsuapi_DsGetMembershipsCtr;
const int DRSUAPI_DS_MEMBERSHIP_FLAG_GROUP_ATTR = 0x1;
typedef struct {
[range(1,10000)] uint32 count;
[size_is(count)] drsuapi_DsReplicaObjectIdentifier **info_array;
uint32 flags;
[range(1,7)] drsuapi_DsMembershipType type;
drsuapi_DsReplicaObjectIdentifier *domain;
} drsuapi_DsGetMembershipsRequest1;
typedef [switch_type(uint32)] union {
[case(1)] drsuapi_DsGetMembershipsRequest1 req1;
} drsuapi_DsGetMembershipsRequest;
WERROR drsuapi_DsGetMemberships(
[in] policy_handle *bind_handle,
[in] uint32 level,
[in,ref] [switch_is(level)] drsuapi_DsGetMembershipsRequest *req,
[out,ref] uint32 *level_out,
[out,ref] [switch_is(*level_out)] drsuapi_DsGetMembershipsCtr *ctr
);
/*****************/
/* Function 0x0a */
[todo] WERROR DRSUAPI_INTER_DOMAIN_MOVE();
/*****************/
/* Function 0x0b */
typedef [bitmap32bit] bitmap {
DRSUAPI_NT4_CHANGELOG_GET_CHANGELOG = 0x00000001,
DRSUAPI_NT4_CHANGELOG_GET_SERIAL_NUMBERS = 0x00000002
} drsuapi_DsGetNT4ChangeLogFlags;
typedef struct {
drsuapi_DsGetNT4ChangeLogFlags flags;
uint32 preferred_maximum_length;
[range(0,0x00A00000)] uint32 restart_length;
[size_is(restart_length)] uint8 *restart_data;
} drsuapi_DsGetNT4ChangeLogRequest1;
typedef [switch_type(uint32)] union {
[case(1)] drsuapi_DsGetNT4ChangeLogRequest1 req1;
} drsuapi_DsGetNT4ChangeLogRequest;
typedef struct {