|
|
/etc/conf/cf.d/sfsys
struct ipc_perm shm_perm; /* operation permission struct */ int shm_segsz; /* size of segment */ ushort shm_cpid; /* creator pid */ ushort shm_lpid; /* pid of last operation */ short shm_nattch; /* number of current attaches */ time_t shm_atime; /* last attach time */ time_t shm_dtime; /* last detach time */ time_t shm_ctime; /* last change time */ /* Times measured in secs since */ /* 00:00:00 GMT, Jan. 1, 1970 */shm_perm is an ipc_perm structure that specifies the shared memory operation permission. The structure includes the following members:
ushort cuid; /* creator user id */ ushort cgid; /* creator group id */ ushort uid; /* user id */ ushort gid; /* group id */ ushort mode; /* r/w permission */
shm_segsz
specifies the size of the shared memory
segment. shm_cpid
is the process ID of the process
that created the shared memory identifier. shm_lpid
is the
process ID of the last process that performed a
shmop(S)
operation. shm_nattch
is the number
of processes that currently have this segment
attached. shm_atime
is the time of the last shmat
operation. shm_dtime
is the time of the last shmdt
operation, and shm_ctime
is the time of the last
shmctl(S)
operation that changed one of the above structure members.
In the shmop(S) and shmctl(S) system call descriptions, the permission required for an operation is given as ``{token''}, where ``token'' is the type of permission needed. It is interpreted as follows:
00400 | Read by user |
00200 | Write by user |
00060 | Read, write by group |
00006 | Read, write by others |
Read and write permissions on a shmid are granted to a process if one or more of the following are true:
shm_perm.uid
or shm_perm.cuid
in the data structure
associated with shmid and the appropriate bit of the
``user'' portion (0600) of shm_perm.mode
is set.
shm_perm.uid
or shm_perm.cuid
and the effective group
ID. The process matches shm_perm.gid
or
shm_perm.cgid
and the appropriate bit of the ``group''
portion (060) of shm_perm.mode
is set.
shm_perm.uid
or shm_perm.cuid
and the effective group
ID of the process does not match shm_perm.gid
or
shm_perm.cgid
and the appropriate bit of the
``other'' portion (06) of shm_perm.mode
is set.
Otherwise, the corresponding permissions are denied.