diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/reply.c | 2 | ||||
-rw-r--r-- | source3/smbd/vfs-wrap.c | 7 | ||||
-rw-r--r-- | source3/smbd/vfs.c | 3 |
3 files changed, 7 insertions, 5 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 45704b9264..b8a89b1d9d 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -1723,7 +1723,7 @@ int send_file_readX(connection_struct *conn, char *inbuf,char *outbuf,int length SSVAL(outbuf,smb_vwv5,smb_maxcnt); SSVAL(outbuf,smb_vwv6,smb_offset(data,outbuf)); SSVAL(smb_buf(outbuf),-2,smb_maxcnt); - CVAL(outbuf,smb_vwv0) = 0xFF; + SCVAL(outbuf,smb_vwv0,0xFF); set_message(outbuf,12,smb_maxcnt,False); header.data = outbuf; header.length = data - outbuf; diff --git a/source3/smbd/vfs-wrap.c b/source3/smbd/vfs-wrap.c index 27bb1f42f3..bae304096c 100644 --- a/source3/smbd/vfs-wrap.c +++ b/source3/smbd/vfs-wrap.c @@ -192,17 +192,16 @@ SMB_OFF_T vfswrap_lseek(files_struct *fsp, int filedes, SMB_OFF_T offset, int wh return result; } -#if 0 /* JRATEST */ -ssize_t vfswrap_sendfile(int tofd, struct files_struct *fsp, int fromfd, DATA_BLOB *hdr, SMB_OFF_T offset, size_t n) +ssize_t vfswrap_sendfile(int tofd, struct files_struct *fsp, int fromfd, const DATA_BLOB *hdr, + SMB_OFF_T offset, size_t n) { ssize_t result; START_PROFILE_BYTES(syscall_sendfile, n); - result = sys_sendfile(outfd, fsp, infd, hdr, offset, n); + result = sys_sendfile(tofd, fromfd, hdr, offset, n); END_PROFILE(syscall_sendfile); return result; } -#endif int vfswrap_rename(connection_struct *conn, const char *old, const char *new) { diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 6869c61861..a0a7b920b8 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -68,6 +68,7 @@ static struct vfs_ops default_vfs_ops = { vfswrap_read, vfswrap_write, vfswrap_lseek, + vfswrap_sendfile, vfswrap_rename, vfswrap_fsync, vfswrap_stat, @@ -263,6 +264,7 @@ BOOL smbd_vfs_init(connection_struct *conn) /******************************************************************* Create vfs_ops reflecting current vfs_opaque_ops *******************************************************************/ + struct vfs_ops *smb_vfs_get_opaque_ops(void) { int i; @@ -301,6 +303,7 @@ BOOL vfs_directory_exist(connection_struct *conn, const char *dname, SMB_STRUCT_ /******************************************************************* vfs getwd wrapper ********************************************************************/ + static char *vfs_getwd(connection_struct *conn, char *path) { return conn->vfs_ops.getwd(conn,path); |