Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-11851

openssh-askpass profile scripts set SSH_ASKPASS even when DISPLAY is not set

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • rhel-7.9, rhel-8.8.0, rhel-9.2.0.z
    • git
    • None
    • Low
    • rhel-base-utils-core
    • ssg_core_services
    • 5
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • All
    • None

      What were you trying to do that didn't work?

      The openssh-askpass profile scripts set SSH_ASKPASS unconditionally. This does not affect ssh because it checks if DISPLAY is set before executing the program specified in that environment variable. The git http/https helper, however, is does not check if DISPLAY is set, leading to undesirable error messages from gnome-ssh-askpass.

      Please provide the package NVR for which bug is seen:

      • openssh-askpass-7.4p1-23.el7_9.x86_64
      • openssh-askpass-8.0p1-19.el8_8.x86_64
      • openssh-askpass-8.7p1-30.el9_2.x86_64

      How reproducible:

      Always

      Steps to reproduce

      1. Install git and openssh-askpass.
      2. Log in on the text console or via SSH.
      3. Confirm that SSH_ASKPASS is set and try to clone a repository
      $ echo $SSH_ASKPASS
      /usr/libexec/openssh/gnome-ssh-askpass
      $ git clone https://github.com/casantos/test-private.git
      Cloning into 'test-private'...(gnome-ssh-askpass:2127): Gtk-WARNING **: 10:02:07.596: cannot open display: 
      error: unable to read askpass response from '/usr/libexec/openssh/gnome-ssh-askpass'
      Username for 'https://github.com': 

      Expected results

      The git command should ask for the user name and password immediately.

      Actual results

      Cloning into 'test-private'...(gnome-ssh-askpass:2127): Gtk-WARNING **: 10:02:07.596: cannot open display: 
      error: unable to read askpass response from '/usr/libexec/openssh/gnome-ssh-askpass'
      Username for 'https://github.com': 

              opohorel@redhat.com Ondrej Pohorelsky
              rhn-support-casantos Carlos Santos
              Ondrej Pohorelsky Ondrej Pohorelsky
              RHEL SST CS base utils QE Bot RHEL SST CS base utils QE Bot
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: