Use VFS operations for file I/O.
authorTim Potter <tpot@samba.org>
Sun, 4 Apr 1999 07:03:47 +0000 (07:03 +0000)
committerTim Potter <tpot@samba.org>
Sun, 4 Apr 1999 07:03:47 +0000 (07:03 +0000)
Modified invocations of fd_attempt_close as it now takes a fsp instead
of a fd.

source/smbd/close.c

index 94923b6db27adcbbd0f457a0b012e4838521a0eb..024a3c03e4bb36b7077291357da990df0b77e2e5 100644 (file)
@@ -119,7 +119,7 @@ void close_file(files_struct *fsp, BOOL normal_close)
                del_share_mode(token, fsp);
        }
 
-       if(fd_attempt_close(fsp->fd_ptr) == 0)
+       if(fd_attempt_close(fsp) == 0)
                last_reference = True;
 
     fsp->fd_ptr = NULL;
@@ -144,8 +144,7 @@ void close_file(files_struct *fsp, BOOL normal_close)
     if (normal_close && last_reference && delete_on_close) {
         DEBUG(5,("close_file: file %s. Delete on close was set - deleting file.\n",
            fsp->fsp_name));
-               if(dos_unlink(fsp->fsp_name) != 0) {
-
+               if(fsp->conn->vfs_ops.unlink(dos_to_unix(fsp->fsp_name, False)) != 0) {
           /*
            * This call can potentially fail as another smbd may have
            * had the file open with delete on close set and deleted