if (*lp_vfsobj(SNUM(conn))) {
+#ifdef HAVE_LIBDL
+
/* Loadable object file */
if (vfs_init_custom(conn) < 0) {
return NULL;
}
+#else
+ DEBUG(0, ("No libdl present - cannot use VFS objects\n"));
+ conn_free(conn);
+ return NULL;
+#endif
} else {
*/
#include "includes.h"
+#ifdef HAVE_LIBDL
#include <dlfcn.h>
+#endif
extern int DEBUGLEVEL;
/****************************************************************************
call vfs_init function of loadable module
****************************************************************************/
+#ifdef HAVE_LIBDL
BOOL do_vfs_init(char *vfs_object)
{
void *handle, (*fptr)(void);
return True;
}
+#endif
/****************************************************************************
initialise default vfs hooks
/****************************************************************************
initialise custom vfs hooks
****************************************************************************/
+#ifdef HAVE_LIBDL
int vfs_init_custom(connection_struct *conn)
{
void *handle, *fptr;
bcopy(&dl_ops, &conn->vfs_ops, sizeof(dl_ops));
dlclose(handle);
-#if 0
do_vfs_init(lp_vfsobj(SNUM(conn)));
-#endif
return 0;
}
+#endif
/*******************************************************************
check if a vfs file exists
}
#else /* WITH_SSL */
ret = fsp->conn->vfs_ops.read(fd,buffer + total,N - total);
- DEBUG(0, ("VFS_READ -> read %d/%d bytes\n", ret, N));
#endif /* WITH_SSL */
if (ret == 0)