diff options
author | Luke Leighton <lkcl@samba.org> | 1998-10-07 21:42:24 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1998-10-07 21:42:24 +0000 |
commit | 48b31ae44fb2a1961bd738b0b3e7a986259168a2 (patch) | |
tree | cb776f1cdce218ea1f904928eedab6c3b943e9d8 /source3/include | |
parent | cf115a77d038dbd357cf476a6042f1bd5eb1e392 (diff) | |
download | samba-48b31ae44fb2a1961bd738b0b3e7a986259168a2.tar.gz samba-48b31ae44fb2a1961bd738b0b3e7a986259168a2.tar.bz2 samba-48b31ae44fb2a1961bd738b0b3e7a986259168a2.zip |
dce/rpc
(This used to be commit 6677b888bdb45df00646eb7cc13005b9465ff971)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/ntdomain.h | 6 | ||||
-rw-r--r-- | source3/include/proto.h | 17 | ||||
-rw-r--r-- | source3/include/rpc_dce.h | 40 |
3 files changed, 49 insertions, 14 deletions
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index 5fb7f8a089..261cc3dfe3 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -67,6 +67,7 @@ typedef struct pipes_struct prs_struct rhdr; /* output header */ prs_struct rdata; /* output data */ prs_struct rauth; /* output authentication verifier */ + prs_struct rverf; /* output verifier */ prs_struct rntlm; /* output ntlmssp */ RPC_HDR hdr; @@ -74,12 +75,17 @@ typedef struct pipes_struct RPC_HDR_RB hdr_rb; RPC_HDR_REQ hdr_req; RPC_HDR_RESP hdr_resp; + RPC_HDR_AUTH auth_info; + RPC_HDR_AUTHA autha_info; RPC_AUTH_VERIFIER auth_verifier; RPC_AUTH_NTLMSSP_NEG ntlmssp_neg; RPC_AUTH_NTLMSSP_CHAL ntlmssp_chal; RPC_AUTH_NTLMSSP_RESP ntlmssp_resp; + BOOL ntlmssp_auth; + unsigned char ntlmssp_hash[256]; + uint32 file_offset; uint32 hdr_offsets; uint32 frag_len_left; diff --git a/source3/include/proto.h b/source3/include/proto.h index f7fb2a47c1..64d586f6c0 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -496,6 +496,8 @@ void E_old_pw_hash( unsigned char *p14, unsigned char *in, unsigned char *out); void cred_hash1(unsigned char *out,unsigned char *in,unsigned char *key); void cred_hash2(unsigned char *out,unsigned char *in,unsigned char *key); void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw); +void NTLMSSPhash( unsigned char hash[256], unsigned char const key[5]); +void NTLMSSPcalc( unsigned char hash[256], unsigned char *data, int len); void SamOEMhash( unsigned char *data, unsigned char *key, int val); /*The following definitions come from libsmb/smbencrypt.c */ @@ -504,6 +506,7 @@ void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24); void E_md4hash(uchar *passwd, uchar *p16); void nt_lm_owf_gen(char *pwd, uchar nt_p16[16], uchar p16[16]); void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]); +void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]); void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24); /*The following definitions come from libsmb/smberr.c */ @@ -1489,7 +1492,7 @@ void prs_init(prs_struct *ps, uint32 size, uint8 align, uint32 margin, BOOL io); void prs_mem_free(prs_struct *ps); -void prs_link(prs_struct *ps, prs_struct const *const to); +void prs_link(prs_struct *prev, prs_struct *ps, prs_struct *next); void prs_align(prs_struct *ps); BOOL prs_grow(prs_struct *ps); BOOL prs_uint8(char *name, prs_struct *ps, int depth, uint8 *data8); @@ -1539,13 +1542,20 @@ void smb_io_rpc_hdr_ba(char *desc, RPC_HDR_BA *rpc, prs_struct *ps, int depth); void make_rpc_hdr_req(RPC_HDR_REQ *hdr, uint32 data_len, uint16 opnum); void smb_io_rpc_hdr_req(char *desc, RPC_HDR_REQ *rpc, prs_struct *ps, int depth); void smb_io_rpc_hdr_resp(char *desc, RPC_HDR_RESP *rpc, prs_struct *ps, int depth); +void make_rpc_hdr_autha(RPC_HDR_AUTHA *rai, + uint16 max_tsize, uint16 max_rsize, + uint8 auth_type, uint8 auth_level, + uint8 stub_type_len); +void smb_io_rpc_hdr_autha(char *desc, RPC_HDR_AUTHA *rai, prs_struct *ps, int depth); +void make_rpc_hdr_auth(RPC_HDR_AUTH *rai, + uint8 auth_type, uint8 auth_level, + uint8 stub_type_len); +void smb_io_rpc_hdr_auth(char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, int depth); void make_rpc_auth_ntlmssp_neg(RPC_AUTH_NTLMSSP_NEG *neg, uint32 neg_flgs, fstring myname, fstring domain); void smb_io_rpc_auth_ntlmssp_neg(char *desc, RPC_AUTH_NTLMSSP_NEG *neg, prs_struct *ps, int depth); void make_rpc_auth_verifier(RPC_AUTH_VERIFIER *rav, - uint8 auth_type, uint8 auth_level, - uint8 stub_type_len, char *signature, uint32 msg_type); void smb_io_rpc_auth_verifier(char *desc, RPC_AUTH_VERIFIER *rav, prs_struct *ps, int depth); void make_rpc_auth_ntlmssp_chal(RPC_AUTH_NTLMSSP_CHAL *chl, @@ -1852,6 +1862,7 @@ BOOL api_srvsvc_rpc(pipes_struct *p, prs_struct *data); int make_dom_gids(char *gids_str, DOM_GID **ppgids); BOOL create_rpc_reply(pipes_struct *p, uint32 data_start, uint32 data_end); +BOOL rpc_command(pipes_struct *p, prs_struct *pd); BOOL api_rpcTNP(pipes_struct *p, char *rpc_name, struct api_struct *api_rpc_cmds, prs_struct *data); void get_domain_user_groups(char *domain_groups, char *user); diff --git a/source3/include/rpc_dce.h b/source3/include/rpc_dce.h index a599abb19c..51a7631c4e 100644 --- a/source3/include/rpc_dce.h +++ b/source3/include/rpc_dce.h @@ -34,7 +34,8 @@ enum RPC_PKT_TYPE RPC_REQUEST = 0x00, RPC_RESPONSE = 0x02, RPC_BIND = 0x0B, - RPC_BINDACK = 0x0C + RPC_BINDACK = 0x0C, + RPC_BINDRESP = 0x10 /* not the real name! this is undocumented! */ }; /* DCE/RPC flags */ @@ -140,6 +141,33 @@ typedef struct rpc_hdr_bba_info } RPC_HDR_BBA; +/* RPC_HDR_AUTHA */ +typedef struct rpc_hdr_autha_info +{ + uint16 max_tsize; /* maximum transmission fragment size (0x1630) */ + uint16 max_rsize; /* max receive fragment size (0x1630) */ + + uint8 auth_type; /* 0x0a */ + uint8 auth_level; /* 0x06 */ + uint8 stub_type_len; /* don't know */ + uint8 padding; /* padding */ + + uint32 unknown; /* 0x0014a0c0 */ + +} RPC_HDR_AUTHA; + +/* RPC_HDR_AUTH */ +typedef struct rpc_hdr_auth_info +{ + uint8 auth_type; /* 0x0a */ + uint8 auth_level; /* 0x06 */ + uint8 stub_type_len; /* don't know */ + uint8 padding; /* padding */ + + uint32 unknown; /* 0x0014a0c0 */ + +} RPC_HDR_AUTH; + /* RPC_BIND_REQ - ms req bind */ typedef struct rpc_bind_req_info { @@ -179,17 +207,9 @@ typedef struct rpc_hdr_ba_info } RPC_HDR_BA; -/* this is TEMPORARY */ /* RPC_AUTH_VERIFIER */ typedef struct rpc_auth_verif_info { - uint8 auth_type; /* 0x0a */ - uint8 auth_level; /* 0x06 */ - uint8 stub_type_len; /* don't know */ - uint8 padding; /* padding */ - - uint32 ptr_0; /* non-zero pointer to something */ - fstring signature; /* "NTLMSSP" */ uint32 msg_type; /* NTLMSSP_MESSAGE_TYPE (1,2,3) */ @@ -220,9 +240,7 @@ typedef struct rpc_auth_ntlmssp_chal_info uint32 neg_flags; /* 0x0000 82b1 */ uint8 challenge[8]; /* ntlm challenge */ -#if 0 uint8 reserved [8]; /* zeros */ -#endif } RPC_AUTH_NTLMSSP_CHAL; |