summaryrefslogtreecommitdiff
path: root/source4/smbd
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-12-11 09:07:45 +0000
committerAndrew Tridgell <tridge@samba.org>2003-12-11 09:07:45 +0000
commitfcc4efd1ea637c810eed8444080b87d7f92c837a (patch)
tree9f72b2b7b5780acc182e84532a54ae6dc26afb3a /source4/smbd
parente5ed18db65f33ef0b0151fc34b02e049b14d1ecd (diff)
downloadsamba-fcc4efd1ea637c810eed8444080b87d7f92c837a.tar.gz
samba-fcc4efd1ea637c810eed8444080b87d7f92c837a.tar.bz2
samba-fcc4efd1ea637c810eed8444080b87d7f92c837a.zip
the next step in the dcerpc server code. Added the link between the
IPC IO routines and the dcerpc endpoint servers. (This used to be commit 4929c53bc8dddda8a763fdfbcf81a79776d01113)
Diffstat (limited to 'source4/smbd')
-rw-r--r--source4/smbd/reply.c18
-rw-r--r--source4/smbd/trans2.c53
2 files changed, 49 insertions, 22 deletions
diff --git a/source4/smbd/reply.c b/source4/smbd/reply.c
index 759ec1ef05..ce203cbf93 100644
--- a/source4/smbd/reply.c
+++ b/source4/smbd/reply.c
@@ -2169,24 +2169,6 @@ void reply_ulogoffX(struct request_context *req)
/****************************************************************************
- Reply to an SMBtrans request
-****************************************************************************/
-void reply_trans(struct request_context *req)
-{
- req_reply_error(req, NT_STATUS_FOOBAR);
-}
-
-
-/****************************************************************************
- Reply to an SMBtranss2 request
-****************************************************************************/
-void reply_transs2(struct request_context *req)
-{
- req_reply_error(req, NT_STATUS_FOOBAR);
-}
-
-
-/****************************************************************************
Reply to an SMBfindclose request
****************************************************************************/
void reply_findclose(struct request_context *req)
diff --git a/source4/smbd/trans2.c b/source4/smbd/trans2.c
index 0975f77eed..3115a330e5 100644
--- a/source4/smbd/trans2.c
+++ b/source4/smbd/trans2.c
@@ -1214,10 +1214,20 @@ static NTSTATUS trans2_backend(struct request_context *req, struct smb_trans2 *t
}
+/*
+ backend for trans requests
+*/
+static NTSTATUS trans_backend(struct request_context *req, struct smb_trans2 *trans)
+{
+
+ return NT_STATUS_NOT_IMPLEMENTED;
+}
+
+
/****************************************************************************
- Reply to an SMBtrans2 request
+ Reply to an SMBtrans or SMBtrans2 request
****************************************************************************/
-void reply_trans2(struct request_context *req)
+void reply_trans_generic(struct request_context *req, uint8 command)
{
struct smb_trans2 trans;
int i;
@@ -1262,6 +1272,10 @@ void reply_trans2(struct request_context *req)
trans.in.setup[i] = SVAL(req->in.vwv, VWV(14+i));
}
+ if (command == SMBtrans) {
+ req_pull_string(req, &trans.in.trans_name, req->in.data, -1, STR_TERMINATE);
+ }
+
if (!req_pull_blob(req, req->in.hdr + param_ofs, param_count, &trans.in.params) ||
!req_pull_blob(req, req->in.hdr + data_ofs, data_count, &trans.in.data)) {
req_reply_error(req, NT_STATUS_FOOBAR);
@@ -1271,12 +1285,16 @@ void reply_trans2(struct request_context *req)
/* is it a partial request? if so, then send a 'send more' message */
if (param_total > param_count ||
data_total > data_count) {
- DEBUG(0,("REWRITE: not handling partial trans2 requests!\n"));
+ DEBUG(0,("REWRITE: not handling partial trans requests!\n"));
return;
}
/* its a full request, give it to the backend */
- status = trans2_backend(req, &trans);
+ if (command == SMBtrans) {
+ status = trans_backend(req, &trans);
+ } else {
+ status = trans2_backend(req, &trans);
+ }
if (!NT_STATUS_IS_OK(status)) {
req_reply_error(req, status);
@@ -1353,3 +1371,30 @@ void reply_trans2(struct request_context *req)
req_send_reply(req);
} while (params_left != 0 || data_left != 0);
}
+
+
+/****************************************************************************
+ Reply to an SMBtrans2
+****************************************************************************/
+void reply_trans2(struct request_context *req)
+{
+ reply_trans_generic(req, SMBtrans2);
+}
+
+/****************************************************************************
+ Reply to an SMBtrans
+****************************************************************************/
+void reply_trans(struct request_context *req)
+{
+ reply_trans_generic(req, SMBtrans);
+}
+
+/****************************************************************************
+ Reply to an SMBtranss2 request
+****************************************************************************/
+void reply_transs2(struct request_context *req)
+{
+ req_reply_error(req, NT_STATUS_FOOBAR);
+}
+
+