diff options
author | Simo Sorce <idra@samba.org> | 2010-04-23 14:26:33 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-04-23 14:26:33 -0700 |
commit | 168b86c3847a5b575eef36cc2308802cbd25bb4a (patch) | |
tree | 28546e3b7bb429a06bfbba51b3cbcefe2b59be33 /source3/smbd/files.c | |
parent | 2bbb8c917e372ceeb1e144259d9d2b0eab7cc212 (diff) | |
download | samba-168b86c3847a5b575eef36cc2308802cbd25bb4a.tar.gz |
s3-smbd: group print relate data in own structure
Diffstat (limited to 'source3/smbd/files.c')
-rw-r--r-- | source3/smbd/files.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/smbd/files.c b/source3/smbd/files.c index a2a7dabea54..43956e3903e 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -589,10 +589,18 @@ NTSTATUS dup_file_fsp(struct smb_request *req, files_struct *from, } else { to->can_write = (access_mask & (FILE_WRITE_DATA | FILE_APPEND_DATA)) ? True : False; } - to->print_file = from->print_file; to->modified = from->modified; 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); } |