Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jan 2003 18:50:44 -0800 (PST)
From:      Chris Costello <chris@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 23714 for review
Message-ID:  <200301140250.h0E2oilg063194@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=23714

Change 23714 by chris@chris_holly on 2003/01/13 18:50:22

	o Rename the relabel entry points.
	o Document create_devfs_symlink and create_vnode_extattr.

Affected files ...

.. //depot/projects/trustedbsd/doc/en_US.ISO8859-1/books/developers-handbook/mac/chapter.sgml#22 edit

Differences ...

==== //depot/projects/trustedbsd/doc/en_US.ISO8859-1/books/developers-handbook/mac/chapter.sgml#22 (text+ko) ====

@@ -530,6 +530,73 @@
             file system is mounted, regenerated, or a new device is made
             available.</para>
         </sect4>
+
+        <sect4 id="mac-mpo-create-devfs-symlink">
+          <title><function>&mac.mpo;_create_devfs_symlink</function></title>
+
+          <funcsynopsis>
+            <funcprototype>
+              <funcdef>void
+                <function>&mac.mpo;_create_devfs_symlink</function></funcdef>
+
+              <paramdef>struct ucred
+                *<parameter>cred</parameter></paramdef>
+              <paramdef>struct mount
+                *<parameter>mp</parameter></paramdef>
+              <paramdef>struct devfs_dirent
+                *<parameter>dd</parameter></paramdef>
+              <paramdef>struct label
+                *<parameter>ddlabel</parameter></paramdef>
+              <paramdef>struct devfs_dirent
+                *<parameter>de</parameter></paramdef>
+              <paramdef>struct label
+                *<parameter>delabel</parameter></paramdef>
+            </funcprototype>
+          </funcsynopsis>
+
+          <informaltable>
+            <tgroup cols="3">
+              &mac.thead;
+
+              <tbody>
+                <row>
+                  <entry><parameter>cred</parameter></entry>
+                  <entry>Subject credential</entry>
+                </row>
+
+                <row>
+                  <entry><parameter>mp</parameter></entry>
+                  <entry>Devfs mount point</entry>
+                </row>
+
+                <row>
+                  <entry><parameter>dd</parameter></entry>
+                  <entry>Link destination</entry>
+                </row>
+
+                <row>
+                  <entry><parameter>ddlabel</parameter></entry>
+                  <entry>Label associated with
+                    <parameter>dd</parameter></entry>
+                </row>
+
+                <row>
+                  <entry><parameter>de</parameter></entry>
+                  <entry>Symlink entry</entry>
+                </row>
+
+                <row>
+                  <entry><parameter>delabel</parameter></entry>
+                  <entry>Label associated with
+                    <parameter>de</parameter></entry>
+                </row>
+              </tbody>
+            </tgroup>
+          </informaltable>
+
+          <para>Fill in the label (<parameter>delabel</parameter>) for
+            a newly created &man.devfs.9; symbolic link entry.</para>
+        </sect4>
         
         <sect4 id="mac-mpo-create-devfs-directory">
           <title><function>&mac.mpo;_create_devfs_directory</function></title>
@@ -793,6 +860,91 @@
             &mac.mpo;_create_mount;.</para>
         </sect4>
 
