summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-06-18 23:31:22 +0000
committerJeremy Allison <jra@samba.org>2001-06-18 23:31:22 +0000
commit0c69d176532ea4ee2fa4c7809db37b00ecfbeeb6 (patch)
tree679fb2c0f133a02550cf5a9b7ec2e9211dd0d5d8 /source3/libsmb
parent48a5c872402e5c445858dd4054571ca0fada11c4 (diff)
downloadsamba-0c69d176532ea4ee2fa4c7809db37b00ecfbeeb6.tar.gz
samba-0c69d176532ea4ee2fa4c7809db37b00ecfbeeb6.tar.bz2
samba-0c69d176532ea4ee2fa4c7809db37b00ecfbeeb6.zip
New info level tester.
Jeremy. (This used to be commit 9297ae69a7dde878bb4c696f90fbaceb46e18720)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clirap.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c
index 561d717e73..5d41af13f9 100644
--- a/source3/libsmb/clirap.c
+++ b/source3/libsmb/clirap.c
@@ -593,3 +593,46 @@ BOOL cli_qfileinfo(struct cli_state *cli, int fnum,
return True;
}
+/****************************************************************************
+send a qfileinfo call
+****************************************************************************/
+BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata)
+{
+ int data_len = 0;
+ int param_len = 0;
+ uint16 setup = TRANSACT2_QFILEINFO;
+ pstring param;
+ char *rparam=NULL, *rdata=NULL;
+
+ /* if its a win95 server then fail this - win95 totally screws it
+ up */
+ if (cli->win95) return False;
+
+ param_len = 4;
+
+ memset(param, 0, param_len);
+ SSVAL(param, 0, fnum);
+ SSVAL(param, 2, level);
+
+ if (!cli_send_trans(cli, SMBtrans2,
+ NULL, /* name */
+ -1, 0, /* fid, flags */
+ &setup, 1, 0, /* setup, length, max */
+ param, param_len, 2, /* param, length, max */
+ NULL, data_len, cli->max_xmit /* data, length, max */
+ )) {
+ return False;
+ }
+
+ if (!cli_receive_trans(cli, SMBtrans2,
+ &rparam, &param_len,
+ &rdata, &data_len)) {
+ return False;
+ }
+
+ memcpy(outdata, rdata, data_len);
+
+ if (rdata) free(rdata);
+ if (rparam) free(rparam);
+ return True;
+}