Bug #86076
Exporter les fonctions sur les méthodes de signature
0%
Description
Reported by Vita Batrla on mailing list :
Hello all,
I build Apache's mellon authentication module from the source code on a
machine that is installed with latest lasso library built again from the
source code. The result is failure. The web server is unable to load
mod_auth_mellon.so binary due to missing symbol:
lasso_get_min_signature_method
The symbol is defined in lasso source code, but not exported.
It's missing in liblasso.so binary.
Looking at history, the symbol lasso_get_min_signature_method was
added by commit:
However, the symbol was not made for export.
Then there are inline functions in the same header file:
lasso_allowed_signature_method()
lasso_ok_signature_method()
, both either directly or indirectly depend on lasso_set_min_signature_method().
The problem is that lasso_allowed_signature_method() is an inline function
and directly calls lasso_get_min_signature_method(). Any consumer calling it
will then require definition of lasso_get_min_signature_method() function,
but since the symbol is local, it won't be resolved from liblasso.so library.
See:
https://dev.entrouvert.org/projects/lasso/repository/33/revisions/main/entry/lasso/xml/xml.h
The following patch resolves the problem (workaround):
diff rup lasso-2.8.2.orig/lasso/xml/xml.h lasso-2.8.2/lasso/xml/xml.h lasso-2.8.2.orig/lasso/xml/xml.h 2023-09-04 13:17:29.549728470 0200
--
++ lasso-2.8.2/lasso/xml/xml.h 2023-09-04 13:18:46.282409575 +0200@ -122,7 +122,7
@ LassoSignatureMethod lasso_get_default_s
void lasso_set_default_signature_method(LassoSignatureMethod meth);
-LassoSignatureMethod lasso_get_min_signature_method();
+LASSO_EXPORT LassoSignatureMethod lasso_get_min_signature_method();
void lasso_set_min_signature_method(LassoSignatureMethod meth);
With the above patch, the mod_auth_mellon.so loads fine, no unresolved symbol
from liblasso.so. If I'm right there are three alternative approaches to
fix the problem:
- remove the inline keyword from lasso/xml/xml.h completely,
move all function definitions to .c file
- define lasso_get_min_signature_method() in header file and make it inline
- make lasso_get_min_signature_method() exported symbol
each way from above has little bit different low level performance impact (number of call instructions in assembly language), but I'm unsure if the performance is the key question here.
Thanks,
Vita
Révisions associées
Historique
Mis à jour par Robot Gitea il y a 3 mois
- Statut changé de Nouveau à Solution proposée
Benjamin Dauvergne (bdauvergne) a ouvert une pull request sur Gitea concernant cette demande :
- URL : https://git.entrouvert.org/entrouvert/lasso/pulls/7
- Titre : xml: export signature method functions (#86076)
- Modifications : https://git.entrouvert.org/entrouvert/lasso/pulls/7/files
Mis à jour par Robot Gitea il y a 3 mois
- Statut changé de Solution proposée à Résolu (à déployer)
Benjamin Dauvergne (bdauvergne) a mergé une pull request sur Gitea concernant cette demande :
- URL : https://git.entrouvert.org/entrouvert/lasso/pulls/7
- Titre : xml: export signature method functions (#86076)
- Modifications : https://git.entrouvert.org/entrouvert/lasso/pulls/7/files
xml: export lasso_get_min_signature method function (#86076)