<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16809" name=GENERATOR><LINK 
href="BLOCKQUOTE{margin-Top: 0px; margin-Bottom: 0px; margin-Left: 2em}" 
rel=stylesheet></HEAD>
<BODY style="FONT-SIZE: 10pt; MARGIN: 10px; FONT-FAMILY: verdana">
<DIV><FONT face=Verdana size=2>hi , every body ,I install 
selinux-policy-targeted in my F11,and run in enforce mode.</FONT></DIV>
<DIV>now I want to change selinux context of /tmp/test,but  failed.I 
thought current shell domain was unconfined_t. then I intend to change my shell 
context to root:sysadm_r: sysadm_t ,but also failed. </DIV>
<DIV>my project team plan to develop selinux policy for our system based on 
selinux-policy.src.rpm. I guess is  this package have not been 
developed? If it has been 
developed ,why I cannot change to sysadm_r: 
sysadm_t? </DIV>
<DIV> </DIV>
<DIV>----------------------------------------------------------------------------</DIV>
<DIV> </DIV>
<DIV>[root@localhost ~]# ls -lZ /tmp/testselinux</DIV>
<DIV>root root unconfined_u:object_r:user_t:user_tmp_t: s0 
/tmp/testselinux</DIV>
<DIV> </DIV>
<DIV>[root@localhost ~]#chcon unconfined_u:object_r:mytest_t 
/tmp/testselinux</DIV>
<DIV>chcon:failed to change context of '/tmp/testselinux' to 
'unconfined_u:object_r:testselinux: s0 : permission denied</DIV>
<DIV> </DIV>
<DIV>## here mytest_t defined in myapp.pp,which has successfully loaded by 
"semodule -i myapp.pp"</DIV>
<DIV> </DIV>
<DIV>[root@localhost ~]# newrole -r sysadm_r -t sysadm_t</DIV>
<DIV>unconfined_u:unconfined_r:unconfined_t: s0 is not valid context</DIV>
<DIV> </DIV>
<DIV>[root@localhost ~]# semanage login -m -s root -r s0-s0:c0.c1023 root</DIV>
<DIV> </DIV>
<DIV>after reboot, graphic terminal cannot run. audit says that 
system_u:system_r: xdm_t require "read" permission for 
system_u:object_r:httpd_sys_content_t.</DIV>
<DIV> </DIV>
<DIV>[root@localhost ~]# id</DIV>
<DIV>context= root:unconfined_r:unconfined_t: s0-s0:c0-c1023</DIV>
<DIV> </DIV>
<DIV>[root@localhost ~]#  newrole -r sysadm_r -t sysadm_t</DIV>
<DIV>failed to exec shell: permission denied</DIV>
<DIV align=left><FONT face=Verdana color=#c0c0c0 size=2>2009-09-02 
</FONT></DIV><FONT face=Verdana size=2>
<HR style="WIDTH: 122px; HEIGHT: 2px" align=left SIZE=2>

<DIV><FONT face=Verdana color=#c0c0c0 size=2><SPAN>zheyeung</SPAN> 
</FONT></DIV></FONT></BODY></HTML>