using secure memory from a script
Chuck Swiger
cswiger at mac.com
Fri Feb 26 00:22:44 UTC 2010
On Feb 19, 2010, at 3:59 PM, Chad Perrin wrote:
> What's the simplest/easiest way to use "secure memory" (i.e., memory that
> won't be written to a swap partition) from within a program (written in
> Ruby in this case) on FreeBSD?
Well, Ruby supports calling C functions, so you can invoke mlock() that way:
http://onlamp.com/pub/a/onlamp/2004/11/18/extending_ruby.html
...but you also have to do so as root. It might be more sane to setup encrypted swapping:
http://www.freebsd.org/doc/handbook/swap-encrypting.html
Regards,
--
-Chuck
More information about the freebsd-questions
mailing list