summaryrefslogtreecommitdiff
path: root/source3/smbd/trans2.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-01-03 06:19:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:53 -0500
commit9985f25f0031cb1c91fd99cddf6f80bdf66b4dad (patch)
tree3ac90886c6baef32cfc6e8353494286aa1d3419d /source3/smbd/trans2.c
parent3063738c240260ebca63d037a69d2c02603db4b5 (diff)
downloadsamba-9985f25f0031cb1c91fd99cddf6f80bdf66b4dad.tar.gz
samba-9985f25f0031cb1c91fd99cddf6f80bdf66b4dad.tar.bz2
samba-9985f25f0031cb1c91fd99cddf6f80bdf66b4dad.zip
r20496: Some changes to make Samba3 the RAW-OPEN test. Checking in to both 3_0 and
3_0_24 because I was explicitly asked to, although this needs close review. Jeremy, I'm sure you will check this thoroughly :-) In reply_open_and_X the separate "size" variable kills the calculation of the SPARSE flag returned to the client in the attrib field. In getpathinfo we do it correctly, and RAW-OPEN (correctly) complains about the difference. Add the "set the write time" to mknew and create. For trans2open we were missing the "ofun == 0" -> NT_STATUS_OBJECT_NAME_COLLISION case, and we dropped the status returned in favor of ACCESS_DENIED once too many. Last change is a fix to trans2open: We were returning the attributes given by the client, not the attributes of the new file. Volker (This used to be commit 84e6889632c7f98a7cb37036b0acdf538d50d16c)
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r--source3/smbd/trans2.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 78630efd44..33596f19da 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -810,6 +810,10 @@ static int call_trans2open(connection_struct *conn, char *inbuf, char *outbuf, i
return set_bad_path_error(errno, bad_path, outbuf, ERRDOS,ERRnoaccess);
}
+ if (open_ofun == 0) {
+ return ERROR_NT(NT_STATUS_OBJECT_NAME_COLLISION);
+ }
+
if (!map_open_params_to_ntcreate(fname, deny_mode, open_ofun,
&access_mask,
&share_mode,
@@ -857,7 +861,7 @@ static int call_trans2open(connection_struct *conn, char *inbuf, char *outbuf, i
/* We have re-scheduled this call. */
return -1;
}
- return set_bad_path_error(errno, bad_path, outbuf, ERRDOS,ERRnoaccess);
+ return ERROR_NT(status);
}
size = get_file_size(sbuf);
@@ -909,7 +913,7 @@ static int call_trans2open(connection_struct *conn, char *inbuf, char *outbuf, i
params = *pparams;
SSVAL(params,0,fsp->fnum);
- SSVAL(params,2,open_attr);
+ SSVAL(params,2,fattr);
srv_put_dos_date2(params,4, mtime);
SIVAL(params,8, (uint32)size);
SSVAL(params,12,deny_mode);