patch for vfs/skel.c

andreas moroder claudiamoroder at
Sat Dec 15 08:12:03 GMT 2001


here a patch for skel.c. With this patch it is possible to connect to a share 
with skel mounted.

What does not currently work is to get files from the share.
The get command failes and smbd.log contains the following line:

2001/12/15 16:36:32, 0] smbd/fileio.c:seek_file(54)
  seek_file: sys_lseek failed. Error was Invalid argument

I inserted a few debug statements and got this output

[2001/12/15 16:36:32, 0] smbd/vfs-wrap.c:vfswrap_lseek(233)
  LSEEK 19 0 0     

where the 3th parameter is whence. Looking at man lseek and 
/usr/include/stdio.h SEEK_SET is 0 so I' don't know the reason what is wrong.

I hope one of the main developers can tell me the reason.



--- skel.c	Sat Dec 15 17:10:33 2001
+++ skel.and	Sat Dec 15 17:10:48 2001
@@ -45,12 +45,12 @@
 /* VFS initialisation - return vfs_ops function pointer structure */
-BOOL vfs_init(connection_struct *conn)
+struct vfs_ops *vfs_init(int *ver)
     DEBUG(3, ("Initialising default vfs hooks\n"));
-    memcpy(&conn->vfs_ops, &skel_ops, sizeof(struct vfs_ops));
-    return True;
+    return &skel_ops;
 int skel_connect(struct connection_struct *conn, char *service, char *user)  

More information about the samba-technical mailing list