summaryrefslogtreecommitdiffstats
path: root/daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c
diff options
context:
space:
mode:
authorNathaniel McCallum <npmccallum@redhat.com>2014-11-10 20:58:20 -0500
committerMartin Kosek <mkosek@redhat.com>2014-12-03 08:48:56 +0100
commitbdccb0c721283f17a48423ab562ab5515ecd7f8e (patch)
tree9c6777b366777120ef5ec186b797e4d2094e4467 /daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c
parentfaec4ef9de431a1b72423be8ce6cea28a7221531 (diff)
downloadfreeipa-bdccb0c721283f17a48423ab562ab5515ecd7f8e.tar.gz
freeipa-bdccb0c721283f17a48423ab562ab5515ecd7f8e.tar.xz
freeipa-bdccb0c721283f17a48423ab562ab5515ecd7f8e.zip
Preliminary refactoring of libotp files
There are no major changes in this commit other than changing filenames and symbols to have consistent namespaces. This prepares for larger changes to come in subsequent commits. Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
Diffstat (limited to 'daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c')
-rw-r--r--daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c b/daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c
index 1f595d01d..1dff6db1a 100644
--- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c
+++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c
@@ -1140,11 +1140,11 @@ done:
static bool ipapwd_do_otp_auth(const char *dn, Slapi_Entry *bind_entry,
struct berval *creds)
{
- struct otptoken **tokens = NULL;
+ struct otp_token **tokens = NULL;
bool success = false;
/* Find all of the user's active tokens. */
- tokens = otptoken_find(ipapwd_plugin_id, dn, NULL, true, NULL);
+ tokens = otp_token_find(ipapwd_plugin_id, dn, NULL, true, NULL);
if (tokens == NULL) {
slapi_log_error(SLAPI_LOG_FATAL, IPAPWD_PLUGIN_NAME,
"%s: can't find tokens for '%s'.\n", __func__, dn);
@@ -1157,12 +1157,12 @@ static bool ipapwd_do_otp_auth(const char *dn, Slapi_Entry *bind_entry,
/* Loop through each token. */
for (int i = 0; tokens[i] && !success; i++) {
/* Attempt authentication. */
- success = otptoken_validate_berval(tokens[i], OTP_VALIDATE_STEPS,
+ success = otp_token_validate_berval(tokens[i], OTP_VALIDATE_STEPS,
creds, true);
/* Truncate the password to remove the OTP code at the end. */
if (success) {
- creds->bv_len -= otptoken_get_digits(tokens[i]);
+ creds->bv_len -= otp_token_get_digits(tokens[i]);
creds->bv_val[creds->bv_len] = '\0';
}
@@ -1170,10 +1170,10 @@ static bool ipapwd_do_otp_auth(const char *dn, Slapi_Entry *bind_entry,
"%s: token authentication %s "
"(user: '%s', token: '%s\').\n", __func__,
success ? "succeeded" : "failed", dn,
- slapi_sdn_get_ndn(otptoken_get_sdn(tokens[i])));
+ slapi_sdn_get_ndn(otp_token_get_sdn(tokens[i])));
}
- otptoken_free_array(tokens);
+ otp_token_free_array(tokens);
return success;
}