[Bug 869166] Re: Libpam-ccreds does not properly initiate libgcrypt

Andreas Hasenack andreas at canonical.com
Thu Jul 20 18:42:37 UTC 2017


@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);
   }
"""

** Patch added: "0003-initialize-libgcrypt.patch"
   https://bugs.launchpad.net/ubuntu/+source/libpam-ccreds/+bug/869166/+attachment/4918287/+files/0003-initialize-libgcrypt.patch

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/869166

Title:
  Libpam-ccreds does not properly initiate libgcrypt

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libpam-ccreds/+bug/869166/+subscriptions



More information about the Ubuntu-server-bugs mailing list