summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2010-04-28 19:42:04 -0400
committerJeremy Allison <jra@samba.org>2010-04-30 11:52:39 -0700
commitdffeb12f3dcb339bc258a7fbc38bbf9ec8dd928e (patch)
treeb9e26e4bd2aad5f419ac42e4979f7c85d884a8e0 /source3/printing
parentb9a97cf8649141dcd13f09cd1866d60f090d0bbe (diff)
downloadsamba-dffeb12f3dcb339bc258a7fbc38bbf9ec8dd928e.tar.gz
samba-dffeb12f3dcb339bc258a7fbc38bbf9ec8dd928e.tar.bz2
samba-dffeb12f3dcb339bc258a7fbc38bbf9ec8dd928e.zip
smbd: move printfile_offset() within write_file()
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/printfsp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/printing/printfsp.c b/source3/printing/printfsp.c
index e8907488c4..5bb662e10f 100644
--- a/source3/printing/printfsp.c
+++ b/source3/printing/printfsp.c
@@ -76,7 +76,7 @@ NTSTATUS print_fsp_open(struct smb_request *req, connection_struct *conn,
GetTimeOfDay(&fsp->open_time);
fsp->vuid = current_vuid;
fsp->fh->pos = -1;
- fsp->can_lock = True;
+ fsp->can_lock = False;
fsp->can_read = False;
fsp->access_mask = FILE_GENERIC_WRITE;
fsp->can_write = True;
@@ -131,6 +131,11 @@ SMB_OFF_T printfile_offset(files_struct *fsp, SMB_OFF_T offset)
{
SMB_STRUCT_STAT st;
+ if (offset & 0xffffffff00000000LL) {
+ /* offset is > 4G, skip */
+ return offset;
+ }
+
if (sys_fstat(fsp->fh->fd, &st, false) == -1) {
DEBUG(3,("printfile_offset: sys_fstat failed on %s (%s)\n",
fsp_str_dbg(fsp),