Hello community, here is the log from the commit of package xdm for openSUSE:Factory checked in at 2014-10-11 19:25:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xdm (Old) and /work/SRC/openSUSE:Factory/.xdm.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xdm" Changes: -------- --- /work/SRC/openSUSE:Factory/xdm/xdm.changes 2014-10-05 20:30:28.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.xdm.new/xdm.changes 2014-10-11 19:25:54.000000000 +0200 @@ -1,0 +2,6 @@ +Wed Oct 8 10:15:03 UTC 2014 - wer...@suse.de + +- Use the option (--)enable-ssh-support of the gpg-agent if the + user has configured this (boo#899647) + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xdm.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/etc/X11/xdm/sys.xsession new/etc/X11/xdm/sys.xsession --- old/etc/X11/xdm/sys.xsession 2014-05-14 19:46:27.000000000 +0200 +++ new/etc/X11/xdm/sys.xsession 2014-10-08 11:42:23.000000000 +0200 @@ -7,6 +7,7 @@ # # If ssh is configured and ssh-agent is wanted set "yes" +# or gpg-agent *with* ssh support is wanted set "gpg" # usessh=yes @@ -16,6 +17,26 @@ usegpg=yes # +# Use the file ~/.myagents to overide the defaults +# and if this does not exist check for enable-ssh-support +# in ~/.gnupg/gpg-agent.conf +# +# Be warned: If usessh=gpg is used then read the manual +# page gpg-agent below the option --enable-ssh-support +# and do not forget to use +# +# gpg-connect-agent /bye +# +# as otherwise no of the commands ssh/slogin/scp will +# work! +# +if test -s "$HOME/.myagents" ; then + eval $(grep -E '^use.*=.*' "$HOME/.myagents") +else + grep -Eq '^enable-ssh-support' "$HOME/.gnupg/gpg-agent.conf" && usessh=gpg +fi + +# # What we do if we fail at least ... emergency fall back. # failsafe="xterm -ls -T Failsafe -n Failsafe -bg purple -fg white -geometry 80x24+0+0" @@ -49,15 +70,6 @@ set -- # -# No ssh-agent if a ssh session is already provided by an other agent. -# -if test "$usessh" = yes -a -n "$GNOME_KEYRING_PID" ; then - if test -S "$GNOME_KEYRING_SOCKET" -o -d "$GNOME_KEYRING_CONTROL"; then - usessh=no - fi -fi - -# # No gpg-agent if a gpg session is already provided by an other agent. # if test "$usegpg" = yes -a -n "$GNOME_KEYRING_PID" ; then @@ -82,6 +94,66 @@ fi # +# No ssh-agent if a ssh session is already provided by an other agent. +# +if test "$usessh" = yes -a -n "$GNOME_KEYRING_PID" ; then + if test -S "$GNOME_KEYRING_SOCKET" -o -d "$GNOME_KEYRING_CONTROL"; then + usessh=no + fi +fi + +# +# Run gpg-agent only if gpg service is configured and avaliable. +# Check if there is already a running gpg-agent and if use this. +# +if test "$usegpg" = yes -a -d "$HOME/.gnupg" && gpgagent=$(type -p gpg-agent) ; then + GPG_AGENT_FILE="$HOME/.gnupg/agent.info" + found=no + + for GPG_AGENT_FILE in "$HOME/.gnupg/agent.info" \ + "$HOME/.gnupg/agent.info-${HOSTNAME:-$(hostname -f)}:${DISPLAY#*:}" + do + test -s "$gpg_agent" && . "$gpg_agent" + if test -n "$GPG_AGENT_INFO" ; then + GPG_AGENT_PID=${GPG_AGENT_INFO#*:} + GPG_AGENT_PID=${GPG_AGENT_PID%%:*} + if test -n "$GPG_AGENT_PID" && checkproc -p $GPG_AGENT_PID $gpgagent ; then + found=yes + break + fi + fi + done + + if test "$found" = yes ; then + export GPG_AGENT_INFO + if test -n "$SSH_AUTH_SOCK" -a "$usessh" = yes ; then + export SSH_AUTH_SOCK + fi + else + unset GPG_AGENT_INFO + if test -n "$SSH_AUTH_SOCK" -a "$usessh" != yes ; then + unset SSH_AUTH_SOCK + fi + fi + + if test -z "$GPG_AGENT_INFO" ; then + if test "$usessh" = gpg -a -z "$SSH_AUTH_SOCK" ; then + set -- $gpgagent --sh --daemon --enable-ssh-support --keep-display --write-env-file "$GPG_AGENT_FILE" ${1+"$@"} + if test -x /usr/lib/ssh/ssh-askpass ; then + SSH_ASKPASS=/usr/lib/ssh/ssh-askpass + export SSH_ASKPASS + elif test -x /usr/lib64/ssh/ssh-askpass ; then + SSH_ASKPASS=/usr/lib64/ssh/ssh-askpass + export SSH_ASKPASS + fi + usessh=no + else + set -- $gpgagent --sh --daemon --keep-display --write-env-file "$GPG_AGENT_FILE" ${1+"$@"} + fi + fi +fi + +# # Run ssh-agent only if ssh service is configured and avaliable. # Check if there is already a running ssh-agent and if use this. # @@ -114,29 +186,6 @@ fi # -# Run gpg-agent only if gpg service is configured and avaliable. -# Check if there is already a running gpg-agent and if use this. -# -if test "$usegpg" = yes -a -d "$HOME/.gnupg" && gpgagent=$(type -p gpg-agent) ; then - GPG_AGENT_FILE="$HOME/.gnupg/agent.info" - test -s "$GPG_AGENT_FILE" && . "$GPG_AGENT_FILE" - - if test -n "$GPG_AGENT_INFO" ; then - GPG_AGENT_PID=${GPG_AGENT_INFO#*:} - GPG_AGENT_PID=${GPG_AGENT_PID%%:*} - if test -n "$GPG_AGENT_PID" && checkproc -p $GPG_AGENT_PID $gpgagent ; then - export GPG_AGENT_INFO - else - unset GPG_AGENT_INFO - fi - fi - - if test -z "$GPG_AGENT_INFO" ; then - set -- $gpgagent --sh --daemon --write-env-file "$GPG_AGENT_FILE" ${1+"$@"} - fi -fi - -# # Check if a dbus is required for e.g. plain xdm sessions # if test -S "$XDG_RUNTIME_DIR/bus" ; then @@ -185,7 +234,7 @@ unset mid guid suid dadd # No dbus-daemon then launch a new session if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then - set -- $dbuslaunch --sh-syntax --close-stderr --exit-with-session ${1+"$@"} + set -- $dbuslaunch --sh-syntax --exit-with-session ${1+"$@"} fi unset dbuslaunch dbusdaemon fi -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org