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) Jean François Micouleau 2002
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 3 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, see <http://www.gnu.org/licenses/>.
23 #ifndef _RPC_NETLOGON_H /* _RPC_NETLOGON_H */
24 #define _RPC_NETLOGON_H
28 #define NET_SAMLOGON 0x02
29 #define NET_SAMLOGOFF 0x03
30 #define NET_REQCHAL 0x04
32 #define NET_SRVPWSET 0x06
33 #define NET_SAM_DELTAS 0x07
34 #define NET_GETDCNAME 0x0b
35 #define NET_LOGON_CTRL 0x0c
36 #define NET_GETANYDCNAME 0x0d
37 #define NET_AUTH2 0x0f
38 #define NET_LOGON_CTRL2 0x0e
39 #define NET_SAM_SYNC 0x10
40 #define NET_TRUST_DOM_LIST 0x13
41 #define NET_DSR_GETDCNAME 0x14
42 #define NET_AUTH3 0x1a
43 #define NET_DSR_GETDCNAMEEX 0x1b
44 #define NET_DSR_GETSITENAME 0x1c
45 #define NET_DSR_GETDCNAMEEX2 0x22
46 #define NET_SAMLOGON_EX 0x27
48 /* Returned delta types */
49 #define SAM_DELTA_DOMAIN_INFO 0x01
50 #define SAM_DELTA_GROUP_INFO 0x02
51 #define SAM_DELTA_RENAME_GROUP 0x04
52 #define SAM_DELTA_ACCOUNT_INFO 0x05
53 #define SAM_DELTA_RENAME_USER 0x07
54 #define SAM_DELTA_GROUP_MEM 0x08
55 #define SAM_DELTA_ALIAS_INFO 0x09
56 #define SAM_DELTA_RENAME_ALIAS 0x0b
57 #define SAM_DELTA_ALIAS_MEM 0x0c
58 #define SAM_DELTA_POLICY_INFO 0x0d
59 #define SAM_DELTA_TRUST_DOMS 0x0e
60 #define SAM_DELTA_PRIVS_INFO 0x10 /* DT_DELTA_ACCOUNTS */
61 #define SAM_DELTA_SECRET_INFO 0x12
62 #define SAM_DELTA_DELETE_GROUP 0x14
63 #define SAM_DELTA_DELETE_USER 0x15
64 #define SAM_DELTA_MODIFIED_COUNT 0x16
66 /* flags use when sending a NETLOGON_CONTROL request */
68 #define NETLOGON_CONTROL_SYNC 0x2
69 #define NETLOGON_CONTROL_REDISCOVER 0x5
70 #define NETLOGON_CONTROL_TC_QUERY 0x6
71 #define NETLOGON_CONTROL_TRANSPORT_NOTIFY 0x7
72 #define NETLOGON_CONTROL_SET_DBFLAG 0xfffe
74 /* Some flag values reverse engineered from NLTEST.EXE */
75 /* used in the NETLOGON_CONTROL[2] reply */
77 #define NL_CTRL_IN_SYNC 0x0000
78 #define NL_CTRL_REPL_NEEDED 0x0001
79 #define NL_CTRL_REPL_IN_PROGRESS 0x0002
80 #define NL_CTRL_FULL_SYNC 0x0004
82 #define LOGON_KRB5_FAIL_CLOCK_SKEW 0x02000000
84 /* Flags for controlling the behaviour of a particular logon */
86 /* sets NETLOGON_SERVER_TRUST_ACCOUNT user_flag */
88 #define MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT 0x00000020
89 #define MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT 0x00000800
91 /* updates the "logon time" on network logon */
92 #define MSV1_0_UPDATE_LOGON_STATISTICS 0x00000004
94 /* returns the user parameters in the driveletter */
95 #define MSV1_0_RETURN_USER_PARAMETERS 0x00000008
97 /* returns the profilepath in the driveletter and
98 * sets LOGON_PROFILE_PATH_RETURNED user_flag */
99 #define MSV1_0_RETURN_PROFILE_PATH 0x00000200
103 /* I think this is correct - it's what gets parsed on the wire. JRA. */
104 /* NET_USER_INFO_2 */
105 typedef struct net_user_info_2 {
106 uint32 ptr_user_info;
108 NTTIME logon_time; /* logon time */
109 NTTIME logoff_time; /* logoff time */
110 NTTIME kickoff_time; /* kickoff time */
111 NTTIME pass_last_set_time; /* password last set time */
112 NTTIME pass_can_change_time; /* password can change time */
113 NTTIME pass_must_change_time; /* password must change time */
115 UNIHDR hdr_user_name; /* username unicode string header */
116 UNIHDR hdr_full_name; /* user's full name unicode string header */
117 UNIHDR hdr_logon_script; /* logon script unicode string header */
118 UNIHDR hdr_profile_path; /* profile path unicode string header */
119 UNIHDR hdr_home_dir; /* home directory unicode string header */
120 UNIHDR hdr_dir_drive; /* home directory drive unicode string header */
122 uint16 logon_count; /* logon count */
123 uint16 bad_pw_count; /* bad password count */
125 uint32 user_id; /* User ID */
126 uint32 group_id; /* Group ID */
127 uint32 num_groups; /* num groups */
128 uint32 buffer_groups; /* undocumented buffer pointer to groups. */
129 uint32 user_flgs; /* user flags */
131 uint8 user_sess_key[16]; /* unused user session key */
133 UNIHDR hdr_logon_srv; /* logon server unicode string header */
134 UNIHDR hdr_logon_dom; /* logon domain unicode string header */
136 uint32 buffer_dom_id; /* undocumented logon domain id pointer */
137 uint8 padding[40]; /* unused padding bytes. expansion room */
139 UNISTR2 uni_user_name; /* username unicode string */
140 UNISTR2 uni_full_name; /* user's full name unicode string */
141 UNISTR2 uni_logon_script; /* logon script unicode string */
142 UNISTR2 uni_profile_path; /* profile path unicode string */
143 UNISTR2 uni_home_dir; /* home directory unicode string */
144 UNISTR2 uni_dir_drive; /* home directory drive unicode string */
146 uint32 num_groups2; /* num groups */
147 DOM_GID *gids; /* group info */
149 UNISTR2 uni_logon_srv; /* logon server unicode string */
150 UNISTR2 uni_logon_dom; /* logon domain unicode string */
152 DOM_SID2 dom_sid; /* domain SID */
154 uint32 num_other_groups; /* other groups */
155 DOM_GID *other_gids; /* group info */
156 DOM_SID2 *other_sids; /* undocumented - domain SIDs */
161 /* NET_USER_INFO_2 */
162 typedef struct net_user_info_2 {
163 uint32 ptr_user_info;
165 NTTIME logon_time; /* logon time */
166 NTTIME logoff_time; /* logoff time */
167 NTTIME kickoff_time; /* kickoff time */
168 NTTIME pass_last_set_time; /* password last set time */
169 NTTIME pass_can_change_time; /* password can change time */
170 NTTIME pass_must_change_time; /* password must change time */
172 UNIHDR hdr_user_name; /* username unicode string header */
173 UNIHDR hdr_full_name; /* user's full name unicode string header */
174 UNIHDR hdr_logon_script; /* logon script unicode string header */
175 UNIHDR hdr_profile_path; /* profile path unicode string header */
176 UNIHDR hdr_home_dir; /* home directory unicode string header */
177 UNIHDR hdr_dir_drive; /* home directory drive unicode string header */
179 uint16 logon_count; /* logon count */
180 uint16 bad_pw_count; /* bad password count */
182 uint32 user_rid; /* User RID */
183 uint32 group_rid; /* Group RID */
185 uint32 num_groups; /* num groups */
186 uint32 buffer_groups; /* undocumented buffer pointer to groups. */
187 uint32 user_flgs; /* user flags */
189 uint8 user_sess_key[16]; /* user session key */
191 UNIHDR hdr_logon_srv; /* logon server unicode string header */
192 UNIHDR hdr_logon_dom; /* logon domain unicode string header */
194 uint32 buffer_dom_id; /* undocumented logon domain id pointer */
195 uint8 lm_sess_key[8]; /* lm session key */
196 uint32 acct_flags; /* account flags */
197 uint32 unknown[7]; /* unknown */
199 UNISTR2 uni_user_name; /* username unicode string */
200 UNISTR2 uni_full_name; /* user's full name unicode string */
201 UNISTR2 uni_logon_script; /* logon script unicode string */
202 UNISTR2 uni_profile_path; /* profile path unicode string */
203 UNISTR2 uni_home_dir; /* home directory unicode string */
204 UNISTR2 uni_dir_drive; /* home directory drive unicode string */
206 UNISTR2 uni_logon_srv; /* logon server unicode string */
207 UNISTR2 uni_logon_dom; /* logon domain unicode string */
209 DOM_SID2 dom_sid; /* domain SID */
212 /* NET_USER_INFO_3 */
213 typedef struct net_user_info_3 {
214 uint32 ptr_user_info;
216 NTTIME logon_time; /* logon time */
217 NTTIME logoff_time; /* logoff time */
218 NTTIME kickoff_time; /* kickoff time */
219 NTTIME pass_last_set_time; /* password last set time */
220 NTTIME pass_can_change_time; /* password can change time */
221 NTTIME pass_must_change_time; /* password must change time */
223 UNIHDR hdr_user_name; /* username unicode string header */
224 UNIHDR hdr_full_name; /* user's full name unicode string header */
225 UNIHDR hdr_logon_script; /* logon script unicode string header */
226 UNIHDR hdr_profile_path; /* profile path unicode string header */
227 UNIHDR hdr_home_dir; /* home directory unicode string header */
228 UNIHDR hdr_dir_drive; /* home directory drive unicode string header */
230 uint16 logon_count; /* logon count */
231 uint16 bad_pw_count; /* bad password count */
233 uint32 user_rid; /* User RID */
234 uint32 group_rid; /* Group RID */
236 uint32 num_groups; /* num groups */
237 uint32 buffer_groups; /* undocumented buffer pointer to groups. */
238 uint32 user_flgs; /* user flags */
240 uint8 user_sess_key[16]; /* user session key */
242 UNIHDR hdr_logon_srv; /* logon server unicode string header */
243 UNIHDR hdr_logon_dom; /* logon domain unicode string header */
245 uint32 buffer_dom_id; /* undocumented logon domain id pointer */
246 uint8 lm_sess_key[8]; /* lm session key */
247 uint32 acct_flags; /* account flags */
248 uint32 unknown[7]; /* unknown */
250 uint32 num_other_sids; /* number of foreign/trusted domain sids */
251 uint32 buffer_other_sids;
253 /* The next three uint32 are not really part of user_info_3 but here
254 * for parsing convenience. They are only valid in Kerberos PAC
255 * parsing - Guenther */
256 uint32 ptr_res_group_dom_sid;
257 uint32 res_group_count;
258 uint32 ptr_res_groups;
260 UNISTR2 uni_user_name; /* username unicode string */
261 UNISTR2 uni_full_name; /* user's full name unicode string */
262 UNISTR2 uni_logon_script; /* logon script unicode string */
263 UNISTR2 uni_profile_path; /* profile path unicode string */
264 UNISTR2 uni_home_dir; /* home directory unicode string */
265 UNISTR2 uni_dir_drive; /* home directory drive unicode string */
267 uint32 num_groups2; /* num groups */
268 DOM_GID *gids; /* group info */
270 UNISTR2 uni_logon_srv; /* logon server unicode string */
271 UNISTR2 uni_logon_dom; /* logon domain unicode string */
273 DOM_SID2 dom_sid; /* domain SID */
275 DOM_SID2 *other_sids; /* foreign/trusted domain SIDs */
276 uint32 *other_sids_attrib;
280 typedef struct neg_flags_info {
281 uint32 neg_flags; /* negotiated flags */
286 typedef struct net_q_req_chal_info {
287 uint32 undoc_buffer; /* undocumented buffer pointer */
288 UNISTR2 uni_logon_srv; /* logon server unicode string */
289 UNISTR2 uni_logon_clnt; /* logon client unicode string */
290 DOM_CHAL clnt_chal; /* client challenge */
295 typedef struct net_r_req_chal_info {
296 DOM_CHAL srv_chal; /* server challenge */
297 NTSTATUS status; /* return code */
301 typedef struct net_q_auth_info {
302 DOM_LOG_INFO clnt_id; /* client identification info */
303 DOM_CHAL clnt_chal; /* client-calculated credentials */
307 typedef struct net_r_auth_info {
308 DOM_CHAL srv_chal; /* server-calculated credentials */
309 NTSTATUS status; /* return code */
313 typedef struct net_q_auth2_info {
314 DOM_LOG_INFO clnt_id; /* client identification info */
315 DOM_CHAL clnt_chal; /* client-calculated credentials */
317 NEG_FLAGS clnt_flgs; /* usually 0x0000 01ff */
322 typedef struct net_r_auth2_info {
323 DOM_CHAL srv_chal; /* server-calculated credentials */
324 NEG_FLAGS srv_flgs; /* usually 0x0000 01ff */
325 NTSTATUS status; /* return code */
329 typedef struct net_q_auth3_info {
330 DOM_LOG_INFO clnt_id; /* client identification info */
331 DOM_CHAL clnt_chal; /* client-calculated credentials */
332 NEG_FLAGS clnt_flgs; /* usually 0x6007 ffff */
336 typedef struct net_r_auth3_info {
337 DOM_CHAL srv_chal; /* server-calculated credentials */
338 NEG_FLAGS srv_flgs; /* usually 0x6007 ffff */
339 uint32 unknown; /* 0x0000045b */
340 NTSTATUS status; /* return code */
344 /* NET_Q_SRV_PWSET */
345 typedef struct net_q_srv_pwset_info {
346 DOM_CLNT_INFO clnt_id; /* client identification/authentication info */
347 uint8 pwd[16]; /* new password - undocumented. */
350 /* NET_R_SRV_PWSET */
351 typedef struct net_r_srv_pwset_info {
352 DOM_CRED srv_cred; /* server-calculated credentials */
354 NTSTATUS status; /* return code */
358 typedef struct net_network_info_2 {
359 uint32 ptr_id_info2; /* pointer to id_info_2 */
360 UNIHDR hdr_domain_name; /* domain name unicode header */
361 uint32 param_ctrl; /* param control (0x2) */
362 DOM_LOGON_ID logon_id; /* logon ID */
363 UNIHDR hdr_user_name; /* user name unicode header */
364 UNIHDR hdr_wksta_name; /* workstation name unicode header */
365 uint8 lm_chal[8]; /* lan manager 8 byte challenge */
366 STRHDR hdr_nt_chal_resp; /* nt challenge response */
367 STRHDR hdr_lm_chal_resp; /* lm challenge response */
369 UNISTR2 uni_domain_name; /* domain name unicode string */
370 UNISTR2 uni_user_name; /* user name unicode string */
371 UNISTR2 uni_wksta_name; /* workgroup name unicode string */
372 STRING2 nt_chal_resp; /* nt challenge response */
373 STRING2 lm_chal_resp; /* lm challenge response */
377 typedef struct id_info_1 {
378 uint32 ptr_id_info1; /* pointer to id_info_1 */
379 UNIHDR hdr_domain_name; /* domain name unicode header */
380 uint32 param_ctrl; /* param control */
381 DOM_LOGON_ID logon_id; /* logon ID */
382 UNIHDR hdr_user_name; /* user name unicode header */
383 UNIHDR hdr_wksta_name; /* workstation name unicode header */
384 OWF_INFO lm_owf; /* LM OWF Password */
385 OWF_INFO nt_owf; /* NT OWF Password */
386 UNISTR2 uni_domain_name; /* domain name unicode string */
387 UNISTR2 uni_user_name; /* user name unicode string */
388 UNISTR2 uni_wksta_name; /* workgroup name unicode string */
391 #define INTERACTIVE_LOGON_TYPE 1
392 #define NET_LOGON_TYPE 2
394 /* NET_ID_INFO_CTR */
395 typedef struct net_id_info_ctr_info {
399 NET_ID_INFO_1 id1; /* auth-level 1 - interactive user login */
400 NET_ID_INFO_2 id2; /* auth-level 2 - workstation referred login */
404 /* SAM_INFO - sam logon/off id structure */
405 typedef struct sam_info {
406 DOM_CLNT_INFO2 client;
407 uint32 ptr_rtn_cred; /* pointer to return credentials */
408 DOM_CRED rtn_cred; /* return credentials */
410 NET_ID_INFO_CTR *ctr;
413 /* SAM_INFO - sam logon/off id structure - no creds */
414 typedef struct sam_info_ex {
417 NET_ID_INFO_CTR *ctr;
420 /* NET_Q_SAM_LOGON */
421 typedef struct net_q_sam_logon_info {
423 uint16 validation_level;
426 /* NET_Q_SAM_LOGON_EX */
427 typedef struct net_q_sam_logon_info_ex {
428 DOM_SAM_INFO_EX sam_id;
429 uint16 validation_level;
431 } NET_Q_SAM_LOGON_EX;
433 /* NET_R_SAM_LOGON */
434 typedef struct net_r_sam_logon_info {
435 uint32 buffer_creds; /* undocumented buffer pointer */
436 DOM_CRED srv_creds; /* server credentials. server time stamp appears to be ignored. */
438 uint16 switch_value; /* 3 - indicates type of USER INFO */
439 NET_USER_INFO_3 *user;
441 uint32 auth_resp; /* 1 - Authoritative response; 0 - Non-Auth? */
443 NTSTATUS status; /* return code */
446 /* NET_R_SAM_LOGON_EX */
447 typedef struct net_r_sam_logon_info_ex {
448 uint16 switch_value; /* 3 - indicates type of USER INFO */
449 NET_USER_INFO_3 *user;
451 uint32 auth_resp; /* 1 - Authoritative response; 0 - Non-Auth? */
454 NTSTATUS status; /* return code */
455 } NET_R_SAM_LOGON_EX;
458 /* NET_Q_SAM_LOGOFF */
459 typedef struct net_q_sam_logoff_info {
463 /* NET_R_SAM_LOGOFF */
464 typedef struct net_r_sam_logoff_info {
465 uint32 buffer_creds; /* undocumented buffer pointer */
466 DOM_CRED srv_creds; /* server credentials. server time stamp appears to be ignored. */
467 NTSTATUS status; /* return code */
471 typedef struct net_q_sam_sync_info {
472 UNISTR2 uni_srv_name; /* \\PDC */
473 UNISTR2 uni_cli_name; /* BDC */
478 uint32 restart_state;
481 uint32 max_size; /* preferred maximum length */
485 typedef struct sam_delta_hdr_info {
486 uint16 type; /* type of structure attached */
495 typedef struct account_lockout_string {
499 /* uint16 *bindata; */
500 uint64 lockout_duration;
502 uint32 bad_attempt_lockout;
506 /* HDR_LOCKOUT_STRING */
507 typedef struct hdr_account_lockout_string {
511 } HDR_LOCKOUT_STRING;
513 /* SAM_DOMAIN_INFO (0x1) */
514 typedef struct sam_domain_info_info {
520 uint16 pwd_history_len;
523 uint64 dom_mod_count;
524 NTTIME creation_time;
525 uint32 security_information;
527 BUFHDR4 hdr_sec_desc; /* security descriptor */
529 HDR_LOCKOUT_STRING hdr_account_lockout;
535 UNISTR2 uni_dom_name;
536 UNISTR2 buf_oem_info;
538 RPC_DATA_BLOB buf_sec_desc;
540 LOCKOUT_STRING account_lockout;
542 UNISTR2 buf_unknown2;
543 UNISTR2 buf_unknown3;
544 UNISTR2 buf_unknown4;
546 uint32 logon_chgpass;
552 /* SAM_GROUP_INFO (0x2) */
553 typedef struct sam_group_info_info {
557 BUFHDR2 hdr_sec_desc; /* security descriptor */
560 UNISTR2 uni_grp_name;
561 UNISTR2 uni_grp_desc;
562 RPC_DATA_BLOB buf_sec_desc;
566 typedef struct sam_passwd_info {
567 /* this structure probably contains password history */
568 /* this is probably a count of lm/nt pairs */
569 uint32 unk_0; /* 0x0000 0002 */
572 uint8 buf_lm_pwd[16];
575 uint8 buf_nt_pwd[16];
581 /* SAM_ACCOUNT_INFO (0x5) */
582 typedef struct sam_account_info_info {
583 UNIHDR hdr_acct_name;
584 UNIHDR hdr_full_name;
590 UNIHDR hdr_dir_drive;
591 UNIHDR hdr_logon_script;
592 UNIHDR hdr_acct_desc;
593 UNIHDR hdr_workstations;
598 uint32 logon_divs; /* 0xA8 */
599 uint32 ptr_logon_hrs;
601 uint16 bad_pwd_count;
603 NTTIME pwd_last_set_time;
604 NTTIME acct_expiry_time;
609 uint8 nt_pwd_present;
610 uint8 lm_pwd_present;
614 UNIHDR hdr_parameters;
618 BUFHDR2 hdr_sec_desc; /* security descriptor */
621 UNIHDR hdr_reserved[3]; /* space for more strings */
622 uint32 dw_reserved[4]; /* space for more data - first two seem to
625 UNISTR2 uni_acct_name;
626 UNISTR2 uni_full_name;
627 UNISTR2 uni_home_dir;
628 UNISTR2 uni_dir_drive;
629 UNISTR2 uni_logon_script;
630 UNISTR2 uni_acct_desc;
631 UNISTR2 uni_workstations;
633 uint32 unknown1; /* 0x4EC */
634 uint32 unknown2; /* 0 */
636 RPC_DATA_BLOB buf_logon_hrs;
638 UNISTR2 uni_parameters;
640 RPC_DATA_BLOB buf_sec_desc;
644 /* SAM_GROUP_MEM_INFO (0x8) */
645 typedef struct sam_group_mem_info_info {
657 } SAM_GROUP_MEM_INFO;
659 /* SAM_ALIAS_INFO (0x9) */
660 typedef struct sam_alias_info_info {
663 BUFHDR2 hdr_sec_desc; /* security descriptor */
667 UNISTR2 uni_als_name;
668 RPC_DATA_BLOB buf_sec_desc;
669 UNISTR2 uni_als_desc;
672 /* SAM_ALIAS_MEM_INFO (0xC) */
673 typedef struct sam_alias_mem_info_info {
681 } SAM_ALIAS_MEM_INFO;
684 /* SAM_DELTA_POLICY (0x0D) */
686 uint32 max_log_size; /* 0x5000 */
687 uint64 audit_retention_period; /* 0 */
688 uint32 auditing_mode; /* 0 */
694 uint32 paged_pool_limit; /* 0x02000000 */
695 uint32 non_paged_pool_limit; /* 0x00100000 */
696 uint32 min_workset_size; /* 0x00010000 */
697 uint32 max_workset_size; /* 0x0f000000 */
698 uint32 page_file_limit; /* 0 */
699 uint64 time_limit; /* 0 */
700 NTTIME modify_time; /* 0x3c*/
701 NTTIME create_time; /* a7080110 */
702 BUFHDR2 hdr_sec_desc;
704 uint32 num_event_audit_options;
705 uint32 event_audit_option;
710 RPC_DATA_BLOB buf_sec_desc;
713 /* SAM_DELTA_TRUST_DOMS */
729 } SAM_DELTA_TRUSTDOMS;
731 /* SAM_DELTA_PRIVS (0x10) */
738 uint32 priv_attr_ptr;
739 uint32 priv_name_ptr;
741 uint32 paged_pool_limit; /* 0x02000000 */
742 uint32 non_paged_pool_limit; /* 0x00100000 */
743 uint32 min_workset_size; /* 0x00010000 */
744 uint32 max_workset_size; /* 0x0f000000 */
745 uint32 page_file_limit; /* 0 */
746 uint64 time_limit; /* 0 */
747 uint32 system_flags; /* 1 */
748 BUFHDR2 hdr_sec_desc;
752 uint32 attribute_count;
755 uint32 privlist_count;
756 UNIHDR *hdr_privslist;
757 UNISTR2 *uni_privslist;
759 RPC_DATA_BLOB buf_sec_desc;
762 /* SAM_DELTA_SECRET */
780 uint32 unknow2; /* 0x0 12 times */
783 uint32 reserved1; /* 0 */
788 uint32 reserved2; /* 0 */
796 /* SAM_DELTA_MOD_COUNT (0x16) */
799 uint32 dom_mod_count_ptr;
800 uint64 dom_mod_count; /* domain mod count at last sync */
801 } SAM_DELTA_MOD_COUNT;
803 typedef union sam_delta_ctr_info {
804 SAM_DOMAIN_INFO domain_info ;
805 SAM_GROUP_INFO group_info ;
806 SAM_ACCOUNT_INFO account_info;
807 SAM_GROUP_MEM_INFO grp_mem_info;
808 SAM_ALIAS_INFO alias_info ;
809 SAM_ALIAS_MEM_INFO als_mem_info;
810 SAM_DELTA_POLICY policy_info;
811 SAM_DELTA_PRIVS privs_info;
812 SAM_DELTA_MOD_COUNT mod_count;
813 SAM_DELTA_TRUSTDOMS trustdoms_info;
814 SAM_DELTA_SECRET secret_info;
818 typedef struct net_r_sam_sync_info {
828 SAM_DELTA_HDR *hdr_deltas;
829 SAM_DELTA_CTR *deltas;
834 /* NET_Q_SAM_DELTAS */
835 typedef struct net_q_sam_deltas_info {
836 UNISTR2 uni_srv_name;
837 UNISTR2 uni_cli_name;
842 uint64 dom_mod_count; /* domain mod count at last sync */
844 uint32 max_size; /* preferred maximum length */
847 /* NET_R_SAM_DELTAS */
848 typedef struct net_r_sam_deltas_info {
851 uint64 dom_mod_count; /* new domain mod count */
857 SAM_DELTA_HDR *hdr_deltas;
858 SAM_DELTA_CTR *deltas;
863 #define DSGETDC_VALID_FLAGS ( \
864 DS_FORCE_REDISCOVERY | \
865 DS_DIRECTORY_SERVICE_REQUIRED | \
866 DS_DIRECTORY_SERVICE_PREFERRED | \
867 DS_GC_SERVER_REQUIRED | \
869 DS_BACKGROUND_ONLY | \
872 DS_TIMESERV_REQUIRED | \
873 DS_WRITABLE_REQUIRED | \
874 DS_GOOD_TIMESERV_PREFERRED | \
876 DS_ONLY_LDAP_NEEDED | \
879 DS_RETURN_FLAT_NAME | \
882 struct DS_DOMAIN_CONTROLLER_INFO {
883 const char *domain_controller_name;
884 const char *domain_controller_address;
885 int32 domain_controller_address_type;
886 struct GUID *domain_guid;
887 const char *domain_name;
888 const char *dns_forest_name;
890 const char *dc_site_name;
891 const char *client_site_name;
894 #endif /* _RPC_NETLOGON_H */