]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9437 - Fix slapo-otp overlay name
authorQuanah Gibson-Mount <quanah@openldap.org>
Wed, 31 Mar 2021 20:05:15 +0000 (20:05 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Wed, 31 Mar 2021 23:12:00 +0000 (23:12 +0000)
configure.ac
doc/man/man5/slapd.overlays.5
doc/man/man5/slapo-otp.5 [moved from doc/man/man5/slapo-otp_2fa.5 with 93% similarity]
servers/slapd/overlays/Makefile.in
servers/slapd/overlays/otp.c [moved from servers/slapd/overlays/otp_2fa.c with 99% similarity]
tests/data/otp/hotp.ldif [moved from tests/data/otp_2fa/hotp.ldif with 100% similarity]
tests/data/otp/test001-out.ldif [moved from tests/data/otp_2fa/test001-out.ldif with 100% similarity]
tests/data/otp/totp.ldif [moved from tests/data/otp_2fa/totp.ldif with 100% similarity]
tests/scripts/test080-hotp
tests/scripts/test081-totp

index cb94e150cc1752a054d79dfc320d0eb5d72b60ae..a545ae148edaeafb3d6f01abc680232bf8e85afb 100644 (file)
@@ -2880,10 +2880,10 @@ if test "$ol_enable_otp" != no ; then
        BUILD_OTP=$ol_enable_otp
        if test "$ol_enable_otp" = mod ; then
                MFLAG=SLAPD_MOD_DYNAMIC
-               SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS otp_2fa.la"
+               SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS otp.la"
        else
                MFLAG=SLAPD_MOD_STATIC
-               SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS otp_2fa.o"
+               SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS otp.o"
        fi
        AC_DEFINE_UNQUOTED(SLAPD_OVER_OTP,$MFLAG,[define for OTP 2-factor Authentication overlay])
 fi
index db05c9adf63509cf3fb79da9af0e526d2aefa953..b560060ad3eeab0fecd48f32679cd27b5a1732de 100644 (file)
@@ -85,11 +85,11 @@ This overlay maintains automatic reverse group membership values,
 typically stored in an attribute called memberOf. This overlay
 is deprecated and should be replaced with dynlist.
 .TP
-.B otp_2fa
-Two factor authentication module.
+.B otp
+OATH One-Time Password module.
 This module allows time-based one-time password, AKA "authenticator-style",
-and HMAC-based one-time password authentication to be used in applications
-that use LDAP for authentication.
+and HMAC-based one-time password authentication to be used in conjunction
+with a standard LDAP password for two factor authentication.
 .TP
 .B pbind
 Proxybind.
similarity index 93%
rename from doc/man/man5/slapo-otp_2fa.5
rename to doc/man/man5/slapo-otp.5
index 1ec7cdf22569ec3012f82371caefb91fab87b47f..663bdebdd09dd3b644eaf653126fba2160ea0ade 100644 (file)
@@ -1,20 +1,19 @@
-.TH PW-TOTP 5 "2018/6/29" "SLAPO-OTP_2FA"
+.TH SLAPO_OTP 5 "2018/6/29" "SLAPO-OTP"
 .\" Copyright 2015-2021 The OpenLDAP Foundation.
 .\" Portions Copyright 2015 by Howard Chu, Symas Corp. All rights reserved.
 .\" Portions Copyright 2018 by Ondřej Kuzník, Symas Corp. All rights reserved.
 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
 .SH NAME
-slapo-otp_2fa \- Two factor authentication module
+slapo-otp \- OATH One-Time Password module
 .SH SYNOPSIS
 .B moduleload
-.I otp_2fa.la
+.I otp.la
 .SH DESCRIPTION
 The
-.B otp_2fa
+.B otp
 module allows time-based one-time password, AKA "authenticator-style", and
-HMAC-based one-time password authentication to be used in applications that use
-LDAP for authentication. In most cases no changes to the applications are
-needed to switch to this type of authentication.
+HMAC-based one-time password authentication to be used in conjunction with
+a standard LDAP password for two-factor authentication.
 
 With this module, users would use their password, followed with the one-time
 password in the password prompt to authenticate.
index d71f7c3d7a6f894a3579512fad14513b2f7fbefd..b84bc54262f97f3ed85196be7c2bcbd9a3038ee4 100644 (file)
@@ -24,7 +24,7 @@ SRCS = overlays.c \
        dynlist.c \
        homedir.c \
        memberof.c \
-       otp_2fa.c \
+       otp.c \
        pcache.c \
        collect.c \
        ppolicy.c \
@@ -96,8 +96,8 @@ homedir.la : homedir.lo
 memberof.la : memberof.lo
        $(LTLINK_MOD) -module -o $@ memberof.lo version.lo $(LINK_LIBS)
 
-otp_2fa.la : otp_2fa.lo
-       $(LTLINK_MOD) -module -o $@ otp_2fa.lo version.lo $(LINK_LIBS)
+otp.la : otp.lo
+       $(LTLINK_MOD) -module -o $@ otp.lo version.lo $(LINK_LIBS)
 
 pcache.la : pcache.lo
        $(LTLINK_MOD) -module -o $@ pcache.lo version.lo $(LINK_LIBS)
similarity index 99%
rename from servers/slapd/overlays/otp_2fa.c
rename to servers/slapd/overlays/otp.c
index 4aaca990044a32bce8ea2e97b7acc33fdea82984..755f6829d7f950dc3085b4d3d5c7b4b18dbec336 100644 (file)
@@ -1,4 +1,4 @@
-/* otp_2fa.c - OATH 2-factor authentication module */
+/* otp.c - OATH 2-factor authentication module */
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
@@ -927,11 +927,11 @@ otp_initialize( void )
        char *argv[4];
        int i;
 
-       otp.on_bi.bi_type = "otp_2fa";
+       otp.on_bi.bi_type = "otp";
        otp.on_bi.bi_op_bind = otp_op_bind;
 
        ca.argv = argv;
-       argv[0] = "otp_2fa";
+       argv[0] = "otp";
        ca.argv = argv;
        ca.argc = 3;
        ca.fname = argv[0];
index f4cc1aaed36c6f0b09e5292812768859733f6c53..02e0b9ef6216446f5be3c7f772fa2c478ee48ee3 100755 (executable)
@@ -22,7 +22,7 @@ if test $OTP = otpno; then
     exit 0
 fi
 
-OTP_DATA=$DATADIR/otp_2fa/hotp.ldif
+OTP_DATA=$DATADIR/otp/hotp.ldif
 
 # OTPs for this token
 TOKEN_0=818800
@@ -88,7 +88,7 @@ dn: cn=module,cn=config
 objectClass: olcModuleList
 cn: module
 olcModulePath: $TESTWD/../servers/slapd/overlays
-olcModuleLoad: otp_2fa.la
+olcModuleLoad: otp.la
 EOMOD
 RC=$?
 if test $RC != 0 ; then
@@ -98,10 +98,10 @@ if test $RC != 0 ; then
 fi
 fi
 
-echo "Loading test otp_2fa configuration..."
+echo "Loading test otp configuration..."
 $LDAPMODIFY -v -D cn=config -H $URI1 -y $CONFIGPWF \
     >> $TESTOUT 2>&1 <<EOMOD
-dn: olcOverlay={0}otp_2fa,olcDatabase={1}$BACKEND,cn=config
+dn: olcOverlay={0}otp,olcDatabase={1}$BACKEND,cn=config
 changetype: add
 objectClass: olcOverlayConfig
 EOMOD
@@ -274,7 +274,7 @@ fi
 
 test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
-LDIF=$DATADIR/otp_2fa/test001-out.ldif
+LDIF=$DATADIR/otp/test001-out.ldif
 
 echo "Filtering ldapsearch results..."
 $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
index 427ec40ec12df19be47ab6b67e1b46fe014a48c4..6a4c90f0d58a291a71ab63ebe676165833a3233b 100755 (executable)
@@ -44,7 +44,7 @@ done
 
 export URI1 MANAGERDN PASSWD BABSDN BJORNSDN
 
-OTP_DATA=$DATADIR/otp_2fa/totp.ldif
+OTP_DATA=$DATADIR/otp/totp.ldif
 
 mkdir -p $TESTDIR $DBDIR1
 
@@ -93,7 +93,7 @@ dn: cn=module,cn=config
 objectClass: olcModuleList
 cn: module
 olcModulePath: $TESTWD/../servers/slapd/overlays
-olcModuleLoad: otp_2fa.la
+olcModuleLoad: otp.la
 EOMOD
 RC=$?
 if test $RC != 0 ; then
@@ -103,10 +103,10 @@ if test $RC != 0 ; then
 fi
 fi
 
-echo "Loading test otp_2fa configuration..."
+echo "Loading test otp configuration..."
 $LDAPMODIFY -v -D cn=config -H $URI1 -y $CONFIGPWF \
     >> $TESTOUT 2>&1 <<EOMOD
-dn: olcOverlay={0}otp_2fa,olcDatabase={1}$BACKEND,cn=config
+dn: olcOverlay={0}otp,olcDatabase={1}$BACKEND,cn=config
 changetype: add
 objectClass: olcOverlayConfig
 EOMOD