diff options
Diffstat (limited to 'source3/printing')
-rw-r--r-- | source3/printing/printfsp.c | 7 |
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), |