summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-06-04 18:10:51 +0200
committerStefan Metzmacher <metze@samba.org>2012-06-06 10:18:37 +0200
commit0907b1e20c8cbbf5f6c4daa44492792585e65fbc (patch)
tree2400caebcbae2c639cd528548639309fec5c9149 /source3
parentcf549ff2bcf165060e9fbfcf395ec808f8c562ad (diff)
downloadsamba-0907b1e20c8cbbf5f6c4daa44492792585e65fbc.tar.gz
samba-0907b1e20c8cbbf5f6c4daa44492792585e65fbc.tar.bz2
samba-0907b1e20c8cbbf5f6c4daa44492792585e65fbc.zip
s3:smbd: dup_file_fsp() never gets called for print files
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/files.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index 9937fc6c82..d6713f7d6a 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -586,6 +586,9 @@ NTSTATUS dup_file_fsp(struct smb_request *req, files_struct *from,
uint32 access_mask, uint32 share_access,
uint32 create_options, files_struct *to)
{
+ /* this can never happen for print files */
+ SMB_ASSERT(from->print_file == NULL);
+
TALLOC_FREE(to->fh);
to->fh = from->fh;
@@ -610,14 +613,6 @@ NTSTATUS dup_file_fsp(struct smb_request *req, files_struct *from,
to->is_directory = from->is_directory;
to->aio_write_behind = from->aio_write_behind;
- if (from->print_file) {
- to->print_file = talloc(to, struct print_file_data);
- if (!to->print_file) return NT_STATUS_NO_MEMORY;
- to->print_file->rap_jobid = from->print_file->rap_jobid;
- } else {
- to->print_file = NULL;
- }
-
return fsp_set_smb_fname(to, from->fsp_name);
}