[SCM] Samba Shared Repository - branch v3-2-test updated -
release-3-2-0pre2-3311-gf9f6bff
Volker Lendecke
vlendec at samba.org
Wed Dec 31 09:33:05 GMT 2008
The branch, v3-2-test has been updated
via f9f6bffc3763ddd8e19400616b6e5da962142e5e (commit)
from 783247bdce9268d44b14005ec3eb84c35e0cd71a (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit f9f6bffc3763ddd8e19400616b6e5da962142e5e
Author: Volker Lendecke <vl at samba.org>
Date: Tue Dec 30 22:24:04 2008 +0100
Fix an ancient uninitialized variable read
The callers of open_file_ntcreate expect *psbuf to be filled correctly
-----------------------------------------------------------------------
Summary of changes:
source/printing/printfsp.c | 9 ++++-----
source/smbd/open.c | 2 +-
source/smbd/reply.c | 3 ++-
3 files changed, 7 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/printing/printfsp.c b/source/printing/printfsp.c
index c665224..12399b8 100644
--- a/source/printing/printfsp.c
+++ b/source/printing/printfsp.c
@@ -28,10 +28,9 @@ print_job_start().
***************************************************************************/
NTSTATUS print_fsp_open(connection_struct *conn, const char *fname,
- files_struct *fsp)
+ files_struct *fsp, SMB_STRUCT_STAT *psbuf)
{
int jobid;
- SMB_STRUCT_STAT sbuf;
fstring name;
NTSTATUS status;
@@ -75,9 +74,9 @@ NTSTATUS print_fsp_open(connection_struct *conn, const char *fname,
fsp->is_directory = False;
string_set(&fsp->fsp_name,print_job_fname(lp_const_servicename(SNUM(conn)),jobid));
fsp->wcp = NULL;
- SMB_VFS_FSTAT(fsp, &sbuf);
- fsp->mode = sbuf.st_mode;
- fsp->file_id = vfs_file_id_from_sbuf(conn, &sbuf);
+ SMB_VFS_FSTAT(fsp, psbuf);
+ fsp->mode = psbuf->st_mode;
+ fsp->file_id = vfs_file_id_from_sbuf(conn, psbuf);
return NT_STATUS_OK;
}
diff --git a/source/smbd/open.c b/source/smbd/open.c
index b732c5e..b82c036 100644
--- a/source/smbd/open.c
+++ b/source/smbd/open.c
@@ -1222,7 +1222,7 @@ static NTSTATUS open_file_ntcreate_internal(connection_struct *conn,
DEBUG(10, ("open_file_ntcreate: printer open fname=%s\n", fname));
- return print_fsp_open(conn, fname, fsp);
+ return print_fsp_open(conn, fname, fsp, psbuf);
}
if (!parent_dirname_talloc(talloc_tos(), fname, &parent_dir,
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index 762fab1..248596d 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -4633,6 +4633,7 @@ void reply_printopen(struct smb_request *req)
connection_struct *conn = req->conn;
files_struct *fsp;
NTSTATUS status;
+ SMB_STRUCT_STAT sbuf;
START_PROFILE(SMBsplopen);
@@ -4656,7 +4657,7 @@ void reply_printopen(struct smb_request *req)
}
/* Open for exclusive use, write only. */
- status = print_fsp_open(conn, NULL, fsp);
+ status = print_fsp_open(conn, NULL, fsp, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
file_free(fsp);
--
Samba Shared Repository
More information about the samba-cvs
mailing list