
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://selinuxproject.org/w/skins/common/feed.css?63"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://selinuxproject.org/w/?title=RefpolicyBasicRoleCreation&amp;action=history&amp;feed=atom</id>
		<title>RefpolicyBasicRoleCreation - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://selinuxproject.org/w/?title=RefpolicyBasicRoleCreation&amp;action=history&amp;feed=atom"/>
		<link rel="alternate" type="text/html" href="http://selinuxproject.org/w/?title=RefpolicyBasicRoleCreation&amp;action=history"/>
		<updated>2013-06-20T05:45:28Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.10.4</generator>

	<entry>
		<id>http://selinuxproject.org/w/?title=RefpolicyBasicRoleCreation&amp;diff=803&amp;oldid=prev</id>
		<title>JoshuaBrindle: /* Roles Similar to Existing Roles */</title>
		<link rel="alternate" type="text/html" href="http://selinuxproject.org/w/?title=RefpolicyBasicRoleCreation&amp;diff=803&amp;oldid=prev"/>
				<updated>2009-11-19T16:12:58Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Roles Similar to Existing Roles&lt;/span&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:12, 19 November 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 36:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 36:&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;&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;== Roles Similar to Existing Roles ==&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;== Roles Similar to Existing Roles ==&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;If the role's user domain should be similar to user_r or staff_r, the userdom_unpriv_user_template() template should be used.&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;If the role's user domain should be similar to &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;user_r&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;or &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;staff_r&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;, the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;userdom_unpriv_user_template()&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;template should be used.&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; userdom_unpriv_user_template(myrole)&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt; userdom_unpriv_user_template(myrole)&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;If the role's user domain should be similar to sysadm_r, the userdom_admin_user_template() template should be used.&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;If the role's user domain should be similar to &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;sysadm_r&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;, the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;userdom_admin_user_template()&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;template should be used.&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; userdom_admin_user_template(myrole)&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt; userdom_admin_user_template(myrole)&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;/table&gt;</summary>
		<author><name>JoshuaBrindle</name></author>	</entry>

	<entry>
		<id>http://selinuxproject.org/w/?title=RefpolicyBasicRoleCreation&amp;diff=802&amp;oldid=prev</id>
		<title>JoshuaBrindle: /* Roles Similar to Existing Roles */</title>
		<link rel="alternate" type="text/html" href="http://selinuxproject.org/w/?title=RefpolicyBasicRoleCreation&amp;diff=802&amp;oldid=prev"/>
				<updated>2009-11-19T16:12:18Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Roles Similar to Existing Roles&lt;/span&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:12, 19 November 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 41:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 41:&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; userdom_admin_user_template(myrole)&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt; userdom_admin_user_template(myrole)&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;These both will create role myrole_r and user domain myrole_t.  Then rules can subsequently be added to myrole_t to customize it.&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;These both will create role &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;myrole_r&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;and user domain &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;myrole_t&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;.  Then rules can subsequently be added to &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;myrole_t&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;to customize it.&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;= Configuring Userland Programs for the New Role =&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;= Configuring Userland Programs for the New Role =&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JoshuaBrindle</name></author>	</entry>

	<entry>
		<id>http://selinuxproject.org/w/?title=RefpolicyBasicRoleCreation&amp;diff=801&amp;oldid=prev</id>
		<title>JoshuaBrindle: /* Default Contexts */</title>
		<link rel="alternate" type="text/html" href="http://selinuxproject.org/w/?title=RefpolicyBasicRoleCreation&amp;diff=801&amp;oldid=prev"/>
				<updated>2009-11-19T16:11:46Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Default Contexts&lt;/span&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:11, 19 November 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 53:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 53:&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;&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;== Default Contexts ==&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;== Default Contexts ==&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 default_contexts files configure SELinux-aware programs behavior when selecting a context for a user.  Typically this is used when logging in, but there are a few other uses.&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;The &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;default_contexts&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;files configure SELinux-aware programs behavior when selecting a context for a user.  Typically this is used when logging in, but there are a few other uses.&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;Add the new role and user domain to services where login is desired.  For example, the local_login_t is for local logins, whereas xdm_t is for logins via a X display manager, such as GDM or KDM.&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;Add the new role and user domain to services where login is desired.  For example, the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;local_login_t&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;is for local logins, whereas &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;xdm_t&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;is for logins via a X display manager, such as GDM or KDM.&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; system_r:local_login_t	user_r:user_t '''myrole_r:myrole_t''' staff_r:staff_t sysadm_r:sysadm_t unconfined_r:unconfined_t&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt; system_r:local_login_t	user_r:user_t '''myrole_r:myrole_t''' staff_r:staff_t sysadm_r:sysadm_t unconfined_r:unconfined_t&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 62:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 62:&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; system_r:xdm_t		user_r:user_t '''myrole_r:myrole_t''' staff_r:staff_t sysadm_r:sysadm_t unconfined_r:unconfined_t&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt; system_r:xdm_t		user_r:user_t '''myrole_r:myrole_t''' staff_r:staff_t sysadm_r:sysadm_t unconfined_r:unconfined_t&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;For each service, the order matters.  The service will test to see which role:domain combination is valid for the user logging in, and use the first available choice (left to right).  So if the SELinux user is allowed user_r and myrole_r, the default will be user_r:user_t when logging in.&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;For each service, the order matters.  The service will test to see which role:domain combination is valid for the user logging in, and use the first available choice (left to right).  So if the SELinux user is allowed &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;user_r&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;and &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;myrole_r&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;, the default will be &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;user_r:user_t&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;when logging in.&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;You should notice that &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;''myrole_r:myrole_t&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/del&gt;'' was not added to the remote_login_t or sshd_t lines. This means that if a user with only myrole_t tries to log in via login apps running as remote_login_t or sshd_t it will fail.&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;You should notice that ''myrole_r:myrole_t'' was not added to the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;remote_login_t&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;or &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;sshd_t&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;lines. This means that if a user with only &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;myrole_t&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;tries to log in via login apps running as &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;remote_login_t&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;or &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;sshd_t&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;it will fail.&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JoshuaBrindle</name></author>	</entry>

	<entry>
		<id>http://selinuxproject.org/w/?title=RefpolicyBasicRoleCreation&amp;diff=800&amp;oldid=prev</id>
		<title>JoshuaBrindle: /* Default Contexts */</title>
		<link rel="alternate" type="text/html" href="http://selinuxproject.org/w/?title=RefpolicyBasicRoleCreation&amp;diff=800&amp;oldid=prev"/>
				<updated>2009-11-19T16:10:12Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Default Contexts&lt;/span&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:10, 19 November 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 57:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 57:&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;Add the new role and user domain to services where login is desired.  For example, the local_login_t is for local logins, whereas xdm_t is for logins via a X display manager, such as GDM or KDM.&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;Add the new role and user domain to services where login is desired.  For example, the local_login_t is for local logins, whereas xdm_t is for logins via a X display manager, such as GDM or KDM.&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; system_r:local_login_t	user_r:user_t myrole_r:myrole_t staff_r:staff_t sysadm_r:sysadm_t unconfined_r:unconfined_t&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt; system_r:local_login_t	user_r:user_t &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'''&lt;/ins&gt;myrole_r:myrole_t&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''' &lt;/ins&gt;staff_r:staff_t sysadm_r:sysadm_t unconfined_r:unconfined_t&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; system_r:remote_login_t	user_r:user_t staff_r:staff_t unconfined_r:unconfined_t&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt; system_r:remote_login_t	user_r:user_t staff_r:staff_t unconfined_r:unconfined_t&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; system_r:sshd_t		user_r:user_t staff_r:staff_t sysadm_r:sysadm_t unconfined_r:unconfined_t&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt; system_r:sshd_t		user_r:user_t staff_r:staff_t sysadm_r:sysadm_t unconfined_r:unconfined_t&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; system_r:xdm_t		user_r:user_t myrole_r:myrole_t staff_r:staff_t sysadm_r:sysadm_t unconfined_r:unconfined_t&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt; system_r:xdm_t		user_r:user_t &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'''&lt;/ins&gt;myrole_r:myrole_t&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''' &lt;/ins&gt;staff_r:staff_t sysadm_r:sysadm_t unconfined_r:unconfined_t&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;For each service, the order matters.  The service will test to see which role:domain combination is valid for the user logging in, and use the first available choice (left to right).  So if the SELinux user is allowed user_r and myrole_r, the default will be user_r:user_t when logging in.&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;For each service, the order matters.  The service will test to see which role:domain combination is valid for the user logging in, and use the first available choice (left to right).  So if the SELinux user is allowed user_r and myrole_r, the default will be user_r:user_t when logging in.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&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 colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;You should notice that '''myrole_r:myrole_t''' was not added to the remote_login_t or sshd_t lines. This means that if a user with only myrole_t tries to log in via login apps running as remote_login_t or sshd_t it will fail.&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JoshuaBrindle</name></author>	</entry>

	<entry>
		<id>http://selinuxproject.org/w/?title=RefpolicyBasicRoleCreation&amp;diff=799&amp;oldid=prev</id>
		<title>JoshuaBrindle: /* Default Type */</title>
		<link rel="alternate" type="text/html" href="http://selinuxproject.org/w/?title=RefpolicyBasicRoleCreation&amp;diff=799&amp;oldid=prev"/>
				<updated>2009-11-19T16:07:35Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Default Type&lt;/span&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:07, 19 November 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 50:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 50:&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; unconfined_r:unconfined_t&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt; unconfined_r:unconfined_t&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; user_r:user_t&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt; user_r:user_t&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; myrole_r:myrole_t&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;myrole_r:myrole_t&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'''&lt;/ins&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;== Default Contexts ==&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;== Default Contexts ==&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JoshuaBrindle</name></author>	</entry>

	<entry>
		<id>http://selinuxproject.org/w/?title=RefpolicyBasicRoleCreation&amp;diff=755&amp;oldid=prev</id>
		<title>ChrisPeBenito at 12:11, 22 October 2009</title>
		<link rel="alternate" type="text/html" href="http://selinuxproject.org/w/?title=RefpolicyBasicRoleCreation&amp;diff=755&amp;oldid=prev"/>
				<updated>2009-10-22T12:11:49Z</updated>
		
		<summary type="html">&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 12:11, 22 October 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 41:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 41:&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; userdom_admin_user_template(myrole)&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt; userdom_admin_user_template(myrole)&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;These both will create role myrole_r and user domain myrole_t.&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;These both will create role myrole_r and user domain myrole_t&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;.  Then rules can subsequently be added to myrole_t to customize it&lt;/ins&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;= Configuring Userland Programs for the New Role =&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;= Configuring Userland Programs for the New Role =&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>ChrisPeBenito</name></author>	</entry>

	<entry>
		<id>http://selinuxproject.org/w/?title=RefpolicyBasicRoleCreation&amp;diff=753&amp;oldid=prev</id>
		<title>ChrisPeBenito: New page: = Roles in Reference Policy = Reference policy consists of several user roles for typical system operation.  Rules for each role are contained in individual Reference Policy modules, which...</title>
		<link rel="alternate" type="text/html" href="http://selinuxproject.org/w/?title=RefpolicyBasicRoleCreation&amp;diff=753&amp;oldid=prev"/>
				<updated>2009-10-21T15:16:02Z</updated>
		
		<summary type="html">&lt;p&gt;New page: = Roles in Reference Policy = Reference policy consists of several user roles for typical system operation.  Rules for each role are contained in individual Reference Policy modules, which...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Roles in Reference Policy =&lt;br /&gt;
Reference policy consists of several user roles for typical system operation.  Rules for each role are contained in individual Reference Policy modules, which allow flexibility in role separation.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Role&lt;br /&gt;
! Module&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
||user_r||unprivuser||Basic user role.  This role can do most things a non UID 0 linux user can do.&lt;br /&gt;
|-&lt;br /&gt;
||staff_r||staff||Administrator's unprivileged user role.  This role is basically the same as user_r, but is meant for administrators.&lt;br /&gt;
|-&lt;br /&gt;
||sysadm_r||sysadm||General system administration role.&lt;br /&gt;
|-&lt;br /&gt;
||secadm_r||secadm||Security administrator role.  Administrates security policy.&lt;br /&gt;
|-&lt;br /&gt;
||auditadm_r||auditadm||Audit system and audit log administration role.  Configures the auditing policy and manages audit logs.&lt;br /&gt;
|-&lt;br /&gt;
||logadm_r||logadm||Syslog administration role.  Configures syslog and manages system logs.&lt;br /&gt;
|-&lt;br /&gt;
||webadm_r||webadm||Web server administration role.  Configures Apache and can optionally manage user web content.&lt;br /&gt;
|-&lt;br /&gt;
||guest_r||guest||Highly confined user.  No X windows support.&lt;br /&gt;
|-&lt;br /&gt;
||xguest_r||xguest||Highly confined X windows user.&lt;br /&gt;
|-&lt;br /&gt;
||unconfined_r||unconfined||This role is not confined by SELinux except by memory protections (for example executable memory protections).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This guide will discuss creation of new roles when these roles do not meet needs.&lt;br /&gt;
&lt;br /&gt;
= Creating the Policy for the New Role =&lt;br /&gt;
This section of the guide discusses the creation of the policy for the roles.  These statements should be added to a policy module.  See GettingStarted for more information on creating policy modules.&lt;br /&gt;
&lt;br /&gt;
There are several methods for creating roles in Reference Policy.  It is best to use Reference Policy templates, as there are several requirements for a user to log in, but they are beyond the scope of this guide.&lt;br /&gt;
&lt;br /&gt;
== Roles Similar to Existing Roles ==&lt;br /&gt;
If the role's user domain should be similar to user_r or staff_r, the userdom_unpriv_user_template() template should be used.&lt;br /&gt;
 userdom_unpriv_user_template(myrole)&lt;br /&gt;
If the role's user domain should be similar to sysadm_r, the userdom_admin_user_template() template should be used.&lt;br /&gt;
 userdom_admin_user_template(myrole)&lt;br /&gt;
&lt;br /&gt;
These both will create role myrole_r and user domain myrole_t.&lt;br /&gt;
&lt;br /&gt;
= Configuring Userland Programs for the New Role =&lt;br /&gt;
== Default Type ==&lt;br /&gt;
The default_type file configure SELinux-aware programs behavior when constructing a context.  When the program only is provided with a role, the domain for the new context is selected based on this file.  Typically this file is only used by the newrole program.  Add the new role:domain combination to the end of this file.&lt;br /&gt;
 sysadm_r:sysadm_t&lt;br /&gt;
 staff_r:staff_t&lt;br /&gt;
 unconfined_r:unconfined_t&lt;br /&gt;
 user_r:user_t&lt;br /&gt;
 myrole_r:myrole_t&lt;br /&gt;
&lt;br /&gt;
== Default Contexts ==&lt;br /&gt;
The default_contexts files configure SELinux-aware programs behavior when selecting a context for a user.  Typically this is used when logging in, but there are a few other uses.&lt;br /&gt;
&lt;br /&gt;
Add the new role and user domain to services where login is desired.  For example, the local_login_t is for local logins, whereas xdm_t is for logins via a X display manager, such as GDM or KDM.&lt;br /&gt;
&lt;br /&gt;
 system_r:local_login_t	user_r:user_t myrole_r:myrole_t staff_r:staff_t sysadm_r:sysadm_t unconfined_r:unconfined_t&lt;br /&gt;
 system_r:remote_login_t	user_r:user_t staff_r:staff_t unconfined_r:unconfined_t&lt;br /&gt;
 system_r:sshd_t		user_r:user_t staff_r:staff_t sysadm_r:sysadm_t unconfined_r:unconfined_t&lt;br /&gt;
 system_r:xdm_t		user_r:user_t myrole_r:myrole_t staff_r:staff_t sysadm_r:sysadm_t unconfined_r:unconfined_t&lt;br /&gt;
&lt;br /&gt;
For each service, the order matters.  The service will test to see which role:domain combination is valid for the user logging in, and use the first available choice (left to right).  So if the SELinux user is allowed user_r and myrole_r, the default will be user_r:user_t when logging in.&lt;/div&gt;</summary>
		<author><name>ChrisPeBenito</name></author>	</entry>

	</feed>