When a VFS module is built outside the source tree, the init function name has to be manually changed to samba_init_module or init_samba_module depending on which Samba version is being built against.
It'd be nice to have build functionality available that'd allow the same module source file to be compiled inside or outside the tree without manually changing the init function name.
Thanks!

Something like the above was pushed to master as 1080483319d4eb7a8cdee767fc41f7258e0e2537
However, a small change is required for the 3.6.x and 3.5.x code bases which declare things as:
#define vfs_acl_tdb_init init_samba_module
Here is the required patch for 3.5.x and 3.6.x:
diff --git a/examples/VFS/Makefile.in b/examples/VFS/Makefile.in
index 8fe414a..98d259f 100644
--- a/examples/VFS/Makefile.in
+++ b/examples/VFS/Makefile.in
@@ -36,7 +36,7 @@ default: $(patsubst %.c,%.$(SHLIBEXT),$(wildcard *.c))
%.$(OBJEXT): %.c
@echo "Compiling $<"
- @$(CC) $(FLAGS) -c $<
+ @$(CC) $(FLAGS) -c $< -D$*_init=init_samba_module
install: default
Can I get someone to approve including this patch in the next 3.6.x and 3.5.x releases because it makes life easier for those who write out-of-tree modules.
It also overcomes my objection to the gratuitous change to the vfs module init function in Master compared to the other branches, because we hide the difference in the infrastructure.