Re: shmget regression?

From: Robert Watson <rwatson_at_FreeBSD.org>
Date: Thu, 30 Nov 2006 13:45:21 +0000 (GMT)
On Thu, 30 Nov 2006, JAroslav Suchanek wrote:

> 	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

Can you send the output of 'ipcs' after the below code runs so that I can see 
the mode it ended up being created with?  You might try reverting the priv(9) 
change to sysv_ipc.c and see if that fixes thanks?

Thanks,

Robert N M Watson
Computer Laboratory
University of Cambridge

>
> --- shmtest_old.c	Tue Nov 28 09:59:55 2006
> +++ shmtest.c	Tue Nov 28 09:58:39 2006
> _at__at_ -126,6 +126,9 _at__at_
> 	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
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
>
Received on Thu Nov 30 2006 - 12:45:26 UTC

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