diff options
author | Jeremy Allison <jra@samba.org> | 2000-10-06 03:21:49 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-10-06 03:21:49 +0000 |
commit | b07611f8159b0b3f42e7e02611be9f4d56de96f5 (patch) | |
tree | f7795170df8db5844594c0557ba768cfe06873da /source/smbd/fileio.c | |
parent | d4d55488397832df35b558564c263a307b0bb629 (diff) | |
download | samba-b07611f8159b0b3f42e7e02611be9f4d56de96f5.tar.gz samba-b07611f8159b0b3f42e7e02611be9f4d56de96f5.tar.xz samba-b07611f8159b0b3f42e7e02611be9f4d56de96f5.zip |
Restructuring of vfs layer to include a "this" pointer - can be an fsp or
a conn struct depending on the call.
We need this to have a clean NT ACL call interface.
This will break any existing VFS libraries (that's why this is pre-release
code).
Andrew gets credit for this one :-) :-).
In addition - added Herb's WITH_PROFILE changes - Herb - please examine
the changes I've made to the smbd/reply.c code you added. The original
code was very ugly and I have replaced it with a
START_PROFILE(x)/END_PROFILE(x) pair using the preprocessor.
Please check this compiles ok with the --with-profile switch.
Jeremy.
Diffstat (limited to 'source/smbd/fileio.c')
-rw-r--r-- | source/smbd/fileio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/smbd/fileio.c b/source/smbd/fileio.c index 0c43a255dce..b8a0585d90e 100644 --- a/source/smbd/fileio.c +++ b/source/smbd/fileio.c @@ -38,7 +38,7 @@ SMB_OFF_T seek_file(files_struct *fsp,SMB_OFF_T pos) if (fsp->print_file && lp_postscript(fsp->conn->service)) offset = 3; - seek_ret = fsp->conn->vfs_ops.lseek(fsp->fd,pos+offset,SEEK_SET); + seek_ret = fsp->conn->vfs_ops.lseek(fsp,fsp->fd,pos+offset,SEEK_SET); /* * We want to maintain the fiction that we can seek @@ -117,7 +117,7 @@ ssize_t read_file(files_struct *fsp,char *data,SMB_OFF_T pos,size_t n) } if (n > 0) { - readret = fsp->conn->vfs_ops.read(fsp->fd,data,n); + readret = fsp->conn->vfs_ops.read(fsp,fsp->fd,data,n); if (readret == -1) return -1; if (readret > 0) ret += readret; @@ -164,7 +164,7 @@ ssize_t write_file(files_struct *fsp, char *data, SMB_OFF_T pos, size_t n) SMB_STRUCT_STAT st; fsp->modified = True; - if (fsp->conn->vfs_ops.fstat(fsp->fd,&st) == 0) { + if (fsp->conn->vfs_ops.fstat(fsp,fsp->fd,&st) == 0) { int dosmode = dos_mode(fsp->conn,fsp->fsp_name,&st); if (MAP_ARCHIVE(fsp->conn) && !IS_DOS_ARCHIVE(dosmode)) { file_chmod(fsp->conn,fsp->fsp_name,dosmode | aARCH,&st); @@ -683,7 +683,7 @@ void sync_file(connection_struct *conn, files_struct *fsp) { if(lp_strict_sync(SNUM(conn)) && fsp->fd != -1) { flush_write_cache(fsp, SYNC_FLUSH); - conn->vfs_ops.fsync(fsp->fd); + conn->vfs_ops.fsync(fsp,fsp->fd); } } #undef OLD_NTDOMAIN |