https://bugs.openldap.org/show_bug.cgi?id=9985
Issue ID: 9985 Summary: slapd-modules/passwd/totp does not build .so file Product: OpenLDAP Version: 2.6.3 Hardware: x86_64 OS: Linux Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: contrib Assignee: bugs@openldap.org Reporter: bastian-bugopenldap21@t6l.de Target Milestone: ---
I try to build the contrib module totp from openldap 2.6.3.
The README states to run `make` in order to build the dynamic link-able .so file. It does not so on my test system (could be a flaw on the test system though).
Many thanks,
https://bugs.openldap.org/show_bug.cgi?id=9985
--- Comment #1 from Bastian bastian-bugopenldap21@t6l.de --- Somehow the attachment got deleted during submit. Here it goes as a comment:
``` test01% pwd /opt/jsc/jscldap/slapd/src/2.6.3/contrib/slapd-modules/passwd/totp
test01% ls Makefile README slapd-totp.c slapo-totp.5
test01% make /opt/jsc/jscldap/slapd/src/2.6.3/libtool --mode=compile gcc -g -O2 -I/opt/jsc/jscldap/slapd/src/2.6.3/include -I/opt/jsc/jscldap/slapd/src/2.6.3/include -I/opt/jsc/jscldap/slapd/src/2.6.3/servers/slapd -c slapd-totp.c libtool: compile: gcc -g -O2 -I/opt/jsc/jscldap/slapd/src/2.6.3/include -I/opt/jsc/jscldap/slapd/src/2.6.3/include -I/opt/jsc/jscldap/slapd/src/2.6.3/servers/slapd -c slapd-totp.c -fPIC -DPIC -o .libs/slapd-totp.o slapd-totp.c: In function ‘do_hmac’: slapd-totp.c:367:9: warning: ‘HMAC_CTX_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations] 367 | HMAC_setup(ctx, key->mv_val, key->mv_len, hash); | ^~~~~~~~~~ In file included from slapd-totp.c:38: /usr/include/openssl/hmac.h:33:33: note: declared here 33 | OSSL_DEPRECATEDIN_3_0 HMAC_CTX *HMAC_CTX_new(void); | ^~~~~~~~~~~~ slapd-totp.c:367:9: warning: ‘HMAC_Init_ex’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations] 367 | HMAC_setup(ctx, key->mv_val, key->mv_len, hash); | ^~~~~~~~~~ In file included from slapd-totp.c:38: /usr/include/openssl/hmac.h:43:27: note: declared here 43 | OSSL_DEPRECATEDIN_3_0 int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, | ^~~~~~~~~~~~ slapd-totp.c:368:9: warning: ‘HMAC_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations] 368 | HMAC_crunch(ctx, data->mv_val, data->mv_len); | ^~~~~~~~~~~ In file included from slapd-totp.c:38: /usr/include/openssl/hmac.h:45:27: note: declared here 45 | OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, | ^~~~~~~~~~~ slapd-totp.c:369:9: warning: ‘HMAC_Final’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations] 369 | HMAC_finish(ctx, out->mv_val, digestLen); | ^~~~~~~~~~~ In file included from slapd-totp.c:38: /usr/include/openssl/hmac.h:47:27: note: declared here 47 | OSSL_DEPRECATEDIN_3_0 int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, | ^~~~~~~~~~ slapd-totp.c:369:9: warning: ‘HMAC_CTX_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations] 369 | HMAC_finish(ctx, out->mv_val, digestLen); | ^~~~~~~~~~~ In file included from slapd-totp.c:38: /usr/include/openssl/hmac.h:35:28: note: declared here 35 | OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_free(HMAC_CTX *ctx); | ^~~~~~~~~~~~~ libtool: compile: gcc -g -O2 -I/opt/jsc/jscldap/slapd/src/2.6.3/include -I/opt/jsc/jscldap/slapd/src/2.6.3/include -I/opt/jsc/jscldap/slapd/src/2.6.3/servers/slapd -c slapd-totp.c -o slapd-totp.o >/dev/null 2>&1 /opt/jsc/jscldap/slapd/src/2.6.3/libtool --mode=link gcc -version-info 0:0:0 \ -rpath /usr/local/libexec/openldap -module -o pw-totp.la slapd-totp.lo /opt/jsc/jscldap/slapd/src/2.6.3/libraries/libldap/libldap.la /opt/jsc/jscldap/slapd/src/2.6.3/libraries/liblber/liblber.la libtool: link: cc -shared -fPIC -DPIC .libs/slapd-totp.o -Wl,-rpath -Wl,/opt/jsc/jscldap/slapd/src/2.6.3/libraries/libldap/.libs -Wl,-rpath -Wl,/opt/jsc/jscldap/slapd/src/2.6.3/libraries/liblber/.libs -Wl,-rpath -Wl,/opt/jsc/jscldap/sl apd/opt/2.6.3/lib -L/opt/jsc/jscldap/slapd/src/2.6.3/libraries/liblber/.libs /opt/jsc/jscldap/slapd/src/2.6.3/libraries/libldap/.libs/libldap.so -lssl -lcrypto /opt/jsc/jscldap/slapd/src/2.6.3/libraries/liblber/.libs/liblber.so -Wl,-son ame -Wl,pw-totp.so.0 -o .libs/pw-totp.so.0.0.0 libtool: link: (cd ".libs" && rm -f "pw-totp.so.0" && ln -s "pw-totp.so.0.0.0" "pw-totp.so.0") libtool: link: (cd ".libs" && rm -f "pw-totp.so" && ln -s "pw-totp.so.0.0.0" "pw-totp.so") libtool: link: ar cru .libs/pw-totp.a slapd-totp.o libtool: link: ranlib .libs/pw-totp.a libtool: link: ( cd ".libs" && rm -f "pw-totp.la" && ln -s "../pw-totp.la" "pw-totp.la" )
test01% echo $? 0
test01% ls Makefile README pw-totp.la slapd-totp.c slapd-totp.lo slapd-totp.o slapo-totp.5 ```
https://bugs.openldap.org/show_bug.cgi?id=9985
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID
--- Comment #2 from Howard Chu hyc@openldap.org --- No bug here, makefile works as designed. It built a libtool library. Use "make install" to install the .so file.
https://bugs.openldap.org/show_bug.cgi?id=9985
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|needs_review | Status|RESOLVED |VERIFIED
--- Comment #3 from Quanah Gibson-Mount quanah@openldap.org --- Additionally, if you carefully read the log output you pasted, it clearly shows it creates the .so files in the .libs/ directory. But you didn't provide the necessary flags to ls to show "dot" files/directories.
https://bugs.openldap.org/show_bug.cgi?id=9985
--- Comment #4 from Bastian bastian-bugopenldap21@t6l.de --- You are right. Thanks for pointing this out.
Two minor things, I'd like to mention after I installed the module:
1. `make install` does not acknowledge the configured prefix variable of openldap. I fixed that by editing the Makefile accordingly.
2. The README says the so-filename will be named `slapd-totp.so` but it is `pw-totp.so`
Many thanks,
https://bugs.openldap.org/show_bug.cgi?id=9985
--- Comment #5 from Quanah Gibson-Mount quanah@openldap.org --- (In reply to Bastian from comment #4)
You are right. Thanks for pointing this out.
Two minor things, I'd like to mention after I installed the module:
- `make install` does not acknowledge the configured prefix variable of
openldap. I fixed that by editing the Makefile accordingly.
Correct, they are contrib modules and not part of the build chain. There is no reason to hack the Makefile however, you just set the variables as desired.
For example:
make -C contrib/slapd-modules/lastbind prefix=$(PREFIX) libexecdir=$(LIBDIR)
assuming you set those two variables, etc.
- The README says the so-filename will be named `slapd-totp.so` but it is
`pw-totp.so`
Thanks!
https://bugs.openldap.org/show_bug.cgi?id=9985
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|VERIFIED |CONFIRMED Resolution|INVALID |--- Summary|slapd-modules/passwd/totp |Typo in contrib totp |does not build .so file |documentation in regards to | |the compiled module name
https://bugs.openldap.org/show_bug.cgi?id=9985
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.6.5 Assignee|bugs@openldap.org |quanah@openldap.org
https://bugs.openldap.org/show_bug.cgi?id=9985
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |IN_PROGRESS
--- Comment #6 from Quanah Gibson-Mount quanah@openldap.org --- https://git.openldap.org/openldap/openldap/-/merge_requests/594
https://bugs.openldap.org/show_bug.cgi?id=9985
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|2.6.5 |2.6.4
https://bugs.openldap.org/show_bug.cgi?id=9985
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|2.6.4 |2.5.14
https://bugs.openldap.org/show_bug.cgi?id=9985
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |FIXED
--- Comment #7 from Quanah Gibson-Mount quanah@openldap.org --- head:
• 6a3a7169 by Quanah Gibson-Mount at 2023-01-30T15:41:16+00:00 ITS#9985 - Fix module name to pw-totp
RE26:
• 6fc1dee7 by Quanah Gibson-Mount at 2023-01-30T19:05:35+00:00 ITS#9985 - Fix module name to pw-totp
RE25:
• abefbbb1 by Quanah Gibson-Mount at 2023-01-30T19:05:56+00:00 ITS#9985 - Fix module name to pw-totp
https://bugs.openldap.org/show_bug.cgi?id=9985
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED