s3-vfs: split @GMT token filter code into a common .c

Andrew Bartlett abartlet at samba.org
Tue Oct 30 02:30:21 MDT 2012


On Tue, 2012-10-30 at 08:41 +0100, Volker Lendecke wrote:
> On Mon, Oct 29, 2012 at 07:04:38PM +0100, David Disseldorp wrote:
> > Hi,
> > 
> > I've recently been working on a Snapper vfs module[1] to propagate FSRVP
> > snapshot create/delete requests to snapperd via D-Bus.
> > 
> > The module makes use of @GMT token filtering hooks currently provided by
> > vfs_shadow_copy2. Therefore, I'd like to split these hooks into a
> > common source for use by both modules, similar to the current
> > relationship between vfs_acl_tdb.c, vfs_acl_xattr.c and vfs_acl_common.c
> > 
> > Please see following patch. Feedback appreciated.
> 
> While it is a good thing to centralize as much of that logic
> as possible, please do not #include a .c file. I really,
> really do not like it in the acl modules and another use of
> that pattern should be avoided if at all possible. If that
> means we have to put those routines into core smbd, not
> sure.

The challenge here, as I see it, is the autoconf build.  With the
infinite flexibility we currently offer on module static/shared we can't
get this the sensible way, which is sharing a .c/.o file in the link
unit, and the autoconf build doesn't give us easy private shared
libraries.

The reason we can't just have both modules link in the extra .c/.o file
is that if both are selected static, the symbols would collide in smbd.

One other way to avoid this would be to reduce the autoconf build to the
basic file server, or at least not every single vfs module, now that we
are past the branch point for Samba 4.0.

Andrew Bartlett
-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org




More information about the samba-technical mailing list