
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://selinuxproject.org/w/skins/common/feed.css?63"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Building the XSELinux Function Test Application - Revision history</title>
		<link>http://selinuxproject.org/w/?title=Building_the_XSELinux_Function_Test_Application&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.10.4</generator>
		<lastBuildDate>Sun, 19 May 2013 23:24:36 GMT</lastBuildDate>
		<item>
			<title>RichardHaines at 15:38, 15 March 2010</title>
			<link>http://selinuxproject.org/w/?title=Building_the_XSELinux_Function_Test_Application&amp;diff=914&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 15:38, 15 March 2010&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 2:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 2:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;The &amp;lt;tt&amp;gt;X-setest&amp;lt;/tt&amp;gt; application allows a user to execute all of the SELinuxGet/Set.. functions that are integrated with the X-Windows object manager. The application is shown in [http://taiga.selinuxproject.org/~rhaines/diagrams/X-setest.png Figure 1] and should be easy to drive.&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;The &amp;lt;tt&amp;gt;X-setest&amp;lt;/tt&amp;gt; application allows a user to execute all of the SELinuxGet/Set.. functions that are integrated with the X-Windows object manager. The application is shown in [http://taiga.selinuxproject.org/~rhaines/diagrams/X-setest.png Figure 1] and should be easy to drive.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;This application does not require any specific policy module to run, however it will require permissions to be granted if you want to obtain information when running in other domains than the default. This has been tested with the Reference Policy once the X-windows object manager is running by setting the &amp;lt;tt&amp;gt;xserver_object_manager&amp;lt;/tt&amp;gt; boolean to &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt;. Important note - The new &amp;lt;tt&amp;gt;x_keyboard&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;x_pointer&amp;lt;/tt&amp;gt; object classes and their permissions must be be available. Red Hat F-12 &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;builds &lt;/del&gt;from &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;release XX &lt;/del&gt;will have these added.&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;This application does not require any specific policy module to run, however it will require permissions to be granted if you want to obtain information when running in other domains than the default. This has been tested with the Reference Policy once the X-windows object manager is running by setting the &amp;lt;tt&amp;gt;xserver_object_manager&amp;lt;/tt&amp;gt; boolean to &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt;. Important note - The new &amp;lt;tt&amp;gt;x_keyboard&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;x_pointer&amp;lt;/tt&amp;gt; object classes and their permissions must be be available. Red Hat F-12 &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;policy RPMs &lt;/ins&gt;from &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;tt&amp;gt;selinux-policy-3.6.32-100.fc12.noarch.rpm&amp;lt;/tt&amp;gt; &lt;/ins&gt;will have these added.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;The [[Experimenting With X-Windows#Calling the XSELinux Functions |Calling the XSELinux Functions]] section explains some of the issues around error handling and the source code has plenty of comments. &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;The [[Experimenting With X-Windows#Calling the XSELinux Functions |Calling the XSELinux Functions]] section explains some of the issues around error handling and the source code has plenty of comments. &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 18:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 18:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;* &amp;lt;tt&amp;gt;libX11&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;libX11-common&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;libX11-devel&amp;lt;/tt&amp;gt; - These are standard Xlib packages.&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;* &amp;lt;tt&amp;gt;libX11&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;libX11-common&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;libX11-devel&amp;lt;/tt&amp;gt; - These are standard Xlib packages.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;* &amp;lt;tt&amp;gt;libXi&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;libXi-devel&amp;lt;/tt&amp;gt; - These are required for retrieving Xdevice information.&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;* &amp;lt;tt&amp;gt;libXi&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;libXi-devel&amp;lt;/tt&amp;gt; - These are required for retrieving Xdevice information.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;* The &amp;lt;tt&amp;gt;XSELinuxOMFunctions.c&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Xlib-selinux.h&amp;lt;/tt&amp;gt; files that are located in the &amp;lt;tt&amp;gt;./x-windows/x-common&amp;lt;/tt&amp;gt; directory. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;The contents of these files are shown in the [[Experimenting With X-Windows#Building the X-Windows Select and Paste Examples |Building the X-select and X-paste Applications]] section.&lt;/del&gt;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;* The &amp;lt;tt&amp;gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[http://taiga.selinuxproject.org/~rhaines/notebook-source/x-windows/x-common/&lt;/ins&gt;XSELinuxOMFunctions.c &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;XSELinuxOMFunctions.c]&lt;/ins&gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[http://taiga.selinuxproject.org/~rhaines/notebook-source/x-windows/x-common/&lt;/ins&gt;Xlib-selinux.h &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Xlib-selinux.h]&lt;/ins&gt;&amp;lt;/tt&amp;gt; files that are located in the &amp;lt;tt&amp;gt;./x-windows/x-common&amp;lt;/tt&amp;gt; directory. &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;* &lt;/ins&gt;The application source code &amp;lt;tt&amp;gt;[http://taiga.selinuxproject.org/~rhaines/notebook-source/x-windows/x-setest/X-setest.c X-setest.c]&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/tt&amp;gt; that is located in the &amp;lt;tt&amp;gt;./x-windows/x-setest&amp;lt;/tt&amp;gt; directory.&lt;/ins&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;The application source code &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;is available at &lt;/del&gt;&amp;lt;tt&amp;gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;./x-windows/x-setest/X-setest.c&amp;lt;/tt&amp;gt; and is as follows:&lt;/del&gt;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;[http://taiga.selinuxproject.org/~rhaines/notebook-source/x-windows/x-setest/X-setest.c &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;  &lt;/del&gt;X-setest.c]&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;The &amp;lt;tt&amp;gt;X-setest&amp;lt;/tt&amp;gt; application can be built using the following command:&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;The &amp;lt;tt&amp;gt;X-setest&amp;lt;/tt&amp;gt; application can be built using the following command:&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</description>
			<pubDate>Mon, 15 Mar 2010 15:38:49 GMT</pubDate>			<dc:creator>RichardHaines</dc:creator>			<comments>http://selinuxproject.org/page/Talk:Building_the_XSELinux_Function_Test_Application</comments>		</item>
		<item>
			<title>RichardHaines at 16:58, 14 March 2010</title>
			<link>http://selinuxproject.org/w/?title=Building_the_XSELinux_Function_Test_Application&amp;diff=908&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 16:58, 14 March 2010&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 1:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 1:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;= Building the XSELinux Function Test Application =&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;= Building the XSELinux Function Test Application =&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;The &amp;lt;tt&amp;gt;X-setest&amp;lt;/tt&amp;gt; application allows a user to execute all of the SELinuxGet/Set.. functions that are integrated with the X-Windows object manager. The application is shown in &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[&lt;/del&gt;[http://taiga.selinuxproject.org/~rhaines/diagrams/X-setest.png Figure 1&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;]&lt;/del&gt;] and should be easy to drive.&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;The &amp;lt;tt&amp;gt;X-setest&amp;lt;/tt&amp;gt; application allows a user to execute all of the SELinuxGet/Set.. functions that are integrated with the X-Windows object manager. The application is shown in [http://taiga.selinuxproject.org/~rhaines/diagrams/X-setest.png Figure 1] and should be easy to drive.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;This application does not require any specific policy module to run, however it will require permissions to be granted if you want to obtain information when running in other domains than the default. This has been tested with the Reference Policy once the X-windows object manager is running by setting the &amp;lt;tt&amp;gt;xserver_object_manager&amp;lt;/tt&amp;gt; boolean to &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt;. Important note - The new &amp;lt;tt&amp;gt;x_keyboard&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;x_pointer&amp;lt;/tt&amp;gt; object classes and their permissions must be be available. Red Hat F-12 builds from release XX will have these added.&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;This application does not require any specific policy module to run, however it will require permissions to be granted if you want to obtain information when running in other domains than the default. This has been tested with the Reference Policy once the X-windows object manager is running by setting the &amp;lt;tt&amp;gt;xserver_object_manager&amp;lt;/tt&amp;gt; boolean to &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt;. Important note - The new &amp;lt;tt&amp;gt;x_keyboard&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;x_pointer&amp;lt;/tt&amp;gt; object classes and their permissions must be be available. Red Hat F-12 builds from release XX will have these added.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;The [[Experimenting &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;with &lt;/del&gt;X-Windows#Calling the XSELinux Functions|Calling the XSELinux Functions]] section explains some of the issues around error handling and the source code has plenty of comments. &lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;The [[Experimenting &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;With &lt;/ins&gt;X-Windows#Calling the XSELinux Functions |Calling the XSELinux Functions]] section explains some of the issues around error handling and the source code has plenty of comments. &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;The functions 12, 13, 19, 20 &amp;amp; 22 return an &amp;lt;tt&amp;gt;XError&amp;lt;/tt&amp;gt; of &amp;lt;tt&amp;gt;BadAlloc&amp;lt;/tt&amp;gt; when access is denied and generates a &amp;lt;tt&amp;gt;USER_AVC&amp;lt;/tt&amp;gt; entry in the audit.log. Note however, &amp;lt;tt&amp;gt;XErrors&amp;lt;/tt&amp;gt; are checked first and are not logged in audit.log, only USER_AVC errors will be logged&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;The functions 12, 13, 19, 20 &amp;amp; 22 return an &amp;lt;tt&amp;gt;XError&amp;lt;/tt&amp;gt; of &amp;lt;tt&amp;gt;BadAlloc&amp;lt;/tt&amp;gt; when access is denied and generates a &amp;lt;tt&amp;gt;USER_AVC&amp;lt;/tt&amp;gt; entry in the audit.log. Note however, &amp;lt;tt&amp;gt;XErrors&amp;lt;/tt&amp;gt; are checked first and are not logged in audit.log, only USER_AVC errors will be logged&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 18:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 18:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;* &amp;lt;tt&amp;gt;libX11&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;libX11-common&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;libX11-devel&amp;lt;/tt&amp;gt; - These are standard Xlib packages.&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;* &amp;lt;tt&amp;gt;libX11&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;libX11-common&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;libX11-devel&amp;lt;/tt&amp;gt; - These are standard Xlib packages.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;* &amp;lt;tt&amp;gt;libXi&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;libXi-devel&amp;lt;/tt&amp;gt; - These are required for retrieving Xdevice information.&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;* &amp;lt;tt&amp;gt;libXi&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;libXi-devel&amp;lt;/tt&amp;gt; - These are required for retrieving Xdevice information.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;* The &amp;lt;tt&amp;gt;XSELinuxOMFunctions.c&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Xlib-selinux.h&amp;lt;/tt&amp;gt; files that are located in the &amp;lt;tt&amp;gt;./x-windows/x-common&amp;lt;/tt&amp;gt; directory. The contents of these files are shown in the [[Experimenting &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;with &lt;/del&gt;X-Windows#Building the X-&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;select &lt;/del&gt;and &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;X-paste Applications&lt;/del&gt;|Building the X-select and X-paste Applications]] section.&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;* The &amp;lt;tt&amp;gt;XSELinuxOMFunctions.c&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Xlib-selinux.h&amp;lt;/tt&amp;gt; files that are located in the &amp;lt;tt&amp;gt;./x-windows/x-common&amp;lt;/tt&amp;gt; directory. The contents of these files are shown in the [[Experimenting &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;With &lt;/ins&gt;X-Windows#Building the X-&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Windows Select &lt;/ins&gt;and &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Paste Examples &lt;/ins&gt;|Building the X-select and X-paste Applications]] section.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;The application source code is available at &amp;lt;tt&amp;gt;./x-windows/x-setest/X-setest.c&amp;lt;/tt&amp;gt; and is as follows:&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;The application source code is available at &amp;lt;tt&amp;gt;./x-windows/x-setest/X-setest.c&amp;lt;/tt&amp;gt; and is as follows:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[&lt;/del&gt;[http://taiga.selinuxproject.org/~rhaines/notebook-source/x-windows/x-setest/X-setest.c   X-setest.c&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;]&lt;/del&gt;]&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;[http://taiga.selinuxproject.org/~rhaines/notebook-source/x-windows/x-setest/X-setest.c   X-setest.c]&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;The &amp;lt;tt&amp;gt;X-setest&amp;lt;/tt&amp;gt; application can be built using the following command:&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;The &amp;lt;tt&amp;gt;X-setest&amp;lt;/tt&amp;gt; application can be built using the following command:&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</description>
			<pubDate>Sun, 14 Mar 2010 16:58:35 GMT</pubDate>			<dc:creator>RichardHaines</dc:creator>			<comments>http://selinuxproject.org/page/Talk:Building_the_XSELinux_Function_Test_Application</comments>		</item>
		<item>
			<title>RichardHaines: New page: = Building the XSELinux Function Test Application = The &lt;tt&gt;X-setest&lt;/tt&gt; application allows a user to execute all of the SELinuxGet/Set.. functions that are integrated with the X-Windows ...</title>
			<link>http://selinuxproject.org/w/?title=Building_the_XSELinux_Function_Test_Application&amp;diff=906&amp;oldid=prev</link>
			<description>&lt;p&gt;New page: = Building the XSELinux Function Test Application = The &amp;lt;tt&amp;gt;X-setest&amp;lt;/tt&amp;gt; application allows a user to execute all of the SELinuxGet/Set.. functions that are integrated with the X-Windows ...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Building the XSELinux Function Test Application =&lt;br /&gt;
