2
0
mirror of git://git.proxmox.com/git/pve-libspice-server.git synced 2025-08-29 05:29:16 +00:00
pve-libspice-server/debian/patches/allow-to-set-sasl-callbacks.patch
Dietmar Maurer 4df07ad3cf update to 0.12.8
CVE-2015-3247 ,CVE-2015-5260 and CVE-2015-5261 are fixed upstream.
2016-07-14 08:07:13 +02:00

57 lines
2.0 KiB
Diff

Index: new/server/spice-server.syms
===================================================================
--- new.orig/server/spice-server.syms
+++ new/server/spice-server.syms
@@ -148,6 +148,7 @@ global:
SPICE_SERVER_0.12.5 {
global:
+ spice_server_set_sasl_callbacks;
spice_server_get_best_playback_rate;
spice_server_set_playback_rate;
spice_server_get_best_record_rate;
Index: new/server/spice-server.h
===================================================================
--- new.orig/server/spice-server.h
+++ new/server/spice-server.h
@@ -53,6 +53,7 @@ int spice_server_set_exit_on_disconnect(
int spice_server_set_noauth(SpiceServer *s);
int spice_server_set_sasl(SpiceServer *s, int enabled);
int spice_server_set_sasl_appname(SpiceServer *s, const char *appname);
+int spice_server_set_sasl_callbacks(SpiceServer *s, void *saslcb);
int spice_server_set_ticket(SpiceServer *s, const char *passwd, int lifetime,
int fail_if_connected, int disconnect_if_connected);
int spice_server_set_tls(SpiceServer *s, int port,
Index: new/server/reds_stream.c
===================================================================
--- new.orig/server/reds_stream.c
+++ new/server/reds_stream.c
@@ -48,6 +48,18 @@ extern SpiceCoreInterface *core;
#if HAVE_SASL
#include <sasl/sasl.h>
+static sasl_callback_t *sasl_callbacks = NULL;
+
+SPICE_GNUC_VISIBLE int spice_server_set_sasl_callbacks(SpiceServer *s, void *saslcb)
+{
+#if HAVE_SASL
+ sasl_callbacks = (sasl_callback_t *)saslcb;
+ return 0;
+#else
+ return -1;
+#endif
+}
+
typedef struct RedsSASL {
sasl_conn_t *conn;
@@ -976,7 +988,7 @@ bool reds_sasl_start_auth(RedsStream *st
NULL, /* User realm */
localAddr,
remoteAddr,
- NULL, /* Callbacks, not needed */
+ sasl_callbacks,
SASL_SUCCESS_DATA,
&sasl->conn);
free(localAddr);