]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/sasl.c
ITS#8215
[openldap] / servers / slapd / sasl.c
index 0e61a2d18896a53ed0d5386673014d2cbcacc184..a187d45dc498f9c7e68f99af667f9c8af2861b27 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2016 The OpenLDAP Foundation.
+ * Copyright 1998-2017 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -1498,7 +1498,7 @@ int slap_sasl_bind( Operation *op, SlapReply *rs )
        if ( !op->o_conn->c_sasl_bind_in_progress ) {
                /* If we already authenticated once, must use a new context */
                if ( op->o_conn->c_sasl_done ) {
-                       sasl_ssf_t ssf = 0;
+                       sasl_ssf_t *ssf = NULL;
                        const char *authid = NULL;
                        sasl_getprop( ctx, SASL_SSF_EXTERNAL, (void *)&ssf );
                        sasl_getprop( ctx, SASL_AUTH_EXTERNAL, (void *)&authid );
@@ -1511,7 +1511,7 @@ int slap_sasl_bind( Operation *op, SlapReply *rs )
                        slap_sasl_open( op->o_conn, 1 );
                        ctx = op->o_conn->c_sasl_authctx;
                        if ( authid ) {
-                               sasl_setprop( ctx, SASL_SSF_EXTERNAL, &ssf );
+                               sasl_setprop( ctx, SASL_SSF_EXTERNAL, ssf );
                                sasl_setprop( ctx, SASL_AUTH_EXTERNAL, authid );
                                ch_free( (char *)authid );
                        }