2 Unix SMB/CIFS implementation.
3 Kerberos authorization data
4 Copyright (C) Jim McDonough <jmcd@us.ibm.com> 2003
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #include "rpc_netlogon.h"
28 #define PAC_TYPE_LOGON_INFO 1
29 #define PAC_TYPE_SERVER_CHECKSUM 6
30 #define PAC_TYPE_PRIVSVR_CHECKSUM 7
31 #define PAC_TYPE_LOGON_NAME 10
33 #ifndef KRB5_AUTHDATA_WIN2K_PAC
34 #define KRB5_AUTHDATA_WIN2K_PAC 128
37 #ifndef KRB5_AUTHDATA_IF_RELEVANT
38 #define KRB5_AUTHDATA_IF_RELEVANT 1
42 typedef struct pac_logon_name
{
45 uint16
*username
; /* might not be null terminated, so not UNISTR */
48 typedef struct pac_signature_data
{
50 RPC_DATA_BLOB signature
; /* this not the on-wire-format (!) */
53 typedef struct group_membership
{
58 typedef struct group_membership_array
{
60 GROUP_MEMBERSHIP
*group_membership
;
61 } GROUP_MEMBERSHIP_ARRAY
;
63 #if 0 /* Unused, replaced by NET_USER_INFO_3 - Guenther */
65 typedef struct krb_sid_and_attrs
{
71 typedef struct krb_sid_and_attr_array
{
73 KRB_SID_AND_ATTRS
*krb_sid_and_attrs
;
74 } KRB_SID_AND_ATTR_ARRAY
;
77 /* This is awfully similar to a samr_user_info_23, but not identical.
78 Many of the field names have been swiped from there, because it is
79 so similar that they are likely the same, but many have been verified.
80 Some are in a different order, though... */
81 typedef struct pac_logon_info
{
82 NTTIME logon_time
; /* logon time */
83 NTTIME logoff_time
; /* logoff time */
84 NTTIME kickoff_time
; /* kickoff time */
85 NTTIME pass_last_set_time
; /* password last set time */
86 NTTIME pass_can_change_time
; /* password can change time */
87 NTTIME pass_must_change_time
; /* password must change time */
89 UNIHDR hdr_user_name
; /* user name unicode string header */
90 UNIHDR hdr_full_name
; /* user's full name unicode string header */
91 UNIHDR hdr_logon_script
; /* these last 4 appear to be in a different */
92 UNIHDR hdr_profile_path
; /* order than in the info23 */
96 uint16 logon_count
; /* number of times user has logged onto domain */
97 uint16 bad_password_count
; /* samba4 idl */
102 uint32 group_membership_ptr
;
105 uint8 session_key
[16]; /* samba4 idl */
106 UNIHDR hdr_dom_controller
;
111 uint8 lm_session_key
[8]; /* samba4 idl */
112 uint32 acct_flags
; /* samba4 idl */
116 uint32 ptr_extra_sids
;
118 uint32 ptr_res_group_dom_sid
;
119 uint32 res_group_count
;
120 uint32 ptr_res_groups
;
122 UNISTR2 uni_user_name
; /* user name unicode string header */
123 UNISTR2 uni_full_name
; /* user's full name unicode string header */
124 UNISTR2 uni_logon_script
; /* these last 4 appear to be in a different*/
125 UNISTR2 uni_profile_path
; /* order than in the info23 */
126 UNISTR2 uni_home_dir
;
127 UNISTR2 uni_dir_drive
;
128 UNISTR2 uni_dom_controller
;
129 UNISTR2 uni_dom_name
;
131 GROUP_MEMBERSHIP_ARRAY groups
;
132 KRB_SID_AND_ATTR_ARRAY extra_sids
;
133 DOM_SID2 res_group_dom_sid
;
134 GROUP_MEMBERSHIP_ARRAY res_groups
;
139 typedef struct pac_logon_info
{
140 NET_USER_INFO_3 info3
;
141 DOM_SID2 res_group_dom_sid
;
142 GROUP_MEMBERSHIP_ARRAY res_groups
;
146 typedef struct pac_info_ctr
150 PAC_LOGON_INFO
*logon_info
;
151 PAC_SIGNATURE_DATA
*srv_cksum
;
152 PAC_SIGNATURE_DATA
*privsrv_cksum
;
153 PAC_LOGON_NAME
*logon_name
;
157 typedef struct pac_buffer
{
166 typedef struct pac_data
{
169 PAC_BUFFER
*pac_buffer
;