Recycle-Bin/Trash-Can option?
Lawrence Hovind
lhovind at hovind.com
Mon Oct 2 04:53:17 GMT 2000
I've recently had a need to use a Trash-Can feature. ( A terminated
employee deleted a dozen files on their way out the door. Backups took
care of most of the problem, but I still see a long range need.)
Is there a feature, I can't find, that when a user on a Wins station
deletes a file, the file is moved to a "trash" directory where the admin
can restore it if necessary?
If not, I'll proceed on adding this to the code. From what I can tell so
far, I need to augment the "dos_unlink()" call in "doscalls.c" in the
"lib" directory. My basic approach is to replace the "unlink()" call
with a call that moves the file into a directory tree, under the share,
that would probably be called "trash". Then on a routine basis, run a
script that actually deletes "trash".
I'd appreciate any pointers to other parts of the code that need to be
changed. I'm only attempting to cover files and/or directories of
shares. I currently have no interest in spooling files, logs, pids or
other administrative stuff.
If someone is already working on this, please point me in that
direction.
Thanks in advance.
Larry
More information about the samba-technical
mailing list