Mike Jumper created GUACAMOLE-927:
-------------------------------------

             Summary: RDP cannot be used if $HOME is unset
                 Key: GUACAMOLE-927
                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-927
             Project: Guacamole
          Issue Type: Bug
          Components: RDP
    Affects Versions: 1.1.0
            Reporter: Mike Jumper
             Fix For: 1.1.0


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:

# Create a fresh instance of Ubuntu 18.04
# 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}}
# Clone, build and install FreeRDP 2.0.0-rc4 from git:
## {{cmake .}}
## {{make}}
## {{sudo make install}}
## {{sudo ldconfig}}
# Clone, build, and install guacamole-server from the {{staging/1.1.0}} branch 
on git *installing the init.d script, not the systemd unit*:
## {{autoreconf -fi}}
## {{./configure --with-init-dir=/etc/init.d}}
## {{make}}
## {{sudo make install}}
## {{sudo ldconfig}}
# Enable guacd using systemd, thus automatically creating a unit which invokes 
the init script: {{sudo systemctl enable guacd}}
# Start guacd and use it with an instance of the Guacamole webapp to connect to 
an RDP server: {{sudo systemctl start guacd}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to