svn rev #22011: trunk/src/lib/krb5/os/

ghudson@MIT.EDU ghudson at MIT.EDU
Tue Feb 17 12:32:19 EST 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=22011
Commit By: ghudson
Log Message:
Revert the fopen part of the previous krb5_kuserok change, but keep
the string-handling change.  It introduced an unwanted behavior change
when .k5login was detectable but unreadable.



Changed Files:
U   trunk/src/lib/krb5/os/kuserok.c
Modified: trunk/src/lib/krb5/os/kuserok.c
===================================================================
--- trunk/src/lib/krb5/os/kuserok.c	2009-02-17 17:09:35 UTC (rev 22010)
+++ trunk/src/lib/krb5/os/kuserok.c	2009-02-17 17:32:19 UTC (rev 22011)
@@ -90,13 +90,12 @@
     if (SNPRINTF_OVERFLOW(result, sizeof(pbuf)))
 	return(FALSE);
 
-    fp = fopen(pbuf, "r");
-    if (!fp) {
+    if (access(pbuf, F_OK)) {	 /* not accessible */
 	/*
-	 * If he's trying to log in as himself, and there is no
-	 * readable .k5login file, let him.  To find out, call
+	 * if he's trying to log in as himself, and there is no .k5login file,
+	 * let him.  To find out, call
 	 * krb5_aname_to_localname to convert the principal to a name
-	 * which we can string compare.
+	 * which we can string compare. 
 	 */
 	if (!(krb5_aname_to_localname(context, principal,
 				      sizeof(kuser), kuser))




More information about the cvs-krb5 mailing list