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 3 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, see <http://www.gnu.org/licenses/>.
25 #include "rpc_netlogon.h"
27 #define PAC_TYPE_LOGON_INFO 1
28 #define PAC_TYPE_SERVER_CHECKSUM 6
29 #define PAC_TYPE_PRIVSVR_CHECKSUM 7
30 #define PAC_TYPE_LOGON_NAME 10
32 #ifndef KRB5_AUTHDATA_WIN2K_PAC
33 #define KRB5_AUTHDATA_WIN2K_PAC 128
36 #ifndef KRB5_AUTHDATA_IF_RELEVANT
37 #define KRB5_AUTHDATA_IF_RELEVANT 1
41 typedef struct pac_logon_name
{
44 uint8
*username
; /* Actually always little-endian. might not be null terminated, so not UNISTR */
47 typedef struct pac_signature_data
{
49 RPC_DATA_BLOB signature
; /* this not the on-wire-format (!) */
52 typedef struct group_membership
{
57 typedef struct group_membership_array
{
59 GROUP_MEMBERSHIP
*group_membership
;
60 } GROUP_MEMBERSHIP_ARRAY
;
62 #if 0 /* Unused, replaced by NET_USER_INFO_3 - Guenther */
64 typedef struct krb_sid_and_attrs
{
70 typedef struct krb_sid_and_attr_array
{
72 KRB_SID_AND_ATTRS
*krb_sid_and_attrs
;
73 } KRB_SID_AND_ATTR_ARRAY
;
76 /* This is awfully similar to a samr_user_info_23, but not identical.
77 Many of the field names have been swiped from there, because it is
78 so similar that they are likely the same, but many have been verified.
79 Some are in a different order, though... */
80 typedef struct pac_logon_info
{
81 NTTIME logon_time
; /* logon time */
82 NTTIME logoff_time
; /* logoff time */
83 NTTIME kickoff_time
; /* kickoff time */
84 NTTIME pass_last_set_time
; /* password last set time */
85 NTTIME pass_can_change_time
; /* password can change time */
86 NTTIME pass_must_change_time
; /* password must change time */
88 UNIHDR hdr_user_name
; /* user name unicode string header */
89 UNIHDR hdr_full_name
; /* user's full name unicode string header */
90 UNIHDR hdr_logon_script
; /* these last 4 appear to be in a different */
91 UNIHDR hdr_profile_path
; /* order than in the info23 */
95 uint16 logon_count
; /* number of times user has logged onto domain */
96 uint16 bad_password_count
; /* samba4 idl */
101 uint32 group_membership_ptr
;
104 uint8 session_key
[16]; /* samba4 idl */
105 UNIHDR hdr_dom_controller
;
110 uint8 lm_session_key
[8]; /* samba4 idl */
111 uint32 acct_flags
; /* samba4 idl */
115 uint32 ptr_extra_sids
;
117 uint32 ptr_res_group_dom_sid
;
118 uint32 res_group_count
;
119 uint32 ptr_res_groups
;
121 UNISTR2 uni_user_name
; /* user name unicode string header */
122 UNISTR2 uni_full_name
; /* user's full name unicode string header */
123 UNISTR2 uni_logon_script
; /* these last 4 appear to be in a different*/
124 UNISTR2 uni_profile_path
; /* order than in the info23 */
125 UNISTR2 uni_home_dir
;
126 UNISTR2 uni_dir_drive
;
127 UNISTR2 uni_dom_controller
;
128 UNISTR2 uni_dom_name
;
130 GROUP_MEMBERSHIP_ARRAY groups
;
131 KRB_SID_AND_ATTR_ARRAY extra_sids
;
132 DOM_SID2 res_group_dom_sid
;
133 GROUP_MEMBERSHIP_ARRAY res_groups
;
138 typedef struct pac_logon_info
{
139 NET_USER_INFO_3 info3
;
140 DOM_SID2 res_group_dom_sid
;
141 GROUP_MEMBERSHIP_ARRAY res_groups
;
145 typedef struct pac_info_ctr
149 PAC_LOGON_INFO
*logon_info
;
150 PAC_SIGNATURE_DATA
*srv_cksum
;
151 PAC_SIGNATURE_DATA
*privsrv_cksum
;
152 PAC_LOGON_NAME
*logon_name
;
156 typedef struct pac_buffer
{
165 typedef struct pac_data
{
168 PAC_BUFFER
*pac_buffer
;