apop_credentials_callback);
}
-static struct sasl_server_mech_request *mech_apop_auth_new(pool_t pool)
+static struct sasl_server_mech_request *
+mech_apop_auth_new(const struct sasl_server_mech *mech ATTR_UNUSED, pool_t pool)
{
struct apop_auth_request *request;
strlen(request->challenge));
}
-static struct sasl_server_mech_request *mech_cram_md5_auth_new(pool_t pool)
+static struct sasl_server_mech_request *
+mech_cram_md5_auth_new(const struct sasl_server_mech *mech ATTR_UNUSED,
+ pool_t pool)
{
struct cram_auth_request *request;
str_len(challenge));
}
-static struct sasl_server_mech_request *mech_digest_md5_auth_new(pool_t pool)
+static struct sasl_server_mech_request *
+mech_digest_md5_auth_new(const struct sasl_server_mech *mech ATTR_UNUSED,
+ pool_t pool)
{
struct digest_auth_request *request;
} while (message_context != 0);
}
-static struct sasl_server_mech_request *mech_gssapi_auth_new(pool_t pool)
+static struct sasl_server_mech_request *
+mech_gssapi_auth_new(const struct sasl_server_mech *mech ATTR_UNUSED,
+ pool_t pool)
{
struct gssapi_auth_request *request;
}
}
-static struct sasl_server_mech_request *mech_oauth2_auth_new(pool_t pool)
+static struct sasl_server_mech_request *
+mech_oauth2_auth_new(const struct sasl_server_mech *mech ATTR_UNUSED,
+ pool_t pool)
{
struct oauth2_auth_request *request;
mech_otp_auth_phase2(request, data, data_size);
}
-static struct sasl_server_mech_request *mech_otp_auth_new(pool_t pool)
+static struct sasl_server_mech_request *
+mech_otp_auth_new(const struct sasl_server_mech *mech ATTR_UNUSED, pool_t pool)
{
struct otp_auth_request *request;
}
struct sasl_server_mech_request *
-mech_scram_auth_new(pool_t pool, const struct hash_method *hash_method,
+mech_scram_auth_new(const struct sasl_server_mech *mech ATTR_UNUSED,
+ pool_t pool, const struct hash_method *hash_method,
const char *password_scheme)
{
struct scram_auth_request *request;
return &request->auth_request;
}
-static struct sasl_server_mech_request *mech_scram_sha1_auth_new(pool_t pool)
+static struct sasl_server_mech_request *
+mech_scram_sha1_auth_new(const struct sasl_server_mech *mech, pool_t pool)
{
- return mech_scram_auth_new(pool, &hash_method_sha1, "SCRAM-SHA-1");
+ return mech_scram_auth_new(
+ mech, pool, &hash_method_sha1, "SCRAM-SHA-1");
}
-static struct sasl_server_mech_request *mech_scram_sha256_auth_new(pool_t pool)
+static struct sasl_server_mech_request *
+mech_scram_sha256_auth_new(const struct sasl_server_mech *mech, pool_t pool)
{
- return mech_scram_auth_new(pool, &hash_method_sha256, "SCRAM-SHA-256");
+ return mech_scram_auth_new(
+ mech, pool, &hash_method_sha256, "SCRAM-SHA-256");
}
static void mech_scram_auth_free(struct sasl_server_mech_request *auth_request)
#define SASL_SERVER_MECH_SCRAM_H
struct sasl_server_mech_request *
-mech_scram_auth_new(pool_t pool, const struct hash_method *hash_method,
+mech_scram_auth_new(const struct sasl_server_mech *mech ATTR_UNUSED,
+ pool_t pool, const struct hash_method *hash_method,
const char *password_scheme);
void mech_scram_auth_continue(struct sasl_server_mech_request *auth_request,
const unsigned char *input, size_t input_len);
}
static struct sasl_server_mech_request *
-mech_winbind_ntlm_auth_new(pool_t pool)
+mech_winbind_ntlm_auth_new(const struct sasl_server_mech *mech ATTR_UNUSED,
+ pool_t pool)
{
return do_auth_new(pool, &winbind_ntlm_context);
}
static struct sasl_server_mech_request *
-mech_winbind_spnego_auth_new(pool_t pool)
+mech_winbind_spnego_auth_new(const struct sasl_server_mech *mech ATTR_UNUSED,
+ pool_t pool)
{
return do_auth_new(pool, &winbind_spnego_context);
}
const struct sasl_passdb_result *result);
struct sasl_server_mech_funcs {
- struct sasl_server_mech_request *(*auth_new)(pool_t pool);
+ struct sasl_server_mech_request *
+ (*auth_new)(const struct sasl_server_mech *mech, pool_t pool);
void (*auth_initial)(struct sasl_server_mech_request *req,
const unsigned char *data, size_t data_size);
void (*auth_continue)(struct sasl_server_mech_request *req,
struct sasl_server_mech_request *mreq;
if (mech->def->funcs->auth_new != NULL)
- mreq = mech->def->funcs->auth_new(pool);
+ mreq = mech->def->funcs->auth_new(mech, pool);
else
mreq = p_new(pool, struct sasl_server_mech_request, 1);
mreq->pool = pool;