[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    Bug#3098: marked as done ([PATCH] checkAccess does incorrect checks in some cases)
From:       owner () bugs ! kde ! org (Stephan Kulow)
Date:       2000-04-27 23:33:02
[Download RAW message or body]

Your message dated Fri, 28 Apr 2000 01:17:35 +0200
with message-id <3908CA8F.5F98E0CC@tu-harburg.de>
and subject line Bug#3098: [PATCH] checkAccess does incorrect checks in some cases
has caused the attached bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I'm
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Stephan Kulow
(administrator, KDE bugs database)

Received: (at submit) by bugs.kde.org; 27 Apr 2100 19:49:45 +0000
From alex@hayward.u-net.com Thu Apr 27 21:49:45 2000
Received: from p90.nas1.is7.u-net.net ([195.102.204.90]:4100 "EHLO
        hayward.u-net.com") by max.tat.physik.uni-tuebingen.de with ESMTP
        id <S741920AbQD0Tth>; Thu, 27 Apr 2000 21:49:37 +0200
Received: from localhost (alex@localhost)
        by hayward.u-net.com (8.9.3/8.9.3) with ESMTP id UAA04045
        for <submit@bugs.kde.org>; Thu, 27 Apr 2000 20:03:41 +0100 (BST)
        (envelope-from alex@hayward.u-net.com)
Date:   Thu, 27 Apr 2000 20:03:19 +0100 (BST)
From:   Alex Hayward <alex@hayward.u-net.com>
To:     submit@bugs.kde.org
Subject: [PATCH] checkAccess does incorrect checks in some cases
In-Reply-To: <20000426173526.A309@rotes20.wohnheim.uni-kl.de>
Message-ID: <Pine.BSF.4.05.10004262134390.746-100000@hayward.u-net.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <Pine.BSF.4.05.10004262226351.69482@hayward.u-net.com>
Return-Path: <alex@hayward.u-net.com>
X-Orcpt: rfc822;submit@bugs.kde.org

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