[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: ... oops .. [pam_listfile patch that compiles]



On Sun, Jul 12, 1998 at 12:40:08AM -0700, Andrew Morgan wrote:
> 
> Sorry for that.  This patch seems to compile.
> 
> Andrew :*)

Hi, Andrew!

I've just verified the patch on my system.
I found a problem with a retval check.
The original author abused the variable for storing a result
of a string comparison.
With the following change

--- modules/pam_listfile/pam_listfile.c.orig	Mon Jul 13 22:02:14 1998
+++ modules/pam_listfile/pam_listfile.c	Mon Jul 13 22:13:15 1998
@@ -394,8 +394,8 @@
     }
     fclose(inf);
     free(ifname);
-    if((sense && retval == PAM_AUTH_ERR)
-       || (!sense && retval == PAM_SUCCESS)) {
+    if((sense && retval)
+       || (!sense && !retval)) {
 #ifdef DEBUG
        syslog(LOG_INFO,"Returning PAM_SUCCESS, retval = %d", retval);
 #endif

the module works well for me.

Best wishes
		Andrey



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []