GUACAMOLE-1227: Build support for generic VNC credentials only if supported by libvncclient.
This commit is contained in:
parent
9df3e294c3
commit
d40db7cd3c
28
configure.ac
28
configure.ac
@ -572,6 +572,34 @@ then
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generic credential support within libVNCServer (authentication beyond
|
||||||
|
# basic, standard VNC passwords)
|
||||||
|
#
|
||||||
|
|
||||||
|
if test "x${have_libvncserver}" = "xyes"
|
||||||
|
then
|
||||||
|
|
||||||
|
have_vnc_creds=yes
|
||||||
|
AC_CHECK_MEMBERS([rfbClient.GetCredential],
|
||||||
|
[], [have_vnc_creds=no],
|
||||||
|
[[#include <rfb/rfbclient.h>]])
|
||||||
|
|
||||||
|
if test "x${have_vnc_creds}" = "xno"
|
||||||
|
then
|
||||||
|
AC_MSG_WARN([
|
||||||
|
--------------------------------------------
|
||||||
|
No generic credential support found in libvncclient.
|
||||||
|
VNC authentication support will be limited to passwords.
|
||||||
|
--------------------------------------------])
|
||||||
|
else
|
||||||
|
AC_DEFINE([ENABLE_VNC_GENERIC_CREDENTIALS],,
|
||||||
|
[Whether support for generic VNC credentials is available.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# FreeRDP 2 (libfreerdp2, libfreerdp-client2, and libwinpr2)
|
# FreeRDP 2 (libfreerdp2, libfreerdp-client2, and libwinpr2)
|
||||||
#
|
#
|
||||||
|
@ -63,6 +63,7 @@ char* guac_vnc_get_password(rfbClient* client) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_VNC_GENERIC_CREDENTIALS
|
||||||
rfbCredential* guac_vnc_get_credentials(rfbClient* client, int credentialType) {
|
rfbCredential* guac_vnc_get_credentials(rfbClient* client, int credentialType) {
|
||||||
|
|
||||||
guac_client* gc = rfbClientGetClientData(client, GUAC_VNC_CLIENT_KEY);
|
guac_client* gc = rfbClientGetClientData(client, GUAC_VNC_CLIENT_KEY);
|
||||||
@ -117,3 +118,4 @@ rfbCredential* guac_vnc_get_credentials(rfbClient* client, int credentialType) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
*/
|
*/
|
||||||
char* guac_vnc_get_password(rfbClient* client);
|
char* guac_vnc_get_password(rfbClient* client);
|
||||||
|
|
||||||
|
#ifdef ENABLE_VNC_GENERIC_CREDENTIALS
|
||||||
/**
|
/**
|
||||||
* Callback which is invoked by libVNCServer when it needs to read the user's
|
* Callback which is invoked by libVNCServer when it needs to read the user's
|
||||||
* VNC credentials. The credentials are stored in the connection settings,
|
* VNC credentials. The credentials are stored in the connection settings,
|
||||||
@ -55,6 +56,7 @@ char* guac_vnc_get_password(rfbClient* client);
|
|||||||
* The rfbCredential object that contains the required credentials.
|
* The rfbCredential object that contains the required credentials.
|
||||||
*/
|
*/
|
||||||
rfbCredential* guac_vnc_get_credentials(rfbClient* client, int credentialType);
|
rfbCredential* guac_vnc_get_credentials(rfbClient* client, int credentialType);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -154,8 +154,10 @@ rfbClient* guac_vnc_get_client(guac_client* client) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_VNC_GENERIC_CREDENTIALS
|
||||||
/* Authentication */
|
/* Authentication */
|
||||||
rfb_client->GetCredential = guac_vnc_get_credentials;
|
rfb_client->GetCredential = guac_vnc_get_credentials;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Password */
|
/* Password */
|
||||||
rfb_client->GetPassword = guac_vnc_get_password;
|
rfb_client->GetPassword = guac_vnc_get_password;
|
||||||
|
Loading…
Reference in New Issue
Block a user