r10656: BIG merge from trunk. Features not copied over
[bbaumbach/samba-autobuild/.git] / source3 / include / authdata.h
index 1be127aaac6b543011a52e0246216e30e7885164..194429ab673c446c19d261dfb7b6e962f95ebc20 100644 (file)
 #define _AUTHDATA_H 
 
 #include "rpc_misc.h"
+#include "rpc_netlogon.h"
 
 #define PAC_TYPE_LOGON_INFO 1
 #define PAC_TYPE_SERVER_CHECKSUM 6
 #define PAC_TYPE_PRIVSVR_CHECKSUM 7
 #define PAC_TYPE_LOGON_NAME 10
 
+#ifndef KRB5_AUTHDATA_WIN2K_PAC
+#define KRB5_AUTHDATA_WIN2K_PAC 128
+#endif
+
+#ifndef KRB5_AUTHDATA_IF_RELEVANT
+#define KRB5_AUTHDATA_IF_RELEVANT 1
+#endif
+
+
 typedef struct pac_logon_name {
        NTTIME logon_time;
        uint16 len;
@@ -37,7 +47,7 @@ typedef struct pac_logon_name {
 
 typedef struct pac_signature_data {
        uint32 type;
-       uint8 *signature;
+       RPC_DATA_BLOB signature; /* this not the on-wire-format (!) */
 } PAC_SIGNATURE_DATA;
 
 typedef struct group_membership {
@@ -50,6 +60,8 @@ typedef struct group_membership_array {
        GROUP_MEMBERSHIP *group_membership;
 } GROUP_MEMBERSHIP_ARRAY;
 
+#if 0 /* Unused, replaced by NET_USER_INFO_3 - Guenther */
+
 typedef struct krb_sid_and_attrs {
        uint32 sid_ptr;
        uint32 attrs;
@@ -82,7 +94,7 @@ typedef struct pac_logon_info {
        UNIHDR hdr_dir_drive;   
 
        uint16 logon_count; /* number of times user has logged onto domain */
-       uint16 reserved12;
+       uint16 bad_password_count;      /* samba4 idl */
 
        uint32 user_rid;
        uint32 group_rid;
@@ -90,15 +102,15 @@ typedef struct pac_logon_info {
        uint32 group_membership_ptr;
        uint32 user_flags;
 
-       uint32 reserved13[4];
+       uint8 session_key[16];          /* samba4 idl */
        UNIHDR hdr_dom_controller;
        UNIHDR hdr_dom_name;
 
        uint32 ptr_dom_sid;
-       
-       uint32 reserved16[2];
-       uint32 reserved17;      /* looks like it may be acb_info */
-       uint32 reserved18[7];
+
+       uint8 lm_session_key[8];        /* samba4 idl */
+       uint32 acct_flags;              /* samba4 idl */
+       uint32 unknown[7];
 
        uint32 sid_count;
        uint32 ptr_extra_sids;
@@ -121,6 +133,14 @@ typedef struct pac_logon_info {
        DOM_SID2 res_group_dom_sid;
        GROUP_MEMBERSHIP_ARRAY res_groups;
 
+} PAC_LOGON_INFO;
+#endif
+
+typedef struct pac_logon_info {        
+       NET_USER_INFO_3 info3;
+       DOM_SID2 res_group_dom_sid;
+       GROUP_MEMBERSHIP_ARRAY res_groups;
+
 } PAC_LOGON_INFO;
 
 typedef struct pac_info_ctr
@@ -134,18 +154,19 @@ typedef struct pac_info_ctr
        } pac;
 } PAC_INFO_CTR;
 
-typedef struct pac_info_hdr {
+typedef struct pac_buffer {
        uint32 type;
        uint32 size;
        uint32 offset;
        uint32 offsethi;
        PAC_INFO_CTR *ctr;
-} PAC_INFO_HDR;
+       uint32 pad;
+} PAC_BUFFER;
 
 typedef struct pac_data {
        uint32 num_buffers;
        uint32 version;
-       PAC_INFO_HDR *pac_info_hdr_ptr;
+       PAC_BUFFER *pac_buffer;
 } PAC_DATA;