summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-02-08 00:41:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:49 -0500
commitb32efe921fa9b30ed0cf527cf95ad059285b7b9d (patch)
treedd7bd24fa5ca8bcbf0374fa978b8ccae8c294dba
parent50b3dbef68288c5e21d10070a4ce1845574ecea7 (diff)
downloadsamba-b32efe921fa9b30ed0cf527cf95ad059285b7b9d.tar.gz
samba-b32efe921fa9b30ed0cf527cf95ad059285b7b9d.tar.bz2
samba-b32efe921fa9b30ed0cf527cf95ad059285b7b9d.zip
r21229: Don't indirect through a potentially null pointer :-).
Jeremy. (This used to be commit 6723f9d85ccb4883f15658aceb021b4c4a752edf)
-rw-r--r--source3/smbd/trans2.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index bab94b1c7d..103be39936 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -2868,7 +2868,8 @@ static BOOL marshall_posix_acl(connection_struct *conn, char *pdata, SMB_STRUCT_
Store the FILE_UNIX_BASIC info.
****************************************************************************/
-static char *store_file_unix_basic(char *pdata,
+static char *store_file_unix_basic(connection_struct *conn,
+ char *pdata,
files_struct *fsp,
SMB_STRUCT_STAT *psbuf)
{
@@ -2878,7 +2879,7 @@ static char *store_file_unix_basic(char *pdata,
SOFF_T(pdata,0,get_file_size(*psbuf)); /* File size 64 Bit */
pdata += 8;
- SOFF_T(pdata,0,get_allocation_size(fsp->conn,fsp,psbuf)); /* Number of bytes used on disk - 64 Bit */
+ SOFF_T(pdata,0,get_allocation_size(conn,fsp,psbuf)); /* Number of bytes used on disk - 64 Bit */
pdata += 8;
put_long_date_timespec(pdata,get_ctimespec(psbuf)); /* Creation Time 64 Bit */
@@ -3524,7 +3525,7 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
case SMB_QUERY_FILE_UNIX_BASIC:
- pdata = store_file_unix_basic(pdata, fsp, &sbuf);
+ pdata = store_file_unix_basic(conn, pdata, fsp, &sbuf);
data_size = PTR_DIFF(pdata,(*ppdata));
{
@@ -4932,7 +4933,7 @@ static NTSTATUS smb_posix_mkdir(connection_struct *conn,
if (info_level_return == SMB_QUERY_FILE_UNIX_BASIC) {
SSVAL(pdata,4,SMB_QUERY_FILE_UNIX_BASIC);
SSVAL(pdata,6,0); /* Padding. */
- store_file_unix_basic(pdata + 8, fsp, psbuf);
+ store_file_unix_basic(conn, pdata + 8, fsp, psbuf);
} else {
SSVAL(pdata,4,SMB_NO_INFO_LEVEL_RETURNED);
SSVAL(pdata,6,0); /* Padding. */
@@ -5098,7 +5099,7 @@ static NTSTATUS smb_posix_open(connection_struct *conn,
if (info_level_return == SMB_QUERY_FILE_UNIX_BASIC) {
SSVAL(pdata,4,SMB_QUERY_FILE_UNIX_BASIC);
SSVAL(pdata,6,0); /* padding. */
- store_file_unix_basic(pdata + 8, fsp, psbuf);
+ store_file_unix_basic(conn, pdata + 8, fsp, psbuf);
} else {
SSVAL(pdata,4,SMB_NO_INFO_LEVEL_RETURNED);
SSVAL(pdata,6,0); /* padding. */