summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-02-20 22:45:49 +0000
committerJeremy Allison <jra@samba.org>2004-02-20 22:45:49 +0000
commite5c79dd79eb86c4fa790cd919056ed0fca3c73c1 (patch)
tree72ec68b277d90b4cdecf39767123fa8e41cbc7d2 /source3/libsmb
parent9138aa18eb66d2c54cd0736c5e25800868c274f5 (diff)
downloadsamba-e5c79dd79eb86c4fa790cd919056ed0fca3c73c1.tar.gz
samba-e5c79dd79eb86c4fa790cd919056ed0fca3c73c1.tar.bz2
samba-e5c79dd79eb86c4fa790cd919056ed0fca3c73c1.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. (This used to be commit fb4249e7d12bee4589edff40f1e76f1a19a6ffaa)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clirap.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c
index e403a78cdd..721d3dcb47 100644
--- a/source3/libsmb/clirap.c
+++ b/source3/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);