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 | 636f146abf0a75cd3b21a57b50627ee149a635ab (patch) | |
tree | 923f7449e67e10c738e388174d3d36124636c44f /source3/smbd/open.c | |
parent | 56d514235ed16d3cb6b3682afa6980eb3455c50d (diff) | |
download | samba-636f146abf0a75cd3b21a57b50627ee149a635ab.tar.gz samba-636f146abf0a75cd3b21a57b50627ee149a635ab.tar.bz2 samba-636f146abf0a75cd3b21a57b50627ee149a635ab.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.
(This used to be commit b07611f8159b0b3f42e7e02611be9f4d56de96f5)
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r-- | source3/smbd/open.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 4964e15e01..edd94bd865 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -41,13 +41,13 @@ static int fd_open(struct connection_struct *conn, char *fname, flags |= O_NONBLOCK; #endif - fd = conn->vfs_ops.open(dos_to_unix(fname,False),flags,mode); + fd = conn->vfs_ops.open(conn,dos_to_unix(fname,False),flags,mode); /* Fix for files ending in '.' */ if((fd == -1) && (errno == ENOENT) && (strchr(fname,'.')==NULL)) { pstrcat(fname,"."); - fd = conn->vfs_ops.open(dos_to_unix(fname,False),flags,mode); + fd = conn->vfs_ops.open(conn,dos_to_unix(fname,False),flags,mode); } DEBUG(10,("fd_open: name %s, mode = %d, fd = %d. %s\n", fname, (int)mode, fd, @@ -138,7 +138,7 @@ static BOOL open_file(files_struct *fsp,connection_struct *conn, return False; } - if (conn->vfs_ops.fstat(fsp->fd, &sbuf) == -1) { + if (conn->vfs_ops.fstat(fsp,fsp->fd, &sbuf) == -1) { DEBUG(0,("Error doing fstat on open file %s (%s)\n", fname,strerror(errno) )); fd_close(conn, fsp); return False; @@ -213,7 +213,7 @@ static int truncate_unless_locked(struct connection_struct *conn, files_struct * unix_ERR_code = ERRlock; return -1; } else { - return conn->vfs_ops.ftruncate(fsp->fd,0); + return conn->vfs_ops.ftruncate(fsp,fsp->fd,0); } } @@ -792,7 +792,7 @@ files_struct *open_file_stat(connection_struct *conn, if(!fsp) return NULL; - if(conn->vfs_ops.stat(dos_to_unix(fname, False), pst) < 0) { + if(conn->vfs_ops.stat(conn,dos_to_unix(fname, False), pst) < 0) { DEBUG(0,("open_file_stat: unable to stat name = %s. Error was %s\n", fname, strerror(errno) )); file_free(fsp); @@ -862,7 +862,7 @@ files_struct *open_directory(connection_struct *conn, if(!fsp) return NULL; - if(conn->vfs_ops.stat(dos_to_unix(fname, False), &st) == 0) { + if(conn->vfs_ops.stat(conn,dos_to_unix(fname, False), &st) == 0) { got_stat = True; } @@ -983,7 +983,7 @@ BOOL check_file_sharing(connection_struct *conn,char *fname, BOOL rename_op) SMB_DEV_T dev; SMB_INO_T inode; - if (conn->vfs_ops.stat(dos_to_unix(fname,False),&sbuf) == -1) + if (conn->vfs_ops.stat(conn,dos_to_unix(fname,False),&sbuf) == -1) return(True); dev = sbuf.st_dev; |