- fix "gpg-agent not restarted after kde session crash/killed (#196327)
This commit is contained in:
parent
c22bdac211
commit
59c6a38829
@ -12,7 +12,7 @@
|
|||||||
Summary: Utility for secure communication and data storage
|
Summary: Utility for secure communication and data storage
|
||||||
Name: gnupg2
|
Name: gnupg2
|
||||||
Version: 1.9.21
|
Version: 1.9.21
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
|
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
@ -163,6 +163,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jun 22 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.9.21-3
|
||||||
|
- fix "gpg-agent not restarted after kde session crash/killed (#196327)
|
||||||
|
|
||||||
* Thu Jun 22 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.9.21-2
|
* Thu Jun 22 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.9.21-2
|
||||||
- 1.9.21
|
- 1.9.21
|
||||||
- omit gpg2 binary to address CVS-2006-3082 (#196190)
|
- omit gpg2 binary to address CVS-2006-3082 (#196190)
|
||||||
|
@ -3,11 +3,21 @@
|
|||||||
GPG_AGENT=/usr/bin/gpg-agent
|
GPG_AGENT=/usr/bin/gpg-agent
|
||||||
## Run gpg-agent only if not already running, and available
|
## Run gpg-agent only if not already running, and available
|
||||||
if [ -z "${GPG_AGENT_INFO}" -a -x ${GPG_AGENT} ] ; then
|
if [ -z "${GPG_AGENT_INFO}" -a -x ${GPG_AGENT} ] ; then
|
||||||
|
|
||||||
|
# check validity of GPG_SOCKET (in case of session crash)
|
||||||
if [ -f ${HOME}/.gpg-agent-info ]; then
|
if [ -f ${HOME}/.gpg-agent-info ]; then
|
||||||
export GPG_AGENT_INFO=$(cat $HOME/.gpg-agent-info)
|
GPG_SOCKET=$(cat .gpg-agent-info |cut -f1 -d:)
|
||||||
|
if ! test -S ${GPG_SOCKET} -o ! test -O ${GPG_SOCKET} ; then
|
||||||
|
rm -f ${HOME}/.gpg-agent-info 2>&1 >/dev/null
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f ${HOME}/.gpg-agent-info ]; then
|
||||||
|
export GPG_AGENT_INFO=$(cat ${HOME}/.gpg-agent-info)
|
||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
else
|
else
|
||||||
eval "$(${GPG_AGENT} -s --daemon ${GPG_OPTIONS})"
|
eval "$(${GPG_AGENT} -s --daemon ${GPG_OPTIONS})"
|
||||||
echo $GPG_AGENT_INFO > $HOME/.gpg-agent-info
|
echo ${GPG_AGENT_INFO} > ${HOME}/.gpg-agent-info
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user