[OpenAFS-devel] More on the PAM modules, pthreads, and other
joys
Chaskiel M Grundman
cg2v@andrew.cmu.edu
Mon, 15 Aug 2005 13:08:09 -0400
--==========3ABDD414A895CD3DC057==========
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
--On Monday, August 15, 2005 08:37:49 AM -0400 Jeffrey Altman=20
<jaltman@columbia.edu> wrote:
> Modules or applications that make use of rx must call rx_Init().
> Adding rx_Init() to the PAM module is the appropriate thing to do.
While this is true in the general case, it's not how the kauth library and=20
its applications were written. When klog is run, it defers calling rx_Init=20
until ka_SingleServerConn / ka_AuthSpecificServersConn / ka_AuthServerConn=20
are called, which does not occur until after des is used to do the string=20
to key operation.
While changing this is not necessarily a bad thing, it should not be=20
asserted that the existing code is just wrong. Another possibility for=20
fixing this that I see is to have rxkad_global_stats_init called from=20
rxkad_thr_stats_init through a pthread_once (hopefully, pthread_once is=20
optimized so that once the "once" has clearly happened, it does not need to =
acquire a lock to determine that).
--==========3ABDD414A895CD3DC057==========
Content-Type: application/pkcs7-signature
Content-Transfer-Encoding: base64
MIIL1wYJKoZIhvcNAQcCoIILyDCCC8QCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3
DQEHAaCCCVswggLjMIICTKADAgECAgMO/8kwDQYJKoZIhvcNAQEEBQAwYjELMAkG
A1UEBhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4x
LDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4X
DTA1MDYyMzE3MzEzMFoXDTA2MDYyMzE3MzEzMFowRTEfMB0GA1UEAxMWVGhhd3Rl
IEZyZWVtYWlsIE1lbWJlcjEiMCAGCSqGSIb3DQEJARYTY2cydkBhbmRyZXcuY211
LmVkdTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALujtch96NHbplBs
5DnSTn03EsnbYsLng/wM+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