From f809734105eaa1c111720111a10594a27bdf639f Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 22 Jul 1999 04:43:59 +0000 Subject: Pass VFS options defined in smb.conf to vfs_init() function. (This used to be commit 8cde172a77a1582c0af2e685097c53ba5f302a4e) --- source3/smbd/vfs.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source3/smbd') 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) { -- cgit