summaryrefslogtreecommitdiffstats
path: root/source/libsmb/clirap.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-02-20 22:45:53 +0000
committerJeremy Allison <jra@samba.org>2004-02-20 22:45:53 +0000
commit5c6f8b1053fd1f170fbb76640649653f8aa80f18 (patch)
treeb96e1d91644801cc041a961bfcca30a07de0243e /source/libsmb/clirap.c
parent84fe24e64ee405bb25878c1e5fdf50592eb75f73 (diff)
downloadsamba-5c6f8b1053fd1f170fbb76640649653f8aa80f18.tar.gz
samba-5c6f8b1053fd1f170fbb76640649653f8aa80f18.tar.xz
samba-5c6f8b1053fd1f170fbb76640649653f8aa80f18.zip
Make us bug-for-bug compatible with W2K3 - to get delete on close semantics
on an initial open the desired_access field *must* contain DELETE_ACCESS, simply having it map from a GENERIC_ALL won't do. Fixes delete on close test. Jeremy.
Diffstat (limited to 'source/libsmb/clirap.c')
-rw-r--r--source/libsmb/clirap.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/libsmb/clirap.c b/source/libsmb/clirap.c
index 36bc403e0b4..c4b08d21d81 100644
--- a/source/libsmb/clirap.c
+++ b/source/libsmb/clirap.c
@@ -631,7 +631,7 @@ BOOL cli_qfileinfo(struct cli_state *cli, int fnum,
/****************************************************************************
send a qfileinfo call
****************************************************************************/
-BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdata)
+BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char **poutdata, uint32 *poutlen)
{
unsigned int data_len = 0;
unsigned int param_len = 0;
@@ -639,9 +639,13 @@ BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdat
pstring param;
char *rparam=NULL, *rdata=NULL;
+ *poutdata = NULL;
+ *poutlen = 0;
+
/* if its a win95 server then fail this - win95 totally screws it
up */
- if (cli->win95) return False;
+ if (cli->win95)
+ return False;
param_len = 4;
@@ -665,7 +669,8 @@ BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char *outdat
return False;
}
- memcpy(outdata, rdata, data_len);
+ memdup(poutdata, data_len);
+ *poutlen = data_len;
SAFE_FREE(rdata);
SAFE_FREE(rparam);