From a3b7bdd7b997fd6d41b8b96676eb58471112d931 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Tue, 7 Oct 1997 14:58:07 +0000 Subject: pipes.c: some routines to create LSA RPC packets. none of them are used. lsaparse.c: smbparse.c: smb.h: more tidy-up. (This used to be commit b37e21273e81b875876e8e8ddf6804714044ffd8) --- source3/include/proto.h | 1 + source3/include/smb.h | 47 +++++++++++++++++++++++++++++++---------------- 2 files changed, 32 insertions(+), 16 deletions(-) (limited to 'source3/include') diff --git a/source3/include/proto.h b/source3/include/proto.h index 202b151150..8f8ec5aa8a 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -312,6 +312,7 @@ BOOL remove_share_oplock(int fnum, share_lock_token token); /*The following definitions come from lsaparse.c */ +char* lsa_io_r_open_pol(BOOL io, LSA_R_OPEN_POL *r_p, char *q, char *base, int align); char* lsa_io_q_query(BOOL io, LSA_Q_QUERY_INFO *q_q, char *q, char *base, int align); char* lsa_io_r_query(BOOL io, LSA_R_QUERY_INFO *r_q, char *q, char *base, int align); char* lsa_io_q_lookup_sids(BOOL io, LSA_Q_LOOKUP_SIDS *q_s, char *q, char *base, int align); diff --git a/source3/include/smb.h b/source3/include/smb.h index 43e402359f..4850b33e49 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -331,16 +331,6 @@ typedef struct domsid2_info } DOM_SID2; -/* DOM_SID3 - domain SID structure - SIDs stored in unicode */ -typedef struct domsid3_info -{ - UNISTR str; /* domain SID unicode string */ - uint32 undoc; /* value is 0 */ - uint32 type1; /* value is 1 */ - uint32 type2; /* value is 5 or 3 */ - -} DOM_SID3; - /* DOM_RID2 - domain RID structure */ typedef struct domrid2_info { @@ -409,8 +399,8 @@ typedef struct id_info_1 DOM_LOGON_ID logon_id; /* logon ID */ UNIHDR hdr_user_name; /* user name unicode header */ UNIHDR hdr_workgroup_name; /* workgroup name unicode header */ - ARC4_OWF arc4_lm_owf; /* arc4 LM OWF Password */ - ARC4_OWF arc4_nt_owf; /* arc4 NT OWF Password */ + ARC4_OWF arc4_lm_owf; /* rc4 LM OWF Password */ + ARC4_OWF arc4_nt_owf; /* rc4 NT OWF Password */ UNISTR2 uni_domain_name; /* domain name unicode string */ UNISTR2 uni_user_name; /* user name unicode string */ UNISTR2 uni_workgroup_name; /* workgroup name unicode string */ @@ -463,10 +453,11 @@ typedef struct rpc_hdr_info typedef struct dom_query_info { uint16 uni_dom_max_len; /* domain name string length * 2 */ + uint16 padding; /* 2 padding bytes? */ uint16 uni_dom_str_len; /* domain name string length * 2 */ uint32 buffer_dom_name; /* undocumented domain name string buffer pointer */ uint32 buffer_dom_sid; /* undocumented domain SID string buffer pointer */ - UNISTR uni_domain_name; /* domain name (unicode string) */ + UNISTR2 uni_domain_name; /* domain name (unicode string) */ DOM_SID dom_sid; /* domain SID */ } DOM_QUERY; @@ -475,14 +466,25 @@ typedef struct dom_query_info typedef DOM_QUERY DOM_QUERY_3; typedef DOM_QUERY DOM_QUERY_5; +#define POL_HND_SIZE 20 + /* LSA_POL_HND */ typedef struct lsa_policy_info { - uint8 data[20]; /* policy handle */ + uint8 data[POL_HND_SIZE]; /* policy handle */ } LSA_POL_HND; +/* LSA_R_OPEN_POL - response to LSA Open Policy */ +typedef struct lsa_r_open_pol_info +{ + LSA_POL_HND pol; /* policy handle */ + + uint32 status; /* return code */ + +} LSA_R_OPEN_POL; + /* LSA_Q_QUERY_INFO - LSA query info policy */ typedef struct lsa_query_info { @@ -530,7 +532,6 @@ typedef struct dom_ref_info /* LSA_Q_LOOKUP_SIDS - LSA Lookup SIDs */ typedef struct lsa_q_lookup_sids { - LSA_POL_HND pol_hnd; /* policy handle */ uint32 num_entries; uint32 buffer_dom_sid; /* undocumented domain SID buffer pointer */ @@ -669,7 +670,7 @@ typedef struct lsa_q_srv_pwset_info /* LSA_R_SRV_PWSET */ typedef struct lsa_r_srv_pwset_info { - DOM_CHAL srv_chal; /* server-calculated credentials */ + DOM_CRED srv_cred; /* server-calculated credentials */ uint32 status; /* return code */ @@ -1040,8 +1041,10 @@ typedef struct { smb_shm_offset_t next_share_mode_entry; int pid; +#ifdef USE_OPLOCKS uint16 op_port; uint16 op_type; +#endif /* USE_OPLOCKS */ int share_mode; struct timeval time; } share_mode_entry; @@ -1050,8 +1053,10 @@ typedef struct typedef struct { int pid; +#ifdef USE_OPLOCKS uint16 op_port; uint16 op_type; +#endif /* USE_OPLOCKS */ int share_mode; struct timeval time; } min_share_mode_entry; @@ -1077,7 +1082,11 @@ struct connect_record }; #ifndef LOCKING_VERSION +#ifdef USE_OPLOCKS #define LOCKING_VERSION 4 +#else /* USE_OPLOCKS */ +#define LOCKING_VERSION 3 +#endif /* USE_OPLOCKS */ #endif /* LOCKING_VERSION */ #if !defined(FAST_SHARE_MODES) @@ -1093,7 +1102,11 @@ struct connect_record #define SMF_FILENAME_LEN_OFFSET 8 #define SMF_HEADER_LENGTH 10 +#ifdef USE_OPLOCKS #define SMF_ENTRY_LENGTH 20 +#else /* USE_OPLOCKS */ +#define SMF_ENTRY_LENGTH 16 +#endif /* USE_OPLOCKS */ /* * Share mode record offsets. @@ -1104,8 +1117,10 @@ struct connect_record #define SME_SHAREMODE_OFFSET 8 #define SME_PID_OFFSET 12 +#ifdef USE_OPLOCKS #define SME_PORT_OFFSET 16 #define SME_OPLOCK_TYPE_OFFSET 18 +#endif /* USE_OPLOCKS */ #endif /* FAST_SHARE_MODES */ -- cgit