VFS recycle bin

Juergen Hasch Hasch at t-online.de
Mon Feb 25 13:49:10 GMT 2002


Hi,

I converted Brandon Stone's recycle bin patch into a VFS module.
It seems to work, but it's not perfect. Don't use it on
production machines :-)

The recycle bin can be configured with the file /etc/samba/recycle_bin.conf:
[ recycle bin ]
name = .recycle
maxsize = 100000
exclude = .tmp.temp.o
excludedir = /tmp/temp/

It's hardcoded for now because vfs_option doesn't seem to be implemented.
You can set the name of the trashcan, the maximum file size being saved,
filename extensions and directories which shouldn't be saved.
In my case all *.tmp, *.temp and *.o files will get deleted directly.
Also files in /tmp and /temp get deleted directly.

I have a question to the VFS experts. When I try to use
the function default_vfs_ops.stat() smbd crashes, so I am
using stat() directly. Why is this, especially because I have a
simpler version of the recycle bin where it works ?

Also, can I use pm_process() to read my configuration file
(I do it right now) or is this "out of spec" ?

...Juergen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: recycle_bin.c
Type: text/x-csrc
Size: 7841 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20020225/8e4f7187/recycle_bin.bin


More information about the samba-technical mailing list