summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-08-09 20:34:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:57:48 -0500
commit11afc70bb0471653ae7e2135c85853038ab7b95b (patch)
tree368e8a06dae9f46efc5882b738361a6964371132 /source4
parent15dddf7b1ebd9a5b67038a284cc88c1a5f185231 (diff)
downloadsamba-11afc70bb0471653ae7e2135c85853038ab7b95b.tar.gz
samba-11afc70bb0471653ae7e2135c85853038ab7b95b.tar.bz2
samba-11afc70bb0471653ae7e2135c85853038ab7b95b.zip
r1673: using the new [relative] pidl handling, the PAC decode is now much closer
(This used to be commit c33bf6f935025b5623f21cca50664ba70f886b49)
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/idl/krb5pac.idl71
1 files changed, 17 insertions, 54 deletions
diff --git a/source4/librpc/idl/krb5pac.idl b/source4/librpc/idl/krb5pac.idl
index 4937f977f6..e6191c2029 100644
--- a/source4/librpc/idl/krb5pac.idl
+++ b/source4/librpc/idl/krb5pac.idl
@@ -17,7 +17,7 @@ interface krb5pac
nstring account_name;
} UNKNOWN_TYPE_10;
- typedef struct {
+ typedef [flag(NDR_PAHEX)] struct {
uint32 type;
uint8 signature[16];
} PAC_SIGNATURE_DATA;
@@ -36,7 +36,7 @@ interface krb5pac
typedef struct {
uint16 size;
uint16 length;
- uint32 ptr;
+ unistr_noterm *string;
} pac_String;
/* This is awfully similar to a samr_user_info_23, but not identical.
@@ -44,6 +44,7 @@ interface krb5pac
so similar that they are likely the same, but many have been verified.
Some are in a different order, though... */
typedef struct {
+ uint32 unknown[5];
NTTIME logon_time; /* logon time */
NTTIME logoff_time; /* logoff time */
NTTIME kickoff_time; /* kickoff time */
@@ -51,12 +52,12 @@ interface krb5pac
NTTIME pass_can_change_time; /* password can change time */
NTTIME pass_must_change_time; /* password must change time */
- pac_String account_name_ptr;
- pac_String full_name_ptr;
- pac_String logon_script_ptr;
- pac_String profile_path_ptr;
- pac_String home_directory_ptr;
- pac_String home_drive_ptr;
+ pac_String account_name;
+ pac_String full_name;
+ pac_String logon_script;
+ pac_String profile_path;
+ pac_String home_directory;
+ pac_String home_drive;
uint16 logon_count; /* number of times user has logged onto domain */
uint16 reserved12;
@@ -65,51 +66,20 @@ interface krb5pac
uint32 group_rid;
uint32 groups_count;
- uint32 groups_ptr;
+ [size_is(groups_count)] GROUP_MEMBERSHIP *groups;
uint32 user_flags;
uint32 reserved13[4];
- pac_String dom_controller_ptr;
- pac_String dom_name_ptr;
+ pac_String dom_controller;
+ pac_String dom_name;
- uint32 dom_sid_ptr;
+ dom_sid2 *dom_sid;
uint32 reserved16[2];
uint32 reserved17; /* looks like it may be acb_info */
- uint32 reserved18[7];
-
- uint32 extra_sids_count;
- uint32 extra_sids_ptr;
-
- uint32 res_group_dom_sid_ptr;
-
- uint32 res_groups_count;
- uint32 res_groups_ptr;
-
- unistr_noterm account_name;
- unistr_noterm full_name;
- unistr_noterm logon_script;
- unistr_noterm profile_path;
- unistr_noterm home_directory;
- unistr_noterm home_drive;
-
- uint32 groups_count2;
- GROUP_MEMBERSHIP groups[groups_count];
-
- unistr_noterm dom_controller;
- unistr_noterm dom_name;
-
- dom_sid2 dom_sid;
-
-/* uint32 extra_sids_count2;
- KRB_SID_AND_ATTRS extra_sids[extra_sids_count];
-
- dom_sid2 res_group_dom_sid;
-
- uint32 res_groups_count2;
- GROUP_MEMBERSHIP res_groups[res_groups_count];
-*/ } PAC_LOGON_INFO;
+ uint32 reserved18[12];
+ } PAC_LOGON_INFO;
const uint8 PAC_TYPE_LOGON_INFO = 1;
const uint8 PAC_TYPE_SERVER_CHECKSUM = 6;
@@ -126,21 +96,14 @@ interface krb5pac
typedef struct {
uint32 type;
uint32 size;
- uint64 offset;
+ [relative,switch_is(type)] PAC_INFO *info;
+ uint32 _pad;
} PAC_INFO_HDR;
typedef [public] struct {
uint32 num_buffers;
uint32 version;
PAC_INFO_HDR pac_info_hdr_ptr[num_buffers];
- uint32 dummy1[5];
- [switch_is(1)] PAC_INFO info1;
- uint32 dummy2[1];
- [switch_is(10)] PAC_INFO info10;
- [switch_is(6)] PAC_INFO info6;
- uint32 dummy4[1];
- [switch_is(7)] PAC_INFO info7;
- uint32 dummy5[1];
} PAC_DATA;
void decode_pac(