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

Sean Dunn sean at troublemakerstudios.com
Tue Sep 20 20:12:32 GMT 2005


I see your point of splitting up the modules and will do that.. I just
didn't know if I could mix layer types or not. It makes sense now.

Thanks!
Sean


-----Original Message-----
From: James Peach [mailto:jpeach at samba.org] 
Sent: Monday, September 19, 2005 10:16 PM
To: Sean Dunn
Cc: samba-technical at lists.samba.org
Subject: Re: which VFS type should I use? (opaque, transparent,
logger,etc.)

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