[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: Bug#3098: [PATCH] checkAccess does incorrect checks in some cases
From: Alex Hayward <alex () hayward ! u-net ! com>
Date: 2000-04-27 19:03:19
[Download RAW message or body]
Package: kdelibs
Version: CVS HEAD 2000-04-26.
In kdecore/kapp.cpp:
if ( mode & W_OK == 0 )
return false; // Check for write access is not part of mode => bail
out
I believe that this is a bug and that:
if ( (mode & W_OK) == 0 )
was intended. Since W_OK is 2 (under FreeBSD) the former always evaluates
to false so write access is always checked for even if it wasn't
specified.
Patch:
--- kapp.cpp.orig Wed Apr 26 21:33:25 2000
+++ kapp.cpp Wed Apr 26 21:38:31 2000
@@ -1488,7 +1488,7 @@
// else
// if we want to write the file would be created. Check, if the
// user may write to the directory to create the file.
- if ( mode & W_OK == 0 )
+ if ( (mode & W_OK) == 0 )
return false; // Check for write access is not part of mode => bail out
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic