diff options
author | Volker Lendecke <vl@samba.org> | 2008-12-30 22:49:01 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-12-31 10:51:44 +0100 |
commit | ce2ff557bda5560cb9b614313d9ee0adbd57633d (patch) | |
tree | d0ddb26093b8b193f859b72504aeba1552e76883 /source3/printing | |
parent | cb5db966e34310af16499b657c83f30a1758fc06 (diff) | |
download | samba-ce2ff557bda5560cb9b614313d9ee0adbd57633d.tar.gz samba-ce2ff557bda5560cb9b614313d9ee0adbd57633d.tar.bz2 samba-ce2ff557bda5560cb9b614313d9ee0adbd57633d.zip |
Fix an ancient uninitialized variable read
The callers of open_file_ntcreate expect *psbuf to be filled correctly
Diffstat (limited to 'source3/printing')
-rw-r--r-- | source3/printing/printfsp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/printing/printfsp.c b/source3/printing/printfsp.c index 5481d95650..b485711f91 100644 --- a/source3/printing/printfsp.c +++ b/source3/printing/printfsp.c @@ -27,10 +27,10 @@ print_job_start(). NTSTATUS print_fsp_open(struct smb_request *req, connection_struct *conn, const char *fname, - uint16_t current_vuid, files_struct *fsp) + uint16_t current_vuid, files_struct *fsp, + SMB_STRUCT_STAT *psbuf) { int jobid; - SMB_STRUCT_STAT sbuf; fstring name; NTSTATUS status; @@ -74,9 +74,9 @@ NTSTATUS print_fsp_open(struct smb_request *req, connection_struct *conn, 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; } |