[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#961311: ssh-agent.service: cannot work without x11-common installed



Package: openssh-client
Version: 1:8.2p1-4
Severity: normal
File: /usr/lib/systemd/user/ssh-agent.service
Usertags: wayland

On pure-Wayland systems, the ssh-agent.service is not going to be able
to start because x11-common won't nessecarily be installed. I think
either the ConditionPathExists should get dropped and the script should
check if the Xsession.options file exists before using it, when it
doesn't exist people using Wayland without x11-common installed can just use `systemctl --user mask/enable/disable` to manage the service.

PS: shellcheck reports some issues for the agent-launch script.

$ systemctl --user cat ssh-agent.service 
# /usr/lib/systemd/user/ssh-agent.service
[Unit]
Description=OpenSSH Agent
Documentation=man:ssh-agent(1)
Before=graphical-session-pre.target
ConditionPathExists=/etc/X11/Xsession.options
Wants=dbus.socket
After=dbus.socket

[Service]
ExecStart=/usr/lib/openssh/agent-launch start
ExecStopPost=/usr/lib/openssh/agent-launch stop

$ dpkg -S /etc/X11/Xsession.options
x11-common: /etc/X11/Xsession.options

$ grep -A4 /etc/X11/Xsession.options /usr/lib/openssh/agent-launch
    if [ -z "$SSH_AUTH_SOCK" ] && grep -s -q '^use-ssh-agent$' /etc/X11/Xsession.options; then
        S="$XDG_RUNTIME_DIR/openssh_agent"
        dbus-update-activation-environment --verbose --systemd SSH_AUTH_SOCK=$S SSH_AGENT_LAUNCHER=openssh
        exec ssh-agent -D -a $S
    fi

$ shellcheck /usr/lib/openssh/agent-launch 

In /usr/lib/openssh/agent-launch line 6:
    echo 'This needs $XDG_RUNTIME_DIR to be set' >&2
         ^-- SC2016: Expressions don't expand in single quotes, use double quotes for that.


In /usr/lib/openssh/agent-launch line 13:
        dbus-update-activation-environment --verbose --systemd SSH_AUTH_SOCK=$S SSH_AGENT_LAUNCHER=openssh
                                                                             ^-- SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        dbus-update-activation-environment --verbose --systemd SSH_AUTH_SOCK="$S" SSH_AGENT_LAUNCHER=openssh


In /usr/lib/openssh/agent-launch line 14:
        exec ssh-agent -D -a $S
                             ^-- SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        exec ssh-agent -D -a "$S"

For more information:
  https://www.shellcheck.net/wiki/SC2016 -- Expressions don't expand in singl...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...


-- System Information:
Debian Release: bullseye/sid
  APT prefers testing-debug
  APT policy: (900, 'testing-debug'), (900, 'testing'), (800, 'unstable-debug'), (800, 'unstable'), (790, 'buildd-unstable'), (700, 'experimental-debug'), (700, 'experimental'), (690, 'buildd-experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.6.0-1-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8), LANGUAGE=en_AU:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages openssh-client depends on:
ii  adduser           3.118
ii  dpkg              1.19.7
ii  libc6             2.30-8
ii  libedit2          3.1-20191231-1
ii  libfido2-1        1.4.0-1
ii  libgssapi-krb5-2  1.17-7
ii  libselinux1       3.0-1+b3
ii  libssl1.1         1.1.1g-1
ii  passwd            1:4.8.1-1
ii  zlib1g            1:1.2.11.dfsg-2

Versions of packages openssh-client recommends:
ii  xauth  1:1.0.10-1

Versions of packages openssh-client suggests:
pn  keychain                         <none>
pn  libpam-ssh                       <none>
ii  monkeysphere                     0.43-3
ii  ssh-askpass-gnome [ssh-askpass]  1:8.2p1-4

-- no debconf information

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: