summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>1999-04-05 05:18:07 +0000
committerTim Potter <tpot@samba.org>1999-04-05 05:18:07 +0000
commit69ae7902bb2ba16f6312aaaa0cdee1204297905a (patch)
tree538085dd8c972d7b6f96f0f0f29c0504fe322b26 /source3
parent38b6de53b4a424bef672020f9440e9edb884228d (diff)
downloadsamba-69ae7902bb2ba16f6312aaaa0cdee1204297905a.tar.gz
samba-69ae7902bb2ba16f6312aaaa0cdee1204297905a.tar.bz2
samba-69ae7902bb2ba16f6312aaaa0cdee1204297905a.zip
Disable VFS routines if no libdl available.
(This used to be commit cbfd8a8990b4d06d0c866274e7d28e4a5e384686)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/service.c7
-rw-r--r--source3/smbd/vfs.c9
2 files changed, 13 insertions, 3 deletions
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index 8202294293..5c7929d1b6 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -350,11 +350,18 @@ connection_struct *make_connection(char *service,char *user,char *password, int
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 {
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 937bc1606e..59e7bb4935 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -20,7 +20,9 @@
*/
#include "includes.h"
+#ifdef HAVE_LIBDL
#include <dlfcn.h>
+#endif
extern int DEBUGLEVEL;
@@ -115,6 +117,7 @@ struct vfs_ops default_vfs_ops = {
/****************************************************************************
call vfs_init function of loadable module
****************************************************************************/
+#ifdef HAVE_LIBDL
BOOL do_vfs_init(char *vfs_object)
{
void *handle, (*fptr)(void);
@@ -139,6 +142,7 @@ BOOL do_vfs_init(char *vfs_object)
return True;
}
+#endif
/****************************************************************************
initialise default vfs hooks
@@ -154,6 +158,7 @@ int vfs_init_default(connection_struct *conn)
/****************************************************************************
initialise custom vfs hooks
****************************************************************************/
+#ifdef HAVE_LIBDL
int vfs_init_custom(connection_struct *conn)
{
void *handle, *fptr;
@@ -189,12 +194,11 @@ int vfs_init_custom(connection_struct *conn)
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
@@ -233,7 +237,6 @@ ssize_t vfs_read_data(files_struct *fsp,char *buffer,size_t N)
}
#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)