[launchd-dev] Directory Access launching?

Levi Brown levi at grokers.net
Tue Mar 4 14:53:42 PST 2008


Hello all,

I have an interesting situation which I thought I might be able to  
utilize launchd to help me solve, but I could use some expert advice.

The idea is pretty simple:

I use gnupg.  gnupg is used by services I use.  gnupg stores all its  
information in ~/.gnupg unless the gnupg executable is called with a  
flag to tell it to do otherwise.  Since I do not have control of how  
the executable is referenced by these services, the ~/.gnupg directory  
is my only choice.  Stored inside the ~/.gnupg directory is the public  
and private keys for signing, en/decrypting, configuration, etc. which  
is sensitive information and could easily be accessed should my  
machine be stolen, for instance.

I'd like to store the contents of this directory on an encrypted disk  
image which is automatically attached and detached based on need.  So,  
ideally, there would be a way to have a particular directory be  
monitored for access, and once accessed, a script could be called to  
mount the image.  After a period of inactivity to this path, the  
volume could be detached.

automount and autofs are intended to do this kind of operation for  
network volumes an even provide a executable map facility which gives  
one a hook into the need to mount a directory based on access, however  
this is "old school" unix compared to the launchd train of thought,  
and I've not been able to get a solution working with this approach.

Is there some configuration key like PathState, or NetworkState which  
could be used to achieve this goal?  Other suggestions?

Thanks,

Levi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2415 bytes
Desc: not available
Url : http://lists.macosforge.org/pipermail/launchd-dev/attachments/20080304/36bc01e0/attachment-0001.bin 


More information about the launchd-dev mailing list