summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-07-27 20:25:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:00:18 -0500
commit8b2b177a8e07e3a0cb00fbd7fdbafc8aeba5b204 (patch)
treeb8b68c1a30899de0f90020a25ceb605c0534c928 /source3/rpc_parse
parentb344de3f83d8025d0c00c8ae20207e9e42b70d57 (diff)
downloadsamba-8b2b177a8e07e3a0cb00fbd7fdbafc8aeba5b204.tar.gz
samba-8b2b177a8e07e3a0cb00fbd7fdbafc8aeba5b204.tar.bz2
samba-8b2b177a8e07e3a0cb00fbd7fdbafc8aeba5b204.zip
r8805: Merge a duplicate struct. Get ready to support SPNEGO rpc binds.
Jeremy. (This used to be commit fd6e342746edfda2f25df1ae0067d359b756e0cd)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_rpc.c74
1 files changed, 29 insertions, 45 deletions
diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c
index 3c10975876..ce081b92e8 100644
--- a/source3/rpc_parse/parse_rpc.c
+++ b/source3/rpc_parse/parse_rpc.c
@@ -650,98 +650,82 @@ BOOL smb_io_rpc_hdr_fault(const char *desc, RPC_HDR_FAULT *rpc, prs_struct *ps,
}
/*******************************************************************
- Init an RPC_HDR_AUTHA structure.
+ Inits an RPC_HDR_AUTH structure.
********************************************************************/
-void init_rpc_hdr_autha(RPC_HDR_AUTHA *rai,
- uint16 max_tsize, uint16 max_rsize,
+void init_rpc_hdr_auth(RPC_HDR_AUTH *rai,
uint8 auth_type, uint8 auth_level,
- uint8 stub_type_len)
+ uint8 auth_pad_len,
+ uint32 auth_context_id)
{
- rai->max_tsize = max_tsize; /* maximum transmission fragment size (0x1630) */
- rai->max_rsize = max_rsize; /* max receive fragment size (0x1630) */
-
rai->auth_type = auth_type; /* nt lm ssp 0x0a */
rai->auth_level = auth_level; /* 0x06 */
- rai->stub_type_len = stub_type_len; /* 0x00 */
- rai->padding = 0; /* padding 0x00 */
-
- rai->unknown = 0x0014a0c0; /* non-zero pointer to something */
+ rai->auth_pad_len = auth_pad_len;
+ rai->auth_reserved = 0;
+ rai->auth_context_id = auth_context_id;
}
/*******************************************************************
- Reads or writes an RPC_HDR_AUTHA structure.
+ Reads or writes an RPC_HDR_AUTH structure.
********************************************************************/
-BOOL smb_io_rpc_hdr_autha(const char *desc, RPC_HDR_AUTHA *rai, prs_struct *ps, int depth)
+BOOL smb_io_rpc_hdr_auth(const char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, int depth)
{
if (rai == NULL)
return False;
- prs_debug(ps, depth, desc, "smb_io_rpc_hdr_autha");
+ prs_debug(ps, depth, desc, "smb_io_rpc_hdr_auth");
depth++;
- if(!prs_uint16("max_tsize ", ps, depth, &rai->max_tsize))
- return False;
- if(!prs_uint16("max_rsize ", ps, depth, &rai->max_rsize))
+ if(!prs_align(ps))
return False;
if(!prs_uint8 ("auth_type ", ps, depth, &rai->auth_type)) /* 0x0a nt lm ssp */
return False;
if(!prs_uint8 ("auth_level ", ps, depth, &rai->auth_level)) /* 0x06 */
return False;
- if(!prs_uint8 ("stub_type_len", ps, depth, &rai->stub_type_len))
+ if(!prs_uint8 ("auth_pad_len ", ps, depth, &rai->auth_pad_len))
return False;
- if(!prs_uint8 ("padding ", ps, depth, &rai->padding))
+ if(!prs_uint8 ("auth_reserved", ps, depth, &rai->auth_reserved))
return False;
-
- if(!prs_uint32("unknown ", ps, depth, &rai->unknown)) /* 0x0014a0c0 */
+ if(!prs_uint32("auth_context_id", ps, depth, &rai->auth_context_id))
return False;
return True;
}
+
/*******************************************************************
- Inits an RPC_HDR_AUTH structure.
+ Init an RPC_HDR_AUTHA structure.
********************************************************************/
-void init_rpc_hdr_auth(RPC_HDR_AUTH *rai,
- uint8 auth_type, uint8 auth_level,
- uint8 padding,
- uint32 ptr)
+void init_rpc_hdr_autha(RPC_HDR_AUTHA *rai,
+ uint16 max_tsize, uint16 max_rsize,
+ RPC_HDR_AUTH *auth)
{
- rai->auth_type = auth_type; /* nt lm ssp 0x0a */
- rai->auth_level = auth_level; /* 0x06 */
- rai->padding = padding;
- rai->reserved = 0;
-
- rai->auth_context = ptr; /* non-zero pointer to something */
+ rai->max_tsize = max_tsize; /* maximum transmission fragment size (0x1630) */
+ rai->max_rsize = max_rsize; /* max receive fragment size (0x1630) */
+ rai->auth = *auth;
}
/*******************************************************************
- Reads or writes an RPC_HDR_AUTH structure.
+ Reads or writes an RPC_HDR_AUTHA structure.
********************************************************************/
-BOOL smb_io_rpc_hdr_auth(const char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, int depth)
+BOOL smb_io_rpc_hdr_autha(const char *desc, RPC_HDR_AUTHA *rai, prs_struct *ps, int depth)
{
if (rai == NULL)
return False;
- prs_debug(ps, depth, desc, "smb_io_rpc_hdr_auth");
+ prs_debug(ps, depth, desc, "smb_io_rpc_hdr_autha");
depth++;
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint8 ("auth_type ", ps, depth, &rai->auth_type)) /* 0x0a nt lm ssp */
- return False;
- if(!prs_uint8 ("auth_level ", ps, depth, &rai->auth_level)) /* 0x06 */
- return False;
- if(!prs_uint8 ("padding ", ps, depth, &rai->padding))
+ if(!prs_uint16("max_tsize ", ps, depth, &rai->max_tsize))
return False;
- if(!prs_uint8 ("reserved ", ps, depth, &rai->reserved))
+ if(!prs_uint16("max_rsize ", ps, depth, &rai->max_rsize))
return False;
- if(!prs_uint32("auth_context ", ps, depth, &rai->auth_context))
+
+ if(!smb_io_rpc_hdr_auth("auth", &rai->auth, ps, depth))
return False;
return True;