]> git.sur5r.net Git - openldap/commitdiff
ITS#3864 use sasl_ssf_t where expected
authorHoward Chu <hyc@openldap.org>
Sat, 6 Oct 2007 14:55:53 +0000 (14:55 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 6 Oct 2007 14:55:53 +0000 (14:55 +0000)
libraries/libldap/cyrus.c

index 5e413c2451873f12ecf5d7fa0441752940a3a4ba..ecde2e5c774d8a386808f8f70c4a455cdb1369a1 100644 (file)
@@ -899,6 +899,8 @@ ldap_int_sasl_external(
        sasl_conn_t *ctx;
 #if SASL_VERSION_MAJOR < 2
        sasl_external_properties_t extprops;
+#else
+       sasl_ssf_t sasl_ssf = ssf;
 #endif
 
        ctx = conn->lconn_sasl_authctx;
@@ -908,7 +910,7 @@ ldap_int_sasl_external(
        }
    
 #if SASL_VERSION_MAJOR >= 2
-       sc = sasl_setprop( ctx, SASL_SSF_EXTERNAL, &ssf );
+       sc = sasl_setprop( ctx, SASL_SSF_EXTERNAL, &sasl_ssf );
        if ( sc == SASL_OK )
                sc = sasl_setprop( ctx, SASL_AUTH_EXTERNAL, authid );
 #else
@@ -1206,6 +1208,8 @@ ldap_int_sasl_set_option( LDAP *ld, int option, void *arg )
                int sc;
 #if SASL_VERSION_MAJOR < 2
                sasl_external_properties_t extprops;
+#else
+               sasl_ssf_t sasl_ssf;
 #endif
                sasl_conn_t *ctx;
 
@@ -1220,7 +1224,8 @@ ldap_int_sasl_set_option( LDAP *ld, int option, void *arg )
                }
 
 #if SASL_VERSION_MAJOR >= 2
-               sc = sasl_setprop( ctx, SASL_SSF_EXTERNAL, arg);
+               sasl_ssf = * (ber_len_t *)arg;
+               sc = sasl_setprop( ctx, SASL_SSF_EXTERNAL, &sasl_ssf);
 #else
                memset(&extprops, 0L, sizeof(extprops));