<?Pub UDT _bookmark _target?><?Pub EntList bsol dash hellip gt lt minus?><?Pub CX solbook(book(title()bookinfo()chapter()?><appendix id="appa-1"><title>Programmer's Reference</title><highlights><para>This appendix explains where to find information about developing, testing, and releasing label-aware applications to an environment that uses the Solaris Trusted Extensions software.</para><itemizedlist><para>This appendix covers the following topics:</para><listitem><para><olink targetptr="appa-3" remap="internal">Header File Locations</olink></para>
</listitem><listitem><para><olink targetptr="appa-4" remap="internal">Abbreviations Used in Interface Names and Data Structure Names</olink></para>
</listitem><listitem><para><olink targetptr="appa-5" remap="internal">Developing, Testing, and Debugging an Application</olink></para>
</listitem><listitem><para><olink targetptr="appa-6" remap="internal">Releasing an Application</olink></para>
</listitem>
</itemizedlist>
</highlights><sect1 id="appa-3"><title>Header File Locations</title><para><indexterm><primary>header files</primary><secondary>locations, list of</secondary></indexterm>Most Trusted Extensions header files are located in the <filename>/usr/include/tsol</filename> directory and in the <filename>/usr/include/sys/tsol</filename> directory. The locations of other header files are shown in the following table.</para><informaltable frame="topbot"><tgroup cols="2" colsep="0" rowsep="0"><colspec colnum="1" colname="column1" colwidth="5*"/><colspec colnum="2" colname="column2" colwidth="4*"/><thead><row><entry colname="column1" rowsep="1"><para>Header File and Its Location</para>
</entry><entry colname="column2" rowsep="1"><para>Category of Interface</para>
</entry>
</row>
</thead><tbody><row><entry colname="column1" align="left" valign="top"><para><filename>/usr/dt/include/Dt/label_clipping.h</filename></para>
</entry><entry colname="column2" align="left" valign="top"><para>X11 label translation and label clipping with font list</para>
</entry>
</row><row><entry colname="column1" align="left" valign="top"><para><filename>/usr/dt/include/Dt/ModLabel.h</filename></para>
</entry><entry colname="column2" align="left" valign="top"><para>Label Builder</para>
</entry>
</row><row><entry colname="column1" align="left" valign="top"><para><filename>/usr/openwin/include/X11/extensions/Xtsol.h</filename></para>
</entry><entry colname="column2" align="left" valign="top"><para>X Window System</para>
</entry>
</row><row><entry><para><filename>/usr/include/libtsnet.h</filename></para>
</entry><entry><para>Trusted network library</para>
</entry>
</row><row><entry><para><filename>/usr/include/bsm/libbsm.h</filename></para>
</entry><entry><para>Audit library</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="appa-4"><title>Abbreviations Used in Interface Names and Data Structure Names</title><para><indexterm><primary>abbreviations used in interface names</primary></indexterm><indexterm><primary>interface names</primary><secondary>abbreviations used in</secondary></indexterm>Many of the Trusted Extensions interface names and data structure names use the following short abbreviations. Knowing the abbreviations of these names will help you recognize the purpose of an interface or structure.</para><table frame="topbot" id="appa-tbl-2"><title>Name Abbreviations Used by Trusted Extensions APIs</title><tgroup cols="2" colsep="0" rowsep="0"><colspec colwidth="10*"/><colspec colwidth="20*"/><thead><row rowsep="1"><entry><para>Abbreviation</para>
</entry><entry><para>Name</para>
</entry>
</row>
</thead><tbody><row><entry><para><literal>attr</literal></para>
</entry><entry><para>Attribute</para>
</entry>
</row><row><entry><para><literal>b</literal></para>
</entry><entry><para>Binary</para>
</entry>
</row><row><entry><para><literal>clear</literal></para>
</entry><entry><para>Clearance</para>
</entry>
</row><row><entry><para><literal>ent</literal></para>
</entry><entry><para>Entry</para>
</entry>
</row><row><entry><para><literal>f</literal></para>
</entry><entry><para>File</para>
</entry>
</row><row><entry><para><literal>fs</literal></para>
</entry><entry><para>File system</para>
</entry>
</row><row><entry><para><literal>h</literal></para>
</entry><entry><para>Hexadecimal</para>
</entry>
</row><row><entry><para><literal>l</literal></para>
</entry><entry><para>Level, label, or symbolic link</para>
</entry>
</row><row><entry><para><literal>lbuild</literal></para>
</entry><entry><para>Label Builder</para>
</entry>
</row><row><entry><para><literal>prop</literal></para>
</entry><entry><para>Properties</para>
</entry>
</row><row><entry><para><literal>r</literal></para>
</entry><entry><para>Re-entrant</para>
</entry>
</row><row><?PubTbl row rht="0.24in"?><entry><para><literal>res</literal></para>
</entry><entry><para>Resource</para>
</entry>
</row><row><entry><para><literal>s</literal></para>
</entry><entry><para>String</para>
</entry>
</row><row><entry><para><literal>sec</literal></para>
</entry><entry><para>Security</para>
</entry>
</row><row><entry><para><literal>sl</literal></para>
</entry><entry><para>Sensitivity label</para>
</entry>
</row><row><entry><para><literal>tp</literal></para>
</entry><entry><para>Trusted Path</para>
</entry>
</row><row><entry><para><literal>tsol</literal></para>
</entry><entry><para>Trusted Extensions</para>
</entry>
</row><row><entry><para><literal>xtsol</literal></para>
</entry><entry><para>Trusted X11 Server</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect1><sect1 id="appa-5"><title>Developing, Testing, and Debugging an Application</title><indexterm><primary>applications</primary><secondary>testing and debugging</secondary>
</indexterm><indexterm><primary>debugging</primary><secondary>applications</secondary>
</indexterm><indexterm><primary>testing and debugging applications</primary>
</indexterm><para>You must develop, test, and debug an application on an isolated development system to prevent software bugs and incomplete code from compromising the security policy on the main system.</para><itemizedlist><para>Follow these guidelines:</para><listitem><para>Remove extra debugging code, especially code that provides undocumented features and code that bypasses security checks.</para>
</listitem><listitem><para>Make application data manipulation easy to follow so that the manipulation can be inspected for security problems by an administrator before installation.</para>
</listitem><listitem><para>Test return codes for all programming interfaces. An unsuccessful call can have unpredictable results. When an unexpected error condition occurs, the application must always terminate.</para>
</listitem><listitem><para>Test all functionality by running the application at all sensitivity labels and from all roles that you expect will run the application.</para><itemizedlist><listitem><para>If the program is run by an ordinary user and not by a role, start the program from the command line at the labels where the program is intended to run.</para>
</listitem><listitem><para>If the program is run by a role, start the program from the command line in the global zone or from the user role at the labels where the program is intended to run.</para>
</listitem>
</itemizedlist>
</listitem><listitem><para>Test all functionality under privilege debugging mode so that you know whether the application has all the privileges it needs. This type of testing also determines whether the application is attempting to perform privileged tasks that it should not be performing.</para>
</listitem><listitem><para>Know the security implications of using privileges. Ensure that the application does not compromise system security by its use of privileges.</para>
</listitem><listitem><para>Know and follow good privilege bracketing practices.</para><para>See <olink targetdoc="gssapipg" remap="external"><citetitle remap="book">Solaris Security for Developers Guide</citetitle></olink>.</para>
</listitem><listitem><para>If you use the <filename>SUNWspro</filename> <command>debugger</command> or the <command>dbx</command> command to test a privileged application, start the debugger <emphasis>before</emphasis> you attach it to a running process. You cannot start the debugger with the command name as an argument.</para>
</listitem>
</itemizedlist>
</sect1><sect1 id="appa-6"><title>Releasing an Application</title><indexterm><primary>integrating an application</primary>
</indexterm><indexterm><primary>releasing an application</primary>
</indexterm><indexterm><primary>applications</primary><secondary>integrating</secondary>
</indexterm><indexterm><primary>applications</primary><secondary>releasing</secondary>
</indexterm><para>You submit a fully tested and debugged application to the system administrator for application integration. The application can be submitted as a CDE action or as a software package. If the application uses privileges, the system administrator must evaluate the application source code and the security information that you supply. This evaluation verifies that your use of privileges does not compromise system security.</para><caution><para>Notify the system administrator of new auditing events, audit classes, or X Window System properties that your application uses. The system administrator <emphasis>must</emphasis> place these items into the correct files. For more information, see <olink targetptr="windowapi-1" remap="internal">Chapter&nbsp;6, Trusted X Window System</olink>.</para>
</caution><sect2 id="appa-7"><title>Creating a CDE Action</title><indexterm><primary>security policy</primary><secondary>CDE actions</secondary>
</indexterm><indexterm><primary>CDE actions</primary><secondary>creating</secondary>
</indexterm><para>A CDE action is started from the workspace by a user or a role. The action inherits the privileges assigned to the profile of that user or role. A <firstterm>CDE action</firstterm> is a set of instructions that work like application macros or APIs to automate desktop tasks such as running applications and opening data files. On a system configured with Trusted Extensions, applications are started from the workspace as CDE actions. Instructions on how to create a CDE action are provided in the <olink targetdoc="cdeadmin" remap="external"><citetitle remap="book">Solaris Common Desktop Environment: Advanced User&rsquo;s and System Administrator&rsquo;s Guide</citetitle></olink>.</para><note><para>When you create a CDE action, create an <literal>f.action</literal>, not an <literal>f.exec</literal>. An <literal>f.exec</literal> executes the program as superuser with all privileges.</para>
</note><para><indexterm><primary>CDE actions</primary><secondary>assigning inheritable privileges</secondary></indexterm>The system administrator puts the CDE action into the appropriate profiles and assigns any necessary privileges to the CDE action. You must list the privileges that the program uses, indicate the labels at which the application is intended to run, and supply any required effective user or group IDs. The system administrator assigns privileges as well as effective user and group IDs to the CDE action in the profile.</para>
</sect2><sect2 id="appa-8"><title>Creating a Software Package</title><para><indexterm><primary>software packages</primary><secondary>creating</secondary></indexterm>To create a software package, see the <olink targetdoc="packinstall" remap="external"><citetitle remap="book">Application Packaging Developer&rsquo;s Guide</citetitle></olink>. To debug package installation issues, see <olink targetdoc="sysadv2" targetptr="tsoverview-10750" remap="external">Chapter 14, <citetitle remap="chapter">Troubleshooting Software Problems (Overview),</citetitle> in <citetitle remap="book">System Administration Guide: Advanced Administration</citetitle></olink>.</para>
</sect2>
</sect1>
</appendix>