diff options
author | Greg Hudson <ghudson@mit.edu> | 2009-02-17 17:32:19 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2009-02-17 17:32:19 +0000 |
commit | d9f547b4670abb3aa5cba348ce44cc0c60d57071 (patch) | |
tree | 2276f5b08c298f90f2e9548b79698ddc122509cc | |
parent | 5f5f67e0abfe38d88c7235b4e0cc0d0b4fe7bbfb (diff) | |
download | krb5-d9f547b4670abb3aa5cba348ce44cc0c60d57071.zip krb5-d9f547b4670abb3aa5cba348ce44cc0c60d57071.tar.gz krb5-d9f547b4670abb3aa5cba348ce44cc0c60d57071.tar.bz2 |
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.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22011 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/lib/krb5/os/kuserok.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/krb5/os/kuserok.c b/src/lib/krb5/os/kuserok.c index 489b247..f76010d 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)) |