summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/krb5')
-rw-r--r--src/lib/krb5/os/kuserok.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/krb5/os/kuserok.c b/src/lib/krb5/os/kuserok.c
index 489b24791e..f76010dc9b 100644
--- a/src/lib/krb5/os/kuserok.c
+++ b/src/lib/krb5/os/kuserok.c
@@ -90,13 +90,12 @@ krb5_kuserok(krb5_context context, krb5_principal principal, const char *luser)
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))