which VFS type should I use? (opaque, transparent, logger, etc.)

James Peach jpeach at samba.org
Tue Sep 20 03:16:03 GMT 2005


On Mon, 2005-09-19 at 17:12 -0500, Sean Dunn wrote:
> Hello all,
> 
> The VFS I'm developing will pass through to the underlying modules in
> most cases, saving a log of operations. In two cases, though, I want to
> take over the mkdir and rmdir operations based on the actual directory
> name. 

For logging, could you just take one of the audit modules, change the
syslog facility and redirect that facility using syslog.conf?

> Instead of calling SMB_VFS_NEXT_MKDIR(), I want to make my own calls to
> make a directory on a different file system, create a symbolic link to
> that directory using the operation name, and then return success. I want
> rmdir to act the same way.
> 
> First, I hope you don't think this is insane :) Second, since this is a
> mix of opaque and transparent VFS types, which do I use? I'm guessing I
> can keep it as a logger.. But I wanted to make sure.

You want to make your rmdir and mkdir operations opaque because you are
providing an alternative implementation of the operation. If you made
them transparent and another module came along with it's own opaque
implementation, what would happen?

I would definitely separate your directory modifications into a
different module from your logging one.

-- 
James Peach | jpeach at samba.org



More information about the samba-technical mailing list