Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Dec 1994 05:41:16 +0800 (HKT)
From:      John Beukema <jbeukema@HK.Super.NET>
To:        freebsd-hackers@freefall.cdrom.com
Cc:        FreeBSD-questions <FreeBSD-questions@freefall.cdrom.com>
Subject:   sysv_msg.c bug?
Message-ID:  <Pine.SUN.3.91.941226050627.29574B-100000@is1.hk.super.net>

next in thread | raw e-mail | index | archive | help

I have been having a problem using the SYSV messages facility in 2.0R.  The 
permission bits in msg_perm.mode seem to be ignored and accordingly only 
the queue owner can write to the queue regardless of the bits.  My 
application uses a database server owned by root but which grants access 
to ordinary user clients to write to its message queue.  As it is now 
under FBSD, only root can run the client programs.  

The same program runs all right on SUNOS and SCO.  The Sun man pages
state, in effect, that any user should be able to write to a queue if its
owner (creator) sets msg_perm.mode to 0666. 

I have examined Daniel Boulet's implementation.  (I do not understand (yet)
how the functions are transformed from two and three parameters in the 
declaration to three and four in the implementation.)  I noticed msgget 
masks the requested permission mask, msgflg with & 0700 which, I 
believe, eliminates the group and other permissions and leaves only 
the owner bits.  msgctl(qid, IPC_STAT) also allows only the queue owner 
to access queue information.

Am I correct, this is a bug?  Please reply by mail.
jbeukema






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.941226050627.29574B-100000>