]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-avoid-leaking-stat-info-20050424
authorChas Williams <chas@cmf.nrl.navy.mil>
Sun, 24 Apr 2005 15:03:24 +0000 (15:03 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sun, 24 Apr 2005 15:03:24 +0000 (15:03 +0000)
otherwise we are effectively giving stat powers to people who shouldn't have it

(cherry picked from commit 1ecb15494a769dad02d2278dbe50d34cab0cab05)

src/afs/VNOPS/afs_vnop_lookup.c

index 229bba463e49df11c51fa23df43715a21cd0145c..c82496a47fc06d84d27cd2f60107c09c2bebf8e3 100644 (file)
@@ -1198,7 +1198,7 @@ afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, struct AFS_UCRED
 
     /* Check for read access as well.  We need read access in order to
      * stat files, but not to stat subdirectories. */
-    if (!afs_AccessOK(adp, PRSFS_LOOKUP, &treq, CHECK_MODE_BITS))
+    if (!afs_AccessOK(adp, PRSFS_READ, &treq, CHECK_MODE_BITS))
        no_read_access = 1;
 
     /* special case lookup of ".".  Can we check for it sooner in this code,