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

patch for pam_unix



Hi, I found a problem with the new pam_unix's handling of the "unixlike"
argument that appears to break it.  I've attached a patch.
        
Cheers,
        
Nalin
--- modules/pam_unix/pam_unix_auth.c	Sat Oct  9 01:07:32 1999
+++ modules/pam_unix/pam_unix_auth.c	Mon Dec 27 15:36:49 1999
@@ -89,7 +89,7 @@
 		D(("recording return code for next time [%d]",	\
 					retval));		\
 		pam_set_data(pamh, "unix_setcred_return",	\
-				(void *) &retval, NULL);	\
+				(void *) retval, NULL);	\
 	}							\
 	D(("done. [%s]", pam_strerror(pamh, retval)));		\
 	return retval;						\
@@ -197,10 +197,8 @@
 	retval = PAM_SUCCESS;
 
 	if (on(UNIX_LIKE_AUTH, ctrl)) {
-		int *pretval = &retval;
-
 		D(("recovering return code from auth call"));
-		pam_get_data(pamh, "unix_setcred_return", (const void **) &pretval);
+		pam_get_data(pamh, "unix_setcred_return", (const void **) &retval);
 		pam_set_data(pamh, "unix_setcred_return", NULL, NULL);
 		D(("recovered data indicates that old retval was %d", retval));
 	}

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