diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/vfs.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index b0bc1a9f4d..95bb4c9414 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -89,7 +89,7 @@ int vfs_init_default(connection_struct *conn) BOOL vfs_init_custom(connection_struct *conn) { void *handle; - struct vfs_ops *ops, *(*fptr)(void); + struct vfs_ops *ops, *(*fptr)(struct vfs_options *options); DEBUG(3, ("Initialising custom vfs hooks from %s\n", lp_vfsobj(SNUM(conn)))); @@ -114,13 +114,16 @@ BOOL vfs_init_custom(connection_struct *conn) dlclose(handle); - /* Initialise vfs_ops and fill in unused operations with default - (disk based) ones. There's probably a neater way to do this. */ + /* Initialise vfs_ops structure */ - if ((ops = fptr()) == NULL) { + if ((ops = fptr(lp_vfsoptions(SNUM(conn)))) == NULL) { return False; } + /* Fill in unused operations with default (disk based) ones. + There's probably a neater way to do this then a whole bunch of + if statements. */ + memcpy(&conn->vfs_ops, ops, sizeof(conn->vfs_ops)); if (conn->vfs_ops.connect == NULL) { |