From 76a1eb689cdf89f5bc990c67d01959c57eb63117 Mon Sep 17 00:00:00 2001 From: Philippe Saint-Pierre Date: Fri, 3 Jul 2015 16:14:09 -0400 Subject: [PATCH] userlandfs: Fix access mask check CID 1255052 and CID 1255053 --- .../file_systems/userlandfs/server/beos/BeOSKernelVolume.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/file_systems/userlandfs/server/beos/BeOSKernelVolume.cpp b/src/add-ons/kernel/file_systems/userlandfs/server/beos/BeOSKernelVolume.cpp index 5c7202cf90..f37730dbb7 100644 --- a/src/add-ons/kernel/file_systems/userlandfs/server/beos/BeOSKernelVolume.cpp +++ b/src/add-ons/kernel/file_systems/userlandfs/server/beos/BeOSKernelVolume.cpp @@ -604,7 +604,7 @@ BeOSKernelVolume::ReadAttr(void* node, void* _cookie, off_t pos, AttributeCookie* cookie = (AttributeCookie*)_cookie; // check, if open mode allows reading - if ((open_mode_to_access(cookie->fOpenMode) | R_OK) == 0) + if ((open_mode_to_access(cookie->fOpenMode) & R_OK) == 0) return B_FILE_ERROR; // read @@ -624,7 +624,7 @@ BeOSKernelVolume::WriteAttr(void* node, void* _cookie, off_t pos, AttributeCookie* cookie = (AttributeCookie*)_cookie; // check, if open mode allows writing - if ((open_mode_to_access(cookie->fOpenMode) | W_OK) == 0) + if ((open_mode_to_access(cookie->fOpenMode) & W_OK) == 0) return B_FILE_ERROR; // write