Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Nov 2006 14:11:43 +0100
From:      JAroslav Suchanek <jarda@grisoft.cz>
To:        freebsd-current@freebsd.org
Subject:   shmget regression?
Message-ID:  <20061130131143.GA31809@jardas.grisoft.cz>

index | next in thread | raw e-mail

Hi!

	I've tried to post PR, but it seems it got lost somewhere.
	
	I just wonder whether there was some change in shmget behavior in current.
	
	Look at this patch to src/sys-cur/tools/regression/sysvshm/shmtest.c
	
--- shmtest_old.c	Tue Nov 28 09:59:55 2006
+++ shmtest.c	Tue Nov 28 09:58:39 2006
@@ -126,6 +126,9 @@
 	if ((sender_shmid = shmget(shmkey, pgsize, IPC_CREAT | 0640)) == -1)
 		err(1, "shmget");
 
+	if ((sender_shmid = shmget(shmkey, pgsize, 0640)) == -1)
+		err(1, "shmget");
+
 	if (shmctl(sender_shmid, IPC_STAT, &s_ds) == -1)
 		err(1, "shmctl IPC_STAT");
 

	It failed with permission denied. Is that ok? Same code does not fail on STABLE
	nor Linux.
	
	The system is:
	i386 FreeBSD 7.0-CURRENT
	
	Relevant part of conf file:
	options         SYSVSHM                 #SYSV-style shared memory
	options         SYSVMSG                 #SYSV-style message queues
	options         SYSVSEM                 #SYSV-style semaphores
	
	As I searched via cvsview, there were no suspicious changes in sysv ipc code
	recently, the only change is switch to priv(9) from suser(9).
	
Thanks for clarification,
Jarda Suchanek


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061130131143.GA31809>