summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-François Micouleau <jfm@samba.org>2002-08-23 05:12:06 +0000
committerJean-François Micouleau <jfm@samba.org>2002-08-23 05:12:06 +0000
commit23501ea971f8cc0799515e0d51ad8619221a31e1 (patch)
tree19bb20a7cbfaad7ddedbd3387536f64879696ab3
parent6ec267618a7ba2c4a7170b78ccfe95120c5430c4 (diff)
downloadsamba-23501ea971f8cc0799515e0d51ad8619221a31e1.tar.gz
samba-23501ea971f8cc0799515e0d51ad8619221a31e1.tar.xz
samba-23501ea971f8cc0799515e0d51ad8619221a31e1.zip
some cleanup while working on the NETLOGON pipe.
smb_io_chal() did a prs_align() but a challenge is an array of bytes. and all code calling smb_io_chal() played with the alignment to not align ! I'm confident in my change, but I would *really* like if jeremy could look at that. J.F.
-rw-r--r--source/rpc_parse/parse_misc.c3
-rw-r--r--source/rpc_parse/parse_net.c41
2 files changed, 4 insertions, 40 deletions
diff --git a/source/rpc_parse/parse_misc.c b/source/rpc_parse/parse_misc.c
index 01d76981736..3dd9c3bc2a3 100644
--- a/source/rpc_parse/parse_misc.c
+++ b/source/rpc_parse/parse_misc.c
@@ -1255,9 +1255,6 @@ BOOL smb_io_chal(char *desc, DOM_CHAL *chal, prs_struct *ps, int depth)
prs_debug(ps, depth, desc, "smb_io_chal");
depth++;
-
- if(!prs_align(ps))
- return False;
if(!prs_uint8s (False, "data", ps, depth, chal->data, 8))
return False;
diff --git a/source/rpc_parse/parse_net.c b/source/rpc_parse/parse_net.c
index ecab979ff26..f380862ea78 100644
--- a/source/rpc_parse/parse_net.c
+++ b/source/rpc_parse/parse_net.c
@@ -553,8 +553,6 @@ void init_q_req_chal(NET_Q_REQ_CHAL *q_c,
BOOL net_io_q_req_chal(char *desc, NET_Q_REQ_CHAL *q_c, prs_struct *ps, int depth)
{
- int old_align;
-
if (q_c == NULL)
return False;
@@ -572,15 +570,8 @@ BOOL net_io_q_req_chal(char *desc, NET_Q_REQ_CHAL *q_c, prs_struct *ps, int dep
if(!smb_io_unistr2("", &q_c->uni_logon_clnt, True, ps, depth)) /* logon client unicode string */
return False;
- old_align = ps->align;
- ps->align = 0;
- /* client challenge is _not_ aligned after the unicode strings */
- if(!smb_io_chal("", &q_c->clnt_chal, ps, depth)) {
- /* client challenge */
- ps->align = old_align;
+ if(!smb_io_chal("", &q_c->clnt_chal, ps, depth))
return False;
- }
- ps->align = old_align;
return True;
}
@@ -616,7 +607,6 @@ BOOL net_io_r_req_chal(char *desc, NET_R_REQ_CHAL *r_c, prs_struct *ps, int dept
BOOL net_io_q_auth(char *desc, NET_Q_AUTH *q_a, prs_struct *ps, int depth)
{
- int old_align;
if (q_a == NULL)
return False;
@@ -628,15 +618,8 @@ BOOL net_io_q_auth(char *desc, NET_Q_AUTH *q_a, prs_struct *ps, int depth)
if(!smb_io_log_info ("", &q_a->clnt_id, ps, depth)) /* client identification info */
return False;
- /* client challenge is _not_ aligned */
- old_align = ps->align;
- ps->align = 0;
- if(!smb_io_chal("", &q_a->clnt_chal, ps, depth)) {
- /* client-calculated credentials */
- ps->align = old_align;
+ if(!smb_io_chal("", &q_a->clnt_chal, ps, depth))
return False;
- }
- ps->align = old_align;
return True;
}
@@ -688,7 +671,6 @@ void init_q_auth_2(NET_Q_AUTH_2 *q_a,
BOOL net_io_q_auth_2(char *desc, NET_Q_AUTH_2 *q_a, prs_struct *ps, int depth)
{
- int old_align;
if (q_a == NULL)
return False;
@@ -700,15 +682,8 @@ BOOL net_io_q_auth_2(char *desc, NET_Q_AUTH_2 *q_a, prs_struct *ps, int depth)
if(!smb_io_log_info ("", &q_a->clnt_id, ps, depth)) /* client identification info */
return False;
- /* client challenge is _not_ aligned */
- old_align = ps->align;
- ps->align = 0;
- if(!smb_io_chal("", &q_a->clnt_chal, ps, depth)) {
- /* client-calculated credentials */
- ps->align = old_align;
+ if(!smb_io_chal("", &q_a->clnt_chal, ps, depth))
return False;
- }
- ps->align = old_align;
if(!net_io_neg_flags("", &q_a->clnt_flgs, ps, depth))
return False;
@@ -764,7 +739,6 @@ void init_q_auth_3(NET_Q_AUTH_3 *q_a,
BOOL net_io_q_auth_3(char *desc, NET_Q_AUTH_3 *q_a, prs_struct *ps, int depth)
{
- int old_align;
if (q_a == NULL)
return False;
@@ -776,15 +750,8 @@ BOOL net_io_q_auth_3(char *desc, NET_Q_AUTH_3 *q_a, prs_struct *ps, int depth)
if(!smb_io_log_info ("", &q_a->clnt_id, ps, depth)) /* client identification info */
return False;
- /* client challenge is _not_ aligned */
- old_align = ps->align;
- ps->align = 0;
- if(!smb_io_chal("", &q_a->clnt_chal, ps, depth)) {
- /* client-calculated credentials */
- ps->align = old_align;
+ if(!smb_io_chal("", &q_a->clnt_chal, ps, depth))
return False;
- }
- ps->align = old_align;
if(!net_io_neg_flags("", &q_a->clnt_flgs, ps, depth))
return False;