Uploaded image for project: 'Guacamole'
  1. Guacamole
  2. GUACAMOLE-927

RDP cannot be used if $HOME is unset

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.1.0
    • 1.1.0
    • RDP
    • None

    Description

      FreeRDP 2.0.0 contains code which automatically attempts to read the user's home directory via the HOME environment variable, regardless of whether this value is actually needed (see freerdp_settings_new()). If the HOME environment variable is unset, this attempt fails, the overall FreeRDP initialization process is aborted, and any formerly allocated parts of the context are freed.

      For Guacamole, this means that attempts to connect using RDP will segfault if the HOME environment variable is unset for guacd, which can happen in practice depending on how guacd is started.

      To reproduce:

      1. Create a fresh instance of Ubuntu 18.04
      2. Install build dependencies of both FreeRDP and guacamole-server:
        • autoconf
        • automake
        • cmake
        • gcc
        • git
        • libavcodec-dev
        • libavutil-dev
        • libcairo2-dev
        • libcunit1-dev
        • libjpeg-turbo8-dev
        • libossp-uuid-dev
        • libpango1.0-dev
        • libpulse-dev
        • libssh2-1-dev
        • libssl-dev
        • libswscale-dev
        • libtelnet-dev
        • libtool
        • libvncserver-dev
        • libwebsockets-dev
        • libwebp-dev
        • libxcursor-dev
        • libxkbfile-dev
        • make
      3. Clone, build and install FreeRDP 2.0.0-rc4 from git:
        1. cmake .
        2. make
        3. sudo make install
        4. sudo ldconfig
      4. Clone, build, and install guacamole-server from the staging/1.1.0 branch on git installing the init.d script, not the systemd unit:
        1. autoreconf -fi
        2. ./configure --with-init-dir=/etc/init.d
        3. make
        4. sudo make install
        5. sudo ldconfig
      5. Enable guacd using systemd, thus automatically creating a unit which invokes the init script: sudo systemctl enable guacd
      6. Start guacd and use it with an instance of the Guacamole webapp to connect to an RDP server: sudo systemctl start guacd

      Attachments

        Issue Links

          Activity

            People

              mjumper Mike Jumper
              mjumper Mike Jumper
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: