summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorJean-François Micouleau <jfm@samba.org>2002-08-21 23:08:28 +0000
committerJean-François Micouleau <jfm@samba.org>2002-08-21 23:08:28 +0000
commit474c1489699cb36e5831e6546aef496404a45752 (patch)
treedc7f9651c68627aee175bbec27a4888ce745c22e /source3/rpc_parse
parent00b7fa8951aa7c101a541847f5ef29318aec03f6 (diff)
downloadsamba-474c1489699cb36e5831e6546aef496404a45752.tar.gz
samba-474c1489699cb36e5831e6546aef496404a45752.tar.bz2
samba-474c1489699cb36e5831e6546aef496404a45752.zip
NETLOGON NetServerAuthenticate3 include and parser file
J.F. (This used to be commit 2f68d6f5ec925f07a387f784db6de0cfbaa53278)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_net.c81
1 files changed, 80 insertions, 1 deletions
diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c
index da49a6531d..7f8d1953d1 100644
--- a/source3/rpc_parse/parse_net.c
+++ b/source3/rpc_parse/parse_net.c
@@ -4,7 +4,8 @@
* Copyright (C) Andrew Tridgell 1992-1997,
* Copyright (C) Luke Kenneth Casson Leighton 1996-1997,
* Copyright (C) Paul Ashton 1997.
- *
+ * Copyright (C) Jean François Micouleau 2002.
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -740,6 +741,84 @@ BOOL net_io_r_auth_2(char *desc, NET_R_AUTH_2 *r_a, prs_struct *ps, int depth)
return True;
}
+/*******************************************************************
+ Inits a NET_Q_AUTH_3 struct.
+********************************************************************/
+
+void init_q_auth_3(NET_Q_AUTH_3 *q_a,
+ const char *logon_srv, const char *acct_name, uint16 sec_chan, const char *comp_name,
+ DOM_CHAL *clnt_chal, uint32 clnt_flgs)
+{
+ DEBUG(5,("init_q_auth_3: %d\n", __LINE__));
+
+ init_log_info(&q_a->clnt_id, logon_srv, acct_name, sec_chan, comp_name);
+ memcpy(q_a->clnt_chal.data, clnt_chal->data, sizeof(clnt_chal->data));
+ q_a->clnt_flgs.neg_flags = clnt_flgs;
+
+ DEBUG(5,("init_q_auth_3: %d\n", __LINE__));
+}
+
+/*******************************************************************
+ Reads or writes a structure.
+********************************************************************/
+
+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;
+
+ prs_debug(ps, depth, desc, "net_io_q_auth_3");
+ depth++;
+
+ if(!prs_align(ps))
+ return False;
+
+ 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;
+ return False;
+ }
+ ps->align = old_align;
+ if(!net_io_neg_flags("", &q_a->clnt_flgs, ps, depth))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
+ Reads or writes a structure.
+********************************************************************/
+
+BOOL net_io_r_auth_3(char *desc, NET_R_AUTH_3 *r_a, prs_struct *ps, int depth)
+{
+ if (r_a == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "net_io_r_auth_3");
+ depth++;
+
+ if(!prs_align(ps))
+ return False;
+
+ if(!smb_io_chal("srv_chal", &r_a->srv_chal, ps, depth)) /* server challenge */
+ return False;
+ if(!net_io_neg_flags("srv_flgs", &r_a->srv_flgs, ps, depth))
+ return False;
+ if (!prs_uint32("unknown", ps, depth, &r_a->unknown))
+ return False;
+
+ if(!prs_ntstatus("status", ps, depth, &r_a->status))
+ return False;
+
+ return True;
+}
+
/*******************************************************************
Inits a NET_Q_SRV_PWSET.