@juhaz and others, what do you think of this attached patch variant? It checks if the library was already initialised before doing it. Since libpam is a library, this is following the recommendation in gcrypt.info, and in https://lists.gnupg.org/pipermail/gcrypt-devel/2003-August/000458.html:
"""
Becuase you can't know in a library whether another library has
already initialized the library, I suggest to do this:
if (!gcry_control (GCRYCTL_ANY_INITIALIZATION_P))
{ /* No other library has already initialized libgcrypt. */
if (!gcry_check_version (NEED_LIBGCRYPT_VERSION) )
{
log_fatal (_("libgcrypt is too old (need %s, have %s)\n"), NEED_LIBGCRYPT_VERSION, gcry_check_version (NULL));
}
gcry_set_allocation_handler (...);
gcry_control (GCRYCTL_INITIALIZATION_FINISHED);
}
"""
@juhaz and others, what do you think of this attached patch variant? It checks if the library was already initialised before doing it. Since libpam is a library, this is following the recommendation in gcrypt.info, and in https:/ /lists. gnupg.org/ pipermail/ gcrypt- devel/2003- August/ 000458. html:
"""
Becuase you can't know in a library whether another library has
already initialized the library, I suggest to do this:
if (!gcry_control (GCRYCTL_ ANY_INITIALIZAT ION_P))
{ /* No other library has already initialized libgcrypt. */
if (!gcry_ check_version (NEED_LIBGCRYPT _VERSION) )
NEED_LIBGCRYPT_ VERSION, gcry_check_version (NULL)); set_allocation_ handler (...); INITIALIZATION_ FINISHED) ;
{
log_fatal (_("libgcrypt is too old (need %s, have %s)\n"),
}
gcry_
gcry_control (GCRYCTL_
}
"""