thanks for the information, but how could I add this to my .te file?<br><br clear="all"><br>-- <br>..Cheers<br>Mark
<br><br><div><span class="gmail_quote">On 8/8/07, <b class="gmail_sendername">Forrest Taylor</b> <<a href="mailto:ftaylor@redhat.com">ftaylor@redhat.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wed, 2007-08-08 at 11:40 -0400, Mark wrote:<br>> I am new to writing policies and have been reading the reference<br>> policy files.  I wrote a simple TCP server that listens on a port for<br>> connections.  I would like to write a policy that will only allow my
<br>> program to bind to a specific port(9999).  I looked at the reference<br>> policy and see that the ports that programs are allowed to use is in<br>> policy/modules/kernel/corenetwork.te.  My questions is, can I specify
<br>> the port in my programs type enforcement file so that I can make a<br>> module instead of listing this in the kernel policy?  If so, what<br>> would the syntax be?<br><br>portcon is only valid in the base module, not a normal loadable module.
<br>The command to generate the port entry for the policy is semanage.  It<br>should look something like the following:<br><br>semanage port -a -t my_port_t -p tcp 9999<br><br>Forrest<br><br></blockquote></div><br>