What about tmpfs ?
[0:16] zozo@q 1002 ~% grep tmp /etc/fstab
tmpfs /tmp tmpfs rw,mode=1777 0 0
[0:16] zozo@q 1003 ~% df -h /tmp
Filesystem Size Used Avail Capacity Mounted on
tmpfs 2.9G 12K 2.9G 0% /tmp
>
> --
> Simon L. Nielsen
> _______________________________________________
> freebsd...@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-curre...@freebsd.org"
>
--
Olivier Smedts _
ASCII ribbon campaign ( )
e-mail: oli...@gid0.org - against HTML email & vCards X
www: http://www.gid0.org - against proprietary attachments / \
"Il y a seulement 10 sortes de gens dans le monde :
ceux qui comprennent le binaire,
et ceux qui ne le comprennent pas."
_______________________________________________
freebsd...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-curre...@freebsd.org"
but tmpfs pages are swappable IIRC. This would mean that the data might end
up unencrypted on secondary storage.
--
Max
Not if the swap is encrypted (as it is in the case of the OP).
> I never looked at tmpfs, as I heard that it isn't really stable yet.
>
I've been using it for months without any problems. But I have lots of
memory and swap.
---
Gary Jennejohn
Both good ideas, but not always an adequate solution: on at least some
of the systems where I use an encrypted /tmp, the data usually occupy
more space on that filesystem than would fit in RAM.
This is a simple patch, and merely an extension of an idea that is
already for swap partitions. Perhaps someone could commit it?
--
Shaun Amott // PGP: 0x6B387A9A
"A foolish consistency is the hobgoblin
of little minds." - Ralph Waldo Emerson
You can create one time passwords on boot and let rc.d scripts clean old
staff:
# pefs mount /tmp /tmp
# dd if=/dev/random bs=16 count=1 | pefs addkey -pv -k - /tmp
I use it to encrypt my home directory for some time already, works
pretty good. It also works on top of tmpfs, if anybody needs it :)
More info: http://gleb.blog.com/tag/pefs/
Recent sources on github: http://github.com/glk/pefs
> While I was looking for a solution, I stumbled upon a patch
> (conf/102700, link below) from 2006 by Shaun Amott (CC'ed) that
> adds support for exactly this kind of encryption. Is there a reason
> why this patch has not made it into the base system yet? I think it
> would be a valuable addition to FreeBSD in regard to security. In
> that context it may be even better to enhance the patch to not only
> support onetime encryption for /tmp, but any kind of file system,
> which a user may specify via fstab. Then, however, the issue of how
> to exactly distinguish between onetime and normal encryption in
> fstab needs to be solved.
>
> Is there maybe another way to achieve onetime /tmp encryption that
> I am missing? Preferably one that does not involve huge changes to
> the default config files to minimize the time spent mergmaster-ing
> these files during an update. This last point is basically what keeps
> me from applying conf/102700 locally or implementing my own solution.
>
>
> Kind regards,
> Daniel
Either my understanding of the FreeBSD VM is wrong, or you fail to
realize that tmpmfs will be swap-backed, so that disk usage is the same
in both scenarios (but more flexible for the tmpfs).
What I'm saying is that you lose almost nothing of physical RAM if you
set tmpsize=1G and increase your swap accordingly. Once you fill /tmp
with 1G, you will eventually use 1G swap. (medium oversimplification).
Regards,
Uli
> Since the tmpmfs option does not scale well with growing /tmp space
> requirements (at least not in a cost-effective way), I am keen to know
> why the patch I dug up in my first mail has never been committed. Was it
> solely a lack of interest or time, or have there been other reasons?
There is no discussion in the audit trail, so I think it's most likely
no committer ever looked that much at it.
I took a brief look, and at the very least the patch is missing an
update to the rc.conf manual page. I'm not entirely convinced the way
the patch goes about creating the devices etc. is the best way to do
it, but I don't see any obvious problems.
That said, personally I unfortunately have too many other things on my
plate to commit the patch.
--
Simon L. Nielsen