206 lines
3.4 KiB
HTML
206 lines
3.4 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>System V IPC</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
|
|
REL="HOME"
|
|
TITLE="Secure Programming for Linux and Unix HOWTO"
|
|
HREF="index.html"><LINK
|
|
REL="UP"
|
|
TITLE="Summary of Linux and Unix Security Features"
|
|
HREF="features.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Files"
|
|
HREF="files.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Sockets and Network Connections"
|
|
HREF="sockets.html"></HEAD
|
|
><BODY
|
|
CLASS="SECT1"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
SUMMARY="Header navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>Secure Programming for Linux and Unix HOWTO</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="files.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
>Chapter 3. Summary of Linux and Unix Security Features</TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="sockets.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="SECT1"
|
|
><H1
|
|
CLASS="SECT1"
|
|
><A
|
|
NAME="SYSV-IPC"
|
|
></A
|
|
>3.3. System V IPC</H1
|
|
><P
|
|
>Many Unix-like systems, including
|
|
Linux and System V systems, support System V interprocess communication
|
|
(IPC) objects.
|
|
Indeed System V IPC is required by the
|
|
Open Group's Single UNIX Specification, Version 2
|
|
[Open Group 1997].
|
|
System V IPC objects can be one of three kinds:
|
|
System V message queues, semaphore sets, and shared memory segments.
|
|
Each such object has the following attributes:
|
|
|
|
<P
|
|
></P
|
|
><UL
|
|
><LI
|
|
><P
|
|
>read and write permissions for each of creator, creator group, and
|
|
others.</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>creator UID and GID - UID and GID of the creator of the object.</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>owning UID and GID - UID and GID of the owner of the
|
|
object (initially equal to the creator UID).</P
|
|
></LI
|
|
></UL
|
|
> </P
|
|
><P
|
|
>When accessing such objects, the rules are as follows:
|
|
|
|
<P
|
|
></P
|
|
><UL
|
|
><LI
|
|
><P
|
|
>if the process has root privileges, the access is granted.</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>if the process' EUID is the owner or creator UID of the object,
|
|
then the appropriate creator permission bit is
|
|
checked to see if access is granted.</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>if the process' EGID is the owner or creator GID of the object,
|
|
or one of the process' groups is the owning or creating GID of the object,
|
|
then the appropriate creator group permission bit is checked for access.</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>otherwise, the appropriate ``other'' permission bit is checked
|
|
for access.</P
|
|
></LI
|
|
></UL
|
|
> </P
|
|
><P
|
|
>Note that root, or a process with the EUID of either the owner or creator,
|
|
can set the owning UID and owning GID and/or remove the object.
|
|
More information is available in ipc(5).</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
SUMMARY="Footer navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="files.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
ACCESSKEY="H"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="sockets.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Files</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="features.html"
|
|
ACCESSKEY="U"
|
|
>Up</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Sockets and Network Connections</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |