summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-08-05 10:17:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:29:19 -0500
commitbcd0bf8e5e52d8f09e43aa74be55cafcb8e2cb59 (patch)
tree0cc6d7bdc15ce67d3aa576f40a8d494a4b299a20 /source3/smbd
parentd57a88a9948017bc9a1b5a12307e8e974425e39b (diff)
downloadsamba-bcd0bf8e5e52d8f09e43aa74be55cafcb8e2cb59.tar.gz
samba-bcd0bf8e5e52d8f09e43aa74be55cafcb8e2cb59.tar.bz2
samba-bcd0bf8e5e52d8f09e43aa74be55cafcb8e2cb59.zip
r24238: Push down reply_prep_legacy one level
(This used to be commit a6a2d97facf95c7997f3d12457f2811b3b7bde1b)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/ipc.c33
1 files changed, 25 insertions, 8 deletions
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c
index 157aff20c1..e238a3cc12 100644
--- a/source3/smbd/ipc.c
+++ b/source3/smbd/ipc.c
@@ -379,17 +379,17 @@ static void named_pipe(connection_struct *conn, uint16 vuid,
int suwcnt, int tdscnt,int tpscnt,
int msrcnt, int mdrcnt, int mprcnt)
{
- char *inbuf, *outbuf;
- int size, bufsize;
-
DEBUG(3,("named pipe command on <%s> name\n", name));
- if (!reply_prep_legacy(req, &inbuf, &outbuf, &size, &bufsize)) {
- reply_nterror(req, NT_STATUS_NO_MEMORY);
- return;
- }
-
if (strequal(name,"LANMAN")) {
+ char *inbuf, *outbuf;
+ int size, bufsize;
+
+ if (!reply_prep_legacy(req, &inbuf, &outbuf, &size, &bufsize)) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ return;
+ }
+
reply_post_legacy(
req,
api_reply(conn, vuid, inbuf, outbuf,
@@ -404,7 +404,16 @@ static void named_pipe(connection_struct *conn, uint16 vuid,
strequal(name,"WINREG") ||
strequal(name,"SAMR") ||
strequal(name,"LSARPC")) {
+ char *inbuf, *outbuf;
+ int size, bufsize;
+
DEBUG(4,("named pipe command from Win95 (wow!)\n"));
+
+ if (!reply_prep_legacy(req, &inbuf, &outbuf, &size, &bufsize)) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ return;
+ }
+
reply_post_legacy(
req,
api_fd_reply(conn, vuid, inbuf, outbuf,
@@ -415,6 +424,14 @@ static void named_pipe(connection_struct *conn, uint16 vuid,
}
if (strlen(name) < 1) {
+ char *inbuf, *outbuf;
+ int size, bufsize;
+
+ if (!reply_prep_legacy(req, &inbuf, &outbuf, &size, &bufsize)) {
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ return;
+ }
+
reply_post_legacy(
req,
api_fd_reply(conn, vuid, inbuf, outbuf,