This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.
[tprouty/samba.git] / source / include / rpc_lsa.h
1 /* 
2    Unix SMB/CIFS implementation.
3    SMB parameters and setup
4    Copyright (C) Andrew Tridgell 1992-1997
5    Copyright (C) Luke Kenneth Casson Leighton 1996-1997
6    Copyright (C) Paul Ashton 1997
7    
8    This program is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 2 of the License, or
11    (at your option) any later version.
12    
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17    
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23 #ifndef _RPC_LSA_H /* _RPC_LSA_H */
24 #define _RPC_LSA_H 
25
26 #include "rpc_misc.h"
27
28 /* Opcodes available on PIPE_LSARPC */
29
30 #define LSA_CLOSE              0x00
31 #define LSA_DELETE             0x01
32 #define LSA_ENUM_PRIVS         0x02
33 #define LSA_QUERYSECOBJ        0x03
34 #define LSA_SETSECOBJ          0x04
35 #define LSA_CHANGEPASSWORD     0x05
36 #define LSA_OPENPOLICY         0x06
37 #define LSA_QUERYINFOPOLICY    0x07
38 #define LSA_SETINFOPOLICY      0x08
39 #define LSA_CLEARAUDITLOG      0x09
40 #define LSA_CREATEACCOUNT      0x0a
41 #define LSA_ENUM_ACCOUNTS      0x0b
42 #define LSA_CREATETRUSTDOM     0x0c
43 #define LSA_ENUMTRUSTDOM       0x0d
44 #define LSA_LOOKUPNAMES        0x0e
45 #define LSA_LOOKUPSIDS         0x0f
46 #define LSA_CREATESECRET       0x10
47 #define LSA_OPENACCOUNT        0x11
48 #define LSA_ENUMPRIVSACCOUNT   0x12
49 #define LSA_ADDPRIVS           0x13
50 #define LSA_REMOVEPRIVS        0x14
51 #define LSA_GETQUOTAS          0x15
52 #define LSA_SETQUOTAS          0x16
53 #define LSA_GETSYSTEMACCOUNT   0x17
54 #define LSA_SETSYSTEMACCOUNT   0x18
55 #define LSA_OPENTRUSTDOM       0x19
56 #define LSA_QUERYTRUSTDOM      0x1a
57 #define LSA_SETINFOTRUSTDOM    0x1b
58 #define LSA_OPENSECRET         0x1c
59 #define LSA_SETSECRET          0x1d
60 #define LSA_QUERYSECRET        0x1e
61 #define LSA_LOOKUPPRIVVALUE    0x1f
62 #define LSA_LOOKUPPRIVNAME     0x20
63 #define LSA_PRIV_GET_DISPNAME  0x21
64 #define LSA_DELETEOBJECT       0x22
65 #define LSA_ENUMACCTWITHRIGHT  0x23
66 #define LSA_ENUMACCTRIGHTS     0x24
67 #define LSA_ADDACCTRIGHTS      0x25
68 #define LSA_REMOVEACCTRIGHTS   0x26
69 #define LSA_QUERYTRUSTDOMINFO  0x27
70 #define LSA_SETTRUSTDOMINFO    0x28
71 #define LSA_DELETETRUSTDOM     0x29
72 #define LSA_STOREPRIVDATA      0x2a
73 #define LSA_RETRPRIVDATA       0x2b
74 #define LSA_OPENPOLICY2        0x2c
75 #define LSA_UNK_GET_CONNUSER   0x2d /* LsaGetConnectedCredentials ? */
76 #define LSA_QUERYINFO2         0x2e
77
78 /* XXXX these are here to get a compile! */
79 #define LSA_LOOKUPRIDS      0xFD
80
81 /* DOM_QUERY - info class 3 and 5 LSA Query response */
82 typedef struct dom_query_info
83 {
84   uint16 uni_dom_max_len; /* domain name string length * 2 */
85   uint16 uni_dom_str_len; /* domain name string length * 2 */
86   uint32 buffer_dom_name; /* undocumented domain name string buffer pointer */
87   uint32 buffer_dom_sid; /* undocumented domain SID string buffer pointer */
88   UNISTR2 uni_domain_name; /* domain name (unicode string) */
89   DOM_SID2 dom_sid; /* domain SID */
90
91 } DOM_QUERY;
92
93 /* level 5 is same as level 3. */
94 typedef DOM_QUERY DOM_QUERY_3;
95 typedef DOM_QUERY DOM_QUERY_5;
96
97 /* level 2 is auditing settings */
98 typedef struct dom_query_2
99 {
100         uint32 auditing_enabled;
101         uint32 count1; /* usualy 7, at least on nt4sp4 */
102         uint32 count2; /* the same */
103         uint32 *auditsettings;
104 } DOM_QUERY_2;
105
106 /* level 6 is server role information */
107 typedef struct dom_query_6
108 {
109         uint16 server_role; /* 2=backup, 3=primary */
110 } DOM_QUERY_6;
111
112 typedef struct seq_qos_info
113 {
114         uint32 len; /* 12 */
115         uint16 sec_imp_level; /* 0x02 - impersonation level */
116         uint8  sec_ctxt_mode; /* 0x01 - context tracking mode */
117         uint8  effective_only; /* 0x00 - effective only */
118
119 } LSA_SEC_QOS;
120
121 typedef struct obj_attr_info
122 {
123         uint32 len;          /* 0x18 - length (in bytes) inc. the length field. */
124         uint32 ptr_root_dir; /* 0 - root directory (pointer) */
125         uint32 ptr_obj_name; /* 0 - object name (pointer) */
126         uint32 attributes;   /* 0 - attributes (undocumented) */
127         uint32 ptr_sec_desc; /* 0 - security descriptior (pointer) */
128         uint32 ptr_sec_qos;  /* security quality of service */
129         LSA_SEC_QOS *sec_qos;
130
131 } LSA_OBJ_ATTR;
132
133 /* LSA_Q_OPEN_POL - LSA Query Open Policy */
134 typedef struct lsa_q_open_pol_info
135 {
136         uint32 ptr;         /* undocumented buffer pointer */
137         uint16 system_name; /* 0x5c - system name */
138         LSA_OBJ_ATTR attr ; /* object attributes */
139
140         uint32 des_access; /* desired access attributes */
141
142 } LSA_Q_OPEN_POL;
143
144 /* LSA_R_OPEN_POL - response to LSA Open Policy */
145 typedef struct lsa_r_open_pol_info
146 {
147         POLICY_HND pol; /* policy handle */
148         NTSTATUS status; /* return code */
149
150 } LSA_R_OPEN_POL;
151
152 /* LSA_Q_OPEN_POL2 - LSA Query Open Policy */
153 typedef struct lsa_q_open_pol2_info
154 {
155         uint32       ptr;             /* undocumented buffer pointer */
156         UNISTR2      uni_server_name; /* server name, starting with two '\'s */
157         LSA_OBJ_ATTR attr           ; /* object attributes */
158
159         uint32 des_access; /* desired access attributes */
160
161 } LSA_Q_OPEN_POL2;
162
163 /* LSA_R_OPEN_POL2 - response to LSA Open Policy */
164 typedef struct lsa_r_open_pol2_info
165 {
166         POLICY_HND pol; /* policy handle */
167         NTSTATUS status; /* return code */
168
169 } LSA_R_OPEN_POL2;
170
171
172 #define POLICY_VIEW_LOCAL_INFORMATION    0x00000001
173 #define POLICY_VIEW_AUDIT_INFORMATION    0x00000002
174 #define POLICY_GET_PRIVATE_INFORMATION   0x00000004
175 #define POLICY_TRUST_ADMIN               0x00000008
176 #define POLICY_CREATE_ACCOUNT            0x00000010
177 #define POLICY_CREATE_SECRET             0x00000020
178 #define POLICY_CREATE_PRIVILEGE          0x00000040
179 #define POLICY_SET_DEFAULT_QUOTA_LIMITS  0x00000080
180 #define POLICY_SET_AUDIT_REQUIREMENTS    0x00000100
181 #define POLICY_AUDIT_LOG_ADMIN           0x00000200
182 #define POLICY_SERVER_ADMIN              0x00000400
183 #define POLICY_LOOKUP_NAMES              0x00000800
184
185 #define POLICY_ALL_ACCESS ( STANDARD_RIGHTS_REQUIRED_ACCESS  |\
186                             POLICY_VIEW_LOCAL_INFORMATION    |\
187                             POLICY_VIEW_AUDIT_INFORMATION    |\
188                             POLICY_GET_PRIVATE_INFORMATION   |\
189                             POLICY_TRUST_ADMIN               |\
190                             POLICY_CREATE_ACCOUNT            |\
191                             POLICY_CREATE_SECRET             |\
192                             POLICY_CREATE_PRIVILEGE          |\
193                             POLICY_SET_DEFAULT_QUOTA_LIMITS  |\
194                             POLICY_SET_AUDIT_REQUIREMENTS    |\
195                             POLICY_AUDIT_LOG_ADMIN           |\
196                             POLICY_SERVER_ADMIN              |\
197                             POLICY_LOOKUP_NAMES )
198
199
200 #define POLICY_READ       ( STANDARD_RIGHTS_READ_ACCESS      |\
201                             POLICY_VIEW_AUDIT_INFORMATION    |\
202                             POLICY_GET_PRIVATE_INFORMATION)
203
204 #define POLICY_WRITE      ( STANDARD_RIGHTS_WRITE_ACCESS     |\
205                             POLICY_TRUST_ADMIN               |\
206                             POLICY_CREATE_ACCOUNT            |\
207                             POLICY_CREATE_SECRET             |\
208                             POLICY_CREATE_PRIVILEGE          |\
209                             POLICY_SET_DEFAULT_QUOTA_LIMITS  |\
210                             POLICY_SET_AUDIT_REQUIREMENTS    |\
211                             POLICY_AUDIT_LOG_ADMIN           |\
212                             POLICY_SERVER_ADMIN)
213
214 #define POLICY_EXECUTE    ( STANDARD_RIGHTS_EXECUTE_ACCESS   |\
215                             POLICY_VIEW_LOCAL_INFORMATION    |\
216                             POLICY_LOOKUP_NAMES )
217
218 /* LSA_Q_QUERY_SEC_OBJ - LSA query security */
219 typedef struct lsa_query_sec_obj_info
220 {
221         POLICY_HND pol; /* policy handle */
222         uint32 sec_info;
223
224 } LSA_Q_QUERY_SEC_OBJ;
225
226 /* LSA_R_QUERY_SEC_OBJ - probably an open */
227 typedef struct r_lsa_query_sec_obj_info
228 {
229         uint32 ptr;
230         SEC_DESC_BUF *buf;
231
232         NTSTATUS status;         /* return status */
233
234 } LSA_R_QUERY_SEC_OBJ;
235
236 /* LSA_Q_QUERY_INFO - LSA query info policy */
237 typedef struct lsa_query_info
238 {
239         POLICY_HND pol; /* policy handle */
240     uint16 info_class; /* info class */
241
242 } LSA_Q_QUERY_INFO;
243
244 /* LSA_INFO_UNION */
245 typedef union lsa_info_union
246 {
247         DOM_QUERY_2 id2;
248         DOM_QUERY_3 id3;
249         DOM_QUERY_5 id5;
250         DOM_QUERY_6 id6;
251 } LSA_INFO_UNION;
252
253 /* LSA_R_QUERY_INFO - response to LSA query info policy */
254 typedef struct lsa_r_query_info
255 {
256     uint32 undoc_buffer; /* undocumented buffer pointer */
257     uint16 info_class; /* info class (same as info class in request) */
258    
259         LSA_INFO_UNION dom; 
260
261         NTSTATUS status; /* return code */
262
263 } LSA_R_QUERY_INFO;
264
265 /* LSA_DNS_DOM_INFO - DNS domain info - info class 12*/
266 typedef struct lsa_dns_dom_info
267 {
268         UNIHDR  hdr_nb_dom_name; /* netbios domain name */
269         UNIHDR  hdr_dns_dom_name;
270         UNIHDR  hdr_forest_name;
271
272         GUID       dom_guid; /* domain GUID */
273
274         UNISTR2 uni_nb_dom_name;
275         UNISTR2 uni_dns_dom_name;
276         UNISTR2 uni_forest_name;
277
278         uint32 ptr_dom_sid;
279         DOM_SID2   dom_sid; /* domain SID */
280 } LSA_DNS_DOM_INFO;
281
282 typedef union lsa_info2_union
283 {
284         LSA_DNS_DOM_INFO dns_dom_info;
285 } LSA_INFO2_UNION;
286
287 /* LSA_Q_QUERY_INFO2 - LSA query info */
288 typedef struct lsa_q_query_info2
289 {
290         POLICY_HND pol;    /* policy handle */
291         uint16 info_class; /* info class */
292 } LSA_Q_QUERY_INFO2;
293
294 typedef struct lsa_r_query_info2
295 {
296         uint32 ptr;    /* pointer to info struct */
297         uint16 info_class;
298         LSA_INFO2_UNION info; /* so far the only one */
299         NTSTATUS status;
300 } LSA_R_QUERY_INFO2;
301
302 /* LSA_Q_ENUM_TRUST_DOM - LSA enumerate trusted domains */
303 typedef struct lsa_enum_trust_dom_info
304 {
305         POLICY_HND pol; /* policy handle */
306         uint32 enum_context; /* enumeration context handle */
307         uint32 preferred_len; /* preferred maximum length */
308
309 } LSA_Q_ENUM_TRUST_DOM;
310
311 /* LSA_R_ENUM_TRUST_DOM - response to LSA enumerate trusted domains */
312 typedef struct lsa_r_enum_trust_dom_info
313 {
314         uint32 enum_context; /* enumeration context handle */
315         uint32 num_domains; /* number of domains */
316         uint32 ptr_enum_domains; /* buffer pointer to num domains */
317
318         /* this lot is only added if ptr_enum_domains is non-NULL */
319         uint32 num_domains2; /* number of domains */
320         UNIHDR2 *hdr_domain_name;
321         UNISTR2 *uni_domain_name;
322         DOM_SID2 *domain_sid;
323
324         NTSTATUS status; /* return code */
325
326 } LSA_R_ENUM_TRUST_DOM;
327
328 /* LSA_Q_CLOSE */
329 typedef struct lsa_q_close_info
330 {
331         POLICY_HND pol; /* policy handle */
332
333 } LSA_Q_CLOSE;
334
335 /* LSA_R_CLOSE */
336 typedef struct lsa_r_close_info
337 {
338         POLICY_HND pol; /* policy handle.  should be all zeros. */
339
340         NTSTATUS status; /* return code */
341
342 } LSA_R_CLOSE;
343
344
345 #define MAX_REF_DOMAINS 32
346
347 /* DOM_TRUST_HDR */
348 typedef struct dom_trust_hdr
349 {
350         UNIHDR hdr_dom_name; /* referenced domain unicode string headers */
351         uint32 ptr_dom_sid;
352
353 } DOM_TRUST_HDR;
354         
355 /* DOM_TRUST_INFO */
356 typedef struct dom_trust_info
357 {
358         UNISTR2  uni_dom_name; /* domain name unicode string */
359         DOM_SID2 ref_dom     ; /* referenced domain SID */
360
361 } DOM_TRUST_INFO;
362         
363 /* DOM_R_REF */
364 typedef struct dom_ref_info
365 {
366     uint32 num_ref_doms_1; /* num referenced domains */
367     uint32 ptr_ref_dom; /* pointer to referenced domains */
368     uint32 max_entries; /* 32 - max number of entries */
369     uint32 num_ref_doms_2; /* num referenced domains */
370
371     DOM_TRUST_HDR  hdr_ref_dom[MAX_REF_DOMAINS]; /* referenced domains */
372     DOM_TRUST_INFO ref_dom    [MAX_REF_DOMAINS]; /* referenced domains */
373
374 } DOM_R_REF;
375
376 /* the domain_idx points to a SID associated with the name */
377
378 /* LSA_TRANS_NAME - translated name */
379 typedef struct lsa_trans_name_info
380 {
381         uint16 sid_name_use; /* value is 5 for a well-known group; 2 for a domain group; 1 for a user... */
382         UNIHDR hdr_name; 
383         uint32 domain_idx; /* index into DOM_R_REF array of SIDs */
384
385 } LSA_TRANS_NAME;
386
387 /* This number purly arbitary - just to prevent a client from requesting large amounts of memory */
388 #define MAX_LOOKUP_SIDS 256
389
390 /* LSA_TRANS_NAME_ENUM - LSA Translated Name Enumeration container */
391 typedef struct lsa_trans_name_enum_info
392 {
393         uint32 num_entries;
394         uint32 ptr_trans_names;
395         uint32 num_entries2;
396         
397         LSA_TRANS_NAME *name; /* translated names  */
398         UNISTR2 *uni_name;
399
400 } LSA_TRANS_NAME_ENUM;
401
402 /* LSA_SID_ENUM - LSA SID enumeration container */
403 typedef struct lsa_sid_enum_info
404 {
405         uint32 num_entries;
406         uint32 ptr_sid_enum;
407         uint32 num_entries2;
408         
409         uint32 *ptr_sid; /* domain SID pointers to be looked up. */
410         DOM_SID2 *sid; /* domain SIDs to be looked up. */
411
412 } LSA_SID_ENUM;
413
414 /* LSA_Q_LOOKUP_SIDS - LSA Lookup SIDs */
415 typedef struct lsa_q_lookup_sids
416 {
417         POLICY_HND          pol; /* policy handle */
418         LSA_SID_ENUM        sids;
419         LSA_TRANS_NAME_ENUM names;
420         LOOKUP_LEVEL        level;
421         uint32              mapped_count;
422
423 } LSA_Q_LOOKUP_SIDS;
424
425 /* LSA_R_LOOKUP_SIDS - response to LSA Lookup SIDs */
426 typedef struct lsa_r_lookup_sids
427 {
428         uint32              ptr_dom_ref;
429         DOM_R_REF           *dom_ref; /* domain reference info */
430
431         LSA_TRANS_NAME_ENUM *names;
432         uint32              mapped_count;
433
434         NTSTATUS            status; /* return code */
435
436 } LSA_R_LOOKUP_SIDS;
437
438 /* LSA_Q_LOOKUP_NAMES - LSA Lookup NAMEs */
439 typedef struct lsa_q_lookup_names
440 {
441         POLICY_HND pol; /* policy handle */
442         uint32 num_entries;
443         uint32 num_entries2;
444         UNIHDR  *hdr_name; /* name buffer pointers */
445         UNISTR2 *uni_name; /* names to be looked up */
446
447         uint32 num_trans_entries;
448         uint32 ptr_trans_sids; /* undocumented domain SID buffer pointer */
449         uint32 lookup_level;
450         uint32 mapped_count;
451
452 } LSA_Q_LOOKUP_NAMES;
453
454 /* LSA_R_LOOKUP_NAMES - response to LSA Lookup NAMEs by name */
455 typedef struct lsa_r_lookup_names
456 {
457         uint32 ptr_dom_ref;
458         DOM_R_REF *dom_ref; /* domain reference info */
459
460         uint32 num_entries;
461         uint32 ptr_entries;
462         uint32 num_entries2;
463         DOM_RID2 *dom_rid; /* domain RIDs being looked up */
464
465         uint32 mapped_count;
466
467         NTSTATUS status; /* return code */
468 } LSA_R_LOOKUP_NAMES;
469
470 /* This is probably a policy handle but at the moment we
471    never read it - so use a dummy struct. */
472
473 typedef struct lsa_q_open_secret
474 {
475         uint32 dummy;
476 } LSA_Q_OPEN_SECRET;
477
478 /* We always return "not found" at present - so just marshal the minimum. */
479
480 typedef struct lsa_r_open_secret
481 {
482         uint32 dummy1;
483         uint32 dummy2;
484         uint32 dummy3;
485         uint32 dummy4;
486         NTSTATUS status;
487 } LSA_R_OPEN_SECRET;
488
489 typedef struct lsa_enum_priv_entry
490 {
491         UNIHDR hdr_name;
492         uint32 luid_low;
493         uint32 luid_high;
494         UNISTR2 name;
495         
496 } LSA_PRIV_ENTRY;
497
498 /* LSA_Q_ENUM_PRIVS - LSA enum privileges */
499 typedef struct lsa_q_enum_privs
500 {
501         POLICY_HND pol; /* policy handle */
502         uint32 enum_context;
503         uint32 pref_max_length;
504 } LSA_Q_ENUM_PRIVS;
505
506 typedef struct lsa_r_enum_privs
507 {
508         uint32 enum_context;
509         uint32 count;
510         uint32 ptr;
511         uint32 count1;
512
513         LSA_PRIV_ENTRY *privs;
514
515         NTSTATUS status;
516 } LSA_R_ENUM_PRIVS;
517
518 /* LSA_Q_ENUM_ACCT_RIGHTS - LSA enum account rights */
519 typedef struct
520 {
521         POLICY_HND pol; /* policy handle */
522         DOM_SID2 sid;
523 } LSA_Q_ENUM_ACCT_RIGHTS;
524
525 /* LSA_R_ENUM_ACCT_RIGHTS - LSA enum account rights */
526 typedef struct
527 {
528         uint32 count;
529         UNISTR2_ARRAY rights;
530         NTSTATUS status;
531 } LSA_R_ENUM_ACCT_RIGHTS;
532
533
534 /* LSA_Q_ADD_ACCT_RIGHTS - LSA add account rights */
535 typedef struct
536 {
537         POLICY_HND pol; /* policy handle */
538         DOM_SID2 sid;
539         UNISTR2_ARRAY rights;
540         uint32 count;
541 } LSA_Q_ADD_ACCT_RIGHTS;
542
543 /* LSA_R_ADD_ACCT_RIGHTS - LSA add account rights */
544 typedef struct
545 {
546         NTSTATUS status;
547 } LSA_R_ADD_ACCT_RIGHTS;
548
549
550 /* LSA_Q_REMOVE_ACCT_RIGHTS - LSA remove account rights */
551 typedef struct
552 {
553         POLICY_HND pol; /* policy handle */
554         DOM_SID2 sid;
555         uint32 removeall;
556         UNISTR2_ARRAY rights;
557         uint32 count;
558 } LSA_Q_REMOVE_ACCT_RIGHTS;
559
560 /* LSA_R_REMOVE_ACCT_RIGHTS - LSA remove account rights */
561 typedef struct
562 {
563         NTSTATUS status;
564 } LSA_R_REMOVE_ACCT_RIGHTS;
565
566
567 /* LSA_Q_PRIV_GET_DISPNAME - LSA get privilege display name */
568 typedef struct lsa_q_priv_get_dispname
569 {
570         POLICY_HND pol; /* policy handle */
571         UNIHDR hdr_name;
572         UNISTR2 name;
573         uint16 lang_id;
574         uint16 lang_id_sys;
575 } LSA_Q_PRIV_GET_DISPNAME;
576
577 typedef struct lsa_r_priv_get_dispname
578 {
579         uint32 ptr_info;
580         UNIHDR hdr_desc;
581         UNISTR2 desc;
582         /* Don't align ! */
583         uint16 lang_id;
584         /* align */
585         NTSTATUS status;
586 } LSA_R_PRIV_GET_DISPNAME;
587
588 /* LSA_Q_ENUM_ACCOUNTS */
589 typedef struct lsa_q_enum_accounts
590 {
591         POLICY_HND pol; /* policy handle */
592         uint32 enum_context;
593         uint32 pref_max_length;
594 } LSA_Q_ENUM_ACCOUNTS;
595
596 /* LSA_R_ENUM_ACCOUNTS */
597 typedef struct lsa_r_enum_accounts
598 {
599         uint32 enum_context;
600         LSA_SID_ENUM sids;
601         NTSTATUS status;
602 } LSA_R_ENUM_ACCOUNTS;
603
604 /* LSA_Q_UNK_GET_CONNUSER - gets username\domain of connected user
605                   called when "Take Ownership" is clicked -SK */
606 typedef struct lsa_q_unk_get_connuser
607 {
608   uint32 ptr_srvname;
609   UNISTR2 uni2_srvname;
610   uint32 unk1; /* 3 unknown uint32's are seen right after uni2_srvname */
611   uint32 unk2; /* unk2 appears to be a ptr, unk1 = unk3 = 0 usually */
612   uint32 unk3; 
613 } LSA_Q_UNK_GET_CONNUSER;
614
615 /* LSA_R_UNK_GET_CONNUSER */
616 typedef struct lsa_r_unk_get_connuser
617 {
618   uint32 ptr_user_name;
619   UNIHDR hdr_user_name;
620   UNISTR2 uni2_user_name;
621   
622   uint32 unk1;
623   
624   uint32 ptr_dom_name;
625   UNIHDR hdr_dom_name;
626   UNISTR2 uni2_dom_name;
627
628   NTSTATUS status;
629 } LSA_R_UNK_GET_CONNUSER;
630
631
632 typedef struct lsa_q_openaccount
633 {
634         POLICY_HND pol; /* policy handle */
635         DOM_SID2 sid;
636         uint32 access; /* desired access */
637 } LSA_Q_OPENACCOUNT;
638
639 typedef struct lsa_r_openaccount
640 {
641         POLICY_HND pol; /* policy handle */
642         NTSTATUS status;
643 } LSA_R_OPENACCOUNT;
644
645 typedef struct lsa_q_enumprivsaccount
646 {
647         POLICY_HND pol; /* policy handle */
648 } LSA_Q_ENUMPRIVSACCOUNT;
649
650 typedef struct lsa_r_enumprivsaccount
651 {
652         uint32 ptr;
653         uint32 count;
654         PRIVILEGE_SET set;
655         NTSTATUS status;
656 } LSA_R_ENUMPRIVSACCOUNT;
657
658 typedef struct lsa_q_getsystemaccount
659 {
660         POLICY_HND pol; /* policy handle */
661 } LSA_Q_GETSYSTEMACCOUNT;
662
663 typedef struct lsa_r_getsystemaccount
664 {
665         uint32 access;
666         NTSTATUS status;
667 } LSA_R_GETSYSTEMACCOUNT;
668
669
670 typedef struct lsa_q_setsystemaccount
671 {
672         POLICY_HND pol; /* policy handle */
673         uint32 access;
674 } LSA_Q_SETSYSTEMACCOUNT;
675
676 typedef struct lsa_r_setsystemaccount
677 {
678         NTSTATUS status;
679 } LSA_R_SETSYSTEMACCOUNT;
680
681
682 typedef struct lsa_q_lookupprivvalue
683 {
684         POLICY_HND pol; /* policy handle */
685         UNIHDR hdr_right;
686         UNISTR2 uni2_right;
687 } LSA_Q_LOOKUPPRIVVALUE;
688
689 typedef struct lsa_r_lookupprivvalue
690 {
691         LUID luid;
692         NTSTATUS status;
693 } LSA_R_LOOKUPPRIVVALUE;
694
695
696 typedef struct lsa_q_addprivs
697 {
698         POLICY_HND pol; /* policy handle */
699         uint32 count;
700         PRIVILEGE_SET set;
701 } LSA_Q_ADDPRIVS;
702
703 typedef struct lsa_r_addprivs
704 {
705         NTSTATUS status;
706 } LSA_R_ADDPRIVS;
707
708
709 typedef struct lsa_q_removeprivs
710 {
711         POLICY_HND pol; /* policy handle */
712         uint32 allrights;
713         uint32 ptr;
714         uint32 count;
715         PRIVILEGE_SET set;
716 } LSA_Q_REMOVEPRIVS;
717
718 typedef struct lsa_r_removeprivs
719 {
720         NTSTATUS status;
721 } LSA_R_REMOVEPRIVS;
722
723
724 #endif /* _RPC_LSA_H */
725
726