summaryrefslogtreecommitdiff
path: root/source3/smbparse.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1997-10-05 11:56:08 +0000
committerLuke Leighton <lkcl@samba.org>1997-10-05 11:56:08 +0000
commit29dfcb86e05144029f976ef187b875daa9811c59 (patch)
treecc360fbecb5148daccd8eb7a427f75fa8d7d3b35 /source3/smbparse.c
parent07cc8fd8e8edd58110800f3b6b7aaec94687b579 (diff)
downloadsamba-29dfcb86e05144029f976ef187b875daa9811c59.tar.gz
samba-29dfcb86e05144029f976ef187b875daa9811c59.tar.bz2
samba-29dfcb86e05144029f976ef187b875daa9811c59.zip
smb.h:
added more structures, this time for the use in the query and response of the LSA_XXXX functions. next target: the NTLOGON mailslots (10 minutes work). smbparse.c: tidying. adding some more sub-structure functions. (This used to be commit 095edfca783a6f99eb7897d4c925ce8bc1ea0a3e)
Diffstat (limited to 'source3/smbparse.c')
-rw-r--r--source3/smbparse.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/source3/smbparse.c b/source3/smbparse.c
index d39f18de5f..869aab21c1 100644
--- a/source3/smbparse.c
+++ b/source3/smbparse.c
@@ -25,6 +25,20 @@ extern int DEBUGLEVEL;
/*******************************************************************
+reads or writes a UTIME type.
+********************************************************************/
+char* smb_io_utime(BOOL io, UTIME *t, char *q, char *base, int align)
+{
+ if (t == NULL) return NULL;
+
+ q = align_offset(q, base, align);
+
+ RW_IVAL (io, q, t->time, 0); q += 4;
+
+ return q;
+}
+
+/*******************************************************************
reads or writes an NTTIME structure.
********************************************************************/
char* smb_io_time(BOOL io, NTTIME *nttime, char *q, char *base, int align)
@@ -223,6 +237,20 @@ char* smb_io_log_info(BOOL io, DOM_LOG_INFO *log, char *q, char *base, int align
}
/*******************************************************************
+reads or writes a DOM_CHAL structure.
+********************************************************************/
+char* smb_io_chal(BOOL io, DOM_CHAL *chal, char *q, char *base, int align)
+{
+ if (chal == NULL) return NULL;
+
+ q = align_offset(q, base, align);
+
+ RW_PCVAL(io, q, chal->data, 8); q += 8;
+
+ return q;
+}
+
+/*******************************************************************
reads or writes a DOM_CRED structure.
********************************************************************/
char* smb_io_cred(BOOL io, DOM_CRED *cred, char *q, char *base, int align)
@@ -231,8 +259,8 @@ char* smb_io_cred(BOOL io, DOM_CRED *cred, char *q, char *base, int align)
q = align_offset(q, base, align);
- RW_PCVAL(io, q, cred->data, 8); q += 8;
- RW_IVAL (io, q, cred->timestamp, 0); q += 4;
+ q = smb_io_chal (io, &(cred->challenge), q, base, align);
+ q = smb_io_utime(io, &(cred->timestamp), q, base, align);
return q;
}