--- SPICE-0.12.7/server/reds_stream.c.pve 2015-10-06 15:09:16.000000000 +0000 +++ SPICE-0.12.7/server/reds_stream.c 2016-06-09 11:46:03.994007539 +0000 @@ -48,6 +48,18 @@ extern SpiceCoreInterface *core; #if HAVE_SASL #include +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); --- SPICE-0.12.7/server/spice-server.h.pve 2015-10-06 15:09:16.000000000 +0000 +++ SPICE-0.12.7/server/spice-server.h 2016-06-09 11:46:03.994007539 +0000 @@ -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, --- SPICE-0.12.7/server/spice-server.syms.pve 2015-10-06 15:09:16.000000000 +0000 +++ SPICE-0.12.7/server/spice-server.syms 2016-06-09 11:46:03.994007539 +0000 @@ -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;