summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-08-14 21:53:48 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:29:48 -0500
commit527905a09a0b5b39830440189a145182b7d571f2 (patch)
treefaadc7a8096225b5bde46380863b9f373f174931 /source3/smbd
parent5edcc342c6b24e41fed826c13a257929f4071668 (diff)
downloadsamba-527905a09a0b5b39830440189a145182b7d571f2.tar.gz
samba-527905a09a0b5b39830440189a145182b7d571f2.tar.bz2
samba-527905a09a0b5b39830440189a145182b7d571f2.zip
r24444: Convert reply_find[n]close to the new API
(This used to be commit 6af85953465789594342f2d199ef5d29462cf34f)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/process.c4
-rw-r--r--source3/smbd/trans2.c38
2 files changed, 27 insertions, 15 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 7f307ade63..6405ddf1f5 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -742,8 +742,8 @@ static const struct smb_message_struct {
/* 0x31 */ { NULL, NULL, NULL, 0 },
/* 0x32 */ { "SMBtrans2", NULL,reply_trans2, AS_USER | CAN_IPC },
/* 0x33 */ { "SMBtranss2", NULL,reply_transs2, AS_USER},
-/* 0x34 */ { "SMBfindclose", reply_findclose,NULL,AS_USER},
-/* 0x35 */ { "SMBfindnclose", reply_findnclose,NULL, AS_USER},
+/* 0x34 */ { "SMBfindclose", NULL,reply_findclose,AS_USER},
+/* 0x35 */ { "SMBfindnclose", NULL,reply_findnclose,AS_USER},
/* 0x36 */ { NULL, NULL, NULL, 0 },
/* 0x37 */ { NULL, NULL, NULL, 0 },
/* 0x38 */ { NULL, NULL, NULL, 0 },
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 9c4c8556d2..74c287c757 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -6816,37 +6816,49 @@ static void call_trans2ioctl(connection_struct *conn,
Reply to a SMBfindclose (stop trans2 directory search).
****************************************************************************/
-int reply_findclose(connection_struct *conn,
- char *inbuf,char *outbuf,int length,int bufsize)
+void reply_findclose(connection_struct *conn, struct smb_request *req)
{
- int outsize = 0;
- int dptr_num=SVALS(inbuf,smb_vwv0);
+ int dptr_num;
+
START_PROFILE(SMBfindclose);
+ if (req->wct < 1) {
+ reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
+ END_PROFILE(SMBfindclose);
+ return;
+ }
+
+ dptr_num = SVALS(req->inbuf,smb_vwv0);
+
DEBUG(3,("reply_findclose, dptr_num = %d\n", dptr_num));
dptr_close(&dptr_num);
- outsize = set_message(inbuf, outbuf,0,0,False);
+ reply_outbuf(req, 0, 0);
DEBUG(3,("SMBfindclose dptr_num = %d\n", dptr_num));
END_PROFILE(SMBfindclose);
- return(outsize);
+ return;
}
/****************************************************************************
Reply to a SMBfindnclose (stop FINDNOTIFYFIRST directory search).
****************************************************************************/
-int reply_findnclose(connection_struct *conn,
- char *inbuf,char *outbuf,int length,int bufsize)
+void reply_findnclose(connection_struct *conn, struct smb_request *req)
{
- int outsize = 0;
- int dptr_num= -1;
+ int dptr_num;
+
START_PROFILE(SMBfindnclose);
+
+ if (req->wct < 1) {
+ reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
+ END_PROFILE(SMBfindnclose);
+ return;
+ }
- dptr_num = SVAL(inbuf,smb_vwv0);
+ dptr_num = SVAL(req->inbuf,smb_vwv0);
DEBUG(3,("reply_findnclose, dptr_num = %d\n", dptr_num));
@@ -6854,12 +6866,12 @@ int reply_findnclose(connection_struct *conn,
findnotifyfirst - so any dptr_num is ok here.
Just ignore it. */
- outsize = set_message(inbuf, outbuf,0,0,False);
+ reply_outbuf(req, 0, 0);
DEBUG(3,("SMB_findnclose dptr_num = %d\n", dptr_num));
END_PROFILE(SMBfindnclose);
- return(outsize);
+ return;
}
static void handle_trans2(connection_struct *conn, struct smb_request *req,