diff options
author | Jean-François Micouleau <jfm@samba.org> | 2002-08-23 05:12:06 +0000 |
---|---|---|
committer | Jean-François Micouleau <jfm@samba.org> | 2002-08-23 05:12:06 +0000 |
commit | 8462dbb933ec66f5756ee3a76152c32bacf746a4 (patch) | |
tree | 363b61e748f91fd7562badb6b03190c99dd07205 | |
parent | 6232468dcaadca90c1106c12a557c83b1dca0fc4 (diff) | |
download | samba-8462dbb933ec66f5756ee3a76152c32bacf746a4.tar.gz samba-8462dbb933ec66f5756ee3a76152c32bacf746a4.tar.bz2 samba-8462dbb933ec66f5756ee3a76152c32bacf746a4.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.
(This used to be commit 23501ea971f8cc0799515e0d51ad8619221a31e1)
-rw-r--r-- | source3/rpc_parse/parse_misc.c | 3 | ||||
-rw-r--r-- | source3/rpc_parse/parse_net.c | 41 |
2 files changed, 4 insertions, 40 deletions
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c index 01d7698173..3dd9c3bc2a 100644 --- a/source3/rpc_parse/parse_misc.c +++ b/source3/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/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c index ecab979ff2..f380862ea7 100644 --- a/source3/rpc_parse/parse_net.c +++ b/source3/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; |