Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Apr 2012 22:55:28 +0200 (CEST)
From:      Tijl Coosemans <tijl@coosemans.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/166803: [patch] sysutils/xfce4-utils: fix running/killing of gpg-agent
Message-ID:  <201204092055.q39KtSDg012062@kalimero.tijl.coosemans.org>
Resent-Message-ID: <201204092100.q39L0XF3090017@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204092055.q39KtSDg012062>