Michael Wyraz
2004-Jun-11 13:11 UTC
[Samba] (vfs) executing scripts when creating/deleting directories
Hi! I'm looking for a way to execute a shell script when a directory is created/deleted. I found samba-fu (http://acsys.anu.edu.au/~tpot/samba-fu/), a vfs module which can do this but it's very old (last updated 1999) and will not compile against a recent version of samba (2.2.x or 3.0.x). Is there a way to do this whith the actual samba? Did anybody wrote such a vfs module? The VFS tutorial sayed that this would be an advanced exercise but i don't habe enough knowledge in c/c++ to do it. The thing i'd like to do with the script is: * when creating a directory, the script should be executed * when the script finds, all conditions are fine, the directory should be created and the script should make som symlinks * when something is wrong, the user should be notified (is it possible with vfs to send a custom fail message? if not, i'll use winpopup) and the directory should not be created. * when deleting a directory the symlinks to it should be deleted The script is no problem at all. I hope, you can help me with the samba part of that problem. Thanks a lot, Michael.