[PLUG] NetWare & Linux?

Russell Evans russell-evans at uswest.net
Wed Apr 16 01:01:01 UTC 2003


I've not tried this with nfs or smb so I'm not sure it works with network
mounts. This would have definitely helped Rich when he deleted his /etc
directory. 

Thank you
Russell


http://www.m-arriaga.net/software/libtrash/


>From the README file in the tarball
-----------------------------------------
libtrash is a shared library which, when preloaded, will intercept
calls to a series of GNU libc functions and make sure that, if an
attempt to destroy certain files is made, these won't be permanently
destroyed but rather moved to a "trash can".  It also allows the user
to mark certain directories as "unremovable", which means that calls
to functions which would result in the loss of files under these
directories will always fail, leaving those files untouched in their
original locations.

(This last feature is meant as a higher-level substitute for ext2fs'
"immutable" flag for use by those of us who rely on other file
systems. An important difference is that libtrash allows
non-privileged users to use this with their personal files.)

The GNU libc functions which can be overriden/"wrapped" are

- unlink();
- rename();
- fopen() / fopen64();
- freopen() / freopen64();
- open() / open64().

You can individually enable / disable each of these "protections"; by
default, only calls to the first two functions are intercepted.


libtrash works with any GNU/Linux program, both at the console and
under XFree86, and operates independently of the programming language
the program was written in. The only exception are statically linked
programs, which you probably won't find.

So that calls to the different GNU libc functions are intercepted,
you must "preload" this library. This is can be done in two ways:
either edit /etc/ld.so.preload or set the LD_PRELOAD environmental
variable.


On Tue, 15 Apr 2003 15:52:47 -0700, Schlosser, Ryan said:

> Specific Netware feature(s) I'd like to see replicated elsewhere: 
>  
>  1)  Deleted file restore is awesome - don't have to go to tape to restore a
>  file, just browse out to the diretory, select salvage files, voila.  Saved
>  many man hours in many jobs for me.  You look the hero as the sysadmin, and
>  it's simply built into the Netware OS.  To get the same sort of thing for NT
>  or Unix requires buck$, from what I've seen.  If someone can show me similar
>  functionality, I'd be ecstatic to see it.
>  
>  2)  File permissions - It's so easy to modify permissions, restrict
>  permissions, etc.  No one else seems to have been able to make it so easy,
>  and yet advanced control features also.  (allow permissions to inherit or
>  restrict inheritance of permissions as you go down a folder)





More information about the PLUG mailing list