Environment: Solaris 10
Command Executed:
weber@newServer> /usr/local/encrypt_file/encrypt_file.ksh /someLocation/test.out
Output:
gpg: Ohhhh jeeee: ... this is a bug (gpg.c:1917:main)
secmem usage: 0/0 bytes in 0/0 blocks of pool 0/32768
/usr/bin/ksh[55]: 758 Abort
Notes:
I ran this as user pgp, the file get encrypted correctly. But I get the above
output when I run it as user weber.
File/Directory Permissions:
-rwsr-xr-x 1 pgp web 1854 Jul 8 10:56
/usr/local/encrypt_file/encrypt_file.ksh*
drwxrwsr-x 2 weber web 3 Jul 7 16:44 /someLocation/
-rw-rw-r-- 1 weber web 12 Jul 2 10:29 /someLocation/test.out
encrypt_file.ksh Source:
#!/usr/bin/ksh
- Check that input argument has been supplied.
if $ then
return 99
fi
RETURN_CODE=0
FILE_NAME=$1
Set env variables used by PGP.
export PGPPATH=/usr/local/pgp/.pgp
export PGPPASS=cat /usr/local/pgp/.pgp/passwordFile
export GPG_COMMAND=/usr/local/bin/gpg
Execute PGP
$GPG_COMMAND --homedir $PGPPATH --keyring ${PGPPATH}/pubring.prod \
--always-trust --encrypt-to John -u John --passphrase $PGPPASS \
-r 0x11A1DB11 -se $FILE_NAME
exit $RETURN_CODE