diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-12-16 09:02:58 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-12-16 09:02:58 +0000 |
commit | 24c22aef90d8534ee2d016b37b2b302f1367d106 (patch) | |
tree | cecb9192f1a83f7232041cda58e83e1d94ac57b5 /source4/smbd | |
parent | 1413faae582949e7d12174df7102723eea914464 (diff) | |
download | samba-24c22aef90d8534ee2d016b37b2b302f1367d106.tar.gz samba-24c22aef90d8534ee2d016b37b2b302f1367d106.tar.xz samba-24c22aef90d8534ee2d016b37b2b302f1367d106.zip |
a fairly large commit!
This adds support for bigendian rpc in the client. I have installed
SUN pcnetlink locally and am using it to test the samba4 rpc
code. This allows us to easily find places where we have stuffed up
the types (such as 2 uint16 versus a uint32), as testing both
big-endian and little-endian easily shows which is correct. I have now
used this to fix several bugs like that in the samba4 IDL.
In order to make this work I also had to redefine a GUID as a true
structure, not a blob. From the pcnetlink wire it is clear that it is
indeed defined as a structure (the byte order changes). This required
changing lots of Samba code to use a GUID as a structure.
I also had to fix the if_version code in dcerpc syntax IDs, as it
turns out they are a single uint32 not two uint16s.
The big-endian support is a bit ugly at the moment, and breaks the
layering in some places. More work is needed, especially on the server
side.
(This used to be commit bb1af644a5a7b188290ce36232f255da0e5d66d2)
Diffstat (limited to 'source4/smbd')
-rw-r--r-- | source4/smbd/trans2.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source4/smbd/trans2.c b/source4/smbd/trans2.c index 19f313a8604..6a15aad137c 100644 --- a/source4/smbd/trans2.c +++ b/source4/smbd/trans2.c @@ -202,6 +202,7 @@ static NTSTATUS trans2_qfsinfo(struct request_context *req, struct smb_trans2 *t NTSTATUS status; uint16 level; uint_t i; + DATA_BLOB guid_blob; /* make sure we got enough parameters */ if (trans->in.params.length != 2) { @@ -369,7 +370,15 @@ static NTSTATUS trans2_qfsinfo(struct request_context *req, struct smb_trans2 *t trans2_setup_reply(req, trans, 0, 64, 0); - memcpy(trans->out.data.data, fsinfo.objectid_information.out.guid.info, GUID_SIZE); + status = ndr_push_struct_blob(&guid_blob, req->mem_ctx, + &fsinfo.objectid_information.out.guid, + (ndr_push_flags_fn_t)ndr_push_GUID); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + memcpy(trans->out.data.data, guid_blob.data, GUID_SIZE); + for (i=0;i<6;i++) { SBVAL(trans->out.data.data, 16 + 8*i, fsinfo.objectid_information.out.unknown[i]); } |