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 Copyright (C) Gerald (Jerry) Carter 2005
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #ifndef _RPC_LSA_H /* _RPC_LSA_H */
27 /* Opcodes available on PIPE_LSARPC */
29 #define LSA_CLOSE 0x00
30 #define LSA_DELETE 0x01
31 #define LSA_ENUM_PRIVS 0x02
32 #define LSA_QUERYSECOBJ 0x03
33 #define LSA_SETSECOBJ 0x04
34 #define LSA_CHANGEPASSWORD 0x05
35 #define LSA_OPENPOLICY 0x06
36 #define LSA_QUERYINFOPOLICY 0x07
37 #define LSA_SETINFOPOLICY 0x08
38 #define LSA_CLEARAUDITLOG 0x09
39 #define LSA_CREATEACCOUNT 0x0a
40 #define LSA_ENUM_ACCOUNTS 0x0b
41 #define LSA_CREATETRUSTDOM 0x0c /* TODO: implement this one -- jerry */
42 #define LSA_ENUMTRUSTDOM 0x0d
43 #define LSA_LOOKUPNAMES 0x0e
44 #define LSA_LOOKUPSIDS 0x0f
45 #define LSA_CREATESECRET 0x10 /* TODO: implement this one -- jerry */
46 #define LSA_OPENACCOUNT 0x11
47 #define LSA_ENUMPRIVSACCOUNT 0x12
48 #define LSA_ADDPRIVS 0x13
49 #define LSA_REMOVEPRIVS 0x14
50 #define LSA_GETQUOTAS 0x15
51 #define LSA_SETQUOTAS 0x16
52 #define LSA_GETSYSTEMACCOUNT 0x17
53 #define LSA_SETSYSTEMACCOUNT 0x18
54 #define LSA_OPENTRUSTDOM 0x19
55 #define LSA_QUERYTRUSTDOMINFO 0x1a
56 #define LSA_SETINFOTRUSTDOM 0x1b
57 #define LSA_OPENSECRET 0x1c /* TODO: implement this one -- jerry */
58 #define LSA_SETSECRET 0x1d /* TODO: implement this one -- jerry */
59 #define LSA_QUERYSECRET 0x1e
60 #define LSA_LOOKUPPRIVVALUE 0x1f
61 #define LSA_LOOKUPPRIVNAME 0x20
62 #define LSA_PRIV_GET_DISPNAME 0x21
63 #define LSA_DELETEOBJECT 0x22 /* TODO: implement this one -- jerry */
64 #define LSA_ENUMACCTWITHRIGHT 0x23 /* TODO: implement this one -- jerry */
65 #define LSA_ENUMACCTRIGHTS 0x24
66 #define LSA_ADDACCTRIGHTS 0x25
67 #define LSA_REMOVEACCTRIGHTS 0x26
68 #define LSA_QUERYTRUSTDOMINFOBYSID 0x27
69 #define LSA_SETTRUSTDOMINFO 0x28
70 #define LSA_DELETETRUSTDOM 0x29
71 #define LSA_STOREPRIVDATA 0x2a
72 #define LSA_RETRPRIVDATA 0x2b
73 #define LSA_OPENPOLICY2 0x2c
74 #define LSA_UNK_GET_CONNUSER 0x2d /* LsaGetConnectedCredentials ? */
75 #define LSA_QUERYINFO2 0x2e
76 #define LSA_QUERYTRUSTDOMINFOBYNAME 0x30
77 #define LSA_QUERYDOMINFOPOL 0x35
78 #define LSA_OPENTRUSTDOMBYNAME 0x37
80 #define LSA_LOOKUPSIDS2 0x39
81 #define LSA_LOOKUPNAMES2 0x3a
82 #define LSA_LOOKUPNAMES3 0x44
83 #define LSA_LOOKUPSIDS3 0x4c
84 #define LSA_LOOKUPNAMES4 0x4d
86 /* XXXX these are here to get a compile! */
87 #define LSA_LOOKUPRIDS 0xFD
89 #define LSA_AUDIT_NUM_CATEGORIES_NT4 7
90 #define LSA_AUDIT_NUM_CATEGORIES_WIN2K 9
92 #define LSA_AUDIT_NUM_CATEGORIES LSA_AUDIT_NUM_CATEGORIES_NT4
94 #define LSA_AUDIT_POLICY_NONE 0x00
95 #define LSA_AUDIT_POLICY_SUCCESS 0x01
96 #define LSA_AUDIT_POLICY_FAILURE 0x02
97 #define LSA_AUDIT_POLICY_ALL (LSA_AUDIT_POLICY_SUCCESS|LSA_AUDIT_POLICY_FAILURE)
98 #define LSA_AUDIT_POLICY_CLEAR 0x04
100 enum lsa_audit_categories {
101 LSA_AUDIT_CATEGORY_SYSTEM = 0,
102 LSA_AUDIT_CATEGORY_LOGON = 1,
103 LSA_AUDIT_CATEGORY_FILE_AND_OBJECT_ACCESS,
104 LSA_AUDIT_CATEGORY_USE_OF_USER_RIGHTS,
105 LSA_AUDIT_CATEGORY_PROCCESS_TRACKING,
106 LSA_AUDIT_CATEGORY_SECURITY_POLICY_CHANGES,
107 LSA_AUDIT_CATEGORY_ACCOUNT_MANAGEMENT,
108 LSA_AUDIT_CATEGORY_DIRECTORY_SERVICE_ACCESS, /* only in win2k/2k3 */
109 LSA_AUDIT_CATEGORY_ACCOUNT_LOGON /* only in win2k/2k3 */
112 /* level 1 is auditing settings */
113 typedef struct dom_query_1
117 NTTIME retention_time;
118 uint8 shutdown_in_progress;
119 NTTIME time_to_shutdown;
120 uint32 next_audit_record;
125 /* level 2 is auditing settings */
126 typedef struct dom_query_2
128 uint32 auditing_enabled;
129 uint32 count1; /* usualy 7, at least on nt4sp4 */
130 uint32 count2; /* the same */
132 uint32 *auditsettings;
135 /* DOM_QUERY - info class 3 and 5 LSA Query response */
136 typedef struct dom_query_info_3
138 uint16 uni_dom_max_len; /* domain name string length * 2 */
139 uint16 uni_dom_str_len; /* domain name string length * 2 */
140 uint32 buffer_dom_name; /* undocumented domain name string buffer pointer */
141 uint32 buffer_dom_sid; /* undocumented domain SID string buffer pointer */
142 UNISTR2 uni_domain_name; /* domain name (unicode string) */
143 DOM_SID2 dom_sid; /* domain SID */
147 /* level 5 is same as level 3. */
148 typedef DOM_QUERY_3 DOM_QUERY_5;
150 /* level 6 is server role information */
151 typedef struct dom_query_6
153 uint16 server_role; /* 2=backup, 3=primary */
156 /* level 10 is audit full set info */
157 typedef struct dom_query_10
159 uint8 shutdown_on_full;
162 /* level 11 is audit full query info */
163 typedef struct dom_query_11
166 uint8 shutdown_on_full;
170 /* level 12 is DNS domain info */
171 typedef struct lsa_dns_dom_info
173 UNIHDR hdr_nb_dom_name; /* netbios domain name */
174 UNIHDR hdr_dns_dom_name;
175 UNIHDR hdr_forest_name;
177 struct GUID dom_guid; /* domain GUID */
179 UNISTR2 uni_nb_dom_name;
180 UNISTR2 uni_dns_dom_name;
181 UNISTR2 uni_forest_name;
184 DOM_SID2 dom_sid; /* domain SID */
187 typedef struct seq_qos_info
190 uint16 sec_imp_level; /* 0x02 - impersonation level */
191 uint8 sec_ctxt_mode; /* 0x01 - context tracking mode */
192 uint8 effective_only; /* 0x00 - effective only */
196 typedef struct obj_attr_info
198 uint32 len; /* 0x18 - length (in bytes) inc. the length field. */
199 uint32 ptr_root_dir; /* 0 - root directory (pointer) */
200 uint32 ptr_obj_name; /* 0 - object name (pointer) */
201 uint32 attributes; /* 0 - attributes (undocumented) */
202 uint32 ptr_sec_desc; /* 0 - security descriptior (pointer) */
203 uint32 ptr_sec_qos; /* security quality of service */
204 LSA_SEC_QOS *sec_qos;
208 /* LSA_Q_OPEN_POL - LSA Query Open Policy */
209 typedef struct lsa_q_open_pol_info
211 uint32 ptr; /* undocumented buffer pointer */
212 uint16 system_name; /* 0x5c - system name */
213 LSA_OBJ_ATTR attr ; /* object attributes */
215 uint32 des_access; /* desired access attributes */
219 /* LSA_R_OPEN_POL - response to LSA Open Policy */
220 typedef struct lsa_r_open_pol_info
222 POLICY_HND pol; /* policy handle */
223 NTSTATUS status; /* return code */
227 /* LSA_Q_OPEN_POL2 - LSA Query Open Policy */
228 typedef struct lsa_q_open_pol2_info
230 uint32 ptr; /* undocumented buffer pointer */
231 UNISTR2 uni_server_name; /* server name, starting with two '\'s */
232 LSA_OBJ_ATTR attr ; /* object attributes */
234 uint32 des_access; /* desired access attributes */
238 /* LSA_R_OPEN_POL2 - response to LSA Open Policy */
239 typedef struct lsa_r_open_pol2_info
241 POLICY_HND pol; /* policy handle */
242 NTSTATUS status; /* return code */
247 #define POLICY_VIEW_LOCAL_INFORMATION 0x00000001
248 #define POLICY_VIEW_AUDIT_INFORMATION 0x00000002
249 #define POLICY_GET_PRIVATE_INFORMATION 0x00000004
250 #define POLICY_TRUST_ADMIN 0x00000008
251 #define POLICY_CREATE_ACCOUNT 0x00000010
252 #define POLICY_CREATE_SECRET 0x00000020
253 #define POLICY_CREATE_PRIVILEGE 0x00000040
254 #define POLICY_SET_DEFAULT_QUOTA_LIMITS 0x00000080
255 #define POLICY_SET_AUDIT_REQUIREMENTS 0x00000100
256 #define POLICY_AUDIT_LOG_ADMIN 0x00000200
257 #define POLICY_SERVER_ADMIN 0x00000400
258 #define POLICY_LOOKUP_NAMES 0x00000800
260 #define POLICY_ALL_ACCESS ( STANDARD_RIGHTS_REQUIRED_ACCESS |\
261 POLICY_VIEW_LOCAL_INFORMATION |\
262 POLICY_VIEW_AUDIT_INFORMATION |\
263 POLICY_GET_PRIVATE_INFORMATION |\
264 POLICY_TRUST_ADMIN |\
265 POLICY_CREATE_ACCOUNT |\
266 POLICY_CREATE_SECRET |\
267 POLICY_CREATE_PRIVILEGE |\
268 POLICY_SET_DEFAULT_QUOTA_LIMITS |\
269 POLICY_SET_AUDIT_REQUIREMENTS |\
270 POLICY_AUDIT_LOG_ADMIN |\
271 POLICY_SERVER_ADMIN |\
272 POLICY_LOOKUP_NAMES )
275 #define POLICY_READ ( STANDARD_RIGHTS_READ_ACCESS |\
276 POLICY_VIEW_AUDIT_INFORMATION |\
277 POLICY_GET_PRIVATE_INFORMATION)
279 #define POLICY_WRITE ( STD_RIGHT_READ_CONTROL_ACCESS |\
280 POLICY_TRUST_ADMIN |\
281 POLICY_CREATE_ACCOUNT |\
282 POLICY_CREATE_SECRET |\
283 POLICY_CREATE_PRIVILEGE |\
284 POLICY_SET_DEFAULT_QUOTA_LIMITS |\
285 POLICY_SET_AUDIT_REQUIREMENTS |\
286 POLICY_AUDIT_LOG_ADMIN |\
289 #define POLICY_EXECUTE ( STANDARD_RIGHTS_EXECUTE_ACCESS |\
290 POLICY_VIEW_LOCAL_INFORMATION |\
291 POLICY_LOOKUP_NAMES )
293 /* LSA_Q_QUERY_SEC_OBJ - LSA query security */
294 typedef struct lsa_query_sec_obj_info
296 POLICY_HND pol; /* policy handle */
299 } LSA_Q_QUERY_SEC_OBJ;
301 /* LSA_R_QUERY_SEC_OBJ - probably an open */
302 typedef struct r_lsa_query_sec_obj_info
307 NTSTATUS status; /* return status */
309 } LSA_R_QUERY_SEC_OBJ;
311 /* LSA_Q_QUERY_INFO - LSA query info policy */
312 typedef struct lsa_query_info
314 POLICY_HND pol; /* policy handle */
315 uint16 info_class; /* info class */
320 typedef struct lsa_info_ctr
336 typedef LSA_INFO_CTR LSA_INFO_CTR2;
338 /* LSA_Q_SET_INFO - LSA set info policy */
339 typedef struct lsa_set_info
341 POLICY_HND pol; /* policy handle */
342 uint16 info_class; /* info class */
347 /* LSA_R_SET_INFO - response to LSA set info policy */
348 typedef struct lsa_r_set_info
350 NTSTATUS status; /* return code */
354 /* LSA_R_QUERY_INFO - response to LSA query info policy */
355 typedef struct lsa_r_query_info
357 uint32 dom_ptr; /* undocumented buffer pointer */
359 NTSTATUS status; /* return code */
363 typedef LSA_Q_QUERY_INFO LSA_Q_QUERY_INFO2;
364 typedef LSA_R_QUERY_INFO LSA_R_QUERY_INFO2;
366 /*******************************************************/
371 uint32 preferred_len; /* preferred maximum length */
372 } LSA_Q_ENUM_TRUST_DOM;
381 DOMAIN_INFO *domains;
387 DOMAIN_LIST *domlist;
389 } LSA_R_ENUM_TRUST_DOM;
391 /*******************************************************/
394 typedef struct lsa_q_close_info
396 POLICY_HND pol; /* policy handle */
401 typedef struct lsa_r_close_info
403 POLICY_HND pol; /* policy handle. should be all zeros. */
405 NTSTATUS status; /* return code */
410 #define MAX_REF_DOMAINS 32
413 typedef struct dom_trust_hdr
415 UNIHDR hdr_dom_name; /* referenced domain unicode string headers */
421 typedef struct dom_trust_info
423 UNISTR2 uni_dom_name; /* domain name unicode string */
424 DOM_SID2 ref_dom ; /* referenced domain SID */
429 typedef struct dom_ref_info
431 uint32 num_ref_doms_1; /* num referenced domains */
432 uint32 ptr_ref_dom; /* pointer to referenced domains */
433 uint32 max_entries; /* 32 - max number of entries */
434 uint32 num_ref_doms_2; /* num referenced domains */
436 DOM_TRUST_HDR hdr_ref_dom[MAX_REF_DOMAINS]; /* referenced domains */
437 DOM_TRUST_INFO ref_dom [MAX_REF_DOMAINS]; /* referenced domains */
441 /* the domain_idx points to a SID associated with the name */
443 /* LSA_TRANS_NAME - translated name */
444 typedef struct lsa_trans_name_info
446 uint16 sid_name_use; /* value is 5 for a well-known group; 2 for a domain group; 1 for a user... */
448 uint32 domain_idx; /* index into DOM_R_REF array of SIDs */
452 /* LSA_TRANS_NAME2 - translated name */
453 typedef struct lsa_trans_name_info2
455 uint16 sid_name_use; /* value is 5 for a well-known group; 2 for a domain group; 1 for a user... */
457 uint32 domain_idx; /* index into DOM_R_REF array of SIDs */
462 /* This number is based on Win2k and later maximum response allowed */
463 #define MAX_LOOKUP_SIDS 20480 /* 0x5000 */
465 /* LSA_TRANS_NAME_ENUM - LSA Translated Name Enumeration container */
466 typedef struct lsa_trans_name_enum_info
469 uint32 ptr_trans_names;
472 LSA_TRANS_NAME *name; /* translated names */
475 } LSA_TRANS_NAME_ENUM;
477 /* LSA_TRANS_NAME_ENUM2 - LSA Translated Name Enumeration container 2 */
478 typedef struct lsa_trans_name_enum_info2
481 uint32 ptr_trans_names;
484 LSA_TRANS_NAME2 *name; /* translated names */
487 } LSA_TRANS_NAME_ENUM2;
489 /* LSA_SID_ENUM - LSA SID enumeration container */
490 typedef struct lsa_sid_enum_info
496 uint32 *ptr_sid; /* domain SID pointers to be looked up. */
497 DOM_SID2 *sid; /* domain SIDs to be looked up. */
501 /* LSA_Q_LOOKUP_SIDS - LSA Lookup SIDs */
502 typedef struct lsa_q_lookup_sids
504 POLICY_HND pol; /* policy handle */
506 LSA_TRANS_NAME_ENUM names;
512 /* LSA_R_LOOKUP_SIDS - response to LSA Lookup SIDs */
513 typedef struct lsa_r_lookup_sids
516 DOM_R_REF *dom_ref; /* domain reference info */
518 LSA_TRANS_NAME_ENUM names;
521 NTSTATUS status; /* return code */
525 /* LSA_Q_LOOKUP_SIDS2 - LSA Lookup SIDs 2*/
526 typedef struct lsa_q_lookup_sids2
528 POLICY_HND pol; /* policy handle */
530 LSA_TRANS_NAME_ENUM2 names;
536 } LSA_Q_LOOKUP_SIDS2;
538 /* LSA_R_LOOKUP_SIDS2 - response to LSA Lookup SIDs 2*/
539 typedef struct lsa_r_lookup_sids2
542 DOM_R_REF *dom_ref; /* domain reference info */
544 LSA_TRANS_NAME_ENUM2 names;
547 NTSTATUS status; /* return code */
549 } LSA_R_LOOKUP_SIDS2;
551 /* LSA_Q_LOOKUP_SIDS3 - LSA Lookup SIDs 3 */
552 typedef struct lsa_q_lookup_sids3
555 LSA_TRANS_NAME_ENUM2 names;
561 } LSA_Q_LOOKUP_SIDS3;
563 /* LSA_R_LOOKUP_SIDS3 - response to LSA Lookup SIDs 3 */
564 typedef struct lsa_r_lookup_sids3
567 DOM_R_REF *dom_ref; /* domain reference info */
569 LSA_TRANS_NAME_ENUM2 names;
572 NTSTATUS status; /* return code */
574 } LSA_R_LOOKUP_SIDS3;
576 /* LSA_Q_LOOKUP_NAMES - LSA Lookup NAMEs */
577 typedef struct lsa_q_lookup_names
579 POLICY_HND pol; /* policy handle */
582 UNIHDR *hdr_name; /* name buffer pointers */
583 UNISTR2 *uni_name; /* names to be looked up */
585 uint32 num_trans_entries;
586 uint32 ptr_trans_sids; /* undocumented domain SID buffer pointer */
590 } LSA_Q_LOOKUP_NAMES;
592 /* LSA_R_LOOKUP_NAMES - response to LSA Lookup NAMEs by name */
593 typedef struct lsa_r_lookup_names
596 DOM_R_REF *dom_ref; /* domain reference info */
601 DOM_RID *dom_rid; /* domain RIDs being looked up */
605 NTSTATUS status; /* return code */
606 } LSA_R_LOOKUP_NAMES;
608 /* LSA_Q_LOOKUP_NAMES2 - LSA Lookup NAMEs 2*/
609 typedef struct lsa_q_lookup_names2
611 POLICY_HND pol; /* policy handle */
614 UNIHDR *hdr_name; /* name buffer pointers */
615 UNISTR2 *uni_name; /* names to be looked up */
617 uint32 num_trans_entries;
618 uint32 ptr_trans_sids; /* undocumented domain SID buffer pointer */
624 } LSA_Q_LOOKUP_NAMES2;
626 /* LSA_R_LOOKUP_NAMES2 - response to LSA Lookup NAMEs by name 2 */
627 typedef struct lsa_r_lookup_names2
630 DOM_R_REF *dom_ref; /* domain reference info */
635 DOM_RID2 *dom_rid; /* domain RIDs being looked up */
639 NTSTATUS status; /* return code */
640 } LSA_R_LOOKUP_NAMES2;
642 /* LSA_Q_LOOKUP_NAMES3 - LSA Lookup NAMEs 3 */
643 typedef struct lsa_q_lookup_names3
645 POLICY_HND pol; /* policy handle */
648 UNIHDR *hdr_name; /* name buffer pointers */
649 UNISTR2 *uni_name; /* names to be looked up */
651 uint32 num_trans_entries;
652 uint32 ptr_trans_sids; /* undocumented domain SID buffer pointer */
658 } LSA_Q_LOOKUP_NAMES3;
660 /* Sid type used in lookupnames3 and lookupnames4. */
661 typedef struct lsa_translatedsid3 {
666 } LSA_TRANSLATED_SID3;
668 /* LSA_R_LOOKUP_NAMES3 - response to LSA Lookup NAMEs by name 3 */
669 typedef struct lsa_r_lookup_names3
672 DOM_R_REF *dom_ref; /* domain reference info */
677 LSA_TRANSLATED_SID3 *trans_sids;
681 NTSTATUS status; /* return code */
682 } LSA_R_LOOKUP_NAMES3;
684 /* LSA_Q_LOOKUP_NAMES4 - LSA Lookup NAMEs 4 */
685 typedef struct lsa_q_lookup_names4
689 UNIHDR *hdr_name; /* name buffer pointers */
690 UNISTR2 *uni_name; /* names to be looked up */
692 uint32 num_trans_entries;
693 uint32 ptr_trans_sids; /* undocumented domain SID buffer pointer */
699 } LSA_Q_LOOKUP_NAMES4;
701 /* LSA_R_LOOKUP_NAMES3 - response to LSA Lookup NAMEs by name 4 */
702 typedef struct lsa_r_lookup_names4
705 DOM_R_REF *dom_ref; /* domain reference info */
710 LSA_TRANSLATED_SID3 *trans_sids;
714 NTSTATUS status; /* return code */
715 } LSA_R_LOOKUP_NAMES4;
717 typedef struct lsa_enum_priv_entry
726 /* LSA_Q_ENUM_PRIVS - LSA enum privileges */
727 typedef struct lsa_q_enum_privs
729 POLICY_HND pol; /* policy handle */
731 uint32 pref_max_length;
734 typedef struct lsa_r_enum_privs
741 LSA_PRIV_ENTRY *privs;
746 /* LSA_Q_ENUM_ACCT_RIGHTS - LSA enum account rights */
749 POLICY_HND pol; /* policy handle */
751 } LSA_Q_ENUM_ACCT_RIGHTS;
753 /* LSA_R_ENUM_ACCT_RIGHTS - LSA enum account rights */
757 UNISTR4_ARRAY *rights;
759 } LSA_R_ENUM_ACCT_RIGHTS;
762 /* LSA_Q_ADD_ACCT_RIGHTS - LSA add account rights */
765 POLICY_HND pol; /* policy handle */
768 UNISTR4_ARRAY *rights;
769 } LSA_Q_ADD_ACCT_RIGHTS;
771 /* LSA_R_ADD_ACCT_RIGHTS - LSA add account rights */
775 } LSA_R_ADD_ACCT_RIGHTS;
778 /* LSA_Q_REMOVE_ACCT_RIGHTS - LSA remove account rights */
781 POLICY_HND pol; /* policy handle */
785 UNISTR4_ARRAY *rights;
786 } LSA_Q_REMOVE_ACCT_RIGHTS;
788 /* LSA_R_REMOVE_ACCT_RIGHTS - LSA remove account rights */
792 } LSA_R_REMOVE_ACCT_RIGHTS;
795 /* LSA_Q_PRIV_GET_DISPNAME - LSA get privilege display name */
796 typedef struct lsa_q_priv_get_dispname
798 POLICY_HND pol; /* policy handle */
803 } LSA_Q_PRIV_GET_DISPNAME;
805 typedef struct lsa_r_priv_get_dispname
814 } LSA_R_PRIV_GET_DISPNAME;
816 /* LSA_Q_ENUM_ACCOUNTS */
817 typedef struct lsa_q_enum_accounts
819 POLICY_HND pol; /* policy handle */
821 uint32 pref_max_length;
822 } LSA_Q_ENUM_ACCOUNTS;
824 /* LSA_R_ENUM_ACCOUNTS */
825 typedef struct lsa_r_enum_accounts
830 } LSA_R_ENUM_ACCOUNTS;
832 /* LSA_Q_UNK_GET_CONNUSER - gets username\domain of connected user
833 called when "Take Ownership" is clicked -SK */
834 typedef struct lsa_q_unk_get_connuser
837 UNISTR2 uni2_srvname;
838 uint32 unk1; /* 3 unknown uint32's are seen right after uni2_srvname */
839 uint32 unk2; /* unk2 appears to be a ptr, unk1 = unk3 = 0 usually */
841 } LSA_Q_UNK_GET_CONNUSER;
843 /* LSA_R_UNK_GET_CONNUSER */
844 typedef struct lsa_r_unk_get_connuser
846 uint32 ptr_user_name;
847 UNIHDR hdr_user_name;
848 UNISTR2 uni2_user_name;
854 UNISTR2 uni2_dom_name;
857 } LSA_R_UNK_GET_CONNUSER;
860 typedef struct lsa_q_createaccount
862 POLICY_HND pol; /* policy handle */
864 uint32 access; /* access */
865 } LSA_Q_CREATEACCOUNT;
867 typedef struct lsa_r_createaccount
869 POLICY_HND pol; /* policy handle */
871 } LSA_R_CREATEACCOUNT;
874 typedef struct lsa_q_openaccount
876 POLICY_HND pol; /* policy handle */
878 uint32 access; /* desired access */
881 typedef struct lsa_r_openaccount
883 POLICY_HND pol; /* policy handle */
887 typedef struct lsa_q_enumprivsaccount
889 POLICY_HND pol; /* policy handle */
890 } LSA_Q_ENUMPRIVSACCOUNT;
892 typedef struct lsa_r_enumprivsaccount
898 } LSA_R_ENUMPRIVSACCOUNT;
900 typedef struct lsa_q_getsystemaccount
902 POLICY_HND pol; /* policy handle */
903 } LSA_Q_GETSYSTEMACCOUNT;
905 typedef struct lsa_r_getsystemaccount
909 } LSA_R_GETSYSTEMACCOUNT;
912 typedef struct lsa_q_setsystemaccount
914 POLICY_HND pol; /* policy handle */
916 } LSA_Q_SETSYSTEMACCOUNT;
918 typedef struct lsa_r_setsystemaccount
921 } LSA_R_SETSYSTEMACCOUNT;
929 POLICY_HND pol; /* policy handle */
931 } LSA_Q_LOOKUP_PRIV_VALUE;
936 } LSA_R_LOOKUP_PRIV_VALUE;
938 typedef struct lsa_q_addprivs
940 POLICY_HND pol; /* policy handle */
945 typedef struct lsa_r_addprivs
951 typedef struct lsa_q_removeprivs
953 POLICY_HND pol; /* policy handle */
960 typedef struct lsa_r_removeprivs
965 /*******************************************************/
966 #if 0 /* jerry, I think this not correct - gd */
969 uint32 count; /* ??? this is what ethereal calls it */
971 } LSA_Q_OPEN_TRUSTED_DOMAIN;
974 /* LSA_Q_OPEN_TRUSTED_DOMAIN - LSA Query Open Trusted Domain */
975 typedef struct lsa_q_open_trusted_domain
977 POLICY_HND pol; /* policy handle */
978 DOM_SID2 sid; /* domain sid */
979 uint32 access_mask; /* access mask */
981 } LSA_Q_OPEN_TRUSTED_DOMAIN;
983 /* LSA_R_OPEN_TRUSTED_DOMAIN - response to LSA Query Open Trusted Domain */
985 POLICY_HND handle; /* trustdom policy handle */
986 NTSTATUS status; /* return code */
987 } LSA_R_OPEN_TRUSTED_DOMAIN;
990 /*******************************************************/
992 /* LSA_Q_OPEN_TRUSTED_DOMAIN_BY_NAME - LSA Query Open Trusted Domain by Name*/
993 typedef struct lsa_q_open_trusted_domain_by_name
995 POLICY_HND pol; /* policy handle */
996 LSA_STRING name; /* domain name */
997 uint32 access_mask; /* access mask */
999 } LSA_Q_OPEN_TRUSTED_DOMAIN_BY_NAME;
1001 /* LSA_R_OPEN_TRUSTED_DOMAIN_BY_NAME - response to LSA Query Open Trusted Domain by Name */
1003 POLICY_HND handle; /* trustdom policy handle */
1004 NTSTATUS status; /* return code */
1005 } LSA_R_OPEN_TRUSTED_DOMAIN_BY_NAME;
1008 /*******************************************************/
1015 } LSA_Q_OPEN_SECRET;
1020 } LSA_R_OPEN_SECRET;
1023 /*******************************************************/
1027 } LSA_Q_DELETE_OBJECT;
1031 } LSA_R_DELETE_OBJECT;
1034 /*******************************************************/
1040 } LSA_Q_CREATE_SECRET;
1045 } LSA_R_CREATE_SECRET;
1048 /*******************************************************/
1054 } LSA_Q_CREATE_TRUSTED_DOMAIN;
1059 } LSA_R_CREATE_TRUSTED_DOMAIN;
1062 /*******************************************************/
1065 uint32 size; /* size is written on the wire twice so I
1066 can only assume that one is supposed to
1067 be a max length and one is a size */
1068 UNISTR2 *data; /* not really a UNICODE string but the parsing
1074 LSA_DATA_BLOB *old_value;
1075 LSA_DATA_BLOB *new_value;
1082 /* LSA_Q_QUERY_TRUSTED_DOMAIN_INFO - LSA query trusted domain info */
1083 typedef struct lsa_query_trusted_domain_info
1085 POLICY_HND pol; /* policy handle */
1086 uint16 info_class; /* info class */
1088 } LSA_Q_QUERY_TRUSTED_DOMAIN_INFO;
1090 /* LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_SID - LSA query trusted domain info */
1091 typedef struct lsa_query_trusted_domain_info_by_sid
1093 POLICY_HND pol; /* policy handle */
1094 DOM_SID2 dom_sid; /* domain sid */
1095 uint16 info_class; /* info class */
1097 } LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_SID;
1099 /* LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_NAME - LSA query trusted domain info */
1100 typedef struct lsa_query_trusted_domain_info_by_name
1102 POLICY_HND pol; /* policy handle */
1103 LSA_STRING domain_name; /* domain name */
1104 uint16 info_class; /* info class */
1106 } LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_NAME;
1108 typedef struct trusted_domain_info_name {
1109 LSA_STRING netbios_name;
1110 } TRUSTED_DOMAIN_INFO_NAME;
1112 typedef struct trusted_domain_info_posix_offset {
1113 uint32 posix_offset;
1114 } TRUSTED_DOMAIN_INFO_POSIX_OFFSET;
1116 typedef struct lsa_data_buf {
1123 typedef struct lsa_data_buf_hdr {
1130 typedef struct lsa_data_buf2 {
1135 typedef struct trusted_domain_info_password {
1136 uint32 ptr_password;
1137 uint32 ptr_old_password;
1138 LSA_DATA_BUF_HDR password_hdr;
1139 LSA_DATA_BUF_HDR old_password_hdr;
1140 LSA_DATA_BUF password;
1141 LSA_DATA_BUF old_password;
1142 } TRUSTED_DOMAIN_INFO_PASSWORD;
1144 typedef struct trusted_domain_info_basic {
1145 LSA_STRING netbios_name;
1147 } TRUSTED_DOMAIN_INFO_BASIC;
1149 typedef struct trusted_domain_info_ex {
1150 LSA_STRING domain_name;
1151 LSA_STRING netbios_name;
1153 uint32 trust_direction;
1155 uint32 trust_attributes;
1156 } TRUSTED_DOMAIN_INFO_EX;
1158 typedef struct trust_domain_info_buffer {
1159 NTTIME last_update_time;
1162 } LSA_TRUSTED_DOMAIN_INFO_BUFFER;
1164 typedef struct trusted_domain_info_auth_info {
1165 uint32 incoming_count;
1166 LSA_TRUSTED_DOMAIN_INFO_BUFFER incoming_current_auth_info;
1167 LSA_TRUSTED_DOMAIN_INFO_BUFFER incoming_previous_auth_info;
1168 uint32 outgoing_count;
1169 LSA_TRUSTED_DOMAIN_INFO_BUFFER outgoing_current_auth_info;
1170 LSA_TRUSTED_DOMAIN_INFO_BUFFER outgoing_previous_auth_info;
1171 } TRUSTED_DOMAIN_INFO_AUTH_INFO;
1173 typedef struct trusted_domain_info_full_info {
1174 TRUSTED_DOMAIN_INFO_EX info_ex;
1175 TRUSTED_DOMAIN_INFO_POSIX_OFFSET posix_offset;
1176 TRUSTED_DOMAIN_INFO_AUTH_INFO auth_info;
1177 } TRUSTED_DOMAIN_INFO_FULL_INFO;
1179 typedef struct trusted_domain_info_11 {
1180 TRUSTED_DOMAIN_INFO_EX info_ex;
1181 LSA_DATA_BUF2 data1;
1182 } TRUSTED_DOMAIN_INFO_11;
1184 typedef struct trusted_domain_info_all {
1185 TRUSTED_DOMAIN_INFO_EX info_ex;
1186 LSA_DATA_BUF2 data1;
1187 TRUSTED_DOMAIN_INFO_POSIX_OFFSET posix_offset;
1188 TRUSTED_DOMAIN_INFO_AUTH_INFO auth_info;
1189 } TRUSTED_DOMAIN_INFO_ALL;
1191 /* LSA_TRUSTED_DOMAIN_INFO */
1192 typedef union lsa_trusted_domain_info
1195 TRUSTED_DOMAIN_INFO_NAME name;
1197 TRUSTED_DOMAIN_INFO_CONTROLLERS_INFO controllers; */
1198 TRUSTED_DOMAIN_INFO_POSIX_OFFSET posix_offset;
1199 TRUSTED_DOMAIN_INFO_PASSWORD password;
1200 TRUSTED_DOMAIN_INFO_BASIC basic;
1201 TRUSTED_DOMAIN_INFO_EX info_ex;
1202 TRUSTED_DOMAIN_INFO_AUTH_INFO auth_info;
1203 TRUSTED_DOMAIN_INFO_FULL_INFO full_info;
1204 TRUSTED_DOMAIN_INFO_11 info11;
1205 TRUSTED_DOMAIN_INFO_ALL info_all;
1207 } LSA_TRUSTED_DOMAIN_INFO;
1209 /* LSA_R_QUERY_TRUSTED_DOMAIN_INFO - LSA query trusted domain info */
1210 typedef struct r_lsa_query_trusted_domain_info
1212 LSA_TRUSTED_DOMAIN_INFO *info;
1214 } LSA_R_QUERY_TRUSTED_DOMAIN_INFO;
1216 typedef struct dom_info_kerberos {
1217 uint32 enforce_restrictions;
1218 NTTIME service_tkt_lifetime;
1219 NTTIME user_tkt_lifetime;
1220 NTTIME user_tkt_renewaltime;
1223 } LSA_DOM_INFO_POLICY_KERBEROS;
1225 typedef struct dom_info_efs {
1228 } LSA_DOM_INFO_POLICY_EFS;
1230 typedef struct lsa_dom_info_union {
1232 LSA_DOM_INFO_POLICY_EFS efs_policy;
1233 LSA_DOM_INFO_POLICY_KERBEROS krb_policy;
1234 } LSA_DOM_INFO_UNION;
1236 /* LSA_Q_QUERY_DOM_INFO_POLICY - LSA query info */
1237 typedef struct lsa_q_query_dom_info_policy
1239 POLICY_HND pol; /* policy handle */
1240 uint16 info_class; /* info class */
1241 } LSA_Q_QUERY_DOM_INFO_POLICY;
1243 typedef struct lsa_r_query_dom_info_policy
1245 LSA_DOM_INFO_UNION *info;
1247 } LSA_R_QUERY_DOM_INFO_POLICY;
1250 #endif /* _RPC_LSA_H */