From 89b29b183967b517129d5095c145c5582af5b6bf Mon Sep 17 00:00:00 2001 From: Donncha O'Cearbhaill Date: Sun, 21 Jul 2013 01:29:58 +0100 Subject: [PATCH] Run perl script with UID to match EUID This helps avoid an error where GnuPG won't run if the uid does not match the euid returning error like "Error: secmem usage: 0/0 bytes in 0/0 blocks" --- gpgit | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gpgit b/gpgit index 55937b9..8e63293 100755 --- a/gpgit +++ b/gpgit @@ -58,6 +58,9 @@ use MIME::Parser; ## Set the home environment variable from the user running the script $ENV{HOME} = (getpwuid($>))[7]; +## Set the UID to match the EUID to prevent errors from GnuPG. + $< = $>; + ## Object for GPG encryption my $gpg = new Mail::GnuPG();