Daniel William Schultz
2001-Nov-10 09:19 UTC
Patch for events like "On Create", "On Modify"...
Hi all :) I have spent my night thinking about one problem that my company asked me to solve, and I come to the conclusion that is a little bit easy to do ( I guess... ). The problem with the Recycle bin was solved with the patches that Brandon made ( http://www.amherst.edu/~bbstone/howto/samba.html )...the recycle bin is working fine :) Lets see: The files go to the bin on a kind of "On delete" event ? Why don't create one patch for "On Create/Modify" event ? We could use it for checking viruses "on the fly", dont you think ? I was looking in the subdirs of the samba source, and I found one audit.c , on examples/VFS...it looks like a kind of logging on create/modify/delete/chmod files and create/delete/rename directories. Looking by this side, we could change the audit.c, and instead of logging this actions, it could exec one command like: "/usr/local/av/uvscan --parameters... %var" I really don't know how to do this ( In fact I'm trying to find some docs about C to see if I find the parameter needed to change the audit.c to execute other command ), and I will try to learn a bit of C to change, but I don't know if I will make it... So, the idea is released...my boss is asking every day for this, and I don't know another way to make things easier to work with one antivirus :/ Thanks to Brandon for the Recycle Bin patches, thank you all for the attention. Daniel William Schultz.
Michael Heironimus
2001-Nov-10 11:17 UTC
Patch for events like "On Create", "On Modify"...
On Sat, Nov 10, 2001 at 03:21:17PM -0200, Daniel William Schultz wrote:> Why don't create one patch for "On Create/Modify" event ? We could use it > for checking viruses "on the fly", dont you think ?I haven't tried this module so I can't personally vouch for its function (I can't even say if it compiles with the current release of samba), but if you do a web search on "samba-fu" you should find a few references to samba-fu 0.1. This is a VFS module that pretty much does what you're looking for - it allows you to specify an arbitrary command to be run on the successful completion of a number of actions. If you need a delaying action for your boss you might point out that on a busy server scanning every file will generate a great deal of overhead and may slow it down unacceptably. While I'm very much in favor of doing virus scans of Samba shares, an automatic nightly full scan plus the occasional manual scan if you have a virus outbreak might be a better policy. That combined with a well-thought-out antivirus policy on the desktop side should take care of most of your problems. -- Michael Heironimus
I am a windows guy, so tell me to shut up if you want. Under Windows, the recycle bin is driven by the shell (explorer.exe). This means that when you delete a file, explorer simply renames the file to the recycle bin location, updates an index and returns. No file system delete type calls are sent.
do you try with the samba-vscan provided from www.openantivirus.org?? i just trying with it.... any succes will be great! ----- Original Message ----- From: "Daniel William Schultz" <danws@terra.com.br> To: <bbstone@amherst.edu> Cc: <samba@lists.samba.org>; <samba-ntdom@lists.samba.org> Sent: Saturday, November 10, 2001 2:21 PM Subject: Patch for events like "On Create", "On Modify"...> Hi all :) > > I have spent my night thinking about one problem that my company asked meto solve, and I come to the conclusion that is a little> bit easy to do ( I guess... ). > The problem with the Recycle bin was solved with the patches that Brandonmade ( http://www.amherst.edu/~bbstone/howto/samba.html )...the recycle bin is working fine :)> Lets see: The files go to the bin on a kind of "On delete" event ? > Why don't create one patch for "On Create/Modify" event ? We could use itfor checking viruses "on the fly", dont you think ?> > I was looking in the subdirs of the samba source, and I found one audit.c, on examples/VFS...it looks like a kind of> logging on create/modify/delete/chmod files and create/delete/renamedirectories.> > Looking by this side, we could change the audit.c, and instead of loggingthis actions, it could exec one command like:> > "/usr/local/av/uvscan --parameters... %var" > > I really don't know how to do this ( In fact I'm trying to find some docsabout C to see if I find the parameter needed to change the audit.c to execute other command ), and I will try to learn a bit of C to change, but I don't know if I will make it...> > So, the idea is released...my boss is asking every day for this, and Idon't know another way to make things easier to work> with one antivirus :/ > > Thanks to Brandon for the Recycle Bin patches, thank you all for theattention.> > > Daniel William Schultz. > > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba >