Remove call to ipcperm() in shmget_existing(). The flags argument is

ignored on other systems I investigated when accessing an existing
memory segment rather than creating a new one.  This call to ipcperm()
is the only one to pass in a complete mode flag to the permission
checks rather than a simple access request mask, and caused problems
for the revised ipcperm() based on the priv(9) interface, which can
now be restored.

PR:	106078
This commit is contained in:
Robert Watson 2007-02-19 22:56:10 +00:00
parent 699e491f50
commit 3d50b06b8e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166835

View file

@ -722,9 +722,6 @@ shmget_existing(td, uap, mode, segnum)
if (error != 0)
return (error);
#endif
error = ipcperm(td, &shmseg->u.shm_perm, mode);
if (error)
return (error);
if (uap->size && uap->size > shmseg->u.shm_segsz)
return (EINVAL);
td->td_retval[0] = IXSEQ_TO_IPCID(segnum, shmseg->u.shm_perm);