git clone https://orangeshoelaces.net/git/tttm.git
Author: Vasily Kolobkov on 06/03/2016
Committer: Vasily Kolobkov on 06/03/2016
Wipe credentials off of environment after use
tttm.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tttm.c b/tttm.c
index 402be3d..3e4029a 100644
--- a/tttm.c
+++ b/tttm.c
@@ -87,6 +87,11 @@ main(int argc, char **argv)
}
select:
+ if (unsetenv(userkey) == -1 || unsetenv(passkey) == -1) {
+ warn("failed to wipe credentials off of environment");
+ goto logout;
+ }
+
if ((e = imap_select(&con, "inbox"))) {
fin(&con, e, "failed to select mailbox");
}