Merge pull request #1 from DonnchaC/master
Run perl script with UID to match EUID
This commit is contained in:
commit
dc1de69919
4
gpgit
4
gpgit
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue