summaryrefslogtreecommitdiff
path: root/source3/smbd/vfs-wrap.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-03-20 00:46:53 +0000
committerJeremy Allison <jra@samba.org>2002-03-20 00:46:53 +0000
commitb9e91d2a8e41a43d7ebb7d7eed807a7d8de9b329 (patch)
treebd74664377abf0b1d0745476d88f6668d06c5718 /source3/smbd/vfs-wrap.c
parent0cd5dd67ce12f02d3d20568e901ef7666caa8472 (diff)
downloadsamba-b9e91d2a8e41a43d7ebb7d7eed807a7d8de9b329.tar.gz
samba-b9e91d2a8e41a43d7ebb7d7eed807a7d8de9b329.tar.bz2
samba-b9e91d2a8e41a43d7ebb7d7eed807a7d8de9b329.zip
Remove the "stat open" code - make it inline. This should fix the
bugs with opening and renaming mp3 files, also the word rename problems that people have had for a while. Needs a make clean :-) make. Also added JohnR's printing fix. Jeremy. (This used to be commit 504e5ef0494c54efbd0357e334cb2aa5a9eb9c14)
Diffstat (limited to 'source3/smbd/vfs-wrap.c')
-rw-r--r--source3/smbd/vfs-wrap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/smbd/vfs-wrap.c b/source3/smbd/vfs-wrap.c
index 1d94e18e5b..fadc435a2f 100644
--- a/source3/smbd/vfs-wrap.c
+++ b/source3/smbd/vfs-wrap.c
@@ -164,11 +164,13 @@ ssize_t vfswrap_write(files_struct *fsp, int fd, const void *data, size_t n)
SMB_OFF_T vfswrap_lseek(files_struct *fsp, int filedes, SMB_OFF_T offset, int whence)
{
- SMB_OFF_T result;
+ SMB_OFF_T result = 0;
START_PROFILE(syscall_lseek);
- result = sys_lseek(filedes, offset, whence);
+ /* Cope with 'stat' file opens. */
+ if (filedes != -1)
+ result = sys_lseek(filedes, offset, whence);
/*
* We want to maintain the fiction that we can seek