From: Cameron Matheson <cam+sup@cammunism.org>
To: sup-talk <sup-talk@rubyforge.org>
Subject: Re: [sup-talk] sup leaves unencrypted emails in /tmp
Date: Sat, 04 Dec 2010 00:16:22 -0700 [thread overview]
Message-ID: <1291445874-sup-7444@cammunism.org> (raw)
In-Reply-To: <AANLkTikzfKZ9573c+NOiYA3UWjFhWpohhcGroS0Zz19F@mail.gmail.com>
Excerpts from Hamish D's message of Wed Dec 01 17:18:08 -0700 2010:
> I noticed that sup appears to leave the unencrypted contents of emails
> in /tmp - at least it did on my system. This is a pretty serious issue
> on shared computers. I'm not sure why - my attempts at a quick fix
> failed. The files are created using Tempfile.new and close is called,
> but after that the files are written to by gpg. I'm not sure if this
> means that the tempfile system then doesn't delete them later for some
> reason.
Tempfile is interesting because the file is not deleted until the object
is garbage-collected. From the Tempfile.close rdoc:
If you don't explicitly unlink the temporary file, the removal will
be delayed until the object is finalized.
So if I'm understanding this correctly, the tempfiles may or may not be
cleaned up, depending on when the garbage collector runs (e.g., if the
GC runs before gpg is run, the original tempfile will have already been
deleted, and the new file created by gpg will live on indefinitely).
I was going to write a patch, but I don't do anything use gpg often so
it wasn't convenient to test. I think an easy solution would just be to
add a 'File.unlink whatever.path' call after each call to gpg (this
would need to be done in encrypt/decrypt/sign/etc.).
Cam
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
prev parent reply other threads:[~2010-12-04 8:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-02 0:18 Hamish D
2010-12-04 7:16 ` Cameron Matheson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1291445874-sup-7444@cammunism.org \
--to=cam+sup@cammunism.org \
--cc=sup-talk@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox