-
Notifications
You must be signed in to change notification settings - Fork 603
Drop Mozilla LDAP SDK detection, update --with-ldap code #1710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1219,33 +1219,19 @@ SQUID_CHECK_LIB_WORKS(gss,[ | |
| ]) | ||
|
|
||
| SQUID_AUTO_LIB(ldap,[LDAP],[LIBLDAP]) | ||
| dnl On MinGW set Windows LDAP libraries using -lwldap32 | ||
| AS_IF([test "x$with_ldap" != "xno" -a "$squid_host_os" = "mingw"],[ | ||
| LIBLDAP_LIBS="$LIBLDAP_LIBS -lwldap32" | ||
|
Comment on lines
+1222
to
+1224
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we have to place this special code outside of SQUID_CHECK_LIB_WORKS()?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To extract it for now outside the other logic. I would like to later (n the MinGW work) identify whether it is actually needed, or if we should have a completely separate library option+check for the Windows LDAP.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
That sentence does not appear to answer the "why" question. It essentially restates the fact accepted by the question.
I see no reason to move this special code to accomplish the stated "identify the need" and associated possible refactoring goals. AFAICT, the move itself contradicts the intent behind SQUID_CHECK_LIB_WORKS() approach. We should not move unless there is a very compelling argument for doing so. No such argument has been provided AFAICT. |
||
| ]) | ||
| SQUID_CHECK_LIB_WORKS(ldap,[ | ||
| dnl On MinGW OpenLDAP is not available, so LDAP helpers can be linked | ||
| dnl only with Windows LDAP libraries using -lwldap32 | ||
| AS_IF([test "$squid_host_os" = "mingw"],[ | ||
| LIBLDAP_LIBS="-lwldap32" | ||
| ],[ | ||
| SQUID_STATE_SAVE(squid_ldap_state) | ||
| LIBS="$LIBLDAP_PATH $LIBPTHREADS $LIBS" | ||
| PKG_CHECK_MODULES([LIBLDAP],[ldap],[],[ | ||
| AC_CHECK_LIB(lber, ber_init, [LIBLBER="-llber"]) | ||
| AC_CHECK_LIB(ldap, ldap_init, [LIBLDAP_LIBS="-lldap $LIBLBER"]) | ||
| dnl if no ldap lib found check for mozilla version | ||
| AS_IF([test "x$ac_cv_lib_ldap_ldap_init" != "xyes"],[ | ||
| SQUID_STATE_SAVE(squid_ldap_mozilla) | ||
| LIBS="$LIBLDAP_PATH $LIBPTHREADS" | ||
| AC_CHECK_LIB(ldap60, ldap_init, [LIBLDAP_LIBS="-lldap60 $LIBLBER"]) | ||
| LIBS="$LIBLDAP_PATH $LIBLDAP_LIBS $LIBPTHREADS" | ||
| AC_CHECK_LIB(prldap60, prldap_init, [LIBLDAP_LIBS="-lprldap60 $LIBLDAP_LIBS"]) | ||
| LIBS="$LIBLDAP_PATH $LIBLDAP_LIBS $LIBPTHREADS" | ||
| AC_CHECK_LIB(ssldap60, ldapssl_init, [LIBLDAP_LIBS="-lssldap60 $LIBLDAP_LIBS"]) | ||
| SQUID_STATE_ROLLBACK(squid_ldap_mozilla) | ||
| ]) | ||
| ]) | ||
| AC_CHECK_HEADERS(ldap.h lber.h) | ||
| AC_CHECK_HEADERS(mozldap/ldap.h) | ||
| SQUID_STATE_SAVE(squid_ldap_state) | ||
| LIBS="$LIBLDAP_PATH $LIBPTHREADS $LIBS" | ||
| PKG_CHECK_MODULES([LIBLDAP],[ldap],[:],[:]) | ||
| AS_IF([test "x$LIBLDAP_LIBS" != "x"],[ | ||
| AC_CHECK_HEADERS(ldap.h lber.h winldap.h) | ||
| SQUID_CHECK_LDAP_API | ||
| ]) | ||
| SQUID_STATE_ROLLBACK(squid_ldap_state) | ||
| ]) | ||
|
|
||
| SQUID_AUTO_LIB(systemd,[systemd API for start-up notification],[LIBSYSTEMD]) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels wrong to change LIBLDAP_LIBS that was set by admin. Should this be conditional on LIBLDAP_LIBS being empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, for now I am leaving the logic inside this case as-was. Testing changes to it need some testing on MinGW which we are not quite up to doing (yet)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That excuse itself is very weak, but when combined with the fact that this PR does change the condition, it becomes invalid.
AFAICT, the PRs in this series routinely introduce untested changes. That is just the nature of this work, given our current CI limitations. IMO, we should not apply "need some testing before I modify this further" logic when dealing with changes that appear to violate basic rules. Given the two evils, I recommend increasing the risk of breaking MinGW build instead of committing such violations. These changes should be moving us forward as far as code quality is concerned. We can fix marginal builds later, as needed.