summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2003-03-31 16:27:11 +0000
committerAlexander Bokovoy <ab@samba.org>2003-03-31 16:27:11 +0000
commit9d3b00b4bf34438ae8cd8383de9156db70f8435c (patch)
treeeb9f1830b1a4b97a4763e03a0d7285d926cfa965
parent4b3741cefcbd248e60e49d5344a7260aa7a6cc20 (diff)
downloadsamba-9d3b00b4bf34438ae8cd8383de9156db70f8435c.tar.gz
samba-9d3b00b4bf34438ae8cd8383de9156db70f8435c.tar.bz2
samba-9d3b00b4bf34438ae8cd8383de9156db70f8435c.zip
Fix vfs to work with P_LIST-ed lp_vfsobj() -- the traversal is reversed. Based on patch from Metze
(This used to be commit 2a86ef78282d33e16007d50095614713189ce4b5)
-rw-r--r--source3/smbd/vfs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 465d14abba..adbde4994d 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -314,8 +314,8 @@ BOOL smbd_vfs_init(connection_struct *conn)
{
const char **vfs_objects;
char *vfs_module, *vfs_path;
- unsigned int i;
- unsigned int j = 0;
+ unsigned int i = 0;
+ int j = 0;
struct smb_vfs_handle_struct *handle;
/* Normal share - initialise with disk access functions */
@@ -334,7 +334,9 @@ BOOL smbd_vfs_init(connection_struct *conn)
vfs_path = lp_vfs_path(SNUM(conn));
- for (j=0; vfs_objects[j]; j++) {
+ for (i=0; vfs_objects[i]; i++); /* count passed modules */
+
+ for (j=i-1; j >= 0; j--) {
conn->vfs_private = NULL;
handle = (struct smb_vfs_handle_struct *) smb_xmalloc(sizeof(smb_vfs_handle_struct));
/* Loadable object file */