/usr/lib/x86_64-linux-gnu/fis-gtm/V6.3-000A_x86_64/plugin/gtmcrypt/pinentry-gtm.sh is in fis-gtm-6.3-000a 6.3-000A-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | #!/bin/sh
#################################################################
# #
# Copyright (c) 2010-2016 Fidelity National Information #
# Services, Inc. and/or its subsidiaries. All rights reserved. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
#############################################################################################
#
# pinentry-gtm.sh - This script is used as a "pinentry-program" in gpg-agent.conf.
# If the gtm_passwd environment variable exists and a usable mumps exists, run
# pinentry.m to get the passphrase from the environment variable.
#
#############################################################################################
dir=`dirname $0` ; if [ -z "$dir" ] ; then dir=$PWD ; fi
punt=1
if [ -z "$gtm_dist" ] ; then
# $gtm_dist is not set in the environment. See if we can use dirname to find one
if [ "`echo $gtm_chset | tr utf UTF`" = "UTF-8" -a -x "$dir/../../utf8/mumps" ] ; then
export gtm_dist=$dir/../../utf8
elif [ -x "$dir/../../mumps" ] ; then
export gtm_dist=$dir/../..
unset gtm_chset
fi
fi
if [ -n "$gtm_passwd" -a -x "$gtm_dist/mumps" ] ; then
pinentry=PINENTRY
# Password and MUMPS exists, perform some extended setup checks
if [ -z "$gtmroutines" ] ; then
utfodir=""
if [ "`echo $gtm_chset | tr utf UTF`" = "UTF-8" -a -x "$dir/../../utf8/mumps" ] ; then
utfodir="/utf8"
fi
# $gtmroutines is not set in the environment, attempt to pick it up from libgtmutil.so, $gtm_dist, $gtm_dist/plugin/o
if [ -e "$gtm_dist/libgtmutil.so" ] ; then
export gtmroutines="$gtm_dist/libgtmutil.so"
elif [ -e "$gtm_dist/PINENTRY.o" ] ; then
export gtmroutines="$gtm_dist"
elif [ -e "$gtm_dist/plugin/o${utfodir}/pinentry.o" ] ; then
pinentry=pinentry
export gtmroutines="$gtm_dist $gtm_dist/plugin/o${utfodir}"
fi
fi
# Validate gtmroutines. Redirect output or it will affect the password protocol
printf 'zhalt (0=$zlength($text(pinentry^'$pinentry')))' | gtm_local_collate= LD_PRELOAD= gtm_trace_gbl_name= gtmdbglvl= gtmcompile= $gtm_dist/mumps -direct >> /dev/null 2>&1
needsprivroutines=$?
if [ 0 -ne "${needsprivroutines}" ] ; then
pinentry=pinentry
# Need to create a temporary directory for object routines
if [ -x "`which mktemp 2>/dev/null`" ] ; then
tmpdir=`mktemp -d`
else
tmpdir=/tmp/`basename $0`_$$.tmp ; mkdir $tmpdir
fi
trapstr="rm -rf $tmpdir"
trap "$trapstr" HUP INT QUIT TERM TRAP
export gtmroutines="$tmpdir($dir $gtm_dist/plugin/gtmcrypt)"
fi
gtm_local_collate= LD_PRELOAD= gtm_trace_gbl_name= gtmdbglvl= gtmcompile= $gtm_dist/mumps -run $pinentry
punt=$?
if [ -d "$tmpdir" ] ; then rm -rf "$tmpdir" ; fi
fi
if [ 0 -ne $punt ] ;then
# Punt to the regular pinentry program
pinentry=`which pinentry 2>/dev/null`
if [ -x "$pinentry" ] ; then $pinentry $* ; else exit 1 ; fi
fi
|