diff options
-rw-r--r-- | source3/include/proto.h | 2 | ||||
-rw-r--r-- | source3/include/vfs.h | 2 | ||||
-rw-r--r-- | source3/rpc_server/srv_netlog.c | 2 | ||||
-rw-r--r-- | source3/smbd/fileio.c | 2 | ||||
-rw-r--r-- | source3/smbd/vfs-wrap.c | 8 |
5 files changed, 8 insertions, 8 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 7f40ac8fcd..c74d775329 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -3265,7 +3265,7 @@ ssize_t vfswrap_read(int fd, char *data, size_t n); ssize_t vfswrap_write(int fd, char *data, size_t n); SMB_OFF_T vfswrap_lseek(int filedes, SMB_OFF_T offset, int whence); int vfswrap_rename(char *old, char *new); -void vfswrap_fsync(int fd); +int vfswrap_fsync(int fd); int vfswrap_stat(char *fname, SMB_STRUCT_STAT *sbuf); int vfswrap_fstat(int fd, SMB_STRUCT_STAT *sbuf); int vfswrap_lstat(char *path, diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 885e7d486b..fca9f7da84 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -129,7 +129,7 @@ struct vfs_ops { ssize_t (*write)(int fd, char *data, size_t n); SMB_OFF_T (*lseek)(int filedes, SMB_OFF_T offset, int whence); int (*rename)(char *old, char *new); - void (*fsync)(int fd); + int (*fsync)(int fd); int (*stat)(char *fname, SMB_STRUCT_STAT *sbuf); int (*fstat)(int fd, SMB_STRUCT_STAT *sbuf); int (*lstat)(char *path, SMB_STRUCT_STAT *sbuf); diff --git a/source3/rpc_server/srv_netlog.c b/source3/rpc_server/srv_netlog.c index db1a4a9c6b..7f893e2633 100644 --- a/source3/rpc_server/srv_netlog.c +++ b/source3/rpc_server/srv_netlog.c @@ -851,7 +851,6 @@ static BOOL api_net_sam_logon(prs_struct *data, prs_struct *rdata) static BOOL api_net_trust_dom_list(prs_struct *data, prs_struct *rdata) { - uint16 vuid = current_user.vuid; NET_Q_TRUST_DOM_LIST q_t; char *trusted_domain = "test_domain"; @@ -886,7 +885,6 @@ static BOOL api_net_trust_dom_list(prs_struct *data, prs_struct *rdata) static BOOL api_net_logon_ctrl2(prs_struct *data, prs_struct *rdata) { - uint16 vuid = current_user.vuid; NET_Q_LOGON_CTRL2 q_l; /* lkclXXXX - guess what - absolutely no idea what these are! */ diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c index 348486d430..00a515d16d 100644 --- a/source3/smbd/fileio.c +++ b/source3/smbd/fileio.c @@ -651,10 +651,8 @@ sync a file void sys_fsync_file(connection_struct *conn, files_struct *fsp) { -#ifdef HAVE_FSYNC if(lp_strict_sync(SNUM(conn)) && fsp->fd_ptr != NULL) { flush_write_cache(fsp, SYNC_FLUSH); conn->vfs_ops.fsync(fsp->fd_ptr->fd); } -#endif } diff --git a/source3/smbd/vfs-wrap.c b/source3/smbd/vfs-wrap.c index 24e45a6d24..b9c22ef1f9 100644 --- a/source3/smbd/vfs-wrap.c +++ b/source3/smbd/vfs-wrap.c @@ -204,9 +204,13 @@ int vfswrap_rename(char *old, char *new) return result; } -void vfswrap_fsync(int fd) +int vfswrap_fsync(int fd) { - fsync(fd); +#ifdef HAVE_FSYNC + return fsync(fd); +#else + return 0; +#endif } int vfswrap_stat(char *fname, SMB_STRUCT_STAT *sbuf) |