ports/166803: [patch] sysutils/xfce4-utils: fix running/killing of gpg-agent

Tijl Coosemans tijl at coosemans.org
Mon Apr 9 21:00:33 UTC 2012


>Number:         166803
>Category:       ports
>Synopsis:       [patch] sysutils/xfce4-utils: fix running/killing of gpg-agent
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 09 21:00:32 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Tijl Coosemans
>Release:        FreeBSD 10.0-CURRENT i386
>Organization:
>Environment:
>Description:
Xfce xinitrc script runs gpg-agent when it is installed (security/gnupg),
but when the user uses csh as shell gpg-agent returns csh commands which
of course cannot be executed from an sh script like xinitrc.

The attached patch passes --sh to gpg-agent so it always returns sh
commands.
>How-To-Repeat:
Install security/gnupg and run startxfce4. You'll see errors about
setenv at startup and about kill at shutdown.
>Fix:
Patch to put in sysutils/xfce4-utils/files.

--- patch-scripts-xinitrc.in.in begins here ---
--- scripts/xinitrc.in.in.orig	2012-04-09 22:20:51.000000000 +0200
+++ scripts/xinitrc.in.in	2012-04-09 22:21:29.000000000 +0200
@@ -155,11 +155,11 @@
     case "$ssh_agent_type" in
         gpg-agent)
             if test -z "$SSH_AGENT_PID"; then
-                eval `gpg-agent --daemon --enable-ssh-support --write-env-file $XDG_CACHE_HOME/gpg-agent-info`
+                eval `gpg-agent --sh --daemon --enable-ssh-support --write-env-file $XDG_CACHE_HOME/gpg-agent-info`
                 ssh_agent_kill_cmd="kill -INT $SSH_AGENT_PID; rm -f $XDG_CACHE_HOME/gpg-agent-info"
             elif test -z "$GPG_AGENT_INFO"; then
                 echo "ssh-agent is already running; starting gpg-agent without ssh support"
-                eval `gpg-agent --daemon --write-env-file $XDG_CACHE_HOME/gpg-agent-info`
+                eval `gpg-agent --sh --daemon --write-env-file $XDG_CACHE_HOME/gpg-agent-info`
                 ssh_agent_kill_cmd="pkill -INT ^gpg-agent\$; rm -f $XDG_CACHE_HOME/gpg-agent-info"
             else
                 echo "gpg-agent is already running"
--- patch-scripts-xinitrc.in.in ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list