+        <sect4 id="mac-mpo-create-vnode-extattr">
+          <title><function>&mac.mpo;_create_vnode_extattr</function></title>
+
+          <funcsynopsis>
+            <funcprototype>
+              <funcdef>int
+                <function>&mac.mpo;_create_vnode_extattr</function></funcdef>
+
+              <paramdef>struct ucred
+                *<parameter>cred</parameter></paramdef>
+              <paramdef>struct mount
+                *<parameter>mp</parameter></paramdef>
+              <paramdef>struct label
+                *<parameter>fslabel</parameter></paramdef>
+              <paramdef>struct vnode
+                *<parameter>dvp</parameter></paramdef>
+              <paramdef>struct label
+                *<parameter>dlabel</parameter></paramdef>
+              <paramdef>struct vnode
+                *<parameter>vp</parameter></paramdef>
+              <paramdef>struct label
+                *<parameter>vlabel</parameter></paramdef>
+              <paramdef>struct componentname
+                *<parameter>cnp</parameter></paramdef>
+            </funcprototype>
+          </funcsynopsis>
+
+          <informaltable>
+            <tgroup cols="3">
+              &mac.thead;
+
+              <tbody>
+                <row>
+                  <entry><parameter>cred</parameter></entry>
+                  <entry>Subject credential</entry>
+                </row>
+
+                <row>
+                  <entry><parameter>mount</parameter></entry>
+                  <entry>File system mount point</entry>
+                </row>
+
+                <row>
+                  <entry><parameter>label</parameter></entry>
+                  <entry>File system label</entry>
+                </row>
+
+                <row>
+                  <entry><parameter>dvp</parameter></entry>
+                  <entry>Parent directory vnode</entry>
+                </row>
+
+                <row>
+                  <entry><parameter>dlabel</parameter></entry>
+                  <entry>Label associated with
+                    <parameter>dvp</parameter></entry>
+                </row>
+
+                <row>
+                  <entry><parameter>vp</parameter></entry>
+                  <entry>Newly created vnode</entry>
+                </row>
+
+                <row>
+                  <entry><parameter>vlabel</parameter></entry>
+                  <entry>Policy label associated with
+                    <parameter>vp</parameter></entry>
+                </row>
+
+                <row>
+                  <entry><parameter>cnp</parameter></entry>
+                  <entry>Component name for
+                    <parameter>vp</parameter></entry>
+                </row>
+              </tbody>
+            </tgroup>
+          </informaltable>
+
+          <para>Write out the label for <parameter>vp</parameter> to
+            the appropriate extended attribute.  If the write
+            succeeds, fill in <parameter>vlabel</parameter> with the
+            label, and return <returnvalue>0</returnvalue>. Otherwise,
+            return an appropriate error.</para>
+        </sect4>
+
         <sect4 id="mac-mpo-externalize-vnode-label">
           <title><function>&mac.mpo;_externalize_vnode_label</function></title>
 
@@ -1425,13 +1577,13 @@
           &mac.internalize.para;
         </sect4>
 
-        <sect4 id="mac-mpo-socket-relabel">
-          <title><function>&mac.mpo;_socket_relabel</function></title>
+        <sect4 id="mac-mpo-relabel-socket">
+          <title><function>&mac.mpo;_relabel_socket</function></title>
           
           <funcsynopsis>
             <funcprototype>
               <funcdef>void
-                <function>&mac.mpo;_socket_relabel</function></funcdef>
+                <function>&mac.mpo;_relabel_socket</function></funcdef>
               
               <paramdef>struct ucred
                 *<parameter>cred</parameter></paramdef>
@@ -2255,12 +2407,12 @@
         </sect4>
         
         <sect4 id="mac-mpo-ifnet-relabel">
-          <title><function>&mac.mpo;_ifnet_relabel</function></title>
+          <title><function>&mac.mpo;_relabel_ifnet</function></title>
           
           <funcsynopsis>
             <funcprototype>
               <funcdef>void
-                <function>&mac.mpo;_ifnet_relabel</function></funcdef>
+                <function>&mac.mpo;_relabel_ifnet</function></funcdef>
               
               <paramdef>struct ucred
                 *<parameter>cred</parameter></paramdef>
@@ -2591,13 +2743,13 @@
             of all user processes.</para>
         </sect4>
         
-        <sect4 id="mac-mpo-cred-relabel">
-          <title><function>&mac.mpo;_cred_relabel</function></title>
+        <sect4 id="mac-mpo-relabel-cred">
+          <title><function>&mac.mpo;_relabel_cred</function></title>
           
           <funcsynopsis>
             <funcprototype>
               <funcdef>void
-                <function>&mac.mpo;_cred_relabel</function></funcdef>
+                <function>&mac.mpo;_relabel_cred</function></funcdef>
               
               <paramdef>struct ucred
                 *<parameter>cred</parameter></paramdef>
@@ -5473,13 +5625,13 @@
         calls are not permitted to fail (failure should be reported
         earlier in the relabel check).</para>
       
-      <sect3 id="mac-mpo-vnode-relabel">
-        <title><function>&mac.mpo;_vnode_relabel</function></title>
+      <sect3 id="mac-mpo-relabel-vnode">
+        <title><function>&mac.mpo;_relabel_vnode</function></title>
         
         <funcsynopsis>
           <funcprototype>
             <funcdef>void
-              <function>&mac.mpo;_vnode_relabel</function></funcdef>
+              <function>&mac.mpo;_relabel_vnode</function></funcdef>
             
             <paramdef>struct ucred
               *<parameter>cred</parameter></paramdef>

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




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