perl EUID change causing failure

Marcel Chastain - Security Administration mchastain at ipowerweb.com
Thu Jul 27 02:55:34 CEST 2006


I have a perl wrapper around gpg for use within our company's internal 
control panel. It changes its 'EUID' (Effective UserID) early in the 
script.
 From there, it attempts to run
/usr/local/bin/gpg --list-public-keys

My test script:
#!/usr/bin/perl
$ENV{'GNUPGHOME'} = '/home/username/.gnupg';
my $uid = getpwnam("username");
$> = $uid;
print `/usr/local/bin/gpg --list-public-keys`;

The output:
gpg: Ohhhh jeeee: ... this is a bug (gpg.c:1880:main)
secmem usage: 0/0 bytes in 0/0 blocks of pool 0/32768

(replace the word 'username' with a user on your system for testing 
purposes)
Now, this *only* happens when setting the EUID. I can set the RealUID 
and things work perfectly.

Running gnupg 1.4.4 compiled from ports, freebsd 4.11-STABLE .

-- 

#######################
Marcel C.
Security Administration
iPower, Inc.




More information about the Gnupg-devel mailing list