From: Jeff Riegel Date: Tue, 5 Jun 2001 15:11:01 +0000 (+0000) Subject: usermode-cachemgr-open-mode-checking-fix-20010605 X-Git-Tag: openafs-stable-1_1_0~128 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=62078136d1eac45fe412a9a3da03960c0f9860e8 usermode-cachemgr-open-mode-checking-fix-20010605 default to read mode when opening --- diff --git a/src/afs/UKERNEL/afs_usrops.c b/src/afs/UKERNEL/afs_usrops.c index 2d93e7c..0c1e9eb 100644 --- a/src/afs/UKERNEL/afs_usrops.c +++ b/src/afs/UKERNEL/afs_usrops.c @@ -2678,6 +2678,7 @@ int uafs_open_r( if (flags & (O_WRONLY|O_RDWR)) { fileMode |= VWRITE; } + if (!fileMode) fileMode = VREAD; /* since O_RDONLY is 0 */ code = afs_access(fileP, fileMode, u.u_cred); if (code != 0) { VN_RELE(fileP);