Re: Auto-unmounting secure partitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2002-11-11 at 08:05, Mark Charsley wrote:
> I've got a encrypted partition set up under /secure. I'd like the 
> partition to be unmounted after no-ones used it for, say, 30 minutes. I'm 
> guessing that there are already tools available to do this, so in order of 
> preference, can people advise me

I've been thinking about this too. I think it would be better to have
the screen lock do the umounting, for reasons which may become clear.

> - which fstab/mount option to use
> - which command line tool to use
> - which command line tool will tell me whether any process has a file open 
> under /secure and/or /dev/hdb6 (so I can write a script to run under cron)

/sbin/fuser -m /secure will do the trick. What it will show, though, is
that all sorts of things end up holding files and directories open more
or less at random.

> - which API call to make in order to tell whether any process has a file 
> open under /secure and/or /dev/hdb6 (so I can write an executable to run 
> under cron)

For a workstation, I think it would be better that when the display is
locked, the filesystem is umounted. I've even got some scripts that do
it, except I don't know how to hook them into xscreensaver to make it do
it.

fuser also takes a -k option to cause it to kill all the processes using
the file(s), which I use before umounting.

	Stephen

-
Linux-crypto:  cryptography in and on the Linux system
Archive:       http://mail.nl.linux.org/linux-crypto/


[Index of Archives]     [Kernel]     [Linux Crypto]     [Gnu Crypto]     [Gnu Classpath]     [Netfilter]     [Bugtraq]
  Powered by Linux