svn commit: samba r5637 - in branches/SAMBA_3_0/source/smbd: .
jra at samba.org
jra at samba.org
Thu Mar 3 04:03:36 GMT 2005
Author: jra
Date: 2005-03-03 04:03:36 +0000 (Thu, 03 Mar 2005)
New Revision: 5637
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5637
Log:
Actually test and fix the crash bugs (sorry:-).
Jeremy.
Modified:
branches/SAMBA_3_0/source/smbd/nttrans.c
branches/SAMBA_3_0/source/smbd/reply.c
branches/SAMBA_3_0/source/smbd/trans2.c
Changeset:
Modified: branches/SAMBA_3_0/source/smbd/nttrans.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/nttrans.c 2005-03-03 03:43:57 UTC (rev 5636)
+++ branches/SAMBA_3_0/source/smbd/nttrans.c 2005-03-03 04:03:36 UTC (rev 5637)
@@ -1012,7 +1012,7 @@
p += 8;
SIVAL(p,0,fmode); /* File Attributes. */
p += 4;
- SOFF_T(p, 0, get_allocation_size(fsp,&sbuf));
+ SOFF_T(p, 0, get_allocation_size(conn,fsp,&sbuf));
p += 8;
SOFF_T(p,0,file_len);
p += 8;
@@ -1529,7 +1529,7 @@
p += 8;
SIVAL(p,0,fmode); /* File Attributes. */
p += 4;
- SOFF_T(p, 0, get_allocation_size(fsp,&sbuf));
+ SOFF_T(p, 0, get_allocation_size(conn,fsp,&sbuf));
p += 8;
SOFF_T(p,0,file_len);
p += 8;
Modified: branches/SAMBA_3_0/source/smbd/reply.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/reply.c 2005-03-03 03:43:57 UTC (rev 5636)
+++ branches/SAMBA_3_0/source/smbd/reply.c 2005-03-03 04:03:36 UTC (rev 5637)
@@ -5176,7 +5176,7 @@
SIVAL(outbuf,smb_vwv6,0);
SIVAL(outbuf,smb_vwv8,0);
} else {
- uint32 allocation_size = get_allocation_size(fsp, &sbuf);
+ uint32 allocation_size = get_allocation_size(conn,fsp, &sbuf);
SIVAL(outbuf,smb_vwv6,(uint32)sbuf.st_size);
SIVAL(outbuf,smb_vwv8,allocation_size);
}
Modified: branches/SAMBA_3_0/source/smbd/trans2.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/trans2.c 2005-03-03 03:43:57 UTC (rev 5636)
+++ branches/SAMBA_3_0/source/smbd/trans2.c 2005-03-03 04:03:36 UTC (rev 5637)
@@ -54,7 +54,7 @@
account sparse files.
********************************************************************/
-SMB_BIG_UINT get_allocation_size(files_struct *fsp, SMB_STRUCT_STAT *sbuf)
+SMB_BIG_UINT get_allocation_size(connection_struct *conn, files_struct *fsp, SMB_STRUCT_STAT *sbuf)
{
SMB_BIG_UINT ret;
@@ -67,7 +67,7 @@
if (!ret && fsp && fsp->initial_allocation_size)
ret = fsp->initial_allocation_size;
- return smb_roundup(fsp->conn, ret);
+ return smb_roundup(conn, ret);
}
/****************************************************************************
@@ -936,7 +936,7 @@
}
file_size = get_file_size(sbuf);
- allocation_size = get_allocation_size(NULL,&sbuf);
+ allocation_size = get_allocation_size(conn,NULL,&sbuf);
mdate = sbuf.st_mtime;
adate = sbuf.st_atime;
cdate = get_create_time(&sbuf,lp_fake_dir_create_times(SNUM(conn)));
@@ -1232,7 +1232,7 @@
SOFF_T(p,0,get_file_size(sbuf)); /* File size 64 Bit */
p+= 8;
- SOFF_T(p,0,get_allocation_size(NULL,&sbuf)); /* Number of bytes used on disk - 64 Bit */
+ SOFF_T(p,0,get_allocation_size(conn,NULL,&sbuf)); /* Number of bytes used on disk - 64 Bit */
p+= 8;
put_long_date(p,sbuf.st_ctime); /* Inode change Time 64 Bit */
@@ -2439,7 +2439,7 @@
fullpathname = fname;
file_size = get_file_size(sbuf);
- allocation_size = get_allocation_size(fsp,&sbuf);
+ allocation_size = get_allocation_size(conn,fsp,&sbuf);
if (mode & aDIR) {
/* This is necessary, as otherwise the desktop.ini file in
* this folder is ignored */
@@ -2785,7 +2785,7 @@
SOFF_T(pdata,0,get_file_size(sbuf)); /* File size 64 Bit */
pdata += 8;
- SOFF_T(pdata,0,get_allocation_size(fsp,&sbuf)); /* Number of bytes used on disk - 64 Bit */
+ SOFF_T(pdata,0,get_allocation_size(conn,fsp,&sbuf)); /* Number of bytes used on disk - 64 Bit */
pdata += 8;
put_long_date(pdata,sbuf.st_ctime); /* Creation Time 64 Bit */
More information about the samba-cvs
mailing list