QSIG fully implemented
[obnox/wireshark/wip.git] / epan / dissectors / pidl / samr.idl
1 #include "idl_types.h"
2
3 /*
4   samr interface definition
5 */
6 /* import "misc.idl", "lsa.idl", "security.idl";*/
7
8 /*
9   Thanks to Todd Sabin for some information from his samr.idl in acltools
10 */
11
12 [ uuid("12345778-1234-abcd-ef00-0123456789ac"),
13   version(1.0),
14   endpoint("ncacn_np:[\\pipe\\samr]","ncacn_ip_tcp:", "ncalrpc:"),
15   pointer_default(unique),
16   pointer_default_top(unique)
17 ] interface samr
18 {
19         declare bitmap security_secinfo;
20
21         typedef [public,noejs] struct {
22                 [value(strlen_m_term(name)*2)] uint16 name_len;
23                 [value(strlen_m_term(name)*2)] uint16 name_size;
24                 [string,charset(UTF16)] uint16 *name;
25         } lsa_String;
26
27         typedef [public] struct {
28                 uint32 count;
29                 [size_is(count)] lsa_String *names;
30         } lsa_Strings;
31
32
33         typedef [v1_enum] enum {
34                 SID_NAME_USE_NONE = 0,/* NOTUSED */
35                 SID_NAME_USER     = 1, /* user */
36                 SID_NAME_DOM_GRP  = 2, /* domain group */
37                 SID_NAME_DOMAIN   = 3, /* domain: don't know what this is */
38                 SID_NAME_ALIAS    = 4, /* local group */
39                 SID_NAME_WKN_GRP  = 5, /* well-known group */
40                 SID_NAME_DELETED  = 6, /* deleted account: needed for c2 rating */
41                 SID_NAME_INVALID  = 7, /* invalid account */
42                 SID_NAME_UNKNOWN  = 8, /* oops. */
43                 SID_NAME_COMPUTER = 9  /* machine */
44         } lsa_SidType;
45
46         /* account control (acct_flags) bits */
47         typedef [public,bitmap32bit] bitmap {
48                 ACB_DISABLED                    = 0x00000001,  /* 1 = User account disabled */
49                 ACB_HOMDIRREQ                   = 0x00000002,  /* 1 = Home directory required */
50                 ACB_PWNOTREQ                    = 0x00000004,  /* 1 = User password not required */
51                 ACB_TEMPDUP                     = 0x00000008,  /* 1 = Temporary duplicate account */
52                 ACB_NORMAL                      = 0x00000010,  /* 1 = Normal user account */
53                 ACB_MNS                         = 0x00000020,  /* 1 = MNS logon user account */
54                 ACB_DOMTRUST                    = 0x00000040,  /* 1 = Interdomain trust account */
55                 ACB_WSTRUST                     = 0x00000080,  /* 1 = Workstation trust account */
56                 ACB_SVRTRUST                    = 0x00000100,  /* 1 = Server trust account */
57                 ACB_PWNOEXP                     = 0x00000200,  /* 1 = User password does not expire */
58                 ACB_AUTOLOCK                    = 0x00000400,  /* 1 = Account auto locked */
59                 ACB_ENC_TXT_PWD_ALLOWED         = 0x00000800,  /* 1 = Encryped text password is allowed */
60                 ACB_SMARTCARD_REQUIRED          = 0x00001000,  /* 1 = Smart Card required */
61                 ACB_TRUSTED_FOR_DELEGATION      = 0x00002000,  /* 1 = Trusted for Delegation */
62                 ACB_NOT_DELEGATED               = 0x00004000,  /* 1 = Not delegated */
63                 ACB_USE_DES_KEY_ONLY            = 0x00008000,  /* 1 = Use DES key only */
64                 ACB_DONT_REQUIRE_PREAUTH        = 0x00010000,  /* 1 = Preauth not required */
65                 ACB_PW_EXPIRED                  = 0x00020000,  /* 1 = Password Expired */
66                 ACB_NO_AUTH_DATA_REQD           = 0x00080000   /* 1 = No authorization data required */
67         } samr_AcctFlags;
68
69         typedef [bitmap32bit] bitmap {
70                 SAMR_ACCESS_CONNECT_TO_SERVER   = 0x00000001,
71                 SAMR_ACCESS_SHUTDOWN_SERVER     = 0x00000002,
72                 SAMR_ACCESS_INITIALIZE_SERVER   = 0x00000004,
73                 SAMR_ACCESS_CREATE_DOMAIN       = 0x00000008,
74                 SAMR_ACCESS_ENUM_DOMAINS        = 0x00000010,
75                 SAMR_ACCESS_OPEN_DOMAIN         = 0x00000020
76         } samr_ConnectAccessMask;
77
78         typedef [bitmap32bit] bitmap {
79                 USER_ACCESS_GET_NAME_ETC             = 0x00000001,
80                 USER_ACCESS_GET_LOCALE               = 0x00000002,
81                 USER_ACCESS_SET_LOC_COM              = 0x00000004,
82                 USER_ACCESS_GET_LOGONINFO            = 0x00000008,
83                 USER_ACCESS_GET_ATTRIBUTES           = 0x00000010,
84                 USER_ACCESS_SET_ATTRIBUTES           = 0x00000020,
85                 USER_ACCESS_CHANGE_PASSWORD          = 0x00000040,
86                 USER_ACCESS_SET_PASSWORD             = 0x00000080,
87                 USER_ACCESS_GET_GROUPS               = 0x00000100,
88                 USER_ACCESS_GET_GROUP_MEMBERSHIP     = 0x00000200,
89                 USER_ACCESS_CHANGE_GROUP_MEMBERSHIP  = 0x00000400
90         } samr_UserAccessMask;
91
92         typedef [bitmap32bit] bitmap {
93                 DOMAIN_ACCESS_LOOKUP_INFO_1  = 0x00000001,
94                 DOMAIN_ACCESS_SET_INFO_1     = 0x00000002,
95                 DOMAIN_ACCESS_LOOKUP_INFO_2  = 0x00000004,
96                 DOMAIN_ACCESS_SET_INFO_2     = 0x00000008,
97                 DOMAIN_ACCESS_CREATE_USER    = 0x00000010,
98                 DOMAIN_ACCESS_CREATE_GROUP   = 0x00000020,
99                 DOMAIN_ACCESS_CREATE_ALIAS   = 0x00000040,
100                 DOMAIN_ACCESS_LOOKUP_ALIAS   = 0x00000080,
101                 DOMAIN_ACCESS_ENUM_ACCOUNTS  = 0x00000100,
102                 DOMAIN_ACCESS_OPEN_ACCOUNT   = 0x00000200,
103                 DOMAIN_ACCESS_SET_INFO_3     = 0x00000400
104         } samr_DomainAccessMask;
105
106         typedef [bitmap32bit] bitmap {
107                 GROUP_ACCESS_LOOKUP_INFO     = 0x00000001,
108                 GROUP_ACCESS_SET_INFO        = 0x00000002,
109                 GROUP_ACCESS_ADD_MEMBER      = 0x00000004,
110                 GROUP_ACCESS_REMOVE_MEMBER   = 0x00000008,
111                 GROUP_ACCESS_GET_MEMBERS     = 0x00000010
112         } samr_GroupAccessMask;
113
114         typedef [bitmap32bit] bitmap {
115                 ALIAS_ACCESS_ADD_MEMBER      = 0x00000001,
116                 ALIAS_ACCESS_REMOVE_MEMBER   = 0x00000002,
117                 ALIAS_ACCESS_GET_MEMBERS     = 0x00000004,
118                 ALIAS_ACCESS_LOOKUP_INFO     = 0x00000008,
119                 ALIAS_ACCESS_SET_INFO        = 0x00000010
120         } samr_AliasAccessMask;
121
122         /******************/
123         /* Function: 0x00 */
124         NTSTATUS samr_Connect (
125                 /* notice the lack of [string] */
126                 [in]       uint16 *system_name,
127                 [in]       samr_ConnectAccessMask access_mask,
128                 [out,ref]  policy_handle *connect_handle
129                 );
130
131
132         /******************/
133         /* Function: 0x01 */
134         [public] NTSTATUS samr_Close (
135                 [in,out,ref]  policy_handle *handle
136                 );
137
138         /******************/
139         /* Function: 0x02 */
140
141         NTSTATUS samr_SetSecurity (
142                 [in,ref]          policy_handle *handle,
143                 [in]              security_secinfo sec_info,
144                 [in,ref]          sec_desc_buf *sdbuf
145                 );
146
147         /******************/
148         /* Function: 0x03 */
149
150         NTSTATUS samr_QuerySecurity (
151                 [in,ref]          policy_handle *handle,
152                 [in]              security_secinfo sec_info,
153                 [out]             sec_desc_buf *sdbuf
154                 );
155
156         /******************/
157         /* Function: 0x04 */
158
159         /*
160           shutdown the SAM - once you call this the SAM will be dead
161         */
162         NTSTATUS samr_Shutdown (
163                 [in,ref]   policy_handle *connect_handle
164                 );
165
166         /******************/
167         /* Function: 0x05 */
168         NTSTATUS samr_LookupDomain (
169                 [in,ref]  policy_handle *connect_handle,                
170                 [in,ref]  lsa_String *domain_name,
171                 [out]     dom_sid2 *sid
172                 );
173
174
175         /******************/
176         /* Function: 0x06 */
177
178         typedef struct {
179                 uint32 idx;
180                 lsa_String name;
181         } samr_SamEntry;
182
183         typedef struct {
184                 uint32 count;
185                 [size_is(count)] samr_SamEntry *entries;
186         } samr_SamArray;
187
188         NTSTATUS samr_EnumDomains (
189                 [in,ref]      policy_handle *connect_handle,
190                 [in,out,ref]  uint32 *resume_handle,
191                 [in]          uint32 buf_size,
192                 [out]         samr_SamArray *sam,
193                 [out]         uint32 num_entries
194                 );
195
196
197         /************************/
198         /* Function    0x07     */
199         [public] NTSTATUS samr_OpenDomain(
200                 [in,ref]      policy_handle *connect_handle,
201                 [in]          samr_DomainAccessMask access_mask,
202                 [in,ref]      dom_sid2 *sid,
203                 [out,ref]     policy_handle *domain_handle
204                 );
205
206         /************************/
207         /* Function    0x08     */
208         /* server roles */
209         typedef [v1_enum] enum {
210                 SAMR_ROLE_STANDALONE    = 0,
211                 SAMR_ROLE_DOMAIN_MEMBER = 1,
212                 SAMR_ROLE_DOMAIN_BDC    = 2,
213                 SAMR_ROLE_DOMAIN_PDC    = 3
214         } samr_Role;
215
216         /* password properties flags */
217         typedef [public,bitmap32bit] bitmap {
218                 DOMAIN_PASSWORD_COMPLEX         = 0x00000001,
219                 DOMAIN_PASSWORD_NO_ANON_CHANGE  = 0x00000002,
220                 DOMAIN_PASSWORD_NO_CLEAR_CHANGE = 0x00000004,
221                 DOMAIN_PASSWORD_LOCKOUT_ADMINS  = 0x00000008,
222                 DOMAIN_PASSWORD_STORE_CLEARTEXT = 0x00000010,
223                 DOMAIN_REFUSE_PASSWORD_CHANGE   = 0x00000020
224         } samr_PasswordProperties;
225
226         typedef struct {
227                 uint16 min_password_length;
228                 uint16 password_history_length;
229                 samr_PasswordProperties password_properties;
230                 /* yes, these are signed. They are in negative 100ns */
231                 dlong  max_password_age;
232                 dlong  min_password_age;
233         } samr_DomInfo1;
234
235         typedef struct {
236                 NTTIME force_logoff_time;
237                 lsa_String comment;
238                 lsa_String domain_name;
239                 lsa_String primary; /* PDC name if this is a BDC */
240                 udlong sequence_num;
241                 uint32 unknown2;
242                 samr_Role role;
243                 uint32 unknown3;
244                 uint32 num_users;
245                 uint32 num_groups;
246                 uint32 num_aliases;
247         } samr_DomInfo2;
248
249         typedef struct {
250                 NTTIME force_logoff_time;
251         } samr_DomInfo3;
252
253         typedef struct {
254                 lsa_String comment;
255         } samr_DomInfo4;
256
257         typedef struct {
258                 lsa_String domain_name;
259         } samr_DomInfo5;
260
261         typedef struct {
262                 lsa_String primary;
263         } samr_DomInfo6;
264
265         typedef struct {
266                 samr_Role role;
267         } samr_DomInfo7;
268
269         typedef struct {
270                 hyper sequence_num;
271                 NTTIME domain_create_time;
272         } samr_DomInfo8;
273
274         typedef struct {
275                 uint32 unknown; /* w2k3 returns 1 */
276         } samr_DomInfo9;
277
278         typedef struct {
279                 samr_DomInfo2 info2;
280                 hyper lockout_duration;
281                 hyper lockout_window;
282                 uint16 lockout_threshold;
283         } samr_DomInfo11;
284
285         typedef struct {
286                 hyper lockout_duration;
287                 hyper lockout_window;
288                 uint16 lockout_threshold;
289         } samr_DomInfo12;
290
291         typedef struct {
292                 hyper sequence_num;
293                 NTTIME domain_create_time;
294                 uint32 unknown1;
295                 uint32 unknown2;
296         } samr_DomInfo13;
297
298         typedef [switch_type(uint16)] union {
299                 [case(1)] samr_DomInfo1 info1;
300                 [case(2)] samr_DomInfo2 info2;
301                 [case(3)] samr_DomInfo3 info3;
302                 [case(4)] samr_DomInfo4 info4;
303                 [case(5)] samr_DomInfo5 info5;
304                 [case(6)] samr_DomInfo6 info6;
305                 [case(7)] samr_DomInfo7 info7;
306                 [case(8)] samr_DomInfo8 info8;
307                 [case(9)] samr_DomInfo9 info9;
308                 [case(11)] samr_DomInfo11 info11;
309                 [case(12)] samr_DomInfo12 info12;
310                 [case(13)] samr_DomInfo13 info13;
311         } samr_DomainInfo;
312
313         NTSTATUS samr_QueryDomainInfo(
314                 [in,ref]      policy_handle *domain_handle,
315                 [in]          uint16 level,
316                 [out,switch_is(level)] samr_DomainInfo *info
317                 );
318
319         /************************/
320         /* Function    0x09     */
321         /*
322           only levels 1, 3, 4, 6, 7, 9, 12 are valid for this 
323           call in w2k3
324         */
325         NTSTATUS samr_SetDomainInfo(
326                 [in,ref]      policy_handle *domain_handle,
327                 [in]          uint16 level,
328                 [in,switch_is(level),ref] samr_DomainInfo *info
329                 );
330
331
332         /************************/
333         /* Function    0x0a     */
334         NTSTATUS samr_CreateDomainGroup(
335                 [in,ref]      policy_handle *domain_handle,
336                 [in,ref]      lsa_String *name,
337                 [in]          samr_GroupAccessMask access_mask,
338                 [out,ref]     policy_handle *group_handle,
339                 [out,ref]     uint32 *rid
340                 );
341                 
342
343         /************************/
344         /* Function    0x0b     */
345         NTSTATUS samr_EnumDomainGroups(
346                 [in,ref]      policy_handle *domain_handle,
347                 [in,out,ref]  uint32 *resume_handle,
348                 [in]          uint32 max_size,
349                 [out]         samr_SamArray *sam,
350                 [out]         uint32 num_entries
351                 );
352
353         /************************/
354         /* Function    0x0c     */
355         NTSTATUS samr_CreateUser(
356                 [in,ref]      policy_handle *domain_handle,
357                 [in,ref]      lsa_String *account_name,
358                 [in]          samr_UserAccessMask access_mask,
359                 [out,ref]     policy_handle *user_handle,
360                 [out,ref]     uint32 *rid
361                 );
362
363         /************************/
364         /* Function    0x0d     */
365
366
367         /* w2k3 treats max_size as max_users*54 and sets the
368            resume_handle as the rid of the last user sent
369         */
370         const int SAMR_ENUM_USERS_MULTIPLIER = 54;
371
372         NTSTATUS samr_EnumDomainUsers(
373                 [in,ref]      policy_handle *domain_handle,
374                 [in,out,ref]  uint32 *resume_handle,
375                 [in]          samr_AcctFlags acct_flags,
376                 [in]          uint32 max_size,
377                 [out]         samr_SamArray *sam,
378                 [out]         uint32 num_entries
379                 );
380
381         /************************/
382         /* Function    0x0e     */
383         NTSTATUS samr_CreateDomAlias(
384                 [in,ref]      policy_handle  *domain_handle,
385                 [in,ref]      lsa_String     *alias_name,
386                 [in]          samr_AliasAccessMask access_mask,
387                 [out,ref]     policy_handle  *alias_handle,
388                 [out,ref]     uint32         *rid
389                 );
390
391         /************************/
392         /* Function    0x0f     */
393         NTSTATUS samr_EnumDomainAliases(
394                 [in,ref]      policy_handle *domain_handle,
395                 [in,out,ref]  uint32 *resume_handle,
396                 [in]          samr_AcctFlags acct_flags,
397                 [out]         samr_SamArray *sam,
398                 [out]         uint32 num_entries
399                 );
400
401         /************************/
402         /* Function    0x10     */
403
404         typedef struct {
405                 [range(0,1024)]  uint32 count;
406                 [size_is(count)] uint32 *ids;
407         } samr_Ids;
408
409         typedef struct {
410                 [range(0,1024)]  uint32 count;
411                 [size_is(count)] lsa_SidType *types;
412         } samr_Types;
413
414         NTSTATUS samr_GetAliasMembership(
415                 [in,ref]      policy_handle *domain_handle,
416                 [in,ref]      lsa_SidArray  *sids,
417                 [out,ref]     samr_Ids *rids
418                 );
419
420         /************************/
421         /* Function    0x11     */
422
423         [public] NTSTATUS samr_LookupNames(
424                 [in,ref]      policy_handle *domain_handle,
425                 [in,range(0,1000)] uint32 num_names,
426                 [in,size_is(1000),length_is(num_names), ref] lsa_String *names,
427                 [out]         samr_Ids rids,
428                 [out]         samr_Types types
429                 );
430
431
432         /************************/
433         /* Function    0x12     */
434         NTSTATUS samr_LookupRids(
435                 [in,ref]      policy_handle *domain_handle,
436                 [in,range(0,1000)] uint32 num_rids,
437                 [in,size_is(1000),length_is(num_rids),ref] uint32 *rids,
438                 [out]         lsa_Strings names,
439                 [out]         samr_Types types
440                 );
441
442         /************************/
443         /* Function    0x13     */
444         NTSTATUS samr_OpenGroup(
445                 [in,ref]      policy_handle *domain_handle,
446                 [in]          samr_GroupAccessMask access_mask,
447                 [in]          uint32 rid,
448                 [out,ref]     policy_handle *group_handle
449                 );
450
451         /* Group attributes */
452         typedef [public,bitmap32bit] bitmap {
453                 SE_GROUP_MANDATORY              = 0x00000001,
454                 SE_GROUP_ENABLED_BY_DEFAULT     = 0x00000002,
455                 SE_GROUP_ENABLED                = 0x00000004,
456                 SE_GROUP_OWNER                  = 0x00000008,
457                 SE_GROUP_USE_FOR_DENY_ONLY      = 0x00000010,
458                 SE_GROUP_RESOURCE               = 0x20000000,
459                 SE_GROUP_LOGON_ID               = 0xC0000000
460         } samr_GroupAttrs;
461
462         /************************/
463         /* Function    0x14     */
464
465         typedef struct {
466                 lsa_String name;
467                 samr_GroupAttrs attributes;
468                 uint32 num_members;
469                 lsa_String description;
470         } samr_GroupInfoAll;
471
472         typedef struct {
473                 samr_GroupAttrs attributes;
474         } samr_GroupInfoAttributes;
475
476         typedef struct {
477                 lsa_String description;
478         } samr_GroupInfoDescription;
479
480         typedef enum {
481                 GROUPINFOALL          = 1,
482                 GROUPINFONAME         = 2,
483                 GROUPINFOATTRIBUTES   = 3,
484                 GROUPINFODESCRIPTION  = 4,
485                 GROUPINFOALL2         = 5
486         } samr_GroupInfoEnum;
487
488         typedef [switch_type(samr_GroupInfoEnum)] union {
489                 [case(GROUPINFOALL)]         samr_GroupInfoAll        all;
490                 [case(GROUPINFONAME)]        lsa_String               name;
491                 [case(GROUPINFOATTRIBUTES)]  samr_GroupInfoAttributes attributes;
492                 [case(GROUPINFODESCRIPTION)] lsa_String               description;
493                 [case(GROUPINFOALL2)]        samr_GroupInfoAll        all2;
494         } samr_GroupInfo;
495
496         NTSTATUS samr_QueryGroupInfo(
497                 [in,ref]                  policy_handle *group_handle,
498                 [in]                      samr_GroupInfoEnum level,
499                 [out,switch_is(level)]    samr_GroupInfo *info
500                 );
501
502         /************************/
503         /* Function    0x15     */
504         NTSTATUS samr_SetGroupInfo(
505                 [in,ref]                  policy_handle *group_handle,
506                 [in]                      samr_GroupInfoEnum level,
507                 [in,switch_is(level),ref] samr_GroupInfo *info
508                 );
509
510         /************************/
511         /* Function    0x16     */
512         NTSTATUS samr_AddGroupMember(
513                 [in,ref]                  policy_handle *group_handle,
514                 [in]                      uint32 rid,
515                 [in]                      uint32 flags
516                 );
517
518         /************************/
519         /* Function    0x17     */
520         NTSTATUS samr_DeleteDomainGroup(
521                 [in,out,ref]   policy_handle *group_handle
522                 );
523
524         /************************/
525         /* Function    0x18     */
526         NTSTATUS samr_DeleteGroupMember(
527                 [in,ref]                  policy_handle *group_handle,
528                 [in]                      uint32 rid
529                 );
530
531
532         /************************/
533         /* Function    0x19     */
534         typedef struct {
535                 uint32 count;
536                 [size_is(count)] uint32 *rids;
537                 [size_is(count)] lsa_SidType *types;
538         } samr_RidTypeArray;
539
540         NTSTATUS samr_QueryGroupMember(
541                 [in,ref]  policy_handle *group_handle,
542                 [out]     samr_RidTypeArray *rids
543                 );
544
545
546         /************************/
547         /* Function    0x1a     */
548
549         /*
550           win2003 seems to accept any data at all for the two integers
551           below, and doesn't seem to do anything with them that I can
552           see. Weird. I really expected the first integer to be a rid
553           and the second to be the attributes for that rid member.
554         */
555         NTSTATUS samr_SetMemberAttributesOfGroup(
556                 [in,ref]  policy_handle *group_handle,
557                 [in]      uint32 unknown1,
558                 [in]      uint32 unknown2
559                 );
560
561
562         /************************/
563         /* Function    0x1b     */
564         NTSTATUS samr_OpenAlias (
565                 [in,ref]      policy_handle *domain_handle,
566                 [in]          samr_AliasAccessMask access_mask,
567                 [in]          uint32 rid,
568                 [out,ref]     policy_handle *alias_handle
569                 );
570
571
572         /************************/
573         /* Function    0x1c     */
574
575         typedef struct {
576                 lsa_String name;
577                 uint32 num_members;
578                 lsa_String description;
579         } samr_AliasInfoAll;
580
581         typedef enum {
582                 ALIASINFOALL          = 1,
583                 ALIASINFONAME         = 2,
584                 ALIASINFODESCRIPTION  = 3
585         } samr_AliasInfoEnum;
586
587         typedef [switch_type(samr_AliasInfoEnum)] union {
588                 [case(ALIASINFOALL)] samr_AliasInfoAll all;
589                 [case(ALIASINFONAME)] lsa_String name;
590                 [case(ALIASINFODESCRIPTION)] lsa_String description;
591         } samr_AliasInfo;
592
593         NTSTATUS samr_QueryAliasInfo(
594                 [in,ref]                  policy_handle  *alias_handle,
595                 [in]                      samr_AliasInfoEnum      level,
596                 [out,switch_is(level)]    samr_AliasInfo *info
597                 );
598
599         /************************/
600         /* Function    0x1d     */
601         NTSTATUS samr_SetAliasInfo(
602                 [in,ref]                  policy_handle  *alias_handle,
603                 [in]                      samr_AliasInfoEnum      level,
604                 [in,switch_is(level)] samr_AliasInfo info
605                 );
606
607         /************************/
608         /* Function    0x1e     */
609         NTSTATUS samr_DeleteDomAlias(
610                 [in,out,ref]  policy_handle *alias_handle
611                 );
612
613         /************************/
614         /* Function    0x1f     */
615         NTSTATUS samr_AddAliasMember(
616                 [in,ref]  policy_handle *alias_handle,
617                 [in,ref]  dom_sid2      *sid
618                 );
619
620         /************************/
621         /* Function    0x20     */
622         NTSTATUS samr_DeleteAliasMember(
623                 [in,ref] policy_handle *alias_handle,
624                 [in,ref] dom_sid2      *sid
625                 );
626
627         /************************/
628         /* Function    0x21     */
629         NTSTATUS samr_GetMembersInAlias(
630                 [in,ref]   policy_handle *alias_handle,
631                 [out,ref]  lsa_SidArray    *sids
632                 );
633
634         /************************/
635         /* Function    0x22     */
636         [public] NTSTATUS samr_OpenUser(
637                 [in,ref]      policy_handle *domain_handle,
638                 [in]          samr_UserAccessMask access_mask,
639                 [in]          uint32 rid,
640                 [out,ref]     policy_handle *user_handle
641                 );
642
643         /************************/
644         /* Function    0x23     */
645         NTSTATUS samr_DeleteUser(
646                 [in,out,ref]   policy_handle *user_handle
647                 );
648
649         /************************/
650         /* Function    0x24     */
651         typedef struct {
652                 lsa_String account_name;
653                 lsa_String full_name;
654                 uint32 primary_gid;
655                 lsa_String description;
656                 lsa_String comment;
657         } samr_UserInfo1;
658
659         typedef struct {
660                 lsa_String comment;
661                 lsa_String unknown; /* settable, but doesn't stick. probably obsolete */
662                 uint16 country_code;
663                 uint16 code_page;
664         } samr_UserInfo2;
665
666         /* this is also used in samr and netlogon */
667         typedef [public, flag(NDR_PAHEX)] struct {
668                 uint16 units_per_week;
669                 [size_is(1260), length_is(units_per_week/8)] uint8 *bits;
670         } samr_LogonHours;
671
672         typedef struct {
673                 lsa_String account_name;
674                 lsa_String full_name;
675                 uint32 rid;
676                 uint32 primary_gid;
677                 lsa_String home_directory;
678                 lsa_String home_drive;
679                 lsa_String logon_script;
680                 lsa_String profile_path;
681                 lsa_String workstations;
682                 NTTIME last_logon;
683                 NTTIME last_logoff;
684                 NTTIME last_password_change;
685                 NTTIME allow_password_change;
686                 NTTIME force_password_change;
687                 samr_LogonHours logon_hours;
688                 uint16 bad_password_count;
689                 uint16 logon_count;
690                 samr_AcctFlags acct_flags;
691         } samr_UserInfo3;
692
693         typedef struct {
694                 samr_LogonHours logon_hours;
695         } samr_UserInfo4;
696
697         typedef struct {
698                 lsa_String account_name;
699                 lsa_String full_name;
700                 uint32 rid;
701                 uint32 primary_gid;
702                 lsa_String home_directory;
703                 lsa_String home_drive;
704                 lsa_String logon_script;
705                 lsa_String profile_path;
706                 lsa_String description;
707                 lsa_String workstations;
708                 NTTIME last_logon;
709                 NTTIME last_logoff;
710                 samr_LogonHours logon_hours;
711                 uint16 bad_password_count;
712                 uint16 logon_count;
713                 NTTIME last_password_change;
714                 NTTIME acct_expiry;
715                 samr_AcctFlags acct_flags;
716         } samr_UserInfo5;
717
718         typedef struct {
719                 lsa_String account_name;
720                 lsa_String full_name;
721         } samr_UserInfo6;
722
723         typedef struct {
724                 lsa_String account_name;
725         } samr_UserInfo7;
726
727         typedef struct {
728                 lsa_String full_name;
729         } samr_UserInfo8;
730
731         typedef struct {
732                 uint32 primary_gid;
733         } samr_UserInfo9;
734
735         typedef struct {
736                 lsa_String home_directory;
737                 lsa_String home_drive;
738         } samr_UserInfo10;
739
740         typedef struct {
741                 lsa_String logon_script;
742         } samr_UserInfo11;
743
744         typedef struct {
745                 lsa_String profile_path;
746         } samr_UserInfo12;
747
748         typedef struct {
749                 lsa_String description;
750         } samr_UserInfo13;
751
752         typedef struct {
753                 lsa_String workstations;
754         } samr_UserInfo14;
755
756         typedef struct {
757                 samr_AcctFlags acct_flags;
758         } samr_UserInfo16;
759         
760         typedef struct {
761                 NTTIME acct_expiry;
762         } samr_UserInfo17;
763
764         typedef struct {
765                 lsa_String parameters;
766         } samr_UserInfo20;
767
768         /* this defines the bits used for fields_present in info21 */
769         typedef [bitmap32bit] bitmap {
770                 SAMR_FIELD_ACCOUNT_NAME   = 0x00000001,
771                 SAMR_FIELD_FULL_NAME      = 0x00000002,
772                 SAMR_FIELD_PRIMARY_GID    = 0x00000008,
773                 SAMR_FIELD_DESCRIPTION    = 0x00000010,
774                 SAMR_FIELD_COMMENT        = 0x00000020,
775                 SAMR_FIELD_HOME_DIRECTORY = 0x00000040,
776                 SAMR_FIELD_HOME_DRIVE     = 0x00000080,
777                 SAMR_FIELD_LOGON_SCRIPT   = 0x00000100,
778                 SAMR_FIELD_PROFILE_PATH   = 0x00000200,
779                 SAMR_FIELD_WORKSTATIONS   = 0x00000400,
780                 SAMR_FIELD_LOGON_HOURS    = 0x00002000,
781                 SAMR_FIELD_ACCT_FLAGS     = 0x00100000,
782                 SAMR_FIELD_PARAMETERS     = 0x00200000,
783                 SAMR_FIELD_COUNTRY_CODE   = 0x00400000,
784                 SAMR_FIELD_CODE_PAGE      = 0x00800000,
785                 SAMR_FIELD_PASSWORD       = 0x01000000, /* either of these */
786                 SAMR_FIELD_PASSWORD2      = 0x02000000  /* two bits seems to work */
787         } samr_FieldsPresent;
788
789         typedef struct {
790                 NTTIME last_logon;
791                 NTTIME last_logoff;
792                 NTTIME last_password_change;
793                 NTTIME acct_expiry;
794                 NTTIME allow_password_change;
795                 NTTIME force_password_change;
796                 lsa_String account_name;
797                 lsa_String full_name;
798                 lsa_String home_directory;
799                 lsa_String home_drive;
800                 lsa_String logon_script;
801                 lsa_String profile_path;
802                 lsa_String description;
803                 lsa_String workstations;
804                 lsa_String comment;
805                 lsa_String parameters;
806                 lsa_String unknown1;
807                 lsa_String unknown2;
808                 lsa_String unknown3;
809                 uint32 buf_count;
810                 [size_is(buf_count)] uint8 *buffer;
811                 uint32 rid;
812                 uint32 primary_gid;
813                 samr_AcctFlags acct_flags;
814                 samr_FieldsPresent fields_present;
815                 samr_LogonHours logon_hours;
816                 uint16 bad_password_count;
817                 uint16 logon_count;
818                 uint16 country_code;
819                 uint16 code_page;
820                 uint8  nt_password_set;
821                 uint8  lm_password_set;
822                 uint8  password_expired;
823                 uint8  unknown4;
824         } samr_UserInfo21;
825
826         typedef [public, flag(NDR_PAHEX)] struct {
827                 uint8 data[516];
828         } samr_CryptPassword;
829
830         typedef struct {
831                 samr_UserInfo21 info;
832                 samr_CryptPassword password;
833         } samr_UserInfo23;
834
835         typedef struct {
836                 samr_CryptPassword password;
837                 uint8 pw_len;
838         } samr_UserInfo24;
839
840         typedef [flag(NDR_PAHEX)] struct {
841                 uint8 data[532];
842         } samr_CryptPasswordEx;
843
844         typedef struct {
845                 samr_UserInfo21 info;
846                 samr_CryptPasswordEx password;
847         } samr_UserInfo25;
848
849         typedef struct {
850                 samr_CryptPasswordEx password;
851                 uint8 pw_len;
852         } samr_UserInfo26;
853
854         typedef [switch_type(uint16)] union {
855                 [case(1)] samr_UserInfo1 info1;
856                 [case(2)] samr_UserInfo2 info2;
857                 [case(3)] samr_UserInfo3 info3;
858                 [case(4)] samr_UserInfo4 info4;
859                 [case(5)] samr_UserInfo5 info5;
860                 [case(6)] samr_UserInfo6 info6;
861                 [case(7)] samr_UserInfo7 info7;
862                 [case(8)] samr_UserInfo8 info8;
863                 [case(9)] samr_UserInfo9 info9;
864                 [case(10)] samr_UserInfo10 info10;
865                 [case(11)] samr_UserInfo11 info11;
866                 [case(12)] samr_UserInfo12 info12;
867                 [case(13)] samr_UserInfo13 info13;
868                 [case(14)] samr_UserInfo14 info14;
869                 [case(16)] samr_UserInfo16 info16;
870                 [case(17)] samr_UserInfo17 info17;
871                 [case(20)] samr_UserInfo20 info20;
872                 [case(21)] samr_UserInfo21 info21;
873                 [case(23)] samr_UserInfo23 info23;
874                 [case(24)] samr_UserInfo24 info24;
875                 [case(25)] samr_UserInfo25 info25;
876                 [case(26)] samr_UserInfo26 info26;
877         } samr_UserInfo;
878
879         [public] NTSTATUS samr_QueryUserInfo(
880                 [in,ref]                  policy_handle *user_handle,
881                 [in]                      uint16 level,
882                 [out,switch_is(level)]    samr_UserInfo *info
883                 );
884
885
886         /************************/
887         /* Function    0x25     */
888         [public] NTSTATUS samr_SetUserInfo(
889                 [in,ref]                   policy_handle *user_handle,
890                 [in]                       uint16 level,
891                 [in,ref,switch_is(level)]  samr_UserInfo *info
892                 );
893
894         /************************/
895         /* Function    0x26     */
896         typedef [public, flag(NDR_PAHEX)] struct {
897                 uint8 hash[16];
898         } samr_Password;
899
900         /*
901           this is a password change interface that doesn't give
902           the server the plaintext password. Depricated.
903         */
904         NTSTATUS samr_ChangePasswordUser(
905                 [in,ref]    policy_handle *user_handle,
906                 [in]        boolean8 lm_present,
907                 [in]        samr_Password *old_lm_crypted,
908                 [in]        samr_Password *new_lm_crypted,
909                 [in]        boolean8 nt_present,
910                 [in]        samr_Password *old_nt_crypted,
911                 [in]        samr_Password *new_nt_crypted,
912                 [in]        boolean8 cross1_present,
913                 [in]        samr_Password *nt_cross,
914                 [in]        boolean8 cross2_present,
915                 [in]        samr_Password *lm_cross
916                 );
917
918         /************************/
919         /* Function    0x27     */
920
921         typedef [public] struct {
922                 uint32 rid;
923                 samr_GroupAttrs attributes;
924         } samr_RidWithAttribute;
925
926         typedef [public] struct {
927                 uint32     count;
928                 [size_is(count)] samr_RidWithAttribute *rids;
929         } samr_RidWithAttributeArray;
930
931         NTSTATUS samr_GetGroupsForUser(
932                 [in,ref]   policy_handle *user_handle,
933                 [out]      samr_RidWithAttributeArray  *rids
934                 );
935
936         /************************/
937         /* Function    0x28     */
938
939         typedef struct {
940                 uint32    idx;
941                 uint32    rid;
942                 samr_AcctFlags acct_flags;
943                 lsa_String account_name;
944                 lsa_String full_name;
945                 lsa_String description;
946         } samr_DispEntryGeneral;
947
948         typedef struct {
949                 uint32 count;
950                 [size_is(count)] samr_DispEntryGeneral *entries;
951         } samr_DispInfoGeneral;
952
953         typedef struct {
954                 uint32    idx;
955                 uint32    rid;
956                 samr_AcctFlags acct_flags;
957                 lsa_String account_name;
958                 lsa_String description;
959         } samr_DispEntryFull;
960
961         typedef struct {
962                 uint32 count;
963                 [size_is(count)] samr_DispEntryFull *entries;
964         } samr_DispInfoFull;
965
966         typedef struct {
967                 uint32    idx;
968                 uint32    rid;
969                 samr_GroupAttrs acct_flags;
970                 lsa_String account_name;
971                 lsa_String description;
972         } samr_DispEntryFullGroup;
973
974         typedef struct {
975                 uint32 count;
976                 [size_is(count)] samr_DispEntryFullGroup *entries;
977         } samr_DispInfoFullGroups;
978
979         typedef struct {
980                 uint32    idx;
981                 lsa_AsciiString account_name;
982         } samr_DispEntryAscii;
983
984         typedef struct {
985                 uint32 count;
986                 [size_is(count)] samr_DispEntryAscii *entries;
987         } samr_DispInfoAscii;
988
989         typedef [switch_type(uint16)] union {
990                 [case(1)] samr_DispInfoGeneral info1;/* users */
991                 [case(2)] samr_DispInfoFull info2; /* trust accounts? */
992                 [case(3)] samr_DispInfoFullGroups info3; /* groups */
993                 [case(4)] samr_DispInfoAscii info4; /* users */
994                 [case(5)] samr_DispInfoAscii info5; /* groups */
995         } samr_DispInfo;
996
997         NTSTATUS samr_QueryDisplayInfo(
998                 [in,ref]    policy_handle *domain_handle,
999                 [in]        uint16 level,
1000                 [in]        uint32 start_idx,
1001                 [in]        uint32 max_entries,
1002                 [in]        uint32 buf_size,
1003                 [out]       uint32 total_size,
1004                 [out]       uint32 returned_size,
1005                 [out,switch_is(level)] samr_DispInfo info
1006                 );
1007
1008
1009         /************************/
1010         /* Function    0x29     */
1011
1012         /*
1013           this seems to be an alphabetic search function. The returned index
1014           is the index for samr_QueryDisplayInfo needed to get names occurring
1015           after the specified name. The supplied name does not need to exist
1016           in the database (for example you can supply just a first letter for 
1017           searching starting at that letter)
1018
1019           The level corresponds to the samr_QueryDisplayInfo level
1020         */
1021         NTSTATUS samr_GetDisplayEnumerationIndex(
1022                 [in,ref]    policy_handle *domain_handle,
1023                 [in]        uint16 level,
1024                 [in]        lsa_String name,
1025                 [out]       uint32 idx
1026                 );
1027
1028
1029
1030         /************************/
1031         /* Function    0x2a     */
1032
1033         /*
1034           w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this
1035         */
1036         NTSTATUS samr_TestPrivateFunctionsDomain(
1037                 [in,ref]    policy_handle *domain_handle
1038                 );
1039
1040
1041         /************************/
1042         /* Function    0x2b     */
1043
1044         /*
1045           w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this
1046         */
1047         NTSTATUS samr_TestPrivateFunctionsUser(
1048                 [in,ref]    policy_handle *user_handle
1049                 );
1050
1051
1052         /************************/
1053         /* Function    0x2c     */
1054
1055         typedef struct {
1056                 uint16 min_password_length;
1057                 samr_PasswordProperties password_properties;
1058         } samr_PwInfo;
1059
1060         [public] NTSTATUS samr_GetUserPwInfo(
1061                 [in,ref]    policy_handle *user_handle,
1062                 [out]       samr_PwInfo info
1063                 );
1064
1065         /************************/
1066         /* Function    0x2d     */
1067         NTSTATUS samr_RemoveMemberFromForeignDomain(
1068                 [in,ref]    policy_handle *domain_handle,
1069                 [in,ref]    dom_sid2 *sid
1070                 );
1071
1072         /************************/
1073         /* Function    0x2e     */
1074
1075         /*
1076           how is this different from QueryDomainInfo ??
1077         */
1078         NTSTATUS samr_QueryDomainInfo2(
1079                 [in,ref]      policy_handle *domain_handle,
1080                 [in]          uint16 level,
1081                 [out,switch_is(level)] samr_DomainInfo *info
1082                 );
1083
1084         /************************/
1085         /* Function    0x2f     */
1086
1087         /*
1088           how is this different from QueryUserInfo ??
1089         */
1090         NTSTATUS samr_QueryUserInfo2(
1091                 [in,ref]                  policy_handle *user_handle,
1092                 [in]                      uint16 level,
1093                 [out,switch_is(level)]    samr_UserInfo *info
1094                 );
1095
1096         /************************/
1097         /* Function    0x30     */
1098
1099         /*
1100           how is this different from QueryDisplayInfo??
1101         */
1102         NTSTATUS samr_QueryDisplayInfo2(
1103                 [in,ref]    policy_handle *domain_handle,
1104                 [in]        uint16 level,
1105                 [in]        uint32 start_idx,
1106                 [in]        uint32 max_entries,
1107                 [in]        uint32 buf_size,
1108                 [out]       uint32 total_size,
1109                 [out]       uint32 returned_size,
1110                 [out,switch_is(level)] samr_DispInfo info
1111                 );
1112
1113         /************************/
1114         /* Function    0x31     */
1115
1116         /*
1117           how is this different from GetDisplayEnumerationIndex ??
1118         */
1119         NTSTATUS samr_GetDisplayEnumerationIndex2(
1120                 [in,ref]    policy_handle *domain_handle,
1121                 [in]        uint16 level,
1122                 [in]        lsa_String name,
1123                 [out]       uint32 idx
1124                 );
1125
1126
1127         /************************/
1128         /* Function    0x32     */
1129         NTSTATUS samr_CreateUser2(
1130                 [in,ref]      policy_handle *domain_handle,
1131                 [in,ref]      lsa_String *account_name,
1132                 [in]          samr_AcctFlags acct_flags,
1133                 [in]          samr_UserAccessMask access_mask,
1134                 [out,ref]     policy_handle *user_handle,
1135                 [out,ref]     uint32 *access_granted,
1136                 [out,ref]     uint32 *rid
1137                 );
1138
1139
1140         /************************/
1141         /* Function    0x33     */
1142
1143         /*
1144           another duplicate. There must be a reason ....
1145         */
1146         NTSTATUS samr_QueryDisplayInfo3(
1147                 [in,ref]    policy_handle *domain_handle,
1148                 [in]        uint16 level,
1149                 [in]        uint32 start_idx,
1150                 [in]        uint32 max_entries,
1151                 [in]        uint32 buf_size,
1152                 [out]       uint32 total_size,
1153                 [out]       uint32 returned_size,
1154                 [out,switch_is(level)] samr_DispInfo info
1155                 );
1156
1157         /************************/
1158         /* Function    0x34     */
1159         NTSTATUS samr_AddMultipleMembersToAlias(
1160                 [in,ref]    policy_handle *alias_handle,
1161                 [in,ref]    lsa_SidArray *sids
1162                 );
1163
1164         /************************/
1165         /* Function    0x35     */
1166         NTSTATUS samr_RemoveMultipleMembersFromAlias(
1167                 [in,ref]    policy_handle *alias_handle,
1168                 [in,ref]    lsa_SidArray *sids
1169                 );
1170
1171         /************************/
1172         /* Function    0x36     */
1173
1174         NTSTATUS samr_OemChangePasswordUser2(
1175                 [in]              lsa_AsciiString *server,
1176                 [in,ref]          lsa_AsciiString *account,
1177                 [in]              samr_CryptPassword *password,
1178                 [in]              samr_Password *hash
1179                 );
1180
1181         /************************/
1182         /* Function    0x37     */
1183         NTSTATUS samr_ChangePasswordUser2(
1184                 [in]              lsa_String *server,
1185                 [in,ref]          lsa_String *account,
1186                 [in]              samr_CryptPassword *nt_password,
1187                 [in]              samr_Password *nt_verifier,
1188                 [in]              boolean8 lm_change,
1189                 [in]              samr_CryptPassword *lm_password,
1190                 [in]              samr_Password *lm_verifier
1191                 );
1192
1193         /************************/
1194         /* Function    0x38     */
1195         NTSTATUS samr_GetDomPwInfo(
1196                 [in]        lsa_String *domain_name,
1197                 [out]       samr_PwInfo info
1198                 );
1199
1200         /************************/
1201         /* Function    0x39     */
1202         NTSTATUS samr_Connect2(
1203                 [in,string,charset(UTF16)] uint16 *system_name,
1204                 [in] samr_ConnectAccessMask access_mask,
1205                 [out,ref]  policy_handle *connect_handle
1206                 );
1207
1208         /************************/
1209         /* Function    0x3a     */
1210         /*
1211           seems to be an exact alias for samr_SetUserInfo() 
1212         */
1213         [public] NTSTATUS samr_SetUserInfo2(
1214                 [in,ref]                   policy_handle *user_handle,
1215                 [in]                       uint16 level,
1216                 [in,ref,switch_is(level)]  samr_UserInfo *info
1217                 );
1218
1219         /************************/
1220         /* Function    0x3b     */
1221         /*
1222           this one is mysterious. I have a few guesses, but nothing working yet
1223         */
1224         NTSTATUS samr_SetBootKeyInformation(
1225                 [in,ref]   policy_handle *connect_handle,
1226                 [in]       uint32 unknown1,
1227                 [in]       uint32 unknown2,
1228                 [in]       uint32 unknown3
1229                 );
1230
1231         /************************/
1232         /* Function    0x3c     */
1233         NTSTATUS samr_GetBootKeyInformation(
1234                 [in,ref]   policy_handle *domain_handle,
1235                 [out]      uint32 unknown
1236                 );
1237
1238         /************************/
1239         /* Function    0x3d     */
1240         NTSTATUS samr_Connect3(
1241                 [in,string,charset(UTF16)] uint16 *system_name,
1242                 /* this unknown value seems to be completely ignored by w2k3 */
1243                 [in] uint32 unknown,
1244                 [in] samr_ConnectAccessMask access_mask,
1245                 [out,ref]  policy_handle *connect_handle
1246                 );
1247
1248         /************************/
1249         /* Function    0x3e     */
1250         NTSTATUS samr_Connect4(
1251                 [in,string,charset(UTF16)] uint16 *system_name,
1252                 [in] uint32 unknown,
1253                 [in] samr_ConnectAccessMask access_mask,
1254                 [out,ref]  policy_handle *connect_handle
1255                 );
1256
1257         /************************/
1258         /* Function    0x3f     */
1259
1260         typedef enum {
1261                 DUMMY_ENTRY_KEEP_PIDL_HAPPY = 999
1262         } samr_RejectReason;
1263
1264         typedef struct {
1265                 samr_RejectReason reason;
1266                 uint32 unknown1;
1267                 uint32 unknown2;
1268         } samr_ChangeReject;
1269
1270         NTSTATUS samr_ChangePasswordUser3(
1271                 [in]              lsa_String *server,
1272                 [in,ref]          lsa_String *account,
1273                 [in]              samr_CryptPassword *nt_password,
1274                 [in]              samr_Password *nt_verifier,
1275                 [in]              boolean8 lm_change,
1276                 [in]              samr_CryptPassword *lm_password,
1277                 [in]              samr_Password *lm_verifier,
1278                 [in]              samr_CryptPassword *password3,
1279                 [out]             samr_DomInfo1 *dominfo,
1280                 [out]             samr_ChangeReject *reject
1281                 );
1282
1283         /************************/
1284         /* Function    0x40      */
1285
1286         typedef struct {
1287                 uint32         unknown1; /* w2k3 gives 3 */
1288                 uint32         unknown2; /* w2k3 gives 0 */
1289         } samr_ConnectInfo1;
1290
1291         typedef union {
1292                 [case(1)]  samr_ConnectInfo1 info1;
1293         } samr_ConnectInfo;
1294
1295         [public] NTSTATUS samr_Connect5(
1296                 [in,string,charset(UTF16)] uint16 *system_name,
1297                 [in]       samr_ConnectAccessMask  access_mask,
1298                 [in,out]   uint32             level,
1299                 [in,out,switch_is(level),ref] samr_ConnectInfo *info,
1300                 [out,ref]  policy_handle      *connect_handle
1301                 );
1302
1303         /************************/
1304         /* Function    0x41     */
1305         NTSTATUS samr_RidToSid(
1306                 [in,ref]    policy_handle *domain_handle,
1307                 [in]        uint32        rid,
1308                 [out]       dom_sid2      *sid
1309                 );
1310
1311
1312         /************************/
1313         /* Function    0x42     */
1314
1315         /*
1316           this should set the DSRM password for the server, which is used
1317           when booting into Directory Services Recovery Mode on a DC. Win2003
1318           gives me NT_STATUS_NOT_SUPPORTED
1319         */
1320
1321         NTSTATUS samr_SetDsrmPassword(
1322                 [in]       lsa_String *name,
1323                 [in]       uint32 unknown,
1324                 [in]       samr_Password *hash
1325                 );
1326
1327
1328         /************************/
1329         /* Function    0x43     */
1330         /*
1331           I haven't been able to work out the format of this one yet.
1332           Seems to start with a switch level for a union?
1333         */
1334         NTSTATUS samr_ValidatePassword();
1335 }