Merge pull request #1 from DonnchaC/master

Run perl script with UID to match EUID
This commit is contained in:
Etienne Perot 2013-07-21 10:01:44 -07:00
commit dc1de69919
1 changed files with 4 additions and 0 deletions

4
gpgit
View File

@ -22,6 +22,7 @@
use strict;
use warnings;
use English;
use Mail::GnuPG;
use MIME::Parser;
@ -58,6 +59,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.
$REAL_USER_ID = $EFFECTIVE_USER_ID;
## Object for GPG encryption
my $gpg = new Mail::GnuPG();