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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
|
/* header auto-generated by pidl */
#include <stdint.h>
#include "libcli/util/ntstatus.h"
#include "librpc/gen_ndr/misc.h"
#include "librpc/gen_ndr/lsa.h"
#include "librpc/gen_ndr/security.h"
#ifndef _HEADER_samr
#define _HEADER_samr
#define SAMR_ACCESS_ALL_ACCESS ( 0x0000003F )
#define GENERIC_RIGHTS_SAM_ALL_ACCESS ( (STANDARD_RIGHTS_REQUIRED_ACCESS|SAMR_ACCESS_ALL_ACCESS) )
#define GENERIC_RIGHTS_SAM_READ ( (STANDARD_RIGHTS_READ_ACCESS|SAMR_ACCESS_ENUM_DOMAINS) )
#define GENERIC_RIGHTS_SAM_WRITE ( (STANDARD_RIGHTS_WRITE_ACCESS|SAMR_ACCESS_CREATE_DOMAIN|SAMR_ACCESS_INITIALIZE_SERVER|SAMR_ACCESS_SHUTDOWN_SERVER) )
#define GENERIC_RIGHTS_SAM_EXECUTE ( (STANDARD_RIGHTS_EXECUTE_ACCESS|SAMR_ACCESS_LOOKUP_DOMAIN|SAMR_ACCESS_CONNECT_TO_SERVER) )
#define SAMR_USER_ACCESS_ALL_ACCESS ( 0x000007FF )
#define GENERIC_RIGHTS_USER_ALL_ACCESS ( (STANDARD_RIGHTS_REQUIRED_ACCESS|SAMR_USER_ACCESS_ALL_ACCESS) )
#define GENERIC_RIGHTS_USER_READ ( (STANDARD_RIGHTS_READ_ACCESS|SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP|SAMR_USER_ACCESS_GET_GROUPS|SAMR_USER_ACCESS_GET_ATTRIBUTES|SAMR_USER_ACCESS_GET_LOGONINFO|SAMR_USER_ACCESS_GET_LOCALE) )
#define GENERIC_RIGHTS_USER_WRITE ( (STANDARD_RIGHTS_WRITE_ACCESS|SAMR_USER_ACCESS_CHANGE_PASSWORD|SAMR_USER_ACCESS_SET_LOC_COM|SAMR_USER_ACCESS_SET_ATTRIBUTES|SAMR_USER_ACCESS_SET_PASSWORD|SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP) )
#define GENERIC_RIGHTS_USER_EXECUTE ( (STANDARD_RIGHTS_EXECUTE_ACCESS|SAMR_USER_ACCESS_CHANGE_PASSWORD|SAMR_USER_ACCESS_GET_NAME_ETC) )
#define SAMR_DOMAIN_ACCESS_ALL_ACCESS ( 0x000007FF )
#define GENERIC_RIGHTS_DOMAIN_ALL_ACCESS ( (STANDARD_RIGHTS_REQUIRED_ACCESS|SAMR_DOMAIN_ACCESS_ALL_ACCESS) )
#define GENERIC_RIGHTS_DOMAIN_READ ( (STANDARD_RIGHTS_READ_ACCESS|SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS|SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2) )
#define GENERIC_RIGHTS_DOMAIN_WRITE ( (STANDARD_RIGHTS_WRITE_ACCESS|SAMR_DOMAIN_ACCESS_SET_INFO_3|SAMR_DOMAIN_ACCESS_CREATE_ALIAS|SAMR_DOMAIN_ACCESS_CREATE_GROUP|SAMR_DOMAIN_ACCESS_CREATE_USER|SAMR_DOMAIN_ACCESS_SET_INFO_2|SAMR_DOMAIN_ACCESS_SET_INFO_1) )
#define GENERIC_RIGHTS_DOMAIN_EXECUTE ( (STANDARD_RIGHTS_EXECUTE_ACCESS|SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT|SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS|SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1) )
#define SAMR_GROUP_ACCESS_ALL_ACCESS ( 0x0000001F )
#define GENERIC_RIGHTS_GROUP_ALL_ACCESS ( (STANDARD_RIGHTS_REQUIRED_ACCESS|SAMR_GROUP_ACCESS_ALL_ACCESS) )
#define GENERIC_RIGHTS_GROUP_READ ( (STANDARD_RIGHTS_READ_ACCESS|SAMR_GROUP_ACCESS_GET_MEMBERS) )
#define GENERIC_RIGHTS_GROUP_WRITE ( (STANDARD_RIGHTS_WRITE_ACCESS|SAMR_GROUP_ACCESS_REMOVE_MEMBER|SAMR_GROUP_ACCESS_ADD_MEMBER|SAMR_GROUP_ACCESS_SET_INFO) )
#define GENERIC_RIGHTS_GROUP_EXECUTE ( (STANDARD_RIGHTS_EXECUTE_ACCESS|SAMR_GROUP_ACCESS_LOOKUP_INFO) )
#define SAMR_ALIAS_ACCESS_ALL_ACCESS ( 0x0000001F )
#define GENERIC_RIGHTS_ALIAS_ALL_ACCESS ( (STANDARD_RIGHTS_REQUIRED_ACCESS|SAMR_ALIAS_ACCESS_ALL_ACCESS) )
#define GENERIC_RIGHTS_ALIAS_READ ( (STANDARD_RIGHTS_READ_ACCESS|SAMR_ALIAS_ACCESS_GET_MEMBERS) )
#define GENERIC_RIGHTS_ALIAS_WRITE ( (STANDARD_RIGHTS_WRITE_ACCESS|SAMR_ALIAS_ACCESS_REMOVE_MEMBER|SAMR_ALIAS_ACCESS_ADD_MEMBER|SAMR_ALIAS_ACCESS_SET_INFO) )
#define GENERIC_RIGHTS_ALIAS_EXECUTE ( (STANDARD_RIGHTS_EXECUTE_ACCESS|SAMR_ALIAS_ACCESS_LOOKUP_INFO) )
#define SAMR_ENUM_USERS_MULTIPLIER ( 54 )
#define PASS_MUST_CHANGE_AT_NEXT_LOGON ( 0x01 )
#define PASS_DONT_CHANGE_AT_NEXT_LOGON ( 0x00 )
enum netr_SamDatabaseID
#ifndef USE_UINT_ENUMS
{
SAM_DATABASE_DOMAIN=0,
SAM_DATABASE_BUILTIN=1,
SAM_DATABASE_PRIVS=2
}
#else
{ __donnot_use_enum_netr_SamDatabaseID=0x7FFFFFFF}
#define SAM_DATABASE_DOMAIN ( 0 )
#define SAM_DATABASE_BUILTIN ( 1 )
#define SAM_DATABASE_PRIVS ( 2 )
#endif
;
enum samr_RejectReason
#ifndef USE_UINT_ENUMS
{
SAMR_REJECT_OTHER=0,
SAMR_REJECT_TOO_SHORT=1,
SAMR_REJECT_IN_HISTORY=2,
SAMR_REJECT_COMPLEXITY=5
}
#else
{ __donnot_use_enum_samr_RejectReason=0x7FFFFFFF}
#define SAMR_REJECT_OTHER ( 0 )
#define SAMR_REJECT_TOO_SHORT ( 1 )
#define SAMR_REJECT_IN_HISTORY ( 2 )
#define SAMR_REJECT_COMPLEXITY ( 5 )
#endif
;
/* bitmap samr_AcctFlags */
#define ACB_DISABLED ( 0x00000001 )
#define ACB_HOMDIRREQ ( 0x00000002 )
#define ACB_PWNOTREQ ( 0x00000004 )
#define ACB_TEMPDUP ( 0x00000008 )
#define ACB_NORMAL ( 0x00000010 )
#define ACB_MNS ( 0x00000020 )
#define ACB_DOMTRUST ( 0x00000040 )
#define ACB_WSTRUST ( 0x00000080 )
#define ACB_SVRTRUST ( 0x00000100 )
#define ACB_PWNOEXP ( 0x00000200 )
#define ACB_AUTOLOCK ( 0x00000400 )
#define ACB_ENC_TXT_PWD_ALLOWED ( 0x00000800 )
#define ACB_SMARTCARD_REQUIRED ( 0x00001000 )
#define ACB_TRUSTED_FOR_DELEGATION ( 0x00002000 )
#define ACB_NOT_DELEGATED ( 0x00004000 )
#define ACB_USE_DES_KEY_ONLY ( 0x00008000 )
#define ACB_DONT_REQUIRE_PREAUTH ( 0x00010000 )
#define ACB_PW_EXPIRED ( 0x00020000 )
#define ACB_NO_AUTH_DATA_REQD ( 0x00080000 )
/* bitmap samr_ConnectAccessMask */
#define SAMR_ACCESS_CONNECT_TO_SERVER ( 0x00000001 )
#define SAMR_ACCESS_SHUTDOWN_SERVER ( 0x00000002 )
#define SAMR_ACCESS_INITIALIZE_SERVER ( 0x00000004 )
#define SAMR_ACCESS_CREATE_DOMAIN ( 0x00000008 )
#define SAMR_ACCESS_ENUM_DOMAINS ( 0x00000010 )
#define SAMR_ACCESS_LOOKUP_DOMAIN ( 0x00000020 )
/* bitmap samr_UserAccessMask */
#define SAMR_USER_ACCESS_GET_NAME_ETC ( 0x00000001 )
#define SAMR_USER_ACCESS_GET_LOCALE ( 0x00000002 )
#define SAMR_USER_ACCESS_SET_LOC_COM ( 0x00000004 )
#define SAMR_USER_ACCESS_GET_LOGONINFO ( 0x00000008 )
#define SAMR_USER_ACCESS_GET_ATTRIBUTES ( 0x00000010 )
#define SAMR_USER_ACCESS_SET_ATTRIBUTES ( 0x00000020 )
#define SAMR_USER_ACCESS_CHANGE_PASSWORD ( 0x00000040 )
#define SAMR_USER_ACCESS_SET_PASSWORD ( 0x00000080 )
#define SAMR_USER_ACCESS_GET_GROUPS ( 0x00000100 )
#define SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP ( 0x00000200 )
#define SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP ( 0x00000400 )
/* bitmap samr_DomainAccessMask */
#define SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1 ( 0x00000001 )
#define SAMR_DOMAIN_ACCESS_SET_INFO_1 ( 0x00000002 )
#define SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2 ( 0x00000004 )
#define SAMR_DOMAIN_ACCESS_SET_INFO_2 ( 0x00000008 )
#define SAMR_DOMAIN_ACCESS_CREATE_USER ( 0x00000010 )
#define SAMR_DOMAIN_ACCESS_CREATE_GROUP ( 0x00000020 )
#define SAMR_DOMAIN_ACCESS_CREATE_ALIAS ( 0x00000040 )
#define SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS ( 0x00000080 )
#define SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS ( 0x00000100 )
#define SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT ( 0x00000200 )
#define SAMR_DOMAIN_ACCESS_SET_INFO_3 ( 0x00000400 )
/* bitmap samr_GroupAccessMask */
#define SAMR_GROUP_ACCESS_LOOKUP_INFO ( 0x00000001 )
#define SAMR_GROUP_ACCESS_SET_INFO ( 0x00000002 )
#define SAMR_GROUP_ACCESS_ADD_MEMBER ( 0x00000004 )
#define SAMR_GROUP_ACCESS_REMOVE_MEMBER ( 0x00000008 )
#define SAMR_GROUP_ACCESS_GET_MEMBERS ( 0x00000010 )
/* bitmap samr_AliasAccessMask */
#define SAMR_ALIAS_ACCESS_ADD_MEMBER ( 0x00000001 )
#define SAMR_ALIAS_ACCESS_REMOVE_MEMBER ( 0x00000002 )
#define SAMR_ALIAS_ACCESS_GET_MEMBERS ( 0x00000004 )
#define SAMR_ALIAS_ACCESS_LOOKUP_INFO ( 0x00000008 )
#define SAMR_ALIAS_ACCESS_SET_INFO ( 0x00000010 )
struct samr_SamEntry {
uint32_t idx;
struct lsa_String name;
};
struct samr_SamArray {
uint32_t count;
struct samr_SamEntry *entries;/* [unique,size_is(count)] */
};
enum samr_DomainInfoClass
#ifndef USE_UINT_ENUMS
{
DomainPasswordInformation=1,
DomainGeneralInformation=2,
DomainLogoffInformation=3,
DomainOemInformation=4,
DomainNameInformation=5,
DomainReplicationInformation=6,
DomainServerRoleInformation=7,
DomainModifiedInformation=8,
DomainStateInformation=9,
DomainUasInformation=10,
DomainGeneralInformation2=11,
DomainLockoutInformation=12,
DomainModifiedInformation2=13
}
#else
{ __donnot_use_enum_samr_DomainInfoClass=0x7FFFFFFF}
#define DomainPasswordInformation ( 1 )
#define DomainGeneralInformation ( 2 )
#define DomainLogoffInformation ( 3 )
#define DomainOemInformation ( 4 )
#define DomainNameInformation ( 5 )
#define DomainReplicationInformation ( 6 )
#define DomainServerRoleInformation ( 7 )
#define DomainModifiedInformation ( 8 )
#define DomainStateInformation ( 9 )
#define DomainUasInformation ( 10 )
#define DomainGeneralInformation2 ( 11 )
#define DomainLockoutInformation ( 12 )
#define DomainModifiedInformation2 ( 13 )
#endif
;
enum samr_Role
#ifndef USE_UINT_ENUMS
{
SAMR_ROLE_STANDALONE=0,
SAMR_ROLE_DOMAIN_MEMBER=1,
SAMR_ROLE_DOMAIN_BDC=2,
SAMR_ROLE_DOMAIN_PDC=3
}
#else
{ __donnot_use_enum_samr_Role=0x7FFFFFFF}
#define SAMR_ROLE_STANDALONE ( 0 )
#define SAMR_ROLE_DOMAIN_MEMBER ( 1 )
#define SAMR_ROLE_DOMAIN_BDC ( 2 )
#define SAMR_ROLE_DOMAIN_PDC ( 3 )
#endif
;
/* bitmap samr_PasswordProperties */
#define DOMAIN_PASSWORD_COMPLEX ( 0x00000001 )
#define DOMAIN_PASSWORD_NO_ANON_CHANGE ( 0x00000002 )
#define DOMAIN_PASSWORD_NO_CLEAR_CHANGE ( 0x00000004 )
#define DOMAIN_PASSWORD_LOCKOUT_ADMINS ( 0x00000008 )
#define DOMAIN_PASSWORD_STORE_CLEARTEXT ( 0x00000010 )
#define DOMAIN_REFUSE_PASSWORD_CHANGE ( 0x00000020 )
enum samr_DomainServerState
#ifndef USE_UINT_ENUMS
{
DOMAIN_SERVER_ENABLED=1,
DOMAIN_SERVER_DISABLED=2
}
#else
{ __donnot_use_enum_samr_DomainServerState=0x7FFFFFFF}
#define DOMAIN_SERVER_ENABLED ( 1 )
#define DOMAIN_SERVER_DISABLED ( 2 )
#endif
;
struct samr_DomInfo1 {
uint16_t min_password_length;
uint16_t password_history_length;
uint32_t password_properties;
int64_t max_password_age;
int64_t min_password_age;
};
struct samr_DomGeneralInformation {
NTTIME force_logoff_time;
struct lsa_String oem_information;
struct lsa_String domain_name;
struct lsa_String primary;
uint64_t sequence_num;
enum samr_DomainServerState domain_server_state;
enum samr_Role role;
uint32_t unknown3;
uint32_t num_users;
uint32_t num_groups;
uint32_t num_aliases;
};
struct samr_DomInfo3 {
NTTIME force_logoff_time;
};
struct samr_DomOEMInformation {
struct lsa_String oem_information;
};
struct samr_DomInfo5 {
struct lsa_String domain_name;
};
struct samr_DomInfo6 {
struct lsa_String primary;
};
struct samr_DomInfo7 {
enum samr_Role role;
};
struct samr_DomInfo8 {
uint64_t sequence_num;
NTTIME domain_create_time;
};
struct samr_DomInfo9 {
enum samr_DomainServerState domain_server_state;
};
struct samr_DomGeneralInformation2 {
struct samr_DomGeneralInformation general;
uint64_t lockout_duration;
uint64_t lockout_window;
uint16_t lockout_threshold;
};
struct samr_DomInfo12 {
uint64_t lockout_duration;
uint64_t lockout_window;
uint16_t lockout_threshold;
};
struct samr_DomInfo13 {
uint64_t sequence_num;
NTTIME domain_create_time;
uint64_t modified_count_at_last_promotion;
};
union samr_DomainInfo {
struct samr_DomInfo1 info1;/* [case] */
struct samr_DomGeneralInformation general;/* [case(2)] */
struct samr_DomInfo3 info3;/* [case(3)] */
struct samr_DomOEMInformation oem;/* [case(4)] */
struct samr_DomInfo5 info5;/* [case(5)] */
struct samr_DomInfo6 info6;/* [case(6)] */
struct samr_DomInfo7 info7;/* [case(7)] */
struct samr_DomInfo8 info8;/* [case(8)] */
struct samr_DomInfo9 info9;/* [case(9)] */
struct samr_DomGeneralInformation2 general2;/* [case(11)] */
struct samr_DomInfo12 info12;/* [case(12)] */
struct samr_DomInfo13 info13;/* [case(13)] */
}/* [switch_type(uint16)] */;
struct samr_Ids {
uint32_t count;/* [range(0,1024)] */
uint32_t *ids;/* [unique,size_is(count)] */
};
/* bitmap samr_GroupAttrs */
#define SE_GROUP_MANDATORY ( 0x00000001 )
#define SE_GROUP_ENABLED_BY_DEFAULT ( 0x00000002 )
#define SE_GROUP_ENABLED ( 0x00000004 )
#define SE_GROUP_OWNER ( 0x00000008 )
#define SE_GROUP_USE_FOR_DENY_ONLY ( 0x00000010 )
#define SE_GROUP_RESOURCE ( 0x20000000 )
#define SE_GROUP_LOGON_ID ( 0xC0000000 )
struct samr_GroupInfoAll {
struct lsa_String name;
uint32_t attributes;
uint32_t num_members;
struct lsa_String description;
};
struct samr_GroupInfoAttributes {
uint32_t attributes;
};
struct samr_GroupInfoDescription {
struct lsa_String description;
};
enum samr_GroupInfoEnum
#ifndef USE_UINT_ENUMS
{
GROUPINFOALL=1,
GROUPINFONAME=2,
GROUPINFOATTRIBUTES=3,
GROUPINFODESCRIPTION=4,
GROUPINFOALL2=5
}
#else
{ __donnot_use_enum_samr_GroupInfoEnum=0x7FFFFFFF}
#define GROUPINFOALL ( 1 )
#define GROUPINFONAME ( 2 )
#define GROUPINFOATTRIBUTES ( 3 )
#define GROUPINFODESCRIPTION ( 4 )
#define GROUPINFOALL2 ( 5 )
#endif
;
union samr_GroupInfo {
struct samr_GroupInfoAll all;/* [case(GROUPINFOALL)] */
struct lsa_String name;/* [case(GROUPINFONAME)] */
struct samr_GroupInfoAttributes attributes;/* [case(GROUPINFOATTRIBUTES)] */
struct lsa_String description;/* [case(GROUPINFODESCRIPTION)] */
struct samr_GroupInfoAll all2;/* [case(GROUPINFOALL2)] */
}/* [switch_type(samr_GroupInfoEnum)] */;
struct samr_RidTypeArray {
uint32_t count;
uint32_t *rids;/* [unique,size_is(count)] */
uint32_t *types;/* [unique,size_is(count)] */
};
struct samr_AliasInfoAll {
struct lsa_String name;
uint32_t num_members;
struct lsa_String description;
};
enum samr_AliasInfoEnum
#ifndef USE_UINT_ENUMS
{
ALIASINFOALL=1,
ALIASINFONAME=2,
ALIASINFODESCRIPTION=3
}
#else
{ __donnot_use_enum_samr_AliasInfoEnum=0x7FFFFFFF}
#define ALIASINFOALL ( 1 )
#define ALIASINFONAME ( 2 )
#define ALIASINFODESCRIPTION ( 3 )
#endif
;
union samr_AliasInfo {
struct samr_AliasInfoAll all;/* [case(ALIASINFOALL)] */
struct lsa_String name;/* [case(ALIASINFONAME)] */
struct lsa_String description;/* [case(ALIASINFODESCRIPTION)] */
}/* [switch_type(samr_AliasInfoEnum)] */;
enum samr_UserInfoLevel
#ifndef USE_UINT_ENUMS
{
UserGeneralInformation=1,
UserPreferencesInformation=2,
UserLogonInformation=3,
UserLogonHoursInformation=4,
UserAccountInformation=5,
UserNameInformation=6,
UserAccountNameInformation=7,
UserFullNameInformation=8,
UserPrimaryGroupInformation=9,
UserHomeInformation=10,
UserScriptInformation=11,
UserProfileInformation=12,
UserAdminCommentInformation=13,
UserWorkStationsInformation=14,
UserControlInformation=16,
UserExpiresInformation=17,
UserInternal1Information=18,
UserParametersInformation=20,
UserAllInformation=21,
UserInternal4Information=23,
UserInternal5Information=24,
UserInternal4InformationNew=25,
UserInternal5InformationNew=26
}
#else
{ __donnot_use_enum_samr_UserInfoLevel=0x7FFFFFFF}
#define UserGeneralInformation ( 1 )
#define UserPreferencesInformation ( 2 )
#define UserLogonInformation ( 3 )
#define UserLogonHoursInformation ( 4 )
#define UserAccountInformation ( 5 )
#define UserNameInformation ( 6 )
#define UserAccountNameInformation ( 7 )
#define UserFullNameInformation ( 8 )
#define UserPrimaryGroupInformation ( 9 )
#define UserHomeInformation ( 10 )
#define UserScriptInformation ( 11 )
#define UserProfileInformation ( 12 )
#define UserAdminCommentInformation ( 13 )
#define UserWorkStationsInformation ( 14 )
#define UserControlInformation ( 16 )
#define UserExpiresInformation ( 17 )
#define UserInternal1Information ( 18 )
#define UserParametersInformation ( 20 )
#define UserAllInformation ( 21 )
#define UserInternal4Information ( 23 )
#define UserInternal5Information ( 24 )
#define UserInternal4InformationNew ( 25 )
#define UserInternal5InformationNew ( 26 )
#endif
;
struct samr_UserInfo1 {
struct lsa_String account_name;
struct lsa_String full_name;
uint32_t primary_gid;
struct lsa_String description;
struct lsa_String comment;
};
struct samr_UserInfo2 {
struct lsa_String comment;
struct lsa_String unknown;
uint16_t country_code;
uint16_t code_page;
};
struct samr_LogonHours {
uint16_t units_per_week;
uint8_t *bits;/* [unique,length_is(units_per_week/8),size_is(1260)] */
}/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;
struct samr_UserInfo3 {
struct lsa_String account_name;
struct lsa_String full_name;
uint32_t rid;
uint32_t primary_gid;
struct lsa_String home_directory;
struct lsa_String home_drive;
struct lsa_String logon_script;
struct lsa_String profile_path;
struct lsa_String workstations;
NTTIME last_logon;
NTTIME last_logoff;
NTTIME last_password_change;
NTTIME allow_password_change;
NTTIME force_password_change;
struct samr_LogonHours logon_hours;
uint16_t bad_password_count;
uint16_t logon_count;
uint32_t acct_flags;
};
struct samr_UserInfo4 {
struct samr_LogonHours logon_hours;
};
struct samr_UserInfo5 {
struct lsa_String account_name;
struct lsa_String full_name;
uint32_t rid;
uint32_t primary_gid;
struct lsa_String home_directory;
struct lsa_String home_drive;
struct lsa_String logon_script;
struct lsa_String profile_path;
struct lsa_String description;
struct lsa_String workstations;
NTTIME last_logon;
NTTIME last_logoff;
struct samr_LogonHours logon_hours;
uint16_t bad_password_count;
uint16_t logon_count;
NTTIME last_password_change;
NTTIME acct_expiry;
uint32_t acct_flags;
};
struct samr_UserInfo6 {
struct lsa_String account_name;
struct lsa_String full_name;
};
struct samr_UserInfo7 {
struct lsa_String account_name;
};
struct samr_UserInfo8 {
struct lsa_String full_name;
};
struct samr_UserInfo9 {
uint32_t primary_gid;
};
struct samr_UserInfo10 {
struct lsa_String home_directory;
struct lsa_String home_drive;
};
struct samr_UserInfo11 {
struct lsa_String logon_script;
};
struct samr_UserInfo12 {
struct lsa_String profile_path;
};
struct samr_UserInfo13 {
struct lsa_String description;
};
struct samr_UserInfo14 {
struct lsa_String workstations;
};
struct samr_UserInfo16 {
uint32_t acct_flags;
};
struct samr_UserInfo17 {
NTTIME acct_expiry;
};
struct samr_Password {
uint8_t hash[16];
}/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;
struct samr_UserInfo18 {
struct samr_Password nt_pwd;
struct samr_Password lm_pwd;
uint8_t nt_pwd_active;
uint8_t lm_pwd_active;
uint8_t password_expired;
};
struct samr_UserInfo20 {
struct lsa_BinaryString parameters;
};
/* bitmap samr_FieldsPresent */
#define SAMR_FIELD_ACCOUNT_NAME ( 0x00000001 )
#define SAMR_FIELD_FULL_NAME ( 0x00000002 )
#define SAMR_FIELD_RID ( 0x00000004 )
#define SAMR_FIELD_PRIMARY_GID ( 0x00000008 )
#define SAMR_FIELD_DESCRIPTION ( 0x00000010 )
#define SAMR_FIELD_COMMENT ( 0x00000020 )
#define SAMR_FIELD_HOME_DIRECTORY ( 0x00000040 )
#define SAMR_FIELD_HOME_DRIVE ( 0x00000080 )
#define SAMR_FIELD_LOGON_SCRIPT ( 0x00000100 )
#define SAMR_FIELD_PROFILE_PATH ( 0x00000200 )
#define SAMR_FIELD_WORKSTATIONS ( 0x00000400 )
#define SAMR_FIELD_LAST_LOGON ( 0x00000800 )
#define SAMR_FIELD_LAST_LOGOFF ( 0x00001000 )
#define SAMR_FIELD_LOGON_HOURS ( 0x00002000 )
#define SAMR_FIELD_BAD_PWD_COUNT ( 0x00004000 )
#define SAMR_FIELD_NUM_LOGONS ( 0x00008000 )
#define SAMR_FIELD_ALLOW_PWD_CHANGE ( 0x00010000 )
#define SAMR_FIELD_FORCE_PWD_CHANGE ( 0x00020000 )
#define SAMR_FIELD_LAST_PWD_CHANGE ( 0x00040000 )
#define SAMR_FIELD_ACCT_EXPIRY ( 0x00080000 )
#define SAMR_FIELD_ACCT_FLAGS ( 0x00100000 )
#define SAMR_FIELD_PARAMETERS ( 0x00200000 )
#define SAMR_FIELD_COUNTRY_CODE ( 0x00400000 )
#define SAMR_FIELD_CODE_PAGE ( 0x00800000 )
#define SAMR_FIELD_NT_PASSWORD_PRESENT ( 0x01000000 )
#define SAMR_FIELD_LM_PASSWORD_PRESENT ( 0x02000000 )
#define SAMR_FIELD_PRIVATE_DATA ( 0x04000000 )
#define SAMR_FIELD_EXPIRED_FLAG ( 0x08000000 )
#define SAMR_FIELD_SEC_DESC ( 0x10000000 )
#define SAMR_FIELD_OWF_PWD ( 0x20000000 )
struct samr_UserInfo21 {
NTTIME last_logon;
NTTIME last_logoff;
NTTIME last_password_change;
NTTIME acct_expiry;
NTTIME allow_password_change;
NTTIME force_password_change;
struct lsa_String account_name;
struct lsa_String full_name;
struct lsa_String home_directory;
struct lsa_String home_drive;
struct lsa_String logon_script;
struct lsa_String profile_path;
struct lsa_String description;
struct lsa_String workstations;
struct lsa_String comment;
struct lsa_BinaryString parameters;
struct lsa_BinaryString lm_owf_password;
struct lsa_BinaryString nt_owf_password;
struct lsa_String unknown3;
uint32_t buf_count;
uint8_t *buffer;/* [unique,size_is(buf_count)] */
uint32_t rid;
uint32_t primary_gid;
uint32_t acct_flags;
uint32_t fields_present;
struct samr_LogonHours logon_hours;
uint16_t bad_password_count;
uint16_t logon_count;
uint16_t country_code;
uint16_t code_page;
uint8_t lm_password_set;
uint8_t nt_password_set;
uint8_t password_expired;
uint8_t unknown4;
};
struct samr_CryptPassword {
uint8_t data[516];
}/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;
struct samr_UserInfo23 {
struct samr_UserInfo21 info;
struct samr_CryptPassword password;
};
struct samr_UserInfo24 {
struct samr_CryptPassword password;
uint8_t password_expired;
};
struct samr_CryptPasswordEx {
uint8_t data[532];
}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;
struct samr_UserInfo25 {
struct samr_UserInfo21 info;
struct samr_CryptPasswordEx password;
};
struct samr_UserInfo26 {
struct samr_CryptPasswordEx password;
uint8_t password_expired;
};
union samr_UserInfo {
struct samr_UserInfo1 info1;/* [case] */
struct samr_UserInfo2 info2;/* [case(2)] */
struct samr_UserInfo3 info3;/* [case(3)] */
struct samr_UserInfo4 info4;/* [case(4)] */
struct samr_UserInfo5 info5;/* [case(5)] */
struct samr_UserInfo6 info6;/* [case(6)] */
struct samr_UserInfo7 info7;/* [case(7)] */
struct samr_UserInfo8 info8;/* [case(8)] */
struct samr_UserInfo9 info9;/* [case(9)] */
struct samr_UserInfo10 info10;/* [case(10)] */
struct samr_UserInfo11 info11;/* [case(11)] */
struct samr_UserInfo12 info12;/* [case(12)] */
struct samr_UserInfo13 info13;/* [case(13)] */
struct samr_UserInfo14 info14;/* [case(14)] */
struct samr_UserInfo16 info16;/* [case(16)] */
struct samr_UserInfo17 info17;/* [case(17)] */
struct samr_UserInfo18 info18;/* [case(18)] */
struct samr_UserInfo20 info20;/* [case(20)] */
struct samr_UserInfo21 info21;/* [case(21)] */
struct samr_UserInfo23 info23;/* [case(23)] */
struct samr_UserInfo24 info24;/* [case(24)] */
struct samr_UserInfo25 info25;/* [case(25)] */
struct samr_UserInfo26 info26;/* [case(26)] */
}/* [switch_type(uint16)] */;
struct samr_RidWithAttribute {
uint32_t rid;
uint32_t attributes;
}/* [public] */;
struct samr_RidWithAttributeArray {
uint32_t count;
struct samr_RidWithAttribute *rids;/* [unique,size_is(count)] */
}/* [public] */;
struct samr_DispEntryGeneral {
uint32_t idx;
uint32_t rid;
uint32_t acct_flags;
struct lsa_String account_name;
struct lsa_String description;
struct lsa_String full_name;
};
struct samr_DispInfoGeneral {
uint32_t count;
struct samr_DispEntryGeneral *entries;/* [unique,size_is(count)] */
};
struct samr_DispEntryFull {
uint32_t idx;
uint32_t rid;
uint32_t acct_flags;
struct lsa_String account_name;
struct lsa_String description;
};
struct samr_DispInfoFull {
uint32_t count;
struct samr_DispEntryFull *entries;/* [unique,size_is(count)] */
};
struct samr_DispEntryFullGroup {
uint32_t idx;
uint32_t rid;
uint32_t acct_flags;
struct lsa_String account_name;
struct lsa_String description;
};
struct samr_DispInfoFullGroups {
uint32_t count;
struct samr_DispEntryFullGroup *entries;/* [unique,size_is(count)] */
};
struct samr_DispEntryAscii {
uint32_t idx;
struct lsa_AsciiStringLarge account_name;
};
struct samr_DispInfoAscii {
uint32_t count;
struct samr_DispEntryAscii *entries;/* [unique,size_is(count)] */
};
union samr_DispInfo {
struct samr_DispInfoGeneral info1;/* [case] */
struct samr_DispInfoFull info2;/* [case(2)] */
struct samr_DispInfoFullGroups info3;/* [case(3)] */
struct samr_DispInfoAscii info4;/* [case(4)] */
struct samr_DispInfoAscii info5;/* [case(5)] */
}/* [switch_type(uint16)] */;
struct samr_PwInfo {
uint16_t min_password_length;
uint32_t password_properties;
};
enum samr_ConnectVersion
#ifndef USE_UINT_ENUMS
{
SAMR_CONNECT_PRE_W2K=1,
SAMR_CONNECT_W2K=2,
SAMR_CONNECT_AFTER_W2K=3
}
#else
{ __donnot_use_enum_samr_ConnectVersion=0x7FFFFFFF}
#define SAMR_CONNECT_PRE_W2K ( 1 )
#define SAMR_CONNECT_W2K ( 2 )
#define SAMR_CONNECT_AFTER_W2K ( 3 )
#endif
;
struct samr_ChangeReject {
enum samr_RejectReason reason;
uint32_t unknown1;
uint32_t unknown2;
};
struct samr_ConnectInfo1 {
enum samr_ConnectVersion client_version;
uint32_t unknown2;
};
union samr_ConnectInfo {
struct samr_ConnectInfo1 info1;/* [case] */
};
/* bitmap samr_ValidateFieldsPresent */
#define SAMR_VALIDATE_FIELD_PASSWORD_LAST_SET ( 0x00000001 )
#define SAMR_VALIDATE_FIELD_BAD_PASSWORD_TIME ( 0x00000002 )
#define SAMR_VALIDATE_FIELD_LOCKOUT_TIME ( 0x00000004 )
#define SAMR_VALIDATE_FIELD_BAD_PASSWORD_COUNT ( 0x00000008 )
#define SAMR_VALIDATE_FIELD_PASSWORD_HISTORY_LENGTH ( 0x00000010 )
#define SAMR_VALIDATE_FIELD_PASSWORD_HISTORY ( 0x00000020 )
enum samr_ValidatePasswordLevel
#ifndef USE_UINT_ENUMS
{
NetValidateAuthentication=1,
NetValidatePasswordChange=2,
NetValidatePasswordReset=3
}
#else
{ __donnot_use_enum_samr_ValidatePasswordLevel=0x7FFFFFFF}
#define NetValidateAuthentication ( 1 )
#define NetValidatePasswordChange ( 2 )
#define NetValidatePasswordReset ( 3 )
#endif
;
enum samr_ValidationStatus
#ifndef USE_UINT_ENUMS
{
SAMR_VALIDATION_STATUS_SUCCESS=0,
SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE=1,
SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT=2,
SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED=3,
SAMR_VALIDATION_STATUS_BAD_PASSWORD=4,
SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT=5,
SAMR_VALIDATION_STATUS_PWD_TOO_SHORT=6,
SAMR_VALIDATION_STATUS_PWD_TOO_LONG=7,
SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH=8,
SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT=9,
SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR=10
}
#else
{ __donnot_use_enum_samr_ValidationStatus=0x7FFFFFFF}
#define SAMR_VALIDATION_STATUS_SUCCESS ( 0 )
#define SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE ( 1 )
#define SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT ( 2 )
#define SAMR_VALIDATION_STATUS_PASSWORD_EXPIRED ( 3 )
#define SAMR_VALIDATION_STATUS_BAD_PASSWORD ( 4 )
#define SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT ( 5 )
#define SAMR_VALIDATION_STATUS_PWD_TOO_SHORT ( 6 )
#define SAMR_VALIDATION_STATUS_PWD_TOO_LONG ( 7 )
#define SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH ( 8 )
#define SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT ( 9 )
#define SAMR_VALIDATION_STATUS_PASSWORD_FILTER_ERROR ( 10 )
#endif
;
struct samr_ValidationBlob {
uint32_t length;
uint8_t *data;/* [unique,size_is(length)] */
};
struct samr_ValidatePasswordInfo {
uint32_t fields_present;
NTTIME last_password_change;
NTTIME bad_password_time;
NTTIME lockout_time;
uint32_t bad_pwd_count;
uint32_t pwd_history_len;
struct samr_ValidationBlob *pwd_history;/* [unique,size_is(pwd_history_len)] */
};
struct samr_ValidatePasswordRepCtr {
struct samr_ValidatePasswordInfo info;
enum samr_ValidationStatus status;
};
union samr_ValidatePasswordRep {
struct samr_ValidatePasswordRepCtr ctr1;/* [case] */
struct samr_ValidatePasswordRepCtr ctr2;/* [case(2)] */
struct samr_ValidatePasswordRepCtr ctr3;/* [case(3)] */
}/* [switch_type(uint16)] */;
struct samr_ValidatePasswordReq3 {
struct samr_ValidatePasswordInfo info;
struct lsa_StringLarge password;
struct lsa_StringLarge account;
struct samr_ValidationBlob hash;
uint8_t pwd_must_change_at_next_logon;
uint8_t clear_lockout;
};
struct samr_ValidatePasswordReq2 {
struct samr_ValidatePasswordInfo info;
struct lsa_StringLarge password;
struct lsa_StringLarge account;
struct samr_ValidationBlob hash;
uint8_t password_matched;
};
struct samr_ValidatePasswordReq1 {
struct samr_ValidatePasswordInfo info;
uint8_t password_matched;
};
union samr_ValidatePasswordReq {
struct samr_ValidatePasswordReq1 req1;/* [case] */
struct samr_ValidatePasswordReq2 req2;/* [case(2)] */
struct samr_ValidatePasswordReq3 req3;/* [case(3)] */
}/* [switch_type(uint16)] */;
struct samr_Connect {
struct {
uint16_t *system_name;/* [unique] */
uint32_t access_mask;
} in;
struct {
struct policy_handle *connect_handle;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_Close {
struct {
struct policy_handle *handle;/* [ref] */
} in;
struct {
struct policy_handle *handle;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_SetSecurity {
struct {
struct policy_handle *handle;/* [ref] */
uint32_t sec_info;
struct sec_desc_buf *sdbuf;/* [ref] */
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_QuerySecurity {
struct {
struct policy_handle *handle;/* [ref] */
uint32_t sec_info;
} in;
struct {
struct sec_desc_buf **sdbuf;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_Shutdown {
struct {
struct policy_handle *connect_handle;/* [ref] */
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_LookupDomain {
struct {
struct policy_handle *connect_handle;/* [ref] */
struct lsa_String *domain_name;/* [ref] */
} in;
struct {
struct dom_sid2 **sid;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_EnumDomains {
struct {
struct policy_handle *connect_handle;/* [ref] */
uint32_t buf_size;
uint32_t *resume_handle;/* [ref] */
} in;
struct {
struct samr_SamArray **sam;/* [ref] */
uint32_t *num_entries;/* [ref] */
uint32_t *resume_handle;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_OpenDomain {
struct {
struct policy_handle *connect_handle;/* [ref] */
uint32_t access_mask;
struct dom_sid2 *sid;/* [ref] */
} in;
struct {
struct policy_handle *domain_handle;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_QueryDomainInfo {
struct {
struct policy_handle *domain_handle;/* [ref] */
enum samr_DomainInfoClass level;
} in;
struct {
union samr_DomainInfo **info;/* [ref,switch_is(level)] */
NTSTATUS result;
} out;
};
struct samr_SetDomainInfo {
struct {
struct policy_handle *domain_handle;/* [ref] */
enum samr_DomainInfoClass level;
union samr_DomainInfo *info;/* [ref,switch_is(level)] */
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_CreateDomainGroup {
struct {
struct policy_handle *domain_handle;/* [ref] */
struct lsa_String *name;/* [ref] */
uint32_t access_mask;
} in;
struct {
struct policy_handle *group_handle;/* [ref] */
uint32_t *rid;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_EnumDomainGroups {
struct {
struct policy_handle *domain_handle;/* [ref] */
uint32_t max_size;
uint32_t *resume_handle;/* [ref] */
} in;
struct {
struct samr_SamArray **sam;/* [ref] */
uint32_t *num_entries;/* [ref] */
uint32_t *resume_handle;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_CreateUser {
struct {
struct policy_handle *domain_handle;/* [ref] */
struct lsa_String *account_name;/* [ref] */
uint32_t access_mask;
} in;
struct {
struct policy_handle *user_handle;/* [ref] */
uint32_t *rid;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_EnumDomainUsers {
struct {
struct policy_handle *domain_handle;/* [ref] */
uint32_t acct_flags;
uint32_t max_size;
uint32_t *resume_handle;/* [ref] */
} in;
struct {
struct samr_SamArray **sam;/* [ref] */
uint32_t *num_entries;/* [ref] */
uint32_t *resume_handle;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_CreateDomAlias {
struct {
struct policy_handle *domain_handle;/* [ref] */
struct lsa_String *alias_name;/* [ref] */
uint32_t access_mask;
} in;
struct {
struct policy_handle *alias_handle;/* [ref] */
uint32_t *rid;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_EnumDomainAliases {
struct {
struct policy_handle *domain_handle;/* [ref] */
uint32_t max_size;
uint32_t *resume_handle;/* [ref] */
} in;
struct {
struct samr_SamArray **sam;/* [ref] */
uint32_t *num_entries;/* [ref] */
uint32_t *resume_handle;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_GetAliasMembership {
struct {
struct policy_handle *domain_handle;/* [ref] */
struct lsa_SidArray *sids;/* [ref] */
} in;
struct {
struct samr_Ids *rids;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_LookupNames {
struct {
struct policy_handle *domain_handle;/* [ref] */
uint32_t num_names;/* [range(0,1000)] */
struct lsa_String *names;/* [length_is(num_names),size_is(1000)] */
} in;
struct {
struct samr_Ids *rids;/* [ref] */
struct samr_Ids *types;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_LookupRids {
struct {
struct policy_handle *domain_handle;/* [ref] */
uint32_t num_rids;/* [range(0,1000)] */
uint32_t *rids;/* [length_is(num_rids),size_is(1000)] */
} in;
struct {
struct lsa_Strings *names;/* [ref] */
struct samr_Ids *types;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_OpenGroup {
struct {
struct policy_handle *domain_handle;/* [ref] */
uint32_t access_mask;
uint32_t rid;
} in;
struct {
struct policy_handle *group_handle;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_QueryGroupInfo {
struct {
struct policy_handle *group_handle;/* [ref] */
enum samr_GroupInfoEnum level;
} in;
struct {
union samr_GroupInfo **info;/* [ref,switch_is(level)] */
NTSTATUS result;
} out;
};
struct samr_SetGroupInfo {
struct {
struct policy_handle *group_handle;/* [ref] */
enum samr_GroupInfoEnum level;
union samr_GroupInfo *info;/* [ref,switch_is(level)] */
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_AddGroupMember {
struct {
struct policy_handle *group_handle;/* [ref] */
uint32_t rid;
uint32_t flags;
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_DeleteDomainGroup {
struct {
struct policy_handle *group_handle;/* [ref] */
} in;
struct {
struct policy_handle *group_handle;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_DeleteGroupMember {
struct {
struct policy_handle *group_handle;/* [ref] */
uint32_t rid;
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_QueryGroupMember {
struct {
struct policy_handle *group_handle;/* [ref] */
} in;
struct {
struct samr_RidTypeArray **rids;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_SetMemberAttributesOfGroup {
struct {
struct policy_handle *group_handle;/* [ref] */
uint32_t unknown1;
uint32_t unknown2;
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_OpenAlias {
struct {
struct policy_handle *domain_handle;/* [ref] */
uint32_t access_mask;
uint32_t rid;
} in;
struct {
struct policy_handle *alias_handle;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_QueryAliasInfo {
struct {
struct policy_handle *alias_handle;/* [ref] */
enum samr_AliasInfoEnum level;
} in;
struct {
union samr_AliasInfo **info;/* [ref,switch_is(level)] */
NTSTATUS result;
} out;
};
struct samr_SetAliasInfo {
struct {
struct policy_handle *alias_handle;/* [ref] */
enum samr_AliasInfoEnum level;
union samr_AliasInfo *info;/* [ref,switch_is(level)] */
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_DeleteDomAlias {
struct {
struct policy_handle *alias_handle;/* [ref] */
} in;
struct {
struct policy_handle *alias_handle;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_AddAliasMember {
struct {
struct policy_handle *alias_handle;/* [ref] */
struct dom_sid2 *sid;/* [ref] */
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_DeleteAliasMember {
struct {
struct policy_handle *alias_handle;/* [ref] */
struct dom_sid2 *sid;/* [ref] */
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_GetMembersInAlias {
struct {
struct policy_handle *alias_handle;/* [ref] */
} in;
struct {
struct lsa_SidArray *sids;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_OpenUser {
struct {
struct policy_handle *domain_handle;/* [ref] */
uint32_t access_mask;
uint32_t rid;
} in;
struct {
struct policy_handle *user_handle;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_DeleteUser {
struct {
struct policy_handle *user_handle;/* [ref] */
} in;
struct {
struct policy_handle *user_handle;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_QueryUserInfo {
struct {
struct policy_handle *user_handle;/* [ref] */
enum samr_UserInfoLevel level;
} in;
struct {
union samr_UserInfo **info;/* [ref,switch_is(level)] */
NTSTATUS result;
} out;
};
struct samr_SetUserInfo {
struct {
struct policy_handle *user_handle;/* [ref] */
enum samr_UserInfoLevel level;
union samr_UserInfo *info;/* [ref,switch_is(level)] */
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_ChangePasswordUser {
struct {
struct policy_handle *user_handle;/* [ref] */
uint8_t lm_present;
struct samr_Password *old_lm_crypted;/* [unique] */
struct samr_Password *new_lm_crypted;/* [unique] */
uint8_t nt_present;
struct samr_Password *old_nt_crypted;/* [unique] */
struct samr_Password *new_nt_crypted;/* [unique] */
uint8_t cross1_present;
struct samr_Password *nt_cross;/* [unique] */
uint8_t cross2_present;
struct samr_Password *lm_cross;/* [unique] */
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_GetGroupsForUser {
struct {
struct policy_handle *user_handle;/* [ref] */
} in;
struct {
struct samr_RidWithAttributeArray **rids;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_QueryDisplayInfo {
struct {
struct policy_handle *domain_handle;/* [ref] */
uint16_t level;
uint32_t start_idx;
uint32_t max_entries;
uint32_t buf_size;
} in;
struct {
uint32_t *total_size;/* [ref] */
uint32_t *returned_size;/* [ref] */
union samr_DispInfo *info;/* [ref,switch_is(level)] */
NTSTATUS result;
} out;
};
struct samr_GetDisplayEnumerationIndex {
struct {
struct policy_handle *domain_handle;/* [ref] */
uint16_t level;
struct lsa_String *name;/* [ref] */
} in;
struct {
uint32_t *idx;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_TestPrivateFunctionsDomain {
struct {
struct policy_handle *domain_handle;/* [ref] */
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_TestPrivateFunctionsUser {
struct {
struct policy_handle *user_handle;/* [ref] */
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_GetUserPwInfo {
struct {
struct policy_handle *user_handle;/* [ref] */
} in;
struct {
struct samr_PwInfo *info;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_RemoveMemberFromForeignDomain {
struct {
struct policy_handle *domain_handle;/* [ref] */
struct dom_sid2 *sid;/* [ref] */
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_QueryDomainInfo2 {
struct {
struct policy_handle *domain_handle;/* [ref] */
enum samr_DomainInfoClass level;
} in;
struct {
union samr_DomainInfo **info;/* [ref,switch_is(level)] */
NTSTATUS result;
} out;
};
struct samr_QueryUserInfo2 {
struct {
struct policy_handle *user_handle;/* [ref] */
enum samr_UserInfoLevel level;
} in;
struct {
union samr_UserInfo **info;/* [ref,switch_is(level)] */
NTSTATUS result;
} out;
};
struct samr_QueryDisplayInfo2 {
struct {
struct policy_handle *domain_handle;/* [ref] */
uint16_t level;
uint32_t start_idx;
uint32_t max_entries;
uint32_t buf_size;
} in;
struct {
uint32_t *total_size;/* [ref] */
uint32_t *returned_size;/* [ref] */
union samr_DispInfo *info;/* [ref,switch_is(level)] */
NTSTATUS result;
} out;
};
struct samr_GetDisplayEnumerationIndex2 {
struct {
struct policy_handle *domain_handle;/* [ref] */
uint16_t level;
struct lsa_String *name;/* [ref] */
} in;
struct {
uint32_t *idx;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_CreateUser2 {
struct {
struct policy_handle *domain_handle;/* [ref] */
struct lsa_String *account_name;/* [ref] */
uint32_t acct_flags;
uint32_t access_mask;
} in;
struct {
struct policy_handle *user_handle;/* [ref] */
uint32_t *access_granted;/* [ref] */
uint32_t *rid;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_QueryDisplayInfo3 {
struct {
struct policy_handle *domain_handle;/* [ref] */
uint16_t level;
uint32_t start_idx;
uint32_t max_entries;
uint32_t buf_size;
} in;
struct {
uint32_t *total_size;/* [ref] */
uint32_t *returned_size;/* [ref] */
union samr_DispInfo *info;/* [ref,switch_is(level)] */
NTSTATUS result;
} out;
};
struct samr_AddMultipleMembersToAlias {
struct {
struct policy_handle *alias_handle;/* [ref] */
struct lsa_SidArray *sids;/* [ref] */
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_RemoveMultipleMembersFromAlias {
struct {
struct policy_handle *alias_handle;/* [ref] */
struct lsa_SidArray *sids;/* [ref] */
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_OemChangePasswordUser2 {
struct {
struct lsa_AsciiString *server;/* [unique] */
struct lsa_AsciiString *account;/* [ref] */
struct samr_CryptPassword *password;/* [unique] */
struct samr_Password *hash;/* [unique] */
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_ChangePasswordUser2 {
struct {
struct lsa_String *server;/* [unique] */
struct lsa_String *account;/* [ref] */
struct samr_CryptPassword *nt_password;/* [unique] */
struct samr_Password *nt_verifier;/* [unique] */
uint8_t lm_change;
struct samr_CryptPassword *lm_password;/* [unique] */
struct samr_Password *lm_verifier;/* [unique] */
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_GetDomPwInfo {
struct {
struct lsa_String *domain_name;/* [unique] */
} in;
struct {
struct samr_PwInfo *info;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_Connect2 {
struct {
const char *system_name;/* [unique,charset(UTF16)] */
uint32_t access_mask;
} in;
struct {
struct policy_handle *connect_handle;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_SetUserInfo2 {
struct {
struct policy_handle *user_handle;/* [ref] */
enum samr_UserInfoLevel level;
union samr_UserInfo *info;/* [ref,switch_is(level)] */
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_SetBootKeyInformation {
struct {
struct policy_handle *connect_handle;/* [ref] */
uint32_t unknown1;
uint32_t unknown2;
uint32_t unknown3;
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_GetBootKeyInformation {
struct {
struct policy_handle *domain_handle;/* [ref] */
} in;
struct {
uint32_t *unknown;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_Connect3 {
struct {
const char *system_name;/* [unique,charset(UTF16)] */
uint32_t unknown;
uint32_t access_mask;
} in;
struct {
struct policy_handle *connect_handle;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_Connect4 {
struct {
const char *system_name;/* [unique,charset(UTF16)] */
enum samr_ConnectVersion client_version;
uint32_t access_mask;
} in;
struct {
struct policy_handle *connect_handle;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_ChangePasswordUser3 {
struct {
struct lsa_String *server;/* [unique] */
struct lsa_String *account;/* [ref] */
struct samr_CryptPassword *nt_password;/* [unique] */
struct samr_Password *nt_verifier;/* [unique] */
uint8_t lm_change;
struct samr_CryptPassword *lm_password;/* [unique] */
struct samr_Password *lm_verifier;/* [unique] */
struct samr_CryptPassword *password3;/* [unique] */
} in;
struct {
struct samr_DomInfo1 **dominfo;/* [ref] */
struct samr_ChangeReject **reject;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_Connect5 {
struct {
const char *system_name;/* [unique,charset(UTF16)] */
uint32_t access_mask;
uint32_t level_in;
union samr_ConnectInfo *info_in;/* [ref,switch_is(level_in)] */
} in;
struct {
uint32_t *level_out;/* [ref] */
union samr_ConnectInfo *info_out;/* [ref,switch_is(*level_out)] */
struct policy_handle *connect_handle;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_RidToSid {
struct {
struct policy_handle *domain_handle;/* [ref] */
uint32_t rid;
} in;
struct {
struct dom_sid2 **sid;/* [ref] */
NTSTATUS result;
} out;
};
struct samr_SetDsrmPassword {
struct {
struct lsa_String *name;/* [unique] */
uint32_t unknown;
struct samr_Password *hash;/* [unique] */
} in;
struct {
NTSTATUS result;
} out;
};
struct samr_ValidatePassword {
struct {
enum samr_ValidatePasswordLevel level;
union samr_ValidatePasswordReq *req;/* [ref,switch_is(level)] */
} in;
struct {
union samr_ValidatePasswordRep **rep;/* [ref,switch_is(level)] */
NTSTATUS result;
} out;
};
#endif /* _HEADER_samr */
|