Le Thursday 07 October 2004 � 10:43:42, Bruce Barnett a �crit:
> Some more patches. 

Some questions

> diff -ru MusclePAM.old/pam_smartcard.c MusclePAM/pam_smartcard.c
> --- MusclePAM.old/pam_smartcard.c     2004-10-04 14:23:56.000000000 -0400
> +++ MusclePAM/pam_smartcard.c 2004-10-07 10:39:16.000000000 -0400
> @@ -259,9 +259,11 @@
>    unsigned char homeFile[200];
>    /* tries to get a public key information from the user's public key certificate */
>  
> -  /* Is userpath defined? If so, use it as a way to find someone's
> -   home directory. I'm using this because the existence of the
> -   specified file overrides the end user's default certificate */
> +  /* Is userpath defined? If so, use it as a way to 'find' someone's
> +   home directory (ignoring the value in the password file). 
> +   I'm using this because the existence of the
> +   specified file overrides the end user's default certificate in their 
> +   home directory  - so userpath is defined for debugging only */
>   
>    if (strlen(pr.userpath)>0) {
>       snprintf(homeFile, 200, "%s%s/.muscle/%s", pr.userpath, sd->user, 
> pr.certname);  

I can't apply this patch. Are you using an up-to-date CVS version?

> @@ -324,7 +326,7 @@
>    int try_first_pass, use_first_pass;
>    unsigned char error[150];
>    //unsigned char nameBuf[100];
> -  X509 *userCert;
> +  X509 *userCert = 0;
>    EVP_PKEY *pubkey;
>  
>    reader = 0;
> @@ -588,8 +599,9 @@
>    
>  
>    /* Release certificates */
> -  X509_free(userCert);
> -
> +  if (!userCert) {
> +    X509_free(userCert);
> +  }
>    /* release pcsc */
>    pcsc_release(&pConnection);
>  

Are you sure the test is not "if (userCert)" ("!" removed)?
Why calling X509_free(userCert); _only_ when userCert is NULL?

Bye,

-- 
 Dr. Ludovic Rousseau                        [EMAIL PROTECTED]
 -- Normaliser Unix c'est comme pasteuriser le camembert, L.R. --
_______________________________________________
Muscle mailing list
[EMAIL PROTECTED]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to