The &amp;lt;tt&amp;gt;X-setest&amp;lt;/tt&amp;gt; application allows a user to execute all of the SELinuxGet/Set.. functions that are integrated with the X-Windows object manager. The application is shown in [[http://taiga.selinuxproject.org/~rhaines/diagrams/X-setest.png Figure 1]] and should be easy to drive.&lt;br /&gt;
&lt;br /&gt;
This application does not require any specific policy module to run, however it will require permissions to be granted if you want to obtain information when running in other domains than the default. This has been tested with the Reference Policy once the X-windows object manager is running by setting the &amp;lt;tt&amp;gt;xserver_object_manager&amp;lt;/tt&amp;gt; boolean to &amp;lt;tt&amp;gt;TRUE&amp;lt;/tt&amp;gt;. Important note - The new &amp;lt;tt&amp;gt;x_keyboard&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;x_pointer&amp;lt;/tt&amp;gt; object classes and their permissions must be be available. Red Hat F-12 builds from release XX will have these added.&lt;br /&gt;
&lt;br /&gt;
The [[Experimenting with X-Windows#Calling the XSELinux Functions|Calling the XSELinux Functions]] section explains some of the issues around error handling and the source code has plenty of comments. &lt;br /&gt;
&lt;br /&gt;
The functions 12, 13, 19, 20 &amp;amp; 22 return an &amp;lt;tt&amp;gt;XError&amp;lt;/tt&amp;gt; of &amp;lt;tt&amp;gt;BadAlloc&amp;lt;/tt&amp;gt; when access is denied and generates a &amp;lt;tt&amp;gt;USER_AVC&amp;lt;/tt&amp;gt; entry in the audit.log. Note however, &amp;lt;tt&amp;gt;XErrors&amp;lt;/tt&amp;gt; are checked first and are not logged in audit.log, only USER_AVC errors will be logged&lt;br /&gt;
&lt;br /&gt;
When entering Atom names, the application will check if they are valid, however they are NOT checked to see if they are valid for the specific function (e.g. &amp;lt;tt&amp;gt;PRIMARY&amp;lt;/tt&amp;gt; can be entered for a &amp;lt;tt&amp;gt;GetProperty...&amp;lt;/tt&amp;gt; function, but it will fail with &amp;lt;tt&amp;gt;BadMatch&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Window and Resource IDs entered are not checked by the application and if incorrect the function will fail with &amp;lt;tt&amp;gt;BadMatch&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The '&amp;lt;tt&amp;gt;o&amp;lt;/tt&amp;gt;' option allows an output file to be specified to log the session, only minimum information is then displayed on the screen.&lt;br /&gt;
&lt;br /&gt;
The application requires the following to be installed if recompiled:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;libX11&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;libX11-common&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;libX11-devel&amp;lt;/tt&amp;gt; - These are standard Xlib packages.&lt;br /&gt;
* &amp;lt;tt&amp;gt;libXi&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;libXi-devel&amp;lt;/tt&amp;gt; - These are required for retrieving Xdevice information.&lt;br /&gt;
* The &amp;lt;tt&amp;gt;XSELinuxOMFunctions.c&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Xlib-selinux.h&amp;lt;/tt&amp;gt; files that are located in the &amp;lt;tt&amp;gt;./x-windows/x-common&amp;lt;/tt&amp;gt; directory. The contents of these files are shown in the [[Experimenting with X-Windows#Building the X-select and X-paste Applications|Building the X-select and X-paste Applications]] section.&lt;br /&gt;
&lt;br /&gt;
The application source code is available at &amp;lt;tt&amp;gt;./x-windows/x-setest/X-setest.c&amp;lt;/tt&amp;gt; and is as follows:&lt;br /&gt;
&lt;br /&gt;
[[http://taiga.selinuxproject.org/~rhaines/notebook-source/x-windows/x-setest/X-setest.c   X-setest.c]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;X-setest&amp;lt;/tt&amp;gt; application can be built using the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gcc X-setest.c ../x-common/XSELinuxOMFunctions.c -o X-setest -l selinux -l X11 -l Xi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;X-setest&amp;lt;/tt&amp;gt; application can be called as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Output all information to the screen:&lt;br /&gt;
X-setest&lt;br /&gt;
&lt;br /&gt;
# Output all information to a specified file [log_file_name],&lt;br /&gt;
# with minimum information displayed on the screen:&lt;br /&gt;
X-setest [log_file_name]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</description>
			<pubDate>Sun, 14 Mar 2010 16:17:55 GMT</pubDate>			<dc:creator>RichardHaines</dc:creator>			<comments>http://selinuxproject.org/page/Talk:Building_the_XSELinux_Function_Test_Application</comments>		</item>
	</channel>
</rss>