1
0
mirror of https://github.com/moparisthebest/gpgit synced 2024-08-13 15:53:50 -04:00

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"
This commit is contained in:
Donncha O'Cearbhaill 2013-07-21 01:29:58 +01:00
parent 644eeb4959
commit 89b29b1839

3
gpgit
View File

@ -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();