summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1997-10-05 12:39:51 +0000
committerLuke Leighton <lkcl@samba.org>1997-10-05 12:39:51 +0000
commit5e4bc79c6ee33704633c2616c030c263d14fefe0 (patch)
tree09f14f6d6dfa9485fccf696531a2de511c922fa2
parent29dfcb86e05144029f976ef187b875daa9811c59 (diff)
downloadsamba-5e4bc79c6ee33704633c2616c030c263d14fefe0.tar.gz
samba-5e4bc79c6ee33704633c2616c030c263d14fefe0.tar.bz2
samba-5e4bc79c6ee33704633c2616c030c263d14fefe0.zip
processes LSA queries and responses to/from RPC data stream into structures.
(This used to be commit 369f7d41d6ff6d2b9b8c1e0cac99d0f0d03410b0)
-rw-r--r--source3/lsaparse.c88
1 files changed, 88 insertions, 0 deletions
diff --git a/source3/lsaparse.c b/source3/lsaparse.c
new file mode 100644
index 0000000000..52c9335cd0
--- /dev/null
+++ b/source3/lsaparse.c
@@ -0,0 +1,88 @@
+/*
+ Unix SMB/Netbios implementation.
+ Version 1.9.
+ Samba utility functions
+ Copyright (C) Luke Leighton 1996 - 1997
+
+ 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
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "includes.h"
+
+extern int DEBUGLEVEL;
+
+
+/*******************************************************************
+reads or writes an LSA_Q_QUERY_INFO structure.
+********************************************************************/
+char* lsa_io_q_query(BOOL io, LSA_Q_QUERY_INFO *q_q, char *q, char *base, int align)
+{
+ if (q_q == NULL) return NULL;
+
+ RW_SVAL(io, q, q_q->info_class, 0); q += 2;
+
+ return q;
+}
+
+/*******************************************************************
+reads or writes an LSA_Q_QUERY_INFO structure.
+********************************************************************/
+char* lsa_io_r_query(BOOL io, LSA_R_QUERY_INFO *r_q, char *q, char *base, int align)
+{
+ if (r_q == NULL) return NULL;
+
+ RW_IVAL(io, q, r_q->undoc_buffer, 0); q += 4;
+
+ if (r_q->undoc_buffer != 0)
+ {
+ RW_SVAL(io, q, r_q->info_class, 0); q += 2;
+
+ switch (r_q->info_class)
+ {
+ case 3:
+ {
+ q = smb_io_dom_query_3(io, &(r_q->dom.id3), q, base, align);
+ break;
+ }
+ case 5:
+ {
+ q = smb_io_dom_query_5(io, &(r_q->dom.id3), q, base, align);
+ break;
+ }
+ default:
+ {
+ /* PANIC! */
+ break;
+ }
+ }
+ }
+ return q;
+}
+
+#if 0
+/*******************************************************************
+reads or writes a structure.
+********************************************************************/
+ char* smb_io_(BOOL io, *, char *q, char *base, int align)
+{
+ if (== NULL) return NULL;
+
+ q = align_offset(q, base, align);
+
+ RW_IVAL(io, q, , 0); q += 4;
+
+ return q;
+}
+#endif