Forgot about closedir() function for VFS. Hoo embarassing.
authorTim Potter <tpot@samba.org>
Thu, 8 Apr 1999 03:01:18 +0000 (03:01 +0000)
committerTim Potter <tpot@samba.org>
Thu, 8 Apr 1999 03:01:18 +0000 (03:01 +0000)
(This used to be commit c1cbe07c0391c36066b068fdd42bf1aa40259a5c)

source3/include/smb.h
source3/smbd/dir.c
source3/smbd/vfs-wrap.c
source3/smbd/vfs.c

index aa1f7439961d37eec93ca212342e67cb975f5ae0..29c119df95c0b8f08b396bb402ba1ccb34d89afe 100644 (file)
@@ -629,6 +629,7 @@ struct vfs_ops {
     struct dirent *(*readdir)(DIR *dirp);
     int (*mkdir)(char *path, mode_t mode);
     int (*rmdir)(char *path);
+    int (*closedir)(DIR *dir);
     
     /* File operations */
     
index 52d271e284bc4a26fe392af055048125ff736538..b7ae2af47cb867c5b194efc274b389dc5adfa416 100644 (file)
@@ -524,7 +524,7 @@ void *OpenDir(connection_struct *conn, char *name, BOOL use_veto)
   if (!p) return(NULL);
   dirp = (Dir *)malloc(sizeof(Dir));
   if (!dirp) {
-    closedir(p);
+    conn->vfs_ops.closedir(p);
     return(NULL);
   }
   dirp->pos = dirp->numentries = dirp->mallocsize = 0;
@@ -554,7 +554,7 @@ void *OpenDir(connection_struct *conn, char *name, BOOL use_veto)
     dirp->numentries++;
   }
 
-  closedir(p);
+  conn->vfs_ops.closedir(p);
   return((void *)dirp);
 }
 
index b3d1a35329bba53d67b565a3b904316c88029aed..da69b3f006cc4a8d3b110c4f5857112e7c48511a 100644 (file)
@@ -66,6 +66,14 @@ int vfswrap_rmdir(char *path)
     return result;
 }
 
+int vfswrap_closedir(DIR *dirp)
+{
+    int result;
+    
+    result = closedir(path);
+    return result;
+}
+
 /* File operations */
     
 int vfswrap_open(char *fname, int flags, mode_t mode)
index 59e7bb493528d56510104e3282a19f1233c0c1ea..fdff87496b517d652362c428bda092929c8b2d04 100644 (file)
@@ -53,6 +53,7 @@ struct vfs_syminfo vfs_syminfo[] = {
     {"vfs_readdir",    &dl_ops.readdir},
     {"vfs_mkdir",      &dl_ops.mkdir},
     {"vfs_rmdir",      &dl_ops.rmdir},
+    {"vfs_closedir",   &dl_ops.closedir},
 
     /* File operations */
 
@@ -95,6 +96,7 @@ struct vfs_ops default_vfs_ops = {
     vfswrap_readdir,
     vfswrap_mkdir,
     vfswrap_rmdir,
+    vfswrap_closedir,
 
     /* File operations */