Re: sysv_ipc.c broken in v1.30 (was Re: sysvshm appearse broken in -current)

From: Robert Watson <rwatson_at_FreeBSD.org>
Date: Thu, 28 Dec 2006 14:50:13 +0000 (GMT)
On Thu, 28 Dec 2006, Andrey Chernov wrote:

> On Fri, Dec 22, 2006 at 08:51:05PM +0000, Robert Watson wrote:
>> I return from Oxford.  If you want, you can try removing the ipcperm() call 
>> from shmget_existing() and restore the sysv_ipc.c change and see how that 
>> works for you?
>
> Yes, it works, all t-shm tests passed.

I believe this check is:

(1) Gratuitous.  Applications do not expect it to occur, the specs (in as much
     as they exist) don't expect it to happen, etc.  Likewise, this is simply a
     name space lookup that doesn't affect actual right to access the
     underlying object (unlike, say, a file pathname).

(2) Incorrect.  Unlike all other calls to the check routine, it doesn't pass
     in the specific rights being requested, it passes in a mode mask.  There
     are some cases where the flag mask is masked with 0700 and then pass it
     in, and it could be that making the same change here does the right thing.

Both of these suggest removing the check, but I want to do a bit more reading 
before I do that, and run some tests on other platforms to confirm my reading.

Robert N M Watson
Computer Laboratory
University of Cambridge
Received on Thu Dec 28 2006 - 13:50:14 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:04 UTC